@cloudcommerce/api 0.14.0 → 0.15.0

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.
@@ -1,1720 +0,0 @@
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
- * Order object model
10
- */
11
- export interface Orders {
12
- _id: string & { length: 24 };
13
- created_at: string;
14
- updated_at: string;
15
- store_id: number;
16
- /**
17
- * Whether order was created by staff and is trusted
18
- */
19
- staff_signature?: boolean;
20
- /**
21
- * URL to checkout page, if necessary, use `(_id)` where order unique ID must appear at URL
22
- */
23
- checkout_link?: string;
24
- /**
25
- * URL to order status page, if necessary, use `(_id)` where order unique ID must appear
26
- */
27
- status_link?: string;
28
- /**
29
- * UTM campaign HTTP parameters
30
- */
31
- utm?: {
32
- /**
33
- * Parameter 'utm_source', the referrer: (e.g. 'google', 'newsletter')
34
- */
35
- source?: string;
36
- /**
37
- * Parameter 'utm_medium', the marketing medium: (e.g. 'cpc', 'banner', 'email')
38
- */
39
- medium?: string;
40
- /**
41
- * Parameter 'utm_campaign', the product, promo code, or slogan (e.g. 'spring_sale')
42
- */
43
- campaign?: string;
44
- /**
45
- * Parameter 'utm_term', identifies the paid keywords
46
- */
47
- term?: string;
48
- /**
49
- * Parameter 'utm_content', used to differentiate ads
50
- */
51
- content?: string;
52
- };
53
- /**
54
- * The website that the customer clicked on to come to the shop
55
- */
56
- referring_site?: string;
57
- /**
58
- * Code to identify the affiliate that referred the customer
59
- */
60
- affiliate_code?: string;
61
- /**
62
- * Initial URL of the session that originated the order
63
- */
64
- origin_url?: string;
65
- /**
66
- * IP address of the device used by the customer when placing the order
67
- */
68
- client_ip?: string;
69
- /**
70
- * User-Agent of the browser (if any) used by the customer
71
- */
72
- client_user_agent?: string;
73
- channel_id?: string;
74
- /**
75
- * Channel type or source
76
- */
77
- channel_type?: 'ecommerce' | 'mobile' | 'pos' | 'button' | 'social' | 'chatbot' | 'live';
78
- /**
79
- * Store domain name (numbers and lowercase letters, eg.: www.myshop.sample)
80
- */
81
- domain?: string;
82
- /**
83
- * Order number, if not specified will be filled auto incrementing
84
- */
85
- number?: number;
86
- /**
87
- * Order code used by seller and customer for identification, should be unique
88
- */
89
- code?: string;
90
- /**
91
- * Order main status
92
- */
93
- status?: 'open' | 'closed' | 'cancelled';
94
- /**
95
- * Date and time when order was opened, in ISO 8601 standard representation [auto]
96
- */
97
- opened_at?: string;
98
- /**
99
- * If the order is closed, specify the date and time it occurred
100
- */
101
- closed_at?: string;
102
- /**
103
- * If the order is cancelled, specify the date and time it occurred
104
- */
105
- cancelled_at?: string;
106
- /**
107
- * If the order is cancelled, specify the reason why it was cancelled
108
- */
109
- cancel_reason?: 'customer' | 'fraud' | 'inventory' | 'declined' | 'other';
110
- /**
111
- * Order status created by seller
112
- */
113
- seller_status?: string;
114
- /**
115
- * Financial status and date of change
116
- */
117
- financial_status?: {
118
- /**
119
- * Last status change, date and time in ISO 8601 standard representation [auto]
120
- */
121
- updated_at?: string;
122
- /**
123
- * Order financial status
124
- */
125
- current:
126
- | 'pending'
127
- | 'under_analysis'
128
- | 'authorized'
129
- | 'unauthorized'
130
- | 'partially_paid'
131
- | 'paid'
132
- | 'in_dispute'
133
- | 'partially_refunded'
134
- | 'refunded'
135
- | 'voided'
136
- | 'unknown';
137
- /**
138
- * Flags to associate additional info
139
- *
140
- * @maxItems 10
141
- */
142
- flags?: string[];
143
- };
144
- /**
145
- * Fulfillment status and date of change
146
- */
147
- fulfillment_status?: {
148
- /**
149
- * Last status change, date and time in ISO 8601 standard representation [auto]
150
- */
151
- updated_at?: string;
152
- /**
153
- * Order fulfillment (shipping) status
154
- */
155
- current:
156
- | 'invoice_issued'
157
- | 'in_production'
158
- | 'in_separation'
159
- | 'ready_for_shipping'
160
- | 'partially_shipped'
161
- | 'shipped'
162
- | 'partially_delivered'
163
- | 'delivered'
164
- | 'returned_for_exchange'
165
- | 'received_for_exchange'
166
- | 'returned';
167
- /**
168
- * Flags to associate additional info
169
- *
170
- * @maxItems 10
171
- */
172
- flags?: string[];
173
- };
174
- /**
175
- * Designator of currency according to ISO 4217 (3 uppercase letters)
176
- */
177
- currency_id?: string;
178
- /**
179
- * Graphic symbol used as a shorthand for currency's name
180
- */
181
- currency_symbol?: string;
182
- /**
183
- * Object with sums of values
184
- */
185
- amount: {
186
- /**
187
- * Order total amount
188
- */
189
- total: number;
190
- /**
191
- * The sum of all items prices
192
- */
193
- subtotal?: number;
194
- /**
195
- * Order freight cost
196
- */
197
- freight?: number;
198
- /**
199
- * Final discount value applied
200
- */
201
- discount?: number;
202
- /**
203
- * Value deducted via balance in wallet or loyalty points
204
- */
205
- balance?: number;
206
- /**
207
- * The sum of all the taxes applied to the order
208
- */
209
- tax?: number;
210
- /**
211
- * Sum of optional extra costs applied
212
- */
213
- extra?: number;
214
- };
215
- /**
216
- * Name or summary of order payment method(s)
217
- */
218
- payment_method_label?: string;
219
- /**
220
- * Name of order shipping method(s)
221
- */
222
- shipping_method_label?: string;
223
- /**
224
- * List of order customers
225
- *
226
- * @maxItems 20
227
- */
228
- buyers?: {
229
- /**
230
- * Customer ID (ObjectID)
231
- */
232
- _id: string & { length: 24 };
233
- /**
234
- * Customer language two letter code, sometimes with region, e.g. 'pt_br', 'fr', 'en_us'
235
- */
236
- locale?: string;
237
- /**
238
- * Customer main email address
239
- */
240
- main_email?: string;
241
- /**
242
- * List of customer email addresses
243
- *
244
- * @maxItems 20
245
- */
246
- emails?: {
247
- /**
248
- * The actual email address
249
- */
250
- address: string;
251
- /**
252
- * The type of email
253
- */
254
- type?: 'work' | 'home' | 'other';
255
- /**
256
- * States whether or not the email address has been verified
257
- */
258
- verified?: boolean;
259
- }[];
260
- /**
261
- * The name of this Customer, suitable for display
262
- */
263
- display_name?: string;
264
- /**
265
- * Customer name object
266
- */
267
- name?: {
268
- /**
269
- * The family name of this user, or "last name"
270
- */
271
- family_name?: string;
272
- /**
273
- * The "first name" of this user
274
- */
275
- given_name?: string;
276
- /**
277
- * The middle name(s) of this user
278
- */
279
- middle_name?: string;
280
- };
281
- /**
282
- * Customer preferred pronoun
283
- */
284
- pronoun?: 'he' | 'she';
285
- /**
286
- * List of customer phone numbers
287
- *
288
- * @maxItems 20
289
- */
290
- phones?: {
291
- /**
292
- * Country calling code (without +), defined by standards E.123 and E.164
293
- */
294
- country_code?: number;
295
- /**
296
- * The actual phone number, digits only
297
- */
298
- number: string;
299
- /**
300
- * The type of phone
301
- */
302
- type?: 'home' | 'personal' | 'work' | 'other';
303
- }[];
304
- /**
305
- * Physical or juridical (company) person
306
- */
307
- registry_type?: 'p' | 'j';
308
- /**
309
- * Country of document origin, an ISO 3166-2 code
310
- */
311
- doc_country?: string;
312
- /**
313
- * Responsible person or organization document number (only numbers)
314
- */
315
- doc_number?: string;
316
- /**
317
- * Municipal or state registration if exists
318
- */
319
- inscription_type?: 'State' | 'Municipal';
320
- /**
321
- * Municipal or state registration number (with characters) if exists
322
- */
323
- inscription_number?: string;
324
- /**
325
- * Registered company name or responsible fullname
326
- */
327
- corporate_name?: string;
328
- }[];
329
- /**
330
- * Whether the order is only budget, without payment transactions
331
- */
332
- budget_only?: boolean;
333
- /**
334
- * List of shipping methods and address for this order
335
- *
336
- * @maxItems 100
337
- */
338
- shipping_lines?: {
339
- /**
340
- * Shipping line ID (ObjectID) [auto]
341
- */
342
- _id?: string;
343
- from: Address;
344
- to: Address1;
345
- /**
346
- * Shipping object information
347
- */
348
- package?: {
349
- /**
350
- * Package dimensions
351
- */
352
- dimensions?: {
353
- /**
354
- * Package width, height and length
355
- *
356
- * This interface was referenced by `undefined`'s JSON-Schema definition
357
- * via the `patternProperty` "^width|height|length$".
358
- */
359
- [k: string]: {
360
- /**
361
- * Size in specified unit
362
- */
363
- value: number;
364
- /**
365
- * Unit of measurement
366
- */
367
- unit?: 'mm' | 'cm' | 'm' | 'ft' | 'in' | 'yd' | 'mi';
368
- };
369
- };
370
- /**
371
- * Package weight for freight calculation
372
- */
373
- weight?: {
374
- /**
375
- * Size in specified unit
376
- */
377
- value: number;
378
- /**
379
- * Unit of measurement
380
- */
381
- unit?: 'mg' | 'g' | 'kg' | 'lb' | 'oz';
382
- };
383
- };
384
- /**
385
- * Shipping method (by application) chosen by customer
386
- */
387
- app?: {
388
- /**
389
- * Application ID (ObjectID)
390
- */
391
- _id?: string;
392
- /**
393
- * Name of shipping method shown to customers
394
- */
395
- label?: string;
396
- /**
397
- * Carrier name
398
- */
399
- carrier?: string;
400
- /**
401
- * Carrier document number (only numbers)
402
- */
403
- carrier_doc_number?: string;
404
- /**
405
- * Name of service (shipping method) defined by carrier
406
- */
407
- service_name?: string;
408
- /**
409
- * Code of service defined by carrier
410
- */
411
- service_code?: string;
412
- /**
413
- * Contract number of the shop with carrier, if exists
414
- */
415
- contract?: string;
416
- /**
417
- * Shipping method icon image URI
418
- */
419
- icon?: string;
420
- /**
421
- * URI to carrier website to get package tracking status
422
- */
423
- tracking_url?: string;
424
- };
425
- /**
426
- * Pick up option when no (or optional) freight
427
- */
428
- pick_up?: 'store' | 'locker' | 'point' | 'other';
429
- /**
430
- * Freight cost for this shipping line, without additionals
431
- */
432
- price?: number;
433
- /**
434
- * The package value declared to carrier, generally the sum of all items prices
435
- */
436
- declared_value?: number;
437
- /**
438
- * Cost for the "declared value" additional service
439
- */
440
- declared_value_price?: number;
441
- /**
442
- * Whether the package must be delivered with additional service "own hand"
443
- */
444
- own_hand?: boolean;
445
- /**
446
- * Cost for the "own hand" additional service
447
- */
448
- own_hand_price?: number;
449
- /**
450
- * If the package will be delivered with acknowledgment of receipt
451
- */
452
- receipt?: boolean;
453
- /**
454
- * Cost for the "acknowledgment of receipt" additional service
455
- */
456
- receipt_price?: number;
457
- /**
458
- * List of other additional services for this shipping line
459
- *
460
- * @maxItems 30
461
- */
462
- other_additionals?: {
463
- /**
464
- * Tag to identify object, use only lowercase letters, digits and underscore
465
- */
466
- tag?: string;
467
- /**
468
- * Name of the additional service
469
- */
470
- label: string;
471
- /**
472
- * Cost for this additional service
473
- */
474
- price?: number;
475
- }[];
476
- /**
477
- * List of taxes or other additional services for this shipping line
478
- *
479
- * @maxItems 30
480
- */
481
- taxes?: {
482
- /**
483
- * Tag to identify object, use only lowercase letters, digits and underscore
484
- */
485
- tag?: string;
486
- /**
487
- * Tax title
488
- */
489
- label: string;
490
- /**
491
- * Tax value applied
492
- */
493
- price?: number;
494
- /**
495
- * Tax rate as a function of package value
496
- */
497
- rate?: number;
498
- }[];
499
- /**
500
- * Discount on shipping price, negative if value was additionated (not discounted)
501
- */
502
- discount?: number;
503
- /**
504
- * Total cost for this shipping line, with additionals and taxes
505
- */
506
- total_price?: number;
507
- /**
508
- * Deadline for sending the package
509
- */
510
- posting_deadline?: {
511
- /**
512
- * Number of days to post the product after purchase
513
- */
514
- days: number;
515
- /**
516
- * If the deadline is calculated in working days
517
- */
518
- working_days?: boolean;
519
- /**
520
- * Whether days will be counted after payment approval
521
- */
522
- after_approval?: boolean;
523
- };
524
- /**
525
- * Estimated delivery time
526
- */
527
- delivery_time?: {
528
- /**
529
- * Number of days for delivery after shipping
530
- */
531
- days: number;
532
- /**
533
- * If the deadline is calculated in working days
534
- */
535
- working_days?: boolean;
536
- };
537
- /**
538
- * Date range when delivery will be made
539
- */
540
- scheduled_delivery?: {
541
- /**
542
- * Scheduled date and time on the ISO 8601 representation
543
- *
544
- * This interface was referenced by `undefined`'s JSON-Schema definition
545
- * via the `patternProperty` "^start|end$".
546
- */
547
- [k: string]: string;
548
- };
549
- /**
550
- * Additional text instructions for pick up or custom delivery process
551
- */
552
- delivery_instructions?: string;
553
- /**
554
- * List of codes for delivery status follow-up
555
- *
556
- * @maxItems 30
557
- */
558
- tracking_codes?: {
559
- /**
560
- * Tag to identify object, use only lowercase letters, digits and underscore
561
- */
562
- tag?: string;
563
- /**
564
- * Tracking code string
565
- */
566
- code: string;
567
- /**
568
- * URI for carrier website to get the tracking status with this code
569
- */
570
- link?: string;
571
- }[];
572
- /**
573
- * List of invoices
574
- *
575
- * @maxItems 30
576
- */
577
- invoices?: {
578
- /**
579
- * Company that issued this invoice, usually the store company
580
- */
581
- issuer?: {
582
- /**
583
- * Organization document number (only numbers)
584
- */
585
- doc_number?: string;
586
- /**
587
- * Municipal or state registration if exists
588
- */
589
- inscription_type?: 'State' | 'Municipal';
590
- /**
591
- * Municipal or state registration number (with characters) if exists
592
- */
593
- inscription_number?: string;
594
- /**
595
- * Registered company name
596
- */
597
- corporate_name?: string;
598
- };
599
- /**
600
- * Invoice number
601
- */
602
- number: string;
603
- /**
604
- * Invoice serial number
605
- */
606
- serial_number?: string;
607
- /**
608
- * Date and time of issue, in ISO 8601 standard representation [auto]
609
- */
610
- issued_at?: string;
611
- /**
612
- * URI to invoice file
613
- */
614
- link?: string;
615
- /**
616
- * Invoice access key (BR)
617
- */
618
- access_key?: string;
619
- /**
620
- * URI to DANFE (BR)
621
- */
622
- link_danfe?: string;
623
- }[];
624
- /**
625
- * Fulfillment status and date of change
626
- */
627
- status?: {
628
- /**
629
- * Last status change, date and time in ISO 8601 standard representation [auto]
630
- */
631
- updated_at?: string;
632
- /**
633
- * Shipping status
634
- */
635
- current:
636
- | 'invoice_issued'
637
- | 'in_production'
638
- | 'in_separation'
639
- | 'ready_for_shipping'
640
- | 'shipped'
641
- | 'delivered'
642
- | 'returned_for_exchange'
643
- | 'received_for_exchange'
644
- | 'returned';
645
- };
646
- /**
647
- * For multi DC, set warehouse where the stock will be handled
648
- */
649
- warehouse_code?: string;
650
- /**
651
- * List of order items related with this shipping line, use only if items are divided
652
- *
653
- * @maxItems 3000
654
- */
655
- items?: string[];
656
- /**
657
- * Flags to associate additional info
658
- *
659
- * @maxItems 10
660
- */
661
- flags?: string[];
662
- /**
663
- * List of custom fields
664
- *
665
- * @maxItems 10
666
- */
667
- custom_fields?: {
668
- /**
669
- * Field name
670
- */
671
- field: string;
672
- /**
673
- * Field value
674
- */
675
- value: string;
676
- }[];
677
- /**
678
- * Optional notes with additional info about this shipping line
679
- */
680
- notes?: string;
681
- }[];
682
- /**
683
- * List of payment transactions for this order
684
- *
685
- * @maxItems 100
686
- */
687
- transactions?: {
688
- /**
689
- * Transaction ID (ObjectID) [auto]
690
- */
691
- _id?: string;
692
- /**
693
- * Date and time of transaction creation, in ISO 8601 standard representation [auto]
694
- */
695
- created_at?: string;
696
- /**
697
- * Transaction type
698
- */
699
- type?: 'payment' | 'recurrence';
700
- /**
701
- * Payment method object
702
- */
703
- payment_method: {
704
- /**
705
- * Standardized payment method code
706
- */
707
- code:
708
- | 'credit_card'
709
- | 'banking_billet'
710
- | 'online_debit'
711
- | 'account_deposit'
712
- | 'debit_card'
713
- | 'balance_on_intermediary'
714
- | 'loyalty_points'
715
- | 'other';
716
- /**
717
- * Short description for payment method
718
- */
719
- name?: string;
720
- };
721
- /**
722
- * Direct link to pay current transaction
723
- */
724
- payment_link?: string;
725
- /**
726
- * Additional text instructions for manual payments
727
- */
728
- payment_instructions?: string;
729
- /**
730
- * Transation payer info
731
- */
732
- payer?: {
733
- /**
734
- * Payer full name or company corporate name
735
- */
736
- fullname?: string;
737
- /**
738
- * Date of payer birth
739
- */
740
- birth_date?: {
741
- /**
742
- * Day of birth
743
- */
744
- day?: number;
745
- /**
746
- * Number of month of birth
747
- */
748
- month?: number;
749
- /**
750
- * Year of birth
751
- */
752
- year?: number;
753
- };
754
- /**
755
- * Payer contact phone
756
- */
757
- phone?: {
758
- /**
759
- * Country calling code (without +), defined by standards E.123 and E.164
760
- */
761
- country_code?: number;
762
- /**
763
- * The actual phone number, digits only
764
- */
765
- number: string;
766
- /**
767
- * The type of phone
768
- */
769
- type?: 'home' | 'personal' | 'work' | 'other';
770
- };
771
- /**
772
- * Physical or juridical (company) person
773
- */
774
- registry_type?: 'p' | 'j';
775
- /**
776
- * Country of document origin, an ISO 3166-2 code
777
- */
778
- doc_country?: string;
779
- /**
780
- * Responsible person or organization document number (only numbers)
781
- */
782
- doc_number?: string;
783
- };
784
- billing_address?: Address2;
785
- /**
786
- * Payment method (by application) chosen by customer
787
- */
788
- app?: {
789
- /**
790
- * Application ID (ObjectID)
791
- */
792
- _id?: string;
793
- /**
794
- * Name of payment method shown to customers
795
- */
796
- label?: string;
797
- /**
798
- * Payment icon image URI
799
- */
800
- icon?: string;
801
- /**
802
- * Payment intermediator
803
- */
804
- intermediator?: {
805
- /**
806
- * Name of payment intermediator
807
- */
808
- name?: string;
809
- /**
810
- * URI to intermediator website
811
- */
812
- link?: string;
813
- /**
814
- * Gateway name standardized as identification code
815
- */
816
- code: string;
817
- };
818
- /**
819
- * Base URI to payments
820
- */
821
- payment_url?: string;
822
- };
823
- /**
824
- * Transaction properties in the intermediator
825
- */
826
- intermediator?: {
827
- /**
828
- * Transaction ID in the intermediator
829
- */
830
- transaction_id?: string;
831
- /**
832
- * Transaction code in the intermediator
833
- */
834
- transaction_code?: string;
835
- /**
836
- * Transaction reference code
837
- */
838
- transaction_reference?: string;
839
- /**
840
- * Payment method as defined by intermediator
841
- */
842
- payment_method?: {
843
- /**
844
- * Payment method code
845
- */
846
- code: string;
847
- /**
848
- * Short description for payment method
849
- */
850
- name?: string;
851
- };
852
- /**
853
- * ID of customer account in the intermediator
854
- */
855
- buyer_id?: string;
856
- };
857
- /**
858
- * Credit card data, if payment was done with credit card
859
- */
860
- credit_card?: {
861
- /**
862
- * Full name of the holder, as it is on the credit card
863
- */
864
- holder_name?: string;
865
- /**
866
- * Response code from AVS: http://www.emsecommerce.net/avs_cvv2_response_codes.htm
867
- */
868
- avs_result_code?: string | null;
869
- /**
870
- * Response code from credit card company, such as AVS result code
871
- */
872
- cvv_result_code?: string | null;
873
- /**
874
- * Issuer identification number (IIN), known as bank identification number (BIN)
875
- */
876
- bin?: number;
877
- /**
878
- * Credit card issuer name, eg.: Visa, American Express, MasterCard
879
- */
880
- company?: string;
881
- /**
882
- * Last digits (up to 4) of credit card number
883
- */
884
- last_digits?: string;
885
- /**
886
- * Unique credit card token
887
- */
888
- token?: string;
889
- /**
890
- * Credit card processing standardized error code
891
- */
892
- error_code?:
893
- | 'incorrect_number'
894
- | 'invalid_number'
895
- | 'invalid_expiry_date'
896
- | 'invalid_cvc'
897
- | 'expired_card'
898
- | 'incorrect_cvc'
899
- | 'incorrect_zip'
900
- | 'incorrect_address'
901
- | 'card_declined'
902
- | 'processing_error'
903
- | 'call_issuer'
904
- | 'pick_up_card';
905
- };
906
- /**
907
- * Banking billet data, if payment was done with banking billet
908
- */
909
- banking_billet?: {
910
- /**
911
- * Ticket code, generally a barcode number
912
- */
913
- code?: string;
914
- /**
915
- * Date and time of expiration, in ISO 8601 standard representation
916
- */
917
- valid_thru?: string;
918
- /**
919
- * Text lines on ticket
920
- *
921
- * @maxItems 5
922
- */
923
- text_lines?: string[];
924
- /**
925
- * Direct link (URI) to banking billet
926
- */
927
- link?: string;
928
- };
929
- /**
930
- * Account deposit data, if payment was done with account deposit
931
- */
932
- account_deposit?: {
933
- /**
934
- * Date and time of expiration, in ISO 8601 standard representation
935
- */
936
- valid_thru?: string;
937
- /**
938
- * Information notes to payment
939
- *
940
- * @maxItems 5
941
- */
942
- text_lines?: string[];
943
- };
944
- /**
945
- * If paid with loyalty points, specify how many points and what program was consumed
946
- */
947
- loyalty_points?: {
948
- /**
949
- * The name of the loyalty points program
950
- */
951
- name?: string;
952
- /**
953
- * Unique identifier, program name using only lowercase, numbers and underscore
954
- */
955
- program_id: string;
956
- /**
957
- * Number of loyalty points applied from customer account
958
- */
959
- points_value: number;
960
- /**
961
- * The ratio of a point when converted to currency
962
- */
963
- ratio?: number;
964
- };
965
- /**
966
- * Currency ID specific for this transaction, if different of order currency ID
967
- */
968
- currency_id?: string;
969
- /**
970
- * Currency symbol specific for this transaction
971
- */
972
- currency_symbol?: string;
973
- /**
974
- * Discount by payment method, negative if value was additionated (not discounted)
975
- */
976
- discount?: number;
977
- /**
978
- * Transaction amount, disregarding installment rates
979
- */
980
- amount: number;
981
- /**
982
- * Installments option
983
- */
984
- installments?: {
985
- /**
986
- * Number of installments
987
- */
988
- number: number;
989
- /**
990
- * Installment value
991
- */
992
- value?: number;
993
- /**
994
- * Tax applied
995
- */
996
- tax?: boolean;
997
- /**
998
- * Total value, sum of all plots
999
- */
1000
- total?: number;
1001
- };
1002
- /**
1003
- * Financial status and date of change
1004
- */
1005
- status?: {
1006
- /**
1007
- * Last status change, date and time in ISO 8601 standard representation [auto]
1008
- */
1009
- updated_at?: string;
1010
- /**
1011
- * Payment status
1012
- */
1013
- current:
1014
- | 'pending'
1015
- | 'under_analysis'
1016
- | 'authorized'
1017
- | 'unauthorized'
1018
- | 'paid'
1019
- | 'in_dispute'
1020
- | 'refunded'
1021
- | 'voided'
1022
- | 'unknown';
1023
- };
1024
- /**
1025
- * List of order items related with this transaction, use only if items are divided
1026
- *
1027
- * @maxItems 3000
1028
- */
1029
- items?: string[];
1030
- /**
1031
- * Flags to associate additional info
1032
- *
1033
- * @maxItems 10
1034
- */
1035
- flags?: string[];
1036
- /**
1037
- * List of custom fields
1038
- *
1039
- * @maxItems 10
1040
- */
1041
- custom_fields?: {
1042
- /**
1043
- * Field name
1044
- */
1045
- field: string;
1046
- /**
1047
- * Field value
1048
- */
1049
- value: string;
1050
- }[];
1051
- /**
1052
- * Optional notes with additional info about this transaction
1053
- */
1054
- notes?: string;
1055
- }[];
1056
- /**
1057
- * Historical of payments and financial status changes
1058
- *
1059
- * @maxItems 3000
1060
- */
1061
- payments_history?: {
1062
- /**
1063
- * Payment status ID (ObjectID) [auto]
1064
- */
1065
- _id?: string;
1066
- /**
1067
- * ID of transaction related with this event
1068
- */
1069
- transaction_id?: string;
1070
- /**
1071
- * Date and time of the event, in ISO 8601 standard representation [auto]
1072
- */
1073
- date_time?: string;
1074
- /**
1075
- * Payment status
1076
- */
1077
- status:
1078
- | 'pending'
1079
- | 'under_analysis'
1080
- | 'authorized'
1081
- | 'unauthorized'
1082
- | 'paid'
1083
- | 'in_dispute'
1084
- | 'refunded'
1085
- | 'voided'
1086
- | 'unknown';
1087
- /**
1088
- * Code of received notification with this status change
1089
- */
1090
- notification_code?: string;
1091
- /**
1092
- * If customer was already notified of this event
1093
- */
1094
- customer_notified?: boolean;
1095
- /**
1096
- * Flags to associate additional info
1097
- *
1098
- * @maxItems 10
1099
- */
1100
- flags?: string[];
1101
- }[];
1102
- /**
1103
- * Fulfillment and tracking events
1104
- *
1105
- * @maxItems 3000
1106
- */
1107
- fulfillments?: {
1108
- /**
1109
- * Fulfillment status ID (ObjectID) [auto]
1110
- */
1111
- _id?: string;
1112
- /**
1113
- * ID of shipping line related with this event
1114
- */
1115
- shipping_line_id?: string;
1116
- /**
1117
- * Date and time of the event, in ISO 8601 standard representation [auto]
1118
- */
1119
- date_time?: string;
1120
- /**
1121
- * Fulfillment status
1122
- */
1123
- status:
1124
- | 'invoice_issued'
1125
- | 'in_production'
1126
- | 'in_separation'
1127
- | 'ready_for_shipping'
1128
- | 'shipped'
1129
- | 'delivered'
1130
- | 'returned_for_exchange'
1131
- | 'received_for_exchange'
1132
- | 'returned';
1133
- /**
1134
- * Code of received notification with this status change
1135
- */
1136
- notification_code?: string;
1137
- /**
1138
- * If customer was already notified of this event
1139
- */
1140
- customer_notified?: boolean;
1141
- /**
1142
- * Flags to associate additional info
1143
- *
1144
- * @maxItems 10
1145
- */
1146
- flags?: string[];
1147
- }[];
1148
- /**
1149
- * Products composing the order
1150
- *
1151
- * @maxItems 3000
1152
- */
1153
- items?: {
1154
- /**
1155
- * Order item ID (ObjectID) [auto]
1156
- */
1157
- _id?: string;
1158
- /**
1159
- * Product ID
1160
- */
1161
- product_id: string;
1162
- /**
1163
- * ID to specify the variation added to cart, if product has variations
1164
- */
1165
- variation_id?: string;
1166
- /**
1167
- * Product or variation unique reference code
1168
- */
1169
- sku?: string;
1170
- /**
1171
- * Product or variation full name, or other label for this cart item
1172
- */
1173
- name?: string;
1174
- /**
1175
- * Product or variation picture for this cart item
1176
- */
1177
- picture?: {
1178
- normal?: PictureSize;
1179
- big?: PictureSize1;
1180
- zoom?: PictureSize2;
1181
- small?: PictureSize3;
1182
- };
1183
- /**
1184
- * Item customization fields
1185
- *
1186
- * @maxItems 100
1187
- */
1188
- customizations?: {
1189
- /**
1190
- * Title for this customization field, can be the grid title
1191
- */
1192
- label?: string;
1193
- /**
1194
- * Option chosen or created by customer
1195
- */
1196
- option: {
1197
- /**
1198
- * Option ID (ObjectID) if it was predefined (not custom value created by customer)
1199
- */
1200
- _id?: string;
1201
- /**
1202
- * Option text value displayed for the client
1203
- */
1204
- text: string;
1205
- };
1206
- /**
1207
- * URL of file attached by customer to this field
1208
- */
1209
- attachment?: string;
1210
- /**
1211
- * Price alteration due to this customization
1212
- */
1213
- add_to_price?: {
1214
- /**
1215
- * Type of price addition
1216
- */
1217
- type?: 'percentage' | 'fixed';
1218
- /**
1219
- * Additional value, could be negative
1220
- */
1221
- addition: number;
1222
- };
1223
- }[];
1224
- /**
1225
- * Parent kit product for this item
1226
- */
1227
- kit_product?: {
1228
- /**
1229
- * Kit product ID (ObjectID)
1230
- */
1231
- _id: string & { length: 24 };
1232
- /**
1233
- * Kit product full name
1234
- */
1235
- name?: string;
1236
- /**
1237
- * Total quantity of items to close a kit unit
1238
- */
1239
- pack_quantity?: number;
1240
- /**
1241
- * Kit total pack price
1242
- */
1243
- price?: number;
1244
- /**
1245
- * Current kit composition
1246
- *
1247
- * @maxItems 100
1248
- */
1249
- composition?: {
1250
- /**
1251
- * Product ID (ObjectID)
1252
- */
1253
- _id: string & { length: 24 };
1254
- /**
1255
- * Selected variation ID (ObjectID) if any
1256
- */
1257
- variation_id?: string;
1258
- /**
1259
- * Kit item quantity
1260
- */
1261
- quantity?: number;
1262
- }[];
1263
- };
1264
- /**
1265
- * Gift wrap chosen by customer
1266
- */
1267
- gift_wrap?: {
1268
- /**
1269
- * Tag to identify object, use only lowercase letters, digits and underscore
1270
- */
1271
- tag?: string;
1272
- /**
1273
- * Title describing this gift wrap
1274
- */
1275
- label: string;
1276
- /**
1277
- * Additional value due to this gift wrap
1278
- */
1279
- add_to_price?: number;
1280
- };
1281
- /**
1282
- * Item quantity in cart
1283
- */
1284
- quantity: number;
1285
- /**
1286
- * Item stock management state respective to order status
1287
- */
1288
- stock_status?: 'pending' | 'released' | 'returned' | 'unmanaged' | 'out_of_stock' | '__releasing';
1289
- /**
1290
- * Product sale price specifically for this cart
1291
- */
1292
- price: number;
1293
- /**
1294
- * Final item price including additions due to customizations and gift wrap
1295
- */
1296
- final_price?: number;
1297
- /**
1298
- * Flags to associate additional info
1299
- *
1300
- * @maxItems 10
1301
- */
1302
- flags?: string[];
1303
- }[];
1304
- /**
1305
- * Extra discount applied by coupon or UTM campaign
1306
- */
1307
- extra_discount?: {
1308
- /**
1309
- * Text of discount coupon applied by customer
1310
- */
1311
- discount_coupon?: string;
1312
- /**
1313
- * Extra discount value
1314
- */
1315
- value: number;
1316
- /**
1317
- * Extra discount rule (by application)
1318
- */
1319
- app?: {
1320
- /**
1321
- * Application ID (ObjectID)
1322
- */
1323
- _id?: string;
1324
- /**
1325
- * Name of the discount rule, can be the coupon or campaign name
1326
- */
1327
- label?: string;
1328
- /**
1329
- * Additional text description for the discount rule
1330
- */
1331
- description?: string;
1332
- };
1333
- /**
1334
- * Flags to associate additional info
1335
- *
1336
- * @maxItems 10
1337
- */
1338
- flags?: string[];
1339
- };
1340
- /**
1341
- * Original subscription (recurrence) order
1342
- */
1343
- subscription_order?: {
1344
- /**
1345
- * Subscription order ID (ObjectID)
1346
- */
1347
- _id: string & { length: 24 };
1348
- /**
1349
- * Subscription order number
1350
- */
1351
- number?: number;
1352
- };
1353
- /**
1354
- * List of custom attributes
1355
- *
1356
- * @maxItems 100
1357
- */
1358
- metafields?: {
1359
- /**
1360
- * String to help distinguish who (or which app) created and can use the metafield
1361
- */
1362
- namespace?: string;
1363
- /**
1364
- * Field name
1365
- */
1366
- field?: string;
1367
- /**
1368
- * Custom property value
1369
- */
1370
- value: {
1371
- [k: string]: unknown;
1372
- };
1373
- }[];
1374
- /**
1375
- * List of custom attributes
1376
- *
1377
- * @maxItems 100
1378
- */
1379
- hidden_metafields?: {
1380
- /**
1381
- * String to help distinguish who (or which app) created and can use the metafield
1382
- */
1383
- namespace?: string;
1384
- /**
1385
- * Field name
1386
- */
1387
- field?: string;
1388
- /**
1389
- * Custom property value
1390
- */
1391
- value: {
1392
- [k: string]: unknown;
1393
- };
1394
- }[];
1395
- /**
1396
- * List of custom attributes, hidden by default, visible for the order buyers
1397
- *
1398
- * @maxItems 100
1399
- */
1400
- private_metafields?: {
1401
- /**
1402
- * String to help distinguish who (or which app) created and can use the metafield
1403
- */
1404
- namespace?: string;
1405
- /**
1406
- * Field name
1407
- */
1408
- field?: string;
1409
- /**
1410
- * Custom property value
1411
- */
1412
- value: {
1413
- [k: string]: unknown;
1414
- };
1415
- }[];
1416
- /**
1417
- * Flags to associate additional info
1418
- *
1419
- * @maxItems 10
1420
- */
1421
- flags?: string[];
1422
- /**
1423
- * Optional notes with additional info about this order
1424
- */
1425
- notes?: string;
1426
- /**
1427
- * Description and notes about this order, available only for shop administrators
1428
- */
1429
- staff_notes?: string;
1430
- }
1431
- /**
1432
- * Sender's address
1433
- */
1434
- export interface Address {
1435
- /**
1436
- * ZIP (CEP, postal...) code
1437
- */
1438
- zip: string;
1439
- /**
1440
- * Street or public place name
1441
- */
1442
- street?: string;
1443
- /**
1444
- * House or building street number
1445
- */
1446
- number?: number;
1447
- /**
1448
- * Address complement or second line, such as apartment number
1449
- */
1450
- complement?: string;
1451
- /**
1452
- * Borough name
1453
- */
1454
- borough?: string;
1455
- /**
1456
- * Some optional other reference for this address
1457
- */
1458
- near_to?: string;
1459
- /**
1460
- * Full in line mailing address, should include street, number and borough
1461
- */
1462
- line_address?: string;
1463
- /**
1464
- * City name
1465
- */
1466
- city?: string;
1467
- /**
1468
- * Country name
1469
- */
1470
- country?: string;
1471
- /**
1472
- * An ISO 3166-2 country code
1473
- */
1474
- country_code?: string;
1475
- /**
1476
- * Province or state name
1477
- */
1478
- province?: string;
1479
- /**
1480
- * The two-letter code for the province or state
1481
- */
1482
- province_code?: string;
1483
- /**
1484
- * The name of recipient, generally is the customer's name
1485
- */
1486
- name?: string;
1487
- /**
1488
- * The recipient's last name
1489
- */
1490
- last_name?: string;
1491
- /**
1492
- * Customer phone number for this mailing address
1493
- */
1494
- phone?: {
1495
- /**
1496
- * Country calling code (without +), defined by standards E.123 and E.164
1497
- */
1498
- country_code?: number;
1499
- /**
1500
- * The actual phone number, digits only
1501
- */
1502
- number: string;
1503
- };
1504
- }
1505
- /**
1506
- * Shipping address (recipient)
1507
- */
1508
- export interface Address1 {
1509
- /**
1510
- * ZIP (CEP, postal...) code
1511
- */
1512
- zip: string;
1513
- /**
1514
- * Street or public place name
1515
- */
1516
- street?: string;
1517
- /**
1518
- * House or building street number
1519
- */
1520
- number?: number;
1521
- /**
1522
- * Address complement or second line, such as apartment number
1523
- */
1524
- complement?: string;
1525
- /**
1526
- * Borough name
1527
- */
1528
- borough?: string;
1529
- /**
1530
- * Some optional other reference for this address
1531
- */
1532
- near_to?: string;
1533
- /**
1534
- * Full in line mailing address, should include street, number and borough
1535
- */
1536
- line_address?: string;
1537
- /**
1538
- * City name
1539
- */
1540
- city?: string;
1541
- /**
1542
- * Country name
1543
- */
1544
- country?: string;
1545
- /**
1546
- * An ISO 3166-2 country code
1547
- */
1548
- country_code?: string;
1549
- /**
1550
- * Province or state name
1551
- */
1552
- province?: string;
1553
- /**
1554
- * The two-letter code for the province or state
1555
- */
1556
- province_code?: string;
1557
- /**
1558
- * The name of recipient, generally is the customer's name
1559
- */
1560
- name?: string;
1561
- /**
1562
- * The recipient's last name
1563
- */
1564
- last_name?: string;
1565
- /**
1566
- * Customer phone number for this mailing address
1567
- */
1568
- phone?: {
1569
- /**
1570
- * Country calling code (without +), defined by standards E.123 and E.164
1571
- */
1572
- country_code?: number;
1573
- /**
1574
- * The actual phone number, digits only
1575
- */
1576
- number: string;
1577
- };
1578
- }
1579
- /**
1580
- * The mailing address associated with the payment method
1581
- */
1582
- export interface Address2 {
1583
- /**
1584
- * ZIP (CEP, postal...) code
1585
- */
1586
- zip: string;
1587
- /**
1588
- * Street or public place name
1589
- */
1590
- street?: string;
1591
- /**
1592
- * House or building street number
1593
- */
1594
- number?: number;
1595
- /**
1596
- * Address complement or second line, such as apartment number
1597
- */
1598
- complement?: string;
1599
- /**
1600
- * Borough name
1601
- */
1602
- borough?: string;
1603
- /**
1604
- * Some optional other reference for this address
1605
- */
1606
- near_to?: string;
1607
- /**
1608
- * Full in line mailing address, should include street, number and borough
1609
- */
1610
- line_address?: string;
1611
- /**
1612
- * City name
1613
- */
1614
- city?: string;
1615
- /**
1616
- * Country name
1617
- */
1618
- country?: string;
1619
- /**
1620
- * An ISO 3166-2 country code
1621
- */
1622
- country_code?: string;
1623
- /**
1624
- * Province or state name
1625
- */
1626
- province?: string;
1627
- /**
1628
- * The two-letter code for the province or state
1629
- */
1630
- province_code?: string;
1631
- /**
1632
- * The name of recipient, generally is the customer's name
1633
- */
1634
- name?: string;
1635
- /**
1636
- * The recipient's last name
1637
- */
1638
- last_name?: string;
1639
- /**
1640
- * Customer phone number for this mailing address
1641
- */
1642
- phone?: {
1643
- /**
1644
- * Country calling code (without +), defined by standards E.123 and E.164
1645
- */
1646
- country_code?: number;
1647
- /**
1648
- * The actual phone number, digits only
1649
- */
1650
- number: string;
1651
- };
1652
- }
1653
- /**
1654
- * Default image size variant
1655
- */
1656
- export interface PictureSize {
1657
- /**
1658
- * Image link
1659
- */
1660
- url: string;
1661
- /**
1662
- * Image size (width x height) in px, such as 100x50 (100px width, 50px height)
1663
- */
1664
- size?: string;
1665
- /**
1666
- * Alternative text, HTML alt tag (important for SEO)
1667
- */
1668
- alt?: string;
1669
- }
1670
- /**
1671
- * Image big size variant
1672
- */
1673
- export interface PictureSize1 {
1674
- /**
1675
- * Image link
1676
- */
1677
- url: string;
1678
- /**
1679
- * Image size (width x height) in px, such as 100x50 (100px width, 50px height)
1680
- */
1681
- size?: string;
1682
- /**
1683
- * Alternative text, HTML alt tag (important for SEO)
1684
- */
1685
- alt?: string;
1686
- }
1687
- /**
1688
- * Image zoom size variant
1689
- */
1690
- export interface PictureSize2 {
1691
- /**
1692
- * Image link
1693
- */
1694
- url: string;
1695
- /**
1696
- * Image size (width x height) in px, such as 100x50 (100px width, 50px height)
1697
- */
1698
- size?: string;
1699
- /**
1700
- * Alternative text, HTML alt tag (important for SEO)
1701
- */
1702
- alt?: string;
1703
- }
1704
- /**
1705
- * Image small size variant
1706
- */
1707
- export interface PictureSize3 {
1708
- /**
1709
- * Image link
1710
- */
1711
- url: string;
1712
- /**
1713
- * Image size (width x height) in px, such as 100x50 (100px width, 50px height)
1714
- */
1715
- size?: string;
1716
- /**
1717
- * Alternative text, HTML alt tag (important for SEO)
1718
- */
1719
- alt?: string;
1720
- }