@commercelayer/cli-plugin-webhooks
v4.2.1
Published
Commerce Layer CLI Webhooks plugin
Downloads
193
Readme
cli-plugin-webhooks
Commerce Layer CLI Webhooks plugin
Usage
commercelayer COMMAND
commercelayer [COMMAND] (--help | -h) for detailed information about plugin commands.
Commands
commercelayer webhooks [ID]
commercelayer webhooks:create
commercelayer webhooks:destroy ID
commercelayer webhooks:details ID
commercelayer webhooks:disable ID
commercelayer webhooks:enable ID
commercelayer webhooks:event ID
commercelayer webhooks:events ID
commercelayer webhooks:list
commercelayer webhooks:listen ID
commercelayer webhooks:payload ID
commercelayer webhooks:reset ID
commercelayer webhooks:topics
commercelayer webhooks:update ID
commercelayer webhooks [ID]
List all the registered webhooks or the details of a single webhook.
USAGE
$ commercelayer webhooks [ID] [-c open|closed] [-t <value>] [-H] [-e]
ARGUMENTS
ID unique id of the webhook to get a single webhook
FLAGS
-H, --hide-empty hide empty attributes
-c, --circuit=<option> show only webhooks with circuit in the declared state
<options: open|closed>
-e, --events show the last event callbacks associated to the webhook
-t, --topic=<value> the event that triggered the webhook
DESCRIPTION
list all the registered webhooks or the details of a single webhook
See code: src/commands/webhooks/index.ts
commercelayer webhooks:create
Create a new webhook.
USAGE
$ commercelayer webhooks:create -t <value> -u <value> [-i <value>...] [-n <value>]
FLAGS
-i, --include=<value>... a comma separated list of related resources to be included
-n, --name=<value> the webhook short name
-t, --topic=<value> (required) the identifier of the event that will trigger the webhook
-u, --url=<value> (required) the callback URL used to POST data
DESCRIPTION
create a new webhook
ALIASES
$ commercelayer wh:create
EXAMPLES
$ commercelayer webhooks:create -t customers.create -u https://callback.url.io
$ cl wh:create -t orders.place -u http://myurl.com
See code: src/commands/webhooks/create.ts
commercelayer webhooks:destroy ID
Destroy an existing webhook.
USAGE
$ commercelayer webhooks:destroy ID
ARGUMENTS
ID unique id of the webhook
DESCRIPTION
destroy an existing webhook
ALIASES
$ commercelayer webhooks:delete
$ commercelayer wh:delete
$ commercelayer wh:destroy
EXAMPLES
$ commercelayer webhooks:destroy <webhook-id>>
$ cl wh:destroy <webhook-id>>
See code: src/commands/webhooks/destroy.ts
commercelayer webhooks:details ID
Show the details of an existing webhook.
USAGE
$ commercelayer webhooks:details ID [-H] [-e]
ARGUMENTS
ID unique id of the webhook
FLAGS
-H, --hide-empty hide empty attributes
-e, --events show the last event callbacks associated to the webhook
DESCRIPTION
show the details of an existing webhook
ALIASES
$ commercelayer wh:details
EXAMPLES
$ commercelayer webhooks:details <webhook-id>
$ cl webhooks:details <webhook-id> -H
$ cl wh:details <webhook-id>
See code: src/commands/webhooks/details.ts
commercelayer webhooks:disable ID
Disable an enabled webhook.
USAGE
$ commercelayer webhooks:disable ID
ARGUMENTS
ID unique id of the webhook
DESCRIPTION
disable an enabled webhook
ALIASES
$ commercelayer wh:disable
EXAMPLES
$ commercelayer webhooks:disable <webhook-id>
$ cl wh:disable <webhook-id>
See code: src/commands/webhooks/disable.ts
commercelayer webhooks:enable ID
Enable a disabled webhook.
USAGE
$ commercelayer webhooks:enable ID
ARGUMENTS
ID unique id of the webhook
DESCRIPTION
enable a disabled webhook
ALIASES
$ commercelayer wh:enable
EXAMPLES
$ commercelayer webhooks:enable <webhook-id>
$ cl wh:enable <webhook-id>
See code: src/commands/webhooks/enable.ts
commercelayer webhooks:event ID
Show the details of a firedf webhook event.
USAGE
$ commercelayer webhooks:event ID [-f -p]
ARGUMENTS
ID unique id of the webhook
FLAGS
-f, --format format the payload output
-p, --payload show the event payload sent to the callback endpoint
DESCRIPTION
show the details of a firedf webhook event
ALIASES
$ commercelayer wh:event
EXAMPLES
$ commercelayer webhooks:event <event-id>
$ cl wh:event <event-id> -p
See code: src/commands/webhooks/event.ts
commercelayer webhooks:events ID
List all the events associated to the webhook.
USAGE
$ commercelayer webhooks:events ID [-A | -l <value>]
ARGUMENTS
ID unique id of the webhook
FLAGS
-A, --all show all events instead of first 25 only
-l, --limit=<value> limit number of events in output
DESCRIPTION
list all the events associated to the webhook
ALIASES
$ commercelayer wh:events
EXAMPLES
$ commercelayer webhooks:events <webhook-id>
$ cl wh:events <webhook-id>
See code: src/commands/webhooks/events.ts
commercelayer webhooks:list
List all the registered webhooks.
USAGE
$ commercelayer webhooks:list [-c open|closed] [-t <value>]
FLAGS
-c, --circuit=<option> show only webhooks with circuit in the declared state
<options: open|closed>
-t, --topic=<value> the event that triggered the webhook
DESCRIPTION
list all the registered webhooks
ALIASES
$ commercelayer wh:list
EXAMPLES
$ commercelayer webhooks
$ cl webhooks:list -c open
$ cl wh:list
See code: src/commands/webhooks/list.ts
commercelayer webhooks:listen ID
Listen a webhook for outgoing callbacks.
USAGE
$ commercelayer webhooks:listen ID [-t <value>]
ARGUMENTS
ID unique id of the webhook
FLAGS
-t, --time=<value> [default: 120] waiting time for the first event
DESCRIPTION
listen a webhook for outgoing callbacks
ALIASES
$ commercelayer wh:listen
EXAMPLES
$ commercelayer webhooks:listen <webhook-id>
$ cl wh:listen <webhook-id>
See code: src/commands/webhooks/listen.ts
commercelayer webhooks:payload ID
Show the payload associated to an event callback.
USAGE
$ commercelayer webhooks:payload ID [-f]
ARGUMENTS
ID unique id of the webhook
FLAGS
-f, --format format the payload output
DESCRIPTION
show the payload associated to an event callback
ALIASES
$ commercelayer wh:payload
EXAMPLES
$ commercelayer webhooks:payload <event-id>
$ cl wh:payload <event-id> -f
See code: src/commands/webhooks/payload.ts
commercelayer webhooks:reset ID
Reset the circuit breaker associated to the webhook.
USAGE
$ commercelayer webhooks:reset ID
ARGUMENTS
ID unique id of the webhook
DESCRIPTION
reset the circuit breaker associated to the webhook
ALIASES
$ commercelayer wh:reset
EXAMPLES
$ commercelayer webhooks:reset <webhook-id>
$ cl wh:reset <webhook-id>
See code: src/commands/webhooks/reset.ts
commercelayer webhooks:topics
Show online documentation for supported events.
USAGE
$ commercelayer webhooks:topics
DESCRIPTION
show online documentation for supported events
ALIASES
$ commercelayer wh:topics
EXAMPLES
$ commercelayer webhooks:topics
$ cl wh:topics
See code: src/commands/webhooks/topics.ts
commercelayer webhooks:update ID
Update an existing webhook.
USAGE
$ commercelayer webhooks:update ID [-t <value>] [-u <value>] [-i <value>...] [-n <value>]
ARGUMENTS
ID unique id of the webhook
FLAGS
-i, --include=<value>... a comma separated list of related resources to be included
-n, --name=<value> the webhook short name
-t, --topic=<value> the identifier of the event that will trigger the webhook
-u, --url=<value> the callback URL used to POST data
DESCRIPTION
update an existing webhook
ALIASES
$ commercelayer wh:update
EXAMPLES
$ commercelayer webhooks:update <webhook-id> -t customers.create -u https://callback.url.io
$ cl wh:update <webhook-id> -t orders.place -u http://myurl.com
See code: src/commands/webhooks/update.ts