@pisell/pisellos 0.0.569 → 0.0.571

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 (109) hide show
  1. package/dist/effects/index.d.ts +2 -2
  2. package/dist/model/strategy/adapter/dataVariant/type.d.ts +3 -3
  3. package/dist/model/strategy/adapter/itemRule/type.d.ts +6 -6
  4. package/dist/model/strategy/adapter/promotion/type.d.ts +5 -5
  5. package/dist/model/strategy/type.d.ts +1 -1
  6. package/dist/modules/BookingContext/types.d.ts +4 -4
  7. package/dist/modules/BookingContext/utils/resourceErrors.d.ts +1 -1
  8. package/dist/modules/Customer/types.d.ts +1 -1
  9. package/dist/modules/Discount/types.d.ts +1 -1
  10. package/dist/modules/Holder/types.d.ts +1 -1
  11. package/dist/modules/OpenData/types.d.ts +1 -1
  12. package/dist/modules/Order/types.d.ts +5 -5
  13. package/dist/modules/Order/utils/bundleDiscountHydration.d.ts +1 -1
  14. package/dist/modules/Order/utils/orderCollectionIdentity.d.ts +1 -1
  15. package/dist/modules/Order/utils.d.ts +1 -1
  16. package/dist/modules/Payment/types.d.ts +7 -7
  17. package/dist/modules/Product/index.d.ts +1 -1
  18. package/dist/modules/ResourcePlanner/types.d.ts +4 -4
  19. package/dist/modules/Rules/index.js +2 -1
  20. package/dist/modules/Rules/types.d.ts +2 -2
  21. package/dist/modules/ScanOrderLogger/types.d.ts +2 -2
  22. package/dist/modules/Schedule/getDateIsInSchedule.d.ts +1 -1
  23. package/dist/modules/Schedule/type.d.ts +7 -7
  24. package/dist/modules/Schedule/types.d.ts +9 -9
  25. package/dist/plugins/app.d.ts +1 -1
  26. package/dist/plugins/request.d.ts +2 -2
  27. package/dist/server/modules/floor-plan/types.d.ts +1 -1
  28. package/dist/server/modules/menu/types.d.ts +1 -1
  29. package/dist/server/modules/order/types.d.ts +16 -16
  30. package/dist/server/modules/products/types.d.ts +1 -1
  31. package/dist/server/modules/resource/types.d.ts +1 -1
  32. package/dist/server/modules/schedule/utils.d.ts +1 -1
  33. package/dist/server/types.d.ts +4 -4
  34. package/dist/server/utils/small-ticket.d.ts +1 -1
  35. package/dist/solution/BaseSales/index.d.ts +1 -1
  36. package/dist/solution/BaseSales/types.d.ts +7 -7
  37. package/dist/solution/BaseSales/utils/transformBaseProductToOrderProduct.d.ts +1 -1
  38. package/dist/solution/BookingByStep/index.d.ts +1 -1
  39. package/dist/solution/BookingByStep/utils/resources.d.ts +1 -1
  40. package/dist/solution/BookingTicket/index.d.ts +1 -13
  41. package/dist/solution/BookingTicket/types.d.ts +3 -3
  42. package/dist/solution/BookingTicket/utils/addProductDecision.d.ts +1 -1
  43. package/dist/solution/BookingTicket/utils/bookingStatus.d.ts +1 -1
  44. package/dist/solution/BookingTicket/utils/scan/formatGlobalScan.d.ts +1 -1
  45. package/dist/solution/Sales/types.d.ts +4 -4
  46. package/dist/solution/ScanOrder/types.d.ts +5 -5
  47. package/dist/solution/ShopDiscount/types.d.ts +1 -1
  48. package/dist/solution/ShopDiscount/utils.d.ts +2 -2
  49. package/dist/solution/UnifiedBookingSales/types.d.ts +1 -1
  50. package/dist/solution/VenueBooking/types.d.ts +1 -1
  51. package/dist/types/index.d.ts +1 -1
  52. package/dist/utils/task.d.ts +2 -2
  53. package/dist/utils/watch.d.ts +2 -2
  54. package/lib/effects/index.d.ts +2 -2
  55. package/lib/model/strategy/adapter/dataVariant/type.d.ts +3 -3
  56. package/lib/model/strategy/adapter/itemRule/type.d.ts +6 -6
  57. package/lib/model/strategy/adapter/promotion/type.d.ts +5 -5
  58. package/lib/model/strategy/type.d.ts +1 -1
  59. package/lib/modules/BookingContext/types.d.ts +4 -4
  60. package/lib/modules/BookingContext/utils/resourceErrors.d.ts +1 -1
  61. package/lib/modules/Customer/types.d.ts +1 -1
  62. package/lib/modules/Discount/types.d.ts +1 -1
  63. package/lib/modules/Holder/types.d.ts +1 -1
  64. package/lib/modules/OpenData/types.d.ts +1 -1
  65. package/lib/modules/Order/types.d.ts +5 -5
  66. package/lib/modules/Order/utils/bundleDiscountHydration.d.ts +1 -1
  67. package/lib/modules/Order/utils/orderCollectionIdentity.d.ts +1 -1
  68. package/lib/modules/Order/utils.d.ts +1 -1
  69. package/lib/modules/Payment/types.d.ts +7 -7
  70. package/lib/modules/Product/index.d.ts +1 -1
  71. package/lib/modules/ResourcePlanner/types.d.ts +4 -4
  72. package/lib/modules/Rules/index.js +1 -1
  73. package/lib/modules/Rules/types.d.ts +2 -2
  74. package/lib/modules/ScanOrderLogger/types.d.ts +2 -2
  75. package/lib/modules/Schedule/getDateIsInSchedule.d.ts +1 -1
  76. package/lib/modules/Schedule/type.d.ts +7 -7
  77. package/lib/modules/Schedule/types.d.ts +9 -9
  78. package/lib/plugins/app.d.ts +1 -1
  79. package/lib/plugins/request.d.ts +2 -2
  80. package/lib/server/modules/floor-plan/types.d.ts +1 -1
  81. package/lib/server/modules/menu/types.d.ts +1 -1
  82. package/lib/server/modules/order/types.d.ts +16 -16
  83. package/lib/server/modules/products/types.d.ts +1 -1
  84. package/lib/server/modules/resource/types.d.ts +1 -1
  85. package/lib/server/modules/schedule/utils.d.ts +1 -1
  86. package/lib/server/types.d.ts +4 -4
  87. package/lib/server/utils/small-ticket.d.ts +1 -1
  88. package/lib/solution/BaseSales/index.d.ts +1 -1
  89. package/lib/solution/BaseSales/types.d.ts +7 -7
  90. package/lib/solution/BaseSales/utils/transformBaseProductToOrderProduct.d.ts +1 -1
  91. package/lib/solution/BookingByStep/index.d.ts +1 -1
  92. package/lib/solution/BookingByStep/utils/resources.d.ts +1 -1
  93. package/lib/solution/BookingTicket/index.d.ts +1 -13
  94. package/lib/solution/BookingTicket/types.d.ts +3 -3
  95. package/lib/solution/BookingTicket/utils/addProductDecision.d.ts +1 -1
  96. package/lib/solution/BookingTicket/utils/bookingStatus.d.ts +1 -1
  97. package/lib/solution/BookingTicket/utils/scan/formatGlobalScan.d.ts +1 -1
  98. package/lib/solution/Sales/types.d.ts +4 -4
  99. package/lib/solution/ScanOrder/types.d.ts +5 -5
  100. package/lib/solution/ShopDiscount/types.d.ts +1 -1
  101. package/lib/solution/ShopDiscount/utils.d.ts +2 -2
  102. package/lib/solution/UnifiedBookingSales/types.d.ts +1 -1
  103. package/lib/solution/VenueBooking/types.d.ts +1 -1
  104. package/lib/types/index.d.ts +1 -1
  105. package/lib/utils/task.d.ts +2 -2
  106. package/lib/utils/watch.d.ts +2 -2
  107. package/package.json +18 -19
  108. package/dist/model/strategy/adapter/promotion/index.d.ts +0 -4
  109. package/lib/model/strategy/adapter/promotion/index.d.ts +0 -4
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Server 类型定义
3
3
  */
