@kiminix/tp-client 2.9.1 → 2.9.3
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/menus/admin/admin-apis.d.ts +11 -1
- package/dist/menus/admin/admin-apis.js +34 -0
- package/dist/menus/admin/types/get-calls-response.d.ts +1 -0
- package/dist/menus/user/guest-apis.d.ts +4 -4
- package/dist/menus/user/guest-apis.js +2 -2
- package/dist/menus/user/types/post-call-waiter-request.d.ts +1 -1
- package/package.json +1 -1
|
@@ -6,7 +6,12 @@ export declare class MenuAdminAPIs {
|
|
|
6
6
|
token?: string;
|
|
7
7
|
id: string;
|
|
8
8
|
status?: OrderStatus;
|
|
9
|
-
}): Promise<
|
|
9
|
+
}): Promise<undefined>;
|
|
10
|
+
static updateCalls(props: {
|
|
11
|
+
token?: string;
|
|
12
|
+
id: string;
|
|
13
|
+
status?: CallWaiterStatus;
|
|
14
|
+
}): Promise<undefined>;
|
|
10
15
|
static getOrders(props: {
|
|
11
16
|
token?: string;
|
|
12
17
|
status: OrderStatus[];
|
|
@@ -23,4 +28,9 @@ export declare class MenuAdminAPIs {
|
|
|
23
28
|
size: number;
|
|
24
29
|
sort: "asc" | "desc";
|
|
25
30
|
}): Promise<CallWaiter[]>;
|
|
31
|
+
static setUnauthorizedDevice(props: {
|
|
32
|
+
token?: string;
|
|
33
|
+
deviceId: string;
|
|
34
|
+
qrCodeId: string;
|
|
35
|
+
}): Promise<undefined>;
|
|
26
36
|
}
|
|
@@ -58,6 +58,23 @@ var MenuAdminAPIs = /** @class */ (function () {
|
|
|
58
58
|
});
|
|
59
59
|
});
|
|
60
60
|
};
|
|
61
|
+
MenuAdminAPIs.updateCalls = function (props) {
|
|
62
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
63
|
+
return __generator(this, function (_a) {
|
|
64
|
+
return [2 /*return*/, RequestUtils.send(function () {
|
|
65
|
+
return axios.patch(base + "/menus/admin/calls", {
|
|
66
|
+
id: props.id,
|
|
67
|
+
status: props.status
|
|
68
|
+
}, {
|
|
69
|
+
headers: {
|
|
70
|
+
'Authorization': "".concat(props.token)
|
|
71
|
+
}
|
|
72
|
+
})
|
|
73
|
+
.then(function (_) { return undefined; });
|
|
74
|
+
})];
|
|
75
|
+
});
|
|
76
|
+
});
|
|
77
|
+
};
|
|
61
78
|
MenuAdminAPIs.getOrders = function (props) {
|
|
62
79
|
return __awaiter(this, void 0, void 0, function () {
|
|
63
80
|
return __generator(this, function (_a) {
|
|
@@ -104,6 +121,23 @@ var MenuAdminAPIs = /** @class */ (function () {
|
|
|
104
121
|
});
|
|
105
122
|
});
|
|
106
123
|
};
|
|
124
|
+
MenuAdminAPIs.setUnauthorizedDevice = function (props) {
|
|
125
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
126
|
+
return __generator(this, function (_a) {
|
|
127
|
+
return [2 /*return*/, RequestUtils.send(function () {
|
|
128
|
+
return axios.patch(base + "/menus/admin/unauthorized", {
|
|
129
|
+
deviceId: props.deviceId,
|
|
130
|
+
qrCodeId: props.qrCodeId
|
|
131
|
+
}, {
|
|
132
|
+
headers: {
|
|
133
|
+
'Authorization': "".concat(props.token)
|
|
134
|
+
}
|
|
135
|
+
})
|
|
136
|
+
.then(function (_) { return undefined; });
|
|
137
|
+
})];
|
|
138
|
+
});
|
|
139
|
+
});
|
|
140
|
+
};
|
|
107
141
|
return MenuAdminAPIs;
|
|
108
142
|
}());
|
|
109
143
|
export { MenuAdminAPIs };
|
|
@@ -2,13 +2,13 @@ import { OrderRequest, OrderResponse } from "./types/post-order";
|
|
|
2
2
|
import { QrCode } from "./types/get-qrcode-response";
|
|
3
3
|
import { Menu } from "./types/get-menu-response";
|
|
4
4
|
import { Order } from "../shared/types";
|
|
5
|
-
import {
|
|
5
|
+
import { PostCallWaiter } from "./types/post-call-waiter-request";
|
|
6
6
|
export declare class MenuGuestAPIs {
|
|
7
7
|
static getOrders(businessId: string, deviceId: string, timestamp: number, page?: number, size?: number): Promise<Order[]>;
|
|
8
8
|
/**
|
|
9
9
|
*
|
|
10
10
|
* @param props
|
|
11
|
-
* @throws
|
|
11
|
+
* @throws unauthorized_action, pending_limit_exceeded, item_unavailable, item_not_found, variant_not_found , qrcode_not_found, internal_error
|
|
12
12
|
*
|
|
13
13
|
* @returns
|
|
14
14
|
*/
|
|
@@ -34,8 +34,8 @@ export declare class MenuGuestAPIs {
|
|
|
34
34
|
/**
|
|
35
35
|
*
|
|
36
36
|
* @param data
|
|
37
|
-
* @throws
|
|
37
|
+
* @throws unauthorized_action, pending_limit_exceeded, qrcode_not_found, internal_error
|
|
38
38
|
* @returns
|
|
39
39
|
*/
|
|
40
|
-
static callWaiter(data:
|
|
40
|
+
static callWaiter(data: PostCallWaiter): Promise<void>;
|
|
41
41
|
}
|
|
@@ -67,7 +67,7 @@ var MenuGuestAPIs = /** @class */ (function () {
|
|
|
67
67
|
/**
|
|
68
68
|
*
|
|
69
69
|
* @param props
|
|
70
|
-
* @throws
|
|
70
|
+
* @throws unauthorized_action, pending_limit_exceeded, item_unavailable, item_not_found, variant_not_found , qrcode_not_found, internal_error
|
|
71
71
|
*
|
|
72
72
|
* @returns
|
|
73
73
|
*/
|
|
@@ -132,7 +132,7 @@ var MenuGuestAPIs = /** @class */ (function () {
|
|
|
132
132
|
/**
|
|
133
133
|
*
|
|
134
134
|
* @param data
|
|
135
|
-
* @throws
|
|
135
|
+
* @throws unauthorized_action, pending_limit_exceeded, qrcode_not_found, internal_error
|
|
136
136
|
* @returns
|
|
137
137
|
*/
|
|
138
138
|
MenuGuestAPIs.callWaiter = function (data) {
|