@limetech/n8n-nodes-lime 2.6.1 → 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.
Files changed (67) hide show
  1. package/CHANGELOG.md +7 -2
  2. package/dist/nodes/lime-crm/LimeCrmNode.node.d.ts +4 -1
  3. package/dist/nodes/lime-crm/LimeCrmNode.node.js +3 -0
  4. package/dist/nodes/lime-crm/LimeCrmNode.node.js.map +1 -1
  5. package/dist/nodes/lime-crm/methods/getLimetypeProperties.d.ts +2 -0
  6. package/dist/nodes/lime-crm/methods/getLimetypeProperties.js +43 -0
  7. package/dist/nodes/lime-crm/methods/getLimetypeProperties.js.map +1 -1
  8. package/dist/nodes/lime-crm/methods/index.d.ts +2 -2
  9. package/dist/nodes/lime-crm/methods/index.js +4 -1
  10. package/dist/nodes/lime-crm/methods/index.js.map +1 -1
  11. package/dist/nodes/lime-crm/methods/resourceMapping.d.ts +1 -0
  12. package/dist/nodes/lime-crm/methods/resourceMapping.js +46 -0
  13. package/dist/nodes/lime-crm/methods/resourceMapping.js.map +1 -1
  14. package/dist/nodes/lime-crm/models/limetype.d.ts +1 -0
  15. package/dist/nodes/lime-crm/resources/data/index.d.ts +1 -1
  16. package/dist/nodes/lime-crm/resources/data/index.js +20 -0
  17. package/dist/nodes/lime-crm/resources/data/index.js.map +1 -1
  18. package/dist/nodes/lime-crm/resources/data/operations/bulkImportCommons.d.ts +5 -0
  19. package/dist/nodes/lime-crm/resources/data/operations/bulkImportCommons.js +230 -0
  20. package/dist/nodes/lime-crm/resources/data/operations/bulkImportCommons.js.map +1 -0
  21. package/dist/nodes/lime-crm/resources/data/operations/createManyObjects.operation.d.ts +9 -0
  22. package/dist/nodes/lime-crm/resources/data/operations/createManyObjects.operation.js +16 -0
  23. package/dist/nodes/lime-crm/resources/data/operations/createManyObjects.operation.js.map +1 -0
  24. package/dist/nodes/lime-crm/resources/data/operations/createOrUpdateManyObjects.operation.d.ts +9 -0
  25. package/dist/nodes/lime-crm/resources/data/operations/createOrUpdateManyObjects.operation.js +16 -0
  26. package/dist/nodes/lime-crm/resources/data/operations/createOrUpdateManyObjects.operation.js.map +1 -0
  27. package/dist/nodes/lime-crm/resources/data/operations/deprecated-startBulkImport.operation.d.ts +9 -0
  28. package/dist/nodes/lime-crm/resources/data/operations/deprecated-startBulkImport.operation.js +241 -0
  29. package/dist/nodes/lime-crm/resources/data/operations/deprecated-startBulkImport.operation.js.map +1 -0
  30. package/dist/nodes/lime-crm/resources/data/operations/index.d.ts +4 -0
  31. package/dist/nodes/lime-crm/resources/data/operations/index.js +5 -1
  32. package/dist/nodes/lime-crm/resources/data/operations/index.js.map +1 -1
  33. package/dist/nodes/lime-crm/resources/data/operations/updateManyObjects.operation.d.ts +9 -0
  34. package/dist/nodes/lime-crm/resources/data/operations/updateManyObjects.operation.js +16 -0
  35. package/dist/nodes/lime-crm/resources/data/operations/updateManyObjects.operation.js.map +1 -0
  36. package/dist/nodes/lime-crm/transport/bulkimport.d.ts +41 -0
  37. package/dist/nodes/lime-crm/transport/bulkimport.js +86 -0
  38. package/dist/nodes/lime-crm/transport/bulkimport.js.map +1 -0
  39. package/dist/nodes/lime-crm/transport/index.d.ts +1 -0
  40. package/dist/nodes/lime-crm/transport/index.js +6 -1
  41. package/dist/nodes/lime-crm/transport/index.js.map +1 -1
  42. package/dist/nodes/lime-crm/transport/limetypes.js +15 -4
  43. package/dist/nodes/lime-crm/transport/limetypes.js.map +1 -1
  44. package/dist/nodes/lime-forms/LimeFormsTrigger.node.js +3 -3
  45. package/dist/nodes/lime-forms/LimeFormsTrigger.node.js.map +1 -1
  46. package/dist/nodes/lime-forms/lime-forms.svg +6 -0
  47. package/dist/tsconfig.tsbuildinfo +1 -1
  48. package/nodes/lime-crm/LimeCrmNode.node.ts +6 -0
  49. package/nodes/lime-crm/methods/getLimetypeProperties.ts +84 -0
  50. package/nodes/lime-crm/methods/index.ts +3 -0
  51. package/nodes/lime-crm/methods/resourceMapping.ts +76 -0
  52. package/nodes/lime-crm/models/limetype.ts +1 -0
  53. package/nodes/lime-crm/resources/data/index.ts +34 -1
  54. package/nodes/lime-crm/resources/data/operations/bulkImportCommons.ts +323 -0
  55. package/nodes/lime-crm/resources/data/operations/createManyObjects.operation.ts +44 -0
  56. package/nodes/lime-crm/resources/data/operations/createOrUpdateManyObjects.operation.ts +44 -0
  57. package/nodes/lime-crm/resources/data/operations/deprecated-startBulkImport.operation.ts +364 -0
  58. package/nodes/lime-crm/resources/data/operations/index.ts +17 -0
  59. package/nodes/lime-crm/resources/data/operations/updateManyObjects.operation.ts +44 -0
  60. package/nodes/lime-crm/transport/bulkimport.ts +271 -0
  61. package/nodes/lime-crm/transport/index.ts +8 -0
  62. package/nodes/lime-crm/transport/limetypes.ts +26 -8
  63. package/nodes/lime-forms/LimeFormsTrigger.node.ts +3 -3
  64. package/nodes/lime-forms/lime-forms.svg +6 -0
  65. package/package.json +1 -1
  66. package/dist/nodes/lime-forms/assets/lime-crm.svg +0 -1
  67. package/nodes/lime-forms/assets/lime-crm.svg +0 -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;
