@thorprovider/types 5.6.0 → 5.6.1

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/dist/index.d.mts CHANGED
@@ -4558,6 +4558,45 @@ interface DropshipperShippingMethod {
4558
4558
  shipping_profile_id?: string;
4559
4559
  stock_location_id?: string;
4560
4560
  }
4561
+ /** An outbound item added to the order by an exchange or a claim */
4562
+ interface DropshipperOrderChangeItem {
4563
+ /** Id of the added order line item (order_item.id) */
4564
+ item_id: string;
4565
+ quantity: number;
4566
+ note?: string | null;
4567
+ }
4568
+ /** An inbound claim item (what is being returned under the claim) */
4569
+ interface DropshipperClaimItem extends DropshipperOrderChangeItem {
4570
+ reason?: string | null;
4571
+ }
4572
+ /** An exchange on an order (read-only; created and managed by the provider) */
4573
+ interface DropshipperOrderExchange {
4574
+ id: string;
4575
+ display_id: number;
4576
+ /** Live state of the linked order change (pending, confirmed, canceled, ...) */
4577
+ status: string;
4578
+ difference_due: number;
4579
+ created_at: string;
4580
+ canceled_at: string | null;
4581
+ /** Return associated with the exchange inbound items, when present */
4582
+ return_id?: string | null;
4583
+ additional_items: DropshipperOrderChangeItem[];
4584
+ }
4585
+ /** A claim on an order (read-only; created and managed by the provider) */
4586
+ interface DropshipperOrderClaim {
4587
+ id: string;
4588
+ display_id: number;
4589
+ type: 'refund' | 'replace';
4590
+ /** Live state of the linked order change (pending, confirmed, canceled, ...) */
4591
+ status: string;
4592
+ refund_amount: number;
4593
+ created_at: string;
4594
+ canceled_at: string | null;
4595
+ /** Outbound items added by the claim (replacement items) */
4596
+ additional_items: DropshipperOrderChangeItem[];
4597
+ /** Inbound items being claimed */
4598
+ items: DropshipperClaimItem[];
4599
+ }
4561
4600
  /** Full order detail as returned by GET /admin/thor/dropshipper/orders/:id */
