@mherod/get-cookie 4.4.0 → 4.4.2

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.
package/dist/index.d.cts CHANGED
@@ -29,15 +29,9 @@ import { ConsolaInstance } from 'consola';
29
29
  * ```
30
30
  */
31
31
  declare const CookieSpecSchema: z.ZodObject<{
32
- name: z.ZodEffects<z.ZodString, string, string>;
33
- domain: z.ZodEffects<z.ZodString, string, string>;
34
- }, "strict", z.ZodTypeAny, {
35
- name: string;
36
- domain: string;
37
- }, {
38
- name: string;
39
- domain: string;
40
- }>;
32
+ name: z.ZodString;
33
+ domain: z.ZodString;
34
+ }, z.core.$strict>;
41
35
  /**
42
36
  * Type definition for cookie specification
43
37
  * Used for specifying which cookie to query
@@ -93,59 +87,19 @@ type CookieSpec = z.infer<typeof CookieSpecSchema>;
93
87
  * ```
94
88
  */
95
89
  declare const ExportedCookieSchema: z.ZodObject<{
96
- domain: z.ZodEffects<z.ZodString, string, string>;
97
- name: z.ZodEffects<z.ZodString, string, string>;
98
- value: z.ZodPipeline<z.ZodEffects<z.ZodString, unknown, string>, z.ZodAny>;
99
- expiry: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"Infinity">, z.ZodDate, z.ZodNumber]>>;
90
+ domain: z.ZodString;
91
+ name: z.ZodString;
92
+ value: z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<unknown, string>>, z.ZodAny>;
93
+ expiry: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"Infinity">, z.ZodDate, z.ZodNumber]>>;
100
94
  meta: z.ZodOptional<z.ZodObject<{
101
95
  file: z.ZodOptional<z.ZodString>;
102
96
  browser: z.ZodOptional<z.ZodString>;
103
97
  decrypted: z.ZodOptional<z.ZodBoolean>;
104
98
  secure: z.ZodOptional<z.ZodBoolean>;
105
99
  httpOnly: z.ZodOptional<z.ZodBoolean>;
106
- path: z.ZodOptional<z.ZodDefault<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>>;
107
- }, "strict", z.ZodUnknown, z.objectOutputType<{
108
- file: z.ZodOptional<z.ZodString>;
109
- browser: z.ZodOptional<z.ZodString>;
110
- decrypted: z.ZodOptional<z.ZodBoolean>;
111
- secure: z.ZodOptional<z.ZodBoolean>;
112
- httpOnly: z.ZodOptional<z.ZodBoolean>;
113
- path: z.ZodOptional<z.ZodDefault<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>>;
114
- }, z.ZodUnknown, "strict">, z.objectInputType<{
115
- file: z.ZodOptional<z.ZodString>;
116
- browser: z.ZodOptional<z.ZodString>;
117
- decrypted: z.ZodOptional<z.ZodBoolean>;
118
- secure: z.ZodOptional<z.ZodBoolean>;
119
- httpOnly: z.ZodOptional<z.ZodBoolean>;
120
- path: z.ZodOptional<z.ZodDefault<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>>;
121
- }, z.ZodUnknown, "strict">>>;
122
- }, "strict", z.ZodTypeAny, {
123
- name: string;
124
- domain: string;
125
- value?: any;
126
- expiry?: number | Date | "Infinity" | undefined;
127
- meta?: z.objectOutputType<{
128
- file: z.ZodOptional<z.ZodString>;
129
- browser: z.ZodOptional<z.ZodString>;
130
- decrypted: z.ZodOptional<z.ZodBoolean>;
131
- secure: z.ZodOptional<z.ZodBoolean>;
132
- httpOnly: z.ZodOptional<z.ZodBoolean>;
133
- path: z.ZodOptional<z.ZodDefault<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>>;
134
- }, z.ZodUnknown, "strict"> | undefined;
135
- }, {
136
- value: string;
137
- name: string;
138
- domain: string;
139
- expiry?: number | Date | "Infinity" | undefined;
140
- meta?: z.objectInputType<{
141
- file: z.ZodOptional<z.ZodString>;
142
- browser: z.ZodOptional<z.ZodString>;
143
- decrypted: z.ZodOptional<z.ZodBoolean>;
144
- secure: z.ZodOptional<z.ZodBoolean>;
145
- httpOnly: z.ZodOptional<z.ZodBoolean>;
146
- path: z.ZodOptional<z.ZodDefault<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>>;
147
- }, z.ZodUnknown, "strict"> | undefined;
148
- }>;
100
+ path: z.ZodOptional<z.ZodDefault<z.ZodString>>;
101
+ }, z.core.$catchall<z.ZodUnknown>>>;
102
+ }, z.core.$strict>;
149
103
  /**
150
104
  * Type definition for exported cookie data
151
105
  * Represents the structure of a cookie after it has been retrieved
@@ -183,20 +137,10 @@ type ExportedCookie = z.infer<typeof ExportedCookieSchema>;
183
137
  */
