@kiminix/tp-client 2.39.0 → 2.40.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.
@@ -15,6 +15,8 @@ export declare namespace CreateOrdersAdminAPI {
15
15
  interface Request {
16
16
  tableId?: string | undefined;
17
17
  items: OrderItem[];
18
+ name?: string | undefined;
19
+ message?: string | undefined;
18
20
  }
19
21
  interface OrderItem {
20
22
  productId: string;
@@ -0,0 +1,22 @@
1
+ import { CallWaiterStatus, Table } from "../../shared/types";
2
+ export declare class GetCallsWaiterAdminAPI {
3
+ static get(props: {
4
+ token?: string;
5
+ status: CallWaiterStatus[];
6
+ timestamp: number;
7
+ page: number;
8
+ size: number;
9
+ sort: "asc" | "desc";
10
+ }): Promise<GetCallsWaiterAdminAPI.Response[]>;
11
+ }
12
+ export declare namespace GetCallsWaiterAdminAPI {
13
+ interface Response {
14
+ id: string;
15
+ table: Table;
16
+ deviceId: string;
17
+ name?: string | undefined;
18
+ message?: string | undefined;
19
+ status: CallWaiterStatus;
20
+ createdAt: string;
21
+ }
22
+ }
@@ -35,30 +35,12 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
35
35
  }
36
36
  };
37
37
  import axios from "axios";
