@be-link/cs-cli-nodejs 0.1.132 → 0.1.133
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/cs/modules/itemManage/index.d.ts +2 -0
- package/cs/modules/itemManage/itemCombo/service.d.ts +2 -0
- package/cs/modules/itemManage/itemCombo/service.js +6 -0
- package/cs/modules/itemManage/itemCombo/service.js.map +1 -1
- package/cs/modules/itemManage/itemCombo/type.d.ts +43 -1
- package/package.json +4 -1
|
@@ -24,6 +24,8 @@ declare const itemManageService: {
|
|
|
24
24
|
toggleComboStatus(request: import("./itemCombo/type").ManageByItemCombo.Request.toggleComboStatus): Promise<void>;
|
|
25
25
|
batchCreateSkus(request: import("./itemCombo/type").ManageByItemCombo.Request.batchCreateSkus): Promise<void>;
|
|
26
26
|
batchUpdateSkus(request: import("./itemCombo/type").ManageByItemCombo.Request.batchUpdateSkus): Promise<void>;
|
|
27
|
+
recognizeComboMealMenu(request: import("./itemCombo/type").ManageByItemCombo.Request.recognizeComboMealMenu): Promise<import("./itemCombo/type").ManageByItemCombo.Response.recognizeComboMealMenu>;
|
|
28
|
+
generateMenuImage(request: import("./itemCombo/type").ManageByItemCombo.Request.generateMenuImage): Promise<import("./itemCombo/type").ManageByItemCombo.Response.generateMenuImage>;
|
|
27
29
|
isPublicEnv: boolean;
|
|
28
30
|
readonly natDevHost: "http://qgostaxv.cs.nmkh74o4.rlwzae9d.com:8090";
|
|
29
31
|
readonly natProdHost: "http://bxbvjnca.cs.cwl9ok0a.mk2u3r3l.com:8090";
|
|
@@ -8,6 +8,8 @@ declare class ManageByItemComboService extends BaseService implements ManageByIt
|
|
|
8
8
|
toggleComboStatus(request: ManageByItemCombo.Request.toggleComboStatus): Promise<void>;
|
|
9
9
|
batchCreateSkus(request: ManageByItemCombo.Request.batchCreateSkus): Promise<void>;
|
|
10
10
|
batchUpdateSkus(request: ManageByItemCombo.Request.batchUpdateSkus): Promise<void>;
|
|
11
|
+
recognizeComboMealMenu(request: ManageByItemCombo.Request.recognizeComboMealMenu): Promise<ManageByItemCombo.Response.recognizeComboMealMenu>;
|
|
12
|
+
generateMenuImage(request: ManageByItemCombo.Request.generateMenuImage): Promise<ManageByItemCombo.Response.generateMenuImage>;
|
|
11
13
|
}
|
|
12
14
|
declare const byItemCombo: ManageByItemComboService;
|
|
13
15
|
export default byItemCombo;
|
|
@@ -28,6 +28,12 @@ class ManageByItemComboService extends baseService_1.default {
|
|
|
28
28
|
batchUpdateSkus(request) {
|
|
29
29
|
return (0, http_1.callApi)(this.getApiUrl(this.batchUpdateSkus), request);
|
|
30
30
|
}
|
|
31
|
+
recognizeComboMealMenu(request) {
|
|
32
|
+
return (0, http_1.callApi)(this.getApiUrl(this.recognizeComboMealMenu), request);
|
|
33
|
+
}
|
|
34
|
+
generateMenuImage(request) {
|
|
35
|
+
return (0, http_1.callApi)(this.getApiUrl(this.generateMenuImage), request);
|
|
36
|
+
}
|
|
31
37
|
}
|
|
32
38
|
const byItemCombo = new ManageByItemComboService();
|
|
33
39
|
exports.default = byItemCombo;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"service.js","sourceRoot":"","sources":["../../../../../src/cs/modules/itemManage/itemCombo/service.ts"],"names":[],"mappings":";;;;;AAAA,wCAAuC;AACvC,oEAA2C;AAG3C,MAAM,wBAAyB,SAAQ,qBAAW;IAAlD;;QACE,cAAS,GAAW,4BAA4B,CAAA;
|
|
1
|
+
{"version":3,"file":"service.js","sourceRoot":"","sources":["../../../../../src/cs/modules/itemManage/itemCombo/service.ts"],"names":[],"mappings":";;;;;AAAA,wCAAuC;AACvC,oEAA2C;AAG3C,MAAM,wBAAyB,SAAQ,qBAAW;IAAlD;;QACE,cAAS,GAAW,4BAA4B,CAAA;IA6DlD,CAAC;IA3DC,WAAW,CAAC,OAA8C;QACxD,OAAO,IAAA,cAAO,EACZ,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,WAAW,CAAC,EAChC,OAAO,CACR,CAAA;IACH,CAAC;IAED,mBAAmB,CAAC,OAAsD;QACxE,OAAO,IAAA,cAAO,EACZ,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,mBAAmB,CAAC,EACxC,OAAO,CACR,CAAA;IACH,CAAC;IAED,qBAAqB,CAAC,OAAwD;QAC5E,OAAO,IAAA,cAAO,EACZ,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,qBAAqB,CAAC,EAC1C,OAAO,CACR,CAAA;IACH,CAAC;IAED,iBAAiB,CAAC,OAAoD;QACpE,OAAO,IAAA,cAAO,EACZ,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,iBAAiB,CAAC,EACtC,OAAO,CACR,CAAA;IACH,CAAC;IAED,eAAe,CAAC,OAAkD;QAChE,OAAO,IAAA,cAAO,EACZ,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,eAAe,CAAC,EACpC,OAAO,CACR,CAAA;IACH,CAAC;IAED,eAAe,CAAC,OAAkD;QAChE,OAAO,IAAA,cAAO,EACZ,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,eAAe,CAAC,EACpC,OAAO,CACR,CAAA;IACH,CAAC;IAED,sBAAsB,CACpB,OAAyD;QAEzD,OAAO,IAAA,cAAO,EACZ,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,sBAAsB,CAAC,EAC3C,OAAO,CACR,CAAA;IACH,CAAC;IAED,iBAAiB,CACf,OAAoD;QAEpD,OAAO,IAAA,cAAO,EACZ,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,iBAAiB,CAAC,EACtC,OAAO,CACR,CAAA;IACH,CAAC;CACF;AAED,MAAM,WAAW,GAAG,IAAI,wBAAwB,EAAE,CAAA;AAElD,kBAAe,WAAW,CAAA"}
|
|
@@ -1,6 +1,20 @@
|
|
|
1
1
|
import { CommonSaleStatus, CommonStatus, ItemRoomSaleBindConditionType } from 'vitality-meta/enums/commodity';
|
|
2
2
|
import { DescriptionContentItem } from '../../../../types';
|
|
3
3
|
export declare namespace ManageByItemCombo {
|
|
4
|
+
type ComboMealMenuSourceType = 'TEXT' | 'IMAGE' | 'FILE';
|
|
5
|
+
type ComboMealMenuFileType = 'PDF' | 'DOC' | 'DOCX' | 'XLS' | 'XLSX';
|
|
6
|
+
interface ComboMealMenuCategoryItem {
|
|
7
|
+
categoryName?: string;
|
|
8
|
+
dishes: string[];
|
|
9
|
+
}
|
|
10
|
+
interface ComboMealMenuMealItem {
|
|
11
|
+
comboName: string;
|
|
12
|
+
categories: ComboMealMenuCategoryItem[];
|
|
13
|
+
}
|
|
14
|
+
interface ComboMealMenuDayItem {
|
|
15
|
+
dayLabel?: string;
|
|
16
|
+
meals: ComboMealMenuMealItem[];
|
|
17
|
+
}
|
|
4
18
|
namespace Request {
|
|
5
19
|
interface upsertCombo {
|
|
6
20
|
itemId: string;
|
|
@@ -87,8 +101,32 @@ export declare namespace ManageByItemCombo {
|
|
|
87
101
|
saleEndTime?: number | string;
|
|
88
102
|
};
|
|
89
103
|
}
|
|
104
|
+
interface recognizeComboMealMenu {
|
|
105
|
+
sourceType: ComboMealMenuSourceType;
|
|
106
|
+
textContent?: string;
|
|
107
|
+
imageUrl?: string;
|
|
108
|
+
fileUrl?: string;
|
|
109
|
+
fileName?: string;
|
|
110
|
+
fileType?: ComboMealMenuFileType;
|
|
111
|
+
}
|
|
112
|
+
interface generateMenuImage {
|
|
113
|
+
hotelName: string;
|
|
114
|
+
layout?: 'single' | 'double';
|
|
115
|
+
notes?: string;
|
|
116
|
+
days: ComboMealMenuDayItem[];
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
namespace Response {
|
|
120
|
+
interface recognizeComboMealMenu {
|
|
121
|
+
hotelName: string;
|
|
122
|
+
notes: string;
|
|
123
|
+
days: ComboMealMenuDayItem[];
|
|
124
|
+
ocrText?: string;
|
|
125
|
+
}
|
|
126
|
+
interface generateMenuImage {
|
|
127
|
+
menuImageUrl: string;
|
|
128
|
+
}
|
|
90
129
|
}
|
|
91
|
-
namespace Response { }
|
|
92
130
|
interface Controller {
|
|
93
131
|
/** 创建&更新套餐 */
|
|
94
132
|
upsertCombo(request: Request.upsertCombo): Promise<void>;
|
|
@@ -102,5 +140,9 @@ export declare namespace ManageByItemCombo {
|
|
|
102
140
|
batchCreateSkus(request: Request.batchCreateSkus): Promise<void>;
|
|
103
141
|
/** 批量更新SKU */
|
|
104
142
|
batchUpdateSkus(request: Request.batchUpdateSkus): Promise<void>;
|
|
143
|
+
/** AI识别套餐餐食菜单 */
|
|
144
|
+
recognizeComboMealMenu(request: Request.recognizeComboMealMenu): Promise<Response.recognizeComboMealMenu>;
|
|
145
|
+
/** 生成菜单图片 */
|
|
146
|
+
generateMenuImage(request: Request.generateMenuImage): Promise<Response.generateMenuImage>;
|
|
105
147
|
}
|
|
106
148
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@be-link/cs-cli-nodejs",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.133",
|
|
4
4
|
"description": "商品服务Nodejs客户端",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"author": "dev@8848top.com",
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
"@commitlint/cli": "^18.4.3",
|
|
14
14
|
"@commitlint/config-conventional": "^18.4.3",
|
|
15
15
|
"@types/inquirer": "^9.0.7",
|
|
16
|
+
"@types/jest": "^29.5.14",
|
|
16
17
|
"@types/node": "^20.14.2",
|
|
17
18
|
"@types/uuid": "^9.0.6",
|
|
18
19
|
"@typescript-eslint/eslint-plugin": "^6.9.0",
|
|
@@ -24,7 +25,9 @@
|
|
|
24
25
|
"husky": "^8.0.3",
|
|
25
26
|
"inquirer": "8.2.6",
|
|
26
27
|
"ioredis": "5.3.2",
|
|
28
|
+
"jest": "^29.7.0",
|
|
27
29
|
"standard-version": "^9.5.0",
|
|
30
|
+
"ts-jest": "^29.2.5",
|
|
28
31
|
"typescript": "5.2.2"
|
|
29
32
|
},
|
|
30
33
|
"dependencies": {
|