@pisell/pisellos 2.2.316 → 2.2.317
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/modules/Order/index.d.ts +1 -1
- package/dist/modules/Order/index.js +713 -762
- package/dist/modules/Order/types.d.ts +2 -2
- package/dist/modules/Order/types.js +2 -2
- package/dist/solution/BookingByStep/index.d.ts +2 -2
- package/lib/modules/Order/index.d.ts +1 -1
- package/lib/modules/Order/index.js +2 -8
- package/lib/modules/Order/types.d.ts +2 -2
- package/lib/modules/Order/types.js +2 -2
- package/lib/solution/BookingByStep/index.d.ts +2 -2
- package/package.json +1 -1
|
@@ -71,8 +71,8 @@ export interface OrderGiftSelectResult {
|
|
|
71
71
|
/**
|
|
72
72
|
* 赠品解析回调签名(SDK → OS 的返回值)。
|
|
73
73
|
*
|
|
74
|
-
* -
|
|
75
|
-
* -
|
|
74
|
+
* - 唯一且无规格/套餐的候选:SDK 自动构造商品
|
|
75
|
+
* - 有规格/套餐或多个候选:SDK 弹窗等用户确认后构造
|
|
76
76
|
* - 用户取消:抛错或返回空数组(OS 视为放弃本次添加)
|
|
77
77
|
*
|
|
78
78
|
* 返回数组时沿用旧协议,只写 tempOrder.products;返回对象时可同时写入预约 bookings。
|
|
@@ -30,8 +30,8 @@ export var OrderHooks = /*#__PURE__*/function (OrderHooks) {
|
|
|
30
30
|
/**
|
|
31
31
|
* 赠品解析回调签名(SDK → OS 的返回值)。
|
|
32
32
|
*
|
|
33
|
-
* -
|
|
34
|
-
* -
|
|
33
|
+
* - 唯一且无规格/套餐的候选:SDK 自动构造商品
|
|
34
|
+
* - 有规格/套餐或多个候选:SDK 弹窗等用户确认后构造
|
|
35
35
|
* - 用户取消:抛错或返回空数组(OS 视为放弃本次添加)
|
|
36
36
|
*
|
|
37
37
|
* 返回数组时沿用旧协议,只写 tempOrder.products;返回对象时可同时写入预约 bookings。
|
|
@@ -328,7 +328,7 @@ export declare class BookingByStepImpl extends BaseModule implements Module {
|
|
|
328
328
|
date: string;
|
|
329
329
|
status: string;
|
|
330
330
|
week: string;
|
|
331
|
-
weekNum: 0 |
|
|
331
|
+
weekNum: 0 | 2 | 1 | 6 | 4 | 5 | 3;
|
|
332
332
|
}[]>;
|
|
333
333
|
submitTimeSlot(timeSlots: TimeSliceItem): void;
|
|
334
334
|
private getScheduleDataByIds;
|
|
@@ -347,7 +347,7 @@ export declare class BookingByStepImpl extends BaseModule implements Module {
|
|
|
347
347
|
count: number;
|
|
348
348
|
left: number;
|
|
349
349
|
summaryCount: number;
|
|
350
|
-
status: "
|
|
350
|
+
status: "lots_of_space" | "filling_up_fast" | "sold_out";
|
|
351
351
|
}[];
|
|
352
352
|
/**
|
|
353
353
|
* 找到多个资源的公共可用时间段
|
|
@@ -595,7 +595,7 @@ export declare class OrderModule extends BaseModule implements Module, OrderModu
|
|
|
595
595
|
generateIdempotencyToken(): string;
|
|
596
596
|
syncPaymentsToOrder<T = any>(params: SyncPaymentsToOrderParams): Promise<SyncPaymentsToOrderResult<T>>;
|
|
597
597
|
createOrder(params: CommitOrderParams['query']): {
|
|
598
|
-
type: "
|
|
598
|
+
type: "appointment_booking" | "virtual";
|
|
599
599
|
platform: string;
|
|
600
600
|
sales_channel: string;
|
|
601
601
|
order_sales_channel: string;
|
|
@@ -969,14 +969,8 @@ class OrderModule extends _BaseModule.BaseModule {
|
|
|
969
969
|
}
|
|
970
970
|
} else {
|
|
971
971
|
for (const addAction of result.giftActions.toAdd) {
|
|
972
|
-
//
|
|
973
|
-
|
|
974
|
-
const sameStrategy = result.products.find(p => p.metadata?._giftInfo?.strategyId === addAction.strategyId);
|
|
975
|
-
if (sameStrategy && !sameStrategy.booking_uid && !sameStrategy.metadata?.booking_uid) {
|
|
976
|
-
sameStrategy.num = (Number(sameStrategy.num) || 0) + (addAction.giftCount || 1);
|
|
977
|
-
continue;
|
|
978
|
-
}
|
|
979
|
-
}
|
|
972
|
+
// 唯一候选也可能有规格/套餐。每次补赠都交给 SDK 判断,不能复用旧赠品的选择。
|
|
973
|
+
|
|
980
974
|
const giftMutationBaseline = options?.isCurrentOrder ? (0, _lodashEs.cloneDeep)({
|
|
981
975
|
products: tempOrder.products,
|
|
982
976
|
bookings: tempOrder.bookings
|
|
@@ -71,8 +71,8 @@ export interface OrderGiftSelectResult {
|
|
|
71
71
|
/**
|
|
72
72
|
* 赠品解析回调签名(SDK → OS 的返回值)。
|
|
73
73
|
*
|
|
74
|
-
* -
|
|
75
|
-
* -
|
|
74
|
+
* - 唯一且无规格/套餐的候选:SDK 自动构造商品
|
|
75
|
+
* - 有规格/套餐或多个候选:SDK 弹窗等用户确认后构造
|
|
76
76
|
* - 用户取消:抛错或返回空数组(OS 视为放弃本次添加)
|
|
77
77
|
*
|
|
78
78
|
* 返回数组时沿用旧协议,只写 tempOrder.products;返回对象时可同时写入预约 bookings。
|
|
@@ -32,8 +32,8 @@ let OrderHooks = exports.OrderHooks = /*#__PURE__*/function (OrderHooks) {
|
|
|
32
32
|
/**
|
|
33
33
|
* 赠品解析回调签名(SDK → OS 的返回值)。
|
|
34
34
|
*
|
|
35
|
-
* -
|
|
36
|
-
* -
|
|
35
|
+
* - 唯一且无规格/套餐的候选:SDK 自动构造商品
|
|
36
|
+
* - 有规格/套餐或多个候选:SDK 弹窗等用户确认后构造
|
|
37
37
|
* - 用户取消:抛错或返回空数组(OS 视为放弃本次添加)
|
|
38
38
|
*
|
|
39
39
|
* 返回数组时沿用旧协议,只写 tempOrder.products;返回对象时可同时写入预约 bookings。
|
|
@@ -328,7 +328,7 @@ export declare class BookingByStepImpl extends BaseModule implements Module {
|
|
|
328
328
|
date: string;
|
|
329
329
|
status: string;
|
|
330
330
|
week: string;
|
|
331
|
-
weekNum: 0 |
|
|
331
|
+
weekNum: 0 | 2 | 1 | 6 | 4 | 5 | 3;
|
|
332
332
|
}[]>;
|
|
333
333
|
submitTimeSlot(timeSlots: TimeSliceItem): void;
|
|
334
334
|
private getScheduleDataByIds;
|
|
@@ -347,7 +347,7 @@ export declare class BookingByStepImpl extends BaseModule implements Module {
|
|
|
347
347
|
count: number;
|
|
348
348
|
left: number;
|
|
349
349
|
summaryCount: number;
|
|
350
|
-
status: "
|
|
350
|
+
status: "lots_of_space" | "filling_up_fast" | "sold_out";
|
|
351
351
|
}[];
|
|
352
352
|
/**
|
|
353
353
|
* 找到多个资源的公共可用时间段
|