vigor-fetch 4.0.1 → 4.0.3
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.ts +32 -1923
- package/dist/index.js +23 -9
- package/dist/index.mjs +23 -9
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -220,61 +220,15 @@ declare class VigorAll<T extends VigorAllSchema<T> = typeof VigorAllBase> extend
|
|
|
220
220
|
}>>>;
|
|
221
221
|
/** Configures the all-policy's general settings (concurrency, onlySuccess). */
|
|
222
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
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
target?: readonly VigorAllTask[] | undefined;
|
|
227
|
-
settings?: {
|
|
228
|
-
__brand?: VigorBrand<"All", "Policy<Settings<Schema"> | undefined;
|
|
229
|
-
concurrency?: number | undefined;
|
|
230
|
-
onlySuccess?: boolean | undefined;
|
|
231
|
-
} | undefined;
|
|
232
|
-
middlewares?: {
|
|
233
|
-
__brand?: VigorBrand<"All", "Policy<Middlewares<Schema"> | undefined;
|
|
234
|
-
before?: readonly VigorAllEachMiddlewareFn[] | undefined;
|
|
235
|
-
after?: readonly VigorAllEachMiddlewareFn[] | undefined;
|
|
236
|
-
onError?: readonly VigorAllEachOnErrorFn[] | undefined;
|
|
237
|
-
} | undefined;
|
|
238
|
-
} | undefined;
|
|
239
|
-
context?: {
|
|
240
|
-
__brand?: VigorBrand<"All", "Context<Schema"> | undefined;
|
|
241
|
-
result?: (symbol & {
|
|
242
|
-
__brand: VigorBrand<"Core", "Symbol_Default">;
|
|
243
|
-
}) | readonly unknown[] | undefined;
|
|
244
|
-
policy?: any;
|
|
245
|
-
record?: {
|
|
246
|
-
[x: string]: any;
|
|
247
|
-
} | undefined;
|
|
248
|
-
} | undefined;
|
|
223
|
+
readonly policy: {
|
|
224
|
+
readonly settings: VigorAllPolicySettingsSchema<any>;
|
|
225
|
+
};
|
|
249
226
|
}>>>;
|
|
250
227
|
/** Configures the all-policy's per-task middleware pipeline. */
|
|
251
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, {
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
target?: readonly VigorAllTask[] | undefined;
|
|
256
|
-
settings?: {
|
|
257
|
-
__brand?: VigorBrand<"All", "Policy<Settings<Schema"> | undefined;
|
|
258
|
-
concurrency?: number | undefined;
|
|
259
|
-
onlySuccess?: boolean | undefined;
|
|
260
|
-
} | undefined;
|
|
261
|
-
middlewares?: {
|
|
262
|
-
__brand?: VigorBrand<"All", "Policy<Middlewares<Schema"> | undefined;
|
|
263
|
-
before?: readonly VigorAllEachMiddlewareFn[] | undefined;
|
|
264
|
-
after?: readonly VigorAllEachMiddlewareFn[] | undefined;
|
|
265
|
-
onError?: readonly VigorAllEachOnErrorFn[] | undefined;
|
|
266
|
-
} | undefined;
|
|
267
|
-
} | undefined;
|
|
268
|
-
context?: {
|
|
269
|
-
__brand?: VigorBrand<"All", "Context<Schema"> | undefined;
|
|
270
|
-
result?: (symbol & {
|
|
271
|
-
__brand: VigorBrand<"Core", "Symbol_Default">;
|
|
272
|
-
}) | readonly unknown[] | undefined;
|
|
273
|
-
policy?: any;
|
|
274
|
-
record?: {
|
|
275
|
-
[x: string]: any;
|
|
276
|
-
} | undefined;
|
|
277
|
-
} | undefined;
|
|
229
|
+
readonly policy: {
|
|
230
|
+
readonly middlewares: VigorAllPolicyMiddlewaresSchema<any>;
|
|
231
|
+
};
|
|
278
232
|
}>>>;
|
|
279
233
|
/** Runs a single task through the before/after/onError middleware pipeline. */
|
|
280
234
|
private _runTask;
|
|
@@ -355,7 +309,7 @@ type VigorParseContextSchema<T extends VigorParseSchema<T>> = {
|
|
|
355
309
|
__brand: VigorBrand<"Parse", "Context<Schema">;
|
|
356
310
|
result: unknown | VigorDefaultType;
|
|
357
311
|
error: unknown;
|
|
358
|
-
response:
|
|
312
|
+
response: VigorParsePolicySchema<T>["target"];
|
|
359
313
|
flags: {
|
|
360
314
|
overrided: boolean;
|
|
361
315
|
restarted: boolean;
|
|
@@ -563,7 +517,7 @@ declare class VigorParsePolicyMiddlewares<T extends VigorParseSchema<T> = typeof
|
|
|
563
517
|
|
|
564
518
|
type VigorParsePolicySchema<T extends VigorParseSchema<T>> = {
|
|
565
519
|
__brand: VigorBrand<"Parse", "Policy<Schema">;
|
|
566
|
-
target: Response | VigorDefaultType;
|
|
520
|
+
target: Request | Response | VigorDefaultType;
|
|
567
521
|
settings: VigorParsePolicySettingsSchema<T>;
|
|
568
522
|
middlewares: VigorParsePolicyMiddlewaresSchema<T>;
|
|
569
523
|
strategies: VigorParsePolicyStrategiesSchema<T>;
|
|
@@ -685,438 +639,21 @@ declare class VigorParse<T extends VigorParseSchema<T> = typeof VigorParseBase>
|
|
|
685
639
|
}>>>;
|
|
686
640
|
/** Configures the parse policy's general settings. */
|
|
687
641
|
settings<const N extends VigorDeepPartial<VigorParsePolicySettingsSchema<T>>, R extends VigorParseSchema<any>>(input: N | ((s: VigorParsePolicySettings<T>) => VigorParsePolicySettings<R>) | VigorParsePolicySettings<R>): VigorParse<VigorParseIn<VigorDeepMerge<T, {
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
target?: (symbol & {
|
|
692
|
-
__brand: VigorBrand<"Core", "Symbol_Default">;
|
|
693
|
-
}) | {
|
|
694
|
-
readonly headers?: {
|
|
695
|
-
append?: ((name: string, value: string) => void) | undefined;
|
|
696
|
-
delete?: ((name: string) => void) | undefined;
|
|
697
|
-
get?: ((name: string) => string | null) | undefined;
|
|
698
|
-
getSetCookie?: (() => string[]) | undefined;
|
|
699
|
-
has?: ((name: string) => boolean) | undefined;
|
|
700
|
-
set?: ((name: string, value: string) => void) | undefined;
|
|
701
|
-
forEach?: ((callbackfn: (value: string, key: string, parent: Headers) => void, thisArg?: any) => void) | undefined;
|
|
702
|
-
} | undefined;
|
|
703
|
-
readonly ok?: boolean | undefined;
|
|
704
|
-
readonly redirected?: boolean | undefined;
|
|
705
|
-
readonly status?: number | undefined;
|
|
706
|
-
readonly statusText?: string | undefined;
|
|
707
|
-
readonly type?: ResponseType | undefined;
|
|
708
|
-
readonly url?: string | undefined;
|
|
709
|
-
clone?: (() => Response) | undefined;
|
|
710
|
-
readonly body?: {
|
|
711
|
-
readonly locked?: boolean | undefined;
|
|
712
|
-
cancel?: ((reason?: any) => Promise<void>) | undefined;
|
|
713
|
-
getReader?: {
|
|
714
|
-
(options: {
|
|
715
|
-
mode: "byob";
|
|
716
|
-
}): ReadableStreamBYOBReader;
|
|
717
|
-
(): ReadableStreamDefaultReader<Uint8Array<ArrayBuffer>>;
|
|
718
|
-
(options?: ReadableStreamGetReaderOptions): ReadableStreamReader<Uint8Array<ArrayBuffer>>;
|
|
719
|
-
} | undefined;
|
|
720
|
-
pipeThrough?: (<T_1>(transform: ReadableWritablePair<T_1, Uint8Array<ArrayBuffer>>, options?: StreamPipeOptions) => ReadableStream<T_1>) | undefined;
|
|
721
|
-
pipeTo?: ((destination: WritableStream<Uint8Array<ArrayBuffer>>, options?: StreamPipeOptions) => Promise<void>) | undefined;
|
|
722
|
-
tee?: (() => [ReadableStream<Uint8Array<ArrayBuffer>>, ReadableStream<Uint8Array<ArrayBuffer>>]) | undefined;
|
|
723
|
-
} | null | undefined;
|
|
724
|
-
readonly bodyUsed?: boolean | undefined;
|
|
725
|
-
arrayBuffer?: (() => Promise<ArrayBuffer>) | undefined;
|
|
726
|
-
blob?: (() => Promise<Blob>) | undefined;
|
|
727
|
-
bytes?: (() => Promise<Uint8Array<ArrayBuffer>>) | undefined;
|
|
728
|
-
formData?: (() => Promise<FormData>) | undefined;
|
|
729
|
-
json?: (() => Promise<any>) | undefined;
|
|
730
|
-
text?: (() => Promise<string>) | undefined;
|
|
731
|
-
} | undefined;
|
|
732
|
-
settings?: {
|
|
733
|
-
__brand?: VigorBrand<"Parse", "Policy<Settings<Schema"> | undefined;
|
|
734
|
-
raw?: boolean | undefined;
|
|
735
|
-
default?: (symbol & {
|
|
736
|
-
__brand: VigorBrand<"Core", "Symbol_Empty">;
|
|
737
|
-
}) | ((ctx: any) => any | Promise<any>) | undefined;
|
|
738
|
-
maxRestarts?: number | undefined;
|
|
739
|
-
} | undefined;
|
|
740
|
-
middlewares?: {
|
|
741
|
-
__brand?: VigorBrand<"Parse", "Policy<Middlewares<Schema"> | undefined;
|
|
742
|
-
before?: readonly ({
|
|
743
|
-
_mode?: "fluent" | undefined;
|
|
744
|
-
func?: ((ctx: any) => void) | undefined;
|
|
745
|
-
} | {
|
|
746
|
-
_mode?: "intercept" | undefined;
|
|
747
|
-
func?: ((ctx: any, api: Pick<VigorParsePolicyMiddlewaresApi<any>, "throwError">) => VigorParseSchema<any>["context"] | Promise<VigorParseSchema<any>["context"]>) | undefined;
|
|
748
|
-
})[] | undefined;
|
|
749
|
-
after?: readonly ({
|
|
750
|
-
_mode?: "fluent" | undefined;
|
|
751
|
-
func?: ((ctx: any) => void) | undefined;
|
|
752
|
-
} | {
|
|
753
|
-
_mode?: "intercept" | undefined;
|
|
754
|
-
func?: ((ctx: any, api: Pick<VigorParsePolicyMiddlewaresApi<any>, "throwError" | "setResult">) => VigorParseSchema<any>["context"] | Promise<VigorParseSchema<any>["context"]>) | undefined;
|
|
755
|
-
})[] | undefined;
|
|
756
|
-
onResult?: readonly ({
|
|
757
|
-
_mode?: "fluent" | undefined;
|
|
758
|
-
func?: ((res: any) => VigorParseSchema<any>["context"]["result"]) | undefined;
|
|
759
|
-
} | {
|
|
760
|
-
_mode?: "intercept" | undefined;
|
|
761
|
-
func?: ((ctx: any, api: Pick<VigorParsePolicyMiddlewaresApi<any>, "throwError" | "setResult">) => VigorParseSchema<any>["context"] | Promise<VigorParseSchema<any>["context"]>) | undefined;
|
|
762
|
-
})[] | undefined;
|
|
763
|
-
onError?: readonly ({
|
|
764
|
-
_mode?: "fluent" | undefined;
|
|
765
|
-
func?: ((err: any) => void) | undefined;
|
|
766
|
-
} | {
|
|
767
|
-
_mode?: "intercept" | undefined;
|
|
768
|
-
func?: ((ctx: any, api: Pick<VigorParsePolicyMiddlewaresApi<any>, "throwError" | "setResult" | "proceedRestart" | "cancelRestart">) => VigorParseSchema<any>["context"] | Promise<VigorParseSchema<any>["context"]>) | undefined;
|
|
769
|
-
})[] | undefined;
|
|
770
|
-
} | undefined;
|
|
771
|
-
strategies?: {
|
|
772
|
-
__brand?: VigorBrand<"Parse", "Policy<Strategies<Schema"> | undefined;
|
|
773
|
-
funcs?: readonly VigorParseStrategyFunc[] | undefined;
|
|
774
|
-
} | undefined;
|
|
775
|
-
} | undefined;
|
|
776
|
-
context?: {
|
|
777
|
-
__brand?: VigorBrand<"Parse", "Context<Schema"> | undefined;
|
|
778
|
-
result?: unknown | VigorDefaultType;
|
|
779
|
-
error?: unknown;
|
|
780
|
-
response?: (symbol & {
|
|
781
|
-
__brand: VigorBrand<"Core", "Symbol_Default">;
|
|
782
|
-
}) | {
|
|
783
|
-
readonly headers?: {
|
|
784
|
-
append?: ((name: string, value: string) => void) | undefined;
|
|
785
|
-
delete?: ((name: string) => void) | undefined;
|
|
786
|
-
get?: ((name: string) => string | null) | undefined;
|
|
787
|
-
getSetCookie?: (() => string[]) | undefined;
|
|
788
|
-
has?: ((name: string) => boolean) | undefined;
|
|
789
|
-
set?: ((name: string, value: string) => void) | undefined;
|
|
790
|
-
forEach?: ((callbackfn: (value: string, key: string, parent: Headers) => void, thisArg?: any) => void) | undefined;
|
|
791
|
-
} | undefined;
|
|
792
|
-
readonly ok?: boolean | undefined;
|
|
793
|
-
readonly redirected?: boolean | undefined;
|
|
794
|
-
readonly status?: number | undefined;
|
|
795
|
-
readonly statusText?: string | undefined;
|
|
796
|
-
readonly type?: ResponseType | undefined;
|
|
797
|
-
readonly url?: string | undefined;
|
|
798
|
-
clone?: (() => Response) | undefined;
|
|
799
|
-
readonly body?: {
|
|
800
|
-
readonly locked?: boolean | undefined;
|
|
801
|
-
cancel?: ((reason?: any) => Promise<void>) | undefined;
|
|
802
|
-
getReader?: {
|
|
803
|
-
(options: {
|
|
804
|
-
mode: "byob";
|
|
805
|
-
}): ReadableStreamBYOBReader;
|
|
806
|
-
(): ReadableStreamDefaultReader<Uint8Array<ArrayBuffer>>;
|
|
807
|
-
(options?: ReadableStreamGetReaderOptions): ReadableStreamReader<Uint8Array<ArrayBuffer>>;
|
|
808
|
-
} | undefined;
|
|
809
|
-
pipeThrough?: (<T_1>(transform: ReadableWritablePair<T_1, Uint8Array<ArrayBuffer>>, options?: StreamPipeOptions) => ReadableStream<T_1>) | undefined;
|
|
810
|
-
pipeTo?: ((destination: WritableStream<Uint8Array<ArrayBuffer>>, options?: StreamPipeOptions) => Promise<void>) | undefined;
|
|
811
|
-
tee?: (() => [ReadableStream<Uint8Array<ArrayBuffer>>, ReadableStream<Uint8Array<ArrayBuffer>>]) | undefined;
|
|
812
|
-
} | null | undefined;
|
|
813
|
-
readonly bodyUsed?: boolean | undefined;
|
|
814
|
-
arrayBuffer?: (() => Promise<ArrayBuffer>) | undefined;
|
|
815
|
-
blob?: (() => Promise<Blob>) | undefined;
|
|
816
|
-
bytes?: (() => Promise<Uint8Array<ArrayBuffer>>) | undefined;
|
|
817
|
-
formData?: (() => Promise<FormData>) | undefined;
|
|
818
|
-
json?: (() => Promise<any>) | undefined;
|
|
819
|
-
text?: (() => Promise<string>) | undefined;
|
|
820
|
-
} | undefined;
|
|
821
|
-
flags?: {
|
|
822
|
-
overrided?: boolean | undefined;
|
|
823
|
-
restarted?: boolean | undefined;
|
|
824
|
-
} | undefined;
|
|
825
|
-
record?: {
|
|
826
|
-
[x: string]: any;
|
|
827
|
-
} | undefined;
|
|
828
|
-
policy?: any;
|
|
829
|
-
} | undefined;
|
|
642
|
+
readonly policy: {
|
|
643
|
+
readonly settings: VigorParsePolicySettingsSchema<any>;
|
|
644
|
+
};
|
|
830
645
|
}>>>;
|
|
831
646
|
/** Configures the parse policy's middleware pipeline. */
|
|
832
647
|
middlewares<const N extends VigorDeepPartial<VigorParsePolicyMiddlewaresSchema<T>>, R extends VigorParseSchema<any>>(input: N | ((s: VigorParsePolicyMiddlewares<T>) => VigorParsePolicyMiddlewares<R>) | VigorParsePolicyMiddlewares<R>): VigorParse<VigorParseIn<VigorDeepMerge<T, {
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
target?: (symbol & {
|
|
837
|
-
__brand: VigorBrand<"Core", "Symbol_Default">;
|
|
838
|
-
}) | {
|
|
839
|
-
readonly headers?: {
|
|
840
|
-
append?: ((name: string, value: string) => void) | undefined;
|
|
841
|
-
delete?: ((name: string) => void) | undefined;
|
|
842
|
-
get?: ((name: string) => string | null) | undefined;
|
|
843
|
-
getSetCookie?: (() => string[]) | undefined;
|
|
844
|
-
has?: ((name: string) => boolean) | undefined;
|
|
845
|
-
set?: ((name: string, value: string) => void) | undefined;
|
|
846
|
-
forEach?: ((callbackfn: (value: string, key: string, parent: Headers) => void, thisArg?: any) => void) | undefined;
|
|
847
|
-
} | undefined;
|
|
848
|
-
readonly ok?: boolean | undefined;
|
|
849
|
-
readonly redirected?: boolean | undefined;
|
|
850
|
-
readonly status?: number | undefined;
|
|
851
|
-
readonly statusText?: string | undefined;
|
|
852
|
-
readonly type?: ResponseType | undefined;
|
|
853
|
-
readonly url?: string | undefined;
|
|
854
|
-
clone?: (() => Response) | undefined;
|
|
855
|
-
readonly body?: {
|
|
856
|
-
readonly locked?: boolean | undefined;
|
|
857
|
-
cancel?: ((reason?: any) => Promise<void>) | undefined;
|
|
858
|
-
getReader?: {
|
|
859
|
-
(options: {
|
|
860
|
-
mode: "byob";
|
|
861
|
-
}): ReadableStreamBYOBReader;
|
|
862
|
-
(): ReadableStreamDefaultReader<Uint8Array<ArrayBuffer>>;
|
|
863
|
-
(options?: ReadableStreamGetReaderOptions): ReadableStreamReader<Uint8Array<ArrayBuffer>>;
|
|
864
|
-
} | undefined;
|
|
865
|
-
pipeThrough?: (<T_1>(transform: ReadableWritablePair<T_1, Uint8Array<ArrayBuffer>>, options?: StreamPipeOptions) => ReadableStream<T_1>) | undefined;
|
|
866
|
-
pipeTo?: ((destination: WritableStream<Uint8Array<ArrayBuffer>>, options?: StreamPipeOptions) => Promise<void>) | undefined;
|
|
867
|
-
tee?: (() => [ReadableStream<Uint8Array<ArrayBuffer>>, ReadableStream<Uint8Array<ArrayBuffer>>]) | undefined;
|
|
868
|
-
} | null | undefined;
|
|
869
|
-
readonly bodyUsed?: boolean | undefined;
|
|
870
|
-
arrayBuffer?: (() => Promise<ArrayBuffer>) | undefined;
|
|
871
|
-
blob?: (() => Promise<Blob>) | undefined;
|
|
872
|
-
bytes?: (() => Promise<Uint8Array<ArrayBuffer>>) | undefined;
|
|
873
|
-
formData?: (() => Promise<FormData>) | undefined;
|
|
874
|
-
json?: (() => Promise<any>) | undefined;
|
|
875
|
-
text?: (() => Promise<string>) | undefined;
|
|
876
|
-
} | undefined;
|
|
877
|
-
settings?: {
|
|
878
|
-
__brand?: VigorBrand<"Parse", "Policy<Settings<Schema"> | undefined;
|
|
879
|
-
raw?: boolean | undefined;
|
|
880
|
-
default?: (symbol & {
|
|
881
|
-
__brand: VigorBrand<"Core", "Symbol_Empty">;
|
|
882
|
-
}) | ((ctx: any) => any | Promise<any>) | undefined;
|
|
883
|
-
maxRestarts?: number | undefined;
|
|
884
|
-
} | undefined;
|
|
885
|
-
middlewares?: {
|
|
886
|
-
__brand?: VigorBrand<"Parse", "Policy<Middlewares<Schema"> | undefined;
|
|
887
|
-
before?: readonly ({
|
|
888
|
-
_mode?: "fluent" | undefined;
|
|
889
|
-
func?: ((ctx: any) => void) | undefined;
|
|
890
|
-
} | {
|
|
891
|
-
_mode?: "intercept" | undefined;
|
|
892
|
-
func?: ((ctx: any, api: Pick<VigorParsePolicyMiddlewaresApi<any>, "throwError">) => VigorParseSchema<any>["context"] | Promise<VigorParseSchema<any>["context"]>) | undefined;
|
|
893
|
-
})[] | undefined;
|
|
894
|
-
after?: readonly ({
|
|
895
|
-
_mode?: "fluent" | undefined;
|
|
896
|
-
func?: ((ctx: any) => void) | undefined;
|
|
897
|
-
} | {
|
|
898
|
-
_mode?: "intercept" | undefined;
|
|
899
|
-
func?: ((ctx: any, api: Pick<VigorParsePolicyMiddlewaresApi<any>, "throwError" | "setResult">) => VigorParseSchema<any>["context"] | Promise<VigorParseSchema<any>["context"]>) | undefined;
|
|
900
|
-
})[] | undefined;
|
|
901
|
-
onResult?: readonly ({
|
|
902
|
-
_mode?: "fluent" | undefined;
|
|
903
|
-
func?: ((res: any) => VigorParseSchema<any>["context"]["result"]) | undefined;
|
|
904
|
-
} | {
|
|
905
|
-
_mode?: "intercept" | undefined;
|
|
906
|
-
func?: ((ctx: any, api: Pick<VigorParsePolicyMiddlewaresApi<any>, "throwError" | "setResult">) => VigorParseSchema<any>["context"] | Promise<VigorParseSchema<any>["context"]>) | undefined;
|
|
907
|
-
})[] | undefined;
|
|
908
|
-
onError?: readonly ({
|
|
909
|
-
_mode?: "fluent" | undefined;
|
|
910
|
-
func?: ((err: any) => void) | undefined;
|
|
911
|
-
} | {
|
|
912
|
-
_mode?: "intercept" | undefined;
|
|
913
|
-
func?: ((ctx: any, api: Pick<VigorParsePolicyMiddlewaresApi<any>, "throwError" | "setResult" | "proceedRestart" | "cancelRestart">) => VigorParseSchema<any>["context"] | Promise<VigorParseSchema<any>["context"]>) | undefined;
|
|
914
|
-
})[] | undefined;
|
|
915
|
-
} | undefined;
|
|
916
|
-
strategies?: {
|
|
917
|
-
__brand?: VigorBrand<"Parse", "Policy<Strategies<Schema"> | undefined;
|
|
918
|
-
funcs?: readonly VigorParseStrategyFunc[] | undefined;
|
|
919
|
-
} | undefined;
|
|
920
|
-
} | undefined;
|
|
921
|
-
context?: {
|
|
922
|
-
__brand?: VigorBrand<"Parse", "Context<Schema"> | undefined;
|
|
923
|
-
result?: unknown | VigorDefaultType;
|
|
924
|
-
error?: unknown;
|
|
925
|
-
response?: (symbol & {
|
|
926
|
-
__brand: VigorBrand<"Core", "Symbol_Default">;
|
|
927
|
-
}) | {
|
|
928
|
-
readonly headers?: {
|
|
929
|
-
append?: ((name: string, value: string) => void) | undefined;
|
|
930
|
-
delete?: ((name: string) => void) | undefined;
|
|
931
|
-
get?: ((name: string) => string | null) | undefined;
|
|
932
|
-
getSetCookie?: (() => string[]) | undefined;
|
|
933
|
-
has?: ((name: string) => boolean) | undefined;
|
|
934
|
-
set?: ((name: string, value: string) => void) | undefined;
|
|
935
|
-
forEach?: ((callbackfn: (value: string, key: string, parent: Headers) => void, thisArg?: any) => void) | undefined;
|
|
936
|
-
} | undefined;
|
|
937
|
-
readonly ok?: boolean | undefined;
|
|
938
|
-
readonly redirected?: boolean | undefined;
|
|
939
|
-
readonly status?: number | undefined;
|
|
940
|
-
readonly statusText?: string | undefined;
|
|
941
|
-
readonly type?: ResponseType | undefined;
|
|
942
|
-
readonly url?: string | undefined;
|
|
943
|
-
clone?: (() => Response) | undefined;
|
|
944
|
-
readonly body?: {
|
|
945
|
-
readonly locked?: boolean | undefined;
|
|
946
|
-
cancel?: ((reason?: any) => Promise<void>) | undefined;
|
|
947
|
-
getReader?: {
|
|
948
|
-
(options: {
|
|
949
|
-
mode: "byob";
|
|
950
|
-
}): ReadableStreamBYOBReader;
|
|
951
|
-
(): ReadableStreamDefaultReader<Uint8Array<ArrayBuffer>>;
|
|
952
|
-
(options?: ReadableStreamGetReaderOptions): ReadableStreamReader<Uint8Array<ArrayBuffer>>;
|
|
953
|
-
} | undefined;
|
|
954
|
-
pipeThrough?: (<T_1>(transform: ReadableWritablePair<T_1, Uint8Array<ArrayBuffer>>, options?: StreamPipeOptions) => ReadableStream<T_1>) | undefined;
|
|
955
|
-
pipeTo?: ((destination: WritableStream<Uint8Array<ArrayBuffer>>, options?: StreamPipeOptions) => Promise<void>) | undefined;
|
|
956
|
-
tee?: (() => [ReadableStream<Uint8Array<ArrayBuffer>>, ReadableStream<Uint8Array<ArrayBuffer>>]) | undefined;
|
|
957
|
-
} | null | undefined;
|
|
958
|
-
readonly bodyUsed?: boolean | undefined;
|
|
959
|
-
arrayBuffer?: (() => Promise<ArrayBuffer>) | undefined;
|
|
960
|
-
blob?: (() => Promise<Blob>) | undefined;
|
|
961
|
-
bytes?: (() => Promise<Uint8Array<ArrayBuffer>>) | undefined;
|
|
962
|
-
formData?: (() => Promise<FormData>) | undefined;
|
|
963
|
-
json?: (() => Promise<any>) | undefined;
|
|
964
|
-
text?: (() => Promise<string>) | undefined;
|
|
965
|
-
} | undefined;
|
|
966
|
-
flags?: {
|
|
967
|
-
overrided?: boolean | undefined;
|
|
968
|
-
restarted?: boolean | undefined;
|
|
969
|
-
} | undefined;
|
|
970
|
-
record?: {
|
|
971
|
-
[x: string]: any;
|
|
972
|
-
} | undefined;
|
|
973
|
-
policy?: any;
|
|
974
|
-
} | undefined;
|
|
648
|
+
readonly policy: {
|
|
649
|
+
readonly middlewares: VigorParsePolicyMiddlewaresSchema<any>;
|
|
650
|
+
};
|
|
975
651
|
}>>>;
|
|
976
652
|
/** Configures the parse policy's fallback chain of parsing strategies. */
|
|
977
653
|
strategies<const N extends VigorDeepPartial<VigorParsePolicyStrategiesSchema<T>>, R extends VigorParseSchema<any>>(input: N | ((s: VigorParsePolicyStrategies<T>) => VigorParsePolicyStrategies<R>) | VigorParsePolicyStrategies<R>): VigorParse<VigorParseIn<VigorDeepMerge<T, {
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
target?: (symbol & {
|
|
982
|
-
__brand: VigorBrand<"Core", "Symbol_Default">;
|
|
983
|
-
}) | {
|
|
984
|
-
readonly headers?: {
|
|
985
|
-
append?: ((name: string, value: string) => void) | undefined;
|
|
986
|
-
delete?: ((name: string) => void) | undefined;
|
|
987
|
-
get?: ((name: string) => string | null) | undefined;
|
|
988
|
-
getSetCookie?: (() => string[]) | undefined;
|
|
989
|
-
has?: ((name: string) => boolean) | undefined;
|
|
990
|
-
set?: ((name: string, value: string) => void) | undefined;
|
|
991
|
-
forEach?: ((callbackfn: (value: string, key: string, parent: Headers) => void, thisArg?: any) => void) | undefined;
|
|
992
|
-
} | undefined;
|
|
993
|
-
readonly ok?: boolean | undefined;
|
|
994
|
-
readonly redirected?: boolean | undefined;
|
|
995
|
-
readonly status?: number | undefined;
|
|
996
|
-
readonly statusText?: string | undefined;
|
|
997
|
-
readonly type?: ResponseType | undefined;
|
|
998
|
-
readonly url?: string | undefined;
|
|
999
|
-
clone?: (() => Response) | undefined;
|
|
1000
|
-
readonly body?: {
|
|
1001
|
-
readonly locked?: boolean | undefined;
|
|
1002
|
-
cancel?: ((reason?: any) => Promise<void>) | undefined;
|
|
1003
|
-
getReader?: {
|
|
1004
|
-
(options: {
|
|
1005
|
-
mode: "byob";
|
|
1006
|
-
}): ReadableStreamBYOBReader;
|
|
1007
|
-
(): ReadableStreamDefaultReader<Uint8Array<ArrayBuffer>>;
|
|
1008
|
-
(options?: ReadableStreamGetReaderOptions): ReadableStreamReader<Uint8Array<ArrayBuffer>>;
|
|
1009
|
-
} | undefined;
|
|
1010
|
-
pipeThrough?: (<T_1>(transform: ReadableWritablePair<T_1, Uint8Array<ArrayBuffer>>, options?: StreamPipeOptions) => ReadableStream<T_1>) | undefined;
|
|
1011
|
-
pipeTo?: ((destination: WritableStream<Uint8Array<ArrayBuffer>>, options?: StreamPipeOptions) => Promise<void>) | undefined;
|
|
1012
|
-
tee?: (() => [ReadableStream<Uint8Array<ArrayBuffer>>, ReadableStream<Uint8Array<ArrayBuffer>>]) | undefined;
|
|
1013
|
-
} | null | undefined;
|
|
1014
|
-
readonly bodyUsed?: boolean | undefined;
|
|
1015
|
-
arrayBuffer?: (() => Promise<ArrayBuffer>) | undefined;
|
|
1016
|
-
blob?: (() => Promise<Blob>) | undefined;
|
|
1017
|
-
bytes?: (() => Promise<Uint8Array<ArrayBuffer>>) | undefined;
|
|
1018
|
-
formData?: (() => Promise<FormData>) | undefined;
|
|
1019
|
-
json?: (() => Promise<any>) | undefined;
|
|
1020
|
-
text?: (() => Promise<string>) | undefined;
|
|
1021
|
-
} | undefined;
|
|
1022
|
-
settings?: {
|
|
1023
|
-
__brand?: VigorBrand<"Parse", "Policy<Settings<Schema"> | undefined;
|
|
1024
|
-
raw?: boolean | undefined;
|
|
1025
|
-
default?: (symbol & {
|
|
1026
|
-
__brand: VigorBrand<"Core", "Symbol_Empty">;
|
|
1027
|
-
}) | ((ctx: any) => any | Promise<any>) | undefined;
|
|
1028
|
-
maxRestarts?: number | undefined;
|
|
1029
|
-
} | undefined;
|
|
1030
|
-
middlewares?: {
|
|
1031
|
-
__brand?: VigorBrand<"Parse", "Policy<Middlewares<Schema"> | undefined;
|
|
1032
|
-
before?: readonly ({
|
|
1033
|
-
_mode?: "fluent" | undefined;
|
|
1034
|
-
func?: ((ctx: any) => void) | undefined;
|
|
1035
|
-
} | {
|
|
1036
|
-
_mode?: "intercept" | undefined;
|
|
1037
|
-
func?: ((ctx: any, api: Pick<VigorParsePolicyMiddlewaresApi<any>, "throwError">) => VigorParseSchema<any>["context"] | Promise<VigorParseSchema<any>["context"]>) | undefined;
|
|
1038
|
-
})[] | undefined;
|
|
1039
|
-
after?: readonly ({
|
|
1040
|
-
_mode?: "fluent" | undefined;
|
|
1041
|
-
func?: ((ctx: any) => void) | undefined;
|
|
1042
|
-
} | {
|
|
1043
|
-
_mode?: "intercept" | undefined;
|
|
1044
|
-
func?: ((ctx: any, api: Pick<VigorParsePolicyMiddlewaresApi<any>, "throwError" | "setResult">) => VigorParseSchema<any>["context"] | Promise<VigorParseSchema<any>["context"]>) | undefined;
|
|
1045
|
-
})[] | undefined;
|
|
1046
|
-
onResult?: readonly ({
|
|
1047
|
-
_mode?: "fluent" | undefined;
|
|
1048
|
-
func?: ((res: any) => VigorParseSchema<any>["context"]["result"]) | undefined;
|
|
1049
|
-
} | {
|
|
1050
|
-
_mode?: "intercept" | undefined;
|
|
1051
|
-
func?: ((ctx: any, api: Pick<VigorParsePolicyMiddlewaresApi<any>, "throwError" | "setResult">) => VigorParseSchema<any>["context"] | Promise<VigorParseSchema<any>["context"]>) | undefined;
|
|
1052
|
-
})[] | undefined;
|
|
1053
|
-
onError?: readonly ({
|
|
1054
|
-
_mode?: "fluent" | undefined;
|
|
1055
|
-
func?: ((err: any) => void) | undefined;
|
|
1056
|
-
} | {
|
|
1057
|
-
_mode?: "intercept" | undefined;
|
|
1058
|
-
func?: ((ctx: any, api: Pick<VigorParsePolicyMiddlewaresApi<any>, "throwError" | "setResult" | "proceedRestart" | "cancelRestart">) => VigorParseSchema<any>["context"] | Promise<VigorParseSchema<any>["context"]>) | undefined;
|
|
1059
|
-
})[] | undefined;
|
|
1060
|
-
} | undefined;
|
|
1061
|
-
strategies?: {
|
|
1062
|
-
__brand?: VigorBrand<"Parse", "Policy<Strategies<Schema"> | undefined;
|
|
1063
|
-
funcs?: readonly VigorParseStrategyFunc[] | undefined;
|
|
1064
|
-
} | undefined;
|
|
1065
|
-
} | undefined;
|
|
1066
|
-
context?: {
|
|
1067
|
-
__brand?: VigorBrand<"Parse", "Context<Schema"> | undefined;
|
|
1068
|
-
result?: unknown | VigorDefaultType;
|
|
1069
|
-
error?: unknown;
|
|
1070
|
-
response?: (symbol & {
|
|
1071
|
-
__brand: VigorBrand<"Core", "Symbol_Default">;
|
|
1072
|
-
}) | {
|
|
1073
|
-
readonly headers?: {
|
|
1074
|
-
append?: ((name: string, value: string) => void) | undefined;
|
|
1075
|
-
delete?: ((name: string) => void) | undefined;
|
|
1076
|
-
get?: ((name: string) => string | null) | undefined;
|
|
1077
|
-
getSetCookie?: (() => string[]) | undefined;
|
|
1078
|
-
has?: ((name: string) => boolean) | undefined;
|
|
1079
|
-
set?: ((name: string, value: string) => void) | undefined;
|
|
1080
|
-
forEach?: ((callbackfn: (value: string, key: string, parent: Headers) => void, thisArg?: any) => void) | undefined;
|
|
1081
|
-
} | undefined;
|
|
1082
|
-
readonly ok?: boolean | undefined;
|
|
1083
|
-
readonly redirected?: boolean | undefined;
|
|
1084
|
-
readonly status?: number | undefined;
|
|
1085
|
-
readonly statusText?: string | undefined;
|
|
1086
|
-
readonly type?: ResponseType | undefined;
|
|
1087
|
-
readonly url?: string | undefined;
|
|
1088
|
-
clone?: (() => Response) | undefined;
|
|
1089
|
-
readonly body?: {
|
|
1090
|
-
readonly locked?: boolean | undefined;
|
|
1091
|
-
cancel?: ((reason?: any) => Promise<void>) | undefined;
|
|
1092
|
-
getReader?: {
|
|
1093
|
-
(options: {
|
|
1094
|
-
mode: "byob";
|
|
1095
|
-
}): ReadableStreamBYOBReader;
|
|
1096
|
-
(): ReadableStreamDefaultReader<Uint8Array<ArrayBuffer>>;
|
|
1097
|
-
(options?: ReadableStreamGetReaderOptions): ReadableStreamReader<Uint8Array<ArrayBuffer>>;
|
|
1098
|
-
} | undefined;
|
|
1099
|
-
pipeThrough?: (<T_1>(transform: ReadableWritablePair<T_1, Uint8Array<ArrayBuffer>>, options?: StreamPipeOptions) => ReadableStream<T_1>) | undefined;
|
|
1100
|
-
pipeTo?: ((destination: WritableStream<Uint8Array<ArrayBuffer>>, options?: StreamPipeOptions) => Promise<void>) | undefined;
|
|
1101
|
-
tee?: (() => [ReadableStream<Uint8Array<ArrayBuffer>>, ReadableStream<Uint8Array<ArrayBuffer>>]) | undefined;
|
|
1102
|
-
} | null | undefined;
|
|
1103
|
-
readonly bodyUsed?: boolean | undefined;
|
|
1104
|
-
arrayBuffer?: (() => Promise<ArrayBuffer>) | undefined;
|
|
1105
|
-
blob?: (() => Promise<Blob>) | undefined;
|
|
1106
|
-
bytes?: (() => Promise<Uint8Array<ArrayBuffer>>) | undefined;
|
|
1107
|
-
formData?: (() => Promise<FormData>) | undefined;
|
|
1108
|
-
json?: (() => Promise<any>) | undefined;
|
|
1109
|
-
text?: (() => Promise<string>) | undefined;
|
|
1110
|
-
} | undefined;
|
|
1111
|
-
flags?: {
|
|
1112
|
-
overrided?: boolean | undefined;
|
|
1113
|
-
restarted?: boolean | undefined;
|
|
1114
|
-
} | undefined;
|
|
1115
|
-
record?: {
|
|
1116
|
-
[x: string]: any;
|
|
1117
|
-
} | undefined;
|
|
1118
|
-
policy?: any;
|
|
1119
|
-
} | undefined;
|
|
654
|
+
readonly policy: {
|
|
655
|
+
readonly strategies: VigorParsePolicyStrategiesSchema<any>;
|
|
656
|
+
};
|
|
1120
657
|
}>>>;
|
|
1121
658
|
/** Runs parsing and returns the result directly, throwing on final failure. */
|
|
1122
659
|
request<R = T["context"]["result"]>(): Promise<R>;
|
|
@@ -1728,279 +1265,15 @@ declare class VigorRetry<T extends VigorRetrySchema<T> = typeof VigorRetryBase>
|
|
|
1728
1265
|
}>>>;
|
|
1729
1266
|
/** Configures the retry policy's general settings (max attempts, timeout, etc). */
|
|
1730
1267
|
settings<const N extends VigorDeepPartial<VigorRetryPolicySettingsSchema<T>>, R extends VigorRetrySchema<any>>(input: N | ((s: VigorRetryPolicySettings<T>) => VigorRetryPolicySettings<R>) | VigorRetryPolicySettings<R>): VigorRetry<VigorRetryIn<VigorDeepMerge<T, {
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
target?: (symbol & {
|
|
1735
|
-
__brand: VigorBrand<"Core", "Symbol_Empty">;
|
|
1736
|
-
}) | ((signal: AbortSignal) => any | Promise<any>) | undefined;
|
|
1737
|
-
abortSignals?: readonly {
|
|
1738
|
-
readonly aborted?: boolean | undefined;
|
|
1739
|
-
onabort?: ((this: AbortSignal, ev: Event) => any) | null | undefined;
|
|
1740
|
-
readonly reason?: any;
|
|
1741
|
-
throwIfAborted?: (() => void) | undefined;
|
|
1742
|
-
addEventListener?: {
|
|
1743
|
-
<K extends keyof AbortSignalEventMap>(type: K, listener: (this: AbortSignal, ev: AbortSignalEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
1744
|
-
(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
|
|
1745
|
-
} | undefined;
|
|
1746
|
-
removeEventListener?: {
|
|
1747
|
-
<K extends keyof AbortSignalEventMap>(type: K, listener: (this: AbortSignal, ev: AbortSignalEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
1748
|
-
(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
|
|
1749
|
-
} | undefined;
|
|
1750
|
-
dispatchEvent?: ((event: Event) => boolean) | undefined;
|
|
1751
|
-
}[] | undefined;
|
|
1752
|
-
settings?: {
|
|
1753
|
-
__brand?: VigorBrand<"Retry", "Policy<Settings<Schema"> | undefined;
|
|
1754
|
-
default?: (symbol & {
|
|
1755
|
-
__brand: VigorBrand<"Core", "Symbol_Empty">;
|
|
1756
|
-
}) | ((ctx: any) => any | Promise<any>) | undefined;
|
|
1757
|
-
maxAttempts?: number | undefined;
|
|
1758
|
-
maxRestarts?: number | undefined;
|
|
1759
|
-
timeout?: number | undefined;
|
|
1760
|
-
} | undefined;
|
|
1761
|
-
middlewares?: {
|
|
1762
|
-
__brand?: VigorBrand<"Retry", "Policy<Middlewares<Schema"> | undefined;
|
|
1763
|
-
before?: readonly ({
|
|
1764
|
-
_mode?: "fluent" | undefined;
|
|
1765
|
-
func?: ((ctx: any) => void) | undefined;
|
|
1766
|
-
} | {
|
|
1767
|
-
_mode?: "intercept" | undefined;
|
|
1768
|
-
func?: ((ctx: any, api: Pick<VigorRetryPolicyMiddlewaresApi<any>, "abort" | "throwError" | "breakRetry">) => VigorRetrySchema<any>["context"] | Promise<VigorRetrySchema<any>["context"]>) | undefined;
|
|
1769
|
-
})[] | undefined;
|
|
1770
|
-
after?: readonly ({
|
|
1771
|
-
_mode?: "fluent" | undefined;
|
|
1772
|
-
func?: ((ctx: any) => void) | undefined;
|
|
1773
|
-
} | {
|
|
1774
|
-
_mode?: "intercept" | undefined;
|
|
1775
|
-
func?: ((ctx: any, api: Pick<VigorRetryPolicyMiddlewaresApi<any>, "throwError">) => VigorRetrySchema<any>["context"] | Promise<VigorRetrySchema<any>["context"]>) | undefined;
|
|
1776
|
-
})[] | undefined;
|
|
1777
|
-
onResult?: readonly ({
|
|
1778
|
-
_mode?: "fluent" | undefined;
|
|
1779
|
-
func?: ((res: any) => VigorRetrySchema<any>["context"]["result"]) | undefined;
|
|
1780
|
-
} | {
|
|
1781
|
-
_mode?: "intercept" | undefined;
|
|
1782
|
-
func?: ((ctx: any, api: Pick<VigorRetryPolicyMiddlewaresApi<any>, "throwError" | "setResult">) => VigorRetrySchema<any>["context"] | Promise<VigorRetrySchema<any>["context"]>) | undefined;
|
|
1783
|
-
})[] | undefined;
|
|
1784
|
-
retryIf?: readonly ({
|
|
1785
|
-
_mode?: "fluent" | undefined;
|
|
1786
|
-
func?: ((err: any) => VigorRetrySchema<any>["context"]["flags"]["doRetry"]) | undefined;
|
|
1787
|
-
} | {
|
|
1788
|
-
_mode?: "intercept" | undefined;
|
|
1789
|
-
func?: ((ctx: any, api: Pick<VigorRetryPolicyMiddlewaresApi<any>, "proceedRetry" | "cancelRetry">) => VigorRetrySchema<any>["context"] | Promise<VigorRetrySchema<any>["context"]>) | undefined;
|
|
1790
|
-
})[] | undefined;
|
|
1791
|
-
onRetry?: readonly ({
|
|
1792
|
-
_mode?: "fluent" | undefined;
|
|
1793
|
-
func?: ((err: any) => void) | undefined;
|
|
1794
|
-
} | {
|
|
1795
|
-
_mode?: "intercept" | undefined;
|
|
1796
|
-
func?: ((ctx: any, api: Pick<VigorRetryPolicyMiddlewaresApi<any>, "throwError" | "setDelay">) => VigorRetrySchema<any>["context"] | Promise<VigorRetrySchema<any>["context"]>) | undefined;
|
|
1797
|
-
})[] | undefined;
|
|
1798
|
-
onError?: readonly ({
|
|
1799
|
-
_mode?: "fluent" | undefined;
|
|
1800
|
-
func?: ((err: any) => void) | undefined;
|
|
1801
|
-
} | {
|
|
1802
|
-
_mode?: "intercept" | undefined;
|
|
1803
|
-
func?: ((ctx: any, api: Pick<VigorRetryPolicyMiddlewaresApi<any>, "throwError" | "setResult" | "proceedRestart" | "cancelRestart">) => VigorRetrySchema<any>["context"] | Promise<VigorRetrySchema<any>["context"]>) | undefined;
|
|
1804
|
-
})[] | undefined;
|
|
1805
|
-
} | undefined;
|
|
1806
|
-
algorithms?: {
|
|
1807
|
-
__brand?: VigorBrand<"Retry", "Policy<Algorithms<Constant<Schema"> | undefined;
|
|
1808
|
-
_tag?: "constant" | undefined;
|
|
1809
|
-
jitter?: number | undefined;
|
|
1810
|
-
interval?: number | undefined;
|
|
1811
|
-
_calculateDelay?: (((att: number, config: VigorRetryPolicyAlgorithmsConstantSchema<any>) => number) & ((att: number, config: any) => number)) | undefined;
|
|
1812
|
-
} | {
|
|
1813
|
-
__brand?: VigorBrand<"Retry", "Policy<Algorithms<Linear<Schema"> | undefined;
|
|
1814
|
-
_tag?: "linear" | undefined;
|
|
1815
|
-
jitter?: number | undefined;
|
|
1816
|
-
initial?: number | undefined;
|
|
1817
|
-
increment?: number | undefined;
|
|
1818
|
-
minDelay?: number | undefined;
|
|
1819
|
-
maxDelay?: number | undefined;
|
|
1820
|
-
_calculateDelay?: (((att: number, config: VigorRetryPolicyAlgorithmsLinearSchema<any>) => number) & ((att: number, config: any) => number)) | undefined;
|
|
1821
|
-
} | {
|
|
1822
|
-
__brand?: VigorBrand<"Retry", "Policy<Algorithms<Backoff<Schema"> | undefined;
|
|
1823
|
-
_tag?: "backoff" | undefined;
|
|
1824
|
-
jitter?: number | undefined;
|
|
1825
|
-
initial?: number | undefined;
|
|
1826
|
-
multiplier?: number | undefined;
|
|
1827
|
-
unit?: number | undefined;
|
|
1828
|
-
minDelay?: number | undefined;
|
|
1829
|
-
maxDelay?: number | undefined;
|
|
1830
|
-
_calculateDelay?: (((att: number, config: VigorRetryPolicyAlgorithmsBackoffSchema<any>) => number) & ((att: number, config: any) => number)) | undefined;
|
|
1831
|
-
} | {
|
|
1832
|
-
__brand?: VigorBrand<"Retry", "Policy<Algorithms<Custom<Schema"> | undefined;
|
|
1833
|
-
_tag?: "custom" | undefined;
|
|
1834
|
-
jitter?: number | undefined;
|
|
1835
|
-
minDelay?: number | undefined;
|
|
1836
|
-
maxDelay?: number | undefined;
|
|
1837
|
-
target?: (symbol & {
|
|
1838
|
-
__brand: VigorBrand<"Core", "Symbol_Empty">;
|
|
1839
|
-
}) | ((att: number) => number) | undefined;
|
|
1840
|
-
_calculateDelay?: (((att: number, config: VigorRetryPolicyAlgorithmsCustomSchema<any>) => number) & ((att: number, config: any) => number)) | undefined;
|
|
1841
|
-
} | undefined;
|
|
1842
|
-
} | undefined;
|
|
1843
|
-
context?: {
|
|
1844
|
-
__brand?: VigorBrand<"Retry", "Context<Schema"> | undefined;
|
|
1845
|
-
result?: (symbol & {
|
|
1846
|
-
__brand: VigorBrand<"Core", "Symbol_Default">;
|
|
1847
|
-
}) | undefined;
|
|
1848
|
-
error?: unknown;
|
|
1849
|
-
system?: {
|
|
1850
|
-
delay?: number | (symbol & {
|
|
1851
|
-
__brand: VigorBrand<"Core", "Symbol_Default">;
|
|
1852
|
-
}) | undefined;
|
|
1853
|
-
attempt?: number | undefined;
|
|
1854
|
-
} | undefined;
|
|
1855
|
-
flags?: {
|
|
1856
|
-
doRetry?: boolean | undefined;
|
|
1857
|
-
doRestart?: boolean | undefined;
|
|
1858
|
-
brokeRetry?: boolean | undefined;
|
|
1859
|
-
overridden?: boolean | undefined;
|
|
1860
|
-
} | undefined;
|
|
1861
|
-
record?: {
|
|
1862
|
-
[x: string]: any;
|
|
1863
|
-
} | undefined;
|
|
1864
|
-
policy?: any;
|
|
1865
|
-
} | undefined;
|
|
1268
|
+
readonly policy: {
|
|
1269
|
+
readonly settings: VigorRetryPolicySettingsSchema<any>;
|
|
1270
|
+
};
|
|
1866
1271
|
}>>>;
|
|
1867
1272
|
/** Configures the retry policy's middleware pipeline. */
|
|
1868
1273
|
middlewares<const N extends VigorDeepPartial<VigorRetryPolicyMiddlewaresSchema<T>>, R extends VigorRetrySchema<any>>(input: N | ((s: VigorRetryPolicyMiddlewares<T>) => VigorRetryPolicyMiddlewares<R>) | VigorRetryPolicyMiddlewares<R>): VigorRetry<VigorRetryIn<VigorDeepMerge<T, {
|
|
1869
|
-
|
|
1870
|
-
|
|
1871
|
-
|
|
1872
|
-
target?: (symbol & {
|
|
1873
|
-
__brand: VigorBrand<"Core", "Symbol_Empty">;
|
|
1874
|
-
}) | ((signal: AbortSignal) => any | Promise<any>) | undefined;
|
|
1875
|
-
abortSignals?: readonly {
|
|
1876
|
-
readonly aborted?: boolean | undefined;
|
|
1877
|
-
onabort?: ((this: AbortSignal, ev: Event) => any) | null | undefined;
|
|
1878
|
-
readonly reason?: any;
|
|
1879
|
-
throwIfAborted?: (() => void) | undefined;
|
|
1880
|
-
addEventListener?: {
|
|
1881
|
-
<K extends keyof AbortSignalEventMap>(type: K, listener: (this: AbortSignal, ev: AbortSignalEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
1882
|
-
(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
|
|
1883
|
-
} | undefined;
|
|
1884
|
-
removeEventListener?: {
|
|
1885
|
-
<K extends keyof AbortSignalEventMap>(type: K, listener: (this: AbortSignal, ev: AbortSignalEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
1886
|
-
(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
|
|
1887
|
-
} | undefined;
|
|
1888
|
-
dispatchEvent?: ((event: Event) => boolean) | undefined;
|
|
1889
|
-
}[] | undefined;
|
|
1890
|
-
settings?: {
|
|
1891
|
-
__brand?: VigorBrand<"Retry", "Policy<Settings<Schema"> | undefined;
|
|
1892
|
-
default?: (symbol & {
|
|
1893
|
-
__brand: VigorBrand<"Core", "Symbol_Empty">;
|
|
1894
|
-
}) | ((ctx: any) => any | Promise<any>) | undefined;
|
|
1895
|
-
maxAttempts?: number | undefined;
|
|
1896
|
-
maxRestarts?: number | undefined;
|
|
1897
|
-
timeout?: number | undefined;
|
|
1898
|
-
} | undefined;
|
|
1899
|
-
middlewares?: {
|
|
1900
|
-
__brand?: VigorBrand<"Retry", "Policy<Middlewares<Schema"> | undefined;
|
|
1901
|
-
before?: readonly ({
|
|
1902
|
-
_mode?: "fluent" | undefined;
|
|
1903
|
-
func?: ((ctx: any) => void) | undefined;
|
|
1904
|
-
} | {
|
|
1905
|
-
_mode?: "intercept" | undefined;
|
|
1906
|
-
func?: ((ctx: any, api: Pick<VigorRetryPolicyMiddlewaresApi<any>, "abort" | "throwError" | "breakRetry">) => VigorRetrySchema<any>["context"] | Promise<VigorRetrySchema<any>["context"]>) | undefined;
|
|
1907
|
-
})[] | undefined;
|
|
1908
|
-
after?: readonly ({
|
|
1909
|
-
_mode?: "fluent" | undefined;
|
|
1910
|
-
func?: ((ctx: any) => void) | undefined;
|
|
1911
|
-
} | {
|
|
1912
|
-
_mode?: "intercept" | undefined;
|
|
1913
|
-
func?: ((ctx: any, api: Pick<VigorRetryPolicyMiddlewaresApi<any>, "throwError">) => VigorRetrySchema<any>["context"] | Promise<VigorRetrySchema<any>["context"]>) | undefined;
|
|
1914
|
-
})[] | undefined;
|
|
1915
|
-
onResult?: readonly ({
|
|
1916
|
-
_mode?: "fluent" | undefined;
|
|
1917
|
-
func?: ((res: any) => VigorRetrySchema<any>["context"]["result"]) | undefined;
|
|
1918
|
-
} | {
|
|
1919
|
-
_mode?: "intercept" | undefined;
|
|
1920
|
-
func?: ((ctx: any, api: Pick<VigorRetryPolicyMiddlewaresApi<any>, "throwError" | "setResult">) => VigorRetrySchema<any>["context"] | Promise<VigorRetrySchema<any>["context"]>) | undefined;
|
|
1921
|
-
})[] | undefined;
|
|
1922
|
-
retryIf?: readonly ({
|
|
1923
|
-
_mode?: "fluent" | undefined;
|
|
1924
|
-
func?: ((err: any) => VigorRetrySchema<any>["context"]["flags"]["doRetry"]) | undefined;
|
|
1925
|
-
} | {
|
|
1926
|
-
_mode?: "intercept" | undefined;
|
|
1927
|
-
func?: ((ctx: any, api: Pick<VigorRetryPolicyMiddlewaresApi<any>, "proceedRetry" | "cancelRetry">) => VigorRetrySchema<any>["context"] | Promise<VigorRetrySchema<any>["context"]>) | undefined;
|
|
1928
|
-
})[] | undefined;
|
|
1929
|
-
onRetry?: readonly ({
|
|
1930
|
-
_mode?: "fluent" | undefined;
|
|
1931
|
-
func?: ((err: any) => void) | undefined;
|
|
1932
|
-
} | {
|
|
1933
|
-
_mode?: "intercept" | undefined;
|
|
1934
|
-
func?: ((ctx: any, api: Pick<VigorRetryPolicyMiddlewaresApi<any>, "throwError" | "setDelay">) => VigorRetrySchema<any>["context"] | Promise<VigorRetrySchema<any>["context"]>) | undefined;
|
|
1935
|
-
})[] | undefined;
|
|
1936
|
-
onError?: readonly ({
|
|
1937
|
-
_mode?: "fluent" | undefined;
|
|
1938
|
-
func?: ((err: any) => void) | undefined;
|
|
1939
|
-
} | {
|
|
1940
|
-
_mode?: "intercept" | undefined;
|
|
1941
|
-
func?: ((ctx: any, api: Pick<VigorRetryPolicyMiddlewaresApi<any>, "throwError" | "setResult" | "proceedRestart" | "cancelRestart">) => VigorRetrySchema<any>["context"] | Promise<VigorRetrySchema<any>["context"]>) | undefined;
|
|
1942
|
-
})[] | undefined;
|
|
1943
|
-
} | undefined;
|
|
1944
|
-
algorithms?: {
|
|
1945
|
-
__brand?: VigorBrand<"Retry", "Policy<Algorithms<Constant<Schema"> | undefined;
|
|
1946
|
-
_tag?: "constant" | undefined;
|
|
1947
|
-
jitter?: number | undefined;
|
|
1948
|
-
interval?: number | undefined;
|
|
1949
|
-
_calculateDelay?: (((att: number, config: VigorRetryPolicyAlgorithmsConstantSchema<any>) => number) & ((att: number, config: any) => number)) | undefined;
|
|
1950
|
-
} | {
|
|
1951
|
-
__brand?: VigorBrand<"Retry", "Policy<Algorithms<Linear<Schema"> | undefined;
|
|
1952
|
-
_tag?: "linear" | undefined;
|
|
1953
|
-
jitter?: number | undefined;
|
|
1954
|
-
initial?: number | undefined;
|
|
1955
|
-
increment?: number | undefined;
|
|
1956
|
-
minDelay?: number | undefined;
|
|
1957
|
-
maxDelay?: number | undefined;
|
|
1958
|
-
_calculateDelay?: (((att: number, config: VigorRetryPolicyAlgorithmsLinearSchema<any>) => number) & ((att: number, config: any) => number)) | undefined;
|
|
1959
|
-
} | {
|
|
1960
|
-
__brand?: VigorBrand<"Retry", "Policy<Algorithms<Backoff<Schema"> | undefined;
|
|
1961
|
-
_tag?: "backoff" | undefined;
|
|
1962
|
-
jitter?: number | undefined;
|
|
1963
|
-
initial?: number | undefined;
|
|
1964
|
-
multiplier?: number | undefined;
|
|
1965
|
-
unit?: number | undefined;
|
|
1966
|
-
minDelay?: number | undefined;
|
|
1967
|
-
maxDelay?: number | undefined;
|
|
1968
|
-
_calculateDelay?: (((att: number, config: VigorRetryPolicyAlgorithmsBackoffSchema<any>) => number) & ((att: number, config: any) => number)) | undefined;
|
|
1969
|
-
} | {
|
|
1970
|
-
__brand?: VigorBrand<"Retry", "Policy<Algorithms<Custom<Schema"> | undefined;
|
|
1971
|
-
_tag?: "custom" | undefined;
|
|
1972
|
-
jitter?: number | undefined;
|
|
1973
|
-
minDelay?: number | undefined;
|
|
1974
|
-
maxDelay?: number | undefined;
|
|
1975
|
-
target?: (symbol & {
|
|
1976
|
-
__brand: VigorBrand<"Core", "Symbol_Empty">;
|
|
1977
|
-
}) | ((att: number) => number) | undefined;
|
|
1978
|
-
_calculateDelay?: (((att: number, config: VigorRetryPolicyAlgorithmsCustomSchema<any>) => number) & ((att: number, config: any) => number)) | undefined;
|
|
1979
|
-
} | undefined;
|
|
1980
|
-
} | undefined;
|
|
1981
|
-
context?: {
|
|
1982
|
-
__brand?: VigorBrand<"Retry", "Context<Schema"> | undefined;
|
|
1983
|
-
result?: (symbol & {
|
|
1984
|
-
__brand: VigorBrand<"Core", "Symbol_Default">;
|
|
1985
|
-
}) | undefined;
|
|
1986
|
-
error?: unknown;
|
|
1987
|
-
system?: {
|
|
1988
|
-
delay?: number | (symbol & {
|
|
1989
|
-
__brand: VigorBrand<"Core", "Symbol_Default">;
|
|
1990
|
-
}) | undefined;
|
|
1991
|
-
attempt?: number | undefined;
|
|
1992
|
-
} | undefined;
|
|
1993
|
-
flags?: {
|
|
1994
|
-
doRetry?: boolean | undefined;
|
|
1995
|
-
doRestart?: boolean | undefined;
|
|
1996
|
-
brokeRetry?: boolean | undefined;
|
|
1997
|
-
overridden?: boolean | undefined;
|
|
1998
|
-
} | undefined;
|
|
1999
|
-
record?: {
|
|
2000
|
-
[x: string]: any;
|
|
2001
|
-
} | undefined;
|
|
2002
|
-
policy?: any;
|
|
2003
|
-
} | undefined;
|
|
1274
|
+
readonly policy: {
|
|
1275
|
+
readonly middlewares: VigorRetryPolicyMiddlewaresSchema<any>;
|
|
1276
|
+
};
|
|
2004
1277
|
}>>>;
|
|
2005
1278
|
/** Configures the retry policy's delay algorithm. */
|
|
2006
1279
|
algorithms<const N extends VigorDeepPartial<VigorRetryPolicyAlgorithmsSchema<T>>, R extends VigorRetrySchema<any>>(input: N | ((a: VigorRetryPolicyAlgorithms<T>) => VigorRetryPolicyAlgorithms<R> | VigorRetryPolicyAlgorithmsConstant<any>)): VigorRetry<VigorRetryIn<VigorDeepMerge<T, {
|
|
@@ -3249,1179 +2522,15 @@ declare class VigorFetch<T extends VigorFetchSchema<T> = typeof VigorFetchBase>
|
|
|
3249
2522
|
}>>>;
|
|
3250
2523
|
/** Configures the fetch policy's general settings. */
|
|
3251
2524
|
settings<const N extends VigorDeepPartial<VigorFetchPolicySettingsSchema<T>>, R extends VigorFetchSchema<any>>(input: N | ((s: VigorFetchPolicySettings<T>) => VigorFetchPolicySettings<R>) | VigorFetchPolicySettings<R>): VigorFetch<VigorFetchIn<VigorDeepMerge<T, {
|
|
3252
|
-
|
|
3253
|
-
|
|
3254
|
-
|
|
3255
|
-
method?: VigorFetchOptions["method"] | VigorEmptyType;
|
|
3256
|
-
origin?: string | (symbol & {
|
|
3257
|
-
__brand: VigorBrand<"Core", "Symbol_Empty">;
|
|
3258
|
-
}) | undefined;
|
|
3259
|
-
path?: readonly string[] | undefined;
|
|
3260
|
-
query?: readonly {
|
|
3261
|
-
[x: string]: VigorStringable | readonly VigorStringable[];
|
|
3262
|
-
}[] | undefined;
|
|
3263
|
-
hash?: string | undefined;
|
|
3264
|
-
headers?: {
|
|
3265
|
-
[x: string]: string | undefined;
|
|
3266
|
-
} | undefined;
|
|
3267
|
-
body?: string | object | (symbol & {
|
|
3268
|
-
__brand: VigorBrand<"Core", "Symbol_Empty">;
|
|
3269
|
-
}) | {
|
|
3270
|
-
readonly locked?: boolean | undefined;
|
|
3271
|
-
cancel?: ((reason?: any) => Promise<void>) | undefined;
|
|
3272
|
-
getReader?: {
|
|
3273
|
-
(options: {
|
|
3274
|
-
mode: "byob";
|
|
3275
|
-
}): ReadableStreamBYOBReader;
|
|
3276
|
-
(): ReadableStreamDefaultReader<any>;
|
|
3277
|
-
(options?: ReadableStreamGetReaderOptions): ReadableStreamReader<any>;
|
|
3278
|
-
} | undefined;
|
|
3279
|
-
pipeThrough?: (<T_1>(transform: ReadableWritablePair<T_1, any>, options?: StreamPipeOptions) => ReadableStream<T_1>) | undefined;
|
|
3280
|
-
pipeTo?: ((destination: WritableStream<any>, options?: StreamPipeOptions) => Promise<void>) | undefined;
|
|
3281
|
-
tee?: (() => [ReadableStream<any>, ReadableStream<any>]) | undefined;
|
|
3282
|
-
} | {
|
|
3283
|
-
readonly size?: number | undefined;
|
|
3284
|
-
readonly type?: string | undefined;
|
|
3285
|
-
arrayBuffer?: (() => Promise<ArrayBuffer>) | undefined;
|
|
3286
|
-
bytes?: (() => Promise<Uint8Array<ArrayBuffer>>) | undefined;
|
|
3287
|
-
slice?: ((start?: number, end?: number, contentType?: string) => Blob) | undefined;
|
|
3288
|
-
stream?: (() => ReadableStream<Uint8Array<ArrayBuffer>>) | undefined;
|
|
3289
|
-
text?: (() => Promise<string>) | undefined;
|
|
3290
|
-
} | {
|
|
3291
|
-
readonly byteLength?: number | undefined;
|
|
3292
|
-
slice?: ((begin?: number, end?: number) => ArrayBuffer) | undefined;
|
|
3293
|
-
readonly maxByteLength?: number | undefined;
|
|
3294
|
-
readonly resizable?: boolean | undefined;
|
|
3295
|
-
resize?: ((newByteLength?: number) => void) | undefined;
|
|
3296
|
-
readonly detached?: boolean | undefined;
|
|
3297
|
-
transfer?: ((newByteLength?: number) => ArrayBuffer) | undefined;
|
|
3298
|
-
transferToFixedLength?: ((newByteLength?: number) => ArrayBuffer) | undefined;
|
|
3299
|
-
readonly [Symbol.toStringTag]?: "ArrayBuffer" | undefined;
|
|
3300
|
-
} | {
|
|
3301
|
-
readonly buffer?: {
|
|
3302
|
-
readonly byteLength?: number | undefined;
|
|
3303
|
-
slice?: ((begin?: number, end?: number) => ArrayBuffer) | undefined;
|
|
3304
|
-
readonly maxByteLength?: number | undefined;
|
|
3305
|
-
readonly resizable?: boolean | undefined;
|
|
3306
|
-
resize?: ((newByteLength?: number) => void) | undefined;
|
|
3307
|
-
readonly detached?: boolean | undefined;
|
|
3308
|
-
transfer?: ((newByteLength?: number) => ArrayBuffer) | undefined;
|
|
3309
|
-
transferToFixedLength?: ((newByteLength?: number) => ArrayBuffer) | undefined;
|
|
3310
|
-
readonly [Symbol.toStringTag]?: "ArrayBuffer" | undefined;
|
|
3311
|
-
} | undefined;
|
|
3312
|
-
readonly byteLength?: number | undefined;
|
|
3313
|
-
readonly byteOffset?: number | undefined;
|
|
3314
|
-
} | {
|
|
3315
|
-
append?: {
|
|
3316
|
-
(name: string, value: string | Blob): void;
|
|
3317
|
-
(name: string, value: string): void;
|
|
3318
|
-
(name: string, blobValue: Blob, filename?: string): void;
|
|
3319
|
-
} | undefined;
|
|
3320
|
-
delete?: ((name: string) => void) | undefined;
|
|
3321
|
-
get?: ((name: string) => FormDataEntryValue | null) | undefined;
|
|
3322
|
-
getAll?: ((name: string) => FormDataEntryValue[]) | undefined;
|
|
3323
|
-
has?: ((name: string) => boolean) | undefined;
|
|
3324
|
-
set?: {
|
|
3325
|
-
(name: string, value: string | Blob): void;
|
|
3326
|
-
(name: string, value: string): void;
|
|
3327
|
-
(name: string, blobValue: Blob, filename?: string): void;
|
|
3328
|
-
} | undefined;
|
|
3329
|
-
forEach?: ((callbackfn: (value: FormDataEntryValue, key: string, parent: FormData) => void, thisArg?: any) => void) | undefined;
|
|
3330
|
-
} | {
|
|
3331
|
-
readonly size?: number | undefined;
|
|
3332
|
-
append?: ((name: string, value: string) => void) | undefined;
|
|
3333
|
-
delete?: ((name: string, value?: string) => void) | undefined;
|
|
3334
|
-
get?: ((name: string) => string | null) | undefined;
|
|
3335
|
-
getAll?: ((name: string) => string[]) | undefined;
|
|
3336
|
-
has?: ((name: string, value?: string) => boolean) | undefined;
|
|
3337
|
-
set?: ((name: string, value: string) => void) | undefined;
|
|
3338
|
-
sort?: (() => void) | undefined;
|
|
3339
|
-
toString?: (() => string) | undefined;
|
|
3340
|
-
forEach?: ((callbackfn: (value: string, key: string, parent: URLSearchParams) => void, thisArg?: any) => void) | undefined;
|
|
3341
|
-
} | null | undefined;
|
|
3342
|
-
extra?: {
|
|
3343
|
-
cache?: RequestCache | undefined;
|
|
3344
|
-
credentials?: RequestCredentials | undefined;
|
|
3345
|
-
integrity?: string | undefined;
|
|
3346
|
-
keepalive?: boolean | undefined;
|
|
3347
|
-
mode?: RequestMode | undefined;
|
|
3348
|
-
priority?: RequestPriority | undefined;
|
|
3349
|
-
redirect?: RequestRedirect | undefined;
|
|
3350
|
-
referrer?: string | undefined;
|
|
3351
|
-
referrerPolicy?: ReferrerPolicy | undefined;
|
|
3352
|
-
window?: null | undefined;
|
|
3353
|
-
} | undefined;
|
|
3354
|
-
settings?: {
|
|
3355
|
-
__brand?: VigorBrand<"Fetch", "Policy<Settings<Schema"> | undefined;
|
|
3356
|
-
retryHeaders?: readonly string[] | undefined;
|
|
3357
|
-
unretryStatus?: readonly number[] | undefined;
|
|
3358
|
-
maxRestarts?: number | undefined;
|
|
3359
|
-
default?: (symbol & {
|
|
3360
|
-
__brand: VigorBrand<"Core", "Symbol_Empty">;
|
|
3361
|
-
}) | ((ctx: any) => any | Promise<any>) | undefined;
|
|
3362
|
-
} | undefined;
|
|
3363
|
-
middlewares?: {
|
|
3364
|
-
__brand?: VigorBrand<"Fetch", "Policy<Middlewares<Schema"> | undefined;
|
|
3365
|
-
before?: readonly ({
|
|
3366
|
-
_mode?: "fluent" | undefined;
|
|
3367
|
-
func?: ((ctx: any) => void) | undefined;
|
|
3368
|
-
} | {
|
|
3369
|
-
_mode?: "intercept" | undefined;
|
|
3370
|
-
func?: ((ctx: any, api: Pick<VigorFetchPolicyMiddlewaresApi<any>, "throwError" | "setOptions" | "setHeaders" | "setBody">) => VigorFetchSchema<any>["context"] | Promise<VigorFetchSchema<any>["context"]>) | undefined;
|
|
3371
|
-
})[] | undefined;
|
|
3372
|
-
after?: readonly ({
|
|
3373
|
-
_mode?: "fluent" | undefined;
|
|
3374
|
-
func?: ((ctx: any) => void) | undefined;
|
|
3375
|
-
} | {
|
|
3376
|
-
_mode?: "intercept" | undefined;
|
|
3377
|
-
func?: ((ctx: any, api: Pick<VigorFetchPolicyMiddlewaresApi<any>, "throwError" | "setResult">) => VigorFetchSchema<any>["context"] | Promise<VigorFetchSchema<any>["context"]>) | undefined;
|
|
3378
|
-
})[] | undefined;
|
|
3379
|
-
onResult?: readonly ({
|
|
3380
|
-
_mode?: "fluent" | undefined;
|
|
3381
|
-
func?: ((res: any) => VigorFetchSchema<any>["context"]["result"]) | undefined;
|
|
3382
|
-
} | {
|
|
3383
|
-
_mode?: "intercept" | undefined;
|
|
3384
|
-
func?: ((ctx: any, api: Pick<VigorFetchPolicyMiddlewaresApi<any>, "throwError" | "setResult">) => VigorFetchSchema<any>["context"] | Promise<VigorFetchSchema<any>["context"]>) | undefined;
|
|
3385
|
-
})[] | undefined;
|
|
3386
|
-
onError?: readonly ({
|
|
3387
|
-
_mode?: "fluent" | undefined;
|
|
3388
|
-
func?: ((err: any) => void) | undefined;
|
|
3389
|
-
} | {
|
|
3390
|
-
_mode?: "intercept" | undefined;
|
|
3391
|
-
func?: ((ctx: any, api: Pick<VigorFetchPolicyMiddlewaresApi<any>, "throwError" | "setResult" | "proceedRestart" | "cancelRestart">) => VigorFetchSchema<any>["context"] | Promise<VigorFetchSchema<any>["context"]>) | undefined;
|
|
3392
|
-
})[] | undefined;
|
|
3393
|
-
} | undefined;
|
|
3394
|
-
retry?: {
|
|
3395
|
-
__brand?: VigorBrand<"Retry", "Schema"> | undefined;
|
|
3396
|
-
policy?: {
|
|
3397
|
-
__brand?: VigorBrand<"Retry", "Policy<Schema"> | undefined;
|
|
3398
|
-
target?: (symbol & {
|
|
3399
|
-
__brand: VigorBrand<"Core", "Symbol_Empty">;
|
|
3400
|
-
}) | ((signal: AbortSignal) => any | Promise<any>) | undefined;
|
|
3401
|
-
abortSignals?: readonly {
|
|
3402
|
-
readonly aborted?: boolean | undefined;
|
|
3403
|
-
onabort?: ((this: AbortSignal, ev: Event) => any) | null | undefined;
|
|
3404
|
-
readonly reason?: any;
|
|
3405
|
-
throwIfAborted?: (() => void) | undefined;
|
|
3406
|
-
addEventListener?: {
|
|
3407
|
-
<K extends keyof AbortSignalEventMap>(type: K, listener: (this: AbortSignal, ev: AbortSignalEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
3408
|
-
(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
|
|
3409
|
-
} | undefined;
|
|
3410
|
-
removeEventListener?: {
|
|
3411
|
-
<K extends keyof AbortSignalEventMap>(type: K, listener: (this: AbortSignal, ev: AbortSignalEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
3412
|
-
(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
|
|
3413
|
-
} | undefined;
|
|
3414
|
-
dispatchEvent?: ((event: Event) => boolean) | undefined;
|
|
3415
|
-
}[] | undefined;
|
|
3416
|
-
settings?: {
|
|
3417
|
-
__brand?: VigorBrand<"Retry", "Policy<Settings<Schema"> | undefined;
|
|
3418
|
-
default?: (symbol & {
|
|
3419
|
-
__brand: VigorBrand<"Core", "Symbol_Empty">;
|
|
3420
|
-
}) | ((ctx: any) => any | Promise<any>) | undefined;
|
|
3421
|
-
maxAttempts?: number | undefined;
|
|
3422
|
-
maxRestarts?: number | undefined;
|
|
3423
|
-
timeout?: number | undefined;
|
|
3424
|
-
} | undefined;
|
|
3425
|
-
middlewares?: {
|
|
3426
|
-
__brand?: VigorBrand<"Retry", "Policy<Middlewares<Schema"> | undefined;
|
|
3427
|
-
before?: readonly ({
|
|
3428
|
-
_mode?: "fluent" | undefined;
|
|
3429
|
-
func?: ((ctx: any) => void) | undefined;
|
|
3430
|
-
} | {
|
|
3431
|
-
_mode?: "intercept" | undefined;
|
|
3432
|
-
func?: ((ctx: any, api: Pick<VigorRetryPolicyMiddlewaresApi<any>, "abort" | "throwError" | "breakRetry">) => VigorRetrySchema<any>["context"] | Promise<VigorRetrySchema<any>["context"]>) | undefined;
|
|
3433
|
-
})[] | undefined;
|
|
3434
|
-
after?: readonly ({
|
|
3435
|
-
_mode?: "fluent" | undefined;
|
|
3436
|
-
func?: ((ctx: any) => void) | undefined;
|
|
3437
|
-
} | {
|
|
3438
|
-
_mode?: "intercept" | undefined;
|
|
3439
|
-
func?: ((ctx: any, api: Pick<VigorRetryPolicyMiddlewaresApi<any>, "throwError">) => VigorRetrySchema<any>["context"] | Promise<VigorRetrySchema<any>["context"]>) | undefined;
|
|
3440
|
-
})[] | undefined;
|
|
3441
|
-
onResult?: readonly ({
|
|
3442
|
-
_mode?: "fluent" | undefined;
|
|
3443
|
-
func?: ((res: any) => VigorRetrySchema<any>["context"]["result"]) | undefined;
|
|
3444
|
-
} | {
|
|
3445
|
-
_mode?: "intercept" | undefined;
|
|
3446
|
-
func?: ((ctx: any, api: Pick<VigorRetryPolicyMiddlewaresApi<any>, "throwError" | "setResult">) => VigorRetrySchema<any>["context"] | Promise<VigorRetrySchema<any>["context"]>) | undefined;
|
|
3447
|
-
})[] | undefined;
|
|
3448
|
-
retryIf?: readonly ({
|
|
3449
|
-
_mode?: "fluent" | undefined;
|
|
3450
|
-
func?: ((err: any) => VigorRetrySchema<any>["context"]["flags"]["doRetry"]) | undefined;
|
|
3451
|
-
} | {
|
|
3452
|
-
_mode?: "intercept" | undefined;
|
|
3453
|
-
func?: ((ctx: any, api: Pick<VigorRetryPolicyMiddlewaresApi<any>, "proceedRetry" | "cancelRetry">) => VigorRetrySchema<any>["context"] | Promise<VigorRetrySchema<any>["context"]>) | undefined;
|
|
3454
|
-
})[] | undefined;
|
|
3455
|
-
onRetry?: readonly ({
|
|
3456
|
-
_mode?: "fluent" | undefined;
|
|
3457
|
-
func?: ((err: any) => void) | undefined;
|
|
3458
|
-
} | {
|
|
3459
|
-
_mode?: "intercept" | undefined;
|
|
3460
|
-
func?: ((ctx: any, api: Pick<VigorRetryPolicyMiddlewaresApi<any>, "throwError" | "setDelay">) => VigorRetrySchema<any>["context"] | Promise<VigorRetrySchema<any>["context"]>) | undefined;
|
|
3461
|
-
})[] | undefined;
|
|
3462
|
-
onError?: readonly ({
|
|
3463
|
-
_mode?: "fluent" | undefined;
|
|
3464
|
-
func?: ((err: any) => void) | undefined;
|
|
3465
|
-
} | {
|
|
3466
|
-
_mode?: "intercept" | undefined;
|
|
3467
|
-
func?: ((ctx: any, api: Pick<VigorRetryPolicyMiddlewaresApi<any>, "throwError" | "setResult" | "proceedRestart" | "cancelRestart">) => VigorRetrySchema<any>["context"] | Promise<VigorRetrySchema<any>["context"]>) | undefined;
|
|
3468
|
-
})[] | undefined;
|
|
3469
|
-
} | undefined;
|
|
3470
|
-
algorithms?: {
|
|
3471
|
-
__brand?: VigorBrand<"Retry", "Policy<Algorithms<Constant<Schema"> | undefined;
|
|
3472
|
-
_tag?: "constant" | undefined;
|
|
3473
|
-
jitter?: number | undefined;
|
|
3474
|
-
interval?: number | undefined;
|
|
3475
|
-
_calculateDelay?: (((att: number, config: VigorRetryPolicyAlgorithmsConstantSchema<any>) => number) & ((att: number, config: any) => number)) | undefined;
|
|
3476
|
-
} | {
|
|
3477
|
-
__brand?: VigorBrand<"Retry", "Policy<Algorithms<Linear<Schema"> | undefined;
|
|
3478
|
-
_tag?: "linear" | undefined;
|
|
3479
|
-
jitter?: number | undefined;
|
|
3480
|
-
initial?: number | undefined;
|
|
3481
|
-
increment?: number | undefined;
|
|
3482
|
-
minDelay?: number | undefined;
|
|
3483
|
-
maxDelay?: number | undefined;
|
|
3484
|
-
_calculateDelay?: (((att: number, config: VigorRetryPolicyAlgorithmsLinearSchema<any>) => number) & ((att: number, config: any) => number)) | undefined;
|
|
3485
|
-
} | {
|
|
3486
|
-
__brand?: VigorBrand<"Retry", "Policy<Algorithms<Backoff<Schema"> | undefined;
|
|
3487
|
-
_tag?: "backoff" | undefined;
|
|
3488
|
-
jitter?: number | undefined;
|
|
3489
|
-
initial?: number | undefined;
|
|
3490
|
-
multiplier?: number | undefined;
|
|
3491
|
-
unit?: number | undefined;
|
|
3492
|
-
minDelay?: number | undefined;
|
|
3493
|
-
maxDelay?: number | undefined;
|
|
3494
|
-
_calculateDelay?: (((att: number, config: VigorRetryPolicyAlgorithmsBackoffSchema<any>) => number) & ((att: number, config: any) => number)) | undefined;
|
|
3495
|
-
} | {
|
|
3496
|
-
__brand?: VigorBrand<"Retry", "Policy<Algorithms<Custom<Schema"> | undefined;
|
|
3497
|
-
_tag?: "custom" | undefined;
|
|
3498
|
-
jitter?: number | undefined;
|
|
3499
|
-
minDelay?: number | undefined;
|
|
3500
|
-
maxDelay?: number | undefined;
|
|
3501
|
-
target?: (symbol & {
|
|
3502
|
-
__brand: VigorBrand<"Core", "Symbol_Empty">;
|
|
3503
|
-
}) | ((att: number) => number) | undefined;
|
|
3504
|
-
_calculateDelay?: (((att: number, config: VigorRetryPolicyAlgorithmsCustomSchema<any>) => number) & ((att: number, config: any) => number)) | undefined;
|
|
3505
|
-
} | undefined;
|
|
3506
|
-
} | undefined;
|
|
3507
|
-
context?: {
|
|
3508
|
-
__brand?: VigorBrand<"Retry", "Context<Schema"> | undefined;
|
|
3509
|
-
result?: (symbol & {
|
|
3510
|
-
__brand: VigorBrand<"Core", "Symbol_Default">;
|
|
3511
|
-
}) | undefined;
|
|
3512
|
-
error?: unknown;
|
|
3513
|
-
system?: {
|
|
3514
|
-
delay?: number | (symbol & {
|
|
3515
|
-
__brand: VigorBrand<"Core", "Symbol_Default">;
|
|
3516
|
-
}) | undefined;
|
|
3517
|
-
attempt?: number | undefined;
|
|
3518
|
-
} | undefined;
|
|
3519
|
-
flags?: {
|
|
3520
|
-
doRetry?: boolean | undefined;
|
|
3521
|
-
doRestart?: boolean | undefined;
|
|
3522
|
-
brokeRetry?: boolean | undefined;
|
|
3523
|
-
overridden?: boolean | undefined;
|
|
3524
|
-
} | undefined;
|
|
3525
|
-
record?: {
|
|
3526
|
-
[x: string]: any;
|
|
3527
|
-
} | undefined;
|
|
3528
|
-
policy?: any;
|
|
3529
|
-
} | undefined;
|
|
3530
|
-
} | undefined;
|
|
3531
|
-
parse?: {
|
|
3532
|
-
__brand?: VigorBrand<"Parse", "Schema"> | undefined;
|
|
3533
|
-
policy?: {
|
|
3534
|
-
__brand?: VigorBrand<"Parse", "Policy<Schema"> | undefined;
|
|
3535
|
-
target?: (symbol & {
|
|
3536
|
-
__brand: VigorBrand<"Core", "Symbol_Default">;
|
|
3537
|
-
}) | {
|
|
3538
|
-
readonly headers?: {
|
|
3539
|
-
append?: ((name: string, value: string) => void) | undefined;
|
|
3540
|
-
delete?: ((name: string) => void) | undefined;
|
|
3541
|
-
get?: ((name: string) => string | null) | undefined;
|
|
3542
|
-
getSetCookie?: (() => string[]) | undefined;
|
|
3543
|
-
has?: ((name: string) => boolean) | undefined;
|
|
3544
|
-
set?: ((name: string, value: string) => void) | undefined;
|
|
3545
|
-
forEach?: ((callbackfn: (value: string, key: string, parent: Headers) => void, thisArg?: any) => void) | undefined;
|
|
3546
|
-
} | undefined;
|
|
3547
|
-
readonly ok?: boolean | undefined;
|
|
3548
|
-
readonly redirected?: boolean | undefined;
|
|
3549
|
-
readonly status?: number | undefined;
|
|
3550
|
-
readonly statusText?: string | undefined;
|
|
3551
|
-
readonly type?: ResponseType | undefined;
|
|
3552
|
-
readonly url?: string | undefined;
|
|
3553
|
-
clone?: (() => Response) | undefined;
|
|
3554
|
-
readonly body?: {
|
|
3555
|
-
readonly locked?: boolean | undefined;
|
|
3556
|
-
cancel?: ((reason?: any) => Promise<void>) | undefined;
|
|
3557
|
-
getReader?: {
|
|
3558
|
-
(options: {
|
|
3559
|
-
mode: "byob";
|
|
3560
|
-
}): ReadableStreamBYOBReader;
|
|
3561
|
-
(): ReadableStreamDefaultReader<Uint8Array<ArrayBuffer>>;
|
|
3562
|
-
(options?: ReadableStreamGetReaderOptions): ReadableStreamReader<Uint8Array<ArrayBuffer>>;
|
|
3563
|
-
} | undefined;
|
|
3564
|
-
pipeThrough?: (<T_1>(transform: ReadableWritablePair<T_1, Uint8Array<ArrayBuffer>>, options?: StreamPipeOptions) => ReadableStream<T_1>) | undefined;
|
|
3565
|
-
pipeTo?: ((destination: WritableStream<Uint8Array<ArrayBuffer>>, options?: StreamPipeOptions) => Promise<void>) | undefined;
|
|
3566
|
-
tee?: (() => [ReadableStream<Uint8Array<ArrayBuffer>>, ReadableStream<Uint8Array<ArrayBuffer>>]) | undefined;
|
|
3567
|
-
} | null | undefined;
|
|
3568
|
-
readonly bodyUsed?: boolean | undefined;
|
|
3569
|
-
arrayBuffer?: (() => Promise<ArrayBuffer>) | undefined;
|
|
3570
|
-
blob?: (() => Promise<Blob>) | undefined;
|
|
3571
|
-
bytes?: (() => Promise<Uint8Array<ArrayBuffer>>) | undefined;
|
|
3572
|
-
formData?: (() => Promise<FormData>) | undefined;
|
|
3573
|
-
json?: (() => Promise<any>) | undefined;
|
|
3574
|
-
text?: (() => Promise<string>) | undefined;
|
|
3575
|
-
} | undefined;
|
|
3576
|
-
settings?: {
|
|
3577
|
-
__brand?: VigorBrand<"Parse", "Policy<Settings<Schema"> | undefined;
|
|
3578
|
-
raw?: boolean | undefined;
|
|
3579
|
-
default?: (symbol & {
|
|
3580
|
-
__brand: VigorBrand<"Core", "Symbol_Empty">;
|
|
3581
|
-
}) | ((ctx: any) => any | Promise<any>) | undefined;
|
|
3582
|
-
maxRestarts?: number | undefined;
|
|
3583
|
-
} | undefined;
|
|
3584
|
-
middlewares?: {
|
|
3585
|
-
__brand?: VigorBrand<"Parse", "Policy<Middlewares<Schema"> | undefined;
|
|
3586
|
-
before?: readonly ({
|
|
3587
|
-
_mode?: "fluent" | undefined;
|
|
3588
|
-
func?: ((ctx: any) => void) | undefined;
|
|
3589
|
-
} | {
|
|
3590
|
-
_mode?: "intercept" | undefined;
|
|
3591
|
-
func?: ((ctx: any, api: Pick<VigorParsePolicyMiddlewaresApi<any>, "throwError">) => VigorParseSchema<any>["context"] | Promise<VigorParseSchema<any>["context"]>) | undefined;
|
|
3592
|
-
})[] | undefined;
|
|
3593
|
-
after?: readonly ({
|
|
3594
|
-
_mode?: "fluent" | undefined;
|
|
3595
|
-
func?: ((ctx: any) => void) | undefined;
|
|
3596
|
-
} | {
|
|
3597
|
-
_mode?: "intercept" | undefined;
|
|
3598
|
-
func?: ((ctx: any, api: Pick<VigorParsePolicyMiddlewaresApi<any>, "throwError" | "setResult">) => VigorParseSchema<any>["context"] | Promise<VigorParseSchema<any>["context"]>) | undefined;
|
|
3599
|
-
})[] | undefined;
|
|
3600
|
-
onResult?: readonly ({
|
|
3601
|
-
_mode?: "fluent" | undefined;
|
|
3602
|
-
func?: ((res: any) => VigorParseSchema<any>["context"]["result"]) | undefined;
|
|
3603
|
-
} | {
|
|
3604
|
-
_mode?: "intercept" | undefined;
|
|
3605
|
-
func?: ((ctx: any, api: Pick<VigorParsePolicyMiddlewaresApi<any>, "throwError" | "setResult">) => VigorParseSchema<any>["context"] | Promise<VigorParseSchema<any>["context"]>) | undefined;
|
|
3606
|
-
})[] | undefined;
|
|
3607
|
-
onError?: readonly ({
|
|
3608
|
-
_mode?: "fluent" | undefined;
|
|
3609
|
-
func?: ((err: any) => void) | undefined;
|
|
3610
|
-
} | {
|
|
3611
|
-
_mode?: "intercept" | undefined;
|
|
3612
|
-
func?: ((ctx: any, api: Pick<VigorParsePolicyMiddlewaresApi<any>, "throwError" | "setResult" | "proceedRestart" | "cancelRestart">) => VigorParseSchema<any>["context"] | Promise<VigorParseSchema<any>["context"]>) | undefined;
|
|
3613
|
-
})[] | undefined;
|
|
3614
|
-
} | undefined;
|
|
3615
|
-
strategies?: {
|
|
3616
|
-
__brand?: VigorBrand<"Parse", "Policy<Strategies<Schema"> | undefined;
|
|
3617
|
-
funcs?: readonly VigorParseStrategyFunc[] | undefined;
|
|
3618
|
-
} | undefined;
|
|
3619
|
-
} | undefined;
|
|
3620
|
-
context?: {
|
|
3621
|
-
__brand?: VigorBrand<"Parse", "Context<Schema"> | undefined;
|
|
3622
|
-
result?: unknown | VigorDefaultType;
|
|
3623
|
-
error?: unknown;
|
|
3624
|
-
response?: (symbol & {
|
|
3625
|
-
__brand: VigorBrand<"Core", "Symbol_Default">;
|
|
3626
|
-
}) | {
|
|
3627
|
-
readonly headers?: {
|
|
3628
|
-
append?: ((name: string, value: string) => void) | undefined;
|
|
3629
|
-
delete?: ((name: string) => void) | undefined;
|
|
3630
|
-
get?: ((name: string) => string | null) | undefined;
|
|
3631
|
-
getSetCookie?: (() => string[]) | undefined;
|
|
3632
|
-
has?: ((name: string) => boolean) | undefined;
|
|
3633
|
-
set?: ((name: string, value: string) => void) | undefined;
|
|
3634
|
-
forEach?: ((callbackfn: (value: string, key: string, parent: Headers) => void, thisArg?: any) => void) | undefined;
|
|
3635
|
-
} | undefined;
|
|
3636
|
-
readonly ok?: boolean | undefined;
|
|
3637
|
-
readonly redirected?: boolean | undefined;
|
|
3638
|
-
readonly status?: number | undefined;
|
|
3639
|
-
readonly statusText?: string | undefined;
|
|
3640
|
-
readonly type?: ResponseType | undefined;
|
|
3641
|
-
readonly url?: string | undefined;
|
|
3642
|
-
clone?: (() => Response) | undefined;
|
|
3643
|
-
readonly body?: {
|
|
3644
|
-
readonly locked?: boolean | undefined;
|
|
3645
|
-
cancel?: ((reason?: any) => Promise<void>) | undefined;
|
|
3646
|
-
getReader?: {
|
|
3647
|
-
(options: {
|
|
3648
|
-
mode: "byob";
|
|
3649
|
-
}): ReadableStreamBYOBReader;
|
|
3650
|
-
(): ReadableStreamDefaultReader<Uint8Array<ArrayBuffer>>;
|
|
3651
|
-
(options?: ReadableStreamGetReaderOptions): ReadableStreamReader<Uint8Array<ArrayBuffer>>;
|
|
3652
|
-
} | undefined;
|
|
3653
|
-
pipeThrough?: (<T_1>(transform: ReadableWritablePair<T_1, Uint8Array<ArrayBuffer>>, options?: StreamPipeOptions) => ReadableStream<T_1>) | undefined;
|
|
3654
|
-
pipeTo?: ((destination: WritableStream<Uint8Array<ArrayBuffer>>, options?: StreamPipeOptions) => Promise<void>) | undefined;
|
|
3655
|
-
tee?: (() => [ReadableStream<Uint8Array<ArrayBuffer>>, ReadableStream<Uint8Array<ArrayBuffer>>]) | undefined;
|
|
3656
|
-
} | null | undefined;
|
|
3657
|
-
readonly bodyUsed?: boolean | undefined;
|
|
3658
|
-
arrayBuffer?: (() => Promise<ArrayBuffer>) | undefined;
|
|
3659
|
-
blob?: (() => Promise<Blob>) | undefined;
|
|
3660
|
-
bytes?: (() => Promise<Uint8Array<ArrayBuffer>>) | undefined;
|
|
3661
|
-
formData?: (() => Promise<FormData>) | undefined;
|
|
3662
|
-
json?: (() => Promise<any>) | undefined;
|
|
3663
|
-
text?: (() => Promise<string>) | undefined;
|
|
3664
|
-
} | undefined;
|
|
3665
|
-
flags?: {
|
|
3666
|
-
overrided?: boolean | undefined;
|
|
3667
|
-
restarted?: boolean | undefined;
|
|
3668
|
-
} | undefined;
|
|
3669
|
-
record?: {
|
|
3670
|
-
[x: string]: any;
|
|
3671
|
-
} | undefined;
|
|
3672
|
-
policy?: any;
|
|
3673
|
-
} | undefined;
|
|
3674
|
-
} | undefined;
|
|
3675
|
-
} | undefined;
|
|
3676
|
-
context?: {
|
|
3677
|
-
__brand?: VigorBrand<"Fetch", "Context<Schema"> | undefined;
|
|
3678
|
-
href?: string | undefined;
|
|
3679
|
-
response?: (symbol & {
|
|
3680
|
-
__brand: VigorBrand<"Core", "Symbol_Default">;
|
|
3681
|
-
}) | {
|
|
3682
|
-
readonly headers?: {
|
|
3683
|
-
append?: ((name: string, value: string) => void) | undefined;
|
|
3684
|
-
delete?: ((name: string) => void) | undefined;
|
|
3685
|
-
get?: ((name: string) => string | null) | undefined;
|
|
3686
|
-
getSetCookie?: (() => string[]) | undefined;
|
|
3687
|
-
has?: ((name: string) => boolean) | undefined;
|
|
3688
|
-
set?: ((name: string, value: string) => void) | undefined;
|
|
3689
|
-
forEach?: ((callbackfn: (value: string, key: string, parent: Headers) => void, thisArg?: any) => void) | undefined;
|
|
3690
|
-
} | undefined;
|
|
3691
|
-
readonly ok?: boolean | undefined;
|
|
3692
|
-
readonly redirected?: boolean | undefined;
|
|
3693
|
-
readonly status?: number | undefined;
|
|
3694
|
-
readonly statusText?: string | undefined;
|
|
3695
|
-
readonly type?: ResponseType | undefined;
|
|
3696
|
-
readonly url?: string | undefined;
|
|
3697
|
-
clone?: (() => Response) | undefined;
|
|
3698
|
-
readonly body?: {
|
|
3699
|
-
readonly locked?: boolean | undefined;
|
|
3700
|
-
cancel?: ((reason?: any) => Promise<void>) | undefined;
|
|
3701
|
-
getReader?: {
|
|
3702
|
-
(options: {
|
|
3703
|
-
mode: "byob";
|
|
3704
|
-
}): ReadableStreamBYOBReader;
|
|
3705
|
-
(): ReadableStreamDefaultReader<Uint8Array<ArrayBuffer>>;
|
|
3706
|
-
(options?: ReadableStreamGetReaderOptions): ReadableStreamReader<Uint8Array<ArrayBuffer>>;
|
|
3707
|
-
} | undefined;
|
|
3708
|
-
pipeThrough?: (<T_1>(transform: ReadableWritablePair<T_1, Uint8Array<ArrayBuffer>>, options?: StreamPipeOptions) => ReadableStream<T_1>) | undefined;
|
|
3709
|
-
pipeTo?: ((destination: WritableStream<Uint8Array<ArrayBuffer>>, options?: StreamPipeOptions) => Promise<void>) | undefined;
|
|
3710
|
-
tee?: (() => [ReadableStream<Uint8Array<ArrayBuffer>>, ReadableStream<Uint8Array<ArrayBuffer>>]) | undefined;
|
|
3711
|
-
} | null | undefined;
|
|
3712
|
-
readonly bodyUsed?: boolean | undefined;
|
|
3713
|
-
arrayBuffer?: (() => Promise<ArrayBuffer>) | undefined;
|
|
3714
|
-
blob?: (() => Promise<Blob>) | undefined;
|
|
3715
|
-
bytes?: (() => Promise<Uint8Array<ArrayBuffer>>) | undefined;
|
|
3716
|
-
formData?: (() => Promise<FormData>) | undefined;
|
|
3717
|
-
json?: (() => Promise<any>) | undefined;
|
|
3718
|
-
text?: (() => Promise<string>) | undefined;
|
|
3719
|
-
} | undefined;
|
|
3720
|
-
result?: unknown | VigorDefaultType;
|
|
3721
|
-
error?: unknown;
|
|
3722
|
-
options?: (symbol & {
|
|
3723
|
-
__brand: VigorBrand<"Core", "Symbol_Default">;
|
|
3724
|
-
}) | {
|
|
3725
|
-
cache?: RequestCache | undefined;
|
|
3726
|
-
credentials?: RequestCredentials | undefined;
|
|
3727
|
-
integrity?: string | undefined;
|
|
3728
|
-
keepalive?: boolean | undefined;
|
|
3729
|
-
mode?: RequestMode | undefined;
|
|
3730
|
-
priority?: RequestPriority | undefined;
|
|
3731
|
-
redirect?: RequestRedirect | undefined;
|
|
3732
|
-
referrer?: string | undefined;
|
|
3733
|
-
referrerPolicy?: ReferrerPolicy | undefined;
|
|
3734
|
-
window?: null | undefined;
|
|
3735
|
-
method?: "GET" | "POST" | "PUT" | "PATCH" | "DELETE" | "HEAD" | "OPTIONS" | "CONNECT" | "TRACE" | undefined;
|
|
3736
|
-
headers?: {
|
|
3737
|
-
[x: string]: string | undefined;
|
|
3738
|
-
} | undefined;
|
|
3739
|
-
body?: string | {
|
|
3740
|
-
readonly locked?: boolean | undefined;
|
|
3741
|
-
cancel?: ((reason?: any) => Promise<void>) | undefined;
|
|
3742
|
-
getReader?: {
|
|
3743
|
-
(options: {
|
|
3744
|
-
mode: "byob";
|
|
3745
|
-
}): ReadableStreamBYOBReader;
|
|
3746
|
-
(): ReadableStreamDefaultReader<any>;
|
|
3747
|
-
(options?: ReadableStreamGetReaderOptions): ReadableStreamReader<any>;
|
|
3748
|
-
} | undefined;
|
|
3749
|
-
pipeThrough?: (<T_1>(transform: ReadableWritablePair<T_1, any>, options?: StreamPipeOptions) => ReadableStream<T_1>) | undefined;
|
|
3750
|
-
pipeTo?: ((destination: WritableStream<any>, options?: StreamPipeOptions) => Promise<void>) | undefined;
|
|
3751
|
-
tee?: (() => [ReadableStream<any>, ReadableStream<any>]) | undefined;
|
|
3752
|
-
} | {
|
|
3753
|
-
readonly size?: number | undefined;
|
|
3754
|
-
readonly type?: string | undefined;
|
|
3755
|
-
arrayBuffer?: (() => Promise<ArrayBuffer>) | undefined;
|
|
3756
|
-
bytes?: (() => Promise<Uint8Array<ArrayBuffer>>) | undefined;
|
|
3757
|
-
slice?: ((start?: number, end?: number, contentType?: string) => Blob) | undefined;
|
|
3758
|
-
stream?: (() => ReadableStream<Uint8Array<ArrayBuffer>>) | undefined;
|
|
3759
|
-
text?: (() => Promise<string>) | undefined;
|
|
3760
|
-
} | {
|
|
3761
|
-
readonly byteLength?: number | undefined;
|
|
3762
|
-
slice?: ((begin?: number, end?: number) => ArrayBuffer) | undefined;
|
|
3763
|
-
readonly maxByteLength?: number | undefined;
|
|
3764
|
-
readonly resizable?: boolean | undefined;
|
|
3765
|
-
resize?: ((newByteLength?: number) => void) | undefined;
|
|
3766
|
-
readonly detached?: boolean | undefined;
|
|
3767
|
-
transfer?: ((newByteLength?: number) => ArrayBuffer) | undefined;
|
|
3768
|
-
transferToFixedLength?: ((newByteLength?: number) => ArrayBuffer) | undefined;
|
|
3769
|
-
readonly [Symbol.toStringTag]?: "ArrayBuffer" | undefined;
|
|
3770
|
-
} | {
|
|
3771
|
-
readonly buffer?: {
|
|
3772
|
-
readonly byteLength?: number | undefined;
|
|
3773
|
-
slice?: ((begin?: number, end?: number) => ArrayBuffer) | undefined;
|
|
3774
|
-
readonly maxByteLength?: number | undefined;
|
|
3775
|
-
readonly resizable?: boolean | undefined;
|
|
3776
|
-
resize?: ((newByteLength?: number) => void) | undefined;
|
|
3777
|
-
readonly detached?: boolean | undefined;
|
|
3778
|
-
transfer?: ((newByteLength?: number) => ArrayBuffer) | undefined;
|
|
3779
|
-
transferToFixedLength?: ((newByteLength?: number) => ArrayBuffer) | undefined;
|
|
3780
|
-
readonly [Symbol.toStringTag]?: "ArrayBuffer" | undefined;
|
|
3781
|
-
} | undefined;
|
|
3782
|
-
readonly byteLength?: number | undefined;
|
|
3783
|
-
readonly byteOffset?: number | undefined;
|
|
3784
|
-
} | {
|
|
3785
|
-
append?: {
|
|
3786
|
-
(name: string, value: string | Blob): void;
|
|
3787
|
-
(name: string, value: string): void;
|
|
3788
|
-
(name: string, blobValue: Blob, filename?: string): void;
|
|
3789
|
-
} | undefined;
|
|
3790
|
-
delete?: ((name: string) => void) | undefined;
|
|
3791
|
-
get?: ((name: string) => FormDataEntryValue | null) | undefined;
|
|
3792
|
-
getAll?: ((name: string) => FormDataEntryValue[]) | undefined;
|
|
3793
|
-
has?: ((name: string) => boolean) | undefined;
|
|
3794
|
-
set?: {
|
|
3795
|
-
(name: string, value: string | Blob): void;
|
|
3796
|
-
(name: string, value: string): void;
|
|
3797
|
-
(name: string, blobValue: Blob, filename?: string): void;
|
|
3798
|
-
} | undefined;
|
|
3799
|
-
forEach?: ((callbackfn: (value: FormDataEntryValue, key: string, parent: FormData) => void, thisArg?: any) => void) | undefined;
|
|
3800
|
-
} | {
|
|
3801
|
-
readonly size?: number | undefined;
|
|
3802
|
-
append?: ((name: string, value: string) => void) | undefined;
|
|
3803
|
-
delete?: ((name: string, value?: string) => void) | undefined;
|
|
3804
|
-
get?: ((name: string) => string | null) | undefined;
|
|
3805
|
-
getAll?: ((name: string) => string[]) | undefined;
|
|
3806
|
-
has?: ((name: string, value?: string) => boolean) | undefined;
|
|
3807
|
-
set?: ((name: string, value: string) => void) | undefined;
|
|
3808
|
-
sort?: (() => void) | undefined;
|
|
3809
|
-
toString?: (() => string) | undefined;
|
|
3810
|
-
forEach?: ((callbackfn: (value: string, key: string, parent: URLSearchParams) => void, thisArg?: any) => void) | undefined;
|
|
3811
|
-
} | null | undefined;
|
|
3812
|
-
signal?: {
|
|
3813
|
-
readonly aborted?: boolean | undefined;
|
|
3814
|
-
onabort?: ((this: AbortSignal, ev: Event) => any) | null | undefined;
|
|
3815
|
-
readonly reason?: any;
|
|
3816
|
-
throwIfAborted?: (() => void) | undefined;
|
|
3817
|
-
addEventListener?: {
|
|
3818
|
-
<K extends keyof AbortSignalEventMap>(type: K, listener: (this: AbortSignal, ev: AbortSignalEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
3819
|
-
(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
|
|
3820
|
-
} | undefined;
|
|
3821
|
-
removeEventListener?: {
|
|
3822
|
-
<K extends keyof AbortSignalEventMap>(type: K, listener: (this: AbortSignal, ev: AbortSignalEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
3823
|
-
(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
|
|
3824
|
-
} | undefined;
|
|
3825
|
-
dispatchEvent?: ((event: Event) => boolean) | undefined;
|
|
3826
|
-
} | undefined;
|
|
3827
|
-
} | undefined;
|
|
3828
|
-
flags?: {
|
|
3829
|
-
overrided?: boolean | undefined;
|
|
3830
|
-
restarted?: boolean | undefined;
|
|
3831
|
-
} | undefined;
|
|
3832
|
-
record?: {
|
|
3833
|
-
[x: string]: any;
|
|
3834
|
-
} | undefined;
|
|
3835
|
-
policy?: any;
|
|
3836
|
-
} | undefined;
|
|
2525
|
+
readonly policy: {
|
|
2526
|
+
readonly settings: VigorFetchPolicySettingsSchema<any>;
|
|
2527
|
+
};
|
|
3837
2528
|
}>>>;
|
|
3838
2529
|
/** Configures the fetch policy's middleware pipeline. */
|
|
3839
2530
|
middlewares<const N extends VigorDeepPartial<VigorFetchPolicyMiddlewaresSchema<T>>, R extends VigorFetchSchema<any>>(input: N | ((s: VigorFetchPolicyMiddlewares<T>) => VigorFetchPolicyMiddlewares<R>) | VigorFetchPolicyMiddlewares<R>): VigorFetch<VigorFetchIn<VigorDeepMerge<T, {
|
|
3840
|
-
|
|
3841
|
-
|
|
3842
|
-
|
|
3843
|
-
method?: VigorFetchOptions["method"] | VigorEmptyType;
|
|
3844
|
-
origin?: string | (symbol & {
|
|
3845
|
-
__brand: VigorBrand<"Core", "Symbol_Empty">;
|
|
3846
|
-
}) | undefined;
|
|
3847
|
-
path?: readonly string[] | undefined;
|
|
3848
|
-
query?: readonly {
|
|
3849
|
-
[x: string]: VigorStringable | readonly VigorStringable[];
|
|
3850
|
-
}[] | undefined;
|
|
3851
|
-
hash?: string | undefined;
|
|
3852
|
-
headers?: {
|
|
3853
|
-
[x: string]: string | undefined;
|
|
3854
|
-
} | undefined;
|
|
3855
|
-
body?: string | object | (symbol & {
|
|
3856
|
-
__brand: VigorBrand<"Core", "Symbol_Empty">;
|
|
3857
|
-
}) | {
|
|
3858
|
-
readonly locked?: boolean | undefined;
|
|
3859
|
-
cancel?: ((reason?: any) => Promise<void>) | undefined;
|
|
3860
|
-
getReader?: {
|
|
3861
|
-
(options: {
|
|
3862
|
-
mode: "byob";
|
|
3863
|
-
}): ReadableStreamBYOBReader;
|
|
3864
|
-
(): ReadableStreamDefaultReader<any>;
|
|
3865
|
-
(options?: ReadableStreamGetReaderOptions): ReadableStreamReader<any>;
|
|
3866
|
-
} | undefined;
|
|
3867
|
-
pipeThrough?: (<T_1>(transform: ReadableWritablePair<T_1, any>, options?: StreamPipeOptions) => ReadableStream<T_1>) | undefined;
|
|
3868
|
-
pipeTo?: ((destination: WritableStream<any>, options?: StreamPipeOptions) => Promise<void>) | undefined;
|
|
3869
|
-
tee?: (() => [ReadableStream<any>, ReadableStream<any>]) | undefined;
|
|
3870
|
-
} | {
|
|
3871
|
-
readonly size?: number | undefined;
|
|
3872
|
-
readonly type?: string | undefined;
|
|
3873
|
-
arrayBuffer?: (() => Promise<ArrayBuffer>) | undefined;
|
|
3874
|
-
bytes?: (() => Promise<Uint8Array<ArrayBuffer>>) | undefined;
|
|
3875
|
-
slice?: ((start?: number, end?: number, contentType?: string) => Blob) | undefined;
|
|
3876
|
-
stream?: (() => ReadableStream<Uint8Array<ArrayBuffer>>) | undefined;
|
|
3877
|
-
text?: (() => Promise<string>) | undefined;
|
|
3878
|
-
} | {
|
|
3879
|
-
readonly byteLength?: number | undefined;
|
|
3880
|
-
slice?: ((begin?: number, end?: number) => ArrayBuffer) | undefined;
|
|
3881
|
-
readonly maxByteLength?: number | undefined;
|
|
3882
|
-
readonly resizable?: boolean | undefined;
|
|
3883
|
-
resize?: ((newByteLength?: number) => void) | undefined;
|
|
3884
|
-
readonly detached?: boolean | undefined;
|
|
3885
|
-
transfer?: ((newByteLength?: number) => ArrayBuffer) | undefined;
|
|
3886
|
-
transferToFixedLength?: ((newByteLength?: number) => ArrayBuffer) | undefined;
|
|
3887
|
-
readonly [Symbol.toStringTag]?: "ArrayBuffer" | undefined;
|
|
3888
|
-
} | {
|
|
3889
|
-
readonly buffer?: {
|
|
3890
|
-
readonly byteLength?: number | undefined;
|
|
3891
|
-
slice?: ((begin?: number, end?: number) => ArrayBuffer) | undefined;
|
|
3892
|
-
readonly maxByteLength?: number | undefined;
|
|
3893
|
-
readonly resizable?: boolean | undefined;
|
|
3894
|
-
resize?: ((newByteLength?: number) => void) | undefined;
|
|
3895
|
-
readonly detached?: boolean | undefined;
|
|
3896
|
-
transfer?: ((newByteLength?: number) => ArrayBuffer) | undefined;
|
|
3897
|
-
transferToFixedLength?: ((newByteLength?: number) => ArrayBuffer) | undefined;
|
|
3898
|
-
readonly [Symbol.toStringTag]?: "ArrayBuffer" | undefined;
|
|
3899
|
-
} | undefined;
|
|
3900
|
-
readonly byteLength?: number | undefined;
|
|
3901
|
-
readonly byteOffset?: number | undefined;
|
|
3902
|
-
} | {
|
|
3903
|
-
append?: {
|
|
3904
|
-
(name: string, value: string | Blob): void;
|
|
3905
|
-
(name: string, value: string): void;
|
|
3906
|
-
(name: string, blobValue: Blob, filename?: string): void;
|
|
3907
|
-
} | undefined;
|
|
3908
|
-
delete?: ((name: string) => void) | undefined;
|
|
3909
|
-
get?: ((name: string) => FormDataEntryValue | null) | undefined;
|
|
3910
|
-
getAll?: ((name: string) => FormDataEntryValue[]) | undefined;
|
|
3911
|
-
has?: ((name: string) => boolean) | undefined;
|
|
3912
|
-
set?: {
|
|
3913
|
-
(name: string, value: string | Blob): void;
|
|
3914
|
-
(name: string, value: string): void;
|
|
3915
|
-
(name: string, blobValue: Blob, filename?: string): void;
|
|
3916
|
-
} | undefined;
|
|
3917
|
-
forEach?: ((callbackfn: (value: FormDataEntryValue, key: string, parent: FormData) => void, thisArg?: any) => void) | undefined;
|
|
3918
|
-
} | {
|
|
3919
|
-
readonly size?: number | undefined;
|
|
3920
|
-
append?: ((name: string, value: string) => void) | undefined;
|
|
3921
|
-
delete?: ((name: string, value?: string) => void) | undefined;
|
|
3922
|
-
get?: ((name: string) => string | null) | undefined;
|
|
3923
|
-
getAll?: ((name: string) => string[]) | undefined;
|
|
3924
|
-
has?: ((name: string, value?: string) => boolean) | undefined;
|
|
3925
|
-
set?: ((name: string, value: string) => void) | undefined;
|
|
3926
|
-
sort?: (() => void) | undefined;
|
|
3927
|
-
toString?: (() => string) | undefined;
|
|
3928
|
-
forEach?: ((callbackfn: (value: string, key: string, parent: URLSearchParams) => void, thisArg?: any) => void) | undefined;
|
|
3929
|
-
} | null | undefined;
|
|
3930
|
-
extra?: {
|
|
3931
|
-
cache?: RequestCache | undefined;
|
|
3932
|
-
credentials?: RequestCredentials | undefined;
|
|
3933
|
-
integrity?: string | undefined;
|
|
3934
|
-
keepalive?: boolean | undefined;
|
|
3935
|
-
mode?: RequestMode | undefined;
|
|
3936
|
-
priority?: RequestPriority | undefined;
|
|
3937
|
-
redirect?: RequestRedirect | undefined;
|
|
3938
|
-
referrer?: string | undefined;
|
|
3939
|
-
referrerPolicy?: ReferrerPolicy | undefined;
|
|
3940
|
-
window?: null | undefined;
|
|
3941
|
-
} | undefined;
|
|
3942
|
-
settings?: {
|
|
3943
|
-
__brand?: VigorBrand<"Fetch", "Policy<Settings<Schema"> | undefined;
|
|
3944
|
-
retryHeaders?: readonly string[] | undefined;
|
|
3945
|
-
unretryStatus?: readonly number[] | undefined;
|
|
3946
|
-
maxRestarts?: number | undefined;
|
|
3947
|
-
default?: (symbol & {
|
|
3948
|
-
__brand: VigorBrand<"Core", "Symbol_Empty">;
|
|
3949
|
-
}) | ((ctx: any) => any | Promise<any>) | undefined;
|
|
3950
|
-
} | undefined;
|
|
3951
|
-
middlewares?: {
|
|
3952
|
-
__brand?: VigorBrand<"Fetch", "Policy<Middlewares<Schema"> | undefined;
|
|
3953
|
-
before?: readonly ({
|
|
3954
|
-
_mode?: "fluent" | undefined;
|
|
3955
|
-
func?: ((ctx: any) => void) | undefined;
|
|
3956
|
-
} | {
|
|
3957
|
-
_mode?: "intercept" | undefined;
|
|
3958
|
-
func?: ((ctx: any, api: Pick<VigorFetchPolicyMiddlewaresApi<any>, "throwError" | "setOptions" | "setHeaders" | "setBody">) => VigorFetchSchema<any>["context"] | Promise<VigorFetchSchema<any>["context"]>) | undefined;
|
|
3959
|
-
})[] | undefined;
|
|
3960
|
-
after?: readonly ({
|
|
3961
|
-
_mode?: "fluent" | undefined;
|
|
3962
|
-
func?: ((ctx: any) => void) | undefined;
|
|
3963
|
-
} | {
|
|
3964
|
-
_mode?: "intercept" | undefined;
|
|
3965
|
-
func?: ((ctx: any, api: Pick<VigorFetchPolicyMiddlewaresApi<any>, "throwError" | "setResult">) => VigorFetchSchema<any>["context"] | Promise<VigorFetchSchema<any>["context"]>) | undefined;
|
|
3966
|
-
})[] | undefined;
|
|
3967
|
-
onResult?: readonly ({
|
|
3968
|
-
_mode?: "fluent" | undefined;
|
|
3969
|
-
func?: ((res: any) => VigorFetchSchema<any>["context"]["result"]) | undefined;
|
|
3970
|
-
} | {
|
|
3971
|
-
_mode?: "intercept" | undefined;
|
|
3972
|
-
func?: ((ctx: any, api: Pick<VigorFetchPolicyMiddlewaresApi<any>, "throwError" | "setResult">) => VigorFetchSchema<any>["context"] | Promise<VigorFetchSchema<any>["context"]>) | undefined;
|
|
3973
|
-
})[] | undefined;
|
|
3974
|
-
onError?: readonly ({
|
|
3975
|
-
_mode?: "fluent" | undefined;
|
|
3976
|
-
func?: ((err: any) => void) | undefined;
|
|
3977
|
-
} | {
|
|
3978
|
-
_mode?: "intercept" | undefined;
|
|
3979
|
-
func?: ((ctx: any, api: Pick<VigorFetchPolicyMiddlewaresApi<any>, "throwError" | "setResult" | "proceedRestart" | "cancelRestart">) => VigorFetchSchema<any>["context"] | Promise<VigorFetchSchema<any>["context"]>) | undefined;
|
|
3980
|
-
})[] | undefined;
|
|
3981
|
-
} | undefined;
|
|
3982
|
-
retry?: {
|
|
3983
|
-
__brand?: VigorBrand<"Retry", "Schema"> | undefined;
|
|
3984
|
-
policy?: {
|
|
3985
|
-
__brand?: VigorBrand<"Retry", "Policy<Schema"> | undefined;
|
|
3986
|
-
target?: (symbol & {
|
|
3987
|
-
__brand: VigorBrand<"Core", "Symbol_Empty">;
|
|
3988
|
-
}) | ((signal: AbortSignal) => any | Promise<any>) | undefined;
|
|
3989
|
-
abortSignals?: readonly {
|
|
3990
|
-
readonly aborted?: boolean | undefined;
|
|
3991
|
-
onabort?: ((this: AbortSignal, ev: Event) => any) | null | undefined;
|
|
3992
|
-
readonly reason?: any;
|
|
3993
|
-
throwIfAborted?: (() => void) | undefined;
|
|
3994
|
-
addEventListener?: {
|
|
3995
|
-
<K extends keyof AbortSignalEventMap>(type: K, listener: (this: AbortSignal, ev: AbortSignalEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
3996
|
-
(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
|
|
3997
|
-
} | undefined;
|
|
3998
|
-
removeEventListener?: {
|
|
3999
|
-
<K extends keyof AbortSignalEventMap>(type: K, listener: (this: AbortSignal, ev: AbortSignalEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
4000
|
-
(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
|
|
4001
|
-
} | undefined;
|
|
4002
|
-
dispatchEvent?: ((event: Event) => boolean) | undefined;
|
|
4003
|
-
}[] | undefined;
|
|
4004
|
-
settings?: {
|
|
4005
|
-
__brand?: VigorBrand<"Retry", "Policy<Settings<Schema"> | undefined;
|
|
4006
|
-
default?: (symbol & {
|
|
4007
|
-
__brand: VigorBrand<"Core", "Symbol_Empty">;
|
|
4008
|
-
}) | ((ctx: any) => any | Promise<any>) | undefined;
|
|
4009
|
-
maxAttempts?: number | undefined;
|
|
4010
|
-
maxRestarts?: number | undefined;
|
|
4011
|
-
timeout?: number | undefined;
|
|
4012
|
-
} | undefined;
|
|
4013
|
-
middlewares?: {
|
|
4014
|
-
__brand?: VigorBrand<"Retry", "Policy<Middlewares<Schema"> | undefined;
|
|
4015
|
-
before?: readonly ({
|
|
4016
|
-
_mode?: "fluent" | undefined;
|
|
4017
|
-
func?: ((ctx: any) => void) | undefined;
|
|
4018
|
-
} | {
|
|
4019
|
-
_mode?: "intercept" | undefined;
|
|
4020
|
-
func?: ((ctx: any, api: Pick<VigorRetryPolicyMiddlewaresApi<any>, "abort" | "throwError" | "breakRetry">) => VigorRetrySchema<any>["context"] | Promise<VigorRetrySchema<any>["context"]>) | undefined;
|
|
4021
|
-
})[] | undefined;
|
|
4022
|
-
after?: readonly ({
|
|
4023
|
-
_mode?: "fluent" | undefined;
|
|
4024
|
-
func?: ((ctx: any) => void) | undefined;
|
|
4025
|
-
} | {
|
|
4026
|
-
_mode?: "intercept" | undefined;
|
|
4027
|
-
func?: ((ctx: any, api: Pick<VigorRetryPolicyMiddlewaresApi<any>, "throwError">) => VigorRetrySchema<any>["context"] | Promise<VigorRetrySchema<any>["context"]>) | undefined;
|
|
4028
|
-
})[] | undefined;
|
|
4029
|
-
onResult?: readonly ({
|
|
4030
|
-
_mode?: "fluent" | undefined;
|
|
4031
|
-
func?: ((res: any) => VigorRetrySchema<any>["context"]["result"]) | undefined;
|
|
4032
|
-
} | {
|
|
4033
|
-
_mode?: "intercept" | undefined;
|
|
4034
|
-
func?: ((ctx: any, api: Pick<VigorRetryPolicyMiddlewaresApi<any>, "throwError" | "setResult">) => VigorRetrySchema<any>["context"] | Promise<VigorRetrySchema<any>["context"]>) | undefined;
|
|
4035
|
-
})[] | undefined;
|
|
4036
|
-
retryIf?: readonly ({
|
|
4037
|
-
_mode?: "fluent" | undefined;
|
|
4038
|
-
func?: ((err: any) => VigorRetrySchema<any>["context"]["flags"]["doRetry"]) | undefined;
|
|
4039
|
-
} | {
|
|
4040
|
-
_mode?: "intercept" | undefined;
|
|
4041
|
-
func?: ((ctx: any, api: Pick<VigorRetryPolicyMiddlewaresApi<any>, "proceedRetry" | "cancelRetry">) => VigorRetrySchema<any>["context"] | Promise<VigorRetrySchema<any>["context"]>) | undefined;
|
|
4042
|
-
})[] | undefined;
|
|
4043
|
-
onRetry?: readonly ({
|
|
4044
|
-
_mode?: "fluent" | undefined;
|
|
4045
|
-
func?: ((err: any) => void) | undefined;
|
|
4046
|
-
} | {
|
|
4047
|
-
_mode?: "intercept" | undefined;
|
|
4048
|
-
func?: ((ctx: any, api: Pick<VigorRetryPolicyMiddlewaresApi<any>, "throwError" | "setDelay">) => VigorRetrySchema<any>["context"] | Promise<VigorRetrySchema<any>["context"]>) | undefined;
|
|
4049
|
-
})[] | undefined;
|
|
4050
|
-
onError?: readonly ({
|
|
4051
|
-
_mode?: "fluent" | undefined;
|
|
4052
|
-
func?: ((err: any) => void) | undefined;
|
|
4053
|
-
} | {
|
|
4054
|
-
_mode?: "intercept" | undefined;
|
|
4055
|
-
func?: ((ctx: any, api: Pick<VigorRetryPolicyMiddlewaresApi<any>, "throwError" | "setResult" | "proceedRestart" | "cancelRestart">) => VigorRetrySchema<any>["context"] | Promise<VigorRetrySchema<any>["context"]>) | undefined;
|
|
4056
|
-
})[] | undefined;
|
|
4057
|
-
} | undefined;
|
|
4058
|
-
algorithms?: {
|
|
4059
|
-
__brand?: VigorBrand<"Retry", "Policy<Algorithms<Constant<Schema"> | undefined;
|
|
4060
|
-
_tag?: "constant" | undefined;
|
|
4061
|
-
jitter?: number | undefined;
|
|
4062
|
-
interval?: number | undefined;
|
|
4063
|
-
_calculateDelay?: (((att: number, config: VigorRetryPolicyAlgorithmsConstantSchema<any>) => number) & ((att: number, config: any) => number)) | undefined;
|
|
4064
|
-
} | {
|
|
4065
|
-
__brand?: VigorBrand<"Retry", "Policy<Algorithms<Linear<Schema"> | undefined;
|
|
4066
|
-
_tag?: "linear" | undefined;
|
|
4067
|
-
jitter?: number | undefined;
|
|
4068
|
-
initial?: number | undefined;
|
|
4069
|
-
increment?: number | undefined;
|
|
4070
|
-
minDelay?: number | undefined;
|
|
4071
|
-
maxDelay?: number | undefined;
|
|
4072
|
-
_calculateDelay?: (((att: number, config: VigorRetryPolicyAlgorithmsLinearSchema<any>) => number) & ((att: number, config: any) => number)) | undefined;
|
|
4073
|
-
} | {
|
|
4074
|
-
__brand?: VigorBrand<"Retry", "Policy<Algorithms<Backoff<Schema"> | undefined;
|
|
4075
|
-
_tag?: "backoff" | undefined;
|
|
4076
|
-
jitter?: number | undefined;
|
|
4077
|
-
initial?: number | undefined;
|
|
4078
|
-
multiplier?: number | undefined;
|
|
4079
|
-
unit?: number | undefined;
|
|
4080
|
-
minDelay?: number | undefined;
|
|
4081
|
-
maxDelay?: number | undefined;
|
|
4082
|
-
_calculateDelay?: (((att: number, config: VigorRetryPolicyAlgorithmsBackoffSchema<any>) => number) & ((att: number, config: any) => number)) | undefined;
|
|
4083
|
-
} | {
|
|
4084
|
-
__brand?: VigorBrand<"Retry", "Policy<Algorithms<Custom<Schema"> | undefined;
|
|
4085
|
-
_tag?: "custom" | undefined;
|
|
4086
|
-
jitter?: number | undefined;
|
|
4087
|
-
minDelay?: number | undefined;
|
|
4088
|
-
maxDelay?: number | undefined;
|
|
4089
|
-
target?: (symbol & {
|
|
4090
|
-
__brand: VigorBrand<"Core", "Symbol_Empty">;
|
|
4091
|
-
}) | ((att: number) => number) | undefined;
|
|
4092
|
-
_calculateDelay?: (((att: number, config: VigorRetryPolicyAlgorithmsCustomSchema<any>) => number) & ((att: number, config: any) => number)) | undefined;
|
|
4093
|
-
} | undefined;
|
|
4094
|
-
} | undefined;
|
|
4095
|
-
context?: {
|
|
4096
|
-
__brand?: VigorBrand<"Retry", "Context<Schema"> | undefined;
|
|
4097
|
-
result?: (symbol & {
|
|
4098
|
-
__brand: VigorBrand<"Core", "Symbol_Default">;
|
|
4099
|
-
}) | undefined;
|
|
4100
|
-
error?: unknown;
|
|
4101
|
-
system?: {
|
|
4102
|
-
delay?: number | (symbol & {
|
|
4103
|
-
__brand: VigorBrand<"Core", "Symbol_Default">;
|
|
4104
|
-
}) | undefined;
|
|
4105
|
-
attempt?: number | undefined;
|
|
4106
|
-
} | undefined;
|
|
4107
|
-
flags?: {
|
|
4108
|
-
doRetry?: boolean | undefined;
|
|
4109
|
-
doRestart?: boolean | undefined;
|
|
4110
|
-
brokeRetry?: boolean | undefined;
|
|
4111
|
-
overridden?: boolean | undefined;
|
|
4112
|
-
} | undefined;
|
|
4113
|
-
record?: {
|
|
4114
|
-
[x: string]: any;
|
|
4115
|
-
} | undefined;
|
|
4116
|
-
policy?: any;
|
|
4117
|
-
} | undefined;
|
|
4118
|
-
} | undefined;
|
|
4119
|
-
parse?: {
|
|
4120
|
-
__brand?: VigorBrand<"Parse", "Schema"> | undefined;
|
|
4121
|
-
policy?: {
|
|
4122
|
-
__brand?: VigorBrand<"Parse", "Policy<Schema"> | undefined;
|
|
4123
|
-
target?: (symbol & {
|
|
4124
|
-
__brand: VigorBrand<"Core", "Symbol_Default">;
|
|
4125
|
-
}) | {
|
|
4126
|
-
readonly headers?: {
|
|
4127
|
-
append?: ((name: string, value: string) => void) | undefined;
|
|
4128
|
-
delete?: ((name: string) => void) | undefined;
|
|
4129
|
-
get?: ((name: string) => string | null) | undefined;
|
|
4130
|
-
getSetCookie?: (() => string[]) | undefined;
|
|
4131
|
-
has?: ((name: string) => boolean) | undefined;
|
|
4132
|
-
set?: ((name: string, value: string) => void) | undefined;
|
|
4133
|
-
forEach?: ((callbackfn: (value: string, key: string, parent: Headers) => void, thisArg?: any) => void) | undefined;
|
|
4134
|
-
} | undefined;
|
|
4135
|
-
readonly ok?: boolean | undefined;
|
|
4136
|
-
readonly redirected?: boolean | undefined;
|
|
4137
|
-
readonly status?: number | undefined;
|
|
4138
|
-
readonly statusText?: string | undefined;
|
|
4139
|
-
readonly type?: ResponseType | undefined;
|
|
4140
|
-
readonly url?: string | undefined;
|
|
4141
|
-
clone?: (() => Response) | undefined;
|
|
4142
|
-
readonly body?: {
|
|
4143
|
-
readonly locked?: boolean | undefined;
|
|
4144
|
-
cancel?: ((reason?: any) => Promise<void>) | undefined;
|
|
4145
|
-
getReader?: {
|
|
4146
|
-
(options: {
|
|
4147
|
-
mode: "byob";
|
|
4148
|
-
}): ReadableStreamBYOBReader;
|
|
4149
|
-
(): ReadableStreamDefaultReader<Uint8Array<ArrayBuffer>>;
|
|
4150
|
-
(options?: ReadableStreamGetReaderOptions): ReadableStreamReader<Uint8Array<ArrayBuffer>>;
|
|
4151
|
-
} | undefined;
|
|
4152
|
-
pipeThrough?: (<T_1>(transform: ReadableWritablePair<T_1, Uint8Array<ArrayBuffer>>, options?: StreamPipeOptions) => ReadableStream<T_1>) | undefined;
|
|
4153
|
-
pipeTo?: ((destination: WritableStream<Uint8Array<ArrayBuffer>>, options?: StreamPipeOptions) => Promise<void>) | undefined;
|
|
4154
|
-
tee?: (() => [ReadableStream<Uint8Array<ArrayBuffer>>, ReadableStream<Uint8Array<ArrayBuffer>>]) | undefined;
|
|
4155
|
-
} | null | undefined;
|
|
4156
|
-
readonly bodyUsed?: boolean | undefined;
|
|
4157
|
-
arrayBuffer?: (() => Promise<ArrayBuffer>) | undefined;
|
|
4158
|
-
blob?: (() => Promise<Blob>) | undefined;
|
|
4159
|
-
bytes?: (() => Promise<Uint8Array<ArrayBuffer>>) | undefined;
|
|
4160
|
-
formData?: (() => Promise<FormData>) | undefined;
|
|
4161
|
-
json?: (() => Promise<any>) | undefined;
|
|
4162
|
-
text?: (() => Promise<string>) | undefined;
|
|
4163
|
-
} | undefined;
|
|
4164
|
-
settings?: {
|
|
4165
|
-
__brand?: VigorBrand<"Parse", "Policy<Settings<Schema"> | undefined;
|
|
4166
|
-
raw?: boolean | undefined;
|
|
4167
|
-
default?: (symbol & {
|
|
4168
|
-
__brand: VigorBrand<"Core", "Symbol_Empty">;
|
|
4169
|
-
}) | ((ctx: any) => any | Promise<any>) | undefined;
|
|
4170
|
-
maxRestarts?: number | undefined;
|
|
4171
|
-
} | undefined;
|
|
4172
|
-
middlewares?: {
|
|
4173
|
-
__brand?: VigorBrand<"Parse", "Policy<Middlewares<Schema"> | undefined;
|
|
4174
|
-
before?: readonly ({
|
|
4175
|
-
_mode?: "fluent" | undefined;
|
|
4176
|
-
func?: ((ctx: any) => void) | undefined;
|
|
4177
|
-
} | {
|
|
4178
|
-
_mode?: "intercept" | undefined;
|
|
4179
|
-
func?: ((ctx: any, api: Pick<VigorParsePolicyMiddlewaresApi<any>, "throwError">) => VigorParseSchema<any>["context"] | Promise<VigorParseSchema<any>["context"]>) | undefined;
|
|
4180
|
-
})[] | undefined;
|
|
4181
|
-
after?: readonly ({
|
|
4182
|
-
_mode?: "fluent" | undefined;
|
|
4183
|
-
func?: ((ctx: any) => void) | undefined;
|
|
4184
|
-
} | {
|
|
4185
|
-
_mode?: "intercept" | undefined;
|
|
4186
|
-
func?: ((ctx: any, api: Pick<VigorParsePolicyMiddlewaresApi<any>, "throwError" | "setResult">) => VigorParseSchema<any>["context"] | Promise<VigorParseSchema<any>["context"]>) | undefined;
|
|
4187
|
-
})[] | undefined;
|
|
4188
|
-
onResult?: readonly ({
|
|
4189
|
-
_mode?: "fluent" | undefined;
|
|
4190
|
-
func?: ((res: any) => VigorParseSchema<any>["context"]["result"]) | undefined;
|
|
4191
|
-
} | {
|
|
4192
|
-
_mode?: "intercept" | undefined;
|
|
4193
|
-
func?: ((ctx: any, api: Pick<VigorParsePolicyMiddlewaresApi<any>, "throwError" | "setResult">) => VigorParseSchema<any>["context"] | Promise<VigorParseSchema<any>["context"]>) | undefined;
|
|
4194
|
-
})[] | undefined;
|
|
4195
|
-
onError?: readonly ({
|
|
4196
|
-
_mode?: "fluent" | undefined;
|
|
4197
|
-
func?: ((err: any) => void) | undefined;
|
|
4198
|
-
} | {
|
|
4199
|
-
_mode?: "intercept" | undefined;
|
|
4200
|
-
func?: ((ctx: any, api: Pick<VigorParsePolicyMiddlewaresApi<any>, "throwError" | "setResult" | "proceedRestart" | "cancelRestart">) => VigorParseSchema<any>["context"] | Promise<VigorParseSchema<any>["context"]>) | undefined;
|
|
4201
|
-
})[] | undefined;
|
|
4202
|
-
} | undefined;
|
|
4203
|
-
strategies?: {
|
|
4204
|
-
__brand?: VigorBrand<"Parse", "Policy<Strategies<Schema"> | undefined;
|
|
4205
|
-
funcs?: readonly VigorParseStrategyFunc[] | undefined;
|
|
4206
|
-
} | undefined;
|
|
4207
|
-
} | undefined;
|
|
4208
|
-
context?: {
|
|
4209
|
-
__brand?: VigorBrand<"Parse", "Context<Schema"> | undefined;
|
|
4210
|
-
result?: unknown | VigorDefaultType;
|
|
4211
|
-
error?: unknown;
|
|
4212
|
-
response?: (symbol & {
|
|
4213
|
-
__brand: VigorBrand<"Core", "Symbol_Default">;
|
|
4214
|
-
}) | {
|
|
4215
|
-
readonly headers?: {
|
|
4216
|
-
append?: ((name: string, value: string) => void) | undefined;
|
|
4217
|
-
delete?: ((name: string) => void) | undefined;
|
|
4218
|
-
get?: ((name: string) => string | null) | undefined;
|
|
4219
|
-
getSetCookie?: (() => string[]) | undefined;
|
|
4220
|
-
has?: ((name: string) => boolean) | undefined;
|
|
4221
|
-
set?: ((name: string, value: string) => void) | undefined;
|
|
4222
|
-
forEach?: ((callbackfn: (value: string, key: string, parent: Headers) => void, thisArg?: any) => void) | undefined;
|
|
4223
|
-
} | undefined;
|
|
4224
|
-
readonly ok?: boolean | undefined;
|
|
4225
|
-
readonly redirected?: boolean | undefined;
|
|
4226
|
-
readonly status?: number | undefined;
|
|
4227
|
-
readonly statusText?: string | undefined;
|
|
4228
|
-
readonly type?: ResponseType | undefined;
|
|
4229
|
-
readonly url?: string | undefined;
|
|
4230
|
-
clone?: (() => Response) | undefined;
|
|
4231
|
-
readonly body?: {
|
|
4232
|
-
readonly locked?: boolean | undefined;
|
|
4233
|
-
cancel?: ((reason?: any) => Promise<void>) | undefined;
|
|
4234
|
-
getReader?: {
|
|
4235
|
-
(options: {
|
|
4236
|
-
mode: "byob";
|
|
4237
|
-
}): ReadableStreamBYOBReader;
|
|
4238
|
-
(): ReadableStreamDefaultReader<Uint8Array<ArrayBuffer>>;
|
|
4239
|
-
(options?: ReadableStreamGetReaderOptions): ReadableStreamReader<Uint8Array<ArrayBuffer>>;
|
|
4240
|
-
} | undefined;
|
|
4241
|
-
pipeThrough?: (<T_1>(transform: ReadableWritablePair<T_1, Uint8Array<ArrayBuffer>>, options?: StreamPipeOptions) => ReadableStream<T_1>) | undefined;
|
|
4242
|
-
pipeTo?: ((destination: WritableStream<Uint8Array<ArrayBuffer>>, options?: StreamPipeOptions) => Promise<void>) | undefined;
|
|
4243
|
-
tee?: (() => [ReadableStream<Uint8Array<ArrayBuffer>>, ReadableStream<Uint8Array<ArrayBuffer>>]) | undefined;
|
|
4244
|
-
} | null | undefined;
|
|
4245
|
-
readonly bodyUsed?: boolean | undefined;
|
|
4246
|
-
arrayBuffer?: (() => Promise<ArrayBuffer>) | undefined;
|
|
4247
|
-
blob?: (() => Promise<Blob>) | undefined;
|
|
4248
|
-
bytes?: (() => Promise<Uint8Array<ArrayBuffer>>) | undefined;
|
|
4249
|
-
formData?: (() => Promise<FormData>) | undefined;
|
|
4250
|
-
json?: (() => Promise<any>) | undefined;
|
|
4251
|
-
text?: (() => Promise<string>) | undefined;
|
|
4252
|
-
} | undefined;
|
|
4253
|
-
flags?: {
|
|
4254
|
-
overrided?: boolean | undefined;
|
|
4255
|
-
restarted?: boolean | undefined;
|
|
4256
|
-
} | undefined;
|
|
4257
|
-
record?: {
|
|
4258
|
-
[x: string]: any;
|
|
4259
|
-
} | undefined;
|
|
4260
|
-
policy?: any;
|
|
4261
|
-
} | undefined;
|
|
4262
|
-
} | undefined;
|
|
4263
|
-
} | undefined;
|
|
4264
|
-
context?: {
|
|
4265
|
-
__brand?: VigorBrand<"Fetch", "Context<Schema"> | undefined;
|
|
4266
|
-
href?: string | undefined;
|
|
4267
|
-
response?: (symbol & {
|
|
4268
|
-
__brand: VigorBrand<"Core", "Symbol_Default">;
|
|
4269
|
-
}) | {
|
|
4270
|
-
readonly headers?: {
|
|
4271
|
-
append?: ((name: string, value: string) => void) | undefined;
|
|
4272
|
-
delete?: ((name: string) => void) | undefined;
|
|
4273
|
-
get?: ((name: string) => string | null) | undefined;
|
|
4274
|
-
getSetCookie?: (() => string[]) | undefined;
|
|
4275
|
-
has?: ((name: string) => boolean) | undefined;
|
|
4276
|
-
set?: ((name: string, value: string) => void) | undefined;
|
|
4277
|
-
forEach?: ((callbackfn: (value: string, key: string, parent: Headers) => void, thisArg?: any) => void) | undefined;
|
|
4278
|
-
} | undefined;
|
|
4279
|
-
readonly ok?: boolean | undefined;
|
|
4280
|
-
readonly redirected?: boolean | undefined;
|
|
4281
|
-
readonly status?: number | undefined;
|
|
4282
|
-
readonly statusText?: string | undefined;
|
|
4283
|
-
readonly type?: ResponseType | undefined;
|
|
4284
|
-
readonly url?: string | undefined;
|
|
4285
|
-
clone?: (() => Response) | undefined;
|
|
4286
|
-
readonly body?: {
|
|
4287
|
-
readonly locked?: boolean | undefined;
|
|
4288
|
-
cancel?: ((reason?: any) => Promise<void>) | undefined;
|
|
4289
|
-
getReader?: {
|
|
4290
|
-
(options: {
|
|
4291
|
-
mode: "byob";
|
|
4292
|
-
}): ReadableStreamBYOBReader;
|
|
4293
|
-
(): ReadableStreamDefaultReader<Uint8Array<ArrayBuffer>>;
|
|
4294
|
-
(options?: ReadableStreamGetReaderOptions): ReadableStreamReader<Uint8Array<ArrayBuffer>>;
|
|
4295
|
-
} | undefined;
|
|
4296
|
-
pipeThrough?: (<T_1>(transform: ReadableWritablePair<T_1, Uint8Array<ArrayBuffer>>, options?: StreamPipeOptions) => ReadableStream<T_1>) | undefined;
|
|
4297
|
-
pipeTo?: ((destination: WritableStream<Uint8Array<ArrayBuffer>>, options?: StreamPipeOptions) => Promise<void>) | undefined;
|
|
4298
|
-
tee?: (() => [ReadableStream<Uint8Array<ArrayBuffer>>, ReadableStream<Uint8Array<ArrayBuffer>>]) | undefined;
|
|
4299
|
-
} | null | undefined;
|
|
4300
|
-
readonly bodyUsed?: boolean | undefined;
|
|
4301
|
-
arrayBuffer?: (() => Promise<ArrayBuffer>) | undefined;
|
|
4302
|
-
blob?: (() => Promise<Blob>) | undefined;
|
|
4303
|
-
bytes?: (() => Promise<Uint8Array<ArrayBuffer>>) | undefined;
|
|
4304
|
-
formData?: (() => Promise<FormData>) | undefined;
|
|
4305
|
-
json?: (() => Promise<any>) | undefined;
|
|
4306
|
-
text?: (() => Promise<string>) | undefined;
|
|
4307
|
-
} | undefined;
|
|
4308
|
-
result?: unknown | VigorDefaultType;
|
|
4309
|
-
error?: unknown;
|
|
4310
|
-
options?: (symbol & {
|
|
4311
|
-
__brand: VigorBrand<"Core", "Symbol_Default">;
|
|
4312
|
-
}) | {
|
|
4313
|
-
cache?: RequestCache | undefined;
|
|
4314
|
-
credentials?: RequestCredentials | undefined;
|
|
4315
|
-
integrity?: string | undefined;
|
|
4316
|
-
keepalive?: boolean | undefined;
|
|
4317
|
-
mode?: RequestMode | undefined;
|
|
4318
|
-
priority?: RequestPriority | undefined;
|
|
4319
|
-
redirect?: RequestRedirect | undefined;
|
|
4320
|
-
referrer?: string | undefined;
|
|
4321
|
-
referrerPolicy?: ReferrerPolicy | undefined;
|
|
4322
|
-
window?: null | undefined;
|
|
4323
|
-
method?: "GET" | "POST" | "PUT" | "PATCH" | "DELETE" | "HEAD" | "OPTIONS" | "CONNECT" | "TRACE" | undefined;
|
|
4324
|
-
headers?: {
|
|
4325
|
-
[x: string]: string | undefined;
|
|
4326
|
-
} | undefined;
|
|
4327
|
-
body?: string | {
|
|
4328
|
-
readonly locked?: boolean | undefined;
|
|
4329
|
-
cancel?: ((reason?: any) => Promise<void>) | undefined;
|
|
4330
|
-
getReader?: {
|
|
4331
|
-
(options: {
|
|
4332
|
-
mode: "byob";
|
|
4333
|
-
}): ReadableStreamBYOBReader;
|
|
4334
|
-
(): ReadableStreamDefaultReader<any>;
|
|
4335
|
-
(options?: ReadableStreamGetReaderOptions): ReadableStreamReader<any>;
|
|
4336
|
-
} | undefined;
|
|
4337
|
-
pipeThrough?: (<T_1>(transform: ReadableWritablePair<T_1, any>, options?: StreamPipeOptions) => ReadableStream<T_1>) | undefined;
|
|
4338
|
-
pipeTo?: ((destination: WritableStream<any>, options?: StreamPipeOptions) => Promise<void>) | undefined;
|
|
4339
|
-
tee?: (() => [ReadableStream<any>, ReadableStream<any>]) | undefined;
|
|
4340
|
-
} | {
|
|
4341
|
-
readonly size?: number | undefined;
|
|
4342
|
-
readonly type?: string | undefined;
|
|
4343
|
-
arrayBuffer?: (() => Promise<ArrayBuffer>) | undefined;
|
|
4344
|
-
bytes?: (() => Promise<Uint8Array<ArrayBuffer>>) | undefined;
|
|
4345
|
-
slice?: ((start?: number, end?: number, contentType?: string) => Blob) | undefined;
|
|
4346
|
-
stream?: (() => ReadableStream<Uint8Array<ArrayBuffer>>) | undefined;
|
|
4347
|
-
text?: (() => Promise<string>) | undefined;
|
|
4348
|
-
} | {
|
|
4349
|
-
readonly byteLength?: number | undefined;
|
|
4350
|
-
slice?: ((begin?: number, end?: number) => ArrayBuffer) | undefined;
|
|
4351
|
-
readonly maxByteLength?: number | undefined;
|
|
4352
|
-
readonly resizable?: boolean | undefined;
|
|
4353
|
-
resize?: ((newByteLength?: number) => void) | undefined;
|
|
4354
|
-
readonly detached?: boolean | undefined;
|
|
4355
|
-
transfer?: ((newByteLength?: number) => ArrayBuffer) | undefined;
|
|
4356
|
-
transferToFixedLength?: ((newByteLength?: number) => ArrayBuffer) | undefined;
|
|
4357
|
-
readonly [Symbol.toStringTag]?: "ArrayBuffer" | undefined;
|
|
4358
|
-
} | {
|
|
4359
|
-
readonly buffer?: {
|
|
4360
|
-
readonly byteLength?: number | undefined;
|
|
4361
|
-
slice?: ((begin?: number, end?: number) => ArrayBuffer) | undefined;
|
|
4362
|
-
readonly maxByteLength?: number | undefined;
|
|
4363
|
-
readonly resizable?: boolean | undefined;
|
|
4364
|
-
resize?: ((newByteLength?: number) => void) | undefined;
|
|
4365
|
-
readonly detached?: boolean | undefined;
|
|
4366
|
-
transfer?: ((newByteLength?: number) => ArrayBuffer) | undefined;
|
|
4367
|
-
transferToFixedLength?: ((newByteLength?: number) => ArrayBuffer) | undefined;
|
|
4368
|
-
readonly [Symbol.toStringTag]?: "ArrayBuffer" | undefined;
|
|
4369
|
-
} | undefined;
|
|
4370
|
-
readonly byteLength?: number | undefined;
|
|
4371
|
-
readonly byteOffset?: number | undefined;
|
|
4372
|
-
} | {
|
|
4373
|
-
append?: {
|
|
4374
|
-
(name: string, value: string | Blob): void;
|
|
4375
|
-
(name: string, value: string): void;
|
|
4376
|
-
(name: string, blobValue: Blob, filename?: string): void;
|
|
4377
|
-
} | undefined;
|
|
4378
|
-
delete?: ((name: string) => void) | undefined;
|
|
4379
|
-
get?: ((name: string) => FormDataEntryValue | null) | undefined;
|
|
4380
|
-
getAll?: ((name: string) => FormDataEntryValue[]) | undefined;
|
|
4381
|
-
has?: ((name: string) => boolean) | undefined;
|
|
4382
|
-
set?: {
|
|
4383
|
-
(name: string, value: string | Blob): void;
|
|
4384
|
-
(name: string, value: string): void;
|
|
4385
|
-
(name: string, blobValue: Blob, filename?: string): void;
|
|
4386
|
-
} | undefined;
|
|
4387
|
-
forEach?: ((callbackfn: (value: FormDataEntryValue, key: string, parent: FormData) => void, thisArg?: any) => void) | undefined;
|
|
4388
|
-
} | {
|
|
4389
|
-
readonly size?: number | undefined;
|
|
4390
|
-
append?: ((name: string, value: string) => void) | undefined;
|
|
4391
|
-
delete?: ((name: string, value?: string) => void) | undefined;
|
|
4392
|
-
get?: ((name: string) => string | null) | undefined;
|
|
4393
|
-
getAll?: ((name: string) => string[]) | undefined;
|
|
4394
|
-
has?: ((name: string, value?: string) => boolean) | undefined;
|
|
4395
|
-
set?: ((name: string, value: string) => void) | undefined;
|
|
4396
|
-
sort?: (() => void) | undefined;
|
|
4397
|
-
toString?: (() => string) | undefined;
|
|
4398
|
-
forEach?: ((callbackfn: (value: string, key: string, parent: URLSearchParams) => void, thisArg?: any) => void) | undefined;
|
|
4399
|
-
} | null | undefined;
|
|
4400
|
-
signal?: {
|
|
4401
|
-
readonly aborted?: boolean | undefined;
|
|
4402
|
-
onabort?: ((this: AbortSignal, ev: Event) => any) | null | undefined;
|
|
4403
|
-
readonly reason?: any;
|
|
4404
|
-
throwIfAborted?: (() => void) | undefined;
|
|
4405
|
-
addEventListener?: {
|
|
4406
|
-
<K extends keyof AbortSignalEventMap>(type: K, listener: (this: AbortSignal, ev: AbortSignalEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
4407
|
-
(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
|
|
4408
|
-
} | undefined;
|
|
4409
|
-
removeEventListener?: {
|
|
4410
|
-
<K extends keyof AbortSignalEventMap>(type: K, listener: (this: AbortSignal, ev: AbortSignalEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
4411
|
-
(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
|
|
4412
|
-
} | undefined;
|
|
4413
|
-
dispatchEvent?: ((event: Event) => boolean) | undefined;
|
|
4414
|
-
} | undefined;
|
|
4415
|
-
} | undefined;
|
|
4416
|
-
flags?: {
|
|
4417
|
-
overrided?: boolean | undefined;
|
|
4418
|
-
restarted?: boolean | undefined;
|
|
4419
|
-
} | undefined;
|
|
4420
|
-
record?: {
|
|
4421
|
-
[x: string]: any;
|
|
4422
|
-
} | undefined;
|
|
4423
|
-
policy?: any;
|
|
4424
|
-
} | undefined;
|
|
2531
|
+
readonly policy: {
|
|
2532
|
+
readonly middlewares: VigorFetchPolicyMiddlewaresSchema<any>;
|
|
2533
|
+
};
|
|
4425
2534
|
}>>>;
|
|
4426
2535
|
/** Configures the retry engine used to send the underlying request. */
|
|
4427
2536
|
retry<const N extends VigorDeepPartial<VigorRetrySchema<any>>, R extends VigorRetrySchema<any>>(input: N | ((r: VigorRetry) => VigorRetry<R>) | VigorRetry<R>): VigorFetch<VigorFetchIn<VigorDeepMerge<T, {
|
|
@@ -4770,7 +2879,7 @@ declare const vigor: {
|
|
|
4770
2879
|
policy: {
|
|
4771
2880
|
target: (symbol & {
|
|
4772
2881
|
__brand: VigorBrand<"Core", "Symbol_Default">;
|
|
4773
|
-
}) | Response;
|
|
2882
|
+
}) | Request | Response;
|
|
4774
2883
|
middlewares: {
|
|
4775
2884
|
readonly __brand: VigorBrand<"Parse", "Policy<Middlewares<Schema">;
|
|
4776
2885
|
readonly before: [];
|
|
@@ -5434,10 +3543,10 @@ declare const vigor: {
|
|
|
5434
3543
|
};
|
|
5435
3544
|
};
|
|
5436
3545
|
headers: {};
|
|
5437
|
-
|
|
3546
|
+
method: symbol & {
|
|
5438
3547
|
__brand: VigorBrand<"Core", "Symbol_Empty">;
|
|
5439
3548
|
};
|
|
5440
|
-
|
|
3549
|
+
body: symbol & {
|
|
5441
3550
|
__brand: VigorBrand<"Core", "Symbol_Empty">;
|
|
5442
3551
|
};
|
|
5443
3552
|
origin: string;
|