@redotech/redo-api-schema 2.2.158 → 2.2.161

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.
package/lib/openapi.d.ts CHANGED
@@ -575,12 +575,20 @@ export interface components {
575
575
  * @description Exchange order
576
576
  */
577
577
  exchange?: {
578
+ /** @description Total quantity of all exchange items */
579
+ itemCount?: number;
578
580
  /** Line items */
579
581
  items: {
580
582
  /** ID */
581
583
  id: string;
584
+ /** @description Price details for the exchange item */
585
+ price?: {
586
+ amount?: string;
587
+ currency?: string;
588
+ tax?: string;
589
+ };
582
590
  /** Product */
583
- product: components["schemas"]["product.schema"];
591
+ product?: components["schemas"]["product.schema"];
584
592
  /** Quantity */
585
593
  quantity: components["schemas"]["item-quantity.schema"];
586
594
  variant: components["schemas"]["product-variant.schema"];
@@ -591,11 +599,20 @@ export interface components {
591
599
  * @description ID of external order
592
600
  */
593
601
  externalId?: string;
594
- id?: string;
595
602
  };
596
603
  /** Provision */
597
604
  provision: components["schemas"]["exchange-provision.schema"];
605
+ /** @description Total tax for exchange items */
606
+ totalTax?: {
607
+ amount?: string;
608
+ currency?: string;
609
+ };
598
610
  };
611
+ /**
612
+ * External Order IDs
613
+ * @description Array of external order IDs associated with this return
614
+ */
615
+ externalOrderIds?: string[];
599
616
  /**
600
617
  * Gift cards
601
618
  * @description Gift card(s) created for return
@@ -620,58 +637,87 @@ export interface components {
620
637
  */
621
638
  id: string;
622
639
  /** @description Return items */
623
- items: ({
624
- /** Exchange item */
640
+ items: {
641
+ /** @description Customer's comment about the return */
642
+ customerComment?: string;
643
+ /**
644
+ * Exchange item
645
+ * @description Exchange item details if this return item is being exchanged
646
+ */
625
647
  exchangeItem?: {
626
- /**
627
- * ID
628
- * @description ID of exchange line item
629
- */
630
- id?: string;
648
+ product?: {
649
+ externalId?: string;
650
+ name?: string;
651
+ };
652
+ quantity?: number;
653
+ variant?: {
654
+ externalId?: string;
655
+ name?: string;
656
+ };
631
657
  };
658
+ /** @description Whether this is a green return (no physical return required) */
659
+ greenReturn?: boolean;
632
660
  /**
633
661
  * ID
634
662
  * @description Return item ID.
635
663
  */
636
- id?: string;
664
+ id: string;
637
665
  /**
638
666
  * Order item
639
667
  * @description Order line item
640
668
  */
641
- orderItem?: {
669
+ orderItem: {
642
670
  /**
643
671
  * ID
644
- * @description Line item ID in original order. Note: There can be more than return item for an original line item, with different quantity, return reasons, etc.
672
+ * @description Line item reference ID in format: {orderId}/{lineItemIndex}
673
+ */
674
+ id: string;
675
+ /**
676
+ * Line Item ID
677
+ * @description Original Shopify line item ID
645
678
  */
646
- id?: string;
679
+ line_item_id?: string;
647
680
  };
648
- /** Quantity */
649
- quantity: components["schemas"]["item-quantity.schema"];
650
- /** @description Return reason */
681
+ /** @description Product ID */
682
+ productId?: string;
683
+ /** @description Quantity of items being returned */
684
+ quantity: number;
685
+ /** @description Primary return reason */
651
686
  reason: string;
652
- /** @description Refund */
687
+ /** @description Return reason code */
688
+ reasonCode?: string;
689
+ /** @description Array of return reasons */
690
+ reasons?: string[];
691
+ /** @description Refund details */
653
692
  refund?: {
654
693
  /** Amount */
655
694
  amount: components["schemas"]["money.schema"];
656
- /** Planned amount */
657
- pendingAmount: components["schemas"]["money.schema"];
658
- /**
659
- * Taxes
660
- * @description Taxes.
661
- */
662
- pendingTaxAmount: components["schemas"]["money.schema"];
663
- /**
664
- * Taxes
665
- * @description Taxes.
666
- */
667
- taxAmount: components["schemas"]["money.schema"];
668
- /**
669
- * @description Refund method
670
- * @enum {string}
671
- */
672
- type: "credit" | "refund";
695
+ /** @description Refund strategy */
696
+ type?: string;
673
697
  };
674
- })[];
698
+ /** @description Product SKU */
699
+ sku?: string;
700
+ /** @description Return item status */
701
+ status?: string;
702
+ /** @description Product variant ID */
703
+ variantId?: string;
704
+ }[];
705
+ /**
706
+ * Notes
707
+ * @description Teammembers generated notes and comments on the return
708
+ */
709
+ notes?: {
710
+ /**
711
+ * Image URL
712
+ * @description Optional image URL attached to the note
713
+ */
714
+ image?: string;
715
+ /**
716
+ * Message
717
+ * @description The note text
718
+ */
719
+ message: string;
720
+ }[];
675
721
  /**
676
722
  * Order
677
723
  * @description Original order.
@@ -688,24 +734,17 @@ export interface components {
688
734
  * Shipment
689
735
  * @description Shipment, if has been made
690
736
  */
691
- shipment?: {
692
- /**
693
- * Carrier
694
- * @description Carrier code
695
- */
696
- carrier?: string;
697
- /**
698
- * Status
699
- * @description Status of shipment
700
- * @enum {string}
701
- */
702
- status?: "pre_transit" | "transit" | "delivered" | "cancelled" | "flagged";
703
- /**
704
- * Tracker
705
- * @description Tracking number
706
- */
707
- tracker?: string;
708
- };
737
+ shipment?: components["schemas"]["return-shipment.schema"];
738
+ /**
739
+ * Shipments
740
+ * @description Array of all shipments associated with this return
741
+ */
742
+ shipments?: components["schemas"]["return-shipment.schema"][];
743
+ /**
744
+ * Shopify Order IDs
745
+ * @description Array of Shopify order IDs (deprecated, use externalOrderIds)
746
+ */
747
+ shopifyOrderIds?: string[];
709
748
  source: {
710
749
  /**
711
750
  * Email address
@@ -734,6 +773,28 @@ export interface components {
734
773
  * @description Return status.
735
774
  */
736
775
  status: components["schemas"]["return-status.schema"];
776
+ /**
777
+ * Totals
778
+ * @description Calculated totals for the return
779
+ */
780
+ totals?: {
781
+ /** @description The upsell amount for the exchange order */
782
+ charge: {
783
+ amount: components["schemas"]["money.schema"];
784
+ };
785
+ /** @description Total value of new items in exchange */
786
+ exchange: {
787
+ amount: components["schemas"]["money.schema"];
788
+ };
789
+ /** @description Total refund amount excluding shipping */
790
+ refund: {
791
+ amount: components["schemas"]["money.schema"];
792
+ };
793
+ /** @description Total store credit amount */
794
+ storeCredit: {
795
+ amount: components["schemas"]["money.schema"];
796
+ };
797
+ };
737
798
  /**
738
799
  * Type
739
800
  * @description Return type.
@@ -746,6 +807,28 @@ export interface components {
746
807
  */
747
808
  updatedAt: string;
748
809
  };
810
+ /**
811
+ * Return Shipment
812
+ * @description Return shipment tracking information
813
+ */
814
+ "return-shipment.schema": {
815
+ /**
816
+ * Carrier
817
+ * @description Carrier code
818
+ */
819
+ carrier?: string;
820
+ /**
821
+ * Status
822
+ * @description Status of shipment
823
+ * @enum {string}
824
+ */
825
+ status?: "unknown" | "pre_transit" | "in_transit" | "out_for_delivery" | "available_for_pickup" | "cancelled" | "delivered" | "error" | "failure" | "return_to_sender" | "expired";
826
+ /**
827
+ * Tracker
828
+ * @description Tracking number
829
+ */
830
+ tracker?: string;
831
+ };
749
832
  /**
750
833
  * Return status
751
834
  * @description Return status.
package/lib/openapi.yaml CHANGED
@@ -542,12 +542,25 @@ components:
542
542
  exchange:
543
543
  description: Exchange order
544
544
  properties:
545
+ itemCount:
546
+ description: Total quantity of all exchange items
547
+ type: integer
545
548
  items:
546
549
  items:
547
550
  properties:
548
551
  id:
549
552
  title: ID
550
553
  type: string
554
+ price:
555
+ description: Price details for the exchange item
556
+ properties:
557
+ amount:
558
+ type: string
559
+ currency:
560
+ type: string
561
+ tax:
562
+ type: string
563
+ type: object
551
564
  product:
552
565
  $ref: '#/components/schemas/product.schema'
553
566
  title: Product
@@ -559,7 +572,6 @@ components:
559
572
  required:
560
573
  - id
561
574
  - quantity
562
- - product
563
575
  - variant
564
576
  title: Line items
565
577
  type: array
@@ -569,17 +581,29 @@ components:
569
581
  description: ID of external order
570
582
  title: External ID
571
583
  type: string
572
- id:
573
- type: string
574
584
  type: object
575
585
  provision:
576
586
  $ref: '#/components/schemas/exchange-provision.schema'
577
587
  title: Provision
588
+ totalTax:
589
+ description: Total tax for exchange items
590
+ properties:
591
+ amount:
592
+ type: string
593
+ currency:
594
+ type: string
595
+ type: object
578
596
  required:
579
597
  - items
580
598
  - provision
581
599
  title: Exchange
582
600
  type: object
601
+ externalOrderIds:
602
+ description: Array of external order IDs associated with this return
603
+ items:
604
+ type: string
605
+ title: External Order IDs
606
+ type: array
583
607
  giftCards:
584
608
  description: Gift card(s) created for return
585
609
  items:
@@ -612,16 +636,33 @@ components:
612
636
  description: Return items
613
637
  items:
614
638
  properties:
639
+ customerComment:
640
+ description: Customer's comment about the return
641
+ type: string
615
642
  exchangeItem:
643
+ description: Exchange item details if this return item is being exchanged
616
644
  properties:
617
- id:
618
- description: ID of exchange line item
619
- title: ID
620
- type: string
621
- required:
622
- - string
645
+ product:
646
+ properties:
647
+ externalId:
648
+ type: string
649
+ name:
650
+ type: string
651
+ type: object
652
+ quantity:
653
+ type: integer
654
+ variant:
655
+ properties:
656
+ externalId:
657
+ type: string
658
+ name:
659
+ type: string
660
+ type: object
623
661
  title: Exchange item
624
662
  type: object
663
+ greenReturn:
664
+ description: Whether this is a green return (no physical return required)
665
+ type: boolean
625
666
  id:
626
667
  description: Return item ID.
627
668
  title: ID
@@ -630,58 +671,82 @@ components:
630
671
  description: Order line item
631
672
  properties:
632
673
  id:
633
- description: 'Line item ID in original order. Note: There can be more than return item for an original line item, with different quantity, return reasons, etc.'
674
+ description: 'Line item reference ID in format: {orderId}/{lineItemIndex}'
634
675
  title: ID
635
676
  type: string
677
+ line_item_id:
678
+ description: Original Shopify line item ID
679
+ title: Line Item ID
680
+ type: string
636
681
  required:
637
- - index
682
+ - id
638
683
  title: Order item
639
684
  type: object
685
+ productId:
686
+ description: Product ID
687
+ type: string
640
688
  quantity:
641
- $ref: '#/components/schemas/item-quantity.schema'
642
- title: Quantity
689
+ description: Quantity of items being returned
690
+ type: integer
643
691
  reason:
644
- description: Return reason
692
+ description: Primary return reason
645
693
  examples:
646
694
  - Too big
647
695
  - Other
648
696
  type: string
697
+ reasonCode:
698
+ description: Return reason code
699
+ type: string
700
+ reasons:
701
+ description: Array of return reasons
702
+ items:
703
+ type: string
704
+ type: array
649
705
  refund:
650
- description: Refund
706
+ description: Refund details
651
707
  properties:
652
708
  amount:
653
709
  $ref: '#/components/schemas/money.schema'
654
710
  title: Amount
655
- pendingAmount:
656
- $ref: '#/components/schemas/money.schema'
657
- title: Planned amount
658
- pendingTaxAmount:
659
- $ref: '#/components/schemas/money.schema'
660
- description: Taxes.
661
- title: Taxes
662
- taxAmount:
663
- $ref: '#/components/schemas/money.schema'
664
- description: Taxes.
665
- title: Taxes
666
711
  type:
667
- description: Refund method
668
- enum:
669
- - credit
670
- - refund
712
+ description: Refund strategy
671
713
  type: string
672
714
  required:
673
715
  - amount
674
- - pendingAmount
675
- - pendingTaxAmount
676
- - taxAmount
677
- - type
678
716
  type: object
717
+ sku:
718
+ description: Product SKU
719
+ type: string
720
+ status:
721
+ description: Return item status
722
+ type: string
723
+ variantId:
724
+ description: Product variant ID
725
+ type: string
679
726
  required:
680
- - item
727
+ - id
728
+ - orderItem
681
729
  - quantity
682
730
  - reason
683
731
  type: object
684
732
  type: array
733
+ notes:
734
+ description: Teammembers generated notes and comments on the return
735
+ items:
736
+ properties:
737
+ image:
738
+ description: Optional image URL attached to the note
739
+ title: Image URL
740
+ type: string
741
+ message:
742
+ description: The note text
743
+ title: Message
744
+ type: string
745
+ required:
746
+ - message
747
+ type: object
748
+ title: Notes
749
+ type: array
685
750
  order:
686
751
  description: Original order.
687
752
  properties:
@@ -695,28 +760,21 @@ components:
695
760
  title: Order
696
761
  type: object
697
762
  shipment:
763
+ $ref: '#/components/schemas/return-shipment.schema'
698
764
  description: Shipment, if has been made
699
- properties:
700
- carrier:
701
- description: Carrier code
702
- title: Carrier
703
- type: string
704
- status:
705
- description: Status of shipment
706
- enum:
707
- - pre_transit
708
- - transit
709
- - delivered
710
- - cancelled
711
- - flagged
712
- title: Status
713
- type: string
714
- tracker:
715
- description: Tracking number
716
- title: Tracker
717
- type: string
718
765
  title: Shipment
719
- type: object
766
+ shipments:
767
+ description: Array of all shipments associated with this return
768
+ items:
769
+ $ref: '#/components/schemas/return-shipment.schema'
770
+ title: Shipments
771
+ type: array
772
+ shopifyOrderIds:
773
+ description: Array of Shopify order IDs (deprecated, use externalOrderIds)
774
+ items:
775
+ type: string
776
+ title: Shopify Order IDs
777
+ type: array
720
778
  source:
721
779
  properties:
722
780
  emailAddress:
@@ -746,6 +804,48 @@ components:
746
804
  $ref: '#/components/schemas/return-status.schema'
747
805
  description: Return status.
748
806
  title: Status
807
+ totals:
808
+ description: Calculated totals for the return
809
+ properties:
810
+ charge:
811
+ description: The upsell amount for the exchange order
812
+ properties:
813
+ amount:
814
+ $ref: '#/components/schemas/money.schema'
815
+ required:
816
+ - amount
817
+ type: object
818
+ exchange:
819
+ description: Total value of new items in exchange
820
+ properties:
821
+ amount:
822
+ $ref: '#/components/schemas/money.schema'
823
+ required:
824
+ - amount
825
+ type: object
826
+ refund:
827
+ description: Total refund amount excluding shipping
828
+ properties:
829
+ amount:
830
+ $ref: '#/components/schemas/money.schema'
831
+ required:
832
+ - amount
833
+ type: object
834
+ storeCredit:
835
+ description: Total store credit amount
836
+ properties:
837
+ amount:
838
+ $ref: '#/components/schemas/money.schema'
839
+ required:
840
+ - amount
841
+ type: object
842
+ required:
843
+ - refund
844
+ - exchange
845
+ - storeCredit
846
+ - charge
847
+ title: Totals
848
+ type: object
749
849
  type:
750
850
  $ref: '#/components/schemas/return-type.schema'
751
851
  description: Return type.
@@ -767,6 +867,35 @@ components:
767
867
  - updatedAt
768
868
  title: Return
769
869
  type: object
870
+ return-shipment.schema:
871
+ description: Return shipment tracking information
872
+ properties:
873
+ carrier:
874
+ description: Carrier code
875
+ title: Carrier
876
+ type: string
877
+ status:
878
+ description: Status of shipment
879
+ enum:
880
+ - unknown
881
+ - pre_transit
882
+ - in_transit
883
+ - out_for_delivery
884
+ - available_for_pickup
885
+ - cancelled
886
+ - delivered
887
+ - error
888
+ - failure
889
+ - return_to_sender
890
+ - expired
891
+ title: Status
892
+ type: string
893
+ tracker:
894
+ description: Tracking number
895
+ title: Tracker
896
+ type: string
897
+ title: Return Shipment
898
+ type: object
770
899
  return-status-update.schema:
771
900
  description: |
772
901
  Return status.
package/package.json CHANGED
@@ -31,5 +31,5 @@
31
31
  ]
32
32
  }
33
33
  },
34
- "version": "2.2.158"
34
+ "version": "2.2.161"
35
35
  }