-
Notifications
You must be signed in to change notification settings - Fork 555
/
browser.ts
64 lines (62 loc) · 1.5 KB
/
browser.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
import type { Dictionary } from './utility-types';
export interface Cookie {
/**
* Cookie name.
*/
name: string;
/**
* Cookie value.
*/
value: string;
/**
* The request-URI to associate with the setting of the cookie. This value can affect the
* default domain, path, source port, and source scheme values of the created cookie.
*/
url?: string;
/**
* Cookie domain.
*/
domain?: string;
/**
* Cookie path.
*/
path?: string;
/**
* True if cookie is secure.
*/
secure?: boolean;
/**
* True if cookie is http-only.
*/
httpOnly?: boolean;
/**
* Cookie SameSite type.
*/
sameSite?: 'Strict' | 'Lax' | 'None';
/**
* Cookie expiration date, session cookie if not set
*/
expires?: number;
/**
* Cookie Priority.
*/
priority?: 'Low' | 'Medium' | 'High';
/**
* True if cookie is SameParty.
*/
sameParty?: boolean;
/**
* Cookie source scheme type.
*/
sourceScheme?: 'Unset' | 'NonSecure' | 'Secure';
/**
* Cookie source port. Valid values are `-1` or `1-65535`, `-1` indicates an unspecified port.
* An unspecified port value allows protocol clients to emulate legacy cookie scope for the port.
* This is a temporary ability and it will be removed in the future.
*/
sourcePort?: number;
}
export interface BrowserLikeResponse {
url(): string;
headers(): Dictionary<string | string[]>;
}