washday-sdk 1.6.83 → 1.6.84
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/package.json
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ILabelTicketStructure,
|
|
3
|
+
IOutsourcedOrderTicketStructure,
|
|
3
4
|
ITicketForLaundryStructure,
|
|
4
5
|
ITicketStructure,
|
|
5
6
|
TicketVisualPreset,
|
|
@@ -65,6 +66,22 @@ const ticketForLaundryStructure: ITicketForLaundryStructure = {
|
|
|
65
66
|
tax_id_label: "RFC",
|
|
66
67
|
};
|
|
67
68
|
|
|
69
|
+
const outsourcedOrderTicketStructure: IOutsourcedOrderTicketStructure = {
|
|
70
|
+
showTotalPieces: false,
|
|
71
|
+
showEmisionDate: true,
|
|
72
|
+
showEmisionTime: true,
|
|
73
|
+
showLegend: true,
|
|
74
|
+
showStorePhone: true,
|
|
75
|
+
ticketLegendText: "Sin información de precios",
|
|
76
|
+
printLogoOnTicket: false,
|
|
77
|
+
showStoreName: true,
|
|
78
|
+
showOrderNotes: false,
|
|
79
|
+
customerNameFontSize: "medium",
|
|
80
|
+
orderFolioFontSizePreset: "large",
|
|
81
|
+
ticketLineSpacingPreset: "medium",
|
|
82
|
+
showPartnerPhone: true,
|
|
83
|
+
};
|
|
84
|
+
|
|
68
85
|
if (ticketStructure.orderFolioFontSizePreset !== "large") {
|
|
69
86
|
throw new Error("Ticket structure folio preset was not preserved");
|
|
70
87
|
}
|
|
@@ -88,3 +105,24 @@ if (labelTicketStructure.tax_id !== "J-507138330") {
|
|
|
88
105
|
if (ticketForLaundryStructure.tax_id_label !== "RFC") {
|
|
89
106
|
throw new Error("Laundry ticket structure tax ID label was not preserved");
|
|
90
107
|
}
|
|
108
|
+
|
|
109
|
+
if ("ticketPrintFormat" in outsourcedOrderTicketStructure) {
|
|
110
|
+
throw new Error("Outsourced order ticket structure must not expose print format");
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
for (const field of [
|
|
114
|
+
"showCustomerName",
|
|
115
|
+
"showCustomerPhone",
|
|
116
|
+
"showCreatedByName",
|
|
117
|
+
"showDeliveryDate",
|
|
118
|
+
"showDeliveryTime",
|
|
119
|
+
"showPickupInfo",
|
|
120
|
+
"showServiceType",
|
|
121
|
+
"showIssuerTaxInfo",
|
|
122
|
+
"tax_id",
|
|
123
|
+
"tax_id_label",
|
|
124
|
+
]) {
|
|
125
|
+
if (field in outsourcedOrderTicketStructure) {
|
|
126
|
+
throw new Error(`Outsourced order ticket structure must not expose ${field}`);
|
|
127
|
+
}
|
|
128
|
+
}
|
package/src/interfaces/Store.ts
CHANGED
|
@@ -93,6 +93,7 @@ export interface IStore {
|
|
|
93
93
|
cashierBoxes?: ICashierBox,
|
|
94
94
|
ticketStructure?: ITicketStructure | null,
|
|
95
95
|
ticketForLaundryStructure?: ITicketForLaundryStructure | null,
|
|
96
|
+
outsourcedOrderTicketStructure?: IOutsourcedOrderTicketStructure | null,
|
|
96
97
|
labelTicketStructure?: ILabelTicketStructure | null,
|
|
97
98
|
publicReceiptConfig?: IPublicReceiptConfig,
|
|
98
99
|
storeReceptionValidationConfig?: IStoreReceptionValidationConfig,
|
|
@@ -331,6 +332,29 @@ export interface ITicketStructure {
|
|
|
331
332
|
}
|
|
332
333
|
|
|
333
334
|
export interface ILabelTicketStructure extends ITicketStructure {}
|
|
335
|
+
|
|
336
|
+
export interface IOutsourcedOrderTicketStructure {
|
|
337
|
+
showTotalPieces: Boolean,
|
|
338
|
+
showEmisionDate: Boolean,
|
|
339
|
+
showEmisionTime: Boolean,
|
|
340
|
+
showLegend: Boolean,
|
|
341
|
+
showStorePhone: Boolean,
|
|
342
|
+
ticketLegendText: String,
|
|
343
|
+
printLogoOnTicket: Boolean,
|
|
344
|
+
showStoreName: Boolean,
|
|
345
|
+
showOrderNotes: Boolean,
|
|
346
|
+
customerNameFontSize?: TicketVisualPreset,
|
|
347
|
+
orderFolioFontSizePreset?: TicketVisualPreset,
|
|
348
|
+
ticketLineSpacingPreset?: TicketVisualPreset,
|
|
349
|
+
showPartnerPhone?: Boolean,
|
|
350
|
+
showOutsourcedOrderFolio?: Boolean,
|
|
351
|
+
showOutsourcedStatus?: Boolean,
|
|
352
|
+
showOutsourcedSentDate?: Boolean,
|
|
353
|
+
showOutsourcedReceivedDate?: Boolean,
|
|
354
|
+
showOutsourcedExternalOrderId?: Boolean,
|
|
355
|
+
showPartnerNotes?: Boolean,
|
|
356
|
+
}
|
|
357
|
+
|
|
334
358
|
export interface ITicketForLaundryStructure {
|
|
335
359
|
showTotalPieces: Boolean,
|
|
336
360
|
showEmisionDate: Boolean,
|