@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.
@@ -6,7 +6,12 @@ export declare class MenuAdminAPIs {
6
6
  token?: string;
7
7
  id: string;
8
8
  status?: OrderStatus;
9
- }): Promise<Order[]>;
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 };
@@ -1,4 +1,5 @@
1
1
  export interface CallWaiter {
2
+ id: string;
2
3
  qrCodeLabel: string;
3
4
  deviceId: string;
4
5
  status: CallWaiterStatus;
@@ -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 { callWaiter } from "./types/post-call-waiter-request";
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 item_unavailable, closed_hour, item_not_found, variant_not_found, qrcode_not_found, internal_error
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 call_limit_exceeded, qrcode_not_found, internal_error
37
+ * @throws unauthorized_action, pending_limit_exceeded, qrcode_not_found, internal_error
38
38
  * @returns
39
39
  */
40
- static callWaiter(data: callWaiter): Promise<void>;
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 item_unavailable, closed_hour, item_not_found, variant_not_found, qrcode_not_found, internal_error
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 call_limit_exceeded, qrcode_not_found, internal_error
135
+ * @throws unauthorized_action, pending_limit_exceeded, qrcode_not_found, internal_error
136
136
  * @returns
137
137
  */
138
138
  MenuGuestAPIs.callWaiter = function (data) {
@@ -1,4 +1,4 @@
1
- export interface callWaiter {
1
+ export interface PostCallWaiter {
2
2
  deviceId: string;
3
3
  qrCodeId: string;
4
4
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kiminix/tp-client",
3
- "version": "2.9.1",
3
+ "version": "2.9.3",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "files": [