postproxy-mcp 1.0.1 → 1.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.
- package/README.md +96 -0
- package/dist/api/client.d.ts.map +1 -1
- package/dist/api/client.js +8 -0
- package/dist/api/client.js.map +1 -1
- package/dist/server.d.ts +27 -6
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +25 -6
- package/dist/server.js.map +1 -1
- package/dist/tools/history.d.ts.map +1 -1
- package/dist/tools/history.js +5 -2
- package/dist/tools/history.js.map +1 -1
- package/dist/tools/post.d.ts +4 -0
- package/dist/tools/post.d.ts.map +1 -1
- package/dist/tools/post.js +20 -8
- package/dist/tools/post.js.map +1 -1
- package/dist/types/index.d.ts +36 -3
- package/dist/types/index.d.ts.map +1 -1
- package/dist/utils/validation.d.ts +63 -2
- package/dist/utils/validation.d.ts.map +1 -1
- package/dist/utils/validation.js +12 -0
- package/dist/utils/validation.js.map +1 -1
- package/package.json +1 -1
- package/src/api/client.ts +10 -0
- package/src/server.ts +25 -6
- package/src/tools/history.ts +4 -2
- package/src/tools/post.ts +25 -14
- package/src/types/index.ts +34 -11
- package/src/utils/validation.ts +13 -0
- package/worker/index.ts +76 -19
package/dist/types/index.d.ts
CHANGED
|
@@ -18,6 +18,18 @@ export interface Profile {
|
|
|
18
18
|
username?: string;
|
|
19
19
|
avatar_url?: string;
|
|
20
20
|
}
|
|
21
|
+
export interface ThreadChild {
|
|
22
|
+
body: string;
|
|
23
|
+
media?: string[];
|
|
24
|
+
}
|
|
25
|
+
export interface MediaAttachment {
|
|
26
|
+
id: string;
|
|
27
|
+
status: "pending" | "processed" | "failed";
|
|
28
|
+
error_message: string | null;
|
|
29
|
+
content_type: string;
|
|
30
|
+
source_url: string | null;
|
|
31
|
+
url: string | null;
|
|
32
|
+
}
|
|
21
33
|
export interface CreatePostParams {
|
|
22
34
|
content: string;
|
|
23
35
|
profile_group_id?: number;
|
|
@@ -27,16 +39,23 @@ export interface CreatePostParams {
|
|
|
27
39
|
idempotency_key?: string;
|
|
28
40
|
draft?: boolean;
|
|
29
41
|
platforms?: PlatformParams;
|
|
42
|
+
thread?: ThreadChild[];
|
|
30
43
|
}
|
|
31
44
|
export interface CreatePostResponse {
|
|
32
45
|
id: string;
|
|
33
46
|
body?: string;
|
|
34
47
|
content?: string;
|
|
35
|
-
status: "draft" | "pending" | "processing" | "processed" | "scheduled";
|
|
48
|
+
status: "draft" | "pending" | "processing" | "processed" | "scheduled" | "media_processing_failed";
|
|
36
49
|
draft: boolean;
|
|
37
50
|
scheduled_at: string | null;
|
|
38
51
|
created_at: string;
|
|
52
|
+
media?: MediaAttachment[];
|
|
39
53
|
platforms: PlatformOutcome[];
|
|
54
|
+
thread?: Array<{
|
|
55
|
+
id: string;
|
|
56
|
+
body: string;
|
|
57
|
+
media?: MediaAttachment[];
|
|
58
|
+
}>;
|
|
40
59
|
}
|
|
41
60
|
export interface PlatformOutcome {
|
|
42
61
|
platform: string;
|
|
@@ -56,23 +75,35 @@ export interface PostDetails {
|
|
|
56
75
|
id: string;
|
|
57
76
|
body?: string;
|
|
58
77
|
content?: string;
|
|
59
|
-
status: "draft" | "pending" | "processing" | "processed" | "scheduled";
|
|
78
|
+
status: "draft" | "pending" | "processing" | "processed" | "scheduled" | "media_processing_failed";
|
|
60
79
|
draft: boolean;
|
|
61
80
|
scheduled_at: string | null;
|
|
62
81
|
created_at: string;
|
|
63
82
|
updated_at?: string;
|
|
83
|
+
media?: MediaAttachment[];
|
|
64
84
|
platforms: PlatformOutcome[];
|
|
85
|
+
thread?: Array<{
|
|
86
|
+
id: string;
|
|
87
|
+
body: string;
|
|
88
|
+
media?: MediaAttachment[];
|
|
89
|
+
}>;
|
|
65
90
|
}
|
|
66
91
|
export interface Post {
|
|
67
92
|
id: string;
|
|
68
93
|
body?: string;
|
|
69
94
|
content?: string;
|
|
70
|
-
status: "draft" | "pending" | "processing" | "processed" | "scheduled";
|
|
95
|
+
status: "draft" | "pending" | "processing" | "processed" | "scheduled" | "media_processing_failed";
|
|
71
96
|
draft: boolean;
|
|
72
97
|
scheduled_at: string | null;
|
|
73
98
|
created_at: string;
|
|
74
99
|
updated_at?: string;
|
|
100
|
+
media?: MediaAttachment[];
|
|
75
101
|
platforms: PlatformOutcome[];
|
|
102
|
+
thread?: Array<{
|
|
103
|
+
id: string;
|
|
104
|
+
body: string;
|
|
105
|
+
media?: MediaAttachment[];
|
|
106
|
+
}>;
|
|
76
107
|
}
|
|
77
108
|
/**
|
|
78
109
|
* Platform-specific parameters for Instagram
|
|
@@ -93,11 +124,13 @@ export interface YouTubeParams {
|
|
|
93
124
|
title?: string;
|
|
94
125
|
privacy_status?: "public" | "unlisted" | "private";
|
|
95
126
|
cover_url?: string;
|
|
127
|
+
made_for_kids?: boolean;
|
|
96
128
|
}
|
|
97
129
|
/**
|
|
98
130
|
* Platform-specific parameters for TikTok
|
|
99
131
|
*/
|
|
100
132
|
export interface TikTokParams {
|
|
133
|
+
format?: "video" | "image";
|
|
101
134
|
privacy_status?: "PUBLIC_TO_EVERYONE" | "MUTUAL_FOLLOW_FRIENDS" | "FOLLOWER_OF_CREATOR" | "SELF_ONLY";
|
|
102
135
|
photo_cover_index?: number;
|
|
103
136
|
auto_add_music?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,MAAM,WAAW,YAAY;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,cAAc,EAAE,MAAM,CAAC;IACvB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,OAAO;IACtB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,gBAAgB,EAAE,MAAM,CAAC;I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,OAAO,EAAE,WAAW,EAAE,CAAC;CACxB;AAED;;GAEG;AACH,MAAM,WAAW,SAAS;IACxB,SAAS,EAAE,aAAa,EAAE,CAAC;CAC5B;AAED;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;CACjC"}
|
|
@@ -50,16 +50,20 @@ export declare const YouTubeParamsSchema: z.ZodObject<{
|
|
|
50
50
|
title: z.ZodOptional<z.ZodString>;
|
|
51
51
|
privacy_status: z.ZodOptional<z.ZodEnum<["public", "unlisted", "private"]>>;
|
|
52
52
|
cover_url: z.ZodOptional<z.ZodString>;
|
|
53
|
+
made_for_kids: z.ZodOptional<z.ZodBoolean>;
|
|
53
54
|
}, "strict", z.ZodTypeAny, {
|
|
54
55
|
cover_url?: string | undefined;
|
|
55
56
|
title?: string | undefined;
|
|
56
57
|
privacy_status?: "public" | "unlisted" | "private" | undefined;
|
|
58
|
+
made_for_kids?: boolean | undefined;
|
|
57
59
|
}, {
|
|
58
60
|
cover_url?: string | undefined;
|
|
59
61
|
title?: string | undefined;
|
|
60
62
|
privacy_status?: "public" | "unlisted" | "private" | undefined;
|
|
63
|
+
made_for_kids?: boolean | undefined;
|
|
61
64
|
}>;
|
|
62
65
|
export declare const TikTokParamsSchema: z.ZodObject<{
|
|
66
|
+
format: z.ZodOptional<z.ZodEnum<["video", "image"]>>;
|
|
63
67
|
privacy_status: z.ZodOptional<z.ZodEnum<["PUBLIC_TO_EVERYONE", "MUTUAL_FOLLOW_FRIENDS", "FOLLOWER_OF_CREATOR", "SELF_ONLY"]>>;
|
|
64
68
|
photo_cover_index: z.ZodOptional<z.ZodNumber>;
|
|
65
69
|
auto_add_music: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -70,6 +74,7 @@ export declare const TikTokParamsSchema: z.ZodObject<{
|
|
|
70
74
|
brand_content_toggle: z.ZodOptional<z.ZodBoolean>;
|
|
71
75
|
brand_organic_toggle: z.ZodOptional<z.ZodBoolean>;
|
|
72
76
|
}, "strict", z.ZodTypeAny, {
|
|
77
|
+
format?: "video" | "image" | undefined;
|
|
73
78
|
privacy_status?: "PUBLIC_TO_EVERYONE" | "MUTUAL_FOLLOW_FRIENDS" | "FOLLOWER_OF_CREATOR" | "SELF_ONLY" | undefined;
|
|
74
79
|
photo_cover_index?: number | undefined;
|
|
75
80
|
auto_add_music?: boolean | undefined;
|
|
@@ -80,6 +85,7 @@ export declare const TikTokParamsSchema: z.ZodObject<{
|
|
|
80
85
|
brand_content_toggle?: boolean | undefined;
|
|
81
86
|
brand_organic_toggle?: boolean | undefined;
|
|
82
87
|
}, {
|
|
88
|
+
format?: "video" | "image" | undefined;
|
|
83
89
|
privacy_status?: "PUBLIC_TO_EVERYONE" | "MUTUAL_FOLLOW_FRIENDS" | "FOLLOWER_OF_CREATOR" | "SELF_ONLY" | undefined;
|
|
84
90
|
photo_cover_index?: number | undefined;
|
|
85
91
|
auto_add_music?: boolean | undefined;
|
|
@@ -142,16 +148,20 @@ export declare const PlatformParamsSchema: z.ZodOptional<z.ZodObject<{
|
|
|
142
148
|
title: z.ZodOptional<z.ZodString>;
|
|
143
149
|
privacy_status: z.ZodOptional<z.ZodEnum<["public", "unlisted", "private"]>>;
|
|
144
150
|
cover_url: z.ZodOptional<z.ZodString>;
|
|
151
|
+
made_for_kids: z.ZodOptional<z.ZodBoolean>;
|
|
145
152
|
}, "strict", z.ZodTypeAny, {
|
|
146
153
|
cover_url?: string | undefined;
|
|
147
154
|
title?: string | undefined;
|
|
148
155
|
privacy_status?: "public" | "unlisted" | "private" | undefined;
|
|
156
|
+
made_for_kids?: boolean | undefined;
|
|
149
157
|
}, {
|
|
150
158
|
cover_url?: string | undefined;
|
|
151
159
|
title?: string | undefined;
|
|
152
160
|
privacy_status?: "public" | "unlisted" | "private" | undefined;
|
|
161
|
+
made_for_kids?: boolean | undefined;
|
|
153
162
|
}>>;
|
|
154
163
|
tiktok: z.ZodOptional<z.ZodObject<{
|
|
164
|
+
format: z.ZodOptional<z.ZodEnum<["video", "image"]>>;
|
|
155
165
|
privacy_status: z.ZodOptional<z.ZodEnum<["PUBLIC_TO_EVERYONE", "MUTUAL_FOLLOW_FRIENDS", "FOLLOWER_OF_CREATOR", "SELF_ONLY"]>>;
|
|
156
166
|
photo_cover_index: z.ZodOptional<z.ZodNumber>;
|
|
157
167
|
auto_add_music: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -162,6 +172,7 @@ export declare const PlatformParamsSchema: z.ZodOptional<z.ZodObject<{
|
|
|
162
172
|
brand_content_toggle: z.ZodOptional<z.ZodBoolean>;
|
|
163
173
|
brand_organic_toggle: z.ZodOptional<z.ZodBoolean>;
|
|
164
174
|
}, "strict", z.ZodTypeAny, {
|
|
175
|
+
format?: "video" | "image" | undefined;
|
|
165
176
|
privacy_status?: "PUBLIC_TO_EVERYONE" | "MUTUAL_FOLLOW_FRIENDS" | "FOLLOWER_OF_CREATOR" | "SELF_ONLY" | undefined;
|
|
166
177
|
photo_cover_index?: number | undefined;
|
|
167
178
|
auto_add_music?: boolean | undefined;
|
|
@@ -172,6 +183,7 @@ export declare const PlatformParamsSchema: z.ZodOptional<z.ZodObject<{
|
|
|
172
183
|
brand_content_toggle?: boolean | undefined;
|
|
173
184
|
brand_organic_toggle?: boolean | undefined;
|
|
174
185
|
}, {
|
|
186
|
+
format?: "video" | "image" | undefined;
|
|
175
187
|
privacy_status?: "PUBLIC_TO_EVERYONE" | "MUTUAL_FOLLOW_FRIENDS" | "FOLLOWER_OF_CREATOR" | "SELF_ONLY" | undefined;
|
|
176
188
|
photo_cover_index?: number | undefined;
|
|
177
189
|
auto_add_music?: boolean | undefined;
|
|
@@ -218,8 +230,10 @@ export declare const PlatformParamsSchema: z.ZodOptional<z.ZodObject<{
|
|
|
218
230
|
cover_url?: string | undefined;
|
|
219
231
|
title?: string | undefined;
|
|
220
232
|
privacy_status?: "public" | "unlisted" | "private" | undefined;
|
|
233
|
+
made_for_kids?: boolean | undefined;
|
|
221
234
|
} | undefined;
|
|
222
235
|
tiktok?: {
|
|
236
|
+
format?: "video" | "image" | undefined;
|
|
223
237
|
privacy_status?: "PUBLIC_TO_EVERYONE" | "MUTUAL_FOLLOW_FRIENDS" | "FOLLOWER_OF_CREATOR" | "SELF_ONLY" | undefined;
|
|
224
238
|
photo_cover_index?: number | undefined;
|
|
225
239
|
auto_add_music?: boolean | undefined;
|
|
@@ -254,8 +268,10 @@ export declare const PlatformParamsSchema: z.ZodOptional<z.ZodObject<{
|
|
|
254
268
|
cover_url?: string | undefined;
|
|
255
269
|
title?: string | undefined;
|
|
256
270
|
privacy_status?: "public" | "unlisted" | "private" | undefined;
|
|
271
|
+
made_for_kids?: boolean | undefined;
|
|
257
272
|
} | undefined;
|
|
258
273
|
tiktok?: {
|
|
274
|
+
format?: "video" | "image" | undefined;
|
|
259
275
|
privacy_status?: "PUBLIC_TO_EVERYONE" | "MUTUAL_FOLLOW_FRIENDS" | "FOLLOWER_OF_CREATOR" | "SELF_ONLY" | undefined;
|
|
260
276
|
photo_cover_index?: number | undefined;
|
|
261
277
|
auto_add_music?: boolean | undefined;
|
|
@@ -277,6 +293,19 @@ export declare const PlatformParamsSchema: z.ZodOptional<z.ZodObject<{
|
|
|
277
293
|
twitter?: {} | undefined;
|
|
278
294
|
threads?: {} | undefined;
|
|
279
295
|
}>>;
|
|
296
|
+
/**
|
|
297
|
+
* Schema for thread child posts
|
|
298
|
+
*/
|
|
299
|
+
export declare const ThreadChildSchema: z.ZodObject<{
|
|
300
|
+
body: z.ZodString;
|
|
301
|
+
media: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">>;
|
|
302
|
+
}, "strip", z.ZodTypeAny, {
|
|
303
|
+
body: string;
|
|
304
|
+
media?: string[] | undefined;
|
|
305
|
+
}, {
|
|
306
|
+
body: string;
|
|
307
|
+
media?: string[] | undefined;
|
|
308
|
+
}>;
|
|
280
309
|
/**
|
|
281
310
|
* Schema for post.publish parameters
|
|
282
311
|
*/
|
|
@@ -318,16 +347,20 @@ export declare const PostPublishSchema: z.ZodObject<{
|
|
|
318
347
|
title: z.ZodOptional<z.ZodString>;
|
|
319
348
|
privacy_status: z.ZodOptional<z.ZodEnum<["public", "unlisted", "private"]>>;
|
|
320
349
|
cover_url: z.ZodOptional<z.ZodString>;
|
|
350
|
+
made_for_kids: z.ZodOptional<z.ZodBoolean>;
|
|
321
351
|
}, "strict", z.ZodTypeAny, {
|
|
322
352
|
cover_url?: string | undefined;
|
|
323
353
|
title?: string | undefined;
|
|
324
354
|
privacy_status?: "public" | "unlisted" | "private" | undefined;
|
|
355
|
+
made_for_kids?: boolean | undefined;
|
|
325
356
|
}, {
|
|
326
357
|
cover_url?: string | undefined;
|
|
327
358
|
title?: string | undefined;
|
|
328
359
|
privacy_status?: "public" | "unlisted" | "private" | undefined;
|
|
360
|
+
made_for_kids?: boolean | undefined;
|
|
329
361
|
}>>;
|
|
330
362
|
tiktok: z.ZodOptional<z.ZodObject<{
|
|
363
|
+
format: z.ZodOptional<z.ZodEnum<["video", "image"]>>;
|
|
331
364
|
privacy_status: z.ZodOptional<z.ZodEnum<["PUBLIC_TO_EVERYONE", "MUTUAL_FOLLOW_FRIENDS", "FOLLOWER_OF_CREATOR", "SELF_ONLY"]>>;
|
|
332
365
|
photo_cover_index: z.ZodOptional<z.ZodNumber>;
|
|
333
366
|
auto_add_music: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -338,6 +371,7 @@ export declare const PostPublishSchema: z.ZodObject<{
|
|
|
338
371
|
brand_content_toggle: z.ZodOptional<z.ZodBoolean>;
|
|
339
372
|
brand_organic_toggle: z.ZodOptional<z.ZodBoolean>;
|
|
340
373
|
}, "strict", z.ZodTypeAny, {
|
|
374
|
+
format?: "video" | "image" | undefined;
|
|
341
375
|
privacy_status?: "PUBLIC_TO_EVERYONE" | "MUTUAL_FOLLOW_FRIENDS" | "FOLLOWER_OF_CREATOR" | "SELF_ONLY" | undefined;
|
|
342
376
|
photo_cover_index?: number | undefined;
|
|
343
377
|
auto_add_music?: boolean | undefined;
|
|
@@ -348,6 +382,7 @@ export declare const PostPublishSchema: z.ZodObject<{
|
|
|
348
382
|
brand_content_toggle?: boolean | undefined;
|
|
349
383
|
brand_organic_toggle?: boolean | undefined;
|
|
350
384
|
}, {
|
|
385
|
+
format?: "video" | "image" | undefined;
|
|
351
386
|
privacy_status?: "PUBLIC_TO_EVERYONE" | "MUTUAL_FOLLOW_FRIENDS" | "FOLLOWER_OF_CREATOR" | "SELF_ONLY" | undefined;
|
|
352
387
|
photo_cover_index?: number | undefined;
|
|
353
388
|
auto_add_music?: boolean | undefined;
|
|
@@ -394,8 +429,10 @@ export declare const PostPublishSchema: z.ZodObject<{
|
|
|
394
429
|
cover_url?: string | undefined;
|
|
395
430
|
title?: string | undefined;
|
|
396
431
|
privacy_status?: "public" | "unlisted" | "private" | undefined;
|
|
432
|
+
made_for_kids?: boolean | undefined;
|
|
397
433
|
} | undefined;
|
|
398
434
|
tiktok?: {
|
|
435
|
+
format?: "video" | "image" | undefined;
|
|
399
436
|
privacy_status?: "PUBLIC_TO_EVERYONE" | "MUTUAL_FOLLOW_FRIENDS" | "FOLLOWER_OF_CREATOR" | "SELF_ONLY" | undefined;
|
|
400
437
|
photo_cover_index?: number | undefined;
|
|
401
438
|
auto_add_music?: boolean | undefined;
|
|
@@ -430,8 +467,10 @@ export declare const PostPublishSchema: z.ZodObject<{
|
|
|
430
467
|
cover_url?: string | undefined;
|
|
431
468
|
title?: string | undefined;
|
|
432
469
|
privacy_status?: "public" | "unlisted" | "private" | undefined;
|
|
470
|
+
made_for_kids?: boolean | undefined;
|
|
433
471
|
} | undefined;
|
|
434
472
|
tiktok?: {
|
|
473
|
+
format?: "video" | "image" | undefined;
|
|
435
474
|
privacy_status?: "PUBLIC_TO_EVERYONE" | "MUTUAL_FOLLOW_FRIENDS" | "FOLLOWER_OF_CREATOR" | "SELF_ONLY" | undefined;
|
|
436
475
|
photo_cover_index?: number | undefined;
|
|
437
476
|
auto_add_music?: boolean | undefined;
|
|
@@ -453,12 +492,22 @@ export declare const PostPublishSchema: z.ZodObject<{
|
|
|
453
492
|
twitter?: {} | undefined;
|
|
454
493
|
threads?: {} | undefined;
|
|
455
494
|
}>>;
|
|
495
|
+
thread: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
496
|
+
body: z.ZodString;
|
|
497
|
+
media: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">>;
|
|
498
|
+
}, "strip", z.ZodTypeAny, {
|
|
499
|
+
body: string;
|
|
500
|
+
media?: string[] | undefined;
|
|
501
|
+
}, {
|
|
502
|
+
body: string;
|
|
503
|
+
media?: string[] | undefined;
|
|
504
|
+
}>, "many">>;
|
|
456
505
|
}, "strip", z.ZodTypeAny, {
|
|
457
506
|
content: string;
|
|
458
507
|
profiles: string[];
|
|
459
508
|
draft?: boolean | undefined;
|
|
460
|
-
schedule?: string | undefined;
|
|
461
509
|
media?: string[] | undefined;
|
|
510
|
+
schedule?: string | undefined;
|
|
462
511
|
idempotency_key?: string | undefined;
|
|
463
512
|
require_confirmation?: boolean | undefined;
|
|
464
513
|
platforms?: {
|
|
@@ -475,8 +524,10 @@ export declare const PostPublishSchema: z.ZodObject<{
|
|
|
475
524
|
cover_url?: string | undefined;
|
|
476
525
|
title?: string | undefined;
|
|
477
526
|
privacy_status?: "public" | "unlisted" | "private" | undefined;
|
|
527
|
+
made_for_kids?: boolean | undefined;
|
|
478
528
|
} | undefined;
|
|
479
529
|
tiktok?: {
|
|
530
|
+
format?: "video" | "image" | undefined;
|
|
480
531
|
privacy_status?: "PUBLIC_TO_EVERYONE" | "MUTUAL_FOLLOW_FRIENDS" | "FOLLOWER_OF_CREATOR" | "SELF_ONLY" | undefined;
|
|
481
532
|
photo_cover_index?: number | undefined;
|
|
482
533
|
auto_add_music?: boolean | undefined;
|
|
@@ -498,12 +549,16 @@ export declare const PostPublishSchema: z.ZodObject<{
|
|
|
498
549
|
twitter?: {} | undefined;
|
|
499
550
|
threads?: {} | undefined;
|
|
500
551
|
} | undefined;
|
|
552
|
+
thread?: {
|
|
553
|
+
body: string;
|
|
554
|
+
media?: string[] | undefined;
|
|
555
|
+
}[] | undefined;
|
|
501
556
|
}, {
|
|
502
557
|
content: string;
|
|
503
558
|
profiles: string[];
|
|
504
559
|
draft?: boolean | undefined;
|
|
505
|
-
schedule?: string | undefined;
|
|
506
560
|
media?: string[] | undefined;
|
|
561
|
+
schedule?: string | undefined;
|
|
507
562
|
idempotency_key?: string | undefined;
|
|
508
563
|
require_confirmation?: boolean | undefined;
|
|
509
564
|
platforms?: {
|
|
@@ -520,8 +575,10 @@ export declare const PostPublishSchema: z.ZodObject<{
|
|
|
520
575
|
cover_url?: string | undefined;
|
|
521
576
|
title?: string | undefined;
|
|
522
577
|
privacy_status?: "public" | "unlisted" | "private" | undefined;
|
|
578
|
+
made_for_kids?: boolean | undefined;
|
|
523
579
|
} | undefined;
|
|
524
580
|
tiktok?: {
|
|
581
|
+
format?: "video" | "image" | undefined;
|
|
525
582
|
privacy_status?: "PUBLIC_TO_EVERYONE" | "MUTUAL_FOLLOW_FRIENDS" | "FOLLOWER_OF_CREATOR" | "SELF_ONLY" | undefined;
|
|
526
583
|
photo_cover_index?: number | undefined;
|
|
527
584
|
auto_add_music?: boolean | undefined;
|
|
@@ -543,6 +600,10 @@ export declare const PostPublishSchema: z.ZodObject<{
|
|
|
543
600
|
twitter?: {} | undefined;
|
|
544
601
|
threads?: {} | undefined;
|
|
545
602
|
} | undefined;
|
|
603
|
+
thread?: {
|
|
604
|
+
body: string;
|
|
605
|
+
media?: string[] | undefined;
|
|
606
|
+
}[] | undefined;
|
|
546
607
|
}>;
|
|
547
608
|
/**
|
|
548
609
|
* Validate that a schedule date is in the future
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validation.d.ts","sourceRoot":"","sources":["../../src/utils/validation.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAQX,CAAC;AAEvB;;GAEG;AACH,eAAO,MAAM,iBAAiB;;;;;;;;;EAG5B,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAU5B,CAAC;AAEH;;GAEG;AACH,wBAAgB,wBAAwB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAIlE;AAED;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC"}
|
package/dist/utils/validation.js
CHANGED
|
@@ -74,9 +74,13 @@ export const YouTubeParamsSchema = z.object({
|
|
|
74
74
|
errorMap: () => ({ message: "YouTube privacy_status must be 'public', 'unlisted', or 'private'" }),
|
|
75
75
|
}).optional(),
|
|
76
76
|
cover_url: URLSchema.optional(),
|
|
77
|
+
made_for_kids: z.boolean().optional(),
|
|
77
78
|
}).strict();
|
|
78
79
|
// TikTok parameters validation
|
|
79
80
|
export const TikTokParamsSchema = z.object({
|
|
81
|
+
format: z.enum(["video", "image"], {
|
|
82
|
+
errorMap: () => ({ message: "TikTok format must be 'video' or 'image'" }),
|
|
83
|
+
}).optional(),
|
|
80
84
|
privacy_status: z.enum([
|
|
81
85
|
"PUBLIC_TO_EVERYONE",
|
|
82
86
|
"MUTUAL_FOLLOW_FRIENDS",
|
|
@@ -121,6 +125,13 @@ export const PlatformParamsSchema = z.object({
|
|
|
121
125
|
twitter: TwitterParamsSchema.optional(),
|
|
122
126
|
threads: ThreadsParamsSchema.optional(),
|
|
123
127
|
}).strict().optional();
|
|
128
|
+
/**
|
|
129
|
+
* Schema for thread child posts
|
|
130
|
+
*/
|
|
131
|
+
export const ThreadChildSchema = z.object({
|
|
132
|
+
body: z.string().min(1, "Thread child body cannot be empty"),
|
|
133
|
+
media: z.array(MediaItemSchema).optional(),
|
|
134
|
+
});
|
|
124
135
|
/**
|
|
125
136
|
* Schema for post.publish parameters
|
|
126
137
|
*/
|
|
@@ -133,6 +144,7 @@ export const PostPublishSchema = z.object({
|
|
|
133
144
|
require_confirmation: z.boolean().optional(),
|
|
134
145
|
draft: z.boolean().optional(),
|
|
135
146
|
platforms: PlatformParamsSchema,
|
|
147
|
+
thread: z.array(ThreadChildSchema).optional(),
|
|
136
148
|
});
|
|
137
149
|
/**
|
|
138
150
|
* Validate that a schedule date is in the future
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validation.js","sourceRoot":"","sources":["../../src/utils/validation.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;GAEG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,MAAM,CAChD,CAAC,IAAI,EAAE,EAAE;IACP,MAAM,CAAC,GAAG,IAAI,IAAI,CAAC,IAAI,CAAC,CAAC;IACzB,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC,IAAI,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC;AACnD,CAAC,EACD;IACE,OAAO,EAAE,mEAAmE;CAC7E,CACF,CAAC;AAEF;;GAEG;AACH,MAAM,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M,CAAC;IACxC,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,EAAE,mCAAmC,CAAC;IAC5D,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,eAAe,CAAC,CAAC,QAAQ,EAAE;CAC3C,CAAC,CAAC;AAEH;;GAEG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,CAAC,MAAM,CAAC;IACxC,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,EAAE,yBAAyB,CAAC;IACrD,QAAQ,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,EAAE,kCAAkC,CAAC;IACxE,QAAQ,EAAE,iBAAiB,CAAC,QAAQ,EAAE;IACtC,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,eAAe,CAAC,CAAC,QAAQ,EAAE;IAC1C,eAAe,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACtC,oBAAoB,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;IAC5C,KAAK,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;IAC7B,SAAS,EAAE,oBAAoB;IAC/B,MAAM,EAAE,CAAC,CAAC,KAAK,CAAC,iBAAiB,CAAC,CAAC,QAAQ,EAAE;CAC9C,CAAC,CAAC;AAEH;;GAEG;AACH,MAAM,UAAU,wBAAwB,CAAC,QAAgB;IACvD,MAAM,YAAY,GAAG,IAAI,IAAI,CAAC,QAAQ,CAAC,CAAC;IACxC,MAAM,GAAG,GAAG,IAAI,IAAI,EAAE,CAAC;IACvB,OAAO,YAAY,GAAG,GAAG,CAAC;AAC5B,CAAC"}
|
package/package.json
CHANGED
package/src/api/client.ts
CHANGED
|
@@ -144,6 +144,11 @@ export class PostProxyClient {
|
|
|
144
144
|
formData.append("platforms", JSON.stringify(params.platforms));
|
|
145
145
|
}
|
|
146
146
|
|
|
147
|
+
// Add thread children
|
|
148
|
+
if (params.thread && params.thread.length > 0) {
|
|
149
|
+
formData.append("thread", JSON.stringify(params.thread));
|
|
150
|
+
}
|
|
151
|
+
|
|
147
152
|
// Build headers (no Content-Type - fetch will set it with boundary for multipart)
|
|
148
153
|
const headers: Record<string, string> = {
|
|
149
154
|
Authorization: `Bearer ${this.apiKey}`,
|
|
@@ -387,6 +392,11 @@ export class PostProxyClient {
|
|
|
387
392
|
apiPayload.post.draft = params.draft;
|
|
388
393
|
}
|
|
389
394
|
|
|
395
|
+
// Thread children (X and Threads only)
|
|
396
|
+
if (params.thread && params.thread.length > 0) {
|
|
397
|
+
apiPayload.thread = params.thread;
|
|
398
|
+
}
|
|
399
|
+
|
|
390
400
|
// Platform-specific parameters
|
|
391
401
|
// Only include platforms if it's a non-empty object with at least one platform
|
|
392
402
|
// Supports all platform parameter types: strings, numbers, booleans, arrays (e.g., collaborators)
|
package/src/server.ts
CHANGED
|
@@ -41,7 +41,7 @@ export const TOOL_DEFINITIONS = [
|
|
|
41
41
|
},
|
|
42
42
|
{
|
|
43
43
|
name: "post.publish",
|
|
44
|
-
description: "Publish a post to specified social media profiles. Supports text content, media attachments, scheduling, drafts, and platform-specific customization via the 'platforms' parameter.",
|
|
44
|
+
description: "Publish a post to specified social media profiles. Supports text content, media attachments, scheduling, drafts, threads (X and Threads only), and platform-specific customization via the 'platforms' parameter.",
|
|
45
45
|
inputSchema: {
|
|
46
46
|
type: "object",
|
|
47
47
|
properties: {
|
|
@@ -86,17 +86,17 @@ export const TOOL_DEFINITIONS = [
|
|
|
86
86
|
},
|
|
87
87
|
youtube: {
|
|
88
88
|
type: "object",
|
|
89
|
-
description: "YouTube: title (string), privacy_status (public|unlisted|private), cover_url (thumbnail URL)",
|
|
89
|
+
description: "YouTube: title (string), privacy_status (public|unlisted|private), cover_url (thumbnail URL), made_for_kids (bool)",
|
|
90
90
|
additionalProperties: true,
|
|
91
91
|
},
|
|
92
92
|
tiktok: {
|
|
93
93
|
type: "object",
|
|
94
|
-
description: "TikTok: privacy_status (PUBLIC_TO_EVERYONE|MUTUAL_FOLLOW_FRIENDS|FOLLOWER_OF_CREATOR|SELF_ONLY), photo_cover_index (integer), auto_add_music (bool), made_with_ai (bool), disable_comment (bool), disable_duet (bool), disable_stitch (bool), brand_content_toggle (bool), brand_organic_toggle (bool)",
|
|
94
|
+
description: "TikTok: format (video|image), privacy_status (PUBLIC_TO_EVERYONE|MUTUAL_FOLLOW_FRIENDS|FOLLOWER_OF_CREATOR|SELF_ONLY), photo_cover_index (integer, image only), auto_add_music (bool, image only), made_with_ai (bool, video only), disable_comment (bool), disable_duet (bool, video only), disable_stitch (bool, video only), brand_content_toggle (bool), brand_organic_toggle (bool)",
|
|
95
95
|
additionalProperties: true,
|
|
96
96
|
},
|
|
97
97
|
facebook: {
|
|
98
98
|
type: "object",
|
|
99
|
-
description: "Facebook: format (post|story), first_comment (string), page_id (string)",
|
|
99
|
+
description: "Facebook: format (post|story), first_comment (string), page_id (string, use profiles.placements to get available pages)",
|
|
100
100
|
additionalProperties: true,
|
|
101
101
|
},
|
|
102
102
|
linkedin: {
|
|
@@ -106,17 +106,36 @@ export const TOOL_DEFINITIONS = [
|
|
|
106
106
|
},
|
|
107
107
|
twitter: {
|
|
108
108
|
type: "object",
|
|
109
|
-
description: "Twitter/X: No platform-specific parameters available",
|
|
109
|
+
description: "Twitter/X: No platform-specific parameters available. Supports threads.",
|
|
110
110
|
additionalProperties: true,
|
|
111
111
|
},
|
|
112
112
|
threads: {
|
|
113
113
|
type: "object",
|
|
114
|
-
description: "Threads: No platform-specific parameters available",
|
|
114
|
+
description: "Threads: No platform-specific parameters available. Supports threads.",
|
|
115
115
|
additionalProperties: true,
|
|
116
116
|
},
|
|
117
117
|
},
|
|
118
118
|
additionalProperties: true,
|
|
119
119
|
},
|
|
120
|
+
thread: {
|
|
121
|
+
type: "array",
|
|
122
|
+
description: "Optional array of thread child posts (supported on X/Twitter and Threads only). The parent post is published first, then each child is published as a reply in order.",
|
|
123
|
+
items: {
|
|
124
|
+
type: "object",
|
|
125
|
+
properties: {
|
|
126
|
+
body: {
|
|
127
|
+
type: "string",
|
|
128
|
+
description: "Text content for this thread post",
|
|
129
|
+
},
|
|
130
|
+
media: {
|
|
131
|
+
type: "array",
|
|
132
|
+
items: { type: "string" },
|
|
133
|
+
description: "Optional array of media URLs for this thread post",
|
|
134
|
+
},
|
|
135
|
+
},
|
|
136
|
+
required: ["body"],
|
|
137
|
+
},
|
|
138
|
+
},
|
|
120
139
|
},
|
|
121
140
|
required: ["content", "profiles"],
|
|
122
141
|
},
|
package/src/tools/history.ts
CHANGED
|
@@ -22,8 +22,10 @@ export async function handleHistoryList(
|
|
|
22
22
|
// Determine overall status from post status
|
|
23
23
|
let overallStatus = "unknown";
|
|
24
24
|
|
|
25
|
-
// Handle
|
|
26
|
-
if (post.status === "
|
|
25
|
+
// Handle special statuses first
|
|
26
|
+
if (post.status === "media_processing_failed") {
|
|
27
|
+
overallStatus = "media_processing_failed";
|
|
28
|
+
} else if (post.status === "draft" || post.draft === true) {
|
|
27
29
|
overallStatus = "draft";
|
|
28
30
|
} else if (post.status === "scheduled") {
|
|
29
31
|
overallStatus = "pending";
|
package/src/tools/post.ts
CHANGED
|
@@ -19,6 +19,7 @@ export async function handlePostPublish(
|
|
|
19
19
|
require_confirmation?: boolean;
|
|
20
20
|
draft?: boolean;
|
|
21
21
|
platforms?: Record<string, Record<string, any>>;
|
|
22
|
+
thread?: Array<{ body: string; media?: string[] }>;
|
|
22
23
|
}
|
|
23
24
|
) {
|
|
24
25
|
// Validate input
|
|
@@ -43,6 +44,7 @@ export async function handlePostPublish(
|
|
|
43
44
|
schedule_time: args.schedule,
|
|
44
45
|
draft: args.draft || false,
|
|
45
46
|
platforms: args.platforms || {},
|
|
47
|
+
thread: args.thread || [],
|
|
46
48
|
},
|
|
47
49
|
},
|
|
48
50
|
null,
|
|
@@ -78,6 +80,7 @@ export async function handlePostPublish(
|
|
|
78
80
|
idempotency_key: idempotencyKey,
|
|
79
81
|
draft: draftValue, // Explicitly pass draft value (true, false, or undefined)
|
|
80
82
|
platforms: args.platforms, // Platform-specific parameters
|
|
83
|
+
thread: args.thread, // Thread children (X and Threads only)
|
|
81
84
|
});
|
|
82
85
|
|
|
83
86
|
// Check if draft was requested but API ignored it
|
|
@@ -157,10 +160,12 @@ export async function handlePostStatus(
|
|
|
157
160
|
}
|
|
158
161
|
|
|
159
162
|
// Determine overall status from post status and platform statuses
|
|
160
|
-
let overallStatus: "pending" | "processing" | "complete" | "failed" | "draft" = "pending";
|
|
161
|
-
|
|
163
|
+
let overallStatus: "pending" | "processing" | "complete" | "failed" | "draft" | "media_processing_failed" = "pending";
|
|
164
|
+
|
|
162
165
|
// Handle draft status first
|
|
163
|
-
if (postDetails.status === "
|
|
166
|
+
if (postDetails.status === "media_processing_failed") {
|
|
167
|
+
overallStatus = "media_processing_failed";
|
|
168
|
+
} else if (postDetails.status === "draft" || postDetails.draft === true) {
|
|
164
169
|
overallStatus = "draft";
|
|
165
170
|
} else if (postDetails.status === "scheduled") {
|
|
166
171
|
overallStatus = "pending";
|
|
@@ -191,21 +196,27 @@ export async function handlePostStatus(
|
|
|
191
196
|
overallStatus = "pending";
|
|
192
197
|
}
|
|
193
198
|
|
|
199
|
+
const result: any = {
|
|
200
|
+
job_id: args.job_id,
|
|
201
|
+
overall_status: overallStatus,
|
|
202
|
+
draft: postDetails.draft || false,
|
|
203
|
+
status: postDetails.status,
|
|
204
|
+
platforms,
|
|
205
|
+
};
|
|
206
|
+
|
|
207
|
+
if (postDetails.media && postDetails.media.length > 0) {
|
|
208
|
+
result.media = postDetails.media;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
if (postDetails.thread && postDetails.thread.length > 0) {
|
|
212
|
+
result.thread = postDetails.thread;
|
|
213
|
+
}
|
|
214
|
+
|
|
194
215
|
return {
|
|
195
216
|
content: [
|
|
196
217
|
{
|
|
197
218
|
type: "text",
|
|
198
|
-
text: JSON.stringify(
|
|
199
|
-
{
|
|
200
|
-
job_id: args.job_id,
|
|
201
|
-
overall_status: overallStatus,
|
|
202
|
-
draft: postDetails.draft || false,
|
|
203
|
-
status: postDetails.status,
|
|
204
|
-
platforms,
|
|
205
|
-
},
|
|
206
|
-
null,
|
|
207
|
-
2
|
|
208
|
-
),
|
|
219
|
+
text: JSON.stringify(result, null, 2),
|
|
209
220
|
},
|
|
210
221
|
],
|
|
211
222
|
};
|