@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.
- package/dist/src/comm.d.ts +2 -1
- package/dist/src/comm.js +3 -2
- package/package.json +1 -1
- package/src/comm.ts +1 -1
package/dist/src/comm.d.ts
CHANGED
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
|
|
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
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
|
|
7
|
+
export const preMiddleware: Middleware["pre"] = (context: RequestContext) => {
|
|
8
8
|
return Promise.resolve({
|
|
9
9
|
url: context.url,
|
|
10
10
|
init: {
|