@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/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
  }