@commercelayer/sdk 7.4.1 → 7.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +1 -1
- package/lib/{api-CAxIMq4w.d.ts → api-DrryxHto.d.ts} +617 -129
- package/lib/{api-4eRXMJTL.d.cts → api-Hc0WV-9j.d.cts} +617 -129
- package/lib/api.cjs +36 -36
- package/lib/api.d.cts +2 -2
- package/lib/api.d.ts +2 -2
- package/lib/api.js +18 -18
- package/lib/bundle.cjs +38 -38
- package/lib/bundle.d.cts +2 -2
- package/lib/bundle.d.ts +2 -2
- package/lib/bundle.js +19 -19
- package/lib/{chunk-FCGKL7AI.cjs → chunk-2C3Z5JNK.cjs} +8 -2
- package/lib/chunk-2C3Z5JNK.cjs.map +1 -0
- package/lib/{chunk-6MVBC553.js → chunk-2JB3IVP4.js} +2 -2
- package/lib/chunk-2JB3IVP4.js.map +1 -0
- package/lib/{chunk-UTFSZHUD.cjs → chunk-2ZVHALAO.cjs} +2 -2
- package/lib/{chunk-UTFSZHUD.cjs.map → chunk-2ZVHALAO.cjs.map} +1 -1
- package/lib/{chunk-F6TOLEEF.js → chunk-34MN4L45.js} +2 -2
- package/lib/{chunk-F6TOLEEF.js.map → chunk-34MN4L45.js.map} +1 -1
- package/lib/{chunk-YPRABQMP.js → chunk-3KNN5WPE.js} +8 -2
- package/lib/chunk-3KNN5WPE.js.map +1 -0
- package/lib/{chunk-6QOS6B5F.cjs → chunk-3X6OVCVT.cjs} +8 -2
- package/lib/chunk-3X6OVCVT.cjs.map +1 -0
- package/lib/{chunk-KDQRA5YH.js → chunk-67LLQOPH.js} +8 -2
- package/lib/chunk-67LLQOPH.js.map +1 -0
- package/lib/{chunk-73VR2FML.cjs → chunk-6DRGTFBA.cjs} +8 -2
- package/lib/chunk-6DRGTFBA.cjs.map +1 -0
- package/lib/{chunk-EFU44R7O.js → chunk-6SO2W3YA.js} +2 -2
- package/lib/chunk-6SO2W3YA.js.map +1 -0
- package/lib/{chunk-7AHYBTEX.js → chunk-A3VWVK2F.js} +2 -2
- package/lib/chunk-A3VWVK2F.js.map +1 -0
- package/lib/{chunk-TWQ4THAG.js → chunk-A5KAGODH.js} +8 -2
- package/lib/chunk-A5KAGODH.js.map +1 -0
- package/lib/{chunk-LZXPO7K6.cjs → chunk-ALCZSKPR.cjs} +2 -2
- package/lib/chunk-ALCZSKPR.cjs.map +1 -0
- package/lib/{chunk-OS5DXUBX.js → chunk-BGH55KTL.js} +8 -2
- package/lib/chunk-BGH55KTL.js.map +1 -0
- package/lib/{chunk-OBUC6JTQ.js → chunk-BPUZXZM4.js} +3 -3
- package/lib/{chunk-OBUC6JTQ.js.map → chunk-BPUZXZM4.js.map} +1 -1
- package/lib/{chunk-4B4WZM22.cjs → chunk-C27B7IUW.cjs} +2 -2
- package/lib/{chunk-4B4WZM22.cjs.map → chunk-C27B7IUW.cjs.map} +1 -1
- package/lib/{chunk-7OLCOMGV.cjs → chunk-EJNNEY2F.cjs} +8 -2
- package/lib/chunk-EJNNEY2F.cjs.map +1 -0
- package/lib/{chunk-KIB4XYWP.js → chunk-ERA2COOU.js} +2 -2
- package/lib/{chunk-KIB4XYWP.js.map → chunk-ERA2COOU.js.map} +1 -1
- package/lib/{chunk-HH3NIT7B.js → chunk-FFX5MED5.js} +8 -2
- package/lib/chunk-FFX5MED5.js.map +1 -0
- package/lib/{chunk-R2TFAOMW.cjs → chunk-H7JSRNFC.cjs} +4 -4
- package/lib/{chunk-R2TFAOMW.cjs.map → chunk-H7JSRNFC.cjs.map} +1 -1
- package/lib/{chunk-PENOPHMW.js → chunk-HBVSEXIQ.js} +8 -2
- package/lib/chunk-HBVSEXIQ.js.map +1 -0
- package/lib/{chunk-ZVS24BIO.js → chunk-HU6DRUWJ.js} +2 -2
- package/lib/chunk-HU6DRUWJ.js.map +1 -0
- package/lib/{chunk-PIYKFPYB.js → chunk-IR2JJDF5.js} +8 -2
- package/lib/chunk-IR2JJDF5.js.map +1 -0
- package/lib/{chunk-3SD7QN5M.js → chunk-JD3MI7AO.js} +8 -2
- package/lib/chunk-JD3MI7AO.js.map +1 -0
- package/lib/{chunk-RDTIBHZO.cjs → chunk-JLLZQ7JR.cjs} +8 -2
- package/lib/chunk-JLLZQ7JR.cjs.map +1 -0
- package/lib/{chunk-LGO42DAS.cjs → chunk-JWB5Y2WT.cjs} +2 -2
- package/lib/chunk-JWB5Y2WT.cjs.map +1 -0
- package/lib/{chunk-7LH7NNTW.js → chunk-K6MX6OZL.js} +2 -2
- package/lib/{chunk-7LH7NNTW.js.map → chunk-K6MX6OZL.js.map} +1 -1
- package/lib/{chunk-DPIHG4FX.cjs → chunk-LKBPLGXI.cjs} +8 -2
- package/lib/chunk-LKBPLGXI.cjs.map +1 -0
- package/lib/{chunk-HZAMBMKK.cjs → chunk-LTVCCLTK.cjs} +2 -2
- package/lib/chunk-LTVCCLTK.cjs.map +1 -0
- package/lib/{chunk-I73TW24N.cjs → chunk-MBROL4C2.cjs} +2 -2
- package/lib/chunk-MBROL4C2.cjs.map +1 -0
- package/lib/{chunk-OQHCTA6S.js → chunk-MBWTMQHA.js} +3 -3
- package/lib/chunk-MBWTMQHA.js.map +1 -0
- package/lib/{chunk-WQ7WYE77.cjs → chunk-NHDSPKJY.cjs} +3 -3
- package/lib/chunk-NHDSPKJY.cjs.map +1 -0
- package/lib/{chunk-ZW4CB7J7.cjs → chunk-NVNPOVIQ.cjs} +2 -2
- package/lib/{chunk-ZW4CB7J7.cjs.map → chunk-NVNPOVIQ.cjs.map} +1 -1
- package/lib/{chunk-6ZUGJHNV.cjs → chunk-O66EZDG2.cjs} +8 -2
- package/lib/chunk-O66EZDG2.cjs.map +1 -0
- package/lib/{chunk-A76SFMAB.cjs → chunk-PXSMF4QS.cjs} +8 -2
- package/lib/chunk-PXSMF4QS.cjs.map +1 -0
- package/lib/{chunk-4ATZM33H.js → chunk-SFFSVEXJ.js} +8 -2
- package/lib/chunk-SFFSVEXJ.js.map +1 -0
- package/lib/{chunk-REUVJUJK.js → chunk-V7BADAPA.js} +2 -2
- package/lib/chunk-V7BADAPA.js.map +1 -0
- package/lib/{chunk-DEYOBMM5.js → chunk-VZGJGOH3.js} +8 -2
- package/lib/chunk-VZGJGOH3.js.map +1 -0
- package/lib/{chunk-WVCUPAHM.cjs → chunk-WLTZ66G4.cjs} +2 -2
- package/lib/chunk-WLTZ66G4.cjs.map +1 -0
- package/lib/{chunk-YZ4JURI3.cjs → chunk-YDMB4XPA.cjs} +8 -2
- package/lib/chunk-YDMB4XPA.cjs.map +1 -0
- package/lib/{chunk-II544XO5.cjs → chunk-ZSWW2XGD.cjs} +8 -2
- package/lib/chunk-ZSWW2XGD.cjs.map +1 -0
- package/lib/client.d.cts +1 -1
- package/lib/client.d.ts +1 -1
- package/lib/commercelayer.cjs +5 -5
- package/lib/commercelayer.d.cts +4 -4
- package/lib/commercelayer.d.ts +4 -4
- package/lib/commercelayer.js +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/fetch.d.cts +1 -1
- package/lib/fetch.d.ts +1 -1
- package/lib/index.cjs +41 -41
- package/lib/index.d.cts +3 -3
- package/lib/index.d.ts +3 -3
- package/lib/index.js +20 -20
- package/lib/{interceptor-k15jXzf0.d.cts → interceptor-ETmS7Tab.d.cts} +1 -1
- package/lib/{interceptor-k15jXzf0.d.ts → interceptor-ETmS7Tab.d.ts} +1 -1
- 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.d.cts +2 -2
- package/lib/resource.d.ts +2 -2
- package/lib/resources/addresses.d.cts +3 -3
- package/lib/resources/addresses.d.ts +2 -2
- package/lib/resources/adjustments.d.cts +3 -3
- package/lib/resources/adjustments.d.ts +2 -2
- package/lib/resources/adyen_gateways.cjs +2 -2
- package/lib/resources/adyen_gateways.d.cts +3 -3
- package/lib/resources/adyen_gateways.d.ts +2 -2
- package/lib/resources/adyen_gateways.js +1 -1
- package/lib/resources/adyen_payments.d.cts +3 -3
- package/lib/resources/adyen_payments.d.ts +2 -2
- package/lib/resources/applications.d.cts +3 -3
- package/lib/resources/applications.d.ts +2 -2
- package/lib/resources/attachments.cjs +2 -2
- package/lib/resources/attachments.d.cts +3 -3
- package/lib/resources/attachments.d.ts +2 -2
- package/lib/resources/attachments.js +1 -1
- package/lib/resources/authorizations.d.cts +3 -3
- package/lib/resources/authorizations.d.ts +2 -2
- package/lib/resources/avalara_accounts.d.cts +3 -3
- package/lib/resources/avalara_accounts.d.ts +2 -2
- package/lib/resources/axerve_gateways.cjs +2 -2
- package/lib/resources/axerve_gateways.d.cts +3 -3
- package/lib/resources/axerve_gateways.d.ts +2 -2
- package/lib/resources/axerve_gateways.js +1 -1
- package/lib/resources/axerve_payments.d.cts +3 -3
- package/lib/resources/axerve_payments.d.ts +2 -2
- package/lib/resources/bing_geocoders.d.cts +3 -3
- package/lib/resources/bing_geocoders.d.ts +2 -2
- package/lib/resources/braintree_gateways.cjs +2 -2
- package/lib/resources/braintree_gateways.d.cts +3 -3
- package/lib/resources/braintree_gateways.d.ts +2 -2
- package/lib/resources/braintree_gateways.js +1 -1
- package/lib/resources/braintree_payments.d.cts +3 -3
- package/lib/resources/braintree_payments.d.ts +2 -2
- package/lib/resources/bundles.d.cts +3 -3
- package/lib/resources/bundles.d.ts +2 -2
- package/lib/resources/buy_x_pay_y_promotions.d.cts +3 -3
- package/lib/resources/buy_x_pay_y_promotions.d.ts +2 -2
- package/lib/resources/captures.d.cts +3 -3
- package/lib/resources/captures.d.ts +2 -2
- package/lib/resources/carrier_accounts.d.cts +3 -3
- package/lib/resources/carrier_accounts.d.ts +2 -2
- package/lib/resources/checkout_com_gateways.cjs +2 -2
- package/lib/resources/checkout_com_gateways.d.cts +3 -3
- package/lib/resources/checkout_com_gateways.d.ts +2 -2
- package/lib/resources/checkout_com_gateways.js +1 -1
- package/lib/resources/checkout_com_payments.d.cts +3 -3
- package/lib/resources/checkout_com_payments.d.ts +2 -2
- package/lib/resources/cleanups.d.cts +3 -3
- package/lib/resources/cleanups.d.ts +2 -2
- package/lib/resources/coupon_codes_promotion_rules.d.cts +3 -3
- package/lib/resources/coupon_codes_promotion_rules.d.ts +2 -2
- package/lib/resources/coupon_recipients.d.cts +3 -3
- package/lib/resources/coupon_recipients.d.ts +2 -2
- package/lib/resources/coupons.d.cts +3 -3
- package/lib/resources/coupons.d.ts +2 -2
- package/lib/resources/custom_promotion_rules.d.cts +3 -3
- package/lib/resources/custom_promotion_rules.d.ts +2 -2
- package/lib/resources/customer_addresses.d.cts +3 -3
- package/lib/resources/customer_addresses.d.ts +2 -2
- package/lib/resources/customer_groups.d.cts +3 -3
- package/lib/resources/customer_groups.d.ts +2 -2
- package/lib/resources/customer_password_resets.d.cts +3 -3
- package/lib/resources/customer_password_resets.d.ts +2 -2
- package/lib/resources/customer_payment_sources.d.cts +3 -3
- package/lib/resources/customer_payment_sources.d.ts +2 -2
- package/lib/resources/customer_subscriptions.d.cts +3 -3
- package/lib/resources/customer_subscriptions.d.ts +2 -2
- package/lib/resources/customers.d.cts +3 -3
- package/lib/resources/customers.d.ts +2 -2
- package/lib/resources/delivery_lead_times.d.cts +3 -3
- package/lib/resources/delivery_lead_times.d.ts +2 -2
- package/lib/resources/discount_engine_items.d.cts +3 -3
- package/lib/resources/discount_engine_items.d.ts +2 -2
- package/lib/resources/discount_engines.d.cts +3 -3
- package/lib/resources/discount_engines.d.ts +2 -2
- package/lib/resources/easypost_pickups.d.cts +3 -3
- package/lib/resources/easypost_pickups.d.ts +2 -2
- package/lib/resources/event_callbacks.d.cts +3 -3
- package/lib/resources/event_callbacks.d.ts +2 -2
- package/lib/resources/event_stores.d.cts +3 -3
- package/lib/resources/event_stores.d.ts +2 -2
- package/lib/resources/events.d.cts +3 -3
- package/lib/resources/events.d.ts +2 -2
- package/lib/resources/exports.d.cts +3 -3
- package/lib/resources/exports.d.ts +2 -2
- package/lib/resources/external_gateways.cjs +2 -2
- package/lib/resources/external_gateways.d.cts +3 -3
- package/lib/resources/external_gateways.d.ts +2 -2
- package/lib/resources/external_gateways.js +1 -1
- package/lib/resources/external_payments.d.cts +3 -3
- package/lib/resources/external_payments.d.ts +2 -2
- package/lib/resources/external_promotions.cjs +2 -2
- package/lib/resources/external_promotions.d.cts +3 -3
- package/lib/resources/external_promotions.d.ts +2 -2
- package/lib/resources/external_promotions.js +1 -1
- package/lib/resources/external_tax_calculators.cjs +2 -2
- package/lib/resources/external_tax_calculators.d.cts +3 -3
- package/lib/resources/external_tax_calculators.d.ts +2 -2
- package/lib/resources/external_tax_calculators.js +1 -1
- package/lib/resources/fixed_amount_promotions.d.cts +3 -3
- package/lib/resources/fixed_amount_promotions.d.ts +2 -2
- package/lib/resources/fixed_price_promotions.d.cts +3 -3
- package/lib/resources/fixed_price_promotions.d.ts +2 -2
- package/lib/resources/flex_promotions.d.cts +3 -3
- package/lib/resources/flex_promotions.d.ts +2 -2
- package/lib/resources/free_gift_promotions.d.cts +3 -3
- package/lib/resources/free_gift_promotions.d.ts +2 -2
- package/lib/resources/free_shipping_promotions.d.cts +3 -3
- package/lib/resources/free_shipping_promotions.d.ts +2 -2
- package/lib/resources/geocoders.d.cts +3 -3
- package/lib/resources/geocoders.d.ts +2 -2
- package/lib/resources/gift_card_recipients.d.cts +3 -3
- package/lib/resources/gift_card_recipients.d.ts +2 -2
- package/lib/resources/gift_cards.d.cts +3 -3
- package/lib/resources/gift_cards.d.ts +2 -2
- package/lib/resources/google_geocoders.d.cts +3 -3
- package/lib/resources/google_geocoders.d.ts +2 -2
- package/lib/resources/imports.cjs +2 -2
- package/lib/resources/imports.d.cts +3 -3
- package/lib/resources/imports.d.ts +2 -2
- package/lib/resources/imports.js +1 -1
- package/lib/resources/in_stock_subscriptions.d.cts +3 -3
- package/lib/resources/in_stock_subscriptions.d.ts +2 -2
- package/lib/resources/inventory_models.d.cts +3 -3
- package/lib/resources/inventory_models.d.ts +2 -2
- package/lib/resources/inventory_return_locations.d.cts +3 -3
- package/lib/resources/inventory_return_locations.d.ts +2 -2
- package/lib/resources/inventory_stock_locations.d.cts +3 -3
- package/lib/resources/inventory_stock_locations.d.ts +2 -2
- package/lib/resources/klarna_gateways.cjs +2 -2
- package/lib/resources/klarna_gateways.d.cts +3 -3
- package/lib/resources/klarna_gateways.d.ts +2 -2
- package/lib/resources/klarna_gateways.js +1 -1
- package/lib/resources/klarna_payments.d.cts +3 -3
- package/lib/resources/klarna_payments.d.ts +2 -2
- package/lib/resources/line_item_options.d.cts +3 -3
- package/lib/resources/line_item_options.d.ts +2 -2
- package/lib/resources/line_items.d.cts +3 -3
- package/lib/resources/line_items.d.ts +2 -2
- package/lib/resources/links.d.cts +3 -3
- package/lib/resources/links.d.ts +2 -2
- package/lib/resources/manual_gateways.cjs +2 -2
- package/lib/resources/manual_gateways.d.cts +3 -3
- package/lib/resources/manual_gateways.d.ts +2 -2
- package/lib/resources/manual_gateways.js +1 -1
- package/lib/resources/manual_tax_calculators.d.cts +3 -3
- package/lib/resources/manual_tax_calculators.d.ts +2 -2
- package/lib/resources/markets.cjs +2 -2
- package/lib/resources/markets.d.cts +3 -3
- package/lib/resources/markets.d.ts +2 -2
- package/lib/resources/markets.js +1 -1
- package/lib/resources/merchants.d.cts +3 -3
- package/lib/resources/merchants.d.ts +2 -2
- package/lib/resources/notifications.cjs +2 -2
- package/lib/resources/notifications.d.cts +3 -3
- package/lib/resources/notifications.d.ts +2 -2
- package/lib/resources/notifications.js +1 -1
- package/lib/resources/order_amount_promotion_rules.d.cts +3 -3
- package/lib/resources/order_amount_promotion_rules.d.ts +2 -2
- package/lib/resources/order_copies.d.cts +3 -3
- package/lib/resources/order_copies.d.ts +2 -2
- package/lib/resources/order_factories.d.cts +3 -3
- package/lib/resources/order_factories.d.ts +2 -2
- package/lib/resources/order_subscription_items.d.cts +3 -3
- package/lib/resources/order_subscription_items.d.ts +2 -2
- package/lib/resources/order_subscriptions.d.cts +3 -3
- package/lib/resources/order_subscriptions.d.ts +2 -2
- package/lib/resources/orders.d.cts +3 -3
- package/lib/resources/orders.d.ts +2 -2
- package/lib/resources/organizations.d.cts +3 -3
- package/lib/resources/organizations.d.ts +2 -2
- package/lib/resources/packages.d.cts +3 -3
- package/lib/resources/packages.d.ts +2 -2
- package/lib/resources/parcel_line_items.d.cts +3 -3
- package/lib/resources/parcel_line_items.d.ts +2 -2
- package/lib/resources/parcels.d.cts +3 -3
- package/lib/resources/parcels.d.ts +2 -2
- package/lib/resources/payment_gateways.cjs +2 -2
- package/lib/resources/payment_gateways.d.cts +3 -3
- package/lib/resources/payment_gateways.d.ts +2 -2
- package/lib/resources/payment_gateways.js +1 -1
- package/lib/resources/payment_methods.d.cts +3 -3
- package/lib/resources/payment_methods.d.ts +2 -2
- package/lib/resources/payment_options.d.cts +3 -3
- package/lib/resources/payment_options.d.ts +2 -2
- package/lib/resources/paypal_gateways.cjs +2 -2
- package/lib/resources/paypal_gateways.d.cts +3 -3
- package/lib/resources/paypal_gateways.d.ts +2 -2
- package/lib/resources/paypal_gateways.js +1 -1
- package/lib/resources/paypal_payments.d.cts +3 -3
- package/lib/resources/paypal_payments.d.ts +2 -2
- package/lib/resources/percentage_discount_promotions.d.cts +3 -3
- package/lib/resources/percentage_discount_promotions.d.ts +2 -2
- package/lib/resources/pickups.d.cts +3 -3
- package/lib/resources/pickups.d.ts +2 -2
- package/lib/resources/price_frequency_tiers.d.cts +3 -3
- package/lib/resources/price_frequency_tiers.d.ts +2 -2
- package/lib/resources/price_list_schedulers.d.cts +3 -3
- package/lib/resources/price_list_schedulers.d.ts +2 -2
- package/lib/resources/price_lists.d.cts +3 -3
- package/lib/resources/price_lists.d.ts +2 -2
- package/lib/resources/price_tiers.d.cts +3 -3
- package/lib/resources/price_tiers.d.ts +2 -2
- package/lib/resources/price_volume_tiers.d.cts +3 -3
- package/lib/resources/price_volume_tiers.d.ts +2 -2
- package/lib/resources/prices.d.cts +3 -3
- package/lib/resources/prices.d.ts +2 -2
- package/lib/resources/promotion_rules.d.cts +3 -3
- package/lib/resources/promotion_rules.d.ts +2 -2
- package/lib/resources/promotions.d.cts +3 -3
- package/lib/resources/promotions.d.ts +2 -2
- package/lib/resources/recurring_order_copies.d.cts +3 -3
- package/lib/resources/recurring_order_copies.d.ts +2 -2
- package/lib/resources/refunds.d.cts +3 -3
- package/lib/resources/refunds.d.ts +2 -2
- package/lib/resources/reserved_stocks.d.cts +3 -3
- package/lib/resources/reserved_stocks.d.ts +2 -2
- package/lib/resources/resource_errors.d.cts +3 -3
- package/lib/resources/resource_errors.d.ts +2 -2
- package/lib/resources/return_line_items.d.cts +3 -3
- package/lib/resources/return_line_items.d.ts +2 -2
- package/lib/resources/returns.d.cts +3 -3
- package/lib/resources/returns.d.ts +2 -2
- package/lib/resources/satispay_gateways.cjs +2 -2
- package/lib/resources/satispay_gateways.d.cts +3 -3
- package/lib/resources/satispay_gateways.d.ts +2 -2
- package/lib/resources/satispay_gateways.js +1 -1
- package/lib/resources/satispay_payments.d.cts +3 -3
- package/lib/resources/satispay_payments.d.ts +2 -2
- package/lib/resources/shipments.d.cts +3 -3
- package/lib/resources/shipments.d.ts +2 -2
- package/lib/resources/shipping_categories.d.cts +3 -3
- package/lib/resources/shipping_categories.d.ts +2 -2
- package/lib/resources/shipping_method_tiers.d.cts +3 -3
- package/lib/resources/shipping_method_tiers.d.ts +2 -2
- package/lib/resources/shipping_methods.cjs +2 -2
- package/lib/resources/shipping_methods.d.cts +3 -3
- package/lib/resources/shipping_methods.d.ts +2 -2
- package/lib/resources/shipping_methods.js +1 -1
- package/lib/resources/shipping_weight_tiers.d.cts +3 -3
- package/lib/resources/shipping_weight_tiers.d.ts +2 -2
- package/lib/resources/shipping_zones.d.cts +3 -3
- package/lib/resources/shipping_zones.d.ts +2 -2
- package/lib/resources/sku_list_items.d.cts +3 -3
- package/lib/resources/sku_list_items.d.ts +2 -2
- package/lib/resources/sku_list_promotion_rules.d.cts +3 -3
- package/lib/resources/sku_list_promotion_rules.d.ts +2 -2
- package/lib/resources/sku_lists.d.cts +3 -3
- package/lib/resources/sku_lists.d.ts +2 -2
- package/lib/resources/sku_options.d.cts +3 -3
- package/lib/resources/sku_options.d.ts +2 -2
- package/lib/resources/skus.d.cts +3 -3
- package/lib/resources/skus.d.ts +2 -2
- package/lib/resources/stock_items.d.cts +3 -3
- package/lib/resources/stock_items.d.ts +2 -2
- package/lib/resources/stock_line_items.d.cts +3 -3
- package/lib/resources/stock_line_items.d.ts +2 -2
- package/lib/resources/stock_locations.d.cts +3 -3
- package/lib/resources/stock_locations.d.ts +2 -2
- package/lib/resources/stock_reservations.d.cts +3 -3
- package/lib/resources/stock_reservations.d.ts +2 -2
- package/lib/resources/stock_transfers.d.cts +3 -3
- package/lib/resources/stock_transfers.d.ts +2 -2
- package/lib/resources/stores.d.cts +3 -3
- package/lib/resources/stores.d.ts +2 -2
- package/lib/resources/stripe_gateways.cjs +2 -2
- package/lib/resources/stripe_gateways.d.cts +3 -3
- package/lib/resources/stripe_gateways.d.ts +2 -2
- package/lib/resources/stripe_gateways.js +1 -1
- package/lib/resources/stripe_payments.d.cts +3 -3
- package/lib/resources/stripe_payments.d.ts +2 -2
- package/lib/resources/stripe_tax_accounts.d.cts +3 -3
- package/lib/resources/stripe_tax_accounts.d.ts +2 -2
- package/lib/resources/subscription_models.d.cts +3 -3
- package/lib/resources/subscription_models.d.ts +2 -2
- package/lib/resources/tags.d.cts +3 -3
- package/lib/resources/tags.d.ts +2 -2
- package/lib/resources/talon_one_accounts.d.cts +3 -3
- package/lib/resources/talon_one_accounts.d.ts +2 -2
- package/lib/resources/tax_calculators.d.cts +3 -3
- package/lib/resources/tax_calculators.d.ts +2 -2
- package/lib/resources/tax_categories.d.cts +3 -3
- package/lib/resources/tax_categories.d.ts +2 -2
- package/lib/resources/tax_rules.d.cts +3 -3
- package/lib/resources/tax_rules.d.ts +2 -2
- package/lib/resources/taxjar_accounts.d.cts +3 -3
- package/lib/resources/taxjar_accounts.d.ts +2 -2
- package/lib/resources/transactions.d.cts +3 -3
- package/lib/resources/transactions.d.ts +2 -2
- package/lib/resources/versions.d.cts +3 -3
- package/lib/resources/versions.d.ts +2 -2
- package/lib/resources/vertex_accounts.d.cts +3 -3
- package/lib/resources/vertex_accounts.d.ts +2 -2
- package/lib/resources/voids.d.cts +3 -3
- package/lib/resources/voids.d.ts +2 -2
- package/lib/resources/webhooks.d.cts +3 -3
- package/lib/resources/webhooks.d.ts +2 -2
- package/lib/resources/wire_transfers.d.cts +3 -3
- package/lib/resources/wire_transfers.d.ts +2 -2
- package/lib/static.cjs +3 -3
- package/lib/static.d.cts +2 -2
- package/lib/static.d.ts +2 -2
- package/lib/static.js +2 -2
- package/package.json +3 -3
- package/lib/chunk-3SD7QN5M.js.map +0 -1
- package/lib/chunk-4ATZM33H.js.map +0 -1
- package/lib/chunk-6MVBC553.js.map +0 -1
- package/lib/chunk-6QOS6B5F.cjs.map +0 -1
- package/lib/chunk-6ZUGJHNV.cjs.map +0 -1
- package/lib/chunk-73VR2FML.cjs.map +0 -1
- package/lib/chunk-7AHYBTEX.js.map +0 -1
- package/lib/chunk-7OLCOMGV.cjs.map +0 -1
- package/lib/chunk-A76SFMAB.cjs.map +0 -1
- package/lib/chunk-DEYOBMM5.js.map +0 -1
- package/lib/chunk-DPIHG4FX.cjs.map +0 -1
- package/lib/chunk-EFU44R7O.js.map +0 -1
- package/lib/chunk-FCGKL7AI.cjs.map +0 -1
- package/lib/chunk-HH3NIT7B.js.map +0 -1
- package/lib/chunk-HZAMBMKK.cjs.map +0 -1
- package/lib/chunk-I73TW24N.cjs.map +0 -1
- package/lib/chunk-II544XO5.cjs.map +0 -1
- package/lib/chunk-KDQRA5YH.js.map +0 -1
- package/lib/chunk-LGO42DAS.cjs.map +0 -1
- package/lib/chunk-LZXPO7K6.cjs.map +0 -1
- package/lib/chunk-OQHCTA6S.js.map +0 -1
- package/lib/chunk-OS5DXUBX.js.map +0 -1
- package/lib/chunk-PENOPHMW.js.map +0 -1
- package/lib/chunk-PIYKFPYB.js.map +0 -1
- package/lib/chunk-RDTIBHZO.cjs.map +0 -1
- package/lib/chunk-REUVJUJK.js.map +0 -1
- package/lib/chunk-TWQ4THAG.js.map +0 -1
- package/lib/chunk-WQ7WYE77.cjs.map +0 -1
- package/lib/chunk-WVCUPAHM.cjs.map +0 -1
- package/lib/chunk-YPRABQMP.js.map +0 -1
- package/lib/chunk-YZ4JURI3.cjs.map +0 -1
- package/lib/chunk-ZVS24BIO.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/resources/external_promotions.ts"],"names":[],"mappings":";;;AA0SA,IAAM,kBAAA,GAAN,MAAM,mBAAA,SAA2B,WAAA,CAA+B;AAAA,EAE/D,OAAgB,IAAA,GAA8B,qBAAA;AAAA,EAE9C,MAAM,MAAA,CAAO,QAAA,EAAmC,MAAA,EAAiD,OAAA,EAAuD;AACvJ,IAAA,OAAO,IAAA,CAAK,SAAA,CAAU,MAAA,CAAmD,EAAE,GAAG,QAAA,EAAU,IAAA,EAAM,mBAAA,CAAmB,IAAA,EAAK,EAAG,MAAA,EAAQ,OAAO,CAAA;AAAA,EACzI;AAAA,EAEA,MAAM,MAAA,CAAO,QAAA,EAAmC,MAAA,EAAiD,OAAA,EAAuD;AACvJ,IAAA,OAAO,IAAA,CAAK,SAAA,CAAU,MAAA,CAAmD,EAAE,GAAG,QAAA,EAAU,IAAA,EAAM,mBAAA,CAAmB,IAAA,EAAK,EAAG,MAAA,EAAQ,OAAO,CAAA;AAAA,EACzI;AAAA,EAEA,MAAM,MAAA,CAAO,EAAA,EAAyB,OAAA,EAA0C;AAC/E,IAAA,MAAM,IAAA,CAAK,SAAA,CAAU,MAAA,CAAQ,OAAO,EAA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B;AACxC,IAAO,2BAAA,GAAQ","file":"chunk-V7BADAPA.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, MarketType } from './markets'\nimport type { OrderAmountPromotionRule, OrderAmountPromotionRuleType } from './order_amount_promotion_rules'\nimport type { SkuListPromotionRule, SkuListPromotionRuleType } from './sku_list_promotion_rules'\nimport type { CouponCodesPromotionRule, CouponCodesPromotionRuleType } from './coupon_codes_promotion_rules'\nimport type { CustomPromotionRule, CustomPromotionRuleType } from './custom_promotion_rules'\nimport type { SkuList, SkuListType } from './sku_lists'\nimport type { Coupon } from './coupons'\nimport type { Attachment } from './attachments'\nimport type { Event } from './events'\nimport type { Tag, TagType } from './tags'\nimport type { Version } from './versions'\nimport type { EventStore } from './event_stores'\nimport type { Sku } from './skus'\nimport type { PromotionRule } from './promotion_rules'\n\n\ntype ExternalPromotionType = 'external_promotions'\ntype ExternalPromotionRel = ResourceRel & { type: ExternalPromotionType }\ntype MarketRel = ResourceRel & { type: MarketType }\ntype OrderAmountPromotionRuleRel = ResourceRel & { type: OrderAmountPromotionRuleType }\ntype SkuListPromotionRuleRel = ResourceRel & { type: SkuListPromotionRuleType }\ntype CouponCodesPromotionRuleRel = ResourceRel & { type: CouponCodesPromotionRuleType }\ntype CustomPromotionRuleRel = ResourceRel & { type: CustomPromotionRuleType }\ntype SkuListRel = ResourceRel & { type: SkuListType }\ntype TagRel = ResourceRel & { type: TagType }\n\n\nexport type ExternalPromotionSort = Pick<ExternalPromotion, 'id' | 'name' | 'currency_code' | 'exclusive' | 'priority' | 'starts_at' | 'expires_at' | 'total_usage_limit' | 'total_usage_count' | 'total_usage_reached' | 'disabled_at' | 'circuit_state' | 'circuit_failure_count'> & ResourceSort\n// export type ExternalPromotionFilter = Pick<ExternalPromotion, 'id' | 'name' | 'currency_code' | 'exclusive' | 'priority' | 'starts_at' | 'expires_at' | 'total_usage_limit' | 'total_usage_count' | 'total_usage_reached' | 'disabled_at' | 'circuit_state' | 'circuit_failure_count'> & ResourceFilter\n\n\ninterface ExternalPromotion extends Resource {\n\t\n\treadonly type: ExternalPromotionType\n\n\t/** \n\t * The promotion's internal name.\n\t * @example ```\"Personal promotion\"```\n\t */\n\tname: string\n\t/** \n\t * The international 3-letter currency code as defined by the ISO 4217 standard.\n\t * @example ```\"EUR\"```\n\t */\n\tcurrency_code?: string | null\n\t/** \n\t * Indicates if the promotion will be applied exclusively, based on its priority score.\n\t * @example ```true```\n\t */\n\texclusive?: boolean | null\n\t/** \n\t * The priority assigned to the promotion (lower means higher priority).\n\t * @example ```2```\n\t */\n\tpriority?: number | null\n\t/** \n\t * The activation date/time of this promotion.\n\t * @example ```\"2018-01-01T12:00:00.000Z\"```\n\t */\n\tstarts_at: string\n\t/** \n\t * The expiration date/time of this promotion (must be after starts_at).\n\t * @example ```\"2018-01-02T12:00:00.000Z\"```\n\t */\n\texpires_at: string\n\t/** \n\t * The total number of times this promotion can be applied. When 'null' it means promotion can be applied infinite times.\n\t * @example ```5```\n\t */\n\ttotal_usage_limit?: number | null\n\t/** \n\t * The number of times this promotion has been applied.\n\t * @example ```2```\n\t */\n\ttotal_usage_count?: number | null\n\t/** \n\t * Indicates if the promotion has been applied the total number of allowed times.\n\t */\n\ttotal_usage_reached?: boolean | null\n\t/** \n\t * Indicates if the promotion is active (enabled and not expired).\n\t * @example ```true```\n\t */\n\tactive?: boolean | null\n\t/** \n\t * The promotion status. One of 'disabled', 'expired', 'pending', 'active', or 'inactive'.\n\t * @example ```\"pending\"```\n\t */\n\tstatus?: 'disabled' | 'expired' | 'pending' | 'active' | 'inactive' | null\n\t/** \n\t * The weight of the promotion, computed by exclusivity, priority, type and start time. Determines the order of application, higher weight apply first.\n\t * @example ```112```\n\t */\n\tweight?: number | null\n\t/** \n\t * Time at which this resource was disabled.\n\t * @example ```\"2018-01-01T12:00:00.000Z\"```\n\t */\n\tdisabled_at?: string | null\n\t/** \n\t * The URL to the service that will compute the discount.\n\t * @example ```\"https://external_promotion.yourbrand.com\"```\n\t */\n\tpromotion_url: string\n\t/** \n\t * The circuit breaker state, by default it is 'closed'. It can become 'open' once the number of consecutive failures overlaps the specified threshold, in such case no further calls to the failing callback are made.\n\t * @example ```\"closed\"```\n\t */\n\tcircuit_state?: string | null\n\t/** \n\t * The number of consecutive failures recorded by the circuit breaker associated to this resource, will be reset on first successful call to callback.\n\t * @example ```5```\n\t */\n\tcircuit_failure_count?: number | null\n\t/** \n\t * The shared secret used to sign the external request payload.\n\t * @example ```\"1c0994cc4e996e8c6ee56a2198f66f3c\"```\n\t */\n\tshared_secret: string\n\t/** \n\t * List of related resources that will be included in the request to the external callback. Please do consult the documentation to check on which resource the includes are related (i.e. the order) and the defaults in case no list is provided.\n\t * @example ```[\"order.line_item_options\"]```\n\t */\n\texternal_includes?: string[] | null\n\n\tmarket?: Market | null\n\tpromotion_rules?: PromotionRule[] | null\n\torder_amount_promotion_rule?: OrderAmountPromotionRule | null\n\tsku_list_promotion_rule?: SkuListPromotionRule | null\n\tcoupon_codes_promotion_rule?: CouponCodesPromotionRule | null\n\tcustom_promotion_rule?: CustomPromotionRule | null\n\tsku_list?: SkuList | null\n\tcoupons?: Coupon[] | null\n\tattachments?: Attachment[] | null\n\tevents?: Event[] | null\n\ttags?: Tag[] | null\n\tversions?: Version[] | null\n\tevent_stores?: EventStore[] | null\n\tskus?: Sku[] | null\n\n}\n\n\ninterface ExternalPromotionCreate extends ResourceCreate {\n\t\n\t/** \n\t * The promotion's internal name.\n\t * @example ```\"Personal promotion\"```\n\t */\n\tname: string\n\t/** \n\t * The international 3-letter currency code as defined by the ISO 4217 standard.\n\t * @example ```\"EUR\"```\n\t */\n\tcurrency_code?: string | null\n\t/** \n\t * Indicates if the promotion will be applied exclusively, based on its priority score.\n\t * @example ```true```\n\t */\n\texclusive?: boolean | null\n\t/** \n\t * The priority assigned to the promotion (lower means higher priority).\n\t * @example ```2```\n\t */\n\tpriority?: number | null\n\t/** \n\t * The activation date/time of this promotion.\n\t * @example ```\"2018-01-01T12:00:00.000Z\"```\n\t */\n\tstarts_at: string\n\t/** \n\t * The expiration date/time of this promotion (must be after starts_at).\n\t * @example ```\"2018-01-02T12:00:00.000Z\"```\n\t */\n\texpires_at: string\n\t/** \n\t * The total number of times this promotion can be applied. When 'null' it means promotion can be applied infinite times.\n\t * @example ```5```\n\t */\n\ttotal_usage_limit?: number | null\n\t/** \n\t * Send this attribute if you want to mark this resource as disabled.\n\t * @example ```true```\n\t */\n\t_disable?: boolean | null\n\t/** \n\t * Send this attribute if you want to mark this resource as enabled.\n\t * @example ```true```\n\t */\n\t_enable?: boolean | null\n\t/** \n\t * The URL to the service that will compute the discount.\n\t * @example ```\"https://external_promotion.yourbrand.com\"```\n\t */\n\tpromotion_url: string\n\t/** \n\t * List of related resources that will be included in the request to the external callback. Please do consult the documentation to check on which resource the includes are related (i.e. the order) and the defaults in case no list is provided.\n\t * @example ```[\"order.line_item_options\"]```\n\t */\n\texternal_includes?: string[] | null\n\n\tmarket?: MarketRel | null\n\torder_amount_promotion_rule?: OrderAmountPromotionRuleRel | null\n\tsku_list_promotion_rule?: SkuListPromotionRuleRel | null\n\tcoupon_codes_promotion_rule?: CouponCodesPromotionRuleRel | null\n\tcustom_promotion_rule?: CustomPromotionRuleRel | null\n\tsku_list?: SkuListRel | null\n\ttags?: TagRel[] | null\n\n}\n\n\ninterface ExternalPromotionUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The promotion's internal name.\n\t * @example ```\"Personal promotion\"```\n\t */\n\tname?: string | null\n\t/** \n\t * The international 3-letter currency code as defined by the ISO 4217 standard.\n\t * @example ```\"EUR\"```\n\t */\n\tcurrency_code?: string | null\n\t/** \n\t * Indicates if the promotion will be applied exclusively, based on its priority score.\n\t * @example ```true```\n\t */\n\texclusive?: boolean | null\n\t/** \n\t * The priority assigned to the promotion (lower means higher priority).\n\t * @example ```2```\n\t */\n\tpriority?: number | null\n\t/** \n\t * The activation date/time of this promotion.\n\t * @example ```\"2018-01-01T12:00:00.000Z\"```\n\t */\n\tstarts_at?: string | null\n\t/** \n\t * The expiration date/time of this promotion (must be after starts_at).\n\t * @example ```\"2018-01-02T12:00:00.000Z\"```\n\t */\n\texpires_at?: string | null\n\t/** \n\t * The total number of times this promotion can be applied. When 'null' it means promotion can be applied infinite times.\n\t * @example ```5```\n\t */\n\ttotal_usage_limit?: number | null\n\t/** \n\t * Send this attribute if you want to mark this resource as disabled.\n\t * @example ```true```\n\t */\n\t_disable?: boolean | null\n\t/** \n\t * Send this attribute if you want to mark this resource as enabled.\n\t * @example ```true```\n\t */\n\t_enable?: boolean | null\n\t/** \n\t * Comma separated list of tags to be added. Duplicates, invalid and non existing ones are discarded. Cannot be passed by sales channels.\n\t */\n\t_add_tags?: string | null\n\t/** \n\t * Comma separated list of tags to be removed. Duplicates, invalid and non existing ones are discarded. Cannot be passed by sales channels.\n\t */\n\t_remove_tags?: string | null\n\t/** \n\t * The URL to the service that will compute the discount.\n\t * @example ```\"https://external_promotion.yourbrand.com\"```\n\t */\n\tpromotion_url?: string | null\n\t/** \n\t * Send this attribute if you want to reset the circuit breaker associated to this resource to 'closed' state and zero failures count. Cannot be passed by sales channels.\n\t * @example ```true```\n\t */\n\t_reset_circuit?: boolean | null\n\t/** \n\t * List of related resources that will be included in the request to the external callback. Please do consult the documentation to check on which resource the includes are related (i.e. the order) and the defaults in case no list is provided.\n\t * @example ```[\"order.line_item_options\"]```\n\t */\n\texternal_includes?: string[] | null\n\n\tmarket?: MarketRel | null\n\torder_amount_promotion_rule?: OrderAmountPromotionRuleRel | null\n\tsku_list_promotion_rule?: SkuListPromotionRuleRel | null\n\tcoupon_codes_promotion_rule?: CouponCodesPromotionRuleRel | null\n\tcustom_promotion_rule?: CustomPromotionRuleRel | null\n\tsku_list?: SkuListRel | null\n\ttags?: TagRel[] | null\n\n}\n\n\nclass ExternalPromotions extends ApiResource<ExternalPromotion> {\n\n\tstatic readonly TYPE: ExternalPromotionType = 'external_promotions' as const\n\n\tasync create(resource: ExternalPromotionCreate, params?: QueryParamsRetrieve<ExternalPromotion>, options?: ResourcesConfig): Promise<ExternalPromotion> {\n\t\treturn this.resources.create<ExternalPromotionCreate, ExternalPromotion>({ ...resource, type: ExternalPromotions.TYPE }, params, options)\n\t}\n\n\tasync update(resource: ExternalPromotionUpdate, params?: QueryParamsRetrieve<ExternalPromotion>, options?: ResourcesConfig): Promise<ExternalPromotion> {\n\t\treturn this.resources.update<ExternalPromotionUpdate, ExternalPromotion>({ ...resource, type: ExternalPromotions.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: ExternalPromotions.TYPE } : id, options)\n\t}\n\n\tasync market(externalPromotionId: string | ExternalPromotion, params?: QueryParamsRetrieve<Market>, options?: ResourcesConfig): Promise<Market> {\n\t\tconst _externalPromotionId = (externalPromotionId as ExternalPromotion).id || externalPromotionId as string\n\t\treturn this.resources.fetch<Market>({ type: 'markets' }, `external_promotions/${_externalPromotionId}/market`, params, options) as unknown as Market\n\t}\n\n\tasync order_amount_promotion_rule(externalPromotionId: string | ExternalPromotion, params?: QueryParamsRetrieve<OrderAmountPromotionRule>, options?: ResourcesConfig): Promise<OrderAmountPromotionRule> {\n\t\tconst _externalPromotionId = (externalPromotionId as ExternalPromotion).id || externalPromotionId as string\n\t\treturn this.resources.fetch<OrderAmountPromotionRule>({ type: 'order_amount_promotion_rules' }, `external_promotions/${_externalPromotionId}/order_amount_promotion_rule`, params, options) as unknown as OrderAmountPromotionRule\n\t}\n\n\tasync sku_list_promotion_rule(externalPromotionId: string | ExternalPromotion, params?: QueryParamsRetrieve<SkuListPromotionRule>, options?: ResourcesConfig): Promise<SkuListPromotionRule> {\n\t\tconst _externalPromotionId = (externalPromotionId as ExternalPromotion).id || externalPromotionId as string\n\t\treturn this.resources.fetch<SkuListPromotionRule>({ type: 'sku_list_promotion_rules' }, `external_promotions/${_externalPromotionId}/sku_list_promotion_rule`, params, options) as unknown as SkuListPromotionRule\n\t}\n\n\tasync coupon_codes_promotion_rule(externalPromotionId: string | ExternalPromotion, params?: QueryParamsRetrieve<CouponCodesPromotionRule>, options?: ResourcesConfig): Promise<CouponCodesPromotionRule> {\n\t\tconst _externalPromotionId = (externalPromotionId as ExternalPromotion).id || externalPromotionId as string\n\t\treturn this.resources.fetch<CouponCodesPromotionRule>({ type: 'coupon_codes_promotion_rules' }, `external_promotions/${_externalPromotionId}/coupon_codes_promotion_rule`, params, options) as unknown as CouponCodesPromotionRule\n\t}\n\n\tasync custom_promotion_rule(externalPromotionId: string | ExternalPromotion, params?: QueryParamsRetrieve<CustomPromotionRule>, options?: ResourcesConfig): Promise<CustomPromotionRule> {\n\t\tconst _externalPromotionId = (externalPromotionId as ExternalPromotion).id || externalPromotionId as string\n\t\treturn this.resources.fetch<CustomPromotionRule>({ type: 'custom_promotion_rules' }, `external_promotions/${_externalPromotionId}/custom_promotion_rule`, params, options) as unknown as CustomPromotionRule\n\t}\n\n\tasync sku_list(externalPromotionId: string | ExternalPromotion, params?: QueryParamsRetrieve<SkuList>, options?: ResourcesConfig): Promise<SkuList> {\n\t\tconst _externalPromotionId = (externalPromotionId as ExternalPromotion).id || externalPromotionId as string\n\t\treturn this.resources.fetch<SkuList>({ type: 'sku_lists' }, `external_promotions/${_externalPromotionId}/sku_list`, params, options) as unknown as SkuList\n\t}\n\n\tasync coupons(externalPromotionId: string | ExternalPromotion, params?: QueryParamsList<Coupon>, options?: ResourcesConfig): Promise<ListResponse<Coupon>> {\n\t\tconst _externalPromotionId = (externalPromotionId as ExternalPromotion).id || externalPromotionId as string\n\t\treturn this.resources.fetch<Coupon>({ type: 'coupons' }, `external_promotions/${_externalPromotionId}/coupons`, params, options) as unknown as ListResponse<Coupon>\n\t}\n\n\tasync attachments(externalPromotionId: string | ExternalPromotion, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _externalPromotionId = (externalPromotionId as ExternalPromotion).id || externalPromotionId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `external_promotions/${_externalPromotionId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\tasync events(externalPromotionId: string | ExternalPromotion, params?: QueryParamsList<Event>, options?: ResourcesConfig): Promise<ListResponse<Event>> {\n\t\tconst _externalPromotionId = (externalPromotionId as ExternalPromotion).id || externalPromotionId as string\n\t\treturn this.resources.fetch<Event>({ type: 'events' }, `external_promotions/${_externalPromotionId}/events`, params, options) as unknown as ListResponse<Event>\n\t}\n\n\tasync tags(externalPromotionId: string | ExternalPromotion, params?: QueryParamsList<Tag>, options?: ResourcesConfig): Promise<ListResponse<Tag>> {\n\t\tconst _externalPromotionId = (externalPromotionId as ExternalPromotion).id || externalPromotionId as string\n\t\treturn this.resources.fetch<Tag>({ type: 'tags' }, `external_promotions/${_externalPromotionId}/tags`, params, options) as unknown as ListResponse<Tag>\n\t}\n\n\tasync versions(externalPromotionId: string | ExternalPromotion, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _externalPromotionId = (externalPromotionId as ExternalPromotion).id || externalPromotionId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `external_promotions/${_externalPromotionId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\tasync event_stores(externalPromotionId: string | ExternalPromotion, params?: QueryParamsList<EventStore>, options?: ResourcesConfig): Promise<ListResponse<EventStore>> {\n\t\tconst _externalPromotionId = (externalPromotionId as ExternalPromotion).id || externalPromotionId as string\n\t\treturn this.resources.fetch<EventStore>({ type: 'event_stores' }, `external_promotions/${_externalPromotionId}/event_stores`, params, options) as unknown as ListResponse<EventStore>\n\t}\n\n\tasync skus(externalPromotionId: string | ExternalPromotion, params?: QueryParamsList<Sku>, options?: ResourcesConfig): Promise<ListResponse<Sku>> {\n\t\tconst _externalPromotionId = (externalPromotionId as ExternalPromotion).id || externalPromotionId as string\n\t\treturn this.resources.fetch<Sku>({ type: 'skus' }, `external_promotions/${_externalPromotionId}/skus`, params, options) as unknown as ListResponse<Sku>\n\t}\n\n\tasync _disable(id: string | ExternalPromotion, params?: QueryParamsRetrieve<ExternalPromotion>, options?: ResourcesConfig): Promise<ExternalPromotion> {\n\t\treturn this.resources.update<ExternalPromotionUpdate, ExternalPromotion>({ id: (typeof id === 'string')? id: id.id, type: ExternalPromotions.TYPE, _disable: true }, params, options)\n\t}\n\n\tasync _enable(id: string | ExternalPromotion, params?: QueryParamsRetrieve<ExternalPromotion>, options?: ResourcesConfig): Promise<ExternalPromotion> {\n\t\treturn this.resources.update<ExternalPromotionUpdate, ExternalPromotion>({ id: (typeof id === 'string')? id: id.id, type: ExternalPromotions.TYPE, _enable: true }, params, options)\n\t}\n\n\tasync _add_tags(id: string | ExternalPromotion, triggerValue: string, params?: QueryParamsRetrieve<ExternalPromotion>, options?: ResourcesConfig): Promise<ExternalPromotion> {\n\t\treturn this.resources.update<ExternalPromotionUpdate, ExternalPromotion>({ id: (typeof id === 'string')? id: id.id, type: ExternalPromotions.TYPE, _add_tags: triggerValue }, params, options)\n\t}\n\n\tasync _remove_tags(id: string | ExternalPromotion, triggerValue: string, params?: QueryParamsRetrieve<ExternalPromotion>, options?: ResourcesConfig): Promise<ExternalPromotion> {\n\t\treturn this.resources.update<ExternalPromotionUpdate, ExternalPromotion>({ id: (typeof id === 'string')? id: id.id, type: ExternalPromotions.TYPE, _remove_tags: triggerValue }, params, options)\n\t}\n\n\tasync _reset_circuit(id: string | ExternalPromotion, params?: QueryParamsRetrieve<ExternalPromotion>, options?: ResourcesConfig): Promise<ExternalPromotion> {\n\t\treturn this.resources.update<ExternalPromotionUpdate, ExternalPromotion>({ id: (typeof id === 'string')? id: id.id, type: ExternalPromotions.TYPE, _reset_circuit: true }, params, options)\n\t}\n\n\n\tisExternalPromotion(resource: any): resource is ExternalPromotion {\n\t\treturn resource.type && (resource.type === ExternalPromotions.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): ExternalPromotionRel {\n\t\treturn super.relationshipOneToOne<ExternalPromotionRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): ExternalPromotionRel[] {\n\t\treturn super.relationshipOneToMany<ExternalPromotionRel>(...ids)\n\t}\n\n\n\ttype(): ExternalPromotionType {\n\t\treturn ExternalPromotions.TYPE\n\t}\n\n}\n\n\nconst instance = new ExternalPromotions()\nexport default instance\n\nexport type { ExternalPromotions, ExternalPromotion, ExternalPromotionCreate, ExternalPromotionUpdate, ExternalPromotionType }\n"]}
|
|
@@ -28,6 +28,12 @@ var KlarnaGateways = class _KlarnaGateways extends ApiResource {
|
|
|
28
28
|
const _klarnaGatewayId = klarnaGatewayId.id || klarnaGatewayId;
|
|
29
29
|
return this.resources.fetch({ type: "klarna_payments" }, `klarna_gateways/${_klarnaGatewayId}/klarna_payments`, params, options);
|
|
30
30
|
}
|
|
31
|
+
async _disable(id, params, options) {
|
|
32
|
+
return this.resources.update({ id: typeof id === "string" ? id : id.id, type: _KlarnaGateways.TYPE, _disable: true }, params, options);
|
|
33
|
+
}
|
|
34
|
+
async _enable(id, params, options) {
|
|
35
|
+
return this.resources.update({ id: typeof id === "string" ? id : id.id, type: _KlarnaGateways.TYPE, _enable: true }, params, options);
|
|
36
|
+
}
|
|
31
37
|
isKlarnaGateway(resource) {
|
|
32
38
|
return resource.type && resource.type === _KlarnaGateways.TYPE;
|
|
33
39
|
}
|
|
@@ -45,5 +51,5 @@ var instance = new KlarnaGateways();
|
|
|
45
51
|
var klarna_gateways_default = instance;
|
|
46
52
|
|
|
47
53
|
export { klarna_gateways_default };
|
|
48
|
-
//# sourceMappingURL=chunk-
|
|
49
|
-
//# sourceMappingURL=chunk-
|
|
54
|
+
//# sourceMappingURL=chunk-VZGJGOH3.js.map
|
|
55
|
+
//# s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EA,MAAM,OAAA,CAAQ,EAAA,EAA4B,MAAA,EAA6C,OAAA,EAAmD;AACzI,IAAA,OAAO,KAAK,SAAA,CAAU,MAAA,CAA2C,EAAE,EAAA,EAAK,OAAO,OAAO,QAAA,GAAW,EAAA,GAAI,EAAA,CAAG,EAAA,EAAI,MAAM,eAAA,CAAe,IAAA,EAAM,SAAS,IAAA,EAAK,EAAG,QAAQ,OAAO,CAAA;AAAA,EACxK;AAAA,EAGA,gBAAgB,QAAA,EAA0C;AACzD,IAAA,OAAO,QAAA,CAAS,IAAA,IAAS,QAAA,CAAS,IAAA,KAAS,eAAA,CAAe,IAAA;AAAA,EAC3D;AAAA,EAGA,aAAa,EAAA,EAAkD;AAC9D,IAAA,OAAO,KAAA,CAAM,qBAAuC,EAAE,CAAA;AAAA,EACvD;AAAA,EAEA,sBAAsB,GAAA,EAAmC;AACxD,IAAA,OAAO,KAAA,CAAM,qBAAA,CAAwC,GAAG,GAAG,CAAA;AAAA,EAC5D;AAAA,EAGA,IAAA,GAA0B;AACzB,IAAA,OAAO,eAAA,CAAe,IAAA;AAAA,EACvB;AAED,CAAA;AAGA,IAAM,QAAA,GAAW,IAAI,cAAA,EAAe;AACpC,IAAO,uBAAA,GAAQ","file":"chunk-VZGJGOH3.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 { PaymentMethod } from './payment_methods'\nimport type { Version } from './versions'\nimport type { EventStore } from './event_stores'\nimport type { KlarnaPayment, KlarnaPaymentType } from './klarna_payments'\n\n\ntype KlarnaGatewayType = 'klarna_gateways'\ntype KlarnaGatewayRel = ResourceRel & { type: KlarnaGatewayType }\ntype KlarnaPaymentRel = ResourceRel & { type: KlarnaPaymentType }\n\n\nexport type KlarnaGatewaySort = Pick<KlarnaGateway, 'id' | 'name' | 'disabled_at'> & ResourceSort\n// export type KlarnaGatewayFilter = Pick<KlarnaGateway, 'id' | 'name' | 'disabled_at'> & ResourceFilter\n\n\ninterface KlarnaGateway extends Resource {\n\t\n\treadonly type: KlarnaGatewayType\n\n\t/** \n\t * The payment gateway's internal name.\n\t * @example ```\"US payment gateway\"```\n\t */\n\tname: string\n\t/** \n\t * Indicates if the payment source is forced on the editable order upon receiving a successful event from the gateway.\n\t * @example ```true```\n\t */\n\tforce_payments?: boolean | null\n\t/** \n\t * Time at which this resource was disabled.\n\t * @example ```\"2018-01-01T12:00:00.000Z\"```\n\t */\n\tdisabled_at?: string | null\n\n\tpayment_methods?: PaymentMethod[] | null\n\tversions?: Version[] | null\n\tevent_stores?: EventStore[] | null\n\tklarna_payments?: KlarnaPayment[] | null\n\n}\n\n\ninterface KlarnaGatewayCreate extends ResourceCreate {\n\t\n\t/** \n\t * The payment gateway's internal name.\n\t * @example ```\"US payment gateway\"```\n\t */\n\tname: string\n\t/** \n\t * Indicates if the payment source is forced on the editable order upon receiving a successful event from the gateway.\n\t * @example ```true```\n\t */\n\tforce_payments?: boolean | null\n\t/** \n\t * Send this attribute if you want to mark this resource as disabled.\n\t * @example ```true```\n\t */\n\t_disable?: boolean | null\n\t/** \n\t * Send this attribute if you want to mark this resource as enabled.\n\t * @example ```true```\n\t */\n\t_enable?: boolean | null\n\t/** \n\t * The gateway country code one of EU, US, or OC.\n\t * @example ```\"EU\"```\n\t */\n\tcountry_code: string\n\t/** \n\t * The public key linked to your API credential.\n\t * @example ```\"xxxx-yyyy-zzzz\"```\n\t */\n\tapi_key: string\n\t/** \n\t * The gateway API key.\n\t * @example ```\"xxxx-yyyy-zzzz\"```\n\t */\n\tapi_secret: string\n\n\tklarna_payments?: KlarnaPaymentRel[] | null\n\n}\n\n\ninterface KlarnaGatewayUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The payment gateway's internal name.\n\t * @example ```\"US payment gateway\"```\n\t */\n\tname?: string | null\n\t/** \n\t * Indicates if the payment source is forced on the editable order upon receiving a successful event from the gateway.\n\t * @example ```true```\n\t */\n\tforce_payments?: boolean | null\n\t/** \n\t * Send this attribute if you want to mark this resource as disabled.\n\t * @example ```true```\n\t */\n\t_disable?: boolean | null\n\t/** \n\t * Send this attribute if you want to mark this resource as enabled.\n\t * @example ```true```\n\t */\n\t_enable?: boolean | null\n\t/** \n\t * The gateway country code one of EU, US, or OC.\n\t * @example ```\"EU\"```\n\t */\n\tcountry_code?: string | null\n\t/** \n\t * The public key linked to your API credential.\n\t * @example ```\"xxxx-yyyy-zzzz\"```\n\t */\n\tapi_key?: string | null\n\t/** \n\t * The gateway API key.\n\t * @example ```\"xxxx-yyyy-zzzz\"```\n\t */\n\tapi_secret?: string | null\n\n\tklarna_payments?: KlarnaPaymentRel[] | null\n\n}\n\n\nclass KlarnaGateways extends ApiResource<KlarnaGateway> {\n\n\tstatic readonly TYPE: KlarnaGatewayType = 'klarna_gateways' as const\n\n\tasync create(resource: KlarnaGatewayCreate, params?: QueryParamsRetrieve<KlarnaGateway>, options?: ResourcesConfig): Promise<KlarnaGateway> {\n\t\treturn this.resources.create<KlarnaGatewayCreate, KlarnaGateway>({ ...resource, type: KlarnaGateways.TYPE }, params, options)\n\t}\n\n\tasync update(resource: KlarnaGatewayUpdate, params?: QueryParamsRetrieve<KlarnaGateway>, options?: ResourcesConfig): Promise<KlarnaGateway> {\n\t\treturn this.resources.update<KlarnaGatewayUpdate, KlarnaGateway>({ ...resource, type: KlarnaGateways.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: KlarnaGateways.TYPE } : id, options)\n\t}\n\n\tasync payment_methods(klarnaGatewayId: string | KlarnaGateway, params?: QueryParamsList<PaymentMethod>, options?: ResourcesConfig): Promise<ListResponse<PaymentMethod>> {\n\t\tconst _klarnaGatewayId = (klarnaGatewayId as KlarnaGateway).id || klarnaGatewayId as string\n\t\treturn this.resources.fetch<PaymentMethod>({ type: 'payment_methods' }, `klarna_gateways/${_klarnaGatewayId}/payment_methods`, params, options) as unknown as ListResponse<PaymentMethod>\n\t}\n\n\tasync versions(klarnaGatewayId: string | KlarnaGateway, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _klarnaGatewayId = (klarnaGatewayId as KlarnaGateway).id || klarnaGatewayId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `klarna_gateways/${_klarnaGatewayId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\tasync event_stores(klarnaGatewayId: string | KlarnaGateway, params?: QueryParamsList<EventStore>, options?: ResourcesConfig): Promise<ListResponse<EventStore>> {\n\t\tconst _klarnaGatewayId = (klarnaGatewayId as KlarnaGateway).id || klarnaGatewayId as string\n\t\treturn this.resources.fetch<EventStore>({ type: 'event_stores' }, `klarna_gateways/${_klarnaGatewayId}/event_stores`, params, options) as unknown as ListResponse<EventStore>\n\t}\n\n\tasync klarna_payments(klarnaGatewayId: string | KlarnaGateway, params?: QueryParamsList<KlarnaPayment>, options?: ResourcesConfig): Promise<ListResponse<KlarnaPayment>> {\n\t\tconst _klarnaGatewayId = (klarnaGatewayId as KlarnaGateway).id || klarnaGatewayId as string\n\t\treturn this.resources.fetch<KlarnaPayment>({ type: 'klarna_payments' }, `klarna_gateways/${_klarnaGatewayId}/klarna_payments`, params, options) as unknown as ListResponse<KlarnaPayment>\n\t}\n\n\tasync _disable(id: string | KlarnaGateway, params?: QueryParamsRetrieve<KlarnaGateway>, options?: ResourcesConfig): Promise<KlarnaGateway> {\n\t\treturn this.resources.update<KlarnaGatewayUpdate, KlarnaGateway>({ id: (typeof id === 'string')? id: id.id, type: KlarnaGateways.TYPE, _disable: true }, params, options)\n\t}\n\n\tasync _enable(id: string | KlarnaGateway, params?: QueryParamsRetrieve<KlarnaGateway>, options?: ResourcesConfig): Promise<KlarnaGateway> {\n\t\treturn this.resources.update<KlarnaGatewayUpdate, KlarnaGateway>({ id: (typeof id === 'string')? id: id.id, type: KlarnaGateways.TYPE, _enable: true }, params, options)\n\t}\n\n\n\tisKlarnaGateway(resource: any): resource is KlarnaGateway {\n\t\treturn resource.type && (resource.type === KlarnaGateways.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): KlarnaGatewayRel {\n\t\treturn super.relationshipOneToOne<KlarnaGatewayRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): KlarnaGatewayRel[] {\n\t\treturn super.relationshipOneToMany<KlarnaGatewayRel>(...ids)\n\t}\n\n\n\ttype(): KlarnaGatewayType {\n\t\treturn KlarnaGateways.TYPE\n\t}\n\n}\n\n\nconst instance = new KlarnaGateways()\nexport default instance\n\nexport type { KlarnaGateways, KlarnaGateway, KlarnaGatewayCreate, KlarnaGatewayUpdate, KlarnaGatewayType }\n"]}
|
|
@@ -34,5 +34,5 @@ var instance = new PaymentGateways();
|
|
|
34
34
|
var payment_gateways_default = instance;
|
|
35
35
|
|
|
36
36
|
exports.payment_gateways_default = payment_gateways_default;
|
|
37
|
-
//# sourceMappingURL=chunk-
|
|
38
|
-
//# sourceMappingURL=chunk-
|
|
37
|
+
//# sourceMappingURL=chunk-WLTZ66G4.cjs.map
|
|
38
|
+
//# sourceMappingURL=chunk-WLTZ66G4.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/resources/payment_gateways.ts"],"names":["ApiResource"],"mappings":";;;;;AA4CA,IAAM,eAAA,GAAN,MAAM,gBAAA,SAAwBA,6BAAA,CAA4B;AAAA,EAEzD,OAAgB,IAAA,GAA2B,kBAAA;AAAA,EAE3C,MAAM,eAAA,CAAgB,gBAAA,EAA2C,MAAA,EAAyC,OAAA,EAAiE;AAC1K,IAAA,MAAM,iBAAA,GAAqB,iBAAoC,EAAA,IAAM,gBAAA;AACrE,IAAA,OAAO,IAAA,CAAK,SAAA,CAAU,KAAA,CAAqB,EAAE,IAAA,EAAM,iBAAA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","file":"chunk-WLTZ66G4.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 { PaymentMethod } from './payment_methods'\nimport type { Version } from './versions'\nimport type { EventStore } from './event_stores'\n\n\ntype PaymentGatewayType = 'payment_gateways'\ntype PaymentGatewayRel = ResourceRel & { type: PaymentGatewayType }\n\n\nexport type PaymentGatewaySort = Pick<PaymentGateway, 'id' | 'name' | 'disabled_at'> & ResourceSort\n// export type PaymentGatewayFilter = Pick<PaymentGateway, 'id' | 'name' | 'disabled_at'> & ResourceFilter\n\n\ninterface PaymentGateway extends Resource {\n\t\n\treadonly type: PaymentGatewayType\n\n\t/** \n\t * The payment gateway's internal name.\n\t * @example ```\"US payment gateway\"```\n\t */\n\tname: string\n\t/** \n\t * Indicates if the payment source is forced on the editable order upon receiving a successful event from the gateway.\n\t * @example ```true```\n\t */\n\tforce_payments?: boolean | null\n\t/** \n\t * Time at which this resource was disabled.\n\t * @example ```\"2018-01-01T12:00:00.000Z\"```\n\t */\n\tdisabled_at?: string | null\n\n\tpayment_methods?: PaymentMethod[] | null\n\tversions?: Version[] | null\n\tevent_stores?: EventStore[] | null\n\n}\n\n\nclass PaymentGateways extends ApiResource<PaymentGateway> {\n\n\tstatic readonly TYPE: PaymentGatewayType = 'payment_gateways' as const\n\n\tasync payment_methods(paymentGatewayId: string | PaymentGateway, params?: QueryParamsList<PaymentMethod>, options?: ResourcesConfig): Promise<ListResponse<PaymentMethod>> {\n\t\tconst _paymentGatewayId = (paymentGatewayId as PaymentGateway).id || paymentGatewayId as string\n\t\treturn this.resources.fetch<PaymentMethod>({ type: 'payment_methods' }, `payment_gateways/${_paymentGatewayId}/payment_methods`, params, options) as unknown as ListResponse<PaymentMethod>\n\t}\n\n\tasync versions(paymentGatewayId: string | PaymentGateway, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _paymentGatewayId = (paymentGatewayId as PaymentGateway).id || paymentGatewayId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `payment_gateways/${_paymentGatewayId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\tasync event_stores(paymentGatewayId: string | PaymentGateway, params?: QueryParamsList<EventStore>, options?: ResourcesConfig): Promise<ListResponse<EventStore>> {\n\t\tconst _paymentGatewayId = (paymentGatewayId as PaymentGateway).id || paymentGatewayId as string\n\t\treturn this.resources.fetch<EventStore>({ type: 'event_stores' }, `payment_gateways/${_paymentGatewayId}/event_stores`, params, options) as unknown as ListResponse<EventStore>\n\t}\n\n\n\tisPaymentGateway(resource: any): resource is PaymentGateway {\n\t\treturn resource.type && (resource.type === PaymentGateways.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): PaymentGatewayRel {\n\t\treturn super.relationshipOneToOne<PaymentGatewayRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): PaymentGatewayRel[] {\n\t\treturn super.relationshipOneToMany<PaymentGatewayRel>(...ids)\n\t}\n\n\n\ttype(): PaymentGatewayType {\n\t\treturn PaymentGateways.TYPE\n\t}\n\n}\n\n\nconst instance = new PaymentGateways()\nexport default instance\n\nexport type { PaymentGateways, PaymentGateway, PaymentGatewayType }\n"]}
|
|
@@ -30,6 +30,12 @@ var PaypalGateways = class _PaypalGateways extends chunkU22VLCMN_cjs.ApiResource
|
|
|
30
30
|
const _paypalGatewayId = paypalGatewayId.id || paypalGatewayId;
|
|
31
31
|
return this.resources.fetch({ type: "paypal_payments" }, `paypal_gateways/${_paypalGatewayId}/paypal_payments`, params, options);
|
|
32
32
|
}
|
|
33
|
+
async _disable(id, params, options) {
|
|
34
|
+
return this.resources.update({ id: typeof id === "string" ? id : id.id, type: _PaypalGateways.TYPE, _disable: true }, params, options);
|
|
35
|
+
}
|
|
36
|
+
async _enable(id, params, options) {
|
|
37
|
+
return this.resources.update({ id: typeof id === "string" ? id : id.id, type: _PaypalGateways.TYPE, _enable: true }, params, options);
|
|
38
|
+
}
|
|
33
39
|
isPaypalGateway(resource) {
|
|
34
40
|
return resource.type && resource.type === _PaypalGateways.TYPE;
|
|
35
41
|
}
|
|
@@ -47,5 +53,5 @@ var instance = new PaypalGateways();
|
|
|
47
53
|
var paypal_gateways_default = instance;
|
|
48
54
|
|
|
49
55
|
exports.paypal_gateways_default = paypal_gateways_default;
|
|
50
|
-
//# sourceMappingURL=chunk-
|
|
51
|
-
//# sourceMappingURL=chunk-
|
|
56
|
+
//# sourceMappingURL=chunk-YDMB4XPA.cjs.map
|
|
57
|
+
//# sourceMappingURL=chunk-YDMB4XPA.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/resources/paypal_gateways.ts"],"names":["ApiResource"],"mappings":";;;;;AAsHA,IAAM,cAAA,GAAN,MAAM,eAAA,SAAuBA,6BAAA,CAA2B;AAAA,EAEvD,OAAgB,IAAA,GAA0B,iBAAA;AAAA,EAE1C,MAAM,MAAA,CAAO,QAAA,EAA+B,MAAA,EAA6C,OAAA,EAAmD;AAC3I,IAAA,OAAO,IAAA,CAAK,SAAA,CAAU,MAAA,CAA2C,EAAE,GAAG,QAAA,EAAU,IAAA,EAAM,eAAA,CAAe,IAAA,EAAK,EAAG,MAAA,EAAQ,OAAO,CAAA;AAAA,EAC7H;AAAA,EAEA,MAAM,MAAA,CAAO,QAAA,EAA+B,MAAA,EAA6C,OAAA,EAAmD;AAC3I,IAAA,OAAO,IAAA,CAAK,SAAA,CAAU,MAAA,CAA2C,EAAE,GAAG,QAAA,EAAU,IAAA,EAAM,eAAA,CAAe,IAAA,EAAK,EAAG,MAAA,EAAQ,OAAO,CAAA;AAAA,EAC7H;AAAA,EAEA,MAAM,MAAA,CAAO,EAAA,EAAyB,OAAA,EAA0C;AAC/E,IAAA,MAAM,IAAA,CAAK,SAAA,CAAU,MAAA,CAAQ,OAAO,EAAA,KAAO,QAAA,GA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port type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { PaymentMethod } from './payment_methods'\nimport type { Version } from './versions'\nimport type { EventStore } from './event_stores'\nimport type { PaypalPayment } from './paypal_payments'\n\n\ntype PaypalGatewayType = 'paypal_gateways'\ntype PaypalGatewayRel = ResourceRel & { type: PaypalGatewayType }\n\n\nexport type PaypalGatewaySort = Pick<PaypalGateway, 'id' | 'name' | 'disabled_at'> & ResourceSort\n// export type PaypalGatewayFilter = Pick<PaypalGateway, 'id' | 'name' | 'disabled_at'> & ResourceFilter\n\n\ninterface PaypalGateway extends Resource {\n\t\n\treadonly type: PaypalGatewayType\n\n\t/** \n\t * The payment gateway's internal name.\n\t * @example ```\"US payment gateway\"```\n\t */\n\tname: string\n\t/** \n\t * Indicates if the payment source is forced on the editable order upon receiving a successful event from the gateway.\n\t * @example ```true```\n\t */\n\tforce_payments?: boolean | null\n\t/** \n\t * Time at which this resource was disabled.\n\t * @example ```\"2018-01-01T12:00:00.000Z\"```\n\t */\n\tdisabled_at?: string | null\n\n\tpayment_methods?: PaymentMethod[] | null\n\tversions?: Version[] | null\n\tevent_stores?: EventStore[] | null\n\tpaypal_payments?: PaypalPayment[] | null\n\n}\n\n\ninterface PaypalGatewayCreate extends ResourceCreate {\n\t\n\t/** \n\t * The payment gateway's internal name.\n\t * @example ```\"US payment gateway\"```\n\t */\n\tname: string\n\t/** \n\t * Indicates if the payment source is forced on the editable order upon receiving a successful event from the gateway.\n\t * @example ```true```\n\t */\n\tforce_payments?: boolean | null\n\t/** \n\t * Send this attribute if you want to mark this resource as disabled.\n\t * @example ```true```\n\t */\n\t_disable?: boolean | null\n\t/** \n\t * Send this attribute if you want to mark this resource as enabled.\n\t * @example ```true```\n\t */\n\t_enable?: boolean | null\n\t/** \n\t * The gateway client ID.\n\t * @example ```\"xxxx-yyyy-zzzz\"```\n\t */\n\tclient_id: string\n\t/** \n\t * The gateway client secret.\n\t * @example ```\"xxxx-yyyy-zzzz\"```\n\t */\n\tclient_secret: string\n\t\n}\n\n\ninterface PaypalGatewayUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The payment gateway's internal name.\n\t * @example ```\"US payment gateway\"```\n\t */\n\tname?: string | null\n\t/** \n\t * Indicates if the payment source is forced on the editable order upon receiving a successful event from the gateway.\n\t * @example ```true```\n\t */\n\tforce_payments?: boolean | null\n\t/** \n\t * Send this attribute if you want to mark this resource as disabled.\n\t * @example ```true```\n\t */\n\t_disable?: boolean | null\n\t/** \n\t * Send this attribute if you want to mark this resource as enabled.\n\t * @example ```true```\n\t */\n\t_enable?: boolean | null\n\t/** \n\t * The gateway client ID.\n\t * @example ```\"xxxx-yyyy-zzzz\"```\n\t */\n\tclient_id?: string | null\n\t/** \n\t * The gateway client secret.\n\t * @example ```\"xxxx-yyyy-zzzz\"```\n\t */\n\tclient_secret?: string | null\n\t\n}\n\n\nclass PaypalGateways extends ApiResource<PaypalGateway> {\n\n\tstatic readonly TYPE: PaypalGatewayType = 'paypal_gateways' as const\n\n\tasync create(resource: PaypalGatewayCreate, params?: QueryParamsRetrieve<PaypalGateway>, options?: ResourcesConfig): Promise<PaypalGateway> {\n\t\treturn this.resources.create<PaypalGatewayCreate, PaypalGateway>({ ...resource, type: PaypalGateways.TYPE }, params, options)\n\t}\n\n\tasync update(resource: PaypalGatewayUpdate, params?: QueryParamsRetrieve<PaypalGateway>, options?: ResourcesConfig): Promise<PaypalGateway> {\n\t\treturn this.resources.update<PaypalGatewayUpdate, PaypalGateway>({ ...resource, type: PaypalGateways.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: PaypalGateways.TYPE } : id, options)\n\t}\n\n\tasync payment_methods(paypalGatewayId: string | PaypalGateway, params?: QueryParamsList<PaymentMethod>, options?: ResourcesConfig): Promise<ListResponse<PaymentMethod>> {\n\t\tconst _paypalGatewayId = (paypalGatewayId as PaypalGateway).id || paypalGatewayId as string\n\t\treturn this.resources.fetch<PaymentMethod>({ type: 'payment_methods' }, `paypal_gateways/${_paypalGatewayId}/payment_methods`, params, options) as unknown as ListResponse<PaymentMethod>\n\t}\n\n\tasync versions(paypalGatewayId: string | PaypalGateway, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _paypalGatewayId = (paypalGatewayId as PaypalGateway).id || paypalGatewayId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `paypal_gateways/${_paypalGatewayId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\tasync event_stores(paypalGatewayId: string | PaypalGateway, params?: QueryParamsList<EventStore>, options?: ResourcesConfig): Promise<ListResponse<EventStore>> {\n\t\tconst _paypalGatewayId = (paypalGatewayId as PaypalGateway).id || paypalGatewayId as string\n\t\treturn this.resources.fetch<EventStore>({ type: 'event_stores' }, `paypal_gateways/${_paypalGatewayId}/event_stores`, params, options) as unknown as ListResponse<EventStore>\n\t}\n\n\tasync paypal_payments(paypalGatewayId: string | PaypalGateway, params?: QueryParamsList<PaypalPayment>, options?: ResourcesConfig): Promise<ListResponse<PaypalPayment>> {\n\t\tconst _paypalGatewayId = (paypalGatewayId as PaypalGateway).id || paypalGatewayId as string\n\t\treturn this.resources.fetch<PaypalPayment>({ type: 'paypal_payments' }, `paypal_gateways/${_paypalGatewayId}/paypal_payments`, params, options) as unknown as ListResponse<PaypalPayment>\n\t}\n\n\tasync _disable(id: string | PaypalGateway, params?: QueryParamsRetrieve<PaypalGateway>, options?: ResourcesConfig): Promise<PaypalGateway> {\n\t\treturn this.resources.update<PaypalGatewayUpdate, PaypalGateway>({ id: (typeof id === 'string')? id: id.id, type: PaypalGateways.TYPE, _disable: true }, params, options)\n\t}\n\n\tasync _enable(id: string | PaypalGateway, params?: QueryParamsRetrieve<PaypalGateway>, options?: ResourcesConfig): Promise<PaypalGateway> {\n\t\treturn this.resources.update<PaypalGatewayUpdate, PaypalGateway>({ id: (typeof id === 'string')? id: id.id, type: PaypalGateways.TYPE, _enable: true }, params, options)\n\t}\n\n\n\tisPaypalGateway(resource: any): resource is PaypalGateway {\n\t\treturn resource.type && (resource.type === PaypalGateways.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): PaypalGatewayRel {\n\t\treturn super.relationshipOneToOne<PaypalGatewayRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): PaypalGatewayRel[] {\n\t\treturn super.relationshipOneToMany<PaypalGatewayRel>(...ids)\n\t}\n\n\n\ttype(): PaypalGatewayType {\n\t\treturn PaypalGateways.TYPE\n\t}\n\n}\n\n\nconst instance = new PaypalGateways()\nexport default instance\n\nexport type { PaypalGateways, PaypalGateway, PaypalGatewayCreate, PaypalGatewayUpdate, PaypalGatewayType }\n"]}
|
|
@@ -30,6 +30,12 @@ var CheckoutComGateways = class _CheckoutComGateways extends chunkU22VLCMN_cjs.A
|
|
|
30
30
|
const _checkoutComGatewayId = checkoutComGatewayId.id || checkoutComGatewayId;
|
|
31
31
|
return this.resources.fetch({ type: "checkout_com_payments" }, `checkout_com_gateways/${_checkoutComGatewayId}/checkout_com_payments`, params, options);
|
|
32
32
|
}
|
|
33
|
+
async _disable(id, params, options) {
|
|
34
|
+
return this.resources.update({ id: typeof id === "string" ? id : id.id, type: _CheckoutComGateways.TYPE, _disable: true }, params, options);
|
|
35
|
+
}
|
|
36
|
+
async _enable(id, params, options) {
|
|
37
|
+
return this.resources.update({ id: typeof id === "string" ? id : id.id, type: _CheckoutComGateways.TYPE, _enable: true }, params, options);
|
|
38
|
+
}
|
|
33
39
|
isCheckoutComGateway(resource) {
|
|
34
40
|
return resource.type && resource.type === _CheckoutComGateways.TYPE;
|
|
35
41
|
}
|
|
@@ -47,5 +53,5 @@ var instance = new CheckoutComGateways();
|
|
|
47
53
|
var checkout_com_gateways_default = instance;
|
|
48
54
|
|
|
49
55
|
exports.checkout_com_gateways_default = checkout_com_gateways_default;
|
|
50
|
-
//# sourceMappingURL=chunk-
|
|
51
|
-
//# sourceMappingURL=chunk-
|
|
56
|
+
//# sourceMappingURL=chunk-ZSWW2XGD.cjs.map
|
|
57
|
+
//# sourceMappingURL=chunk-ZSWW2XGD.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/resources/checkout_com_gateways.ts"],"names":["ApiResource"],"mappings":";;;;;AA0IA,IAAM,mBAAA,GAAN,MAAM,oBAAA,SAA4BA,6BAAA,CAAgC;AAAA,EAEjE,OAAgB,IAAA,GAA+B,uBAAA;AAAA,EAE/C,MAAM,MAAA,CAAO,QAAA,EAAoC,MAAA,EAAkD,OAAA,EAAwD;AAC1J,IAAA,OAAO,IAAA,CAAK,SAAA,CAAU,MAAA,CAAqD,EAAE,GAAG,QAAA,EAAU,IAAA,EAAM,oBAAA,CAAoB,IAAA,EAAK,EAAG,MAAA,EAAQ,OAAO,CAAA;AAAA,EAC5I;AAAA,EAEA,MAAM,MAAA,CAAO,QAAA,EAAoC,MAAA,EAAkD,OAAA,EAAwD;AAC1J,IAAA,OAAO,IAAA,CAAK,SAAA,CAAU,MAAA,CAAqD,EAAE,GAAG,QAAA,EAAU,IAAA,EAAM,oBAAA,CAAoB,IAAA,EAAK,EAAG,MAAA,EAAQ,OAAO,CAAA;AAAA,EAC5I;AAAA,EAEA,MAAM,MAAA,CAAO,EAAA,EAAyB,OAAA,EAA0C;AAC/E,IAAA,MAAM,IAAA,CAAK,SAAA,CAAU,MAAA,CAAQ,OAAO,EAAA,KAAO,QAAA,GAAW,EAAE,EAAA,EAAI,IAAA,EAAM,oBAAA,CAAoB,IAAA,EAAK,GAAI,IAAI,OAAO,CAAA;AAAA,EAC3G;AAAA,EAEA,MAAM,eAAA,CAAgB,oBAAA,EAAmD,MAAA,EAAyC,OAAA,EAAiE;AAClL,IAAA,MAAM,qBAAA,GAAyB,qBAA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zJ,IAAA,OAAO,KAAK,SAAA,CAAU,MAAA,CAAqD,EAAE,EAAA,EAAK,OAAO,OAAO,QAAA,GAAW,EAAA,GAAI,EAAA,CAAG,EAAA,EAAI,MAAM,oBAAA,CAAoB,IAAA,EAAM,UAAU,IAAA,EAAK,EAAG,QAAQ,OAAO,CAAA;AAAA,EACxL;AAAA,EAEA,MAAM,OAAA,CAAQ,EAAA,EAAiC,MAAA,EAAkD,OAAA,EAAwD;AACxJ,IAAA,OAAO,KAAK,SAAA,CAAU,MAAA,CAAqD,EAAE,EAAA,EAAK,OAAO,OAAO,QAAA,GAAW,EAAA,GAAI,EAAA,CAAG,EAAA,EAAI,MAAM,oBAAA,CAAoB,IAAA,EAAM,SAAS,IAAA,EAAK,EAAG,QAAQ,OAAO,CAAA;AAAA,EACvL;AAAA,EAGA,qBAAqB,QAAA,EAA+C;AACnE,IAAA,OAAO,QAAA,CAAS,IAAA,IAAS,QAAA,CAAS,IAAA,KAAS,oBAAA,CAAoB,IAAA;AAAA,EAChE;AAAA,EAGA,aAAa,EAAA,EAAuD;AACnE,IAAA,OAAO,KAAA,CAAM,qBAA4C,EAAE,CAAA;AAAA,EAC5D;AAAA,EAEA,sBAAsB,GAAA,EAAwC;AAC7D,IAAA,OAAO,KAAA,CAAM,qBAAA,CAA6C,GAAG,GAAG,CAAA;AAAA,EACjE;AAAA,EAGA,IAAA,GAA+B;AAC9B,IAAA,OAAO,oBAAA,CAAoB,IAAA;AAAA,EAC5B;AAED,CAAA;AAGA,IAAM,QAAA,GAAW,IAAI,mBAAA,EAAoB;AACzC,IAAO,6BAAA,GAAQ","file":"chunk-ZSWW2XGD.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 { PaymentMethod } from './payment_methods'\nimport type { Version } from './versions'\nimport type { EventStore } from './event_stores'\nimport type { CheckoutComPayment, CheckoutComPaymentType } from './checkout_com_payments'\n\n\ntype CheckoutComGatewayType = 'checkout_com_gateways'\ntype CheckoutComGatewayRel = ResourceRel & { type: CheckoutComGatewayType }\ntype CheckoutComPaymentRel = ResourceRel & { type: CheckoutComPaymentType }\n\n\nexport type CheckoutComGatewaySort = Pick<CheckoutComGateway, 'id' | 'name' | 'disabled_at'> & ResourceSort\n// export type CheckoutComGatewayFilter = Pick<CheckoutComGateway, 'id' | 'name' | 'disabled_at'> & ResourceFilter\n\n\ninterface CheckoutComGateway extends Resource {\n\t\n\treadonly type: CheckoutComGatewayType\n\n\t/** \n\t * The payment gateway's internal name.\n\t * @example ```\"US payment gateway\"```\n\t */\n\tname: string\n\t/** \n\t * Indicates if the payment source is forced on the editable order upon receiving a successful event from the gateway.\n\t * @example ```true```\n\t */\n\tforce_payments?: boolean | null\n\t/** \n\t * Time at which this resource was disabled.\n\t * @example ```\"2018-01-01T12:00:00.000Z\"```\n\t */\n\tdisabled_at?: string | null\n\t/** \n\t * The gateway webhook endpoint ID, generated automatically.\n\t * @example ```\"xxxx-yyyy-zzzz\"```\n\t */\n\twebhook_endpoint_id?: string | null\n\t/** \n\t * The gateway webhook endpoint secret, generated automatically.\n\t * @example ```\"xxxx-yyyy-zzzz\"```\n\t */\n\twebhook_endpoint_secret?: string | null\n\t/** \n\t * The gateway webhook URL, generated automatically.\n\t * @example ```\"https://core.commercelayer.co/webhook_callbacks/checkout_com_gateways/xxxxx\"```\n\t */\n\twebhook_endpoint_url?: string | null\n\n\tpayment_methods?: PaymentMethod[] | null\n\tversions?: Version[] | null\n\tevent_stores?: EventStore[] | null\n\tcheckout_com_payments?: CheckoutComPayment[] | null\n\n}\n\n\ninterface CheckoutComGatewayCreate extends ResourceCreate {\n\t\n\t/** \n\t * The payment gateway's internal name.\n\t * @example ```\"US payment gateway\"```\n\t */\n\tname: string\n\t/** \n\t * Indicates if the payment source is forced on the editable order upon receiving a successful event from the gateway.\n\t * @example ```true```\n\t */\n\tforce_payments?: boolean | null\n\t/** \n\t * Send this attribute if you want to mark this resource as disabled.\n\t * @example ```true```\n\t */\n\t_disable?: boolean | null\n\t/** \n\t * Send this attribute if you want to mark this resource as enabled.\n\t * @example ```true```\n\t */\n\t_enable?: boolean | null\n\t/** \n\t * The gateway secret key.\n\t * @example ```\"sk_test_xxxx-yyyy-zzzz\"```\n\t */\n\tsecret_key: string\n\t/** \n\t * The gateway public key.\n\t * @example ```\"pk_test_xxxx-yyyy-zzzz\"```\n\t */\n\tpublic_key: string\n\n\tcheckout_com_payments?: CheckoutComPaymentRel[] | null\n\n}\n\n\ninterface CheckoutComGatewayUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The payment gateway's internal name.\n\t * @example ```\"US payment gateway\"```\n\t */\n\tname?: string | null\n\t/** \n\t * Indicates if the payment source is forced on the editable order upon receiving a successful event from the gateway.\n\t * @example ```true```\n\t */\n\tforce_payments?: boolean | null\n\t/** \n\t * Send this attribute if you want to mark this resource as disabled.\n\t * @example ```true```\n\t */\n\t_disable?: boolean | null\n\t/** \n\t * Send this attribute if you want to mark this resource as enabled.\n\t * @example ```true```\n\t */\n\t_enable?: boolean | null\n\t/** \n\t * The gateway secret key.\n\t * @example ```\"sk_test_xxxx-yyyy-zzzz\"```\n\t */\n\tsecret_key?: string | null\n\t/** \n\t * The gateway public key.\n\t * @example ```\"pk_test_xxxx-yyyy-zzzz\"```\n\t */\n\tpublic_key?: string | null\n\n\tcheckout_com_payments?: CheckoutComPaymentRel[] | null\n\n}\n\n\nclass CheckoutComGateways extends ApiResource<CheckoutComGateway> {\n\n\tstatic readonly TYPE: CheckoutComGatewayType = 'checkout_com_gateways' as const\n\n\tasync create(resource: CheckoutComGatewayCreate, params?: QueryParamsRetrieve<CheckoutComGateway>, options?: ResourcesConfig): Promise<CheckoutComGateway> {\n\t\treturn this.resources.create<CheckoutComGatewayCreate, CheckoutComGateway>({ ...resource, type: CheckoutComGateways.TYPE }, params, options)\n\t}\n\n\tasync update(resource: CheckoutComGatewayUpdate, params?: QueryParamsRetrieve<CheckoutComGateway>, options?: ResourcesConfig): Promise<CheckoutComGateway> {\n\t\treturn this.resources.update<CheckoutComGatewayUpdate, CheckoutComGateway>({ ...resource, type: CheckoutComGateways.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: CheckoutComGateways.TYPE } : id, options)\n\t}\n\n\tasync payment_methods(checkoutComGatewayId: string | CheckoutComGateway, params?: QueryParamsList<PaymentMethod>, options?: ResourcesConfig): Promise<ListResponse<PaymentMethod>> {\n\t\tconst _checkoutComGatewayId = (checkoutComGatewayId as CheckoutComGateway).id || checkoutComGatewayId as string\n\t\treturn this.resources.fetch<PaymentMethod>({ type: 'payment_methods' }, `checkout_com_gateways/${_checkoutComGatewayId}/payment_methods`, params, options) as unknown as ListResponse<PaymentMethod>\n\t}\n\n\tasync versions(checkoutComGatewayId: string | CheckoutComGateway, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _checkoutComGatewayId = (checkoutComGatewayId as CheckoutComGateway).id || checkoutComGatewayId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `checkout_com_gateways/${_checkoutComGatewayId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\tasync event_stores(checkoutComGatewayId: string | CheckoutComGateway, params?: QueryParamsList<EventStore>, options?: ResourcesConfig): Promise<ListResponse<EventStore>> {\n\t\tconst _checkoutComGatewayId = (checkoutComGatewayId as CheckoutComGateway).id || checkoutComGatewayId as string\n\t\treturn this.resources.fetch<EventStore>({ type: 'event_stores' }, `checkout_com_gateways/${_checkoutComGatewayId}/event_stores`, params, options) as unknown as ListResponse<EventStore>\n\t}\n\n\tasync checkout_com_payments(checkoutComGatewayId: string | CheckoutComGateway, params?: QueryParamsList<CheckoutComPayment>, options?: ResourcesConfig): Promise<ListResponse<CheckoutComPayment>> {\n\t\tconst _checkoutComGatewayId = (checkoutComGatewayId as CheckoutComGateway).id || checkoutComGatewayId as string\n\t\treturn this.resources.fetch<CheckoutComPayment>({ type: 'checkout_com_payments' }, `checkout_com_gateways/${_checkoutComGatewayId}/checkout_com_payments`, params, options) as unknown as ListResponse<CheckoutComPayment>\n\t}\n\n\tasync _disable(id: string | CheckoutComGateway, params?: QueryParamsRetrieve<CheckoutComGateway>, options?: ResourcesConfig): Promise<CheckoutComGateway> {\n\t\treturn this.resources.update<CheckoutComGatewayUpdate, CheckoutComGateway>({ id: (typeof id === 'string')? id: id.id, type: CheckoutComGateways.TYPE, _disable: true }, params, options)\n\t}\n\n\tasync _enable(id: string | CheckoutComGateway, params?: QueryParamsRetrieve<CheckoutComGateway>, options?: ResourcesConfig): Promise<CheckoutComGateway> {\n\t\treturn this.resources.update<CheckoutComGatewayUpdate, CheckoutComGateway>({ id: (typeof id === 'string')? id: id.id, type: CheckoutComGateways.TYPE, _enable: true }, params, options)\n\t}\n\n\n\tisCheckoutComGateway(resource: any): resource is CheckoutComGateway {\n\t\treturn resource.type && (resource.type === CheckoutComGateways.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): CheckoutComGatewayRel {\n\t\treturn super.relationshipOneToOne<CheckoutComGatewayRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): CheckoutComGatewayRel[] {\n\t\treturn super.relationshipOneToMany<CheckoutComGatewayRel>(...ids)\n\t}\n\n\n\ttype(): CheckoutComGatewayType {\n\t\treturn CheckoutComGateways.TYPE\n\t}\n\n}\n\n\nconst instance = new CheckoutComGateways()\nexport default instance\n\nexport type { CheckoutComGateways, CheckoutComGateway, CheckoutComGatewayCreate, CheckoutComGatewayUpdate, CheckoutComGatewayType }\n"]}
|
package/lib/client.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { F as Fetch, f as InterceptorManager, g as FetchResponse } from './interceptor-
|
|
1
|
+
import { F as Fetch, f as InterceptorManager, g as FetchResponse } from './interceptor-ETmS7Tab.cjs';
|
|
2
2
|
|
|
3
3
|
type RequestParams = Record<string, string | number | boolean>;
|
|
4
4
|
type RequestHeaders = Record<string, string>;
|
package/lib/client.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { F as Fetch, f as InterceptorManager, g as FetchResponse } from './interceptor-
|
|
1
|
+
import { F as Fetch, f as InterceptorManager, g as FetchResponse } from './interceptor-ETmS7Tab.js';
|
|
2
2
|
|
|
3
3
|
type RequestParams = Record<string, string | number | boolean>;
|
|
4
4
|
type RequestHeaders = Record<string, string>;
|
package/lib/commercelayer.cjs
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var chunkNHDSPKJY_cjs = require('./chunk-NHDSPKJY.cjs');
|
|
6
6
|
require('./chunk-U22VLCMN.cjs');
|
|
7
7
|
require('./chunk-YY5ENJSH.cjs');
|
|
8
8
|
require('./chunk-ZWVME7CU.cjs');
|
|
@@ -17,19 +17,19 @@ require('./chunk-JEQ2X3Z6.cjs');
|
|
|
17
17
|
|
|
18
18
|
Object.defineProperty(exports, "CommerceLayer", {
|
|
19
19
|
enumerable: true,
|
|
20
|
-
get: function () { return
|
|
20
|
+
get: function () { return chunkNHDSPKJY_cjs.CommerceLayer; }
|
|
21
21
|
});
|
|
22
22
|
Object.defineProperty(exports, "CommerceLayerClient", {
|
|
23
23
|
enumerable: true,
|
|
24
|
-
get: function () { return
|
|
24
|
+
get: function () { return chunkNHDSPKJY_cjs.CommerceLayerClient; }
|
|
25
25
|
});
|
|
26
26
|
Object.defineProperty(exports, "OPEN_API_SCHEMA_VERSION", {
|
|
27
27
|
enumerable: true,
|
|
28
|
-
get: function () { return
|
|
28
|
+
get: function () { return chunkNHDSPKJY_cjs.OPEN_API_SCHEMA_VERSION; }
|
|
29
29
|
});
|
|
30
30
|
Object.defineProperty(exports, "default", {
|
|
31
31
|
enumerable: true,
|
|
32
|
-
get: function () { return
|
|
32
|
+
get: function () { return chunkNHDSPKJY_cjs.commercelayer_default; }
|
|
33
33
|
});
|
|
34
34
|
//# sourceMappingURL=commercelayer.cjs.map
|
|
35
35
|
//# sourceMappingURL=commercelayer.cjs.map
|
package/lib/commercelayer.d.cts
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { ApiError } from './error.cjs';
|
|
2
|
-
import { b as RequestInterceptor, c as ErrorInterceptor, d as ResponseInterceptor, I as InterceptorType, e as RawResponseReader } from './interceptor-
|
|
3
|
-
import {
|
|
2
|
+
import { b as RequestInterceptor, c as ErrorInterceptor, d as ResponseInterceptor, I as InterceptorType, e as RawResponseReader } from './interceptor-ETmS7Tab.cjs';
|
|
3
|
+
import { gy as ResourcesInitConfig } from './api-Hc0WV-9j.cjs';
|
|
4
4
|
import './client.cjs';
|
|
5
5
|
import './types.cjs';
|
|
6
6
|
|
|
7
|
-
declare const OPEN_API_SCHEMA_VERSION = "7.9.
|
|
7
|
+
declare const OPEN_API_SCHEMA_VERSION = "7.9.11";
|
|
8
8
|
type SdkConfig = {};
|
|
9
9
|
type CommerceLayerInitConfig = SdkConfig & ResourcesInitConfig;
|
|
10
10
|
type CommerceLayerConfig = Partial<CommerceLayerInitConfig>;
|
|
11
11
|
declare class CommerceLayerClient {
|
|
12
|
-
readonly openApiSchemaVersion = "7.9.
|
|
12
|
+
readonly openApiSchemaVersion = "7.9.11";
|
|
13
13
|
protected static cl: CommerceLayerClient;
|
|
14
14
|
static get(config?: CommerceLayerInitConfig): CommerceLayerClient;
|
|
15
15
|
protected constructor(config: CommerceLayerInitConfig);
|
package/lib/commercelayer.d.ts
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { ApiError } from './error.js';
|
|
2
|
-
import { b as RequestInterceptor, c as ErrorInterceptor, d as ResponseInterceptor, I as InterceptorType, e as RawResponseReader } from './interceptor-
|
|
3
|
-
import {
|
|
2
|
+
import { b as RequestInterceptor, c as ErrorInterceptor, d as ResponseInterceptor, I as InterceptorType, e as RawResponseReader } from './interceptor-ETmS7Tab.js';
|
|
3
|
+
import { gy as ResourcesInitConfig } from './api-DrryxHto.js';
|
|
4
4
|
import './client.js';
|
|
5
5
|
import './types.js';
|
|
6
6
|
|
|
7
|
-
declare const OPEN_API_SCHEMA_VERSION = "7.9.
|
|
7
|
+
declare const OPEN_API_SCHEMA_VERSION = "7.9.11";
|
|
8
8
|
type SdkConfig = {};
|
|
9
9
|
type CommerceLayerInitConfig = SdkConfig & ResourcesInitConfig;
|
|
10
10
|
type CommerceLayerConfig = Partial<CommerceLayerInitConfig>;
|
|
11
11
|
declare class CommerceLayerClient {
|
|
12
|
-
readonly openApiSchemaVersion = "7.9.
|
|
12
|
+
readonly openApiSchemaVersion = "7.9.11";
|
|
13
13
|
protected static cl: CommerceLayerClient;
|
|
14
14
|
static get(config?: CommerceLayerInitConfig): CommerceLayerClient;
|
|
15
15
|
protected constructor(config: CommerceLayerInitConfig);
|
package/lib/commercelayer.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { CommerceLayer, CommerceLayerClient, OPEN_API_SCHEMA_VERSION, commercelayer_default as default } from './chunk-
|
|
1
|
+
export { CommerceLayer, CommerceLayerClient, OPEN_API_SCHEMA_VERSION, commercelayer_default as default } from './chunk-MBWTMQHA.js';
|
|
2
2
|
import './chunk-XKERR6OR.js';
|
|
3
3
|
import './chunk-CHYP5F26.js';
|
|
4
4
|
import './chunk-UUY77JM3.js';
|
package/lib/config.d.cts
CHANGED
package/lib/config.d.ts
CHANGED
package/lib/enum.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { aX as CreatableResource, aY as CreatableResourceType, bw as DeletableResource, bx as DeletableResourceType, dR as ListableResource, dS as ListableResourceType, nA as ResourceFields, nB as ResourceSortFields, gv as ResourceTypeLock, gz as RetrievableResource, gA as RetrievableResourceType, iC as TaggableResource, iD as TaggableResourceType, j3 as UpdatableResource, j4 as UpdatableResourceType, j7 as VersionableResource, j8 as VersionableResourceType, nC as creatableResources, nD as deletableResources, nE as getResources, nF as getSingletons, nG as isCreatable, nH as isDeletable, nI as isSingleton, nJ as isTaggable, nK as isUpdatable, nL as isVersionable, nM as resourceList, nN as singletonList, nO as taggableResources, nP as updatableResources, nQ as versionableResources } from './api-Hc0WV-9j.cjs';
|
|
2
2
|
import './client.cjs';
|
|
3
|
-
import './interceptor-
|
|
3
|
+
import './interceptor-ETmS7Tab.cjs';
|
|
4
4
|
import './types.cjs';
|
package/lib/enum.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { aX as CreatableResource, aY as CreatableResourceType, bw as DeletableResource, bx as DeletableResourceType, dR as ListableResource, dS as ListableResourceType, nA as ResourceFields, nB as ResourceSortFields, gv as ResourceTypeLock, gz as RetrievableResource, gA as RetrievableResourceType, iC as TaggableResource, iD as TaggableResourceType, j3 as UpdatableResource, j4 as UpdatableResourceType, j7 as VersionableResource, j8 as VersionableResourceType, nC as creatableResources, nD as deletableResources, nE as getResources, nF as getSingletons, nG as isCreatable, nH as isDeletable, nI as isSingleton, nJ as isTaggable, nK as isUpdatable, nL as isVersionable, nM as resourceList, nN as singletonList, nO as taggableResources, nP as updatableResources, nQ as versionableResources } from './api-DrryxHto.js';
|
|
2
2
|
import './client.js';
|
|
3
|
-
import './interceptor-
|
|
3
|
+
import './interceptor-ETmS7Tab.js';
|
|
4
4
|
import './types.js';
|
package/lib/fetch.d.cts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { F as Fetch,
|
|
1
|
+
export { F as Fetch, h as FetchClientOptions, i as FetchError, j as FetchRequestOptions, g as FetchResponse, k as fetchURL } from './interceptor-ETmS7Tab.cjs';
|
package/lib/fetch.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { F as Fetch,
|
|
1
|
+
export { F as Fetch, h as FetchClientOptions, i as FetchError, j as FetchRequestOptions, g as FetchResponse, k as fetchURL } from './interceptor-ETmS7Tab.js';
|