vigor-fetch 4.0.5 → 4.0.6

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 (3) hide show
  1. package/dist/index.d.cts +1365 -241
  2. package/dist/index.d.ts +1365 -241
  3. package/package.json +1 -1
package/dist/index.d.cts CHANGED
@@ -43,19 +43,6 @@ declare const VigorEmpty: symbol & {
43
43
  type VigorEmptyType = typeof VigorEmpty;
44
44
  type VigorExcludeEmpty<T> = Exclude<T, VigorEmptyType>;
45
45
 
46
- type VigorParseContextSchema<T extends VigorParseSchema<T>> = {
47
- __brand: VigorBrand<"Parse", "Context<Schema">;
48
- result: unknown | VigorDefaultType;
49
- error: unknown;
50
- response: VigorParsePolicySchema<T>["target"];
51
- flags: {
52
- overrided: boolean;
53
- restarted: boolean;
54
- };
55
- record: Record<string, any>;
56
- policy: T["policy"];
57
- };
58
-
59
46
  /**
60
47
  * Base class for Vigor's immutable, chainable builder objects.
61
48
  *
@@ -101,6 +88,236 @@ declare abstract class VigorStatus<Base, Config extends Base, TL extends VigorTy
101
88
  get config(): Config;
102
89
  }
103
90
 
91
+ type VigorAllPolicySettingsSchema<T extends VigorAllSchema<T>> = {
92
+ __brand: VigorBrand<"All", "Policy<Settings<Schema">;
93
+ concurrency: number;
94
+ onlySuccess: boolean;
95
+ };
96
+ declare const VigorAllPolicySettingsBase: {
97
+ readonly __brand: VigorBrand<"All", "Policy<Settings<Schema">;
98
+ readonly concurrency: 5;
99
+ readonly onlySuccess: false;
100
+ };
101
+ /** Immutable builder for an all-policy's general settings. */
102
+ declare class VigorAllPolicySettings<T extends VigorAllSchema<T> = typeof VigorAllBase> extends VigorStatus<VigorAllSchema<any>, T, VigorAllPolicySettingsTypeLambda> {
103
+ constructor(config?: T);
104
+ protected _create<C>(config: C): VigorApply<VigorAllPolicySettingsTypeLambda, C>;
105
+ /** Sets the maximum number of tasks run concurrently. */
106
+ concurrency<const N extends VigorAllSchema<any>["policy"]["settings"]["concurrency"]>(num: N): VigorAllPolicySettings<VigorAllIn<VigorDeepMerge<T, {
107
+ readonly policy: {
108
+ readonly settings: {
109
+ readonly concurrency: N;
110
+ };
111
+ };
112
+ }>>>;
113
+ /** When enabled, filters the final result down to only the tasks that succeeded. */
114
+ onlySuccess<const N extends VigorAllSchema<any>["policy"]["settings"]["onlySuccess"]>(bool: N): VigorAllPolicySettings<VigorAllIn<VigorDeepMerge<T, {
115
+ readonly policy: {
116
+ readonly settings: {
117
+ readonly onlySuccess: N;
118
+ };
119
+ };
120
+ }>>>;
121
+ }
122
+
123
+ type VigorAllTask = () => unknown | Promise<unknown>;
124
+ type VigorAllPolicySchema<T extends VigorAllSchema<T>> = {
125
+ __brand: VigorBrand<"All", "Policy<Schema">;
126
+ target: VigorAllTask[];
127
+ settings: VigorAllPolicySettingsSchema<T>;
128
+ middlewares: VigorAllPolicyMiddlewaresSchema<T>;
129
+ };
130
+ declare const VigorAllPolicyBase: {
131
+ readonly __brand: VigorBrand<"All", "Policy<Schema">;
132
+ readonly target: VigorAllTask[];
133
+ readonly settings: {
134
+ readonly __brand: VigorBrand<"All", "Policy<Settings<Schema">;
135
+ readonly concurrency: 5;
136
+ readonly onlySuccess: false;
137
+ };
138
+ readonly middlewares: {
139
+ readonly __brand: VigorBrand<"All", "Policy<Middlewares<Schema">;
140
+ readonly before: VigorAllEachMiddlewareFn[];
141
+ readonly after: VigorAllEachMiddlewareFn[];
142
+ readonly onError: VigorAllEachOnErrorFn[];
143
+ };
144
+ };
145
+
146
+ type VigorAllContextSchema<T extends VigorAllSchema<T>> = {
147
+ __brand: VigorBrand<"All", "Context<Schema">;
148
+ result: unknown[] | VigorDefaultType;
149
+ policy: T["policy"];
150
+ record: Record<string, any>;
151
+ };
152
+ type VigorAllEachContextSchema<T extends VigorAllSchema<T>> = {
153
+ __brand: VigorBrand<"All", "EachContext<Schema">;
154
+ result: unknown | VigorDefaultType;
155
+ error: unknown;
156
+ flags: {
157
+ overrided: boolean;
158
+ };
159
+ record: Record<string, any>;
160
+ };
161
+
162
+ type VigorAllSchema<T extends VigorAllSchema<T>> = {
163
+ __brand: VigorBrand<"All", "Schema">;
164
+ policy: VigorAllPolicySchema<T>;
165
+ context: VigorAllContextSchema<T>;
166
+ };
167
+ declare const VigorAllBase: {
168
+ readonly __brand: VigorBrand<"All", "Schema">;
169
+ readonly policy: {
170
+ readonly __brand: VigorBrand<"All", "Policy<Schema">;
171
+ readonly target: VigorAllTask[];
172
+ readonly settings: {
173
+ readonly __brand: VigorBrand<"All", "Policy<Settings<Schema">;
174
+ readonly concurrency: 5;
175
+ readonly onlySuccess: false;
176
+ };
177
+ readonly middlewares: {
178
+ readonly __brand: VigorBrand<"All", "Policy<Middlewares<Schema">;
179
+ readonly before: VigorAllEachMiddlewareFn[];
180
+ readonly after: VigorAllEachMiddlewareFn[];
181
+ readonly onError: VigorAllEachOnErrorFn[];
182
+ };
183
+ };
184
+ readonly context: {
185
+ readonly __brand: VigorBrand<"All", "Context<Schema">;
186
+ readonly result: symbol & {
187
+ __brand: VigorBrand<"Core", "Symbol_Default">;
188
+ };
189
+ readonly policy: {
190
+ readonly __brand: VigorBrand<"All", "Policy<Schema">;
191
+ readonly target: VigorAllTask[];
192
+ readonly settings: {
193
+ readonly __brand: VigorBrand<"All", "Policy<Settings<Schema">;
194
+ readonly concurrency: 5;
195
+ readonly onlySuccess: false;
196
+ };
197
+ readonly middlewares: {
198
+ readonly __brand: VigorBrand<"All", "Policy<Middlewares<Schema">;
199
+ readonly before: VigorAllEachMiddlewareFn[];
200
+ readonly after: VigorAllEachMiddlewareFn[];
201
+ readonly onError: VigorAllEachOnErrorFn[];
202
+ };
203
+ };
204
+ readonly record: {};
205
+ };
206
+ };
207
+ /**
208
+ * Immutable builder that runs a list of independent tasks with bounded
209
+ * concurrency, per-task middleware, and either an all-results or
210
+ * only-successes result mode.
211
+ */
212
+ declare class VigorAll<T extends VigorAllSchema<T> = typeof VigorAllBase> extends VigorStatus<VigorAllSchema<T>, T, VigorAllTypeLambda> {
213
+ constructor(config?: T);
214
+ protected _create<C>(config: C): VigorApply<VigorAllTypeLambda, C>;
215
+ /** Sets the list of tasks to run. */
216
+ target<const N extends VigorAllTask[]>(...funcs: N): VigorAll<VigorAllIn<VigorDeepMerge<T, {
217
+ readonly policy: {
218
+ readonly target: N;
219
+ };
220
+ }>>>;
221
+ /** Configures the all-policy's general settings (concurrency, onlySuccess). */
222
+ settings<const N extends VigorDeepPartial<VigorAllPolicySettingsSchema<T>>, R extends VigorAllSchema<any>>(input: N | ((s: VigorAllPolicySettings<T>) => VigorAllPolicySettings<R>) | VigorAllPolicySettings<R>): VigorAll<VigorAllIn<VigorDeepMerge<T, {
223
+ readonly policy: {
224
+ readonly settings: VigorAllPolicySettingsSchema<any>;
225
+ };
226
+ }>>>;
227
+ /** Configures the all-policy's per-task middleware pipeline. */
228
+ middlewares<const N extends VigorDeepPartial<VigorAllPolicyMiddlewaresSchema<T>>, R extends VigorAllSchema<any>>(input: N | ((s: VigorAllPolicyMiddlewares<T>) => VigorAllPolicyMiddlewares<R>) | VigorAllPolicyMiddlewares<R>): VigorAll<VigorAllIn<VigorDeepMerge<T, {
229
+ readonly policy: {
230
+ readonly middlewares: VigorAllPolicyMiddlewaresSchema<any>;
231
+ };
232
+ }>>>;
233
+ /** Runs a single task through the before/after/onError middleware pipeline. */
234
+ private _runTask;
235
+ /** Runs all tasks and returns the results array directly, throwing on final failure. */
236
+ request<R extends unknown[] = unknown[]>(): Promise<R>;
237
+ /** Runs all tasks and returns a result/error envelope instead of throwing. */
238
+ requestVerbose<R extends unknown[] = unknown[]>(): Promise<{
239
+ success: false;
240
+ data: null;
241
+ error: unknown;
242
+ } | {
243
+ success: true;
244
+ data: R;
245
+ error: null;
246
+ }>;
247
+ /** Internal execution loop implementing the bounded-concurrency worker pool. */
248
+ private requestRuntime;
249
+ }
250
+
251
+ type VigorAllIn<T> = T extends VigorAllSchema<any> ? T : never;
252
+ interface VigorAllTypeLambda extends VigorTypeLambda {
253
+ readonly Target: VigorAll<VigorAllIn<this["In"]>>;
254
+ }
255
+ interface VigorAllPolicySettingsTypeLambda extends VigorTypeLambda {
256
+ readonly Target: VigorAllPolicySettings<VigorAllIn<this["In"]>>;
257
+ }
258
+ interface VigorAllPolicyMiddlewaresTypeLambda extends VigorTypeLambda {
259
+ readonly Target: VigorAllPolicyMiddlewares<VigorAllIn<this["In"]>>;
260
+ }
261
+
262
+ type VigorAllEachMiddlewareFn = (ctx: VigorAllEachContextSchema<any>) => void | Promise<void>;
263
+ type VigorAllEachOnErrorFn = (ctx: VigorAllEachContextSchema<any>, api: {
264
+ setResult: (r: unknown) => void;
265
+ }) => void | Promise<void>;
266
+ type VigorAllPolicyMiddlewaresSchema<T extends VigorAllSchema<T>> = {
267
+ __brand: VigorBrand<"All", "Policy<Middlewares<Schema">;
268
+ before: VigorAllEachMiddlewareFn[];
269
+ after: VigorAllEachMiddlewareFn[];
270
+ onError: VigorAllEachOnErrorFn[];
271
+ };
272
+ declare const VigorAllPolicyMiddlewaresBase: {
273
+ readonly __brand: VigorBrand<"All", "Policy<Middlewares<Schema">;
274
+ readonly before: VigorAllEachMiddlewareFn[];
275
+ readonly after: VigorAllEachMiddlewareFn[];
276
+ readonly onError: VigorAllEachOnErrorFn[];
277
+ };
278
+ /** Immutable builder for an all-policy's per-task middleware pipeline (`before`, `after`, `onError`). */
279
+ declare class VigorAllPolicyMiddlewares<T extends VigorAllSchema<T> = typeof VigorAllBase> extends VigorStatus<VigorAllSchema<any>, T, VigorAllPolicyMiddlewaresTypeLambda> {
280
+ constructor(config?: T);
281
+ protected _create<C>(config: C): VigorApply<VigorAllPolicyMiddlewaresTypeLambda, C>;
282
+ /** Registers a middleware that runs before each task is invoked. */
283
+ before<const N extends VigorAllEachMiddlewareFn>(func: N): VigorAllPolicyMiddlewares<VigorAllIn<VigorDeepMerge<T, {
284
+ readonly policy: {
285
+ readonly middlewares: {
286
+ readonly before: readonly [N];
287
+ };
288
+ };
289
+ }>>>;
290
+ /** Registers a middleware that runs after each task settles successfully. */
291
+ after<const N extends VigorAllEachMiddlewareFn>(func: N): VigorAllPolicyMiddlewares<VigorAllIn<VigorDeepMerge<T, {
292
+ readonly policy: {
293
+ readonly middlewares: {
294
+ readonly after: readonly [N];
295
+ };
296
+ };
297
+ }>>>;
298
+ /** Registers a middleware that runs when an individual task fails. */
299
+ onError<const N extends VigorAllEachOnErrorFn>(func: N): VigorAllPolicyMiddlewares<VigorAllIn<VigorDeepMerge<T, {
300
+ readonly policy: {
301
+ readonly middlewares: {
302
+ readonly onError: readonly [N];
303
+ };
304
+ };
305
+ }>>>;
306
+ }
307
+
308
+ type VigorParseContextSchema<T extends VigorParseSchema<T>> = {
309
+ __brand: VigorBrand<"Parse", "Context<Schema">;
310
+ result: unknown | VigorDefaultType;
311
+ error: unknown;
312
+ response: VigorParsePolicySchema<T>["target"];
313
+ flags: {
314
+ overrided: boolean;
315
+ restarted: boolean;
316
+ };
317
+ record: Record<string, any>;
318
+ policy: T["policy"];
319
+ };
320
+
104
321
  type VigorParsePolicySettingsSchema<T extends VigorParseSchema<T>> = {
105
322
  __brand: VigorBrand<"Parse", "Policy<Settings<Schema">;
106
323
  raw: boolean;
@@ -1358,229 +1575,12 @@ declare class VigorRetryPolicyAlgorithms<T extends VigorRetrySchema<T> = typeof
1358
1575
  }>>>;
1359
1576
  }
