@kiminix/tp-client 2.9.5 → 2.9.6
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 +5 -0
- package/dist/menus/admin/admin-apis.js +14 -0
- package/dist/menus/admin/types/get-menu-response.d.ts +1 -0
- package/dist/menus/admin/types/get-product-response.d.ts +20 -0
- package/dist/menus/admin/types/get-product-response.js +6 -0
- package/dist/menus/index.d.ts +2 -0
- package/dist/menus/index.js +4 -0
- package/package.json +1 -1
|
@@ -2,6 +2,7 @@ import { Order } from "../shared/types";
|
|
|
2
2
|
import { OrderStatus } from "../../enum";
|
|
3
3
|
import { CallWaiter, CallWaiterStatus } from "./types/get-calls-response";
|
|
4
4
|
import { Category } from "./types/get-menu-response";
|
|
5
|
+
import { Product } from "./types/get-product-response";
|
|
5
6
|
export declare class MenuAdminAPIs {
|
|
6
7
|
static updateOrders(props: {
|
|
7
8
|
token?: string;
|
|
@@ -37,4 +38,8 @@ export declare class MenuAdminAPIs {
|
|
|
37
38
|
static getMenu(props: {
|
|
38
39
|
token?: string;
|
|
39
40
|
}): Promise<Category[]>;
|
|
41
|
+
static getProduct(props: {
|
|
42
|
+
token?: string;
|
|
43
|
+
id: string;
|
|
44
|
+
}): Promise<Product>;
|
|
40
45
|
}
|
|
@@ -152,6 +152,20 @@ var MenuAdminAPIs = /** @class */ (function () {
|
|
|
152
152
|
});
|
|
153
153
|
});
|
|
154
154
|
};
|
|
155
|
+
MenuAdminAPIs.getProduct = function (props) {
|
|
156
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
157
|
+
return __generator(this, function (_a) {
|
|
158
|
+
return [2 /*return*/, RequestUtils.send(function () {
|
|
159
|
+
return axios.get(base + "/menus/admin/products/".concat(props.id), {
|
|
160
|
+
headers: {
|
|
161
|
+
'Authorization': "".concat(props.token)
|
|
162
|
+
}
|
|
163
|
+
})
|
|
164
|
+
.then(function (response) { return response.data; });
|
|
165
|
+
})];
|
|
166
|
+
});
|
|
167
|
+
});
|
|
168
|
+
};
|
|
155
169
|
return MenuAdminAPIs;
|
|
156
170
|
}());
|
|
157
171
|
export { MenuAdminAPIs };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export declare class Product {
|
|
2
|
+
id: string;
|
|
3
|
+
label: string;
|
|
4
|
+
category: Category;
|
|
5
|
+
description?: string;
|
|
6
|
+
picture: string;
|
|
7
|
+
variants: Variant[];
|
|
8
|
+
}
|
|
9
|
+
export interface Category {
|
|
10
|
+
id: string;
|
|
11
|
+
label: string;
|
|
12
|
+
isPublic: boolean;
|
|
13
|
+
}
|
|
14
|
+
export interface Variant {
|
|
15
|
+
id: string;
|
|
16
|
+
label?: string;
|
|
17
|
+
isAvailable: boolean;
|
|
18
|
+
price: number;
|
|
19
|
+
discount?: number;
|
|
20
|
+
}
|
package/dist/menus/index.d.ts
CHANGED
|
@@ -6,5 +6,7 @@ export { MenuGuestAPIs } from './user/guest-apis';
|
|
|
6
6
|
export * from "./admin/types/get-calls-response";
|
|
7
7
|
import * as AdminMenuResponse from "./admin/types/get-menu-response";
|
|
8
8
|
export { AdminMenuResponse };
|
|
9
|
+
import * as AdminProductResponse from "./admin/types/get-product-response";
|
|
10
|
+
export { AdminProductResponse };
|
|
9
11
|
export { MenuAdminAPIs } from './admin/admin-apis';
|
|
10
12
|
export * from "./shared/types";
|
package/dist/menus/index.js
CHANGED
|
@@ -6,8 +6,12 @@ export * from "./user/types/post-call-waiter-request";
|
|
|
6
6
|
export { MenuGuestAPIs } from './user/guest-apis';
|
|
7
7
|
// admin module
|
|
8
8
|
export * from "./admin/types/get-calls-response";
|
|
9
|
+
// export api of get calls
|
|
9
10
|
import * as AdminMenuResponse from "./admin/types/get-menu-response";
|
|
10
11
|
export { AdminMenuResponse };
|
|
12
|
+
// export api of get product
|
|
13
|
+
import * as AdminProductResponse from "./admin/types/get-product-response";
|
|
14
|
+
export { AdminProductResponse };
|
|
11
15
|
export { MenuAdminAPIs } from './admin/admin-apis';
|
|
12
16
|
// shared module
|
|
13
17
|
export * from "./shared/types";
|