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,100 @@
|
|
|
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.getActivations = exports.revoke = exports.activate = 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
|
+
const activate = __importStar(require("./activate"));
|
|
42
|
+
exports.activate = activate;
|
|
43
|
+
const revoke = __importStar(require("./revoke"));
|
|
44
|
+
exports.revoke = revoke;
|
|
45
|
+
const getActivations = __importStar(require("./getActivations"));
|
|
46
|
+
exports.getActivations = getActivations;
|
|
47
|
+
exports.operations = [
|
|
48
|
+
{
|
|
49
|
+
displayName: 'Operation',
|
|
50
|
+
name: 'operation',
|
|
51
|
+
type: 'options',
|
|
52
|
+
noDataExpression: true,
|
|
53
|
+
displayOptions: {
|
|
54
|
+
show: {
|
|
55
|
+
resource: ['licence'],
|
|
56
|
+
},
|
|
57
|
+
},
|
|
58
|
+
options: [
|
|
59
|
+
{
|
|
60
|
+
name: 'Activate',
|
|
61
|
+
value: 'activate',
|
|
62
|
+
description: 'Activate a licence',
|
|
63
|
+
action: 'Activate a licence',
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
name: 'Get',
|
|
67
|
+
value: 'get',
|
|
68
|
+
description: 'Get a licence by ID or key',
|
|
69
|
+
action: 'Get a licence',
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
name: 'Get Activations',
|
|
73
|
+
value: 'getActivations',
|
|
74
|
+
description: 'Get activations for a licence',
|
|
75
|
+
action: 'Get licence activations',
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
name: 'Get Many',
|
|
79
|
+
value: 'getAll',
|
|
80
|
+
description: 'Get many licences',
|
|
81
|
+
action: 'Get many licences',
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
name: 'Revoke',
|
|
85
|
+
value: 'revoke',
|
|
86
|
+
description: 'Revoke a licence',
|
|
87
|
+
action: 'Revoke a licence',
|
|
88
|
+
},
|
|
89
|
+
],
|
|
90
|
+
default: 'get',
|
|
91
|
+
},
|
|
92
|
+
];
|
|
93
|
+
exports.fields = [
|
|
94
|
+
...get.description,
|
|
95
|
+
...getAll.description,
|
|
96
|
+
...activate.description,
|
|
97
|
+
...revoke.description,
|
|
98
|
+
...getActivations.description,
|
|
99
|
+
];
|
|
100
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../nodes/Chariow/resources/licence/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,2CAA6B;AA6DpB,kBAAG;AA5DZ,iDAAmC;AA4DrB,wBAAM;AA3DpB,qDAAuC;AA2DjB,4BAAQ;AA1D9B,iDAAmC;AA0DH,wBAAM;AAzDtC,iEAAmD;AAyDX,wCAAc;AAvDzC,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,SAAS,CAAC;aACrB;SACD;QACD,OAAO,EAAE;YACR;gBACC,IAAI,EAAE,UAAU;gBAChB,KAAK,EAAE,UAAU;gBACjB,WAAW,EAAE,oBAAoB;gBACjC,MAAM,EAAE,oBAAoB;aAC5B;YACD;gBACC,IAAI,EAAE,KAAK;gBACX,KAAK,EAAE,KAAK;gBACZ,WAAW,EAAE,4BAA4B;gBACzC,MAAM,EAAE,eAAe;aACvB;YACD;gBACC,IAAI,EAAE,iBAAiB;gBACvB,KAAK,EAAE,gBAAgB;gBACvB,WAAW,EAAE,+BAA+B;gBAC5C,MAAM,EAAE,yBAAyB;aACjC;YACD;gBACC,IAAI,EAAE,UAAU;gBAChB,KAAK,EAAE,QAAQ;gBACf,WAAW,EAAE,mBAAmB;gBAChC,MAAM,EAAE,mBAAmB;aAC3B;YACD;gBACC,IAAI,EAAE,QAAQ;gBACd,KAAK,EAAE,QAAQ;gBACf,WAAW,EAAE,kBAAkB;gBAC/B,MAAM,EAAE,kBAAkB;aAC1B;SACD;QACD,OAAO,EAAE,KAAK;KACd;CACD,CAAC;AAEW,QAAA,MAAM,GAAsB;IACxC,GAAG,GAAG,CAAC,WAAW;IAClB,GAAG,MAAM,CAAC,WAAW;IACrB,GAAG,QAAQ,CAAC,WAAW;IACvB,GAAG,MAAM,CAAC,WAAW;IACrB,GAAG,cAAc,CAAC,WAAW;CAC7B,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: ['revoke'],
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
description: 'The ID or key of the licence to revoke',
|
|
20
|
+
},
|
|
21
|
+
];
|
|
22
|
+
async function execute(i) {
|
|
23
|
+
const licenceId = this.getNodeParameter('licenceId', i);
|
|
24
|
+
const response = await shared_1.chariowApiRequest.call(this, 'POST', shared_1.ENDPOINTS.LICENCE_REVOKE(licenceId));
|
|
25
|
+
return (0, shared_1.extractData)(response);
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=revoke.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"revoke.js","sourceRoot":"","sources":["../../../../../nodes/Chariow/resources/licence/revoke.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,QAAQ,CAAC;aACrB;SACD;QACD,WAAW,EAAE,wCAAwC;KACrD;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,MAAM,EAAE,kBAAS,CAAC,cAAc,CAAC,SAAS,CAAC,CAAC,CAAC;IACjG,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: 'Product ID',
|
|
9
|
+
name: 'productId',
|
|
10
|
+
type: 'string',
|
|
11
|
+
required: true,
|
|
12
|
+
default: '',
|
|
13
|
+
displayOptions: {
|
|
14
|
+
show: {
|
|
15
|
+
resource: ['product'],
|
|
16
|
+
operation: ['get'],
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
description: 'The ID of the product to retrieve (e.g., prd_abc123xyz)',
|
|
20
|
+
},
|
|
21
|
+
];
|
|
22
|
+
async function execute(i) {
|
|
23
|
+
const productId = this.getNodeParameter('productId', i);
|
|
24
|
+
const response = await shared_1.chariowApiRequest.call(this, 'GET', shared_1.ENDPOINTS.PRODUCT(productId));
|
|
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/product/get.ts"],"names":[],"mappings":";;;AAoBA,0BAIC;AAvBD,yCAAyE;AAE5D,QAAA,WAAW,GAAsB;IAC7C;QACC,WAAW,EAAE,YAAY;QACzB,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,yDAAyD;KACtE;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,84 @@
|
|
|
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: ['product'],
|
|
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: ['product'],
|
|
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: ['product'],
|
|
47
|
+
operation: ['getAll'],
|
|
48
|
+
},
|
|
49
|
+
},
|
|
50
|
+
options: [
|
|
51
|
+
{
|
|
52
|
+
displayName: 'Search',
|
|
53
|
+
name: 'search',
|
|
54
|
+
type: 'string',
|
|
55
|
+
default: '',
|
|
56
|
+
description: 'Search products by name',
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
displayName: 'Status',
|
|
60
|
+
name: 'status',
|
|
61
|
+
type: 'options',
|
|
62
|
+
options: [
|
|
63
|
+
{ name: 'All', value: '' },
|
|
64
|
+
{ name: 'Draft', value: 'draft' },
|
|
65
|
+
{ name: 'Published', value: 'published' },
|
|
66
|
+
],
|
|
67
|
+
default: '',
|
|
68
|
+
description: 'Filter by product status',
|
|
69
|
+
},
|
|
70
|
+
],
|
|
71
|
+
},
|
|
72
|
+
];
|
|
73
|
+
async function execute(i) {
|
|
74
|
+
const returnAll = this.getNodeParameter('returnAll', i);
|
|
75
|
+
const filters = this.getNodeParameter('filters', i);
|
|
76
|
+
const limit = this.getNodeParameter('limit', i, 50);
|
|
77
|
+
const query = (0, shared_1.buildListQuery)(limit, returnAll, filters);
|
|
78
|
+
if (returnAll) {
|
|
79
|
+
return shared_1.chariowApiRequestAllItems.call(this, 'GET', shared_1.ENDPOINTS.PRODUCTS, {}, query);
|
|
80
|
+
}
|
|
81
|
+
const response = await shared_1.chariowApiRequest.call(this, 'GET', shared_1.ENDPOINTS.PRODUCTS, {}, query);
|
|
82
|
+
return (0, shared_1.extractData)(response);
|
|
83
|
+
}
|
|
84
|
+
//# sourceMappingURL=getAll.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getAll.js","sourceRoot":"","sources":["../../../../../nodes/Chariow/resources/product/getAll.ts"],"names":[],"mappings":";;;AA6EA,0BAaC;AAzFD,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,SAAS,CAAC;gBACrB,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,SAAS,CAAC;gBACrB,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,SAAS,CAAC;gBACrB,SAAS,EAAE,CAAC,QAAQ,CAAC;aACrB;SACD;QACD,OAAO,EAAE;YACR;gBACC,WAAW,EAAE,QAAQ;gBACrB,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,EAAE;gBACX,WAAW,EAAE,yBAAyB;aACtC;YACD;gBACC,WAAW,EAAE,QAAQ;gBACrB,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,SAAS;gBACf,OAAO,EAAE;oBACR,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,EAAE;oBAC1B,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE;oBACjC,EAAE,IAAI,EAAE,WAAW,EAAE,KAAK,EAAE,WAAW,EAAE;iBACzC;gBACD,OAAO,EAAE,EAAE;gBACX,WAAW,EAAE,0BAA0B;aACvC;SACD;KACD;CACD,CAAC;AAEK,KAAK,UAAU,OAAO,CAA0B,CAAS;IAC/D,MAAM,SAAS,GAAG,IAAI,CAAC,gBAAgB,CAAC,WAAW,EAAE,CAAC,CAAY,CAAC;IACnE,MAAM,OAAO,GAAG,IAAI,CAAC,gBAAgB,CAAC,SAAS,EAAE,CAAC,CAAgB,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,EAAE,OAAO,CAAC,CAAC;IAExD,IAAI,SAAS,EAAE,CAAC;QACf,OAAO,kCAAyB,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,kBAAS,CAAC,QAAQ,EAAE,EAAE,EAAE,KAAK,CAAC,CAAC;IACnF,CAAC;IAED,MAAM,QAAQ,GAAG,MAAM,0BAAiB,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,kBAAS,CAAC,QAAQ,EAAE,EAAE,EAAE,KAAK,CAAC,CAAC;IAC1F,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: ['product'],
|
|
50
|
+
},
|
|
51
|
+
},
|
|
52
|
+
options: [
|
|
53
|
+
{
|
|
54
|
+
name: 'Get',
|
|
55
|
+
value: 'get',
|
|
56
|
+
description: 'Get a product by ID',
|
|
57
|
+
action: 'Get a product',
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
name: 'Get Many',
|
|
61
|
+
value: 'getAll',
|
|
62
|
+
description: 'Get many products',
|
|
63
|
+
action: 'Get many products',
|
|
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/product/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,SAAS,CAAC;aACrB;SACD;QACD,OAAO,EAAE;YACR;gBACC,IAAI,EAAE,KAAK;gBACX,KAAK,EAAE,KAAK;gBACZ,WAAW,EAAE,qBAAqB;gBAClC,MAAM,EAAE,eAAe;aACvB;YACD;gBACC,IAAI,EAAE,UAAU;gBAChB,KAAK,EAAE,QAAQ;gBACf,WAAW,EAAE,mBAAmB;gBAChC,MAAM,EAAE,mBAAmB;aAC3B;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,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: 'Sale ID',
|
|
9
|
+
name: 'saleId',
|
|
10
|
+
type: 'string',
|
|
11
|
+
required: true,
|
|
12
|
+
default: '',
|
|
13
|
+
displayOptions: {
|
|
14
|
+
show: {
|
|
15
|
+
resource: ['sale'],
|
|
16
|
+
operation: ['get'],
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
description: 'The ID of the sale to retrieve (e.g., sal_abc123xyz)',
|
|
20
|
+
},
|
|
21
|
+
];
|
|
22
|
+
async function execute(i) {
|
|
23
|
+
const saleId = this.getNodeParameter('saleId', i);
|
|
24
|
+
const response = await shared_1.chariowApiRequest.call(this, 'GET', shared_1.ENDPOINTS.SALE(saleId));
|
|
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/sale/get.ts"],"names":[],"mappings":";;;AAoBA,0BAIC;AAvBD,yCAAyE;AAE5D,QAAA,WAAW,GAAsB;IAC7C;QACC,WAAW,EAAE,SAAS;QACtB,IAAI,EAAE,QAAQ;QACd,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,IAAI;QACd,OAAO,EAAE,EAAE;QACX,cAAc,EAAE;YACf,IAAI,EAAE;gBACL,QAAQ,EAAE,CAAC,MAAM,CAAC;gBAClB,SAAS,EAAE,CAAC,KAAK,CAAC;aAClB;SACD;QACD,WAAW,EAAE,sDAAsD;KACnE;CACD,CAAC;AAEK,KAAK,UAAU,OAAO,CAA0B,CAAS;IAC/D,MAAM,MAAM,GAAG,IAAI,CAAC,gBAAgB,CAAC,QAAQ,EAAE,CAAC,CAAW,CAAC;IAC5D,MAAM,QAAQ,GAAG,MAAM,0BAAiB,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,kBAAS,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;IACnF,OAAO,IAAA,oBAAW,EAAC,QAAQ,CAAgB,CAAC;AAC7C,CAAC"}
|
|
@@ -0,0 +1,94 @@
|
|
|
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: ['sale'],
|
|
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: ['sale'],
|
|
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: ['sale'],
|
|
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: 'Status',
|
|
67
|
+
name: 'status',
|
|
68
|
+
type: 'options',
|
|
69
|
+
options: [
|
|
70
|
+
{ name: 'Abandoned', value: 'abandoned' },
|
|
71
|
+
{ name: 'All', value: '' },
|
|
72
|
+
{ name: 'Completed', value: 'completed' },
|
|
73
|
+
{ name: 'Failed', value: 'failed' },
|
|
74
|
+
{ name: 'Pending', value: 'pending' },
|
|
75
|
+
{ name: 'Refunded', value: 'refunded' },
|
|
76
|
+
],
|
|
77
|
+
default: '',
|
|
78
|
+
description: 'Filter by sale status',
|
|
79
|
+
},
|
|
80
|
+
],
|
|
81
|
+
},
|
|
82
|
+
];
|
|
83
|
+
async function execute(i) {
|
|
84
|
+
const returnAll = this.getNodeParameter('returnAll', i);
|
|
85
|
+
const filters = this.getNodeParameter('filters', i);
|
|
86
|
+
const limit = this.getNodeParameter('limit', i, 50);
|
|
87
|
+
const query = (0, shared_1.buildListQuery)(limit, returnAll, filters);
|
|
88
|
+
if (returnAll) {
|
|
89
|
+
return shared_1.chariowApiRequestAllItems.call(this, 'GET', shared_1.ENDPOINTS.SALES, {}, query);
|
|
90
|
+
}
|
|
91
|
+
const response = await shared_1.chariowApiRequest.call(this, 'GET', shared_1.ENDPOINTS.SALES, {}, query);
|
|
92
|
+
return (0, shared_1.extractData)(response);
|
|
93
|
+
}
|
|
94
|
+
//# sourceMappingURL=getAll.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getAll.js","sourceRoot":"","sources":["../../../../../nodes/Chariow/resources/sale/getAll.ts"],"names":[],"mappings":"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"}
|
|
@@ -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: ['sale'],
|
|
50
|
+
},
|
|
51
|
+
},
|
|
52
|
+
options: [
|
|
53
|
+
{
|
|
54
|
+
name: 'Get',
|
|
55
|
+
value: 'get',
|
|
56
|
+
description: 'Get a sale by ID',
|
|
57
|
+
action: 'Get a sale',
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
name: 'Get Many',
|
|
61
|
+
value: 'getAll',
|
|
62
|
+
description: 'Get many sales',
|
|
63
|
+
action: 'Get many sales',
|
|
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/sale/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,MAAM,CAAC;aAClB;SACD;QACD,OAAO,EAAE;YACR;gBACC,IAAI,EAAE,KAAK;gBACX,KAAK,EAAE,KAAK;gBACZ,WAAW,EAAE,kBAAkB;gBAC/B,MAAM,EAAE,YAAY;aACpB;YACD;gBACC,IAAI,EAAE,UAAU;gBAChB,KAAK,EAAE,QAAQ;gBACf,WAAW,EAAE,gBAAgB;gBAC7B,MAAM,EAAE,gBAAgB;aACxB;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,11 @@
|
|
|
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
|
+
async function execute() {
|
|
8
|
+
const response = await shared_1.chariowApiRequest.call(this, 'GET', shared_1.ENDPOINTS.STORE);
|
|
9
|
+
return (0, shared_1.extractData)(response);
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=getInfo.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getInfo.js","sourceRoot":"","sources":["../../../../../nodes/Chariow/resources/store/getInfo.ts"],"names":[],"mappings":";;;AAKA,0BAGC;AAPD,yCAAyE;AAE5D,QAAA,WAAW,GAAsB,EAAE,CAAC;AAE1C,KAAK,UAAU,OAAO;IAC5B,MAAM,QAAQ,GAAG,MAAM,0BAAiB,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,kBAAS,CAAC,KAAK,CAAC,CAAC;IAC5E,OAAO,IAAA,oBAAW,EAAC,QAAQ,CAAgB,CAAC;AAC7C,CAAC"}
|