@limetech/n8n-nodes-lime 0.3.3 → 0.3.5

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 (51) hide show
  1. package/.github/workflows/mark-stale.yml +21 -0
  2. package/CHANGELOG.md +54 -0
  3. package/Dockerfile +2 -2
  4. package/dist/nodes/fortnox/resources/customers/operations/delete.operation.js +10 -1
  5. package/dist/nodes/fortnox/resources/customers/operations/delete.operation.js.map +1 -1
  6. package/dist/nodes/fortnox/resources/customers/operations/get.operation.js +10 -1
  7. package/dist/nodes/fortnox/resources/customers/operations/get.operation.js.map +1 -1
  8. package/dist/nodes/fortnox/resources/customers/operations/getAll.operation.js +1 -1
  9. package/dist/nodes/fortnox/resources/customers/operations/getAll.operation.js.map +1 -1
  10. package/dist/nodes/fortnox/resources/customers/operations/update.operation.js +10 -1
  11. package/dist/nodes/fortnox/resources/customers/operations/update.operation.js.map +1 -1
  12. package/dist/nodes/fortnox/resources/invoice/operations/get.operation.js +10 -1
  13. package/dist/nodes/fortnox/resources/invoice/operations/get.operation.js.map +1 -1
  14. package/dist/nodes/fortnox/resources/invoice/operations/getAll.operation.js +1 -1
  15. package/dist/nodes/fortnox/resources/invoice/operations/getAll.operation.js.map +1 -1
  16. package/dist/nodes/fortnox/resources/invoice/operations/update.operation.js +10 -1
  17. package/dist/nodes/fortnox/resources/invoice/operations/update.operation.js.map +1 -1
  18. package/dist/nodes/fortnox/transport/index.js +5 -0
  19. package/dist/nodes/fortnox/transport/index.js.map +1 -1
  20. package/dist/nodes/lime-crm/commons/webhook.d.ts +1 -0
  21. package/dist/nodes/lime-crm/commons/webhook.js +1 -0
  22. package/dist/nodes/lime-crm/commons/webhook.js.map +1 -1
  23. package/dist/nodes/lime-crm/resources/limeObject/operations/search.operation.js +18 -1
  24. package/dist/nodes/lime-crm/resources/limeObject/operations/search.operation.js.map +1 -1
  25. package/dist/nodes/lime-crm/transport/commons.d.ts +1 -1
  26. package/dist/nodes/lime-crm/transport/commons.js +1 -0
  27. package/dist/nodes/lime-crm/transport/commons.js.map +1 -1
  28. package/dist/nodes/lime-crm/transport/limeobjects.d.ts +5 -5
  29. package/dist/nodes/lime-crm/transport/limeobjects.js +106 -22
  30. package/dist/nodes/lime-crm/transport/limeobjects.js.map +1 -1
  31. package/dist/nodes/lime-crm/transport/limetypes.js +17 -2
  32. package/dist/nodes/lime-crm/transport/limetypes.js.map +1 -1
  33. package/dist/nodes/lime-crm/transport/webhooks.js +11 -1
  34. package/dist/nodes/lime-crm/transport/webhooks.js.map +1 -1
  35. package/dist/package.json +1 -1
  36. package/dist/tsconfig.tsbuildinfo +1 -1
  37. package/nodes/fortnox/resources/customers/operations/delete.operation.ts +11 -1
  38. package/nodes/fortnox/resources/customers/operations/get.operation.ts +11 -1
  39. package/nodes/fortnox/resources/customers/operations/getAll.operation.ts +1 -1
  40. package/nodes/fortnox/resources/customers/operations/update.operation.ts +11 -1
  41. package/nodes/fortnox/resources/invoice/operations/get.operation.ts +11 -1
  42. package/nodes/fortnox/resources/invoice/operations/getAll.operation.ts +1 -1
  43. package/nodes/fortnox/resources/invoice/operations/update.operation.ts +11 -1
  44. package/nodes/fortnox/transport/index.ts +5 -0
  45. package/nodes/lime-crm/commons/webhook.ts +2 -0
  46. package/nodes/lime-crm/resources/limeObject/operations/search.operation.ts +19 -6
  47. package/nodes/lime-crm/transport/commons.ts +2 -1
  48. package/nodes/lime-crm/transport/limeobjects.ts +141 -29
  49. package/nodes/lime-crm/transport/limetypes.ts +19 -2
  50. package/nodes/lime-crm/transport/webhooks.ts +12 -1
  51. package/package.json +2 -2
