@cloudcommerce/types 0.0.35

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.
@@ -0,0 +1,920 @@
1
+ /* tslint:disable */
2
+ /**
3
+ * This file was automatically generated by json-schema-to-typescript.
4
+ * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
5
+ * and run json-schema-to-typescript to regenerate this file.
6
+ */
7
+
8
+ /**
9
+ * Triggered to handle checkout with billing and shipping and create new order
10
+ */
11
+ export interface CheckoutBody {
12
+ /**
13
+ * @maxItems 3000
14
+ */
15
+ items: {
16
+ /**
17
+ * Product ID
18
+ */
19
+ product_id: string;
20
+ /**
21
+ * ID to specify the variation added to cart, if product has variations
22
+ */
23
+ variation_id?: string;
24
+ /**
25
+ * Item quantity in cart
26
+ */
27
+ quantity: number;
28
+ /**
29
+ * Warehouses by code and respective product stock
30
+ */
31
+ inventory?: {
32
+ /**
33
+ * Product quantity available for sale from current warehouse
34
+ *
35
+ * This interface was referenced by `undefined`'s JSON-Schema definition
36
+ * via the `patternProperty` "^[A-Za-z0-9-_]{2,30}$".
37
+ */
38
+ [k: string]: number;
39
+ };
40
+ /**
41
+ * Product or variation picture for this cart item
42
+ */
43
+ picture?: {
44
+ /**
45
+ * Image size variation
46
+ *
47
+ * This interface was referenced by `undefined`'s JSON-Schema definition
48
+ * via the `patternProperty` "^small|normal|big|zoom|custom$".
49
+ */
50
+ [k: string]: {
51
+ /**
52
+ * Image link
53
+ */
54
+ url: string;
55
+ /**
56
+ * Image size (width x height) in px, such as 100x50 (100px width, 50px height)
57
+ */
58
+ size?: string;
59
+ /**
60
+ * Alternative text, HTML alt tag (important for SEO)
61
+ */
62
+ alt?: string;
63
+ };
64
+ };
65
+ /**
66
+ * Item customization fields
67
+ *
68
+ * @maxItems 100
69
+ */
70
+ customizations?: {
71
+ /**
72
+ * Customization field ID
73
+ */
74
+ _id: string;
75
+ /**
76
+ * Title for this customization field, can be the grid title
77
+ */
78
+ label?: string;
79
+ /**
80
+ * Option chosen or created by customer
81
+ */
82
+ option: {
83
+ /**
84
+ * Identify option if it was predefined (not custom value created by customer)
85
+ */
86
+ option_id?: string;
87
+ /**
88
+ * Option text value displayed for the client
89
+ */
90
+ text: string;
91
+ /**
92
+ * Option color palette (if the field involves colors), starting by main color
93
+ *
94
+ * @maxItems 6
95
+ */
96
+ colors?: string[];
97
+ };
98
+ /**
99
+ * URL of file attached by customer to this field
100
+ */
101
+ attachment?: string;
102
+ /**
103
+ * Price alteration due to this customization
104
+ */
105
+ add_to_price?: {
106
+ /**
107
+ * Type of price addition
108
+ */
109
+ type?: 'percentage' | 'fixed';
110
+ /**
111
+ * Additional value, could be negative
112
+ */
113
+ addition: number;
114
+ };
115
+ }[];
116
+ /**
117
+ * Parent kit product for this item
118
+ */
119
+ kit_product?: {
120
+ /**
121
+ * Kit product ID
122
+ */
123
+ _id: string;
124
+ /**
125
+ * Kit product full name
126
+ */
127
+ name?: string;
128
+ /**
129
+ * Total quantity of items to close a kit unit
130
+ */
131
+ pack_quantity?: number;
132
+ /**
133
+ * Kit total price
134
+ */
135
+ price?: number;
136
+ };
137
+ /**
138
+ * Gift wrap chosen by customer
139
+ */
140
+ gift_wrap?: {
141
+ /**
142
+ * Tag to identify object, use only lowercase letters, digits and underscore
143
+ */
144
+ tag?: string;
145
+ /**
146
+ * Title describing this gift wrap
147
+ */
148
+ label: string;
149
+ /**
150
+ * Additional value due to this gift wrap
151
+ */
152
+ add_to_price?: number;
153
+ };
154
+ /**
155
+ * Flags to associate additional info
156
+ *
157
+ * @maxItems 10
158
+ */
159
+ flags?: string[];
160
+ }[];
161
+ /**
162
+ * Shipping options to calculate freight and deadline
163
+ */
164
+ shipping: {
165
+ /**
166
+ * ID of application chosen for shipping
167
+ */
168
+ app_id: number;
169
+ from?: Address;
170
+ to: Address1;
171
+ /**
172
+ * Whether the package must be delivered with additional service "own hand"
173
+ */
174
+ own_hand?: boolean;
175
+ /**
176
+ * If the package will be delivered with acknowledgment of receipt
177
+ */
178
+ receipt?: boolean;
179
+ /**
180
+ * Code of service defined by carrier, if shipping method is already defined
181
+ */
182
+ service_code?: string;
183
+ };
184
+ /**
185
+ * Payment options to create transaction(s)
186
+ */
187
+ transaction: Transaction | Transaction[];
188
+ /**
189
+ * Extra discount to apply by coupon or UTM campaign
190
+ */
191
+ discount?: {
192
+ /**
193
+ * ID of application chosen for extra discount
194
+ */
195
+ app_id: number;
196
+ /**
197
+ * Text of discount coupon applied by customer
198
+ */
199
+ discount_coupon?: string;
200
+ };
201
+ /**
202
+ * Language two letters code, sometimes with region, eg.: pt_br, fr, en_us
203
+ */
204
+ lang?: string;
205
+ /**
206
+ * UTM campaign HTTP parameters
207
+ */
208
+ utm?: {
209
+ /**
210
+ * Parameter "utm_source", the referrer: (e.g. google, newsletter)
211
+ */
212
+ source?: string;
213
+ /**
214
+ * Parameter "utm_medium", the marketing medium: (e.g. cpc, banner, email)
215
+ */
216
+ medium?: string;
217
+ /**
218
+ * Parameter "utm_campaign", the product, promo code, or slogan (e.g. spring_sale)
219
+ */
220
+ campaign?: string;
221
+ /**
222
+ * Parameter "utm_term", identifies the paid keywords
223
+ */
224
+ term?: string;
225
+ /**
226
+ * Parameter "utm_content", used to differentiate ads
227
+ */
228
+ content?: string;
229
+ };
230
+ /**
231
+ * Code to identify the affiliate that referred the customer
232
+ */
233
+ affiliate_code?: string;
234
+ /**
235
+ * IP address of the browser used by the customer when placing the order
236
+ */
237
+ browser_ip?: string;
238
+ /**
239
+ * Channel unique identificator
240
+ */
241
+ channel_id?: number;
242
+ /**
243
+ * Channel type or source
244
+ */
245
+ channel_type?: 'ecommerce' | 'mobile' | 'pdv' | 'button' | 'facebook' | 'chatbot';
246
+ /**
247
+ * Store domain name (numbers and lowercase letters, eg.: www.myshop.sample)
248
+ */
249
+ domain?: string;
250
+ /**
251
+ * Optional notes with additional info about this order
252
+ */
253
+ notes?: string;
254
+ /**
255
+ * Customer object
256
+ */
257
+ customer?: {
258
+ /**
259
+ * Customer ID
260
+ */
261
+ _id?: null | string;
262
+ /**
263
+ * Customer language two letter code, sometimes with region, eg.: pt_br, fr, en_us
264
+ */
265
+ locale?: string;
266
+ /**
267
+ * Customer main email address
268
+ */
269
+ main_email: string;
270
+ /**
271
+ * List of customer email addresses
272
+ *
273
+ * @maxItems 20
274
+ */
275
+ emails?: {
276
+ /**
277
+ * The actual email address
278
+ */
279
+ address: string;
280
+ /**
281
+ * The type of email
282
+ */
283
+ type?: 'work' | 'home' | 'other';
284
+ /**
285
+ * States whether or not the email address has been verified
286
+ */
287
+ verified?: boolean;
288
+ }[];
289
+ /**
290
+ * The name of this Customer, suitable for display
291
+ */
292
+ display_name?: string;
293
+ /**
294
+ * Customer name object
295
+ */
296
+ name: {
297
+ /**
298
+ * The family name of this user, or "last name"
299
+ */
300
+ family_name?: string;
301
+ /**
302
+ * The "first name" of this user
303
+ */
304
+ given_name?: string;
305
+ /**
306
+ * The middle name(s) of this user
307
+ */
308
+ middle_name?: string;
309
+ };
310
+ /**
311
+ * Customer gender, female, male or third gender (X)
312
+ */
313
+ gender?: 'f' | 'm' | 'x';
314
+ /**
315
+ * User profile pictures
316
+ *
317
+ * @maxItems 20
318
+ */
319
+ photos?: string[];
320
+ /**
321
+ * List of customer phone numbers
322
+ *
323
+ * @maxItems 20
324
+ */
325
+ phones?: {
326
+ /**
327
+ * Country calling code (without +), defined by standards E.123 and E.164
328
+ */
329
+ country_code?: number;
330
+ /**
331
+ * The actual phone number, digits only
332
+ */
333
+ number: string;
334
+ /**
335
+ * The type of phone
336
+ */
337
+ type?: 'home' | 'personal' | 'work' | 'other';
338
+ }[];
339
+ /**
340
+ * Physical or juridical (company) person
341
+ */
342
+ registry_type?: 'p' | 'j';
343
+ /**
344
+ * Country of document origin, an ISO 3166-2 code
345
+ */
346
+ doc_country?: string;
347
+ /**
348
+ * Responsible person or organization document number (only numbers)
349
+ */
350
+ doc_number?: string;
351
+ /**
352
+ * Municipal or state registration if exists
353
+ */
354
+ inscription_type?: 'State' | 'Municipal';
355
+ /**
356
+ * Municipal or state registration number (with characters) if exists
357
+ */
358
+ inscription_number?: string;
359
+ /**
360
+ * Registered company name or responsible fullname
361
+ */
362
+ corporate_name?: string;
363
+ };
364
+ }
365
+ /**
366
+ * Sender's address
367
+ */
368
+ export interface Address {
369
+ /**
370
+ * ZIP (CEP, postal...) code
371
+ */
372
+ zip: string;
373
+ /**
374
+ * Street or public place name
375
+ */
376
+ street?: string;
377
+ /**
378
+ * House or building street number
379
+ */
380
+ number?: number;
381
+ /**
382
+ * Address complement or second line, such as apartment number
383
+ */
384
+ complement?: string;
385
+ /**
386
+ * Borough name
387
+ */
388
+ borough?: string;
389
+ /**
390
+ * Some optional other reference for this address
391
+ */
392
+ near_to?: string;
393
+ /**
394
+ * Full in line mailing address, should include street, number and borough
395
+ */
396
+ line_address?: string;
397
+ /**
398
+ * City name
399
+ */
400
+ city?: string;
401
+ /**
402
+ * Country name
403
+ */
404
+ country?: string;
405
+ /**
406
+ * An ISO 3166-2 country code
407
+ */
408
+ country_code?: string;
409
+ /**
410
+ * Province or state name
411
+ */
412
+ province?: string;
413
+ /**
414
+ * The two-letter code for the province or state
415
+ */
416
+ province_code?: string;
417
+ /**
418
+ * The name of recipient, generally is the customer's name
419
+ */
420
+ name?: string;
421
+ /**
422
+ * The recipient's last name
423
+ */
424
+ last_name?: string;
425
+ /**
426
+ * Customer phone number for this mailing address
427
+ */
428
+ phone?: {
429
+ /**
430
+ * Country calling code (without +), defined by standards E.123 and E.164
431
+ */
432
+ country_code?: number;
433
+ /**
434
+ * The actual phone number, digits only
435
+ */
436
+ number: string;
437
+ };
438
+ }
439
+ /**
440
+ * Shipping address (recipient)
441
+ */
442
+ export interface Address1 {
443
+ /**
444
+ * ZIP (CEP, postal...) code
445
+ */
446
+ zip: string;
447
+ /**
448
+ * Street or public place name
449
+ */
450
+ street?: string;
451
+ /**
452
+ * House or building street number
453
+ */
454
+ number?: number;
455
+ /**
456
+ * Address complement or second line, such as apartment number
457
+ */
458
+ complement?: string;
459
+ /**
460
+ * Borough name
461
+ */
462
+ borough?: string;
463
+ /**
464
+ * Some optional other reference for this address
465
+ */
466
+ near_to?: string;
467
+ /**
468
+ * Full in line mailing address, should include street, number and borough
469
+ */
470
+ line_address?: string;
471
+ /**
472
+ * City name
473
+ */
474
+ city?: string;
475
+ /**
476
+ * Country name
477
+ */
478
+ country?: string;
479
+ /**
480
+ * An ISO 3166-2 country code
481
+ */
482
+ country_code?: string;
483
+ /**
484
+ * Province or state name
485
+ */
486
+ province?: string;
487
+ /**
488
+ * The two-letter code for the province or state
489
+ */
490
+ province_code?: string;
491
+ /**
492
+ * The name of recipient, generally is the customer's name
493
+ */
494
+ name?: string;
495
+ /**
496
+ * The recipient's last name
497
+ */
498
+ last_name?: string;
499
+ /**
500
+ * Customer phone number for this mailing address
501
+ */
502
+ phone?: {
503
+ /**
504
+ * Country calling code (without +), defined by standards E.123 and E.164
505
+ */
506
+ country_code?: number;
507
+ /**
508
+ * The actual phone number, digits only
509
+ */
510
+ number: string;
511
+ };
512
+ }
513
+ /**
514
+ * Transaction options object
515
+ */
516
+ export interface Transaction {
517
+ /**
518
+ * ID of application chosen for transaction
519
+ */
520
+ app_id: number;
521
+ /**
522
+ * Transaction type
523
+ */
524
+ type?: 'payment' | 'recurrence';
525
+ /**
526
+ * Chosen payment method object
527
+ */
528
+ payment_method: {
529
+ /**
530
+ * Standardized payment method code
531
+ */
532
+ code:
533
+ | 'credit_card'
534
+ | 'banking_billet'
535
+ | 'online_debit'
536
+ | 'account_deposit'
537
+ | 'debit_card'
538
+ | 'balance_on_intermediary'
539
+ | 'loyalty_points'
540
+ | 'other';
541
+ /**
542
+ * Short description for payment method
543
+ */
544
+ name?: string;
545
+ };
546
+ /**
547
+ * Name of payment method shown to customers
548
+ */
549
+ label?: string;
550
+ /**
551
+ * Payment icon image URI
552
+ */
553
+ icon?: string;
554
+ /**
555
+ * Payment intermediator
556
+ */
557
+ intermediator?: {
558
+ /**
559
+ * Name of payment intermediator
560
+ */
561
+ name?: string;
562
+ /**
563
+ * URI to intermediator website
564
+ */
565
+ link?: string;
566
+ /**
567
+ * Gateway name standardized as identification code
568
+ */
569
+ code: string;
570
+ };
571
+ /**
572
+ * Base URI to payments
573
+ */
574
+ payment_url?: string;
575
+ /**
576
+ * Order buyer info
577
+ */
578
+ buyer: {
579
+ /**
580
+ * Customer ID in the store
581
+ */
582
+ customer_id?: string;
583
+ /**
584
+ * Buyer email address
585
+ */
586
+ email: string;
587
+ /**
588
+ * Customer full name or company corporate name
589
+ */
590
+ fullname: string;
591
+ /**
592
+ * Customer gender, female, male or third gender (X)
593
+ */
594
+ gender?: 'f' | 'm' | 'x';
595
+ /**
596
+ * Date of customer birth
597
+ */
598
+ birth_date: {
599
+ /**
600
+ * Day of birth
601
+ */
602
+ day?: number;
603
+ /**
604
+ * Number of month of birth
605
+ */
606
+ month?: number;
607
+ /**
608
+ * Year of birth
609
+ */
610
+ year?: number;
611
+ };
612
+ /**
613
+ * Buyer contact phone
614
+ */
615
+ phone: {
616
+ /**
617
+ * Country calling code (without +), defined by standards E.123 and E.164
618
+ */
619
+ country_code?: number;
620
+ /**
621
+ * The actual phone number, digits only
622
+ */
623
+ number: string;
624
+ /**
625
+ * The type of phone
626
+ */
627
+ type?: 'home' | 'personal' | 'work' | 'other';
628
+ };
629
+ /**
630
+ * Physical or juridical (company) person
631
+ */
632
+ registry_type: 'p' | 'j';
633
+ /**
634
+ * Country of document origin, an ISO 3166-2 code
635
+ */
636
+ doc_country?: string;
637
+ /**
638
+ * Responsible person or organization document number (only numbers)
639
+ */
640
+ doc_number: string;
641
+ /**
642
+ * Municipal or state registration if exists
643
+ */
644
+ inscription_type?: 'State' | 'Municipal';
645
+ /**
646
+ * Municipal or state registration number (with characters) if exists
647
+ */
648
+ inscription_number?: string;
649
+ };
650
+ /**
651
+ * Transation payer info
652
+ */
653
+ payer?: {
654
+ /**
655
+ * Payer full name or company corporate name
656
+ */
657
+ fullname?: string;
658
+ /**
659
+ * Date of payer birth
660
+ */
661
+ birth_date?: {
662
+ /**
663
+ * Day of birth
664
+ */
665
+ day?: number;
666
+ /**
667
+ * Number of month of birth
668
+ */
669
+ month?: number;
670
+ /**
671
+ * Year of birth
672
+ */
673
+ year?: number;
674
+ };
675
+ /**
676
+ * Payer contact phone
677
+ */
678
+ phone?: {
679
+ /**
680
+ * Country calling code (without +), defined by standards E.123 and E.164
681
+ */
682
+ country_code?: number;
683
+ /**
684
+ * The actual phone number, digits only
685
+ */
686
+ number: string;
687
+ /**
688
+ * The type of phone
689
+ */
690
+ type?: 'home' | 'personal' | 'work' | 'other';
691
+ };
692
+ /**
693
+ * Physical or juridical (company) person
694
+ */
695
+ registry_type?: 'p' | 'j';
696
+ /**
697
+ * Country of document origin, an ISO 3166-2 code
698
+ */
699
+ doc_country?: string;
700
+ /**
701
+ * Responsible person or organization document number (only numbers)
702
+ */
703
+ doc_number?: string;
704
+ };
705
+ /**
706
+ * ID of customer account in the intermediator
707
+ */
708
+ intermediator_buyer_id?: string;
709
+ billing_address?: Address2;
710
+ to?: Address3;
711
+ /**
712
+ * Credit card data, if payment will be done with credit card
713
+ */
714
+ credit_card?: {
715
+ /**
716
+ * Full name of the holder, as it is on the credit card
717
+ */
718
+ holder_name?: string;
719
+ /**
720
+ * Issuer identification number (IIN), known as bank identification number (BIN)
721
+ */
722
+ bin?: number;
723
+ /**
724
+ * Credit card issuer name, eg.: Visa, American Express, MasterCard
725
+ */
726
+ company?: string;
727
+ /**
728
+ * Last digits (up to 4) of credit card number
729
+ */
730
+ last_digits?: string;
731
+ /**
732
+ * Unique credit card token
733
+ */
734
+ token?: string;
735
+ /**
736
+ * Credit card CVV number (Card Verification Value)
737
+ */
738
+ cvv?: number;
739
+ /**
740
+ * Credit card encrypted hash
741
+ */
742
+ hash?: string;
743
+ /**
744
+ * Whether the hashed credit card should be saved for further use
745
+ */
746
+ save?: boolean;
747
+ };
748
+ /**
749
+ * Number of installments chosen
750
+ */
751
+ installments_number?: number;
752
+ /**
753
+ * Customer's loyalty points used, program ID as property
754
+ */
755
+ loyalty_points_applied?: {
756
+ /**
757
+ * Number of loyalty points used
758
+ *
759
+ * This interface was referenced by `undefined`'s JSON-Schema definition
760
+ * via the `patternProperty` "^[a-z0-9_]{2,30}$".
761
+ */
762
+ [k: string]: number;
763
+ };
764
+ /**
765
+ * Payment or order ID if pre committed on gateway (authorization/capture)
766
+ */
767
+ open_payment_id?: string;
768
+ /**
769
+ * Numeric part (multiplier) for final amount when ordering with 2+ transactions
770
+ */
771
+ amount_part?: number;
772
+ }
773
+ /**
774
+ * The mailing address associated with the payment method
775
+ */
776
+ export interface Address2 {
777
+ /**
778
+ * ZIP (CEP, postal...) code
779
+ */
780
+ zip: string;
781
+ /**
782
+ * Street or public place name
783
+ */
784
+ street?: string;
785
+ /**
786
+ * House or building street number
787
+ */
788
+ number?: number;
789
+ /**
790
+ * Address complement or second line, such as apartment number
791
+ */
792
+ complement?: string;
793
+ /**
794
+ * Borough name
795
+ */
796
+ borough?: string;
797
+ /**
798
+ * Some optional other reference for this address
799
+ */
800
+ near_to?: string;
801
+ /**
802
+ * Full in line mailing address, should include street, number and borough
803
+ */
804
+ line_address?: string;
805
+ /**
806
+ * City name
807
+ */
808
+ city?: string;
809
+ /**
810
+ * Country name
811
+ */
812
+ country?: string;
813
+ /**
814
+ * An ISO 3166-2 country code
815
+ */
816
+ country_code?: string;
817
+ /**
818
+ * Province or state name
819
+ */
820
+ province?: string;
821
+ /**
822
+ * The two-letter code for the province or state
823
+ */
824
+ province_code?: string;
825
+ /**
826
+ * The name of recipient, generally is the customer's name
827
+ */
828
+ name?: string;
829
+ /**
830
+ * The recipient's last name
831
+ */
832
+ last_name?: string;
833
+ /**
834
+ * Customer phone number for this mailing address
835
+ */
836
+ phone?: {
837
+ /**
838
+ * Country calling code (without +), defined by standards E.123 and E.164
839
+ */
840
+ country_code?: number;
841
+ /**
842
+ * The actual phone number, digits only
843
+ */
844
+ number: string;
845
+ };
846
+ }
847
+ /**
848
+ * Shipping address (recipient)
849
+ */
850
+ export interface Address3 {
851
+ /**
852
+ * ZIP (CEP, postal...) code
853
+ */
854
+ zip: string;
855
+ /**
856
+ * Street or public place name
857
+ */
858
+ street?: string;
859
+ /**
860
+ * House or building street number
861
+ */
862
+ number?: number;
863
+ /**
864
+ * Address complement or second line, such as apartment number
865
+ */
866
+ complement?: string;
867
+ /**
868
+ * Borough name
869
+ */
870
+ borough?: string;
871
+ /**
872
+ * Some optional other reference for this address
873
+ */
874
+ near_to?: string;
875
+ /**
876
+ * Full in line mailing address, should include street, number and borough
877
+ */
878
+ line_address?: string;
879
+ /**
880
+ * City name
881
+ */
882
+ city?: string;
883
+ /**
884
+ * Country name
885
+ */
886
+ country?: string;
887
+ /**
888
+ * An ISO 3166-2 country code
889
+ */
890
+ country_code?: string;
891
+ /**
892
+ * Province or state name
893
+ */
894
+ province?: string;
895
+ /**
896
+ * The two-letter code for the province or state
897
+ */
898
+ province_code?: string;
899
+ /**
900
+ * The name of recipient, generally is the customer's name
901
+ */
902
+ name?: string;
903
+ /**
904
+ * The recipient's last name
905
+ */
906
+ last_name?: string;
907
+ /**
908
+ * Customer phone number for this mailing address
909
+ */
910
+ phone?: {
911
+ /**
912
+ * Country calling code (without +), defined by standards E.123 and E.164
913
+ */
914
+ country_code?: number;
915
+ /**
916
+ * The actual phone number, digits only
917
+ */
918
+ number: string;
919
+ };
920
+ }