@be-link/flow-cli-nodejs 0.0.1

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.
Files changed (48) hide show
  1. package/README.md +2 -0
  2. package/errors/BizError.d.ts +4 -0
  3. package/errors/BizError.js +10 -0
  4. package/errors/SystemError.d.ts +4 -0
  5. package/errors/SystemError.js +10 -0
  6. package/flow/http.d.ts +1 -0
  7. package/flow/http.js +98 -0
  8. package/flow/modules/dataMigrate/service.d.ts +9 -0
  9. package/flow/modules/dataMigrate/service.js +21 -0
  10. package/flow/modules/dataMigrate/types.d.ts +6 -0
  11. package/flow/modules/dataMigrate/types.js +2 -0
  12. package/flow/modules/orderCore/service.d.ts +20 -0
  13. package/flow/modules/orderCore/service.js +51 -0
  14. package/flow/modules/orderCore/types.d.ts +277 -0
  15. package/flow/modules/orderCore/types.js +2 -0
  16. package/flow/modules/orderFulfill/service.d.ts +40 -0
  17. package/flow/modules/orderFulfill/service.js +111 -0
  18. package/flow/modules/orderFulfill/types.d.ts +476 -0
  19. package/flow/modules/orderFulfill/types.js +2 -0
  20. package/flow/modules/orderJob/service.d.ts +23 -0
  21. package/flow/modules/orderJob/service.js +63 -0
  22. package/flow/modules/orderJob/types.d.ts +36 -0
  23. package/flow/modules/orderJob/types.js +2 -0
  24. package/flow/modules/orderNote/service.d.ts +12 -0
  25. package/flow/modules/orderNote/service.js +30 -0
  26. package/flow/modules/orderNote/types.d.ts +72 -0
  27. package/flow/modules/orderNote/types.js +2 -0
  28. package/flow/modules/orderQuery/commodity.d.ts +22 -0
  29. package/flow/modules/orderQuery/commodity.js +57 -0
  30. package/flow/modules/orderQuery/store.d.ts +11 -0
  31. package/flow/modules/orderQuery/store.js +24 -0
  32. package/flow/modules/orderQuery/types.d.ts +853 -0
  33. package/flow/modules/orderQuery/types.js +2 -0
  34. package/flow/modules/orderQuery/user.d.ts +20 -0
  35. package/flow/modules/orderQuery/user.js +51 -0
  36. package/flow/modules/orderQuery/web.d.ts +12 -0
  37. package/flow/modules/orderQuery/web.js +27 -0
  38. package/flow/modules/service.d.ts +14 -0
  39. package/flow/modules/service.js +31 -0
  40. package/index.d.ts +19 -0
  41. package/index.js +53 -0
  42. package/package.json +53 -0
  43. package/types.d.ts +888 -0
  44. package/types.js +2 -0
  45. package/utils/env.d.ts +6 -0
  46. package/utils/env.js +15 -0
  47. package/utils/string.d.ts +5 -0
  48. package/utils/string.js +9 -0
