@pisell/pisellos 2.1.173 → 2.1.174

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 (93) hide show
  1. package/dist/model/strategy/adapter/promotion/index.js +9 -0
  2. package/dist/model/strategy/adapter/walletPass/evaluator.d.ts +2 -0
  3. package/dist/model/strategy/adapter/walletPass/evaluator.js +4 -2
  4. package/dist/modules/Discount/availability.d.ts +7 -0
  5. package/dist/modules/Discount/availability.js +52 -0
  6. package/dist/modules/Discount/entitlementPass.d.ts +34 -0
  7. package/dist/modules/Discount/entitlementPass.js +147 -0
  8. package/dist/modules/Discount/entitlementState.d.ts +8 -0
  9. package/dist/modules/Discount/entitlementState.js +205 -0
  10. package/dist/modules/Discount/index.d.ts +6 -3
  11. package/dist/modules/Discount/index.js +125 -23
  12. package/dist/modules/Discount/types.d.ts +34 -5
  13. package/dist/modules/Holder/index.d.ts +48 -0
  14. package/dist/modules/Holder/index.js +640 -0
  15. package/dist/modules/Holder/types.d.ts +123 -0
  16. package/dist/modules/Holder/types.js +1 -0
  17. package/dist/modules/Holder/utils.d.ts +13 -0
  18. package/dist/modules/Holder/utils.js +34 -0
  19. package/dist/modules/Order/index.d.ts +1 -0
  20. package/dist/modules/Order/index.js +18 -1
  21. package/dist/modules/Order/types.d.ts +2 -0
  22. package/dist/modules/Order/utils.d.ts +10 -0
  23. package/dist/modules/Order/utils.js +35 -3
  24. package/dist/modules/Product/types.d.ts +7 -0
  25. package/dist/modules/Rules/entitlementLines.d.ts +8 -0
  26. package/dist/modules/Rules/entitlementLines.js +157 -0
  27. package/dist/modules/Rules/index.d.ts +12 -2
  28. package/dist/modules/Rules/index.js +377 -112
  29. package/dist/modules/Rules/types.d.ts +2 -2
  30. package/dist/modules/index.d.ts +1 -0
  31. package/dist/modules/index.js +2 -1
  32. package/dist/plugins/window.d.ts +3 -0
  33. package/dist/solution/BookingByStep/index.d.ts +17 -2
  34. package/dist/solution/BookingByStep/index.js +276 -204
  35. package/dist/solution/BookingByStep/types.d.ts +2 -1
  36. package/dist/solution/BookingByStep/types.js +3 -1
  37. package/dist/solution/ScanOrder/index.js +1 -1
  38. package/dist/solution/ScanOrder/types.d.ts +1 -0
  39. package/dist/solution/ShopDiscount/index.d.ts +3 -0
  40. package/dist/solution/ShopDiscount/index.js +161 -78
  41. package/dist/solution/ShopDiscount/utils.d.ts +1 -0
  42. package/dist/solution/ShopDiscount/utils.js +40 -1
  43. package/dist/solution/VenueBooking/index.d.ts +19 -0
  44. package/dist/solution/VenueBooking/index.js +978 -748
  45. package/dist/solution/VenueBooking/types.d.ts +2 -0
  46. package/dist/types/index.d.ts +1 -0
  47. package/lib/model/strategy/adapter/promotion/index.js +49 -0
  48. package/lib/model/strategy/adapter/walletPass/evaluator.d.ts +2 -0
  49. package/lib/model/strategy/adapter/walletPass/evaluator.js +4 -2
  50. package/lib/modules/Discount/availability.d.ts +7 -0
  51. package/lib/modules/Discount/availability.js +91 -0
  52. package/lib/modules/Discount/entitlementPass.d.ts +34 -0
  53. package/lib/modules/Discount/entitlementPass.js +184 -0
  54. package/lib/modules/Discount/entitlementState.d.ts +8 -0
  55. package/lib/modules/Discount/entitlementState.js +206 -0
  56. package/lib/modules/Discount/index.d.ts +6 -3
  57. package/lib/modules/Discount/index.js +66 -16
  58. package/lib/modules/Discount/types.d.ts +34 -5
  59. package/lib/modules/Holder/index.d.ts +48 -0
  60. package/lib/modules/Holder/index.js +402 -0
  61. package/lib/modules/Holder/types.d.ts +123 -0
  62. package/lib/modules/Holder/types.js +17 -0
  63. package/lib/modules/Holder/utils.d.ts +13 -0
  64. package/lib/modules/Holder/utils.js +71 -0
  65. package/lib/modules/Order/index.d.ts +1 -0
  66. package/lib/modules/Order/index.js +14 -0
  67. package/lib/modules/Order/types.d.ts +2 -0
  68. package/lib/modules/Order/utils.d.ts +10 -0
  69. package/lib/modules/Order/utils.js +36 -5
  70. package/lib/modules/Product/types.d.ts +7 -0
  71. package/lib/modules/Rules/entitlementLines.d.ts +8 -0
  72. package/lib/modules/Rules/entitlementLines.js +158 -0
  73. package/lib/modules/Rules/index.d.ts +12 -2
  74. package/lib/modules/Rules/index.js +304 -70
  75. package/lib/modules/Rules/types.d.ts +2 -2
  76. package/lib/modules/index.d.ts +1 -0
  77. package/lib/modules/index.js +3 -1
  78. package/lib/plugins/window.d.ts +3 -0
  79. package/lib/solution/BookingByStep/index.d.ts +17 -2
  80. package/lib/solution/BookingByStep/index.js +39 -0
  81. package/lib/solution/BookingByStep/types.d.ts +2 -1
  82. package/lib/solution/BookingByStep/types.js +5 -0
  83. package/lib/solution/ScanOrder/index.js +1 -1
  84. package/lib/solution/ScanOrder/types.d.ts +1 -0
  85. package/lib/solution/ShopDiscount/index.d.ts +3 -0
  86. package/lib/solution/ShopDiscount/index.js +78 -28
  87. package/lib/solution/ShopDiscount/utils.d.ts +1 -0
  88. package/lib/solution/ShopDiscount/utils.js +42 -1
  89. package/lib/solution/VenueBooking/index.d.ts +19 -0
  90. package/lib/solution/VenueBooking/index.js +134 -16
  91. package/lib/solution/VenueBooking/types.d.ts +2 -0
  92. package/lib/types/index.d.ts +1 -0
  93. package/package.json +1 -1
