|
11 | 11 |
|
12 | 12 |
|
13 | 13 | class Cookie(BaseModel): |
14 | | - domain: str |
15 | | - """Domain the cookie belongs to""" |
16 | | - |
17 | 14 | name: str |
18 | | - """Name of the cookie""" |
| 15 | + """The name of the cookie""" |
19 | 16 |
|
20 | 17 | value: str |
21 | | - """Value of the cookie""" |
| 18 | + """The value of the cookie""" |
| 19 | + |
| 20 | + domain: Optional[str] = None |
| 21 | + """The domain of the cookie""" |
22 | 22 |
|
23 | 23 | expires: Optional[float] = None |
24 | | - """Unix timestamp when the cookie expires""" |
| 24 | + """The expiration date of the cookie""" |
25 | 25 |
|
26 | 26 | http_only: Optional[bool] = FieldInfo(alias="httpOnly", default=None) |
27 | 27 | """Whether the cookie is HTTP only""" |
28 | 28 |
|
| 29 | + partition_key: Optional[str] = FieldInfo(alias="partitionKey", default=None) |
| 30 | + """The partition key of the cookie""" |
| 31 | + |
29 | 32 | path: Optional[str] = None |
30 | | - """Path the cookie is valid for""" |
| 33 | + """The path of the cookie""" |
| 34 | + |
| 35 | + priority: Optional[Literal["Low", "Medium", "High"]] = None |
| 36 | + """The priority of the cookie""" |
| 37 | + |
| 38 | + same_party: Optional[bool] = FieldInfo(alias="sameParty", default=None) |
| 39 | + """Whether the cookie is a same party cookie""" |
31 | 40 |
|
32 | 41 | same_site: Optional[Literal["Strict", "Lax", "None"]] = FieldInfo(alias="sameSite", default=None) |
33 | | - """SameSite attribute of the cookie""" |
| 42 | + """The same site attribute of the cookie""" |
34 | 43 |
|
35 | 44 | secure: Optional[bool] = None |
36 | | - """Whether the cookie requires HTTPS""" |
| 45 | + """Whether the cookie is secure""" |
| 46 | + |
| 47 | + session: Optional[bool] = None |
| 48 | + """Whether the cookie is a session cookie""" |
| 49 | + |
| 50 | + size: Optional[float] = None |
| 51 | + """The size of the cookie""" |
| 52 | + |
| 53 | + source_port: Optional[float] = FieldInfo(alias="sourcePort", default=None) |
| 54 | + """The source port of the cookie""" |
| 55 | + |
| 56 | + source_scheme: Optional[Literal["Unset", "NonSecure", "Secure"]] = FieldInfo(alias="sourceScheme", default=None) |
| 57 | + """The source scheme of the cookie""" |
| 58 | + |
| 59 | + url: Optional[str] = None |
| 60 | + """The URL of the cookie""" |
37 | 61 |
|
38 | 62 |
|
39 | 63 | class SessionContext(BaseModel): |
40 | 64 | cookies: Optional[List[Cookie]] = None |
41 | | - """Cookies from the session""" |
| 65 | + """Cookies to initialize in the session""" |
| 66 | + |
| 67 | + indexed_db: Optional[Dict[str, List[Dict[str, object]]]] = FieldInfo(alias="indexedDB", default=None) |
| 68 | + """Domain-specific indexedDB items to initialize in the session""" |
42 | 69 |
|
43 | 70 | local_storage: Optional[Dict[str, Dict[str, object]]] = FieldInfo(alias="localStorage", default=None) |
44 | | - """Local storage items from the session""" |
| 71 | + """Domain-specific localStorage items to initialize in the session""" |
| 72 | + |
| 73 | + session_storage: Optional[Dict[str, Dict[str, object]]] = FieldInfo(alias="sessionStorage", default=None) |
| 74 | + """Domain-specific sessionStorage items to initialize in the session""" |
0 commit comments