@commercelayer/cli-plugin-webhooks

Commerce Layer CLI Webhooks plugin

Usage no npm install needed!

<script type="module">
  import commercelayerCliPluginWebhooks from 'https://cdn.skypack.dev/@commercelayer/cli-plugin-webhooks';
</script>

README

cli-plugin-webhooks

Commerce Layer CLI Webhooks plugin

oclif Version Downloads/week License

Commands

commercelayer webhooks [ID]

List all the registered webhooks.

USAGE
  $ commercelayer webhooks [ID]

ARGUMENTS
  ID  unique id of the webhook

OPTIONS
  -H, --hide-empty                 hide empty attributes
  -c, --circuit=open|closed        show only webhooks with circuit in the declared state
  -e, --events                     show the last event callbacks associated to the webhook
  -o, --organization=organization  (required) the slug of your organization
  -t, --topic=topic                the event that triggered the webhook

See code: src/commands/webhooks/index.ts

commercelayer webhooks:create

Create a new webhook.

USAGE
  $ commercelayer webhooks:create

OPTIONS
  -i, --include=include            a comma separated list of related resources to be included
  -n, --name=name                  the webhook short name
  -o, --organization=organization  (required) the slug of your organization
  -t, --topic=topic                (required) the identifier of the event that will trigger the webhook
  -u, --url=url                    (required) the callback URL used to POST data

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

OPTIONS
  -o, --organization=organization  (required) the slug of your organization

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

ARGUMENTS
  ID  unique id of the webhook

OPTIONS
  -H, --hide-empty                 hide empty attributes
  -e, --events                     show the last event callbacks associated to the webhook
  -o, --organization=organization  (required) the slug of your organization

ALIASES
  $ commercelayer wh:details
  $ commercelayer webhook: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:event ID

Show the details of a firedf webhook event.

USAGE
  $ commercelayer webhooks:event ID

ARGUMENTS
  ID  unique id of the webhook event

OPTIONS
  -f, --format                     format the payload output
  -o, --organization=organization  (required) the slug of your organization
  -p, --payload                    show the event payload sent to the callback endpoint

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

ARGUMENTS
  ID  unique id of the webhook

OPTIONS
  -A, --all                        show all events instead of first 25 only
  -l, --limit=limit                limit number of events in output
  -o, --organization=organization  (required) the slug of your organization

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

OPTIONS
  -c, --circuit=open|closed        show only webhooks with circuit in the declared state
  -o, --organization=organization  (required) the slug of your organization
  -t, --topic=topic                the event that triggered the webhook

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

ARGUMENTS
  ID  unique id of the webhook

OPTIONS
  -o, --organization=organization  (required) the slug of your organization
  -t, --time=time                  [default: 120] waiting time for the first event

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

ARGUMENTS
  ID  unique id of the webhook event

OPTIONS
  -f, --format                     format the payload output
  -o, --organization=organization  (required) the slug of your organization

ALIASES
  $ commercelayer wh:payload

EXAMPLES
  $ commercelayer webhooks:payload <event-id>
  $ cl webhook: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

OPTIONS
  -o, --organization=organization  (required) the slug of your organization

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

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

ARGUMENTS
  ID  unique id of the webhook

OPTIONS
  -i, --include=include            a comma separated list of related resources to be included
  -n, --name=name                  the webhook short name
  -o, --organization=organization  (required) the slug of your organization
  -t, --topic=topic                the identifier of the event that will trigger the webhook
  -u, --url=url                    the callback URL used to POST data

ALIASES
  $ commercelayer wh:update

EXAMPLES
  $ commercelayer webhooks:update -t customers.create -u https://callback.url.io
  $ cl wh:update -i customer_group

See code: src/commands/webhooks/update.ts