@@ -4203,11 +4203,11 @@ var axiosRequest = {"compiler":[8,">= 4.3.0"],"main":function(container,depth0,h
4203
4203
+ ( ( stack1 = container . invokePartial ( lookupProperty ( partials , "axios/getResponseBody" ) , depth0 , { "name" :"axios/getResponseBody" , "data" :data , "helpers" :helpers , "partials" :partials , "decorators" :container . decorators } ) ) != null ? stack1 : "" )
4204
4204
+ "\n\n"
4205
4205
+ ( ( stack1 = container . invokePartial ( lookupProperty ( partials , "functions/catchErrorCodes" ) , depth0 , { "name" :"functions/catchErrorCodes" , "data" :data , "helpers" :helpers , "partials" :partials , "decorators" :container . decorators } ) ) != null ? stack1 : "" )
4206
- + "\n\n/**\n * Request method\n * @param config The OpenAPI configuration object\n * @param options The request options from the service\n * @param additionalOptions Request-level axios overwrites\n * @returns CancelablePromise<T>\n * @throws ApiError\n */\nexport const request = <T>(config: OpenAPIConfig, options: ApiRequestOptions, additionalOptions: AxiosRequestConfig): 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, additionalOptions);\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};" ;
4206
+ + "\n\n/**\n * Request method\n * @param config The OpenAPI configuration object\n * @param options The request options from the service\n * @param additionalOptions Request-level axios overwrites\n * @returns CancelablePromise<T>\n * @throws ApiError\n */\nexport const request = <T>(config: OpenAPIConfig, options: ApiRequestOptions, additionalOptions: AxiosRequestConfig | undefined): 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, additionalOptions);\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};" ;
4207
4207
} , "usePartial" :true , "useData" :true } ;
4208
4208
4209
4209
var axiosSendRequest = { "compiler" :[ 8 , ">= 4.3.0" ] , "main" :function ( container , depth0 , helpers , partials , data ) {
4210
- return "const sendRequest = async <T>(\n config: OpenAPIConfig,\n options: ApiRequestOptions,\n url: string,\n body: any,\n formData: FormData | undefined,\n headers: Record<string, string>,\n onCancel: OnCancel,\n additionalOptions: AxiosRequestConfig,\n): Promise<AxiosResponse<T>> => {\n const source = axios.CancelToken.source();\n\n const requestConfig: AxiosRequestConfig = {\n url,\n headers,\n data: body ?? formData,\n method: options.method,\n withCredentials: config.WITH_CREDENTIALS,\n cancelToken: source.token,\n ...additionalOptions,\n };\n\n onCancel(() => source.cancel('The user aborted a request.'));\n\n try {\n return await axios.request(requestConfig);\n } catch (error) {\n const axiosError = error as AxiosError<T>;\n if (axiosError.response) {\n return axiosError.response;\n }\n throw error;\n }\n};" ;
4210
+ return "const sendRequest = async <T>(\n config: OpenAPIConfig,\n options: ApiRequestOptions,\n url: string,\n body: any,\n formData: FormData | undefined,\n headers: Record<string, string>,\n onCancel: OnCancel,\n additionalOptions: AxiosRequestConfig | undefined ,\n): Promise<AxiosResponse<T>> => {\n const source = axios.CancelToken.source();\n\n const requestConfig: AxiosRequestConfig = {\n url,\n headers,\n data: body ?? formData,\n method: options.method,\n withCredentials: config.WITH_CREDENTIALS,\n cancelToken: source.token,\n ...( additionalOptions || {}) ,\n };\n\n onCancel(() => source.cancel('The user aborted a request.'));\n\n try {\n return await axios.request(requestConfig);\n } catch (error) {\n const axiosError = error as AxiosError<T>;\n if (axiosError.response) {\n return axiosError.response;\n }\n throw error;\n }\n};" ;
4211
4211
} , "useData" :true } ;
4212
4212
4213
4213
var templateCoreBaseHttpRequest = { "1" :function ( container , depth0 , helpers , partials , data ) {
@@ -4994,7 +4994,7 @@ var templateExportService = {"1":function(container,depth0,helpers,partials,data
4994
4994
+ ( ( stack1 = container . lambda ( container . strict ( depth0 , "name" , { "start" :{ "line" :90 , "column" :18 } , "end" :{ "line" :90 , "column" :22 } } ) , depth0 ) ) != null ? stack1 : "" )
4995
4995
+ "("
4996
4996
+ ( ( stack1 = container . invokePartial ( lookupProperty ( partials , "parameters" ) , depth0 , { "name" :"parameters" , "data" :data , "helpers" :helpers , "partials" :partials , "decorators" :container . decorators } ) ) != null ? stack1 : "" )
4997
- + ", additionalOptions: AxiosRequestConfig): CancelablePromise<"
4997
+ + ", additionalOptions? : AxiosRequestConfig): CancelablePromise<"
4998
4998
+ ( ( stack1 = container . invokePartial ( lookupProperty ( partials , "result" ) , depth0 , { "name" :"result" , "data" :data , "helpers" :helpers , "partials" :partials , "decorators" :container . decorators } ) ) != null ? stack1 : "" )
4999
4999
+ "> {\n return __request(OpenAPI, {\n" ;
5000
5000
} , "52" :function ( container , depth0 , helpers , partials , data ) {
0 commit comments