@pisell/pisellos 2.3.49 → 2.3.51
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/Discount/index.d.ts +1 -0
- package/dist/modules/Discount/index.js +40 -11
- package/dist/modules/Discount/types.d.ts +1 -0
- package/dist/modules/Holder/index.d.ts +48 -0
- package/dist/modules/Holder/index.js +640 -0
- package/dist/modules/Holder/types.d.ts +123 -0
- package/dist/modules/Holder/types.js +1 -0
- package/dist/modules/Holder/utils.d.ts +13 -0
- package/dist/modules/Holder/utils.js +34 -0
- package/dist/modules/OpenData/index.js +2 -2
- package/dist/modules/Order/index.d.ts +4 -2
- package/dist/modules/Order/index.js +54 -25
- package/dist/modules/Order/types.d.ts +9 -0
- package/dist/modules/Order/utils.d.ts +10 -0
- package/dist/modules/Order/utils.js +35 -3
- package/dist/modules/Product/types.d.ts +1 -0
- package/dist/modules/ProductList/index.js +33 -14
- package/dist/modules/Quotation/index.d.ts +1 -1
- package/dist/modules/Quotation/index.js +2 -2
- package/dist/modules/ResourcePlanner/index.d.ts +24 -0
- package/dist/modules/ResourcePlanner/index.js +181 -0
- package/dist/modules/ResourcePlanner/planner.d.ts +14 -0
- package/dist/modules/ResourcePlanner/planner.js +1069 -0
- package/dist/modules/ResourcePlanner/types.d.ts +227 -0
- package/dist/modules/ResourcePlanner/types.js +1 -0
- package/dist/modules/Rules/index.js +47 -13
- package/dist/modules/SalesSummary/index.js +12 -13
- package/dist/modules/ScanOrderLogger/index.d.ts +2 -0
- package/dist/modules/ScanOrderLogger/index.js +15 -2
- package/dist/modules/ScanOrderLogger/providers/feishu.js +45 -27
- package/dist/modules/ScanOrderLogger/types.d.ts +1 -0
- package/dist/modules/Schedule/index.d.ts +3 -1
- package/dist/modules/Schedule/index.js +21 -16
- package/dist/modules/Summary/utils.js +38 -13
- package/dist/modules/index.d.ts +2 -0
- package/dist/modules/index.js +3 -1
- package/dist/plugins/window.d.ts +1 -0
- package/dist/server/index.d.ts +14 -0
- package/dist/server/index.js +907 -793
- package/dist/solution/BaseSales/index.d.ts +7 -0
- package/dist/solution/BaseSales/index.js +64 -42
- package/dist/solution/BookingByStep/index.d.ts +17 -2
- package/dist/solution/BookingByStep/index.js +294 -215
- package/dist/solution/BookingByStep/types.d.ts +2 -1
- package/dist/solution/BookingByStep/types.js +3 -1
- package/dist/solution/BookingByStep/utils/capacity.js +17 -1
- package/dist/solution/BookingByStep/utils/timeslots.d.ts +3 -1
- package/dist/solution/BookingByStep/utils/timeslots.js +19 -12
- package/dist/solution/BookingTicket/index.js +2 -2
- package/dist/solution/BookingTicket/utils/scan/handleScan.d.ts +3 -1
- package/dist/solution/BookingTicket/utils/scan/handleScan.js +10 -2
- package/dist/solution/ScanOrder/index.d.ts +26 -14
- package/dist/solution/ScanOrder/index.js +1142 -739
- package/dist/solution/ScanOrder/types.d.ts +21 -1
- package/dist/solution/ScanOrder/utils.d.ts +8 -0
- package/dist/solution/ScanOrder/utils.js +66 -25
- package/dist/solution/ShopDiscount/index.d.ts +1 -0
- package/dist/solution/ShopDiscount/index.js +125 -87
- package/dist/solution/UnifiedBookingSales/index.d.ts +183 -0
- package/dist/solution/UnifiedBookingSales/index.js +1891 -0
- package/dist/solution/UnifiedBookingSales/types.d.ts +143 -0
- package/dist/solution/UnifiedBookingSales/types.js +11 -0
- package/dist/solution/VenueBooking/index.d.ts +39 -11
- package/dist/solution/VenueBooking/index.js +1167 -841
- package/dist/solution/VenueBooking/types.d.ts +3 -0
- package/dist/solution/VenueBooking/utils/resource.js +1 -0
- package/dist/solution/VenueBooking/utils/slotMerge.d.ts +4 -4
- package/dist/solution/VenueBooking/utils/slotMerge.js +10 -5
- package/dist/solution/index.d.ts +1 -0
- package/dist/solution/index.js +2 -1
- package/dist/types/index.d.ts +1 -0
- package/lib/model/strategy/adapter/promotion/index.js +51 -0
- package/lib/modules/Discount/index.d.ts +1 -0
- package/lib/modules/Discount/index.js +9 -0
- package/lib/modules/Discount/types.d.ts +1 -0
- package/lib/modules/Holder/index.d.ts +48 -0
- package/lib/modules/Holder/index.js +402 -0
- package/lib/modules/Holder/types.d.ts +123 -0
- package/lib/modules/Holder/types.js +17 -0
- package/lib/modules/Holder/utils.d.ts +13 -0
- package/lib/modules/Holder/utils.js +71 -0
- package/lib/modules/OpenData/index.js +1 -1
- package/lib/modules/Order/index.d.ts +4 -2
- package/lib/modules/Order/index.js +26 -10
- package/lib/modules/Order/types.d.ts +9 -0
- package/lib/modules/Order/utils.d.ts +10 -0
- package/lib/modules/Order/utils.js +36 -5
- package/lib/modules/Product/types.d.ts +1 -0
- package/lib/modules/ProductList/index.js +40 -31
- package/lib/modules/Quotation/index.d.ts +1 -1
- package/lib/modules/Quotation/index.js +2 -2
- package/lib/modules/ResourcePlanner/index.d.ts +24 -0
- package/lib/modules/ResourcePlanner/index.js +148 -0
- package/lib/modules/ResourcePlanner/planner.d.ts +14 -0
- package/lib/modules/ResourcePlanner/planner.js +933 -0
- package/lib/modules/ResourcePlanner/types.d.ts +227 -0
- package/lib/modules/ResourcePlanner/types.js +17 -0
- package/lib/modules/Rules/index.js +33 -16
- package/lib/modules/SalesSummary/index.js +6 -7
- package/lib/modules/ScanOrderLogger/index.d.ts +2 -0
- package/lib/modules/ScanOrderLogger/index.js +13 -1
- package/lib/modules/ScanOrderLogger/providers/feishu.js +15 -6
- package/lib/modules/ScanOrderLogger/types.d.ts +1 -0
- package/lib/modules/Schedule/index.d.ts +3 -1
- package/lib/modules/Schedule/index.js +10 -8
- package/lib/modules/Summary/utils.js +21 -1
- package/lib/modules/index.d.ts +2 -0
- package/lib/modules/index.js +5 -1
- package/lib/plugins/window.d.ts +1 -0
- package/lib/server/index.d.ts +14 -0
- package/lib/server/index.js +72 -15
- package/lib/solution/BaseSales/index.d.ts +7 -0
- package/lib/solution/BaseSales/index.js +24 -8
- package/lib/solution/BookingByStep/index.d.ts +17 -2
- package/lib/solution/BookingByStep/index.js +60 -18
- package/lib/solution/BookingByStep/types.d.ts +2 -1
- package/lib/solution/BookingByStep/types.js +5 -0
- package/lib/solution/BookingByStep/utils/capacity.js +20 -1
- package/lib/solution/BookingByStep/utils/timeslots.d.ts +3 -1
- package/lib/solution/BookingByStep/utils/timeslots.js +19 -11
- package/lib/solution/BookingTicket/index.js +10 -2
- package/lib/solution/BookingTicket/utils/scan/handleScan.d.ts +3 -1
- package/lib/solution/BookingTicket/utils/scan/handleScan.js +2 -2
- package/lib/solution/ScanOrder/index.d.ts +26 -14
- package/lib/solution/ScanOrder/index.js +449 -182
- package/lib/solution/ScanOrder/types.d.ts +21 -1
- package/lib/solution/ScanOrder/utils.d.ts +8 -0
- package/lib/solution/ScanOrder/utils.js +31 -0
- package/lib/solution/ShopDiscount/index.d.ts +1 -0
- package/lib/solution/ShopDiscount/index.js +14 -0
- package/lib/solution/UnifiedBookingSales/index.d.ts +183 -0
- package/lib/solution/UnifiedBookingSales/index.js +1084 -0
- package/lib/solution/UnifiedBookingSales/types.d.ts +143 -0
- package/lib/solution/UnifiedBookingSales/types.js +33 -0
- package/lib/solution/VenueBooking/index.d.ts +39 -11
- package/lib/solution/VenueBooking/index.js +322 -110
- package/lib/solution/VenueBooking/types.d.ts +3 -0
- package/lib/solution/VenueBooking/utils/resource.js +1 -0
- package/lib/solution/VenueBooking/utils/slotMerge.d.ts +4 -4
- package/lib/solution/VenueBooking/utils/slotMerge.js +6 -4
- package/lib/solution/index.d.ts +1 -0
- package/lib/solution/index.js +3 -1
- package/lib/types/index.d.ts +1 -0
- package/package.json +1 -1
|
@@ -12,10 +12,6 @@ export declare function buildPriceBreakdown(params: {
|
|
|
12
12
|
}) => number;
|
|
13
13
|
};
|
|
14
14
|
}): PriceBreakdownEntry[];
|
|
15
|
-
export declare function buildVenueResourceMetadata(params: {
|
|
16
|
-
mapping: ResourceProductMapping;
|
|
17
|
-
rawResource: VenueResourceRawData | undefined;
|
|
18
|
-
}): Record<string, any>;
|
|
19
15
|
export interface BuildVenueBookingParams {
|
|
20
16
|
group: MergedSlotGroup;
|
|
21
17
|
resourceId: number | string;
|
|
@@ -29,6 +25,10 @@ export interface BuildVenueBookingParams {
|
|
|
29
25
|
*/
|
|
30
26
|
childResources?: VenueResourceRawData[];
|
|
31
27
|
}
|
|
28
|
+
export declare function buildVenueResourceMetadata(params: {
|
|
29
|
+
mapping: ResourceProductMapping;
|
|
30
|
+
rawResource: VenueResourceRawData | undefined;
|
|
31
|
+
}): Record<string, any>;
|
|
32
32
|
export declare function buildVenueBookingEntry(params: BuildVenueBookingParams): Record<string, any>;
|
|
33
33
|
/**
|
|
34
34
|
* 从一条已合并的订单商品还原出独立的时段列表。
|
|
@@ -109,10 +109,12 @@ function buildPriceBreakdown(params) {
|
|
|
109
109
|
}
|
|
110
110
|
function buildVenueResourceMetadata(params) {
|
|
111
111
|
const { mapping, rawResource } = params;
|
|
112
|
+
const combined = rawResource == null ? void 0 : rawResource.combined_resource;
|
|
113
|
+
const isCombined = !!(combined && combined.status === 1 && Array.isArray(combined.resource_ids));
|
|
112
114
|
return {
|
|
113
|
-
form_name:
|
|
114
|
-
resource_name: (rawResource == null ? void 0 : rawResource.main_field) ?? mapping.resourceName
|
|
115
|
-
combined_resource:
|
|
115
|
+
form_name: mapping.formName ?? mapping.resourceName,
|
|
116
|
+
resource_name: (rawResource == null ? void 0 : rawResource.main_field) ?? mapping.resourceName,
|
|
117
|
+
combined_resource: isCombined ? combined : null
|
|
116
118
|
};
|
|
117
119
|
}
|
|
118
120
|
function buildVenueBookingEntry(params) {
|
|
@@ -128,7 +130,7 @@ function buildVenueBookingEntry(params) {
|
|
|
128
130
|
form_id: (rawResource == null ? void 0 : rawResource.form_id) ?? mapping.formId,
|
|
129
131
|
relation_id: resourceId,
|
|
130
132
|
capacity: 1,
|
|
131
|
-
metadata: {}
|
|
133
|
+
metadata: buildVenueResourceMetadata({ mapping, rawResource })
|
|
132
134
|
};
|
|
133
135
|
if (childResources && childResources.length) {
|
|
134
136
|
resourceEntry.children = childResources.map((child) => ({
|
package/lib/solution/index.d.ts
CHANGED
package/lib/solution/index.js
CHANGED
|
@@ -26,6 +26,7 @@ __reExport(solution_exports, require("./Sales"), module.exports);
|
|
|
26
26
|
__reExport(solution_exports, require("./ScanOrder"), module.exports);
|
|
27
27
|
__reExport(solution_exports, require("./BaseSales"), module.exports);
|
|
28
28
|
__reExport(solution_exports, require("./VenueBooking"), module.exports);
|
|
29
|
+
__reExport(solution_exports, require("./UnifiedBookingSales"), module.exports);
|
|
29
30
|
// Annotate the CommonJS export names for ESM import in node:
|
|
30
31
|
0 && (module.exports = {
|
|
31
32
|
...require("./BuyTickets"),
|
|
@@ -37,5 +38,6 @@ __reExport(solution_exports, require("./VenueBooking"), module.exports);
|
|
|
37
38
|
...require("./Sales"),
|
|
38
39
|
...require("./ScanOrder"),
|
|
39
40
|
...require("./BaseSales"),
|
|
40
|
-
...require("./VenueBooking")
|
|
41
|
+
...require("./VenueBooking"),
|
|
42
|
+
...require("./UnifiedBookingSales")
|
|
41
43
|
});
|
package/lib/types/index.d.ts
CHANGED