@@ -4154,7 +4154,7 @@ var templateCoreApiError = {"compiler":[8,">= 4.3.0"],"main":function(container,
4154
4154
} ;
4155
4155
4156
4156
return ( ( stack1 = container . invokePartial ( lookupProperty ( partials , "header" ) , depth0 , { "name" :"header" , "data" :data , "helpers" :helpers , "partials" :partials , "decorators" :container . decorators } ) ) != null ? stack1 : "" )
4157
- + "\nimport type { ApiRequestOptions } from './ApiRequestOptions';\nimport type { ApiResult } from './ApiResult';\n\nexport class ApiError extends Error {\n public readonly url: string;\n public readonly status: number;\n public readonly statusText: string;\n public readonly body: any;\n public readonly request: ApiRequestOptions;\n\n constructor(request: ApiRequestOptions, response: ApiResult, message: string) {\n super(message);\n\n this.name = 'ApiError';\n this.url = response.url;\n this.status = response.status;\n this.statusText = response.statusText;\n this.body = response.body;\n this.request = request;\n }\n}" ;
4157
+ + "\nimport type { ApiRequestOptions } from './ApiRequestOptions';\nimport type { ApiResult } from './ApiResult';\n\nexport class ApiError extends Error {\n public readonly url: string;\n public readonly status: number;\n public readonly statusText: string;\n public readonly body: any;\n public readonly request: ApiRequestOptions;\n public readonly response: ApiResult['response'];\n\n constructor(request: ApiRequestOptions, response: ApiResult, message: string) {\n super(message);\n\n this.name = 'ApiError';\n this.url = response.url;\n this.status = response.status;\n this.statusText = response.statusText;\n this.body = response.body;\n this.request = request;\n this.response = response ;\n }\n}" ;
4158
4158
} , "usePartial" :true , "useData" :true } ;
4159
4159
4160
4160
var templateCoreApiRequestOptions = { "compiler" :[ 8 , ">= 4.3.0" ] , "main" :function ( container , depth0 , helpers , partials , data ) {
@@ -4178,7 +4178,7 @@ var templateCoreApiResult = {"compiler":[8,">= 4.3.0"],"main":function(container
4178
4178
} ;
4179
4179
4180
4180
return ( ( stack1 = container . invokePartial ( lookupProperty ( partials , "header" ) , depth0 , { "name" :"header" , "data" :data , "helpers" :helpers , "partials" :partials , "decorators" :container . decorators } ) ) != null ? stack1 : "" )
4181
- + "\nexport type ApiResult = {\n readonly url: string;\n readonly ok: boolean;\n readonly status: number;\n readonly statusText: string;\n readonly body: any;\n};" ;
4181
+ + "\nexport type ApiResult = {\n readonly url: string;\n readonly ok: boolean;\n readonly status: number;\n readonly statusText: string;\n readonly body: any;\n readonly response: AxiosResponse<any, any>;\n };" ;
4182
4182
} , "usePartial" :true , "useData" :true } ;
4183
4183
4184
4184
var axiosGetHeaders = { "compiler" :[ 8 , ">= 4.3.0" ] , "main" :function ( container , depth0 , helpers , partials , data ) {
@@ -4240,7 +4240,7 @@ var axiosRequest = {"compiler":[8,">= 4.3.0"],"main":function(container,depth0,h
4240
4240
+ ( ( stack1 = container . invokePartial ( lookupProperty ( partials , "axios/getResponseBody" ) , depth0 , { "name" :"axios/getResponseBody" , "data" :data , "helpers" :helpers , "partials" :partials , "decorators" :container . decorators } ) ) != null ? stack1 : "" )
4241
4241
+ "\n\n"
4242
4242
+ ( ( stack1 = container . invokePartial ( lookupProperty ( partials , "functions/catchErrorCodes" ) , depth0 , { "name" :"functions/catchErrorCodes" , "data" :data , "helpers" :helpers , "partials" :partials , "decorators" :container . decorators } ) ) != null ? stack1 : "" )
4243
- + "\n\n/**\n * Request method\n * @param config The OpenAPI configuration object\n * @param options The request options from the service\n * @returns CancelablePromise<T>\n * @throws ApiError\n */\nexport const request = <T>(config: OpenAPIConfig, options: ApiRequestOptions): CancelablePromise<T> => {\n return new CancelablePromise(async (resolve, reject, onCancel) => {\n try {\n const url = getUrl(config, options);\n const formData = getFormData(options);\n const body = getRequestBody(options);\n const headers = await getHeaders(config, options, formData);\n\n if (!onCancel.isCancelled) {\n const response = await sendRequest<T>(config, options, url, body, formData, headers, onCancel);\n const responseBody = getResponseBody(response);\n const responseHeader = getResponseHeader(response, options.responseHeader);\n\n const result: ApiResult = {\n url,\n ok: isSuccess(response.status),\n status: response.status,\n statusText: response.statusText,\n body: responseHeader ?? responseBody,\n };\n\n catchErrorCodes(options, result);\n\n resolve(result.body);\n }\n } catch (error) {\n reject(error);\n }\n });\n};" ;
4243
+ + "\n\n/**\n * Request method\n * @param config The OpenAPI configuration object\n * @param options The request options from the service\n * @returns CancelablePromise<T>\n * @throws ApiError\n */\nexport const request = <T>(config: OpenAPIConfig, options: ApiRequestOptions): CancelablePromise<T> => {\n return new CancelablePromise(async (resolve, reject, onCancel) => {\n try {\n const url = getUrl(config, options);\n const formData = getFormData(options);\n const body = getRequestBody(options);\n const headers = await getHeaders(config, options, formData);\n\n if (!onCancel.isCancelled) {\n const response = await sendRequest<T>(config, options, url, body, formData, headers, onCancel);\n const responseBody = getResponseBody(response);\n const responseHeader = getResponseHeader(response, options.responseHeader);\n\n const result: ApiResult = {\n url,\n ok: isSuccess(response.status),\n status: response.status,\n statusText: response.statusText,\n body: responseHeader ?? responseBody,\n response: response,\n };\n\n catchErrorCodes(options, result);\n\n resolve(result.body);\n }\n } catch (error) {\n reject(error);\n }\n });\n};" ;
4244
4244
} , "usePartial" :true , "useData" :true } ;
4245
4245
4246
4246
var axiosSendRequest = { "compiler" :[ 8 , ">= 4.3.0" ] , "main" :function ( container , depth0 , helpers , partials , data ) {
@@ -4346,7 +4346,7 @@ var fetchRequest = {"compiler":[8,">= 4.3.0"],"main":function(container,depth0,h
4346
4346
+ ( ( stack1 = container . invokePartial ( lookupProperty ( partials , "fetch/getResponseBody" ) , depth0 , { "name" :"fetch/getResponseBody" , "data" :data , "helpers" :helpers , "partials" :partials , "decorators" :container . decorators } ) ) != null ? stack1 : "" )
4347
4347
+ "\n\n"
4348
4348
+ ( ( stack1 = container . invokePartial ( lookupProperty ( partials , "functions/catchErrorCodes" ) , depth0 , { "name" :"functions/catchErrorCodes" , "data" :data , "helpers" :helpers , "partials" :partials , "decorators" :container . decorators } ) ) != null ? stack1 : "" )
4349
- + "\n\n/**\n * Request method\n * @param config The OpenAPI configuration object\n * @param options The request options from the service\n * @returns CancelablePromise<T>\n * @throws ApiError\n */\nexport const request = <T>(config: OpenAPIConfig, options: ApiRequestOptions): CancelablePromise<T> => {\n return new CancelablePromise(async (resolve, reject, onCancel) => {\n try {\n const url = getUrl(config, options);\n const formData = getFormData(options);\n const body = getRequestBody(options);\n const headers = await getHeaders(config, options);\n\n if (!onCancel.isCancelled) {\n const response = await sendRequest(config, options, url, body, formData, headers, onCancel);\n const responseBody = await getResponseBody(response);\n const responseHeader = getResponseHeader(response, options.responseHeader);\n\n const result: ApiResult = {\n url,\n ok: response.ok,\n status: response.status,\n statusText: response.statusText,\n body: responseHeader ?? responseBody,\n };\n\n catchErrorCodes(options, result);\n\n resolve(result.body);\n }\n } catch (error) {\n reject(error);\n }\n });\n};" ;
4349
+ + "\n\n/**\n * Request method\n * @param config The OpenAPI configuration object\n * @param options The request options from the service\n * @returns CancelablePromise<T>\n * @throws ApiError\n */\nexport const request = <T>(config: OpenAPIConfig, options: ApiRequestOptions): CancelablePromise<T> => {\n return new CancelablePromise(async (resolve, reject, onCancel) => {\n try {\n const url = getUrl(config, options);\n const formData = getFormData(options);\n const body = getRequestBody(options);\n const headers = await getHeaders(config, options);\n\n if (!onCancel.isCancelled) {\n const response = await sendRequest(config, options, url, body, formData, headers, onCancel);\n const responseBody = await getResponseBody(response);\n const responseHeader = getResponseHeader(response, options.responseHeader);\n\n const result: ApiResult = {\n url,\n ok: response.ok,\n status: response.status,\n statusText: response.statusText,\n body: responseHeader ?? responseBody,\n response: response,\n };\n\n catchErrorCodes(options, result);\n\n resolve(result.body);\n }\n } catch (error) {\n reject(error);\n }\n });\n};" ;
4350
4350
} , "usePartial" :true , "useData" :true } ;
4351
4351
4352
4352
var fetchSendRequest = { "compiler" :[ 8 , ">= 4.3.0" ] , "main" :function ( container , depth0 , helpers , partials , data ) {
@@ -4494,7 +4494,7 @@ var nodeRequest = {"compiler":[8,">= 4.3.0"],"main":function(container,depth0,he
4494
4494
+ ( ( stack1 = container . invokePartial ( lookupProperty ( partials , "node/getResponseBody" ) , depth0 , { "name" :"node/getResponseBody" , "data" :data , "helpers" :helpers , "partials" :partials , "decorators" :container . decorators } ) ) != null ? stack1 : "" )
4495
4495
+ "\n\n"
4496
4496
+ ( ( stack1 = container . invokePartial ( lookupProperty ( partials , "functions/catchErrorCodes" ) , depth0 , { "name" :"functions/catchErrorCodes" , "data" :data , "helpers" :helpers , "partials" :partials , "decorators" :container . decorators } ) ) != null ? stack1 : "" )
4497
- + "\n\n/**\n * Request method\n * @param config The OpenAPI configuration object\n * @param options The request options from the service\n * @returns CancelablePromise<T>\n * @throws ApiError\n */\nexport const request = <T>(config: OpenAPIConfig, options: ApiRequestOptions): CancelablePromise<T> => {\n return new CancelablePromise(async (resolve, reject, onCancel) => {\n try {\n const url = getUrl(config, options);\n const formData = getFormData(options);\n const body = getRequestBody(options);\n const headers = await getHeaders(config, options);\n\n if (!onCancel.isCancelled) {\n const response = await sendRequest(options, url, body, formData, headers, onCancel);\n const responseBody = await getResponseBody(response);\n const responseHeader = getResponseHeader(response, options.responseHeader);\n\n const result: ApiResult = {\n url,\n ok: response.ok,\n status: response.status,\n statusText: response.statusText,\n body: responseHeader ?? responseBody,\n };\n\n catchErrorCodes(options, result);\n\n resolve(result.body);\n }\n } catch (error) {\n reject(error);\n }\n });\n};" ;
4497
+ + "\n\n/**\n * Request method\n * @param config The OpenAPI configuration object\n * @param options The request options from the service\n * @returns CancelablePromise<T>\n * @throws ApiError\n */\nexport const request = <T>(config: OpenAPIConfig, options: ApiRequestOptions): CancelablePromise<T> => {\n return new CancelablePromise(async (resolve, reject, onCancel) => {\n try {\n const url = getUrl(config, options);\n const formData = getFormData(options);\n const body = getRequestBody(options);\n const headers = await getHeaders(config, options);\n\n if (!onCancel.isCancelled) {\n const response = await sendRequest(options, url, body, formData, headers, onCancel);\n const responseBody = await getResponseBody(response);\n const responseHeader = getResponseHeader(response, options.responseHeader);\n\n const result: ApiResult = {\n url,\n ok: response.ok,\n status: response.status,\n statusText: response.statusText,\n body: responseHeader ?? responseBody,\n response: response,\n };\n\n catchErrorCodes(options, result);\n\n resolve(result.body);\n }\n } catch (error) {\n reject(error);\n }\n });\n};" ;
4498
4498
} , "usePartial" :true , "useData" :true } ;
4499
4499
4500
4500
var nodeSendRequest = { "compiler" :[ 8 , ">= 4.3.0" ] , "main" :function ( container , depth0 , helpers , partials , data ) {
@@ -4636,7 +4636,7 @@ var xhrRequest = {"compiler":[8,">= 4.3.0"],"main":function(container,depth0,hel
4636
4636
+ ( ( stack1 = container . invokePartial ( lookupProperty ( partials , "xhr/getResponseBody" ) , depth0 , { "name" :"xhr/getResponseBody" , "data" :data , "helpers" :helpers , "partials" :partials , "decorators" :container . decorators } ) ) != null ? stack1 : "" )
4637
4637
+ "\n\n"
4638
4638
+ ( ( stack1 = container . invokePartial ( lookupProperty ( partials , "functions/catchErrorCodes" ) , depth0 , { "name" :"functions/catchErrorCodes" , "data" :data , "helpers" :helpers , "partials" :partials , "decorators" :container . decorators } ) ) != null ? stack1 : "" )
4639
- + "\n\n/**\n * Request method\n * @param config The OpenAPI configuration object\n * @param options The request options from the service\n * @returns CancelablePromise<T>\n * @throws ApiError\n */\nexport const request = <T>(config: OpenAPIConfig, options: ApiRequestOptions): CancelablePromise<T> => {\n return new CancelablePromise(async (resolve, reject, onCancel) => {\n try {\n const url = getUrl(config, options);\n const formData = getFormData(options);\n const body = getRequestBody(options);\n const headers = await getHeaders(config, options);\n\n if (!onCancel.isCancelled) {\n const response = await sendRequest(config, options, url, body, formData, headers, onCancel);\n const responseBody = getResponseBody(response);\n const responseHeader = getResponseHeader(response, options.responseHeader);\n\n const result: ApiResult = {\n url,\n ok: isSuccess(response.status),\n status: response.status,\n statusText: response.statusText,\n body: responseHeader ?? responseBody,\n };\n\n catchErrorCodes(options, result);\n\n resolve(result.body);\n }\n } catch (error) {\n reject(error);\n }\n });\n};" ;
4639
+ + "\n\n/**\n * Request method\n * @param config The OpenAPI configuration object\n * @param options The request options from the service\n * @returns CancelablePromise<T>\n * @throws ApiError\n */\nexport const request = <T>(config: OpenAPIConfig, options: ApiRequestOptions): CancelablePromise<T> => {\n return new CancelablePromise(async (resolve, reject, onCancel) => {\n try {\n const url = getUrl(config, options);\n const formData = getFormData(options);\n const body = getRequestBody(options);\n const headers = await getHeaders(config, options);\n\n if (!onCancel.isCancelled) {\n const response = await sendRequest(config, options, url, body, formData, headers, onCancel);\n const responseBody = getResponseBody(response);\n const responseHeader = getResponseHeader(response, options.responseHeader);\n\n const result: ApiResult = {\n url,\n ok: isSuccess(response.status),\n status: response.status,\n statusText: response.statusText,\n body: responseHeader ?? responseBody,\n response: response,\n };\n\n catchErrorCodes(options, result);\n\n resolve(result.body);\n }\n } catch (error) {\n reject(error);\n }\n });\n};" ;
4640
4640
} , "usePartial" :true , "useData" :true } ;
4641
4641
4642
4642
var xhrSendRequest = { "compiler" :[ 8 , ">= 4.3.0" ] , "main" :function ( container , depth0 , helpers , partials , data ) {
0 commit comments