@thorprovider/types 5.5.0 → 5.6.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.
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;
@@ -4733,6 +4750,9 @@ interface DropshipperDraftOrder {
4733
4750
  items: DropshipperDraftOrderItem[];
4734
4751
  shipping_address: DropshipperOrderShippingAddress | null;
4735
4752
  billing_address: DropshipperOrderShippingAddress | null;
4753
+ /** One selected option per shipping group (contract v2). Replaces `shipping_method_id`. */
4754
+ shipping_groups: ShippingGroupInput[] | null;
4755
+ /** @deprecated legacy singular shipping method id; use `shipping_groups` instead. */
4736
4756
  shipping_method_id: string | null;
4737
4757
  payment_method_id: string | null;
4738
4758
  notes: string | null;
@@ -4786,6 +4806,9 @@ interface CreateDropshipperDraftOrderBody {
4786
4806
  items: CreateOrderItem[];
4787
4807
  shipping_address?: DropshipperOrderShippingAddress;
4788
4808
  billing_address?: DropshipperOrderShippingAddress;
4809
+ /** One selected option per shipping group (contract v2). Replaces `shipping_method_id`. */
4810
+ shipping_groups?: ShippingGroupInput[];
4811
+ /** @deprecated legacy singular shipping method id; use `shipping_groups` instead. */
4789
4812
  shipping_method_id?: string;
4790
4813
  payment_method_id?: string;
4791
4814
  notes?: string;
@@ -4805,6 +4828,9 @@ interface UpdateDropshipperDraftOrderBody {
4805
4828
  items?: CreateOrderItem[];
4806
4829
  shipping_address?: DropshipperOrderShippingAddress;
4807
4830
  billing_address?: DropshipperOrderShippingAddress;
4831
+ /** One selected option per shipping group (contract v2). Replaces `shipping_method_id`. */
4832
+ shipping_groups?: ShippingGroupInput[];
4833
+ /** @deprecated legacy singular shipping method id; use `shipping_groups` instead. */
4808
4834
  shipping_method_id?: string;
4809
4835
  payment_method_id?: string;
4810
4836
  notes?: string;
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;
@@ -4733,6 +4750,9 @@ interface DropshipperDraftOrder {
4733
4750
  items: DropshipperDraftOrderItem[];
4734
4751
  shipping_address: DropshipperOrderShippingAddress | null;
4735
4752
  billing_address: DropshipperOrderShippingAddress | null;
4753
+ /** One selected option per shipping group (contract v2). Replaces `shipping_method_id`. */
4754
+ shipping_groups: ShippingGroupInput[] | null;
4755
+ /** @deprecated legacy singular shipping method id; use `shipping_groups` instead. */
4736
4756
  shipping_method_id: string | null;
4737
4757
  payment_method_id: string | null;
4738
4758
  notes: string | null;
@@ -4786,6 +4806,9 @@ interface CreateDropshipperDraftOrderBody {
4786
4806
  items: CreateOrderItem[];
4787
4807
  shipping_address?: DropshipperOrderShippingAddress;
4788
4808
  billing_address?: DropshipperOrderShippingAddress;
4809
+ /** One selected option per shipping group (contract v2). Replaces `shipping_method_id`. */
4810
+ shipping_groups?: ShippingGroupInput[];
4811
+ /** @deprecated legacy singular shipping method id; use `shipping_groups` instead. */
4789
4812
  shipping_method_id?: string;
4790
4813
  payment_method_id?: string;
4791
4814
  notes?: string;
@@ -4805,6 +4828,9 @@ interface UpdateDropshipperDraftOrderBody {
4805
4828
  items?: CreateOrderItem[];
4806
4829
  shipping_address?: DropshipperOrderShippingAddress;
4807
4830
  billing_address?: DropshipperOrderShippingAddress;
4831
+ /** One selected option per shipping group (contract v2). Replaces `shipping_method_id`. */
4832
+ shipping_groups?: ShippingGroupInput[];
4833
+ /** @deprecated legacy singular shipping method id; use `shipping_groups` instead. */
4808
4834
  shipping_method_id?: string;
4809
4835
  payment_method_id?: string;
4810
4836
  notes?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thorprovider/types",
3
- "version": "5.5.0",
3
+ "version": "5.6.0",
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
@@ -966,6 +983,9 @@ export interface DropshipperDraftOrder {
966
983
  items: DropshipperDraftOrderItem[];
967
984
  shipping_address: DropshipperOrderShippingAddress | null;
968
985
  billing_address: DropshipperOrderShippingAddress | null;
986
+ /** One selected option per shipping group (contract v2). Replaces `shipping_method_id`. */
987
+ shipping_groups: ShippingGroupInput[] | null;
988
+ /** @deprecated legacy singular shipping method id; use `shipping_groups` instead. */
969
989
  shipping_method_id: string | null;
970
990
  payment_method_id: string | null;
971
991
  notes: string | null;
@@ -1013,6 +1033,9 @@ export interface CreateDropshipperDraftOrderBody {
1013
1033
  items: CreateOrderItem[];
1014
1034
  shipping_address?: DropshipperOrderShippingAddress;
1015
1035
  billing_address?: DropshipperOrderShippingAddress;
1036
+ /** One selected option per shipping group (contract v2). Replaces `shipping_method_id`. */
1037
+ shipping_groups?: ShippingGroupInput[];
1038
+ /** @deprecated legacy singular shipping method id; use `shipping_groups` instead. */
1016
1039
  shipping_method_id?: string;
1017
1040
  payment_method_id?: string;
1018
1041
  notes?: string;
@@ -1035,6 +1058,9 @@ export interface UpdateDropshipperDraftOrderBody {
1035
1058
  items?: CreateOrderItem[];
1036
1059
  shipping_address?: DropshipperOrderShippingAddress;
1037
1060
  billing_address?: DropshipperOrderShippingAddress;
1061
+ /** One selected option per shipping group (contract v2). Replaces `shipping_method_id`. */
1062
+ shipping_groups?: ShippingGroupInput[];
1063
+ /** @deprecated legacy singular shipping method id; use `shipping_groups` instead. */
1038
1064
  shipping_method_id?: string;
1039
1065
  payment_method_id?: string;
1040
1066
  notes?: string;