@kiminix/tp-client 2.26.0 → 2.27.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/business/types/get-id.d.ts +2 -6
- package/dist/business/types/shared.d.ts +4 -0
- package/dist/menus/index.d.ts +13 -14
- package/dist/menus/index.js +13 -14
- package/dist/menus/user/guest-apis.d.ts +11 -9
- package/dist/menus/user/guest-apis.js +13 -5
- package/dist/menus/user/types/get-business-response.d.ts +5 -0
- package/dist/menus/user/types/get-menu-response.d.ts +8 -2
- package/package.json +1 -1
- package/dist/menus/user/types/get-qrcode-response.d.ts +0 -6
- /package/dist/menus/user/types/{get-qrcode-response.js → get-business-response.js} +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Licence } from "../../types";
|
|
2
|
-
import { OpeningHours, TelegramConfig } from "./shared";
|
|
2
|
+
import { OpeningHours, TelegramConfig, Template } from "./shared";
|
|
3
3
|
export interface Business {
|
|
4
4
|
id: string;
|
|
5
5
|
identifier: string;
|
|
@@ -20,9 +20,5 @@ export interface Business {
|
|
|
20
20
|
openingHours: OpeningHours | undefined;
|
|
21
21
|
specialities: string[] | undefined;
|
|
22
22
|
telegram?: TelegramConfig | undefined;
|
|
23
|
-
template
|
|
24
|
-
}
|
|
25
|
-
export interface Template {
|
|
26
|
-
id: string;
|
|
27
|
-
theme?: string | undefined;
|
|
23
|
+
template: Template;
|
|
28
24
|
}
|
package/dist/menus/index.d.ts
CHANGED
|
@@ -1,28 +1,27 @@
|
|
|
1
1
|
export { MenuGuestAPIs } from './user/guest-apis';
|
|
2
2
|
export * from "./user/types/get-menu-response";
|
|
3
|
-
export * from './user/types/get-qrcode-response';
|
|
4
3
|
export * from "./user/types/post-call-waiter-request";
|
|
5
4
|
export * from "./user/types/post-order";
|
|
5
|
+
export * from "./admin/api/create-orders-api";
|
|
6
|
+
export * from "./admin/api/create-qrcodes-api";
|
|
7
|
+
export * from "./admin/api/delete-categories-api";
|
|
8
|
+
export * from "./admin/api/delete-products-api";
|
|
6
9
|
export * from "./admin/api/get-menu-api";
|
|
10
|
+
export * from "./admin/api/get-order-by-id-api";
|
|
7
11
|
export * from "./admin/api/get-product-api";
|
|
8
|
-
export * from "./admin/api/
|
|
9
|
-
export * from "./admin/api/
|
|
12
|
+
export * from "./admin/api/get-qrcodes-api";
|
|
13
|
+
export * from "./admin/api/patch-categories-indices-api";
|
|
10
14
|
export * from "./admin/api/patch-order-api";
|
|
11
|
-
export * from "./admin/api/
|
|
15
|
+
export * from "./admin/api/patch-product-api";
|
|
16
|
+
export * from "./admin/api/patch-product-indices-api";
|
|
17
|
+
export * from "./admin/api/patch-qrcodes-api";
|
|
12
18
|
export * from "./admin/api/search-orders-api";
|
|
13
|
-
export * from "./admin/api/get-qrcodes-api";
|
|
14
|
-
export * from "./admin/api/update-template-api";
|
|
15
|
-
export * from "./admin/api/get-order-by-id-api";
|
|
16
|
-
export * from "./admin/api/statistic/products-recap-api";
|
|
17
19
|
export * from "./admin/api/statistic/bills-recap-api";
|
|
18
|
-
export * from "./admin/api/
|
|
19
|
-
export * from "./admin/api/
|
|
20
|
-
export * from "./admin/api/
|
|
21
|
-
export * from "./admin/api/patch-categories-indices-api";
|
|
20
|
+
export * from "./admin/api/statistic/products-recap-api";
|
|
21
|
+
export * from "./admin/api/update-order-api";
|
|
22
|
+
export * from "./admin/api/update-template-api";
|
|
22
23
|
export * from "./admin/api/upsert-categories-api";
|
|
23
24
|
export * from "./admin/api/upsert-product-api";
|
|
24
|
-
export * from "./admin/api/delete-categories-api";
|
|
25
|
-
export * from "./admin/api/delete-products-api";
|
|
26
25
|
export * from "./admin/types/get-calls-response";
|
|
27
26
|
export { MenuAdminAPIs } from './admin/admin-apis';
|
|
28
27
|
export * from "./shared/types";
|
package/dist/menus/index.js
CHANGED
|
@@ -1,30 +1,29 @@
|
|
|
1
1
|
// user module
|
|
2
2
|
export { MenuGuestAPIs } from './user/guest-apis';
|
|
3
3
|
export * from "./user/types/get-menu-response";
|
|
4
|
-
export * from './user/types/get-qrcode-response';
|
|
5
4
|
export * from "./user/types/post-call-waiter-request";
|
|
6
5
|
export * from "./user/types/post-order";
|
|
7
6
|
// admin module
|
|
7
|
+
export * from "./admin/api/create-orders-api";
|
|
8
|
+
export * from "./admin/api/create-qrcodes-api";
|
|
9
|
+
export * from "./admin/api/delete-categories-api";
|
|
10
|
+
export * from "./admin/api/delete-products-api";
|
|
8
11
|
export * from "./admin/api/get-menu-api";
|
|
12
|
+
export * from "./admin/api/get-order-by-id-api";
|
|
9
13
|
export * from "./admin/api/get-product-api";
|
|
10
|
-
export * from "./admin/api/
|
|
11
|
-
export * from "./admin/api/
|
|
14
|
+
export * from "./admin/api/get-qrcodes-api";
|
|
15
|
+
export * from "./admin/api/patch-categories-indices-api";
|
|
12
16
|
export * from "./admin/api/patch-order-api";
|
|
13
|
-
export * from "./admin/api/
|
|
17
|
+
export * from "./admin/api/patch-product-api";
|
|
18
|
+
export * from "./admin/api/patch-product-indices-api";
|
|
19
|
+
export * from "./admin/api/patch-qrcodes-api";
|
|
14
20
|
export * from "./admin/api/search-orders-api";
|
|
15
|
-
export * from "./admin/api/get-qrcodes-api";
|
|
16
|
-
export * from "./admin/api/update-template-api";
|
|
17
|
-
export * from "./admin/api/get-order-by-id-api";
|
|
18
|
-
export * from "./admin/api/statistic/products-recap-api";
|
|
19
21
|
export * from "./admin/api/statistic/bills-recap-api";
|
|
20
|
-
export * from "./admin/api/
|
|
21
|
-
export * from "./admin/api/
|
|
22
|
-
export * from "./admin/api/
|
|
23
|
-
export * from "./admin/api/patch-categories-indices-api";
|
|
22
|
+
export * from "./admin/api/statistic/products-recap-api";
|
|
23
|
+
export * from "./admin/api/update-order-api";
|
|
24
|
+
export * from "./admin/api/update-template-api";
|
|
24
25
|
export * from "./admin/api/upsert-categories-api";
|
|
25
26
|
export * from "./admin/api/upsert-product-api";
|
|
26
|
-
export * from "./admin/api/delete-categories-api";
|
|
27
|
-
export * from "./admin/api/delete-products-api";
|
|
28
27
|
export * from "./admin/types/get-calls-response";
|
|
29
28
|
export { MenuAdminAPIs } from './admin/admin-apis';
|
|
30
29
|
// shared module
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { OrderRequest, OrderResponse } from "./types/post-order";
|
|
2
|
-
import { QrCode } from "./types/get-qrcode-response";
|
|
3
|
-
import { Menu } from "./types/get-menu-response";
|
|
4
1
|
import { Order } from "../shared/types";
|
|
2
|
+
import { GetBusinessIdResponse } from "./types/get-business-response";
|
|
3
|
+
import { Menu } from "./types/get-menu-response";
|
|
5
4
|
import { PostCallWaiter } from "./types/post-call-waiter-request";
|
|
5
|
+
import { OrderRequest, OrderResponse } from "./types/post-order";
|
|
6
6
|
export declare class MenuGuestAPIs {
|
|
7
7
|
static getOrders(businessId: string, deviceId: string, timestamp: number, page?: number, size?: number): Promise<Order[]>;
|
|
8
8
|
/**
|
|
@@ -16,20 +16,22 @@ export declare class MenuGuestAPIs {
|
|
|
16
16
|
/**
|
|
17
17
|
*
|
|
18
18
|
* @param props
|
|
19
|
-
* @throws
|
|
19
|
+
* @throws not_found, internal_error
|
|
20
20
|
* @returns
|
|
21
21
|
*/
|
|
22
|
-
static
|
|
23
|
-
|
|
24
|
-
|
|
22
|
+
static getBusiness(props: {
|
|
23
|
+
table_id?: string | undefined;
|
|
24
|
+
business_short_id?: string | undefined;
|
|
25
|
+
}): Promise<GetBusinessIdResponse>;
|
|
25
26
|
/**
|
|
26
27
|
*
|
|
27
28
|
* @param props
|
|
28
|
-
* @throws
|
|
29
|
+
* @throws business_not_found, table_not_found, internal_error
|
|
29
30
|
* @returns
|
|
30
31
|
*/
|
|
31
32
|
static getMenu(props: {
|
|
32
|
-
|
|
33
|
+
business_identifier: string;
|
|
34
|
+
table_id?: string | undefined;
|
|
33
35
|
}): Promise<Menu>;
|
|
34
36
|
/**
|
|
35
37
|
*
|
|
@@ -88,14 +88,18 @@ var MenuGuestAPIs = /** @class */ (function () {
|
|
|
88
88
|
/**
|
|
89
89
|
*
|
|
90
90
|
* @param props
|
|
91
|
-
* @throws
|
|
91
|
+
* @throws not_found, internal_error
|
|
92
92
|
* @returns
|
|
93
93
|
*/
|
|
94
|
-
MenuGuestAPIs.
|
|
94
|
+
MenuGuestAPIs.getBusiness = function (props) {
|
|
95
95
|
return __awaiter(this, void 0, void 0, function () {
|
|
96
96
|
return __generator(this, function (_a) {
|
|
97
97
|
return [2 /*return*/, RequestUtils.send(function () {
|
|
98
|
-
|
|
98
|
+
var params = [
|
|
99
|
+
props.table_id ? "table_id=".concat(props.table_id) : undefined,
|
|
100
|
+
props.business_short_id ? "business_short_id=".concat(props.business_short_id) : undefined
|
|
101
|
+
].filter(function (value) { return value; }).join("&");
|
|
102
|
+
return axios.get(base + "/menus/guest/business?".concat(params), {
|
|
99
103
|
headers: {
|
|
100
104
|
'Content-Type': 'application/json'
|
|
101
105
|
}
|
|
@@ -110,14 +114,18 @@ var MenuGuestAPIs = /** @class */ (function () {
|
|
|
110
114
|
/**
|
|
111
115
|
*
|
|
112
116
|
* @param props
|
|
113
|
-
* @throws
|
|
117
|
+
* @throws business_not_found, table_not_found, internal_error
|
|
114
118
|
* @returns
|
|
115
119
|
*/
|
|
116
120
|
MenuGuestAPIs.getMenu = function (props) {
|
|
117
121
|
return __awaiter(this, void 0, void 0, function () {
|
|
118
122
|
return __generator(this, function (_a) {
|
|
119
123
|
return [2 /*return*/, RequestUtils.send(function () {
|
|
120
|
-
|
|
124
|
+
var params = [
|
|
125
|
+
props.business_identifier ? "business_identifier=".concat(props.business_identifier) : undefined,
|
|
126
|
+
props.table_id ? "table_id=".concat(props.table_id) : undefined
|
|
127
|
+
].filter(function (value) { return value; }).join("&");
|
|
128
|
+
return axios.get(base + "/menus/guest?".concat(params), {
|
|
121
129
|
headers: {
|
|
122
130
|
'Content-Type': 'application/json'
|
|
123
131
|
}
|
|
@@ -1,12 +1,14 @@
|
|
|
1
|
-
import { OpeningHours, SocialLinks } from "../../../business/types/shared";
|
|
1
|
+
import { OpeningHours, SocialLinks, Template } from "../../../business/types/shared";
|
|
2
2
|
export interface Menu {
|
|
3
|
-
qrCodeLabel: string;
|
|
4
3
|
business: BusinessOfMenu;
|
|
5
4
|
categories: Category[];
|
|
5
|
+
table?: Table | undefined;
|
|
6
6
|
}
|
|
7
7
|
export interface BusinessOfMenu {
|
|
8
8
|
id: string;
|
|
9
9
|
identifier: string;
|
|
10
|
+
shortId: string;
|
|
11
|
+
template: Template;
|
|
10
12
|
name: string;
|
|
11
13
|
coverPhoto?: string | undefined;
|
|
12
14
|
logo?: string | undefined;
|
|
@@ -17,6 +19,10 @@ export interface BusinessOfMenu {
|
|
|
17
19
|
googleMapsReviewLink?: string | undefined;
|
|
18
20
|
socialLinks?: SocialLinks | undefined;
|
|
19
21
|
}
|
|
22
|
+
export interface Table {
|
|
23
|
+
id: string;
|
|
24
|
+
label: string;
|
|
25
|
+
}
|
|
20
26
|
export interface Category {
|
|
21
27
|
label: string;
|
|
22
28
|
isPublic: boolean;
|
package/package.json
CHANGED
|
File without changes
|