38
- import { base } from "../../constants";
39
- import { RequestUtils } from "../../utils/request-utils";
40
- // Admin APIS
41
- var MenuAdminAPIs = /** @class */ (function () {
42
- function MenuAdminAPIs() {
38
+ import { base } from "../../../constants";
39
+ import { RequestUtils } from "../../../utils/request-utils";
40
+ var GetCallsWaiterAdminAPI = /** @class */ (function () {
41
+ function GetCallsWaiterAdminAPI() {
43
42
  }
44
- MenuAdminAPIs.updateCalls = 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/calls", {
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.getCalls = function (props) {
43
+ GetCallsWaiterAdminAPI.get = function (props) {
62
44
  return __awaiter(this, void 0, void 0, function () {
63
45
  return __generator(this, function (_a) {
64
46
  return [2 /*return*/, RequestUtils.send(function () {
@@ -81,23 +63,6 @@ var MenuAdminAPIs = /** @class */ (function () {
81
63
  });
82
64
  });
83
65
  };
84
- MenuAdminAPIs.setUnauthorizedDevice = function (props) {
85
- return __awaiter(this, void 0, void 0, function () {
86
- return __generator(this, function (_a) {
87
- return [2 /*return*/, RequestUtils.send(function () {
88
- return axios.post(base + "/menus/admin/unauthorized", {
89
- deviceId: props.deviceId,
90
- tableId: props.tableId
91
- }, {
92
- headers: {
93
- 'Authorization': "".concat(props.token)
94
- }
95
- })
96
- .then(function (_) { return undefined; });
97
- })];
98
- });
99
- });
100
- };
101
- return MenuAdminAPIs;
66
+ return GetCallsWaiterAdminAPI;
102
67
  }());
103
- export { MenuAdminAPIs };
68
+ export { GetCallsWaiterAdminAPI };
@@ -0,0 +1,7 @@
1
+ export declare class SetUnauthorizedAdminAPIs {
2
+ static set(props: {
3
+ token?: string;
4
+ deviceId: string;
5
+ tableId: string;
6
+ }): Promise<undefined>;
7
+ }
@@ -0,0 +1,63 @@
1
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
+ return new (P || (P = Promise))(function (resolve, reject) {
4
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
8
+ });
9
+ };
10
+ var __generator = (this && this.__generator) || function (thisArg, body) {
11
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
12
+ return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
13
+ function verb(n) { return function (v) { return step([n, v]); }; }
14
+ function step(op) {
15
+ if (f) throw new TypeError("Generator is already executing.");
16
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
17
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
18
+ if (y = 0, t) op = [op[0] & 2, t.value];
19
+ switch (op[0]) {
20
+ case 0: case 1: t = op; break;
21
+ case 4: _.label++; return { value: op[1], done: false };
22
+ case 5: _.label++; y = op[1]; op = [0]; continue;
23
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
24
+ default:
25
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
26
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
27
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
28
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
29
+ if (t[2]) _.ops.pop();
30
+ _.trys.pop(); continue;
31
+ }
32
+ op = body.call(thisArg, _);
33
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
34
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
35
+ }
36
+ };
37
+ import axios from "axios";
38
+ import { base } from "../../../constants";
39
+ import { RequestUtils } from "../../../utils/request-utils";
40
+ // Admin APIS
41
+ var SetUnauthorizedAdminAPIs = /** @class */ (function () {
42
+ function SetUnauthorizedAdminAPIs() {
43
+ }
44
+ SetUnauthorizedAdminAPIs.set = 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.post(base + "/menus/admin/unauthorized", {
49
+ deviceId: props.deviceId,
50
+ tableId: props.tableId
51
+ }, {
52
+ headers: {
53
+ 'Authorization': "".concat(props.token)
54
+ }
55
+ })
56
+ .then(function (_) { return undefined; });
57
+ })];
58
+ });
59
+ });
60
+ };
61
+ return SetUnauthorizedAdminAPIs;
62
+ }());
63
+ export { SetUnauthorizedAdminAPIs };
@@ -0,0 +1,19 @@
1
+ import { CallWaiterStatus, Table } from "../../shared/types";
2
+ export declare class UpdateCallsWaiterAdminAPI {
3
+ static update(props: {
4
+ token?: string;
5
+ id: string;
6
+ status?: CallWaiterStatus;
7
+ }): Promise<undefined>;
8
+ }
9
+ export declare namespace UpdateCallsWaiterAdminAPI {
10
+ interface Response {
11
+ id: string;
12
+ table: Table;
13
+ deviceId: string;
14
+ name?: string | undefined;
15
+ message?: string | undefined;
16
+ status: CallWaiterStatus;
17
+ createdAt: string;
18
+ }
19
+ }
@@ -0,0 +1,62 @@
1
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
+ return new (P || (P = Promise))(function (resolve, reject) {
4
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
8
+ });
9
+ };
10
+ var __generator = (this && this.__generator) || function (thisArg, body) {
11
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
12
+ return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
13
+ function verb(n) { return function (v) { return step([n, v]); }; }
14
+ function step(op) {
15
+ if (f) throw new TypeError("Generator is already executing.");
16
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
17
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
18
+ if (y = 0, t) op = [op[0] & 2, t.value];
19
+ switch (op[0]) {
20
+ case 0: case 1: t = op; break;
21
+ case 4: _.label++; return { value: op[1], done: false };
22
+ case 5: _.label++; y = op[1]; op = [0]; continue;
23
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
24
+ default:
25
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
26
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
27
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
28
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
29
+ if (t[2]) _.ops.pop();
30
+ _.trys.pop(); continue;
31
+ }
32
+ op = body.call(thisArg, _);
33
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
34
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
35
+ }
36
+ };
37
+ import axios from "axios";
38
+ import { base } from "../../../constants";
39
+ import { RequestUtils } from "../../../utils/request-utils";
40
+ var UpdateCallsWaiterAdminAPI = /** @class */ (function () {
41
+ function UpdateCallsWaiterAdminAPI() {
42
+ }
43
+ UpdateCallsWaiterAdminAPI.update = function (props) {
44
+ return __awaiter(this, void 0, void 0, function () {
45
+ return __generator(this, function (_a) {
46
+ return [2 /*return*/, RequestUtils.send(function () {
47
+ return axios.patch(base + "/menus/admin/calls", {
48
+ id: props.id,
49
+ status: props.status
50
+ }, {
51
+ headers: {
52
+ 'Authorization': "".concat(props.token)
53
+ }
54
+ })
55
+ .then(function (_) { return undefined; });
56
+ })];
57
+ });
58
+ });
59
+ };
60
+ return UpdateCallsWaiterAdminAPI;
61
+ }());
62
+ export { UpdateCallsWaiterAdminAPI };
@@ -1,7 +1,7 @@
1
1
  export { MenuGuestAPIs } from './user/guest-apis';
2
+ export { CallWaiterGuestAPI } from './user/api/call-waiter-api';
3
+ export { CreateOrdersGuestAPI } from './user/api/create-orders-api';
2
4
  export * from "./user/types/get-menu-response";
3
- export * from "./user/types/post-call-waiter-request";
4
- export * from "./user/types/post-order";
5
5
  export * from "./admin/api/create-orders-api";
6
6
  export * from "./admin/api/delete-categories-api";
7
7
  export * from "./admin/api/delete-products-api";
@@ -18,7 +18,8 @@ export * from "./admin/api/statistic/products-recap-api";
18
18
  export * from "./admin/api/update-order-api";
19
19
  export * from "./admin/api/upsert-categories-api";
20
20
  export * from "./admin/api/upsert-product-api";
