postproxy-mcp 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.
Files changed (85) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +635 -0
  3. package/dist/api/client.d.ts +71 -0
  4. package/dist/api/client.d.ts.map +1 -0
  5. package/dist/api/client.js +432 -0
  6. package/dist/api/client.js.map +1 -0
  7. package/dist/auth/credentials.d.ts +19 -0
  8. package/dist/auth/credentials.d.ts.map +1 -0
  9. package/dist/auth/credentials.js +40 -0
  10. package/dist/auth/credentials.js.map +1 -0
  11. package/dist/index.d.ts +6 -0
  12. package/dist/index.d.ts.map +1 -0
  13. package/dist/index.js +44 -0
  14. package/dist/index.js.map +1 -0
  15. package/dist/server.d.ts +162 -0
  16. package/dist/server.d.ts.map +1 -0
  17. package/dist/server.js +220 -0
  18. package/dist/server.js.map +1 -0
  19. package/dist/setup-cli.d.ts +6 -0
  20. package/dist/setup-cli.d.ts.map +1 -0
  21. package/dist/setup-cli.js +10 -0
  22. package/dist/setup-cli.js.map +1 -0
  23. package/dist/setup.d.ts +8 -0
  24. package/dist/setup.d.ts.map +1 -0
  25. package/dist/setup.js +143 -0
  26. package/dist/setup.js.map +1 -0
  27. package/dist/tools/accounts.d.ts +11 -0
  28. package/dist/tools/accounts.d.ts.map +1 -0
  29. package/dist/tools/accounts.js +53 -0
  30. package/dist/tools/accounts.js.map +1 -0
  31. package/dist/tools/auth.d.ts +11 -0
  32. package/dist/tools/auth.d.ts.map +1 -0
  33. package/dist/tools/auth.js +35 -0
  34. package/dist/tools/auth.js.map +1 -0
  35. package/dist/tools/history.d.ts +13 -0
  36. package/dist/tools/history.d.ts.map +1 -0
  37. package/dist/tools/history.js +79 -0
  38. package/dist/tools/history.js.map +1 -0
  39. package/dist/tools/post.d.ts +44 -0
  40. package/dist/tools/post.d.ts.map +1 -0
  41. package/dist/tools/post.js +251 -0
  42. package/dist/tools/post.js.map +1 -0
  43. package/dist/tools/profiles.d.ts +11 -0
  44. package/dist/tools/profiles.d.ts.map +1 -0
  45. package/dist/tools/profiles.js +52 -0
  46. package/dist/tools/profiles.js.map +1 -0
  47. package/dist/types/index.d.ts +147 -0
  48. package/dist/types/index.d.ts.map +1 -0
  49. package/dist/types/index.js +5 -0
  50. package/dist/types/index.js.map +1 -0
  51. package/dist/utils/errors.d.ts +21 -0
  52. package/dist/utils/errors.d.ts.map +1 -0
  53. package/dist/utils/errors.js +33 -0
  54. package/dist/utils/errors.js.map +1 -0
  55. package/dist/utils/idempotency.d.ts +8 -0
  56. package/dist/utils/idempotency.d.ts.map +1 -0
  57. package/dist/utils/idempotency.js +23 -0
  58. package/dist/utils/idempotency.js.map +1 -0
  59. package/dist/utils/logger.d.ts +20 -0
  60. package/dist/utils/logger.d.ts.map +1 -0
  61. package/dist/utils/logger.js +68 -0
  62. package/dist/utils/logger.js.map +1 -0
  63. package/dist/utils/validation.d.ts +555 -0
  64. package/dist/utils/validation.d.ts.map +1 -0
  65. package/dist/utils/validation.js +145 -0
  66. package/dist/utils/validation.js.map +1 -0
  67. package/package.json +39 -0
  68. package/src/api/client.ts +497 -0
  69. package/src/auth/credentials.ts +43 -0
  70. package/src/index.ts +57 -0
  71. package/src/server.ts +235 -0
  72. package/src/setup-cli.ts +11 -0
  73. package/src/setup.ts +187 -0
  74. package/src/tools/auth.ts +45 -0
  75. package/src/tools/history.ts +89 -0
  76. package/src/tools/post.ts +338 -0
  77. package/src/tools/profiles.ts +69 -0
  78. package/src/types/index.ts +161 -0
  79. package/src/utils/errors.ts +38 -0
  80. package/src/utils/idempotency.ts +31 -0
  81. package/src/utils/logger.ts +75 -0
  82. package/src/utils/validation.ts +171 -0
  83. package/tsconfig.json +19 -0
  84. package/worker/index.ts +901 -0
  85. package/wrangler.toml +11 -0