184
138
  declare const CookieRowSchema: z.ZodObject<{
185
139
  expiry: z.ZodOptional<z.ZodNumber>;
186
- domain: z.ZodEffects<z.ZodString, string, string>;
187
- name: z.ZodEffects<z.ZodString, string, string>;
188
- value: z.ZodUnion<[z.ZodString, z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>]>;
189
- }, "strict", z.ZodTypeAny, {
190
- value: string | Buffer<ArrayBufferLike>;
191
- name: string;
192
- domain: string;
193
- expiry?: number | undefined;
194
- }, {
195
- value: string | Buffer<ArrayBufferLike>;
196
- name: string;
197
- domain: string;
198
- expiry?: number | undefined;
199
- }>;
140
+ domain: z.ZodString;
141
+ name: z.ZodString;
142
+ value: z.ZodUnion<readonly [z.ZodString, z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>]>;
143
+ }, z.core.$strict>;
200
144
  /**
201
145
  * Type definition for raw cookie data
202
146
  */
@@ -205,18 +149,13 @@ type CookieRow = z.infer<typeof CookieRowSchema>;
205
149
  * Schema for cookie render options
206
150
  */
207
151
  declare const RenderOptionsSchema: z.ZodObject<{
208
- format: z.ZodOptional<z.ZodEnum<["merged", "grouped"]>>;
152
+ format: z.ZodOptional<z.ZodEnum<{
153
+ merged: "merged";
154
+ grouped: "grouped";
155
+ }>>;
209
156
  separator: z.ZodOptional<z.ZodString>;
210
157
  showFilePaths: z.ZodOptional<z.ZodBoolean>;
211
- }, "strict", z.ZodTypeAny, {
212
- format?: "merged" | "grouped" | undefined;
213
- separator?: string | undefined;
214
- showFilePaths?: boolean | undefined;
215
- }, {
216
- format?: "merged" | "grouped" | undefined;
217
- separator?: string | undefined;
218
- showFilePaths?: boolean | undefined;
219
- }>;
158
+ }, z.core.$strict>;
220
159
  /**
221
160
  * Type definition for render options
222
161
  */
@@ -224,107 +163,24 @@ type RenderOptions = z.infer<typeof RenderOptionsSchema>;
224
163
  /**
225
164
  * Schema for browser names
226
165
  */
227
- declare const BrowserNameSchema: z.ZodEnum<["Chrome", "Firefox", "Safari", "internal", "unknown"]>;
166
+ declare const BrowserNameSchema: z.ZodEnum<{
167
+ unknown: "unknown";
168
+ Chrome: "Chrome";
169
+ Firefox: "Firefox";
170
+ Safari: "Safari";
171
+ internal: "internal";
172
+ }>;
228
173
  /**
229
174
  * Type definition for browser names
230
175
  */
231
176
  type BrowserName = z.infer<typeof BrowserNameSchema>;
