@limetech/n8n-nodes-lime 0.3.0 → 0.3.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/dist/credentials/FortnoxApi.credentials.d.ts +9 -0
- package/dist/credentials/FortnoxApi.credentials.js +57 -0
- package/dist/credentials/FortnoxApi.credentials.js.map +1 -0
- package/dist/credentials/LimeCrmApi.credentials.js +3 -2
- package/dist/credentials/LimeCrmApi.credentials.js.map +1 -1
- package/dist/nodes/fortnox/Fortnox.node.d.ts +5 -0
- package/dist/nodes/fortnox/Fortnox.node.js +95 -0
- package/dist/nodes/fortnox/Fortnox.node.js.map +1 -0
- package/dist/nodes/fortnox/Fortnox.node.json +18 -0
- package/dist/nodes/fortnox/FortnoxTrigger.node.d.ts +5 -0
- package/dist/nodes/fortnox/FortnoxTrigger.node.js +155 -0
- package/dist/nodes/fortnox/FortnoxTrigger.node.js.map +1 -0
- package/dist/nodes/fortnox/FortnoxTrigger.node.json +18 -0
- package/dist/nodes/fortnox/commons.d.ts +25 -0
- package/dist/nodes/fortnox/commons.js +44 -0
- package/dist/nodes/fortnox/commons.js.map +1 -0
- package/dist/nodes/fortnox/model.d.ts +20 -0
- package/dist/nodes/fortnox/model.js +3 -0
- package/dist/nodes/fortnox/model.js.map +1 -0
- package/dist/nodes/fortnox/resources/customers/filterParameters.d.ts +2 -0
- package/dist/nodes/fortnox/resources/customers/filterParameters.js +31 -0
- package/dist/nodes/fortnox/resources/customers/filterParameters.js.map +1 -0
- package/dist/nodes/fortnox/resources/customers/index.d.ts +20 -0
- package/dist/nodes/fortnox/resources/customers/index.js +77 -0
- package/dist/nodes/fortnox/resources/customers/index.js.map +1 -0
- package/dist/nodes/fortnox/resources/customers/model.d.ts +99 -0
- package/dist/nodes/fortnox/resources/customers/model.js +3 -0
- package/dist/nodes/fortnox/resources/customers/model.js.map +1 -0
- package/dist/nodes/fortnox/resources/customers/operations/create.operation.d.ts +12 -0
- package/dist/nodes/fortnox/resources/customers/operations/create.operation.js +283 -0
- package/dist/nodes/fortnox/resources/customers/operations/create.operation.js.map +1 -0
- package/dist/nodes/fortnox/resources/customers/operations/delete.operation.d.ts +10 -0
- package/dist/nodes/fortnox/resources/customers/operations/delete.operation.js +36 -0
- package/dist/nodes/fortnox/resources/customers/operations/delete.operation.js.map +1 -0
- package/dist/nodes/fortnox/resources/customers/operations/get.operation.d.ts +11 -0
- package/dist/nodes/fortnox/resources/customers/operations/get.operation.js +36 -0
- package/dist/nodes/fortnox/resources/customers/operations/get.operation.js.map +1 -0
- package/dist/nodes/fortnox/resources/customers/operations/getAll.operation.d.ts +11 -0
- package/dist/nodes/fortnox/resources/customers/operations/getAll.operation.js +68 -0
- package/dist/nodes/fortnox/resources/customers/operations/getAll.operation.js.map +1 -0
- package/dist/nodes/fortnox/resources/customers/operations/update.operation.d.ts +12 -0
- package/dist/nodes/fortnox/resources/customers/operations/update.operation.js +267 -0
- package/dist/nodes/fortnox/resources/customers/operations/update.operation.js.map +1 -0
- package/dist/nodes/fortnox/resources/customers/sortParameters.d.ts +2 -0
- package/dist/nodes/fortnox/resources/customers/sortParameters.js +30 -0
- package/dist/nodes/fortnox/resources/customers/sortParameters.js.map +1 -0
- package/dist/nodes/fortnox/resources/invoice/filterParameters.d.ts +2 -0
- package/dist/nodes/fortnox/resources/invoice/filterParameters.js +72 -0
- package/dist/nodes/fortnox/resources/invoice/filterParameters.js.map +1 -0
- package/dist/nodes/fortnox/resources/invoice/index.d.ts +20 -0
- package/dist/nodes/fortnox/resources/invoice/index.js +71 -0
- package/dist/nodes/fortnox/resources/invoice/index.js.map +1 -0
- package/dist/nodes/fortnox/resources/invoice/invoiceParameters.d.ts +2 -0
- package/dist/nodes/fortnox/resources/invoice/invoiceParameters.js +193 -0
- package/dist/nodes/fortnox/resources/invoice/invoiceParameters.js.map +1 -0
- package/dist/nodes/fortnox/resources/invoice/model.d.ts +150 -0
- package/dist/nodes/fortnox/resources/invoice/model.js +3 -0
- package/dist/nodes/fortnox/resources/invoice/model.js.map +1 -0
- package/dist/nodes/fortnox/resources/invoice/operations/create.operation.d.ts +11 -0
- package/dist/nodes/fortnox/resources/invoice/operations/create.operation.js +64 -0
- package/dist/nodes/fortnox/resources/invoice/operations/create.operation.js.map +1 -0
- package/dist/nodes/fortnox/resources/invoice/operations/get.operation.d.ts +11 -0
- package/dist/nodes/fortnox/resources/invoice/operations/get.operation.js +35 -0
- package/dist/nodes/fortnox/resources/invoice/operations/get.operation.js.map +1 -0
- package/dist/nodes/fortnox/resources/invoice/operations/getAll.operation.d.ts +11 -0
- package/dist/nodes/fortnox/resources/invoice/operations/getAll.operation.js +92 -0
- package/dist/nodes/fortnox/resources/invoice/operations/getAll.operation.js.map +1 -0
- package/dist/nodes/fortnox/resources/invoice/operations/update.operation.d.ts +11 -0
- package/dist/nodes/fortnox/resources/invoice/operations/update.operation.js +62 -0
- package/dist/nodes/fortnox/resources/invoice/operations/update.operation.js.map +1 -0
- package/dist/nodes/fortnox/transport/errorCodes.d.ts +1 -0
- package/dist/nodes/fortnox/transport/errorCodes.js +51 -0
- package/dist/nodes/fortnox/transport/errorCodes.js.map +1 -0
- package/dist/nodes/fortnox/transport/index.d.ts +4 -0
- package/dist/nodes/fortnox/transport/index.js +72 -0
- package/dist/nodes/fortnox/transport/index.js.map +1 -0
- package/dist/nodes/lime-crm/LimeCrm.node.json +18 -0
- package/dist/nodes/lime-crm/LimeCrmNode.node.d.ts +14 -0
- package/dist/nodes/lime-crm/LimeCrmNode.node.js +113 -0
- package/dist/nodes/lime-crm/LimeCrmNode.node.js.map +1 -0
- package/dist/nodes/lime-crm/LimeCrmTrigger.node.d.ts +18 -0
- package/dist/nodes/lime-crm/LimeCrmTrigger.node.js +200 -0
- package/dist/nodes/lime-crm/LimeCrmTrigger.node.js.map +1 -0
- package/dist/nodes/lime-crm/commons/constants.d.ts +4 -0
- package/dist/nodes/lime-crm/commons/constants.js +8 -0
- package/dist/nodes/lime-crm/commons/constants.js.map +1 -0
- package/dist/nodes/lime-crm/commons/index.d.ts +3 -0
- package/dist/nodes/lime-crm/commons/index.js +11 -0
- package/dist/nodes/lime-crm/commons/index.js.map +1 -0
- package/dist/nodes/lime-crm/commons/limetype.d.ts +10 -0
- package/dist/nodes/lime-crm/commons/limetype.js +3 -0
- package/dist/nodes/lime-crm/commons/limetype.js.map +1 -0
- package/dist/nodes/lime-crm/commons/task.d.ts +14 -0
- package/dist/nodes/lime-crm/commons/task.js +49 -0
- package/dist/nodes/lime-crm/commons/task.js.map +1 -0
- package/dist/nodes/lime-crm/commons/webhook.d.ts +16 -0
- package/dist/nodes/lime-crm/commons/webhook.js +30 -0
- package/dist/nodes/lime-crm/commons/webhook.js.map +1 -0
- package/dist/nodes/lime-crm/methods/getEntitiesForErpSystem.d.ts +5 -0
- package/dist/nodes/lime-crm/methods/getEntitiesForErpSystem.js +12 -0
- package/dist/nodes/lime-crm/methods/getEntitiesForErpSystem.js.map +1 -0
- package/dist/nodes/lime-crm/methods/getLimeTypeProperties.d.ts +2 -0
- package/dist/nodes/lime-crm/methods/getLimeTypeProperties.js +21 -0
- package/dist/nodes/lime-crm/methods/getLimeTypeProperties.js.map +1 -0
- package/dist/nodes/lime-crm/methods/getLimeTypes.d.ts +2 -0
- package/dist/nodes/lime-crm/methods/getLimeTypes.js +21 -0
- package/dist/nodes/lime-crm/methods/getLimeTypes.js.map +1 -0
- package/dist/nodes/lime-crm/methods/index.d.ts +3 -0
- package/dist/nodes/lime-crm/methods/index.js +10 -0
- package/dist/nodes/lime-crm/methods/index.js.map +1 -0
- package/dist/nodes/lime-crm/resources/erpConnector/index.d.ts +23 -0
- package/dist/nodes/lime-crm/resources/erpConnector/index.js +57 -0
- package/dist/nodes/lime-crm/resources/erpConnector/index.js.map +1 -0
- package/dist/nodes/lime-crm/resources/erpConnector/operations/createOrUpdateObjects.operation.d.ts +26 -0
- package/dist/nodes/lime-crm/resources/erpConnector/operations/createOrUpdateObjects.operation.js +65 -0
- package/dist/nodes/lime-crm/resources/erpConnector/operations/createOrUpdateObjects.operation.js.map +1 -0
- package/dist/nodes/lime-crm/resources/erpConnector/operations/transform.operation.d.ts +9 -0
- package/dist/nodes/lime-crm/resources/erpConnector/operations/transform.operation.js +220 -0
- package/dist/nodes/lime-crm/resources/erpConnector/operations/transform.operation.js.map +1 -0
- package/dist/nodes/lime-crm/resources/erpConnector/transform.d.ts +15 -0
- package/dist/nodes/lime-crm/resources/erpConnector/transform.js +12 -0
- package/dist/nodes/lime-crm/resources/erpConnector/transform.js.map +1 -0
- package/dist/nodes/lime-crm/resources/erpConnector/transformers/baseTransformer.d.ts +4 -0
- package/dist/nodes/lime-crm/resources/erpConnector/transformers/baseTransformer.js +7 -0
- package/dist/nodes/lime-crm/resources/erpConnector/transformers/baseTransformer.js.map +1 -0
- package/dist/nodes/lime-crm/resources/erpConnector/transformers/fortnox.d.ts +37 -0
- package/dist/nodes/lime-crm/resources/erpConnector/transformers/fortnox.js +124 -0
- package/dist/nodes/lime-crm/resources/erpConnector/transformers/fortnox.js.map +1 -0
- package/dist/nodes/lime-crm/resources/erpConnector/transformers/index.d.ts +1 -0
- package/dist/nodes/lime-crm/resources/erpConnector/transformers/index.js +6 -0
- package/dist/nodes/lime-crm/resources/erpConnector/transformers/index.js.map +1 -0
- package/dist/nodes/lime-crm/resources/limeObject/index.d.ts +14 -0
- package/dist/nodes/lime-crm/resources/limeObject/index.js +78 -0
- package/dist/nodes/lime-crm/resources/limeObject/index.js.map +1 -0
- package/dist/nodes/lime-crm/resources/limeObject/operations/create.operation.d.ts +9 -0
- package/dist/nodes/lime-crm/resources/limeObject/operations/create.operation.js +139 -0
- package/dist/nodes/lime-crm/resources/limeObject/operations/create.operation.js.map +1 -0
- package/dist/nodes/lime-crm/resources/limeObject/operations/delete.operation.d.ts +9 -0
- package/dist/nodes/lime-crm/resources/limeObject/operations/delete.operation.js +51 -0
- package/dist/nodes/lime-crm/resources/limeObject/operations/delete.operation.js.map +1 -0
- package/dist/nodes/lime-crm/resources/limeObject/operations/get.operation.d.ts +9 -0
- package/dist/nodes/lime-crm/resources/limeObject/operations/get.operation.js +51 -0
- package/dist/nodes/lime-crm/resources/limeObject/operations/get.operation.js.map +1 -0
- package/dist/nodes/lime-crm/resources/limeObject/operations/search.operation.d.ts +9 -0
- package/dist/nodes/lime-crm/resources/limeObject/operations/search.operation.js +86 -0
- package/dist/nodes/lime-crm/resources/limeObject/operations/search.operation.js.map +1 -0
- package/dist/nodes/lime-crm/resources/limeObject/operations/update.operation.d.ts +9 -0
- package/dist/nodes/lime-crm/resources/limeObject/operations/update.operation.js +149 -0
- package/dist/nodes/lime-crm/resources/limeObject/operations/update.operation.js.map +1 -0
- package/dist/nodes/lime-crm/resources/limeType/index.d.ts +20 -0
- package/dist/nodes/lime-crm/resources/limeType/index.js +71 -0
- package/dist/nodes/lime-crm/resources/limeType/index.js.map +1 -0
- package/dist/nodes/lime-crm/resources/limeType/operations/getProperties.operation.d.ts +11 -0
- package/dist/nodes/lime-crm/resources/limeType/operations/getProperties.operation.js +36 -0
- package/dist/nodes/lime-crm/resources/limeType/operations/getProperties.operation.js.map +1 -0
- package/dist/nodes/lime-crm/resources/limeType/operations/getType.operation.d.ts +9 -0
- package/dist/nodes/lime-crm/resources/limeType/operations/getType.operation.js +36 -0
- package/dist/nodes/lime-crm/resources/limeType/operations/getType.operation.js.map +1 -0
- package/dist/nodes/lime-crm/resources/limeType/operations/listTypes.operation.d.ts +10 -0
- package/dist/nodes/lime-crm/resources/limeType/operations/listTypes.operation.js +15 -0
- package/dist/nodes/lime-crm/resources/limeType/operations/listTypes.operation.js.map +1 -0
- package/dist/nodes/lime-crm/transport/commons.d.ts +5 -0
- package/dist/nodes/lime-crm/transport/commons.js +33 -0
- package/dist/nodes/lime-crm/transport/commons.js.map +1 -0
- package/dist/nodes/lime-crm/transport/erpConnector.d.ts +9 -0
- package/dist/nodes/lime-crm/transport/erpConnector.js +12 -0
- package/dist/nodes/lime-crm/transport/erpConnector.js.map +1 -0
- package/dist/nodes/lime-crm/transport/index.d.ts +5 -0
- package/dist/nodes/lime-crm/transport/index.js +22 -0
- package/dist/nodes/lime-crm/transport/index.js.map +1 -0
- package/dist/nodes/lime-crm/transport/limeobjects.d.ts +7 -0
- package/dist/nodes/lime-crm/transport/limeobjects.js +49 -0
- package/dist/nodes/lime-crm/transport/limeobjects.js.map +1 -0
- package/dist/nodes/lime-crm/transport/limetypes.d.ts +6 -0
- package/dist/nodes/lime-crm/transport/limetypes.js +40 -0
- package/dist/nodes/lime-crm/transport/limetypes.js.map +1 -0
- package/dist/nodes/lime-crm/transport/task.d.ts +13 -0
- package/dist/nodes/lime-crm/transport/task.js +14 -0
- package/dist/nodes/lime-crm/transport/task.js.map +1 -0
- package/dist/nodes/lime-crm/transport/webhooks.d.ts +15 -0
- package/dist/nodes/lime-crm/transport/webhooks.js +33 -0
- package/dist/nodes/lime-crm/transport/webhooks.js.map +1 -0
- package/dist/nodes/nodeResponse.d.ts +12 -0
- package/dist/nodes/nodeResponse.js +3 -0
- package/dist/nodes/nodeResponse.js.map +1 -0
- package/dist/package.json +36 -16
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.execute = exports.properties = exports.description = void 0;
|
|
4
|
+
const transport_1 = require("../../../transport");
|
|
5
|
+
const commons_1 = require("../../../commons");
|
|
6
|
+
exports.description = {
|
|
7
|
+
name: 'Get Properties',
|
|
8
|
+
value: 'getProperties',
|
|
9
|
+
description: 'Get all properties for a specific entity type',
|
|
10
|
+
action: 'Get entity type properties',
|
|
11
|
+
};
|
|
12
|
+
exports.properties = [
|
|
13
|
+
{
|
|
14
|
+
displayName: 'Type Name',
|
|
15
|
+
name: 'limeType',
|
|
16
|
+
type: 'options',
|
|
17
|
+
typeOptions: {
|
|
18
|
+
loadOptionsMethod: 'getLimeTypes',
|
|
19
|
+
},
|
|
20
|
+
required: true,
|
|
21
|
+
default: '',
|
|
22
|
+
description: 'The name of the entity type to get properties for',
|
|
23
|
+
displayOptions: {
|
|
24
|
+
show: {
|
|
25
|
+
resource: [commons_1.LIMETYPE_RESOURCE],
|
|
26
|
+
operation: ['getProperties'],
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
];
|
|
31
|
+
async function execute(i) {
|
|
32
|
+
const limeType = this.getNodeParameter('limeType', i);
|
|
33
|
+
return (0, transport_1.getProperties)(this, limeType);
|
|
34
|
+
}
|
|
35
|
+
exports.execute = execute;
|
|
36
|
+
//# sourceMappingURL=getProperties.operation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getProperties.operation.js","sourceRoot":"","sources":["../../../../../../nodes/lime-crm/resources/limeType/operations/getProperties.operation.ts"],"names":[],"mappings":";;;AAEA,kDAAmD;AACnD,8CAAuE;AAG1D,QAAA,WAAW,GAAG;IACvB,IAAI,EAAE,gBAAgB;IACtB,KAAK,EAAE,eAAe;IACtB,WAAW,EAAE,+CAA+C;IAC5D,MAAM,EAAE,4BAA4B;CACvC,CAAC;AAEW,QAAA,UAAU,GAAsB;IAEzC;QACI,WAAW,EAAE,WAAW;QACxB,IAAI,EAAE,UAAU;QAChB,IAAI,EAAE,SAAS;QACf,WAAW,EAAE;YACT,iBAAiB,EAAE,cAAc;SACpC;QACD,QAAQ,EAAE,IAAI;QACd,OAAO,EAAE,EAAE;QACX,WAAW,EAAE,mDAAmD;QAChE,cAAc,EAAE;YACZ,IAAI,EAAE;gBACF,QAAQ,EAAE,CAAC,2BAAiB,CAAC;gBAC7B,SAAS,EAAE,CAAC,eAAe,CAAC;aAC/B;SACJ;KACJ;CACJ,CAAC;AAEK,KAAK,UAAU,OAAO,CAEzB,CAAS;IAET,MAAM,QAAQ,GAAG,IAAI,CAAC,gBAAgB,CAAC,UAAU,EAAE,CAAC,CAAW,CAAC;IAEhE,OAAO,IAAA,yBAAa,EAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;AACzC,CAAC;AAPD,0BAOC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { IExecuteFunctions, INodeProperties } from 'n8n-workflow';
|
|
2
|
+
export declare const description: {
|
|
3
|
+
name: string;
|
|
4
|
+
value: string;
|
|
5
|
+
description: string;
|
|
6
|
+
action: string;
|
|
7
|
+
};
|
|
8
|
+
export declare const properties: INodeProperties[];
|
|
9
|
+
export declare function execute(this: IExecuteFunctions, i: number): Promise<import("../../../../nodeResponse").NodeResponse<import("../../../commons").LimeType>>;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.execute = exports.properties = exports.description = void 0;
|
|
4
|
+
const limetypes_1 = require("../../../transport/limetypes");
|
|
5
|
+
const commons_1 = require("../../../commons");
|
|
6
|
+
exports.description = {
|
|
7
|
+
name: 'Get Type',
|
|
8
|
+
value: 'getType',
|
|
9
|
+
description: 'Get details about a specific entity type',
|
|
10
|
+
action: 'Get entity type details',
|
|
11
|
+
};
|
|
12
|
+
exports.properties = [
|
|
13
|
+
{
|
|
14
|
+
displayName: 'Type Name',
|
|
15
|
+
name: 'limeType',
|
|
16
|
+
type: 'options',
|
|
17
|
+
typeOptions: {
|
|
18
|
+
loadOptionsMethod: 'getLimeTypes',
|
|
19
|
+
},
|
|
20
|
+
required: true,
|
|
21
|
+
default: '',
|
|
22
|
+
description: 'The name of the entity type to get details for',
|
|
23
|
+
displayOptions: {
|
|
24
|
+
show: {
|
|
25
|
+
resource: [commons_1.LIMETYPE_RESOURCE],
|
|
26
|
+
operation: ['getType'],
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
];
|
|
31
|
+
async function execute(i) {
|
|
32
|
+
const limeType = this.getNodeParameter('limeType', i);
|
|
33
|
+
return (0, limetypes_1.getLimeType)(this, limeType);
|
|
34
|
+
}
|
|
35
|
+
exports.execute = execute;
|
|
36
|
+
//# sourceMappingURL=getType.operation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getType.operation.js","sourceRoot":"","sources":["../../../../../../nodes/lime-crm/resources/limeType/operations/getType.operation.ts"],"names":[],"mappings":";;;AACA,4DAA2D;AAC3D,8CAAqD;AAExC,QAAA,WAAW,GAAG;IACvB,IAAI,EAAE,UAAU;IAChB,KAAK,EAAE,SAAS;IAChB,WAAW,EAAE,0CAA0C;IACvD,MAAM,EAAE,yBAAyB;CACpC,CAAC;AAEW,QAAA,UAAU,GAAsB;IACzC;QACI,WAAW,EAAE,WAAW;QACxB,IAAI,EAAE,UAAU;QAChB,IAAI,EAAE,SAAS;QACf,WAAW,EAAE;YACT,iBAAiB,EAAE,cAAc;SACpC;QACD,QAAQ,EAAE,IAAI;QACd,OAAO,EAAE,EAAE;QACX,WAAW,EAAE,gDAAgD;QAC7D,cAAc,EAAE;YACZ,IAAI,EAAE;gBACF,QAAQ,EAAE,CAAC,2BAAiB,CAAC;gBAC7B,SAAS,EAAE,CAAC,SAAS,CAAC;aACzB;SACJ;KACJ;CACJ,CAAC;AAEK,KAAK,UAAU,OAAO,CAA0B,CAAS;IAC5D,MAAM,QAAQ,GAAG,IAAI,CAAC,gBAAgB,CAAC,UAAU,EAAE,CAAC,CAAW,CAAC;IAEhE,OAAO,IAAA,uBAAW,EAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;AACvC,CAAC;AAJD,0BAIC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { IExecuteFunctions } from 'n8n-workflow';
|
|
2
|
+
import { LimeType } from '../../../commons';
|
|
3
|
+
import { NodeResponse } from '../../../../nodeResponse';
|
|
4
|
+
export declare const description: {
|
|
5
|
+
name: string;
|
|
6
|
+
value: string;
|
|
7
|
+
description: string;
|
|
8
|
+
action: string;
|
|
9
|
+
};
|
|
10
|
+
export declare function execute(this: IExecuteFunctions): Promise<NodeResponse<LimeType[]>>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.execute = exports.description = void 0;
|
|
4
|
+
const transport_1 = require("../../../transport");
|
|
5
|
+
exports.description = {
|
|
6
|
+
name: 'List Types',
|
|
7
|
+
value: 'listTypes',
|
|
8
|
+
description: 'Get a list of all available entity types',
|
|
9
|
+
action: 'List all entity types',
|
|
10
|
+
};
|
|
11
|
+
async function execute() {
|
|
12
|
+
return await (0, transport_1.getLimeTypesFromApi)(this);
|
|
13
|
+
}
|
|
14
|
+
exports.execute = execute;
|
|
15
|
+
//# sourceMappingURL=listTypes.operation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"listTypes.operation.js","sourceRoot":"","sources":["../../../../../../nodes/lime-crm/resources/limeType/operations/listTypes.operation.ts"],"names":[],"mappings":";;;AAEA,kDAAyD;AAI5C,QAAA,WAAW,GAAG;IACvB,IAAI,EAAE,YAAY;IAClB,KAAK,EAAE,WAAW;IAClB,WAAW,EAAE,0CAA0C;IACvD,MAAM,EAAE,uBAAuB;CAClC,CAAC;AAEK,KAAK,UAAU,OAAO;IAGzB,OAAO,MAAM,IAAA,+BAAmB,EAAC,IAAI,CAAC,CAAC;AAC3C,CAAC;AAJD,0BAIC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { IAllExecuteFunctions } from 'n8n-workflow';
|
|
2
|
+
import { NodeResponse } from '../../nodeResponse';
|
|
3
|
+
type HTTPMethod = 'GET' | 'POST' | 'PUT' | 'DELETE';
|
|
4
|
+
export declare function callLimeApi<T>(nodeContext: IAllExecuteFunctions, method: HTTPMethod, url: string, options?: object): Promise<NodeResponse<T>>;
|
|
5
|
+
export {};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.callLimeApi = void 0;
|
|
4
|
+
const commons_1 = require("../commons");
|
|
5
|
+
async function getLimeUrl(context) {
|
|
6
|
+
const credentials = await context.getCredentials(commons_1.LIME_CRM_API_CREDENTIAL_KEY);
|
|
7
|
+
return credentials.url;
|
|
8
|
+
}
|
|
9
|
+
async function callLimeApi(nodeContext, method, url, options) {
|
|
10
|
+
var _a;
|
|
11
|
+
try {
|
|
12
|
+
const response = await nodeContext.helpers.requestWithAuthentication.call(nodeContext, commons_1.LIME_CRM_API_CREDENTIAL_KEY, {
|
|
13
|
+
method: method,
|
|
14
|
+
url: url,
|
|
15
|
+
json: true,
|
|
16
|
+
baseURL: await getLimeUrl(nodeContext),
|
|
17
|
+
...options,
|
|
18
|
+
});
|
|
19
|
+
return {
|
|
20
|
+
success: true,
|
|
21
|
+
data: response,
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
catch (error) {
|
|
25
|
+
return {
|
|
26
|
+
success: false,
|
|
27
|
+
error: error instanceof Error ? error.message : String(error),
|
|
28
|
+
status: (_a = error === null || error === void 0 ? void 0 : error.cause) === null || _a === void 0 ? void 0 : _a.status,
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
exports.callLimeApi = callLimeApi;
|
|
33
|
+
//# sourceMappingURL=commons.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"commons.js","sourceRoot":"","sources":["../../../../nodes/lime-crm/transport/commons.ts"],"names":[],"mappings":";;;AAAA,wCAAyD;AAMzD,KAAK,UAAU,UAAU,CAAC,OAA6B;IACnD,MAAM,WAAW,GAAG,MAAM,OAAO,CAAC,cAAc,CAC5C,qCAA2B,CAC9B,CAAC;IACF,OAAO,WAAW,CAAC,GAAa,CAAC;AACrC,CAAC;AAEM,KAAK,UAAU,WAAW,CAC7B,WAAiC,EACjC,MAAkB,EAClB,GAAW,EACX,OAAgB;;IAEhB,IAAI,CAAC;QACD,MAAM,QAAQ,GACV,MAAM,WAAW,CAAC,OAAO,CAAC,yBAAyB,CAAC,IAAI,CACpD,WAAW,EACX,qCAA2B,EAC3B;YACI,MAAM,EAAE,MAAM;YACd,GAAG,EAAE,GAAG;YACR,IAAI,EAAE,IAAI;YACV,OAAO,EAAE,MAAM,UAAU,CAAC,WAAW,CAAC;YACtC,GAAG,OAAO;SACb,CACJ,CAAC;QACN,OAAO;YACH,OAAO,EAAE,IAAI;YACb,IAAI,EAAE,QAAQ;SACjB,CAAC;IACN,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACb,OAAO;YACH,OAAO,EAAE,KAAK;YACd,KAAK,EAAE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC;YAC7D,MAAM,EAAE,MAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,KAAK,0CAAE,MAAM;SAC/B,CAAC;IACN,CAAC;AACL,CAAC;AA9BD,kCA8BC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { IAllExecuteFunctions } from 'n8n-workflow';
|
|
2
|
+
import { LimeCrmData } from '../resources/erpConnector/transform';
|
|
3
|
+
import { NodeResponse } from '../../nodeResponse';
|
|
4
|
+
export interface CreateOrUpdateObjectsTaskResponse {
|
|
5
|
+
id: string;
|
|
6
|
+
status: string;
|
|
7
|
+
result: Record<string, unknown> | null;
|
|
8
|
+
}
|
|
9
|
+
export declare function startCreateOrUpdateObjectsTask(nodeContext: IAllExecuteFunctions, data: LimeCrmData): Promise<NodeResponse<CreateOrUpdateObjectsTaskResponse>>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.startCreateOrUpdateObjectsTask = void 0;
|
|
4
|
+
const commons_1 = require("./commons");
|
|
5
|
+
const ERP_CONNECTOR_URL = '/limepkg-erp-connector/';
|
|
6
|
+
async function startCreateOrUpdateObjectsTask(nodeContext, data) {
|
|
7
|
+
return await (0, commons_1.callLimeApi)(nodeContext, 'PUT', ERP_CONNECTOR_URL, {
|
|
8
|
+
body: data,
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
exports.startCreateOrUpdateObjectsTask = startCreateOrUpdateObjectsTask;
|
|
12
|
+
//# sourceMappingURL=erpConnector.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"erpConnector.js","sourceRoot":"","sources":["../../../../nodes/lime-crm/transport/erpConnector.ts"],"names":[],"mappings":";;;AAAA,uCAAwC;AAKxC,MAAM,iBAAiB,GAAG,yBAAyB,CAAC;AAQ7C,KAAK,UAAU,8BAA8B,CAChD,WAAiC,EACjC,IAAiB;IAEjB,OAAO,MAAM,IAAA,qBAAW,EAAC,WAAW,EAAE,KAAK,EAAE,iBAAiB,EAAE;QAC5D,IAAI,EAAE,IAAI;KACb,CAAC,CAAC;AACP,CAAC;AAPD,wEAOC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { getSubscription, deleteSubscription, createSubscription, listSubscriptionsWithExistingData, } from './webhooks';
|
|
2
|
+
export { getLimeTypesFromApi, getProperties } from './limetypes';
|
|
3
|
+
export { createLimeObject, deleteLimeObject, updateLimeObject, getLimeObject, searchLimeObject, } from './limeobjects';
|
|
4
|
+
export { startCreateOrUpdateObjectsTask } from './erpConnector';
|
|
5
|
+
export { callLimeApi } from './commons';
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.callLimeApi = exports.startCreateOrUpdateObjectsTask = exports.searchLimeObject = exports.getLimeObject = exports.updateLimeObject = exports.deleteLimeObject = exports.createLimeObject = exports.getProperties = exports.getLimeTypesFromApi = exports.listSubscriptionsWithExistingData = exports.createSubscription = exports.deleteSubscription = exports.getSubscription = void 0;
|
|
4
|
+
var webhooks_1 = require("./webhooks");
|
|
5
|
+
Object.defineProperty(exports, "getSubscription", { enumerable: true, get: function () { return webhooks_1.getSubscription; } });
|
|
6
|
+
Object.defineProperty(exports, "deleteSubscription", { enumerable: true, get: function () { return webhooks_1.deleteSubscription; } });
|
|
7
|
+
Object.defineProperty(exports, "createSubscription", { enumerable: true, get: function () { return webhooks_1.createSubscription; } });
|
|
8
|
+
Object.defineProperty(exports, "listSubscriptionsWithExistingData", { enumerable: true, get: function () { return webhooks_1.listSubscriptionsWithExistingData; } });
|
|
9
|
+
var limetypes_1 = require("./limetypes");
|
|
10
|
+
Object.defineProperty(exports, "getLimeTypesFromApi", { enumerable: true, get: function () { return limetypes_1.getLimeTypesFromApi; } });
|
|
11
|
+
Object.defineProperty(exports, "getProperties", { enumerable: true, get: function () { return limetypes_1.getProperties; } });
|
|
12
|
+
var limeobjects_1 = require("./limeobjects");
|
|
13
|
+
Object.defineProperty(exports, "createLimeObject", { enumerable: true, get: function () { return limeobjects_1.createLimeObject; } });
|
|
14
|
+
Object.defineProperty(exports, "deleteLimeObject", { enumerable: true, get: function () { return limeobjects_1.deleteLimeObject; } });
|
|
15
|
+
Object.defineProperty(exports, "updateLimeObject", { enumerable: true, get: function () { return limeobjects_1.updateLimeObject; } });
|
|
16
|
+
Object.defineProperty(exports, "getLimeObject", { enumerable: true, get: function () { return limeobjects_1.getLimeObject; } });
|
|
17
|
+
Object.defineProperty(exports, "searchLimeObject", { enumerable: true, get: function () { return limeobjects_1.searchLimeObject; } });
|
|
18
|
+
var erpConnector_1 = require("./erpConnector");
|
|
19
|
+
Object.defineProperty(exports, "startCreateOrUpdateObjectsTask", { enumerable: true, get: function () { return erpConnector_1.startCreateOrUpdateObjectsTask; } });
|
|
20
|
+
var commons_1 = require("./commons");
|
|
21
|
+
Object.defineProperty(exports, "callLimeApi", { enumerable: true, get: function () { return commons_1.callLimeApi; } });
|
|
22
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../nodes/lime-crm/transport/index.ts"],"names":[],"mappings":";;;AAAA,uCAKoB;AAJhB,2GAAA,eAAe,OAAA;AACf,8GAAA,kBAAkB,OAAA;AAClB,8GAAA,kBAAkB,OAAA;AAClB,6HAAA,iCAAiC,OAAA;AAErC,yCAAiE;AAAxD,gHAAA,mBAAmB,OAAA;AAAE,0GAAA,aAAa,OAAA;AAE3C,6CAMuB;AALnB,+GAAA,gBAAgB,OAAA;AAChB,+GAAA,gBAAgB,OAAA;AAChB,+GAAA,gBAAgB,OAAA;AAChB,4GAAA,aAAa,OAAA;AACb,+GAAA,gBAAgB,OAAA;AAEpB,+CAAgE;AAAvD,8HAAA,8BAA8B,OAAA;AACvC,qCAAwC;AAA/B,sGAAA,WAAW,OAAA"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { IAllExecuteFunctions } from 'n8n-workflow';
|
|
2
|
+
import { NodeResponse } from '../../nodeResponse';
|
|
3
|
+
export declare function createLimeObject(nodeContext: IAllExecuteFunctions, limetype: string, data: object): Promise<NodeResponse<unknown>>;
|
|
4
|
+
export declare function deleteLimeObject(nodeContext: IAllExecuteFunctions, limetype: string, id: string): Promise<NodeResponse<void>>;
|
|
5
|
+
export declare function getLimeObject(nodeContext: IAllExecuteFunctions, limetype: string, id: string): Promise<NodeResponse<unknown>>;
|
|
6
|
+
export declare function updateLimeObject(nodeContext: IAllExecuteFunctions, limetype: string, id: string, data: object): Promise<NodeResponse<unknown>>;
|
|
7
|
+
export declare function searchLimeObject(nodeContext: IAllExecuteFunctions, limetype: string, searchField: string, searchTerm: string, limit: number | null, sortField: string | null): Promise<NodeResponse<Array<object>>>;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.searchLimeObject = exports.updateLimeObject = exports.getLimeObject = exports.deleteLimeObject = exports.createLimeObject = void 0;
|
|
4
|
+
const commons_1 = require("./commons");
|
|
5
|
+
const LIMEOBJECT_URL = '/api/v1/limeobject/';
|
|
6
|
+
async function createLimeObject(nodeContext, limetype, data) {
|
|
7
|
+
const url = `${LIMEOBJECT_URL}${limetype}/`;
|
|
8
|
+
return await (0, commons_1.callLimeApi)(nodeContext, 'POST', url, {
|
|
9
|
+
body: data,
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
exports.createLimeObject = createLimeObject;
|
|
13
|
+
async function deleteLimeObject(nodeContext, limetype, id) {
|
|
14
|
+
const url = `${LIMEOBJECT_URL}${limetype}/${id}/`;
|
|
15
|
+
return await (0, commons_1.callLimeApi)(nodeContext, 'DELETE', url);
|
|
16
|
+
}
|
|
17
|
+
exports.deleteLimeObject = deleteLimeObject;
|
|
18
|
+
async function getLimeObject(nodeContext, limetype, id) {
|
|
19
|
+
const url = `${LIMEOBJECT_URL}${limetype}/${id}/`;
|
|
20
|
+
return await (0, commons_1.callLimeApi)(nodeContext, 'GET', url);
|
|
21
|
+
}
|
|
22
|
+
exports.getLimeObject = getLimeObject;
|
|
23
|
+
async function updateLimeObject(nodeContext, limetype, id, data) {
|
|
24
|
+
const url = `${LIMEOBJECT_URL}${limetype}/${id}/`;
|
|
25
|
+
return await (0, commons_1.callLimeApi)(nodeContext, 'PUT', url, {
|
|
26
|
+
body: data,
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
exports.updateLimeObject = updateLimeObject;
|
|
30
|
+
async function searchLimeObject(nodeContext, limetype, searchField, searchTerm, limit, sortField) {
|
|
31
|
+
var _a, _b;
|
|
32
|
+
const url = `${LIMEOBJECT_URL}${limetype}/`;
|
|
33
|
+
const response = await (0, commons_1.callLimeApi)(nodeContext, 'GET', url, {
|
|
34
|
+
qs: {
|
|
35
|
+
...(searchField && searchTerm && { [searchField]: searchTerm }),
|
|
36
|
+
...(limit != null && limit > 0 && { _limit: limit }),
|
|
37
|
+
...(sortField != null && { _sort: sortField }),
|
|
38
|
+
},
|
|
39
|
+
});
|
|
40
|
+
if (response.success) {
|
|
41
|
+
return {
|
|
42
|
+
success: true,
|
|
43
|
+
data: (_b = (_a = response.data) === null || _a === void 0 ? void 0 : _a._embedded.limeobjects) !== null && _b !== void 0 ? _b : [],
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
return response;
|
|
47
|
+
}
|
|
48
|
+
exports.searchLimeObject = searchLimeObject;
|
|
49
|
+
//# sourceMappingURL=limeobjects.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"limeobjects.js","sourceRoot":"","sources":["../../../../nodes/lime-crm/transport/limeobjects.ts"],"names":[],"mappings":";;;AAAA,uCAAwC;AAIxC,MAAM,cAAc,GAAG,qBAAqB,CAAC;AAQtC,KAAK,UAAU,gBAAgB,CAClC,WAAiC,EACjC,QAAgB,EAChB,IAAY;IAEZ,MAAM,GAAG,GAAG,GAAG,cAAc,GAAG,QAAQ,GAAG,CAAC;IAC5C,OAAO,MAAM,IAAA,qBAAW,EAAC,WAAW,EAAE,MAAM,EAAE,GAAG,EAAE;QAC/C,IAAI,EAAE,IAAI;KACb,CAAC,CAAC;AACP,CAAC;AATD,4CASC;AAEM,KAAK,UAAU,gBAAgB,CAClC,WAAiC,EACjC,QAAgB,EAChB,EAAU;IAEV,MAAM,GAAG,GAAG,GAAG,cAAc,GAAG,QAAQ,IAAI,EAAE,GAAG,CAAC;IAClD,OAAO,MAAM,IAAA,qBAAW,EAAC,WAAW,EAAE,QAAQ,EAAE,GAAG,CAAC,CAAC;AACzD,CAAC;AAPD,4CAOC;AAEM,KAAK,UAAU,aAAa,CAC/B,WAAiC,EACjC,QAAgB,EAChB,EAAU;IAEV,MAAM,GAAG,GAAG,GAAG,cAAc,GAAG,QAAQ,IAAI,EAAE,GAAG,CAAC;IAClD,OAAO,MAAM,IAAA,qBAAW,EAAC,WAAW,EAAE,KAAK,EAAE,GAAG,CAAC,CAAC;AACtD,CAAC;AAPD,sCAOC;AAEM,KAAK,UAAU,gBAAgB,CAClC,WAAiC,EACjC,QAAgB,EAChB,EAAU,EACV,IAAY;IAEZ,MAAM,GAAG,GAAG,GAAG,cAAc,GAAG,QAAQ,IAAI,EAAE,GAAG,CAAC;IAClD,OAAO,MAAM,IAAA,qBAAW,EAAC,WAAW,EAAE,KAAK,EAAE,GAAG,EAAE;QAC9C,IAAI,EAAE,IAAI;KACb,CAAC,CAAC;AACP,CAAC;AAVD,4CAUC;AAEM,KAAK,UAAU,gBAAgB,CAClC,WAAiC,EACjC,QAAgB,EAChB,WAAmB,EACnB,UAAkB,EAClB,KAAoB,EACpB,SAAwB;;IAExB,MAAM,GAAG,GAAG,GAAG,cAAc,GAAG,QAAQ,GAAG,CAAC;IAC5C,MAAM,QAAQ,GAAG,MAAM,IAAA,qBAAW,EAC9B,WAAW,EACX,KAAK,EACL,GAAG,EACH;QACI,EAAE,EAAE;YACA,GAAG,CAAC,WAAW,IAAI,UAAU,IAAI,EAAE,CAAC,WAAW,CAAC,EAAE,UAAU,EAAE,CAAC;YAC/D,GAAG,CAAC,KAAK,IAAI,IAAI,IAAI,KAAK,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC;YACpD,GAAG,CAAC,SAAS,IAAI,IAAI,IAAI,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC;SACjD;KACJ,CACJ,CAAC;IAEF,IAAI,QAAQ,CAAC,OAAO,EAAE,CAAC;QACnB,OAAO;YACH,OAAO,EAAE,IAAI;YACb,IAAI,EAAE,MAAA,MAAA,QAAQ,CAAC,IAAI,0CAAE,SAAS,CAAC,WAAW,mCAAI,EAAE;SACnD,CAAC;IACN,CAAC;IACD,OAAO,QAAQ,CAAC;AACpB,CAAC;AA7BD,4CA6BC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { IAllExecuteFunctions } from 'n8n-workflow';
|
|
2
|
+
import { LimeType, LimeTypeProperty } from '../commons';
|
|
3
|
+
import { NodeResponse } from '../../nodeResponse';
|
|
4
|
+
export declare function getLimeTypesFromApi(nodeContext: IAllExecuteFunctions): Promise<NodeResponse<LimeType[]>>;
|
|
5
|
+
export declare function getLimeType(nodeContext: IAllExecuteFunctions, limeType: string): Promise<NodeResponse<LimeType>>;
|
|
6
|
+
export declare function getProperties(nodeContext: IAllExecuteFunctions, limeType: string): Promise<NodeResponse<LimeTypeProperty[]>>;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getProperties = exports.getLimeType = exports.getLimeTypesFromApi = void 0;
|
|
4
|
+
const _1 = require(".");
|
|
5
|
+
const LIMETYPE_URL = '/api/v1/limetype/';
|
|
6
|
+
async function getLimeTypesFromApi(nodeContext) {
|
|
7
|
+
var _a, _b;
|
|
8
|
+
const response = await (0, _1.callLimeApi)(nodeContext, 'GET', LIMETYPE_URL);
|
|
9
|
+
if (response.success) {
|
|
10
|
+
return {
|
|
11
|
+
success: true,
|
|
12
|
+
data: (_b = (_a = response.data) === null || _a === void 0 ? void 0 : _a._links.limetypes) !== null && _b !== void 0 ? _b : [],
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
return response;
|
|
16
|
+
}
|
|
17
|
+
exports.getLimeTypesFromApi = getLimeTypesFromApi;
|
|
18
|
+
async function getLimeType(nodeContext, limeType) {
|
|
19
|
+
const url = `${LIMETYPE_URL}${limeType}/`;
|
|
20
|
+
return await (0, _1.callLimeApi)(nodeContext, 'GET', url);
|
|
21
|
+
}
|
|
22
|
+
exports.getLimeType = getLimeType;
|
|
23
|
+
async function getProperties(nodeContext, limeType) {
|
|
24
|
+
var _a, _b;
|
|
25
|
+
const url = `${LIMETYPE_URL}${limeType}/`;
|
|
26
|
+
const response = await (0, _1.callLimeApi)(nodeContext, 'GET', url, {
|
|
27
|
+
qs: {
|
|
28
|
+
_embed: 'properties',
|
|
29
|
+
},
|
|
30
|
+
});
|
|
31
|
+
if (response.success) {
|
|
32
|
+
return {
|
|
33
|
+
success: true,
|
|
34
|
+
data: (_b = (_a = response.data) === null || _a === void 0 ? void 0 : _a._embedded.properties) !== null && _b !== void 0 ? _b : [],
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
return response;
|
|
38
|
+
}
|
|
39
|
+
exports.getProperties = getProperties;
|
|
40
|
+
//# sourceMappingURL=limetypes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"limetypes.js","sourceRoot":"","sources":["../../../../nodes/lime-crm/transport/limetypes.ts"],"names":[],"mappings":";;;AAAA,wBAAgC;AAKhC,MAAM,YAAY,GAAG,mBAAmB,CAAC;AAclC,KAAK,UAAU,mBAAmB,CACrC,WAAiC;;IAEjC,MAAM,QAAQ,GAAG,MAAM,IAAA,cAAW,EAC9B,WAAW,EACX,KAAK,EACL,YAAY,CACf,CAAC;IACF,IAAI,QAAQ,CAAC,OAAO,EAAE,CAAC;QACnB,OAAO;YACH,OAAO,EAAE,IAAI;YACb,IAAI,EAAE,MAAA,MAAA,QAAQ,CAAC,IAAI,0CAAE,MAAM,CAAC,SAAS,mCAAI,EAAE;SAC9C,CAAC;IACN,CAAC;IACD,OAAO,QAAQ,CAAC;AACpB,CAAC;AAfD,kDAeC;AAEM,KAAK,UAAU,WAAW,CAC7B,WAAiC,EACjC,QAAgB;IAEhB,MAAM,GAAG,GAAG,GAAG,YAAY,GAAG,QAAQ,GAAG,CAAC;IAC1C,OAAO,MAAM,IAAA,cAAW,EAAW,WAAW,EAAE,KAAK,EAAE,GAAG,CAAC,CAAC;AAChE,CAAC;AAND,kCAMC;AAEM,KAAK,UAAU,aAAa,CAC/B,WAAiC,EACjC,QAAgB;;IAEhB,MAAM,GAAG,GAAG,GAAG,YAAY,GAAG,QAAQ,GAAG,CAAC;IAC1C,MAAM,QAAQ,GAAG,MAAM,IAAA,cAAW,EAC9B,WAAW,EACX,KAAK,EACL,GAAG,EACH;QACI,EAAE,EAAE;YACA,MAAM,EAAE,YAAY;SACvB;KACJ,CACJ,CAAC;IAEF,IAAI,QAAQ,CAAC,OAAO,EAAE,CAAC;QACnB,OAAO;YACH,OAAO,EAAE,IAAI;YACb,IAAI,EAAE,MAAA,MAAA,QAAQ,CAAC,IAAI,0CAAE,SAAS,CAAC,UAAU,mCAAI,EAAE;SAClD,CAAC;IACN,CAAC;IACD,OAAO,QAAQ,CAAC;AACpB,CAAC;AAvBD,sCAuBC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { IAllExecuteFunctions } from 'n8n-workflow';
|
|
2
|
+
interface Task {
|
|
3
|
+
id: string;
|
|
4
|
+
status: 'PENDING' | 'STARTED' | 'SUCCESS' | 'FAILURE' | 'REVOKED' | 'RETRY';
|
|
5
|
+
result: unknown;
|
|
6
|
+
}
|
|
7
|
+
interface GetTasksApiResponse {
|
|
8
|
+
_embedded: {
|
|
9
|
+
tasks: Task[];
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
export declare function getTasks(nodeContext: IAllExecuteFunctions, taskId: string): Promise<import("../../nodeResponse").NodeResponse<GetTasksApiResponse>>;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getTasks = void 0;
|
|
4
|
+
const commons_1 = require("./commons");
|
|
5
|
+
const TASK_URL = '/api/v1/task/';
|
|
6
|
+
async function getTasks(nodeContext, taskId) {
|
|
7
|
+
return await (0, commons_1.callLimeApi)(nodeContext, 'GET', TASK_URL, {
|
|
8
|
+
qs: {
|
|
9
|
+
id: taskId,
|
|
10
|
+
},
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
exports.getTasks = getTasks;
|
|
14
|
+
//# sourceMappingURL=task.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"task.js","sourceRoot":"","sources":["../../../../nodes/lime-crm/transport/task.ts"],"names":[],"mappings":";;;AACA,uCAAwC;AAExC,MAAM,QAAQ,GAAG,eAAe,CAAC;AAc1B,KAAK,UAAU,QAAQ,CAC1B,WAAiC,EACjC,MAAc;IAEd,OAAO,MAAM,IAAA,qBAAW,EACpB,WAAW,EACX,KAAK,EACL,QAAQ,EACR;QACI,EAAE,EAAE;YACA,EAAE,EAAE,MAAM;SACb;KACJ,CACJ,CAAC;AACN,CAAC;AAdD,4BAcC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Webhook } from '../commons';
|
|
2
|
+
import { IAllExecuteFunctions } from 'n8n-workflow';
|
|
3
|
+
import { NodeResponse } from '../../nodeResponse';
|
|
4
|
+
interface ApiResponseWebhook {
|
|
5
|
+
id: string;
|
|
6
|
+
name: string;
|
|
7
|
+
enabled: boolean;
|
|
8
|
+
events: string[];
|
|
9
|
+
target_url: string;
|
|
10
|
+
}
|
|
11
|
+
export declare function getSubscription(nodeContext: IAllExecuteFunctions, webhook: Webhook): Promise<NodeResponse<ApiResponseWebhook>>;
|
|
12
|
+
export declare function listSubscriptionsWithExistingData(nodeContext: IAllExecuteFunctions, webhook: Webhook): Promise<NodeResponse<ApiResponseWebhook[]>>;
|
|
13
|
+
export declare function createSubscription(nodeContext: IAllExecuteFunctions, webhook: Webhook): Promise<NodeResponse<ApiResponseWebhook>>;
|
|
14
|
+
export declare function deleteSubscription(nodeContext: IAllExecuteFunctions, webhook: Webhook): Promise<NodeResponse<void>>;
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.deleteSubscription = exports.createSubscription = exports.listSubscriptionsWithExistingData = exports.getSubscription = void 0;
|
|
4
|
+
const _1 = require(".");
|
|
5
|
+
const SUBSCRIPTION_URL = 'api/v1/subscription/';
|
|
6
|
+
async function getSubscription(nodeContext, webhook) {
|
|
7
|
+
return await (0, _1.callLimeApi)(nodeContext, 'GET', `${SUBSCRIPTION_URL}${webhook.data.webhookId}`);
|
|
8
|
+
}
|
|
9
|
+
exports.getSubscription = getSubscription;
|
|
10
|
+
async function listSubscriptionsWithExistingData(nodeContext, webhook) {
|
|
11
|
+
return await (0, _1.callLimeApi)(nodeContext, 'GET', SUBSCRIPTION_URL, {
|
|
12
|
+
qs: {
|
|
13
|
+
events: webhook.events.join(','),
|
|
14
|
+
target_url: webhook.url,
|
|
15
|
+
enabled: true,
|
|
16
|
+
},
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
exports.listSubscriptionsWithExistingData = listSubscriptionsWithExistingData;
|
|
20
|
+
async function createSubscription(nodeContext, webhook) {
|
|
21
|
+
return await (0, _1.callLimeApi)(nodeContext, 'POST', SUBSCRIPTION_URL, {
|
|
22
|
+
body: {
|
|
23
|
+
events: webhook.events,
|
|
24
|
+
target_url: webhook.url,
|
|
25
|
+
},
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
exports.createSubscription = createSubscription;
|
|
29
|
+
async function deleteSubscription(nodeContext, webhook) {
|
|
30
|
+
return await (0, _1.callLimeApi)(nodeContext, 'DELETE', `${SUBSCRIPTION_URL}${webhook.data.webhookId}/`);
|
|
31
|
+
}
|
|
32
|
+
exports.deleteSubscription = deleteSubscription;
|
|
33
|
+
//# sourceMappingURL=webhooks.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"webhooks.js","sourceRoot":"","sources":["../../../../nodes/lime-crm/transport/webhooks.ts"],"names":[],"mappings":";;;AACA,wBAAgC;AAIhC,MAAM,gBAAgB,GAAG,sBAAsB,CAAC;AAUzC,KAAK,UAAU,eAAe,CACjC,WAAiC,EACjC,OAAgB;IAEhB,OAAO,MAAM,IAAA,cAAW,EACpB,WAAW,EACX,KAAK,EACL,GAAG,gBAAgB,GAAG,OAAO,CAAC,IAAI,CAAC,SAAS,EAAE,CACjD,CAAC;AACN,CAAC;AATD,0CASC;AAEM,KAAK,UAAU,iCAAiC,CACnD,WAAiC,EACjC,OAAgB;IAEhB,OAAO,MAAM,IAAA,cAAW,EAAC,WAAW,EAAE,KAAK,EAAE,gBAAgB,EAAE;QAC3D,EAAE,EAAE;YACA,MAAM,EAAE,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC;YAChC,UAAU,EAAE,OAAO,CAAC,GAAG;YACvB,OAAO,EAAE,IAAI;SAChB;KACJ,CAAC,CAAC;AACP,CAAC;AAXD,8EAWC;AAEM,KAAK,UAAU,kBAAkB,CACpC,WAAiC,EACjC,OAAgB;IAEhB,OAAO,MAAM,IAAA,cAAW,EAAC,WAAW,EAAE,MAAM,EAAE,gBAAgB,EAAE;QAC5D,IAAI,EAAE;YACF,MAAM,EAAE,OAAO,CAAC,MAAM;YACtB,UAAU,EAAE,OAAO,CAAC,GAAG;SAC1B;KACJ,CAAC,CAAC;AACP,CAAC;AAVD,gDAUC;AAEM,KAAK,UAAU,kBAAkB,CACpC,WAAiC,EACjC,OAAgB;IAEhB,OAAO,MAAM,IAAA,cAAW,EACpB,WAAW,EACX,QAAQ,EACR,GAAG,gBAAgB,GAAG,OAAO,CAAC,IAAI,CAAC,SAAS,GAAG,CAClD,CAAC;AACN,CAAC;AATD,gDASC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
type SuccessResponse<T> = {
|
|
2
|
+
success: true;
|
|
3
|
+
data: T;
|
|
4
|
+
};
|
|
5
|
+
type FailureResponse = {
|
|
6
|
+
success: false;
|
|
7
|
+
error: string;
|
|
8
|
+
status?: number;
|
|
9
|
+
metadata?: Record<string, unknown>;
|
|
10
|
+
};
|
|
11
|
+
export type NodeResponse<T> = SuccessResponse<T> | FailureResponse;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nodeResponse.js","sourceRoot":"","sources":["../../nodes/nodeResponse.ts"],"names":[],"mappings":""}
|
package/dist/package.json
CHANGED
|
@@ -1,15 +1,19 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@limetech/n8n-nodes-lime",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.1",
|
|
4
4
|
"description": "n8n node to connect to Lime CRM",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "index.js",
|
|
7
7
|
"scripts": {
|
|
8
|
-
"build": "tsc && find nodes -name '*.svg' -exec cp {} dist/{} \\;",
|
|
8
|
+
"build": "tsc && mkdir -p dist/nodes/lime-crm/assets && find nodes -name '*.svg' -exec cp {} dist/{} \\;",
|
|
9
9
|
"dev": "tsc --watch",
|
|
10
10
|
"dev:reload": "nodemon --watch dist --exec 'cp -R dist/* ~/.n8n/custom/dist/'",
|
|
11
11
|
"watch": "concurrently \"npm run dev\" \"npm run dev:reload\"",
|
|
12
|
-
"
|
|
12
|
+
"lint": "eslint --max-warnings=0 .",
|
|
13
|
+
"lint:fix": "eslint --max-warnings=0 . --fix",
|
|
14
|
+
"format": "prettier -c .",
|
|
15
|
+
"format:fix": "prettier --write .",
|
|
16
|
+
"test": "jest"
|
|
13
17
|
},
|
|
14
18
|
"keywords": [
|
|
15
19
|
"n8n",
|
|
@@ -18,35 +22,51 @@
|
|
|
18
22
|
"crm",
|
|
19
23
|
"n8n-community-node-package"
|
|
20
24
|
],
|
|
21
|
-
"files": [
|
|
22
|
-
"dist"
|
|
23
|
-
],
|
|
24
25
|
"n8n": {
|
|
25
26
|
"n8nNodesApiVersion": 1,
|
|
26
27
|
"credentials": [
|
|
27
28
|
"dist/credentials/LimeCrmApi.credentials.js",
|
|
28
|
-
"dist/credentials/
|
|
29
|
+
"dist/credentials/FortnoxApi.credentials.js"
|
|
29
30
|
],
|
|
30
31
|
"nodes": [
|
|
31
|
-
"dist/nodes/LimeCrm
|
|
32
|
-
"dist/nodes/
|
|
33
|
-
"dist/nodes/
|
|
32
|
+
"dist/nodes/lime-crm/LimeCrm.node.js",
|
|
33
|
+
"dist/nodes/fortnox/Fortnox.node.js",
|
|
34
|
+
"dist/nodes/fortnox/FortnoxTrigger.node.js"
|
|
34
35
|
]
|
|
35
36
|
},
|
|
36
37
|
"devDependencies": {
|
|
38
|
+
"@semantic-release/changelog": "^6.0.3",
|
|
39
|
+
"@semantic-release/commit-analyzer": "^13.0.1",
|
|
40
|
+
"@semantic-release/git": "^10.0.1",
|
|
41
|
+
"@semantic-release/github": "^11.0.4",
|
|
42
|
+
"@semantic-release/release-notes-generator": "^14.0.3",
|
|
43
|
+
"@types/jest": "^30.0.0",
|
|
37
44
|
"@types/node": "^16.11.10",
|
|
38
45
|
"@types/request-promise-native": "^1.0.18",
|
|
46
|
+
"@types/ws": "^8.18.1",
|
|
47
|
+
"@typescript-eslint/eslint-plugin": "^8.38.0",
|
|
48
|
+
"@typescript-eslint/parser": "^8.38.0",
|
|
39
49
|
"concurrently": "^7.0.0",
|
|
50
|
+
"eslint": "^9.32.0",
|
|
51
|
+
"eslint-config-prettier": "^10.1.8",
|
|
52
|
+
"eslint-plugin-n8n-nodes-base": "^1.16.1",
|
|
53
|
+
"eslint-plugin-prettier": "^5.5.3",
|
|
54
|
+
"install": "^0.13.0",
|
|
55
|
+
"jest": "^30.0.5",
|
|
40
56
|
"nodemon": "^2.0.15",
|
|
41
|
-
"
|
|
42
|
-
"
|
|
43
|
-
"
|
|
44
|
-
"
|
|
45
|
-
"
|
|
57
|
+
"npm": "^11.5.2",
|
|
58
|
+
"prettier": "^3.6.2",
|
|
59
|
+
"semantic-release": "^24.2.7",
|
|
60
|
+
"ts-jest": "^29.4.1",
|
|
61
|
+
"typescript": "^5.9.2"
|
|
46
62
|
},
|
|
47
63
|
"dependencies": {
|
|
64
|
+
"@limetech/eslint-config": "^3.0.2",
|
|
65
|
+
"@semantic-release/exec": "^7.1.0",
|
|
66
|
+
"currency-codes": "^2.2.0",
|
|
48
67
|
"request": "^2.88.2",
|
|
49
|
-
"request-promise-native": "^1.0.9"
|
|
68
|
+
"request-promise-native": "^1.0.9",
|
|
69
|
+
"ws": "^8.18.3"
|
|
50
70
|
},
|
|
51
71
|
"peerDependencies": {
|
|
52
72
|
"n8n-workflow": "*"
|