@freedom_sky/feige-lib 5.12.0 → 5.13.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/const/const.d.ts +10 -0
- package/dist/const/const.js +10 -0
- package/dist/enum/ai-token.enum.d.ts +10 -0
- package/dist/enum/ai-token.enum.js +14 -0
- package/dist/enum/menu-io.enum.d.ts +4 -0
- package/dist/enum/menu-io.enum.js +7 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +3 -0
- package/dist/interfaces/store/classification.interface.d.ts +1 -1
- package/dist/interfaces/store/menu-export.interface.d.ts +12 -0
- package/dist/interfaces/store/menu-export.interface.js +2 -0
- package/dist/interfaces/store/specification.interface.d.ts +1 -1
- package/dist/interfaces/store/store.interface.d.ts +3 -0
- package/package.json +1 -1
- package/src/const/const.ts +10 -0
- package/src/enum/ai-token.enum.ts +10 -0
- package/src/enum/menu-io.enum.ts +4 -0
- package/src/index.ts +5 -0
- package/src/interfaces/store/classification.interface.ts +1 -1
- package/src/interfaces/store/menu-export.interface.ts +13 -0
- package/src/interfaces/store/specification.interface.ts +1 -1
- package/src/interfaces/store/store.interface.ts +3 -0
package/dist/const/const.d.ts
CHANGED
|
@@ -134,6 +134,7 @@ declare class Const {
|
|
|
134
134
|
DISH_DESCRIPTION_MAX_LENGTH: number;
|
|
135
135
|
SPECIFICATION_NAME_MAX_LENGTH: number;
|
|
136
136
|
SPECIFICATION_DESCRIPTION_MAX_LENGTH: number;
|
|
137
|
+
CLASSIFICATION_NAME_MAX_LENGTH: number;
|
|
137
138
|
STORE_NAME_MAX_LENGTH: number;
|
|
138
139
|
STORE_DESCRIPTION_MAX_LENGTH: number;
|
|
139
140
|
TABLE_NAME_MAX_LENGTH: number;
|
|
@@ -173,6 +174,10 @@ declare class Const {
|
|
|
173
174
|
ID: string;
|
|
174
175
|
NAME: string;
|
|
175
176
|
};
|
|
177
|
+
AI_TOKEN: {
|
|
178
|
+
ID: string;
|
|
179
|
+
NAME: string;
|
|
180
|
+
};
|
|
176
181
|
};
|
|
177
182
|
PROBATION: number;
|
|
178
183
|
LANGUAGE: LanguageItem[];
|
|
@@ -211,6 +216,7 @@ declare class Const {
|
|
|
211
216
|
MEMBER: string;
|
|
212
217
|
SMS_NUM: string;
|
|
213
218
|
PAY: string;
|
|
219
|
+
AI_TOKEN: string;
|
|
214
220
|
};
|
|
215
221
|
ORDER_EVENT: {
|
|
216
222
|
CREATE: string;
|
|
@@ -327,6 +333,10 @@ declare class Const {
|
|
|
327
333
|
DINE: string;
|
|
328
334
|
TAKEOUT: string;
|
|
329
335
|
};
|
|
336
|
+
AI_MENU_IMAGE_PARSE_TIMEOUT: number;
|
|
337
|
+
AI_MENU_TRANSLATE_TIMEOUT: number;
|
|
338
|
+
AI_MENU_TRANSLATE_MAX_ITEMS: number;
|
|
339
|
+
DISH_IMG_DEFAULT: string;
|
|
330
340
|
AREA_CODE: {
|
|
331
341
|
continent: ContinentEnum;
|
|
332
342
|
en: string;
|
package/dist/const/const.js
CHANGED
|
@@ -139,6 +139,7 @@ var Const = /** @class */ (function () {
|
|
|
139
139
|
DISH_DESCRIPTION_MAX_LENGTH: 300,
|
|
140
140
|
SPECIFICATION_NAME_MAX_LENGTH: 60,
|
|
141
141
|
SPECIFICATION_DESCRIPTION_MAX_LENGTH: 60,
|
|
142
|
+
CLASSIFICATION_NAME_MAX_LENGTH: 30,
|
|
142
143
|
STORE_NAME_MAX_LENGTH: 30,
|
|
143
144
|
STORE_DESCRIPTION_MAX_LENGTH: 500,
|
|
144
145
|
TABLE_NAME_MAX_LENGTH: 30,
|
|
@@ -178,6 +179,10 @@ var Const = /** @class */ (function () {
|
|
|
178
179
|
ID: 'mp',
|
|
179
180
|
NAME: '小程序功能',
|
|
180
181
|
},
|
|
182
|
+
AI_TOKEN: {
|
|
183
|
+
ID: 'aiToken',
|
|
184
|
+
NAME: 'AI Token',
|
|
185
|
+
},
|
|
181
186
|
};
|
|
182
187
|
this.PROBATION = 10; // 公共试用期,当具体模块下没有该字段时,取这里的数据,单位:日
|
|
183
188
|
this.LANGUAGE = [
|
|
@@ -707,6 +712,7 @@ var Const = /** @class */ (function () {
|
|
|
707
712
|
MEMBER: 'member',
|
|
708
713
|
SMS_NUM: 'smsNum',
|
|
709
714
|
PAY: 'pay',
|
|
715
|
+
AI_TOKEN: 'aiToken',
|
|
710
716
|
};
|
|
711
717
|
this.ORDER_EVENT = {
|
|
712
718
|
CREATE: 'create',
|
|
@@ -823,6 +829,10 @@ var Const = /** @class */ (function () {
|
|
|
823
829
|
DINE: 'dine',
|
|
824
830
|
TAKEOUT: 'takeout',
|
|
825
831
|
};
|
|
832
|
+
this.AI_MENU_IMAGE_PARSE_TIMEOUT = 600000; // 10 minutes
|
|
833
|
+
this.AI_MENU_TRANSLATE_TIMEOUT = 300000; // 5 minutes
|
|
834
|
+
this.AI_MENU_TRANSLATE_MAX_ITEMS = 6000; // max source-target pairs for translation
|
|
835
|
+
this.DISH_IMG_DEFAULT = 'https://feige-img-hub.oss-cn-hangzhou.aliyuncs.com/1592144190779-QRTrDtCm2n.jpg';
|
|
826
836
|
this.AREA_CODE = [
|
|
827
837
|
{
|
|
828
838
|
en: 'Angola',
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
var AiTokenTransactionTypeEnum;
|
|
4
|
+
(function (AiTokenTransactionTypeEnum) {
|
|
5
|
+
AiTokenTransactionTypeEnum["Supplement"] = "supplement";
|
|
6
|
+
AiTokenTransactionTypeEnum["Consume"] = "consume";
|
|
7
|
+
})(AiTokenTransactionTypeEnum = exports.AiTokenTransactionTypeEnum || (exports.AiTokenTransactionTypeEnum = {}));
|
|
8
|
+
var AiTokenActionTypeEnum;
|
|
9
|
+
(function (AiTokenActionTypeEnum) {
|
|
10
|
+
AiTokenActionTypeEnum["Send"] = "send";
|
|
11
|
+
AiTokenActionTypeEnum["Buy"] = "buy";
|
|
12
|
+
AiTokenActionTypeEnum["Translate"] = "translate";
|
|
13
|
+
AiTokenActionTypeEnum["ImageParse"] = "imageParse";
|
|
14
|
+
})(AiTokenActionTypeEnum = exports.AiTokenActionTypeEnum || (exports.AiTokenActionTypeEnum = {}));
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
var MenuImportModeEnum;
|
|
4
|
+
(function (MenuImportModeEnum) {
|
|
5
|
+
MenuImportModeEnum["APPEND"] = "append";
|
|
6
|
+
MenuImportModeEnum["REPLACE"] = "replace";
|
|
7
|
+
})(MenuImportModeEnum = exports.MenuImportModeEnum || (exports.MenuImportModeEnum = {}));
|
package/dist/index.d.ts
CHANGED
|
@@ -11,6 +11,7 @@ export * from './enum/time-menu.enum';
|
|
|
11
11
|
export * from './enum/printer.enum';
|
|
12
12
|
export * from './enum/member.enum';
|
|
13
13
|
export * from './enum/sms.enum';
|
|
14
|
+
export * from './enum/ai-token.enum';
|
|
14
15
|
export * from './enum/checkout.enum';
|
|
15
16
|
export * from './enum/yeepay.enum';
|
|
16
17
|
export * from './enum/timezone.emum';
|
|
@@ -30,6 +31,10 @@ export * from './interfaces/store/store.interface';
|
|
|
30
31
|
export * from './interfaces/common/language.interface';
|
|
31
32
|
export * from './interfaces/store/subscription.interface';
|
|
32
33
|
export * from './interfaces/store/dish.interface';
|
|
34
|
+
export * from './interfaces/store/classification.interface';
|
|
35
|
+
export * from './interfaces/store/specification.interface';
|
|
36
|
+
export * from './interfaces/store/menu-export.interface';
|
|
37
|
+
export { MenuImportModeEnum } from './enum/menu-io.enum';
|
|
33
38
|
export * from './interfaces/order';
|
|
34
39
|
export { PayCompanyEnum } from './enum/pay-company.enum';
|
|
35
40
|
import * as moment from 'moment';
|
package/dist/index.js
CHANGED
|
@@ -15,6 +15,7 @@ __export(require("./enum/time-menu.enum"));
|
|
|
15
15
|
__export(require("./enum/printer.enum"));
|
|
16
16
|
__export(require("./enum/member.enum"));
|
|
17
17
|
__export(require("./enum/sms.enum"));
|
|
18
|
+
__export(require("./enum/ai-token.enum"));
|
|
18
19
|
__export(require("./enum/checkout.enum"));
|
|
19
20
|
__export(require("./enum/yeepay.enum"));
|
|
20
21
|
__export(require("./enum/timezone.emum"));
|
|
@@ -28,6 +29,8 @@ __export(require("./enum/from.enum"));
|
|
|
28
29
|
__export(require("./enum/role.enum"));
|
|
29
30
|
__export(require("./enum/continent.enum"));
|
|
30
31
|
__export(require("./announcement/enum/announcement.enum"));
|
|
32
|
+
var menu_io_enum_1 = require("./enum/menu-io.enum");
|
|
33
|
+
exports.MenuImportModeEnum = menu_io_enum_1.MenuImportModeEnum;
|
|
31
34
|
__export(require("./interfaces/order"));
|
|
32
35
|
var pay_company_enum_1 = require("./enum/pay-company.enum");
|
|
33
36
|
exports.PayCompanyEnum = pay_company_enum_1.PayCompanyEnum;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Dish } from './dish.interface';
|
|
2
|
+
import { Classification } from './classification.interface';
|
|
3
|
+
import { Specification } from './specification.interface';
|
|
4
|
+
export interface MenuExportData {
|
|
5
|
+
version: string;
|
|
6
|
+
exportedAt: string;
|
|
7
|
+
storeId?: string;
|
|
8
|
+
storeNames?: object;
|
|
9
|
+
dishes: Dish[];
|
|
10
|
+
classifications: Classification[];
|
|
11
|
+
specifications: Specification[];
|
|
12
|
+
}
|
package/package.json
CHANGED
package/src/const/const.ts
CHANGED
|
@@ -137,6 +137,7 @@ class Const {
|
|
|
137
137
|
DISH_DESCRIPTION_MAX_LENGTH: 300,
|
|
138
138
|
SPECIFICATION_NAME_MAX_LENGTH: 60,
|
|
139
139
|
SPECIFICATION_DESCRIPTION_MAX_LENGTH: 60,
|
|
140
|
+
CLASSIFICATION_NAME_MAX_LENGTH: 30,
|
|
140
141
|
STORE_NAME_MAX_LENGTH: 30,
|
|
141
142
|
STORE_DESCRIPTION_MAX_LENGTH: 500,
|
|
142
143
|
TABLE_NAME_MAX_LENGTH: 30,
|
|
@@ -176,6 +177,10 @@ class Const {
|
|
|
176
177
|
ID: 'mp',
|
|
177
178
|
NAME: '小程序功能',
|
|
178
179
|
},
|
|
180
|
+
AI_TOKEN: {
|
|
181
|
+
ID: 'aiToken',
|
|
182
|
+
NAME: 'AI Token',
|
|
183
|
+
},
|
|
179
184
|
};
|
|
180
185
|
PROBATION = 10; // 公共试用期,当具体模块下没有该字段时,取这里的数据,单位:日
|
|
181
186
|
LANGUAGE: LanguageItem[] = [
|
|
@@ -705,6 +710,7 @@ class Const {
|
|
|
705
710
|
MEMBER: 'member',
|
|
706
711
|
SMS_NUM: 'smsNum',
|
|
707
712
|
PAY: 'pay',
|
|
713
|
+
AI_TOKEN: 'aiToken',
|
|
708
714
|
};
|
|
709
715
|
ORDER_EVENT = {
|
|
710
716
|
CREATE: 'create',
|
|
@@ -821,6 +827,10 @@ class Const {
|
|
|
821
827
|
DINE: 'dine',
|
|
822
828
|
TAKEOUT: 'takeout',
|
|
823
829
|
};
|
|
830
|
+
AI_MENU_IMAGE_PARSE_TIMEOUT = 600000; // 10 minutes
|
|
831
|
+
AI_MENU_TRANSLATE_TIMEOUT = 300000; // 5 minutes
|
|
832
|
+
AI_MENU_TRANSLATE_MAX_ITEMS = 6000; // max source-target pairs for translation
|
|
833
|
+
DISH_IMG_DEFAULT = 'https://feige-img-hub.oss-cn-hangzhou.aliyuncs.com/1592144190779-QRTrDtCm2n.jpg';
|
|
824
834
|
AREA_CODE: {
|
|
825
835
|
continent: ContinentEnum;
|
|
826
836
|
en: string;
|
package/src/index.ts
CHANGED
|
@@ -12,6 +12,7 @@ export * from './enum/time-menu.enum';
|
|
|
12
12
|
export * from './enum/printer.enum';
|
|
13
13
|
export * from './enum/member.enum';
|
|
14
14
|
export * from './enum/sms.enum';
|
|
15
|
+
export * from './enum/ai-token.enum';
|
|
15
16
|
export * from './enum/checkout.enum';
|
|
16
17
|
export * from './enum/yeepay.enum';
|
|
17
18
|
export * from './enum/timezone.emum';
|
|
@@ -31,6 +32,10 @@ export * from './interfaces/store/store.interface';
|
|
|
31
32
|
export * from './interfaces/common/language.interface';
|
|
32
33
|
export * from './interfaces/store/subscription.interface';
|
|
33
34
|
export * from './interfaces/store/dish.interface';
|
|
35
|
+
export * from './interfaces/store/classification.interface';
|
|
36
|
+
export * from './interfaces/store/specification.interface';
|
|
37
|
+
export * from './interfaces/store/menu-export.interface';
|
|
38
|
+
export { MenuImportModeEnum } from './enum/menu-io.enum';
|
|
34
39
|
export * from './interfaces/order';
|
|
35
40
|
export { PayCompanyEnum } from './enum/pay-company.enum';
|
|
36
41
|
import * as moment from 'moment';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Dish } from './dish.interface';
|
|
2
|
+
import { Classification } from './classification.interface';
|
|
3
|
+
import { Specification } from './specification.interface';
|
|
4
|
+
|
|
5
|
+
export interface MenuExportData {
|
|
6
|
+
version: string;
|
|
7
|
+
exportedAt: string;
|
|
8
|
+
storeId?: string;
|
|
9
|
+
storeNames?: object;
|
|
10
|
+
dishes: Dish[];
|
|
11
|
+
classifications: Classification[];
|
|
12
|
+
specifications: Specification[];
|
|
13
|
+
}
|