@limetech/n8n-nodes-lime 2.5.3 → 2.5.5-dev.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/CHANGELOG.md +14 -0
- 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.d.ts +9 -0
- package/dist/credentials/LimeCrmApi.credentials.js +70 -0
- package/dist/credentials/LimeCrmApi.credentials.js.map +1 -0
- package/dist/credentials/index.d.ts +2 -0
- package/dist/credentials/index.js +19 -0
- package/dist/credentials/index.js.map +1 -0
- package/dist/nodes/errorHandling.d.ts +11 -0
- package/dist/nodes/errorHandling.js +20 -0
- package/dist/nodes/errorHandling.js.map +1 -0
- 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/fortnoxLogo.svg +15 -0
- package/dist/nodes/fortnox/index.d.ts +6 -0
- package/dist/nodes/fortnox/index.js +23 -0
- package/dist/nodes/fortnox/index.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 +7 -0
- package/dist/nodes/fortnox/resources/customers/index.js +85 -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 +10 -0
- package/dist/nodes/fortnox/resources/customers/operations/create.operation.js +281 -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 +9 -0
- package/dist/nodes/fortnox/resources/customers/operations/delete.operation.js +38 -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 +10 -0
- package/dist/nodes/fortnox/resources/customers/operations/get.operation.js +38 -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 +10 -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/index.d.ts +5 -0
- package/dist/nodes/fortnox/resources/customers/operations/index.js +42 -0
- package/dist/nodes/fortnox/resources/customers/operations/index.js.map +1 -0
- package/dist/nodes/fortnox/resources/customers/operations/update.operation.d.ts +10 -0
- package/dist/nodes/fortnox/resources/customers/operations/update.operation.js +261 -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 +7 -0
- package/dist/nodes/fortnox/resources/invoice/index.js +81 -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 +147 -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 +10 -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 +10 -0
- package/dist/nodes/fortnox/resources/invoice/operations/get.operation.js +37 -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 +10 -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/index.d.ts +4 -0
- package/dist/nodes/fortnox/resources/invoice/operations/index.js +41 -0
- package/dist/nodes/fortnox/resources/invoice/operations/index.js.map +1 -0
- package/dist/nodes/fortnox/resources/invoice/operations/update.operation.d.ts +10 -0
- package/dist/nodes/fortnox/resources/invoice/operations/update.operation.js +64 -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 +50 -0
- package/dist/nodes/fortnox/transport/errorCodes.js.map +1 -0
- package/dist/nodes/fortnox/transport/index.d.ts +3 -0
- package/dist/nodes/fortnox/transport/index.js +76 -0
- package/dist/nodes/fortnox/transport/index.js.map +1 -0
- package/dist/nodes/index.d.ts +4 -0
- package/dist/nodes/index.js +21 -0
- package/dist/nodes/index.js.map +1 -0
- package/dist/nodes/lime-crm/LimeCrm.node.json +18 -0
- package/dist/nodes/lime-crm/LimeCrmNode.node.d.ts +19 -0
- package/dist/nodes/lime-crm/LimeCrmNode.node.js +122 -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 +215 -0
- package/dist/nodes/lime-crm/LimeCrmTrigger.node.js.map +1 -0
- package/dist/nodes/lime-crm/assets/lime-crm.svg +1 -0
- package/dist/nodes/lime-crm/index.d.ts +9 -0
- package/dist/nodes/lime-crm/index.js +26 -0
- package/dist/nodes/lime-crm/index.js.map +1 -0
- package/dist/nodes/lime-crm/methods/getLimetypeProperties.d.ts +5 -0
- package/dist/nodes/lime-crm/methods/getLimetypeProperties.js +47 -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 +20 -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 +15 -0
- package/dist/nodes/lime-crm/methods/index.js.map +1 -0
- package/dist/nodes/lime-crm/methods/resourceMapping.d.ts +4 -0
- package/dist/nodes/lime-crm/methods/resourceMapping.js +71 -0
- package/dist/nodes/lime-crm/methods/resourceMapping.js.map +1 -0
- package/dist/nodes/lime-crm/models/constants.d.ts +9 -0
- package/dist/nodes/lime-crm/models/constants.js +10 -0
- package/dist/nodes/lime-crm/models/constants.js.map +1 -0
- package/dist/nodes/lime-crm/models/index.d.ts +6 -0
- package/dist/nodes/lime-crm/models/index.js +13 -0
- package/dist/nodes/lime-crm/models/index.js.map +1 -0
- package/dist/nodes/lime-crm/models/limeobject.d.ts +4 -0
- package/dist/nodes/lime-crm/models/limeobject.js +3 -0
- package/dist/nodes/lime-crm/models/limeobject.js.map +1 -0
- package/dist/nodes/lime-crm/models/limetype.d.ts +24 -0
- package/dist/nodes/lime-crm/models/limetype.js +3 -0
- package/dist/nodes/lime-crm/models/limetype.js.map +1 -0
- package/dist/nodes/lime-crm/models/propertyTypes.d.ts +4 -0
- package/dist/nodes/lime-crm/models/propertyTypes.js +5 -0
- package/dist/nodes/lime-crm/models/propertyTypes.js.map +1 -0
- package/dist/nodes/lime-crm/models/users.d.ts +13 -0
- package/dist/nodes/lime-crm/models/users.js +3 -0
- package/dist/nodes/lime-crm/models/users.js.map +1 -0
- package/dist/nodes/lime-crm/models/webhook.d.ts +18 -0
- package/dist/nodes/lime-crm/models/webhook.js +3 -0
- package/dist/nodes/lime-crm/models/webhook.js.map +1 -0
- package/dist/nodes/lime-crm/resources/admin/index.d.ts +7 -0
- package/dist/nodes/lime-crm/resources/admin/index.js +89 -0
- package/dist/nodes/lime-crm/resources/admin/index.js.map +1 -0
- package/dist/nodes/lime-crm/resources/admin/operations/getManyUsers.operation.d.ts +11 -0
- package/dist/nodes/lime-crm/resources/admin/operations/getManyUsers.operation.js +123 -0
- package/dist/nodes/lime-crm/resources/admin/operations/getManyUsers.operation.js.map +1 -0
- package/dist/nodes/lime-crm/resources/admin/operations/getSingleUser.operation.d.ts +11 -0
- package/dist/nodes/lime-crm/resources/admin/operations/getSingleUser.operation.js +87 -0
- package/dist/nodes/lime-crm/resources/admin/operations/getSingleUser.operation.js.map +1 -0
- package/dist/nodes/lime-crm/resources/admin/operations/index.d.ts +2 -0
- package/dist/nodes/lime-crm/resources/admin/operations/index.js +39 -0
- package/dist/nodes/lime-crm/resources/admin/operations/index.js.map +1 -0
- package/dist/nodes/lime-crm/resources/data/index.d.ts +7 -0
- package/dist/nodes/lime-crm/resources/data/index.js +108 -0
- package/dist/nodes/lime-crm/resources/data/index.js.map +1 -0
- package/dist/nodes/lime-crm/resources/data/operations/createSingleObject.operation.d.ts +11 -0
- package/dist/nodes/lime-crm/resources/data/operations/createSingleObject.operation.js +124 -0
- package/dist/nodes/lime-crm/resources/data/operations/createSingleObject.operation.js.map +1 -0
- package/dist/nodes/lime-crm/resources/data/operations/deleteSingleObject.operation.d.ts +10 -0
- package/dist/nodes/lime-crm/resources/data/operations/deleteSingleObject.operation.js +52 -0
- package/dist/nodes/lime-crm/resources/data/operations/deleteSingleObject.operation.js.map +1 -0
- package/dist/nodes/lime-crm/resources/data/operations/getManyObjects.operation.d.ts +11 -0
- package/dist/nodes/lime-crm/resources/data/operations/getManyObjects.operation.js +299 -0
- package/dist/nodes/lime-crm/resources/data/operations/getManyObjects.operation.js.map +1 -0
- package/dist/nodes/lime-crm/resources/data/operations/getSingleFile.operation.d.ts +9 -0
- package/dist/nodes/lime-crm/resources/data/operations/getSingleFile.operation.js +125 -0
- package/dist/nodes/lime-crm/resources/data/operations/getSingleFile.operation.js.map +1 -0
- package/dist/nodes/lime-crm/resources/data/operations/getSingleObject.operation.d.ts +11 -0
- package/dist/nodes/lime-crm/resources/data/operations/getSingleObject.operation.js +79 -0
- package/dist/nodes/lime-crm/resources/data/operations/getSingleObject.operation.js.map +1 -0
- package/dist/nodes/lime-crm/resources/data/operations/index.d.ts +6 -0
- package/dist/nodes/lime-crm/resources/data/operations/index.js +43 -0
- package/dist/nodes/lime-crm/resources/data/operations/index.js.map +1 -0
- package/dist/nodes/lime-crm/resources/data/operations/updateSingleObject.operation.d.ts +11 -0
- package/dist/nodes/lime-crm/resources/data/operations/updateSingleObject.operation.js +146 -0
- package/dist/nodes/lime-crm/resources/data/operations/updateSingleObject.operation.js.map +1 -0
- package/dist/nodes/lime-crm/resources/metadata/index.d.ts +7 -0
- package/dist/nodes/lime-crm/resources/metadata/index.js +93 -0
- package/dist/nodes/lime-crm/resources/metadata/index.js.map +1 -0
- package/dist/nodes/lime-crm/resources/metadata/operations/getAllLimetypes.operation.d.ts +10 -0
- package/dist/nodes/lime-crm/resources/metadata/operations/getAllLimetypes.operation.js +16 -0
- package/dist/nodes/lime-crm/resources/metadata/operations/getAllLimetypes.operation.js.map +1 -0
- package/dist/nodes/lime-crm/resources/metadata/operations/getSingleFileMetadata.operation.d.ts +11 -0
- package/dist/nodes/lime-crm/resources/metadata/operations/getSingleFileMetadata.operation.js +113 -0
- package/dist/nodes/lime-crm/resources/metadata/operations/getSingleFileMetadata.operation.js.map +1 -0
- package/dist/nodes/lime-crm/resources/metadata/operations/getSingleLimetype.operation.d.ts +11 -0
- package/dist/nodes/lime-crm/resources/metadata/operations/getSingleLimetype.operation.js +37 -0
- package/dist/nodes/lime-crm/resources/metadata/operations/getSingleLimetype.operation.js.map +1 -0
- package/dist/nodes/lime-crm/resources/metadata/operations/index.d.ts +3 -0
- package/dist/nodes/lime-crm/resources/metadata/operations/index.js +40 -0
- package/dist/nodes/lime-crm/resources/metadata/operations/index.js.map +1 -0
- package/dist/nodes/lime-crm/transport/commons.d.ts +14 -0
- package/dist/nodes/lime-crm/transport/commons.js +52 -0
- package/dist/nodes/lime-crm/transport/commons.js.map +1 -0
- package/dist/nodes/lime-crm/transport/files.d.ts +26 -0
- package/dist/nodes/lime-crm/transport/files.js +96 -0
- package/dist/nodes/lime-crm/transport/files.js.map +1 -0
- package/dist/nodes/lime-crm/transport/index.d.ts +7 -0
- package/dist/nodes/lime-crm/transport/index.js +32 -0
- package/dist/nodes/lime-crm/transport/index.js.map +1 -0
- package/dist/nodes/lime-crm/transport/limeQuery.d.ts +10 -0
- package/dist/nodes/lime-crm/transport/limeQuery.js +18 -0
- package/dist/nodes/lime-crm/transport/limeQuery.js.map +1 -0
- package/dist/nodes/lime-crm/transport/limeobjects.d.ts +16 -0
- package/dist/nodes/lime-crm/transport/limeobjects.js +76 -0
- package/dist/nodes/lime-crm/transport/limeobjects.js.map +1 -0
- package/dist/nodes/lime-crm/transport/limetypes.d.ts +33 -0
- package/dist/nodes/lime-crm/transport/limetypes.js +85 -0
- package/dist/nodes/lime-crm/transport/limetypes.js.map +1 -0
- package/dist/nodes/lime-crm/transport/users.d.ts +6 -0
- package/dist/nodes/lime-crm/transport/users.js +159 -0
- package/dist/nodes/lime-crm/transport/users.js.map +1 -0
- package/dist/nodes/lime-crm/transport/webhooks.d.ts +14 -0
- package/dist/nodes/lime-crm/transport/webhooks.js +51 -0
- package/dist/nodes/lime-crm/transport/webhooks.js.map +1 -0
- package/dist/nodes/lime-crm/utils/files.d.ts +8 -0
- package/dist/nodes/lime-crm/utils/files.js +103 -0
- package/dist/nodes/lime-crm/utils/files.js.map +1 -0
- package/dist/nodes/lime-crm/utils/hmac.d.ts +1 -0
- package/dist/nodes/lime-crm/utils/hmac.js +11 -0
- package/dist/nodes/lime-crm/utils/hmac.js.map +1 -0
- package/dist/nodes/lime-crm/utils/index.d.ts +4 -0
- package/dist/nodes/lime-crm/utils/index.js +16 -0
- package/dist/nodes/lime-crm/utils/index.js.map +1 -0
- package/dist/nodes/lime-crm/utils/webhook.d.ts +2 -0
- package/dist/nodes/lime-crm/utils/webhook.js +34 -0
- package/dist/nodes/lime-crm/utils/webhook.js.map +1 -0
- package/dist/nodes/modules.d.ts +12 -0
- package/dist/nodes/modules.js +16 -0
- package/dist/nodes/modules.js.map +1 -0
- package/dist/nodes/response.d.ts +18 -0
- package/dist/nodes/response.js +3 -0
- package/dist/nodes/response.js.map +1 -0
- package/dist/package.json +69 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/package.json +1 -2
- package/.github/workflows/lint.yml +0 -23
- package/.github/workflows/mark-stale.yml +0 -21
- package/.github/workflows/release.yml +0 -35
- package/.github/workflows/test-and-build.yml +0 -32
- package/.prettierrc.mjs +0 -1
- package/.releaserc.json +0 -35
- package/Dockerfile +0 -0
- package/eslint.config.mjs +0 -28
- package/jest.config.js +0 -11
- package/knip.json +0 -9
- package/tests/nodes/lime-crm/methods.spec.ts +0 -91
- package/tests/nodes/lime-crm/utils.spec.ts +0 -273
- package/tsconfig.json +0 -30
- package/typedoc.css +0 -9
- package/typedoc.json +0 -19
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.LimeCrmTrigger = void 0;
|
|
4
|
+
const n8n_workflow_1 = require("n8n-workflow");
|
|
5
|
+
const models_1 = require("./models");
|
|
6
|
+
const methods_1 = require("./methods");
|
|
7
|
+
const transport_1 = require("./transport");
|
|
8
|
+
const utils_1 = require("./utils");
|
|
9
|
+
class LimeCrmTrigger {
|
|
10
|
+
constructor() {
|
|
11
|
+
this.description = {
|
|
12
|
+
displayName: 'Lime CRM Trigger',
|
|
13
|
+
name: 'limeCrmTrigger',
|
|
14
|
+
icon: 'file:assets/lime-crm.svg',
|
|
15
|
+
group: ['trigger'],
|
|
16
|
+
version: 1,
|
|
17
|
+
description: 'Trigger which handles webhooks coming from Lime, e.g when ' +
|
|
18
|
+
'an object is updated',
|
|
19
|
+
defaults: {
|
|
20
|
+
name: 'Lime CRM Trigger',
|
|
21
|
+
},
|
|
22
|
+
inputs: [],
|
|
23
|
+
outputs: [n8n_workflow_1.NodeConnectionTypes.Main],
|
|
24
|
+
credentials: [
|
|
25
|
+
{
|
|
26
|
+
name: models_1.LIME_CRM_API_CREDENTIAL_KEY,
|
|
27
|
+
required: true,
|
|
28
|
+
},
|
|
29
|
+
],
|
|
30
|
+
webhooks: [
|
|
31
|
+
{
|
|
32
|
+
name: 'default',
|
|
33
|
+
httpMethod: 'POST',
|
|
34
|
+
responseMode: 'onReceived',
|
|
35
|
+
path: 'webhook',
|
|
36
|
+
},
|
|
37
|
+
],
|
|
38
|
+
properties: [
|
|
39
|
+
{
|
|
40
|
+
displayName: 'Events',
|
|
41
|
+
name: 'events',
|
|
42
|
+
type: 'fixedCollection',
|
|
43
|
+
typeOptions: {
|
|
44
|
+
multipleValues: true,
|
|
45
|
+
required: true,
|
|
46
|
+
},
|
|
47
|
+
default: {},
|
|
48
|
+
placeholder: 'Add Event',
|
|
49
|
+
description: 'Events to subscribe to',
|
|
50
|
+
options: [
|
|
51
|
+
{
|
|
52
|
+
name: 'event',
|
|
53
|
+
displayName: 'Event',
|
|
54
|
+
values: [
|
|
55
|
+
{
|
|
56
|
+
displayName: 'Limetype',
|
|
57
|
+
name: 'limetype',
|
|
58
|
+
type: 'options',
|
|
59
|
+
typeOptions: {
|
|
60
|
+
loadOptionsMethod: 'getLimetypes',
|
|
61
|
+
},
|
|
62
|
+
default: '',
|
|
63
|
+
description: 'Limetype to subscribe to events for',
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
displayName: 'Event',
|
|
67
|
+
name: 'eventType',
|
|
68
|
+
type: 'options',
|
|
69
|
+
options: [
|
|
70
|
+
{
|
|
71
|
+
name: 'New',
|
|
72
|
+
value: 'new',
|
|
73
|
+
description: 'When a new object is created',
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
name: 'Update',
|
|
77
|
+
value: 'update',
|
|
78
|
+
description: 'When an object is updated',
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
name: 'Delete',
|
|
82
|
+
value: 'delete',
|
|
83
|
+
description: 'When an object is deleted',
|
|
84
|
+
},
|
|
85
|
+
],
|
|
86
|
+
default: 'new',
|
|
87
|
+
description: 'Event to subscribe to',
|
|
88
|
+
},
|
|
89
|
+
],
|
|
90
|
+
},
|
|
91
|
+
],
|
|
92
|
+
},
|
|
93
|
+
],
|
|
94
|
+
};
|
|
95
|
+
this.methods = {
|
|
96
|
+
loadOptions: {
|
|
97
|
+
getLimetypes: methods_1.getLimetypes,
|
|
98
|
+
},
|
|
99
|
+
};
|
|
100
|
+
this.webhookMethods = {
|
|
101
|
+
default: {
|
|
102
|
+
async checkExists() {
|
|
103
|
+
var _a;
|
|
104
|
+
const webhook = (0, utils_1.getWebhook)(this);
|
|
105
|
+
if (!webhook.data.webhookId) {
|
|
106
|
+
return false;
|
|
107
|
+
}
|
|
108
|
+
try {
|
|
109
|
+
await (0, transport_1.getSubscription)(this, webhook);
|
|
110
|
+
}
|
|
111
|
+
catch (error) {
|
|
112
|
+
if (((_a = error.cause) === null || _a === void 0 ? void 0 : _a.status) === 404) {
|
|
113
|
+
delete webhook.data.webhookId;
|
|
114
|
+
delete webhook.data.webhookEvents;
|
|
115
|
+
return false;
|
|
116
|
+
}
|
|
117
|
+
n8n_workflow_1.LoggerProxy.warn(`There was en error while getting a webhook from Lime CRM: ${error}`);
|
|
118
|
+
throw new n8n_workflow_1.NodeApiError(this.getNode(), error);
|
|
119
|
+
}
|
|
120
|
+
return true;
|
|
121
|
+
},
|
|
122
|
+
async create() {
|
|
123
|
+
const webhook = (0, utils_1.getWebhook)(this);
|
|
124
|
+
const webhookUrl = webhook.url;
|
|
125
|
+
if (!webhookUrl) {
|
|
126
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'Invalid Webhook URL. Please make sure that it is not localhost!');
|
|
127
|
+
}
|
|
128
|
+
const existingSubscriptionResponse = await (0, transport_1.listSubscriptionsWithExistingData)(this, webhook);
|
|
129
|
+
if (!existingSubscriptionResponse.success) {
|
|
130
|
+
throw new n8n_workflow_1.NodeApiError(this.getNode(), {
|
|
131
|
+
message: existingSubscriptionResponse.data.error.message,
|
|
132
|
+
});
|
|
133
|
+
}
|
|
134
|
+
if (existingSubscriptionResponse.data.length === 0) {
|
|
135
|
+
const credentials = await this.getCredentials(models_1.LIME_CRM_API_CREDENTIAL_KEY);
|
|
136
|
+
const webhookCreateData = {
|
|
137
|
+
...webhook,
|
|
138
|
+
secret: credentials.webhookSecret,
|
|
139
|
+
};
|
|
140
|
+
const createSubscriptionResponse = await (0, transport_1.createSubscription)(this, webhookCreateData);
|
|
141
|
+
if (!createSubscriptionResponse.success) {
|
|
142
|
+
throw new n8n_workflow_1.NodeApiError(this.getNode(), {
|
|
143
|
+
message: createSubscriptionResponse.data.error.message,
|
|
144
|
+
});
|
|
145
|
+
}
|
|
146
|
+
const subscriptionId = createSubscriptionResponse.data.id;
|
|
147
|
+
const events = createSubscriptionResponse.data.events;
|
|
148
|
+
webhook.data.webhookId = subscriptionId;
|
|
149
|
+
webhook.data.webhookEvents = events;
|
|
150
|
+
n8n_workflow_1.LoggerProxy.info(`Webhook with URL ${webhook.url}, ID ${subscriptionId} and events ${events} created!`);
|
|
151
|
+
return true;
|
|
152
|
+
}
|
|
153
|
+
else {
|
|
154
|
+
const limeWebhook = existingSubscriptionResponse.data[0];
|
|
155
|
+
webhook.data.webhookId = limeWebhook.id;
|
|
156
|
+
webhook.data.webhookEvents = limeWebhook.events;
|
|
157
|
+
n8n_workflow_1.LoggerProxy.info(`Webhook with URL ${webhook.url}, and events ${webhook.events} exists in Lime.
|
|
158
|
+
ID ${limeWebhook.id} set up to the N8N data.`);
|
|
159
|
+
return true;
|
|
160
|
+
}
|
|
161
|
+
},
|
|
162
|
+
async delete() {
|
|
163
|
+
const webhook = (0, utils_1.getWebhook)(this);
|
|
164
|
+
n8n_workflow_1.LoggerProxy.info(`Deleting webhook with ID: ${webhook.data.webhookId}`, { ...webhook });
|
|
165
|
+
if (webhook.data.webhookId !== undefined) {
|
|
166
|
+
try {
|
|
167
|
+
await (0, transport_1.deleteSubscription)(this, webhook);
|
|
168
|
+
}
|
|
169
|
+
catch {
|
|
170
|
+
n8n_workflow_1.LoggerProxy.error(`Failed to delete webhook with ID: ${webhook.data.webhookId}`, {
|
|
171
|
+
...webhook,
|
|
172
|
+
});
|
|
173
|
+
return false;
|
|
174
|
+
}
|
|
175
|
+
delete webhook.data.webhookId;
|
|
176
|
+
n8n_workflow_1.LoggerProxy.info('Webhook deleted successfully', { ...webhook });
|
|
177
|
+
return true;
|
|
178
|
+
}
|
|
179
|
+
return false;
|
|
180
|
+
},
|
|
181
|
+
},
|
|
182
|
+
};
|
|
183
|
+
}
|
|
184
|
+
async webhook() {
|
|
185
|
+
const webhook = (0, utils_1.getWebhook)(this);
|
|
186
|
+
n8n_workflow_1.LoggerProxy.info('Webhook received. Starting webhook processing...', {
|
|
187
|
+
...webhook.context,
|
|
188
|
+
});
|
|
189
|
+
const credentials = await this.getCredentials(models_1.LIME_CRM_API_CREDENTIAL_KEY);
|
|
190
|
+
const webhookSecret = credentials.webhookSecret;
|
|
191
|
+
const requestObject = this.getRequestObject();
|
|
192
|
+
const headerData = this.getHeaderData();
|
|
193
|
+
const bodyData = this.getBodyData();
|
|
194
|
+
const limeSignature = headerData['x-lime-signature'];
|
|
195
|
+
if ((webhookSecret || limeSignature) &&
|
|
196
|
+
!(0, utils_1.verifyHmac)(webhookSecret, requestObject.rawBody, limeSignature)) {
|
|
197
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'Webhook authentication failed, secret keys do not match!');
|
|
198
|
+
}
|
|
199
|
+
if (!bodyData || !bodyData.event || !bodyData.body) {
|
|
200
|
+
n8n_workflow_1.LoggerProxy.warn('Webhook data is invalid. Missing event or body', {
|
|
201
|
+
...webhook.context,
|
|
202
|
+
});
|
|
203
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'Webhook data is invalid');
|
|
204
|
+
}
|
|
205
|
+
const returnData = [];
|
|
206
|
+
returnData.push({
|
|
207
|
+
body: bodyData,
|
|
208
|
+
headers: headerData,
|
|
209
|
+
query: this.getQueryData(),
|
|
210
|
+
});
|
|
211
|
+
return { workflowData: [this.helpers.returnJsonArray(returnData)] };
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
exports.LimeCrmTrigger = LimeCrmTrigger;
|
|
215
|
+
//# sourceMappingURL=LimeCrmTrigger.node.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LimeCrmTrigger.node.js","sourceRoot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,CAAC,CAAC;YACH,MAAM,IAAI,iCAAkB,CACxB,IAAI,CAAC,OAAO,EAAE,EACd,yBAAyB,CAC5B,CAAC;QACN,CAAC;QAED,MAAM,UAAU,GAAkB,EAAE,CAAC;QACrC,UAAU,CAAC,IAAI,CAAC;YACZ,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE,UAAU;YACnB,KAAK,EAAE,IAAI,CAAC,YAAY,EAAE;SAC7B,CAAC,CAAC;QAEH,OAAO,EAAE,YAAY,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,eAAe,CAAC,UAAU,CAAC,CAAC,EAAE,CAAC;IACxE,CAAC;CACJ;AApSD,wCAoSC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg viewBox="0 0 1024 1025" xmlns="http://www.w3.org/2000/svg" xml:space="preserve"><clipPath id="a"><path d="M0 .03h1024v1024H0z"/></clipPath><g clip-path="url(#a)"><path d="M92.399 480.888c0-257.059 208.719-465.779 465.78-465.779C815.28 15.109 1024 223.829 1024 480.888c0 133.713-55.806 271.139-193.403 385.355-166.779 138.45-390.39 157.35-736.15 134.525-102.653-6.785-117.502-24.319-64.468-63.444 166.694-123.047 62.42-217.167 62.42-456.436Z" style="fill:#bee034"/><clipPath id="b"><path d="M92.399 480.888c0-257.059 208.719-465.779 465.78-465.779C815.28 15.109 1024 223.829 1024 480.888c0 133.713-55.806 271.139-193.403 385.355-166.779 138.45-390.39 157.35-736.15 134.525-102.653-6.785-117.502-24.319-64.468-63.444 166.694-123.047 62.42-217.167 62.42-456.436Z"/></clipPath><g clip-path="url(#b)"><path d="M1023-361.59c0 784.587-711.326 1420.62-1588.79 1420.62C-1402.638-283.55 1023-1146.18 1023-361.59Z" style="fill:#a6efff;filter:blur(200px)"/></g><path d="M433.85 723.911c-24.702-12.757-47.23-29.226-66.813-48.596-9.088-9.002-23.765-8.959-32.768.129-9.001 9.087-8.916 23.763.171 32.766 22.911 22.698 49.236 41.941 78.121 56.873 11.392 5.888 25.385 1.409 31.231-9.94 5.888-11.349 1.409-25.344-9.942-31.232Zm367.266-363.98a270.163 270.163 0 0 1 25.556 78.547c2.048 12.629 13.952 21.206 26.581 19.158 12.586-2.006 21.204-13.951 19.156-26.539a316.387 316.387 0 0 0-29.907-92.029c-5.803-11.434-19.754-15.999-31.146-10.24-11.393 5.76-16 19.713-10.24 31.103Zm-51.497 315.384c-19.584 19.37-42.069 35.839-66.815 48.596-11.349 5.888-15.786 19.883-9.94 31.232 5.887 11.349 19.881 15.828 31.229 9.94 28.929-14.932 55.253-34.175 78.164-56.873 9.045-9.003 9.131-23.679.128-32.766-9.002-9.088-23.678-9.131-32.766-.129ZM517.006 213.546a274.904 274.904 0 0 1 41.343-3.114c14.036 0 27.861 1.066 41.343 3.114 12.629 1.919 24.448-6.784 26.367-19.413 1.962-12.628-6.741-24.446-19.371-26.409a322.626 322.626 0 0 0-48.339-3.627 322.201 322.201 0 0 0-48.34 3.627c-12.672 1.963-21.332 13.781-19.413 26.409 1.92 12.629 13.739 21.332 26.41 19.413Zm41.343 490.355c-40.489 0-73.385 32.853-73.385 73.342s32.896 73.385 73.385 73.385c40.489 0 73.342-32.896 73.342-73.385 0-40.489-32.853-73.342-73.342-73.342ZM290.025 438.478c4.481-27.818 13.227-54.227 25.514-78.547 5.761-11.39 1.195-25.343-10.239-31.103-11.392-5.759-25.343-1.194-31.104 10.24a313.893 313.893 0 0 0-29.908 92.029c-2.048 12.588 6.527 24.533 19.157 26.539 12.629 2.048 24.532-6.529 26.58-19.158Zm479.092 112.254c-12.501 38.527 8.618 79.955 47.102 92.456 38.528 12.502 79.956-8.618 92.457-47.104 12.501-38.525-8.619-79.953-47.103-92.455-38.527-12.501-79.955 8.619-92.456 47.103Zm-80.51-247.802c32.766 23.808 78.675 16.554 102.482-16.212 23.808-32.767 16.512-78.675-16.256-102.482-32.723-23.809-78.675-16.512-102.439 16.254-23.808 32.725-16.555 78.633 16.213 102.44Zm-260.558 0c32.766-23.807 40.063-69.715 16.254-102.44-23.807-32.766-69.715-40.063-102.482-16.254-32.766 23.807-40.02 69.715-16.255 102.482 23.806 32.766 69.758 40.02 102.483 16.212Zm-80.51 247.802c-12.501-38.484-53.929-59.604-92.415-47.103-38.526 12.502-59.645 53.93-47.102 92.455 12.501 38.486 53.929 59.606 92.413 47.104 38.528-12.501 59.605-53.929 47.104-92.456Z" style="fill:#fff"/></g></svg>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export * from './utils';
|
|
2
|
+
export * from './methods';
|
|
3
|
+
export * from './models';
|
|
4
|
+
export * from './resources/data';
|
|
5
|
+
export * from './resources/metadata';
|
|
6
|
+
export * from './resources/admin';
|
|
7
|
+
export * from './transport';
|
|
8
|
+
export * from './LimeCrmNode.node';
|
|
9
|
+
export * from './LimeCrmTrigger.node';
|
|
@@ -0,0 +1,26 @@
|
|
|
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 __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./utils"), exports);
|
|
18
|
+
__exportStar(require("./methods"), exports);
|
|
19
|
+
__exportStar(require("./models"), exports);
|
|
20
|
+
__exportStar(require("./resources/data"), exports);
|
|
21
|
+
__exportStar(require("./resources/metadata"), exports);
|
|
22
|
+
__exportStar(require("./resources/admin"), exports);
|
|
23
|
+
__exportStar(require("./transport"), exports);
|
|
24
|
+
__exportStar(require("./LimeCrmNode.node"), exports);
|
|
25
|
+
__exportStar(require("./LimeCrmTrigger.node"), exports);
|
|
26
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../nodes/lime-crm/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0CAAwB;AACxB,4CAA0B;AAC1B,2CAAyB;AACzB,mDAAiC;AACjC,uDAAqC;AACrC,oDAAkC;AAClC,8CAA4B;AAC5B,qDAAmC;AACnC,wDAAsC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { ILoadOptionsFunctions, INodePropertyOptions } from 'n8n-workflow';
|
|
2
|
+
export declare function getFilteredLimetypeProperties(loader: ILoadOptionsFunctions, allowedTypes?: Set<string>, forbiddenType?: Set<string>): Promise<INodePropertyOptions[]>;
|
|
3
|
+
export declare function getLimetypeProperties(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]>;
|
|
4
|
+
export declare function getFileProperties(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]>;
|
|
5
|
+
export declare function getNoHasManyProperties(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]>;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getFilteredLimetypeProperties = getFilteredLimetypeProperties;
|
|
4
|
+
exports.getLimetypeProperties = getLimetypeProperties;
|
|
5
|
+
exports.getFileProperties = getFileProperties;
|
|
6
|
+
exports.getNoHasManyProperties = getNoHasManyProperties;
|
|
7
|
+
const n8n_workflow_1 = require("n8n-workflow");
|
|
8
|
+
const transport_1 = require("../transport/");
|
|
9
|
+
async function fetchAllProperties(nodeContext) {
|
|
10
|
+
const limetype = nodeContext.getNodeParameter('limetype', '');
|
|
11
|
+
n8n_workflow_1.LoggerProxy.info(`Fetching file properties for Lime type: ${limetype}`);
|
|
12
|
+
if (!limetype)
|
|
13
|
+
return [];
|
|
14
|
+
try {
|
|
15
|
+
const response = await (0, transport_1.getProperties)(nodeContext, limetype);
|
|
16
|
+
if (!response.success)
|
|
17
|
+
return [];
|
|
18
|
+
return response.data;
|
|
19
|
+
}
|
|
20
|
+
catch (error) {
|
|
21
|
+
n8n_workflow_1.LoggerProxy.warn(`There was a problem with fetching properties: ${error}`);
|
|
22
|
+
return [];
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
async function getFilteredLimetypeProperties(loader, allowedTypes, forbiddenType) {
|
|
26
|
+
const properties = await fetchAllProperties(loader);
|
|
27
|
+
return properties
|
|
28
|
+
.filter((property) => (!allowedTypes || allowedTypes.has(property.type)) &&
|
|
29
|
+
(!forbiddenType || !forbiddenType.has(property.type)))
|
|
30
|
+
.map((property) => ({
|
|
31
|
+
name: property.localname || property.name,
|
|
32
|
+
value: property.name,
|
|
33
|
+
description: `Type: ${property.type} | Name: ${property.name}${property.required ? ' (Required)' : ''}`,
|
|
34
|
+
type: property.type,
|
|
35
|
+
}))
|
|
36
|
+
.sort((a, b) => a.name.localeCompare(b.name));
|
|
37
|
+
}
|
|
38
|
+
async function getLimetypeProperties() {
|
|
39
|
+
return getFilteredLimetypeProperties(this);
|
|
40
|
+
}
|
|
41
|
+
async function getFileProperties() {
|
|
42
|
+
return getFilteredLimetypeProperties(this, new Set(['file']));
|
|
43
|
+
}
|
|
44
|
+
async function getNoHasManyProperties() {
|
|
45
|
+
return getFilteredLimetypeProperties(this, undefined, new Set(['hasmany']));
|
|
46
|
+
}
|
|
47
|
+
//# sourceMappingURL=getLimetypeProperties.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getLimetypeProperties.js","sourceRoot":"","sources":["../../../../nodes/lime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,CAAC,IAAc;QAC9B,WAAW,EAAE,SAAS,QAAQ,CAAC,IAAc,YAAY,QAAQ,CAAC,IAAc,GAAI,QAAQ,CAAC,QAAoB,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,EAAE,EAAE;QACxI,IAAI,EAAE,QAAQ,CAAC,IAAI;KACtB,CAAC,CAAC;SACF,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;AACtD,CAAC;AAUM,KAAK,UAAU,qBAAqB;IAGvC,OAAO,6BAA6B,CAAC,IAAI,CAAC,CAAC;AAC/C,CAAC;AAUM,KAAK,UAAU,iBAAiB;IAGnC,OAAO,6BAA6B,CAAC,IAAI,EAAE,IAAI,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;AAClE,CAAC;AAUM,KAAK,UAAU,sBAAsB;IAGxC,OAAO,6BAA6B,CAAC,IAAI,EAAE,SAAS,EAAE,IAAI,GAAG,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;AAChF,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getLimetypes = getLimetypes;
|
|
4
|
+
const transport_1 = require("../transport");
|
|
5
|
+
async function getLimetypes() {
|
|
6
|
+
var _a;
|
|
7
|
+
const data = [];
|
|
8
|
+
const response = await (0, transport_1.getLimetypesFromApi)(this);
|
|
9
|
+
if (!response.success)
|
|
10
|
+
return [];
|
|
11
|
+
for (const limetype of response.data) {
|
|
12
|
+
data.push({
|
|
13
|
+
name: ((_a = limetype.localname) === null || _a === void 0 ? void 0 : _a.singular) || limetype.name,
|
|
14
|
+
value: limetype.name,
|
|
15
|
+
description: limetype.name,
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
return data.sort((a, b) => a.name.localeCompare(b.name));
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=getLimetypes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getLimetypes.js","sourceRoot":"","sources":["../../../../nodes/lime-crm/methods/getLimetypes.ts"],"names":[],"mappings":";;AAWA,oCAeC;AAzBD,4CAAmD;AAU5C,KAAK,UAAU,YAAY;;IAG9B,MAAM,IAAI,GAA2B,EAAE,CAAC;IACxC,MAAM,QAAQ,GAAG,MAAM,IAAA,+BAAmB,EAAC,IAAI,CAAC,CAAC;IACjD,IAAI,CAAC,QAAQ,CAAC,OAAO;QAAE,OAAO,EAAE,CAAC;IAEjC,KAAK,MAAM,QAAQ,IAAI,QAAQ,CAAC,IAAI,EAAE,CAAC;QACnC,IAAI,CAAC,IAAI,CAAC;YACN,IAAI,EAAE,CAAA,MAAA,QAAQ,CAAC,SAAS,0CAAE,QAAQ,KAAI,QAAQ,CAAC,IAAI;YACnD,KAAK,EAAE,QAAQ,CAAC,IAAI;YACpB,WAAW,EAAE,QAAQ,CAAC,IAAI;SAC7B,CAAC,CAAC;IACP,CAAC;IACD,OAAO,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;AAC7D,CAAC"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { getLimetypes } from './getLimetypes';
|
|
2
|
+
export { getFileProperties, getFilteredLimetypeProperties, getLimetypeProperties, getNoHasManyProperties, } from './getLimetypeProperties';
|
|
3
|
+
export { getCreateMappingColumns, getUpdateMappingColumns, parseResourceMapperFields, } from './resourceMapping';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.parseResourceMapperFields = exports.getUpdateMappingColumns = exports.getCreateMappingColumns = exports.getNoHasManyProperties = exports.getLimetypeProperties = exports.getFilteredLimetypeProperties = exports.getFileProperties = exports.getLimetypes = void 0;
|
|
4
|
+
var getLimetypes_1 = require("./getLimetypes");
|
|
5
|
+
Object.defineProperty(exports, "getLimetypes", { enumerable: true, get: function () { return getLimetypes_1.getLimetypes; } });
|
|
6
|
+
var getLimetypeProperties_1 = require("./getLimetypeProperties");
|
|
7
|
+
Object.defineProperty(exports, "getFileProperties", { enumerable: true, get: function () { return getLimetypeProperties_1.getFileProperties; } });
|
|
8
|
+
Object.defineProperty(exports, "getFilteredLimetypeProperties", { enumerable: true, get: function () { return getLimetypeProperties_1.getFilteredLimetypeProperties; } });
|
|
9
|
+
Object.defineProperty(exports, "getLimetypeProperties", { enumerable: true, get: function () { return getLimetypeProperties_1.getLimetypeProperties; } });
|
|
10
|
+
Object.defineProperty(exports, "getNoHasManyProperties", { enumerable: true, get: function () { return getLimetypeProperties_1.getNoHasManyProperties; } });
|
|
11
|
+
var resourceMapping_1 = require("./resourceMapping");
|
|
12
|
+
Object.defineProperty(exports, "getCreateMappingColumns", { enumerable: true, get: function () { return resourceMapping_1.getCreateMappingColumns; } });
|
|
13
|
+
Object.defineProperty(exports, "getUpdateMappingColumns", { enumerable: true, get: function () { return resourceMapping_1.getUpdateMappingColumns; } });
|
|
14
|
+
Object.defineProperty(exports, "parseResourceMapperFields", { enumerable: true, get: function () { return resourceMapping_1.parseResourceMapperFields; } });
|
|
15
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../nodes/lime-crm/methods/index.ts"],"names":[],"mappings":";;;AAAA,+CAA8C;AAArC,4GAAA,YAAY,OAAA;AACrB,iEAKiC;AAJ7B,0HAAA,iBAAiB,OAAA;AACjB,sIAAA,6BAA6B,OAAA;AAC7B,8HAAA,qBAAqB,OAAA;AACrB,+HAAA,sBAAsB,OAAA;AAE1B,qDAI2B;AAHvB,0HAAA,uBAAuB,OAAA;AACvB,0HAAA,uBAAuB,OAAA;AACvB,4HAAA,yBAAyB,OAAA"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { ILoadOptionsFunctions, ResourceMapperFields, IExecuteFunctions, IDataObject } from 'n8n-workflow';
|
|
2
|
+
export declare function parseResourceMapperFields(context: IExecuteFunctions, i: number, inputName: string): IDataObject;
|
|
3
|
+
export declare function getCreateMappingColumns(this: ILoadOptionsFunctions): Promise<ResourceMapperFields>;
|
|
4
|
+
export declare function getUpdateMappingColumns(this: ILoadOptionsFunctions): Promise<ResourceMapperFields>;
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.parseResourceMapperFields = parseResourceMapperFields;
|
|
4
|
+
exports.getCreateMappingColumns = getCreateMappingColumns;
|
|
5
|
+
exports.getUpdateMappingColumns = getUpdateMappingColumns;
|
|
6
|
+
const n8n_workflow_1 = require("n8n-workflow");
|
|
7
|
+
const transport_1 = require("../transport");
|
|
8
|
+
const LimeCrmTypeToFieldType = new Map(Object.entries({
|
|
9
|
+
option: 'options',
|
|
10
|
+
yesno: 'boolean',
|
|
11
|
+
decimal: 'number',
|
|
12
|
+
number: 'number',
|
|
13
|
+
}));
|
|
14
|
+
function mapLimeCrmType(limeCrmType) {
|
|
15
|
+
return LimeCrmTypeToFieldType.get(limeCrmType) || 'string';
|
|
16
|
+
}
|
|
17
|
+
function getPropertyLength(property) {
|
|
18
|
+
return property.type === 'string' ? `(${property.length})` : '';
|
|
19
|
+
}
|
|
20
|
+
async function getMappingColumns(nodeContext, mode, limetype) {
|
|
21
|
+
const propertiesResponse = await (0, transport_1.getProperties)(nodeContext, limetype);
|
|
22
|
+
if (!propertiesResponse.success) {
|
|
23
|
+
n8n_workflow_1.LoggerProxy.error(`There was an error with fetching properties: ${JSON.stringify(propertiesResponse.data)}`);
|
|
24
|
+
return {
|
|
25
|
+
fields: [],
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
const noRelationProperties = propertiesResponse.data.filter((property) => property.type !== 'hasmany');
|
|
29
|
+
const fields = noRelationProperties.map((property) => {
|
|
30
|
+
const propertyLengthDescription = getPropertyLength(property);
|
|
31
|
+
return {
|
|
32
|
+
id: property.name,
|
|
33
|
+
displayName: `${property.localname} [${property.type}${propertyLengthDescription}]`,
|
|
34
|
+
required: mode === 'create' ? property.required : false,
|
|
35
|
+
defaultMatch: false,
|
|
36
|
+
display: true,
|
|
37
|
+
type: mapLimeCrmType(property.type),
|
|
38
|
+
options: property.type === 'option' && property.options
|
|
39
|
+
? property.options
|
|
40
|
+
.filter((option) => !option.inactive)
|
|
41
|
+
.map((option) => {
|
|
42
|
+
return {
|
|
43
|
+
value: option.key,
|
|
44
|
+
name: option.text,
|
|
45
|
+
};
|
|
46
|
+
})
|
|
47
|
+
: undefined,
|
|
48
|
+
};
|
|
49
|
+
});
|
|
50
|
+
return {
|
|
51
|
+
fields: fields.sort((a, b) => {
|
|
52
|
+
if (a.required !== b.required) {
|
|
53
|
+
return a.required ? -1 : 1;
|
|
54
|
+
}
|
|
55
|
+
return a.displayName.localeCompare(b.displayName);
|
|
56
|
+
}),
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
function parseResourceMapperFields(context, i, inputName) {
|
|
60
|
+
const propertiesInput = context.getNodeParameter(inputName, i);
|
|
61
|
+
return propertiesInput.value;
|
|
62
|
+
}
|
|
63
|
+
async function getCreateMappingColumns() {
|
|
64
|
+
const limetype = this.getNodeParameter('limetype');
|
|
65
|
+
return getMappingColumns(this, 'create', limetype);
|
|
66
|
+
}
|
|
67
|
+
async function getUpdateMappingColumns() {
|
|
68
|
+
const limetype = this.getNodeParameter('limetype');
|
|
69
|
+
return getMappingColumns(this, 'update', limetype);
|
|
70
|
+
}
|
|
71
|
+
//# sourceMappingURL=resourceMapping.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file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jB,MAAM,eAAe,GAAG,OAAO,CAAC,gBAAgB,CAC5C,SAAS,EACT,CAAC,CACmB,CAAC;IAEzB,OAAO,eAAe,CAAC,KAAoB,CAAC;AAChD,CAAC;AAKM,KAAK,UAAU,uBAAuB;IAGzC,MAAM,QAAQ,GAAG,IAAI,CAAC,gBAAgB,CAAC,UAAU,CAAW,CAAC;IAC7D,OAAO,iBAAiB,CAAC,IAAI,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC;AACvD,CAAC;AAKM,KAAK,UAAU,uBAAuB;IAGzC,MAAM,QAAQ,GAAG,IAAI,CAAC,gBAAgB,CAAC,UAAU,CAAW,CAAC;IAC7D,OAAO,iBAAiB,CAAC,IAAI,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC;AACvD,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare const LIME_CRM_API_CREDENTIAL_KEY = "limeCrmApi";
|
|
2
|
+
export declare const ADMIN_RESOURCE = "admin";
|
|
3
|
+
export declare const DATA_RESOURCE = "data";
|
|
4
|
+
export declare const METADATA_RESOURCE = "metadata";
|
|
5
|
+
export declare const ERP_CONNECTOR_RESOURCE = "erpConnector";
|
|
6
|
+
export type NullOptionType = '';
|
|
7
|
+
export type APIResponsePrimitiveValue = string | boolean | number | null;
|
|
8
|
+
export type APIResponseValue = APIResponsePrimitiveValue | APIResponsePrimitiveValue[] | Record<string, APIResponsePrimitiveValue>;
|
|
9
|
+
export declare const DEFAULT_API_OBJECT_LIMIT = 50;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DEFAULT_API_OBJECT_LIMIT = exports.ERP_CONNECTOR_RESOURCE = exports.METADATA_RESOURCE = exports.DATA_RESOURCE = exports.ADMIN_RESOURCE = exports.LIME_CRM_API_CREDENTIAL_KEY = void 0;
|
|
4
|
+
exports.LIME_CRM_API_CREDENTIAL_KEY = 'limeCrmApi';
|
|
5
|
+
exports.ADMIN_RESOURCE = 'admin';
|
|
6
|
+
exports.DATA_RESOURCE = 'data';
|
|
7
|
+
exports.METADATA_RESOURCE = 'metadata';
|
|
8
|
+
exports.ERP_CONNECTOR_RESOURCE = 'erpConnector';
|
|
9
|
+
exports.DEFAULT_API_OBJECT_LIMIT = 50;
|
|
10
|
+
//# sourceMappingURL=constants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../nodes/lime-crm/models/constants.ts"],"names":[],"mappings":";;;AAQa,QAAA,2BAA2B,GAAG,YAAY,CAAC;AAU3C,QAAA,cAAc,GAAG,OAAO,CAAC;AAQzB,QAAA,aAAa,GAAG,MAAM,CAAC;AAQvB,QAAA,iBAAiB,GAAG,UAAU,CAAC;AAQ/B,QAAA,sBAAsB,GAAG,cAAc,CAAC;AA8BxC,QAAA,wBAAwB,GAAG,EAAE,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { LIME_CRM_API_CREDENTIAL_KEY, ADMIN_RESOURCE, DATA_RESOURCE, METADATA_RESOURCE, ERP_CONNECTOR_RESOURCE, DEFAULT_API_OBJECT_LIMIT, NullOptionType, APIResponseValue, APIResponsePrimitiveValue, } from './constants';
|
|
2
|
+
export { Limetype, LimetypeLocalName, LimetypeProperty } from './limetype';
|
|
3
|
+
export { Limeobject } from './limeobject';
|
|
4
|
+
export { CreateWebhook, Webhook, WebhookContext, WebhookFunctions, } from './webhook';
|
|
5
|
+
export { User, UserLoginType, UserType } from './users';
|
|
6
|
+
export { YES_NO_PROPERTY_TYPE, PropertyTypeMap } from './propertyTypes';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.YES_NO_PROPERTY_TYPE = exports.DEFAULT_API_OBJECT_LIMIT = exports.ERP_CONNECTOR_RESOURCE = exports.METADATA_RESOURCE = exports.DATA_RESOURCE = exports.ADMIN_RESOURCE = exports.LIME_CRM_API_CREDENTIAL_KEY = void 0;
|
|
4
|
+
var constants_1 = require("./constants");
|
|
5
|
+
Object.defineProperty(exports, "LIME_CRM_API_CREDENTIAL_KEY", { enumerable: true, get: function () { return constants_1.LIME_CRM_API_CREDENTIAL_KEY; } });
|
|
6
|
+
Object.defineProperty(exports, "ADMIN_RESOURCE", { enumerable: true, get: function () { return constants_1.ADMIN_RESOURCE; } });
|
|
7
|
+
Object.defineProperty(exports, "DATA_RESOURCE", { enumerable: true, get: function () { return constants_1.DATA_RESOURCE; } });
|
|
8
|
+
Object.defineProperty(exports, "METADATA_RESOURCE", { enumerable: true, get: function () { return constants_1.METADATA_RESOURCE; } });
|
|
9
|
+
Object.defineProperty(exports, "ERP_CONNECTOR_RESOURCE", { enumerable: true, get: function () { return constants_1.ERP_CONNECTOR_RESOURCE; } });
|
|
10
|
+
Object.defineProperty(exports, "DEFAULT_API_OBJECT_LIMIT", { enumerable: true, get: function () { return constants_1.DEFAULT_API_OBJECT_LIMIT; } });
|
|
11
|
+
var propertyTypes_1 = require("./propertyTypes");
|
|
12
|
+
Object.defineProperty(exports, "YES_NO_PROPERTY_TYPE", { enumerable: true, get: function () { return propertyTypes_1.YES_NO_PROPERTY_TYPE; } });
|
|
13
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../nodes/lime-crm/models/index.ts"],"names":[],"mappings":";;;AAAA,yCAUqB;AATjB,wHAAA,2BAA2B,OAAA;AAC3B,2GAAA,cAAc,OAAA;AACd,0GAAA,aAAa,OAAA;AACb,8GAAA,iBAAiB,OAAA;AACjB,mHAAA,sBAAsB,OAAA;AACtB,qHAAA,wBAAwB,OAAA;AAc5B,iDAAwE;AAA/D,qHAAA,oBAAoB,OAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"limeobject.js","sourceRoot":"","sources":["../../../../nodes/lime-crm/models/limeobject.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { APIResponseValue } from './constants';
|
|
2
|
+
type LimetypePropertyOption = {
|
|
3
|
+
key: string;
|
|
4
|
+
text: string;
|
|
5
|
+
inactive: boolean;
|
|
6
|
+
};
|
|
7
|
+
export type LimetypeProperty = {
|
|
8
|
+
name: string;
|
|
9
|
+
localname: string;
|
|
10
|
+
type: string;
|
|
11
|
+
required: boolean;
|
|
12
|
+
length?: number;
|
|
13
|
+
options?: LimetypePropertyOption[];
|
|
14
|
+
} & Record<string, APIResponseValue>;
|
|
15
|
+
export type LimetypeLocalName = {
|
|
16
|
+
singular: string;
|
|
17
|
+
plural: string;
|
|
18
|
+
};
|
|
19
|
+
export type Limetype = {
|
|
20
|
+
name: string;
|
|
21
|
+
localname: LimetypeLocalName;
|
|
22
|
+
properties: LimetypeProperty[];
|
|
23
|
+
} & Record<string, APIResponseValue>;
|
|
24
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"limetype.js","sourceRoot":"","sources":["../../../../nodes/lime-crm/models/limetype.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"propertyTypes.js","sourceRoot":"","sources":["../../../../nodes/lime-crm/models/propertyTypes.ts"],"names":[],"mappings":";;;AAKa,QAAA,oBAAoB,GAAG,OAAO,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { APIResponseValue } from './constants';
|
|
2
|
+
import { IncludedProperties } from '../transport';
|
|
3
|
+
import { Limeobject } from './limeobject';
|
|
4
|
+
type UserLoginType = 'DEFAULT' | 'LIME' | 'LIME_AND_WINDOWS';
|
|
5
|
+
type UserType = 'STANDARD' | 'ADMINISTRATION' | 'SERVICE' | 'INTEGRATION' | 'SYNCHRONIZATION' | 'TEST' | 'API';
|
|
6
|
+
type User = {
|
|
7
|
+
id: number;
|
|
8
|
+
username: string;
|
|
9
|
+
active: boolean;
|
|
10
|
+
loginType: UserLoginType;
|
|
11
|
+
userType: UserType;
|
|
12
|
+
} & Record<string, APIResponseValue | IncludedProperties | Limeobject>;
|
|
13
|
+
export { User, UserType, UserLoginType };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"users.js","sourceRoot":"","sources":["../../../../nodes/lime-crm/models/users.ts"],"names":[],"mappings":""}
|