@mherod/get-cookie 2.1.2 → 4.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (109) hide show
  1. package/.husky/commit-msg +2 -0
  2. package/.husky/pre-commit +4 -0
  3. package/.husky/pre-push +4 -0
  4. package/README.md +163 -18
  5. package/commitlint.config.js +12 -0
  6. package/dist/chunk-4I5M3M7H.js +6 -0
  7. package/dist/chunk-4I5M3M7H.js.map +1 -0
  8. package/dist/chunk-ACXFQWII.js +2 -0
  9. package/dist/chunk-ACXFQWII.js.map +1 -0
  10. package/dist/chunk-BKU5PKJ5.js +2 -0
  11. package/dist/chunk-BKU5PKJ5.js.map +1 -0
  12. package/dist/chunk-DR2EQC4R.js +2 -0
  13. package/dist/chunk-DR2EQC4R.js.map +1 -0
  14. package/dist/chunk-FZ5IFH4R.js +2 -0
  15. package/dist/chunk-FZ5IFH4R.js.map +1 -0
  16. package/dist/chunk-S5FU4HO5.js +2 -0
  17. package/dist/chunk-S5FU4HO5.js.map +1 -0
  18. package/dist/chunk-TUGIEFXM.js +2 -0
  19. package/dist/chunk-TUGIEFXM.js.map +1 -0
  20. package/dist/cli/cli.cjs +8 -0
  21. package/dist/cli/cli.cjs.map +1 -0
  22. package/dist/cli/cli.d.cts +1 -0
  23. package/dist/cli/cli.d.ts +1 -0
  24. package/dist/cli/cli.js +4 -0
  25. package/dist/cli/cli.js.map +1 -0
  26. package/dist/getChromeCookie-P623SIWB.js +2 -0
  27. package/dist/getChromeCookie-P623SIWB.js.map +1 -0
  28. package/dist/getChromePassword-74BC3LXO.js +2 -0
  29. package/dist/getChromePassword-74BC3LXO.js.map +1 -0
  30. package/dist/getCookie-FBQKCKJB.js +2 -0
  31. package/dist/getCookie-FBQKCKJB.js.map +1 -0
  32. package/dist/getFirefoxCookie-CGJJJ7VC.js +2 -0
  33. package/dist/getFirefoxCookie-CGJJJ7VC.js.map +1 -0
  34. package/dist/getGroupedRenderedCookies-RNB6DKBL.js +2 -0
  35. package/dist/getGroupedRenderedCookies-RNB6DKBL.js.map +1 -0
  36. package/dist/getMergedRenderedCookies-NC3UTOIC.js +2 -0
  37. package/dist/getMergedRenderedCookies-NC3UTOIC.js.map +1 -0
  38. package/dist/index.cjs +6 -0
  39. package/dist/index.cjs.map +1 -0
  40. package/dist/index.d.cts +252 -0
  41. package/dist/index.d.ts +252 -0
  42. package/dist/index.js +2 -24914
  43. package/dist/index.js.map +1 -0
  44. package/eslint.config.js +243 -0
  45. package/jest.setup.js +4 -0
  46. package/package.json +81 -35
  47. package/tsconfig.build.json +5 -0
  48. package/typedoc.json +22 -0
  49. package/.parcelrc +0 -7
  50. package/.prettierignore +0 -5
  51. package/.prettierrc +0 -12
  52. package/.terserrc +0 -26
  53. package/build-indexes.ts +0 -108
  54. package/bun.lockb +0 -0
  55. package/dist/cli.js +0 -18319
  56. package/dist/types.d.ts +0 -361
  57. package/jest.config.ts +0 -14
  58. package/package-lock.json +0 -5608
  59. package/src/CookieRow.ts +0 -43
  60. package/src/CookieSpec.ts +0 -42
  61. package/src/ExportedCookie.ts +0 -19
  62. package/src/FetchResponse.ts +0 -13
  63. package/src/SpecialCases.ts +0 -15
  64. package/src/StringToRegex.ts +0 -16
  65. package/src/argv.ts +0 -30
  66. package/src/browsers/CompositeCookieQueryStrategy.ts +0 -76
  67. package/src/browsers/CookieQueryStrategy.ts +0 -7
  68. package/src/browsers/CookieStoreQueryStrategy.ts +0 -115
  69. package/src/browsers/QuerySqliteThenTransform.ts +0 -48
  70. package/src/browsers/chrome/ChromeApplicationSupport.ts +0 -14
  71. package/src/browsers/chrome/ChromeCookieQueryStrategy.ts +0 -158
  72. package/src/browsers/chrome/decrypt.ts +0 -154
  73. package/src/browsers/chrome/getChromePassword.ts +0 -28
  74. package/src/browsers/firefox/FirefoxCookieQueryStrategy.ts +0 -109
  75. package/src/browsers/getEncryptedChromeCookie.ts +0 -122
  76. package/src/browsers/index.ts +0 -12
  77. package/src/browsers/mock/MockCookieQueryStrategy.ts +0 -22
  78. package/src/browsers/safari/SafariCookieQueryStrategy.ts +0 -42
  79. package/src/cli.ts +0 -94
  80. package/src/cliQueryCookies.ts +0 -65
  81. package/src/comboQueryCookieSpec.test.ts +0 -92
  82. package/src/comboQueryCookieSpec.ts +0 -26
  83. package/src/cookieQueryOptions.ts +0 -27
  84. package/src/cookieSpecsFromUrl.test.ts +0 -65
  85. package/src/cookieSpecsFromUrl.ts +0 -73
  86. package/src/decodeBinaryCookies.ts +0 -72
  87. package/src/execSimple.ts +0 -12
  88. package/src/fetchWithCookies.test.ts +0 -32
  89. package/src/fetchWithCookies.ts +0 -217
  90. package/src/findAllFiles.ts +0 -48
  91. package/src/getChromeCookie.ts +0 -19
  92. package/src/getCookie.ts +0 -22
  93. package/src/getFirefoxCookie.ts +0 -25
  94. package/src/getGroupedRenderedCookies.ts +0 -42
  95. package/src/getMergedRenderedCookies.test.ts +0 -43
  96. package/src/getMergedRenderedCookies.ts +0 -19
  97. package/src/global.ts +0 -8
  98. package/src/index.ts +0 -26
  99. package/src/isValidJwt.ts +0 -26
  100. package/src/listChromeProfiles.ts +0 -53
  101. package/src/logger.ts +0 -12
  102. package/src/processBeforeReturn.ts +0 -29
  103. package/src/queryCookies.ts +0 -41
  104. package/src/resultsRendered.ts +0 -24
  105. package/src/unpackHeaders.ts +0 -18
  106. package/src/util/flatMapAsync.test.ts +0 -55
  107. package/src/util/flatMapAsync.ts +0 -41
  108. package/src/util/index.ts +0 -1
  109. package/tsconfig.json +0 -26
