@epilot/email-settings-client 0.0.5 → 0.1.0

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/client.d.ts CHANGED
@@ -1,2 +1,3 @@
1
1
  import { Client } from './openapi';
2
2
  export declare const getClient: () => Client;
3
+ export declare const createClient: () => Client;
package/dist/client.js CHANGED
@@ -14,16 +14,24 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
14
14
  return (mod && mod.__esModule) ? mod : { "default": mod };
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- exports.getClient = void 0;
17
+ exports.createClient = exports.getClient = void 0;
18
18
  var lambda_powertools_correlation_ids_1 = __importDefault(require("@dazn/lambda-powertools-correlation-ids"));
19
19
  var openapi_client_axios_1 = __importDefault(require("openapi-client-axios"));
20
20
  var definition_1 = __importDefault(require("./definition"));
21
+ var client;
21
22
  var getClient = function () {
23
+ if (!client) {
24
+ client = (0, exports.createClient)();
25
+ }
26
+ return client;
27
+ };
28
+ exports.getClient = getClient;
29
+ var createClient = function () {
22
30
  var _a;
23
31
  var api = new openapi_client_axios_1.default({ definition: definition_1.default, quick: true });
24
32
  var apiClient = api.initSync();
25
33
  apiClient.defaults.headers.common = __assign(__assign({}, ((_a = apiClient.defaults.headers.common) !== null && _a !== void 0 ? _a : {})), (lambda_powertools_correlation_ids_1.default.get() || {}));
26
34
  return apiClient;
27
35
  };
28
- exports.getClient = getClient;
36
+ exports.createClient = createClient;
29
37
  //# sourceMappingURL=client.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@epilot/email-settings-client",
3
- "version": "0.0.5",
3
+ "version": "0.1.0",
4
4
  "description": "API Client for epilot Email Settings API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -49,7 +49,7 @@
49
49
  "@dazn/lambda-powertools-correlation-ids": "^1.28.1",
50
50
  "buffer": "^6.0.3",
51
51
  "https-browserify": "^1.0.0",
52
- "openapi-client-axios": "^5.3.0",
52
+ "openapi-client-axios": "^6.0.0",
53
53
  "stream-http": "^3.1.1",
54
54
  "url": "^0.11.0",
55
55
  "util": "^0.12.3"
@@ -60,7 +60,7 @@
60
60
  "copy-webpack-plugin": "^7.0.0",
61
61
  "jest": "^26.6.3",
62
62
  "json-loader": "^0.5.7",
63
- "openapi-client-axios-typegen": "^5.0.1",
63
+ "openapi-client-axios-typegen": "^6.0.0",
64
64
  "openapicmd": "^1.6.2",
65
65
  "ts-jest": "^26.5.0",
66
66
  "ts-loader": "^8.0.14",
@@ -69,5 +69,5 @@
69
69
  "webpack": "~5.18.0",
70
70
  "webpack-cli": "^4.4.0"
71
71
  },
72
- "gitHead": "1cd202255ce447f3167d54b2589f6a90386850cb"
72
+ "gitHead": "d41cf7334964ffb68c562b531d6cf3c286367f76"
73
73
  }