better-call 1.0.22 → 1.0.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client.d.cts +1 -1
- package/dist/client.d.ts +1 -1
- package/dist/index.cjs +0 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +0 -6
- package/dist/index.js.map +1 -1
- package/dist/node.d.cts +1 -1
- package/dist/node.d.ts +1 -1
- package/dist/{router-BPTd8L-P.d.ts → router-BFJOSfmb.d.cts} +6 -7
- package/dist/{router-IP1pntSS.d.cts → router-D0KeMgM6.d.ts} +6 -7
- package/package.json +1 -1
package/dist/node.d.cts
CHANGED
package/dist/node.d.ts
CHANGED
|
@@ -1079,21 +1079,21 @@ type EndpointContext<Path extends string, Options extends EndpointOptions, Conte
|
|
|
1079
1079
|
} & Record<string, any>, headers?: HeadersInit) => APIError;
|
|
1080
1080
|
};
|
|
1081
1081
|
declare const createEndpoint: {
|
|
1082
|
-
<Path extends string, Options extends EndpointOptions, R
|
|
1082
|
+
<Path extends string, Options extends EndpointOptions, R>(path: Path, options: Options, handler: (context: EndpointContext<Path, Options>) => Promise<R>): StrictEndpoint<Path, Options, R>;
|
|
1083
1083
|
create<E extends {
|
|
1084
1084
|
use?: Middleware[];
|
|
1085
1085
|
}>(opts?: E): <Path extends string, Opts extends EndpointOptions, R extends Promise<any>>(path: Path, options: Opts, handler: (ctx: EndpointContext<Path, Opts, InferUse<E["use"]>>) => R) => StrictEndpoint<Path, Opts & {
|
|
1086
1086
|
use: any[];
|
|
1087
|
-
},
|
|
1087
|
+
}, any>;
|
|
1088
1088
|
};
|
|
1089
|
-
type StrictEndpoint<Path extends string
|
|
1089
|
+
type StrictEndpoint<Path extends string, Options extends EndpointOptions, R = any> = {
|
|
1090
1090
|
(context: InputContext<Path, Options> & {
|
|
1091
1091
|
asResponse: true;
|
|
1092
1092
|
}): Promise<Response>;
|
|
1093
1093
|
(context: InputContext<Path, Options> & {
|
|
1094
1094
|
asResponse: false;
|
|
1095
1095
|
returnHeaders?: false;
|
|
1096
|
-
}): R
|
|
1096
|
+
}): Promise<R>;
|
|
1097
1097
|
(context: InputContext<Path, Options> & {
|
|
1098
1098
|
asResponse?: false;
|
|
1099
1099
|
returnHeaders: true;
|
|
@@ -1101,8 +1101,7 @@ type StrictEndpoint<Path extends string = string, Options extends EndpointOption
|
|
|
1101
1101
|
headers: Headers;
|
|
1102
1102
|
response: Awaited<R>;
|
|
1103
1103
|
}>;
|
|
1104
|
-
(context?: InputContext<Path, Options>): R
|
|
1105
|
-
wrap: <T>(fn: (context: EndpointContext<Path, Options>, original: (context: EndpointContext<Path, Options>) => Promise<any>) => T) => StrictEndpoint<Path, Options, Promise<T>>;
|
|
1104
|
+
(context?: InputContext<Path, Options>): Promise<R>;
|
|
1106
1105
|
options: Options;
|
|
1107
1106
|
path: Path;
|
|
1108
1107
|
};
|
|
@@ -1184,4 +1183,4 @@ declare const createRouter: <E extends Record<string, Endpoint>, Config extends
|
|
|
1184
1183
|
type Router = ReturnType<typeof createRouter>;
|
|
1185
1184
|
//#endregion
|
|
1186
1185
|
export { APIError, CookieOptions, CookiePrefixOptions, Endpoint, EndpointContext, EndpointOptions, HTTPMethod, HasRequiredKeys, InferBody, InferBodyInput, InferHeaders, InferHeadersInput, InferInputMethod, InferMethod, InferMiddlewareBody, InferMiddlewareQuery, InferParam, InferParamInput, InferParamPath, InferParamWildCard, InferQuery, InferQueryInput, InferRequest, InferRequestInput, InferUse, InputContext, IsEmptyObject, MergeObject, Method, Middleware, MiddlewareContext, MiddlewareInputContext, MiddlewareOptions, MiddlewareResponse, OpenAPIParameter, OpenAPISchemaType, Path$1 as Path, Prettify, RequiredKeysOf, Router, RouterConfig, StandardSchemaV1, Status, StrictEndpoint, UnionToIntersection, _statusCode, createEndpoint, createInternalContext, createMiddleware, createRouter, generator, getCookieKey, getHTML, hideInternalStackFrames, makeErrorForHideStackFrame, parseCookies, serializeCookie, serializeSignedCookie };
|
|
1187
|
-
//# sourceMappingURL=router-
|
|
1186
|
+
//# sourceMappingURL=router-BFJOSfmb.d.cts.map
|
|
@@ -1079,21 +1079,21 @@ type EndpointContext<Path extends string, Options extends EndpointOptions, Conte
|
|
|
1079
1079
|
} & Record<string, any>, headers?: HeadersInit) => APIError;
|
|
1080
1080
|
};
|
|
1081
1081
|
declare const createEndpoint: {
|
|
1082
|
-
<Path extends string, Options extends EndpointOptions, R
|
|
1082
|
+
<Path extends string, Options extends EndpointOptions, R>(path: Path, options: Options, handler: (context: EndpointContext<Path, Options>) => Promise<R>): StrictEndpoint<Path, Options, R>;
|
|
1083
1083
|
create<E extends {
|
|
1084
1084
|
use?: Middleware[];
|
|
1085
1085
|
}>(opts?: E): <Path extends string, Opts extends EndpointOptions, R extends Promise<any>>(path: Path, options: Opts, handler: (ctx: EndpointContext<Path, Opts, InferUse<E["use"]>>) => R) => StrictEndpoint<Path, Opts & {
|
|
1086
1086
|
use: any[];
|
|
1087
|
-
},
|
|
1087
|
+
}, any>;
|
|
1088
1088
|
};
|
|
1089
|
-
type StrictEndpoint<Path extends string
|
|
1089
|
+
type StrictEndpoint<Path extends string, Options extends EndpointOptions, R = any> = {
|
|
1090
1090
|
(context: InputContext<Path, Options> & {
|
|
1091
1091
|
asResponse: true;
|
|
1092
1092
|
}): Promise<Response>;
|
|
1093
1093
|
(context: InputContext<Path, Options> & {
|
|
1094
1094
|
asResponse: false;
|
|
1095
1095
|
returnHeaders?: false;
|
|
1096
|
-
}): R
|
|
1096
|
+
}): Promise<R>;
|
|
1097
1097
|
(context: InputContext<Path, Options> & {
|
|
1098
1098
|
asResponse?: false;
|
|
1099
1099
|
returnHeaders: true;
|
|
@@ -1101,8 +1101,7 @@ type StrictEndpoint<Path extends string = string, Options extends EndpointOption
|
|
|
1101
1101
|
headers: Headers;
|
|
1102
1102
|
response: Awaited<R>;
|
|
1103
1103
|
}>;
|
|
1104
|
-
(context?: InputContext<Path, Options>): R
|
|
1105
|
-
wrap: <T>(fn: (context: EndpointContext<Path, Options>, original: (context: EndpointContext<Path, Options>) => Promise<any>) => T) => StrictEndpoint<Path, Options, Promise<T>>;
|
|
1104
|
+
(context?: InputContext<Path, Options>): Promise<R>;
|
|
1106
1105
|
options: Options;
|
|
1107
1106
|
path: Path;
|
|
1108
1107
|
};
|
|
@@ -1184,4 +1183,4 @@ declare const createRouter: <E extends Record<string, Endpoint>, Config extends
|
|
|
1184
1183
|
type Router = ReturnType<typeof createRouter>;
|
|
1185
1184
|
//#endregion
|
|
1186
1185
|
export { APIError, CookieOptions, CookiePrefixOptions, Endpoint, EndpointContext, EndpointOptions, HTTPMethod, HasRequiredKeys, InferBody, InferBodyInput, InferHeaders, InferHeadersInput, InferInputMethod, InferMethod, InferMiddlewareBody, InferMiddlewareQuery, InferParam, InferParamInput, InferParamPath, InferParamWildCard, InferQuery, InferQueryInput, InferRequest, InferRequestInput, InferUse, InputContext, IsEmptyObject, MergeObject, Method, Middleware, MiddlewareContext, MiddlewareInputContext, MiddlewareOptions, MiddlewareResponse, OpenAPIParameter, OpenAPISchemaType, Path$1 as Path, Prettify, RequiredKeysOf, Router, RouterConfig, StandardSchemaV1, Status, StrictEndpoint, UnionToIntersection, _statusCode, createEndpoint, createInternalContext, createMiddleware, createRouter, generator, getCookieKey, getHTML, hideInternalStackFrames, makeErrorForHideStackFrame, parseCookies, serializeCookie, serializeSignedCookie };
|
|
1187
|
-
//# sourceMappingURL=router-
|
|
1186
|
+
//# sourceMappingURL=router-D0KeMgM6.d.ts.map
|