@pisell/pisellos 2.3.109 → 2.3.111
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/OpenData/index.d.ts +1 -1
- package/dist/modules/OpenData/index.js +19 -11
- package/dist/modules/Order/index.d.ts +1 -0
- package/dist/modules/Order/index.js +22 -21
- package/dist/modules/Payment/cashRecommendationAlgorithm.d.ts +4 -5
- package/dist/modules/Payment/cashRecommendationAlgorithm.js +17 -367
- package/dist/server/index.js +4 -5
- package/dist/server/utils/small-ticket.d.ts +8 -5
- package/dist/server/utils/small-ticket.js +678 -140
- package/dist/solution/BookingByStep/index.d.ts +1 -1
- package/dist/solution/BookingTicket/index.d.ts +6 -0
- package/dist/solution/BookingTicket/index.js +548 -485
- package/dist/utils/os-private-payload.d.ts +5 -0
- package/dist/utils/os-private-payload.js +17 -0
- package/lib/model/strategy/adapter/promotion/index.js +1 -46
- package/lib/modules/OpenData/index.d.ts +1 -1
- package/lib/modules/OpenData/index.js +9 -1
- package/lib/modules/Order/index.d.ts +1 -0
- package/lib/modules/Order/index.js +15 -18
- package/lib/modules/Payment/cashRecommendationAlgorithm.d.ts +4 -5
- package/lib/modules/Payment/cashRecommendationAlgorithm.js +9 -354
- package/lib/server/index.js +4 -5
- package/lib/server/utils/small-ticket.d.ts +8 -5
- package/lib/server/utils/small-ticket.js +524 -65
- package/lib/solution/BookingByStep/index.d.ts +1 -1
- package/lib/solution/BookingTicket/index.d.ts +6 -0
- package/lib/solution/BookingTicket/index.js +32 -3
- package/lib/utils/os-private-payload.d.ts +5 -0
- package/lib/utils/os-private-payload.js +22 -0
- package/package.json +1 -1
package/dist/server/index.js
CHANGED
|
@@ -45,6 +45,7 @@ import { BaseSalesImpl } from "../solution/BaseSales";
|
|
|
45
45
|
import { getOrderPaymentIdentityKeys, isIdentifiedPendingOrderPayment, isPendingOrderPayment, mergeOrderPaymentListsByIdentity } from "../modules/Order/payment-utils";
|
|
46
46
|
import { finalizeSalesNotesForCheckout } from "../modules/Order/salesNotes";
|
|
47
47
|
import { normalizeOrderCollections } from "../modules/Order/utils/orderCollectionIdentity";
|
|
48
|
+
import { stripOsPrivatePayloadFields } from "../utils/os-private-payload";
|
|
48
49
|
import { getDefaultInvoiceLayoutConfig, getDefaultInvoiceTemplateSettings, normalizeRawInvoiceTemplateSettings, resolveInvoiceReceiptLocales } from "../modules/OpenData";
|
|
49
50
|
var OS_FULFILLMENT_REF_MODE_FIELD = '_os_fulfillment_ref_mode';
|
|
50
51
|
var OS_INVOICE_LAYOUT_CONFIG_FIELD = '_os_invoice_layout_config';
|
|
@@ -2574,7 +2575,7 @@ var Server = /*#__PURE__*/function () {
|
|
|
2574
2575
|
return this.ensureCheckoutOrderNumbers(normalizedData, title);
|
|
2575
2576
|
case 6:
|
|
2576
2577
|
numberedData = _context32.sent;
|
|
2577
|
-
checkoutData = this.normalizeCheckoutCollections(this.applyCheckoutFulfillmentBuzzer(numberedData, title));
|
|
2578
|
+
checkoutData = this.normalizeCheckoutCollections(stripOsPrivatePayloadFields(this.applyCheckoutFulfillmentBuzzer(numberedData, title)));
|
|
2578
2579
|
remoteCheckoutData = this.buildRemoteCheckoutData(checkoutData, title);
|
|
2579
2580
|
_context32.next = 11;
|
|
2580
2581
|
return this.buildCheckoutDeviceHeaders(title);
|
|
@@ -2676,11 +2677,9 @@ var Server = /*#__PURE__*/function () {
|
|
|
2676
2677
|
}, {
|
|
2677
2678
|
key: "buildRemoteCheckoutData",
|
|
2678
2679
|
value: function buildRemoteCheckoutData(data, title) {
|
|
2679
|
-
var next =
|
|
2680
|
+
var next = stripOsPrivatePayloadFields(this.omitCheckoutSyncMode(data));
|
|
2680
2681
|
if (!next || _typeof(next) !== 'object') return next;
|
|
2681
2682
|
var record = next;
|
|
2682
|
-
delete record[OS_FULFILLMENT_REF_MODE_FIELD];
|
|
2683
|
-
delete record[OS_INVOICE_LAYOUT_CONFIG_FIELD];
|
|
2684
2683
|
this.applyKioskCheckoutOperator(record);
|
|
2685
2684
|
if (!Array.isArray(record.payments)) return next;
|
|
2686
2685
|
var originalPayments = record.payments;
|
|
@@ -6414,7 +6413,7 @@ var Server = /*#__PURE__*/function () {
|
|
|
6414
6413
|
return this.ensureCheckoutOrderNumbers(normalizedData, title);
|
|
6415
6414
|
case 14:
|
|
6416
6415
|
numberedData = _context62.sent;
|
|
6417
|
-
checkoutData = this.normalizeCheckoutCollections(this.applyCheckoutFulfillmentBuzzer(numberedData, title));
|
|
6416
|
+
checkoutData = this.normalizeCheckoutCollections(stripOsPrivatePayloadFields(this.applyCheckoutFulfillmentBuzzer(numberedData, title)));
|
|
6418
6417
|
_context62.next = 18;
|
|
6419
6418
|
return this.handlePendingSyncCheckoutOrder({
|
|
6420
6419
|
backendPath: backendPath,
|
|
@@ -28,32 +28,35 @@ export interface SmallTicketItem {
|
|
|
28
28
|
value: string;
|
|
29
29
|
size?: number;
|
|
30
30
|
align?: string;
|
|
31
|
+
product_uid?: string | number;
|
|
32
|
+
booking_uid?: string | number;
|
|
31
33
|
}
|
|
32
34
|
export interface SmallTicketProduct {
|
|
33
35
|
product_title: string;
|
|
34
36
|
product_quantity: number;
|
|
35
37
|
selling_price: string;
|
|
38
|
+
total_selling_price: string;
|
|
36
39
|
original_price: string;
|
|
37
40
|
base_price?: string;
|
|
38
41
|
total_original_price: string;
|
|
42
|
+
options_total_price?: string;
|
|
43
|
+
package_items_total_price?: string;
|
|
39
44
|
extension_list: any[];
|
|
40
45
|
product_uid?: string | number;
|
|
41
46
|
booking_uid?: string | number;
|
|
42
47
|
product_note?: string;
|
|
48
|
+
allergy?: string;
|
|
43
49
|
options?: Array<{
|
|
44
50
|
name: string;
|
|
45
51
|
num?: number;
|
|
46
52
|
price?: string;
|
|
53
|
+
total_price: string;
|
|
47
54
|
value?: string;
|
|
48
55
|
}>;
|
|
49
56
|
variant?: string;
|
|
50
57
|
combinations?: any[];
|
|
51
58
|
}
|
|
52
|
-
export
|
|
53
|
-
product_uid?: string | number;
|
|
54
|
-
booking_uid?: string | number;
|
|
55
|
-
}
|
|
56
|
-
export type SmallTicketAppointment = SmallTicketItem[] | SmallTicketBookingSnapshot[];
|
|
59
|
+
export type SmallTicketAppointment = SmallTicketItem[];
|
|
57
60
|
export interface SmallTicketLocaleData {
|
|
58
61
|
base_data: Record<string, any>;
|
|
59
62
|
products: SmallTicketProduct[];
|