@artisan-commerce/types 0.14.0-canary.4 → 0.14.0-canary.41

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 +3285 -0
  2. package/package.json +23 -28
  3. package/CHANGELOG.md +0 -338
  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 -36
  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 -59
  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 -157
  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 -73
  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,3285 @@
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: number;
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: number;
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
+ declare 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
+ declare type CommonDocumentType = "PASSPORT";
53
+ /**
54
+ * Argentina supported document types.
55
+ *
56
+ * @typedef ARDocumentType
57
+ * @since 0.1.0
58
+ */
59
+ declare type ARDocumentType = CommonDocumentType | "DNI";
60
+ /**
61
+ * Bolivia supported document types.
62
+ *
63
+ * @typedef BODocumentType
64
+ * @since 0.1.0
65
+ */
66
+ declare type BODocumentType = CommonDocumentType;
67
+ /**
68
+ * Brasil supported document types.
69
+ *
70
+ * @typedef BRDocumentType
71
+ * @since 0.1.0
72
+ */
73
+ declare type BRDocumentType = CommonDocumentType;
74
+ /**
75
+ * Chile supported document types.
76
+ *
77
+ * @typedef CLDocumentType
78
+ * @since 0.1.0
79
+ */
80
+ declare type CLDocumentType = CommonDocumentType | "RUT";
81
+ /**
82
+ * Colombia supported document types.
83
+ *
84
+ * @typedef CODocumentType
85
+ * @since 0.1.0
86
+ */
87
+ declare type CODocumentType = CommonDocumentType | "NIT" | "CI_CO";
88
+ /**
89
+ * Ecuador supported document types.
90
+ *
91
+ * @typedef ECDocumentType
92
+ * @since 0.1.0
93
+ */
94
+ declare type ECDocumentType = CommonDocumentType | "CI" | "RUC";
95
+ /**
96
+ * Paraguay supported document types.
97
+ *
98
+ * @typedef PYDocumentType
99
+ * @since 0.1.0
100
+ */
101
+ declare type PYDocumentType = CommonDocumentType;
102
+ /**
103
+ * Perú supported document types.
104
+ *
105
+ * @typedef PEDocumentType
106
+ * @since 0.1.0
107
+ */
108
+ declare type PEDocumentType = CommonDocumentType | "DNI" | "RUC";
109
+ /**
110
+ * Uruguay supported document types.
111
+ *
112
+ * @typedef UYDocumentType
113
+ * @since 0.1.0
114
+ */
115
+ declare type UYDocumentType = CommonDocumentType;
116
+ /**
117
+ * Venezuela supported document types.
118
+ *
119
+ * @typedef VEDocumentType
120
+ * @since 0.1.0
121
+ */
122
+ declare 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
+ declare 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
+ declare 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: number;
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
+ declare 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
+ declare 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
+ declare 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
+ declare 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
+ declare 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
+ declare type ImageFit = "fill" | "cover" | "contain" | "inside" | "outside";
241
+ /**
242
+ * Contains different image formats.
243
+ *
244
+ * @typedef ImageToFormat
245
+ * @since 0.1.0
246
+ */
247
+ declare 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: number;
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 Category.
284
+ *
285
+ * @interface Category
286
+ * @since 0.1.0
287
+ */
288
+ interface Category<T extends AdditionalInfo = AdditionalInfo> {
289
+ /** Category's id */
290
+ categoryId: number;
291
+ /** Category's name */
292
+ name: string;
293
+ /** Category image's array, see {@link CDNImage} */
294
+ images: CDNImage[];
295
+ /** Whether or not to display the category */
296
+ displayInMenu: boolean;
297
+ /** Whether or not the category should be reloaded */
298
+ reload: boolean;
299
+ /** Whether or not the category has subcategories */
300
+ subcategories: boolean;
301
+ /** Category additional info */
302
+ additionalInfo?: T;
303
+ /** Whether or not the category is featured */
304
+ featured: boolean;
305
+ }
306
+ /**
307
+ * Representation of a category which contains several base products.
308
+ *
309
+ * @interface CategoryWithProducts
310
+ * @since 0.1.0
311
+ * @extends {{@link Category}
312
+ */
313
+ interface CategoryWithProducts extends Category {
314
+ /** Array of base products associated with a category, see {@link BaseProduct} */
315
+ products: BaseProduct[];
316
+ }
317
+
318
+ /**
319
+ * Representation of a Commerce Vendor.
320
+ *
321
+ * @interface Vendor
322
+ * @since 0.1.0
323
+ */
324
+ interface Vendor<T extends AdditionalInfo = AdditionalInfo> {
325
+ /** Artisn's vendor unique identifier */
326
+ id: string;
327
+ /** Vendor's images, see {@link CDNImage} */
328
+ images: CDNImage[];
329
+ /** Vendor's name */
330
+ name: string;
331
+ /** Vendor's maximum purchase value */
332
+ maxPurchaseValue: number;
333
+ /** Vendor's description */
334
+ description: string;
335
+ /** Whether or not the vendor is sponsored */
336
+ sponsored: boolean;
337
+ /** Whether or not the vendor is active */
338
+ active: boolean;
339
+ /** Vendor additional info */
340
+ additionalInfo?: T;
341
+ }
342
+
343
+ /**
344
+ * Representation of a Commerce Catalogue.
345
+ *
346
+ * @interface Catalogue
347
+ * @since 0.1.0
348
+ */
349
+ interface Catalogue<T extends AdditionalInfo = AdditionalInfo> {
350
+ /** Catalogue's id */
351
+ catalogueId: string;
352
+ /** Catalogue's name */
353
+ name: string;
354
+ /** Whether or not the catalogue is active */
355
+ active: boolean;
356
+ /** Catalogue's friendly name to use on front end */
357
+ friendlyName?: string;
358
+ /** Catalogue additional info */
359
+ additionalInfo?: T;
360
+ }
361
+
362
+ /**
363
+ * Representation of a Commerce Store.
364
+ *
365
+ * @interface Store
366
+ * @template T Store additional info
367
+ * @template U Vendor additional info
368
+ * @template V Catalogues additional info
369
+ * @since 0.1.0
370
+ */
371
+ interface Store<T extends AdditionalInfo = AdditionalInfo, U extends AdditionalInfo = AdditionalInfo, V extends AdditionalInfo = AdditionalInfo> {
372
+ /** Store unique identifier */
373
+ storeId: number;
374
+ /** Store name */
375
+ storeName: string;
376
+ /** Store address */
377
+ address: string;
378
+ /** The vendor associated with the store, see {@link Vendor} */
379
+ vendor: Vendor<U>;
380
+ /** Additional store information */
381
+ additionalInfo?: T;
382
+ /** Whether or not the store is within coverage */
383
+ coverage: boolean;
384
+ /** Store cover url */
385
+ coverUrl: string;
386
+ /** Store delivery detailed information */
387
+ delivery: Delivery;
388
+ /** Store description */
389
+ description: string | null;
390
+ /** Whether or not the store is open */
391
+ isOpen: boolean;
392
+ /** Order maximum amount allowed */
393
+ maxOrderAmount: number;
394
+ /** Order minimum amount allowed */
395
+ minOrderAmount: number;
396
+ /** Order currency's symbol */
397
+ orderSymbol: string;
398
+ /** Store phone */
399
+ phone: string;
400
+ /** Whether or not the store is sponsored */
401
+ sponsored: boolean;
402
+ /** Store latitude */
403
+ latitude: number;
404
+ /** Store longitude */
405
+ longitude: number;
406
+ /** Store schedules, see {@link Schedule} for further information */
407
+ schedules: Schedule[];
408
+ /** Store timezone */
409
+ timezone: string;
410
+ /** Store available services, see {@link Service} */
411
+ services: Service[];
412
+ /** Estimated store cook time */
413
+ cookTime: string;
414
+ /**
415
+ * Generic store location in regards to the city,
416
+ * see {@link GenericStoreLocation}
417
+ */
418
+ city: GenericStoreLocation;
419
+ /** Whether or not the store is out of service */
420
+ outOfService: boolean;
421
+ /** Whether or not the store is default */
422
+ isDefault: boolean;
423
+ /** Whether or not the store is active */
424
+ active: boolean;
425
+ /** The value of the allowed minimum order */
426
+ minOrder: number;
427
+ /** Minimum order currency's symbol */
428
+ minOrderSymbol: string;
429
+ /**
430
+ * Generic store location in regards to the country,
431
+ * see {@link GenericStoreLocation} for further information
432
+ */
433
+ country: GenericStoreLocation;
434
+ /** Store location, see {@link StoreLocation} for further information */
435
+ location: StoreLocation;
436
+ /** Array of catalogues, see {@link Catalogue} */
437
+ catalogues: Catalogue<V>[];
438
+ /** Array of store images, see {@link CDNImage} */
439
+ images: CDNImage[];
440
+ /** The distance between the user and the store, roughly in metres */
441
+ distance: number;
442
+ /**
443
+ * A list of coordinates that encapsules the coverage area of a given store
444
+ */
445
+ polygons: StorePolygons | null;
446
+ }
447
+ /**
448
+ * Store location.
449
+ *
450
+ * @interface StoreLocation
451
+ * @since 0.1.0
452
+ */
453
+ interface StoreLocation {
454
+ /** Store location latitude */
455
+ lat: number;
456
+ /** Store location longitude */
457
+ lon: number;
458
+ /** The geo hash associated with the store */
459
+ geohash: string;
460
+ /** Whether or not the store is a fragment */
461
+ fragment: boolean;
462
+ }
463
+ /**
464
+ * Store generic location.
465
+ *
466
+ * @interface GenericStoreLocation
467
+ * @since 0.1.0
468
+ */
469
+ interface GenericStoreLocation {
470
+ /** Generic store location unique identifier */
471
+ id: string;
472
+ /** Generic store location name */
473
+ name: string;
474
+ /** Whether or not the generic store location is active */
475
+ active: boolean;
476
+ }
477
+ /**
478
+ * Store delivery modality information.
479
+ *
480
+ * @interface Delivery
481
+ * @since 0.1.0
482
+ */
483
+ interface Delivery {
484
+ /** Time unit for delivery, see {@link DeliveryTimeUnit} */
485
+ deliveryTimeUnit: DeliveryTimeUnit;
486
+ /** Time value for delivery as string */
487
+ deliveryTimeValue: string;
488
+ /** Whether or not the store has a express delivery */
489
+ express: boolean;
490
+ /** Whether or not the store has free delivery */
491
+ freeDelivery: boolean;
492
+ }
493
+ /**
494
+ * Store schedules.
495
+ *
496
+ * @interface Schedule
497
+ * @since 0.1.0
498
+ */
499
+ interface Schedule {
500
+ /** Week day in uppercase, see {@link Days} */
501
+ day: Days;
502
+ /**
503
+ * `Date` value representing the start time in which
504
+ * the product is available
505
+ */
506
+ from: number;
507
+ /** `Date` value representing the end time in which
508
+ * the product is available
509
+ */
510
+ to: number;
511
+ /** Store catalogue unique identifier */
512
+ catalogueId: string;
513
+ }
514
+ /**
515
+ * The services available on the store.
516
+ *
517
+ * @interface Service
518
+ * @since 0.1.0
519
+ */
520
+ interface Service {
521
+ /** Service name */
522
+ name: string;
523
+ /** Whether or not the service is active on the store */
524
+ active: boolean;
525
+ /** Service image url */
526
+ url: string;
527
+ }
528
+ /**
529
+ * Time unit for delivery.
530
+ *
531
+ * @typedef DeliveryTimeUnit
532
+ * @since 0.1.0
533
+ */
534
+ declare type DeliveryTimeUnit = "min";
535
+ /**
536
+ * Allowed days for schedules.
537
+ *
538
+ * @typedef Days
539
+ * @since 0.1.0
540
+ */
541
+ declare type Days = BaseWeekDay | "SPECIAL";
542
+ /**
543
+ * A list of coordinates that encapsules the coverage area of a given store.
544
+ *
545
+ * @interface StorePolygons
546
+ * @since 0.1.0
547
+ */
548
+ interface StorePolygons {
549
+ /** Type of coordinates */
550
+ type: string;
551
+ /** The coordinates that creates the store polygon coverage area */
552
+ coordinates: number[][][][];
553
+ }
554
+
555
+ /**
556
+ * Representation of a Commerce Shipping Cost.
557
+ *
558
+ * @interface ShippingCost
559
+ * @since 0.1.0
560
+ */
561
+ interface ShippingCost<T extends AdditionalInfo = AdditionalInfo> {
562
+ /** Shipping cost product's id */
563
+ productId: number;
564
+ /** Shipping cost's name */
565
+ name: string;
566
+ /** Shipping cost's amount */
567
+ amount: number;
568
+ /** Currency's symbol */
569
+ symbol: string;
570
+ /** Array of shipping cost's taxes, see {@link ShippingCostTax} */
571
+ taxes: ShippingCostTax[];
572
+ /** Shipping cost's price without taxes */
573
+ grossPrice: number;
574
+ /** Shipping cost's price */
575
+ netPrice: number;
576
+ /** Shipping cost's subtotal without taxes */
577
+ subtotalBeforeTaxes: number;
578
+ /** Shipping cost's tax total */
579
+ taxTotal: number;
580
+ /** Shipping cost's discount */
581
+ discounts: any[];
582
+ /** Shipping cost's discount total amount */
583
+ discountTotal: number;
584
+ /** Shipping cost's total */
585
+ total: number;
586
+ /** Shipping cost additional info */
587
+ additionalInfo?: T;
588
+ }
589
+ /**
590
+ * Representation of a shipping cost tax.
591
+ *
592
+ * @interface ShippingCostTax
593
+ * @since 0.1.0
594
+ */
595
+ interface ShippingCostTax {
596
+ /** Tax percentage to be applied */
597
+ percentage: number;
598
+ /** Tax name */
599
+ name: string;
600
+ /** Value added tax rate code */
601
+ vatRateCode: number;
602
+ /** Tax code */
603
+ code: number;
604
+ /** Value added tax rate */
605
+ vatRate: string;
606
+ /** Tax base value */
607
+ taxBase: number;
608
+ /** Tax value */
609
+ value: string;
610
+ }
611
+
612
+ /**
613
+ * Representation of a Commerce Shopping Cart.
614
+ *
615
+ * @interface ShoppingCart
616
+ * @template T Shopping cart additional info
617
+ * @template U Product additional info
618
+ * @template V Categories additional info
619
+ * @template W Store additional info
620
+ * @template X Vendor additional info
621
+ * @template Y Catalogues additional info
622
+ * @template Z Shipping cost additional info
623
+ * @since 0.1.0
624
+ */
625
+ 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> {
626
+ /** Shopping cart unique identifier */
627
+ id: string;
628
+ /** Shopping cart name */
629
+ name: string;
630
+ /** Shopping cart latitude */
631
+ latitude: number;
632
+ /** Shopping cart longitude */
633
+ longitude: number;
634
+ /** Shopping cart price category, see {@link PriceCategoryType}*/
635
+ priceCategory?: PriceCategoryType;
636
+ /** Shopping cart creation date */
637
+ createdAt: string;
638
+ /** Shopping cart update date */
639
+ updatedAt: string;
640
+ /** Shopping cart channel unique identifier */
641
+ channelId: number;
642
+ /** Shopping cart stores, see Objectify<{@link CartStore}> */
643
+ stores: Objectify<CartStore<W, U, V, X, Y>>;
644
+ /** Shopping cart shipping cost */
645
+ shippingCost: ShippingCost<Z> | null;
646
+ /** Shopping cart additional info */
647
+ additional_info?: T;
648
+ /** Shopping cart bill total */
649
+ billTotal: BillTotal;
650
+ /** Shopping cart applied benefits */
651
+ benefits?: ShoppingCartBenefits;
652
+ /** Shopping cart user wallet id */
653
+ benefitsHash?: string;
654
+ /**
655
+ * Shopping cart pick up time, must be in UTC and
656
+ * `YYYY-MM-DD HH:mm:ss` format
657
+ */
658
+ pickUpTime?: string;
659
+ }
660
+ /**
661
+ * Representation of a Alert.
662
+ *
663
+ * @interface Alert
664
+ * @since 0.1.0
665
+ */
666
+ interface Alert {
667
+ /** Alert error level */
668
+ errorLevel: number;
669
+ /** Alert message */
670
+ message: string;
671
+ /** Alert type */
672
+ type: string;
673
+ }
674
+ /**
675
+ * Representation of a Cart Store.
676
+ *
677
+ * @interface CartStore
678
+ * @template T Store additional info
679
+ * @template U Product additional info
680
+ * @template V Categories additional info
681
+ * @template W Vendor additional info
682
+ * @template X Catalogues additional info
683
+ * @since 0.1.0
684
+ * @extends {{@link Store}
685
+ */
686
+ 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> {
687
+ /** The products that belong to the store, see {@link CartProduct} */
688
+ products: Objectify<CartProduct<U, V>>;
689
+ /** Cart store's alerts, see {@link Alert} */
690
+ alerts: Alert[];
691
+ }
692
+ /**
693
+ * The possible values of a Bill Total.
694
+ *
695
+ * @typedef BillTotal
696
+ * @since 0.1.0
697
+ */
698
+ declare type BillTotal = {
699
+ /** Normal bill total category */
700
+ NORMAL?: BillTotalCategory;
701
+ /** Points bill total category */
702
+ POINTS?: BillTotalCategory;
703
+ };
704
+ /**
705
+ * Representation of a Bill Total Category.
706
+ *
707
+ * @interface BillTotalCategory
708
+ * @since 0.1.0
709
+ */
710
+ interface BillTotalCategory {
711
+ /** Bill total category subtotal without taxes */
712
+ subtotalBeforeTaxes: number;
713
+ /** Bill total category total taxes */
714
+ taxTotal: number;
715
+ /** Bill total category total */
716
+ total: number;
717
+ /** discounts shopping cart */
718
+ discounts: Discount[];
719
+ /** Taxes shopping cart */
720
+ taxes: PriceCategoryTax[];
721
+ }
722
+ /**
723
+ * Representation of shopping cart discount.
724
+ *
725
+ * @interface Discounts
726
+ * @since 0.1.0
727
+ */
728
+ interface Discount {
729
+ benefitId: number;
730
+ /** Benefit wallet id */
731
+ benefitWalletId: number;
732
+ /** Discount base value */
733
+ discountBase: number;
734
+ /** Whether or not the coupon has taxes */
735
+ hasTaxes: boolean;
736
+ /** If the coupon discount has been initialized */
737
+ isInitialized: boolean;
738
+ /** The benefit name */
739
+ name: string;
740
+ /** The benefit percentage */
741
+ percentage: number;
742
+ /** The benefit taxes */
743
+ taxValue: number;
744
+ /** The benefit type */
745
+ type: BenefitTypes;
746
+ /** The discount value */
747
+ value: number;
748
+ }
749
+ /**
750
+ * Representation of a Cart Totals.
751
+ *
752
+ * @interface CartTotals
753
+ * @since 0.1.0
754
+ */
755
+ interface CartTotals {
756
+ /** Cart totals subtotal */
757
+ subtotal: number;
758
+ /** Cart totals shipping cost */
759
+ shippingCost: number;
760
+ }
761
+
762
+ /**
763
+ * Representation of a Commerce Product.
764
+ *
765
+ * @typedef Product
766
+ * @template T Product additional info
767
+ * @template U Categories additional info
768
+ * @since 0.1.0
769
+ */
770
+ declare type Product<T extends AdditionalInfo = AdditionalInfo, U extends AdditionalInfo = AdditionalInfo> = BaseProduct<T> | ProductDetails<T, U> | CartProduct<T, U>;
771
+ /**
772
+ * Base product attributes.
773
+ *
774
+ * @interface BaseProduct
775
+ * @since 0.1.0
776
+ */
777
+ interface BaseProduct<T extends AdditionalInfo = AdditionalInfo> {
778
+ /** Product unique identifier */
779
+ productId: string;
780
+ /** The name of the product */
781
+ name: string;
782
+ /** The description of the product */
783
+ description: string;
784
+ /** The type of the product, see {@link ProductType} */
785
+ type: ProductType;
786
+ /** The cover url of the product */
787
+ coverUrl: string;
788
+ /** Product prices, see {@link ProductPrices} */
789
+ prices: ProductPrices;
790
+ /** Indicates if a product can be added directly to cart */
791
+ addDirectlyToCart: boolean;
792
+ /** Indicates if a product is out of service */
793
+ outOfService: boolean;
794
+ /** Indicates if a product is out of stock */
795
+ outOfStock: boolean;
796
+ /** The stock of the product */
797
+ stock: number;
798
+ /** The measure of the product */
799
+ measure: string;
800
+ /** Product attributes, see {@link ProductAttributes} */
801
+ attributes: ProductAttributes;
802
+ /** The suggested price of the product */
803
+ suggestedPrice: string;
804
+ /** Indicates if a product is available */
805
+ available: boolean;
806
+ /** Array of product images, see {@link CDNImage} */
807
+ images: CDNImage[];
808
+ /** The standard time of the product */
809
+ standardTime: string;
810
+ /** Indicates if a product is sponsored */
811
+ sponsored: boolean;
812
+ /** The status of the product, see {@link ProductStatus} */
813
+ status: ProductStatus;
814
+ /** Product additional info */
815
+ additionalInfo?: T;
816
+ /** Up-sell products related to the base product */
817
+ upSelling?: BaseProduct[];
818
+ }
819
+ /**
820
+ * Product prices attributes.
821
+ *
822
+ * @interface ProductPrices
823
+ * @since 0.1.0
824
+ */
825
+ interface ProductPrices {
826
+ /** Normal price category, see {@link PriceCategory} */
827
+ NORMAL: PriceCategory;
828
+ /** Points price category, see {@link PriceCategory} */
829
+ POINTS: PriceCategory;
830
+ }
831
+ /**
832
+ * Price category attributes.
833
+ *
834
+ * @interface PriceCategory
835
+ * @since 0.1.0
836
+ */
837
+ interface PriceCategory {
838
+ /** Price category type, see {@link PriceCategoryType} */
839
+ category: PriceCategoryType;
840
+ /** Price category without taxes */
841
+ grossPrice: number;
842
+ /** Price category with taxes */
843
+ netPrice: number;
844
+ /** Currency' symbol */
845
+ symbol: string;
846
+ /** Array of price category' taxes, see {@link PriceCategoryTax} */
847
+ taxes: PriceCategoryTax[];
848
+ /** Array of discounts applied to the price category */
849
+ discounts: any[];
850
+ /** Total discounts without taxes */
851
+ discountGrossPrice: number;
852
+ /** Total discounts with taxes */
853
+ discountNetPrice: number;
854
+ /** Total discounts applied to the price category */
855
+ discount: number;
856
+ }
857
+ /**
858
+ * Price category tax attributes.
859
+ *
860
+ * @interface PriceCategoryTax
861
+ * @since 0.1.0
862
+ */
863
+ interface PriceCategoryTax {
864
+ /** Price category' tax percentage */
865
+ percentage: number;
866
+ /** Price category' tax name, see {@link TaxType} */
867
+ name: TaxType;
868
+ /** Price category' value added tax rate */
869
+ vatRateCode: number;
870
+ /** Price category' tax code */
871
+ code: number;
872
+ /** Price category' value added tax */
873
+ vatRate: string;
874
+ }
875
+ /**
876
+ * Additional product attributes.
877
+ *
878
+ * @interface ProductAttributes
879
+ * @since 0.1.0
880
+ */
881
+ interface ProductAttributes {
882
+ /** Product's quantity, the attribute is not in camel case purposefully */
883
+ Cantidad: string;
884
+ /** Product external id */
885
+ externalId: string;
886
+ /** Whether or not to show product in menu */
887
+ showInMenu: boolean;
888
+ }
889
+ /**
890
+ * The product status.
891
+ *
892
+ * @typedef ProductStatus
893
+ * @since 0.1.0
894
+ **/
895
+ declare type ProductStatus = "ACTIVE" | "INACTIVE";
896
+ /**
897
+ * Product type's possible values.
898
+ *
899
+ * @typedef ProductType
900
+ * @since 0.1.0
901
+ **/
902
+ declare type ProductType = "PRODUCT" | "MODIFIER";
903
+ /**
904
+ * Price category's possible values.
905
+ *
906
+ * @typedef PriceCategoryType
907
+ * @since 0.1.0
908
+ **/
909
+ declare type PriceCategoryType = "NORMAL" | "POINTS";
910
+ /**
911
+ * Tax's possible values.
912
+ *
913
+ * @typedef TaxType
914
+ * @since 0.1.0
915
+ **/
916
+ declare type TaxType = "IVA";
917
+ /**
918
+ * Weekday product's schedule.
919
+ *
920
+ * @interface DayOfWeek
921
+ * @since 0.1.0
922
+ */
923
+ interface DayOfWeek {
924
+ /** Week day in uppercase, see {@link BaseWeekDay} */
925
+ day: BaseWeekDay;
926
+ /**
927
+ * `Date` value representing the start time in which
928
+ * the product is available */
929
+ from: number;
930
+ /**
931
+ * `Date` value representing the end time in which
932
+ * the product is available */
933
+ to: number;
934
+ }
935
+ /**
936
+ * The representation of a product question.
937
+ *
938
+ * @interface ProductQuestion
939
+ * @template T Product answers additional info
940
+ * @since 0.1.0
941
+ */
942
+ interface ProductQuestion<T extends AdditionalInfo = AdditionalInfo> {
943
+ /** Product question id */
944
+ questionId: string;
945
+ /** Product question name */
946
+ name: string;
947
+ /** Product question description */
948
+ description: string | null;
949
+ /** Product question minimum number of allowed answers */
950
+ min: number;
951
+ /** Product question maximum number of allowed answers */
952
+ max: number;
953
+ /** Product question type */
954
+ type: string | null;
955
+ /**
956
+ * Array of possible answers to a product question,
957
+ * see {@link ProductAnswer}
958
+ */
959
+ answers: ProductAnswer<T>[];
960
+ /** Array of product question images to display, see {@link CDNImage} */
961
+ images: CDNImage[] | undefined;
962
+ }
963
+ /**
964
+ * Product details attributes.
965
+ *
966
+ * @interface ProductDetails
967
+ * @template T Product additional info
968
+ * @template U Categories additional info
969
+ * @since 0.1.0
970
+ * @extends {{@link BaseProduct}
971
+ */
972
+ interface ProductDetails<T extends AdditionalInfo = AdditionalInfo, U extends AdditionalInfo = AdditionalInfo> extends BaseProduct<T> {
973
+ /** Indicates if a product has a price vip */
974
+ isPriceVip: boolean;
975
+ /** Manufacturer The manufacturer of the product */
976
+ manufacturer: string[];
977
+ /** The max amount for sale of the product */
978
+ maxAmountForSale: number;
979
+ /** Array of product schedules, see {@link DayOfWeek} */
980
+ schedule: DayOfWeek[];
981
+ /** Array of product questions, see {@link ProductQuestion} */
982
+ questions: ProductQuestion<T>[];
983
+ /** The benefit id of the product */
984
+ benefitId: number | null;
985
+ /** An array of categories which the product belongs to, see {@link Category} */
986
+ categories: Category<U>[] | null;
987
+ }
988
+ /**
989
+ * Common props for products and answers.
990
+ *
991
+ * @typedef BaseAnswersProps
992
+ * @since 0.1.0
993
+ */
994
+ declare type BaseAnswersProps = "name" | "prices" | "attributes" | "productId" | "type" | "images" | "questions" | "additionalInfo";
995
+ /**
996
+ * The shared fields of any Answer.
997
+ *
998
+ * @interface BaseAnswer
999
+ * @since 0.1.0
1000
+ * @extends Pick<ProductDetails,BaseAnswersProps>, see
1001
+ * {@link ProductDetails} and {@link BaseAnswersProps}
1002
+ * for further information
1003
+ */
1004
+ declare type BaseAnswer<T extends ProductDetails, U extends keyof T = BaseAnswersProps> = Pick<T, U> & {
1005
+ /** Type of question to render */
1006
+ renderType: string | null;
1007
+ };
1008
+ /**
1009
+ * A product modifier answer.
1010
+ *
1011
+ * @interface ProductAnswer
1012
+ * @template T Product additional info
1013
+ * @since 0.1.0
1014
+ * @extends BaseAnswer<ProductDetails>, see
1015
+ * {@link ProductDetails} and {@link BaseAnswer}
1016
+ * for further information
1017
+ */
1018
+ interface ProductAnswer<T extends AdditionalInfo = AdditionalInfo> extends BaseAnswer<ProductDetails<T>> {
1019
+ }
1020
+ /**
1021
+ * Common props for cart products and answers.
1022
+ *
1023
+ * @typedef CartAnswersProps
1024
+ * @since 0.1.0
1025
+ */
1026
+ declare type CartAnswersProps = BaseAnswersProps | "amount" | "priceCategory" | "comment" | "questionsAndAnswers";
1027
+ /**
1028
+ * Representation of a Commerce Cart Product Answer.
1029
+ *
1030
+ * @interface CartProductAnswer
1031
+ * @template T Product additional info
1032
+ * @since 0.1.0
1033
+ * @extends {{@link BaseAnswer}
1034
+ */
1035
+ interface CartProductAnswer<T extends AdditionalInfo = AdditionalInfo> extends BaseAnswer<CartProduct<T>, CartAnswersProps> {
1036
+ /** Question unique identifier */
1037
+ questionId: string;
1038
+ }
1039
+ /**
1040
+ * Representation of a Commerce Cart Product Question.
1041
+ *
1042
+ * @interface CartProductQuestion
1043
+ * @template T Product additional info
1044
+ * @since 0.1.0
1045
+ * @extends {{@link ProductQuestion}
1046
+ */
1047
+ interface CartProductQuestion<T extends AdditionalInfo = AdditionalInfo> extends ProductQuestion {
1048
+ /** Array of possible answers to the question */
1049
+ answers: CartProductAnswer<T>[];
1050
+ }
1051
+ /**
1052
+ * Representation of a Commerce Cart Product.
1053
+ *
1054
+ * @interface CartProduct
1055
+ * @template T Product additional info
1056
+ * @template U Categories additional info
1057
+ * @since 0.1.0
1058
+ * @extends {{@link ProductDetails}
1059
+ */
1060
+ interface CartProduct<T extends AdditionalInfo = AdditionalInfo, U extends AdditionalInfo = AdditionalInfo> extends ProductDetails<T, U> {
1061
+ /** Quantity of allowed cart products */
1062
+ amount: number;
1063
+ /** Cart product price category */
1064
+ priceCategory: PriceCategoryType;
1065
+ /** Comment associated with the cart product */
1066
+ comment: string;
1067
+ /** Array of possible questions and answers associated with the product*/
1068
+ questionsAndAnswers: CartProductQuestion[];
1069
+ /** Cart product unique identifier */
1070
+ hash: string;
1071
+ /** Cart product creation date */
1072
+ createdAt: string;
1073
+ /** Cart product updating date */
1074
+ updatedAt: string;
1075
+ /** Array of alerts associated with the cart product */
1076
+ alerts: Alert[];
1077
+ }
1078
+
1079
+ /**
1080
+ * Wallet user information.
1081
+ *
1082
+ * @interface Wallet
1083
+ * @since 0.1.0
1084
+ */
1085
+ interface Wallet {
1086
+ /** {@link Benefit}'s array from firestore user wallet */
1087
+ benefits: Benefit[];
1088
+ }
1089
+ /**
1090
+ * Benefit information.
1091
+ *
1092
+ * @interface Benefit
1093
+ * @since 0.1.0
1094
+ */
1095
+ interface Benefit {
1096
+ /** The account id of the benefit */
1097
+ accountId: number;
1098
+ /**
1099
+ * An array of benefit awards if the benefit is of `PRODUCT` type, and an
1100
+ * object if the benefit is of `ALTER_DELIVERY` or `DISCOUNT` type,
1101
+ * see {@link Award}
1102
+ * */
1103
+ award: Award | Award[];
1104
+ /** Benefit id */
1105
+ benefitId: number;
1106
+ /** Benefit wallet id */
1107
+ benefitWalletId: number;
1108
+ /** The channel id of the benefit */
1109
+ channelId: number;
1110
+ /** Benefit code in back-end */
1111
+ code: null;
1112
+ /** Combined */
1113
+ combined: string;
1114
+ /** Benefit creation date */
1115
+ createdAt: string;
1116
+ /** Benefit description */
1117
+ description: string;
1118
+ /** Benefit discount percentage */
1119
+ discountPercentage: number | null;
1120
+ /** Benefit discount fixed */
1121
+ discountFixed: string | null;
1122
+ /** Benefit expiration date */
1123
+ expirationDate: string;
1124
+ /** External benefit id */
1125
+ externalId: null;
1126
+ /** The user wallet id */
1127
+ hash: string;
1128
+ /** Benefit images, see {@link CDNImage} */
1129
+ image: CDNImage[];
1130
+ /** The award limit */
1131
+ limitAward: null;
1132
+ /** The benefit limit */
1133
+ limitBenefit: number;
1134
+ /** The logic operator of the benefit */
1135
+ logicOperator: string;
1136
+ /** Benefit stock */
1137
+ quantity: number;
1138
+ /** The rules of the benefit */
1139
+ rules: any[];
1140
+ /** The benefit title */
1141
+ title: string;
1142
+ /** Benefit type, see {@link BenefitTypes} */
1143
+ type: BenefitTypes;
1144
+ /** Benefit update date */
1145
+ updatedAt: string;
1146
+ /** The vendor id of the benefit */
1147
+ vendorId: Vendor["id"];
1148
+ }
1149
+ /**
1150
+ * Award information.
1151
+ *
1152
+ * @interface Award
1153
+ * @since 0.1.0
1154
+ */
1155
+ interface Award {
1156
+ /** The id of the award */
1157
+ id: number;
1158
+ /** The id of the benefit */
1159
+ benefitId: number;
1160
+ /** Benefit discount percentage */
1161
+ discountPercentage: number;
1162
+ /** Benefit discount value */
1163
+ discountValue: null;
1164
+ /** Quantity of allowed products */
1165
+ amount: number;
1166
+ /** Product description associated with the benefit award */
1167
+ productDescription: string;
1168
+ /** Product unique identifier associated with the benefit award */
1169
+ productId: number;
1170
+ /** The vendor id of the award */
1171
+ vendorId: Vendor["id"];
1172
+ }
1173
+ /**
1174
+ * Applied benefit array in shopping cart.
1175
+ *
1176
+ * @typedef ShoppingCartBenefits
1177
+ * @since 0.1.0
1178
+ */
1179
+ declare type ShoppingCartBenefits = Benefit[];
1180
+ /**
1181
+ * The possible values of the benefit type.
1182
+ *
1183
+ * @typedef BenefitTypes
1184
+ * @since 0.1.0
1185
+ */
1186
+ declare type BenefitTypes = "ALTER_DELIVERY" | "PRODUCT" | "DISCOUNT_FIXED" | "DISCOUNT_PERCENTAGE";
1187
+ /**
1188
+ * Redeemed coupon related data.
1189
+ *
1190
+ * @interface RedeemCouponData
1191
+ * @since 0.1.0
1192
+ */
1193
+ interface BenefitData {
1194
+ /** Benefit account unique identifier */
1195
+ account_id: number;
1196
+ /** Benefit data amount */
1197
+ amount: number | null;
1198
+ /** Indicates if the benefit is redeemed automatically */
1199
+ automatic_redeemed: string;
1200
+ /** Benefit code */
1201
+ code: string | null;
1202
+ /** Indicates if the benefit is combined or not */
1203
+ combined: string;
1204
+ /** Benefit days */
1205
+ days: null;
1206
+ /** Benefit description */
1207
+ description: string;
1208
+ /** Benefit discount percentage */
1209
+ discount_percentage: number;
1210
+ /** Benefit end date */
1211
+ end_date: string;
1212
+ /** Benefit error validation */
1213
+ error_validation: string;
1214
+ /** Benefit expired date */
1215
+ expiration_date: string;
1216
+ /** Benefit external id */
1217
+ external_id: string | null;
1218
+ /** Benefit data unique identifier */
1219
+ id: number;
1220
+ /** Benefit image */
1221
+ image: null;
1222
+ /** Benefit instruction */
1223
+ instruction: null;
1224
+ /** Benefit award limit */
1225
+ limit_award: null;
1226
+ /** Benefit limit */
1227
+ limit_benefit: number;
1228
+ /** Benefit logic operator */
1229
+ logic_operator: string;
1230
+ /** Benefit name */
1231
+ name: string;
1232
+ /** Benefit quantity */
1233
+ quantity: number;
1234
+ /** An array of coupon products, see {@link BenefitData} */
1235
+ products: ProductCoupon[];
1236
+ /** Array of benefit rules */
1237
+ rules: any[];
1238
+ /** Benefit spend */
1239
+ spend: number;
1240
+ /** Benefit start date */
1241
+ start_date: string;
1242
+ /** Benefit status */
1243
+ status: string;
1244
+ /** Benefit stock */
1245
+ stock: number;
1246
+ /** Benefit success message */
1247
+ success_message: string;
1248
+ /** Benefit term and condition */
1249
+ term_and_condition: string;
1250
+ /** Benefit type */
1251
+ type: string;
1252
+ /** Benefit type alias */
1253
+ type_alias: string;
1254
+ /** Benefit unit */
1255
+ unit: null;
1256
+ /** Coupon vendor unique identifier */
1257
+ vendor_id: Vendor["id"];
1258
+ }
1259
+ /**
1260
+ * Product coupon associated with a benefit.
1261
+ *
1262
+ * @interface ProductCoupon
1263
+ * @since 0.1.0
1264
+ */
1265
+ interface ProductCoupon {
1266
+ /** Product coupon amount */
1267
+ amount: number;
1268
+ /** Product coupon benefit unique identifier */
1269
+ benefitId: number;
1270
+ /** Product coupon discount percentage */
1271
+ discountPercentage: number;
1272
+ /** Product coupon discount */
1273
+ discountValue: number | null;
1274
+ /** Product coupon id */
1275
+ id: number;
1276
+ /** Product description */
1277
+ productDescription: string | null;
1278
+ /** Product unique identifier */
1279
+ productId: number | null;
1280
+ /** Coupon swap product unique identifier */
1281
+ swapProductId: null;
1282
+ /** Coupon vendor unique identifier */
1283
+ vendorId: Vendor["id"];
1284
+ }
1285
+ /**
1286
+ * Representation of a store coupon.
1287
+ *
1288
+ * @interface StoreCoupon
1289
+ * @since 0.1.0
1290
+ */
1291
+ interface StoreCoupon {
1292
+ /** An array of coupons, see {@link Coupon} */
1293
+ coupons: Coupon[];
1294
+ /** Whether or not the store coupon is featured */
1295
+ featured: boolean;
1296
+ /** Store coupon unique identifier */
1297
+ id: number;
1298
+ /** Store coupon name */
1299
+ name: string;
1300
+ /** Store coupon vendor unique identifier */
1301
+ vendor_id: Vendor["id"];
1302
+ }
1303
+ /**
1304
+ * Representation of a coupon associated to the store.
1305
+ *
1306
+ * @interface Coupon
1307
+ * @since 0.1.0
1308
+ */
1309
+ interface Coupon {
1310
+ /**
1311
+ * An array of benefits associated with the coupon,
1312
+ * see {@link BenefitData}
1313
+ */
1314
+ benefits: BenefitData[];
1315
+ /** Coupon category, see {@link CouponCategory} */
1316
+ category: CouponCategory;
1317
+ /** An array of codes associated with the coupon, see {@link Code} */
1318
+ codes: Code[];
1319
+ /** Coupon end date */
1320
+ end_date: string;
1321
+ /** Coupon unique identifier */
1322
+ id: number;
1323
+ /** Coupon image */
1324
+ image: URLImage | null;
1325
+ /** Coupon name */
1326
+ name: string;
1327
+ /** Whether or not the coupon is exclusive to one store */
1328
+ only_store: boolean;
1329
+ /** Coupon spend quantity */
1330
+ spend: number;
1331
+ /** Coupon start date */
1332
+ start_date: string;
1333
+ /** Coupon status, see {@link ProductStatus} */
1334
+ status: ProductStatus;
1335
+ /** Coupon stock */
1336
+ stock: number;
1337
+ /** Coupon term and condition */
1338
+ term_and_condition: string;
1339
+ /** Coupon text */
1340
+ text: string;
1341
+ /** Coupon type, see {@link CouponType} */
1342
+ type: CouponType;
1343
+ /** Coupon vendor unique identifier */
1344
+ vendor_id: Vendor["id"];
1345
+ }
1346
+ /**
1347
+ * The possible values of a coupon type.
1348
+ *
1349
+ * @typedef CouponType
1350
+ * @since 0.1.0
1351
+ */
1352
+ declare type CouponType = "COUPON" | "MIX";
1353
+ /**
1354
+ * Coupon category object associated with a store coupon.
1355
+ *
1356
+ * @interface CouponCategory
1357
+ * @since 0.1.0
1358
+ */
1359
+ interface CouponCategory {
1360
+ /** Whether or not the store coupon category is featured */
1361
+ featured: boolean;
1362
+ /** Coupon category unique identifier */
1363
+ id: number;
1364
+ /** Coupon category name */
1365
+ name: string;
1366
+ }
1367
+ /**
1368
+ * Code object associated with a coupon.
1369
+ *
1370
+ * @interface Code
1371
+ * @since 0.1.0
1372
+ */
1373
+ interface Code {
1374
+ /** The code associated with the coupon */
1375
+ code: string;
1376
+ /** Coupon code unique identifier */
1377
+ coupon_id: number;
1378
+ /** Code unique identifier */
1379
+ id: number;
1380
+ /** The token corresponding to a QR code */
1381
+ jwt: Token | null;
1382
+ /** The status of the code, see {@link ProductStatus} */
1383
+ status: ProductStatus;
1384
+ /** Whether or not the code has been used */
1385
+ used: boolean;
1386
+ }
1387
+ /**
1388
+ * An object which contains the token corresponding to a QR code.
1389
+ *
1390
+ * @interface Token
1391
+ * @since 0.1.0
1392
+ */
1393
+ interface Token {
1394
+ /** Token associated with the coupon code */
1395
+ token: string;
1396
+ /** Coupon QR code expiration time */
1397
+ dif: number;
1398
+ /** Coupon expiration date */
1399
+ exp: number;
1400
+ /** Coupon international atomic time */
1401
+ iat: number;
1402
+ }
1403
+ /**
1404
+ * Representation of a store coupon detail, omits the coupon category.
1405
+ *
1406
+ * @interface StoreCouponDetail
1407
+ * @since 0.1.0
1408
+ * @extends {{@link Coupon}
1409
+ */
1410
+ interface StoreCouponDetail extends Omit<Coupon, "category"> {
1411
+ }
1412
+
1413
+ /**
1414
+ * Representation of a Commerce Banner.
1415
+ *
1416
+ * @interface Banner
1417
+ * @since 0.1.0
1418
+ */
1419
+ interface Banner<T extends AdditionalInfo = AdditionalInfo> {
1420
+ /** Banner category id */
1421
+ banner_category_id: number;
1422
+ /** Banner description */
1423
+ banner_description: string;
1424
+ /** Banner qr code */
1425
+ banner_qr_code: string;
1426
+ /** Banner title */
1427
+ banner_title: string;
1428
+ /** Banner type, see {@link BannerType} */
1429
+ banner_type: BannerType;
1430
+ /** Banner image url */
1431
+ banner_url: string | null;
1432
+ /** Banner's benefits */
1433
+ benefits: BannerBenefits[] | null;
1434
+ /** Banner category id */
1435
+ category_id: number | null;
1436
+ /** Banner category name */
1437
+ category_name: string | null;
1438
+ /** Banner channel's id */
1439
+ channel_id: number | null;
1440
+ /** Banner coupon's code */
1441
+ coupon: BannerCoupon | null;
1442
+ /** Banner coupon's id */
1443
+ coupon_id: number | null;
1444
+ /** The bucket where the image is saved */
1445
+ image_bucket: string | null;
1446
+ /** he cloud where the banner is saved, see {@link CDNImage} */
1447
+ image_cloud_front_url: CDNImage["cloudFrontUrl"];
1448
+ /** Banner image's filename */
1449
+ image_file_name: string;
1450
+ /** The directory where the banner image is saved */
1451
+ image_key: string;
1452
+ /** The url where the banner image is saved */
1453
+ image_url: string;
1454
+ /** An array of banner images, see {@link BannerImage} */
1455
+ images: BannerImage[];
1456
+ /** Banner product's id */
1457
+ product_id: number | null;
1458
+ /** Banner product's name */
1459
+ product_name: string | null;
1460
+ /** Banner's section */
1461
+ section: null;
1462
+ /** Banner's scope, see {@link BannerScope} */
1463
+ scope: BannerScope;
1464
+ /** Banner stores array */
1465
+ stores: unknown[];
1466
+ /** Banner vendor's id */
1467
+ vendor_id: number;
1468
+ /** Banner vendor's name */
1469
+ vendor_name: string;
1470
+ /** Banner additional info */
1471
+ additionalInfo?: T;
1472
+ }
1473
+ /**
1474
+ * The possible values of the banner's type.
1475
+ *
1476
+ * @typedef BannerType
1477
+ * @since 0.1.0
1478
+ */
1479
+ declare type BannerType = "INFO" | "URL" | "PRODUCT" | "COUPON" | "COUPON_QR" | "CATEGORY" | "SECTION";
1480
+ /**
1481
+ * The possible values of the banner's scope.
1482
+ *
1483
+ * @typedef BannerScope
1484
+ * @since 0.1.0
1485
+ */
1486
+ declare type BannerScope = "WEB" | "GLOBAL" | "APP";
1487
+ /**
1488
+ * Representation of a Banner image.
1489
+ *
1490
+ * @interface BannerImage
1491
+ * @since 0.1.0
1492
+ */
1493
+ interface BannerImage {
1494
+ /** Banner's id */
1495
+ id: number;
1496
+ /** Banner image's filename */
1497
+ file_name: string;
1498
+ /** Banner image's filename */
1499
+ image_file_name: string;
1500
+ /** Banner image's directory */
1501
+ image_key: string;
1502
+ /** The url where the banner image is saved */
1503
+ image_url: string;
1504
+ /** Banner's position inside the banner images array */
1505
+ position: number;
1506
+ /** The url where the banner image is saved */
1507
+ url: string;
1508
+ }
1509
+ /**
1510
+ * Representation of a Banner benefits.
1511
+ *
1512
+ * @interface BannerBenefits
1513
+ * @since 0.1.0
1514
+ */
1515
+ interface BannerBenefits {
1516
+ id: number;
1517
+ name: string;
1518
+ }
1519
+ /**
1520
+ * Representation of a Banner coupon.
1521
+ *
1522
+ * @interface BannerCoupon
1523
+ * @since 0.1.0
1524
+ */
1525
+ interface BannerCoupon {
1526
+ name: string;
1527
+ only_store: boolean;
1528
+ coupon_type: CouponType;
1529
+ }
1530
+
1531
+ /**
1532
+ * Representation of a Commerce Billing Data.
1533
+ *
1534
+ * @interface BillingData
1535
+ * @since 0.1.0
1536
+ */
1537
+ interface BaseBillingData<T extends AdditionalInfo = AdditionalInfo> {
1538
+ /** Billing's nickname */
1539
+ nickname: string;
1540
+ /** Billing's associated user complete name */
1541
+ name: string;
1542
+ /** Billing's associated document type, see {@link DocumentType} */
1543
+ documentType: DocumentType;
1544
+ /** Billing's associated document */
1545
+ document: string;
1546
+ /** Billing's associated user address */
1547
+ address: string;
1548
+ /** Billing's associated user phone without country calling code */
1549
+ phone: string;
1550
+ /** Billing's associated user email */
1551
+ email: string;
1552
+ /** Whether or not the billing is default */
1553
+ default: boolean;
1554
+ /** It contains country id and country name, see {@link CountrySummary} */
1555
+ country: CountrySummary;
1556
+ /** Additional billing information */
1557
+ additionalInfo?: T;
1558
+ }
1559
+ /**
1560
+ * Representation of a billing data saved on a database.
1561
+ *
1562
+ * @interface BillingData
1563
+ * @since 0.1.0
1564
+ * @extends {{@link BaseBillingData}
1565
+ */
1566
+ interface BillingData<T extends AdditionalInfo = AdditionalInfo> extends BaseBillingData<T> {
1567
+ /** Billing's auto generated id */
1568
+ id: number;
1569
+ }
1570
+
1571
+ /**
1572
+ * Artisn's supported currency codes.
1573
+ *
1574
+ * @typedef CurrencyCodes
1575
+ * @since 0.1.0
1576
+ */
1577
+ declare type CurrencyCodes = "USD" | "ARS" | "COP" | "CLP" | "VES";
1578
+
1579
+ /**
1580
+ * Fulfillment workflow.
1581
+ *
1582
+ * @interface Workflow
1583
+ * @since 0.5.15
1584
+ */
1585
+ interface Workflow<T extends AdditionalInfo = AdditionalInfo> {
1586
+ /** Workflow description */
1587
+ description: string;
1588
+ /** Workflow unique identifier */
1589
+ id: number;
1590
+ /** Workflow name */
1591
+ name: string;
1592
+ /** An array of workflow steps, see {@link StepWorkflow} */
1593
+ steps: StepWorkflow[];
1594
+ /** An array of webhook workflows, see {@link WebhookWorkflow} */
1595
+ webhooks: WebhookWorkflow[];
1596
+ /** Workflow additional info */
1597
+ additionalInfo?: T;
1598
+ }
1599
+ /**
1600
+ * The possible values of the step category.
1601
+ *
1602
+ * @typedef StepCategory
1603
+ * @since 0.5.15
1604
+ */
1605
+ declare type StepCategory = "TO_DO" | "PAYMENT_IN_PROGRESS" | "IN_PROGRESS" | "DONE";
1606
+ /**
1607
+ * The possible values of the step code.
1608
+ *
1609
+ * @typedef StepCode
1610
+ * @since 0.5.15
1611
+ */
1612
+ declare type StepCode = "START" | "IN_PROGRESS" | "ORDERED" | "RECEIVED" | "TO_ASSIGN" | "ASSIGNED" | "ON_ROUTE" | "DISPATCHED" | "CANCELED" | "ERROR";
1613
+ /**
1614
+ * The notification associated with the step.
1615
+ *
1616
+ * @interface StepNotification
1617
+ * @since 0.5.15
1618
+ */
1619
+ interface StepNotification {
1620
+ /** Whether or not to send mail when reaching this step */
1621
+ send_mail: boolean;
1622
+ /** Whether or not to send push when reaching this step */
1623
+ send_push: boolean;
1624
+ }
1625
+ /**
1626
+ * The step where the workflow is located.
1627
+ *
1628
+ * @interface StepWorkflow
1629
+ * @since 0.5.15
1630
+ */
1631
+ interface StepWorkflow {
1632
+ /** Step workflow additional info, see {@link StepWorkflowAdditionalInfo} */
1633
+ additional_info: StepWorkflowAdditionalInfo;
1634
+ /** Step workflow category, , see {@link StepCategory} */
1635
+ category: StepCategory;
1636
+ /** Step workflow code, , see {@link StepCode} */
1637
+ code: StepCode;
1638
+ /** Step workflow color */
1639
+ color: string;
1640
+ /** Step workflow description */
1641
+ description: string;
1642
+ /** Step workflow description to use on front end */
1643
+ description_frontend: string | null;
1644
+ /** Step workflow id */
1645
+ id: number;
1646
+ /** Step workflow name */
1647
+ name: string;
1648
+ /** Step workflow subtitle to use on front end */
1649
+ subtitle_frontend: string | null;
1650
+ /** Step workflow title to use on front end */
1651
+ title_frontend: string | null;
1652
+ /** Step workflow transitions, see {@link TransitionWorkflow} */
1653
+ transitions: TransitionWorkflow[];
1654
+ /** Step notification, see {@link StepNotification} */
1655
+ notification: StepNotification;
1656
+ }
1657
+ /**
1658
+ * Step workflow additional info.
1659
+ *
1660
+ * @interface StepWorkflowAdditionalInfo
1661
+ * @since 0.5.15
1662
+ */
1663
+ interface StepWorkflowAdditionalInfo {
1664
+ /** Whether or not to use the step workflow client on front end */
1665
+ client_frontend: boolean;
1666
+ /** Step workflow group, see {@link StepWorkflowGroup} */
1667
+ group: StepWorkflowGroup;
1668
+ /** Whether or not to use the step workflow operators to use on front end */
1669
+ operators_frontend: boolean;
1670
+ }
1671
+ /**
1672
+ * Step workflow group.
1673
+ *
1674
+ * @interface StepWorkflowGroup
1675
+ * @since 0.5.15
1676
+ */
1677
+ interface StepWorkflowGroup {
1678
+ /** Group code, see {@link StepCode} */
1679
+ code: StepCode;
1680
+ /** Group description */
1681
+ description: string;
1682
+ /** Group type */
1683
+ type: "default";
1684
+ /** Group weight */
1685
+ weight: string;
1686
+ }
1687
+ /**
1688
+ * The possible transitions of the workflow.
1689
+ *
1690
+ * @interface TransitionWorkflow
1691
+ * @since 0.5.15
1692
+ */
1693
+ interface TransitionWorkflow {
1694
+ /** Channel unique identifier */
1695
+ channel_id: number;
1696
+ /** Transition workflow conditions */
1697
+ conditions: any[];
1698
+ /** Transition workflow description */
1699
+ description: string;
1700
+ /** The step id where the transition comes from */
1701
+ from_step_id: number;
1702
+ /** Transition workflow unique identifier */
1703
+ id: number;
1704
+ /** Transition workflow name */
1705
+ name: string;
1706
+ /** The step id where the transition can go */
1707
+ to_step_id: number;
1708
+ /** Vendor unique identifier */
1709
+ vendor_id: number;
1710
+ }
1711
+ /**
1712
+ * Workflow webhook.
1713
+ *
1714
+ * @interface WebhookWorkflow
1715
+ * @since 0.5.15
1716
+ */
1717
+ interface WebhookWorkflow {
1718
+ /** Webhook workflow unique identifier */
1719
+ id: number;
1720
+ /** Webhook workflow method type */
1721
+ method: string;
1722
+ /** Webhook workflow url */
1723
+ url: string;
1724
+ }
1725
+ /**
1726
+ * Representation of a Issue object.
1727
+ *
1728
+ * @interface Issue
1729
+ * @since 0.5.15
1730
+ */
1731
+ interface IssueAdditionalInfo {
1732
+ /** User unique identifier */
1733
+ uid: string;
1734
+ /** Array of stores id */
1735
+ stores: number[];
1736
+ }
1737
+ /**
1738
+ * Representation of a Issue history.
1739
+ *
1740
+ * @interface Issue
1741
+ * @since 0.5.15
1742
+ */
1743
+ interface IssueHistory {
1744
+ /** History unique identifier */
1745
+ id: number;
1746
+ /** Transition unique identifier */
1747
+ transition_id: number;
1748
+ /** Step unique identifier */
1749
+ step_id: number;
1750
+ /** Step name */
1751
+ step_name: string;
1752
+ /** History additional info, see {@link IssueAdditionalInfo} */
1753
+ additional_info: IssueAdditionalInfo;
1754
+ /** History conditions */
1755
+ conditions: any[];
1756
+ /** History creation Date */
1757
+ created_at: string;
1758
+ /** History finished Date */
1759
+ finished_at: string;
1760
+ }
1761
+ /**
1762
+ * Representation of a Issue object.
1763
+ *
1764
+ * @interface Issue
1765
+ * @since 0.5.15
1766
+ */
1767
+ interface Issue {
1768
+ /** Issue unique identifier */
1769
+ id: number;
1770
+ /** Client issue unique identifier */
1771
+ client_issue_id: string;
1772
+ /** Workflow unique identifier */
1773
+ workflow_id: number;
1774
+ /** Parent issue unique identifier */
1775
+ parent_issue_id: null;
1776
+ /** Related issue unique identifier */
1777
+ related_issue_id: null;
1778
+ /** Step unique identifier */
1779
+ step_id: number;
1780
+ /** The step where the issue is located */
1781
+ step: StepWorkflow;
1782
+ /** Account unique identifier */
1783
+ account_id: number;
1784
+ /** Vendor unique identifier */
1785
+ vendor_id: number;
1786
+ /** Children issues */
1787
+ children: any[];
1788
+ /** Related issues */
1789
+ related: any[];
1790
+ /** Issue conditions */
1791
+ conditions: any[];
1792
+ /** Issue additional info, see {@link IssueAdditionalInfo} */
1793
+ additional_info: IssueAdditionalInfo;
1794
+ /** Issue history, see {@link IssueHistory} */
1795
+ history: IssueHistory[];
1796
+ /** Transaction unique identifier */
1797
+ transaction_id: number | null;
1798
+ }
1799
+
1800
+ /**
1801
+ * Representation of a Artisn request.
1802
+ *
1803
+ * @interface ArtisnRequest
1804
+ * @since 0.1.0
1805
+ */
1806
+ interface ArtisnRequest {
1807
+ /** Request's url */
1808
+ url: string;
1809
+ /** Request's headers, see {@link ArtisnRequestHeaders} */
1810
+ headers: ArtisnRequestHeaders;
1811
+ /** Request's body, see {@link ArtisnRequestBody} */
1812
+ body: ArtisnRequestBody;
1813
+ /** Request's query, see {@link ArtisnQuery} */
1814
+ query: ArtisnQuery;
1815
+ /** Request's params, see {@link ArtisnParams} */
1816
+ params: ArtisnParams;
1817
+ /** Request's method, see {@link ArtisnRequestMethod} */
1818
+ method?: ArtisnRequestMethod;
1819
+ }
1820
+ /**
1821
+ * Artisn request headers based on the fetch API.
1822
+ *
1823
+ * @typedef ArtisnRequestHeaders
1824
+ * @since 0.1.0
1825
+ */
1826
+ declare type ArtisnRequestHeaders = Headers;
1827
+ /**
1828
+ * Allowed methods for requests.
1829
+ *
1830
+ * @typedef ArtisnRequestMethod
1831
+ * @since 0.1.0
1832
+ */
1833
+ declare type ArtisnRequestMethod = "POST" | "GET" | "PUT" | "DELETE" | "PATCH";
1834
+ /**
1835
+ * Artisn request's body.
1836
+ *
1837
+ * @interface ArtisnRequestBody
1838
+ * @since 0.1.0
1839
+ * @property {any} [key:string] Object with key-value pairs
1840
+ */
1841
+ interface ArtisnRequestBody {
1842
+ [key: string]: any;
1843
+ }
1844
+ /**
1845
+ * Artisn request's body.
1846
+ *
1847
+ * @interface ArtisnQuery
1848
+ * @since 0.1.0
1849
+ * @property {string | number | boolean} [key:string] Object with key-value pairs
1850
+ */
1851
+ interface ArtisnQuery {
1852
+ [key: string]: string | number | boolean;
1853
+ }
1854
+ /**
1855
+ * Artisn request's params.
1856
+ *
1857
+ * @interface ArtisnParams
1858
+ * @since 0.1.0
1859
+ * @property {string | number} [key:string] Object with key-value pairs
1860
+ */
1861
+ interface ArtisnParams {
1862
+ [key: string]: string | number;
1863
+ }
1864
+
1865
+ /**
1866
+ * Representation of a living place base object.
1867
+ *
1868
+ * @interface BaseLivingPlace
1869
+ * @since 0.1.0
1870
+ */
1871
+ interface BaseLivingPlace {
1872
+ /** Living place's id */
1873
+ id: number;
1874
+ }
1875
+ /**
1876
+ * Representation of a living place.
1877
+ *
1878
+ * @interface LivingPlace
1879
+ * @since 0.1.0
1880
+ * @extends {{@link BaseLivingPlace}
1881
+ */
1882
+ interface LivingPlace extends BaseLivingPlace {
1883
+ /** Living place's name */
1884
+ name: string;
1885
+ /** Whether or not the living place is active */
1886
+ active: number;
1887
+ /** Country unique identifier */
1888
+ countryId: number;
1889
+ /** Array of fields required to save a living place, see {@link Field} */
1890
+ fields: Field[];
1891
+ }
1892
+ /**
1893
+ * Representation of a living place which will be saved.
1894
+ *
1895
+ * @interface LivingPlaceToSave
1896
+ * @since 0.1.0
1897
+ * @extends {{@link BaseLivingPlace}
1898
+ */
1899
+ interface LivingPlaceToSave extends BaseLivingPlace {
1900
+ /** Array of fields to be saved, see {@link FieldRecord} */
1901
+ fields: FieldRecord[];
1902
+ }
1903
+ /**
1904
+ * Representation of a field object.
1905
+ *
1906
+ * @interface Field
1907
+ * @since 0.1.0
1908
+ */
1909
+ interface Field {
1910
+ /** Field's id */
1911
+ id: string;
1912
+ /** Field's label */
1913
+ label: string;
1914
+ /** Field's rules, see {@link Rules} */
1915
+ rules: Rule;
1916
+ /** Field's messages based on rules, see {@link Messages} */
1917
+ messages: Message;
1918
+ /** Field's value */
1919
+ value?: string;
1920
+ }
1921
+ /**
1922
+ * Representation of a field record.
1923
+ *
1924
+ * @interface FieldRecord
1925
+ * @since 0.1.0
1926
+ */
1927
+ interface FieldRecord {
1928
+ /** Field record's id */
1929
+ id: string;
1930
+ /** Field record's value */
1931
+ value: string;
1932
+ }
1933
+ /**
1934
+ * Messages for living places.
1935
+ *
1936
+ * @interface Message
1937
+ * @since 0.1.0
1938
+ */
1939
+ interface Message {
1940
+ /** The maximum number's message of allowed living places */
1941
+ max: string;
1942
+ /** The minimum number's message of allowed living places */
1943
+ min: string;
1944
+ }
1945
+ /**
1946
+ * Rules for living places.
1947
+ *
1948
+ * @interface Rule
1949
+ * @since 0.1.0
1950
+ */
1951
+ interface Rule {
1952
+ /** The maximum number of allowed living places */
1953
+ max: number;
1954
+ /** The minimum number of allowed living places */
1955
+ min: number;
1956
+ }
1957
+
1958
+ /**
1959
+ * Representation of a basic Shipping Address.
1960
+ *
1961
+ * @interface BaseShippingAddress
1962
+ * @since 0.1.0
1963
+ */
1964
+ interface BaseShippingAddress<T extends AdditionalInfo = AdditionalInfo> {
1965
+ /** Whether or not the shipping address is default */
1966
+ default: boolean;
1967
+ /** Shipping address' latitude */
1968
+ lat: number;
1969
+ /** Shipping address' longitude */
1970
+ lng: number;
1971
+ /** Shipping address' reference */
1972
+ reference: string;
1973
+ /** Shipping address' main street */
1974
+ mainStreet: string;
1975
+ /** Shipping address' living place number */
1976
+ number: string;
1977
+ /** Shipping address' secondary street */
1978
+ secondaryStreet: string;
1979
+ /** It contains country id and country name, see {@link CountrySummary} */
1980
+ country: CountrySummary;
1981
+ /** Shipping address' update date */
1982
+ updatedAt?: string;
1983
+ /** Shipping address' creation date */
1984
+ createdAt: string;
1985
+ /** Shipping address' nickname */
1986
+ nickname: string;
1987
+ /** Shipping address' number contact address */
1988
+ numberContactAddress: string;
1989
+ /** Shipping address additional info */
1990
+ additionalInfo?: T;
1991
+ }
1992
+ /**
1993
+ * Representation of a Commerce Shipping Address.
1994
+ *
1995
+ * @template T Shipping address additional info
1996
+ * @interface ShippingAddress
1997
+ * @since 0.1.0
1998
+ * @extends {{@link BaseShippingAddress}
1999
+ */
2000
+ interface ShippingAddress<T extends AdditionalInfo = AdditionalInfo> extends BaseShippingAddress<T> {
2001
+ /** Shipping address unique identifier */
2002
+ id: number;
2003
+ /** Object which contains the living place, see {@link LivingPlace} */
2004
+ livingPlace: LivingPlace;
2005
+ }
2006
+ /**
2007
+ * A shipping address object used when it needs to be created.
2008
+ *
2009
+ * @template T Shipping address additional info
2010
+ * @interface NewShippingAddress
2011
+ * @since 0.1.0
2012
+ * @extends {{@link BaseShippingAddress}
2013
+ */
2014
+ interface NewShippingAddress<T extends AdditionalInfo = AdditionalInfo> extends BaseShippingAddress<T> {
2015
+ /** Shipping address unique identifier */
2016
+ id?: number;
2017
+ /**
2018
+ * Object which contains the living place to save,
2019
+ * see {@link LivingPlaceToSave}
2020
+ */
2021
+ livingPlace: LivingPlaceToSave;
2022
+ }
2023
+ /**
2024
+ * A shipping address object used when it needs to be updated.
2025
+ *
2026
+ * @template T Shipping address additional info
2027
+ * @interface UpdatedShippingAddress
2028
+ * @since 0.1.0
2029
+ * @extends {{@link BaseShippingAddress}
2030
+ */
2031
+ interface UpdatedShippingAddress<T extends AdditionalInfo = AdditionalInfo> extends BaseShippingAddress<T> {
2032
+ /** Shipping address unique identifier */
2033
+ id: number;
2034
+ /**
2035
+ * Object which contains the living place to update,
2036
+ * see {@link LivingPlaceToSave}
2037
+ */
2038
+ livingPlace: LivingPlaceToSave;
2039
+ }
2040
+
2041
+ /**
2042
+ * Representation of a Commerce User.
2043
+ *
2044
+ * @interface BaseUser
2045
+ * @template T User additional info
2046
+ * @since 0.1.0
2047
+ */
2048
+ interface BaseUser<T extends AdditionalInfo = AdditionalInfo> {
2049
+ /** User's unique identifier */
2050
+ uid: string;
2051
+ /** User's first name */
2052
+ name: string;
2053
+ /** User's middle name */
2054
+ middleName?: string;
2055
+ /** User's last name */
2056
+ lastname: string;
2057
+ /** User's second surname */
2058
+ secondLastname?: string;
2059
+ /** User's email */
2060
+ email: string;
2061
+ /** User's birthdate, e.g: 1991-05-02 */
2062
+ birthdate?: string;
2063
+ /** The vendor which the user was created */
2064
+ vendorId?: Vendor["id"];
2065
+ /** The platform where the user was generated */
2066
+ origin?: string;
2067
+ /** User's document */
2068
+ document?: string;
2069
+ /**User's document type, see {@link DocumentType} */
2070
+ documentType?: DocumentType;
2071
+ /** User's gender, see {@link Gender} */
2072
+ gender?: Gender;
2073
+ /** User's country object, see {@link UserCountry} */
2074
+ country: UserCountry;
2075
+ /** User's phone detailed information, see {@link Phone} */
2076
+ phone?: Phone;
2077
+ /** User's type, see {@link UserType} */
2078
+ type?: UserType;
2079
+ /** User's externalId */
2080
+ externalId?: string;
2081
+ /** User's marital status, see {@link MaritalStatus} */
2082
+ maritalStatus?: MaritalStatus;
2083
+ /** Whether or not the user is active */
2084
+ active?: boolean;
2085
+ /** User's additional info */
2086
+ additionalInfo?: T;
2087
+ /** User's privacy accept date */
2088
+ privacyAcceptDate?: string | null;
2089
+ }
2090
+ /**
2091
+ * Representation of a user saved on a database.
2092
+ *
2093
+ * @interface User
2094
+ * @template T User additional info
2095
+ * @since 0.1.0
2096
+ * @extends {{@link BaseUser}
2097
+ */
2098
+ interface User<T extends AdditionalInfo = AdditionalInfo> extends BaseUser<T> {
2099
+ /** User's auto generated id */
2100
+ idInt: number;
2101
+ }
2102
+ /**
2103
+ * The possible values for the user's type.
2104
+ *
2105
+ * @typedef UserType
2106
+ * @since 0.1.0
2107
+ */
2108
+ declare type UserType = "NORMAL" | "DEPENDENT";
2109
+ /**
2110
+ * Representation of a phone.
2111
+ *
2112
+ * @interface UserCountry
2113
+ * @since 0.1.0
2114
+ */
2115
+ interface UserCountry {
2116
+ /** User's country id */
2117
+ id: number;
2118
+ }
2119
+ /**
2120
+ * Representation of a phone.
2121
+ *
2122
+ * @interface Phone
2123
+ * @since 0.1.0
2124
+ */
2125
+ interface Phone {
2126
+ /** User's phone number */
2127
+ number: string;
2128
+ /** User's country calling code, e.g.: +593 */
2129
+ countryCode: string;
2130
+ /** User's country ISO code, e.g.: EC */
2131
+ countryIsoCode: CountryCode;
2132
+ }
2133
+ /**
2134
+ * The possible values for the user's marital status.
2135
+ *
2136
+ * @typedef MaritalStatus
2137
+ * @since 0.1.0
2138
+ */
2139
+ declare type MaritalStatus = "MARRIED" | "DIVORCED" | "SINGLE";
2140
+ /**
2141
+ * The possible values for the user's gender.
2142
+ *
2143
+ * @typedef Gender
2144
+ * @since 0.1.0
2145
+ */
2146
+ declare type Gender = "MALE" | "FEMALE";
2147
+
2148
+ /**
2149
+ * User preferences.
2150
+ *
2151
+ * @interface UserSettings
2152
+ * @since 0.5.15
2153
+ */
2154
+ interface UserSettings {
2155
+ /** Individual settings, see {@link Settings} */
2156
+ settings: Settings;
2157
+ /** User unique identifier */
2158
+ uid: string;
2159
+ }
2160
+ /**
2161
+ * Individual user settings.
2162
+ *
2163
+ * @interface Settings
2164
+ * @since 0.1.0
2165
+ */
2166
+ interface Settings {
2167
+ /** Whether or not the user has email notifications enabled */
2168
+ emailNotifications: boolean;
2169
+ /** Whether or not the user has push notifications enabled */
2170
+ pushNotifications: boolean;
2171
+ }
2172
+
2173
+ /**
2174
+ * Representation of common properties of the order.
2175
+ *
2176
+ * @interface BaseOrder
2177
+ * @template T Order additional info
2178
+ * @template U Shopping cart additional info
2179
+ * @template V User additional info
2180
+ * @since 0.1.0
2181
+ */
2182
+ interface BaseOrder<T extends AdditionalInfo = AdditionalInfo, U extends AdditionalInfo = AdditionalInfo, V extends AdditionalInfo = AdditionalInfo> {
2183
+ /** Order unique identifier */
2184
+ id: number;
2185
+ /** Account unique identifier */
2186
+ accountId: number;
2187
+ /** Order additional info*/
2188
+ additionalInfo?: T;
2189
+ /** User's order billing data' unique identifier */
2190
+ billingDataByUserId: string;
2191
+ /** Order additional messages */
2192
+ additionalMessage: string | null;
2193
+ /** Order allocation, see {@link Allocation} */
2194
+ allocation: Allocation;
2195
+ /** Channel unique identifier */
2196
+ channelId: number;
2197
+ /** Order channel name */
2198
+ channelName: string;
2199
+ /** Order comment */
2200
+ comment: string;
2201
+ /** Order hash */
2202
+ hash: string;
2203
+ /** Order issue unique identifier */
2204
+ issueId: string;
2205
+ /** Order pickup cook time */
2206
+ pickupCooktime: string | null;
2207
+ /** User's order shipping address' unique identifier */
2208
+ shippingAddressByUserId: string;
2209
+ /** Order date, e.g.: `02 Aug 2021` */
2210
+ orderDate: string;
2211
+ /** Order time, e.g.: `17:00 am` */
2212
+ orderTime: string;
2213
+ /** Pick up date, e.g.: `01 Aug 2021` */
2214
+ pickupDate: string | null;
2215
+ /** Pick up time, e.g.: `09:00 am` */
2216
+ pickupTime: string | null;
2217
+ /** Order sequence id */
2218
+ seq_id: string;
2219
+ /** Shopping cart associated with the order, see {@link OrderShoppingCart} */
2220
+ shoppingCart: OrderShoppingCart<U>;
2221
+ /** Order step, see {@link OrderStep} */
2222
+ step: OrderStep;
2223
+ /** Step category, see {@link StepCategory} */
2224
+ stepCategory: StepCategory;
2225
+ /** Step code, see {@link StepCode} */
2226
+ stepCode: StepCode;
2227
+ /** Step unique identifier */
2228
+ stepId: number;
2229
+ /** Step name */
2230
+ stepName: string;
2231
+ /** User unique identifier */
2232
+ uid: string;
2233
+ /** Order user, see {@link OrderUser} */
2234
+ user: OrderUser<V>;
2235
+ /** Order transaction unique identifier */
2236
+ transactionId: number | null;
2237
+ /** Vendor unique identifier */
2238
+ vendorId: number;
2239
+ /** Vendor name */
2240
+ vendorName: string;
2241
+ /** Order operator information, see {@link OperatorInformation} */
2242
+ createdByOperator: OperatorInformation;
2243
+ }
2244
+ /**
2245
+ * Shopping cart payment status.
2246
+ *
2247
+ * @typedef OrderStatus
2248
+ * @since 0.1.0
2249
+ */
2250
+ declare type PaymentStatus = "PENDING" | "CANCELED" | "PAID" | "REFUNDED";
2251
+ /**
2252
+ * The shopping cart associated with the order.
2253
+ *
2254
+ * @interface OrderShoppingCart
2255
+ * @template T Shopping cart additional info
2256
+ * @since 0.1.0
2257
+ * @extends {{@link ShoppingCart}
2258
+ */
2259
+ interface OrderShoppingCart<T extends AdditionalInfo = AdditionalInfo> extends Omit<ShoppingCart<T>, "stores" | "billTotal"> {
2260
+ /** Order shopping cart comment */
2261
+ comment: string | null;
2262
+ /** Order instructions */
2263
+ instructions: string | null;
2264
+ /** Order status unique identifier */
2265
+ statusId: number;
2266
+ /** Order issue unique identifier */
2267
+ issueId: string | null;
2268
+ /** Order invoice number */
2269
+ invoiceNumber: string | null;
2270
+ /** Order status name */
2271
+ statusName: string;
2272
+ /** Status code, see {@link StepCode} */
2273
+ statusCode: StepCode;
2274
+ /** Order payment status, see {@link PaymentStatus} */
2275
+ paymentStatus: PaymentStatus;
2276
+ /**
2277
+ * An array of the order paid payment methods,
2278
+ * see {@link OrderPaymentMethod}
2279
+ */
2280
+ paidPaymentMethods: OrderPaymentMethod[] | null;
2281
+ /** An array of order retries, see {@link OrderRetry} */
2282
+ allRetries: OrderRetry[];
2283
+ /**
2284
+ * An array of the order rejected payment methods,
2285
+ * see {@link OrderPaymentMethod}
2286
+ */
2287
+ rejectedPaymentMethods: OrderPaymentMethod[] | null;
2288
+ /** An array of OrderStore, see {@link OrderStore} */
2289
+ stores: OrderStore[];
2290
+ /** Order bill total, see {@link OrderBillTotal} */
2291
+ billTotal: OrderBillTotal;
2292
+ }
2293
+ /**
2294
+ * Order common fields.
2295
+ *
2296
+ * @interface OrderCommonFields
2297
+ * @since 0.1.0
2298
+ */
2299
+ interface OrderCommonFields {
2300
+ /** Order amount **/
2301
+ amount: string;
2302
+ /** Order status **/
2303
+ status: string;
2304
+ /** Order created date **/
2305
+ created_at: string;
2306
+ /** Order update date **/
2307
+ updated_at: string;
2308
+ }
2309
+ /**
2310
+ * The stores associated with the order.
2311
+ *
2312
+ * @interface OrderStore
2313
+ * @since 0.1.0
2314
+ */
2315
+ interface OrderStore {
2316
+ /** Suborder unique identifier */
2317
+ id: number;
2318
+ /** Order unique identifier */
2319
+ orderId: number;
2320
+ /** Order digital command sent */
2321
+ digitalCommandSent: string;
2322
+ /** Order store status unique identifier */
2323
+ statusId: number;
2324
+ /** Order store status name */
2325
+ statusName: string;
2326
+ /** Order store status code, see {@link StepCode} */
2327
+ statusCode: StepCode;
2328
+ /** Order store bill total, see {@link OrderProductBillTotal} */
2329
+ billStoreTotal: OrderProductBillTotal;
2330
+ /** An array of OrderProducts, see {@link OrderProduct} */
2331
+ products: OrderProduct[];
2332
+ /** Store unique identifier */
2333
+ storeId: Store["storeId"];
2334
+ /** Store name */
2335
+ storeName: Store["storeName"];
2336
+ /** Additional information for the store, see {@link OrderStoreAdditionalInfo} */
2337
+ additionalInfo: OrderStoreAdditionalInfo;
2338
+ }
2339
+ /**
2340
+ * Order store additional information.
2341
+ *
2342
+ * @interface OrderStoreAdditionalInfo
2343
+ * @since 0.1.0
2344
+ */
2345
+ interface OrderStoreAdditionalInfo {
2346
+ /** Store address */
2347
+ address: string;
2348
+ /** Store channel name */
2349
+ channel_name: string;
2350
+ /** Whether or not the store is within coverage */
2351
+ coverage: boolean;
2352
+ /** Store delivery information, see {@link OrderStoreDelivery} */
2353
+ delivery: OrderStoreDelivery;
2354
+ /** Store external identifier */
2355
+ external_id: string;
2356
+ /** Whether or not the store has a dedicated drinks store */
2357
+ is_drinks_store: boolean;
2358
+ /** Store latitude */
2359
+ latitude: number;
2360
+ /** Store longitude */
2361
+ longitude: number;
2362
+ /** Order maximum amount allowed */
2363
+ max_order_amount: number;
2364
+ /** Order minimum amount allowed */
2365
+ min_order_amount: number;
2366
+ /** Order currency's symbol */
2367
+ order_symbol: string;
2368
+ /** Store phone */
2369
+ phone: string;
2370
+ /** Store schedules, see {@link Schedule} */
2371
+ schedules: Schedule[];
2372
+ /** Whether or not to show the drinks store */
2373
+ show_drinks_store: boolean;
2374
+ /** Whether or not the store is sponsored */
2375
+ sponsored: boolean;
2376
+ /** Store external code */
2377
+ store_external_code: string;
2378
+ /** Store timezone */
2379
+ timezone: string;
2380
+ }
2381
+ /**
2382
+ * The delivery information associated with the order store.
2383
+ *
2384
+ * @interface OrderStoreDelivery
2385
+ * @since 0.1.0
2386
+ */
2387
+ interface OrderStoreDelivery {
2388
+ /** Whether or not the store has free delivery */
2389
+ free_delivery: Delivery["freeDelivery"];
2390
+ /** Whether or not the store has a express delivery */
2391
+ express: Delivery["express"];
2392
+ /** Time value for delivery as string */
2393
+ delivery_time_value: Delivery["deliveryTimeValue"];
2394
+ /** Time unit for delivery, see {@link DeliveryTimeUnit} */
2395
+ delivery_time_unit: Delivery["deliveryTimeUnit"];
2396
+ }
2397
+ /**
2398
+ * The product associated with the order.
2399
+ *
2400
+ * @interface OrderProduct
2401
+ * @since 0.1.0
2402
+ */
2403
+ interface OrderProduct {
2404
+ /** Order product id */
2405
+ id: number;
2406
+ /** Order product additional info, see {@link OrderProductAdditionalInfo } */
2407
+ additionalInfo: OrderProductAdditionalInfo;
2408
+ /** Order product unique identifier */
2409
+ productId: number;
2410
+ /** Order product name */
2411
+ productName: string;
2412
+ /** Order product comment */
2413
+ comment: string;
2414
+ /** Order bill product, see {@link OrderBillProduct} */
2415
+ billProduct: OrderBillProduct;
2416
+ /** Order bill product and answers, see {@link OrderProductBillTotal} */
2417
+ billProductAndAnswers: OrderProductBillTotal;
2418
+ /** Order product questions and answers, see {@link CartProductQuestion} */
2419
+ questionsAndAnswers: CartProductQuestion[];
2420
+ }
2421
+ /**
2422
+ * The order product additional info.
2423
+ *
2424
+ * @interface OrderProductAdditionalInfo
2425
+ * @since 0.1.0
2426
+ */
2427
+ interface OrderProductAdditionalInfo {
2428
+ /** Order product attributes, see {@link OrderProductAttributes} */
2429
+ attributes: OrderProductAttributes;
2430
+ /** Indicates if a product is available */
2431
+ available: boolean;
2432
+ /** Order bill product, see {@link OrderBillProduct} */
2433
+ bill_product: OrderBillProductAdditionalInfo;
2434
+ /** Order bill product and answers, see {@link OrderBillProduct} */
2435
+ bill_product_and_answers: OrderBillProductAdditionalInfo;
2436
+ /** The description of the product */
2437
+ description: string;
2438
+ /** Array of product images, see {@link OrderProductImage} */
2439
+ images: OrderProductImage[];
2440
+ /** Indicates if a product has a price vip */
2441
+ is_price_vip: boolean;
2442
+ /** The max amount for sale of the product */
2443
+ max_amount_for_sale: number;
2444
+ /** The measure of the product */
2445
+ measure: string;
2446
+ /** The store associated with the product */
2447
+ new_store: number;
2448
+ /** Indicates if a product is out of service */
2449
+ out_of_service: boolean;
2450
+ /** Indicates if a product is out of stock */
2451
+ out_of_stock: boolean;
2452
+ /** Price category type, see {@link PriceCategoryType} */
2453
+ price_category: PriceCategoryType;
2454
+ /** Order bill product prices, see {@link OrderBillProduct} */
2455
+ prices: OrderBillProductAdditionalInfo;
2456
+ /** Indicates if a product is sponsored */
2457
+ sponsored: boolean;
2458
+ /** The status of the product, see {@link ProductStatus} */
2459
+ status: ProductStatus;
2460
+ /** The stock of the product */
2461
+ stock: number;
2462
+ /** The suggested price of the product */
2463
+ suggested_price: string;
2464
+ /** The type of the product, see {@link ProductType} */
2465
+ type: ProductType;
2466
+ }
2467
+ /**
2468
+ * Order product attributes.
2469
+ *
2470
+ * @interface OrderProductAttributes
2471
+ * @since 0.1.0
2472
+ */
2473
+ interface OrderProductAttributes {
2474
+ /** Whether or not to show product in menu */
2475
+ show_in_menu: boolean;
2476
+ /** Product's quantity, the attribute is not in camel case purposefully */
2477
+ cantidad: string;
2478
+ /** Product external id */
2479
+ external_id: string | null;
2480
+ }
2481
+ /**
2482
+ * Order product image.
2483
+ *
2484
+ * @interface OrderProductImage
2485
+ * @since 0.1.0
2486
+ */
2487
+ interface OrderProductImage {
2488
+ /** The directory where the image is saved */
2489
+ key: string;
2490
+ /** Image's name */
2491
+ name: string;
2492
+ /** The bucket where the image is located */
2493
+ bucket: string;
2494
+ /** The url where the image is saved */
2495
+ url: string;
2496
+ /** The cloud where the image is saved */
2497
+ cloud_front_url: string;
2498
+ }
2499
+ /**
2500
+ * Order bill product additional information.
2501
+ *
2502
+ * @interface OrderBillProductAdditionalInfo
2503
+ * @since 0.1.0
2504
+ */
2505
+ interface OrderBillProductAdditionalInfo {
2506
+ /** Normal price category, see {@link OrderProductPriceCategory} */
2507
+ normal: OrderProductPriceCategory;
2508
+ /** Points price category, see {@link OrderProductPriceCategory} */
2509
+ points: OrderProductPriceCategory;
2510
+ }
2511
+ /**
2512
+ * Order bill product tax calculations.
2513
+ *
2514
+ * @typedef TaxCalculations
2515
+ * @since 0.1.0
2516
+ */
2517
+ declare type TaxCalculations = Record<string, TaxCalculation>;
2518
+ /**
2519
+ * Order bill product tax calculation
2520
+ *
2521
+ * @interface TaxCalculation
2522
+ * @since 0.1.0
2523
+ */
2524
+ interface TaxCalculation {
2525
+ /** Tax calculation code */
2526
+ code: number;
2527
+ /** Tax calculation name, see {@link TaxType} */
2528
+ name: TaxType;
2529
+ /** Tax calculation value added tax rate */
2530
+ vat_rate_code: number;
2531
+ /** Tax calculation value added tax */
2532
+ vat_rate: string;
2533
+ /** Tax calculation percentage */
2534
+ percentage: number;
2535
+ /** Tax calculation base */
2536
+ tax_base: number;
2537
+ /** Tax calculation value */
2538
+ value: number;
2539
+ }
2540
+ /**
2541
+ * The total bill associated with a product of order.
2542
+ *
2543
+ * @interface OrderProductBillTotal
2544
+ * @since 0.1.0
2545
+ * @extends {{@link BillTotalCategory}
2546
+ */
2547
+ interface OrderProductBillTotal extends BillTotalCategory {
2548
+ /** Order bill discount total */
2549
+ discountTotal: number;
2550
+ }
2551
+ /**
2552
+ * The total bill associated with a order.
2553
+ *
2554
+ * @interface OrderBillTotal
2555
+ * @since 0.1.0
2556
+ * @extends {{@link BillTotalCategory}
2557
+ */
2558
+ interface OrderBillTotal extends BillTotalCategory {
2559
+ /** Order bill discount total */
2560
+ discountTotal: number;
2561
+ /** Bill total category subtotal without taxes */
2562
+ subtotalTaxedWithoutTaxes: number;
2563
+ /** Total products that do not have taxes */
2564
+ subtotalZero: number;
2565
+ /** Order bill total tip amount */
2566
+ tip: number;
2567
+ }
2568
+ /**
2569
+ * The bill associated with a product of order.
2570
+ *
2571
+ * @interface OrderBillProduct
2572
+ * @since 0.1.0
2573
+ * @extends {{@link OrderProductBillTotal}
2574
+ */
2575
+ interface OrderBillProduct extends OrderProductBillTotal {
2576
+ /** Order bill product amount */
2577
+ amount: number;
2578
+ }
2579
+ /**
2580
+ * The bill associated with a product of order.
2581
+ *
2582
+ * @interface OrderProductPriceCategory
2583
+ * @since 0.1.0
2584
+ */
2585
+ interface OrderProductPriceCategory {
2586
+ /** Order product price category amount */
2587
+ amount: number;
2588
+ /** Array of tax calculation, see {@link TaxCalculation} */
2589
+ taxes: TaxCalculation[];
2590
+ /** Order product price category with taxes */
2591
+ net_price: number;
2592
+ /** Order product price currency symbol */
2593
+ symbol: string;
2594
+ /** Order product price category without taxes */
2595
+ gross_price: number;
2596
+ /** Array of discounts applied to the price category */
2597
+ discounts: any[];
2598
+ /** Order product price discount */
2599
+ discount: number;
2600
+ /** Order product price total discounts with taxes */
2601
+ discount_net_price: number;
2602
+ /** Order product price total discounts without taxes */
2603
+ discount_gross_price: number;
2604
+ /** Order product price category type, see {@link PriceCategoryType} */
2605
+ category: PriceCategoryType;
2606
+ /** Order product price product id */
2607
+ product_id?: number;
2608
+ /** Order product price product name */
2609
+ name?: string;
2610
+ /** Order product price subtotal without taxes */
2611
+ subtotal_before_taxes: number;
2612
+ /** Order product price tax total */
2613
+ tax_total: number;
2614
+ /** Order product price discount total */
2615
+ discount_total: number;
2616
+ /** Order product price total */
2617
+ total: number;
2618
+ /** Order product price subtotal without taxes and discounts */
2619
+ subtotal_before_taxes_before_discounts: number;
2620
+ /** Order product price subtotal */
2621
+ subtotal_zero?: number;
2622
+ /** Order product price subtotal without taxes */
2623
+ subtotal_without_taxes?: number;
2624
+ /** An object of tax calculations, see {@link TaxCalculations} */
2625
+ tax_calcs?: TaxCalculations;
2626
+ }
2627
+ /**
2628
+ * The retry of the order.
2629
+ *
2630
+ * @interface OrderRetry
2631
+ * @since 0.1.0
2632
+ * @extends {{@link Status}, {@link OrderCommonFields}
2633
+ */
2634
+ interface OrderRetry extends Status, OrderCommonFields {
2635
+ /** Order retry unique identifier */
2636
+ id: number;
2637
+ /** Order payment method id **/
2638
+ payment_method_by_order_id: number;
2639
+ /** Order retry reference **/
2640
+ reference: string;
2641
+ /** Order retry platform **/
2642
+ platform: string;
2643
+ /** Order retry user agent **/
2644
+ user_agent: string;
2645
+ /** Order retry ip address **/
2646
+ ip_address: string;
2647
+ /** Order retry request id **/
2648
+ request_id: string;
2649
+ /** Order retry process url **/
2650
+ process_url: string;
2651
+ /** Order retry Payment methods, see {@link OrderPaymentMethod} */
2652
+ payment_method: OrderPaymentMethod | null;
2653
+ /** Order payment method, see {@link PaymentMethodByOrder} **/
2654
+ payment_method_by_order: PaymentMethodByOrder;
2655
+ /** Order step, see {@link OrderStep} */
2656
+ step: OrderStep;
2657
+ }
2658
+ /**
2659
+ * The retry of the order.
2660
+ *
2661
+ * @interface PaymentMethodByOrder
2662
+ * @since 0.1.0
2663
+ * @extends {{@link Status}, {@link OrderCommonFields}
2664
+ */
2665
+ interface PaymentMethodByOrder extends Status, OrderCommonFields {
2666
+ /** Payment method by order unique identifier **/
2667
+ id: number;
2668
+ /** Order unique identifier **/
2669
+ order_id: number;
2670
+ /** Payment method id **/
2671
+ payment_method_id: number;
2672
+ /** Internal revenue service payment method id **/
2673
+ sri_payment_method_id: number;
2674
+ /** Order payment method, see {@link OrderRetryPaymentMethod} */
2675
+ order: OrderRetryPaymentMethod;
2676
+ }
2677
+ /**
2678
+ * Order retry payment method.
2679
+ *
2680
+ * @interface OrderRetryPaymentMethod
2681
+ * @since 0.1.0
2682
+ */
2683
+ interface OrderRetryPaymentMethod extends Status {
2684
+ /** Order retry payment method unique identifier **/
2685
+ id: number;
2686
+ /** User unique identifier associated with the order retry **/
2687
+ uid: string;
2688
+ /** Order retry billing data by user id **/
2689
+ billing_data_by_user_id: string;
2690
+ /** Order retry shopping cart id **/
2691
+ shopping_cart_id: string;
2692
+ /** Order retry latitude **/
2693
+ latitude: string;
2694
+ /** Order retry longitude **/
2695
+ longitude: string;
2696
+ /** Order payment status, {@link OrderStatus} **/
2697
+ payment_status: OrderStatus;
2698
+ /** Order retry step **/
2699
+ step: number;
2700
+ /** In soft order process */
2701
+ insoft_order_process: string;
2702
+ /** Order retry sent fulfillment **/
2703
+ sent_fulfillment: string;
2704
+ /** Order retry account id **/
2705
+ account_id: number;
2706
+ /** Order retry sequence value **/
2707
+ seq_val: string;
2708
+ /** Order retry vendor id **/
2709
+ vendor_id: number;
2710
+ /** Order retry channel id **/
2711
+ channel_id: number;
2712
+ /** Order retry created date **/
2713
+ created_at: string;
2714
+ /** Order retry update date **/
2715
+ updated_at: string;
2716
+ /** Order retry allocation, see {@link Allocation} **/
2717
+ allocation: Allocation;
2718
+ /** Order retry suborder, see {@link Suborder} **/
2719
+ suborders: Suborder[];
2720
+ }
2721
+ /**
2722
+ * Representation of a order status.
2723
+ *
2724
+ * @interface Status
2725
+ * @since 0.1.0
2726
+ */
2727
+ interface Status {
2728
+ /** Status unique identifier **/
2729
+ status_id: number;
2730
+ /** Status name **/
2731
+ status_name: string;
2732
+ /** Status code **/
2733
+ status_code: string;
2734
+ /** Status category **/
2735
+ status_category: string;
2736
+ }
2737
+ /**
2738
+ * Representation of a suborder object.
2739
+ *
2740
+ * @interface Suborder
2741
+ * @since 0.1.0
2742
+ * @extends {{@link Status}
2743
+ */
2744
+ interface Suborder extends Status {
2745
+ /** Suborder unique identifier **/
2746
+ id: number;
2747
+ /** Suborder store unique identifier **/
2748
+ store_id: number;
2749
+ /** Suborder store unique identifier **/
2750
+ store_name: string;
2751
+ /** Suborder order id **/
2752
+ order_id: number;
2753
+ /** Suborder digital command sent **/
2754
+ digital_command_sent: string;
2755
+ /** Suborder vendor **/
2756
+ vendor: string;
2757
+ /** Suborder additional information **/
2758
+ additional_info: string;
2759
+ /** Suborder creation date**/
2760
+ created_at: string;
2761
+ /** Suborder update date **/
2762
+ updated_at: string;
2763
+ }
2764
+ /**
2765
+ * The step where the order is located.
2766
+ *
2767
+ * @interface OrderStep
2768
+ * @since 0.1.0
2769
+ */
2770
+ interface OrderStep {
2771
+ /** Order step title to use on front end */
2772
+ title_frontend: string;
2773
+ /** Order step description to use on front end */
2774
+ description_frontend: string;
2775
+ /** Order step unique identifier */
2776
+ id: number;
2777
+ /** Order step name */
2778
+ name: string;
2779
+ /** Order step code */
2780
+ code: string;
2781
+ /** Order step description */
2782
+ description: string;
2783
+ /** Order step category */
2784
+ category: string;
2785
+ /** Order step subtitle to use on front end */
2786
+ subtitle_frontend: string;
2787
+ /** Order step color */
2788
+ color: string;
2789
+ /** Order step additional information, see {@link OrderStepAdditionalInfo} */
2790
+ additional_info: OrderStepAdditionalInfo;
2791
+ }
2792
+ /**
2793
+ * Order step additional information.
2794
+ *
2795
+ * @interface OrderStepAdditionalInfo
2796
+ * @since 0.1.0
2797
+ */
2798
+ interface OrderStepAdditionalInfo {
2799
+ /** Whether or not to use the client on front end */
2800
+ client_frontend: boolean;
2801
+ /** Whether or not to use the operators on front end */
2802
+ operators_frontend: boolean;
2803
+ /** Whether or not to use the client has an error on front end */
2804
+ client_frontend_error: boolean;
2805
+ /** Order additional information group, see {@link OrderStepAdditionalInfoGroup} */
2806
+ group: OrderStepAdditionalInfoGroup;
2807
+ }
2808
+ /**
2809
+ * Order step additional information group.
2810
+ *
2811
+ * @interface OrderStepAdditionalInfoGroup
2812
+ * @since 0.1.0
2813
+ */
2814
+ interface OrderStepAdditionalInfoGroup {
2815
+ /** Order additional information group code */
2816
+ code: string;
2817
+ /** Order additional information group description */
2818
+ description: string;
2819
+ /** Order additional information group weight */
2820
+ weight: string;
2821
+ /** Order additional information group type */
2822
+ type: string;
2823
+ }
2824
+ /**
2825
+ * The details of the order.
2826
+ *
2827
+ * @interface OrderDetails
2828
+ * @template T Order additional info
2829
+ * @template U Shopping cart additional info
2830
+ * @template V User additional info
2831
+ * @since 0.5.15
2832
+ * @extends {{@link BaseOrder}
2833
+ */
2834
+ interface OrderDetails<T extends AdditionalInfo = AdditionalInfo, U extends AdditionalInfo = AdditionalInfo, V extends AdditionalInfo = AdditionalInfo> extends BaseOrder<T, U, V> {
2835
+ /** Order details' shipping address */
2836
+ shippingAddress: ShippingAddress;
2837
+ /** Order details' shipping cost, see {@link OrderDetailShippingCost} */
2838
+ shippingCost: OrderDetailShippingCost;
2839
+ /** Order details' billing data */
2840
+ billingData: BillingData;
2841
+ }
2842
+ /**
2843
+ * The shipping cost associated with the order.
2844
+ *
2845
+ * @interface OrderDetailShippingCost
2846
+ * @since 0.5.15
2847
+ */
2848
+ interface OrderDetailShippingCost {
2849
+ /** Shipping cost net price */
2850
+ net_price: number;
2851
+ }
2852
+ /**
2853
+ * Representation of a Commerce Order.
2854
+ *
2855
+ * @typedef Order
2856
+ * @template T Order additional info
2857
+ * @template U Shopping cart additional info
2858
+ * @template V User additional info
2859
+ * @since 0.5.15
2860
+ */
2861
+ declare type Order<T extends AdditionalInfo = AdditionalInfo, U extends AdditionalInfo = AdditionalInfo, V extends AdditionalInfo = AdditionalInfo> = BaseOrder<T, U, V> | OrderDetails<T, U, V>;
2862
+ /**
2863
+ * Order shipping metadata base field.
2864
+ *
2865
+ * @interface BaseField
2866
+ * @since 0.1.0
2867
+ */
2868
+ interface BaseField {
2869
+ /** Base field unique identifier */
2870
+ id: number;
2871
+ /** Base field name */
2872
+ name: string;
2873
+ }
2874
+ /**
2875
+ * Order shipping metadata zip code base field.
2876
+ *
2877
+ * @interface ZipCodeField
2878
+ * @since 0.1.0
2879
+ * @extends {{@link BaseField}
2880
+ */
2881
+ interface ZipCodeField extends BaseField {
2882
+ /** Base field zip code */
2883
+ zipCode: string;
2884
+ }
2885
+ /**
2886
+ * Order injection field.
2887
+ *
2888
+ * @interface Injection
2889
+ * @since 0.1.0
2890
+ * @property {InjectionDetail} [key: string] object with key as string
2891
+ * and value as InjectionDetail
2892
+ */
2893
+ interface Injection {
2894
+ [key: string]: InjectionDetail;
2895
+ }
2896
+ /**
2897
+ * Order injection detail field.
2898
+ *
2899
+ * @interface InjectionDetail
2900
+ * @since 0.1.0
2901
+ */
2902
+ interface InjectionDetail {
2903
+ /**
2904
+ * Order injection detail cause,
2905
+ * property is purposefully named in spanish
2906
+ */
2907
+ causa: string;
2908
+ /**
2909
+ * Order injection detail code
2910
+ * property is purposefully named in spanish
2911
+ */
2912
+ codigo: number;
2913
+ /**
2914
+ * Order injection detail message
2915
+ * property is purposefully named in spanish
2916
+ * */
2917
+ mensaje: string;
2918
+ }
2919
+ /**
2920
+ * Order integration message.
2921
+ *
2922
+ * @interface IntegrationMessage
2923
+ * @since 0.1.0
2924
+ */
2925
+ interface IntegrationMessage {
2926
+ /** Order injection, see {@link Injection} */
2927
+ kfcInjection: Injection;
2928
+ }
2929
+ /**
2930
+ * Order shipping metadata.
2931
+ *
2932
+ * @interface MetadataShipping
2933
+ * @since 0.1.0
2934
+ */
2935
+ interface MetadataShipping {
2936
+ /** Order shipping area, see {@link BaseField} */
2937
+ area: BaseField;
2938
+ /** Order shipping city, see {@link BaseField} */
2939
+ city: BaseField;
2940
+ /** Order shipping zone, see {@link ZipCodeField} */
2941
+ zone: ZipCodeField;
2942
+ /** Order shipping store, see {@link BaseField} */
2943
+ store: BaseField;
2944
+ /** Order shipping country, see {@link BaseField} */
2945
+ country: BaseField;
2946
+ }
2947
+ /**
2948
+ * Order allocation options.
2949
+ *
2950
+ * @typedef Allocation
2951
+ * @since 0.1.0
2952
+ */
2953
+ declare type Allocation = "PICKUP_TO_GO" | "PICKUP_IN_PLACE" | "DELIVERY";
2954
+ /**
2955
+ * Order user.
2956
+ *
2957
+ * @interface OrderUser
2958
+ * @template T User additional info
2959
+ * @since 0.1.0
2960
+ * @extends {{@link BaseUser}
2961
+ */
2962
+ interface OrderUser<T extends AdditionalInfo = AdditionalInfo> extends BaseUser<T> {
2963
+ /** Order user settings, see {@link Settings} */
2964
+ settings: Settings;
2965
+ }
2966
+ /**
2967
+ * Order operator information.
2968
+ *
2969
+ * @interface OperatorInformation
2970
+ * @since 0.1.0
2971
+ */
2972
+ interface OperatorInformation {
2973
+ /** Operator unique identifier */
2974
+ id: string;
2975
+ /** Operator name */
2976
+ name: string;
2977
+ /** Operator email */
2978
+ email: string;
2979
+ /** Operator skill */
2980
+ skill: string;
2981
+ /** Operator document */
2982
+ document: string;
2983
+ }
2984
+ /**
2985
+ * Order payment method.
2986
+ *
2987
+ * @interface OrderPaymentMethod
2988
+ * @since 0.1.0
2989
+ */
2990
+ interface OrderPaymentMethod {
2991
+ /** Order payment method id */
2992
+ id: number;
2993
+ /** Order payment method id */
2994
+ payment_method_id: number;
2995
+ /** Order payment method name */
2996
+ payment_method_name: string;
2997
+ /** Order total by payment method */
2998
+ total: string;
2999
+ /** Order status, see {@link OrderStatus} */
3000
+ status: OrderStatus;
3001
+ /** Order payment method last retry, see {@link OrderRetry} */
3002
+ lastRetry: OrderRetry;
3003
+ /** Order step, see {@link OrderStep} */
3004
+ step: OrderStep;
3005
+ }
3006
+ /**
3007
+ * Order status.
3008
+ *
3009
+ * @typedef OrderStatus
3010
+ * @since 0.1.0
3011
+ */
3012
+ declare type OrderStatus = "APPROVED" | "REJECTED" | "PENDING";
3013
+
3014
+ /**
3015
+ * Notification object.
3016
+ *
3017
+ * @interface Notification
3018
+ * @since 0.1.0
3019
+ */
3020
+ interface Notification {
3021
+ /** Notification unique identifier */
3022
+ id: number;
3023
+ /** Notification title */
3024
+ title: string;
3025
+ /** Notification description */
3026
+ description: string;
3027
+ /** Notification list title */
3028
+ listTitle: string;
3029
+ /** Notification list items */
3030
+ listItems: NotificationListItem[];
3031
+ /** Notification creation date */
3032
+ creationDate: string;
3033
+ /** Notification priority, see {@link NotificationPriority} */
3034
+ priority: NotificationPriority;
3035
+ /**
3036
+ * Whether or not the notification was read. Purposefully
3037
+ * has a string type.
3038
+ */
3039
+ read: ReadValue;
3040
+ /** Notification extra data, see {@link NotificationExtraData} */
3041
+ extra_data: NotificationExtraData;
3042
+ }
3043
+ /**
3044
+ * Possible priority values for notifications.
3045
+ *
3046
+ * @typedef NotificationPriority
3047
+ * @since 0.1.0
3048
+ */
3049
+ declare type NotificationPriority = "HIGH" | "LOW";
3050
+ /**
3051
+ * Possible read values for notifications.
3052
+ *
3053
+ * @typedef ReadValue
3054
+ * @since 0.1.0
3055
+ */
3056
+ declare type ReadValue = "YES" | "NO";
3057
+ /**
3058
+ * Notification extra data.
3059
+ *
3060
+ * @interface NotificationExtraData
3061
+ * @since 0.1.0
3062
+ */
3063
+ interface NotificationExtraData {
3064
+ /** The id of the notification extra data */
3065
+ id: number;
3066
+ /** Sequential value */
3067
+ seqVal: string;
3068
+ /** Unique identifier */
3069
+ uid: string;
3070
+ /** Notification user, see {@link NotificationUser} */
3071
+ user: NotificationUser;
3072
+ /** The provided account id of the application */
3073
+ accountId: Account["accountId"];
3074
+ /** Vendor related to the notification, see {@link NotificationVendor} */
3075
+ vendor: NotificationVendor;
3076
+ /** City of the store related to the notification, see {@link BaseField} */
3077
+ city: BaseField;
3078
+ /** Store related to the notification, see {@link NotificationStore} */
3079
+ store: NotificationStore;
3080
+ /** Channel unique identifier */
3081
+ channel_id: number;
3082
+ /** Provided country id */
3083
+ countryId: number;
3084
+ /** Notification step, see {@link NotificationStep} */
3085
+ step: NotificationStep;
3086
+ /** Allocation options, see {@link Allocation} */
3087
+ allocation: Allocation;
3088
+ /** Payment Method of the order related to the notification */
3089
+ paymentMethod: string;
3090
+ /** Total price of the order */
3091
+ total: string;
3092
+ /** Notification additional information, see {@link NotificationAdditionalInfo} */
3093
+ additionalInfo: NotificationAdditionalInfo;
3094
+ /** Notification creation Date */
3095
+ created_at: string;
3096
+ }
3097
+ /**
3098
+ * Notification vendor.
3099
+ *
3100
+ * @interface NotificationVendor
3101
+ * @since 0.1.0
3102
+ * @extends Vendor
3103
+ */
3104
+ interface NotificationVendor extends Omit<Vendor, "images" | "maxPurchaseValue" | "description" | "sponsored" | "active"> {
3105
+ }
3106
+ /**
3107
+ * Notification store.
3108
+ *
3109
+ * @interface NotificationStore
3110
+ * @since 0.1.0
3111
+ * @extends BaseField
3112
+ */
3113
+ interface NotificationStore extends BaseField {
3114
+ /** Store's address */
3115
+ address: string;
3116
+ }
3117
+ /**
3118
+ * Notification user.
3119
+ *
3120
+ * @interface NotificationUser
3121
+ * @since 0.1.0
3122
+ */
3123
+ interface NotificationUser {
3124
+ /** Notification user name */
3125
+ name: string;
3126
+ /** Notification user address */
3127
+ address: string;
3128
+ /** Notification user email */
3129
+ email: string;
3130
+ }
3131
+ /**
3132
+ * Notification step.
3133
+ *
3134
+ * @interface NotificationStep
3135
+ * @since 0.1.0
3136
+ * @extends StepWorkflow
3137
+ */
3138
+ interface NotificationStep extends Omit<StepWorkflow, "additional_info" | "color" | "description" | "description_frontend" | "subtitle_frontend" | "title_frontend" | "transitions" | "notification"> {
3139
+ }
3140
+ /**
3141
+ * Notification additional information.
3142
+ *
3143
+ * @interface NotificationAdditionalInfo
3144
+ * @since 0.1.0
3145
+ */
3146
+ interface NotificationAdditionalInfo {
3147
+ /** Whether or not notification has parent shopping cart*/
3148
+ parent_shopping_cart: boolean;
3149
+ /** Order metadata shipping, see {@link MetadataShipping} */
3150
+ metadata_shipping: MetadataShipping;
3151
+ /** Project unique identifier */
3152
+ aud: string;
3153
+ /** Unique identifier of workflowId */
3154
+ workflowId: number;
3155
+ }
3156
+ /**
3157
+ * Notification list item.
3158
+ *
3159
+ * @interface NotificationListItem
3160
+ * @since 0.1.0
3161
+ */
3162
+ interface NotificationListItem {
3163
+ /** Notification list item title */
3164
+ title: string;
3165
+ /** Notification list item description */
3166
+ description: string;
3167
+ }
3168
+
3169
+ /**
3170
+ * Basic payment method object.
3171
+ *
3172
+ * @interface BasePaymentMethod
3173
+ * @since 0.1.0
3174
+ */
3175
+ interface BasePaymentMethod {
3176
+ /** Payment method's id */
3177
+ id: number;
3178
+ /** Payment method's created date */
3179
+ created_at: string | null;
3180
+ /** Payment method's updated date */
3181
+ updated_at: string | null;
3182
+ /** Payment method's deleted date */
3183
+ deleted_at: string | null;
3184
+ }
3185
+ /**
3186
+ * Representation of a Commerce Payment method.
3187
+ *
3188
+ * @interface PaymentMethod
3189
+ * @since 0.1.0
3190
+ * @extends {{@link BasePaymentMethod}
3191
+ */
3192
+ interface PaymentMethod extends BasePaymentMethod {
3193
+ /** Payment method's name, see {@link PaymentMethodName} */
3194
+ name: PaymentMethodName;
3195
+ /** Payment method image's url, commonly used to save image cards */
3196
+ image_url: string;
3197
+ /** Whether or not the payment method is default */
3198
+ default: boolean;
3199
+ /** Payment method's external id */
3200
+ external_id: string | null;
3201
+ /** Payment method's external code */
3202
+ external_code: number;
3203
+ /** Payment method's parent id */
3204
+ parent_id: string | null;
3205
+ /** Payment method cards' allowed brands, see {@link ProvidersBrand} */
3206
+ methods: PaymentProvider[];
3207
+ /** Payment method taxes */
3208
+ taxes?: Tax[];
3209
+ }
3210
+ /**
3211
+ * Representation of a Commerce Tax
3212
+ *
3213
+ * @interface Tax
3214
+ * @since 0.1.0
3215
+ */
3216
+ interface Tax {
3217
+ /** Tax code */
3218
+ code: number;
3219
+ /** Tax name */
3220
+ name: string;
3221
+ /** Tax percentage */
3222
+ percentage: number;
3223
+ }
3224
+ /**
3225
+ * Representation of a credit card brand.
3226
+ *
3227
+ * @interface PaymentProvider
3228
+ * @since 0.1.0
3229
+ * @extends {{@link PaymentMethod}
3230
+ */
3231
+ interface PaymentProvider extends Omit<PaymentMethod, "name"> {
3232
+ /** Payment method cards' allowed brands, see {@link CreditCardMappings}*/
3233
+ cc_brands: CreditCardMapping[];
3234
+ /** The name of the payment provider */
3235
+ name: string;
3236
+ }
3237
+ /**
3238
+ * Representation of a credit card brand.
3239
+ *
3240
+ * @interface CreditCardMapping
3241
+ * @since 0.1.0
3242
+ * @extends {{@link BasePaymentMethod}
3243
+ */
3244
+ interface CreditCardMapping extends BasePaymentMethod {
3245
+ /** Credit card mapping unique identifier */
3246
+ id: number;
3247
+ /** Credit card mapping name, see {@link CardName} */
3248
+ name: CardName;
3249
+ /** Payment method image's url, commonly used to save image cards */
3250
+ image_url: string;
3251
+ /** Mapping of credit cards */
3252
+ cc_brands_mapping: unknown[];
3253
+ }
3254
+ /**
3255
+ * Payment method common names.
3256
+ *
3257
+ * @typedef PaymentMethodName
3258
+ * @since 0.1.0
3259
+ */
3260
+ declare type PaymentMethodName = "CREDIT_CARD" | "CASH" | "DATAPHONE";
3261
+ /**
3262
+ * Cards common names.
3263
+ *
3264
+ * @typedef CardName
3265
+ * @since 0.1.0
3266
+ */
3267
+ declare type CardName = "Diners" | "Discover" | "American Express" | "Visa" | "MasterCard";
3268
+ /**
3269
+ * Representation of a card inscription.
3270
+ *
3271
+ * @interface CardInscription
3272
+ * @since 0.5.15
3273
+ */
3274
+ interface CardInscription {
3275
+ id: number;
3276
+ uid: string;
3277
+ number: string;
3278
+ type: string;
3279
+ authCode?: string;
3280
+ bin: string;
3281
+ paymentToken: string;
3282
+ createdAt?: string;
3283
+ }
3284
+
3285
+ export { 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, Benefit, BenefitData, BenefitTypes, BillTotal, BillTotalCategory, BillingData, CDNImage, CLDocumentType, CODocumentType, CardInscription, CardName, CartProduct, CartProductAnswer, CartProductQuestion, CartStore, CartTotals, Catalogue, Category, CategoryWithProducts, Code, CommonDocumentType, Country, CountryCode, CountryCurrency, CountrySummary, Coupon, CouponCategory, CouponType, CreditCardMapping, CurrencyCodes, DayOfWeek, Days, Delivery, DeliveryTimeUnit, Discount, DocumentType, ECDocumentType, Field, FieldRecord, Gender, GenericStoreLocation, Image, ImageFit, ImageManipulationConfig, ImageToFormat, Injection, InjectionDetail, IntegrationMessage, Issue, IssueAdditionalInfo, IssueHistory, LivingPlace, LivingPlaceToSave, MaritalStatus, Message, MetadataShipping, 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, 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, Vendor, Wallet, WebhookWorkflow, Workflow, ZipCodeField };