4
- export type CacheType = 'memory' | 'storage' | 'indexDB';
4
+ export declare type CacheType = 'memory' | 'storage' | 'indexDB';
5
5
  export interface CacheProps {
6
6
  key?: string;
7
7
  type?: CacheType;
@@ -20,7 +20,7 @@ export interface RequestSetting {
20
20
  /**
21
21
  * 路由处理函数类型
22
22
  */
23
- export type RouteHandler = (params: {
23
+ export declare type RouteHandler = (params: {
24
24
  url: string;
25
25
  method: 'get' | 'post' | 'remove' | 'put';
26
26
  data?: any;
@@ -31,11 +31,11 @@ export type RouteHandler = (params: {
31
31
  /**
32
32
  * HTTP 方法类型
33
33
  */
34
- export type HttpMethod = 'get' | 'post' | 'remove' | 'put';
34
+ export declare type HttpMethod = 'get' | 'post' | 'remove' | 'put';
35
35
  /**
36
36
  * 路由定义类型
37
37
  */
38
- export type RouteDefinition = {
38
+ export declare type RouteDefinition = {
39
39
  method: HttpMethod;
40
40
  path: string;
41
41
  handler: RouteHandler;
@@ -66,6 +66,6 @@ export interface SmallTicketLocaleData {
66
66
  refund_data: any[];
67
67
  expend_data: any[];
68
68
  }
69
- export type SmallTicketData = Record<string, SmallTicketLocaleData>;
69
+ export declare type SmallTicketData = Record<string, SmallTicketLocaleData>;
70
70
  export declare function buildSmallTicketData(params: BuildSmallTicketDataParams): SmallTicketData;
71
71
  export declare function hasSmallTicketData(value: any): boolean;
@@ -24,7 +24,7 @@ export interface BaseSalesState {
24
24
  schedule?: ScheduleModule;
25
25
  quotation?: QuotationModule;
26
26
  }
27
- export type BaseSalesPrintLocalOrderReceiptParams = string | number;
27
+ export declare type BaseSalesPrintLocalOrderReceiptParams = string | number;
28
28
  export declare class BaseSalesImpl extends BaseModule implements Module {
29
29
  protected defaultName: string;
30
30
  protected defaultVersion: string;
@@ -17,10 +17,10 @@ export declare const BaseSalesHookNames: {
17
17
  readonly onPaymentSyncEnd: "onPaymentSyncEnd";
18
18
  readonly onDepositPaymentSyncEnd: "onDepositPaymentSyncEnd";
19
19
  };
20
- export type BaseSalesHookName = typeof BaseSalesHookNames[keyof typeof BaseSalesHookNames];
20
+ export declare type BaseSalesHookName = typeof BaseSalesHookNames[keyof typeof BaseSalesHookNames];
21
21
  export declare function createBaseSalesHook(moduleName: string, hookName: BaseSalesHookName): string;
22
- export type BaseSalesStatus = 'idle' | 'initializing' | 'ready' | 'error';
23
- export type BaseSalesPaymentStatus = 'paid' | 'partially_paid' | 'unpaid' | 'payment_processing' | string;
22
+ export declare type BaseSalesStatus = 'idle' | 'initializing' | 'ready' | 'error';
23
+ export declare type BaseSalesPaymentStatus = 'paid' | 'partially_paid' | 'unpaid' | 'payment_processing' | string;
24
24
  export interface BaseSalesEntryContext {
25
25
  biz: string;
26
26
  mode: 'scan' | 'append';
@@ -247,7 +247,7 @@ export interface BaseSalesCalculateProductBookingPriceParams {
247
247
  datetime?: string;
248
248
  channel?: string;
249
249
  }
250
- export type BaseSalesProductBookingPriceSegmentSource = 'quotation' | 'fallback';
250
+ export declare type BaseSalesProductBookingPriceSegmentSource = 'quotation' | 'fallback';
251
251
  export interface BaseSalesProductBookingPriceSegment {
252
252
  start_datetime: string;
253
253
  end_datetime?: string;
@@ -283,13 +283,13 @@ export interface BaseSalesProductBookingPriceResult {
283
283
  segments: BaseSalesProductBookingPriceSegment[];
284
284
  product_bundle?: BaseSalesBundleProductBookingPriceResult[];
285
285
  }
286
- export type BaseSalesQuotationCustomerScopeInfo = QuotationCustomerScopeInfo;
286
+ export declare type BaseSalesQuotationCustomerScopeInfo = QuotationCustomerScopeInfo;
287
287
  export interface BaseSalesPriceRecalculationContextChange {
288
288
  previousCustomerId?: number | string | null;
289
289
  nextCustomerId?: number | string | null;
290
290
  [key: string]: any;
291
291
  }
292
- export type BaseSalesAvailabilityMode = 'idle' | 'shop_closed' | 'submit_disabled' | 'resource_busy' | 'additional_order_with_code' | 'additional_order';
292
+ export declare type BaseSalesAvailabilityMode = 'idle' | 'shop_closed' | 'submit_disabled' | 'resource_busy' | 'additional_order_with_code' | 'additional_order';
293
293
  export interface BaseSalesTableFormRecord {
294
294
  policy?: string | null;
295
295
  partyroom_booking?: string | null;
@@ -344,7 +344,7 @@ export interface BaseSalesResourceOccupyDetailApiResponse {
344
344
  occupy_details?: BaseSalesResourceOccupyDetail[] | null;
345
345
  } | null;
346
346
  }
347
- export type BaseSalesResourceSelectType = 'single' | 'multiple' | 'capacity';
347
+ export declare type BaseSalesResourceSelectType = 'single' | 'multiple' | 'capacity';
348
348
  export interface BaseSalesResourceState extends BaseSalesAvailabilityInfo {
349
349
  relationId?: string;
350
350
  tableFormId?: string;
@@ -52,7 +52,7 @@ export interface TransformBaseProductToOrderProductParams {
52
52
  sourceProduct?: ProductData | Record<string, any> | null;
53
53
  sourceItem?: ProductData | Record<string, any> | null;
54
54
  }
55
- export type BaseProductOrderProductInput = Partial<OrderProduct> & OrderProductIdentity & {
55
+ export declare type BaseProductOrderProductInput = Partial<OrderProduct> & OrderProductIdentity & {
56
56
  _origin?: Record<string, any>;
57
57
  };
58
58
  /**
@@ -373,7 +373,7 @@ export declare class BookingByStepImpl extends BaseModule implements Module {
373
373
  };
374
374
  setOtherData(key: string, value: any): void;
375
375
  getOtherData(key: string): any;
376
- getProductTypeById(id: number): Promise<"normal" | "duration" | "session">;
376
+ getProductTypeById(id: number): Promise<"duration" | "session" | "normal">;
377
377
  /**
378
378
  * 提供给 UI 的方法,减轻 UI 层的计算压力,UI 层只需要传递 cartItemId 和 resourceCode 即返回对应的 renderList
379
379
  *
@@ -6,7 +6,7 @@ import { CartItem, ProductData } from '../../../modules';
6
6
  * 3. 格式化资源相关 格式化资源列表 --> 格式化资源 --> 获取时间切片列表 --> 判断单个时间切片是否可用 formatResources
7
7
  *
8
8
  */
9
- type DateType = Dayjs;
9
+ declare type DateType = Dayjs;
10
10
  export interface TimeSliceItem {
11
11
  start_time: string;
12
12
  end_time: string;
@@ -441,19 +441,7 @@ export declare class BookingTicketImpl extends BaseSalesImpl implements Module {
441
441
  * 加车两阶段主决策(规格弹窗 / 资源编辑 / 直接加车)。
442
442
  * 与 ticketBooking `handleSelectProduct` + `handleBooking4Service` 等价。
443
443
  */
444
- decideAddProduct(item: any, options?: Partial<AddProductDecideContext>): {
445
- action: "reloadCatalog";
446
- } | {
447
- action: "add";
448
- cacheItem: any;
449
- } | {
450
- action: "requiresDetail";
451
- payload: AddProductRequiresDetailPayload;
452
- } | {
453
- action: "requiresBookingEdit";
454
- cacheItem: any;
455
- payload: import("./utils/addProductDecision").AddProductRequiresBookingEditPayload;
456
- };
444
+ decideAddProduct(item: any, options?: Partial<AddProductDecideContext>): import("./utils/addProductDecision").AddProductDecision;
457
445
  /** 规格弹窗 callback 后的第二段决策。 */
458
446
  decideAfterDetail(cacheItem: any, options?: Partial<AddProductDecideContext>): import("./utils/addProductDecision").AddProductDecision;
459
447
  /**
@@ -107,7 +107,7 @@ export interface IScanResult {
107
107
  *
108
108
  * 直接透传 tempOrder.products 协议行,不做 Solution 层 enrichment。
109
109
  */
110
- export type BookingTicketCartItemView = BaseSalesOrderProduct;
110
+ export declare type BookingTicketCartItemView = BaseSalesOrderProduct;
111
111
  /**
112
112
  * BookingTicket 面向 UI 的 booking 行视图(平铺,附带关联商品)。
113
113
  */
@@ -183,7 +183,7 @@ export interface AddAddTimeProductToBookingInput {
183
183
  * @example
184
184
  * const line: AddAddTimeProductLineInput = { product, product_add_schedule_time: 30 };
185
185
  */
186
- export type AddAddTimeProductLineInput = Omit<AddAddTimeProductToBookingInput, 'booking' | 'coveredMinutes'>;
186
+ export declare type AddAddTimeProductLineInput = Omit<AddAddTimeProductToBookingInput, 'booking' | 'coveredMinutes'>;
187
187
  /**
188
188
  * 批量添加加时商品到已有 booking 的输入。
189
189
  *
@@ -236,7 +236,7 @@ export interface GlobalScanHostBridge {
236
236
  refresh?: () => void;
237
237
  }
238
238
  /** handleGlobalScanCode 结构化返回 */
239
- export type GlobalScanHandleResult = {
239
+ export declare type GlobalScanHandleResult = {
240
240
  status: 'success';
241
241
  kind: 'customer' | 'products' | 'promotion';
242
242
  meta?: {
@@ -8,7 +8,7 @@ import type { OrderProduct, OrderProductIdentity, AddProductBookingInput } from
8
8
  * 2. `requiresBookingEdit`:资源 / 时间编辑抽屉(门禁:`getIsAutoClose` on prepared cacheItem)
9
9
  * 3. `add`:两关均通过,直接 transform + 加车
10
10
  */
11
- export type AddProductDecision = {
11
+ export declare type AddProductDecision = {
12
12
  action: 'add';
13
13
  cacheItem: any;
14
14
  } | {
@@ -18,7 +18,7 @@
18
18
  * action: 'confirm',
19
19
  * });
20
20
  */
21
- export type BookingTransitionAction = 'confirm' | 'reject' | 'arrive' | 'start' | 'complete' | 'cancel' | 'no_show' | 'reschedule';
21
+ export declare type BookingTransitionAction = 'confirm' | 'reject' | 'arrive' | 'start' | 'complete' | 'cancel' | 'no_show' | 'reschedule';
22
22
  /** 子预约状态转移入参 */
23
23
  export interface TransitionChildBookingParams {
24
24
  schedule_event_id: number | string;
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * 全局扫码搜索结果格式化(对齐 ticketBooking `formatScanGlobal`)。
3
3
  */
4
- export type GlobalScanSearchType = 'customer' | 'wallet' | 'walletPass' | 'product' | 'local_product' | 'order';
4
+ export declare type GlobalScanSearchType = 'customer' | 'wallet' | 'walletPass' | 'product' | 'local_product' | 'order';
5
5
  export interface GlobalScanFormattedResult {
6
6
  searchType: GlobalScanSearchType;
7
7
  data: any;
@@ -15,9 +15,9 @@ export declare enum SalesHooks {
15
15
  * 将 Server/Order 原始数据转换为真正的 Reservation DTO,
16
16
  * 当前不要直接把 OrderData 当作最终 UI 数据结构。
17
17
  */
18
- export type Reservation = OrderData;
19
- export type SalesBookingStatus = 'reserved' | 'occupied' | 'locked' | 'completed' | undefined;
20
- export type SalesReservedStatus = 'not_arrived' | 'late' | undefined;
18
+ export declare type Reservation = OrderData;
19
+ export declare type SalesBookingStatus = 'reserved' | 'occupied' | 'locked' | 'completed' | undefined;
20
+ export declare type SalesReservedStatus = 'not_arrived' | 'late' | undefined;
21
21
  export interface SalesResourceMatchedBooking extends Omit<BookingData, 'status'> {
22
22
  status: SalesBookingStatus;
23
23
  isNext?: boolean;
@@ -39,7 +39,7 @@ export interface SalesResourceBookingItemWithGroups extends SalesResourceBooking
39
39
  completedBookings: SalesResourceMatchedBooking[];
40
40
  unpaidBookings: SalesResourceMatchedBooking[];
41
41
  }
42
- export type SalesTimelineHighlights = number[];
42
+ export declare type SalesTimelineHighlights = number[];
43
43
  export interface ChangeBookingStatusParams {
44
44
  booking_id: number | string;
45
45
  appointment_status: string;
@@ -10,8 +10,8 @@ export declare enum ScanOrderHooks {
10
10
  onRefresh = "scanOrder:onRefresh",
11
11
  onCartValidationChanged = "scanOrder:onCartValidationChanged"
12
12
  }
13
- export type ScanOrderStatus = 'idle' | 'initializing' | 'ready' | 'error';
14
- export type ScanOrderEntryContext = {
13
+ export declare type ScanOrderStatus = 'idle' | 'initializing' | 'ready' | 'error';
14
+ export declare type ScanOrderEntryContext = {
15
15
  biz: string;
16
16
  mode: 'scan' | 'append';
17
17
  resourceId?: string;
@@ -208,7 +208,7 @@ export interface ScanOrderSubmitPayload extends Omit<ScanOrderTempOrder, 'platfo
208
208
  }>;
209
209
  products: ScanOrderSubmitProduct[];
210
210
  }
211
- export type ScanOrderAvailabilityMode = 'idle' | 'shop_closed' | 'submit_disabled' | 'resource_busy' | 'multiple_orders' | 'additional_order_with_code' | 'additional_order';
211
+ export declare type ScanOrderAvailabilityMode = 'idle' | 'shop_closed' | 'submit_disabled' | 'resource_busy' | 'multiple_orders' | 'additional_order_with_code' | 'additional_order';
212
212
  export interface ScanOrderTableFormRecord {
213
213
  policy?: string | null;
214
214
  partyroom_booking?: string | null;
@@ -267,7 +267,7 @@ export interface ScanOrderResourceOccupyDetailApiResponse {
267
267
  occupy_details?: ScanOrderResourceOccupyDetail[] | null;
268
268
  } | null;
269
269
  }
270
- export type ScanOrderResourceSelectType = 'single' | 'multiple' | 'capacity';
270
+ export declare type ScanOrderResourceSelectType = 'single' | 'multiple' | 'capacity';
271
271
  export interface ScanOrderReservationResourceSelectInfo {
272
272
  resourceSelectType?: ScanOrderResourceSelectType;
273
273
  isSingleReservation: boolean;
@@ -277,7 +277,7 @@ export interface ScanOrderReservationResourceSelectInfo {
277
277
  export interface ScanOrderAllowAddItemsInfo {
278
278
  enabled: boolean;
279
279
  }
280
- export type ScanOrderSyncAdditionalOrderReason = 'missing_resource_id' | 'no_order' | 'multiple_orders' | 'add_items_disabled' | 'invalid_order_id';
280
+ export declare type ScanOrderSyncAdditionalOrderReason = 'missing_resource_id' | 'no_order' | 'multiple_orders' | 'add_items_disabled' | 'invalid_order_id';
281
281
  export interface ScanOrderSyncAdditionalOrderResult {
282
282
  matched: boolean;
283
283
  order_id?: string;
@@ -11,7 +11,7 @@ export declare enum ShopDiscountHooks {
11
11
  onRulesListChange = "shopDiscount:onRulesListChange",
12
12
  onLoadPrepareCalcResult = "shopDiscount:onLoadPrepareCalcResult"
13
13
  }
14
- export type Customer = {
14
+ export declare type Customer = {
15
15
  id: string | number;
16
16
  name: string;
17
17
  email: string;
@@ -21,13 +21,13 @@ export declare const isAllNormalProduct: (items: any[]) => boolean;
21
21
  * @returns
22
22
  */
23
23
  export declare const getDiscountAmount: (discount: Discount, total: number, price: number) => number;
24
- export declare const getDiscountListAmountTotal: (discount: Discount[]) => any;
24
+ export declare const getDiscountListAmountTotal: (discount: Discount[]) => Discount;
25
25
  /**
26
26
  * 获取折扣金额 计算每个折扣的金额
27
27
  * @param discount
28
28
  * @returns
29
29
  */
30
- export declare const getDiscountListAmount: (discount: Discount[]) => any;
30
+ export declare const getDiscountListAmount: (discount: Discount[]) => Discount;
31
31
  export interface ScheduleItem {
32
32
  id: number;
33
33
  name: string | {
@@ -55,7 +55,7 @@ export interface UnifiedBookingSalesStagePlannerProductsParams {
55
55
  rawProducts?: Record<string, any>[];
56
56
  }
57
57
  /** Ordinary retail product staging. No resource, time, or booking facts are required. */
58
- export type UnifiedBookingSalesStageRetailProductsParams = UnifiedBookingSalesStagePlannerProductsParams;
58
+ export declare type UnifiedBookingSalesStageRetailProductsParams = UnifiedBookingSalesStagePlannerProductsParams;
59
59
  /** Adds one ordinary retail product without replacing other retail lines already in the cart. */
60
60
  export interface UnifiedBookingSalesAddRetailProductParams {
61
61
  /** Prefer a supplied catalog record when the UI has already loaded it. */
@@ -11,7 +11,7 @@ export declare enum VenueBookingHooks {
11
11
  /** 登录客户的智能定价、营销配置与订单汇总已完成刷新 */
12
12
  onSmartPricingUpdated = "venueBooking:onSmartPricingUpdated"
13
13
  }
14
- export type VenueBookingStatus = 'idle' | 'initializing' | 'ready' | 'error';
14
+ export declare type VenueBookingStatus = 'idle' | 'initializing' | 'ready' | 'error';
15
15
  export interface VenueBookingEntryContext {
16
16
  biz: string;
17
17
  venueId?: string;
@@ -38,7 +38,7 @@ export interface ModuleOptions {
38
38
  initialState?: Record<string, any>;
39
39
  otherParams?: Record<string, any>;
40
40
  }
41
- export type EventHandler = (data?: any) => void;
41
+ export declare type EventHandler = (data?: any) => void;
42
42
  export interface PisellCore {
43
43
  registerPlugin: (plugin: Plugin, options?: PluginOptions) => void;
44
44
  getPlugin: <T extends Plugin>(name: string) => T | null;
@@ -1,5 +1,5 @@
1
- type Action = (...args: any[]) => Promise<any>;
2
- type Task = {
1
+ declare type Action = (...args: any[]) => Promise<any>;
2
+ declare type Task = {
3
3
  uuid: string;
4
4
  type: string;
5
5
  actionParams?: Record<string, any>;
@@ -2,8 +2,8 @@
2
2
  * 监听模块
3
3
  *
4
4
  */
5
- export type WatchEventCallback = (...args: any[]) => void;
6
- export type WatchEventItem = {
5
+ export declare type WatchEventCallback = (...args: any[]) => void;
6
+ export declare type WatchEventItem = {
7
7
  key: string;
8
8
  callback: WatchEventCallback;
9
9
  };
@@ -1,8 +1,8 @@
1
- type EffectCallback = (payload: any) => void | Promise<void | {
1
+ declare type EffectCallback = (payload: any) => void | Promise<void | {
2
2
  status: boolean;
3
3
  message?: string;
4
4
  }>;
5
- type UnsubscribeFunction = () => void;
5
+ declare type UnsubscribeFunction = () => void;
6
6
  declare class EffectsManager {
7
7
  private listeners;
8
8
  on(event: string, callback: EffectCallback): UnsubscribeFunction;
@@ -8,7 +8,7 @@ import type { ScheduleItem } from '../../../../modules/Schedule/types';
8
8
  export declare const DATA_VARIANT_ACTION_TYPES: {
9
9
  readonly APPLY: "DATA_VARIANT_APPLY";
10
10
  };
11
- export type DataVariantActionType = (typeof DATA_VARIANT_ACTION_TYPES)[keyof typeof DATA_VARIANT_ACTION_TYPES];
11
+ export declare type DataVariantActionType = (typeof DATA_VARIANT_ACTION_TYPES)[keyof typeof DATA_VARIANT_ACTION_TYPES];
12
12
  /**
13
13
  * Data Variant 规则元数据。
14
14
  *
@@ -116,7 +116,7 @@ export interface EffectiveRuleInfo {
116
116
  productRules: ConditionRule[];
117
117
  globalResult: EvaluationResult;
118
118
  }
119
- export type GlobalEffectiveRuleMap = Map<string, EffectiveRuleInfo>;
119
+ export declare type GlobalEffectiveRuleMap = Map<string, EffectiveRuleInfo>;
120
120
  /**
121
121
  * 单条商品命中的变体覆盖信息。
122
122
  */
@@ -145,4 +145,4 @@ export interface ResolvedDataVariantResult {
145
145
  scheduleTimePoints: string[];
146
146
  rawResults: EvaluationResult[];
147
147
  }
148
- export type ConditionScope = 'global' | 'product';
148
+ export declare type ConditionScope = 'global' | 'product';
@@ -5,7 +5,7 @@ export declare const ITEM_RULE_ACTION_TYPES: {
5
5
  /** 预填购物车 */
6
6
  readonly PREFILL_CART: "PREFILL_CART";
7
7
  };
8
- export type ItemRuleActionType = (typeof ITEM_RULE_ACTION_TYPES)[keyof typeof ITEM_RULE_ACTION_TYPES];
8
+ export declare type ItemRuleActionType = (typeof ITEM_RULE_ACTION_TYPES)[keyof typeof ITEM_RULE_ACTION_TYPES];
9
9
  export declare const ITEM_RULE_TEMPLATES: {
10
10
  /** 空白规则 */
11
11
  readonly BLANK: "blank";
@@ -16,15 +16,15 @@ export declare const ITEM_RULE_TEMPLATES: {
16
16
  /** 必选商品 */
17
17
  readonly MUST_INCLUDE: "must_include";
18
18
  };
19
- export type ItemRuleTemplate = (typeof ITEM_RULE_TEMPLATES)[keyof typeof ITEM_RULE_TEMPLATES];
19
+ export declare type ItemRuleTemplate = (typeof ITEM_RULE_TEMPLATES)[keyof typeof ITEM_RULE_TEMPLATES];
20
20
  /** 数量比较类型 */
21
- export type QuantityComparison = 'minimum' | 'maximum' | 'exact' | 'must_include';
21
+ export declare type QuantityComparison = 'minimum' | 'maximum' | 'exact' | 'must_include';
22
22
  /** 数量来源 */
23
- export type QuantitySource = 'total_pax' | 'adult_pax' | 'fixed';
23
+ export declare type QuantitySource = 'total_pax' | 'adult_pax' | 'fixed';
24
24
  /** 目标类型(当前仅支持按商品) */
25
- export type TargetType = 'product';
25
+ export declare type TargetType = 'product';
26
26
  /** 作用范围 */
27
- export type RuleScope = 'each_submission' | 'first_submission_only' | 'subsequent_only' | 'cumulative';
27
+ export declare type RuleScope = 'each_submission' | 'first_submission_only' | 'subsequent_only' | 'cumulative';
28
28
  /**
29
29
  * 单条数量规则
30
30
  *
@@ -17,7 +17,7 @@ export declare const PROMOTION_ACTION_TYPES: {
17
17
  /** 固定减价 */
18
18
  readonly DEDUCT_AMOUNT: "DEDUCT_AMOUNT";
19
19
  };
20
- export type PromotionActionType = (typeof PROMOTION_ACTION_TYPES)[keyof typeof PROMOTION_ACTION_TYPES];
20
+ export declare type PromotionActionType = (typeof PROMOTION_ACTION_TYPES)[keyof typeof PROMOTION_ACTION_TYPES];
21
21
  /**
22
22
  * X件Y元 - Action Value
23
23
  *
@@ -54,7 +54,7 @@ export interface BuyXGetYFreeValue {
54
54
  /**
55
55
  * 赠品选择模式
56
56
  */
57
- export type GiftSelectionMode = 'user_select' | 'auto' | 'cheapest';
57
+ export declare type GiftSelectionMode = 'user_select' | 'auto' | 'cheapest';
58
58
  /**
59
59
  * 买X送Y - Action Config
60
60
  */
@@ -105,7 +105,7 @@ export interface BuyXGetYFreeAction extends Omit<ActionEffect, 'type' | 'value'
105
105
  /**
106
106
  * 促销活动 Action 联合类型
107
107
  */
108
- export type PromotionAction = XItemsForYPriceAction | BuyXGetYFreeAction;
108
+ export declare type PromotionAction = XItemsForYPriceAction | BuyXGetYFreeAction;
109
109
  /**
110
110
  * 促销相关运算符
111
111
  */
@@ -135,7 +135,7 @@ export interface PromotionBusinessData {
135
135
  /** 自定义属性 */
136
136
  custom?: Record<string, any>;
137
137
  }
138
- type ProductBundleItem = {
138
+ declare type ProductBundleItem = {
139
139
  /** 主商品ID */
140
140
  product_id: number;
141
141
  /** 变体ID(0 表示无变体) */
@@ -195,7 +195,7 @@ export interface PromotionTransformResult {
195
195
  /**
196
196
  * Action 详情联合类型
197
197
  */
198
- export type PromotionActionDetail = XItemsForYPriceActionDetail | BuyXGetYFreeActionDetail;
198
+ export declare type PromotionActionDetail = XItemsForYPriceActionDetail | BuyXGetYFreeActionDetail;
199
199
  /**
200
200
  * X件Y元 Action 详情
201
201
  */
@@ -242,4 +242,4 @@ export interface EngineOptions {
242
242
  /**
243
243
  * 运算符处理器
244
244
  */
245
- export type OperatorHandler = (fieldValue: any, compareValue: any, rule: ConditionRule) => boolean;
245
+ export declare type OperatorHandler = (fieldValue: any, compareValue: any, rule: ConditionRule) => boolean;
@@ -39,17 +39,17 @@ export interface InitBookingContextParams {
39
39
  * 资源全集 map:key 为资源 id(数字),value 为资源原始对象,含 times / event_list 等运行态。
40
40
  * 这里只声明 Record 形态;具体字段保留 `any`,与 ticketBooking 现网传入的数据形状兼容。
41
41
  */
42
- export type BookingContextResource = Record<string, any>;
43
- export type BookingContextResourceMap = Record<string, BookingContextResource>;
42
+ export declare type BookingContextResource = Record<string, any>;
43
+ export declare type BookingContextResourceMap = Record<string, BookingContextResource>;
44
44
  /**
45
45
  * 形参 booking_config(结构来自 `/core/board/management/config` 接口)。
46
46
  * OS 不强制 schema,保留 `Record<string, any>` 兼容现网;常用路径文档化在 SDK docs。
47
47
  */
48
- export type BookingContextConfig = Record<string, any>;
48
+ export declare type BookingContextConfig = Record<string, any>;
49
49
  /**
50
50
  * 日期入参:接受 dayjs 实例、ISO 字符串、Date 实例;内部统一 normalize 为 ISO 字符串保存。
51
51
  */
52
- export type BookingContextDateInput = string | Date | {
52
+ export declare type BookingContextDateInput = string | Date | {
53
53
  format?: (fmt?: string) => string;
54
54
  } | null | undefined;
55
55
  /**
@@ -9,7 +9,7 @@
9
9
  *
10
10
  * OS 这边不耦合 i18n 文案,UI 拿到 reason + params 后自行渲染(参考 docs/SDK 中给出的 i18n key 对照表)。
11
11
  */
12
- export type ResourceUnavailableReason = 'no_product' | 'time_out_of_range' | 'count_out_of_range' | 'resource_unbound';
12
+ export declare type ResourceUnavailableReason = 'no_product' | 'time_out_of_range' | 'count_out_of_range' | 'resource_unbound';
13
13
  export interface ResourceError {
14
14
  reason: ResourceUnavailableReason;
15
15
  params: {
@@ -33,7 +33,7 @@ export interface ShopCustomer extends ICustomer {
33
33
  * walletDetails.wallet: 用户所有wallet
34
34
  * latestWalletDetail.wallet: 用户最新wallet
35
35
  */
36
- type CustomerWith = 'formRecord' | 'walletDetails.wallet' | 'latestWalletDetail.wallet';
36
+ declare type CustomerWith = 'formRecord' | 'walletDetails.wallet' | 'latestWalletDetail.wallet';
37
37
  /**
38
38
  * 获取客户列表参数
39
39
  */
@@ -63,7 +63,7 @@ interface UsageCreditsValue {
63
63
  max_per_week: number;
64
64
  max_per_month: number;
65
65
  }
66
- export type DiscountFilterRejectKey = 'total_credits' | 'per_user_limit' | 'max_per_day' | 'max_per_week' | 'max_per_month';
66
+ export declare type DiscountFilterRejectKey = 'total_credits' | 'per_user_limit' | 'max_per_day' | 'max_per_week' | 'max_per_month';
67
67
  export interface DiscountWithReason {
68
68
  discountList: Discount[];
69
69
  unavailableReasonKey: DiscountFilterRejectKey | null;
@@ -39,7 +39,7 @@ export interface IFormItemData {
39
39
  /**
40
40
  * form_id 为 key 的 map 结构,如 948: { records: [], form: {} }
41
41
  */
42
- export type HolderFormMap = Record<string, IFormItemData>;
42
+ export declare type HolderFormMap = Record<string, IFormItemData>;
43
43
  /**
44
44
  * Holder 模块 reactive store,仅 holderMap 会触发 changed 事件
45
45
  */
@@ -61,7 +61,7 @@ export interface OpenDataApiResponse {
61
61
  message: string;
62
62
  data: OpenDataConfig;
63
63
  }
64
- export type OpenDataUnavailableReason = 'shop_disabled' | 'paused' | 'closed' | 'reservation_disabled';
64
+ export declare type OpenDataUnavailableReason = 'shop_disabled' | 'paused' | 'closed' | 'reservation_disabled';
65
65
  export interface OpenDataAvailabilityResult {
66
66
  available: boolean;
67
67
  reason: OpenDataUnavailableReason | null;
@@ -69,7 +69,7 @@ export interface OrderGiftSelectResult {
69
69
  *
70
70
  * 返回数组时沿用旧协议,只写 tempOrder.products;返回对象时可同时写入预约 bookings。
71
71
  */
72
- export type OrderGiftSelectResolver = (ctx: OrderGiftSelectContext) => Promise<Partial<OrderProduct>[] | OrderGiftSelectResult | null>;
72
+ export declare type OrderGiftSelectResolver = (ctx: OrderGiftSelectContext) => Promise<Partial<OrderProduct>[] | OrderGiftSelectResult | null>;
73
73
  /** 未满足的促销策略(购物车底部 alert 渲染源) */
74
74
  export interface OrderUnfulfilledPromotion {
75
75
  strategyId: string;
@@ -318,7 +318,7 @@ export interface ReplaceTempOrderOptions {
318
318
  persist?: boolean;
319
319
  saveDraft?: boolean;
320
320
  }
321
- export type AddProductBookingInput = Record<string, any>;
321
+ export declare type AddProductBookingInput = Record<string, any>;
322
322
  /** 更新购物车行:仅传 SKU 时命中同 SKU 第一行;多行同 SKU 须传 unique_identification_number / 选项指纹等 */
323
323
  export interface UpdateOrderProductParams {
324
324
  product_id: number | null;
@@ -376,7 +376,7 @@ export interface OrderProductMergeDecisionContext {
376
376
  booking?: AddProductBookingInput;
377
377
  defaultShouldMerge: boolean;
378
378
  }
379
- export type OrderProductMergeDecisionResult = boolean | {
379
+ export declare type OrderProductMergeDecisionResult = boolean | {
380
380
  shouldMerge: boolean;
381
381
  reason?: string;
382
382
  [key: string]: any;
@@ -524,11 +524,11 @@ export interface OrderPaymentData {
524
524
  created_at?: string;
525
525
  updated_at?: string;
526
526
  }
527
- export type OrderPaymentSource = PaymentItem | OrderPaymentData | Record<string, any>;
527
+ export declare type OrderPaymentSource = PaymentItem | OrderPaymentData | Record<string, any>;
528
528
  export interface MapOrderPaymentsOptions {
529
529
  includeVoided?: boolean;
530
530
  }
531
- export type OrderSyncState = 'local' | 'submitting' | 'submitted' | 'failed' | 'remoteLoaded';
531
+ export declare type OrderSyncState = 'local' | 'submitting' | 'submitted' | 'failed' | 'remoteLoaded';
532
532
  export interface LoadSalesDetailParams {
533
533
  orderId?: number | string;
534
534
  orderNumber?: string;
@@ -1,5 +1,5 @@
1
1
  import type { OrderProductDiscountItem } from '../types';
2
- type NormalizeDiscountList = (discountList?: unknown[] | null) => OrderProductDiscountItem[];
2
+ declare type NormalizeDiscountList = (discountList?: unknown[] | null) => OrderProductDiscountItem[];
3
3
  export declare function restoreHydratedBundleDiscounts<T extends Record<string, any>>(product: T, normalizeDiscountList: NormalizeDiscountList): T;
4
4
  export declare function expandHydratedProductsForDiscountCollection(products: any[] | undefined | null): any[];
5
5
  export {};
@@ -1,4 +1,4 @@
1
- export type OrderCollectionKind = 'product' | 'booking' | 'payment';
1
+ export declare type OrderCollectionKind = 'product' | 'booking' | 'payment';
2
2
  export interface OrderCollectionIdentityStats {
3
3
  backfilledUidCount: number;
4
4
  collapsedDuplicateCount: number;
@@ -209,7 +209,7 @@ export interface SubmitPayloadEnhancerContext {
209
209
  bookingUuid: string;
210
210
  now: Date;
211
211
  }
212
- export type SubmitPayloadEnhancer = (payload: OrderSubmitPayload, ctx: SubmitPayloadEnhancerContext) => OrderSubmitPayload;
212
+ export declare type SubmitPayloadEnhancer = (payload: OrderSubmitPayload, ctx: SubmitPayloadEnhancerContext) => OrderSubmitPayload;
213
213
  export declare function buildSubmitPayload(params: {
214
214
  tempOrder: OrderTempOrder;
215
215
  cacheId?: string;