@devizovaburza/payments-api-sdk 1.2.0 → 1.2.1

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.
@@ -1,1977 +1,12 @@
1
- export { WebhookEventType, WebhookEventType as WebhookEventTypeValue } from '@apps/gateway/src/types/webhook';
2
-
3
- /**
4
- * @module
5
- * HTTP Status utility.
6
- */
7
- type InfoStatusCode = 100 | 101 | 102 | 103;
8
- type SuccessStatusCode = 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 226;
9
- type DeprecatedStatusCode = 305 | 306;
10
- type RedirectStatusCode = 300 | 301 | 302 | 303 | 304 | DeprecatedStatusCode | 307 | 308;
11
- type ClientErrorStatusCode = 400 | 401 | 402 | 403 | 404 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 421 | 422 | 423 | 424 | 425 | 426 | 428 | 429 | 431 | 451;
12
- type ServerErrorStatusCode = 500 | 501 | 502 | 503 | 504 | 505 | 506 | 507 | 508 | 510 | 511;
13
- /**
14
- * `UnofficialStatusCode` can be used to specify an unofficial status code.
15
- * @example
16
- *
17
- * ```ts
18
- * app.get('/unknown', (c) => {
19
- * return c.text("Unknown Error", 520 as UnofficialStatusCode)
20
- * })
21
- * ```
22
- */
23
- type UnofficialStatusCode = -1;
24
- /**
25
- * If you want to use an unofficial status, use `UnofficialStatusCode`.
26
- */
27
- type StatusCode = InfoStatusCode | SuccessStatusCode | RedirectStatusCode | ClientErrorStatusCode | ServerErrorStatusCode | UnofficialStatusCode;
28
- type ContentlessStatusCode = 101 | 204 | 205 | 304;
29
- type ContentfulStatusCode = Exclude<StatusCode, ContentlessStatusCode>;
30
-
31
- declare const GET_MATCH_RESULT: unique symbol;
32
-
33
- /**
34
- * Constant representing all HTTP methods in lowercase.
35
- */
36
- declare const METHOD_NAME_ALL_LOWERCASE: "all";
37
- /**
38
- * Array of supported HTTP methods.
39
- */
40
- declare const METHODS: readonly ["get", "post", "put", "delete", "options", "patch"];
41
- /**
42
- * Interface representing a router.
43
- *
44
- * @template T - The type of the handler.
45
- */
46
- interface Router<T> {
47
- /**
48
- * The name of the router.
49
- */
50
- name: string;
51
- /**
52
- * Adds a route to the router.
53
- *
54
- * @param method - The HTTP method (e.g., 'get', 'post').
55
- * @param path - The path for the route.
56
- * @param handler - The handler for the route.
57
- */
58
- add(method: string, path: string, handler: T): void;
59
- /**
60
- * Matches a route based on the given method and path.
61
- *
62
- * @param method - The HTTP method (e.g., 'get', 'post').
63
- * @param path - The path to match.
64
- * @returns The result of the match.
65
- */
66
- match(method: string, path: string): Result<T>;
67
- }
68
- /**
69
- * Type representing a map of parameter indices.
70
- */
71
- type ParamIndexMap = Record<string, number>;
72
- /**
73
- * Type representing a stash of parameters.
74
- */
75
- type ParamStash = string[];
76
- /**
77
- * Type representing a map of parameters.
78
- */
79
- type Params = Record<string, string>;
80
- /**
81
- * Type representing the result of a route match.
82
- *
83
- * The result can be in one of two formats:
84
- * 1. An array of handlers with their corresponding parameter index maps, followed by a parameter stash.
85
- * 2. An array of handlers with their corresponding parameter maps.
86
- *
87
- * Example:
88
- *
89
- * [[handler, paramIndexMap][], paramArray]
90
- * ```typescript
91
- * [
92
- * [
93
- * [middlewareA, {}], // '*'
94
- * [funcA, {'id': 0}], // '/user/:id/*'
95
- * [funcB, {'id': 0, 'action': 1}], // '/user/:id/:action'
96
- * ],
97
- * ['123', 'abc']
98
- * ]
99
- * ```
100
- *
101
- * [[handler, params][]]
102
- * ```typescript
103
- * [
104
- * [
105
- * [middlewareA, {}], // '*'
106
- * [funcA, {'id': '123'}], // '/user/:id/*'
107
- * [funcB, {'id': '123', 'action': 'abc'}], // '/user/:id/:action'
108
- * ]
109
- * ]
110
- * ```
111
- */
112
- type Result<T> = [[T, ParamIndexMap][], ParamStash] | [[T, Params][]];
113
-
114
- /**
115
- * @module
116
- * HTTP Headers utility.
117
- */
118
- type RequestHeader = 'A-IM' | 'Accept' | 'Accept-Additions' | 'Accept-CH' | 'Accept-Charset' | 'Accept-Datetime' | 'Accept-Encoding' | 'Accept-Features' | 'Accept-Language' | 'Accept-Patch' | 'Accept-Post' | 'Accept-Ranges' | 'Accept-Signature' | 'Access-Control' | 'Access-Control-Allow-Credentials' | 'Access-Control-Allow-Headers' | 'Access-Control-Allow-Methods' | 'Access-Control-Allow-Origin' | 'Access-Control-Expose-Headers' | 'Access-Control-Max-Age' | 'Access-Control-Request-Headers' | 'Access-Control-Request-Method' | 'Age' | 'Allow' | 'ALPN' | 'Alt-Svc' | 'Alt-Used' | 'Alternates' | 'AMP-Cache-Transform' | 'Apply-To-Redirect-Ref' | 'Authentication-Control' | 'Authentication-Info' | 'Authorization' | 'Available-Dictionary' | 'C-Ext' | 'C-Man' | 'C-Opt' | 'C-PEP' | 'C-PEP-Info' | 'Cache-Control' | 'Cache-Status' | 'Cal-Managed-ID' | 'CalDAV-Timezones' | 'Capsule-Protocol' | 'CDN-Cache-Control' | 'CDN-Loop' | 'Cert-Not-After' | 'Cert-Not-Before' | 'Clear-Site-Data' | 'Client-Cert' | 'Client-Cert-Chain' | 'Close' | 'CMCD-Object' | 'CMCD-Request' | 'CMCD-Session' | 'CMCD-Status' | 'CMSD-Dynamic' | 'CMSD-Static' | 'Concealed-Auth-Export' | 'Configuration-Context' | 'Connection' | 'Content-Base' | 'Content-Digest' | 'Content-Disposition' | 'Content-Encoding' | 'Content-ID' | 'Content-Language' | 'Content-Length' | 'Content-Location' | 'Content-MD5' | 'Content-Range' | 'Content-Script-Type' | 'Content-Security-Policy' | 'Content-Security-Policy-Report-Only' | 'Content-Style-Type' | 'Content-Type' | 'Content-Version' | 'Cookie' | 'Cookie2' | 'Cross-Origin-Embedder-Policy' | 'Cross-Origin-Embedder-Policy-Report-Only' | 'Cross-Origin-Opener-Policy' | 'Cross-Origin-Opener-Policy-Report-Only' | 'Cross-Origin-Resource-Policy' | 'CTA-Common-Access-Token' | 'DASL' | 'Date' | 'DAV' | 'Default-Style' | 'Delta-Base' | 'Deprecation' | 'Depth' | 'Derived-From' | 'Destination' | 'Differential-ID' | 'Dictionary-ID' | 'Digest' | 'DPoP' | 'DPoP-Nonce' | 'Early-Data' | 'EDIINT-Features' | 'ETag' | 'Expect' | 'Expect-CT' | 'Expires' | 'Ext' | 'Forwarded' | 'From' | 'GetProfile' | 'Hobareg' | 'Host' | 'HTTP2-Settings' | 'If' | 'If-Match' | 'If-Modified-Since' | 'If-None-Match' | 'If-Range' | 'If-Schedule-Tag-Match' | 'If-Unmodified-Since' | 'IM' | 'Include-Referred-Token-Binding-ID' | 'Isolation' | 'Keep-Alive' | 'Label' | 'Last-Event-ID' | 'Last-Modified' | 'Link' | 'Link-Template' | 'Location' | 'Lock-Token' | 'Man' | 'Max-Forwards' | 'Memento-Datetime' | 'Meter' | 'Method-Check' | 'Method-Check-Expires' | 'MIME-Version' | 'Negotiate' | 'NEL' | 'OData-EntityId' | 'OData-Isolation' | 'OData-MaxVersion' | 'OData-Version' | 'Opt' | 'Optional-WWW-Authenticate' | 'Ordering-Type' | 'Origin' | 'Origin-Agent-Cluster' | 'OSCORE' | 'OSLC-Core-Version' | 'Overwrite' | 'P3P' | 'PEP' | 'PEP-Info' | 'Permissions-Policy' | 'PICS-Label' | 'Ping-From' | 'Ping-To' | 'Position' | 'Pragma' | 'Prefer' | 'Preference-Applied' | 'Priority' | 'ProfileObject' | 'Protocol' | 'Protocol-Info' | 'Protocol-Query' | 'Protocol-Request' | 'Proxy-Authenticate' | 'Proxy-Authentication-Info' | 'Proxy-Authorization' | 'Proxy-Features' | 'Proxy-Instruction' | 'Proxy-Status' | 'Public' | 'Public-Key-Pins' | 'Public-Key-Pins-Report-Only' | 'Range' | 'Redirect-Ref' | 'Referer' | 'Referer-Root' | 'Referrer-Policy' | 'Refresh' | 'Repeatability-Client-ID' | 'Repeatability-First-Sent' | 'Repeatability-Request-ID' | 'Repeatability-Result' | 'Replay-Nonce' | 'Reporting-Endpoints' | 'Repr-Digest' | 'Retry-After' | 'Safe' | 'Schedule-Reply' | 'Schedule-Tag' | 'Sec-GPC' | 'Sec-Purpose' | 'Sec-Token-Binding' | 'Sec-WebSocket-Accept' | 'Sec-WebSocket-Extensions' | 'Sec-WebSocket-Key' | 'Sec-WebSocket-Protocol' | 'Sec-WebSocket-Version' | 'Security-Scheme' | 'Server' | 'Server-Timing' | 'Set-Cookie' | 'Set-Cookie2' | 'SetProfile' | 'Signature' | 'Signature-Input' | 'SLUG' | 'SoapAction' | 'Status-URI' | 'Strict-Transport-Security' | 'Sunset' | 'Surrogate-Capability' | 'Surrogate-Control' | 'TCN' | 'TE' | 'Timeout' | 'Timing-Allow-Origin' | 'Topic' | 'Traceparent' | 'Tracestate' | 'Trailer' | 'Transfer-Encoding' | 'TTL' | 'Upgrade' | 'Urgency' | 'URI' | 'Use-As-Dictionary' | 'User-Agent' | 'Variant-Vary' | 'Vary' | 'Via' | 'Want-Content-Digest' | 'Want-Digest' | 'Want-Repr-Digest' | 'Warning' | 'WWW-Authenticate' | 'X-Content-Type-Options' | 'X-Frame-Options';
119
- type ResponseHeader = 'Access-Control-Allow-Credentials' | 'Access-Control-Allow-Headers' | 'Access-Control-Allow-Methods' | 'Access-Control-Allow-Origin' | 'Access-Control-Expose-Headers' | 'Access-Control-Max-Age' | 'Age' | 'Allow' | 'Cache-Control' | 'Clear-Site-Data' | 'Content-Disposition' | 'Content-Encoding' | 'Content-Language' | 'Content-Length' | 'Content-Location' | 'Content-Range' | 'Content-Security-Policy' | 'Content-Security-Policy-Report-Only' | 'Content-Type' | 'Cookie' | 'Cross-Origin-Embedder-Policy' | 'Cross-Origin-Opener-Policy' | 'Cross-Origin-Resource-Policy' | 'Date' | 'ETag' | 'Expires' | 'Last-Modified' | 'Location' | 'Permissions-Policy' | 'Pragma' | 'Retry-After' | 'Save-Data' | 'Sec-CH-Prefers-Color-Scheme' | 'Sec-CH-Prefers-Reduced-Motion' | 'Sec-CH-UA' | 'Sec-CH-UA-Arch' | 'Sec-CH-UA-Bitness' | 'Sec-CH-UA-Form-Factor' | 'Sec-CH-UA-Full-Version' | 'Sec-CH-UA-Full-Version-List' | 'Sec-CH-UA-Mobile' | 'Sec-CH-UA-Model' | 'Sec-CH-UA-Platform' | 'Sec-CH-UA-Platform-Version' | 'Sec-CH-UA-WoW64' | 'Sec-Fetch-Dest' | 'Sec-Fetch-Mode' | 'Sec-Fetch-Site' | 'Sec-Fetch-User' | 'Sec-GPC' | 'Server' | 'Server-Timing' | 'Service-Worker-Navigation-Preload' | 'Set-Cookie' | 'Strict-Transport-Security' | 'Timing-Allow-Origin' | 'Trailer' | 'Transfer-Encoding' | 'Upgrade' | 'Vary' | 'WWW-Authenticate' | 'Warning' | 'X-Content-Type-Options' | 'X-DNS-Prefetch-Control' | 'X-Frame-Options' | 'X-Permitted-Cross-Domain-Policies' | 'X-Powered-By' | 'X-Robots-Tag' | 'X-XSS-Protection';
120
- type CustomHeader = string & {};
121
-
122
- type UnionToIntersection<U> = (U extends any ? (k: U) => void : never) extends (k: infer I) => void ? I : never;
123
- type RemoveBlankRecord<T> = T extends Record<infer K, unknown> ? (K extends string ? T : never) : never;
124
- type IfAnyThenEmptyObject<T> = 0 extends 1 & T ? {} : T;
125
- type JSONPrimitive = string | boolean | number | null;
126
- type JSONArray = (JSONPrimitive | JSONObject | JSONArray)[];
127
- type JSONObject = {
128
- [key: string]: JSONPrimitive | JSONArray | JSONObject | object | InvalidJSONValue;
129
- };
130
- type InvalidJSONValue = undefined | symbol | ((...args: unknown[]) => unknown);
131
- type InvalidToNull<T> = T extends InvalidJSONValue ? null : T;
132
- type IsInvalid<T> = T extends InvalidJSONValue ? true : false;
133
- /**
134
- * symbol keys are omitted through `JSON.stringify`
135
- */
136
- type OmitSymbolKeys<T> = {
137
- [K in keyof T as K extends symbol ? never : K]: T[K];
138
- };
139
- type JSONValue = JSONObject | JSONArray | JSONPrimitive;
140
- /**
141
- * Convert a type to a JSON-compatible type.
142
- *
143
- * Non-JSON values such as `Date` implement `.toJSON()`,
144
- * so they can be transformed to a value assignable to `JSONObject`
145
- *
146
- * `JSON.stringify()` throws a `TypeError` when it encounters a `bigint` value,
147
- * unless a custom `replacer` function or `.toJSON()` method is provided.
148
- *
149
- * This behaviour can be controlled by the `TError` generic type parameter,
150
- * which defaults to `bigint | ReadonlyArray<bigint>`.
151
- * You can set it to `never` to disable this check.
152
- */
153
- type JSONParsed<T, TError = bigint | ReadonlyArray<bigint>> = T extends {
154
- toJSON(): infer J;
155
- } ? (() => J) extends () => JSONPrimitive ? J : (() => J) extends () => {
156
- toJSON(): unknown;
157
- } ? {} : JSONParsed<J, TError> : T extends JSONPrimitive ? T : T extends InvalidJSONValue ? never : T extends ReadonlyArray<unknown> ? {
158
- [K in keyof T]: JSONParsed<InvalidToNull<T[K]>, TError>;
159
- } : T extends Set<unknown> | Map<unknown, unknown> | Record<string, never> ? {} : T extends object ? T[keyof T] extends TError ? never : {
160
- [K in keyof OmitSymbolKeys<T> as IsInvalid<T[K]> extends true ? never : K]: boolean extends IsInvalid<T[K]> ? JSONParsed<T[K], TError> | undefined : JSONParsed<T[K], TError>;
161
- } : T extends unknown ? T extends TError ? never : JSONValue : never;
162
- /**
163
- * Useful to flatten the type output to improve type hints shown in editors. And also to transform an interface into a type to aide with assignability.
164
- * @copyright from sindresorhus/type-fest
165
- */
166
- type Simplify<T> = {
167
- [KeyType in keyof T]: T[KeyType];
168
- } & {};
169
- type RequiredKeysOf<BaseType extends object> = Exclude<{
170
- [Key in keyof BaseType]: BaseType extends Record<Key, BaseType[Key]> ? Key : never;
171
- }[keyof BaseType], undefined>;
172
- type HasRequiredKeys<BaseType extends object> = RequiredKeysOf<BaseType> extends never ? false : true;
173
- type IsAny<T> = boolean extends (T extends never ? true : false) ? true : false;
174
-
175
- /**
176
- * @module
177
- * This module contains some type definitions for the Hono modules.
178
- */
179
-
180
- type Bindings = object;
181
- type Variables = object;
182
- type BlankEnv = {};
183
- type Env = {
184
- Bindings?: Bindings;
185
- Variables?: Variables;
186
- };
187
- type Next = () => Promise<void>;
188
- type ExtractInput<I extends Input | Input['in']> = I extends Input ? unknown extends I['in'] ? {} : I['in'] : I;
189
- type Input = {
190
- in?: {};
191
- out?: {};
192
- outputFormat?: ResponseFormat;
193
- };
194
- type BlankSchema = {};
195
- type BlankInput = {};
196
- interface RouterRoute {
197
- basePath: string;
198
- path: string;
199
- method: string;
200
- handler: H;
201
- }
202
- type HandlerResponse<O> = Response | TypedResponse<O> | Promise<Response | TypedResponse<O>> | Promise<void>;
203
- type Handler<E extends Env = any, P extends string = any, I extends Input = BlankInput, R extends HandlerResponse<any> = any> = (c: Context<E, P, I>, next: Next) => R;
204
- type MiddlewareHandler<E extends Env = any, P extends string = string, I extends Input = {}, R extends HandlerResponse<any> = Response> = (c: Context<E, P, I>, next: Next) => Promise<R | void>;
205
- type H<E extends Env = any, P extends string = any, I extends Input = BlankInput, R extends HandlerResponse<any> = any> = Handler<E, P, I, R> | MiddlewareHandler<E, P, I, R>;
206
- /**
207
- * You can extend this interface to define a custom `c.notFound()` Response type.
208
- *
209
- * @example
210
- * declare module 'hono' {
211
- * interface NotFoundResponse extends Response, TypedResponse<string, 404, 'text'> {}
212
- * }
213
- */
214
- interface NotFoundResponse {
215
- }
216
- type NotFoundHandler<E extends Env = any> = (c: Context<E>) => NotFoundResponse extends Response ? NotFoundResponse | Promise<NotFoundResponse> : Response | Promise<Response>;
217
- interface HTTPResponseError extends Error {
218
- getResponse: () => Response;
219
- }
220
- type ErrorHandler<E extends Env = any> = (err: Error | HTTPResponseError, c: Context<E>) => Response | Promise<Response>;
221
- interface HandlerInterface<E extends Env = Env, M extends string = string, S extends Schema = BlankSchema, BasePath extends string = '/', CurrentPath extends string = BasePath> {
222
- <P extends string = CurrentPath, I extends Input = BlankInput, R extends HandlerResponse<any> = any, E2 extends Env = E>(handler: H<E2, P, I, R>): Hono$1<IntersectNonAnyTypes<[E, E2]>, S & ToSchema<M, P, I, MergeTypedResponse<R>>, BasePath, CurrentPath>;
223
- <P extends string = CurrentPath, I extends Input = BlankInput, I2 extends Input = I, R extends HandlerResponse<any> = any, E2 extends Env = E, E3 extends Env = IntersectNonAnyTypes<[E, E2]>, M1 extends H<E2, P, I> = H<E2, P, I>>(...handlers: [H<E2, P, I> & M1, H<E3, P, I2, R>]): Hono$1<IntersectNonAnyTypes<[E, E2, E3]>, S & ToSchema<M, P, I2, MergeTypedResponse<R> | MergeMiddlewareResponse<M1>>, BasePath, CurrentPath>;
224
- <P extends string, MergedPath extends MergePath<BasePath, P>, R extends HandlerResponse<any> = any, I extends Input = BlankInput, E2 extends Env = E>(path: P, handler: H<E2, MergedPath, I, R>): Hono$1<E, AddSchemaIfHasResponse<MergeTypedResponse<R>, S, M, P, I, BasePath>, BasePath, MergePath<BasePath, P>>;
225
- <P extends string = CurrentPath, R extends HandlerResponse<any> = any, I extends Input = BlankInput, I2 extends Input = I, I3 extends Input = I & I2, E2 extends Env = E, E3 extends Env = IntersectNonAnyTypes<[E, E2]>, E4 extends Env = IntersectNonAnyTypes<[E, E2, E3]>, M1 extends H<E2, P, I> = H<E2, P, I>, M2 extends H<E3, P, I2> = H<E3, P, I2>>(...handlers: [H<E2, P, I> & M1, H<E3, P, I2> & M2, H<E4, P, I3, R>]): Hono$1<IntersectNonAnyTypes<[E, E2, E3, E4]>, S & ToSchema<M, P, I3, MergeTypedResponse<R> | MergeMiddlewareResponse<M1> | MergeMiddlewareResponse<M2>>, BasePath, CurrentPath>;
226
- <P extends string, MergedPath extends MergePath<BasePath, P>, R extends HandlerResponse<any> = any, I extends Input = BlankInput, I2 extends Input = I, E2 extends Env = E, E3 extends Env = IntersectNonAnyTypes<[E, E2]>, M1 extends H<E2, MergedPath, I> = H<E2, MergedPath, I>>(path: P, ...handlers: [H<E2, MergedPath, I> & M1, H<E3, MergedPath, I2, R>]): Hono$1<E, AddSchemaIfHasResponse<MergeTypedResponse<R> | MergeMiddlewareResponse<M1>, S, M, P, I2, BasePath>, BasePath, MergePath<BasePath, P>>;
227
- <P extends string = CurrentPath, R extends HandlerResponse<any> = any, I extends Input = BlankInput, I2 extends Input = I, I3 extends Input = I & I2, I4 extends Input = I & I2 & I3, E2 extends Env = E, E3 extends Env = IntersectNonAnyTypes<[E, E2]>, E4 extends Env = IntersectNonAnyTypes<[E, E2, E3]>, E5 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4]>, M1 extends H<E2, P, I> = H<E2, P, I>, M2 extends H<E3, P, I2> = H<E3, P, I2>, M3 extends H<E4, P, I3> = H<E4, P, I3>>(...handlers: [H<E2, P, I> & M1, H<E3, P, I2> & M2, H<E4, P, I3> & M3, H<E5, P, I4, R>]): Hono$1<IntersectNonAnyTypes<[E, E2, E3, E4, E5]>, S & ToSchema<M, P, I4, MergeTypedResponse<R> | MergeMiddlewareResponse<M1> | MergeMiddlewareResponse<M2> | MergeMiddlewareResponse<M3>>, BasePath, CurrentPath>;
228
- <P extends string, MergedPath extends MergePath<BasePath, P>, R extends HandlerResponse<any> = any, I extends Input = BlankInput, I2 extends Input = I, I3 extends Input = I & I2, E2 extends Env = E, E3 extends Env = IntersectNonAnyTypes<[E, E2]>, E4 extends Env = IntersectNonAnyTypes<[E, E2, E3]>, M1 extends H<E2, MergedPath, I> = H<E2, MergedPath, I>, M2 extends H<E3, MergedPath, I2> = H<E3, MergedPath, I2>>(path: P, ...handlers: [H<E2, MergedPath, I> & M1, H<E3, MergedPath, I2> & M2, H<E4, MergedPath, I3, R>]): Hono$1<E, AddSchemaIfHasResponse<MergeTypedResponse<R> | MergeMiddlewareResponse<M1> | MergeMiddlewareResponse<M2>, S, M, P, I3, BasePath>, BasePath, MergePath<BasePath, P>>;
229
- <P extends string = CurrentPath, R extends HandlerResponse<any> = any, I extends Input = BlankInput, I2 extends Input = I, I3 extends Input = I & I2, I4 extends Input = I & I2 & I3, I5 extends Input = I & I2 & I3 & I4, E2 extends Env = E, E3 extends Env = IntersectNonAnyTypes<[E, E2]>, E4 extends Env = IntersectNonAnyTypes<[E, E2, E3]>, E5 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4]>, E6 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5]>, M1 extends H<E2, P, I> = H<E2, P, I>, M2 extends H<E3, P, I2> = H<E3, P, I2>, M3 extends H<E4, P, I3> = H<E4, P, I3>, M4 extends H<E5, P, I4> = H<E5, P, I4>>(...handlers: [
230
- H<E2, P, I> & M1,
231
- H<E3, P, I2> & M2,
232
- H<E4, P, I3> & M3,
233
- H<E5, P, I4> & M4,
234
- H<E6, P, I5, R>
235
- ]): Hono$1<IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6]>, S & ToSchema<M, P, I5, MergeTypedResponse<R> | MergeMiddlewareResponse<M1> | MergeMiddlewareResponse<M2> | MergeMiddlewareResponse<M3> | MergeMiddlewareResponse<M4>>, BasePath, CurrentPath>;
236
- <P extends string, MergedPath extends MergePath<BasePath, P>, R extends HandlerResponse<any> = any, I extends Input = BlankInput, I2 extends Input = I, I3 extends Input = I & I2, I4 extends Input = I & I2 & I3, E2 extends Env = E, E3 extends Env = IntersectNonAnyTypes<[E, E2]>, E4 extends Env = IntersectNonAnyTypes<[E, E2, E3]>, E5 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4]>, M1 extends H<E2, MergedPath, I> = H<E2, MergedPath, I>, M2 extends H<E3, MergedPath, I2> = H<E3, MergedPath, I2>, M3 extends H<E4, MergedPath, I3> = H<E4, MergedPath, I3>>(path: P, ...handlers: [
237
- H<E2, MergedPath, I> & M1,
238
- H<E3, MergedPath, I2> & M2,
239
- H<E4, MergedPath, I3> & M3,
240
- H<E5, MergedPath, I4, R>
241
- ]): Hono$1<E, AddSchemaIfHasResponse<MergeTypedResponse<R> | MergeMiddlewareResponse<M1> | MergeMiddlewareResponse<M2> | MergeMiddlewareResponse<M3>, S, M, P, I4, BasePath>, BasePath, MergePath<BasePath, P>>;
242
- <P extends string = CurrentPath, R extends HandlerResponse<any> = any, I extends Input = BlankInput, I2 extends Input = I, I3 extends Input = I & I2, I4 extends Input = I & I2 & I3, I5 extends Input = I & I2 & I3 & I4, I6 extends Input = I & I2 & I3 & I4 & I5, E2 extends Env = E, E3 extends Env = IntersectNonAnyTypes<[E, E2]>, E4 extends Env = IntersectNonAnyTypes<[E, E2, E3]>, E5 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4]>, E6 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5]>, E7 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6]>, M1 extends H<E2, P, I> = H<E2, P, I>, M2 extends H<E3, P, I2> = H<E3, P, I2>, M3 extends H<E4, P, I3> = H<E4, P, I3>, M4 extends H<E5, P, I4> = H<E5, P, I4>, M5 extends H<E6, P, I5> = H<E6, P, I5>>(...handlers: [
243
- H<E2, P, I> & M1,
244
- H<E3, P, I2> & M2,
245
- H<E4, P, I3> & M3,
246
- H<E5, P, I4> & M4,
247
- H<E6, P, I5> & M5,
248
- H<E7, P, I6, R>
249
- ]): Hono$1<IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6, E7]>, S & ToSchema<M, P, I6, MergeTypedResponse<R> | MergeMiddlewareResponse<M1> | MergeMiddlewareResponse<M2> | MergeMiddlewareResponse<M3> | MergeMiddlewareResponse<M4> | MergeMiddlewareResponse<M5>>, BasePath, CurrentPath>;
250
- <P extends string, MergedPath extends MergePath<BasePath, P>, R extends HandlerResponse<any> = any, I extends Input = BlankInput, I2 extends Input = I, I3 extends Input = I & I2, I4 extends Input = I & I2 & I3, I5 extends Input = I & I2 & I3 & I4, E2 extends Env = E, E3 extends Env = IntersectNonAnyTypes<[E, E2]>, E4 extends Env = IntersectNonAnyTypes<[E, E2, E3]>, E5 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4]>, E6 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5]>, M1 extends H<E2, MergedPath, I> = H<E2, MergedPath, I>, M2 extends H<E3, MergedPath, I2> = H<E3, MergedPath, I2>, M3 extends H<E4, MergedPath, I3> = H<E4, MergedPath, I3>, M4 extends H<E5, MergedPath, I4> = H<E5, MergedPath, I4>>(path: P, ...handlers: [
251
- H<E2, MergedPath, I> & M1,
252
- H<E3, MergedPath, I2> & M2,
253
- H<E4, MergedPath, I3> & M3,
254
- H<E5, MergedPath, I4> & M4,
255
- H<E6, MergedPath, I5, R>
256
- ]): Hono$1<E, AddSchemaIfHasResponse<MergeTypedResponse<R> | MergeMiddlewareResponse<M1> | MergeMiddlewareResponse<M2> | MergeMiddlewareResponse<M3> | MergeMiddlewareResponse<M4>, S, M, P, I5, BasePath>, BasePath, MergePath<BasePath, P>>;
257
- <P extends string = CurrentPath, R extends HandlerResponse<any> = any, I extends Input = BlankInput, I2 extends Input = I, I3 extends Input = I & I2, I4 extends Input = I & I2 & I3, I5 extends Input = I & I2 & I3 & I4, I6 extends Input = I & I2 & I3 & I4 & I5, I7 extends Input = I & I2 & I3 & I4 & I5 & I6, E2 extends Env = E, E3 extends Env = IntersectNonAnyTypes<[E, E2]>, E4 extends Env = IntersectNonAnyTypes<[E, E2, E3]>, E5 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4]>, E6 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5]>, E7 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6]>, E8 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6, E7]>, M1 extends H<E2, P, I> = H<E2, P, I>, M2 extends H<E3, P, I2> = H<E3, P, I2>, M3 extends H<E4, P, I3> = H<E4, P, I3>, M4 extends H<E5, P, I4> = H<E5, P, I4>, M5 extends H<E6, P, I5> = H<E6, P, I5>, M6 extends H<E7, P, I6> = H<E7, P, I6>>(...handlers: [
258
- H<E2, P, I> & M1,
259
- H<E3, P, I2> & M2,
260
- H<E4, P, I3> & M3,
261
- H<E5, P, I4> & M4,
262
- H<E6, P, I5> & M5,
263
- H<E7, P, I6> & M6,
264
- H<E8, P, I7, R>
265
- ]): Hono$1<IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6, E7, E8]>, S & ToSchema<M, P, I7, MergeTypedResponse<R> | MergeMiddlewareResponse<M1> | MergeMiddlewareResponse<M2> | MergeMiddlewareResponse<M3> | MergeMiddlewareResponse<M4> | MergeMiddlewareResponse<M5> | MergeMiddlewareResponse<M6>>, BasePath, CurrentPath>;
266
- <P extends string, MergedPath extends MergePath<BasePath, P>, R extends HandlerResponse<any> = any, I extends Input = BlankInput, I2 extends Input = I, I3 extends Input = I & I2, I4 extends Input = I & I2 & I3, I5 extends Input = I & I2 & I3 & I4, I6 extends Input = I & I2 & I3 & I4 & I5, E2 extends Env = E, E3 extends Env = IntersectNonAnyTypes<[E, E2]>, E4 extends Env = IntersectNonAnyTypes<[E, E2, E3]>, E5 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4]>, E6 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5]>, E7 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6]>, M1 extends H<E2, MergedPath, I> = H<E2, MergedPath, I>, M2 extends H<E3, MergedPath, I2> = H<E3, MergedPath, I2>, M3 extends H<E4, MergedPath, I3> = H<E4, MergedPath, I3>, M4 extends H<E5, MergedPath, I4> = H<E5, MergedPath, I4>, M5 extends H<E6, MergedPath, I5> = H<E6, MergedPath, I5>>(path: P, ...handlers: [
267
- H<E2, MergedPath, I> & M1,
268
- H<E3, MergedPath, I2> & M2,
269
- H<E4, MergedPath, I3> & M3,
270
- H<E5, MergedPath, I4> & M4,
271
- H<E6, MergedPath, I5> & M5,
272
- H<E7, MergedPath, I6, R>
273
- ]): Hono$1<E, AddSchemaIfHasResponse<MergeTypedResponse<R> | MergeMiddlewareResponse<M1> | MergeMiddlewareResponse<M2> | MergeMiddlewareResponse<M3> | MergeMiddlewareResponse<M4> | MergeMiddlewareResponse<M5>, S, M, P, I6, BasePath>, BasePath, MergePath<BasePath, P>>;
274
- <P extends string = CurrentPath, R extends HandlerResponse<any> = any, I extends Input = BlankInput, I2 extends Input = I, I3 extends Input = I & I2, I4 extends Input = I & I2 & I3, I5 extends Input = I & I2 & I3 & I4, I6 extends Input = I & I2 & I3 & I4 & I5, I7 extends Input = I & I2 & I3 & I4 & I5 & I6, I8 extends Input = I & I2 & I3 & I4 & I5 & I6 & I7, E2 extends Env = E, E3 extends Env = IntersectNonAnyTypes<[E, E2]>, E4 extends Env = IntersectNonAnyTypes<[E, E2, E3]>, E5 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4]>, E6 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5]>, E7 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6]>, E8 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6, E7]>, E9 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6, E7, E8]>, M1 extends H<E2, P, I> = H<E2, P, I>, M2 extends H<E3, P, I2> = H<E3, P, I2>, M3 extends H<E4, P, I3> = H<E4, P, I3>, M4 extends H<E5, P, I4> = H<E5, P, I4>, M5 extends H<E6, P, I5> = H<E6, P, I5>, M6 extends H<E7, P, I6> = H<E7, P, I6>, M7 extends H<E8, P, I7> = H<E8, P, I7>>(...handlers: [
275
- H<E2, P, I> & M1,
276
- H<E3, P, I2> & M2,
277
- H<E4, P, I3> & M3,
278
- H<E5, P, I4> & M4,
279
- H<E6, P, I5> & M5,
280
- H<E7, P, I6> & M6,
281
- H<E8, P, I7> & M7,
282
- H<E9, P, I8, R>
283
- ]): Hono$1<IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6, E7, E8, E9]>, S & ToSchema<M, P, I8, MergeTypedResponse<R> | MergeMiddlewareResponse<M1> | MergeMiddlewareResponse<M2> | MergeMiddlewareResponse<M3> | MergeMiddlewareResponse<M4> | MergeMiddlewareResponse<M5> | MergeMiddlewareResponse<M6> | MergeMiddlewareResponse<M7>>, BasePath, CurrentPath>;
284
- <P extends string, MergedPath extends MergePath<BasePath, P>, R extends HandlerResponse<any> = any, I extends Input = BlankInput, I2 extends Input = I, I3 extends Input = I & I2, I4 extends Input = I & I2 & I3, I5 extends Input = I & I2 & I3 & I4, I6 extends Input = I & I2 & I3 & I4 & I5, I7 extends Input = I & I2 & I3 & I4 & I5 & I6, E2 extends Env = E, E3 extends Env = IntersectNonAnyTypes<[E, E2]>, E4 extends Env = IntersectNonAnyTypes<[E, E2, E3]>, E5 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4]>, E6 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5]>, E7 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6]>, E8 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6, E7]>, M1 extends H<E2, MergedPath, I> = H<E2, MergedPath, I>, M2 extends H<E3, MergedPath, I2> = H<E3, MergedPath, I2>, M3 extends H<E4, MergedPath, I3> = H<E4, MergedPath, I3>, M4 extends H<E5, MergedPath, I4> = H<E5, MergedPath, I4>, M5 extends H<E6, MergedPath, I5> = H<E6, MergedPath, I5>, M6 extends H<E7, MergedPath, I6> = H<E7, MergedPath, I6>>(path: P, ...handlers: [
285
- H<E2, MergedPath, I> & M1,
286
- H<E3, MergedPath, I2> & M2,
287
- H<E4, MergedPath, I3> & M3,
288
- H<E5, MergedPath, I4> & M4,
289
- H<E6, MergedPath, I5> & M5,
290
- H<E7, MergedPath, I6> & M6,
291
- H<E8, MergedPath, I7, R>
292
- ]): Hono$1<E, AddSchemaIfHasResponse<MergeTypedResponse<R> | MergeMiddlewareResponse<M1> | MergeMiddlewareResponse<M2> | MergeMiddlewareResponse<M3> | MergeMiddlewareResponse<M4> | MergeMiddlewareResponse<M5> | MergeMiddlewareResponse<M6>, S, M, P, I7, BasePath>, BasePath, MergePath<BasePath, P>>;
293
- <P extends string = CurrentPath, R extends HandlerResponse<any> = any, I extends Input = BlankInput, I2 extends Input = I, I3 extends Input = I & I2, I4 extends Input = I & I2 & I3, I5 extends Input = I & I2 & I3 & I4, I6 extends Input = I & I2 & I3 & I4 & I5, I7 extends Input = I & I2 & I3 & I4 & I5 & I6, I8 extends Input = I & I2 & I3 & I4 & I5 & I6 & I7, I9 extends Input = I & I2 & I3 & I4 & I5 & I6 & I7 & I8, E2 extends Env = E, E3 extends Env = IntersectNonAnyTypes<[E, E2]>, E4 extends Env = IntersectNonAnyTypes<[E, E2, E3]>, E5 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4]>, E6 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5]>, E7 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6]>, E8 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6, E7]>, E9 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6, E7, E8]>, E10 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6, E7, E8, E9]>, M1 extends H<E2, P, I> = H<E2, P, I>, M2 extends H<E3, P, I2> = H<E3, P, I2>, M3 extends H<E4, P, I3> = H<E4, P, I3>, M4 extends H<E5, P, I4> = H<E5, P, I4>, M5 extends H<E6, P, I5> = H<E6, P, I5>, M6 extends H<E7, P, I6> = H<E7, P, I6>, M7 extends H<E8, P, I7> = H<E8, P, I7>, M8 extends H<E9, P, I8> = H<E9, P, I8>>(...handlers: [
294
- H<E2, P, I> & M1,
295
- H<E3, P, I2> & M2,
296
- H<E4, P, I3> & M3,
297
- H<E5, P, I4> & M4,
298
- H<E6, P, I5> & M5,
299
- H<E7, P, I6> & M6,
300
- H<E8, P, I7> & M7,
301
- H<E9, P, I8> & M8,
302
- H<E10, P, I9, R>
303
- ]): Hono$1<IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6, E7, E8, E9, E10]>, S & ToSchema<M, P, I9, MergeTypedResponse<R> | MergeMiddlewareResponse<M1> | MergeMiddlewareResponse<M2> | MergeMiddlewareResponse<M3> | MergeMiddlewareResponse<M4> | MergeMiddlewareResponse<M5> | MergeMiddlewareResponse<M6> | MergeMiddlewareResponse<M7> | MergeMiddlewareResponse<M8>>, BasePath, CurrentPath>;
304
- <P extends string, MergedPath extends MergePath<BasePath, P>, R extends HandlerResponse<any> = any, I extends Input = BlankInput, I2 extends Input = I, I3 extends Input = I & I2, I4 extends Input = I & I2 & I3, I5 extends Input = I & I2 & I3 & I4, I6 extends Input = I & I2 & I3 & I4 & I5, I7 extends Input = I & I2 & I3 & I4 & I5 & I6, I8 extends Input = I & I2 & I3 & I4 & I5 & I6 & I7, E2 extends Env = E, E3 extends Env = IntersectNonAnyTypes<[E, E2]>, E4 extends Env = IntersectNonAnyTypes<[E, E2, E3]>, E5 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4]>, E6 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5]>, E7 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6]>, E8 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6, E7]>, E9 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6, E7, E8]>, M1 extends H<E2, MergedPath, I> = H<E2, MergedPath, I>, M2 extends H<E3, MergedPath, I2> = H<E3, MergedPath, I2>, M3 extends H<E4, MergedPath, I3> = H<E4, MergedPath, I3>, M4 extends H<E5, MergedPath, I4> = H<E5, MergedPath, I4>, M5 extends H<E6, MergedPath, I5> = H<E6, MergedPath, I5>, M6 extends H<E7, MergedPath, I6> = H<E7, MergedPath, I6>, M7 extends H<E8, MergedPath, I7> = H<E8, MergedPath, I7>>(path: P, ...handlers: [
305
- H<E2, MergedPath, I> & M1,
306
- H<E3, MergedPath, I2> & M2,
307
- H<E4, MergedPath, I3> & M3,
308
- H<E5, MergedPath, I4> & M4,
309
- H<E6, MergedPath, I5> & M5,
310
- H<E7, MergedPath, I6> & M6,
311
- H<E8, MergedPath, I7> & M7,
312
- H<E9, MergedPath, I8, R>
313
- ]): Hono$1<E, AddSchemaIfHasResponse<MergeTypedResponse<R> | MergeMiddlewareResponse<M1> | MergeMiddlewareResponse<M2> | MergeMiddlewareResponse<M3> | MergeMiddlewareResponse<M4> | MergeMiddlewareResponse<M5> | MergeMiddlewareResponse<M6> | MergeMiddlewareResponse<M7>, S, M, P, I8, BasePath>, BasePath, MergePath<BasePath, P>>;
314
- <P extends string = CurrentPath, R extends HandlerResponse<any> = any, I extends Input = BlankInput, I2 extends Input = I, I3 extends Input = I & I2, I4 extends Input = I & I2 & I3, I5 extends Input = I & I2 & I3 & I4, I6 extends Input = I & I2 & I3 & I4 & I5, I7 extends Input = I & I2 & I3 & I4 & I5 & I6, I8 extends Input = I & I2 & I3 & I4 & I5 & I6 & I7, I9 extends Input = I & I2 & I3 & I4 & I5 & I6 & I7 & I8, I10 extends Input = I & I2 & I3 & I4 & I5 & I6 & I7 & I8 & I9, E2 extends Env = E, E3 extends Env = IntersectNonAnyTypes<[E, E2]>, E4 extends Env = IntersectNonAnyTypes<[E, E2, E3]>, E5 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4]>, E6 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5]>, E7 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6]>, E8 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6, E7]>, E9 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6, E7, E8]>, E10 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6, E7, E8, E9]>, E11 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6, E7, E8, E9, E10]>, M1 extends H<E2, P, I> = H<E2, P, I>, M2 extends H<E3, P, I2> = H<E3, P, I2>, M3 extends H<E4, P, I3> = H<E4, P, I3>, M4 extends H<E5, P, I4> = H<E5, P, I4>, M5 extends H<E6, P, I5> = H<E6, P, I5>, M6 extends H<E7, P, I6> = H<E7, P, I6>, M7 extends H<E8, P, I7> = H<E8, P, I7>, M8 extends H<E9, P, I8> = H<E9, P, I8>, M9 extends H<E10, P, I9> = H<E10, P, I9>>(...handlers: [
315
- H<E2, P, I> & M1,
316
- H<E3, P, I2> & M2,
317
- H<E4, P, I3> & M3,
318
- H<E5, P, I4> & M4,
319
- H<E6, P, I5> & M5,
320
- H<E7, P, I6> & M6,
321
- H<E8, P, I7> & M7,
322
- H<E9, P, I8> & M8,
323
- H<E10, P, I9> & M9,
324
- H<E11, P, I10, R>
325
- ]): Hono$1<IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6, E7, E8, E9, E10, E11]>, S & ToSchema<M, P, I10, MergeTypedResponse<R> | MergeMiddlewareResponse<M1> | MergeMiddlewareResponse<M2> | MergeMiddlewareResponse<M3> | MergeMiddlewareResponse<M4> | MergeMiddlewareResponse<M5> | MergeMiddlewareResponse<M6> | MergeMiddlewareResponse<M7> | MergeMiddlewareResponse<M8> | MergeMiddlewareResponse<M9>>, BasePath, CurrentPath>;
326
- <P extends string, MergedPath extends MergePath<BasePath, P>, R extends HandlerResponse<any> = any, I extends Input = BlankInput, I2 extends Input = I, I3 extends Input = I & I2, I4 extends Input = I & I2 & I3, I5 extends Input = I & I2 & I3 & I4, I6 extends Input = I & I2 & I3 & I4 & I5, I7 extends Input = I & I2 & I3 & I4 & I5 & I6, I8 extends Input = I & I2 & I3 & I4 & I5 & I6 & I7, I9 extends Input = I & I2 & I3 & I4 & I5 & I6 & I7 & I8, E2 extends Env = E, E3 extends Env = IntersectNonAnyTypes<[E, E2]>, E4 extends Env = IntersectNonAnyTypes<[E, E2, E3]>, E5 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4]>, E6 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5]>, E7 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6]>, E8 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6, E7]>, E9 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6, E7, E8]>, E10 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6, E7, E8, E9]>, M1 extends H<E2, MergedPath, I> = H<E2, MergedPath, I>, M2 extends H<E3, MergedPath, I2> = H<E3, MergedPath, I2>, M3 extends H<E4, MergedPath, I3> = H<E4, MergedPath, I3>, M4 extends H<E5, MergedPath, I4> = H<E5, MergedPath, I4>, M5 extends H<E6, MergedPath, I5> = H<E6, MergedPath, I5>, M6 extends H<E7, MergedPath, I6> = H<E7, MergedPath, I6>, M7 extends H<E8, MergedPath, I7> = H<E8, MergedPath, I7>, M8 extends H<E9, MergedPath, I8> = H<E9, MergedPath, I8>>(path: P, ...handlers: [
327
- H<E2, MergedPath, I> & M1,
328
- H<E3, MergedPath, I2> & M2,
329
- H<E4, MergedPath, I3> & M3,
330
- H<E5, MergedPath, I4> & M4,
331
- H<E6, MergedPath, I5> & M5,
332
- H<E7, MergedPath, I6> & M6,
333
- H<E8, MergedPath, I7> & M7,
334
- H<E9, MergedPath, I8> & M8,
335
- H<E10, MergedPath, I9, R>
336
- ]): Hono$1<E, AddSchemaIfHasResponse<MergeTypedResponse<R> | MergeMiddlewareResponse<M1> | MergeMiddlewareResponse<M2> | MergeMiddlewareResponse<M3> | MergeMiddlewareResponse<M4> | MergeMiddlewareResponse<M5> | MergeMiddlewareResponse<M6> | MergeMiddlewareResponse<M7> | MergeMiddlewareResponse<M8>, S, M, P, I9, BasePath>, BasePath, MergePath<BasePath, P>>;
337
- <P extends string, MergedPath extends MergePath<BasePath, P>, R extends HandlerResponse<any> = any, I extends Input = BlankInput, I2 extends Input = I, I3 extends Input = I & I2, I4 extends Input = I & I2 & I3, I5 extends Input = I & I2 & I3 & I4, I6 extends Input = I & I2 & I3 & I4 & I5, I7 extends Input = I & I2 & I3 & I4 & I5 & I6, I8 extends Input = I & I2 & I3 & I4 & I5 & I6 & I7, I9 extends Input = I & I2 & I3 & I4 & I5 & I6 & I7 & I8, I10 extends Input = I & I2 & I3 & I4 & I5 & I6 & I7 & I8 & I9, E2 extends Env = E, E3 extends Env = IntersectNonAnyTypes<[E, E2]>, E4 extends Env = IntersectNonAnyTypes<[E, E2, E3]>, E5 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4]>, E6 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5]>, E7 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6]>, E8 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6, E7]>, E9 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6, E7, E8]>, E10 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6, E7, E8, E9]>, E11 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6, E7, E8, E9, E10]>, M1 extends H<E2, MergedPath, I> = H<E2, MergedPath, I>, M2 extends H<E3, MergedPath, I2> = H<E3, MergedPath, I2>, M3 extends H<E4, MergedPath, I3> = H<E4, MergedPath, I3>, M4 extends H<E5, MergedPath, I4> = H<E5, MergedPath, I4>, M5 extends H<E6, MergedPath, I5> = H<E6, MergedPath, I5>, M6 extends H<E7, MergedPath, I6> = H<E7, MergedPath, I6>, M7 extends H<E8, MergedPath, I7> = H<E8, MergedPath, I7>, M8 extends H<E9, MergedPath, I8> = H<E9, MergedPath, I8>, M9 extends H<E10, MergedPath, I9> = H<E10, MergedPath, I9>>(path: P, ...handlers: [
338
- H<E2, MergedPath, I> & M1,
339
- H<E3, MergedPath, I2> & M2,
340
- H<E4, MergedPath, I3> & M3,
341
- H<E5, MergedPath, I4> & M4,
342
- H<E6, MergedPath, I5> & M5,
343
- H<E7, MergedPath, I6> & M6,
344
- H<E8, MergedPath, I7> & M7,
345
- H<E9, MergedPath, I8> & M8,
346
- H<E10, MergedPath, I9> & M9,
347
- H<E11, MergedPath, I10, R>
348
- ]): Hono$1<E, AddSchemaIfHasResponse<MergeTypedResponse<R> | MergeMiddlewareResponse<M1> | MergeMiddlewareResponse<M2> | MergeMiddlewareResponse<M3> | MergeMiddlewareResponse<M4> | MergeMiddlewareResponse<M5> | MergeMiddlewareResponse<M6> | MergeMiddlewareResponse<M7> | MergeMiddlewareResponse<M8> | MergeMiddlewareResponse<M9>, S, M, P, I10, BasePath>, BasePath, MergePath<BasePath, P>>;
349
- <P extends string = CurrentPath, I extends Input = BlankInput, R extends HandlerResponse<any> = any>(...handlers: H<E, P, I, R>[]): Hono$1<E, S & ToSchema<M, P, I, MergeTypedResponse<R>>, BasePath, CurrentPath>;
350
- <P extends string, I extends Input = BlankInput, R extends HandlerResponse<any> = any>(path: P, ...handlers: [H<E, MergePath<BasePath, P>, I, R>, ...H<E, MergePath<BasePath, P>, I, R>[]]): Hono$1<E, S & ToSchema<M, MergePath<BasePath, P>, I, MergeTypedResponse<R>>, BasePath, MergePath<BasePath, P>>;
351
- <P extends string, R extends HandlerResponse<any> = any, I extends Input = BlankInput>(path: P): Hono$1<E, S & ToSchema<M, MergePath<BasePath, P>, I, MergeTypedResponse<R>>, BasePath, MergePath<BasePath, P>>;
352
- }
353
- interface MiddlewareHandlerInterface<E extends Env = Env, S extends Schema = BlankSchema, BasePath extends string = '/'> {
354
- <E2 extends Env = E>(...handlers: MiddlewareHandler<E2, MergePath<BasePath, '*'>>[]): Hono$1<IntersectNonAnyTypes<[E, E2]>, S, BasePath, MergePath<BasePath, '*'>>;
355
- <E2 extends Env = E>(handler: MiddlewareHandler<E2, MergePath<BasePath, '*'>>): Hono$1<IntersectNonAnyTypes<[E, E2]>, S, BasePath, MergePath<BasePath, '*'>>;
356
- <E2 extends Env = E, E3 extends Env = IntersectNonAnyTypes<[E, E2]>, P extends string = MergePath<BasePath, '*'>>(...handlers: [MiddlewareHandler<E2, P>, MiddlewareHandler<E3, P>]): Hono$1<IntersectNonAnyTypes<[E, E2, E3]>, S, BasePath, P>;
357
- <P extends string, MergedPath extends MergePath<BasePath, P>, E2 extends Env = E>(path: P, handler: MiddlewareHandler<E2, MergedPath, any, any>): Hono$1<IntersectNonAnyTypes<[E, E2]>, S, BasePath, MergedPath>;
358
- <E2 extends Env = E, E3 extends Env = IntersectNonAnyTypes<[E, E2]>, E4 extends Env = IntersectNonAnyTypes<[E, E2, E3]>, P extends string = MergePath<BasePath, '*'>>(...handlers: [
359
- MiddlewareHandler<E2, P, any, any>,
360
- MiddlewareHandler<E3, P, any, any>,
361
- MiddlewareHandler<E4, P, any, any>
362
- ]): Hono$1<IntersectNonAnyTypes<[E, E2, E3, E4]>, S, BasePath, P>;
363
- <P extends string, MergedPath extends MergePath<BasePath, P>, E2 extends Env = E, E3 extends Env = IntersectNonAnyTypes<[E, E2]>>(path: P, ...handlers: [MiddlewareHandler<E2, P>, MiddlewareHandler<E3, P>]): Hono$1<IntersectNonAnyTypes<[E, E2, E3]>, S, BasePath, MergedPath>;
364
- <E2 extends Env = E, E3 extends Env = IntersectNonAnyTypes<[E, E2]>, E4 extends Env = IntersectNonAnyTypes<[E, E2, E3]>, E5 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4]>, P extends string = MergePath<BasePath, '*'>>(...handlers: [
365
- MiddlewareHandler<E2, P>,
366
- MiddlewareHandler<E3, P>,
367
- MiddlewareHandler<E4, P>,
368
- MiddlewareHandler<E5, P>
369
- ]): Hono$1<IntersectNonAnyTypes<[E, E2, E3, E4, E5]>, S, BasePath, P>;
370
- <P extends string, MergedPath extends MergePath<BasePath, P>, E2 extends Env = E, E3 extends Env = IntersectNonAnyTypes<[E, E2]>, E4 extends Env = IntersectNonAnyTypes<[E, E2, E3]>>(path: P, ...handlers: [MiddlewareHandler<E2, P>, MiddlewareHandler<E3, P>, MiddlewareHandler<E4, P>]): Hono$1<IntersectNonAnyTypes<[E, E2, E3, E4]>, S, BasePath, MergedPath>;
371
- <E2 extends Env = E, E3 extends Env = IntersectNonAnyTypes<[E, E2]>, E4 extends Env = IntersectNonAnyTypes<[E, E2, E3]>, E5 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4]>, E6 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5]>, P extends string = MergePath<BasePath, '*'>>(...handlers: [
372
- MiddlewareHandler<E2, P>,
373
- MiddlewareHandler<E3, P>,
374
- MiddlewareHandler<E4, P>,
375
- MiddlewareHandler<E5, P>,
376
- MiddlewareHandler<E6, P>
377
- ]): Hono$1<IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6]>, S, BasePath, P>;
378
- <P extends string, MergedPath extends MergePath<BasePath, P>, E2 extends Env = E, E3 extends Env = IntersectNonAnyTypes<[E, E2]>, E4 extends Env = IntersectNonAnyTypes<[E, E2, E3]>, E5 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4]>>(path: P, ...handlers: [
379
- MiddlewareHandler<E2, P>,
380
- MiddlewareHandler<E3, P>,
381
- MiddlewareHandler<E4, P>,
382
- MiddlewareHandler<E5, P>
383
- ]): Hono$1<IntersectNonAnyTypes<[E, E2, E3, E4, E5]>, S, BasePath, MergedPath>;
384
- <E2 extends Env = E, E3 extends Env = IntersectNonAnyTypes<[E, E2]>, E4 extends Env = IntersectNonAnyTypes<[E, E2, E3]>, E5 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4]>, E6 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5]>, E7 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6]>, P extends string = MergePath<BasePath, '*'>>(...handlers: [
385
- MiddlewareHandler<E2, P>,
386
- MiddlewareHandler<E3, P>,
387
- MiddlewareHandler<E4, P>,
388
- MiddlewareHandler<E5, P>,
389
- MiddlewareHandler<E6, P>,
390
- MiddlewareHandler<E7, P>
391
- ]): Hono$1<IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6, E7]>, S, BasePath, P>;
392
- <P extends string, MergedPath extends MergePath<BasePath, P>, E2 extends Env = E, E3 extends Env = IntersectNonAnyTypes<[E, E2]>, E4 extends Env = IntersectNonAnyTypes<[E, E2, E3]>, E5 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4]>, E6 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5]>>(path: P, ...handlers: [
393
- MiddlewareHandler<E2, P>,
394
- MiddlewareHandler<E3, P>,
395
- MiddlewareHandler<E4, P>,
396
- MiddlewareHandler<E5, P>,
397
- MiddlewareHandler<E6, P>
398
- ]): Hono$1<IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6]>, S, BasePath, MergedPath>;
399
- <E2 extends Env = E, E3 extends Env = IntersectNonAnyTypes<[E, E2]>, E4 extends Env = IntersectNonAnyTypes<[E, E2, E3]>, E5 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4]>, E6 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5]>, E7 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6]>, E8 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6, E7]>, P extends string = MergePath<BasePath, '*'>>(...handlers: [
400
- MiddlewareHandler<E2, P>,
401
- MiddlewareHandler<E3, P>,
402
- MiddlewareHandler<E4, P>,
403
- MiddlewareHandler<E5, P>,
404
- MiddlewareHandler<E6, P>,
405
- MiddlewareHandler<E7, P>,
406
- MiddlewareHandler<E8, P>
407
- ]): Hono$1<IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6, E7, E8]>, S, BasePath, P>;
408
- <P extends string, MergedPath extends MergePath<BasePath, P>, E2 extends Env = E, E3 extends Env = IntersectNonAnyTypes<[E, E2]>, E4 extends Env = IntersectNonAnyTypes<[E, E2, E3]>, E5 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4]>, E6 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5]>, E7 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6]>>(path: P, ...handlers: [
409
- MiddlewareHandler<E2, P>,
410
- MiddlewareHandler<E3, P>,
411
- MiddlewareHandler<E4, P>,
412
- MiddlewareHandler<E5, P>,
413
- MiddlewareHandler<E6, P>,
414
- MiddlewareHandler<E7, P>
415
- ]): Hono$1<IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6, E7]>, S, BasePath, MergedPath>;
416
- <E2 extends Env = E, E3 extends Env = IntersectNonAnyTypes<[E, E2]>, E4 extends Env = IntersectNonAnyTypes<[E, E2, E3]>, E5 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4]>, E6 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5]>, E7 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6]>, E8 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6, E7]>, E9 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6, E7, E8]>, P extends string = MergePath<BasePath, '*'>>(...handlers: [
417
- MiddlewareHandler<E2, P>,
418
- MiddlewareHandler<E3, P>,
419
- MiddlewareHandler<E4, P>,
420
- MiddlewareHandler<E5, P>,
421
- MiddlewareHandler<E6, P>,
422
- MiddlewareHandler<E7, P>,
423
- MiddlewareHandler<E8, P>,
424
- MiddlewareHandler<E9, P>
425
- ]): Hono$1<IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6, E7, E8, E9]>, S, BasePath, P>;
426
- <P extends string, MergedPath extends MergePath<BasePath, P>, E2 extends Env = E, E3 extends Env = IntersectNonAnyTypes<[E, E2]>, E4 extends Env = IntersectNonAnyTypes<[E, E2, E3]>, E5 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4]>, E6 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5]>, E7 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6]>, E8 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6, E7]>>(path: P, ...handlers: [
427
- MiddlewareHandler<E2, P>,
428
- MiddlewareHandler<E3, P>,
429
- MiddlewareHandler<E4, P>,
430
- MiddlewareHandler<E5, P>,
431
- MiddlewareHandler<E6, P>,
432
- MiddlewareHandler<E7, P>,
433
- MiddlewareHandler<E8, P>
434
- ]): Hono$1<IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6, E7, E8]>, S, BasePath, MergedPath>;
435
- <E2 extends Env = E, E3 extends Env = IntersectNonAnyTypes<[E, E2]>, E4 extends Env = IntersectNonAnyTypes<[E, E2, E3]>, E5 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4]>, E6 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5]>, E7 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6]>, E8 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6, E7]>, E9 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6, E7, E8]>, E10 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6, E7, E8, E9]>, P extends string = MergePath<BasePath, '*'>>(...handlers: [
436
- MiddlewareHandler<E2, P>,
437
- MiddlewareHandler<E3, P>,
438
- MiddlewareHandler<E4, P>,
439
- MiddlewareHandler<E5, P>,
440
- MiddlewareHandler<E6, P>,
441
- MiddlewareHandler<E7, P>,
442
- MiddlewareHandler<E8, P>,
443
- MiddlewareHandler<E9, P>,
444
- MiddlewareHandler<E10, P>
445
- ]): Hono$1<IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6, E7, E8, E9, E10]>, S, BasePath, P>;
446
- <P extends string, MergedPath extends MergePath<BasePath, P>, E2 extends Env = E, E3 extends Env = IntersectNonAnyTypes<[E, E2]>, E4 extends Env = IntersectNonAnyTypes<[E, E2, E3]>, E5 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4]>, E6 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5]>, E7 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6]>, E8 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6, E7]>, E9 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6, E7, E8]>>(path: P, ...handlers: [
447
- MiddlewareHandler<E2, P>,
448
- MiddlewareHandler<E3, P>,
449
- MiddlewareHandler<E4, P>,
450
- MiddlewareHandler<E5, P>,
451
- MiddlewareHandler<E6, P>,
452
- MiddlewareHandler<E7, P>,
453
- MiddlewareHandler<E8, P>,
454
- MiddlewareHandler<E9, P>
455
- ]): Hono$1<IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6, E7, E8, E9]>, S, BasePath, MergedPath>;
456
- <E2 extends Env = E, E3 extends Env = IntersectNonAnyTypes<[E, E2]>, E4 extends Env = IntersectNonAnyTypes<[E, E2, E3]>, E5 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4]>, E6 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5]>, E7 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6]>, E8 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6, E7]>, E9 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6, E7, E8]>, E10 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6, E7, E8, E9]>, E11 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6, E7, E8, E9, E10]>, P extends string = MergePath<BasePath, '*'>>(...handlers: [
457
- MiddlewareHandler<E2, P>,
458
- MiddlewareHandler<E3, P>,
459
- MiddlewareHandler<E4, P>,
460
- MiddlewareHandler<E5, P>,
461
- MiddlewareHandler<E6, P>,
462
- MiddlewareHandler<E7, P>,
463
- MiddlewareHandler<E8, P>,
464
- MiddlewareHandler<E9, P>,
465
- MiddlewareHandler<E10, P>,
466
- MiddlewareHandler<E11, P>
467
- ]): Hono$1<IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6, E7, E8, E9, E10, E11]>, S, BasePath, P>;
468
- <P extends string, MergedPath extends MergePath<BasePath, P>, E2 extends Env = E, E3 extends Env = IntersectNonAnyTypes<[E, E2]>, E4 extends Env = IntersectNonAnyTypes<[E, E2, E3]>, E5 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4]>, E6 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5]>, E7 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6]>, E8 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6, E7]>, E9 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6, E7, E8]>, E10 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6, E7, E8, E9]>>(path: P, ...handlers: [
469
- MiddlewareHandler<E2, P>,
470
- MiddlewareHandler<E3, P>,
471
- MiddlewareHandler<E4, P>,
472
- MiddlewareHandler<E5, P>,
473
- MiddlewareHandler<E6, P>,
474
- MiddlewareHandler<E7, P>,
475
- MiddlewareHandler<E8, P>,
476
- MiddlewareHandler<E9, P>,
477
- MiddlewareHandler<E10, P>
478
- ]): Hono$1<IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6, E7, E8, E9, E10]>, S, BasePath, MergedPath>;
479
- <P extends string, E2 extends Env = E>(path: P, ...handlers: MiddlewareHandler<E2, MergePath<BasePath, P>>[]): Hono$1<E, S, BasePath, MergePath<BasePath, P>>;
480
- }
481
- interface OnHandlerInterface<E extends Env = Env, S extends Schema = BlankSchema, BasePath extends string = '/'> {
482
- <M extends string, P extends string, MergedPath extends MergePath<BasePath, P>, R extends HandlerResponse<any> = any, I extends Input = BlankInput, E2 extends Env = E>(method: M, path: P, handler: H<E2, MergedPath, I, R>): Hono$1<IntersectNonAnyTypes<[E, E2]>, S & ToSchema<M, MergePath<BasePath, P>, I, MergeTypedResponse<R>>, BasePath, MergePath<BasePath, P>>;
483
- <M extends string, P extends string, MergedPath extends MergePath<BasePath, P>, R extends HandlerResponse<any> = any, I extends Input = BlankInput, I2 extends Input = I, E2 extends Env = E, E3 extends Env = IntersectNonAnyTypes<[E, E2]>>(method: M, path: P, ...handlers: [H<E2, MergedPath, I>, H<E3, MergedPath, I2, R>]): Hono$1<IntersectNonAnyTypes<[E, E2, E3]>, S & ToSchema<M, MergePath<BasePath, P>, I2, MergeTypedResponse<R>>, BasePath, MergePath<BasePath, P>>;
484
- <M extends string, P extends string, MergedPath extends MergePath<BasePath, P>, R extends HandlerResponse<any> = any, I extends Input = BlankInput, I2 extends Input = I, I3 extends Input = I & I2, E2 extends Env = E, E3 extends Env = IntersectNonAnyTypes<[E, E2]>, E4 extends Env = IntersectNonAnyTypes<[E, E2, E3]>>(method: M, path: P, ...handlers: [H<E2, MergedPath, I>, H<E3, MergedPath, I2>, H<E4, MergedPath, I3, R>]): Hono$1<IntersectNonAnyTypes<[E, E2, E3, E4]>, S & ToSchema<M, MergePath<BasePath, P>, I3, MergeTypedResponse<R>>, BasePath, MergePath<BasePath, P>>;
485
- <M extends string, P extends string, MergedPath extends MergePath<BasePath, P>, R extends HandlerResponse<any> = any, I extends Input = BlankInput, I2 extends Input = I, I3 extends Input = I & I2, I4 extends Input = I & I2 & I3, E2 extends Env = E, E3 extends Env = IntersectNonAnyTypes<[E, E2]>, E4 extends Env = IntersectNonAnyTypes<[E, E2, E3]>, E5 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4]>>(method: M, path: P, ...handlers: [
486
- H<E2, MergedPath, I>,
487
- H<E3, MergedPath, I2>,
488
- H<E4, MergedPath, I3>,
489
- H<E5, MergedPath, I4, R>
490
- ]): Hono$1<IntersectNonAnyTypes<[E, E2, E3, E4, E5]>, S & ToSchema<M, MergePath<BasePath, P>, I4, MergeTypedResponse<R>>, BasePath, MergePath<BasePath, P>>;
491
- <M extends string, P extends string, MergedPath extends MergePath<BasePath, P>, R extends HandlerResponse<any> = any, I extends Input = BlankInput, I2 extends Input = I, I3 extends Input = I & I2, I4 extends Input = I & I2 & I3, I5 extends Input = I & I2 & I3 & I4, E2 extends Env = E, E3 extends Env = IntersectNonAnyTypes<[E, E2]>, E4 extends Env = IntersectNonAnyTypes<[E, E2, E3]>, E5 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4]>, E6 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5]>>(method: M, path: P, ...handlers: [
492
- H<E2, MergedPath, I>,
493
- H<E3, MergedPath, I2>,
494
- H<E4, MergedPath, I3>,
495
- H<E5, MergedPath, I4>,
496
- H<E6, MergedPath, I5, R>
497
- ]): Hono$1<IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6]>, S & ToSchema<M, MergePath<BasePath, P>, I5, MergeTypedResponse<R>>, BasePath, MergePath<BasePath, P>>;
498
- <M extends string, P extends string, MergedPath extends MergePath<BasePath, P>, R extends HandlerResponse<any> = any, I extends Input = BlankInput, I2 extends Input = I, I3 extends Input = I & I2, I4 extends Input = I & I2 & I3, I5 extends Input = I & I2 & I3 & I4, I6 extends Input = I & I2 & I3 & I4 & I5, E2 extends Env = E, E3 extends Env = IntersectNonAnyTypes<[E, E2]>, E4 extends Env = IntersectNonAnyTypes<[E, E2, E3]>, E5 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4]>, E6 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5]>, E7 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6]>>(method: M, path: P, ...handlers: [
499
- H<E2, MergedPath, I>,
500
- H<E3, MergedPath, I2>,
501
- H<E4, MergedPath, I3>,
502
- H<E5, MergedPath, I4>,
503
- H<E6, MergedPath, I5>,
504
- H<E7, MergedPath, I6, R>
505
- ]): Hono$1<IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6, E7]>, S & ToSchema<M, MergePath<BasePath, P>, I6, MergeTypedResponse<R>>, BasePath, MergePath<BasePath, P>>;
506
- <M extends string, P extends string, MergedPath extends MergePath<BasePath, P>, R extends HandlerResponse<any> = any, I extends Input = BlankInput, I2 extends Input = I, I3 extends Input = I & I2, I4 extends Input = I & I2 & I3, I5 extends Input = I & I2 & I3 & I4, I6 extends Input = I & I2 & I3 & I4 & I5, I7 extends Input = I & I2 & I3 & I4 & I5 & I6, E2 extends Env = E, E3 extends Env = IntersectNonAnyTypes<[E, E2]>, E4 extends Env = IntersectNonAnyTypes<[E, E2, E3]>, E5 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4]>, E6 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5]>, E7 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6]>, E8 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6, E7]>>(method: M, path: P, ...handlers: [
507
- H<E2, MergedPath, I>,
508
- H<E3, MergedPath, I2>,
509
- H<E4, MergedPath, I3>,
510
- H<E5, MergedPath, I4>,
511
- H<E6, MergedPath, I5>,
512
- H<E7, MergedPath, I6>,
513
- H<E8, MergedPath, I7, R>
514
- ]): Hono$1<IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6, E7, E8]>, S & ToSchema<M, MergePath<BasePath, P>, I7, MergeTypedResponse<R>>, BasePath, MergePath<BasePath, P>>;
515
- <M extends string, P extends string, MergedPath extends MergePath<BasePath, P>, R extends HandlerResponse<any> = any, I extends Input = BlankInput, I2 extends Input = I, I3 extends Input = I & I2, I4 extends Input = I & I2 & I3, I5 extends Input = I & I2 & I3 & I4, I6 extends Input = I & I2 & I3 & I4 & I5, I7 extends Input = I & I2 & I3 & I4 & I5 & I6, I8 extends Input = I & I2 & I3 & I4 & I5 & I6 & I7, E2 extends Env = E, E3 extends Env = IntersectNonAnyTypes<[E, E2]>, E4 extends Env = IntersectNonAnyTypes<[E, E2, E3]>, E5 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4]>, E6 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5]>, E7 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6]>, E8 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6, E7]>, E9 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6, E7, E8]>>(method: M, path: P, ...handlers: [
516
- H<E2, MergedPath, I>,
517
- H<E3, MergedPath, I2>,
518
- H<E4, MergedPath, I3>,
519
- H<E5, MergedPath, I4>,
520
- H<E6, MergedPath, I5>,
521
- H<E7, MergedPath, I6>,
522
- H<E8, MergedPath, I7>,
523
- H<E9, MergedPath, I8, R>
524
- ]): Hono$1<IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6, E7, E8, E9]>, S & ToSchema<M, MergePath<BasePath, P>, I8, MergeTypedResponse<R>>, BasePath, MergePath<BasePath, P>>;
525
- <M extends string, P extends string, MergedPath extends MergePath<BasePath, P>, R extends HandlerResponse<any> = any, I extends Input = BlankInput, I2 extends Input = I, I3 extends Input = I & I2, I4 extends Input = I & I2 & I3, I5 extends Input = I & I2 & I3 & I4, I6 extends Input = I & I2 & I3 & I4 & I5, I7 extends Input = I & I2 & I3 & I4 & I5 & I6, I8 extends Input = I & I2 & I3 & I4 & I5 & I6 & I7, I9 extends Input = I & I2 & I3 & I4 & I5 & I6 & I7 & I8, E2 extends Env = E, E3 extends Env = IntersectNonAnyTypes<[E, E2]>, E4 extends Env = IntersectNonAnyTypes<[E, E2, E3]>, E5 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4]>, E6 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5]>, E7 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6]>, E8 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6, E7]>, E9 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6, E7, E8]>, E10 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6, E7, E8, E9]>>(method: M, path: P, ...handlers: [
526
- H<E2, MergedPath, I>,
527
- H<E3, MergedPath, I2>,
528
- H<E4, MergedPath, I3>,
529
- H<E5, MergedPath, I4>,
530
- H<E6, MergedPath, I5>,
531
- H<E7, MergedPath, I6>,
532
- H<E8, MergedPath, I7>,
533
- H<E9, MergedPath, I8>,
534
- H<E10, MergedPath, I9, R>
535
- ]): Hono$1<IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6, E7, E8, E9, E10]>, S & ToSchema<M, MergePath<BasePath, P>, I9, MergeTypedResponse<R>>, BasePath, MergePath<BasePath, P>>;
536
- <M extends string, P extends string, MergedPath extends MergePath<BasePath, P>, R extends HandlerResponse<any> = any, I extends Input = BlankInput, I2 extends Input = I, I3 extends Input = I & I2, I4 extends Input = I & I2 & I3, I5 extends Input = I & I2 & I3 & I4, I6 extends Input = I & I2 & I3 & I4 & I5, I7 extends Input = I & I2 & I3 & I4 & I5 & I6, I8 extends Input = I & I2 & I3 & I4 & I5 & I6 & I7, I9 extends Input = I & I2 & I3 & I4 & I5 & I6 & I7 & I8, I10 extends Input = I & I2 & I3 & I4 & I5 & I6 & I7 & I8 & I9, E2 extends Env = E, E3 extends Env = IntersectNonAnyTypes<[E, E2]>, E4 extends Env = IntersectNonAnyTypes<[E, E2, E3]>, E5 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4]>, E6 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5]>, E7 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6]>, E8 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6, E7]>, E9 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6, E7, E8]>, E10 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6, E7, E8, E9]>, E11 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6, E7, E8, E9, E10]>>(method: M, path: P, ...handlers: [
537
- H<E2, MergedPath, I>,
538
- H<E3, MergedPath, I2>,
539
- H<E4, MergedPath, I3>,
540
- H<E5, MergedPath, I4>,
541
- H<E6, MergedPath, I5>,
542
- H<E7, MergedPath, I6>,
543
- H<E8, MergedPath, I7>,
544
- H<E9, MergedPath, I8>,
545
- H<E10, MergedPath, I9>,
546
- H<E11, MergedPath, I10, R>
547
- ]): Hono$1<IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6, E7, E8, E9, E10, E11]>, S & ToSchema<M, MergePath<BasePath, P>, I10, MergeTypedResponse<HandlerResponse<any>>>, BasePath, MergePath<BasePath, P>>;
548
- <M extends string, P extends string, R extends HandlerResponse<any> = any, I extends Input = BlankInput>(method: M, path: P, ...handlers: [H<E, MergePath<BasePath, P>, I, R>, ...H<E, MergePath<BasePath, P>, I, R>[]]): Hono$1<E, S & ToSchema<M, MergePath<BasePath, P>, I, MergeTypedResponse<R>>, BasePath, MergePath<BasePath, P>>;
549
- <M extends string, P extends string, MergedPath extends MergePath<BasePath, P>, R extends HandlerResponse<any> = any, I extends Input = BlankInput, E2 extends Env = E>(methods: M[], path: P, handler: H<E2, MergedPath, I, R>): Hono$1<IntersectNonAnyTypes<[E, E2]>, S & ToSchema<M, MergePath<BasePath, P>, I, MergeTypedResponse<R>>, BasePath, MergePath<BasePath, P>>;
550
- <M extends string, P extends string, MergedPath extends MergePath<BasePath, P>, R extends HandlerResponse<any> = any, I extends Input = BlankInput, I2 extends Input = I, E2 extends Env = E, E3 extends Env = IntersectNonAnyTypes<[E, E2]>>(methods: M[], path: P, ...handlers: [H<E2, MergedPath, I>, H<E3, MergedPath, I2, R>]): Hono$1<IntersectNonAnyTypes<[E, E2, E3]>, S & ToSchema<M, MergePath<BasePath, P>, I2, MergeTypedResponse<R>>, BasePath, MergePath<BasePath, P>>;
551
- <M extends string, P extends string, MergedPath extends MergePath<BasePath, P>, R extends HandlerResponse<any> = any, I extends Input = BlankInput, I2 extends Input = I, I3 extends Input = I & I2, E2 extends Env = E, E3 extends Env = IntersectNonAnyTypes<[E, E2]>, E4 extends Env = IntersectNonAnyTypes<[E, E2, E3]>>(methods: M[], path: P, ...handlers: [H<E2, MergedPath, I>, H<E3, MergedPath, I2>, H<E4, MergedPath, I3, R>]): Hono$1<IntersectNonAnyTypes<[E, E2, E3, E4]>, S & ToSchema<M, MergePath<BasePath, P>, I3, MergeTypedResponse<R>>, BasePath, MergePath<BasePath, P>>;
552
- <M extends string, P extends string, MergedPath extends MergePath<BasePath, P>, R extends HandlerResponse<any> = any, I extends Input = BlankInput, I2 extends Input = I, I3 extends Input = I & I2, I4 extends Input = I & I2 & I3, E2 extends Env = E, E3 extends Env = IntersectNonAnyTypes<[E, E2]>, E4 extends Env = IntersectNonAnyTypes<[E, E2, E3]>, E5 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4]>>(methods: M[], path: P, ...handlers: [
553
- H<E2, MergedPath, I>,
554
- H<E3, MergedPath, I2>,
555
- H<E4, MergedPath, I3>,
556
- H<E5, MergedPath, I4, R>
557
- ]): Hono$1<IntersectNonAnyTypes<[E, E2, E3, E4, E5]>, S & ToSchema<M, MergePath<BasePath, P>, I4, MergeTypedResponse<R>>, BasePath, MergePath<BasePath, P>>;
558
- <M extends string, P extends string, MergedPath extends MergePath<BasePath, P>, R extends HandlerResponse<any> = any, I extends Input = BlankInput, I2 extends Input = I, I3 extends Input = I & I2, I4 extends Input = I & I2 & I3, I5 extends Input = I & I2 & I3 & I4, E2 extends Env = E, E3 extends Env = IntersectNonAnyTypes<[E, E2]>, E4 extends Env = IntersectNonAnyTypes<[E, E2, E3]>, E5 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4]>, E6 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5]>>(methods: M[], path: P, ...handlers: [
559
- H<E2, MergedPath, I>,
560
- H<E3, MergedPath, I2>,
561
- H<E4, MergedPath, I3>,
562
- H<E5, MergedPath, I4>,
563
- H<E6, MergedPath, I5, R>
564
- ]): Hono$1<IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6]>, S & ToSchema<M, MergePath<BasePath, P>, I5, MergeTypedResponse<R>>, BasePath, MergePath<BasePath, P>>;
565
- <M extends string, P extends string, MergedPath extends MergePath<BasePath, P>, R extends HandlerResponse<any> = any, I extends Input = BlankInput, I2 extends Input = I, I3 extends Input = I & I2, I4 extends Input = I & I2 & I3, I5 extends Input = I & I2 & I3 & I4, I6 extends Input = I & I2 & I3 & I4 & I5, E2 extends Env = E, E3 extends Env = IntersectNonAnyTypes<[E, E2]>, E4 extends Env = IntersectNonAnyTypes<[E, E2, E3]>, E5 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4]>, E6 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5]>, E7 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6]>>(methods: M[], path: P, ...handlers: [
566
- H<E2, MergedPath, I>,
567
- H<E3, MergedPath, I2>,
568
- H<E4, MergedPath, I3>,
569
- H<E5, MergedPath, I4>,
570
- H<E6, MergedPath, I5>,
571
- H<E7, MergedPath, I6, R>
572
- ]): Hono$1<IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6, E7]>, S & ToSchema<M, MergePath<BasePath, P>, I6, MergeTypedResponse<R>>, BasePath, MergePath<BasePath, P>>;
573
- <M extends string, P extends string, MergedPath extends MergePath<BasePath, P>, R extends HandlerResponse<any> = any, I extends Input = BlankInput, I2 extends Input = I, I3 extends Input = I & I2, I4 extends Input = I & I2 & I3, I5 extends Input = I & I2 & I3 & I4, I6 extends Input = I & I2 & I3 & I4 & I5, I7 extends Input = I & I2 & I3 & I4 & I5 & I6, E2 extends Env = E, E3 extends Env = IntersectNonAnyTypes<[E, E2]>, E4 extends Env = IntersectNonAnyTypes<[E, E2, E3]>, E5 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4]>, E6 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5]>, E7 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6]>, E8 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6, E7]>>(methods: M[], path: P, ...handlers: [
574
- H<E2, MergedPath, I>,
575
- H<E3, MergedPath, I2>,
576
- H<E4, MergedPath, I3>,
577
- H<E5, MergedPath, I4>,
578
- H<E6, MergedPath, I5>,
579
- H<E7, MergedPath, I6>,
580
- H<E8, MergedPath, I7, R>
581
- ]): Hono$1<IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6, E7, E8]>, S & ToSchema<M, MergePath<BasePath, P>, I7, MergeTypedResponse<R>>, BasePath, MergePath<BasePath, P>>;
582
- <M extends string, P extends string, MergedPath extends MergePath<BasePath, P>, R extends HandlerResponse<any> = any, I extends Input = BlankInput, I2 extends Input = I, I3 extends Input = I & I2, I4 extends Input = I & I2 & I3, I5 extends Input = I & I2 & I3 & I4, I6 extends Input = I & I2 & I3 & I4 & I5, I7 extends Input = I & I2 & I3 & I4 & I5 & I6, I8 extends Input = I & I2 & I3 & I4 & I5 & I6 & I7, E2 extends Env = E, E3 extends Env = IntersectNonAnyTypes<[E, E2]>, E4 extends Env = IntersectNonAnyTypes<[E, E2, E3]>, E5 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4]>, E6 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5]>, E7 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6]>, E8 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6, E7]>, E9 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6, E7, E8]>>(methods: M[], path: P, ...handlers: [
583
- H<E2, MergedPath, I>,
584
- H<E3, MergedPath, I2>,
585
- H<E4, MergedPath, I3>,
586
- H<E5, MergedPath, I4>,
587
- H<E6, MergedPath, I5>,
588
- H<E7, MergedPath, I6>,
589
- H<E8, MergedPath, I7>,
590
- H<E9, MergedPath, I8, R>
591
- ]): Hono$1<IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6, E7, E8, E9]>, S & ToSchema<M, MergePath<BasePath, P>, I8, MergeTypedResponse<R>>, BasePath, MergePath<BasePath, P>>;
592
- <M extends string, P extends string, MergedPath extends MergePath<BasePath, P>, R extends HandlerResponse<any> = any, I extends Input = BlankInput, I2 extends Input = I, I3 extends Input = I & I2, I4 extends Input = I & I2 & I3, I5 extends Input = I & I2 & I3 & I4, I6 extends Input = I & I2 & I3 & I4 & I5, I7 extends Input = I & I2 & I3 & I4 & I5 & I6, I8 extends Input = I & I2 & I3 & I4 & I5 & I6 & I7, I9 extends Input = I & I2 & I3 & I4 & I5 & I6 & I7 & I8, E2 extends Env = E, E3 extends Env = IntersectNonAnyTypes<[E, E2]>, E4 extends Env = IntersectNonAnyTypes<[E, E2, E3]>, E5 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4]>, E6 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5]>, E7 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6]>, E8 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6, E7]>, E9 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6, E7, E8]>, E10 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6, E7, E8, E9]>>(methods: M[], path: P, ...handlers: [
593
- H<E2, MergedPath, I>,
594
- H<E3, MergedPath, I2>,
595
- H<E4, MergedPath, I3>,
596
- H<E5, MergedPath, I4>,
597
- H<E6, MergedPath, I5>,
598
- H<E7, MergedPath, I6>,
599
- H<E8, MergedPath, I7>,
600
- H<E9, MergedPath, I8>,
601
- H<E10, MergedPath, I9, R>
602
- ]): Hono$1<IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6, E7, E8, E9, E10]>, S & ToSchema<M, MergePath<BasePath, P>, I9, MergeTypedResponse<HandlerResponse<any>>>, BasePath, MergePath<BasePath, P>>;
603
- <M extends string, P extends string, MergedPath extends MergePath<BasePath, P>, R extends HandlerResponse<any> = any, I extends Input = BlankInput, I2 extends Input = I, I3 extends Input = I & I2, I4 extends Input = I & I2 & I3, I5 extends Input = I & I2 & I3 & I4, I6 extends Input = I & I2 & I3 & I4 & I5, I7 extends Input = I & I2 & I3 & I4 & I5 & I6, I8 extends Input = I & I2 & I3 & I4 & I5 & I6 & I7, I9 extends Input = I & I2 & I3 & I4 & I5 & I6 & I7 & I8, I10 extends Input = I & I2 & I3 & I4 & I5 & I6 & I7 & I8 & I9, E2 extends Env = E, E3 extends Env = IntersectNonAnyTypes<[E, E2]>, E4 extends Env = IntersectNonAnyTypes<[E, E2, E3]>, E5 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4]>, E6 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5]>, E7 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6]>, E8 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6, E7]>, E9 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6, E7, E8]>, E10 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6, E7, E8, E9]>, E11 extends Env = IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6, E7, E8, E9, E10]>>(methods: M[], path: P, ...handlers: [
604
- H<E2, MergedPath, I>,
605
- H<E3, MergedPath, I2>,
606
- H<E4, MergedPath, I3>,
607
- H<E5, MergedPath, I4>,
608
- H<E6, MergedPath, I5>,
609
- H<E7, MergedPath, I6>,
610
- H<E8, MergedPath, I7>,
611
- H<E9, MergedPath, I8>,
612
- H<E10, MergedPath, I9>,
613
- H<E11, MergedPath, I10, R>
614
- ]): Hono$1<IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6, E7, E8, E9, E10, E11]>, S & ToSchema<M, MergePath<BasePath, P>, I10, MergeTypedResponse<HandlerResponse<any>>>, BasePath, MergePath<BasePath, P>>;
615
- <M extends string, P extends string, R extends HandlerResponse<any> = any, I extends Input = BlankInput>(methods: M[], path: P, ...handlers: [H<E, MergePath<BasePath, P>, I, R>, ...H<E, MergePath<BasePath, P>, I, R>[]]): Hono$1<E, S & ToSchema<M, MergePath<BasePath, P>, I, MergeTypedResponse<R>>, BasePath, MergePath<BasePath, P>>;
616
- <M extends string, const Ps extends string[], I extends Input = BlankInput, R extends HandlerResponse<any> = any, E2 extends Env = E>(methods: M | M[], paths: Ps, ...handlers: H<E2, MergePath<BasePath, Ps[number]>, I, R>[]): Hono$1<E, S & ToSchema<M, MergePath<BasePath, Ps[number]>, I, MergeTypedResponse<R>>, BasePath, Ps extends [...string[], infer LastPath extends string] ? MergePath<BasePath, LastPath> : never>;
617
- }
618
- type ToSchemaOutput<RorO, I extends Input | Input['in']> = RorO extends TypedResponse<infer T, infer U, infer F> ? {
619
- output: unknown extends T ? {} : T;
620
- outputFormat: I extends {
621
- outputFormat: string;
622
- } ? I['outputFormat'] : F;
623
- status: U;
624
- } : {
625
- output: unknown extends RorO ? {} : RorO;
626
- outputFormat: unknown extends RorO ? 'json' : I extends {
627
- outputFormat: string;
628
- } ? I['outputFormat'] : 'json';
629
- status: StatusCode;
630
- };
631
- type ToSchema<M extends string, P extends string, I extends Input | Input['in'], RorO> = IsAny<RorO> extends true ? {
632
- [K in P]: {
633
- [K2 in M as AddDollar<K2>]: {
634
- input: AddParam<ExtractInput<I>, P>;
635
- output: {};
636
- outputFormat: ResponseFormat;
637
- status: StatusCode;
638
- };
639
- };
640
- } : [RorO] extends [never] ? {} : [RorO] extends [Promise<void>] ? {} : {
641
- [K in P]: {
642
- [K2 in M as AddDollar<K2>]: Simplify<{
643
- input: AddParam<ExtractInput<I>, P>;
644
- } & ToSchemaOutput<RorO, I>>;
645
- };
646
- };
647
- type Schema = {
648
- [Path: string]: {
649
- [Method: `$${Lowercase<string>}`]: Endpoint;
650
- };
651
- };
652
- type AddSchemaIfHasResponse<Merged, S extends Schema, M extends string, P extends string, I extends Input | Input['in'], BasePath extends string> = [Merged] extends [Promise<void>] ? S : S & ToSchema<M, MergePath<BasePath, P>, I, Merged>;
653
- type Endpoint = {
654
- input: any;
655
- output: any;
656
- outputFormat: ResponseFormat;
657
- status: StatusCode;
658
- };
659
- type ExtractParams<Path extends string> = string extends Path ? Record<string, string> : Path extends `${infer _Start}:${infer Param}/${infer Rest}` ? {
660
- [K in Param | keyof ExtractParams<`/${Rest}`>]: string;
661
- } : Path extends `${infer _Start}:${infer Param}` ? {
662
- [K in Param]: string;
663
- } : never;
664
- type FlattenIfIntersect<T> = T extends infer O ? {
665
- [K in keyof O]: O[K];
666
- } : never;
667
- type MergeSchemaPath<OrigSchema extends Schema, SubPath extends string> = {
668
- [P in keyof OrigSchema as MergePath<SubPath, P & string>]: [OrigSchema[P]] extends [
669
- Record<string, Endpoint>
670
- ] ? {
671
- [M in keyof OrigSchema[P]]: MergeEndpointParamsWithPath<OrigSchema[P][M], SubPath>;
672
- } : never;
673
- };
674
- type MergeEndpointParamsWithPath<T extends Endpoint, SubPath extends string> = T extends unknown ? {
675
- input: T['input'] extends {
676
- param: infer _;
677
- } ? ExtractParams<SubPath> extends never ? T['input'] : FlattenIfIntersect<T['input'] & {
678
- param: {
679
- [K in keyof ExtractParams<SubPath> as K extends `${infer Prefix}{${infer _}}` ? Prefix : K]: string;
680
- };
681
- }> : RemoveBlankRecord<ExtractParams<SubPath>> extends never ? T['input'] : T['input'] & {
682
- param: {
683
- [K in keyof ExtractParams<SubPath> as K extends `${infer Prefix}{${infer _}}` ? Prefix : K]: string;
684
- };
685
- };
686
- output: T['output'];
687
- outputFormat: T['outputFormat'];
688
- status: T['status'];
689
- } : never;
690
- type AddParam<I, P extends string> = ParamKeys<P> extends never ? I : I extends {
691
- param: infer _;
692
- } ? I : I & {
693
- param: UnionToIntersection<ParamKeyToRecord<ParamKeys<P>>>;
694
- };
695
- type AddDollar<T extends string> = `$${Lowercase<T>}`;
696
- type MergePath<A extends string, B extends string> = B extends '' ? MergePath<A, '/'> : A extends '' ? B : A extends '/' ? B : A extends `${infer P}/` ? B extends `/${infer Q}` ? `${P}/${Q}` : `${P}/${B}` : B extends `/${infer Q}` ? Q extends '' ? A : `${A}/${Q}` : `${A}/${B}`;
697
- type KnownResponseFormat = 'json' | 'text' | 'redirect';
698
- type ResponseFormat = KnownResponseFormat | string;
699
- type TypedResponse<T = unknown, U extends StatusCode = StatusCode, F extends ResponseFormat = T extends string ? 'text' : T extends JSONValue ? 'json' : ResponseFormat> = {
700
- _data: T;
701
- _status: U;
702
- _format: F;
703
- };
704
- type MergeTypedResponse<T> = T extends Promise<void> ? T : T extends Promise<infer T2> ? T2 extends TypedResponse ? T2 : TypedResponse : T extends TypedResponse ? T : TypedResponse;
705
- type ExtractTypedResponseOnly<T> = T extends TypedResponse ? T : never;
706
- type MergeMiddlewareResponse<T> = T extends (c: any, next: any) => Promise<infer R> ? Exclude<R, void> extends never ? never : Exclude<R, void> extends Response | TypedResponse<any, any, any> ? ExtractTypedResponseOnly<Exclude<R, void>> : never : T extends (c: any, next: any) => infer R ? R extends Response | TypedResponse<any, any, any> ? ExtractTypedResponseOnly<R> : never : never;
707
- type FormValue = string | Blob;
708
- type ParsedFormValue = string | File;
709
- type ValidationTargets<T extends FormValue = ParsedFormValue, P extends string = string> = {
710
- json: any;
711
- form: Record<string, T | T[]>;
712
- query: Record<string, string | string[]>;
713
- param: Record<P, P extends `${infer _}?` ? string | undefined : string>;
714
- header: Record<RequestHeader | CustomHeader, string>;
715
- cookie: Record<string, string>;
716
- };
717
- type ParamKey<Component> = Component extends `:${infer NameWithPattern}` ? NameWithPattern extends `${infer Name}{${infer Rest}` ? Rest extends `${infer _Pattern}?` ? `${Name}?` : Name : NameWithPattern : never;
718
- type ParamKeys<Path> = Path extends `${infer Component}/${infer Rest}` ? ParamKey<Component> | ParamKeys<Rest> : ParamKey<Path>;
719
- type ParamKeyToRecord<T extends string> = T extends `${infer R}?` ? Record<R, string | undefined> : {
720
- [K in T]: string;
721
- };
722
- type InputToDataByTarget<T extends Input['out'], Target extends keyof ValidationTargets> = T extends {
723
- [K in Target]: infer R;
724
- } ? R : never;
725
- type RemoveQuestion<T> = T extends `${infer R}?` ? R : T;
726
- type ProcessHead<T> = IfAnyThenEmptyObject<T extends Env ? (Env extends T ? {} : T) : T>;
727
- type IntersectNonAnyTypes<T extends any[]> = T extends [infer Head, ...infer Rest] ? ProcessHead<Head> & IntersectNonAnyTypes<Rest> : {};
728
- declare abstract class FetchEventLike {
729
- abstract readonly request: Request;
730
- abstract respondWith(promise: Response | Promise<Response>): void;
731
- abstract passThroughOnException(): void;
732
- abstract waitUntil(promise: Promise<void>): void;
733
- }
734
-
735
- /**
736
- * @module
737
- * Body utility.
738
- */
739
-
740
- type BodyDataValueDot = {
741
- [x: string]: string | File | BodyDataValueDot;
742
- };
743
- type BodyDataValueDotAll = {
744
- [x: string]: string | File | (string | File)[] | BodyDataValueDotAll;
745
- };
746
- type SimplifyBodyData<T> = {
747
- [K in keyof T]: string | File | (string | File)[] | BodyDataValueDotAll extends T[K] ? string | File | (string | File)[] | BodyDataValueDotAll : string | File | BodyDataValueDot extends T[K] ? string | File | BodyDataValueDot : string | File | (string | File)[] extends T[K] ? string | File | (string | File)[] : string | File;
748
- } & {};
749
- type BodyDataValueComponent<T> = string | File | (T extends {
750
- all: false;
751
- } ? never : T extends {
752
- all: true;
753
- } | {
754
- all: boolean;
755
- } ? (string | File)[] : never);
756
- type BodyDataValueObject<T> = {
757
- [key: string]: BodyDataValueComponent<T> | BodyDataValueObject<T>;
758
- };
759
- type BodyDataValue<T> = BodyDataValueComponent<T> | (T extends {
760
- dot: false;
761
- } ? never : T extends {
762
- dot: true;
763
- } | {
764
- dot: boolean;
765
- } ? BodyDataValueObject<T> : never);
766
- type BodyData<T extends Partial<ParseBodyOptions> = {}> = SimplifyBodyData<Record<string, BodyDataValue<T>>>;
767
- type ParseBodyOptions = {
768
- /**
769
- * Determines whether all fields with multiple values should be parsed as arrays.
770
- * @default false
771
- * @example
772
- * const data = new FormData()
773
- * data.append('file', 'aaa')
774
- * data.append('file', 'bbb')
775
- * data.append('message', 'hello')
776
- *
777
- * If all is false:
778
- * parseBody should return { file: 'bbb', message: 'hello' }
779
- *
780
- * If all is true:
781
- * parseBody should return { file: ['aaa', 'bbb'], message: 'hello' }
782
- */
783
- all: boolean;
784
- /**
785
- * Determines whether all fields with dot notation should be parsed as nested objects.
786
- * @default false
787
- * @example
788
- * const data = new FormData()
789
- * data.append('obj.key1', 'value1')
790
- * data.append('obj.key2', 'value2')
791
- *
792
- * If dot is false:
793
- * parseBody should return { 'obj.key1': 'value1', 'obj.key2': 'value2' }
794
- *
795
- * If dot is true:
796
- * parseBody should return { obj: { key1: 'value1', key2: 'value2' } }
797
- */
798
- dot: boolean;
799
- };
800
-
801
- type Body = {
802
- json: any;
803
- text: string;
804
- arrayBuffer: ArrayBuffer;
805
- blob: Blob;
806
- formData: FormData;
807
- };
808
- type BodyCache = Partial<Body>;
809
- declare class HonoRequest$1<P extends string = '/', I extends Input['out'] = {}> {
810
-
811
- /**
812
- * `.raw` can get the raw Request object.
813
- *
814
- * @see {@link https://hono.dev/docs/api/request#raw}
815
- *
816
- * @example
817
- * ```ts
818
- * // For Cloudflare Workers
819
- * app.post('/', async (c) => {
820
- * const metadata = c.req.raw.cf?.hostMetadata?
821
- * ...
822
- * })
823
- * ```
824
- */
825
- raw: Request;
826
- routeIndex: number;
827
- /**
828
- * `.path` can get the pathname of the request.
829
- *
830
- * @see {@link https://hono.dev/docs/api/request#path}
831
- *
832
- * @example
833
- * ```ts
834
- * app.get('/about/me', (c) => {
835
- * const pathname = c.req.path // `/about/me`
836
- * })
837
- * ```
838
- */
839
- path: string;
840
- bodyCache: BodyCache;
841
- constructor(request: Request, path?: string, matchResult?: Result<[unknown, RouterRoute]>);
842
- /**
843
- * `.req.param()` gets the path parameters.
844
- *
845
- * @see {@link https://hono.dev/docs/api/routing#path-parameter}
846
- *
847
- * @example
848
- * ```ts
849
- * const name = c.req.param('name')
850
- * // or all parameters at once
851
- * const { id, comment_id } = c.req.param()
852
- * ```
853
- */
854
- param<P2 extends ParamKeys<P> = ParamKeys<P>>(key: string extends P ? never : P2 extends `${infer _}?` ? never : P2): string;
855
- param<P2 extends RemoveQuestion<ParamKeys<P>> = RemoveQuestion<ParamKeys<P>>>(key: P2): string | undefined;
856
- param(key: string): string | undefined;
857
- param<P2 extends string = P>(): Simplify<UnionToIntersection<ParamKeyToRecord<ParamKeys<P2>>>>;
858
- /**
859
- * `.query()` can get querystring parameters.
860
- *
861
- * @see {@link https://hono.dev/docs/api/request#query}
862
- *
863
- * @example
864
- * ```ts
865
- * // Query params
866
- * app.get('/search', (c) => {
867
- * const query = c.req.query('q')
868
- * })
869
- *
870
- * // Get all params at once
871
- * app.get('/search', (c) => {
872
- * const { q, limit, offset } = c.req.query()
873
- * })
874
- * ```
875
- */
876
- query(key: string): string | undefined;
877
- query(): Record<string, string>;
878
- /**
879
- * `.queries()` can get multiple querystring parameter values, e.g. /search?tags=A&tags=B
880
- *
881
- * @see {@link https://hono.dev/docs/api/request#queries}
882
- *
883
- * @example
884
- * ```ts
885
- * app.get('/search', (c) => {
886
- * // tags will be string[]
887
- * const tags = c.req.queries('tags')
888
- * })
889
- * ```
890
- */
891
- queries(key: string): string[] | undefined;
892
- queries(): Record<string, string[]>;
893
- /**
894
- * `.header()` can get the request header value.
895
- *
896
- * @see {@link https://hono.dev/docs/api/request#header}
897
- *
898
- * @example
899
- * ```ts
900
- * app.get('/', (c) => {
901
- * const userAgent = c.req.header('User-Agent')
902
- * })
903
- * ```
904
- */
905
- header(name: RequestHeader): string | undefined;
906
- header(name: string): string | undefined;
907
- header(): Record<RequestHeader | (string & CustomHeader), string>;
908
- /**
909
- * `.parseBody()` can parse Request body of type `multipart/form-data` or `application/x-www-form-urlencoded`
910
- *
911
- * @see {@link https://hono.dev/docs/api/request#parsebody}
912
- *
913
- * @example
914
- * ```ts
915
- * app.post('/entry', async (c) => {
916
- * const body = await c.req.parseBody()
917
- * })
918
- * ```
919
- */
920
- parseBody<Options extends Partial<ParseBodyOptions>, T extends BodyData<Options>>(options?: Options): Promise<T>;
921
- parseBody<T extends BodyData>(options?: Partial<ParseBodyOptions>): Promise<T>;
922
- /**
923
- * `.json()` can parse Request body of type `application/json`
924
- *
925
- * @see {@link https://hono.dev/docs/api/request#json}
926
- *
927
- * @example
928
- * ```ts
929
- * app.post('/entry', async (c) => {
930
- * const body = await c.req.json()
931
- * })
932
- * ```
933
- */
934
- json<T = any>(): Promise<T>;
935
- /**
936
- * `.text()` can parse Request body of type `text/plain`
937
- *
938
- * @see {@link https://hono.dev/docs/api/request#text}
939
- *
940
- * @example
941
- * ```ts
942
- * app.post('/entry', async (c) => {
943
- * const body = await c.req.text()
944
- * })
945
- * ```
946
- */
947
- text(): Promise<string>;
948
- /**
949
- * `.arrayBuffer()` parse Request body as an `ArrayBuffer`
950
- *
951
- * @see {@link https://hono.dev/docs/api/request#arraybuffer}
952
- *
953
- * @example
954
- * ```ts
955
- * app.post('/entry', async (c) => {
956
- * const body = await c.req.arrayBuffer()
957
- * })
958
- * ```
959
- */
960
- arrayBuffer(): Promise<ArrayBuffer>;
961
- /**
962
- * Parses the request body as a `Blob`.
963
- * @example
964
- * ```ts
965
- * app.post('/entry', async (c) => {
966
- * const body = await c.req.blob();
967
- * });
968
- * ```
969
- * @see https://hono.dev/docs/api/request#blob
970
- */
971
- blob(): Promise<Blob>;
972
- /**
973
- * Parses the request body as `FormData`.
974
- * @example
975
- * ```ts
976
- * app.post('/entry', async (c) => {
977
- * const body = await c.req.formData();
978
- * });
979
- * ```
980
- * @see https://hono.dev/docs/api/request#formdata
981
- */
982
- formData(): Promise<FormData>;
983
- /**
984
- * Adds validated data to the request.
985
- *
986
- * @param target - The target of the validation.
987
- * @param data - The validated data to add.
988
- */
989
- addValidatedData(target: keyof ValidationTargets, data: {}): void;
990
- /**
991
- * Gets validated data from the request.
992
- *
993
- * @param target - The target of the validation.
994
- * @returns The validated data.
995
- *
996
- * @see https://hono.dev/docs/api/request#valid
997
- */
998
- valid<T extends keyof I & keyof ValidationTargets>(target: T): InputToDataByTarget<I, T>;
999
- /**
1000
- * `.url()` can get the request url strings.
1001
- *
1002
- * @see {@link https://hono.dev/docs/api/request#url}
1003
- *
1004
- * @example
1005
- * ```ts
1006
- * app.get('/about/me', (c) => {
1007
- * const url = c.req.url // `http://localhost:8787/about/me`
1008
- * ...
1009
- * })
1010
- * ```
1011
- */
1012
- get url(): string;
1013
- /**
1014
- * `.method()` can get the method name of the request.
1015
- *
1016
- * @see {@link https://hono.dev/docs/api/request#method}
1017
- *
1018
- * @example
1019
- * ```ts
1020
- * app.get('/about/me', (c) => {
1021
- * const method = c.req.method // `GET`
1022
- * })
1023
- * ```
1024
- */
1025
- get method(): string;
1026
- get [GET_MATCH_RESULT](): Result<[unknown, RouterRoute]>;
1027
- /**
1028
- * `.matchedRoutes()` can return a matched route in the handler
1029
- *
1030
- * @deprecated
1031
- *
1032
- * Use matchedRoutes helper defined in "hono/route" instead.
1033
- *
1034
- * @see {@link https://hono.dev/docs/api/request#matchedroutes}
1035
- *
1036
- * @example
1037
- * ```ts
1038
- * app.use('*', async function logger(c, next) {
1039
- * await next()
1040
- * c.req.matchedRoutes.forEach(({ handler, method, path }, i) => {
1041
- * const name = handler.name || (handler.length < 2 ? '[handler]' : '[middleware]')
1042
- * console.log(
1043
- * method,
1044
- * ' ',
1045
- * path,
1046
- * ' '.repeat(Math.max(10 - path.length, 0)),
1047
- * name,
1048
- * i === c.req.routeIndex ? '<- respond from here' : ''
1049
- * )
1050
- * })
1051
- * })
1052
- * ```
1053
- */
1054
- get matchedRoutes(): RouterRoute[];
1055
- /**
1056
- * `routePath()` can retrieve the path registered within the handler
1057
- *
1058
- * @deprecated
1059
- *
1060
- * Use routePath helper defined in "hono/route" instead.
1061
- *
1062
- * @see {@link https://hono.dev/docs/api/request#routepath}
1063
- *
1064
- * @example
1065
- * ```ts
1066
- * app.get('/posts/:id', (c) => {
1067
- * return c.json({ path: c.req.routePath })
1068
- * })
1069
- * ```
1070
- */
1071
- get routePath(): string;
1072
- }
1073
-
1074
- /**
1075
- * Union types for BaseMime
1076
- */
1077
- type BaseMime = (typeof _baseMimes)[keyof typeof _baseMimes];
1078
- declare const _baseMimes: {
1079
- readonly aac: "audio/aac";
1080
- readonly avi: "video/x-msvideo";
1081
- readonly avif: "image/avif";
1082
- readonly av1: "video/av1";
1083
- readonly bin: "application/octet-stream";
1084
- readonly bmp: "image/bmp";
1085
- readonly css: "text/css";
1086
- readonly csv: "text/csv";
1087
- readonly eot: "application/vnd.ms-fontobject";
1088
- readonly epub: "application/epub+zip";
1089
- readonly gif: "image/gif";
1090
- readonly gz: "application/gzip";
1091
- readonly htm: "text/html";
1092
- readonly html: "text/html";
1093
- readonly ico: "image/x-icon";
1094
- readonly ics: "text/calendar";
1095
- readonly jpeg: "image/jpeg";
1096
- readonly jpg: "image/jpeg";
1097
- readonly js: "text/javascript";
1098
- readonly json: "application/json";
1099
- readonly jsonld: "application/ld+json";
1100
- readonly map: "application/json";
1101
- readonly mid: "audio/x-midi";
1102
- readonly midi: "audio/x-midi";
1103
- readonly mjs: "text/javascript";
1104
- readonly mp3: "audio/mpeg";
1105
- readonly mp4: "video/mp4";
1106
- readonly mpeg: "video/mpeg";
1107
- readonly oga: "audio/ogg";
1108
- readonly ogv: "video/ogg";
1109
- readonly ogx: "application/ogg";
1110
- readonly opus: "audio/opus";
1111
- readonly otf: "font/otf";
1112
- readonly pdf: "application/pdf";
1113
- readonly png: "image/png";
1114
- readonly rtf: "application/rtf";
1115
- readonly svg: "image/svg+xml";
1116
- readonly tif: "image/tiff";
1117
- readonly tiff: "image/tiff";
1118
- readonly ts: "video/mp2t";
1119
- readonly ttf: "font/ttf";
1120
- readonly txt: "text/plain";
1121
- readonly wasm: "application/wasm";
1122
- readonly webm: "video/webm";
1123
- readonly weba: "audio/webm";
1124
- readonly webmanifest: "application/manifest+json";
1125
- readonly webp: "image/webp";
1126
- readonly woff: "font/woff";
1127
- readonly woff2: "font/woff2";
1128
- readonly xhtml: "application/xhtml+xml";
1129
- readonly xml: "application/xml";
1130
- readonly zip: "application/zip";
1131
- readonly '3gp': "video/3gpp";
1132
- readonly '3g2': "video/3gpp2";
1133
- readonly gltf: "model/gltf+json";
1134
- readonly glb: "model/gltf-binary";
1135
- };
1136
-
1137
- type HeaderRecord = Record<'Content-Type', BaseMime> | Record<ResponseHeader, string | string[]> | Record<string, string | string[]>;
1138
- /**
1139
- * Data type can be a string, ArrayBuffer, Uint8Array (buffer), or ReadableStream.
1140
- */
1141
- type Data = string | ArrayBuffer | ReadableStream | Uint8Array<ArrayBuffer>;
1142
- /**
1143
- * Interface for the execution context in a web worker or similar environment.
1144
- */
1145
- interface ExecutionContext {
1146
- /**
1147
- * Extends the lifetime of the event callback until the promise is settled.
1148
- *
1149
- * @param promise - A promise to wait for.
1150
- */
1151
- waitUntil(promise: Promise<unknown>): void;
1152
- /**
1153
- * Allows the event to be passed through to subsequent event listeners.
1154
- */
1155
- passThroughOnException(): void;
1156
- /**
1157
- * For compatibility with Wrangler 4.x.
1158
- */
1159
- props: any;
1160
- /**
1161
- * For compatibility with Wrangler 4.x.
1162
- */
1163
- exports?: any;
1164
- }
1165
- /**
1166
- * Interface for context variable mapping.
1167
- */
1168
- interface ContextVariableMap {
1169
- }
1170
- /**
1171
- * Interface for context renderer.
1172
- */
1173
- interface ContextRenderer {
1174
- }
1175
- /**
1176
- * Interface representing a renderer for content.
1177
- *
1178
- * @interface DefaultRenderer
1179
- * @param {string | Promise<string>} content - The content to be rendered, which can be either a string or a Promise resolving to a string.
1180
- * @returns {Response | Promise<Response>} - The response after rendering the content, which can be either a Response or a Promise resolving to a Response.
1181
- */
1182
- interface DefaultRenderer {
1183
- (content: string | Promise<string>): Response | Promise<Response>;
1184
- }
1185
- /**
1186
- * Renderer type which can either be a ContextRenderer or DefaultRenderer.
1187
- */
1188
- type Renderer = ContextRenderer extends Function ? ContextRenderer : DefaultRenderer;
1189
- /**
1190
- * Extracts the props for the renderer.
1191
- */
1192
- type PropsForRenderer = [...Required<Parameters<Renderer>>] extends [unknown, infer Props] ? Props : unknown;
1193
- type Layout<T = Record<string, any>> = (props: T) => any;
1194
- /**
1195
- * Interface for getting context variables.
1196
- *
1197
- * @template E - Environment type.
1198
- */
1199
- interface Get<E extends Env> {
1200
- <Key extends keyof E['Variables']>(key: Key): E['Variables'][Key];
1201
- <Key extends keyof ContextVariableMap>(key: Key): ContextVariableMap[Key];
1202
- }
1203
- /**
1204
- * Interface for setting context variables.
1205
- *
1206
- * @template E - Environment type.
1207
- */
1208
- interface Set$1<E extends Env> {
1209
- <Key extends keyof E['Variables']>(key: Key, value: E['Variables'][Key]): void;
1210
- <Key extends keyof ContextVariableMap>(key: Key, value: ContextVariableMap[Key]): void;
1211
- }
1212
- /**
1213
- * Interface for creating a new response.
1214
- */
1215
- interface NewResponse {
1216
- (data: Data | null, status?: StatusCode, headers?: HeaderRecord): Response;
1217
- (data: Data | null, init?: ResponseOrInit): Response;
1218
- }
1219
- /**
1220
- * Interface for responding with a body.
1221
- */
1222
- interface BodyRespond {
1223
- <T extends Data, U extends ContentfulStatusCode>(data: T, status?: U, headers?: HeaderRecord): Response & TypedResponse<T, U, 'body'>;
1224
- <T extends Data, U extends ContentfulStatusCode>(data: T, init?: ResponseOrInit<U>): Response & TypedResponse<T, U, 'body'>;
1225
- <T extends null, U extends StatusCode>(data: T, status?: U, headers?: HeaderRecord): Response & TypedResponse<null, U, 'body'>;
1226
- <T extends null, U extends StatusCode>(data: T, init?: ResponseOrInit<U>): Response & TypedResponse<null, U, 'body'>;
1227
- }
1228
- /**
1229
- * Interface for responding with text.
1230
- *
1231
- * @interface TextRespond
1232
- * @template T - The type of the text content.
1233
- * @template U - The type of the status code.
1234
- *
1235
- * @param {T} text - The text content to be included in the response.
1236
- * @param {U} [status] - An optional status code for the response.
1237
- * @param {HeaderRecord} [headers] - An optional record of headers to include in the response.
1238
- *
1239
- * @returns {Response & TypedResponse<T, U, 'text'>} - The response after rendering the text content, typed with the provided text and status code types.
1240
- */
1241
- interface TextRespond {
1242
- <T extends string, U extends ContentfulStatusCode = ContentfulStatusCode>(text: T, status?: U, headers?: HeaderRecord): Response & TypedResponse<T, U, 'text'>;
1243
- <T extends string, U extends ContentfulStatusCode = ContentfulStatusCode>(text: T, init?: ResponseOrInit<U>): Response & TypedResponse<T, U, 'text'>;
1244
- }
1245
- /**
1246
- * Interface for responding with JSON.
1247
- *
1248
- * @interface JSONRespond
1249
- * @template T - The type of the JSON value or simplified unknown type.
1250
- * @template U - The type of the status code.
1251
- *
1252
- * @param {T} object - The JSON object to be included in the response.
1253
- * @param {U} [status] - An optional status code for the response.
1254
- * @param {HeaderRecord} [headers] - An optional record of headers to include in the response.
1255
- *
1256
- * @returns {JSONRespondReturn<T, U>} - The response after rendering the JSON object, typed with the provided object and status code types.
1257
- */
1258
- interface JSONRespond {
1259
- <T extends JSONValue | {} | InvalidJSONValue, U extends ContentfulStatusCode = ContentfulStatusCode>(object: T, status?: U, headers?: HeaderRecord): JSONRespondReturn<T, U>;
1260
- <T extends JSONValue | {} | InvalidJSONValue, U extends ContentfulStatusCode = ContentfulStatusCode>(object: T, init?: ResponseOrInit<U>): JSONRespondReturn<T, U>;
1261
- }
1262
- /**
1263
- * @template T - The type of the JSON value or simplified unknown type.
1264
- * @template U - The type of the status code.
1265
- *
1266
- * @returns {Response & TypedResponse<JSONParsed<T>, U, 'json'>} - The response after rendering the JSON object, typed with the provided object and status code types.
1267
- */
1268
- type JSONRespondReturn<T extends JSONValue | {} | InvalidJSONValue, U extends ContentfulStatusCode> = Response & TypedResponse<JSONParsed<T>, U, 'json'>;
1269
- /**
1270
- * Interface representing a function that responds with HTML content.
1271
- *
1272
- * @param html - The HTML content to respond with, which can be a string or a Promise that resolves to a string.
1273
- * @param status - (Optional) The HTTP status code for the response.
1274
- * @param headers - (Optional) A record of headers to include in the response.
1275
- * @param init - (Optional) The response initialization object.
1276
- *
1277
- * @returns A Response object or a Promise that resolves to a Response object.
1278
- */
1279
- interface HTMLRespond {
1280
- <T extends string | Promise<string>>(html: T, status?: ContentfulStatusCode, headers?: HeaderRecord): T extends string ? Response : Promise<Response>;
1281
- <T extends string | Promise<string>>(html: T, init?: ResponseOrInit<ContentfulStatusCode>): T extends string ? Response : Promise<Response>;
1282
- }
1283
- /**
1284
- * Options for configuring the context.
1285
- *
1286
- * @template E - Environment type.
1287
- */
1288
- type ContextOptions<E extends Env> = {
1289
- /**
1290
- * Bindings for the environment.
1291
- */
1292
- env: E['Bindings'];
1293
- /**
1294
- * Execution context for the request.
1295
- */
1296
- executionCtx?: FetchEventLike | ExecutionContext | undefined;
1297
- /**
1298
- * Handler for not found responses.
1299
- */
1300
- notFoundHandler?: NotFoundHandler<E>;
1301
- matchResult?: Result<[H, RouterRoute]>;
1302
- path?: string;
1303
- };
1304
- interface SetHeadersOptions {
1305
- append?: boolean;
1306
- }
1307
- interface SetHeaders {
1308
- (name: 'Content-Type', value?: BaseMime, options?: SetHeadersOptions): void;
1309
- (name: ResponseHeader, value?: string, options?: SetHeadersOptions): void;
1310
- (name: string, value?: string, options?: SetHeadersOptions): void;
1311
- }
1312
- type ResponseHeadersInit = [string, string][] | Record<'Content-Type', BaseMime> | Record<ResponseHeader, string> | Record<string, string> | Headers;
1313
- interface ResponseInit<T extends StatusCode = StatusCode> {
1314
- headers?: ResponseHeadersInit;
1315
- status?: T;
1316
- statusText?: string;
1317
- }
1318
- type ResponseOrInit<T extends StatusCode = StatusCode> = ResponseInit<T> | Response;
1319
- declare class Context<E extends Env = any, P extends string = any, I extends Input = {}> {
1320
-
1321
- /**
1322
- * `.env` can get bindings (environment variables, secrets, KV namespaces, D1 database, R2 bucket etc.) in Cloudflare Workers.
1323
- *
1324
- * @see {@link https://hono.dev/docs/api/context#env}
1325
- *
1326
- * @example
1327
- * ```ts
1328
- * // Environment object for Cloudflare Workers
1329
- * app.get('*', async c => {
1330
- * const counter = c.env.COUNTER
1331
- * })
1332
- * ```
1333
- */
1334
- env: E['Bindings'];
1335
- finalized: boolean;
1336
- /**
1337
- * `.error` can get the error object from the middleware if the Handler throws an error.
1338
- *
1339
- * @see {@link https://hono.dev/docs/api/context#error}
1340
- *
1341
- * @example
1342
- * ```ts
1343
- * app.use('*', async (c, next) => {
1344
- * await next()
1345
- * if (c.error) {
1346
- * // do something...
1347
- * }
1348
- * })
1349
- * ```
1350
- */
1351
- error: Error | undefined;
1352
- /**
1353
- * Creates an instance of the Context class.
1354
- *
1355
- * @param req - The Request object.
1356
- * @param options - Optional configuration options for the context.
1357
- */
1358
- constructor(req: Request, options?: ContextOptions<E>);
1359
- /**
1360
- * `.req` is the instance of {@link HonoRequest}.
1361
- */
1362
- get req(): HonoRequest$1<P, I['out']>;
1363
- /**
1364
- * @see {@link https://hono.dev/docs/api/context#event}
1365
- * The FetchEvent associated with the current request.
1366
- *
1367
- * @throws Will throw an error if the context does not have a FetchEvent.
1368
- */
1369
- get event(): FetchEventLike;
1370
- /**
1371
- * @see {@link https://hono.dev/docs/api/context#executionctx}
1372
- * The ExecutionContext associated with the current request.
1373
- *
1374
- * @throws Will throw an error if the context does not have an ExecutionContext.
1375
- */
1376
- get executionCtx(): ExecutionContext;
1377
- /**
1378
- * @see {@link https://hono.dev/docs/api/context#res}
1379
- * The Response object for the current request.
1380
- */
1381
- get res(): Response;
1382
- /**
1383
- * Sets the Response object for the current request.
1384
- *
1385
- * @param _res - The Response object to set.
1386
- */
1387
- set res(_res: Response | undefined);
1388
- /**
1389
- * `.render()` can create a response within a layout.
1390
- *
1391
- * @see {@link https://hono.dev/docs/api/context#render-setrenderer}
1392
- *
1393
- * @example
1394
- * ```ts
1395
- * app.get('/', (c) => {
1396
- * return c.render('Hello!')
1397
- * })
1398
- * ```
1399
- */
1400
- render: Renderer;
1401
- /**
1402
- * Sets the layout for the response.
1403
- *
1404
- * @param layout - The layout to set.
1405
- * @returns The layout function.
1406
- */
1407
- setLayout: (layout: Layout<PropsForRenderer & {
1408
- Layout: Layout;
1409
- }>) => Layout<PropsForRenderer & {
1410
- Layout: Layout;
1411
- }>;
1412
- /**
1413
- * Gets the current layout for the response.
1414
- *
1415
- * @returns The current layout function.
1416
- */
1417
- getLayout: () => Layout<PropsForRenderer & {
1418
- Layout: Layout;
1419
- }> | undefined;
1420
- /**
1421
- * `.setRenderer()` can set the layout in the custom middleware.
1422
- *
1423
- * @see {@link https://hono.dev/docs/api/context#render-setrenderer}
1424
- *
1425
- * @example
1426
- * ```tsx
1427
- * app.use('*', async (c, next) => {
1428
- * c.setRenderer((content) => {
1429
- * return c.html(
1430
- * <html>
1431
- * <body>
1432
- * <p>{content}</p>
1433
- * </body>
1434
- * </html>
1435
- * )
1436
- * })
1437
- * await next()
1438
- * })
1439
- * ```
1440
- */
1441
- setRenderer: (renderer: Renderer) => void;
1442
- /**
1443
- * `.header()` can set headers.
1444
- *
1445
- * @see {@link https://hono.dev/docs/api/context#header}
1446
- *
1447
- * @example
1448
- * ```ts
1449
- * app.get('/welcome', (c) => {
1450
- * // Set headers
1451
- * c.header('X-Message', 'Hello!')
1452
- * c.header('Content-Type', 'text/plain')
1453
- *
1454
- * return c.body('Thank you for coming')
1455
- * })
1456
- * ```
1457
- */
1458
- header: SetHeaders;
1459
- status: (status: StatusCode) => void;
1460
- /**
1461
- * `.set()` can set the value specified by the key.
1462
- *
1463
- * @see {@link https://hono.dev/docs/api/context#set-get}
1464
- *
1465
- * @example
1466
- * ```ts
1467
- * app.use('*', async (c, next) => {
1468
- * c.set('message', 'Hono is hot!!')
1469
- * await next()
1470
- * })
1471
- * ```
1472
- */
1473
- set: Set$1<IsAny<E> extends true ? {
1474
- Variables: ContextVariableMap & Record<string, any>;
1475
- } : E>;
1476
- /**
1477
- * `.get()` can use the value specified by the key.
1478
- *
1479
- * @see {@link https://hono.dev/docs/api/context#set-get}
1480
- *
1481
- * @example
1482
- * ```ts
1483
- * app.get('/', (c) => {
1484
- * const message = c.get('message')
1485
- * return c.text(`The message is "${message}"`)
1486
- * })
1487
- * ```
1488
- */
1489
- get: Get<IsAny<E> extends true ? {
1490
- Variables: ContextVariableMap & Record<string, any>;
1491
- } : E>;
1492
- /**
1493
- * `.var` can access the value of a variable.
1494
- *
1495
- * @see {@link https://hono.dev/docs/api/context#var}
1496
- *
1497
- * @example
1498
- * ```ts
1499
- * const result = c.var.client.oneMethod()
1500
- * ```
1501
- */
1502
- get var(): Readonly<ContextVariableMap & (IsAny<E['Variables']> extends true ? Record<string, any> : E['Variables'])>;
1503
- newResponse: NewResponse;
1504
- /**
1505
- * `.body()` can return the HTTP response.
1506
- * You can set headers with `.header()` and set HTTP status code with `.status`.
1507
- * This can also be set in `.text()`, `.json()` and so on.
1508
- *
1509
- * @see {@link https://hono.dev/docs/api/context#body}
1510
- *
1511
- * @example
1512
- * ```ts
1513
- * app.get('/welcome', (c) => {
1514
- * // Set headers
1515
- * c.header('X-Message', 'Hello!')
1516
- * c.header('Content-Type', 'text/plain')
1517
- * // Set HTTP status code
1518
- * c.status(201)
1519
- *
1520
- * // Return the response body
1521
- * return c.body('Thank you for coming')
1522
- * })
1523
- * ```
1524
- */
1525
- body: BodyRespond;
1526
- /**
1527
- * `.text()` can render text as `Content-Type:text/plain`.
1528
- *
1529
- * @see {@link https://hono.dev/docs/api/context#text}
1530
- *
1531
- * @example
1532
- * ```ts
1533
- * app.get('/say', (c) => {
1534
- * return c.text('Hello!')
1535
- * })
1536
- * ```
1537
- */
1538
- text: TextRespond;
1539
- /**
1540
- * `.json()` can render JSON as `Content-Type:application/json`.
1541
- *
1542
- * @see {@link https://hono.dev/docs/api/context#json}
1543
- *
1544
- * @example
1545
- * ```ts
1546
- * app.get('/api', (c) => {
1547
- * return c.json({ message: 'Hello!' })
1548
- * })
1549
- * ```
1550
- */
1551
- json: JSONRespond;
1552
- html: HTMLRespond;
1553
- /**
1554
- * `.redirect()` can Redirect, default status code is 302.
1555
- *
1556
- * @see {@link https://hono.dev/docs/api/context#redirect}
1557
- *
1558
- * @example
1559
- * ```ts
1560
- * app.get('/redirect', (c) => {
1561
- * return c.redirect('/')
1562
- * })
1563
- * app.get('/redirect-permanently', (c) => {
1564
- * return c.redirect('/', 301)
1565
- * })
1566
- * ```
1567
- */
1568
- redirect: <T extends RedirectStatusCode = 302>(location: string | URL, status?: T) => Response & TypedResponse<undefined, T, "redirect">;
1569
- /**
1570
- * `.notFound()` can return the Not Found Response.
1571
- *
1572
- * @see {@link https://hono.dev/docs/api/context#notfound}
1573
- *
1574
- * @example
1575
- * ```ts
1576
- * app.get('/notfound', (c) => {
1577
- * return c.notFound()
1578
- * })
1579
- * ```
1580
- */
1581
- notFound: () => ReturnType<NotFoundHandler>;
1582
- }
1583
-
1584
- /**
1585
- * @module
1586
- * This module is the base module for the Hono object.
1587
- */
1588
-
1589
- type GetPath<E extends Env> = (request: Request, options?: {
1590
- env?: E['Bindings'];
1591
- }) => string;
1592
- type HonoOptions<E extends Env> = {
1593
- /**
1594
- * `strict` option specifies whether to distinguish whether the last path is a directory or not.
1595
- *
1596
- * @see {@link https://hono.dev/docs/api/hono#strict-mode}
1597
- *
1598
- * @default true
1599
- */
1600
- strict?: boolean;
1601
- /**
1602
- * `router` option specifies which router to use.
1603
- *
1604
- * @see {@link https://hono.dev/docs/api/hono#router-option}
1605
- *
1606
- * @example
1607
- * ```ts
1608
- * const app = new Hono({ router: new RegExpRouter() })
1609
- * ```
1610
- */
1611
- router?: Router<[H, RouterRoute]>;
1612
- /**
1613
- * `getPath` can handle the host header value.
1614
- *
1615
- * @see {@link https://hono.dev/docs/api/routing#routing-with-host-header-value}
1616
- *
1617
- * @example
1618
- * ```ts
1619
- * const app = new Hono({
1620
- * getPath: (req) =>
1621
- * '/' + req.headers.get('host') + req.url.replace(/^https?:\/\/[^/]+(\/[^?]*)/, '$1'),
1622
- * })
1623
- *
1624
- * app.get('/www1.example.com/hello', () => c.text('hello www1'))
1625
- *
1626
- * // A following request will match the route:
1627
- * // new Request('http://www1.example.com/hello', {
1628
- * // headers: { host: 'www1.example.com' },
1629
- * // })
1630
- * ```
1631
- */
1632
- getPath?: GetPath<E>;
1633
- };
1634
- type MountOptionHandler = (c: Context) => unknown;
1635
- type MountReplaceRequest = (originalRequest: Request) => Request;
1636
- type MountOptions = MountOptionHandler | {
1637
- optionHandler?: MountOptionHandler;
1638
- replaceRequest?: MountReplaceRequest | false;
1639
- };
1640
- declare class Hono$1<E extends Env = Env, S extends Schema = {}, BasePath extends string = '/', CurrentPath extends string = BasePath> {
1641
-
1642
- get: HandlerInterface<E, 'get', S, BasePath, CurrentPath>;
1643
- post: HandlerInterface<E, 'post', S, BasePath, CurrentPath>;
1644
- put: HandlerInterface<E, 'put', S, BasePath, CurrentPath>;
1645
- delete: HandlerInterface<E, 'delete', S, BasePath, CurrentPath>;
1646
- options: HandlerInterface<E, 'options', S, BasePath, CurrentPath>;
1647
- patch: HandlerInterface<E, 'patch', S, BasePath, CurrentPath>;
1648
- all: HandlerInterface<E, 'all', S, BasePath, CurrentPath>;
1649
- on: OnHandlerInterface<E, S, BasePath>;
1650
- use: MiddlewareHandlerInterface<E, S, BasePath>;
1651
- router: Router<[H, RouterRoute]>;
1652
- readonly getPath: GetPath<E>;
1653
- private _basePath;
1654
- routes: RouterRoute[];
1655
- constructor(options?: HonoOptions<E>);
1656
- private errorHandler;
1657
- /**
1658
- * `.route()` allows grouping other Hono instance in routes.
1659
- *
1660
- * @see {@link https://hono.dev/docs/api/routing#grouping}
1661
- *
1662
- * @param {string} path - base Path
1663
- * @param {Hono} app - other Hono instance
1664
- * @returns {Hono} routed Hono instance
1665
- *
1666
- * @example
1667
- * ```ts
1668
- * const app = new Hono()
1669
- * const app2 = new Hono()
1670
- *
1671
- * app2.get("/user", (c) => c.text("user"))
1672
- * app.route("/api", app2) // GET /api/user
1673
- * ```
1674
- */
1675
- route<SubPath extends string, SubEnv extends Env, SubSchema extends Schema, SubBasePath extends string, SubCurrentPath extends string>(path: SubPath, app: Hono$1<SubEnv, SubSchema, SubBasePath, SubCurrentPath>): Hono$1<E, MergeSchemaPath<SubSchema, MergePath<BasePath, SubPath>> | S, BasePath, CurrentPath>;
1676
- /**
1677
- * `.basePath()` allows base paths to be specified.
1678
- *
1679
- * @see {@link https://hono.dev/docs/api/routing#base-path}
1680
- *
1681
- * @param {string} path - base Path
1682
- * @returns {Hono} changed Hono instance
1683
- *
1684
- * @example
1685
- * ```ts
1686
- * const api = new Hono().basePath('/api')
1687
- * ```
1688
- */
1689
- basePath<SubPath extends string>(path: SubPath): Hono$1<E, S, MergePath<BasePath, SubPath>, MergePath<BasePath, SubPath>>;
1690
- /**
1691
- * `.onError()` handles an error and returns a customized Response.
1692
- *
1693
- * @see {@link https://hono.dev/docs/api/hono#error-handling}
1694
- *
1695
- * @param {ErrorHandler} handler - request Handler for error
1696
- * @returns {Hono} changed Hono instance
1697
- *
1698
- * @example
1699
- * ```ts
1700
- * app.onError((err, c) => {
1701
- * console.error(`${err}`)
1702
- * return c.text('Custom Error Message', 500)
1703
- * })
1704
- * ```
1705
- */
1706
- onError: (handler: ErrorHandler<E>) => Hono$1<E, S, BasePath, CurrentPath>;
1707
- /**
1708
- * `.notFound()` allows you to customize a Not Found Response.
1709
- *
1710
- * @see {@link https://hono.dev/docs/api/hono#not-found}
1711
- *
1712
- * @param {NotFoundHandler} handler - request handler for not-found
1713
- * @returns {Hono} changed Hono instance
1714
- *
1715
- * @example
1716
- * ```ts
1717
- * app.notFound((c) => {
1718
- * return c.text('Custom 404 Message', 404)
1719
- * })
1720
- * ```
1721
- */
1722
- notFound: (handler: NotFoundHandler<E>) => Hono$1<E, S, BasePath, CurrentPath>;
1723
- /**
1724
- * `.mount()` allows you to mount applications built with other frameworks into your Hono application.
1725
- *
1726
- * @see {@link https://hono.dev/docs/api/hono#mount}
1727
- *
1728
- * @param {string} path - base Path
1729
- * @param {Function} applicationHandler - other Request Handler
1730
- * @param {MountOptions} [options] - options of `.mount()`
1731
- * @returns {Hono} mounted Hono instance
1732
- *
1733
- * @example
1734
- * ```ts
1735
- * import { Router as IttyRouter } from 'itty-router'
1736
- * import { Hono } from 'hono'
1737
- * // Create itty-router application
1738
- * const ittyRouter = IttyRouter()
1739
- * // GET /itty-router/hello
1740
- * ittyRouter.get('/hello', () => new Response('Hello from itty-router'))
1741
- *
1742
- * const app = new Hono()
1743
- * app.mount('/itty-router', ittyRouter.handle)
1744
- * ```
1745
- *
1746
- * @example
1747
- * ```ts
1748
- * const app = new Hono()
1749
- * // Send the request to another application without modification.
1750
- * app.mount('/app', anotherApp, {
1751
- * replaceRequest: (req) => req,
1752
- * })
1753
- * ```
1754
- */
1755
- mount(path: string, applicationHandler: (request: Request, ...args: any) => Response | Promise<Response>, options?: MountOptions): Hono$1<E, S, BasePath, CurrentPath>;
1756
- /**
1757
- * `.fetch()` will be entry point of your app.
1758
- *
1759
- * @see {@link https://hono.dev/docs/api/hono#fetch}
1760
- *
1761
- * @param {Request} request - request Object of request
1762
- * @param {Env} Env - env Object
1763
- * @param {ExecutionContext} - context of execution
1764
- * @returns {Response | Promise<Response>} response of request
1765
- *
1766
- */
1767
- fetch: (request: Request, Env?: E['Bindings'] | {}, executionCtx?: ExecutionContext) => Response | Promise<Response>;
1768
- /**
1769
- * `.request()` is a useful method for testing.
1770
- * You can pass a URL or pathname to send a GET request.
1771
- * app will return a Response object.
1772
- * ```ts
1773
- * test('GET /hello is ok', async () => {
1774
- * const res = await app.request('/hello')
1775
- * expect(res.status).toBe(200)
1776
- * })
1777
- * ```
1778
- * @see https://hono.dev/docs/api/hono#request
1779
- */
1780
- request: (input: Request | string | URL, requestInit?: RequestInit, Env?: E["Bindings"] | {}, executionCtx?: ExecutionContext) => Response | Promise<Response>;
1781
- /**
1782
- * `.fire()` automatically adds a global fetch event listener.
1783
- * This can be useful for environments that adhere to the Service Worker API, such as non-ES module Cloudflare Workers.
1784
- * @deprecated
1785
- * Use `fire` from `hono/service-worker` instead.
1786
- * ```ts
1787
- * import { Hono } from 'hono'
1788
- * import { fire } from 'hono/service-worker'
1789
- *
1790
- * const app = new Hono()
1791
- * // ...
1792
- * fire(app)
1793
- * ```
1794
- * @see https://hono.dev/docs/api/hono#fire
1795
- * @see https://developer.mozilla.org/en-US/docs/Web/API/Service_Worker_API
1796
- * @see https://developers.cloudflare.com/workers/reference/migrate-to-module-workers/
1797
- */
1798
- fire: () => void;
1799
- }
1800
-
1801
- /**
1802
- * The Hono class extends the functionality of the HonoBase class.
1803
- * It sets up routing and allows for custom options to be passed.
1804
- *
1805
- * @template E - The environment type.
1806
- * @template S - The schema type.
1807
- * @template BasePath - The base path type.
1808
- */
1809
- declare class Hono<E extends Env = BlankEnv, S extends Schema = BlankSchema, BasePath extends string = '/'> extends Hono$1<E, S, BasePath> {
1810
- /**
1811
- * Creates an instance of the Hono class.
1812
- *
1813
- * @param options - Optional configuration options for the Hono instance.
1814
- */
1815
- constructor(options?: HonoOptions<E>);
1816
- }
1817
-
1818
- /**
1819
- * Type representing the '$all' method name
1820
- */
1821
- type MethodNameAll = `$${typeof METHOD_NAME_ALL_LOWERCASE}`;
1822
- /**
1823
- * Type representing all standard HTTP methods prefixed with '$'
1824
- * e.g., '$get' | '$post' | '$put' | '$delete' | '$options' | '$patch'
1825
- */
1826
- type StandardMethods = `$${(typeof METHODS)[number]}`;
1827
- /**
1828
- * Expands '$all' into all standard HTTP methods.
1829
- * If the schema contains '$all', it creates a type where all standard HTTP methods
1830
- * point to the same endpoint definition as '$all', while removing '$all' itself.
1831
- */
1832
- type ExpandAllMethod<S> = MethodNameAll extends keyof S ? {
1833
- [M in StandardMethods]: S[MethodNameAll];
1834
- } & Omit<S, MethodNameAll> : S;
1835
- type HonoRequest = (typeof Hono.prototype)['request'];
1836
- type BuildSearchParamsFn = (query: Record<string, string | string[]>) => URLSearchParams;
1837
- type ClientRequestOptions<T = unknown> = {
1838
- fetch?: typeof fetch | HonoRequest;
1839
- webSocket?: (...args: ConstructorParameters<typeof WebSocket>) => WebSocket;
1840
- /**
1841
- * Standard `RequestInit`, caution that this take highest priority
1842
- * and could be used to overwrite things that Hono sets for you, like `body | method | headers`.
1843
- *
1844
- * If you want to add some headers, use in `headers` instead of `init`
1845
- */
1846
- init?: RequestInit;
1847
- /**
1848
- * Custom function to serialize query parameters into URLSearchParams.
1849
- * By default, arrays are serialized as multiple parameters with the same key (e.g., `key=a&key=b`).
1850
- * You can provide a custom function to change this behavior, for example to use bracket notation (e.g., `key[]=a&key[]=b`).
1851
- *
1852
- * @example
1853
- * ```ts
1854
- * const client = hc('http://localhost', {
1855
- * buildSearchParams: (query) => {
1856
- * return new URLSearchParams(qs.stringify(query))
1857
- * }
1858
- * })
1859
- * ```
1860
- */
1861
- buildSearchParams?: BuildSearchParamsFn;
1862
- } & (keyof T extends never ? {
1863
- headers?: Record<string, string> | (() => Record<string, string> | Promise<Record<string, string>>);
1864
- } : {
1865
- headers: T | (() => T | Promise<T>);
1866
- });
1867
- type ClientRequest<Prefix extends string, Path extends string, S extends Schema> = {
1868
- [M in keyof ExpandAllMethod<S>]: ExpandAllMethod<S>[M] extends Endpoint & {
1869
- input: infer R;
1870
- } ? R extends object ? HasRequiredKeys<R> extends true ? (args: R, options?: ClientRequestOptions) => Promise<ClientResponseOfEndpoint<ExpandAllMethod<S>[M]>> : (args?: R, options?: ClientRequestOptions) => Promise<ClientResponseOfEndpoint<ExpandAllMethod<S>[M]>> : never : never;
1871
- } & {
1872
- $url: <const Arg extends (S[keyof S] extends {
1873
- input: infer R;
1874
- } ? R extends {
1875
- param: infer P;
1876
- } ? R extends {
1877
- query: infer Q;
1878
- } ? {
1879
- param: P;
1880
- query: Q;
1881
- } : {
1882
- param: P;
1883
- } : R extends {
1884
- query: infer Q;
1885
- } ? {
1886
- query: Q;
1887
- } : {} : {}) | undefined = undefined>(arg?: Arg) => HonoURL<Prefix, Path, Arg>;
1888
- $path: <const Arg extends (S[keyof S] extends {
1889
- input: infer R;
1890
- } ? R extends {
1891
- param: infer P;
1892
- } ? R extends {
1893
- query: infer Q;
1894
- } ? {
1895
- param: P;
1896
- query: Q;
1897
- } : {
1898
- param: P;
1899
- } : R extends {
1900
- query: infer Q;
1901
- } ? {
1902
- query: Q;
1903
- } : {} : {}) | undefined = undefined>(arg?: Arg) => BuildPath<Path, Arg>;
1904
- } & (S['$get'] extends {
1905
- outputFormat: 'ws';
1906
- } ? S['$get'] extends {
1907
- input: infer I;
1908
- } ? {
1909
- $ws: (args?: I) => WebSocket;
1910
- } : {} : {});
1911
- type ClientResponseOfEndpoint<T extends Endpoint = Endpoint> = T extends {
1912
- output: infer O;
1913
- outputFormat: infer F;
1914
- status: infer S;
1915
- } ? ClientResponse<O, S extends number ? S : never, F extends ResponseFormat ? F : never> : never;
1916
- interface ClientResponse<T, U extends number = StatusCode, F extends ResponseFormat = ResponseFormat> {
1917
- readonly body: ReadableStream | null;
1918
- readonly bodyUsed: boolean;
1919
- ok: U extends SuccessStatusCode ? true : U extends Exclude<StatusCode, SuccessStatusCode> ? false : boolean;
1920
- redirected: boolean;
1921
- status: U;
1922
- statusText: string;
1923
- type: 'basic' | 'cors' | 'default' | 'error' | 'opaque' | 'opaqueredirect';
1924
- headers: Headers;
1925
- url: string;
1926
- redirect(url: string, status: number): Response$1;
1927
- clone(): Response$1;
1928
- bytes(): Promise<Uint8Array<ArrayBuffer>>;
1929
- json(): F extends 'text' ? Promise<never> : F extends 'json' ? Promise<T> : Promise<unknown>;
1930
- text(): F extends 'text' ? (T extends string ? Promise<T> : Promise<never>) : Promise<string>;
1931
- blob(): Promise<Blob>;
1932
- formData(): Promise<FormData>;
1933
- arrayBuffer(): Promise<ArrayBuffer>;
1934
- }
1935
- type BuildSearch<Arg, Key extends 'query'> = Arg extends {
1936
- [K in Key]: infer Query;
1937
- } ? IsEmptyObject<Query> extends true ? '' : `?${string}` : '';
1938
- type BuildPathname<P extends string, Arg> = Arg extends {
1939
- param: infer Param;
1940
- } ? `${ApplyParam<TrimStartSlash<P>, Param>}` : `/${TrimStartSlash<P>}`;
1941
- type BuildPath<P extends string, Arg> = `${BuildPathname<P, Arg>}${BuildSearch<Arg, 'query'>}`;
1942
- type BuildTypedURL<Protocol extends string, Host extends string, Port extends string, P extends string, Arg> = TypedURL<`${Protocol}:`, Host, Port, BuildPathname<P, Arg>, BuildSearch<Arg, 'query'>>;
1943
- type HonoURL<Prefix extends string, Path extends string, Arg> = IsLiteral<Prefix> extends true ? TrimEndSlash<Prefix> extends `${infer Protocol}://${infer Rest}` ? Rest extends `${infer Hostname}/${infer P}` ? ParseHostName<Hostname> extends [infer Host extends string, infer Port extends string] ? BuildTypedURL<Protocol, Host, Port, P, Arg> : never : ParseHostName<Rest> extends [infer Host extends string, infer Port extends string] ? BuildTypedURL<Protocol, Host, Port, Path, Arg> : never : URL : URL;
1944
- type ParseHostName<T extends string> = T extends `${infer Host}:${infer Port}` ? [Host, Port] : [T, ''];
1945
- type TrimStartSlash<T extends string> = T extends `/${infer R}` ? TrimStartSlash<R> : T;
1946
- type TrimEndSlash<T extends string> = T extends `${infer R}/` ? TrimEndSlash<R> : T;
1947
- type IsLiteral<T extends string> = [T] extends [never] ? false : string extends T ? false : true;
1948
- type ApplyParam<Path extends string, P, Result extends string = ''> = Path extends `${infer Head}/${infer Rest}` ? Head extends `:${infer Param}` ? P extends Record<Param, infer Value extends string> ? IsLiteral<Value> extends true ? ApplyParam<Rest, P, `${Result}/${Value & string}`> : ApplyParam<Rest, P, `${Result}/${Head}`> : ApplyParam<Rest, P, `${Result}/${Head}`> : ApplyParam<Rest, P, `${Result}/${Head}`> : Path extends `:${infer Param}` ? P extends Record<Param, infer Value extends string> ? IsLiteral<Value> extends true ? `${Result}/${Value & string}` : `${Result}/${Path}` : `${Result}/${Path}` : `${Result}/${Path}`;
1949
- type IsEmptyObject<T> = keyof T extends never ? true : false;
1950
- interface TypedURL<Protocol extends string, Hostname extends string, Port extends string, Pathname extends string, Search extends string> extends URL {
1951
- protocol: Protocol;
1952
- hostname: Hostname;
1953
- port: Port;
1954
- host: Port extends '' ? Hostname : `${Hostname}:${Port}`;
1955
- origin: `${Protocol}//${Hostname}${Port extends '' ? '' : `:${Port}`}`;
1956
- pathname: Pathname;
1957
- search: Search;
1958
- href: `${Protocol}//${Hostname}${Port extends '' ? '' : `:${Port}`}${Pathname}${Search}`;
1959
- }
1960
- interface Response$1 extends ClientResponse<unknown> {
1961
- }
1962
- type PathToChain<Prefix extends string, Path extends string, E extends Schema, Original extends string = Path> = Path extends `/${infer P}` ? PathToChain<Prefix, P, E, Path> : Path extends `${infer P}/${infer R}` ? {
1963
- [K in P]: PathToChain<Prefix, R, E, Original>;
1964
- } : {
1965
- [K in Path extends '' ? 'index' : Path]: ClientRequest<Prefix, Original, E extends Record<string, unknown> ? E[Original] : never>;
1966
- };
1967
- type Client<T, Prefix extends string> = T extends Hono$1<any, infer S, any> ? S extends Record<infer K, Schema> ? K extends string ? PathToChain<Prefix, K, S> : never : never : never;
1968
-
1969
- declare const hc: <T extends Hono<any, any, any>, Prefix extends string = string>(baseUrl: Prefix, options?: ClientRequestOptions) => UnionToIntersection<Client<T, Prefix>>;
1
+ import * as hono_utils_http_status from 'hono/utils/http-status';
2
+ import * as hono_client from 'hono/client';
3
+ import { hc } from 'hono/client';
4
+ export { signPayload, verifyPayloadSignature } from '@develit-io/backend-sdk/signature';
1970
5
 
