mts-booking-library 2.3.2 → 2.3.3
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/lib/booking/booking.js +1 -7
- package/lib/config.d.ts +5 -5
- package/lib/config.js +5 -1
- package/package.json +1 -1
package/lib/booking/booking.js
CHANGED
@@ -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
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
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
|
-
|
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;
|