@kiminix/tp-client 2.9.8 → 2.10.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.
- package/dist/menus/admin/admin-apis.d.ts +12 -6
- package/dist/menus/admin/admin-apis.js +30 -11
- package/dist/menus/admin/types/create-bill-request.d.ts +5 -0
- package/dist/menus/admin/types/create-bill-request.js +1 -0
- package/dist/menus/admin/types/get-bills-response.d.ts +1 -0
- package/dist/menus/admin/types/get-qrcodes-response.d.ts +4 -0
- package/dist/menus/admin/types/get-qrcodes-response.js +1 -0
- package/dist/menus/admin/types/search-orders-request.d.ts +10 -0
- package/dist/menus/admin/types/search-orders-request.js +1 -0
- package/dist/menus/index.d.ts +2 -0
- package/dist/menus/index.js +2 -0
- package/dist/menus/shared/types.d.ts +1 -1
- package/package.json +1 -1
|
@@ -5,6 +5,9 @@ import { Category } from "./types/get-menu-response";
|
|
|
5
5
|
import { Product } from "./types/get-product-response";
|
|
6
6
|
import { UpdateProductRequest } from "./types/update-product-request";
|
|
7
7
|
import { Bill } from "./types/get-bills-response";
|
|
8
|
+
import { QrCode } from "./types/get-qrcodes-response";
|
|
9
|
+
import { SearchOrdersApi } from "./types/search-orders-request";
|
|
10
|
+
import { CreateBillRequest } from "./types/create-bill-request";
|
|
8
11
|
export declare class MenuAdminAPIs {
|
|
9
12
|
static updateOrders(props: {
|
|
10
13
|
token?: string;
|
|
@@ -16,14 +19,14 @@ export declare class MenuAdminAPIs {
|
|
|
16
19
|
id: string;
|
|
17
20
|
status?: CallWaiterStatus;
|
|
18
21
|
}): Promise<undefined>;
|
|
19
|
-
static
|
|
22
|
+
static searchOrders(props: {
|
|
20
23
|
token?: string;
|
|
21
|
-
|
|
22
|
-
timestamp: number;
|
|
23
|
-
page: number;
|
|
24
|
-
size: number;
|
|
25
|
-
sort: "asc" | "desc";
|
|
24
|
+
request: SearchOrdersApi;
|
|
26
25
|
}): Promise<Order[]>;
|
|
26
|
+
static createBill(props: {
|
|
27
|
+
token?: string;
|
|
28
|
+
request: CreateBillRequest;
|
|
29
|
+
}): Promise<void>;
|
|
27
30
|
static getBills(props: {
|
|
28
31
|
token?: string;
|
|
29
32
|
timestamp: number;
|
|
@@ -55,4 +58,7 @@ export declare class MenuAdminAPIs {
|
|
|
55
58
|
token?: string;
|
|
56
59
|
request: UpdateProductRequest;
|
|
57
60
|
}): Promise<void>;
|
|
61
|
+
static getQrCodes(props: {
|
|
62
|
+
token?: string;
|
|
63
|
+
}): Promise<QrCode[]>;
|
|
58
64
|
}
|
|
@@ -75,20 +75,11 @@ var MenuAdminAPIs = /** @class */ (function () {
|
|
|
75
75
|
});
|
|
76
76
|
});
|
|
77
77
|
};
|
|
78
|
-
MenuAdminAPIs.
|
|
78
|
+
MenuAdminAPIs.searchOrders = function (props) {
|
|
79
79
|
return __awaiter(this, void 0, void 0, function () {
|
|
80
80
|
return __generator(this, function (_a) {
|
|
81
81
|
return [2 /*return*/, RequestUtils.send(function () {
|
|
82
|
-
|
|
83
|
-
"timestamp=".concat(props.timestamp),
|
|
84
|
-
"page=".concat(props.page),
|
|
85
|
-
"size=".concat(props.size),
|
|
86
|
-
"sort=".concat(props.sort),
|
|
87
|
-
props.status.map(function (value) { return "status=".concat(value); }).join('&')
|
|
88
|
-
]
|
|
89
|
-
.filter(function (value) { return value; })
|
|
90
|
-
.join("&");
|
|
91
|
-
return axios.get(base + "/menus/admin/orders?".concat(queryParams), {
|
|
82
|
+
return axios.post(base + "/menus/admin/orders", props.request, {
|
|
92
83
|
headers: {
|
|
93
84
|
'Authorization': "".concat(props.token)
|
|
94
85
|
}
|
|
@@ -98,6 +89,20 @@ var MenuAdminAPIs = /** @class */ (function () {
|
|
|
98
89
|
});
|
|
99
90
|
});
|
|
100
91
|
};
|
|
92
|
+
MenuAdminAPIs.createBill = function (props) {
|
|
93
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
94
|
+
return __generator(this, function (_a) {
|
|
95
|
+
return [2 /*return*/, RequestUtils.send(function () {
|
|
96
|
+
return axios.post(base + "/menus/admin/bills", props.request, {
|
|
97
|
+
headers: {
|
|
98
|
+
'Authorization': "".concat(props.token)
|
|
99
|
+
}
|
|
100
|
+
})
|
|
101
|
+
.then(function (_) { return undefined; });
|
|
102
|
+
})];
|
|
103
|
+
});
|
|
104
|
+
});
|
|
105
|
+
};
|
|
101
106
|
MenuAdminAPIs.getBills = function (props) {
|
|
102
107
|
return __awaiter(this, void 0, void 0, function () {
|
|
103
108
|
return __generator(this, function (_a) {
|
|
@@ -202,6 +207,20 @@ var MenuAdminAPIs = /** @class */ (function () {
|
|
|
202
207
|
});
|
|
203
208
|
});
|
|
204
209
|
};
|
|
210
|
+
MenuAdminAPIs.getQrCodes = function (props) {
|
|
211
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
212
|
+
return __generator(this, function (_a) {
|
|
213
|
+
return [2 /*return*/, RequestUtils.send(function () {
|
|
214
|
+
return axios.get(base + "/menus/admin/qrcodes", {
|
|
215
|
+
headers: {
|
|
216
|
+
'Authorization': "".concat(props.token)
|
|
217
|
+
}
|
|
218
|
+
})
|
|
219
|
+
.then(function (response) { return response.data; });
|
|
220
|
+
})];
|
|
221
|
+
});
|
|
222
|
+
});
|
|
223
|
+
};
|
|
205
224
|
return MenuAdminAPIs;
|
|
206
225
|
}());
|
|
207
226
|
export { MenuAdminAPIs };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { OrderStatus } from "../../../enum";
|
|
2
|
+
export interface SearchOrdersApi {
|
|
3
|
+
timestamp: number;
|
|
4
|
+
status: OrderStatus[];
|
|
5
|
+
qrcodes: string[];
|
|
6
|
+
isLinkedToBill?: boolean | undefined;
|
|
7
|
+
page: number;
|
|
8
|
+
size?: number | undefined;
|
|
9
|
+
sort: "asc" | "desc";
|
|
10
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/menus/index.d.ts
CHANGED
|
@@ -8,5 +8,7 @@ import * as AdminMenuResponse from "./admin/types/get-menu-response";
|
|
|
8
8
|
export { AdminMenuResponse };
|
|
9
9
|
import * as AdminProductResponse from "./admin/types/get-product-response";
|
|
10
10
|
export { AdminProductResponse };
|
|
11
|
+
import * as AdminQrCodesResponse from "./admin/types/get-qrcodes-response";
|
|
12
|
+
export { AdminQrCodesResponse };
|
|
11
13
|
export { MenuAdminAPIs } from './admin/admin-apis';
|
|
12
14
|
export * from "./shared/types";
|
package/dist/menus/index.js
CHANGED
|
@@ -12,6 +12,8 @@ export { AdminMenuResponse };
|
|
|
12
12
|
// export api of get product
|
|
13
13
|
import * as AdminProductResponse from "./admin/types/get-product-response";
|
|
14
14
|
export { AdminProductResponse };
|
|
15
|
+
import * as AdminQrCodesResponse from "./admin/types/get-qrcodes-response";
|
|
16
|
+
export { AdminQrCodesResponse };
|
|
15
17
|
export { MenuAdminAPIs } from './admin/admin-apis';
|
|
16
18
|
// shared module
|
|
17
19
|
export * from "./shared/types";
|