@commercelayer/sdk 5.0.0-beta.1 → 5.0.0-beta.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.
Files changed (191) hide show
  1. package/lib/cjs/client.js +0 -1
  2. package/lib/cjs/common.js +0 -2
  3. package/lib/cjs/debug.js +0 -3
  4. package/lib/cjs/error.js +0 -1
  5. package/lib/cjs/resources/addresses.d.ts +10 -10
  6. package/lib/cjs/resources/adjustments.d.ts +8 -8
  7. package/lib/cjs/resources/adyen_gateways.d.ts +4 -4
  8. package/lib/cjs/resources/adyen_payments.d.ts +1 -1
  9. package/lib/cjs/resources/attachments.d.ts +2 -2
  10. package/lib/cjs/resources/authorizations.d.ts +6 -6
  11. package/lib/cjs/resources/avalara_accounts.d.ts +6 -6
  12. package/lib/cjs/resources/axerve_gateways.d.ts +4 -4
  13. package/lib/cjs/resources/axerve_payments.d.ts +3 -3
  14. package/lib/cjs/resources/bing_geocoders.d.ts +2 -2
  15. package/lib/cjs/resources/braintree_gateways.d.ts +2 -2
  16. package/lib/cjs/resources/braintree_payments.d.ts +1 -1
  17. package/lib/cjs/resources/bundles.d.ts +12 -12
  18. package/lib/cjs/resources/captures.d.ts +6 -6
  19. package/lib/cjs/resources/checkout_com_gateways.d.ts +2 -2
  20. package/lib/cjs/resources/checkout_com_payments.d.ts +4 -4
  21. package/lib/cjs/resources/cleanups.d.ts +1 -1
  22. package/lib/cjs/resources/coupon_recipients.d.ts +2 -2
  23. package/lib/cjs/resources/coupons.d.ts +4 -4
  24. package/lib/cjs/resources/customer_groups.d.ts +2 -2
  25. package/lib/cjs/resources/customer_password_resets.d.ts +1 -1
  26. package/lib/cjs/resources/customer_subscriptions.d.ts +1 -1
  27. package/lib/cjs/resources/customers.d.ts +2 -2
  28. package/lib/cjs/resources/delivery_lead_times.d.ts +4 -4
  29. package/lib/cjs/resources/event_callbacks.d.ts +1 -1
  30. package/lib/cjs/resources/events.d.ts +1 -1
  31. package/lib/cjs/resources/exports.d.ts +1 -1
  32. package/lib/cjs/resources/external_gateways.d.ts +3 -3
  33. package/lib/cjs/resources/external_payments.d.ts +1 -1
  34. package/lib/cjs/resources/external_promotions.d.ts +11 -11
  35. package/lib/cjs/resources/external_tax_calculators.d.ts +5 -5
  36. package/lib/cjs/resources/fixed_amount_promotions.d.ts +10 -10
  37. package/lib/cjs/resources/fixed_price_promotions.d.ts +10 -10
  38. package/lib/cjs/resources/free_gift_promotions.d.ts +8 -8
  39. package/lib/cjs/resources/free_shipping_promotions.d.ts +8 -8
  40. package/lib/cjs/resources/geocoders.d.ts +1 -1
  41. package/lib/cjs/resources/gift_card_recipients.d.ts +2 -2
  42. package/lib/cjs/resources/gift_cards.d.ts +8 -8
  43. package/lib/cjs/resources/google_geocoders.d.ts +2 -2
  44. package/lib/cjs/resources/imports.d.ts +2 -2
  45. package/lib/cjs/resources/inventory_models.d.ts +2 -2
  46. package/lib/cjs/resources/inventory_return_locations.d.ts +2 -2
  47. package/lib/cjs/resources/inventory_stock_locations.d.ts +2 -2
  48. package/lib/cjs/resources/klarna_gateways.d.ts +2 -2
  49. package/lib/cjs/resources/klarna_payments.d.ts +2 -2
  50. package/lib/cjs/resources/line_item_options.d.ts +5 -5
  51. package/lib/cjs/resources/line_items.d.ts +4 -4
  52. package/lib/cjs/resources/manual_gateways.d.ts +2 -2
  53. package/lib/cjs/resources/manual_tax_calculators.d.ts +2 -2
  54. package/lib/cjs/resources/markets.d.ts +3 -3
  55. package/lib/cjs/resources/merchants.d.ts +2 -2
  56. package/lib/cjs/resources/order_subscriptions.d.ts +1 -1
  57. package/lib/cjs/resources/packages.d.ts +10 -10
  58. package/lib/cjs/resources/parcel_line_items.d.ts +2 -2
  59. package/lib/cjs/resources/parcels.d.ts +4 -4
  60. package/lib/cjs/resources/payment_gateways.d.ts +1 -1
  61. package/lib/cjs/resources/payment_methods.d.ts +4 -4
  62. package/lib/cjs/resources/paypal_gateways.d.ts +2 -2
  63. package/lib/cjs/resources/paypal_payments.d.ts +3 -3
  64. package/lib/cjs/resources/percentage_discount_promotions.d.ts +10 -10
  65. package/lib/cjs/resources/price_lists.d.ts +4 -4
  66. package/lib/cjs/resources/price_tiers.d.ts +2 -2
  67. package/lib/cjs/resources/price_volume_tiers.d.ts +4 -4
  68. package/lib/cjs/resources/prices.d.ts +8 -8
  69. package/lib/cjs/resources/promotions.d.ts +4 -4
  70. package/lib/cjs/resources/refunds.d.ts +6 -6
  71. package/lib/cjs/resources/return_line_items.d.ts +2 -2
  72. package/lib/cjs/resources/satispay_gateways.d.ts +2 -2
  73. package/lib/cjs/resources/satispay_payments.d.ts +1 -1
  74. package/lib/cjs/resources/shipping_categories.d.ts +2 -2
  75. package/lib/cjs/resources/shipping_method_tiers.d.ts +2 -2
  76. package/lib/cjs/resources/shipping_methods.d.ts +4 -4
  77. package/lib/cjs/resources/shipping_weight_tiers.d.ts +4 -4
  78. package/lib/cjs/resources/shipping_zones.d.ts +2 -2
  79. package/lib/cjs/resources/sku_lists.d.ts +3 -3
  80. package/lib/cjs/resources/sku_options.d.ts +2 -2
  81. package/lib/cjs/resources/skus.d.ts +4 -4
  82. package/lib/cjs/resources/stock_items.d.ts +2 -2
  83. package/lib/cjs/resources/stock_line_items.d.ts +1 -1
  84. package/lib/cjs/resources/stock_locations.d.ts +2 -2
  85. package/lib/cjs/resources/stock_transfers.d.ts +1 -1
  86. package/lib/cjs/resources/stripe_gateways.d.ts +2 -2
  87. package/lib/cjs/resources/stripe_payments.d.ts +2 -2
  88. package/lib/cjs/resources/tax_calculators.d.ts +1 -1
  89. package/lib/cjs/resources/tax_categories.d.ts +2 -2
  90. package/lib/cjs/resources/tax_rules.d.ts +2 -2
  91. package/lib/cjs/resources/taxjar_accounts.d.ts +2 -2
  92. package/lib/cjs/resources/transactions.d.ts +6 -6
  93. package/lib/cjs/resources/voids.d.ts +6 -6
  94. package/lib/cjs/resources/webhooks.d.ts +5 -5
  95. package/lib/esm/client.js +0 -1
  96. package/lib/esm/common.js +0 -2
  97. package/lib/esm/debug.js +0 -3
  98. package/lib/esm/error.js +0 -1
  99. package/lib/esm/resources/addresses.d.ts +10 -10
  100. package/lib/esm/resources/adjustments.d.ts +8 -8
  101. package/lib/esm/resources/adyen_gateways.d.ts +4 -4
  102. package/lib/esm/resources/adyen_payments.d.ts +1 -1
  103. package/lib/esm/resources/attachments.d.ts +2 -2
  104. package/lib/esm/resources/authorizations.d.ts +6 -6
  105. package/lib/esm/resources/avalara_accounts.d.ts +6 -6
  106. package/lib/esm/resources/axerve_gateways.d.ts +4 -4
  107. package/lib/esm/resources/axerve_payments.d.ts +3 -3
  108. package/lib/esm/resources/bing_geocoders.d.ts +2 -2
  109. package/lib/esm/resources/braintree_gateways.d.ts +2 -2
  110. package/lib/esm/resources/braintree_payments.d.ts +1 -1
  111. package/lib/esm/resources/bundles.d.ts +12 -12
  112. package/lib/esm/resources/captures.d.ts +6 -6
  113. package/lib/esm/resources/checkout_com_gateways.d.ts +2 -2
  114. package/lib/esm/resources/checkout_com_payments.d.ts +4 -4
  115. package/lib/esm/resources/cleanups.d.ts +1 -1
  116. package/lib/esm/resources/coupon_recipients.d.ts +2 -2
  117. package/lib/esm/resources/coupons.d.ts +4 -4
  118. package/lib/esm/resources/customer_groups.d.ts +2 -2
  119. package/lib/esm/resources/customer_password_resets.d.ts +1 -1
  120. package/lib/esm/resources/customer_subscriptions.d.ts +1 -1
  121. package/lib/esm/resources/customers.d.ts +2 -2
  122. package/lib/esm/resources/delivery_lead_times.d.ts +4 -4
  123. package/lib/esm/resources/event_callbacks.d.ts +1 -1
  124. package/lib/esm/resources/events.d.ts +1 -1
  125. package/lib/esm/resources/exports.d.ts +1 -1
  126. package/lib/esm/resources/external_gateways.d.ts +3 -3
  127. package/lib/esm/resources/external_payments.d.ts +1 -1
  128. package/lib/esm/resources/external_promotions.d.ts +11 -11
  129. package/lib/esm/resources/external_tax_calculators.d.ts +5 -5
  130. package/lib/esm/resources/fixed_amount_promotions.d.ts +10 -10
  131. package/lib/esm/resources/fixed_price_promotions.d.ts +10 -10
  132. package/lib/esm/resources/free_gift_promotions.d.ts +8 -8
  133. package/lib/esm/resources/free_shipping_promotions.d.ts +8 -8
  134. package/lib/esm/resources/geocoders.d.ts +1 -1
  135. package/lib/esm/resources/gift_card_recipients.d.ts +2 -2
  136. package/lib/esm/resources/gift_cards.d.ts +8 -8
  137. package/lib/esm/resources/google_geocoders.d.ts +2 -2
  138. package/lib/esm/resources/imports.d.ts +2 -2
  139. package/lib/esm/resources/inventory_models.d.ts +2 -2
  140. package/lib/esm/resources/inventory_return_locations.d.ts +2 -2
  141. package/lib/esm/resources/inventory_stock_locations.d.ts +2 -2
  142. package/lib/esm/resources/klarna_gateways.d.ts +2 -2
  143. package/lib/esm/resources/klarna_payments.d.ts +2 -2
  144. package/lib/esm/resources/line_item_options.d.ts +5 -5
  145. package/lib/esm/resources/line_items.d.ts +4 -4
  146. package/lib/esm/resources/manual_gateways.d.ts +2 -2
  147. package/lib/esm/resources/manual_tax_calculators.d.ts +2 -2
  148. package/lib/esm/resources/markets.d.ts +3 -3
  149. package/lib/esm/resources/merchants.d.ts +2 -2
  150. package/lib/esm/resources/order_subscriptions.d.ts +1 -1
  151. package/lib/esm/resources/packages.d.ts +10 -10
  152. package/lib/esm/resources/parcel_line_items.d.ts +2 -2
  153. package/lib/esm/resources/parcels.d.ts +4 -4
  154. package/lib/esm/resources/payment_gateways.d.ts +1 -1
  155. package/lib/esm/resources/payment_methods.d.ts +4 -4
  156. package/lib/esm/resources/paypal_gateways.d.ts +2 -2
  157. package/lib/esm/resources/paypal_payments.d.ts +3 -3
  158. package/lib/esm/resources/percentage_discount_promotions.d.ts +10 -10
  159. package/lib/esm/resources/price_lists.d.ts +4 -4
  160. package/lib/esm/resources/price_tiers.d.ts +2 -2
  161. package/lib/esm/resources/price_volume_tiers.d.ts +4 -4
  162. package/lib/esm/resources/prices.d.ts +8 -8
  163. package/lib/esm/resources/promotions.d.ts +4 -4
  164. package/lib/esm/resources/refunds.d.ts +6 -6
  165. package/lib/esm/resources/return_line_items.d.ts +2 -2
  166. package/lib/esm/resources/satispay_gateways.d.ts +2 -2
  167. package/lib/esm/resources/satispay_payments.d.ts +1 -1
  168. package/lib/esm/resources/shipping_categories.d.ts +2 -2
  169. package/lib/esm/resources/shipping_method_tiers.d.ts +2 -2
  170. package/lib/esm/resources/shipping_methods.d.ts +4 -4
  171. package/lib/esm/resources/shipping_weight_tiers.d.ts +4 -4
  172. package/lib/esm/resources/shipping_zones.d.ts +2 -2
  173. package/lib/esm/resources/sku_lists.d.ts +3 -3
  174. package/lib/esm/resources/sku_options.d.ts +2 -2
  175. package/lib/esm/resources/skus.d.ts +4 -4
  176. package/lib/esm/resources/stock_items.d.ts +2 -2
  177. package/lib/esm/resources/stock_line_items.d.ts +1 -1
  178. package/lib/esm/resources/stock_locations.d.ts +2 -2
  179. package/lib/esm/resources/stock_transfers.d.ts +1 -1
  180. package/lib/esm/resources/stripe_gateways.d.ts +2 -2
  181. package/lib/esm/resources/stripe_payments.d.ts +2 -2
  182. package/lib/esm/resources/tax_calculators.d.ts +1 -1
  183. package/lib/esm/resources/tax_categories.d.ts +2 -2
  184. package/lib/esm/resources/tax_rules.d.ts +2 -2
  185. package/lib/esm/resources/taxjar_accounts.d.ts +2 -2
  186. package/lib/esm/resources/transactions.d.ts +6 -6
  187. package/lib/esm/resources/voids.d.ts +6 -6
  188. package/lib/esm/resources/webhooks.d.ts +5 -5
  189. package/lib/tsconfig.esm.tsbuildinfo +1 -1
  190. package/lib/tsconfig.tsbuildinfo +1 -1
  191. package/package.json +1 -1
