mts-booking-library 2.3.2 → 2.3.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -102,13 +102,7 @@ var Booking = /** @class */ (function () {
102
102
  * @param {string} access_token The new access token
103
103
  */
104
104
  Booking.prototype.renewAccessToken = function (access_token) {
105
- var newConfig = {
106
- ENV: this.config.ENV,
107
- OCP_SUBSCRIPTION_KEY: this.config.OCP_SUBSCRIPTION_KEY,
108
- DEBUG: this.config.DEBUG,
109
- ACCESS_TOKEN: access_token,
110
- DB_TYPE: this.config.DB_TYPE
111
- };
105
+ var newConfig = __assign(__assign({}, (0, config_1.getConfig)()), { ACCESS_TOKEN: access_token });
112
106
  (0, config_1.setConfig)(newConfig);
113
107
  };
114
108
  Booking.prototype.callGetApi = function (url, options) {
package/lib/config.d.ts CHANGED
@@ -8,12 +8,12 @@ export type MTSConfig = {
8
8
  ENV: MTSEnvs;
9
9
  API_ENDPOINT: string;
10
10
  OCP_SUBSCRIPTION_KEY: string;
11
- ACCESS_TOKEN: string | undefined;
12
11
  DEBUG: boolean;
13
- APP_VERSION?: string;
14
- OS?: string;
15
- DB_TYPE?: string | undefined;
16
- SESSION_ID?: number | undefined;
12
+ ACCESS_TOKEN: string | undefined;
13
+ APP_VERSION: string | undefined;
14
+ OS: string | undefined;
15
+ DB_TYPE: string | undefined;
16
+ SESSION_ID: number | undefined;
17
17
  };
18
18
  export declare const setConfig: ({ ENV, OCP_SUBSCRIPTION_KEY, DEBUG, ACCESS_TOKEN, APP_VERSION, OS, DB_TYPE, SESSION_ID }: Omit<MTSConfig, "API_ENDPOINT">) => MTSConfig;
19
19
  export declare const getConfig: () => MTSConfig;
package/lib/config.js CHANGED
@@ -12,8 +12,12 @@ var config = {
12
12
  ENV: MTSEnvs.PROD,
13
13
  API_ENDPOINT: "https://prod-myticketsolutionapim.azure-api.net/api",
14
14
  OCP_SUBSCRIPTION_KEY: "",
15
+ DEBUG: false,
15
16
  ACCESS_TOKEN: undefined,
16
- DEBUG: false
17
+ APP_VERSION: undefined,
18
+ OS: undefined,
19
+ DB_TYPE: undefined,
20
+ SESSION_ID: undefined
17
21
  };
18
22
  var setConfig = function (_a) {
19
23
  var ENV = _a.ENV, OCP_SUBSCRIPTION_KEY = _a.OCP_SUBSCRIPTION_KEY, DEBUG = _a.DEBUG, ACCESS_TOKEN = _a.ACCESS_TOKEN, APP_VERSION = _a.APP_VERSION, OS = _a.OS, DB_TYPE = _a.DB_TYPE, SESSION_ID = _a.SESSION_ID;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mts-booking-library",
3
- "version": "2.3.2",
3
+ "version": "2.3.3",
4
4
  "description": "Library for using MyTicketSolution Booking API",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",