232
- /**
233
- * Schema for cookie query strategy
234
- */
235
- declare const CookieQueryStrategySchema: z.ZodObject<{
236
- browserName: z.ZodEnum<["Chrome", "Firefox", "Safari", "internal", "unknown"]>;
237
- queryCookies: z.ZodFunction<z.ZodTuple<[z.ZodString, z.ZodString, z.ZodOptional<z.ZodString>, z.ZodOptional<z.ZodBoolean>], z.ZodUnknown>, z.ZodPromise<z.ZodArray<z.ZodObject<{
238
- domain: z.ZodEffects<z.ZodString, string, string>;
239
- name: z.ZodEffects<z.ZodString, string, string>;
240
- value: z.ZodPipeline<z.ZodEffects<z.ZodString, unknown, string>, z.ZodAny>;
241
- expiry: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"Infinity">, z.ZodDate, z.ZodNumber]>>;
242
- meta: z.ZodOptional<z.ZodObject<{
243
- file: z.ZodOptional<z.ZodString>;
244
- browser: z.ZodOptional<z.ZodString>;
245
- decrypted: z.ZodOptional<z.ZodBoolean>;
246
- secure: z.ZodOptional<z.ZodBoolean>;
247
- httpOnly: z.ZodOptional<z.ZodBoolean>;
248
- path: z.ZodOptional<z.ZodDefault<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>>;
249
- }, "strict", z.ZodUnknown, z.objectOutputType<{
250
- file: z.ZodOptional<z.ZodString>;
251
- browser: z.ZodOptional<z.ZodString>;
252
- decrypted: z.ZodOptional<z.ZodBoolean>;
253
- secure: z.ZodOptional<z.ZodBoolean>;
254
- httpOnly: z.ZodOptional<z.ZodBoolean>;
255
- path: z.ZodOptional<z.ZodDefault<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>>;
256
- }, z.ZodUnknown, "strict">, z.objectInputType<{
257
- file: z.ZodOptional<z.ZodString>;
258
- browser: z.ZodOptional<z.ZodString>;
259
- decrypted: z.ZodOptional<z.ZodBoolean>;
260
- secure: z.ZodOptional<z.ZodBoolean>;
261
- httpOnly: z.ZodOptional<z.ZodBoolean>;
262
- path: z.ZodOptional<z.ZodDefault<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>>;
263
- }, z.ZodUnknown, "strict">>>;
264
- }, "strict", z.ZodTypeAny, {
265
- name: string;
266
- domain: string;
267
- value?: any;
268
- expiry?: number | Date | "Infinity" | undefined;
269
- meta?: z.objectOutputType<{
270
- file: z.ZodOptional<z.ZodString>;
271
- browser: z.ZodOptional<z.ZodString>;
272
- decrypted: z.ZodOptional<z.ZodBoolean>;
273
- secure: z.ZodOptional<z.ZodBoolean>;
274
- httpOnly: z.ZodOptional<z.ZodBoolean>;
275
- path: z.ZodOptional<z.ZodDefault<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>>;
276
- }, z.ZodUnknown, "strict"> | undefined;
277
- }, {
278
- value: string;
279
- name: string;
280
- domain: string;
281
- expiry?: number | Date | "Infinity" | undefined;
282
- meta?: z.objectInputType<{
283
- file: z.ZodOptional<z.ZodString>;
284
- browser: z.ZodOptional<z.ZodString>;
285
- decrypted: z.ZodOptional<z.ZodBoolean>;
286
- secure: z.ZodOptional<z.ZodBoolean>;
287
- httpOnly: z.ZodOptional<z.ZodBoolean>;
288
- path: z.ZodOptional<z.ZodDefault<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>>;
289
- }, z.ZodUnknown, "strict"> | undefined;
290
- }>, "many">>>;
291
- }, "strict", z.ZodTypeAny, {
292
- browserName: "unknown" | "Chrome" | "Firefox" | "Safari" | "internal";
293
- queryCookies: (args_0: string, args_1: string, args_2: string | undefined, args_3: boolean | undefined, ...args: unknown[]) => Promise<{
294
- name: string;
295
- domain: string;
296
- value?: any;
297
- expiry?: number | Date | "Infinity" | undefined;
298
- meta?: z.objectOutputType<{
299
- file: z.ZodOptional<z.ZodString>;
300
- browser: z.ZodOptional<z.ZodString>;
301
- decrypted: z.ZodOptional<z.ZodBoolean>;
302
- secure: z.ZodOptional<z.ZodBoolean>;
303
- httpOnly: z.ZodOptional<z.ZodBoolean>;
304
- path: z.ZodOptional<z.ZodDefault<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>>;
305
- }, z.ZodUnknown, "strict"> | undefined;
306
- }[]>;
307
- }, {
308
- browserName: "unknown" | "Chrome" | "Firefox" | "Safari" | "internal";
309
- queryCookies: (args_0: string, args_1: string, args_2: string | undefined, args_3: boolean | undefined, ...args: unknown[]) => Promise<{
310
- value: string;
311
- name: string;
312
- domain: string;
313
- expiry?: number | Date | "Infinity" | undefined;
314
- meta?: z.objectInputType<{
315
- file: z.ZodOptional<z.ZodString>;
316
- browser: z.ZodOptional<z.ZodString>;
317
- decrypted: z.ZodOptional<z.ZodBoolean>;
318
- secure: z.ZodOptional<z.ZodBoolean>;
319
- httpOnly: z.ZodOptional<z.ZodBoolean>;
320
- path: z.ZodOptional<z.ZodDefault<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>>;
321
- }, z.ZodUnknown, "strict"> | undefined;
322
- }[]>;
323
- }>;
324
177
  /**
325
178
  * Type definition for cookie query strategy
326
179
  */
