@thorprovider/types 5.5.1 → 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
@@ -4107,7 +4107,24 @@ interface ValidateCheckoutItemsRequest {
4107
4107
  /** Per-variant result in the validate checkout response */
4108
4108
  interface ValidatedCheckoutItem {
4109
4109
  variant_id: string;
4110
+ /**
4111
+ * Disponibilidad agregada del canal (suma de locations). Se conserva para
4112
+ * compatibilidad; el límite Modelo A real es `maxSingleLocationAvailability`.
4113
+ */
4110
4114
  availableQuantity: number;
4115
+ /**
4116
+ * Mayor capacidad de un solo almacén del canal para servir el ítem completo.
4117
+ * `null` cuando `manageInventory=false` o `allowBackorder=true` (el backend no
4118
+ * computa el gate single-location en esos casos).
4119
+ */
4120
+ maxSingleLocationAvailability: number | null;
4121
+ /** Almacenes del canal que pueden servir la cantidad pedida completa. */
4122
+ eligibleLocations: string[];
4123
+ /**
4124
+ * `true` cuando la cantidad pedida excede la capacidad de todo almacén del
4125
+ * canal (`maxSingleLocationAvailability < quantity`). Es el veredicto Modelo A.
4126
+ */
4127
+ exceeds_max_stock: boolean;
4111
4128
  sale_price: number;
4112
4129
  cost_price: number;
4113
4130
  manageInventory: boolean;
@@ -4541,6 +4558,45 @@ interface DropshipperShippingMethod {
4541
4558
  shipping_profile_id?: string;
4542
4559
  stock_location_id?: string;
4543
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
+ }
4544
4600
  /** Full order detail as returned by GET /admin/thor/dropshipper/orders/:id */
4545
4601
  interface DropshipperOrderDetail {
4546
4602
  id: string;
@@ -4562,6 +4618,10 @@ interface DropshipperOrderDetail {
4562
4618
  shipping_methods: DropshipperShippingMethod[];
4563
4619
  payment_collections: DropshipperPaymentCollection[];
4564
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[];
4565
4625
  transactions: DropshipperTransaction[];
4566
4626
  financial_summary: DropshipperFinancialSummary;
4567
4627
  timeline: DropshipperOrderTimelineEvent[];
package/dist/index.d.ts CHANGED
@@ -4107,7 +4107,24 @@ interface ValidateCheckoutItemsRequest {
4107
4107
  /** Per-variant result in the validate checkout response */
4108
4108
  interface ValidatedCheckoutItem {
4109
4109
  variant_id: string;
4110
+ /**
4111
+ * Disponibilidad agregada del canal (suma de locations). Se conserva para
4112
+ * compatibilidad; el límite Modelo A real es `maxSingleLocationAvailability`.
4113
+ */
4110
4114
  availableQuantity: number;
4115
+ /**
4116
+ * Mayor capacidad de un solo almacén del canal para servir el ítem completo.
4117
+ * `null` cuando `manageInventory=false` o `allowBackorder=true` (el backend no
4118
+ * computa el gate single-location en esos casos).
4119
+ */
4120
+ maxSingleLocationAvailability: number | null;
4121
+ /** Almacenes del canal que pueden servir la cantidad pedida completa. */
4122
+ eligibleLocations: string[];
4123
+ /**
4124
+ * `true` cuando la cantidad pedida excede la capacidad de todo almacén del
4125
+ * canal (`maxSingleLocationAvailability < quantity`). Es el veredicto Modelo A.
4126
+ */
4127
+ exceeds_max_stock: boolean;
4111
4128
  sale_price: number;
4112
4129
  cost_price: number;
4113
4130
  manageInventory: boolean;
@@ -4541,6 +4558,45 @@ interface DropshipperShippingMethod {
4541
4558
  shipping_profile_id?: string;
4542
4559
  stock_location_id?: string;
4543
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
+ }
4544
4600
  /** Full order detail as returned by GET /admin/thor/dropshipper/orders/:id */
4545
4601
  interface DropshipperOrderDetail {
4546
4602
  id: string;
@@ -4562,6 +4618,10 @@ interface DropshipperOrderDetail {
4562
4618
  shipping_methods: DropshipperShippingMethod[];
4563
4619
  payment_collections: DropshipperPaymentCollection[];
4564
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[];
4565
4625
  transactions: DropshipperTransaction[];
4566
4626
  financial_summary: DropshipperFinancialSummary;
4567
4627
  timeline: DropshipperOrderTimelineEvent[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thorprovider/types",
3
- "version": "5.5.1",
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",
@@ -302,7 +302,24 @@ export interface ValidateCheckoutItemsRequest {
302
302
  /** Per-variant result in the validate checkout response */
303
303
  export interface ValidatedCheckoutItem {
304
304
  variant_id: string
305
+ /**
306
+ * Disponibilidad agregada del canal (suma de locations). Se conserva para
307
+ * compatibilidad; el límite Modelo A real es `maxSingleLocationAvailability`.
308
+ */
305
309
  availableQuantity: number
310
+ /**
311
+ * Mayor capacidad de un solo almacén del canal para servir el ítem completo.
312
+ * `null` cuando `manageInventory=false` o `allowBackorder=true` (el backend no
313
+ * computa el gate single-location en esos casos).
314
+ */
315
+ maxSingleLocationAvailability: number | null
316
+ /** Almacenes del canal que pueden servir la cantidad pedida completa. */
317
+ eligibleLocations: string[]
318
+ /**
319
+ * `true` cuando la cantidad pedida excede la capacidad de todo almacén del
320
+ * canal (`maxSingleLocationAvailability < quantity`). Es el veredicto Modelo A.
321
+ */
322
+ exceeds_max_stock: boolean
306
323
  sale_price: number
307
324
  cost_price: number
308
325
  manageInventory: boolean
@@ -775,6 +792,49 @@ export interface DropshipperShippingMethod {
775
792
  stock_location_id?: string;
776
793
  }
777
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
+
778
838
  /** Full order detail as returned by GET /admin/thor/dropshipper/orders/:id */
779
839
  export interface DropshipperOrderDetail {
780
840
  id: string;
@@ -794,6 +854,10 @@ export interface DropshipperOrderDetail {
794
854
  shipping_methods: DropshipperShippingMethod[];
795
855
  payment_collections: DropshipperPaymentCollection[];
796
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[];
797
861
  transactions: DropshipperTransaction[];
798
862
  financial_summary: DropshipperFinancialSummary;
799
863
  timeline: DropshipperOrderTimelineEvent[];