@commercelayer/sdk 7.0.0-rc.2 → 7.0.0-rc.4
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/README.md +2 -1
- package/lib/{api-DDgIE2i8.d.ts → api-F1F37Dud.d.ts} +27 -8
- package/lib/{api-DmIZO_Np.d.cts → api-IwWtsAqE.d.cts} +27 -8
- package/lib/api.d.cts +2 -2
- package/lib/api.d.ts +2 -2
- package/lib/bundle.cjs +568 -0
- package/lib/bundle.cjs.map +1 -0
- package/lib/bundle.d.cts +145 -0
- package/lib/bundle.d.ts +145 -0
- package/lib/bundle.js +546 -0
- package/lib/bundle.js.map +1 -0
- package/lib/client.d.cts +1 -1
- package/lib/client.d.ts +1 -1
- package/lib/commercelayer.cjs +2 -1
- package/lib/commercelayer.cjs.map +1 -1
- package/lib/commercelayer.d.cts +5 -6
- package/lib/commercelayer.d.ts +5 -6
- package/lib/commercelayer.js +2 -2
- package/lib/commercelayer.js.map +1 -1
- package/lib/config.d.cts +1 -1
- package/lib/config.d.ts +1 -1
- package/lib/enum.d.cts +2 -2
- package/lib/enum.d.ts +2 -2
- package/lib/error.cjs.map +1 -1
- package/lib/error.js.map +1 -1
- package/lib/fetch.cjs +2 -0
- package/lib/fetch.cjs.map +1 -1
- package/lib/fetch.d.cts +1 -1
- package/lib/fetch.d.ts +1 -1
- package/lib/fetch.js +2 -0
- package/lib/fetch.js.map +1 -1
- package/lib/index.d.cts +2 -2
- package/lib/index.d.ts +2 -2
- package/lib/{interceptor-5MISI1yn.d.cts → interceptor-k15jXzf0.d.cts} +3 -2
- package/lib/{interceptor-5MISI1yn.d.ts → interceptor-k15jXzf0.d.ts} +3 -2
- package/lib/interceptor.d.cts +1 -1
- package/lib/interceptor.d.ts +1 -1
- package/lib/jsonapi.d.cts +2 -2
- package/lib/jsonapi.d.ts +2 -2
- package/lib/model.d.cts +2 -2
- package/lib/model.d.ts +2 -2
- package/lib/query.d.cts +2 -2
- package/lib/query.d.ts +2 -2
- package/lib/resource.cjs +7 -6
- package/lib/resource.cjs.map +1 -1
- package/lib/resource.d.cts +2 -2
- package/lib/resource.d.ts +2 -2
- package/lib/resource.js +7 -6
- package/lib/resource.js.map +1 -1
- package/lib/resources/addresses.cjs.map +1 -1
- package/lib/resources/addresses.d.cts +2 -2
- package/lib/resources/addresses.d.ts +2 -2
- package/lib/resources/addresses.js.map +1 -1
- package/lib/resources/adjustments.cjs.map +1 -1
- package/lib/resources/adjustments.d.cts +2 -2
- package/lib/resources/adjustments.d.ts +2 -2
- package/lib/resources/adjustments.js.map +1 -1
- package/lib/resources/adyen_gateways.cjs.map +1 -1
- package/lib/resources/adyen_gateways.d.cts +2 -2
- package/lib/resources/adyen_gateways.d.ts +2 -2
- package/lib/resources/adyen_gateways.js.map +1 -1
- package/lib/resources/adyen_payments.cjs.map +1 -1
- package/lib/resources/adyen_payments.d.cts +2 -2
- package/lib/resources/adyen_payments.d.ts +2 -2
- package/lib/resources/adyen_payments.js.map +1 -1
- package/lib/resources/applications.cjs.map +1 -1
- package/lib/resources/applications.d.cts +2 -2
- package/lib/resources/applications.d.ts +2 -2
- package/lib/resources/applications.js.map +1 -1
- package/lib/resources/attachments.cjs.map +1 -1
- package/lib/resources/attachments.d.cts +2 -2
- package/lib/resources/attachments.d.ts +2 -2
- package/lib/resources/attachments.js.map +1 -1
- package/lib/resources/authorizations.cjs.map +1 -1
- package/lib/resources/authorizations.d.cts +2 -2
- package/lib/resources/authorizations.d.ts +2 -2
- package/lib/resources/authorizations.js.map +1 -1
- package/lib/resources/avalara_accounts.cjs.map +1 -1
- package/lib/resources/avalara_accounts.d.cts +2 -2
- package/lib/resources/avalara_accounts.d.ts +2 -2
- package/lib/resources/avalara_accounts.js.map +1 -1
- package/lib/resources/axerve_gateways.cjs.map +1 -1
- package/lib/resources/axerve_gateways.d.cts +2 -2
- package/lib/resources/axerve_gateways.d.ts +2 -2
- package/lib/resources/axerve_gateways.js.map +1 -1
- package/lib/resources/axerve_payments.cjs.map +1 -1
- package/lib/resources/axerve_payments.d.cts +2 -2
- package/lib/resources/axerve_payments.d.ts +2 -2
- package/lib/resources/axerve_payments.js.map +1 -1
- package/lib/resources/bing_geocoders.cjs.map +1 -1
- package/lib/resources/bing_geocoders.d.cts +2 -2
- package/lib/resources/bing_geocoders.d.ts +2 -2
- package/lib/resources/bing_geocoders.js.map +1 -1
- package/lib/resources/braintree_gateways.cjs.map +1 -1
- package/lib/resources/braintree_gateways.d.cts +2 -2
- package/lib/resources/braintree_gateways.d.ts +2 -2
- package/lib/resources/braintree_gateways.js.map +1 -1
- package/lib/resources/braintree_payments.cjs.map +1 -1
- package/lib/resources/braintree_payments.d.cts +2 -2
- package/lib/resources/braintree_payments.d.ts +2 -2
- package/lib/resources/braintree_payments.js.map +1 -1
- package/lib/resources/bundles.cjs.map +1 -1
- package/lib/resources/bundles.d.cts +2 -2
- package/lib/resources/bundles.d.ts +2 -2
- package/lib/resources/bundles.js.map +1 -1
- package/lib/resources/buy_x_pay_y_promotions.cjs.map +1 -1
- package/lib/resources/buy_x_pay_y_promotions.d.cts +2 -2
- package/lib/resources/buy_x_pay_y_promotions.d.ts +2 -2
- package/lib/resources/buy_x_pay_y_promotions.js.map +1 -1
- package/lib/resources/captures.cjs.map +1 -1
- package/lib/resources/captures.d.cts +2 -2
- package/lib/resources/captures.d.ts +2 -2
- package/lib/resources/captures.js.map +1 -1
- package/lib/resources/carrier_accounts.cjs.map +1 -1
- package/lib/resources/carrier_accounts.d.cts +2 -2
- package/lib/resources/carrier_accounts.d.ts +2 -2
- package/lib/resources/carrier_accounts.js.map +1 -1
- package/lib/resources/checkout_com_gateways.cjs.map +1 -1
- package/lib/resources/checkout_com_gateways.d.cts +2 -2
- package/lib/resources/checkout_com_gateways.d.ts +2 -2
- package/lib/resources/checkout_com_gateways.js.map +1 -1
- package/lib/resources/checkout_com_payments.cjs.map +1 -1
- package/lib/resources/checkout_com_payments.d.cts +2 -2
- package/lib/resources/checkout_com_payments.d.ts +2 -2
- package/lib/resources/checkout_com_payments.js.map +1 -1
- package/lib/resources/cleanups.cjs.map +1 -1
- package/lib/resources/cleanups.d.cts +2 -2
- package/lib/resources/cleanups.d.ts +2 -2
- package/lib/resources/cleanups.js.map +1 -1
- package/lib/resources/coupon_codes_promotion_rules.cjs.map +1 -1
- package/lib/resources/coupon_codes_promotion_rules.d.cts +2 -2
- package/lib/resources/coupon_codes_promotion_rules.d.ts +2 -2
- package/lib/resources/coupon_codes_promotion_rules.js.map +1 -1
- package/lib/resources/coupon_recipients.cjs.map +1 -1
- package/lib/resources/coupon_recipients.d.cts +2 -2
- package/lib/resources/coupon_recipients.d.ts +2 -2
- package/lib/resources/coupon_recipients.js.map +1 -1
- package/lib/resources/coupons.cjs.map +1 -1
- package/lib/resources/coupons.d.cts +2 -2
- package/lib/resources/coupons.d.ts +2 -2
- package/lib/resources/coupons.js.map +1 -1
- package/lib/resources/custom_promotion_rules.cjs.map +1 -1
- package/lib/resources/custom_promotion_rules.d.cts +2 -2
- package/lib/resources/custom_promotion_rules.d.ts +2 -2
- package/lib/resources/custom_promotion_rules.js.map +1 -1
- package/lib/resources/customer_addresses.cjs.map +1 -1
- package/lib/resources/customer_addresses.d.cts +2 -2
- package/lib/resources/customer_addresses.d.ts +2 -2
- package/lib/resources/customer_addresses.js.map +1 -1
- package/lib/resources/customer_groups.cjs.map +1 -1
- package/lib/resources/customer_groups.d.cts +2 -2
- package/lib/resources/customer_groups.d.ts +2 -2
- package/lib/resources/customer_groups.js.map +1 -1
- package/lib/resources/customer_password_resets.cjs.map +1 -1
- package/lib/resources/customer_password_resets.d.cts +2 -2
- package/lib/resources/customer_password_resets.d.ts +2 -2
- package/lib/resources/customer_password_resets.js.map +1 -1
- package/lib/resources/customer_payment_sources.cjs.map +1 -1
- package/lib/resources/customer_payment_sources.d.cts +2 -2
- package/lib/resources/customer_payment_sources.d.ts +2 -2
- package/lib/resources/customer_payment_sources.js.map +1 -1
- package/lib/resources/customer_subscriptions.cjs.map +1 -1
- package/lib/resources/customer_subscriptions.d.cts +2 -2
- package/lib/resources/customer_subscriptions.d.ts +2 -2
- package/lib/resources/customer_subscriptions.js.map +1 -1
- package/lib/resources/customers.cjs.map +1 -1
- package/lib/resources/customers.d.cts +2 -2
- package/lib/resources/customers.d.ts +2 -2
- package/lib/resources/customers.js.map +1 -1
- package/lib/resources/delivery_lead_times.cjs.map +1 -1
- package/lib/resources/delivery_lead_times.d.cts +2 -2
- package/lib/resources/delivery_lead_times.d.ts +2 -2
- package/lib/resources/delivery_lead_times.js.map +1 -1
- package/lib/resources/discount_engine_items.cjs.map +1 -1
- package/lib/resources/discount_engine_items.d.cts +2 -2
- package/lib/resources/discount_engine_items.d.ts +2 -2
- package/lib/resources/discount_engine_items.js.map +1 -1
- package/lib/resources/discount_engines.cjs.map +1 -1
- package/lib/resources/discount_engines.d.cts +2 -2
- package/lib/resources/discount_engines.d.ts +2 -2
- package/lib/resources/discount_engines.js.map +1 -1
- package/lib/resources/easypost_pickups.cjs.map +1 -1
- package/lib/resources/easypost_pickups.d.cts +2 -2
- package/lib/resources/easypost_pickups.d.ts +2 -2
- package/lib/resources/easypost_pickups.js.map +1 -1
- package/lib/resources/event_callbacks.cjs.map +1 -1
- package/lib/resources/event_callbacks.d.cts +2 -2
- package/lib/resources/event_callbacks.d.ts +2 -2
- package/lib/resources/event_callbacks.js.map +1 -1
- package/lib/resources/events.cjs.map +1 -1
- package/lib/resources/events.d.cts +2 -2
- package/lib/resources/events.d.ts +2 -2
- package/lib/resources/events.js.map +1 -1
- package/lib/resources/exports.cjs.map +1 -1
- package/lib/resources/exports.d.cts +2 -2
- package/lib/resources/exports.d.ts +2 -2
- package/lib/resources/exports.js.map +1 -1
- package/lib/resources/external_gateways.cjs.map +1 -1
- package/lib/resources/external_gateways.d.cts +2 -2
- package/lib/resources/external_gateways.d.ts +2 -2
- package/lib/resources/external_gateways.js.map +1 -1
- package/lib/resources/external_payments.cjs.map +1 -1
- package/lib/resources/external_payments.d.cts +2 -2
- package/lib/resources/external_payments.d.ts +2 -2
- package/lib/resources/external_payments.js.map +1 -1
- package/lib/resources/external_promotions.cjs.map +1 -1
- package/lib/resources/external_promotions.d.cts +2 -2
- package/lib/resources/external_promotions.d.ts +2 -2
- package/lib/resources/external_promotions.js.map +1 -1
- package/lib/resources/external_tax_calculators.cjs.map +1 -1
- package/lib/resources/external_tax_calculators.d.cts +2 -2
- package/lib/resources/external_tax_calculators.d.ts +2 -2
- package/lib/resources/external_tax_calculators.js.map +1 -1
- package/lib/resources/fixed_amount_promotions.cjs.map +1 -1
- package/lib/resources/fixed_amount_promotions.d.cts +2 -2
- package/lib/resources/fixed_amount_promotions.d.ts +2 -2
- package/lib/resources/fixed_amount_promotions.js.map +1 -1
- package/lib/resources/fixed_price_promotions.cjs.map +1 -1
- package/lib/resources/fixed_price_promotions.d.cts +2 -2
- package/lib/resources/fixed_price_promotions.d.ts +2 -2
- package/lib/resources/fixed_price_promotions.js.map +1 -1
- package/lib/resources/flex_promotions.cjs.map +1 -1
- package/lib/resources/flex_promotions.d.cts +2 -2
- package/lib/resources/flex_promotions.d.ts +2 -2
- package/lib/resources/flex_promotions.js.map +1 -1
- package/lib/resources/free_gift_promotions.cjs.map +1 -1
- package/lib/resources/free_gift_promotions.d.cts +2 -2
- package/lib/resources/free_gift_promotions.d.ts +2 -2
- package/lib/resources/free_gift_promotions.js.map +1 -1
- package/lib/resources/free_shipping_promotions.cjs.map +1 -1
- package/lib/resources/free_shipping_promotions.d.cts +2 -2
- package/lib/resources/free_shipping_promotions.d.ts +2 -2
- package/lib/resources/free_shipping_promotions.js.map +1 -1
- package/lib/resources/geocoders.cjs.map +1 -1
- package/lib/resources/geocoders.d.cts +2 -2
- package/lib/resources/geocoders.d.ts +2 -2
- package/lib/resources/geocoders.js.map +1 -1
- package/lib/resources/gift_card_recipients.cjs.map +1 -1
- package/lib/resources/gift_card_recipients.d.cts +2 -2
- package/lib/resources/gift_card_recipients.d.ts +2 -2
- package/lib/resources/gift_card_recipients.js.map +1 -1
- package/lib/resources/gift_cards.cjs.map +1 -1
- package/lib/resources/gift_cards.d.cts +2 -2
- package/lib/resources/gift_cards.d.ts +2 -2
- package/lib/resources/gift_cards.js.map +1 -1
- package/lib/resources/google_geocoders.cjs.map +1 -1
- package/lib/resources/google_geocoders.d.cts +2 -2
- package/lib/resources/google_geocoders.d.ts +2 -2
- package/lib/resources/google_geocoders.js.map +1 -1
- package/lib/resources/imports.cjs.map +1 -1
- package/lib/resources/imports.d.cts +2 -2
- package/lib/resources/imports.d.ts +2 -2
- package/lib/resources/imports.js.map +1 -1
- package/lib/resources/in_stock_subscriptions.cjs.map +1 -1
- package/lib/resources/in_stock_subscriptions.d.cts +2 -2
- package/lib/resources/in_stock_subscriptions.d.ts +2 -2
- package/lib/resources/in_stock_subscriptions.js.map +1 -1
- package/lib/resources/inventory_models.cjs.map +1 -1
- package/lib/resources/inventory_models.d.cts +2 -2
- package/lib/resources/inventory_models.d.ts +2 -2
- package/lib/resources/inventory_models.js.map +1 -1
- package/lib/resources/inventory_return_locations.cjs.map +1 -1
- package/lib/resources/inventory_return_locations.d.cts +2 -2
- package/lib/resources/inventory_return_locations.d.ts +2 -2
- package/lib/resources/inventory_return_locations.js.map +1 -1
- package/lib/resources/inventory_stock_locations.cjs.map +1 -1
- package/lib/resources/inventory_stock_locations.d.cts +2 -2
- package/lib/resources/inventory_stock_locations.d.ts +2 -2
- package/lib/resources/inventory_stock_locations.js.map +1 -1
- package/lib/resources/klarna_gateways.cjs.map +1 -1
- package/lib/resources/klarna_gateways.d.cts +2 -2
- package/lib/resources/klarna_gateways.d.ts +2 -2
- package/lib/resources/klarna_gateways.js.map +1 -1
- package/lib/resources/klarna_payments.cjs.map +1 -1
- package/lib/resources/klarna_payments.d.cts +2 -2
- package/lib/resources/klarna_payments.d.ts +2 -2
- package/lib/resources/klarna_payments.js.map +1 -1
- package/lib/resources/line_item_options.cjs.map +1 -1
- package/lib/resources/line_item_options.d.cts +2 -2
- package/lib/resources/line_item_options.d.ts +2 -2
- package/lib/resources/line_item_options.js.map +1 -1
- package/lib/resources/line_items.cjs.map +1 -1
- package/lib/resources/line_items.d.cts +2 -2
- package/lib/resources/line_items.d.ts +2 -2
- package/lib/resources/line_items.js.map +1 -1
- package/lib/resources/links.cjs.map +1 -1
- package/lib/resources/links.d.cts +2 -2
- package/lib/resources/links.d.ts +2 -2
- package/lib/resources/links.js.map +1 -1
- package/lib/resources/manual_gateways.cjs.map +1 -1
- package/lib/resources/manual_gateways.d.cts +2 -2
- package/lib/resources/manual_gateways.d.ts +2 -2
- package/lib/resources/manual_gateways.js.map +1 -1
- package/lib/resources/manual_tax_calculators.cjs.map +1 -1
- package/lib/resources/manual_tax_calculators.d.cts +2 -2
- package/lib/resources/manual_tax_calculators.d.ts +2 -2
- package/lib/resources/manual_tax_calculators.js.map +1 -1
- package/lib/resources/markets.cjs +4 -0
- package/lib/resources/markets.cjs.map +1 -1
- package/lib/resources/markets.d.cts +2 -2
- package/lib/resources/markets.d.ts +2 -2
- package/lib/resources/markets.js +4 -0
- package/lib/resources/markets.js.map +1 -1
- package/lib/resources/merchants.cjs.map +1 -1
- package/lib/resources/merchants.d.cts +2 -2
- package/lib/resources/merchants.d.ts +2 -2
- package/lib/resources/merchants.js.map +1 -1
- package/lib/resources/notifications.cjs.map +1 -1
- package/lib/resources/notifications.d.cts +2 -2
- package/lib/resources/notifications.d.ts +2 -2
- package/lib/resources/notifications.js.map +1 -1
- package/lib/resources/order_amount_promotion_rules.cjs.map +1 -1
- package/lib/resources/order_amount_promotion_rules.d.cts +2 -2
- package/lib/resources/order_amount_promotion_rules.d.ts +2 -2
- package/lib/resources/order_amount_promotion_rules.js.map +1 -1
- package/lib/resources/order_copies.cjs.map +1 -1
- package/lib/resources/order_copies.d.cts +2 -2
- package/lib/resources/order_copies.d.ts +2 -2
- package/lib/resources/order_copies.js.map +1 -1
- package/lib/resources/order_factories.cjs.map +1 -1
- package/lib/resources/order_factories.d.cts +2 -2
- package/lib/resources/order_factories.d.ts +2 -2
- package/lib/resources/order_factories.js.map +1 -1
- package/lib/resources/order_subscription_items.cjs.map +1 -1
- package/lib/resources/order_subscription_items.d.cts +2 -2
- package/lib/resources/order_subscription_items.d.ts +2 -2
- package/lib/resources/order_subscription_items.js.map +1 -1
- package/lib/resources/order_subscriptions.cjs.map +1 -1
- package/lib/resources/order_subscriptions.d.cts +2 -2
- package/lib/resources/order_subscriptions.d.ts +2 -2
- package/lib/resources/order_subscriptions.js.map +1 -1
- package/lib/resources/orders.cjs +4 -0
- package/lib/resources/orders.cjs.map +1 -1
- package/lib/resources/orders.d.cts +2 -2
- package/lib/resources/orders.d.ts +2 -2
- package/lib/resources/orders.js +4 -0
- package/lib/resources/orders.js.map +1 -1
- package/lib/resources/organizations.cjs.map +1 -1
- package/lib/resources/organizations.d.cts +2 -2
- package/lib/resources/organizations.d.ts +2 -2
- package/lib/resources/organizations.js.map +1 -1
- package/lib/resources/packages.cjs.map +1 -1
- package/lib/resources/packages.d.cts +2 -2
- package/lib/resources/packages.d.ts +2 -2
- package/lib/resources/packages.js.map +1 -1
- package/lib/resources/parcel_line_items.cjs.map +1 -1
- package/lib/resources/parcel_line_items.d.cts +2 -2
- package/lib/resources/parcel_line_items.d.ts +2 -2
- package/lib/resources/parcel_line_items.js.map +1 -1
- package/lib/resources/parcels.cjs.map +1 -1
- package/lib/resources/parcels.d.cts +2 -2
- package/lib/resources/parcels.d.ts +2 -2
- package/lib/resources/parcels.js.map +1 -1
- package/lib/resources/payment_gateways.cjs.map +1 -1
- package/lib/resources/payment_gateways.d.cts +2 -2
- package/lib/resources/payment_gateways.d.ts +2 -2
- package/lib/resources/payment_gateways.js.map +1 -1
- package/lib/resources/payment_methods.cjs.map +1 -1
- package/lib/resources/payment_methods.d.cts +2 -2
- package/lib/resources/payment_methods.d.ts +2 -2
- package/lib/resources/payment_methods.js.map +1 -1
- package/lib/resources/payment_options.cjs.map +1 -1
- package/lib/resources/payment_options.d.cts +2 -2
- package/lib/resources/payment_options.d.ts +2 -2
- package/lib/resources/payment_options.js.map +1 -1
- package/lib/resources/paypal_gateways.cjs.map +1 -1
- package/lib/resources/paypal_gateways.d.cts +2 -2
- package/lib/resources/paypal_gateways.d.ts +2 -2
- package/lib/resources/paypal_gateways.js.map +1 -1
- package/lib/resources/paypal_payments.cjs.map +1 -1
- package/lib/resources/paypal_payments.d.cts +2 -2
- package/lib/resources/paypal_payments.d.ts +2 -2
- package/lib/resources/paypal_payments.js.map +1 -1
- package/lib/resources/percentage_discount_promotions.cjs.map +1 -1
- package/lib/resources/percentage_discount_promotions.d.cts +2 -2
- package/lib/resources/percentage_discount_promotions.d.ts +2 -2
- package/lib/resources/percentage_discount_promotions.js.map +1 -1
- package/lib/resources/pickups.cjs.map +1 -1
- package/lib/resources/pickups.d.cts +2 -2
- package/lib/resources/pickups.d.ts +2 -2
- package/lib/resources/pickups.js.map +1 -1
- package/lib/resources/price_frequency_tiers.cjs.map +1 -1
- package/lib/resources/price_frequency_tiers.d.cts +2 -2
- package/lib/resources/price_frequency_tiers.d.ts +2 -2
- package/lib/resources/price_frequency_tiers.js.map +1 -1
- package/lib/resources/price_list_schedulers.cjs.map +1 -1
- package/lib/resources/price_list_schedulers.d.cts +2 -2
- package/lib/resources/price_list_schedulers.d.ts +2 -2
- package/lib/resources/price_list_schedulers.js.map +1 -1
- package/lib/resources/price_lists.cjs.map +1 -1
- package/lib/resources/price_lists.d.cts +2 -2
- package/lib/resources/price_lists.d.ts +2 -2
- package/lib/resources/price_lists.js.map +1 -1
- package/lib/resources/price_tiers.cjs.map +1 -1
- package/lib/resources/price_tiers.d.cts +2 -2
- package/lib/resources/price_tiers.d.ts +2 -2
- package/lib/resources/price_tiers.js.map +1 -1
- package/lib/resources/price_volume_tiers.cjs.map +1 -1
- package/lib/resources/price_volume_tiers.d.cts +2 -2
- package/lib/resources/price_volume_tiers.d.ts +2 -2
- package/lib/resources/price_volume_tiers.js.map +1 -1
- package/lib/resources/prices.cjs.map +1 -1
- package/lib/resources/prices.d.cts +2 -2
- package/lib/resources/prices.d.ts +2 -2
- package/lib/resources/prices.js.map +1 -1
- package/lib/resources/promotion_rules.cjs.map +1 -1
- package/lib/resources/promotion_rules.d.cts +2 -2
- package/lib/resources/promotion_rules.d.ts +2 -2
- package/lib/resources/promotion_rules.js.map +1 -1
- package/lib/resources/promotions.cjs.map +1 -1
- package/lib/resources/promotions.d.cts +2 -2
- package/lib/resources/promotions.d.ts +2 -2
- package/lib/resources/promotions.js.map +1 -1
- package/lib/resources/recurring_order_copies.cjs.map +1 -1
- package/lib/resources/recurring_order_copies.d.cts +2 -2
- package/lib/resources/recurring_order_copies.d.ts +2 -2
- package/lib/resources/recurring_order_copies.js.map +1 -1
- package/lib/resources/refunds.cjs.map +1 -1
- package/lib/resources/refunds.d.cts +2 -2
- package/lib/resources/refunds.d.ts +2 -2
- package/lib/resources/refunds.js.map +1 -1
- package/lib/resources/reserved_stocks.cjs.map +1 -1
- package/lib/resources/reserved_stocks.d.cts +2 -2
- package/lib/resources/reserved_stocks.d.ts +2 -2
- package/lib/resources/reserved_stocks.js.map +1 -1
- package/lib/resources/resource_errors.cjs.map +1 -1
- package/lib/resources/resource_errors.d.cts +2 -2
- package/lib/resources/resource_errors.d.ts +2 -2
- package/lib/resources/resource_errors.js.map +1 -1
- package/lib/resources/return_line_items.cjs.map +1 -1
- package/lib/resources/return_line_items.d.cts +2 -2
- package/lib/resources/return_line_items.d.ts +2 -2
- package/lib/resources/return_line_items.js.map +1 -1
- package/lib/resources/returns.cjs.map +1 -1
- package/lib/resources/returns.d.cts +2 -2
- package/lib/resources/returns.d.ts +2 -2
- package/lib/resources/returns.js.map +1 -1
- package/lib/resources/satispay_gateways.cjs.map +1 -1
- package/lib/resources/satispay_gateways.d.cts +2 -2
- package/lib/resources/satispay_gateways.d.ts +2 -2
- package/lib/resources/satispay_gateways.js.map +1 -1
- package/lib/resources/satispay_payments.cjs.map +1 -1
- package/lib/resources/satispay_payments.d.cts +2 -2
- package/lib/resources/satispay_payments.d.ts +2 -2
- package/lib/resources/satispay_payments.js.map +1 -1
- package/lib/resources/shipments.cjs.map +1 -1
- package/lib/resources/shipments.d.cts +2 -2
- package/lib/resources/shipments.d.ts +2 -2
- package/lib/resources/shipments.js.map +1 -1
- package/lib/resources/shipping_categories.cjs.map +1 -1
- package/lib/resources/shipping_categories.d.cts +2 -2
- package/lib/resources/shipping_categories.d.ts +2 -2
- package/lib/resources/shipping_categories.js.map +1 -1
- package/lib/resources/shipping_method_tiers.cjs.map +1 -1
- package/lib/resources/shipping_method_tiers.d.cts +2 -2
- package/lib/resources/shipping_method_tiers.d.ts +2 -2
- package/lib/resources/shipping_method_tiers.js.map +1 -1
- package/lib/resources/shipping_methods.cjs.map +1 -1
- package/lib/resources/shipping_methods.d.cts +2 -2
- package/lib/resources/shipping_methods.d.ts +2 -2
- package/lib/resources/shipping_methods.js.map +1 -1
- package/lib/resources/shipping_weight_tiers.cjs.map +1 -1
- package/lib/resources/shipping_weight_tiers.d.cts +2 -2
- package/lib/resources/shipping_weight_tiers.d.ts +2 -2
- package/lib/resources/shipping_weight_tiers.js.map +1 -1
- package/lib/resources/shipping_zones.cjs.map +1 -1
- package/lib/resources/shipping_zones.d.cts +2 -2
- package/lib/resources/shipping_zones.d.ts +2 -2
- package/lib/resources/shipping_zones.js.map +1 -1
- package/lib/resources/sku_list_items.cjs.map +1 -1
- package/lib/resources/sku_list_items.d.cts +2 -2
- package/lib/resources/sku_list_items.d.ts +2 -2
- package/lib/resources/sku_list_items.js.map +1 -1
- package/lib/resources/sku_list_promotion_rules.cjs.map +1 -1
- package/lib/resources/sku_list_promotion_rules.d.cts +2 -2
- package/lib/resources/sku_list_promotion_rules.d.ts +2 -2
- package/lib/resources/sku_list_promotion_rules.js.map +1 -1
- package/lib/resources/sku_lists.cjs.map +1 -1
- package/lib/resources/sku_lists.d.cts +2 -2
- package/lib/resources/sku_lists.d.ts +2 -2
- package/lib/resources/sku_lists.js.map +1 -1
- package/lib/resources/sku_options.cjs.map +1 -1
- package/lib/resources/sku_options.d.cts +2 -2
- package/lib/resources/sku_options.d.ts +2 -2
- package/lib/resources/sku_options.js.map +1 -1
- package/lib/resources/skus.cjs.map +1 -1
- package/lib/resources/skus.d.cts +2 -2
- package/lib/resources/skus.d.ts +2 -2
- package/lib/resources/skus.js.map +1 -1
- package/lib/resources/stock_items.cjs.map +1 -1
- package/lib/resources/stock_items.d.cts +2 -2
- package/lib/resources/stock_items.d.ts +2 -2
- package/lib/resources/stock_items.js.map +1 -1
- package/lib/resources/stock_line_items.cjs.map +1 -1
- package/lib/resources/stock_line_items.d.cts +2 -2
- package/lib/resources/stock_line_items.d.ts +2 -2
- package/lib/resources/stock_line_items.js.map +1 -1
- package/lib/resources/stock_locations.cjs.map +1 -1
- package/lib/resources/stock_locations.d.cts +2 -2
- package/lib/resources/stock_locations.d.ts +2 -2
- package/lib/resources/stock_locations.js.map +1 -1
- package/lib/resources/stock_reservations.cjs.map +1 -1
- package/lib/resources/stock_reservations.d.cts +2 -2
- package/lib/resources/stock_reservations.d.ts +2 -2
- package/lib/resources/stock_reservations.js.map +1 -1
- package/lib/resources/stock_transfers.cjs.map +1 -1
- package/lib/resources/stock_transfers.d.cts +2 -2
- package/lib/resources/stock_transfers.d.ts +2 -2
- package/lib/resources/stock_transfers.js.map +1 -1
- package/lib/resources/stores.cjs.map +1 -1
- package/lib/resources/stores.d.cts +2 -2
- package/lib/resources/stores.d.ts +2 -2
- package/lib/resources/stores.js.map +1 -1
- package/lib/resources/stripe_gateways.cjs.map +1 -1
- package/lib/resources/stripe_gateways.d.cts +2 -2
- package/lib/resources/stripe_gateways.d.ts +2 -2
- package/lib/resources/stripe_gateways.js.map +1 -1
- package/lib/resources/stripe_payments.cjs.map +1 -1
- package/lib/resources/stripe_payments.d.cts +2 -2
- package/lib/resources/stripe_payments.d.ts +2 -2
- package/lib/resources/stripe_payments.js.map +1 -1
- package/lib/resources/stripe_tax_accounts.cjs.map +1 -1
- package/lib/resources/stripe_tax_accounts.d.cts +2 -2
- package/lib/resources/stripe_tax_accounts.d.ts +2 -2
- package/lib/resources/stripe_tax_accounts.js.map +1 -1
- package/lib/resources/subscription_models.cjs.map +1 -1
- package/lib/resources/subscription_models.d.cts +2 -2
- package/lib/resources/subscription_models.d.ts +2 -2
- package/lib/resources/subscription_models.js.map +1 -1
- package/lib/resources/tags.cjs.map +1 -1
- package/lib/resources/tags.d.cts +2 -2
- package/lib/resources/tags.d.ts +2 -2
- package/lib/resources/tags.js.map +1 -1
- package/lib/resources/talon_one_accounts.cjs.map +1 -1
- package/lib/resources/talon_one_accounts.d.cts +2 -2
- package/lib/resources/talon_one_accounts.d.ts +2 -2
- package/lib/resources/talon_one_accounts.js.map +1 -1
- package/lib/resources/tax_calculators.cjs.map +1 -1
- package/lib/resources/tax_calculators.d.cts +2 -2
- package/lib/resources/tax_calculators.d.ts +2 -2
- package/lib/resources/tax_calculators.js.map +1 -1
- package/lib/resources/tax_categories.cjs.map +1 -1
- package/lib/resources/tax_categories.d.cts +2 -2
- package/lib/resources/tax_categories.d.ts +2 -2
- package/lib/resources/tax_categories.js.map +1 -1
- package/lib/resources/tax_rules.cjs.map +1 -1
- package/lib/resources/tax_rules.d.cts +2 -2
- package/lib/resources/tax_rules.d.ts +2 -2
- package/lib/resources/tax_rules.js.map +1 -1
- package/lib/resources/taxjar_accounts.cjs.map +1 -1
- package/lib/resources/taxjar_accounts.d.cts +2 -2
- package/lib/resources/taxjar_accounts.d.ts +2 -2
- package/lib/resources/taxjar_accounts.js.map +1 -1
- package/lib/resources/transactions.cjs.map +1 -1
- package/lib/resources/transactions.d.cts +2 -2
- package/lib/resources/transactions.d.ts +2 -2
- package/lib/resources/transactions.js.map +1 -1
- package/lib/resources/versions.cjs.map +1 -1
- package/lib/resources/versions.d.cts +2 -2
- package/lib/resources/versions.d.ts +2 -2
- package/lib/resources/versions.js.map +1 -1
- package/lib/resources/vertex_accounts.cjs.map +1 -1
- package/lib/resources/vertex_accounts.d.cts +2 -2
- package/lib/resources/vertex_accounts.d.ts +2 -2
- package/lib/resources/vertex_accounts.js.map +1 -1
- package/lib/resources/voids.cjs.map +1 -1
- package/lib/resources/voids.d.cts +2 -2
- package/lib/resources/voids.d.ts +2 -2
- package/lib/resources/voids.js.map +1 -1
- package/lib/resources/webhooks.cjs.map +1 -1
- package/lib/resources/webhooks.d.cts +2 -2
- package/lib/resources/webhooks.d.ts +2 -2
- package/lib/resources/webhooks.js.map +1 -1
- package/lib/resources/wire_transfers.cjs.map +1 -1
- package/lib/resources/wire_transfers.d.cts +2 -2
- package/lib/resources/wire_transfers.d.ts +2 -2
- package/lib/resources/wire_transfers.js.map +1 -1
- package/lib/static.d.cts +2 -2
- package/lib/static.d.ts +2 -2
- package/package.json +15 -4
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../src/resources/stripe_payments.ts"],"names":[],"mappings":";;AAsJA,MAAM,uBAAuB,WAA2B,CAAA;AAAA,EAEvD,OAAgB,IAA0B,GAAA,iBAAA;AAAA,EAE1C,MAAM,MAAA,CAAO,QAA+B,EAAA,MAAA,EAA6C,OAAmD,EAAA;AAC3I,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAA2C,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,cAAe,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAC7H,EAEA,MAAM,MAAA,CAAO,QAA+B,EAAA,MAAA,EAA6C,OAAmD,EAAA;AAC3I,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAA2C,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,cAAe,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAC7H,EAEA,MAAM,MAAO,CAAA,EAAA,EAAyB,OAA0C,EAAA;AAC/E,IAAA,MAAM,IAAK,CAAA,SAAA,CAAU,MAAQ,CAAA,OAAO,EAAO,KAAA,QAA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AA,EAAM,SAAS,IAAK,EAAA,EAAG,QAAQ,OAAO,CAAA;AAAA;AACxK,EAEA,MAAM,QAAA,CAAS,EAA4B,EAAA,MAAA,EAA6C,OAAmD,EAAA;AAC1I,IAAA,OAAO,KAAK,SAAU,CAAA,MAAA,CAA2C,EAAE,EAAK,EAAA,OAAO,OAAO,QAAW,GAAA,EAAA,GAAI,EAAG,CAAA,EAAA,EAAI,MAAM,cAAe,CAAA,IAAA,EAAM,UAAU,IAAK,EAAA,EAAG,QAAQ,OAAO,CAAA;AAAA;AACzK,EAGA,gBAAgB,QAA0C,EAAA;AACzD,IAAA,OAAO,QAAS,CAAA,IAAA,IAAS,QAAS,CAAA,IAAA,KAAS,cAAe,CAAA,IAAA;AAAA;AAC3D,EAGA,aAAa,EAAkD,EAAA;AAC9D,IAAO,OAAA,KAAA,CAAM,qBAAuC,EAAE,CAAA;AAAA;AACvD,EAEA,sBAAsB,GAAmC,EAAA;AACxD,IAAO,OAAA,KAAA,CAAM,qBAAwC,CAAA,GAAG,GAAG,CAAA;AAAA;AAC5D,EAGA,IAA0B,GAAA;AACzB,IAAA,OAAO,cAAe,CAAA,IAAA;AAAA;AAGxB;AAGA,MAAM,QAAA,GAAW,IAAI,cAAe,EAAA;AACpC,IAAO,uBAAQ,GAAA","file":"stripe_payments.js","sourcesContent":["import { ApiResource } from '../resource'\nimport type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { Order, OrderType } from './orders'\nimport type { PaymentGateway } from './payment_gateways'\nimport type { Version } from './versions'\n\n\ntype StripePaymentType = 'stripe_payments'\ntype StripePaymentRel = ResourceRel & { type: StripePaymentType }\ntype OrderRel = ResourceRel & { type: OrderType }\n\n\nexport type StripePaymentSort = Pick<StripePayment, 'id'> & ResourceSort\n// export type StripePaymentFilter = Pick<StripePayment, 'id'> & ResourceFilter\n\n\ninterface StripePayment extends Resource {\n\t\n\treadonly type: StripePaymentType\n\n\t/** \n\t * The Stripe payment intent ID. Required to identify a payment session on stripe.\n\t * @example ```\"pi_1234XXX\"```\n\t */\n\tstripe_id?: string | null\n\t/** \n\t * The Stripe payment intent client secret. Required to create a charge through Stripe.js.\n\t * @example ```\"pi_1234XXX_secret_5678YYY\"```\n\t */\n\tclient_secret?: string | null\n\t/** \n\t * The Stripe charge ID. Identifies money movement upon the payment intent confirmation.\n\t * @example ```\"ch_1234XXX\"```\n\t */\n\tcharge_id?: string | null\n\t/** \n\t * The Stripe publishable API key.\n\t * @example ```\"pk_live_xxxx-yyyy-zzzz\"```\n\t */\n\tpublishable_key?: string | null\n\t/** \n\t * The Stripe account ID that these funds are intended for.\n\t * @example ```\"xxxx-yyyy-zzzz\"```\n\t */\n\ton_behalf_of?: string | null\n\t/** \n\t * A string that identifies the resulting payment as part of a group.\n\t * @example ```\"xxxx-yyyy-zzzz\"```\n\t */\n\ttransfer_group?: string | null\n\t/** \n\t * Stripe payment options: 'customer', 'payment_method', 'return_url', etc. Check Stripe payment intent API for more details.\n\t * @example ```{\"customer\":\"cus_xxx\",\"payment_method\":\"pm_xxx\"}```\n\t */\n\toptions?: Record<string, any> | null\n\t/** \n\t * Stripe 'payment_method', set by webhook.\n\t * @example ```{\"id\":\"pm_xxx\"}```\n\t */\n\tpayment_method?: Record<string, any> | null\n\t/** \n\t * Indicates if the order current amount differs form the one of the created payment intent.\n\t */\n\tmismatched_amounts?: boolean | null\n\t/** \n\t * The URL to return to when a redirect payment is completed.\n\t * @example ```\"https://yourdomain.com/thankyou\"```\n\t */\n\treturn_url?: string | null\n\t/** \n\t * The email address to send the receipt to.\n\t * @example ```\"john@example.com\"```\n\t */\n\treceipt_email?: string | null\n\t/** \n\t * Information about the payment instrument used in the transaction.\n\t * @example ```{\"issuer\":\"cl bank\",\"card_type\":\"visa\"}```\n\t */\n\tpayment_instrument?: Record<string, any> | null\n\n\torder?: Order | null\n\tpayment_gateway?: PaymentGateway | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface StripePaymentCreate extends ResourceCreate {\n\t\n\t/** \n\t * The Stripe payment intent ID. Required to identify a payment session on stripe.\n\t * @example ```\"pi_1234XXX\"```\n\t */\n\tstripe_id?: string | null\n\t/** \n\t * The Stripe payment intent client secret. Required to create a charge through Stripe.js.\n\t * @example ```\"pi_1234XXX_secret_5678YYY\"```\n\t */\n\tclient_secret?: string | null\n\t/** \n\t * Stripe payment options: 'customer', 'payment_method', 'return_url', etc. Check Stripe payment intent API for more details.\n\t * @example ```{\"customer\":\"cus_xxx\",\"payment_method\":\"pm_xxx\"}```\n\t */\n\toptions?: Record<string, any> | null\n\t/** \n\t * The URL to return to when a redirect payment is completed.\n\t * @example ```\"https://yourdomain.com/thankyou\"```\n\t */\n\treturn_url?: string | null\n\t/** \n\t * The email address to send the receipt to.\n\t * @example ```\"john@example.com\"```\n\t */\n\treceipt_email?: string | null\n\n\torder: OrderRel\n\n}\n\n\ninterface StripePaymentUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * Stripe payment options: 'customer', 'payment_method', 'return_url', etc. Check Stripe payment intent API for more details.\n\t * @example ```{\"customer\":\"cus_xxx\",\"payment_method\":\"pm_xxx\"}```\n\t */\n\toptions?: Record<string, any> | null\n\t/** \n\t * The URL to return to when a redirect payment is completed.\n\t * @example ```\"https://yourdomain.com/thankyou\"```\n\t */\n\treturn_url?: string | null\n\t/** \n\t * Send this attribute if you want to update the created payment intent with fresh order data.\n\t * @example ```true```\n\t */\n\t_update?: boolean | null\n\t/** \n\t * Send this attribute if you want to refresh the payment status, can be used as webhooks fallback logic.\n\t * @example ```true```\n\t */\n\t_refresh?: boolean | null\n\n\torder?: OrderRel | null\n\n}\n\n\nclass StripePayments extends ApiResource<StripePayment> {\n\n\tstatic readonly TYPE: StripePaymentType = 'stripe_payments' as const\n\n\tasync create(resource: StripePaymentCreate, params?: QueryParamsRetrieve<StripePayment>, options?: ResourcesConfig): Promise<StripePayment> {\n\t\treturn this.resources.create<StripePaymentCreate, StripePayment>({ ...resource, type: StripePayments.TYPE }, params, options)\n\t}\n\n\tasync update(resource: StripePaymentUpdate, params?: QueryParamsRetrieve<StripePayment>, options?: ResourcesConfig): Promise<StripePayment> {\n\t\treturn this.resources.update<StripePaymentUpdate, StripePayment>({ ...resource, type: StripePayments.TYPE }, params, options)\n\t}\n\n\tasync delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void> {\n\t\tawait this.resources.delete((typeof id === 'string')? { id, type: StripePayments.TYPE } : id, options)\n\t}\n\n\tasync order(stripePaymentId: string | StripePayment, params?: QueryParamsRetrieve<Order>, options?: ResourcesConfig): Promise<Order> {\n\t\tconst _stripePaymentId = (stripePaymentId as StripePayment).id || stripePaymentId as string\n\t\treturn this.resources.fetch<Order>({ type: 'orders' }, `stripe_payments/${_stripePaymentId}/order`, params, options) as unknown as Order\n\t}\n\n\tasync payment_gateway(stripePaymentId: string | StripePayment, params?: QueryParamsRetrieve<PaymentGateway>, options?: ResourcesConfig): Promise<PaymentGateway> {\n\t\tconst _stripePaymentId = (stripePaymentId as StripePayment).id || stripePaymentId as string\n\t\treturn this.resources.fetch<PaymentGateway>({ type: 'payment_gateways' }, `stripe_payments/${_stripePaymentId}/payment_gateway`, params, options) as unknown as PaymentGateway\n\t}\n\n\tasync versions(stripePaymentId: string | StripePayment, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _stripePaymentId = (stripePaymentId as StripePayment).id || stripePaymentId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `stripe_payments/${_stripePaymentId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\tasync _update(id: string | StripePayment, params?: QueryParamsRetrieve<StripePayment>, options?: ResourcesConfig): Promise<StripePayment> {\n\t\treturn this.resources.update<StripePaymentUpdate, StripePayment>({ id: (typeof id === 'string')? id: id.id, type: StripePayments.TYPE, _update: true }, params, options)\n\t}\n\n\tasync _refresh(id: string | StripePayment, params?: QueryParamsRetrieve<StripePayment>, options?: ResourcesConfig): Promise<StripePayment> {\n\t\treturn this.resources.update<StripePaymentUpdate, StripePayment>({ id: (typeof id === 'string')? id: id.id, type: StripePayments.TYPE, _refresh: true }, params, options)\n\t}\n\n\n\tisStripePayment(resource: any): resource is StripePayment {\n\t\treturn resource.type && (resource.type === StripePayments.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): StripePaymentRel {\n\t\treturn super.relationshipOneToOne<StripePaymentRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): StripePaymentRel[] {\n\t\treturn super.relationshipOneToMany<StripePaymentRel>(...ids)\n\t}\n\n\n\ttype(): StripePaymentType {\n\t\treturn StripePayments.TYPE\n\t}\n\n}\n\n\nconst instance = new StripePayments()\nexport default instance\n\nexport type { StripePayment, StripePaymentCreate, StripePaymentUpdate, StripePaymentType }\n"]}
|
1
|
+
{"version":3,"sources":["../../src/resources/stripe_payments.ts"],"names":[],"mappings":";;AA2JA,MAAM,uBAAuB,WAA2B,CAAA;AAAA,EAEvD,OAAgB,IAA0B,GAAA,iBAAA;AAAA,EAE1C,MAAM,MAAA,CAAO,QAA+B,EAAA,MAAA,EAA6C,OAAmD,EAAA;AAC3I,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAA2C,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,cAAe,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAC7H,EAEA,MAAM,MAAA,CAAO,QAA+B,EAAA,MAAA,EAA6C,OAAmD,EAAA;AAC3I,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAA2C,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,cAAe,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAC7H,EAEA,MAAM,MAAO,CAAA,EAAA,EAAyB,OAA0C,EAAA;AAC/E,IAAA,MAA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AAA,EAAA,GAAI,EAAG,CAAA,EAAA,EAAI,MAAM,cAAe,CAAA,IAAA,EAAM,SAAS,IAAK,EAAA,EAAG,QAAQ,OAAO,CAAA;AAAA;AACxK,EAEA,MAAM,QAAA,CAAS,EAA4B,EAAA,MAAA,EAA6C,OAAmD,EAAA;AAC1I,IAAA,OAAO,KAAK,SAAU,CAAA,MAAA,CAA2C,EAAE,EAAK,EAAA,OAAO,OAAO,QAAW,GAAA,EAAA,GAAI,EAAG,CAAA,EAAA,EAAI,MAAM,cAAe,CAAA,IAAA,EAAM,UAAU,IAAK,EAAA,EAAG,QAAQ,OAAO,CAAA;AAAA;AACzK,EAGA,gBAAgB,QAA0C,EAAA;AACzD,IAAA,OAAO,QAAS,CAAA,IAAA,IAAS,QAAS,CAAA,IAAA,KAAS,cAAe,CAAA,IAAA;AAAA;AAC3D,EAGA,aAAa,EAAkD,EAAA;AAC9D,IAAO,OAAA,KAAA,CAAM,qBAAuC,EAAE,CAAA;AAAA;AACvD,EAEA,sBAAsB,GAAmC,EAAA;AACxD,IAAO,OAAA,KAAA,CAAM,qBAAwC,CAAA,GAAG,GAAG,CAAA;AAAA;AAC5D,EAGA,IAA0B,GAAA;AACzB,IAAA,OAAO,cAAe,CAAA,IAAA;AAAA;AAGxB;AAGA,MAAM,QAAA,GAAW,IAAI,cAAe,EAAA;AACpC,IAAO,uBAAQ,GAAA","file":"stripe_payments.js","sourcesContent":["import { ApiResource } from '../resource'\nimport type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { Order, OrderType } from './orders'\nimport type { PaymentGateway } from './payment_gateways'\nimport type { Version } from './versions'\n\n\ntype StripePaymentType = 'stripe_payments'\ntype StripePaymentRel = ResourceRel & { type: StripePaymentType }\ntype OrderRel = ResourceRel & { type: OrderType }\n\n\nexport type StripePaymentSort = Pick<StripePayment, 'id'> & ResourceSort\n// export type StripePaymentFilter = Pick<StripePayment, 'id'> & ResourceFilter\n\n\ninterface StripePayment extends Resource {\n\t\n\treadonly type: StripePaymentType\n\n\t/** \n\t * The Stripe payment intent ID. Required to identify a payment session on stripe.\n\t * @example ```\"pi_1234XXX\"```\n\t */\n\tstripe_id?: string | null\n\t/** \n\t * The Stripe payment intent client secret. Required to create a charge through Stripe.js.\n\t * @example ```\"pi_1234XXX_secret_5678YYY\"```\n\t */\n\tclient_secret?: string | null\n\t/** \n\t * The account (if any) for which the funds of the PaymentIntent are intended.\n\t * @example ```\"acct_xxxx-yyyy-zzzz\"```\n\t */\n\tconnected_account?: string | null\n\t/** \n\t * The Stripe charge ID. Identifies money movement upon the payment intent confirmation.\n\t * @example ```\"ch_1234XXX\"```\n\t */\n\tcharge_id?: string | null\n\t/** \n\t * The Stripe publishable API key.\n\t * @example ```\"pk_live_xxxx-yyyy-zzzz\"```\n\t */\n\tpublishable_key?: string | null\n\t/** \n\t * The Stripe account ID that these funds are intended for.\n\t * @example ```\"xxxx-yyyy-zzzz\"```\n\t */\n\ton_behalf_of?: string | null\n\t/** \n\t * A string that identifies the resulting payment as part of a group.\n\t * @example ```\"xxxx-yyyy-zzzz\"```\n\t */\n\ttransfer_group?: string | null\n\t/** \n\t * Stripe payment options: 'customer', 'payment_method', 'return_url', etc. Check Stripe payment intent API for more details.\n\t * @example ```{\"customer\":\"cus_xxx\",\"payment_method\":\"pm_xxx\"}```\n\t */\n\toptions?: Record<string, any> | null\n\t/** \n\t * Stripe 'payment_method', set by webhook.\n\t * @example ```{\"id\":\"pm_xxx\"}```\n\t */\n\tpayment_method?: Record<string, any> | null\n\t/** \n\t * Indicates if the order current amount differs form the one of the created payment intent.\n\t */\n\tmismatched_amounts?: boolean | null\n\t/** \n\t * The URL to return to when a redirect payment is completed.\n\t * @example ```\"https://yourdomain.com/thankyou\"```\n\t */\n\treturn_url?: string | null\n\t/** \n\t * The email address to send the receipt to.\n\t * @example ```\"john@example.com\"```\n\t */\n\treceipt_email?: string | null\n\t/** \n\t * Information about the payment instrument used in the transaction.\n\t * @example ```{\"issuer\":\"cl bank\",\"card_type\":\"visa\"}```\n\t */\n\tpayment_instrument?: Record<string, any> | null\n\n\torder?: Order | null\n\tpayment_gateway?: PaymentGateway | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface StripePaymentCreate extends ResourceCreate {\n\t\n\t/** \n\t * The Stripe payment intent ID. Required to identify a payment session on stripe.\n\t * @example ```\"pi_1234XXX\"```\n\t */\n\tstripe_id?: string | null\n\t/** \n\t * The Stripe payment intent client secret. Required to create a charge through Stripe.js.\n\t * @example ```\"pi_1234XXX_secret_5678YYY\"```\n\t */\n\tclient_secret?: string | null\n\t/** \n\t * Stripe payment options: 'customer', 'payment_method', 'return_url', etc. Check Stripe payment intent API for more details.\n\t * @example ```{\"customer\":\"cus_xxx\",\"payment_method\":\"pm_xxx\"}```\n\t */\n\toptions?: Record<string, any> | null\n\t/** \n\t * The URL to return to when a redirect payment is completed.\n\t * @example ```\"https://yourdomain.com/thankyou\"```\n\t */\n\treturn_url?: string | null\n\t/** \n\t * The email address to send the receipt to.\n\t * @example ```\"john@example.com\"```\n\t */\n\treceipt_email?: string | null\n\n\torder: OrderRel\n\n}\n\n\ninterface StripePaymentUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * Stripe payment options: 'customer', 'payment_method', 'return_url', etc. Check Stripe payment intent API for more details.\n\t * @example ```{\"customer\":\"cus_xxx\",\"payment_method\":\"pm_xxx\"}```\n\t */\n\toptions?: Record<string, any> | null\n\t/** \n\t * The URL to return to when a redirect payment is completed.\n\t * @example ```\"https://yourdomain.com/thankyou\"```\n\t */\n\treturn_url?: string | null\n\t/** \n\t * Send this attribute if you want to update the created payment intent with fresh order data.\n\t * @example ```true```\n\t */\n\t_update?: boolean | null\n\t/** \n\t * Send this attribute if you want to refresh the payment status, can be used as webhooks fallback logic.\n\t * @example ```true```\n\t */\n\t_refresh?: boolean | null\n\n\torder?: OrderRel | null\n\n}\n\n\nclass StripePayments extends ApiResource<StripePayment> {\n\n\tstatic readonly TYPE: StripePaymentType = 'stripe_payments' as const\n\n\tasync create(resource: StripePaymentCreate, params?: QueryParamsRetrieve<StripePayment>, options?: ResourcesConfig): Promise<StripePayment> {\n\t\treturn this.resources.create<StripePaymentCreate, StripePayment>({ ...resource, type: StripePayments.TYPE }, params, options)\n\t}\n\n\tasync update(resource: StripePaymentUpdate, params?: QueryParamsRetrieve<StripePayment>, options?: ResourcesConfig): Promise<StripePayment> {\n\t\treturn this.resources.update<StripePaymentUpdate, StripePayment>({ ...resource, type: StripePayments.TYPE }, params, options)\n\t}\n\n\tasync delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void> {\n\t\tawait this.resources.delete((typeof id === 'string')? { id, type: StripePayments.TYPE } : id, options)\n\t}\n\n\tasync order(stripePaymentId: string | StripePayment, params?: QueryParamsRetrieve<Order>, options?: ResourcesConfig): Promise<Order> {\n\t\tconst _stripePaymentId = (stripePaymentId as StripePayment).id || stripePaymentId as string\n\t\treturn this.resources.fetch<Order>({ type: 'orders' }, `stripe_payments/${_stripePaymentId}/order`, params, options) as unknown as Order\n\t}\n\n\tasync payment_gateway(stripePaymentId: string | StripePayment, params?: QueryParamsRetrieve<PaymentGateway>, options?: ResourcesConfig): Promise<PaymentGateway> {\n\t\tconst _stripePaymentId = (stripePaymentId as StripePayment).id || stripePaymentId as string\n\t\treturn this.resources.fetch<PaymentGateway>({ type: 'payment_gateways' }, `stripe_payments/${_stripePaymentId}/payment_gateway`, params, options) as unknown as PaymentGateway\n\t}\n\n\tasync versions(stripePaymentId: string | StripePayment, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _stripePaymentId = (stripePaymentId as StripePayment).id || stripePaymentId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `stripe_payments/${_stripePaymentId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\tasync _update(id: string | StripePayment, params?: QueryParamsRetrieve<StripePayment>, options?: ResourcesConfig): Promise<StripePayment> {\n\t\treturn this.resources.update<StripePaymentUpdate, StripePayment>({ id: (typeof id === 'string')? id: id.id, type: StripePayments.TYPE, _update: true }, params, options)\n\t}\n\n\tasync _refresh(id: string | StripePayment, params?: QueryParamsRetrieve<StripePayment>, options?: ResourcesConfig): Promise<StripePayment> {\n\t\treturn this.resources.update<StripePaymentUpdate, StripePayment>({ id: (typeof id === 'string')? id: id.id, type: StripePayments.TYPE, _refresh: true }, params, options)\n\t}\n\n\n\tisStripePayment(resource: any): resource is StripePayment {\n\t\treturn resource.type && (resource.type === StripePayments.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): StripePaymentRel {\n\t\treturn super.relationshipOneToOne<StripePaymentRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): StripePaymentRel[] {\n\t\treturn super.relationshipOneToMany<StripePaymentRel>(...ids)\n\t}\n\n\n\ttype(): StripePaymentType {\n\t\treturn StripePayments.TYPE\n\t}\n\n}\n\n\nconst instance = new StripePayments()\nexport default instance\n\nexport type { StripePayments, StripePayment, StripePaymentCreate, StripePaymentUpdate, StripePaymentType }\n"]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../src/resources/stripe_tax_accounts.ts"],"names":["ApiResource"],"mappings":";;;;AA0FA,MAAM,0BAA0BA,oBAA8B,CAAA;AAAA,EAE7D,OAAgB,IAA6B,GAAA,qBAAA;AAAA,EAE7C,MAAM,MAAA,CAAO,QAAkC,EAAA,MAAA,EAAgD,OAAsD,EAAA;AACpJ,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAAiD,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,iBAAkB,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AACtI,EAEA,MAAM,MAAA,CAAO,QAAkC,EAAA,MAAA,EAAgD,OAAsD,EAAA;AACpJ,IAAO,OAAA,IA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pdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { Market } from './markets'\nimport type { Attachment } from './attachments'\nimport type { Event } from './events'\nimport type { Version } from './versions'\nimport type { TaxCategory, TaxCategoryType } from './tax_categories'\n\n\ntype StripeTaxAccountType = 'stripe_tax_accounts'\ntype StripeTaxAccountRel = ResourceRel & { type: StripeTaxAccountType }\ntype TaxCategoryRel = ResourceRel & { type: TaxCategoryType }\n\n\nexport type StripeTaxAccountSort = Pick<StripeTaxAccount, 'id' | 'name'> & ResourceSort\n// export type StripeTaxAccountFilter = Pick<StripeTaxAccount, 'id' | 'name'> & ResourceFilter\n\n\ninterface StripeTaxAccount extends Resource {\n\t\n\treadonly type: StripeTaxAccountType\n\n\t/** \n\t * The tax calculator's internal name.\n\t * @example ```\"Personal tax calculator\"```\n\t */\n\tname: string\n\t/** \n\t * Indicates if the transaction will be recorded and visible on the Stripe website.\n\t * @example ```true```\n\t */\n\tcommit_invoice?: boolean | null\n\n\tmarkets?: Market[] | null\n\tattachments?: Attachment[] | null\n\tevents?: Event[] | null\n\tversions?: Version[] | null\n\ttax_categories?: TaxCategory[] | null\n\n}\n\n\ninterface StripeTaxAccountCreate extends ResourceCreate {\n\t\n\t/** \n\t * The tax calculator's internal name.\n\t * @example ```\"Personal tax calculator\"```\n\t */\n\tname: string\n\t/** \n\t * The Stripe account API key.\n\t * @example ```\"STRIPE_API_KEY\"```\n\t */\n\tapi_key: string\n\t/** \n\t * Indicates if the transaction will be recorded and visible on the Stripe website.\n\t * @example ```true```\n\t */\n\tcommit_invoice?: boolean | null\n\n\ttax_categories?: TaxCategoryRel[] | null\n\n}\n\n\ninterface StripeTaxAccountUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The tax calculator's internal name.\n\t * @example ```\"Personal tax calculator\"```\n\t */\n\tname?: string | null\n\t/** \n\t * The Stripe account API key.\n\t * @example ```\"STRIPE_API_KEY\"```\n\t */\n\tapi_key?: string | null\n\t/** \n\t * Indicates if the transaction will be recorded and visible on the Stripe website.\n\t * @example ```true```\n\t */\n\tcommit_invoice?: boolean | null\n\n\ttax_categories?: TaxCategoryRel[] | null\n\n}\n\n\nclass StripeTaxAccounts extends ApiResource<StripeTaxAccount> {\n\n\tstatic readonly TYPE: StripeTaxAccountType = 'stripe_tax_accounts' as const\n\n\tasync create(resource: StripeTaxAccountCreate, params?: QueryParamsRetrieve<StripeTaxAccount>, options?: ResourcesConfig): Promise<StripeTaxAccount> {\n\t\treturn this.resources.create<StripeTaxAccountCreate, StripeTaxAccount>({ ...resource, type: StripeTaxAccounts.TYPE }, params, options)\n\t}\n\n\tasync update(resource: StripeTaxAccountUpdate, params?: QueryParamsRetrieve<StripeTaxAccount>, options?: ResourcesConfig): Promise<StripeTaxAccount> {\n\t\treturn this.resources.update<StripeTaxAccountUpdate, StripeTaxAccount>({ ...resource, type: StripeTaxAccounts.TYPE }, params, options)\n\t}\n\n\tasync delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void> {\n\t\tawait this.resources.delete((typeof id === 'string')? { id, type: StripeTaxAccounts.TYPE } : id, options)\n\t}\n\n\tasync markets(stripeTaxAccountId: string | StripeTaxAccount, params?: QueryParamsList<Market>, options?: ResourcesConfig): Promise<ListResponse<Market>> {\n\t\tconst _stripeTaxAccountId = (stripeTaxAccountId as StripeTaxAccount).id || stripeTaxAccountId as string\n\t\treturn this.resources.fetch<Market>({ type: 'markets' }, `stripe_tax_accounts/${_stripeTaxAccountId}/markets`, params, options) as unknown as ListResponse<Market>\n\t}\n\n\tasync attachments(stripeTaxAccountId: string | StripeTaxAccount, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _stripeTaxAccountId = (stripeTaxAccountId as StripeTaxAccount).id || stripeTaxAccountId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `stripe_tax_accounts/${_stripeTaxAccountId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\tasync events(stripeTaxAccountId: string | StripeTaxAccount, params?: QueryParamsList<Event>, options?: ResourcesConfig): Promise<ListResponse<Event>> {\n\t\tconst _stripeTaxAccountId = (stripeTaxAccountId as StripeTaxAccount).id || stripeTaxAccountId as string\n\t\treturn this.resources.fetch<Event>({ type: 'events' }, `stripe_tax_accounts/${_stripeTaxAccountId}/events`, params, options) as unknown as ListResponse<Event>\n\t}\n\n\tasync versions(stripeTaxAccountId: string | StripeTaxAccount, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _stripeTaxAccountId = (stripeTaxAccountId as StripeTaxAccount).id || stripeTaxAccountId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `stripe_tax_accounts/${_stripeTaxAccountId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\tasync tax_categories(stripeTaxAccountId: string | StripeTaxAccount, params?: QueryParamsList<TaxCategory>, options?: ResourcesConfig): Promise<ListResponse<TaxCategory>> {\n\t\tconst _stripeTaxAccountId = (stripeTaxAccountId as StripeTaxAccount).id || stripeTaxAccountId as string\n\t\treturn this.resources.fetch<TaxCategory>({ type: 'tax_categories' }, `stripe_tax_accounts/${_stripeTaxAccountId}/tax_categories`, params, options) as unknown as ListResponse<TaxCategory>\n\t}\n\n\n\tisStripeTaxAccount(resource: any): resource is StripeTaxAccount {\n\t\treturn resource.type && (resource.type === StripeTaxAccounts.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): StripeTaxAccountRel {\n\t\treturn super.relationshipOneToOne<StripeTaxAccountRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): StripeTaxAccountRel[] {\n\t\treturn super.relationshipOneToMany<StripeTaxAccountRel>(...ids)\n\t}\n\n\n\ttype(): StripeTaxAccountType {\n\t\treturn StripeTaxAccounts.TYPE\n\t}\n\n}\n\n\nconst instance = new StripeTaxAccounts()\nexport default instance\n\nexport type { StripeTaxAccount, StripeTaxAccountCreate, StripeTaxAccountUpdate, StripeTaxAccountType }\n"]}
|
1
|
+
{"version":3,"sources":["../../src/resources/stripe_tax_accounts.ts"],"names":["ApiResource"],"mappings":";;;;AA0FA,MAAM,0BAA0BA,oBAA8B,CAAA;AAAA,EAE7D,OAAgB,IAA6B,GAAA,qBAAA;AAAA,EAE7C,MAAM,MAAA,CAAO,QAAkC,EAAA,MAAA,EAAgD,OAAsD,EAAA;AACpJ,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAAiD,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,iBAAkB,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AACtI,EAEA,MAAM,MAAA,CAAO,QAAkC,EAAA,MAAA,EAAgD,OAAsD,EAAA;AACpJ,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAAiD,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,iBAAkB,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AACtI,EAEA,MAAM,MAAO,CAAA,EAAA,EAAyB,OAA0C,EAAA;AAC/E,IAAA,MAAM,IAAK,CAAA,SAAA,CAAU,MAAQ,CAAA,OAAO,EAAO,KAAA,QAAA,GAAW,EAAE,EAAA,EAAI,IAAM,EAAA,iBAAA,CAAkB,IAAK,EAAA,GAAI,IAAI,OAAO,CAAA;AAAA;AACzG,EAEA,MAAM,OAAA,CAAQ,kBAA+C,EAAA,MAAA,EAAkC,OAA0D,EAAA;AACxJ,IAAM,MAAA,mBAAA,GAAuB,mBAAwC,EAAM,IAAA,kBAAA;AAC3E,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,KAAA,CAAc,EAAE,IAAA,EAAM,SAAU,EAAA,EAAG,CAAuB,oBAAA,EAAA,mBAAmB,CAAY,QAAA,CAAA,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAC/H,EAEA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J,EAGA,mBAAmB,QAA6C,EAAA;AAC/D,IAAA,OAAO,QAAS,CAAA,IAAA,IAAS,QAAS,CAAA,IAAA,KAAS,iBAAkB,CAAA,IAAA;AAAA;AAC9D,EAGA,aAAa,EAAqD,EAAA;AACjE,IAAO,OAAA,KAAA,CAAM,qBAA0C,EAAE,CAAA;AAAA;AAC1D,EAEA,sBAAsB,GAAsC,EAAA;AAC3D,IAAO,OAAA,KAAA,CAAM,qBAA2C,CAAA,GAAG,GAAG,CAAA;AAAA;AAC/D,EAGA,IAA6B,GAAA;AAC5B,IAAA,OAAO,iBAAkB,CAAA,IAAA;AAAA;AAG3B;AAGA,MAAM,QAAA,GAAW,IAAI,iBAAkB,EAAA;AACvC,IAAO,2BAAQ,GAAA","file":"stripe_tax_accounts.cjs","sourcesContent":["import { ApiResource } from '../resource'\nimport type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { Market } from './markets'\nimport type { Attachment } from './attachments'\nimport type { Event } from './events'\nimport type { Version } from './versions'\nimport type { TaxCategory, TaxCategoryType } from './tax_categories'\n\n\ntype StripeTaxAccountType = 'stripe_tax_accounts'\ntype StripeTaxAccountRel = ResourceRel & { type: StripeTaxAccountType }\ntype TaxCategoryRel = ResourceRel & { type: TaxCategoryType }\n\n\nexport type StripeTaxAccountSort = Pick<StripeTaxAccount, 'id' | 'name'> & ResourceSort\n// export type StripeTaxAccountFilter = Pick<StripeTaxAccount, 'id' | 'name'> & ResourceFilter\n\n\ninterface StripeTaxAccount extends Resource {\n\t\n\treadonly type: StripeTaxAccountType\n\n\t/** \n\t * The tax calculator's internal name.\n\t * @example ```\"Personal tax calculator\"```\n\t */\n\tname: string\n\t/** \n\t * Indicates if the transaction will be recorded and visible on the Stripe website.\n\t * @example ```true```\n\t */\n\tcommit_invoice?: boolean | null\n\n\tmarkets?: Market[] | null\n\tattachments?: Attachment[] | null\n\tevents?: Event[] | null\n\tversions?: Version[] | null\n\ttax_categories?: TaxCategory[] | null\n\n}\n\n\ninterface StripeTaxAccountCreate extends ResourceCreate {\n\t\n\t/** \n\t * The tax calculator's internal name.\n\t * @example ```\"Personal tax calculator\"```\n\t */\n\tname: string\n\t/** \n\t * The Stripe account API key.\n\t * @example ```\"STRIPE_API_KEY\"```\n\t */\n\tapi_key: string\n\t/** \n\t * Indicates if the transaction will be recorded and visible on the Stripe website.\n\t * @example ```true```\n\t */\n\tcommit_invoice?: boolean | null\n\n\ttax_categories?: TaxCategoryRel[] | null\n\n}\n\n\ninterface StripeTaxAccountUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The tax calculator's internal name.\n\t * @example ```\"Personal tax calculator\"```\n\t */\n\tname?: string | null\n\t/** \n\t * The Stripe account API key.\n\t * @example ```\"STRIPE_API_KEY\"```\n\t */\n\tapi_key?: string | null\n\t/** \n\t * Indicates if the transaction will be recorded and visible on the Stripe website.\n\t * @example ```true```\n\t */\n\tcommit_invoice?: boolean | null\n\n\ttax_categories?: TaxCategoryRel[] | null\n\n}\n\n\nclass StripeTaxAccounts extends ApiResource<StripeTaxAccount> {\n\n\tstatic readonly TYPE: StripeTaxAccountType = 'stripe_tax_accounts' as const\n\n\tasync create(resource: StripeTaxAccountCreate, params?: QueryParamsRetrieve<StripeTaxAccount>, options?: ResourcesConfig): Promise<StripeTaxAccount> {\n\t\treturn this.resources.create<StripeTaxAccountCreate, StripeTaxAccount>({ ...resource, type: StripeTaxAccounts.TYPE }, params, options)\n\t}\n\n\tasync update(resource: StripeTaxAccountUpdate, params?: QueryParamsRetrieve<StripeTaxAccount>, options?: ResourcesConfig): Promise<StripeTaxAccount> {\n\t\treturn this.resources.update<StripeTaxAccountUpdate, StripeTaxAccount>({ ...resource, type: StripeTaxAccounts.TYPE }, params, options)\n\t}\n\n\tasync delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void> {\n\t\tawait this.resources.delete((typeof id === 'string')? { id, type: StripeTaxAccounts.TYPE } : id, options)\n\t}\n\n\tasync markets(stripeTaxAccountId: string | StripeTaxAccount, params?: QueryParamsList<Market>, options?: ResourcesConfig): Promise<ListResponse<Market>> {\n\t\tconst _stripeTaxAccountId = (stripeTaxAccountId as StripeTaxAccount).id || stripeTaxAccountId as string\n\t\treturn this.resources.fetch<Market>({ type: 'markets' }, `stripe_tax_accounts/${_stripeTaxAccountId}/markets`, params, options) as unknown as ListResponse<Market>\n\t}\n\n\tasync attachments(stripeTaxAccountId: string | StripeTaxAccount, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _stripeTaxAccountId = (stripeTaxAccountId as StripeTaxAccount).id || stripeTaxAccountId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `stripe_tax_accounts/${_stripeTaxAccountId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\tasync events(stripeTaxAccountId: string | StripeTaxAccount, params?: QueryParamsList<Event>, options?: ResourcesConfig): Promise<ListResponse<Event>> {\n\t\tconst _stripeTaxAccountId = (stripeTaxAccountId as StripeTaxAccount).id || stripeTaxAccountId as string\n\t\treturn this.resources.fetch<Event>({ type: 'events' }, `stripe_tax_accounts/${_stripeTaxAccountId}/events`, params, options) as unknown as ListResponse<Event>\n\t}\n\n\tasync versions(stripeTaxAccountId: string | StripeTaxAccount, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _stripeTaxAccountId = (stripeTaxAccountId as StripeTaxAccount).id || stripeTaxAccountId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `stripe_tax_accounts/${_stripeTaxAccountId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\tasync tax_categories(stripeTaxAccountId: string | StripeTaxAccount, params?: QueryParamsList<TaxCategory>, options?: ResourcesConfig): Promise<ListResponse<TaxCategory>> {\n\t\tconst _stripeTaxAccountId = (stripeTaxAccountId as StripeTaxAccount).id || stripeTaxAccountId as string\n\t\treturn this.resources.fetch<TaxCategory>({ type: 'tax_categories' }, `stripe_tax_accounts/${_stripeTaxAccountId}/tax_categories`, params, options) as unknown as ListResponse<TaxCategory>\n\t}\n\n\n\tisStripeTaxAccount(resource: any): resource is StripeTaxAccount {\n\t\treturn resource.type && (resource.type === StripeTaxAccounts.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): StripeTaxAccountRel {\n\t\treturn super.relationshipOneToOne<StripeTaxAccountRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): StripeTaxAccountRel[] {\n\t\treturn super.relationshipOneToMany<StripeTaxAccountRel>(...ids)\n\t}\n\n\n\ttype(): StripeTaxAccountType {\n\t\treturn StripeTaxAccounts.TYPE\n\t}\n\n}\n\n\nconst instance = new StripeTaxAccounts()\nexport default instance\n\nexport type { StripeTaxAccounts, StripeTaxAccount, StripeTaxAccountCreate, StripeTaxAccountUpdate, StripeTaxAccountType }\n"]}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
export {
|
1
|
+
export { kG as StripeTaxAccount, kH as StripeTaxAccountCreate, kJ as StripeTaxAccountSort, mZ as StripeTaxAccountType, kI as StripeTaxAccountUpdate, dr as StripeTaxAccounts, dq as default } from '../api-IwWtsAqE.cjs';
|
2
2
|
import '../client.cjs';
|
3
|
-
import '../interceptor-
|
3
|
+
import '../interceptor-k15jXzf0.cjs';
|
4
4
|
import '../types.cjs';
|
@@ -1,4 +1,4 @@
|
|
1
|
-
export {
|
1
|
+
export { kG as StripeTaxAccount, kH as StripeTaxAccountCreate, kJ as StripeTaxAccountSort, mZ as StripeTaxAccountType, kI as StripeTaxAccountUpdate, dr as StripeTaxAccounts, dq as default } from '../api-F1F37Dud.js';
|
2
2
|
import '../client.js';
|
3
|
-
import '../interceptor-
|
3
|
+
import '../interceptor-k15jXzf0.js';
|
4
4
|
import '../types.js';
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"s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B,CAAA,IAAA;AAAA;AAC9D,EAGA,aAAa,EAAqD,EAAA;AACjE,IAAO,OAAA,KAAA,CAAM,qBAA0C,EAAE,CAAA;AAAA;AAC1D,EAEA,sBAAsB,GAAsC,EAAA;AAC3D,IAAO,OAAA,KAAA,CAAM,qBAA2C,CAAA,GAAG,GAAG,CAAA;AAAA;AAC/D,EAGA,IAA6B,GAAA;AAC5B,IAAA,OAAO,iBAAkB,CAAA,IAAA;AAAA;AAG3B;AAGA,MAAM,QAAA,GAAW,IAAI,iBAAkB,EAAA;AACvC,IAAO,2BAAQ,GAAA","file":"stripe_tax_accounts.js","sourcesContent":["import { ApiResource } from '../resource'\nimport type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { Market } from './markets'\nimport type { Attachment } from './attachments'\nimport type { Event } from './events'\nimport type { Version } from './versions'\nimport type { TaxCategory, TaxCategoryType } from './tax_categories'\n\n\ntype StripeTaxAccountType = 'stripe_tax_accounts'\ntype StripeTaxAccountRel = ResourceRel & { type: StripeTaxAccountType }\ntype TaxCategoryRel = ResourceRel & { type: TaxCategoryType }\n\n\nexport type StripeTaxAccountSort = Pick<StripeTaxAccount, 'id' | 'name'> & ResourceSort\n// export type StripeTaxAccountFilter = Pick<StripeTaxAccount, 'id' | 'name'> & ResourceFilter\n\n\ninterface StripeTaxAccount extends Resource {\n\t\n\treadonly type: StripeTaxAccountType\n\n\t/** \n\t * The tax calculator's internal name.\n\t * @example ```\"Personal tax calculator\"```\n\t */\n\tname: string\n\t/** \n\t * Indicates if the transaction will be recorded and visible on the Stripe website.\n\t * @example ```true```\n\t */\n\tcommit_invoice?: boolean | null\n\n\tmarkets?: Market[] | null\n\tattachments?: Attachment[] | null\n\tevents?: Event[] | null\n\tversions?: Version[] | null\n\ttax_categories?: TaxCategory[] | null\n\n}\n\n\ninterface StripeTaxAccountCreate extends ResourceCreate {\n\t\n\t/** \n\t * The tax calculator's internal name.\n\t * @example ```\"Personal tax calculator\"```\n\t */\n\tname: string\n\t/** \n\t * The Stripe account API key.\n\t * @example ```\"STRIPE_API_KEY\"```\n\t */\n\tapi_key: string\n\t/** \n\t * Indicates if the transaction will be recorded and visible on the Stripe website.\n\t * @example ```true```\n\t */\n\tcommit_invoice?: boolean | null\n\n\ttax_categories?: TaxCategoryRel[] | null\n\n}\n\n\ninterface StripeTaxAccountUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The tax calculator's internal name.\n\t * @example ```\"Personal tax calculator\"```\n\t */\n\tname?: string | null\n\t/** \n\t * The Stripe account API key.\n\t * @example ```\"STRIPE_API_KEY\"```\n\t */\n\tapi_key?: string | null\n\t/** \n\t * Indicates if the transaction will be recorded and visible on the Stripe website.\n\t * @example ```true```\n\t */\n\tcommit_invoice?: boolean | null\n\n\ttax_categories?: TaxCategoryRel[] | null\n\n}\n\n\nclass StripeTaxAccounts extends ApiResource<StripeTaxAccount> {\n\n\tstatic readonly TYPE: StripeTaxAccountType = 'stripe_tax_accounts' as const\n\n\tasync create(resource: StripeTaxAccountCreate, params?: QueryParamsRetrieve<StripeTaxAccount>, options?: ResourcesConfig): Promise<StripeTaxAccount> {\n\t\treturn this.resources.create<StripeTaxAccountCreate, StripeTaxAccount>({ ...resource, type: StripeTaxAccounts.TYPE }, params, options)\n\t}\n\n\tasync update(resource: StripeTaxAccountUpdate, params?: QueryParamsRetrieve<StripeTaxAccount>, options?: ResourcesConfig): Promise<StripeTaxAccount> {\n\t\treturn this.resources.update<StripeTaxAccountUpdate, StripeTaxAccount>({ ...resource, type: StripeTaxAccounts.TYPE }, params, options)\n\t}\n\n\tasync delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void> {\n\t\tawait this.resources.delete((typeof id === 'string')? { id, type: StripeTaxAccounts.TYPE } : id, options)\n\t}\n\n\tasync markets(stripeTaxAccountId: string | StripeTaxAccount, params?: QueryParamsList<Market>, options?: ResourcesConfig): Promise<ListResponse<Market>> {\n\t\tconst _stripeTaxAccountId = (stripeTaxAccountId as StripeTaxAccount).id || stripeTaxAccountId as string\n\t\treturn this.resources.fetch<Market>({ type: 'markets' }, `stripe_tax_accounts/${_stripeTaxAccountId}/markets`, params, options) as unknown as ListResponse<Market>\n\t}\n\n\tasync attachments(stripeTaxAccountId: string | StripeTaxAccount, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _stripeTaxAccountId = (stripeTaxAccountId as StripeTaxAccount).id || stripeTaxAccountId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `stripe_tax_accounts/${_stripeTaxAccountId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\tasync events(stripeTaxAccountId: string | StripeTaxAccount, params?: QueryParamsList<Event>, options?: ResourcesConfig): Promise<ListResponse<Event>> {\n\t\tconst _stripeTaxAccountId = (stripeTaxAccountId as StripeTaxAccount).id || stripeTaxAccountId as string\n\t\treturn this.resources.fetch<Event>({ type: 'events' }, `stripe_tax_accounts/${_stripeTaxAccountId}/events`, params, options) as unknown as ListResponse<Event>\n\t}\n\n\tasync versions(stripeTaxAccountId: string | StripeTaxAccount, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _stripeTaxAccountId = (stripeTaxAccountId as StripeTaxAccount).id || stripeTaxAccountId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `stripe_tax_accounts/${_stripeTaxAccountId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\tasync tax_categories(stripeTaxAccountId: string | StripeTaxAccount, params?: QueryParamsList<TaxCategory>, options?: ResourcesConfig): Promise<ListResponse<TaxCategory>> {\n\t\tconst _stripeTaxAccountId = (stripeTaxAccountId as StripeTaxAccount).id || stripeTaxAccountId as string\n\t\treturn this.resources.fetch<TaxCategory>({ type: 'tax_categories' }, `stripe_tax_accounts/${_stripeTaxAccountId}/tax_categories`, params, options) as unknown as ListResponse<TaxCategory>\n\t}\n\n\n\tisStripeTaxAccount(resource: any): resource is StripeTaxAccount {\n\t\treturn resource.type && (resource.type === StripeTaxAccounts.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): StripeTaxAccountRel {\n\t\treturn super.relationshipOneToOne<StripeTaxAccountRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): StripeTaxAccountRel[] {\n\t\treturn super.relationshipOneToMany<StripeTaxAccountRel>(...ids)\n\t}\n\n\n\ttype(): StripeTaxAccountType {\n\t\treturn StripeTaxAccounts.TYPE\n\t}\n\n}\n\n\nconst instance = new StripeTaxAccounts()\nexport default instance\n\nexport type { StripeTaxAccount, StripeTaxAccountCreate, StripeTaxAccountUpdate, StripeTaxAccountType }\n"]}
|
1
|
+
{"version":3,"sources":["../../src/resources/stripe_tax_accounts.ts"],"names":[],"mappings":";;AA0FA,MAAM,0BAA0B,WAA8B,CAAA;AAAA,EAE7D,OAAgB,IAA6B,GAAA,qBAAA;AAAA,EAE7C,MAAM,MAAA,CAAO,QAAkC,EAAA,MAAA,EAAgD,OAAsD,EAAA;AACpJ,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAAiD,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,iBAAkB,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AACtI,EAEA,MAAM,MAAA,CAAO,QAAkC,EAAA,MAAA,EAAgD,OAAsD,EAAA;AACpJ,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAAiD,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,iBAAkB,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AACtI,EAEA,MAAM,MAAO,CAAA,EAAA,EAAyB,OAA0C,EAAA;AAC/E,IAAA,MAAM,IAAK,CAAA,SAAA,CAAU,MAAQ,CAAA,OAAO,EAAO,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A,EAAM,UAAW,EAAA,EAAG,CAAuB,oBAAA,EAAA,mBAAmB,CAAa,SAAA,CAAA,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAClI,EAEA,MAAM,cAAA,CAAe,kBAA+C,EAAA,MAAA,EAAuC,OAA+D,EAAA;AACzK,IAAM,MAAA,mBAAA,GAAuB,mBAAwC,EAAM,IAAA,kBAAA;AAC3E,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,KAAA,CAAmB,EAAE,IAAA,EAAM,gBAAiB,EAAA,EAAG,CAAuB,oBAAA,EAAA,mBAAmB,CAAmB,eAAA,CAAA,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAClJ,EAGA,mBAAmB,QAA6C,EAAA;AAC/D,IAAA,OAAO,QAAS,CAAA,IAAA,IAAS,QAAS,CAAA,IAAA,KAAS,iBAAkB,CAAA,IAAA;AAAA;AAC9D,EAGA,aAAa,EAAqD,EAAA;AACjE,IAAO,OAAA,KAAA,CAAM,qBAA0C,EAAE,CAAA;AAAA;AAC1D,EAEA,sBAAsB,GAAsC,EAAA;AAC3D,IAAO,OAAA,KAAA,CAAM,qBAA2C,CAAA,GAAG,GAAG,CAAA;AAAA;AAC/D,EAGA,IAA6B,GAAA;AAC5B,IAAA,OAAO,iBAAkB,CAAA,IAAA;AAAA;AAG3B;AAGA,MAAM,QAAA,GAAW,IAAI,iBAAkB,EAAA;AACvC,IAAO,2BAAQ,GAAA","file":"stripe_tax_accounts.js","sourcesContent":["import { ApiResource } from '../resource'\nimport type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { Market } from './markets'\nimport type { Attachment } from './attachments'\nimport type { Event } from './events'\nimport type { Version } from './versions'\nimport type { TaxCategory, TaxCategoryType } from './tax_categories'\n\n\ntype StripeTaxAccountType = 'stripe_tax_accounts'\ntype StripeTaxAccountRel = ResourceRel & { type: StripeTaxAccountType }\ntype TaxCategoryRel = ResourceRel & { type: TaxCategoryType }\n\n\nexport type StripeTaxAccountSort = Pick<StripeTaxAccount, 'id' | 'name'> & ResourceSort\n// export type StripeTaxAccountFilter = Pick<StripeTaxAccount, 'id' | 'name'> & ResourceFilter\n\n\ninterface StripeTaxAccount extends Resource {\n\t\n\treadonly type: StripeTaxAccountType\n\n\t/** \n\t * The tax calculator's internal name.\n\t * @example ```\"Personal tax calculator\"```\n\t */\n\tname: string\n\t/** \n\t * Indicates if the transaction will be recorded and visible on the Stripe website.\n\t * @example ```true```\n\t */\n\tcommit_invoice?: boolean | null\n\n\tmarkets?: Market[] | null\n\tattachments?: Attachment[] | null\n\tevents?: Event[] | null\n\tversions?: Version[] | null\n\ttax_categories?: TaxCategory[] | null\n\n}\n\n\ninterface StripeTaxAccountCreate extends ResourceCreate {\n\t\n\t/** \n\t * The tax calculator's internal name.\n\t * @example ```\"Personal tax calculator\"```\n\t */\n\tname: string\n\t/** \n\t * The Stripe account API key.\n\t * @example ```\"STRIPE_API_KEY\"```\n\t */\n\tapi_key: string\n\t/** \n\t * Indicates if the transaction will be recorded and visible on the Stripe website.\n\t * @example ```true```\n\t */\n\tcommit_invoice?: boolean | null\n\n\ttax_categories?: TaxCategoryRel[] | null\n\n}\n\n\ninterface StripeTaxAccountUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The tax calculator's internal name.\n\t * @example ```\"Personal tax calculator\"```\n\t */\n\tname?: string | null\n\t/** \n\t * The Stripe account API key.\n\t * @example ```\"STRIPE_API_KEY\"```\n\t */\n\tapi_key?: string | null\n\t/** \n\t * Indicates if the transaction will be recorded and visible on the Stripe website.\n\t * @example ```true```\n\t */\n\tcommit_invoice?: boolean | null\n\n\ttax_categories?: TaxCategoryRel[] | null\n\n}\n\n\nclass StripeTaxAccounts extends ApiResource<StripeTaxAccount> {\n\n\tstatic readonly TYPE: StripeTaxAccountType = 'stripe_tax_accounts' as const\n\n\tasync create(resource: StripeTaxAccountCreate, params?: QueryParamsRetrieve<StripeTaxAccount>, options?: ResourcesConfig): Promise<StripeTaxAccount> {\n\t\treturn this.resources.create<StripeTaxAccountCreate, StripeTaxAccount>({ ...resource, type: StripeTaxAccounts.TYPE }, params, options)\n\t}\n\n\tasync update(resource: StripeTaxAccountUpdate, params?: QueryParamsRetrieve<StripeTaxAccount>, options?: ResourcesConfig): Promise<StripeTaxAccount> {\n\t\treturn this.resources.update<StripeTaxAccountUpdate, StripeTaxAccount>({ ...resource, type: StripeTaxAccounts.TYPE }, params, options)\n\t}\n\n\tasync delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void> {\n\t\tawait this.resources.delete((typeof id === 'string')? { id, type: StripeTaxAccounts.TYPE } : id, options)\n\t}\n\n\tasync markets(stripeTaxAccountId: string | StripeTaxAccount, params?: QueryParamsList<Market>, options?: ResourcesConfig): Promise<ListResponse<Market>> {\n\t\tconst _stripeTaxAccountId = (stripeTaxAccountId as StripeTaxAccount).id || stripeTaxAccountId as string\n\t\treturn this.resources.fetch<Market>({ type: 'markets' }, `stripe_tax_accounts/${_stripeTaxAccountId}/markets`, params, options) as unknown as ListResponse<Market>\n\t}\n\n\tasync attachments(stripeTaxAccountId: string | StripeTaxAccount, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _stripeTaxAccountId = (stripeTaxAccountId as StripeTaxAccount).id || stripeTaxAccountId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `stripe_tax_accounts/${_stripeTaxAccountId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\tasync events(stripeTaxAccountId: string | StripeTaxAccount, params?: QueryParamsList<Event>, options?: ResourcesConfig): Promise<ListResponse<Event>> {\n\t\tconst _stripeTaxAccountId = (stripeTaxAccountId as StripeTaxAccount).id || stripeTaxAccountId as string\n\t\treturn this.resources.fetch<Event>({ type: 'events' }, `stripe_tax_accounts/${_stripeTaxAccountId}/events`, params, options) as unknown as ListResponse<Event>\n\t}\n\n\tasync versions(stripeTaxAccountId: string | StripeTaxAccount, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _stripeTaxAccountId = (stripeTaxAccountId as StripeTaxAccount).id || stripeTaxAccountId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `stripe_tax_accounts/${_stripeTaxAccountId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\tasync tax_categories(stripeTaxAccountId: string | StripeTaxAccount, params?: QueryParamsList<TaxCategory>, options?: ResourcesConfig): Promise<ListResponse<TaxCategory>> {\n\t\tconst _stripeTaxAccountId = (stripeTaxAccountId as StripeTaxAccount).id || stripeTaxAccountId as string\n\t\treturn this.resources.fetch<TaxCategory>({ type: 'tax_categories' }, `stripe_tax_accounts/${_stripeTaxAccountId}/tax_categories`, params, options) as unknown as ListResponse<TaxCategory>\n\t}\n\n\n\tisStripeTaxAccount(resource: any): resource is StripeTaxAccount {\n\t\treturn resource.type && (resource.type === StripeTaxAccounts.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): StripeTaxAccountRel {\n\t\treturn super.relationshipOneToOne<StripeTaxAccountRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): StripeTaxAccountRel[] {\n\t\treturn super.relationshipOneToMany<StripeTaxAccountRel>(...ids)\n\t}\n\n\n\ttype(): StripeTaxAccountType {\n\t\treturn StripeTaxAccounts.TYPE\n\t}\n\n}\n\n\nconst instance = new StripeTaxAccounts()\nexport default instance\n\nexport type { StripeTaxAccounts, StripeTaxAccount, StripeTaxAccountCreate, StripeTaxAccountUpdate, StripeTaxAccountType }\n"]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../src/resources/subscription_models.ts"],"names":["ApiResource"],"mappings":";;;;AAiHA,MAAM,2BAA2BA,oBAA+B,CAAA;AAAA,EAE/D,OAAgB,IAA8B,GAAA,qBAAA;AAAA,EAE9C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A,oBAAoB,CAAwB,oBAAA,CAAA,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AACnK,EAEA,MAAM,WAAA,CAAY,mBAAiD,EAAA,MAAA,EAAsC,OAA8D,EAAA;AACtK,IAAM,MAAA,oBAAA,GAAwB,oBAA0C,EAAM,IAAA,mBAAA;AAC9E,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,KAAA,CAAkB,EAAE,IAAA,EAAM,aAAc,EAAA,EAAG,CAAuB,oBAAA,EAAA,oBAAoB,CAAgB,YAAA,CAAA,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAC5I,EAGA,oBAAoB,QAA8C,EAAA;AACjE,IAAA,OAAO,QAAS,CAAA,IAAA,IAAS,QAAS,CAAA,IAAA,KAAS,kBAAmB,CAAA,IAAA;AAAA;AAC/D,EAGA,aAAa,EAAsD,EAAA;AAClE,IAAO,OAAA,KAAA,CAAM,qBAA2C,EAAE,CAAA;AAAA;AAC3D,EAEA,sBAAsB,GAAuC,EAAA;AAC5D,IAAO,OAAA,KAAA,CAAM,qBAA4C,CAAA,GAAG,GAAG,CAAA;AAAA;AAChE,EAGA,IAA8B,GAAA;AAC7B,IAAA,OAAO,kBAAmB,CAAA,IAAA;AAAA;AAG5B;AAGA,MAAM,QAAA,GAAW,IAAI,kBAAmB,EAAA;AACxC,IAAO,2BAAQ,GAAA","file":"subscription_models.cjs","sourcesContent":["import { ApiResource } from '../resource'\nimport type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { Market } from './markets'\nimport type { OrderSubscription } from './order_subscriptions'\nimport type { Attachment } from './attachments'\n\n\ntype SubscriptionModelType = 'subscription_models'\ntype SubscriptionModelRel = ResourceRel & { type: SubscriptionModelType }\n\n\nexport type SubscriptionModelSort = Pick<SubscriptionModel, 'id' | 'name' | 'strategy'> & ResourceSort\n// export type SubscriptionModelFilter = Pick<SubscriptionModel, 'id' | 'name' | 'strategy' | 'auto_activate' | 'auto_cancel'> & ResourceFilter\n\n\ninterface SubscriptionModel extends Resource {\n\t\n\treadonly type: SubscriptionModelType\n\n\t/** \n\t * The subscription model's internal name.\n\t * @example ```\"EU Subscription Model\"```\n\t */\n\tname: string\n\t/** \n\t * The subscription model's strategy used to generate order subscriptions: one between 'by_frequency' (default) and 'by_line_items'.\n\t * @example ```\"by_frequency\"```\n\t */\n\tstrategy?: string | null\n\t/** \n\t * An object that contains the frequencies available for this subscription model. Supported ones are 'hourly', 'daily', 'weekly', 'monthly', 'two-month', 'three-month', 'four-month', 'six-month', 'yearly', or your custom crontab expression (min unit is hour).\n\t * @example ```[\"hourly\",\"10 * * * *\",\"weekly\",\"monthly\",\"two-month\"]```\n\t */\n\tfrequencies: string[]\n\t/** \n\t * Indicates if the created subscriptions will be activated considering the placed source order as its first run, default to true.\n\t * @example ```true```\n\t */\n\tauto_activate?: boolean | null\n\t/** \n\t * Indicates if the created subscriptions will be cancelled in case the source order is cancelled, default to false.\n\t */\n\tauto_cancel?: boolean | null\n\n\tmarkets?: Market[] | null\n\torder_subscriptions?: OrderSubscription[] | null\n\tattachments?: Attachment[] | null\n\n}\n\n\ninterface SubscriptionModelCreate extends ResourceCreate {\n\t\n\t/** \n\t * The subscription model's internal name.\n\t * @example ```\"EU Subscription Model\"```\n\t */\n\tname: string\n\t/** \n\t * The subscription model's strategy used to generate order subscriptions: one between 'by_frequency' (default) and 'by_line_items'.\n\t * @example ```\"by_frequency\"```\n\t */\n\tstrategy?: string | null\n\t/** \n\t * An object that contains the frequencies available for this subscription model. Supported ones are 'hourly', 'daily', 'weekly', 'monthly', 'two-month', 'three-month', 'four-month', 'six-month', 'yearly', or your custom crontab expression (min unit is hour).\n\t * @example ```[\"hourly\",\"10 * * * *\",\"weekly\",\"monthly\",\"two-month\"]```\n\t */\n\tfrequencies: string[]\n\t/** \n\t * Indicates if the created subscriptions will be activated considering the placed source order as its first run, default to true.\n\t * @example ```true```\n\t */\n\tauto_activate?: boolean | null\n\t/** \n\t * Indicates if the created subscriptions will be cancelled in case the source order is cancelled, default to false.\n\t */\n\tauto_cancel?: boolean | null\n\t\n}\n\n\ninterface SubscriptionModelUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The subscription model's internal name.\n\t * @example ```\"EU Subscription Model\"```\n\t */\n\tname?: string | null\n\t/** \n\t * The subscription model's strategy used to generate order subscriptions: one between 'by_frequency' (default) and 'by_line_items'.\n\t * @example ```\"by_frequency\"```\n\t */\n\tstrategy?: string | null\n\t/** \n\t * An object that contains the frequencies available for this subscription model. Supported ones are 'hourly', 'daily', 'weekly', 'monthly', 'two-month', 'three-month', 'four-month', 'six-month', 'yearly', or your custom crontab expression (min unit is hour).\n\t * @example ```[\"hourly\",\"10 * * * *\",\"weekly\",\"monthly\",\"two-month\"]```\n\t */\n\tfrequencies?: string[] | null\n\t/** \n\t * Indicates if the created subscriptions will be activated considering the placed source order as its first run, default to true.\n\t * @example ```true```\n\t */\n\tauto_activate?: boolean | null\n\t/** \n\t * Indicates if the created subscriptions will be cancelled in case the source order is cancelled, default to false.\n\t */\n\tauto_cancel?: boolean | null\n\t\n}\n\n\nclass SubscriptionModels extends ApiResource<SubscriptionModel> {\n\n\tstatic readonly TYPE: SubscriptionModelType = 'subscription_models' as const\n\n\tasync create(resource: SubscriptionModelCreate, params?: QueryParamsRetrieve<SubscriptionModel>, options?: ResourcesConfig): Promise<SubscriptionModel> {\n\t\treturn this.resources.create<SubscriptionModelCreate, SubscriptionModel>({ ...resource, type: SubscriptionModels.TYPE }, params, options)\n\t}\n\n\tasync update(resource: SubscriptionModelUpdate, params?: QueryParamsRetrieve<SubscriptionModel>, options?: ResourcesConfig): Promise<SubscriptionModel> {\n\t\treturn this.resources.update<SubscriptionModelUpdate, SubscriptionModel>({ ...resource, type: SubscriptionModels.TYPE }, params, options)\n\t}\n\n\tasync delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void> {\n\t\tawait this.resources.delete((typeof id === 'string')? { id, type: SubscriptionModels.TYPE } : id, options)\n\t}\n\n\tasync markets(subscriptionModelId: string | SubscriptionModel, params?: QueryParamsList<Market>, options?: ResourcesConfig): Promise<ListResponse<Market>> {\n\t\tconst _subscriptionModelId = (subscriptionModelId as SubscriptionModel).id || subscriptionModelId as string\n\t\treturn this.resources.fetch<Market>({ type: 'markets' }, `subscription_models/${_subscriptionModelId}/markets`, params, options) as unknown as ListResponse<Market>\n\t}\n\n\tasync order_subscriptions(subscriptionModelId: string | SubscriptionModel, params?: QueryParamsList<OrderSubscription>, options?: ResourcesConfig): Promise<ListResponse<OrderSubscription>> {\n\t\tconst _subscriptionModelId = (subscriptionModelId as SubscriptionModel).id || subscriptionModelId as string\n\t\treturn this.resources.fetch<OrderSubscription>({ type: 'order_subscriptions' }, `subscription_models/${_subscriptionModelId}/order_subscriptions`, params, options) as unknown as ListResponse<OrderSubscription>\n\t}\n\n\tasync attachments(subscriptionModelId: string | SubscriptionModel, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _subscriptionModelId = (subscriptionModelId as SubscriptionModel).id || subscriptionModelId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `subscription_models/${_subscriptionModelId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\n\tisSubscriptionModel(resource: any): resource is SubscriptionModel {\n\t\treturn resource.type && (resource.type === SubscriptionModels.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): SubscriptionModelRel {\n\t\treturn super.relationshipOneToOne<SubscriptionModelRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): SubscriptionModelRel[] {\n\t\treturn super.relationshipOneToMany<SubscriptionModelRel>(...ids)\n\t}\n\n\n\ttype(): SubscriptionModelType {\n\t\treturn SubscriptionModels.TYPE\n\t}\n\n}\n\n\nconst instance = new SubscriptionModels()\nexport default instance\n\nexport type { SubscriptionModel, SubscriptionModelCreate, SubscriptionModelUpdate, SubscriptionModelType }\n"]}
|
1
|
+
{"version":3,"sources":["../../src/resources/subscription_models.ts"],"names":["ApiResource"],"mappings":";;;;AAiHA,MAAM,2BAA2BA,oBAA+B,CAAA;AAAA,EAE/D,OAAgB,IAA8B,GAAA,qBAAA;AAAA,EAE9C,MAAM,MAAA,CAAO,QAAmC,EAAA,MAAA,EAAiD,OAAuD,EAAA;AACvJ,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAAmD,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,kBAAmB,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AACzI,EAEA,MAAM,MAAA,CAAO,QAAmC,EAAA,MAAA,EAAiD,OAAuD,EAAA;AACvJ,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAAmD,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,kBAAmB,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AACzI,EAEA,MAAM,MAAO,CAAA,EAAA,EAAyB,OAA0C,EAAA;AAC/E,IAAA,MAAM,IAAK,CAAA,SAAA,CAAU,MAAQ,CAAA,OAAO,EAAO,KAAA,QAAA,GAAW,EAAE,EAAA,EAAI,IAAM,EAAA,kBAAA,CAAmB,IAAK,EAAA,GAAI,IAAI,OAAO,CAAA;AAAA;AAC1G,EAEA,MAAM,OAAA,CAAQ,mBAAiD,EAAA,MAAA,EAAkC,OAA0D,EAAA;AAC1J,IAAM,MAAA,oBAAA,GAAwB,oBAA0C,EAAM,IAAA,mBAAA;AAC9E,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,KAAA,CAAc,EAAE,IAAA,EAAM,SAAU,EAAA,EAAG,CAAuB,oBAAA,EAAA,oBAAoB,CAAY,QAAA,CAAA,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAChI,EAEA,MAAM,mBAAA,CAAoB,mBAAiD,EAAA,MAAA,EAA6C,OAAqE,EAAA;AAC5L,IAAM,MAAA,oBAAA,GAAwB,oBAA0C,EAAM,IAAA,mBAAA;AAC9E,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,KAAA,CAAyB,EAAE,IAAA,EAAM,qBAAsB,EAAA,EAAG,CAAuB,oBAAA,EAAA,oBAAoB,CAAwB,oBAAA,CAAA,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AACnK,EAEA,MAAM,WAAA,CAAY,mBAAiD,EAAA,MAAA,EAAsC,OAA8D,EAAA;AACtK,IAAM,MAAA,oBAAA,GAAwB,oBAA0C,EAAM,IAAA,mBAAA;AAC9E,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,KAAA,CAAkB,EAAE,IAAA,EAAM,aAAc,EAAA,EAAG,CAAuB,oBAAA,EAAA,oBAAoB,CAAgB,YAAA,CAAA,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAC5I,EAGA,oBAAoB,QAA8C,EAAA;AACjE,IAAA,OAAO,QAAS,CAAA,IAAA,IAAS,QAAS,CAAA,IAAA,KAAS,kBAAmB,CAAA,IAAA;AAAA;AAC/D,EAGA,aAAa,EAAsD,EAAA;AAClE,IAAO,OAAA,KAAA,CAAM,qBAA2C,EAAE,CAAA;AAAA;AAC3D,EAEA,sBAAsB,GAAuC,EAAA;AAC5D,IAAO,OAAA,KAAA,CAAM,qBAA4C,CAAA,GAAG,GAAG,CAAA;AAAA;AAChE,EAGA,IAA8B,GAAA;AAC7B,IAAA,OAAO,kBAAmB,CAAA,IAAA;AAAA;AAG5B;AAGA,MAAM,QAAA,GAAW,IAAI,kBAAmB,EAAA;AACxC,IAAO,2BAAQ,GAAA","file":"subscription_models.cjs","sourcesContent":["import { ApiResource } from '../resource'\nimport type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { Market } from './markets'\nimport type { OrderSubscription } from './order_subscriptions'\nimport type { Attachment } from './attachments'\n\n\ntype SubscriptionModelType = 'subscription_models'\ntype SubscriptionModelRel = ResourceRel & { type: SubscriptionModelType }\n\n\nexport type SubscriptionModelSort = Pick<SubscriptionModel, 'id' | 'name' | 'strategy'> & ResourceSort\n// export type SubscriptionModelFilter = Pick<SubscriptionModel, 'id' | 'name' | 'strategy' | 'auto_activate' | 'auto_cancel'> & ResourceFilter\n\n\ninterface SubscriptionModel extends Resource {\n\t\n\treadonly type: SubscriptionModelType\n\n\t/** \n\t * The subscription model's internal name.\n\t * @example ```\"EU Subscription Model\"```\n\t */\n\tname: string\n\t/** \n\t * The subscription model's strategy used to generate order subscriptions: one between 'by_frequency' (default) and 'by_line_items'.\n\t * @example ```\"by_frequency\"```\n\t */\n\tstrategy?: string | null\n\t/** \n\t * An object that contains the frequencies available for this subscription model. Supported ones are 'hourly', 'daily', 'weekly', 'monthly', 'two-month', 'three-month', 'four-month', 'six-month', 'yearly', or your custom crontab expression (min unit is hour).\n\t * @example ```[\"hourly\",\"10 * * * *\",\"weekly\",\"monthly\",\"two-month\"]```\n\t */\n\tfrequencies: string[]\n\t/** \n\t * Indicates if the created subscriptions will be activated considering the placed source order as its first run, default to true.\n\t * @example ```true```\n\t */\n\tauto_activate?: boolean | null\n\t/** \n\t * Indicates if the created subscriptions will be cancelled in case the source order is cancelled, default to false.\n\t */\n\tauto_cancel?: boolean | null\n\n\tmarkets?: Market[] | null\n\torder_subscriptions?: OrderSubscription[] | null\n\tattachments?: Attachment[] | null\n\n}\n\n\ninterface SubscriptionModelCreate extends ResourceCreate {\n\t\n\t/** \n\t * The subscription model's internal name.\n\t * @example ```\"EU Subscription Model\"```\n\t */\n\tname: string\n\t/** \n\t * The subscription model's strategy used to generate order subscriptions: one between 'by_frequency' (default) and 'by_line_items'.\n\t * @example ```\"by_frequency\"```\n\t */\n\tstrategy?: string | null\n\t/** \n\t * An object that contains the frequencies available for this subscription model. Supported ones are 'hourly', 'daily', 'weekly', 'monthly', 'two-month', 'three-month', 'four-month', 'six-month', 'yearly', or your custom crontab expression (min unit is hour).\n\t * @example ```[\"hourly\",\"10 * * * *\",\"weekly\",\"monthly\",\"two-month\"]```\n\t */\n\tfrequencies: string[]\n\t/** \n\t * Indicates if the created subscriptions will be activated considering the placed source order as its first run, default to true.\n\t * @example ```true```\n\t */\n\tauto_activate?: boolean | null\n\t/** \n\t * Indicates if the created subscriptions will be cancelled in case the source order is cancelled, default to false.\n\t */\n\tauto_cancel?: boolean | null\n\t\n}\n\n\ninterface SubscriptionModelUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The subscription model's internal name.\n\t * @example ```\"EU Subscription Model\"```\n\t */\n\tname?: string | null\n\t/** \n\t * The subscription model's strategy used to generate order subscriptions: one between 'by_frequency' (default) and 'by_line_items'.\n\t * @example ```\"by_frequency\"```\n\t */\n\tstrategy?: string | null\n\t/** \n\t * An object that contains the frequencies available for this subscription model. Supported ones are 'hourly', 'daily', 'weekly', 'monthly', 'two-month', 'three-month', 'four-month', 'six-month', 'yearly', or your custom crontab expression (min unit is hour).\n\t * @example ```[\"hourly\",\"10 * * * *\",\"weekly\",\"monthly\",\"two-month\"]```\n\t */\n\tfrequencies?: string[] | null\n\t/** \n\t * Indicates if the created subscriptions will be activated considering the placed source order as its first run, default to true.\n\t * @example ```true```\n\t */\n\tauto_activate?: boolean | null\n\t/** \n\t * Indicates if the created subscriptions will be cancelled in case the source order is cancelled, default to false.\n\t */\n\tauto_cancel?: boolean | null\n\t\n}\n\n\nclass SubscriptionModels extends ApiResource<SubscriptionModel> {\n\n\tstatic readonly TYPE: SubscriptionModelType = 'subscription_models' as const\n\n\tasync create(resource: SubscriptionModelCreate, params?: QueryParamsRetrieve<SubscriptionModel>, options?: ResourcesConfig): Promise<SubscriptionModel> {\n\t\treturn this.resources.create<SubscriptionModelCreate, SubscriptionModel>({ ...resource, type: SubscriptionModels.TYPE }, params, options)\n\t}\n\n\tasync update(resource: SubscriptionModelUpdate, params?: QueryParamsRetrieve<SubscriptionModel>, options?: ResourcesConfig): Promise<SubscriptionModel> {\n\t\treturn this.resources.update<SubscriptionModelUpdate, SubscriptionModel>({ ...resource, type: SubscriptionModels.TYPE }, params, options)\n\t}\n\n\tasync delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void> {\n\t\tawait this.resources.delete((typeof id === 'string')? { id, type: SubscriptionModels.TYPE } : id, options)\n\t}\n\n\tasync markets(subscriptionModelId: string | SubscriptionModel, params?: QueryParamsList<Market>, options?: ResourcesConfig): Promise<ListResponse<Market>> {\n\t\tconst _subscriptionModelId = (subscriptionModelId as SubscriptionModel).id || subscriptionModelId as string\n\t\treturn this.resources.fetch<Market>({ type: 'markets' }, `subscription_models/${_subscriptionModelId}/markets`, params, options) as unknown as ListResponse<Market>\n\t}\n\n\tasync order_subscriptions(subscriptionModelId: string | SubscriptionModel, params?: QueryParamsList<OrderSubscription>, options?: ResourcesConfig): Promise<ListResponse<OrderSubscription>> {\n\t\tconst _subscriptionModelId = (subscriptionModelId as SubscriptionModel).id || subscriptionModelId as string\n\t\treturn this.resources.fetch<OrderSubscription>({ type: 'order_subscriptions' }, `subscription_models/${_subscriptionModelId}/order_subscriptions`, params, options) as unknown as ListResponse<OrderSubscription>\n\t}\n\n\tasync attachments(subscriptionModelId: string | SubscriptionModel, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _subscriptionModelId = (subscriptionModelId as SubscriptionModel).id || subscriptionModelId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `subscription_models/${_subscriptionModelId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\n\tisSubscriptionModel(resource: any): resource is SubscriptionModel {\n\t\treturn resource.type && (resource.type === SubscriptionModels.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): SubscriptionModelRel {\n\t\treturn super.relationshipOneToOne<SubscriptionModelRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): SubscriptionModelRel[] {\n\t\treturn super.relationshipOneToMany<SubscriptionModelRel>(...ids)\n\t}\n\n\n\ttype(): SubscriptionModelType {\n\t\treturn SubscriptionModels.TYPE\n\t}\n\n}\n\n\nconst instance = new SubscriptionModels()\nexport default instance\n\nexport type { SubscriptionModels, SubscriptionModel, SubscriptionModelCreate, SubscriptionModelUpdate, SubscriptionModelType }\n"]}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
export {
|
1
|
+
export { kK as SubscriptionModel, kL as SubscriptionModelCreate, kN as SubscriptionModelSort, lR as SubscriptionModelType, kM as SubscriptionModelUpdate, dt as SubscriptionModels, ds as default } from '../api-IwWtsAqE.cjs';
|
2
2
|
import '../client.cjs';
|
3
|
-
import '../interceptor-
|
3
|
+
import '../interceptor-k15jXzf0.cjs';
|
4
4
|
import '../types.cjs';
|
@@ -1,4 +1,4 @@
|
|
1
|
-
export {
|
1
|
+
export { kK as SubscriptionModel, kL as SubscriptionModelCreate, kN as SubscriptionModelSort, lR as SubscriptionModelType, kM as SubscriptionModelUpdate, dt as SubscriptionModels, ds as default } from '../api-F1F37Dud.js';
|
2
2
|
import '../client.js';
|
3
|
-
import '../interceptor-
|
3
|
+
import '../interceptor-k15jXzf0.js';
|
4
4
|
import '../types.js';
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../src/resources/subscription_models.ts"],"names":[],"mappings":";;AAiHA,MAAM,2BAA2B,WAA+B,CAAA;AAAA,EAE/D,OAAgB,IAA8B,GAAA,qBAAA;AAAA,EAE9C,MAAM,MAAA,CAAO,QAAmC,EAAA,MAAA,EAAiD,OAAuD,EAAA;AACvJ,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAAmD,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,kBAAmB,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AACzI,EAEA,MAAM,MAAA,CA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KAAA,CAAkB,EAAE,IAAA,EAAM,aAAc,EAAA,EAAG,CAAuB,oBAAA,EAAA,oBAAoB,CAAgB,YAAA,CAAA,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAC5I,EAGA,oBAAoB,QAA8C,EAAA;AACjE,IAAA,OAAO,QAAS,CAAA,IAAA,IAAS,QAAS,CAAA,IAAA,KAAS,kBAAmB,CAAA,IAAA;AAAA;AAC/D,EAGA,aAAa,EAAsD,EAAA;AAClE,IAAO,OAAA,KAAA,CAAM,qBAA2C,EAAE,CAAA;AAAA;AAC3D,EAEA,sBAAsB,GAAuC,EAAA;AAC5D,IAAO,OAAA,KAAA,CAAM,qBAA4C,CAAA,GAAG,GAAG,CAAA;AAAA;AAChE,EAGA,IAA8B,GAAA;AAC7B,IAAA,OAAO,kBAAmB,CAAA,IAAA;AAAA;AAG5B;AAGA,MAAM,QAAA,GAAW,IAAI,kBAAmB,EAAA;AACxC,IAAO,2BAAQ,GAAA","file":"subscription_models.js","sourcesContent":["import { ApiResource } from '../resource'\nimport type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { Market } from './markets'\nimport type { OrderSubscription } from './order_subscriptions'\nimport type { Attachment } from './attachments'\n\n\ntype SubscriptionModelType = 'subscription_models'\ntype SubscriptionModelRel = ResourceRel & { type: SubscriptionModelType }\n\n\nexport type SubscriptionModelSort = Pick<SubscriptionModel, 'id' | 'name' | 'strategy'> & ResourceSort\n// export type SubscriptionModelFilter = Pick<SubscriptionModel, 'id' | 'name' | 'strategy' | 'auto_activate' | 'auto_cancel'> & ResourceFilter\n\n\ninterface SubscriptionModel extends Resource {\n\t\n\treadonly type: SubscriptionModelType\n\n\t/** \n\t * The subscription model's internal name.\n\t * @example ```\"EU Subscription Model\"```\n\t */\n\tname: string\n\t/** \n\t * The subscription model's strategy used to generate order subscriptions: one between 'by_frequency' (default) and 'by_line_items'.\n\t * @example ```\"by_frequency\"```\n\t */\n\tstrategy?: string | null\n\t/** \n\t * An object that contains the frequencies available for this subscription model. Supported ones are 'hourly', 'daily', 'weekly', 'monthly', 'two-month', 'three-month', 'four-month', 'six-month', 'yearly', or your custom crontab expression (min unit is hour).\n\t * @example ```[\"hourly\",\"10 * * * *\",\"weekly\",\"monthly\",\"two-month\"]```\n\t */\n\tfrequencies: string[]\n\t/** \n\t * Indicates if the created subscriptions will be activated considering the placed source order as its first run, default to true.\n\t * @example ```true```\n\t */\n\tauto_activate?: boolean | null\n\t/** \n\t * Indicates if the created subscriptions will be cancelled in case the source order is cancelled, default to false.\n\t */\n\tauto_cancel?: boolean | null\n\n\tmarkets?: Market[] | null\n\torder_subscriptions?: OrderSubscription[] | null\n\tattachments?: Attachment[] | null\n\n}\n\n\ninterface SubscriptionModelCreate extends ResourceCreate {\n\t\n\t/** \n\t * The subscription model's internal name.\n\t * @example ```\"EU Subscription Model\"```\n\t */\n\tname: string\n\t/** \n\t * The subscription model's strategy used to generate order subscriptions: one between 'by_frequency' (default) and 'by_line_items'.\n\t * @example ```\"by_frequency\"```\n\t */\n\tstrategy?: string | null\n\t/** \n\t * An object that contains the frequencies available for this subscription model. Supported ones are 'hourly', 'daily', 'weekly', 'monthly', 'two-month', 'three-month', 'four-month', 'six-month', 'yearly', or your custom crontab expression (min unit is hour).\n\t * @example ```[\"hourly\",\"10 * * * *\",\"weekly\",\"monthly\",\"two-month\"]```\n\t */\n\tfrequencies: string[]\n\t/** \n\t * Indicates if the created subscriptions will be activated considering the placed source order as its first run, default to true.\n\t * @example ```true```\n\t */\n\tauto_activate?: boolean | null\n\t/** \n\t * Indicates if the created subscriptions will be cancelled in case the source order is cancelled, default to false.\n\t */\n\tauto_cancel?: boolean | null\n\t\n}\n\n\ninterface SubscriptionModelUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The subscription model's internal name.\n\t * @example ```\"EU Subscription Model\"```\n\t */\n\tname?: string | null\n\t/** \n\t * The subscription model's strategy used to generate order subscriptions: one between 'by_frequency' (default) and 'by_line_items'.\n\t * @example ```\"by_frequency\"```\n\t */\n\tstrategy?: string | null\n\t/** \n\t * An object that contains the frequencies available for this subscription model. Supported ones are 'hourly', 'daily', 'weekly', 'monthly', 'two-month', 'three-month', 'four-month', 'six-month', 'yearly', or your custom crontab expression (min unit is hour).\n\t * @example ```[\"hourly\",\"10 * * * *\",\"weekly\",\"monthly\",\"two-month\"]```\n\t */\n\tfrequencies?: string[] | null\n\t/** \n\t * Indicates if the created subscriptions will be activated considering the placed source order as its first run, default to true.\n\t * @example ```true```\n\t */\n\tauto_activate?: boolean | null\n\t/** \n\t * Indicates if the created subscriptions will be cancelled in case the source order is cancelled, default to false.\n\t */\n\tauto_cancel?: boolean | null\n\t\n}\n\n\nclass SubscriptionModels extends ApiResource<SubscriptionModel> {\n\n\tstatic readonly TYPE: SubscriptionModelType = 'subscription_models' as const\n\n\tasync create(resource: SubscriptionModelCreate, params?: QueryParamsRetrieve<SubscriptionModel>, options?: ResourcesConfig): Promise<SubscriptionModel> {\n\t\treturn this.resources.create<SubscriptionModelCreate, SubscriptionModel>({ ...resource, type: SubscriptionModels.TYPE }, params, options)\n\t}\n\n\tasync update(resource: SubscriptionModelUpdate, params?: QueryParamsRetrieve<SubscriptionModel>, options?: ResourcesConfig): Promise<SubscriptionModel> {\n\t\treturn this.resources.update<SubscriptionModelUpdate, SubscriptionModel>({ ...resource, type: SubscriptionModels.TYPE }, params, options)\n\t}\n\n\tasync delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void> {\n\t\tawait this.resources.delete((typeof id === 'string')? { id, type: SubscriptionModels.TYPE } : id, options)\n\t}\n\n\tasync markets(subscriptionModelId: string | SubscriptionModel, params?: QueryParamsList<Market>, options?: ResourcesConfig): Promise<ListResponse<Market>> {\n\t\tconst _subscriptionModelId = (subscriptionModelId as SubscriptionModel).id || subscriptionModelId as string\n\t\treturn this.resources.fetch<Market>({ type: 'markets' }, `subscription_models/${_subscriptionModelId}/markets`, params, options) as unknown as ListResponse<Market>\n\t}\n\n\tasync order_subscriptions(subscriptionModelId: string | SubscriptionModel, params?: QueryParamsList<OrderSubscription>, options?: ResourcesConfig): Promise<ListResponse<OrderSubscription>> {\n\t\tconst _subscriptionModelId = (subscriptionModelId as SubscriptionModel).id || subscriptionModelId as string\n\t\treturn this.resources.fetch<OrderSubscription>({ type: 'order_subscriptions' }, `subscription_models/${_subscriptionModelId}/order_subscriptions`, params, options) as unknown as ListResponse<OrderSubscription>\n\t}\n\n\tasync attachments(subscriptionModelId: string | SubscriptionModel, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _subscriptionModelId = (subscriptionModelId as SubscriptionModel).id || subscriptionModelId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `subscription_models/${_subscriptionModelId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\n\tisSubscriptionModel(resource: any): resource is SubscriptionModel {\n\t\treturn resource.type && (resource.type === SubscriptionModels.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): SubscriptionModelRel {\n\t\treturn super.relationshipOneToOne<SubscriptionModelRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): SubscriptionModelRel[] {\n\t\treturn super.relationshipOneToMany<SubscriptionModelRel>(...ids)\n\t}\n\n\n\ttype(): SubscriptionModelType {\n\t\treturn SubscriptionModels.TYPE\n\t}\n\n}\n\n\nconst instance = new SubscriptionModels()\nexport default instance\n\nexport type { SubscriptionModel, SubscriptionModelCreate, SubscriptionModelUpdate, SubscriptionModelType }\n"]}
|
1
|
+
{"version":3,"sources":["../../src/resources/subscription_models.ts"],"names":[],"mappings":";;AAiHA,MAAM,2BAA2B,WAA+B,CAAA;AAAA,EAE/D,OAAgB,IAA8B,GAAA,qBAAA;AAAA,EAE9C,MAAM,MAAA,CAAO,QAAmC,EAAA,MAAA,EAA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,EAAQ,OAAO,CAAA;AAAA;AACnK,EAEA,MAAM,WAAA,CAAY,mBAAiD,EAAA,MAAA,EAAsC,OAA8D,EAAA;AACtK,IAAM,MAAA,oBAAA,GAAwB,oBAA0C,EAAM,IAAA,mBAAA;AAC9E,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,KAAA,CAAkB,EAAE,IAAA,EAAM,aAAc,EAAA,EAAG,CAAuB,oBAAA,EAAA,oBAAoB,CAAgB,YAAA,CAAA,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAC5I,EAGA,oBAAoB,QAA8C,EAAA;AACjE,IAAA,OAAO,QAAS,CAAA,IAAA,IAAS,QAAS,CAAA,IAAA,KAAS,kBAAmB,CAAA,IAAA;AAAA;AAC/D,EAGA,aAAa,EAAsD,EAAA;AAClE,IAAO,OAAA,KAAA,CAAM,qBAA2C,EAAE,CAAA;AAAA;AAC3D,EAEA,sBAAsB,GAAuC,EAAA;AAC5D,IAAO,OAAA,KAAA,CAAM,qBAA4C,CAAA,GAAG,GAAG,CAAA;AAAA;AAChE,EAGA,IAA8B,GAAA;AAC7B,IAAA,OAAO,kBAAmB,CAAA,IAAA;AAAA;AAG5B;AAGA,MAAM,QAAA,GAAW,IAAI,kBAAmB,EAAA;AACxC,IAAO,2BAAQ,GAAA","file":"subscription_models.js","sourcesContent":["import { ApiResource } from '../resource'\nimport type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { Market } from './markets'\nimport type { OrderSubscription } from './order_subscriptions'\nimport type { Attachment } from './attachments'\n\n\ntype SubscriptionModelType = 'subscription_models'\ntype SubscriptionModelRel = ResourceRel & { type: SubscriptionModelType }\n\n\nexport type SubscriptionModelSort = Pick<SubscriptionModel, 'id' | 'name' | 'strategy'> & ResourceSort\n// export type SubscriptionModelFilter = Pick<SubscriptionModel, 'id' | 'name' | 'strategy' | 'auto_activate' | 'auto_cancel'> & ResourceFilter\n\n\ninterface SubscriptionModel extends Resource {\n\t\n\treadonly type: SubscriptionModelType\n\n\t/** \n\t * The subscription model's internal name.\n\t * @example ```\"EU Subscription Model\"```\n\t */\n\tname: string\n\t/** \n\t * The subscription model's strategy used to generate order subscriptions: one between 'by_frequency' (default) and 'by_line_items'.\n\t * @example ```\"by_frequency\"```\n\t */\n\tstrategy?: string | null\n\t/** \n\t * An object that contains the frequencies available for this subscription model. Supported ones are 'hourly', 'daily', 'weekly', 'monthly', 'two-month', 'three-month', 'four-month', 'six-month', 'yearly', or your custom crontab expression (min unit is hour).\n\t * @example ```[\"hourly\",\"10 * * * *\",\"weekly\",\"monthly\",\"two-month\"]```\n\t */\n\tfrequencies: string[]\n\t/** \n\t * Indicates if the created subscriptions will be activated considering the placed source order as its first run, default to true.\n\t * @example ```true```\n\t */\n\tauto_activate?: boolean | null\n\t/** \n\t * Indicates if the created subscriptions will be cancelled in case the source order is cancelled, default to false.\n\t */\n\tauto_cancel?: boolean | null\n\n\tmarkets?: Market[] | null\n\torder_subscriptions?: OrderSubscription[] | null\n\tattachments?: Attachment[] | null\n\n}\n\n\ninterface SubscriptionModelCreate extends ResourceCreate {\n\t\n\t/** \n\t * The subscription model's internal name.\n\t * @example ```\"EU Subscription Model\"```\n\t */\n\tname: string\n\t/** \n\t * The subscription model's strategy used to generate order subscriptions: one between 'by_frequency' (default) and 'by_line_items'.\n\t * @example ```\"by_frequency\"```\n\t */\n\tstrategy?: string | null\n\t/** \n\t * An object that contains the frequencies available for this subscription model. Supported ones are 'hourly', 'daily', 'weekly', 'monthly', 'two-month', 'three-month', 'four-month', 'six-month', 'yearly', or your custom crontab expression (min unit is hour).\n\t * @example ```[\"hourly\",\"10 * * * *\",\"weekly\",\"monthly\",\"two-month\"]```\n\t */\n\tfrequencies: string[]\n\t/** \n\t * Indicates if the created subscriptions will be activated considering the placed source order as its first run, default to true.\n\t * @example ```true```\n\t */\n\tauto_activate?: boolean | null\n\t/** \n\t * Indicates if the created subscriptions will be cancelled in case the source order is cancelled, default to false.\n\t */\n\tauto_cancel?: boolean | null\n\t\n}\n\n\ninterface SubscriptionModelUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The subscription model's internal name.\n\t * @example ```\"EU Subscription Model\"```\n\t */\n\tname?: string | null\n\t/** \n\t * The subscription model's strategy used to generate order subscriptions: one between 'by_frequency' (default) and 'by_line_items'.\n\t * @example ```\"by_frequency\"```\n\t */\n\tstrategy?: string | null\n\t/** \n\t * An object that contains the frequencies available for this subscription model. Supported ones are 'hourly', 'daily', 'weekly', 'monthly', 'two-month', 'three-month', 'four-month', 'six-month', 'yearly', or your custom crontab expression (min unit is hour).\n\t * @example ```[\"hourly\",\"10 * * * *\",\"weekly\",\"monthly\",\"two-month\"]```\n\t */\n\tfrequencies?: string[] | null\n\t/** \n\t * Indicates if the created subscriptions will be activated considering the placed source order as its first run, default to true.\n\t * @example ```true```\n\t */\n\tauto_activate?: boolean | null\n\t/** \n\t * Indicates if the created subscriptions will be cancelled in case the source order is cancelled, default to false.\n\t */\n\tauto_cancel?: boolean | null\n\t\n}\n\n\nclass SubscriptionModels extends ApiResource<SubscriptionModel> {\n\n\tstatic readonly TYPE: SubscriptionModelType = 'subscription_models' as const\n\n\tasync create(resource: SubscriptionModelCreate, params?: QueryParamsRetrieve<SubscriptionModel>, options?: ResourcesConfig): Promise<SubscriptionModel> {\n\t\treturn this.resources.create<SubscriptionModelCreate, SubscriptionModel>({ ...resource, type: SubscriptionModels.TYPE }, params, options)\n\t}\n\n\tasync update(resource: SubscriptionModelUpdate, params?: QueryParamsRetrieve<SubscriptionModel>, options?: ResourcesConfig): Promise<SubscriptionModel> {\n\t\treturn this.resources.update<SubscriptionModelUpdate, SubscriptionModel>({ ...resource, type: SubscriptionModels.TYPE }, params, options)\n\t}\n\n\tasync delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void> {\n\t\tawait this.resources.delete((typeof id === 'string')? { id, type: SubscriptionModels.TYPE } : id, options)\n\t}\n\n\tasync markets(subscriptionModelId: string | SubscriptionModel, params?: QueryParamsList<Market>, options?: ResourcesConfig): Promise<ListResponse<Market>> {\n\t\tconst _subscriptionModelId = (subscriptionModelId as SubscriptionModel).id || subscriptionModelId as string\n\t\treturn this.resources.fetch<Market>({ type: 'markets' }, `subscription_models/${_subscriptionModelId}/markets`, params, options) as unknown as ListResponse<Market>\n\t}\n\n\tasync order_subscriptions(subscriptionModelId: string | SubscriptionModel, params?: QueryParamsList<OrderSubscription>, options?: ResourcesConfig): Promise<ListResponse<OrderSubscription>> {\n\t\tconst _subscriptionModelId = (subscriptionModelId as SubscriptionModel).id || subscriptionModelId as string\n\t\treturn this.resources.fetch<OrderSubscription>({ type: 'order_subscriptions' }, `subscription_models/${_subscriptionModelId}/order_subscriptions`, params, options) as unknown as ListResponse<OrderSubscription>\n\t}\n\n\tasync attachments(subscriptionModelId: string | SubscriptionModel, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _subscriptionModelId = (subscriptionModelId as SubscriptionModel).id || subscriptionModelId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `subscription_models/${_subscriptionModelId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\n\tisSubscriptionModel(resource: any): resource is SubscriptionModel {\n\t\treturn resource.type && (resource.type === SubscriptionModels.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): SubscriptionModelRel {\n\t\treturn super.relationshipOneToOne<SubscriptionModelRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): SubscriptionModelRel[] {\n\t\treturn super.relationshipOneToMany<SubscriptionModelRel>(...ids)\n\t}\n\n\n\ttype(): SubscriptionModelType {\n\t\treturn SubscriptionModels.TYPE\n\t}\n\n}\n\n\nconst instance = new SubscriptionModels()\nexport default instance\n\nexport type { SubscriptionModels, SubscriptionModel, SubscriptionModelCreate, SubscriptionModelU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IAAA;AAAA;AAGd;AAGA,MAAM,QAAA,GAAW,IAAI,IAAK,EAAA;AAC1B,IAAO,YAAQ,GAAA","file":"tags.cjs","sourcesContent":["import { ApiResource } from '../resource'\nimport type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve } from '../query'\n\n\n\ntype TagType = 'tags'\ntype TagRel = ResourceRel & { type: TagType }\n\n\nexport type TagSort = Pick<Tag, 'id' | 'name'> & ResourceSort\n// export type TagFilter = Pick<Tag, 'id' | 'name'> & ResourceFilter\n\n\ninterface Tag extends Resource {\n\t\n\treadonly type: TagType\n\n\t/** \n\t * The tag name.\n\t * @example ```\"new_campaign\"```\n\t */\n\tname: string\n\t\n}\n\n\ninterface TagCreate extends ResourceCreate {\n\t\n\t/** \n\t * The tag name.\n\t * @example ```\"new_campaign\"```\n\t */\n\tname: string\n\t\n}\n\n\ninterface TagUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The tag name.\n\t * @example ```\"new_campaign\"```\n\t */\n\tname?: string | null\n\t\n}\n\n\nclass Tags extends ApiResource<Tag> {\n\n\tstatic readonly TYPE: TagType = 'tags' as const\n\n\tasync create(resource: TagCreate, params?: QueryParamsRetrieve<Tag>, options?: ResourcesConfig): Promise<Tag> {\n\t\treturn this.resources.create<TagCreate, Tag>({ ...resource, type: Tags.TYPE }, params, options)\n\t}\n\n\tasync update(resource: TagUpdate, params?: QueryParamsRetrieve<Tag>, options?: ResourcesConfig): Promise<Tag> {\n\t\treturn this.resources.update<TagUpdate, Tag>({ ...resource, type: Tags.TYPE }, params, options)\n\t}\n\n\tasync delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void> {\n\t\tawait this.resources.delete((typeof id === 'string')? { id, type: Tags.TYPE } : id, options)\n\t}\n\n\n\tisTag(resource: any): resource is Tag {\n\t\treturn resource.type && (resource.type === Tags.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): TagRel {\n\t\treturn super.relationshipOneToOne<TagRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): TagRel[] {\n\t\treturn super.relationshipOneToMany<TagRel>(...ids)\n\t}\n\n\n\ttype(): TagType {\n\t\treturn Tags.TYPE\n\t}\n\n}\n\n\nconst instance = new Tags()\nexport default instance\n\nexport type { Tag, TagCreate, TagUpdate, TagType }\n"]}
|
1
|
+
{"version":3,"sources":["../../src/resources/tags.ts"],"names":["ApiResource"],"mappings":";;;;AAiDA,MAAM,aAAaA,oBAAiB,CAAA;AAAA,EAEnC,OAAgB,IAAgB,GAAA,MAAA;AAAA,EAEhC,MAAM,MAAA,CAAO,QAAqB,EAAA,MAAA,EAAmC,OAAyC,EAAA;AAC7G,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAAuB,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,IAAK,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAC/F,EAEA,MAAM,MAAA,CAAO,QAAqB,EAAA,MAAA,EAAmC,OAAyC,EAAA;AAC7G,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAAuB,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,IAAK,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAC/F,EAEA,MAAM,MAAO,CAAA,EAAA,EAAyB,OAA0C,EAAA;AAC/E,IAAA,MAAM,IAAK,CAAA,SAAA,CAAU,MAAQ,CAAA,OAAO,EAAO,KAAA,QAAA,GAAW,EAAE,EAAA,EAAI,IAAM,EAAA,IAAA,CAAK,IAAK,EAAA,GAAI,IAAI,OAAO,CAAA;AAAA;AAC5F,EAGA,MAAM,QAAgC,EAAA;AACrC,IAAA,OAAO,QAAS,CAAA,IAAA,IAAS,QAAS,CAAA,IAAA,KAAS,IAAK,CAAA,IAAA;AAAA;AACjD,EAGA,aAAa,EAAwC,EAAA;AACpD,IAAO,OAAA,KAAA,CAAM,qBAA6B,EAAE,CAAA;AAAA;AAC7C,EAEA,sBAAsB,GAAyB,EAAA;AAC9C,IAAO,OAAA,KAAA,CAAM,qBAA8B,CAAA,GAAG,GAAG,CAAA;AAAA;AAClD,EAGA,IAAgB,GAAA;AACf,IAAA,OAAO,IAAK,CAAA,IAAA;AAAA;AAGd;AAGA,MAAM,QAAA,GAAW,IAAI,IAAK,EAAA;AAC1B,IAAO,YAAQ,GAAA","file":"tags.cjs","sourcesContent":["import { ApiResource } from '../resource'\nimport type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve } from '../query'\n\n\n\ntype TagType = 'tags'\ntype TagRel = ResourceRel & { type: TagType }\n\n\nexport type TagSort = Pick<Tag, 'id' | 'name'> & ResourceSort\n// export type TagFilter = Pick<Tag, 'id' | 'name'> & ResourceFilter\n\n\ninterface Tag extends Resource {\n\t\n\treadonly type: TagType\n\n\t/** \n\t * The tag name.\n\t * @example ```\"new_campaign\"```\n\t */\n\tname: string\n\t\n}\n\n\ninterface TagCreate extends ResourceCreate {\n\t\n\t/** \n\t * The tag name.\n\t * @example ```\"new_campaign\"```\n\t */\n\tname: string\n\t\n}\n\n\ninterface TagUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The tag name.\n\t * @example ```\"new_campaign\"```\n\t */\n\tname?: string | null\n\t\n}\n\n\nclass Tags extends ApiResource<Tag> {\n\n\tstatic readonly TYPE: TagType = 'tags' as const\n\n\tasync create(resource: TagCreate, params?: QueryParamsRetrieve<Tag>, options?: ResourcesConfig): Promise<Tag> {\n\t\treturn this.resources.create<TagCreate, Tag>({ ...resource, type: Tags.TYPE }, params, options)\n\t}\n\n\tasync update(resource: TagUpdate, params?: QueryParamsRetrieve<Tag>, options?: ResourcesConfig): Promise<Tag> {\n\t\treturn this.resources.update<TagUpdate, Tag>({ ...resource, type: Tags.TYPE }, params, options)\n\t}\n\n\tasync delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void> {\n\t\tawait this.resources.delete((typeof id === 'string')? { id, type: Tags.TYPE } : id, options)\n\t}\n\n\n\tisTag(resource: any): resource is Tag {\n\t\treturn resource.type && (resource.type === Tags.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): TagRel {\n\t\treturn super.relationshipOneToOne<TagRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): TagRel[] {\n\t\treturn super.relationshipOneToMany<TagRel>(...ids)\n\t}\n\n\n\ttype(): TagType {\n\t\treturn Tags.TYPE\n\t}\n\n}\n\n\nconst instance = new Tags()\nexport default instance\n\nexport type { Tags, Tag, TagCreate, TagUpdate, TagType }\n"]}
|
package/lib/resources/tags.d.cts
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
export {
|
1
|
+
export { kO as Tag, kP as TagCreate, kR as TagSort, lr as TagType, kQ as TagUpdate, dv as Tags, du as default } from '../api-IwWtsAqE.cjs';
|
2
2
|
import '../client.cjs';
|
3
|
-
import '../interceptor-
|
3
|
+
import '../interceptor-k15jXzf0.cjs';
|
4
4
|
import '../types.cjs';
|
package/lib/resources/tags.d.ts
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
export {
|
1
|
+
export { kO as Tag, kP as TagCreate, kR as TagSort, lr as TagType, kQ as TagUpdate, dv as Tags, du as default } from '../api-F1F37Dud.js';
|
2
2
|
import '../client.js';
|
3
|
-
import '../interceptor-
|
3
|
+
import '../interceptor-k15jXzf0.js';
|
4
4
|
import '../types.js';
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../src/resources/tags.ts"],"names":[],"mappings":";;AAiDA,MAAM,aAAa,WAAiB,CAAA;AAAA,EAEnC,OAAgB,IAAgB,GAAA,MAAA;AAAA,EAEhC,MAAM,MAAA,CAAO,QAAqB,EAAA,MAAA,EAAmC,OAAyC,EAAA;AAC7G,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAAuB,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,IAAK,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAC/F,EAEA,MAAM,MAAA,CAAO,QAAqB,EAAA,MAAA,EAAmC,OAAyC,EAAA;AAC7G,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAAuB,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,IAAK,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAC/F,EAEA,MAAM,MAAO,CAAA,EAAA,EAAyB,OAA0C,EAAA;AAC/E,IAAA,MAAM,IAAK,CAAA,SAAA,CAAU,MAAQ,CAAA,OAAO,EAAO,KAAA,QAAA,GAAW,EAAE,EAAA,EAAI,IAAM,EAAA,IAAA,CAAK,IAAK,EAAA,GAAI,IAAI,OAAO,CAAA;AAAA;AAC5F,EAGA,MAAM,QAAgC,EAAA;AACrC,IAAA,OAAO,QAAS,CAAA,IAAA,IAAS,QAAS,CAAA,IAAA,KAAS,IAAK,CAAA,IAAA;AAAA;AACjD,EAGA,aAAa,EAAwC,EAAA;AACpD,IAAO,OAAA,KAAA,CAAM,qBAA6B,EAAE,CAAA;AAAA;AAC7C,EAEA,sBAAsB,GAAyB,EAAA;AAC9C,IAAO,OAAA,KAAA,CAAM,qBAA8B,CAAA,GAAG,GAAG,CAAA;AAAA;AAClD,EAGA,IAAgB,GAAA;AACf,IAAA,OAAO,IAAK,CAAA,IAAA;AAAA;AAGd;AAGA,MAAM,QAAA,GAAW,IAAI,IAAK,EAAA;AAC1B,IAAO,YAAQ,GAAA","file":"tags.js","sourcesContent":["import { ApiResource } from '../resource'\nimport type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve } from '../query'\n\n\n\ntype TagType = 'tags'\ntype TagRel = ResourceRel & { type: TagType }\n\n\nexport type TagSort = Pick<Tag, 'id' | 'name'> & ResourceSort\n// export type TagFilter = Pick<Tag, 'id' | 'name'> & ResourceFilter\n\n\ninterface Tag extends Resource {\n\t\n\treadonly type: TagType\n\n\t/** \n\t * The tag name.\n\t * @example ```\"new_campaign\"```\n\t */\n\tname: string\n\t\n}\n\n\ninterface TagCreate extends ResourceCreate {\n\t\n\t/** \n\t * The tag name.\n\t * @example ```\"new_campaign\"```\n\t */\n\tname: string\n\t\n}\n\n\ninterface TagUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The tag name.\n\t * @example ```\"new_campaign\"```\n\t */\n\tname?: string | null\n\t\n}\n\n\nclass Tags extends ApiResource<Tag> {\n\n\tstatic readonly TYPE: TagType = 'tags' as const\n\n\tasync create(resource: TagCreate, params?: QueryParamsRetrieve<Tag>, options?: ResourcesConfig): Promise<Tag> {\n\t\treturn this.resources.create<TagCreate, Tag>({ ...resource, type: Tags.TYPE }, params, options)\n\t}\n\n\tasync update(resource: TagUpdate, params?: QueryParamsRetrieve<Tag>, options?: ResourcesConfig): Promise<Tag> {\n\t\treturn this.resources.update<TagUpdate, Tag>({ ...resource, type: Tags.TYPE }, params, options)\n\t}\n\n\tasync delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void> {\n\t\tawait this.resources.delete((typeof id === 'string')? { id, type: Tags.TYPE } : id, options)\n\t}\n\n\n\tisTag(resource: any): resource is Tag {\n\t\treturn resource.type && (resource.type === Tags.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): TagRel {\n\t\treturn super.relationshipOneToOne<TagRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): TagRel[] {\n\t\treturn super.relationshipOneToMany<TagRel>(...ids)\n\t}\n\n\n\ttype(): TagType {\n\t\treturn Tags.TYPE\n\t}\n\n}\n\n\nconst instance = new Tags()\nexport default instance\n\nexport type { Tag, TagCreate, TagUpdate, TagType }\n"]}
|
1
|
+
{"version":3,"sources":["../../src/resources/tags.ts"],"names":[],"mappings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import { ApiResource } from '../resource'\nimport type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve } from '../query'\n\n\n\ntype TagType = 'tags'\ntype TagRel = ResourceRel & { type: TagType }\n\n\nexport type TagSort = Pick<Tag, 'id' | 'name'> & ResourceSort\n// export type TagFilter = Pick<Tag, 'id' | 'name'> & ResourceFilter\n\n\ninterface Tag extends Resource {\n\t\n\treadonly type: TagType\n\n\t/** \n\t * The tag name.\n\t * @example ```\"new_campaign\"```\n\t */\n\tname: string\n\t\n}\n\n\ninterface TagCreate extends ResourceCreate {\n\t\n\t/** \n\t * The tag name.\n\t * @example ```\"new_campaign\"```\n\t */\n\tname: string\n\t\n}\n\n\ninterface TagUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The tag name.\n\t * @example ```\"new_campaign\"```\n\t */\n\tname?: string | null\n\t\n}\n\n\nclass Tags extends ApiResource<Tag> {\n\n\tstatic readonly TYPE: TagType = 'tags' as const\n\n\tasync create(resource: TagCreate, params?: QueryParamsRetrieve<Tag>, options?: ResourcesConfig): Promise<Tag> {\n\t\treturn this.resources.create<TagCreate, Tag>({ ...resource, type: Tags.TYPE }, params, options)\n\t}\n\n\tasync update(resource: TagUpdate, params?: QueryParamsRetrieve<Tag>, options?: ResourcesConfig): Promise<Tag> {\n\t\treturn this.resources.update<TagUpdate, Tag>({ ...resource, type: Tags.TYPE }, params, options)\n\t}\n\n\tasync delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void> {\n\t\tawait this.resources.delete((typeof id === 'string')? { id, type: Tags.TYPE } : id, options)\n\t}\n\n\n\tisTag(resource: any): resource is Tag {\n\t\treturn resource.type && (resource.type === Tags.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): TagRel {\n\t\treturn super.relationshipOneToOne<TagRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): TagRel[] {\n\t\treturn super.relationshipOneToMany<TagRel>(...ids)\n\t}\n\n\n\ttype(): TagType {\n\t\treturn Tags.TYPE\n\t}\n\n}\n\n\nconst instance = new Tags()\nexport default instance\n\nexport type { Tags, Tag, TagCreate, TagUpdate, TagType }\n"]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../src/resources/talon_one_accounts.ts"],"names":["ApiResource"],"mappings":";;;;AAuFA,MAAM,yBAAyBA,oBAA6B,CAAA;AAAA,EAE3D,OAAgB,IAA4B,GAAA,oBAAA;AAAA,EAE5C,MAAM,MAAA,CAAO,QAAiC,EAAA,MAAA,EAA+C,OAAqD,EAAA;AACjJ,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAA+C,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,gBAAiB,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AACnI,EAEA,MAAM,MAAA,CAAO,QAAiC,EAAA,MAAA,EAA+C,OAAqD,EAAA;AACjJ,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAA+C,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,gBAAiB,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AACnI,EAEA,MAAM,MAAO,CAAA,EAAA,EAAyB,OAA0C,EAAA;AAC/E,IAAA,MAAM,IAAK,CAAA,SAAA,CAAU,MAAQ,CAAA,OAAO,EAAO,KAAA,QAAA,GAAW,EAAE,EAAA,EAAI,IAAM,EAAA,gBAAA,CAAiB,IAAK,EAAA,GAAI,IAAI,OAAO,CAAA;AAAA;AACxG,EAEA,MAAM,OAAA,CAAQ,iBAA6C,EAAA,MAAA,EAAkC,OAA0D,EAAA;AACtJ,IAAM,MAAA,kBAAA,GAAsB,kBAAsC,EAAM,IAAA,iBAAA;AACxE,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,KAAA,CAAc,EAAE,IAAA,EAAM,SAAU,EAAA,EAAG,CAAsB,m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EA,sBAAsB,GAAqC,EAAA;AAC1D,IAAO,OAAA,KAAA,CAAM,qBAA0C,CAAA,GAAG,GAAG,CAAA;AAAA;AAC9D,EAGA,IAA4B,GAAA;AAC3B,IAAA,OAAO,gBAAiB,CAAA,IAAA;AAAA;AAG1B;AAGA,MAAM,QAAA,GAAW,IAAI,gBAAiB,EAAA;AACtC,IAAO,0BAAQ,GAAA","file":"talon_one_accounts.cjs","sourcesContent":["import { ApiResource } from '../resource'\nimport type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { Market } from './markets'\nimport type { DiscountEngineItem } from './discount_engine_items'\nimport type { Attachment } from './attachments'\nimport type { Version } from './versions'\n\n\ntype TalonOneAccountType = 'talon_one_accounts'\ntype TalonOneAccountRel = ResourceRel & { type: TalonOneAccountType }\n\n\nexport type TalonOneAccountSort = Pick<TalonOneAccount, 'id' | 'name'> & ResourceSort\n// export type TalonOneAccountFilter = Pick<TalonOneAccount, 'id' | 'name'> & ResourceFilter\n\n\ninterface TalonOneAccount extends Resource {\n\t\n\treadonly type: TalonOneAccountType\n\n\t/** \n\t * The discount engine's internal name.\n\t * @example ```\"Personal discount engine\"```\n\t */\n\tname: string\n\t/** \n\t * Indicates if the discount engine manages both promotions and gift cards application at once.\n\t */\n\tmanage_gift_cards?: boolean | null\n\t/** \n\t * The API endpoint as computed by specified baseurl.\n\t * @example ```\"https://my_baseurl.talon.one/v2\"```\n\t */\n\tapi_endpoint?: string | null\n\n\tmarkets?: Market[] | null\n\tdiscount_engine_items?: DiscountEngineItem[] | null\n\tattachments?: Attachment[] | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface TalonOneAccountCreate extends ResourceCreate {\n\t\n\t/** \n\t * The discount engine's internal name.\n\t * @example ```\"Personal discount engine\"```\n\t */\n\tname: string\n\t/** \n\t * The Talon.One account API key.\n\t * @example ```\"TALON_ONE_API_KEY\"```\n\t */\n\tapi_key: string\n\t/** \n\t * The Talon.One API baseurl (excluding the talon.one suffix).\n\t * @example ```\"yourbaseurl\"```\n\t */\n\tbaseurl: string\n\t\n}\n\n\ninterface TalonOneAccountUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The discount engine's internal name.\n\t * @example ```\"Personal discount engine\"```\n\t */\n\tname?: string | null\n\t/** \n\t * The Talon.One account API key.\n\t * @example ```\"TALON_ONE_API_KEY\"```\n\t */\n\tapi_key?: string | null\n\t/** \n\t * The Talon.One API baseurl (excluding the talon.one suffix).\n\t * @example ```\"yourbaseurl\"```\n\t */\n\tbaseurl?: string | null\n\t\n}\n\n\nclass TalonOneAccounts extends ApiResource<TalonOneAccount> {\n\n\tstatic readonly TYPE: TalonOneAccountType = 'talon_one_accounts' as const\n\n\tasync create(resource: TalonOneAccountCreate, params?: QueryParamsRetrieve<TalonOneAccount>, options?: ResourcesConfig): Promise<TalonOneAccount> {\n\t\treturn this.resources.create<TalonOneAccountCreate, TalonOneAccount>({ ...resource, type: TalonOneAccounts.TYPE }, params, options)\n\t}\n\n\tasync update(resource: TalonOneAccountUpdate, params?: QueryParamsRetrieve<TalonOneAccount>, options?: ResourcesConfig): Promise<TalonOneAccount> {\n\t\treturn this.resources.update<TalonOneAccountUpdate, TalonOneAccount>({ ...resource, type: TalonOneAccounts.TYPE }, params, options)\n\t}\n\n\tasync delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void> {\n\t\tawait this.resources.delete((typeof id === 'string')? { id, type: TalonOneAccounts.TYPE } : id, options)\n\t}\n\n\tasync markets(talonOneAccountId: string | TalonOneAccount, params?: QueryParamsList<Market>, options?: ResourcesConfig): Promise<ListResponse<Market>> {\n\t\tconst _talonOneAccountId = (talonOneAccountId as TalonOneAccount).id || talonOneAccountId as string\n\t\treturn this.resources.fetch<Market>({ type: 'markets' }, `talon_one_accounts/${_talonOneAccountId}/markets`, params, options) as unknown as ListResponse<Market>\n\t}\n\n\tasync discount_engine_items(talonOneAccountId: string | TalonOneAccount, params?: QueryParamsList<DiscountEngineItem>, options?: ResourcesConfig): Promise<ListResponse<DiscountEngineItem>> {\n\t\tconst _talonOneAccountId = (talonOneAccountId as TalonOneAccount).id || talonOneAccountId as string\n\t\treturn this.resources.fetch<DiscountEngineItem>({ type: 'discount_engine_items' }, `talon_one_accounts/${_talonOneAccountId}/discount_engine_items`, params, options) as unknown as ListResponse<DiscountEngineItem>\n\t}\n\n\tasync attachments(talonOneAccountId: string | TalonOneAccount, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _talonOneAccountId = (talonOneAccountId as TalonOneAccount).id || talonOneAccountId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `talon_one_accounts/${_talonOneAccountId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\tasync versions(talonOneAccountId: string | TalonOneAccount, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _talonOneAccountId = (talonOneAccountId as TalonOneAccount).id || talonOneAccountId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `talon_one_accounts/${_talonOneAccountId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\n\tisTalonOneAccount(resource: any): resource is TalonOneAccount {\n\t\treturn resource.type && (resource.type === TalonOneAccounts.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): TalonOneAccountRel {\n\t\treturn super.relationshipOneToOne<TalonOneAccountRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): TalonOneAccountRel[] {\n\t\treturn super.relationshipOneToMany<TalonOneAccountRel>(...ids)\n\t}\n\n\n\ttype(): TalonOneAccountType {\n\t\treturn TalonOneAccounts.TYPE\n\t}\n\n}\n\n\nconst instance = new TalonOneAccounts()\nexport default instance\n\nexport type { TalonOneAccount, TalonOneAccountCreate, TalonOneAccountUpdate, TalonOneAccountType }\n"]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AAA;AAG1B;AAGA,MAAM,QAAA,GAAW,IAAI,gBAAiB,EAAA;AACtC,IAAO,0BAAQ,GAAA","file":"talon_one_accounts.cjs","sourcesContent":["import { ApiResource } from '../resource'\nimport type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { Market } from './markets'\nimport type { DiscountEngineItem } from './discount_engine_items'\nimport type { Attachment } from './attachments'\nimport type { Version } from './versions'\n\n\ntype TalonOneAccountType = 'talon_one_accounts'\ntype TalonOneAccountRel = ResourceRel & { type: TalonOneAccountType }\n\n\nexport type TalonOneAccountSort = Pick<TalonOneAccount, 'id' | 'name'> & ResourceSort\n// export type TalonOneAccountFilter = Pick<TalonOneAccount, 'id' | 'name'> & ResourceFilter\n\n\ninterface TalonOneAccount extends Resource {\n\t\n\treadonly type: TalonOneAccountType\n\n\t/** \n\t * The discount engine's internal name.\n\t * @example ```\"Personal discount engine\"```\n\t */\n\tname: string\n\t/** \n\t * Indicates if the discount engine manages both promotions and gift cards application at once.\n\t */\n\tmanage_gift_cards?: boolean | null\n\t/** \n\t * The API endpoint as computed by specified baseurl.\n\t * @example ```\"https://my_baseurl.talon.one/v2\"```\n\t */\n\tapi_endpoint?: string | null\n\n\tmarkets?: Market[] | null\n\tdiscount_engine_items?: DiscountEngineItem[] | null\n\tattachments?: Attachment[] | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface TalonOneAccountCreate extends ResourceCreate {\n\t\n\t/** \n\t * The discount engine's internal name.\n\t * @example ```\"Personal discount engine\"```\n\t */\n\tname: string\n\t/** \n\t * The Talon.One account API key.\n\t * @example ```\"TALON_ONE_API_KEY\"```\n\t */\n\tapi_key: string\n\t/** \n\t * The Talon.One API baseurl (excluding the talon.one suffix).\n\t * @example ```\"yourbaseurl\"```\n\t */\n\tbaseurl: string\n\t\n}\n\n\ninterface TalonOneAccountUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The discount engine's internal name.\n\t * @example ```\"Personal discount engine\"```\n\t */\n\tname?: string | null\n\t/** \n\t * The Talon.One account API key.\n\t * @example ```\"TALON_ONE_API_KEY\"```\n\t */\n\tapi_key?: string | null\n\t/** \n\t * The Talon.One API baseurl (excluding the talon.one suffix).\n\t * @example ```\"yourbaseurl\"```\n\t */\n\tbaseurl?: string | null\n\t\n}\n\n\nclass TalonOneAccounts extends ApiResource<TalonOneAccount> {\n\n\tstatic readonly TYPE: TalonOneAccountType = 'talon_one_accounts' as const\n\n\tasync create(resource: TalonOneAccountCreate, params?: QueryParamsRetrieve<TalonOneAccount>, options?: ResourcesConfig): Promise<TalonOneAccount> {\n\t\treturn this.resources.create<TalonOneAccountCreate, TalonOneAccount>({ ...resource, type: TalonOneAccounts.TYPE }, params, options)\n\t}\n\n\tasync update(resource: TalonOneAccountUpdate, params?: QueryParamsRetrieve<TalonOneAccount>, options?: ResourcesConfig): Promise<TalonOneAccount> {\n\t\treturn this.resources.update<TalonOneAccountUpdate, TalonOneAccount>({ ...resource, type: TalonOneAccounts.TYPE }, params, options)\n\t}\n\n\tasync delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void> {\n\t\tawait this.resources.delete((typeof id === 'string')? { id, type: TalonOneAccounts.TYPE } : id, options)\n\t}\n\n\tasync markets(talonOneAccountId: string | TalonOneAccount, params?: QueryParamsList<Market>, options?: ResourcesConfig): Promise<ListResponse<Market>> {\n\t\tconst _talonOneAccountId = (talonOneAccountId as TalonOneAccount).id || talonOneAccountId as string\n\t\treturn this.resources.fetch<Market>({ type: 'markets' }, `talon_one_accounts/${_talonOneAccountId}/markets`, params, options) as unknown as ListResponse<Market>\n\t}\n\n\tasync discount_engine_items(talonOneAccountId: string | TalonOneAccount, params?: QueryParamsList<DiscountEngineItem>, options?: ResourcesConfig): Promise<ListResponse<DiscountEngineItem>> {\n\t\tconst _talonOneAccountId = (talonOneAccountId as TalonOneAccount).id || talonOneAccountId as string\n\t\treturn this.resources.fetch<DiscountEngineItem>({ type: 'discount_engine_items' }, `talon_one_accounts/${_talonOneAccountId}/discount_engine_items`, params, options) as unknown as ListResponse<DiscountEngineItem>\n\t}\n\n\tasync attachments(talonOneAccountId: string | TalonOneAccount, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _talonOneAccountId = (talonOneAccountId as TalonOneAccount).id || talonOneAccountId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `talon_one_accounts/${_talonOneAccountId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\tasync versions(talonOneAccountId: string | TalonOneAccount, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _talonOneAccountId = (talonOneAccountId as TalonOneAccount).id || talonOneAccountId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `talon_one_accounts/${_talonOneAccountId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\n\tisTalonOneAccount(resource: any): resource is TalonOneAccount {\n\t\treturn resource.type && (resource.type === TalonOneAccounts.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): TalonOneAccountRel {\n\t\treturn super.relationshipOneToOne<TalonOneAccountRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): TalonOneAccountRel[] {\n\t\treturn super.relationshipOneToMany<TalonOneAccountRel>(...ids)\n\t}\n\n\n\ttype(): TalonOneAccountType {\n\t\treturn TalonOneAccounts.TYPE\n\t}\n\n}\n\n\nconst instance = new TalonOneAccounts()\nexport default instance\n\nexport type { TalonOneAccounts, TalonOneAccount, TalonOneAccountCreate, TalonOneAccountUpdate, TalonOneAccountType }\n"]}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
export {
|
1
|
+
export { kS as TalonOneAccount, kT as TalonOneAccountCreate, kV as TalonOneAccountSort, ns as TalonOneAccountType, kU as TalonOneAccountUpdate, dx as TalonOneAccounts, dw as default } from '../api-IwWtsAqE.cjs';
|
2
2
|
import '../client.cjs';
|
3
|
-
import '../interceptor-
|
3
|
+
import '../interceptor-k15jXzf0.cjs';
|
4
4
|
import '../types.cjs';
|
@@ -1,4 +1,4 @@
|
|
1
|
-
export {
|
1
|
+
export { kS as TalonOneAccount, kT as TalonOneAccountCreate, kV as TalonOneAccountSort, ns as TalonOneAccountType, kU as TalonOneAccountUpdate, dx as TalonOneAccounts, dw as default } from '../api-F1F37Dud.js';
|
2
2
|
import '../client.js';
|
3
|
-
import '../interceptor-
|
3
|
+
import '../interceptor-k15jXzf0.js';
|
4
4
|
import '../types.js';
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../src/resources/talon_one_accounts.ts"],"names":[],"mappings":";;AAuFA,MAAM,yBAAyB,WAA6B,CAAA;AAAA,EAE3D,OAAgB,IAA4B,GAAA,oBAAA;AAAA,EAE5C,MAAM,MAAA,CAAO,QAAiC,EAAA,MAAA,EAA+C,OAAqD,EAAA;AACjJ,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAA+C,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,gBAAiB,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AACnI,EAEA,MAAM,MAAA,CAAO,QAAiC,EAAA,MAAA,EAA+C,OAAqD,EAAA;AACjJ,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAA+C,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,gBAAiB,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AACnI,EAEA,MAAM,MAAO,CAAA,EAAA,EAAyB,OAA0C,EAAA;AAC/E,IAAA,MAAM,IAAK,CAAA,SAAA,CAAU,MAAQ,CAAA,OAAO,EAAO,KAAA,QAAA,GAAW,EAAE,EAAA,EAAI,IAAM,EAAA,gBAAA,CAAiB,IAAK,EAAA,GAAI,IAAI,OAAO,CAAA;A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CAAA;AAAA;AAChI,EAGA,kBAAkB,QAA4C,EAAA;AAC7D,IAAA,OAAO,QAAS,CAAA,IAAA,IAAS,QAAS,CAAA,IAAA,KAAS,gBAAiB,CAAA,IAAA;AAAA;AAC7D,EAGA,aAAa,EAAoD,EAAA;AAChE,IAAO,OAAA,KAAA,CAAM,qBAAyC,EAAE,CAAA;AAAA;AACzD,EAEA,sBAAsB,GAAqC,EAAA;AAC1D,IAAO,OAAA,KAAA,CAAM,qBAA0C,CAAA,GAAG,GAAG,CAAA;AAAA;AAC9D,EAGA,IAA4B,GAAA;AAC3B,IAAA,OAAO,gBAAiB,CAAA,IAAA;AAAA;AAG1B;AAGA,MAAM,QAAA,GAAW,IAAI,gBAAiB,EAAA;AACtC,IAAO,0BAAQ,GAAA","file":"talon_one_accounts.js","sourcesContent":["import { ApiResource } from '../resource'\nimport type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { Market } from './markets'\nimport type { DiscountEngineItem } from './discount_engine_items'\nimport type { Attachment } from './attachments'\nimport type { Version } from './versions'\n\n\ntype TalonOneAccountType = 'talon_one_accounts'\ntype TalonOneAccountRel = ResourceRel & { type: TalonOneAccountType }\n\n\nexport type TalonOneAccountSort = Pick<TalonOneAccount, 'id' | 'name'> & ResourceSort\n// export type TalonOneAccountFilter = Pick<TalonOneAccount, 'id' | 'name'> & ResourceFilter\n\n\ninterface TalonOneAccount extends Resource {\n\t\n\treadonly type: TalonOneAccountType\n\n\t/** \n\t * The discount engine's internal name.\n\t * @example ```\"Personal discount engine\"```\n\t */\n\tname: string\n\t/** \n\t * Indicates if the discount engine manages both promotions and gift cards application at once.\n\t */\n\tmanage_gift_cards?: boolean | null\n\t/** \n\t * The API endpoint as computed by specified baseurl.\n\t * @example ```\"https://my_baseurl.talon.one/v2\"```\n\t */\n\tapi_endpoint?: string | null\n\n\tmarkets?: Market[] | null\n\tdiscount_engine_items?: DiscountEngineItem[] | null\n\tattachments?: Attachment[] | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface TalonOneAccountCreate extends ResourceCreate {\n\t\n\t/** \n\t * The discount engine's internal name.\n\t * @example ```\"Personal discount engine\"```\n\t */\n\tname: string\n\t/** \n\t * The Talon.One account API key.\n\t * @example ```\"TALON_ONE_API_KEY\"```\n\t */\n\tapi_key: string\n\t/** \n\t * The Talon.One API baseurl (excluding the talon.one suffix).\n\t * @example ```\"yourbaseurl\"```\n\t */\n\tbaseurl: string\n\t\n}\n\n\ninterface TalonOneAccountUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The discount engine's internal name.\n\t * @example ```\"Personal discount engine\"```\n\t */\n\tname?: string | null\n\t/** \n\t * The Talon.One account API key.\n\t * @example ```\"TALON_ONE_API_KEY\"```\n\t */\n\tapi_key?: string | null\n\t/** \n\t * The Talon.One API baseurl (excluding the talon.one suffix).\n\t * @example ```\"yourbaseurl\"```\n\t */\n\tbaseurl?: string | null\n\t\n}\n\n\nclass TalonOneAccounts extends ApiResource<TalonOneAccount> {\n\n\tstatic readonly TYPE: TalonOneAccountType = 'talon_one_accounts' as const\n\n\tasync create(resource: TalonOneAccountCreate, params?: QueryParamsRetrieve<TalonOneAccount>, options?: ResourcesConfig): Promise<TalonOneAccount> {\n\t\treturn this.resources.create<TalonOneAccountCreate, TalonOneAccount>({ ...resource, type: TalonOneAccounts.TYPE }, params, options)\n\t}\n\n\tasync update(resource: TalonOneAccountUpdate, params?: QueryParamsRetrieve<TalonOneAccount>, options?: ResourcesConfig): Promise<TalonOneAccount> {\n\t\treturn this.resources.update<TalonOneAccountUpdate, TalonOneAccount>({ ...resource, type: TalonOneAccounts.TYPE }, params, options)\n\t}\n\n\tasync delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void> {\n\t\tawait this.resources.delete((typeof id === 'string')? { id, type: TalonOneAccounts.TYPE } : id, options)\n\t}\n\n\tasync markets(talonOneAccountId: string | TalonOneAccount, params?: QueryParamsList<Market>, options?: ResourcesConfig): Promise<ListResponse<Market>> {\n\t\tconst _talonOneAccountId = (talonOneAccountId as TalonOneAccount).id || talonOneAccountId as string\n\t\treturn this.resources.fetch<Market>({ type: 'markets' }, `talon_one_accounts/${_talonOneAccountId}/markets`, params, options) as unknown as ListResponse<Market>\n\t}\n\n\tasync discount_engine_items(talonOneAccountId: string | TalonOneAccount, params?: QueryParamsList<DiscountEngineItem>, options?: ResourcesConfig): Promise<ListResponse<DiscountEngineItem>> {\n\t\tconst _talonOneAccountId = (talonOneAccountId as TalonOneAccount).id || talonOneAccountId as string\n\t\treturn this.resources.fetch<DiscountEngineItem>({ type: 'discount_engine_items' }, `talon_one_accounts/${_talonOneAccountId}/discount_engine_items`, params, options) as unknown as ListResponse<DiscountEngineItem>\n\t}\n\n\tasync attachments(talonOneAccountId: string | TalonOneAccount, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _talonOneAccountId = (talonOneAccountId as TalonOneAccount).id || talonOneAccountId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `talon_one_accounts/${_talonOneAccountId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\tasync versions(talonOneAccountId: string | TalonOneAccount, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _talonOneAccountId = (talonOneAccountId as TalonOneAccount).id || talonOneAccountId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `talon_one_accounts/${_talonOneAccountId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\n\tisTalonOneAccount(resource: any): resource is TalonOneAccount {\n\t\treturn resource.type && (resource.type === TalonOneAccounts.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): TalonOneAccountRel {\n\t\treturn super.relationshipOneToOne<TalonOneAccountRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): TalonOneAccountRel[] {\n\t\treturn super.relationshipOneToMany<TalonOneAccountRel>(...ids)\n\t}\n\n\n\ttype(): TalonOneAccountType {\n\t\treturn TalonOneAccounts.TYPE\n\t}\n\n}\n\n\nconst instance = new TalonOneAccounts()\nexport default instance\n\nexport type { TalonOneAccount, TalonOneAccountCreate, TalonOneAccountUpdate, TalonOneAccountType }\n"]}
|
1
|
+
{"version":3,"sources":["../../src/resources/talon_one_accounts.ts"],"names":[],"mappings":";;AAuFA,MAAM,yBAAyB,WAA6B,CAAA;AAAA,EAE3D,OAAgB,IAA4B,GAAA,oBAAA;AAAA,EAE5C,MAAM,MAAA,CAAO,QAAiC,EAAA,MAAA,EAA+C,OAAqD,EAAA;AACjJ,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAA+C,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,gBAAiB,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AACnI,EAEA,MAAM,MAAA,CAAO,QAAiC,EAAA,MAAA,EAA+C,OAAqD,EAAA;AACjJ,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAA+C,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,gBAAiB,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AACnI,EAEA,MAAM,MAAO,CAAA,EAAA,EAAyB,OAA0C,EAAA;AAC/E,IAAA,MAAM,IAAK,CAAA,SAAA,CAAU,MAAQ,CAAA,OAAO,EAAO,KAAA,QAAA,GAAW,EAAE,EAAA,EAAI,IAAM,EAAA,gBAAA,CAAiB,IAAK,EAAA,GAAI,IAAI,OAAO,CAAA;AAAA;AACxG,EAEA,MAAM,OAAA,CAAQ,iBAA6C,EAAA,MAAA,EAAkC,OAA0D,EAAA;AACtJ,IAAM,MAAA,kBAAA,GAAsB,kBAAsC,EAAM,IAAA,iBAAA;AACxE,IAAO,OAAA,IAAA,CAAK,SAAU,CA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,IAAO,OAAA,KAAA,CAAM,qBAAyC,EAAE,CAAA;AAAA;AACzD,EAEA,sBAAsB,GAAqC,EAAA;AAC1D,IAAO,OAAA,KAAA,CAAM,qBAA0C,CAAA,GAAG,GAAG,CAAA;AAAA;AAC9D,EAGA,IAA4B,GAAA;AAC3B,IAAA,OAAO,gBAAiB,CAAA,IAAA;AAAA;AAG1B;AAGA,MAAM,QAAA,GAAW,IAAI,gBAAiB,EAAA;AACtC,IAAO,0BAAQ,GAAA","file":"talon_one_accounts.js","sourcesContent":["import { ApiResource } from '../resource'\nimport type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { Market } from './markets'\nimport type { DiscountEngineItem } from './discount_engine_items'\nimport type { Attachment } from './attachments'\nimport type { Version } from './versions'\n\n\ntype TalonOneAccountType = 'talon_one_accounts'\ntype TalonOneAccountRel = ResourceRel & { type: TalonOneAccountType }\n\n\nexport type TalonOneAccountSort = Pick<TalonOneAccount, 'id' | 'name'> & ResourceSort\n// export type TalonOneAccountFilter = Pick<TalonOneAccount, 'id' | 'name'> & ResourceFilter\n\n\ninterface TalonOneAccount extends Resource {\n\t\n\treadonly type: TalonOneAccountType\n\n\t/** \n\t * The discount engine's internal name.\n\t * @example ```\"Personal discount engine\"```\n\t */\n\tname: string\n\t/** \n\t * Indicates if the discount engine manages both promotions and gift cards application at once.\n\t */\n\tmanage_gift_cards?: boolean | null\n\t/** \n\t * The API endpoint as computed by specified baseurl.\n\t * @example ```\"https://my_baseurl.talon.one/v2\"```\n\t */\n\tapi_endpoint?: string | null\n\n\tmarkets?: Market[] | null\n\tdiscount_engine_items?: DiscountEngineItem[] | null\n\tattachments?: Attachment[] | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface TalonOneAccountCreate extends ResourceCreate {\n\t\n\t/** \n\t * The discount engine's internal name.\n\t * @example ```\"Personal discount engine\"```\n\t */\n\tname: string\n\t/** \n\t * The Talon.One account API key.\n\t * @example ```\"TALON_ONE_API_KEY\"```\n\t */\n\tapi_key: string\n\t/** \n\t * The Talon.One API baseurl (excluding the talon.one suffix).\n\t * @example ```\"yourbaseurl\"```\n\t */\n\tbaseurl: string\n\t\n}\n\n\ninterface TalonOneAccountUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The discount engine's internal name.\n\t * @example ```\"Personal discount engine\"```\n\t */\n\tname?: string | null\n\t/** \n\t * The Talon.One account API key.\n\t * @example ```\"TALON_ONE_API_KEY\"```\n\t */\n\tapi_key?: string | null\n\t/** \n\t * The Talon.One API baseurl (excluding the talon.one suffix).\n\t * @example ```\"yourbaseurl\"```\n\t */\n\tbaseurl?: string | null\n\t\n}\n\n\nclass TalonOneAccounts extends ApiResource<TalonOneAccount> {\n\n\tstatic readonly TYPE: TalonOneAccountType = 'talon_one_accounts' as const\n\n\tasync create(resource: TalonOneAccountCreate, params?: QueryParamsRetrieve<TalonOneAccount>, options?: ResourcesConfig): Promise<TalonOneAccount> {\n\t\treturn this.resources.create<TalonOneAccountCreate, TalonOneAccount>({ ...resource, type: TalonOneAccounts.TYPE }, params, options)\n\t}\n\n\tasync update(resource: TalonOneAccountUpdate, params?: QueryParamsRetrieve<TalonOneAccount>, options?: ResourcesConfig): Promise<TalonOneAccount> {\n\t\treturn this.resources.update<TalonOneAccountUpdate, TalonOneAccount>({ ...resource, type: TalonOneAccounts.TYPE }, params, options)\n\t}\n\n\tasync delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void> {\n\t\tawait this.resources.delete((typeof id === 'string')? { id, type: TalonOneAccounts.TYPE } : id, options)\n\t}\n\n\tasync markets(talonOneAccountId: string | TalonOneAccount, params?: QueryParamsList<Market>, options?: ResourcesConfig): Promise<ListResponse<Market>> {\n\t\tconst _talonOneAccountId = (talonOneAccountId as TalonOneAccount).id || talonOneAccountId as string\n\t\treturn this.resources.fetch<Market>({ type: 'markets' }, `talon_one_accounts/${_talonOneAccountId}/markets`, params, options) as unknown as ListResponse<Market>\n\t}\n\n\tasync discount_engine_items(talonOneAccountId: string | TalonOneAccount, params?: QueryParamsList<DiscountEngineItem>, options?: ResourcesConfig): Promise<ListResponse<DiscountEngineItem>> {\n\t\tconst _talonOneAccountId = (talonOneAccountId as TalonOneAccount).id || talonOneAccountId as string\n\t\treturn this.resources.fetch<DiscountEngineItem>({ type: 'discount_engine_items' }, `talon_one_accounts/${_talonOneAccountId}/discount_engine_items`, params, options) as unknown as ListResponse<DiscountEngineItem>\n\t}\n\n\tasync attachments(talonOneAccountId: string | TalonOneAccount, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _talonOneAccountId = (talonOneAccountId as TalonOneAccount).id || talonOneAccountId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `talon_one_accounts/${_talonOneAccountId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\tasync versions(talonOneAccountId: string | TalonOneAccount, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _talonOneAccountId = (talonOneAccountId as TalonOneAccount).id || talonOneAccountId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `talon_one_accounts/${_talonOneAccountId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\n\tisTalonOneAccount(resource: any): resource is TalonOneAccount {\n\t\treturn resource.type && (resource.type === TalonOneAccounts.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): TalonOneAccountRel {\n\t\treturn super.relationshipOneToOne<TalonOneAccountRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): TalonOneAccountRel[] {\n\t\treturn super.relationshipOneToMany<TalonOneAccountRel>(...ids)\n\t}\n\n\n\ttype(): TalonOneAccountType {\n\t\treturn TalonOneAccounts.TYPE\n\t}\n\n}\n\n\nconst instance = new TalonOneAccounts()\nexport default instance\n\nexport type { TalonOneAccounts, TalonOneAccount, TalonOneAccountCreate, TalonOneAccountUpdate, TalonOneAccountType }\n"]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../src/resources/tax_calculators.ts"],"names":["ApiResource"],"mappings":";;;;AAoCA,MAAM,uBAAuBA,oBAA2B,CAAA;AAAA,EAEvD,OAAgB,IAA0B,GAAA,iBAAA;AAAA,EAE1C,MAAM,OAAA,CAAQ,eAAyC,EAAA,MAAA,EAAkC,OAA0D,EAAA;AAClJ,IAAM,MAAA,gBAAA,GAAoB,gBAAkC,EAAM,IAAA,eAAA;AAClE,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,KAAA,CAAc,EAAE,IAAA,EAAM,SAAU,EAAA,EAAG,CAAmB,gBAAA,EAAA,gBAAgB,CAAY,QAAA,CAAA,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AACxH,EAEA,MAAM,WAAA,CAAY,eAAyC,EAAA,MAAA,EAAsC,OAA8D,EAAA;AAC9J,IAAM,MAAA,gBAAA,GAAoB,gBAAkC,EAAM,IAAA,eAAA;AAClE,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,KAAA,CAAkB,EAAE,IAAA,EAAM,aAAc,EAAA,EAAG,CAAmB,gBAAA,EAAA,gBAAgB,CAAgB,YAAA,CAAA,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AACpI,EAEA,MAAM,MAAA,CAAO,eAAyC,EAAA,MAAA,EAAiC,OAAyD,EAAA;AAC/I,IAAM,MAAA,gBAAA,GAAoB,gBAAkC,EAAM,IAAA,eAAA;AAClE,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,KAAA,CAAa,EAAE,IAAA,EAAM,QAAS,EAAA,EAAG,CAAmB,gBAAA,EAAA,gBAAgB,CAAW,OAAA,CAAA,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AACrH,EAEA,MAAM,QAAA,CAAS,eAAyC,EAAA,MAAA,EAAmC,OAA2D,EAAA;AACrJ,IAAM,MAAA,gBAAA,GAAoB,gBAAkC,EAAM,IAAA,eAAA;AAClE,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,KAAA,CAAe,EAAE,IAAA,EAAM,UAAW,EAAA,EAAG,CAAmB,gBAAA,EAAA,gBAAgB,CAAa,SAAA,CAAA,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAC3H,EAGA,gBAAgB,QAA0C,EAAA;AACzD,IAAA,OAAO,QAAS,CAAA,IAAA,IAAS,QAAS,CAAA,IAAA,KAAS,cAAe,CAAA,IAAA;AAAA;AAC3D,EAGA,aAAa,EAAkD,EAAA;AAC9D,IAAO,OAAA,KAAA,CAAM,qBAAuC,EAAE,CAAA;AAAA;AACvD,EAEA,sBAAsB,GAAmC,EAAA;AACxD,IAAO,OAAA,KAAA,CAAM,qBAAwC,CAAA,GAAG,GAAG,CAAA;AAAA;AAC5D,EAGA,IAA0B,GAAA;AACzB,IAAA,OAAO,cAAe,CAAA,IAAA;AAAA;AAGxB;AAGA,MAAM,QAAA,GAAW,IAAI,cAAe,EAAA;AACpC,IAAO,uBAAQ,GAAA","file":"tax_calculators.cjs","sourcesContent":["import { ApiResource } from '../resource'\nimport type { Resource, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsList } from '../query'\n\nimport type { Market } from './markets'\nimport type { Attachment } from './attachments'\nimport type { Event } from './events'\nimport type { Version } from './versions'\n\n\ntype TaxCalculatorType = 'tax_calculators'\ntype TaxCalculatorRel = ResourceRel & { type: TaxCalculatorType }\n\n\nexport type TaxCalculatorSort = Pick<TaxCalculator, 'id' | 'name'> & ResourceSort\n// export type TaxCalculatorFilter = Pick<TaxCalculator, 'id' | 'name'> & ResourceFilter\n\n\ninterface TaxCalculator extends Resource {\n\t\n\treadonly type: TaxCalculatorType\n\n\t/** \n\t * The tax calculator's internal name.\n\t * @example ```\"Personal tax calculator\"```\n\t */\n\tname: string\n\n\tmarkets?: Market[] | null\n\tattachments?: Attachment[] | null\n\tevents?: Event[] | null\n\tversions?: Version[] | null\n\n}\n\n\nclass TaxCalculators extends ApiResource<TaxCalculator> {\n\n\tstatic readonly TYPE: TaxCalculatorType = 'tax_calculators' as const\n\n\tasync markets(taxCalculatorId: string | TaxCalculator, params?: QueryParamsList<Market>, options?: ResourcesConfig): Promise<ListResponse<Market>> {\n\t\tconst _taxCalculatorId = (taxCalculatorId as TaxCalculator).id || taxCalculatorId as string\n\t\treturn this.resources.fetch<Market>({ type: 'markets' }, `tax_calculators/${_taxCalculatorId}/markets`, params, options) as unknown as ListResponse<Market>\n\t}\n\n\tasync attachments(taxCalculatorId: string | TaxCalculator, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _taxCalculatorId = (taxCalculatorId as TaxCalculator).id || taxCalculatorId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `tax_calculators/${_taxCalculatorId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\tasync events(taxCalculatorId: string | TaxCalculator, params?: QueryParamsList<Event>, options?: ResourcesConfig): Promise<ListResponse<Event>> {\n\t\tconst _taxCalculatorId = (taxCalculatorId as TaxCalculator).id || taxCalculatorId as string\n\t\treturn this.resources.fetch<Event>({ type: 'events' }, `tax_calculators/${_taxCalculatorId}/events`, params, options) as unknown as ListResponse<Event>\n\t}\n\n\tasync versions(taxCalculatorId: string | TaxCalculator, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _taxCalculatorId = (taxCalculatorId as TaxCalculator).id || taxCalculatorId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `tax_calculators/${_taxCalculatorId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\n\tisTaxCalculator(resource: any): resource is TaxCalculator {\n\t\treturn resource.type && (resource.type === TaxCalculators.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): TaxCalculatorRel {\n\t\treturn super.relationshipOneToOne<TaxCalculatorRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): TaxCalculatorRel[] {\n\t\treturn super.relationshipOneToMany<TaxCalculatorRel>(...ids)\n\t}\n\n\n\ttype(): TaxCalculatorType {\n\t\treturn TaxCalculators.TYPE\n\t}\n\n}\n\n\nconst instance = new TaxCalculators()\nexport default instance\n\nexport type { TaxCalculator, TaxCalculatorType }\n"]}
|
1
|
+
{"version":3,"sources":["../../src/resources/tax_calculators.ts"],"names":["ApiResource"],"mappings":";;;;AAoCA,MAAM,uBAAuBA,oBAA2B,CAAA;AAAA,EAEvD,OAAgB,IAA0B,GAAA,iBAAA;AAAA,EAE1C,MAAM,OAAA,CAAQ,eAAyC,EAAA,MAAA,EAAkC,OAA0D,EAAA;AAClJ,IAAM,MAAA,gBAAA,GAAoB,gBAAkC,EAAM,IAAA,eAAA;AAClE,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,KAAA,CAAc,EAAE,IAAA,EAAM,SAAU,EAAA,EAAG,CAAmB,gBAAA,EAAA,gBAAgB,CAAY,QAAA,CAAA,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AACxH,EAEA,MAAM,WAAA,CAAY,eAAyC,EAAA,MAAA,EAAsC,OAA8D,EAAA;AAC9J,IAAM,MAAA,gBAAA,GAAoB,gBAAkC,EAAM,IAAA,eAAA;AAClE,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,KAAA,CAAkB,EAAE,IAAA,EAAM,aAAc,EAAA,EAAG,CAAmB,gBAAA,EAAA,gBAAgB,CAAgB,YAAA,CAAA,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AACpI,EAEA,MAAM,MAAA,CAAO,eAAyC,EAAA,MAAA,EAAiC,OAAyD,EAAA;AAC/I,IAAM,MAAA,gBAAA,GAAoB,gBAAkC,EAAM,IAAA,eAAA;AAClE,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,KAAA,CAAa,EAAE,IAAA,EAAM,QAAS,EAAA,EAAG,CAAmB,gBAAA,EAAA,gBAAgB,CAAW,OAAA,CAAA,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AACrH,EAEA,MAAM,QAAA,CAAS,eAAyC,EAAA,MAAA,EAAmC,OAA2D,EAAA;AACrJ,IAAM,MAAA,gBAAA,GAAoB,gBAAkC,EAAM,IAAA,eAAA;AAClE,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,KAAA,CAAe,EAAE,IAAA,EAAM,UAAW,EAAA,EAAG,CAAmB,gBAAA,EAAA,gBAAgB,CAAa,SAAA,CAAA,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAC3H,EAGA,gBAAgB,QAA0C,EAAA;AACzD,IAAA,OAAO,QAAS,CAAA,IAAA,IAAS,QAAS,CAAA,IAAA,KAAS,cAAe,CAAA,IAAA;AAAA;AAC3D,EAGA,aAAa,EAAkD,EAAA;AAC9D,IAAO,OAAA,KAAA,CAAM,qBAAuC,EAAE,CAAA;AAAA;AACvD,EAEA,sBAAsB,GAAmC,EAAA;AACxD,IAAO,OAAA,KAAA,CAAM,qBAAwC,CAAA,GAAG,GAAG,CAAA;AAAA;AAC5D,EAGA,IAA0B,GAAA;AACzB,IAAA,OAAO,cAAe,CAAA,IAAA;AAAA;AAGxB;AAGA,MAAM,QAAA,GAAW,IAAI,cAAe,EAAA;AACpC,IAAO,uBAAQ,GAAA","file":"tax_calculators.cjs","sourcesContent":["import { ApiResource } from '../resource'\nimport type { Resource, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsList } from '../query'\n\nimport type { Market } from './markets'\nimport type { Attachment } from './attachments'\nimport type { Event } from './events'\nimport type { Version } from './versions'\n\n\ntype TaxCalculatorType = 'tax_calculators'\ntype TaxCalculatorRel = ResourceRel & { type: TaxCalculatorType }\n\n\nexport type TaxCalculatorSort = Pick<TaxCalculator, 'id' | 'name'> & ResourceSort\n// export type TaxCalculatorFilter = Pick<TaxCalculator, 'id' | 'name'> & ResourceFilter\n\n\ninterface TaxCalculator extends Resource {\n\t\n\treadonly type: TaxCalculatorType\n\n\t/** \n\t * The tax calculator's internal name.\n\t * @example ```\"Personal tax calculator\"```\n\t */\n\tname: string\n\n\tmarkets?: Market[] | null\n\tattachments?: Attachment[] | null\n\tevents?: Event[] | null\n\tversions?: Version[] | null\n\n}\n\n\nclass TaxCalculators extends ApiResource<TaxCalculator> {\n\n\tstatic readonly TYPE: TaxCalculatorType = 'tax_calculators' as const\n\n\tasync markets(taxCalculatorId: string | TaxCalculator, params?: QueryParamsList<Market>, options?: ResourcesConfig): Promise<ListResponse<Market>> {\n\t\tconst _taxCalculatorId = (taxCalculatorId as TaxCalculator).id || taxCalculatorId as string\n\t\treturn this.resources.fetch<Market>({ type: 'markets' }, `tax_calculators/${_taxCalculatorId}/markets`, params, options) as unknown as ListResponse<Market>\n\t}\n\n\tasync attachments(taxCalculatorId: string | TaxCalculator, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _taxCalculatorId = (taxCalculatorId as TaxCalculator).id || taxCalculatorId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `tax_calculators/${_taxCalculatorId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\tasync events(taxCalculatorId: string | TaxCalculator, params?: QueryParamsList<Event>, options?: ResourcesConfig): Promise<ListResponse<Event>> {\n\t\tconst _taxCalculatorId = (taxCalculatorId as TaxCalculator).id || taxCalculatorId as string\n\t\treturn this.resources.fetch<Event>({ type: 'events' }, `tax_calculators/${_taxCalculatorId}/events`, params, options) as unknown as ListResponse<Event>\n\t}\n\n\tasync versions(taxCalculatorId: string | TaxCalculator, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _taxCalculatorId = (taxCalculatorId as TaxCalculator).id || taxCalculatorId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `tax_calculators/${_taxCalculatorId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\n\tisTaxCalculator(resource: any): resource is TaxCalculator {\n\t\treturn resource.type && (resource.type === TaxCalculators.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): TaxCalculatorRel {\n\t\treturn super.relationshipOneToOne<TaxCalculatorRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): TaxCalculatorRel[] {\n\t\treturn super.relationshipOneToMany<TaxCalculatorRel>(...ids)\n\t}\n\n\n\ttype(): TaxCalculatorType {\n\t\treturn TaxCalculators.TYPE\n\t}\n\n}\n\n\nconst instance = new TaxCalculators()\nexport default instance\n\nexport type { TaxCalculators, TaxCalculator, TaxCalculatorType }\n"]}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
export {
|
1
|
+
export { kW as TaxCalculator, kX as TaxCalculatorSort, mX as TaxCalculatorType, dz as TaxCalculators, dy as default } from '../api-IwWtsAqE.cjs';
|
2
2
|
import '../client.cjs';
|
3
|
-
import '../interceptor-
|
3
|
+
import '../interceptor-k15jXzf0.cjs';
|
4
4
|
import '../types.cjs';
|
@@ -1,4 +1,4 @@
|
|
1
|
-
export {
|
1
|
+
export { kW as TaxCalculator, kX as TaxCalculatorSort, mX as TaxCalculatorType, dz as TaxCalculators, dy as default } from '../api-F1F37Dud.js';
|
2
2
|
import '../client.js';
|
3
|
-
import '../interceptor-
|
3
|
+
import '../interceptor-k15jXzf0.js';
|
4
4
|
import '../types.js';
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../src/resources/tax_calculators.ts"],"names":[],"mappings":";;AAoCA,MAAM,uBAAuB,WAA2B,CAAA;AAAA,EAEvD,OAAgB,IAA0B,GAAA,iBAAA;AAAA,EAE1C,MAAM,OAAA,CAAQ,eAAyC,EAAA,MAAA,EAAkC,OAA0D,EAAA;AAClJ,IAAM,MAAA,gBAAA,GAAoB,gBAAkC,EAAM,IAAA,eAAA;AAClE,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kD,EAAA;AAC9D,IAAO,OAAA,KAAA,CAAM,qBAAuC,EAAE,CAAA;AAAA;AACvD,EAEA,sBAAsB,GAAmC,EAAA;AACxD,IAAO,OAAA,KAAA,CAAM,qBAAwC,CAAA,GAAG,GAAG,CAAA;AAAA;AAC5D,EAGA,IAA0B,GAAA;AACzB,IAAA,OAAO,cAAe,CAAA,IAAA;AAAA;AAGxB;AAGA,MAAM,QAAA,GAAW,IAAI,cAAe,EAAA;AACpC,IAAO,uBAAQ,GAAA","file":"tax_calculators.js","sourcesContent":["import { ApiResource } from '../resource'\nimport type { Resource, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsList } from '../query'\n\nimport type { Market } from './markets'\nimport type { Attachment } from './attachments'\nimport type { Event } from './events'\nimport type { Version } from './versions'\n\n\ntype TaxCalculatorType = 'tax_calculators'\ntype TaxCalculatorRel = ResourceRel & { type: TaxCalculatorType }\n\n\nexport type TaxCalculatorSort = Pick<TaxCalculator, 'id' | 'name'> & ResourceSort\n// export type TaxCalculatorFilter = Pick<TaxCalculator, 'id' | 'name'> & ResourceFilter\n\n\ninterface TaxCalculator extends Resource {\n\t\n\treadonly type: TaxCalculatorType\n\n\t/** \n\t * The tax calculator's internal name.\n\t * @example ```\"Personal tax calculator\"```\n\t */\n\tname: string\n\n\tmarkets?: Market[] | null\n\tattachments?: Attachment[] | null\n\tevents?: Event[] | null\n\tversions?: Version[] | null\n\n}\n\n\nclass TaxCalculators extends ApiResource<TaxCalculator> {\n\n\tstatic readonly TYPE: TaxCalculatorType = 'tax_calculators' as const\n\n\tasync markets(taxCalculatorId: string | TaxCalculator, params?: QueryParamsList<Market>, options?: ResourcesConfig): Promise<ListResponse<Market>> {\n\t\tconst _taxCalculatorId = (taxCalculatorId as TaxCalculator).id || taxCalculatorId as string\n\t\treturn this.resources.fetch<Market>({ type: 'markets' }, `tax_calculators/${_taxCalculatorId}/markets`, params, options) as unknown as ListResponse<Market>\n\t}\n\n\tasync attachments(taxCalculatorId: string | TaxCalculator, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _taxCalculatorId = (taxCalculatorId as TaxCalculator).id || taxCalculatorId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `tax_calculators/${_taxCalculatorId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\tasync events(taxCalculatorId: string | TaxCalculator, params?: QueryParamsList<Event>, options?: ResourcesConfig): Promise<ListResponse<Event>> {\n\t\tconst _taxCalculatorId = (taxCalculatorId as TaxCalculator).id || taxCalculatorId as string\n\t\treturn this.resources.fetch<Event>({ type: 'events' }, `tax_calculators/${_taxCalculatorId}/events`, params, options) as unknown as ListResponse<Event>\n\t}\n\n\tasync versions(taxCalculatorId: string | TaxCalculator, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _taxCalculatorId = (taxCalculatorId as TaxCalculator).id || taxCalculatorId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `tax_calculators/${_taxCalculatorId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\n\tisTaxCalculator(resource: any): resource is TaxCalculator {\n\t\treturn resource.type && (resource.type === TaxCalculators.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): TaxCalculatorRel {\n\t\treturn super.relationshipOneToOne<TaxCalculatorRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): TaxCalculatorRel[] {\n\t\treturn super.relationshipOneToMany<TaxCalculatorRel>(...ids)\n\t}\n\n\n\ttype(): TaxCalculatorType {\n\t\treturn TaxCalculators.TYPE\n\t}\n\n}\n\n\nconst instance = new TaxCalculators()\nexport default instance\n\nexport type { TaxCalculator, TaxCalculatorType }\n"]}
|
1
|
+
{"version":3,"sources":["../../src/resources/tax_calculators.ts"],"names":[],"mappings":";;AAoCA,MAAM,uBAAuB,WAA2B,CAAA;AAAA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,EAAQ,OAAO,CAAA;AAAA;AAC3H,EAGA,gBAAgB,QAA0C,EAAA;AACzD,IAAA,OAAO,QAAS,CAAA,IAAA,IAAS,QAAS,CAAA,IAAA,KAAS,cAAe,CAAA,IAAA;AAAA;AAC3D,EAGA,aAAa,EAAkD,EAAA;AAC9D,IAAO,OAAA,KAAA,CAAM,qBAAuC,EAAE,CAAA;AAAA;AACvD,EAEA,sBAAsB,GAAmC,EAAA;AACxD,IAAO,OAAA,KAAA,CAAM,qBAAwC,CAAA,GAAG,GAAG,CAAA;AAAA;AAC5D,EAGA,IAA0B,GAAA;AACzB,IAAA,OAAO,cAAe,CAAA,IAAA;AAAA;AAGxB;AAGA,MAAM,QAAA,GAAW,IAAI,cAAe,EAAA;AACpC,IAAO,uBAAQ,GAAA","file":"tax_calculators.js","sourcesContent":["import { ApiResource } from '../resource'\nimport type { Resource, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsList } from '../query'\n\nimport type { Market } from './markets'\nimport type { Attachment } from './attachments'\nimport type { Event } from './events'\nimport type { Version } from './versions'\n\n\ntype TaxCalculatorType = 'tax_calculators'\ntype TaxCalculatorRel = ResourceRel & { type: TaxCalculatorType }\n\n\nexport type TaxCalculatorSort = Pick<TaxCalculator, 'id' | 'name'> & ResourceSort\n// export type TaxCalculatorFilter = Pick<TaxCalculator, 'id' | 'name'> & ResourceFilter\n\n\ninterface TaxCalculator extends Resource {\n\t\n\treadonly type: TaxCalculatorType\n\n\t/** \n\t * The tax calculator's internal name.\n\t * @example ```\"Personal tax calculator\"```\n\t */\n\tname: string\n\n\tmarkets?: Market[] | null\n\tattachments?: Attachment[] | null\n\tevents?: Event[] | null\n\tversions?: Version[] | null\n\n}\n\n\nclass TaxCalculators extends ApiResource<TaxCalculator> {\n\n\tstatic readonly TYPE: TaxCalculatorType = 'tax_calculators' as const\n\n\tasync markets(taxCalculatorId: string | TaxCalculator, params?: QueryParamsList<Market>, options?: ResourcesConfig): Promise<ListResponse<Market>> {\n\t\tconst _taxCalculatorId = (taxCalculatorId as TaxCalculator).id || taxCalculatorId as string\n\t\treturn this.resources.fetch<Market>({ type: 'markets' }, `tax_calculators/${_taxCalculatorId}/markets`, params, options) as unknown as ListResponse<Market>\n\t}\n\n\tasync attachments(taxCalculatorId: string | TaxCalculator, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _taxCalculatorId = (taxCalculatorId as TaxCalculator).id || taxCalculatorId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `tax_calculators/${_taxCalculatorId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\tasync events(taxCalculatorId: string | TaxCalculator, params?: QueryParamsList<Event>, options?: ResourcesConfig): Promise<ListResponse<Event>> {\n\t\tconst _taxCalculatorId = (taxCalculatorId as TaxCalculator).id || taxCalculatorId as string\n\t\treturn this.resources.fetch<Event>({ type: 'events' }, `tax_calculators/${_taxCalculatorId}/events`, params, options) as unknown as ListResponse<Event>\n\t}\n\n\tasync versions(taxCalculatorId: string | TaxCalculator, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _taxCalculatorId = (taxCalculatorId as TaxCalculator).id || taxCalculatorId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `tax_calculators/${_taxCalculatorId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\n\tisTaxCalculator(resource: any): resource is TaxCalculator {\n\t\treturn resource.type && (resource.type === TaxCalculators.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): TaxCalculatorRel {\n\t\treturn super.relationshipOneToOne<TaxCalculatorRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): TaxCalculatorRel[] {\n\t\treturn super.relationshipOneToMany<TaxCalculatorRel>(...ids)\n\t}\n\n\n\ttype(): TaxCalculatorType {\n\t\treturn TaxCalculators.TYPE\n\t}\n\n}\n\n\nconst instance = new TaxCalculators()\nexport default instance\n\nexport type { TaxCalculators, TaxCalculator, TaxCalculatorType }\n"]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../src/resources/tax_categories.ts"],"names":["ApiResource"],"mappings":";;;;AA0FA,MAAM,sBAAsBA,oBAAyB,CAAA;AAAA,EAEpD,OAAgB,IAAwB,GAAA,gBAAA;AAAA,EAExC,MAAM,MAAA,CAAO,QAA6B,EAAA,MAAA,EAA2C,OAAiD,EAAA;AACrI,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAAuC,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,aAAc,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AACxH,EAEA,MAAM,MAAA,CAAO,QAA6B,EAAA,MAAA,EAA2C,OAAiD,EAAA;AACrI,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAAuC,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,aAAc,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AACxH,EAEA,MAAM,MAAO,CAAA,EAAA,EAAyB,OAA0C,EAAA;AAC/E,IAAA,MAAM,IAAK,CAAA,SAAA,CAAU,MAAQ,CAAA,OAAO,EAAO,KAAA,QAAA,GAAW,EAAE,EAAA,EAAI,IAAM,EAAA,aAAA,CAAc,IAAK,EAAA,GAAI,IAAI,OAAO,CAAA;AAAA;AACrG,EAEA,MAAM,GAAA,CAAI,aAAqC,EAAA,MAAA,EAAmC,OAAyC,EAAA;AAC1H,IAAM,MAAA,cAAA,GAAkB,cAA8B,EAAM,IAAA,aAAA;AAC5D,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,KAAA,CAAW,EAAE,IAAA,EAAM,MAAO,EAAA,EAAG,CAAkB,eAAA,EAAA,cAAc,CAAQ,IAAA,CAAA,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAC3G,EAEA,MAAM,WAAA,CAAY,aAAqC,EAAA,MAAA,EAAsC,OAA8D,EAAA;AAC1J,IAAM,MAAA,cAAA,GAAkB,cAA8B,EAAM,IAAA,aAAA;AAC5D,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,KAAA,CAAkB,EAAE,IAAA,EAAM,aAAc,EAAA,EAAG,CAAkB,eAAA,EAAA,cAAc,CAAgB,YAAA,CAAA,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AACjI,EAEA,MAAM,QAAA,CAAS,aAAqC,EAAA,MAAA,EAAmC,OAA2D,EAAA;AACjJ,IAAM,MAAA,cAAA,GAAkB,cAA8B,EAAM,IAAA,aAAA;AAC5D,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,KAAA,CAAe,EAAE,IAAA,EAAM,UAAW,EAAA,EAAG,CAAkB,eAAA,EAAA,cAAc,CAAa,SAAA,CAAA,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AACxH,EAGA,cAAc,QAAwC,EAAA;AACrD,IAAA,OAAO,QAAS,CAAA,IAAA,IAAS,QAAS,CAAA,IAAA,KAAS,aAAc,CAAA,IAAA;AAAA;AAC1D,EAGA,aAAa,EAAgD,EAAA;AAC5D,IAAO,OAAA,KAAA,CAAM,qBAAqC,EAAE,CAAA;AAAA;AACrD,EAEA,sBAAsB,GAAiC,EAAA;AACtD,IAAO,OAAA,KAAA,CAAM,qBAAsC,CAAA,GAAG,GAAG,CAAA;AAAA;AAC1D,EAGA,IAAwB,GAAA;AACvB,IAAA,OAAO,aAAc,CAAA,IAAA;AAAA;AAGvB;AAGA,MAAM,QAAA,GAAW,IAAI,aAAc,EAAA;AACnC,IAAO,sBAAQ,GAAA","file":"tax_categories.cjs","sourcesContent":["import { ApiResource } from '../resource'\nimport type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { Sku, SkuType } from './skus'\nimport type { Attachment } from './attachments'\nimport type { Version } from './versions'\nimport type { AvalaraAccount, AvalaraAccountType } from './avalara_accounts'\nimport type { StripeTaxAccount, StripeTaxAccountType } from './stripe_tax_accounts'\nimport type { VertexAccount, VertexAccountType } from './vertex_accounts'\nimport type { TaxjarAccount, TaxjarAccountType } from './taxjar_accounts'\nimport type { ManualTaxCalculator, ManualTaxCalculatorType } from './manual_tax_calculators'\nimport type { ExternalTaxCalculator, ExternalTaxCalculatorType } from './external_tax_calculators'\n\n\ntype TaxCategoryType = 'tax_categories'\ntype TaxCategoryRel = ResourceRel & { type: TaxCategoryType }\ntype SkuRel = ResourceRel & { type: SkuType }\ntype AvalaraAccountRel = ResourceRel & { type: AvalaraAccountType }\ntype StripeTaxAccountRel = ResourceRel & { type: StripeTaxAccountType }\ntype VertexAccountRel = ResourceRel & { type: VertexAccountType }\ntype TaxjarAccountRel = ResourceRel & { type: TaxjarAccountType }\ntype ManualTaxCalculatorRel = ResourceRel & { type: ManualTaxCalculatorType }\ntype ExternalTaxCalculatorRel = ResourceRel & { type: ExternalTaxCalculatorType }\n\n\nexport type TaxCategorySort = Pick<TaxCategory, 'id' | 'code'> & ResourceSort\n// export type TaxCategoryFilter = Pick<TaxCategory, 'id' | 'code'> & ResourceFilter\n\n\ninterface TaxCategory extends Resource {\n\t\n\treadonly type: TaxCategoryType\n\n\t/** \n\t * The tax category identifier code, specific for a particular tax calculator.\n\t * @example ```\"31000\"```\n\t */\n\tcode: string\n\t/** \n\t * The code of the associated SKU.\n\t * @example ```\"TSHIRTMM000000FFFFFFXLXX\"```\n\t */\n\tsku_code?: string | null\n\n\tsku?: Sku | null\n\ttax_calculator?: AvalaraAccount | StripeTaxAccount | VertexAccount | TaxjarAccount | ManualTaxCalculator | ExternalTaxCalculator | null\n\tattachments?: Attachment[] | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface TaxCategoryCreate extends ResourceCreate {\n\t\n\t/** \n\t * The tax category identifier code, specific for a particular tax calculator.\n\t * @example ```\"31000\"```\n\t */\n\tcode: string\n\t/** \n\t * The code of the associated SKU.\n\t * @example ```\"TSHIRTMM000000FFFFFFXLXX\"```\n\t */\n\tsku_code?: string | null\n\n\tsku: SkuRel\n\ttax_calculator: AvalaraAccountRel | StripeTaxAccountRel | VertexAccountRel | TaxjarAccountRel | ManualTaxCalculatorRel | ExternalTaxCalculatorRel\n\n}\n\n\ninterface TaxCategoryUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The tax category identifier code, specific for a particular tax calculator.\n\t * @example ```\"31000\"```\n\t */\n\tcode?: string | null\n\t/** \n\t * The code of the associated SKU.\n\t * @example ```\"TSHIRTMM000000FFFFFFXLXX\"```\n\t */\n\tsku_code?: string | null\n\n\tsku?: SkuRel | null\n\n}\n\n\nclass TaxCategories extends ApiResource<TaxCategory> {\n\n\tstatic readonly TYPE: TaxCategoryType = 'tax_categories' as const\n\n\tasync create(resource: TaxCategoryCreate, params?: QueryParamsRetrieve<TaxCategory>, options?: ResourcesConfig): Promise<TaxCategory> {\n\t\treturn this.resources.create<TaxCategoryCreate, TaxCategory>({ ...resource, type: TaxCategories.TYPE }, params, options)\n\t}\n\n\tasync update(resource: TaxCategoryUpdate, params?: QueryParamsRetrieve<TaxCategory>, options?: ResourcesConfig): Promise<TaxCategory> {\n\t\treturn this.resources.update<TaxCategoryUpdate, TaxCategory>({ ...resource, type: TaxCategories.TYPE }, params, options)\n\t}\n\n\tasync delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void> {\n\t\tawait this.resources.delete((typeof id === 'string')? { id, type: TaxCategories.TYPE } : id, options)\n\t}\n\n\tasync sku(taxCategoryId: string | TaxCategory, params?: QueryParamsRetrieve<Sku>, options?: ResourcesConfig): Promise<Sku> {\n\t\tconst _taxCategoryId = (taxCategoryId as TaxCategory).id || taxCategoryId as string\n\t\treturn this.resources.fetch<Sku>({ type: 'skus' }, `tax_categories/${_taxCategoryId}/sku`, params, options) as unknown as Sku\n\t}\n\n\tasync attachments(taxCategoryId: string | TaxCategory, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _taxCategoryId = (taxCategoryId as TaxCategory).id || taxCategoryId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `tax_categories/${_taxCategoryId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\tasync versions(taxCategoryId: string | TaxCategory, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _taxCategoryId = (taxCategoryId as TaxCategory).id || taxCategoryId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `tax_categories/${_taxCategoryId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\n\tisTaxCategory(resource: any): resource is TaxCategory {\n\t\treturn resource.type && (resource.type === TaxCategories.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): TaxCategoryRel {\n\t\treturn super.relationshipOneToOne<TaxCategoryRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): TaxCategoryRel[] {\n\t\treturn super.relationshipOneToMany<TaxCategoryRel>(...ids)\n\t}\n\n\n\ttype(): TaxCategoryType {\n\t\treturn TaxCategories.TYPE\n\t}\n\n}\n\n\nconst instance = new TaxCategories()\nexport default instance\n\nexport type { TaxCategory, TaxCategoryCreate, TaxCategoryUpdate, TaxCategoryType }\n"]}
|
1
|
+
{"version":3,"sources":["../../src/resources/tax_categories.ts"],"names":["ApiResource"],"mappings":";;;;AA0FA,MAAM,sBAAsBA,oBAAyB,CAAA;AAAA,EAEpD,OAAgB,IAAwB,GAAA,gBAAA;AAAA,EAExC,MAAM,MAAA,CAAO,QAA6B,EAAA,MAAA,EAA2C,OAAiD,EAAA;AACrI,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAAuC,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,aAAc,CAAA,IAAA,EAAQ,EAAA,MAAA,E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CAAK,SAAU,CAAA,KAAA,CAAe,EAAE,IAAA,EAAM,UAAW,EAAA,EAAG,CAAkB,eAAA,EAAA,cAAc,CAAa,SAAA,CAAA,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AACxH,EAGA,cAAc,QAAwC,EAAA;AACrD,IAAA,OAAO,QAAS,CAAA,IAAA,IAAS,QAAS,CAAA,IAAA,KAAS,aAAc,CAAA,IAAA;AAAA;AAC1D,EAGA,aAAa,EAAgD,EAAA;AAC5D,IAAO,OAAA,KAAA,CAAM,qBAAqC,EAAE,CAAA;AAAA;AACrD,EAEA,sBAAsB,GAAiC,EAAA;AACtD,IAAO,OAAA,KAAA,CAAM,qBAAsC,CAAA,GAAG,GAAG,CAAA;AAAA;AAC1D,EAGA,IAAwB,GAAA;AACvB,IAAA,OAAO,aAAc,CAAA,IAAA;AAAA;AAGvB;AAGA,MAAM,QAAA,GAAW,IAAI,aAAc,EAAA;AACnC,IAAO,sBAAQ,GAAA","file":"tax_categories.cjs","sourcesContent":["import { ApiResource } from '../resource'\nimport type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { Sku, SkuType } from './skus'\nimport type { Attachment } from './attachments'\nimport type { Version } from './versions'\nimport type { AvalaraAccount, AvalaraAccountType } from './avalara_accounts'\nimport type { StripeTaxAccount, StripeTaxAccountType } from './stripe_tax_accounts'\nimport type { VertexAccount, VertexAccountType } from './vertex_accounts'\nimport type { TaxjarAccount, TaxjarAccountType } from './taxjar_accounts'\nimport type { ManualTaxCalculator, ManualTaxCalculatorType } from './manual_tax_calculators'\nimport type { ExternalTaxCalculator, ExternalTaxCalculatorType } from './external_tax_calculators'\n\n\ntype TaxCategoryType = 'tax_categories'\ntype TaxCategoryRel = ResourceRel & { type: TaxCategoryType }\ntype SkuRel = ResourceRel & { type: SkuType }\ntype AvalaraAccountRel = ResourceRel & { type: AvalaraAccountType }\ntype StripeTaxAccountRel = ResourceRel & { type: StripeTaxAccountType }\ntype VertexAccountRel = ResourceRel & { type: VertexAccountType }\ntype TaxjarAccountRel = ResourceRel & { type: TaxjarAccountType }\ntype ManualTaxCalculatorRel = ResourceRel & { type: ManualTaxCalculatorType }\ntype ExternalTaxCalculatorRel = ResourceRel & { type: ExternalTaxCalculatorType }\n\n\nexport type TaxCategorySort = Pick<TaxCategory, 'id' | 'code'> & ResourceSort\n// export type TaxCategoryFilter = Pick<TaxCategory, 'id' | 'code'> & ResourceFilter\n\n\ninterface TaxCategory extends Resource {\n\t\n\treadonly type: TaxCategoryType\n\n\t/** \n\t * The tax category identifier code, specific for a particular tax calculator.\n\t * @example ```\"31000\"```\n\t */\n\tcode: string\n\t/** \n\t * The code of the associated SKU.\n\t * @example ```\"TSHIRTMM000000FFFFFFXLXX\"```\n\t */\n\tsku_code?: string | null\n\n\tsku?: Sku | null\n\ttax_calculator?: AvalaraAccount | StripeTaxAccount | VertexAccount | TaxjarAccount | ManualTaxCalculator | ExternalTaxCalculator | null\n\tattachments?: Attachment[] | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface TaxCategoryCreate extends ResourceCreate {\n\t\n\t/** \n\t * The tax category identifier code, specific for a particular tax calculator.\n\t * @example ```\"31000\"```\n\t */\n\tcode: string\n\t/** \n\t * The code of the associated SKU.\n\t * @example ```\"TSHIRTMM000000FFFFFFXLXX\"```\n\t */\n\tsku_code?: string | null\n\n\tsku: SkuRel\n\ttax_calculator: AvalaraAccountRel | StripeTaxAccountRel | VertexAccountRel | TaxjarAccountRel | ManualTaxCalculatorRel | ExternalTaxCalculatorRel\n\n}\n\n\ninterface TaxCategoryUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The tax category identifier code, specific for a particular tax calculator.\n\t * @example ```\"31000\"```\n\t */\n\tcode?: string | null\n\t/** \n\t * The code of the associated SKU.\n\t * @example ```\"TSHIRTMM000000FFFFFFXLXX\"```\n\t */\n\tsku_code?: string | null\n\n\tsku?: SkuRel | null\n\n}\n\n\nclass TaxCategories extends ApiResource<TaxCategory> {\n\n\tstatic readonly TYPE: TaxCategoryType = 'tax_categories' as const\n\n\tasync create(resource: TaxCategoryCreate, params?: QueryParamsRetrieve<TaxCategory>, options?: ResourcesConfig): Promise<TaxCategory> {\n\t\treturn this.resources.create<TaxCategoryCreate, TaxCategory>({ ...resource, type: TaxCategories.TYPE }, params, options)\n\t}\n\n\tasync update(resource: TaxCategoryUpdate, params?: QueryParamsRetrieve<TaxCategory>, options?: ResourcesConfig): Promise<TaxCategory> {\n\t\treturn this.resources.update<TaxCategoryUpdate, TaxCategory>({ ...resource, type: TaxCategories.TYPE }, params, options)\n\t}\n\n\tasync delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void> {\n\t\tawait this.resources.delete((typeof id === 'string')? { id, type: TaxCategories.TYPE } : id, options)\n\t}\n\n\tasync sku(taxCategoryId: string | TaxCategory, params?: QueryParamsRetrieve<Sku>, options?: ResourcesConfig): Promise<Sku> {\n\t\tconst _taxCategoryId = (taxCategoryId as TaxCategory).id || taxCategoryId as string\n\t\treturn this.resources.fetch<Sku>({ type: 'skus' }, `tax_categories/${_taxCategoryId}/sku`, params, options) as unknown as Sku\n\t}\n\n\tasync attachments(taxCategoryId: string | TaxCategory, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _taxCategoryId = (taxCategoryId as TaxCategory).id || taxCategoryId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `tax_categories/${_taxCategoryId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\tasync versions(taxCategoryId: string | TaxCategory, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _taxCategoryId = (taxCategoryId as TaxCategory).id || taxCategoryId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `tax_categories/${_taxCategoryId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\n\tisTaxCategory(resource: any): resource is TaxCategory {\n\t\treturn resource.type && (resource.type === TaxCategories.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): TaxCategoryRel {\n\t\treturn super.relationshipOneToOne<TaxCategoryRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): TaxCategoryRel[] {\n\t\treturn super.relationshipOneToMany<TaxCategoryRel>(...ids)\n\t}\n\n\n\ttype(): TaxCategoryType {\n\t\treturn TaxCategories.TYPE\n\t}\n\n}\n\n\nconst instance = new TaxCategories()\nexport default instance\n\nexport type { TaxCategories, TaxCategory, TaxCategoryCreate, TaxCategoryUpdate, TaxCategoryType }\n"]}
|