@rizkifirmansyah/n8n-nodes-threads-api 1.0.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.
Files changed (39) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +165 -0
  3. package/dist/credentials/ThreadsApi.credentials.d.ts +10 -0
  4. package/dist/credentials/ThreadsApi.credentials.js +43 -0
  5. package/dist/credentials/ThreadsApi.credentials.js.map +1 -0
  6. package/dist/credentials/ThreadsOAuth2Api.credentials.d.ts +11 -0
  7. package/dist/credentials/ThreadsOAuth2Api.credentials.js +69 -0
  8. package/dist/credentials/ThreadsOAuth2Api.credentials.js.map +1 -0
  9. package/dist/credentials/threads.dark.svg +4 -0
  10. package/dist/credentials/threads.svg +4 -0
  11. package/dist/nodes/Threads/GenericFunctions.d.ts +6 -0
  12. package/dist/nodes/Threads/GenericFunctions.js +94 -0
  13. package/dist/nodes/Threads/GenericFunctions.js.map +1 -0
  14. package/dist/nodes/Threads/InsightDescription.d.ts +3 -0
  15. package/dist/nodes/Threads/InsightDescription.js +171 -0
  16. package/dist/nodes/Threads/InsightDescription.js.map +1 -0
  17. package/dist/nodes/Threads/PostDescription.d.ts +3 -0
  18. package/dist/nodes/Threads/PostDescription.js +417 -0
  19. package/dist/nodes/Threads/PostDescription.js.map +1 -0
  20. package/dist/nodes/Threads/ReplyDescription.d.ts +3 -0
  21. package/dist/nodes/Threads/ReplyDescription.js +308 -0
  22. package/dist/nodes/Threads/ReplyDescription.js.map +1 -0
  23. package/dist/nodes/Threads/SearchDescription.d.ts +3 -0
  24. package/dist/nodes/Threads/SearchDescription.js +95 -0
  25. package/dist/nodes/Threads/SearchDescription.js.map +1 -0
  26. package/dist/nodes/Threads/Threads.node.d.ts +5 -0
  27. package/dist/nodes/Threads/Threads.node.js +512 -0
  28. package/dist/nodes/Threads/Threads.node.js.map +1 -0
  29. package/dist/nodes/Threads/ThreadsTrigger.node.d.ts +5 -0
  30. package/dist/nodes/Threads/ThreadsTrigger.node.js +139 -0
  31. package/dist/nodes/Threads/ThreadsTrigger.node.js.map +1 -0
  32. package/dist/nodes/Threads/UserDescription.d.ts +3 -0
  33. package/dist/nodes/Threads/UserDescription.js +94 -0
  34. package/dist/nodes/Threads/UserDescription.js.map +1 -0
  35. package/dist/nodes/Threads/threads.dark.svg +3 -0
  36. package/dist/nodes/Threads/threads.svg +3 -0
  37. package/dist/package.json +60 -0
  38. package/dist/tsconfig.tsbuildinfo +1 -0
  39. package/package.json +60 -0