21
- export * from "./admin/types/get-calls-response";
22
- export { MenuAdminAPIs } from './admin/admin-apis';
21
+ export { GetCallsWaiterAdminAPI } from './admin/api/get-calls-waiter-api';
22
+ export { UpdateCallsWaiterAdminAPI } from './admin/api/update-calls-waiter-api';
23
+ export { SetUnauthorizedAdminAPIs } from './admin/api/set-unauthorized-device-api';
23
24
  export * from "./shared/types";
24
25
  export * from "./shared/utils";
@@ -1,8 +1,8 @@
1
1
  // user module
2
2
  export { MenuGuestAPIs } from './user/guest-apis';
3
+ export { CallWaiterGuestAPI } from './user/api/call-waiter-api';
4
+ export { CreateOrdersGuestAPI } from './user/api/create-orders-api';
3
5
  export * from "./user/types/get-menu-response";
4
- export * from "./user/types/post-call-waiter-request";
5
- export * from "./user/types/post-order";
6
6
  // admin module
7
7
  export * from "./admin/api/create-orders-api";
8
8
  export * from "./admin/api/delete-categories-api";
@@ -20,8 +20,9 @@ export * from "./admin/api/statistic/products-recap-api";
20
20
  export * from "./admin/api/update-order-api";
21
21
  export * from "./admin/api/upsert-categories-api";
22
22
  export * from "./admin/api/upsert-product-api";
23
- export * from "./admin/types/get-calls-response";
24
- export { MenuAdminAPIs } from './admin/admin-apis';
23
+ export { GetCallsWaiterAdminAPI } from './admin/api/get-calls-waiter-api';
24
+ export { UpdateCallsWaiterAdminAPI } from './admin/api/update-calls-waiter-api';
25
+ export { SetUnauthorizedAdminAPIs } from './admin/api/set-unauthorized-device-api';
25
26
  // shared module
26
27
  export * from "./shared/types";
27
28
  export * from "./shared/utils";
@@ -28,3 +28,7 @@ export interface Table {
28
28
  areaId?: string | undefined;
29
29
  areaLabel?: string | undefined;
30
30
  }
