@postrun/js 2.14.0 → 2.15.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,3238 @@
1
+ import * as z from 'zod';
2
+
3
+ // src/client/zod.gen.ts
4
+ var zErrorCode = z.enum([
5
+ "unauthorized",
6
+ "forbidden",
7
+ "not_found",
8
+ "conflict",
9
+ "validation_failed",
10
+ "rate_limited",
11
+ "internal_error",
12
+ "idempotency_key_invalid",
13
+ "idempotency_key_reused",
14
+ "idempotency_request_in_progress",
15
+ "account_not_available",
16
+ "connection_reauth_required",
17
+ "connection_not_pending",
18
+ "not_implemented",
19
+ "connection_discovery_failed",
20
+ "tiktok_creator_info_unavailable",
21
+ "media_processing",
22
+ "not_publishable",
23
+ "invalid_connection",
24
+ "invalid_media",
25
+ "profile_scope_invalid",
26
+ "media_unprobeable",
27
+ "media_too_large",
28
+ "media_aspect_ratio_unsupported",
29
+ "media_resolution_too_low",
30
+ "media_gif_unsupported",
31
+ "media_format_recompressed",
32
+ "media_resolution_downscaled",
33
+ "video_container_unsupported",
34
+ "video_codec_unsupported",
35
+ "video_audio_codec_unsupported",
36
+ "video_too_large",
37
+ "video_too_small",
38
+ "video_dimensions_unsupported",
39
+ "video_dimensions_too_large",
40
+ "video_fps_unsupported",
41
+ "video_fps_too_low",
42
+ "video_aspect_unsupported",
43
+ "video_duration_too_short",
44
+ "video_duration_exceeds_max",
45
+ "video_transform_failed",
46
+ "media_fetch_failed",
47
+ "document_format_unsupported",
48
+ "document_too_large",
49
+ "document_too_many_pages",
50
+ "media_format_indeterminate",
51
+ "media_format_unsupported",
52
+ "media_count_invalid",
53
+ "body_too_long",
54
+ "content_missing",
55
+ "content_conflict",
56
+ "content_incomplete",
57
+ "content_kind_mismatch",
58
+ "media_type_mismatch",
59
+ "tag_limit_exceeded",
60
+ "reel_field_on_non_reel",
61
+ "field_placement_invalid",
62
+ "media_not_ready",
63
+ "media_failed",
64
+ "media_unsupported",
65
+ "media_kind_mismatch",
66
+ "variant_unparseable",
67
+ "publishing_unavailable",
68
+ "x_duplicate_content",
69
+ "x_not_authorized",
70
+ "x_access_not_permitted",
71
+ "x_rate_limited",
72
+ "x_publish_failed",
73
+ "x_media_upload_failed",
74
+ "linkedin_duplicate_content",
75
+ "linkedin_auth_expired",
76
+ "linkedin_permission_denied",
77
+ "linkedin_rate_limited",
78
+ "linkedin_media_processing",
79
+ "linkedin_media_failed",
80
+ "linkedin_media_upload_failed",
81
+ "linkedin_publish_failed",
82
+ "instagram_media_processing",
83
+ "instagram_container_expired",
84
+ "instagram_container_failed",
85
+ "instagram_rate_limited",
86
+ "instagram_not_authorized",
87
+ "instagram_publish_failed",
88
+ "facebook_reel_processing",
89
+ "facebook_reel_failed",
90
+ "facebook_rate_limited",
91
+ "facebook_not_authorized",
92
+ "facebook_publish_failed",
93
+ "tiktok_privacy_not_allowed",
94
+ "tiktok_duration_exceeds_max",
95
+ "tiktok_media_processing",
96
+ "tiktok_not_authorized",
97
+ "tiktok_rate_limited",
98
+ "tiktok_url_ownership_unverified",
99
+ "tiktok_unaudited_private_only",
100
+ "tiktok_spam_risk",
101
+ "tiktok_publish_failed",
102
+ "post_publish_failed",
103
+ "post_partially_published",
104
+ "connection_platform_mismatch",
105
+ "connection_removed"
106
+ ]);
107
+ var zProfile = z.object({
108
+ id: z.string(),
109
+ name: z.string(),
110
+ description: z.string().nullable(),
111
+ external_id: z.string().nullable(),
112
+ metadata: z.record(z.string(), z.union([
113
+ z.string().max(500),
114
+ z.number(),
115
+ z.boolean()
116
+ ])),
117
+ created_at: z.string().nullable(),
118
+ updated_at: z.string().nullable()
119
+ });
120
+ var zDiscoverableAccount = z.object({
121
+ external_account_id: z.string(),
122
+ name: z.string().nullable(),
123
+ currency: z.string().nullable(),
124
+ username: z.string().nullish(),
125
+ avatar_url: z.string().nullish(),
126
+ profile_url: z.string().nullish(),
127
+ instagram: z.object({
128
+ external_account_id: z.string(),
129
+ name: z.string().nullable(),
130
+ username: z.string().nullish(),
131
+ avatar_url: z.string().nullish(),
132
+ profile_url: z.string().nullish()
133
+ }).nullish()
134
+ });
135
+ var zConnectSession = z.object({
136
+ hosted_connect_url: z.string(),
137
+ connect_token: z.string(),
138
+ connect_session_token: z.string(),
139
+ provider_config_key: z.string(),
140
+ nango_host: z.string(),
141
+ expires_at: z.string()
142
+ });
143
+ var zMediaKind = z.enum([
144
+ "image",
145
+ "video",
146
+ "gif",
147
+ "document"
148
+ ]);
149
+ var zMediaStatus = z.enum([
150
+ "uploading",
151
+ "processing",
152
+ "ready",
153
+ "failed"
154
+ ]);
155
+ var zMediaStage = z.enum([
156
+ "queued",
157
+ "analyzing",
158
+ "transcoding",
159
+ "done"
160
+ ]);
161
+ var zMedia = z.object({
162
+ id: z.string(),
163
+ object: z.literal("media"),
164
+ profile_id: z.string(),
165
+ kind: zMediaKind.nullable(),
166
+ content_type: z.string().nullable(),
167
+ status: zMediaStatus,
168
+ progress: z.object({
169
+ stage: zMediaStage,
170
+ percent: z.int().gte(0).lte(100)
171
+ }),
172
+ raw: z.boolean(),
173
+ error: z.object({
174
+ code: z.enum([
175
+ "media_unprobeable",
176
+ "media_format_indeterminate",
177
+ "media_format_unsupported",
178
+ "media_too_large",
179
+ "media_aspect_ratio_unsupported",
180
+ "media_resolution_too_low",
181
+ "media_gif_unsupported",
182
+ "media_format_recompressed",
183
+ "media_resolution_downscaled",
184
+ "video_container_unsupported",
185
+ "video_codec_unsupported",
186
+ "video_audio_codec_unsupported",
187
+ "video_too_large",
188
+ "video_too_small",
189
+ "video_dimensions_unsupported",
190
+ "video_dimensions_too_large",
191
+ "video_fps_unsupported",
192
+ "video_fps_too_low",
193
+ "video_aspect_unsupported",
194
+ "video_duration_too_short",
195
+ "video_duration_exceeds_max",
196
+ "video_transform_failed",
197
+ "media_fetch_failed",
198
+ "document_format_unsupported",
199
+ "document_too_large",
200
+ "document_too_many_pages",
201
+ "media_unsupported"
202
+ ]),
203
+ message: z.string(),
204
+ hint: z.string().optional(),
205
+ allowed: z.array(z.string()).optional(),
206
+ got: z.string().optional(),
207
+ display_error: z.string()
208
+ }).nullable(),
209
+ source: z.object({
210
+ format: z.string(),
211
+ bytes: z.int().gte(0).lte(9007199254740991),
212
+ width: z.int().gt(0).lte(9007199254740991).nullable(),
213
+ height: z.int().gt(0).lte(9007199254740991).nullable(),
214
+ duration_ms: z.int().gte(0).lte(9007199254740991).nullable()
215
+ }).nullable(),
216
+ alt_text: z.string().max(1e3).nullable(),
217
+ per_platform: z.record(z.string(), z.object({
218
+ status: z.enum([
219
+ "processing",
220
+ "ready",
221
+ "failed"
222
+ ]),
223
+ url: z.string().nullable(),
224
+ width: z.int().gt(0).lte(9007199254740991).nullable(),
225
+ height: z.int().gt(0).lte(9007199254740991).nullable(),
226
+ bytes: z.int().gte(0).lte(9007199254740991).nullable(),
227
+ warnings: z.array(z.object({
228
+ code: z.enum([
229
+ "media_unprobeable",
230
+ "media_format_indeterminate",
231
+ "media_format_unsupported",
232
+ "media_too_large",
233
+ "media_aspect_ratio_unsupported",
234
+ "media_resolution_too_low",
235
+ "media_gif_unsupported",
236
+ "media_format_recompressed",
237
+ "media_resolution_downscaled",
238
+ "video_container_unsupported",
239
+ "video_codec_unsupported",
240
+ "video_audio_codec_unsupported",
241
+ "video_too_large",
242
+ "video_too_small",
243
+ "video_dimensions_unsupported",
244
+ "video_dimensions_too_large",
245
+ "video_fps_unsupported",
246
+ "video_fps_too_low",
247
+ "video_aspect_unsupported",
248
+ "video_duration_too_short",
249
+ "video_duration_exceeds_max",
250
+ "video_transform_failed",
251
+ "media_fetch_failed",
252
+ "document_format_unsupported",
253
+ "document_too_large",
254
+ "document_too_many_pages",
255
+ "media_unsupported"
256
+ ]),
257
+ message: z.string(),
258
+ hint: z.string().optional(),
259
+ allowed: z.array(z.string()).optional(),
260
+ got: z.string().optional(),
261
+ display_error: z.string()
262
+ })),
263
+ errors: z.array(z.object({
264
+ code: z.enum([
265
+ "media_unprobeable",
266
+ "media_format_indeterminate",
267
+ "media_format_unsupported",
268
+ "media_too_large",
269
+ "media_aspect_ratio_unsupported",
270
+ "media_resolution_too_low",
271
+ "media_gif_unsupported",
272
+ "media_format_recompressed",
273
+ "media_resolution_downscaled",
274
+ "video_container_unsupported",
275
+ "video_codec_unsupported",
276
+ "video_audio_codec_unsupported",
277
+ "video_too_large",
278
+ "video_too_small",
279
+ "video_dimensions_unsupported",
280
+ "video_dimensions_too_large",
281
+ "video_fps_unsupported",
282
+ "video_fps_too_low",
283
+ "video_aspect_unsupported",
284
+ "video_duration_too_short",
285
+ "video_duration_exceeds_max",
286
+ "video_transform_failed",
287
+ "media_fetch_failed",
288
+ "document_format_unsupported",
289
+ "document_too_large",
290
+ "document_too_many_pages",
291
+ "media_unsupported"
292
+ ]),
293
+ message: z.string(),
294
+ hint: z.string().optional(),
295
+ allowed: z.array(z.string()).optional(),
296
+ got: z.string().optional(),
297
+ display_error: z.string()
298
+ }))
299
+ })),
300
+ external_id: z.string().nullable(),
301
+ metadata: z.record(z.string(), z.union([
302
+ z.string().max(500),
303
+ z.number(),
304
+ z.boolean()
305
+ ])),
306
+ created_at: z.string(),
307
+ updated_at: z.string()
308
+ });
309
+ var zPostPlatform = z.enum([
310
+ "x",
311
+ "linkedin",
312
+ "facebook_page",
313
+ "instagram",
314
+ "tiktok"
315
+ ]);
316
+ var zPostType = z.enum([
317
+ "text",
318
+ "single_image",
319
+ "multi_image",
320
+ "video",
321
+ "reel",
322
+ "carousel"
323
+ ]);
324
+ var zPostStatus = z.enum([
325
+ "draft",
326
+ "scheduled",
327
+ "publishing",
328
+ "partially_published",
329
+ "published",
330
+ "failed"
331
+ ]);
332
+ var zPostVariantStatus = z.enum([
333
+ "draft",
334
+ "scheduled",
335
+ "publishing",
336
+ "published",
337
+ "failed"
338
+ ]);
339
+ var zConnectionKind = z.enum(["posting", "ads"]);
340
+ var zConnectionStatus = z.enum([
341
+ "pending",
342
+ "active",
343
+ "needs_reauth"
344
+ ]);
345
+ var zConnection = z.object({
346
+ id: z.string(),
347
+ profile_id: z.string(),
348
+ platform: z.enum([
349
+ "meta_ads",
350
+ "google_ads",
351
+ "tiktok_ads",
352
+ "x",
353
+ "linkedin",
354
+ "facebook_page",
355
+ "instagram",
356
+ "tiktok"
357
+ ]),
358
+ kind: zConnectionKind,
359
+ status: zConnectionStatus,
360
+ external_account_id: z.string().nullable(),
361
+ external_account_name: z.string().nullable(),
362
+ username: z.string().nullable(),
363
+ avatar_url: z.string().nullable(),
364
+ profile_url: z.string().nullable(),
365
+ reauth_at: z.string().nullable(),
366
+ currency: z.string().nullable(),
367
+ created_at: z.string().nullable(),
368
+ updated_at: z.string().nullable()
369
+ });
370
+ var zTikTokPrivacyLevel = z.enum([
371
+ "PUBLIC_TO_EVERYONE",
372
+ "MUTUAL_FOLLOW_FRIENDS",
373
+ "FOLLOWER_OF_CREATOR",
374
+ "SELF_ONLY"
375
+ ]);
376
+ var zPostVariant = z.union([
377
+ z.object({
378
+ platform: z.literal("x"),
379
+ post_type: z.enum([
380
+ "text",
381
+ "single_image",
382
+ "multi_image",
383
+ "video"
384
+ ]),
385
+ settings: z.object({
386
+ reply_settings: z.enum([
387
+ "everyone",
388
+ "following",
389
+ "mentionedUsers",
390
+ "subscribers",
391
+ "verified"
392
+ ]).optional(),
393
+ quote_tweet_id: z.string().regex(/^[0-9]{1,19}$/).optional(),
394
+ poll: z.object({
395
+ options: z.array(z.string().min(1).max(25)).min(2).max(4),
396
+ duration_minutes: z.int().gte(5).lte(10080),
397
+ reply_settings: z.enum([
398
+ "following",
399
+ "mentionedUsers",
400
+ "subscribers",
401
+ "verified"
402
+ ]).optional()
403
+ }).optional(),
404
+ reply: z.object({
405
+ in_reply_to_tweet_id: z.string().regex(/^[0-9]{1,19}$/),
406
+ exclude_reply_user_ids: z.array(z.string().regex(/^[0-9]{1,19}$/)).optional(),
407
+ auto_populate_reply_metadata: z.boolean().optional()
408
+ }).optional(),
409
+ community_id: z.string().regex(/^[0-9]{1,19}$/).optional(),
410
+ for_super_followers_only: z.boolean().optional(),
411
+ geo: z.object({
412
+ place_id: z.string()
413
+ }).optional(),
414
+ card_uri: z.string().optional(),
415
+ media_tagged_user_ids: z.array(z.string().regex(/^[0-9]{1,19}$/)).max(10).optional()
416
+ }),
417
+ id: z.string(),
418
+ object: z.literal("post_variant"),
419
+ connection_id: z.string().nullable(),
420
+ body: z.string().nullable(),
421
+ status: zPostVariantStatus,
422
+ schedule_at: z.string().nullable(),
423
+ result: z.object({
424
+ platform_post_id: z.string(),
425
+ permalink: z.string().nullable(),
426
+ published_at: z.string()
427
+ }).nullable(),
428
+ error: z.object({
429
+ code: z.string(),
430
+ message: z.string(),
431
+ display_error: z.string()
432
+ }).nullable(),
433
+ media: z.array(z.object({
434
+ media_id: z.string(),
435
+ position: z.int().gte(-9007199254740991).lte(9007199254740991),
436
+ crop_box: z.record(z.string(), z.unknown()).nullable(),
437
+ alt_text_override: z.string().nullable(),
438
+ media: zMedia
439
+ }))
440
+ }),
441
+ z.object({
442
+ platform: z.literal("linkedin"),
443
+ post_type: z.enum([
444
+ "text",
445
+ "single_image",
446
+ "multi_image",
447
+ "video"
448
+ ]),
449
+ settings: z.object({
450
+ visibility: z.enum(["PUBLIC", "CONNECTIONS"]),
451
+ content_kind: z.enum([
452
+ "text",
453
+ "single_image",
454
+ "video",
455
+ "multi_image",
456
+ "document",
457
+ "article",
458
+ "poll"
459
+ ]),
460
+ article: z.object({
461
+ source: z.url(),
462
+ title: z.string().max(400).optional(),
463
+ description: z.string().max(4086).optional(),
464
+ thumbnail_media_id: z.string().optional()
465
+ }).optional(),
466
+ poll: z.object({
467
+ question: z.string().min(1).max(140),
468
+ options: z.array(z.string().min(1).max(30)).min(2).max(4),
469
+ duration: z.enum([
470
+ "ONE_DAY",
471
+ "THREE_DAYS",
472
+ "SEVEN_DAYS",
473
+ "FOURTEEN_DAYS"
474
+ ])
475
+ }).optional(),
476
+ document: z.object({
477
+ title: z.string().min(1).max(400)
478
+ }).optional(),
479
+ disable_reshare: z.boolean().optional(),
480
+ mentions: z.array(z.object({
481
+ type: z.enum(["person", "organization"]),
482
+ name: z.string().min(1),
483
+ urn: z.string().regex(/^urn:li:(person|organization):/)
484
+ })).optional()
485
+ }),
486
+ id: z.string(),
487
+ object: z.literal("post_variant"),
488
+ connection_id: z.string().nullable(),
489
+ body: z.string().nullable(),
490
+ status: zPostVariantStatus,
491
+ schedule_at: z.string().nullable(),
492
+ result: z.object({
493
+ platform_post_id: z.string(),
494
+ permalink: z.string().nullable(),
495
+ published_at: z.string()
496
+ }).nullable(),
497
+ error: z.object({
498
+ code: z.string(),
499
+ message: z.string(),
500
+ display_error: z.string()
501
+ }).nullable(),
502
+ media: z.array(z.object({
503
+ media_id: z.string(),
504
+ position: z.int().gte(-9007199254740991).lte(9007199254740991),
505
+ crop_box: z.record(z.string(), z.unknown()).nullable(),
506
+ alt_text_override: z.string().nullable(),
507
+ media: zMedia
508
+ }))
509
+ }),
510
+ z.object({
511
+ platform: z.literal("facebook_page"),
512
+ post_type: z.enum([
513
+ "text",
514
+ "single_image",
515
+ "multi_image",
516
+ "reel"
517
+ ]),
518
+ settings: z.object({
519
+ link: z.url().optional()
520
+ }),
521
+ id: z.string(),
522
+ object: z.literal("post_variant"),
523
+ connection_id: z.string().nullable(),
524
+ body: z.string().nullable(),
525
+ status: zPostVariantStatus,
526
+ schedule_at: z.string().nullable(),
527
+ result: z.object({
528
+ platform_post_id: z.string(),
529
+ permalink: z.string().nullable(),
530
+ published_at: z.string()
531
+ }).nullable(),
532
+ error: z.object({
533
+ code: z.string(),
534
+ message: z.string(),
535
+ display_error: z.string()
536
+ }).nullable(),
537
+ media: z.array(z.object({
538
+ media_id: z.string(),
539
+ position: z.int().gte(-9007199254740991).lte(9007199254740991),
540
+ crop_box: z.record(z.string(), z.unknown()).nullable(),
541
+ alt_text_override: z.string().nullable(),
542
+ media: zMedia
543
+ }))
544
+ }),
545
+ z.object({
546
+ platform: z.literal("instagram"),
547
+ post_type: z.enum([
548
+ "single_image",
549
+ "carousel",
550
+ "reel"
551
+ ]),
552
+ settings: z.object({
553
+ media_type: z.enum([
554
+ "IMAGE",
555
+ "CAROUSEL",
556
+ "REELS"
557
+ ]).optional(),
558
+ location_id: z.string().optional(),
559
+ user_tags: z.array(z.object({
560
+ username: z.string().min(1),
561
+ x: z.number().gte(0).lte(1),
562
+ y: z.number().gte(0).lte(1)
563
+ })).optional(),
564
+ collaborators: z.array(z.string().min(1)).max(3).optional(),
565
+ share_to_feed: z.boolean().optional(),
566
+ thumb_offset: z.int().gte(0).lte(9007199254740991).optional(),
567
+ cover_url: z.url().optional(),
568
+ audio_name: z.string().optional()
569
+ }),
570
+ id: z.string(),
571
+ object: z.literal("post_variant"),
572
+ connection_id: z.string().nullable(),
573
+ body: z.string().nullable(),
574
+ status: zPostVariantStatus,
575
+ schedule_at: z.string().nullable(),
576
+ result: z.object({
577
+ platform_post_id: z.string(),
578
+ permalink: z.string().nullable(),
579
+ published_at: z.string()
580
+ }).nullable(),
581
+ error: z.object({
582
+ code: z.string(),
583
+ message: z.string(),
584
+ display_error: z.string()
585
+ }).nullable(),
586
+ media: z.array(z.object({
587
+ media_id: z.string(),
588
+ position: z.int().gte(-9007199254740991).lte(9007199254740991),
589
+ crop_box: z.record(z.string(), z.unknown()).nullable(),
590
+ alt_text_override: z.string().nullable(),
591
+ media: zMedia
592
+ }))
593
+ }),
594
+ z.object({
595
+ platform: z.literal("tiktok"),
596
+ post_type: z.enum([
597
+ "video",
598
+ "single_image",
599
+ "carousel"
600
+ ]),
601
+ settings: z.object({
602
+ privacy_level: zTikTokPrivacyLevel.optional(),
603
+ disable_comment: z.boolean().optional(),
604
+ disable_duet: z.boolean().optional(),
605
+ disable_stitch: z.boolean().optional(),
606
+ video_cover_timestamp_ms: z.int().gte(0).lte(9007199254740991).optional(),
607
+ photo_cover_index: z.int().gte(0).lte(9007199254740991).optional(),
608
+ auto_add_music: z.boolean().optional(),
609
+ brand_content_toggle: z.boolean().optional(),
610
+ brand_organic_toggle: z.boolean().optional(),
611
+ is_aigc: z.boolean().optional()
612
+ }),
613
+ id: z.string(),
614
+ object: z.literal("post_variant"),
615
+ connection_id: z.string().nullable(),
616
+ body: z.string().nullable(),
617
+ status: zPostVariantStatus,
618
+ schedule_at: z.string().nullable(),
619
+ result: z.object({
620
+ platform_post_id: z.string(),
621
+ permalink: z.string().nullable(),
622
+ published_at: z.string()
623
+ }).nullable(),
624
+ error: z.object({
625
+ code: z.string(),
626
+ message: z.string(),
627
+ display_error: z.string()
628
+ }).nullable(),
629
+ media: z.array(z.object({
630
+ media_id: z.string(),
631
+ position: z.int().gte(-9007199254740991).lte(9007199254740991),
632
+ crop_box: z.record(z.string(), z.unknown()).nullable(),
633
+ alt_text_override: z.string().nullable(),
634
+ media: zMedia
635
+ }))
636
+ })
637
+ ]);
638
+ var zPost = z.object({
639
+ id: z.string(),
640
+ object: z.literal("post"),
641
+ profile_id: z.string(),
642
+ external_id: z.string().nullable(),
643
+ status: z.enum([
644
+ "draft",
645
+ "scheduled",
646
+ "publishing",
647
+ "partially_published",
648
+ "published",
649
+ "failed"
650
+ ]),
651
+ schedule_at: z.string().nullable(),
652
+ tags: z.array(z.string()),
653
+ notes: z.string().nullable(),
654
+ metadata: z.record(z.string(), z.union([
655
+ z.string().max(500),
656
+ z.number(),
657
+ z.boolean()
658
+ ])),
659
+ variants: z.array(zPostVariant),
660
+ created_at: z.string(),
661
+ updated_at: z.string()
662
+ });
663
+ var zTikTokCreatorInfo = z.object({
664
+ creator: z.object({
665
+ nickname: z.string(),
666
+ username: z.string(),
667
+ avatar_url: z.string().nullable()
668
+ }),
669
+ privacy_options: z.array(zTikTokPrivacyLevel),
670
+ interaction: z.object({
671
+ comment: z.boolean(),
672
+ duet: z.boolean(),
673
+ stitch: z.boolean()
674
+ }),
675
+ max_video_duration_sec: z.int().gte(-9007199254740991).lte(9007199254740991)
676
+ });
677
+ var zPostVariantInput = z.union([
678
+ z.object({
679
+ platform: z.literal("x"),
680
+ post_type: z.enum([
681
+ "text",
682
+ "single_image",
683
+ "multi_image",
684
+ "video"
685
+ ]),
686
+ settings: z.object({
687
+ reply_settings: z.enum([
688
+ "everyone",
689
+ "following",
690
+ "mentionedUsers",
691
+ "subscribers",
692
+ "verified"
693
+ ]).optional(),
694
+ quote_tweet_id: z.string().regex(/^[0-9]{1,19}$/).optional(),
695
+ poll: z.object({
696
+ options: z.array(z.string().min(1).max(25)).min(2).max(4),
697
+ duration_minutes: z.int().gte(5).lte(10080),
698
+ reply_settings: z.enum([
699
+ "following",
700
+ "mentionedUsers",
701
+ "subscribers",
702
+ "verified"
703
+ ]).optional()
704
+ }).optional(),
705
+ reply: z.object({
706
+ in_reply_to_tweet_id: z.string().regex(/^[0-9]{1,19}$/),
707
+ exclude_reply_user_ids: z.array(z.string().regex(/^[0-9]{1,19}$/)).optional(),
708
+ auto_populate_reply_metadata: z.boolean().optional()
709
+ }).optional(),
710
+ community_id: z.string().regex(/^[0-9]{1,19}$/).optional(),
711
+ for_super_followers_only: z.boolean().optional(),
712
+ geo: z.object({
713
+ place_id: z.string()
714
+ }).optional(),
715
+ card_uri: z.string().optional(),
716
+ media_tagged_user_ids: z.array(z.string().regex(/^[0-9]{1,19}$/)).max(10).optional()
717
+ }).optional().default({}),
718
+ connection_id: z.string(),
719
+ body: z.string().optional(),
720
+ media: z.array(z.object({
721
+ media_id: z.string(),
722
+ crop_box: z.record(z.string(), z.unknown()).nullish(),
723
+ alt_text_override: z.string().nullish()
724
+ })).optional().default([])
725
+ }),
726
+ z.object({
727
+ platform: z.literal("linkedin"),
728
+ post_type: z.enum([
729
+ "text",
730
+ "single_image",
731
+ "multi_image",
732
+ "video"
733
+ ]),
734
+ settings: z.object({
735
+ visibility: z.enum(["PUBLIC", "CONNECTIONS"]),
736
+ content_kind: z.enum([
737
+ "text",
738
+ "single_image",
739
+ "video",
740
+ "multi_image",
741
+ "document",
742
+ "article",
743
+ "poll"
744
+ ]),
745
+ article: z.object({
746
+ source: z.url(),
747
+ title: z.string().max(400).optional(),
748
+ description: z.string().max(4086).optional(),
749
+ thumbnail_media_id: z.string().optional()
750
+ }).optional(),
751
+ poll: z.object({
752
+ question: z.string().min(1).max(140),
753
+ options: z.array(z.string().min(1).max(30)).min(2).max(4),
754
+ duration: z.enum([
755
+ "ONE_DAY",
756
+ "THREE_DAYS",
757
+ "SEVEN_DAYS",
758
+ "FOURTEEN_DAYS"
759
+ ])
760
+ }).optional(),
761
+ document: z.object({
762
+ title: z.string().min(1).max(400)
763
+ }).optional(),
764
+ disable_reshare: z.boolean().optional(),
765
+ mentions: z.array(z.object({
766
+ type: z.enum(["person", "organization"]),
767
+ name: z.string().min(1),
768
+ urn: z.string().regex(/^urn:li:(person|organization):/)
769
+ })).optional()
770
+ }),
771
+ connection_id: z.string(),
772
+ body: z.string().optional(),
773
+ media: z.array(z.object({
774
+ media_id: z.string(),
775
+ crop_box: z.record(z.string(), z.unknown()).nullish(),
776
+ alt_text_override: z.string().nullish()
777
+ })).optional().default([])
778
+ }),
779
+ z.object({
780
+ platform: z.literal("instagram"),
781
+ post_type: z.enum([
782
+ "single_image",
783
+ "carousel",
784
+ "reel"
785
+ ]),
786
+ settings: z.object({
787
+ media_type: z.enum([
788
+ "IMAGE",
789
+ "CAROUSEL",
790
+ "REELS"
791
+ ]).optional(),
792
+ location_id: z.string().optional(),
793
+ user_tags: z.array(z.object({
794
+ username: z.string().min(1),
795
+ x: z.number().gte(0).lte(1),
796
+ y: z.number().gte(0).lte(1)
797
+ })).optional(),
798
+ collaborators: z.array(z.string().min(1)).max(3).optional(),
799
+ share_to_feed: z.boolean().optional(),
800
+ thumb_offset: z.int().gte(0).lte(9007199254740991).optional(),
801
+ cover_url: z.url().optional(),
802
+ audio_name: z.string().optional()
803
+ }),
804
+ connection_id: z.string(),
805
+ body: z.string().optional(),
806
+ media: z.array(z.object({
807
+ media_id: z.string(),
808
+ crop_box: z.record(z.string(), z.unknown()).nullish(),
809
+ alt_text_override: z.string().nullish()
810
+ })).optional().default([])
811
+ }),
812
+ z.object({
813
+ platform: z.literal("facebook_page"),
814
+ post_type: z.enum([
815
+ "text",
816
+ "single_image",
817
+ "multi_image",
818
+ "reel"
819
+ ]),
820
+ settings: z.object({
821
+ link: z.url().optional()
822
+ }).optional().default({}),
823
+ connection_id: z.string(),
824
+ body: z.string().optional(),
825
+ media: z.array(z.object({
826
+ media_id: z.string(),
827
+ crop_box: z.record(z.string(), z.unknown()).nullish(),
828
+ alt_text_override: z.string().nullish()
829
+ })).optional().default([])
830
+ }),
831
+ z.object({
832
+ platform: z.literal("tiktok"),
833
+ post_type: z.enum([
834
+ "video",
835
+ "single_image",
836
+ "carousel"
837
+ ]),
838
+ settings: z.object({
839
+ privacy_level: zTikTokPrivacyLevel.optional(),
840
+ disable_comment: z.boolean().optional(),
841
+ disable_duet: z.boolean().optional(),
842
+ disable_stitch: z.boolean().optional(),
843
+ video_cover_timestamp_ms: z.int().gte(0).lte(9007199254740991).optional(),
844
+ photo_cover_index: z.int().gte(0).lte(9007199254740991).optional(),
845
+ auto_add_music: z.boolean().optional(),
846
+ brand_content_toggle: z.boolean().optional(),
847
+ brand_organic_toggle: z.boolean().optional(),
848
+ is_aigc: z.boolean().optional()
849
+ }).optional().default({}),
850
+ connection_id: z.string(),
851
+ body: z.string().optional(),
852
+ media: z.array(z.object({
853
+ media_id: z.string(),
854
+ crop_box: z.record(z.string(), z.unknown()).nullish(),
855
+ alt_text_override: z.string().nullish()
856
+ })).optional().default([])
857
+ })
858
+ ]);
859
+ var zCreatePostBody = z.object({
860
+ profile_id: z.string(),
861
+ publish: z.enum([
862
+ "now",
863
+ "schedule",
864
+ "draft"
865
+ ]).optional().default("draft"),
866
+ schedule_at: z.iso.datetime().optional(),
867
+ external_id: z.string().min(1).max(255).optional(),
868
+ metadata: z.record(z.string(), z.union([
869
+ z.string().max(500),
870
+ z.number(),
871
+ z.boolean()
872
+ ])).optional(),
873
+ tags: z.array(z.string()).optional(),
874
+ notes: z.string().optional(),
875
+ dry_run: z.boolean().optional().default(false),
876
+ variants: z.array(zPostVariantInput).min(1)
877
+ });
878
+ var zProfilesListQuery = z.object({
879
+ limit: z.int().gte(1).lte(100).optional().default(20),
880
+ offset: z.int().gte(0).lte(9007199254740991).optional().default(0),
881
+ external_id: z.string().optional(),
882
+ metadata: z.record(z.string(), z.union([
883
+ z.string().max(500),
884
+ z.number(),
885
+ z.boolean()
886
+ ])).optional()
887
+ });
888
+ var zProfilesListResponse = z.object({
889
+ object: z.literal("list"),
890
+ data: z.array(zProfile),
891
+ total: z.int().gte(-9007199254740991).lte(9007199254740991),
892
+ limit: z.int().gte(-9007199254740991).lte(9007199254740991),
893
+ offset: z.int().gte(-9007199254740991).lte(9007199254740991),
894
+ has_more: z.boolean()
895
+ });
896
+ var zProfilesCreateBody = z.object({
897
+ name: z.string().min(1).max(255),
898
+ description: z.string().max(280).optional(),
899
+ external_id: z.string().min(1).max(255).optional(),
900
+ metadata: z.record(z.string(), z.union([
901
+ z.string().max(500),
902
+ z.number(),
903
+ z.boolean()
904
+ ])).optional()
905
+ });
906
+ var zProfilesCreateResponse = zProfile;
907
+ var zProfilesDeletePath = z.object({
908
+ id: z.string()
909
+ });
910
+ var zProfilesDeleteResponse = z.object({
911
+ id: z.string(),
912
+ object: z.literal("profile"),
913
+ deleted: z.literal(true)
914
+ });
915
+ var zProfilesGetPath = z.object({
916
+ id: z.string()
917
+ });
918
+ var zProfilesGetResponse = zProfile;
919
+ var zProfilesUpdateBody = z.object({
920
+ name: z.string().min(1).max(255).optional(),
921
+ description: z.string().max(280).nullish(),
922
+ external_id: z.string().min(1).max(255).optional(),
923
+ metadata: z.record(z.string(), z.union([
924
+ z.string().max(500),
925
+ z.number(),
926
+ z.boolean()
927
+ ])).optional()
928
+ });
929
+ var zProfilesUpdatePath = z.object({
930
+ id: z.string()
931
+ });
932
+ var zProfilesUpdateResponse = zProfile;
933
+ var zConnectionsListByProfilePath = z.object({
934
+ id: z.string()
935
+ });
936
+ var zConnectionsListByProfileQuery = z.object({
937
+ limit: z.int().gte(1).lte(100).optional().default(20),
938
+ offset: z.int().gte(0).lte(9007199254740991).optional().default(0),
939
+ nango_connection_id: z.string().min(1).optional(),
940
+ kind: zConnectionKind.optional(),
941
+ status: zConnectionStatus.optional()
942
+ });
943
+ var zConnectionsListByProfileResponse = z.object({
944
+ object: z.literal("list"),
945
+ data: z.array(zConnection),
946
+ total: z.int().gte(-9007199254740991).lte(9007199254740991),
947
+ limit: z.int().gte(-9007199254740991).lte(9007199254740991),
948
+ offset: z.int().gte(-9007199254740991).lte(9007199254740991),
949
+ has_more: z.boolean()
950
+ });
951
+ var zConnectionsDeletePath = z.object({
952
+ id: z.string()
953
+ });
954
+ var zConnectionsDeleteResponse = z.object({
955
+ id: z.string(),
956
+ object: z.literal("connection"),
957
+ deleted: z.literal(true)
958
+ });
959
+ var zConnectionsGetPath = z.object({
960
+ id: z.string()
961
+ });
962
+ var zConnectionsGetResponse = zConnection;
963
+ var zConnectionsSelectBody = z.object({
964
+ external_account_id: z.string().min(1)
965
+ });
966
+ var zConnectionsSelectPath = z.object({
967
+ id: z.string()
968
+ });
969
+ var zConnectionsSelectResponse = zConnection;
970
+ var zConnectionsListAccountsPath = z.object({
971
+ id: z.string()
972
+ });
973
+ var zConnectionsListAccountsResponse = z.object({
974
+ object: z.literal("list"),
975
+ data: z.array(zDiscoverableAccount)
976
+ });
977
+ var zConnectionsConnectBody = z.object({
978
+ platform: z.enum([
979
+ "meta_ads",
980
+ "google_ads",
981
+ "x",
982
+ "linkedin",
983
+ "facebook_page",
984
+ "instagram",
985
+ "tiktok"
986
+ ])
987
+ });
988
+ var zConnectionsConnectPath = z.object({
989
+ id: z.string()
990
+ });
991
+ var zConnectionsConnectResponse = zConnectSession;
992
+ var zMediaListQuery = z.object({
993
+ limit: z.int().gte(1).lte(100).optional().default(20),
994
+ offset: z.int().gte(0).lte(9007199254740991).optional().default(0),
995
+ profile_id: z.string().optional(),
996
+ status: zMediaStatus.optional(),
997
+ kind: zMediaKind.optional(),
998
+ external_id: z.string().optional(),
999
+ metadata: z.record(z.string(), z.union([
1000
+ z.string().max(500),
1001
+ z.number(),
1002
+ z.boolean()
1003
+ ])).optional()
1004
+ });
1005
+ var zMediaListResponse = z.object({
1006
+ object: z.literal("list"),
1007
+ data: z.array(zMedia),
1008
+ total: z.int().gte(-9007199254740991).lte(9007199254740991),
1009
+ limit: z.int().gte(-9007199254740991).lte(9007199254740991),
1010
+ offset: z.int().gte(-9007199254740991).lte(9007199254740991),
1011
+ has_more: z.boolean()
1012
+ });
1013
+ var zMediaCreateBody = z.object({
1014
+ profile_id: z.string(),
1015
+ source_url: z.url().optional(),
1016
+ targets: z.array(z.enum([
1017
+ "x",
1018
+ "linkedin",
1019
+ "facebook_page",
1020
+ "instagram",
1021
+ "tiktok",
1022
+ "google_ads"
1023
+ ])).min(1).optional(),
1024
+ raw: z.boolean().optional().default(false),
1025
+ alt_text: z.string().max(1e3).optional(),
1026
+ external_id: z.string().min(1).max(255).optional(),
1027
+ metadata: z.record(z.string(), z.union([
1028
+ z.string().max(500),
1029
+ z.number(),
1030
+ z.boolean()
1031
+ ])).optional()
1032
+ });
1033
+ var zMediaCreateResponse = z.object({
1034
+ id: z.string(),
1035
+ object: z.literal("media"),
1036
+ profile_id: z.string(),
1037
+ kind: zMediaKind.nullable(),
1038
+ content_type: z.string().nullable(),
1039
+ status: zMediaStatus,
1040
+ progress: z.object({
1041
+ stage: zMediaStage,
1042
+ percent: z.int().gte(0).lte(100)
1043
+ }),
1044
+ raw: z.boolean(),
1045
+ error: z.object({
1046
+ code: z.enum([
1047
+ "media_unprobeable",
1048
+ "media_format_indeterminate",
1049
+ "media_format_unsupported",
1050
+ "media_too_large",
1051
+ "media_aspect_ratio_unsupported",
1052
+ "media_resolution_too_low",
1053
+ "media_gif_unsupported",
1054
+ "media_format_recompressed",
1055
+ "media_resolution_downscaled",
1056
+ "video_container_unsupported",
1057
+ "video_codec_unsupported",
1058
+ "video_audio_codec_unsupported",
1059
+ "video_too_large",
1060
+ "video_too_small",
1061
+ "video_dimensions_unsupported",
1062
+ "video_dimensions_too_large",
1063
+ "video_fps_unsupported",
1064
+ "video_fps_too_low",
1065
+ "video_aspect_unsupported",
1066
+ "video_duration_too_short",
1067
+ "video_duration_exceeds_max",
1068
+ "video_transform_failed",
1069
+ "media_fetch_failed",
1070
+ "document_format_unsupported",
1071
+ "document_too_large",
1072
+ "document_too_many_pages",
1073
+ "media_unsupported"
1074
+ ]),
1075
+ message: z.string(),
1076
+ hint: z.string().optional(),
1077
+ allowed: z.array(z.string()).optional(),
1078
+ got: z.string().optional(),
1079
+ display_error: z.string()
1080
+ }).nullable(),
1081
+ source: z.object({
1082
+ format: z.string(),
1083
+ bytes: z.int().gte(0).lte(9007199254740991),
1084
+ width: z.int().gt(0).lte(9007199254740991).nullable(),
1085
+ height: z.int().gt(0).lte(9007199254740991).nullable(),
1086
+ duration_ms: z.int().gte(0).lte(9007199254740991).nullable()
1087
+ }).nullable(),
1088
+ alt_text: z.string().max(1e3).nullable(),
1089
+ per_platform: z.record(z.string(), z.object({
1090
+ status: z.enum([
1091
+ "processing",
1092
+ "ready",
1093
+ "failed"
1094
+ ]),
1095
+ url: z.string().nullable(),
1096
+ width: z.int().gt(0).lte(9007199254740991).nullable(),
1097
+ height: z.int().gt(0).lte(9007199254740991).nullable(),
1098
+ bytes: z.int().gte(0).lte(9007199254740991).nullable(),
1099
+ warnings: z.array(z.object({
1100
+ code: z.enum([
1101
+ "media_unprobeable",
1102
+ "media_format_indeterminate",
1103
+ "media_format_unsupported",
1104
+ "media_too_large",
1105
+ "media_aspect_ratio_unsupported",
1106
+ "media_resolution_too_low",
1107
+ "media_gif_unsupported",
1108
+ "media_format_recompressed",
1109
+ "media_resolution_downscaled",
1110
+ "video_container_unsupported",
1111
+ "video_codec_unsupported",
1112
+ "video_audio_codec_unsupported",
1113
+ "video_too_large",
1114
+ "video_too_small",
1115
+ "video_dimensions_unsupported",
1116
+ "video_dimensions_too_large",
1117
+ "video_fps_unsupported",
1118
+ "video_fps_too_low",
1119
+ "video_aspect_unsupported",
1120
+ "video_duration_too_short",
1121
+ "video_duration_exceeds_max",
1122
+ "video_transform_failed",
1123
+ "media_fetch_failed",
1124
+ "document_format_unsupported",
1125
+ "document_too_large",
1126
+ "document_too_many_pages",
1127
+ "media_unsupported"
1128
+ ]),
1129
+ message: z.string(),
1130
+ hint: z.string().optional(),
1131
+ allowed: z.array(z.string()).optional(),
1132
+ got: z.string().optional(),
1133
+ display_error: z.string()
1134
+ })),
1135
+ errors: z.array(z.object({
1136
+ code: z.enum([
1137
+ "media_unprobeable",
1138
+ "media_format_indeterminate",
1139
+ "media_format_unsupported",
1140
+ "media_too_large",
1141
+ "media_aspect_ratio_unsupported",
1142
+ "media_resolution_too_low",
1143
+ "media_gif_unsupported",
1144
+ "media_format_recompressed",
1145
+ "media_resolution_downscaled",
1146
+ "video_container_unsupported",
1147
+ "video_codec_unsupported",
1148
+ "video_audio_codec_unsupported",
1149
+ "video_too_large",
1150
+ "video_too_small",
1151
+ "video_dimensions_unsupported",
1152
+ "video_dimensions_too_large",
1153
+ "video_fps_unsupported",
1154
+ "video_fps_too_low",
1155
+ "video_aspect_unsupported",
1156
+ "video_duration_too_short",
1157
+ "video_duration_exceeds_max",
1158
+ "video_transform_failed",
1159
+ "media_fetch_failed",
1160
+ "document_format_unsupported",
1161
+ "document_too_large",
1162
+ "document_too_many_pages",
1163
+ "media_unsupported"
1164
+ ]),
1165
+ message: z.string(),
1166
+ hint: z.string().optional(),
1167
+ allowed: z.array(z.string()).optional(),
1168
+ got: z.string().optional(),
1169
+ display_error: z.string()
1170
+ }))
1171
+ })),
1172
+ external_id: z.string().nullable(),
1173
+ metadata: z.record(z.string(), z.union([
1174
+ z.string().max(500),
1175
+ z.number(),
1176
+ z.boolean()
1177
+ ])),
1178
+ created_at: z.string(),
1179
+ updated_at: z.string(),
1180
+ upload: z.object({
1181
+ url: z.url(),
1182
+ method: z.literal("PUT"),
1183
+ headers: z.record(z.string(), z.string()),
1184
+ expires_at: z.string()
1185
+ }).nullable()
1186
+ });
1187
+ var zMediaDeletePath = z.object({
1188
+ id: z.string()
1189
+ });
1190
+ var zMediaDeleteResponse = z.object({
1191
+ id: z.string(),
1192
+ object: z.literal("media"),
1193
+ deleted: z.literal(true)
1194
+ });
1195
+ var zMediaGetPath = z.object({
1196
+ id: z.string()
1197
+ });
1198
+ var zMediaGetResponse = zMedia;
1199
+ var zMediaUpdateBody = z.object({
1200
+ alt_text: z.string().max(1e3).nullish(),
1201
+ external_id: z.string().min(1).max(255).nullish(),
1202
+ metadata: z.record(z.string(), z.union([
1203
+ z.string().max(500),
1204
+ z.number(),
1205
+ z.boolean()
1206
+ ])).optional(),
1207
+ targets: z.array(z.enum([
1208
+ "x",
1209
+ "linkedin",
1210
+ "facebook_page",
1211
+ "instagram",
1212
+ "tiktok",
1213
+ "google_ads"
1214
+ ])).min(1).optional()
1215
+ });
1216
+ var zMediaUpdatePath = z.object({
1217
+ id: z.string()
1218
+ });
1219
+ var zMediaUpdateResponse = zMedia;
1220
+ var zPostsListQuery = z.object({
1221
+ limit: z.int().gte(1).lte(100).optional().default(20),
1222
+ offset: z.int().gte(0).lte(9007199254740991).optional().default(0),
1223
+ profile_id: z.string().optional(),
1224
+ external_id: z.string().optional(),
1225
+ metadata: z.record(z.string(), z.union([
1226
+ z.string().max(500),
1227
+ z.number(),
1228
+ z.boolean()
1229
+ ])).optional(),
1230
+ scheduled_after: z.iso.datetime().optional(),
1231
+ scheduled_before: z.iso.datetime().optional(),
1232
+ updated_after: z.iso.datetime().optional(),
1233
+ status: z.array(zPostStatus).optional()
1234
+ });
1235
+ var zPostsListResponse = z.object({
1236
+ object: z.literal("list"),
1237
+ data: z.array(zPost),
1238
+ total: z.int().gte(-9007199254740991).lte(9007199254740991),
1239
+ limit: z.int().gte(-9007199254740991).lte(9007199254740991),
1240
+ offset: z.int().gte(-9007199254740991).lte(9007199254740991),
1241
+ has_more: z.boolean()
1242
+ });
1243
+ var zPostsCreateBody = zCreatePostBody;
1244
+ var zPostsCreateResponse = z.object({
1245
+ id: z.string(),
1246
+ object: z.literal("post"),
1247
+ profile_id: z.string(),
1248
+ external_id: z.string().nullable(),
1249
+ status: z.enum([
1250
+ "draft",
1251
+ "scheduled",
1252
+ "publishing",
1253
+ "partially_published",
1254
+ "published",
1255
+ "failed"
1256
+ ]),
1257
+ schedule_at: z.string().nullable(),
1258
+ tags: z.array(z.string()),
1259
+ notes: z.string().nullable(),
1260
+ metadata: z.record(z.string(), z.union([
1261
+ z.string().max(500),
1262
+ z.number(),
1263
+ z.boolean()
1264
+ ])),
1265
+ variants: z.array(zPostVariant),
1266
+ created_at: z.string(),
1267
+ updated_at: z.string(),
1268
+ dry_run: z.boolean(),
1269
+ executed: z.boolean()
1270
+ });
1271
+ var zPostsDeletePath = z.object({
1272
+ id: z.string()
1273
+ });
1274
+ var zPostsDeleteResponse = z.object({
1275
+ id: z.string(),
1276
+ object: z.literal("post"),
1277
+ deleted: z.literal(true)
1278
+ });
1279
+ var zPostsGetPath = z.object({
1280
+ id: z.string()
1281
+ });
1282
+ var zPostsGetResponse = zPost;
1283
+ var zPostsUpdateBody = z.object({
1284
+ publish: z.enum([
1285
+ "now",
1286
+ "schedule",
1287
+ "draft"
1288
+ ]).optional(),
1289
+ schedule_at: z.iso.datetime().nullish(),
1290
+ external_id: z.string().min(1).max(255).nullish(),
1291
+ metadata: z.record(z.string(), z.union([
1292
+ z.string().max(500),
1293
+ z.number(),
1294
+ z.boolean()
1295
+ ])).optional(),
1296
+ tags: z.array(z.string()).optional(),
1297
+ notes: z.string().nullish(),
1298
+ dry_run: z.boolean().optional().default(false),
1299
+ variants: z.array(zPostVariantInput).min(1).optional()
1300
+ });
1301
+ var zPostsUpdatePath = z.object({
1302
+ id: z.string()
1303
+ });
1304
+ var zPostsUpdateResponse = z.object({
1305
+ id: z.string(),
1306
+ object: z.literal("post"),
1307
+ profile_id: z.string(),
1308
+ external_id: z.string().nullable(),
1309
+ status: z.enum([
1310
+ "draft",
1311
+ "scheduled",
1312
+ "publishing",
1313
+ "partially_published",
1314
+ "published",
1315
+ "failed"
1316
+ ]),
1317
+ schedule_at: z.string().nullable(),
1318
+ tags: z.array(z.string()),
1319
+ notes: z.string().nullable(),
1320
+ metadata: z.record(z.string(), z.union([
1321
+ z.string().max(500),
1322
+ z.number(),
1323
+ z.boolean()
1324
+ ])),
1325
+ variants: z.array(zPostVariant),
1326
+ created_at: z.string(),
1327
+ updated_at: z.string(),
1328
+ dry_run: z.boolean(),
1329
+ executed: z.boolean()
1330
+ });
1331
+ var zPostsValidateBody = z.object({
1332
+ profile_id: z.string(),
1333
+ variants: z.array(zPostVariantInput).min(1)
1334
+ });
1335
+ var zPostsValidateResponse = z.object({
1336
+ object: z.literal("validation"),
1337
+ publishable: z.boolean(),
1338
+ issues: z.array(z.object({
1339
+ code: z.enum([
1340
+ "unauthorized",
1341
+ "forbidden",
1342
+ "not_found",
1343
+ "conflict",
1344
+ "validation_failed",
1345
+ "rate_limited",
1346
+ "internal_error",
1347
+ "idempotency_key_invalid",
1348
+ "idempotency_key_reused",
1349
+ "idempotency_request_in_progress",
1350
+ "account_not_available",
1351
+ "connection_reauth_required",
1352
+ "connection_not_pending",
1353
+ "not_implemented",
1354
+ "connection_discovery_failed",
1355
+ "tiktok_creator_info_unavailable",
1356
+ "media_processing",
1357
+ "not_publishable",
1358
+ "invalid_connection",
1359
+ "invalid_media",
1360
+ "profile_scope_invalid",
1361
+ "media_unprobeable",
1362
+ "media_too_large",
1363
+ "media_aspect_ratio_unsupported",
1364
+ "media_resolution_too_low",
1365
+ "media_gif_unsupported",
1366
+ "media_format_recompressed",
1367
+ "media_resolution_downscaled",
1368
+ "video_container_unsupported",
1369
+ "video_codec_unsupported",
1370
+ "video_audio_codec_unsupported",
1371
+ "video_too_large",
1372
+ "video_too_small",
1373
+ "video_dimensions_unsupported",
1374
+ "video_dimensions_too_large",
1375
+ "video_fps_unsupported",
1376
+ "video_fps_too_low",
1377
+ "video_aspect_unsupported",
1378
+ "video_duration_too_short",
1379
+ "video_duration_exceeds_max",
1380
+ "video_transform_failed",
1381
+ "media_fetch_failed",
1382
+ "document_format_unsupported",
1383
+ "document_too_large",
1384
+ "document_too_many_pages",
1385
+ "media_format_indeterminate",
1386
+ "media_format_unsupported",
1387
+ "media_count_invalid",
1388
+ "body_too_long",
1389
+ "content_missing",
1390
+ "content_conflict",
1391
+ "content_incomplete",
1392
+ "content_kind_mismatch",
1393
+ "media_type_mismatch",
1394
+ "tag_limit_exceeded",
1395
+ "reel_field_on_non_reel",
1396
+ "field_placement_invalid",
1397
+ "media_not_ready",
1398
+ "media_failed",
1399
+ "media_unsupported",
1400
+ "media_kind_mismatch",
1401
+ "variant_unparseable",
1402
+ "publishing_unavailable",
1403
+ "x_duplicate_content",
1404
+ "x_not_authorized",
1405
+ "x_access_not_permitted",
1406
+ "x_rate_limited",
1407
+ "x_publish_failed",
1408
+ "x_media_upload_failed",
1409
+ "linkedin_duplicate_content",
1410
+ "linkedin_auth_expired",
1411
+ "linkedin_permission_denied",
1412
+ "linkedin_rate_limited",
1413
+ "linkedin_media_processing",
1414
+ "linkedin_media_failed",
1415
+ "linkedin_media_upload_failed",
1416
+ "linkedin_publish_failed",
1417
+ "instagram_media_processing",
1418
+ "instagram_container_expired",
1419
+ "instagram_container_failed",
1420
+ "instagram_rate_limited",
1421
+ "instagram_not_authorized",
1422
+ "instagram_publish_failed",
1423
+ "facebook_reel_processing",
1424
+ "facebook_reel_failed",
1425
+ "facebook_rate_limited",
1426
+ "facebook_not_authorized",
1427
+ "facebook_publish_failed",
1428
+ "tiktok_privacy_not_allowed",
1429
+ "tiktok_duration_exceeds_max",
1430
+ "tiktok_media_processing",
1431
+ "tiktok_not_authorized",
1432
+ "tiktok_rate_limited",
1433
+ "tiktok_url_ownership_unverified",
1434
+ "tiktok_unaudited_private_only",
1435
+ "tiktok_spam_risk",
1436
+ "tiktok_publish_failed",
1437
+ "post_publish_failed",
1438
+ "post_partially_published",
1439
+ "connection_platform_mismatch",
1440
+ "connection_removed"
1441
+ ]),
1442
+ message: z.string(),
1443
+ hint: z.string().optional(),
1444
+ allowed: z.array(z.string()).optional(),
1445
+ got: z.string().optional(),
1446
+ variant_index: z.int().gte(-9007199254740991).lte(9007199254740991),
1447
+ path: z.array(z.union([z.string(), z.number()])),
1448
+ platform: zPostPlatform.optional(),
1449
+ display_error: z.string()
1450
+ }))
1451
+ });
1452
+ var zMetaAccountPath = z.object({
1453
+ connection_id: z.string()
1454
+ });
1455
+ var zMetaAccountResponse = z.object({
1456
+ id: z.string(),
1457
+ account_id: z.string(),
1458
+ name: z.string().nullable(),
1459
+ account_status: z.int().gte(-9007199254740991).lte(9007199254740991),
1460
+ currency: z.string(),
1461
+ timezone_name: z.string().nullable(),
1462
+ amount_spent: z.string(),
1463
+ balance: z.string(),
1464
+ spend_cap: z.string().nullable()
1465
+ });
1466
+ var zMetaInsightsPath = z.object({
1467
+ connection_id: z.string()
1468
+ });
1469
+ var zMetaInsightsQuery = z.object({
1470
+ level: z.enum([
1471
+ "account",
1472
+ "campaign",
1473
+ "adset",
1474
+ "ad"
1475
+ ]).optional().default("account"),
1476
+ date_preset: z.enum([
1477
+ "today",
1478
+ "yesterday",
1479
+ "this_month",
1480
+ "last_month",
1481
+ "this_quarter",
1482
+ "maximum",
1483
+ "data_maximum",
1484
+ "last_3d",
1485
+ "last_7d",
1486
+ "last_14d",
1487
+ "last_28d",
1488
+ "last_30d",
1489
+ "last_90d",
1490
+ "last_week_mon_sun",
1491
+ "last_week_sun_sat",
1492
+ "last_quarter",
1493
+ "last_year",
1494
+ "this_week_mon_today",
1495
+ "this_week_sun_today",
1496
+ "this_year"
1497
+ ]).optional().default("last_30d"),
1498
+ time_range: z.object({
1499
+ since: z.string().regex(/^\d{4}-\d{2}-\d{2}$/),
1500
+ until: z.string().regex(/^\d{4}-\d{2}-\d{2}$/)
1501
+ }).optional(),
1502
+ time_increment: z.union([
1503
+ z.int().gte(1).lte(90),
1504
+ z.literal("monthly"),
1505
+ z.literal("all_days")
1506
+ ]).optional()
1507
+ });
1508
+ var zMetaInsightsResponse = z.object({
1509
+ object: z.literal("list"),
1510
+ data: z.array(z.object({
1511
+ date_start: z.string(),
1512
+ date_stop: z.string(),
1513
+ account_id: z.string().optional(),
1514
+ campaign_id: z.string().optional(),
1515
+ campaign_name: z.string().optional(),
1516
+ adset_id: z.string().optional(),
1517
+ adset_name: z.string().optional(),
1518
+ ad_id: z.string().optional(),
1519
+ ad_name: z.string().optional(),
1520
+ spend: z.string().optional(),
1521
+ impressions: z.string().optional(),
1522
+ clicks: z.string().optional(),
1523
+ ctr: z.string().optional(),
1524
+ cpc: z.string().optional(),
1525
+ cpm: z.string().optional(),
1526
+ cpp: z.string().optional(),
1527
+ reach: z.string().optional(),
1528
+ frequency: z.string().optional()
1529
+ }))
1530
+ });
1531
+ var zMetaCampaignsPath = z.object({
1532
+ connection_id: z.string()
1533
+ });
1534
+ var zMetaCampaignsResponse = z.object({
1535
+ object: z.literal("list"),
1536
+ data: z.array(z.object({
1537
+ id: z.string(),
1538
+ account_id: z.string().optional(),
1539
+ name: z.string().nullable(),
1540
+ status: z.string().optional(),
1541
+ effective_status: z.string().optional(),
1542
+ objective: z.string().optional(),
1543
+ daily_budget: z.string().optional(),
1544
+ lifetime_budget: z.string().optional(),
1545
+ budget_remaining: z.string().optional(),
1546
+ bid_strategy: z.string().optional(),
1547
+ created_time: z.string().optional(),
1548
+ start_time: z.string().optional(),
1549
+ stop_time: z.string().optional()
1550
+ }))
1551
+ });
1552
+ var zMetaCampaignPath = z.object({
1553
+ connection_id: z.string(),
1554
+ campaign_id: z.string().min(1)
1555
+ });
1556
+ var zMetaCampaignResponse = z.object({
1557
+ id: z.string(),
1558
+ account_id: z.string().optional(),
1559
+ name: z.string().nullable(),
1560
+ status: z.string().optional(),
1561
+ effective_status: z.string().optional(),
1562
+ objective: z.string().optional(),
1563
+ daily_budget: z.string().optional(),
1564
+ lifetime_budget: z.string().optional(),
1565
+ budget_remaining: z.string().optional(),
1566
+ bid_strategy: z.string().optional(),
1567
+ created_time: z.string().optional(),
1568
+ start_time: z.string().optional(),
1569
+ stop_time: z.string().optional()
1570
+ });
1571
+ var zMetaAdsetsPath = z.object({
1572
+ connection_id: z.string()
1573
+ });
1574
+ var zMetaAdsetsResponse = z.object({
1575
+ object: z.literal("list"),
1576
+ data: z.array(z.object({
1577
+ id: z.string(),
1578
+ account_id: z.string().optional(),
1579
+ name: z.string().nullable(),
1580
+ status: z.string().optional(),
1581
+ effective_status: z.string().optional(),
1582
+ campaign_id: z.string().optional(),
1583
+ daily_budget: z.string().optional(),
1584
+ lifetime_budget: z.string().optional(),
1585
+ budget_remaining: z.string().optional(),
1586
+ bid_amount: z.string().optional(),
1587
+ billing_event: z.string().optional(),
1588
+ optimization_goal: z.string().optional(),
1589
+ start_time: z.string().optional(),
1590
+ end_time: z.string().optional()
1591
+ }))
1592
+ });
1593
+ var zMetaAdsetPath = z.object({
1594
+ connection_id: z.string(),
1595
+ adset_id: z.string().min(1)
1596
+ });
1597
+ var zMetaAdsetResponse = z.object({
1598
+ id: z.string(),
1599
+ account_id: z.string().optional(),
1600
+ name: z.string().nullable(),
1601
+ status: z.string().optional(),
1602
+ effective_status: z.string().optional(),
1603
+ campaign_id: z.string().optional(),
1604
+ daily_budget: z.string().optional(),
1605
+ lifetime_budget: z.string().optional(),
1606
+ budget_remaining: z.string().optional(),
1607
+ bid_amount: z.string().optional(),
1608
+ billing_event: z.string().optional(),
1609
+ optimization_goal: z.string().optional(),
1610
+ start_time: z.string().optional(),
1611
+ end_time: z.string().optional()
1612
+ });
1613
+ var zMetaAdsPath = z.object({
1614
+ connection_id: z.string()
1615
+ });
1616
+ var zMetaAdsResponse = z.object({
1617
+ object: z.literal("list"),
1618
+ data: z.array(z.object({
1619
+ id: z.string(),
1620
+ name: z.string().nullable(),
1621
+ status: z.string().optional(),
1622
+ effective_status: z.string().optional(),
1623
+ adset_id: z.string().optional(),
1624
+ campaign_id: z.string().optional(),
1625
+ account_id: z.string().optional(),
1626
+ created_time: z.string().optional(),
1627
+ updated_time: z.string().optional()
1628
+ }))
1629
+ });
1630
+ var zMetaAdPath = z.object({
1631
+ connection_id: z.string(),
1632
+ ad_id: z.string().min(1)
1633
+ });
1634
+ var zMetaAdResponse = z.object({
1635
+ id: z.string(),
1636
+ name: z.string().nullable(),
1637
+ status: z.string().optional(),
1638
+ effective_status: z.string().optional(),
1639
+ adset_id: z.string().optional(),
1640
+ campaign_id: z.string().optional(),
1641
+ account_id: z.string().optional(),
1642
+ created_time: z.string().optional(),
1643
+ updated_time: z.string().optional()
1644
+ });
1645
+ var zGoogleGetAccountPath = z.object({
1646
+ connection_id: z.string()
1647
+ });
1648
+ var zGoogleGetAccountResponse = z.object({
1649
+ id: z.string(),
1650
+ descriptive_name: z.string().nullable(),
1651
+ currency_code: z.string().nullable(),
1652
+ time_zone: z.string().nullable(),
1653
+ status: z.enum([
1654
+ "UNSPECIFIED",
1655
+ "UNKNOWN",
1656
+ "ENABLED",
1657
+ "CANCELED",
1658
+ "SUSPENDED",
1659
+ "CLOSED"
1660
+ ]),
1661
+ manager: z.boolean(),
1662
+ test_account: z.boolean()
1663
+ });
1664
+ var zGoogleGetInsightsBody = z.object({
1665
+ level: z.enum([
1666
+ "account",
1667
+ "campaign",
1668
+ "ad_group"
1669
+ ]).optional().default("campaign"),
1670
+ metrics: z.array(z.enum([
1671
+ "impressions",
1672
+ "clicks",
1673
+ "ctr",
1674
+ "average_cpc",
1675
+ "cost_micros",
1676
+ "conversions",
1677
+ "conversions_value",
1678
+ "cost_per_conversion"
1679
+ ])).min(1).optional().default([
1680
+ "impressions",
1681
+ "clicks",
1682
+ "cost_micros",
1683
+ "conversions"
1684
+ ]),
1685
+ segments: z.array(z.enum(["date", "device"])).optional(),
1686
+ since: z.string().regex(/^\d{4}-\d{2}-\d{2}$/),
1687
+ until: z.string().regex(/^\d{4}-\d{2}-\d{2}$/)
1688
+ });
1689
+ var zGoogleGetInsightsPath = z.object({
1690
+ connection_id: z.string()
1691
+ });
1692
+ var zGoogleGetInsightsResponse = z.object({
1693
+ object: z.literal("list"),
1694
+ data: z.array(z.object({
1695
+ level: z.enum([
1696
+ "account",
1697
+ "campaign",
1698
+ "ad_group"
1699
+ ]),
1700
+ id: z.string(),
1701
+ name: z.string().nullable(),
1702
+ metrics: z.record(z.string(), z.number().nullable()),
1703
+ segments: z.record(z.string(), z.string()).optional()
1704
+ }))
1705
+ });
1706
+ var zGoogleRunGaqlBody = z.object({
1707
+ query: z.string().min(1).max(1e4)
1708
+ });
1709
+ var zGoogleRunGaqlPath = z.object({
1710
+ connection_id: z.string()
1711
+ });
1712
+ var zGoogleRunGaqlResponse = z.object({
1713
+ object: z.literal("list"),
1714
+ data: z.array(z.union([z.unknown(), z.null()]))
1715
+ });
1716
+ var zGoogleCreateBudgetBody = z.object({
1717
+ name: z.string().min(1).max(255),
1718
+ amount_micros: z.int().gt(0).lte(9007199254740991),
1719
+ dry_run: z.boolean().optional().default(false)
1720
+ });
1721
+ var zGoogleCreateBudgetPath = z.object({
1722
+ connection_id: z.string()
1723
+ });
1724
+ var zGoogleCreateBudgetResponse = z.object({
1725
+ id: z.string().nullable(),
1726
+ resource_name: z.string().nullable(),
1727
+ dry_run: z.boolean(),
1728
+ executed: z.boolean()
1729
+ });
1730
+ var zGoogleDeleteBudgetBody = z.object({
1731
+ dry_run: z.boolean().optional().default(false)
1732
+ });
1733
+ var zGoogleDeleteBudgetPath = z.object({
1734
+ connection_id: z.string(),
1735
+ id: z.string().regex(/^\d+$/)
1736
+ });
1737
+ var zGoogleDeleteBudgetResponse = z.object({
1738
+ id: z.string(),
1739
+ removed: z.boolean(),
1740
+ dry_run: z.boolean(),
1741
+ executed: z.boolean()
1742
+ });
1743
+ var zGoogleEditBudgetBody = z.object({
1744
+ amount_micros: z.int().gt(0).lte(9007199254740991),
1745
+ dry_run: z.boolean().optional().default(false)
1746
+ });
1747
+ var zGoogleEditBudgetPath = z.object({
1748
+ connection_id: z.string(),
1749
+ id: z.string().regex(/^\d+$/)
1750
+ });
1751
+ var zGoogleEditBudgetResponse = z.object({
1752
+ id: z.string(),
1753
+ resource_name: z.string(),
1754
+ dry_run: z.boolean(),
1755
+ executed: z.boolean()
1756
+ });
1757
+ var zGoogleListCampaignsPath = z.object({
1758
+ connection_id: z.string()
1759
+ });
1760
+ var zGoogleListCampaignsResponse = z.object({
1761
+ object: z.literal("list"),
1762
+ data: z.array(z.object({
1763
+ id: z.string(),
1764
+ name: z.string().nullable(),
1765
+ status: z.enum([
1766
+ "UNSPECIFIED",
1767
+ "UNKNOWN",
1768
+ "ENABLED",
1769
+ "PAUSED",
1770
+ "REMOVED"
1771
+ ]),
1772
+ advertising_channel_type: z.enum([
1773
+ "UNSPECIFIED",
1774
+ "UNKNOWN",
1775
+ "SEARCH",
1776
+ "DISPLAY",
1777
+ "SHOPPING",
1778
+ "HOTEL",
1779
+ "VIDEO",
1780
+ "MULTI_CHANNEL",
1781
+ "LOCAL",
1782
+ "SMART",
1783
+ "PERFORMANCE_MAX",
1784
+ "LOCAL_SERVICES",
1785
+ "TRAVEL",
1786
+ "DEMAND_GEN"
1787
+ ]),
1788
+ bidding_strategy_type: z.enum([
1789
+ "UNSPECIFIED",
1790
+ "UNKNOWN",
1791
+ "COMMISSION",
1792
+ "ENHANCED_CPC",
1793
+ "FIXED_CPM",
1794
+ "FIXED_SHARE_OF_VOICE",
1795
+ "INVALID",
1796
+ "MANUAL_CPA",
1797
+ "MANUAL_CPC",
1798
+ "MANUAL_CPM",
1799
+ "MANUAL_CPV",
1800
+ "MAXIMIZE_CONVERSIONS",
1801
+ "MAXIMIZE_CONVERSION_VALUE",
1802
+ "PAGE_ONE_PROMOTED",
1803
+ "PERCENT_CPC",
1804
+ "TARGET_CPA",
1805
+ "TARGET_CPC",
1806
+ "TARGET_CPM",
1807
+ "TARGET_CPV",
1808
+ "TARGET_IMPRESSION_SHARE",
1809
+ "TARGET_OUTRANK_SHARE",
1810
+ "TARGET_ROAS",
1811
+ "TARGET_SPEND"
1812
+ ])
1813
+ }))
1814
+ });
1815
+ var zGoogleCreateCampaignBody = z.object({
1816
+ name: z.string().min(1).max(255),
1817
+ channel: z.enum(["SEARCH", "DISPLAY"]),
1818
+ campaign_budget: z.string().min(1),
1819
+ bidding: z.enum([
1820
+ "manual_cpc",
1821
+ "maximize_conversions",
1822
+ "target_spend"
1823
+ ]),
1824
+ status: z.enum(["ENABLED", "PAUSED"]).optional().default("PAUSED"),
1825
+ dry_run: z.boolean().optional().default(false)
1826
+ });
1827
+ var zGoogleCreateCampaignPath = z.object({
1828
+ connection_id: z.string()
1829
+ });
1830
+ var zGoogleCreateCampaignResponse = z.object({
1831
+ id: z.string().nullable(),
1832
+ resource_name: z.string().nullable(),
1833
+ dry_run: z.boolean(),
1834
+ executed: z.boolean()
1835
+ });
1836
+ var zGoogleDeleteCampaignBody = z.object({
1837
+ dry_run: z.boolean().optional().default(false)
1838
+ });
1839
+ var zGoogleDeleteCampaignPath = z.object({
1840
+ connection_id: z.string(),
1841
+ id: z.string().regex(/^\d+$/)
1842
+ });
1843
+ var zGoogleDeleteCampaignResponse = z.object({
1844
+ id: z.string(),
1845
+ removed: z.boolean(),
1846
+ dry_run: z.boolean(),
1847
+ executed: z.boolean()
1848
+ });
1849
+ var zGoogleGetCampaignPath = z.object({
1850
+ connection_id: z.string(),
1851
+ id: z.string().regex(/^\d+$/)
1852
+ });
1853
+ var zGoogleGetCampaignResponse = z.object({
1854
+ id: z.string(),
1855
+ name: z.string().nullable(),
1856
+ status: z.enum([
1857
+ "UNSPECIFIED",
1858
+ "UNKNOWN",
1859
+ "ENABLED",
1860
+ "PAUSED",
1861
+ "REMOVED"
1862
+ ]),
1863
+ advertising_channel_type: z.enum([
1864
+ "UNSPECIFIED",
1865
+ "UNKNOWN",
1866
+ "SEARCH",
1867
+ "DISPLAY",
1868
+ "SHOPPING",
1869
+ "HOTEL",
1870
+ "VIDEO",
1871
+ "MULTI_CHANNEL",
1872
+ "LOCAL",
1873
+ "SMART",
1874
+ "PERFORMANCE_MAX",
1875
+ "LOCAL_SERVICES",
1876
+ "TRAVEL",
1877
+ "DEMAND_GEN"
1878
+ ]),
1879
+ bidding_strategy_type: z.enum([
1880
+ "UNSPECIFIED",
1881
+ "UNKNOWN",
1882
+ "COMMISSION",
1883
+ "ENHANCED_CPC",
1884
+ "FIXED_CPM",
1885
+ "FIXED_SHARE_OF_VOICE",
1886
+ "INVALID",
1887
+ "MANUAL_CPA",
1888
+ "MANUAL_CPC",
1889
+ "MANUAL_CPM",
1890
+ "MANUAL_CPV",
1891
+ "MAXIMIZE_CONVERSIONS",
1892
+ "MAXIMIZE_CONVERSION_VALUE",
1893
+ "PAGE_ONE_PROMOTED",
1894
+ "PERCENT_CPC",
1895
+ "TARGET_CPA",
1896
+ "TARGET_CPC",
1897
+ "TARGET_CPM",
1898
+ "TARGET_CPV",
1899
+ "TARGET_IMPRESSION_SHARE",
1900
+ "TARGET_OUTRANK_SHARE",
1901
+ "TARGET_ROAS",
1902
+ "TARGET_SPEND"
1903
+ ])
1904
+ });
1905
+ var zGoogleEditCampaignBody = z.object({
1906
+ name: z.string().min(1).max(255),
1907
+ dry_run: z.boolean().optional().default(false)
1908
+ });
1909
+ var zGoogleEditCampaignPath = z.object({
1910
+ connection_id: z.string(),
1911
+ id: z.string().regex(/^\d+$/)
1912
+ });
1913
+ var zGoogleEditCampaignResponse = z.object({
1914
+ id: z.string(),
1915
+ resource_name: z.string(),
1916
+ dry_run: z.boolean(),
1917
+ executed: z.boolean()
1918
+ });
1919
+ var zGooglePauseCampaignBody = z.object({
1920
+ dry_run: z.boolean().optional().default(false)
1921
+ });
1922
+ var zGooglePauseCampaignPath = z.object({
1923
+ connection_id: z.string(),
1924
+ id: z.string().regex(/^\d+$/)
1925
+ });
1926
+ var zGooglePauseCampaignResponse = z.object({
1927
+ id: z.string(),
1928
+ status: z.enum(["ENABLED", "PAUSED"]),
1929
+ dry_run: z.boolean(),
1930
+ executed: z.boolean()
1931
+ });
1932
+ var zGoogleEnableCampaignBody = z.object({
1933
+ dry_run: z.boolean().optional().default(false)
1934
+ });
1935
+ var zGoogleEnableCampaignPath = z.object({
1936
+ connection_id: z.string(),
1937
+ id: z.string().regex(/^\d+$/)
1938
+ });
1939
+ var zGoogleEnableCampaignResponse = z.object({
1940
+ id: z.string(),
1941
+ status: z.enum(["ENABLED", "PAUSED"]),
1942
+ dry_run: z.boolean(),
1943
+ executed: z.boolean()
1944
+ });
1945
+ var zGoogleListAdGroupsPath = z.object({
1946
+ connection_id: z.string()
1947
+ });
1948
+ var zGoogleListAdGroupsResponse = z.object({
1949
+ object: z.literal("list"),
1950
+ data: z.array(z.object({
1951
+ id: z.string(),
1952
+ name: z.string().nullable(),
1953
+ status: z.enum([
1954
+ "UNSPECIFIED",
1955
+ "UNKNOWN",
1956
+ "ENABLED",
1957
+ "PAUSED",
1958
+ "REMOVED"
1959
+ ]),
1960
+ type: z.enum([
1961
+ "UNSPECIFIED",
1962
+ "UNKNOWN",
1963
+ "SEARCH_STANDARD",
1964
+ "DISPLAY_STANDARD",
1965
+ "SHOPPING_PRODUCT_ADS",
1966
+ "HOTEL_ADS",
1967
+ "SHOPPING_SMART_ADS",
1968
+ "VIDEO_BUMPER",
1969
+ "VIDEO_TRUE_VIEW_IN_STREAM",
1970
+ "VIDEO_TRUE_VIEW_IN_DISPLAY",
1971
+ "VIDEO_NON_SKIPPABLE_IN_STREAM",
1972
+ "SEARCH_DYNAMIC_ADS",
1973
+ "SHOPPING_COMPARISON_LISTING_ADS",
1974
+ "PROMOTED_HOTEL_ADS",
1975
+ "VIDEO_RESPONSIVE",
1976
+ "VIDEO_EFFICIENT_REACH",
1977
+ "SMART_CAMPAIGN_ADS",
1978
+ "TRAVEL_ADS",
1979
+ "YOUTUBE_AUDIO"
1980
+ ]),
1981
+ campaign: z.string().nullable()
1982
+ }))
1983
+ });
1984
+ var zGoogleCreateAdGroupBody = z.object({
1985
+ name: z.string().min(1).max(255),
1986
+ campaign: z.string().min(1),
1987
+ type: z.enum(["SEARCH_STANDARD", "DISPLAY_STANDARD"]),
1988
+ status: z.enum(["ENABLED", "PAUSED"]).optional().default("ENABLED"),
1989
+ dry_run: z.boolean().optional().default(false)
1990
+ });
1991
+ var zGoogleCreateAdGroupPath = z.object({
1992
+ connection_id: z.string()
1993
+ });
1994
+ var zGoogleCreateAdGroupResponse = z.object({
1995
+ id: z.string().nullable(),
1996
+ resource_name: z.string().nullable(),
1997
+ dry_run: z.boolean(),
1998
+ executed: z.boolean()
1999
+ });
2000
+ var zGoogleDeleteAdGroupBody = z.object({
2001
+ dry_run: z.boolean().optional().default(false)
2002
+ });
2003
+ var zGoogleDeleteAdGroupPath = z.object({
2004
+ connection_id: z.string(),
2005
+ id: z.string().regex(/^\d+$/)
2006
+ });
2007
+ var zGoogleDeleteAdGroupResponse = z.object({
2008
+ id: z.string(),
2009
+ removed: z.boolean(),
2010
+ dry_run: z.boolean(),
2011
+ executed: z.boolean()
2012
+ });
2013
+ var zGoogleGetAdGroupPath = z.object({
2014
+ connection_id: z.string(),
2015
+ id: z.string().regex(/^\d+$/)
2016
+ });
2017
+ var zGoogleGetAdGroupResponse = z.object({
2018
+ id: z.string(),
2019
+ name: z.string().nullable(),
2020
+ status: z.enum([
2021
+ "UNSPECIFIED",
2022
+ "UNKNOWN",
2023
+ "ENABLED",
2024
+ "PAUSED",
2025
+ "REMOVED"
2026
+ ]),
2027
+ type: z.enum([
2028
+ "UNSPECIFIED",
2029
+ "UNKNOWN",
2030
+ "SEARCH_STANDARD",
2031
+ "DISPLAY_STANDARD",
2032
+ "SHOPPING_PRODUCT_ADS",
2033
+ "HOTEL_ADS",
2034
+ "SHOPPING_SMART_ADS",
2035
+ "VIDEO_BUMPER",
2036
+ "VIDEO_TRUE_VIEW_IN_STREAM",
2037
+ "VIDEO_TRUE_VIEW_IN_DISPLAY",
2038
+ "VIDEO_NON_SKIPPABLE_IN_STREAM",
2039
+ "SEARCH_DYNAMIC_ADS",
2040
+ "SHOPPING_COMPARISON_LISTING_ADS",
2041
+ "PROMOTED_HOTEL_ADS",
2042
+ "VIDEO_RESPONSIVE",
2043
+ "VIDEO_EFFICIENT_REACH",
2044
+ "SMART_CAMPAIGN_ADS",
2045
+ "TRAVEL_ADS",
2046
+ "YOUTUBE_AUDIO"
2047
+ ]),
2048
+ campaign: z.string().nullable()
2049
+ });
2050
+ var zGoogleEditAdGroupBody = z.object({
2051
+ name: z.string().min(1).max(255),
2052
+ dry_run: z.boolean().optional().default(false)
2053
+ });
2054
+ var zGoogleEditAdGroupPath = z.object({
2055
+ connection_id: z.string(),
2056
+ id: z.string().regex(/^\d+$/)
2057
+ });
2058
+ var zGoogleEditAdGroupResponse = z.object({
2059
+ id: z.string(),
2060
+ resource_name: z.string(),
2061
+ dry_run: z.boolean(),
2062
+ executed: z.boolean()
2063
+ });
2064
+ var zGoogleSetAdGroupBidsBody = z.object({
2065
+ cpc_bid_micros: z.int().gt(0).lte(9007199254740991).optional(),
2066
+ cpm_bid_micros: z.int().gt(0).lte(9007199254740991).optional(),
2067
+ target_cpa_micros: z.int().gt(0).lte(9007199254740991).optional(),
2068
+ target_roas: z.number().gt(0).optional(),
2069
+ dry_run: z.boolean().optional().default(false)
2070
+ });
2071
+ var zGoogleSetAdGroupBidsPath = z.object({
2072
+ connection_id: z.string(),
2073
+ id: z.string().regex(/^\d+$/)
2074
+ });
2075
+ var zGoogleSetAdGroupBidsResponse = z.object({
2076
+ id: z.string(),
2077
+ resource_name: z.string(),
2078
+ dry_run: z.boolean(),
2079
+ executed: z.boolean()
2080
+ });
2081
+ var zGooglePauseAdGroupBody = z.object({
2082
+ dry_run: z.boolean().optional().default(false)
2083
+ });
2084
+ var zGooglePauseAdGroupPath = z.object({
2085
+ connection_id: z.string(),
2086
+ id: z.string().regex(/^\d+$/)
2087
+ });
2088
+ var zGooglePauseAdGroupResponse = z.object({
2089
+ id: z.string(),
2090
+ status: z.enum(["ENABLED", "PAUSED"]),
2091
+ dry_run: z.boolean(),
2092
+ executed: z.boolean()
2093
+ });
2094
+ var zGoogleEnableAdGroupBody = z.object({
2095
+ dry_run: z.boolean().optional().default(false)
2096
+ });
2097
+ var zGoogleEnableAdGroupPath = z.object({
2098
+ connection_id: z.string(),
2099
+ id: z.string().regex(/^\d+$/)
2100
+ });
2101
+ var zGoogleEnableAdGroupResponse = z.object({
2102
+ id: z.string(),
2103
+ status: z.enum(["ENABLED", "PAUSED"]),
2104
+ dry_run: z.boolean(),
2105
+ executed: z.boolean()
2106
+ });
2107
+ var zGoogleListAdsPath = z.object({
2108
+ connection_id: z.string()
2109
+ });
2110
+ var zGoogleListAdsResponse = z.object({
2111
+ object: z.literal("list"),
2112
+ data: z.array(z.object({
2113
+ id: z.string(),
2114
+ name: z.string().nullable(),
2115
+ type: z.enum([
2116
+ "UNSPECIFIED",
2117
+ "UNKNOWN",
2118
+ "TEXT_AD",
2119
+ "EXPANDED_TEXT_AD",
2120
+ "EXPANDED_DYNAMIC_SEARCH_AD",
2121
+ "HOTEL_AD",
2122
+ "SHOPPING_SMART_AD",
2123
+ "SHOPPING_PRODUCT_AD",
2124
+ "VIDEO_AD",
2125
+ "IMAGE_AD",
2126
+ "RESPONSIVE_SEARCH_AD",
2127
+ "LEGACY_RESPONSIVE_DISPLAY_AD",
2128
+ "APP_AD",
2129
+ "LEGACY_APP_INSTALL_AD",
2130
+ "RESPONSIVE_DISPLAY_AD",
2131
+ "LOCAL_AD",
2132
+ "HTML5_UPLOAD_AD",
2133
+ "DYNAMIC_HTML5_AD",
2134
+ "APP_ENGAGEMENT_AD",
2135
+ "SHOPPING_COMPARISON_LISTING_AD",
2136
+ "VIDEO_BUMPER_AD",
2137
+ "VIDEO_NON_SKIPPABLE_IN_STREAM_AD",
2138
+ "VIDEO_TRUEVIEW_IN_STREAM_AD",
2139
+ "VIDEO_RESPONSIVE_AD",
2140
+ "SMART_CAMPAIGN_AD",
2141
+ "CALL_AD",
2142
+ "APP_PRE_REGISTRATION_AD",
2143
+ "IN_FEED_VIDEO_AD",
2144
+ "DEMAND_GEN_MULTI_ASSET_AD",
2145
+ "DEMAND_GEN_CAROUSEL_AD",
2146
+ "TRAVEL_AD",
2147
+ "DEMAND_GEN_VIDEO_RESPONSIVE_AD",
2148
+ "DEMAND_GEN_PRODUCT_AD",
2149
+ "YOUTUBE_AUDIO_AD"
2150
+ ]),
2151
+ status: z.enum([
2152
+ "UNSPECIFIED",
2153
+ "UNKNOWN",
2154
+ "ENABLED",
2155
+ "PAUSED",
2156
+ "REMOVED"
2157
+ ]),
2158
+ ad_group: z.string().nullable()
2159
+ }))
2160
+ });
2161
+ var zGoogleCreateAdBody = z.object({
2162
+ ad_group: z.string().min(1),
2163
+ final_urls: z.array(z.url()).min(1),
2164
+ headlines: z.array(z.object({
2165
+ text: z.string().min(1).max(30),
2166
+ pinned_field: z.enum([
2167
+ "HEADLINE_1",
2168
+ "HEADLINE_2",
2169
+ "HEADLINE_3"
2170
+ ]).optional()
2171
+ })).min(3).max(15),
2172
+ descriptions: z.array(z.object({
2173
+ text: z.string().min(1).max(90)
2174
+ })).min(2).max(4),
2175
+ path1: z.string().max(15).optional(),
2176
+ path2: z.string().max(15).optional(),
2177
+ status: z.enum(["ENABLED", "PAUSED"]).optional().default("PAUSED"),
2178
+ dry_run: z.boolean().optional().default(false)
2179
+ });
2180
+ var zGoogleCreateAdPath = z.object({
2181
+ connection_id: z.string()
2182
+ });
2183
+ var zGoogleCreateAdResponse = z.object({
2184
+ id: z.string().nullable(),
2185
+ resource_name: z.string().nullable(),
2186
+ dry_run: z.boolean(),
2187
+ executed: z.boolean()
2188
+ });
2189
+ var zGoogleDeleteAdBody = z.object({
2190
+ dry_run: z.boolean().optional().default(false)
2191
+ });
2192
+ var zGoogleDeleteAdPath = z.object({
2193
+ connection_id: z.string(),
2194
+ id: z.string().regex(/^\d+$/)
2195
+ });
2196
+ var zGoogleDeleteAdResponse = z.object({
2197
+ id: z.string(),
2198
+ removed: z.boolean(),
2199
+ dry_run: z.boolean(),
2200
+ executed: z.boolean()
2201
+ });
2202
+ var zGoogleGetAdPath = z.object({
2203
+ connection_id: z.string(),
2204
+ id: z.string().regex(/^\d+$/)
2205
+ });
2206
+ var zGoogleGetAdResponse = z.object({
2207
+ id: z.string(),
2208
+ name: z.string().nullable(),
2209
+ type: z.enum([
2210
+ "UNSPECIFIED",
2211
+ "UNKNOWN",
2212
+ "TEXT_AD",
2213
+ "EXPANDED_TEXT_AD",
2214
+ "EXPANDED_DYNAMIC_SEARCH_AD",
2215
+ "HOTEL_AD",
2216
+ "SHOPPING_SMART_AD",
2217
+ "SHOPPING_PRODUCT_AD",
2218
+ "VIDEO_AD",
2219
+ "IMAGE_AD",
2220
+ "RESPONSIVE_SEARCH_AD",
2221
+ "LEGACY_RESPONSIVE_DISPLAY_AD",
2222
+ "APP_AD",
2223
+ "LEGACY_APP_INSTALL_AD",
2224
+ "RESPONSIVE_DISPLAY_AD",
2225
+ "LOCAL_AD",
2226
+ "HTML5_UPLOAD_AD",
2227
+ "DYNAMIC_HTML5_AD",
2228
+ "APP_ENGAGEMENT_AD",
2229
+ "SHOPPING_COMPARISON_LISTING_AD",
2230
+ "VIDEO_BUMPER_AD",
2231
+ "VIDEO_NON_SKIPPABLE_IN_STREAM_AD",
2232
+ "VIDEO_TRUEVIEW_IN_STREAM_AD",
2233
+ "VIDEO_RESPONSIVE_AD",
2234
+ "SMART_CAMPAIGN_AD",
2235
+ "CALL_AD",
2236
+ "APP_PRE_REGISTRATION_AD",
2237
+ "IN_FEED_VIDEO_AD",
2238
+ "DEMAND_GEN_MULTI_ASSET_AD",
2239
+ "DEMAND_GEN_CAROUSEL_AD",
2240
+ "TRAVEL_AD",
2241
+ "DEMAND_GEN_VIDEO_RESPONSIVE_AD",
2242
+ "DEMAND_GEN_PRODUCT_AD",
2243
+ "YOUTUBE_AUDIO_AD"
2244
+ ]),
2245
+ status: z.enum([
2246
+ "UNSPECIFIED",
2247
+ "UNKNOWN",
2248
+ "ENABLED",
2249
+ "PAUSED",
2250
+ "REMOVED"
2251
+ ]),
2252
+ ad_group: z.string().nullable()
2253
+ });
2254
+ var zGoogleCreateDisplayAdBody = z.object({
2255
+ ad_group: z.string().min(1),
2256
+ final_urls: z.array(z.url()).min(1),
2257
+ marketing_images: z.array(z.object({
2258
+ asset: z.string().min(1)
2259
+ })).max(15).optional().default([]),
2260
+ square_marketing_images: z.array(z.object({
2261
+ asset: z.string().min(1)
2262
+ })).max(15).optional().default([]),
2263
+ logo_images: z.array(z.object({
2264
+ asset: z.string().min(1)
2265
+ })).max(5).optional().default([]),
2266
+ square_logo_images: z.array(z.object({
2267
+ asset: z.string().min(1)
2268
+ })).max(5).optional().default([]),
2269
+ headlines: z.array(z.object({
2270
+ text: z.string().min(1).max(30)
2271
+ })).min(1).max(5),
2272
+ long_headline: z.object({
2273
+ text: z.string().min(1).max(90)
2274
+ }),
2275
+ descriptions: z.array(z.object({
2276
+ text: z.string().min(1).max(90)
2277
+ })).min(1).max(5),
2278
+ business_name: z.string().min(1).max(25).optional(),
2279
+ call_to_action_text: z.string().min(1).optional(),
2280
+ main_color: z.string().min(1).optional(),
2281
+ accent_color: z.string().min(1).optional(),
2282
+ status: z.enum(["ENABLED", "PAUSED"]).optional().default("PAUSED"),
2283
+ dry_run: z.boolean().optional().default(false)
2284
+ });
2285
+ var zGoogleCreateDisplayAdPath = z.object({
2286
+ connection_id: z.string()
2287
+ });
2288
+ var zGoogleCreateDisplayAdResponse = z.object({
2289
+ id: z.string().nullable(),
2290
+ resource_name: z.string().nullable(),
2291
+ dry_run: z.boolean(),
2292
+ executed: z.boolean()
2293
+ });
2294
+ var zGooglePauseAdBody = z.object({
2295
+ dry_run: z.boolean().optional().default(false)
2296
+ });
2297
+ var zGooglePauseAdPath = z.object({
2298
+ connection_id: z.string(),
2299
+ id: z.string().regex(/^\d+$/)
2300
+ });
2301
+ var zGooglePauseAdResponse = z.object({
2302
+ id: z.string(),
2303
+ status: z.enum(["ENABLED", "PAUSED"]),
2304
+ dry_run: z.boolean(),
2305
+ executed: z.boolean()
2306
+ });
2307
+ var zGoogleEnableAdBody = z.object({
2308
+ dry_run: z.boolean().optional().default(false)
2309
+ });
2310
+ var zGoogleEnableAdPath = z.object({
2311
+ connection_id: z.string(),
2312
+ id: z.string().regex(/^\d+$/)
2313
+ });
2314
+ var zGoogleEnableAdResponse = z.object({
2315
+ id: z.string(),
2316
+ status: z.enum(["ENABLED", "PAUSED"]),
2317
+ dry_run: z.boolean(),
2318
+ executed: z.boolean()
2319
+ });
2320
+ var zGoogleListKeywordsPath = z.object({
2321
+ connection_id: z.string()
2322
+ });
2323
+ var zGoogleListKeywordsResponse = z.object({
2324
+ object: z.literal("list"),
2325
+ data: z.array(z.object({
2326
+ id: z.string(),
2327
+ text: z.string().nullable(),
2328
+ match_type: z.enum([
2329
+ "UNSPECIFIED",
2330
+ "UNKNOWN",
2331
+ "EXACT",
2332
+ "PHRASE",
2333
+ "BROAD"
2334
+ ]),
2335
+ status: z.enum([
2336
+ "UNSPECIFIED",
2337
+ "UNKNOWN",
2338
+ "ENABLED",
2339
+ "PAUSED",
2340
+ "REMOVED"
2341
+ ]),
2342
+ negative: z.boolean(),
2343
+ ad_group: z.string().nullable()
2344
+ }))
2345
+ });
2346
+ var zGoogleCreateKeywordBody = z.object({
2347
+ ad_group: z.string().min(1),
2348
+ text: z.string().min(1).max(80),
2349
+ match_type: z.enum([
2350
+ "EXACT",
2351
+ "PHRASE",
2352
+ "BROAD"
2353
+ ]),
2354
+ negative: z.boolean().optional().default(false),
2355
+ status: z.enum(["ENABLED", "PAUSED"]).optional().default("ENABLED"),
2356
+ dry_run: z.boolean().optional().default(false)
2357
+ });
2358
+ var zGoogleCreateKeywordPath = z.object({
2359
+ connection_id: z.string()
2360
+ });
2361
+ var zGoogleCreateKeywordResponse = z.object({
2362
+ id: z.string().nullable(),
2363
+ resource_name: z.string().nullable(),
2364
+ dry_run: z.boolean(),
2365
+ executed: z.boolean()
2366
+ });
2367
+ var zGoogleDeleteKeywordBody = z.object({
2368
+ dry_run: z.boolean().optional().default(false)
2369
+ });
2370
+ var zGoogleDeleteKeywordPath = z.object({
2371
+ connection_id: z.string(),
2372
+ id: z.string().regex(/^\d+$/)
2373
+ });
2374
+ var zGoogleDeleteKeywordResponse = z.object({
2375
+ id: z.string(),
2376
+ removed: z.boolean(),
2377
+ dry_run: z.boolean(),
2378
+ executed: z.boolean()
2379
+ });
2380
+ var zGoogleGetKeywordPath = z.object({
2381
+ connection_id: z.string(),
2382
+ id: z.string().regex(/^\d+$/)
2383
+ });
2384
+ var zGoogleGetKeywordResponse = z.object({
2385
+ id: z.string(),
2386
+ text: z.string().nullable(),
2387
+ match_type: z.enum([
2388
+ "UNSPECIFIED",
2389
+ "UNKNOWN",
2390
+ "EXACT",
2391
+ "PHRASE",
2392
+ "BROAD"
2393
+ ]),
2394
+ status: z.enum([
2395
+ "UNSPECIFIED",
2396
+ "UNKNOWN",
2397
+ "ENABLED",
2398
+ "PAUSED",
2399
+ "REMOVED"
2400
+ ]),
2401
+ negative: z.boolean(),
2402
+ ad_group: z.string().nullable()
2403
+ });
2404
+ var zGoogleSetKeywordBidBody = z.object({
2405
+ cpc_bid_micros: z.int().gt(0).lte(9007199254740991),
2406
+ dry_run: z.boolean().optional().default(false)
2407
+ });
2408
+ var zGoogleSetKeywordBidPath = z.object({
2409
+ connection_id: z.string(),
2410
+ id: z.string().regex(/^\d+$/)
2411
+ });
2412
+ var zGoogleSetKeywordBidResponse = z.object({
2413
+ id: z.string(),
2414
+ resource_name: z.string(),
2415
+ dry_run: z.boolean(),
2416
+ executed: z.boolean()
2417
+ });
2418
+ var zGooglePauseKeywordBody = z.object({
2419
+ dry_run: z.boolean().optional().default(false)
2420
+ });
2421
+ var zGooglePauseKeywordPath = z.object({
2422
+ connection_id: z.string(),
2423
+ id: z.string().regex(/^\d+$/)
2424
+ });
2425
+ var zGooglePauseKeywordResponse = z.object({
2426
+ id: z.string(),
2427
+ status: z.enum(["ENABLED", "PAUSED"]),
2428
+ dry_run: z.boolean(),
2429
+ executed: z.boolean()
2430
+ });
2431
+ var zGoogleEnableKeywordBody = z.object({
2432
+ dry_run: z.boolean().optional().default(false)
2433
+ });
2434
+ var zGoogleEnableKeywordPath = z.object({
2435
+ connection_id: z.string(),
2436
+ id: z.string().regex(/^\d+$/)
2437
+ });
2438
+ var zGoogleEnableKeywordResponse = z.object({
2439
+ id: z.string(),
2440
+ status: z.enum(["ENABLED", "PAUSED"]),
2441
+ dry_run: z.boolean(),
2442
+ executed: z.boolean()
2443
+ });
2444
+ var zGoogleListConversionActionsPath = z.object({
2445
+ connection_id: z.string()
2446
+ });
2447
+ var zGoogleListConversionActionsResponse = z.object({
2448
+ object: z.literal("list"),
2449
+ data: z.array(z.object({
2450
+ id: z.string(),
2451
+ name: z.string().nullable(),
2452
+ status: z.enum([
2453
+ "UNSPECIFIED",
2454
+ "UNKNOWN",
2455
+ "ENABLED",
2456
+ "REMOVED",
2457
+ "HIDDEN"
2458
+ ]),
2459
+ type: z.enum([
2460
+ "UNSPECIFIED",
2461
+ "UNKNOWN",
2462
+ "AD_CALL",
2463
+ "CLICK_TO_CALL",
2464
+ "GOOGLE_PLAY_DOWNLOAD",
2465
+ "GOOGLE_PLAY_IN_APP_PURCHASE",
2466
+ "UPLOAD_CALLS",
2467
+ "UPLOAD_CLICKS",
2468
+ "WEBPAGE",
2469
+ "WEBSITE_CALL",
2470
+ "STORE_SALES_DIRECT_UPLOAD",
2471
+ "STORE_SALES",
2472
+ "FIREBASE_ANDROID_FIRST_OPEN",
2473
+ "FIREBASE_ANDROID_IN_APP_PURCHASE",
2474
+ "FIREBASE_ANDROID_CUSTOM",
2475
+ "FIREBASE_IOS_FIRST_OPEN",
2476
+ "FIREBASE_IOS_IN_APP_PURCHASE",
2477
+ "FIREBASE_IOS_CUSTOM",
2478
+ "THIRD_PARTY_APP_ANALYTICS_ANDROID_FIRST_OPEN",
2479
+ "THIRD_PARTY_APP_ANALYTICS_ANDROID_IN_APP_PURCHASE",
2480
+ "THIRD_PARTY_APP_ANALYTICS_ANDROID_CUSTOM",
2481
+ "THIRD_PARTY_APP_ANALYTICS_IOS_FIRST_OPEN",
2482
+ "THIRD_PARTY_APP_ANALYTICS_IOS_IN_APP_PURCHASE",
2483
+ "THIRD_PARTY_APP_ANALYTICS_IOS_CUSTOM",
2484
+ "ANDROID_APP_PRE_REGISTRATION",
2485
+ "ANDROID_INSTALLS_ALL_OTHER_APPS",
2486
+ "FLOODLIGHT_ACTION",
2487
+ "FLOODLIGHT_TRANSACTION",
2488
+ "GOOGLE_HOSTED",
2489
+ "LEAD_FORM_SUBMIT",
2490
+ "SALESFORCE",
2491
+ "SEARCH_ADS_360",
2492
+ "SMART_CAMPAIGN_AD_CLICKS_TO_CALL",
2493
+ "SMART_CAMPAIGN_MAP_CLICKS_TO_CALL",
2494
+ "SMART_CAMPAIGN_MAP_DIRECTIONS",
2495
+ "SMART_CAMPAIGN_TRACKED_CALLS",
2496
+ "STORE_VISITS",
2497
+ "WEBPAGE_CODELESS",
2498
+ "UNIVERSAL_ANALYTICS_GOAL",
2499
+ "UNIVERSAL_ANALYTICS_TRANSACTION",
2500
+ "GOOGLE_ANALYTICS_4_CUSTOM",
2501
+ "GOOGLE_ANALYTICS_4_PURCHASE"
2502
+ ]),
2503
+ category: z.enum([
2504
+ "UNSPECIFIED",
2505
+ "UNKNOWN",
2506
+ "DEFAULT",
2507
+ "PAGE_VIEW",
2508
+ "PURCHASE",
2509
+ "SIGNUP",
2510
+ "DOWNLOAD",
2511
+ "ADD_TO_CART",
2512
+ "BEGIN_CHECKOUT",
2513
+ "SUBSCRIBE_PAID",
2514
+ "PHONE_CALL_LEAD",
2515
+ "IMPORTED_LEAD",
2516
+ "SUBMIT_LEAD_FORM",
2517
+ "BOOK_APPOINTMENT",
2518
+ "REQUEST_QUOTE",
2519
+ "GET_DIRECTIONS",
2520
+ "OUTBOUND_CLICK",
2521
+ "CONTACT",
2522
+ "ENGAGEMENT",
2523
+ "STORE_VISIT",
2524
+ "STORE_SALE",
2525
+ "QUALIFIED_LEAD",
2526
+ "CONVERTED_LEAD"
2527
+ ]),
2528
+ origin: z.enum([
2529
+ "UNSPECIFIED",
2530
+ "UNKNOWN",
2531
+ "WEBSITE",
2532
+ "GOOGLE_HOSTED",
2533
+ "APP",
2534
+ "CALL_FROM_ADS",
2535
+ "STORE",
2536
+ "YOUTUBE_HOSTED"
2537
+ ]),
2538
+ primary_for_goal: z.boolean(),
2539
+ counting_type: z.enum([
2540
+ "UNSPECIFIED",
2541
+ "UNKNOWN",
2542
+ "ONE_PER_CLICK",
2543
+ "MANY_PER_CLICK"
2544
+ ]),
2545
+ value_settings: z.object({
2546
+ default_value: z.number().nullable(),
2547
+ default_currency_code: z.string().nullable(),
2548
+ always_use_default_value: z.boolean().nullable()
2549
+ }).nullable(),
2550
+ tag_snippets: z.array(z.object({
2551
+ type: z.enum([
2552
+ "UNSPECIFIED",
2553
+ "UNKNOWN",
2554
+ "WEBPAGE",
2555
+ "WEBPAGE_ONCLICK",
2556
+ "CLICK_TO_CALL",
2557
+ "WEBSITE_CALL"
2558
+ ]),
2559
+ page_format: z.enum([
2560
+ "UNSPECIFIED",
2561
+ "UNKNOWN",
2562
+ "HTML",
2563
+ "AMP"
2564
+ ]),
2565
+ global_site_tag: z.string().nullable(),
2566
+ event_snippet: z.string().nullable()
2567
+ }))
2568
+ }))
2569
+ });
2570
+ var zGoogleCreateConversionActionBody = z.object({
2571
+ name: z.string().min(1).max(255),
2572
+ type: z.enum(["WEBPAGE", "UPLOAD_CLICKS"]),
2573
+ category: z.enum([
2574
+ "DEFAULT",
2575
+ "PAGE_VIEW",
2576
+ "PURCHASE",
2577
+ "SIGNUP",
2578
+ "DOWNLOAD",
2579
+ "ADD_TO_CART",
2580
+ "BEGIN_CHECKOUT",
2581
+ "SUBSCRIBE_PAID",
2582
+ "PHONE_CALL_LEAD",
2583
+ "IMPORTED_LEAD",
2584
+ "SUBMIT_LEAD_FORM",
2585
+ "BOOK_APPOINTMENT",
2586
+ "REQUEST_QUOTE",
2587
+ "GET_DIRECTIONS",
2588
+ "OUTBOUND_CLICK",
2589
+ "CONTACT",
2590
+ "ENGAGEMENT",
2591
+ "STORE_VISIT",
2592
+ "STORE_SALE",
2593
+ "QUALIFIED_LEAD",
2594
+ "CONVERTED_LEAD"
2595
+ ]),
2596
+ status: z.enum(["ENABLED"]).optional().default("ENABLED"),
2597
+ value_settings: z.object({
2598
+ default_value: z.number().gte(0).optional(),
2599
+ default_currency_code: z.string().length(3).optional(),
2600
+ always_use_default_value: z.boolean().optional()
2601
+ }).optional(),
2602
+ counting_type: z.enum(["ONE_PER_CLICK", "MANY_PER_CLICK"]).optional(),
2603
+ click_through_lookback_window_days: z.int().gt(0).lte(9007199254740991).optional(),
2604
+ view_through_lookback_window_days: z.int().gt(0).lte(9007199254740991).optional(),
2605
+ dry_run: z.boolean().optional().default(false)
2606
+ });
2607
+ var zGoogleCreateConversionActionPath = z.object({
2608
+ connection_id: z.string()
2609
+ });
2610
+ var zGoogleCreateConversionActionResponse = z.object({
2611
+ id: z.string().nullable(),
2612
+ resource_name: z.string().nullable(),
2613
+ dry_run: z.boolean(),
2614
+ executed: z.boolean()
2615
+ });
2616
+ var zGoogleGetConversionActionPath = z.object({
2617
+ connection_id: z.string(),
2618
+ id: z.string().regex(/^\d+$/)
2619
+ });
2620
+ var zGoogleGetConversionActionResponse = z.object({
2621
+ id: z.string(),
2622
+ name: z.string().nullable(),
2623
+ status: z.enum([
2624
+ "UNSPECIFIED",
2625
+ "UNKNOWN",
2626
+ "ENABLED",
2627
+ "REMOVED",
2628
+ "HIDDEN"
2629
+ ]),
2630
+ type: z.enum([
2631
+ "UNSPECIFIED",
2632
+ "UNKNOWN",
2633
+ "AD_CALL",
2634
+ "CLICK_TO_CALL",
2635
+ "GOOGLE_PLAY_DOWNLOAD",
2636
+ "GOOGLE_PLAY_IN_APP_PURCHASE",
2637
+ "UPLOAD_CALLS",
2638
+ "UPLOAD_CLICKS",
2639
+ "WEBPAGE",
2640
+ "WEBSITE_CALL",
2641
+ "STORE_SALES_DIRECT_UPLOAD",
2642
+ "STORE_SALES",
2643
+ "FIREBASE_ANDROID_FIRST_OPEN",
2644
+ "FIREBASE_ANDROID_IN_APP_PURCHASE",
2645
+ "FIREBASE_ANDROID_CUSTOM",
2646
+ "FIREBASE_IOS_FIRST_OPEN",
2647
+ "FIREBASE_IOS_IN_APP_PURCHASE",
2648
+ "FIREBASE_IOS_CUSTOM",
2649
+ "THIRD_PARTY_APP_ANALYTICS_ANDROID_FIRST_OPEN",
2650
+ "THIRD_PARTY_APP_ANALYTICS_ANDROID_IN_APP_PURCHASE",
2651
+ "THIRD_PARTY_APP_ANALYTICS_ANDROID_CUSTOM",
2652
+ "THIRD_PARTY_APP_ANALYTICS_IOS_FIRST_OPEN",
2653
+ "THIRD_PARTY_APP_ANALYTICS_IOS_IN_APP_PURCHASE",
2654
+ "THIRD_PARTY_APP_ANALYTICS_IOS_CUSTOM",
2655
+ "ANDROID_APP_PRE_REGISTRATION",
2656
+ "ANDROID_INSTALLS_ALL_OTHER_APPS",
2657
+ "FLOODLIGHT_ACTION",
2658
+ "FLOODLIGHT_TRANSACTION",
2659
+ "GOOGLE_HOSTED",
2660
+ "LEAD_FORM_SUBMIT",
2661
+ "SALESFORCE",
2662
+ "SEARCH_ADS_360",
2663
+ "SMART_CAMPAIGN_AD_CLICKS_TO_CALL",
2664
+ "SMART_CAMPAIGN_MAP_CLICKS_TO_CALL",
2665
+ "SMART_CAMPAIGN_MAP_DIRECTIONS",
2666
+ "SMART_CAMPAIGN_TRACKED_CALLS",
2667
+ "STORE_VISITS",
2668
+ "WEBPAGE_CODELESS",
2669
+ "UNIVERSAL_ANALYTICS_GOAL",
2670
+ "UNIVERSAL_ANALYTICS_TRANSACTION",
2671
+ "GOOGLE_ANALYTICS_4_CUSTOM",
2672
+ "GOOGLE_ANALYTICS_4_PURCHASE"
2673
+ ]),
2674
+ category: z.enum([
2675
+ "UNSPECIFIED",
2676
+ "UNKNOWN",
2677
+ "DEFAULT",
2678
+ "PAGE_VIEW",
2679
+ "PURCHASE",
2680
+ "SIGNUP",
2681
+ "DOWNLOAD",
2682
+ "ADD_TO_CART",
2683
+ "BEGIN_CHECKOUT",
2684
+ "SUBSCRIBE_PAID",
2685
+ "PHONE_CALL_LEAD",
2686
+ "IMPORTED_LEAD",
2687
+ "SUBMIT_LEAD_FORM",
2688
+ "BOOK_APPOINTMENT",
2689
+ "REQUEST_QUOTE",
2690
+ "GET_DIRECTIONS",
2691
+ "OUTBOUND_CLICK",
2692
+ "CONTACT",
2693
+ "ENGAGEMENT",
2694
+ "STORE_VISIT",
2695
+ "STORE_SALE",
2696
+ "QUALIFIED_LEAD",
2697
+ "CONVERTED_LEAD"
2698
+ ]),
2699
+ origin: z.enum([
2700
+ "UNSPECIFIED",
2701
+ "UNKNOWN",
2702
+ "WEBSITE",
2703
+ "GOOGLE_HOSTED",
2704
+ "APP",
2705
+ "CALL_FROM_ADS",
2706
+ "STORE",
2707
+ "YOUTUBE_HOSTED"
2708
+ ]),
2709
+ primary_for_goal: z.boolean(),
2710
+ counting_type: z.enum([
2711
+ "UNSPECIFIED",
2712
+ "UNKNOWN",
2713
+ "ONE_PER_CLICK",
2714
+ "MANY_PER_CLICK"
2715
+ ]),
2716
+ value_settings: z.object({
2717
+ default_value: z.number().nullable(),
2718
+ default_currency_code: z.string().nullable(),
2719
+ always_use_default_value: z.boolean().nullable()
2720
+ }).nullable(),
2721
+ tag_snippets: z.array(z.object({
2722
+ type: z.enum([
2723
+ "UNSPECIFIED",
2724
+ "UNKNOWN",
2725
+ "WEBPAGE",
2726
+ "WEBPAGE_ONCLICK",
2727
+ "CLICK_TO_CALL",
2728
+ "WEBSITE_CALL"
2729
+ ]),
2730
+ page_format: z.enum([
2731
+ "UNSPECIFIED",
2732
+ "UNKNOWN",
2733
+ "HTML",
2734
+ "AMP"
2735
+ ]),
2736
+ global_site_tag: z.string().nullable(),
2737
+ event_snippet: z.string().nullable()
2738
+ }))
2739
+ });
2740
+ var zGoogleListConversionGoalsPath = z.object({
2741
+ connection_id: z.string()
2742
+ });
2743
+ var zGoogleListConversionGoalsResponse = z.object({
2744
+ object: z.literal("list"),
2745
+ data: z.array(z.object({
2746
+ category: z.enum([
2747
+ "UNSPECIFIED",
2748
+ "UNKNOWN",
2749
+ "DEFAULT",
2750
+ "PAGE_VIEW",
2751
+ "PURCHASE",
2752
+ "SIGNUP",
2753
+ "DOWNLOAD",
2754
+ "ADD_TO_CART",
2755
+ "BEGIN_CHECKOUT",
2756
+ "SUBSCRIBE_PAID",
2757
+ "PHONE_CALL_LEAD",
2758
+ "IMPORTED_LEAD",
2759
+ "SUBMIT_LEAD_FORM",
2760
+ "BOOK_APPOINTMENT",
2761
+ "REQUEST_QUOTE",
2762
+ "GET_DIRECTIONS",
2763
+ "OUTBOUND_CLICK",
2764
+ "CONTACT",
2765
+ "ENGAGEMENT",
2766
+ "STORE_VISIT",
2767
+ "STORE_SALE",
2768
+ "QUALIFIED_LEAD",
2769
+ "CONVERTED_LEAD"
2770
+ ]),
2771
+ origin: z.enum([
2772
+ "UNSPECIFIED",
2773
+ "UNKNOWN",
2774
+ "WEBSITE",
2775
+ "GOOGLE_HOSTED",
2776
+ "APP",
2777
+ "CALL_FROM_ADS",
2778
+ "STORE",
2779
+ "YOUTUBE_HOSTED"
2780
+ ]),
2781
+ biddable: z.boolean()
2782
+ }))
2783
+ });
2784
+ var zGoogleSetConversionGoalBody = z.object({
2785
+ category: z.enum([
2786
+ "DEFAULT",
2787
+ "PAGE_VIEW",
2788
+ "PURCHASE",
2789
+ "SIGNUP",
2790
+ "DOWNLOAD",
2791
+ "ADD_TO_CART",
2792
+ "BEGIN_CHECKOUT",
2793
+ "SUBSCRIBE_PAID",
2794
+ "PHONE_CALL_LEAD",
2795
+ "IMPORTED_LEAD",
2796
+ "SUBMIT_LEAD_FORM",
2797
+ "BOOK_APPOINTMENT",
2798
+ "REQUEST_QUOTE",
2799
+ "GET_DIRECTIONS",
2800
+ "OUTBOUND_CLICK",
2801
+ "CONTACT",
2802
+ "ENGAGEMENT",
2803
+ "STORE_VISIT",
2804
+ "STORE_SALE",
2805
+ "QUALIFIED_LEAD",
2806
+ "CONVERTED_LEAD"
2807
+ ]),
2808
+ origin: z.enum([
2809
+ "WEBSITE",
2810
+ "GOOGLE_HOSTED",
2811
+ "APP",
2812
+ "CALL_FROM_ADS",
2813
+ "STORE",
2814
+ "YOUTUBE_HOSTED"
2815
+ ]),
2816
+ biddable: z.boolean(),
2817
+ dry_run: z.boolean().optional().default(false)
2818
+ });
2819
+ var zGoogleSetConversionGoalPath = z.object({
2820
+ connection_id: z.string()
2821
+ });
2822
+ var zGoogleSetConversionGoalResponse = z.object({
2823
+ category: z.enum([
2824
+ "UNSPECIFIED",
2825
+ "UNKNOWN",
2826
+ "DEFAULT",
2827
+ "PAGE_VIEW",
2828
+ "PURCHASE",
2829
+ "SIGNUP",
2830
+ "DOWNLOAD",
2831
+ "ADD_TO_CART",
2832
+ "BEGIN_CHECKOUT",
2833
+ "SUBSCRIBE_PAID",
2834
+ "PHONE_CALL_LEAD",
2835
+ "IMPORTED_LEAD",
2836
+ "SUBMIT_LEAD_FORM",
2837
+ "BOOK_APPOINTMENT",
2838
+ "REQUEST_QUOTE",
2839
+ "GET_DIRECTIONS",
2840
+ "OUTBOUND_CLICK",
2841
+ "CONTACT",
2842
+ "ENGAGEMENT",
2843
+ "STORE_VISIT",
2844
+ "STORE_SALE",
2845
+ "QUALIFIED_LEAD",
2846
+ "CONVERTED_LEAD"
2847
+ ]),
2848
+ origin: z.enum([
2849
+ "UNSPECIFIED",
2850
+ "UNKNOWN",
2851
+ "WEBSITE",
2852
+ "GOOGLE_HOSTED",
2853
+ "APP",
2854
+ "CALL_FROM_ADS",
2855
+ "STORE",
2856
+ "YOUTUBE_HOSTED"
2857
+ ]),
2858
+ biddable: z.boolean(),
2859
+ dry_run: z.boolean(),
2860
+ executed: z.boolean()
2861
+ });
2862
+ var zGoogleUploadConversionsBody = z.object({
2863
+ conversions: z.array(z.object({
2864
+ conversion_action: z.string().min(1),
2865
+ conversion_date_time: z.string().regex(/^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}[+-]\d{2}:\d{2}$/),
2866
+ conversion_value: z.number().gte(0).optional(),
2867
+ currency_code: z.string().length(3).optional(),
2868
+ order_id: z.string().optional(),
2869
+ gclid: z.string().optional(),
2870
+ gbraid: z.string().optional(),
2871
+ wbraid: z.string().optional(),
2872
+ user_identifiers: z.array(z.object({
2873
+ hashed_email: z.string().regex(/^[a-f0-9]{64}$/).optional(),
2874
+ hashed_phone_number: z.string().regex(/^[a-f0-9]{64}$/).optional(),
2875
+ user_identifier_source: z.enum(["FIRST_PARTY", "THIRD_PARTY"]).optional()
2876
+ })).min(1).max(5).optional(),
2877
+ consent: z.object({
2878
+ ad_user_data: z.enum(["GRANTED", "DENIED"]).optional(),
2879
+ ad_personalization: z.enum(["GRANTED", "DENIED"]).optional()
2880
+ }).optional()
2881
+ })).min(1).max(2e3),
2882
+ dry_run: z.boolean().optional().default(false)
2883
+ });
2884
+ var zGoogleUploadConversionsPath = z.object({
2885
+ connection_id: z.string()
2886
+ });
2887
+ var zGoogleUploadConversionsResponse = z.object({
2888
+ received: z.int().gte(-9007199254740991).lte(9007199254740991),
2889
+ succeeded: z.int().gte(-9007199254740991).lte(9007199254740991),
2890
+ failed: z.int().gte(-9007199254740991).lte(9007199254740991),
2891
+ errors: z.array(z.object({
2892
+ index: z.int().gte(-9007199254740991).lte(9007199254740991),
2893
+ error_code: z.string(),
2894
+ message: z.string()
2895
+ })),
2896
+ dry_run: z.boolean()
2897
+ });
2898
+ var zGoogleUploadImageAssetBody = z.object({
2899
+ media_id: z.string(),
2900
+ dry_run: z.boolean().optional().default(false)
2901
+ });
2902
+ var zGoogleUploadImageAssetPath = z.object({
2903
+ connection_id: z.string()
2904
+ });
2905
+ var zGoogleUploadImageAssetResponse = z.object({
2906
+ id: z.string().nullable(),
2907
+ resource_name: z.string().nullable(),
2908
+ dry_run: z.boolean(),
2909
+ executed: z.boolean()
2910
+ });
2911
+ var zTiktokCreatorInfoPath = z.object({
2912
+ id: z.string()
2913
+ });
2914
+ var zTiktokCreatorInfoResponse = zTikTokCreatorInfo;
2915
+ var zLogsListQuery = z.object({
2916
+ limit: z.int().gte(1).lte(100).optional().default(20),
2917
+ offset: z.int().gte(0).lte(9007199254740991).optional().default(0),
2918
+ profile_id: z.string().optional(),
2919
+ connection_id: z.string().optional(),
2920
+ platform: z.enum([
2921
+ "meta_ads",
2922
+ "google_ads",
2923
+ "tiktok_ads",
2924
+ "x",
2925
+ "linkedin",
2926
+ "facebook_page",
2927
+ "instagram",
2928
+ "tiktok"
2929
+ ]).optional(),
2930
+ status: z.enum([
2931
+ "pending",
2932
+ "success",
2933
+ "error"
2934
+ ]).optional(),
2935
+ source: z.enum([
2936
+ "api",
2937
+ "dashboard",
2938
+ "mcp",
2939
+ "scheduler"
2940
+ ]).optional(),
2941
+ action: z.string().min(1).optional(),
2942
+ created_after: z.iso.datetime().optional(),
2943
+ created_before: z.iso.datetime().optional()
2944
+ });
2945
+ var zLogsListResponse = z.object({
2946
+ object: z.literal("list"),
2947
+ data: z.array(z.object({
2948
+ id: z.string(),
2949
+ source: z.enum([
2950
+ "api",
2951
+ "dashboard",
2952
+ "mcp",
2953
+ "scheduler"
2954
+ ]),
2955
+ action: z.string(),
2956
+ status: z.enum([
2957
+ "pending",
2958
+ "success",
2959
+ "error"
2960
+ ]),
2961
+ status_code: z.int().gte(-9007199254740991).lte(9007199254740991).nullable(),
2962
+ platform: z.enum([
2963
+ "meta_ads",
2964
+ "google_ads",
2965
+ "tiktok_ads",
2966
+ "x",
2967
+ "linkedin",
2968
+ "facebook_page",
2969
+ "instagram",
2970
+ "tiktok"
2971
+ ]).nullable(),
2972
+ request_method: z.string().nullable(),
2973
+ request_path: z.string().nullable(),
2974
+ request_body: z.unknown().nullish(),
2975
+ response_body: z.unknown().nullish(),
2976
+ error: z.unknown().nullish(),
2977
+ outcome: z.object({
2978
+ status: z.enum([
2979
+ "draft",
2980
+ "scheduled",
2981
+ "publishing",
2982
+ "partially_published",
2983
+ "published",
2984
+ "failed"
2985
+ ]),
2986
+ targets: z.array(z.object({
2987
+ variant_id: z.string(),
2988
+ connection_id: z.string().nullable(),
2989
+ platform: z.enum([
2990
+ "x",
2991
+ "linkedin",
2992
+ "facebook_page",
2993
+ "instagram",
2994
+ "tiktok"
2995
+ ]),
2996
+ status: z.enum([
2997
+ "draft",
2998
+ "scheduled",
2999
+ "publishing",
3000
+ "published",
3001
+ "failed"
3002
+ ]),
3003
+ platform_post_id: z.string().nullable(),
3004
+ permalink: z.string().nullable(),
3005
+ published_at: z.string().nullable(),
3006
+ error: z.object({
3007
+ code: z.string(),
3008
+ message: z.string(),
3009
+ display_error: z.string()
3010
+ }).nullable()
3011
+ }))
3012
+ }).nullable(),
3013
+ external_id: z.string().nullable(),
3014
+ idempotency_key: z.string().nullable(),
3015
+ request_id: z.string().nullable(),
3016
+ duration_ms: z.int().gte(-9007199254740991).lte(9007199254740991).nullable(),
3017
+ profile_id: z.string().nullable(),
3018
+ connection_id: z.string().nullable(),
3019
+ api_key_id: z.string().nullable(),
3020
+ created_at: z.string().nullable(),
3021
+ updated_at: z.string().nullable()
3022
+ })),
3023
+ total: z.int().gte(-9007199254740991).lte(9007199254740991),
3024
+ limit: z.int().gte(-9007199254740991).lte(9007199254740991),
3025
+ offset: z.int().gte(-9007199254740991).lte(9007199254740991),
3026
+ has_more: z.boolean()
3027
+ });
3028
+ var zLogsGetPath = z.object({
3029
+ id: z.string()
3030
+ });
3031
+ var zLogsGetResponse = z.object({
3032
+ id: z.string(),
3033
+ source: z.enum([
3034
+ "api",
3035
+ "dashboard",
3036
+ "mcp",
3037
+ "scheduler"
3038
+ ]),
3039
+ action: z.string(),
3040
+ status: z.enum([
3041
+ "pending",
3042
+ "success",
3043
+ "error"
3044
+ ]),
3045
+ status_code: z.int().gte(-9007199254740991).lte(9007199254740991).nullable(),
3046
+ platform: z.enum([
3047
+ "meta_ads",
3048
+ "google_ads",
3049
+ "tiktok_ads",
3050
+ "x",
3051
+ "linkedin",
3052
+ "facebook_page",
3053
+ "instagram",
3054
+ "tiktok"
3055
+ ]).nullable(),
3056
+ request_method: z.string().nullable(),
3057
+ request_path: z.string().nullable(),
3058
+ request_body: z.unknown().nullish(),
3059
+ response_body: z.unknown().nullish(),
3060
+ error: z.unknown().nullish(),
3061
+ outcome: z.object({
3062
+ status: z.enum([
3063
+ "draft",
3064
+ "scheduled",
3065
+ "publishing",
3066
+ "partially_published",
3067
+ "published",
3068
+ "failed"
3069
+ ]),
3070
+ targets: z.array(z.object({
3071
+ variant_id: z.string(),
3072
+ connection_id: z.string().nullable(),
3073
+ platform: z.enum([
3074
+ "x",
3075
+ "linkedin",
3076
+ "facebook_page",
3077
+ "instagram",
3078
+ "tiktok"
3079
+ ]),
3080
+ status: z.enum([
3081
+ "draft",
3082
+ "scheduled",
3083
+ "publishing",
3084
+ "published",
3085
+ "failed"
3086
+ ]),
3087
+ platform_post_id: z.string().nullable(),
3088
+ permalink: z.string().nullable(),
3089
+ published_at: z.string().nullable(),
3090
+ error: z.object({
3091
+ code: z.string(),
3092
+ message: z.string(),
3093
+ display_error: z.string()
3094
+ }).nullable()
3095
+ }))
3096
+ }).nullable(),
3097
+ external_id: z.string().nullable(),
3098
+ idempotency_key: z.string().nullable(),
3099
+ request_id: z.string().nullable(),
3100
+ duration_ms: z.int().gte(-9007199254740991).lte(9007199254740991).nullable(),
3101
+ profile_id: z.string().nullable(),
3102
+ connection_id: z.string().nullable(),
3103
+ api_key_id: z.string().nullable(),
3104
+ created_at: z.string().nullable(),
3105
+ updated_at: z.string().nullable()
3106
+ });
3107
+ var zWebhooksListEndpointsQuery = z.object({
3108
+ limit: z.int().gte(1).lte(100).optional().default(20),
3109
+ offset: z.int().gte(0).lte(9007199254740991).optional().default(0)
3110
+ });
3111
+ var zWebhooksListEndpointsResponse = z.object({
3112
+ object: z.literal("list"),
3113
+ data: z.array(z.object({
3114
+ id: z.string(),
3115
+ url: z.string(),
3116
+ description: z.string(),
3117
+ event_types: z.array(z.string()),
3118
+ disabled: z.boolean(),
3119
+ created_at: z.string(),
3120
+ updated_at: z.string()
3121
+ })),
3122
+ total: z.int().gte(-9007199254740991).lte(9007199254740991),
3123
+ limit: z.int().gte(-9007199254740991).lte(9007199254740991),
3124
+ offset: z.int().gte(-9007199254740991).lte(9007199254740991),
3125
+ has_more: z.boolean()
3126
+ });
3127
+ var zWebhooksCreateEndpointBody = z.object({
3128
+ url: z.url(),
3129
+ description: z.string().max(255).optional(),
3130
+ event_types: z.array(z.enum([
3131
+ "webhook.ping",
3132
+ "post.published",
3133
+ "post.failed",
3134
+ "post.completed"
3135
+ ]))
3136
+ });
3137
+ var zWebhooksCreateEndpointResponse = z.object({
3138
+ id: z.string(),
3139
+ url: z.string(),
3140
+ description: z.string(),
3141
+ event_types: z.array(z.string()),
3142
+ disabled: z.boolean(),
3143
+ created_at: z.string(),
3144
+ updated_at: z.string()
3145
+ });
3146
+ var zWebhooksDeleteEndpointPath = z.object({
3147
+ id: z.string()
3148
+ });
3149
+ var zWebhooksDeleteEndpointResponse = z.object({
3150
+ id: z.string(),
3151
+ object: z.literal("webhook_endpoint"),
3152
+ deleted: z.literal(true)
3153
+ });
3154
+ var zWebhooksGetEndpointPath = z.object({
3155
+ id: z.string()
3156
+ });
3157
+ var zWebhooksGetEndpointResponse = z.object({
3158
+ id: z.string(),
3159
+ url: z.string(),
3160
+ description: z.string(),
3161
+ event_types: z.array(z.string()),
3162
+ disabled: z.boolean(),
3163
+ created_at: z.string(),
3164
+ updated_at: z.string()
3165
+ });
3166
+ var zWebhooksUpdateEndpointBody = z.object({
3167
+ url: z.url().optional(),
3168
+ description: z.string().max(255).optional(),
3169
+ disabled: z.boolean().optional(),
3170
+ event_types: z.array(z.enum([
3171
+ "webhook.ping",
3172
+ "post.published",
3173
+ "post.failed",
3174
+ "post.completed"
3175
+ ])).optional()
3176
+ });
3177
+ var zWebhooksUpdateEndpointPath = z.object({
3178
+ id: z.string()
3179
+ });
3180
+ var zWebhooksUpdateEndpointResponse = z.object({
3181
+ id: z.string(),
3182
+ url: z.string(),
3183
+ description: z.string(),
3184
+ event_types: z.array(z.string()),
3185
+ disabled: z.boolean(),
3186
+ created_at: z.string(),
3187
+ updated_at: z.string()
3188
+ });
3189
+ var zWebhooksCreatePortalResponse = z.object({
3190
+ url: z.string()
3191
+ });
3192
+ var zWebhooksListEventTypesResponse = z.array(z.object({
3193
+ name: z.string(),
3194
+ group: z.string(),
3195
+ description: z.string()
3196
+ }));
3197
+ var zWebhooksPingBody = z.object({
3198
+ message: z.string().max(255).optional().default("Hello from Postrun")
3199
+ });
3200
+ var zWebhooksPingResponse = z.object({
3201
+ id: z.string()
3202
+ });
3203
+ var zTokensMintBody = z.object({
3204
+ profile_scope: z.union([
3205
+ z.object({
3206
+ type: z.literal("ids"),
3207
+ values: z.array(z.string()).min(1).max(100)
3208
+ }),
3209
+ z.object({
3210
+ type: z.literal("external_id"),
3211
+ values: z.array(z.string().min(1).max(255)).min(1).max(50)
3212
+ }),
3213
+ z.object({
3214
+ type: z.literal("all")
3215
+ })
3216
+ ]),
3217
+ scopes: z.array(z.enum([
3218
+ "profiles:read",
3219
+ "profiles:write",
3220
+ "connections:read",
3221
+ "connections:write",
3222
+ "ads:read",
3223
+ "ads:write",
3224
+ "posts:read",
3225
+ "posts:write",
3226
+ "media:read",
3227
+ "media:write"
3228
+ ])).min(1),
3229
+ ttl_seconds: z.int().gte(60).lte(1800).optional().default(900)
3230
+ });
3231
+ var zTokensMintResponse = z.object({
3232
+ token: z.string(),
3233
+ expires_at: z.string()
3234
+ });
3235
+
3236
+ export { zConnectSession, zConnection, zConnectionKind, zConnectionStatus, zConnectionsConnectBody, zConnectionsConnectPath, zConnectionsConnectResponse, zConnectionsDeletePath, zConnectionsDeleteResponse, zConnectionsGetPath, zConnectionsGetResponse, zConnectionsListAccountsPath, zConnectionsListAccountsResponse, zConnectionsListByProfilePath, zConnectionsListByProfileQuery, zConnectionsListByProfileResponse, zConnectionsSelectBody, zConnectionsSelectPath, zConnectionsSelectResponse, zCreatePostBody, zDiscoverableAccount, zErrorCode, zGoogleCreateAdBody, zGoogleCreateAdGroupBody, zGoogleCreateAdGroupPath, zGoogleCreateAdGroupResponse, zGoogleCreateAdPath, zGoogleCreateAdResponse, zGoogleCreateBudgetBody, zGoogleCreateBudgetPath, zGoogleCreateBudgetResponse, zGoogleCreateCampaignBody, zGoogleCreateCampaignPath, zGoogleCreateCampaignResponse, zGoogleCreateConversionActionBody, zGoogleCreateConversionActionPath, zGoogleCreateConversionActionResponse, zGoogleCreateDisplayAdBody, zGoogleCreateDisplayAdPath, zGoogleCreateDisplayAdResponse, zGoogleCreateKeywordBody, zGoogleCreateKeywordPath, zGoogleCreateKeywordResponse, zGoogleDeleteAdBody, zGoogleDeleteAdGroupBody, zGoogleDeleteAdGroupPath, zGoogleDeleteAdGroupResponse, zGoogleDeleteAdPath, zGoogleDeleteAdResponse, zGoogleDeleteBudgetBody, zGoogleDeleteBudgetPath, zGoogleDeleteBudgetResponse, zGoogleDeleteCampaignBody, zGoogleDeleteCampaignPath, zGoogleDeleteCampaignResponse, zGoogleDeleteKeywordBody, zGoogleDeleteKeywordPath, zGoogleDeleteKeywordResponse, zGoogleEditAdGroupBody, zGoogleEditAdGroupPath, zGoogleEditAdGroupResponse, zGoogleEditBudgetBody, zGoogleEditBudgetPath, zGoogleEditBudgetResponse, zGoogleEditCampaignBody, zGoogleEditCampaignPath, zGoogleEditCampaignResponse, zGoogleEnableAdBody, zGoogleEnableAdGroupBody, zGoogleEnableAdGroupPath, zGoogleEnableAdGroupResponse, zGoogleEnableAdPath, zGoogleEnableAdResponse, zGoogleEnableCampaignBody, zGoogleEnableCampaignPath, zGoogleEnableCampaignResponse, zGoogleEnableKeywordBody, zGoogleEnableKeywordPath, zGoogleEnableKeywordResponse, zGoogleGetAccountPath, zGoogleGetAccountResponse, zGoogleGetAdGroupPath, zGoogleGetAdGroupResponse, zGoogleGetAdPath, zGoogleGetAdResponse, zGoogleGetCampaignPath, zGoogleGetCampaignResponse, zGoogleGetConversionActionPath, zGoogleGetConversionActionResponse, zGoogleGetInsightsBody, zGoogleGetInsightsPath, zGoogleGetInsightsResponse, zGoogleGetKeywordPath, zGoogleGetKeywordResponse, zGoogleListAdGroupsPath, zGoogleListAdGroupsResponse, zGoogleListAdsPath, zGoogleListAdsResponse, zGoogleListCampaignsPath, zGoogleListCampaignsResponse, zGoogleListConversionActionsPath, zGoogleListConversionActionsResponse, zGoogleListConversionGoalsPath, zGoogleListConversionGoalsResponse, zGoogleListKeywordsPath, zGoogleListKeywordsResponse, zGooglePauseAdBody, zGooglePauseAdGroupBody, zGooglePauseAdGroupPath, zGooglePauseAdGroupResponse, zGooglePauseAdPath, zGooglePauseAdResponse, zGooglePauseCampaignBody, zGooglePauseCampaignPath, zGooglePauseCampaignResponse, zGooglePauseKeywordBody, zGooglePauseKeywordPath, zGooglePauseKeywordResponse, zGoogleRunGaqlBody, zGoogleRunGaqlPath, zGoogleRunGaqlResponse, zGoogleSetAdGroupBidsBody, zGoogleSetAdGroupBidsPath, zGoogleSetAdGroupBidsResponse, zGoogleSetConversionGoalBody, zGoogleSetConversionGoalPath, zGoogleSetConversionGoalResponse, zGoogleSetKeywordBidBody, zGoogleSetKeywordBidPath, zGoogleSetKeywordBidResponse, zGoogleUploadConversionsBody, zGoogleUploadConversionsPath, zGoogleUploadConversionsResponse, zGoogleUploadImageAssetBody, zGoogleUploadImageAssetPath, zGoogleUploadImageAssetResponse, zLogsGetPath, zLogsGetResponse, zLogsListQuery, zLogsListResponse, zMedia, zMediaCreateBody, zMediaCreateResponse, zMediaDeletePath, zMediaDeleteResponse, zMediaGetPath, zMediaGetResponse, zMediaKind, zMediaListQuery, zMediaListResponse, zMediaStage, zMediaStatus, zMediaUpdateBody, zMediaUpdatePath, zMediaUpdateResponse, zMetaAccountPath, zMetaAccountResponse, zMetaAdPath, zMetaAdResponse, zMetaAdsPath, zMetaAdsResponse, zMetaAdsetPath, zMetaAdsetResponse, zMetaAdsetsPath, zMetaAdsetsResponse, zMetaCampaignPath, zMetaCampaignResponse, zMetaCampaignsPath, zMetaCampaignsResponse, zMetaInsightsPath, zMetaInsightsQuery, zMetaInsightsResponse, zPost, zPostPlatform, zPostStatus, zPostType, zPostVariant, zPostVariantInput, zPostVariantStatus, zPostsCreateBody, zPostsCreateResponse, zPostsDeletePath, zPostsDeleteResponse, zPostsGetPath, zPostsGetResponse, zPostsListQuery, zPostsListResponse, zPostsUpdateBody, zPostsUpdatePath, zPostsUpdateResponse, zPostsValidateBody, zPostsValidateResponse, zProfile, zProfilesCreateBody, zProfilesCreateResponse, zProfilesDeletePath, zProfilesDeleteResponse, zProfilesGetPath, zProfilesGetResponse, zProfilesListQuery, zProfilesListResponse, zProfilesUpdateBody, zProfilesUpdatePath, zProfilesUpdateResponse, zTikTokCreatorInfo, zTikTokPrivacyLevel, zTiktokCreatorInfoPath, zTiktokCreatorInfoResponse, zTokensMintBody, zTokensMintResponse, zWebhooksCreateEndpointBody, zWebhooksCreateEndpointResponse, zWebhooksCreatePortalResponse, zWebhooksDeleteEndpointPath, zWebhooksDeleteEndpointResponse, zWebhooksGetEndpointPath, zWebhooksGetEndpointResponse, zWebhooksListEndpointsQuery, zWebhooksListEndpointsResponse, zWebhooksListEventTypesResponse, zWebhooksPingBody, zWebhooksPingResponse, zWebhooksUpdateEndpointBody, zWebhooksUpdateEndpointPath, zWebhooksUpdateEndpointResponse };
3237
+ //# sourceMappingURL=chunk-WKKPLEFG.js.map
3238
+ //# sourceMappingURL=chunk-WKKPLEFG.js.map