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

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