better-call 0.0.0-experimental.01ff4b77

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (115) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +265 -0
  3. package/dist/capability.cjs +417 -0
  4. package/dist/capability.cjs.map +1 -0
  5. package/dist/capability.d.cts +189 -0
  6. package/dist/capability.d.mts +189 -0
  7. package/dist/capability.mjs +401 -0
  8. package/dist/capability.mjs.map +1 -0
  9. package/dist/error.cjs +76 -0
  10. package/dist/error.cjs.map +1 -0
  11. package/dist/error.d.cts +51 -0
  12. package/dist/error.d.mts +51 -0
  13. package/dist/error.mjs +72 -0
  14. package/dist/error.mjs.map +1 -0
  15. package/dist/fn.cjs +350 -0
  16. package/dist/fn.cjs.map +1 -0
  17. package/dist/fn.d.cts +378 -0
  18. package/dist/fn.d.mts +378 -0
  19. package/dist/fn.mjs +350 -0
  20. package/dist/fn.mjs.map +1 -0
  21. package/dist/index.cjs +43 -0
  22. package/dist/index.cjs.map +1 -0
  23. package/dist/index.d.cts +50 -0
  24. package/dist/index.d.mts +50 -0
  25. package/dist/index.mjs +24 -0
  26. package/dist/index.mjs.map +1 -0
  27. package/dist/module.cjs +176 -0
  28. package/dist/module.cjs.map +1 -0
  29. package/dist/module.d.cts +283 -0
  30. package/dist/module.d.mts +283 -0
  31. package/dist/module.mjs +166 -0
  32. package/dist/module.mjs.map +1 -0
  33. package/dist/plugins/db.cjs +24 -0
  34. package/dist/plugins/db.cjs.map +1 -0
  35. package/dist/plugins/db.d.cts +18 -0
  36. package/dist/plugins/db.d.mts +18 -0
  37. package/dist/plugins/db.mjs +19 -0
  38. package/dist/plugins/db.mjs.map +1 -0
  39. package/dist/plugins/http/attrs.cjs +91 -0
  40. package/dist/plugins/http/attrs.cjs.map +1 -0
  41. package/dist/plugins/http/attrs.d.cts +26 -0
  42. package/dist/plugins/http/attrs.d.mts +26 -0
  43. package/dist/plugins/http/attrs.mjs +87 -0
  44. package/dist/plugins/http/attrs.mjs.map +1 -0
  45. package/dist/plugins/http/cookie.cjs +117 -0
  46. package/dist/plugins/http/cookie.cjs.map +1 -0
  47. package/dist/plugins/http/cookie.d.cts +637 -0
  48. package/dist/plugins/http/cookie.d.mts +637 -0
  49. package/dist/plugins/http/cookie.mjs +113 -0
  50. package/dist/plugins/http/cookie.mjs.map +1 -0
  51. package/dist/plugins/http/error.cjs +39 -0
  52. package/dist/plugins/http/error.cjs.map +1 -0
  53. package/dist/plugins/http/error.d.cts +38 -0
  54. package/dist/plugins/http/error.d.mts +38 -0
  55. package/dist/plugins/http/error.mjs +35 -0
  56. package/dist/plugins/http/error.mjs.map +1 -0
  57. package/dist/plugins/http/handle.cjs +73 -0
  58. package/dist/plugins/http/handle.cjs.map +1 -0
  59. package/dist/plugins/http/handle.d.cts +955 -0
  60. package/dist/plugins/http/handle.d.mts +955 -0
  61. package/dist/plugins/http/handle.mjs +72 -0
  62. package/dist/plugins/http/handle.mjs.map +1 -0
  63. package/dist/plugins/http/redirect.cjs +82 -0
  64. package/dist/plugins/http/redirect.cjs.map +1 -0
  65. package/dist/plugins/http/redirect.d.cts +67 -0
  66. package/dist/plugins/http/redirect.d.mts +67 -0
  67. package/dist/plugins/http/redirect.mjs +79 -0
  68. package/dist/plugins/http/redirect.mjs.map +1 -0
  69. package/dist/plugins/http/request.cjs +63 -0
  70. package/dist/plugins/http/request.cjs.map +1 -0
  71. package/dist/plugins/http/request.d.cts +142 -0
  72. package/dist/plugins/http/request.d.mts +142 -0
  73. package/dist/plugins/http/request.mjs +61 -0
  74. package/dist/plugins/http/request.mjs.map +1 -0
  75. package/dist/plugins/http/response.cjs +13 -0
  76. package/dist/plugins/http/response.cjs.map +1 -0
  77. package/dist/plugins/http/response.d.cts +18 -0
  78. package/dist/plugins/http/response.d.mts +18 -0
  79. package/dist/plugins/http/response.mjs +13 -0
  80. package/dist/plugins/http/response.mjs.map +1 -0
  81. package/dist/plugins/http.cjs +64 -0
  82. package/dist/plugins/http.cjs.map +1 -0
  83. package/dist/plugins/http.d.cts +945 -0
  84. package/dist/plugins/http.d.mts +945 -0
  85. package/dist/plugins/http.mjs +37 -0
  86. package/dist/plugins/http.mjs.map +1 -0
  87. package/dist/plugins/read-only.cjs +19 -0
  88. package/dist/plugins/read-only.cjs.map +1 -0
  89. package/dist/plugins/read-only.d.cts +17 -0
  90. package/dist/plugins/read-only.d.mts +17 -0
  91. package/dist/plugins/read-only.mjs +19 -0
  92. package/dist/plugins/read-only.mjs.map +1 -0
  93. package/dist/schema.cjs +245 -0
  94. package/dist/schema.cjs.map +1 -0
  95. package/dist/schema.d.cts +411 -0
  96. package/dist/schema.d.mts +411 -0
  97. package/dist/schema.mjs +235 -0
  98. package/dist/schema.mjs.map +1 -0
  99. package/dist/scope.d.cts +31 -0
  100. package/dist/scope.d.mts +31 -0
  101. package/dist/storage.cjs +308 -0
  102. package/dist/storage.cjs.map +1 -0
  103. package/dist/storage.d.cts +220 -0
  104. package/dist/storage.d.mts +220 -0
  105. package/dist/storage.mjs +302 -0
  106. package/dist/storage.mjs.map +1 -0
  107. package/dist/types.d.cts +8 -0
  108. package/dist/types.d.mts +8 -0
  109. package/dist/var.cjs +186 -0
  110. package/dist/var.cjs.map +1 -0
  111. package/dist/var.d.cts +46 -0
  112. package/dist/var.d.mts +46 -0
  113. package/dist/var.mjs +177 -0
  114. package/dist/var.mjs.map +1 -0
  115. package/package.json +114 -0
