n8n-nodes-chariow 0.1.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/LICENSE.md +21 -0
- package/README.md +236 -0
- package/dist/credentials/ChariowApi.credentials.d.ts +13 -0
- package/dist/credentials/ChariowApi.credentials.js +45 -0
- package/dist/credentials/ChariowApi.credentials.js.map +1 -0
- package/dist/examples/n8n-nodes-starter/icons/github.dark.svg +3 -0
- package/dist/examples/n8n-nodes-starter/icons/github.svg +3 -0
- package/dist/examples/n8n-nodes-starter/nodes/Example/example.dark.svg +13 -0
- package/dist/examples/n8n-nodes-starter/nodes/Example/example.svg +13 -0
- package/dist/icons/chariow.svg +27 -0
- package/dist/nodes/Chariow/Chariow.node.d.ts +5 -0
- package/dist/nodes/Chariow/Chariow.node.js +147 -0
- package/dist/nodes/Chariow/Chariow.node.js.map +1 -0
- package/dist/nodes/Chariow/Chariow.node.json +18 -0
- package/dist/nodes/Chariow/ChariowTrigger.node.d.ts +12 -0
- package/dist/nodes/Chariow/ChariowTrigger.node.js +191 -0
- package/dist/nodes/Chariow/ChariowTrigger.node.js.map +1 -0
- package/dist/nodes/Chariow/ChariowTrigger.node.json +18 -0
- package/dist/nodes/Chariow/resources/checkout/create.d.ts +3 -0
- package/dist/nodes/Chariow/resources/checkout/create.js +137 -0
- package/dist/nodes/Chariow/resources/checkout/create.js.map +1 -0
- package/dist/nodes/Chariow/resources/checkout/index.d.ts +5 -0
- package/dist/nodes/Chariow/resources/checkout/index.js +62 -0
- package/dist/nodes/Chariow/resources/checkout/index.js.map +1 -0
- package/dist/nodes/Chariow/resources/customer/get.d.ts +3 -0
- package/dist/nodes/Chariow/resources/customer/get.js +27 -0
- package/dist/nodes/Chariow/resources/customer/get.js.map +1 -0
- package/dist/nodes/Chariow/resources/customer/getAll.d.ts +3 -0
- package/dist/nodes/Chariow/resources/customer/getAll.js +80 -0
- package/dist/nodes/Chariow/resources/customer/getAll.js.map +1 -0
- package/dist/nodes/Chariow/resources/customer/index.d.ts +6 -0
- package/dist/nodes/Chariow/resources/customer/index.js +70 -0
- package/dist/nodes/Chariow/resources/customer/index.js.map +1 -0
- package/dist/nodes/Chariow/resources/discount/get.d.ts +3 -0
- package/dist/nodes/Chariow/resources/discount/get.js +27 -0
- package/dist/nodes/Chariow/resources/discount/get.js.map +1 -0
- package/dist/nodes/Chariow/resources/discount/getAll.d.ts +3 -0
- package/dist/nodes/Chariow/resources/discount/getAll.js +85 -0
- package/dist/nodes/Chariow/resources/discount/getAll.js.map +1 -0
- package/dist/nodes/Chariow/resources/discount/index.d.ts +6 -0
- package/dist/nodes/Chariow/resources/discount/index.js +70 -0
- package/dist/nodes/Chariow/resources/discount/index.js.map +1 -0
- package/dist/nodes/Chariow/resources/index.d.ts +8 -0
- package/dist/nodes/Chariow/resources/index.js +51 -0
- package/dist/nodes/Chariow/resources/index.js.map +1 -0
- package/dist/nodes/Chariow/resources/licence/activate.d.ts +3 -0
- package/dist/nodes/Chariow/resources/licence/activate.js +64 -0
- package/dist/nodes/Chariow/resources/licence/activate.js.map +1 -0
- package/dist/nodes/Chariow/resources/licence/get.d.ts +3 -0
- package/dist/nodes/Chariow/resources/licence/get.js +27 -0
- package/dist/nodes/Chariow/resources/licence/get.js.map +1 -0
- package/dist/nodes/Chariow/resources/licence/getActivations.d.ts +3 -0
- package/dist/nodes/Chariow/resources/licence/getActivations.js +64 -0
- package/dist/nodes/Chariow/resources/licence/getActivations.js.map +1 -0
- package/dist/nodes/Chariow/resources/licence/getAll.d.ts +3 -0
- package/dist/nodes/Chariow/resources/licence/getAll.js +100 -0
- package/dist/nodes/Chariow/resources/licence/getAll.js.map +1 -0
- package/dist/nodes/Chariow/resources/licence/index.d.ts +9 -0
- package/dist/nodes/Chariow/resources/licence/index.js +100 -0
- package/dist/nodes/Chariow/resources/licence/index.js.map +1 -0
- package/dist/nodes/Chariow/resources/licence/revoke.d.ts +3 -0
- package/dist/nodes/Chariow/resources/licence/revoke.js +27 -0
- package/dist/nodes/Chariow/resources/licence/revoke.js.map +1 -0
- package/dist/nodes/Chariow/resources/product/get.d.ts +3 -0
- package/dist/nodes/Chariow/resources/product/get.js +27 -0
- package/dist/nodes/Chariow/resources/product/get.js.map +1 -0
- package/dist/nodes/Chariow/resources/product/getAll.d.ts +3 -0
- package/dist/nodes/Chariow/resources/product/getAll.js +84 -0
- package/dist/nodes/Chariow/resources/product/getAll.js.map +1 -0
- package/dist/nodes/Chariow/resources/product/index.d.ts +6 -0
- package/dist/nodes/Chariow/resources/product/index.js +70 -0
- package/dist/nodes/Chariow/resources/product/index.js.map +1 -0
- package/dist/nodes/Chariow/resources/sale/get.d.ts +3 -0
- package/dist/nodes/Chariow/resources/sale/get.js +27 -0
- package/dist/nodes/Chariow/resources/sale/get.js.map +1 -0
- package/dist/nodes/Chariow/resources/sale/getAll.d.ts +3 -0
- package/dist/nodes/Chariow/resources/sale/getAll.js +94 -0
- package/dist/nodes/Chariow/resources/sale/getAll.js.map +1 -0
- package/dist/nodes/Chariow/resources/sale/index.d.ts +6 -0
- package/dist/nodes/Chariow/resources/sale/index.js +70 -0
- package/dist/nodes/Chariow/resources/sale/index.js.map +1 -0
- package/dist/nodes/Chariow/resources/store/getInfo.d.ts +3 -0
- package/dist/nodes/Chariow/resources/store/getInfo.js +11 -0
- package/dist/nodes/Chariow/resources/store/getInfo.js.map +1 -0
- package/dist/nodes/Chariow/resources/store/index.d.ts +5 -0
- package/dist/nodes/Chariow/resources/store/index.js +62 -0
- package/dist/nodes/Chariow/resources/store/index.js.map +1 -0
- package/dist/nodes/Chariow/shared/constants.d.ts +20 -0
- package/dist/nodes/Chariow/shared/constants.js +24 -0
- package/dist/nodes/Chariow/shared/constants.js.map +1 -0
- package/dist/nodes/Chariow/shared/descriptions.d.ts +4 -0
- package/dist/nodes/Chariow/shared/descriptions.js +34 -0
- package/dist/nodes/Chariow/shared/descriptions.js.map +1 -0
- package/dist/nodes/Chariow/shared/index.d.ts +4 -0
- package/dist/nodes/Chariow/shared/index.js +21 -0
- package/dist/nodes/Chariow/shared/index.js.map +1 -0
- package/dist/nodes/Chariow/shared/transport.d.ts +3 -0
- package/dist/nodes/Chariow/shared/transport.js +63 -0
- package/dist/nodes/Chariow/shared/transport.js.map +1 -0
- package/dist/nodes/Chariow/shared/utils.d.ts +3 -0
- package/dist/nodes/Chariow/shared/utils.js +20 -0
- package/dist/nodes/Chariow/shared/utils.js.map +1 -0
- package/dist/package.json +67 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/package.json +67 -0
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.description = void 0;
|
|
4
|
+
exports.execute = execute;
|
|
5
|
+
const shared_1 = require("../../shared");
|
|
6
|
+
exports.description = [
|
|
7
|
+
{
|
|
8
|
+
displayName: 'Discount ID',
|
|
9
|
+
name: 'discountId',
|
|
10
|
+
type: 'string',
|
|
11
|
+
required: true,
|
|
12
|
+
default: '',
|
|
13
|
+
displayOptions: {
|
|
14
|
+
show: {
|
|
15
|
+
resource: ['discount'],
|
|
16
|
+
operation: ['get'],
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
description: 'The ID of the discount to retrieve (e.g., dis_abc123xyz)',
|
|
20
|
+
},
|
|
21
|
+
];
|
|
22
|
+
async function execute(i) {
|
|
23
|
+
const discountId = this.getNodeParameter('discountId', i);
|
|
24
|
+
const response = await shared_1.chariowApiRequest.call(this, 'GET', shared_1.ENDPOINTS.DISCOUNT(discountId));
|
|
25
|
+
return (0, shared_1.extractData)(response);
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=get.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get.js","sourceRoot":"","sources":["../../../../../nodes/Chariow/resources/discount/get.ts"],"names":[],"mappings":";;;AAoBA,0BAIC;AAvBD,yCAAyE;AAE5D,QAAA,WAAW,GAAsB;IAC7C;QACC,WAAW,EAAE,aAAa;QAC1B,IAAI,EAAE,YAAY;QAClB,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,IAAI;QACd,OAAO,EAAE,EAAE;QACX,cAAc,EAAE;YACf,IAAI,EAAE;gBACL,QAAQ,EAAE,CAAC,UAAU,CAAC;gBACtB,SAAS,EAAE,CAAC,KAAK,CAAC;aAClB;SACD;QACD,WAAW,EAAE,0DAA0D;KACvE;CACD,CAAC;AAEK,KAAK,UAAU,OAAO,CAA0B,CAAS;IAC/D,MAAM,UAAU,GAAG,IAAI,CAAC,gBAAgB,CAAC,YAAY,EAAE,CAAC,CAAW,CAAC;IACpE,MAAM,QAAQ,GAAG,MAAM,0BAAiB,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,kBAAS,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC,CAAC;IAC3F,OAAO,IAAA,oBAAW,EAAC,QAAQ,CAAgB,CAAC;AAC7C,CAAC"}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.description = void 0;
|
|
4
|
+
exports.execute = execute;
|
|
5
|
+
const shared_1 = require("../../shared");
|
|
6
|
+
exports.description = [
|
|
7
|
+
{
|
|
8
|
+
displayName: 'Return All',
|
|
9
|
+
name: 'returnAll',
|
|
10
|
+
type: 'boolean',
|
|
11
|
+
default: false,
|
|
12
|
+
displayOptions: {
|
|
13
|
+
show: {
|
|
14
|
+
resource: ['discount'],
|
|
15
|
+
operation: ['getAll'],
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
description: 'Whether to return all results or only up to a given limit',
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
displayName: 'Limit',
|
|
22
|
+
name: 'limit',
|
|
23
|
+
type: 'number',
|
|
24
|
+
default: 50,
|
|
25
|
+
typeOptions: {
|
|
26
|
+
minValue: 1,
|
|
27
|
+
maxValue: 100,
|
|
28
|
+
},
|
|
29
|
+
displayOptions: {
|
|
30
|
+
show: {
|
|
31
|
+
resource: ['discount'],
|
|
32
|
+
operation: ['getAll'],
|
|
33
|
+
returnAll: [false],
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
description: 'Max number of results to return',
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
displayName: 'Filters',
|
|
40
|
+
name: 'filters',
|
|
41
|
+
type: 'collection',
|
|
42
|
+
placeholder: 'Add Filter',
|
|
43
|
+
default: {},
|
|
44
|
+
displayOptions: {
|
|
45
|
+
show: {
|
|
46
|
+
resource: ['discount'],
|
|
47
|
+
operation: ['getAll'],
|
|
48
|
+
},
|
|
49
|
+
},
|
|
50
|
+
options: [
|
|
51
|
+
{
|
|
52
|
+
displayName: 'Code',
|
|
53
|
+
name: 'code',
|
|
54
|
+
type: 'string',
|
|
55
|
+
default: '',
|
|
56
|
+
description: 'Filter by discount code',
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
displayName: 'Status',
|
|
60
|
+
name: 'status',
|
|
61
|
+
type: 'options',
|
|
62
|
+
options: [
|
|
63
|
+
{ name: 'Active', value: 'active' },
|
|
64
|
+
{ name: 'All', value: '' },
|
|
65
|
+
{ name: 'Expired', value: 'expired' },
|
|
66
|
+
{ name: 'Inactive', value: 'inactive' },
|
|
67
|
+
],
|
|
68
|
+
default: '',
|
|
69
|
+
description: 'Filter by discount status',
|
|
70
|
+
},
|
|
71
|
+
],
|
|
72
|
+
},
|
|
73
|
+
];
|
|
74
|
+
async function execute(i) {
|
|
75
|
+
const returnAll = this.getNodeParameter('returnAll', i);
|
|
76
|
+
const filters = this.getNodeParameter('filters', i);
|
|
77
|
+
const limit = this.getNodeParameter('limit', i, 50);
|
|
78
|
+
const query = (0, shared_1.buildListQuery)(limit, returnAll, filters);
|
|
79
|
+
if (returnAll) {
|
|
80
|
+
return shared_1.chariowApiRequestAllItems.call(this, 'GET', shared_1.ENDPOINTS.DISCOUNTS, {}, query);
|
|
81
|
+
}
|
|
82
|
+
const response = await shared_1.chariowApiRequest.call(this, 'GET', shared_1.ENDPOINTS.DISCOUNTS, {}, query);
|
|
83
|
+
return (0, shared_1.extractData)(response);
|
|
84
|
+
}
|
|
85
|
+
//# sourceMappingURL=getAll.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getAll.js","sourceRoot":"","sources":["../../../../../nodes/Chariow/resources/discount/getAll.ts"],"names":[],"mappings":";;;AA8EA,0BAaC;AA1FD,yCAMsB;AAET,QAAA,WAAW,GAAsB;IAC7C;QACC,WAAW,EAAE,YAAY;QACzB,IAAI,EAAE,WAAW;QACjB,IAAI,EAAE,SAAS;QACf,OAAO,EAAE,KAAK;QACd,cAAc,EAAE;YACf,IAAI,EAAE;gBACL,QAAQ,EAAE,CAAC,UAAU,CAAC;gBACtB,SAAS,EAAE,CAAC,QAAQ,CAAC;aACrB;SACD;QACD,WAAW,EAAE,2DAA2D;KACxE;IACD;QACC,WAAW,EAAE,OAAO;QACpB,IAAI,EAAE,OAAO;QACb,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE,EAAE;QACX,WAAW,EAAE;YACZ,QAAQ,EAAE,CAAC;YACX,QAAQ,EAAE,GAAG;SACb;QACD,cAAc,EAAE;YACf,IAAI,EAAE;gBACL,QAAQ,EAAE,CAAC,UAAU,CAAC;gBACtB,SAAS,EAAE,CAAC,QAAQ,CAAC;gBACrB,SAAS,EAAE,CAAC,KAAK,CAAC;aAClB;SACD;QACD,WAAW,EAAE,iCAAiC;KAC9C;IACD;QACC,WAAW,EAAE,SAAS;QACtB,IAAI,EAAE,SAAS;QACf,IAAI,EAAE,YAAY;QAClB,WAAW,EAAE,YAAY;QACzB,OAAO,EAAE,EAAE;QACX,cAAc,EAAE;YACf,IAAI,EAAE;gBACL,QAAQ,EAAE,CAAC,UAAU,CAAC;gBACtB,SAAS,EAAE,CAAC,QAAQ,CAAC;aACrB;SACD;QACD,OAAO,EAAE;YACR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,CAAC;IAC3F,OAAO,IAAA,oBAAW,EAAC,QAAQ,CAAkB,CAAC;AAC/C,CAAC"}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.getAll = exports.get = exports.fields = exports.operations = void 0;
|
|
37
|
+
const get = __importStar(require("./get"));
|
|
38
|
+
exports.get = get;
|
|
39
|
+
const getAll = __importStar(require("./getAll"));
|
|
40
|
+
exports.getAll = getAll;
|
|
41
|
+
exports.operations = [
|
|
42
|
+
{
|
|
43
|
+
displayName: 'Operation',
|
|
44
|
+
name: 'operation',
|
|
45
|
+
type: 'options',
|
|
46
|
+
noDataExpression: true,
|
|
47
|
+
displayOptions: {
|
|
48
|
+
show: {
|
|
49
|
+
resource: ['discount'],
|
|
50
|
+
},
|
|
51
|
+
},
|
|
52
|
+
options: [
|
|
53
|
+
{
|
|
54
|
+
name: 'Get',
|
|
55
|
+
value: 'get',
|
|
56
|
+
description: 'Get a discount by ID',
|
|
57
|
+
action: 'Get a discount',
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
name: 'Get Many',
|
|
61
|
+
value: 'getAll',
|
|
62
|
+
description: 'Get many discounts',
|
|
63
|
+
action: 'Get many discounts',
|
|
64
|
+
},
|
|
65
|
+
],
|
|
66
|
+
default: 'get',
|
|
67
|
+
},
|
|
68
|
+
];
|
|
69
|
+
exports.fields = [...get.description, ...getAll.description];
|
|
70
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../nodes/Chariow/resources/discount/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,2CAA6B;AAkCpB,kBAAG;AAjCZ,iDAAmC;AAiCrB,wBAAM;AA/BP,QAAA,UAAU,GAAsB;IAC5C;QACC,WAAW,EAAE,WAAW;QACxB,IAAI,EAAE,WAAW;QACjB,IAAI,EAAE,SAAS;QACf,gBAAgB,EAAE,IAAI;QACtB,cAAc,EAAE;YACf,IAAI,EAAE;gBACL,QAAQ,EAAE,CAAC,UAAU,CAAC;aACtB;SACD;QACD,OAAO,EAAE;YACR;gBACC,IAAI,EAAE,KAAK;gBACX,KAAK,EAAE,KAAK;gBACZ,WAAW,EAAE,sBAAsB;gBACnC,MAAM,EAAE,gBAAgB;aACxB;YACD;gBACC,IAAI,EAAE,UAAU;gBAChB,KAAK,EAAE,QAAQ;gBACf,WAAW,EAAE,oBAAoB;gBACjC,MAAM,EAAE,oBAAoB;aAC5B;SACD;QACD,OAAO,EAAE,KAAK;KACd;CACD,CAAC;AAEW,QAAA,MAAM,GAAsB,CAAC,GAAG,GAAG,CAAC,WAAW,EAAE,GAAG,MAAM,CAAC,WAAW,CAAC,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as customer from './customer';
|
|
2
|
+
import * as product from './product';
|
|
3
|
+
import * as sale from './sale';
|
|
4
|
+
import * as discount from './discount';
|
|
5
|
+
import * as licence from './licence';
|
|
6
|
+
import * as checkout from './checkout';
|
|
7
|
+
import * as store from './store';
|
|
8
|
+
export { customer, product, sale, discount, licence, checkout, store };
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.store = exports.checkout = exports.licence = exports.discount = exports.sale = exports.product = exports.customer = void 0;
|
|
37
|
+
const customer = __importStar(require("./customer"));
|
|
38
|
+
exports.customer = customer;
|
|
39
|
+
const product = __importStar(require("./product"));
|
|
40
|
+
exports.product = product;
|
|
41
|
+
const sale = __importStar(require("./sale"));
|
|
42
|
+
exports.sale = sale;
|
|
43
|
+
const discount = __importStar(require("./discount"));
|
|
44
|
+
exports.discount = discount;
|
|
45
|
+
const licence = __importStar(require("./licence"));
|
|
46
|
+
exports.licence = licence;
|
|
47
|
+
const checkout = __importStar(require("./checkout"));
|
|
48
|
+
exports.checkout = checkout;
|
|
49
|
+
const store = __importStar(require("./store"));
|
|
50
|
+
exports.store = store;
|
|
51
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../nodes/Chariow/resources/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qDAAuC;AAQ9B,4BAAQ;AAPjB,mDAAqC;AAOlB,0BAAO;AAN1B,6CAA+B;AAMH,oBAAI;AALhC,qDAAuC;AAKL,4BAAQ;AAJ1C,mDAAqC;AAIO,0BAAO;AAHnD,qDAAuC;AAGc,4BAAQ;AAF7D,+CAAiC;AAE8B,sBAAK"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.description = void 0;
|
|
4
|
+
exports.execute = execute;
|
|
5
|
+
const shared_1 = require("../../shared");
|
|
6
|
+
exports.description = [
|
|
7
|
+
{
|
|
8
|
+
displayName: 'Licence ID or Key',
|
|
9
|
+
name: 'licenceId',
|
|
10
|
+
type: 'string',
|
|
11
|
+
required: true,
|
|
12
|
+
default: '',
|
|
13
|
+
displayOptions: {
|
|
14
|
+
show: {
|
|
15
|
+
resource: ['licence'],
|
|
16
|
+
operation: ['activate'],
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
description: 'The ID or key of the licence to activate',
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
displayName: 'Additional Fields',
|
|
23
|
+
name: 'additionalFields',
|
|
24
|
+
type: 'collection',
|
|
25
|
+
placeholder: 'Add Field',
|
|
26
|
+
default: {},
|
|
27
|
+
displayOptions: {
|
|
28
|
+
show: {
|
|
29
|
+
resource: ['licence'],
|
|
30
|
+
operation: ['activate'],
|
|
31
|
+
},
|
|
32
|
+
},
|
|
33
|
+
options: [
|
|
34
|
+
{
|
|
35
|
+
displayName: 'Device Identifier',
|
|
36
|
+
name: 'device_identifier',
|
|
37
|
+
type: 'string',
|
|
38
|
+
default: '',
|
|
39
|
+
description: 'Unique identifier for the device',
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
displayName: 'Device Name',
|
|
43
|
+
name: 'device_name',
|
|
44
|
+
type: 'string',
|
|
45
|
+
default: '',
|
|
46
|
+
description: 'Human-readable name for the device',
|
|
47
|
+
},
|
|
48
|
+
],
|
|
49
|
+
},
|
|
50
|
+
];
|
|
51
|
+
async function execute(i) {
|
|
52
|
+
const licenceId = this.getNodeParameter('licenceId', i);
|
|
53
|
+
const additionalFields = this.getNodeParameter('additionalFields', i);
|
|
54
|
+
const body = {};
|
|
55
|
+
if (additionalFields.device_identifier) {
|
|
56
|
+
body.device_identifier = additionalFields.device_identifier;
|
|
57
|
+
}
|
|
58
|
+
if (additionalFields.device_name) {
|
|
59
|
+
body.device_name = additionalFields.device_name;
|
|
60
|
+
}
|
|
61
|
+
const response = await shared_1.chariowApiRequest.call(this, 'POST', shared_1.ENDPOINTS.LICENCE_ACTIVATE(licenceId), body);
|
|
62
|
+
return (0, shared_1.extractData)(response);
|
|
63
|
+
}
|
|
64
|
+
//# sourceMappingURL=activate.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"activate.js","sourceRoot":"","sources":["../../../../../nodes/Chariow/resources/licence/activate.ts"],"names":[],"mappings":";;;AAiDA,0BAmBC;AAnED,yCAAyE;AAE5D,QAAA,WAAW,GAAsB;IAC7C;QACC,WAAW,EAAE,mBAAmB;QAChC,IAAI,EAAE,WAAW;QACjB,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,IAAI;QACd,OAAO,EAAE,EAAE;QACX,cAAc,EAAE;YACf,IAAI,EAAE;gBACL,QAAQ,EAAE,CAAC,SAAS,CAAC;gBACrB,SAAS,EAAE,CAAC,UAAU,CAAC;aACvB;SACD;QACD,WAAW,EAAE,0CAA0C;KACvD;IACD;QACC,WAAW,EAAE,mBAAmB;QAChC,IAAI,EAAE,kBAAkB;QACxB,IAAI,EAAE,YAAY;QAClB,WAAW,EAAE,WAAW;QACxB,OAAO,EAAE,EAAE;QACX,cAAc,EAAE;YACf,IAAI,EAAE;gBACL,QAAQ,EAAE,CAAC,SAAS,CAAC;gBACrB,SAAS,EAAE,CAAC,UAAU,CAAC;aACvB;SACD;QACD,OAAO,EAAE;YACR;gBACC,WAAW,EAAE,mBAAmB;gBAChC,IAAI,EAAE,mBAAmB;gBACzB,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,EAAE;gBACX,WAAW,EAAE,kCAAkC;aAC/C;YACD;gBACC,WAAW,EAAE,aAAa;gBAC1B,IAAI,EAAE,aAAa;gBACnB,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,EAAE;gBACX,WAAW,EAAE,oCAAoC;aACjD;SACD;KACD;CACD,CAAC;AAEK,KAAK,UAAU,OAAO,CAA0B,CAAS;IAC/D,MAAM,SAAS,GAAG,IAAI,CAAC,gBAAgB,CAAC,WAAW,EAAE,CAAC,CAAW,CAAC;IAClE,MAAM,gBAAgB,GAAG,IAAI,CAAC,gBAAgB,CAAC,kBAAkB,EAAE,CAAC,CAAgB,CAAC;IAErF,MAAM,IAAI,GAAgB,EAAE,CAAC;IAC7B,IAAI,gBAAgB,CAAC,iBAAiB,EAAE,CAAC;QACxC,IAAI,CAAC,iBAAiB,GAAG,gBAAgB,CAAC,iBAAiB,CAAC;IAC7D,CAAC;IACD,IAAI,gBAAgB,CAAC,WAAW,EAAE,CAAC;QAClC,IAAI,CAAC,WAAW,GAAG,gBAAgB,CAAC,WAAW,CAAC;IACjD,CAAC;IAED,MAAM,QAAQ,GAAG,MAAM,0BAAiB,CAAC,IAAI,CAC5C,IAAI,EACJ,MAAM,EACN,kBAAS,CAAC,gBAAgB,CAAC,SAAS,CAAC,EACrC,IAAI,CACJ,CAAC;IACF,OAAO,IAAA,oBAAW,EAAC,QAAQ,CAAgB,CAAC;AAC7C,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.description = void 0;
|
|
4
|
+
exports.execute = execute;
|
|
5
|
+
const shared_1 = require("../../shared");
|
|
6
|
+
exports.description = [
|
|
7
|
+
{
|
|
8
|
+
displayName: 'Licence ID or Key',
|
|
9
|
+
name: 'licenceId',
|
|
10
|
+
type: 'string',
|
|
11
|
+
required: true,
|
|
12
|
+
default: '',
|
|
13
|
+
displayOptions: {
|
|
14
|
+
show: {
|
|
15
|
+
resource: ['licence'],
|
|
16
|
+
operation: ['get'],
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
description: 'The ID or key of the licence to retrieve (e.g., lic_abc123xyz or XXXX-XXXX-XXXX)',
|
|
20
|
+
},
|
|
21
|
+
];
|
|
22
|
+
async function execute(i) {
|
|
23
|
+
const licenceId = this.getNodeParameter('licenceId', i);
|
|
24
|
+
const response = await shared_1.chariowApiRequest.call(this, 'GET', shared_1.ENDPOINTS.LICENCE(licenceId));
|
|
25
|
+
return (0, shared_1.extractData)(response);
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=get.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get.js","sourceRoot":"","sources":["../../../../../nodes/Chariow/resources/licence/get.ts"],"names":[],"mappings":";;;AAoBA,0BAIC;AAvBD,yCAAyE;AAE5D,QAAA,WAAW,GAAsB;IAC7C;QACC,WAAW,EAAE,mBAAmB;QAChC,IAAI,EAAE,WAAW;QACjB,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,IAAI;QACd,OAAO,EAAE,EAAE;QACX,cAAc,EAAE;YACf,IAAI,EAAE;gBACL,QAAQ,EAAE,CAAC,SAAS,CAAC;gBACrB,SAAS,EAAE,CAAC,KAAK,CAAC;aAClB;SACD;QACD,WAAW,EAAE,kFAAkF;KAC/F;CACD,CAAC;AAEK,KAAK,UAAU,OAAO,CAA0B,CAAS;IAC/D,MAAM,SAAS,GAAG,IAAI,CAAC,gBAAgB,CAAC,WAAW,EAAE,CAAC,CAAW,CAAC;IAClE,MAAM,QAAQ,GAAG,MAAM,0BAAiB,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,kBAAS,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC;IACzF,OAAO,IAAA,oBAAW,EAAC,QAAQ,CAAgB,CAAC;AAC7C,CAAC"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.description = void 0;
|
|
4
|
+
exports.execute = execute;
|
|
5
|
+
const shared_1 = require("../../shared");
|
|
6
|
+
exports.description = [
|
|
7
|
+
{
|
|
8
|
+
displayName: 'Licence ID or Key',
|
|
9
|
+
name: 'licenceId',
|
|
10
|
+
type: 'string',
|
|
11
|
+
required: true,
|
|
12
|
+
default: '',
|
|
13
|
+
displayOptions: {
|
|
14
|
+
show: {
|
|
15
|
+
resource: ['licence'],
|
|
16
|
+
operation: ['getActivations'],
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
description: 'The ID or key of the licence to get activations for',
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
displayName: 'Return All',
|
|
23
|
+
name: 'returnAll',
|
|
24
|
+
type: 'boolean',
|
|
25
|
+
default: false,
|
|
26
|
+
displayOptions: {
|
|
27
|
+
show: {
|
|
28
|
+
resource: ['licence'],
|
|
29
|
+
operation: ['getActivations'],
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
description: 'Whether to return all results or only up to a given limit',
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
displayName: 'Limit',
|
|
36
|
+
name: 'limit',
|
|
37
|
+
type: 'number',
|
|
38
|
+
default: 50,
|
|
39
|
+
typeOptions: {
|
|
40
|
+
minValue: 1,
|
|
41
|
+
maxValue: 100,
|
|
42
|
+
},
|
|
43
|
+
displayOptions: {
|
|
44
|
+
show: {
|
|
45
|
+
resource: ['licence'],
|
|
46
|
+
operation: ['getActivations'],
|
|
47
|
+
returnAll: [false],
|
|
48
|
+
},
|
|
49
|
+
},
|
|
50
|
+
description: 'Max number of results to return',
|
|
51
|
+
},
|
|
52
|
+
];
|
|
53
|
+
async function execute(i) {
|
|
54
|
+
const licenceId = this.getNodeParameter('licenceId', i);
|
|
55
|
+
const returnAll = this.getNodeParameter('returnAll', i);
|
|
56
|
+
const limit = this.getNodeParameter('limit', i, 50);
|
|
57
|
+
const query = (0, shared_1.buildListQuery)(limit, returnAll);
|
|
58
|
+
if (returnAll) {
|
|
59
|
+
return shared_1.chariowApiRequestAllItems.call(this, 'GET', shared_1.ENDPOINTS.LICENCE_ACTIVATIONS(licenceId), {}, query);
|
|
60
|
+
}
|
|
61
|
+
const response = await shared_1.chariowApiRequest.call(this, 'GET', shared_1.ENDPOINTS.LICENCE_ACTIVATIONS(licenceId), {}, query);
|
|
62
|
+
return (0, shared_1.extractData)(response);
|
|
63
|
+
}
|
|
64
|
+
//# sourceMappingURL=getActivations.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getActivations.js","sourceRoot":"","sources":["../../../../../nodes/Chariow/resources/licence/getActivations.ts"],"names":[],"mappings":";;;AAyDA,0BAyBC;AAjFD,yCAMsB;AAET,QAAA,WAAW,GAAsB;IAC7C;QACC,WAAW,EAAE,mBAAmB;QAChC,IAAI,EAAE,WAAW;QACjB,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,IAAI;QACd,OAAO,EAAE,EAAE;QACX,cAAc,EAAE;YACf,IAAI,EAAE;gBACL,QAAQ,EAAE,CAAC,SAAS,CAAC;gBACrB,SAAS,EAAE,CAAC,gBAAgB,CAAC;aAC7B;SACD;QACD,WAAW,EAAE,qDAAqD;KAClE;IACD;QACC,WAAW,EAAE,YAAY;QACzB,IAAI,EAAE,WAAW;QACjB,IAAI,EAAE,SAAS;QACf,OAAO,EAAE,KAAK;QACd,cAAc,EAAE;YACf,IAAI,EAAE;gBACL,QAAQ,EAAE,CAAC,SAAS,CAAC;gBACrB,SAAS,EAAE,CAAC,gBAAgB,CAAC;aAC7B;SACD;QACD,WAAW,EAAE,2DAA2D;KACxE;IACD;QACC,WAAW,EAAE,OAAO;QACpB,IAAI,EAAE,OAAO;QACb,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE,EAAE;QACX,WAAW,EAAE;YACZ,QAAQ,EAAE,CAAC;YACX,QAAQ,EAAE,GAAG;SACb;QACD,cAAc,EAAE;YACf,IAAI,EAAE;gBACL,QAAQ,EAAE,CAAC,SAAS,CAAC;gBACrB,SAAS,EAAE,CAAC,gBAAgB,CAAC;gBAC7B,SAAS,EAAE,CAAC,KAAK,CAAC;aAClB;SACD;QACD,WAAW,EAAE,iCAAiC;KAC9C;CACD,CAAC;AAEK,KAAK,UAAU,OAAO,CAA0B,CAAS;IAC/D,MAAM,SAAS,GAAG,IAAI,CAAC,gBAAgB,CAAC,WAAW,EAAE,CAAC,CAAW,CAAC;IAClE,MAAM,SAAS,GAAG,IAAI,CAAC,gBAAgB,CAAC,WAAW,EAAE,CAAC,CAAY,CAAC;IACnE,MAAM,KAAK,GAAG,IAAI,CAAC,gBAAgB,CAAC,OAAO,EAAE,CAAC,EAAE,EAAE,CAAW,CAAC;IAE9D,MAAM,KAAK,GAAG,IAAA,uBAAc,EAAC,KAAK,EAAE,SAAS,CAAC,CAAC;IAE/C,IAAI,SAAS,EAAE,CAAC;QACf,OAAO,kCAAyB,CAAC,IAAI,CACpC,IAAI,EACJ,KAAK,EACL,kBAAS,CAAC,mBAAmB,CAAC,SAAS,CAAC,EACxC,EAAE,EACF,KAAK,CACL,CAAC;IACH,CAAC;IAED,MAAM,QAAQ,GAAG,MAAM,0BAAiB,CAAC,IAAI,CAC5C,IAAI,EACJ,KAAK,EACL,kBAAS,CAAC,mBAAmB,CAAC,SAAS,CAAC,EACxC,EAAE,EACF,KAAK,CACL,CAAC;IACF,OAAO,IAAA,oBAAW,EAAC,QAAQ,CAAkB,CAAC;AAC/C,CAAC"}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.description = void 0;
|
|
4
|
+
exports.execute = execute;
|
|
5
|
+
const shared_1 = require("../../shared");
|
|
6
|
+
exports.description = [
|
|
7
|
+
{
|
|
8
|
+
displayName: 'Return All',
|
|
9
|
+
name: 'returnAll',
|
|
10
|
+
type: 'boolean',
|
|
11
|
+
default: false,
|
|
12
|
+
displayOptions: {
|
|
13
|
+
show: {
|
|
14
|
+
resource: ['licence'],
|
|
15
|
+
operation: ['getAll'],
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
description: 'Whether to return all results or only up to a given limit',
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
displayName: 'Limit',
|
|
22
|
+
name: 'limit',
|
|
23
|
+
type: 'number',
|
|
24
|
+
default: 50,
|
|
25
|
+
typeOptions: {
|
|
26
|
+
minValue: 1,
|
|
27
|
+
maxValue: 100,
|
|
28
|
+
},
|
|
29
|
+
displayOptions: {
|
|
30
|
+
show: {
|
|
31
|
+
resource: ['licence'],
|
|
32
|
+
operation: ['getAll'],
|
|
33
|
+
returnAll: [false],
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
description: 'Max number of results to return',
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
displayName: 'Filters',
|
|
40
|
+
name: 'filters',
|
|
41
|
+
type: 'collection',
|
|
42
|
+
placeholder: 'Add Filter',
|
|
43
|
+
default: {},
|
|
44
|
+
displayOptions: {
|
|
45
|
+
show: {
|
|
46
|
+
resource: ['licence'],
|
|
47
|
+
operation: ['getAll'],
|
|
48
|
+
},
|
|
49
|
+
},
|
|
50
|
+
options: [
|
|
51
|
+
{
|
|
52
|
+
displayName: 'Customer ID',
|
|
53
|
+
name: 'customer_id',
|
|
54
|
+
type: 'string',
|
|
55
|
+
default: '',
|
|
56
|
+
description: 'Filter by customer ID',
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
displayName: 'Product ID',
|
|
60
|
+
name: 'product_id',
|
|
61
|
+
type: 'string',
|
|
62
|
+
default: '',
|
|
63
|
+
description: 'Filter by product ID',
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
displayName: 'Search',
|
|
67
|
+
name: 'search',
|
|
68
|
+
type: 'string',
|
|
69
|
+
default: '',
|
|
70
|
+
description: 'Search licences by key',
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
displayName: 'Status',
|
|
74
|
+
name: 'status',
|
|
75
|
+
type: 'options',
|
|
76
|
+
options: [
|
|
77
|
+
{ name: 'Active', value: 'active' },
|
|
78
|
+
{ name: 'All', value: '' },
|
|
79
|
+
{ name: 'Expired', value: 'expired' },
|
|
80
|
+
{ name: 'Inactive', value: 'inactive' },
|
|
81
|
+
{ name: 'Revoked', value: 'revoked' },
|
|
82
|
+
],
|
|
83
|
+
default: '',
|
|
84
|
+
description: 'Filter by licence status',
|
|
85
|
+
},
|
|
86
|
+
],
|
|
87
|
+
},
|
|
88
|
+
];
|
|
89
|
+
async function execute(i) {
|
|
90
|
+
const returnAll = this.getNodeParameter('returnAll', i);
|
|
91
|
+
const filters = this.getNodeParameter('filters', i);
|
|
92
|
+
const limit = this.getNodeParameter('limit', i, 50);
|
|
93
|
+
const query = (0, shared_1.buildListQuery)(limit, returnAll, filters);
|
|
94
|
+
if (returnAll) {
|
|
95
|
+
return shared_1.chariowApiRequestAllItems.call(this, 'GET', shared_1.ENDPOINTS.LICENCES, {}, query);
|
|
96
|
+
}
|
|
97
|
+
const response = await shared_1.chariowApiRequest.call(this, 'GET', shared_1.ENDPOINTS.LICENCES, {}, query);
|
|
98
|
+
return (0, shared_1.extractData)(response);
|
|
99
|
+
}
|
|
100
|
+
//# sourceMappingURL=getAll.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getAll.js","sourceRoot":"","sources":["../../../../../nodes/Chariow/resources/licence/getAll.ts"],"names":[],"mappings":";;;AA6FA,0BAaC;AAzGD,yCAMsB;AAET,QAAA,WAAW,GAAsB;IAC7C;QACC,WAAW,EAAE,YAAY;QACzB,IAAI,EAAE,WAAW;QACjB,IAAI,EAAE,SAAS;QACf,OAAO,EAAE,KAAK;QACd,cAAc,EAAE;YACf,IAAI,EAAE;gBACL,QAAQ,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|
|
3
|
+
import * as getAll from './getAll';
|
|
4
|
+
import * as activate from './activate';
|
|
5
|
+
import * as revoke from './revoke';
|
|
6
|
+
import * as getActivations from './getActivations';
|
|
7
|
+
export declare const operations: INodeProperties[];
|
|
8
|
+
export declare const fields: INodeProperties[];
|
|
9
|
+
export { get, getAll, activate, revoke, getActivations };
|