@limetech/n8n-nodes-lime 2.6.0 → 2.7.0-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 +12 -0
- package/dist/nodes/lime-crm/LimeCrmNode.node.d.ts +4 -1
- package/dist/nodes/lime-crm/LimeCrmNode.node.js +3 -0
- package/dist/nodes/lime-crm/LimeCrmNode.node.js.map +1 -1
- package/dist/nodes/lime-crm/methods/getLimetypeProperties.d.ts +2 -0
- package/dist/nodes/lime-crm/methods/getLimetypeProperties.js +43 -0
- package/dist/nodes/lime-crm/methods/getLimetypeProperties.js.map +1 -1
- package/dist/nodes/lime-crm/methods/index.d.ts +2 -2
- package/dist/nodes/lime-crm/methods/index.js +4 -1
- package/dist/nodes/lime-crm/methods/index.js.map +1 -1
- package/dist/nodes/lime-crm/methods/resourceMapping.d.ts +1 -0
- package/dist/nodes/lime-crm/methods/resourceMapping.js +46 -0
- package/dist/nodes/lime-crm/methods/resourceMapping.js.map +1 -1
- package/dist/nodes/lime-crm/models/limetype.d.ts +1 -0
- package/dist/nodes/lime-crm/resources/data/index.d.ts +1 -1
- package/dist/nodes/lime-crm/resources/data/index.js +20 -0
- package/dist/nodes/lime-crm/resources/data/index.js.map +1 -1
- package/dist/nodes/lime-crm/resources/data/operations/bulkImportCommons.d.ts +5 -0
- package/dist/nodes/lime-crm/resources/data/operations/bulkImportCommons.js +230 -0
- package/dist/nodes/lime-crm/resources/data/operations/bulkImportCommons.js.map +1 -0
- package/dist/nodes/lime-crm/resources/data/operations/createManyObjects.operation.d.ts +9 -0
- package/dist/nodes/lime-crm/resources/data/operations/createManyObjects.operation.js +16 -0
- package/dist/nodes/lime-crm/resources/data/operations/createManyObjects.operation.js.map +1 -0
- package/dist/nodes/lime-crm/resources/data/operations/createOrUpdateManyObjects.operation.d.ts +9 -0
- package/dist/nodes/lime-crm/resources/data/operations/createOrUpdateManyObjects.operation.js +16 -0
- package/dist/nodes/lime-crm/resources/data/operations/createOrUpdateManyObjects.operation.js.map +1 -0
- package/dist/nodes/lime-crm/resources/data/operations/deprecated-startBulkImport.operation.d.ts +9 -0
- package/dist/nodes/lime-crm/resources/data/operations/deprecated-startBulkImport.operation.js +241 -0
- package/dist/nodes/lime-crm/resources/data/operations/deprecated-startBulkImport.operation.js.map +1 -0
- package/dist/nodes/lime-crm/resources/data/operations/index.d.ts +4 -0
- package/dist/nodes/lime-crm/resources/data/operations/index.js +5 -1
- package/dist/nodes/lime-crm/resources/data/operations/index.js.map +1 -1
- package/dist/nodes/lime-crm/resources/data/operations/updateManyObjects.operation.d.ts +9 -0
- package/dist/nodes/lime-crm/resources/data/operations/updateManyObjects.operation.js +16 -0
- package/dist/nodes/lime-crm/resources/data/operations/updateManyObjects.operation.js.map +1 -0
- package/dist/nodes/lime-crm/transport/bulkimport.d.ts +41 -0
- package/dist/nodes/lime-crm/transport/bulkimport.js +86 -0
- package/dist/nodes/lime-crm/transport/bulkimport.js.map +1 -0
- package/dist/nodes/lime-crm/transport/index.d.ts +1 -0
- package/dist/nodes/lime-crm/transport/index.js +6 -1
- package/dist/nodes/lime-crm/transport/index.js.map +1 -1
- package/dist/nodes/lime-crm/transport/limetypes.js +15 -4
- package/dist/nodes/lime-crm/transport/limetypes.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/nodes/lime-crm/LimeCrmNode.node.ts +6 -0
- package/nodes/lime-crm/methods/getLimetypeProperties.ts +84 -0
- package/nodes/lime-crm/methods/index.ts +3 -0
- package/nodes/lime-crm/methods/resourceMapping.ts +76 -0
- package/nodes/lime-crm/models/limetype.ts +1 -0
- package/nodes/lime-crm/resources/data/index.ts +34 -1
- package/nodes/lime-crm/resources/data/operations/bulkImportCommons.ts +323 -0
- package/nodes/lime-crm/resources/data/operations/createManyObjects.operation.ts +44 -0
- package/nodes/lime-crm/resources/data/operations/createOrUpdateManyObjects.operation.ts +44 -0
- package/nodes/lime-crm/resources/data/operations/deprecated-startBulkImport.operation.ts +364 -0
- package/nodes/lime-crm/resources/data/operations/index.ts +17 -0
- package/nodes/lime-crm/resources/data/operations/updateManyObjects.operation.ts +44 -0
- package/nodes/lime-crm/transport/bulkimport.ts +271 -0
- package/nodes/lime-crm/transport/index.ts +8 -0
- package/nodes/lime-crm/transport/limetypes.ts +26 -8
- package/package.json +1 -1
|
@@ -103,6 +103,30 @@ function deserializeLimetype(limetype: LimetypeCrmApiResponse): Limetype {
|
|
|
103
103
|
} as Limetype;
|
|
104
104
|
}
|
|
105
105
|
|
|
106
|
+
type RelatedTypeLinks = {
|
|
107
|
+
related_type?: {
|
|
108
|
+
name: string;
|
|
109
|
+
};
|
|
110
|
+
};
|
|
111
|
+
|
|
112
|
+
function getRelatedLimetypeName(property: {
|
|
113
|
+
_links?: unknown;
|
|
114
|
+
}): string | undefined {
|
|
115
|
+
const links = property._links as RelatedTypeLinks | undefined;
|
|
116
|
+
return links?.related_type?.name;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
function deserializeLimetypeProperty(
|
|
120
|
+
property: LimetypeCrmApiResponse
|
|
121
|
+
): LimetypeProperty {
|
|
122
|
+
const relatedLimetype = getRelatedLimetypeName(property);
|
|
123
|
+
|
|
124
|
+
return {
|
|
125
|
+
...removeKeys(property, ['_links', '_embedded']),
|
|
126
|
+
...(relatedLimetype ? { relatedLimetype } : {}),
|
|
127
|
+
} as LimetypeProperty;
|
|
128
|
+
}
|
|
129
|
+
|
|
106
130
|
/**
|
|
107
131
|
* Fetch all available Limetypes from the Lime CRM API, including their properties.
|
|
108
132
|
*
|
|
@@ -201,16 +225,10 @@ export async function getProperties(
|
|
|
201
225
|
}
|
|
202
226
|
);
|
|
203
227
|
if (response.success) {
|
|
228
|
+
const properties = response.data._embedded?.properties ?? [];
|
|
204
229
|
return {
|
|
205
230
|
success: true,
|
|
206
|
-
data:
|
|
207
|
-
response.data._embedded.properties.map(
|
|
208
|
-
(property) =>
|
|
209
|
-
removeKeys(property, [
|
|
210
|
-
'_links',
|
|
211
|
-
'_embedded',
|
|
212
|
-
]) as LimetypeProperty
|
|
213
|
-
) || [],
|
|
231
|
+
data: properties.map(deserializeLimetypeProperty),
|
|
214
232
|
};
|
|
215
233
|
} else {
|
|
216
234
|
return response;
|