@openapi-io-ts/runtime
Advanced tools
Comparing version 0.0.0-20220129001739 to 0.0.0-20220129093010
@@ -244,4 +244,5 @@ var __defProp = Object.defineProperty; | ||
// src/client/request.ts | ||
var requestFunctionBuilder = (operation, requestAdapter) => (args) => { | ||
var requestFunctionBuilder = (operation, requestAdapter) => (...params) => { | ||
var _a; | ||
const [args] = params; | ||
return pipe3(prepareRequest(operation, (_a = args == null ? void 0 : args.params) != null ? _a : {}, args == null ? void 0 : args.body), TE3.chain(({ url, init }) => performRequest(url, init, requestAdapter)), TE3.chain((response) => parseResponse(response, operation.responses))); | ||
@@ -248,0 +249,0 @@ }; |
@@ -89,9 +89,9 @@ import * as t from 'io-ts'; | ||
interface RequestFunctionArgs { | ||
declare type RequestFunctionArgs = { | ||
params?: Record<string, unknown>; | ||
body?: unknown; | ||
} | ||
declare type RequestFunction<Args extends RequestFunctionArgs, ReturnType> = (args?: Args) => TE.TaskEither<ApiError, ApiResponse<ReturnType>>; | ||
} | undefined; | ||
declare type RequestFunction<Args extends RequestFunctionArgs, ReturnType> = (...params: undefined extends Args ? [args?: Args] : [args: Args]) => TE.TaskEither<ApiError, ApiResponse<ReturnType>>; | ||
declare const requestFunctionBuilder: <Args extends RequestFunctionArgs, ReturnType_1>(operation: Operation, requestAdapter: HttpRequestAdapter) => RequestFunction<Args, ReturnType_1>; | ||
export { ApiError, ApiResponse, BaseParameter, BinaryBody, ContentParseError, DecodeError, EmptyResponse, FileResponse, FormBody, FormParameter, HttpError, HttpRequestAdapter, JsonBody, JsonParameter, JsonResponse, MultipartBody, Operation, OperationBody, OperationParameter, OperationResponse, OperationResponseType, OperationResponses, RequestError, RequestFunction, RequestFunctionArgs, TextBody, contentParseError, decodeError, httpError, requestError, requestFunctionBuilder }; |
@@ -279,4 +279,5 @@ var __create = Object.create; | ||
// src/client/request.ts | ||
var requestFunctionBuilder = (operation, requestAdapter) => (args) => { | ||
var requestFunctionBuilder = (operation, requestAdapter) => (...params) => { | ||
var _a; | ||
const [args] = params; | ||
return (0, import_function3.pipe)(prepareRequest(operation, (_a = args == null ? void 0 : args.params) != null ? _a : {}, args == null ? void 0 : args.body), TE3.chain(({ url, init }) => performRequest(url, init, requestAdapter)), TE3.chain((response) => parseResponse(response, operation.responses))); | ||
@@ -283,0 +284,0 @@ }; |
{ | ||
"name": "@openapi-io-ts/runtime", | ||
"version": "0.0.0-20220129001739", | ||
"version": "0.0.0-20220129093010", | ||
"description": "Runtime for openapi-io-ts", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
59217
633