@artisan-commerce/types 0.14.0-canary.6 → 0.14.0-canary.62

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.
Files changed (87) hide show
  1. package/dist/bundle.d.ts +3811 -0
  2. package/package.json +24 -28
  3. package/CHANGELOG.md +0 -356
  4. package/build/index.d.ts +0 -26
  5. package/build/index.js +0 -40
  6. package/build/index.js.map +0 -1
  7. package/build/types/account.types.d.ts +0 -17
  8. package/build/types/account.types.js +0 -4
  9. package/build/types/account.types.js.map +0 -1
  10. package/build/types/app.types.d.ts +0 -153
  11. package/build/types/app.types.js +0 -4
  12. package/build/types/app.types.js.map +0 -1
  13. package/build/types/artisnDB.types.d.ts +0 -29
  14. package/build/types/artisnDB.types.js +0 -4
  15. package/build/types/artisnDB.types.js.map +0 -1
  16. package/build/types/banner.types.d.ts +0 -97
  17. package/build/types/banner.types.js +0 -4
  18. package/build/types/banner.types.js.map +0 -1
  19. package/build/types/billingData.types.d.ts +0 -39
  20. package/build/types/billingData.types.js +0 -4
  21. package/build/types/billingData.types.js.map +0 -1
  22. package/build/types/catalogue.types.d.ts +0 -16
  23. package/build/types/catalogue.types.js +0 -4
  24. package/build/types/catalogue.types.js.map +0 -1
  25. package/build/types/category.types.d.ts +0 -33
  26. package/build/types/category.types.js +0 -4
  27. package/build/types/category.types.js.map +0 -1
  28. package/build/types/common.types.d.ts +0 -42
  29. package/build/types/common.types.js +0 -4
  30. package/build/types/common.types.js.map +0 -1
  31. package/build/types/country.types.d.ts +0 -143
  32. package/build/types/country.types.js +0 -4
  33. package/build/types/country.types.js.map +0 -1
  34. package/build/types/coupon.types.d.ts +0 -112
  35. package/build/types/coupon.types.js +0 -4
  36. package/build/types/coupon.types.js.map +0 -1
  37. package/build/types/currency.types.d.ts +0 -7
  38. package/build/types/currency.types.js +0 -4
  39. package/build/types/currency.types.js.map +0 -1
  40. package/build/types/fulfillment.types.d.ts +0 -218
  41. package/build/types/fulfillment.types.js +0 -4
  42. package/build/types/fulfillment.types.js.map +0 -1
  43. package/build/types/http.types.d.ts +0 -64
  44. package/build/types/http.types.js +0 -4
  45. package/build/types/http.types.js.map +0 -1
  46. package/build/types/image.types.d.ts +0 -82
  47. package/build/types/image.types.js +0 -4
  48. package/build/types/image.types.js.map +0 -1
  49. package/build/types/livingPlace.types.d.ts +0 -92
  50. package/build/types/livingPlace.types.js +0 -4
  51. package/build/types/livingPlace.types.js.map +0 -1
  52. package/build/types/notification.types.d.ts +0 -21
  53. package/build/types/notification.types.js +0 -4
  54. package/build/types/notification.types.js.map +0 -1
  55. package/build/types/order.types.d.ts +0 -529
  56. package/build/types/order.types.js +0 -3
  57. package/build/types/order.types.js.map +0 -1
  58. package/build/types/payment.types.d.ts +0 -97
  59. package/build/types/payment.types.js +0 -4
  60. package/build/types/payment.types.js.map +0 -1
  61. package/build/types/product.types.d.ts +0 -299
  62. package/build/types/product.types.js +0 -4
  63. package/build/types/product.types.js.map +0 -1
  64. package/build/types/settings.types.d.ts +0 -23
  65. package/build/types/settings.types.js +0 -4
  66. package/build/types/settings.types.js.map +0 -1
  67. package/build/types/shippingAddress.types.d.ts +0 -79
  68. package/build/types/shippingAddress.types.js +0 -4
  69. package/build/types/shippingAddress.types.js.map +0 -1
  70. package/build/types/shippingCost.types.d.ts +0 -54
  71. package/build/types/shippingCost.types.js +0 -4
  72. package/build/types/shippingCost.types.js.map +0 -1
  73. package/build/types/shoppingCart.types.d.ts +0 -124
  74. package/build/types/shoppingCart.types.js +0 -4
  75. package/build/types/shoppingCart.types.js.map +0 -1
  76. package/build/types/store.types.d.ts +0 -198
  77. package/build/types/store.types.js +0 -4
  78. package/build/types/store.types.js.map +0 -1
  79. package/build/types/user.types.d.ts +0 -115
  80. package/build/types/user.types.js +0 -4
  81. package/build/types/user.types.js.map +0 -1
  82. package/build/types/vendor.types.d.ts +0 -23
  83. package/build/types/vendor.types.js +0 -3
  84. package/build/types/vendor.types.js.map +0 -1
  85. package/build/vendors.d.ts +0 -1
  86. package/build/vendors.js +0 -4
  87. package/build/vendors.js.map +0 -1