31
+ export declare enum CallWaiterStatus {
32
+ Pending = "pending",
33
+ Completed = "completed"
34
+ }
@@ -1 +1,5 @@
1
- export {};
1
+ export var CallWaiterStatus;
2
+ (function (CallWaiterStatus) {
3
+ CallWaiterStatus["Pending"] = "pending";
4
+ CallWaiterStatus["Completed"] = "completed";
5
+ })(CallWaiterStatus || (CallWaiterStatus = {}));
@@ -0,0 +1,17 @@
1
+ export declare class CallWaiterGuestAPI {
2
+ /**
3
+ *
4
+ * @param data
5
+ * @throws unauthorized_action, pending_limit_exceeded, table_not_found, internal_error
6
+ * @returns
7
+ */
8
+ static call(data: CallWaiterGuestAPI.Request): Promise<void>;
9
+ }
10
+ export declare namespace CallWaiterGuestAPI {
11
+ interface Request {
12
+ deviceId: string;
13
+ tableId: string;
14
+ name?: string | undefined;
15
+ message?: string | undefined;
16
+ }
17
+ }
@@ -0,0 +1,65 @@
1
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
+ return new (P || (P = Promise))(function (resolve, reject) {
4
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
8
+ });
9
+ };
10
+ var __generator = (this && this.__generator) || function (thisArg, body) {
11
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
12
+ return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
13
+ function verb(n) { return function (v) { return step([n, v]); }; }
14
+ function step(op) {
15
+ if (f) throw new TypeError("Generator is already executing.");
16
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
17
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
18
+ if (y = 0, t) op = [op[0] & 2, t.value];
19
+ switch (op[0]) {
20
+ case 0: case 1: t = op; break;
21
+ case 4: _.label++; return { value: op[1], done: false };
22
+ case 5: _.label++; y = op[1]; op = [0]; continue;
23
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
24
+ default:
25
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
26
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
27
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
28
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
29
+ if (t[2]) _.ops.pop();
30
+ _.trys.pop(); continue;
31
+ }
32
+ op = body.call(thisArg, _);
33
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
34
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
35
+ }
36
+ };
37
+ import axios from "axios";
38
+ import { base } from "../../../constants";
39
+ import { RequestUtils } from "../../../utils/request-utils";
40
+ var CallWaiterGuestAPI = /** @class */ (function () {
41
+ function CallWaiterGuestAPI() {
42
+ }
43
+ /**
44
+ *
45
+ * @param data
46
+ * @throws unauthorized_action, pending_limit_exceeded, table_not_found, internal_error
47
+ * @returns
48
+ */
49
+ CallWaiterGuestAPI.call = function (data) {
50
+ return __awaiter(this, void 0, void 0, function () {
51
+ return __generator(this, function (_a) {
52
+ return [2 /*return*/, RequestUtils.send(function () {
53
+ return axios.post(base + "/menus/guest/call-waiter", data, {
54
+ headers: {
55
+ 'Content-Type': 'application/json'
56
+ }
57
+ })
58
+ .then(function (_) { return undefined; });
59
+ })];
60
+ });
61
+ });
62
+ };
63
+ return CallWaiterGuestAPI;
64
+ }());
65
+ export { CallWaiterGuestAPI };
@@ -0,0 +1,27 @@
1
+ export declare class CreateOrdersGuestAPI {
2
+ /**
3
+ *
4
+ * @param props
5
+ * @throws unauthorized_action, pending_limit_exceeded, item_unavailable, item_not_found, variant_not_found , table_not_found, internal_error
6
+ *
7
+ * @returns
8
+ */
9
+ static create(props: CreateOrdersGuestAPI.Request): Promise<CreateOrdersGuestAPI.Response>;
10
+ }
11
+ export declare namespace CreateOrdersGuestAPI {
12
+ interface Request {
13
+ tableId: string;
14
+ deviceId: string;
15
+ items: OrderRequestItem[];
16
+ name?: string | undefined;
17
+ message?: string | undefined;
18
+ }
19
+ interface OrderRequestItem {
20
+ productId: string;
21
+ variantId: string;
22
+ quantity: number;
23
+ }
24
+ interface Response {
25
+ id: string;
26
+ }
27
+ }
@@ -0,0 +1,66 @@
1
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
+ return new (P || (P = Promise))(function (resolve, reject) {
4
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
8
+ });
9
+ };
10
+ var __generator = (this && this.__generator) || function (thisArg, body) {
11
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
12
+ return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
13
+ function verb(n) { return function (v) { return step([n, v]); }; }
14
+ function step(op) {
15
+ if (f) throw new TypeError("Generator is already executing.");
16
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
17
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
18
+ if (y = 0, t) op = [op[0] & 2, t.value];
19
+ switch (op[0]) {
20
+ case 0: case 1: t = op; break;
21
+ case 4: _.label++; return { value: op[1], done: false };
22
+ case 5: _.label++; y = op[1]; op = [0]; continue;
23
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
24
+ default:
25
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
26
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
27
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
28
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
29
+ if (t[2]) _.ops.pop();
30
+ _.trys.pop(); continue;
31
+ }
32
+ op = body.call(thisArg, _);
33
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
34
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
35
+ }
36
+ };
37
+ import axios from "axios";
38
+ import { base } from "../../../constants";
39
+ import { RequestUtils } from "../../../utils/request-utils";
40
+ var CreateOrdersGuestAPI = /** @class */ (function () {
41
+ function CreateOrdersGuestAPI() {
42
+ }
43
+ /**
44
+ *
45
+ * @param props
46
+ * @throws unauthorized_action, pending_limit_exceeded, item_unavailable, item_not_found, variant_not_found , table_not_found, internal_error
47
+ *
48
+ * @returns
49
+ */
50
+ CreateOrdersGuestAPI.create = function (props) {
51
+ return __awaiter(this, void 0, void 0, function () {
52
+ return __generator(this, function (_a) {
53
+ return [2 /*return*/, RequestUtils.send(function () {
54
+ return axios.post(base + "/menus/guest/orders", props, {
55
+ headers: {
56
+ 'Content-Type': 'application/json'
57
+ }
58
+ })
59
+ .then(function (response) { return response.data; });
60
+ })];
61
+ });
62
+ });
63
+ };
64
+ return CreateOrdersGuestAPI;
65
+ }());
66
+ export { CreateOrdersGuestAPI };
@@ -1,18 +1,8 @@
1
1
  import { Order } from "../shared/types";
2
2
  import { GetBusinessIdResponse } from "./types/get-business-response";
3
3
  import { Menu } from "./types/get-menu-response";
4
- import { PostCallWaiter } from "./types/post-call-waiter-request";
5
- import { OrderRequest, OrderResponse } from "./types/post-order";
6
4
  export declare class MenuGuestAPIs {
7
5
  static getOrders(businessId: string, deviceId: string, timestamp: number, page?: number, size?: number): Promise<Order[]>;
8
- /**
9
- *
10
- * @param props
11
- * @throws unauthorized_action, pending_limit_exceeded, item_unavailable, item_not_found, variant_not_found , table_not_found, internal_error
12
- *
13
- * @returns
14
- */
15
- static order(props: OrderRequest): Promise<OrderResponse>;
16
6
  /**
17
7
  *
18
8
  * @param props
@@ -33,11 +23,4 @@ export declare class MenuGuestAPIs {
33
23
  business_identifier: string;
34
24
  table_id?: string | undefined;
35
25
  }): Promise<Menu>;
36
- /**
37
- *
38
- * @param data
39
- * @throws unauthorized_action, pending_limit_exceeded, table_not_found, internal_error
40
- * @returns
41
- */
42
- static callWaiter(data: PostCallWaiter): Promise<void>;
43
26
  }
