@limetech/n8n-nodes-lime 0.2.0 → 0.2.2

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 (54) hide show
  1. package/dist/package.json +11 -7
  2. package/dist/tsconfig.tsbuildinfo +1 -1
  3. package/package.json +8 -5
  4. package/.eslintrc.js +0 -58
  5. package/.github/copilot-instructions.md +0 -20
  6. package/.github/workflows/publish.yml +0 -34
  7. package/credentials/LimeCrmApi.credentials.ts +0 -57
  8. package/credentials/LimeGoApi.credentials.ts +0 -31
  9. package/docker-compose.yml +0 -44
  10. package/nodes/lime-crm/GenericTypes.ts +0 -114
  11. package/nodes/lime-crm/LimeCrm.node.json +0 -18
  12. package/nodes/lime-crm/LimeCrmNode.node.ts +0 -154
  13. package/nodes/lime-crm/LimeCrmTrigger/LimeCrmTrigger.node.ts +0 -461
  14. package/nodes/lime-crm/LimeCrmTrigger.node.ts +0 -505
  15. package/nodes/lime-crm/lime-crm.svg +0 -1
  16. package/nodes/lime-crm/methods/getAllSortableFields.ts +0 -73
  17. package/nodes/lime-crm/methods/getLimeTypeProperties.ts +0 -48
  18. package/nodes/lime-crm/methods/getLimeTypeRelations.ts +0 -32
  19. package/nodes/lime-crm/methods/getLimeTypes.ts +0 -33
  20. package/nodes/lime-crm/methods/getRelatedTypeProperties.ts +0 -47
  21. package/nodes/lime-crm/methods/index.ts +0 -5
  22. package/nodes/lime-crm/resources/limeObject/commonFields.ts +0 -179
  23. package/nodes/lime-crm/resources/limeObject/index.ts +0 -64
  24. package/nodes/lime-crm/resources/limeObject/operations/common.operation.ts +0 -35
  25. package/nodes/lime-crm/resources/limeObject/operations/create.operation.ts +0 -234
  26. package/nodes/lime-crm/resources/limeObject/operations/delete.operation.ts +0 -136
  27. package/nodes/lime-crm/resources/limeObject/operations/get.operation.ts +0 -124
  28. package/nodes/lime-crm/resources/limeObject/operations/getAll.operation.ts +0 -242
  29. package/nodes/lime-crm/resources/limeObject/operations/search.operation.ts +0 -242
  30. package/nodes/lime-crm/resources/limeObject/operations/update.operation.ts +0 -201
  31. package/nodes/lime-crm/resources/limeType/index.ts +0 -66
  32. package/nodes/lime-crm/resources/limeType/operations/getProperties.operation.ts +0 -105
  33. package/nodes/lime-crm/resources/limeType/operations/getRelations.operation.ts +0 -105
  34. package/nodes/lime-crm/resources/limeType/operations/getType.operation.ts +0 -58
  35. package/nodes/lime-crm/resources/limeType/operations/listTypes.operation.ts +0 -76
  36. package/nodes/lime-crm/resources/queryApi/index.ts +0 -42
  37. package/nodes/lime-crm/resources/queryApi/operations/executeQuery.operation.ts +0 -605
  38. package/nodes/lime-crm/transport/index.ts +0 -74
  39. package/nodes/lime-go/LimeGo.node.ts +0 -146
  40. package/nodes/lime-go/actions/organization/get.operation.ts +0 -42
  41. package/nodes/lime-go/actions/organization/getByExternalKey.operation.ts +0 -57
  42. package/nodes/lime-go/actions/organization/index.ts +0 -69
  43. package/nodes/lime-go/actions/organization/organizationFields.ts +0 -160
  44. package/nodes/lime-go/actions/organization/search.operation.ts +0 -73
  45. package/nodes/lime-go/actions/organization/update.operation.ts +0 -140
  46. package/nodes/lime-go/actions/person/createMail.operation.ts +0 -140
  47. package/nodes/lime-go/actions/person/get.operation.ts +0 -51
  48. package/nodes/lime-go/actions/person/index.ts +0 -69
  49. package/nodes/lime-go/actions/person/personFields.ts +0 -132
  50. package/nodes/lime-go/actions/person/search.operation.ts +0 -88
  51. package/nodes/lime-go/actions/person/update.operation.ts +0 -122
  52. package/nodes/lime-go/lime-go.svg +0 -1
  53. package/nodes/lime-go/transport/graphqlRequest.ts +0 -30
  54. package/tsconfig.json +0 -30
