@kiminix/tp-client 2.9.7 → 2.9.9
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 -3
- package/dist/menus/admin/admin-apis.js +31 -4
- package/dist/menus/admin/types/get-bills-response.d.ts +10 -0
- package/dist/menus/admin/types/get-bills-response.js +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 +9 -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/package.json +1 -1
|
@@ -4,6 +4,9 @@ import { CallWaiter, CallWaiterStatus } from "./types/get-calls-response";
|
|
|
4
4
|
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
|
+
import { Bill } from "./types/get-bills-response";
|
|
8
|
+
import { QrCode } from "./types/get-qrcodes-response";
|
|
9
|
+
import { SearchOrdersApi } from "./types/search-orders-request";
|
|
7
10
|
export declare class MenuAdminAPIs {
|
|
8
11
|
static updateOrders(props: {
|
|
9
12
|
token?: string;
|
|
@@ -15,14 +18,17 @@ export declare class MenuAdminAPIs {
|
|
|
15
18
|
id: string;
|
|
16
19
|
status?: CallWaiterStatus;
|
|
17
20
|
}): Promise<undefined>;
|
|
18
|
-
static
|
|
21
|
+
static searchOrders(props: {
|
|
22
|
+
token?: string;
|
|
23
|
+
request: SearchOrdersApi;
|
|
24
|
+
}): Promise<Order[]>;
|
|
25
|
+
static getBills(props: {
|
|
19
26
|
token?: string;
|
|
20
|
-
status: OrderStatus[];
|
|
21
27
|
timestamp: number;
|
|
22
28
|
page: number;
|
|
23
29
|
size: number;
|
|
24
30
|
sort: "asc" | "desc";
|
|
25
|
-
}): Promise<
|
|
31
|
+
}): Promise<Bill[]>;
|
|
26
32
|
static getCalls(props: {
|
|
27
33
|
token?: string;
|
|
28
34
|
status: CallWaiterStatus[];
|
|
@@ -47,4 +53,7 @@ export declare class MenuAdminAPIs {
|
|
|
47
53
|
token?: string;
|
|
48
54
|
request: UpdateProductRequest;
|
|
49
55
|
}): Promise<void>;
|
|
56
|
+
static getQrCodes(props: {
|
|
57
|
+
token?: string;
|
|
58
|
+
}): Promise<QrCode[]>;
|
|
50
59
|
}
|
|
@@ -75,7 +75,21 @@ var MenuAdminAPIs = /** @class */ (function () {
|
|
|
75
75
|
});
|
|
76
76
|
});
|
|
77
77
|
};
|
|
78
|
-
MenuAdminAPIs.
|
|
78
|
+
MenuAdminAPIs.searchOrders = function (props) {
|
|
79
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
80
|
+
return __generator(this, function (_a) {
|
|
81
|
+
return [2 /*return*/, RequestUtils.send(function () {
|
|
82
|
+
return axios.post(base + "/menus/admin/orders", props.request, {
|
|
83
|
+
headers: {
|
|
84
|
+
'Authorization': "".concat(props.token)
|
|
85
|
+
}
|
|
86
|
+
})
|
|
87
|
+
.then(function (response) { return response.data; });
|
|
88
|
+
})];
|
|
89
|
+
});
|
|
90
|
+
});
|
|
91
|
+
};
|
|
92
|
+
MenuAdminAPIs.getBills = function (props) {
|
|
79
93
|
return __awaiter(this, void 0, void 0, function () {
|
|
80
94
|
return __generator(this, function (_a) {
|
|
81
95
|
return [2 /*return*/, RequestUtils.send(function () {
|
|
@@ -83,12 +97,11 @@ var MenuAdminAPIs = /** @class */ (function () {
|
|
|
83
97
|
"timestamp=".concat(props.timestamp),
|
|
84
98
|
"page=".concat(props.page),
|
|
85
99
|
"size=".concat(props.size),
|
|
86
|
-
"sort=".concat(props.sort)
|
|
87
|
-
props.status.map(function (value) { return "status=".concat(value); }).join('&')
|
|
100
|
+
"sort=".concat(props.sort)
|
|
88
101
|
]
|
|
89
102
|
.filter(function (value) { return value; })
|
|
90
103
|
.join("&");
|
|
91
|
-
return axios.get(base + "/menus/admin/
|
|
104
|
+
return axios.get(base + "/menus/admin/bills?".concat(queryParams), {
|
|
92
105
|
headers: {
|
|
93
106
|
'Authorization': "".concat(props.token)
|
|
94
107
|
}
|
|
@@ -180,6 +193,20 @@ var MenuAdminAPIs = /** @class */ (function () {
|
|
|
180
193
|
});
|
|
181
194
|
});
|
|
182
195
|
};
|
|
196
|
+
MenuAdminAPIs.getQrCodes = function (props) {
|
|
197
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
198
|
+
return __generator(this, function (_a) {
|
|
199
|
+
return [2 /*return*/, RequestUtils.send(function () {
|
|
200
|
+
return axios.get(base + "/menus/admin/qrcodes", {
|
|
201
|
+
headers: {
|
|
202
|
+
'Authorization': "".concat(props.token)
|
|
203
|
+
}
|
|
204
|
+
})
|
|
205
|
+
.then(function (response) { return response.data; });
|
|
206
|
+
})];
|
|
207
|
+
});
|
|
208
|
+
});
|
|
209
|
+
};
|
|
183
210
|
return MenuAdminAPIs;
|
|
184
211
|
}());
|
|
185
212
|
export { MenuAdminAPIs };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -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";
|