@kommerz/ts-client 1.138.2 → 1.138.4

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,2 +1,3 @@
1
- import { Configuration } from "../runtime";
1
+ import { Configuration, Middleware } from "../runtime";
2
2
  export declare const backendConfig: Configuration;
3
+ export declare const preMiddleware: Middleware["pre"];
package/dist/src/comm.js CHANGED
@@ -11,15 +11,16 @@ var __assign = (this && this.__assign) || function () {
11
11
  return __assign.apply(this, arguments);
12
12
  };
13
13
  Object.defineProperty(exports, "__esModule", { value: true });
14
- exports.backendConfig = void 0;
14
+ exports.preMiddleware = exports.backendConfig = void 0;
15
15
  var runtime_1 = require("../runtime");
16
16
  exports.backendConfig = new runtime_1.Configuration({
17
17
  basePath: "https://my.kommerz.app/api",
18
18
  });
19
- var mw = function (context) {
19
+ var preMiddleware = function (context) {
20
20
  var _a;
21
21
  return Promise.resolve({
22
22
  url: context.url,
23
23
  init: __assign(__assign({}, context.init), { headers: __assign(__assign({}, context.init.headers), { "X-API-Token": (_a = Deno.env.get("ACCESS_TOKEN")) !== null && _a !== void 0 ? _a : "" }) }),
24
24
  });
25
25
  };
26
+ exports.preMiddleware = preMiddleware;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kommerz/ts-client",
3
- "version": "1.138.2",
3
+ "version": "1.138.4",
4
4
  "description": "Typescript client for Kommerz API",
5
5
  "author": "Kommerz.App",
6
6
  "license": "MIT",
package/src/comm.ts CHANGED
@@ -4,7 +4,7 @@ export const backendConfig = new Configuration({
4
4
  basePath: "https://my.kommerz.app/api",
5
5
  });
6
6
 
7
- const mw: Middleware["pre"] = (context: RequestContext) => {
7
+ export const preMiddleware: Middleware["pre"] = (context: RequestContext) => {
8
8
  return Promise.resolve({
9
9
  url: context.url,
10
10
  init: {