@open-tender/store 0.7.7 → 0.7.8

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/.DS_Store CHANGED
Binary file
@@ -32,7 +32,7 @@ declare class PosAPI {
32
32
  postTimePunch(data: Punch): Promise<null>;
33
33
  getTimePunchesReport(businessDate?: string, employeeId?: number): Promise<Employees>;
34
34
  postPrintShiftSummary(employeeId: number): Promise<null>;
35
- postCashEvent(data: CashEvent): Promise<null>;
35
+ postCashEvent(data: CashEvent): Promise<void>;
36
36
  getCashSummary(employeeId: number): Promise<CashSummary>;
37
37
  postPrintCashSummary(employeeId: number): Promise<null>;
38
38
  getAlerts(): Promise<ErrorAlerts>;
@@ -9,11 +9,11 @@ var parseResponse = function (response, contentType) { return tslib_1.__awaiter(
9
9
  case 'text/plain':
10
10
  case 'text/html':
11
11
  case 'text/xml':
12
- return [2 /*return*/, response.text()];
12
+ return [2 /*return*/, response === null || response === void 0 ? void 0 : response.text()];
13
13
  case 'application/pdf':
14
- return [2 /*return*/, response.blob()];
14
+ return [2 /*return*/, response === null || response === void 0 ? void 0 : response.blob()];
15
15
  default:
16
- return [2 /*return*/, response.json()];
16
+ return [2 /*return*/, response === null || response === void 0 ? void 0 : response.json()];
17
17
  }
18
18
  return [2 /*return*/];
19
19
  });
@@ -70,12 +70,13 @@ var PosAPI = /** @class */ (function () {
70
70
  method: method,
71
71
  headers: makeHeaders(this.terminalId),
72
72
  body: data ? JSON.stringify(data) : null
73
- })];
73
+ })
74
+ // if (res.status === 204) {
75
+ // return resolve()
76
+ // }
77
+ ];
74
78
  case 1:
75
79
  res = _b.sent();
76
- if (res.status === 204) {
77
- return [2 /*return*/];
78
- }
79
80
  contentType = (_a = res.headers.get('Content-Type')) === null || _a === void 0 ? void 0 : _a.split(';')[0];
80
81
  if (!contentType) {
81
82
  return [2 /*return*/, reject(errors_1.errorsApi.internalServerError)];
@@ -32,7 +32,7 @@ declare class PosAPI {
32
32
  postTimePunch(data: Punch): Promise<null>;
33
33
  getTimePunchesReport(businessDate?: string, employeeId?: number): Promise<Employees>;
34
34
  postPrintShiftSummary(employeeId: number): Promise<null>;
35
- postCashEvent(data: CashEvent): Promise<null>;
35
+ postCashEvent(data: CashEvent): Promise<void>;
36
36
  getCashSummary(employeeId: number): Promise<CashSummary>;
37
37
  postPrintCashSummary(employeeId: number): Promise<null>;
38
38
  getAlerts(): Promise<ErrorAlerts>;
@@ -7,11 +7,11 @@ var parseResponse = function (response, contentType) { return __awaiter(void 0,
7
7
  case 'text/plain':
8
8
  case 'text/html':
9
9
  case 'text/xml':
10
- return [2 /*return*/, response.text()];
10
+ return [2 /*return*/, response === null || response === void 0 ? void 0 : response.text()];
11
11
  case 'application/pdf':
12
- return [2 /*return*/, response.blob()];
12
+ return [2 /*return*/, response === null || response === void 0 ? void 0 : response.blob()];
13
13
  default:
14
- return [2 /*return*/, response.json()];
14
+ return [2 /*return*/, response === null || response === void 0 ? void 0 : response.json()];
15
15
  }
16
16
  return [2 /*return*/];
17
17
  });
@@ -68,12 +68,13 @@ var PosAPI = /** @class */ (function () {
68
68
  method: method,
69
69
  headers: makeHeaders(this.terminalId),
70
70
  body: data ? JSON.stringify(data) : null
71
- })];
71
+ })
72
+ // if (res.status === 204) {
73
+ // return resolve()
74
+ // }
75
+ ];
72
76
  case 1:
73
77
  res = _b.sent();
74
- if (res.status === 204) {
75
- return [2 /*return*/];
76
- }
77
78
  contentType = (_a = res.headers.get('Content-Type')) === null || _a === void 0 ? void 0 : _a.split(';')[0];
78
79
  if (!contentType) {
79
80
  return [2 /*return*/, reject(errorsApi.internalServerError)];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@open-tender/store",
3
- "version": "0.7.7",
3
+ "version": "0.7.8",
4
4
  "description": "A library of hooks, reducers, utility functions, and types for use with Open Tender applications that utilize our in-store POS API",
5
5
  "main": "./dist/cjs/index.js",
6
6
  "module": "./dist/esm/index.js",