@nexgencloud/hyperstack-sdk-typescript 1.55.1-alpha → 1.55.6-alpha
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/README.md +2 -2
- package/api.ts +109 -1697
- package/common.ts +2 -2
- package/dist/api.d.ts +66 -1039
- package/dist/api.js +3100 -4191
- package/dist/common.js +2 -0
- package/dist/esm/api.d.ts +66 -1039
- package/dist/esm/api.js +2983 -4062
- package/dist/esm/common.js +2 -0
- package/dist/esm/hyperstackHeaders.d.ts +24 -0
- package/dist/esm/hyperstackHeaders.js +68 -0
- package/dist/hyperstackHeaders.d.ts +24 -0
- package/dist/hyperstackHeaders.js +72 -0
- package/hyperstackHeaders.ts +78 -0
- package/package.json +1 -1
package/common.ts
CHANGED
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
import type { Configuration } from "./configuration";
|
|
17
17
|
import type { RequestArgs } from "./base";
|
|
18
18
|
import type { AxiosInstance, AxiosResponse } from 'axios';
|
|
19
|
-
import { RequiredError } from "./base";
|
|
19
|
+
import { RequiredError } from "./base"; import { applyHyperstackHeaders } from "./hyperstackHeaders";
|
|
20
20
|
|
|
21
21
|
/**
|
|
22
22
|
*
|
|
@@ -144,7 +144,7 @@ export const toPathString = function (url: URL) {
|
|
|
144
144
|
*/
|
|
145
145
|
export const createRequestFunction = function (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration) {
|
|
146
146
|
return <T = unknown, R = AxiosResponse<T>>(axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH): Promise<R> => {
|
|
147
|
-
const axiosRequestArgs = {...axiosArgs.options, url: (axios.defaults.baseURL ? '' : configuration?.basePath ?? basePath) + axiosArgs.url};
|
|
147
|
+
const axiosRequestArgs = {...axiosArgs.options, url: (axios.defaults.baseURL ? '' : configuration?.basePath ?? basePath) + axiosArgs.url}; applyHyperstackHeaders(axiosRequestArgs);
|
|
148
148
|
return axios.request<T, R>(axiosRequestArgs) as Promise<R>;
|
|
149
149
|
};
|
|
150
150
|
}
|