@@ -64,27 +64,6 @@ var MenuGuestAPIs = /** @class */ (function () {
64
64
  });
65
65
  });
66
66
  };
67
- /**
68
- *
69
- * @param props
70
- * @throws unauthorized_action, pending_limit_exceeded, item_unavailable, item_not_found, variant_not_found , table_not_found, internal_error
71
- *
72
- * @returns
73
- */
74
- MenuGuestAPIs.order = function (props) {
75
- return __awaiter(this, void 0, void 0, function () {
76
- return __generator(this, function (_a) {
77
- return [2 /*return*/, RequestUtils.send(function () {
78
- return axios.post(base + "/menus/guest/orders", props, {
79
- headers: {
80
- 'Content-Type': 'application/json'
81
- }
82
- })
83
- .then(function (response) { return response.data; });
84
- })];
85
- });
86
- });
87
- };
88
67
  /**
89
68
  *
90
69
  * @param props
@@ -137,26 +116,6 @@ var MenuGuestAPIs = /** @class */ (function () {
137
116
  });
138
117
  });
139
118
  };
140
- /**
141
- *
142
- * @param data
143
- * @throws unauthorized_action, pending_limit_exceeded, table_not_found, internal_error
144
- * @returns
145
- */
146
- MenuGuestAPIs.callWaiter = function (data) {
147
- return __awaiter(this, void 0, void 0, function () {
148
- return __generator(this, function (_a) {
149
- return [2 /*return*/, RequestUtils.send(function () {
150
- return axios.post(base + "/menus/guest/call-waiter", data, {
151
- headers: {
152
- 'Content-Type': 'application/json'
153
- }
154
- })
155
- .then(function (_) { return undefined; });
156
- })];
157
- });
158
- });
159
- };
160
119
  return MenuGuestAPIs;
161
120
  }());
162
121
  export { MenuGuestAPIs };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kiminix/tp-client",
3
- "version": "2.39.0",
3
+ "version": "2.40.0",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "files": [
@@ -1,21 +0,0 @@
1
- import { CallWaiter, CallWaiterStatus } from "./types/get-calls-response";
2
- export declare class MenuAdminAPIs {
3
- static updateCalls(props: {
4
- token?: string;
5
- id: string;
6
- status?: CallWaiterStatus;
7
- }): Promise<undefined>;
8
- static getCalls(props: {
9
- token?: string;
10
- status: CallWaiterStatus[];
11
- timestamp: number;
12
- page: number;
13
- size: number;
14
- sort: "asc" | "desc";
15
- }): Promise<CallWaiter[]>;
16
- static setUnauthorizedDevice(props: {
17
- token?: string;
18
- deviceId: string;
19
- tableId: string;
20
- }): Promise<undefined>;
21
- }
@@ -1,12 +0,0 @@
1
- import { Table } from "../../shared/types";
2
- export interface CallWaiter {
3
- id: string;
4
- table: Table;
5
- deviceId: string;
6
- status: CallWaiterStatus;
7
- createdAt: string;
8
- }
9
- export declare enum CallWaiterStatus {
10
- Pending = "pending",
11
- Completed = "completed"
12
- }
@@ -1,5 +0,0 @@
1
- export var CallWaiterStatus;
2
- (function (CallWaiterStatus) {
3
- CallWaiterStatus["Pending"] = "pending";
4
- CallWaiterStatus["Completed"] = "completed";
5
- })(CallWaiterStatus || (CallWaiterStatus = {}));
@@ -1,4 +0,0 @@
1
- export interface PostCallWaiter {
2
- deviceId: string;
3
- tableId: string;
4
- }
@@ -1 +0,0 @@
1
- export {};
@@ -1,14 +0,0 @@
1
- export interface OrderRequest {
2
- tableId: string;
3
- deviceId: string;
4
- name?: string | undefined;
5
- items: OrderRequestItem[];
6
- }
7
- export interface OrderRequestItem {
8
- productId: string;
9
- variantId: string;
10
- quantity: number;
11
- }
12
- export interface OrderResponse {
13
- id: string;
14
- }
@@ -1 +0,0 @@
1
- export {};