Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@commercelayer/cli-plugin-resources

Package Overview
Dependencies
Maintainers
3
Versions
267
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@commercelayer/cli-plugin-resources - npm Package Compare versions

Comparing version 2.0.3 to 2.1.0

lib/util/resources/available.d.ts

94

lib/commands/resources/index.js

@@ -8,2 +8,3 @@ "use strict";

const cli_ux_1 = (0, tslib_1.__importDefault)(require("cli-ux"));
const available_1 = (0, tslib_1.__importDefault)(require("../../util/resources/available"));
class ResourcesIndex extends command_1.Command {

@@ -42,94 +43,3 @@ async run() {

ResourcesIndex.args = [];
const resources = [
{ name: 'address', api: 'addresses', model: 'Address' },
{ name: 'adjustment', api: 'adjustments', model: 'Adjustment' },
{ name: 'adyen_gateway', api: 'adyen_gateways', model: 'AdyenGateway' },
{ name: 'adyen_payment', api: 'adyen_payments', model: 'AdyenPayment' },
{ name: 'application', api: 'application', model: 'Application', singleton: true },
{ name: 'attachment', api: 'attachments', model: 'Attachment' },
{ name: 'authorization', api: 'authorizations', model: 'Authorization' },
{ name: 'avalara_account', api: 'avalara_accounts', model: 'AvalaraAccount' },
{ name: 'billing_info_validation_rule', api: 'billing_info_validation_rules', model: 'BillingInfoValidationRule' },
{ name: 'bing_geocoder', api: 'bing_geocoders', model: 'BingGeocoder' },
{ name: 'braintree_gateway', api: 'braintree_gateways', model: 'BraintreeGateway' },
{ name: 'braintree_payment', api: 'braintree_payments', model: 'BraintreePayment' },
{ name: 'bundle', api: 'bundles', model: 'Bundle' },
{ name: 'capture', api: 'captures', model: 'Capture' },
{ name: 'carrier_account', api: 'carrier_accounts', model: 'CarrierAccount' },
{ name: 'checkout_com_gateway', api: 'checkout_com_gateways', model: 'CheckoutComGateway' },
{ name: 'checkout_com_payment', api: 'checkout_com_payments', model: 'CheckoutComPayment' },
{ name: 'coupon_codes_promotion_rule', api: 'coupon_codes_promotion_rules', model: 'CouponCodesPromotionRule' },
{ name: 'coupon', api: 'coupons', model: 'Coupon' },
{ name: 'customer_address', api: 'customer_addresses', model: 'CustomerAddress' },
{ name: 'customer_group', api: 'customer_groups', model: 'CustomerGroup' },
{ name: 'customer_password_reset', api: 'customer_password_resets', model: 'CustomerPasswordReset' },
{ name: 'customer_payment_source', api: 'customer_payment_sources', model: 'CustomerPaymentSource' },
{ name: 'customer_subscription', api: 'customer_subscriptions', model: 'CustomerSubscription' },
{ name: 'customer', api: 'customers', model: 'Customer' },
{ name: 'delivery_lead_time', api: 'delivery_lead_times', model: 'DeliveryLeadTime' },
{ name: 'external_gateway', api: 'external_gateways', model: 'ExternalGateway' },
{ name: 'external_payment', api: 'external_payments', model: 'ExternalPayment' },
{ name: 'external_promotion', api: 'external_promotions', model: 'ExternalPromotion' },
{ name: 'external_tax_calculator', api: 'external_tax_calculators', model: 'ExternalTaxCalculator' },
{ name: 'fixed_amount_promotion', api: 'fixed_amount_promotions', model: 'FixedAmountPromotion' },
{ name: 'free_shipping_promotion', api: 'free_shipping_promotions', model: 'FreeShippingPromotion' },
{ name: 'geocoder', api: 'geocoders', model: 'Geocoder' },
{ name: 'gift_card_recipient', api: 'gift_card_recipients', model: 'GiftCardRecipient' },
{ name: 'gift_card', api: 'gift_cards', model: 'GiftCard' },
{ name: 'google_geocoder', api: 'google_geocoders', model: 'GoogleGeocoder' },
{ name: 'import', api: 'imports', model: 'Import' },
{ name: 'in_stock_subscription', api: 'in_stock_subscriptions', model: 'InStockSubscription' },
{ name: 'inventory_model', api: 'inventory_models', model: 'InventoryModel' },
{ name: 'inventory_return_location', api: 'inventory_return_locations', model: 'InventoryReturnLocation' },
{ name: 'inventory_stock_location', api: 'inventory_stock_locations', model: 'InventoryStockLocation' },
{ name: 'line_item_option', api: 'line_item_options', model: 'LineItemOption' },
{ name: 'line_item', api: 'line_items', model: 'LineItem' },
{ name: 'manual_gateway', api: 'manual_gateways', model: 'ManualGateway' },
{ name: 'manual_tax_calculator', api: 'manual_tax_calculators', model: 'ManualTaxCalculator' },
{ name: 'market', api: 'markets', model: 'Market' },
{ name: 'merchant', api: 'merchants', model: 'Merchant' },
{ name: 'order_amount_promotion_rule', api: 'order_amount_promotion_rules', model: 'OrderAmountPromotionRule' },
{ name: 'order_copy', api: 'order_copies', model: 'OrderCopy' },
{ name: 'order_subscription', api: 'order_subscriptions', model: 'OrderSubscription' },
{ name: 'order', api: 'orders', model: 'Order' },
{ name: 'organization', api: 'organization', model: 'Organization', singleton: true },
{ name: 'package', api: 'packages', model: 'Package' },
{ name: 'parcel_line_item', api: 'parcel_line_items', model: 'ParcelLineItem' },
{ name: 'parcel', api: 'parcels', model: 'Parcel' },
{ name: 'payment_gateway', api: 'payment_gateways', model: 'PaymentGateway' },
{ name: 'payment_method', api: 'payment_methods', model: 'PaymentMethod' },
{ name: 'paypal_gateway', api: 'paypal_gateways', model: 'PaypalGateway' },
{ name: 'paypal_payment', api: 'paypal_payments', model: 'PaypalPayment' },
{ name: 'percentage_discount_promotion', api: 'percentage_discount_promotions', model: 'PercentageDiscountPromotion' },
{ name: 'price_list', api: 'price_lists', model: 'PriceList' },
{ name: 'price', api: 'prices', model: 'Price' },
{ name: 'promotion_rule', api: 'promotion_rules', model: 'PromotionRule' },
{ name: 'promotion', api: 'promotions', model: 'Promotion' },
{ name: 'refund', api: 'refunds', model: 'Refund' },
{ name: 'return_line_item', api: 'return_line_items', model: 'ReturnLineItem' },
{ name: 'return', api: 'returns', model: 'Return' },
{ name: 'shipment', api: 'shipments', model: 'Shipment' },
{ name: 'shipping_category', api: 'shipping_categories', model: 'ShippingCategory' },
{ name: 'shipping_method', api: 'shipping_methods', model: 'ShippingMethod' },
{ name: 'shipping_zone', api: 'shipping_zones', model: 'ShippingZone' },
{ name: 'sku_list_item', api: 'sku_list_items', model: 'SkuListItem' },
{ name: 'sku_list_promotion_rule', api: 'sku_list_promotion_rules', model: 'SkuListPromotionRule' },
{ name: 'sku_list', api: 'sku_lists', model: 'SkuList' },
{ name: 'sku_option', api: 'sku_options', model: 'SkuOption' },
{ name: 'sku', api: 'skus', model: 'Sku' },
{ name: 'stock_item', api: 'stock_items', model: 'StockItem' },
{ name: 'stock_line_item', api: 'stock_line_items', model: 'StockLineItem' },
{ name: 'stock_location', api: 'stock_locations', model: 'StockLocation' },
{ name: 'stock_transfer', api: 'stock_transfers', model: 'StockTransfer' },
{ name: 'stripe_gateway', api: 'stripe_gateways', model: 'StripeGateway' },
{ name: 'stripe_payment', api: 'stripe_payments', model: 'StripePayment' },
{ name: 'tax_calculator', api: 'tax_calculators', model: 'TaxCalculator' },
{ name: 'tax_category', api: 'tax_categories', model: 'TaxCategory' },
{ name: 'tax_rule', api: 'tax_rules', model: 'TaxRule' },
{ name: 'taxjar_account', api: 'taxjar_accounts', model: 'TaxjarAccount' },
{ name: 'transaction', api: 'transactions', model: 'Transaction' },
{ name: 'void', api: 'voids', model: 'Void' },
{ name: 'webhook', api: 'webhooks', model: 'Webhook' },
{ name: 'wire_transfer', api: 'wire_transfers', model: 'WireTransfer' },
];
const resources = available_1.default;
const findResource = (res, { singular = false } = {}) => {

@@ -136,0 +46,0 @@ if (res === undefined)

@@ -1,1 +0,1 @@

{"version":"2.0.3","commands":{"order:actions":{"id":"order:actions","description":"show a list of possible actions","pluginName":"@commercelayer/cli-plugin-resources","pluginType":"core","hidden":false,"aliases":[],"flags":{},"args":[]},"order:approve":{"id":"order:approve","description":"approve an order","pluginName":"@commercelayer/cli-plugin-resources","pluginType":"core","hidden":false,"aliases":[],"flags":{"organization":{"name":"organization","type":"option","char":"o","description":"the slug of your organization","required":true},"domain":{"name":"domain","type":"option","char":"d","hidden":true,"required":false},"accessToken":{"name":"accessToken","type":"option","hidden":true,"required":true},"json":{"name":"json","type":"boolean","char":"j","description":"convert output in standard JSON format","allowNo":false},"unformatted":{"name":"unformatted","type":"boolean","char":"u","description":"print unformatted JSON output","allowNo":false},"raw":{"name":"raw","type":"boolean","char":"R","description":"print out the raw API response","hidden":false,"allowNo":false}},"args":[{"name":"id","description":"the id of the order to approve","required":true}]},"order:capture":{"id":"order:capture","description":"capture an order","pluginName":"@commercelayer/cli-plugin-resources","pluginType":"core","hidden":false,"aliases":[],"flags":{"organization":{"name":"organization","type":"option","char":"o","description":"the slug of your organization","required":true},"domain":{"name":"domain","type":"option","char":"d","hidden":true,"required":false},"accessToken":{"name":"accessToken","type":"option","hidden":true,"required":true},"json":{"name":"json","type":"boolean","char":"j","description":"convert output in standard JSON format","allowNo":false},"unformatted":{"name":"unformatted","type":"boolean","char":"u","description":"print unformatted JSON output","allowNo":false},"raw":{"name":"raw","type":"boolean","char":"R","description":"print out the raw API response","hidden":false,"allowNo":false}},"args":[{"name":"id","description":"the id of the order to capture","required":true}]},"order":{"id":"order","description":"execute an action on the order (place, approve, capture ...","pluginName":"@commercelayer/cli-plugin-resources","pluginType":"core","hidden":false,"aliases":[],"flags":{"organization":{"name":"organization","type":"option","char":"o","description":"the slug of your organization","required":true},"domain":{"name":"domain","type":"option","char":"d","hidden":true,"required":false},"accessToken":{"name":"accessToken","type":"option","hidden":true,"required":true},"json":{"name":"json","type":"boolean","char":"j","description":"convert output in standard JSON format","allowNo":false},"unformatted":{"name":"unformatted","type":"boolean","char":"u","description":"print unformatted JSON output","allowNo":false},"raw":{"name":"raw","type":"boolean","char":"R","description":"print out the raw API response","hidden":false,"allowNo":false}},"args":[{"name":"action","description":"the action to execute on the order","required":true},{"name":"id","description":"the id of the order","required":false}]},"order:place":{"id":"order:place","description":"place an order","pluginName":"@commercelayer/cli-plugin-resources","pluginType":"core","hidden":false,"aliases":[],"flags":{"organization":{"name":"organization","type":"option","char":"o","description":"the slug of your organization","required":true},"domain":{"name":"domain","type":"option","char":"d","hidden":true,"required":false},"accessToken":{"name":"accessToken","type":"option","hidden":true,"required":true},"json":{"name":"json","type":"boolean","char":"j","description":"convert output in standard JSON format","allowNo":false},"unformatted":{"name":"unformatted","type":"boolean","char":"u","description":"print unformatted JSON output","allowNo":false},"raw":{"name":"raw","type":"boolean","char":"R","description":"print out the raw API response","hidden":false,"allowNo":false}},"args":[{"name":"id","description":"the id of the order to place","required":true}]},"resources:all":{"id":"resources:all","description":"fetch all resources","pluginName":"@commercelayer/cli-plugin-resources","pluginType":"core","hidden":true,"aliases":["all","ra","res:all"],"examples":["$ commercelayer resources:all customers -f id,email -i customer_group -s updated_at","$ cl res:all -i customer_group -f customer_groups/name -w customer_group_name_eq=\"GROUP NAME\"","$ cl all -s -created_at --json"],"flags":{"organization":{"name":"organization","type":"option","char":"o","description":"the slug of your organization","required":true},"domain":{"name":"domain","type":"option","char":"d","hidden":true,"required":false},"accessToken":{"name":"accessToken","type":"option","hidden":true,"required":true},"json":{"name":"json","type":"boolean","char":"j","description":"convert output in standard JSON format","allowNo":false},"unformatted":{"name":"unformatted","type":"boolean","char":"u","description":"print unformatted JSON output","allowNo":false},"raw":{"name":"raw","type":"boolean","char":"R","description":"print out the raw API response","hidden":false,"allowNo":false},"include":{"name":"include","type":"option","char":"i","description":"comma separated resources to include"},"fields":{"name":"fields","type":"option","char":"f","description":"comma separeted list of fields in the format [resource]=field1,field2..."},"where":{"name":"where","type":"option","char":"w","description":"comma separated list of query filters"},"sort":{"name":"sort","type":"option","char":"s","description":"defines results ordering"},"save":{"name":"save","type":"option","char":"x","description":"save command output to file"},"save-path":{"name":"save-path","type":"option","char":"X","description":"save command output to file and create missing path directories"},"notify":{"name":"notify","type":"boolean","char":"N","description":"force system notification when export has finished","hidden":true,"allowNo":false},"clientId":{"name":"clientId","type":"option","char":"i","description":"organization client_id","hidden":true,"required":false},"clientSecret":{"name":"clientSecret","type":"option","char":"s","description":"organization client_secret","hidden":true,"required":false},"csv":{"name":"csv","type":"boolean","char":"C","description":"export fields in csv format","allowNo":false},"header":{"name":"header","type":"option","char":"H","description":"comma-separated list of values field:\"renamed title\""}},"args":[{"name":"resource","description":"the resource type","required":true}]},"resources:create":{"id":"resources:create","description":"create a new resource","pluginName":"@commercelayer/cli-plugin-resources","pluginType":"core","aliases":["create","rc","res:create","post"],"examples":["$ commercelayer resources:create customers -a email=user@test.com","$ clayer res:create customers -a email=\"user@test-com\" -r customer_group=customer_groups/<customerGroupId>","$ cl create customers -a email=user@test.com -m meta_key=\"meta value\"","$ cl rc customers -D /path/to/data/file/data.json"],"flags":{"organization":{"name":"organization","type":"option","char":"o","description":"the slug of your organization","required":true},"domain":{"name":"domain","type":"option","char":"d","hidden":true,"required":false},"accessToken":{"name":"accessToken","type":"option","hidden":true,"required":true},"json":{"name":"json","type":"boolean","char":"j","description":"convert output in standard JSON format","allowNo":false},"unformatted":{"name":"unformatted","type":"boolean","char":"u","description":"print unformatted JSON output","allowNo":false},"raw":{"name":"raw","type":"boolean","char":"R","description":"print out the raw API response","hidden":false,"allowNo":false},"attribute":{"name":"attribute","type":"option","char":"a","description":"define a resource attribute"},"object":{"name":"object","type":"option","char":"O","description":"define a resource object attribute"},"relationship":{"name":"relationship","type":"option","char":"r","description":"define a relationship with another resource"},"metadata":{"name":"metadata","type":"option","char":"m","description":"define a metadata attribute or a set of metadata attributes"},"data":{"name":"data","type":"option","char":"D","description":"the data file to use as request body"}},"args":[{"name":"resource","description":"the resource type","required":true}]},"resources:delete":{"id":"resources:delete","description":"delete an existing resource","pluginName":"@commercelayer/cli-plugin-resources","pluginType":"core","aliases":["delete","rd","res:delete"],"examples":["$ commercelayer resources:delete customers/<customerId>","$ cl delete customers <customerId>"],"flags":{"organization":{"name":"organization","type":"option","char":"o","description":"the slug of your organization","required":true},"domain":{"name":"domain","type":"option","char":"d","hidden":true,"required":false},"accessToken":{"name":"accessToken","type":"option","hidden":true,"required":true},"json":{"name":"json","type":"boolean","char":"j","description":"convert output in standard JSON format","allowNo":false},"unformatted":{"name":"unformatted","type":"boolean","char":"u","description":"print unformatted JSON output","allowNo":false},"raw":{"name":"raw","type":"boolean","char":"R","description":"print out the raw API response","hidden":false,"allowNo":false}},"args":[{"name":"resource","description":"the resource type","required":true},{"name":"id","description":"id of the resource to retrieve","required":false}]},"resources:doc":{"id":"resources:doc","description":"show the online documentation of the resource in the browser","pluginName":"@commercelayer/cli-plugin-resources","pluginType":"core","aliases":["res:doc","rdoc"],"examples":["$ commercelayer rdoc customers","$ cl res:doc cusatomers"],"flags":{},"args":[{"name":"resource","description":"the resource for wich you want to access the online documentation","required":true}]},"resources:filters":{"id":"resources:filters","description":"show a list of all available filter predicates","pluginName":"@commercelayer/cli-plugin-resources","pluginType":"core","aliases":["res:filters"],"examples":["$ commercelayer resources:filters","$ cl res:filters"],"flags":{},"args":[]},"resources:get":{"id":"resources:get","description":"retrieve a resource or list a set of resources","pluginName":"@commercelayer/cli-plugin-resources","pluginType":"core","aliases":["get","res:get"],"examples":["$ commercelayer resources:get customers","$ commercelayer res:get customers","$ clayer res:get customers/<customerId>","$ cl get customers <customerId>"],"flags":{"organization":{"name":"organization","type":"option","char":"o","description":"the slug of your organization","required":true},"domain":{"name":"domain","type":"option","char":"d","hidden":true,"required":false},"accessToken":{"name":"accessToken","type":"option","hidden":true,"required":true},"json":{"name":"json","type":"boolean","char":"j","description":"convert output in standard JSON format","allowNo":false},"unformatted":{"name":"unformatted","type":"boolean","char":"u","description":"print unformatted JSON output","allowNo":false},"raw":{"name":"raw","type":"boolean","char":"R","description":"print out the raw API response","hidden":false,"allowNo":false},"include":{"name":"include","type":"option","char":"i","description":"comma separated resources to include"},"fields":{"name":"fields","type":"option","char":"f","description":"comma separeted list of fields in the format [resource]=field1,field2..."},"where":{"name":"where","type":"option","char":"w","description":"comma separated list of query filters"},"page":{"name":"page","type":"option","char":"p","description":"page number"},"pageSize":{"name":"pageSize","type":"option","char":"n","description":"number of elements per page"},"sort":{"name":"sort","type":"option","char":"s","description":"defines results ordering"},"save":{"name":"save","type":"option","char":"x","description":"save command output to file"},"save-path":{"name":"save-path","type":"option","char":"X","description":"save command output to file and create missing path directories"}},"args":[{"name":"resource","description":"the resource type","required":true},{"name":"id","description":"id of the resource to retrieve","required":false}]},"resources":{"id":"resources","description":"list all the available Commerce Layer API resources","pluginName":"@commercelayer/cli-plugin-resources","pluginType":"core","aliases":[],"examples":["$ cl-resources resources","$ cl-res resources","$ commercelayer resources","$ cl resources"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false}},"args":[]},"resources:list":{"id":"resources:list","description":"fetch a collection of resources","pluginName":"@commercelayer/cli-plugin-resources","pluginType":"core","aliases":["list","rl","res:list"],"examples":["$ commercelayer resources:list customers -f id,email -i customer_group -s updated_at","$ cl res:list -i customer_group -f customer_groups/name -w customer_group_name_eq=\"GROUP NAME\"","$ cl list -p 5 -n 10 -s -created_at --raw"],"flags":{"organization":{"name":"organization","type":"option","char":"o","description":"the slug of your organization","required":true},"domain":{"name":"domain","type":"option","char":"d","hidden":true,"required":false},"accessToken":{"name":"accessToken","type":"option","hidden":true,"required":true},"json":{"name":"json","type":"boolean","char":"j","description":"convert output in standard JSON format","allowNo":false},"unformatted":{"name":"unformatted","type":"boolean","char":"u","description":"print unformatted JSON output","allowNo":false},"raw":{"name":"raw","type":"boolean","char":"R","description":"print out the raw API response","hidden":false,"allowNo":false},"include":{"name":"include","type":"option","char":"i","description":"comma separated resources to include"},"fields":{"name":"fields","type":"option","char":"f","description":"comma separeted list of fields in the format [resource]=field1,field2..."},"where":{"name":"where","type":"option","char":"w","description":"comma separated list of query filters"},"page":{"name":"page","type":"option","char":"p","description":"page number"},"pageSize":{"name":"pageSize","type":"option","char":"n","description":"number of elements per page"},"sort":{"name":"sort","type":"option","char":"s","description":"defines results ordering"},"save":{"name":"save","type":"option","char":"x","description":"save command output to file"},"save-path":{"name":"save-path","type":"option","char":"X","description":"save command output to file and create missing path directories"}},"args":[{"name":"resource","description":"the resource type","required":true}]},"resources:retrieve":{"id":"resources:retrieve","description":"fetch a single resource","pluginName":"@commercelayer/cli-plugin-resources","pluginType":"core","aliases":["retrieve","rr","res:retrieve"],"examples":["$ commercelayer resources:retrieve customers/<customerId>","$ commercelayer retrieve customers <customerId>","$ cl res:retrieve customers <customerId>","$ clayer rr customers/<customerId>"],"flags":{"organization":{"name":"organization","type":"option","char":"o","description":"the slug of your organization","required":true},"domain":{"name":"domain","type":"option","char":"d","hidden":true,"required":false},"accessToken":{"name":"accessToken","type":"option","hidden":true,"required":true},"json":{"name":"json","type":"boolean","char":"j","description":"convert output in standard JSON format","allowNo":false},"unformatted":{"name":"unformatted","type":"boolean","char":"u","description":"print unformatted JSON output","allowNo":false},"raw":{"name":"raw","type":"boolean","char":"R","description":"print out the raw API response","hidden":false,"allowNo":false},"include":{"name":"include","type":"option","char":"i","description":"comma separated resources to include"},"fields":{"name":"fields","type":"option","char":"f","description":"comma separeted list of fields in the format [resource]=field1,field2..."},"save":{"name":"save","type":"option","char":"x","description":"save command output to file"},"save-path":{"name":"save-path","type":"option","char":"X","description":"save command output to file and create missing path directories"}},"args":[{"name":"resource","description":"the resource type","required":true},{"name":"id","description":"id of the resource to retrieve","required":false}]},"resources:update":{"id":"resources:update","description":"update an existing resource","pluginName":"@commercelayer/cli-plugin-resources","pluginType":"core","aliases":["update","ru","res:update","patch"],"examples":["$ commercelayer resources:update customers/<customerId> -a reference=referenceId","$ commercelayer res:update customers <customerId> -a reference_origin=\"Ref Origin\"","$ cl update customers/<customerId> -m meta_key=\"meta value\"","$ cl ru customers <customerId> -M mete_keu=\"metadata overwrite","$ clayer update customers <customerId> -D /path/to/data/file/data.json"],"flags":{"organization":{"name":"organization","type":"option","char":"o","description":"the slug of your organization","required":true},"domain":{"name":"domain","type":"option","char":"d","hidden":true,"required":false},"accessToken":{"name":"accessToken","type":"option","hidden":true,"required":true},"json":{"name":"json","type":"boolean","char":"j","description":"convert output in standard JSON format","allowNo":false},"unformatted":{"name":"unformatted","type":"boolean","char":"u","description":"print unformatted JSON output","allowNo":false},"raw":{"name":"raw","type":"boolean","char":"R","description":"print out the raw API response","hidden":false,"allowNo":false},"attribute":{"name":"attribute","type":"option","char":"a","description":"define a resource attribute"},"object":{"name":"object","type":"option","char":"O","description":"define a resource object attribute"},"relationship":{"name":"relationship","type":"option","char":"r","description":"define a relationship with another resource"},"metadata":{"name":"metadata","type":"option","char":"m","description":"define a metadata attribute and merge it with the metadata already present in the remote resource"},"metadata-replace":{"name":"metadata-replace","type":"option","char":"M","description":"define a metadata attribute and replace every item already presente in the remote resource"},"data":{"name":"data","type":"option","char":"D","description":"the data file to use as request body"}},"args":[{"name":"resource","description":"the resource type","required":true},{"name":"id","description":"id of the resource to retrieve","required":false}]}}}
{"version":"2.1.0","commands":{"order:actions":{"id":"order:actions","description":"show a list of possible actions","pluginName":"@commercelayer/cli-plugin-resources","pluginType":"core","hidden":false,"aliases":[],"flags":{},"args":[]},"order:approve":{"id":"order:approve","description":"approve an order","pluginName":"@commercelayer/cli-plugin-resources","pluginType":"core","hidden":false,"aliases":[],"flags":{"organization":{"name":"organization","type":"option","char":"o","description":"the slug of your organization","required":true},"domain":{"name":"domain","type":"option","char":"d","hidden":true,"required":false},"accessToken":{"name":"accessToken","type":"option","hidden":true,"required":true},"json":{"name":"json","type":"boolean","char":"j","description":"convert output in standard JSON format","allowNo":false},"unformatted":{"name":"unformatted","type":"boolean","char":"u","description":"print unformatted JSON output","allowNo":false},"raw":{"name":"raw","type":"boolean","char":"R","description":"print out the raw API response","hidden":false,"allowNo":false}},"args":[{"name":"id","description":"the id of the order to approve","required":true}]},"order:capture":{"id":"order:capture","description":"capture an order","pluginName":"@commercelayer/cli-plugin-resources","pluginType":"core","hidden":false,"aliases":[],"flags":{"organization":{"name":"organization","type":"option","char":"o","description":"the slug of your organization","required":true},"domain":{"name":"domain","type":"option","char":"d","hidden":true,"required":false},"accessToken":{"name":"accessToken","type":"option","hidden":true,"required":true},"json":{"name":"json","type":"boolean","char":"j","description":"convert output in standard JSON format","allowNo":false},"unformatted":{"name":"unformatted","type":"boolean","char":"u","description":"print unformatted JSON output","allowNo":false},"raw":{"name":"raw","type":"boolean","char":"R","description":"print out the raw API response","hidden":false,"allowNo":false}},"args":[{"name":"id","description":"the id of the order to capture","required":true}]},"order":{"id":"order","description":"execute an action on the order (place, approve, capture ...","pluginName":"@commercelayer/cli-plugin-resources","pluginType":"core","hidden":false,"aliases":[],"flags":{"organization":{"name":"organization","type":"option","char":"o","description":"the slug of your organization","required":true},"domain":{"name":"domain","type":"option","char":"d","hidden":true,"required":false},"accessToken":{"name":"accessToken","type":"option","hidden":true,"required":true},"json":{"name":"json","type":"boolean","char":"j","description":"convert output in standard JSON format","allowNo":false},"unformatted":{"name":"unformatted","type":"boolean","char":"u","description":"print unformatted JSON output","allowNo":false},"raw":{"name":"raw","type":"boolean","char":"R","description":"print out the raw API response","hidden":false,"allowNo":false}},"args":[{"name":"action","description":"the action to execute on the order","required":true},{"name":"id","description":"the id of the order","required":false}]},"order:place":{"id":"order:place","description":"place an order","pluginName":"@commercelayer/cli-plugin-resources","pluginType":"core","hidden":false,"aliases":[],"flags":{"organization":{"name":"organization","type":"option","char":"o","description":"the slug of your organization","required":true},"domain":{"name":"domain","type":"option","char":"d","hidden":true,"required":false},"accessToken":{"name":"accessToken","type":"option","hidden":true,"required":true},"json":{"name":"json","type":"boolean","char":"j","description":"convert output in standard JSON format","allowNo":false},"unformatted":{"name":"unformatted","type":"boolean","char":"u","description":"print unformatted JSON output","allowNo":false},"raw":{"name":"raw","type":"boolean","char":"R","description":"print out the raw API response","hidden":false,"allowNo":false}},"args":[{"name":"id","description":"the id of the order to place","required":true}]},"resources:all":{"id":"resources:all","description":"fetch all resources","pluginName":"@commercelayer/cli-plugin-resources","pluginType":"core","hidden":true,"aliases":["all","ra","res:all"],"examples":["$ commercelayer resources:all customers -f id,email -i customer_group -s updated_at","$ cl res:all -i customer_group -f customer_groups/name -w customer_group_name_eq=\"GROUP NAME\"","$ cl all -s -created_at --json"],"flags":{"organization":{"name":"organization","type":"option","char":"o","description":"the slug of your organization","required":true},"domain":{"name":"domain","type":"option","char":"d","hidden":true,"required":false},"accessToken":{"name":"accessToken","type":"option","hidden":true,"required":true},"json":{"name":"json","type":"boolean","char":"j","description":"convert output in standard JSON format","allowNo":false},"unformatted":{"name":"unformatted","type":"boolean","char":"u","description":"print unformatted JSON output","allowNo":false},"raw":{"name":"raw","type":"boolean","char":"R","description":"print out the raw API response","hidden":false,"allowNo":false},"include":{"name":"include","type":"option","char":"i","description":"comma separated resources to include"},"fields":{"name":"fields","type":"option","char":"f","description":"comma separeted list of fields in the format [resource]=field1,field2..."},"where":{"name":"where","type":"option","char":"w","description":"comma separated list of query filters"},"sort":{"name":"sort","type":"option","char":"s","description":"defines results ordering"},"save":{"name":"save","type":"option","char":"x","description":"save command output to file"},"save-path":{"name":"save-path","type":"option","char":"X","description":"save command output to file and create missing path directories"},"notify":{"name":"notify","type":"boolean","char":"N","description":"force system notification when export has finished","hidden":true,"allowNo":false},"clientId":{"name":"clientId","type":"option","char":"i","description":"organization client_id","hidden":true,"required":false},"clientSecret":{"name":"clientSecret","type":"option","char":"s","description":"organization client_secret","hidden":true,"required":false},"csv":{"name":"csv","type":"boolean","char":"C","description":"export fields in csv format","allowNo":false},"header":{"name":"header","type":"option","char":"H","description":"comma-separated list of values field:\"renamed title\""}},"args":[{"name":"resource","description":"the resource type","required":true}]},"resources:create":{"id":"resources:create","description":"create a new resource","pluginName":"@commercelayer/cli-plugin-resources","pluginType":"core","aliases":["create","rc","res:create","post"],"examples":["$ commercelayer resources:create customers -a email=user@test.com","$ clayer res:create customers -a email=\"user@test-com\" -r customer_group=customer_groups/<customerGroupId>","$ cl create customers -a email=user@test.com -m meta_key=\"meta value\"","$ cl rc customers -D /path/to/data/file/data.json"],"flags":{"organization":{"name":"organization","type":"option","char":"o","description":"the slug of your organization","required":true},"domain":{"name":"domain","type":"option","char":"d","hidden":true,"required":false},"accessToken":{"name":"accessToken","type":"option","hidden":true,"required":true},"json":{"name":"json","type":"boolean","char":"j","description":"convert output in standard JSON format","allowNo":false},"unformatted":{"name":"unformatted","type":"boolean","char":"u","description":"print unformatted JSON output","allowNo":false},"raw":{"name":"raw","type":"boolean","char":"R","description":"print out the raw API response","hidden":false,"allowNo":false},"attribute":{"name":"attribute","type":"option","char":"a","description":"define a resource attribute"},"object":{"name":"object","type":"option","char":"O","description":"define a resource object attribute"},"relationship":{"name":"relationship","type":"option","char":"r","description":"define a relationship with another resource"},"metadata":{"name":"metadata","type":"option","char":"m","description":"define a metadata attribute or a set of metadata attributes"},"data":{"name":"data","type":"option","char":"D","description":"the data file to use as request body"}},"args":[{"name":"resource","description":"the resource type","required":true}]},"resources:delete":{"id":"resources:delete","description":"delete an existing resource","pluginName":"@commercelayer/cli-plugin-resources","pluginType":"core","aliases":["delete","rd","res:delete"],"examples":["$ commercelayer resources:delete customers/<customerId>","$ cl delete customers <customerId>"],"flags":{"organization":{"name":"organization","type":"option","char":"o","description":"the slug of your organization","required":true},"domain":{"name":"domain","type":"option","char":"d","hidden":true,"required":false},"accessToken":{"name":"accessToken","type":"option","hidden":true,"required":true},"json":{"name":"json","type":"boolean","char":"j","description":"convert output in standard JSON format","allowNo":false},"unformatted":{"name":"unformatted","type":"boolean","char":"u","description":"print unformatted JSON output","allowNo":false},"raw":{"name":"raw","type":"boolean","char":"R","description":"print out the raw API response","hidden":false,"allowNo":false}},"args":[{"name":"resource","description":"the resource type","required":true},{"name":"id","description":"id of the resource to retrieve","required":false}]},"resources:doc":{"id":"resources:doc","description":"show the online documentation of the resource in the browser","pluginName":"@commercelayer/cli-plugin-resources","pluginType":"core","aliases":["res:doc","rdoc"],"examples":["$ commercelayer rdoc customers","$ cl res:doc cusatomers"],"flags":{},"args":[{"name":"resource","description":"the resource for wich you want to access the online documentation","required":true}]},"resources:filters":{"id":"resources:filters","description":"show a list of all available filter predicates","pluginName":"@commercelayer/cli-plugin-resources","pluginType":"core","aliases":["res:filters"],"examples":["$ commercelayer resources:filters","$ cl res:filters"],"flags":{},"args":[]},"resources:get":{"id":"resources:get","description":"retrieve a resource or list a set of resources","pluginName":"@commercelayer/cli-plugin-resources","pluginType":"core","aliases":["get","res:get"],"examples":["$ commercelayer resources:get customers","$ commercelayer res:get customers","$ clayer res:get customers/<customerId>","$ cl get customers <customerId>"],"flags":{"organization":{"name":"organization","type":"option","char":"o","description":"the slug of your organization","required":true},"domain":{"name":"domain","type":"option","char":"d","hidden":true,"required":false},"accessToken":{"name":"accessToken","type":"option","hidden":true,"required":true},"json":{"name":"json","type":"boolean","char":"j","description":"convert output in standard JSON format","allowNo":false},"unformatted":{"name":"unformatted","type":"boolean","char":"u","description":"print unformatted JSON output","allowNo":false},"raw":{"name":"raw","type":"boolean","char":"R","description":"print out the raw API response","hidden":false,"allowNo":false},"include":{"name":"include","type":"option","char":"i","description":"comma separated resources to include"},"fields":{"name":"fields","type":"option","char":"f","description":"comma separeted list of fields in the format [resource]=field1,field2..."},"where":{"name":"where","type":"option","char":"w","description":"comma separated list of query filters"},"page":{"name":"page","type":"option","char":"p","description":"page number"},"pageSize":{"name":"pageSize","type":"option","char":"n","description":"number of elements per page"},"sort":{"name":"sort","type":"option","char":"s","description":"defines results ordering"},"save":{"name":"save","type":"option","char":"x","description":"save command output to file"},"save-path":{"name":"save-path","type":"option","char":"X","description":"save command output to file and create missing path directories"}},"args":[{"name":"resource","description":"the resource type","required":true},{"name":"id","description":"id of the resource to retrieve","required":false}]},"resources":{"id":"resources","description":"list all the available Commerce Layer API resources","pluginName":"@commercelayer/cli-plugin-resources","pluginType":"core","aliases":[],"examples":["$ cl-resources resources","$ cl-res resources","$ commercelayer resources","$ cl resources"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false}},"args":[]},"resources:list":{"id":"resources:list","description":"fetch a collection of resources","pluginName":"@commercelayer/cli-plugin-resources","pluginType":"core","aliases":["list","rl","res:list"],"examples":["$ commercelayer resources:list customers -f id,email -i customer_group -s updated_at","$ cl res:list -i customer_group -f customer_groups/name -w customer_group_name_eq=\"GROUP NAME\"","$ cl list -p 5 -n 10 -s -created_at --raw"],"flags":{"organization":{"name":"organization","type":"option","char":"o","description":"the slug of your organization","required":true},"domain":{"name":"domain","type":"option","char":"d","hidden":true,"required":false},"accessToken":{"name":"accessToken","type":"option","hidden":true,"required":true},"json":{"name":"json","type":"boolean","char":"j","description":"convert output in standard JSON format","allowNo":false},"unformatted":{"name":"unformatted","type":"boolean","char":"u","description":"print unformatted JSON output","allowNo":false},"raw":{"name":"raw","type":"boolean","char":"R","description":"print out the raw API response","hidden":false,"allowNo":false},"include":{"name":"include","type":"option","char":"i","description":"comma separated resources to include"},"fields":{"name":"fields","type":"option","char":"f","description":"comma separeted list of fields in the format [resource]=field1,field2..."},"where":{"name":"where","type":"option","char":"w","description":"comma separated list of query filters"},"page":{"name":"page","type":"option","char":"p","description":"page number"},"pageSize":{"name":"pageSize","type":"option","char":"n","description":"number of elements per page"},"sort":{"name":"sort","type":"option","char":"s","description":"defines results ordering"},"save":{"name":"save","type":"option","char":"x","description":"save command output to file"},"save-path":{"name":"save-path","type":"option","char":"X","description":"save command output to file and create missing path directories"}},"args":[{"name":"resource","description":"the resource type","required":true}]},"resources:retrieve":{"id":"resources:retrieve","description":"fetch a single resource","pluginName":"@commercelayer/cli-plugin-resources","pluginType":"core","aliases":["retrieve","rr","res:retrieve"],"examples":["$ commercelayer resources:retrieve customers/<customerId>","$ commercelayer retrieve customers <customerId>","$ cl res:retrieve customers <customerId>","$ clayer rr customers/<customerId>"],"flags":{"organization":{"name":"organization","type":"option","char":"o","description":"the slug of your organization","required":true},"domain":{"name":"domain","type":"option","char":"d","hidden":true,"required":false},"accessToken":{"name":"accessToken","type":"option","hidden":true,"required":true},"json":{"name":"json","type":"boolean","char":"j","description":"convert output in standard JSON format","allowNo":false},"unformatted":{"name":"unformatted","type":"boolean","char":"u","description":"print unformatted JSON output","allowNo":false},"raw":{"name":"raw","type":"boolean","char":"R","description":"print out the raw API response","hidden":false,"allowNo":false},"include":{"name":"include","type":"option","char":"i","description":"comma separated resources to include"},"fields":{"name":"fields","type":"option","char":"f","description":"comma separeted list of fields in the format [resource]=field1,field2..."},"save":{"name":"save","type":"option","char":"x","description":"save command output to file"},"save-path":{"name":"save-path","type":"option","char":"X","description":"save command output to file and create missing path directories"}},"args":[{"name":"resource","description":"the resource type","required":true},{"name":"id","description":"id of the resource to retrieve","required":false}]},"resources:update":{"id":"resources:update","description":"update an existing resource","pluginName":"@commercelayer/cli-plugin-resources","pluginType":"core","aliases":["update","ru","res:update","patch"],"examples":["$ commercelayer resources:update customers/<customerId> -a reference=referenceId","$ commercelayer res:update customers <customerId> -a reference_origin=\"Ref Origin\"","$ cl update customers/<customerId> -m meta_key=\"meta value\"","$ cl ru customers <customerId> -M mete_keu=\"metadata overwrite","$ clayer update customers <customerId> -D /path/to/data/file/data.json"],"flags":{"organization":{"name":"organization","type":"option","char":"o","description":"the slug of your organization","required":true},"domain":{"name":"domain","type":"option","char":"d","hidden":true,"required":false},"accessToken":{"name":"accessToken","type":"option","hidden":true,"required":true},"json":{"name":"json","type":"boolean","char":"j","description":"convert output in standard JSON format","allowNo":false},"unformatted":{"name":"unformatted","type":"boolean","char":"u","description":"print unformatted JSON output","allowNo":false},"raw":{"name":"raw","type":"boolean","char":"R","description":"print out the raw API response","hidden":false,"allowNo":false},"attribute":{"name":"attribute","type":"option","char":"a","description":"define a resource attribute"},"object":{"name":"object","type":"option","char":"O","description":"define a resource object attribute"},"relationship":{"name":"relationship","type":"option","char":"r","description":"define a relationship with another resource"},"metadata":{"name":"metadata","type":"option","char":"m","description":"define a metadata attribute and merge it with the metadata already present in the remote resource"},"metadata-replace":{"name":"metadata-replace","type":"option","char":"M","description":"define a metadata attribute and replace every item already presente in the remote resource"},"data":{"name":"data","type":"option","char":"D","description":"the data file to use as request body"}},"args":[{"name":"resource","description":"the resource type","required":true},{"name":"id","description":"id of the resource to retrieve","required":false}]}}}
{
"name": "@commercelayer/cli-plugin-resources",
"description": "Commerce Layer CLI Resources plugin",
"version": "2.0.3",
"version": "2.1.0",
"author": "Pierluigi Viti <pierluigi@commercelayer.io>",

@@ -68,7 +68,7 @@ "bin": {

"posttest": "eslint . --ext .ts --config .eslintrc",
"prepack": "rm -rf lib && tsc -b && oclif-dev manifest && oclif-dev readme",
"prepack": "npm run resources && rm -rf lib && tsc -b && oclif-dev manifest && oclif-dev readme",
"test": "nyc --extension .ts mocha --forbid-only \"test/**/*.test.ts\"",
"version": "oclif-dev readme && git add README.md",
"readme": "oclif-dev readme",
"resources": "ts-node src/util/resources.ts "
"resources": "ts-node src/util/resources/build.ts "
},

@@ -75,0 +75,0 @@ "types": "lib/index.d.ts",

@@ -68,3 +68,3 @@ @commercelayer/cli-plugin-resources

_See code: [src/commands/order/index.ts](https://github.com/commercelayer/commercelayer-cli-plugin-resources/blob/v2.0.3/src/commands/order/index.ts)_
_See code: [src/commands/order/index.ts](https://github.com/commercelayer/commercelayer-cli-plugin-resources/blob/v2.1.0/src/commands/order/index.ts)_

@@ -80,3 +80,3 @@ ### `cl-resources order:actions`

_See code: [src/commands/order/actions.ts](https://github.com/commercelayer/commercelayer-cli-plugin-resources/blob/v2.0.3/src/commands/order/actions.ts)_
_See code: [src/commands/order/actions.ts](https://github.com/commercelayer/commercelayer-cli-plugin-resources/blob/v2.1.0/src/commands/order/actions.ts)_

@@ -101,3 +101,3 @@ ### `cl-resources order:approve ID`

_See code: [src/commands/order/approve.ts](https://github.com/commercelayer/commercelayer-cli-plugin-resources/blob/v2.0.3/src/commands/order/approve.ts)_
_See code: [src/commands/order/approve.ts](https://github.com/commercelayer/commercelayer-cli-plugin-resources/blob/v2.1.0/src/commands/order/approve.ts)_

@@ -122,3 +122,3 @@ ### `cl-resources order:capture ID`

_See code: [src/commands/order/capture.ts](https://github.com/commercelayer/commercelayer-cli-plugin-resources/blob/v2.0.3/src/commands/order/capture.ts)_
_See code: [src/commands/order/capture.ts](https://github.com/commercelayer/commercelayer-cli-plugin-resources/blob/v2.1.0/src/commands/order/capture.ts)_

@@ -143,3 +143,3 @@ ### `cl-resources order:place ID`

_See code: [src/commands/order/place.ts](https://github.com/commercelayer/commercelayer-cli-plugin-resources/blob/v2.0.3/src/commands/order/place.ts)_
_See code: [src/commands/order/place.ts](https://github.com/commercelayer/commercelayer-cli-plugin-resources/blob/v2.1.0/src/commands/order/place.ts)_

@@ -164,3 +164,3 @@ ### `cl-resources resources`

_See code: [src/commands/resources/index.ts](https://github.com/commercelayer/commercelayer-cli-plugin-resources/blob/v2.0.3/src/commands/resources/index.ts)_
_See code: [src/commands/resources/index.ts](https://github.com/commercelayer/commercelayer-cli-plugin-resources/blob/v2.1.0/src/commands/resources/index.ts)_

@@ -202,3 +202,3 @@ ### `cl-resources resources:create RESOURCE`

_See code: [src/commands/resources/create.ts](https://github.com/commercelayer/commercelayer-cli-plugin-resources/blob/v2.0.3/src/commands/resources/create.ts)_
_See code: [src/commands/resources/create.ts](https://github.com/commercelayer/commercelayer-cli-plugin-resources/blob/v2.1.0/src/commands/resources/create.ts)_

@@ -233,3 +233,3 @@ ### `cl-resources resources:delete RESOURCE [ID]`

_See code: [src/commands/resources/delete.ts](https://github.com/commercelayer/commercelayer-cli-plugin-resources/blob/v2.0.3/src/commands/resources/delete.ts)_
_See code: [src/commands/resources/delete.ts](https://github.com/commercelayer/commercelayer-cli-plugin-resources/blob/v2.1.0/src/commands/resources/delete.ts)_

@@ -256,3 +256,3 @@ ### `cl-resources resources:doc RESOURCE`

_See code: [src/commands/resources/doc.ts](https://github.com/commercelayer/commercelayer-cli-plugin-resources/blob/v2.0.3/src/commands/resources/doc.ts)_
_See code: [src/commands/resources/doc.ts](https://github.com/commercelayer/commercelayer-cli-plugin-resources/blob/v2.1.0/src/commands/resources/doc.ts)_

@@ -275,3 +275,3 @@ ### `cl-resources resources:filters`

_See code: [src/commands/resources/filters.ts](https://github.com/commercelayer/commercelayer-cli-plugin-resources/blob/v2.0.3/src/commands/resources/filters.ts)_
_See code: [src/commands/resources/filters.ts](https://github.com/commercelayer/commercelayer-cli-plugin-resources/blob/v2.1.0/src/commands/resources/filters.ts)_

@@ -315,3 +315,3 @@ ### `cl-resources resources:get RESOURCE [ID]`

_See code: [src/commands/resources/get.ts](https://github.com/commercelayer/commercelayer-cli-plugin-resources/blob/v2.0.3/src/commands/resources/get.ts)_
_See code: [src/commands/resources/get.ts](https://github.com/commercelayer/commercelayer-cli-plugin-resources/blob/v2.1.0/src/commands/resources/get.ts)_

@@ -354,3 +354,3 @@ ### `cl-resources resources:list RESOURCE`

_See code: [src/commands/resources/list.ts](https://github.com/commercelayer/commercelayer-cli-plugin-resources/blob/v2.0.3/src/commands/resources/list.ts)_
_See code: [src/commands/resources/list.ts](https://github.com/commercelayer/commercelayer-cli-plugin-resources/blob/v2.1.0/src/commands/resources/list.ts)_

@@ -391,3 +391,3 @@ ### `cl-resources resources:retrieve RESOURCE [ID]`

_See code: [src/commands/resources/retrieve.ts](https://github.com/commercelayer/commercelayer-cli-plugin-resources/blob/v2.0.3/src/commands/resources/retrieve.ts)_
_See code: [src/commands/resources/retrieve.ts](https://github.com/commercelayer/commercelayer-cli-plugin-resources/blob/v2.1.0/src/commands/resources/retrieve.ts)_

@@ -443,3 +443,3 @@ ### `cl-resources resources:update RESOURCE [ID]`

_See code: [src/commands/resources/update.ts](https://github.com/commercelayer/commercelayer-cli-plugin-resources/blob/v2.0.3/src/commands/resources/update.ts)_
_See code: [src/commands/resources/update.ts](https://github.com/commercelayer/commercelayer-cli-plugin-resources/blob/v2.1.0/src/commands/resources/update.ts)_
<!-- commandsstop -->
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc