n8n-nodes-linq 0.1.7 → 0.1.8
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 +165 -165
- 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,7 +215,7 @@ 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', 'find'] } },
|
|
219
219
|
default: '',
|
|
220
220
|
description: 'Filter chats by phone number',
|
|
221
221
|
},
|
|
@@ -223,7 +223,7 @@ class Linq {
|
|
|
223
223
|
displayName: 'Page',
|
|
224
224
|
name: 'page',
|
|
225
225
|
type: 'number',
|
|
226
|
-
displayOptions: { show: { resource: ['chat'], operation: ['
|
|
226
|
+
displayOptions: { show: { resource: ['chat'], operation: ['getAll'] } },
|
|
227
227
|
default: 1,
|
|
228
228
|
description: 'Page number for pagination',
|
|
229
229
|
},
|
|
@@ -231,7 +231,7 @@ class Linq {
|
|
|
231
231
|
displayName: 'Per Page',
|
|
232
232
|
name: 'perPage',
|
|
233
233
|
type: 'number',
|
|
234
|
-
displayOptions: { show: { resource: ['chat'], operation: ['
|
|
234
|
+
displayOptions: { show: { resource: ['chat'], operation: ['getAll'] } },
|
|
235
235
|
default: 25,
|
|
236
236
|
description: 'Number of items per page',
|
|
237
237
|
},
|
|
@@ -240,7 +240,7 @@ class Linq {
|
|
|
240
240
|
displayName: 'Send From',
|
|
241
241
|
name: 'sendFrom',
|
|
242
242
|
type: 'string',
|
|
243
|
-
displayOptions: { show: { resource: ['chat'], operation: ['
|
|
243
|
+
displayOptions: { show: { resource: ['chat'], operation: ['create'] } },
|
|
244
244
|
default: '',
|
|
245
245
|
description: 'The phone number to send from',
|
|
246
246
|
},
|
|
@@ -248,7 +248,7 @@ class Linq {
|
|
|
248
248
|
displayName: 'Display Name',
|
|
249
249
|
name: 'displayName',
|
|
250
250
|
type: 'string',
|
|
251
|
-
displayOptions: { show: { resource: ['chat'], operation: ['
|
|
251
|
+
displayOptions: { show: { resource: ['chat'], operation: ['create'] } },
|
|
252
252
|
default: '',
|
|
253
253
|
description: 'The display name for the chat',
|
|
254
254
|
},
|
|
@@ -256,7 +256,7 @@ class Linq {
|
|
|
256
256
|
displayName: 'Phone Numbers',
|
|
257
257
|
name: 'phoneNumbers',
|
|
258
258
|
type: 'string',
|
|
259
|
-
displayOptions: { show: { resource: ['chat'], operation: ['
|
|
259
|
+
displayOptions: { show: { resource: ['chat'], operation: ['create'] } },
|
|
260
260
|
default: '',
|
|
261
261
|
description: 'Comma-separated list of phone numbers',
|
|
262
262
|
},
|
|
@@ -264,7 +264,7 @@ class Linq {
|
|
|
264
264
|
displayName: 'Message Text',
|
|
265
265
|
name: 'messageText',
|
|
266
266
|
type: 'string',
|
|
267
|
-
displayOptions: { show: { resource: ['chat'], operation: ['
|
|
267
|
+
displayOptions: { show: { resource: ['chat'], operation: ['create'] } },
|
|
268
268
|
default: '',
|
|
269
269
|
description: 'The text of the message to send',
|
|
270
270
|
},
|
|
@@ -273,7 +273,7 @@ class Linq {
|
|
|
273
273
|
displayName: 'Chat Message ID',
|
|
274
274
|
name: 'chatMessageId',
|
|
275
275
|
type: 'string',
|
|
276
|
-
displayOptions: { show: { resource: ['chatMessage'], operation: ['
|
|
276
|
+
displayOptions: { show: { resource: ['chatMessage'], operation: ['getOne', 'delete', 'edit', 'react', 'getReaction'] } },
|
|
277
277
|
default: '',
|
|
278
278
|
description: 'The ID of the chat message',
|
|
279
279
|
},
|
|
@@ -281,7 +281,7 @@ class Linq {
|
|
|
281
281
|
displayName: 'Chat ID',
|
|
282
282
|
name: 'chatId',
|
|
283
283
|
type: 'string',
|
|
284
|
-
displayOptions: { show: { resource: ['chatMessage'], operation: ['
|
|
284
|
+
displayOptions: { show: { resource: ['chatMessage'], operation: ['getAll', 'create'] } },
|
|
285
285
|
default: '',
|
|
286
286
|
description: 'The ID of the chat',
|
|
287
287
|
},
|
|
@@ -289,7 +289,7 @@ class Linq {
|
|
|
289
289
|
displayName: 'Message Text',
|
|
290
290
|
name: 'messageText',
|
|
291
291
|
type: 'string',
|
|
292
|
-
displayOptions: { show: { resource: ['chatMessage'], operation: ['
|
|
292
|
+
displayOptions: { show: { resource: ['chatMessage'], operation: ['create', 'edit'] } },
|
|
293
293
|
default: '',
|
|
294
294
|
description: 'The text of the message',
|
|
295
295
|
},
|
|
@@ -297,7 +297,7 @@ class Linq {
|
|
|
297
297
|
displayName: 'Reaction',
|
|
298
298
|
name: 'reaction',
|
|
299
299
|
type: 'string',
|
|
300
|
-
displayOptions: { show: { resource: ['chatMessage'], operation: ['
|
|
300
|
+
displayOptions: { show: { resource: ['chatMessage'], operation: ['react'] } },
|
|
301
301
|
default: '',
|
|
302
302
|
description: 'The reaction to add',
|
|
303
303
|
},
|
|
@@ -306,7 +306,7 @@ class Linq {
|
|
|
306
306
|
displayName: 'Phone Number',
|
|
307
307
|
name: 'phoneNumber',
|
|
308
308
|
type: 'string',
|
|
309
|
-
displayOptions: { show: { resource: ['phoneNumber'], operation: ['
|
|
309
|
+
displayOptions: { show: { resource: ['phoneNumber'], operation: ['checkIMessageAvailability'] } },
|
|
310
310
|
default: '',
|
|
311
311
|
description: 'The phone number to check',
|
|
312
312
|
},
|
|
@@ -315,7 +315,7 @@ class Linq {
|
|
|
315
315
|
displayName: 'Webhook Subscription ID',
|
|
316
316
|
name: 'webhookSubscriptionId',
|
|
317
317
|
type: 'string',
|
|
318
|
-
displayOptions: { show: { resource: ['webhookSubscription'], operation: ['
|
|
318
|
+
displayOptions: { show: { resource: ['webhookSubscription'], operation: ['getOne', 'update', 'delete'] } },
|
|
319
319
|
default: '',
|
|
320
320
|
description: 'The ID of the webhook subscription',
|
|
321
321
|
},
|
|
@@ -323,7 +323,7 @@ class Linq {
|
|
|
323
323
|
displayName: 'Webhook URL',
|
|
324
324
|
name: 'webhookUrl',
|
|
325
325
|
type: 'string',
|
|
326
|
-
displayOptions: { show: { resource: ['webhookSubscription'], operation: ['
|
|
326
|
+
displayOptions: { show: { resource: ['webhookSubscription'], operation: ['create', 'update'] } },
|
|
327
327
|
default: '',
|
|
328
328
|
description: 'The URL for the webhook',
|
|
329
329
|
},
|
|
@@ -331,7 +331,7 @@ class Linq {
|
|
|
331
331
|
displayName: 'Events',
|
|
332
332
|
name: 'events',
|
|
333
333
|
type: 'string',
|
|
334
|
-
displayOptions: { show: { resource: ['webhookSubscription'], operation: ['
|
|
334
|
+
displayOptions: { show: { resource: ['webhookSubscription'], operation: ['create', 'update'] } },
|
|
335
335
|
default: '',
|
|
336
336
|
description: 'Comma-separated list of events',
|
|
337
337
|
},
|
|
@@ -339,7 +339,7 @@ class Linq {
|
|
|
339
339
|
displayName: 'Version',
|
|
340
340
|
name: 'version',
|
|
341
341
|
type: 'number',
|
|
342
|
-
displayOptions: { show: { resource: ['webhookSubscription'], operation: ['
|
|
342
|
+
displayOptions: { show: { resource: ['webhookSubscription'], operation: ['create', 'update'] } },
|
|
343
343
|
default: 2,
|
|
344
344
|
description: 'The version of the webhook',
|
|
345
345
|
},
|
|
@@ -347,7 +347,7 @@ class Linq {
|
|
|
347
347
|
displayName: 'Active',
|
|
348
348
|
name: 'active',
|
|
349
349
|
type: 'boolean',
|
|
350
|
-
displayOptions: { show: { resource: ['webhookSubscription'], operation: ['
|
|
350
|
+
displayOptions: { show: { resource: ['webhookSubscription'], operation: ['create', 'update'] } },
|
|
351
351
|
default: true,
|
|
352
352
|
description: 'Whether the webhook is active',
|
|
353
353
|
},
|
|
@@ -356,7 +356,7 @@ class Linq {
|
|
|
356
356
|
displayName: 'Contact ID',
|
|
357
357
|
name: 'contactId',
|
|
358
358
|
type: 'string',
|
|
359
|
-
displayOptions: { show: { resource: ['contact'], operation: ['
|
|
359
|
+
displayOptions: { show: { resource: ['contact'], operation: ['getOne', 'update', 'delete'] } },
|
|
360
360
|
default: '',
|
|
361
361
|
description: 'The ID of the contact',
|
|
362
362
|
},
|
|
@@ -364,7 +364,7 @@ class Linq {
|
|
|
364
364
|
displayName: 'First Name',
|
|
365
365
|
name: 'firstName',
|
|
366
366
|
type: 'string',
|
|
367
|
-
displayOptions: { show: { resource: ['contact'], operation: ['
|
|
367
|
+
displayOptions: { show: { resource: ['contact'], operation: ['create', 'update'] } },
|
|
368
368
|
default: '',
|
|
369
369
|
description: 'The first name of the contact',
|
|
370
370
|
},
|
|
@@ -372,7 +372,7 @@ class Linq {
|
|
|
372
372
|
displayName: 'Last Name',
|
|
373
373
|
name: 'lastName',
|
|
374
374
|
type: 'string',
|
|
375
|
-
displayOptions: { show: { resource: ['contact'], operation: ['
|
|
375
|
+
displayOptions: { show: { resource: ['contact'], operation: ['create', 'update'] } },
|
|
376
376
|
default: '',
|
|
377
377
|
description: 'The last name of the contact',
|
|
378
378
|
},
|
|
@@ -380,7 +380,7 @@ class Linq {
|
|
|
380
380
|
displayName: 'Email',
|
|
381
381
|
name: 'email',
|
|
382
382
|
type: 'string',
|
|
383
|
-
displayOptions: { show: { resource: ['contact'], operation: ['
|
|
383
|
+
displayOptions: { show: { resource: ['contact'], operation: ['create', 'update'] } },
|
|
384
384
|
default: '',
|
|
385
385
|
placeholder: 'name@email.com',
|
|
386
386
|
description: 'The email of the contact',
|
|
@@ -389,7 +389,7 @@ class Linq {
|
|
|
389
389
|
displayName: 'Phone Number',
|
|
390
390
|
name: 'phoneNumber',
|
|
391
391
|
type: 'string',
|
|
392
|
-
displayOptions: { show: { resource: ['contact'], operation: ['
|
|
392
|
+
displayOptions: { show: { resource: ['contact'], operation: ['create', 'update'] } },
|
|
393
393
|
default: '',
|
|
394
394
|
description: 'The phone number of the contact',
|
|
395
395
|
},
|
|
@@ -397,7 +397,7 @@ class Linq {
|
|
|
397
397
|
displayName: 'Company',
|
|
398
398
|
name: 'company',
|
|
399
399
|
type: 'string',
|
|
400
|
-
displayOptions: { show: { resource: ['contact'], operation: ['
|
|
400
|
+
displayOptions: { show: { resource: ['contact'], operation: ['create', 'update'] } },
|
|
401
401
|
default: '',
|
|
402
402
|
description: 'The company of the contact',
|
|
403
403
|
},
|
|
@@ -405,7 +405,7 @@ class Linq {
|
|
|
405
405
|
displayName: 'Title',
|
|
406
406
|
name: 'title',
|
|
407
407
|
type: 'string',
|
|
408
|
-
displayOptions: { show: { resource: ['contact'], operation: ['
|
|
408
|
+
displayOptions: { show: { resource: ['contact'], operation: ['create', 'update'] } },
|
|
409
409
|
default: '',
|
|
410
410
|
description: 'The title of the contact',
|
|
411
411
|
},
|
|
@@ -413,7 +413,7 @@ class Linq {
|
|
|
413
413
|
displayName: 'Location',
|
|
414
414
|
name: 'location',
|
|
415
415
|
type: 'string',
|
|
416
|
-
displayOptions: { show: { resource: ['contact'], operation: ['
|
|
416
|
+
displayOptions: { show: { resource: ['contact'], operation: ['create', 'update'] } },
|
|
417
417
|
default: '',
|
|
418
418
|
description: 'The location of the contact',
|
|
419
419
|
},
|
|
@@ -432,7 +432,7 @@ class Linq {
|
|
|
432
432
|
try {
|
|
433
433
|
// Chat operations
|
|
434
434
|
if (resource === 'chat') {
|
|
435
|
-
if (operation === '
|
|
435
|
+
if (operation === 'getAll') {
|
|
436
436
|
const phoneNumber = this.getNodeParameter('phoneNumber', i, '');
|
|
437
437
|
const page = this.getNodeParameter('page', i, 1);
|
|
438
438
|
const perPage = this.getNodeParameter('perPage', i, 25);
|
|
@@ -447,7 +447,7 @@ class Linq {
|
|
|
447
447
|
json: true,
|
|
448
448
|
});
|
|
449
449
|
}
|
|
450
|
-
if (operation === '
|
|
450
|
+
if (operation === 'getOne') {
|
|
451
451
|
const chatId = this.getNodeParameter('chatId', i);
|
|
452
452
|
responseData = await this.helpers.request({
|
|
453
453
|
method: 'GET',
|
|
@@ -456,7 +456,7 @@ class Linq {
|
|
|
456
456
|
json: true,
|
|
457
457
|
});
|
|
458
458
|
}
|
|
459
|
-
if (operation === '
|
|
459
|
+
if (operation === 'find') {
|
|
460
460
|
const phoneNumber = this.getNodeParameter('phoneNumber', i, '');
|
|
461
461
|
const qs = {};
|
|
462
462
|
if (phoneNumber)
|
|
@@ -469,7 +469,7 @@ class Linq {
|
|
|
469
469
|
json: true,
|
|
470
470
|
});
|
|
471
471
|
}
|
|
472
|
-
if (operation === '
|
|
472
|
+
if (operation === 'create') {
|
|
473
473
|
const sendFrom = this.getNodeParameter('sendFrom', i);
|
|
474
474
|
const displayName = this.getNodeParameter('displayName', i);
|
|
475
475
|
const phoneNumbers = this.getNodeParameter('phoneNumbers', i);
|
|
@@ -499,7 +499,7 @@ class Linq {
|
|
|
499
499
|
json: true,
|
|
500
500
|
});
|
|
501
501
|
}
|
|
502
|
-
if (operation === '
|
|
502
|
+
if (operation === 'shareContact') {
|
|
503
503
|
responseData = await this.helpers.request({
|
|
504
504
|
method: 'POST',
|
|
505
505
|
url: 'https://api.linqapp.com/api/partner/v2/chats/share-contact',
|
|
@@ -513,7 +513,7 @@ class Linq {
|
|
|
513
513
|
}
|
|
514
514
|
// Chat Message operations
|
|
515
515
|
if (resource === 'chatMessage') {
|
|
516
|
-
if (operation === '
|
|
516
|
+
if (operation === 'getAll') {
|
|
517
517
|
const chatId = this.getNodeParameter('chatId', i);
|
|
518
518
|
responseData = await this.helpers.request({
|
|
519
519
|
method: 'GET',
|
|
@@ -523,7 +523,7 @@ class Linq {
|
|
|
523
523
|
json: true,
|
|
524
524
|
});
|
|
525
525
|
}
|
|
526
|
-
if (operation === '
|
|
526
|
+
if (operation === 'getOne') {
|
|
527
527
|
const chatMessageId = this.getNodeParameter('chatMessageId', i);
|
|
528
528
|
responseData = await this.helpers.request({
|
|
529
529
|
method: 'GET',
|
|
@@ -532,7 +532,7 @@ class Linq {
|
|
|
532
532
|
json: true,
|
|
533
533
|
});
|
|
534
534
|
}
|
|
535
|
-
if (operation === '
|
|
535
|
+
if (operation === 'create') {
|
|
536
536
|
const chatId = this.getNodeParameter('chatId', i);
|
|
537
537
|
const messageText = this.getNodeParameter('messageText', i);
|
|
538
538
|
const body = {
|
|
@@ -550,7 +550,7 @@ class Linq {
|
|
|
550
550
|
json: true,
|
|
551
551
|
});
|
|
552
552
|
}
|
|
553
|
-
if (operation === '
|
|
553
|
+
if (operation === 'delete') {
|
|
554
554
|
const chatMessageId = this.getNodeParameter('chatMessageId', i);
|
|
555
555
|
responseData = await this.helpers.request({
|
|
556
556
|
method: 'DELETE',
|
|
@@ -559,7 +559,7 @@ class Linq {
|
|
|
559
559
|
json: true,
|
|
560
560
|
});
|
|
561
561
|
}
|
|
562
|
-
if (operation === '
|
|
562
|
+
if (operation === 'edit') {
|
|
563
563
|
const chatMessageId = this.getNodeParameter('chatMessageId', i);
|
|
564
564
|
const messageText = this.getNodeParameter('messageText', i);
|
|
565
565
|
const body = {
|
|
@@ -576,7 +576,7 @@ class Linq {
|
|
|
576
576
|
json: true,
|
|
577
577
|
});
|
|
578
578
|
}
|
|
579
|
-
if (operation === '
|
|
579
|
+
if (operation === 'react') {
|
|
580
580
|
const chatMessageId = this.getNodeParameter('chatMessageId', i);
|
|
581
581
|
const reaction = this.getNodeParameter('reaction', i);
|
|
582
582
|
const body = {
|
|
@@ -593,7 +593,7 @@ class Linq {
|
|
|
593
593
|
json: true,
|
|
594
594
|
});
|
|
595
595
|
}
|
|
596
|
-
if (operation === '
|
|
596
|
+
if (operation === 'getReaction') {
|
|
597
597
|
const chatMessageId = this.getNodeParameter('chatMessageId', i);
|
|
598
598
|
responseData = await this.helpers.request({
|
|
599
599
|
method: 'GET',
|
|
@@ -605,7 +605,7 @@ class Linq {
|
|
|
605
605
|
}
|
|
606
606
|
// Phone Number operations
|
|
607
607
|
if (resource === 'phoneNumber') {
|
|
608
|
-
if (operation === '
|
|
608
|
+
if (operation === 'getAll') {
|
|
609
609
|
responseData = await this.helpers.request({
|
|
610
610
|
method: 'GET',
|
|
611
611
|
url: 'https://api.linqapp.com/api/partner/v2/phone_numbers',
|
|
@@ -613,7 +613,7 @@ class Linq {
|
|
|
613
613
|
json: true,
|
|
614
614
|
});
|
|
615
615
|
}
|
|
616
|
-
if (operation === '
|
|
616
|
+
if (operation === 'checkIMessageAvailability') {
|
|
617
617
|
const phoneNumber = this.getNodeParameter('phoneNumber', i);
|
|
618
618
|
const body = {
|
|
619
619
|
phone_number: phoneNumber
|
|
@@ -632,7 +632,7 @@ class Linq {
|
|
|
632
632
|
}
|
|
633
633
|
// Webhook Subscription operations
|
|
634
634
|
if (resource === 'webhookSubscription') {
|
|
635
|
-
if (operation === '
|
|
635
|
+
if (operation === 'getAll') {
|
|
636
636
|
responseData = await this.helpers.request({
|
|
637
637
|
method: 'GET',
|
|
638
638
|
url: 'https://api.linqapp.com/api/partner/v2/webhook_subscriptions',
|
|
@@ -640,7 +640,7 @@ class Linq {
|
|
|
640
640
|
json: true,
|
|
641
641
|
});
|
|
642
642
|
}
|
|
643
|
-
if (operation === '
|
|
643
|
+
if (operation === 'getOne') {
|
|
644
644
|
const webhookSubscriptionId = this.getNodeParameter('webhookSubscriptionId', i);
|
|
645
645
|
responseData = await this.helpers.request({
|
|
646
646
|
method: 'GET',
|
|
@@ -649,7 +649,7 @@ class Linq {
|
|
|
649
649
|
json: true,
|
|
650
650
|
});
|
|
651
651
|
}
|
|
652
|
-
if (operation === '
|
|
652
|
+
if (operation === 'create') {
|
|
653
653
|
const webhookUrl = this.getNodeParameter('webhookUrl', i);
|
|
654
654
|
const events = this.getNodeParameter('events', i);
|
|
655
655
|
const version = this.getNodeParameter('version', i);
|
|
@@ -673,7 +673,7 @@ class Linq {
|
|
|
673
673
|
json: true,
|
|
674
674
|
});
|
|
675
675
|
}
|
|
676
|
-
if (operation === '
|
|
676
|
+
if (operation === 'update') {
|
|
677
677
|
const webhookSubscriptionId = this.getNodeParameter('webhookSubscriptionId', i);
|
|
678
678
|
const webhookUrl = this.getNodeParameter('webhookUrl', i);
|
|
679
679
|
const events = this.getNodeParameter('events', i);
|
|
@@ -700,7 +700,7 @@ class Linq {
|
|
|
700
700
|
json: true,
|
|
701
701
|
});
|
|
702
702
|
}
|
|
703
|
-
if (operation === '
|
|
703
|
+
if (operation === 'delete') {
|
|
704
704
|
const webhookSubscriptionId = this.getNodeParameter('webhookSubscriptionId', i);
|
|
705
705
|
responseData = await this.helpers.request({
|
|
706
706
|
method: 'DELETE',
|
|
@@ -712,7 +712,7 @@ class Linq {
|
|
|
712
712
|
}
|
|
713
713
|
// Contact operations
|
|
714
714
|
if (resource === 'contact') {
|
|
715
|
-
if (operation === '
|
|
715
|
+
if (operation === 'create') {
|
|
716
716
|
const firstName = this.getNodeParameter('firstName', i);
|
|
717
717
|
const lastName = this.getNodeParameter('lastName', i);
|
|
718
718
|
const email = this.getNodeParameter('email', i);
|
|
@@ -748,7 +748,7 @@ class Linq {
|
|
|
748
748
|
json: true,
|
|
749
749
|
});
|
|
750
750
|
}
|
|
751
|
-
if (operation === '
|
|
751
|
+
if (operation === 'getOne') {
|
|
752
752
|
const contactId = this.getNodeParameter('contactId', i);
|
|
753
753
|
responseData = await this.helpers.request({
|
|
754
754
|
method: 'GET',
|
|
@@ -757,7 +757,7 @@ class Linq {
|
|
|
757
757
|
json: true,
|
|
758
758
|
});
|
|
759
759
|
}
|
|
760
|
-
if (operation === '
|
|
760
|
+
if (operation === 'update') {
|
|
761
761
|
const contactId = this.getNodeParameter('contactId', i);
|
|
762
762
|
const firstName = this.getNodeParameter('firstName', i);
|
|
763
763
|
const lastName = this.getNodeParameter('lastName', i);
|
|
@@ -794,7 +794,7 @@ class Linq {
|
|
|
794
794
|
json: true,
|
|
795
795
|
});
|
|
796
796
|
}
|
|
797
|
-
if (operation === '
|
|
797
|
+
if (operation === 'delete') {
|
|
798
798
|
const contactId = this.getNodeParameter('contactId', i);
|
|
799
799
|
responseData = await this.helpers.request({
|
|
800
800
|
method: 'DELETE',
|