@@ -0,0 +1,945 @@
1
+ import { TypeDefination } from "../schema.cjs";
2
+ import { FnDefination } from "../fn.cjs";
3
+ import { VarDefination } from "../var.cjs";
4
+ import { HttpResponse, res, toResponse } from "./http/response.cjs";
5
+ import { HttpRequest, fromRequest, req, toHttpRequest } from "./http/request.cjs";
6
+ import { HttpErrMeta, applyError, err, errorStatus, kHttpErr, statusOf } from "./http/error.cjs";
7
+ import { CreateHandlerContext, CreateHandlerOptions, createHandler, handler } from "./http/handle.cjs";
8
+ import { Redirect, RedirectStatus, applyRedirect, asResponse, redirect } from "./http/redirect.cjs";
9
+ import { clientSchema, fromJsonBody, rejectServerOnly, serverOnly, wireInput } from "./http/attrs.cjs";
10
+ import { CookieOptions, cookieOptions, cookieShape, deleteCookie, getCookie, setCookie } from "./http/cookie.cjs";
11
+ //#region src/plugins/http/index.d.ts
12
+ declare const http: {
13
+ req: VarDefination<"req", HttpRequest | null, undefined, never>;
14
+ res: VarDefination<"res", HttpResponse | null, undefined, never>;
15
+ cookieOptions: VarDefination<"cookieOptions", {
16
+ maxAge?: number | null | undefined;
17
+ expires?: Date | null | undefined;
18
+ path?: string | null | undefined;
19
+ domain?: string | null | undefined;
20
+ secure?: boolean | null | undefined;
21
+ httpOnly?: boolean | null | undefined;
22
+ sameSite?: "strict" | "none" | "lax" | null | undefined;
23
+ }, TypeDefination<{
24
+ maxAge?: number | null | undefined;
25
+ expires?: Date | null | undefined;
26
+ path?: string | null | undefined;
27
+ domain?: string | null | undefined;
28
+ secure?: boolean | null | undefined;
29
+ httpOnly?: boolean | null | undefined;
30
+ sameSite?: "strict" | "none" | "lax" | null | undefined;
31
+ }, {
32
+ maxAge?: number | null | undefined;
33
+ expires?: Date | null | undefined;
34
+ path?: string | null | undefined;
35
+ domain?: string | null | undefined;
36
+ secure?: boolean | null | undefined;
37
+ httpOnly?: boolean | null | undefined;
38
+ sameSite?: "strict" | "none" | "lax" | null | undefined;
39
+ }, never>, never>;
40
+ fromRequest: FnDefination<{
41
+ readonly request: Request;
42
+ }, Promise<{
43
+ method: string;
44
+ path: string;
45
+ }>, "http.from_request", {
46
+ readonly request: TypeDefination<Request, Request, never>;
47
+ }, readonly ["req"], {}, {
48
+ res?: ({
49
+ headers: {
50
+ append: (name: string, value: string) => void;
51
+ delete: (name: string) => void;
52
+ get: (name: string) => string | null;
53
+ getSetCookie: () => string[];
54
+ has: (name: string) => boolean;
55
+ set: (name: string, value: string) => void;
56
+ forEach: (callbackfn: (value: string, key: string, parent: Headers) => void, thisArg?: any) => void;
57
+ entries: () => HeadersIterator<[string, string]>;
58
+ keys: () => HeadersIterator<string>;
59
+ values: () => HeadersIterator<string>;
60
+ [Symbol.iterator]: () => HeadersIterator<[string, string]>;
61
+ };
62
+ status?: number | undefined;
63
+ statusText?: string | undefined;
64
+ } & HttpResponse) | null | undefined;
65
+ req?: ({
66
+ raw: {
67
+ readonly cache: RequestCache;
68
+ readonly credentials: RequestCredentials;
69
+ readonly destination: RequestDestination;
70
+ readonly headers: {
71
+ append: (name: string, value: string) => void;
72
+ delete: (name: string) => void;
73
+ get: (name: string) => string | null;
74
+ getSetCookie: () => string[];
75
+ has: (name: string) => boolean;
76
+ set: (name: string, value: string) => void;
77
+ forEach: (callbackfn: (value: string, key: string, parent: Headers) => void, thisArg?: any) => void;
78
+ entries: () => HeadersIterator<[string, string]>;
79
+ keys: () => HeadersIterator<string>;
80
+ values: () => HeadersIterator<string>;
81
+ [Symbol.iterator]: () => HeadersIterator<[string, string]>;
82
+ };
83
+ readonly integrity: string;
84
+ readonly keepalive: boolean;
85
+ readonly method: string;
86
+ readonly mode: RequestMode;
87
+ readonly redirect: RequestRedirect;
88
+ readonly referrer: string;
89
+ readonly referrerPolicy: ReferrerPolicy;
90
+ readonly signal: {
91
+ readonly aborted: boolean;
92
+ onabort: ((this: AbortSignal, ev: Event) => any) | null;
93
+ readonly reason: any;
94
+ throwIfAborted: () => void;
95
+ addEventListener: {
96
+ <K extends keyof AbortSignalEventMap>(type: K, listener: (this: AbortSignal, ev: AbortSignalEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
97
+ (type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
98
+ };
99
+ removeEventListener: {
100
+ <K extends keyof AbortSignalEventMap>(type: K, listener: (this: AbortSignal, ev: AbortSignalEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
101
+ (type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
102
+ };
103
+ dispatchEvent: (event: Event) => boolean;
104
+ };
105
+ readonly url: string;
106
+ clone: () => Request;
107
+ readonly body: {
108
+ readonly locked: boolean;
109
+ cancel: (reason?: any) => Promise<void>;
110
+ getReader: {
111
+ (options: {
112
+ mode: "byob";
113
+ }): ReadableStreamBYOBReader;
114
+ (): ReadableStreamDefaultReader<Uint8Array<ArrayBuffer>>;
115
+ (options?: ReadableStreamGetReaderOptions): ReadableStreamReader<Uint8Array<ArrayBuffer>>;
116
+ };
117
+ pipeThrough: <T>(transform: ReadableWritablePair<T, Uint8Array<ArrayBuffer>>, options?: StreamPipeOptions) => ReadableStream<T>;
118
+ pipeTo: (destination: WritableStream<Uint8Array<ArrayBuffer>>, options?: StreamPipeOptions) => Promise<void>;
119
+ tee: () => [ReadableStream<Uint8Array<ArrayBuffer>>, ReadableStream<Uint8Array<ArrayBuffer>>];
120
+ values: (options?: ReadableStreamIteratorOptions) => ReadableStreamAsyncIterator<Uint8Array<ArrayBuffer>>;
121
+ [Symbol.asyncIterator]: (options?: ReadableStreamIteratorOptions) => ReadableStreamAsyncIterator<Uint8Array<ArrayBuffer>>;
122
+ } | null;
123
+ readonly bodyUsed: boolean;
124
+ arrayBuffer: () => Promise<ArrayBuffer>;
125
+ blob: () => Promise<Blob>;
126
+ bytes: () => Promise<Uint8Array<ArrayBuffer>>;
127
+ formData: () => Promise<FormData>;
128
+ json: () => Promise<any>;
129
+ text: () => Promise<string>;
130
+ };
131
+ method: string;
132
+ path: string;
133
+ headers: {
134
+ append: (name: string, value: string) => void;
135
+ delete: (name: string) => void;
136
+ get: (name: string) => string | null;
137
+ getSetCookie: () => string[];
138
+ has: (name: string) => boolean;
139
+ set: (name: string, value: string) => void;
140
+ forEach: (callbackfn: (value: string, key: string, parent: Headers) => void, thisArg?: any) => void;
141
+ entries: () => HeadersIterator<[string, string]>;
142
+ keys: () => HeadersIterator<string>;
143
+ values: () => HeadersIterator<string>;
144
+ [Symbol.iterator]: () => HeadersIterator<[string, string]>;
145
+ };
146
+ query: {
147
+ [x: string]: string | string[];
148
+ };
149
+ cookies: {
150
+ [x: string]: string;
151
+ };
152
+ body: unknown;
153
+ } & HttpRequest) | null | undefined;
154
+ }, unknown>;
155
+ handler: FnDefination<{
156
+ readonly request: Request;
157
+ readonly run: (c: any) => unknown | Promise<unknown>;
158
+ }, Promise<Response>, "http.handler", {
159
+ readonly request: TypeDefination<Request, Request, never>;
160
+ readonly run: TypeDefination<(c: any) => unknown | Promise<unknown>, (c: any) => unknown | Promise<unknown>, never>;
161
+ }, readonly [], {}, {
162
+ res?: ({
163
+ headers: {
164
+ append: (name: string, value: string) => void;
165
+ delete: (name: string) => void;
166
+ get: (name: string) => string | null;
167
+ getSetCookie: () => string[];
168
+ has: (name: string) => boolean;
169
+ set: (name: string, value: string) => void;
170
+ forEach: (callbackfn: (value: string, key: string, parent: Headers) => void, thisArg?: any) => void;
171
+ entries: () => HeadersIterator<[string, string]>;
172
+ keys: () => HeadersIterator<string>;
173
+ values: () => HeadersIterator<string>;
174
+ [Symbol.iterator]: () => HeadersIterator<[string, string]>;
175
+ };
176
+ status?: number | undefined;
177
+ statusText?: string | undefined;
178
+ } & HttpResponse) | null | undefined;
179
+ req?: ({
180
+ raw: {
181
+ readonly cache: RequestCache;
182
+ readonly credentials: RequestCredentials;
183
+ readonly destination: RequestDestination;
184
+ readonly headers: {
185
+ append: (name: string, value: string) => void;
186
+ delete: (name: string) => void;
187
+ get: (name: string) => string | null;
188
+ getSetCookie: () => string[];
189
+ has: (name: string) => boolean;
190
+ set: (name: string, value: string) => void;
191
+ forEach: (callbackfn: (value: string, key: string, parent: Headers) => void, thisArg?: any) => void;
192
+ entries: () => HeadersIterator<[string, string]>;
193
+ keys: () => HeadersIterator<string>;
194
+ values: () => HeadersIterator<string>;
195
+ [Symbol.iterator]: () => HeadersIterator<[string, string]>;
196
+ };
197
+ readonly integrity: string;
198
+ readonly keepalive: boolean;
199
+ readonly method: string;
200
+ readonly mode: RequestMode;
201
+ readonly redirect: RequestRedirect;
202
+ readonly referrer: string;
203
+ readonly referrerPolicy: ReferrerPolicy;
204
+ readonly signal: {
205
+ readonly aborted: boolean;
206
+ onabort: ((this: AbortSignal, ev: Event) => any) | null;
207
+ readonly reason: any;
208
+ throwIfAborted: () => void;
209
+ addEventListener: {
210
+ <K extends keyof AbortSignalEventMap>(type: K, listener: (this: AbortSignal, ev: AbortSignalEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
211
+ (type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
212
+ };
213
+ removeEventListener: {
214
+ <K extends keyof AbortSignalEventMap>(type: K, listener: (this: AbortSignal, ev: AbortSignalEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
215
+ (type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
216
+ };
217
+ dispatchEvent: (event: Event) => boolean;
218
+ };
219
+ readonly url: string;
220
+ clone: () => Request;
221
+ readonly body: {
222
+ readonly locked: boolean;
223
+ cancel: (reason?: any) => Promise<void>;
224
+ getReader: {
225
+ (options: {
226
+ mode: "byob";
227
+ }): ReadableStreamBYOBReader;
228
+ (): ReadableStreamDefaultReader<Uint8Array<ArrayBuffer>>;
229
+ (options?: ReadableStreamGetReaderOptions): ReadableStreamReader<Uint8Array<ArrayBuffer>>;
230
+ };
231
+ pipeThrough: <T>(transform: ReadableWritablePair<T, Uint8Array<ArrayBuffer>>, options?: StreamPipeOptions) => ReadableStream<T>;
232
+ pipeTo: (destination: WritableStream<Uint8Array<ArrayBuffer>>, options?: StreamPipeOptions) => Promise<void>;
233
+ tee: () => [ReadableStream<Uint8Array<ArrayBuffer>>, ReadableStream<Uint8Array<ArrayBuffer>>];
234
+ values: (options?: ReadableStreamIteratorOptions) => ReadableStreamAsyncIterator<Uint8Array<ArrayBuffer>>;
235
+ [Symbol.asyncIterator]: (options?: ReadableStreamIteratorOptions) => ReadableStreamAsyncIterator<Uint8Array<ArrayBuffer>>;
236
+ } | null;
237
+ readonly bodyUsed: boolean;
238
+ arrayBuffer: () => Promise<ArrayBuffer>;
239
+ blob: () => Promise<Blob>;
240
+ bytes: () => Promise<Uint8Array<ArrayBuffer>>;
241
+ formData: () => Promise<FormData>;
242
+ json: () => Promise<any>;
243
+ text: () => Promise<string>;
244
+ };
245
+ method: string;
246
+ path: string;
247
+ headers: {
248
+ append: (name: string, value: string) => void;
249
+ delete: (name: string) => void;
250
+ get: (name: string) => string | null;
251
+ getSetCookie: () => string[];
252
+ has: (name: string) => boolean;
253
+ set: (name: string, value: string) => void;
254
+ forEach: (callbackfn: (value: string, key: string, parent: Headers) => void, thisArg?: any) => void;
255
+ entries: () => HeadersIterator<[string, string]>;
256
+ keys: () => HeadersIterator<string>;
257
+ values: () => HeadersIterator<string>;
258
+ [Symbol.iterator]: () => HeadersIterator<[string, string]>;
259
+ };
260
+ query: {
261
+ [x: string]: string | string[];
262
+ };
263
+ cookies: {
264
+ [x: string]: string;
265
+ };
266
+ body: unknown;
267
+ } & HttpRequest) | null | undefined;
268
+ cookieOptions?: ({
269
+ maxAge?: number | null | undefined;
270
+ expires?: Date | null | undefined;
271
+ path?: string | null | undefined;
272
+ domain?: string | null | undefined;
273
+ secure?: boolean | null | undefined;
274
+ httpOnly?: boolean | null | undefined;
275
+ sameSite?: "strict" | "none" | "lax" | null | undefined;
276
+ } & {
277
+ maxAge?: number | null | undefined;
278
+ expires?: Date | null | undefined;
279
+ path?: string | null | undefined;
280
+ domain?: string | null | undefined;
281
+ secure?: boolean | null | undefined;
282
+ httpOnly?: boolean | null | undefined;
283
+ sameSite?: "strict" | "none" | "lax" | null | undefined;
284
+ }) | undefined;
285
+ fromRequest?: ((input: {
286
+ readonly request: Request;
287
+ }) => Promise<{
288
+ method: string;
289
+ path: string;
290
+ }>) | undefined;
291
+ redirect?: ((input: {
292
+ readonly url: string;
293
+ readonly status?: number | undefined;
294
+ }) => never) | undefined;
295
+ getCookie?: ((...args: string[]) => string | null) | undefined;
296
+ setCookie?: ((input: {
297
+ readonly name: string;
298
+ readonly value: string;
299
+ readonly options?: {
300
+ maxAge?: number | null | undefined;
301
+ expires?: Date | null | undefined;
302
+ path?: string | null | undefined;
303
+ domain?: string | null | undefined;
304
+ secure?: boolean | null | undefined;
305
+ httpOnly?: boolean | null | undefined;
306
+ sameSite?: "strict" | "none" | "lax" | null | undefined;
307
+ } | null | undefined;
308
+ }) => {
309
+ set: boolean;
310
+ }) | undefined;
311
+ deleteCookie?: ((input: {
312
+ readonly name: string;
313
+ readonly options?: {
314
+ maxAge?: number | null | undefined;
315
+ expires?: Date | null | undefined;
316
+ path?: string | null | undefined;
317
+ domain?: string | null | undefined;
318
+ secure?: boolean | null | undefined;
319
+ httpOnly?: boolean | null | undefined;
320
+ sameSite?: "strict" | "none" | "lax" | null | undefined;
321
+ } | null | undefined;
322
+ }) => {
323
+ set: boolean;
324
+ }) | undefined;
325
+ }, unknown>;
326
+ createHandler: typeof createHandler;
327
+ getCookie: FnDefination<{
328
+ [x: number]: string;
329
+ 0: string;
330
+ length: 1;
331
+ toString: () => string;
332
+ toLocaleString: {
333
+ (): string;
334
+ (locales: string | string[], options?: Intl.NumberFormatOptions & Intl.DateTimeFormatOptions): string;
335
+ };
336
+ pop: () => string | undefined;
337
+ push: (...items: string[]) => number;
338
+ concat: {
339
+ (...items: ConcatArray<string>[]): string[];
340
+ (...items: (string | ConcatArray<string>)[]): string[];
341
+ };
342
+ join: (separator?: string) => string;
343
+ reverse: () => string[];
344
+ shift: () => string | undefined;
345
+ slice: (start?: number, end?: number) => string[];
346
+ sort: (compareFn?: ((a: string, b: string) => number) | undefined) => [string] & {};
347
+ splice: {
348
+ (start: number, deleteCount?: number): string[];
349
+ (start: number, deleteCount: number, ...items: string[]): string[];
350
+ };
351
+ unshift: (...items: string[]) => number;
352
+ indexOf: (searchElement: string, fromIndex?: number) => number;
353
+ lastIndexOf: (searchElement: string, fromIndex?: number) => number;
354
+ every: {
355
+ <S extends string>(predicate: (value: string, index: number, array: string[]) => value is S, thisArg?: any): this is S[];
356
+ (predicate: (value: string, index: number, array: string[]) => unknown, thisArg?: any): boolean;
357
+ };
358
+ some: (predicate: (value: string, index: number, array: string[]) => unknown, thisArg?: any) => boolean;
359
+ forEach: (callbackfn: (value: string, index: number, array: string[]) => void, thisArg?: any) => void;
360
+ map: <U>(callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any) => U[];
361
+ filter: {
362
+ <S extends string>(predicate: (value: string, index: number, array: string[]) => value is S, thisArg?: any): S[];
363
+ (predicate: (value: string, index: number, array: string[]) => unknown, thisArg?: any): string[];
364
+ };
365
+ reduce: {
366
+ (callbackfn: (previousValue: string, currentValue: string, currentIndex: number, array: string[]) => string): string;
367
+ (callbackfn: (previousValue: string, currentValue: string, currentIndex: number, array: string[]) => string, initialValue: string): string;
368
+ <U>(callbackfn: (previousValue: U, currentValue: string, currentIndex: number, array: string[]) => U, initialValue: U): U;
369
+ };
370
+ reduceRight: {
371
+ (callbackfn: (previousValue: string, currentValue: string, currentIndex: number, array: string[]) => string): string;
372
+ (callbackfn: (previousValue: string, currentValue: string, currentIndex: number, array: string[]) => string, initialValue: string): string;
373
+ <U>(callbackfn: (previousValue: U, currentValue: string, currentIndex: number, array: string[]) => U, initialValue: U): U;
374
+ };
375
+ find: {
376
+ <S extends string>(predicate: (value: string, index: number, obj: string[]) => value is S, thisArg?: any): S | undefined;
377
+ (predicate: (value: string, index: number, obj: string[]) => unknown, thisArg?: any): string | undefined;
378
+ };
379
+ findIndex: (predicate: (value: string, index: number, obj: string[]) => unknown, thisArg?: any) => number;
380
+ fill: (value: string, start?: number, end?: number) => [string] & {};
381
+ copyWithin: (target: number, start: number, end?: number) => [string] & {};
382
+ entries: () => ArrayIterator<[number, string]>;
383
+ keys: () => ArrayIterator<number>;
384
+ values: () => ArrayIterator<string>;
385
+ includes: (searchElement: string, fromIndex?: number) => boolean;
386
+ flatMap: <U, This = undefined>(callback: (this: This, value: string, index: number, array: string[]) => U | readonly U[], thisArg?: This | undefined) => U[];
387
+ flat: <A, D extends number = 1>(this: A, depth?: D | undefined) => FlatArray<A, D>[];
388
+ at: (index: number) => string | undefined;
389
+ findLast: {
390
+ <S extends string>(predicate: (value: string, index: number, array: string[]) => value is S, thisArg?: any): S | undefined;
391
+ (predicate: (value: string, index: number, array: string[]) => unknown, thisArg?: any): string | undefined;
392
+ };
393
+ findLastIndex: (predicate: (value: string, index: number, array: string[]) => unknown, thisArg?: any) => number;
394
+ toReversed: () => string[];
395
+ toSorted: (compareFn?: ((a: string, b: string) => number) | undefined) => string[];
396
+ toSpliced: {
397
+ (start: number, deleteCount: number, ...items: string[]): string[];
398
+ (start: number, deleteCount?: number): string[];
399
+ };
400
+ with: (index: number, value: string) => string[];
401
+ [Symbol.iterator]: () => ArrayIterator<string>;
402
+ readonly [Symbol.unscopables]: {
403
+ [x: number]: boolean | undefined;
404
+ length?: boolean | undefined;
405
+ toString?: boolean | undefined;
406
+ toLocaleString?: boolean | undefined;
407
+ pop?: boolean | undefined;
408
+ push?: boolean | undefined;
409
+ concat?: boolean | undefined;
410
+ join?: boolean | undefined;
411
+ reverse?: boolean | undefined;
412
+ shift?: boolean | undefined;
413
+ slice?: boolean | undefined;
414
+ sort?: boolean | undefined;
415
+ splice?: boolean | undefined;
416
+ unshift?: boolean | undefined;
417
+ indexOf?: boolean | undefined;
418
+ lastIndexOf?: boolean | undefined;
419
+ every?: boolean | undefined;
420
+ some?: boolean | undefined;
421
+ forEach?: boolean | undefined;
422
+ map?: boolean | undefined;
423
+ filter?: boolean | undefined;
424
+ reduce?: boolean | undefined;
425
+ reduceRight?: boolean | undefined;
426
+ find?: boolean | undefined;
427
+ findIndex?: boolean | undefined;
428
+ fill?: boolean | undefined;
429
+ copyWithin?: boolean | undefined;
430
+ entries?: boolean | undefined;
431
+ keys?: boolean | undefined;
432
+ values?: boolean | undefined;
433
+ includes?: boolean | undefined;
434
+ flatMap?: boolean | undefined;
435
+ flat?: boolean | undefined;
436
+ at?: boolean | undefined;
437
+ findLast?: boolean | undefined;
438
+ findLastIndex?: boolean | undefined;
439
+ toReversed?: boolean | undefined;
440
+ toSorted?: boolean | undefined;
441
+ toSpliced?: boolean | undefined;
442
+ with?: boolean | undefined;
443
+ [Symbol.iterator]?: boolean | undefined;
444
+ readonly [Symbol.unscopables]?: boolean | undefined;
445
+ };
446
+ }, string | null, "cookie.get", readonly [TypeDefination<string, string, never>], readonly [], {}, {
447
+ res?: ({
448
+ headers: {
449
+ append: (name: string, value: string) => void;
450
+ delete: (name: string) => void;
451
+ get: (name: string) => string | null;
452
+ getSetCookie: () => string[];
453
+ has: (name: string) => boolean;
454
+ set: (name: string, value: string) => void;
455
+ forEach: (callbackfn: (value: string, key: string, parent: Headers) => void, thisArg?: any) => void;
456
+ entries: () => HeadersIterator<[string, string]>;
457
+ keys: () => HeadersIterator<string>;
458
+ values: () => HeadersIterator<string>;
459
+ [Symbol.iterator]: () => HeadersIterator<[string, string]>;
460
+ };
461
+ status?: number | undefined;
462
+ statusText?: string | undefined;
463
+ } & HttpResponse) | null | undefined;
464
+ req?: ({
465
+ raw: {
466
+ readonly cache: RequestCache;
467
+ readonly credentials: RequestCredentials;
468
+ readonly destination: RequestDestination;
469
+ readonly headers: {
470
+ append: (name: string, value: string) => void;
471
+ delete: (name: string) => void;
472
+ get: (name: string) => string | null;
473
+ getSetCookie: () => string[];
474
+ has: (name: string) => boolean;
475
+ set: (name: string, value: string) => void;
476
+ forEach: (callbackfn: (value: string, key: string, parent: Headers) => void, thisArg?: any) => void;
477
+ entries: () => HeadersIterator<[string, string]>;
478
+ keys: () => HeadersIterator<string>;
479
+ values: () => HeadersIterator<string>;
480
+ [Symbol.iterator]: () => HeadersIterator<[string, string]>;
481
+ };
482
+ readonly integrity: string;
483
+ readonly keepalive: boolean;
484
+ readonly method: string;
485
+ readonly mode: RequestMode;
486
+ readonly redirect: RequestRedirect;
487
+ readonly referrer: string;
488
+ readonly referrerPolicy: ReferrerPolicy;
489
+ readonly signal: {
490
+ readonly aborted: boolean;
491
+ onabort: ((this: AbortSignal, ev: Event) => any) | null;
492
+ readonly reason: any;
493
+ throwIfAborted: () => void;
494
+ addEventListener: {
495
+ <K extends keyof AbortSignalEventMap>(type: K, listener: (this: AbortSignal, ev: AbortSignalEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
496
+ (type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
497
+ };
498
+ removeEventListener: {
499
+ <K extends keyof AbortSignalEventMap>(type: K, listener: (this: AbortSignal, ev: AbortSignalEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
500
+ (type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
501
+ };
502
+ dispatchEvent: (event: Event) => boolean;
503
+ };
504
+ readonly url: string;
505
+ clone: () => Request;
506
+ readonly body: {
507
+ readonly locked: boolean;
508
+ cancel: (reason?: any) => Promise<void>;
509
+ getReader: {
510
+ (options: {
511
+ mode: "byob";
512
+ }): ReadableStreamBYOBReader;
513
+ (): ReadableStreamDefaultReader<Uint8Array<ArrayBuffer>>;
514
+ (options?: ReadableStreamGetReaderOptions): ReadableStreamReader<Uint8Array<ArrayBuffer>>;
515
+ };
516
+ pipeThrough: <T>(transform: ReadableWritablePair<T, Uint8Array<ArrayBuffer>>, options?: StreamPipeOptions) => ReadableStream<T>;
517
+ pipeTo: (destination: WritableStream<Uint8Array<ArrayBuffer>>, options?: StreamPipeOptions) => Promise<void>;
518
+ tee: () => [ReadableStream<Uint8Array<ArrayBuffer>>, ReadableStream<Uint8Array<ArrayBuffer>>];
519
+ values: (options?: ReadableStreamIteratorOptions) => ReadableStreamAsyncIterator<Uint8Array<ArrayBuffer>>;
520
+ [Symbol.asyncIterator]: (options?: ReadableStreamIteratorOptions) => ReadableStreamAsyncIterator<Uint8Array<ArrayBuffer>>;
521
+ } | null;
522
+ readonly bodyUsed: boolean;
523
+ arrayBuffer: () => Promise<ArrayBuffer>;
524
+ blob: () => Promise<Blob>;
525
+ bytes: () => Promise<Uint8Array<ArrayBuffer>>;
526
+ formData: () => Promise<FormData>;
527
+ json: () => Promise<any>;
528
+ text: () => Promise<string>;
529
+ };
530
+ method: string;
531
+ path: string;
532
+ headers: {
533
+ append: (name: string, value: string) => void;
534
+ delete: (name: string) => void;
535
+ get: (name: string) => string | null;
536
+ getSetCookie: () => string[];
537
+ has: (name: string) => boolean;
538
+ set: (name: string, value: string) => void;
539
+ forEach: (callbackfn: (value: string, key: string, parent: Headers) => void, thisArg?: any) => void;
540
+ entries: () => HeadersIterator<[string, string]>;
541
+ keys: () => HeadersIterator<string>;
542
+ values: () => HeadersIterator<string>;
543
+ [Symbol.iterator]: () => HeadersIterator<[string, string]>;
544
+ };
545
+ query: {
546
+ [x: string]: string | string[];
547
+ };
548
+ cookies: {
549
+ [x: string]: string;
550
+ };
551
+ body: unknown;
552
+ } & HttpRequest) | null | undefined;
553
+ cookieOptions?: ({
554
+ maxAge?: number | null | undefined;
555
+ expires?: Date | null | undefined;
556
+ path?: string | null | undefined;
557
+ domain?: string | null | undefined;
558
+ secure?: boolean | null | undefined;
559
+ httpOnly?: boolean | null | undefined;
560
+ sameSite?: "strict" | "none" | "lax" | null | undefined;
561
+ } & {
562
+ maxAge?: number | null | undefined;
563
+ expires?: Date | null | undefined;
564
+ path?: string | null | undefined;
565
+ domain?: string | null | undefined;
566
+ secure?: boolean | null | undefined;
567
+ httpOnly?: boolean | null | undefined;
568
+ sameSite?: "strict" | "none" | "lax" | null | undefined;
569
+ }) | undefined;
570
+ }, unknown>;
571
+ setCookie: FnDefination<{
572
+ readonly name: string;
573
+ readonly value: string;
574
+ readonly options?: {
575
+ maxAge?: number | null | undefined;
576
+ expires?: Date | null | undefined;
577
+ path?: string | null | undefined;
578
+ domain?: string | null | undefined;
579
+ secure?: boolean | null | undefined;
580
+ httpOnly?: boolean | null | undefined;
581
+ sameSite?: "strict" | "none" | "lax" | null | undefined;
582
+ } | null | undefined;
583
+ }, {
584
+ set: boolean;
585
+ }, "cookie.set", {
586
+ readonly name: TypeDefination<string, string, never>;
587
+ readonly value: TypeDefination<string, string, never>;
588
+ readonly options: TypeDefination<{
589
+ maxAge?: number | null | undefined;
590
+ expires?: Date | null | undefined;
591
+ path?: string | null | undefined;
592
+ domain?: string | null | undefined;
593
+ secure?: boolean | null | undefined;
594
+ httpOnly?: boolean | null | undefined;
595
+ sameSite?: "strict" | "none" | "lax" | null | undefined;
596
+ }, {
597
+ maxAge?: number | null | undefined;
598
+ expires?: Date | null | undefined;
599
+ path?: string | null | undefined;
600
+ domain?: string | null | undefined;
601
+ secure?: boolean | null | undefined;
602
+ httpOnly?: boolean | null | undefined;
603
+ sameSite?: "strict" | "none" | "lax" | null | undefined;
604
+ } | null | undefined, undefined>;
605
+ }, readonly [], {}, {
606
+ res?: ({
607
+ headers: {
608
+ append: (name: string, value: string) => void;
609
+ delete: (name: string) => void;
610
+ get: (name: string) => string | null;
611
+ getSetCookie: () => string[];
612
+ has: (name: string) => boolean;
613
+ set: (name: string, value: string) => void;
614
+ forEach: (callbackfn: (value: string, key: string, parent: Headers) => void, thisArg?: any) => void;
615
+ entries: () => HeadersIterator<[string, string]>;
616
+ keys: () => HeadersIterator<string>;
617
+ values: () => HeadersIterator<string>;
618
+ [Symbol.iterator]: () => HeadersIterator<[string, string]>;
619
+ };
620
+ status?: number | undefined;
621
+ statusText?: string | undefined;
622
+ } & HttpResponse) | null | undefined;
623
+ req?: ({
624
+ raw: {
625
+ readonly cache: RequestCache;
626
+ readonly credentials: RequestCredentials;
627
+ readonly destination: RequestDestination;
628
+ readonly headers: {
629
+ append: (name: string, value: string) => void;
630
+ delete: (name: string) => void;
631
+ get: (name: string) => string | null;
632
+ getSetCookie: () => string[];
633
+ has: (name: string) => boolean;
634
+ set: (name: string, value: string) => void;
635
+ forEach: (callbackfn: (value: string, key: string, parent: Headers) => void, thisArg?: any) => void;
636
+ entries: () => HeadersIterator<[string, string]>;
637
+ keys: () => HeadersIterator<string>;
638
+ values: () => HeadersIterator<string>;
639
+ [Symbol.iterator]: () => HeadersIterator<[string, string]>;
640
+ };
641
+ readonly integrity: string;
642
+ readonly keepalive: boolean;
643
+ readonly method: string;
644
+ readonly mode: RequestMode;
645
+ readonly redirect: RequestRedirect;
646
+ readonly referrer: string;
647
+ readonly referrerPolicy: ReferrerPolicy;
648
+ readonly signal: {
649
+ readonly aborted: boolean;
650
+ onabort: ((this: AbortSignal, ev: Event) => any) | null;
651
+ readonly reason: any;
652
+ throwIfAborted: () => void;
653
+ addEventListener: {
654
+ <K extends keyof AbortSignalEventMap>(type: K, listener: (this: AbortSignal, ev: AbortSignalEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
655
+ (type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
656
+ };
657
+ removeEventListener: {
658
+ <K extends keyof AbortSignalEventMap>(type: K, listener: (this: AbortSignal, ev: AbortSignalEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
659
+ (type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
660
+ };
661
+ dispatchEvent: (event: Event) => boolean;
662
+ };
663
+ readonly url: string;
664
+ clone: () => Request;
665
+ readonly body: {
666
+ readonly locked: boolean;
667
+ cancel: (reason?: any) => Promise<void>;
668
+ getReader: {
669
+ (options: {
670
+ mode: "byob";
671
+ }): ReadableStreamBYOBReader;
672
+ (): ReadableStreamDefaultReader<Uint8Array<ArrayBuffer>>;
673
+ (options?: ReadableStreamGetReaderOptions): ReadableStreamReader<Uint8Array<ArrayBuffer>>;
674
+ };
675
+ pipeThrough: <T>(transform: ReadableWritablePair<T, Uint8Array<ArrayBuffer>>, options?: StreamPipeOptions) => ReadableStream<T>;
676
+ pipeTo: (destination: WritableStream<Uint8Array<ArrayBuffer>>, options?: StreamPipeOptions) => Promise<void>;
677
+ tee: () => [ReadableStream<Uint8Array<ArrayBuffer>>, ReadableStream<Uint8Array<ArrayBuffer>>];
678
+ values: (options?: ReadableStreamIteratorOptions) => ReadableStreamAsyncIterator<Uint8Array<ArrayBuffer>>;
679
+ [Symbol.asyncIterator]: (options?: ReadableStreamIteratorOptions) => ReadableStreamAsyncIterator<Uint8Array<ArrayBuffer>>;
680
+ } | null;
681
+ readonly bodyUsed: boolean;
682
+ arrayBuffer: () => Promise<ArrayBuffer>;
683
+ blob: () => Promise<Blob>;
684
+ bytes: () => Promise<Uint8Array<ArrayBuffer>>;
685
+ formData: () => Promise<FormData>;
686
+ json: () => Promise<any>;
687
+ text: () => Promise<string>;
688
+ };
689
+ method: string;
690
+ path: string;
691
+ headers: {
692
+ append: (name: string, value: string) => void;
693
+ delete: (name: string) => void;
694
+ get: (name: string) => string | null;
695
+ getSetCookie: () => string[];
696
+ has: (name: string) => boolean;
697
+ set: (name: string, value: string) => void;
698
+ forEach: (callbackfn: (value: string, key: string, parent: Headers) => void, thisArg?: any) => void;
699
+ entries: () => HeadersIterator<[string, string]>;
700
+ keys: () => HeadersIterator<string>;
701
+ values: () => HeadersIterator<string>;
702
+ [Symbol.iterator]: () => HeadersIterator<[string, string]>;
703
+ };
704
+ query: {
705
+ [x: string]: string | string[];
706
+ };
707
+ cookies: {
708
+ [x: string]: string;
709
+ };
710
+ body: unknown;
711
+ } & HttpRequest) | null | undefined;
712
+ cookieOptions?: ({
713
+ maxAge?: number | null | undefined;
714
+ expires?: Date | null | undefined;
715
+ path?: string | null | undefined;
716
+ domain?: string | null | undefined;
717
+ secure?: boolean | null | undefined;
718
+ httpOnly?: boolean | null | undefined;
719
+ sameSite?: "strict" | "none" | "lax" | null | undefined;
720
+ } & {
721
+ maxAge?: number | null | undefined;
722
+ expires?: Date | null | undefined;
723
+ path?: string | null | undefined;
724
+ domain?: string | null | undefined;
725
+ secure?: boolean | null | undefined;
726
+ httpOnly?: boolean | null | undefined;
727
+ sameSite?: "strict" | "none" | "lax" | null | undefined;
728
+ }) | undefined;
729
+ }, unknown>;
730
+ deleteCookie: FnDefination<{
731
+ readonly name: string;
732
+ readonly options?: {
733
+ maxAge?: number | null | undefined;
734
+ expires?: Date | null | undefined;
735
+ path?: string | null | undefined;
736
+ domain?: string | null | undefined;
737
+ secure?: boolean | null | undefined;
738
+ httpOnly?: boolean | null | undefined;
739
+ sameSite?: "strict" | "none" | "lax" | null | undefined;
740
+ } | null | undefined;
741
+ }, {
742
+ set: boolean;
743
+ }, "cookie.delete", {
744
+ readonly name: TypeDefination<string, string, never>;
745
+ readonly options: TypeDefination<{
746
+ maxAge?: number | null | undefined;
747
+ expires?: Date | null | undefined;
748
+ path?: string | null | undefined;
749
+ domain?: string | null | undefined;
750
+ secure?: boolean | null | undefined;
751
+ httpOnly?: boolean | null | undefined;
752
+ sameSite?: "strict" | "none" | "lax" | null | undefined;
753
+ }, {
754
+ maxAge?: number | null | undefined;
755
+ expires?: Date | null | undefined;
756
+ path?: string | null | undefined;
757
+ domain?: string | null | undefined;
758
+ secure?: boolean | null | undefined;
759
+ httpOnly?: boolean | null | undefined;
760
+ sameSite?: "strict" | "none" | "lax" | null | undefined;
761
+ } | null | undefined, undefined>;
762
+ }, readonly [], {}, {
763
+ res?: ({
764
+ headers: {
765
+ append: (name: string, value: string) => void;
766
+ delete: (name: string) => void;
767
+ get: (name: string) => string | null;
768
+ getSetCookie: () => string[];
769
+ has: (name: string) => boolean;
770
+ set: (name: string, value: string) => void;
771
+ forEach: (callbackfn: (value: string, key: string, parent: Headers) => void, thisArg?: any) => void;
772
+ entries: () => HeadersIterator<[string, string]>;
773
+ keys: () => HeadersIterator<string>;
774
+ values: () => HeadersIterator<string>;
775
+ [Symbol.iterator]: () => HeadersIterator<[string, string]>;
776
+ };
777
+ status?: number | undefined;
778
+ statusText?: string | undefined;
779
+ } & HttpResponse) | null | undefined;
780
+ req?: ({
781
+ raw: {
782
+ readonly cache: RequestCache;
783
+ readonly credentials: RequestCredentials;
784
+ readonly destination: RequestDestination;
785
+ readonly headers: {
786
+ append: (name: string, value: string) => void;
787
+ delete: (name: string) => void;
788
+ get: (name: string) => string | null;
789
+ getSetCookie: () => string[];
790
+ has: (name: string) => boolean;
791
+ set: (name: string, value: string) => void;
792
+ forEach: (callbackfn: (value: string, key: string, parent: Headers) => void, thisArg?: any) => void;
793
+ entries: () => HeadersIterator<[string, string]>;
794
+ keys: () => HeadersIterator<string>;
795
+ values: () => HeadersIterator<string>;
796
+ [Symbol.iterator]: () => HeadersIterator<[string, string]>;
797
+ };
798
+ readonly integrity: string;
799
+ readonly keepalive: boolean;
800
+ readonly method: string;
801
+ readonly mode: RequestMode;
802
+ readonly redirect: RequestRedirect;
803
+ readonly referrer: string;
804
+ readonly referrerPolicy: ReferrerPolicy;
805
+ readonly signal: {
806
+ readonly aborted: boolean;
807
+ onabort: ((this: AbortSignal, ev: Event) => any) | null;
808
+ readonly reason: any;
809
+ throwIfAborted: () => void;
810
+ addEventListener: {
811
+ <K extends keyof AbortSignalEventMap>(type: K, listener: (this: AbortSignal, ev: AbortSignalEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
812
+ (type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
813
+ };
814
+ removeEventListener: {
815
+ <K extends keyof AbortSignalEventMap>(type: K, listener: (this: AbortSignal, ev: AbortSignalEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
816
+ (type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
817
+ };
818
+ dispatchEvent: (event: Event) => boolean;
819
+ };
820
+ readonly url: string;
821
+ clone: () => Request;
822
+ readonly body: {
823
+ readonly locked: boolean;
824
+ cancel: (reason?: any) => Promise<void>;
825
+ getReader: {
826
+ (options: {
827
+ mode: "byob";
828
+ }): ReadableStreamBYOBReader;
829
+ (): ReadableStreamDefaultReader<Uint8Array<ArrayBuffer>>;
830
+ (options?: ReadableStreamGetReaderOptions): ReadableStreamReader<Uint8Array<ArrayBuffer>>;
831
+ };
832
+ pipeThrough: <T>(transform: ReadableWritablePair<T, Uint8Array<ArrayBuffer>>, options?: StreamPipeOptions) => ReadableStream<T>;
833
+ pipeTo: (destination: WritableStream<Uint8Array<ArrayBuffer>>, options?: StreamPipeOptions) => Promise<void>;
834
+ tee: () => [ReadableStream<Uint8Array<ArrayBuffer>>, ReadableStream<Uint8Array<ArrayBuffer>>];
835
+ values: (options?: ReadableStreamIteratorOptions) => ReadableStreamAsyncIterator<Uint8Array<ArrayBuffer>>;
836
+ [Symbol.asyncIterator]: (options?: ReadableStreamIteratorOptions) => ReadableStreamAsyncIterator<Uint8Array<ArrayBuffer>>;
837
+ } | null;
838
+ readonly bodyUsed: boolean;
839
+ arrayBuffer: () => Promise<ArrayBuffer>;
840
+ blob: () => Promise<Blob>;
841
+ bytes: () => Promise<Uint8Array<ArrayBuffer>>;
842
+ formData: () => Promise<FormData>;
843
+ json: () => Promise<any>;
844
+ text: () => Promise<string>;
845
+ };
846
+ method: string;
847
+ path: string;
848
+ headers: {
849
+ append: (name: string, value: string) => void;
850
+ delete: (name: string) => void;
851
+ get: (name: string) => string | null;
852
+ getSetCookie: () => string[];
853
+ has: (name: string) => boolean;
854
+ set: (name: string, value: string) => void;
855
+ forEach: (callbackfn: (value: string, key: string, parent: Headers) => void, thisArg?: any) => void;
856
+ entries: () => HeadersIterator<[string, string]>;
857
+ keys: () => HeadersIterator<string>;
858
+ values: () => HeadersIterator<string>;
859
+ [Symbol.iterator]: () => HeadersIterator<[string, string]>;
860
+ };
861
+ query: {
862
+ [x: string]: string | string[];
863
+ };
864
+ cookies: {
865
+ [x: string]: string;
866
+ };
867
+ body: unknown;
868
+ } & HttpRequest) | null | undefined;
869
+ cookieOptions?: ({
870
+ maxAge?: number | null | undefined;
871
+ expires?: Date | null | undefined;
872
+ path?: string | null | undefined;
873
+ domain?: string | null | undefined;
874
+ secure?: boolean | null | undefined;
875
+ httpOnly?: boolean | null | undefined;
876
+ sameSite?: "strict" | "none" | "lax" | null | undefined;
877
+ } & {
878
+ maxAge?: number | null | undefined;
879
+ expires?: Date | null | undefined;
880
+ path?: string | null | undefined;
881
+ domain?: string | null | undefined;
882
+ secure?: boolean | null | undefined;
883
+ httpOnly?: boolean | null | undefined;
884
+ sameSite?: "strict" | "none" | "lax" | null | undefined;
885
+ }) | undefined;
886
+ readonly setCookie?: ((input: {
887
+ readonly name: string;
888
+ readonly value: string;
889
+ readonly options?: {
890
+ maxAge?: number | null | undefined;
891
+ expires?: Date | null | undefined;
892
+ path?: string | null | undefined;
893
+ domain?: string | null | undefined;
894
+ secure?: boolean | null | undefined;
895
+ httpOnly?: boolean | null | undefined;
896
+ sameSite?: "strict" | "none" | "lax" | null | undefined;
897
+ } | null | undefined;
898
+ }) => {
899
+ set: boolean;
900
+ }) | undefined;
901
+ }, unknown>;
902
+ err: typeof err;
903
+ statusOf: (decl: unknown) => number | undefined;
904
+ errorStatus: (errors: Record<string, unknown> | undefined | null, tag: string) => number | undefined;
905
+ applyError: (response: HttpResponse, errors: Record<string, unknown> | undefined | null, error: {
906
+ tag: string;
907
+ }) => HttpResponse;
908
+ redirect: FnDefination<{
909
+ readonly url: string;
910
+ readonly status?: number | undefined;
911
+ }, never, "http.redirect", {
912
+ readonly url: TypeDefination<string, string, never>;
913
+ readonly status: TypeDefination<number, number, number>;
914
+ }, readonly [], {}, {
915
+ res?: ({
916
+ headers: {
917
+ append: (name: string, value: string) => void;
918
+ delete: (name: string) => void;
919
+ get: (name: string) => string | null;
920
+ getSetCookie: () => string[];
921
+ has: (name: string) => boolean;
922
+ set: (name: string, value: string) => void;
923
+ forEach: (callbackfn: (value: string, key: string, parent: Headers) => void, thisArg?: any) => void;
924
+ entries: () => HeadersIterator<[string, string]>;
925
+ keys: () => HeadersIterator<string>;
926
+ values: () => HeadersIterator<string>;
927
+ [Symbol.iterator]: () => HeadersIterator<[string, string]>;
928
+ };
929
+ status?: number | undefined;
930
+ statusText?: string | undefined;
931
+ } & HttpResponse) | null | undefined;
932
+ }, unknown>;
933
+ applyRedirect: (response: HttpResponse, redirected: Redirect) => HttpResponse;
934
+ asResponse: (thrown: unknown, response?: HttpResponse | null) => Response;
935
+ toResponse: (response: HttpResponse, body?: BodyInit | null) => Response;
936
+ Redirect: typeof Redirect;
937
+ serverOnly: <S>(schema: S) => S;
938
+ clientSchema: <S>(schema: S) => S;
939
+ rejectServerOnly: (schema: unknown, value: unknown, path?: string) => void;
940
+ wireInput: <S>(schema: S, value: unknown, path?: string) => unknown;
941
+ fromJsonBody: <S>(request: Request, schema: S, path?: string) => Promise<unknown>;
942
+ };
943
+ //#endregion
944
+ export { type CookieOptions, type CreateHandlerContext, type CreateHandlerOptions, type HttpErrMeta, type HttpRequest, type HttpResponse, Redirect, type RedirectStatus, applyError, applyRedirect, asResponse, clientSchema, cookieOptions, cookieShape, createHandler, deleteCookie, err, errorStatus, fromJsonBody, fromRequest, getCookie, handler, http, kHttpErr, redirect, rejectServerOnly, req, res, serverOnly, setCookie, statusOf, toHttpRequest, toResponse, wireInput };
945
+ //# sourceMappingURL=http.d.cts.map