@limetech/n8n-nodes-lime 0.2.0 → 0.2.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/nodes/lime-crm/LimeCrm.node.json +16 -16
- package/package.json +47 -47
- package/{dist/tsconfig.tsbuildinfo → tsconfig.tsbuildinfo} +1 -1
- package/.eslintrc.js +0 -58
- package/.github/copilot-instructions.md +0 -20
- package/.github/workflows/publish.yml +0 -34
- package/README.md +0 -79
- package/credentials/LimeCrmApi.credentials.ts +0 -57
- package/credentials/LimeGoApi.credentials.ts +0 -31
- package/dist/nodes/lime-crm/LimeCrm.node.json +0 -18
- package/dist/nodes/lime-crm/lime-crm.svg +0 -1
- package/dist/nodes/lime-go/lime-go.svg +0 -1
- package/dist/package.json +0 -49
- package/docker-compose.yml +0 -44
- package/index.js +0 -3
- package/nodes/lime-crm/GenericTypes.ts +0 -114
- package/nodes/lime-crm/LimeCrmNode.node.ts +0 -154
- package/nodes/lime-crm/LimeCrmTrigger/LimeCrmTrigger.node.ts +0 -461
- package/nodes/lime-crm/LimeCrmTrigger.node.ts +0 -505
- package/nodes/lime-crm/methods/getAllSortableFields.ts +0 -73
- package/nodes/lime-crm/methods/getLimeTypeProperties.ts +0 -48
- package/nodes/lime-crm/methods/getLimeTypeRelations.ts +0 -32
- package/nodes/lime-crm/methods/getLimeTypes.ts +0 -33
- package/nodes/lime-crm/methods/getRelatedTypeProperties.ts +0 -47
- package/nodes/lime-crm/methods/index.ts +0 -5
- package/nodes/lime-crm/resources/limeObject/commonFields.ts +0 -179
- package/nodes/lime-crm/resources/limeObject/index.ts +0 -64
- package/nodes/lime-crm/resources/limeObject/operations/common.operation.ts +0 -35
- package/nodes/lime-crm/resources/limeObject/operations/create.operation.ts +0 -234
- package/nodes/lime-crm/resources/limeObject/operations/delete.operation.ts +0 -136
- package/nodes/lime-crm/resources/limeObject/operations/get.operation.ts +0 -124
- package/nodes/lime-crm/resources/limeObject/operations/getAll.operation.ts +0 -242
- package/nodes/lime-crm/resources/limeObject/operations/search.operation.ts +0 -242
- package/nodes/lime-crm/resources/limeObject/operations/update.operation.ts +0 -201
- package/nodes/lime-crm/resources/limeType/index.ts +0 -66
- package/nodes/lime-crm/resources/limeType/operations/getProperties.operation.ts +0 -105
- package/nodes/lime-crm/resources/limeType/operations/getRelations.operation.ts +0 -105
- package/nodes/lime-crm/resources/limeType/operations/getType.operation.ts +0 -58
- package/nodes/lime-crm/resources/limeType/operations/listTypes.operation.ts +0 -76
- package/nodes/lime-crm/resources/queryApi/index.ts +0 -42
- package/nodes/lime-crm/resources/queryApi/operations/executeQuery.operation.ts +0 -605
- package/nodes/lime-crm/transport/index.ts +0 -74
- package/nodes/lime-go/LimeGo.node.ts +0 -146
- package/nodes/lime-go/actions/organization/get.operation.ts +0 -42
- package/nodes/lime-go/actions/organization/getByExternalKey.operation.ts +0 -57
- package/nodes/lime-go/actions/organization/index.ts +0 -69
- package/nodes/lime-go/actions/organization/organizationFields.ts +0 -160
- package/nodes/lime-go/actions/organization/search.operation.ts +0 -73
- package/nodes/lime-go/actions/organization/update.operation.ts +0 -140
- package/nodes/lime-go/actions/person/createMail.operation.ts +0 -140
- package/nodes/lime-go/actions/person/get.operation.ts +0 -51
- package/nodes/lime-go/actions/person/index.ts +0 -69
- package/nodes/lime-go/actions/person/personFields.ts +0 -132
- package/nodes/lime-go/actions/person/search.operation.ts +0 -88
- package/nodes/lime-go/actions/person/update.operation.ts +0 -122
- package/nodes/lime-go/transport/graphqlRequest.ts +0 -30
- package/tsconfig.json +0 -30
- /package/{dist/credentials → credentials}/LimeCrmApi.credentials.d.ts +0 -0
- /package/{dist/credentials → credentials}/LimeCrmApi.credentials.js +0 -0
- /package/{dist/credentials → credentials}/LimeCrmApi.credentials.js.map +0 -0
- /package/{dist/credentials → credentials}/LimeGoApi.credentials.d.ts +0 -0
- /package/{dist/credentials → credentials}/LimeGoApi.credentials.js +0 -0
- /package/{dist/credentials → credentials}/LimeGoApi.credentials.js.map +0 -0
- /package/{dist/nodes → nodes}/lime-crm/GenericTypes.d.ts +0 -0
- /package/{dist/nodes → nodes}/lime-crm/GenericTypes.js +0 -0
- /package/{dist/nodes → nodes}/lime-crm/GenericTypes.js.map +0 -0
- /package/{dist/nodes → nodes}/lime-crm/LimeCrmNode.node.d.ts +0 -0
- /package/{dist/nodes → nodes}/lime-crm/LimeCrmNode.node.js +0 -0
- /package/{dist/nodes → nodes}/lime-crm/LimeCrmNode.node.js.map +0 -0
- /package/{dist/nodes → nodes}/lime-crm/LimeCrmTrigger/LimeCrmTrigger.node.d.ts +0 -0
- /package/{dist/nodes → nodes}/lime-crm/LimeCrmTrigger/LimeCrmTrigger.node.js +0 -0
- /package/{dist/nodes → nodes}/lime-crm/LimeCrmTrigger/LimeCrmTrigger.node.js.map +0 -0
- /package/{dist/nodes → nodes}/lime-crm/LimeCrmTrigger.node.d.ts +0 -0
- /package/{dist/nodes → nodes}/lime-crm/LimeCrmTrigger.node.js +0 -0
- /package/{dist/nodes → nodes}/lime-crm/LimeCrmTrigger.node.js.map +0 -0
- /package/{dist/nodes → nodes}/lime-crm/methods/getAllSortableFields.d.ts +0 -0
- /package/{dist/nodes → nodes}/lime-crm/methods/getAllSortableFields.js +0 -0
- /package/{dist/nodes → nodes}/lime-crm/methods/getAllSortableFields.js.map +0 -0
- /package/{dist/nodes → nodes}/lime-crm/methods/getLimeTypeProperties.d.ts +0 -0
- /package/{dist/nodes → nodes}/lime-crm/methods/getLimeTypeProperties.js +0 -0
- /package/{dist/nodes → nodes}/lime-crm/methods/getLimeTypeProperties.js.map +0 -0
- /package/{dist/nodes → nodes}/lime-crm/methods/getLimeTypeRelations.d.ts +0 -0
- /package/{dist/nodes → nodes}/lime-crm/methods/getLimeTypeRelations.js +0 -0
- /package/{dist/nodes → nodes}/lime-crm/methods/getLimeTypeRelations.js.map +0 -0
- /package/{dist/nodes → nodes}/lime-crm/methods/getLimeTypes.d.ts +0 -0
- /package/{dist/nodes → nodes}/lime-crm/methods/getLimeTypes.js +0 -0
- /package/{dist/nodes → nodes}/lime-crm/methods/getLimeTypes.js.map +0 -0
- /package/{dist/nodes → nodes}/lime-crm/methods/getRelatedTypeProperties.d.ts +0 -0
- /package/{dist/nodes → nodes}/lime-crm/methods/getRelatedTypeProperties.js +0 -0
- /package/{dist/nodes → nodes}/lime-crm/methods/getRelatedTypeProperties.js.map +0 -0
- /package/{dist/nodes → nodes}/lime-crm/methods/index.d.ts +0 -0
- /package/{dist/nodes → nodes}/lime-crm/methods/index.js +0 -0
- /package/{dist/nodes → nodes}/lime-crm/methods/index.js.map +0 -0
- /package/{dist/nodes → nodes}/lime-crm/resources/limeObject/commonFields.d.ts +0 -0
- /package/{dist/nodes → nodes}/lime-crm/resources/limeObject/commonFields.js +0 -0
- /package/{dist/nodes → nodes}/lime-crm/resources/limeObject/commonFields.js.map +0 -0
- /package/{dist/nodes → nodes}/lime-crm/resources/limeObject/index.d.ts +0 -0
- /package/{dist/nodes → nodes}/lime-crm/resources/limeObject/index.js +0 -0
- /package/{dist/nodes → nodes}/lime-crm/resources/limeObject/index.js.map +0 -0
- /package/{dist/nodes → nodes}/lime-crm/resources/limeObject/operations/common.operation.d.ts +0 -0
- /package/{dist/nodes → nodes}/lime-crm/resources/limeObject/operations/common.operation.js +0 -0
- /package/{dist/nodes → nodes}/lime-crm/resources/limeObject/operations/common.operation.js.map +0 -0
- /package/{dist/nodes → nodes}/lime-crm/resources/limeObject/operations/create.operation.d.ts +0 -0
- /package/{dist/nodes → nodes}/lime-crm/resources/limeObject/operations/create.operation.js +0 -0
- /package/{dist/nodes → nodes}/lime-crm/resources/limeObject/operations/create.operation.js.map +0 -0
- /package/{dist/nodes → nodes}/lime-crm/resources/limeObject/operations/delete.operation.d.ts +0 -0
- /package/{dist/nodes → nodes}/lime-crm/resources/limeObject/operations/delete.operation.js +0 -0
- /package/{dist/nodes → nodes}/lime-crm/resources/limeObject/operations/delete.operation.js.map +0 -0
- /package/{dist/nodes → nodes}/lime-crm/resources/limeObject/operations/get.operation.d.ts +0 -0
- /package/{dist/nodes → nodes}/lime-crm/resources/limeObject/operations/get.operation.js +0 -0
- /package/{dist/nodes → nodes}/lime-crm/resources/limeObject/operations/get.operation.js.map +0 -0
- /package/{dist/nodes → nodes}/lime-crm/resources/limeObject/operations/getAll.operation.d.ts +0 -0
- /package/{dist/nodes → nodes}/lime-crm/resources/limeObject/operations/getAll.operation.js +0 -0
- /package/{dist/nodes → nodes}/lime-crm/resources/limeObject/operations/getAll.operation.js.map +0 -0
- /package/{dist/nodes → nodes}/lime-crm/resources/limeObject/operations/search.operation.d.ts +0 -0
- /package/{dist/nodes → nodes}/lime-crm/resources/limeObject/operations/search.operation.js +0 -0
- /package/{dist/nodes → nodes}/lime-crm/resources/limeObject/operations/search.operation.js.map +0 -0
- /package/{dist/nodes → nodes}/lime-crm/resources/limeObject/operations/update.operation.d.ts +0 -0
- /package/{dist/nodes → nodes}/lime-crm/resources/limeObject/operations/update.operation.js +0 -0
- /package/{dist/nodes → nodes}/lime-crm/resources/limeObject/operations/update.operation.js.map +0 -0
- /package/{dist/nodes → nodes}/lime-crm/resources/limeType/index.d.ts +0 -0
- /package/{dist/nodes → nodes}/lime-crm/resources/limeType/index.js +0 -0
- /package/{dist/nodes → nodes}/lime-crm/resources/limeType/index.js.map +0 -0
- /package/{dist/nodes → nodes}/lime-crm/resources/limeType/operations/getProperties.operation.d.ts +0 -0
- /package/{dist/nodes → nodes}/lime-crm/resources/limeType/operations/getProperties.operation.js +0 -0
- /package/{dist/nodes → nodes}/lime-crm/resources/limeType/operations/getProperties.operation.js.map +0 -0
- /package/{dist/nodes → nodes}/lime-crm/resources/limeType/operations/getRelations.operation.d.ts +0 -0
- /package/{dist/nodes → nodes}/lime-crm/resources/limeType/operations/getRelations.operation.js +0 -0
- /package/{dist/nodes → nodes}/lime-crm/resources/limeType/operations/getRelations.operation.js.map +0 -0
- /package/{dist/nodes → nodes}/lime-crm/resources/limeType/operations/getType.operation.d.ts +0 -0
- /package/{dist/nodes → nodes}/lime-crm/resources/limeType/operations/getType.operation.js +0 -0
- /package/{dist/nodes → nodes}/lime-crm/resources/limeType/operations/getType.operation.js.map +0 -0
- /package/{dist/nodes → nodes}/lime-crm/resources/limeType/operations/listTypes.operation.d.ts +0 -0
- /package/{dist/nodes → nodes}/lime-crm/resources/limeType/operations/listTypes.operation.js +0 -0
- /package/{dist/nodes → nodes}/lime-crm/resources/limeType/operations/listTypes.operation.js.map +0 -0
- /package/{dist/nodes → nodes}/lime-crm/resources/queryApi/index.d.ts +0 -0
- /package/{dist/nodes → nodes}/lime-crm/resources/queryApi/index.js +0 -0
- /package/{dist/nodes → nodes}/lime-crm/resources/queryApi/index.js.map +0 -0
- /package/{dist/nodes → nodes}/lime-crm/resources/queryApi/operations/executeQuery.operation.d.ts +0 -0
- /package/{dist/nodes → nodes}/lime-crm/resources/queryApi/operations/executeQuery.operation.js +0 -0
- /package/{dist/nodes → nodes}/lime-crm/resources/queryApi/operations/executeQuery.operation.js.map +0 -0
- /package/{dist/nodes → nodes}/lime-crm/transport/index.d.ts +0 -0
- /package/{dist/nodes → nodes}/lime-crm/transport/index.js +0 -0
- /package/{dist/nodes → nodes}/lime-crm/transport/index.js.map +0 -0
- /package/{dist/nodes → nodes}/lime-go/LimeGo.node.d.ts +0 -0
- /package/{dist/nodes → nodes}/lime-go/LimeGo.node.js +0 -0
- /package/{dist/nodes → nodes}/lime-go/LimeGo.node.js.map +0 -0
- /package/{dist/nodes → nodes}/lime-go/actions/organization/get.operation.d.ts +0 -0
- /package/{dist/nodes → nodes}/lime-go/actions/organization/get.operation.js +0 -0
- /package/{dist/nodes → nodes}/lime-go/actions/organization/get.operation.js.map +0 -0
- /package/{dist/nodes → nodes}/lime-go/actions/organization/getByExternalKey.operation.d.ts +0 -0
- /package/{dist/nodes → nodes}/lime-go/actions/organization/getByExternalKey.operation.js +0 -0
- /package/{dist/nodes → nodes}/lime-go/actions/organization/getByExternalKey.operation.js.map +0 -0
- /package/{dist/nodes → nodes}/lime-go/actions/organization/index.d.ts +0 -0
- /package/{dist/nodes → nodes}/lime-go/actions/organization/index.js +0 -0
- /package/{dist/nodes → nodes}/lime-go/actions/organization/index.js.map +0 -0
- /package/{dist/nodes → nodes}/lime-go/actions/organization/organizationFields.d.ts +0 -0
- /package/{dist/nodes → nodes}/lime-go/actions/organization/organizationFields.js +0 -0
- /package/{dist/nodes → nodes}/lime-go/actions/organization/organizationFields.js.map +0 -0
- /package/{dist/nodes → nodes}/lime-go/actions/organization/search.operation.d.ts +0 -0
- /package/{dist/nodes → nodes}/lime-go/actions/organization/search.operation.js +0 -0
- /package/{dist/nodes → nodes}/lime-go/actions/organization/search.operation.js.map +0 -0
- /package/{dist/nodes → nodes}/lime-go/actions/organization/update.operation.d.ts +0 -0
- /package/{dist/nodes → nodes}/lime-go/actions/organization/update.operation.js +0 -0
- /package/{dist/nodes → nodes}/lime-go/actions/organization/update.operation.js.map +0 -0
- /package/{dist/nodes → nodes}/lime-go/actions/person/createMail.operation.d.ts +0 -0
- /package/{dist/nodes → nodes}/lime-go/actions/person/createMail.operation.js +0 -0
- /package/{dist/nodes → nodes}/lime-go/actions/person/createMail.operation.js.map +0 -0
- /package/{dist/nodes → nodes}/lime-go/actions/person/get.operation.d.ts +0 -0
- /package/{dist/nodes → nodes}/lime-go/actions/person/get.operation.js +0 -0
- /package/{dist/nodes → nodes}/lime-go/actions/person/get.operation.js.map +0 -0
- /package/{dist/nodes → nodes}/lime-go/actions/person/index.d.ts +0 -0
- /package/{dist/nodes → nodes}/lime-go/actions/person/index.js +0 -0
- /package/{dist/nodes → nodes}/lime-go/actions/person/index.js.map +0 -0
- /package/{dist/nodes → nodes}/lime-go/actions/person/personFields.d.ts +0 -0
- /package/{dist/nodes → nodes}/lime-go/actions/person/personFields.js +0 -0
- /package/{dist/nodes → nodes}/lime-go/actions/person/personFields.js.map +0 -0
- /package/{dist/nodes → nodes}/lime-go/actions/person/search.operation.d.ts +0 -0
- /package/{dist/nodes → nodes}/lime-go/actions/person/search.operation.js +0 -0
- /package/{dist/nodes → nodes}/lime-go/actions/person/search.operation.js.map +0 -0
- /package/{dist/nodes → nodes}/lime-go/actions/person/update.operation.d.ts +0 -0
- /package/{dist/nodes → nodes}/lime-go/actions/person/update.operation.js +0 -0
- /package/{dist/nodes → nodes}/lime-go/actions/person/update.operation.js.map +0 -0
- /package/{dist/nodes → nodes}/lime-go/transport/graphqlRequest.d.ts +0 -0
- /package/{dist/nodes → nodes}/lime-go/transport/graphqlRequest.js +0 -0
- /package/{dist/nodes → nodes}/lime-go/transport/graphqlRequest.js.map +0 -0
- /package/{dist/nodes → nodes}/lime-go/transport/transport.d.ts +0 -0
- /package/{dist/nodes → nodes}/lime-go/transport/transport.js +0 -0
- /package/{dist/nodes → nodes}/lime-go/transport/transport.js.map +0 -0
- /package/{dist/nodes → nodes}/lime-go/triggers/webhook.d.ts +0 -0
- /package/{dist/nodes → nodes}/lime-go/triggers/webhook.js +0 -0
- /package/{dist/nodes → nodes}/lime-go/triggers/webhook.js.map +0 -0
|
@@ -1,242 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
IExecuteFunctions,
|
|
3
|
-
INodeProperties,
|
|
4
|
-
IDataObject,
|
|
5
|
-
NodeOperationError,
|
|
6
|
-
} from 'n8n-workflow';
|
|
7
|
-
|
|
8
|
-
export const description = {
|
|
9
|
-
name: 'Search',
|
|
10
|
-
value: 'search',
|
|
11
|
-
description: 'Search for objects',
|
|
12
|
-
action: 'Search for objects',
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
export const properties: INodeProperties[] = [
|
|
16
|
-
// Limetype selection
|
|
17
|
-
{
|
|
18
|
-
displayName: 'Lime Type',
|
|
19
|
-
name: 'limeType',
|
|
20
|
-
type: 'options',
|
|
21
|
-
typeOptions: {
|
|
22
|
-
loadOptionsMethod: 'getLimeTypes',
|
|
23
|
-
},
|
|
24
|
-
required: true,
|
|
25
|
-
default: '',
|
|
26
|
-
description: 'The type of entity to search for',
|
|
27
|
-
displayOptions: {
|
|
28
|
-
show: {
|
|
29
|
-
resource: [
|
|
30
|
-
'limeObject',
|
|
31
|
-
],
|
|
32
|
-
operation: [
|
|
33
|
-
'search',
|
|
34
|
-
],
|
|
35
|
-
},
|
|
36
|
-
},
|
|
37
|
-
},
|
|
38
|
-
|
|
39
|
-
// Search parameters
|
|
40
|
-
{
|
|
41
|
-
displayName: 'Search Term',
|
|
42
|
-
name: 'searchTerm',
|
|
43
|
-
type: 'string',
|
|
44
|
-
default: '',
|
|
45
|
-
description: 'Term to search for',
|
|
46
|
-
displayOptions: {
|
|
47
|
-
show: {
|
|
48
|
-
resource: [
|
|
49
|
-
'limeObject',
|
|
50
|
-
],
|
|
51
|
-
operation: [
|
|
52
|
-
'search',
|
|
53
|
-
],
|
|
54
|
-
},
|
|
55
|
-
},
|
|
56
|
-
},
|
|
57
|
-
|
|
58
|
-
// Search fields
|
|
59
|
-
{
|
|
60
|
-
displayName: 'Search Fields',
|
|
61
|
-
name: 'searchFields',
|
|
62
|
-
type: 'multiOptions',
|
|
63
|
-
typeOptions: {
|
|
64
|
-
loadOptionsMethod: 'getLimeTypeProperties',
|
|
65
|
-
loadOptionsDependsOn: ['limeType'],
|
|
66
|
-
},
|
|
67
|
-
default: [],
|
|
68
|
-
description: 'Fields to search in. If none selected, searches across all searchable fields',
|
|
69
|
-
displayOptions: {
|
|
70
|
-
show: {
|
|
71
|
-
resource: [
|
|
72
|
-
'limeObject',
|
|
73
|
-
],
|
|
74
|
-
operation: [
|
|
75
|
-
'search',
|
|
76
|
-
],
|
|
77
|
-
},
|
|
78
|
-
},
|
|
79
|
-
},
|
|
80
|
-
|
|
81
|
-
// Return options
|
|
82
|
-
{
|
|
83
|
-
displayName: 'Return All',
|
|
84
|
-
name: 'returnAll',
|
|
85
|
-
type: 'boolean',
|
|
86
|
-
default: false,
|
|
87
|
-
description: 'Whether to return all results or only up to a limit',
|
|
88
|
-
displayOptions: {
|
|
89
|
-
show: {
|
|
90
|
-
resource: [
|
|
91
|
-
'limeObject',
|
|
92
|
-
],
|
|
93
|
-
operation: [
|
|
94
|
-
'search',
|
|
95
|
-
],
|
|
96
|
-
},
|
|
97
|
-
},
|
|
98
|
-
},
|
|
99
|
-
|
|
100
|
-
{
|
|
101
|
-
displayName: 'Limit',
|
|
102
|
-
name: 'limit',
|
|
103
|
-
type: 'number',
|
|
104
|
-
default: 50,
|
|
105
|
-
description: 'Max number of results to return',
|
|
106
|
-
typeOptions: {
|
|
107
|
-
minValue: 1,
|
|
108
|
-
},
|
|
109
|
-
displayOptions: {
|
|
110
|
-
show: {
|
|
111
|
-
resource: [
|
|
112
|
-
'limeObject',
|
|
113
|
-
],
|
|
114
|
-
operation: [
|
|
115
|
-
'search',
|
|
116
|
-
],
|
|
117
|
-
returnAll: [
|
|
118
|
-
false,
|
|
119
|
-
],
|
|
120
|
-
},
|
|
121
|
-
},
|
|
122
|
-
},
|
|
123
|
-
|
|
124
|
-
// Advanced options
|
|
125
|
-
{
|
|
126
|
-
displayName: 'Options',
|
|
127
|
-
name: 'options',
|
|
128
|
-
type: 'collection',
|
|
129
|
-
placeholder: 'Add Option',
|
|
130
|
-
default: {},
|
|
131
|
-
displayOptions: {
|
|
132
|
-
show: {
|
|
133
|
-
resource: [
|
|
134
|
-
'limeObject',
|
|
135
|
-
],
|
|
136
|
-
operation: [
|
|
137
|
-
'search',
|
|
138
|
-
],
|
|
139
|
-
},
|
|
140
|
-
},
|
|
141
|
-
options: [
|
|
142
|
-
{
|
|
143
|
-
displayName: 'Include Related Objects',
|
|
144
|
-
name: 'includeRelated',
|
|
145
|
-
type: 'boolean',
|
|
146
|
-
default: false,
|
|
147
|
-
description: 'Whether to include related objects in the response',
|
|
148
|
-
},
|
|
149
|
-
{
|
|
150
|
-
displayName: 'Sort Field',
|
|
151
|
-
name: 'sortField',
|
|
152
|
-
type: 'options',
|
|
153
|
-
typeOptions: {
|
|
154
|
-
loadOptionsMethod: 'getLimeTypeProperties',
|
|
155
|
-
loadOptionsDependsOn: ['limeType'],
|
|
156
|
-
},
|
|
157
|
-
default: '',
|
|
158
|
-
description: 'Field to sort results by',
|
|
159
|
-
},
|
|
160
|
-
{
|
|
161
|
-
displayName: 'Sort Direction',
|
|
162
|
-
name: 'sortDirection',
|
|
163
|
-
type: 'options',
|
|
164
|
-
options: [
|
|
165
|
-
{
|
|
166
|
-
name: 'Ascending',
|
|
167
|
-
value: 'asc',
|
|
168
|
-
},
|
|
169
|
-
{
|
|
170
|
-
name: 'Descending',
|
|
171
|
-
value: 'desc',
|
|
172
|
-
},
|
|
173
|
-
],
|
|
174
|
-
default: 'asc',
|
|
175
|
-
description: 'Direction to sort results',
|
|
176
|
-
},
|
|
177
|
-
],
|
|
178
|
-
},
|
|
179
|
-
];
|
|
180
|
-
|
|
181
|
-
export async function execute(
|
|
182
|
-
this: IExecuteFunctions,
|
|
183
|
-
i: number,
|
|
184
|
-
) {
|
|
185
|
-
const { apiRequest } = await import('../../../transport');
|
|
186
|
-
const limeType = this.getNodeParameter('limeType', i) as string;
|
|
187
|
-
const searchTerm = this.getNodeParameter('searchTerm', i, '') as string;
|
|
188
|
-
const searchFields = this.getNodeParameter('searchFields', i, []) as string[];
|
|
189
|
-
const returnAll = this.getNodeParameter('returnAll', i) as boolean;
|
|
190
|
-
const limit = returnAll ? 0 : this.getNodeParameter('limit', i, 50) as number;
|
|
191
|
-
const options = this.getNodeParameter('options', i, {}) as IDataObject;
|
|
192
|
-
|
|
193
|
-
if (!limeType) {
|
|
194
|
-
throw new NodeOperationError(this.getNode(), 'Lime type must be provided');
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
// Build search endpoint and parameters
|
|
198
|
-
const endpoint = `/api/v1/limeobject/${encodeURIComponent(limeType)}/search/`;
|
|
199
|
-
const queryParams: IDataObject = {};
|
|
200
|
-
|
|
201
|
-
// Add search parameters
|
|
202
|
-
if (searchTerm) {
|
|
203
|
-
queryParams.q = searchTerm;
|
|
204
|
-
}
|
|
205
|
-
|
|
206
|
-
// Add fields to search in if specified
|
|
207
|
-
if (searchFields && searchFields.length > 0) {
|
|
208
|
-
queryParams.fields = searchFields.join(',');
|
|
209
|
-
}
|
|
210
|
-
|
|
211
|
-
// Add limit parameter
|
|
212
|
-
if (!returnAll && limit > 0) {
|
|
213
|
-
queryParams._limit = limit;
|
|
214
|
-
}
|
|
215
|
-
|
|
216
|
-
// Add sorting if specified in options
|
|
217
|
-
if (options.sortField) {
|
|
218
|
-
const sortDirection = options.sortDirection || 'asc';
|
|
219
|
-
queryParams._sort = `${options.sortField}:${sortDirection}`;
|
|
220
|
-
}
|
|
221
|
-
|
|
222
|
-
// Include related objects if requested
|
|
223
|
-
if (options.includeRelated === true) {
|
|
224
|
-
queryParams._embed = 'all';
|
|
225
|
-
}
|
|
226
|
-
|
|
227
|
-
try {
|
|
228
|
-
const response = await apiRequest.call(this, {
|
|
229
|
-
method: 'GET',
|
|
230
|
-
endpoint,
|
|
231
|
-
qs: queryParams,
|
|
232
|
-
});
|
|
233
|
-
|
|
234
|
-
// Return search results
|
|
235
|
-
return response._embedded?.limeobjects || [];
|
|
236
|
-
} catch (error) {
|
|
237
|
-
throw new NodeOperationError(
|
|
238
|
-
this.getNode(),
|
|
239
|
-
`Failed to search for ${limeType} objects: ${error.message}`
|
|
240
|
-
);
|
|
241
|
-
}
|
|
242
|
-
}
|
|
@@ -1,201 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
IExecuteFunctions,
|
|
3
|
-
INodeProperties,
|
|
4
|
-
IDataObject,
|
|
5
|
-
NodeOperationError,
|
|
6
|
-
} from 'n8n-workflow';
|
|
7
|
-
import { apiRequest } from '../../../transport';
|
|
8
|
-
|
|
9
|
-
// Input fields for update operation
|
|
10
|
-
export const description = {
|
|
11
|
-
name: 'Update',
|
|
12
|
-
value: 'update',
|
|
13
|
-
description: 'Update an existing record',
|
|
14
|
-
action: 'Update a record',
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
export const properties: INodeProperties[] = [
|
|
18
|
-
{
|
|
19
|
-
displayName: 'LimeType',
|
|
20
|
-
name: 'limeType',
|
|
21
|
-
type: 'options',
|
|
22
|
-
typeOptions: {
|
|
23
|
-
loadOptionsMethod: 'getLimeTypes',
|
|
24
|
-
},
|
|
25
|
-
required: true,
|
|
26
|
-
default: '',
|
|
27
|
-
description: 'The type of entity to update',
|
|
28
|
-
displayOptions: {
|
|
29
|
-
show: {
|
|
30
|
-
resource: [
|
|
31
|
-
'limeObject',
|
|
32
|
-
],
|
|
33
|
-
operation: [
|
|
34
|
-
'update',
|
|
35
|
-
],
|
|
36
|
-
},
|
|
37
|
-
},
|
|
38
|
-
},
|
|
39
|
-
{
|
|
40
|
-
displayName: 'Record ID',
|
|
41
|
-
name: 'id',
|
|
42
|
-
type: 'string',
|
|
43
|
-
required: true,
|
|
44
|
-
default: '',
|
|
45
|
-
description: 'ID of the record to update',
|
|
46
|
-
displayOptions: {
|
|
47
|
-
show: {
|
|
48
|
-
resource: [
|
|
49
|
-
'limeObject',
|
|
50
|
-
],
|
|
51
|
-
operation: [
|
|
52
|
-
'update',
|
|
53
|
-
],
|
|
54
|
-
},
|
|
55
|
-
},
|
|
56
|
-
},
|
|
57
|
-
{
|
|
58
|
-
displayName: 'Input Type',
|
|
59
|
-
name: 'inputType',
|
|
60
|
-
type: 'options',
|
|
61
|
-
options: [
|
|
62
|
-
{
|
|
63
|
-
name: 'Simple Fields',
|
|
64
|
-
value: 'simple',
|
|
65
|
-
description: 'Define fields using the UI',
|
|
66
|
-
},
|
|
67
|
-
{
|
|
68
|
-
name: 'JSON Object',
|
|
69
|
-
value: 'json',
|
|
70
|
-
description: 'Define fields using JSON',
|
|
71
|
-
},
|
|
72
|
-
],
|
|
73
|
-
default: 'simple',
|
|
74
|
-
description: 'How to input the data',
|
|
75
|
-
displayOptions: {
|
|
76
|
-
show: {
|
|
77
|
-
resource: [
|
|
78
|
-
'limeObject',
|
|
79
|
-
],
|
|
80
|
-
operation: [
|
|
81
|
-
'update',
|
|
82
|
-
],
|
|
83
|
-
},
|
|
84
|
-
},
|
|
85
|
-
},
|
|
86
|
-
{
|
|
87
|
-
displayName: 'Data',
|
|
88
|
-
name: 'jsonData',
|
|
89
|
-
type: 'json',
|
|
90
|
-
default: '{\n "name": "Updated Company Name",\n "phone": "+987654321"\n}',
|
|
91
|
-
description: 'Key-value pairs for fields to update. Property names must match the Lime CRM field names.',
|
|
92
|
-
typeOptions: {
|
|
93
|
-
alwaysOpenEditWindow: true,
|
|
94
|
-
},
|
|
95
|
-
displayOptions: {
|
|
96
|
-
show: {
|
|
97
|
-
resource: [
|
|
98
|
-
'limeObject',
|
|
99
|
-
],
|
|
100
|
-
operation: [
|
|
101
|
-
'update',
|
|
102
|
-
],
|
|
103
|
-
inputType: [
|
|
104
|
-
'json',
|
|
105
|
-
],
|
|
106
|
-
},
|
|
107
|
-
},
|
|
108
|
-
},
|
|
109
|
-
{
|
|
110
|
-
displayName: 'Fields',
|
|
111
|
-
name: 'simpleFields',
|
|
112
|
-
placeholder: 'Add Field',
|
|
113
|
-
type: 'fixedCollection',
|
|
114
|
-
typeOptions: {
|
|
115
|
-
multipleValues: true,
|
|
116
|
-
sortable: true,
|
|
117
|
-
},
|
|
118
|
-
default: {},
|
|
119
|
-
displayOptions: {
|
|
120
|
-
show: {
|
|
121
|
-
resource: [
|
|
122
|
-
'limeObject',
|
|
123
|
-
],
|
|
124
|
-
operation: [
|
|
125
|
-
'update',
|
|
126
|
-
],
|
|
127
|
-
inputType: [
|
|
128
|
-
'simple',
|
|
129
|
-
],
|
|
130
|
-
},
|
|
131
|
-
},
|
|
132
|
-
options: [
|
|
133
|
-
{
|
|
134
|
-
name: 'field',
|
|
135
|
-
displayName: 'Field',
|
|
136
|
-
values: [
|
|
137
|
-
{
|
|
138
|
-
displayName: 'Field Name',
|
|
139
|
-
name: 'fieldName',
|
|
140
|
-
type: 'options',
|
|
141
|
-
typeOptions: {
|
|
142
|
-
loadOptionsMethod: 'getLimeTypeProperties',
|
|
143
|
-
loadOptionsDependsOn: ['limeType'],
|
|
144
|
-
},
|
|
145
|
-
default: '',
|
|
146
|
-
description: 'The name of the field',
|
|
147
|
-
},
|
|
148
|
-
{
|
|
149
|
-
displayName: 'Field Value',
|
|
150
|
-
name: 'fieldValue',
|
|
151
|
-
type: 'string',
|
|
152
|
-
default: '',
|
|
153
|
-
description: 'The value of the field',
|
|
154
|
-
},
|
|
155
|
-
],
|
|
156
|
-
},
|
|
157
|
-
],
|
|
158
|
-
},
|
|
159
|
-
];
|
|
160
|
-
|
|
161
|
-
// Execute function for update operation
|
|
162
|
-
export async function execute(this: IExecuteFunctions, i: number) {
|
|
163
|
-
const limeType = this.getNodeParameter('limeType', i) as string;
|
|
164
|
-
const id = this.getNodeParameter('id', i) as string;
|
|
165
|
-
const inputType = this.getNodeParameter('inputType', i) as string;
|
|
166
|
-
const options = this.getNodeParameter('options', i, {}) as IDataObject;
|
|
167
|
-
const rawResponse = options.rawResponse as boolean || false;
|
|
168
|
-
|
|
169
|
-
// Build the request body based on the input type
|
|
170
|
-
let body: IDataObject = {};
|
|
171
|
-
|
|
172
|
-
if (inputType === 'json') {
|
|
173
|
-
// JSON input mode
|
|
174
|
-
const jsonData = this.getNodeParameter('jsonData', i) as string;
|
|
175
|
-
try {
|
|
176
|
-
body = typeof jsonData === 'string' ? JSON.parse(jsonData) : jsonData as IDataObject;
|
|
177
|
-
} catch (error) {
|
|
178
|
-
throw new NodeOperationError(this.getNode(), 'Invalid JSON: ' + error.message);
|
|
179
|
-
}
|
|
180
|
-
} else {
|
|
181
|
-
// Simple input mode
|
|
182
|
-
const simpleFields = this.getNodeParameter('simpleFields.field', i, []) as IDataObject[];
|
|
183
|
-
simpleFields.forEach(field => {
|
|
184
|
-
body[field.fieldName as string] = field.fieldValue;
|
|
185
|
-
});
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
const endpoint = `/api/v1/limeobject/${limeType}/${id}/`;
|
|
189
|
-
|
|
190
|
-
// Make the API request to update the record
|
|
191
|
-
const response = await apiRequest.call(
|
|
192
|
-
this,
|
|
193
|
-
{
|
|
194
|
-
method: 'PATCH',
|
|
195
|
-
url: endpoint,
|
|
196
|
-
body
|
|
197
|
-
}
|
|
198
|
-
);
|
|
199
|
-
|
|
200
|
-
return rawResponse ? response : response;
|
|
201
|
-
}
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
import { IExecuteFunctions, INodeProperties, NodePropertyTypes } from 'n8n-workflow';
|
|
2
|
-
|
|
3
|
-
import * as getType from './operations/getType.operation';
|
|
4
|
-
import * as listTypes from './operations/listTypes.operation';
|
|
5
|
-
import * as getProperties from './operations/getProperties.operation';
|
|
6
|
-
import * as getRelations from './operations/getRelations.operation';
|
|
7
|
-
|
|
8
|
-
// Export fields for the node
|
|
9
|
-
export const limeTypeFields: INodeProperties[] = [
|
|
10
|
-
// Operation selection for LimeType
|
|
11
|
-
{
|
|
12
|
-
displayName: 'Operation',
|
|
13
|
-
name: 'operation',
|
|
14
|
-
type: 'options' as NodePropertyTypes,
|
|
15
|
-
noDataExpression: true,
|
|
16
|
-
displayOptions: {
|
|
17
|
-
show: {
|
|
18
|
-
resource: [
|
|
19
|
-
'limeType',
|
|
20
|
-
],
|
|
21
|
-
},
|
|
22
|
-
},
|
|
23
|
-
options: [
|
|
24
|
-
{
|
|
25
|
-
...listTypes.description,
|
|
26
|
-
},
|
|
27
|
-
{
|
|
28
|
-
...getType.description,
|
|
29
|
-
},
|
|
30
|
-
{
|
|
31
|
-
...getProperties.description,
|
|
32
|
-
},
|
|
33
|
-
{
|
|
34
|
-
...getRelations.description,
|
|
35
|
-
},
|
|
36
|
-
],
|
|
37
|
-
default: 'listTypes',
|
|
38
|
-
},
|
|
39
|
-
|
|
40
|
-
// Operation-specific fields
|
|
41
|
-
...listTypes.properties,
|
|
42
|
-
...getType.properties,
|
|
43
|
-
...getProperties.properties,
|
|
44
|
-
...getRelations.properties,
|
|
45
|
-
];
|
|
46
|
-
|
|
47
|
-
// Operations router
|
|
48
|
-
export async function limeTypeOperations(
|
|
49
|
-
this: IExecuteFunctions,
|
|
50
|
-
{ operation, i }: { operation: string; i: number },
|
|
51
|
-
) {
|
|
52
|
-
if (operation === 'listTypes') {
|
|
53
|
-
return await listTypes.execute.call(this, i);
|
|
54
|
-
}
|
|
55
|
-
if (operation === 'getType') {
|
|
56
|
-
return await getType.execute.call(this, i);
|
|
57
|
-
}
|
|
58
|
-
if (operation === 'getProperties') {
|
|
59
|
-
return await getProperties.execute.call(this, i);
|
|
60
|
-
}
|
|
61
|
-
if (operation === 'getRelations') {
|
|
62
|
-
return await getRelations.execute.call(this, i);
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
return null;
|
|
66
|
-
}
|
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
IExecuteFunctions,
|
|
3
|
-
INodeProperties,
|
|
4
|
-
IDataObject,
|
|
5
|
-
NodeOperationError,
|
|
6
|
-
} from 'n8n-workflow';
|
|
7
|
-
|
|
8
|
-
export const description = {
|
|
9
|
-
name: 'Get Properties',
|
|
10
|
-
value: 'getProperties',
|
|
11
|
-
description: 'Get all properties for a specific entity type',
|
|
12
|
-
action: 'Get entity type properties',
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
export const properties: INodeProperties[] = [
|
|
16
|
-
// Limetype selection
|
|
17
|
-
{
|
|
18
|
-
displayName: 'Type Name',
|
|
19
|
-
name: 'typeName',
|
|
20
|
-
type: 'options',
|
|
21
|
-
typeOptions: {
|
|
22
|
-
loadOptionsMethod: 'getLimeTypes',
|
|
23
|
-
},
|
|
24
|
-
required: true,
|
|
25
|
-
default: '',
|
|
26
|
-
description: 'The name of the entity type to get properties for',
|
|
27
|
-
displayOptions: {
|
|
28
|
-
show: {
|
|
29
|
-
resource: [
|
|
30
|
-
'limeType',
|
|
31
|
-
],
|
|
32
|
-
operation: [
|
|
33
|
-
'getProperties',
|
|
34
|
-
],
|
|
35
|
-
},
|
|
36
|
-
},
|
|
37
|
-
},
|
|
38
|
-
|
|
39
|
-
// Options for the operation
|
|
40
|
-
{
|
|
41
|
-
displayName: 'Options',
|
|
42
|
-
name: 'options',
|
|
43
|
-
type: 'collection',
|
|
44
|
-
placeholder: 'Add Option',
|
|
45
|
-
default: {},
|
|
46
|
-
displayOptions: {
|
|
47
|
-
show: {
|
|
48
|
-
resource: [
|
|
49
|
-
'limeType',
|
|
50
|
-
],
|
|
51
|
-
operation: [
|
|
52
|
-
'getProperties',
|
|
53
|
-
],
|
|
54
|
-
},
|
|
55
|
-
},
|
|
56
|
-
options: [
|
|
57
|
-
{
|
|
58
|
-
displayName: 'Include System Properties',
|
|
59
|
-
name: 'includeSystemProperties',
|
|
60
|
-
type: 'boolean',
|
|
61
|
-
default: false,
|
|
62
|
-
description: 'Whether to include system properties in the response',
|
|
63
|
-
},
|
|
64
|
-
{
|
|
65
|
-
displayName: 'Include Hidden Properties',
|
|
66
|
-
name: 'includeHiddenProperties',
|
|
67
|
-
type: 'boolean',
|
|
68
|
-
default: false,
|
|
69
|
-
description: 'Whether to include hidden properties in the response',
|
|
70
|
-
},
|
|
71
|
-
],
|
|
72
|
-
},
|
|
73
|
-
];
|
|
74
|
-
|
|
75
|
-
export async function execute(
|
|
76
|
-
this: IExecuteFunctions,
|
|
77
|
-
i: number,
|
|
78
|
-
) {
|
|
79
|
-
const { apiRequest } = await import('../../../transport');
|
|
80
|
-
const typeName = this.getNodeParameter('typeName', i) as string;
|
|
81
|
-
const options = this.getNodeParameter('options', i, {}) as IDataObject;
|
|
82
|
-
|
|
83
|
-
if (!typeName) {
|
|
84
|
-
throw new NodeOperationError(this.getNode(), 'Type name must be provided');
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
// Prepare query parameters
|
|
88
|
-
const qs: IDataObject = {};
|
|
89
|
-
if (options.includeSystemProperties) {
|
|
90
|
-
qs.includeSystem = true;
|
|
91
|
-
}
|
|
92
|
-
if (options.includeHiddenProperties) {
|
|
93
|
-
qs.includeHidden = true;
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
// Make API request
|
|
97
|
-
const response = await apiRequest.call(this, {
|
|
98
|
-
method: 'GET',
|
|
99
|
-
endpoint: `/api/v1/limetype/${encodeURIComponent(typeName)}/property`,
|
|
100
|
-
qs,
|
|
101
|
-
});
|
|
102
|
-
|
|
103
|
-
// Return the response data
|
|
104
|
-
return response;
|
|
105
|
-
}
|