Skip to content

Commit

Permalink
feat: update triggers
Browse files Browse the repository at this point in the history
  • Loading branch information
pviti committed Feb 13, 2024
1 parent 2627cc7 commit 2c6e6c1
Show file tree
Hide file tree
Showing 116 changed files with 1,168 additions and 793 deletions.
141 changes: 141 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,10 @@ $ commercelayer plugins:install triggers
* [`commercelayer shipping_method ID`](#commercelayer-shipping_method-id)
* [`commercelayer shipping_method:disable ID`](#commercelayer-shipping_methoddisable-id)
* [`commercelayer shipping_method:enable ID`](#commercelayer-shipping_methodenable-id)
* [`commercelayer stock_line_item ID`](#commercelayer-stock_line_item-id)
* [`commercelayer stock_line_item:decrement_stock ID`](#commercelayer-stock_line_itemdecrement_stock-id)
* [`commercelayer stock_line_item:release_stock ID`](#commercelayer-stock_line_itemrelease_stock-id)
* [`commercelayer stock_line_item:reserve_stock ID`](#commercelayer-stock_line_itemreserve_stock-id)
* [`commercelayer stock_reservation ID`](#commercelayer-stock_reservation-id)
* [`commercelayer stock_reservation:pending ID`](#commercelayer-stock_reservationpending-id)
* [`commercelayer stock_transfer ID`](#commercelayer-stock_transfer-id)
Expand All @@ -163,6 +167,8 @@ $ commercelayer plugins:install triggers
* [`commercelayer stripe_payment:refresh ID`](#commercelayer-stripe_paymentrefresh-id)
* [`commercelayer stripe_payment:update ID`](#commercelayer-stripe_paymentupdate-id)
* [`commercelayer webhook ID`](#commercelayer-webhook-id)
* [`commercelayer webhook:disable ID`](#commercelayer-webhookdisable-id)
* [`commercelayer webhook:enable ID`](#commercelayer-webhookenable-id)
* [`commercelayer webhook:reset_circuit ID`](#commercelayer-webhookreset_circuit-id)

### `commercelayer adyen_payment ID`
Expand Down Expand Up @@ -2826,6 +2832,97 @@ DESCRIPTION

_See code: [src/commands/shipping_method/enable.ts](https://github.com/commercelayer/commercelayer-cli-plugin-triggers/blob/main/src/commands/shipping_method/enable.ts)_

### `commercelayer stock_line_item ID`

Execute an action on a resource of type stock_line_items.

```sh-session
USAGE
$ commercelayer stock_line_item ID [-u [-j -p]]

ARGUMENTS
ID the unique id of the resource

FLAGS
-j, --json print result in JSON format
-p, --print print out the modified resource
-u, --unformatted print JSON output without indentation

DESCRIPTION
execute an action on a resource of type stock_line_items
```

_See code: [src/commands/stock_line_item/index.ts](https://github.com/commercelayer/commercelayer-cli-plugin-triggers/blob/main/src/commands/stock_line_item/index.ts)_

### `commercelayer stock_line_item:decrement_stock ID`

Send this attribute if you want to automatically decrement and release the stock this stock line item. Can be done only when fulfillment is in progress.

```sh-session
USAGE
$ commercelayer stock_line_item:decrement_stock ID [-u [-j -p]]

ARGUMENTS
ID the unique id of the resource

FLAGS
-j, --json print result in JSON format
-p, --print print out the modified resource
-u, --unformatted print JSON output without indentation

DESCRIPTION
Send this attribute if you want to automatically decrement and release the stock this stock line item. Can be done
only when fulfillment is in progress.
```

_See code: [src/commands/stock_line_item/decrement_stock.ts](https://github.com/commercelayer/commercelayer-cli-plugin-triggers/blob/main/src/commands/stock_line_item/decrement_stock.ts)_

### `commercelayer stock_line_item:release_stock ID`

Send this attribute if you want to automatically release the stock for this stock line item. Can be done only when fulfillment is in progress.

```sh-session
USAGE
$ commercelayer stock_line_item:release_stock ID [-u [-j -p]]

ARGUMENTS
ID the unique id of the resource

FLAGS
-j, --json print result in JSON format
-p, --print print out the modified resource
-u, --unformatted print JSON output without indentation

DESCRIPTION
Send this attribute if you want to automatically release the stock for this stock line item. Can be done only when
fulfillment is in progress.
```

_See code: [src/commands/stock_line_item/release_stock.ts](https://github.com/commercelayer/commercelayer-cli-plugin-triggers/blob/main/src/commands/stock_line_item/release_stock.ts)_

### `commercelayer stock_line_item:reserve_stock ID`

Send this attribute if you want to automatically reserve the stock for this stock line item. Can be done only when fulfillment is in progress.

```sh-session
USAGE
$ commercelayer stock_line_item:reserve_stock ID [-u [-j -p]]

ARGUMENTS
ID the unique id of the resource

FLAGS
-j, --json print result in JSON format
-p, --print print out the modified resource
-u, --unformatted print JSON output without indentation

DESCRIPTION
Send this attribute if you want to automatically reserve the stock for this stock line item. Can be done only when
fulfillment is in progress.
```

_See code: [src/commands/stock_line_item/reserve_stock.ts](https://github.com/commercelayer/commercelayer-cli-plugin-triggers/blob/main/src/commands/stock_line_item/reserve_stock.ts)_

### `commercelayer stock_reservation ID`

Execute an action on a resource of type stock_reservations.
Expand Down Expand Up @@ -3112,6 +3209,50 @@ DESCRIPTION

_See code: [src/commands/webhook/index.ts](https://github.com/commercelayer/commercelayer-cli-plugin-triggers/blob/main/src/commands/webhook/index.ts)_

### `commercelayer webhook:disable ID`

Send this attribute if you want to mark the webhook as disabled.

```sh-session
USAGE
$ commercelayer webhook:disable ID [-u [-j -p]]

ARGUMENTS
ID the unique id of the resource

FLAGS
-j, --json print result in JSON format
-p, --print print out the modified resource
-u, --unformatted print JSON output without indentation

DESCRIPTION
Send this attribute if you want to mark the webhook as disabled.
```

_See code: [src/commands/webhook/disable.ts](https://github.com/commercelayer/commercelayer-cli-plugin-triggers/blob/main/src/commands/webhook/disable.ts)_

### `commercelayer webhook:enable ID`

Send this attribute if you want to mark the webhook as enabled.

```sh-session
USAGE
$ commercelayer webhook:enable ID [-u [-j -p]]

ARGUMENTS
ID the unique id of the resource

FLAGS
-j, --json print result in JSON format
-p, --print print out the modified resource
-u, --unformatted print JSON output without indentation

DESCRIPTION
Send this attribute if you want to mark the webhook as enabled.
```

_See code: [src/commands/webhook/enable.ts](https://github.com/commercelayer/commercelayer-cli-plugin-triggers/blob/main/src/commands/webhook/enable.ts)_

### `commercelayer webhook:reset_circuit ID`

Send this attribute if you want to reset the circuit breaker associated to this webhook to 'closed' state and zero failures count.
Expand Down
14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,30 +56,30 @@
"devDependencies": {
"@commercelayer/cli-dev": "beta",
"@commercelayer/eslint-config-ts": "^1.3.0",
"@oclif/plugin-help": "^6",
"@oclif/test": "^3",
"@oclif/plugin-help": "^6.0.12",
"@oclif/test": "^3.1.16",
"@semantic-release/changelog": "^6.0.3",
"@semantic-release/git": "^10.0.1",
"@types/chai": "^4.3.11",
"@types/inquirer": "^8.2.10",
"@types/lodash": "^4.14.202",
"@types/mocha": "^10.0.6",
"@types/node": "^20.11.5",
"@types/node": "^20.11.17",
"chai": "^4.4.1",
"eslint": "^8.56.0",
"inflector-js": "^1.0.1",
"lodash": "^4.17.21",
"mocha": "^10.2.0",
"mocha": "^10.3.0",
"nyc": "^15.1.0",
"oclif": "^4.3.9",
"oclif": "^4.4.11",
"semantic-release": "^22.0.12",
"ts-node": "^10.9.2",
"typescript": "5.3.2"
},
"dependencies": {
"@commercelayer/cli-core": "beta",
"@commercelayer/sdk": "^5.29.0",
"@oclif/core": "^3",
"@commercelayer/sdk": "^5.31.1",
"@oclif/core": "^3.19.1",
"inquirer": "^8.2.6",
"tslib": "^2.6.2"
},
Expand Down
Loading

0 comments on commit 2c6e6c1

Please sign in to comment.