327
- type CookieQueryStrategy = z.infer<typeof CookieQueryStrategySchema>;
180
+ type CookieQueryStrategy = {
181
+ browserName: BrowserName;
182
+ queryCookies: (domain: string, name: string, path?: string, secure?: boolean) => Promise<ExportedCookie[]>;
183
+ };
328
184
  /**
329
185
  * Type representing either a single cookie specification or an array of specifications.
330
186
  * Useful when you need to query multiple cookies in a single operation.
@@ -665,6 +521,7 @@ declare abstract class BaseChromiumCookieQueryStrategy extends BaseCookieQuerySt
665
521
  protected getCookieFiles(store?: string): string[];
666
522
  /**
667
523
  * Convert error to string message
524
+ * Uses error utilities for safe error extraction.
668
525
  * @param error - The error to convert
669
526
  * @returns Error message string
670
527
  */
package/dist/index.d.ts CHANGED
@@ -29,15 +29,9 @@ import { ConsolaInstance } from 'consola';
29
29
  * ```
30
30
  */
31
31
  declare const CookieSpecSchema: z.ZodObject<{
32
- name: z.ZodEffects<z.ZodString, string, string>;
33
- domain: z.ZodEffects<z.ZodString, string, string>;
34
- }, "strict", z.ZodTypeAny, {
35
- name: string;
36
- domain: string;
37
- }, {
38
- name: string;
39
- domain: string;
40
- }>;
32
+ name: z.ZodString;
33
+ domain: z.ZodString;
34
+ }, z.core.$strict>;
41
35
  /**
42
36
  * Type definition for cookie specification
43
37
  * Used for specifying which cookie to query
@@ -93,59 +87,19 @@ type CookieSpec = z.infer<typeof CookieSpecSchema>;
93
87
  * ```
94
88
  */
