@commercelayer/sdk 5.28.0 → 5.29.0-alfa.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.
Files changed (211) hide show
  1. package/lib/cjs/api.d.ts +3 -2
  2. package/lib/cjs/api.js +5 -2
  3. package/lib/cjs/client.js +5 -5
  4. package/lib/cjs/commercelayer.d.ts +3 -2
  5. package/lib/cjs/commercelayer.js +5 -4
  6. package/lib/cjs/common.js +1 -1
  7. package/lib/cjs/error.js +1 -2
  8. package/lib/cjs/model.d.ts +1 -0
  9. package/lib/cjs/query.d.ts +1 -1
  10. package/lib/cjs/query.js +1 -1
  11. package/lib/cjs/resource.js +22 -25
  12. package/lib/cjs/resources/adjustments.d.ts +3 -0
  13. package/lib/cjs/resources/adyen_gateways.d.ts +2 -2
  14. package/lib/cjs/resources/buy_x_pay_y_promotions.d.ts +4 -14
  15. package/lib/cjs/resources/buy_x_pay_y_promotions.js +4 -4
  16. package/lib/cjs/resources/external_gateways.d.ts +5 -1
  17. package/lib/cjs/resources/external_gateways.js +3 -0
  18. package/lib/cjs/resources/external_promotions.d.ts +8 -14
  19. package/lib/cjs/resources/external_promotions.js +7 -4
  20. package/lib/cjs/resources/external_tax_calculators.d.ts +4 -0
  21. package/lib/cjs/resources/external_tax_calculators.js +3 -0
  22. package/lib/cjs/resources/fixed_amount_promotions.d.ts +4 -14
  23. package/lib/cjs/resources/fixed_amount_promotions.js +4 -4
  24. package/lib/cjs/resources/fixed_price_promotions.d.ts +4 -14
  25. package/lib/cjs/resources/fixed_price_promotions.js +4 -4
  26. package/lib/cjs/resources/free_gift_promotions.d.ts +4 -14
  27. package/lib/cjs/resources/free_gift_promotions.js +4 -4
  28. package/lib/cjs/resources/free_shipping_promotions.d.ts +9 -14
  29. package/lib/cjs/resources/free_shipping_promotions.js +4 -4
  30. package/lib/cjs/resources/gift_cards.d.ts +3 -0
  31. package/lib/cjs/resources/line_items.d.ts +12 -4
  32. package/lib/cjs/resources/line_items.js +3 -0
  33. package/lib/cjs/resources/markets.d.ts +1 -1
  34. package/lib/cjs/resources/order_subscriptions.d.ts +1 -4
  35. package/lib/cjs/resources/orders.d.ts +14 -1
  36. package/lib/cjs/resources/orders.js +10 -0
  37. package/lib/cjs/resources/parcel_line_items.d.ts +0 -8
  38. package/lib/cjs/resources/payment_methods.d.ts +8 -5
  39. package/lib/cjs/resources/percentage_discount_promotions.d.ts +4 -14
  40. package/lib/cjs/resources/percentage_discount_promotions.js +4 -4
  41. package/lib/cjs/resources/promotions.d.ts +3 -3
  42. package/lib/cjs/resources/promotions.js +4 -4
  43. package/lib/cjs/resources/resource_errors.d.ts +22 -0
  44. package/lib/cjs/resources/resource_errors.js +16 -0
  45. package/lib/cjs/resources/shipments.d.ts +0 -4
  46. package/lib/cjs/resources/shipping_methods.d.ts +9 -5
  47. package/lib/cjs/resources/shipping_methods.js +3 -0
  48. package/lib/cjs/resources/stock_transfers.d.ts +1 -1
  49. package/lib/cjs/resources/stripe_payments.d.ts +4 -1
  50. package/lib/cjs/resources/webhooks.d.ts +3 -3
  51. package/lib/cjs/resources/webhooks.js +3 -3
  52. package/lib/esm/api.d.ts +3 -2
  53. package/lib/esm/api.js +2 -0
  54. package/lib/esm/client.js +19 -30
  55. package/lib/esm/commercelayer.d.ts +3 -2
  56. package/lib/esm/commercelayer.js +261 -149
  57. package/lib/esm/common.js +1 -1
  58. package/lib/esm/error.js +10 -5
  59. package/lib/esm/model.d.ts +1 -0
  60. package/lib/esm/query.d.ts +1 -1
  61. package/lib/esm/query.js +1 -1
  62. package/lib/esm/resource.js +37 -50
  63. package/lib/esm/resources/addresses.js +1 -1
  64. package/lib/esm/resources/adjustments.d.ts +3 -0
  65. package/lib/esm/resources/adjustments.js +1 -1
  66. package/lib/esm/resources/adyen_gateways.d.ts +2 -2
  67. package/lib/esm/resources/adyen_gateways.js +1 -1
  68. package/lib/esm/resources/adyen_payments.js +1 -1
  69. package/lib/esm/resources/application.js +1 -1
  70. package/lib/esm/resources/attachments.js +1 -1
  71. package/lib/esm/resources/authorizations.js +1 -1
  72. package/lib/esm/resources/avalara_accounts.js +1 -1
  73. package/lib/esm/resources/axerve_gateways.js +1 -1
  74. package/lib/esm/resources/axerve_payments.js +1 -1
  75. package/lib/esm/resources/billing_info_validation_rules.js +1 -1
  76. package/lib/esm/resources/bing_geocoders.js +1 -1
  77. package/lib/esm/resources/braintree_gateways.js +1 -1
  78. package/lib/esm/resources/braintree_payments.js +1 -1
  79. package/lib/esm/resources/bundles.js +1 -1
  80. package/lib/esm/resources/buy_x_pay_y_promotions.d.ts +4 -14
  81. package/lib/esm/resources/buy_x_pay_y_promotions.js +5 -5
  82. package/lib/esm/resources/captures.js +1 -1
  83. package/lib/esm/resources/carrier_accounts.js +1 -1
  84. package/lib/esm/resources/checkout_com_gateways.js +1 -1
  85. package/lib/esm/resources/checkout_com_payments.js +1 -1
  86. package/lib/esm/resources/cleanups.js +1 -1
  87. package/lib/esm/resources/coupon_codes_promotion_rules.js +1 -1
  88. package/lib/esm/resources/coupon_recipients.js +1 -1
  89. package/lib/esm/resources/coupons.js +1 -1
  90. package/lib/esm/resources/custom_promotion_rules.js +1 -1
  91. package/lib/esm/resources/customer_addresses.js +1 -1
  92. package/lib/esm/resources/customer_groups.js +1 -1
  93. package/lib/esm/resources/customer_password_resets.js +1 -1
  94. package/lib/esm/resources/customer_payment_sources.js +1 -1
  95. package/lib/esm/resources/customer_subscriptions.js +1 -1
  96. package/lib/esm/resources/customers.js +1 -1
  97. package/lib/esm/resources/delivery_lead_times.js +1 -1
  98. package/lib/esm/resources/event_callbacks.js +1 -1
  99. package/lib/esm/resources/events.js +1 -1
  100. package/lib/esm/resources/exports.js +1 -1
  101. package/lib/esm/resources/external_gateways.d.ts +5 -1
  102. package/lib/esm/resources/external_gateways.js +4 -1
  103. package/lib/esm/resources/external_payments.js +1 -1
  104. package/lib/esm/resources/external_promotions.d.ts +8 -14
  105. package/lib/esm/resources/external_promotions.js +8 -5
  106. package/lib/esm/resources/external_tax_calculators.d.ts +4 -0
  107. package/lib/esm/resources/external_tax_calculators.js +4 -1
  108. package/lib/esm/resources/fixed_amount_promotions.d.ts +4 -14
  109. package/lib/esm/resources/fixed_amount_promotions.js +5 -5
  110. package/lib/esm/resources/fixed_price_promotions.d.ts +4 -14
  111. package/lib/esm/resources/fixed_price_promotions.js +5 -5
  112. package/lib/esm/resources/free_gift_promotions.d.ts +4 -14
  113. package/lib/esm/resources/free_gift_promotions.js +5 -5
  114. package/lib/esm/resources/free_shipping_promotions.d.ts +9 -14
  115. package/lib/esm/resources/free_shipping_promotions.js +5 -5
  116. package/lib/esm/resources/geocoders.js +1 -1
  117. package/lib/esm/resources/gift_card_recipients.js +1 -1
  118. package/lib/esm/resources/gift_cards.d.ts +3 -0
  119. package/lib/esm/resources/gift_cards.js +1 -1
  120. package/lib/esm/resources/google_geocoders.js +1 -1
  121. package/lib/esm/resources/imports.js +1 -1
  122. package/lib/esm/resources/in_stock_subscriptions.js +1 -1
  123. package/lib/esm/resources/inventory_models.js +1 -1
  124. package/lib/esm/resources/inventory_return_locations.js +1 -1
  125. package/lib/esm/resources/inventory_stock_locations.js +1 -1
  126. package/lib/esm/resources/klarna_gateways.js +1 -1
  127. package/lib/esm/resources/klarna_payments.js +1 -1
  128. package/lib/esm/resources/line_item_options.js +1 -1
  129. package/lib/esm/resources/line_items.d.ts +12 -4
  130. package/lib/esm/resources/line_items.js +4 -1
  131. package/lib/esm/resources/manual_gateways.js +1 -1
  132. package/lib/esm/resources/manual_tax_calculators.js +1 -1
  133. package/lib/esm/resources/markets.d.ts +1 -1
  134. package/lib/esm/resources/markets.js +1 -1
  135. package/lib/esm/resources/merchants.js +1 -1
  136. package/lib/esm/resources/order_amount_promotion_rules.js +1 -1
  137. package/lib/esm/resources/order_copies.js +1 -1
  138. package/lib/esm/resources/order_factories.js +1 -1
  139. package/lib/esm/resources/order_subscription_items.js +1 -1
  140. package/lib/esm/resources/order_subscriptions.d.ts +1 -4
  141. package/lib/esm/resources/order_subscriptions.js +1 -1
  142. package/lib/esm/resources/order_validation_rules.js +1 -1
  143. package/lib/esm/resources/orders.d.ts +14 -1
  144. package/lib/esm/resources/orders.js +11 -1
  145. package/lib/esm/resources/organization.js +1 -1
  146. package/lib/esm/resources/packages.js +1 -1
  147. package/lib/esm/resources/parcel_line_items.d.ts +0 -8
  148. package/lib/esm/resources/parcel_line_items.js +1 -1
  149. package/lib/esm/resources/parcels.js +1 -1
  150. package/lib/esm/resources/payment_gateways.js +1 -1
  151. package/lib/esm/resources/payment_methods.d.ts +8 -5
  152. package/lib/esm/resources/payment_methods.js +1 -1
  153. package/lib/esm/resources/payment_options.js +1 -1
  154. package/lib/esm/resources/paypal_gateways.js +1 -1
  155. package/lib/esm/resources/paypal_payments.js +1 -1
  156. package/lib/esm/resources/percentage_discount_promotions.d.ts +4 -14
  157. package/lib/esm/resources/percentage_discount_promotions.js +5 -5
  158. package/lib/esm/resources/price_frequency_tiers.js +1 -1
  159. package/lib/esm/resources/price_lists.js +1 -1
  160. package/lib/esm/resources/price_tiers.js +1 -1
  161. package/lib/esm/resources/price_volume_tiers.js +1 -1
  162. package/lib/esm/resources/prices.js +1 -1
  163. package/lib/esm/resources/promotion_rules.js +1 -1
  164. package/lib/esm/resources/promotions.d.ts +3 -3
  165. package/lib/esm/resources/promotions.js +5 -5
  166. package/lib/esm/resources/recurring_order_copies.js +1 -1
  167. package/lib/esm/resources/refunds.js +1 -1
  168. package/lib/esm/resources/reserved_stocks.js +1 -1
  169. package/lib/esm/resources/resource_errors.d.ts +22 -0
  170. package/lib/esm/resources/resource_errors.js +14 -0
  171. package/lib/esm/resources/return_line_items.js +1 -1
  172. package/lib/esm/resources/returns.js +1 -1
  173. package/lib/esm/resources/satispay_gateways.js +1 -1
  174. package/lib/esm/resources/satispay_payments.js +1 -1
  175. package/lib/esm/resources/shipments.d.ts +0 -4
  176. package/lib/esm/resources/shipments.js +1 -1
  177. package/lib/esm/resources/shipping_categories.js +1 -1
  178. package/lib/esm/resources/shipping_method_tiers.js +1 -1
  179. package/lib/esm/resources/shipping_methods.d.ts +9 -5
  180. package/lib/esm/resources/shipping_methods.js +4 -1
  181. package/lib/esm/resources/shipping_weight_tiers.js +1 -1
  182. package/lib/esm/resources/shipping_zones.js +1 -1
  183. package/lib/esm/resources/sku_list_items.js +1 -1
  184. package/lib/esm/resources/sku_list_promotion_rules.js +1 -1
  185. package/lib/esm/resources/sku_lists.js +1 -1
  186. package/lib/esm/resources/sku_options.js +1 -1
  187. package/lib/esm/resources/skus.js +1 -1
  188. package/lib/esm/resources/stock_items.js +1 -1
  189. package/lib/esm/resources/stock_line_items.js +1 -1
  190. package/lib/esm/resources/stock_locations.js +1 -1
  191. package/lib/esm/resources/stock_reservations.js +1 -1
  192. package/lib/esm/resources/stock_transfers.d.ts +1 -1
  193. package/lib/esm/resources/stock_transfers.js +1 -1
  194. package/lib/esm/resources/stripe_gateways.js +1 -1
  195. package/lib/esm/resources/stripe_payments.d.ts +4 -1
  196. package/lib/esm/resources/stripe_payments.js +1 -1
  197. package/lib/esm/resources/subscription_models.js +1 -1
  198. package/lib/esm/resources/tags.js +1 -1
  199. package/lib/esm/resources/tax_calculators.js +1 -1
  200. package/lib/esm/resources/tax_categories.js +1 -1
  201. package/lib/esm/resources/tax_rules.js +1 -1
  202. package/lib/esm/resources/taxjar_accounts.js +1 -1
  203. package/lib/esm/resources/transactions.js +1 -1
  204. package/lib/esm/resources/versions.js +1 -1
  205. package/lib/esm/resources/voids.js +1 -1
  206. package/lib/esm/resources/webhooks.d.ts +3 -3
  207. package/lib/esm/resources/webhooks.js +4 -4
  208. package/lib/esm/resources/wire_transfers.js +1 -1
  209. package/lib/tsconfig.esm.tsbuildinfo +1 -1
  210. package/lib/tsconfig.tsbuildinfo +1 -1
  211. package/package.json +16 -16