@@ -29,11 +29,11 @@ const FORMS_OBSERVABLE_WEBHOOK_NAME_PREFIX = 'N8N';
29
29
 
30
30
  export class LimeFormsTrigger implements INodeType {
31
31
  description: INodeTypeDescription = {
32
- displayName: 'Lime CRM Forms Trigger',
33
- name: 'limeCrmFormsTrigger',
32
+ displayName: 'Lime Forms Trigger',
33
+ name: 'limeFormsTrigger',
34
34
  group: ['trigger'],
35
35
  version: 1,
36
- icon: 'file:assets/lime-crm.svg',
36
+ icon: 'file:lime-forms.svg',
37
37
  description: 'Handle webhooks from Lime Forms',
38
38
  defaults: {
39
39
  name: 'Lime Forms',
@@ -0,0 +1,6 @@
1
+ <svg viewBox="0 0 1025 1025" xmlns="http://www.w3.org/2000/svg" xml:space="preserve"><clipPath id="a"><path d="M.067.03h1024v1024H.067z"/></clipPath>
2
+ <g clip-path="url(#a)"><path d="M92.466 480.888c0-257.059 208.718-465.779 465.78-465.779 257.101 0 465.821 208.72 465.821 465.779 0 133.713-55.806 271.139-193.404 385.355-166.779 138.45-390.389 157.35-736.149 134.525-102.653-6.785-117.502-24.319-64.469-63.444C196.74 814.277 92.466 720.157 92.466 480.888Z" style="fill:#a6efff"/>
3
+ <clipPath id="b"><path d="M92.466 480.888c0-257.059 208.718-465.779 465.78-465.779 257.101 0 465.821 208.72 465.821 465.779 0 133.713-55.806 271.139-193.404 385.355-166.779 138.45-390.389 157.35-736.149 134.525-102.653-6.785-117.502-24.319-64.469-63.444C196.74 814.277 92.466 720.157 92.466 480.888Z"/></clipPath>
4
+ <g clip-path="url(#b)"><path d="M-810.991 1517.47c-520.197-174.655 602.109-1999.19 1122.31-1824.54 520.198 174.652 347.26 364.038 243.982 791.188-103.277 427.149-846.091 1208-1366.29 1033.35Z" style="fill:#ffa6ea;filter:blur(200px)"/></g>
5
+ <path d="M415.273 301.267c-40.49 0-73.342 32.894-73.342 73.385 0 40.489 32.852 73.342 73.342 73.342 40.489 0 73.384-32.853 73.384-73.342 0-40.491-32.895-73.385-73.384-73.385Zm168.017 96.552h175.653c12.8 0 23.168-10.368 23.168-23.167 0-12.801-10.368-23.168-23.168-23.168H583.29c-12.8 0-23.168 10.367-23.168 23.168 0 12.799 10.368 23.167 23.168 23.167Zm0 212.345h175.653c12.8 0 23.168-10.367 23.168-23.167 0-12.756-10.368-23.166-23.168-23.166H583.29c-12.8 0-23.168 10.41-23.168 23.166 0 12.8 10.368 23.167 23.168 23.167Zm-168.017-96.509c-40.49 0-73.342 32.853-73.342 73.342 0 40.49 32.852 73.385 73.342 73.385 40.489 0 73.384-32.895 73.384-73.385 0-40.489-32.895-73.342-73.384-73.342Z"
6
+ style="fill:#fff"/></g></svg>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@limetech/n8n-nodes-lime",
3
- "version": "2.6.1",
3
+ "version": "2.7.0-dev.1",
4
4
  "description": "n8n node to connect to Lime CRM",
5
5
  "license": "Apache-2.0",
6
6
  "main": "nodes/index.ts",
@@ -1 +0,0 @@
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>
@@ -1 +0,0 @@
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>