@@ -0,0 +1,555 @@
1
+ /**
2
+ * Validation schemas using Zod
3
+ */
4
+ import { z } from "zod";
5
+ /**
6
+ * Schema for ISO 8601 date strings
7
+ */
8
+ export declare const ISO8601DateSchema: z.ZodEffects<z.ZodString, string, string>;
9
+ /**
10
+ * Schema for URL strings
11
+ */
12
+ export declare const URLSchema: z.ZodString;
13
+ /**
14
+ * Check if a string looks like a file path
15
+ */
16
+ export declare function isFilePath(value: string): boolean;
17
+ /**
18
+ * Schema for media items (URLs or file paths)
19
+ */
20
+ export declare const MediaItemSchema: z.ZodEffects<z.ZodString, string, string>;
21
+ /**
22
+ * Platform-specific validation schemas
23
+ */
24
+ export declare const InstagramParamsSchema: z.ZodObject<{
25
+ format: z.ZodOptional<z.ZodEnum<["post", "reel", "story"]>>;
26
+ collaborators: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
27
+ first_comment: z.ZodOptional<z.ZodString>;
28
+ cover_url: z.ZodOptional<z.ZodString>;
29
+ audio_name: z.ZodOptional<z.ZodString>;
30
+ trial_strategy: z.ZodOptional<z.ZodEnum<["MANUAL", "SS_PERFORMANCE"]>>;
31
+ thumb_offset: z.ZodOptional<z.ZodString>;
32
+ }, "strict", z.ZodTypeAny, {
33
+ format?: "post" | "reel" | "story" | undefined;
34
+ collaborators?: string[] | undefined;
35
+ first_comment?: string | undefined;
36
+ cover_url?: string | undefined;
37
+ audio_name?: string | undefined;
38
+ trial_strategy?: "MANUAL" | "SS_PERFORMANCE" | undefined;
39
+ thumb_offset?: string | undefined;
40
+ }, {
41
+ format?: "post" | "reel" | "story" | undefined;
42
+ collaborators?: string[] | undefined;
43
+ first_comment?: string | undefined;
44
+ cover_url?: string | undefined;
45
+ audio_name?: string | undefined;
46
+ trial_strategy?: "MANUAL" | "SS_PERFORMANCE" | undefined;
47
+ thumb_offset?: string | undefined;
48
+ }>;
49
+ export declare const YouTubeParamsSchema: z.ZodObject<{
50
+ title: z.ZodOptional<z.ZodString>;
51
+ privacy_status: z.ZodOptional<z.ZodEnum<["public", "unlisted", "private"]>>;
52
+ cover_url: z.ZodOptional<z.ZodString>;
53
+ }, "strict", z.ZodTypeAny, {
54
+ cover_url?: string | undefined;
55
+ title?: string | undefined;
56
+ privacy_status?: "public" | "unlisted" | "private" | undefined;
57
+ }, {
58
+ cover_url?: string | undefined;
59
+ title?: string | undefined;
60
+ privacy_status?: "public" | "unlisted" | "private" | undefined;
61
+ }>;
62
+ export declare const TikTokParamsSchema: z.ZodObject<{
63
+ privacy_status: z.ZodOptional<z.ZodEnum<["PUBLIC_TO_EVERYONE", "MUTUAL_FOLLOW_FRIENDS", "FOLLOWER_OF_CREATOR", "SELF_ONLY"]>>;
64
+ photo_cover_index: z.ZodOptional<z.ZodNumber>;
65
+ auto_add_music: z.ZodOptional<z.ZodBoolean>;
66
+ made_with_ai: z.ZodOptional<z.ZodBoolean>;
67
+ disable_comment: z.ZodOptional<z.ZodBoolean>;
68
+ disable_duet: z.ZodOptional<z.ZodBoolean>;
69
+ disable_stitch: z.ZodOptional<z.ZodBoolean>;
70
+ brand_content_toggle: z.ZodOptional<z.ZodBoolean>;
71
+ brand_organic_toggle: z.ZodOptional<z.ZodBoolean>;
72
+ }, "strict", z.ZodTypeAny, {
73
+ privacy_status?: "PUBLIC_TO_EVERYONE" | "MUTUAL_FOLLOW_FRIENDS" | "FOLLOWER_OF_CREATOR" | "SELF_ONLY" | undefined;
74
+ photo_cover_index?: number | undefined;
75
+ auto_add_music?: boolean | undefined;
76
+ made_with_ai?: boolean | undefined;
77
+ disable_comment?: boolean | undefined;
78
+ disable_duet?: boolean | undefined;
79
+ disable_stitch?: boolean | undefined;
80
+ brand_content_toggle?: boolean | undefined;
81
+ brand_organic_toggle?: boolean | undefined;
82
+ }, {
83
+ privacy_status?: "PUBLIC_TO_EVERYONE" | "MUTUAL_FOLLOW_FRIENDS" | "FOLLOWER_OF_CREATOR" | "SELF_ONLY" | undefined;
84
+ photo_cover_index?: number | undefined;
85
+ auto_add_music?: boolean | undefined;
86
+ made_with_ai?: boolean | undefined;
87
+ disable_comment?: boolean | undefined;
88
+ disable_duet?: boolean | undefined;
89
+ disable_stitch?: boolean | undefined;
90
+ brand_content_toggle?: boolean | undefined;
91
+ brand_organic_toggle?: boolean | undefined;
92
+ }>;
93
+ export declare const FacebookParamsSchema: z.ZodObject<{
94
+ format: z.ZodOptional<z.ZodEnum<["post", "story"]>>;
95
+ first_comment: z.ZodOptional<z.ZodString>;
96
+ page_id: z.ZodOptional<z.ZodString>;
97
+ }, "strict", z.ZodTypeAny, {
98
+ format?: "post" | "story" | undefined;
99
+ first_comment?: string | undefined;
100
+ page_id?: string | undefined;
101
+ }, {
102
+ format?: "post" | "story" | undefined;
103
+ first_comment?: string | undefined;
104
+ page_id?: string | undefined;
105
+ }>;
106
+ export declare const LinkedInParamsSchema: z.ZodObject<{
107
+ organization_id: z.ZodOptional<z.ZodString>;
108
+ }, "strict", z.ZodTypeAny, {
109
+ organization_id?: string | undefined;
110
+ }, {
111
+ organization_id?: string | undefined;
112
+ }>;
113
+ export declare const TwitterParamsSchema: z.ZodObject<{}, "strict", z.ZodTypeAny, {}, {}>;
114
+ export declare const ThreadsParamsSchema: z.ZodObject<{}, "strict", z.ZodTypeAny, {}, {}>;
115
+ export declare const PlatformParamsSchema: z.ZodOptional<z.ZodObject<{
116
+ instagram: z.ZodOptional<z.ZodObject<{
117
+ format: z.ZodOptional<z.ZodEnum<["post", "reel", "story"]>>;
118
+ collaborators: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
119
+ first_comment: z.ZodOptional<z.ZodString>;
120
+ cover_url: z.ZodOptional<z.ZodString>;
121
+ audio_name: z.ZodOptional<z.ZodString>;
122
+ trial_strategy: z.ZodOptional<z.ZodEnum<["MANUAL", "SS_PERFORMANCE"]>>;
123
+ thumb_offset: z.ZodOptional<z.ZodString>;
124
+ }, "strict", z.ZodTypeAny, {
125
+ format?: "post" | "reel" | "story" | undefined;
126
+ collaborators?: string[] | undefined;
127
+ first_comment?: string | undefined;
128
+ cover_url?: string | undefined;
129
+ audio_name?: string | undefined;
130
+ trial_strategy?: "MANUAL" | "SS_PERFORMANCE" | undefined;
131
+ thumb_offset?: string | undefined;
132
+ }, {
133
+ format?: "post" | "reel" | "story" | undefined;
134
+ collaborators?: string[] | undefined;
135
+ first_comment?: string | undefined;
136
+ cover_url?: string | undefined;
137
+ audio_name?: string | undefined;
138
+ trial_strategy?: "MANUAL" | "SS_PERFORMANCE" | undefined;
139
+ thumb_offset?: string | undefined;
140
+ }>>;
141
+ youtube: z.ZodOptional<z.ZodObject<{
142
+ title: z.ZodOptional<z.ZodString>;
143
+ privacy_status: z.ZodOptional<z.ZodEnum<["public", "unlisted", "private"]>>;
144
+ cover_url: z.ZodOptional<z.ZodString>;
145
+ }, "strict", z.ZodTypeAny, {
146
+ cover_url?: string | undefined;
147
+ title?: string | undefined;
148
+ privacy_status?: "public" | "unlisted" | "private" | undefined;
149
+ }, {
150
+ cover_url?: string | undefined;
151
+ title?: string | undefined;
152
+ privacy_status?: "public" | "unlisted" | "private" | undefined;
153
+ }>>;
154
+ tiktok: z.ZodOptional<z.ZodObject<{
155
+ privacy_status: z.ZodOptional<z.ZodEnum<["PUBLIC_TO_EVERYONE", "MUTUAL_FOLLOW_FRIENDS", "FOLLOWER_OF_CREATOR", "SELF_ONLY"]>>;
156
+ photo_cover_index: z.ZodOptional<z.ZodNumber>;
157
+ auto_add_music: z.ZodOptional<z.ZodBoolean>;
158
+ made_with_ai: z.ZodOptional<z.ZodBoolean>;
159
+ disable_comment: z.ZodOptional<z.ZodBoolean>;
160
+ disable_duet: z.ZodOptional<z.ZodBoolean>;
161
+ disable_stitch: z.ZodOptional<z.ZodBoolean>;
162
+ brand_content_toggle: z.ZodOptional<z.ZodBoolean>;
163
+ brand_organic_toggle: z.ZodOptional<z.ZodBoolean>;
164
+ }, "strict", z.ZodTypeAny, {
165
+ privacy_status?: "PUBLIC_TO_EVERYONE" | "MUTUAL_FOLLOW_FRIENDS" | "FOLLOWER_OF_CREATOR" | "SELF_ONLY" | undefined;
166
+ photo_cover_index?: number | undefined;
167
+ auto_add_music?: boolean | undefined;
168
+ made_with_ai?: boolean | undefined;
169
+ disable_comment?: boolean | undefined;
170
+ disable_duet?: boolean | undefined;
171
+ disable_stitch?: boolean | undefined;
172
+ brand_content_toggle?: boolean | undefined;
173
+ brand_organic_toggle?: boolean | undefined;
174
+ }, {
175
+ privacy_status?: "PUBLIC_TO_EVERYONE" | "MUTUAL_FOLLOW_FRIENDS" | "FOLLOWER_OF_CREATOR" | "SELF_ONLY" | undefined;
176
+ photo_cover_index?: number | undefined;
177
+ auto_add_music?: boolean | undefined;
178
+ made_with_ai?: boolean | undefined;
179
+ disable_comment?: boolean | undefined;
180
+ disable_duet?: boolean | undefined;
181
+ disable_stitch?: boolean | undefined;
182
+ brand_content_toggle?: boolean | undefined;
183
+ brand_organic_toggle?: boolean | undefined;
184
+ }>>;
185
+ facebook: z.ZodOptional<z.ZodObject<{
186
+ format: z.ZodOptional<z.ZodEnum<["post", "story"]>>;
187
+ first_comment: z.ZodOptional<z.ZodString>;
188
+ page_id: z.ZodOptional<z.ZodString>;
189
+ }, "strict", z.ZodTypeAny, {
190
+ format?: "post" | "story" | undefined;
191
+ first_comment?: string | undefined;
192
+ page_id?: string | undefined;
193
+ }, {
194
+ format?: "post" | "story" | undefined;
195
+ first_comment?: string | undefined;
196
+ page_id?: string | undefined;
197
+ }>>;
198
+ linkedin: z.ZodOptional<z.ZodObject<{
199
+ organization_id: z.ZodOptional<z.ZodString>;
200
+ }, "strict", z.ZodTypeAny, {
201
+ organization_id?: string | undefined;
202
+ }, {
203
+ organization_id?: string | undefined;
204
+ }>>;
205
+ twitter: z.ZodOptional<z.ZodObject<{}, "strict", z.ZodTypeAny, {}, {}>>;
206
+ threads: z.ZodOptional<z.ZodObject<{}, "strict", z.ZodTypeAny, {}, {}>>;
207
+ }, "strict", z.ZodTypeAny, {
208
+ instagram?: {
209
+ format?: "post" | "reel" | "story" | undefined;
210
+ collaborators?: string[] | undefined;
211
+ first_comment?: string | undefined;
212
+ cover_url?: string | undefined;
213
+ audio_name?: string | undefined;
214
+ trial_strategy?: "MANUAL" | "SS_PERFORMANCE" | undefined;
215
+ thumb_offset?: string | undefined;
216
+ } | undefined;
217
+ youtube?: {
218
+ cover_url?: string | undefined;
219
+ title?: string | undefined;
220
+ privacy_status?: "public" | "unlisted" | "private" | undefined;
221
+ } | undefined;
222
+ tiktok?: {
223
+ privacy_status?: "PUBLIC_TO_EVERYONE" | "MUTUAL_FOLLOW_FRIENDS" | "FOLLOWER_OF_CREATOR" | "SELF_ONLY" | undefined;
224
+ photo_cover_index?: number | undefined;
225
+ auto_add_music?: boolean | undefined;
226
+ made_with_ai?: boolean | undefined;
227
+ disable_comment?: boolean | undefined;
228
+ disable_duet?: boolean | undefined;
229
+ disable_stitch?: boolean | undefined;
230
+ brand_content_toggle?: boolean | undefined;
231
+ brand_organic_toggle?: boolean | undefined;
232
+ } | undefined;
233
+ facebook?: {
234
+ format?: "post" | "story" | undefined;
235
+ first_comment?: string | undefined;
236
+ page_id?: string | undefined;
237
+ } | undefined;
238
+ linkedin?: {
239
+ organization_id?: string | undefined;
240
+ } | undefined;
241
+ twitter?: {} | undefined;
242
+ threads?: {} | undefined;
243
+ }, {
244
+ instagram?: {
245
+ format?: "post" | "reel" | "story" | undefined;
246
+ collaborators?: string[] | undefined;
247
+ first_comment?: string | undefined;
248
+ cover_url?: string | undefined;
249
+ audio_name?: string | undefined;
250
+ trial_strategy?: "MANUAL" | "SS_PERFORMANCE" | undefined;
251
+ thumb_offset?: string | undefined;
252
+ } | undefined;
253
+ youtube?: {
254
+ cover_url?: string | undefined;
255
+ title?: string | undefined;
256
+ privacy_status?: "public" | "unlisted" | "private" | undefined;
257
+ } | undefined;
258
+ tiktok?: {
259
+ privacy_status?: "PUBLIC_TO_EVERYONE" | "MUTUAL_FOLLOW_FRIENDS" | "FOLLOWER_OF_CREATOR" | "SELF_ONLY" | undefined;
260
+ photo_cover_index?: number | undefined;
261
+ auto_add_music?: boolean | undefined;
262
+ made_with_ai?: boolean | undefined;
263
+ disable_comment?: boolean | undefined;
264
+ disable_duet?: boolean | undefined;
265
+ disable_stitch?: boolean | undefined;
266
+ brand_content_toggle?: boolean | undefined;
267
+ brand_organic_toggle?: boolean | undefined;
268
+ } | undefined;
269
+ facebook?: {
270
+ format?: "post" | "story" | undefined;
271
+ first_comment?: string | undefined;
272
+ page_id?: string | undefined;
273
+ } | undefined;
274
+ linkedin?: {
275
+ organization_id?: string | undefined;
276
+ } | undefined;
277
+ twitter?: {} | undefined;
278
+ threads?: {} | undefined;
279
+ }>>;
280
+ /**
281
+ * Schema for post.publish parameters
282
+ */
283
+ export declare const PostPublishSchema: z.ZodObject<{
284
+ content: z.ZodString;
285
+ targets: z.ZodArray<z.ZodString, "many">;
286
+ schedule: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
287
+ media: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">>;
288
+ idempotency_key: z.ZodOptional<z.ZodString>;
289
+ require_confirmation: z.ZodOptional<z.ZodBoolean>;
290
+ draft: z.ZodOptional<z.ZodBoolean>;
291
+ platforms: z.ZodOptional<z.ZodObject<{
292
+ instagram: z.ZodOptional<z.ZodObject<{
293
+ format: z.ZodOptional<z.ZodEnum<["post", "reel", "story"]>>;
294
+ collaborators: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
295
+ first_comment: z.ZodOptional<z.ZodString>;
296
+ cover_url: z.ZodOptional<z.ZodString>;
297
+ audio_name: z.ZodOptional<z.ZodString>;
298
+ trial_strategy: z.ZodOptional<z.ZodEnum<["MANUAL", "SS_PERFORMANCE"]>>;
299
+ thumb_offset: z.ZodOptional<z.ZodString>;
300
+ }, "strict", z.ZodTypeAny, {
301
+ format?: "post" | "reel" | "story" | undefined;
302
+ collaborators?: string[] | undefined;
303
+ first_comment?: string | undefined;
304
+ cover_url?: string | undefined;
305
+ audio_name?: string | undefined;
306
+ trial_strategy?: "MANUAL" | "SS_PERFORMANCE" | undefined;
307
+ thumb_offset?: string | undefined;
308
+ }, {
309
+ format?: "post" | "reel" | "story" | undefined;
310
+ collaborators?: string[] | undefined;
311
+ first_comment?: string | undefined;
312
+ cover_url?: string | undefined;
313
+ audio_name?: string | undefined;
314
+ trial_strategy?: "MANUAL" | "SS_PERFORMANCE" | undefined;
315
+ thumb_offset?: string | undefined;
316
+ }>>;
317
+ youtube: z.ZodOptional<z.ZodObject<{
318
+ title: z.ZodOptional<z.ZodString>;
319
+ privacy_status: z.ZodOptional<z.ZodEnum<["public", "unlisted", "private"]>>;
320
+ cover_url: z.ZodOptional<z.ZodString>;
321
+ }, "strict", z.ZodTypeAny, {
322
+ cover_url?: string | undefined;
323
+ title?: string | undefined;
324
+ privacy_status?: "public" | "unlisted" | "private" | undefined;
325
+ }, {
326
+ cover_url?: string | undefined;
327
+ title?: string | undefined;
328
+ privacy_status?: "public" | "unlisted" | "private" | undefined;
329
+ }>>;
330
+ tiktok: z.ZodOptional<z.ZodObject<{
331
+ privacy_status: z.ZodOptional<z.ZodEnum<["PUBLIC_TO_EVERYONE", "MUTUAL_FOLLOW_FRIENDS", "FOLLOWER_OF_CREATOR", "SELF_ONLY"]>>;
332
+ photo_cover_index: z.ZodOptional<z.ZodNumber>;
333
+ auto_add_music: z.ZodOptional<z.ZodBoolean>;
334
+ made_with_ai: z.ZodOptional<z.ZodBoolean>;
335
+ disable_comment: z.ZodOptional<z.ZodBoolean>;
336
+ disable_duet: z.ZodOptional<z.ZodBoolean>;
337
+ disable_stitch: z.ZodOptional<z.ZodBoolean>;
338
+ brand_content_toggle: z.ZodOptional<z.ZodBoolean>;
339
+ brand_organic_toggle: z.ZodOptional<z.ZodBoolean>;
340
+ }, "strict", z.ZodTypeAny, {
341
+ privacy_status?: "PUBLIC_TO_EVERYONE" | "MUTUAL_FOLLOW_FRIENDS" | "FOLLOWER_OF_CREATOR" | "SELF_ONLY" | undefined;
342
+ photo_cover_index?: number | undefined;
343
+ auto_add_music?: boolean | undefined;
344
+ made_with_ai?: boolean | undefined;
345
+ disable_comment?: boolean | undefined;
346
+ disable_duet?: boolean | undefined;
347
+ disable_stitch?: boolean | undefined;
348
+ brand_content_toggle?: boolean | undefined;
349
+ brand_organic_toggle?: boolean | undefined;
350
+ }, {
351
+ privacy_status?: "PUBLIC_TO_EVERYONE" | "MUTUAL_FOLLOW_FRIENDS" | "FOLLOWER_OF_CREATOR" | "SELF_ONLY" | undefined;
352
+ photo_cover_index?: number | undefined;
353
+ auto_add_music?: boolean | undefined;
354
+ made_with_ai?: boolean | undefined;
355
+ disable_comment?: boolean | undefined;
356
+ disable_duet?: boolean | undefined;
357
+ disable_stitch?: boolean | undefined;
358
+ brand_content_toggle?: boolean | undefined;
359
+ brand_organic_toggle?: boolean | undefined;
360
+ }>>;
361
+ facebook: z.ZodOptional<z.ZodObject<{
362
+ format: z.ZodOptional<z.ZodEnum<["post", "story"]>>;
363
+ first_comment: z.ZodOptional<z.ZodString>;
364
+ page_id: z.ZodOptional<z.ZodString>;
365
+ }, "strict", z.ZodTypeAny, {
366
+ format?: "post" | "story" | undefined;
367
+ first_comment?: string | undefined;
368
+ page_id?: string | undefined;
369
+ }, {
370
+ format?: "post" | "story" | undefined;
371
+ first_comment?: string | undefined;
372
+ page_id?: string | undefined;
373
+ }>>;
374
+ linkedin: z.ZodOptional<z.ZodObject<{
375
+ organization_id: z.ZodOptional<z.ZodString>;
376
+ }, "strict", z.ZodTypeAny, {
377
+ organization_id?: string | undefined;
378
+ }, {
379
+ organization_id?: string | undefined;
380
+ }>>;
381
+ twitter: z.ZodOptional<z.ZodObject<{}, "strict", z.ZodTypeAny, {}, {}>>;
382
+ threads: z.ZodOptional<z.ZodObject<{}, "strict", z.ZodTypeAny, {}, {}>>;
383
+ }, "strict", z.ZodTypeAny, {
384
+ instagram?: {
385
+ format?: "post" | "reel" | "story" | undefined;
386
+ collaborators?: string[] | undefined;
387
+ first_comment?: string | undefined;
388
+ cover_url?: string | undefined;
389
+ audio_name?: string | undefined;
390
+ trial_strategy?: "MANUAL" | "SS_PERFORMANCE" | undefined;
391
+ thumb_offset?: string | undefined;
392
+ } | undefined;
393
+ youtube?: {
394
+ cover_url?: string | undefined;
395
+ title?: string | undefined;
396
+ privacy_status?: "public" | "unlisted" | "private" | undefined;
397
+ } | undefined;
398
+ tiktok?: {
399
+ privacy_status?: "PUBLIC_TO_EVERYONE" | "MUTUAL_FOLLOW_FRIENDS" | "FOLLOWER_OF_CREATOR" | "SELF_ONLY" | undefined;
400
+ photo_cover_index?: number | undefined;
401
+ auto_add_music?: boolean | undefined;
402
+ made_with_ai?: boolean | undefined;
403
+ disable_comment?: boolean | undefined;
404
+ disable_duet?: boolean | undefined;
405
+ disable_stitch?: boolean | undefined;
406
+ brand_content_toggle?: boolean | undefined;
407
+ brand_organic_toggle?: boolean | undefined;
408
+ } | undefined;
409
+ facebook?: {
410
+ format?: "post" | "story" | undefined;
411
+ first_comment?: string | undefined;
412
+ page_id?: string | undefined;
413
+ } | undefined;
414
+ linkedin?: {
415
+ organization_id?: string | undefined;
416
+ } | undefined;
417
+ twitter?: {} | undefined;
418
+ threads?: {} | undefined;
419
+ }, {
420
+ instagram?: {
421
+ format?: "post" | "reel" | "story" | undefined;
422
+ collaborators?: string[] | undefined;
423
+ first_comment?: string | undefined;
424
+ cover_url?: string | undefined;
425
+ audio_name?: string | undefined;
426
+ trial_strategy?: "MANUAL" | "SS_PERFORMANCE" | undefined;
427
+ thumb_offset?: string | undefined;
428
+ } | undefined;
429
+ youtube?: {
430
+ cover_url?: string | undefined;
431
+ title?: string | undefined;
432
+ privacy_status?: "public" | "unlisted" | "private" | undefined;
433
+ } | undefined;
434
+ tiktok?: {
435
+ privacy_status?: "PUBLIC_TO_EVERYONE" | "MUTUAL_FOLLOW_FRIENDS" | "FOLLOWER_OF_CREATOR" | "SELF_ONLY" | undefined;
436
+ photo_cover_index?: number | undefined;
437
+ auto_add_music?: boolean | undefined;
438
+ made_with_ai?: boolean | undefined;
439
+ disable_comment?: boolean | undefined;
440
+ disable_duet?: boolean | undefined;
441
+ disable_stitch?: boolean | undefined;
442
+ brand_content_toggle?: boolean | undefined;
443
+ brand_organic_toggle?: boolean | undefined;
444
+ } | undefined;
445
+ facebook?: {
446
+ format?: "post" | "story" | undefined;
447
+ first_comment?: string | undefined;
448
+ page_id?: string | undefined;
449
+ } | undefined;
450
+ linkedin?: {
451
+ organization_id?: string | undefined;
452
+ } | undefined;
453
+ twitter?: {} | undefined;
454
+ threads?: {} | undefined;
455
+ }>>;
456
+ }, "strip", z.ZodTypeAny, {
457
+ content: string;
458
+ targets: string[];
459
+ draft?: boolean | undefined;
460
+ schedule?: string | undefined;
461
+ media?: string[] | undefined;
462
+ idempotency_key?: string | undefined;
463
+ require_confirmation?: boolean | undefined;
464
+ platforms?: {
465
+ instagram?: {
466
+ format?: "post" | "reel" | "story" | undefined;
467
+ collaborators?: string[] | undefined;
468
+ first_comment?: string | undefined;
469
+ cover_url?: string | undefined;
470
+ audio_name?: string | undefined;
471
+ trial_strategy?: "MANUAL" | "SS_PERFORMANCE" | undefined;
472
+ thumb_offset?: string | undefined;
473
+ } | undefined;
474
+ youtube?: {
475
+ cover_url?: string | undefined;
476
+ title?: string | undefined;
477
+ privacy_status?: "public" | "unlisted" | "private" | undefined;
478
+ } | undefined;
479
+ tiktok?: {
480
+ privacy_status?: "PUBLIC_TO_EVERYONE" | "MUTUAL_FOLLOW_FRIENDS" | "FOLLOWER_OF_CREATOR" | "SELF_ONLY" | undefined;
481
+ photo_cover_index?: number | undefined;
482
+ auto_add_music?: boolean | undefined;
483
+ made_with_ai?: boolean | undefined;
484
+ disable_comment?: boolean | undefined;
485
+ disable_duet?: boolean | undefined;
486
+ disable_stitch?: boolean | undefined;
487
+ brand_content_toggle?: boolean | undefined;
488
+ brand_organic_toggle?: boolean | undefined;
489
+ } | undefined;
490
+ facebook?: {
491
+ format?: "post" | "story" | undefined;
492
+ first_comment?: string | undefined;
493
+ page_id?: string | undefined;
494
+ } | undefined;
495
+ linkedin?: {
496
+ organization_id?: string | undefined;
497
+ } | undefined;
498
+ twitter?: {} | undefined;
499
+ threads?: {} | undefined;
500
+ } | undefined;
501
+ }, {
502
+ content: string;
503
+ targets: string[];
504
+ draft?: boolean | undefined;
505
+ schedule?: string | undefined;
506
+ media?: string[] | undefined;
507
+ idempotency_key?: string | undefined;
508
+ require_confirmation?: boolean | undefined;
509
+ platforms?: {
510
+ instagram?: {
511
+ format?: "post" | "reel" | "story" | undefined;
512
+ collaborators?: string[] | undefined;
513
+ first_comment?: string | undefined;
514
+ cover_url?: string | undefined;
515
+ audio_name?: string | undefined;
516
+ trial_strategy?: "MANUAL" | "SS_PERFORMANCE" | undefined;
517
+ thumb_offset?: string | undefined;
518
+ } | undefined;
519
+ youtube?: {
520
+ cover_url?: string | undefined;
521
+ title?: string | undefined;
522
+ privacy_status?: "public" | "unlisted" | "private" | undefined;
523
+ } | undefined;
524
+ tiktok?: {
525
+ privacy_status?: "PUBLIC_TO_EVERYONE" | "MUTUAL_FOLLOW_FRIENDS" | "FOLLOWER_OF_CREATOR" | "SELF_ONLY" | undefined;
526
+ photo_cover_index?: number | undefined;
527
+ auto_add_music?: boolean | undefined;
528
+ made_with_ai?: boolean | undefined;
529
+ disable_comment?: boolean | undefined;
530
+ disable_duet?: boolean | undefined;
531
+ disable_stitch?: boolean | undefined;
532
+ brand_content_toggle?: boolean | undefined;
533
+ brand_organic_toggle?: boolean | undefined;
534
+ } | undefined;
535
+ facebook?: {
536
+ format?: "post" | "story" | undefined;
537
+ first_comment?: string | undefined;
538
+ page_id?: string | undefined;
539
+ } | undefined;
540
+ linkedin?: {
541
+ organization_id?: string | undefined;
542
+ } | undefined;
543
+ twitter?: {} | undefined;
544
+ threads?: {} | undefined;
545
+ } | undefined;
546
+ }>;
547
+ /**
548
+ * Validate that a schedule date is in the future
549
+ */
550
+ export declare function validateScheduleInFuture(schedule: string): boolean;
551
+ /**
552
+ * Type inference helpers
553
+ */
554
+ export type PostPublishParams = z.infer<typeof PostPublishSchema>;
555
+ //# sourceMappingURL=validation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validation.d.ts","sourceRoot":"","sources":["../../src/utils/validation.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;GAEG;AACH,eAAO,MAAM,iBAAiB,2CAQ7B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,SAAS,aAEpB,CAAC;AAEH;;GAEG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAUjD;AAED;;GAEG;AACH,eAAO,MAAM,eAAe,2CAiB3B,CAAC;AAEF;;GAEG;AAGH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;EAcvB,CAAC;AAGZ,eAAO,MAAM,mBAAmB;;;;;;;;;;;;EAMrB,CAAC;AAGZ,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAmBpB,CAAC;AAGZ,eAAO,MAAM,oBAAoB;;;;;;;;;;;;EAMtB,CAAC;AAGZ,eAAO,MAAM,oBAAoB;;;;;;EAEtB,CAAC;AAGZ,eAAO,MAAM,mBAAmB,iDAAwB,CAAC;AACzD,eAAO,MAAM,mBAAmB,iDAAwB,CAAC;AAGzD,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAQX,CAAC;AAEvB;;GAEG;AACH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAS5B,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"}