@commercelayer/sdk 5.0.0-beta.9 → 5.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +2 -2
- package/README.md +18 -0
- package/lib/cjs/api.d.ts +23 -12
- package/lib/cjs/api.js +20 -2
- package/lib/cjs/client.d.ts +3 -5
- package/lib/cjs/commercelayer.d.ts +10 -4
- package/lib/cjs/commercelayer.js +9 -3
- package/lib/cjs/common.d.ts +1 -0
- package/lib/cjs/common.js +11 -0
- package/lib/cjs/index.d.ts +1 -2
- package/lib/cjs/index.js +0 -16
- package/lib/cjs/interceptor.d.ts +1 -1
- package/lib/cjs/model.d.ts +7 -1
- package/lib/cjs/query.d.ts +5 -13
- package/lib/cjs/resource.d.ts +8 -10
- package/lib/cjs/resources/addresses.d.ts +63 -51
- package/lib/cjs/resources/addresses.js +8 -0
- package/lib/cjs/resources/adjustments.d.ts +5 -4
- package/lib/cjs/resources/adyen_gateways.d.ts +21 -20
- package/lib/cjs/resources/adyen_payments.d.ts +16 -15
- package/lib/cjs/resources/application.d.ts +7 -6
- package/lib/cjs/resources/attachments.d.ts +11 -10
- package/lib/cjs/resources/authorizations.d.ts +28 -27
- package/lib/cjs/resources/avalara_accounts.d.ts +17 -16
- package/lib/cjs/resources/axerve_gateways.d.ts +9 -8
- package/lib/cjs/resources/axerve_payments.d.ts +12 -11
- package/lib/cjs/resources/billing_info_validation_rules.d.ts +5 -4
- package/lib/cjs/resources/bing_geocoders.d.ts +6 -5
- package/lib/cjs/resources/braintree_gateways.d.ts +21 -20
- package/lib/cjs/resources/braintree_payments.d.ts +17 -16
- package/lib/cjs/resources/bundles.d.ts +38 -26
- package/lib/cjs/resources/bundles.js +8 -0
- package/lib/cjs/resources/captures.d.ts +19 -18
- package/lib/cjs/resources/carrier_accounts.d.ts +7 -6
- package/lib/cjs/resources/checkout_com_gateways.d.ts +12 -11
- package/lib/cjs/resources/checkout_com_payments.d.ts +25 -24
- package/lib/cjs/resources/cleanups.d.ts +13 -12
- package/lib/cjs/resources/coupon_codes_promotion_rules.d.ts +7 -6
- package/lib/cjs/resources/coupon_recipients.d.ts +13 -12
- package/lib/cjs/resources/coupons.d.ts +27 -15
- package/lib/cjs/resources/coupons.js +8 -0
- package/lib/cjs/resources/customer_addresses.d.ts +8 -7
- package/lib/cjs/resources/customer_groups.d.ts +6 -5
- package/lib/cjs/resources/customer_password_resets.d.ts +8 -7
- package/lib/cjs/resources/customer_payment_sources.d.ts +9 -8
- package/lib/cjs/resources/customer_subscriptions.d.ts +4 -3
- package/lib/cjs/resources/customers.d.ts +27 -18
- package/lib/cjs/resources/customers.js +4 -0
- package/lib/cjs/resources/delivery_lead_times.d.ts +11 -10
- package/lib/cjs/resources/event_callbacks.d.ts +6 -5
- package/lib/cjs/resources/events.d.ts +4 -3
- package/lib/cjs/resources/exports.d.ts +17 -16
- package/lib/cjs/resources/external_gateways.d.ts +20 -19
- package/lib/cjs/resources/external_payments.d.ts +10 -9
- package/lib/cjs/resources/external_promotions.d.ts +37 -28
- package/lib/cjs/resources/external_promotions.js +4 -0
- package/lib/cjs/resources/external_tax_calculators.d.ts +6 -5
- package/lib/cjs/resources/fixed_amount_promotions.d.ts +39 -30
- package/lib/cjs/resources/fixed_amount_promotions.js +4 -0
- package/lib/cjs/resources/fixed_price_promotions.d.ts +44 -35
- package/lib/cjs/resources/fixed_price_promotions.js +8 -4
- package/lib/cjs/resources/free_gift_promotions.d.ts +44 -35
- package/lib/cjs/resources/free_gift_promotions.js +8 -4
- package/lib/cjs/resources/free_shipping_promotions.d.ts +38 -26
- package/lib/cjs/resources/free_shipping_promotions.js +8 -0
- package/lib/cjs/resources/geocoders.d.ts +4 -3
- package/lib/cjs/resources/gift_card_recipients.d.ts +13 -12
- package/lib/cjs/resources/gift_cards.d.ts +50 -41
- package/lib/cjs/resources/gift_cards.js +4 -0
- package/lib/cjs/resources/google_geocoders.d.ts +6 -5
- package/lib/cjs/resources/imports.d.ts +22 -21
- package/lib/cjs/resources/in_stock_subscriptions.d.ts +20 -19
- package/lib/cjs/resources/inventory_models.d.ts +12 -11
- package/lib/cjs/resources/inventory_return_locations.d.ts +7 -6
- package/lib/cjs/resources/inventory_stock_locations.d.ts +10 -9
- package/lib/cjs/resources/klarna_gateways.d.ts +10 -9
- package/lib/cjs/resources/klarna_payments.d.ts +15 -14
- package/lib/cjs/resources/line_item_options.d.ts +32 -20
- package/lib/cjs/resources/line_item_options.js +8 -0
- package/lib/cjs/resources/line_items.d.ts +58 -43
- package/lib/cjs/resources/line_items.js +8 -0
- package/lib/cjs/resources/manual_gateways.d.ts +4 -3
- package/lib/cjs/resources/manual_tax_calculators.d.ts +8 -7
- package/lib/cjs/resources/markets.d.ts +41 -32
- package/lib/cjs/resources/markets.js +4 -0
- package/lib/cjs/resources/merchants.d.ts +6 -5
- package/lib/cjs/resources/order_amount_promotion_rules.d.ts +9 -8
- package/lib/cjs/resources/order_copies.d.ts +23 -20
- package/lib/cjs/resources/order_copies.js +7 -4
- package/lib/cjs/resources/order_factories.d.ts +34 -0
- package/lib/cjs/resources/order_factories.js +28 -0
- package/lib/cjs/resources/order_subscription_items.d.ts +61 -0
- package/lib/cjs/resources/order_subscription_items.js +29 -0
- package/lib/cjs/resources/order_subscriptions.d.ts +52 -29
- package/lib/cjs/resources/order_subscriptions.js +18 -2
- package/lib/cjs/resources/order_validation_rules.d.ts +4 -3
- package/lib/cjs/resources/orders.d.ts +200 -183
- package/lib/cjs/resources/orders.js +12 -0
- package/lib/cjs/resources/organization.d.ts +18 -17
- package/lib/cjs/resources/packages.d.ts +14 -13
- package/lib/cjs/resources/parcel_line_items.d.ts +7 -6
- package/lib/cjs/resources/parcels.d.ts +78 -74
- package/lib/cjs/resources/payment_gateways.d.ts +3 -2
- package/lib/cjs/resources/payment_methods.d.ts +33 -32
- package/lib/cjs/resources/paypal_gateways.d.ts +7 -6
- package/lib/cjs/resources/paypal_payments.d.ts +17 -16
- package/lib/cjs/resources/percentage_discount_promotions.d.ts +43 -34
- package/lib/cjs/resources/percentage_discount_promotions.js +8 -4
- package/lib/cjs/resources/price_frequency_tiers.d.ts +50 -0
- package/lib/cjs/resources/price_frequency_tiers.js +37 -0
- package/lib/cjs/resources/price_lists.d.ts +9 -8
- package/lib/cjs/resources/price_tiers.d.ts +7 -6
- package/lib/cjs/resources/price_volume_tiers.d.ts +15 -11
- package/lib/cjs/resources/price_volume_tiers.js +4 -0
- package/lib/cjs/resources/prices.d.ts +20 -16
- package/lib/cjs/resources/prices.js +4 -0
- package/lib/cjs/resources/promotion_rules.d.ts +3 -2
- package/lib/cjs/resources/promotions.d.ts +17 -10
- package/lib/cjs/resources/promotions.js +8 -0
- package/lib/cjs/resources/recurring_order_copies.d.ts +53 -0
- package/lib/cjs/resources/recurring_order_copies.js +41 -0
- package/lib/cjs/resources/refunds.d.ts +10 -9
- package/lib/cjs/resources/return_line_items.d.ts +13 -12
- package/lib/cjs/resources/returns.d.ts +39 -30
- package/lib/cjs/resources/returns.js +4 -0
- package/lib/cjs/resources/satispay_gateways.d.ts +11 -7
- package/lib/cjs/resources/satispay_payments.d.ts +10 -12
- package/lib/cjs/resources/shipments.d.ts +42 -41
- package/lib/cjs/resources/shipping_categories.d.ts +5 -4
- package/lib/cjs/resources/shipping_method_tiers.d.ts +7 -6
- package/lib/cjs/resources/shipping_methods.d.ts +50 -49
- package/lib/cjs/resources/shipping_weight_tiers.d.ts +12 -11
- package/lib/cjs/resources/shipping_zones.d.ts +22 -21
- package/lib/cjs/resources/sku_list_items.d.ts +13 -12
- package/lib/cjs/resources/sku_list_promotion_rules.d.ts +14 -13
- package/lib/cjs/resources/sku_lists.d.ts +22 -21
- package/lib/cjs/resources/sku_options.d.ts +36 -24
- package/lib/cjs/resources/sku_options.js +8 -0
- package/lib/cjs/resources/skus.d.ts +47 -35
- package/lib/cjs/resources/skus.js +8 -0
- package/lib/cjs/resources/stock_items.d.ts +12 -11
- package/lib/cjs/resources/stock_line_items.d.ts +7 -6
- package/lib/cjs/resources/stock_locations.d.ts +17 -16
- package/lib/cjs/resources/stock_transfers.d.ts +24 -23
- package/lib/cjs/resources/stripe_gateways.d.ts +12 -11
- package/lib/cjs/resources/stripe_payments.d.ts +15 -14
- package/lib/cjs/resources/subscription_models.d.ts +49 -0
- package/lib/cjs/resources/subscription_models.js +37 -0
- package/lib/cjs/resources/tags.d.ts +28 -0
- package/lib/cjs/resources/tags.js +25 -0
- package/lib/cjs/resources/tax_calculators.d.ts +4 -3
- package/lib/cjs/resources/tax_categories.d.ts +10 -9
- package/lib/cjs/resources/tax_rules.d.ts +39 -38
- package/lib/cjs/resources/taxjar_accounts.d.ts +9 -8
- package/lib/cjs/resources/transactions.d.ts +8 -7
- package/lib/cjs/resources/voids.d.ts +10 -9
- package/lib/cjs/resources/webhooks.d.ts +14 -13
- package/lib/cjs/resources/wire_transfers.d.ts +5 -4
- package/lib/cjs/util.d.ts +1 -3
- package/lib/esm/api.d.ts +23 -12
- package/lib/esm/api.js +12 -0
- package/lib/esm/client.d.ts +3 -5
- package/lib/esm/commercelayer.d.ts +10 -4
- package/lib/esm/commercelayer.js +9 -3
- package/lib/esm/common.d.ts +1 -0
- package/lib/esm/common.js +11 -0
- package/lib/esm/index.d.ts +1 -2
- package/lib/esm/index.js +0 -2
- package/lib/esm/interceptor.d.ts +1 -1
- package/lib/esm/model.d.ts +7 -1
- package/lib/esm/query.d.ts +5 -13
- package/lib/esm/resource.d.ts +8 -10
- package/lib/esm/resources/addresses.d.ts +63 -51
- package/lib/esm/resources/addresses.js +8 -0
- package/lib/esm/resources/adjustments.d.ts +5 -4
- package/lib/esm/resources/adyen_gateways.d.ts +21 -20
- package/lib/esm/resources/adyen_payments.d.ts +16 -15
- package/lib/esm/resources/application.d.ts +7 -6
- package/lib/esm/resources/attachments.d.ts +11 -10
- package/lib/esm/resources/authorizations.d.ts +28 -27
- package/lib/esm/resources/avalara_accounts.d.ts +17 -16
- package/lib/esm/resources/axerve_gateways.d.ts +9 -8
- package/lib/esm/resources/axerve_payments.d.ts +12 -11
- package/lib/esm/resources/billing_info_validation_rules.d.ts +5 -4
- package/lib/esm/resources/bing_geocoders.d.ts +6 -5
- package/lib/esm/resources/braintree_gateways.d.ts +21 -20
- package/lib/esm/resources/braintree_payments.d.ts +17 -16
- package/lib/esm/resources/bundles.d.ts +38 -26
- package/lib/esm/resources/bundles.js +8 -0
- package/lib/esm/resources/captures.d.ts +19 -18
- package/lib/esm/resources/carrier_accounts.d.ts +7 -6
- package/lib/esm/resources/checkout_com_gateways.d.ts +12 -11
- package/lib/esm/resources/checkout_com_payments.d.ts +25 -24
- package/lib/esm/resources/cleanups.d.ts +13 -12
- package/lib/esm/resources/coupon_codes_promotion_rules.d.ts +7 -6
- package/lib/esm/resources/coupon_recipients.d.ts +13 -12
- package/lib/esm/resources/coupons.d.ts +27 -15
- package/lib/esm/resources/coupons.js +8 -0
- package/lib/esm/resources/customer_addresses.d.ts +8 -7
- package/lib/esm/resources/customer_groups.d.ts +6 -5
- package/lib/esm/resources/customer_password_resets.d.ts +8 -7
- package/lib/esm/resources/customer_payment_sources.d.ts +9 -8
- package/lib/esm/resources/customer_subscriptions.d.ts +4 -3
- package/lib/esm/resources/customers.d.ts +27 -18
- package/lib/esm/resources/customers.js +4 -0
- package/lib/esm/resources/delivery_lead_times.d.ts +11 -10
- package/lib/esm/resources/event_callbacks.d.ts +6 -5
- package/lib/esm/resources/events.d.ts +4 -3
- package/lib/esm/resources/exports.d.ts +17 -16
- package/lib/esm/resources/external_gateways.d.ts +20 -19
- package/lib/esm/resources/external_payments.d.ts +10 -9
- package/lib/esm/resources/external_promotions.d.ts +37 -28
- package/lib/esm/resources/external_promotions.js +4 -0
- package/lib/esm/resources/external_tax_calculators.d.ts +6 -5
- package/lib/esm/resources/fixed_amount_promotions.d.ts +39 -30
- package/lib/esm/resources/fixed_amount_promotions.js +4 -0
- package/lib/esm/resources/fixed_price_promotions.d.ts +44 -35
- package/lib/esm/resources/fixed_price_promotions.js +8 -4
- package/lib/esm/resources/free_gift_promotions.d.ts +44 -35
- package/lib/esm/resources/free_gift_promotions.js +8 -4
- package/lib/esm/resources/free_shipping_promotions.d.ts +38 -26
- package/lib/esm/resources/free_shipping_promotions.js +8 -0
- package/lib/esm/resources/geocoders.d.ts +4 -3
- package/lib/esm/resources/gift_card_recipients.d.ts +13 -12
- package/lib/esm/resources/gift_cards.d.ts +50 -41
- package/lib/esm/resources/gift_cards.js +4 -0
- package/lib/esm/resources/google_geocoders.d.ts +6 -5
- package/lib/esm/resources/imports.d.ts +22 -21
- package/lib/esm/resources/in_stock_subscriptions.d.ts +20 -19
- package/lib/esm/resources/inventory_models.d.ts +12 -11
- package/lib/esm/resources/inventory_return_locations.d.ts +7 -6
- package/lib/esm/resources/inventory_stock_locations.d.ts +10 -9
- package/lib/esm/resources/klarna_gateways.d.ts +10 -9
- package/lib/esm/resources/klarna_payments.d.ts +15 -14
- package/lib/esm/resources/line_item_options.d.ts +32 -20
- package/lib/esm/resources/line_item_options.js +8 -0
- package/lib/esm/resources/line_items.d.ts +58 -43
- package/lib/esm/resources/line_items.js +8 -0
- package/lib/esm/resources/manual_gateways.d.ts +4 -3
- package/lib/esm/resources/manual_tax_calculators.d.ts +8 -7
- package/lib/esm/resources/markets.d.ts +41 -32
- package/lib/esm/resources/markets.js +4 -0
- package/lib/esm/resources/merchants.d.ts +6 -5
- package/lib/esm/resources/order_amount_promotion_rules.d.ts +9 -8
- package/lib/esm/resources/order_copies.d.ts +23 -20
- package/lib/esm/resources/order_copies.js +7 -4
- package/lib/esm/resources/order_factories.d.ts +34 -0
- package/lib/esm/resources/order_factories.js +26 -0
- package/lib/esm/resources/order_subscription_items.d.ts +61 -0
- package/lib/esm/resources/order_subscription_items.js +27 -0
- package/lib/esm/resources/order_subscriptions.d.ts +52 -29
- package/lib/esm/resources/order_subscriptions.js +18 -2
- package/lib/esm/resources/order_validation_rules.d.ts +4 -3
- package/lib/esm/resources/orders.d.ts +200 -183
- package/lib/esm/resources/orders.js +12 -0
- package/lib/esm/resources/organization.d.ts +18 -17
- package/lib/esm/resources/packages.d.ts +14 -13
- package/lib/esm/resources/parcel_line_items.d.ts +7 -6
- package/lib/esm/resources/parcels.d.ts +78 -74
- package/lib/esm/resources/payment_gateways.d.ts +3 -2
- package/lib/esm/resources/payment_methods.d.ts +33 -32
- package/lib/esm/resources/paypal_gateways.d.ts +7 -6
- package/lib/esm/resources/paypal_payments.d.ts +17 -16
- package/lib/esm/resources/percentage_discount_promotions.d.ts +43 -34
- package/lib/esm/resources/percentage_discount_promotions.js +8 -4
- package/lib/esm/resources/price_frequency_tiers.d.ts +50 -0
- package/lib/esm/resources/price_frequency_tiers.js +35 -0
- package/lib/esm/resources/price_lists.d.ts +9 -8
- package/lib/esm/resources/price_tiers.d.ts +7 -6
- package/lib/esm/resources/price_volume_tiers.d.ts +15 -11
- package/lib/esm/resources/price_volume_tiers.js +4 -0
- package/lib/esm/resources/prices.d.ts +20 -16
- package/lib/esm/resources/prices.js +4 -0
- package/lib/esm/resources/promotion_rules.d.ts +3 -2
- package/lib/esm/resources/promotions.d.ts +17 -10
- package/lib/esm/resources/promotions.js +8 -0
- package/lib/esm/resources/recurring_order_copies.d.ts +53 -0
- package/lib/esm/resources/recurring_order_copies.js +39 -0
- package/lib/esm/resources/refunds.d.ts +10 -9
- package/lib/esm/resources/return_line_items.d.ts +13 -12
- package/lib/esm/resources/returns.d.ts +39 -30
- package/lib/esm/resources/returns.js +4 -0
- package/lib/esm/resources/satispay_gateways.d.ts +11 -7
- package/lib/esm/resources/satispay_payments.d.ts +10 -12
- package/lib/esm/resources/shipments.d.ts +42 -41
- package/lib/esm/resources/shipping_categories.d.ts +5 -4
- package/lib/esm/resources/shipping_method_tiers.d.ts +7 -6
- package/lib/esm/resources/shipping_methods.d.ts +50 -49
- package/lib/esm/resources/shipping_weight_tiers.d.ts +12 -11
- package/lib/esm/resources/shipping_zones.d.ts +22 -21
- package/lib/esm/resources/sku_list_items.d.ts +13 -12
- package/lib/esm/resources/sku_list_promotion_rules.d.ts +14 -13
- package/lib/esm/resources/sku_lists.d.ts +22 -21
- package/lib/esm/resources/sku_options.d.ts +36 -24
- package/lib/esm/resources/sku_options.js +8 -0
- package/lib/esm/resources/skus.d.ts +47 -35
- package/lib/esm/resources/skus.js +8 -0
- package/lib/esm/resources/stock_items.d.ts +12 -11
- package/lib/esm/resources/stock_line_items.d.ts +7 -6
- package/lib/esm/resources/stock_locations.d.ts +17 -16
- package/lib/esm/resources/stock_transfers.d.ts +24 -23
- package/lib/esm/resources/stripe_gateways.d.ts +12 -11
- package/lib/esm/resources/stripe_payments.d.ts +15 -14
- package/lib/esm/resources/subscription_models.d.ts +49 -0
- package/lib/esm/resources/subscription_models.js +35 -0
- package/lib/esm/resources/tags.d.ts +28 -0
- package/lib/esm/resources/tags.js +23 -0
- package/lib/esm/resources/tax_calculators.d.ts +4 -3
- package/lib/esm/resources/tax_categories.d.ts +10 -9
- package/lib/esm/resources/tax_rules.d.ts +39 -38
- package/lib/esm/resources/taxjar_accounts.d.ts +9 -8
- package/lib/esm/resources/transactions.d.ts +8 -7
- package/lib/esm/resources/voids.d.ts +10 -9
- package/lib/esm/resources/webhooks.d.ts +14 -13
- package/lib/esm/resources/wire_transfers.d.ts +5 -4
- package/lib/esm/util.d.ts +1 -3
- package/lib/tsconfig.esm.tsbuildinfo +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/package.json +12 -12
package/LICENSE
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
MIT License
|
2
2
|
|
3
|
-
Copyright (c) [
|
3
|
+
Copyright (c) [2023] [Commerce Layer]
|
4
4
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
6
|
of this software and associated documentation files (the "Software"), to deal
|
@@ -18,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
18
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
19
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
20
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
-
SOFTWARE.
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
@@ -6,6 +6,7 @@
|
|
6
6
|
[](https://github.com/semantic-release/semantic-release)
|
7
7
|
[](https://github.com/commercelayer/commercelayer-sdk/actions/workflows/semantic-release.yml)
|
8
8
|
[](https://github.com/commercelayer/commercelayer-cli/actions/workflows/codeql-analysis.yml)
|
9
|
+
[](https://www.typescriptlang.org/)
|
9
10
|
|
10
11
|
A JavaScript Library wrapper that makes it quick and easy to interact with the [Commerce Layer API](https://docs.commercelayer.io/developers).
|
11
12
|
|
@@ -279,6 +280,23 @@ In general:
|
|
279
280
|
ℹ️ Check our API reference for more information on how to [fetch relationships](https://docs.commercelayer.io/core/fetching-relationships).
|
280
281
|
</details>
|
281
282
|
|
283
|
+
<details>
|
284
|
+
<summary>How to count resources</summary>
|
285
|
+
<br />
|
286
|
+
|
287
|
+
Many times you simply need to count how many resources exist with
|
288
|
+
certain characteristics. You can then call the special `count`
|
289
|
+
function passing a filter to get as result the total number of
|
290
|
+
resources.
|
291
|
+
|
292
|
+
```javascript
|
293
|
+
// Get the total number of placed orders
|
294
|
+
const placedOrders = cl.orders.count({ filters: { status_eq: 'placed' } })
|
295
|
+
|
296
|
+
```
|
297
|
+
|
298
|
+
</details>
|
299
|
+
|
282
300
|
### Update
|
283
301
|
|
284
302
|
<details>
|
package/lib/cjs/api.d.ts
CHANGED
@@ -61,6 +61,8 @@ export { default as Markets } from './resources/markets';
|
|
61
61
|
export { default as Merchants } from './resources/merchants';
|
62
62
|
export { default as OrderAmountPromotionRules } from './resources/order_amount_promotion_rules';
|
63
63
|
export { default as OrderCopies } from './resources/order_copies';
|
64
|
+
export { default as OrderFactories } from './resources/order_factories';
|
65
|
+
export { default as OrderSubscriptionItems } from './resources/order_subscription_items';
|
64
66
|
export { default as OrderSubscriptions } from './resources/order_subscriptions';
|
65
67
|
export { default as OrderValidationRules } from './resources/order_validation_rules';
|
66
68
|
export { default as Orders } from './resources/orders';
|
@@ -73,12 +75,14 @@ export { default as PaymentMethods } from './resources/payment_methods';
|
|
73
75
|
export { default as PaypalGateways } from './resources/paypal_gateways';
|
74
76
|
export { default as PaypalPayments } from './resources/paypal_payments';
|
75
77
|
export { default as PercentageDiscountPromotions } from './resources/percentage_discount_promotions';
|
78
|
+
export { default as PriceFrequencyTiers } from './resources/price_frequency_tiers';
|
76
79
|
export { default as PriceLists } from './resources/price_lists';
|
77
80
|
export { default as PriceTiers } from './resources/price_tiers';
|
78
81
|
export { default as PriceVolumeTiers } from './resources/price_volume_tiers';
|
79
82
|
export { default as Prices } from './resources/prices';
|
80
83
|
export { default as PromotionRules } from './resources/promotion_rules';
|
81
84
|
export { default as Promotions } from './resources/promotions';
|
85
|
+
export { default as RecurringOrderCopies } from './resources/recurring_order_copies';
|
82
86
|
export { default as Refunds } from './resources/refunds';
|
83
87
|
export { default as ReturnLineItems } from './resources/return_line_items';
|
84
88
|
export { default as Returns } from './resources/returns';
|
@@ -101,6 +105,8 @@ export { default as StockLocations } from './resources/stock_locations';
|
|
101
105
|
export { default as StockTransfers } from './resources/stock_transfers';
|
102
106
|
export { default as StripeGateways } from './resources/stripe_gateways';
|
103
107
|
export { default as StripePayments } from './resources/stripe_payments';
|
108
|
+
export { default as SubscriptionModels } from './resources/subscription_models';
|
109
|
+
export { default as Tags } from './resources/tags';
|
104
110
|
export { default as TaxCalculators } from './resources/tax_calculators';
|
105
111
|
export { default as TaxCategories } from './resources/tax_categories';
|
106
112
|
export { default as TaxRules } from './resources/tax_rules';
|
@@ -109,20 +115,25 @@ export { default as Transactions } from './resources/transactions';
|
|
109
115
|
export { default as Voids } from './resources/voids';
|
110
116
|
export { default as Webhooks } from './resources/webhooks';
|
111
117
|
export { default as WireTransfers } from './resources/wire_transfers';
|
112
|
-
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' | 'captures' | 'carrier_accounts' | 'checkout_com_gateways' | 'checkout_com_payments' | 'cleanups' | 'coupon_codes_promotion_rules' | 'coupon_recipients' | 'coupons' | '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_subscriptions' | 'order_validation_rules' | 'orders' | 'organization' | 'packages' | 'parcel_line_items' | 'parcels' | 'payment_gateways' | 'payment_methods' | 'paypal_gateways' | 'paypal_payments' | 'percentage_discount_promotions' | 'price_lists' | 'price_tiers' | 'price_volume_tiers' | 'prices' | 'promotion_rules' | 'promotions' | 'refunds' | '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_transfers' | 'stripe_gateways' | 'stripe_payments' | 'tax_calculators' | 'tax_categories' | 'tax_rules' | 'taxjar_accounts' | 'transactions' | 'voids' | 'webhooks' | 'wire_transfers';
|
113
|
-
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", "captures", "carrier_accounts", "checkout_com_gateways", "checkout_com_payments", "cleanups", "coupon_codes_promotion_rules", "coupon_recipients", "coupons", "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_subscriptions", "order_validation_rules", "orders", "organization", "packages", "parcel_line_items", "parcels", "payment_gateways", "payment_methods", "paypal_gateways", "paypal_payments", "percentage_discount_promotions", "price_lists", "price_tiers", "price_volume_tiers", "prices", "promotion_rules", "promotions", "refunds", "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_transfers", "stripe_gateways", "stripe_payments", "tax_calculators", "tax_categories", "tax_rules", "taxjar_accounts", "transactions", "voids", "webhooks", "wire_transfers"];
|
114
|
-
export type
|
115
|
-
|
118
|
+
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' | 'captures' | 'carrier_accounts' | 'checkout_com_gateways' | 'checkout_com_payments' | 'cleanups' | 'coupon_codes_promotion_rules' | 'coupon_recipients' | 'coupons' | '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' | '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' | '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_transfers' | 'stripe_gateways' | 'stripe_payments' | 'subscription_models' | 'tags' | 'tax_calculators' | 'tax_categories' | 'tax_rules' | 'taxjar_accounts' | 'transactions' | 'voids' | 'webhooks' | 'wire_transfers';
|
119
|
+
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", "captures", "carrier_accounts", "checkout_com_gateways", "checkout_com_payments", "cleanups", "coupon_codes_promotion_rules", "coupon_recipients", "coupons", "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", "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", "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_transfers", "stripe_gateways", "stripe_payments", "subscription_models", "tags", "tax_calculators", "tax_categories", "tax_rules", "taxjar_accounts", "transactions", "voids", "webhooks", "wire_transfers"];
|
120
|
+
export type RetrievableResourceType = ResourceTypeLock;
|
121
|
+
export type RetrievableResource = {
|
122
|
+
type: RetrievableResourceType;
|
116
123
|
};
|
117
|
-
export type
|
118
|
-
|
124
|
+
export type ListableResourceType = Exclude<ResourceTypeLock, 'application' | 'organization'>;
|
125
|
+
export type ListableResource = {
|
126
|
+
type: ListableResourceType;
|
119
127
|
};
|
120
|
-
export type
|
121
|
-
|
128
|
+
export type CreatableResourceType = 'addresses' | 'adjustments' | 'adyen_gateways' | 'adyen_payments' | 'attachments' | 'avalara_accounts' | 'axerve_gateways' | 'axerve_payments' | 'billing_info_validation_rules' | 'bing_geocoders' | 'braintree_gateways' | 'braintree_payments' | 'bundles' | 'checkout_com_gateways' | 'checkout_com_payments' | 'cleanups' | 'coupon_codes_promotion_rules' | 'coupon_recipients' | 'coupons' | 'customer_addresses' | 'customer_groups' | 'customer_password_resets' | 'customer_payment_sources' | 'customer_subscriptions' | 'customers' | 'delivery_lead_times' | 'exports' | 'external_gateways' | 'external_payments' | 'external_promotions' | 'external_tax_calculators' | 'fixed_amount_promotions' | 'fixed_price_promotions' | 'free_gift_promotions' | 'free_shipping_promotions' | '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_subscription_items' | 'order_subscriptions' | 'orders' | 'packages' | 'parcel_line_items' | 'parcels' | 'payment_methods' | 'paypal_gateways' | 'paypal_payments' | 'percentage_discount_promotions' | 'price_frequency_tiers' | 'price_lists' | 'price_volume_tiers' | 'prices' | 'recurring_order_copies' | 'return_line_items' | 'returns' | 'satispay_gateways' | 'satispay_payments' | 'shipping_categories' | 'shipping_methods' | 'shipping_weight_tiers' | 'shipping_zones' | 'sku_list_items' | 'sku_list_promotion_rules' | 'sku_lists' | 'sku_options' | 'skus' | 'stock_items' | 'stock_locations' | 'stock_transfers' | 'stripe_gateways' | 'stripe_payments' | 'subscription_models' | 'tags' | 'tax_categories' | 'tax_rules' | 'taxjar_accounts' | 'webhooks' | 'wire_transfers';
|
129
|
+
export type CreatableResource = {
|
130
|
+
type: CreatableResourceType;
|
122
131
|
};
|
123
|
-
export type
|
124
|
-
|
132
|
+
export type UpdatableResourceType = 'addresses' | 'adjustments' | 'adyen_gateways' | 'adyen_payments' | 'attachments' | 'authorizations' | 'avalara_accounts' | 'axerve_gateways' | 'axerve_payments' | 'billing_info_validation_rules' | 'bing_geocoders' | 'braintree_gateways' | 'braintree_payments' | 'bundles' | 'captures' | 'checkout_com_gateways' | 'checkout_com_payments' | 'coupon_codes_promotion_rules' | 'coupon_recipients' | 'coupons' | 'customer_addresses' | 'customer_groups' | 'customer_password_resets' | 'customer_payment_sources' | 'customer_subscriptions' | 'customers' | 'delivery_lead_times' | 'external_gateways' | 'external_payments' | 'external_promotions' | 'external_tax_calculators' | 'fixed_amount_promotions' | 'fixed_price_promotions' | 'free_gift_promotions' | 'free_shipping_promotions' | 'gift_card_recipients' | 'gift_cards' | 'google_geocoders' | '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_subscription_items' | 'order_subscriptions' | 'orders' | 'packages' | 'parcel_line_items' | 'parcels' | 'payment_methods' | 'paypal_gateways' | 'paypal_payments' | 'percentage_discount_promotions' | 'price_frequency_tiers' | 'price_lists' | 'price_volume_tiers' | 'prices' | 'recurring_order_copies' | 'return_line_items' | 'returns' | 'satispay_gateways' | 'satispay_payments' | 'shipments' | 'shipping_categories' | 'shipping_methods' | 'shipping_weight_tiers' | 'shipping_zones' | 'sku_list_items' | 'sku_list_promotion_rules' | 'sku_lists' | 'sku_options' | 'skus' | 'stock_items' | 'stock_locations' | 'stock_transfers' | 'stripe_gateways' | 'stripe_payments' | 'subscription_models' | 'tags' | 'tax_categories' | 'tax_rules' | 'taxjar_accounts' | 'webhooks' | 'wire_transfers';
|
133
|
+
export type UpdatableResource = {
|
134
|
+
type: UpdatableResourceType;
|
125
135
|
};
|
126
|
-
export type
|
127
|
-
|
136
|
+
export type DeletableResourceType = 'addresses' | 'adjustments' | 'adyen_gateways' | 'adyen_payments' | 'attachments' | 'avalara_accounts' | 'axerve_gateways' | 'axerve_payments' | 'billing_info_validation_rules' | 'bing_geocoders' | 'braintree_gateways' | 'braintree_payments' | 'bundles' | 'checkout_com_gateways' | 'checkout_com_payments' | 'cleanups' | 'coupon_codes_promotion_rules' | 'coupon_recipients' | 'coupons' | 'customer_addresses' | 'customer_groups' | 'customer_password_resets' | 'customer_payment_sources' | 'customer_subscriptions' | 'customers' | 'delivery_lead_times' | 'exports' | 'external_gateways' | 'external_payments' | 'external_promotions' | 'external_tax_calculators' | 'fixed_amount_promotions' | 'fixed_price_promotions' | 'free_gift_promotions' | 'free_shipping_promotions' | '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_subscription_items' | 'order_subscriptions' | 'orders' | 'packages' | 'parcel_line_items' | 'parcels' | 'payment_methods' | 'paypal_gateways' | 'paypal_payments' | 'percentage_discount_promotions' | 'price_frequency_tiers' | 'price_lists' | 'price_volume_tiers' | 'prices' | 'recurring_order_copies' | 'return_line_items' | 'returns' | 'satispay_gateways' | 'satispay_payments' | 'shipping_categories' | 'shipping_methods' | 'shipping_weight_tiers' | 'shipping_zones' | 'sku_list_items' | 'sku_list_promotion_rules' | 'sku_lists' | 'sku_options' | 'skus' | 'stock_items' | 'stock_locations' | 'stock_transfers' | 'stripe_gateways' | 'stripe_payments' | 'subscription_models' | 'tags' | 'tax_categories' | 'tax_rules' | 'taxjar_accounts' | 'webhooks' | 'wire_transfers';
|
137
|
+
export type DeletableResource = {
|
138
|
+
type: DeletableResourceType;
|
128
139
|
};
|
package/lib/cjs/api.js
CHANGED
@@ -4,8 +4,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
4
4
|
};
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
6
6
|
exports.InventoryStockLocations = exports.InventoryReturnLocations = exports.InventoryModels = exports.InStockSubscriptions = exports.Imports = exports.GoogleGeocoders = exports.GiftCards = exports.GiftCardRecipients = exports.Geocoders = exports.FreeShippingPromotions = exports.FreeGiftPromotions = exports.FixedPricePromotions = exports.FixedAmountPromotions = exports.ExternalTaxCalculators = exports.ExternalPromotions = exports.ExternalPayments = exports.ExternalGateways = exports.Exports = exports.Events = exports.EventCallbacks = exports.DeliveryLeadTimes = exports.Customers = exports.CustomerSubscriptions = exports.CustomerPaymentSources = exports.CustomerPasswordResets = exports.CustomerGroups = exports.CustomerAddresses = exports.Coupons = exports.CouponRecipients = exports.CouponCodesPromotionRules = exports.Cleanups = exports.CheckoutComPayments = exports.CheckoutComGateways = exports.CarrierAccounts = exports.Captures = exports.Bundles = exports.BraintreePayments = exports.BraintreeGateways = exports.BingGeocoders = exports.BillingInfoValidationRules = exports.AxervePayments = exports.AxerveGateways = exports.AvalaraAccounts = exports.Authorizations = exports.Attachments = exports.Applications = exports.AdyenPayments = exports.AdyenGateways = exports.Adjustments = exports.Addresses = void 0;
|
7
|
-
exports.
|
8
|
-
exports.resourceList = exports.WireTransfers = exports.Webhooks = exports.Voids = exports.Transactions = exports.TaxjarAccounts = exports.TaxRules = exports.TaxCategories = exports.TaxCalculators = void 0;
|
7
|
+
exports.StockLineItems = exports.StockItems = exports.Skus = exports.SkuOptions = exports.SkuLists = exports.SkuListPromotionRules = exports.SkuListItems = exports.ShippingZones = exports.ShippingWeightTiers = exports.ShippingMethods = exports.ShippingMethodTiers = exports.ShippingCategories = exports.Shipments = exports.SatispayPayments = exports.SatispayGateways = exports.Returns = exports.ReturnLineItems = exports.Refunds = exports.RecurringOrderCopies = exports.Promotions = exports.PromotionRules = exports.Prices = exports.PriceVolumeTiers = exports.PriceTiers = exports.PriceLists = exports.PriceFrequencyTiers = exports.PercentageDiscountPromotions = exports.PaypalPayments = exports.PaypalGateways = exports.PaymentMethods = exports.PaymentGateways = exports.Parcels = exports.ParcelLineItems = exports.Packages = exports.Organizations = exports.Orders = exports.OrderValidationRules = exports.OrderSubscriptions = exports.OrderSubscriptionItems = exports.OrderFactories = exports.OrderCopies = exports.OrderAmountPromotionRules = exports.Merchants = exports.Markets = exports.ManualTaxCalculators = exports.ManualGateways = exports.LineItems = exports.LineItemOptions = exports.KlarnaPayments = exports.KlarnaGateways = void 0;
|
8
|
+
exports.resourceList = exports.WireTransfers = exports.Webhooks = exports.Voids = exports.Transactions = exports.TaxjarAccounts = exports.TaxRules = exports.TaxCategories = exports.TaxCalculators = exports.Tags = exports.SubscriptionModels = exports.StripePayments = exports.StripeGateways = exports.StockTransfers = exports.StockLocations = void 0;
|
9
9
|
// ##__API_RESOURCES_START__##
|
10
10
|
// ##__API_RESOURCES_TEMPLATE:: export { default as ##__RESOURCE_CLASS__## } from './resources/##__RESOURCE_TYPE__##'
|
11
11
|
/**
|
@@ -131,6 +131,10 @@ var order_amount_promotion_rules_1 = require("./resources/order_amount_promotion
|
|
131
131
|
Object.defineProperty(exports, "OrderAmountPromotionRules", { enumerable: true, get: function () { return __importDefault(order_amount_promotion_rules_1).default; } });
|
132
132
|
var order_copies_1 = require("./resources/order_copies");
|
133
133
|
Object.defineProperty(exports, "OrderCopies", { enumerable: true, get: function () { return __importDefault(order_copies_1).default; } });
|
134
|
+
var order_factories_1 = require("./resources/order_factories");
|
135
|
+
Object.defineProperty(exports, "OrderFactories", { enumerable: true, get: function () { return __importDefault(order_factories_1).default; } });
|
136
|
+
var order_subscription_items_1 = require("./resources/order_subscription_items");
|
137
|
+
Object.defineProperty(exports, "OrderSubscriptionItems", { enumerable: true, get: function () { return __importDefault(order_subscription_items_1).default; } });
|
134
138
|
var order_subscriptions_1 = require("./resources/order_subscriptions");
|
135
139
|
Object.defineProperty(exports, "OrderSubscriptions", { enumerable: true, get: function () { return __importDefault(order_subscriptions_1).default; } });
|
136
140
|
var order_validation_rules_1 = require("./resources/order_validation_rules");
|
@@ -155,6 +159,8 @@ var paypal_payments_1 = require("./resources/paypal_payments");
|
|
155
159
|
Object.defineProperty(exports, "PaypalPayments", { enumerable: true, get: function () { return __importDefault(paypal_payments_1).default; } });
|
156
160
|
var percentage_discount_promotions_1 = require("./resources/percentage_discount_promotions");
|
157
161
|
Object.defineProperty(exports, "PercentageDiscountPromotions", { enumerable: true, get: function () { return __importDefault(percentage_discount_promotions_1).default; } });
|
162
|
+
var price_frequency_tiers_1 = require("./resources/price_frequency_tiers");
|
163
|
+
Object.defineProperty(exports, "PriceFrequencyTiers", { enumerable: true, get: function () { return __importDefault(price_frequency_tiers_1).default; } });
|
158
164
|
var price_lists_1 = require("./resources/price_lists");
|
159
165
|
Object.defineProperty(exports, "PriceLists", { enumerable: true, get: function () { return __importDefault(price_lists_1).default; } });
|
160
166
|
var price_tiers_1 = require("./resources/price_tiers");
|
@@ -167,6 +173,8 @@ var promotion_rules_1 = require("./resources/promotion_rules");
|
|
167
173
|
Object.defineProperty(exports, "PromotionRules", { enumerable: true, get: function () { return __importDefault(promotion_rules_1).default; } });
|
168
174
|
var promotions_1 = require("./resources/promotions");
|
169
175
|
Object.defineProperty(exports, "Promotions", { enumerable: true, get: function () { return __importDefault(promotions_1).default; } });
|
176
|
+
var recurring_order_copies_1 = require("./resources/recurring_order_copies");
|
177
|
+
Object.defineProperty(exports, "RecurringOrderCopies", { enumerable: true, get: function () { return __importDefault(recurring_order_copies_1).default; } });
|
170
178
|
var refunds_1 = require("./resources/refunds");
|
171
179
|
Object.defineProperty(exports, "Refunds", { enumerable: true, get: function () { return __importDefault(refunds_1).default; } });
|
172
180
|
var return_line_items_1 = require("./resources/return_line_items");
|
@@ -211,6 +219,10 @@ var stripe_gateways_1 = require("./resources/stripe_gateways");
|
|
211
219
|
Object.defineProperty(exports, "StripeGateways", { enumerable: true, get: function () { return __importDefault(stripe_gateways_1).default; } });
|
212
220
|
var stripe_payments_1 = require("./resources/stripe_payments");
|
213
221
|
Object.defineProperty(exports, "StripePayments", { enumerable: true, get: function () { return __importDefault(stripe_payments_1).default; } });
|
222
|
+
var subscription_models_1 = require("./resources/subscription_models");
|
223
|
+
Object.defineProperty(exports, "SubscriptionModels", { enumerable: true, get: function () { return __importDefault(subscription_models_1).default; } });
|
224
|
+
var tags_1 = require("./resources/tags");
|
225
|
+
Object.defineProperty(exports, "Tags", { enumerable: true, get: function () { return __importDefault(tags_1).default; } });
|
214
226
|
var tax_calculators_1 = require("./resources/tax_calculators");
|
215
227
|
Object.defineProperty(exports, "TaxCalculators", { enumerable: true, get: function () { return __importDefault(tax_calculators_1).default; } });
|
216
228
|
var tax_categories_1 = require("./resources/tax_categories");
|
@@ -290,6 +302,8 @@ exports.resourceList = [
|
|
290
302
|
'merchants',
|
291
303
|
'order_amount_promotion_rules',
|
292
304
|
'order_copies',
|
305
|
+
'order_factories',
|
306
|
+
'order_subscription_items',
|
293
307
|
'order_subscriptions',
|
294
308
|
'order_validation_rules',
|
295
309
|
'orders',
|
@@ -302,12 +316,14 @@ exports.resourceList = [
|
|
302
316
|
'paypal_gateways',
|
303
317
|
'paypal_payments',
|
304
318
|
'percentage_discount_promotions',
|
319
|
+
'price_frequency_tiers',
|
305
320
|
'price_lists',
|
306
321
|
'price_tiers',
|
307
322
|
'price_volume_tiers',
|
308
323
|
'prices',
|
309
324
|
'promotion_rules',
|
310
325
|
'promotions',
|
326
|
+
'recurring_order_copies',
|
311
327
|
'refunds',
|
312
328
|
'return_line_items',
|
313
329
|
'returns',
|
@@ -330,6 +346,8 @@ exports.resourceList = [
|
|
330
346
|
'stock_transfers',
|
331
347
|
'stripe_gateways',
|
332
348
|
'stripe_payments',
|
349
|
+
'subscription_models',
|
350
|
+
'tags',
|
333
351
|
'tax_calculators',
|
334
352
|
'tax_categories',
|
335
353
|
'tax_rules',
|
package/lib/cjs/client.d.ts
CHANGED
@@ -1,15 +1,13 @@
|
|
1
1
|
/// <reference types="node" />
|
2
2
|
/// <reference types="node" />
|
3
|
-
import { AxiosProxyConfig, Method } from 'axios';
|
3
|
+
import { type AxiosProxyConfig, type Method } from 'axios';
|
4
4
|
import type { InterceptorManager } from './interceptor';
|
5
5
|
import type { Agent as HttpAgent } from 'http';
|
6
6
|
import type { Agent as HttpsAgent } from 'https';
|
7
7
|
type ProxyConfig = AxiosProxyConfig | false;
|
8
8
|
type RequestConfig = {
|
9
9
|
timeout?: number;
|
10
|
-
params?:
|
11
|
-
[key: string]: string | number | boolean;
|
12
|
-
};
|
10
|
+
params?: Record<string, string | number | boolean>;
|
13
11
|
httpAgent?: HttpAgent;
|
14
12
|
httpsAgent?: HttpsAgent;
|
15
13
|
proxy?: ProxyConfig;
|
@@ -30,4 +28,4 @@ declare class ApiClient {
|
|
30
28
|
request(method: Method, path: string, body?: any, options?: ApiClientConfig): Promise<any>;
|
31
29
|
}
|
32
30
|
export default ApiClient;
|
33
|
-
export { ApiClientInitConfig, ApiClientConfig, RequestConfig };
|
31
|
+
export type { ApiClientInitConfig, ApiClientConfig, RequestConfig };
|
@@ -1,16 +1,16 @@
|
|
1
1
|
import * as api from './api';
|
2
2
|
import type { ApiError } from './error';
|
3
3
|
import type { ErrorInterceptor, InterceptorType, RawResponseReader, RequestInterceptor, ResponseInterceptor } from './interceptor';
|
4
|
-
import type
|
5
|
-
declare const OPEN_API_SCHEMA_VERSION = "4.
|
4
|
+
import { type ResourcesInitConfig } from './resource';
|
5
|
+
declare const OPEN_API_SCHEMA_VERSION = "4.2.4";
|
6
6
|
export { OPEN_API_SCHEMA_VERSION };
|
7
|
-
type SdkConfig =
|
7
|
+
type SdkConfig = Record<string, unknown>;
|
8
8
|
type CommerceLayerInitConfig = SdkConfig & ResourcesInitConfig;
|
9
9
|
type CommerceLayerConfig = Partial<CommerceLayerInitConfig>;
|
10
10
|
declare class CommerceLayerClient {
|
11
11
|
#private;
|
12
12
|
static get openApiSchemaVersion(): string;
|
13
|
-
readonly openApiSchemaVersion = "4.
|
13
|
+
readonly openApiSchemaVersion = "4.2.4";
|
14
14
|
addresses: api.Addresses;
|
15
15
|
adjustments: api.Adjustments;
|
16
16
|
adyen_gateways: api.AdyenGateways;
|
@@ -71,6 +71,8 @@ declare class CommerceLayerClient {
|
|
71
71
|
merchants: api.Merchants;
|
72
72
|
order_amount_promotion_rules: api.OrderAmountPromotionRules;
|
73
73
|
order_copies: api.OrderCopies;
|
74
|
+
order_factories: api.OrderFactories;
|
75
|
+
order_subscription_items: api.OrderSubscriptionItems;
|
74
76
|
order_subscriptions: api.OrderSubscriptions;
|
75
77
|
order_validation_rules: api.OrderValidationRules;
|
76
78
|
orders: api.Orders;
|
@@ -83,12 +85,14 @@ declare class CommerceLayerClient {
|
|
83
85
|
paypal_gateways: api.PaypalGateways;
|
84
86
|
paypal_payments: api.PaypalPayments;
|
85
87
|
percentage_discount_promotions: api.PercentageDiscountPromotions;
|
88
|
+
price_frequency_tiers: api.PriceFrequencyTiers;
|
86
89
|
price_lists: api.PriceLists;
|
87
90
|
price_tiers: api.PriceTiers;
|
88
91
|
price_volume_tiers: api.PriceVolumeTiers;
|
89
92
|
prices: api.Prices;
|
90
93
|
promotion_rules: api.PromotionRules;
|
91
94
|
promotions: api.Promotions;
|
95
|
+
recurring_order_copies: api.RecurringOrderCopies;
|
92
96
|
refunds: api.Refunds;
|
93
97
|
return_line_items: api.ReturnLineItems;
|
94
98
|
returns: api.Returns;
|
@@ -111,6 +115,8 @@ declare class CommerceLayerClient {
|
|
111
115
|
stock_transfers: api.StockTransfers;
|
112
116
|
stripe_gateways: api.StripeGateways;
|
113
117
|
stripe_payments: api.StripePayments;
|
118
|
+
subscription_models: api.SubscriptionModels;
|
119
|
+
tags: api.Tags;
|
114
120
|
tax_calculators: api.TaxCalculators;
|
115
121
|
tax_categories: api.TaxCategories;
|
116
122
|
tax_rules: api.TaxRules;
|
package/lib/cjs/commercelayer.js
CHANGED
@@ -45,7 +45,7 @@ const resource_1 = __importDefault(require("./resource"));
|
|
45
45
|
const debug_1 = __importDefault(require("./debug"));
|
46
46
|
const debug = (0, debug_1.default)('commercelayer');
|
47
47
|
// Autogenerated schema version number, do not remove this line
|
48
|
-
const OPEN_API_SCHEMA_VERSION = '4.
|
48
|
+
const OPEN_API_SCHEMA_VERSION = '4.2.4';
|
49
49
|
exports.OPEN_API_SCHEMA_VERSION = OPEN_API_SCHEMA_VERSION;
|
50
50
|
class CommerceLayerClient {
|
51
51
|
static get openApiSchemaVersion() { return OPEN_API_SCHEMA_VERSION; }
|
@@ -119,6 +119,8 @@ class CommerceLayerClient {
|
|
119
119
|
this.merchants = new api.Merchants(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
|
120
120
|
this.order_amount_promotion_rules = new api.OrderAmountPromotionRules(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
|
121
121
|
this.order_copies = new api.OrderCopies(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
|
122
|
+
this.order_factories = new api.OrderFactories(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
|
123
|
+
this.order_subscription_items = new api.OrderSubscriptionItems(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
|
122
124
|
this.order_subscriptions = new api.OrderSubscriptions(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
|
123
125
|
this.order_validation_rules = new api.OrderValidationRules(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
|
124
126
|
this.orders = new api.Orders(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
|
@@ -131,12 +133,14 @@ class CommerceLayerClient {
|
|
131
133
|
this.paypal_gateways = new api.PaypalGateways(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
|
132
134
|
this.paypal_payments = new api.PaypalPayments(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
|
133
135
|
this.percentage_discount_promotions = new api.PercentageDiscountPromotions(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
|
136
|
+
this.price_frequency_tiers = new api.PriceFrequencyTiers(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
|
134
137
|
this.price_lists = new api.PriceLists(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
|
135
138
|
this.price_tiers = new api.PriceTiers(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
|
136
139
|
this.price_volume_tiers = new api.PriceVolumeTiers(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
|
137
140
|
this.prices = new api.Prices(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
|
138
141
|
this.promotion_rules = new api.PromotionRules(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
|
139
142
|
this.promotions = new api.Promotions(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
|
143
|
+
this.recurring_order_copies = new api.RecurringOrderCopies(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
|
140
144
|
this.refunds = new api.Refunds(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
|
141
145
|
this.return_line_items = new api.ReturnLineItems(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
|
142
146
|
this.returns = new api.Returns(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
|
@@ -159,6 +163,8 @@ class CommerceLayerClient {
|
|
159
163
|
this.stock_transfers = new api.StockTransfers(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
|
160
164
|
this.stripe_gateways = new api.StripeGateways(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
|
161
165
|
this.stripe_payments = new api.StripePayments(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
|
166
|
+
this.subscription_models = new api.SubscriptionModels(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
|
167
|
+
this.tags = new api.Tags(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
|
162
168
|
this.tax_calculators = new api.TaxCalculators(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
|
163
169
|
this.tax_categories = new api.TaxCategories(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
|
164
170
|
this.tax_rules = new api.TaxRules(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
|
@@ -198,7 +204,7 @@ class CommerceLayerClient {
|
|
198
204
|
return __classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f").interceptors.response.use(onFulfilled, onRejected);
|
199
205
|
}
|
200
206
|
removeInterceptor(type, id) {
|
201
|
-
|
207
|
+
__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f").interceptors[type].eject(id);
|
202
208
|
}
|
203
209
|
addRawResponseReader(options) {
|
204
210
|
const reader = {
|
@@ -219,7 +225,7 @@ class CommerceLayerClient {
|
|
219
225
|
removeRawResponseReader(reader) {
|
220
226
|
const id = (typeof reader === 'number') ? reader : reader === null || reader === void 0 ? void 0 : reader.id;
|
221
227
|
if (id && (id >= 0))
|
222
|
-
|
228
|
+
this.removeInterceptor('response', id);
|
223
229
|
}
|
224
230
|
}
|
225
231
|
_CommerceLayerClient_adapter = new WeakMap(), _CommerceLayerClient_organization = new WeakMap();
|
package/lib/cjs/common.d.ts
CHANGED
@@ -2,3 +2,4 @@ import type { ResourceId, ResourceType } from './resource';
|
|
2
2
|
declare const isResourceId: (resource: any) => resource is ResourceId;
|
3
3
|
declare const isResourceType: (resource: any) => resource is ResourceType;
|
4
4
|
export { isResourceId, isResourceType };
|
5
|
+
export type ObjectType = Record<string, any>;
|
package/lib/cjs/common.js
CHANGED
@@ -10,3 +10,14 @@ const isResourceType = (resource) => {
|
|
10
10
|
return resource && (typeof resource.type !== 'undefined') && resource.type && api_1.resourceList.includes(resource.type);
|
11
11
|
};
|
12
12
|
exports.isResourceType = isResourceType;
|
13
|
+
/*
|
14
|
+
// Nullable types
|
15
|
+
type StringNullable = string | null
|
16
|
+
type NumberNullable = number | null
|
17
|
+
type BooleanNullable = boolean | null
|
18
|
+
type ResourceNullable<R extends Resource> = R | null
|
19
|
+
type ResourceArrayNullable<R extends Resource> = R[] | null
|
20
|
+
|
21
|
+
|
22
|
+
export type { StringNullable, NumberNullable, BooleanNullable, ResourceNullable, ResourceArrayNullable }
|
23
|
+
*/
|
package/lib/cjs/index.d.ts
CHANGED
@@ -2,7 +2,6 @@ export { default, CommerceLayer } from './commercelayer';
|
|
2
2
|
export type { CommerceLayerClient } from './commercelayer';
|
3
3
|
export { CommerceLayerStatic } from './static';
|
4
4
|
export type { QueryParamsRetrieve, QueryParamsList, QueryParams } from './query';
|
5
|
-
export * from './model';
|
5
|
+
export type * from './model';
|
6
6
|
export type { RequestObj, ResponseObj, ErrorObj, HeadersObj } from './interceptor';
|
7
7
|
export type { SdkError, ApiError, ErrorType } from './error';
|
8
|
-
export type { ResourceRetrievable, ResourceListable, ResourceCreatable, ResourceUpdatable, ResourceDeletable } from './api';
|
package/lib/cjs/index.js
CHANGED
@@ -1,18 +1,4 @@
|
|
1
1
|
"use strict";
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
3
|
-
if (k2 === undefined) k2 = k;
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
7
|
-
}
|
8
|
-
Object.defineProperty(o, k2, desc);
|
9
|
-
}) : (function(o, m, k, k2) {
|
10
|
-
if (k2 === undefined) k2 = k;
|
11
|
-
o[k2] = m[k];
|
12
|
-
}));
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
15
|
-
};
|
16
2
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
17
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
18
4
|
};
|
@@ -25,5 +11,3 @@ Object.defineProperty(exports, "CommerceLayer", { enumerable: true, get: functio
|
|
25
11
|
// Commerce Layer static functions
|
26
12
|
var static_1 = require("./static");
|
27
13
|
Object.defineProperty(exports, "CommerceLayerStatic", { enumerable: true, get: function () { return static_1.CommerceLayerStatic; } });
|
28
|
-
// Resource model types
|
29
|
-
__exportStar(require("./model"), exports);
|
package/lib/cjs/interceptor.d.ts
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
import { AxiosError, AxiosInterceptorManager, AxiosRequestConfig, AxiosResponse, AxiosResponseHeaders, RawAxiosResponseHeaders } from 'axios';
|
1
|
+
import type { AxiosError, AxiosInterceptorManager, AxiosRequestConfig, AxiosResponse, AxiosResponseHeaders, RawAxiosResponseHeaders } from 'axios';
|
2
2
|
type InterceptorManager = {
|
3
3
|
request: AxiosInterceptorManager<AxiosRequestConfig>;
|
4
4
|
response: AxiosInterceptorManager<any>;
|
package/lib/cjs/model.d.ts
CHANGED
@@ -60,7 +60,9 @@ export type { ManualTaxCalculator, ManualTaxCalculatorCreate, ManualTaxCalculato
|
|
60
60
|
export type { Market, MarketCreate, MarketUpdate } from './resources/markets';
|
61
61
|
export type { Merchant, MerchantCreate, MerchantUpdate } from './resources/merchants';
|
62
62
|
export type { OrderAmountPromotionRule, OrderAmountPromotionRuleCreate, OrderAmountPromotionRuleUpdate } from './resources/order_amount_promotion_rules';
|
63
|
-
export type { OrderCopy, OrderCopyCreate } from './resources/order_copies';
|
63
|
+
export type { OrderCopy, OrderCopyCreate, OrderCopyUpdate } from './resources/order_copies';
|
64
|
+
export type { OrderFactory } from './resources/order_factories';
|
65
|
+
export type { OrderSubscriptionItem, OrderSubscriptionItemCreate, OrderSubscriptionItemUpdate } from './resources/order_subscription_items';
|
64
66
|
export type { OrderSubscription, OrderSubscriptionCreate, OrderSubscriptionUpdate } from './resources/order_subscriptions';
|
65
67
|
export type { OrderValidationRule } from './resources/order_validation_rules';
|
66
68
|
export type { Order, OrderCreate, OrderUpdate } from './resources/orders';
|
@@ -73,12 +75,14 @@ export type { PaymentMethod, PaymentMethodCreate, PaymentMethodUpdate } from './
|
|
73
75
|
export type { PaypalGateway, PaypalGatewayCreate, PaypalGatewayUpdate } from './resources/paypal_gateways';
|
74
76
|
export type { PaypalPayment, PaypalPaymentCreate, PaypalPaymentUpdate } from './resources/paypal_payments';
|
75
77
|
export type { PercentageDiscountPromotion, PercentageDiscountPromotionCreate, PercentageDiscountPromotionUpdate } from './resources/percentage_discount_promotions';
|
78
|
+
export type { PriceFrequencyTier, PriceFrequencyTierCreate, PriceFrequencyTierUpdate } from './resources/price_frequency_tiers';
|
76
79
|
export type { PriceList, PriceListCreate, PriceListUpdate } from './resources/price_lists';
|
77
80
|
export type { PriceTier } from './resources/price_tiers';
|
78
81
|
export type { PriceVolumeTier, PriceVolumeTierCreate, PriceVolumeTierUpdate } from './resources/price_volume_tiers';
|
79
82
|
export type { Price, PriceCreate, PriceUpdate } from './resources/prices';
|
80
83
|
export type { PromotionRule } from './resources/promotion_rules';
|
81
84
|
export type { Promotion } from './resources/promotions';
|
85
|
+
export type { RecurringOrderCopy, RecurringOrderCopyCreate, RecurringOrderCopyUpdate } from './resources/recurring_order_copies';
|
82
86
|
export type { Refund } from './resources/refunds';
|
83
87
|
export type { ReturnLineItem, ReturnLineItemCreate, ReturnLineItemUpdate } from './resources/return_line_items';
|
84
88
|
export type { Return, ReturnCreate, ReturnUpdate } from './resources/returns';
|
@@ -101,6 +105,8 @@ export type { StockLocation, StockLocationCreate, StockLocationUpdate } from './
|
|
101
105
|
export type { StockTransfer, StockTransferCreate, StockTransferUpdate } from './resources/stock_transfers';
|
102
106
|
export type { StripeGateway, StripeGatewayCreate, StripeGatewayUpdate } from './resources/stripe_gateways';
|
103
107
|
export type { StripePayment, StripePaymentCreate, StripePaymentUpdate } from './resources/stripe_payments';
|
108
|
+
export type { SubscriptionModel, SubscriptionModelCreate, SubscriptionModelUpdate } from './resources/subscription_models';
|
109
|
+
export type { Tag, TagCreate, TagUpdate } from './resources/tags';
|
104
110
|
export type { TaxCalculator } from './resources/tax_calculators';
|
105
111
|
export type { TaxCategory, TaxCategoryCreate, TaxCategoryUpdate } from './resources/tax_categories';
|
106
112
|
export type { TaxRule, TaxRuleCreate, TaxRuleUpdate } from './resources/tax_rules';
|
package/lib/cjs/query.d.ts
CHANGED
@@ -1,25 +1,17 @@
|
|
1
1
|
import type { ResourceType } from "./resource";
|
2
|
-
type QueryFilter =
|
3
|
-
[key: string]: string | number | boolean;
|
4
|
-
};
|
2
|
+
type QueryFilter = Record<string, string | number | boolean>;
|
5
3
|
interface QueryParamsRetrieve {
|
6
4
|
include?: string[];
|
7
|
-
fields?: string[] |
|
8
|
-
[key: string]: string[];
|
9
|
-
};
|
5
|
+
fields?: string[] | Record<string, string[]>;
|
10
6
|
}
|
11
7
|
interface QueryParamsList extends QueryParamsRetrieve {
|
12
|
-
sort?: string[] |
|
13
|
-
[key: string]: 'asc' | 'desc';
|
14
|
-
};
|
8
|
+
sort?: string[] | Record<string, 'asc' | 'desc'>;
|
15
9
|
filters?: QueryFilter;
|
16
10
|
pageNumber?: number;
|
17
11
|
pageSize?: number;
|
18
12
|
}
|
19
13
|
type QueryParams = QueryParamsRetrieve | QueryParamsList;
|
20
|
-
export { QueryParamsRetrieve, QueryParamsList, QueryParams, QueryFilter };
|
14
|
+
export type { QueryParamsRetrieve, QueryParamsList, QueryParams, QueryFilter };
|
21
15
|
declare const isParamsList: (params: any) => params is QueryParamsList;
|
22
|
-
declare const generateQueryStringParams: (params: QueryParamsRetrieve | QueryParamsList | undefined, res: string | ResourceType) =>
|
23
|
-
[key: string]: string;
|
24
|
-
};
|
16
|
+
declare const generateQueryStringParams: (params: QueryParamsRetrieve | QueryParamsList | undefined, res: string | ResourceType) => Record<string, string>;
|
25
17
|
export { generateQueryStringParams, isParamsList };
|
package/lib/cjs/resource.d.ts
CHANGED
@@ -1,15 +1,12 @@
|
|
1
|
-
import type
|
2
|
-
import type { QueryParamsRetrieve, QueryParamsList, QueryFilter } from './query';
|
1
|
+
import { type ApiClientInitConfig } from './client';
|
2
|
+
import type { QueryParamsRetrieve, QueryParamsList, QueryFilter, QueryParams } from './query';
|
3
3
|
import type { ResourceTypeLock } from './api';
|
4
4
|
import type { InterceptorManager } from './interceptor';
|
5
|
-
import { QueryParams } from '.';
|
6
5
|
type ResourceNull = {
|
7
6
|
id: null;
|
8
7
|
} & ResourceType;
|
9
8
|
type ResourceRel = ResourceId | ResourceNull;
|
10
|
-
type Metadata =
|
11
|
-
[key: string]: any;
|
12
|
-
};
|
9
|
+
type Metadata = Record<string, any>;
|
13
10
|
interface ResourceType {
|
14
11
|
readonly type: ResourceTypeLock;
|
15
12
|
}
|
@@ -17,8 +14,8 @@ interface ResourceId extends ResourceType {
|
|
17
14
|
readonly id: string;
|
18
15
|
}
|
19
16
|
interface ResourceBase {
|
20
|
-
reference?: string;
|
21
|
-
reference_origin?: string;
|
17
|
+
reference?: string | null;
|
18
|
+
reference_origin?: string | null;
|
22
19
|
metadata?: Metadata;
|
23
20
|
}
|
24
21
|
interface Resource extends ResourceBase, ResourceId {
|
@@ -49,7 +46,7 @@ declare class ListResponse<R> extends Array<R> {
|
|
49
46
|
get recordCount(): number;
|
50
47
|
get pageCount(): number;
|
51
48
|
}
|
52
|
-
export type { Metadata, ResourceType, ResourceId, Resource, ResourceCreate, ResourceUpdate, ListResponse, ResourceRel };
|
49
|
+
export type { Metadata, ResourceType, ResourceId, Resource, ResourceCreate, ResourceUpdate, ListResponse, ListMeta, ResourceRel };
|
53
50
|
type ResourceAdapterConfig = {};
|
54
51
|
type ResourcesInitConfig = ResourceAdapterConfig & ApiClientInitConfig;
|
55
52
|
type ResourcesConfig = Partial<ResourcesInitConfig>;
|
@@ -84,4 +81,5 @@ declare abstract class ApiSingleton<R extends Resource> extends ApiResourceBase<
|
|
84
81
|
retrieve(params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<R>;
|
85
82
|
}
|
86
83
|
export default ResourceAdapter;
|
87
|
-
export { ApiResource, ApiSingleton
|
84
|
+
export { ApiResource, ApiSingleton };
|
85
|
+
export type { ResourcesConfig, ResourcesInitConfig };
|