@commercelayer/cli-plugin-triggers 1.1.3 → 2.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +379 -115
- package/bin/dev +18 -0
- package/bin/dev.cmd +3 -0
- package/bin/run +3 -3
- package/lib/base.d.ts +4 -2
- package/lib/base.js +19 -5
- package/lib/commands/adyen_payment/details.d.ts +3 -0
- package/lib/commands/adyen_payment/details.js +2 -0
- package/lib/commands/adyen_payment/index.d.ts +3 -0
- package/lib/commands/authorization/capture.d.ts +3 -0
- package/lib/commands/authorization/capture.js +2 -0
- package/lib/commands/authorization/capture_amount_cents.d.ts +3 -0
- package/lib/commands/authorization/capture_amount_cents.js +2 -0
- package/lib/commands/authorization/index.d.ts +3 -0
- package/lib/commands/authorization/void.d.ts +3 -0
- package/lib/commands/authorization/void.js +2 -0
- package/lib/commands/bundle/compute_compare_at_amount.d.ts +3 -0
- package/lib/commands/bundle/compute_compare_at_amount.js +2 -0
- package/lib/commands/bundle/compute_price_amount.d.ts +18 -0
- package/lib/commands/bundle/compute_price_amount.js +23 -0
- package/lib/commands/bundle/index.d.ts +3 -0
- package/lib/commands/capture/index.d.ts +3 -0
- package/lib/commands/capture/refund.d.ts +3 -0
- package/lib/commands/capture/refund.js +2 -0
- package/lib/commands/capture/refund_amount_cents.d.ts +3 -0
- package/lib/commands/capture/refund_amount_cents.js +2 -0
- package/lib/commands/checkout_com_payment/details.d.ts +3 -0
- package/lib/commands/checkout_com_payment/details.js +2 -0
- package/lib/commands/checkout_com_payment/index.d.ts +3 -0
- package/lib/commands/checkout_com_payment/refresh.d.ts +3 -0
- package/lib/commands/checkout_com_payment/refresh.js +2 -0
- package/lib/commands/customer_password_reset/index.d.ts +3 -0
- package/lib/commands/customer_password_reset/reset_password_token.d.ts +3 -0
- package/lib/commands/customer_password_reset/reset_password_token.js +2 -0
- package/lib/commands/gift_card/activate.d.ts +3 -0
- package/lib/commands/gift_card/activate.js +2 -0
- package/lib/commands/gift_card/balance_change_cents.d.ts +3 -0
- package/lib/commands/gift_card/balance_change_cents.js +2 -0
- package/lib/commands/gift_card/deactivate.d.ts +3 -0
- package/lib/commands/gift_card/deactivate.js +2 -0
- package/lib/commands/gift_card/index.d.ts +3 -0
- package/lib/commands/gift_card/purchase.d.ts +3 -0
- package/lib/commands/gift_card/purchase.js +2 -0
- package/lib/commands/in_stock_subscription/activate.d.ts +3 -0
- package/lib/commands/in_stock_subscription/activate.js +2 -0
- package/lib/commands/in_stock_subscription/deactivate.d.ts +3 -0
- package/lib/commands/in_stock_subscription/deactivate.js +2 -0
- package/lib/commands/in_stock_subscription/index.d.ts +3 -0
- package/lib/commands/{adyen_payment/authorize.d.ts → klarna_payment/index.d.ts} +4 -1
- package/lib/commands/klarna_payment/index.js +40 -0
- package/lib/commands/{checkout_com_payment/authorize.d.ts → klarna_payment/update.d.ts} +4 -1
- package/lib/commands/klarna_payment/update.js +23 -0
- package/lib/commands/order/approve.d.ts +3 -0
- package/lib/commands/order/approve.js +2 -0
- package/lib/commands/order/approve_and_capture.d.ts +3 -0
- package/lib/commands/order/approve_and_capture.js +2 -0
- package/lib/commands/order/archive.d.ts +3 -0
- package/lib/commands/order/archive.js +2 -0
- package/lib/commands/order/authorization_amount_cents.d.ts +3 -0
- package/lib/commands/order/authorization_amount_cents.js +2 -0
- package/lib/commands/order/authorize.d.ts +3 -0
- package/lib/commands/order/authorize.js +2 -0
- package/lib/commands/order/billing_address_clone_id.d.ts +3 -0
- package/lib/commands/order/billing_address_clone_id.js +2 -0
- package/lib/commands/order/billing_address_same_as_shipping.d.ts +3 -0
- package/lib/commands/order/billing_address_same_as_shipping.js +2 -0
- package/lib/commands/order/cancel.d.ts +3 -0
- package/lib/commands/order/cancel.js +2 -0
- package/lib/commands/order/capture.d.ts +3 -0
- package/lib/commands/order/capture.js +2 -0
- package/lib/commands/order/customer_payment_source_id.d.ts +3 -0
- package/lib/commands/order/customer_payment_source_id.js +2 -0
- package/lib/commands/order/index.d.ts +3 -0
- package/lib/commands/order/place.d.ts +3 -0
- package/lib/commands/order/place.js +2 -0
- package/lib/commands/order/refresh.d.ts +3 -0
- package/lib/commands/order/refresh.js +2 -0
- package/lib/commands/order/refund.d.ts +3 -0
- package/lib/commands/order/refund.js +2 -0
- package/lib/commands/order/save_billing_address_to_customer_address_book.d.ts +3 -0
- package/lib/commands/order/save_billing_address_to_customer_address_book.js +2 -0
- package/lib/commands/order/save_payment_source_to_customer_wallet.d.ts +3 -0
- package/lib/commands/order/save_payment_source_to_customer_wallet.js +2 -0
- package/lib/commands/order/save_shipping_address_to_customer_address_book.d.ts +3 -0
- package/lib/commands/order/save_shipping_address_to_customer_address_book.js +2 -0
- package/lib/commands/order/shipping_address_clone_id.d.ts +3 -0
- package/lib/commands/order/shipping_address_clone_id.js +2 -0
- package/lib/commands/order/shipping_address_same_as_billing.d.ts +3 -0
- package/lib/commands/order/shipping_address_same_as_billing.js +2 -0
- package/lib/commands/order/unarchive.d.ts +3 -0
- package/lib/commands/order/unarchive.js +2 -0
- package/lib/commands/order/update_taxes.d.ts +3 -0
- package/lib/commands/order/update_taxes.js +2 -0
- package/lib/commands/order_subscription/activate.d.ts +3 -0
- package/lib/commands/order_subscription/activate.js +2 -0
- package/lib/commands/order_subscription/cancel.d.ts +3 -0
- package/lib/commands/order_subscription/cancel.js +2 -0
- package/lib/commands/order_subscription/deactivate.d.ts +3 -0
- package/lib/commands/order_subscription/deactivate.js +2 -0
- package/lib/commands/order_subscription/index.d.ts +3 -0
- package/lib/commands/return/approve.d.ts +3 -0
- package/lib/commands/return/approve.js +2 -0
- package/lib/commands/return/archive.d.ts +3 -0
- package/lib/commands/return/archive.js +2 -0
- package/lib/commands/return/cancel.d.ts +3 -0
- package/lib/commands/return/cancel.js +2 -0
- package/lib/commands/return/index.d.ts +3 -0
- package/lib/commands/return/receive.d.ts +3 -0
- package/lib/commands/return/receive.js +2 -0
- package/lib/commands/return/reject.d.ts +3 -0
- package/lib/commands/return/reject.js +2 -0
- package/lib/commands/return/request.d.ts +3 -0
- package/lib/commands/return/request.js +2 -0
- package/lib/commands/return/restock.d.ts +3 -0
- package/lib/commands/return/restock.js +2 -0
- package/lib/commands/return/ship.d.ts +3 -0
- package/lib/commands/return/ship.js +2 -0
- package/lib/commands/return/unarchive.d.ts +3 -0
- package/lib/commands/return/unarchive.js +2 -0
- package/lib/commands/return_line_item/index.d.ts +3 -0
- package/lib/commands/return_line_item/restock.d.ts +3 -0
- package/lib/commands/return_line_item/restock.js +2 -0
- package/lib/commands/shipment/get_rates.d.ts +3 -0
- package/lib/commands/shipment/get_rates.js +2 -0
- package/lib/commands/shipment/index.d.ts +3 -0
- package/lib/commands/shipment/on_hold.d.ts +3 -0
- package/lib/commands/shipment/on_hold.js +2 -0
- package/lib/commands/shipment/packing.d.ts +3 -0
- package/lib/commands/shipment/packing.js +2 -0
- package/lib/commands/shipment/picking.d.ts +3 -0
- package/lib/commands/shipment/picking.js +2 -0
- package/lib/commands/shipment/purchase.d.ts +3 -0
- package/lib/commands/shipment/purchase.js +2 -0
- package/lib/commands/shipment/ready_to_ship.d.ts +3 -0
- package/lib/commands/shipment/ready_to_ship.js +2 -0
- package/lib/commands/shipment/ship.d.ts +3 -0
- package/lib/commands/shipment/ship.js +2 -0
- package/lib/commands/stock_transfer/cancel.d.ts +3 -0
- package/lib/commands/stock_transfer/cancel.js +2 -0
- package/lib/commands/stock_transfer/complete.d.ts +3 -0
- package/lib/commands/stock_transfer/complete.js +2 -0
- package/lib/commands/stock_transfer/in_transit.d.ts +3 -0
- package/lib/commands/stock_transfer/in_transit.js +2 -0
- package/lib/commands/stock_transfer/index.d.ts +3 -0
- package/lib/commands/stock_transfer/picking.d.ts +3 -0
- package/lib/commands/stock_transfer/picking.js +2 -0
- package/lib/commands/stock_transfer/upcoming.d.ts +3 -0
- package/lib/commands/stock_transfer/upcoming.js +2 -0
- package/lib/commands/stripe_payment/index.d.ts +3 -0
- package/lib/commands/stripe_payment/refresh.d.ts +3 -0
- package/lib/commands/stripe_payment/refresh.js +2 -0
- package/lib/commands/webhook/index.d.ts +3 -0
- package/lib/commands/webhook/reset_circuit.d.ts +3 -0
- package/lib/commands/webhook/reset_circuit.js +2 -0
- package/lib/triggers/adyen_payments.d.ts +1 -1
- package/lib/triggers/adyen_payments.js +0 -5
- package/lib/triggers/bundles.d.ts +1 -1
- package/lib/triggers/bundles.js +5 -0
- package/lib/triggers/checkout_com_payments.d.ts +1 -1
- package/lib/triggers/checkout_com_payments.js +0 -5
- package/lib/triggers/klarna_payments.d.ts +5 -0
- package/lib/triggers/klarna_payments.js +10 -0
- package/oclif.manifest.json +1 -1
- package/package.json +15 -16
- package/lib/commands/adyen_payment/authorize.js +0 -21
- package/lib/commands/checkout_com_payment/authorize.js +0 -21
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@commercelayer/cli-plugin-triggers",
|
|
3
3
|
"description": "Commerce Layer CLI Triggers plugin",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "2.0.1",
|
|
5
5
|
"author": "Pierluigi Viti <pierluigi@commercelayer.io>",
|
|
6
6
|
"bin": {
|
|
7
7
|
"cl-triggers": "./bin/run"
|
|
@@ -9,25 +9,21 @@
|
|
|
9
9
|
"bugs": "https://github.com/commercelayer/commercelayer-cli-plugin-triggers/issues",
|
|
10
10
|
"devDependencies": {
|
|
11
11
|
"@oclif/dev-cli": "git+https://github.com/pviti/dev-cli.git",
|
|
12
|
-
"@oclif/
|
|
13
|
-
"@oclif/test": "^1.2.8",
|
|
12
|
+
"@oclif/test": "^2.0.3",
|
|
14
13
|
"@types/chai": "^4.2.22",
|
|
15
14
|
"@types/inquirer": "^8.1.3",
|
|
15
|
+
"@types/lodash": "^4.14.178",
|
|
16
16
|
"@types/mocha": "^5.2.7",
|
|
17
|
-
"@types/node": "^
|
|
17
|
+
"@types/node": "^16.11.0",
|
|
18
|
+
"axios": "^0.25.0",
|
|
18
19
|
"chai": "^4.3.4",
|
|
19
20
|
"eslint": "^5.16.0",
|
|
20
21
|
"eslint-config-oclif": "^3.1.0",
|
|
21
22
|
"eslint-config-oclif-typescript": "^0.2.0",
|
|
22
23
|
"@typescript-eslint/eslint-plugin": "^2.6.1",
|
|
23
24
|
"@typescript-eslint/parser": "^2.6.1",
|
|
24
|
-
"eslint-config-xo-space": "^0.20.0",
|
|
25
|
-
"eslint-plugin-mocha": "^5.2.0",
|
|
26
|
-
"eslint-plugin-node": "^7.0.1",
|
|
27
|
-
"eslint-plugin-unicorn": "^6.0.1",
|
|
28
25
|
"globby": "^10.0.2",
|
|
29
26
|
"inflector-js": "^1.0.1",
|
|
30
|
-
"jsonapi-typescript": "^0.1.3",
|
|
31
27
|
"lodash": "^4.17.21",
|
|
32
28
|
"mocha": "^5.2.0",
|
|
33
29
|
"nyc": "^14.1.1",
|
|
@@ -35,7 +31,7 @@
|
|
|
35
31
|
"typescript": "^4.4.4"
|
|
36
32
|
},
|
|
37
33
|
"engines": {
|
|
38
|
-
"node": ">=
|
|
34
|
+
"node": ">=12.20"
|
|
39
35
|
},
|
|
40
36
|
"files": [
|
|
41
37
|
"/bin",
|
|
@@ -65,24 +61,27 @@
|
|
|
65
61
|
"hidden": true
|
|
66
62
|
}
|
|
67
63
|
},
|
|
68
|
-
"repositoryPrefix": "<%- repo %>/blob/main/<%- commandPath %>"
|
|
64
|
+
"repositoryPrefix": "<%- repo %>/blob/main/<%- commandPath %>",
|
|
65
|
+
"additionalHelpFlags": [
|
|
66
|
+
"-h"
|
|
67
|
+
],
|
|
68
|
+
"topicSeparator": " "
|
|
69
69
|
},
|
|
70
70
|
"repository": "commercelayer/commercelayer-cli-plugin-triggers",
|
|
71
71
|
"scripts": {
|
|
72
72
|
"postpack": "rm -f oclif.manifest.json",
|
|
73
73
|
"posttest": "eslint . --ext .ts --config .eslintrc",
|
|
74
|
-
"prepack": "rm -rf lib && tsc -b && oclif-dev manifest && npm run readme",
|
|
74
|
+
"prepack": "ts-node gen/generator.ts && rm -rf lib && tsc -b && oclif-dev manifest && npm run readme",
|
|
75
75
|
"test": "nyc --extension .ts mocha --forbid-only \"test/**/*.test.ts\"",
|
|
76
76
|
"readme": "oclif-dev readme --plugin --bin=commercelayer && git add README.md",
|
|
77
77
|
"generate": "ts-node gen/generator.ts"
|
|
78
78
|
},
|
|
79
79
|
"types": "lib/index.d.ts",
|
|
80
80
|
"dependencies": {
|
|
81
|
-
"@commercelayer/cli-core": "^0.
|
|
81
|
+
"@commercelayer/cli-core": "^1.0.0",
|
|
82
82
|
"@commercelayer/js-auth": "^2.2.4",
|
|
83
|
-
"@commercelayer/sdk": "
|
|
84
|
-
"@oclif/
|
|
85
|
-
"@oclif/config": "^1.17.1",
|
|
83
|
+
"@commercelayer/sdk": "4.3.0-beta.6",
|
|
84
|
+
"@oclif/core": "^1.1.2",
|
|
86
85
|
"chalk": "^4.1.2",
|
|
87
86
|
"cli-ux": "^5.6.3",
|
|
88
87
|
"inquirer": "^8.2.0",
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const tslib_1 = require("tslib");
|
|
4
|
-
const base_1 = (0, tslib_1.__importDefault)(require("../../base"));
|
|
5
|
-
const exec_1 = (0, tslib_1.__importDefault)(require("../../exec"));
|
|
6
|
-
const adyen_payments_1 = require("../../triggers/adyen_payments");
|
|
7
|
-
const TRIGGER = 'authorize';
|
|
8
|
-
class AdyenPaymentAuthorize extends base_1.default {
|
|
9
|
-
async run() {
|
|
10
|
-
const { args, flags } = this.parse(AdyenPaymentAuthorize);
|
|
11
|
-
const res = await (0, exec_1.default)('adyen_payments', args.id, TRIGGER, flags);
|
|
12
|
-
this.successMessage('adyen_payment', TRIGGER, res.id);
|
|
13
|
-
return res;
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
exports.default = AdyenPaymentAuthorize;
|
|
17
|
-
AdyenPaymentAuthorize.description = adyen_payments_1.triggers[TRIGGER].description;
|
|
18
|
-
AdyenPaymentAuthorize.flags = Object.assign({}, base_1.default.flags);
|
|
19
|
-
AdyenPaymentAuthorize.args = [
|
|
20
|
-
...base_1.default.args,
|
|
21
|
-
];
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const tslib_1 = require("tslib");
|
|
4
|
-
const base_1 = (0, tslib_1.__importDefault)(require("../../base"));
|
|
5
|
-
const exec_1 = (0, tslib_1.__importDefault)(require("../../exec"));
|
|
6
|
-
const checkout_com_payments_1 = require("../../triggers/checkout_com_payments");
|
|
7
|
-
const TRIGGER = 'authorize';
|
|
8
|
-
class CheckoutComPaymentAuthorize extends base_1.default {
|
|
9
|
-
async run() {
|
|
10
|
-
const { args, flags } = this.parse(CheckoutComPaymentAuthorize);
|
|
11
|
-
const res = await (0, exec_1.default)('checkout_com_payments', args.id, TRIGGER, flags);
|
|
12
|
-
this.successMessage('checkout_com_payment', TRIGGER, res.id);
|
|
13
|
-
return res;
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
exports.default = CheckoutComPaymentAuthorize;
|
|
17
|
-
CheckoutComPaymentAuthorize.description = checkout_com_payments_1.triggers[TRIGGER].description;
|
|
18
|
-
CheckoutComPaymentAuthorize.flags = Object.assign({}, base_1.default.flags);
|
|
19
|
-
CheckoutComPaymentAuthorize.args = [
|
|
20
|
-
...base_1.default.args,
|
|
21
|
-
];
|