washday-sdk 1.6.84 → 1.6.85

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,6 +1,6 @@
1
1
  {
2
2
  "name": "washday-sdk",
3
- "version": "1.6.84",
3
+ "version": "1.6.85",
4
4
  "description": "Washday utilities functions and API",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",
@@ -8,6 +8,20 @@ import {
8
8
 
9
9
  const folioPreset: TicketVisualPreset = "large";
10
10
  const spacingPreset: TicketVisualPreset = "medium";
11
+ type AssertNever<T extends never> = T;
12
+ type ForbiddenOutsourcedTicketKeys =
13
+ | "showEmisionDate"
14
+ | "showEmisionTime"
15
+ | "customerNameFontSize"
16
+ | "printQuantity"
17
+ | "orderFolioFontSizePx"
18
+ | "ticketLineMarginBlockPx"
19
+ | "groupProductsBySection"
20
+ | "showOutsourcedExternalOrderId"
21
+ | "showPartnerNotes";
22
+ type _OutsourcedTicketDoesNotExposeForbiddenKeys = AssertNever<
23
+ Extract<keyof IOutsourcedOrderTicketStructure, ForbiddenOutsourcedTicketKeys>
24
+ >;
11
25
 
12
26
  const ticketStructure: ITicketStructure = {
13
27
  showTotalPieces: false,
@@ -68,15 +82,12 @@ const ticketForLaundryStructure: ITicketForLaundryStructure = {
68
82
 
69
83
  const outsourcedOrderTicketStructure: IOutsourcedOrderTicketStructure = {
70
84
  showTotalPieces: false,
71
- showEmisionDate: true,
72
- showEmisionTime: true,
73
85
  showLegend: true,
74
86
  showStorePhone: true,
75
87
  ticketLegendText: "Sin información de precios",
76
88
  printLogoOnTicket: false,
77
89
  showStoreName: true,
78
90
  showOrderNotes: false,
79
- customerNameFontSize: "medium",
80
91
  orderFolioFontSizePreset: "large",
81
92
  ticketLineSpacingPreset: "medium",
82
93
  showPartnerPhone: true,
@@ -114,6 +125,8 @@ for (const field of [
114
125
  "showCustomerName",
115
126
  "showCustomerPhone",
116
127
  "showCreatedByName",
128
+ "showEmisionDate",
129
+ "showEmisionTime",
117
130
  "showDeliveryDate",
118
131
  "showDeliveryTime",
119
132
  "showPickupInfo",
@@ -121,6 +134,13 @@ for (const field of [
121
134
  "showIssuerTaxInfo",
122
135
  "tax_id",
123
136
  "tax_id_label",
137
+ "customerNameFontSize",
138
+ "printQuantity",
139
+ "orderFolioFontSizePx",
140
+ "ticketLineMarginBlockPx",
141
+ "groupProductsBySection",
142
+ "showOutsourcedExternalOrderId",
143
+ "showPartnerNotes",
124
144
  ]) {
125
145
  if (field in outsourcedOrderTicketStructure) {
126
146
  throw new Error(`Outsourced order ticket structure must not expose ${field}`);
@@ -335,15 +335,12 @@ export interface ILabelTicketStructure extends ITicketStructure {}
335
335
 
336
336
  export interface IOutsourcedOrderTicketStructure {
337
337
  showTotalPieces: Boolean,
338
- showEmisionDate: Boolean,
339
- showEmisionTime: Boolean,
340
338
  showLegend: Boolean,
341
339
  showStorePhone: Boolean,
342
340
  ticketLegendText: String,
343
341
  printLogoOnTicket: Boolean,
344
342
  showStoreName: Boolean,
345
343
  showOrderNotes: Boolean,
346
- customerNameFontSize?: TicketVisualPreset,
347
344
  orderFolioFontSizePreset?: TicketVisualPreset,
348
345
  ticketLineSpacingPreset?: TicketVisualPreset,
349
346
  showPartnerPhone?: Boolean,
@@ -351,8 +348,6 @@ export interface IOutsourcedOrderTicketStructure {
351
348
  showOutsourcedStatus?: Boolean,
352
349
  showOutsourcedSentDate?: Boolean,
353
350
  showOutsourcedReceivedDate?: Boolean,
354
- showOutsourcedExternalOrderId?: Boolean,
355
- showPartnerNotes?: Boolean,
356
351
  }
357
352
 
358
353
  export interface ITicketForLaundryStructure {