@pisell/pisellos 2.2.199 → 2.2.200

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.
@@ -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 | 2 | 3 | 5 | 4 | 6;
314
+ weekNum: 0 | 2 | 1 | 6 | 3 | 4 | 5;
315
315
  }[]>;
316
316
  submitTimeSlot(timeSlots: TimeSliceItem): void;
317
317
  private getScheduleDataByIds;
@@ -12,6 +12,8 @@ import { AddProductDecideContext, AddProductRequiresDetailPayload } from './util
12
12
  import { type BuildCacheItemFromOrderLineInput } from '../../modules/BookingContext/utils/buildCacheItemFromOrderLine';
13
13
  import { type BuildNormalProductCacheItemFromOrderLineInput } from '../../modules/BookingContext/utils/buildNormalProductCacheItemFromOrderLine';
14
14
  import type { AddProductBookingInput, OrderProduct, OrderProductIdentity, UpdateOrderProductParams } from '../../modules/Order/types';
15
+ import { type TransitionChildBookingParams } from './utils/bookingStatus';
16
+ export type { BookingTransitionAction, TransitionChildBookingParams, } from './utils/bookingStatus';
15
17
  export declare class BookingTicketImpl extends BaseSalesImpl implements Module {
16
18
  protected defaultName: string;
17
19
  protected defaultVersion: string;
@@ -68,6 +70,27 @@ export declare class BookingTicketImpl extends BaseSalesImpl implements Module {
68
70
  * @returns 接口返回的 data
69
71
  */
70
72
  setBookingStatus(status: string): Promise<any>;
73
+ /**
74
+ * 子预约状态机转移(POST /schedule/booking-transition/{schedule_event_id})。
75
+ *
76
+ * 与 `setBookingStatus`(父预约 PUT appointment-status)不同,本方法按子预约
77
+ * `schedule_event_id` 调用状态转移接口,body 为 `{ action }`。
78
+ *
79
+ * 流程:能解析出目标状态时先乐观更新对应子预约的 `appointment_status`,
80
+ * 再调 POST;成功后强制刷新销售详情;失败则回滚该子预约本地状态并抛错。
81
+ * `reschedule` 暂未启用状态矩阵,跳过乐观更新仅调接口。
82
+ *
83
+ * @param params.schedule_event_id 子预约 schedule_event_id
84
+ * @param params.action 转移动作:confirm | reject | arrive | start | complete | cancel | no_show | reschedule
85
+ * @returns 接口返回的 data
86
+ *
87
+ * @example
88
+ * await bookingTicket.transitionChildBooking({
89
+ * schedule_event_id: 301,
90
+ * action: 'confirm',
91
+ * });
92
+ */
93
+ transitionChildBooking(params: TransitionChildBookingParams): Promise<any>;
71
94
  /**
72
95
  * 基于当前 tempOrder.order_id 强制从远端重新拉取销售详情。
73
96
  *