4562
4601
  interface DropshipperOrderDetail {
4563
4602
  id: string;
@@ -4579,6 +4618,10 @@ interface DropshipperOrderDetail {
4579
4618
  shipping_methods: DropshipperShippingMethod[];
4580
4619
  payment_collections: DropshipperPaymentCollection[];
4581
4620
  returns: DropshipperReturn[];
4621
+ /** Exchanges on the order, read-only (contract v3, optional) */
4622
+ exchanges?: DropshipperOrderExchange[];
4623
+ /** Claims on the order, read-only (contract v3, optional) */
4624
+ claims?: DropshipperOrderClaim[];
4582
4625
  transactions: DropshipperTransaction[];
4583
4626
  financial_summary: DropshipperFinancialSummary;
4584
4627
  timeline: DropshipperOrderTimelineEvent[];
package/dist/index.d.ts CHANGED
@@ -4558,6 +4558,45 @@ interface DropshipperShippingMethod {
4558
4558
  shipping_profile_id?: string;
4559
4559
  stock_location_id?: string;
4560
4560
  }
4561
+ /** An outbound item added to the order by an exchange or a claim */
4562
+ interface DropshipperOrderChangeItem {
4563
+ /** Id of the added order line item (order_item.id) */
4564
+ item_id: string;
4565
+ quantity: number;
4566
+ note?: string | null;
4567
+ }
4568
+ /** An inbound claim item (what is being returned under the claim) */
4569
+ interface DropshipperClaimItem extends DropshipperOrderChangeItem {
4570
+ reason?: string | null;
4571
+ }
4572
+ /** An exchange on an order (read-only; created and managed by the provider) */
4573
+ interface DropshipperOrderExchange {
4574
+ id: string;
4575
+ display_id: number;
4576
+ /** Live state of the linked order change (pending, confirmed, canceled, ...) */
4577
+ status: string;
4578
+ difference_due: number;
4579
+ created_at: string;
4580
+ canceled_at: string | null;
4581
+ /** Return associated with the exchange inbound items, when present */
4582
+ return_id?: string | null;
4583
+ additional_items: DropshipperOrderChangeItem[];
4584
+ }
4585
+ /** A claim on an order (read-only; created and managed by the provider) */
4586
+ interface DropshipperOrderClaim {
4587
+ id: string;
4588
+ display_id: number;
4589
+ type: 'refund' | 'replace';
4590
+ /** Live state of the linked order change (pending, confirmed, canceled, ...) */
4591
+ status: string;
4592
+ refund_amount: number;
4593
+ created_at: string;
4594
+ canceled_at: string | null;
4595
+ /** Outbound items added by the claim (replacement items) */
4596
+ additional_items: DropshipperOrderChangeItem[];
4597
+ /** Inbound items being claimed */
4598
+ items: DropshipperClaimItem[];
4599
+ }
4561
4600
  /** Full order detail as returned by GET /admin/thor/dropshipper/orders/:id */
4562
4601
  interface DropshipperOrderDetail {
4563
4602
  id: string;
@@ -4579,6 +4618,10 @@ interface DropshipperOrderDetail {
4579
4618
  shipping_methods: DropshipperShippingMethod[];
4580
4619
  payment_collections: DropshipperPaymentCollection[];
4581
4620
  returns: DropshipperReturn[];
4621
+ /** Exchanges on the order, read-only (contract v3, optional) */
4622
+ exchanges?: DropshipperOrderExchange[];
4623
+ /** Claims on the order, read-only (contract v3, optional) */
4624
+ claims?: DropshipperOrderClaim[];
4582
4625
  transactions: DropshipperTransaction[];
4583
4626
  financial_summary: DropshipperFinancialSummary;
4584
4627
  timeline: DropshipperOrderTimelineEvent[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thorprovider/types",
3
- "version": "5.6.0",
3
+ "version": "5.6.1",
4
4
  "description": "Shared TypeScript types for Thor Commerce ecosystem - Framework-agnostic type definitions",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -792,6 +792,49 @@ export interface DropshipperShippingMethod {
792
792
  stock_location_id?: string;
793
793
  }
794
794
 
795
+ /** An outbound item added to the order by an exchange or a claim */
796
+ export interface DropshipperOrderChangeItem {
797
+ /** Id of the added order line item (order_item.id) */
798
+ item_id: string;
799
+ quantity: number;
800
+ note?: string | null;
801
+ }
802
+
803
+ /** An inbound claim item (what is being returned under the claim) */
804
+ export interface DropshipperClaimItem extends DropshipperOrderChangeItem {
805
+ reason?: string | null;
806
+ }
807
+
808
+ /** An exchange on an order (read-only; created and managed by the provider) */
809
+ export interface DropshipperOrderExchange {
810
+ id: string;
811
+ display_id: number;
812
+ /** Live state of the linked order change (pending, confirmed, canceled, ...) */
813
+ status: string;
814
+ difference_due: number;
815
+ created_at: string;
816
+ canceled_at: string | null;
817
+ /** Return associated with the exchange inbound items, when present */
818
+ return_id?: string | null;
819
+ additional_items: DropshipperOrderChangeItem[];
820
+ }
821
+
822
+ /** A claim on an order (read-only; created and managed by the provider) */
823
+ export interface DropshipperOrderClaim {
824
+ id: string;
825
+ display_id: number;
826
+ type: 'refund' | 'replace';
827
+ /** Live state of the linked order change (pending, confirmed, canceled, ...) */
828
+ status: string;
829
+ refund_amount: number;
830
+ created_at: string;
831
+ canceled_at: string | null;
832
+ /** Outbound items added by the claim (replacement items) */
833
+ additional_items: DropshipperOrderChangeItem[];
834
+ /** Inbound items being claimed */
835
+ items: DropshipperClaimItem[];
836
+ }
837
+
795
838
  /** Full order detail as returned by GET /admin/thor/dropshipper/orders/:id */
796
839
  export interface DropshipperOrderDetail {
797
840
  id: string;
@@ -811,6 +854,10 @@ export interface DropshipperOrderDetail {
811
854
  shipping_methods: DropshipperShippingMethod[];
812
855
  payment_collections: DropshipperPaymentCollection[];
813
856
  returns: DropshipperReturn[];
857
+ /** Exchanges on the order, read-only (contract v3, optional) */
858
+ exchanges?: DropshipperOrderExchange[];
859
+ /** Claims on the order, read-only (contract v3, optional) */
860
+ claims?: DropshipperOrderClaim[];
814
861
  transactions: DropshipperTransaction[];
815
862
  financial_summary: DropshipperFinancialSummary;
816
863
  timeline: DropshipperOrderTimelineEvent[];