@@ -0,0 +1,36 @@
1
+ export declare namespace Service {
2
+ interface OrderJobController {
3
+ /** 自动完结订单 */
4
+ jobAutoCompleteOrder(): Promise<void>;
5
+ /** 自动推进到履约中订单 */
6
+ jobAutoFulfillingOrder(): Promise<void>;
7
+ /** 自动关闭未支付订单 */
8
+ jobAutoCloseUnpaidOrder(): Promise<void>;
9
+ /** 每天两点创建企微群发任务(酒店订单) */
10
+ jobCreateHotelNotifyTask(): Promise<void>;
11
+ /** 每天两点创建企微群发任务(一日聚订单) */
12
+ jobCreateOneSecondPartyNotifyTask(): Promise<void>;
13
+ /** 每天两点创建企微群发任务(旅游订单) */
14
+ jobCreateTourNotifyTask(): Promise<void>;
15
+ /** 每天下午两点发送昨天出团商品评论提醒短信 */
16
+ jobSendCommentRemindSms(): Promise<void>;
17
+ /** 每天下午8.发送当天出团一日聚商品评论提醒短信 */
18
+ jobSendCommentRemindSmsForOneSecondParty(): Promise<void>;
19
+ /** 发送保险提醒统计 */
20
+ jobSmsNoticeForInsurance(): Promise<void>;
21
+ /** 发送保障服务通知 */
22
+ jobSmsNoticeForDepartureSecurity(): Promise<void>;
23
+ /** 发送提醒同行人领取保险服务通知 */
24
+ jobSendSubscribeNoticeForInsurance(): Promise<void>;
25
+ /** 飞书通知未领保险 */
26
+ jobNotifyFeiShuOfNotReceivedInsurance(): Promise<void>;
27
+ /** 对缺漏出行信息的团,进行飞书通知 */
28
+ jobNotifyFeishuOfMissingTourItineraryInfo(): Promise<void>;
29
+ /** 每天15点通知酒店和一日聚门店处理待处理的订单 */
30
+ jobNotifySupplierPendingOrder(): Promise<void>;
31
+ /** 每天20点通知酒店和一日聚门店查看明日到店的订单 */
32
+ jobNotifySupplierTomorrowOrder(): Promise<void>;
33
+ /** 每天15点通知酒店和一日聚门店处理待开发票的订单 */
34
+ jobNotifySupplierInvoiceOrder(): Promise<void>;
35
+ }
36
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,12 @@
1
+ import BaseService from "../service";
2
+ import { Service } from './types';
3
+ declare class OrderNoteService extends BaseService implements Service.OrderNoteController {
4
+ protected prefixUrl: string;
5
+ createNote(request: Service.Request.createNote): Promise<string>;
6
+ queryNoteByOrderIdList(request: Service.Request.queryNoteByOrderIdList): Promise<Service.Response.queryNoteByOrderIdList>;
7
+ queryUnFinishedNoteOrderIdList(): Promise<string[]>;
8
+ aiBuildNoteInfo(request: Service.Request.aiBuildNoteInfo): Promise<string>;
9
+ changeNoteStatus(request: Service.Request.changeNoteStatus): Promise<void>;
10
+ }
11
+ declare const orderNoteService: OrderNoteService;
12
+ export default orderNoteService;
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const service_1 = __importDefault(require("../service"));
7
+ const http_1 = require("../../http");
8
+ class OrderNoteService extends service_1.default {
9
+ constructor() {
10
+ super(...arguments);
11
+ this.prefixUrl = '/note';
12
+ }
13
+ createNote(request) {
14
+ return (0, http_1.callApi)(this.getApiUrl(this.createNote), request);
15
+ }
16
+ queryNoteByOrderIdList(request) {
17
+ return (0, http_1.callApi)(this.getApiUrl(this.queryNoteByOrderIdList), request);
18
+ }
19
+ queryUnFinishedNoteOrderIdList() {
20
+ return (0, http_1.callApi)(this.getApiUrl(this.queryUnFinishedNoteOrderIdList));
21
+ }
22
+ aiBuildNoteInfo(request) {
23
+ return (0, http_1.callApi)(this.getApiUrl(this.aiBuildNoteInfo), request);
24
+ }
25
+ changeNoteStatus(request) {
26
+ return (0, http_1.callApi)(this.getApiUrl(this.changeNoteStatus), request);
27
+ }
28
+ }
29
+ const orderNoteService = new OrderNoteService();
30
+ exports.default = orderNoteService;
@@ -0,0 +1,72 @@
1
+ import * as PosConstants from 'vitality-meta/enums/pos';
2
+ import * as DTO from '../../../types';
3
+ export declare namespace Service {
4
+ namespace Request {
5
+ interface createNote {
6
+ /** 备注内容 */
7
+ content: string;
8
+ /** 操作人角色 */
9
+ operatorRole: PosConstants.OperatorRoleEnum;
10
+ /** 操作人 */
11
+ operatorUser: string;
12
+ /** 订单id */
13
+ tradeOrderId: string;
14
+ /** 备注类型 */
15
+ type: PosConstants.NoteTypeEnum;
16
+ }
17
+ interface queryNoteByOrderIdList {
18
+ /** 订单Id列表 */
19
+ orderIdList: string[];
20
+ /** 备注类型列表 */
21
+ typeList?: PosConstants.NoteTypeEnum[];
22
+ /** 备注来源列表 */
23
+ operatorRoleList?: PosConstants.OperatorRoleEnum[];
24
+ }
25
+ interface aiBuildNoteInfo {
26
+ /** 内容 */
27
+ content: string;
28
+ }
29
+ interface changeNoteStatus {
30
+ /** 备注Id */
31
+ noteId: string;
32
+ /** 状态 */
33
+ status: PosConstants.NoteStatusEnum;
34
+ /** 修改人 */
35
+ modifyOperatorUser: string;
36
+ /** 修改人类型 */
37
+ modifyOperatorRole: PosConstants.ModifyOperatorRoleEnum;
38
+ }
39
+ }
40
+ namespace Response {
41
+ type queryNoteByOrderIdList = DTO.IPositiveNoteInfo[];
42
+ }
43
+ interface OrderNoteController {
44
+ /**
45
+ * 创建订单备注
46
+ * @returns 备注id
47
+ * @path /note/create-note
48
+ */
49
+ createNote(request: Request.createNote): Promise<string>;
50
+ /**
51
+ * 根据订单id列表查询备注
52
+ * @path /note/query-note-by-order-id-list
53
+ */
54
+ queryNoteByOrderIdList(request: Request.queryNoteByOrderIdList): Promise<Response.queryNoteByOrderIdList>;
55
+ /**
56
+ * 查询未完成备注的订单Id
57
+ * @returns 订单Id列表
58
+ * @path /note/query-unfinished-note-order-id-list
59
+ */
60
+ queryUnFinishedNoteOrderIdList(): Promise<string[]>;
61
+ /**
62
+ * ai构建备注信息
63
+ * @path /note/ai-build-note-info
64
+ */
65
+ aiBuildNoteInfo(request: Request.aiBuildNoteInfo): Promise<string>;
66
+ /**
67
+ * 修改备注状态
68
+ * @path /note/change-note-status
69
+ */
70
+ changeNoteStatus(request: Request.changeNoteStatus): Promise<void>;
71
+ }
72
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,22 @@
1
+ import BaseService from '../service';
2
+ import { Service } from './types';
3
+ import * as DTO from '../../../types';
4
+ declare class QueryByCommodityService extends BaseService implements Service.QueryByCommodityController {
5
+ protected prefixUrl: string;
6
+ queryTopSaleItem(request: Service.Request.queryTopSaleItem): Promise<Service.Response.queryTopSaleItem[]>;
7
+ querySaleItem(request: Service.Request.querySaleItem): Promise<Service.Response.querySaleItem[]>;
8
+ queryOrderInDepartureDate<K extends (keyof DTO.QueryDataBlockTypeMap)[]>(request: Service.Request.queryOrderInDepartureDate<K>): Promise<DTO.QueryDataRes<K>[]>;
9
+ queryOrderBySkuIdList<K extends (keyof DTO.QueryDataBlockTypeMap)[]>(request: Service.Request.queryOrderBySkuIdList<K>): Promise<DTO.QueryDataRes<K>[]>;
10
+ queryItineraryList(request: Service.Request.queryItineraryList): Promise<Service.Response.queryItineraryList[]>;
11
+ getItineraryCount(request: Service.Request.getItineraryCount): Promise<number>;
12
+ queryPartyOrderInfo(request: Service.Request.queryPartyOrderInfo): Promise<Service.Response.queryPartyOrderInfo[]>;
13
+ queryPartyOrderDetail<K extends (keyof DTO.QueryDataBlockTypeMap)[]>(request: Service.Request.IQueryPartyOrderDetail<K>): Promise<DTO.QueryDataRes<K>[]>;
14
+ getPartyOrderCount(request: Service.Request.getPartyOrderCount): Promise<number>;
15
+ queryPeriodTradeOrderList(request: Service.Request.queryPeriodTradeOrderList): Promise<Service.Response.queryPeriodTradeOrderList[]>;
16
+ queryPeriodTradeOrderOperatorList(request: Service.Request.queryPeriodTradeOrderOperatorList): Promise<Service.Response.queryPeriodTradeOrderOperatorList[]>;
17
+ queryItemSalesInfoInDays(request: Service.Request.IQueryItemSaleInfoInDays): Promise<Service.Response.IQueryItemSaleInfoInDays[]>;
18
+ getRollingSalesStatisticsTotalAmount(request: Service.Request.getRollingSalesStatisticsTotalAmount): Promise<number>;
19
+ queryRollingSalesStatistics(request: Service.Request.queryRollingSalesStatistics): Promise<Service.Response.queryRollingSalesStatistics>;
20
+ }
21
+ declare const queryByCommodityService: QueryByCommodityService;
22
+ export default queryByCommodityService;
@@ -0,0 +1,57 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const service_1 = __importDefault(require("../service"));
7
+ const http_1 = require("../../http");
8
+ class QueryByCommodityService extends service_1.default {
9
+ constructor() {
10
+ super(...arguments);
11
+ this.prefixUrl = '/query/commodity';
12
+ }
13
+ queryTopSaleItem(request) {
14
+ return (0, http_1.callApi)(this.getApiUrl(this.queryTopSaleItem), request);
15
+ }
16
+ querySaleItem(request) {
17
+ return (0, http_1.callApi)(this.getApiUrl(this.querySaleItem), request);
18
+ }
19
+ queryOrderInDepartureDate(request) {
20
+ return (0, http_1.callApi)(this.getApiUrl(this.queryOrderInDepartureDate), request);
21
+ }
22
+ queryOrderBySkuIdList(request) {
23
+ return (0, http_1.callApi)(this.getApiUrl(this.queryOrderBySkuIdList), request);
24
+ }
25
+ queryItineraryList(request) {
26
+ return (0, http_1.callApi)(this.getApiUrl(this.queryItineraryList), request);
27
+ }
28
+ getItineraryCount(request) {
29
+ return (0, http_1.callApi)(this.getApiUrl(this.getItineraryCount), request);
30
+ }
31
+ queryPartyOrderInfo(request) {
32
+ return (0, http_1.callApi)(this.getApiUrl(this.queryPartyOrderInfo), request);
33
+ }
34
+ queryPartyOrderDetail(request) {
35
+ return (0, http_1.callApi)(this.getApiUrl(this.queryPartyOrderDetail), request);
36
+ }
37
+ getPartyOrderCount(request) {
38
+ return (0, http_1.callApi)(this.getApiUrl(this.getPartyOrderCount), request);
39
+ }
40
+ queryPeriodTradeOrderList(request) {
41
+ return (0, http_1.callApi)(this.getApiUrl(this.queryPeriodTradeOrderList), request);
42
+ }
43
+ queryPeriodTradeOrderOperatorList(request) {
44
+ return (0, http_1.callApi)(this.getApiUrl(this.queryPeriodTradeOrderOperatorList), request);
45
+ }
46
+ queryItemSalesInfoInDays(request) {
47
+ return (0, http_1.callApi)(this.getApiUrl(this.queryItemSalesInfoInDays), request);
48
+ }
49
+ getRollingSalesStatisticsTotalAmount(request) {
50
+ return (0, http_1.callApi)(this.getApiUrl(this.getRollingSalesStatisticsTotalAmount), request);
51
+ }
52
+ queryRollingSalesStatistics(request) {
53
+ return (0, http_1.callApi)(this.getApiUrl(this.queryRollingSalesStatistics), request);
54
+ }
55
+ }
56
+ const queryByCommodityService = new QueryByCommodityService();
57
+ exports.default = queryByCommodityService;
@@ -0,0 +1,11 @@
1
+ import BaseService from '../service';
2
+ import { Service } from './types';
3
+ import * as DTO from '../../../types';
4
+ declare class QueryByStoreService extends BaseService implements Service.QueryByStoreController {
5
+ protected prefixUrl: string;
6
+ queryRejectReasons(request: Service.Request.queryRejectReasons): Promise<Service.Response.queryRejectReasons>;
7
+ queryOrderList<K extends (keyof DTO.QueryDataBlockTypeMap)[]>(request: Service.Request.queryStoreOrderList<K>): Promise<DTO.QueryDataRes<K>[]>;
8
+ getOrderCount(request: Service.Request.getStoreOrderCount): Promise<number>;
9
+ }
10
+ declare const queryByStoreService: QueryByStoreService;
11
+ export default queryByStoreService;
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const service_1 = __importDefault(require("../service"));
7
+ const http_1 = require("../../http");
8
+ class QueryByStoreService extends service_1.default {
9
+ constructor() {
10
+ super(...arguments);
11
+ this.prefixUrl = '/query/store';
12
+ }
13
+ queryRejectReasons(request) {
14
+ return (0, http_1.callApi)(this.getApiUrl(this.queryRejectReasons), request);
15
+ }
16
+ queryOrderList(request) {
17
+ return (0, http_1.callApi)(this.getApiUrl(this.queryOrderList), request);
18
+ }
19
+ getOrderCount(request) {
20
+ return (0, http_1.callApi)(this.getApiUrl(this.getOrderCount), request);
21
+ }
22
+ }
23
+ const queryByStoreService = new QueryByStoreService();
24
+ exports.default = queryByStoreService;