gap-nodejs-sdk 1.0.101 → 1.0.103

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.
@@ -1 +1 @@
1
- {"version":3,"file":"http_client.d.ts","sourceRoot":"","sources":["../../src/http_client/http_client.ts"],"names":[],"mappings":"AACA,OAAc,EAAgB,kBAAkB,EAAgB,MAAM,OAAO,CAAC;AAC9E,OAAO,EAAC,aAAa,EAAE,eAAe,EAAC,MAAM,eAAe,CAAC;AAG7D,OAAO,EACH,mBAAmB,EACnB,gBAAgB,EAChB,iBAAiB,EACjB,gBAAgB,EAChB,aAAa,EAGhB,MAAM,SAAS,CAAC;AAEjB,qBAAa,UAAU;IACnB,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAgB;IACtC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAS;IAChC,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAQ;IACxC,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAK;IAC/B,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAgB;gBAEzB,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,aAAa;IAW9E,GAAG,CAAC,MAAM,EAAE,gBAAgB,GAAG,OAAO,CAAC,eAAe,CAAC;IAIvD,IAAI,CAAC,MAAM,EAAE,iBAAiB,GAAG,OAAO,CAAC,eAAe,CAAC;IAIzD,GAAG,CAAC,MAAM,EAAE,gBAAgB,GAAG,OAAO,CAAC,eAAe,CAAC;IAIvD,MAAM,CAAC,MAAM,EAAE,mBAAmB,GAAG,OAAO,CAAC,eAAe,CAAC;IAI7D,OAAO,CAAC,MAAM,EAAE,aAAa,GAAG,OAAO,CAAC,eAAe,CAAC;IAwD9D,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM;IAI9B,SAAS,CAAC,OAAO,EAAE,kBAAkB,GAAG,OAAO,CAAC,eAAe,CAAC;CAmDhF"}
1
+ {"version":3,"file":"http_client.d.ts","sourceRoot":"","sources":["../../src/http_client/http_client.ts"],"names":[],"mappings":"AACA,OAAc,EAAgB,kBAAkB,EAAgB,MAAM,OAAO,CAAC;AAC9E,OAAO,EAAC,aAAa,EAAE,eAAe,EAAC,MAAM,eAAe,CAAC;AAG7D,OAAO,EACH,mBAAmB,EACnB,gBAAgB,EAChB,iBAAiB,EACjB,gBAAgB,EAChB,aAAa,EAGhB,MAAM,SAAS,CAAC;AAEjB,qBAAa,UAAU;IACnB,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAgB;IACtC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAS;IAChC,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAQ;IACxC,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAK;IAC/B,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAgB;gBAEzB,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,aAAa;IAW9E,GAAG,CAAC,MAAM,EAAE,gBAAgB,GAAG,OAAO,CAAC,eAAe,CAAC;IAIvD,IAAI,CAAC,MAAM,EAAE,iBAAiB,GAAG,OAAO,CAAC,eAAe,CAAC;IAIzD,GAAG,CAAC,MAAM,EAAE,gBAAgB,GAAG,OAAO,CAAC,eAAe,CAAC;IAIvD,MAAM,CAAC,MAAM,EAAE,mBAAmB,GAAG,OAAO,CAAC,eAAe,CAAC;IAI7D,OAAO,CAAC,MAAM,EAAE,aAAa,GAAG,OAAO,CAAC,eAAe,CAAC;IAwD9D,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM;IAI9B,SAAS,CAAC,OAAO,EAAE,kBAAkB,GAAG,OAAO,CAAC,eAAe,CAAC;CAkDhF"}
@@ -88,14 +88,11 @@ export class HttpClient {
88
88
  return `/${path.replace(/^\//, '')}`;
89
89
  }
90
90
  doRequest(options) {
91
- var _a;
91
+ var _a, _b, _c;
92
92
  return __awaiter(this, void 0, void 0, function* () {
93
93
  try {
94
94
  const response = yield this.axios(options);
95
- if (response.status && (response.status.toString().startsWith('2') || !(response.data.status !== 'OK' || ((_a = response.data.result) === null || _a === void 0 ? void 0 : _a.status) !== 'OK'))) {
96
- return response.data;
97
- }
98
- else {
95
+ if ((((_a = response.data) === null || _a === void 0 ? void 0 : _a.status) !== 'OK' || ((_c = (_b = response.data) === null || _b === void 0 ? void 0 : _b.result) === null || _c === void 0 ? void 0 : _c.status) !== 'OK') || !(response === null || response === void 0 ? void 0 : response.status.toString().startsWith('2'))) {
99
96
  const errorMessage = JSON.stringify(response.data.message || response.data.result.message, null, 2);
100
97
  const headers = response.headers;
101
98
  const code = response.status;
@@ -130,6 +127,7 @@ export class HttpClient {
130
127
  });
131
128
  }
132
129
  }
130
+ return response.data;
133
131
  }
134
132
  catch (error) {
135
133
  if (error instanceof GapErrors.GapError) {
@@ -21,7 +21,7 @@ export declare type GetReportCheckInRequest = {
21
21
  };
22
22
  export declare type UpdateOrderStaffRequest = {
23
23
  order_id: number;
24
- order_item_id: number;
24
+ order_item_id: string;
25
25
  staff_id: number;
26
26
  };
27
27
  export declare type RemoveOrderRequest = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gap-nodejs-sdk",
3
- "version": "1.0.101",
3
+ "version": "1.0.103",
4
4
  "description": "GCI App Platform Library",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",