@artisan-commerce/types 0.14.0-canary.3 → 0.14.0-canary.30

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