@smartspace/api-client 0.1.0-pr.1364.b893a9f → 0.1.0-pr.1365.7093162

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.
@@ -1,4 +1,4 @@
1
1
  import { AxiosRequestConfig, AxiosResponse } from 'axios';
2
2
  export declare const AXIOS_INSTANCE: import("axios").AxiosInstance;
3
- export declare const customInstance: <T>(config: AxiosRequestConfig) => Promise<AxiosResponse<T>>;
3
+ export declare const customInstance: <T>(config: AxiosRequestConfig, options?: AxiosRequestConfig) => Promise<AxiosResponse<T>>;
4
4
  export default customInstance;
package/dist/instance.js CHANGED
@@ -6,8 +6,16 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.customInstance = exports.AXIOS_INSTANCE = void 0;
7
7
  const axios_1 = __importDefault(require("axios"));
8
8
  exports.AXIOS_INSTANCE = axios_1.default.create();
9
- const customInstance = (config) => {
10
- return (0, exports.AXIOS_INSTANCE)(config);
9
+ // The second parameter is what makes orval give every generated method a trailing
10
+ // `options?: AxiosRequestConfig`. A caller passes it for what the spec cannot say: a blob or
11
+ // text `responseType`, an abort `signal`, or `adapter: 'fetch'` with `responseType: 'stream'`
12
+ // to read an event stream. Options win over the generated config, except that headers merge.
13
+ const customInstance = (config, options) => {
14
+ return (0, exports.AXIOS_INSTANCE)({
15
+ ...config,
16
+ ...options,
17
+ headers: { ...config.headers, ...options?.headers },
18
+ });
11
19
  };
12
20
  exports.customInstance = customInstance;
13
21
  exports.default = exports.customInstance;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smartspace/api-client",
3
- "version": "0.1.0-pr.1364.b893a9f",
3
+ "version": "0.1.0-pr.1365.7093162",
4
4
  "description": "Generated TypeScript client for SmartSpace APIs",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -19,7 +19,7 @@
19
19
  ],
20
20
  "scripts": {
21
21
  "generate": "npm run generate:rest && npm run generate:signalr",
22
- "generate:rest": "node ./scripts/sse-frames-zod-input.js && orval --config orval.config.ts &&node ./scripts/extensible-enums.js && node ./scripts/change-tags.js && node ./scripts/operation-tags.js",
22
+ "generate:rest": "node ./scripts/sse-frames-zod-input.js && orval --config orval.config.ts && node ./scripts/request-options.js && node ./scripts/extensible-enums.js && node ./scripts/change-tags.js && node ./scripts/operation-tags.js",
23
23
  "generate:signalr": "dotnet tsrts --project ../../SmartSpace.App.Business/SmartSpace.App.Business.csproj --output src/generated/signalr --asm --enum Name",
24
24
  "build": "tsc",
25
25
  "prepublishOnly": "npm run generate && npm run build"
@@ -53,5 +53,5 @@
53
53
  "url": "https://github.com/Smartspace-ai/Smartspace-app-api.git",
54
54
  "directory": "tools/sdk-package"
55
55
  },
56
- "smartspaceContentHash": "5c610beed12dcc68061d5382c9377467928f00352c47f99114b1c00ae7cdf050"
56
+ "smartspaceContentHash": "365a5ef97edb429edea00e4662765c7fdf8555336314e6370af4ba1a2117f36b"
57
57
  }