n8n-nodes-socialfetch 0.1.0

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.
@@ -0,0 +1,634 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.reddit = void 0;
4
+ const pagination_1 = require("../shared/pagination");
5
+ exports.reddit = [
6
+ {
7
+ "displayName": "Operation",
8
+ "name": "operation",
9
+ "type": "options",
10
+ "noDataExpression": true,
11
+ "displayOptions": {
12
+ "show": {
13
+ "resource": [
14
+ "reddit"
15
+ ]
16
+ }
17
+ },
18
+ "default": "reddit.subreddit.get",
19
+ "options": [
20
+ {
21
+ "name": "Subreddit",
22
+ "value": "reddit.subreddit.get",
23
+ "action": "Get Reddit subreddit",
24
+ "description": "Get details for a Reddit community.",
25
+ "routing": {
26
+ "request": {
27
+ "method": "GET",
28
+ "url": "/v1/reddit/subreddits"
29
+ }
30
+ }
31
+ },
32
+ {
33
+ "name": "Search",
34
+ "value": "reddit.search.list",
35
+ "action": "Search Reddit posts",
36
+ "description": "Search for posts on Reddit.",
37
+ "routing": {
38
+ "request": {
39
+ "method": "GET",
40
+ "url": "/v1/reddit/search"
41
+ },
42
+ "send": {
43
+ "paginate": "={{$parameter[\"returnAll\"]}}"
44
+ },
45
+ "operations": {
46
+ "pagination": pagination_1.cursorPagination
47
+ }
48
+ }
49
+ },
50
+ {
51
+ "name": "Subreddit posts",
52
+ "value": "reddit.subreddit.posts.list",
53
+ "action": "List Reddit subreddit posts",
54
+ "description": "Get posts from a specific subreddit.",
55
+ "routing": {
56
+ "request": {
57
+ "method": "GET",
58
+ "url": "=/v1/reddit/subreddits/{{$parameter[\"subreddit\"]}}/posts"
59
+ },
60
+ "send": {
61
+ "paginate": "={{$parameter[\"returnAll\"]}}"
62
+ },
63
+ "operations": {
64
+ "pagination": pagination_1.cursorPagination
65
+ }
66
+ }
67
+ },
68
+ {
69
+ "name": "Subreddit search",
70
+ "value": "reddit.subreddit.search.list",
71
+ "action": "Search Reddit subreddit",
72
+ "description": "Search posts within a subreddit.",
73
+ "routing": {
74
+ "request": {
75
+ "method": "GET",
76
+ "url": "/v1/reddit/subreddits/search"
77
+ },
78
+ "send": {
79
+ "paginate": "={{$parameter[\"returnAll\"]}}"
80
+ },
81
+ "operations": {
82
+ "pagination": pagination_1.cursorPagination
83
+ }
84
+ }
85
+ },
86
+ {
87
+ "name": "Post comments",
88
+ "value": "reddit.post.comments.list",
89
+ "action": "List Reddit post comments",
90
+ "description": "Get comments on a Reddit post.",
91
+ "routing": {
92
+ "request": {
93
+ "method": "GET",
94
+ "url": "/v1/reddit/posts/comments"
95
+ },
96
+ "send": {
97
+ "paginate": "={{$parameter[\"returnAll\"]}}"
98
+ },
99
+ "operations": {
100
+ "pagination": pagination_1.cursorPagination
101
+ }
102
+ }
103
+ }
104
+ ]
105
+ },
106
+ {
107
+ "displayName": "Additional Fields",
108
+ "name": "additionalOptions",
109
+ "type": "collection",
110
+ "placeholder": "Add Field",
111
+ "default": {},
112
+ "displayOptions": {
113
+ "show": {
114
+ "resource": [
115
+ "reddit"
116
+ ],
117
+ "operation": [
118
+ "reddit.subreddit.get"
119
+ ]
120
+ }
121
+ },
122
+ "options": [
123
+ {
124
+ "displayName": "Subreddit",
125
+ "name": "subreddit",
126
+ "type": "string",
127
+ "default": "",
128
+ "description": "Subreddit name, optional `r/` prefix, or Reddit subreddit URL. Must match Reddit's exact casing (for example `AskReddit`, not `askreddit`).",
129
+ "routing": {
130
+ "send": {
131
+ "type": "query",
132
+ "property": "subreddit"
133
+ }
134
+ }
135
+ },
136
+ {
137
+ "displayName": "Url",
138
+ "name": "url",
139
+ "type": "string",
140
+ "default": "",
141
+ "description": "Optional subreddit URL for the request.",
142
+ "placeholder": "e.g. https://example.com/page",
143
+ "routing": {
144
+ "send": {
145
+ "type": "query",
146
+ "property": "url"
147
+ }
148
+ }
149
+ }
150
+ ]
151
+ },
152
+ {
153
+ "displayName": "Return All",
154
+ "name": "returnAll",
155
+ "type": "boolean",
156
+ "default": false,
157
+ "description": "Whether to return all results by paginating through every page, or only the first page. Each page consumes API credits.",
158
+ "displayOptions": {
159
+ "show": {
160
+ "resource": [
161
+ "reddit"
162
+ ],
163
+ "operation": [
164
+ "reddit.search.list"
165
+ ]
166
+ }
167
+ }
168
+ },
169
+ {
170
+ "displayName": "Query",
171
+ "name": "query",
172
+ "type": "string",
173
+ "default": "",
174
+ "description": "Search query text for public Reddit posts.",
175
+ "placeholder": "e.g. automation",
176
+ "required": true,
177
+ "routing": {
178
+ "send": {
179
+ "type": "query",
180
+ "property": "query"
181
+ }
182
+ },
183
+ "displayOptions": {
184
+ "show": {
185
+ "resource": [
186
+ "reddit"
187
+ ],
188
+ "operation": [
189
+ "reddit.search.list"
190
+ ]
191
+ }
192
+ }
193
+ },
194
+ {
195
+ "displayName": "Additional Fields",
196
+ "name": "additionalOptions",
197
+ "type": "collection",
198
+ "placeholder": "Add Field",
199
+ "default": {},
200
+ "displayOptions": {
201
+ "show": {
202
+ "resource": [
203
+ "reddit"
204
+ ],
205
+ "operation": [
206
+ "reddit.search.list"
207
+ ]
208
+ }
209
+ },
210
+ "options": [
211
+ {
212
+ "displayName": "Sort By",
213
+ "name": "sortBy",
214
+ "type": "options",
215
+ "options": [
216
+ {
217
+ "name": "Relevance",
218
+ "value": "relevance"
219
+ },
220
+ {
221
+ "name": "New",
222
+ "value": "new"
223
+ },
224
+ {
225
+ "name": "Top",
226
+ "value": "top"
227
+ }
228
+ ],
229
+ "default": "relevance",
230
+ "description": "Optional sort order for search results.",
231
+ "routing": {
232
+ "send": {
233
+ "type": "query",
234
+ "property": "sortBy"
235
+ }
236
+ }
237
+ },
238
+ {
239
+ "displayName": "Timeframe",
240
+ "name": "timeframe",
241
+ "type": "options",
242
+ "options": [
243
+ {
244
+ "name": "All",
245
+ "value": "all"
246
+ },
247
+ {
248
+ "name": "Day",
249
+ "value": "day"
250
+ },
251
+ {
252
+ "name": "Week",
253
+ "value": "week"
254
+ },
255
+ {
256
+ "name": "Month",
257
+ "value": "month"
258
+ },
259
+ {
260
+ "name": "Year",
261
+ "value": "year"
262
+ }
263
+ ],
264
+ "default": "all",
265
+ "description": "Optional time range filter for search results.",
266
+ "routing": {
267
+ "send": {
268
+ "type": "query",
269
+ "property": "timeframe"
270
+ }
271
+ }
272
+ },
273
+ {
274
+ "displayName": "Trim",
275
+ "name": "trim",
276
+ "type": "boolean",
277
+ "default": false,
278
+ "description": "Whether to request a smaller response shape when available.",
279
+ "routing": {
280
+ "send": {
281
+ "type": "query",
282
+ "property": "trim"
283
+ }
284
+ }
285
+ }
286
+ ]
287
+ },
288
+ {
289
+ "displayName": "Return All",
290
+ "name": "returnAll",
291
+ "type": "boolean",
292
+ "default": false,
293
+ "description": "Whether to return all results by paginating through every page, or only the first page. Each page consumes API credits.",
294
+ "displayOptions": {
295
+ "show": {
296
+ "resource": [
297
+ "reddit"
298
+ ],
299
+ "operation": [
300
+ "reddit.subreddit.posts.list"
301
+ ]
302
+ }
303
+ }
304
+ },
305
+ {
306
+ "displayName": "Subreddit",
307
+ "name": "subreddit",
308
+ "type": "string",
309
+ "default": "",
310
+ "description": "Subreddit name, optional `r/` prefix, or Reddit subreddit URL. Must match Reddit's exact casing (for example `AskReddit`, not `askreddit`). Lists posts for this subreddit.",
311
+ "required": true,
312
+ "displayOptions": {
313
+ "show": {
314
+ "resource": [
315
+ "reddit"
316
+ ],
317
+ "operation": [
318
+ "reddit.subreddit.posts.list"
319
+ ]
320
+ }
321
+ }
322
+ },
323
+ {
324
+ "displayName": "Additional Fields",
325
+ "name": "additionalOptions",
326
+ "type": "collection",
327
+ "placeholder": "Add Field",
328
+ "default": {},
329
+ "displayOptions": {
330
+ "show": {
331
+ "resource": [
332
+ "reddit"
333
+ ],
334
+ "operation": [
335
+ "reddit.subreddit.posts.list"
336
+ ]
337
+ }
338
+ },
339
+ "options": [
340
+ {
341
+ "displayName": "Sort",
342
+ "name": "sort",
343
+ "type": "options",
344
+ "options": [
345
+ {
346
+ "name": "Best",
347
+ "value": "best"
348
+ },
349
+ {
350
+ "name": "Hot",
351
+ "value": "hot"
352
+ },
353
+ {
354
+ "name": "New",
355
+ "value": "new"
356
+ },
357
+ {
358
+ "name": "Top",
359
+ "value": "top"
360
+ },
361
+ {
362
+ "name": "Rising",
363
+ "value": "rising"
364
+ }
365
+ ],
366
+ "default": "best",
367
+ "description": "Optional sort order for the returned posts.",
368
+ "routing": {
369
+ "send": {
370
+ "type": "query",
371
+ "property": "sort"
372
+ }
373
+ }
374
+ },
375
+ {
376
+ "displayName": "Timeframe",
377
+ "name": "timeframe",
378
+ "type": "options",
379
+ "options": [
380
+ {
381
+ "name": "All",
382
+ "value": "all"
383
+ },
384
+ {
385
+ "name": "Day",
386
+ "value": "day"
387
+ },
388
+ {
389
+ "name": "Week",
390
+ "value": "week"
391
+ },
392
+ {
393
+ "name": "Month",
394
+ "value": "month"
395
+ },
396
+ {
397
+ "name": "Year",
398
+ "value": "year"
399
+ }
400
+ ],
401
+ "default": "all",
402
+ "description": "Optional timeframe used with time-based sort orders.",
403
+ "routing": {
404
+ "send": {
405
+ "type": "query",
406
+ "property": "timeframe"
407
+ }
408
+ }
409
+ }
410
+ ]
411
+ },
412
+ {
413
+ "displayName": "Return All",
414
+ "name": "returnAll",
415
+ "type": "boolean",
416
+ "default": false,
417
+ "description": "Whether to return all results by paginating through every page, or only the first page. Each page consumes API credits.",
418
+ "displayOptions": {
419
+ "show": {
420
+ "resource": [
421
+ "reddit"
422
+ ],
423
+ "operation": [
424
+ "reddit.subreddit.search.list"
425
+ ]
426
+ }
427
+ }
428
+ },
429
+ {
430
+ "displayName": "Subreddit",
431
+ "name": "subreddit",
432
+ "type": "string",
433
+ "default": "",
434
+ "description": "Subreddit name, optional `r/` prefix, or Reddit subreddit URL. Must match Reddit's exact casing (for example `AskReddit`, not `askreddit`). Searches posts within this subreddit.",
435
+ "required": true,
436
+ "routing": {
437
+ "send": {
438
+ "type": "query",
439
+ "property": "subreddit"
440
+ }
441
+ },
442
+ "displayOptions": {
443
+ "show": {
444
+ "resource": [
445
+ "reddit"
446
+ ],
447
+ "operation": [
448
+ "reddit.subreddit.search.list"
449
+ ]
450
+ }
451
+ }
452
+ },
453
+ {
454
+ "displayName": "Additional Fields",
455
+ "name": "additionalOptions",
456
+ "type": "collection",
457
+ "placeholder": "Add Field",
458
+ "default": {},
459
+ "displayOptions": {
460
+ "show": {
461
+ "resource": [
462
+ "reddit"
463
+ ],
464
+ "operation": [
465
+ "reddit.subreddit.search.list"
466
+ ]
467
+ }
468
+ },
469
+ "options": [
470
+ {
471
+ "displayName": "Query",
472
+ "name": "query",
473
+ "type": "string",
474
+ "default": "",
475
+ "description": "Search text to match against public subreddit posts.",
476
+ "placeholder": "e.g. automation",
477
+ "routing": {
478
+ "send": {
479
+ "type": "query",
480
+ "property": "query"
481
+ }
482
+ }
483
+ },
484
+ {
485
+ "displayName": "Sort",
486
+ "name": "sort",
487
+ "type": "options",
488
+ "options": [
489
+ {
490
+ "name": "Relevance",
491
+ "value": "relevance"
492
+ },
493
+ {
494
+ "name": "Hot",
495
+ "value": "hot"
496
+ },
497
+ {
498
+ "name": "Top",
499
+ "value": "top"
500
+ },
501
+ {
502
+ "name": "New",
503
+ "value": "new"
504
+ },
505
+ {
506
+ "name": "Comments",
507
+ "value": "comments"
508
+ }
509
+ ],
510
+ "default": "relevance",
511
+ "description": "Optional sort order for search results. Defaults to relevance when omitted.",
512
+ "routing": {
513
+ "send": {
514
+ "type": "query",
515
+ "property": "sort"
516
+ }
517
+ }
518
+ },
519
+ {
520
+ "displayName": "Timeframe",
521
+ "name": "timeframe",
522
+ "type": "options",
523
+ "options": [
524
+ {
525
+ "name": "All",
526
+ "value": "all"
527
+ },
528
+ {
529
+ "name": "Year",
530
+ "value": "year"
531
+ },
532
+ {
533
+ "name": "Month",
534
+ "value": "month"
535
+ },
536
+ {
537
+ "name": "Week",
538
+ "value": "week"
539
+ },
540
+ {
541
+ "name": "Day",
542
+ "value": "day"
543
+ },
544
+ {
545
+ "name": "Hour",
546
+ "value": "hour"
547
+ }
548
+ ],
549
+ "default": "all",
550
+ "description": "Optional time range filter for search results. Defaults to all when omitted.",
551
+ "routing": {
552
+ "send": {
553
+ "type": "query",
554
+ "property": "timeframe"
555
+ }
556
+ }
557
+ }
558
+ ]
559
+ },
560
+ {
561
+ "displayName": "Return All",
562
+ "name": "returnAll",
563
+ "type": "boolean",
564
+ "default": false,
565
+ "description": "Whether to return all results by paginating through every page, or only the first page. Each page consumes API credits.",
566
+ "displayOptions": {
567
+ "show": {
568
+ "resource": [
569
+ "reddit"
570
+ ],
571
+ "operation": [
572
+ "reddit.post.comments.list"
573
+ ]
574
+ }
575
+ }
576
+ },
577
+ {
578
+ "displayName": "Url",
579
+ "name": "url",
580
+ "type": "string",
581
+ "default": "",
582
+ "description": "Link to the Reddit post whose comments should be listed.",
583
+ "placeholder": "e.g. https://example.com/page",
584
+ "required": true,
585
+ "routing": {
586
+ "send": {
587
+ "type": "query",
588
+ "property": "url"
589
+ }
590
+ },
591
+ "displayOptions": {
592
+ "show": {
593
+ "resource": [
594
+ "reddit"
595
+ ],
596
+ "operation": [
597
+ "reddit.post.comments.list"
598
+ ]
599
+ }
600
+ }
601
+ },
602
+ {
603
+ "displayName": "Additional Fields",
604
+ "name": "additionalOptions",
605
+ "type": "collection",
606
+ "placeholder": "Add Field",
607
+ "default": {},
608
+ "displayOptions": {
609
+ "show": {
610
+ "resource": [
611
+ "reddit"
612
+ ],
613
+ "operation": [
614
+ "reddit.post.comments.list"
615
+ ]
616
+ }
617
+ },
618
+ "options": [
619
+ {
620
+ "displayName": "Trim",
621
+ "name": "trim",
622
+ "type": "boolean",
623
+ "default": false,
624
+ "description": "When true, requests a lighter response shape when available.",
625
+ "routing": {
626
+ "send": {
627
+ "type": "query",
628
+ "property": "trim"
629
+ }
630
+ }
631
+ }
632
+ ]
633
+ }
634
+ ];