@@ -18,7 +18,16 @@ async function getLimeTypesFromApi(nodeContext) {
18
18
  }
19
19
  async function getLimeType(nodeContext, limeType) {
20
20
  const url = `${LIMETYPE_URL}${limeType}/`;
21
- return await (0, _1.callLimeApi)(nodeContext, 'GET', url);
21
+ const response = await (0, _1.callLimeApi)(nodeContext, 'GET', url);
22
+ if (response.success)
23
+ return response;
24
+ return {
25
+ ...response,
26
+ metadata: {
27
+ ...response.metadata,
28
+ limetype: limeType,
29
+ },
30
+ };
22
31
  }
23
32
  async function getProperties(nodeContext, limeType) {
24
33
  var _a, _b;
@@ -34,6 +43,12 @@ async function getProperties(nodeContext, limeType) {
34
43
  data: (_b = (_a = response.data) === null || _a === void 0 ? void 0 : _a._embedded.properties) !== null && _b !== void 0 ? _b : [],
35
44
  };
36
45
  }
37
- return response;
46
+ return {
47
+ ...response,
48
+ metadata: {
49
+ ...response.metadata,
50
+ limetype: limeType,
51
+ },
52
+ };
38
53
  }
39
54
  //# sourceMappingURL=limetypes.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"limetypes.js","sourceRoot":"","sources":["../../../../nodes/lime-crm/transport/limetypes.ts"],"names":[],"mappings":";;AAmBA,kDAeC;AAED,kCAMC;AAED,sCAuBC;AAnED,wBAAgC;AAKhC,MAAM,YAAY,GAAG,mBAAmB,CAAC;AAclC,KAAK,UAAU,mBAAmB,CACrC,WAAiC;;IAEjC,MAAM,QAAQ,GAAG,MAAM,IAAA,cAAW,EAC9B,WAAW,EACX,KAAK,EACL,YAAY,CACf,CAAC;IACF,IAAI,QAAQ,CAAC,OAAO,EAAE,CAAC;QACnB,OAAO;YACH,OAAO,EAAE,IAAI;YACb,IAAI,EAAE,MAAA,MAAA,QAAQ,CAAC,IAAI,0CAAE,MAAM,CAAC,SAAS,mCAAI,EAAE;SAC9C,CAAC;IACN,CAAC;IACD,OAAO,QAAQ,CAAC;AACpB,CAAC;AAEM,KAAK,UAAU,WAAW,CAC7B,WAAiC,EACjC,QAAgB;IAEhB,MAAM,GAAG,GAAG,GAAG,YAAY,GAAG,QAAQ,GAAG,CAAC;IAC1C,OAAO,MAAM,IAAA,cAAW,EAAW,WAAW,EAAE,KAAK,EAAE,GAAG,CAAC,CAAC;AAChE,CAAC;AAEM,KAAK,UAAU,aAAa,CAC/B,WAAiC,EACjC,QAAgB;;IAEhB,MAAM,GAAG,GAAG,GAAG,YA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Q;QACX,QAAQ,EAAE;YACN,GAAG,QAAQ,CAAC,QAAQ;YACpB,QAAQ,EAAE,QAAQ;SACrB;KACJ,CAAC;AACN,CAAC;AAEM,KAAK,UAAU,aAAa,CAC/B,WAAiC,EACjC,QAAgB;;IAEhB,MAAM,GAAG,GAAG,GAAG,YAAY,GAAG,QAAQ,GAAG,CAAC;IAC1C,MAAM,QAAQ,GAAG,MAAM,IAAA,cAAW,EAC9B,WAAW,EACX,KAAK,EACL,GAAG,EACH;QACI,EAAE,EAAE;YACA,MAAM,EAAE,YAAY;SACvB;KACJ,CACJ,CAAC;IAEF,IAAI,QAAQ,CAAC,OAAO,EAAE,CAAC;QACnB,OAAO;YACH,OAAO,EAAE,IAAI;YACb,IAAI,EAAE,MAAA,MAAA,QAAQ,CAAC,IAAI,0CAAE,SAAS,CAAC,UAAU,mCAAI,EAAE;SAClD,CAAC;IACN,CAAC;IAED,OAAO;QACH,GAAG,QAAQ;QACX,QAAQ,EAAE;YACN,GAAG,QAAQ,CAAC,QAAQ;YACpB,QAAQ,EAAE,QAAQ;SACrB;KACJ,CAAC;AACN,CAAC"}
