|
1 | 1 | # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. |
2 | 2 |
|
3 | | -from typing import Dict, List |
| 3 | +from typing import Dict, List, Optional |
| 4 | +from typing_extensions import Literal |
4 | 5 |
|
5 | 6 | from pydantic import Field as FieldInfo |
6 | 7 |
|
7 | 8 | from .._models import BaseModel |
8 | 9 |
|
9 | | -__all__ = ["SessionContext"] |
| 10 | +__all__ = ["SessionContext", "Cookie"] |
| 11 | + |
| 12 | + |
| 13 | +class Cookie(BaseModel): |
| 14 | + domain: str |
| 15 | + """Domain the cookie belongs to""" |
| 16 | + |
| 17 | + name: str |
| 18 | + """Name of the cookie""" |
| 19 | + |
| 20 | + value: str |
| 21 | + """Value of the cookie""" |
| 22 | + |
| 23 | + expires: Optional[float] = None |
| 24 | + """Unix timestamp when the cookie expires""" |
| 25 | + |
| 26 | + http_only: Optional[bool] = FieldInfo(alias="httpOnly", default=None) |
| 27 | + """Whether the cookie is HTTP only""" |
| 28 | + |
| 29 | + path: Optional[str] = None |
| 30 | + """Path the cookie is valid for""" |
| 31 | + |
| 32 | + same_site: Optional[Literal["Strict", "Lax", "None"]] = FieldInfo(alias="sameSite", default=None) |
| 33 | + """SameSite attribute of the cookie""" |
| 34 | + |
| 35 | + secure: Optional[bool] = None |
| 36 | + """Whether the cookie requires HTTPS""" |
10 | 37 |
|
11 | 38 |
|
12 | 39 | class SessionContext(BaseModel): |
13 | | - cookies: List[Dict[str, object]] |
14 | | - """List of cookies associated with the session""" |
| 40 | + cookies: Optional[List[Cookie]] = None |
| 41 | + """Cookies from the session""" |
15 | 42 |
|
16 | | - local_storage: Dict[str, object] = FieldInfo(alias="localStorage") |
17 | | - """Local storage data associated with the session""" |
| 43 | + local_storage: Optional[Dict[str, Dict[str, object]]] = FieldInfo(alias="localStorage", default=None) |
| 44 | + """Local storage items from the session""" |
0 commit comments