1971
6
  declare const createPartnerApiClient: (...args: Parameters<typeof hc>) => {
1972
7
  v1: {
1973
8
  auth: {
1974
- token: ClientRequest<string, "/v1/auth/token", {
9
+ token: hono_client.ClientRequest<string, "/v1/auth/token", {
1975
10
  $post: {
1976
11
  input: {
1977
12
  json: {
@@ -2006,7 +41,7 @@ declare const createPartnerApiClient: (...args: Parameters<typeof hc>) => {
2006
41
  v1: {
2007
42
  auth: {
2008
43
  token: {
2009
- refresh: ClientRequest<string, "/v1/auth/token/refresh", {
44
+ refresh: hono_client.ClientRequest<string, "/v1/auth/token/refresh", {
2010
45
  $put: {
2011
46
  input: {
2012
47
  json: {
@@ -2040,7 +75,7 @@ declare const createPartnerApiClient: (...args: Parameters<typeof hc>) => {
2040
75
  v1: {
2041
76
  bank: {
2042
77
  auth: {
2043
- "get-auth-uri": ClientRequest<string, "/v1/bank/auth/get-auth-uri", {
78
+ "get-auth-uri": hono_client.ClientRequest<string, "/v1/bank/auth/get-auth-uri", {
2044
79
  $get: {
2045
80
  input: {
2046
81
  query: {
@@ -2072,7 +107,7 @@ declare const createPartnerApiClient: (...args: Parameters<typeof hc>) => {
2072
107
  } & {
2073
108
  v1: {
2074
109
  bank: {
2075
- callback: ClientRequest<string, "/v1/bank/callback", {
110
+ callback: hono_client.ClientRequest<string, "/v1/bank/callback", {
2076
111
  $get: {
2077
112
  input: {
2078
113
  query: {
@@ -2131,7 +166,7 @@ declare const createPartnerApiClient: (...args: Parameters<typeof hc>) => {
2131
166
  } & {
2132
167
  v1: {
2133
168
  observability: {
2134
- "health-check": ClientRequest<string, "/v1/observability/health-check", {
169
+ "health-check": hono_client.ClientRequest<string, "/v1/observability/health-check", {
2135
170
  $get: {
2136
171
  input: {};
2137
172
  output: {
@@ -2145,15 +180,11 @@ declare const createPartnerApiClient: (...args: Parameters<typeof hc>) => {
2145
180
  };
2146
181
  } & {
2147
182
  v1: {
2148
- organization: ClientRequest<string, "/v1/organization", {
183
+ organization: hono_client.ClientRequest<string, "/v1/organization", {
2149
184
  $get: {
2150
185
  input: {};
2151
186
  output: {
2152
187
  message: string;
2153
- balance: {
2154
- amount: number;
2155
- currency: string;
2156
- };
2157
188
  organization: {
2158
189
  id: string;
2159
190
  name: string;
@@ -2195,7 +226,7 @@ declare const createPartnerApiClient: (...args: Parameters<typeof hc>) => {
2195
226
  v1: {
2196
227
  organizations: {
2197
228
  ":id": {
2198
- accounts: ClientRequest<string, "/v1/organizations/:id/accounts", {
229
+ accounts: hono_client.ClientRequest<string, "/v1/organizations/:id/accounts", {
2199
230
  $get: {
2200
231
  input: {
2201
232
  param: {
@@ -2280,7 +311,7 @@ declare const createPartnerApiClient: (...args: Parameters<typeof hc>) => {
2280
311
  v1: {
2281
312
  organizations: {
2282
313
  ":id": {
2283
- payments: ClientRequest<string, "/v1/organizations/:id/payments", {
314
+ payments: hono_client.ClientRequest<string, "/v1/organizations/:id/payments", {
2284
315
  $get: {
2285
316
  input: {
2286
317
  param: {
@@ -2293,7 +324,7 @@ declare const createPartnerApiClient: (...args: Parameters<typeof hc>) => {
2293
324
  query: {
2294
325
  page?: string | undefined;
2295
326
  limit?: string | undefined;
2296
- sortColumn?: "amount" | "createdAt" | "updatedAt" | undefined;
327
+ sortColumn?: "createdAt" | "updatedAt" | "amount" | undefined;
2297
328
  sortDirection?: "asc" | "desc" | undefined;
2298
329
  filterStatus?: "PENDING" | "PROCESSING" | "BOOKED" | "CANCELLED" | "REJECTED" | "SCHEDULED" | "HOLD" | "INFO" | ("PENDING" | "PROCESSING" | "BOOKED" | "CANCELLED" | "REJECTED" | "SCHEDULED" | "HOLD" | "INFO")[] | undefined;
2299
330
  filterPaymentType?: "DOMESTIC" | "DOMESTIC"[] | undefined;
@@ -2335,7 +366,13 @@ declare const createPartnerApiClient: (...args: Parameters<typeof hc>) => {
2335
366
  iban?: string | undefined;
2336
367
  bankCode?: string | undefined;
2337
368
  swiftBic?: string | undefined;
2338
- address?: string | undefined;
369
+ address?: {
370
+ streetName?: string | undefined;
371
+ buildingNumber?: string | undefined;
372
+ city?: string | undefined;
373
+ postalCode?: string | undefined;
374
+ countryCode?: string | undefined;
375
+ } | undefined;
2339
376
  };
2340
377
  dates: {
2341
378
  created: string | null;
@@ -2379,7 +416,7 @@ declare const createPartnerApiClient: (...args: Parameters<typeof hc>) => {
2379
416
  query: {
2380
417
  page?: string | undefined;
2381
418
  limit?: string | undefined;
2382
- sortColumn?: "amount" | "createdAt" | "updatedAt" | undefined;
419
+ sortColumn?: "createdAt" | "updatedAt" | "amount" | undefined;
2383
420
  sortDirection?: "asc" | "desc" | undefined;
2384
421
  filterStatus?: "PENDING" | "PROCESSING" | "BOOKED" | "CANCELLED" | "REJECTED" | "SCHEDULED" | "HOLD" | "INFO" | ("PENDING" | "PROCESSING" | "BOOKED" | "CANCELLED" | "REJECTED" | "SCHEDULED" | "HOLD" | "INFO")[] | undefined;
2385
422
  filterPaymentType?: "DOMESTIC" | "DOMESTIC"[] | undefined;
@@ -2414,7 +451,7 @@ declare const createPartnerApiClient: (...args: Parameters<typeof hc>) => {
2414
451
  v1: {
2415
452
  organizations: {
2416
453
  ":id": {
2417
- "payment-requests": ClientRequest<string, "/v1/organizations/:id/payment-requests", {
454
+ "payment-requests": hono_client.ClientRequest<string, "/v1/organizations/:id/payment-requests", {
2418
455
  $get: {
2419
456
  input: {
2420
457
  param: {
@@ -2427,7 +464,7 @@ declare const createPartnerApiClient: (...args: Parameters<typeof hc>) => {
2427
464
  query: {
2428
465
  page?: string | undefined;
2429
466
  limit?: string | undefined;
2430
- sortColumn?: "amount" | "createdAt" | "updatedAt" | undefined;
467
+ sortColumn?: "createdAt" | "updatedAt" | "amount" | undefined;
2431
468
  sortDirection?: "asc" | "desc" | undefined;
2432
469
  filterStatus?: "BOOKED" | "REJECTED" | "OPENED" | "AUTHORIZED" | "COMPLETED" | "SETTLED" | "CLOSED" | ("BOOKED" | "REJECTED" | "OPENED" | "AUTHORIZED" | "COMPLETED" | "SETTLED" | "CLOSED")[] | undefined;
2433
470
  filterPaymentType?: "DOMESTIC" | "DOMESTIC"[] | undefined;
@@ -2450,6 +487,8 @@ declare const createPartnerApiClient: (...args: Parameters<typeof hc>) => {
2450
487
  output: {
2451
488
  paymentRequests: {
2452
489
  id: string;
490
+ referenceId: string | null;
491
+ bankRefId: string | null;
2453
492
  status: string;
2454
493
  direction: "OUTGOING";
2455
494
  type: string;
@@ -2460,38 +499,39 @@ declare const createPartnerApiClient: (...args: Parameters<typeof hc>) => {
2460
499
  debtor: {
2461
500
  name: string | null;
2462
501
  iban: string | null;
2463
- accountId?: string | undefined;
2464
- bankCode?: string | undefined;
502
+ accountId: string;
503
+ bankCode: string | null;
2465
504
  };
2466
505
  creditor: {
2467
506
  name: string | null;
2468
507
  iban?: string | undefined;
2469
508
  bankCode?: string | undefined;
2470
509
  swiftBic?: string | undefined;
2471
- address?: string | undefined;
510
+ address?: {
511
+ streetName?: string | undefined;
512
+ buildingNumber?: string | undefined;
513
+ city?: string | undefined;
514
+ postalCode?: string | undefined;
515
+ countryCode?: string | undefined;
516
+ } | undefined;
2472
517
  };
518
+ remittanceInfo: {
519
+ message: string | null;
520
+ variableSymbol: string | null;
521
+ specificSymbol: string | null;
522
+ constantSymbol: string | null;
523
+ } | null;
524
+ statusReason: string | null;
2473
525
  dates: {
2474
526
  created: string | null;
2475
- initiated?: string | undefined;
2476
- processed?: string | undefined;
2477
- updated?: string | undefined;
527
+ initiated: string | null;
528
+ processed: string | null;
529
+ updated: string | null;
2478
530
  };
2479
- referenceId?: string | undefined;
2480
- bankRefId?: string | undefined;
2481
- authorization?: {
2482
- url: string;
2483
- } | undefined;
2484
- remittanceInfo?: {
2485
- message?: string | undefined;
2486
- variableSymbol?: string | undefined;
2487
- specificSymbol?: string | undefined;
2488
- constantSymbol?: string | undefined;
2489
- } | undefined;
2490
- statusReason?: string | undefined;
2491
- batch?: {
531
+ batch: {
2492
532
  id: string;
2493
- } | undefined;
2494
- instructionPriority?: "NORMAL" | "INSTANT" | undefined;
533
+ } | null;
534
+ instructionPriority: "NORMAL" | "INSTANT" | null;
2495
535
  }[];
2496
536
  pagination: {
2497
537
  page: number;
@@ -2516,7 +556,7 @@ declare const createPartnerApiClient: (...args: Parameters<typeof hc>) => {
2516
556
  query: {
2517
557
  page?: string | undefined;
2518
558
  limit?: string | undefined;
2519
- sortColumn?: "amount" | "createdAt" | "updatedAt" | undefined;
559
+ sortColumn?: "createdAt" | "updatedAt" | "amount" | undefined;
2520
560
  sortDirection?: "asc" | "desc" | undefined;
2521
561
  filterStatus?: "BOOKED" | "REJECTED" | "OPENED" | "AUTHORIZED" | "COMPLETED" | "SETTLED" | "CLOSED" | ("BOOKED" | "REJECTED" | "OPENED" | "AUTHORIZED" | "COMPLETED" | "SETTLED" | "CLOSED")[] | undefined;
2522
562
  filterPaymentType?: "DOMESTIC" | "DOMESTIC"[] | undefined;
@@ -2573,13 +613,6 @@ declare const createPartnerApiClient: (...args: Parameters<typeof hc>) => {
2573
613
  clabe?: string | undefined;
2574
614
  bsb?: string | undefined;
2575
615
  brBankNumber?: string | undefined;
2576
- address?: {
2577
- streetName?: string | undefined;
2578
- buildingNumber?: string | undefined;
2579
- city?: string | undefined;
2580
- postalCode?: string | undefined;
2581
- countryCode?: string | undefined;
2582
- } | undefined;
2583
616
  };
2584
617
  referenceId?: string | undefined;
2585
618
  remittanceInfo?: {
@@ -2592,11 +625,52 @@ declare const createPartnerApiClient: (...args: Parameters<typeof hc>) => {
2592
625
  };
2593
626
  };
2594
627
  output: {
2595
- paymentRequestId: string;
2596
- authorizationUrl: string;
2597
- status: "accepted";
2598
- instructionPriority: "NORMAL" | "INSTANT";
2599
- referenceId?: string | undefined;
628
+ id: string;
629
+ referenceId: string | null;
630
+ bankRefId: string | null;
631
+ status: string;
632
+ direction: "OUTGOING";
633
+ type: string;
634
+ amount: {
635
+ value: number;
636
+ currency: string;
637
+ };
638
+ debtor: {
639
+ name: string | null;
640
+ iban: string | null;
641
+ accountId: string;
642
+ bankCode: string | null;
643
+ };
644
+ creditor: {
645
+ name: string | null;
646
+ iban?: string | undefined;
647
+ bankCode?: string | undefined;
648
+ swiftBic?: string | undefined;
649
+ address?: {
650
+ streetName?: string | undefined;
651
+ buildingNumber?: string | undefined;
652
+ city?: string | undefined;
653
+ postalCode?: string | undefined;
654
+ countryCode?: string | undefined;
655
+ } | undefined;
656
+ };
657
+ remittanceInfo: {
658
+ message: string | null;
659
+ variableSymbol: string | null;
660
+ specificSymbol: string | null;
661
+ constantSymbol: string | null;
662
+ } | null;
663
+ statusReason: string | null;
664
+ dates: {
665
+ created: string | null;
666
+ initiated: string | null;
667
+ processed: string | null;
668
+ updated: string | null;
669
+ };
670
+ batch: {
671
+ id: string;
672
+ } | null;
673
+ instructionPriority: "NORMAL" | "INSTANT" | null;
2600
674
  };
2601
675
  outputFormat: "json";
2602
676
  status: 202;
@@ -2630,13 +704,6 @@ declare const createPartnerApiClient: (...args: Parameters<typeof hc>) => {
2630
704
  clabe?: string | undefined;
2631
705
  bsb?: string | undefined;
2632
706
  brBankNumber?: string | undefined;
2633
- address?: {
2634
- streetName?: string | undefined;
2635
- buildingNumber?: string | undefined;
2636
- city?: string | undefined;
2637
- postalCode?: string | undefined;
2638
- countryCode?: string | undefined;
2639
- } | undefined;
2640
707
  };
2641
708
  referenceId?: string | undefined;
2642
709
  remittanceInfo?: {
@@ -2684,13 +751,6 @@ declare const createPartnerApiClient: (...args: Parameters<typeof hc>) => {
2684
751
  clabe?: string | undefined;
2685
752
  bsb?: string | undefined;
2686
753
  brBankNumber?: string | undefined;
2687
- address?: {
2688
- streetName?: string | undefined;
2689
- buildingNumber?: string | undefined;
2690
- city?: string | undefined;
2691
- postalCode?: string | undefined;
2692
- countryCode?: string | undefined;
2693
- } | undefined;
2694
754
  };
2695
755
  referenceId?: string | undefined;
2696
756
  remittanceInfo?: {
@@ -2738,13 +798,6 @@ declare const createPartnerApiClient: (...args: Parameters<typeof hc>) => {
2738
798
  clabe?: string | undefined;
2739
799
  bsb?: string | undefined;
2740
800
  brBankNumber?: string | undefined;
2741
- address?: {
2742
- streetName?: string | undefined;
2743
- buildingNumber?: string | undefined;
2744
- city?: string | undefined;
2745
- postalCode?: string | undefined;
2746
- countryCode?: string | undefined;
2747
- } | undefined;
2748
801
  };
2749
802
  referenceId?: string | undefined;
2750
803
  remittanceInfo?: {
@@ -2792,13 +845,6 @@ declare const createPartnerApiClient: (...args: Parameters<typeof hc>) => {
2792
845
  clabe?: string | undefined;
2793
846
  bsb?: string | undefined;
2794
847
  brBankNumber?: string | undefined;
2795
- address?: {
2796
- streetName?: string | undefined;
2797
- buildingNumber?: string | undefined;
2798
- city?: string | undefined;
2799
- postalCode?: string | undefined;
2800
- countryCode?: string | undefined;
2801
- } | undefined;
2802
848
  };
2803
849
  referenceId?: string | undefined;
2804
850
  remittanceInfo?: {
@@ -2825,7 +871,7 @@ declare const createPartnerApiClient: (...args: Parameters<typeof hc>) => {
2825
871
  organizations: {
2826
872
  ":id": {
2827
873
  "payment-requests": {
2828
- batch: ClientRequest<string, "/v1/organizations/:id/payment-requests/batch", {
874
+ batch: hono_client.ClientRequest<string, "/v1/organizations/:id/payment-requests/batch", {
2829
875
  $post: {
2830
876
  input: {
2831
877
  param: {
@@ -2857,13 +903,6 @@ declare const createPartnerApiClient: (...args: Parameters<typeof hc>) => {
2857
903
  clabe?: string | undefined;
2858
904
  bsb?: string | undefined;
2859
905
  brBankNumber?: string | undefined;
2860
- address?: {
2861
- streetName?: string | undefined;
2862
- buildingNumber?: string | undefined;
2863
- city?: string | undefined;
2864
- postalCode?: string | undefined;
2865
- countryCode?: string | undefined;
2866
- } | undefined;
2867
906
  };
2868
907
  referenceId?: string | undefined;
2869
908
  remittanceInfo?: {
@@ -2878,9 +917,54 @@ declare const createPartnerApiClient: (...args: Parameters<typeof hc>) => {
2878
917
  };
2879
918
  output: {
2880
919
  batchId: string;
2881
- authorizationUrls: string[];
2882
- status: "accepted";
2883
- paymentCount: number;
920
+ paymentRequests: {
921
+ id: string;
922
+ referenceId: string | null;
923
+ bankRefId: string | null;
924
+ status: string;
925
+ direction: "OUTGOING";
926
+ type: string;
927
+ amount: {
928
+ value: number;
929
+ currency: string;
930
+ };
931
+ debtor: {
932
+ name: string | null;
933
+ iban: string | null;
934
+ accountId: string;
935
+ bankCode: string | null;
936
+ };
937
+ creditor: {
938
+ name: string | null;
939
+ iban?: string | undefined;
940
+ bankCode?: string | undefined;
941
+ swiftBic?: string | undefined;
942
+ address?: {
943
+ streetName?: string | undefined;
944
+ buildingNumber?: string | undefined;
945
+ city?: string | undefined;
946
+ postalCode?: string | undefined;
947
+ countryCode?: string | undefined;
948
+ } | undefined;
949
+ };
950
+ remittanceInfo: {
951
+ message: string | null;
952
+ variableSymbol: string | null;
953
+ specificSymbol: string | null;
954
+ constantSymbol: string | null;
955
+ } | null;
956
+ statusReason: string | null;
957
+ dates: {
958
+ created: string | null;
959
+ initiated: string | null;
960
+ processed: string | null;
961
+ updated: string | null;
962
+ };
963
+ batch: {
964
+ id: string;
965
+ } | null;
966
+ instructionPriority: "NORMAL" | "INSTANT" | null;
967
+ }[];
2884
968
  };
2885
969
  outputFormat: "json";
2886
970
  status: 202;
@@ -2915,13 +999,6 @@ declare const createPartnerApiClient: (...args: Parameters<typeof hc>) => {
2915
999
  clabe?: string | undefined;
2916
1000
  bsb?: string | undefined;
2917
1001
  brBankNumber?: string | undefined;
2918
- address?: {
2919
- streetName?: string | undefined;
2920
- buildingNumber?: string | undefined;
2921
- city?: string | undefined;
2922
- postalCode?: string | undefined;
2923
- countryCode?: string | undefined;
2924
- } | undefined;
2925
1002
  };
2926
1003
  referenceId?: string | undefined;
2927
1004
  remittanceInfo?: {
@@ -2971,13 +1048,6 @@ declare const createPartnerApiClient: (...args: Parameters<typeof hc>) => {
2971
1048
  clabe?: string | undefined;
2972
1049
  bsb?: string | undefined;
2973
1050
  brBankNumber?: string | undefined;
2974
- address?: {
2975
- streetName?: string | undefined;
2976
- buildingNumber?: string | undefined;
2977
- city?: string | undefined;
2978
- postalCode?: string | undefined;
2979
- countryCode?: string | undefined;
2980
- } | undefined;
2981
1051
  };
2982
1052
  referenceId?: string | undefined;
2983
1053
  remittanceInfo?: {
@@ -3027,13 +1097,6 @@ declare const createPartnerApiClient: (...args: Parameters<typeof hc>) => {
3027
1097
  clabe?: string | undefined;
3028
1098
  bsb?: string | undefined;
3029
1099
  brBankNumber?: string | undefined;
3030
- address?: {
3031
- streetName?: string | undefined;
3032
- buildingNumber?: string | undefined;
3033
- city?: string | undefined;
3034
- postalCode?: string | undefined;
3035
- countryCode?: string | undefined;
3036
- } | undefined;
3037
1100
  };
3038
1101
  referenceId?: string | undefined;
3039
1102
  remittanceInfo?: {
@@ -3083,13 +1146,6 @@ declare const createPartnerApiClient: (...args: Parameters<typeof hc>) => {
3083
1146
  clabe?: string | undefined;
3084
1147
  bsb?: string | undefined;
3085
1148
  brBankNumber?: string | undefined;
3086
- address?: {
3087
- streetName?: string | undefined;
3088
- buildingNumber?: string | undefined;
3089
- city?: string | undefined;
3090
- postalCode?: string | undefined;
3091
- countryCode?: string | undefined;
3092
- } | undefined;
3093
1149
  };
3094
1150
  referenceId?: string | undefined;
3095
1151
  remittanceInfo?: {
@@ -3118,7 +1174,7 @@ declare const createPartnerApiClient: (...args: Parameters<typeof hc>) => {
3118
1174
  organizations: {
3119
1175
  ":id": {
3120
1176
  "payment-requests": {
3121
- ":paymentRequestId": ClientRequest<string, "/v1/organizations/:id/payment-requests/:paymentRequestId", {
1177
+ ":paymentRequestId": hono_client.ClientRequest<string, "/v1/organizations/:id/payment-requests/:paymentRequestId", {
3122
1178
  $get: {
3123
1179
  input: {
3124
1180
  param: {
@@ -3131,6 +1187,8 @@ declare const createPartnerApiClient: (...args: Parameters<typeof hc>) => {
3131
1187
  };
3132
1188
  output: {
3133
1189
  id: string;
1190
+ referenceId: string | null;
1191
+ bankRefId: string | null;
3134
1192
  status: string;
3135
1193
  direction: "OUTGOING";
3136
1194
  type: string;
@@ -3141,38 +1199,39 @@ declare const createPartnerApiClient: (...args: Parameters<typeof hc>) => {
3141
1199
  debtor: {
3142
1200
  name: string | null;
3143
1201
  iban: string | null;
3144
- accountId?: string | undefined;
3145
- bankCode?: string | undefined;
1202
+ accountId: string;
1203
+ bankCode: string | null;
3146
1204
  };
3147
1205
  creditor: {
3148
1206
  name: string | null;
3149
1207
  iban?: string | undefined;
3150
1208
  bankCode?: string | undefined;
3151
1209
  swiftBic?: string | undefined;
3152
- address?: string | undefined;
1210
+ address?: {
1211
+ streetName?: string | undefined;
1212
+ buildingNumber?: string | undefined;
1213
+ city?: string | undefined;
1214
+ postalCode?: string | undefined;
1215
+ countryCode?: string | undefined;
1216
+ } | undefined;
3153
1217
  };
1218
+ remittanceInfo: {
1219
+ message: string | null;
1220
+ variableSymbol: string | null;
1221
+ specificSymbol: string | null;
1222
+ constantSymbol: string | null;
1223
+ } | null;
1224
+ statusReason: string | null;
3154
1225
  dates: {
3155
1226
  created: string | null;
3156
- initiated?: string | undefined;
3157
- processed?: string | undefined;
3158
- updated?: string | undefined;
1227
+ initiated: string | null;
1228
+ processed: string | null;
1229
+ updated: string | null;
3159
1230
  };
3160
- referenceId?: string | undefined;
3161
- bankRefId?: string | undefined;
3162
- authorization?: {
3163
- url: string;
3164
- } | undefined;
3165
- remittanceInfo?: {
3166
- message?: string | undefined;
3167
- variableSymbol?: string | undefined;
3168
- specificSymbol?: string | undefined;
3169
- constantSymbol?: string | undefined;
3170
- } | undefined;
3171
- statusReason?: string | undefined;
3172
- batch?: {
1231
+ batch: {
3173
1232
  id: string;
3174
- } | undefined;
3175
- instructionPriority?: "NORMAL" | "INSTANT" | undefined;
1233
+ } | null;
1234
+ instructionPriority: "NORMAL" | "INSTANT" | null;
3176
1235
  };
3177
1236
  outputFormat: "json";
3178
1237
  status: 200;
@@ -3215,7 +1274,7 @@ declare const createPartnerApiClient: (...args: Parameters<typeof hc>) => {
3215
1274
  } & {
3216
1275
  v1: {
3217
1276
  organization: {
3218
- "signature-keys": ClientRequest<string, "/v1/organization/signature-keys", {
1277
+ "signature-keys": hono_client.ClientRequest<string, "/v1/organization/signature-keys", {
3219
1278
  $post: {
3220
1279
  input: {
3221
1280
  header: {
@@ -3276,7 +1335,7 @@ declare const createPartnerApiClient: (...args: Parameters<typeof hc>) => {
3276
1335
  v1: {
3277
1336
  organization: {
3278
1337
  "signature-keys": {
3279
- ":name": ClientRequest<string, "/v1/organization/signature-keys/:name", {
1338
+ ":name": hono_client.ClientRequest<string, "/v1/organization/signature-keys/:name", {
3280
1339
  $delete: {
3281
1340
  input: {
3282
1341
  param: {
@@ -3317,7 +1376,7 @@ declare const createPartnerApiClient: (...args: Parameters<typeof hc>) => {
3317
1376
  } & {
3318
1377
  v1: {
3319
1378
  organization: {
3320
- users: ClientRequest<string, "/v1/organization/users", {
1379
+ users: hono_client.ClientRequest<string, "/v1/organization/users", {
3321
1380
  $post: {
3322
1381
  input: {
3323
1382
  header: {
@@ -3358,7 +1417,7 @@ declare const createPartnerApiClient: (...args: Parameters<typeof hc>) => {
3358
1417
  v1: {
3359
1418
  organization: {
3360
1419
  users: {
3361
- ":id": ClientRequest<string, "/v1/organization/users/:id", {
1420
+ ":id": hono_client.ClientRequest<string, "/v1/organization/users/:id", {
3362
1421
  $delete: {
3363
1422
  input: {
3364
1423
  param: {
@@ -3445,7 +1504,7 @@ declare const createPartnerApiClient: (...args: Parameters<typeof hc>) => {
3445
1504
  v1: {
3446
1505
  tasks: {
3447
1506
  setups: {
3448
- organization: ClientRequest<string, "/v1/tasks/setups/organization", {
1507
+ organization: hono_client.ClientRequest<string, "/v1/tasks/setups/organization", {
3449
1508
  $post: {
3450
1509
  input: {
3451
1510
  json: {
@@ -3532,7 +1591,7 @@ declare const createPartnerApiClient: (...args: Parameters<typeof hc>) => {
3532
1591
  users: {
3533
1592
  ":userId": {
3534
1593
  verification: {
3535
- ":confirmationToken": ClientRequest<string, "/v1/users/:userId/verification/:confirmationToken", {
1594
+ ":confirmationToken": hono_client.ClientRequest<string, "/v1/users/:userId/verification/:confirmationToken", {
3536
1595
  $patch: {
3537
1596
  input: {
3538
1597
  param: {
@@ -3549,7 +1608,7 @@ declare const createPartnerApiClient: (...args: Parameters<typeof hc>) => {
3549
1608
  };
3550
1609
  output: Response;
3551
1610
  outputFormat: "json";
3552
- status: StatusCode;
1611
+ status: hono_utils_http_status.StatusCode;
3553
1612
  };
3554
1613
  } & {
3555
1614
  $get: {
@@ -3564,7 +1623,7 @@ declare const createPartnerApiClient: (...args: Parameters<typeof hc>) => {
3564
1623
  };
3565
1624
  output: Response;
3566
1625
  outputFormat: "json";
3567
- status: StatusCode;
1626
+ status: hono_utils_http_status.StatusCode;
3568
1627
  };
3569
1628
  }>;
3570
1629
  };
@@ -3577,7 +1636,7 @@ declare const createPartnerApiClient: (...args: Parameters<typeof hc>) => {
3577
1636
  ":userId": {
3578
1637
  verification: {
3579
1638
  ":confirmationToken": {
3580
- success: ClientRequest<string, "/v1/users/:userId/verification/:confirmationToken/success", {
1639
+ success: hono_client.ClientRequest<string, "/v1/users/:userId/verification/:confirmationToken/success", {
3581
1640
  $get: {
3582
1641
  input: {
3583
1642
  param: {
@@ -3591,7 +1650,7 @@ declare const createPartnerApiClient: (...args: Parameters<typeof hc>) => {
3591
1650
  };
3592
1651
  output: Response;
3593
1652
  outputFormat: "json";
3594
- status: StatusCode;
1653
+ status: hono_utils_http_status.StatusCode;
3595
1654
  };
3596
1655
  }>;
3597
1656
  };
@@ -3601,15 +1660,16 @@ declare const createPartnerApiClient: (...args: Parameters<typeof hc>) => {
3601
1660
  };
3602
1661
  };
3603
1662
 
3604
- declare const signPayload: ({ payload, privateKey, }: {
3605
- payload: string;
3606
- privateKey: string;
3607
- }) => Promise<string>;
3608
- declare const verifyPayloadSignature: ({ signature, data, publicKey, algorithm, }: {
3609
- signature: string;
3610
- data: string;
3611
- publicKey: string;
3612
- algorithm?: "RSA" | "EC" | "HMAC";
3613
- }) => Promise<boolean>;
1663
+ declare const WebhookEventType: {
1664
+ readonly PaymentFetched: "payment.fetched";
1665
+ readonly PaymentUpdated: "payment.updated";
1666
+ readonly PaymentRequestAuthorized: "payment_request.authorized";
1667
+ readonly PaymentRequestCompleted: "payment_request.completed";
1668
+ readonly PaymentRequestBooked: "payment_request.booked";
1669
+ readonly PaymentRequestSettled: "payment_request.settled";
1670
+ readonly PaymentRequestRejected: "payment_request.rejected";
1671
+ readonly PaymentRequestClosed: "payment_request.closed";
1672
+ };
1673
+ type WebhookEventType = (typeof WebhookEventType)[keyof typeof WebhookEventType];
3614
1674
 
3615
- export { createPartnerApiClient, signPayload, verifyPayloadSignature };
1675
+ export { WebhookEventType, WebhookEventType as WebhookEventTypeValue, createPartnerApiClient };