@@ -0,0 +1,252 @@
1
+ /**
2
+ * Type guard to check if an object matches the CookieRenderOptions interface.
3
+ * Used to validate render options before processing cookie output.
4
+ * @param obj - The object to check.
5
+ * @returns True if the object contains valid render options.
6
+ * @example
7
+ * ```typescript
8
+ * import { isCookieRenderOptions } from 'get-cookie';
9
+ *
10
+ * // Valid render options
11
+ * console.log(isCookieRenderOptions({ format: "json" })); // true
12
+ * console.log(isCookieRenderOptions({
13
+ * format: "text",
14
+ * separator: "\n",
15
+ * showFilePaths: true
16
+ * })); // true
17
+ *
18
+ * // Invalid examples
19
+ * console.log(isCookieRenderOptions({ format: "csv" })); // false - invalid format
20
+ * console.log(isCookieRenderOptions({ separator: "\n" })); // false - missing format
21
+ * console.log(isCookieRenderOptions(null)); // false
22
+ * ```
23
+ */
24
+ type RenderFormat = "merged" | "grouped";
25
+ /**
26
+ * Options for rendering cookies.
27
+ * @example
28
+ * ```typescript
29
+ * import { RenderOptions } from 'get-cookie';
30
+ *
31
+ * // Basic rendering options
32
+ * const basicOptions: RenderOptions = {
33
+ * format: 'merged',
34
+ * separator: '; ',
35
+ * showFilePaths: false
36
+ * };
37
+ *
38
+ * // Grouped format with file paths
39
+ * const groupedOptions: RenderOptions = {
40
+ * format: 'grouped',
41
+ * separator: '; ',
42
+ * showFilePaths: true
43
+ * };
44
+ *
45
+ * // Custom separator
46
+ * const customOptions: RenderOptions = {
47
+ * format: 'merged',
48
+ * separator: ' && ',
49
+ * showFilePaths: false
50
+ * };
51
+ * ```
52
+ */
53
+ interface RenderOptions {
54
+ /** The format to use when rendering cookies. */
55
+ format?: RenderFormat;
56
+ /** The separator to use between cookies. */
57
+ separator?: string;
58
+ /** Whether to show file paths in the output. */
59
+ showFilePaths?: boolean;
60
+ }
61
+
62
+ /**
63
+ * Specification for identifying a cookie by its domain and name.
64
+ * Used to query specific cookies from browser storage.
65
+ * @remarks
66
+ * - Domain matching is exact unless using wildcards.
67
+ * - Name can be "*" to match all cookies for a domain.
68
+ * - Leading dots in domains match all subdomains.
69
+ * @example
70
+ * ```typescript
71
+ * import { CookieSpec } from 'get-cookie';
72
+ *
73
+ * // Basic cookie specification
74
+ * const cookieSpec: CookieSpec = {
75
+ * domain: "example.com",
76
+ * name: "sessionId"
77
+ * };
78
+ *
79
+ * // Using wildcards to match all cookies
80
+ * const allCookies: CookieSpec = {
81
+ * domain: "example.com",
82
+ * name: "*" // Match all cookies for example.com
83
+ * };
84
+ *
85
+ * // Subdomain specification
86
+ * const apiCookies: CookieSpec = {
87
+ * domain: "api.example.com",
88
+ * name: "auth"
89
+ * };
90
+ *
91
+ * // Match cookies across all subdomains
92
+ * const allSubdomainCookies: CookieSpec = {
93
+ * domain: ".example.com", // Note the leading dot
94
+ * name: "tracking"
95
+ * };
96
+ *
97
+ * // Multiple domain levels
98
+ * const deepSubdomainCookie: CookieSpec = {
99
+ * domain: "dev.api.example.com",
100
+ * name: "debug"
101
+ * };
102
+ * ```
103
+ */
104
+ interface CookieSpec {
105
+ /** The domain the cookie belongs to. */
106
+ domain: string;
107
+ /** The name of the cookie. */
108
+ name: string;
109
+ }
110
+
111
+ /**
112
+ * Interface representing a cookie that has been exported from a browser's storage.
113
+ * This is the core data structure used to represent cookies after they have been
114
+ * retrieved from various browser storage mechanisms (Chrome, Firefox, etc.).
115
+ * @remarks
116
+ * - All cookies must have domain, name, and value properties.
117
+ * - Expiry is optional and can be a Date, "Infinity", or undefined.
118
+ * - Meta information is useful for tracking the cookie's origin and state.
119
+ * @example
120
+ * ```typescript
121
+ * import { ExportedCookie } from 'get-cookie';
122
+ *
123
+ * // Basic cookie with required fields
124
+ * const basicCookie: ExportedCookie = {
125
+ * domain: "example.com",
126
+ * name: "sessionId",
127
+ * value: "abc123"
128
+ * };
129
+ *
130
+ * // Cookie with expiry and metadata
131
+ * const detailedCookie: ExportedCookie = {
132
+ * domain: "api.example.com",
133
+ * name: "authToken",
134
+ * value: "xyz789",
135
+ * expiry: new Date("2024-12-31"),
136
+ * meta: {
137
+ * file: "Cookies.sqlite",
138
+ * browser: "Firefox",
139
+ * decrypted: true,
140
+ * secure: true,
141
+ * httpOnly: true,
142
+ * path: "/"
143
+ * }
144
+ * };
145
+ *
146
+ * // Cookie with infinite expiry (session cookie)
147
+ * const persistentCookie: ExportedCookie = {
148
+ * domain: "app.example.com",
149
+ * name: "preferences",
150
+ * value: "theme=dark",
151
+ * expiry: "Infinity"
152
+ * };
153
+ *
154
+ * // Subdomain cookie example
155
+ * const subdomainCookie: ExportedCookie = {
156
+ * domain: ".example.com", // Note the leading dot for all subdomains
157
+ * name: "tracking",
158
+ * value: "user123",
159
+ * meta: {
160
+ * browser: "Chrome",
161
+ * decrypted: true
162
+ * }
163
+ * };
164
+ * ```
165
+ */
166
+ interface ExportedCookie {
167
+ /** The domain the cookie belongs to. */
168
+ domain: string;
169
+ /** The name of the cookie. */
170
+ name: string;
171
+ /** The value of the cookie. */
172
+ value: string;
173
+ /** When the cookie expires (Date object, "Infinity", or undefined). */
174
+ expiry?: Date | "Infinity";
175
+ /** Additional metadata about the cookie. */
176
+ meta?: {
177
+ /** Path to the file the cookie was exported from. */
178
+ file?: string;
179
+ /** Browser the cookie was exported from. */
180
+ browser?: string;
181
+ /** Whether the cookie value was decrypted. */
182
+ decrypted?: boolean;
183
+ /** Any additional metadata. */
184
+ [key: string]: unknown;
185
+ };
186
+ }
187
+
188
+ /**
189
+ * Dynamic import for the getCookie function.
190
+ * @internal
191
+ * @returns Promise resolving to the getCookie function
192
+ * @example
193
+ * ```typescript
194
+ * const getCookieFn = await getCookie();
195
+ * const cookies = await getCookieFn({ domain: 'example.com' });
196
+ * // Returns: [{ name: 'sessionId', value: 'abc123', domain: 'example.com' }, ...]
197
+ * ```
198
+ */
199
+ declare const getCookie: () => Promise<(cookieSpec: CookieSpec) => Promise<ExportedCookie[]>>;
200
+ /**
201
+ * Dynamic import for Chrome-specific cookie retrieval.
202
+ * @internal
203
+ * @returns Promise resolving to the getChromeCookie function
204
+ * @example
205
+ * ```typescript
206
+ * const chromeCookieFn = await getChromeCookie();
207
+ * const cookies = await chromeCookieFn({ domain: 'example.com', secure: true });
208
+ * // Returns Chrome-format cookies: [{ name: 'auth', value: 'xyz789', secure: true }, ...]
209
+ * ```
210
+ */
211
+ declare const getChromeCookie: () => Promise<(cookieSpec: CookieSpec) => Promise<ExportedCookie[]>>;
212
+ /**
213
+ * Dynamic import for Firefox-specific cookie retrieval.
214
+ * @internal
215
+ * @returns Promise resolving to the getFirefoxCookie function
216
+ * @example
217
+ * ```typescript
218
+ * const firefoxCookieFn = await getFirefoxCookie();
219
+ * const cookies = await firefoxCookieFn({ path: '/api' });
220
+ * // Returns Firefox-format cookies: [{ name: 'token', value: 'def456', path: '/api' }, ...]
221
+ * ```
222
+ */
223
+ declare const getFirefoxCookie: () => Promise<(cookieSpec: CookieSpec) => Promise<ExportedCookie[]>>;
224
+ /**
225
+ * Dynamic import for retrieving grouped and rendered cookies.
226
+ * @internal
227
+ * @returns Promise resolving to the getGroupedRenderedCookies function
228
+ * @example
229
+ * ```typescript
230
+ * const groupedCookiesFn = await getGroupedRenderedCookies();
231
+ * const cookieStrings = await groupedCookiesFn({ domain: 'example.com' });
232
+ * // Returns: ['sessionId=abc123; Domain=example.com', 'auth=xyz789; Domain=example.com']
233
+ * ```
234
+ */
235
+ declare const getGroupedRenderedCookies: () => Promise<(cookieSpec: CookieSpec) => Promise<string[]>>;
236
+ /**
237
+ * Dynamic import for retrieving merged and rendered cookies.
238
+ * @internal
239
+ * @returns Promise resolving to the getMergedRenderedCookies function
240
+ * @example
241
+ * ```typescript
242
+ * const mergedCookiesFn = await getMergedRenderedCookies();
243
+ * const cookieString = await mergedCookiesFn(
244
+ * { domain: 'example.com' },
245
+ * { separator: '; ' }
246
+ * );
247
+ * // Returns: "sessionId=abc123; auth=xyz789"
248
+ * ```
249
+ */
250
+ declare const getMergedRenderedCookies: () => Promise<(cookieSpec: CookieSpec, options?: Omit<RenderOptions, "format">) => Promise<string>>;
251
+
252
+ export { getChromeCookie, getCookie, getFirefoxCookie, getGroupedRenderedCookies, getMergedRenderedCookies };
@@ -0,0 +1,252 @@
1
+ /**
2
+ * Type guard to check if an object matches the CookieRenderOptions interface.
3
+ * Used to validate render options before processing cookie output.
4
+ * @param obj - The object to check.
5
+ * @returns True if the object contains valid render options.
6
+ * @example
7
+ * ```typescript
8
+ * import { isCookieRenderOptions } from 'get-cookie';
9
+ *
10
+ * // Valid render options
11
+ * console.log(isCookieRenderOptions({ format: "json" })); // true
12
+ * console.log(isCookieRenderOptions({
13
+ * format: "text",
14
+ * separator: "\n",
15
+ * showFilePaths: true
16
+ * })); // true
17
+ *
18
+ * // Invalid examples
19
+ * console.log(isCookieRenderOptions({ format: "csv" })); // false - invalid format
20
+ * console.log(isCookieRenderOptions({ separator: "\n" })); // false - missing format
21
+ * console.log(isCookieRenderOptions(null)); // false
22
+ * ```
23
+ */
24
+ type RenderFormat = "merged" | "grouped";
25
+ /**
26
+ * Options for rendering cookies.
27
+ * @example
28
+ * ```typescript
29
+ * import { RenderOptions } from 'get-cookie';
30
+ *
31
+ * // Basic rendering options
32
+ * const basicOptions: RenderOptions = {
33
+ * format: 'merged',
34
+ * separator: '; ',
35
+ * showFilePaths: false
36
+ * };
37
+ *
38
+ * // Grouped format with file paths
39
+ * const groupedOptions: RenderOptions = {
40
+ * format: 'grouped',
41
+ * separator: '; ',
42
+ * showFilePaths: true
43
+ * };
44
+ *
45
+ * // Custom separator
46
+ * const customOptions: RenderOptions = {
47
+ * format: 'merged',
48
+ * separator: ' && ',
49
+ * showFilePaths: false
50
+ * };
51
+ * ```
52
+ */
53
+ interface RenderOptions {
54
+ /** The format to use when rendering cookies. */
55
+ format?: RenderFormat;
56
+ /** The separator to use between cookies. */
57
+ separator?: string;
58
+ /** Whether to show file paths in the output. */
59
+ showFilePaths?: boolean;
60
+ }
61
+
62
+ /**
63
+ * Specification for identifying a cookie by its domain and name.
64
+ * Used to query specific cookies from browser storage.
65
+ * @remarks
66
+ * - Domain matching is exact unless using wildcards.
67
+ * - Name can be "*" to match all cookies for a domain.
68
+ * - Leading dots in domains match all subdomains.
69
+ * @example
70
+ * ```typescript
71
+ * import { CookieSpec } from 'get-cookie';
72
+ *
73
+ * // Basic cookie specification
74
+ * const cookieSpec: CookieSpec = {
75
+ * domain: "example.com",
76
+ * name: "sessionId"
77
+ * };
78
+ *
79
+ * // Using wildcards to match all cookies
80
+ * const allCookies: CookieSpec = {
81
+ * domain: "example.com",
82
+ * name: "*" // Match all cookies for example.com
83
+ * };
84
+ *
85
+ * // Subdomain specification
86
+ * const apiCookies: CookieSpec = {
87
+ * domain: "api.example.com",
88
+ * name: "auth"
89
+ * };
90
+ *
91
+ * // Match cookies across all subdomains
92
+ * const allSubdomainCookies: CookieSpec = {
93
+ * domain: ".example.com", // Note the leading dot
94
+ * name: "tracking"
95
+ * };
96
+ *
97
+ * // Multiple domain levels
98
+ * const deepSubdomainCookie: CookieSpec = {
99
+ * domain: "dev.api.example.com",
100
+ * name: "debug"
101
+ * };
102
+ * ```
103
+ */
104
+ interface CookieSpec {
105
+ /** The domain the cookie belongs to. */
106
+ domain: string;
107
+ /** The name of the cookie. */
108
+ name: string;
109
+ }
110
+
111
+ /**
112
+ * Interface representing a cookie that has been exported from a browser's storage.
113
+ * This is the core data structure used to represent cookies after they have been
114
+ * retrieved from various browser storage mechanisms (Chrome, Firefox, etc.).
115
+ * @remarks
116
+ * - All cookies must have domain, name, and value properties.
117
+ * - Expiry is optional and can be a Date, "Infinity", or undefined.
118
+ * - Meta information is useful for tracking the cookie's origin and state.
119
+ * @example
120
+ * ```typescript
121
+ * import { ExportedCookie } from 'get-cookie';
122
+ *
123
+ * // Basic cookie with required fields
124
+ * const basicCookie: ExportedCookie = {
125
+ * domain: "example.com",
126
+ * name: "sessionId",
127
+ * value: "abc123"
128
+ * };
129
+ *
130
+ * // Cookie with expiry and metadata
131
+ * const detailedCookie: ExportedCookie = {
132
+ * domain: "api.example.com",
133
+ * name: "authToken",
134
+ * value: "xyz789",
135
+ * expiry: new Date("2024-12-31"),
136
+ * meta: {
137
+ * file: "Cookies.sqlite",
138
+ * browser: "Firefox",
139
+ * decrypted: true,
140
+ * secure: true,
141
+ * httpOnly: true,
142
+ * path: "/"
143
+ * }
144
+ * };
145
+ *
146
+ * // Cookie with infinite expiry (session cookie)
147
+ * const persistentCookie: ExportedCookie = {
148
+ * domain: "app.example.com",
149
+ * name: "preferences",
150
+ * value: "theme=dark",
151
+ * expiry: "Infinity"
152
+ * };
153
+ *
154
+ * // Subdomain cookie example
155
+ * const subdomainCookie: ExportedCookie = {
156
+ * domain: ".example.com", // Note the leading dot for all subdomains
157
+ * name: "tracking",
158
+ * value: "user123",
159
+ * meta: {
160
+ * browser: "Chrome",
161
+ * decrypted: true
162
+ * }
163
+ * };
164
+ * ```
165
+ */
166
+ interface ExportedCookie {
167
+ /** The domain the cookie belongs to. */
168
+ domain: string;
169
+ /** The name of the cookie. */
170
+ name: string;
171
+ /** The value of the cookie. */
172
+ value: string;
173
+ /** When the cookie expires (Date object, "Infinity", or undefined). */
174
+ expiry?: Date | "Infinity";
175
+ /** Additional metadata about the cookie. */
176
+ meta?: {
177
+ /** Path to the file the cookie was exported from. */
178
+ file?: string;
179
+ /** Browser the cookie was exported from. */
180
+ browser?: string;
181
+ /** Whether the cookie value was decrypted. */
182
+ decrypted?: boolean;
183
+ /** Any additional metadata. */
184
+ [key: string]: unknown;
185
+ };
186
+ }
187
+
188
+ /**
189
+ * Dynamic import for the getCookie function.
190
+ * @internal
191
+ * @returns Promise resolving to the getCookie function
192
+ * @example
193
+ * ```typescript
194
+ * const getCookieFn = await getCookie();
195
+ * const cookies = await getCookieFn({ domain: 'example.com' });
196
+ * // Returns: [{ name: 'sessionId', value: 'abc123', domain: 'example.com' }, ...]
197
+ * ```
198
+ */
199
+ declare const getCookie: () => Promise<(cookieSpec: CookieSpec) => Promise<ExportedCookie[]>>;
200
+ /**
201
+ * Dynamic import for Chrome-specific cookie retrieval.
202
+ * @internal
203
+ * @returns Promise resolving to the getChromeCookie function
204
+ * @example
205
+ * ```typescript
206
+ * const chromeCookieFn = await getChromeCookie();
207
+ * const cookies = await chromeCookieFn({ domain: 'example.com', secure: true });
208
+ * // Returns Chrome-format cookies: [{ name: 'auth', value: 'xyz789', secure: true }, ...]
209
+ * ```
210
+ */
211
+ declare const getChromeCookie: () => Promise<(cookieSpec: CookieSpec) => Promise<ExportedCookie[]>>;
212
+ /**
213
+ * Dynamic import for Firefox-specific cookie retrieval.
214
+ * @internal
215
+ * @returns Promise resolving to the getFirefoxCookie function
216
+ * @example
217
+ * ```typescript
218
+ * const firefoxCookieFn = await getFirefoxCookie();
219
+ * const cookies = await firefoxCookieFn({ path: '/api' });
220
+ * // Returns Firefox-format cookies: [{ name: 'token', value: 'def456', path: '/api' }, ...]
221
+ * ```
222
+ */
223
+ declare const getFirefoxCookie: () => Promise<(cookieSpec: CookieSpec) => Promise<ExportedCookie[]>>;
224
+ /**
225
+ * Dynamic import for retrieving grouped and rendered cookies.
226
+ * @internal
227
+ * @returns Promise resolving to the getGroupedRenderedCookies function
228
+ * @example
229
+ * ```typescript
230
+ * const groupedCookiesFn = await getGroupedRenderedCookies();
231
+ * const cookieStrings = await groupedCookiesFn({ domain: 'example.com' });
232
+ * // Returns: ['sessionId=abc123; Domain=example.com', 'auth=xyz789; Domain=example.com']
233
+ * ```
234
+ */
235
+ declare const getGroupedRenderedCookies: () => Promise<(cookieSpec: CookieSpec) => Promise<string[]>>;
236
+ /**
237
+ * Dynamic import for retrieving merged and rendered cookies.
238
+ * @internal
239
+ * @returns Promise resolving to the getMergedRenderedCookies function
240
+ * @example
241
+ * ```typescript
242
+ * const mergedCookiesFn = await getMergedRenderedCookies();
243
+ * const cookieString = await mergedCookiesFn(
244
+ * { domain: 'example.com' },
245
+ * { separator: '; ' }
246
+ * );
247
+ * // Returns: "sessionId=abc123; auth=xyz789"
248
+ * ```
249
+ */
250
+ declare const getMergedRenderedCookies: () => Promise<(cookieSpec: CookieSpec, options?: Omit<RenderOptions, "format">) => Promise<string>>;
251
+
252
+ export { getChromeCookie, getCookie, getFirefoxCookie, getGroupedRenderedCookies, getMergedRenderedCookies };