@@ -33,14 +33,14 @@ type SkuListRel = ResourceRel & {
33
33
  };
34
34
  interface PercentageDiscountPromotion extends Resource {
35
35
  readonly type: PercentageDiscountPromotionType;
36
- name?: string;
36
+ name: string;
37
37
  currency_code?: string;
38
- starts_at?: string;
39
- expires_at?: string;
40
- total_usage_limit?: number;
38
+ starts_at: string;
39
+ expires_at: string;
40
+ total_usage_limit: number;
41
41
  total_usage_count?: number;
42
42
  active?: boolean;
43
- percentage?: number;
43
+ percentage: number;
44
44
  market?: Market;
45
45
  promotion_rules?: PromotionRule[];
46
46
  order_amount_promotion_rule?: OrderAmountPromotionRule;
@@ -66,12 +66,12 @@ interface PercentageDiscountPromotionCreate extends ResourceCreate {
66
66
  sku_list?: SkuListRel;
67
67
  }
68
68
  interface PercentageDiscountPromotionUpdate extends ResourceUpdate {
69
- name?: string;
69
+ name: string;
70
70
  currency_code?: string;
71
- starts_at?: string;
72
- expires_at?: string;
73
- total_usage_limit?: number;
74
- percentage?: number;
71
+ starts_at: string;
72
+ expires_at: string;
73
+ total_usage_limit: number;
74
+ percentage: number;
75
75
  market?: MarketRel;
76
76
  promotion_rules?: PromotionRuleRel[];
77
77
  order_amount_promotion_rule?: OrderAmountPromotionRuleRel;
@@ -8,8 +8,8 @@ type PriceListRel = ResourceRel & {
8
8
  };
9
9
  interface PriceList extends Resource {
10
10
  readonly type: PriceListType;
11
- name?: string;
12
- currency_code?: string;
11
+ name: string;
12
+ currency_code: string;
13
13
  tax_included?: boolean;
14
14
  prices?: Price[];
15
15
  attachments?: Attachment[];
@@ -20,8 +20,8 @@ interface PriceListCreate extends ResourceCreate {
20
20
  tax_included?: boolean;
21
21
  }
22
22
  interface PriceListUpdate extends ResourceUpdate {
23
- name?: string;
24
- currency_code?: string;
23
+ name: string;
24
+ currency_code: string;
25
25
  tax_included?: boolean;
26
26
  }
27
27
  declare class PriceLists extends ApiResource<PriceList> {
@@ -8,9 +8,9 @@ type PriceTierRel = ResourceRel & {
8
8
  };
9
9
  interface PriceTier extends Resource {
10
10
  readonly type: PriceTierType;
11
- name?: string;
11
+ name: string;
12
12
  up_to?: number;
13
- price_amount_cents?: number;
13
+ price_amount_cents: number;
14
14
  price_amount_float?: number;
15
15
  formatted_price_amount?: string;
16
16
  price?: Price;
@@ -11,9 +11,9 @@ type PriceRel = ResourceRel & {
11
11
  };
12
12
  interface PriceVolumeTier extends Resource {
13
13
  readonly type: PriceVolumeTierType;
14
- name?: string;
14
+ name: string;
15
15
  up_to?: number;
16
- price_amount_cents?: number;
16
+ price_amount_cents: number;
17
17
  price_amount_float?: number;
18
18
  formatted_price_amount?: string;
19
19
  price?: Price;
@@ -26,9 +26,9 @@ interface PriceVolumeTierCreate extends ResourceCreate {
26
26
  price: PriceRel;
27
27
  }
28
28
  interface PriceVolumeTierUpdate extends ResourceUpdate {
29
- name?: string;
29
+ name: string;
30
30
  up_to?: number;
31
- price_amount_cents?: number;
31
+ price_amount_cents: number;
32
32
  price?: PriceRel;
33
33
  }
34
34
  declare class PriceVolumeTiers extends ApiResource<PriceVolumeTier> {
@@ -22,12 +22,12 @@ interface Price extends Resource {
22
22
  readonly type: PriceType;
23
23
  currency_code?: string;
24
24
  sku_code?: string;
25
- amount_cents?: number;
26
- amount_float?: number;
27
- formatted_amount?: string;
28
- compare_at_amount_cents?: number;
29
- compare_at_amount_float?: number;
30
- formatted_compare_at_amount?: string;
25
+ amount_cents: number;
26
+ amount_float: number;
27
+ formatted_amount: string;
28
+ compare_at_amount_cents: number;
29
+ compare_at_amount_float: number;
30
+ formatted_compare_at_amount: string;
31
31
  price_list?: PriceList;
32
32
  sku?: Sku;
33
33
  price_tiers?: PriceTier[];
@@ -44,8 +44,8 @@ interface PriceCreate extends ResourceCreate {
44
44
  }
45
45
  interface PriceUpdate extends ResourceUpdate {
46
46
  sku_code?: string;
47
- amount_cents?: number;
48
- compare_at_amount_cents?: number;
47
+ amount_cents: number;
48
+ compare_at_amount_cents: number;
49
49
  price_list?: PriceListRel;
50
50
  sku?: SkuRel;
51
51
  price_tiers?: PriceTierRel[];
@@ -12,11 +12,11 @@ type PromotionRel = ResourceRel & {
12
12
  };
13
13
  interface Promotion extends Resource {
14
14
  readonly type: PromotionType;
15
- name?: string;
15
+ name: string;
16
16
  currency_code?: string;
17
- starts_at?: string;
18
- expires_at?: string;
19
- total_usage_limit?: number;
17
+ starts_at: string;
18
+ expires_at: string;
19
+ total_usage_limit: number;
20
20
  total_usage_count?: number;
21
21
  active?: boolean;
22
22
  market?: Market;
@@ -9,12 +9,12 @@ type RefundRel = ResourceRel & {
9
9
  };
10
10
  interface Refund extends Resource {
11
11
  readonly type: RefundType;
12
- number?: string;
13
- currency_code?: string;
14
- amount_cents?: number;
15
- amount_float?: number;
16
- formatted_amount?: string;
17
- succeeded?: boolean;
12
+ number: string;
13
+ currency_code: string;
14
+ amount_cents: number;
15
+ amount_float: number;
16
+ formatted_amount: string;
17
+ succeeded: boolean;
18
18
  message?: string;
19
19
  error_code?: string;
20
20
  error_detail?: string;
@@ -17,7 +17,7 @@ interface ReturnLineItem extends Resource {
17
17
  sku_code?: string;
18
18
  bundle_code?: string;
19
19
  name?: string;
20
- quantity?: number;
20
+ quantity: number;
21
21
  return_reason?: object;
22
22
  restocked_at?: string;
23
23
  return?: Return;
@@ -30,7 +30,7 @@ interface ReturnLineItemCreate extends ResourceCreate {
30
30
  line_item: LineItemRel;
31
31
  }
32
32
  interface ReturnLineItemUpdate extends ResourceUpdate {
33
- quantity?: number;
33
+ quantity: number;
34
34
  _restock?: boolean;
35
35
  return_reason?: object;
36
36
  }
@@ -11,7 +11,7 @@ type SatispayPaymentRel = ResourceRel & {
11
11
  };
12
12
  interface SatispayGateway extends Resource {
13
13
  readonly type: SatispayGatewayType;
14
- name?: string;
14
+ name: string;
15
15
  webhook_endpoint_url?: string;
16
16
  payment_methods?: PaymentMethod[];
17
17
  satispay_payments?: SatispayPayment[];
@@ -21,7 +21,7 @@ interface SatispayGatewayCreate extends ResourceCreate {
21
21
  satispay_payments?: SatispayPaymentRel[];
22
22
  }
23
23
  interface SatispayGatewayUpdate extends ResourceUpdate {
24
- name?: string;
24
+ name: string;
25
25
  satispay_payments?: SatispayPaymentRel[];
26
26
  }
27
27
  declare class SatispayGateways extends ApiResource<SatispayGateway> {
@@ -12,7 +12,7 @@ type OrderRel = ResourceRel & {
12
12
  interface SatispayPayment extends Resource {
13
13
  readonly type: SatispayPaymentType;
14
14
  token?: string;
15
- key_id?: string;
15
+ key_id: string;
16
16
  payment_id?: string;
17
17
  redirect_url?: string;
18
18
  order?: Order;
@@ -8,7 +8,7 @@ type ShippingCategoryRel = ResourceRel & {
8
8
  };
9
9
  interface ShippingCategory extends Resource {
10
10
  readonly type: ShippingCategoryType;
11
- name?: string;
11
+ name: string;
12
12
  skus?: Sku[];
13
13
  attachments?: Attachment[];
14
14
  }
@@ -16,7 +16,7 @@ interface ShippingCategoryCreate extends ResourceCreate {
16
16
  name: string;
17
17
  }
18
18
  interface ShippingCategoryUpdate extends ResourceUpdate {
19
- name?: string;
19
+ name: string;
20
20
  }
21
21
  declare class ShippingCategories extends ApiResource<ShippingCategory> {
22
22
  static readonly TYPE: ShippingCategoryType;
@@ -8,9 +8,9 @@ type ShippingMethodTierRel = ResourceRel & {
8
8
  };
9
9
  interface ShippingMethodTier extends Resource {
10
10
  readonly type: ShippingMethodTierType;
11
- name?: string;
11
+ name: string;
12
12
  up_to?: number;
13
- price_amount_cents?: number;
13
+ price_amount_cents: number;
14
14
  price_amount_float?: number;
15
15
  formatted_price_amount?: string;
16
16
  shipping_method?: ShippingMethod;
@@ -29,11 +29,11 @@ type ShippingMethodTierRel = ResourceRel & {
29
29
  };
30
30
  interface ShippingMethod extends Resource {
31
31
  readonly type: ShippingMethodType;
32
- name?: string;
32
+ name: string;
33
33
  scheme?: string;
34
34
  currency_code?: string;
35
35
  disabled_at?: string;
36
- price_amount_cents?: number;
36
+ price_amount_cents: number;
37
37
  price_amount_float?: number;
38
38
  formatted_price_amount?: string;
39
39
  free_over_amount_cents?: number;
@@ -70,12 +70,12 @@ interface ShippingMethodCreate extends ResourceCreate {
70
70
  shipping_method_tiers?: ShippingMethodTierRel[];
71
71
  }
72
72
  interface ShippingMethodUpdate extends ResourceUpdate {
73
- name?: string;
73
+ name: string;
74
74
  scheme?: string;
75
75
  currency_code?: string;
76
76
  _disable?: boolean;
77
77
  _enable?: boolean;
78
- price_amount_cents?: number;
78
+ price_amount_cents: number;
79
79
  free_over_amount_cents?: number;
80
80
  min_weight?: number;
81
81
  max_weight?: number;
@@ -11,9 +11,9 @@ type ShippingMethodRel = ResourceRel & {
11
11
  };
12
12
  interface ShippingWeightTier extends Resource {
13
13
  readonly type: ShippingWeightTierType;
14
- name?: string;
14
+ name: string;
15
15
  up_to?: number;
16
- price_amount_cents?: number;
16
+ price_amount_cents: number;
17
17
  price_amount_float?: number;
18
18
  formatted_price_amount?: string;
19
19
  shipping_method?: ShippingMethod;
@@ -26,9 +26,9 @@ interface ShippingWeightTierCreate extends ResourceCreate {
26
26
  shipping_method: ShippingMethodRel;
27
27
  }
28
28
  interface ShippingWeightTierUpdate extends ResourceUpdate {
29
- name?: string;
29
+ name: string;
30
30
  up_to?: number;
31
- price_amount_cents?: number;
31
+ price_amount_cents: number;
32
32
  shipping_method?: ShippingMethodRel;
33
33
  }
34
34
  declare class ShippingWeightTiers extends ApiResource<ShippingWeightTier> {
@@ -7,7 +7,7 @@ type ShippingZoneRel = ResourceRel & {
7
7
  };
8
8
  interface ShippingZone extends Resource {
9
9
  readonly type: ShippingZoneType;
10
- name?: string;
10
+ name: string;
11
11
  country_code_regex?: string;
12
12
  not_country_code_regex?: string;
13
13
  state_code_regex?: string;
@@ -26,7 +26,7 @@ interface ShippingZoneCreate extends ResourceCreate {
26
26
  not_zip_code_regex?: string;
27
27
  }
28
28
  interface ShippingZoneUpdate extends ResourceUpdate {
29
- name?: string;
29
+ name: string;
30
30
  country_code_regex?: string;
31
31
  not_country_code_regex?: string;
32
32
  state_code_regex?: string;
@@ -14,8 +14,8 @@ type CustomerRel = ResourceRel & {
14
14
  };
15
15
  interface SkuList extends Resource {
16
16
  readonly type: SkuListType;
17
- name?: string;
18
- slug?: string;
17
+ name: string;
18
+ slug: string;
19
19
  description?: string;
20
20
  image_url?: string;
21
21
  manual?: boolean;
@@ -35,7 +35,7 @@ interface SkuListCreate extends ResourceCreate {
35
35
  customer?: CustomerRel;
36
36
  }
37
37
  interface SkuListUpdate extends ResourceUpdate {
38
- name?: string;
38
+ name: string;
39
39
  description?: string;
40
40
  image_url?: string;
41
41
  manual?: boolean;
@@ -11,7 +11,7 @@ type MarketRel = ResourceRel & {
11
11
  };
12
12
  interface SkuOption extends Resource {
13
13
  readonly type: SkuOptionType;
14
- name?: string;
14
+ name: string;
15
15
  currency_code?: string;
16
16
  description?: string;
17
17
  price_amount_cents?: number;
@@ -33,7 +33,7 @@ interface SkuOptionCreate extends ResourceCreate {
33
33
  market?: MarketRel;
34
34
  }
35
35
  interface SkuOptionUpdate extends ResourceUpdate {
36
- name?: string;
36
+ name: string;
37
37
  currency_code?: string;
38
38
  description?: string;
39
39
  price_amount_cents?: number;
@@ -15,8 +15,8 @@ type ShippingCategoryRel = ResourceRel & {
15
15
  };
16
16
  interface Sku extends Resource {
17
17
  readonly type: SkuType;
18
- code?: string;
19
- name?: string;
18
+ code: string;
19
+ name: string;
20
20
  description?: string;
21
21
  image_url?: string;
22
22
  pieces_per_pack?: number;
@@ -47,8 +47,8 @@ interface SkuCreate extends ResourceCreate {
47
47
  shipping_category: ShippingCategoryRel;
48
48
  }
49
49
  interface SkuUpdate extends ResourceUpdate {
50
- code?: string;
51
- name?: string;
50
+ code: string;
51
+ name: string;
52
52
  description?: string;
53
53
  image_url?: string;
54
54
  pieces_per_pack?: number;
@@ -16,7 +16,7 @@ type SkuRel = ResourceRel & {
16
16
  interface StockItem extends Resource {
17
17
  readonly type: StockItemType;
18
18
  sku_code?: string;
19
- quantity?: number;
19
+ quantity: number;
20
20
  stock_location?: StockLocation;
21
21
  sku?: Sku;
22
22
  attachments?: Attachment[];
@@ -29,7 +29,7 @@ interface StockItemCreate extends ResourceCreate {
29
29
  }
30
30
  interface StockItemUpdate extends ResourceUpdate {
31
31
  sku_code?: string;
32
- quantity?: number;
32
+ quantity: number;
33
33
  stock_location?: StockLocationRel;
34
34
  sku?: SkuRel;
35
35
  }
@@ -11,7 +11,7 @@ interface StockLineItem extends Resource {
11
11
  readonly type: StockLineItemType;
12
12
  sku_code?: string;
13
13
  bundle_code?: string;
14
- quantity?: number;
14
+ quantity: number;
15
15
  shipment?: Shipment;
16
16
  line_item?: LineItem;
17
17
  stock_item?: StockItem;
@@ -16,7 +16,7 @@ type AddressRel = ResourceRel & {
16
16
  interface StockLocation extends Resource {
17
17
  readonly type: StockLocationType;
18
18
  number?: number;
19
- name?: string;
19
+ name: string;
20
20
  label_format?: string;
21
21
  suppress_etd?: boolean;
22
22
  address?: Address;
@@ -33,7 +33,7 @@ interface StockLocationCreate extends ResourceCreate {
33
33
  address: AddressRel;
34
34
  }
35
35
  interface StockLocationUpdate extends ResourceUpdate {
36
- name?: string;
36
+ name: string;
37
37
  label_format?: string;
38
38
  suppress_etd?: boolean;
39
39
  address?: AddressRel;
@@ -25,7 +25,7 @@ interface StockTransfer extends Resource {
25
25
  readonly type: StockTransferType;
26
26
  sku_code?: string;
27
27
  status?: 'draft' | 'upcoming' | 'picking' | 'in_transit' | 'completed' | 'cancelled';
28
- quantity?: number;
28
+ quantity: number;
29
29
  completed_at?: string;
30
30
  cancelled_at?: string;
31
31
  sku?: Sku;
@@ -8,7 +8,7 @@ type StripeGatewayRel = ResourceRel & {
8
8
  };
9
9
  interface StripeGateway extends Resource {
10
10
  readonly type: StripeGatewayType;
11
- name?: string;
11
+ name: string;
12
12
  auto_payments?: boolean;
13
13
  webhook_endpoint_id?: string;
14
14
  webhook_endpoint_secret?: string;
@@ -23,7 +23,7 @@ interface StripeGatewayCreate extends ResourceCreate {
23
23
  auto_payments?: boolean;
24
24
  }
25
25
  interface StripeGatewayUpdate extends ResourceUpdate {
26
- name?: string;
26
+ name: string;
27
27
  auto_payments?: boolean;
28
28
  }
29
29
  declare class StripeGateways extends ApiResource<StripeGateway> {
@@ -11,12 +11,12 @@ type OrderRel = ResourceRel & {
11
11
  };
12
12
  interface StripePayment extends Resource {
13
13
  readonly type: StripePaymentType;
14
- client_secret?: string;
14
+ client_secret: string;
15
15
  publishable_key?: string;
16
16
  options?: object;
17
17
  payment_method?: object;
18
18
  mismatched_amounts?: boolean;
19
- intent_amount_cents?: number;
19
+ intent_amount_cents: number;
20
20
  intent_amount_float?: number;
21
21
  formatted_intent_amount?: string;
22
22
  payment_instrument?: object;
@@ -8,7 +8,7 @@ type TaxCalculatorRel = ResourceRel & {
8
8
  };
9
9
  interface TaxCalculator extends Resource {
10
10
  readonly type: TaxCalculatorType;
11
- name?: string;
11
+ name: string;
12
12
  markets?: Market[];
13
13
  attachments?: Attachment[];
14
14
  }
@@ -27,7 +27,7 @@ type ExternalTaxCalculatorRel = ResourceRel & {
27
27
  };
28
28
  interface TaxCategory extends Resource {
29
29
  readonly type: TaxCategoryType;
30
- code?: string;
30
+ code: string;
31
31
  sku_code?: string;
32
32
  sku?: Sku;
33
33
  tax_calculator?: AvalaraAccount | TaxjarAccount | ManualTaxCalculator | ExternalTaxCalculator;
@@ -40,7 +40,7 @@ interface TaxCategoryCreate extends ResourceCreate {
40
40
  tax_calculator: AvalaraAccountRel | TaxjarAccountRel | ManualTaxCalculatorRel | ExternalTaxCalculatorRel;
41
41
  }
42
42
  interface TaxCategoryUpdate extends ResourceUpdate {
43
- code?: string;
43
+ code: string;
44
44
  sku_code?: string;
45
45
  sku?: SkuRel;
46
46
  }
@@ -10,7 +10,7 @@ type ManualTaxCalculatorRel = ResourceRel & {
10
10
  };
11
11
  interface TaxRule extends Resource {
12
12
  readonly type: TaxRuleType;
13
- name?: string;
13
+ name: string;
14
14
  tax_rate?: number;
15
15
  country_code_regex?: string;
16
16
  not_country_code_regex?: string;
@@ -41,7 +41,7 @@ interface TaxRuleCreate extends ResourceCreate {
41
41
  manual_tax_calculator: ManualTaxCalculatorRel;
42
42
  }
43
43
  interface TaxRuleUpdate extends ResourceUpdate {
44
- name?: string;
44
+ name: string;
45
45
  tax_rate?: number;
46
46
  country_code_regex?: string;
47
47
  not_country_code_regex?: string;
@@ -12,7 +12,7 @@ type TaxCategoryRel = ResourceRel & {
12
12
  };
13
13
  interface TaxjarAccount extends Resource {
14
14
  readonly type: TaxjarAccountType;
15
- name?: string;
15
+ name: string;
16
16
  markets?: Market[];
17
17
  attachments?: Attachment[];
18
18
  tax_categories?: TaxCategory[];
@@ -23,7 +23,7 @@ interface TaxjarAccountCreate extends ResourceCreate {
23
23
  tax_categories?: TaxCategoryRel[];
24
24
  }
25
25
  interface TaxjarAccountUpdate extends ResourceUpdate {
26
- name?: string;
26
+ name: string;
27
27
  api_key?: string;
28
28
  tax_categories?: TaxCategoryRel[];
29
29
  }
@@ -7,12 +7,12 @@ type TransactionRel = ResourceRel & {
7
7
  };
8
8
  interface Transaction extends Resource {
9
9
  readonly type: TransactionType;
10
- number?: string;
11
- currency_code?: string;
12
- amount_cents?: number;
13
- amount_float?: number;
14
- formatted_amount?: string;
15
- succeeded?: boolean;
10
+ number: string;
11
+ currency_code: string;
12
+ amount_cents: number;
13
+ amount_float: number;
14
+ formatted_amount: string;
15
+ succeeded: boolean;
16
16
  message?: string;
17
17
  error_code?: string;
18
18
  error_detail?: string;
@@ -9,12 +9,12 @@ type VoidRel = ResourceRel & {
9
9
  };
10
10
  interface Void extends Resource {
11
11
  readonly type: VoidType;
12
- number?: string;
13
- currency_code?: string;
14
- amount_cents?: number;
15
- amount_float?: number;
16
- formatted_amount?: string;
17
- succeeded?: boolean;
12
+ number: string;
13
+ currency_code: string;
14
+ amount_cents: number;
15
+ amount_float: number;
16
+ formatted_amount: string;
17
+ succeeded: boolean;
18
18
  message?: string;
19
19
  error_code?: string;
20
20
  error_detail?: string;
@@ -8,12 +8,12 @@ type WebhookRel = ResourceRel & {
8
8
  interface Webhook extends Resource {
9
9
  readonly type: WebhookType;
10
10
  name?: string;
11
- topic?: string;
12
- callback_url?: string;
11
+ topic: string;
12
+ callback_url: string;
13
13
  include_resources?: string[];
14
14
  circuit_state?: string;
15
15
  circuit_failure_count?: number;
16
- shared_secret?: string;
16
+ shared_secret: string;
17
17
  last_event_callbacks?: EventCallback[];
18
18
  }
19
19
  interface WebhookCreate extends ResourceCreate {
@@ -24,8 +24,8 @@ interface WebhookCreate extends ResourceCreate {
24
24
  }
25
25
  interface WebhookUpdate extends ResourceUpdate {
26
26
  name?: string;
27
- topic?: string;
28
- callback_url?: string;
27
+ topic: string;
28
+ callback_url: string;
29
29
  include_resources?: string[];
30
30
  _reset_circuit?: boolean;
31
31
  }
package/lib/esm/client.js CHANGED
@@ -10,7 +10,6 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
10
10
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
11
11
  };
12
12
  var _ApiClient_accessToken, _ApiClient_client;
13
- /* eslint-disable @typescript-eslint/no-explicit-any */
14
13
  import axios from 'axios';
15
14
  import { SdkError, ApiError, ErrorType } from './error';
16
15
  import config from './config';
package/lib/esm/common.js CHANGED
@@ -1,5 +1,3 @@
1
- /* eslint-disable @typescript-eslint/no-explicit-any */
2
- /* eslint-disable @typescript-eslint/explicit-module-boundary-types */
3
1
  import { resourceList } from './api';
4
2
  const isResourceId = (resource) => {
5
3
  return ((resource === null || resource === void 0 ? void 0 : resource.type) && resource.id) && resourceList.includes(resource.type);
package/lib/esm/debug.js CHANGED
@@ -1,6 +1,3 @@
1
- /* eslint-disable @typescript-eslint/no-explicit-any */
2
- /* eslint-disable @typescript-eslint/no-unused-vars */
3
- // import Debug from 'debug'
4
1
  /* Nope debugger */
5
2
  const debuggerFunction = (_pattern, ..._args) => {
6
3
  // console.log(_pattern)
package/lib/esm/error.js CHANGED
@@ -1,4 +1,3 @@
1
- /* eslint-disable @typescript-eslint/no-explicit-any */
2
1
  var ErrorType;
3
2
  (function (ErrorType) {
4
3
  ErrorType["CLIENT"] = "client";