@oazapfts/runtime 1.0.1 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/headers.d.ts +7 -3
- package/index.d.ts +208 -67
- package/package.json +1 -1
- package/query.d.ts +28 -20
- package/util.d.ts +19 -13
- package/runtime.d.ts +0 -115
package/headers.d.ts
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
-
export type CustomHeaders = Record<string, string | null | boolean | number | undefined>;
|
|
2
|
-
|
|
3
|
-
export declare function
|
|
1
|
+
export declare type CustomHeaders = Record<string, string | null | boolean | number | undefined>;
|
|
2
|
+
|
|
3
|
+
export declare function mergeHeaders(base: HeadersInit | CustomHeaders | undefined, overwrite?: HeadersInit | CustomHeaders): Headers;
|
|
4
|
+
|
|
5
|
+
export declare function normalizeHeaders(headers: HeadersInit | CustomHeaders | undefined): Headers;
|
|
6
|
+
|
|
7
|
+
export { }
|
package/index.d.ts
CHANGED
|
@@ -1,67 +1,208 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
export type
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
export type
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
*
|
|
38
|
-
*
|
|
39
|
-
*
|
|
40
|
-
*
|
|
41
|
-
*
|
|
42
|
-
*
|
|
43
|
-
*
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
export
|
|
47
|
-
|
|
48
|
-
export
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
type
|
|
56
|
-
|
|
57
|
-
};
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
1
|
+
export declare type ApiFunction = (...args: any[]) => Promise<WithHeaders<ApiResponse>>;
|
|
2
|
+
|
|
3
|
+
export declare type ApiResponse = {
|
|
4
|
+
status: number;
|
|
5
|
+
data?: any;
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
export declare type Args<T> = T extends (...args: infer U) => any ? U : any;
|
|
9
|
+
|
|
10
|
+
export declare type AsyncReturnType<T> = T extends (...args: any[]) => Promise<infer V> ? V : never;
|
|
11
|
+
|
|
12
|
+
export declare type CustomHeaders = Record<string, string | null | boolean | number | undefined>;
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Type to access a response's data property for a given status.
|
|
16
|
+
*/
|
|
17
|
+
export declare type DataType<T extends ApiResponse, S extends number> = T extends {
|
|
18
|
+
status: S;
|
|
19
|
+
} ? T["data"] : never;
|
|
20
|
+
|
|
21
|
+
export declare type Defaults<Headers extends RequestOpts["headers"] = CustomHeaders> = Omit<RequestOpts, "headers" | "baseUrl"> & {
|
|
22
|
+
baseUrl: string;
|
|
23
|
+
headers: Headers;
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
declare type FetchRequestOpts = RequestOpts & {
|
|
27
|
+
body?: string | FormData | Blob;
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
declare type FormRequestOpts = RequestOpts & {
|
|
31
|
+
body?: Record<string, any>;
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
export declare type FunctionReturnType<T> = T extends (...args: any[]) => any ? ReturnType<T> : never;
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Utility function to handle different status codes.
|
|
38
|
+
*
|
|
39
|
+
* Example:
|
|
40
|
+
*
|
|
41
|
+
* const userId = await handle(api.register({ email, password }), {
|
|
42
|
+
* 200: (user: User) => user.id,
|
|
43
|
+
* 400: (err: string) => console.log(err),
|
|
44
|
+
* })
|
|
45
|
+
**/
|
|
46
|
+
export declare function handle<T extends WithHeaders<ApiResponse>, H extends ResponseHandler<T>>(promise: Promise<T>, handler: H): Promise<FunctionReturnType<H[keyof H]>>;
|
|
47
|
+
|
|
48
|
+
export declare class HttpError extends Error {
|
|
49
|
+
status: number;
|
|
50
|
+
data?: any;
|
|
51
|
+
headers: Headers;
|
|
52
|
+
constructor(status: number, data: any, headers: Headers);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
declare type JsonRequestOpts = RequestOpts & {
|
|
56
|
+
body?: any;
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
declare function mergeHeaders(base: HeadersInit | CustomHeaders | undefined, overwrite?: HeadersInit | CustomHeaders): Headers;
|
|
60
|
+
|
|
61
|
+
declare type MultipartRequestOpts = RequestOpts & {
|
|
62
|
+
body?: Record<string, unknown>;
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* Utility function to directly return any successful response
|
|
67
|
+
* and throw a HttpError otherwise.
|
|
68
|
+
*
|
|
69
|
+
* Example:
|
|
70
|
+
*
|
|
71
|
+
* try {
|
|
72
|
+
* const userId = await ok(api.register({ email, password }));
|
|
73
|
+
* }
|
|
74
|
+
* catch (err) {
|
|
75
|
+
* console.log(err.status)
|
|
76
|
+
* }
|
|
77
|
+
*/
|
|
78
|
+
export declare function ok<T extends WithHeaders<ApiResponse>>(promise: Promise<T>): Promise<SuccessResponse<T>>;
|
|
79
|
+
|
|
80
|
+
export declare type Okify<T extends ApiFunction> = (...args: Args<T>) => Promise<OkResponse<T>>;
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* Utility function to wrap an API function with `ok(...)`.
|
|
84
|
+
*/
|
|
85
|
+
export declare function okify<T extends ApiFunction>(fn: T): Okify<T>;
|
|
86
|
+
|
|
87
|
+
export declare type OkResponse<T extends ApiFunction> = SuccessResponse<AsyncReturnType<T>>;
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* Utility to `okify` each function of an API.
|
|
91
|
+
*/
|
|
92
|
+
export declare function optimistic<T extends Record<string, ApiFunction | unknown>>(api: T): OptimisticApi<T>;
|
|
93
|
+
|
|
94
|
+
declare type OptimisticApi<T> = {
|
|
95
|
+
[K in keyof T]: T[K] extends ApiFunction ? Okify<T[K]> : T[K];
|
|
96
|
+
};
|
|
97
|
+
|
|
98
|
+
export declare type RequestOpts = {
|
|
99
|
+
baseUrl?: string;
|
|
100
|
+
fetch?: typeof fetch;
|
|
101
|
+
formDataConstructor?: new () => FormData;
|
|
102
|
+
headers?: HeadersInit | CustomHeaders;
|
|
103
|
+
} & Omit<RequestInit, "body" | "headers">;
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* Object with methods to handle possible status codes of an ApiResponse.
|
|
107
|
+
*/
|
|
108
|
+
export declare type ResponseHandler<T extends ApiResponse> = {
|
|
109
|
+
[P in T["status"]]?: (res: DataType<T, P>) => any;
|
|
110
|
+
} & {
|
|
111
|
+
default?: (status: number, data: any) => any;
|
|
112
|
+
};
|
|
113
|
+
|
|
114
|
+
export declare function runtime(defaults?: RequestOpts): {
|
|
115
|
+
ok: typeof ok;
|
|
116
|
+
fetchText: (url: string, req?: FetchRequestOpts) => Promise<{
|
|
117
|
+
status: number;
|
|
118
|
+
headers: Headers;
|
|
119
|
+
contentType: string | null;
|
|
120
|
+
data: string | undefined;
|
|
121
|
+
}>;
|
|
122
|
+
fetchJson: <T extends ApiResponse>(url: string, req?: FetchRequestOpts) => Promise<WithHeaders<T>>;
|
|
123
|
+
fetchBlob: <T_1 extends ApiResponse>(url: string, req?: FetchRequestOpts) => Promise<WithHeaders<T_1>>;
|
|
124
|
+
mergeHeaders: typeof mergeHeaders;
|
|
125
|
+
json({ body, headers, ...req }: JsonRequestOpts): {
|
|
126
|
+
headers: Headers;
|
|
127
|
+
body?: string | undefined;
|
|
128
|
+
baseUrl?: string | undefined;
|
|
129
|
+
fetch?: typeof fetch | undefined;
|
|
130
|
+
formDataConstructor?: (new () => FormData) | undefined;
|
|
131
|
+
cache?: RequestCache | undefined;
|
|
132
|
+
credentials?: RequestCredentials | undefined;
|
|
133
|
+
integrity?: string | undefined;
|
|
134
|
+
keepalive?: boolean | undefined;
|
|
135
|
+
method?: string | undefined;
|
|
136
|
+
mode?: RequestMode | undefined;
|
|
137
|
+
redirect?: RequestRedirect | undefined;
|
|
138
|
+
referrer?: string | undefined;
|
|
139
|
+
referrerPolicy?: ReferrerPolicy | undefined;
|
|
140
|
+
signal?: AbortSignal | null | undefined;
|
|
141
|
+
window?: null | undefined;
|
|
142
|
+
};
|
|
143
|
+
form({ body, headers, ...req }: FormRequestOpts): {
|
|
144
|
+
headers: Headers;
|
|
145
|
+
body?: string | undefined;
|
|
146
|
+
baseUrl?: string | undefined;
|
|
147
|
+
fetch?: typeof fetch | undefined;
|
|
148
|
+
formDataConstructor?: (new () => FormData) | undefined;
|
|
149
|
+
cache?: RequestCache | undefined;
|
|
150
|
+
credentials?: RequestCredentials | undefined;
|
|
151
|
+
integrity?: string | undefined;
|
|
152
|
+
keepalive?: boolean | undefined;
|
|
153
|
+
method?: string | undefined;
|
|
154
|
+
mode?: RequestMode | undefined;
|
|
155
|
+
redirect?: RequestRedirect | undefined;
|
|
156
|
+
referrer?: string | undefined;
|
|
157
|
+
referrerPolicy?: ReferrerPolicy | undefined;
|
|
158
|
+
signal?: AbortSignal | null | undefined;
|
|
159
|
+
window?: null | undefined;
|
|
160
|
+
};
|
|
161
|
+
multipart({ body, headers, ...req }: MultipartRequestOpts): {
|
|
162
|
+
body: undefined;
|
|
163
|
+
headers: Headers;
|
|
164
|
+
baseUrl?: string | undefined;
|
|
165
|
+
fetch?: typeof fetch | undefined;
|
|
166
|
+
formDataConstructor?: (new () => FormData) | undefined;
|
|
167
|
+
cache?: RequestCache | undefined;
|
|
168
|
+
credentials?: RequestCredentials | undefined;
|
|
169
|
+
integrity?: string | undefined;
|
|
170
|
+
keepalive?: boolean | undefined;
|
|
171
|
+
method?: string | undefined;
|
|
172
|
+
mode?: RequestMode | undefined;
|
|
173
|
+
redirect?: RequestRedirect | undefined;
|
|
174
|
+
referrer?: string | undefined;
|
|
175
|
+
referrerPolicy?: ReferrerPolicy | undefined;
|
|
176
|
+
signal?: AbortSignal | null | undefined;
|
|
177
|
+
window?: null | undefined;
|
|
178
|
+
} | {
|
|
179
|
+
body: FormData;
|
|
180
|
+
headers: Headers;
|
|
181
|
+
baseUrl?: string | undefined;
|
|
182
|
+
fetch?: typeof fetch | undefined;
|
|
183
|
+
formDataConstructor?: (new () => FormData) | undefined;
|
|
184
|
+
cache?: RequestCache | undefined;
|
|
185
|
+
credentials?: RequestCredentials | undefined;
|
|
186
|
+
integrity?: string | undefined;
|
|
187
|
+
keepalive?: boolean | undefined;
|
|
188
|
+
method?: string | undefined;
|
|
189
|
+
mode?: RequestMode | undefined;
|
|
190
|
+
redirect?: RequestRedirect | undefined;
|
|
191
|
+
referrer?: string | undefined;
|
|
192
|
+
referrerPolicy?: ReferrerPolicy | undefined;
|
|
193
|
+
signal?: AbortSignal | null | undefined;
|
|
194
|
+
window?: null | undefined;
|
|
195
|
+
};
|
|
196
|
+
};
|
|
197
|
+
|
|
198
|
+
export declare const SUCCESS_CODES: readonly [200, 201, 202, 204];
|
|
199
|
+
|
|
200
|
+
export declare type SuccessCodes = (typeof SUCCESS_CODES)[number];
|
|
201
|
+
|
|
202
|
+
export declare type SuccessResponse<T extends ApiResponse> = DataType<T, SuccessCodes>;
|
|
203
|
+
|
|
204
|
+
export declare type WithHeaders<T extends ApiResponse> = T & {
|
|
205
|
+
headers: Headers;
|
|
206
|
+
};
|
|
207
|
+
|
|
208
|
+
export { }
|
package/package.json
CHANGED
package/query.d.ts
CHANGED
|
@@ -1,20 +1,28 @@
|
|
|
1
|
-
/**
|
|
2
|
-
*
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
*
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
export declare function json(params: Record<string, any>, encoders?: (typeof encodeURIComponent)[]): string;
|
|
18
|
-
|
|
19
|
-
export declare const pipe: (params: Record<string, any>, encoders?: (typeof encodeURIComponent)[]) => string;
|
|
20
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Serializes nested objects according to the `deepObject` style specified in
|
|
3
|
+
* https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.0.md#style-values
|
|
4
|
+
*/
|
|
5
|
+
export declare function deep(params: Record<string, any>, [k, v]?: (typeof encodeURIComponent)[]): string;
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Property values of type array or object generate separate parameters
|
|
9
|
+
* for each value of the array, or key-value-pair of the map.
|
|
10
|
+
* For other types of properties this property has no effect.
|
|
11
|
+
* See https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.0.md#encoding-object
|
|
12
|
+
*/
|
|
13
|
+
export declare function explode(params: Record<string, any>, encoders?: (typeof encodeURIComponent)[]): string;
|
|
14
|
+
|
|
15
|
+
export declare const form: (params: Record<string, any>, encoders?: (typeof encodeURIComponent)[]) => string;
|
|
16
|
+
|
|
17
|
+
export declare function json(params: Record<string, any>, encoders?: (typeof encodeURIComponent)[]): string;
|
|
18
|
+
|
|
19
|
+
export declare const pipe: (params: Record<string, any>, encoders?: (typeof encodeURIComponent)[]) => string;
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Join params using an ampersand and prepends a questionmark if not empty.
|
|
23
|
+
*/
|
|
24
|
+
export declare function query(...params: string[]): string;
|
|
25
|
+
|
|
26
|
+
export declare const space: (params: Record<string, any>, encoders?: (typeof encodeURIComponent)[]) => string;
|
|
27
|
+
|
|
28
|
+
export { }
|
package/util.d.ts
CHANGED
|
@@ -1,13 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
*
|
|
10
|
-
*/
|
|
11
|
-
export declare function
|
|
12
|
-
|
|
13
|
-
export
|
|
1
|
+
export declare const allowReserved: (typeof encodeURI)[];
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Separate array values by the given delimiter.
|
|
5
|
+
*/
|
|
6
|
+
export declare function delimited(delimiter?: string): (params: Record<string, any>, encoders?: (typeof encodeURIComponent)[]) => string;
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Creates a tag-function to encode template strings with the given encoders.
|
|
10
|
+
*/
|
|
11
|
+
export declare function encode(encoders: Encoders, delimiter?: string): (strings: TemplateStringsArray, ...values: any[]) => string;
|
|
12
|
+
|
|
13
|
+
export declare const encodeReserved: (typeof encodeURIComponent)[];
|
|
14
|
+
|
|
15
|
+
declare type Encoders = Array<(s: string) => string>;
|
|
16
|
+
|
|
17
|
+
export declare function joinUrl(...parts: Array<string | undefined>): string;
|
|
18
|
+
|
|
19
|
+
export { }
|
package/runtime.d.ts
DELETED
|
@@ -1,115 +0,0 @@
|
|
|
1
|
-
import { ok } from "./index";
|
|
2
|
-
import { CustomHeaders, mergeHeaders } from "./headers";
|
|
3
|
-
export { type CustomHeaders };
|
|
4
|
-
export type RequestOpts = {
|
|
5
|
-
baseUrl?: string;
|
|
6
|
-
fetch?: typeof fetch;
|
|
7
|
-
formDataConstructor?: new () => FormData;
|
|
8
|
-
headers?: HeadersInit | CustomHeaders;
|
|
9
|
-
} & Omit<RequestInit, "body" | "headers">;
|
|
10
|
-
export type Defaults<Headers extends RequestOpts["headers"] = CustomHeaders> = Omit<RequestOpts, "headers" | "baseUrl"> & {
|
|
11
|
-
baseUrl: string;
|
|
12
|
-
headers: Headers;
|
|
13
|
-
};
|
|
14
|
-
type FetchRequestOpts = RequestOpts & {
|
|
15
|
-
body?: string | FormData | Blob;
|
|
16
|
-
};
|
|
17
|
-
type JsonRequestOpts = RequestOpts & {
|
|
18
|
-
body?: any;
|
|
19
|
-
};
|
|
20
|
-
type FormRequestOpts = RequestOpts & {
|
|
21
|
-
body?: Record<string, any>;
|
|
22
|
-
};
|
|
23
|
-
export type ApiResponse = {
|
|
24
|
-
status: number;
|
|
25
|
-
data?: any;
|
|
26
|
-
};
|
|
27
|
-
export type WithHeaders<T extends ApiResponse> = T & {
|
|
28
|
-
headers: Headers;
|
|
29
|
-
};
|
|
30
|
-
type MultipartRequestOpts = RequestOpts & {
|
|
31
|
-
body?: Record<string, unknown>;
|
|
32
|
-
};
|
|
33
|
-
export declare function runtime(defaults?: RequestOpts): {
|
|
34
|
-
ok: typeof ok;
|
|
35
|
-
fetchText: (url: string, req?: FetchRequestOpts) => Promise<{
|
|
36
|
-
status: number;
|
|
37
|
-
headers: Headers;
|
|
38
|
-
contentType: string | null;
|
|
39
|
-
data: string | undefined;
|
|
40
|
-
}>;
|
|
41
|
-
fetchJson: <T extends ApiResponse>(url: string, req?: FetchRequestOpts) => Promise<WithHeaders<T>>;
|
|
42
|
-
fetchBlob: <T_1 extends ApiResponse>(url: string, req?: FetchRequestOpts) => Promise<WithHeaders<T_1>>;
|
|
43
|
-
mergeHeaders: typeof mergeHeaders;
|
|
44
|
-
json({ body, headers, ...req }: JsonRequestOpts): {
|
|
45
|
-
headers: Headers;
|
|
46
|
-
body?: string | undefined;
|
|
47
|
-
baseUrl?: string | undefined;
|
|
48
|
-
fetch?: typeof fetch | undefined;
|
|
49
|
-
formDataConstructor?: (new () => FormData) | undefined;
|
|
50
|
-
cache?: RequestCache | undefined;
|
|
51
|
-
credentials?: RequestCredentials | undefined;
|
|
52
|
-
integrity?: string | undefined;
|
|
53
|
-
keepalive?: boolean | undefined;
|
|
54
|
-
method?: string | undefined;
|
|
55
|
-
mode?: RequestMode | undefined;
|
|
56
|
-
redirect?: RequestRedirect | undefined;
|
|
57
|
-
referrer?: string | undefined;
|
|
58
|
-
referrerPolicy?: ReferrerPolicy | undefined;
|
|
59
|
-
signal?: AbortSignal | null | undefined;
|
|
60
|
-
window?: null | undefined;
|
|
61
|
-
};
|
|
62
|
-
form({ body, headers, ...req }: FormRequestOpts): {
|
|
63
|
-
headers: Headers;
|
|
64
|
-
body?: string | undefined;
|
|
65
|
-
baseUrl?: string | undefined;
|
|
66
|
-
fetch?: typeof fetch | undefined;
|
|
67
|
-
formDataConstructor?: (new () => FormData) | undefined;
|
|
68
|
-
cache?: RequestCache | undefined;
|
|
69
|
-
credentials?: RequestCredentials | undefined;
|
|
70
|
-
integrity?: string | undefined;
|
|
71
|
-
keepalive?: boolean | undefined;
|
|
72
|
-
method?: string | undefined;
|
|
73
|
-
mode?: RequestMode | undefined;
|
|
74
|
-
redirect?: RequestRedirect | undefined;
|
|
75
|
-
referrer?: string | undefined;
|
|
76
|
-
referrerPolicy?: ReferrerPolicy | undefined;
|
|
77
|
-
signal?: AbortSignal | null | undefined;
|
|
78
|
-
window?: null | undefined;
|
|
79
|
-
};
|
|
80
|
-
multipart({ body, headers, ...req }: MultipartRequestOpts): {
|
|
81
|
-
body: undefined;
|
|
82
|
-
headers: Headers;
|
|
83
|
-
baseUrl?: string | undefined;
|
|
84
|
-
fetch?: typeof fetch | undefined;
|
|
85
|
-
formDataConstructor?: (new () => FormData) | undefined;
|
|
86
|
-
cache?: RequestCache | undefined;
|
|
87
|
-
credentials?: RequestCredentials | undefined;
|
|
88
|
-
integrity?: string | undefined;
|
|
89
|
-
keepalive?: boolean | undefined;
|
|
90
|
-
method?: string | undefined;
|
|
91
|
-
mode?: RequestMode | undefined;
|
|
92
|
-
redirect?: RequestRedirect | undefined;
|
|
93
|
-
referrer?: string | undefined;
|
|
94
|
-
referrerPolicy?: ReferrerPolicy | undefined;
|
|
95
|
-
signal?: AbortSignal | null | undefined;
|
|
96
|
-
window?: null | undefined;
|
|
97
|
-
} | {
|
|
98
|
-
body: FormData;
|
|
99
|
-
headers: Headers;
|
|
100
|
-
baseUrl?: string | undefined;
|
|
101
|
-
fetch?: typeof fetch | undefined;
|
|
102
|
-
formDataConstructor?: (new () => FormData) | undefined;
|
|
103
|
-
cache?: RequestCache | undefined;
|
|
104
|
-
credentials?: RequestCredentials | undefined;
|
|
105
|
-
integrity?: string | undefined;
|
|
106
|
-
keepalive?: boolean | undefined;
|
|
107
|
-
method?: string | undefined;
|
|
108
|
-
mode?: RequestMode | undefined;
|
|
109
|
-
redirect?: RequestRedirect | undefined;
|
|
110
|
-
referrer?: string | undefined;
|
|
111
|
-
referrerPolicy?: ReferrerPolicy | undefined;
|
|
112
|
-
signal?: AbortSignal | null | undefined;
|
|
113
|
-
window?: null | undefined;
|
|
114
|
-
};
|
|
115
|
-
};
|