abbot-http-client 0.0.6 → 0.0.7

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/index.cjs CHANGED
@@ -193,8 +193,8 @@ var CoreHttp = class {
193
193
  }
194
194
  }
195
195
  req.headers.set("data-code", iv);
196
- if (this.config.app?.trackingId) {
197
- req.headers.set("X-Trace-Id", this.config.app.trackingId);
196
+ if (user.trackingId) {
197
+ req.headers.set("X-Trace-Id", user.trackingId);
198
198
  }
199
199
  if (user.token) {
200
200
  req.headers.setAuthorization(`Bearer ${user.token}`);
@@ -372,8 +372,7 @@ var cfg = {
372
372
  app: {
373
373
  redirectUrl: "/login",
374
374
  apiKey: "",
375
- timezone: "Asia/Bangkok",
376
- trackingId: ""
375
+ timezone: "Asia/Bangkok"
377
376
  }
378
377
  };
379
378
  function getConfig() {
package/dist/index.d.cts CHANGED
@@ -5,6 +5,7 @@ declare function catchError<T, E extends new (err?: any) => Error>(promise: Prom
5
5
  interface credential {
6
6
  key: string | undefined;
7
7
  token: string | undefined;
8
+ trackingId?: string;
8
9
  }
9
10
  declare class CoreHttp {
10
11
  private config;
@@ -37,7 +38,6 @@ interface AbbotConfig {
37
38
  redirectUrl?: string;
38
39
  apiKey?: string;
39
40
  timezone?: string;
40
- trackingId?: string;
41
41
  };
42
42
  }
43
43
  declare function create(config: AbbotConfig): CoreHttp;
package/dist/index.d.ts CHANGED
@@ -5,6 +5,7 @@ declare function catchError<T, E extends new (err?: any) => Error>(promise: Prom
5
5
  interface credential {
6
6
  key: string | undefined;
7
7
  token: string | undefined;
8
+ trackingId?: string;
8
9
  }
9
10
  declare class CoreHttp {
10
11
  private config;
@@ -37,7 +38,6 @@ interface AbbotConfig {
37
38
  redirectUrl?: string;
38
39
  apiKey?: string;
39
40
  timezone?: string;
40
- trackingId?: string;
41
41
  };
42
42
  }
43
43
  declare function create(config: AbbotConfig): CoreHttp;
package/dist/index.js CHANGED
@@ -156,8 +156,8 @@ var CoreHttp = class {
156
156
  }
157
157
  }
158
158
  req.headers.set("data-code", iv);
159
- if (this.config.app?.trackingId) {
160
- req.headers.set("X-Trace-Id", this.config.app.trackingId);
159
+ if (user.trackingId) {
160
+ req.headers.set("X-Trace-Id", user.trackingId);
161
161
  }
162
162
  if (user.token) {
163
163
  req.headers.setAuthorization(`Bearer ${user.token}`);
@@ -335,8 +335,7 @@ var cfg = {
335
335
  app: {
336
336
  redirectUrl: "/login",
337
337
  apiKey: "",
338
- timezone: "Asia/Bangkok",
339
- trackingId: ""
338
+ timezone: "Asia/Bangkok"
340
339
  }
341
340
  };
342
341
  function getConfig() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "abbot-http-client",
3
- "version": "0.0.6",
3
+ "version": "0.0.7",
4
4
  "description": "This package helps Abbot team to handle all the axios requests.",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",