@@ -0,0 +1,3811 @@
1
+ /**
2
+ * Representation of a Commerce Country.
3
+ *
4
+ * @interface Country
5
+ * @since 0.1.0
6
+ */
7
+ interface Country<T extends AdditionalInfo = AdditionalInfo> {
8
+ /** Country's identifier */
9
+ id: string;
10
+ /** Country's name */
11
+ name: string;
12
+ /** Country ISO code, see {@link CountryCode} */
13
+ code: CountryCode;
14
+ /**
15
+ * Object which contains information about country's currency,
16
+ * see {@link CountryCurrency}
17
+ */
18
+ currency: CountryCurrency;
19
+ /** Country additional info */
20
+ additionalInfo?: T;
21
+ }
22
+ /**
23
+ * Representation of a country's currency.
24
+ *
25
+ * @interface CountryCurrency
26
+ * @since 0.1.0
27
+ */
28
+ interface CountryCurrency {
29
+ /** Currency's identifier */
30
+ id: string;
31
+ /** Currency's name */
32
+ name: string;
33
+ /** Currency's symbol */
34
+ sign: string;
35
+ /** Currency's external identifier */
36
+ external_id: string;
37
+ }
38
+ /**
39
+ * List of country codes currently supported.
40
+ *
41
+ * @typedef CountryCode
42
+ * @since 0.1.0
43
+ * @see https://www.nationsonline.org/oneworld/country_code_list.htm for reference
44
+ */
45
+ type CountryCode = "AR" | "BO" | "BR" | "CL" | "CO" | "EC" | "PY" | "PE" | "UY" | "VE" | "US";
46
+ /**
47
+ * Default documents for all countries.
48
+ *
49
+ * @typedef CommonDocumentType
50
+ * @since 0.1.0
51
+ */
52
+ type CommonDocumentType = "PASSPORT";
53
+ /**
54
+ * Argentina supported document types.
55
+ *
56
+ * @typedef ARDocumentType
57
+ * @since 0.1.0
58
+ */
59
+ type ARDocumentType = CommonDocumentType | "DNI";
60
+ /**
61
+ * Bolivia supported document types.
62
+ *
63
+ * @typedef BODocumentType
64
+ * @since 0.1.0
65
+ */
66
+ type BODocumentType = CommonDocumentType;
67
+ /**
68
+ * Brasil supported document types.
69
+ *
70
+ * @typedef BRDocumentType
71
+ * @since 0.1.0
72
+ */
73
+ type BRDocumentType = CommonDocumentType;
74
+ /**
75
+ * Chile supported document types.
76
+ *
77
+ * @typedef CLDocumentType
78
+ * @since 0.1.0
79
+ */
80
+ type CLDocumentType = CommonDocumentType | "RUT";
81
+ /**
82
+ * Colombia supported document types.
83
+ *
84
+ * @typedef CODocumentType
85
+ * @since 0.1.0
86
+ */
87
+ type CODocumentType = CommonDocumentType | "NIT" | "CI_CO";
88
+ /**
89
+ * Ecuador supported document types.
90
+ *
91
+ * @typedef ECDocumentType
92
+ * @since 0.1.0
93
+ */
94
+ type ECDocumentType = CommonDocumentType | "CI" | "RUC";
95
+ /**
96
+ * Paraguay supported document types.
97
+ *
98
+ * @typedef PYDocumentType
99
+ * @since 0.1.0
100
+ */
101
+ type PYDocumentType = CommonDocumentType;
102
+ /**
103
+ * Perú supported document types.
104
+ *
105
+ * @typedef PEDocumentType
106
+ * @since 0.1.0
107
+ */
108
+ type PEDocumentType = CommonDocumentType | "DNI" | "RUC";
109
+ /**
110
+ * Uruguay supported document types.
111
+ *
112
+ * @typedef UYDocumentType
113
+ * @since 0.1.0
114
+ */
115
+ type UYDocumentType = CommonDocumentType;
116
+ /**
117
+ * Venezuela supported document types.
118
+ *
119
+ * @typedef VEDocumentType
120
+ * @since 0.1.0
121
+ */
122
+ type VEDocumentType = CommonDocumentType | "CI_VE" | "CE_VE" | "RIF";
123
+ /**
124
+ * United States supported document types.
125
+ *
126
+ * @typedef USDocumentType
127
+ * @since 0.1.0
128
+ */
129
+ type USDocumentType = CommonDocumentType;
130
+
131
+ /**
132
+ * Representation of a generic object.
133
+ *
134
+ * @interface Objectify&lt;T>
135
+ * @since 0.1.0
136
+ * @property {T} [key: string] object key
137
+ */
138
+ interface Objectify<T> {
139
+ [key: string]: T;
140
+ }
141
+ /**
142
+ * The possible values of a document type.
143
+ *
144
+ * @typedef DocumentType
145
+ * @since 0.1.0
146
+ */
147
+ type DocumentType = ARDocumentType | BODocumentType | BRDocumentType | CLDocumentType | CODocumentType | ECDocumentType | PYDocumentType | PEDocumentType | UYDocumentType | VEDocumentType | USDocumentType;
148
+ /**
149
+ * Representation of the country's summary.
150
+ *
151
+ * @interface CountrySummary
152
+ * @since 0.1.0
153
+ */
154
+ interface CountrySummary {
155
+ /** Country's id */
156
+ id: string;
157
+ /** Country's name */
158
+ name: string;
159
+ }
160
+ /**
161
+ * The possible values of a week day.
162
+ *
163
+ * @typedef BaseWeekDay
164
+ * @since 0.1.0
165
+ */
166
+ type BaseWeekDay = "MONDAY" | "TUESDAY" | "WEDNESDAY" | "THURSDAY" | "FRIDAY" | "SATURDAY" | "SUNDAY";
167
+ /**
168
+ * Common additional information.
169
+ *
170
+ * @typedef AdditionalInfo
171
+ * @since 0.1.0
172
+ */
173
+ type AdditionalInfo = Record<string, any>;
174
+ /**
175
+ * Artisn app's allowed platforms to run on.
176
+ *
177
+ * @typedef ArtisnPlatform
178
+ * @since 0.1.0
179
+ */
180
+ type ArtisnPlatform = "web" | "ios" | "android" | "windows" | "macos" | "call center";
181
+
182
+ /**
183
+ * Representation of a image allocated in a CDN.
184
+ *
185
+ * @interface CDNImage
186
+ * @since 0.1.0
187
+ */
188
+ interface CDNImage {
189
+ /** The bucket where the image is located */
190
+ bucket: string | null;
191
+ /** The cloud where the image is saved */
192
+ cloudFrontUrl?: string;
193
+ /** The directory where the image is saved */
194
+ key: string | null;
195
+ /** Image's name */
196
+ name: string;
197
+ /** The url where the image is saved */
198
+ url: string;
199
+ }
200
+ /**
201
+ * A image url.
202
+ *
203
+ * @typedef URLImage
204
+ * @since 0.1.0
205
+ */
206
+ type URLImage = string;
207
+ /**
208
+ * Configuration on how to setup the cloudfront image manipulation.
209
+ *
210
+ * @since 0.1.0
211
+ * @interface ImageManipulationConfig
212
+ */
213
+ interface ImageManipulationConfig {
214
+ /** Image's width */
215
+ width?: number;
216
+ /** Image's height */
217
+ height?: number;
218
+ /** Determines how to resize the image, see {@link ImageFit} */
219
+ fit?: ImageFit;
220
+ /**
221
+ * Determines in which format the resulting image must be,
222
+ * see {@link ImageToFormat}
223
+ */
224
+ toFormat?: ImageToFormat;
225
+ }
226
+ /**
227
+ * Representation of a Commerce Image which could be a
228
+ * {@link CDNImage} or a {@link URLImage}.
229
+ *
230
+ * @typedef Image
231
+ * @since 0.1.0
232
+ */
233
+ type Image = CDNImage | URLImage;
234
+ /**
235
+ * Contains different properties on how to resize the image.
236
+ *
237
+ * @typedef ImageFit
238
+ * @since 0.1.0
239
+ */
240
+ type ImageFit = "fill" | "cover" | "contain" | "inside" | "outside";
241
+ /**
242
+ * Contains different image formats.
243
+ *
244
+ * @typedef ImageToFormat
245
+ * @since 0.1.0
246
+ */
247
+ type ImageToFormat = "jpg" | "jpeg" | "png" | "svg";
248
+ /**
249
+ * Random image configuration.
250
+ *
251
+ * @since 0.5.15
252
+ * @interface RandomImageConfig
253
+ */
254
+ interface RandomImageConfig {
255
+ /** A word which will be used to generate the random image */
256
+ query?: string | undefined;
257
+ /** The width to be used to generate the random image */
258
+ width?: number;
259
+ /** The height to be used to generate the random image */
260
+ height?: number;
261
+ }
262
+
263
+ /**
264
+ * Representation of a Commerce Account.
265
+ *
266
+ * @interface Account
267
+ * @since 0.1.0
268
+ */
269
+ interface Account<T extends AdditionalInfo = AdditionalInfo> {
270
+ /** Artisn's account unique identifier */
271
+ accountId: string;
272
+ /** Account's name */
273
+ name: string;
274
+ /** Account's description */
275
+ description?: string;
276
+ /** Account's images, see {@link CDNImage} for further information */
277
+ images: CDNImage[];
278
+ /** Account additional info */
279
+ additionalInfo?: T;
280
+ }
281
+
282
+ /**
283
+ * Representation of a Commerce Catalogue.
284
+ *
285
+ * @interface Catalogue
286
+ * @since 0.1.0
287
+ */
288
+ interface Catalogue<T extends AdditionalInfo = AdditionalInfo> {
289
+ /** Catalogue's id */
290
+ catalogueId: string;
291
+ /** Catalogue's name */
292
+ name: string;
293
+ /** Whether or not the catalogue is active */
294
+ active: boolean;
295
+ /** Catalogue's friendly name to use on front end */
296
+ friendlyName?: string;
297
+ /** Catalogue additional info */
298
+ additionalInfo?: T;
299
+ }
300
+
301
+ /**
302
+ * Representation of a Commerce Vendor.
303
+ *
304
+ * @interface Vendor
305
+ * @since 0.1.0
306
+ */
307
+ interface Vendor<T extends AdditionalInfo = AdditionalInfo> {
308
+ /** Artisn's vendor unique identifier */
309
+ id: string;
310
+ /** Vendor's images, see {@link CDNImage} */
311
+ images: CDNImage[];
312
+ /** Vendor's name */
313
+ name: string;
314
+ /** Vendor's maximum purchase value */
315
+ maxPurchaseValue: number;
316
+ /** Vendor's description */
317
+ description: string;
318
+ /** Whether or not the vendor is sponsored */
319
+ sponsored: boolean;
320
+ /** Whether or not the vendor is active */
321
+ active: boolean;
322
+ /** Vendor additional info */
323
+ additionalInfo?: T;
324
+ }
325
+
326
+ /**
327
+ * Representation of a Commerce Store.
328
+ *
329
+ * @interface Store
330
+ * @template T Store additional info
331
+ * @template U Vendor additional info
332
+ * @template V Catalogues additional info
333
+ * @since 0.1.0
334
+ */
335
+ interface Store<T extends AdditionalInfo = AdditionalInfo, U extends AdditionalInfo = AdditionalInfo, V extends AdditionalInfo = AdditionalInfo> {
336
+ /** Store unique identifier */
337
+ storeId: string;
338
+ /** Store name */
339
+ storeName: string;
340
+ /** Store address */
341
+ address: string;
342
+ /** The vendor associated with the store, see {@link Vendor} */
343
+ vendor: Vendor<U>;
344
+ /** Additional store information */
345
+ additionalInfo?: T;
346
+ /** Whether or not the store is within coverage */
347
+ coverage: boolean;
348
+ /** Store cover url */
349
+ coverUrl: string;
350
+ /** Store delivery detailed information */
351
+ delivery: Delivery;
352
+ /** Store description */
353
+ description: string | null;
354
+ /** Whether or not the store is open */
355
+ isOpen: boolean;
356
+ /** Order maximum amount allowed */
357
+ maxOrderAmount: number;
358
+ /** Order minimum amount allowed */
359
+ minOrderAmount: number;
360
+ /** Order currency's symbol */
361
+ orderSymbol: string;
362
+ /** Store phone */
363
+ phone: string;
364
+ /** Whether or not the store is sponsored */
365
+ sponsored: boolean;
366
+ /** Store latitude */
367
+ latitude: number;
368
+ /** Store longitude */
369
+ longitude: number;
370
+ /** Store schedules, see {@link Schedule} for further information */
371
+ schedules: Schedule[];
372
+ /** Store timezone */
373
+ timezone: string;
374
+ /** Store available services, see {@link Service} */
375
+ services: Service[];
376
+ /** Estimated store cook time */
377
+ cookTime: string;
378
+ /**
379
+ * Generic store location in regards to the city,
380
+ * see {@link GenericStoreLocation}
381
+ */
382
+ city: GenericStoreLocation;
383
+ /** Whether or not the store is out of service */
384
+ outOfService: boolean;
385
+ /** Whether or not the store is default */
386
+ isDefault: boolean;
387
+ /** Whether or not the store is active */
388
+ active: boolean;
389
+ /** The value of the allowed minimum order */
390
+ minOrder: number;
391
+ /** Minimum order currency's symbol */
392
+ minOrderSymbol: string;
393
+ /**
394
+ * Generic store location in regards to the country,
395
+ * see {@link GenericStoreLocation} for further information
396
+ */
397
+ country: GenericStoreLocation;
398
+ /** Store location, see {@link StoreLocation} for further information */
399
+ location: StoreLocation;
400
+ /** Array of catalogues, see {@link Catalogue} */
401
+ catalogues: Catalogue<V>[];
402
+ /** Array of store images, see {@link CDNImage} */
403
+ images: CDNImage[];
404
+ /** The distance between the user and the store, roughly in metres */
405
+ distance: number;
406
+ /**
407
+ * A list of coordinates that encapsules the coverage area of a given store
408
+ */
409
+ polygons: StorePolygons | null;
410
+ }
411
+ /**
412
+ * Store location.
413
+ *
414
+ * @interface StoreLocation
415
+ * @since 0.1.0
416
+ */
417
+ interface StoreLocation {
418
+ /** Store location latitude */
419
+ lat: number;
420
+ /** Store location longitude */
421
+ lon: number;
422
+ /** The geo hash associated with the store */
423
+ geohash: string;
424
+ /** Whether or not the store is a fragment */
425
+ fragment: boolean;
426
+ }
427
+ /**
428
+ * Store generic location.
429
+ *
430
+ * @interface GenericStoreLocation
431
+ * @since 0.1.0
432
+ */
433
+ interface GenericStoreLocation {
434
+ /** Generic store location unique identifier */
435
+ id: string;
436
+ /** Generic store location name */
437
+ name: string;
438
+ /** Whether or not the generic store location is active */
439
+ active: boolean;
440
+ }
441
+ /**
442
+ * Store delivery modality information.
443
+ *
444
+ * @interface Delivery
445
+ * @since 0.1.0
446
+ */
447
+ interface Delivery {
448
+ /** Time unit for delivery, see {@link DeliveryTimeUnit} */
449
+ deliveryTimeUnit: DeliveryTimeUnit;
450
+ /** Time value for delivery as string */
451
+ deliveryTimeValue: string;
452
+ /** Whether or not the store has a express delivery */
453
+ express: boolean;
454
+ /** Whether or not the store has free delivery */
455
+ freeDelivery: boolean;
456
+ }
457
+ /**
458
+ * Store schedules.
459
+ *
460
+ * @interface Schedule
461
+ * @since 0.1.0
462
+ */
463
+ interface Schedule {
464
+ /** Week day in uppercase, see {@link Days} */
465
+ day: Days;
466
+ /**
467
+ * `Date` value representing the start time in which
468
+ * the product is available
469
+ */
470
+ from: number;
471
+ /** `Date` value representing the end time in which
472
+ * the product is available
473
+ */
474
+ to: number;
475
+ /** Store catalogue unique identifier */
476
+ catalogueId: string;
477
+ }
478
+ /**
479
+ * The services available on the store.
480
+ *
481
+ * @interface Service
482
+ * @since 0.1.0
483
+ */
484
+ interface Service {
485
+ /** Service name */
486
+ name: string;
487
+ /** Whether or not the service is active on the store */
488
+ active: boolean;
489
+ /** Service image url */
490
+ url: string;
491
+ }
492
+ /**
493
+ * Time unit for delivery.
494
+ *
495
+ * @typedef DeliveryTimeUnit
496
+ * @since 0.1.0
497
+ */
498
+ type DeliveryTimeUnit = "min";
499
+ /**
500
+ * Allowed days for schedules.
501
+ *
502
+ * @typedef Days
503
+ * @since 0.1.0
504
+ */
505
+ type Days = BaseWeekDay | "SPECIAL";
506
+ /**
507
+ * A list of coordinates that encapsules the coverage area of a given store.
508
+ *
509
+ * @interface StorePolygons
510
+ * @since 0.1.0
511
+ */
512
+ interface StorePolygons {
513
+ /** Type of coordinates */
514
+ type: string;
515
+ /** The coordinates that creates the store polygon coverage area */
516
+ coordinates: number[][][][];
517
+ }
518
+
519
+ /**
520
+ * Representation of a Commerce Category.
521
+ *
522
+ * @interface Category
523
+ * @since 0.1.0
524
+ */
525
+ interface Category<T extends AdditionalInfo = AdditionalInfo> {
526
+ /** Category's id */
527
+ categoryId: string;
528
+ /** Category's name */
529
+ name: string;
530
+ /** Category image's array, see {@link CDNImage} */
531
+ images: CDNImage[];
532
+ /** Whether or not to display the category */
533
+ displayInMenu: boolean;
534
+ /** Whether or not the category should be reloaded */
535
+ reload: boolean;
536
+ /** Whether or not the category has subcategories */
537
+ subcategories: boolean;
538
+ /** Category additional info */
539
+ additionalInfo?: T;
540
+ /** Whether or not the category is featured */
541
+ featured: boolean;
542
+ }
543
+ /**
544
+ * Representation of a category which contains several base products.
545
+ *
546
+ * @interface CategoryWithProducts
547
+ * @since 0.1.0
548
+ * @extends {{@link Category}
549
+ */
550
+ interface CategoryWithProducts extends Category {
551
+ /** Array of base products associated with a category, see {@link BaseProduct} */
552
+ products: BaseProduct[];
553
+ }
554
+
555
+ /**
556
+ * Representation of a Commerce Product.
557
+ *
558
+ * @typedef Product
559
+ * @template T Product additional info
560
+ * @template U Categories additional info
561
+ * @since 0.1.0
562
+ */
563
+ type Product<T extends AdditionalInfo = AdditionalInfo, U extends AdditionalInfo = AdditionalInfo> = BaseProduct<T> | ProductDetails<T, U> | CartProduct<T, U>;
564
+ /**
565
+ * Base product attributes.
566
+ *
567
+ * @interface BaseProduct
568
+ * @since 0.1.0
569
+ */
570
+ interface BaseProduct<T extends AdditionalInfo = AdditionalInfo> {
571
+ /** Product unique identifier */
572
+ productId: string;
573
+ /** The name of the product */
574
+ name: string;
575
+ /** The description of the product */
576
+ description: string;
577
+ /** The type of the product, see {@link ProductType} */
578
+ type: ProductType;
579
+ /** The cover url of the product */
580
+ coverUrl: string;
581
+ /** Product prices, see {@link ProductPrices} */
582
+ prices: ProductPrices;
583
+ /** Indicates if a product can be added directly to cart */
584
+ addDirectlyToCart: boolean;
585
+ /** Indicates if a product is out of service */
586
+ outOfService: boolean;
587
+ /** Indicates if a product is out of stock */
588
+ outOfStock: boolean;
589
+ /** The stock of the product */
590
+ stock: number;
591
+ /** The measure of the product */
592
+ measure: string;
593
+ /** Product attributes, see {@link ProductAttributes} */
594
+ attributes: ProductAttributes;
595
+ /** The suggested price of the product */
596
+ suggestedPrice: string;
597
+ /** Indicates if a product is available */
598
+ available: boolean;
599
+ /** Array of product images, see {@link CDNImage} */
600
+ images: CDNImage[];
601
+ /** The standard time of the product */
602
+ standardTime: string;
603
+ /** Indicates if a product is sponsored */
604
+ sponsored: boolean;
605
+ /** The status of the product, see {@link ProductStatus} */
606
+ status: ProductStatus;
607
+ /** Product additional info */
608
+ additionalInfo?: T;
609
+ /** Up-sell products related to the base product */
610
+ upSelling?: BaseProduct[];
611
+ }
612
+ /**
613
+ * Product prices attributes.
614
+ *
615
+ * @interface ProductPrices
616
+ * @since 0.1.0
617
+ */
618
+ interface ProductPrices {
619
+ /** Normal price category, see {@link PriceCategory} */
620
+ NORMAL: PriceCategory;
621
+ /** Points price category, see {@link PriceCategory} */
622
+ POINTS: PriceCategory;
623
+ /** Suggested price category, see {@link PriceCategory} */
624
+ SUGGESTED: PriceCategory;
625
+ }
626
+ /**
627
+ * Price category attributes.
628
+ *
629
+ * @interface PriceCategory
630
+ * @since 0.1.0
631
+ */
632
+ interface PriceCategory {
633
+ /** Price category type, see {@link PriceCategoryType} */
634
+ category: PriceCategoryType;
635
+ /** Price category without taxes */
636
+ grossPrice: number;
637
+ /** Price category with taxes */
638
+ netPrice: number;
639
+ /** Currency' symbol */
640
+ symbol: string;
641
+ /** Array of price category' taxes, see {@link PriceCategoryTax} */
642
+ taxes: PriceCategoryTax[];
643
+ /** Array of discounts applied to the price category */
644
+ discounts: any[];
645
+ /** Total discounts without taxes */
646
+ discountGrossPrice: number;
647
+ /** Total discounts with taxes */
648
+ discountNetPrice: number;
649
+ /** Total discounts applied to the price category */
650
+ discount: number;
651
+ /** Sale percentage value */
652
+ salePercentage: number;
653
+ /** Sale price before value */
654
+ priceBeforeSale: number;
655
+ }
656
+ /**
657
+ * Price category tax attributes.
658
+ *
659
+ * @interface PriceCategoryTax
660
+ * @since 0.1.0
661
+ */
662
+ interface PriceCategoryTax {
663
+ /** Price category' tax percentage */
664
+ percentage: number;
665
+ /** Price category' tax name, see {@link TaxType} */
666
+ name: TaxType;
667
+ /** Price category' value added tax rate */
668
+ vatRateCode: number;
669
+ /** Price category' tax code */
670
+ code: number;
671
+ /** Price category' value added tax */
672
+ vatRate: string;
673
+ }
674
+ /**
675
+ * Additional product attributes.
676
+ *
677
+ * @interface ProductAttributes
678
+ * @since 0.1.0
679
+ */
680
+ interface ProductAttributes {
681
+ /** Product's quantity, the attribute is not in camel case purposefully */
682
+ Cantidad: string;
683
+ /** Product external id */
684
+ externalId: string;
685
+ /** Whether or not to show product in menu */
686
+ showInMenu: boolean;
687
+ }
688
+ /**
689
+ * The product status.
690
+ *
691
+ * @typedef ProductStatus
692
+ * @since 0.1.0
693
+ **/
694
+ type ProductStatus = "ACTIVE" | "INACTIVE";
695
+ /**
696
+ * Product type's possible values.
697
+ *
698
+ * @typedef ProductType
699
+ * @since 0.1.0
700
+ **/
701
+ type ProductType = "PRODUCT" | "MODIFIER";
702
+ /**
703
+ * Price category's possible values.
704
+ *
705
+ * @typedef PriceCategoryType
706
+ * @since 0.1.0
707
+ **/
708
+ type PriceCategoryType = "NORMAL" | "POINTS" | "SUGGESTED";
709
+ /**
710
+ * Tax's possible values.
711
+ *
712
+ * @typedef TaxType
713
+ * @since 0.1.0
714
+ **/
715
+ type TaxType = "IVA";
716
+ /**
717
+ * Weekday product's schedule.
718
+ *
719
+ * @interface DayOfWeek
720
+ * @since 0.1.0
721
+ */
722
+ interface DayOfWeek {
723
+ /** Week day in uppercase, see {@link BaseWeekDay} */
724
+ day: BaseWeekDay;
725
+ /**
726
+ * `Date` value representing the start time in which
727
+ * the product is available */
728
+ from: number;
729
+ /**
730
+ * `Date` value representing the end time in which
731
+ * the product is available */
732
+ to: number;
733
+ }
734
+ /**
735
+ * The representation of a product question.
736
+ *
737
+ * @interface ProductQuestion
738
+ * @template T Product answers additional info
739
+ * @since 0.1.0
740
+ */
741
+ interface ProductQuestion<T extends AdditionalInfo = AdditionalInfo> {
742
+ /** Product question id */
743
+ questionId: string;
744
+ /** Product question name */
745
+ name: string;
746
+ /** Product question description */
747
+ description: string | null;
748
+ /** Product question minimum number of allowed answers */
749
+ min: number;
750
+ /** Product question maximum number of allowed answers */
751
+ max: number;
752
+ /** Product question type */
753
+ type: string | null;
754
+ /**
755
+ * Array of possible answers to a product question,
756
+ * see {@link ProductAnswer}
757
+ */
758
+ answers: ProductAnswer<T>[];
759
+ /** Array of product question images to display, see {@link CDNImage} */
760
+ images: CDNImage[] | undefined;
761
+ }
762
+ /**
763
+ * Product details attributes.
764
+ *
765
+ * @interface ProductDetails
766
+ * @template T Product additional info
767
+ * @template U Categories additional info
768
+ * @since 0.1.0
769
+ * @extends {{@link BaseProduct}
770
+ */
771
+ interface ProductDetails<T extends AdditionalInfo = AdditionalInfo, U extends AdditionalInfo = AdditionalInfo> extends BaseProduct<T> {
772
+ /** Indicates if a product has a price vip */
773
+ isPriceVip: boolean;
774
+ /** Manufacturer The manufacturer of the product */
775
+ manufacturer: string[];
776
+ /** The max amount for sale of the product */
777
+ maxAmountForSale: number;
778
+ /** Array of product schedules, see {@link DayOfWeek} */
779
+ schedule: DayOfWeek[];
780
+ /** Array of product questions, see {@link ProductQuestion} */
781
+ questions: ProductQuestion<T>[];
782
+ /** The benefit id of the product */
783
+ benefitId: string | null;
784
+ /** An array of categories which the product belongs to, see {@link Category} */
785
+ categories: Category<U>[] | null;
786
+ }
787
+ /**
788
+ * Common props for products and answers.
789
+ *
790
+ * @typedef BaseAnswersProps
791
+ * @since 0.1.0
792
+ */
793
+ type BaseAnswersProps = "name" | "prices" | "attributes" | "productId" | "type" | "images" | "questions" | "additionalInfo";
794
+ /**
795
+ * The shared fields of any Answer.
796
+ *
797
+ * @interface BaseAnswer
798
+ * @since 0.1.0
799
+ * @extends Pick<ProductDetails,BaseAnswersProps>, see
800
+ * {@link ProductDetails} and {@link BaseAnswersProps}
801
+ * for further information
802
+ */
803
+ type BaseAnswer<T extends ProductDetails, U extends keyof T = BaseAnswersProps> = Pick<T, U> & {
804
+ /** Type of question to render */
805
+ renderType: string | null;
806
+ };
807
+ /**
808
+ * A product modifier answer.
809
+ *
810
+ * @interface ProductAnswer
811
+ * @template T Product additional info
812
+ * @since 0.1.0
813
+ * @extends BaseAnswer<ProductDetails>, see
814
+ * {@link ProductDetails} and {@link BaseAnswer}
815
+ * for further information
816
+ */
817
+ interface ProductAnswer<T extends AdditionalInfo = AdditionalInfo> extends BaseAnswer<ProductDetails<T>> {
818
+ }
819
+ /**
820
+ * Common props for cart products and answers.
821
+ *
822
+ * @typedef CartAnswersProps
823
+ * @since 0.1.0
824
+ */
825
+ type CartAnswersProps = BaseAnswersProps | "amount" | "priceCategory" | "comment" | "questionsAndAnswers";
826
+ /**
827
+ * Representation of a Commerce Cart Product Answer.
828
+ *
829
+ * @interface CartProductAnswer
830
+ * @template T Product additional info
831
+ * @since 0.1.0
832
+ * @extends {{@link BaseAnswer}
833
+ */
834
+ interface CartProductAnswer<T extends AdditionalInfo = AdditionalInfo> extends BaseAnswer<CartProduct<T>, CartAnswersProps> {
835
+ /** Question unique identifier */
836
+ questionId: string;
837
+ }
838
+ /**
839
+ * Representation of a Commerce Cart Product Question.
840
+ *
841
+ * @interface CartProductQuestion
842
+ * @template T Product additional info
843
+ * @since 0.1.0
844
+ * @extends {{@link ProductQuestion}
845
+ */
846
+ interface CartProductQuestion<T extends AdditionalInfo = AdditionalInfo> extends ProductQuestion {
847
+ /** Array of possible answers to the question */
848
+ answers: CartProductAnswer<T>[];
849
+ }
850
+ /**
851
+ * Representation of a Commerce Cart Product.
852
+ *
853
+ * @interface CartProduct
854
+ * @template T Product additional info
855
+ * @template U Categories additional info
856
+ * @since 0.1.0
857
+ * @extends {{@link ProductDetails}
858
+ */
859
+ interface CartProduct<T extends AdditionalInfo = AdditionalInfo, U extends AdditionalInfo = AdditionalInfo> extends ProductDetails<T, U> {
860
+ /** Quantity of allowed cart products */
861
+ amount: number;
862
+ /** Cart product price category */
863
+ priceCategory: PriceCategoryType;
864
+ /** Comment associated with the cart product */
865
+ comment: string;
866
+ /** Array of possible questions and answers associated with the product*/
867
+ questionsAndAnswers: CartProductQuestion[];
868
+ /** Cart product unique identifier */
869
+ hash: string;
870
+ /** Cart product creation date */
871
+ createdAt: string;
872
+ /** Cart product updating date */
873
+ updatedAt: string;
874
+ /** Array of alerts associated with the cart product */
875
+ alerts: Alert[];
876
+ /** Indicates where the product was added from */
877
+ addedFrom?: string;
878
+ }
879
+
880
+ /**
881
+ * Representation of a Commerce Shipping Cost.
882
+ *
883
+ * @interface ShippingCost
884
+ * @since 0.1.0
885
+ */
886
+ interface ShippingCost<T extends AdditionalInfo = AdditionalInfo> {
887
+ /** Shipping cost product's id */
888
+ productId: string;
889
+ /** Shipping cost's name */
890
+ name: string;
891
+ /** Shipping cost's amount */
892
+ amount: number;
893
+ /** Currency's symbol */
894
+ symbol: string;
895
+ /** Array of shipping cost's taxes, see {@link ShippingCostTax} */
896
+ taxes: ShippingCostTax[];
897
+ /** Shipping cost's price without taxes */
898
+ grossPrice: number;
899
+ /** Shipping cost's price */
900
+ netPrice: number;
901
+ /** Shipping cost's subtotal without taxes */
902
+ subtotalBeforeTaxes: number;
903
+ /** Shipping cost's tax total */
904
+ taxTotal: number;
905
+ /** Shipping cost's discount */
906
+ discounts: any[];
907
+ /** Shipping cost's discount total amount */
908
+ discountTotal: number;
909
+ /** Shipping cost's total */
910
+ total: number;
911
+ /** Shipping cost additional info */
912
+ additionalInfo?: T;
913
+ /** Discount net price */
914
+ discountNetPrice?: number;
915
+ }
916
+ /**
917
+ * Representation of a shipping cost tax.
918
+ *
919
+ * @interface ShippingCostTax
920
+ * @since 0.1.0
921
+ */
922
+ interface ShippingCostTax {
923
+ /** Tax percentage to be applied */
924
+ percentage: number;
925
+ /** Tax name */
926
+ name: string;
927
+ /** Value added tax rate code */
928
+ vatRateCode: number;
929
+ /** Tax code */
930
+ code: number;
931
+ /** Value added tax rate */
932
+ vatRate: string;
933
+ /** Tax base value */
934
+ taxBase: number;
935
+ /** Tax value */
936
+ value: string;
937
+ }
938
+
939
+ /**
940
+ * Representation of a Commerce Shopping Cart.
941
+ *
942
+ * @interface ShoppingCart
943
+ * @template T Shopping cart additional info
944
+ * @template U Product additional info
945
+ * @template V Categories additional info
946
+ * @template W Store additional info
947
+ * @template X Vendor additional info
948
+ * @template Y Catalogues additional info
949
+ * @template Z Shipping cost additional info
950
+ * @since 0.1.0
951
+ */
952
+ interface ShoppingCart<T extends AdditionalInfo = AdditionalInfo, U extends AdditionalInfo = AdditionalInfo, V extends AdditionalInfo = AdditionalInfo, W extends AdditionalInfo = AdditionalInfo, X extends AdditionalInfo = AdditionalInfo, Y extends AdditionalInfo = AdditionalInfo, Z extends AdditionalInfo = AdditionalInfo> {
953
+ /** Shopping cart unique identifier */
954
+ id: string;
955
+ /** Shopping cart name */
956
+ name: string;
957
+ /** Shopping cart latitude */
958
+ latitude: number;
959
+ /** Shopping cart longitude */
960
+ longitude: number;
961
+ /** Shopping cart price category, see {@link PriceCategoryType}*/
962
+ priceCategory?: PriceCategoryType;
963
+ /** Shopping cart creation date */
964
+ createdAt: string;
965
+ /** Shopping cart update date */
966
+ updatedAt: string;
967
+ /** Shopping cart channel unique identifier */
968
+ channelId: string;
969
+ /** Shopping cart stores, see Objectify<{@link CartStore}> */
970
+ stores: Objectify<CartStore<W, U, V, X, Y>>;
971
+ /** Shopping cart shipping cost */
972
+ shippingCost: ShippingCost<Z> | null;
973
+ /** Shopping cart additional info */
974
+ additional_info?: T;
975
+ /** Shopping cart bill total */
976
+ billTotal: BillTotal;
977
+ /** Shopping cart applied benefits */
978
+ benefits?: ShoppingCartBenefits;
979
+ /** Shopping cart user wallet id */
980
+ benefitsHash?: string;
981
+ /**
982
+ * Shopping cart pick up time, must be in UTC and
983
+ * `YYYY-MM-DD HH:mm:ss` format
984
+ */
985
+ pickUpTime?: string;
986
+ }
987
+ /**
988
+ * Representation of a Alert.
989
+ *
990
+ * @interface Alert
991
+ * @since 0.1.0
992
+ */
993
+ interface Alert {
994
+ /** Alert error level */
995
+ errorLevel: number;
996
+ /** Alert message */
997
+ message: string;
998
+ /** Alert type */
999
+ type: string;
1000
+ }
1001
+ /**
1002
+ * Representation of a Cart Store.
1003
+ *
1004
+ * @interface CartStore
1005
+ * @template T Store additional info
1006
+ * @template U Product additional info
1007
+ * @template V Categories additional info
1008
+ * @template W Vendor additional info
1009
+ * @template X Catalogues additional info
1010
+ * @since 0.1.0
1011
+ * @extends {{@link Store}
1012
+ */
1013
+ interface CartStore<T extends AdditionalInfo = AdditionalInfo, U extends AdditionalInfo = AdditionalInfo, V extends AdditionalInfo = AdditionalInfo, W extends AdditionalInfo = AdditionalInfo, X extends AdditionalInfo = AdditionalInfo> extends Store<T, W, X> {
1014
+ /** The products that belong to the store, see {@link CartProduct} */
1015
+ products: Objectify<CartProduct<U, V>>;
1016
+ /** Cart store's alerts, see {@link Alert} */
1017
+ alerts: Alert[];
1018
+ }
1019
+ /**
1020
+ * The possible values of a Bill Total.
1021
+ *
1022
+ * @typedef BillTotal
1023
+ * @since 0.1.0
1024
+ */
1025
+ type BillTotal = {
1026
+ /** Normal bill total category */
1027
+ NORMAL?: BillTotalCategory;
1028
+ /** Points bill total category */
1029
+ POINTS?: BillTotalCategory;
1030
+ };
1031
+ /**
1032
+ * Representation of a Bill Total Category.
1033
+ *
1034
+ * @interface BillTotalCategory
1035
+ * @since 0.1.0
1036
+ */
1037
+ interface BillTotalCategory {
1038
+ /** Bill total category subtotal without taxes */
1039
+ subtotalBeforeTaxes: number;
1040
+ /** Bill total category total taxes */
1041
+ taxTotal: number;
1042
+ /** Bill total category total */
1043
+ total: number;
1044
+ /** discounts shopping cart */
1045
+ discounts: Discount[];
1046
+ /** Taxes shopping cart */
1047
+ taxes: PriceCategoryTax[];
1048
+ }
1049
+ /**
1050
+ * Representation of shopping cart discount.
1051
+ *
1052
+ * @interface Discounts
1053
+ * @since 0.1.0
1054
+ */
1055
+ interface Discount {
1056
+ benefitId: string;
1057
+ /** Benefit wallet id */
1058
+ benefitWalletId: string;
1059
+ /** Discount base value */
1060
+ discountBase: number;
1061
+ /** Whether or not the coupon has taxes */
1062
+ hasTaxes: boolean;
1063
+ /** If the coupon discount has been initialized */
1064
+ isInitialized: boolean;
1065
+ /** The benefit name */
1066
+ name: string;
1067
+ /** The benefit percentage */
1068
+ percentage: number;
1069
+ /** The benefit taxes */
1070
+ taxValue: number;
1071
+ /** The benefit type */
1072
+ type: BenefitTypes;
1073
+ /** The discount value */
1074
+ value: number;
1075
+ }
1076
+ /**
1077
+ * Representation of a Cart Totals.
1078
+ *
1079
+ * @interface CartTotals
1080
+ * @since 0.1.0
1081
+ */
1082
+ interface CartTotals {
1083
+ /** Cart totals subtotal */
1084
+ subtotal: number;
1085
+ /** Cart totals shipping cost */
1086
+ shippingCost: number;
1087
+ }
1088
+
1089
+ type MasivoRegistrationStatus = "REGISTERED" | "UNREGISTERED";
1090
+ /**
1091
+ * Represents a customer in the Masivo system.
1092
+ */
1093
+ interface MasivoCustomer {
1094
+ /** The unique identifier for the customer. */
1095
+ id: string;
1096
+ /** The name of the customer. */
1097
+ name: string;
1098
+ /** The email address of the customer. */
1099
+ email: string;
1100
+ /** The date of birth of the customer. */
1101
+ dob: string;
1102
+ /** The gender of the customer. */
1103
+ gender: string;
1104
+ /** The date when the customer registered. */
1105
+ registration_date: string;
1106
+ /** The current status of the customer. */
1107
+ status: string;
1108
+ /** Additional metadata related to the customer. */
1109
+ metadata: Metadata;
1110
+ /** The identifier for the customer's tier. */
1111
+ tier_id: string;
1112
+ /** The metrics for the customer. */
1113
+ metrics: MasivoCustomerMetrics;
1114
+ }
1115
+ /**
1116
+ * Represents the metrics for a Masivo customer.
1117
+ */
1118
+ interface MasivoCustomerMetrics {
1119
+ /** Metrics for the last month. */
1120
+ last_month: MetricPeriod;
1121
+ /** Metrics for the last quarter. */
1122
+ last_quarter: MetricPeriod;
1123
+ /** Metrics for the last semester */
1124
+ last_semester: MetricPeriod;
1125
+ /** Metrics for the last year. */
1126
+ last_year: MetricPeriod;
1127
+ /** Metrics for the lifetime of the customer. */
1128
+ lifetime: MetricPeriod;
1129
+ /** Metrics for this month */
1130
+ this_month: MetricPeriod;
1131
+ /** Metrics for this quarter */
1132
+ this_quarter: MetricPeriod;
1133
+ /** Metrics for this semester */
1134
+ this_semester: MetricPeriod;
1135
+ /** Metrics for this year */
1136
+ this_year: MetricPeriod;
1137
+ }
1138
+ /**
1139
+ * Represents the metrics for a specific period.
1140
+ */
1141
+ interface MetricPeriod {
1142
+ /** The start date of the period. */
1143
+ from: string;
1144
+ /** The date of the last visit within the period. */
1145
+ last_visit: string | null;
1146
+ /** The number of purchases made within the period. */
1147
+ number_of_purchases: number;
1148
+ /** The total amount spent within the period. */
1149
+ spend_total: number;
1150
+ /** The identifier for the tier during the period. */
1151
+ tier_id: string | null;
1152
+ /** The end date of the period. */
1153
+ to: string;
1154
+ }
1155
+ /**
1156
+ * Represents a Masivo Wallet.
1157
+ */
1158
+ interface MasivoWallet {
1159
+ /** The unique identifier of the wallet. */
1160
+ id: string;
1161
+ /** The unique identifier of the wallet owner. */
1162
+ owner_id: string;
1163
+ /** An array of wallet totals */
1164
+ totals: WalletTotal[];
1165
+ /** An array of wallet lines */
1166
+ lines: WalletLine[];
1167
+ }
1168
+ /**
1169
+ * Represents the total amount in a wallet along with reward details.
1170
+ */
1171
+ interface WalletTotal {
1172
+ /** The total amount in the wallet. */
1173
+ total: number;
1174
+ /** The unique identifier for the reward. */
1175
+ reward_id: string;
1176
+ /** The expiration date of the reward. */
1177
+ expiration_date: string;
1178
+ /** The reward details associated with the wallet. */
1179
+ reward: WalletReward;
1180
+ }
1181
+ /**
1182
+ * Represents a line item in a wallet.
1183
+ */
1184
+ interface WalletLine {
1185
+ /** The amount associated with the wallet line. */
1186
+ amount: number;
1187
+ /** The identifier for the reward. */
1188
+ reward_id: string;
1189
+ /** The identifier for the campaign. */
1190
+ campaign_id: string;
1191
+ /** The identifier for the brand, or null if not applicable. */
1192
+ brand_id: string;
1193
+ /** The date and time when the wallet line was issued. */
1194
+ issued_at: string;
1195
+ /** The date and time when the wallet line expires. */
1196
+ expiration_date: string;
1197
+ /** The optional date and time when the reservation expires. */
1198
+ reservation_expires_at?: string;
1199
+ /** The reward object containing detailed information */
1200
+ reward: WalletReward;
1201
+ }
1202
+ /**
1203
+ * Represents metadata information.
1204
+ */
1205
+ interface Metadata {
1206
+ }
1207
+ /**
1208
+ * Represents metadata information associated with Masivo.
1209
+ */
1210
+ interface Metadata {
1211
+ /** The coupon code associated with the metadata */
1212
+ coupon_code: string;
1213
+ }
1214
+ /**
1215
+ * Represents a reward in the wallet.
1216
+ */
1217
+ interface WalletReward {
1218
+ /** The unique identifier of the reward. */
1219
+ id: string;
1220
+ /** The identifier of the brand associated with the reward, or null if not applicable. */
1221
+ brand_id: string | null;
1222
+ /** The name of the reward. */
1223
+ name: string;
1224
+ /** A description of the reward. */
1225
+ description: string;
1226
+ /** The type of the reward. */
1227
+ type: MasivoRewardType;
1228
+ /** The conditions associated with the reward. */
1229
+ conditions: MasivoCondition[][];
1230
+ /** The attributes of the reward. */
1231
+ attributes: WalletAttribute;
1232
+ /** The media associated with the reward. */
1233
+ media: WalletMedia;
1234
+ /** The status of the reward. */
1235
+ status: string;
1236
+ /** Optional content associated with the reward. */
1237
+ content?: Objectify<MasivoTemplateContent>;
1238
+ /** Optional content associated with the reward */
1239
+ metadata?: Metadata;
1240
+ }
1241
+ /**
1242
+ * Enum representing the types of rewards that can be associated with a wallet.
1243
+ */
1244
+ type MasivoRewardType = "DISCOUNT" | "POINTS" | "GIFT_CARD" | "PRODUCT";
1245
+ /**
1246
+ * Represents the base structure for a Masivo condition.
1247
+ */
1248
+ interface MasivoConditionBase {
1249
+ /** The primitive value associated with the condition. */
1250
+ primitive: string;
1251
+ /** The type of the Masivo condition. */
1252
+ type: MasivoConditionType;
1253
+ /** The operator used in the condition */
1254
+ operator: MasivoOperator;
1255
+ /** An optional message indicating why the condition is invalid. */
1256
+ invalidMessage?: string;
1257
+ }
1258
+ /**
1259
+ * Type representing the conditions of rewards that can be associated with a wallet.
1260
+ */
1261
+ type MasivoConditionType = "Current date" | "Registration" | "Birthday" | "Customer number of purchases" | "Customer has made a purchase" | "Customer points balance" | "Customer spend total" | "Customer total spend" | "Ordered at store" | "Ordered in channel" | "Payment method" | "Order includes product" | "Order value" | "Order includes tag" | "Product includes tag" | "Shipping includes tag";
1262
+ type MasivoTransactionType = "CASH" | "DEBIT" | "CREDIT" | "BANK_TRANSFER";
1263
+ /**
1264
+ * Type representing the operators of rewards that can be associated with a wallet.
1265
+ */
1266
+ type MasivoOperator = "greater than" | "greater than or equal to" | "less than" | "less than or equal to" | "equal to" | "not equal to" | "is" | "is not" | "falls within period" | "occurred" | "occurred in the last" | "occurred more than";
1267
+ /**
1268
+ * Type representing the reporting periods for Masivo.
1269
+ */
1270
+ type MasivoReportingPeriod = "MONTHLY" | "QUARTERLY" | "YEARLY" | "SEMESTERLY";
1271
+ /**
1272
+ * Type representing the possible repeat intervals for a Masivo event.
1273
+ */
1274
+ type MasivoRepeatInterval = "NONE" | "DAILY" | "WEEKLY" | "FORTNIGHTLY" | "MONTHLY" | "WEEK_OF_MONTH";
1275
+ /**
1276
+ * Represents the attributes of a wallet in the system.
1277
+ */
1278
+ interface WalletAttribute {
1279
+ /** Conversion factor used to calculate the wallet value. */
1280
+ conversion_factor?: number;
1281
+ /** Value of the applied discount. */
1282
+ discount_value?: number;
1283
+ /** Type of discount, can be fixed or percentage. */
1284
+ discount_type?: "fixed" | "percentage";
1285
+ /** Type of action associated with the wallet, can be shipping, order, or product. */
1286
+ type?: "shipping" | "order" | "product";
1287
+ /** Reward action associated with the wallet. */
1288
+ action?: MasivoRewardAction;
1289
+ /** New amount assigned to the wallet. */
1290
+ new_amount?: number;
1291
+ /** ID of the new product associated with the wallet. */
1292
+ new_product_id?: string;
1293
+ /** Replacement amount assigned to the wallet. */
1294
+ replace_amount?: number;
1295
+ /** ID of the replacement product associated with the wallet. */
1296
+ replace_product_id?: string;
1297
+ /** The ID of the product associated with the reward */
1298
+ item_id?: string;
1299
+ }
1300
+ /**
1301
+ * Type representing the possible actions for Masivo rewards.
1302
+ */
1303
+ type MasivoRewardAction = "ADD_PRODUCT" | "REPLACE_PRODUCT";
1304
+ /**
1305
+ * Interface representing the media associated with a wallet.
1306
+ */
1307
+ interface WalletMedia {
1308
+ /** The URL of the thumbnail image. */
1309
+ thumbnail_url: string | null;
1310
+ /** The URL of the cover image. */
1311
+ cover_url: string | null;
1312
+ }
1313
+ /**
1314
+ * Represents the content of a Masivo template.
1315
+ */
1316
+ interface MasivoTemplateContent {
1317
+ /** The name of the template content. */
1318
+ name: string;
1319
+ /** The type of the template content */
1320
+ type: MasivoTemplateType;
1321
+ /** The value of the template content */
1322
+ value: string;
1323
+ }
1324
+ /**
1325
+ * Type representing the types of templates available for Masivo.
1326
+ */
1327
+ type MasivoTemplateType = "input" | "textarea";
1328
+ /**
1329
+ * Represents a tier in from Masivo.
1330
+ */
1331
+ interface MasivoTier {
1332
+ /** The unique identifier for the tier. */
1333
+ id: string;
1334
+ /** The name of the tier. */
1335
+ name: string;
1336
+ /** The current status of the tier. */
1337
+ status: string;
1338
+ /** The level of the tier. */
1339
+ level: number;
1340
+ /** A brief description of the tier. */
1341
+ description: string;
1342
+ /** The conditions required to enter the tier. */
1343
+ entry_conditions: MasivoCondition[][];
1344
+ /** The conditions required to exit the tier. */
1345
+ exit_conditions: MasivoCondition[][];
1346
+ /** The identifier for the template associated with the tier. */
1347
+ template_id?: string;
1348
+ /** The content of the template associated with the tier. */
1349
+ content?: Objectify<MasivoTemplateContent>;
1350
+ }
1351
+ interface MasivoBenefitAlerts extends Omit<Alert, "type"> {
1352
+ /** The type of alert */
1353
+ type: MasivoConditionType;
1354
+ }
1355
+ /**
1356
+ * Represents a redeemable benefit from Masivo in the wallet.
1357
+ */
1358
+ interface RedeemableBenefit extends WalletTotal {
1359
+ /**The identifier for the brand associated with the benefit */
1360
+ brand_id: string;
1361
+ /** The identifier for the campaign associated with the benefit */
1362
+ campaign_id: string;
1363
+ /** The date and time when the benefit was issued */
1364
+ issued_at: string;
1365
+ /** The amount of the benefit */
1366
+ amount: number;
1367
+ /** Alerts generated by the cart validation */
1368
+ alerts: MasivoBenefitAlerts[];
1369
+ }
1370
+ /**
1371
+ * Represents a masivo benefit payload to send to the Masivo API and redeem the benefit.
1372
+ */
1373
+ interface MasivoBenefitPayload {
1374
+ /** The unique identifier of the reward */
1375
+ reward_id: string;
1376
+ /** The amount of the benefit */
1377
+ amount: number;
1378
+ /** The total of the benefit */
1379
+ total: number;
1380
+ /** The identifier for the brand associated with the benefit */
1381
+ brand_id: string;
1382
+ /** The identifier for the campaign associated with the benefit */
1383
+ campaign_id: string;
1384
+ /** The date and time when the benefit was issued */
1385
+ issued_at: string;
1386
+ /** The date and time when the benefit expires */
1387
+ expiration_date: string;
1388
+ /** The reward in the wallet, see {@link WalletReward} */
1389
+ reward: WalletReward;
1390
+ }
1391
+ /**
1392
+ * Interface representing the conditions of a tier from Masivo.
1393
+ */
1394
+ interface MasivoCondition extends MasivoConditionBase {
1395
+ /** The reporting period for the condition. */
1396
+ reporting_period: MasivoReportingPeriod;
1397
+ /** The value associated with the condition. */
1398
+ value: string | `${string}/${string}`;
1399
+ /** The identifier for the reward associated with the condition. */
1400
+ reward_id?: string;
1401
+ /** Indicates if the condition is valid all day. */
1402
+ allDay?: boolean;
1403
+ /** The start date for the condition */
1404
+ startDate?: string;
1405
+ /** The end date for the condition */
1406
+ endDate?: string;
1407
+ /** The repeat interval for the condition */
1408
+ repeat?: MasivoRepeatInterval;
1409
+ }
1410
+ /**
1411
+ * Interface representing the conditions from Masivo.
1412
+ *
1413
+ * @interface MasivoCondition
1414
+ * @extends MasivoConditionBase see {@link MasivoConditionBase}
1415
+ */
1416
+ interface MasivoCondition extends MasivoConditionBase {
1417
+ /** The reporting period for the condition. */
1418
+ reporting_period: MasivoReportingPeriod;
1419
+ /** The value associated with the condition. */
1420
+ value: string | `${string}/${string}`;
1421
+ /** The identifier for the reward associated with the condition. */
1422
+ reward_id?: string;
1423
+ /** Indicates if the condition is valid all day. */
1424
+ allDay?: boolean;
1425
+ /** The start date for the condition */
1426
+ startDate?: string;
1427
+ /** The end date for the condition */
1428
+ endDate?: string;
1429
+ /** The repeat interval for the condition */
1430
+ repeat?: MasivoRepeatInterval;
1431
+ }
1432
+ /**
1433
+ * Configuration interface for validating Masivo conditions.
1434
+ */
1435
+ interface ValidateConditionConfig {
1436
+ /** Store information */
1437
+ store?: Store;
1438
+ /** Catalogue identifier */
1439
+ catalogueId?: Catalogue["catalogueId"];
1440
+ /** Payment method name identifier */
1441
+ paymentMethodName?: string;
1442
+ /** The current shopping cart */
1443
+ shoppingCart?: ShoppingCart;
1444
+ }
1445
+ /**
1446
+ * Interface representing a customer from Masivo
1447
+ */
1448
+ interface MasivoInfo {
1449
+ /** The customer associated with the loyalty program. */
1450
+ customer: MasivoCustomer;
1451
+ /** The wallet containing the loyalty points and rewards. */
1452
+ wallet: MasivoWallet;
1453
+ }
1454
+ /**
1455
+ * ExtendedLoyaltyInfo interface extends the LoyaltyInfo interface to include additional properties
1456
+ * related to loyalty accumulations and redemptions.
1457
+ *
1458
+ * @extends LoyaltyInfo see {@link MasivoInfo}
1459
+ */
1460
+ interface ExtendedLoyaltyInfo extends MasivoInfo {
1461
+ /** An array of loyalty accumulation records */
1462
+ accumulations: LoyaltyAccumulation[];
1463
+ /** An array of loyalty redemption records*/
1464
+ redemptions: unknown[];
1465
+ }
1466
+ /**
1467
+ * Interface representing the accumulations in a loyalty wallet.
1468
+ *
1469
+ * @extends WalletLine see {@link WalletLine}
1470
+ */
1471
+ interface LoyaltyAccumulation extends WalletLine {
1472
+ /** The reward associated with the accumulation */
1473
+ reward: WalletReward;
1474
+ }
1475
+ /**
1476
+ * Represents the summary of coupon codes.
1477
+ */
1478
+ interface CodesSummary {
1479
+ /** Array of coupon codes */
1480
+ codes: string[];
1481
+ /** Number of times coupon code has been redeemed */
1482
+ used: number;
1483
+ /** Number of times coupon code can be redeemed */
1484
+ left: number;
1485
+ /** Total number of uses for the coupon code */
1486
+ total: number;
1487
+ }
1488
+ /**
1489
+ * Represents the format configuration for a code generation system.
1490
+ */
1491
+ interface CodeFormat {
1492
+ /** Determines if the code should be case sensitive */
1493
+ case_sensitive: boolean;
1494
+ /** The template pattern for code generation */
1495
+ template: string;
1496
+ /** Characters that should not be included in the generated code */
1497
+ exclude_characters: string;
1498
+ /** Characters that must be included in the generated code */
1499
+ include_characters: string;
1500
+ }
1501
+ type MasivoCampaignAttributes = BehaviorCampaignAttributes | CouponCampaignAttributes;
1502
+ /**
1503
+ * Interface representing attributes for a behavior-based campaign
1504
+ */
1505
+ interface BehaviorCampaignAttributes {
1506
+ /** The trigger identifier for the campaign behavior */
1507
+ trigger: string;
1508
+ }
1509
+ /**
1510
+ * Interface representing the attributes of a coupon campaign
1511
+ */
1512
+ interface CouponCampaignAttributes {
1513
+ /** The format specification for coupon codes */
1514
+ code_format: CodeFormat;
1515
+ /** Array of valid coupon codes for the campaign */
1516
+ codes_summary: CodesSummary;
1517
+ /** Maximum number of times each code can be redeemed in total */
1518
+ max_redemptions_per_code: number;
1519
+ /** Maximum number of times each code can be redeemed by a single customer */
1520
+ max_redemptions_per_code_per_customer: number;
1521
+ }
1522
+ type BudgetDivision = "daily" | "weekly" | "monthly" | "total";
1523
+ type MasivoCampaignStatus = "RUNNING" | "PAUSED" | "SCHEDULED" | "FINISHED";
1524
+ type MasivoCampaignType = "COUPONS" | "BEHAVIOR";
1525
+ type MasivoLabels = "Punchcard" | "Paraguas" | "Kiosco" | "PickUp" | "Autorápido" | "Heladería" | "Restaurantes" | "Domicilio";
1526
+ /**
1527
+ * Represents a Masivo Campaign configuration.
1528
+ */
1529
+ interface MasivoCampaign {
1530
+ /** The attributes of the campaign */
1531
+ attributes: MasivoCampaignAttributes;
1532
+ /** Identifier of the associated brand */
1533
+ brand_id: string;
1534
+ /** The budget allocated for the campaign */
1535
+ budget: number;
1536
+ /** The content of the campaign */
1537
+ content: Objectify<MasivoTemplateContent>;
1538
+ /** A detailed description of the campaign */
1539
+ description: string;
1540
+ /** The division of the budget */
1541
+ divide_budget_in: BudgetDivision;
1542
+ /** The end date of the campaign, if applicable */
1543
+ end_date: string | null;
1544
+ /** The source of funding for the campaign, if specified */
1545
+ funded_by: string | null;
1546
+ /** Unique identifier for the campaign */
1547
+ id: string;
1548
+ /** Array of labels associated to filter the campaigns by */
1549
+ labels: MasivoLabels[];
1550
+ /** Additional metadata for the campaign */
1551
+ metadata: unknown;
1552
+ /** The name of the campaign */
1553
+ name: string;
1554
+ /** The rules governing the campaign */
1555
+ rules: MasivoCampaignRule[];
1556
+ /** The start date of the campaign */
1557
+ start_date: string;
1558
+ /** The current status of the campaign */
1559
+ status: MasivoCampaignStatus;
1560
+ /** Identifier of the template used for the campaign */
1561
+ template_id: string;
1562
+ /** The type of the campaign */
1563
+ type: MasivoCampaignType;
1564
+ }
1565
+ /**
1566
+ * Defines the structure for rules in a masivo campaign.
1567
+ */
1568
+ interface MasivoCampaignRule {
1569
+ /** A matrix of conditions that must be met for the campaign rules to apply */
1570
+ conditions: MasivoCondition[][];
1571
+ /** Array of effects to be applied when conditions are met */
1572
+ effects: MasivoEffect[];
1573
+ }
1574
+ /**
1575
+ * Represents the effect of a Masivo reward
1576
+ */
1577
+ interface MasivoEffect {
1578
+ /** The unique identifier of the reward */
1579
+ reward_id: string;
1580
+ /** The type of the reward */
1581
+ type: MasivoRewardType;
1582
+ /** The identifier of the tier this effect belongs to */
1583
+ tier_id: string;
1584
+ /** The reward object containing detailed information */
1585
+ reward: WalletReward;
1586
+ /** The date when the effect expires */
1587
+ expiration_date: string;
1588
+ /** The amount value of the effect */
1589
+ amount: number;
1590
+ /** The multiplier condition type */
1591
+ multiplier: MasivoEffectMultiplierType;
1592
+ }
1593
+ type MasivoEffectMultiplierType = Extract<MasivoConditionType, "Order value">;
1594
+
1595
+ /**
1596
+ * Wallet user information.
1597
+ *
1598
+ * @interface Wallet
1599
+ * @since 0.1.0
1600
+ */
1601
+ interface Wallet {
1602
+ /** {@link Benefit}'s array from firestore user wallet */
1603
+ benefits: Benefit[];
1604
+ }
1605
+ /**
1606
+ * Benefit information.
1607
+ *
1608
+ * @interface Benefit
1609
+ * @since 0.1.0
1610
+ */
1611
+ interface Benefit {
1612
+ /** The account id of the benefit */
1613
+ accountId: string;
1614
+ /** Cart benefit's alerts, see {@link Alert} */
1615
+ alerts: Alert[];
1616
+ /**
1617
+ * An array of benefit awards if the benefit is of `PRODUCT` type, and an
1618
+ * object if the benefit is of `ALTER_DELIVERY` or `DISCOUNT` type,
1619
+ * see {@link Award}
1620
+ * */
1621
+ award: Award | Award[];
1622
+ /** Benefit id */
1623
+ benefitId: string;
1624
+ /** Benefit wallet id */
1625
+ benefitWalletId: string;
1626
+ /** The channel id of the benefit */
1627
+ channelId: string;
1628
+ /** Benefit code in back-end */
1629
+ code: null;
1630
+ /** Combined */
1631
+ combined: string;
1632
+ /** Benefit creation date */
1633
+ createdAt: string;
1634
+ /** Benefit description */
1635
+ description: string;
1636
+ /** Benefit discount percentage */
1637
+ discountPercentage: number | null;
1638
+ /** Benefit discount fixed */
1639
+ discountFixed: string | null;
1640
+ /** Benefit expiration date */
1641
+ expirationDate: string;
1642
+ /** External benefit id */
1643
+ externalId: null;
1644
+ /** The user wallet id */
1645
+ hash: string;
1646
+ /** Benefit images, see {@link CDNImage} */
1647
+ image: CDNImage[];
1648
+ /** The award limit */
1649
+ limitAward: null;
1650
+ /** The benefit limit */
1651
+ limitBenefit: number;
1652
+ /** The logic operator of the benefit */
1653
+ logicOperator: string;
1654
+ /** Benefit stock */
1655
+ quantity: number;
1656
+ /** The rules of the benefit */
1657
+ rules: any[];
1658
+ /** The benefit title */
1659
+ title: string;
1660
+ /** Benefit type, see {@link BenefitTypes} */
1661
+ type: BenefitTypes;
1662
+ /** Benefit update date */
1663
+ updatedAt: string;
1664
+ /** The vendor id of the benefit */
1665
+ vendorId: Vendor["id"];
1666
+ /** Benefit vendor name */
1667
+ vendorName?: Vendor["name"];
1668
+ }
1669
+ /**
1670
+ * Award information.
1671
+ *
1672
+ * @interface Award
1673
+ * @since 0.1.0
1674
+ */
1675
+ interface Award {
1676
+ /** The id of the award */
1677
+ id: string;
1678
+ /** The id of the benefit */
1679
+ benefitId: string;
1680
+ /** Benefit discount percentage */
1681
+ discountPercentage: number;
1682
+ /** Benefit discount value */
1683
+ discountValue: null;
1684
+ /** Quantity of allowed products */
1685
+ amount: number;
1686
+ /** Product description associated with the benefit award */
1687
+ productDescription: string;
1688
+ /** Product unique identifier associated with the benefit award */
1689
+ productId: string;
1690
+ /** The vendor id of the award */
1691
+ vendorId: Vendor["id"];
1692
+ }
1693
+ /**
1694
+ * Applied benefit array in shopping cart.
1695
+ *
1696
+ * @typedef ShoppingCartBenefits
1697
+ * @since 0.1.0
1698
+ */
1699
+ type ShoppingCartBenefits = Benefit[] | RedeemableBenefit[];
1700
+ /**
1701
+ * The possible values of the benefit type.
1702
+ *
1703
+ * @typedef BenefitTypes
1704
+ * @since 0.1.0
1705
+ */
1706
+ type BenefitTypes = "ALTER_DELIVERY" | "PRODUCT" | "DISCOUNT_FIXED" | "DISCOUNT_PERCENTAGE";
1707
+ /**
1708
+ * Redeemed coupon related data.
1709
+ *
1710
+ * @interface RedeemCouponData
1711
+ * @since 0.1.0
1712
+ */
1713
+ interface BenefitData {
1714
+ /** Benefit account unique identifier */
1715
+ account_id: string;
1716
+ /** Benefit data amount */
1717
+ amount: number | null;
1718
+ /** Indicates if the benefit is redeemed automatically */
1719
+ automatic_redeemed: string;
1720
+ /** Benefit code */
1721
+ code: string | null;
1722
+ /** Indicates if the benefit is combined or not */
1723
+ combined: string;
1724
+ /** Benefit days */
1725
+ days: null;
1726
+ /** Benefit description */
1727
+ description: string;
1728
+ /** Benefit discount percentage */
1729
+ discount_percentage: number;
1730
+ /** Benefit end date */
1731
+ end_date: string;
1732
+ /** Benefit error validation */
1733
+ error_validation: string;
1734
+ /** Benefit expired date */
1735
+ expiration_date: string;
1736
+ /** Benefit external id */
1737
+ external_id: string | null;
1738
+ /** Benefit data unique identifier */
1739
+ id: string;
1740
+ /** Benefit image */
1741
+ image: null;
1742
+ /** Benefit instruction */
1743
+ instruction: null;
1744
+ /** Benefit award limit */
1745
+ limit_award: null;
1746
+ /** Benefit limit */
1747
+ limit_benefit: number;
1748
+ /** Benefit logic operator */
1749
+ logic_operator: string;
1750
+ /** Benefit name */
1751
+ name: string;
1752
+ /** Benefit quantity */
1753
+ quantity: number;
1754
+ /** An array of coupon products, see {@link BenefitData} */
1755
+ products: ProductCoupon[];
1756
+ /** Array of benefit rules */
1757
+ rules: any[];
1758
+ /** Benefit spend */
1759
+ spend: number;
1760
+ /** Benefit start date */
1761
+ start_date: string;
1762
+ /** Benefit status */
1763
+ status: string;
1764
+ /** Benefit stock */
1765
+ stock: number;
1766
+ /** Benefit success message */
1767
+ success_message: string;
1768
+ /** Benefit term and condition */
1769
+ term_and_condition: string;
1770
+ /** Benefit type */
1771
+ type: string;
1772
+ /** Benefit type alias */
1773
+ type_alias: string;
1774
+ /** Benefit unit */
1775
+ unit: null;
1776
+ /** Coupon vendor unique identifier */
1777
+ vendor_id: Vendor["id"];
1778
+ /** Coupon vendor name */
1779
+ vendor_name?: Vendor["name"];
1780
+ }
1781
+ /**
1782
+ * Product coupon associated with a benefit.
1783
+ *
1784
+ * @interface ProductCoupon
1785
+ * @since 0.1.0
1786
+ */
1787
+ interface ProductCoupon {
1788
+ /** Product coupon amount */
1789
+ amount: number;
1790
+ /** Product coupon benefit unique identifier */
1791
+ benefitId: string;
1792
+ /** Product coupon discount percentage */
1793
+ discountPercentage: number;
1794
+ /** Product coupon discount */
1795
+ discountValue: number | null;
1796
+ /** Product coupon id */
1797
+ id: string;
1798
+ /** Product description */
1799
+ productDescription: string | null;
1800
+ /** Product unique identifier */
1801
+ productId: string | null;
1802
+ /** Coupon swap product unique identifier */
1803
+ swapProductId: null;
1804
+ /** Coupon vendor unique identifier */
1805
+ vendorId: Vendor["id"];
1806
+ }
1807
+ /**
1808
+ * Representation of a store coupon.
1809
+ *
1810
+ * @interface StoreCoupon
1811
+ * @since 0.1.0
1812
+ */
1813
+ interface StoreCoupon {
1814
+ /** An array of coupons, see {@link Coupon} */
1815
+ coupons: Coupon[];
1816
+ /** Whether or not the store coupon is featured */
1817
+ featured: boolean;
1818
+ /** Store coupon unique identifier */
1819
+ id: string;
1820
+ /** Store coupon name */
1821
+ name: string;
1822
+ /** Store coupon vendor unique identifier */
1823
+ vendor_id: Vendor["id"];
1824
+ }
1825
+ /**
1826
+ * Representation of a coupon associated to the store.
1827
+ *
1828
+ * @interface Coupon
1829
+ * @since 0.1.0
1830
+ */
1831
+ interface Coupon {
1832
+ /**
1833
+ * An array of benefits associated with the coupon,
1834
+ * see {@link BenefitData}
1835
+ */
1836
+ benefits: BenefitData[];
1837
+ /** Coupon category, see {@link CouponCategory} */
1838
+ category: CouponCategory;
1839
+ /** An array of codes associated with the coupon, see {@link Code} */
1840
+ codes: Code[];
1841
+ /** Coupon end date */
1842
+ end_date: string;
1843
+ /** Coupon unique identifier */
1844
+ id: string;
1845
+ /** Coupon image */
1846
+ image: URLImage | null;
1847
+ /** Coupon name */
1848
+ name: string;
1849
+ /** Whether or not the coupon is exclusive to one store */
1850
+ only_store: boolean;
1851
+ /** Coupon spend quantity */
1852
+ spend: number;
1853
+ /** Coupon start date */
1854
+ start_date: string;
1855
+ /** Coupon status, see {@link ProductStatus} */
1856
+ status: ProductStatus;
1857
+ /** Coupon stock */
1858
+ stock: number;
1859
+ /** Coupon term and condition */
1860
+ term_and_condition: string;
1861
+ /** Coupon text */
1862
+ text: string;
1863
+ /** Coupon type, see {@link CouponType} */
1864
+ type: CouponType;
1865
+ /** Coupon vendor unique identifier */
1866
+ vendor_id: Vendor["id"];
1867
+ }
1868
+ /**
1869
+ * The possible values of a coupon type.
1870
+ *
1871
+ * @typedef CouponType
1872
+ * @since 0.1.0
1873
+ */
1874
+ type CouponType = "COUPON" | "MIX";
1875
+ /**
1876
+ * Coupon category object associated with a store coupon.
1877
+ *
1878
+ * @interface CouponCategory
1879
+ * @since 0.1.0
1880
+ */
1881
+ interface CouponCategory {
1882
+ /** Whether or not the store coupon category is featured */
1883
+ featured: boolean;
1884
+ /** Coupon category unique identifier */
1885
+ id: string;
1886
+ /** Coupon category name */
1887
+ name: string;
1888
+ }
1889
+ /**
1890
+ * Code object associated with a coupon.
1891
+ *
1892
+ * @interface Code
1893
+ * @since 0.1.0
1894
+ */
1895
+ interface Code {
1896
+ /** The code associated with the coupon */
1897
+ code: string;
1898
+ /** Coupon code unique identifier */
1899
+ coupon_id: string;
1900
+ /** Code unique identifier */
1901
+ id: string;
1902
+ /** The token corresponding to a QR code */
1903
+ jwt: Token | null;
1904
+ /** The status of the code, see {@link ProductStatus} */
1905
+ status: ProductStatus;
1906
+ /** Whether or not the code has been used */
1907
+ used: boolean;
1908
+ }
1909
+ /**
1910
+ * An object which contains the token corresponding to a QR code.
1911
+ *
1912
+ * @interface Token
1913
+ * @since 0.1.0
1914
+ */
1915
+ interface Token {
1916
+ /** Token associated with the coupon code */
1917
+ token: string;
1918
+ /** Coupon QR code expiration time */
1919
+ dif: number;
1920
+ /** Coupon expiration date */
1921
+ exp: number;
1922
+ /** Coupon international atomic time */
1923
+ iat: number;
1924
+ }
1925
+ /**
1926
+ * Representation of a store coupon detail, omits the coupon category.
1927
+ *
1928
+ * @interface StoreCouponDetail
1929
+ * @since 0.1.0
1930
+ * @extends {{@link Coupon}
1931
+ */
1932
+ interface StoreCouponDetail extends Omit<Coupon, "category"> {
1933
+ }
1934
+
1935
+ /**
1936
+ * Representation of a Commerce Banner.
1937
+ *
1938
+ * @interface Banner
1939
+ * @since 0.1.0
1940
+ */
1941
+ interface Banner<T extends AdditionalInfo = AdditionalInfo> {
1942
+ /** Banner category id */
1943
+ banner_category_id: string;
1944
+ /** Banner description */
1945
+ banner_description: string;
1946
+ /** Banner qr code */
1947
+ banner_qr_code: string;
1948
+ /** Banner title */
1949
+ banner_title: string;
1950
+ /** Banner type, see {@link BannerType} */
1951
+ banner_type: BannerType;
1952
+ /** Banner image url */
1953
+ banner_url: string | null;
1954
+ /** Banner's benefits */
1955
+ benefits: BannerBenefits[] | null;
1956
+ /** Banner category id */
1957
+ category_id: string | null;
1958
+ /** Banner category name */
1959
+ category_name: string | null;
1960
+ /** Banner channel's id */
1961
+ channel_id: string | null;
1962
+ /** Banner coupon's code */
1963
+ coupon: BannerCoupon | null;
1964
+ /** Banner coupon's id */
1965
+ coupon_id: string | null;
1966
+ /** The bucket where the image is saved */
1967
+ image_bucket: string | null;
1968
+ /** he cloud where the banner is saved, see {@link CDNImage} */
1969
+ image_cloud_front_url: CDNImage["cloudFrontUrl"];
1970
+ /** Banner image's filename */
1971
+ image_file_name: string;
1972
+ /** The directory where the banner image is saved */
1973
+ image_key: string;
1974
+ /** The url where the banner image is saved */
1975
+ image_url: string;
1976
+ /** An array of banner images, see {@link BannerImage} */
1977
+ images: BannerImage[];
1978
+ /** Banner product's id */
1979
+ product_id: string | null;
1980
+ /** Banner product's name */
1981
+ product_name: string | null;
1982
+ /** Banner's section */
1983
+ section: null;
1984
+ /** Banner's scope, see {@link BannerScope} */
1985
+ scope: BannerScope;
1986
+ /** Banner stores array */
1987
+ stores: unknown[];
1988
+ /** Banner vendor's id */
1989
+ vendor_id: string;
1990
+ /** Banner vendor's name */
1991
+ vendor_name: string;
1992
+ /** Banner additional info */
1993
+ additionalInfo?: T;
1994
+ }
1995
+ /**
1996
+ * The possible values of the banner's type.
1997
+ *
1998
+ * @typedef BannerType
1999
+ * @since 0.1.0
2000
+ */
2001
+ type BannerType = "INFO" | "URL" | "PRODUCT" | "COUPON" | "COUPON_QR" | "CATEGORY" | "SECTION";
2002
+ /**
2003
+ * The possible values of the banner's scope.
2004
+ *
2005
+ * @typedef BannerScope
2006
+ * @since 0.1.0
2007
+ */
2008
+ type BannerScope = "WEB" | "GLOBAL" | "APP";
2009
+ /**
2010
+ * Representation of a Banner image.
2011
+ *
2012
+ * @interface BannerImage
2013
+ * @since 0.1.0
2014
+ */
2015
+ interface BannerImage {
2016
+ /** Banner's id */
2017
+ id: string;
2018
+ /** Banner image's filename */
2019
+ file_name: string;
2020
+ /** Banner image's filename */
2021
+ image_file_name: string;
2022
+ /** Banner image's directory */
2023
+ image_key: string;
2024
+ /** The url where the banner image is saved */
2025
+ image_url: string;
2026
+ /** Banner's position inside the banner images array */
2027
+ position: number;
2028
+ /** The url where the banner image is saved */
2029
+ url: string;
2030
+ }
2031
+ /**
2032
+ * Representation of a Banner benefits.
2033
+ *
2034
+ * @interface BannerBenefits
2035
+ * @since 0.1.0
2036
+ */
2037
+ interface BannerBenefits {
2038
+ id: string;
2039
+ name: string;
2040
+ }
2041
+ /**
2042
+ * Representation of a Banner coupon.
2043
+ *
2044
+ * @interface BannerCoupon
2045
+ * @since 0.1.0
2046
+ */
2047
+ interface BannerCoupon {
2048
+ name: string;
2049
+ only_store: boolean;
2050
+ coupon_type: CouponType;
2051
+ }
2052
+
2053
+ /**
2054
+ * Representation of a Commerce Billing Data.
2055
+ *
2056
+ * @interface BillingData
2057
+ * @since 0.1.0
2058
+ */
2059
+ interface BaseBillingData<T extends AdditionalInfo = AdditionalInfo> {
2060
+ /** Billing's nickname */
2061
+ nickname: string;
2062
+ /** Billing's associated user complete name */
2063
+ name: string;
2064
+ /** Billing's associated document type, see {@link DocumentType} */
2065
+ documentType: DocumentType;
2066
+ /** Billing's associated document */
2067
+ document: string;
2068
+ /** Billing's associated user address */
2069
+ address: string;
2070
+ /** Billing's associated user phone without country calling code */
2071
+ phone: string;
2072
+ /** Billing's associated user email */
2073
+ email: string;
2074
+ /** Whether or not the billing is default */
2075
+ default: boolean;
2076
+ /** It contains country id and country name, see {@link CountrySummary} */
2077
+ country: CountrySummary;
2078
+ /** Additional billing information */
2079
+ additionalInfo?: T;
2080
+ }
2081
+ /**
2082
+ * Representation of a billing data saved on a database.
2083
+ *
2084
+ * @interface BillingData
2085
+ * @since 0.1.0
2086
+ * @extends {{@link BaseBillingData}
2087
+ */
2088
+ interface BillingData<T extends AdditionalInfo = AdditionalInfo> extends BaseBillingData<T> {
2089
+ /** Billing's auto generated id */
2090
+ id: string;
2091
+ }
2092
+
2093
+ /**
2094
+ * Artisn's supported currency codes.
2095
+ *
2096
+ * @typedef CurrencyCodes
2097
+ * @since 0.1.0
2098
+ */
2099
+ type CurrencyCodes = "USD" | "ARS" | "COP" | "CLP" | "VES";
2100
+
2101
+ /**
2102
+ * Fulfillment workflow.
2103
+ *
2104
+ * @interface Workflow
2105
+ * @since 0.5.15
2106
+ */
2107
+ interface Workflow<T extends AdditionalInfo = AdditionalInfo> {
2108
+ /** Workflow description */
2109
+ description: string;
2110
+ /** Workflow unique identifier */
2111
+ id: string;
2112
+ /** Workflow name */
2113
+ name: string;
2114
+ /** An array of workflow steps, see {@link StepWorkflow} */
2115
+ steps: StepWorkflow[];
2116
+ /** An array of webhook workflows, see {@link WebhookWorkflow} */
2117
+ webhooks: WebhookWorkflow[];
2118
+ /** Workflow additional info */
2119
+ additionalInfo?: T;
2120
+ }
2121
+ /**
2122
+ * The possible values of the step category.
2123
+ *
2124
+ * @typedef StepCategory
2125
+ * @since 0.5.15
2126
+ */
2127
+ type StepCategory = "TO_DO" | "PAYMENT_IN_PROGRESS" | "IN_PROGRESS" | "DONE";
2128
+ /**
2129
+ * The possible values of the step code.
2130
+ *
2131
+ * @typedef StepCode
2132
+ * @since 0.5.15
2133
+ */
2134
+ type StepCode = "START" | "IN_PROGRESS" | "ORDERED" | "RECEIVED" | "TO_ASSIGN" | "ASSIGNED" | "ON_ROUTE" | "DISPATCHED" | "CANCELED" | "ERROR";
2135
+ /**
2136
+ * The notification associated with the step.
2137
+ *
2138
+ * @interface StepNotification
2139
+ * @since 0.5.15
2140
+ */
2141
+ interface StepNotification {
2142
+ /** Whether or not to send mail when reaching this step */
2143
+ send_mail: boolean;
2144
+ /** Whether or not to send push when reaching this step */
2145
+ send_push: boolean;
2146
+ }
2147
+ /**
2148
+ * The step where the workflow is located.
2149
+ *
2150
+ * @interface StepWorkflow
2151
+ * @since 0.5.15
2152
+ */
2153
+ interface StepWorkflow {
2154
+ /** Step workflow additional info, see {@link StepWorkflowAdditionalInfo} */
2155
+ additional_info: StepWorkflowAdditionalInfo;
2156
+ /** Step workflow category, , see {@link StepCategory} */
2157
+ category: StepCategory;
2158
+ /** Step workflow code, , see {@link StepCode} */
2159
+ code: StepCode;
2160
+ /** Step workflow color */
2161
+ color: string;
2162
+ /** Step workflow description */
2163
+ description: string;
2164
+ /** Step workflow description to use on front end */
2165
+ description_frontend: string | null;
2166
+ /** Step workflow id */
2167
+ id: string;
2168
+ /** Step workflow name */
2169
+ name: string;
2170
+ /** Step workflow subtitle to use on front end */
2171
+ subtitle_frontend: string | null;
2172
+ /** Step workflow title to use on front end */
2173
+ title_frontend: string | null;
2174
+ /** Step workflow transitions, see {@link TransitionWorkflow} */
2175
+ transitions: TransitionWorkflow[];
2176
+ /** Step notification, see {@link StepNotification} */
2177
+ notification: StepNotification;
2178
+ }
2179
+ /**
2180
+ * Step workflow additional info.
2181
+ *
2182
+ * @interface StepWorkflowAdditionalInfo
2183
+ * @since 0.5.15
2184
+ */
2185
+ interface StepWorkflowAdditionalInfo {
2186
+ /** Whether or not to use the step workflow client on front end */
2187
+ client_frontend: boolean;
2188
+ /** Step workflow group, see {@link StepWorkflowGroup} */
2189
+ group: StepWorkflowGroup;
2190
+ /** Whether or not to use the step workflow operators to use on front end */
2191
+ operators_frontend: boolean;
2192
+ }
2193
+ /**
2194
+ * Step workflow group.
2195
+ *
2196
+ * @interface StepWorkflowGroup
2197
+ * @since 0.5.15
2198
+ */
2199
+ interface StepWorkflowGroup {
2200
+ /** Group code, see {@link StepCode} */
2201
+ code: StepCode;
2202
+ /** Group description */
2203
+ description: string;
2204
+ /** Group type */
2205
+ type: "default";
2206
+ /** Group weight */
2207
+ weight: string;
2208
+ }
2209
+ /**
2210
+ * The possible transitions of the workflow.
2211
+ *
2212
+ * @interface TransitionWorkflow
2213
+ * @since 0.5.15
2214
+ */
2215
+ interface TransitionWorkflow {
2216
+ /** Channel unique identifier */
2217
+ channel_id: string;
2218
+ /** Transition workflow conditions */
2219
+ conditions: any[];
2220
+ /** Transition workflow description */
2221
+ description: string;
2222
+ /** The step id where the transition comes from */
2223
+ from_step_id: string;
2224
+ /** Transition workflow unique identifier */
2225
+ id: string;
2226
+ /** Transition workflow name */
2227
+ name: string;
2228
+ /** The step id where the transition can go */
2229
+ to_step_id: string;
2230
+ /** Vendor unique identifier */
2231
+ vendor_id: string;
2232
+ }
2233
+ /**
2234
+ * Workflow webhook.
2235
+ *
2236
+ * @interface WebhookWorkflow
2237
+ * @since 0.5.15
2238
+ */
2239
+ interface WebhookWorkflow {
2240
+ /** Webhook workflow unique identifier */
2241
+ id: string;
2242
+ /** Webhook workflow method type */
2243
+ method: string;
2244
+ /** Webhook workflow url */
2245
+ url: string;
2246
+ }
2247
+ /**
2248
+ * Representation of a Issue object.
2249
+ *
2250
+ * @interface Issue
2251
+ * @since 0.5.15
2252
+ */
2253
+ interface IssueAdditionalInfo {
2254
+ /** User unique identifier */
2255
+ uid: string;
2256
+ /** Array of stores id */
2257
+ stores: number[];
2258
+ }
2259
+ /**
2260
+ * Representation of a Issue history.
2261
+ *
2262
+ * @interface Issue
2263
+ * @since 0.5.15
2264
+ */
2265
+ interface IssueHistory {
2266
+ /** History unique identifier */
2267
+ id: string;
2268
+ /** Transition unique identifier */
2269
+ transition_id: string;
2270
+ /** Step unique identifier */
2271
+ step_id: string;
2272
+ /** Step name */
2273
+ step_name: string;
2274
+ /** History additional info, see {@link IssueAdditionalInfo} */
2275
+ additional_info: IssueAdditionalInfo;
2276
+ /** History conditions */
2277
+ conditions: any[];
2278
+ /** History creation Date */
2279
+ created_at: string;
2280
+ /** History finished Date */
2281
+ finished_at: string;
2282
+ }
2283
+ /**
2284
+ * Representation of a Issue object.
2285
+ *
2286
+ * @interface Issue
2287
+ * @since 0.5.15
2288
+ */
2289
+ interface Issue {
2290
+ /** Issue unique identifier */
2291
+ id: string;
2292
+ /** Client issue unique identifier */
2293
+ client_issue_id: string;
2294
+ /** Workflow unique identifier */
2295
+ workflow_id: string;
2296
+ /** Parent issue unique identifier */
2297
+ parent_issue_id: null;
2298
+ /** Related issue unique identifier */
2299
+ related_issue_id: null;
2300
+ /** Step unique identifier */
2301
+ step_id: string;
2302
+ /** The step where the issue is located */
2303
+ step: StepWorkflow;
2304
+ /** Account unique identifier */
2305
+ account_id: string;
2306
+ /** Vendor unique identifier */
2307
+ vendor_id: string;
2308
+ /** Children issues */
2309
+ children: any[];
2310
+ /** Related issues */
2311
+ related: any[];
2312
+ /** Issue conditions */
2313
+ conditions: any[];
2314
+ /** Issue additional info, see {@link IssueAdditionalInfo} */
2315
+ additional_info: IssueAdditionalInfo;
2316
+ /** Issue history, see {@link IssueHistory} */
2317
+ history: IssueHistory[];
2318
+ /** Transaction unique identifier */
2319
+ transaction_id: string | null;
2320
+ }
2321
+
2322
+ /**
2323
+ * Representation of a Artisn request.
2324
+ *
2325
+ * @interface ArtisnRequest
2326
+ * @since 0.1.0
2327
+ */
2328
+ interface ArtisnRequest {
2329
+ /** Request's url */
2330
+ url: string;
2331
+ /** Request's headers, see {@link ArtisnRequestHeaders} */
2332
+ headers: ArtisnRequestHeaders;
2333
+ /** Request's body, see {@link ArtisnRequestBody} */
2334
+ body: ArtisnRequestBody;
2335
+ /** Request's query, see {@link ArtisnQuery} */
2336
+ query: ArtisnQuery;
2337
+ /** Request's params, see {@link ArtisnParams} */
2338
+ params: ArtisnParams;
2339
+ /** Request's method, see {@link ArtisnRequestMethod} */
2340
+ method?: ArtisnRequestMethod;
2341
+ }
2342
+ /**
2343
+ * Artisn request headers based on the fetch API.
2344
+ *
2345
+ * @typedef ArtisnRequestHeaders
2346
+ * @since 0.1.0
2347
+ */
2348
+ type ArtisnRequestHeaders = Headers;
2349
+ /**
2350
+ * Allowed methods for requests.
2351
+ *
2352
+ * @typedef ArtisnRequestMethod
2353
+ * @since 0.1.0
2354
+ */
2355
+ type ArtisnRequestMethod = "POST" | "GET" | "PUT" | "DELETE" | "PATCH";
2356
+ /**
2357
+ * Artisn request's body.
2358
+ *
2359
+ * @interface ArtisnRequestBody
2360
+ * @since 0.1.0
2361
+ * @property {any} [key:string] Object with key-value pairs
2362
+ */
2363
+ interface ArtisnRequestBody {
2364
+ [key: string]: any;
2365
+ }
2366
+ /**
2367
+ * Artisn request's body.
2368
+ *
2369
+ * @interface ArtisnQuery
2370
+ * @since 0.1.0
2371
+ * @property {string | number | boolean} [key:string] Object with key-value pairs
2372
+ */
2373
+ interface ArtisnQuery {
2374
+ [key: string]: string | number | boolean;
2375
+ }
2376
+ /**
2377
+ * Artisn request's params.
2378
+ *
2379
+ * @interface ArtisnParams
2380
+ * @since 0.1.0
2381
+ * @property {string | number} [key:string] Object with key-value pairs
2382
+ */
2383
+ interface ArtisnParams {
2384
+ [key: string]: string | number;
2385
+ }
2386
+
2387
+ /**
2388
+ * Representation of a living place base object.
2389
+ *
2390
+ * @interface BaseLivingPlace
2391
+ * @since 0.1.0
2392
+ */
2393
+ interface BaseLivingPlace {
2394
+ /** Living place's id */
2395
+ id: string;
2396
+ }
2397
+ /**
2398
+ * Representation of a living place.
2399
+ *
2400
+ * @interface LivingPlace
2401
+ * @since 0.1.0
2402
+ * @extends {{@link BaseLivingPlace}
2403
+ */
2404
+ interface LivingPlace extends BaseLivingPlace {
2405
+ /** Living place's name */
2406
+ name: string;
2407
+ /** Whether or not the living place is active */
2408
+ active: number;
2409
+ /** Country unique identifier */
2410
+ countryId: string;
2411
+ /** Array of fields required to save a living place, see {@link Field} */
2412
+ fields: Field[];
2413
+ }
2414
+ /**
2415
+ * Representation of a living place which will be saved.
2416
+ *
2417
+ * @interface LivingPlaceToSave
2418
+ * @since 0.1.0
2419
+ * @extends {{@link BaseLivingPlace}
2420
+ */
2421
+ interface LivingPlaceToSave extends BaseLivingPlace {
2422
+ /** Array of fields to be saved, see {@link FieldRecord} */
2423
+ fields: FieldRecord[];
2424
+ }
2425
+ /**
2426
+ * Representation of a field object.
2427
+ *
2428
+ * @interface Field
2429
+ * @since 0.1.0
2430
+ */
2431
+ interface Field {
2432
+ /** Field's id */
2433
+ id: string;
2434
+ /** Field's label */
2435
+ label: string;
2436
+ /** Field's rules, see {@link Rules} */
2437
+ rules: Rule;
2438
+ /** Field's messages based on rules, see {@link Messages} */
2439
+ messages: Message;
2440
+ /** Field's value */
2441
+ value?: string;
2442
+ }
2443
+ /**
2444
+ * Representation of a field record.
2445
+ *
2446
+ * @interface FieldRecord
2447
+ * @since 0.1.0
2448
+ */
2449
+ interface FieldRecord {
2450
+ /** Field record's id */
2451
+ id: string;
2452
+ /** Field record's value */
2453
+ value: string;
2454
+ }
2455
+ /**
2456
+ * Messages for living places.
2457
+ *
2458
+ * @interface Message
2459
+ * @since 0.1.0
2460
+ */
2461
+ interface Message {
2462
+ /** The maximum number's message of allowed living places */
2463
+ max: string;
2464
+ /** The minimum number's message of allowed living places */
2465
+ min: string;
2466
+ }
2467
+ /**
2468
+ * Rules for living places.
2469
+ *
2470
+ * @interface Rule
2471
+ * @since 0.1.0
2472
+ */
2473
+ interface Rule {
2474
+ /** The maximum number of allowed living places */
2475
+ max: number;
2476
+ /** The minimum number of allowed living places */
2477
+ min: number;
2478
+ }
2479
+
2480
+ /**
2481
+ * Representation of a basic Shipping Address.
2482
+ *
2483
+ * @interface BaseShippingAddress
2484
+ * @since 0.1.0
2485
+ */
2486
+ interface BaseShippingAddress<T extends AdditionalInfo = AdditionalInfo> {
2487
+ /** Whether or not the shipping address is default */
2488
+ default: boolean;
2489
+ /** Shipping address' latitude */
2490
+ lat: number;
2491
+ /** Shipping address' longitude */
2492
+ lng: number;
2493
+ /** Shipping address' reference */
2494
+ reference: string;
2495
+ /** Shipping address' main street */
2496
+ mainStreet: string;
2497
+ /** Shipping address' living place number */
2498
+ number: string;
2499
+ /** Shipping address' secondary street */
2500
+ secondaryStreet: string;
2501
+ /** It contains country id and country name, see {@link CountrySummary} */
2502
+ country: CountrySummary;
2503
+ /** Shipping address' update date */
2504
+ updatedAt?: string;
2505
+ /** Shipping address' creation date */
2506
+ createdAt: string;
2507
+ /** Shipping address' nickname */
2508
+ nickname: string;
2509
+ /** Shipping address' number contact address */
2510
+ numberContactAddress: string;
2511
+ /** Shipping address additional info */
2512
+ additionalInfo?: T;
2513
+ }
2514
+ /**
2515
+ * Representation of a Commerce Shipping Address.
2516
+ *
2517
+ * @template T Shipping address additional info
2518
+ * @interface ShippingAddress
2519
+ * @since 0.1.0
2520
+ * @extends {{@link BaseShippingAddress}
2521
+ */
2522
+ interface ShippingAddress<T extends AdditionalInfo = AdditionalInfo> extends BaseShippingAddress<T> {
2523
+ /** Shipping address unique identifier */
2524
+ id: string;
2525
+ /** Object which contains the living place, see {@link LivingPlace} */
2526
+ livingPlace: LivingPlace;
2527
+ }
2528
+ /**
2529
+ * A shipping address object used when it needs to be created.
2530
+ *
2531
+ * @template T Shipping address additional info
2532
+ * @interface NewShippingAddress
2533
+ * @since 0.1.0
2534
+ * @extends {{@link BaseShippingAddress}
2535
+ */
2536
+ interface NewShippingAddress<T extends AdditionalInfo = AdditionalInfo> extends BaseShippingAddress<T> {
2537
+ /** Shipping address unique identifier */
2538
+ id?: number;
2539
+ /**
2540
+ * Object which contains the living place to save,
2541
+ * see {@link LivingPlaceToSave}
2542
+ */
2543
+ livingPlace: LivingPlaceToSave;
2544
+ }
2545
+ /**
2546
+ * A shipping address object used when it needs to be updated.
2547
+ *
2548
+ * @template T Shipping address additional info
2549
+ * @interface UpdatedShippingAddress
2550
+ * @since 0.1.0
2551
+ * @extends {{@link BaseShippingAddress}
2552
+ */
2553
+ interface UpdatedShippingAddress<T extends AdditionalInfo = AdditionalInfo> extends BaseShippingAddress<T> {
2554
+ /** Shipping address unique identifier */
2555
+ id: string;
2556
+ /**
2557
+ * Object which contains the living place to update,
2558
+ * see {@link LivingPlaceToSave}
2559
+ */
2560
+ livingPlace: LivingPlaceToSave;
2561
+ }
2562
+
2563
+ /**
2564
+ * Representation of a Commerce User.
2565
+ *
2566
+ * @interface BaseUser
2567
+ * @template T User additional info
2568
+ * @since 0.1.0
2569
+ */
2570
+ interface BaseUser<T extends AdditionalInfo = AdditionalInfo> {
2571
+ /** User's unique identifier */
2572
+ uid: string;
2573
+ /** User's first name */
2574
+ name: string;
2575
+ /** User's middle name */
2576
+ middleName?: string;
2577
+ /** User's last name */
2578
+ lastname: string;
2579
+ /** User's second surname */
2580
+ secondLastname?: string;
2581
+ /** User's email */
2582
+ email: string;
2583
+ /** User's birthdate, e.g: 1991-05-02 */
2584
+ birthdate?: string;
2585
+ /** The vendor which the user was created */
2586
+ vendorId?: Vendor["id"];
2587
+ /** The platform where the user was generated */
2588
+ origin?: string;
2589
+ /** User's document */
2590
+ document?: string;
2591
+ /**User's document type, see {@link DocumentType} */
2592
+ documentType?: DocumentType;
2593
+ /** User's gender, see {@link Gender} */
2594
+ gender?: Gender;
2595
+ /** User's country object, see {@link UserCountry} */
2596
+ country: UserCountry;
2597
+ /** User's phone detailed information, see {@link Phone} */
2598
+ phone?: Phone;
2599
+ /** User's type, see {@link UserType} */
2600
+ type?: UserType;
2601
+ /** User's externalId */
2602
+ externalId?: string;
2603
+ /** User's marital status, see {@link MaritalStatus} */
2604
+ maritalStatus?: MaritalStatus;
2605
+ /** Whether or not the user is active */
2606
+ active?: boolean;
2607
+ /** User's additional info */
2608
+ additionalInfo?: T;
2609
+ /** User's privacy accept date */
2610
+ privacyAcceptDate?: string | null;
2611
+ }
2612
+ /**
2613
+ * Representation of a user saved on a database.
2614
+ *
2615
+ * @interface User
2616
+ * @template T User additional info
2617
+ * @since 0.1.0
2618
+ * @extends {{@link BaseUser}
2619
+ */
2620
+ interface User<T extends AdditionalInfo = AdditionalInfo> extends BaseUser<T> {
2621
+ /** User's auto generated id */
2622
+ idInt: number;
2623
+ /** User registration status in Masivo */
2624
+ rewardsProgramStatus?: MasivoRegistrationStatus | null;
2625
+ /** Last date when the user accepted the new conditions */
2626
+ latestConditionsAcceptanceDate?: string | null;
2627
+ }
2628
+ /**
2629
+ * The possible values for the user's type.
2630
+ *
2631
+ * @typedef UserType
2632
+ * @since 0.1.0
2633
+ */
2634
+ type UserType = "NORMAL" | "DEPENDENT";
2635
+ /**
2636
+ * Representation of a phone.
2637
+ *
2638
+ * @interface UserCountry
2639
+ * @since 0.1.0
2640
+ */
2641
+ interface UserCountry {
2642
+ /** User's country id */
2643
+ id: string;
2644
+ }
2645
+ /**
2646
+ * Representation of a phone.
2647
+ *
2648
+ * @interface Phone
2649
+ * @since 0.1.0
2650
+ */
2651
+ interface Phone {
2652
+ /** User's phone number */
2653
+ number: string;
2654
+ /** User's country calling code, e.g.: +593 */
2655
+ countryCode: string;
2656
+ /** User's country ISO code, e.g.: EC */
2657
+ countryIsoCode: CountryCode;
2658
+ }
2659
+ /**
2660
+ * The possible values for the user's marital status.
2661
+ *
2662
+ * @typedef MaritalStatus
2663
+ * @since 0.1.0
2664
+ */
2665
+ type MaritalStatus = "MARRIED" | "DIVORCED" | "SINGLE";
2666
+ /**
2667
+ * The possible values for the user's gender.
2668
+ *
2669
+ * @typedef Gender
2670
+ * @since 0.1.0
2671
+ */
2672
+ type Gender = "MALE" | "FEMALE";
2673
+
2674
+ /**
2675
+ * User preferences.
2676
+ *
2677
+ * @interface UserSettings
2678
+ * @since 0.5.15
2679
+ */
2680
+ interface UserSettings {
2681
+ /** Individual settings, see {@link Settings} */
2682
+ settings: Settings;
2683
+ /** User unique identifier */
2684
+ uid: string;
2685
+ }
2686
+ /**
2687
+ * Individual user settings.
2688
+ *
2689
+ * @interface Settings
2690
+ * @since 0.1.0
2691
+ */
2692
+ interface Settings {
2693
+ /** Whether or not the user has email notifications enabled */
2694
+ emailNotifications: boolean;
2695
+ /** Whether or not the user has push notifications enabled */
2696
+ pushNotifications: boolean;
2697
+ }
2698
+
2699
+ /**
2700
+ * Representation of common properties of the order.
2701
+ *
2702
+ * @interface BaseOrder
2703
+ * @template T Order additional info
2704
+ * @template U Shopping cart additional info
2705
+ * @template V User additional info
2706
+ * @since 0.1.0
2707
+ */
2708
+ interface BaseOrder<T extends AdditionalInfo = AdditionalInfo, U extends AdditionalInfo = AdditionalInfo, V extends AdditionalInfo = AdditionalInfo> {
2709
+ /** Order unique identifier */
2710
+ id: string;
2711
+ /** Account unique identifier */
2712
+ accountId: string;
2713
+ /** Order additional info*/
2714
+ additionalInfo?: T;
2715
+ /** User's order billing data' unique identifier */
2716
+ billingDataByUserId: string;
2717
+ /** Order additional messages */
2718
+ additionalMessage: string | null;
2719
+ /** Order allocation, see {@link Allocation} */
2720
+ allocation: Allocation;
2721
+ /** Channel unique identifier */
2722
+ channelId: string;
2723
+ /** Order channel name */
2724
+ channelName: string;
2725
+ /** Order comment */
2726
+ comment: string;
2727
+ /** Order hash */
2728
+ hash: string;
2729
+ /** Order issue unique identifier */
2730
+ issueId: string;
2731
+ /** Order pickup cook time */
2732
+ pickupCooktime: string | null;
2733
+ /** User's order shipping address' unique identifier */
2734
+ shippingAddressByUserId: string;
2735
+ /** Order date, e.g.: `02 Aug 2021` */
2736
+ orderDate: string;
2737
+ /** Order time, e.g.: `17:00 am` */
2738
+ orderTime: string;
2739
+ /** Pick up date, e.g.: `01 Aug 2021` */
2740
+ pickupDate: string | null;
2741
+ /** Pick up time, e.g.: `09:00 am` */
2742
+ pickupTime: string | null;
2743
+ /** Order sequence id */
2744
+ seq_id: string;
2745
+ /** Shopping cart associated with the order, see {@link OrderShoppingCart} */
2746
+ shoppingCart: OrderShoppingCart<U>;
2747
+ /** Order step, see {@link OrderStep} */
2748
+ step: OrderStep;
2749
+ /** Step category, see {@link StepCategory} */
2750
+ stepCategory: StepCategory;
2751
+ /** Step code, see {@link StepCode} */
2752
+ stepCode: StepCode;
2753
+ /** Step unique identifier */
2754
+ stepId: string;
2755
+ /** Step name */
2756
+ stepName: string;
2757
+ /** User unique identifier */
2758
+ uid: string;
2759
+ /** Order user, see {@link OrderUser} */
2760
+ user: OrderUser<V>;
2761
+ /** Order transaction unique identifier */
2762
+ transactionId: string | null;
2763
+ /** Vendor unique identifier */
2764
+ vendorId: string;
2765
+ /** Vendor name */
2766
+ vendorName: string;
2767
+ /** Order operator information, see {@link OperatorInformation} */
2768
+ createdByOperator: OperatorInformation;
2769
+ }
2770
+ /**
2771
+ * Shopping cart payment status.
2772
+ *
2773
+ * @typedef OrderStatus
2774
+ * @since 0.1.0
2775
+ */
2776
+ type PaymentStatus = "PENDING" | "CANCELED" | "PAID" | "REFUNDED";
2777
+ /**
2778
+ * The shopping cart associated with the order.
2779
+ *
2780
+ * @interface OrderShoppingCart
2781
+ * @template T Shopping cart additional info
2782
+ * @since 0.1.0
2783
+ * @extends {{@link ShoppingCart}
2784
+ */
2785
+ interface OrderShoppingCart<T extends AdditionalInfo = AdditionalInfo> extends Omit<ShoppingCart<T>, "stores" | "billTotal"> {
2786
+ /** Order shopping cart comment */
2787
+ comment: string | null;
2788
+ /** Order instructions */
2789
+ instructions: string | null;
2790
+ /** Order status unique identifier */
2791
+ statusId: string;
2792
+ /** Order issue unique identifier */
2793
+ issueId: string | null;
2794
+ /** Order invoice number */
2795
+ invoiceNumber: string | null;
2796
+ /** Order status name */
2797
+ statusName: string;
2798
+ /** Status code, see {@link StepCode} */
2799
+ statusCode: StepCode;
2800
+ /** Order payment status, see {@link PaymentStatus} */
2801
+ paymentStatus: PaymentStatus;
2802
+ /**
2803
+ * An array of the order paid payment methods,
2804
+ * see {@link OrderPaymentMethod}
2805
+ */
2806
+ paidPaymentMethods: OrderPaymentMethod[] | null;
2807
+ /** An array of order retries, see {@link OrderRetry} */
2808
+ allRetries: OrderRetry[];
2809
+ /**
2810
+ * An array of the order rejected payment methods,
2811
+ * see {@link OrderPaymentMethod}
2812
+ */
2813
+ rejectedPaymentMethods: OrderPaymentMethod[] | null;
2814
+ /** An array of OrderStore, see {@link OrderStore} */
2815
+ stores: OrderStore[];
2816
+ /** Order bill total, see {@link OrderBillTotal} */
2817
+ billTotal: OrderBillTotal;
2818
+ }
2819
+ /**
2820
+ * Order common fields.
2821
+ *
2822
+ * @interface OrderCommonFields
2823
+ * @since 0.1.0
2824
+ */
2825
+ interface OrderCommonFields {
2826
+ /** Order amount **/
2827
+ amount: string;
2828
+ /** Order status **/
2829
+ status: string;
2830
+ /** Order created date **/
2831
+ created_at: string;
2832
+ /** Order update date **/
2833
+ updated_at: string;
2834
+ }
2835
+ /**
2836
+ * The stores associated with the order.
2837
+ *
2838
+ * @interface OrderStore
2839
+ * @since 0.1.0
2840
+ */
2841
+ interface OrderStore {
2842
+ /** Suborder unique identifier */
2843
+ id: string;
2844
+ /** Order unique identifier */
2845
+ orderId: string;
2846
+ /** Order digital command sent */
2847
+ digitalCommandSent: string;
2848
+ /** Order store status unique identifier */
2849
+ statusId: string;
2850
+ /** Order store status name */
2851
+ statusName: string;
2852
+ /** Order store status code, see {@link StepCode} */
2853
+ statusCode: StepCode;
2854
+ /** Order store bill total, see {@link OrderProductBillTotal} */
2855
+ billStoreTotal: OrderProductBillTotal;
2856
+ /** An array of OrderProducts, see {@link OrderProduct} */
2857
+ products: OrderProduct[];
2858
+ /** Store unique identifier */
2859
+ storeId: Store["storeId"];
2860
+ /** Store name */
2861
+ storeName: Store["storeName"];
2862
+ /** Additional information for the store, see {@link OrderStoreAdditionalInfo} */
2863
+ additionalInfo: OrderStoreAdditionalInfo;
2864
+ }
2865
+ /**
2866
+ * Order store additional information.
2867
+ *
2868
+ * @interface OrderStoreAdditionalInfo
2869
+ * @since 0.1.0
2870
+ */
2871
+ interface OrderStoreAdditionalInfo {
2872
+ /** Store address */
2873
+ address: string;
2874
+ /** Store channel name */
2875
+ channel_name: string;
2876
+ /** Whether or not the store is within coverage */
2877
+ coverage: boolean;
2878
+ /** Store delivery information, see {@link OrderStoreDelivery} */
2879
+ delivery: OrderStoreDelivery;
2880
+ /** Store external identifier */
2881
+ external_id: string;
2882
+ /** Whether or not the store has a dedicated drinks store */
2883
+ is_drinks_store: boolean;
2884
+ /** Store latitude */
2885
+ latitude: number;
2886
+ /** Store longitude */
2887
+ longitude: number;
2888
+ /** Order maximum amount allowed */
2889
+ max_order_amount: number;
2890
+ /** Order minimum amount allowed */
2891
+ min_order_amount: number;
2892
+ /** Order currency's symbol */
2893
+ order_symbol: string;
2894
+ /** Store phone */
2895
+ phone: string;
2896
+ /** Store schedules, see {@link Schedule} */
2897
+ schedules: Schedule[];
2898
+ /** Whether or not to show the drinks store */
2899
+ show_drinks_store: boolean;
2900
+ /** Whether or not the store is sponsored */
2901
+ sponsored: boolean;
2902
+ /** Store external code */
2903
+ store_external_code: string;
2904
+ /** Store timezone */
2905
+ timezone: string;
2906
+ }
2907
+ /**
2908
+ * The delivery information associated with the order store.
2909
+ *
2910
+ * @interface OrderStoreDelivery
2911
+ * @since 0.1.0
2912
+ */
2913
+ interface OrderStoreDelivery {
2914
+ /** Whether or not the store has free delivery */
2915
+ free_delivery: Delivery["freeDelivery"];
2916
+ /** Whether or not the store has a express delivery */
2917
+ express: Delivery["express"];
2918
+ /** Time value for delivery as string */
2919
+ delivery_time_value: Delivery["deliveryTimeValue"];
2920
+ /** Time unit for delivery, see {@link DeliveryTimeUnit} */
2921
+ delivery_time_unit: Delivery["deliveryTimeUnit"];
2922
+ }
2923
+ /**
2924
+ * The product associated with the order.
2925
+ *
2926
+ * @interface OrderProduct
2927
+ * @since 0.1.0
2928
+ */
2929
+ interface OrderProduct {
2930
+ /** Order product id */
2931
+ id: string;
2932
+ /** Order product additional info, see {@link OrderProductAdditionalInfo } */
2933
+ additionalInfo: OrderProductAdditionalInfo;
2934
+ /** Order product unique identifier */
2935
+ productId: string;
2936
+ /** Order product name */
2937
+ productName: string;
2938
+ /** Order product comment */
2939
+ comment: string;
2940
+ /** Order bill product, see {@link OrderBillProduct} */
2941
+ billProduct: OrderBillProduct;
2942
+ /** Order bill product and answers, see {@link OrderProductBillTotal} */
2943
+ billProductAndAnswers: OrderProductBillTotal;
2944
+ /** Order product questions and answers, see {@link CartProductQuestion} */
2945
+ questionsAndAnswers: CartProductQuestion[];
2946
+ }
2947
+ /**
2948
+ * The order product additional info.
2949
+ *
2950
+ * @interface OrderProductAdditionalInfo
2951
+ * @since 0.1.0
2952
+ */
2953
+ interface OrderProductAdditionalInfo {
2954
+ /** Order product attributes, see {@link OrderProductAttributes} */
2955
+ attributes: OrderProductAttributes;
2956
+ /** Indicates if a product is available */
2957
+ available: boolean;
2958
+ /** Order bill product, see {@link OrderBillProduct} */
2959
+ bill_product: OrderBillProductAdditionalInfo;
2960
+ /** Order bill product and answers, see {@link OrderBillProduct} */
2961
+ bill_product_and_answers: OrderBillProductAdditionalInfo;
2962
+ /** The description of the product */
2963
+ description: string;
2964
+ /** Array of product images, see {@link OrderProductImage} */
2965
+ images: OrderProductImage[];
2966
+ /** Indicates if a product has a price vip */
2967
+ is_price_vip: boolean;
2968
+ /** The max amount for sale of the product */
2969
+ max_amount_for_sale: number;
2970
+ /** The measure of the product */
2971
+ measure: string;
2972
+ /** The store associated with the product */
2973
+ new_store: string;
2974
+ /** Indicates if a product is out of service */
2975
+ out_of_service: boolean;
2976
+ /** Indicates if a product is out of stock */
2977
+ out_of_stock: boolean;
2978
+ /** Price category type, see {@link PriceCategoryType} */
2979
+ price_category: PriceCategoryType;
2980
+ /** Order bill product prices, see {@link OrderBillProduct} */
2981
+ prices: OrderBillProductAdditionalInfo;
2982
+ /** Indicates if a product is sponsored */
2983
+ sponsored: boolean;
2984
+ /** The status of the product, see {@link ProductStatus} */
2985
+ status: ProductStatus;
2986
+ /** The stock of the product */
2987
+ stock: number;
2988
+ /** The suggested price of the product */
2989
+ suggested_price: string;
2990
+ /** The type of the product, see {@link ProductType} */
2991
+ type: ProductType;
2992
+ }
2993
+ /**
2994
+ * Order product attributes.
2995
+ *
2996
+ * @interface OrderProductAttributes
2997
+ * @since 0.1.0
2998
+ */
2999
+ interface OrderProductAttributes {
3000
+ /** Whether or not to show product in menu */
3001
+ show_in_menu: boolean;
3002
+ /** Product's quantity, the attribute is not in camel case purposefully */
3003
+ cantidad: string;
3004
+ /** Product external id */
3005
+ external_id: string | null;
3006
+ }
3007
+ /**
3008
+ * Order product image.
3009
+ *
3010
+ * @interface OrderProductImage
3011
+ * @since 0.1.0
3012
+ */
3013
+ interface OrderProductImage {
3014
+ /** The directory where the image is saved */
3015
+ key: string;
3016
+ /** Image's name */
3017
+ name: string;
3018
+ /** The bucket where the image is located */
3019
+ bucket: string;
3020
+ /** The url where the image is saved */
3021
+ url: string;
3022
+ /** The cloud where the image is saved */
3023
+ cloud_front_url: string;
3024
+ }
3025
+ /**
3026
+ * Order bill product additional information.
3027
+ *
3028
+ * @interface OrderBillProductAdditionalInfo
3029
+ * @since 0.1.0
3030
+ */
3031
+ interface OrderBillProductAdditionalInfo {
3032
+ /** Normal price category, see {@link OrderProductPriceCategory} */
3033
+ normal: OrderProductPriceCategory;
3034
+ /** Points price category, see {@link OrderProductPriceCategory} */
3035
+ points: OrderProductPriceCategory;
3036
+ }
3037
+ /**
3038
+ * Order bill product tax calculations.
3039
+ *
3040
+ * @typedef TaxCalculations
3041
+ * @since 0.1.0
3042
+ */
3043
+ type TaxCalculations = Record<string, TaxCalculation>;
3044
+ /**
3045
+ * Order bill product tax calculation
3046
+ *
3047
+ * @interface TaxCalculation
3048
+ * @since 0.1.0
3049
+ */
3050
+ interface TaxCalculation {
3051
+ /** Tax calculation code */
3052
+ code: number;
3053
+ /** Tax calculation name, see {@link TaxType} */
3054
+ name: TaxType;
3055
+ /** Tax calculation value added tax rate */
3056
+ vat_rate_code: number;
3057
+ /** Tax calculation value added tax */
3058
+ vat_rate: string;
3059
+ /** Tax calculation percentage */
3060
+ percentage: number;
3061
+ /** Tax calculation base */
3062
+ tax_base: number;
3063
+ /** Tax calculation value */
3064
+ value: number;
3065
+ }
3066
+ /**
3067
+ * The total bill associated with a product of order.
3068
+ *
3069
+ * @interface OrderProductBillTotal
3070
+ * @since 0.1.0
3071
+ * @extends {{@link BillTotalCategory}
3072
+ */
3073
+ interface OrderProductBillTotal extends BillTotalCategory {
3074
+ /** Order bill discount total */
3075
+ discountTotal: number;
3076
+ }
3077
+ /**
3078
+ * The total bill associated with a order.
3079
+ *
3080
+ * @interface OrderBillTotal
3081
+ * @since 0.1.0
3082
+ * @extends {{@link BillTotalCategory}
3083
+ */
3084
+ interface OrderBillTotal extends BillTotalCategory {
3085
+ /** Order bill discount total */
3086
+ discountTotal: number;
3087
+ /** Bill total category subtotal without taxes */
3088
+ subtotalTaxedWithoutTaxes: number;
3089
+ /** Total products that do not have taxes */
3090
+ subtotalZero: number;
3091
+ /** Order bill total tip amount */
3092
+ tip: number;
3093
+ }
3094
+ /**
3095
+ * The bill associated with a product of order.
3096
+ *
3097
+ * @interface OrderBillProduct
3098
+ * @since 0.1.0
3099
+ * @extends {{@link OrderProductBillTotal}
3100
+ */
3101
+ interface OrderBillProduct extends OrderProductBillTotal {
3102
+ /** Order bill product amount */
3103
+ amount: number;
3104
+ }
3105
+ /**
3106
+ * The bill associated with a product of order.
3107
+ *
3108
+ * @interface OrderProductPriceCategory
3109
+ * @since 0.1.0
3110
+ */
3111
+ interface OrderProductPriceCategory {
3112
+ /** Order product price category amount */
3113
+ amount: number;
3114
+ /** Array of tax calculation, see {@link TaxCalculation} */
3115
+ taxes: TaxCalculation[];
3116
+ /** Order product price category with taxes */
3117
+ net_price: number;
3118
+ /** Order product price currency symbol */
3119
+ symbol: string;
3120
+ /** Order product price category without taxes */
3121
+ gross_price: number;
3122
+ /** Array of discounts applied to the price category */
3123
+ discounts: any[];
3124
+ /** Order product price discount */
3125
+ discount: number;
3126
+ /** Order product price total discounts with taxes */
3127
+ discount_net_price: number;
3128
+ /** Order product price total discounts without taxes */
3129
+ discount_gross_price: number;
3130
+ /** Order product price category type, see {@link PriceCategoryType} */
3131
+ category: PriceCategoryType;
3132
+ /** Order product price product id */
3133
+ product_id?: string;
3134
+ /** Order product price product name */
3135
+ name?: string;
3136
+ /** Order product price subtotal without taxes */
3137
+ subtotal_before_taxes: number;
3138
+ /** Order product price tax total */
3139
+ tax_total: number;
3140
+ /** Order product price discount total */
3141
+ discount_total: number;
3142
+ /** Order product price total */
3143
+ total: number;
3144
+ /** Order product price subtotal without taxes and discounts */
3145
+ subtotal_before_taxes_before_discounts: number;
3146
+ /** Order product price subtotal */
3147
+ subtotal_zero?: number;
3148
+ /** Order product price subtotal without taxes */
3149
+ subtotal_without_taxes?: number;
3150
+ /** An object of tax calculations, see {@link TaxCalculations} */
3151
+ tax_calcs?: TaxCalculations;
3152
+ }
3153
+ /**
3154
+ * The retry of the order.
3155
+ *
3156
+ * @interface OrderRetry
3157
+ * @since 0.1.0
3158
+ * @extends {{@link Status}, {@link OrderCommonFields}
3159
+ */
3160
+ interface OrderRetry extends Status, OrderCommonFields {
3161
+ /** Order retry unique identifier */
3162
+ id: string;
3163
+ /** Order payment method id **/
3164
+ payment_method_by_order_id: string;
3165
+ /** Order retry reference **/
3166
+ reference: string;
3167
+ /** Order retry platform **/
3168
+ platform: string;
3169
+ /** Order retry user agent **/
3170
+ user_agent: string;
3171
+ /** Order retry ip address **/
3172
+ ip_address: string;
3173
+ /** Order retry request id **/
3174
+ request_id: string;
3175
+ /** Order retry process url **/
3176
+ process_url: string;
3177
+ /** Order retry Payment methods, see {@link OrderPaymentMethod} */
3178
+ payment_method: OrderPaymentMethod | null;
3179
+ /** Order payment method, see {@link PaymentMethodByOrder} **/
3180
+ payment_method_by_order: PaymentMethodByOrder;
3181
+ /** Order step, see {@link OrderStep} */
3182
+ step: OrderStep;
3183
+ }
3184
+ /**
3185
+ * The retry of the order.
3186
+ *
3187
+ * @interface PaymentMethodByOrder
3188
+ * @since 0.1.0
3189
+ * @extends {{@link Status}, {@link OrderCommonFields}
3190
+ */
3191
+ interface PaymentMethodByOrder extends Status, OrderCommonFields {
3192
+ /** Payment method by order unique identifier **/
3193
+ id: string;
3194
+ /** Order unique identifier **/
3195
+ order_id: string;
3196
+ /** Payment method id **/
3197
+ payment_method_id: string;
3198
+ /** Internal revenue service payment method id **/
3199
+ sri_payment_method_id: string;
3200
+ /** Order payment method, see {@link OrderRetryPaymentMethod} */
3201
+ order: OrderRetryPaymentMethod;
3202
+ }
3203
+ /**
3204
+ * Order retry payment method.
3205
+ *
3206
+ * @interface OrderRetryPaymentMethod
3207
+ * @since 0.1.0
3208
+ */
3209
+ interface OrderRetryPaymentMethod extends Status {
3210
+ /** Order retry payment method unique identifier **/
3211
+ id: string;
3212
+ /** User unique identifier associated with the order retry **/
3213
+ uid: string;
3214
+ /** Order retry billing data by user id **/
3215
+ billing_data_by_user_id: string;
3216
+ /** Order retry shopping cart id **/
3217
+ shopping_cart_id: string;
3218
+ /** Order retry latitude **/
3219
+ latitude: string;
3220
+ /** Order retry longitude **/
3221
+ longitude: string;
3222
+ /** Order payment status, {@link OrderStatus} **/
3223
+ payment_status: OrderStatus;
3224
+ /** Order retry step **/
3225
+ step: number;
3226
+ /** In soft order process */
3227
+ insoft_order_process: string;
3228
+ /** Order retry sent fulfillment **/
3229
+ sent_fulfillment: string;
3230
+ /** Order retry account id **/
3231
+ account_id: string;
3232
+ /** Order retry sequence value **/
3233
+ seq_val: string;
3234
+ /** Order retry vendor id **/
3235
+ vendor_id: string;
3236
+ /** Order retry channel id **/
3237
+ channel_id: string;
3238
+ /** Order retry created date **/
3239
+ created_at: string;
3240
+ /** Order retry update date **/
3241
+ updated_at: string;
3242
+ /** Order retry allocation, see {@link Allocation} **/
3243
+ allocation: Allocation;
3244
+ /** Order retry suborder, see {@link Suborder} **/
3245
+ suborders: Suborder[];
3246
+ }
3247
+ /**
3248
+ * Representation of a order status.
3249
+ *
3250
+ * @interface Status
3251
+ * @since 0.1.0
3252
+ */
3253
+ interface Status {
3254
+ /** Status unique identifier **/
3255
+ status_id: string;
3256
+ /** Status name **/
3257
+ status_name: string;
3258
+ /** Status code **/
3259
+ status_code: string;
3260
+ /** Status category **/
3261
+ status_category: string;
3262
+ }
3263
+ /**
3264
+ * Representation of a suborder object.
3265
+ *
3266
+ * @interface Suborder
3267
+ * @since 0.1.0
3268
+ * @extends {{@link Status}
3269
+ */
3270
+ interface Suborder extends Status {
3271
+ /** Suborder unique identifier **/
3272
+ id: string;
3273
+ /** Suborder store unique identifier **/
3274
+ store_id: string;
3275
+ /** Suborder store unique identifier **/
3276
+ store_name: string;
3277
+ /** Suborder order id **/
3278
+ order_id: string;
3279
+ /** Suborder digital command sent **/
3280
+ digital_command_sent: string;
3281
+ /** Suborder vendor **/
3282
+ vendor: string;
3283
+ /** Suborder additional information **/
3284
+ additional_info: string;
3285
+ /** Suborder creation date**/
3286
+ created_at: string;
3287
+ /** Suborder update date **/
3288
+ updated_at: string;
3289
+ }
3290
+ /**
3291
+ * The step where the order is located.
3292
+ *
3293
+ * @interface OrderStep
3294
+ * @since 0.1.0
3295
+ */
3296
+ interface OrderStep {
3297
+ /** Order step title to use on front end */
3298
+ title_frontend: string;
3299
+ /** Order step description to use on front end */
3300
+ description_frontend: string;
3301
+ /** Order step unique identifier */
3302
+ id: string;
3303
+ /** Order step name */
3304
+ name: string;
3305
+ /** Order step code */
3306
+ code: string;
3307
+ /** Order step description */
3308
+ description: string;
3309
+ /** Order step category */
3310
+ category: string;
3311
+ /** Order step subtitle to use on front end */
3312
+ subtitle_frontend: string;
3313
+ /** Order step color */
3314
+ color: string;
3315
+ /** Order step additional information, see {@link OrderStepAdditionalInfo} */
3316
+ additional_info: OrderStepAdditionalInfo;
3317
+ }
3318
+ /**
3319
+ * Order step additional information.
3320
+ *
3321
+ * @interface OrderStepAdditionalInfo
3322
+ * @since 0.1.0
3323
+ */
3324
+ interface OrderStepAdditionalInfo {
3325
+ /** Whether or not to use the client on front end */
3326
+ client_frontend: boolean;
3327
+ /** Whether or not to use the operators on front end */
3328
+ operators_frontend: boolean;
3329
+ /** Whether or not to use the client has an error on front end */
3330
+ client_frontend_error: boolean;
3331
+ /** Order additional information group, see {@link OrderStepAdditionalInfoGroup} */
3332
+ group: OrderStepAdditionalInfoGroup;
3333
+ }
3334
+ /**
3335
+ * Order step additional information group.
3336
+ *
3337
+ * @interface OrderStepAdditionalInfoGroup
3338
+ * @since 0.1.0
3339
+ */
3340
+ interface OrderStepAdditionalInfoGroup {
3341
+ /** Order additional information group code */
3342
+ code: string;
3343
+ /** Order additional information group description */
3344
+ description: string;
3345
+ /** Order additional information group weight */
3346
+ weight: string;
3347
+ /** Order additional information group type */
3348
+ type: string;
3349
+ }
3350
+ /**
3351
+ * The details of the order.
3352
+ *
3353
+ * @interface OrderDetails
3354
+ * @template T Order additional info
3355
+ * @template U Shopping cart additional info
3356
+ * @template V User additional info
3357
+ * @since 0.5.15
3358
+ * @extends {{@link BaseOrder}
3359
+ */
3360
+ interface OrderDetails<T extends AdditionalInfo = AdditionalInfo, U extends AdditionalInfo = AdditionalInfo, V extends AdditionalInfo = AdditionalInfo> extends BaseOrder<T, U, V> {
3361
+ /** Order details' shipping address */
3362
+ shippingAddress: ShippingAddress;
3363
+ /** Order details' shipping cost, see {@link OrderDetailShippingCost} */
3364
+ shippingCost: OrderDetailShippingCost;
3365
+ /** Order details' billing data */
3366
+ billingData: BillingData;
3367
+ }
3368
+ /**
3369
+ * The shipping cost associated with the order.
3370
+ *
3371
+ * @interface OrderDetailShippingCost
3372
+ * @since 0.5.15
3373
+ */
3374
+ interface OrderDetailShippingCost {
3375
+ /** Shipping cost net price */
3376
+ net_price: number;
3377
+ }
3378
+ /**
3379
+ * Representation of a Commerce Order.
3380
+ *
3381
+ * @typedef Order
3382
+ * @template T Order additional info
3383
+ * @template U Shopping cart additional info
3384
+ * @template V User additional info
3385
+ * @since 0.5.15
3386
+ */
3387
+ type Order<T extends AdditionalInfo = AdditionalInfo, U extends AdditionalInfo = AdditionalInfo, V extends AdditionalInfo = AdditionalInfo> = BaseOrder<T, U, V> | OrderDetails<T, U, V>;
3388
+ /**
3389
+ * Order shipping metadata base field.
3390
+ *
3391
+ * @interface BaseField
3392
+ * @since 0.1.0
3393
+ */
3394
+ interface BaseField {
3395
+ /** Base field unique identifier */
3396
+ id: string;
3397
+ /** Base field name */
3398
+ name: string;
3399
+ }
3400
+ /**
3401
+ * Order shipping metadata zip code base field.
3402
+ *
3403
+ * @interface ZipCodeField
3404
+ * @since 0.1.0
3405
+ * @extends {{@link BaseField}
3406
+ */
3407
+ interface ZipCodeField extends BaseField {
3408
+ /** Base field zip code */
3409
+ zipCode: string;
3410
+ }
3411
+ /**
3412
+ * Order injection field.
3413
+ *
3414
+ * @interface Injection
3415
+ * @since 0.1.0
3416
+ * @property {InjectionDetail} [key: string] object with key as string
3417
+ * and value as InjectionDetail
3418
+ */
3419
+ interface Injection {
3420
+ [key: string]: InjectionDetail;
3421
+ }
3422
+ /**
3423
+ * Order injection detail field.
3424
+ *
3425
+ * @interface InjectionDetail
3426
+ * @since 0.1.0
3427
+ */
3428
+ interface InjectionDetail {
3429
+ /**
3430
+ * Order injection detail cause,
3431
+ * property is purposefully named in spanish
3432
+ */
3433
+ causa: string;
3434
+ /**
3435
+ * Order injection detail code
3436
+ * property is purposefully named in spanish
3437
+ */
3438
+ codigo: number;
3439
+ /**
3440
+ * Order injection detail message
3441
+ * property is purposefully named in spanish
3442
+ * */
3443
+ mensaje: string;
3444
+ }
3445
+ /**
3446
+ * Order integration message.
3447
+ *
3448
+ * @interface IntegrationMessage
3449
+ * @since 0.1.0
3450
+ */
3451
+ interface IntegrationMessage {
3452
+ /** Order injection, see {@link Injection} */
3453
+ kfcInjection: Injection;
3454
+ }
3455
+ /**
3456
+ * Order shipping metadata.
3457
+ *
3458
+ * @interface MetadataShipping
3459
+ * @since 0.1.0
3460
+ */
3461
+ interface MetadataShipping {
3462
+ /** Order shipping area, see {@link BaseField} */
3463
+ area: BaseField;
3464
+ /** Order shipping city, see {@link BaseField} */
3465
+ city: BaseField;
3466
+ /** Order shipping zone, see {@link ZipCodeField} */
3467
+ zone: ZipCodeField;
3468
+ /** Order shipping store, see {@link BaseField} */
3469
+ store: BaseField;
3470
+ /** Order shipping country, see {@link BaseField} */
3471
+ country: BaseField;
3472
+ }
3473
+ /**
3474
+ * Order allocation options.
3475
+ *
3476
+ * @typedef Allocation
3477
+ * @since 0.1.0
3478
+ */
3479
+ type Allocation = "PICKUP_TO_GO" | "PICKUP_IN_PLACE" | "DELIVERY";
3480
+ /**
3481
+ * Order user.
3482
+ *
3483
+ * @interface OrderUser
3484
+ * @template T User additional info
3485
+ * @since 0.1.0
3486
+ * @extends {{@link BaseUser}
3487
+ */
3488
+ interface OrderUser<T extends AdditionalInfo = AdditionalInfo> extends BaseUser<T> {
3489
+ /** Order user settings, see {@link Settings} */
3490
+ settings: Settings;
3491
+ }
3492
+ /**
3493
+ * Order operator information.
3494
+ *
3495
+ * @interface OperatorInformation
3496
+ * @since 0.1.0
3497
+ */
3498
+ interface OperatorInformation {
3499
+ /** Operator unique identifier */
3500
+ id: string;
3501
+ /** Operator name */
3502
+ name: string;
3503
+ /** Operator email */
3504
+ email: string;
3505
+ /** Operator skill */
3506
+ skill: string;
3507
+ /** Operator document */
3508
+ document: string;
3509
+ }
3510
+ /**
3511
+ * Order payment method.
3512
+ *
3513
+ * @interface OrderPaymentMethod
3514
+ * @since 0.1.0
3515
+ */
3516
+ interface OrderPaymentMethod {
3517
+ /** Order payment method id */
3518
+ id: string;
3519
+ /** Order payment method id */
3520
+ payment_method_id: string;
3521
+ /** Order payment method name */
3522
+ payment_method_name: string;
3523
+ /** Order total by payment method */
3524
+ total: string;
3525
+ /** Order status, see {@link OrderStatus} */
3526
+ status: OrderStatus;
3527
+ /** Order payment method last retry, see {@link OrderRetry} */
3528
+ lastRetry: OrderRetry;
3529
+ /** Order step, see {@link OrderStep} */
3530
+ step: OrderStep;
3531
+ }
3532
+ /**
3533
+ * Order status.
3534
+ *
3535
+ * @typedef OrderStatus
3536
+ * @since 0.1.0
3537
+ */
3538
+ type OrderStatus = "APPROVED" | "REJECTED" | "PENDING";
3539
+
3540
+ /**
3541
+ * Notification object.
3542
+ *
3543
+ * @interface Notification
3544
+ * @since 0.1.0
3545
+ */
3546
+ interface Notification {
3547
+ /** Notification unique identifier */
3548
+ id: string;
3549
+ /** Notification title */
3550
+ title: string;
3551
+ /** Notification description */
3552
+ description: string;
3553
+ /** Notification list title */
3554
+ listTitle: string;
3555
+ /** Notification list items */
3556
+ listItems: NotificationListItem[];
3557
+ /** Notification creation date */
3558
+ creationDate: string;
3559
+ /** Notification priority, see {@link NotificationPriority} */
3560
+ priority: NotificationPriority;
3561
+ /**
3562
+ * Whether or not the notification was read. Purposefully
3563
+ * has a string type.
3564
+ */
3565
+ read: ReadValue;
3566
+ /** Notification extra data, see {@link NotificationExtraData} */
3567
+ extra_data: NotificationExtraData;
3568
+ }
3569
+ /**
3570
+ * Possible priority values for notifications.
3571
+ *
3572
+ * @typedef NotificationPriority
3573
+ * @since 0.1.0
3574
+ */
3575
+ type NotificationPriority = "HIGH" | "LOW";
3576
+ /**
3577
+ * Possible read values for notifications.
3578
+ *
3579
+ * @typedef ReadValue
3580
+ * @since 0.1.0
3581
+ */
3582
+ type ReadValue = "YES" | "NO";
3583
+ /**
3584
+ * Notification extra data.
3585
+ *
3586
+ * @interface NotificationExtraData
3587
+ * @since 0.1.0
3588
+ */
3589
+ interface NotificationExtraData {
3590
+ /** The id of the notification extra data */
3591
+ id: string;
3592
+ /** Sequential value */
3593
+ seqVal: string;
3594
+ /** Unique identifier */
3595
+ uid: string;
3596
+ /** Notification user, see {@link NotificationUser} */
3597
+ user: NotificationUser;
3598
+ /** The provided account id of the application */
3599
+ accountId: Account["accountId"];
3600
+ /** Vendor related to the notification, see {@link NotificationVendor} */
3601
+ vendor: NotificationVendor;
3602
+ /** City of the store related to the notification, see {@link BaseField} */
3603
+ city: BaseField;
3604
+ /** Store related to the notification, see {@link NotificationStore} */
3605
+ store: NotificationStore;
3606
+ /** Channel unique identifier */
3607
+ channel_id: string;
3608
+ /** Provided country id */
3609
+ countryId: string;
3610
+ /** Notification step, see {@link NotificationStep} */
3611
+ step: NotificationStep;
3612
+ /** Allocation options, see {@link Allocation} */
3613
+ allocation: Allocation;
3614
+ /** Payment Method of the order related to the notification */
3615
+ paymentMethod: string;
3616
+ /** Total price of the order */
3617
+ total: string;
3618
+ /** Notification additional information, see {@link NotificationAdditionalInfo} */
3619
+ additionalInfo: NotificationAdditionalInfo;
3620
+ /** Notification creation Date */
3621
+ created_at: string;
3622
+ }
3623
+ /**
3624
+ * Notification vendor.
3625
+ *
3626
+ * @interface NotificationVendor
3627
+ * @since 0.1.0
3628
+ * @extends Vendor
3629
+ */
3630
+ interface NotificationVendor extends Omit<Vendor, "images" | "maxPurchaseValue" | "description" | "sponsored" | "active"> {
3631
+ }
3632
+ /**
3633
+ * Notification store.
3634
+ *
3635
+ * @interface NotificationStore
3636
+ * @since 0.1.0
3637
+ * @extends BaseField
3638
+ */
3639
+ interface NotificationStore extends BaseField {
3640
+ /** Store's address */
3641
+ address: string;
3642
+ }
3643
+ /**
3644
+ * Notification user.
3645
+ *
3646
+ * @interface NotificationUser
3647
+ * @since 0.1.0
3648
+ */
3649
+ interface NotificationUser {
3650
+ /** Notification user name */
3651
+ name: string;
3652
+ /** Notification user address */
3653
+ address: string;
3654
+ /** Notification user email */
3655
+ email: string;
3656
+ }
3657
+ /**
3658
+ * Notification step.
3659
+ *
3660
+ * @interface NotificationStep
3661
+ * @since 0.1.0
3662
+ * @extends StepWorkflow
3663
+ */
3664
+ interface NotificationStep extends Omit<StepWorkflow, "additional_info" | "color" | "description" | "description_frontend" | "subtitle_frontend" | "title_frontend" | "transitions" | "notification"> {
3665
+ }
3666
+ /**
3667
+ * Notification additional information.
3668
+ *
3669
+ * @interface NotificationAdditionalInfo
3670
+ * @since 0.1.0
3671
+ */
3672
+ interface NotificationAdditionalInfo {
3673
+ /** Whether or not notification has parent shopping cart*/
3674
+ parent_shopping_cart: boolean;
3675
+ /** Order metadata shipping, see {@link MetadataShipping} */
3676
+ metadata_shipping: MetadataShipping;
3677
+ /** Project unique identifier */
3678
+ aud: string;
3679
+ /** Unique identifier of workflowId */
3680
+ workflowId: string;
3681
+ }
3682
+ /**
3683
+ * Notification list item.
3684
+ *
3685
+ * @interface NotificationListItem
3686
+ * @since 0.1.0
3687
+ */
3688
+ interface NotificationListItem {
3689
+ /** Notification list item title */
3690
+ title: string;
3691
+ /** Notification list item description */
3692
+ description: string;
3693
+ }
3694
+
3695
+ /**
3696
+ * Basic payment method object.
3697
+ *
3698
+ * @interface BasePaymentMethod
3699
+ * @since 0.1.0
3700
+ */
3701
+ interface BasePaymentMethod {
3702
+ /** Payment method's id */
3703
+ id: string;
3704
+ /** Payment method's created date */
3705
+ created_at: string | null;
3706
+ /** Payment method's updated date */
3707
+ updated_at: string | null;
3708
+ /** Payment method's deleted date */
3709
+ deleted_at: string | null;
3710
+ }
3711
+ /**
3712
+ * Representation of a Commerce Payment method.
3713
+ *
3714
+ * @interface PaymentMethod
3715
+ * @since 0.1.0
3716
+ * @extends {{@link BasePaymentMethod}
3717
+ */
3718
+ interface PaymentMethod extends BasePaymentMethod {
3719
+ /** Payment method's name, see {@link PaymentMethodName} */
3720
+ name: PaymentMethodName;
3721
+ /** Payment method image's url, commonly used to save image cards */
3722
+ image_url: string;
3723
+ /** Whether or not the payment method is default */
3724
+ default: boolean;
3725
+ /** Payment method's external id */
3726
+ external_id: string | null;
3727
+ /** Payment method's external code */
3728
+ external_code: number;
3729
+ /** Payment method's parent id */
3730
+ parent_id: string | null;
3731
+ /** Payment method cards' allowed brands, see {@link ProvidersBrand} */
3732
+ methods: PaymentProvider[];
3733
+ /** Payment method taxes */
3734
+ taxes?: Tax[];
3735
+ }
3736
+ /**
3737
+ * Representation of a Commerce Tax
3738
+ *
3739
+ * @interface Tax
3740
+ * @since 0.1.0
3741
+ */
3742
+ interface Tax {
3743
+ /** Tax code */
3744
+ code: number;
3745
+ /** Tax name */
3746
+ name: string;
3747
+ /** Tax percentage */
3748
+ percentage: number;
3749
+ }
3750
+ /**
3751
+ * Representation of a credit card brand.
3752
+ *
3753
+ * @interface PaymentProvider
3754
+ * @since 0.1.0
3755
+ * @extends {{@link PaymentMethod}
3756
+ */
3757
+ interface PaymentProvider extends Omit<PaymentMethod, "name"> {
3758
+ /** Payment method cards' allowed brands, see {@link CreditCardMappings}*/
3759
+ cc_brands: CreditCardMapping[];
3760
+ /** The name of the payment provider */
3761
+ name: string;
3762
+ }
3763
+ /**
3764
+ * Representation of a credit card brand.
3765
+ *
3766
+ * @interface CreditCardMapping
3767
+ * @since 0.1.0
3768
+ * @extends {{@link BasePaymentMethod}
3769
+ */
3770
+ interface CreditCardMapping extends BasePaymentMethod {
3771
+ /** Credit card mapping unique identifier */
3772
+ id: string;
3773
+ /** Credit card mapping name, see {@link CardName} */
3774
+ name: CardName;
3775
+ /** Payment method image's url, commonly used to save image cards */
3776
+ image_url: string;
3777
+ /** Mapping of credit cards */
3778
+ cc_brands_mapping: unknown[];
3779
+ }
3780
+ /**
3781
+ * Payment method common names.
3782
+ *
3783
+ * @typedef PaymentMethodName
3784
+ * @since 0.1.0
3785
+ */
3786
+ type PaymentMethodName = "CREDIT_CARD" | "CASH" | "DATAPHONE";
3787
+ /**
3788
+ * Cards common names.
3789
+ *
3790
+ * @typedef CardName
3791
+ * @since 0.1.0
3792
+ */
3793
+ type CardName = "Diners" | "Discover" | "American Express" | "Visa" | "MasterCard";
3794
+ /**
3795
+ * Representation of a card inscription.
3796
+ *
3797
+ * @interface CardInscription
3798
+ * @since 0.5.15
3799
+ */
3800
+ interface CardInscription {
3801
+ id: string;
3802
+ uid: string;
3803
+ number: string;
3804
+ type: string;
3805
+ authCode?: string;
3806
+ bin: string;
3807
+ paymentToken: string;
3808
+ createdAt?: string;
3809
+ }
3810
+
3811
+ export type { ARDocumentType, Account, AdditionalInfo, Alert, Allocation, ArtisnParams, ArtisnPlatform, ArtisnQuery, ArtisnRequest, ArtisnRequestBody, ArtisnRequestHeaders, ArtisnRequestMethod, Award, BODocumentType, BRDocumentType, Banner, BannerBenefits, BannerCoupon, BannerImage, BannerScope, BannerType, BaseBillingData, BaseField, BaseLivingPlace, BaseOrder, BasePaymentMethod, BaseProduct, BaseShippingAddress, BaseUser, BaseWeekDay, BehaviorCampaignAttributes, Benefit, BenefitData, BenefitTypes, BillTotal, BillTotalCategory, BillingData, BudgetDivision, CDNImage, CLDocumentType, CODocumentType, CardInscription, CardName, CartProduct, CartProductAnswer, CartProductQuestion, CartStore, CartTotals, Catalogue, Category, CategoryWithProducts, Code, CodeFormat, CodesSummary, CommonDocumentType, Country, CountryCode, CountryCurrency, CountrySummary, Coupon, CouponCampaignAttributes, CouponCategory, CouponType, CreditCardMapping, CurrencyCodes, DayOfWeek, Days, Delivery, DeliveryTimeUnit, Discount, DocumentType, ECDocumentType, ExtendedLoyaltyInfo, Field, FieldRecord, Gender, GenericStoreLocation, Image, ImageFit, ImageManipulationConfig, ImageToFormat, Injection, InjectionDetail, IntegrationMessage, Issue, IssueAdditionalInfo, IssueHistory, LivingPlace, LivingPlaceToSave, LoyaltyAccumulation, MaritalStatus, MasivoBenefitAlerts, MasivoBenefitPayload, MasivoCampaign, MasivoCampaignAttributes, MasivoCampaignRule, MasivoCampaignStatus, MasivoCampaignType, MasivoCondition, MasivoConditionBase, MasivoConditionType, MasivoCustomer, MasivoCustomerMetrics, MasivoEffect, MasivoEffectMultiplierType, MasivoInfo, MasivoLabels, MasivoOperator, MasivoRegistrationStatus, MasivoRepeatInterval, MasivoReportingPeriod, MasivoRewardAction, MasivoRewardType, MasivoTemplateContent, MasivoTemplateType, MasivoTier, MasivoTransactionType, MasivoWallet, Message, Metadata, MetadataShipping, MetricPeriod, NewShippingAddress, Notification, NotificationAdditionalInfo, NotificationExtraData, NotificationListItem, NotificationPriority, NotificationStep, NotificationStore, NotificationUser, NotificationVendor, Objectify, OperatorInformation, Order, OrderBillProduct, OrderBillProductAdditionalInfo, OrderBillTotal, OrderCommonFields, OrderDetailShippingCost, OrderDetails, OrderPaymentMethod, OrderProduct, OrderProductAdditionalInfo, OrderProductAttributes, OrderProductBillTotal, OrderProductImage, OrderProductPriceCategory, OrderRetry, OrderRetryPaymentMethod, OrderShoppingCart, OrderStatus, OrderStep, OrderStepAdditionalInfo, OrderStepAdditionalInfoGroup, OrderStore, OrderStoreAdditionalInfo, OrderStoreDelivery, OrderUser, PEDocumentType, PYDocumentType, PaymentMethod, PaymentMethodByOrder, PaymentMethodName, PaymentProvider, PaymentStatus, Phone, PriceCategory, PriceCategoryTax, PriceCategoryType, Product, ProductAnswer, ProductAttributes, ProductCoupon, ProductDetails, ProductPrices, ProductQuestion, ProductStatus, ProductType, RandomImageConfig, ReadValue, RedeemableBenefit, Rule, Schedule, Service, Settings, ShippingAddress, ShippingCost, ShippingCostTax, ShoppingCart, ShoppingCartBenefits, Status, StepCategory, StepCode, StepNotification, StepWorkflow, StepWorkflowAdditionalInfo, StepWorkflowGroup, Store, StoreCoupon, StoreCouponDetail, StoreLocation, StorePolygons, Suborder, Tax, TaxCalculation, TaxCalculations, TaxType, Token, TransitionWorkflow, URLImage, USDocumentType, UYDocumentType, UpdatedShippingAddress, User, UserCountry, UserSettings, UserType, VEDocumentType, ValidateConditionConfig, Vendor, Wallet, WalletAttribute, WalletLine, WalletMedia, WalletReward, WalletTotal, WebhookWorkflow, Workflow, ZipCodeField };