@@ -0,0 +1,308 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.replyFields = exports.replyOperations = void 0;
4
+ exports.replyOperations = [
5
+ {
6
+ displayName: 'Operation',
7
+ name: 'operation',
8
+ type: 'options',
9
+ noDataExpression: true,
10
+ displayOptions: {
11
+ show: {
12
+ resource: ['reply'],
13
+ },
14
+ },
15
+ options: [
16
+ {
17
+ name: 'Create',
18
+ value: 'create',
19
+ description: 'Create a reply to a post or comment',
20
+ action: 'Create a reply',
21
+ },
22
+ {
23
+ name: 'Get Conversation',
24
+ value: 'getConversation',
25
+ description: 'Get all replies in a conversation thread',
26
+ action: 'Get conversation thread',
27
+ },
28
+ {
29
+ name: 'Get Many',
30
+ value: 'getAll',
31
+ description: 'Get replies made directly to a specific post',
32
+ action: 'Get replies to a post',
33
+ },
34
+ {
35
+ name: 'Manage (Hide/Unhide)',
36
+ value: 'manage',
37
+ description: 'Hide or unhide a reply on your post',
38
+ action: 'Manage reply visibility',
39
+ },
40
+ ],
41
+ default: 'create',
42
+ },
43
+ ];
44
+ exports.replyFields = [
45
+ {
46
+ displayName: 'User ID',
47
+ name: 'userId',
48
+ type: 'string',
49
+ default: 'me',
50
+ required: true,
51
+ displayOptions: {
52
+ show: {
53
+ resource: ['reply'],
54
+ operation: ['create'],
55
+ },
56
+ },
57
+ description: 'The Threads User ID or "me" for authenticated user',
58
+ },
59
+ {
60
+ displayName: 'Reply To ID',
61
+ name: 'replyToId',
62
+ type: 'string',
63
+ default: '',
64
+ required: true,
65
+ displayOptions: {
66
+ show: {
67
+ resource: ['reply'],
68
+ operation: ['create'],
69
+ },
70
+ },
71
+ description: 'The ID of the post or reply you want to respond to',
72
+ },
73
+ {
74
+ displayName: 'Media Type',
75
+ name: 'mediaType',
76
+ type: 'options',
77
+ options: [
78
+ {
79
+ name: 'Text',
80
+ value: 'TEXT',
81
+ description: 'Reply with text',
82
+ },
83
+ {
84
+ name: 'Image',
85
+ value: 'IMAGE',
86
+ description: 'Reply with an image',
87
+ },
88
+ {
89
+ name: 'Video',
90
+ value: 'VIDEO',
91
+ description: 'Reply with a video',
92
+ },
93
+ ],
94
+ default: 'TEXT',
95
+ required: true,
96
+ displayOptions: {
97
+ show: {
98
+ resource: ['reply'],
99
+ operation: ['create'],
100
+ },
101
+ },
102
+ description: 'The type of reply to post',
103
+ },
104
+ {
105
+ displayName: 'Text',
106
+ name: 'text',
107
+ type: 'string',
108
+ typeOptions: {
109
+ rows: 4,
110
+ },
111
+ default: '',
112
+ required: true,
113
+ displayOptions: {
114
+ show: {
115
+ resource: ['reply'],
116
+ operation: ['create'],
117
+ mediaType: ['TEXT'],
118
+ },
119
+ },
120
+ description: 'The text content of the reply (up to 500 characters)',
121
+ },
122
+ {
123
+ displayName: 'Text',
124
+ name: 'text',
125
+ type: 'string',
126
+ typeOptions: {
127
+ rows: 4,
128
+ },
129
+ default: '',
130
+ displayOptions: {
131
+ show: {
132
+ resource: ['reply'],
133
+ operation: ['create'],
134
+ mediaType: ['IMAGE', 'VIDEO'],
135
+ },
136
+ },
137
+ description: 'The caption text for the media reply',
138
+ },
139
+ {
140
+ displayName: 'Image URL',
141
+ name: 'imageUrl',
142
+ type: 'string',
143
+ default: '',
144
+ required: true,
145
+ displayOptions: {
146
+ show: {
147
+ resource: ['reply'],
148
+ operation: ['create'],
149
+ mediaType: ['IMAGE'],
150
+ },
151
+ },
152
+ description: 'The publicly accessible URL of the image',
153
+ },
154
+ {
155
+ displayName: 'Video URL',
156
+ name: 'videoUrl',
157
+ type: 'string',
158
+ default: '',
159
+ required: true,
160
+ displayOptions: {
161
+ show: {
162
+ resource: ['reply'],
163
+ operation: ['create'],
164
+ mediaType: ['VIDEO'],
165
+ },
166
+ },
167
+ description: 'The publicly accessible URL of the video',
168
+ },
169
+ {
170
+ displayName: 'Additional Fields',
171
+ name: 'additionalFields',
172
+ type: 'collection',
173
+ placeholder: 'Add Field',
174
+ default: {},
175
+ displayOptions: {
176
+ show: {
177
+ resource: ['reply'],
178
+ operation: ['create'],
179
+ },
180
+ },
181
+ options: [
182
+ {
183
+ displayName: 'Alt Text',
184
+ name: 'altText',
185
+ type: 'string',
186
+ default: '',
187
+ description: 'Accessibility description for image or video reply',
188
+ },
189
+ {
190
+ displayName: 'Link Attachment',
191
+ name: 'linkAttachment',
192
+ type: 'string',
193
+ default: '',
194
+ description: 'URL to attach to a text reply',
195
+ },
196
+ {
197
+ displayName: 'Topic Tag',
198
+ name: 'topicTag',
199
+ type: 'string',
200
+ default: '',
201
+ description: 'A tag/topic for the reply',
202
+ },
203
+ ],
204
+ },
205
+ {
206
+ displayName: 'Media ID',
207
+ name: 'mediaId',
208
+ type: 'string',
209
+ default: '',
210
+ required: true,
211
+ displayOptions: {
212
+ show: {
213
+ resource: ['reply'],
214
+ operation: ['getAll', 'getConversation', 'manage'],
215
+ },
216
+ },
217
+ description: 'The ID of the post/reply',
218
+ },
219
+ {
220
+ displayName: 'Hide Reply',
221
+ name: 'hide',
222
+ type: 'boolean',
223
+ default: true,
224
+ required: true,
225
+ displayOptions: {
226
+ show: {
227
+ resource: ['reply'],
228
+ operation: ['manage'],
229
+ },
230
+ },
231
+ description: 'Whether to hide (true) or unhide (false) the reply',
232
+ },
233
+ {
234
+ displayName: 'Return All',
235
+ name: 'returnAll',
236
+ type: 'boolean',
237
+ displayOptions: {
238
+ show: {
239
+ resource: ['reply'],
240
+ operation: ['getAll', 'getConversation'],
241
+ },
242
+ },
243
+ default: false,
244
+ description: 'Whether to return all results or only up to a given limit',
245
+ },
246
+ {
247
+ displayName: 'Limit',
248
+ name: 'limit',
249
+ type: 'number',
250
+ displayOptions: {
251
+ show: {
252
+ resource: ['reply'],
253
+ operation: ['getAll', 'getConversation'],
254
+ returnAll: [false],
255
+ },
256
+ },
257
+ typeOptions: {
258
+ minValue: 1,
259
+ maxValue: 100,
260
+ },
261
+ default: 50,
262
+ description: 'Max number of results to return',
263
+ },
264
+ {
265
+ displayName: 'Options',
266
+ name: 'options',
267
+ type: 'collection',
268
+ placeholder: 'Add Option',
269
+ default: {},
270
+ displayOptions: {
271
+ show: {
272
+ resource: ['reply'],
273
+ operation: ['getAll', 'getConversation'],
274
+ },
275
+ },
276
+ options: [
277
+ {
278
+ displayName: 'After',
279
+ name: 'after',
280
+ type: 'string',
281
+ default: '',
282
+ description: 'Cursor pointing to end of page for forward pagination',
283
+ },
284
+ {
285
+ displayName: 'Before',
286
+ name: 'before',
287
+ type: 'string',
288
+ default: '',
289
+ description: 'Cursor pointing to start of page for backward pagination',
290
+ },
291
+ {
292
+ displayName: 'Fields',
293
+ name: 'fields',
294
+ type: 'string',
295
+ default: 'id,text,timestamp,username,permalink,media_product_type,media_type,media_url,shortcode,hide_status,has_replies,root_post,replied_to,is_reply',
296
+ description: 'Comma-separated list of fields to return',
297
+ },
298
+ {
299
+ displayName: 'Reverse Order',
300
+ name: 'reverse',
301
+ type: 'boolean',
302
+ default: false,
303
+ description: 'Whether to return replies in chronological or reverse chronological order',
304
+ },
305
+ ],
306
+ },
307
+ ];
308
+ //# sourceMappingURL=ReplyDescription.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ReplyDescription.js","sourceRoot":"","sources":["../../../nodes/Threads/ReplyDescription.ts"],"names":[],"mappings":";;;AAEa,QAAA,eAAe,GAAsB;IACjD;QACC,WAAW,EAAE,WAAW;QACxB,IAAI,EAAE,WAAW;QACjB,IAAI,EAAE,SAAS;QACf,gBAAgB,EAAE,IAAI;QACtB,cAAc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QACD,OAAO,EAAE,EAAE;QACX,WAAW,EAAE,iCAAiC;KAC9C;IACD;QACC,WAAW,EAAE,SAAS;QACtB,IAAI,EAAE,SAAS;QACf,IAAI,EAAE,YAAY;QAClB,WAAW,EAAE,YAAY;QACzB,OAAO,EAAE,EAAE;QACX,cAAc,EAAE;YACf,IAAI,EAAE;gBACL,QAAQ,EAAE,CAAC,OAAO,CAAC;gBACnB,SAAS,EAAE,CAAC,QAAQ,EAAE,iBAAiB,CAAC;aACxC;SACD;QACD,OAAO,EAAE;YACR;gBACC,WAAW,EAAE,OAAO;gBACpB,IAAI,EAAE,OAAO;gBACb,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,EAAE;gBACX,WAAW,EAAE,uDAAuD;aACpE;YACD;gBACC,WAAW,EAAE,QAAQ;gBACrB,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,EAAE;gBACX,WAAW,EAAE,0DAA0D;aACvE;YACD;gBACC,WAAW,EAAE,QAAQ;gBACrB,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,8IAA8I;gBACvJ,WAAW,EAAE,0CAA0C;aACvD;YACD;gBACC,WAAW,EAAE,eAAe;gBAC5B,IAAI,EAAE,SAAS;gBACf,IAAI,EAAE,SAAS;gBACf,OAAO,EAAE,KAAK;gBACd,WAAW,EAAE,2EAA2E;aACxF;SACD;KACD;CACD,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { INodeProperties } from 'n8n-workflow';
2
+ export declare const searchOperations: INodeProperties[];
3
+ export declare const searchFields: INodeProperties[];
@@ -0,0 +1,95 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.searchFields = exports.searchOperations = void 0;
4
+ exports.searchOperations = [
5
+ {
6
+ displayName: 'Operation',
7
+ name: 'operation',
8
+ type: 'options',
9
+ noDataExpression: true,
10
+ displayOptions: {
11
+ show: {
12
+ resource: ['search'],
13
+ },
14
+ },
15
+ options: [
16
+ {
17
+ name: 'Keyword Search',
18
+ value: 'keyword',
19
+ description: 'Search public Threads posts by keyword',
20
+ action: 'Search posts by keyword',
21
+ },
22
+ ],
23
+ default: 'keyword',
24
+ },
25
+ ];
26
+ exports.searchFields = [
27
+ {
28
+ displayName: 'Query',
29
+ name: 'query',
30
+ type: 'string',
31
+ default: '',
32
+ required: true,
33
+ displayOptions: {
34
+ show: {
35
+ resource: ['search'],
36
+ operation: ['keyword'],
37
+ },
38
+ },
39
+ description: 'The search query keyword',
40
+ },
41
+ {
42
+ displayName: 'Return All',
43
+ name: 'returnAll',
44
+ type: 'boolean',
45
+ displayOptions: {
46
+ show: {
47
+ resource: ['search'],
48
+ operation: ['keyword'],
49
+ },
50
+ },
51
+ default: false,
52
+ description: 'Whether to return all results or only up to a given limit',
53
+ },
54
+ {
55
+ displayName: 'Limit',
56
+ name: 'limit',
57
+ type: 'number',
58
+ displayOptions: {
59
+ show: {
60
+ resource: ['search'],
61
+ operation: ['keyword'],
62
+ returnAll: [false],
63
+ },
64
+ },
65
+ typeOptions: {
66
+ minValue: 1,
67
+ maxValue: 100,
68
+ },
69
+ default: 50,
70
+ description: 'Max number of results to return',
71
+ },
72
+ {
73
+ displayName: 'Options',
74
+ name: 'options',
75
+ type: 'collection',
76
+ placeholder: 'Add Option',
77
+ default: {},
78
+ displayOptions: {
79
+ show: {
80
+ resource: ['search'],
81
+ operation: ['keyword'],
82
+ },
83
+ },
84
+ options: [
85
+ {
86
+ displayName: 'Fields',
87
+ name: 'fields',
88
+ type: 'string',
89
+ default: 'id,text,timestamp,username,permalink,media_product_type,media_type,media_url,shortcode',
90
+ description: 'Comma-separated list of fields to return',
91
+ },
92
+ ],
93
+ },
94
+ ];
95
+ //# sourceMappingURL=SearchDescription.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SearchDescription.js","sourceRoot":"","sources":["../../../nodes/Threads/SearchDescription.ts"],"names":[],"mappings":";;;AAEa,QAA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AG;SACb;QACD,OAAO,EAAE,EAAE;QACX,WAAW,EAAE,iCAAiC;KAC9C;IACD;QACC,WAAW,EAAE,SAAS;QACtB,IAAI,EAAE,SAAS;QACf,IAAI,EAAE,YAAY;QAClB,WAAW,EAAE,YAAY;QACzB,OAAO,EAAE,EAAE;QACX,cAAc,EAAE;YACf,IAAI,EAAE;gBACL,QAAQ,EAAE,CAAC,QAAQ,CAAC;gBACpB,SAAS,EAAE,CAAC,SAAS,CAAC;aACtB;SACD;QACD,OAAO,EAAE;YACR;gBACC,WAAW,EAAE,QAAQ;gBACrB,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,wFAAwF;gBACjG,WAAW,EAAE,0CAA0C;aACvD;SACD;KACD;CACD,CAAC"}
@@ -0,0 +1,5 @@
1
+ import type { IExecuteFunctions, INodeExecutionData, INodeType, INodeTypeDescription } from 'n8n-workflow';
2
+ export declare class Threads implements INodeType {
3
+ description: INodeTypeDescription;
4
+ execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]>;
5
+ }