@thorprovider/types 3.10.0 → 3.12.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
@@ -487,11 +487,11 @@ interface StockLocation {
487
487
  id: string;
488
488
  name: string;
489
489
  address?: {
490
- address1: string;
490
+ address1?: string;
491
491
  address2?: string;
492
492
  city: string;
493
493
  countryCode: string;
494
- postalCode: string;
494
+ postalCode?: string;
495
495
  province?: string;
496
496
  };
497
497
  metadata?: {
@@ -1107,11 +1107,11 @@ interface Address {
1107
1107
  firstName: string;
1108
1108
  lastName: string;
1109
1109
  company?: string;
1110
- address1: string;
1110
+ address1?: string;
1111
1111
  address2?: string;
1112
1112
  city: string;
1113
1113
  province?: string;
1114
- postalCode: string;
1114
+ postalCode?: string;
1115
1115
  countryCode: string;
1116
1116
  phone?: string;
1117
1117
  isDefault?: boolean;
@@ -1836,11 +1836,11 @@ interface CreateAddressData {
1836
1836
  firstName: string;
1837
1837
  lastName: string;
1838
1838
  company?: string;
1839
- address1: string;
1839
+ address1?: string;
1840
1840
  address2?: string;
1841
1841
  city: string;
1842
1842
  province?: string;
1843
- postalCode: string;
1843
+ postalCode?: string;
1844
1844
  countryCode: string;
1845
1845
  phone?: string;
1846
1846
  metadata?: Record<string, unknown>;
@@ -2813,12 +2813,12 @@ interface CommerceProvider {
2813
2813
  email: string;
2814
2814
  firstName: string;
2815
2815
  lastName: string;
2816
- address1: string;
2816
+ address1?: string;
2817
2817
  address2?: string;
2818
2818
  company?: string;
2819
2819
  city: string;
2820
2820
  province: string;
2821
- postalCode: string;
2821
+ postalCode?: string;
2822
2822
  countryCode: string;
2823
2823
  phone: string;
2824
2824
  }): Promise<void>;
@@ -3953,11 +3953,11 @@ interface ExtendedCreateDropshipperOrderResponse {
3953
3953
  }
3954
3954
  /** A shipping address on an order */
3955
3955
  interface DropshipperOrderShippingAddress {
3956
- full_name: string;
3957
- address_1: string;
3956
+ full_name?: string;
3957
+ address_1?: string;
3958
3958
  city: string;
3959
- province?: string | null;
3960
- postal_code: string;
3959
+ province: string;
3960
+ postal_code?: string;
3961
3961
  country_code: string;
3962
3962
  }
3963
3963
  /** A line item with cost and profit breakdown */
@@ -4015,6 +4015,8 @@ interface GetDropshipperOrderDetailResponse {
4015
4015
  interface CreateOrderItem {
4016
4016
  variant_id: string;
4017
4017
  quantity: number;
4018
+ /** Optional override for the sale price. If omitted, the backend uses the dropshipper's configured sale price. */
4019
+ unit_price?: number;
4018
4020
  }
4019
4021
  /** Body for `POST /admin/thor/dropshipper/orders` */
4020
4022
  interface CreateDropshipperOrderBody {
@@ -4257,10 +4259,10 @@ interface CreateDropshipperCustomerBody {
4257
4259
  password: string;
4258
4260
  shipping_address?: {
4259
4261
  address_1?: string;
4260
- city?: string;
4261
- province?: string;
4262
+ city: string;
4263
+ province: string;
4262
4264
  postal_code?: string;
4263
- country_code?: string;
4265
+ country_code: string;
4264
4266
  };
4265
4267
  }
4266
4268
  /** Response for `POST /admin/thor/dropshipper/customers` */
@@ -4613,16 +4615,17 @@ interface DropshipperAddressBody {
4613
4615
  first_name?: string;
4614
4616
  last_name?: string;
4615
4617
  company?: string;
4616
- address_1: string;
4618
+ address_1?: string;
4617
4619
  address_2?: string;
4618
4620
  city: string;
4619
- province?: string;
4620
- postal_code: string;
4621
+ province: string;
4622
+ postal_code?: string;
4621
4623
  country_code: string;
4622
4624
  phone?: string;
4623
4625
  is_default?: boolean;
4624
4626
  is_default_shipping?: boolean;
4625
4627
  is_default_billing?: boolean;
4628
+ metadata?: Record<string, unknown>;
4626
4629
  }
4627
4630
  /** Response for creating or updating a dropshipper address */
4628
4631
  interface DropshipperAddressResponse {
package/dist/index.d.ts CHANGED
@@ -487,11 +487,11 @@ interface StockLocation {
487
487
  id: string;
488
488
  name: string;
489
489
  address?: {
490
- address1: string;
490
+ address1?: string;
491
491
  address2?: string;
492
492
  city: string;
493
493
  countryCode: string;
494
- postalCode: string;
494
+ postalCode?: string;
495
495
  province?: string;
496
496
  };
497
497
  metadata?: {
@@ -1107,11 +1107,11 @@ interface Address {
1107
1107
  firstName: string;
1108
1108
  lastName: string;
1109
1109
  company?: string;
1110
- address1: string;
1110
+ address1?: string;
1111
1111
  address2?: string;
1112
1112
  city: string;
1113
1113
  province?: string;
1114
- postalCode: string;
1114
+ postalCode?: string;
1115
1115
  countryCode: string;
1116
1116
  phone?: string;
1117
1117
  isDefault?: boolean;
@@ -1836,11 +1836,11 @@ interface CreateAddressData {
1836
1836
  firstName: string;
1837
1837
  lastName: string;
1838
1838
  company?: string;
1839
- address1: string;
1839
+ address1?: string;
1840
1840
  address2?: string;
1841
1841
  city: string;
1842
1842
  province?: string;
1843
- postalCode: string;
1843
+ postalCode?: string;
1844
1844
  countryCode: string;
1845
1845
  phone?: string;
1846
1846
  metadata?: Record<string, unknown>;
@@ -2813,12 +2813,12 @@ interface CommerceProvider {
2813
2813
  email: string;
2814
2814
  firstName: string;
2815
2815
  lastName: string;
2816
- address1: string;
2816
+ address1?: string;
2817
2817
  address2?: string;
2818
2818
  company?: string;
2819
2819
  city: string;
2820
2820
  province: string;
2821
- postalCode: string;
2821
+ postalCode?: string;
2822
2822
  countryCode: string;
2823
2823
  phone: string;
2824
2824
  }): Promise<void>;
@@ -3953,11 +3953,11 @@ interface ExtendedCreateDropshipperOrderResponse {
3953
3953
  }
3954
3954
  /** A shipping address on an order */
3955
3955
  interface DropshipperOrderShippingAddress {
3956
- full_name: string;
3957
- address_1: string;
3956
+ full_name?: string;
3957
+ address_1?: string;
3958
3958
  city: string;
3959
- province?: string | null;
3960
- postal_code: string;
3959
+ province: string;
3960
+ postal_code?: string;
3961
3961
  country_code: string;
3962
3962
  }
3963
3963
  /** A line item with cost and profit breakdown */
@@ -4015,6 +4015,8 @@ interface GetDropshipperOrderDetailResponse {
4015
4015
  interface CreateOrderItem {
4016
4016
  variant_id: string;
4017
4017
  quantity: number;
4018
+ /** Optional override for the sale price. If omitted, the backend uses the dropshipper's configured sale price. */
4019
+ unit_price?: number;
4018
4020
  }
4019
4021
  /** Body for `POST /admin/thor/dropshipper/orders` */
4020
4022
  interface CreateDropshipperOrderBody {
@@ -4257,10 +4259,10 @@ interface CreateDropshipperCustomerBody {
4257
4259
  password: string;
4258
4260
  shipping_address?: {
4259
4261
  address_1?: string;
4260
- city?: string;
4261
- province?: string;
4262
+ city: string;
4263
+ province: string;
4262
4264
  postal_code?: string;
4263
- country_code?: string;
4265
+ country_code: string;
4264
4266
  };
4265
4267
  }
4266
4268
  /** Response for `POST /admin/thor/dropshipper/customers` */
@@ -4613,16 +4615,17 @@ interface DropshipperAddressBody {
4613
4615
  first_name?: string;
4614
4616
  last_name?: string;
4615
4617
  company?: string;
4616
- address_1: string;
4618
+ address_1?: string;
4617
4619
  address_2?: string;
4618
4620
  city: string;
4619
- province?: string;
4620
- postal_code: string;
4621
+ province: string;
4622
+ postal_code?: string;
4621
4623
  country_code: string;
4622
4624
  phone?: string;
4623
4625
  is_default?: boolean;
4624
4626
  is_default_shipping?: boolean;
4625
4627
  is_default_billing?: boolean;
4628
+ metadata?: Record<string, unknown>;
4626
4629
  }
4627
4630
  /** Response for creating or updating a dropshipper address */
4628
4631
  interface DropshipperAddressResponse {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thorprovider/types",
3
- "version": "3.10.0",
3
+ "version": "3.12.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",
@@ -350,11 +350,11 @@ export interface ExtendedCreateDropshipperOrderResponse {
350
350
 
351
351
  /** A shipping address on an order */
352
352
  export interface DropshipperOrderShippingAddress {
353
- full_name: string;
354
- address_1: string;
353
+ full_name?: string;
354
+ address_1?: string;
355
355
  city: string;
356
- province?: string | null;
357
- postal_code: string;
356
+ province: string;
357
+ postal_code?: string;
358
358
  country_code: string;
359
359
  }
360
360
 
@@ -416,6 +416,8 @@ export interface GetDropshipperOrderDetailResponse {
416
416
  export interface CreateOrderItem {
417
417
  variant_id: string;
418
418
  quantity: number;
419
+ /** Optional override for the sale price. If omitted, the backend uses the dropshipper's configured sale price. */
420
+ unit_price?: number;
419
421
  }
420
422
 
421
423
  /** Body for `POST /admin/thor/dropshipper/orders` */
@@ -689,10 +691,10 @@ export interface CreateDropshipperCustomerBody {
689
691
  password: string;
690
692
  shipping_address?: {
691
693
  address_1?: string;
692
- city?: string;
693
- province?: string;
694
+ city: string;
695
+ province: string;
694
696
  postal_code?: string;
695
- country_code?: string;
697
+ country_code: string;
696
698
  };
697
699
  }
698
700
 
@@ -1106,16 +1108,17 @@ export interface DropshipperAddressBody {
1106
1108
  first_name?: string;
1107
1109
  last_name?: string;
1108
1110
  company?: string;
1109
- address_1: string;
1111
+ address_1?: string;
1110
1112
  address_2?: string;
1111
1113
  city: string;
1112
- province?: string;
1113
- postal_code: string;
1114
+ province: string;
1115
+ postal_code?: string;
1114
1116
  country_code: string;
1115
1117
  phone?: string;
1116
1118
  is_default?: boolean;
1117
1119
  is_default_shipping?: boolean;
1118
1120
  is_default_billing?: boolean;
1121
+ metadata?: Record<string, unknown>;
1119
1122
  }
1120
1123
 
1121
1124
  /** Response for creating or updating a dropshipper address */
package/src/auth.ts CHANGED
@@ -123,11 +123,11 @@ export interface CreateAddressData {
123
123
  firstName: string;
124
124
  lastName: string;
125
125
  company?: string;
126
- address1: string;
126
+ address1?: string;
127
127
  address2?: string;
128
128
  city: string;
129
129
  province?: string;
130
- postalCode: string;
130
+ postalCode?: string;
131
131
  countryCode: string;
132
132
  phone?: string;
133
133
  metadata?: Record<string, unknown>;
@@ -772,12 +772,12 @@ export interface CommerceProvider {
772
772
  email: string;
773
773
  firstName: string;
774
774
  lastName: string;
775
- address1: string;
775
+ address1?: string;
776
776
  address2?: string;
777
777
  company?: string;
778
778
  city: string;
779
779
  province: string;
780
- postalCode: string;
780
+ postalCode?: string;
781
781
  countryCode: string;
782
782
  phone: string;
783
783
  },
package/src/customer.ts CHANGED
@@ -22,11 +22,11 @@ export interface Address {
22
22
  firstName: string; // Shopify: firstName, Medusa: first_name, WooCommerce: first_name
23
23
  lastName: string; // Shopify: lastName, Medusa: last_name, WooCommerce: last_name
24
24
  company?: string;
25
- address1: string; // Shopify: address1, Medusa: address_1, WooCommerce: address_1
25
+ address1?: string; // Shopify: address1, Medusa: address_1, WooCommerce: address_1
26
26
  address2?: string; // Optional second address line
27
27
  city: string;
28
28
  province?: string; // State/province (Shopify: province, WooCommerce: state, Magento: region)
29
- postalCode: string; // Shopify: zip, Medusa: postal_code, WooCommerce: postcode
29
+ postalCode?: string; // Shopify: zip, Medusa: postal_code, WooCommerce: postcode
30
30
  countryCode: string; // ISO 3166-1 alpha-2 code (e.g., "US", "CA", "GB")
31
31
  phone?: string;
32
32
  isDefault?: boolean; // Whether this is the default/primary address for the customer
@@ -10,11 +10,11 @@ export interface StockLocation {
10
10
  id: string;
11
11
  name: string;
12
12
  address?: {
13
- address1: string;
13
+ address1?: string;
14
14
  address2?: string;
15
15
  city: string;
16
16
  countryCode: string;
17
- postalCode: string;
17
+ postalCode?: string;
18
18
  province?: string;
19
19
  };
20
20
  metadata?: {