n8n-nodes-sendit 1.2.1 → 1.3.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.
@@ -41,27 +41,27 @@ class SendIt {
41
41
  noDataExpression: true,
42
42
  options: [
43
43
  { name: 'Post', value: 'post' },
44
- { name: 'AI', value: 'ai' },
45
- { name: 'Media', value: 'media' },
46
44
  { name: 'Scheduled Post', value: 'scheduledPost' },
47
- { name: 'Account', value: 'account' },
48
- { name: 'Validation', value: 'validation' },
49
- { name: 'Analytics', value: 'analytics' },
50
- { name: 'Brand Voice', value: 'brandVoice' },
51
- { name: 'Campaign', value: 'campaign' },
52
- { name: 'Inbox', value: 'inbox' },
53
- { name: 'Listening', value: 'listening' },
45
+ { name: 'Media', value: 'media' },
46
+ { name: 'AI', value: 'ai' },
54
47
  { name: 'AI Media', value: 'aiMedia' },
55
- { name: 'Meta', value: 'meta' },
56
48
  { name: 'Content Score', value: 'contentScore' },
49
+ { name: 'Inbox', value: 'inbox' },
50
+ { name: 'Listening', value: 'listening' },
51
+ { name: 'Account', value: 'account' },
57
52
  { name: 'Library', value: 'library' },
53
+ { name: 'Brand Voice', value: 'brandVoice' },
54
+ { name: 'Campaign', value: 'campaign' },
58
55
  { name: 'Approvals', value: 'approvals' },
59
- { name: 'Bulk Schedule', value: 'bulkSchedule' },
60
- { name: 'Connect', value: 'connect' },
56
+ { name: 'Analytics', value: 'analytics' },
57
+ { name: 'Validation', value: 'validation' },
58
+ { name: 'Conversions', value: 'conversions' },
61
59
  { name: 'Webhooks', value: 'webhooks' },
62
60
  { name: 'Dead Letter', value: 'deadLetter' },
63
61
  { name: 'Audit Log', value: 'auditLog' },
64
- { name: 'Conversions', value: 'conversions' },
62
+ { name: 'Bulk Schedule', value: 'bulkSchedule' },
63
+ { name: 'Connect', value: 'connect' },
64
+ { name: 'Meta', value: 'meta' },
65
65
  { name: 'Advanced', value: 'advanced' },
66
66
  ],
67
67
  default: 'post',
@@ -80,6 +80,41 @@ class SendIt {
80
80
  default: '',
81
81
  description: 'Optional idempotency key. Sent as Idempotency-Key header when provided',
82
82
  },
83
+ {
84
+ displayName: 'Publishing operations are rate-limited to 50 requests per minute per API key.',
85
+ name: 'publishRateNotice',
86
+ type: 'notice',
87
+ default: '',
88
+ displayOptions: { show: { resource: ['post'], operation: ['publish', 'publishAi'] } },
89
+ },
90
+ {
91
+ displayName: 'AI content generation may take 5–15 seconds depending on prompt complexity.',
92
+ name: 'aiGenerateNotice',
93
+ type: 'notice',
94
+ default: '',
95
+ displayOptions: { show: { resource: ['ai'], operation: ['generate'] } },
96
+ },
97
+ {
98
+ displayName: 'AI Media generation is asynchronous. This returns a job ID — use Get Status to poll for completion.',
99
+ name: 'aiMediaAsyncNotice',
100
+ type: 'notice',
101
+ default: '',
102
+ displayOptions: { show: { resource: ['aiMedia'], operation: ['create'] } },
103
+ },
104
+ {
105
+ displayName: 'Campaign planning uses AI and may take 15–30 seconds for larger campaigns.',
106
+ name: 'campaignPlanNotice',
107
+ type: 'notice',
108
+ default: '',
109
+ displayOptions: { show: { resource: ['campaign'], operation: ['plan'] } },
110
+ },
111
+ {
112
+ displayName: 'Requeued posts will be retried with exponential backoff to the original target platforms.',
113
+ name: 'deadLetterRequeueNotice',
114
+ type: 'notice',
115
+ default: '',
116
+ displayOptions: { show: { resource: ['deadLetter'], operation: ['requeue'] } },
117
+ },
83
118
  // ===== Operations by resource =====
84
119
  {
85
120
  displayName: 'Operation',
@@ -88,8 +123,18 @@ class SendIt {
88
123
  noDataExpression: true,
89
124
  displayOptions: { show: { resource: ['post'] } },
90
125
  options: [
91
- { name: 'Publish', value: 'publish', description: 'Publish content to social media platforms immediately', action: 'Publish a post' },
92
- { name: 'Publish with AI', value: 'publishAi', description: 'Generate content with AI and publish to platforms', action: 'Publish with AI-generated content' },
126
+ {
127
+ name: 'Publish',
128
+ value: 'publish',
129
+ description: 'Publish content to social media platforms immediately',
130
+ action: 'Publish a post',
131
+ },
132
+ {
133
+ name: 'Publish with AI',
134
+ value: 'publishAi',
135
+ description: 'Generate content with AI and publish to platforms',
136
+ action: 'Publish with AI-generated content',
137
+ },
93
138
  ],
94
139
  default: 'publish',
95
140
  },
@@ -100,10 +145,30 @@ class SendIt {
100
145
  noDataExpression: true,
101
146
  displayOptions: { show: { resource: ['ai'] } },
102
147
  options: [
103
- { name: 'Generate Content', value: 'generate', description: 'Generate platform-specific content from media or prompt', action: 'Generate AI content' },
104
- { name: 'Reply Suggestions', value: 'replySuggestions', description: 'Get AI-drafted reply suggestions for a mention', action: 'Get AI reply suggestions' },
105
- { name: 'Mention Summary', value: 'mentionSummary', description: 'Generate an AI summary of recent mentions', action: 'Summarize mentions with AI' },
106
- { name: 'Feedback', value: 'feedback', description: 'Rate AI-generated content quality', action: 'Submit AI feedback' },
148
+ {
149
+ name: 'Generate Content',
150
+ value: 'generate',
151
+ description: 'Generate platform-specific content from media or prompt',
152
+ action: 'Generate AI content',
153
+ },
154
+ {
155
+ name: 'Reply Suggestions',
156
+ value: 'replySuggestions',
157
+ description: 'Get AI-drafted reply suggestions for a mention',
158
+ action: 'Get AI reply suggestions',
159
+ },
160
+ {
161
+ name: 'Mention Summary',
162
+ value: 'mentionSummary',
163
+ description: 'Generate an AI summary of recent mentions',
164
+ action: 'Summarize mentions with AI',
165
+ },
166
+ {
167
+ name: 'Feedback',
168
+ value: 'feedback',
169
+ description: 'Rate AI-generated content quality',
170
+ action: 'Submit AI feedback',
171
+ },
107
172
  ],
108
173
  default: 'generate',
109
174
  },
@@ -114,7 +179,12 @@ class SendIt {
114
179
  noDataExpression: true,
115
180
  displayOptions: { show: { resource: ['media'] } },
116
181
  options: [
117
- { name: 'Upload', value: 'upload', description: 'Upload media file to get a URL', action: 'Upload media' },
182
+ {
183
+ name: 'Upload',
184
+ value: 'upload',
185
+ description: 'Upload media file to get a URL',
186
+ action: 'Upload media',
187
+ },
118
188
  ],
119
189
  default: 'upload',
120
190
  },
@@ -125,10 +195,30 @@ class SendIt {
125
195
  noDataExpression: true,
126
196
  displayOptions: { show: { resource: ['scheduledPost'] } },
127
197
  options: [
128
- { name: 'Create', value: 'create', description: 'Schedule a post for future publishing', action: 'Schedule a post' },
129
- { name: 'Get All', value: 'getAll', description: 'Get all scheduled posts', action: 'Get all scheduled posts' },
130
- { name: 'Delete', value: 'delete', description: 'Cancel a scheduled post', action: 'Cancel a scheduled post' },
131
- { name: 'Trigger Now', value: 'trigger', description: 'Publish a scheduled post immediately', action: 'Trigger scheduled post now' },
198
+ {
199
+ name: 'Create',
200
+ value: 'create',
201
+ description: 'Schedule a post for future publishing',
202
+ action: 'Schedule a post',
203
+ },
204
+ {
205
+ name: 'Get All',
206
+ value: 'getAll',
207
+ description: 'Get all scheduled posts',
208
+ action: 'Get all scheduled posts',
209
+ },
210
+ {
211
+ name: 'Delete',
212
+ value: 'delete',
213
+ description: 'Cancel a scheduled post',
214
+ action: 'Cancel a scheduled post',
215
+ },
216
+ {
217
+ name: 'Trigger Now',
218
+ value: 'trigger',
219
+ description: 'Publish a scheduled post immediately',
220
+ action: 'Trigger scheduled post now',
221
+ },
132
222
  ],
133
223
  default: 'create',
134
224
  },
@@ -138,7 +228,14 @@ class SendIt {
138
228
  type: 'options',
139
229
  noDataExpression: true,
140
230
  displayOptions: { show: { resource: ['account'] } },
141
- options: [{ name: 'Get All', value: 'getAll', description: 'Get all connected accounts', action: 'Get all accounts' }],
231
+ options: [
232
+ {
233
+ name: 'Get All',
234
+ value: 'getAll',
235
+ description: 'Get all connected accounts',
236
+ action: 'Get all accounts',
237
+ },
238
+ ],
142
239
  default: 'getAll',
143
240
  },
144
241
  {
@@ -147,7 +244,14 @@ class SendIt {
147
244
  type: 'options',
148
245
  noDataExpression: true,
149
246
  displayOptions: { show: { resource: ['validation'] } },
150
- options: [{ name: 'Validate', value: 'validate', description: 'Validate content before publishing', action: 'Validate content' }],
247
+ options: [
248
+ {
249
+ name: 'Validate',
250
+ value: 'validate',
251
+ description: 'Validate content against platform rules before publishing (character limits, media requirements)',
252
+ action: 'Validate content',
253
+ },
254
+ ],
151
255
  default: 'validate',
152
256
  },
153
257
  {
@@ -156,7 +260,14 @@ class SendIt {
156
260
  type: 'options',
157
261
  noDataExpression: true,
158
262
  displayOptions: { show: { resource: ['analytics'] } },
159
- options: [{ name: 'Get Analytics', value: 'getAnalytics', description: 'Get engagement analytics for posts on a platform', action: 'Get analytics for a platform' }],
263
+ options: [
264
+ {
265
+ name: 'Get Analytics',
266
+ value: 'getAnalytics',
267
+ description: 'Get engagement analytics for posts on a platform',
268
+ action: 'Get analytics for a platform',
269
+ },
270
+ ],
160
271
  default: 'getAnalytics',
161
272
  },
162
273
  {
@@ -166,11 +277,36 @@ class SendIt {
166
277
  noDataExpression: true,
167
278
  displayOptions: { show: { resource: ['brandVoice'] } },
168
279
  options: [
169
- { name: 'Create', value: 'create', description: 'Create a new brand voice profile', action: 'Create a brand voice' },
170
- { name: 'List', value: 'list', description: 'List all brand voice profiles', action: 'List brand voices' },
171
- { name: 'Get', value: 'get', description: 'Get a single brand voice profile', action: 'Get a brand voice' },
172
- { name: 'Update', value: 'update', description: 'Update a brand voice profile', action: 'Update a brand voice' },
173
- { name: 'Delete', value: 'delete', description: 'Delete a brand voice profile', action: 'Delete a brand voice' },
280
+ {
281
+ name: 'Create',
282
+ value: 'create',
283
+ description: 'Create a new brand voice profile',
284
+ action: 'Create a brand voice',
285
+ },
286
+ {
287
+ name: 'List',
288
+ value: 'list',
289
+ description: 'List all brand voice profiles',
290
+ action: 'List brand voices',
291
+ },
292
+ {
293
+ name: 'Get',
294
+ value: 'get',
295
+ description: 'Get a single brand voice profile',
296
+ action: 'Get a brand voice',
297
+ },
298
+ {
299
+ name: 'Update',
300
+ value: 'update',
301
+ description: 'Update a brand voice profile',
302
+ action: 'Update a brand voice',
303
+ },
304
+ {
305
+ name: 'Delete',
306
+ value: 'delete',
307
+ description: 'Delete a brand voice profile',
308
+ action: 'Delete a brand voice',
309
+ },
174
310
  ],
175
311
  default: 'create',
176
312
  },
@@ -181,9 +317,24 @@ class SendIt {
181
317
  noDataExpression: true,
182
318
  displayOptions: { show: { resource: ['campaign'] } },
183
319
  options: [
184
- { name: 'Plan', value: 'plan', description: 'Create a new campaign with AI-planned posts', action: 'Plan a campaign' },
185
- { name: 'List', value: 'list', description: 'List all campaigns', action: 'List campaigns' },
186
- { name: 'Schedule', value: 'schedule', description: 'Schedule all posts in a campaign', action: 'Schedule a campaign' },
320
+ {
321
+ name: 'Plan',
322
+ value: 'plan',
323
+ description: 'Create a new campaign with AI-planned posts',
324
+ action: 'Plan a campaign',
325
+ },
326
+ {
327
+ name: 'List',
328
+ value: 'list',
329
+ description: 'List all campaigns',
330
+ action: 'List campaigns',
331
+ },
332
+ {
333
+ name: 'Schedule',
334
+ value: 'schedule',
335
+ description: 'Schedule all posts in a campaign',
336
+ action: 'Schedule a campaign',
337
+ },
187
338
  ],
188
339
  default: 'plan',
189
340
  },
@@ -194,10 +345,30 @@ class SendIt {
194
345
  noDataExpression: true,
195
346
  displayOptions: { show: { resource: ['inbox'] } },
196
347
  options: [
197
- { name: 'List', value: 'list', description: 'List inbox threads', action: 'List inbox threads' },
198
- { name: 'Reply', value: 'reply', description: 'Reply to an inbox thread', action: 'Reply to a thread' },
199
- { name: 'Get Thread', value: 'getThread', description: 'Get a single inbox thread with messages', action: 'Get an inbox thread' },
200
- { name: 'Update Status', value: 'updateStatus', description: 'Update thread status', action: 'Update inbox thread status' },
348
+ {
349
+ name: 'List',
350
+ value: 'list',
351
+ description: 'List inbox threads',
352
+ action: 'List inbox threads',
353
+ },
354
+ {
355
+ name: 'Reply',
356
+ value: 'reply',
357
+ description: 'Reply to an inbox thread',
358
+ action: 'Reply to a thread',
359
+ },
360
+ {
361
+ name: 'Get Thread',
362
+ value: 'getThread',
363
+ description: 'Get a single inbox thread with messages',
364
+ action: 'Get an inbox thread',
365
+ },
366
+ {
367
+ name: 'Update Status',
368
+ value: 'updateStatus',
369
+ description: 'Update thread status',
370
+ action: 'Update inbox thread status',
371
+ },
201
372
  ],
202
373
  default: 'list',
203
374
  },
@@ -208,20 +379,90 @@ class SendIt {
208
379
  noDataExpression: true,
209
380
  displayOptions: { show: { resource: ['listening'] } },
210
381
  options: [
211
- { name: 'Refresh', value: 'refresh', description: 'Trigger a social listening refresh', action: 'Refresh social listening data' },
212
- { name: 'List Keywords', value: 'listKeywords', description: 'List tracked listening keywords', action: 'List listening keywords' },
213
- { name: 'Create Keyword', value: 'createKeyword', description: 'Create a listening keyword', action: 'Create listening keyword' },
214
- { name: 'Get Keyword', value: 'getKeyword', description: 'Get listening keyword by ID', action: 'Get listening keyword' },
215
- { name: 'Update Keyword', value: 'updateKeyword', description: 'Update listening keyword', action: 'Update listening keyword' },
216
- { name: 'Delete Keyword', value: 'deleteKeyword', description: 'Delete listening keyword', action: 'Delete listening keyword' },
217
- { name: 'List Mentions', value: 'listMentions', description: 'List mentions', action: 'List listening mentions' },
218
- { name: 'Get Mention', value: 'getMention', description: 'Get mention by ID', action: 'Get listening mention' },
219
- { name: 'Mark Mentions Read', value: 'markMentionsRead', description: 'Mark mentions as read', action: 'Mark listening mentions as read' },
220
- { name: 'Archive Mentions', value: 'archiveMentions', description: 'Archive mentions', action: 'Archive listening mentions' },
221
- { name: 'List Alerts', value: 'listAlerts', description: 'List listening alerts', action: 'List listening alerts' },
222
- { name: 'Mark Alerts Read', value: 'markAlertsRead', description: 'Mark alerts as read', action: 'Mark listening alerts as read' },
223
- { name: 'Dismiss Alerts', value: 'dismissAlerts', description: 'Dismiss alerts', action: 'Dismiss listening alerts' },
224
- { name: 'Get Summary', value: 'getSummary', description: 'Get listening summary', action: 'Get listening summary' },
382
+ {
383
+ name: 'Refresh',
384
+ value: 'refresh',
385
+ description: 'Trigger a refresh of social listening data for tracked keywords',
386
+ action: 'Refresh social listening data',
387
+ },
388
+ {
389
+ name: 'List Keywords',
390
+ value: 'listKeywords',
391
+ description: 'List tracked listening keywords',
392
+ action: 'List listening keywords',
393
+ },
394
+ {
395
+ name: 'Create Keyword',
396
+ value: 'createKeyword',
397
+ description: 'Create a listening keyword',
398
+ action: 'Create listening keyword',
399
+ },
400
+ {
401
+ name: 'Get Keyword',
402
+ value: 'getKeyword',
403
+ description: 'Get listening keyword by ID',
404
+ action: 'Get listening keyword',
405
+ },
406
+ {
407
+ name: 'Update Keyword',
408
+ value: 'updateKeyword',
409
+ description: 'Update listening keyword',
410
+ action: 'Update listening keyword',
411
+ },
412
+ {
413
+ name: 'Delete Keyword',
414
+ value: 'deleteKeyword',
415
+ description: 'Delete listening keyword',
416
+ action: 'Delete listening keyword',
417
+ },
418
+ {
419
+ name: 'List Mentions',
420
+ value: 'listMentions',
421
+ description: 'List mentions',
422
+ action: 'List listening mentions',
423
+ },
424
+ {
425
+ name: 'Get Mention',
426
+ value: 'getMention',
427
+ description: 'Get mention by ID',
428
+ action: 'Get listening mention',
429
+ },
430
+ {
431
+ name: 'Mark Mentions Read',
432
+ value: 'markMentionsRead',
433
+ description: 'Mark mentions as read',
434
+ action: 'Mark listening mentions as read',
435
+ },
436
+ {
437
+ name: 'Archive Mentions',
438
+ value: 'archiveMentions',
439
+ description: 'Archive mentions',
440
+ action: 'Archive listening mentions',
441
+ },
442
+ {
443
+ name: 'List Alerts',
444
+ value: 'listAlerts',
445
+ description: 'List listening alerts',
446
+ action: 'List listening alerts',
447
+ },
448
+ {
449
+ name: 'Mark Alerts Read',
450
+ value: 'markAlertsRead',
451
+ description: 'Mark alerts as read',
452
+ action: 'Mark listening alerts as read',
453
+ },
454
+ {
455
+ name: 'Dismiss Alerts',
456
+ value: 'dismissAlerts',
457
+ description: 'Dismiss alerts',
458
+ action: 'Dismiss listening alerts',
459
+ },
460
+ {
461
+ name: 'Get Summary',
462
+ value: 'getSummary',
463
+ description: 'Get listening summary',
464
+ action: 'Get listening summary',
465
+ },
225
466
  ],
226
467
  default: 'refresh',
227
468
  },
@@ -232,8 +473,18 @@ class SendIt {
232
473
  noDataExpression: true,
233
474
  displayOptions: { show: { resource: ['aiMedia'] } },
234
475
  options: [
235
- { name: 'Create', value: 'create', description: 'Generate AI media (image or video)', action: 'Create AI media' },
236
- { name: 'Get Status', value: 'getStatus', description: 'Get the status of an AI media generation job', action: 'Get AI media status' },
476
+ {
477
+ name: 'Create',
478
+ value: 'create',
479
+ description: 'Generate AI media (image or video)',
480
+ action: 'Create AI media',
481
+ },
482
+ {
483
+ name: 'Get Status',
484
+ value: 'getStatus',
485
+ description: 'Get the status of an AI media generation job',
486
+ action: 'Get AI media status',
487
+ },
237
488
  ],
238
489
  default: 'create',
239
490
  },
@@ -244,12 +495,42 @@ class SendIt {
244
495
  noDataExpression: true,
245
496
  displayOptions: { show: { resource: ['meta'] } },
246
497
  options: [
247
- { name: 'Get Capabilities', value: 'getCapabilities', description: 'Get supported platform capabilities', action: 'Get capabilities' },
248
- { name: 'Get Requirements', value: 'getRequirements', description: 'Get content requirements for a platform', action: 'Get platform requirements' },
249
- { name: 'Get Platform Settings Schema', value: 'getPlatformSettingsSchema', description: 'Get the settings schema for a platform', action: 'Get platform settings schema' },
250
- { name: 'Get Best Times', value: 'getBestTimes', description: 'Get optimal posting times for a platform', action: 'Get best times to post' },
251
- { name: 'Get Webhook Events Catalog', value: 'getWebhookEventsCatalog', description: 'Get all available webhook event types', action: 'Get webhook events catalog' },
252
- { name: 'Get Webhook Triggers', value: 'getWebhookTriggers', description: 'Get configured webhook trigger schemas', action: 'Get webhook triggers' },
498
+ {
499
+ name: 'Get Capabilities',
500
+ value: 'getCapabilities',
501
+ description: 'Get supported platform capabilities',
502
+ action: 'Get capabilities',
503
+ },
504
+ {
505
+ name: 'Get Requirements',
506
+ value: 'getRequirements',
507
+ description: 'Get content requirements for a platform',
508
+ action: 'Get platform requirements',
509
+ },
510
+ {
511
+ name: 'Get Platform Settings Schema',
512
+ value: 'getPlatformSettingsSchema',
513
+ description: 'Get the settings schema for a platform',
514
+ action: 'Get platform settings schema',
515
+ },
516
+ {
517
+ name: 'Get Best Times',
518
+ value: 'getBestTimes',
519
+ description: 'Get optimal posting times for a platform',
520
+ action: 'Get best times to post',
521
+ },
522
+ {
523
+ name: 'Get Webhook Events Catalog',
524
+ value: 'getWebhookEventsCatalog',
525
+ description: 'Get all available webhook event types',
526
+ action: 'Get webhook events catalog',
527
+ },
528
+ {
529
+ name: 'Get Webhook Triggers',
530
+ value: 'getWebhookTriggers',
531
+ description: 'Get configured webhook trigger schemas',
532
+ action: 'Get webhook triggers',
533
+ },
253
534
  ],
254
535
  default: 'getCapabilities',
255
536
  },
@@ -259,7 +540,14 @@ class SendIt {
259
540
  type: 'options',
260
541
  noDataExpression: true,
261
542
  displayOptions: { show: { resource: ['contentScore'] } },
262
- options: [{ name: 'Score', value: 'score', description: 'Score content quality across platforms', action: 'Score content quality' }],
543
+ options: [
544
+ {
545
+ name: 'Score',
546
+ value: 'score',
547
+ description: 'Score content quality across platforms',
548
+ action: 'Score content quality',
549
+ },
550
+ ],
263
551
  default: 'score',
264
552
  },
265
553
  {
@@ -303,7 +591,11 @@ class SendIt {
303
591
  { name: 'Get Import', value: 'getImport', action: 'Get bulk import' },
304
592
  { name: 'Validate CSV', value: 'validateCsv', action: 'Validate CSV payload' },
305
593
  { name: 'Import CSV', value: 'importCsv', action: 'Import CSV payload' },
306
- { name: 'Download Template', value: 'downloadTemplate', action: 'Download bulk schedule template' },
594
+ {
595
+ name: 'Download Template',
596
+ value: 'downloadTemplate',
597
+ action: 'Download bulk schedule template',
598
+ },
307
599
  ],
308
600
  default: 'listImports',
309
601
  },
@@ -314,9 +606,21 @@ class SendIt {
314
606
  noDataExpression: true,
315
607
  displayOptions: { show: { resource: ['connect'] } },
316
608
  options: [
317
- { name: 'Get Connect Action', value: 'getConnectAction', action: 'Get connect action for platform' },
318
- { name: 'Connect Token', value: 'connectToken', action: 'Connect with token credentials' },
319
- { name: 'Connect Webhook', value: 'connectWebhook', action: 'Connect with webhook credentials' },
609
+ {
610
+ name: 'Get Connect Action',
611
+ value: 'getConnectAction',
612
+ action: 'Get connect action for platform',
613
+ },
614
+ {
615
+ name: 'Connect Token',
616
+ value: 'connectToken',
617
+ action: 'Connect with token credentials',
618
+ },
619
+ {
620
+ name: 'Connect Webhook',
621
+ value: 'connectWebhook',
622
+ action: 'Connect with webhook credentials',
623
+ },
320
624
  ],
321
625
  default: 'getConnectAction',
322
626
  },
@@ -327,10 +631,25 @@ class SendIt {
327
631
  noDataExpression: true,
328
632
  displayOptions: { show: { resource: ['webhooks'] } },
329
633
  options: [
330
- { name: 'List', value: 'list', description: 'List all registered webhooks', action: 'List webhooks' },
634
+ {
635
+ name: 'List',
636
+ value: 'list',
637
+ description: 'List all registered webhooks',
638
+ action: 'List webhooks',
639
+ },
331
640
  { name: 'Get', value: 'get', description: 'Get a webhook by ID', action: 'Get webhook' },
332
- { name: 'Update', value: 'update', description: 'Update a webhook subscription', action: 'Update webhook' },
333
- { name: 'Test Webhook', value: 'testWebhook', description: 'Send a test delivery to a webhook', action: 'Send a test webhook delivery' },
641
+ {
642
+ name: 'Update',
643
+ value: 'update',
644
+ description: 'Update a webhook subscription',
645
+ action: 'Update webhook',
646
+ },
647
+ {
648
+ name: 'Test Webhook',
649
+ value: 'testWebhook',
650
+ description: 'Send a test delivery to a webhook',
651
+ action: 'Send a test webhook delivery',
652
+ },
334
653
  ],
335
654
  default: 'list',
336
655
  },
@@ -341,9 +660,24 @@ class SendIt {
341
660
  noDataExpression: true,
342
661
  displayOptions: { show: { resource: ['deadLetter'] } },
343
662
  options: [
344
- { name: 'List', value: 'list', description: 'List posts in the dead letter queue', action: 'List dead letter posts' },
345
- { name: 'Requeue', value: 'requeue', description: 'Retry a failed post from the dead letter queue', action: 'Requeue dead letter post' },
346
- { name: 'Discard', value: 'discard', description: 'Permanently discard a dead letter post', action: 'Discard dead letter post' },
663
+ {
664
+ name: 'List',
665
+ value: 'list',
666
+ description: 'List posts in the dead letter queue',
667
+ action: 'List dead letter posts',
668
+ },
669
+ {
670
+ name: 'Requeue',
671
+ value: 'requeue',
672
+ description: 'Retry a failed post from the dead letter queue',
673
+ action: 'Requeue dead letter post',
674
+ },
675
+ {
676
+ name: 'Discard',
677
+ value: 'discard',
678
+ description: 'Permanently discard a dead letter post',
679
+ action: 'Discard dead letter post',
680
+ },
347
681
  ],
348
682
  default: 'list',
349
683
  },
@@ -354,7 +688,12 @@ class SendIt {
354
688
  noDataExpression: true,
355
689
  displayOptions: { show: { resource: ['auditLog'] } },
356
690
  options: [
357
- { name: 'List', value: 'list', description: 'List audit log entries', action: 'List audit log entries' },
691
+ {
692
+ name: 'List',
693
+ value: 'list',
694
+ description: 'List audit log entries',
695
+ action: 'List audit log entries',
696
+ },
358
697
  ],
359
698
  default: 'list',
360
699
  },
@@ -365,7 +704,12 @@ class SendIt {
365
704
  noDataExpression: true,
366
705
  displayOptions: { show: { resource: ['conversions'] } },
367
706
  options: [
368
- { name: 'Track', value: 'track', description: 'Track a conversion event', action: 'Track conversion' },
707
+ {
708
+ name: 'Track',
709
+ value: 'track',
710
+ description: 'Track a conversion event',
711
+ action: 'Track conversion',
712
+ },
369
713
  ],
370
714
  default: 'track',
371
715
  },
@@ -375,7 +719,14 @@ class SendIt {
375
719
  type: 'options',
376
720
  noDataExpression: true,
377
721
  displayOptions: { show: { resource: ['advanced'] } },
378
- options: [{ name: 'API Request', value: 'apiRequest', action: 'Run advanced API request' }],
722
+ options: [
723
+ {
724
+ name: 'API Request',
725
+ value: 'apiRequest',
726
+ description: 'Send a custom API request to any SendIt v1/v2 endpoint',
727
+ action: 'Run advanced API request',
728
+ },
729
+ ],
379
730
  default: 'apiRequest',
380
731
  },
381
732
  // ===== Shared publish / schedule fields =====
@@ -392,7 +743,7 @@ class SendIt {
392
743
  operation: ['publish', 'publishAi', 'create', 'validate', 'generate', 'score'],
393
744
  },
394
745
  },
395
- description: 'Select platforms to publish to',
746
+ description: 'Select target platforms. Instagram and TikTok require media. Use Meta > Get Requirements to check platform-specific limits.',
396
747
  },
397
748
  {
398
749
  displayName: 'Text',
@@ -407,7 +758,7 @@ class SendIt {
407
758
  operation: ['publish', 'create', 'validate', 'score'],
408
759
  },
409
760
  },
410
- description: 'The text content of your post',
761
+ description: 'The text content of your post. Character limits vary by platform — use Meta > Get Requirements to check.',
411
762
  },
412
763
  {
413
764
  displayName: 'Media URL',
@@ -420,19 +771,7 @@ class SendIt {
420
771
  operation: ['publish', 'publishAi', 'create', 'validate', 'generate', 'score'],
421
772
  },
422
773
  },
423
- description: 'URL to an image or video (required for some platforms)',
424
- },
425
- {
426
- displayName: 'Input Mode',
427
- name: 'mediaInputMode',
428
- type: 'options',
429
- options: [
430
- { name: 'Binary Data', value: 'binary' },
431
- { name: 'File Path', value: 'filePath' },
432
- ],
433
- default: 'binary',
434
- displayOptions: { show: { resource: ['media'], operation: ['upload'] } },
435
- description: 'How to provide the media file',
774
+ description: 'URL to an image or video. Required for Instagram, TikTok, and Pinterest. Optional for LinkedIn, X, Threads, and others.',
436
775
  },
437
776
  {
438
777
  displayName: 'Binary Property',
@@ -443,32 +782,19 @@ class SendIt {
443
782
  show: {
444
783
  resource: ['media'],
445
784
  operation: ['upload'],
446
- mediaInputMode: ['binary'],
447
785
  },
448
786
  },
449
787
  description: 'Name of the binary property containing the file',
450
788
  },
451
789
  {
452
- displayName: 'File Path',
453
- name: 'filePath',
454
- type: 'string',
455
- default: '',
456
- displayOptions: {
457
- show: {
458
- resource: ['media'],
459
- operation: ['upload'],
460
- mediaInputMode: ['filePath'],
461
- },
462
- },
463
- description: 'Absolute path to the media file',
464
- },
465
- {
466
- displayName: 'Prompt',
790
+ displayName: 'AI Prompt',
467
791
  name: 'aiPrompt',
468
792
  type: 'string',
469
793
  typeOptions: { rows: 3 },
470
794
  default: '',
471
- displayOptions: { show: { resource: ['post', 'ai'], operation: ['publishAi', 'generate'] } },
795
+ displayOptions: {
796
+ show: { resource: ['post', 'ai'], operation: ['publishAi', 'generate'] },
797
+ },
472
798
  description: 'Additional context or instructions for AI content generation',
473
799
  },
474
800
  {
@@ -481,13 +807,14 @@ class SendIt {
481
807
  description: 'When to publish the post',
482
808
  },
483
809
  {
484
- displayName: 'Schedule ID',
810
+ displayName: 'Scheduled Post',
485
811
  name: 'scheduleId',
486
- type: 'string',
812
+ type: 'options',
813
+ typeOptions: { loadOptionsMethod: 'getScheduledPosts' },
487
814
  default: '',
488
815
  required: true,
489
816
  displayOptions: { show: { resource: ['scheduledPost'], operation: ['delete', 'trigger'] } },
490
- description: 'The ID of the scheduled post',
817
+ description: 'Choose from the list, or specify an ID using an expression.',
491
818
  },
492
819
  {
493
820
  displayName: 'Platform Filter',
@@ -502,11 +829,11 @@ class SendIt {
502
829
  displayName: 'Platform',
503
830
  name: 'analyticsPlatform',
504
831
  type: 'options',
505
- options: constants_1.PLATFORM_OPTIONS,
506
- default: 'linkedin',
832
+ typeOptions: { loadOptionsMethod: 'getConnectedPlatforms' },
833
+ default: '',
507
834
  required: true,
508
835
  displayOptions: { show: { resource: ['analytics'], operation: ['getAnalytics'] } },
509
- description: 'The platform to get analytics for',
836
+ description: 'Choose from the list, or specify an ID using an expression.',
510
837
  },
511
838
  {
512
839
  displayName: 'Additional Options',
@@ -514,7 +841,9 @@ class SendIt {
514
841
  type: 'collection',
515
842
  placeholder: 'Add Option',
516
843
  default: {},
517
- displayOptions: { show: { resource: ['post', 'validation'], operation: ['publish', 'validate'] } },
844
+ displayOptions: {
845
+ show: { resource: ['post', 'validation'], operation: ['publish', 'validate'] },
846
+ },
518
847
  options: [
519
848
  {
520
849
  displayName: 'Media URLs (for carousel)',
@@ -574,7 +903,9 @@ class SendIt {
574
903
  type: 'collection',
575
904
  placeholder: 'Add Option',
576
905
  default: {},
577
- displayOptions: { show: { resource: ['post', 'ai'], operation: ['publishAi', 'generate'] } },
906
+ displayOptions: {
907
+ show: { resource: ['post', 'ai'], operation: ['publishAi', 'generate'] },
908
+ },
578
909
  options: [
579
910
  {
580
911
  displayName: 'Hashtags',
@@ -709,16 +1040,19 @@ class SendIt {
709
1040
  },
710
1041
  // ===== Brand voice fields =====
711
1042
  {
712
- displayName: 'Brand Voice ID',
1043
+ displayName: 'Brand Voice',
713
1044
  name: 'brandVoiceId',
714
- type: 'string',
1045
+ type: 'options',
1046
+ typeOptions: { loadOptionsMethod: 'getBrandVoices' },
715
1047
  default: '',
716
1048
  required: true,
717
- displayOptions: { show: { resource: ['brandVoice'], operation: ['get', 'update', 'delete'] } },
718
- description: 'The ID of the brand voice profile',
1049
+ displayOptions: {
1050
+ show: { resource: ['brandVoice'], operation: ['get', 'update', 'delete'] },
1051
+ },
1052
+ description: 'Choose from the list, or specify an ID using an expression.',
719
1053
  },
720
1054
  {
721
- displayName: 'Name',
1055
+ displayName: 'Voice Name',
722
1056
  name: 'brandVoiceName',
723
1057
  type: 'string',
724
1058
  default: '',
@@ -727,7 +1061,7 @@ class SendIt {
727
1061
  description: 'Name for the brand voice profile',
728
1062
  },
729
1063
  {
730
- displayName: 'Description',
1064
+ displayName: 'Voice Description',
731
1065
  name: 'brandVoiceDescription',
732
1066
  type: 'string',
733
1067
  typeOptions: { rows: 3 },
@@ -769,7 +1103,7 @@ class SendIt {
769
1103
  },
770
1104
  // ===== Campaign fields =====
771
1105
  {
772
- displayName: 'Objective',
1106
+ displayName: 'Campaign Objective',
773
1107
  name: 'campaignObjective',
774
1108
  type: 'string',
775
1109
  typeOptions: { rows: 3 },
@@ -788,7 +1122,7 @@ class SendIt {
788
1122
  description: 'Target platforms for the campaign',
789
1123
  },
790
1124
  {
791
- displayName: 'Brief',
1125
+ displayName: 'Campaign Brief',
792
1126
  name: 'campaignBrief',
793
1127
  type: 'string',
794
1128
  typeOptions: { rows: 4 },
@@ -822,13 +1156,14 @@ class SendIt {
822
1156
  description: 'Optional campaign end date/time (ISO 8601)',
823
1157
  },
824
1158
  {
825
- displayName: 'Campaign ID',
1159
+ displayName: 'Campaign',
826
1160
  name: 'campaignId',
827
- type: 'string',
1161
+ type: 'options',
1162
+ typeOptions: { loadOptionsMethod: 'getCampaigns' },
828
1163
  default: '',
829
1164
  required: true,
830
1165
  displayOptions: { show: { resource: ['campaign'], operation: ['schedule'] } },
831
- description: 'The ID of the campaign to schedule',
1166
+ description: 'Choose from the list, or specify an ID using an expression.',
832
1167
  },
833
1168
  // ===== Inbox fields =====
834
1169
  {
@@ -865,9 +1200,10 @@ class SendIt {
865
1200
  description: 'Maximum number of threads to return (1-50)',
866
1201
  },
867
1202
  {
868
- displayName: 'Thread ID',
1203
+ displayName: 'Inbox Thread',
869
1204
  name: 'inboxThreadId',
870
- type: 'string',
1205
+ type: 'options',
1206
+ typeOptions: { loadOptionsMethod: 'getInboxThreads' },
871
1207
  default: '',
872
1208
  required: true,
873
1209
  displayOptions: {
@@ -876,10 +1212,10 @@ class SendIt {
876
1212
  operation: ['reply', 'getThread', 'updateStatus'],
877
1213
  },
878
1214
  },
879
- description: 'The ID of the inbox thread',
1215
+ description: 'Choose from the list, or specify an ID using an expression.',
880
1216
  },
881
1217
  {
882
- displayName: 'Message',
1218
+ displayName: 'Reply Message',
883
1219
  name: 'inboxMessage',
884
1220
  type: 'string',
885
1221
  typeOptions: { rows: 3 },
@@ -927,9 +1263,10 @@ class SendIt {
927
1263
  description: 'Comma-separated keyword IDs to refresh',
928
1264
  },
929
1265
  {
930
- displayName: 'Keyword ID',
1266
+ displayName: 'Listening Keyword',
931
1267
  name: 'listeningKeywordId',
932
- type: 'string',
1268
+ type: 'options',
1269
+ typeOptions: { loadOptionsMethod: 'getListeningKeywords' },
933
1270
  default: '',
934
1271
  required: true,
935
1272
  displayOptions: {
@@ -938,7 +1275,7 @@ class SendIt {
938
1275
  operation: ['getKeyword', 'updateKeyword', 'deleteKeyword'],
939
1276
  },
940
1277
  },
941
- description: 'Listening keyword ID',
1278
+ description: 'Choose from the list, or specify an ID using an expression.',
942
1279
  },
943
1280
  {
944
1281
  displayName: 'Keyword',
@@ -982,7 +1319,9 @@ class SendIt {
982
1319
  name: 'listeningNotifyEmail',
983
1320
  type: 'boolean',
984
1321
  default: false,
985
- displayOptions: { show: { resource: ['listening'], operation: ['createKeyword', 'updateKeyword'] } },
1322
+ displayOptions: {
1323
+ show: { resource: ['listening'], operation: ['createKeyword', 'updateKeyword'] },
1324
+ },
986
1325
  description: 'Enable email notifications',
987
1326
  },
988
1327
  {
@@ -990,7 +1329,9 @@ class SendIt {
990
1329
  name: 'listeningNotifyWebhook',
991
1330
  type: 'boolean',
992
1331
  default: false,
993
- displayOptions: { show: { resource: ['listening'], operation: ['createKeyword', 'updateKeyword'] } },
1332
+ displayOptions: {
1333
+ show: { resource: ['listening'], operation: ['createKeyword', 'updateKeyword'] },
1334
+ },
994
1335
  description: 'Enable webhook notifications',
995
1336
  },
996
1337
  {
@@ -998,7 +1339,9 @@ class SendIt {
998
1339
  name: 'listeningWebhookUrl',
999
1340
  type: 'string',
1000
1341
  default: '',
1001
- displayOptions: { show: { resource: ['listening'], operation: ['createKeyword', 'updateKeyword'] } },
1342
+ displayOptions: {
1343
+ show: { resource: ['listening'], operation: ['createKeyword', 'updateKeyword'] },
1344
+ },
1002
1345
  description: 'Webhook URL for notifications',
1003
1346
  },
1004
1347
  {
@@ -1035,7 +1378,9 @@ class SendIt {
1035
1378
  type: 'string',
1036
1379
  default: '',
1037
1380
  required: true,
1038
- displayOptions: { show: { resource: ['listening'], operation: ['markMentionsRead', 'archiveMentions'] } },
1381
+ displayOptions: {
1382
+ show: { resource: ['listening'], operation: ['markMentionsRead', 'archiveMentions'] },
1383
+ },
1039
1384
  description: 'Comma-separated mention IDs',
1040
1385
  },
1041
1386
  {
@@ -1066,7 +1411,9 @@ class SendIt {
1066
1411
  name: 'listeningLimit',
1067
1412
  type: 'number',
1068
1413
  default: 50,
1069
- displayOptions: { show: { resource: ['listening'], operation: ['listMentions', 'listAlerts'] } },
1414
+ displayOptions: {
1415
+ show: { resource: ['listening'], operation: ['listMentions', 'listAlerts'] },
1416
+ },
1070
1417
  description: 'Max records to return',
1071
1418
  },
1072
1419
  {
@@ -1134,7 +1481,9 @@ class SendIt {
1134
1481
  type: 'string',
1135
1482
  default: '',
1136
1483
  required: true,
1137
- displayOptions: { show: { resource: ['listening'], operation: ['markAlertsRead', 'dismissAlerts'] } },
1484
+ displayOptions: {
1485
+ show: { resource: ['listening'], operation: ['markAlertsRead', 'dismissAlerts'] },
1486
+ },
1138
1487
  description: 'Comma-separated alert IDs',
1139
1488
  },
1140
1489
  // ===== AI Media fields =====
@@ -1154,7 +1503,7 @@ class SendIt {
1154
1503
  description: 'AI media generation provider',
1155
1504
  },
1156
1505
  {
1157
- displayName: 'Prompt',
1506
+ displayName: 'Generation Prompt',
1158
1507
  name: 'aiMediaPrompt',
1159
1508
  type: 'string',
1160
1509
  typeOptions: { rows: 3 },
@@ -1235,13 +1584,14 @@ class SendIt {
1235
1584
  },
1236
1585
  // ===== Library fields =====
1237
1586
  {
1238
- displayName: 'Library Item ID',
1587
+ displayName: 'Library Item',
1239
1588
  name: 'libraryItemId',
1240
- type: 'string',
1589
+ type: 'options',
1590
+ typeOptions: { loadOptionsMethod: 'getLibraryItems' },
1241
1591
  default: '',
1242
1592
  required: true,
1243
1593
  displayOptions: { show: { resource: ['library'], operation: ['get', 'update', 'delete'] } },
1244
- description: 'Library item ID',
1594
+ description: 'Choose from the list, or specify an ID using an expression.',
1245
1595
  },
1246
1596
  {
1247
1597
  displayName: 'Title',
@@ -1272,7 +1622,9 @@ class SendIt {
1272
1622
  { name: 'Evergreen', value: 'evergreen' },
1273
1623
  ],
1274
1624
  default: 'draft',
1275
- displayOptions: { show: { resource: ['library'], operation: ['list', 'create', 'update'] } },
1625
+ displayOptions: {
1626
+ show: { resource: ['library'], operation: ['list', 'create', 'update'] },
1627
+ },
1276
1628
  description: 'Library content type',
1277
1629
  },
1278
1630
  {
@@ -1280,7 +1632,9 @@ class SendIt {
1280
1632
  name: 'libraryCategory',
1281
1633
  type: 'string',
1282
1634
  default: '',
1283
- displayOptions: { show: { resource: ['library'], operation: ['list', 'create', 'update'] } },
1635
+ displayOptions: {
1636
+ show: { resource: ['library'], operation: ['list', 'create', 'update'] },
1637
+ },
1284
1638
  description: 'Library category',
1285
1639
  },
1286
1640
  {
@@ -1288,7 +1642,9 @@ class SendIt {
1288
1642
  name: 'libraryTags',
1289
1643
  type: 'string',
1290
1644
  default: '',
1291
- displayOptions: { show: { resource: ['library'], operation: ['list', 'create', 'update'] } },
1645
+ displayOptions: {
1646
+ show: { resource: ['library'], operation: ['list', 'create', 'update'] },
1647
+ },
1292
1648
  description: 'Comma-separated tags',
1293
1649
  },
1294
1650
  {
@@ -1297,7 +1653,9 @@ class SendIt {
1297
1653
  type: 'multiOptions',
1298
1654
  options: constants_1.PLATFORM_OPTIONS,
1299
1655
  default: [],
1300
- displayOptions: { show: { resource: ['library'], operation: ['list', 'create', 'update'] } },
1656
+ displayOptions: {
1657
+ show: { resource: ['library'], operation: ['list', 'create', 'update'] },
1658
+ },
1301
1659
  description: 'Target platforms for this library item',
1302
1660
  },
1303
1661
  {
@@ -1392,7 +1750,9 @@ class SendIt {
1392
1750
  typeOptions: { rows: 6 },
1393
1751
  default: '',
1394
1752
  required: true,
1395
- displayOptions: { show: { resource: ['bulkSchedule'], operation: ['validateCsv', 'importCsv'] } },
1753
+ displayOptions: {
1754
+ show: { resource: ['bulkSchedule'], operation: ['validateCsv', 'importCsv'] },
1755
+ },
1396
1756
  description: 'Raw CSV string payload',
1397
1757
  },
1398
1758
  {
@@ -1400,7 +1760,9 @@ class SendIt {
1400
1760
  name: 'bulkFilename',
1401
1761
  type: 'string',
1402
1762
  default: 'upload.csv',
1403
- displayOptions: { show: { resource: ['bulkSchedule'], operation: ['validateCsv', 'importCsv'] } },
1763
+ displayOptions: {
1764
+ show: { resource: ['bulkSchedule'], operation: ['validateCsv', 'importCsv'] },
1765
+ },
1404
1766
  description: 'CSV filename for import metadata',
1405
1767
  },
1406
1768
  {
@@ -1419,7 +1781,12 @@ class SendIt {
1419
1781
  options: constants_1.PLATFORM_OPTIONS,
1420
1782
  default: 'linkedin',
1421
1783
  required: true,
1422
- displayOptions: { show: { resource: ['connect'], operation: ['getConnectAction', 'connectToken', 'connectWebhook'] } },
1784
+ displayOptions: {
1785
+ show: {
1786
+ resource: ['connect'],
1787
+ operation: ['getConnectAction', 'connectToken', 'connectWebhook'],
1788
+ },
1789
+ },
1423
1790
  description: 'Platform to connect',
1424
1791
  },
1425
1792
  {
@@ -1452,13 +1819,16 @@ class SendIt {
1452
1819
  },
1453
1820
  // ===== Webhook fields =====
1454
1821
  {
1455
- displayName: 'Webhook ID',
1822
+ displayName: 'Webhook',
1456
1823
  name: 'webhookId',
1457
- type: 'string',
1824
+ type: 'options',
1825
+ typeOptions: { loadOptionsMethod: 'getWebhooks' },
1458
1826
  default: '',
1459
1827
  required: true,
1460
- displayOptions: { show: { resource: ['webhooks'], operation: ['get', 'update', 'testWebhook'] } },
1461
- description: 'Webhook subscription ID',
1828
+ displayOptions: {
1829
+ show: { resource: ['webhooks'], operation: ['get', 'update', 'testWebhook'] },
1830
+ },
1831
+ description: 'Choose from the list, or specify an ID using an expression.',
1462
1832
  },
1463
1833
  {
1464
1834
  displayName: 'Webhook URL',
@@ -1509,13 +1879,14 @@ class SendIt {
1509
1879
  description: 'Maximum number of dead letter posts to return',
1510
1880
  },
1511
1881
  {
1512
- displayName: 'Dead Letter ID',
1882
+ displayName: 'Dead Letter Post',
1513
1883
  name: 'deadLetterId',
1514
- type: 'string',
1884
+ type: 'options',
1885
+ typeOptions: { loadOptionsMethod: 'getDeadLetterPosts' },
1515
1886
  default: '',
1516
1887
  required: true,
1517
1888
  displayOptions: { show: { resource: ['deadLetter'], operation: ['requeue', 'discard'] } },
1518
- description: 'The ID of the dead letter post',
1889
+ description: 'Choose from the list, or specify an ID using an expression.',
1519
1890
  },
1520
1891
  // ===== Audit log fields =====
1521
1892
  {
@@ -1761,6 +2132,142 @@ class SendIt {
1761
2132
  },
1762
2133
  ],
1763
2134
  };
2135
+ this.methods = {
2136
+ loadOptions: {
2137
+ async getBrandVoices() {
2138
+ var _a;
2139
+ const response = await this.helpers.httpRequestWithAuthentication.call(this, 'sendItApi', {
2140
+ method: 'GET',
2141
+ baseURL: constants_1.SENDIT_API_BASE_URL,
2142
+ url: '/brand-voice',
2143
+ qs: { limit: 100 },
2144
+ });
2145
+ return ((_a = response === null || response === void 0 ? void 0 : response.profiles) !== null && _a !== void 0 ? _a : []).map((p) => ({
2146
+ name: String(p.name || p.id),
2147
+ value: String(p.id),
2148
+ }));
2149
+ },
2150
+ async getCampaigns() {
2151
+ var _a;
2152
+ const response = await this.helpers.httpRequestWithAuthentication.call(this, 'sendItApi', {
2153
+ method: 'GET',
2154
+ baseURL: constants_1.SENDIT_API_BASE_URL,
2155
+ url: '/campaigns',
2156
+ qs: { limit: 100 },
2157
+ });
2158
+ return ((_a = response === null || response === void 0 ? void 0 : response.campaigns) !== null && _a !== void 0 ? _a : []).map((c) => ({
2159
+ name: String(c.name || c.id),
2160
+ value: String(c.id),
2161
+ }));
2162
+ },
2163
+ async getScheduledPosts() {
2164
+ var _a;
2165
+ const response = await this.helpers.httpRequestWithAuthentication.call(this, 'sendItApi', {
2166
+ method: 'GET',
2167
+ baseURL: constants_1.SENDIT_API_BASE_URL,
2168
+ url: '/scheduled',
2169
+ });
2170
+ return ((_a = response === null || response === void 0 ? void 0 : response.posts) !== null && _a !== void 0 ? _a : []).map((s) => {
2171
+ var _a;
2172
+ return ({
2173
+ name: String(((_a = s.content) === null || _a === void 0 ? void 0 : _a.text) || s.id).substring(0, 60),
2174
+ value: String(s.id),
2175
+ });
2176
+ });
2177
+ },
2178
+ async getWebhooks() {
2179
+ var _a;
2180
+ const response = await this.helpers.httpRequestWithAuthentication.call(this, 'sendItApi', {
2181
+ method: 'GET',
2182
+ baseURL: constants_1.SENDIT_API_BASE_URL,
2183
+ url: '/webhooks',
2184
+ });
2185
+ return ((_a = response === null || response === void 0 ? void 0 : response.webhooks) !== null && _a !== void 0 ? _a : []).map((w) => {
2186
+ var _a;
2187
+ return ({
2188
+ name: `${String(w.url || w.id).substring(0, 50)} (${((_a = w.events) !== null && _a !== void 0 ? _a : []).join(', ')})`,
2189
+ value: String(w.id),
2190
+ });
2191
+ });
2192
+ },
2193
+ async getLibraryItems() {
2194
+ var _a;
2195
+ const response = await this.helpers.httpRequestWithAuthentication.call(this, 'sendItApi', {
2196
+ method: 'GET',
2197
+ baseURL: constants_1.SENDIT_API_BASE_URL,
2198
+ url: '/library',
2199
+ qs: { limit: 100 },
2200
+ });
2201
+ return ((_a = response === null || response === void 0 ? void 0 : response.items) !== null && _a !== void 0 ? _a : []).map((item) => ({
2202
+ name: String(item.title || item.id),
2203
+ value: String(item.id),
2204
+ }));
2205
+ },
2206
+ async getListeningKeywords() {
2207
+ var _a;
2208
+ const response = await this.helpers.httpRequestWithAuthentication.call(this, 'sendItApi', {
2209
+ method: 'GET',
2210
+ baseURL: constants_1.SENDIT_API_BASE_URL,
2211
+ url: '/listening/keywords',
2212
+ });
2213
+ return ((_a = response === null || response === void 0 ? void 0 : response.keywords) !== null && _a !== void 0 ? _a : []).map((k) => ({
2214
+ name: `${String(k.keyword)} (${String(k.type || 'custom')})`,
2215
+ value: String(k.id),
2216
+ }));
2217
+ },
2218
+ async getConnectedPlatforms() {
2219
+ var _a;
2220
+ const response = await this.helpers.httpRequestWithAuthentication.call(this, 'sendItApi', {
2221
+ method: 'GET',
2222
+ baseURL: constants_1.SENDIT_API_BASE_URL,
2223
+ url: '/accounts',
2224
+ qs: { limit: 100 },
2225
+ });
2226
+ const seen = new Set();
2227
+ return ((_a = response === null || response === void 0 ? void 0 : response.accounts) !== null && _a !== void 0 ? _a : [])
2228
+ .filter((a) => {
2229
+ const p = String(a.platform);
2230
+ if (seen.has(p))
2231
+ return false;
2232
+ seen.add(p);
2233
+ return true;
2234
+ })
2235
+ .map((a) => ({
2236
+ name: String(a.platform).charAt(0).toUpperCase() + String(a.platform).slice(1),
2237
+ value: String(a.platform),
2238
+ }));
2239
+ },
2240
+ async getDeadLetterPosts() {
2241
+ var _a;
2242
+ const response = await this.helpers.httpRequestWithAuthentication.call(this, 'sendItApi', {
2243
+ method: 'GET',
2244
+ baseURL: constants_1.SENDIT_API_BASE_URL,
2245
+ url: '/dead-letter',
2246
+ qs: { limit: 50 },
2247
+ });
2248
+ return ((_a = response === null || response === void 0 ? void 0 : response.posts) !== null && _a !== void 0 ? _a : []).map((dl) => {
2249
+ var _a;
2250
+ return ({
2251
+ name: `${String(dl.id)} — ${((_a = dl.platforms) !== null && _a !== void 0 ? _a : []).join(', ')}`,
2252
+ value: String(dl.id),
2253
+ });
2254
+ });
2255
+ },
2256
+ async getInboxThreads() {
2257
+ var _a;
2258
+ const response = await this.helpers.httpRequestWithAuthentication.call(this, 'sendItApi', {
2259
+ method: 'GET',
2260
+ baseURL: constants_1.SENDIT_API_BASE_URL,
2261
+ url: '/inbox',
2262
+ qs: { limit: 50 },
2263
+ });
2264
+ return ((_a = response === null || response === void 0 ? void 0 : response.threads) !== null && _a !== void 0 ? _a : []).map((t) => ({
2265
+ name: `${String(t.platform || 'unknown')} — ${String(t.id)}`,
2266
+ value: String(t.id),
2267
+ }));
2268
+ },
2269
+ },
2270
+ };
1764
2271
  }
1765
2272
  async execute() {
1766
2273
  const items = this.getInputData();