95
89
  declare const ExportedCookieSchema: z.ZodObject<{
96
- domain: z.ZodEffects<z.ZodString, string, string>;
97
- name: z.ZodEffects<z.ZodString, string, string>;
98
- value: z.ZodPipeline<z.ZodEffects<z.ZodString, unknown, string>, z.ZodAny>;
99
- expiry: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"Infinity">, z.ZodDate, z.ZodNumber]>>;
90
+ domain: z.ZodString;
91
+ name: z.ZodString;
92
+ value: z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<unknown, string>>, z.ZodAny>;
93
+ expiry: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"Infinity">, z.ZodDate, z.ZodNumber]>>;
100
94
  meta: z.ZodOptional<z.ZodObject<{
101
95
  file: z.ZodOptional<z.ZodString>;
102
96
  browser: z.ZodOptional<z.ZodString>;
103
97
  decrypted: z.ZodOptional<z.ZodBoolean>;
104
98
  secure: z.ZodOptional<z.ZodBoolean>;
105
99
  httpOnly: z.ZodOptional<z.ZodBoolean>;
106
- path: z.ZodOptional<z.ZodDefault<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>>;
107
- }, "strict", z.ZodUnknown, z.objectOutputType<{
108
- file: z.ZodOptional<z.ZodString>;
109
- browser: z.ZodOptional<z.ZodString>;
110
- decrypted: z.ZodOptional<z.ZodBoolean>;
111
- secure: z.ZodOptional<z.ZodBoolean>;
112
- httpOnly: z.ZodOptional<z.ZodBoolean>;
113
- path: z.ZodOptional<z.ZodDefault<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>>;
114
- }, z.ZodUnknown, "strict">, z.objectInputType<{
115
- file: z.ZodOptional<z.ZodString>;
116
- browser: z.ZodOptional<z.ZodString>;
117
- decrypted: z.ZodOptional<z.ZodBoolean>;
118
- secure: z.ZodOptional<z.ZodBoolean>;
119
- httpOnly: z.ZodOptional<z.ZodBoolean>;
120
- path: z.ZodOptional<z.ZodDefault<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>>;
121
- }, z.ZodUnknown, "strict">>>;
122
- }, "strict", z.ZodTypeAny, {
123
- name: string;
124
- domain: string;
125
- value?: any;
126
- expiry?: number | Date | "Infinity" | undefined;
127
- meta?: z.objectOutputType<{
128
- file: z.ZodOptional<z.ZodString>;
129
- browser: z.ZodOptional<z.ZodString>;
130
- decrypted: z.ZodOptional<z.ZodBoolean>;
131
- secure: z.ZodOptional<z.ZodBoolean>;
132
- httpOnly: z.ZodOptional<z.ZodBoolean>;
133
- path: z.ZodOptional<z.ZodDefault<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>>;
134
- }, z.ZodUnknown, "strict"> | undefined;
135
- }, {
136
- value: string;
137
- name: string;
138
- domain: string;
139
- expiry?: number | Date | "Infinity" | undefined;
140
- meta?: z.objectInputType<{
141
- file: z.ZodOptional<z.ZodString>;
142
- browser: z.ZodOptional<z.ZodString>;
143
- decrypted: z.ZodOptional<z.ZodBoolean>;
144
- secure: z.ZodOptional<z.ZodBoolean>;
145
- httpOnly: z.ZodOptional<z.ZodBoolean>;
146
- path: z.ZodOptional<z.ZodDefault<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>>;
147
- }, z.ZodUnknown, "strict"> | undefined;
148
- }>;
100
+ path: z.ZodOptional<z.ZodDefault<z.ZodString>>;
101
+ }, z.core.$catchall<z.ZodUnknown>>>;
102
+ }, z.core.$strict>;
149
103
  /**
150
104
  * Type definition for exported cookie data
151
105
  * Represents the structure of a cookie after it has been retrieved
@@ -183,20 +137,10 @@ type ExportedCookie = z.infer<typeof ExportedCookieSchema>;
183
137
  */
184
138
  declare const CookieRowSchema: z.ZodObject<{
185
139
  expiry: z.ZodOptional<z.ZodNumber>;
186
- domain: z.ZodEffects<z.ZodString, string, string>;
187
- name: z.ZodEffects<z.ZodString, string, string>;
188
- value: z.ZodUnion<[z.ZodString, z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>]>;
189
- }, "strict", z.ZodTypeAny, {
190
- value: string | Buffer<ArrayBufferLike>;
191
- name: string;
192
- domain: string;
193
- expiry?: number | undefined;
194
- }, {
195
- value: string | Buffer<ArrayBufferLike>;
196
- name: string;
197
- domain: string;
198
- expiry?: number | undefined;
199
- }>;
140
+ domain: z.ZodString;
141
+ name: z.ZodString;
142
+ value: z.ZodUnion<readonly [z.ZodString, z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>]>;
143
+ }, z.core.$strict>;
200
144
  /**
201
145
  * Type definition for raw cookie data
202
146
  */
@@ -205,18 +149,13 @@ type CookieRow = z.infer<typeof CookieRowSchema>;
205
149
  * Schema for cookie render options
206
150
  */
