@commercelayer/sdk 4.7.5 → 4.7.6

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 (225) hide show
  1. package/lib/cjs/api.d.ts +1 -103
  2. package/lib/cjs/client.d.ts +1 -31
  3. package/lib/cjs/commercelayer.d.ts +1 -122
  4. package/lib/cjs/common.d.ts +1 -4
  5. package/lib/cjs/config.d.ts +1 -11
  6. package/lib/cjs/debug.d.ts +1 -3
  7. package/lib/cjs/error.d.ts +1 -26
  8. package/lib/cjs/index.d.ts +1 -7
  9. package/lib/cjs/interceptor.d.ts +1 -19
  10. package/lib/cjs/jsonapi.d.ts +1 -5
  11. package/lib/cjs/model.d.ts +1 -101
  12. package/lib/cjs/query.d.ts +1 -23
  13. package/lib/cjs/resource.d.ts +1 -76
  14. package/lib/cjs/resources/addresses.d.ts +1 -88
  15. package/lib/cjs/resources/adjustments.d.ts +1 -35
  16. package/lib/cjs/resources/adyen_gateways.d.ts +1 -47
  17. package/lib/cjs/resources/adyen_payments.d.ts +1 -44
  18. package/lib/cjs/resources/application.d.ts +1 -21
  19. package/lib/cjs/resources/attachments.d.ts +1 -156
  20. package/lib/cjs/resources/authorizations.d.ts +1 -57
  21. package/lib/cjs/resources/avalara_accounts.d.ts +1 -52
  22. package/lib/cjs/resources/billing_info_validation_rules.d.ts +1 -32
  23. package/lib/cjs/resources/bing_geocoders.d.ts +1 -35
  24. package/lib/cjs/resources/braintree_gateways.d.ts +1 -56
  25. package/lib/cjs/resources/braintree_payments.d.ts +1 -47
  26. package/lib/cjs/resources/bundles.d.ts +1 -74
  27. package/lib/cjs/resources/captures.d.ts +1 -48
  28. package/lib/cjs/resources/carrier_accounts.d.ts +1 -26
  29. package/lib/cjs/resources/checkout_com_gateways.d.ts +1 -45
  30. package/lib/cjs/resources/checkout_com_payments.d.ts +1 -51
  31. package/lib/cjs/resources/coupon_codes_promotion_rules.d.ts +1 -59
  32. package/lib/cjs/resources/coupon_recipients.d.ts +1 -44
  33. package/lib/cjs/resources/coupons.d.ts +1 -45
  34. package/lib/cjs/resources/customer_addresses.d.ts +1 -41
  35. package/lib/cjs/resources/customer_groups.d.ts +1 -36
  36. package/lib/cjs/resources/customer_password_resets.d.ts +1 -33
  37. package/lib/cjs/resources/customer_payment_sources.d.ts +1 -70
  38. package/lib/cjs/resources/customer_subscriptions.d.ts +1 -28
  39. package/lib/cjs/resources/customers.d.ts +1 -60
  40. package/lib/cjs/resources/delivery_lead_times.d.ts +1 -51
  41. package/lib/cjs/resources/event_callbacks.d.ts +1 -24
  42. package/lib/cjs/resources/external_gateways.d.ts +1 -49
  43. package/lib/cjs/resources/external_payments.d.ts +1 -43
  44. package/lib/cjs/resources/external_promotions.d.ts +1 -86
  45. package/lib/cjs/resources/external_tax_calculators.d.ts +1 -44
  46. package/lib/cjs/resources/fixed_amount_promotions.d.ts +1 -88
  47. package/lib/cjs/resources/fixed_price_promotions.d.ts +1 -99
  48. package/lib/cjs/resources/free_gift_promotions.d.ts +1 -97
  49. package/lib/cjs/resources/free_shipping_promotions.d.ts +1 -83
  50. package/lib/cjs/resources/geocoders.d.ts +1 -24
  51. package/lib/cjs/resources/gift_card_recipients.d.ts +1 -44
  52. package/lib/cjs/resources/gift_cards.d.ts +1 -82
  53. package/lib/cjs/resources/google_geocoders.d.ts +1 -35
  54. package/lib/cjs/resources/imports.d.ts +1 -40
  55. package/lib/cjs/resources/in_stock_subscriptions.d.ts +1 -59
  56. package/lib/cjs/resources/inventory_models.d.ts +1 -42
  57. package/lib/cjs/resources/inventory_return_locations.d.ts +1 -43
  58. package/lib/cjs/resources/inventory_stock_locations.d.ts +1 -46
  59. package/lib/cjs/resources/klarna_gateways.d.ts +1 -44
  60. package/lib/cjs/resources/klarna_payments.d.ts +1 -41
  61. package/lib/cjs/resources/line_item_options.d.ts +1 -57
  62. package/lib/cjs/resources/line_items.d.ts +1 -125
  63. package/lib/cjs/resources/manual_gateways.d.ts +1 -33
  64. package/lib/cjs/resources/manual_tax_calculators.d.ts +1 -49
  65. package/lib/cjs/resources/markets.d.ts +1 -81
  66. package/lib/cjs/resources/merchants.d.ts +1 -38
  67. package/lib/cjs/resources/order_amount_promotion_rules.d.ts +1 -56
  68. package/lib/cjs/resources/order_copies.d.ts +1 -45
  69. package/lib/cjs/resources/order_subscriptions.d.ts +1 -67
  70. package/lib/cjs/resources/order_validation_rules.d.ts +1 -20
  71. package/lib/cjs/resources/orders.d.ts +1 -271
  72. package/lib/cjs/resources/organization.d.ts +1 -32
  73. package/lib/cjs/resources/packages.d.ts +1 -56
  74. package/lib/cjs/resources/parcel_line_items.d.ts +1 -49
  75. package/lib/cjs/resources/parcels.d.ts +1 -108
  76. package/lib/cjs/resources/payment_gateways.d.ts +1 -21
  77. package/lib/cjs/resources/payment_methods.d.ts +1 -59
  78. package/lib/cjs/resources/paypal_gateways.d.ts +1 -39
  79. package/lib/cjs/resources/paypal_payments.d.ts +1 -49
  80. package/lib/cjs/resources/percentage_discount_promotions.d.ts +1 -97
  81. package/lib/cjs/resources/price_lists.d.ts +1 -39
  82. package/lib/cjs/resources/prices.d.ts +1 -57
  83. package/lib/cjs/resources/promotion_rules.d.ts +1 -24
  84. package/lib/cjs/resources/promotions.d.ts +1 -41
  85. package/lib/cjs/resources/refunds.d.ts +1 -34
  86. package/lib/cjs/resources/return_line_items.d.ts +1 -49
  87. package/lib/cjs/resources/returns.d.ts +1 -72
  88. package/lib/cjs/resources/shipments.d.ts +1 -89
  89. package/lib/cjs/resources/shipping_categories.d.ts +1 -33
  90. package/lib/cjs/resources/shipping_methods.d.ts +1 -74
  91. package/lib/cjs/resources/shipping_zones.d.ts +1 -48
  92. package/lib/cjs/resources/sku_list_items.d.ts +1 -47
  93. package/lib/cjs/resources/sku_list_promotion_rules.d.ts +1 -68
  94. package/lib/cjs/resources/sku_lists.d.ts +1 -49
  95. package/lib/cjs/resources/sku_options.d.ts +1 -56
  96. package/lib/cjs/resources/skus.d.ts +1 -78
  97. package/lib/cjs/resources/stock_items.d.ts +1 -49
  98. package/lib/cjs/resources/stock_line_items.d.ts +1 -29
  99. package/lib/cjs/resources/stock_locations.d.ts +1 -57
  100. package/lib/cjs/resources/stock_transfers.d.ts +1 -71
  101. package/lib/cjs/resources/stripe_gateways.d.ts +1 -38
  102. package/lib/cjs/resources/stripe_payments.d.ts +1 -42
  103. package/lib/cjs/resources/tax_calculators.d.ts +1 -27
  104. package/lib/cjs/resources/tax_categories.d.ts +1 -59
  105. package/lib/cjs/resources/tax_rules.d.ts +1 -69
  106. package/lib/cjs/resources/taxjar_accounts.d.ts +1 -43
  107. package/lib/cjs/resources/transactions.d.ts +1 -31
  108. package/lib/cjs/resources/voids.d.ts +1 -34
  109. package/lib/cjs/resources/webhooks.d.ts +1 -42
  110. package/lib/cjs/resources/wire_transfers.d.ts +1 -32
  111. package/lib/cjs/static.d.ts +1 -6
  112. package/lib/cjs/util.d.ts +1 -2
  113. package/lib/esm/api.d.ts +1 -103
  114. package/lib/esm/client.d.ts +1 -31
  115. package/lib/esm/commercelayer.d.ts +1 -122
  116. package/lib/esm/common.d.ts +1 -4
  117. package/lib/esm/config.d.ts +1 -11
  118. package/lib/esm/debug.d.ts +1 -3
  119. package/lib/esm/error.d.ts +1 -26
  120. package/lib/esm/index.d.ts +1 -7
  121. package/lib/esm/interceptor.d.ts +1 -19
  122. package/lib/esm/jsonapi.d.ts +1 -5
  123. package/lib/esm/model.d.ts +1 -101
  124. package/lib/esm/query.d.ts +1 -23
  125. package/lib/esm/resource.d.ts +1 -76
  126. package/lib/esm/resources/addresses.d.ts +1 -88
  127. package/lib/esm/resources/adjustments.d.ts +1 -35
  128. package/lib/esm/resources/adyen_gateways.d.ts +1 -47
  129. package/lib/esm/resources/adyen_payments.d.ts +1 -44
  130. package/lib/esm/resources/application.d.ts +1 -21
  131. package/lib/esm/resources/attachments.d.ts +1 -156
  132. package/lib/esm/resources/authorizations.d.ts +1 -57
  133. package/lib/esm/resources/avalara_accounts.d.ts +1 -52
  134. package/lib/esm/resources/billing_info_validation_rules.d.ts +1 -32
  135. package/lib/esm/resources/bing_geocoders.d.ts +1 -35
  136. package/lib/esm/resources/braintree_gateways.d.ts +1 -56
  137. package/lib/esm/resources/braintree_payments.d.ts +1 -47
  138. package/lib/esm/resources/bundles.d.ts +1 -74
  139. package/lib/esm/resources/captures.d.ts +1 -48
  140. package/lib/esm/resources/carrier_accounts.d.ts +1 -26
  141. package/lib/esm/resources/checkout_com_gateways.d.ts +1 -45
  142. package/lib/esm/resources/checkout_com_payments.d.ts +1 -51
  143. package/lib/esm/resources/coupon_codes_promotion_rules.d.ts +1 -59
  144. package/lib/esm/resources/coupon_recipients.d.ts +1 -44
  145. package/lib/esm/resources/coupons.d.ts +1 -45
  146. package/lib/esm/resources/customer_addresses.d.ts +1 -41
  147. package/lib/esm/resources/customer_groups.d.ts +1 -36
  148. package/lib/esm/resources/customer_password_resets.d.ts +1 -33
  149. package/lib/esm/resources/customer_payment_sources.d.ts +1 -70
  150. package/lib/esm/resources/customer_subscriptions.d.ts +1 -28
  151. package/lib/esm/resources/customers.d.ts +1 -60
  152. package/lib/esm/resources/delivery_lead_times.d.ts +1 -51
  153. package/lib/esm/resources/event_callbacks.d.ts +1 -24
  154. package/lib/esm/resources/external_gateways.d.ts +1 -49
  155. package/lib/esm/resources/external_payments.d.ts +1 -43
  156. package/lib/esm/resources/external_promotions.d.ts +1 -86
  157. package/lib/esm/resources/external_tax_calculators.d.ts +1 -44
  158. package/lib/esm/resources/fixed_amount_promotions.d.ts +1 -88
  159. package/lib/esm/resources/fixed_price_promotions.d.ts +1 -99
  160. package/lib/esm/resources/free_gift_promotions.d.ts +1 -97
  161. package/lib/esm/resources/free_shipping_promotions.d.ts +1 -83
  162. package/lib/esm/resources/geocoders.d.ts +1 -24
  163. package/lib/esm/resources/gift_card_recipients.d.ts +1 -44
  164. package/lib/esm/resources/gift_cards.d.ts +1 -82
  165. package/lib/esm/resources/google_geocoders.d.ts +1 -35
  166. package/lib/esm/resources/imports.d.ts +1 -40
  167. package/lib/esm/resources/in_stock_subscriptions.d.ts +1 -59
  168. package/lib/esm/resources/inventory_models.d.ts +1 -42
  169. package/lib/esm/resources/inventory_return_locations.d.ts +1 -43
  170. package/lib/esm/resources/inventory_stock_locations.d.ts +1 -46
  171. package/lib/esm/resources/klarna_gateways.d.ts +1 -44
  172. package/lib/esm/resources/klarna_payments.d.ts +1 -41
  173. package/lib/esm/resources/line_item_options.d.ts +1 -57
  174. package/lib/esm/resources/line_items.d.ts +1 -125
  175. package/lib/esm/resources/manual_gateways.d.ts +1 -33
  176. package/lib/esm/resources/manual_tax_calculators.d.ts +1 -49
  177. package/lib/esm/resources/markets.d.ts +1 -81
  178. package/lib/esm/resources/merchants.d.ts +1 -38
  179. package/lib/esm/resources/order_amount_promotion_rules.d.ts +1 -56
  180. package/lib/esm/resources/order_copies.d.ts +1 -45
  181. package/lib/esm/resources/order_subscriptions.d.ts +1 -67
  182. package/lib/esm/resources/order_validation_rules.d.ts +1 -20
  183. package/lib/esm/resources/orders.d.ts +1 -271
  184. package/lib/esm/resources/organization.d.ts +1 -32
  185. package/lib/esm/resources/packages.d.ts +1 -56
  186. package/lib/esm/resources/parcel_line_items.d.ts +1 -49
  187. package/lib/esm/resources/parcels.d.ts +1 -108
  188. package/lib/esm/resources/payment_gateways.d.ts +1 -21
  189. package/lib/esm/resources/payment_methods.d.ts +1 -59
  190. package/lib/esm/resources/paypal_gateways.d.ts +1 -39
  191. package/lib/esm/resources/paypal_payments.d.ts +1 -49
  192. package/lib/esm/resources/percentage_discount_promotions.d.ts +1 -97
  193. package/lib/esm/resources/price_lists.d.ts +1 -39
  194. package/lib/esm/resources/prices.d.ts +1 -57
  195. package/lib/esm/resources/promotion_rules.d.ts +1 -24
  196. package/lib/esm/resources/promotions.d.ts +1 -41
  197. package/lib/esm/resources/refunds.d.ts +1 -34
  198. package/lib/esm/resources/return_line_items.d.ts +1 -49
  199. package/lib/esm/resources/returns.d.ts +1 -72
  200. package/lib/esm/resources/shipments.d.ts +1 -89
  201. package/lib/esm/resources/shipping_categories.d.ts +1 -33
  202. package/lib/esm/resources/shipping_methods.d.ts +1 -74
  203. package/lib/esm/resources/shipping_zones.d.ts +1 -48
  204. package/lib/esm/resources/sku_list_items.d.ts +1 -47
  205. package/lib/esm/resources/sku_list_promotion_rules.d.ts +1 -68
  206. package/lib/esm/resources/sku_lists.d.ts +1 -49
  207. package/lib/esm/resources/sku_options.d.ts +1 -56
  208. package/lib/esm/resources/skus.d.ts +1 -78
  209. package/lib/esm/resources/stock_items.d.ts +1 -49
  210. package/lib/esm/resources/stock_line_items.d.ts +1 -29
  211. package/lib/esm/resources/stock_locations.d.ts +1 -57
  212. package/lib/esm/resources/stock_transfers.d.ts +1 -71
  213. package/lib/esm/resources/stripe_gateways.d.ts +1 -38
  214. package/lib/esm/resources/stripe_payments.d.ts +1 -42
  215. package/lib/esm/resources/tax_calculators.d.ts +1 -27
  216. package/lib/esm/resources/tax_categories.d.ts +1 -59
  217. package/lib/esm/resources/tax_rules.d.ts +1 -69
  218. package/lib/esm/resources/taxjar_accounts.d.ts +1 -43
  219. package/lib/esm/resources/transactions.d.ts +1 -31
  220. package/lib/esm/resources/voids.d.ts +1 -34
  221. package/lib/esm/resources/webhooks.d.ts +1 -42
  222. package/lib/esm/resources/wire_transfers.d.ts +1 -32
  223. package/lib/esm/static.d.ts +1 -6
  224. package/lib/esm/util.d.ts +1 -2
  225. package/package.json +3 -3