@@ -35,6 +35,7 @@ import type { OrderFactory } from './order_factories';
35
35
  import type { OrderCopy } from './order_copies';
36
36
  import type { RecurringOrderCopy } from './recurring_order_copies';
37
37
  import type { Attachment } from './attachments';
38
+ import type { ResourceError } from './resource_errors';
38
39
  import type { Event } from './events';
39
40
  import type { Tag, TagType } from './tags';
40
41
  import type { Version } from './versions';
@@ -91,7 +92,8 @@ interface Order extends Resource {
91
92
  readonly type: OrderType;
92
93
  number?: string | null;
93
94
  autorefresh?: boolean | null;
94
- status: 'draft' | 'pending' | 'placed' | 'editing' | 'approved' | 'cancelled';
95
+ place_async?: boolean | null;
96
+ status: 'draft' | 'pending' | 'placing' | 'placed' | 'editing' | 'approved' | 'cancelled';
95
97
  payment_status: 'unpaid' | 'authorized' | 'partially_authorized' | 'paid' | 'partially_paid' | 'voided' | 'partially_voided' | 'refunded' | 'partially_refunded' | 'free';
96
98
  fulfillment_status: 'unfulfilled' | 'in_progress' | 'fulfilled' | 'not_required';
97
99
  guest?: boolean | null;
@@ -178,6 +180,7 @@ interface Order extends Resource {
178
180
  shipments_count?: number | null;
179
181
  tax_calculations_count?: number | null;
180
182
  validations_count?: number | null;
183
+ errors_count?: number | null;
181
184
  payment_source_details?: Record<string, any> | null;
182
185
  token?: string | null;
183
186
  cart_url?: string | null;
@@ -194,6 +197,8 @@ interface Order extends Resource {
194
197
  archived_at?: string | null;
195
198
  expires_at?: string | null;
196
199
  subscription_created_at?: string | null;
200
+ circuit_state?: string | null;
201
+ circuit_failure_count?: number | null;
197
202
  market?: Market | null;
198
203
  customer?: Customer | null;
199
204
  shipping_address?: Address | null;
@@ -223,6 +228,7 @@ interface Order extends Resource {
223
228
  order_copies?: OrderCopy[] | null;
224
229
  recurring_order_copies?: RecurringOrderCopy[] | null;
225
230
  attachments?: Attachment[] | null;
231
+ resource_errors?: ResourceError[] | null;
226
232
  events?: Event[] | null;
227
233
  tags?: Tag[] | null;
228
234
  versions?: Version[] | null;
@@ -230,6 +236,7 @@ interface Order extends Resource {
230
236
  interface OrderCreate extends ResourceCreate {
231
237
  number?: string | null;
232
238
  autorefresh?: boolean | null;
239
+ place_async?: boolean | null;
233
240
  guest?: boolean | null;
234
241
  customer_email?: string | null;
235
242
  customer_password?: string | null;
@@ -256,6 +263,7 @@ interface OrderCreate extends ResourceCreate {
256
263
  interface OrderUpdate extends ResourceUpdate {
257
264
  number?: string | null;
258
265
  autorefresh?: boolean | null;
266
+ place_async?: boolean | null;
259
267
  guest?: boolean | null;
260
268
  customer_email?: string | null;
261
269
  customer_password?: string | null;
@@ -273,6 +281,7 @@ interface OrderUpdate extends ResourceUpdate {
273
281
  privacy_url?: string | null;
274
282
  _archive?: boolean | null;
275
283
  _unarchive?: boolean | null;
284
+ _pending?: boolean | null;
276
285
  _place?: boolean | null;
277
286
  _cancel?: boolean | null;
278
287
  _approve?: boolean | null;
@@ -298,6 +307,7 @@ interface OrderUpdate extends ResourceUpdate {
298
307
  _create_subscriptions?: boolean | null;
299
308
  _start_editing?: boolean | null;
300
309
  _stop_editing?: boolean | null;
310
+ _reset_circuit?: boolean | null;
301
311
  market?: MarketRel | null;
302
312
  customer?: CustomerRel | null;
303
313
  shipping_address?: AddressRel | null;
@@ -338,11 +348,13 @@ declare class Orders extends ApiResource<Order> {
338
348
  order_copies(orderId: string | Order, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<OrderCopy>>;
339
349
  recurring_order_copies(orderId: string | Order, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<RecurringOrderCopy>>;
340
350
  attachments(orderId: string | Order, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
351
+ resource_errors(orderId: string | Order, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<ResourceError>>;
341
352
  events(orderId: string | Order, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Event>>;
342
353
  tags(orderId: string | Order, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Tag>>;
343
354
  versions(orderId: string | Order, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
344
355
  _archive(id: string | Order, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Order>;
345
356
  _unarchive(id: string | Order, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Order>;
357
+ _pending(id: string | Order, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Order>;
346
358
  _place(id: string | Order, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Order>;
347
359
  _cancel(id: string | Order, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Order>;
348
360
  _approve(id: string | Order, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Order>;
@@ -368,6 +380,7 @@ declare class Orders extends ApiResource<Order> {
368
380
  _create_subscriptions(id: string | Order, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Order>;
369
381
  _start_editing(id: string | Order, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Order>;
370
382
  _stop_editing(id: string | Order, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Order>;
383
+ _reset_circuit(id: string | Order, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Order>;
371
384
  isOrder(resource: any): resource is Order;
372
385
  relationship(id: string | ResourceId | null): OrderRel;
373
386
  type(): OrderType;
@@ -119,6 +119,10 @@ class Orders extends resource_1.ApiResource {
119
119
  const _orderId = orderId.id || orderId;
120
120
  return this.resources.fetch({ type: 'attachments' }, `orders/${_orderId}/attachments`, params, options);
121
121
  }
122
+ async resource_errors(orderId, params, options) {
123
+ const _orderId = orderId.id || orderId;
124
+ return this.resources.fetch({ type: 'resource_errors' }, `orders/${_orderId}/resource_errors`, params, options);
125
+ }
122
126
  async events(orderId, params, options) {
123
127
  const _orderId = orderId.id || orderId;
124
128
  return this.resources.fetch({ type: 'events' }, `orders/${_orderId}/events`, params, options);
@@ -137,6 +141,9 @@ class Orders extends resource_1.ApiResource {
137
141
  async _unarchive(id, params, options) {
138
142
  return this.resources.update({ id: (typeof id === 'string') ? id : id.id, type: Orders.TYPE, _unarchive: true }, params, options);
139
143
  }
144
+ async _pending(id, params, options) {
145
+ return this.resources.update({ id: (typeof id === 'string') ? id : id.id, type: Orders.TYPE, _pending: true }, params, options);
146
+ }
140
147
  async _place(id, params, options) {
141
148
  return this.resources.update({ id: (typeof id === 'string') ? id : id.id, type: Orders.TYPE, _place: true }, params, options);
142
149
  }
@@ -212,6 +219,9 @@ class Orders extends resource_1.ApiResource {
212
219
  async _stop_editing(id, params, options) {
213
220
  return this.resources.update({ id: (typeof id === 'string') ? id : id.id, type: Orders.TYPE, _stop_editing: true }, params, options);
214
221
  }
222
+ async _reset_circuit(id, params, options) {
223
+ return this.resources.update({ id: (typeof id === 'string') ? id : id.id, type: Orders.TYPE, _reset_circuit: true }, params, options);
224
+ }
215
225
  isOrder(resource) {
216
226
  return resource.type && (resource.type === Orders.TYPE);
217
227
  }
@@ -23,20 +23,12 @@ interface ParcelLineItem extends Resource {
23
23
  image_url?: string | null;
24
24
  parcel?: Parcel | null;
25
25
  stock_line_item?: StockLineItem | null;
26
- /**
27
- * @deprecated This field should not be used as it may be removed in the future without notice
28
- */
29
- shipment_line_item?: object;
30
26
  versions?: Version[] | null;
31
27
  }
32
28
  interface ParcelLineItemCreate extends ResourceCreate {
33
29
  quantity: number;
34
30
  parcel: ParcelRel;
35
31
  stock_line_item: StockLineItemRel;
36
- /**
37
- * @deprecated This field should not be used as it may be removed in the future without notice
38
- */
39
- shipment_line_item?: object;
40
32
  }
41
33
  type ParcelLineItemUpdate = ResourceUpdate;
42
34
  declare class ParcelLineItems extends ApiResource<ParcelLineItem> {
@@ -22,14 +22,15 @@ interface PaymentMethod extends Resource {
22
22
  currency_code?: string | null;
23
23
  moto?: boolean | null;
24
24
  require_capture?: boolean | null;
25
+ auto_place?: boolean | null;
25
26
  auto_capture?: boolean | null;
26
- disabled_at?: string | null;
27
27
  price_amount_cents: number;
28
28
  price_amount_float?: number | null;
29
29
  formatted_price_amount?: string | null;
30
30
  auto_capture_max_amount_cents?: number | null;
31
31
  auto_capture_max_amount_float?: number | null;
32
32
  formatted_auto_capture_max_amount?: string | null;
33
+ disabled_at?: string | null;
33
34
  market?: Market | null;
34
35
  payment_gateway?: PaymentGateway | null;
35
36
  attachments?: Attachment[] | null;
@@ -40,11 +41,12 @@ interface PaymentMethodCreate extends ResourceCreate {
40
41
  currency_code?: string | null;
41
42
  moto?: boolean | null;
42
43
  require_capture?: boolean | null;
44
+ auto_place?: boolean | null;
43
45
  auto_capture?: boolean | null;
44
- _disable?: boolean | null;
45
- _enable?: boolean | null;
46
46
  price_amount_cents: number;
47
47
  auto_capture_max_amount_cents?: number | null;
48
+ _disable?: boolean | null;
49
+ _enable?: boolean | null;
48
50
  market?: MarketRel | null;
49
51
  payment_gateway: PaymentGatewayRel;
50
52
  }
@@ -53,11 +55,12 @@ interface PaymentMethodUpdate extends ResourceUpdate {
53
55
  currency_code?: string | null;
54
56
  moto?: boolean | null;
55
57
  require_capture?: boolean | null;
58
+ auto_place?: boolean | null;
56
59
  auto_capture?: boolean | null;
57
- _disable?: boolean | null;
58
- _enable?: boolean | null;
59
60
  price_amount_cents?: number | null;
60
61
  auto_capture_max_amount_cents?: number | null;
62
+ _disable?: boolean | null;
63
+ _enable?: boolean | null;
61
64
  market?: MarketRel | null;
62
65
  payment_gateway?: PaymentGatewayRel | null;
63
66
  }
@@ -2,13 +2,13 @@ import { ApiResource } from '../resource';
2
2
  import type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse } from '../resource';
3
3
  import type { QueryParamsRetrieve, QueryParamsList } from '../query';
4
4
  import type { Market, MarketType } from './markets';
5
- import type { PromotionRule, PromotionRuleType } from './promotion_rules';
5
+ import type { PromotionRule } from './promotion_rules';
6
6
  import type { OrderAmountPromotionRule, OrderAmountPromotionRuleType } from './order_amount_promotion_rules';
7
7
  import type { SkuListPromotionRule, SkuListPromotionRuleType } from './sku_list_promotion_rules';
8
8
  import type { CouponCodesPromotionRule, CouponCodesPromotionRuleType } from './coupon_codes_promotion_rules';
9
9
  import type { CustomPromotionRule, CustomPromotionRuleType } from './custom_promotion_rules';
10
- import type { Coupon, CouponType } from './coupons';
11
10
  import type { SkuList, SkuListType } from './sku_lists';
11
+ import type { Coupon } from './coupons';
12
12
  import type { Attachment } from './attachments';
13
13
  import type { Event } from './events';
14
14
  import type { Tag, TagType } from './tags';
@@ -21,9 +21,6 @@ type PercentageDiscountPromotionRel = ResourceRel & {
21
21
  type MarketRel = ResourceRel & {
22
22
  type: MarketType;
23
23
  };
24
- type PromotionRuleRel = ResourceRel & {
25
- type: PromotionRuleType;
26
- };
27
24
  type OrderAmountPromotionRuleRel = ResourceRel & {
28
25
  type: OrderAmountPromotionRuleType;
29
26
  };
@@ -36,9 +33,6 @@ type CouponCodesPromotionRuleRel = ResourceRel & {
36
33
  type CustomPromotionRuleRel = ResourceRel & {
37
34
  type: CustomPromotionRuleType;
38
35
  };
39
- type CouponRel = ResourceRel & {
40
- type: CouponType;
41
- };
42
36
  type SkuListRel = ResourceRel & {
43
37
  type: SkuListType;
44
38
  };
@@ -64,8 +58,8 @@ interface PercentageDiscountPromotion extends Resource {
64
58
  sku_list_promotion_rule?: SkuListPromotionRule | null;
65
59
  coupon_codes_promotion_rule?: CouponCodesPromotionRule | null;
66
60
  custom_promotion_rule?: CustomPromotionRule | null;
67
- coupons?: Coupon[] | null;
68
61
  sku_list?: SkuList | null;
62
+ coupons?: Coupon[] | null;
69
63
  attachments?: Attachment[] | null;
70
64
  events?: Event[] | null;
71
65
  tags?: Tag[] | null;
@@ -84,12 +78,10 @@ interface PercentageDiscountPromotionCreate extends ResourceCreate {
84
78
  _enable?: boolean | null;
85
79
  percentage: number;
86
80
  market?: MarketRel | null;
87
- promotion_rules?: PromotionRuleRel[] | null;
88
81
  order_amount_promotion_rule?: OrderAmountPromotionRuleRel | null;
89
82
  sku_list_promotion_rule?: SkuListPromotionRuleRel | null;
90
83
  coupon_codes_promotion_rule?: CouponCodesPromotionRuleRel | null;
91
84
  custom_promotion_rule?: CustomPromotionRuleRel | null;
92
- coupons?: CouponRel[] | null;
93
85
  sku_list?: SkuListRel | null;
94
86
  tags?: TagRel[] | null;
95
87
  }
@@ -105,12 +97,10 @@ interface PercentageDiscountPromotionUpdate extends ResourceUpdate {
105
97
  _enable?: boolean | null;
106
98
  percentage?: number | null;
107
99
  market?: MarketRel | null;
108
- promotion_rules?: PromotionRuleRel[] | null;
109
100
  order_amount_promotion_rule?: OrderAmountPromotionRuleRel | null;
110
101
  sku_list_promotion_rule?: SkuListPromotionRuleRel | null;
111
102
  coupon_codes_promotion_rule?: CouponCodesPromotionRuleRel | null;
112
103
  custom_promotion_rule?: CustomPromotionRuleRel | null;
113
- coupons?: CouponRel[] | null;
114
104
  sku_list?: SkuListRel | null;
115
105
  tags?: TagRel[] | null;
116
106
  }
@@ -124,8 +114,8 @@ declare class PercentageDiscountPromotions extends ApiResource<PercentageDiscoun
124
114
  sku_list_promotion_rule(percentageDiscountPromotionId: string | PercentageDiscountPromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<SkuListPromotionRule>;
125
115
  coupon_codes_promotion_rule(percentageDiscountPromotionId: string | PercentageDiscountPromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<CouponCodesPromotionRule>;
126
116
  custom_promotion_rule(percentageDiscountPromotionId: string | PercentageDiscountPromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<CustomPromotionRule>;
127
- coupons(percentageDiscountPromotionId: string | PercentageDiscountPromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Coupon>>;
128
117
  sku_list(percentageDiscountPromotionId: string | PercentageDiscountPromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<SkuList>;
118
+ coupons(percentageDiscountPromotionId: string | PercentageDiscountPromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Coupon>>;
129
119
  attachments(percentageDiscountPromotionId: string | PercentageDiscountPromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
130
120
  events(percentageDiscountPromotionId: string | PercentageDiscountPromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Event>>;
131
121
  tags(percentageDiscountPromotionId: string | PercentageDiscountPromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Tag>>;
@@ -31,14 +31,14 @@ class PercentageDiscountPromotions extends resource_1.ApiResource {
31
31
  const _percentageDiscountPromotionId = percentageDiscountPromotionId.id || percentageDiscountPromotionId;
32
32
  return this.resources.fetch({ type: 'custom_promotion_rules' }, `percentage_discount_promotions/${_percentageDiscountPromotionId}/custom_promotion_rule`, params, options);
33
33
  }
34
- async coupons(percentageDiscountPromotionId, params, options) {
35
- const _percentageDiscountPromotionId = percentageDiscountPromotionId.id || percentageDiscountPromotionId;
36
- return this.resources.fetch({ type: 'coupons' }, `percentage_discount_promotions/${_percentageDiscountPromotionId}/coupons`, params, options);
37
- }
38
34
  async sku_list(percentageDiscountPromotionId, params, options) {
39
35
  const _percentageDiscountPromotionId = percentageDiscountPromotionId.id || percentageDiscountPromotionId;
40
36
  return this.resources.fetch({ type: 'sku_lists' }, `percentage_discount_promotions/${_percentageDiscountPromotionId}/sku_list`, params, options);
41
37
  }
38
+ async coupons(percentageDiscountPromotionId, params, options) {
39
+ const _percentageDiscountPromotionId = percentageDiscountPromotionId.id || percentageDiscountPromotionId;
40
+ return this.resources.fetch({ type: 'coupons' }, `percentage_discount_promotions/${_percentageDiscountPromotionId}/coupons`, params, options);
41
+ }
42
42
  async attachments(percentageDiscountPromotionId, params, options) {
43
43
  const _percentageDiscountPromotionId = percentageDiscountPromotionId.id || percentageDiscountPromotionId;
44
44
  return this.resources.fetch({ type: 'attachments' }, `percentage_discount_promotions/${_percentageDiscountPromotionId}/attachments`, params, options);
@@ -7,8 +7,8 @@ import type { OrderAmountPromotionRule } from './order_amount_promotion_rules';
7
7
  import type { SkuListPromotionRule } from './sku_list_promotion_rules';
8
8
  import type { CouponCodesPromotionRule } from './coupon_codes_promotion_rules';
9
9
  import type { CustomPromotionRule } from './custom_promotion_rules';
10
- import type { Coupon } from './coupons';
11
10
  import type { SkuList } from './sku_lists';
11
+ import type { Coupon } from './coupons';
12
12
  import type { Attachment } from './attachments';
13
13
  import type { Event } from './events';
14
14
  import type { Tag } from './tags';
@@ -35,8 +35,8 @@ interface Promotion extends Resource {
35
35
  sku_list_promotion_rule?: SkuListPromotionRule | null;
36
36
  coupon_codes_promotion_rule?: CouponCodesPromotionRule | null;
37
37
  custom_promotion_rule?: CustomPromotionRule | null;
38
- coupons?: Coupon[] | null;
39
38
  sku_list?: SkuList | null;
39
+ coupons?: Coupon[] | null;
40
40
  attachments?: Attachment[] | null;
41
41
  events?: Event[] | null;
42
42
  tags?: Tag[] | null;
@@ -49,8 +49,8 @@ declare class Promotions extends ApiResource<Promotion> {
49
49
  sku_list_promotion_rule(promotionId: string | Promotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<SkuListPromotionRule>;
50
50
  coupon_codes_promotion_rule(promotionId: string | Promotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<CouponCodesPromotionRule>;
51
51
  custom_promotion_rule(promotionId: string | Promotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<CustomPromotionRule>;
52
- coupons(promotionId: string | Promotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Coupon>>;
53
52
  sku_list(promotionId: string | Promotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<SkuList>;
53
+ coupons(promotionId: string | Promotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Coupon>>;
54
54
  attachments(promotionId: string | Promotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
55
55
  events(promotionId: string | Promotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Event>>;
56
56
  tags(promotionId: string | Promotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Tag>>;
@@ -22,14 +22,14 @@ class Promotions extends resource_1.ApiResource {
22
22
  const _promotionId = promotionId.id || promotionId;
23
23
  return this.resources.fetch({ type: 'custom_promotion_rules' }, `promotions/${_promotionId}/custom_promotion_rule`, params, options);
24
24
  }
25
- async coupons(promotionId, params, options) {
26
- const _promotionId = promotionId.id || promotionId;
27
- return this.resources.fetch({ type: 'coupons' }, `promotions/${_promotionId}/coupons`, params, options);
28
- }
29
25
  async sku_list(promotionId, params, options) {
30
26
  const _promotionId = promotionId.id || promotionId;
31
27
  return this.resources.fetch({ type: 'sku_lists' }, `promotions/${_promotionId}/sku_list`, params, options);
32
28
  }
29
+ async coupons(promotionId, params, options) {
30
+ const _promotionId = promotionId.id || promotionId;
31
+ return this.resources.fetch({ type: 'coupons' }, `promotions/${_promotionId}/coupons`, params, options);
32
+ }
33
33
  async attachments(promotionId, params, options) {
34
34
  const _promotionId = promotionId.id || promotionId;
35
35
  return this.resources.fetch({ type: 'attachments' }, `promotions/${_promotionId}/attachments`, params, options);
@@ -0,0 +1,22 @@
1
+ import { ApiResource } from '../resource';
2
+ import type { Resource, ResourceId, ResourceRel } from '../resource';
3
+ import type { Order } from './orders';
4
+ type ResourceErrorType = 'resource_errors';
5
+ type ResourceErrorRel = ResourceRel & {
6
+ type: ResourceErrorType;
7
+ };
8
+ interface ResourceError extends Resource {
9
+ readonly type: ResourceErrorType;
10
+ name: string;
11
+ code: string;
12
+ message: string;
13
+ resource?: Order | null;
14
+ }
15
+ declare class ResourceErrors extends ApiResource<ResourceError> {
16
+ static readonly TYPE: ResourceErrorType;
17
+ isResourceError(resource: any): resource is ResourceError;
18
+ relationship(id: string | ResourceId | null): ResourceErrorRel;
19
+ type(): ResourceErrorType;
20
+ }
21
+ export default ResourceErrors;
22
+ export type { ResourceError, ResourceErrorType };
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const resource_1 = require("../resource");
4
+ class ResourceErrors extends resource_1.ApiResource {
5
+ isResourceError(resource) {
6
+ return resource.type && (resource.type === ResourceErrors.TYPE);
7
+ }
8
+ relationship(id) {
9
+ return ((id === null) || (typeof id === 'string')) ? { id, type: ResourceErrors.TYPE } : { id: id.id, type: ResourceErrors.TYPE };
10
+ }
11
+ type() {
12
+ return ResourceErrors.TYPE;
13
+ }
14
+ }
15
+ ResourceErrors.TYPE = 'resource_errors';
16
+ exports.default = ResourceErrors;
@@ -70,10 +70,6 @@ interface Shipment extends Resource {
70
70
  shipping_address?: Address | null;
71
71
  shipping_method?: ShippingMethod | null;
72
72
  delivery_lead_time?: DeliveryLeadTime | null;
73
- /**
74
- * @deprecated This field should not be used as it may be removed in the future without notice
75
- */
76
- shipment_line_items?: object[];
77
73
  stock_line_items?: StockLineItem[] | null;
78
74
  stock_transfers?: StockTransfer[] | null;
79
75
  available_shipping_methods?: ShippingMethod[] | null;
@@ -35,7 +35,6 @@ interface ShippingMethod extends Resource {
35
35
  scheme?: string | null;
36
36
  currency_code?: string | null;
37
37
  external_prices_url?: string | null;
38
- disabled_at?: string | null;
39
38
  price_amount_cents: number;
40
39
  price_amount_float?: number | null;
41
40
  formatted_price_amount?: string | null;
@@ -49,6 +48,9 @@ interface ShippingMethod extends Resource {
49
48
  min_weight?: number | null;
50
49
  max_weight?: number | null;
51
50
  unit_of_weight?: string | null;
51
+ disabled_at?: string | null;
52
+ circuit_state?: string | null;
53
+ circuit_failure_count?: number | null;
52
54
  market?: Market | null;
53
55
  shipping_zone?: ShippingZone | null;
54
56
  shipping_category?: ShippingCategory | null;
@@ -64,14 +66,14 @@ interface ShippingMethodCreate extends ResourceCreate {
64
66
  scheme?: string | null;
65
67
  currency_code?: string | null;
66
68
  external_prices_url?: string | null;
67
- _disable?: boolean | null;
68
- _enable?: boolean | null;
69
69
  price_amount_cents: number;
70
70
  free_over_amount_cents?: number | null;
71
71
  use_subtotal?: boolean | null;
72
72
  min_weight?: number | null;
73
73
  max_weight?: number | null;
74
74
  unit_of_weight?: string | null;
75
+ _disable?: boolean | null;
76
+ _enable?: boolean | null;
75
77
  market?: MarketRel | null;
76
78
  shipping_zone?: ShippingZoneRel | null;
77
79
  shipping_category?: ShippingCategoryRel | null;
@@ -83,14 +85,15 @@ interface ShippingMethodUpdate extends ResourceUpdate {
83
85
  scheme?: string | null;
84
86
  currency_code?: string | null;
85
87
  external_prices_url?: string | null;
86
- _disable?: boolean | null;
87
- _enable?: boolean | null;
88
88
  price_amount_cents?: number | null;
89
89
  free_over_amount_cents?: number | null;
90
90
  use_subtotal?: boolean | null;
91
91
  min_weight?: number | null;
92
92
  max_weight?: number | null;
93
93
  unit_of_weight?: string | null;
94
+ _disable?: boolean | null;
95
+ _enable?: boolean | null;
96
+ _reset_circuit?: boolean | null;
94
97
  market?: MarketRel | null;
95
98
  shipping_zone?: ShippingZoneRel | null;
96
99
  shipping_category?: ShippingCategoryRel | null;
@@ -113,6 +116,7 @@ declare class ShippingMethods extends ApiResource<ShippingMethod> {
113
116
  versions(shippingMethodId: string | ShippingMethod, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
114
117
  _disable(id: string | ShippingMethod, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<ShippingMethod>;
115
118
  _enable(id: string | ShippingMethod, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<ShippingMethod>;
119
+ _reset_circuit(id: string | ShippingMethod, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<ShippingMethod>;
116
120
  isShippingMethod(resource: any): resource is ShippingMethod;
117
121
  relationship(id: string | ResourceId | null): ShippingMethodRel;
118
122
  type(): ShippingMethodType;
@@ -53,6 +53,9 @@ class ShippingMethods extends resource_1.ApiResource {
53
53
  async _enable(id, params, options) {
54
54
  return this.resources.update({ id: (typeof id === 'string') ? id : id.id, type: ShippingMethods.TYPE, _enable: true }, params, options);
55
55
  }
56
+ async _reset_circuit(id, params, options) {
57
+ return this.resources.update({ id: (typeof id === 'string') ? id : id.id, type: ShippingMethods.TYPE, _reset_circuit: true }, params, options);
58
+ }
56
59
  isShippingMethod(resource) {
57
60
  return resource.type && (resource.type === ShippingMethods.TYPE);
58
61
  }
@@ -25,7 +25,7 @@ type LineItemRel = ResourceRel & {
25
25
  };
26
26
  interface StockTransfer extends Resource {
27
27
  readonly type: StockTransferType;
28
- number?: number | null;
28
+ number?: string | null;
29
29
  sku_code?: string | null;
30
30
  status: 'draft' | 'upcoming' | 'on_hold' | 'picking' | 'in_transit' | 'completed' | 'cancelled';
31
31
  quantity: number;
@@ -13,7 +13,8 @@ type OrderRel = ResourceRel & {
13
13
  };
14
14
  interface StripePayment extends Resource {
15
15
  readonly type: StripePaymentType;
16
- client_secret: string;
16
+ stripe_id?: string | null;
17
+ client_secret?: string | null;
17
18
  publishable_key?: string | null;
18
19
  options?: Record<string, any> | null;
19
20
  payment_method?: Record<string, any> | null;
@@ -29,6 +30,8 @@ interface StripePayment extends Resource {
29
30
  versions?: Version[] | null;
30
31
  }
31
32
  interface StripePaymentCreate extends ResourceCreate {
33
+ stripe_id?: string | null;
34
+ client_secret?: string | null;
32
35
  options?: Record<string, any> | null;
33
36
  return_url?: string | null;
34
37
  receipt_email?: string | null;
@@ -13,10 +13,10 @@ interface Webhook extends Resource {
13
13
  topic: string;
14
14
  callback_url: string;
15
15
  include_resources?: string[] | null;
16
+ disabled_at?: string | null;
16
17
  circuit_state?: string | null;
17
18
  circuit_failure_count?: number | null;
18
19
  shared_secret: string;
19
- disabled_at?: string | null;
20
20
  last_event_callbacks?: EventCallback[] | null;
21
21
  versions?: Version[] | null;
22
22
  }
@@ -33,9 +33,9 @@ interface WebhookUpdate extends ResourceUpdate {
33
33
  topic?: string | null;
34
34
  callback_url?: string | null;
35
35
  include_resources?: string[] | null;
36
- _reset_circuit?: boolean | null;
37
36
  _disable?: boolean | null;
38
37
  _enable?: boolean | null;
38
+ _reset_circuit?: boolean | null;
39
39
  }
40
40
  declare class Webhooks extends ApiResource<Webhook> {
41
41
  static readonly TYPE: WebhookType;
@@ -44,9 +44,9 @@ declare class Webhooks extends ApiResource<Webhook> {
44
44
  delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void>;
45
45
  last_event_callbacks(webhookId: string | Webhook, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<EventCallback>>;
46
46
  versions(webhookId: string | Webhook, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
47
- _reset_circuit(id: string | Webhook, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Webhook>;
48
47
  _disable(id: string | Webhook, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Webhook>;
49
48
  _enable(id: string | Webhook, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Webhook>;
49
+ _reset_circuit(id: string | Webhook, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Webhook>;
50
50
  isWebhook(resource: any): resource is Webhook;
51
51
  relationship(id: string | ResourceId | null): WebhookRel;
52
52
  type(): WebhookType;
@@ -19,15 +19,15 @@ class Webhooks extends resource_1.ApiResource {
19
19
  const _webhookId = webhookId.id || webhookId;
20
20
  return this.resources.fetch({ type: 'versions' }, `webhooks/${_webhookId}/versions`, params, options);
21
21
  }
22
- async _reset_circuit(id, params, options) {
23
- return this.resources.update({ id: (typeof id === 'string') ? id : id.id, type: Webhooks.TYPE, _reset_circuit: true }, params, options);
24
- }
25
22
  async _disable(id, params, options) {
26
23
  return this.resources.update({ id: (typeof id === 'string') ? id : id.id, type: Webhooks.TYPE, _disable: true }, params, options);
27
24
  }
28
25
  async _enable(id, params, options) {
29
26
  return this.resources.update({ id: (typeof id === 'string') ? id : id.id, type: Webhooks.TYPE, _enable: true }, params, options);
30
27
  }
28
+ async _reset_circuit(id, params, options) {
29
+ return this.resources.update({ id: (typeof id === 'string') ? id : id.id, type: Webhooks.TYPE, _reset_circuit: true }, params, options);
30
+ }
31
31
  isWebhook(resource) {
32
32
  return resource.type && (resource.type === Webhooks.TYPE);
33
33
  }
package/lib/esm/api.d.ts CHANGED
@@ -91,6 +91,7 @@ export { default as Promotions } from './resources/promotions';
91
91
  export { default as RecurringOrderCopies } from './resources/recurring_order_copies';
92
92
  export { default as Refunds } from './resources/refunds';
93
93
  export { default as ReservedStocks } from './resources/reserved_stocks';
94
+ export { default as ResourceErrors } from './resources/resource_errors';
94
95
  export { default as ReturnLineItems } from './resources/return_line_items';
95
96
  export { default as Returns } from './resources/returns';
96
97
  export { default as SatispayGateways } from './resources/satispay_gateways';
@@ -124,8 +125,8 @@ export { default as Versions } from './resources/versions';
124
125
  export { default as Voids } from './resources/voids';
125
126
  export { default as Webhooks } from './resources/webhooks';
126
127
  export { default as WireTransfers } from './resources/wire_transfers';
127
- export type ResourceTypeLock = 'addresses' | 'adjustments' | 'adyen_gateways' | 'adyen_payments' | 'application' | 'attachments' | 'authorizations' | 'avalara_accounts' | 'axerve_gateways' | 'axerve_payments' | 'billing_info_validation_rules' | 'bing_geocoders' | 'braintree_gateways' | 'braintree_payments' | 'bundles' | 'buy_x_pay_y_promotions' | 'captures' | 'carrier_accounts' | 'checkout_com_gateways' | 'checkout_com_payments' | 'cleanups' | 'coupon_codes_promotion_rules' | 'coupon_recipients' | 'coupons' | 'custom_promotion_rules' | 'customer_addresses' | 'customer_groups' | 'customer_password_resets' | 'customer_payment_sources' | 'customer_subscriptions' | 'customers' | 'delivery_lead_times' | 'event_callbacks' | 'events' | 'exports' | 'external_gateways' | 'external_payments' | 'external_promotions' | 'external_tax_calculators' | 'fixed_amount_promotions' | 'fixed_price_promotions' | 'free_gift_promotions' | 'free_shipping_promotions' | 'geocoders' | 'gift_card_recipients' | 'gift_cards' | 'google_geocoders' | 'imports' | 'in_stock_subscriptions' | 'inventory_models' | 'inventory_return_locations' | 'inventory_stock_locations' | 'klarna_gateways' | 'klarna_payments' | 'line_item_options' | 'line_items' | 'manual_gateways' | 'manual_tax_calculators' | 'markets' | 'merchants' | 'order_amount_promotion_rules' | 'order_copies' | 'order_factories' | 'order_subscription_items' | 'order_subscriptions' | 'order_validation_rules' | 'orders' | 'organization' | 'packages' | 'parcel_line_items' | 'parcels' | 'payment_gateways' | 'payment_methods' | 'payment_options' | 'paypal_gateways' | 'paypal_payments' | 'percentage_discount_promotions' | 'price_frequency_tiers' | 'price_lists' | 'price_tiers' | 'price_volume_tiers' | 'prices' | 'promotion_rules' | 'promotions' | 'recurring_order_copies' | 'refunds' | 'reserved_stocks' | 'return_line_items' | 'returns' | 'satispay_gateways' | 'satispay_payments' | 'shipments' | 'shipping_categories' | 'shipping_method_tiers' | 'shipping_methods' | 'shipping_weight_tiers' | 'shipping_zones' | 'sku_list_items' | 'sku_list_promotion_rules' | 'sku_lists' | 'sku_options' | 'skus' | 'stock_items' | 'stock_line_items' | 'stock_locations' | 'stock_reservations' | 'stock_transfers' | 'stripe_gateways' | 'stripe_payments' | 'subscription_models' | 'tags' | 'tax_calculators' | 'tax_categories' | 'tax_rules' | 'taxjar_accounts' | 'transactions' | 'versions' | 'voids' | 'webhooks' | 'wire_transfers';
128
- export declare const resourceList: readonly ["addresses", "adjustments", "adyen_gateways", "adyen_payments", "application", "attachments", "authorizations", "avalara_accounts", "axerve_gateways", "axerve_payments", "billing_info_validation_rules", "bing_geocoders", "braintree_gateways", "braintree_payments", "bundles", "buy_x_pay_y_promotions", "captures", "carrier_accounts", "checkout_com_gateways", "checkout_com_payments", "cleanups", "coupon_codes_promotion_rules", "coupon_recipients", "coupons", "custom_promotion_rules", "customer_addresses", "customer_groups", "customer_password_resets", "customer_payment_sources", "customer_subscriptions", "customers", "delivery_lead_times", "event_callbacks", "events", "exports", "external_gateways", "external_payments", "external_promotions", "external_tax_calculators", "fixed_amount_promotions", "fixed_price_promotions", "free_gift_promotions", "free_shipping_promotions", "geocoders", "gift_card_recipients", "gift_cards", "google_geocoders", "imports", "in_stock_subscriptions", "inventory_models", "inventory_return_locations", "inventory_stock_locations", "klarna_gateways", "klarna_payments", "line_item_options", "line_items", "manual_gateways", "manual_tax_calculators", "markets", "merchants", "order_amount_promotion_rules", "order_copies", "order_factories", "order_subscription_items", "order_subscriptions", "order_validation_rules", "orders", "organization", "packages", "parcel_line_items", "parcels", "payment_gateways", "payment_methods", "payment_options", "paypal_gateways", "paypal_payments", "percentage_discount_promotions", "price_frequency_tiers", "price_lists", "price_tiers", "price_volume_tiers", "prices", "promotion_rules", "promotions", "recurring_order_copies", "refunds", "reserved_stocks", "return_line_items", "returns", "satispay_gateways", "satispay_payments", "shipments", "shipping_categories", "shipping_method_tiers", "shipping_methods", "shipping_weight_tiers", "shipping_zones", "sku_list_items", "sku_list_promotion_rules", "sku_lists", "sku_options", "skus", "stock_items", "stock_line_items", "stock_locations", "stock_reservations", "stock_transfers", "stripe_gateways", "stripe_payments", "subscription_models", "tags", "tax_calculators", "tax_categories", "tax_rules", "taxjar_accounts", "transactions", "versions", "voids", "webhooks", "wire_transfers"];
128
+ export type ResourceTypeLock = 'addresses' | 'adjustments' | 'adyen_gateways' | 'adyen_payments' | 'application' | 'attachments' | 'authorizations' | 'avalara_accounts' | 'axerve_gateways' | 'axerve_payments' | 'billing_info_validation_rules' | 'bing_geocoders' | 'braintree_gateways' | 'braintree_payments' | 'bundles' | 'buy_x_pay_y_promotions' | 'captures' | 'carrier_accounts' | 'checkout_com_gateways' | 'checkout_com_payments' | 'cleanups' | 'coupon_codes_promotion_rules' | 'coupon_recipients' | 'coupons' | 'custom_promotion_rules' | 'customer_addresses' | 'customer_groups' | 'customer_password_resets' | 'customer_payment_sources' | 'customer_subscriptions' | 'customers' | 'delivery_lead_times' | 'event_callbacks' | 'events' | 'exports' | 'external_gateways' | 'external_payments' | 'external_promotions' | 'external_tax_calculators' | 'fixed_amount_promotions' | 'fixed_price_promotions' | 'free_gift_promotions' | 'free_shipping_promotions' | 'geocoders' | 'gift_card_recipients' | 'gift_cards' | 'google_geocoders' | 'imports' | 'in_stock_subscriptions' | 'inventory_models' | 'inventory_return_locations' | 'inventory_stock_locations' | 'klarna_gateways' | 'klarna_payments' | 'line_item_options' | 'line_items' | 'manual_gateways' | 'manual_tax_calculators' | 'markets' | 'merchants' | 'order_amount_promotion_rules' | 'order_copies' | 'order_factories' | 'order_subscription_items' | 'order_subscriptions' | 'order_validation_rules' | 'orders' | 'organization' | 'packages' | 'parcel_line_items' | 'parcels' | 'payment_gateways' | 'payment_methods' | 'payment_options' | 'paypal_gateways' | 'paypal_payments' | 'percentage_discount_promotions' | 'price_frequency_tiers' | 'price_lists' | 'price_tiers' | 'price_volume_tiers' | 'prices' | 'promotion_rules' | 'promotions' | 'recurring_order_copies' | 'refunds' | 'reserved_stocks' | 'resource_errors' | 'return_line_items' | 'returns' | 'satispay_gateways' | 'satispay_payments' | 'shipments' | 'shipping_categories' | 'shipping_method_tiers' | 'shipping_methods' | 'shipping_weight_tiers' | 'shipping_zones' | 'sku_list_items' | 'sku_list_promotion_rules' | 'sku_lists' | 'sku_options' | 'skus' | 'stock_items' | 'stock_line_items' | 'stock_locations' | 'stock_reservations' | 'stock_transfers' | 'stripe_gateways' | 'stripe_payments' | 'subscription_models' | 'tags' | 'tax_calculators' | 'tax_categories' | 'tax_rules' | 'taxjar_accounts' | 'transactions' | 'versions' | 'voids' | 'webhooks' | 'wire_transfers';
129
+ export declare const resourceList: readonly ["addresses", "adjustments", "adyen_gateways", "adyen_payments", "application", "attachments", "authorizations", "avalara_accounts", "axerve_gateways", "axerve_payments", "billing_info_validation_rules", "bing_geocoders", "braintree_gateways", "braintree_payments", "bundles", "buy_x_pay_y_promotions", "captures", "carrier_accounts", "checkout_com_gateways", "checkout_com_payments", "cleanups", "coupon_codes_promotion_rules", "coupon_recipients", "coupons", "custom_promotion_rules", "customer_addresses", "customer_groups", "customer_password_resets", "customer_payment_sources", "customer_subscriptions", "customers", "delivery_lead_times", "event_callbacks", "events", "exports", "external_gateways", "external_payments", "external_promotions", "external_tax_calculators", "fixed_amount_promotions", "fixed_price_promotions", "free_gift_promotions", "free_shipping_promotions", "geocoders", "gift_card_recipients", "gift_cards", "google_geocoders", "imports", "in_stock_subscriptions", "inventory_models", "inventory_return_locations", "inventory_stock_locations", "klarna_gateways", "klarna_payments", "line_item_options", "line_items", "manual_gateways", "manual_tax_calculators", "markets", "merchants", "order_amount_promotion_rules", "order_copies", "order_factories", "order_subscription_items", "order_subscriptions", "order_validation_rules", "orders", "organization", "packages", "parcel_line_items", "parcels", "payment_gateways", "payment_methods", "payment_options", "paypal_gateways", "paypal_payments", "percentage_discount_promotions", "price_frequency_tiers", "price_lists", "price_tiers", "price_volume_tiers", "prices", "promotion_rules", "promotions", "recurring_order_copies", "refunds", "reserved_stocks", "resource_errors", "return_line_items", "returns", "satispay_gateways", "satispay_payments", "shipments", "shipping_categories", "shipping_method_tiers", "shipping_methods", "shipping_weight_tiers", "shipping_zones", "sku_list_items", "sku_list_promotion_rules", "sku_lists", "sku_options", "skus", "stock_items", "stock_line_items", "stock_locations", "stock_reservations", "stock_transfers", "stripe_gateways", "stripe_payments", "subscription_models", "tags", "tax_calculators", "tax_categories", "tax_rules", "taxjar_accounts", "transactions", "versions", "voids", "webhooks", "wire_transfers"];
129
130
  export declare const singletonList: readonly ["application", "organization"];
130
131
  export type RetrievableResourceType = ResourceTypeLock;
131
132
  export type RetrievableResource = Resource & {
package/lib/esm/api.js CHANGED
@@ -90,6 +90,7 @@ export { default as Promotions } from './resources/promotions';
90
90
  export { default as RecurringOrderCopies } from './resources/recurring_order_copies';
91
91
  export { default as Refunds } from './resources/refunds';
92
92
  export { default as ReservedStocks } from './resources/reserved_stocks';
93
+ export { default as ResourceErrors } from './resources/resource_errors';
93
94
  export { default as ReturnLineItems } from './resources/return_line_items';
94
95
  export { default as Returns } from './resources/returns';
95
96
  export { default as SatispayGateways } from './resources/satispay_gateways';
@@ -213,6 +214,7 @@ export const resourceList = [
213
214
  'recurring_order_copies',
214
215
  'refunds',
215
216
  'reserved_stocks',
217
+ 'resource_errors',
216
218
  'return_line_items',
217
219
  'returns',
218
220
  'satispay_gateways',