@forklaunch/core 0.11.2 → 0.11.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/http/index.d.mts +224 -48
- package/lib/http/index.d.ts +224 -48
- package/lib/http/index.js.map +1 -1
- package/lib/http/index.mjs.map +1 -1
- package/package.json +3 -3
package/lib/http/index.d.ts
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
import { ParsedQs } from 'qs';
|
2
2
|
export { ParsedQs } from 'qs';
|
3
|
-
import { UnionToIntersection, StringWithoutSlash, ExclusiveRecord, Prettify, SanitizePathSlashes, MakePropertyOptionalIfChildrenOptional, PrettyCamelCase, TypeSafeFunction,
|
3
|
+
import { UnionToIntersection, StringWithoutSlash, ExclusiveRecord, Prettify, SanitizePathSlashes, MakePropertyOptionalIfChildrenOptional, PrettyCamelCase, TypeSafeFunction, EmptyObject } from '@forklaunch/common';
|
4
4
|
import { AnySchemaValidator, UnboxedObjectSchema, IdiomaticSchema, Schema } from '@forklaunch/validator';
|
5
5
|
import { CorsOptions } from 'cors';
|
6
6
|
import { Counter, Gauge, Histogram, UpDownCounter, ObservableCounter, ObservableGauge, ObservableUpDownCounter, Span } from '@opentelemetry/api';
|
@@ -242,10 +242,10 @@ type SchemaAuthMethods<SV extends AnySchemaValidator, ParamsSchema extends Param
|
|
242
242
|
} & PermissionSet) | ({
|
243
243
|
readonly mapRoles: ExpressLikeSchemaAuthMapper<SV, ParamsSchema, ReqBody, QuerySchema, ReqHeaders, BaseRequest>;
|
244
244
|
} & RoleSet));
|
245
|
-
type AuthMethods<P extends ParamsDictionary, ReqBody extends Record<string, unknown>, ReqQuery extends ParsedQs, ReqHeaders extends Record<string, string>, BaseRequest> = AuthMethodsBase & (({
|
246
|
-
readonly mapPermissions: ExpressLikeAuthMapper<P, ReqBody, ReqQuery, ReqHeaders, BaseRequest>;
|
245
|
+
type AuthMethods<SV extends AnySchemaValidator, P extends ParamsDictionary, ReqBody extends Record<string, unknown>, ReqQuery extends ParsedQs, ReqHeaders extends Record<string, string>, BaseRequest> = AuthMethodsBase & (({
|
246
|
+
readonly mapPermissions: ExpressLikeAuthMapper<SV, P, ReqBody, ReqQuery, ReqHeaders, BaseRequest>;
|
247
247
|
} & PermissionSet) | ({
|
248
|
-
readonly mapRoles: ExpressLikeAuthMapper<P, ReqBody, ReqQuery, ReqHeaders, BaseRequest>;
|
248
|
+
readonly mapRoles: ExpressLikeAuthMapper<SV, P, ReqBody, ReqQuery, ReqHeaders, BaseRequest>;
|
249
249
|
} & RoleSet));
|
250
250
|
/**
|
251
251
|
* Type representing a mapped schema.
|
@@ -635,8 +635,8 @@ type ExpressLikeSchemaHandler<SV extends AnySchemaValidator, P extends ParamsObj
|
|
635
635
|
* @param {ForklaunchRequest<SV, P, ReqBody, ReqQuery, ReqHeaders>} req - The request object with schema validation.
|
636
636
|
* @returns {Set<string> | Promise<Set<string>>} - A set of authorization strings or a promise that resolves to it.
|
637
637
|
*/
|
638
|
-
type ExpressLikeSchemaAuthMapper<SV extends AnySchemaValidator, P extends ParamsObject<SV>, ReqBody extends Body<SV>, ReqQuery extends QueryObject<SV>, ReqHeaders extends HeadersObject<SV>, BaseRequest> = ExpressLikeAuthMapper<P extends infer UnmappedParams ? UnmappedParams extends ParamsObject<SV> ? MapParamsSchema<SV, UnmappedParams> : never : never, ReqBody extends infer UnmappedReqBody ? UnmappedReqBody extends Body<SV> ? MapReqBodySchema<SV, UnmappedReqBody> : never : never, ReqQuery extends infer UnmappedReqQuery ? UnmappedReqQuery extends QueryObject<SV> ? MapReqQuerySchema<SV, UnmappedReqQuery> : never : never, ReqHeaders extends infer UnmappedReqHeaders ? UnmappedReqHeaders extends HeadersObject<SV> ? MapReqHeadersSchema<SV, UnmappedReqHeaders> : never : never, BaseRequest>;
|
639
|
-
type ExpressLikeAuthMapper<P extends ParamsDictionary, ReqBody extends Record<string, unknown>, ReqQuery extends ParsedQs, ReqHeaders extends Record<string, string>, BaseRequest> = (payload: JWTPayload, req?:
|
638
|
+
type ExpressLikeSchemaAuthMapper<SV extends AnySchemaValidator, P extends ParamsObject<SV>, ReqBody extends Body<SV>, ReqQuery extends QueryObject<SV>, ReqHeaders extends HeadersObject<SV>, BaseRequest> = ExpressLikeAuthMapper<SV, P extends infer UnmappedParams ? UnmappedParams extends ParamsObject<SV> ? MapParamsSchema<SV, UnmappedParams> : never : never, ReqBody extends infer UnmappedReqBody ? UnmappedReqBody extends Body<SV> ? MapReqBodySchema<SV, UnmappedReqBody> : never : never, ReqQuery extends infer UnmappedReqQuery ? UnmappedReqQuery extends QueryObject<SV> ? MapReqQuerySchema<SV, UnmappedReqQuery> : never : never, ReqHeaders extends infer UnmappedReqHeaders ? UnmappedReqHeaders extends HeadersObject<SV> ? MapReqHeadersSchema<SV, UnmappedReqHeaders> : never : never, BaseRequest>;
|
639
|
+
type ExpressLikeAuthMapper<SV extends AnySchemaValidator, P extends ParamsDictionary, ReqBody extends Record<string, unknown>, ReqQuery extends ParsedQs, ReqHeaders extends Record<string, string>, BaseRequest> = (payload: JWTPayload, req?: ResolvedForklaunchRequest<SV, P, ReqBody, ReqQuery, ReqHeaders, BaseRequest>) => Set<string> | Promise<Set<string>>;
|
640
640
|
type TokenPrefix<Auth extends AuthMethodsBase> = undefined extends Auth['tokenPrefix'] ? Auth extends BasicAuthMethods ? 'Basic ' : 'Bearer ' : `${Auth['tokenPrefix']} `;
|
641
641
|
type AuthHeaders<Auth extends AuthMethodsBase> = undefined extends Auth['headerName'] ? {
|
642
642
|
authorization: `${TokenPrefix<Auth>}${string}`;
|
@@ -921,13 +921,67 @@ type ContractDetailsOrMiddlewareOrTypedHandler<SV extends AnySchemaValidator, Na
|
|
921
921
|
type MiddlewareOrMiddlewareWithTypedHandler<SV extends AnySchemaValidator, Name extends string, ContractMethod extends Method, Path extends `/${string}`, P extends ParamsObject<SV>, ResBodyMap extends ResponsesObject<SV>, ReqBody extends Body<SV>, ReqQuery extends QueryObject<SV>, ReqHeaders extends HeadersObject<SV>, ResHeaders extends HeadersObject<SV>, LocalsObj extends Record<string, unknown>, BaseRequest, BaseResponse, NextFunction, Auth extends SchemaAuthMethods<SV, P, ReqBody, ReqQuery, ReqHeaders, BaseRequest>> = ExpressLikeSchemaHandler<SV, P, ResBodyMap, ReqBody, ReqQuery, ReqHeaders, ResHeaders, LocalsObj, BaseRequest, BaseResponse, NextFunction> | TypedHandler<SV, Name, ContractMethod, Path, P, ResBodyMap, ReqBody, ReqQuery, ReqHeaders, ResHeaders, LocalsObj, BaseRequest, BaseResponse, NextFunction, Auth>;
|
922
922
|
|
923
923
|
/**
|
924
|
-
*
|
925
|
-
|
926
|
-
|
927
|
-
|
928
|
-
|
929
|
-
|
930
|
-
|
924
|
+
* Creates a type-safe fetch function based on a provided fetch map.
|
925
|
+
* This type generates a function that provides compile-time type safety for HTTP requests,
|
926
|
+
* ensuring that the correct path and request parameters are used for each endpoint.
|
927
|
+
*
|
928
|
+
* @template FetchMap - A record mapping paths to their corresponding TypeSafeFunction signatures
|
929
|
+
* @param FetchMap[Path] - Each path should map to a TypeSafeFunction that defines the request/response contract
|
930
|
+
*
|
931
|
+
* @returns A generic function that:
|
932
|
+
* - Takes a path parameter constrained to keys of FetchMap
|
933
|
+
* - Takes optional request initialization parameters based on the function signature
|
934
|
+
* - Returns a Promise of the expected response type
|
935
|
+
*
|
936
|
+
* @remarks
|
937
|
+
* The function parameters are conditionally typed:
|
938
|
+
* - If the mapped function expects body, query, params, or headers, reqInit is required
|
939
|
+
* - Otherwise, reqInit is optional
|
940
|
+
* - If the path doesn't map to a TypeSafeFunction, reqInit is never
|
941
|
+
*
|
942
|
+
* @example
|
943
|
+
* ```typescript
|
944
|
+
* // Define your API endpoints
|
945
|
+
* type UserAPI = {
|
946
|
+
* '/users': (baseUrl: string, options?: { query?: { limit?: number } }) => Promise<User[]>;
|
947
|
+
* '/users/:id': (baseUrl: string, options: { params: { id: string } }) => Promise<User>;
|
948
|
+
* '/users/create': (baseUrl: string, options: { body: CreateUserRequest }) => Promise<User>;
|
949
|
+
* };
|
950
|
+
*
|
951
|
+
* // Create a type-safe fetch function
|
952
|
+
* type UserFetch = FetchFunction<UserAPI>;
|
953
|
+
*
|
954
|
+
* // Usage examples
|
955
|
+
* const userFetch: UserFetch = async (path, reqInit) => {
|
956
|
+
* // Implementation details...
|
957
|
+
* };
|
958
|
+
*
|
959
|
+
* // Type-safe calls
|
960
|
+
* const users = await userFetch('/users'); // reqInit is optional
|
961
|
+
* const user = await userFetch('/users/:id', { params: { id: '123' } }); // reqInit required
|
962
|
+
* const newUser = await userFetch('/users/create', { body: { name: 'John' } }); // reqInit required
|
963
|
+
* ```
|
964
|
+
*
|
965
|
+
* @example
|
966
|
+
* ```typescript
|
967
|
+
* // Advanced usage with multiple parameter types
|
968
|
+
* type ComplexAPI = {
|
969
|
+
* '/search': (baseUrl: string, options: {
|
970
|
+
* query: { q: string; limit?: number };
|
971
|
+
* headers: { 'X-API-Key': string };
|
972
|
+
* }) => Promise<SearchResult[]>;
|
973
|
+
* };
|
974
|
+
*
|
975
|
+
* type ComplexFetch = FetchFunction<ComplexAPI>;
|
976
|
+
* const complexFetch: ComplexFetch = async (path, reqInit) => { ... };
|
977
|
+
*
|
978
|
+
* // Both query and headers are required
|
979
|
+
* const results = await complexFetch('/search', {
|
980
|
+
* query: { q: 'typescript' },
|
981
|
+
* headers: { 'X-API-Key': 'secret' }
|
982
|
+
* });
|
983
|
+
* ```
|
984
|
+
**/
|
931
985
|
type FetchFunction<FetchMap> = <Path extends keyof FetchMap>(path: Path, ...reqInit: FetchMap[Path] extends TypeSafeFunction ? Parameters<FetchMap[Path]>[1] extends {
|
932
986
|
body: unknown;
|
933
987
|
} | {
|
@@ -938,52 +992,174 @@ type FetchFunction<FetchMap> = <Path extends keyof FetchMap>(path: Path, ...reqI
|
|
938
992
|
headers: unknown;
|
939
993
|
} ? [reqInit: Parameters<FetchMap[Path]>[1]] : [reqInit?: Parameters<FetchMap[Path]>[1]] : [reqInit?: never]) => Promise<FetchMap[Path] extends TypeSafeFunction ? ReturnType<FetchMap[Path]> : never>;
|
940
994
|
/**
|
941
|
-
* Creates a
|
995
|
+
* Creates a router SDK by combining the router's SDK with its fetch functionality.
|
996
|
+
* This type merges the router's SDK interface with its fetch methods to create
|
997
|
+
* a complete router client.
|
942
998
|
*
|
943
|
-
*
|
944
|
-
*
|
945
|
-
*
|
946
|
-
* - A function that returns an object with `sdkName` and `sdk` properties
|
999
|
+
* @template TRoute - A route object that must contain both `sdk` and `fetch` properties
|
1000
|
+
* @param TRoute.sdk - The SDK interface/methods for the route
|
1001
|
+
* @param TRoute.fetch - The fetch functionality for the route
|
947
1002
|
*
|
948
|
-
* @
|
949
|
-
* @template {string} Routers[K]['sdkName'] - The name of the SDK for each router
|
950
|
-
* @template {Record<string, unknown>} Routers[K]['sdk'] - The SDK methods/endpoints for each router
|
1003
|
+
* @returns A prettified object combining the SDK and fetch properties
|
951
1004
|
*
|
952
1005
|
* @example
|
953
1006
|
* ```typescript
|
954
|
-
*
|
955
|
-
*
|
956
|
-
*
|
957
|
-
*
|
1007
|
+
* type UserRoute = {
|
1008
|
+
* sdk: { getUser: () => Promise<User>; createUser: (data: UserData) => Promise<User> };
|
1009
|
+
* fetch: { get: (path: string) => Promise<Response> };
|
1010
|
+
* };
|
958
1011
|
*
|
959
|
-
* type
|
960
|
-
* // Result: {
|
1012
|
+
* type UserRouter = SdkRouter<UserRoute>;
|
1013
|
+
* // Result: {
|
1014
|
+
* // getUser: () => Promise<User>;
|
1015
|
+
* // createUser: (data: UserData) => Promise<User>;
|
1016
|
+
* // fetch: { get: (path: string) => Promise<Response> };
|
1017
|
+
* // }
|
961
1018
|
* ```
|
962
1019
|
*/
|
963
|
-
type
|
1020
|
+
type SdkRouter<TRoute extends {
|
1021
|
+
sdk: unknown;
|
1022
|
+
fetch: unknown;
|
1023
|
+
}> = Prettify<TRoute['sdk'] & {
|
1024
|
+
fetch: TRoute['fetch'];
|
1025
|
+
}>;
|
1026
|
+
/**
|
1027
|
+
* Creates a complete SDK client from a record of route definitions.
|
1028
|
+
* Each route in the input is transformed into an SdkRouter, creating a comprehensive
|
1029
|
+
* client SDK with all routes and their associated fetch functionality.
|
1030
|
+
*
|
1031
|
+
* @template Input - A record where each key represents a route name and each value
|
1032
|
+
* contains the route's SDK, fetch methods, optional SDK name, and base path
|
1033
|
+
* @param Input[K].sdk - The SDK interface for route K
|
1034
|
+
* @param Input[K].fetch - The fetch functionality for route K
|
1035
|
+
* @param Input[K].sdkName - Optional custom name for the SDK (defaults to camelCase basePath)
|
1036
|
+
* @param Input[K].basePath - The base URL path for the route (used for SDK naming if sdkName not provided)
|
1037
|
+
*
|
1038
|
+
* @returns A prettified object where each route becomes an SdkRouter
|
1039
|
+
*
|
1040
|
+
* @example
|
1041
|
+
* ```typescript
|
1042
|
+
* type Routes = {
|
1043
|
+
* users: {
|
1044
|
+
* sdk: { getUser: () => Promise<User> };
|
1045
|
+
* fetch: { get: (path: string) => Promise<Response> };
|
1046
|
+
* basePath: '/api/users';
|
1047
|
+
* };
|
1048
|
+
* posts: {
|
1049
|
+
* sdk: { getPost: () => Promise<Post> };
|
1050
|
+
* fetch: { get: (path: string) => Promise<Response> };
|
1051
|
+
* basePath: '/api/posts';
|
1052
|
+
* sdkName: 'articles';
|
1053
|
+
* };
|
1054
|
+
* };
|
1055
|
+
*
|
1056
|
+
* type Client = SdkClient<Routes>;
|
1057
|
+
* // Result: {
|
1058
|
+
* // users: { getUser: () => Promise<User>; fetch: {...} };
|
1059
|
+
* // posts: { getPost: () => Promise<Post>; fetch: {...} };
|
1060
|
+
* // }
|
1061
|
+
* ```
|
1062
|
+
*/
|
1063
|
+
type SdkClient<Input extends Record<string, {
|
1064
|
+
sdk: unknown;
|
1065
|
+
fetch: unknown;
|
1066
|
+
sdkName?: string;
|
964
1067
|
basePath: string;
|
1068
|
+
}>> = Prettify<{
|
1069
|
+
[K in keyof Input]: Prettify<SdkRouter<Input[K]>>;
|
1070
|
+
}>;
|
1071
|
+
/**
|
1072
|
+
* Validates and unpacks SDK client input by ensuring that each key in the input record
|
1073
|
+
* corresponds to either the route's custom `sdkName` or the PrettyCamelCase version
|
1074
|
+
* of its `basePath`. This type provides compile-time validation for SDK client configuration.
|
1075
|
+
*
|
1076
|
+
* @template Input - A record of route definitions to validate
|
1077
|
+
* @param Input[K].sdk - The SDK interface for route K
|
1078
|
+
* @param Input[K].fetch - The fetch functionality for route K
|
1079
|
+
* @param Input[K].sdkName - Optional custom SDK name that should match the key K
|
1080
|
+
* @param Input[K].basePath - Base path that when converted to PrettyCamelCase should match key K
|
1081
|
+
*
|
1082
|
+
* @returns The original Input type if valid, or 'Invalid SDK Client Input' if validation fails
|
1083
|
+
*
|
1084
|
+
* @example
|
1085
|
+
* ```typescript
|
1086
|
+
* // Valid input - key matches basePath in camelCase
|
1087
|
+
* type ValidInput = {
|
1088
|
+
* apiUsers: {
|
1089
|
+
* sdk: UserSdk;
|
1090
|
+
* fetch: FetchMethods;
|
1091
|
+
* basePath: '/api/users'; // PrettyCamelCase becomes 'apiUsers'
|
1092
|
+
* };
|
1093
|
+
* };
|
1094
|
+
* type Result1 = UnpackSdkClientInput<ValidInput>; // Returns ValidInput
|
1095
|
+
*
|
1096
|
+
* // Valid input - key matches custom sdkName
|
1097
|
+
* type ValidInput2 = {
|
1098
|
+
* userService: {
|
1099
|
+
* sdk: UserSdk;
|
1100
|
+
* fetch: FetchMethods;
|
1101
|
+
* sdkName: 'userService';
|
1102
|
+
* basePath: '/api/users';
|
1103
|
+
* };
|
1104
|
+
* };
|
1105
|
+
* type Result2 = UnpackSdkClientInput<ValidInput2>; // Returns ValidInput2
|
1106
|
+
*
|
1107
|
+
* // Invalid input - key doesn't match either sdkName or camelCase basePath
|
1108
|
+
* type InvalidInput = {
|
1109
|
+
* wrongKey: {
|
1110
|
+
* sdk: UserSdk;
|
1111
|
+
* fetch: FetchMethods;
|
1112
|
+
* basePath: '/api/users'; // Should be 'apiUsers'
|
1113
|
+
* };
|
1114
|
+
* };
|
1115
|
+
* type Result3 = UnpackSdkClientInput<InvalidInput>; // Returns 'Invalid SDK Client Input'
|
1116
|
+
* ```
|
1117
|
+
*/
|
1118
|
+
type UnpackSdkClientInput<Input extends Record<string, {
|
1119
|
+
sdk: unknown;
|
1120
|
+
fetch: unknown;
|
965
1121
|
sdkName?: string;
|
966
|
-
sdk: Record<string, unknown>;
|
967
|
-
} | ((...args: never[]) => {
|
968
1122
|
basePath: string;
|
1123
|
+
}>> = Prettify<{
|
1124
|
+
[K in keyof Input]: K extends Input[K]['sdkName'] ? Input[K] : K extends PrettyCamelCase<Input[K]['basePath']> ? Input[K] : unknown;
|
1125
|
+
} extends Input ? Prettify<Input> : 'Invalid SDK Client Input'>;
|
1126
|
+
/**
|
1127
|
+
* Type alias for valid SDK client input configuration.
|
1128
|
+
* This type serves as a constraint to ensure that input to SDK client functions
|
1129
|
+
* conforms to the expected structure with required sdk, fetch, and basePath properties,
|
1130
|
+
* plus an optional sdkName property.
|
1131
|
+
*
|
1132
|
+
* @template Input - A record of route definitions that must conform to the SDK client structure
|
1133
|
+
* @param Input[K].sdk - The SDK interface containing route-specific methods
|
1134
|
+
* @param Input[K].fetch - The fetch functionality for making HTTP requests
|
1135
|
+
* @param Input[K].sdkName - Optional custom name for the SDK (if not provided, uses camelCase basePath)
|
1136
|
+
* @param Input[K].basePath - Required base URL path for the route
|
1137
|
+
*
|
1138
|
+
* @returns The input type unchanged, serving as a validation constraint
|
1139
|
+
*
|
1140
|
+
* @example
|
1141
|
+
* ```typescript
|
1142
|
+
* // Use as a constraint in function parameters
|
1143
|
+
* function createSdkClient<T extends ValidSdkClientInput<T>>(input: T): SdkClient<T> {
|
1144
|
+
* // Function implementation
|
1145
|
+
* }
|
1146
|
+
*
|
1147
|
+
* // Valid usage
|
1148
|
+
* const validInput = {
|
1149
|
+
* users: {
|
1150
|
+
* sdk: { getUser: () => Promise.resolve({}) },
|
1151
|
+
* fetch: { get: (path: string) => fetch(path) },
|
1152
|
+
* basePath: '/api/users'
|
1153
|
+
* }
|
1154
|
+
* } satisfies ValidSdkClientInput<UnpackSdkClientInput<typeof validInput>>;
|
1155
|
+
* ```
|
1156
|
+
*/
|
1157
|
+
type ValidSdkClientInput<Input extends Record<string, {
|
1158
|
+
sdk: unknown;
|
1159
|
+
fetch: unknown;
|
969
1160
|
sdkName?: string;
|
970
|
-
|
971
|
-
}
|
972
|
-
fetch: UnionedFetchMap<Routers> extends infer MergedFetchMap ? FetchFunction<MergedFetchMap> : never;
|
973
|
-
sdk: UnionToIntersectionChildren<{
|
974
|
-
[K in Routers[number] as PrettyCamelCase<K extends (...args: never[]) => {
|
975
|
-
sdkName?: infer SdkName;
|
976
|
-
basePath: infer BasePath;
|
977
|
-
} ? string extends SdkName ? BasePath : SdkName : K extends {
|
978
|
-
sdkName?: infer SdkName;
|
979
|
-
basePath: infer BasePath;
|
980
|
-
} ? string extends SdkName ? BasePath : SdkName : never>]: K extends (...args: never[]) => {
|
981
|
-
sdk: infer Sdk;
|
982
|
-
} ? Prettify<Sdk> : K extends {
|
983
|
-
sdk: infer Sdk;
|
984
|
-
} ? Prettify<Sdk> : never;
|
985
|
-
}>;
|
986
|
-
};
|
1161
|
+
basePath: string;
|
1162
|
+
}>> = Input;
|
987
1163
|
|
988
1164
|
/**
|
989
1165
|
* A class that represents an Express-like router.
|
@@ -1447,4 +1623,4 @@ type DocsConfiguration = ({
|
|
1447
1623
|
type: 'swagger';
|
1448
1624
|
};
|
1449
1625
|
|
1450
|
-
export { ATTR_API_NAME, ATTR_CORRELATION_ID, type AuthMethods, type AuthMethodsBase, type BasicAuthMethods, type Body, type BodyObject, type ConstrainedForklaunchRouter, type ContractDetails, type ContractDetailsExpressLikeSchemaHandler, type ContractDetailsOrMiddlewareOrTypedHandler, type DocsConfiguration, type ErrorContainer, type ExpressLikeAuthMapper, type ExpressLikeHandler, type ExpressLikeRouter, type ExpressLikeSchemaAuthMapper, type ExpressLikeSchemaHandler, type ExpressLikeTypedHandler, type ExtractBody, type ExtractContentType, type ExtractResponseBody, type ExtractedParamsObject, type FetchFunction, type FileBody, type ForklaunchBaseRequest, ForklaunchExpressLikeApplication, ForklaunchExpressLikeRouter, type ForklaunchNextFunction, type ForklaunchRequest, type ForklaunchResErrors, type ForklaunchResHeaders, type ForklaunchResponse, type ForklaunchRoute, type ForklaunchRouter, type ForklaunchSendableData, type ForklaunchStatusResponse, HTTPStatuses, type HeadersObject, type HttpContractDetails, type HttpMethod, type JsonBody, type JwtAuthMethods, type LiveSdkFunction, type LiveTypeFunction, type LiveTypeFunctionRequestInit, type LiveTypeRouteDefinition, type LogFn, type LoggerMeta, type MapParamsSchema, type MapReqBodySchema, type MapReqHeadersSchema, type MapReqQuerySchema, type MapResBodyMapSchema, type MapResHeadersSchema, type MapSchema, type Method, type MetricType, type MetricsDefinition, type MiddlewareContractDetails, type MiddlewareOrMiddlewareWithTypedHandler, type MultipartForm, type NestableRouterBasedHandler, type NumberOnlyObject, OpenTelemetryCollector, type ParamsDictionary, type ParamsObject, type PathBasedHandler, type PathMatch, type PathOrMiddlewareBasedHandler, type PathParamHttpContractDetails, type PathParamMethod, type QueryObject, type RawTypedResponseBody, type RequestContext, type ResolvedForklaunchAuthRequest, type ResolvedForklaunchRequest, type ResponseBody, type ResponseCompiledSchema, type ResponseShape, type ResponsesObject, type SchemaAuthMethods, type SdkClient, type ServerSentEventBody, type StatusCode, type StringOnlyObject, type TelemetryOptions, type TextBody, type TypedBody, type TypedHandler, type TypedMiddlewareDefinition, type TypedNestableMiddlewareDefinition, type TypedResponseBody, type
|
1626
|
+
export { ATTR_API_NAME, ATTR_CORRELATION_ID, type AuthMethods, type AuthMethodsBase, type BasicAuthMethods, type Body, type BodyObject, type ConstrainedForklaunchRouter, type ContractDetails, type ContractDetailsExpressLikeSchemaHandler, type ContractDetailsOrMiddlewareOrTypedHandler, type DocsConfiguration, type ErrorContainer, type ExpressLikeAuthMapper, type ExpressLikeHandler, type ExpressLikeRouter, type ExpressLikeSchemaAuthMapper, type ExpressLikeSchemaHandler, type ExpressLikeTypedHandler, type ExtractBody, type ExtractContentType, type ExtractResponseBody, type ExtractedParamsObject, type FetchFunction, type FileBody, type ForklaunchBaseRequest, ForklaunchExpressLikeApplication, ForklaunchExpressLikeRouter, type ForklaunchNextFunction, type ForklaunchRequest, type ForklaunchResErrors, type ForklaunchResHeaders, type ForklaunchResponse, type ForklaunchRoute, type ForklaunchRouter, type ForklaunchSendableData, type ForklaunchStatusResponse, HTTPStatuses, type HeadersObject, type HttpContractDetails, type HttpMethod, type JsonBody, type JwtAuthMethods, type LiveSdkFunction, type LiveTypeFunction, type LiveTypeFunctionRequestInit, type LiveTypeRouteDefinition, type LogFn, type LoggerMeta, type MapParamsSchema, type MapReqBodySchema, type MapReqHeadersSchema, type MapReqQuerySchema, type MapResBodyMapSchema, type MapResHeadersSchema, type MapSchema, type Method, type MetricType, type MetricsDefinition, type MiddlewareContractDetails, type MiddlewareOrMiddlewareWithTypedHandler, type MultipartForm, type NestableRouterBasedHandler, type NumberOnlyObject, OpenTelemetryCollector, type ParamsDictionary, type ParamsObject, type PathBasedHandler, type PathMatch, type PathOrMiddlewareBasedHandler, type PathParamHttpContractDetails, type PathParamMethod, type QueryObject, type RawTypedResponseBody, type RequestContext, type ResolvedForklaunchAuthRequest, type ResolvedForklaunchRequest, type ResponseBody, type ResponseCompiledSchema, type ResponseShape, type ResponsesObject, type SchemaAuthMethods, type SdkClient, type SdkRouter, type ServerSentEventBody, type StatusCode, type StringOnlyObject, type TelemetryOptions, type TextBody, type TypedBody, type TypedHandler, type TypedMiddlewareDefinition, type TypedNestableMiddlewareDefinition, type TypedResponseBody, type UnknownBody, type UnknownResponseBody, type UnpackSdkClientInput, type UrlEncodedForm, type ValidSdkClientInput, delete_, discriminateBody, discriminateResponseBodies, enrichExpressLikeSend, evaluateTelemetryOptions, generateMcpServer, generateSwaggerDocument, get, getCodeForStatus, head, httpRequestsTotalCounter, httpServerDurationHistogram, isClientError, isForklaunchRequest, isForklaunchRouter, isInformational, isRedirection, isServerError, isSuccessful, isValidStatusCode, logger, meta, metricsDefinitions, middleware, options, patch, post, put, recordMetric, trace, typedAuthHandler, typedHandler };
|