ob-parking-sdk 0.0.22 → 0.0.23

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/api/api.ts CHANGED
@@ -954,6 +954,13 @@ export interface Item {
954
954
  */
955
955
  'total_price': string;
956
956
  }
957
+ /**
958
+ * From https://github.com/sindresorhus/type-fest/ Matches any valid JSON value.
959
+ * @export
960
+ * @interface JsonValue
961
+ */
962
+ export interface JsonValue {
963
+ }
957
964
  /**
958
965
  *
959
966
  * @export
@@ -1051,6 +1058,105 @@ export const ParkingDetailStatus = {
1051
1058
  export type ParkingDetailStatus = typeof ParkingDetailStatus[keyof typeof ParkingDetailStatus];
1052
1059
 
1053
1060
 
1061
+ /**
1062
+ *
1063
+ * @export
1064
+ * @interface ParkingDetailsGetParkingDetailUid200Response
1065
+ */
1066
+ export interface ParkingDetailsGetParkingDetailUid200Response {
1067
+ /**
1068
+ *
1069
+ * @type {string}
1070
+ * @memberof ParkingDetailsGetParkingDetailUid200Response
1071
+ */
1072
+ 'redeemed_at': string;
1073
+ /**
1074
+ *
1075
+ * @type {string}
1076
+ * @memberof ParkingDetailsGetParkingDetailUid200Response
1077
+ */
1078
+ 'updated_at': string;
1079
+ /**
1080
+ *
1081
+ * @type {string}
1082
+ * @memberof ParkingDetailsGetParkingDetailUid200Response
1083
+ */
1084
+ 'created_at': string;
1085
+ /**
1086
+ *
1087
+ * @type {JsonValue}
1088
+ * @memberof ParkingDetailsGetParkingDetailUid200Response
1089
+ */
1090
+ 'rate_details': JsonValue | null;
1091
+ /**
1092
+ *
1093
+ * @type {ParkingDetailStatus}
1094
+ * @memberof ParkingDetailsGetParkingDetailUid200Response
1095
+ */
1096
+ 'status': ParkingDetailStatus;
1097
+ /**
1098
+ *
1099
+ * @type {string}
1100
+ * @memberof ParkingDetailsGetParkingDetailUid200Response
1101
+ */
1102
+ 'total_amount': string;
1103
+ /**
1104
+ *
1105
+ * @type {string}
1106
+ * @memberof ParkingDetailsGetParkingDetailUid200Response
1107
+ */
1108
+ 'plate_no': string;
1109
+ /**
1110
+ *
1111
+ * @type {string}
1112
+ * @memberof ParkingDetailsGetParkingDetailUid200Response
1113
+ */
1114
+ 'phone': string;
1115
+ /**
1116
+ *
1117
+ * @type {string}
1118
+ * @memberof ParkingDetailsGetParkingDetailUid200Response
1119
+ */
1120
+ 'email': string;
1121
+ /**
1122
+ *
1123
+ * @type {string}
1124
+ * @memberof ParkingDetailsGetParkingDetailUid200Response
1125
+ */
1126
+ 'username': string;
1127
+ /**
1128
+ *
1129
+ * @type {string}
1130
+ * @memberof ParkingDetailsGetParkingDetailUid200Response
1131
+ */
1132
+ 'account_id': string;
1133
+ /**
1134
+ *
1135
+ * @type {JsonValue}
1136
+ * @memberof ParkingDetailsGetParkingDetailUid200Response
1137
+ */
1138
+ 'meta': JsonValue | null;
1139
+ /**
1140
+ *
1141
+ * @type {string}
1142
+ * @memberof ParkingDetailsGetParkingDetailUid200Response
1143
+ */
1144
+ 'record_id': string;
1145
+ /**
1146
+ *
1147
+ * @type {string}
1148
+ * @memberof ParkingDetailsGetParkingDetailUid200Response
1149
+ */
1150
+ 'uid': string;
1151
+ /**
1152
+ *
1153
+ * @type {string}
1154
+ * @memberof ParkingDetailsGetParkingDetailUid200Response
1155
+ */
1156
+ 'id': string;
1157
+ }
1158
+
1159
+
1054
1160
  /**
1055
1161
  *
1056
1162
  * @export
@@ -2536,6 +2642,39 @@ export const DefaultApiAxiosParamCreator = function (configuration?: Configurati
2536
2642
 
2537
2643
 
2538
2644
 
2645
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
2646
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2647
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
2648
+
2649
+ return {
2650
+ url: toPathString(localVarUrlObj),
2651
+ options: localVarRequestOptions,
2652
+ };
2653
+ },
2654
+ /**
2655
+ *
2656
+ * @param {string} uid
2657
+ * @param {*} [options] Override http request option.
2658
+ * @throws {RequiredError}
2659
+ */
2660
+ parkingDetailsGetParkingDetailUid: async (uid: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
2661
+ // verify required parameter 'uid' is not null or undefined
2662
+ assertParamExists('parkingDetailsGetParkingDetailUid', 'uid', uid)
2663
+ const localVarPath = `/parking-details/{uid}/uid`
2664
+ .replace(`{${"uid"}}`, encodeURIComponent(String(uid)));
2665
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2666
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2667
+ let baseOptions;
2668
+ if (configuration) {
2669
+ baseOptions = configuration.baseOptions;
2670
+ }
2671
+
2672
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
2673
+ const localVarHeaderParameter = {} as any;
2674
+ const localVarQueryParameter = {} as any;
2675
+
2676
+
2677
+
2539
2678
  setSearchParams(localVarUrlObj, localVarQueryParameter);
2540
2679
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2541
2680
  localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
@@ -3070,6 +3209,16 @@ export const DefaultApiFp = function(configuration?: Configuration) {
3070
3209
  const localVarAxiosArgs = await localVarAxiosParamCreator.parkingDetailsGetParkingDetail(id, orderBy, orderDirection, pageNumber, pageSize, filterBy, filterKey, options);
3071
3210
  return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
3072
3211
  },
3212
+ /**
3213
+ *
3214
+ * @param {string} uid
3215
+ * @param {*} [options] Override http request option.
3216
+ * @throws {RequiredError}
3217
+ */
3218
+ async parkingDetailsGetParkingDetailUid(uid: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ParkingDetailsGetParkingDetailUid200Response>> {
3219
+ const localVarAxiosArgs = await localVarAxiosParamCreator.parkingDetailsGetParkingDetailUid(uid, options);
3220
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
3221
+ },
3073
3222
  /**
3074
3223
  *
3075
3224
  * @param {string} [orderBy]
@@ -3361,6 +3510,15 @@ export const DefaultApiFactory = function (configuration?: Configuration, basePa
3361
3510
  parkingDetailsGetParkingDetail(id: string, orderBy?: string, orderDirection?: string, pageNumber?: number, pageSize?: number, filterBy?: string, filterKey?: string, options?: any): AxiosPromise<ResponseDataGetParkingDetailResponse> {
3362
3511
  return localVarFp.parkingDetailsGetParkingDetail(id, orderBy, orderDirection, pageNumber, pageSize, filterBy, filterKey, options).then((request) => request(axios, basePath));
3363
3512
  },
3513
+ /**
3514
+ *
3515
+ * @param {string} uid
3516
+ * @param {*} [options] Override http request option.
3517
+ * @throws {RequiredError}
3518
+ */
3519
+ parkingDetailsGetParkingDetailUid(uid: string, options?: any): AxiosPromise<ParkingDetailsGetParkingDetailUid200Response> {
3520
+ return localVarFp.parkingDetailsGetParkingDetailUid(uid, options).then((request) => request(axios, basePath));
3521
+ },
3364
3522
  /**
3365
3523
  *
3366
3524
  * @param {string} [orderBy]
@@ -3686,6 +3844,17 @@ export class DefaultApi extends BaseAPI {
3686
3844
  return DefaultApiFp(this.configuration).parkingDetailsGetParkingDetail(id, orderBy, orderDirection, pageNumber, pageSize, filterBy, filterKey, options).then((request) => request(this.axios, this.basePath));
3687
3845
  }
3688
3846
 
3847
+ /**
3848
+ *
3849
+ * @param {string} uid
3850
+ * @param {*} [options] Override http request option.
3851
+ * @throws {RequiredError}
3852
+ * @memberof DefaultApi
3853
+ */
3854
+ public parkingDetailsGetParkingDetailUid(uid: string, options?: AxiosRequestConfig) {
3855
+ return DefaultApiFp(this.configuration).parkingDetailsGetParkingDetailUid(uid, options).then((request) => request(this.axios, this.basePath));
3856
+ }
3857
+
3689
3858
  /**
3690
3859
  *
3691
3860
  * @param {string} [orderBy]
package/dist/api/api.d.ts CHANGED
@@ -926,6 +926,13 @@ export interface Item {
926
926
  */
927
927
  'total_price': string;
928
928
  }
929
+ /**
930
+ * From https://github.com/sindresorhus/type-fest/ Matches any valid JSON value.
931
+ * @export
932
+ * @interface JsonValue
933
+ */
934
+ export interface JsonValue {
935
+ }
929
936
  /**
930
937
  *
931
938
  * @export
@@ -1017,6 +1024,103 @@ export declare const ParkingDetailStatus: {
1017
1024
  readonly Dispute: "DISPUTE";
1018
1025
  };
1019
1026
  export type ParkingDetailStatus = typeof ParkingDetailStatus[keyof typeof ParkingDetailStatus];
1027
+ /**
1028
+ *
1029
+ * @export
1030
+ * @interface ParkingDetailsGetParkingDetailUid200Response
1031
+ */
1032
+ export interface ParkingDetailsGetParkingDetailUid200Response {
1033
+ /**
1034
+ *
1035
+ * @type {string}
1036
+ * @memberof ParkingDetailsGetParkingDetailUid200Response
1037
+ */
1038
+ 'redeemed_at': string;
1039
+ /**
1040
+ *
1041
+ * @type {string}
1042
+ * @memberof ParkingDetailsGetParkingDetailUid200Response
1043
+ */
1044
+ 'updated_at': string;
1045
+ /**
1046
+ *
1047
+ * @type {string}
1048
+ * @memberof ParkingDetailsGetParkingDetailUid200Response
1049
+ */
1050
+ 'created_at': string;
1051
+ /**
1052
+ *
1053
+ * @type {JsonValue}
1054
+ * @memberof ParkingDetailsGetParkingDetailUid200Response
1055
+ */
1056
+ 'rate_details': JsonValue | null;
1057
+ /**
1058
+ *
1059
+ * @type {ParkingDetailStatus}
1060
+ * @memberof ParkingDetailsGetParkingDetailUid200Response
1061
+ */
1062
+ 'status': ParkingDetailStatus;
1063
+ /**
1064
+ *
1065
+ * @type {string}
1066
+ * @memberof ParkingDetailsGetParkingDetailUid200Response
1067
+ */
1068
+ 'total_amount': string;
1069
+ /**
1070
+ *
1071
+ * @type {string}
1072
+ * @memberof ParkingDetailsGetParkingDetailUid200Response
1073
+ */
1074
+ 'plate_no': string;
1075
+ /**
1076
+ *
1077
+ * @type {string}
1078
+ * @memberof ParkingDetailsGetParkingDetailUid200Response
1079
+ */
1080
+ 'phone': string;
1081
+ /**
1082
+ *
1083
+ * @type {string}
1084
+ * @memberof ParkingDetailsGetParkingDetailUid200Response
1085
+ */
1086
+ 'email': string;
1087
+ /**
1088
+ *
1089
+ * @type {string}
1090
+ * @memberof ParkingDetailsGetParkingDetailUid200Response
1091
+ */
1092
+ 'username': string;
1093
+ /**
1094
+ *
1095
+ * @type {string}
1096
+ * @memberof ParkingDetailsGetParkingDetailUid200Response
1097
+ */
1098
+ 'account_id': string;
1099
+ /**
1100
+ *
1101
+ * @type {JsonValue}
1102
+ * @memberof ParkingDetailsGetParkingDetailUid200Response
1103
+ */
1104
+ 'meta': JsonValue | null;
1105
+ /**
1106
+ *
1107
+ * @type {string}
1108
+ * @memberof ParkingDetailsGetParkingDetailUid200Response
1109
+ */
1110
+ 'record_id': string;
1111
+ /**
1112
+ *
1113
+ * @type {string}
1114
+ * @memberof ParkingDetailsGetParkingDetailUid200Response
1115
+ */
1116
+ 'uid': string;
1117
+ /**
1118
+ *
1119
+ * @type {string}
1120
+ * @memberof ParkingDetailsGetParkingDetailUid200Response
1121
+ */
1122
+ 'id': string;
1123
+ }
1020
1124
  /**
1021
1125
  *
1022
1126
  * @export
@@ -1856,6 +1960,13 @@ export declare const DefaultApiAxiosParamCreator: (configuration?: Configuration
1856
1960
  * @throws {RequiredError}
1857
1961
  */
1858
1962
  parkingDetailsGetParkingDetail: (id: string, orderBy?: string, orderDirection?: string, pageNumber?: number, pageSize?: number, filterBy?: string, filterKey?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
1963
+ /**
1964
+ *
1965
+ * @param {string} uid
1966
+ * @param {*} [options] Override http request option.
1967
+ * @throws {RequiredError}
1968
+ */
1969
+ parkingDetailsGetParkingDetailUid: (uid: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
1859
1970
  /**
1860
1971
  *
1861
1972
  * @param {string} [orderBy]
@@ -2085,6 +2196,13 @@ export declare const DefaultApiFp: (configuration?: Configuration) => {
2085
2196
  * @throws {RequiredError}
2086
2197
  */
2087
2198
  parkingDetailsGetParkingDetail(id: string, orderBy?: string, orderDirection?: string, pageNumber?: number, pageSize?: number, filterBy?: string, filterKey?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ResponseDataGetParkingDetailResponse>>;
2199
+ /**
2200
+ *
2201
+ * @param {string} uid
2202
+ * @param {*} [options] Override http request option.
2203
+ * @throws {RequiredError}
2204
+ */
2205
+ parkingDetailsGetParkingDetailUid(uid: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ParkingDetailsGetParkingDetailUid200Response>>;
2088
2206
  /**
2089
2207
  *
2090
2208
  * @param {string} [orderBy]
@@ -2314,6 +2432,13 @@ export declare const DefaultApiFactory: (configuration?: Configuration, basePath
2314
2432
  * @throws {RequiredError}
2315
2433
  */
2316
2434
  parkingDetailsGetParkingDetail(id: string, orderBy?: string, orderDirection?: string, pageNumber?: number, pageSize?: number, filterBy?: string, filterKey?: string, options?: any): AxiosPromise<ResponseDataGetParkingDetailResponse>;
2435
+ /**
2436
+ *
2437
+ * @param {string} uid
2438
+ * @param {*} [options] Override http request option.
2439
+ * @throws {RequiredError}
2440
+ */
2441
+ parkingDetailsGetParkingDetailUid(uid: string, options?: any): AxiosPromise<ParkingDetailsGetParkingDetailUid200Response>;
2317
2442
  /**
2318
2443
  *
2319
2444
  * @param {string} [orderBy]
@@ -2565,6 +2690,14 @@ export declare class DefaultApi extends BaseAPI {
2565
2690
  * @memberof DefaultApi
2566
2691
  */
2567
2692
  parkingDetailsGetParkingDetail(id: string, orderBy?: string, orderDirection?: string, pageNumber?: number, pageSize?: number, filterBy?: string, filterKey?: string, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<ResponseDataGetParkingDetailResponse, any>>;
2693
+ /**
2694
+ *
2695
+ * @param {string} uid
2696
+ * @param {*} [options] Override http request option.
2697
+ * @throws {RequiredError}
2698
+ * @memberof DefaultApi
2699
+ */
2700
+ parkingDetailsGetParkingDetailUid(uid: string, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<ParkingDetailsGetParkingDetailUid200Response, any>>;
2568
2701
  /**
2569
2702
  *
2570
2703
  * @param {string} [orderBy]
package/dist/api/api.js CHANGED
@@ -760,6 +760,34 @@ const DefaultApiAxiosParamCreator = function (configuration) {
760
760
  options: localVarRequestOptions,
761
761
  };
762
762
  }),
763
+ /**
764
+ *
765
+ * @param {string} uid
766
+ * @param {*} [options] Override http request option.
767
+ * @throws {RequiredError}
768
+ */
769
+ parkingDetailsGetParkingDetailUid: (uid, options = {}) => __awaiter(this, void 0, void 0, function* () {
770
+ // verify required parameter 'uid' is not null or undefined
771
+ (0, common_1.assertParamExists)('parkingDetailsGetParkingDetailUid', 'uid', uid);
772
+ const localVarPath = `/parking-details/{uid}/uid`
773
+ .replace(`{${"uid"}}`, encodeURIComponent(String(uid)));
774
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
775
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
776
+ let baseOptions;
777
+ if (configuration) {
778
+ baseOptions = configuration.baseOptions;
779
+ }
780
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
781
+ const localVarHeaderParameter = {};
782
+ const localVarQueryParameter = {};
783
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
784
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
785
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
786
+ return {
787
+ url: (0, common_1.toPathString)(localVarUrlObj),
788
+ options: localVarRequestOptions,
789
+ };
790
+ }),
763
791
  /**
764
792
  *
765
793
  * @param {string} [orderBy]
@@ -1273,6 +1301,18 @@ const DefaultApiFp = function (configuration) {
1273
1301
  return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
1274
1302
  });
1275
1303
  },
1304
+ /**
1305
+ *
1306
+ * @param {string} uid
1307
+ * @param {*} [options] Override http request option.
1308
+ * @throws {RequiredError}
1309
+ */
1310
+ parkingDetailsGetParkingDetailUid(uid, options) {
1311
+ return __awaiter(this, void 0, void 0, function* () {
1312
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.parkingDetailsGetParkingDetailUid(uid, options);
1313
+ return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
1314
+ });
1315
+ },
1276
1316
  /**
1277
1317
  *
1278
1318
  * @param {string} [orderBy]
@@ -1576,6 +1616,15 @@ const DefaultApiFactory = function (configuration, basePath, axios) {
1576
1616
  parkingDetailsGetParkingDetail(id, orderBy, orderDirection, pageNumber, pageSize, filterBy, filterKey, options) {
1577
1617
  return localVarFp.parkingDetailsGetParkingDetail(id, orderBy, orderDirection, pageNumber, pageSize, filterBy, filterKey, options).then((request) => request(axios, basePath));
1578
1618
  },
1619
+ /**
1620
+ *
1621
+ * @param {string} uid
1622
+ * @param {*} [options] Override http request option.
1623
+ * @throws {RequiredError}
1624
+ */
1625
+ parkingDetailsGetParkingDetailUid(uid, options) {
1626
+ return localVarFp.parkingDetailsGetParkingDetailUid(uid, options).then((request) => request(axios, basePath));
1627
+ },
1579
1628
  /**
1580
1629
  *
1581
1630
  * @param {string} [orderBy]
@@ -1881,6 +1930,16 @@ class DefaultApi extends base_1.BaseAPI {
1881
1930
  parkingDetailsGetParkingDetail(id, orderBy, orderDirection, pageNumber, pageSize, filterBy, filterKey, options) {
1882
1931
  return (0, exports.DefaultApiFp)(this.configuration).parkingDetailsGetParkingDetail(id, orderBy, orderDirection, pageNumber, pageSize, filterBy, filterKey, options).then((request) => request(this.axios, this.basePath));
1883
1932
  }
1933
+ /**
1934
+ *
1935
+ * @param {string} uid
1936
+ * @param {*} [options] Override http request option.
1937
+ * @throws {RequiredError}
1938
+ * @memberof DefaultApi
1939
+ */
1940
+ parkingDetailsGetParkingDetailUid(uid, options) {
1941
+ return (0, exports.DefaultApiFp)(this.configuration).parkingDetailsGetParkingDetailUid(uid, options).then((request) => request(this.axios, this.basePath));
1942
+ }
1884
1943
  /**
1885
1944
  *
1886
1945
  * @param {string} [orderBy]
package/dist/index.d.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  import { DefaultApi } from './api';
2
2
  declare const axiosInstance: import("axios").AxiosInstance;
3
3
  declare function setAcessToken(accessToken: string): void;
4
- declare function setBaseUrl(string: string): void;
4
+ declare function setBaseUrl(url: string): void;
5
+ declare function setTraceId(traceId: string): void;
5
6
  declare const client: DefaultApi;
6
- export { client, axiosInstance, setAcessToken, setBaseUrl };
7
+ export { client, axiosInstance, setAcessToken, setBaseUrl, setTraceId };
package/dist/index.js CHANGED
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.setBaseUrl = exports.setAcessToken = exports.axiosInstance = exports.client = void 0;
6
+ exports.setTraceId = exports.setBaseUrl = exports.setAcessToken = exports.axiosInstance = exports.client = void 0;
7
7
  const api_1 = require("./api");
8
8
  const axios_1 = __importDefault(require("axios"));
9
9
  const axiosInstance = axios_1.default.create({
@@ -14,9 +14,14 @@ function setAcessToken(accessToken) {
14
14
  axiosInstance.defaults.headers.common['x-access-token'] = `Bearer ${accessToken}`;
15
15
  }
16
16
  exports.setAcessToken = setAcessToken;
17
- function setBaseUrl(string) {
18
- axiosInstance.defaults.baseURL = string;
17
+ function setBaseUrl(url) {
18
+ axiosInstance.defaults.baseURL = url;
19
19
  }
20
20
  exports.setBaseUrl = setBaseUrl;
21
+ // always set TraceId before calling any function
22
+ function setTraceId(traceId) {
23
+ axiosInstance.defaults.headers.common['x-trace-id'] = traceId;
24
+ }
25
+ exports.setTraceId = setTraceId;
21
26
  const client = new api_1.DefaultApi(undefined, undefined, axiosInstance);
22
27
  exports.client = client;
package/index.ts CHANGED
@@ -11,10 +11,15 @@ function setAcessToken(accessToken: string): void {
11
11
  ] = `Bearer ${accessToken}`;
12
12
  }
13
13
 
14
- function setBaseUrl(string: string): void {
15
- axiosInstance.defaults.baseURL = string;
14
+ function setBaseUrl(url: string): void {
15
+ axiosInstance.defaults.baseURL = url;
16
+ }
17
+
18
+ // always set TraceId before calling any function
19
+ function setTraceId(traceId: string): void {
20
+ axiosInstance.defaults.headers.common['x-trace-id'] = traceId;
16
21
  }
17
22
 
18
23
  const client = new DefaultApi(undefined, undefined, axiosInstance);
19
24
 
20
- export { client, axiosInstance, setAcessToken, setBaseUrl };
25
+ export { client, axiosInstance, setAcessToken, setBaseUrl, setTraceId };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ob-parking-sdk",
3
- "version": "0.0.22",
3
+ "version": "0.0.23",
4
4
  "description": "API interfaces for OB PARKING",
5
5
  "main": "./dist/index.js",
6
6
  "license": "MIT"