@@ -23,10 +23,20 @@ async function createSubscription(nodeContext, webhook) {
23
23
  body: {
24
24
  events: webhook.events,
25
25
  target_url: webhook.url,
26
+ name: webhook.name,
26
27
  },
27
28
  });
28
29
  }
29
30
  async function deleteSubscription(nodeContext, webhook) {
30
- return await (0, _1.callLimeApi)(nodeContext, 'DELETE', `${SUBSCRIPTION_URL}${webhook.data.webhookId}/`);
31
+ const response = await (0, _1.callLimeApi)(nodeContext, 'DELETE', `${SUBSCRIPTION_URL}${webhook.data.webhookId}/`);
32
+ if (response.success)
33
+ return response;
34
+ return {
35
+ ...response,
36
+ metadata: {
37
+ ...response.metadata,
38
+ id: webhook.data.webhookId,
39
+ },
40
+ };
31
41
  }
32
42
  //# sourceMappingURL=webhooks.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"webhooks.js","sourceRoot":"","sources":["../../../../nodes/lime-crm/transport/webhooks.ts"],"names":[],"mappings":";;AAeA,0CASC;AAED,8EAWC;AAED,gDAUC;AAED,gDASC;AA3DD,wBAAgC;AAIhC,MAAM,gBAAgB,GAAG,sBAAsB,CAAC;AAUzC,KAAK,UAAU,eAAe,CACjC,WAAiC,EACjC,OAAgB;IAEhB,OAAO,MAAM,IAAA,cAAW,EACpB,WAAW,EACX,KAAK,EACL,GAAG,gBAAgB,GAAG,OAAO,CAAC,IAAI,CAAC,SAAS,EAAE,CACjD,CAAC;AACN,CAAC;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,OAAgB;IAEhB,OAAO,MAAM,IAAA,cAAW,EAAC,WAAW,EAAE,MAAM,EAAE,gBAAgB,EAAE;QAC5D,IAAI,EAAE;YACF,MAAM,EAAE,OAAO,CAAC,MAAM;YACtB,UAAU,EAAE,OAAO,CAAC,GAAG;SAC1B;KACJ,CAAC,CAAC;AACP,CAAC;AAEM,KAAK,UAAU,kBAAkB,CACpC,WAAiC,EACjC,OAAgB;IAEhB,OAAO,MAAM,IAAA,cAAW,EACpB,WAAW,EACX,QAAQ,EACR,GAAG,gBAAgB,GAAG,OAAO,CAAC,IAAI,CAAC,SAAS,GAAG,CAClD,CAAC;AACN,CAAC"}
1
+ {"version":3,"file":"webhooks.js","sourceRoot":"","sources":["../../../../nodes/lime-crm/transport/webhooks.ts"],"names":[],"mappings":";;AAeA,0CASC;AAED,8EAWC;AAED,gDAWC;AAED,gDAmBC;AAtED,wBAAgC;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ACN,CAAC"}
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@limetech/n8n-nodes-lime",
3
- "version": "0.3.3",
3
+ "version": "0.3.4",
4
4
  "description": "n8n node to connect to Lime CRM",
5
5
  "license": "MIT",
6
6
  "main": "index.js",