207
151
  declare const RenderOptionsSchema: z.ZodObject<{
208
- format: z.ZodOptional<z.ZodEnum<["merged", "grouped"]>>;
152
+ format: z.ZodOptional<z.ZodEnum<{
153
+ merged: "merged";
154
+ grouped: "grouped";
155
+ }>>;
209
156
  separator: z.ZodOptional<z.ZodString>;
210
157
  showFilePaths: z.ZodOptional<z.ZodBoolean>;
211
- }, "strict", z.ZodTypeAny, {
212
- format?: "merged" | "grouped" | undefined;
213
- separator?: string | undefined;
214
- showFilePaths?: boolean | undefined;
215
- }, {
216
- format?: "merged" | "grouped" | undefined;
217
- separator?: string | undefined;
218
- showFilePaths?: boolean | undefined;
219
- }>;
158
+ }, z.core.$strict>;
220
159
  /**
221
160
  * Type definition for render options
222
161
  */
@@ -224,107 +163,24 @@ type RenderOptions = z.infer<typeof RenderOptionsSchema>;
224
163
  /**
225
164
  * Schema for browser names
226
165
  */
227
- declare const BrowserNameSchema: z.ZodEnum<["Chrome", "Firefox", "Safari", "internal", "unknown"]>;
166
+ declare const BrowserNameSchema: z.ZodEnum<{
167
+ unknown: "unknown";
168
+ Chrome: "Chrome";
169
+ Firefox: "Firefox";
170
+ Safari: "Safari";
171
+ internal: "internal";
172
+ }>;
228
173
  /**
229
174
  * Type definition for browser names
230
175
  */
231
176
  type BrowserName = z.infer<typeof BrowserNameSchema>;
