n8n-nodes-base 1.44.2 → 1.45.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/dist/build.tsbuildinfo +1 -1
- package/dist/credentials/Aws.credentials.d.ts +15 -1
- package/dist/credentials/Aws.credentials.js +23 -12
- package/dist/credentials/Aws.credentials.js.map +1 -1
- package/dist/credentials/HighLevelOAuth2Api.credentials.js +1 -1
- package/dist/credentials/HighLevelOAuth2Api.credentials.js.map +1 -1
- package/dist/credentials/OAuth2Api.credentials.js.map +1 -1
- package/dist/known/credentials.json +4 -0
- package/dist/methods/defined.json +2 -0
- package/dist/methods/referenced.json +4 -2
- package/dist/nodes/Files/ConvertToFile/test/toText.workflow.json +2 -2
- package/dist/nodes/GraphQL/test/workflow.json +2 -2
- package/dist/nodes/HighLevel/HighLevel.node.d.ts +3 -11
- package/dist/nodes/HighLevel/HighLevel.node.js +10 -69
- package/dist/nodes/HighLevel/HighLevel.node.js.map +1 -1
- package/dist/nodes/HighLevel/v1/GenericFunctions.js.map +1 -0
- package/dist/nodes/HighLevel/v1/HighLevelV1.node.d.ts +13 -0
- package/dist/nodes/HighLevel/v1/HighLevelV1.node.js +88 -0
- package/dist/nodes/HighLevel/v1/HighLevelV1.node.js.map +1 -0
- package/dist/nodes/HighLevel/v1/description/ContactDescription.js.map +1 -0
- package/dist/nodes/HighLevel/v1/description/OpportunityDescription.js.map +1 -0
- package/dist/nodes/HighLevel/v1/description/TaskDescription.js.map +1 -0
- package/dist/nodes/HighLevel/v2/GenericFunctions.d.ts +18 -0
- package/dist/nodes/HighLevel/v2/GenericFunctions.js +264 -0
- package/dist/nodes/HighLevel/v2/GenericFunctions.js.map +1 -0
- package/dist/nodes/HighLevel/v2/HighLevelV2.node.d.ts +15 -0
- package/dist/nodes/HighLevel/v2/HighLevelV2.node.js +91 -0
- package/dist/nodes/HighLevel/v2/HighLevelV2.node.js.map +1 -0
- package/dist/nodes/HighLevel/v2/description/ContactDescription.d.ts +4 -0
- package/dist/nodes/HighLevel/v2/description/ContactDescription.js +819 -0
- package/dist/nodes/HighLevel/v2/description/ContactDescription.js.map +1 -0
- package/dist/nodes/HighLevel/v2/description/OpportunityDescription.d.ts +3 -0
- package/dist/nodes/HighLevel/v2/description/OpportunityDescription.js +643 -0
- package/dist/nodes/HighLevel/v2/description/OpportunityDescription.js.map +1 -0
- package/dist/nodes/HighLevel/v2/description/TaskDescription.d.ts +3 -0
- package/dist/nodes/HighLevel/v2/description/TaskDescription.js +468 -0
- package/dist/nodes/HighLevel/v2/description/TaskDescription.js.map +1 -0
- package/dist/nodes/HttpRequest/GenericFunctions.d.ts +4 -2
- package/dist/nodes/HttpRequest/GenericFunctions.js +40 -4
- package/dist/nodes/HttpRequest/GenericFunctions.js.map +1 -1
- package/dist/nodes/HttpRequest/V3/HttpRequestV3.node.js +23 -9
- package/dist/nodes/HttpRequest/V3/HttpRequestV3.node.js.map +1 -1
- package/dist/nodes/Jira/IssueCommentDescription.js +17 -0
- package/dist/nodes/Jira/IssueCommentDescription.js.map +1 -1
- package/dist/nodes/Jira/Jira.node.js +1 -1
- package/dist/nodes/Jira/Jira.node.js.map +1 -1
- package/dist/nodes/Jwt/test/jwt.workflow.json +2 -2
- package/dist/nodes/ManualTrigger/ManualTrigger.node.js +2 -2
- package/dist/nodes/ManualTrigger/ManualTrigger.node.js.map +1 -1
- package/dist/nodes/Merge/test/node/workflow.keep_non_matches.json +2 -2
- package/dist/nodes/Switch/V3/test/switch.regex.workflow.json +2 -2
- package/dist/types/credentials.json +1 -1
- package/dist/types/nodes.json +5 -4
- package/package.json +5 -5
- package/dist/nodes/HighLevel/GenericFunctions.js.map +0 -1
- package/dist/nodes/HighLevel/description/ContactDescription.js.map +0 -1
- package/dist/nodes/HighLevel/description/OpportunityDescription.js.map +0 -1
- package/dist/nodes/HighLevel/description/TaskDescription.js.map +0 -1
- /package/dist/nodes/HighLevel/{GenericFunctions.d.ts → v1/GenericFunctions.d.ts} +0 -0
- /package/dist/nodes/HighLevel/{GenericFunctions.js → v1/GenericFunctions.js} +0 -0
- /package/dist/nodes/HighLevel/{description → v1/description}/ContactDescription.d.ts +0 -0
- /package/dist/nodes/HighLevel/{description → v1/description}/ContactDescription.js +0 -0
- /package/dist/nodes/HighLevel/{description → v1/description}/OpportunityDescription.d.ts +0 -0
- /package/dist/nodes/HighLevel/{description → v1/description}/OpportunityDescription.js +0 -0
- /package/dist/nodes/HighLevel/{description → v1/description}/TaskDescription.d.ts +0 -0
- /package/dist/nodes/HighLevel/{description → v1/description}/TaskDescription.js +0 -0
|
@@ -0,0 +1,819 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.contactFields = exports.contactNotes = exports.contactOperations = void 0;
|
|
4
|
+
const GenericFunctions_1 = require("../GenericFunctions");
|
|
5
|
+
exports.contactOperations = [
|
|
6
|
+
{
|
|
7
|
+
displayName: 'Operation',
|
|
8
|
+
name: 'operation',
|
|
9
|
+
type: 'options',
|
|
10
|
+
noDataExpression: true,
|
|
11
|
+
displayOptions: {
|
|
12
|
+
show: {
|
|
13
|
+
resource: ['contact'],
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
options: [
|
|
17
|
+
{
|
|
18
|
+
name: 'Create or Update',
|
|
19
|
+
value: 'create',
|
|
20
|
+
routing: {
|
|
21
|
+
request: {
|
|
22
|
+
method: 'POST',
|
|
23
|
+
url: '/contacts/upsert/',
|
|
24
|
+
},
|
|
25
|
+
send: {
|
|
26
|
+
preSend: [
|
|
27
|
+
GenericFunctions_1.validEmailAndPhonePreSendAction,
|
|
28
|
+
GenericFunctions_1.splitTagsPreSendAction,
|
|
29
|
+
GenericFunctions_1.addLocationIdPreSendAction,
|
|
30
|
+
],
|
|
31
|
+
},
|
|
32
|
+
output: {
|
|
33
|
+
postReceive: [
|
|
34
|
+
{
|
|
35
|
+
type: 'rootProperty',
|
|
36
|
+
properties: {
|
|
37
|
+
property: 'contact',
|
|
38
|
+
},
|
|
39
|
+
},
|
|
40
|
+
],
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
action: 'Create or update a contact',
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
name: 'Delete',
|
|
47
|
+
value: 'delete',
|
|
48
|
+
routing: {
|
|
49
|
+
request: {
|
|
50
|
+
method: 'DELETE',
|
|
51
|
+
url: '=/contacts/{{$parameter.contactId}}/',
|
|
52
|
+
},
|
|
53
|
+
output: {
|
|
54
|
+
postReceive: [
|
|
55
|
+
{
|
|
56
|
+
type: 'set',
|
|
57
|
+
properties: {
|
|
58
|
+
value: '={{ { "success": true } }}',
|
|
59
|
+
},
|
|
60
|
+
},
|
|
61
|
+
],
|
|
62
|
+
},
|
|
63
|
+
},
|
|
64
|
+
action: 'Delete a contact',
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
name: 'Get',
|
|
68
|
+
value: 'get',
|
|
69
|
+
routing: {
|
|
70
|
+
request: {
|
|
71
|
+
method: 'GET',
|
|
72
|
+
url: '=/contacts/{{$parameter.contactId}}/',
|
|
73
|
+
},
|
|
74
|
+
output: {
|
|
75
|
+
postReceive: [
|
|
76
|
+
{
|
|
77
|
+
type: 'rootProperty',
|
|
78
|
+
properties: {
|
|
79
|
+
property: 'contact',
|
|
80
|
+
},
|
|
81
|
+
},
|
|
82
|
+
],
|
|
83
|
+
},
|
|
84
|
+
},
|
|
85
|
+
action: 'Get a contact',
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
name: 'Get Many',
|
|
89
|
+
value: 'getAll',
|
|
90
|
+
routing: {
|
|
91
|
+
request: {
|
|
92
|
+
method: 'GET',
|
|
93
|
+
url: '=/contacts/',
|
|
94
|
+
},
|
|
95
|
+
send: {
|
|
96
|
+
preSend: [GenericFunctions_1.addLocationIdPreSendAction],
|
|
97
|
+
paginate: true,
|
|
98
|
+
},
|
|
99
|
+
},
|
|
100
|
+
action: 'Get many contacts',
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
name: 'Update',
|
|
104
|
+
value: 'update',
|
|
105
|
+
routing: {
|
|
106
|
+
request: {
|
|
107
|
+
method: 'PUT',
|
|
108
|
+
url: '=/contacts/{{$parameter.contactId}}/',
|
|
109
|
+
},
|
|
110
|
+
send: {
|
|
111
|
+
preSend: [GenericFunctions_1.validEmailAndPhonePreSendAction, GenericFunctions_1.splitTagsPreSendAction],
|
|
112
|
+
},
|
|
113
|
+
output: {
|
|
114
|
+
postReceive: [
|
|
115
|
+
{
|
|
116
|
+
type: 'rootProperty',
|
|
117
|
+
properties: {
|
|
118
|
+
property: 'contact',
|
|
119
|
+
},
|
|
120
|
+
},
|
|
121
|
+
],
|
|
122
|
+
},
|
|
123
|
+
},
|
|
124
|
+
action: 'Update a contact',
|
|
125
|
+
},
|
|
126
|
+
],
|
|
127
|
+
default: 'create',
|
|
128
|
+
},
|
|
129
|
+
];
|
|
130
|
+
exports.contactNotes = [
|
|
131
|
+
{
|
|
132
|
+
displayName: 'Create a new contact or update an existing one if email or phone matches (upsert)',
|
|
133
|
+
name: 'contactCreateNotice',
|
|
134
|
+
type: 'notice',
|
|
135
|
+
displayOptions: {
|
|
136
|
+
show: {
|
|
137
|
+
resource: ['contact'],
|
|
138
|
+
operation: ['create'],
|
|
139
|
+
},
|
|
140
|
+
},
|
|
141
|
+
default: '',
|
|
142
|
+
},
|
|
143
|
+
];
|
|
144
|
+
const customFields = {
|
|
145
|
+
displayName: 'Custom Fields',
|
|
146
|
+
name: 'customFields',
|
|
147
|
+
placeholder: 'Add Field',
|
|
148
|
+
type: 'fixedCollection',
|
|
149
|
+
default: {},
|
|
150
|
+
typeOptions: {
|
|
151
|
+
multipleValues: true,
|
|
152
|
+
},
|
|
153
|
+
options: [
|
|
154
|
+
{
|
|
155
|
+
name: 'values',
|
|
156
|
+
displayName: 'Value',
|
|
157
|
+
values: [
|
|
158
|
+
{
|
|
159
|
+
displayName: 'Field Name or ID',
|
|
160
|
+
name: 'fieldId',
|
|
161
|
+
type: 'options',
|
|
162
|
+
required: true,
|
|
163
|
+
default: '',
|
|
164
|
+
description: 'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>',
|
|
165
|
+
typeOptions: {
|
|
166
|
+
loadOptions: {
|
|
167
|
+
routing: {
|
|
168
|
+
request: {
|
|
169
|
+
url: '/custom-fields',
|
|
170
|
+
method: 'GET',
|
|
171
|
+
},
|
|
172
|
+
output: {
|
|
173
|
+
postReceive: [
|
|
174
|
+
{
|
|
175
|
+
type: 'rootProperty',
|
|
176
|
+
properties: {
|
|
177
|
+
property: 'customFields',
|
|
178
|
+
},
|
|
179
|
+
},
|
|
180
|
+
{
|
|
181
|
+
type: 'setKeyValue',
|
|
182
|
+
properties: {
|
|
183
|
+
name: '={{$responseItem.name}}',
|
|
184
|
+
value: '={{$responseItem.id}}',
|
|
185
|
+
},
|
|
186
|
+
},
|
|
187
|
+
{
|
|
188
|
+
type: 'sort',
|
|
189
|
+
properties: {
|
|
190
|
+
key: 'name',
|
|
191
|
+
},
|
|
192
|
+
},
|
|
193
|
+
],
|
|
194
|
+
},
|
|
195
|
+
},
|
|
196
|
+
},
|
|
197
|
+
},
|
|
198
|
+
},
|
|
199
|
+
{
|
|
200
|
+
displayName: 'Field Value',
|
|
201
|
+
name: 'fieldValue',
|
|
202
|
+
type: 'string',
|
|
203
|
+
default: '',
|
|
204
|
+
routing: {
|
|
205
|
+
send: {
|
|
206
|
+
value: '={{$value}}',
|
|
207
|
+
property: '=customField.{{$parent.fieldId}}',
|
|
208
|
+
type: 'body',
|
|
209
|
+
},
|
|
210
|
+
},
|
|
211
|
+
},
|
|
212
|
+
],
|
|
213
|
+
},
|
|
214
|
+
],
|
|
215
|
+
};
|
|
216
|
+
const createProperties = [
|
|
217
|
+
{
|
|
218
|
+
displayName: 'Email',
|
|
219
|
+
name: 'email',
|
|
220
|
+
type: 'string',
|
|
221
|
+
placeholder: 'name@email.com',
|
|
222
|
+
description: 'Email or Phone are required to create contact',
|
|
223
|
+
displayOptions: {
|
|
224
|
+
show: {
|
|
225
|
+
resource: ['contact'],
|
|
226
|
+
operation: ['create'],
|
|
227
|
+
},
|
|
228
|
+
},
|
|
229
|
+
default: '',
|
|
230
|
+
routing: {
|
|
231
|
+
send: {
|
|
232
|
+
type: 'body',
|
|
233
|
+
property: 'email',
|
|
234
|
+
},
|
|
235
|
+
},
|
|
236
|
+
},
|
|
237
|
+
{
|
|
238
|
+
displayName: 'Phone',
|
|
239
|
+
name: 'phone',
|
|
240
|
+
type: 'string',
|
|
241
|
+
description: 'Phone or Email are required to create contact. Phone number has to start with a valid <a href="https://en.wikipedia.org/wiki/List_of_country_calling_codes">country code</a> leading with + sign.',
|
|
242
|
+
placeholder: '+491234567890',
|
|
243
|
+
displayOptions: {
|
|
244
|
+
show: {
|
|
245
|
+
resource: ['contact'],
|
|
246
|
+
operation: ['create'],
|
|
247
|
+
},
|
|
248
|
+
},
|
|
249
|
+
default: '',
|
|
250
|
+
routing: {
|
|
251
|
+
send: {
|
|
252
|
+
type: 'body',
|
|
253
|
+
property: 'phone',
|
|
254
|
+
},
|
|
255
|
+
},
|
|
256
|
+
},
|
|
257
|
+
{
|
|
258
|
+
displayName: 'Additional Fields',
|
|
259
|
+
name: 'additionalFields',
|
|
260
|
+
type: 'collection',
|
|
261
|
+
placeholder: 'Add Field',
|
|
262
|
+
default: {},
|
|
263
|
+
displayOptions: {
|
|
264
|
+
show: {
|
|
265
|
+
resource: ['contact'],
|
|
266
|
+
operation: ['create'],
|
|
267
|
+
},
|
|
268
|
+
},
|
|
269
|
+
options: [
|
|
270
|
+
{
|
|
271
|
+
displayName: 'Address',
|
|
272
|
+
name: 'address1',
|
|
273
|
+
type: 'string',
|
|
274
|
+
default: '',
|
|
275
|
+
routing: {
|
|
276
|
+
send: {
|
|
277
|
+
type: 'body',
|
|
278
|
+
property: 'address1',
|
|
279
|
+
},
|
|
280
|
+
},
|
|
281
|
+
},
|
|
282
|
+
{
|
|
283
|
+
displayName: 'City',
|
|
284
|
+
name: 'city',
|
|
285
|
+
type: 'string',
|
|
286
|
+
default: '',
|
|
287
|
+
routing: {
|
|
288
|
+
send: {
|
|
289
|
+
type: 'body',
|
|
290
|
+
property: 'city',
|
|
291
|
+
},
|
|
292
|
+
},
|
|
293
|
+
},
|
|
294
|
+
customFields,
|
|
295
|
+
{
|
|
296
|
+
displayName: 'Do Not Disturb',
|
|
297
|
+
name: 'dnd',
|
|
298
|
+
description: 'Whether automated/manual outbound messages are permitted to go out or not. True means NO outbound messages are permitted.',
|
|
299
|
+
type: 'boolean',
|
|
300
|
+
default: false,
|
|
301
|
+
routing: {
|
|
302
|
+
send: {
|
|
303
|
+
type: 'body',
|
|
304
|
+
property: 'dnd',
|
|
305
|
+
},
|
|
306
|
+
},
|
|
307
|
+
},
|
|
308
|
+
{
|
|
309
|
+
displayName: 'First Name',
|
|
310
|
+
name: 'firstName',
|
|
311
|
+
type: 'string',
|
|
312
|
+
default: '',
|
|
313
|
+
routing: {
|
|
314
|
+
send: {
|
|
315
|
+
type: 'body',
|
|
316
|
+
property: 'firstName',
|
|
317
|
+
},
|
|
318
|
+
},
|
|
319
|
+
},
|
|
320
|
+
{
|
|
321
|
+
displayName: 'Last Name',
|
|
322
|
+
name: 'lastName',
|
|
323
|
+
type: 'string',
|
|
324
|
+
default: '',
|
|
325
|
+
routing: {
|
|
326
|
+
send: {
|
|
327
|
+
type: 'body',
|
|
328
|
+
property: 'lastName',
|
|
329
|
+
},
|
|
330
|
+
},
|
|
331
|
+
},
|
|
332
|
+
{
|
|
333
|
+
displayName: 'Name',
|
|
334
|
+
name: 'name',
|
|
335
|
+
type: 'string',
|
|
336
|
+
default: 'e.g. John Deo',
|
|
337
|
+
description: "The full name of the contact, will be overwritten by 'First Name' and 'Last Name' if set",
|
|
338
|
+
routing: {
|
|
339
|
+
send: {
|
|
340
|
+
type: 'body',
|
|
341
|
+
property: 'name',
|
|
342
|
+
},
|
|
343
|
+
},
|
|
344
|
+
},
|
|
345
|
+
{
|
|
346
|
+
displayName: 'Postal Code',
|
|
347
|
+
name: 'postalCode',
|
|
348
|
+
type: 'string',
|
|
349
|
+
default: '',
|
|
350
|
+
routing: {
|
|
351
|
+
send: {
|
|
352
|
+
type: 'body',
|
|
353
|
+
property: 'postalCode',
|
|
354
|
+
},
|
|
355
|
+
},
|
|
356
|
+
},
|
|
357
|
+
{
|
|
358
|
+
displayName: 'Source',
|
|
359
|
+
name: 'source',
|
|
360
|
+
type: 'string',
|
|
361
|
+
default: '',
|
|
362
|
+
placeholder: 'e.g. Public API',
|
|
363
|
+
routing: {
|
|
364
|
+
send: {
|
|
365
|
+
type: 'body',
|
|
366
|
+
property: 'source',
|
|
367
|
+
},
|
|
368
|
+
},
|
|
369
|
+
},
|
|
370
|
+
{
|
|
371
|
+
displayName: 'State',
|
|
372
|
+
name: 'state',
|
|
373
|
+
type: 'string',
|
|
374
|
+
default: '',
|
|
375
|
+
routing: {
|
|
376
|
+
send: {
|
|
377
|
+
type: 'body',
|
|
378
|
+
property: 'state',
|
|
379
|
+
},
|
|
380
|
+
},
|
|
381
|
+
},
|
|
382
|
+
{
|
|
383
|
+
displayName: 'Tags',
|
|
384
|
+
name: 'tags',
|
|
385
|
+
type: 'string',
|
|
386
|
+
hint: 'Comma separated list of tags, array of strings can be set in expression',
|
|
387
|
+
default: '',
|
|
388
|
+
routing: {
|
|
389
|
+
send: {
|
|
390
|
+
type: 'body',
|
|
391
|
+
property: 'tags',
|
|
392
|
+
},
|
|
393
|
+
},
|
|
394
|
+
},
|
|
395
|
+
{
|
|
396
|
+
displayName: 'Timezone',
|
|
397
|
+
name: 'timezone',
|
|
398
|
+
type: 'options',
|
|
399
|
+
default: '',
|
|
400
|
+
description: 'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>',
|
|
401
|
+
typeOptions: {
|
|
402
|
+
loadOptionsMethod: 'getTimezones',
|
|
403
|
+
},
|
|
404
|
+
routing: {
|
|
405
|
+
send: {
|
|
406
|
+
type: 'body',
|
|
407
|
+
property: 'timezone',
|
|
408
|
+
},
|
|
409
|
+
},
|
|
410
|
+
},
|
|
411
|
+
{
|
|
412
|
+
displayName: 'Website',
|
|
413
|
+
name: 'website',
|
|
414
|
+
type: 'string',
|
|
415
|
+
default: '',
|
|
416
|
+
routing: {
|
|
417
|
+
send: {
|
|
418
|
+
type: 'body',
|
|
419
|
+
property: 'website',
|
|
420
|
+
},
|
|
421
|
+
},
|
|
422
|
+
},
|
|
423
|
+
],
|
|
424
|
+
},
|
|
425
|
+
];
|
|
426
|
+
const updateProperties = [
|
|
427
|
+
{
|
|
428
|
+
displayName: 'Contact ID',
|
|
429
|
+
name: 'contactId',
|
|
430
|
+
type: 'string',
|
|
431
|
+
required: true,
|
|
432
|
+
displayOptions: {
|
|
433
|
+
show: {
|
|
434
|
+
resource: ['contact'],
|
|
435
|
+
operation: ['update'],
|
|
436
|
+
},
|
|
437
|
+
},
|
|
438
|
+
default: '',
|
|
439
|
+
},
|
|
440
|
+
{
|
|
441
|
+
displayName: 'Update Fields',
|
|
442
|
+
name: 'updateFields',
|
|
443
|
+
type: 'collection',
|
|
444
|
+
placeholder: 'Add Field',
|
|
445
|
+
default: {},
|
|
446
|
+
displayOptions: {
|
|
447
|
+
show: {
|
|
448
|
+
resource: ['contact'],
|
|
449
|
+
operation: ['update'],
|
|
450
|
+
},
|
|
451
|
+
},
|
|
452
|
+
options: [
|
|
453
|
+
{
|
|
454
|
+
displayName: 'Address',
|
|
455
|
+
name: 'address1',
|
|
456
|
+
type: 'string',
|
|
457
|
+
default: '',
|
|
458
|
+
routing: {
|
|
459
|
+
send: {
|
|
460
|
+
type: 'body',
|
|
461
|
+
property: 'address1',
|
|
462
|
+
},
|
|
463
|
+
},
|
|
464
|
+
},
|
|
465
|
+
{
|
|
466
|
+
displayName: 'City',
|
|
467
|
+
name: 'city',
|
|
468
|
+
type: 'string',
|
|
469
|
+
default: '',
|
|
470
|
+
routing: {
|
|
471
|
+
send: {
|
|
472
|
+
type: 'body',
|
|
473
|
+
property: 'city',
|
|
474
|
+
},
|
|
475
|
+
},
|
|
476
|
+
},
|
|
477
|
+
customFields,
|
|
478
|
+
{
|
|
479
|
+
displayName: 'Do Not Disturb',
|
|
480
|
+
name: 'dnd',
|
|
481
|
+
description: 'Whether automated/manual outbound messages are permitted to go out or not. True means NO outbound messages are permitted.',
|
|
482
|
+
type: 'boolean',
|
|
483
|
+
default: false,
|
|
484
|
+
routing: {
|
|
485
|
+
send: {
|
|
486
|
+
type: 'body',
|
|
487
|
+
property: 'dnd',
|
|
488
|
+
},
|
|
489
|
+
},
|
|
490
|
+
},
|
|
491
|
+
{
|
|
492
|
+
displayName: 'Email',
|
|
493
|
+
name: 'email',
|
|
494
|
+
type: 'string',
|
|
495
|
+
placeholder: 'name@email.com',
|
|
496
|
+
default: '',
|
|
497
|
+
routing: {
|
|
498
|
+
send: {
|
|
499
|
+
type: 'body',
|
|
500
|
+
property: 'email',
|
|
501
|
+
},
|
|
502
|
+
},
|
|
503
|
+
},
|
|
504
|
+
{
|
|
505
|
+
displayName: 'First Name',
|
|
506
|
+
name: 'firstName',
|
|
507
|
+
type: 'string',
|
|
508
|
+
default: '',
|
|
509
|
+
routing: {
|
|
510
|
+
send: {
|
|
511
|
+
type: 'body',
|
|
512
|
+
property: 'firstName',
|
|
513
|
+
},
|
|
514
|
+
},
|
|
515
|
+
},
|
|
516
|
+
{
|
|
517
|
+
displayName: 'Last Name',
|
|
518
|
+
name: 'lastName',
|
|
519
|
+
type: 'string',
|
|
520
|
+
default: '',
|
|
521
|
+
routing: {
|
|
522
|
+
send: {
|
|
523
|
+
type: 'body',
|
|
524
|
+
property: 'lastName',
|
|
525
|
+
},
|
|
526
|
+
},
|
|
527
|
+
},
|
|
528
|
+
{
|
|
529
|
+
displayName: 'Name',
|
|
530
|
+
name: 'name',
|
|
531
|
+
type: 'string',
|
|
532
|
+
description: "The full name of the contact, will be overwritten by 'First Name' and 'Last Name' if set",
|
|
533
|
+
default: 'e.g. John Deo',
|
|
534
|
+
routing: {
|
|
535
|
+
send: {
|
|
536
|
+
type: 'body',
|
|
537
|
+
property: 'name',
|
|
538
|
+
},
|
|
539
|
+
},
|
|
540
|
+
},
|
|
541
|
+
{
|
|
542
|
+
displayName: 'Phone',
|
|
543
|
+
name: 'phone',
|
|
544
|
+
type: 'string',
|
|
545
|
+
default: '',
|
|
546
|
+
description: 'Phone number has to start with a valid <a href="https://en.wikipedia.org/wiki/List_of_country_calling_codes">country code</a> leading with + sign',
|
|
547
|
+
placeholder: '+491234567890',
|
|
548
|
+
routing: {
|
|
549
|
+
send: {
|
|
550
|
+
type: 'body',
|
|
551
|
+
property: 'phone',
|
|
552
|
+
},
|
|
553
|
+
},
|
|
554
|
+
},
|
|
555
|
+
{
|
|
556
|
+
displayName: 'Postal Code',
|
|
557
|
+
name: 'postalCode',
|
|
558
|
+
type: 'string',
|
|
559
|
+
default: '',
|
|
560
|
+
routing: {
|
|
561
|
+
send: {
|
|
562
|
+
type: 'body',
|
|
563
|
+
property: 'postalCode',
|
|
564
|
+
},
|
|
565
|
+
},
|
|
566
|
+
},
|
|
567
|
+
{
|
|
568
|
+
displayName: 'State',
|
|
569
|
+
name: 'state',
|
|
570
|
+
type: 'string',
|
|
571
|
+
default: '',
|
|
572
|
+
routing: {
|
|
573
|
+
send: {
|
|
574
|
+
type: 'body',
|
|
575
|
+
property: 'state',
|
|
576
|
+
},
|
|
577
|
+
},
|
|
578
|
+
},
|
|
579
|
+
{
|
|
580
|
+
displayName: 'Tags',
|
|
581
|
+
name: 'tags',
|
|
582
|
+
type: 'string',
|
|
583
|
+
hint: 'Comma separated list of tags, array of strings can be set in expression',
|
|
584
|
+
default: '',
|
|
585
|
+
routing: {
|
|
586
|
+
send: {
|
|
587
|
+
type: 'body',
|
|
588
|
+
property: 'tags',
|
|
589
|
+
},
|
|
590
|
+
},
|
|
591
|
+
},
|
|
592
|
+
{
|
|
593
|
+
displayName: 'Timezone',
|
|
594
|
+
name: 'timezone',
|
|
595
|
+
type: 'options',
|
|
596
|
+
default: '',
|
|
597
|
+
description: 'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>',
|
|
598
|
+
typeOptions: {
|
|
599
|
+
loadOptionsMethod: 'getTimezones',
|
|
600
|
+
},
|
|
601
|
+
routing: {
|
|
602
|
+
send: {
|
|
603
|
+
type: 'body',
|
|
604
|
+
property: 'timezone',
|
|
605
|
+
},
|
|
606
|
+
},
|
|
607
|
+
},
|
|
608
|
+
{
|
|
609
|
+
displayName: 'Website',
|
|
610
|
+
name: 'website',
|
|
611
|
+
type: 'string',
|
|
612
|
+
default: '',
|
|
613
|
+
routing: {
|
|
614
|
+
send: {
|
|
615
|
+
type: 'body',
|
|
616
|
+
property: 'website',
|
|
617
|
+
},
|
|
618
|
+
},
|
|
619
|
+
},
|
|
620
|
+
],
|
|
621
|
+
},
|
|
622
|
+
];
|
|
623
|
+
const deleteProperties = [
|
|
624
|
+
{
|
|
625
|
+
displayName: 'Contact ID',
|
|
626
|
+
name: 'contactId',
|
|
627
|
+
type: 'string',
|
|
628
|
+
required: true,
|
|
629
|
+
displayOptions: {
|
|
630
|
+
show: {
|
|
631
|
+
resource: ['contact'],
|
|
632
|
+
operation: ['delete'],
|
|
633
|
+
},
|
|
634
|
+
},
|
|
635
|
+
default: '',
|
|
636
|
+
},
|
|
637
|
+
];
|
|
638
|
+
const getProperties = [
|
|
639
|
+
{
|
|
640
|
+
displayName: 'Contact ID',
|
|
641
|
+
name: 'contactId',
|
|
642
|
+
type: 'string',
|
|
643
|
+
required: true,
|
|
644
|
+
displayOptions: {
|
|
645
|
+
show: {
|
|
646
|
+
resource: ['contact'],
|
|
647
|
+
operation: ['get'],
|
|
648
|
+
},
|
|
649
|
+
},
|
|
650
|
+
default: '',
|
|
651
|
+
},
|
|
652
|
+
];
|
|
653
|
+
const getAllProperties = [
|
|
654
|
+
{
|
|
655
|
+
displayName: 'Return All',
|
|
656
|
+
name: 'returnAll',
|
|
657
|
+
type: 'boolean',
|
|
658
|
+
displayOptions: {
|
|
659
|
+
show: {
|
|
660
|
+
resource: ['contact'],
|
|
661
|
+
operation: ['getAll'],
|
|
662
|
+
},
|
|
663
|
+
},
|
|
664
|
+
default: false,
|
|
665
|
+
description: 'Whether to return all results or only up to a given limit',
|
|
666
|
+
},
|
|
667
|
+
{
|
|
668
|
+
displayName: 'Limit',
|
|
669
|
+
name: 'limit',
|
|
670
|
+
type: 'number',
|
|
671
|
+
displayOptions: {
|
|
672
|
+
show: {
|
|
673
|
+
resource: ['contact'],
|
|
674
|
+
operation: ['getAll'],
|
|
675
|
+
returnAll: [false],
|
|
676
|
+
},
|
|
677
|
+
},
|
|
678
|
+
typeOptions: {
|
|
679
|
+
minValue: 1,
|
|
680
|
+
maxValue: 100,
|
|
681
|
+
},
|
|
682
|
+
default: 20,
|
|
683
|
+
routing: {
|
|
684
|
+
send: {
|
|
685
|
+
type: 'query',
|
|
686
|
+
property: 'limit',
|
|
687
|
+
},
|
|
688
|
+
output: {
|
|
689
|
+
maxResults: '={{$value}}',
|
|
690
|
+
},
|
|
691
|
+
},
|
|
692
|
+
description: 'Max number of results to return',
|
|
693
|
+
},
|
|
694
|
+
{
|
|
695
|
+
displayName: 'Filters',
|
|
696
|
+
name: 'filters',
|
|
697
|
+
type: 'collection',
|
|
698
|
+
placeholder: 'Add Filter',
|
|
699
|
+
default: {},
|
|
700
|
+
displayOptions: {
|
|
701
|
+
show: {
|
|
702
|
+
resource: ['contact'],
|
|
703
|
+
operation: ['getAll'],
|
|
704
|
+
},
|
|
705
|
+
},
|
|
706
|
+
options: [
|
|
707
|
+
{
|
|
708
|
+
displayName: 'Query',
|
|
709
|
+
name: 'query',
|
|
710
|
+
type: 'string',
|
|
711
|
+
default: '',
|
|
712
|
+
description: 'Query will search on these fields: Name, Phone, Email, Tags, and Company Name',
|
|
713
|
+
routing: {
|
|
714
|
+
send: {
|
|
715
|
+
type: 'query',
|
|
716
|
+
property: 'query',
|
|
717
|
+
},
|
|
718
|
+
},
|
|
719
|
+
},
|
|
720
|
+
],
|
|
721
|
+
},
|
|
722
|
+
{
|
|
723
|
+
displayName: 'Options',
|
|
724
|
+
name: 'options',
|
|
725
|
+
type: 'collection',
|
|
726
|
+
placeholder: 'Add Option',
|
|
727
|
+
default: {},
|
|
728
|
+
displayOptions: {
|
|
729
|
+
show: {
|
|
730
|
+
resource: ['contact'],
|
|
731
|
+
operation: ['getAll'],
|
|
732
|
+
},
|
|
733
|
+
},
|
|
734
|
+
options: [
|
|
735
|
+
{
|
|
736
|
+
displayName: 'Order',
|
|
737
|
+
name: 'order',
|
|
738
|
+
type: 'options',
|
|
739
|
+
options: [
|
|
740
|
+
{
|
|
741
|
+
name: 'Descending',
|
|
742
|
+
value: 'desc',
|
|
743
|
+
},
|
|
744
|
+
{
|
|
745
|
+
name: 'Ascending',
|
|
746
|
+
value: 'asc',
|
|
747
|
+
},
|
|
748
|
+
],
|
|
749
|
+
default: 'desc',
|
|
750
|
+
routing: {
|
|
751
|
+
send: {
|
|
752
|
+
type: 'query',
|
|
753
|
+
property: 'order',
|
|
754
|
+
},
|
|
755
|
+
},
|
|
756
|
+
},
|
|
757
|
+
{
|
|
758
|
+
displayName: 'Sort By',
|
|
759
|
+
name: 'sortBy',
|
|
760
|
+
type: 'options',
|
|
761
|
+
options: [
|
|
762
|
+
{
|
|
763
|
+
name: 'Date Added',
|
|
764
|
+
value: 'date_added',
|
|
765
|
+
},
|
|
766
|
+
{
|
|
767
|
+
name: 'Date Updated',
|
|
768
|
+
value: 'date_updated',
|
|
769
|
+
},
|
|
770
|
+
],
|
|
771
|
+
default: 'date_added',
|
|
772
|
+
routing: {
|
|
773
|
+
send: {
|
|
774
|
+
type: 'query',
|
|
775
|
+
property: 'sortBy',
|
|
776
|
+
},
|
|
777
|
+
},
|
|
778
|
+
},
|
|
779
|
+
],
|
|
780
|
+
},
|
|
781
|
+
];
|
|
782
|
+
const lookupProperties = [
|
|
783
|
+
{
|
|
784
|
+
displayName: 'Email',
|
|
785
|
+
name: 'email',
|
|
786
|
+
type: 'string',
|
|
787
|
+
placeholder: 'name@email.com',
|
|
788
|
+
description: 'Lookup Contact by Email. If Email is not found it will try to find a contact by phone.',
|
|
789
|
+
displayOptions: {
|
|
790
|
+
show: {
|
|
791
|
+
resource: ['contact'],
|
|
792
|
+
operation: ['lookup'],
|
|
793
|
+
},
|
|
794
|
+
},
|
|
795
|
+
default: '',
|
|
796
|
+
},
|
|
797
|
+
{
|
|
798
|
+
displayName: 'Phone',
|
|
799
|
+
name: 'phone',
|
|
800
|
+
type: 'string',
|
|
801
|
+
description: 'Lookup Contact by Phone. It will first try to find a contact by Email and than by Phone.',
|
|
802
|
+
displayOptions: {
|
|
803
|
+
show: {
|
|
804
|
+
resource: ['contact'],
|
|
805
|
+
operation: ['lookup'],
|
|
806
|
+
},
|
|
807
|
+
},
|
|
808
|
+
default: '',
|
|
809
|
+
},
|
|
810
|
+
];
|
|
811
|
+
exports.contactFields = [
|
|
812
|
+
...createProperties,
|
|
813
|
+
...updateProperties,
|
|
814
|
+
...deleteProperties,
|
|
815
|
+
...getProperties,
|
|
816
|
+
...getAllProperties,
|
|
817
|
+
...lookupProperties,
|
|
818
|
+
];
|
|
819
|
+
//# sourceMappingURL=ContactDescription.js.map
|