1360
1577
 
1361
- type VigorAllPolicySettingsSchema<T extends VigorAllSchema<T>> = {
1362
- __brand: VigorBrand<"All", "Policy<Settings<Schema">;
1363
- concurrency: number;
1364
- onlySuccess: boolean;
1365
- };
1366
- declare const VigorAllPolicySettingsBase: {
1367
- readonly __brand: VigorBrand<"All", "Policy<Settings<Schema">;
1368
- readonly concurrency: 5;
1369
- readonly onlySuccess: false;
1370
- };
1371
- /** Immutable builder for an all-policy's general settings. */
1372
- declare class VigorAllPolicySettings<T extends VigorAllSchema<T> = typeof VigorAllBase> extends VigorStatus<VigorAllSchema<any>, T, VigorAllPolicySettingsTypeLambda> {
1373
- constructor(config?: T);
1374
- protected _create<C>(config: C): VigorApply<VigorAllPolicySettingsTypeLambda, C>;
1375
- /** Sets the maximum number of tasks run concurrently. */
1376
- concurrency<const N extends VigorAllSchema<any>["policy"]["settings"]["concurrency"]>(num: N): VigorAllPolicySettings<VigorAllIn<VigorDeepMerge<T, {
1377
- readonly policy: {
1378
- readonly settings: {
1379
- readonly concurrency: N;
1380
- };
1381
- };
1382
- }>>>;
1383
- /** When enabled, filters the final result down to only the tasks that succeeded. */
1384
- onlySuccess<const N extends VigorAllSchema<any>["policy"]["settings"]["onlySuccess"]>(bool: N): VigorAllPolicySettings<VigorAllIn<VigorDeepMerge<T, {
1385
- readonly policy: {
1386
- readonly settings: {
1387
- readonly onlySuccess: N;
1388
- };
1389
- };
1390
- }>>>;
1391
- }
1392
-
1393
- type VigorAllTask = () => unknown | Promise<unknown>;
1394
- type VigorAllPolicySchema<T extends VigorAllSchema<T>> = {
1395
- __brand: VigorBrand<"All", "Policy<Schema">;
1396
- target: VigorAllTask[];
1397
- settings: VigorAllPolicySettingsSchema<T>;
1398
- middlewares: VigorAllPolicyMiddlewaresSchema<T>;
1399
- };
1400
- declare const VigorAllPolicyBase: {
1401
- readonly __brand: VigorBrand<"All", "Policy<Schema">;
1402
- readonly target: VigorAllTask[];
1403
- readonly settings: {
1404
- readonly __brand: VigorBrand<"All", "Policy<Settings<Schema">;
1405
- readonly concurrency: 5;
1406
- readonly onlySuccess: false;
1407
- };
1408
- readonly middlewares: {
1409
- readonly __brand: VigorBrand<"All", "Policy<Middlewares<Schema">;
1410
- readonly before: VigorAllEachMiddlewareFn[];
1411
- readonly after: VigorAllEachMiddlewareFn[];
1412
- readonly onError: VigorAllEachOnErrorFn[];
1413
- };
1414
- };
1415
-
1416
- type VigorAllContextSchema<T extends VigorAllSchema<T>> = {
1417
- __brand: VigorBrand<"All", "Context<Schema">;
1418
- result: unknown[] | VigorDefaultType;
1419
- policy: T["policy"];
1420
- record: Record<string, any>;
1421
- };
1422
- type VigorAllEachContextSchema<T extends VigorAllSchema<T>> = {
1423
- __brand: VigorBrand<"All", "EachContext<Schema">;
1424
- result: unknown | VigorDefaultType;
1425
- error: unknown;
1426
- flags: {
1427
- overrided: boolean;
1428
- };
1429
- record: Record<string, any>;
1430
- };
1431
-
1432
- type VigorAllSchema<T extends VigorAllSchema<T>> = {
1433
- __brand: VigorBrand<"All", "Schema">;
1434
- policy: VigorAllPolicySchema<T>;
1435
- context: VigorAllContextSchema<T>;
1436
- };
1437
- declare const VigorAllBase: {
1438
- readonly __brand: VigorBrand<"All", "Schema">;
1439
- readonly policy: {
1440
- readonly __brand: VigorBrand<"All", "Policy<Schema">;
1441
- readonly target: VigorAllTask[];
1442
- readonly settings: {
1443
- readonly __brand: VigorBrand<"All", "Policy<Settings<Schema">;
1444
- readonly concurrency: 5;
1445
- readonly onlySuccess: false;
1446
- };
1447
- readonly middlewares: {
1448
- readonly __brand: VigorBrand<"All", "Policy<Middlewares<Schema">;
1449
- readonly before: VigorAllEachMiddlewareFn[];
1450
- readonly after: VigorAllEachMiddlewareFn[];
1451
- readonly onError: VigorAllEachOnErrorFn[];
1452
- };
1453
- };
1454
- readonly context: {
1455
- readonly __brand: VigorBrand<"All", "Context<Schema">;
1456
- readonly result: symbol & {
1457
- __brand: VigorBrand<"Core", "Symbol_Default">;
1458
- };
1459
- readonly policy: {
1460
- readonly __brand: VigorBrand<"All", "Policy<Schema">;
1461
- readonly target: VigorAllTask[];
1462
- readonly settings: {
1463
- readonly __brand: VigorBrand<"All", "Policy<Settings<Schema">;
1464
- readonly concurrency: 5;
1465
- readonly onlySuccess: false;
1466
- };
1467
- readonly middlewares: {
1468
- readonly __brand: VigorBrand<"All", "Policy<Middlewares<Schema">;
1469
- readonly before: VigorAllEachMiddlewareFn[];
1470
- readonly after: VigorAllEachMiddlewareFn[];
1471
- readonly onError: VigorAllEachOnErrorFn[];
1472
- };
1473
- };
1474
- readonly record: {};
1475
- };
1476
- };
1477
- /**
1478
- * Immutable builder that runs a list of independent tasks with bounded
1479
- * concurrency, per-task middleware, and either an all-results or
1480
- * only-successes result mode.
1481
- */
1482
- declare class VigorAll<T extends VigorAllSchema<T> = typeof VigorAllBase> extends VigorStatus<VigorAllSchema<T>, T, VigorAllTypeLambda> {
1483
- constructor(config?: T);
1484
- protected _create<C>(config: C): VigorApply<VigorAllTypeLambda, C>;
1485
- /** Sets the list of tasks to run. */
1486
- target<const N extends VigorAllTask[]>(...funcs: N): VigorAll<VigorAllIn<VigorDeepMerge<T, {
1487
- readonly policy: {
1488
- readonly target: N;
1489
- };
1490
- }>>>;
1491
- /** Configures the all-policy's general settings (concurrency, onlySuccess). */
1492
- settings<const N extends VigorDeepPartial<VigorAllPolicySettingsSchema<T>>, R extends VigorAllSchema<any>>(input: N | ((s: VigorAllPolicySettings<T>) => VigorAllPolicySettings<R>) | VigorAllPolicySettings<R>): VigorAll<VigorAllIn<VigorDeepMerge<T, {
1493
- readonly policy: {
1494
- readonly settings: VigorAllPolicySettingsSchema<any>;
1495
- };
1496
- }>>>;
1497
- /** Configures the all-policy's per-task middleware pipeline. */
1498
- middlewares<const N extends VigorDeepPartial<VigorAllPolicyMiddlewaresSchema<T>>, R extends VigorAllSchema<any>>(input: N | ((s: VigorAllPolicyMiddlewares<T>) => VigorAllPolicyMiddlewares<R>) | VigorAllPolicyMiddlewares<R>): VigorAll<VigorAllIn<VigorDeepMerge<T, {
1499
- readonly policy: {
1500
- readonly middlewares: VigorAllPolicyMiddlewaresSchema<any>;
1501
- };
1502
- }>>>;
1503
- /** Runs a single task through the before/after/onError middleware pipeline. */
1504
- private _runTask;
1505
- /** Runs all tasks and returns the results array directly, throwing on final failure. */
1506
- request<R extends unknown[] = unknown[]>(): Promise<R>;
1507
- /** Runs all tasks and returns a result/error envelope instead of throwing. */
1508
- requestVerbose<R extends unknown[] = unknown[]>(): Promise<{
1509
- success: false;
1510
- data: null;
1511
- error: unknown;
1512
- } | {
1513
- success: true;
1514
- data: R;
1515
- error: null;
1516
- }>;
1517
- /** Internal execution loop implementing the bounded-concurrency worker pool. */
1518
- private requestRuntime;
1519
- }
1520
-
1521
- type VigorAllIn<T> = T extends VigorAllSchema<any> ? T : never;
1522
- interface VigorAllTypeLambda extends VigorTypeLambda {
1523
- readonly Target: VigorAll<VigorAllIn<this["In"]>>;
1524
- }
1525
- interface VigorAllPolicySettingsTypeLambda extends VigorTypeLambda {
1526
- readonly Target: VigorAllPolicySettings<VigorAllIn<this["In"]>>;
1527
- }
1528
- interface VigorAllPolicyMiddlewaresTypeLambda extends VigorTypeLambda {
1529
- readonly Target: VigorAllPolicyMiddlewares<VigorAllIn<this["In"]>>;
1530
- }
1531
-
1532
- type VigorAllEachMiddlewareFn = (ctx: VigorAllEachContextSchema<any>) => void | Promise<void>;
1533
- type VigorAllEachOnErrorFn = (ctx: VigorAllEachContextSchema<any>, api: {
1534
- setResult: (r: unknown) => void;
1535
- }) => void | Promise<void>;
1536
- type VigorAllPolicyMiddlewaresSchema<T extends VigorAllSchema<T>> = {
1537
- __brand: VigorBrand<"All", "Policy<Middlewares<Schema">;
1538
- before: VigorAllEachMiddlewareFn[];
1539
- after: VigorAllEachMiddlewareFn[];
1540
- onError: VigorAllEachOnErrorFn[];
1541
- };
1542
- declare const VigorAllPolicyMiddlewaresBase: {
1543
- readonly __brand: VigorBrand<"All", "Policy<Middlewares<Schema">;
1544
- readonly before: VigorAllEachMiddlewareFn[];
1545
- readonly after: VigorAllEachMiddlewareFn[];
1546
- readonly onError: VigorAllEachOnErrorFn[];
1547
- };
1548
- /** Immutable builder for an all-policy's per-task middleware pipeline (`before`, `after`, `onError`). */
1549
- declare class VigorAllPolicyMiddlewares<T extends VigorAllSchema<T> = typeof VigorAllBase> extends VigorStatus<VigorAllSchema<any>, T, VigorAllPolicyMiddlewaresTypeLambda> {
1550
- constructor(config?: T);
1551
- protected _create<C>(config: C): VigorApply<VigorAllPolicyMiddlewaresTypeLambda, C>;
1552
- /** Registers a middleware that runs before each task is invoked. */
1553
- before<const N extends VigorAllEachMiddlewareFn>(func: N): VigorAllPolicyMiddlewares<VigorAllIn<VigorDeepMerge<T, {
1554
- readonly policy: {
1555
- readonly middlewares: {
1556
- readonly before: readonly [N];
1557
- };
1558
- };
1559
- }>>>;
1560
- /** Registers a middleware that runs after each task settles successfully. */
1561
- after<const N extends VigorAllEachMiddlewareFn>(func: N): VigorAllPolicyMiddlewares<VigorAllIn<VigorDeepMerge<T, {
1562
- readonly policy: {
1563
- readonly middlewares: {
1564
- readonly after: readonly [N];
1565
- };
1566
- };
1567
- }>>>;
1568
- /** Registers a middleware that runs when an individual task fails. */
1569
- onError<const N extends VigorAllEachOnErrorFn>(func: N): VigorAllPolicyMiddlewares<VigorAllIn<VigorDeepMerge<T, {
1570
- readonly policy: {
1571
- readonly middlewares: {
1572
- readonly onError: readonly [N];
1573
- };
1574
- };
1575
- }>>>;
1576
- }
1577
-
1578
- type VigorFetchPolicySettingsSchema<T extends VigorFetchSchema<T>> = {
1579
- __brand: VigorBrand<"Fetch", "Policy<Settings<Schema">;
1580
- retryHeaders: string[];
1581
- unretryStatus: number[];
1582
- maxRestarts: number;
1583
- default: ((ctx: T["context"]) => any | Promise<any>) | VigorEmptyType;
1578
+ type VigorFetchPolicySettingsSchema<T extends VigorFetchSchema<T>> = {
1579
+ __brand: VigorBrand<"Fetch", "Policy<Settings<Schema">;
1580
+ retryHeaders: string[];
1581
+ unretryStatus: number[];
1582
+ maxRestarts: number;
1583
+ default: ((ctx: T["context"]) => any | Promise<any>) | VigorEmptyType;
1584
1584
  };
1585
1585
  declare const VigorFetchPolicySettingsBase: {
1586
1586
  readonly __brand: VigorBrand<"Fetch", "Policy<Settings<Schema">;
@@ -2583,11 +2583,1135 @@ declare class VigorFetch<T extends VigorFetchSchema<T> = typeof VigorFetchBase>
2583
2583
 
2584
2584
  /** Everything `vigor` exposes except `use` — kept separate so `VigorInstance` (below) can self-reference without a circular-inference error. */
2585
2585
  declare const vigorBase: {
2586
- retry: (task?: ((signal: AbortSignal) => any | Promise<any>) | undefined) => VigorRetry<any>;
2587
- parse: (response?: (symbol & {
2588
- __brand: VigorBrand<"Core", "Symbol_Default">;
2589
- }) | Request | Response | undefined) => VigorParse<any>;
2590
- fetch: (origin?: string | undefined) => VigorFetch<any>;
2586
+ retry: (task?: ((signal: AbortSignal) => any | Promise<any>) | undefined) => VigorRetry<{
2587
+ readonly __brand: VigorBrand<"Retry", "Schema">;
2588
+ readonly policy: {
2589
+ readonly __brand: VigorBrand<"Retry", "Policy<Schema">;
2590
+ readonly target: symbol & {
2591
+ __brand: VigorBrand<"Core", "Symbol_Empty">;
2592
+ };
2593
+ readonly abortSignals: [];
2594
+ readonly settings: {
2595
+ readonly __brand: VigorBrand<"Retry", "Policy<Settings<Schema">;
2596
+ readonly default: symbol & {
2597
+ __brand: VigorBrand<"Core", "Symbol_Empty">;
2598
+ };
2599
+ readonly maxAttempts: 5;
2600
+ readonly maxRestarts: 3;
2601
+ readonly timeout: 20000;
2602
+ };
2603
+ readonly middlewares: {
2604
+ readonly __brand: VigorBrand<"Retry", "Policy<Middlewares<Schema">;
2605
+ readonly before: [];
2606
+ readonly after: [];
2607
+ readonly onResult: [];
2608
+ readonly retryIf: [];
2609
+ readonly onRetry: [];
2610
+ readonly onError: [];
2611
+ };
2612
+ readonly algorithms: {
2613
+ readonly __brand: VigorBrand<"Retry", "Policy<Algorithms<Constant<Schema">;
2614
+ readonly _tag: "constant";
2615
+ readonly jitter: 1000;
2616
+ readonly interval: 2000;
2617
+ readonly _calculateDelay: (att: number, config: VigorRetryPolicyAlgorithmsConstantSchema<any>) => number;
2618
+ };
2619
+ };
2620
+ readonly context: {
2621
+ readonly __brand: VigorBrand<"Retry", "Context<Schema">;
2622
+ readonly result: symbol & {
2623
+ __brand: VigorBrand<"Core", "Symbol_Default">;
2624
+ };
2625
+ readonly error: symbol & {
2626
+ __brand: VigorBrand<"Core", "Symbol_Default">;
2627
+ };
2628
+ readonly system: {
2629
+ readonly delay: symbol & {
2630
+ __brand: VigorBrand<"Core", "Symbol_Default">;
2631
+ };
2632
+ readonly attempt: 0;
2633
+ };
2634
+ readonly flags: {
2635
+ readonly doRetry: true;
2636
+ readonly doRestart: false;
2637
+ readonly brokeRetry: false;
2638
+ readonly overridden: false;
2639
+ };
2640
+ readonly record: {};
2641
+ readonly policy: {
2642
+ readonly __brand: VigorBrand<"Retry", "Policy<Schema">;
2643
+ readonly target: symbol & {
2644
+ __brand: VigorBrand<"Core", "Symbol_Empty">;
2645
+ };
2646
+ readonly abortSignals: [];
2647
+ readonly settings: {
2648
+ readonly __brand: VigorBrand<"Retry", "Policy<Settings<Schema">;
2649
+ readonly default: symbol & {
2650
+ __brand: VigorBrand<"Core", "Symbol_Empty">;
2651
+ };
2652
+ readonly maxAttempts: 5;
2653
+ readonly maxRestarts: 3;
2654
+ readonly timeout: 20000;
2655
+ };
2656
+ readonly middlewares: {
2657
+ readonly __brand: VigorBrand<"Retry", "Policy<Middlewares<Schema">;
2658
+ readonly before: [];
2659
+ readonly after: [];
2660
+ readonly onResult: [];
2661
+ readonly retryIf: [];
2662
+ readonly onRetry: [];
2663
+ readonly onError: [];
2664
+ };
2665
+ readonly algorithms: {
2666
+ readonly __brand: VigorBrand<"Retry", "Policy<Algorithms<Constant<Schema">;
2667
+ readonly _tag: "constant";
2668
+ readonly jitter: 1000;
2669
+ readonly interval: 2000;
2670
+ readonly _calculateDelay: (att: number, config: VigorRetryPolicyAlgorithmsConstantSchema<any>) => number;
2671
+ };
2672
+ };
2673
+ };
2674
+ }> | VigorRetry<{
2675
+ context: {
2676
+ readonly __brand: VigorBrand<"Retry", "Context<Schema">;
2677
+ readonly result: symbol & {
2678
+ __brand: VigorBrand<"Core", "Symbol_Default">;
2679
+ };
2680
+ readonly error: symbol & {
2681
+ __brand: VigorBrand<"Core", "Symbol_Default">;
2682
+ };
2683
+ readonly system: {
2684
+ readonly delay: symbol & {
2685
+ __brand: VigorBrand<"Core", "Symbol_Default">;
2686
+ };
2687
+ readonly attempt: 0;
2688
+ };
2689
+ readonly flags: {
2690
+ readonly doRetry: true;
2691
+ readonly doRestart: false;
2692
+ readonly brokeRetry: false;
2693
+ readonly overridden: false;
2694
+ };
2695
+ readonly record: {};
2696
+ readonly policy: {
2697
+ readonly __brand: VigorBrand<"Retry", "Policy<Schema">;
2698
+ readonly target: symbol & {
2699
+ __brand: VigorBrand<"Core", "Symbol_Empty">;
2700
+ };
2701
+ readonly abortSignals: [];
2702
+ readonly settings: {
2703
+ readonly __brand: VigorBrand<"Retry", "Policy<Settings<Schema">;
2704
+ readonly default: symbol & {
2705
+ __brand: VigorBrand<"Core", "Symbol_Empty">;
2706
+ };
2707
+ readonly maxAttempts: 5;
2708
+ readonly maxRestarts: 3;
2709
+ readonly timeout: 20000;
2710
+ };
2711
+ readonly middlewares: {
2712
+ readonly __brand: VigorBrand<"Retry", "Policy<Middlewares<Schema">;
2713
+ readonly before: [];
2714
+ readonly after: [];
2715
+ readonly onResult: [];
2716
+ readonly retryIf: [];
2717
+ readonly onRetry: [];
2718
+ readonly onError: [];
2719
+ };
2720
+ readonly algorithms: {
2721
+ readonly __brand: VigorBrand<"Retry", "Policy<Algorithms<Constant<Schema">;
2722
+ readonly _tag: "constant";
2723
+ readonly jitter: 1000;
2724
+ readonly interval: 2000;
2725
+ readonly _calculateDelay: (att: number, config: VigorRetryPolicyAlgorithmsConstantSchema<any>) => number;
2726
+ };
2727
+ };
2728
+ };
2729
+ policy: {
2730
+ target: (signal: AbortSignal) => any | Promise<any>;
2731
+ middlewares: {
2732
+ readonly __brand: VigorBrand<"Retry", "Policy<Middlewares<Schema">;
2733
+ readonly before: [];
2734
+ readonly after: [];
2735
+ readonly onResult: [];
2736
+ readonly retryIf: [];
2737
+ readonly onRetry: [];
2738
+ readonly onError: [];
2739
+ };
2740
+ __brand: VigorBrand<"Retry", "Policy<Schema">;
2741
+ abortSignals: [];
2742
+ settings: {
2743
+ readonly __brand: VigorBrand<"Retry", "Policy<Settings<Schema">;
2744
+ readonly default: symbol & {
2745
+ __brand: VigorBrand<"Core", "Symbol_Empty">;
2746
+ };
2747
+ readonly maxAttempts: 5;
2748
+ readonly maxRestarts: 3;
2749
+ readonly timeout: 20000;
2750
+ };
2751
+ algorithms: {
2752
+ readonly __brand: VigorBrand<"Retry", "Policy<Algorithms<Constant<Schema">;
2753
+ readonly _tag: "constant";
2754
+ readonly jitter: 1000;
2755
+ readonly interval: 2000;
2756
+ readonly _calculateDelay: (att: number, config: VigorRetryPolicyAlgorithmsConstantSchema<any>) => number;
2757
+ };
2758
+ };
2759
+ __brand: VigorBrand<"Retry", "Schema">;
2760
+ }>;
2761
+ parse: (response?: (symbol & {
2762
+ __brand: VigorBrand<"Core", "Symbol_Default">;
2763
+ }) | Request | Response | undefined) => VigorParse<{
2764
+ readonly __brand: VigorBrand<"Parse", "Schema">;
2765
+ readonly policy: {
2766
+ readonly __brand: VigorBrand<"Parse", "Policy<Schema">;
2767
+ readonly target: symbol & {
2768
+ __brand: VigorBrand<"Core", "Symbol_Default">;
2769
+ };
2770
+ readonly settings: {
2771
+ readonly __brand: VigorBrand<"Parse", "Policy<Settings<Schema">;
2772
+ readonly raw: false;
2773
+ readonly default: symbol & {
2774
+ __brand: VigorBrand<"Core", "Symbol_Empty">;
2775
+ };
2776
+ readonly maxRestarts: 3;
2777
+ };
2778
+ readonly middlewares: {
2779
+ readonly __brand: VigorBrand<"Parse", "Policy<Middlewares<Schema">;
2780
+ readonly before: [];
2781
+ readonly after: [];
2782
+ readonly onResult: [];
2783
+ readonly onError: [];
2784
+ };
2785
+ readonly strategies: {
2786
+ readonly __brand: VigorBrand<"Parse", "Policy<Strategies<Schema">;
2787
+ readonly funcs: VigorParseStrategyFunc[];
2788
+ };
2789
+ };
2790
+ readonly context: {
2791
+ readonly __brand: VigorBrand<"Parse", "Context<Schema">;
2792
+ readonly result: symbol & {
2793
+ __brand: VigorBrand<"Core", "Symbol_Default">;
2794
+ };
2795
+ readonly error: symbol & {
2796
+ __brand: VigorBrand<"Core", "Symbol_Default">;
2797
+ };
2798
+ readonly response: symbol & {
2799
+ __brand: VigorBrand<"Core", "Symbol_Default">;
2800
+ };
2801
+ readonly flags: {
2802
+ readonly overrided: false;
2803
+ readonly restarted: false;
2804
+ };
2805
+ readonly record: {};
2806
+ readonly policy: {
2807
+ readonly __brand: VigorBrand<"Parse", "Policy<Schema">;
2808
+ readonly target: symbol & {
2809
+ __brand: VigorBrand<"Core", "Symbol_Default">;
2810
+ };
2811
+ readonly settings: {
2812
+ readonly __brand: VigorBrand<"Parse", "Policy<Settings<Schema">;
2813
+ readonly raw: false;
2814
+ readonly default: symbol & {
2815
+ __brand: VigorBrand<"Core", "Symbol_Empty">;
2816
+ };
2817
+ readonly maxRestarts: 3;
2818
+ };
2819
+ readonly middlewares: {
2820
+ readonly __brand: VigorBrand<"Parse", "Policy<Middlewares<Schema">;
2821
+ readonly before: [];
2822
+ readonly after: [];
2823
+ readonly onResult: [];
2824
+ readonly onError: [];
2825
+ };
2826
+ readonly strategies: {
2827
+ readonly __brand: VigorBrand<"Parse", "Policy<Strategies<Schema">;
2828
+ readonly funcs: VigorParseStrategyFunc[];
2829
+ };
2830
+ };
2831
+ };
2832
+ }> | VigorParse<{
2833
+ context: {
2834
+ readonly __brand: VigorBrand<"Parse", "Context<Schema">;
2835
+ readonly result: symbol & {
2836
+ __brand: VigorBrand<"Core", "Symbol_Default">;
2837
+ };
2838
+ readonly error: symbol & {
2839
+ __brand: VigorBrand<"Core", "Symbol_Default">;
2840
+ };
2841
+ readonly response: symbol & {
2842
+ __brand: VigorBrand<"Core", "Symbol_Default">;
2843
+ };
2844
+ readonly flags: {
2845
+ readonly overrided: false;
2846
+ readonly restarted: false;
2847
+ };
2848
+ readonly record: {};
2849
+ readonly policy: {
2850
+ readonly __brand: VigorBrand<"Parse", "Policy<Schema">;
2851
+ readonly target: symbol & {
2852
+ __brand: VigorBrand<"Core", "Symbol_Default">;
2853
+ };
2854
+ readonly settings: {
2855
+ readonly __brand: VigorBrand<"Parse", "Policy<Settings<Schema">;
2856
+ readonly raw: false;
2857
+ readonly default: symbol & {
2858
+ __brand: VigorBrand<"Core", "Symbol_Empty">;
2859
+ };
2860
+ readonly maxRestarts: 3;
2861
+ };
2862
+ readonly middlewares: {
2863
+ readonly __brand: VigorBrand<"Parse", "Policy<Middlewares<Schema">;
2864
+ readonly before: [];
2865
+ readonly after: [];
2866
+ readonly onResult: [];
2867
+ readonly onError: [];
2868
+ };
2869
+ readonly strategies: {
2870
+ readonly __brand: VigorBrand<"Parse", "Policy<Strategies<Schema">;
2871
+ readonly funcs: VigorParseStrategyFunc[];
2872
+ };
2873
+ };
2874
+ };
2875
+ policy: {
2876
+ target: (symbol & {
2877
+ __brand: VigorBrand<"Core", "Symbol_Default">;
2878
+ }) | Request | Response;
2879
+ middlewares: {
2880
+ readonly __brand: VigorBrand<"Parse", "Policy<Middlewares<Schema">;
2881
+ readonly before: [];
2882
+ readonly after: [];
2883
+ readonly onResult: [];
2884
+ readonly onError: [];
2885
+ };
2886
+ __brand: VigorBrand<"Parse", "Policy<Schema">;
2887
+ settings: {
2888
+ readonly __brand: VigorBrand<"Parse", "Policy<Settings<Schema">;
2889
+ readonly raw: false;
2890
+ readonly default: symbol & {
2891
+ __brand: VigorBrand<"Core", "Symbol_Empty">;
2892
+ };
2893
+ readonly maxRestarts: 3;
2894
+ };
2895
+ strategies: {
2896
+ readonly __brand: VigorBrand<"Parse", "Policy<Strategies<Schema">;
2897
+ readonly funcs: VigorParseStrategyFunc[];
2898
+ };
2899
+ };
2900
+ __brand: VigorBrand<"Parse", "Schema">;
2901
+ }>;
2902
+ fetch: (origin?: string | undefined) => VigorFetch<{
2903
+ readonly __brand: VigorBrand<"Fetch", "Schema">;
2904
+ readonly policy: {
2905
+ readonly __brand: VigorBrand<"Fetch", "Policy<Schema">;
2906
+ readonly method: symbol & {
2907
+ __brand: VigorBrand<"Core", "Symbol_Empty">;
2908
+ };
2909
+ readonly origin: symbol & {
2910
+ __brand: VigorBrand<"Core", "Symbol_Empty">;
2911
+ };
2912
+ readonly path: [];
2913
+ readonly query: [];
2914
+ readonly hash: "";
2915
+ readonly headers: {};
2916
+ readonly body: symbol & {
2917
+ __brand: VigorBrand<"Core", "Symbol_Empty">;
2918
+ };
2919
+ readonly extra: {};
2920
+ readonly settings: {
2921
+ readonly __brand: VigorBrand<"Fetch", "Policy<Settings<Schema">;
2922
+ readonly retryHeaders: ["retry-after", "ratelimit-reset", "x-ratelimit-reset", "x-retry-after", "x-amz-retry-after", "chrome-proxy-next-link"];
2923
+ readonly unretryStatus: [400, 401, 403, 404, 405, 413, 422];
2924
+ readonly maxRestarts: 3;
2925
+ readonly default: symbol & {
2926
+ __brand: VigorBrand<"Core", "Symbol_Empty">;
2927
+ };
2928
+ };
2929
+ readonly middlewares: {
2930
+ readonly __brand: VigorBrand<"Fetch", "Policy<Middlewares<Schema">;
2931
+ readonly before: [];
2932
+ readonly after: [];
2933
+ readonly onResult: [];
2934
+ readonly onError: [];
2935
+ };
2936
+ readonly retry: {
2937
+ readonly __brand: VigorBrand<"Retry", "Schema">;
2938
+ readonly policy: {
2939
+ readonly __brand: VigorBrand<"Retry", "Policy<Schema">;
2940
+ readonly target: symbol & {
2941
+ __brand: VigorBrand<"Core", "Symbol_Empty">;
2942
+ };
2943
+ readonly abortSignals: [];
2944
+ readonly settings: {
2945
+ readonly __brand: VigorBrand<"Retry", "Policy<Settings<Schema">;
2946
+ readonly default: symbol & {
2947
+ __brand: VigorBrand<"Core", "Symbol_Empty">;
2948
+ };
2949
+ readonly maxAttempts: 5;
2950
+ readonly maxRestarts: 3;
2951
+ readonly timeout: 20000;
2952
+ };
2953
+ readonly middlewares: {
2954
+ readonly __brand: VigorBrand<"Retry", "Policy<Middlewares<Schema">;
2955
+ readonly before: [];
2956
+ readonly after: [];
2957
+ readonly onResult: [];
2958
+ readonly retryIf: [];
2959
+ readonly onRetry: [];
2960
+ readonly onError: [];
2961
+ };
2962
+ readonly algorithms: {
2963
+ readonly __brand: VigorBrand<"Retry", "Policy<Algorithms<Constant<Schema">;
2964
+ readonly _tag: "constant";
2965
+ readonly jitter: 1000;
2966
+ readonly interval: 2000;
2967
+ readonly _calculateDelay: (att: number, config: VigorRetryPolicyAlgorithmsConstantSchema<any>) => number;
2968
+ };
2969
+ };
2970
+ readonly context: {
2971
+ readonly __brand: VigorBrand<"Retry", "Context<Schema">;
2972
+ readonly result: symbol & {
2973
+ __brand: VigorBrand<"Core", "Symbol_Default">;
2974
+ };
2975
+ readonly error: symbol & {
2976
+ __brand: VigorBrand<"Core", "Symbol_Default">;
2977
+ };
2978
+ readonly system: {
2979
+ readonly delay: symbol & {
2980
+ __brand: VigorBrand<"Core", "Symbol_Default">;
2981
+ };
2982
+ readonly attempt: 0;
2983
+ };
2984
+ readonly flags: {
2985
+ readonly doRetry: true;
2986
+ readonly doRestart: false;
2987
+ readonly brokeRetry: false;
2988
+ readonly overridden: false;
2989
+ };
2990
+ readonly record: {};
2991
+ readonly policy: {
2992
+ readonly __brand: VigorBrand<"Retry", "Policy<Schema">;
2993
+ readonly target: symbol & {
2994
+ __brand: VigorBrand<"Core", "Symbol_Empty">;
2995
+ };
2996
+ readonly abortSignals: [];
2997
+ readonly settings: {
2998
+ readonly __brand: VigorBrand<"Retry", "Policy<Settings<Schema">;
2999
+ readonly default: symbol & {
3000
+ __brand: VigorBrand<"Core", "Symbol_Empty">;
3001
+ };
3002
+ readonly maxAttempts: 5;
3003
+ readonly maxRestarts: 3;
3004
+ readonly timeout: 20000;
3005
+ };
3006
+ readonly middlewares: {
3007
+ readonly __brand: VigorBrand<"Retry", "Policy<Middlewares<Schema">;
3008
+ readonly before: [];
3009
+ readonly after: [];
3010
+ readonly onResult: [];
3011
+ readonly retryIf: [];
3012
+ readonly onRetry: [];
3013
+ readonly onError: [];
3014
+ };
3015
+ readonly algorithms: {
3016
+ readonly __brand: VigorBrand<"Retry", "Policy<Algorithms<Constant<Schema">;
3017
+ readonly _tag: "constant";
3018
+ readonly jitter: 1000;
3019
+ readonly interval: 2000;
3020
+ readonly _calculateDelay: (att: number, config: VigorRetryPolicyAlgorithmsConstantSchema<any>) => number;
3021
+ };
3022
+ };
3023
+ };
3024
+ };
3025
+ readonly parse: {
3026
+ readonly __brand: VigorBrand<"Parse", "Schema">;
3027
+ readonly policy: {
3028
+ readonly __brand: VigorBrand<"Parse", "Policy<Schema">;
3029
+ readonly target: symbol & {
3030
+ __brand: VigorBrand<"Core", "Symbol_Default">;
3031
+ };
3032
+ readonly settings: {
3033
+ readonly __brand: VigorBrand<"Parse", "Policy<Settings<Schema">;
3034
+ readonly raw: false;
3035
+ readonly default: symbol & {
3036
+ __brand: VigorBrand<"Core", "Symbol_Empty">;
3037
+ };
3038
+ readonly maxRestarts: 3;
3039
+ };
3040
+ readonly middlewares: {
3041
+ readonly __brand: VigorBrand<"Parse", "Policy<Middlewares<Schema">;
3042
+ readonly before: [];
3043
+ readonly after: [];
3044
+ readonly onResult: [];
3045
+ readonly onError: [];
3046
+ };
3047
+ readonly strategies: {
3048
+ readonly __brand: VigorBrand<"Parse", "Policy<Strategies<Schema">;
3049
+ readonly funcs: VigorParseStrategyFunc[];
3050
+ };
3051
+ };
3052
+ readonly context: {
3053
+ readonly __brand: VigorBrand<"Parse", "Context<Schema">;
3054
+ readonly result: symbol & {
3055
+ __brand: VigorBrand<"Core", "Symbol_Default">;
3056
+ };
3057
+ readonly error: symbol & {
3058
+ __brand: VigorBrand<"Core", "Symbol_Default">;
3059
+ };
3060
+ readonly response: symbol & {
3061
+ __brand: VigorBrand<"Core", "Symbol_Default">;
3062
+ };
3063
+ readonly flags: {
3064
+ readonly overrided: false;
3065
+ readonly restarted: false;
3066
+ };
3067
+ readonly record: {};
3068
+ readonly policy: {
3069
+ readonly __brand: VigorBrand<"Parse", "Policy<Schema">;
3070
+ readonly target: symbol & {
3071
+ __brand: VigorBrand<"Core", "Symbol_Default">;
3072
+ };
3073
+ readonly settings: {
3074
+ readonly __brand: VigorBrand<"Parse", "Policy<Settings<Schema">;
3075
+ readonly raw: false;
3076
+ readonly default: symbol & {
3077
+ __brand: VigorBrand<"Core", "Symbol_Empty">;
3078
+ };
3079
+ readonly maxRestarts: 3;
3080
+ };
3081
+ readonly middlewares: {
3082
+ readonly __brand: VigorBrand<"Parse", "Policy<Middlewares<Schema">;
3083
+ readonly before: [];
3084
+ readonly after: [];
3085
+ readonly onResult: [];
3086
+ readonly onError: [];
3087
+ };
3088
+ readonly strategies: {
3089
+ readonly __brand: VigorBrand<"Parse", "Policy<Strategies<Schema">;
3090
+ readonly funcs: VigorParseStrategyFunc[];
3091
+ };
3092
+ };
3093
+ };
3094
+ };
3095
+ };
3096
+ readonly context: {
3097
+ readonly __brand: VigorBrand<"Fetch", "Context<Schema">;
3098
+ readonly href: "";
3099
+ readonly response: symbol & {
3100
+ __brand: VigorBrand<"Core", "Symbol_Default">;
3101
+ };
3102
+ readonly result: symbol & {
3103
+ __brand: VigorBrand<"Core", "Symbol_Default">;
3104
+ };
3105
+ readonly error: symbol & {
3106
+ __brand: VigorBrand<"Core", "Symbol_Default">;
3107
+ };
3108
+ readonly options: symbol & {
3109
+ __brand: VigorBrand<"Core", "Symbol_Default">;
3110
+ };
3111
+ readonly flags: {
3112
+ readonly overrided: false;
3113
+ readonly restarted: false;
3114
+ };
3115
+ readonly record: {};
3116
+ readonly policy: {
3117
+ readonly __brand: VigorBrand<"Fetch", "Policy<Schema">;
3118
+ readonly method: symbol & {
3119
+ __brand: VigorBrand<"Core", "Symbol_Empty">;
3120
+ };
3121
+ readonly origin: symbol & {
3122
+ __brand: VigorBrand<"Core", "Symbol_Empty">;
3123
+ };
3124
+ readonly path: [];
3125
+ readonly query: [];
3126
+ readonly hash: "";
3127
+ readonly headers: {};
3128
+ readonly body: symbol & {
3129
+ __brand: VigorBrand<"Core", "Symbol_Empty">;
3130
+ };
3131
+ readonly extra: {};
3132
+ readonly settings: {
3133
+ readonly __brand: VigorBrand<"Fetch", "Policy<Settings<Schema">;
3134
+ readonly retryHeaders: ["retry-after", "ratelimit-reset", "x-ratelimit-reset", "x-retry-after", "x-amz-retry-after", "chrome-proxy-next-link"];
3135
+ readonly unretryStatus: [400, 401, 403, 404, 405, 413, 422];
3136
+ readonly maxRestarts: 3;
3137
+ readonly default: symbol & {
3138
+ __brand: VigorBrand<"Core", "Symbol_Empty">;
3139
+ };
3140
+ };
3141
+ readonly middlewares: {
3142
+ readonly __brand: VigorBrand<"Fetch", "Policy<Middlewares<Schema">;
3143
+ readonly before: [];
3144
+ readonly after: [];
3145
+ readonly onResult: [];
3146
+ readonly onError: [];
3147
+ };
3148
+ readonly retry: {
3149
+ readonly __brand: VigorBrand<"Retry", "Schema">;
3150
+ readonly policy: {
3151
+ readonly __brand: VigorBrand<"Retry", "Policy<Schema">;
3152
+ readonly target: symbol & {
3153
+ __brand: VigorBrand<"Core", "Symbol_Empty">;
3154
+ };
3155
+ readonly abortSignals: [];
3156
+ readonly settings: {
3157
+ readonly __brand: VigorBrand<"Retry", "Policy<Settings<Schema">;
3158
+ readonly default: symbol & {
3159
+ __brand: VigorBrand<"Core", "Symbol_Empty">;
3160
+ };
3161
+ readonly maxAttempts: 5;
3162
+ readonly maxRestarts: 3;
3163
+ readonly timeout: 20000;
3164
+ };
3165
+ readonly middlewares: {
3166
+ readonly __brand: VigorBrand<"Retry", "Policy<Middlewares<Schema">;
3167
+ readonly before: [];
3168
+ readonly after: [];
3169
+ readonly onResult: [];
3170
+ readonly retryIf: [];
3171
+ readonly onRetry: [];
3172
+ readonly onError: [];
3173
+ };
3174
+ readonly algorithms: {
3175
+ readonly __brand: VigorBrand<"Retry", "Policy<Algorithms<Constant<Schema">;
3176
+ readonly _tag: "constant";
3177
+ readonly jitter: 1000;
3178
+ readonly interval: 2000;
3179
+ readonly _calculateDelay: (att: number, config: VigorRetryPolicyAlgorithmsConstantSchema<any>) => number;
3180
+ };
3181
+ };
3182
+ readonly context: {
3183
+ readonly __brand: VigorBrand<"Retry", "Context<Schema">;
3184
+ readonly result: symbol & {
3185
+ __brand: VigorBrand<"Core", "Symbol_Default">;
3186
+ };
3187
+ readonly error: symbol & {
3188
+ __brand: VigorBrand<"Core", "Symbol_Default">;
3189
+ };
3190
+ readonly system: {
3191
+ readonly delay: symbol & {
3192
+ __brand: VigorBrand<"Core", "Symbol_Default">;
3193
+ };
3194
+ readonly attempt: 0;
3195
+ };
3196
+ readonly flags: {
3197
+ readonly doRetry: true;
3198
+ readonly doRestart: false;
3199
+ readonly brokeRetry: false;
3200
+ readonly overridden: false;
3201
+ };
3202
+ readonly record: {};
3203
+ readonly policy: {
3204
+ readonly __brand: VigorBrand<"Retry", "Policy<Schema">;
3205
+ readonly target: symbol & {
3206
+ __brand: VigorBrand<"Core", "Symbol_Empty">;
3207
+ };
3208
+ readonly abortSignals: [];
3209
+ readonly settings: {
3210
+ readonly __brand: VigorBrand<"Retry", "Policy<Settings<Schema">;
3211
+ readonly default: symbol & {
3212
+ __brand: VigorBrand<"Core", "Symbol_Empty">;
3213
+ };
3214
+ readonly maxAttempts: 5;
3215
+ readonly maxRestarts: 3;
3216
+ readonly timeout: 20000;
3217
+ };
3218
+ readonly middlewares: {
3219
+ readonly __brand: VigorBrand<"Retry", "Policy<Middlewares<Schema">;
3220
+ readonly before: [];
3221
+ readonly after: [];
3222
+ readonly onResult: [];
3223
+ readonly retryIf: [];
3224
+ readonly onRetry: [];
3225
+ readonly onError: [];
3226
+ };
3227
+ readonly algorithms: {
3228
+ readonly __brand: VigorBrand<"Retry", "Policy<Algorithms<Constant<Schema">;
3229
+ readonly _tag: "constant";
3230
+ readonly jitter: 1000;
3231
+ readonly interval: 2000;
3232
+ readonly _calculateDelay: (att: number, config: VigorRetryPolicyAlgorithmsConstantSchema<any>) => number;
3233
+ };
3234
+ };
3235
+ };
3236
+ };
3237
+ readonly parse: {
3238
+ readonly __brand: VigorBrand<"Parse", "Schema">;
3239
+ readonly policy: {
3240
+ readonly __brand: VigorBrand<"Parse", "Policy<Schema">;
3241
+ readonly target: symbol & {
3242
+ __brand: VigorBrand<"Core", "Symbol_Default">;
3243
+ };
3244
+ readonly settings: {
3245
+ readonly __brand: VigorBrand<"Parse", "Policy<Settings<Schema">;
3246
+ readonly raw: false;
3247
+ readonly default: symbol & {
3248
+ __brand: VigorBrand<"Core", "Symbol_Empty">;
3249
+ };
3250
+ readonly maxRestarts: 3;
3251
+ };
3252
+ readonly middlewares: {
3253
+ readonly __brand: VigorBrand<"Parse", "Policy<Middlewares<Schema">;
3254
+ readonly before: [];
3255
+ readonly after: [];
3256
+ readonly onResult: [];
3257
+ readonly onError: [];
3258
+ };
3259
+ readonly strategies: {
3260
+ readonly __brand: VigorBrand<"Parse", "Policy<Strategies<Schema">;
3261
+ readonly funcs: VigorParseStrategyFunc[];
3262
+ };
3263
+ };
3264
+ readonly context: {
3265
+ readonly __brand: VigorBrand<"Parse", "Context<Schema">;
3266
+ readonly result: symbol & {
3267
+ __brand: VigorBrand<"Core", "Symbol_Default">;
3268
+ };
3269
+ readonly error: symbol & {
3270
+ __brand: VigorBrand<"Core", "Symbol_Default">;
3271
+ };
3272
+ readonly response: symbol & {
3273
+ __brand: VigorBrand<"Core", "Symbol_Default">;
3274
+ };
3275
+ readonly flags: {
3276
+ readonly overrided: false;
3277
+ readonly restarted: false;
3278
+ };
3279
+ readonly record: {};
3280
+ readonly policy: {
3281
+ readonly __brand: VigorBrand<"Parse", "Policy<Schema">;
3282
+ readonly target: symbol & {
3283
+ __brand: VigorBrand<"Core", "Symbol_Default">;
3284
+ };
3285
+ readonly settings: {
3286
+ readonly __brand: VigorBrand<"Parse", "Policy<Settings<Schema">;
3287
+ readonly raw: false;
3288
+ readonly default: symbol & {
3289
+ __brand: VigorBrand<"Core", "Symbol_Empty">;
3290
+ };
3291
+ readonly maxRestarts: 3;
3292
+ };
3293
+ readonly middlewares: {
3294
+ readonly __brand: VigorBrand<"Parse", "Policy<Middlewares<Schema">;
3295
+ readonly before: [];
3296
+ readonly after: [];
3297
+ readonly onResult: [];
3298
+ readonly onError: [];
3299
+ };
3300
+ readonly strategies: {
3301
+ readonly __brand: VigorBrand<"Parse", "Policy<Strategies<Schema">;
3302
+ readonly funcs: VigorParseStrategyFunc[];
3303
+ };
3304
+ };
3305
+ };
3306
+ };
3307
+ };
3308
+ };
3309
+ }> | VigorFetch<{
3310
+ context: {
3311
+ readonly __brand: VigorBrand<"Fetch", "Context<Schema">;
3312
+ readonly href: "";
3313
+ readonly response: symbol & {
3314
+ __brand: VigorBrand<"Core", "Symbol_Default">;
3315
+ };
3316
+ readonly result: symbol & {
3317
+ __brand: VigorBrand<"Core", "Symbol_Default">;
3318
+ };
3319
+ readonly error: symbol & {
3320
+ __brand: VigorBrand<"Core", "Symbol_Default">;
3321
+ };
3322
+ readonly options: symbol & {
3323
+ __brand: VigorBrand<"Core", "Symbol_Default">;
3324
+ };
3325
+ readonly flags: {
3326
+ readonly overrided: false;
3327
+ readonly restarted: false;
3328
+ };
3329
+ readonly record: {};
3330
+ readonly policy: {
3331
+ readonly __brand: VigorBrand<"Fetch", "Policy<Schema">;
3332
+ readonly method: symbol & {
3333
+ __brand: VigorBrand<"Core", "Symbol_Empty">;
3334
+ };
3335
+ readonly origin: symbol & {
3336
+ __brand: VigorBrand<"Core", "Symbol_Empty">;
3337
+ };
3338
+ readonly path: [];
3339
+ readonly query: [];
3340
+ readonly hash: "";
3341
+ readonly headers: {};
3342
+ readonly body: symbol & {
3343
+ __brand: VigorBrand<"Core", "Symbol_Empty">;
3344
+ };
3345
+ readonly extra: {};
3346
+ readonly settings: {
3347
+ readonly __brand: VigorBrand<"Fetch", "Policy<Settings<Schema">;
3348
+ readonly retryHeaders: ["retry-after", "ratelimit-reset", "x-ratelimit-reset", "x-retry-after", "x-amz-retry-after", "chrome-proxy-next-link"];
3349
+ readonly unretryStatus: [400, 401, 403, 404, 405, 413, 422];
3350
+ readonly maxRestarts: 3;
3351
+ readonly default: symbol & {
3352
+ __brand: VigorBrand<"Core", "Symbol_Empty">;
3353
+ };
3354
+ };
3355
+ readonly middlewares: {
3356
+ readonly __brand: VigorBrand<"Fetch", "Policy<Middlewares<Schema">;
3357
+ readonly before: [];
3358
+ readonly after: [];
3359
+ readonly onResult: [];
3360
+ readonly onError: [];
3361
+ };
3362
+ readonly retry: {
3363
+ readonly __brand: VigorBrand<"Retry", "Schema">;
3364
+ readonly policy: {
3365
+ readonly __brand: VigorBrand<"Retry", "Policy<Schema">;
3366
+ readonly target: symbol & {
3367
+ __brand: VigorBrand<"Core", "Symbol_Empty">;
3368
+ };
3369
+ readonly abortSignals: [];
3370
+ readonly settings: {
3371
+ readonly __brand: VigorBrand<"Retry", "Policy<Settings<Schema">;
3372
+ readonly default: symbol & {
3373
+ __brand: VigorBrand<"Core", "Symbol_Empty">;
3374
+ };
3375
+ readonly maxAttempts: 5;
3376
+ readonly maxRestarts: 3;
3377
+ readonly timeout: 20000;
3378
+ };
3379
+ readonly middlewares: {
3380
+ readonly __brand: VigorBrand<"Retry", "Policy<Middlewares<Schema">;
3381
+ readonly before: [];
3382
+ readonly after: [];
3383
+ readonly onResult: [];
3384
+ readonly retryIf: [];
3385
+ readonly onRetry: [];
3386
+ readonly onError: [];
3387
+ };
3388
+ readonly algorithms: {
3389
+ readonly __brand: VigorBrand<"Retry", "Policy<Algorithms<Constant<Schema">;
3390
+ readonly _tag: "constant";
3391
+ readonly jitter: 1000;
3392
+ readonly interval: 2000;
3393
+ readonly _calculateDelay: (att: number, config: VigorRetryPolicyAlgorithmsConstantSchema<any>) => number;
3394
+ };
3395
+ };
3396
+ readonly context: {
3397
+ readonly __brand: VigorBrand<"Retry", "Context<Schema">;
3398
+ readonly result: symbol & {
3399
+ __brand: VigorBrand<"Core", "Symbol_Default">;
3400
+ };
3401
+ readonly error: symbol & {
3402
+ __brand: VigorBrand<"Core", "Symbol_Default">;
3403
+ };
3404
+ readonly system: {
3405
+ readonly delay: symbol & {
3406
+ __brand: VigorBrand<"Core", "Symbol_Default">;
3407
+ };
3408
+ readonly attempt: 0;
3409
+ };
3410
+ readonly flags: {
3411
+ readonly doRetry: true;
3412
+ readonly doRestart: false;
3413
+ readonly brokeRetry: false;
3414
+ readonly overridden: false;
3415
+ };
3416
+ readonly record: {};
3417
+ readonly policy: {
3418
+ readonly __brand: VigorBrand<"Retry", "Policy<Schema">;
3419
+ readonly target: symbol & {
3420
+ __brand: VigorBrand<"Core", "Symbol_Empty">;
3421
+ };
3422
+ readonly abortSignals: [];
3423
+ readonly settings: {
3424
+ readonly __brand: VigorBrand<"Retry", "Policy<Settings<Schema">;
3425
+ readonly default: symbol & {
3426
+ __brand: VigorBrand<"Core", "Symbol_Empty">;
3427
+ };
3428
+ readonly maxAttempts: 5;
3429
+ readonly maxRestarts: 3;
3430
+ readonly timeout: 20000;
3431
+ };
3432
+ readonly middlewares: {
3433
+ readonly __brand: VigorBrand<"Retry", "Policy<Middlewares<Schema">;
3434
+ readonly before: [];
3435
+ readonly after: [];
3436
+ readonly onResult: [];
3437
+ readonly retryIf: [];
3438
+ readonly onRetry: [];
3439
+ readonly onError: [];
3440
+ };
3441
+ readonly algorithms: {
3442
+ readonly __brand: VigorBrand<"Retry", "Policy<Algorithms<Constant<Schema">;
3443
+ readonly _tag: "constant";
3444
+ readonly jitter: 1000;
3445
+ readonly interval: 2000;
3446
+ readonly _calculateDelay: (att: number, config: VigorRetryPolicyAlgorithmsConstantSchema<any>) => number;
3447
+ };
3448
+ };
3449
+ };
3450
+ };
3451
+ readonly parse: {
3452
+ readonly __brand: VigorBrand<"Parse", "Schema">;
3453
+ readonly policy: {
3454
+ readonly __brand: VigorBrand<"Parse", "Policy<Schema">;
3455
+ readonly target: symbol & {
3456
+ __brand: VigorBrand<"Core", "Symbol_Default">;
3457
+ };
3458
+ readonly settings: {
3459
+ readonly __brand: VigorBrand<"Parse", "Policy<Settings<Schema">;
3460
+ readonly raw: false;
3461
+ readonly default: symbol & {
3462
+ __brand: VigorBrand<"Core", "Symbol_Empty">;
3463
+ };
3464
+ readonly maxRestarts: 3;
3465
+ };
3466
+ readonly middlewares: {
3467
+ readonly __brand: VigorBrand<"Parse", "Policy<Middlewares<Schema">;
3468
+ readonly before: [];
3469
+ readonly after: [];
3470
+ readonly onResult: [];
3471
+ readonly onError: [];
3472
+ };
3473
+ readonly strategies: {
3474
+ readonly __brand: VigorBrand<"Parse", "Policy<Strategies<Schema">;
3475
+ readonly funcs: VigorParseStrategyFunc[];
3476
+ };
3477
+ };
3478
+ readonly context: {
3479
+ readonly __brand: VigorBrand<"Parse", "Context<Schema">;
3480
+ readonly result: symbol & {
3481
+ __brand: VigorBrand<"Core", "Symbol_Default">;
3482
+ };
3483
+ readonly error: symbol & {
3484
+ __brand: VigorBrand<"Core", "Symbol_Default">;
3485
+ };
3486
+ readonly response: symbol & {
3487
+ __brand: VigorBrand<"Core", "Symbol_Default">;
3488
+ };
3489
+ readonly flags: {
3490
+ readonly overrided: false;
3491
+ readonly restarted: false;
3492
+ };
3493
+ readonly record: {};
3494
+ readonly policy: {
3495
+ readonly __brand: VigorBrand<"Parse", "Policy<Schema">;
3496
+ readonly target: symbol & {
3497
+ __brand: VigorBrand<"Core", "Symbol_Default">;
3498
+ };
3499
+ readonly settings: {
3500
+ readonly __brand: VigorBrand<"Parse", "Policy<Settings<Schema">;
3501
+ readonly raw: false;
3502
+ readonly default: symbol & {
3503
+ __brand: VigorBrand<"Core", "Symbol_Empty">;
3504
+ };
3505
+ readonly maxRestarts: 3;
3506
+ };
3507
+ readonly middlewares: {
3508
+ readonly __brand: VigorBrand<"Parse", "Policy<Middlewares<Schema">;
3509
+ readonly before: [];
3510
+ readonly after: [];
3511
+ readonly onResult: [];
3512
+ readonly onError: [];
3513
+ };
3514
+ readonly strategies: {
3515
+ readonly __brand: VigorBrand<"Parse", "Policy<Strategies<Schema">;
3516
+ readonly funcs: VigorParseStrategyFunc[];
3517
+ };
3518
+ };
3519
+ };
3520
+ };
3521
+ };
3522
+ };
3523
+ policy: {
3524
+ middlewares: {
3525
+ readonly __brand: VigorBrand<"Fetch", "Policy<Middlewares<Schema">;
3526
+ readonly before: [];
3527
+ readonly after: [];
3528
+ readonly onResult: [];
3529
+ readonly onError: [];
3530
+ };
3531
+ __brand: VigorBrand<"Fetch", "Policy<Schema">;
3532
+ settings: {
3533
+ readonly __brand: VigorBrand<"Fetch", "Policy<Settings<Schema">;
3534
+ readonly retryHeaders: ["retry-after", "ratelimit-reset", "x-ratelimit-reset", "x-retry-after", "x-amz-retry-after", "chrome-proxy-next-link"];
3535
+ readonly unretryStatus: [400, 401, 403, 404, 405, 413, 422];
3536
+ readonly maxRestarts: 3;
3537
+ readonly default: symbol & {
3538
+ __brand: VigorBrand<"Core", "Symbol_Empty">;
3539
+ };
3540
+ };
3541
+ headers: {};
3542
+ method: symbol & {
3543
+ __brand: VigorBrand<"Core", "Symbol_Empty">;
3544
+ };
3545
+ body: symbol & {
3546
+ __brand: VigorBrand<"Core", "Symbol_Empty">;
3547
+ };
3548
+ origin: string;
3549
+ path: [];
3550
+ query: [];
3551
+ hash: "";
3552
+ extra: {};
3553
+ retry: {
3554
+ readonly __brand: VigorBrand<"Retry", "Schema">;
3555
+ readonly policy: {
3556
+ readonly __brand: VigorBrand<"Retry", "Policy<Schema">;
3557
+ readonly target: symbol & {
3558
+ __brand: VigorBrand<"Core", "Symbol_Empty">;
3559
+ };
3560
+ readonly abortSignals: [];
3561
+ readonly settings: {
3562
+ readonly __brand: VigorBrand<"Retry", "Policy<Settings<Schema">;
3563
+ readonly default: symbol & {
3564
+ __brand: VigorBrand<"Core", "Symbol_Empty">;
3565
+ };
3566
+ readonly maxAttempts: 5;
3567
+ readonly maxRestarts: 3;
3568
+ readonly timeout: 20000;
3569
+ };
3570
+ readonly middlewares: {
3571
+ readonly __brand: VigorBrand<"Retry", "Policy<Middlewares<Schema">;
3572
+ readonly before: [];
3573
+ readonly after: [];
3574
+ readonly onResult: [];
3575
+ readonly retryIf: [];
3576
+ readonly onRetry: [];
3577
+ readonly onError: [];
3578
+ };
3579
+ readonly algorithms: {
3580
+ readonly __brand: VigorBrand<"Retry", "Policy<Algorithms<Constant<Schema">;
3581
+ readonly _tag: "constant";
3582
+ readonly jitter: 1000;
3583
+ readonly interval: 2000;
3584
+ readonly _calculateDelay: (att: number, config: VigorRetryPolicyAlgorithmsConstantSchema<any>) => number;
3585
+ };
3586
+ };
3587
+ readonly context: {
3588
+ readonly __brand: VigorBrand<"Retry", "Context<Schema">;
3589
+ readonly result: symbol & {
3590
+ __brand: VigorBrand<"Core", "Symbol_Default">;
3591
+ };
3592
+ readonly error: symbol & {
3593
+ __brand: VigorBrand<"Core", "Symbol_Default">;
3594
+ };
3595
+ readonly system: {
3596
+ readonly delay: symbol & {
3597
+ __brand: VigorBrand<"Core", "Symbol_Default">;
3598
+ };
3599
+ readonly attempt: 0;
3600
+ };
3601
+ readonly flags: {
3602
+ readonly doRetry: true;
3603
+ readonly doRestart: false;
3604
+ readonly brokeRetry: false;
3605
+ readonly overridden: false;
3606
+ };
3607
+ readonly record: {};
3608
+ readonly policy: {
3609
+ readonly __brand: VigorBrand<"Retry", "Policy<Schema">;
3610
+ readonly target: symbol & {
3611
+ __brand: VigorBrand<"Core", "Symbol_Empty">;
3612
+ };
3613
+ readonly abortSignals: [];
3614
+ readonly settings: {
3615
+ readonly __brand: VigorBrand<"Retry", "Policy<Settings<Schema">;
3616
+ readonly default: symbol & {
3617
+ __brand: VigorBrand<"Core", "Symbol_Empty">;
3618
+ };
3619
+ readonly maxAttempts: 5;
3620
+ readonly maxRestarts: 3;
3621
+ readonly timeout: 20000;
3622
+ };
3623
+ readonly middlewares: {
3624
+ readonly __brand: VigorBrand<"Retry", "Policy<Middlewares<Schema">;
3625
+ readonly before: [];
3626
+ readonly after: [];
3627
+ readonly onResult: [];
3628
+ readonly retryIf: [];
3629
+ readonly onRetry: [];
3630
+ readonly onError: [];
3631
+ };
3632
+ readonly algorithms: {
3633
+ readonly __brand: VigorBrand<"Retry", "Policy<Algorithms<Constant<Schema">;
3634
+ readonly _tag: "constant";
3635
+ readonly jitter: 1000;
3636
+ readonly interval: 2000;
3637
+ readonly _calculateDelay: (att: number, config: VigorRetryPolicyAlgorithmsConstantSchema<any>) => number;
3638
+ };
3639
+ };
3640
+ };
3641
+ };
3642
+ parse: {
3643
+ readonly __brand: VigorBrand<"Parse", "Schema">;
3644
+ readonly policy: {
3645
+ readonly __brand: VigorBrand<"Parse", "Policy<Schema">;
3646
+ readonly target: symbol & {
3647
+ __brand: VigorBrand<"Core", "Symbol_Default">;
3648
+ };
3649
+ readonly settings: {
3650
+ readonly __brand: VigorBrand<"Parse", "Policy<Settings<Schema">;
3651
+ readonly raw: false;
3652
+ readonly default: symbol & {
3653
+ __brand: VigorBrand<"Core", "Symbol_Empty">;
3654
+ };
3655
+ readonly maxRestarts: 3;
3656
+ };
3657
+ readonly middlewares: {
3658
+ readonly __brand: VigorBrand<"Parse", "Policy<Middlewares<Schema">;
3659
+ readonly before: [];
3660
+ readonly after: [];
3661
+ readonly onResult: [];
3662
+ readonly onError: [];
3663
+ };
3664
+ readonly strategies: {
3665
+ readonly __brand: VigorBrand<"Parse", "Policy<Strategies<Schema">;
3666
+ readonly funcs: VigorParseStrategyFunc[];
3667
+ };
3668
+ };
3669
+ readonly context: {
3670
+ readonly __brand: VigorBrand<"Parse", "Context<Schema">;
3671
+ readonly result: symbol & {
3672
+ __brand: VigorBrand<"Core", "Symbol_Default">;
3673
+ };
3674
+ readonly error: symbol & {
3675
+ __brand: VigorBrand<"Core", "Symbol_Default">;
3676
+ };
3677
+ readonly response: symbol & {
3678
+ __brand: VigorBrand<"Core", "Symbol_Default">;
3679
+ };
3680
+ readonly flags: {
3681
+ readonly overrided: false;
3682
+ readonly restarted: false;
3683
+ };
3684
+ readonly record: {};
3685
+ readonly policy: {
3686
+ readonly __brand: VigorBrand<"Parse", "Policy<Schema">;
3687
+ readonly target: symbol & {
3688
+ __brand: VigorBrand<"Core", "Symbol_Default">;
3689
+ };
3690
+ readonly settings: {
3691
+ readonly __brand: VigorBrand<"Parse", "Policy<Settings<Schema">;
3692
+ readonly raw: false;
3693
+ readonly default: symbol & {
3694
+ __brand: VigorBrand<"Core", "Symbol_Empty">;
3695
+ };
3696
+ readonly maxRestarts: 3;
3697
+ };
3698
+ readonly middlewares: {
3699
+ readonly __brand: VigorBrand<"Parse", "Policy<Middlewares<Schema">;
3700
+ readonly before: [];
3701
+ readonly after: [];
3702
+ readonly onResult: [];
3703
+ readonly onError: [];
3704
+ };
3705
+ readonly strategies: {
3706
+ readonly __brand: VigorBrand<"Parse", "Policy<Strategies<Schema">;
3707
+ readonly funcs: VigorParseStrategyFunc[];
3708
+ };
3709
+ };
3710
+ };
3711
+ };
3712
+ };
3713
+ __brand: VigorBrand<"Fetch", "Schema">;
3714
+ }>;
2591
3715
  all: (...tasks: Parameters<VigorAll["target"]>) => VigorAll<{
2592
3716
  readonly __brand: VigorBrand<"All", "Schema">;
2593
3717
  readonly policy: {