@kiminix/tp-client 2.9.0 → 2.9.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.
@@ -2,6 +2,16 @@ import { Order } from "../shared/types";
2
2
  import { OrderStatus } from "../../enum";
3
3
  import { CallWaiter, CallWaiterStatus } from "./types/get-calls-response";
4
4
  export declare class MenuAdminAPIs {
5
+ static updateOrders(props: {
6
+ token?: string;
7
+ id: string;
8
+ status?: OrderStatus;
9
+ }): Promise<undefined>;
10
+ static updateCalls(props: {
11
+ token?: string;
12
+ id: string;
13
+ status?: CallWaiterStatus;
14
+ }): Promise<undefined>;
5
15
  static getOrders(props: {
6
16
  token?: string;
7
17
  status: OrderStatus[];
@@ -41,6 +41,40 @@ import { RequestUtils } from "../../utils/request-utils";
41
41
  var MenuAdminAPIs = /** @class */ (function () {
42
42
  function MenuAdminAPIs() {
43
43
  }
44
+ MenuAdminAPIs.updateOrders = function (props) {
45
+ return __awaiter(this, void 0, void 0, function () {
46
+ return __generator(this, function (_a) {
47
+ return [2 /*return*/, RequestUtils.send(function () {
48
+ return axios.patch(base + "/menus/admin/orders", {
49
+ id: props.id,
50
+ status: props.status
51
+ }, {
52
+ headers: {
53
+ 'Authorization': "".concat(props.token)
54
+ }
55
+ })
56
+ .then(function (_) { return undefined; });
57
+ })];
58
+ });
59
+ });
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
+ };
44
78
  MenuAdminAPIs.getOrders = function (props) {
45
79
  return __awaiter(this, void 0, void 0, function () {
46
80
  return __generator(this, function (_a) {
@@ -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,7 +2,7 @@ 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
  /**
@@ -37,5 +37,5 @@ export declare class MenuGuestAPIs {
37
37
  * @throws call_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
  }
@@ -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.0",
3
+ "version": "2.9.2",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "files": [
@@ -27,4 +27,4 @@
27
27
  "date-fns": "^3.3.1",
28
28
  "purify-ts": "^2.1.0"
29
29
  }
30
- }
30
+ }