n8n-nodes-linq 0.1.7 → 0.1.9
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/nodes/Linq/Linq.node.js +178 -168
- package/package.json +1 -1
|
@@ -32,182 +32,182 @@ class Linq {
|
|
|
32
32
|
],
|
|
33
33
|
default: 'chat',
|
|
34
34
|
},
|
|
35
|
+
// Chat operations
|
|
35
36
|
{
|
|
36
37
|
displayName: 'Operation',
|
|
37
38
|
name: 'operation',
|
|
38
39
|
type: 'options',
|
|
39
40
|
noDataExpression: true,
|
|
41
|
+
displayOptions: { show: { resource: ['chat'] } },
|
|
40
42
|
options: [
|
|
41
|
-
// Phone Number Operations (Check iMessage Availability comes first alphabetically)
|
|
42
43
|
{
|
|
43
|
-
name: '
|
|
44
|
-
value: '
|
|
45
|
-
action: '
|
|
46
|
-
displayOptions: { show: { resource: ['phoneNumber'] } },
|
|
44
|
+
name: 'Create',
|
|
45
|
+
value: 'create',
|
|
46
|
+
action: 'Create a chat'
|
|
47
47
|
},
|
|
48
|
-
// Chat Operations
|
|
49
48
|
{
|
|
50
|
-
name: '
|
|
51
|
-
value: '
|
|
52
|
-
action: '
|
|
53
|
-
displayOptions: { show: { resource: ['chat'] } },
|
|
49
|
+
name: 'Find',
|
|
50
|
+
value: 'find',
|
|
51
|
+
action: 'Find chats'
|
|
54
52
|
},
|
|
55
|
-
// Chat Message Operations
|
|
56
53
|
{
|
|
57
|
-
name: '
|
|
58
|
-
value: '
|
|
59
|
-
action: '
|
|
60
|
-
displayOptions: { show: { resource: ['chatMessage'] } },
|
|
54
|
+
name: 'Get Many',
|
|
55
|
+
value: 'getAll',
|
|
56
|
+
action: 'Get many chats'
|
|
61
57
|
},
|
|
62
|
-
// Contact Operations
|
|
63
58
|
{
|
|
64
|
-
name: '
|
|
65
|
-
value: '
|
|
66
|
-
action: '
|
|
67
|
-
displayOptions: { show: { resource: ['contact'] } },
|
|
59
|
+
name: 'Get One',
|
|
60
|
+
value: 'getOne',
|
|
61
|
+
action: 'Get one chat'
|
|
68
62
|
},
|
|
69
|
-
// Webhook Subscription Operations
|
|
70
63
|
{
|
|
71
|
-
name: '
|
|
72
|
-
value: '
|
|
73
|
-
action: '
|
|
74
|
-
displayOptions: { show: { resource: ['webhookSubscription'] } },
|
|
64
|
+
name: 'Share Contact',
|
|
65
|
+
value: 'shareContact',
|
|
66
|
+
action: 'Share a contact'
|
|
75
67
|
},
|
|
76
|
-
|
|
68
|
+
],
|
|
69
|
+
default: 'getAll',
|
|
70
|
+
},
|
|
71
|
+
// Chat Message operations
|
|
72
|
+
{
|
|
73
|
+
displayName: 'Operation',
|
|
74
|
+
name: 'operation',
|
|
75
|
+
type: 'options',
|
|
76
|
+
noDataExpression: true,
|
|
77
|
+
displayOptions: { show: { resource: ['chatMessage'] } },
|
|
78
|
+
options: [
|
|
77
79
|
{
|
|
78
|
-
name: '
|
|
79
|
-
value: '
|
|
80
|
-
action: '
|
|
81
|
-
displayOptions: { show: { resource: ['chatMessage'] } },
|
|
80
|
+
name: 'Create',
|
|
81
|
+
value: 'create',
|
|
82
|
+
action: 'Create a chat message'
|
|
82
83
|
},
|
|
83
|
-
// Contact Operations (Delete)
|
|
84
84
|
{
|
|
85
|
-
name: 'Delete
|
|
86
|
-
value: '
|
|
87
|
-
action: 'Delete a
|
|
88
|
-
displayOptions: { show: { resource: ['contact'] } },
|
|
85
|
+
name: 'Delete',
|
|
86
|
+
value: 'delete',
|
|
87
|
+
action: 'Delete a chat message'
|
|
89
88
|
},
|
|
90
|
-
// Webhook Subscription Operations (Delete)
|
|
91
89
|
{
|
|
92
|
-
name: '
|
|
93
|
-
value: '
|
|
94
|
-
action: '
|
|
95
|
-
displayOptions: { show: { resource: ['webhookSubscription'] } },
|
|
90
|
+
name: 'Edit',
|
|
91
|
+
value: 'edit',
|
|
92
|
+
action: 'Edit a chat message'
|
|
96
93
|
},
|
|
97
|
-
// Chat Message Operations (Edit)
|
|
98
94
|
{
|
|
99
|
-
name: '
|
|
100
|
-
value: '
|
|
101
|
-
action: '
|
|
102
|
-
displayOptions: { show: { resource: ['chatMessage'] } },
|
|
95
|
+
name: 'Get Many',
|
|
96
|
+
value: 'getAll',
|
|
97
|
+
action: 'Get many chat messages'
|
|
103
98
|
},
|
|
104
|
-
// Chat Operations (Find)
|
|
105
99
|
{
|
|
106
|
-
name: '
|
|
107
|
-
value: '
|
|
108
|
-
action: '
|
|
109
|
-
displayOptions: { show: { resource: ['chat'] } },
|
|
100
|
+
name: 'Get One',
|
|
101
|
+
value: 'getOne',
|
|
102
|
+
action: 'Get one chat message'
|
|
110
103
|
},
|
|
111
|
-
// Chat Message Operations (Get Many)
|
|
112
104
|
{
|
|
113
|
-
name: 'Get
|
|
114
|
-
value: '
|
|
115
|
-
action: 'Get
|
|
116
|
-
displayOptions: { show: { resource: ['chatMessage'] } },
|
|
105
|
+
name: 'Get Reaction',
|
|
106
|
+
value: 'getReaction',
|
|
107
|
+
action: 'Get a chat message reaction'
|
|
117
108
|
},
|
|
118
|
-
// Chat Operations (Get Many)
|
|
119
109
|
{
|
|
120
|
-
name: '
|
|
121
|
-
value: '
|
|
122
|
-
action: '
|
|
123
|
-
displayOptions: { show: { resource: ['chat'] } },
|
|
110
|
+
name: 'React',
|
|
111
|
+
value: 'react',
|
|
112
|
+
action: 'React to a chat message'
|
|
124
113
|
},
|
|
125
|
-
|
|
114
|
+
],
|
|
115
|
+
default: 'getAll',
|
|
116
|
+
},
|
|
117
|
+
// Phone Number operations
|
|
118
|
+
{
|
|
119
|
+
displayName: 'Operation',
|
|
120
|
+
name: 'operation',
|
|
121
|
+
type: 'options',
|
|
122
|
+
noDataExpression: true,
|
|
123
|
+
displayOptions: { show: { resource: ['phoneNumber'] } },
|
|
124
|
+
options: [
|
|
126
125
|
{
|
|
127
|
-
name: '
|
|
128
|
-
value: '
|
|
129
|
-
action: '
|
|
130
|
-
displayOptions: { show: { resource: ['phoneNumber'] } },
|
|
126
|
+
name: 'Check iMessage Availability',
|
|
127
|
+
value: 'checkIMessageAvailability',
|
|
128
|
+
action: 'Check imessage availability'
|
|
131
129
|
},
|
|
132
|
-
// Webhook Subscription Operations (Get Many)
|
|
133
130
|
{
|
|
134
|
-
name: 'Get Many
|
|
135
|
-
value: '
|
|
136
|
-
action: 'Get many
|
|
137
|
-
displayOptions: { show: { resource: ['webhookSubscription'] } },
|
|
131
|
+
name: 'Get Many',
|
|
132
|
+
value: 'getAll',
|
|
133
|
+
action: 'Get many phone numbers'
|
|
138
134
|
},
|
|
139
|
-
|
|
135
|
+
],
|
|
136
|
+
default: 'getAll',
|
|
137
|
+
},
|
|
138
|
+
// Webhook Subscription operations
|
|
139
|
+
{
|
|
140
|
+
displayName: 'Operation',
|
|
141
|
+
name: 'operation',
|
|
142
|
+
type: 'options',
|
|
143
|
+
noDataExpression: true,
|
|
144
|
+
displayOptions: { show: { resource: ['webhookSubscription'] } },
|
|
145
|
+
options: [
|
|
140
146
|
{
|
|
141
|
-
name: '
|
|
142
|
-
value: '
|
|
143
|
-
action: '
|
|
144
|
-
displayOptions: { show: { resource: ['chat'] } },
|
|
147
|
+
name: 'Create',
|
|
148
|
+
value: 'create',
|
|
149
|
+
action: 'Create a webhook subscription'
|
|
145
150
|
},
|
|
146
|
-
// Chat Message Operations (Get One)
|
|
147
151
|
{
|
|
148
|
-
name: '
|
|
149
|
-
value: '
|
|
150
|
-
action: '
|
|
151
|
-
displayOptions: { show: { resource: ['chatMessage'] } },
|
|
152
|
+
name: 'Delete',
|
|
153
|
+
value: 'delete',
|
|
154
|
+
action: 'Delete a webhook subscription'
|
|
152
155
|
},
|
|
153
|
-
// Contact Operations (Get One)
|
|
154
156
|
{
|
|
155
|
-
name: 'Get
|
|
156
|
-
value: '
|
|
157
|
-
action: 'Get
|
|
158
|
-
displayOptions: { show: { resource: ['contact'] } },
|
|
157
|
+
name: 'Get Many',
|
|
158
|
+
value: 'getAll',
|
|
159
|
+
action: 'Get many webhook subscriptions'
|
|
159
160
|
},
|
|
160
|
-
// Webhook Subscription Operations (Get One)
|
|
161
161
|
{
|
|
162
|
-
name: 'Get One
|
|
163
|
-
value: '
|
|
164
|
-
action: 'Get one webhook subscription'
|
|
165
|
-
displayOptions: { show: { resource: ['webhookSubscription'] } },
|
|
162
|
+
name: 'Get One',
|
|
163
|
+
value: 'getOne',
|
|
164
|
+
action: 'Get one webhook subscription'
|
|
166
165
|
},
|
|
167
|
-
// Chat Message Operations (Get Reaction)
|
|
168
166
|
{
|
|
169
|
-
name: '
|
|
170
|
-
value: '
|
|
171
|
-
action: '
|
|
172
|
-
displayOptions: { show: { resource: ['chatMessage'] } },
|
|
167
|
+
name: 'Update',
|
|
168
|
+
value: 'update',
|
|
169
|
+
action: 'Update a webhook subscription'
|
|
173
170
|
},
|
|
174
|
-
|
|
171
|
+
],
|
|
172
|
+
default: 'getAll',
|
|
173
|
+
},
|
|
174
|
+
// Contact operations
|
|
175
|
+
{
|
|
176
|
+
displayName: 'Operation',
|
|
177
|
+
name: 'operation',
|
|
178
|
+
type: 'options',
|
|
179
|
+
noDataExpression: true,
|
|
180
|
+
displayOptions: { show: { resource: ['contact'] } },
|
|
181
|
+
options: [
|
|
175
182
|
{
|
|
176
|
-
name: '
|
|
177
|
-
value: '
|
|
178
|
-
action: '
|
|
179
|
-
displayOptions: { show: { resource: ['chatMessage'] } },
|
|
183
|
+
name: 'Create',
|
|
184
|
+
value: 'create',
|
|
185
|
+
action: 'Create a contact'
|
|
180
186
|
},
|
|
181
|
-
// Chat Operations (Share Contact)
|
|
182
187
|
{
|
|
183
|
-
name: '
|
|
184
|
-
value: '
|
|
185
|
-
action: '
|
|
186
|
-
displayOptions: { show: { resource: ['chat'] } },
|
|
188
|
+
name: 'Delete',
|
|
189
|
+
value: 'delete',
|
|
190
|
+
action: 'Delete a contact'
|
|
187
191
|
},
|
|
188
|
-
// Contact Operations (Update)
|
|
189
192
|
{
|
|
190
|
-
name: '
|
|
191
|
-
value: '
|
|
192
|
-
action: '
|
|
193
|
-
displayOptions: { show: { resource: ['contact'] } },
|
|
193
|
+
name: 'Get One',
|
|
194
|
+
value: 'getOne',
|
|
195
|
+
action: 'Get one contact'
|
|
194
196
|
},
|
|
195
|
-
// Webhook Subscription Operations (Update)
|
|
196
197
|
{
|
|
197
|
-
name: 'Update
|
|
198
|
-
value: '
|
|
199
|
-
action: 'Update a
|
|
200
|
-
displayOptions: { show: { resource: ['webhookSubscription'] } },
|
|
198
|
+
name: 'Update',
|
|
199
|
+
value: 'update',
|
|
200
|
+
action: 'Update a contact'
|
|
201
201
|
},
|
|
202
202
|
],
|
|
203
|
-
default: '
|
|
203
|
+
default: 'create',
|
|
204
204
|
},
|
|
205
205
|
// Chat parameters
|
|
206
206
|
{
|
|
207
207
|
displayName: 'Chat ID',
|
|
208
208
|
name: 'chatId',
|
|
209
209
|
type: 'string',
|
|
210
|
-
displayOptions: { show: { resource: ['chat'], operation: ['
|
|
210
|
+
displayOptions: { show: { resource: ['chat'], operation: ['getOne'] } },
|
|
211
211
|
default: '',
|
|
212
212
|
description: 'The ID of the chat to retrieve',
|
|
213
213
|
},
|
|
@@ -215,15 +215,23 @@ class Linq {
|
|
|
215
215
|
displayName: 'Phone Number',
|
|
216
216
|
name: 'phoneNumber',
|
|
217
217
|
type: 'string',
|
|
218
|
-
displayOptions: { show: { resource: ['chat'], operation: ['
|
|
218
|
+
displayOptions: { show: { resource: ['chat'], operation: ['getAll'] } },
|
|
219
219
|
default: '',
|
|
220
220
|
description: 'Filter chats by phone number',
|
|
221
221
|
},
|
|
222
|
+
{
|
|
223
|
+
displayName: 'Phone Numbers',
|
|
224
|
+
name: 'phoneNumbers',
|
|
225
|
+
type: 'string',
|
|
226
|
+
displayOptions: { show: { resource: ['chat'], operation: ['find'] } },
|
|
227
|
+
default: '',
|
|
228
|
+
description: 'Comma-separated list of phone numbers to find chat between them',
|
|
229
|
+
},
|
|
222
230
|
{
|
|
223
231
|
displayName: 'Page',
|
|
224
232
|
name: 'page',
|
|
225
233
|
type: 'number',
|
|
226
|
-
displayOptions: { show: { resource: ['chat'], operation: ['
|
|
234
|
+
displayOptions: { show: { resource: ['chat'], operation: ['getAll'] } },
|
|
227
235
|
default: 1,
|
|
228
236
|
description: 'Page number for pagination',
|
|
229
237
|
},
|
|
@@ -231,7 +239,7 @@ class Linq {
|
|
|
231
239
|
displayName: 'Per Page',
|
|
232
240
|
name: 'perPage',
|
|
233
241
|
type: 'number',
|
|
234
|
-
displayOptions: { show: { resource: ['chat'], operation: ['
|
|
242
|
+
displayOptions: { show: { resource: ['chat'], operation: ['getAll'] } },
|
|
235
243
|
default: 25,
|
|
236
244
|
description: 'Number of items per page',
|
|
237
245
|
},
|
|
@@ -240,7 +248,7 @@ class Linq {
|
|
|
240
248
|
displayName: 'Send From',
|
|
241
249
|
name: 'sendFrom',
|
|
242
250
|
type: 'string',
|
|
243
|
-
displayOptions: { show: { resource: ['chat'], operation: ['
|
|
251
|
+
displayOptions: { show: { resource: ['chat'], operation: ['create'] } },
|
|
244
252
|
default: '',
|
|
245
253
|
description: 'The phone number to send from',
|
|
246
254
|
},
|
|
@@ -248,7 +256,7 @@ class Linq {
|
|
|
248
256
|
displayName: 'Display Name',
|
|
249
257
|
name: 'displayName',
|
|
250
258
|
type: 'string',
|
|
251
|
-
displayOptions: { show: { resource: ['chat'], operation: ['
|
|
259
|
+
displayOptions: { show: { resource: ['chat'], operation: ['create'] } },
|
|
252
260
|
default: '',
|
|
253
261
|
description: 'The display name for the chat',
|
|
254
262
|
},
|
|
@@ -256,7 +264,7 @@ class Linq {
|
|
|
256
264
|
displayName: 'Phone Numbers',
|
|
257
265
|
name: 'phoneNumbers',
|
|
258
266
|
type: 'string',
|
|
259
|
-
displayOptions: { show: { resource: ['chat'], operation: ['
|
|
267
|
+
displayOptions: { show: { resource: ['chat'], operation: ['create'] } },
|
|
260
268
|
default: '',
|
|
261
269
|
description: 'Comma-separated list of phone numbers',
|
|
262
270
|
},
|
|
@@ -264,7 +272,7 @@ class Linq {
|
|
|
264
272
|
displayName: 'Message Text',
|
|
265
273
|
name: 'messageText',
|
|
266
274
|
type: 'string',
|
|
267
|
-
displayOptions: { show: { resource: ['chat'], operation: ['
|
|
275
|
+
displayOptions: { show: { resource: ['chat'], operation: ['create'] } },
|
|
268
276
|
default: '',
|
|
269
277
|
description: 'The text of the message to send',
|
|
270
278
|
},
|
|
@@ -273,7 +281,7 @@ class Linq {
|
|
|
273
281
|
displayName: 'Chat Message ID',
|
|
274
282
|
name: 'chatMessageId',
|
|
275
283
|
type: 'string',
|
|
276
|
-
displayOptions: { show: { resource: ['chatMessage'], operation: ['
|
|
284
|
+
displayOptions: { show: { resource: ['chatMessage'], operation: ['getOne', 'delete', 'edit', 'react', 'getReaction'] } },
|
|
277
285
|
default: '',
|
|
278
286
|
description: 'The ID of the chat message',
|
|
279
287
|
},
|
|
@@ -281,7 +289,7 @@ class Linq {
|
|
|
281
289
|
displayName: 'Chat ID',
|
|
282
290
|
name: 'chatId',
|
|
283
291
|
type: 'string',
|
|
284
|
-
displayOptions: { show: { resource: ['chatMessage'], operation: ['
|
|
292
|
+
displayOptions: { show: { resource: ['chatMessage'], operation: ['getAll', 'create'] } },
|
|
285
293
|
default: '',
|
|
286
294
|
description: 'The ID of the chat',
|
|
287
295
|
},
|
|
@@ -289,7 +297,7 @@ class Linq {
|
|
|
289
297
|
displayName: 'Message Text',
|
|
290
298
|
name: 'messageText',
|
|
291
299
|
type: 'string',
|
|
292
|
-
displayOptions: { show: { resource: ['chatMessage'], operation: ['
|
|
300
|
+
displayOptions: { show: { resource: ['chatMessage'], operation: ['create', 'edit'] } },
|
|
293
301
|
default: '',
|
|
294
302
|
description: 'The text of the message',
|
|
295
303
|
},
|
|
@@ -297,7 +305,7 @@ class Linq {
|
|
|
297
305
|
displayName: 'Reaction',
|
|
298
306
|
name: 'reaction',
|
|
299
307
|
type: 'string',
|
|
300
|
-
displayOptions: { show: { resource: ['chatMessage'], operation: ['
|
|
308
|
+
displayOptions: { show: { resource: ['chatMessage'], operation: ['react'] } },
|
|
301
309
|
default: '',
|
|
302
310
|
description: 'The reaction to add',
|
|
303
311
|
},
|
|
@@ -306,7 +314,7 @@ class Linq {
|
|
|
306
314
|
displayName: 'Phone Number',
|
|
307
315
|
name: 'phoneNumber',
|
|
308
316
|
type: 'string',
|
|
309
|
-
displayOptions: { show: { resource: ['phoneNumber'], operation: ['
|
|
317
|
+
displayOptions: { show: { resource: ['phoneNumber'], operation: ['checkIMessageAvailability'] } },
|
|
310
318
|
default: '',
|
|
311
319
|
description: 'The phone number to check',
|
|
312
320
|
},
|
|
@@ -315,7 +323,7 @@ class Linq {
|
|
|
315
323
|
displayName: 'Webhook Subscription ID',
|
|
316
324
|
name: 'webhookSubscriptionId',
|
|
317
325
|
type: 'string',
|
|
318
|
-
displayOptions: { show: { resource: ['webhookSubscription'], operation: ['
|
|
326
|
+
displayOptions: { show: { resource: ['webhookSubscription'], operation: ['getOne', 'update', 'delete'] } },
|
|
319
327
|
default: '',
|
|
320
328
|
description: 'The ID of the webhook subscription',
|
|
321
329
|
},
|
|
@@ -323,7 +331,7 @@ class Linq {
|
|
|
323
331
|
displayName: 'Webhook URL',
|
|
324
332
|
name: 'webhookUrl',
|
|
325
333
|
type: 'string',
|
|
326
|
-
displayOptions: { show: { resource: ['webhookSubscription'], operation: ['
|
|
334
|
+
displayOptions: { show: { resource: ['webhookSubscription'], operation: ['create', 'update'] } },
|
|
327
335
|
default: '',
|
|
328
336
|
description: 'The URL for the webhook',
|
|
329
337
|
},
|
|
@@ -331,7 +339,7 @@ class Linq {
|
|
|
331
339
|
displayName: 'Events',
|
|
332
340
|
name: 'events',
|
|
333
341
|
type: 'string',
|
|
334
|
-
displayOptions: { show: { resource: ['webhookSubscription'], operation: ['
|
|
342
|
+
displayOptions: { show: { resource: ['webhookSubscription'], operation: ['create', 'update'] } },
|
|
335
343
|
default: '',
|
|
336
344
|
description: 'Comma-separated list of events',
|
|
337
345
|
},
|
|
@@ -339,7 +347,7 @@ class Linq {
|
|
|
339
347
|
displayName: 'Version',
|
|
340
348
|
name: 'version',
|
|
341
349
|
type: 'number',
|
|
342
|
-
displayOptions: { show: { resource: ['webhookSubscription'], operation: ['
|
|
350
|
+
displayOptions: { show: { resource: ['webhookSubscription'], operation: ['create', 'update'] } },
|
|
343
351
|
default: 2,
|
|
344
352
|
description: 'The version of the webhook',
|
|
345
353
|
},
|
|
@@ -347,7 +355,7 @@ class Linq {
|
|
|
347
355
|
displayName: 'Active',
|
|
348
356
|
name: 'active',
|
|
349
357
|
type: 'boolean',
|
|
350
|
-
displayOptions: { show: { resource: ['webhookSubscription'], operation: ['
|
|
358
|
+
displayOptions: { show: { resource: ['webhookSubscription'], operation: ['create', 'update'] } },
|
|
351
359
|
default: true,
|
|
352
360
|
description: 'Whether the webhook is active',
|
|
353
361
|
},
|
|
@@ -356,7 +364,7 @@ class Linq {
|
|
|
356
364
|
displayName: 'Contact ID',
|
|
357
365
|
name: 'contactId',
|
|
358
366
|
type: 'string',
|
|
359
|
-
displayOptions: { show: { resource: ['contact'], operation: ['
|
|
367
|
+
displayOptions: { show: { resource: ['contact'], operation: ['getOne', 'update', 'delete'] } },
|
|
360
368
|
default: '',
|
|
361
369
|
description: 'The ID of the contact',
|
|
362
370
|
},
|
|
@@ -364,7 +372,7 @@ class Linq {
|
|
|
364
372
|
displayName: 'First Name',
|
|
365
373
|
name: 'firstName',
|
|
366
374
|
type: 'string',
|
|
367
|
-
displayOptions: { show: { resource: ['contact'], operation: ['
|
|
375
|
+
displayOptions: { show: { resource: ['contact'], operation: ['create', 'update'] } },
|
|
368
376
|
default: '',
|
|
369
377
|
description: 'The first name of the contact',
|
|
370
378
|
},
|
|
@@ -372,7 +380,7 @@ class Linq {
|
|
|
372
380
|
displayName: 'Last Name',
|
|
373
381
|
name: 'lastName',
|
|
374
382
|
type: 'string',
|
|
375
|
-
displayOptions: { show: { resource: ['contact'], operation: ['
|
|
383
|
+
displayOptions: { show: { resource: ['contact'], operation: ['create', 'update'] } },
|
|
376
384
|
default: '',
|
|
377
385
|
description: 'The last name of the contact',
|
|
378
386
|
},
|
|
@@ -380,7 +388,7 @@ class Linq {
|
|
|
380
388
|
displayName: 'Email',
|
|
381
389
|
name: 'email',
|
|
382
390
|
type: 'string',
|
|
383
|
-
displayOptions: { show: { resource: ['contact'], operation: ['
|
|
391
|
+
displayOptions: { show: { resource: ['contact'], operation: ['create', 'update'] } },
|
|
384
392
|
default: '',
|
|
385
393
|
placeholder: 'name@email.com',
|
|
386
394
|
description: 'The email of the contact',
|
|
@@ -389,7 +397,7 @@ class Linq {
|
|
|
389
397
|
displayName: 'Phone Number',
|
|
390
398
|
name: 'phoneNumber',
|
|
391
399
|
type: 'string',
|
|
392
|
-
displayOptions: { show: { resource: ['contact'], operation: ['
|
|
400
|
+
displayOptions: { show: { resource: ['contact'], operation: ['create', 'update'] } },
|
|
393
401
|
default: '',
|
|
394
402
|
description: 'The phone number of the contact',
|
|
395
403
|
},
|
|
@@ -397,7 +405,7 @@ class Linq {
|
|
|
397
405
|
displayName: 'Company',
|
|
398
406
|
name: 'company',
|
|
399
407
|
type: 'string',
|
|
400
|
-
displayOptions: { show: { resource: ['contact'], operation: ['
|
|
408
|
+
displayOptions: { show: { resource: ['contact'], operation: ['create', 'update'] } },
|
|
401
409
|
default: '',
|
|
402
410
|
description: 'The company of the contact',
|
|
403
411
|
},
|
|
@@ -405,7 +413,7 @@ class Linq {
|
|
|
405
413
|
displayName: 'Title',
|
|
406
414
|
name: 'title',
|
|
407
415
|
type: 'string',
|
|
408
|
-
displayOptions: { show: { resource: ['contact'], operation: ['
|
|
416
|
+
displayOptions: { show: { resource: ['contact'], operation: ['create', 'update'] } },
|
|
409
417
|
default: '',
|
|
410
418
|
description: 'The title of the contact',
|
|
411
419
|
},
|
|
@@ -413,7 +421,7 @@ class Linq {
|
|
|
413
421
|
displayName: 'Location',
|
|
414
422
|
name: 'location',
|
|
415
423
|
type: 'string',
|
|
416
|
-
displayOptions: { show: { resource: ['contact'], operation: ['
|
|
424
|
+
displayOptions: { show: { resource: ['contact'], operation: ['create', 'update'] } },
|
|
417
425
|
default: '',
|
|
418
426
|
description: 'The location of the contact',
|
|
419
427
|
},
|
|
@@ -432,7 +440,7 @@ class Linq {
|
|
|
432
440
|
try {
|
|
433
441
|
// Chat operations
|
|
434
442
|
if (resource === 'chat') {
|
|
435
|
-
if (operation === '
|
|
443
|
+
if (operation === 'getAll') {
|
|
436
444
|
const phoneNumber = this.getNodeParameter('phoneNumber', i, '');
|
|
437
445
|
const page = this.getNodeParameter('page', i, 1);
|
|
438
446
|
const perPage = this.getNodeParameter('perPage', i, 25);
|
|
@@ -447,7 +455,7 @@ class Linq {
|
|
|
447
455
|
json: true,
|
|
448
456
|
});
|
|
449
457
|
}
|
|
450
|
-
if (operation === '
|
|
458
|
+
if (operation === 'getOne') {
|
|
451
459
|
const chatId = this.getNodeParameter('chatId', i);
|
|
452
460
|
responseData = await this.helpers.request({
|
|
453
461
|
method: 'GET',
|
|
@@ -456,11 +464,13 @@ class Linq {
|
|
|
456
464
|
json: true,
|
|
457
465
|
});
|
|
458
466
|
}
|
|
459
|
-
if (operation === '
|
|
460
|
-
const
|
|
467
|
+
if (operation === 'find') {
|
|
468
|
+
const phoneNumbers = this.getNodeParameter('phoneNumbers', i, '');
|
|
461
469
|
const qs = {};
|
|
462
|
-
if (
|
|
463
|
-
|
|
470
|
+
if (phoneNumbers) {
|
|
471
|
+
// Convert comma-separated string to array for phone_numbers[] parameter
|
|
472
|
+
qs['phone_numbers[]'] = phoneNumbers.split(',').map(p => p.trim());
|
|
473
|
+
}
|
|
464
474
|
responseData = await this.helpers.request({
|
|
465
475
|
method: 'GET',
|
|
466
476
|
url: 'https://api.linqapp.com/api/partner/v2/chats/find',
|
|
@@ -469,7 +479,7 @@ class Linq {
|
|
|
469
479
|
json: true,
|
|
470
480
|
});
|
|
471
481
|
}
|
|
472
|
-
if (operation === '
|
|
482
|
+
if (operation === 'create') {
|
|
473
483
|
const sendFrom = this.getNodeParameter('sendFrom', i);
|
|
474
484
|
const displayName = this.getNodeParameter('displayName', i);
|
|
475
485
|
const phoneNumbers = this.getNodeParameter('phoneNumbers', i);
|
|
@@ -499,7 +509,7 @@ class Linq {
|
|
|
499
509
|
json: true,
|
|
500
510
|
});
|
|
501
511
|
}
|
|
502
|
-
if (operation === '
|
|
512
|
+
if (operation === 'shareContact') {
|
|
503
513
|
responseData = await this.helpers.request({
|
|
504
514
|
method: 'POST',
|
|
505
515
|
url: 'https://api.linqapp.com/api/partner/v2/chats/share-contact',
|
|
@@ -513,7 +523,7 @@ class Linq {
|
|
|
513
523
|
}
|
|
514
524
|
// Chat Message operations
|
|
515
525
|
if (resource === 'chatMessage') {
|
|
516
|
-
if (operation === '
|
|
526
|
+
if (operation === 'getAll') {
|
|
517
527
|
const chatId = this.getNodeParameter('chatId', i);
|
|
518
528
|
responseData = await this.helpers.request({
|
|
519
529
|
method: 'GET',
|
|
@@ -523,7 +533,7 @@ class Linq {
|
|
|
523
533
|
json: true,
|
|
524
534
|
});
|
|
525
535
|
}
|
|
526
|
-
if (operation === '
|
|
536
|
+
if (operation === 'getOne') {
|
|
527
537
|
const chatMessageId = this.getNodeParameter('chatMessageId', i);
|
|
528
538
|
responseData = await this.helpers.request({
|
|
529
539
|
method: 'GET',
|
|
@@ -532,7 +542,7 @@ class Linq {
|
|
|
532
542
|
json: true,
|
|
533
543
|
});
|
|
534
544
|
}
|
|
535
|
-
if (operation === '
|
|
545
|
+
if (operation === 'create') {
|
|
536
546
|
const chatId = this.getNodeParameter('chatId', i);
|
|
537
547
|
const messageText = this.getNodeParameter('messageText', i);
|
|
538
548
|
const body = {
|
|
@@ -550,7 +560,7 @@ class Linq {
|
|
|
550
560
|
json: true,
|
|
551
561
|
});
|
|
552
562
|
}
|
|
553
|
-
if (operation === '
|
|
563
|
+
if (operation === 'delete') {
|
|
554
564
|
const chatMessageId = this.getNodeParameter('chatMessageId', i);
|
|
555
565
|
responseData = await this.helpers.request({
|
|
556
566
|
method: 'DELETE',
|
|
@@ -559,7 +569,7 @@ class Linq {
|
|
|
559
569
|
json: true,
|
|
560
570
|
});
|
|
561
571
|
}
|
|
562
|
-
if (operation === '
|
|
572
|
+
if (operation === 'edit') {
|
|
563
573
|
const chatMessageId = this.getNodeParameter('chatMessageId', i);
|
|
564
574
|
const messageText = this.getNodeParameter('messageText', i);
|
|
565
575
|
const body = {
|
|
@@ -576,7 +586,7 @@ class Linq {
|
|
|
576
586
|
json: true,
|
|
577
587
|
});
|
|
578
588
|
}
|
|
579
|
-
if (operation === '
|
|
589
|
+
if (operation === 'react') {
|
|
580
590
|
const chatMessageId = this.getNodeParameter('chatMessageId', i);
|
|
581
591
|
const reaction = this.getNodeParameter('reaction', i);
|
|
582
592
|
const body = {
|
|
@@ -593,7 +603,7 @@ class Linq {
|
|
|
593
603
|
json: true,
|
|
594
604
|
});
|
|
595
605
|
}
|
|
596
|
-
if (operation === '
|
|
606
|
+
if (operation === 'getReaction') {
|
|
597
607
|
const chatMessageId = this.getNodeParameter('chatMessageId', i);
|
|
598
608
|
responseData = await this.helpers.request({
|
|
599
609
|
method: 'GET',
|
|
@@ -605,7 +615,7 @@ class Linq {
|
|
|
605
615
|
}
|
|
606
616
|
// Phone Number operations
|
|
607
617
|
if (resource === 'phoneNumber') {
|
|
608
|
-
if (operation === '
|
|
618
|
+
if (operation === 'getAll') {
|
|
609
619
|
responseData = await this.helpers.request({
|
|
610
620
|
method: 'GET',
|
|
611
621
|
url: 'https://api.linqapp.com/api/partner/v2/phone_numbers',
|
|
@@ -613,7 +623,7 @@ class Linq {
|
|
|
613
623
|
json: true,
|
|
614
624
|
});
|
|
615
625
|
}
|
|
616
|
-
if (operation === '
|
|
626
|
+
if (operation === 'checkIMessageAvailability') {
|
|
617
627
|
const phoneNumber = this.getNodeParameter('phoneNumber', i);
|
|
618
628
|
const body = {
|
|
619
629
|
phone_number: phoneNumber
|
|
@@ -632,7 +642,7 @@ class Linq {
|
|
|
632
642
|
}
|
|
633
643
|
// Webhook Subscription operations
|
|
634
644
|
if (resource === 'webhookSubscription') {
|
|
635
|
-
if (operation === '
|
|
645
|
+
if (operation === 'getAll') {
|
|
636
646
|
responseData = await this.helpers.request({
|
|
637
647
|
method: 'GET',
|
|
638
648
|
url: 'https://api.linqapp.com/api/partner/v2/webhook_subscriptions',
|
|
@@ -640,7 +650,7 @@ class Linq {
|
|
|
640
650
|
json: true,
|
|
641
651
|
});
|
|
642
652
|
}
|
|
643
|
-
if (operation === '
|
|
653
|
+
if (operation === 'getOne') {
|
|
644
654
|
const webhookSubscriptionId = this.getNodeParameter('webhookSubscriptionId', i);
|
|
645
655
|
responseData = await this.helpers.request({
|
|
646
656
|
method: 'GET',
|
|
@@ -649,7 +659,7 @@ class Linq {
|
|
|
649
659
|
json: true,
|
|
650
660
|
});
|
|
651
661
|
}
|
|
652
|
-
if (operation === '
|
|
662
|
+
if (operation === 'create') {
|
|
653
663
|
const webhookUrl = this.getNodeParameter('webhookUrl', i);
|
|
654
664
|
const events = this.getNodeParameter('events', i);
|
|
655
665
|
const version = this.getNodeParameter('version', i);
|
|
@@ -673,7 +683,7 @@ class Linq {
|
|
|
673
683
|
json: true,
|
|
674
684
|
});
|
|
675
685
|
}
|
|
676
|
-
if (operation === '
|
|
686
|
+
if (operation === 'update') {
|
|
677
687
|
const webhookSubscriptionId = this.getNodeParameter('webhookSubscriptionId', i);
|
|
678
688
|
const webhookUrl = this.getNodeParameter('webhookUrl', i);
|
|
679
689
|
const events = this.getNodeParameter('events', i);
|
|
@@ -700,7 +710,7 @@ class Linq {
|
|
|
700
710
|
json: true,
|
|
701
711
|
});
|
|
702
712
|
}
|
|
703
|
-
if (operation === '
|
|
713
|
+
if (operation === 'delete') {
|
|
704
714
|
const webhookSubscriptionId = this.getNodeParameter('webhookSubscriptionId', i);
|
|
705
715
|
responseData = await this.helpers.request({
|
|
706
716
|
method: 'DELETE',
|
|
@@ -712,7 +722,7 @@ class Linq {
|
|
|
712
722
|
}
|
|
713
723
|
// Contact operations
|
|
714
724
|
if (resource === 'contact') {
|
|
715
|
-
if (operation === '
|
|
725
|
+
if (operation === 'create') {
|
|
716
726
|
const firstName = this.getNodeParameter('firstName', i);
|
|
717
727
|
const lastName = this.getNodeParameter('lastName', i);
|
|
718
728
|
const email = this.getNodeParameter('email', i);
|
|
@@ -748,7 +758,7 @@ class Linq {
|
|
|
748
758
|
json: true,
|
|
749
759
|
});
|
|
750
760
|
}
|
|
751
|
-
if (operation === '
|
|
761
|
+
if (operation === 'getOne') {
|
|
752
762
|
const contactId = this.getNodeParameter('contactId', i);
|
|
753
763
|
responseData = await this.helpers.request({
|
|
754
764
|
method: 'GET',
|
|
@@ -757,7 +767,7 @@ class Linq {
|
|
|
757
767
|
json: true,
|
|
758
768
|
});
|
|
759
769
|
}
|
|
760
|
-
if (operation === '
|
|
770
|
+
if (operation === 'update') {
|
|
761
771
|
const contactId = this.getNodeParameter('contactId', i);
|
|
762
772
|
const firstName = this.getNodeParameter('firstName', i);
|
|
763
773
|
const lastName = this.getNodeParameter('lastName', i);
|
|
@@ -794,7 +804,7 @@ class Linq {
|
|
|
794
804
|
json: true,
|
|
795
805
|
});
|
|
796
806
|
}
|
|
797
|
-
if (operation === '
|
|
807
|
+
if (operation === 'delete') {
|
|
798
808
|
const contactId = this.getNodeParameter('contactId', i);
|
|
799
809
|
responseData = await this.helpers.request({
|
|
800
810
|
method: 'DELETE',
|