@pisell/pisellos 0.10.16 → 0.10.18
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/model/strategy/adapter/promotion/index.js +9 -0
- package/dist/modules/OpenData/index.d.ts +5 -2
- package/dist/modules/OpenData/index.js +27 -12
- package/dist/modules/OpenData/types.d.ts +42 -0
- package/dist/modules/OpenData/types.js +7 -1
- package/dist/modules/OpenData/utils.d.ts +15 -1
- package/dist/modules/OpenData/utils.js +85 -0
- package/dist/modules/Order/index.d.ts +3 -1
- package/dist/modules/Order/index.js +68 -44
- package/dist/modules/Order/types.d.ts +3 -0
- package/dist/modules/Order/types.js +1 -0
- package/dist/modules/ProductList/index.js +96 -74
- package/dist/modules/Rules/index.js +11 -8
- package/dist/modules/SalesSummary/index.js +6 -4
- package/dist/server/index.d.ts +11 -0
- package/dist/server/index.js +845 -481
- package/dist/server/modules/order/index.d.ts +8 -0
- package/dist/server/modules/order/index.js +251 -215
- package/dist/server/utils/small-ticket.d.ts +9 -1
- package/dist/server/utils/small-ticket.js +117 -43
- package/dist/solution/BaseSales/index.d.ts +7 -0
- package/dist/solution/BaseSales/index.js +251 -144
- package/dist/solution/BookingByStep/index.d.ts +2 -2
- package/dist/solution/BookingTicket/index.d.ts +14 -19
- package/dist/solution/BookingTicket/index.js +545 -429
- package/dist/solution/Sales/index.d.ts +20 -4
- package/dist/solution/Sales/index.js +348 -75
- package/dist/solution/Sales/types.d.ts +10 -0
- package/dist/solution/UnifiedBookingSales/index.d.ts +5 -4
- package/dist/solution/UnifiedBookingSales/index.js +495 -422
- package/dist/solution/UnifiedBookingSales/types.d.ts +7 -1
- package/lib/model/strategy/adapter/promotion/index.js +1 -46
- package/lib/modules/OpenData/index.d.ts +5 -2
- package/lib/modules/OpenData/index.js +50 -3
- package/lib/modules/OpenData/types.d.ts +42 -0
- package/lib/modules/OpenData/types.js +9 -1
- package/lib/modules/OpenData/utils.d.ts +15 -1
- package/lib/modules/OpenData/utils.js +85 -0
- package/lib/modules/Order/index.d.ts +3 -1
- package/lib/modules/Order/index.js +41 -21
- package/lib/modules/Order/types.d.ts +3 -0
- package/lib/modules/Order/types.js +1 -0
- package/lib/modules/ProductList/index.js +9 -6
- package/lib/modules/Rules/index.js +8 -6
- package/lib/modules/SalesSummary/index.js +3 -1
- package/lib/server/index.d.ts +11 -0
- package/lib/server/index.js +395 -96
- package/lib/server/modules/order/index.d.ts +8 -0
- package/lib/server/modules/order/index.js +23 -0
- package/lib/server/utils/small-ticket.d.ts +9 -1
- package/lib/server/utils/small-ticket.js +107 -35
- package/lib/solution/BaseSales/index.d.ts +7 -0
- package/lib/solution/BaseSales/index.js +125 -28
- package/lib/solution/BookingByStep/index.d.ts +2 -2
- package/lib/solution/BookingTicket/index.d.ts +14 -19
- package/lib/solution/BookingTicket/index.js +70 -17
- package/lib/solution/Sales/index.d.ts +20 -4
- package/lib/solution/Sales/index.js +183 -15
- package/lib/solution/Sales/types.d.ts +10 -0
- package/lib/solution/UnifiedBookingSales/index.d.ts +5 -4
- package/lib/solution/UnifiedBookingSales/index.js +41 -15
- package/lib/solution/UnifiedBookingSales/types.d.ts +7 -1
- package/package.json +1 -1
|
@@ -2,7 +2,7 @@ import dayjs from 'dayjs';
|
|
|
2
2
|
import { Module, ModuleOptions, PisellCore } from '../../types';
|
|
3
3
|
import { BaseModule } from '../../modules/BaseModule';
|
|
4
4
|
import type { RequestPlugin } from '../../plugins/request';
|
|
5
|
-
import { SalesState, SalesModuleAPI, Reservation, SalesResourceBookingItem, SalesResourceBookingItemWithGroups, SalesTimelineHighlights, ChangeBookingStatusParams, GetResourceBookingItemParams } from './types';
|
|
5
|
+
import { SalesState, SalesModuleAPI, Reservation, SalesResourceBookingItem, SalesResourceBookingItemWithGroups, SalesTimelineHighlights, ChangeBookingStatusParams, GetResourceBookingItemParams, SalesPrintLocalOrderReceiptOptions } from './types';
|
|
6
6
|
import type { BookingData } from '../../server/modules/order/types';
|
|
7
7
|
export * from './types';
|
|
8
8
|
/**
|
|
@@ -26,6 +26,10 @@ export declare class SalesImpl extends BaseModule implements Module, SalesModule
|
|
|
26
26
|
protected otherParams: Record<string, any>;
|
|
27
27
|
protected request: RequestPlugin;
|
|
28
28
|
private logger;
|
|
29
|
+
private invoiceOpenDataModule;
|
|
30
|
+
private invoiceOpenDataTarget;
|
|
31
|
+
private invoiceOpenDataInFlight;
|
|
32
|
+
private invoiceOpenDataInFlightTarget;
|
|
29
33
|
constructor(name?: string, version?: string);
|
|
30
34
|
initialize(core: PisellCore, options?: ModuleOptions): Promise<void>;
|
|
31
35
|
/** 获取当前 store 快照 */
|
|
@@ -42,6 +46,17 @@ export declare class SalesImpl extends BaseModule implements Module, SalesModule
|
|
|
42
46
|
resetReservationList(): Reservation[];
|
|
43
47
|
cancelOrder(orderIds: Array<number | string>): Promise<any>;
|
|
44
48
|
changeBookingStatus(params: ChangeBookingStatusParams): Promise<any>;
|
|
49
|
+
/**
|
|
50
|
+
* 将显式 channel 或当前运行上下文归一为 Invoice OpenData 使用的销售入口。
|
|
51
|
+
* Legacy Sales 的系统上下文没有可打印的 system target,因此统一回退 pos。
|
|
52
|
+
*/
|
|
53
|
+
private getInvoiceSalesChannel;
|
|
54
|
+
private loadInvoiceOpenData;
|
|
55
|
+
private logInvoiceOpenDataFallback;
|
|
56
|
+
private resolveInvoiceConfigs;
|
|
57
|
+
printLocalOrderReceipt<T = any>(lookup: string | number, options: SalesPrintLocalOrderReceiptOptions): Promise<T>;
|
|
58
|
+
/** 清除独立 Documents 缓存;下一次打印会按当前 target 重新获取。 */
|
|
59
|
+
clearOpenDataCache(): void;
|
|
45
60
|
destroy(): Promise<void>;
|
|
46
61
|
/**
|
|
47
62
|
* 时间轴粒度(分钟)
|
|
@@ -50,11 +65,12 @@ export declare class SalesImpl extends BaseModule implements Module, SalesModule
|
|
|
50
65
|
*/
|
|
51
66
|
private getTimelineBucketMinutes;
|
|
52
67
|
/**
|
|
53
|
-
*
|
|
68
|
+
* 解析 current 所属营业日窗口:
|
|
54
69
|
* - 当 operating_day_boundary.type === 'start_time'
|
|
55
|
-
*
|
|
70
|
+
* 使用「最近一个 boundary.time」到「下一个 boundary.time」
|
|
56
71
|
* - 否则回退自然日(00:00 到次日 00:00)
|
|
57
72
|
*/
|
|
73
|
+
private getOperatingDayRange;
|
|
58
74
|
private getTimelineRangeByOperatingBoundary;
|
|
59
75
|
/**
|
|
60
76
|
* 统计时间轴每个时间片的预约数量。
|
|
@@ -95,7 +111,7 @@ export declare class SalesImpl extends BaseModule implements Module, SalesModule
|
|
|
95
111
|
* 2) 若无 active,返回已超时且仍占用中的预约(允许并发多条)
|
|
96
112
|
* 3) 若仍无,返回最近一组未来预约(同 start_time 的并发预约全部返回)
|
|
97
113
|
* 4) 最后兜底返回一条(避免资源有历史预约时完全无反馈)
|
|
98
|
-
* - includeAllFuture
|
|
114
|
+
* - includeAllFuture 时,保留选中预约并返回当前营业日全部后续预约;仅详情接口启用。
|
|
99
115
|
*/
|
|
100
116
|
private pickBookingsForCurrentPoint;
|
|
101
117
|
/**
|