@limetech/n8n-nodes-lime 0.3.7 → 0.4.0
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 +28 -0
- package/credentials/LimeCrmApi.credentials.ts +13 -0
- package/dist/credentials/LimeCrmApi.credentials.js +12 -0
- package/dist/credentials/LimeCrmApi.credentials.js.map +1 -1
- package/dist/nodes/lime-crm/LimeCrmNode.node.js +13 -0
- package/dist/nodes/lime-crm/LimeCrmNode.node.js.map +1 -1
- package/dist/nodes/lime-crm/LimeCrmTrigger.node.js +17 -2
- package/dist/nodes/lime-crm/LimeCrmTrigger.node.js.map +1 -1
- package/dist/nodes/lime-crm/commons/constants.d.ts +1 -0
- package/dist/nodes/lime-crm/commons/constants.js +2 -1
- package/dist/nodes/lime-crm/commons/constants.js.map +1 -1
- package/dist/nodes/lime-crm/commons/hmac.d.ts +1 -0
- package/dist/nodes/lime-crm/commons/hmac.js +11 -0
- package/dist/nodes/lime-crm/commons/hmac.js.map +1 -0
- package/dist/nodes/lime-crm/commons/index.d.ts +1 -1
- package/dist/nodes/lime-crm/commons/index.js +2 -1
- package/dist/nodes/lime-crm/commons/index.js.map +1 -1
- package/dist/nodes/lime-crm/commons/webhook.d.ts +3 -0
- package/dist/nodes/lime-crm/commons/webhook.js.map +1 -1
- package/dist/nodes/lime-crm/resources/erpConnector/index.d.ts +2 -2
- package/dist/nodes/lime-crm/resources/limeObject/index.js +6 -6
- package/dist/nodes/lime-crm/resources/limeObject/index.js.map +1 -1
- package/dist/nodes/lime-crm/resources/limeObject/operations/fetchMany.operation.d.ts +9 -0
- package/dist/nodes/lime-crm/resources/limeObject/operations/fetchMany.operation.js +103 -0
- package/dist/nodes/lime-crm/resources/limeObject/operations/fetchMany.operation.js.map +1 -0
- package/dist/nodes/lime-crm/resources/limeQuery/index.d.ts +6 -0
- package/dist/nodes/lime-crm/resources/limeQuery/index.js +66 -0
- package/dist/nodes/lime-crm/resources/limeQuery/index.js.map +1 -0
- package/dist/nodes/lime-crm/resources/limeQuery/operations/query.operation.d.ts +9 -0
- package/dist/nodes/lime-crm/resources/limeQuery/operations/query.operation.js +191 -0
- package/dist/nodes/lime-crm/resources/limeQuery/operations/query.operation.js.map +1 -0
- package/dist/nodes/lime-crm/transport/index.d.ts +2 -1
- package/dist/nodes/lime-crm/transport/index.js +4 -2
- package/dist/nodes/lime-crm/transport/index.js.map +1 -1
- package/dist/nodes/lime-crm/transport/limeQuery.d.ts +10 -0
- package/dist/nodes/lime-crm/transport/limeQuery.js +15 -0
- package/dist/nodes/lime-crm/transport/limeQuery.js.map +1 -0
- package/dist/nodes/lime-crm/transport/limeobjects.d.ts +1 -1
- package/dist/nodes/lime-crm/transport/limeobjects.js +5 -3
- package/dist/nodes/lime-crm/transport/limeobjects.js.map +1 -1
- package/dist/nodes/lime-crm/transport/webhooks.d.ts +2 -1
- package/dist/nodes/lime-crm/transport/webhooks.js +1 -0
- package/dist/nodes/lime-crm/transport/webhooks.js.map +1 -1
- package/dist/package.json +2 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/nodes/lime-crm/LimeCrmNode.node.ts +14 -0
- package/nodes/lime-crm/LimeCrmTrigger.node.ts +29 -3
- package/nodes/lime-crm/commons/constants.ts +1 -0
- package/nodes/lime-crm/commons/hmac.ts +13 -0
- package/nodes/lime-crm/commons/index.ts +1 -0
- package/nodes/lime-crm/commons/webhook.ts +4 -0
- package/nodes/lime-crm/resources/limeObject/index.ts +6 -6
- package/nodes/lime-crm/resources/limeObject/operations/{search.operation.ts → fetchMany.operation.ts} +11 -11
- package/nodes/lime-crm/resources/limeQuery/index.ts +40 -0
- package/nodes/lime-crm/resources/limeQuery/operations/query.operation.ts +222 -0
- package/nodes/lime-crm/transport/index.ts +2 -1
- package/nodes/lime-crm/transport/limeQuery.ts +28 -0
- package/nodes/lime-crm/transport/limeobjects.ts +8 -6
- package/nodes/lime-crm/transport/webhooks.ts +3 -1
- package/package.json +2 -1
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.properties = exports.description = void 0;
|
|
4
|
+
exports.execute = execute;
|
|
5
|
+
const transport_1 = require("../../../transport");
|
|
6
|
+
const commons_1 = require("../../../commons");
|
|
7
|
+
exports.description = {
|
|
8
|
+
name: 'Query',
|
|
9
|
+
value: 'query',
|
|
10
|
+
description: 'Query objects with Lime Query API',
|
|
11
|
+
action: 'Query objects',
|
|
12
|
+
};
|
|
13
|
+
exports.properties = [
|
|
14
|
+
{
|
|
15
|
+
displayName: 'Lime Type',
|
|
16
|
+
name: 'limeType',
|
|
17
|
+
type: 'options',
|
|
18
|
+
typeOptions: {
|
|
19
|
+
loadOptionsMethod: 'getLimeTypes',
|
|
20
|
+
},
|
|
21
|
+
required: true,
|
|
22
|
+
default: '',
|
|
23
|
+
description: 'The type of entity to query',
|
|
24
|
+
displayOptions: {
|
|
25
|
+
show: {
|
|
26
|
+
resource: [commons_1.LIME_QUERY_RESOURCE],
|
|
27
|
+
operation: ['query'],
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
displayName: 'Response Format (JSON)',
|
|
33
|
+
name: 'responseFormat',
|
|
34
|
+
type: 'json',
|
|
35
|
+
required: true,
|
|
36
|
+
default: '{}',
|
|
37
|
+
description: 'Information that should be included in the response',
|
|
38
|
+
displayOptions: {
|
|
39
|
+
show: {
|
|
40
|
+
resource: [commons_1.LIME_QUERY_RESOURCE],
|
|
41
|
+
operation: ['query'],
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
displayName: 'Filter (JSON)',
|
|
47
|
+
name: 'filter',
|
|
48
|
+
type: 'json',
|
|
49
|
+
default: '{}',
|
|
50
|
+
description: "The filter DSL defining the query's conditions",
|
|
51
|
+
displayOptions: {
|
|
52
|
+
show: {
|
|
53
|
+
resource: [commons_1.LIME_QUERY_RESOURCE],
|
|
54
|
+
operation: ['query'],
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
displayName: 'Limit',
|
|
60
|
+
name: 'limit',
|
|
61
|
+
type: 'number',
|
|
62
|
+
default: null,
|
|
63
|
+
description: 'The maximum number of records to return',
|
|
64
|
+
displayOptions: {
|
|
65
|
+
show: {
|
|
66
|
+
resource: [commons_1.LIME_QUERY_RESOURCE],
|
|
67
|
+
operation: ['query'],
|
|
68
|
+
},
|
|
69
|
+
},
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
displayName: 'Order By',
|
|
73
|
+
name: 'orderBy',
|
|
74
|
+
type: 'fixedCollection',
|
|
75
|
+
typeOptions: {
|
|
76
|
+
multipleValues: true,
|
|
77
|
+
},
|
|
78
|
+
default: {},
|
|
79
|
+
description: 'The list of properties by which to order the query results',
|
|
80
|
+
displayOptions: {
|
|
81
|
+
show: {
|
|
82
|
+
resource: [commons_1.LIME_QUERY_RESOURCE],
|
|
83
|
+
operation: ['query'],
|
|
84
|
+
},
|
|
85
|
+
},
|
|
86
|
+
options: [
|
|
87
|
+
{
|
|
88
|
+
name: 'orderByFields',
|
|
89
|
+
displayName: 'Order By Fields',
|
|
90
|
+
values: [
|
|
91
|
+
{
|
|
92
|
+
displayName: 'Property Name',
|
|
93
|
+
name: 'propertyName',
|
|
94
|
+
type: 'string',
|
|
95
|
+
description: 'Name of the property to order by',
|
|
96
|
+
default: '',
|
|
97
|
+
required: true,
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
displayName: 'Sort Direction',
|
|
101
|
+
name: 'sortDirection',
|
|
102
|
+
type: 'options',
|
|
103
|
+
default: 'ASC',
|
|
104
|
+
description: 'Ordering direction',
|
|
105
|
+
options: [
|
|
106
|
+
{ name: 'ASC', value: 'ASC' },
|
|
107
|
+
{ name: 'DESC', value: 'DESC' },
|
|
108
|
+
],
|
|
109
|
+
},
|
|
110
|
+
],
|
|
111
|
+
},
|
|
112
|
+
],
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
displayName: 'Offset',
|
|
116
|
+
name: 'offset',
|
|
117
|
+
type: 'number',
|
|
118
|
+
default: null,
|
|
119
|
+
description: 'The offset from which to start returning records. This operation requires the `Order By` field to be set',
|
|
120
|
+
displayOptions: {
|
|
121
|
+
show: {
|
|
122
|
+
resource: [commons_1.LIME_QUERY_RESOURCE],
|
|
123
|
+
operation: ['query'],
|
|
124
|
+
},
|
|
125
|
+
},
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
displayName: 'Active Object',
|
|
129
|
+
name: 'activeObject',
|
|
130
|
+
type: 'fixedCollection',
|
|
131
|
+
default: {},
|
|
132
|
+
description: "A dict with keys 'limetype' and 'id' representing the active object in the context of the query",
|
|
133
|
+
displayOptions: {
|
|
134
|
+
show: {
|
|
135
|
+
resource: [commons_1.LIME_QUERY_RESOURCE],
|
|
136
|
+
operation: ['query'],
|
|
137
|
+
},
|
|
138
|
+
},
|
|
139
|
+
options: [
|
|
140
|
+
{
|
|
141
|
+
name: 'activeObjectFields',
|
|
142
|
+
displayName: 'Active Object Fields',
|
|
143
|
+
values: [
|
|
144
|
+
{
|
|
145
|
+
displayName: 'Lime Type',
|
|
146
|
+
name: 'limetype',
|
|
147
|
+
type: 'options',
|
|
148
|
+
description: 'Name of the limetype',
|
|
149
|
+
default: '',
|
|
150
|
+
typeOptions: {
|
|
151
|
+
loadOptionsMethod: 'getLimeTypes',
|
|
152
|
+
},
|
|
153
|
+
required: true,
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
displayName: 'Lime Object ID',
|
|
157
|
+
name: 'id',
|
|
158
|
+
type: 'number',
|
|
159
|
+
default: 0,
|
|
160
|
+
description: 'ID representing the object in the context of the query',
|
|
161
|
+
required: true,
|
|
162
|
+
},
|
|
163
|
+
],
|
|
164
|
+
},
|
|
165
|
+
],
|
|
166
|
+
},
|
|
167
|
+
];
|
|
168
|
+
async function execute(i) {
|
|
169
|
+
const limeType = this.getNodeParameter('limeType', i);
|
|
170
|
+
const responseFormat = this.getNodeParameter('responseFormat', i);
|
|
171
|
+
const filter = this.getNodeParameter('filter', i);
|
|
172
|
+
const limit = this.getNodeParameter('limit', i);
|
|
173
|
+
const offset = this.getNodeParameter('offset', i);
|
|
174
|
+
const orderByCollection = this.getNodeParameter('orderBy', i);
|
|
175
|
+
const activeObjectCollection = this.getNodeParameter('activeObject', i);
|
|
176
|
+
const orderBy = orderByCollection.orderByFields &&
|
|
177
|
+
orderByCollection.orderByFields.map((field) => ({
|
|
178
|
+
[field.propertyName]: field.sortDirection,
|
|
179
|
+
}));
|
|
180
|
+
const q = JSON.stringify({
|
|
181
|
+
limetype: limeType,
|
|
182
|
+
responseFormat: JSON.parse(responseFormat),
|
|
183
|
+
filter: JSON.parse(filter),
|
|
184
|
+
limit: limit,
|
|
185
|
+
offset: offset,
|
|
186
|
+
orderBy: orderBy,
|
|
187
|
+
});
|
|
188
|
+
const activeObject = JSON.stringify(activeObjectCollection.activeObjectFields);
|
|
189
|
+
return (0, transport_1.queryLimeObjects)(this, q, activeObject);
|
|
190
|
+
}
|
|
191
|
+
//# sourceMappingURL=query.operation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"query.operation.js","sourceRoot":"","sources":["../../../../../../nodes/lime-crm/resources/limeQuery/operations/query.operation.ts"],"names":[],"mappings":";;;AA0LA,0BAmCC;AA3ND,kDAAsD;AACtD,8CAAuD;AAE1C,QAAA,WAAW,GAAG;IACvB,IAAI,EAAE,OAAO;IACb,KAAK,EAAE,OAAO;IACd,WAAW,EAAE,mCAAmC;IAChD,MAAM,EAAE,eAAe;CAC1B,CAAC;AAgBW,QAAA,UAAU,GAAsB;IACzC;QACI,WAAW,EAAE,WAAW;QACxB,IAAI,EAAE,UAAU;QAChB,IAAI,EAAE,SAAS;QACf,WAAW,EAAE;YACT,iBAAiB,EAAE,cAAc;S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,CAAC,EAAE,KAAK,CAAC,aAAa;SAC5C,CAAC,CAAC,CAAC;IAER,MAAM,CAAC,GAAG,IAAI,CAAC,SAAS,CAAC;QACrB,QAAQ,EAAE,QAAQ;QAClB,cAAc,EAAE,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC;QAC1C,MAAM,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC;QAC1B,KAAK,EAAE,KAAK;QACZ,MAAM,EAAE,MAAM;QACd,OAAO,EAAE,OAAO;KACnB,CAAC,CAAC;IAEH,MAAM,YAAY,GAAG,IAAI,CAAC,SAAS,CAC/B,sBAAsB,CAAC,kBAAkB,CAC5C,CAAC;IAEF,OAAO,IAAA,4BAAgB,EAAC,IAAI,EAAE,CAAC,EAAE,YAAY,CAAC,CAAC;AACnD,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export { getSubscription, deleteSubscription, createSubscription, listSubscriptionsWithExistingData, } from './webhooks';
|
|
2
2
|
export { getLimeTypesFromApi, getProperties } from './limetypes';
|
|
3
|
-
export { createLimeObject, deleteLimeObject, updateLimeObject, getLimeObject,
|
|
3
|
+
export { createLimeObject, deleteLimeObject, updateLimeObject, getLimeObject, fetchManyLimeObjects, } from './limeobjects';
|
|
4
4
|
export { startCreateOrUpdateObjectsTask } from './erpConnector';
|
|
5
|
+
export { queryLimeObjects } from './limeQuery';
|
|
5
6
|
export { callLimeApi } from './commons';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.callLimeApi = exports.startCreateOrUpdateObjectsTask = exports.
|
|
3
|
+
exports.callLimeApi = exports.queryLimeObjects = exports.startCreateOrUpdateObjectsTask = exports.fetchManyLimeObjects = exports.getLimeObject = exports.updateLimeObject = exports.deleteLimeObject = exports.createLimeObject = exports.getProperties = exports.getLimeTypesFromApi = exports.listSubscriptionsWithExistingData = exports.createSubscription = exports.deleteSubscription = exports.getSubscription = void 0;
|
|
4
4
|
var webhooks_1 = require("./webhooks");
|
|
5
5
|
Object.defineProperty(exports, "getSubscription", { enumerable: true, get: function () { return webhooks_1.getSubscription; } });
|
|
6
6
|
Object.defineProperty(exports, "deleteSubscription", { enumerable: true, get: function () { return webhooks_1.deleteSubscription; } });
|
|
@@ -14,9 +14,11 @@ Object.defineProperty(exports, "createLimeObject", { enumerable: true, get: func
|
|
|
14
14
|
Object.defineProperty(exports, "deleteLimeObject", { enumerable: true, get: function () { return limeobjects_1.deleteLimeObject; } });
|
|
15
15
|
Object.defineProperty(exports, "updateLimeObject", { enumerable: true, get: function () { return limeobjects_1.updateLimeObject; } });
|
|
16
16
|
Object.defineProperty(exports, "getLimeObject", { enumerable: true, get: function () { return limeobjects_1.getLimeObject; } });
|
|
17
|
-
Object.defineProperty(exports, "
|
|
17
|
+
Object.defineProperty(exports, "fetchManyLimeObjects", { enumerable: true, get: function () { return limeobjects_1.fetchManyLimeObjects; } });
|
|
18
18
|
var erpConnector_1 = require("./erpConnector");
|
|
19
19
|
Object.defineProperty(exports, "startCreateOrUpdateObjectsTask", { enumerable: true, get: function () { return erpConnector_1.startCreateOrUpdateObjectsTask; } });
|
|
20
|
+
var limeQuery_1 = require("./limeQuery");
|
|
21
|
+
Object.defineProperty(exports, "queryLimeObjects", { enumerable: true, get: function () { return limeQuery_1.queryLimeObjects; } });
|
|
20
22
|
var commons_1 = require("./commons");
|
|
21
23
|
Object.defineProperty(exports, "callLimeApi", { enumerable: true, get: function () { return commons_1.callLimeApi; } });
|
|
22
24
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +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
|
|
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,mHAAA,oBAAoB,OAAA;AAExB,+CAAgE;AAAvD,8HAAA,8BAA8B,OAAA;AACvC,yCAA+C;AAAtC,6GAAA,gBAAgB,OAAA;AACzB,qCAAwC;AAA/B,sGAAA,WAAW,OAAA"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { IAllExecuteFunctions } from 'n8n-workflow';
|
|
2
|
+
import { NodeResponse } from '../../nodeResponse';
|
|
3
|
+
interface IncludedProperties {
|
|
4
|
+
[key: string]: IncludedProperties | string | number | boolean | null;
|
|
5
|
+
}
|
|
6
|
+
export interface QueryResponse {
|
|
7
|
+
objects: IncludedProperties[];
|
|
8
|
+
}
|
|
9
|
+
export declare function queryLimeObjects(nodeContext: IAllExecuteFunctions, q: string, activeObject: string): Promise<NodeResponse<QueryResponse>>;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.queryLimeObjects = queryLimeObjects;
|
|
4
|
+
const commons_1 = require("./commons");
|
|
5
|
+
const LIME_QUERY_URL = '/api/v1/query/';
|
|
6
|
+
async function queryLimeObjects(nodeContext, q, activeObject) {
|
|
7
|
+
const queryParameters = {
|
|
8
|
+
q: q,
|
|
9
|
+
activeObject: activeObject,
|
|
10
|
+
};
|
|
11
|
+
return await (0, commons_1.callLimeApi)(nodeContext, 'GET', LIME_QUERY_URL, {
|
|
12
|
+
qs: queryParameters,
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=limeQuery.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"limeQuery.js","sourceRoot":"","sources":["../../../../nodes/lime-crm/transport/limeQuery.ts"],"names":[],"mappings":";;AAcA,4CAaC;AAzBD,uCAAwC;AAExC,MAAM,cAAc,GAAG,gBAAgB,CAAC;AAUjC,KAAK,UAAU,gBAAgB,CAClC,WAAiC,EACjC,CAAS,EACT,YAAoB;IAEpB,MAAM,eAAe,GAAG;QACpB,CAAC,EAAE,CAAC;QACJ,YAAY,EAAE,YAAY;KAC7B,CAAC;IAEF,OAAO,MAAM,IAAA,qBAAW,EAAC,WAAW,EAAE,KAAK,EAAE,cAAc,EAAE;QACzD,EAAE,EAAE,eAAe;KACtB,CAAC,CAAC;AACP,CAAC"}
|
|
@@ -4,4 +4,4 @@ export declare function createLimeObject(nodeContext: IAllExecuteFunctions, lime
|
|
|
4
4
|
export declare function deleteLimeObject(nodeContext: IAllExecuteFunctions, limeType: string, id: string): Promise<NodeResponse<void>>;
|
|
5
5
|
export declare function getLimeObject(nodeContext: IAllExecuteFunctions, limeType: string, id: string): Promise<NodeResponse<unknown>>;
|
|
6
6
|
export declare function updateLimeObject(nodeContext: IAllExecuteFunctions, limeType: string, id: string, data: object): Promise<NodeResponse<unknown>>;
|
|
7
|
-
export declare function
|
|
7
|
+
export declare function fetchManyLimeObjects(nodeContext: IAllExecuteFunctions, limeType: string, searchField: string, searchTerm: string, limit: number, offset: number, sortField: string | null): Promise<NodeResponse<Array<object>>>;
|
|
@@ -4,7 +4,7 @@ exports.createLimeObject = createLimeObject;
|
|
|
4
4
|
exports.deleteLimeObject = deleteLimeObject;
|
|
5
5
|
exports.getLimeObject = getLimeObject;
|
|
6
6
|
exports.updateLimeObject = updateLimeObject;
|
|
7
|
-
exports.
|
|
7
|
+
exports.fetchManyLimeObjects = fetchManyLimeObjects;
|
|
8
8
|
const commons_1 = require("./commons");
|
|
9
9
|
const LIMEOBJECT_URL = '/api/v1/limeobject/';
|
|
10
10
|
async function createLimeObject(nodeContext, limeType, data) {
|
|
@@ -98,7 +98,7 @@ async function _searchLimeObjectWithLimit(nodeContext, url, limit, offset, qs) {
|
|
|
98
98
|
data: { _embedded: { limeobjects: returnData } },
|
|
99
99
|
};
|
|
100
100
|
}
|
|
101
|
-
async function
|
|
101
|
+
async function fetchManyLimeObjects(nodeContext, limeType, searchField, searchTerm, limit, offset, sortField) {
|
|
102
102
|
var _a, _b;
|
|
103
103
|
const url = `${LIMEOBJECT_URL}${limeType}/`;
|
|
104
104
|
const qs = {
|
|
@@ -122,7 +122,9 @@ async function searchLimeObject(nodeContext, limeType, searchField, searchTerm,
|
|
|
122
122
|
};
|
|
123
123
|
}
|
|
124
124
|
return {
|
|
125
|
-
|
|
125
|
+
success: response.success,
|
|
126
|
+
error: response.error,
|
|
127
|
+
status: response.status,
|
|
126
128
|
metadata: {
|
|
127
129
|
...response.metadata,
|
|
128
130
|
limeType: limeType,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"limeobjects.js","sourceRoot":"","sources":["../../../../nodes/lime-crm/transport/limeobjects.ts"],"names":[],"mappings":";;AAYA,4CAkBC;AAED,4CAsBC;AAED,sCAkBC;AAED,4CAqBC;AAgDD,
|
|
1
|
+
{"version":3,"file":"limeobjects.js","sourceRoot":"","sources":["../../../../nodes/lime-crm/transport/limeobjects.ts"],"names":[],"mappings":";;AAYA,4CAkBC;AAED,4CAsBC;AAED,s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CACvC,WAAW,EACX,GAAG,EACH,KAAK,EACL,MAAM,EACN,EAAE,CACL,CAAC;IACN,CAAC;SAAM,CAAC;QACJ,QAAQ,GAAG,MAAM,IAAA,qBAAW,EACxB,WAAW,EACX,KAAK,EACL,GAAG,EACH;YACI,EAAE,EAAE,EAAE;SACT,CACJ,CAAC;IACN,CAAC;IAED,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;QACH,OAAO,EAAE,QAAQ,CAAC,OAAO;QACzB,KAAK,EAAE,QAAQ,CAAC,KAAK;QACrB,MAAM,EAAE,QAAQ,CAAC,MAAM;QACvB,QAAQ,EAAE;YACN,GAAG,QAAQ,CAAC,QAAQ;YACpB,QAAQ,EAAE,QAAQ;SACrB;KACJ,CAAC;AACN,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Webhook } from '../commons';
|
|
2
2
|
import { IAllExecuteFunctions } from 'n8n-workflow';
|
|
3
3
|
import { NodeResponse } from '../../nodeResponse';
|
|
4
|
+
import { CreateWebhook } from '../commons/webhook';
|
|
4
5
|
interface ApiResponseWebhook {
|
|
5
6
|
id: string;
|
|
6
7
|
name: string;
|
|
@@ -10,6 +11,6 @@ interface ApiResponseWebhook {
|
|
|
10
11
|
}
|
|
11
12
|
export declare function getSubscription(nodeContext: IAllExecuteFunctions, webhook: Webhook): Promise<NodeResponse<ApiResponseWebhook>>;
|
|
12
13
|
export declare function listSubscriptionsWithExistingData(nodeContext: IAllExecuteFunctions, webhook: Webhook): Promise<NodeResponse<ApiResponseWebhook[]>>;
|
|
13
|
-
export declare function createSubscription(nodeContext: IAllExecuteFunctions, webhook:
|
|
14
|
+
export declare function createSubscription(nodeContext: IAllExecuteFunctions, webhook: CreateWebhook): Promise<NodeResponse<ApiResponseWebhook>>;
|
|
14
15
|
export declare function deleteSubscription(nodeContext: IAllExecuteFunctions, webhook: Webhook): Promise<NodeResponse<void>>;
|
|
15
16
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"webhooks.js","sourceRoot":"","sources":["../../../../nodes/lime-crm/transport/webhooks.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"webhooks.js","sourceRoot":"","sources":["../../../../nodes/lime-crm/transport/webhooks.ts"],"names":[],"mappings":";;AAgBA,0CASC;AAED,8EAWC;AAED,gDAYC;AAED,gDAmBC;AAxED,wBAAgC;AAKhC,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;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;AAEM,KAAK,UAAU,kBAAkB,CACpC,WAAiC,EACjC,OAAsB;IAEtB,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;YACvB,IAAI,EAAE,OAAO,CAAC,IAAI;YAClB,MAAM,EAAE,OAAO,CAAC,MAAM;SACzB;KACJ,CAAC,CAAC;AACP,CAAC;AAEM,KAAK,UAAU,kBAAkB,CACpC,WAAiC,EACjC,OAAgB;IAEhB,MAAM,QAAQ,GAAuB,MAAM,IAAA,cAAW,EAClD,WAAW,EACX,QAAQ,EACR,GAAG,gBAAgB,GAAG,OAAO,CAAC,IAAI,CAAC,SAAS,GAAG,CAClD,CAAC;IAEF,IAAI,QAAQ,CAAC,OAAO;QAAE,OAAO,QAAQ,CAAC;IAEtC,OAAO;QACH,GAAG,QAAQ;QACX,QAAQ,EAAE;YACN,GAAG,QAAQ,CAAC,QAAQ;YACpB,EAAE,EAAE,OAAO,CAAC,IAAI,CAAC,SAAS;SAC7B;KACJ,CAAC;AACN,CAAC"}
|
package/dist/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@limetech/n8n-nodes-lime",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"description": "n8n node to connect to Lime CRM",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "index.js",
|
|
@@ -30,6 +30,7 @@
|
|
|
30
30
|
],
|
|
31
31
|
"nodes": [
|
|
32
32
|
"dist/nodes/lime-crm/LimeCrmNode.node.js",
|
|
33
|
+
"dist/nodes/lime-crm/LimeCrmTrigger.node.js",
|
|
33
34
|
"dist/nodes/fortnox/Fortnox.node.js",
|
|
34
35
|
"dist/nodes/fortnox/FortnoxTrigger.node.js"
|
|
35
36
|
]
|