n8n-nodes-postwire 0.2.4 → 0.3.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.
- package/README.md +92 -28
- package/dist/credentials/PostWireApi.credentials.js +1 -6
- package/dist/credentials/PostWireApi.credentials.js.map +1 -0
- package/dist/nodes/PostWire/Description.d.ts +9 -0
- package/dist/nodes/PostWire/Description.js +669 -0
- package/dist/nodes/PostWire/Description.js.map +1 -0
- package/dist/nodes/PostWire/GenericFunctions.d.ts +38 -0
- package/dist/nodes/PostWire/GenericFunctions.js +357 -0
- package/dist/nodes/PostWire/GenericFunctions.js.map +1 -0
- package/dist/nodes/PostWire/LegacyDescription.d.ts +2 -0
- package/dist/nodes/PostWire/LegacyDescription.js +157 -0
- package/dist/nodes/PostWire/LegacyDescription.js.map +1 -0
- package/dist/nodes/PostWire/PostWire.node.d.ts +6 -1
- package/dist/nodes/PostWire/PostWire.node.js +404 -271
- package/dist/nodes/PostWire/PostWire.node.js.map +1 -0
- package/dist/nodes/PostWire/PostWire.node.json +14 -0
- package/dist/package.json +67 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/package.json +20 -10
- package/index.js +0 -3
|
@@ -0,0 +1,669 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.mediaProperties = exports.accountProperties = exports.connectionProperties = exports.brandProperties = exports.scheduledPostProperties = exports.postProperties = exports.operationProperties = exports.resourceProperty = void 0;
|
|
4
|
+
const GenericFunctions_1 = require("./GenericFunctions");
|
|
5
|
+
const v2 = { '@version': [2] };
|
|
6
|
+
const networkOptions = GenericFunctions_1.PLATFORMS.map((p) => ({ name: p.name, value: p.value }));
|
|
7
|
+
const textNetworkOptions = GenericFunctions_1.PLATFORMS.filter((p) => !p.mediaNeed).map((p) => ({
|
|
8
|
+
name: p.name,
|
|
9
|
+
value: p.value,
|
|
10
|
+
}));
|
|
11
|
+
const brandLocator = (name, displayName, description) => ({
|
|
12
|
+
displayName,
|
|
13
|
+
name,
|
|
14
|
+
type: 'resourceLocator',
|
|
15
|
+
default: { mode: 'list', value: '' },
|
|
16
|
+
description,
|
|
17
|
+
modes: [
|
|
18
|
+
{
|
|
19
|
+
displayName: 'From List',
|
|
20
|
+
name: 'list',
|
|
21
|
+
type: 'list',
|
|
22
|
+
typeOptions: { searchListMethod: 'searchBrands', searchable: true },
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
displayName: 'By ID',
|
|
26
|
+
name: 'id',
|
|
27
|
+
type: 'string',
|
|
28
|
+
placeholder: 'e.g. 3f1c2a9e-8b7d-4c2e-9a51-0d6f2b7c1e44',
|
|
29
|
+
},
|
|
30
|
+
],
|
|
31
|
+
});
|
|
32
|
+
exports.resourceProperty = {
|
|
33
|
+
displayName: 'Resource',
|
|
34
|
+
name: 'resource',
|
|
35
|
+
type: 'options',
|
|
36
|
+
noDataExpression: true,
|
|
37
|
+
displayOptions: { show: { ...v2 } },
|
|
38
|
+
options: [
|
|
39
|
+
{ name: 'Account', value: 'account' },
|
|
40
|
+
{ name: 'Brand', value: 'brand' },
|
|
41
|
+
{ name: 'Connection', value: 'connection' },
|
|
42
|
+
{ name: 'Media', value: 'media' },
|
|
43
|
+
{ name: 'Post', value: 'post' },
|
|
44
|
+
{ name: 'Scheduled Post', value: 'scheduledPost' },
|
|
45
|
+
],
|
|
46
|
+
default: 'post',
|
|
47
|
+
};
|
|
48
|
+
exports.operationProperties = [
|
|
49
|
+
{
|
|
50
|
+
displayName: 'Operation',
|
|
51
|
+
name: 'operation',
|
|
52
|
+
type: 'options',
|
|
53
|
+
noDataExpression: true,
|
|
54
|
+
displayOptions: { show: { ...v2, resource: ['post'] } },
|
|
55
|
+
options: [
|
|
56
|
+
{
|
|
57
|
+
name: 'Get Status',
|
|
58
|
+
value: 'getStatus',
|
|
59
|
+
description: 'Check whether a TikTok or YouTube video has finished processing',
|
|
60
|
+
action: 'Get status of post',
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
name: 'Plan Week',
|
|
64
|
+
value: 'planWeek',
|
|
65
|
+
description: 'One topic in, up to five days of different native posts out, already scheduled one per day',
|
|
66
|
+
action: 'Plan week of posts',
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
name: 'Publish',
|
|
70
|
+
value: 'publish',
|
|
71
|
+
description: 'Publish a post now to one or more networks — with Smart Distribute, each network gets its own native version',
|
|
72
|
+
action: 'Publish post',
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
name: 'Schedule',
|
|
76
|
+
value: 'schedule',
|
|
77
|
+
description: 'Queue a post for later; it is checked now, so a missing video shows up while you watch',
|
|
78
|
+
action: 'Schedule post',
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
name: 'Write Drafts',
|
|
82
|
+
value: 'generate',
|
|
83
|
+
description: 'Preview: write a native post draft for each network without publishing anything',
|
|
84
|
+
action: 'Write post drafts',
|
|
85
|
+
},
|
|
86
|
+
],
|
|
87
|
+
default: 'publish',
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
displayName: 'Operation',
|
|
91
|
+
name: 'operation',
|
|
92
|
+
type: 'options',
|
|
93
|
+
noDataExpression: true,
|
|
94
|
+
displayOptions: { show: { ...v2, resource: ['scheduledPost'] } },
|
|
95
|
+
options: [
|
|
96
|
+
{
|
|
97
|
+
name: 'Cancel',
|
|
98
|
+
value: 'delete',
|
|
99
|
+
description: 'Cancel a queued post so it is never published',
|
|
100
|
+
action: 'Cancel scheduled post',
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
name: 'Get Many',
|
|
104
|
+
value: 'getAll',
|
|
105
|
+
description: 'Retrieve the posts in your queue, with their status',
|
|
106
|
+
action: 'Get many scheduled posts',
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
name: 'Update',
|
|
110
|
+
value: 'update',
|
|
111
|
+
description: 'Move a queued post to another time or rename it',
|
|
112
|
+
action: 'Update scheduled post',
|
|
113
|
+
},
|
|
114
|
+
],
|
|
115
|
+
default: 'getAll',
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
displayName: 'Operation',
|
|
119
|
+
name: 'operation',
|
|
120
|
+
type: 'options',
|
|
121
|
+
noDataExpression: true,
|
|
122
|
+
displayOptions: { show: { ...v2, resource: ['brand'] } },
|
|
123
|
+
options: [
|
|
124
|
+
{ name: 'Create', value: 'create', description: 'Create a new brand', action: 'Create brand' },
|
|
125
|
+
{
|
|
126
|
+
name: 'Delete',
|
|
127
|
+
value: 'delete',
|
|
128
|
+
description: 'Delete a brand and disconnect its accounts',
|
|
129
|
+
action: 'Delete brand',
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
name: 'Get Many',
|
|
133
|
+
value: 'getAll',
|
|
134
|
+
description: 'Retrieve a list of brands with their connected networks',
|
|
135
|
+
action: 'Get many brands',
|
|
136
|
+
},
|
|
137
|
+
{ name: 'Rename', value: 'update', description: 'Rename a brand', action: 'Rename brand' },
|
|
138
|
+
],
|
|
139
|
+
default: 'getAll',
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
displayName: 'Operation',
|
|
143
|
+
name: 'operation',
|
|
144
|
+
type: 'options',
|
|
145
|
+
noDataExpression: true,
|
|
146
|
+
displayOptions: { show: { ...v2, resource: ['connection'] } },
|
|
147
|
+
options: [
|
|
148
|
+
{
|
|
149
|
+
name: 'Check Health',
|
|
150
|
+
value: 'checkHealth',
|
|
151
|
+
description: 'Ask the network whether a connected account can still publish',
|
|
152
|
+
action: 'Check connection health',
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
name: 'Create Connect Link',
|
|
156
|
+
value: 'createConnectLink',
|
|
157
|
+
description: 'A one-hour link you can send to a client so they connect their own account to your PostWire',
|
|
158
|
+
action: 'Create connect link',
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
name: 'Get Many',
|
|
162
|
+
value: 'getAll',
|
|
163
|
+
description: 'Retrieve a list of connected social accounts',
|
|
164
|
+
action: 'Get many connections',
|
|
165
|
+
},
|
|
166
|
+
],
|
|
167
|
+
default: 'getAll',
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
displayName: 'Operation',
|
|
171
|
+
name: 'operation',
|
|
172
|
+
type: 'options',
|
|
173
|
+
noDataExpression: true,
|
|
174
|
+
displayOptions: { show: { ...v2, resource: ['account'] } },
|
|
175
|
+
options: [
|
|
176
|
+
{
|
|
177
|
+
name: 'Get',
|
|
178
|
+
value: 'get',
|
|
179
|
+
description: 'Retrieve plan, posts used this month and connected accounts',
|
|
180
|
+
action: 'Get account',
|
|
181
|
+
},
|
|
182
|
+
],
|
|
183
|
+
default: 'get',
|
|
184
|
+
},
|
|
185
|
+
{
|
|
186
|
+
displayName: 'Operation',
|
|
187
|
+
name: 'operation',
|
|
188
|
+
type: 'options',
|
|
189
|
+
noDataExpression: true,
|
|
190
|
+
displayOptions: { show: { ...v2, resource: ['media'] } },
|
|
191
|
+
options: [
|
|
192
|
+
{
|
|
193
|
+
name: 'Upload',
|
|
194
|
+
value: 'upload',
|
|
195
|
+
description: 'Host a binary file from a previous node and get a public URL the networks can download',
|
|
196
|
+
action: 'Upload media',
|
|
197
|
+
},
|
|
198
|
+
],
|
|
199
|
+
default: 'upload',
|
|
200
|
+
},
|
|
201
|
+
];
|
|
202
|
+
const postOps = { ...v2, resource: ['post'] };
|
|
203
|
+
exports.postProperties = [
|
|
204
|
+
{
|
|
205
|
+
displayName: 'Networks',
|
|
206
|
+
name: 'platforms',
|
|
207
|
+
type: 'multiOptions',
|
|
208
|
+
options: networkOptions,
|
|
209
|
+
default: [],
|
|
210
|
+
required: true,
|
|
211
|
+
description: 'Where to post. Connect them in the PostWire dashboard first — TikTok, Instagram and YouTube are one OAuth click, because PostWire already holds the platform approvals. Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
|
|
212
|
+
displayOptions: { show: { ...postOps, operation: ['publish', 'schedule', 'generate'] } },
|
|
213
|
+
},
|
|
214
|
+
{
|
|
215
|
+
displayName: 'Networks',
|
|
216
|
+
name: 'platforms',
|
|
217
|
+
type: 'multiOptions',
|
|
218
|
+
options: textNetworkOptions,
|
|
219
|
+
default: [],
|
|
220
|
+
required: true,
|
|
221
|
+
description: 'Text networks only: a week plan is written without video, which TikTok, Instagram and YouTube require. Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
|
|
222
|
+
displayOptions: { show: { ...postOps, operation: ['planWeek'] } },
|
|
223
|
+
},
|
|
224
|
+
{
|
|
225
|
+
displayName: 'Content',
|
|
226
|
+
name: 'contentMode',
|
|
227
|
+
type: 'options',
|
|
228
|
+
noDataExpression: true,
|
|
229
|
+
options: [
|
|
230
|
+
{
|
|
231
|
+
name: 'Drafts From a Previous Step',
|
|
232
|
+
value: 'drafts',
|
|
233
|
+
description: 'Publish drafts you already wrote or approved, e.g. the output of Write Drafts',
|
|
234
|
+
},
|
|
235
|
+
{
|
|
236
|
+
name: 'Same Text on Every Network',
|
|
237
|
+
value: 'text',
|
|
238
|
+
description: 'One text for all; it is shortened automatically where a network has a lower limit',
|
|
239
|
+
},
|
|
240
|
+
{
|
|
241
|
+
name: 'Smart Distribute: Write a Native Post per Network',
|
|
242
|
+
value: 'smart',
|
|
243
|
+
description: 'Give one idea; PostWire writes a different post for each network — length, hook, hashtags, YouTube title and tags',
|
|
244
|
+
},
|
|
245
|
+
],
|
|
246
|
+
default: 'smart',
|
|
247
|
+
displayOptions: { show: { ...postOps, operation: ['publish', 'schedule'] } },
|
|
248
|
+
},
|
|
249
|
+
{
|
|
250
|
+
displayName: 'Idea',
|
|
251
|
+
name: 'prompt',
|
|
252
|
+
type: 'string',
|
|
253
|
+
typeOptions: { rows: 4 },
|
|
254
|
+
default: '',
|
|
255
|
+
required: true,
|
|
256
|
+
placeholder: 'e.g. We cut onboarding from 3 days to 20 minutes — here is how',
|
|
257
|
+
description: 'What you want to say, in your own words. Facts, numbers and a link make better posts than adjectives.',
|
|
258
|
+
displayOptions: {
|
|
259
|
+
show: { ...postOps, operation: ['generate'] },
|
|
260
|
+
},
|
|
261
|
+
},
|
|
262
|
+
{
|
|
263
|
+
displayName: 'Idea',
|
|
264
|
+
name: 'prompt',
|
|
265
|
+
type: 'string',
|
|
266
|
+
typeOptions: { rows: 4 },
|
|
267
|
+
default: '',
|
|
268
|
+
required: true,
|
|
269
|
+
placeholder: 'e.g. We cut onboarding from 3 days to 20 minutes — here is how',
|
|
270
|
+
description: 'What you want to say, in your own words. Facts, numbers and a link make better posts than adjectives.',
|
|
271
|
+
displayOptions: {
|
|
272
|
+
show: { ...postOps, operation: ['publish', 'schedule'], contentMode: ['smart'] },
|
|
273
|
+
},
|
|
274
|
+
},
|
|
275
|
+
{
|
|
276
|
+
displayName: 'Text',
|
|
277
|
+
name: 'text',
|
|
278
|
+
type: 'string',
|
|
279
|
+
typeOptions: { rows: 4 },
|
|
280
|
+
default: '',
|
|
281
|
+
required: true,
|
|
282
|
+
description: 'Posted as written to every selected network',
|
|
283
|
+
displayOptions: {
|
|
284
|
+
show: { ...postOps, operation: ['publish', 'schedule'], contentMode: ['text'] },
|
|
285
|
+
},
|
|
286
|
+
},
|
|
287
|
+
{
|
|
288
|
+
displayName: 'Drafts',
|
|
289
|
+
name: 'drafts',
|
|
290
|
+
type: 'json',
|
|
291
|
+
default: '={{ $json.drafts }}',
|
|
292
|
+
required: true,
|
|
293
|
+
description: 'An object with one entry per network: { "linkedin": { "text": "…" }, "youtube": { "text": "…", "title": "…" } }. The output of Write Drafts fits as is.',
|
|
294
|
+
displayOptions: {
|
|
295
|
+
show: { ...postOps, operation: ['publish', 'schedule'], contentMode: ['drafts'] },
|
|
296
|
+
},
|
|
297
|
+
},
|
|
298
|
+
{
|
|
299
|
+
displayName: 'Topic',
|
|
300
|
+
name: 'topic',
|
|
301
|
+
type: 'string',
|
|
302
|
+
typeOptions: { rows: 3 },
|
|
303
|
+
default: '',
|
|
304
|
+
required: true,
|
|
305
|
+
placeholder: 'e.g. How we price custom furniture for first-time buyers',
|
|
306
|
+
description: 'One subject. Each day gets a different angle: a lesson, a common mistake, a number, a question, behind the scenes.',
|
|
307
|
+
displayOptions: { show: { ...postOps, operation: ['planWeek'] } },
|
|
308
|
+
},
|
|
309
|
+
{
|
|
310
|
+
displayName: 'Days',
|
|
311
|
+
name: 'days',
|
|
312
|
+
type: 'number',
|
|
313
|
+
typeOptions: { minValue: 1, maxValue: 5 },
|
|
314
|
+
default: 5,
|
|
315
|
+
description: 'How many days to fill, starting tomorrow (up to 5)',
|
|
316
|
+
displayOptions: { show: { ...postOps, operation: ['planWeek'] } },
|
|
317
|
+
},
|
|
318
|
+
{
|
|
319
|
+
displayName: 'Hour',
|
|
320
|
+
name: 'hour',
|
|
321
|
+
type: 'number',
|
|
322
|
+
typeOptions: { minValue: 0, maxValue: 23 },
|
|
323
|
+
default: 10,
|
|
324
|
+
description: "Hour of the day each post goes out, in the workflow's time zone (Settings → Timezone)",
|
|
325
|
+
displayOptions: { show: { ...postOps, operation: ['planWeek'] } },
|
|
326
|
+
},
|
|
327
|
+
{
|
|
328
|
+
displayName: 'Media',
|
|
329
|
+
name: 'mediaSource',
|
|
330
|
+
type: 'options',
|
|
331
|
+
noDataExpression: true,
|
|
332
|
+
options: [
|
|
333
|
+
{
|
|
334
|
+
name: 'Binary File',
|
|
335
|
+
value: 'binary',
|
|
336
|
+
description: 'A file from a previous node (Google Drive, HTTP Request, Read File…). PostWire hosts it for you.',
|
|
337
|
+
},
|
|
338
|
+
{ name: 'None', value: 'none', description: 'Text only — fine for X, LinkedIn, Bluesky, Threads-style networks' },
|
|
339
|
+
{ name: 'URL', value: 'url', description: 'A public https link straight to the .mp4 or image file' },
|
|
340
|
+
],
|
|
341
|
+
default: 'none',
|
|
342
|
+
description: 'TikTok and YouTube only publish video; Instagram needs a photo or a video',
|
|
343
|
+
displayOptions: { show: { ...postOps, operation: ['publish', 'schedule', 'generate'] } },
|
|
344
|
+
},
|
|
345
|
+
{
|
|
346
|
+
displayName: 'Media URL',
|
|
347
|
+
name: 'mediaUrl',
|
|
348
|
+
type: 'string',
|
|
349
|
+
default: '',
|
|
350
|
+
required: true,
|
|
351
|
+
placeholder: 'e.g. https://example.com/video.mp4',
|
|
352
|
+
description: 'A direct link to the file, reachable without a login. A Google Drive or Dropbox share link opens a web page and will not work — use Binary File instead.',
|
|
353
|
+
displayOptions: {
|
|
354
|
+
show: { ...postOps, operation: ['publish', 'schedule', 'generate'], mediaSource: ['url'] },
|
|
355
|
+
},
|
|
356
|
+
},
|
|
357
|
+
{
|
|
358
|
+
displayName: 'Input Binary Field',
|
|
359
|
+
name: 'binaryPropertyName',
|
|
360
|
+
type: 'string',
|
|
361
|
+
default: 'data',
|
|
362
|
+
required: true,
|
|
363
|
+
hint: 'The name of the input binary field containing the video or image',
|
|
364
|
+
description: 'Up to 50 MB through n8n. For bigger videos, use a public URL (up to 1 GB).',
|
|
365
|
+
displayOptions: {
|
|
366
|
+
show: { ...postOps, operation: ['publish', 'schedule', 'generate'], mediaSource: ['binary'] },
|
|
367
|
+
},
|
|
368
|
+
},
|
|
369
|
+
{
|
|
370
|
+
displayName: 'Publish At',
|
|
371
|
+
name: 'runAt',
|
|
372
|
+
type: 'dateTime',
|
|
373
|
+
default: '',
|
|
374
|
+
required: true,
|
|
375
|
+
description: 'When to publish (up to 365 days ahead). Connections and media are checked now.',
|
|
376
|
+
displayOptions: { show: { ...postOps, operation: ['schedule'] } },
|
|
377
|
+
},
|
|
378
|
+
{
|
|
379
|
+
displayName: 'Network',
|
|
380
|
+
name: 'statusPlatform',
|
|
381
|
+
type: 'options',
|
|
382
|
+
options: [
|
|
383
|
+
{ name: 'TikTok', value: 'tiktok' },
|
|
384
|
+
{ name: 'YouTube', value: 'youtube' },
|
|
385
|
+
],
|
|
386
|
+
default: 'tiktok',
|
|
387
|
+
description: 'Networks that process video after upload and report when it is live',
|
|
388
|
+
displayOptions: { show: { ...postOps, operation: ['getStatus'] } },
|
|
389
|
+
},
|
|
390
|
+
{
|
|
391
|
+
displayName: 'Post ID',
|
|
392
|
+
name: 'postId',
|
|
393
|
+
type: 'string',
|
|
394
|
+
default: '={{ $json.id }}',
|
|
395
|
+
required: true,
|
|
396
|
+
description: "The 'ID' a Publish step returned for that network",
|
|
397
|
+
displayOptions: { show: { ...postOps, operation: ['getStatus'] } },
|
|
398
|
+
},
|
|
399
|
+
{
|
|
400
|
+
displayName: 'Options',
|
|
401
|
+
name: 'options',
|
|
402
|
+
type: 'collection',
|
|
403
|
+
placeholder: 'Add option',
|
|
404
|
+
default: {},
|
|
405
|
+
displayOptions: { show: { ...postOps, operation: ['publish', 'schedule', 'generate', 'planWeek'] } },
|
|
406
|
+
options: [
|
|
407
|
+
{
|
|
408
|
+
...brandLocator('brand', 'Brand', 'Publish as this brand. Leave empty to use your first brand.'),
|
|
409
|
+
displayOptions: { show: { '/operation': ['publish', 'schedule'] } },
|
|
410
|
+
},
|
|
411
|
+
{
|
|
412
|
+
displayName: 'Brand Voice',
|
|
413
|
+
name: 'brandVoice',
|
|
414
|
+
type: 'string',
|
|
415
|
+
typeOptions: { rows: 2 },
|
|
416
|
+
default: '',
|
|
417
|
+
placeholder: 'e.g. Plain-spoken, a little dry, never uses exclamation marks',
|
|
418
|
+
description: 'How you want to sound; applied to every draft PostWire writes',
|
|
419
|
+
},
|
|
420
|
+
{
|
|
421
|
+
displayName: 'Dry Run',
|
|
422
|
+
name: 'dryRun',
|
|
423
|
+
type: 'boolean',
|
|
424
|
+
default: false,
|
|
425
|
+
description: 'Whether to check connections, media and length and return exactly what would be published — without publishing anything',
|
|
426
|
+
displayOptions: { show: { '/operation': ['publish'] } },
|
|
427
|
+
},
|
|
428
|
+
{
|
|
429
|
+
displayName: 'Idempotency Key',
|
|
430
|
+
name: 'idempotencyKey',
|
|
431
|
+
type: 'string',
|
|
432
|
+
default: '',
|
|
433
|
+
placeholder: 'e.g. {{ $json.guid }}',
|
|
434
|
+
description: 'Any unique value for this post (an RSS guid, a row ID). PostWire refuses a second post with the same key for 24 hours, so a retry never double-posts. With Smart Distribute one is set automatically per execution.',
|
|
435
|
+
displayOptions: { show: { '/operation': ['publish'] } },
|
|
436
|
+
},
|
|
437
|
+
{
|
|
438
|
+
displayName: 'Label',
|
|
439
|
+
name: 'label',
|
|
440
|
+
type: 'string',
|
|
441
|
+
default: '',
|
|
442
|
+
description: 'A name for this post in the PostWire calendar',
|
|
443
|
+
displayOptions: { show: { '/operation': ['schedule'] } },
|
|
444
|
+
},
|
|
445
|
+
{
|
|
446
|
+
displayName: 'Media Type',
|
|
447
|
+
name: 'mediaType',
|
|
448
|
+
type: 'options',
|
|
449
|
+
default: 'auto',
|
|
450
|
+
options: [
|
|
451
|
+
{ name: 'Detect Automatically', value: 'auto' },
|
|
452
|
+
{ name: 'Image', value: 'image' },
|
|
453
|
+
{ name: 'Video', value: 'video' },
|
|
454
|
+
],
|
|
455
|
+
description: 'Only needed for a URL with no file extension, such as a signed CDN link. Detection reads the extension, then the file type.',
|
|
456
|
+
},
|
|
457
|
+
{
|
|
458
|
+
displayName: 'Skip Media Check',
|
|
459
|
+
name: 'skipMediaCheck',
|
|
460
|
+
type: 'boolean',
|
|
461
|
+
default: false,
|
|
462
|
+
description: 'Whether to skip checking that the media URL is public, is a file and not a page, and is under 1 GB before sending it',
|
|
463
|
+
},
|
|
464
|
+
{
|
|
465
|
+
displayName: 'Subreddit',
|
|
466
|
+
name: 'subreddit',
|
|
467
|
+
type: 'string',
|
|
468
|
+
default: '',
|
|
469
|
+
placeholder: 'e.g. SideProject',
|
|
470
|
+
description: 'Reddit only: the community to post in, without r/',
|
|
471
|
+
},
|
|
472
|
+
{
|
|
473
|
+
displayName: 'Timezone',
|
|
474
|
+
name: 'timezone',
|
|
475
|
+
type: 'string',
|
|
476
|
+
default: '',
|
|
477
|
+
placeholder: 'e.g. America/Lima',
|
|
478
|
+
description: "IANA time zone for 'Hour'. Leave empty to use the workflow's time zone.",
|
|
479
|
+
displayOptions: { show: { '/operation': ['planWeek'] } },
|
|
480
|
+
},
|
|
481
|
+
{
|
|
482
|
+
displayName: 'Title (YouTube)',
|
|
483
|
+
name: 'title',
|
|
484
|
+
type: 'string',
|
|
485
|
+
default: '',
|
|
486
|
+
description: 'Overrides the YouTube title PostWire writes',
|
|
487
|
+
},
|
|
488
|
+
{
|
|
489
|
+
displayName: 'Visibility',
|
|
490
|
+
name: 'privacy',
|
|
491
|
+
type: 'options',
|
|
492
|
+
options: [
|
|
493
|
+
{ name: 'Private', value: 'private' },
|
|
494
|
+
{ name: 'Public', value: 'public' },
|
|
495
|
+
{ name: 'Unlisted', value: 'unlisted' },
|
|
496
|
+
],
|
|
497
|
+
default: 'public',
|
|
498
|
+
description: 'Used by TikTok and YouTube. Unlisted is YouTube only.',
|
|
499
|
+
},
|
|
500
|
+
],
|
|
501
|
+
},
|
|
502
|
+
];
|
|
503
|
+
const schedOps = { ...v2, resource: ['scheduledPost'] };
|
|
504
|
+
exports.scheduledPostProperties = [
|
|
505
|
+
{
|
|
506
|
+
displayName: 'Scheduled Post ID',
|
|
507
|
+
name: 'scheduledPostId',
|
|
508
|
+
type: 'string',
|
|
509
|
+
default: '',
|
|
510
|
+
required: true,
|
|
511
|
+
description: "The 'ID' returned by Schedule or Get Many",
|
|
512
|
+
displayOptions: { show: { ...schedOps, operation: ['update', 'delete'] } },
|
|
513
|
+
},
|
|
514
|
+
{
|
|
515
|
+
displayName: 'Update Fields',
|
|
516
|
+
name: 'updateFields',
|
|
517
|
+
type: 'collection',
|
|
518
|
+
placeholder: 'Add field',
|
|
519
|
+
default: {},
|
|
520
|
+
displayOptions: { show: { ...schedOps, operation: ['update'] } },
|
|
521
|
+
options: [
|
|
522
|
+
{ displayName: 'Label', name: 'label', type: 'string', default: '' },
|
|
523
|
+
{
|
|
524
|
+
displayName: 'Publish At',
|
|
525
|
+
name: 'runAt',
|
|
526
|
+
type: 'dateTime',
|
|
527
|
+
default: '',
|
|
528
|
+
description: 'The new time. Only a post that is still queued can be moved.',
|
|
529
|
+
},
|
|
530
|
+
],
|
|
531
|
+
},
|
|
532
|
+
{
|
|
533
|
+
displayName: 'Return All',
|
|
534
|
+
name: 'returnAll',
|
|
535
|
+
type: 'boolean',
|
|
536
|
+
default: false,
|
|
537
|
+
description: 'Whether to return all results or only up to a given limit',
|
|
538
|
+
displayOptions: { show: { ...schedOps, operation: ['getAll'] } },
|
|
539
|
+
},
|
|
540
|
+
{
|
|
541
|
+
displayName: 'Limit',
|
|
542
|
+
name: 'limit',
|
|
543
|
+
type: 'number',
|
|
544
|
+
typeOptions: { minValue: 1 },
|
|
545
|
+
default: 50,
|
|
546
|
+
description: 'Max number of results to return',
|
|
547
|
+
displayOptions: { show: { ...schedOps, operation: ['getAll'], returnAll: [false] } },
|
|
548
|
+
},
|
|
549
|
+
{
|
|
550
|
+
displayName: 'Filters',
|
|
551
|
+
name: 'filters',
|
|
552
|
+
type: 'collection',
|
|
553
|
+
placeholder: 'Add filter',
|
|
554
|
+
default: {},
|
|
555
|
+
displayOptions: { show: { ...schedOps, operation: ['getAll'] } },
|
|
556
|
+
options: [
|
|
557
|
+
{ displayName: 'From', name: 'from', type: 'dateTime', default: '', description: 'Only posts due after this time' },
|
|
558
|
+
{
|
|
559
|
+
displayName: 'Status',
|
|
560
|
+
name: 'status',
|
|
561
|
+
type: 'options',
|
|
562
|
+
options: [
|
|
563
|
+
{ name: 'Canceled', value: 'canceled' },
|
|
564
|
+
{ name: 'Done', value: 'done' },
|
|
565
|
+
{ name: 'Failed', value: 'failed' },
|
|
566
|
+
{ name: 'Queued', value: 'queued' },
|
|
567
|
+
],
|
|
568
|
+
default: 'queued',
|
|
569
|
+
},
|
|
570
|
+
{ displayName: 'To', name: 'to', type: 'dateTime', default: '', description: 'Only posts due before this time' },
|
|
571
|
+
],
|
|
572
|
+
},
|
|
573
|
+
];
|
|
574
|
+
const brandOps = { ...v2, resource: ['brand'] };
|
|
575
|
+
exports.brandProperties = [
|
|
576
|
+
{
|
|
577
|
+
displayName: 'Name',
|
|
578
|
+
name: 'name',
|
|
579
|
+
type: 'string',
|
|
580
|
+
default: '',
|
|
581
|
+
required: true,
|
|
582
|
+
placeholder: 'e.g. Acme Bakery',
|
|
583
|
+
description: 'The business or client this brand represents',
|
|
584
|
+
displayOptions: { show: { ...brandOps, operation: ['create', 'update'] } },
|
|
585
|
+
},
|
|
586
|
+
{
|
|
587
|
+
...brandLocator('brand', 'Brand', 'The brand to change'),
|
|
588
|
+
required: true,
|
|
589
|
+
displayOptions: { show: { ...brandOps, operation: ['update', 'delete'] } },
|
|
590
|
+
},
|
|
591
|
+
{
|
|
592
|
+
displayName: 'Return All',
|
|
593
|
+
name: 'returnAll',
|
|
594
|
+
type: 'boolean',
|
|
595
|
+
default: false,
|
|
596
|
+
description: 'Whether to return all results or only up to a given limit',
|
|
597
|
+
displayOptions: { show: { ...brandOps, operation: ['getAll'] } },
|
|
598
|
+
},
|
|
599
|
+
{
|
|
600
|
+
displayName: 'Limit',
|
|
601
|
+
name: 'limit',
|
|
602
|
+
type: 'number',
|
|
603
|
+
typeOptions: { minValue: 1 },
|
|
604
|
+
default: 50,
|
|
605
|
+
description: 'Max number of results to return',
|
|
606
|
+
displayOptions: { show: { ...brandOps, operation: ['getAll'], returnAll: [false] } },
|
|
607
|
+
},
|
|
608
|
+
];
|
|
609
|
+
const connOps = { ...v2, resource: ['connection'] };
|
|
610
|
+
exports.connectionProperties = [
|
|
611
|
+
{
|
|
612
|
+
displayName: 'Network',
|
|
613
|
+
name: 'platform',
|
|
614
|
+
type: 'options',
|
|
615
|
+
options: networkOptions,
|
|
616
|
+
default: 'tiktok',
|
|
617
|
+
required: true,
|
|
618
|
+
displayOptions: { show: { ...connOps, operation: ['checkHealth'] } },
|
|
619
|
+
},
|
|
620
|
+
{
|
|
621
|
+
displayName: 'Network',
|
|
622
|
+
name: 'platform',
|
|
623
|
+
type: 'options',
|
|
624
|
+
options: [{ name: 'Any Network', value: '' }, ...networkOptions],
|
|
625
|
+
default: '',
|
|
626
|
+
description: 'Lock the link to one network, or let the client choose',
|
|
627
|
+
displayOptions: { show: { ...connOps, operation: ['createConnectLink'] } },
|
|
628
|
+
},
|
|
629
|
+
{
|
|
630
|
+
displayName: 'Return All',
|
|
631
|
+
name: 'returnAll',
|
|
632
|
+
type: 'boolean',
|
|
633
|
+
default: true,
|
|
634
|
+
description: 'Whether to return all results or only up to a given limit',
|
|
635
|
+
displayOptions: { show: { ...connOps, operation: ['getAll'] } },
|
|
636
|
+
},
|
|
637
|
+
{
|
|
638
|
+
displayName: 'Limit',
|
|
639
|
+
name: 'limit',
|
|
640
|
+
type: 'number',
|
|
641
|
+
typeOptions: { minValue: 1 },
|
|
642
|
+
default: 50,
|
|
643
|
+
description: 'Max number of results to return',
|
|
644
|
+
displayOptions: { show: { ...connOps, operation: ['getAll'], returnAll: [false] } },
|
|
645
|
+
},
|
|
646
|
+
];
|
|
647
|
+
exports.accountProperties = [
|
|
648
|
+
{
|
|
649
|
+
displayName: 'Simplify',
|
|
650
|
+
name: 'simplify',
|
|
651
|
+
type: 'boolean',
|
|
652
|
+
default: true,
|
|
653
|
+
description: 'Whether to return a simplified version of the response instead of the raw data',
|
|
654
|
+
displayOptions: { show: { ...v2, resource: ['account'], operation: ['get'] } },
|
|
655
|
+
},
|
|
656
|
+
];
|
|
657
|
+
exports.mediaProperties = [
|
|
658
|
+
{
|
|
659
|
+
displayName: 'Input Binary Field',
|
|
660
|
+
name: 'binaryPropertyName',
|
|
661
|
+
type: 'string',
|
|
662
|
+
default: 'data',
|
|
663
|
+
required: true,
|
|
664
|
+
hint: 'The name of the input binary field containing the video or image',
|
|
665
|
+
description: 'JPEG, PNG, WebP, GIF, MP4, MOV or WebM, up to 50 MB. Hosted for 30 days.',
|
|
666
|
+
displayOptions: { show: { ...v2, resource: ['media'], operation: ['upload'] } },
|
|
667
|
+
},
|
|
668
|
+
];
|
|
669
|
+
//# sourceMappingURL=Description.js.map
|