@tillhub/javascript-sdk 4.70.0 → 4.70.2
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/CHANGELOG.md +15 -0
- package/dist/types/v2/orders.d.ts +23 -2
- package/dist/v2/orders.js +5 -5
- package/dist/v2/orders.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,18 @@
|
|
|
1
|
+
## [4.70.2](https://github.com/tillhub/tillhub-sdk-javascript/compare/v4.70.1...v4.70.2) (2023-06-06)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* **UNTIL-6762:** remove comment ([40db3b6](https://github.com/tillhub/tillhub-sdk-javascript/commit/40db3b6abc0d624392fa3e7e0a8941ad9fa54834))
|
|
7
|
+
* **UNTIL-6762:** update model for getAll order ([6fe9d3b](https://github.com/tillhub/tillhub-sdk-javascript/commit/6fe9d3bfa24434645c14da4b800ee28edde4f4a0))
|
|
8
|
+
|
|
9
|
+
## [4.70.1](https://github.com/tillhub/tillhub-sdk-javascript/compare/v4.70.0...v4.70.1) (2023-06-06)
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
### Bug Fixes
|
|
13
|
+
|
|
14
|
+
* **UNTIL-6762:** remove tenantId from call header ([577c669](https://github.com/tillhub/tillhub-sdk-javascript/commit/577c6694a892824b956977b34bc88ceb5927c812))
|
|
15
|
+
|
|
1
16
|
# [4.70.0](https://github.com/tillhub/tillhub-sdk-javascript/compare/v4.69.0...v4.70.0) (2023-06-06)
|
|
2
17
|
|
|
3
18
|
|
|
@@ -94,6 +94,27 @@ export interface Order {
|
|
|
94
94
|
status?: string | null;
|
|
95
95
|
customerName?: string | null;
|
|
96
96
|
lastUpdate?: string | null;
|
|
97
|
+
txnNumber?: string | null;
|
|
98
|
+
email?: string | null;
|
|
99
|
+
customerId?: string | null;
|
|
100
|
+
usage?: string | null;
|
|
101
|
+
receiptNumber?: number | null;
|
|
102
|
+
staff?: string | null;
|
|
103
|
+
registerId?: string | null;
|
|
104
|
+
entity?: string | null;
|
|
105
|
+
paymentId?: string | null;
|
|
106
|
+
cardNumber?: string | null;
|
|
107
|
+
accountNumber?: string | null;
|
|
108
|
+
bankName?: string | null;
|
|
109
|
+
bic?: string | null;
|
|
110
|
+
insuranceName?: string | null;
|
|
111
|
+
insuranceId?: string | null;
|
|
112
|
+
cashierNumber?: string | null;
|
|
113
|
+
balanceNumber?: number | null;
|
|
114
|
+
basketId?: number | null;
|
|
115
|
+
terminalId?: string | null;
|
|
116
|
+
cutoverId?: string | null;
|
|
117
|
+
cutoverDate?: string | null;
|
|
97
118
|
}
|
|
98
119
|
export interface Payment {
|
|
99
120
|
id?: string;
|
|
@@ -285,8 +306,8 @@ export declare class Orders extends ThBaseHandler {
|
|
|
285
306
|
options: OrdersOptions;
|
|
286
307
|
uriHelper: UriHelper;
|
|
287
308
|
constructor(options: OrdersOptions, http: Client);
|
|
288
|
-
getAll(
|
|
289
|
-
get(
|
|
309
|
+
getAll(query?: OrdersQuery | undefined): Promise<OrdersResponse>;
|
|
310
|
+
get(orderId: string): Promise<OrderResponse>;
|
|
290
311
|
}
|
|
291
312
|
export declare class OrdersFetchFailed extends BaseError {
|
|
292
313
|
message: string;
|
package/dist/v2/orders.js
CHANGED
|
@@ -20,7 +20,7 @@ var Orders = (function (_super) {
|
|
|
20
20
|
_this.uriHelper = new uri_helper_1.UriHelper(_this.endpoint, _this.options);
|
|
21
21
|
return _this;
|
|
22
22
|
}
|
|
23
|
-
Orders.prototype.getAll = function (
|
|
23
|
+
Orders.prototype.getAll = function (query) {
|
|
24
24
|
var _a;
|
|
25
25
|
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
26
26
|
var next, base, uri, response, error_1;
|
|
@@ -28,7 +28,7 @@ var Orders = (function (_super) {
|
|
|
28
28
|
return tslib_1.__generator(this, function (_b) {
|
|
29
29
|
switch (_b.label) {
|
|
30
30
|
case 0:
|
|
31
|
-
base = this.uriHelper.generateBaseUri(
|
|
31
|
+
base = this.uriHelper.generateBaseUri('/');
|
|
32
32
|
uri = this.uriHelper.generateUriWithQuery(base, query);
|
|
33
33
|
_b.label = 1;
|
|
34
34
|
case 1:
|
|
@@ -40,7 +40,7 @@ var Orders = (function (_super) {
|
|
|
40
40
|
throw new OrdersFetchFailed(undefined, { status: response.status });
|
|
41
41
|
}
|
|
42
42
|
if ((_a = response.data.cursor) === null || _a === void 0 ? void 0 : _a.next) {
|
|
43
|
-
next = function () { return _this.getAll(uri); };
|
|
43
|
+
next = function () { return _this.getAll({ uri: uri }); };
|
|
44
44
|
}
|
|
45
45
|
return [2, {
|
|
46
46
|
data: response.data.results,
|
|
@@ -55,13 +55,13 @@ var Orders = (function (_super) {
|
|
|
55
55
|
});
|
|
56
56
|
});
|
|
57
57
|
};
|
|
58
|
-
Orders.prototype.get = function (
|
|
58
|
+
Orders.prototype.get = function (orderId) {
|
|
59
59
|
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
60
60
|
var base, uri, response, error_2;
|
|
61
61
|
return tslib_1.__generator(this, function (_a) {
|
|
62
62
|
switch (_a.label) {
|
|
63
63
|
case 0:
|
|
64
|
-
base = this.uriHelper.generateBaseUri("/" +
|
|
64
|
+
base = this.uriHelper.generateBaseUri("/" + orderId);
|
|
65
65
|
uri = this.uriHelper.generateUriWithQuery(base);
|
|
66
66
|
_a.label = 1;
|
|
67
67
|
case 1:
|
package/dist/v2/orders.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"orders.js","sourceRoot":"","sources":["../../src/v2/orders.ts"],"names":[],"mappings":";;;;AACA,oCAAqC;AACrC,4CAAyC;AACzC,gCAAuC;
|
|
1
|
+
{"version":3,"file":"orders.js","sourceRoot":"","sources":["../../src/v2/orders.ts"],"names":[],"mappings":";;;;AACA,oCAAqC;AACrC,4CAAyC;AACzC,gCAAuC;AAoUvC;IAA4B,kCAAa;IA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