@@ -1,114 +0,0 @@
1
- import { IDataObject } from 'n8n-workflow';
2
-
3
- // This file contains shared types and interfaces used across the Lime CRM node
4
-
5
- /**
6
- * Basic operation parameters shared across resources
7
- */
8
- export interface IOperationParams {
9
- operation: string;
10
- i: number; // Item index
11
- }
12
-
13
- /**
14
- * Common structure for all API responses
15
- */
16
- export interface ILimeCrmResponse {
17
- // Common response properties can be defined here
18
- [key: string]: any;
19
- }
20
-
21
- /**
22
- * Define LimeType for making typings stronger
23
- */
24
- export interface ILimeTypeObject {
25
- id?: number | string;
26
- // Other common limetype properties can go here
27
- [key: string]: any;
28
- }
29
-
30
- /**
31
- * Define Webhook for making typings stronger
32
- */
33
- export interface IWebhookObject {
34
- name: string;
35
- events: string[];
36
- target_url: string;
37
- enabled: boolean;
38
- headers?: Array<{ name: string; value: string; secret_value?: string; type: string }>;
39
- secret?: string;
40
- }
41
-
42
- /**
43
- * Define webhook event data structure
44
- */
45
- export interface IWebhookEventData {
46
- event: string;
47
- body: {
48
- id: string;
49
- values: IDataObject;
50
- [key: string]: any;
51
- };
52
- [key: string]: any;
53
- }
54
-
55
- /**
56
- * Define LimeType response structure
57
- */
58
- export interface ILimeTypeResponse {
59
- _embedded?: {
60
- properties?: ILimeTypeProperty[];
61
- };
62
- _links?: {
63
- limetypes?: ILimeTypeLink[];
64
- };
65
- }
66
-
67
- export interface ILimeTypeLink {
68
- name: string;
69
- href: string;
70
- }
71
-
72
- export interface ILimeTypeProperty {
73
- id: string;
74
- name: string;
75
- localizedname: string;
76
- propertytype: string;
77
- readonly: boolean;
78
- required: boolean;
79
- [key: string]: any;
80
- }
81
-
82
- /**
83
- * Define LimeObject response structure
84
- */
85
- export interface ILimeObjectResponse {
86
- _embedded?: {
87
- limeobjects?: ILimeObject[];
88
- };
89
- _links?: {
90
- next?: {
91
- href: string;
92
- };
93
- self?: {
94
- href: string;
95
- };
96
- };
97
- }
98
-
99
- export interface ILimeObject {
100
- id: string;
101
- [key: string]: any;
102
- }
103
-
104
- /**
105
- * Define query parameters that can be used with the API
106
- */
107
- export interface IQueryParams {
108
- _limit?: number;
109
- _offset?: number;
110
- _sort?: string;
111
- [key: string]: any;
112
- }
113
-
114
- export class GenericTypes { }
@@ -1,18 +0,0 @@
1
- {
2
- "node": "n8n-nodes-base.limeCrm",
3
- "nodeVersion": "1.0",
4
- "codexVersion": "1.0",
5
- "categories": ["CRM"],
6
- "resources": {
7
- "credentialDocumentation": [
8
- {
9
- "url": "https://lime-crm.com/api-docs/"
10
- }
11
- ],
12
- "primaryDocumentation": [
13
- {
14
- "url": "https://lime-crm.com/api-docs/"
15
- }
16
- ]
17
- }
18
- }
@@ -1,154 +0,0 @@
1
- import {
2
- IExecuteFunctions,
3
- INodeExecutionData,
4
- INodeType,
5
- INodeTypeDescription,
6
- NodeOperationError,
7
- NodeConnectionType,
8
- INodeProperties,
9
- NodePropertyTypes,
10
- } from 'n8n-workflow';
11
-
12
- // Import resources
13
- import { limeTypeFields, limeTypeOperations } from './resources/limeType';
14
- import { limeObjectFields, limeObjectOperations } from './resources/limeObject';
15
- import { queryApiFields, queryApiOperations } from './resources/queryApi';
16
-
17
- // Import method loaders
18
- import {
19
- getLimeTypes,
20
- getLimeTypeProperties,
21
- getLimeTypeRelations,
22
- getRelatedTypeProperties,
23
- getAllSortableFields,
24
- } from './methods';
25
-
26
- // Import LimeCrmTrigger
27
- import { LimeCrmTrigger } from './LimeCrmTrigger/LimeCrmTrigger.node';
28
-
29
- export class LimeCrmNode implements INodeType {
30
- description: INodeTypeDescription = {
31
- displayName: 'Lime CRM',
32
- name: 'limeCrm',
33
- icon: 'file:lime-crm.svg',
34
- group: ['transform'],
35
- version: 1,
36
- subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
37
- description: 'Consume the Lime CRM API',
38
- defaults: {
39
- name: 'Lime CRM',
40
- },
41
- inputs: [NodeConnectionType.Main],
42
- outputs: [NodeConnectionType.Main],
43
- credentials: [
44
- {
45
- name: 'limeCrmApi',
46
- required: true,
47
- },
48
- ],
49
- properties: [
50
- // Select API resource to work with
51
- {
52
- displayName: 'Resource',
53
- name: 'resource',
54
- type: 'options' as NodePropertyTypes,
55
- noDataExpression: true,
56
- options: [
57
- {
58
- name: 'Lime Type',
59
- value: 'limeType',
60
- description: 'Work with entity type definitions',
61
- },
62
- {
63
- name: 'Lime Object',
64
- value: 'limeObject',
65
- description: 'Work with actual data records',
66
- },
67
- {
68
- name: 'Query API',
69
- value: 'queryApi',
70
- description: 'Execute custom queries against the database',
71
- },
72
- ],
73
- default: 'limeObject',
74
- },
75
-
76
- // Import operations for each resource - ensure they all match INodeProperties[]
77
- ...(limeTypeFields as INodeProperties[]),
78
- ...(limeObjectFields as INodeProperties[]),
79
- ...(queryApiFields as INodeProperties[]),
80
- ],
81
- };
82
-
83
- // This method will expose all dynamic functions for loading options
84
- methods = {
85
- loadOptions: {
86
- // Method to load Lime types for dropdown selection
87
- getLimeTypes,
88
-
89
- // Method to load properties for a selected Lime type
90
- getLimeTypeProperties,
91
-
92
- // Method to load relations for a selected Lime type
93
- getLimeTypeRelations,
94
-
95
- // Method to load properties for a related Lime type
96
- getRelatedTypeProperties,
97
-
98
- // Method to get all sortable fields
99
- getAllSortableFields,
100
- },
101
- };
102
-
103
- async execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]> {
104
- const items = this.getInputData();
105
- const returnData = [];
106
- let responseData;
107
-
108
- // Get the selected resource and operation
109
- const resource = this.getNodeParameter('resource', 0) as string;
110
- const operation = this.getNodeParameter('operation', 0) as string;
111
-
112
- // Process each input item
113
- for (let i = 0; i < items.length; i++) {
114
- try {
115
- // Route to the appropriate resource handler
116
- if (resource === 'limeType') {
117
- responseData = await limeTypeOperations.call(this, { operation, i });
118
- } else if (resource === 'limeObject') {
119
- responseData = await limeObjectOperations.call(this, { operation, i });
120
- } else if (resource === 'queryApi') {
121
- responseData = await queryApiOperations.call(this, { operation, i });
122
- } else {
123
- throw new NodeOperationError(this.getNode(), `The resource "${resource}" is not supported!`);
124
- }
125
-
126
- // If the response is an array, add each item individually
127
- if (Array.isArray(responseData)) {
128
- returnData.push(...responseData);
129
- } else if (responseData !== undefined) {
130
- // Otherwise, add the single response item
131
- returnData.push(responseData);
132
- }
133
- } catch (error) {
134
- // If an error occurs, handle it appropriately
135
- if (this.continueOnFail()) {
136
- // If continueOnFail is enabled, add the error as an item and continue
137
- returnData.push({
138
- error: error.message,
139
- json: { error: error.message },
140
- });
141
- continue;
142
- }
143
- // Otherwise, throw the error to stop execution
144
- throw error;
145
- }
146
- }
147
-
148
- // Return the processed data as an array of input items
149
- return [this.helpers.returnJsonArray(returnData)];
150
- }
151
- }
152
-
153
- // Export LimeCrmTrigger
154
- export { LimeCrmTrigger };