232
- /**
233
- * Schema for cookie query strategy
234
- */
235
- declare const CookieQueryStrategySchema: z.ZodObject<{
236
- browserName: z.ZodEnum<["Chrome", "Firefox", "Safari", "internal", "unknown"]>;
237
- queryCookies: z.ZodFunction<z.ZodTuple<[z.ZodString, z.ZodString, z.ZodOptional<z.ZodString>, z.ZodOptional<z.ZodBoolean>], z.ZodUnknown>, z.ZodPromise<z.ZodArray<z.ZodObject<{
238
- domain: z.ZodEffects<z.ZodString, string, string>;
239
- name: z.ZodEffects<z.ZodString, string, string>;
240
- value: z.ZodPipeline<z.ZodEffects<z.ZodString, unknown, string>, z.ZodAny>;
241
- expiry: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"Infinity">, z.ZodDate, z.ZodNumber]>>;
242
- meta: z.ZodOptional<z.ZodObject<{
243
- file: z.ZodOptional<z.ZodString>;
244
- browser: z.ZodOptional<z.ZodString>;
245
- decrypted: z.ZodOptional<z.ZodBoolean>;
246
- secure: z.ZodOptional<z.ZodBoolean>;
247
- httpOnly: z.ZodOptional<z.ZodBoolean>;
248
- path: z.ZodOptional<z.ZodDefault<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>>;
249
- }, "strict", z.ZodUnknown, z.objectOutputType<{
250
- file: z.ZodOptional<z.ZodString>;
251
- browser: z.ZodOptional<z.ZodString>;
252
- decrypted: z.ZodOptional<z.ZodBoolean>;
253
- secure: z.ZodOptional<z.ZodBoolean>;
254
- httpOnly: z.ZodOptional<z.ZodBoolean>;
255
- path: z.ZodOptional<z.ZodDefault<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>>;
256
- }, z.ZodUnknown, "strict">, z.objectInputType<{
257
- file: z.ZodOptional<z.ZodString>;
258
- browser: z.ZodOptional<z.ZodString>;
259
- decrypted: z.ZodOptional<z.ZodBoolean>;
260
- secure: z.ZodOptional<z.ZodBoolean>;
261
- httpOnly: z.ZodOptional<z.ZodBoolean>;
262
- path: z.ZodOptional<z.ZodDefault<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>>;
263
- }, z.ZodUnknown, "strict">>>;
264
- }, "strict", z.ZodTypeAny, {
265
- name: string;
266
- domain: string;
267
- value?: any;
268
- expiry?: number | Date | "Infinity" | undefined;
269
- meta?: z.objectOutputType<{
270
- file: z.ZodOptional<z.ZodString>;
271
- browser: z.ZodOptional<z.ZodString>;
272
- decrypted: z.ZodOptional<z.ZodBoolean>;
273
- secure: z.ZodOptional<z.ZodBoolean>;
274
- httpOnly: z.ZodOptional<z.ZodBoolean>;
275
- path: z.ZodOptional<z.ZodDefault<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>>;
276
- }, z.ZodUnknown, "strict"> | undefined;
277
- }, {
278
- value: string;
279
- name: string;
280
- domain: string;
281
- expiry?: number | Date | "Infinity" | undefined;
282
- meta?: z.objectInputType<{
283
- file: z.ZodOptional<z.ZodString>;
284
- browser: z.ZodOptional<z.ZodString>;
285
- decrypted: z.ZodOptional<z.ZodBoolean>;
286
- secure: z.ZodOptional<z.ZodBoolean>;
287
- httpOnly: z.ZodOptional<z.ZodBoolean>;
288
- path: z.ZodOptional<z.ZodDefault<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>>;
289
- }, z.ZodUnknown, "strict"> | undefined;
290
- }>, "many">>>;
291
- }, "strict", z.ZodTypeAny, {
292
- browserName: "unknown" | "Chrome" | "Firefox" | "Safari" | "internal";
293
- queryCookies: (args_0: string, args_1: string, args_2: string | undefined, args_3: boolean | undefined, ...args: unknown[]) => Promise<{
294
- name: string;
295
- domain: string;
296
- value?: any;
297
- expiry?: number | Date | "Infinity" | undefined;
298
- meta?: z.objectOutputType<{
299
- file: z.ZodOptional<z.ZodString>;
300
- browser: z.ZodOptional<z.ZodString>;
301
- decrypted: z.ZodOptional<z.ZodBoolean>;
302
- secure: z.ZodOptional<z.ZodBoolean>;
303
- httpOnly: z.ZodOptional<z.ZodBoolean>;
304
- path: z.ZodOptional<z.ZodDefault<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>>;
305
- }, z.ZodUnknown, "strict"> | undefined;
306
- }[]>;
307
- }, {
308
- browserName: "unknown" | "Chrome" | "Firefox" | "Safari" | "internal";
309
- queryCookies: (args_0: string, args_1: string, args_2: string | undefined, args_3: boolean | undefined, ...args: unknown[]) => Promise<{
310
- value: string;
311
- name: string;
312
- domain: string;
313
- expiry?: number | Date | "Infinity" | undefined;
314
- meta?: z.objectInputType<{
315
- file: z.ZodOptional<z.ZodString>;
316
- browser: z.ZodOptional<z.ZodString>;
317
- decrypted: z.ZodOptional<z.ZodBoolean>;
318
- secure: z.ZodOptional<z.ZodBoolean>;
319
- httpOnly: z.ZodOptional<z.ZodBoolean>;
320
- path: z.ZodOptional<z.ZodDefault<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>>;
321
- }, z.ZodUnknown, "strict"> | undefined;
322
- }[]>;
323
- }>;
324
177
  /**
325
178
  * Type definition for cookie query strategy
326
179
  */
327
- type CookieQueryStrategy = z.infer<typeof CookieQueryStrategySchema>;
180
+ type CookieQueryStrategy = {
181
+ browserName: BrowserName;
182
+ queryCookies: (domain: string, name: string, path?: string, secure?: boolean) => Promise<ExportedCookie[]>;
183
+ };
328
184
  /**
329
185
  * Type representing either a single cookie specification or an array of specifications.
330
186
  * Useful when you need to query multiple cookies in a single operation.
@@ -665,6 +521,7 @@ declare abstract class BaseChromiumCookieQueryStrategy extends BaseCookieQuerySt
665
521
  protected getCookieFiles(store?: string): string[];
666
522
  /**
667
523
  * Convert error to string message
524
+ * Uses error utilities for safe error extraction.
668
525
  * @param error - The error to convert
669
526
  * @returns Error message string
670
527
  */