UNPKG

@commercelayer/sdk

Version:
661 lines (659 loc) 14.7 kB
'use strict'; // src/enum.ts var apiResources = [ // ##__API_RESOURCE_LIST_START__## "addresses", "adjustments", "adyen_gateways", "adyen_payments", "applications", "attachments", "authorizations", "avalara_accounts", "axerve_gateways", "axerve_payments", "bing_geocoders", "braintree_gateways", "braintree_payments", "bundles", "buy_x_pay_y_promotions", "captures", "carrier_accounts", "checkout_com_gateways", "checkout_com_payments", "cleanups", "coupon_codes_promotion_rules", "coupon_recipients", "coupons", "custom_promotion_rules", "customer_addresses", "customer_groups", "customer_password_resets", "customer_payment_sources", "customer_subscriptions", "customers", "delivery_lead_times", "discount_engine_items", "discount_engines", "easypost_pickups", "event_callbacks", "event_stores", "events", "exports", "external_gateways", "external_payments", "external_promotions", "external_tax_calculators", "fixed_amount_promotions", "fixed_price_promotions", "flex_promotions", "free_gift_promotions", "free_shipping_promotions", "geocoders", "gift_card_recipients", "gift_cards", "google_geocoders", "imports", "in_stock_subscriptions", "inventory_models", "inventory_return_locations", "inventory_stock_locations", "klarna_gateways", "klarna_payments", "line_item_options", "line_items", "links", "manual_gateways", "manual_tax_calculators", "markets", "merchants", "notifications", "order_amount_promotion_rules", "order_copies", "order_factories", "order_subscription_items", "order_subscriptions", "orders", "organizations", "packages", "parcel_line_items", "parcels", "payment_gateways", "payment_methods", "payment_options", "paypal_gateways", "paypal_payments", "percentage_discount_promotions", "pickups", "price_frequency_tiers", "price_list_schedulers", "price_lists", "price_tiers", "price_volume_tiers", "prices", "promotion_rules", "promotions", "recurring_order_copies", "refunds", "reserved_stocks", "resource_errors", "return_line_items", "returns", "satispay_gateways", "satispay_payments", "shipments", "shipping_categories", "shipping_method_tiers", "shipping_methods", "shipping_weight_tiers", "shipping_zones", "sku_list_items", "sku_list_promotion_rules", "sku_lists", "sku_options", "skus", "stock_items", "stock_line_items", "stock_locations", "stock_reservations", "stock_transfers", "stores", "stripe_gateways", "stripe_payments", "stripe_tax_accounts", "subscription_models", "tags", "talon_one_accounts", "tax_calculators", "tax_categories", "tax_rules", "taxjar_accounts", "transactions", "versions", "vertex_accounts", "voids", "webhooks", "wire_transfers" // ##__API_RESOURCE_LIST_STOP__## ]; var resourceList = apiResources; var singletonList = [ // ##__API_RESOURCE_SINGLETON_START__## "applications", "organizations" // ##__API_RESOURCE_SINGLETON_STOP__## ]; var creatableResources = [ // ##__API_RESOURCE_CREATABLE_START__## "addresses", "adjustments", "adyen_gateways", "adyen_payments", "attachments", "avalara_accounts", "axerve_gateways", "axerve_payments", "bing_geocoders", "braintree_gateways", "braintree_payments", "bundles", "buy_x_pay_y_promotions", "carrier_accounts", "checkout_com_gateways", "checkout_com_payments", "cleanups", "coupon_codes_promotion_rules", "coupon_recipients", "coupons", "custom_promotion_rules", "customer_addresses", "customer_groups", "customer_password_resets", "customer_payment_sources", "customer_subscriptions", "customers", "delivery_lead_times", "easypost_pickups", "exports", "external_gateways", "external_payments", "external_promotions", "external_tax_calculators", "fixed_amount_promotions", "fixed_price_promotions", "flex_promotions", "free_gift_promotions", "free_shipping_promotions", "gift_card_recipients", "gift_cards", "google_geocoders", "imports", "in_stock_subscriptions", "inventory_models", "inventory_return_locations", "inventory_stock_locations", "klarna_gateways", "klarna_payments", "line_item_options", "line_items", "links", "manual_gateways", "manual_tax_calculators", "markets", "merchants", "notifications", "order_amount_promotion_rules", "order_copies", "order_subscription_items", "order_subscriptions", "orders", "packages", "parcel_line_items", "parcels", "payment_methods", "payment_options", "paypal_gateways", "paypal_payments", "percentage_discount_promotions", "price_frequency_tiers", "price_list_schedulers", "price_lists", "price_volume_tiers", "prices", "recurring_order_copies", "return_line_items", "returns", "satispay_gateways", "satispay_payments", "shipments", "shipping_categories", "shipping_methods", "shipping_weight_tiers", "shipping_zones", "sku_list_items", "sku_list_promotion_rules", "sku_lists", "sku_options", "skus", "stock_items", "stock_line_items", "stock_locations", "stock_reservations", "stock_transfers", "stores", "stripe_gateways", "stripe_payments", "stripe_tax_accounts", "subscription_models", "tags", "talon_one_accounts", "tax_categories", "tax_rules", "taxjar_accounts", "vertex_accounts", "webhooks", "wire_transfers" // ##__API_RESOURCE_CREATABLE_STOP__## ]; var updatableResources = [ // ##__API_RESOURCE_UPDATABLE_START__## "addresses", "adjustments", "adyen_gateways", "adyen_payments", "attachments", "authorizations", "avalara_accounts", "axerve_gateways", "axerve_payments", "bing_geocoders", "braintree_gateways", "braintree_payments", "bundles", "buy_x_pay_y_promotions", "captures", "carrier_accounts", "checkout_com_gateways", "checkout_com_payments", "cleanups", "coupon_codes_promotion_rules", "coupon_recipients", "coupons", "custom_promotion_rules", "customer_addresses", "customer_groups", "customer_password_resets", "customer_payment_sources", "customer_subscriptions", "customers", "delivery_lead_times", "easypost_pickups", "events", "exports", "external_gateways", "external_payments", "external_promotions", "external_tax_calculators", "fixed_amount_promotions", "fixed_price_promotions", "flex_promotions", "free_gift_promotions", "free_shipping_promotions", "gift_card_recipients", "gift_cards", "google_geocoders", "imports", "in_stock_subscriptions", "inventory_models", "inventory_return_locations", "inventory_stock_locations", "klarna_gateways", "klarna_payments", "line_item_options", "line_items", "links", "manual_gateways", "manual_tax_calculators", "markets", "merchants", "notifications", "order_amount_promotion_rules", "order_copies", "order_subscription_items", "order_subscriptions", "orders", "packages", "parcel_line_items", "parcels", "payment_methods", "payment_options", "paypal_gateways", "paypal_payments", "percentage_discount_promotions", "price_frequency_tiers", "price_list_schedulers", "price_lists", "price_volume_tiers", "prices", "recurring_order_copies", "refunds", "return_line_items", "returns", "satispay_gateways", "satispay_payments", "shipments", "shipping_categories", "shipping_methods", "shipping_weight_tiers", "shipping_zones", "sku_list_items", "sku_list_promotion_rules", "sku_lists", "sku_options", "skus", "stock_items", "stock_line_items", "stock_locations", "stock_reservations", "stock_transfers", "stores", "stripe_gateways", "stripe_payments", "stripe_tax_accounts", "subscription_models", "tags", "talon_one_accounts", "tax_categories", "tax_rules", "taxjar_accounts", "vertex_accounts", "voids", "webhooks", "wire_transfers" // ##__API_RESOURCE_UPDATABLE_STOP__## ]; var deletableResources = [ // ##__API_RESOURCE_DELETABLE_START__## "addresses", "adjustments", "adyen_gateways", "adyen_payments", "attachments", "avalara_accounts", "axerve_gateways", "axerve_payments", "bing_geocoders", "braintree_gateways", "braintree_payments", "bundles", "buy_x_pay_y_promotions", "carrier_accounts", "checkout_com_gateways", "checkout_com_payments", "cleanups", "coupon_codes_promotion_rules", "coupon_recipients", "coupons", "custom_promotion_rules", "customer_addresses", "customer_groups", "customer_password_resets", "customer_payment_sources", "customer_subscriptions", "customers", "delivery_lead_times", "easypost_pickups", "exports", "external_gateways", "external_payments", "external_promotions", "external_tax_calculators", "fixed_amount_promotions", "fixed_price_promotions", "flex_promotions", "free_gift_promotions", "free_shipping_promotions", "gift_card_recipients", "gift_cards", "google_geocoders", "imports", "in_stock_subscriptions", "inventory_models", "inventory_return_locations", "inventory_stock_locations", "klarna_gateways", "klarna_payments", "line_item_options", "line_items", "links", "manual_gateways", "manual_tax_calculators", "markets", "merchants", "notifications", "order_amount_promotion_rules", "order_copies", "order_subscription_items", "order_subscriptions", "orders", "packages", "parcel_line_items", "parcels", "payment_methods", "payment_options", "paypal_gateways", "paypal_payments", "percentage_discount_promotions", "price_frequency_tiers", "price_list_schedulers", "price_lists", "price_volume_tiers", "prices", "recurring_order_copies", "return_line_items", "returns", "satispay_gateways", "satispay_payments", "shipments", "shipping_categories", "shipping_methods", "shipping_weight_tiers", "shipping_zones", "sku_list_items", "sku_list_promotion_rules", "sku_lists", "sku_options", "skus", "stock_items", "stock_line_items", "stock_locations", "stock_reservations", "stock_transfers", "stores", "stripe_gateways", "stripe_payments", "stripe_tax_accounts", "subscription_models", "tags", "talon_one_accounts", "tax_categories", "tax_rules", "taxjar_accounts", "vertex_accounts", "webhooks", "wire_transfers" // ##__API_RESOURCE_DELETABLE_STOP__## ]; var taggableResources = [ // ##__API_RESOURCE_TAGGABLE_START__## "addresses", "bundles", "buy_x_pay_y_promotions", "coupons", "customers", "external_promotions", "fixed_amount_promotions", "fixed_price_promotions", "flex_promotions", "free_gift_promotions", "free_shipping_promotions", "gift_cards", "line_item_options", "line_items", "order_subscriptions", "orders", "percentage_discount_promotions", "promotions", "returns", "shipments", "sku_options", "skus" // ##__API_RESOURCE_TAGGABLE_STOP__## ]; var versionableResources = [ // ##__API_RESOURCE_VERSIONABLE_START__## "addresses", "adjustments", "adyen_gateways", "adyen_payments", "authorizations", "avalara_accounts", "axerve_gateways", "axerve_payments", "braintree_gateways", "braintree_payments", "bundles", "buy_x_pay_y_promotions", "captures", "carrier_accounts", "checkout_com_gateways", "checkout_com_payments", "cleanups", "coupon_codes_promotion_rules", "coupon_recipients", "coupons", "custom_promotion_rules", "customer_addresses", "customer_groups", "customer_payment_sources", "customer_subscriptions", "delivery_lead_times", "discount_engines", "exports", "external_gateways", "external_payments", "external_promotions", "external_tax_calculators", "fixed_amount_promotions", "fixed_price_promotions", "flex_promotions", "free_gift_promotions", "free_shipping_promotions", "gift_card_recipients", "gift_cards", "in_stock_subscriptions", "inventory_models", "inventory_return_locations", "inventory_stock_locations", "klarna_gateways", "klarna_payments", "manual_gateways", "manual_tax_calculators", "markets", "merchants", "order_amount_promotion_rules", "order_subscriptions", "orders", "packages", "parcel_line_items", "parcels", "payment_gateways", "payment_methods", "paypal_gateways", "paypal_payments", "percentage_discount_promotions", "price_frequency_tiers", "price_list_schedulers", "price_lists", "price_tiers", "price_volume_tiers", "prices", "promotion_rules", "promotions", "refunds", "reserved_stocks", "returns", "satispay_gateways", "satispay_payments", "shipments", "shipping_categories", "shipping_method_tiers", "shipping_methods", "shipping_weight_tiers", "shipping_zones", "sku_list_items", "sku_list_promotion_rules", "sku_lists", "sku_options", "skus", "stock_items", "stock_line_items", "stock_locations", "stock_transfers", "stores", "stripe_gateways", "stripe_payments", "stripe_tax_accounts", "talon_one_accounts", "tax_calculators", "tax_categories", "tax_rules", "taxjar_accounts", "transactions", "vertex_accounts", "voids", "webhooks", "wire_transfers" // ##__API_RESOURCE_VERSIONABLE_STOP__## ]; function getResources(sort) { return sort ? [...resourceList].sort() : resourceList; } function getSingletons(sort) { return sort ? [...singletonList].sort() : singletonList; } function isSingleton(resource) { return singletonList.includes(resource); } function isCreatable(resource) { return creatableResources.includes(resource); } function isUpdatable(resource) { return updatableResources.includes(resource); } function isDeletable(resource) { return deletableResources.includes(resource); } function isTaggable(resource) { return taggableResources.includes(resource); } function isVersionable(resource) { return versionableResources.includes(resource); } exports.creatableResources = creatableResources; exports.deletableResources = deletableResources; exports.getResources = getResources; exports.getSingletons = getSingletons; exports.isCreatable = isCreatable; exports.isDeletable = isDeletable; exports.isSingleton = isSingleton; exports.isTaggable = isTaggable; exports.isUpdatable = isUpdatable; exports.isVersionable = isVersionable; exports.resourceList = resourceList; exports.singletonList = singletonList; exports.taggableResources = taggableResources; exports.updatableResources = updatableResources; exports.versionableResources = versionableResources; //# sourceMappingURL=chunk-7Z7FQA33.cjs.map //# sourceMappingURL=chunk-7Z7FQA33.cjs.map