1 | import type { CookieInit, CookieList, CookieListItem, CookieStore, CookieStoreDeleteOptions, CookieStoreGetOptions } from 'cookie-store-interface';
|
2 | export * from 'cookie-store-interface';
|
3 | export interface EncryptedCookieStoreOptions {
|
4 | |
5 |
|
6 |
|
7 |
|
8 | keyring?: readonly CryptoKey[];
|
9 | }
|
10 | export interface DeriveOptions {
|
11 | secret: string | BufferSource | JsonWebKey;
|
12 | salt?: BufferSource;
|
13 | iterations?: number;
|
14 | format?: KeyFormat;
|
15 | hash?: HashAlgorithmIdentifier;
|
16 | hmacHash?: HashAlgorithmIdentifier;
|
17 | length?: number;
|
18 | }
|
19 |
|
20 |
|
21 |
|
22 |
|
23 |
|
24 |
|
25 |
|
26 |
|
27 | export declare class EncryptedCookieStore implements CookieStore {
|
28 | #private;
|
29 |
|
30 | static deriveCryptoKey(opts: DeriveOptions): Promise<CryptoKey>;
|
31 | constructor(store: CookieStore, key: CryptoKey, opts?: EncryptedCookieStoreOptions);
|
32 | get(name?: string): Promise<CookieListItem | null>;
|
33 | get(options?: CookieStoreGetOptions): Promise<CookieListItem | null>;
|
34 | getAll(name?: string): Promise<CookieList>;
|
35 | getAll(options?: CookieStoreGetOptions): Promise<CookieList>;
|
36 | set(name: string, value: string): Promise<void>;
|
37 | set(options: CookieInit): Promise<void>;
|
38 | delete(name: string): Promise<void>;
|
39 | delete(options: CookieStoreDeleteOptions): Promise<void>;
|
40 | addEventListener(...args: Parameters<CookieStore['addEventListener']>): void;
|
41 | dispatchEvent(event: Event): boolean;
|
42 | removeEventListener(...args: Parameters<CookieStore['removeEventListener']>): void;
|
43 | }
|