@@ -1,43 +1 @@
1
- import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ResourceRel, ListResponse } from '../resource';
2
- import type { QueryParamsList, QueryParamsRetrieve } from '../query';
3
- import type { TaxCategory } from './tax_categories';
4
- import type { Market } from './markets';
5
- import type { Attachment } from './attachments';
6
- declare type TaxjarAccountRel = ResourceRel & {
7
- type: typeof TaxjarAccounts.TYPE;
8
- };
9
- declare type TaxCategoryRel = ResourceRel & {
10
- type: 'tax_categories';
11
- };
12
- interface TaxjarAccount extends Resource {
13
- name?: string;
14
- tax_categories?: TaxCategory[];
15
- markets?: Market[];
16
- attachments?: Attachment[];
17
- }
18
- interface TaxjarAccountCreate extends ResourceCreate {
19
- name: string;
20
- api_key: string;
21
- tax_categories?: TaxCategoryRel[];
22
- }
23
- interface TaxjarAccountUpdate extends ResourceUpdate {
24
- name?: string;
25
- api_key?: string;
26
- tax_categories?: TaxCategoryRel[];
27
- }
28
- declare class TaxjarAccounts extends ApiResource {
29
- static readonly TYPE: 'taxjar_accounts';
30
- list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<TaxjarAccount>>;
31
- create(resource: TaxjarAccountCreate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<TaxjarAccount>;
32
- retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<TaxjarAccount>;
33
- update(resource: TaxjarAccountUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<TaxjarAccount>;
34
- delete(id: string, options?: ResourcesConfig): Promise<void>;
35
- tax_categories(taxjarAccountId: string | TaxjarAccount, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<TaxCategory>>;
36
- markets(taxjarAccountId: string | TaxjarAccount, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Market>>;
37
- attachments(taxjarAccountId: string | TaxjarAccount, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
38
- isTaxjarAccount(resource: any): resource is TaxjarAccount;
39
- relationship(id: string | ResourceId | null): TaxjarAccountRel;
40
- type(): string;
41
- }
42
- export default TaxjarAccounts;
43
- export { TaxjarAccount, TaxjarAccountCreate, TaxjarAccountUpdate };
1
+ import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{TaxCategory}from'./tax_categories';import type{Market}from'./markets';import type{Attachment}from'./attachments';declare type TaxjarAccountRel=ResourceRel&{type:typeof TaxjarAccounts.TYPE;};declare type TaxCategoryRel=ResourceRel&{type:'tax_categories';};interface TaxjarAccount extends Resource{name?:string;tax_categories?:TaxCategory[];markets?:Market[];attachments?:Attachment[];}interface TaxjarAccountCreate extends ResourceCreate{name:string;api_key:string;tax_categories?:TaxCategoryRel[];}interface TaxjarAccountUpdate extends ResourceUpdate{name?:string;api_key?:string;tax_categories?:TaxCategoryRel[];}declare class TaxjarAccounts extends ApiResource{static readonly TYPE:'taxjar_accounts';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<TaxjarAccount>>;create(resource:TaxjarAccountCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<TaxjarAccount>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<TaxjarAccount>;update(resource:TaxjarAccountUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<TaxjarAccount>;delete(id:string,options?:ResourcesConfig):Promise<void>;tax_categories(taxjarAccountId:string|TaxjarAccount,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<TaxCategory>>;markets(taxjarAccountId:string|TaxjarAccount,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Market>>;attachments(taxjarAccountId:string|TaxjarAccount,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Attachment>>;isTaxjarAccount(resource:any):resource is TaxjarAccount;relationship(id:string|ResourceId|null):TaxjarAccountRel;type():string;}export default TaxjarAccounts;export{TaxjarAccount,TaxjarAccountCreate,TaxjarAccountUpdate};
@@ -1,31 +1 @@
1
- import { ApiResource, Resource, ResourcesConfig, ResourceId, ResourceRel, ListResponse } from '../resource';
2
- import type { QueryParamsList, QueryParamsRetrieve } from '../query';
3
- import type { Order } from './orders';
4
- declare type TransactionRel = ResourceRel & {
5
- type: typeof Transactions.TYPE;
6
- };
7
- interface Transaction extends Resource {
8
- number?: string;
9
- currency_code?: string;
10
- amount_cents?: number;
11
- amount_float?: number;
12
- formatted_amount?: string;
13
- succeeded?: boolean;
14
- message?: string;
15
- error_code?: string;
16
- error_detail?: string;
17
- token?: string;
18
- gateway_transaction_id?: string;
19
- order?: Order;
20
- }
21
- declare class Transactions extends ApiResource {
22
- static readonly TYPE: 'transactions';
23
- list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Transaction>>;
24
- retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Transaction>;
25
- order(transactionId: string | Transaction, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Order>;
26
- isTransaction(resource: any): resource is Transaction;
27
- relationship(id: string | ResourceId | null): TransactionRel;
28
- type(): string;
29
- }
30
- export default Transactions;
31
- export { Transaction };
1
+ import{ApiResource,Resource,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{Order}from'./orders';declare type TransactionRel=ResourceRel&{type:typeof Transactions.TYPE;};interface Transaction extends Resource{number?:string;currency_code?:string;amount_cents?:number;amount_float?:number;formatted_amount?:string;succeeded?:boolean;message?:string;error_code?:string;error_detail?:string;token?:string;gateway_transaction_id?:string;order?:Order;}declare class Transactions extends ApiResource{static readonly TYPE:'transactions';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Transaction>>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Transaction>;order(transactionId:string|Transaction,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Order>;isTransaction(resource:any):resource is Transaction;relationship(id:string|ResourceId|null):TransactionRel;type():string;}export default Transactions;export{Transaction};
@@ -1,34 +1 @@
1
- import { ApiResource, Resource, ResourcesConfig, ResourceId, ResourceRel, ListResponse } from '../resource';
2
- import type { QueryParamsList, QueryParamsRetrieve } from '../query';
3
- import type { Order } from './orders';
4
- import type { Authorization } from './authorizations';
5
- declare type VoidRel = ResourceRel & {
6
- type: typeof Voids.TYPE;
7
- };
8
- interface Void extends Resource {
9
- number?: string;
10
- currency_code?: string;
11
- amount_cents?: number;
12
- amount_float?: number;
13
- formatted_amount?: string;
14
- succeeded?: boolean;
15
- message?: string;
16
- error_code?: string;
17
- error_detail?: string;
18
- token?: string;
19
- gateway_transaction_id?: string;
20
- order?: Order;
21
- reference_authorization?: Authorization;
22
- }
23
- declare class Voids extends ApiResource {
24
- static readonly TYPE: 'voids';
25
- list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Void>>;
26
- retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Void>;
27
- order(voidId: string | Void, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Order>;
28
- reference_authorization(voidId: string | Void, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Authorization>;
29
- isVoid(resource: any): resource is Void;
30
- relationship(id: string | ResourceId | null): VoidRel;
31
- type(): string;
32
- }
33
- export default Voids;
34
- export { Void };
1
+ import{ApiResource,Resource,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{Order}from'./orders';import type{Authorization}from'./authorizations';declare type VoidRel=ResourceRel&{type:typeof Voids.TYPE;};interface Void extends Resource{number?:string;currency_code?:string;amount_cents?:number;amount_float?:number;formatted_amount?:string;succeeded?:boolean;message?:string;error_code?:string;error_detail?:string;token?:string;gateway_transaction_id?:string;order?:Order;reference_authorization?:Authorization;}declare class Voids extends ApiResource{static readonly TYPE:'voids';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Void>>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Void>;order(voidId:string|Void,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Order>;reference_authorization(voidId:string|Void,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Authorization>;isVoid(resource:any):resource is Void;relationship(id:string|ResourceId|null):VoidRel;type():string;}export default Voids;export{Void};
@@ -1,42 +1 @@
1
- import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ResourceRel, ListResponse } from '../resource';
2
- import type { QueryParamsList, QueryParamsRetrieve } from '../query';
3
- import type { EventCallback } from './event_callbacks';
4
- declare type WebhookRel = ResourceRel & {
5
- type: typeof Webhooks.TYPE;
6
- };
7
- interface Webhook extends Resource {
8
- name?: string;
9
- topic?: string;
10
- callback_url?: string;
11
- include_resources?: string[];
12
- circuit_state?: string;
13
- circuit_failure_count?: number;
14
- last_event_callbacks?: EventCallback[];
15
- }
16
- interface WebhookCreate extends ResourceCreate {
17
- name?: string;
18
- topic: string;
19
- callback_url: string;
20
- include_resources?: string[];
21
- }
22
- interface WebhookUpdate extends ResourceUpdate {
23
- name?: string;
24
- topic?: string;
25
- callback_url?: string;
26
- include_resources?: string[];
27
- _reset_circuit?: boolean;
28
- }
29
- declare class Webhooks extends ApiResource {
30
- static readonly TYPE: 'webhooks';
31
- list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Webhook>>;
32
- create(resource: WebhookCreate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Webhook>;
33
- retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Webhook>;
34
- update(resource: WebhookUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Webhook>;
35
- delete(id: string, options?: ResourcesConfig): Promise<void>;
36
- last_event_callbacks(webhookId: string | Webhook, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<EventCallback>>;
37
- isWebhook(resource: any): resource is Webhook;
38
- relationship(id: string | ResourceId | null): WebhookRel;
39
- type(): string;
40
- }
41
- export default Webhooks;
42
- export { Webhook, WebhookCreate, WebhookUpdate };
1
+ import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{EventCallback}from'./event_callbacks';declare type WebhookRel=ResourceRel&{type:typeof Webhooks.TYPE;};interface Webhook extends Resource{name?:string;topic?:string;callback_url?:string;include_resources?:string[];circuit_state?:string;circuit_failure_count?:number;last_event_callbacks?:EventCallback[];}interface WebhookCreate extends ResourceCreate{name?:string;topic:string;callback_url:string;include_resources?:string[];}interface WebhookUpdate extends ResourceUpdate{name?:string;topic?:string;callback_url?:string;include_resources?:string[];_reset_circuit?:boolean;}declare class Webhooks extends ApiResource{static readonly TYPE:'webhooks';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Webhook>>;create(resource:WebhookCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Webhook>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Webhook>;update(resource:WebhookUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Webhook>;delete(id:string,options?:ResourcesConfig):Promise<void>;last_event_callbacks(webhookId:string|Webhook,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<EventCallback>>;isWebhook(resource:any):resource is Webhook;relationship(id:string|ResourceId|null):WebhookRel;type():string;}export default Webhooks;export{Webhook,WebhookCreate,WebhookUpdate};
@@ -1,32 +1 @@
1
- import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ResourceRel, ListResponse } from '../resource';
2
- import type { QueryParamsList, QueryParamsRetrieve } from '../query';
3
- import type { Order } from './orders';
4
- declare type WireTransferRel = ResourceRel & {
5
- type: typeof WireTransfers.TYPE;
6
- };
7
- declare type OrderRel = ResourceRel & {
8
- type: 'orders';
9
- };
10
- interface WireTransfer extends Resource {
11
- order?: Order;
12
- }
13
- interface WireTransferCreate extends ResourceCreate {
14
- order: OrderRel;
15
- }
16
- interface WireTransferUpdate extends ResourceUpdate {
17
- order?: OrderRel;
18
- }
19
- declare class WireTransfers extends ApiResource {
20
- static readonly TYPE: 'wire_transfers';
21
- list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<WireTransfer>>;
22
- create(resource: WireTransferCreate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<WireTransfer>;
23
- retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<WireTransfer>;
24
- update(resource: WireTransferUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<WireTransfer>;
25
- delete(id: string, options?: ResourcesConfig): Promise<void>;
26
- order(wireTransferId: string | WireTransfer, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Order>;
27
- isWireTransfer(resource: any): resource is WireTransfer;
28
- relationship(id: string | ResourceId | null): WireTransferRel;
29
- type(): string;
30
- }
31
- export default WireTransfers;
32
- export { WireTransfer, WireTransferCreate, WireTransferUpdate };
1
+ import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{Order}from'./orders';declare type WireTransferRel=ResourceRel&{type:typeof WireTransfers.TYPE;};declare type OrderRel=ResourceRel&{type:'orders';};interface WireTransfer extends Resource{order?:Order;}interface WireTransferCreate extends ResourceCreate{order:OrderRel;}interface WireTransferUpdate extends ResourceUpdate{order?:OrderRel;}declare class WireTransfers extends ApiResource{static readonly TYPE:'wire_transfers';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<WireTransfer>>;create(resource:WireTransferCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<WireTransfer>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<WireTransfer>;update(resource:WireTransferUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<WireTransfer>;delete(id:string,options?:ResourcesConfig):Promise<void>;order(wireTransferId:string|WireTransfer,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Order>;isWireTransfer(resource:any):resource is WireTransfer;relationship(id:string|ResourceId|null):WireTransferRel;type():string;}export default WireTransfers;export{WireTransfer,WireTransferCreate,WireTransferUpdate};
@@ -1,6 +1 @@
1
- import { SdkError, ApiError } from './error';
2
- export declare const CommerceLayerStatic: {
3
- resources: () => readonly string[];
4
- isSdkError: (error: unknown) => error is SdkError;
5
- isApiError: (error: unknown) => error is ApiError;
6
- };
1
+ import{SdkError,ApiError}from'./error';export declare const CommerceLayerStatic:{resources:()=>readonly string[];isSdkError:(error:unknown)=>error is SdkError;isApiError:(error:unknown)=>error is ApiError;};
package/lib/esm/util.d.ts CHANGED
@@ -1,3 +1,2 @@
1
1
  /// <reference types="node" />
2
- declare const sleep: (ms: number) => Promise<NodeJS.Timeout>;
3
- export { sleep };
2
+ declare const sleep:(ms:number)=>Promise<NodeJS.Timeout>;export{sleep};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@commercelayer/sdk",
3
- "version": "4.7.5",
3
+ "version": "4.7.6",
4
4
  "main": "lib/cjs/index.js",
5
5
  "types": "lib/cjs/index.d.ts",
6
6
  "module": "lib/esm/index.js",
@@ -12,7 +12,7 @@
12
12
  "generate": "ts-node gen/generator.ts",
13
13
  "lint": "eslint ./src --ext .ts",
14
14
  "lintspec": "eslint ./specs/resources/ --ext .spec.ts",
15
- "postbuild": "minimize-js lib",
15
+ "postbuild": "minimize-js -d lib",
16
16
  "prepare": "npm run build",
17
17
  "semantic-release": "semantic-release",
18
18
  "size": "size-limit",
@@ -63,7 +63,7 @@
63
63
  "json-typescript": "^1.1.2",
64
64
  "jsonapi-typescript": "^0.1.3",
65
65
  "lodash": "^4.17.21",
66
- "minimize-js": "^1.2.0",
66
+ "minimize-js": "^1.3.0",
67
67
  "pretty-quick": "^3.1.3",
68
68
  "semantic-release": "^19.0.2",
69
69
  "ts-node": "^10.6.0",