@kiminix/tp-client 2.31.0 → 2.32.0

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.
@@ -16,6 +16,6 @@ export declare class MenuAdminAPIs {
16
16
  static setUnauthorizedDevice(props: {
17
17
  token?: string;
18
18
  deviceId: string;
19
- qrCodeId: string;
19
+ tableId: string;
20
20
  }): Promise<undefined>;
21
21
  }
@@ -87,7 +87,7 @@ var MenuAdminAPIs = /** @class */ (function () {
87
87
  return [2 /*return*/, RequestUtils.send(function () {
88
88
  return axios.post(base + "/menus/admin/unauthorized", {
89
89
  deviceId: props.deviceId,
90
- qrCodeId: props.qrCodeId
90
+ tableId: props.tableId
91
91
  }, {
92
92
  headers: {
93
93
  'Authorization': "".concat(props.token)
@@ -2,7 +2,7 @@ export declare class CreateOrdersAdminAPI {
2
2
  /**
3
3
  *
4
4
  * @param props
5
- * @throws unauthorized_action, item_unavailable, item_not_found,variant_not_found, qrcode_not_found, internal_error
5
+ * @throws unauthorized_action, item_unavailable, item_not_found,variant_not_found, table_not_found, internal_error
6
6
  *
7
7
  * @returns
8
8
  */
@@ -13,7 +13,7 @@ export declare class CreateOrdersAdminAPI {
13
13
  }
14
14
  export declare namespace CreateOrdersAdminAPI {
15
15
  interface Request {
16
- qrCodeId?: string | undefined;
16
+ tableId?: string | undefined;
17
17
  items: OrderItem[];
18
18
  }
19
19
  interface OrderItem {
@@ -43,7 +43,7 @@ var CreateOrdersAdminAPI = /** @class */ (function () {
43
43
  /**
44
44
  *
45
45
  * @param props
46
- * @throws unauthorized_action, item_unavailable, item_not_found,variant_not_found, qrcode_not_found, internal_error
46
+ * @throws unauthorized_action, item_unavailable, item_not_found,variant_not_found, table_not_found, internal_error
47
47
  *
48
48
  * @returns
49
49
  */
@@ -1,4 +1,4 @@
1
- export declare class CreateQRCodeAdminAPI {
1
+ export declare class CreateTableAdminAPI {
2
2
  /**
3
3
  *
4
4
  * @param props
@@ -8,10 +8,10 @@ export declare class CreateQRCodeAdminAPI {
8
8
  */
9
9
  static create(props: {
10
10
  token?: string;
11
- request: CreateQRCodeAdminAPI.Request;
11
+ request: CreateTableAdminAPI.Request;
12
12
  }): Promise<void>;
13
13
  }
14
- export declare namespace CreateQRCodeAdminAPI {
14
+ export declare namespace CreateTableAdminAPI {
15
15
  interface Request {
16
16
  label: string;
17
17
  }
@@ -37,8 +37,8 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
37
37
  import axios from "axios";
38
38
  import { base } from "../../../constants";
39
39
  import { RequestUtils } from "../../../utils/request-utils";
40
- var CreateQRCodeAdminAPI = /** @class */ (function () {
41
- function CreateQRCodeAdminAPI() {
40
+ var CreateTableAdminAPI = /** @class */ (function () {
41
+ function CreateTableAdminAPI() {
42
42
  }
43
43
  /**
44
44
  *
@@ -47,11 +47,11 @@ var CreateQRCodeAdminAPI = /** @class */ (function () {
47
47
  *
48
48
  * @returns
49
49
  */
50
- CreateQRCodeAdminAPI.create = function (props) {
50
+ CreateTableAdminAPI.create = function (props) {
51
51
  return __awaiter(this, void 0, void 0, function () {
52
52
  return __generator(this, function (_a) {
53
53
  return [2 /*return*/, RequestUtils.send(function () {
54
- return axios.post(base + "/menus/admin/qrcodes", props.request, {
54
+ return axios.post(base + "/menus/admin/tables", props.request, {
55
55
  headers: {
56
56
  'Authorization': "".concat(props.token)
57
57
  }
@@ -61,6 +61,6 @@ var CreateQRCodeAdminAPI = /** @class */ (function () {
61
61
  });
62
62
  });
63
63
  };
64
- return CreateQRCodeAdminAPI;
64
+ return CreateTableAdminAPI;
65
65
  }());
66
- export { CreateQRCodeAdminAPI };
66
+ export { CreateTableAdminAPI };
@@ -0,0 +1,11 @@
1
+ export declare class GetTablesAdminAPI {
2
+ static get(props: {
3
+ token?: string;
4
+ }): Promise<GetTablesAdminAPI.Table[]>;
5
+ }
6
+ export declare namespace GetTablesAdminAPI {
7
+ interface Table {
8
+ id: string;
9
+ label: string;
10
+ }
11
+ }
@@ -37,14 +37,14 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
37
37
  import axios from "axios";
38
38
  import { base } from "../../../constants";
39
39
  import { RequestUtils } from "../../../utils/request-utils";
40
- var GetQrCodesAdminAPI = /** @class */ (function () {
41
- function GetQrCodesAdminAPI() {
40
+ var GetTablesAdminAPI = /** @class */ (function () {
41
+ function GetTablesAdminAPI() {
42
42
  }
43
- GetQrCodesAdminAPI.get = function (props) {
43
+ GetTablesAdminAPI.get = function (props) {
44
44
  return __awaiter(this, void 0, void 0, function () {
45
45
  return __generator(this, function (_a) {
46
46
  return [2 /*return*/, RequestUtils.send(function () {
47
- return axios.get(base + "/menus/admin/qrcodes", {
47
+ return axios.get(base + "/menus/admin/tables", {
48
48
  headers: {
49
49
  'Authorization': "".concat(props.token)
50
50
  }
@@ -54,6 +54,6 @@ var GetQrCodesAdminAPI = /** @class */ (function () {
54
54
  });
55
55
  });
56
56
  };
57
- return GetQrCodesAdminAPI;
57
+ return GetTablesAdminAPI;
58
58
  }());
59
- export { GetQrCodesAdminAPI };
59
+ export { GetTablesAdminAPI };
@@ -1,17 +1,17 @@
1
- export declare class PatchQRCodeAdminAPI {
1
+ export declare class PatchTableAdminAPI {
2
2
  /**
3
3
  *
4
4
  * @param props
5
- * @throws unauthorized_action, internal_error, qrcode_not_found
5
+ * @throws unauthorized_action, internal_error, table_not_found
6
6
  *
7
7
  * @returns
8
8
  */
9
9
  static patch(props: {
10
10
  token?: string;
11
- request: PatchQRCodeAdminAPI.Request;
11
+ request: PatchTableAdminAPI.Request;
12
12
  }): Promise<void>;
13
13
  }
14
- export declare namespace PatchQRCodeAdminAPI {
14
+ export declare namespace PatchTableAdminAPI {
15
15
  interface Request {
16
16
  id: string;
17
17
  label?: string | undefined;
@@ -37,21 +37,21 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
37
37
  import axios from "axios";
38
38
  import { base } from "../../../constants";
39
39
  import { RequestUtils } from "../../../utils/request-utils";
40
- var PatchQRCodeAdminAPI = /** @class */ (function () {
41
- function PatchQRCodeAdminAPI() {
40
+ var PatchTableAdminAPI = /** @class */ (function () {
41
+ function PatchTableAdminAPI() {
42
42
  }
43
43
  /**
44
44
  *
45
45
  * @param props
46
- * @throws unauthorized_action, internal_error, qrcode_not_found
46
+ * @throws unauthorized_action, internal_error, table_not_found
47
47
  *
48
48
  * @returns
49
49
  */
50
- PatchQRCodeAdminAPI.patch = function (props) {
50
+ PatchTableAdminAPI.patch = function (props) {
51
51
  return __awaiter(this, void 0, void 0, function () {
52
52
  return __generator(this, function (_a) {
53
53
  return [2 /*return*/, RequestUtils.send(function () {
54
- return axios.patch(base + "/menus/admin/qrcodes", props.request, {
54
+ return axios.patch(base + "/menus/admin/tables", props.request, {
55
55
  headers: {
56
56
  'Authorization': "".concat(props.token)
57
57
  }
@@ -61,6 +61,6 @@ var PatchQRCodeAdminAPI = /** @class */ (function () {
61
61
  });
62
62
  });
63
63
  };
64
- return PatchQRCodeAdminAPI;
64
+ return PatchTableAdminAPI;
65
65
  }());
66
- export { PatchQRCodeAdminAPI };
66
+ export { PatchTableAdminAPI };
@@ -10,7 +10,7 @@ export declare namespace SearchOrdersAdminAPI {
10
10
  interface Request {
11
11
  timestamp: number;
12
12
  status: OrderStatus[];
13
- qrcodes?: string[] | undefined;
13
+ tables?: string[] | undefined;
14
14
  isLinkedToBill?: boolean | undefined;
15
15
  page: number;
16
16
  size?: number | undefined;
@@ -14,7 +14,7 @@ export declare namespace UpdateOrderAdminAPI {
14
14
  interface Request {
15
15
  id: string;
16
16
  status: OrderStatus;
17
- qrcodeId?: string | undefined;
17
+ tableId?: string | undefined;
18
18
  items: OrderItem[];
19
19
  }
20
20
  interface OrderItem {
@@ -1,7 +1,7 @@
1
1
  export interface CallWaiter {
2
2
  id: string;
3
- qrCodeLabel: string;
4
- qrCodeId: string;
3
+ tableLabel: string;
4
+ tableId: string;
5
5
  deviceId: string;
6
6
  status: CallWaiterStatus;
7
7
  createdAt: string;
@@ -3,18 +3,18 @@ export * from "./user/types/get-menu-response";
3
3
  export * from "./user/types/post-call-waiter-request";
4
4
  export * from "./user/types/post-order";
5
5
  export * from "./admin/api/create-orders-api";
6
- export * from "./admin/api/create-qrcodes-api";
6
+ export * from "./admin/api/create-tables-api";
7
7
  export * from "./admin/api/delete-categories-api";
8
8
  export * from "./admin/api/delete-products-api";
9
9
  export * from "./admin/api/get-menu-api";
10
10
  export * from "./admin/api/get-order-by-id-api";
11
11
  export * from "./admin/api/get-product-api";
12
- export * from "./admin/api/get-qrcodes-api";
12
+ export * from "./admin/api/get-tables-api";
13
13
  export * from "./admin/api/patch-categories-indices-api";
14
14
  export * from "./admin/api/patch-order-api";
15
15
  export * from "./admin/api/patch-product-api";
16
16
  export * from "./admin/api/patch-product-indices-api";
17
- export * from "./admin/api/patch-qrcodes-api";
17
+ export * from "./admin/api/patch-tables-api";
18
18
  export * from "./admin/api/search-orders-api";
19
19
  export * from "./admin/api/statistic/bills-recap-api";
20
20
  export * from "./admin/api/statistic/products-recap-api";
@@ -5,18 +5,18 @@ export * from "./user/types/post-call-waiter-request";
5
5
  export * from "./user/types/post-order";
6
6
  // admin module
7
7
  export * from "./admin/api/create-orders-api";
8
- export * from "./admin/api/create-qrcodes-api";
8
+ export * from "./admin/api/create-tables-api";
9
9
  export * from "./admin/api/delete-categories-api";
10
10
  export * from "./admin/api/delete-products-api";
11
11
  export * from "./admin/api/get-menu-api";
12
12
  export * from "./admin/api/get-order-by-id-api";
13
13
  export * from "./admin/api/get-product-api";
14
- export * from "./admin/api/get-qrcodes-api";
14
+ export * from "./admin/api/get-tables-api";
15
15
  export * from "./admin/api/patch-categories-indices-api";
16
16
  export * from "./admin/api/patch-order-api";
17
17
  export * from "./admin/api/patch-product-api";
18
18
  export * from "./admin/api/patch-product-indices-api";
19
- export * from "./admin/api/patch-qrcodes-api";
19
+ export * from "./admin/api/patch-tables-api";
20
20
  export * from "./admin/api/search-orders-api";
21
21
  export * from "./admin/api/statistic/bills-recap-api";
22
22
  export * from "./admin/api/statistic/products-recap-api";
@@ -1,7 +1,7 @@
1
1
  import { OrderStatus } from "../../enum";
2
2
  export interface Order {
3
3
  id: string;
4
- qrcode?: Order.Qrcode | undefined;
4
+ table?: Order.Table | undefined;
5
5
  deviceId?: string | undefined;
6
6
  billId?: string | undefined;
7
7
  status: OrderStatus;
@@ -10,7 +10,7 @@ export interface Order {
10
10
  items: Order.Item[];
11
11
  }
12
12
  export declare namespace Order {
13
- interface Qrcode {
13
+ interface Table {
14
14
  id: string;
15
15
  label: string;
16
16
  }
@@ -8,7 +8,7 @@ export declare class MenuGuestAPIs {
8
8
  /**
9
9
  *
10
10
  * @param props
11
- * @throws unauthorized_action, pending_limit_exceeded, item_unavailable, 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 , table_not_found, internal_error
12
12
  *
13
13
  * @returns
14
14
  */
@@ -36,7 +36,7 @@ export declare class MenuGuestAPIs {
36
36
  /**
37
37
  *
38
38
  * @param data
39
- * @throws unauthorized_action, pending_limit_exceeded, qrcode_not_found, internal_error
39
+ * @throws unauthorized_action, pending_limit_exceeded, table_not_found, internal_error
40
40
  * @returns
41
41
  */
42
42
  static callWaiter(data: PostCallWaiter): Promise<void>;
@@ -67,7 +67,7 @@ var MenuGuestAPIs = /** @class */ (function () {
67
67
  /**
68
68
  *
69
69
  * @param props
70
- * @throws unauthorized_action, pending_limit_exceeded, item_unavailable, 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 , table_not_found, internal_error
71
71
  *
72
72
  * @returns
73
73
  */
@@ -140,7 +140,7 @@ var MenuGuestAPIs = /** @class */ (function () {
140
140
  /**
141
141
  *
142
142
  * @param data
143
- * @throws unauthorized_action, pending_limit_exceeded, qrcode_not_found, internal_error
143
+ * @throws unauthorized_action, pending_limit_exceeded, table_not_found, internal_error
144
144
  * @returns
145
145
  */
146
146
  MenuGuestAPIs.callWaiter = function (data) {
@@ -1,4 +1,4 @@
1
1
  export interface PostCallWaiter {
2
2
  deviceId: string;
3
- qrCodeId: string;
3
+ tableId: string;
4
4
  }
@@ -1,5 +1,5 @@
1
1
  export interface OrderRequest {
2
- qrCodeId: string;
2
+ tableId: string;
3
3
  deviceId: string;
4
4
  name?: string | undefined;
5
5
  items: OrderRequestItem[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kiminix/tp-client",
3
- "version": "2.31.0",
3
+ "version": "2.32.0",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "files": [
@@ -28,4 +28,4 @@
28
28
  "date-fns": "^4.1.0",
29
29
  "purify-ts": "^2.1.0"
30
30
  }
31
- }
31
+ }
@@ -1,11 +0,0 @@
1
- export declare class GetQrCodesAdminAPI {
2
- static get(props: {
3
- token?: string;
4
- }): Promise<GetQrCodesAdminAPI.QrCode[]>;
5
- }
6
- export declare namespace GetQrCodesAdminAPI {
7
- interface QrCode {
8
- id: string;
9
- label: string;
10
- }
11
- }