@@ -29,7 +29,7 @@ export interface RulesModuleAPI {
29
29
  discountList: any[];
30
30
  productList: any[];
31
31
  holders: {
32
- form_record_id: number;
32
+ form_record_id: number | string;
33
33
  }[];
34
34
  isFormSubject: boolean;
35
35
  }) => DiscountResult;
@@ -49,7 +49,7 @@ type ProductDetail = {
49
49
  original_price?: number | string;
50
50
  num?: number;
51
51
  quantity: number;
52
- holder_id?: number | string;
52
+ holder_id?: number | string | Array<number | string>;
53
53
  vouchersApplicable?: boolean;
54
54
  startDate?: any;
55
55
  };
@@ -16,3 +16,4 @@ export * from './Schedule';
16
16
  export * from './Quotation';
17
17
  export * from './ScanOrderLogger';
18
18
  export * from './OpenData';
19
+ export * from './Holder';
@@ -15,4 +15,5 @@ export * from "./SalesSummary";
15
15
  export * from "./Schedule";
16
16
  export * from "./Quotation";
17
17
  export * from "./ScanOrderLogger";
18
- export * from "./OpenData";
18
+ export * from "./OpenData";
19
+ export * from "./Holder";
@@ -1,4 +1,5 @@
1
1
  import { Plugin } from '../types';
2
+ import type { WalletPassEvaluator } from '../model/strategy/adapter/walletPass/evaluator';
2
3
  /**
3
4
  * WindowPlugin 接口定义
4
5
  */
@@ -14,6 +15,8 @@ export interface WindowPlugin extends Plugin {
14
15
  document: Partial<Document>;
15
16
  history: History;
16
17
  interaction?: any;
18
+ getWalletPassEvaluator?: () => WalletPassEvaluator | undefined;
19
+ getLocalStorage?: (key: string) => string | null;
17
20
  }
18
21
  /**
19
22
  * 简单的 Storage 接口实现
@@ -10,6 +10,7 @@ import { ITime } from '../../modules/Date/types';
10
10
  import dayjs from 'dayjs';
11
11
  import { LoadScheduleAvailableDateParams } from '../../modules/Schedule/types';
12
12
  import { IHolder, IFetchHolderAccountsParams } from '../../modules/AccountList/types';
13
+ import { IAppendFormRecordParams } from '../../modules/Holder/types';
13
14
  export declare class BookingByStepImpl extends BaseModule implements Module {
14
15
  protected defaultName: string;
15
16
  protected defaultVersion: string;
@@ -126,6 +127,20 @@ export declare class BookingByStepImpl extends BaseModule implements Module {
126
127
  * @param params
127
128
  */
128
129
  fetchHolderAccountsAsync(params: IFetchHolderAccountsParams): Promise<void>;
130
+ /**
131
+ * 获取 holder 表单 map
132
+ */
133
+ getHolderFormMap(): import("../../modules").HolderFormMap;
134
+ /**
135
+ * 登录后或外部触发时,按当前 holderMap 批量刷新所有表单的 records
136
+ */
137
+ refreshAllHolderFormRecords(params?: {
138
+ customer_id?: number;
139
+ }): Promise<import("../../modules").HolderFormMap>;
140
+ /**
141
+ * 添加表单记录
142
+ */
143
+ appendFormRecord(params: IAppendFormRecordParams): import("../../modules").IFormRecord;
129
144
  setDateRange(dateRange: ITime[]): Promise<void>;
130
145
  clearDateRange(): void;
131
146
  getDateRange(): Promise<ITime[]>;
@@ -310,7 +325,7 @@ export declare class BookingByStepImpl extends BaseModule implements Module {
310
325
  date: string;
311
326
  status: string;
312
327
  week: string;
313
- weekNum: 0 | 1 | 2 | 5 | 4 | 3 | 6;
328
+ weekNum: 0 | 2 | 1 | 5 | 3 | 4 | 6;
314
329
  }[]>;
315
330
  submitTimeSlot(timeSlots: TimeSliceItem): void;
316
331
  private getScheduleDataByIds;
@@ -329,7 +344,7 @@ export declare class BookingByStepImpl extends BaseModule implements Module {
329
344
  count: number;
330
345
  left: number;
331
346
  summaryCount: number;
332
- status: "sold_out" | "lots_of_space" | "filling_up_fast";
347
+ status: "lots_of_space" | "filling_up_fast" | "sold_out";
333
348
  }[];
334
349
  /**
335
350
  * 找到多个资源的公共可用时间段