@thorprovider/types 5.6.0 → 5.6.2

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,76 @@ 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
+ }
4600
+ /** An item shipped as part of a fulfillment */
4601
+ interface DropshipperFulfillmentItem {
4602
+ /** Order line item id this fulfillment item was created from */
4603
+ item_id: string | null;
4604
+ title: string;
4605
+ sku: string | null;
4606
+ quantity: number;
4607
+ }
4608
+ /** A shipping label attached to a fulfillment */
4609
+ interface DropshipperFulfillmentLabel {
4610
+ id: string;
4611
+ tracking_number: string | null;
4612
+ tracking_url: string | null;
4613
+ label_url: string | null;
4614
+ }
4615
+ /** A fulfillment on an order (read-only; the dropshipper does not manage shipments) */
4616
+ interface DropshipperOrderFulfillment {
4617
+ id: string;
4618
+ /** Computed from dates: pending, packed, shipped, delivered, canceled */
4619
+ status: string;
4620
+ created_at: string | null;
4621
+ packed_at: string | null;
4622
+ shipped_at: string | null;
4623
+ delivered_at: string | null;
4624
+ canceled_at: string | null;
4625
+ provider_id: string | null;
4626
+ /** Name of the stock location the fulfillment ships from, when resolvable */
4627
+ location_name: string | null;
4628
+ items: DropshipperFulfillmentItem[];
4629
+ labels: DropshipperFulfillmentLabel[];
4630
+ }
4561
4631
  /** Full order detail as returned by GET /admin/thor/dropshipper/orders/:id */
4562
4632
  interface DropshipperOrderDetail {
4563
4633
  id: string;
@@ -4579,6 +4649,12 @@ interface DropshipperOrderDetail {
4579
4649
  shipping_methods: DropshipperShippingMethod[];
4580
4650
  payment_collections: DropshipperPaymentCollection[];
4581
4651
  returns: DropshipperReturn[];
4652
+ /** Exchanges on the order, read-only (contract v3, optional) */
4653
+ exchanges?: DropshipperOrderExchange[];
4654
+ /** Claims on the order, read-only (contract v3, optional) */
4655
+ claims?: DropshipperOrderClaim[];
4656
+ /** Fulfillments on the order, read-only (optional) */
4657
+ fulfillments?: DropshipperOrderFulfillment[];
4582
4658
  transactions: DropshipperTransaction[];
4583
4659
  financial_summary: DropshipperFinancialSummary;
4584
4660
  timeline: DropshipperOrderTimelineEvent[];
package/dist/index.d.ts CHANGED
@@ -4558,6 +4558,76 @@ 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
+ }
4600
+ /** An item shipped as part of a fulfillment */
4601
+ interface DropshipperFulfillmentItem {
4602
+ /** Order line item id this fulfillment item was created from */
4603
+ item_id: string | null;
4604
+ title: string;
4605
+ sku: string | null;
4606
+ quantity: number;
4607
+ }
4608
+ /** A shipping label attached to a fulfillment */
4609
+ interface DropshipperFulfillmentLabel {
4610
+ id: string;
4611
+ tracking_number: string | null;
4612
+ tracking_url: string | null;
4613
+ label_url: string | null;
4614
+ }
4615
+ /** A fulfillment on an order (read-only; the dropshipper does not manage shipments) */
4616
+ interface DropshipperOrderFulfillment {
4617
+ id: string;
4618
+ /** Computed from dates: pending, packed, shipped, delivered, canceled */
4619
+ status: string;
4620
+ created_at: string | null;
4621
+ packed_at: string | null;
4622
+ shipped_at: string | null;
4623
+ delivered_at: string | null;
4624
+ canceled_at: string | null;
4625
+ provider_id: string | null;
4626
+ /** Name of the stock location the fulfillment ships from, when resolvable */
4627
+ location_name: string | null;
4628
+ items: DropshipperFulfillmentItem[];
4629
+ labels: DropshipperFulfillmentLabel[];
4630
+ }
4561
4631
  /** Full order detail as returned by GET /admin/thor/dropshipper/orders/:id */
4562
4632
  interface DropshipperOrderDetail {
4563
4633
  id: string;
@@ -4579,6 +4649,12 @@ interface DropshipperOrderDetail {
4579
4649
  shipping_methods: DropshipperShippingMethod[];
4580
4650
  payment_collections: DropshipperPaymentCollection[];
4581
4651
  returns: DropshipperReturn[];
4652
+ /** Exchanges on the order, read-only (contract v3, optional) */
4653
+ exchanges?: DropshipperOrderExchange[];
4654
+ /** Claims on the order, read-only (contract v3, optional) */
4655
+ claims?: DropshipperOrderClaim[];
4656
+ /** Fulfillments on the order, read-only (optional) */
4657
+ fulfillments?: DropshipperOrderFulfillment[];
4582
4658
  transactions: DropshipperTransaction[];
4583
4659
  financial_summary: DropshipperFinancialSummary;
4584
4660
  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.2",
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,83 @@ 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
+
838
+ /** An item shipped as part of a fulfillment */
839
+ export interface DropshipperFulfillmentItem {
840
+ /** Order line item id this fulfillment item was created from */
841
+ item_id: string | null;
842
+ title: string;
843
+ sku: string | null;
844
+ quantity: number;
845
+ }
846
+
847
+ /** A shipping label attached to a fulfillment */
848
+ export interface DropshipperFulfillmentLabel {
849
+ id: string;
850
+ tracking_number: string | null;
851
+ tracking_url: string | null;
852
+ label_url: string | null;
853
+ }
854
+
855
+ /** A fulfillment on an order (read-only; the dropshipper does not manage shipments) */
856
+ export interface DropshipperOrderFulfillment {
857
+ id: string;
858
+ /** Computed from dates: pending, packed, shipped, delivered, canceled */
859
+ status: string;
860
+ created_at: string | null;
861
+ packed_at: string | null;
862
+ shipped_at: string | null;
863
+ delivered_at: string | null;
864
+ canceled_at: string | null;
865
+ provider_id: string | null;
866
+ /** Name of the stock location the fulfillment ships from, when resolvable */
867
+ location_name: string | null;
868
+ items: DropshipperFulfillmentItem[];
869
+ labels: DropshipperFulfillmentLabel[];
870
+ }
871
+
795
872
  /** Full order detail as returned by GET /admin/thor/dropshipper/orders/:id */
796
873
  export interface DropshipperOrderDetail {
797
874
  id: string;
@@ -811,6 +888,12 @@ export interface DropshipperOrderDetail {
811
888
  shipping_methods: DropshipperShippingMethod[];
812
889
  payment_collections: DropshipperPaymentCollection[];
813
890
  returns: DropshipperReturn[];
891
+ /** Exchanges on the order, read-only (contract v3, optional) */
892
+ exchanges?: DropshipperOrderExchange[];
893
+ /** Claims on the order, read-only (contract v3, optional) */
894
+ claims?: DropshipperOrderClaim[];
895
+ /** Fulfillments on the order, read-only (optional) */
896
+ fulfillments?: DropshipperOrderFulfillment[];
814
897
  transactions: DropshipperTransaction[];
815
898
  financial_summary: DropshipperFinancialSummary;
816
899
  timeline: DropshipperOrderTimelineEvent[];