@pisell/pisellos 0.0.497 → 0.0.499

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.
@@ -18,6 +18,7 @@ export declare class OpenDataModule extends BaseModule implements Module {
18
18
  initialize(core: PisellCore, options: ModuleOptions): Promise<void>;
19
19
  fetchOpenData(params: OpenDataFetchParams): Promise<OpenDataConfig>;
20
20
  getOpenData(): OpenDataConfig | null;
21
+ getLastFetchedAt(): number | null;
21
22
  checkAvailability(scheduleModule?: ScheduleModule): OpenDataAvailabilityResult;
22
23
  storeChange(): void;
23
24
  }
@@ -140,6 +140,12 @@ export var OpenDataModule = /*#__PURE__*/function (_BaseModule) {
140
140
  value: function getOpenData() {
141
141
  return this.store.data;
142
142
  }
143
+ }, {
144
+ key: "getLastFetchedAt",
145
+ value: function getLastFetchedAt() {
146
+ var _this$store$lastFetch;
147
+ return (_this$store$lastFetch = this.store.lastFetchedAt) !== null && _this$store$lastFetch !== void 0 ? _this$store$lastFetch : null;
148
+ }
143
149
  }, {
144
150
  key: "checkAvailability",
145
151
  value: function checkAvailability(scheduleModule) {
@@ -311,7 +311,7 @@ export declare class BookingByStepImpl extends BaseModule implements Module {
311
311
  date: string;
312
312
  status: string;
313
313
  week: string;
314
- weekNum: 0 | 1 | 4 | 2 | 3 | 6 | 5;
314
+ weekNum: 0 | 1 | 2 | 3 | 4 | 5 | 6;
315
315
  }[]>;
316
316
  submitTimeSlot(timeSlots: TimeSliceItem): void;
317
317
  private getScheduleDataByIds;
@@ -330,7 +330,7 @@ export declare class BookingByStepImpl extends BaseModule implements Module {
330
330
  count: number;
331
331
  left: number;
332
332
  summaryCount: number;
333
- status: "sold_out" | "lots_of_space" | "filling_up_fast";
333
+ status: "lots_of_space" | "filling_up_fast" | "sold_out";
334
334
  }[];
335
335
  /**
336
336
  * 找到多个资源的公共可用时间段
@@ -34,6 +34,10 @@ export declare class VenueBookingImpl extends BaseModule implements Module {
34
34
  private loginEffectDisposers;
35
35
  private customerLoginRefreshInFlight;
36
36
  private customerLoginRefreshIdInFlight;
37
+ private loadAllProductsInFlight;
38
+ private productsLoaded;
39
+ private loadOpenDataConfigInFlight;
40
+ private static readonly OPEN_DATA_CACHE_TTL;
37
41
  private getLoggerContext;
38
42
  private serializeError;
39
43
  private addVenueBookingLog;
@@ -64,6 +68,7 @@ export declare class VenueBookingImpl extends BaseModule implements Module {
64
68
  venueProducts: ProductData[];
65
69
  addonProducts: ProductData[];
66
70
  }>;
71
+ private _doLoadAllProducts;
67
72
  loadVenueProducts(): Promise<ProductData[]>;
68
73
  loadAddonProducts(): Promise<ProductData[]>;
69
74
  getVenueProducts(): ProductData[];