@postrun/js 1.2.0 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/server.cjs CHANGED
@@ -811,11 +811,12 @@ var zErrorCode = z__namespace.enum([
811
811
  "account_not_available",
812
812
  "connection_reauth_required",
813
813
  "connection_not_pending",
814
- "connection_in_use",
815
814
  "not_implemented",
816
815
  "connection_discovery_failed",
817
816
  "media_processing",
818
817
  "not_publishable",
818
+ "invalid_connection",
819
+ "invalid_media",
819
820
  "profile_scope_invalid",
820
821
  "media_unprobeable",
821
822
  "media_too_large",
@@ -856,6 +857,7 @@ var zErrorCode = z__namespace.enum([
856
857
  "media_failed",
857
858
  "media_unsupported",
858
859
  "media_kind_mismatch",
860
+ "variant_unparseable",
859
861
  "publishing_unavailable",
860
862
  "x_duplicate_content",
861
863
  "x_not_authorized",
@@ -885,7 +887,8 @@ var zErrorCode = z__namespace.enum([
885
887
  "tiktok_not_authorized",
886
888
  "tiktok_rate_limited",
887
889
  "tiktok_publish_failed",
888
- "connection_platform_mismatch"
890
+ "connection_platform_mismatch",
891
+ "connection_removed"
889
892
  ]);
890
893
  z__namespace.object({
891
894
  limit: z__namespace.int().gte(1).lte(100).optional().default(20),
@@ -1927,7 +1930,7 @@ z__namespace.object({
1927
1930
  variants: z__namespace.array(z__namespace.object({
1928
1931
  id: z__namespace.string(),
1929
1932
  object: z__namespace.literal("post_variant"),
1930
- connection_id: z__namespace.string(),
1933
+ connection_id: z__namespace.string().nullable(),
1931
1934
  platform: z__namespace.enum([
1932
1935
  "x",
1933
1936
  "linkedin",
@@ -2206,7 +2209,7 @@ z__namespace.object({
2206
2209
  variants: z__namespace.array(z__namespace.object({
2207
2210
  id: z__namespace.string(),
2208
2211
  object: z__namespace.literal("post_variant"),
2209
- connection_id: z__namespace.string(),
2212
+ connection_id: z__namespace.string().nullable(),
2210
2213
  platform: z__namespace.enum([
2211
2214
  "x",
2212
2215
  "linkedin",
@@ -2288,7 +2291,7 @@ z__namespace.object({
2288
2291
  variants: z__namespace.array(z__namespace.object({
2289
2292
  id: z__namespace.string(),
2290
2293
  object: z__namespace.literal("post_variant"),
2291
- connection_id: z__namespace.string(),
2294
+ connection_id: z__namespace.string().nullable(),
2292
2295
  platform: z__namespace.enum([
2293
2296
  "x",
2294
2297
  "linkedin",
@@ -2564,7 +2567,7 @@ z__namespace.object({
2564
2567
  variants: z__namespace.array(z__namespace.object({
2565
2568
  id: z__namespace.string(),
2566
2569
  object: z__namespace.literal("post_variant"),
2567
- connection_id: z__namespace.string(),
2570
+ connection_id: z__namespace.string().nullable(),
2568
2571
  platform: z__namespace.enum([
2569
2572
  "x",
2570
2573
  "linkedin",
@@ -2611,6 +2614,301 @@ z__namespace.object({
2611
2614
  dry_run: z__namespace.boolean(),
2612
2615
  executed: z__namespace.boolean()
2613
2616
  });
2617
+ z__namespace.object({
2618
+ profile_id: z__namespace.string(),
2619
+ variants: z__namespace.array(z__namespace.union([
2620
+ z__namespace.object({
2621
+ platform: z__namespace.literal("x"),
2622
+ post_type: z__namespace.enum([
2623
+ "text",
2624
+ "single_image",
2625
+ "multi_image",
2626
+ "video"
2627
+ ]),
2628
+ connection_id: z__namespace.string(),
2629
+ body: z__namespace.string().optional(),
2630
+ media: z__namespace.array(z__namespace.object({
2631
+ media_id: z__namespace.string(),
2632
+ crop_box: z__namespace.record(z__namespace.string(), z__namespace.unknown()).nullish(),
2633
+ alt_text_override: z__namespace.string().nullish()
2634
+ })).optional().default([]),
2635
+ settings: z__namespace.object({
2636
+ reply_settings: z__namespace.enum([
2637
+ "everyone",
2638
+ "following",
2639
+ "mentionedUsers",
2640
+ "subscribers",
2641
+ "verified"
2642
+ ]).optional(),
2643
+ quote_tweet_id: z__namespace.string().regex(/^[0-9]{1,19}$/).optional(),
2644
+ poll: z__namespace.object({
2645
+ options: z__namespace.array(z__namespace.string().min(1).max(25)).min(2).max(4),
2646
+ duration_minutes: z__namespace.int().gte(5).lte(10080),
2647
+ reply_settings: z__namespace.enum([
2648
+ "following",
2649
+ "mentionedUsers",
2650
+ "subscribers",
2651
+ "verified"
2652
+ ]).optional()
2653
+ }).optional(),
2654
+ reply: z__namespace.object({
2655
+ in_reply_to_tweet_id: z__namespace.string().regex(/^[0-9]{1,19}$/),
2656
+ exclude_reply_user_ids: z__namespace.array(z__namespace.string().regex(/^[0-9]{1,19}$/)).optional(),
2657
+ auto_populate_reply_metadata: z__namespace.boolean().optional()
2658
+ }).optional(),
2659
+ community_id: z__namespace.string().regex(/^[0-9]{1,19}$/).optional(),
2660
+ for_super_followers_only: z__namespace.boolean().optional(),
2661
+ geo: z__namespace.object({
2662
+ place_id: z__namespace.string()
2663
+ }).optional(),
2664
+ card_uri: z__namespace.string().optional(),
2665
+ media_tagged_user_ids: z__namespace.array(z__namespace.string().regex(/^[0-9]{1,19}$/)).max(10).optional()
2666
+ }).optional().default({})
2667
+ }),
2668
+ z__namespace.object({
2669
+ platform: z__namespace.literal("linkedin"),
2670
+ post_type: z__namespace.enum([
2671
+ "text",
2672
+ "single_image",
2673
+ "multi_image",
2674
+ "video"
2675
+ ]),
2676
+ connection_id: z__namespace.string(),
2677
+ body: z__namespace.string().optional(),
2678
+ media: z__namespace.array(z__namespace.object({
2679
+ media_id: z__namespace.string(),
2680
+ crop_box: z__namespace.record(z__namespace.string(), z__namespace.unknown()).nullish(),
2681
+ alt_text_override: z__namespace.string().nullish()
2682
+ })).optional().default([]),
2683
+ settings: z__namespace.object({
2684
+ visibility: z__namespace.enum(["PUBLIC", "CONNECTIONS"]),
2685
+ content_kind: z__namespace.enum([
2686
+ "text",
2687
+ "single_image",
2688
+ "video",
2689
+ "multi_image",
2690
+ "document",
2691
+ "article",
2692
+ "poll"
2693
+ ]),
2694
+ article: z__namespace.object({
2695
+ source: z__namespace.url(),
2696
+ title: z__namespace.string().max(400).optional(),
2697
+ description: z__namespace.string().max(4086).optional(),
2698
+ thumbnail_media_id: z__namespace.string().optional()
2699
+ }).optional(),
2700
+ poll: z__namespace.object({
2701
+ question: z__namespace.string().min(1).max(140),
2702
+ options: z__namespace.array(z__namespace.string().min(1).max(30)).min(2).max(4),
2703
+ duration: z__namespace.enum([
2704
+ "ONE_DAY",
2705
+ "THREE_DAYS",
2706
+ "SEVEN_DAYS",
2707
+ "FOURTEEN_DAYS"
2708
+ ])
2709
+ }).optional(),
2710
+ document: z__namespace.object({
2711
+ title: z__namespace.string().min(1).max(400)
2712
+ }).optional(),
2713
+ disable_reshare: z__namespace.boolean().optional(),
2714
+ mentions: z__namespace.array(z__namespace.object({
2715
+ type: z__namespace.enum(["person", "organization"]),
2716
+ name: z__namespace.string().min(1),
2717
+ urn: z__namespace.string().regex(/^urn:li:(person|organization):/)
2718
+ })).optional()
2719
+ })
2720
+ }),
2721
+ z__namespace.object({
2722
+ platform: z__namespace.literal("instagram"),
2723
+ post_type: z__namespace.enum([
2724
+ "single_image",
2725
+ "carousel",
2726
+ "reel"
2727
+ ]),
2728
+ connection_id: z__namespace.string(),
2729
+ body: z__namespace.string().optional(),
2730
+ media: z__namespace.array(z__namespace.object({
2731
+ media_id: z__namespace.string(),
2732
+ crop_box: z__namespace.record(z__namespace.string(), z__namespace.unknown()).nullish(),
2733
+ alt_text_override: z__namespace.string().nullish()
2734
+ })).optional().default([]),
2735
+ settings: z__namespace.object({
2736
+ media_type: z__namespace.enum([
2737
+ "IMAGE",
2738
+ "CAROUSEL",
2739
+ "REELS"
2740
+ ]).optional(),
2741
+ location_id: z__namespace.string().optional(),
2742
+ user_tags: z__namespace.array(z__namespace.object({
2743
+ username: z__namespace.string().min(1),
2744
+ x: z__namespace.number().gte(0).lte(1),
2745
+ y: z__namespace.number().gte(0).lte(1)
2746
+ })).optional(),
2747
+ collaborators: z__namespace.array(z__namespace.string().min(1)).max(3).optional(),
2748
+ share_to_feed: z__namespace.boolean().optional(),
2749
+ thumb_offset: z__namespace.int().gte(0).lte(9007199254740991).optional(),
2750
+ cover_url: z__namespace.url().optional(),
2751
+ audio_name: z__namespace.string().optional()
2752
+ })
2753
+ }),
2754
+ z__namespace.object({
2755
+ platform: z__namespace.literal("facebook_page"),
2756
+ post_type: z__namespace.enum([
2757
+ "text",
2758
+ "single_image",
2759
+ "multi_image",
2760
+ "reel"
2761
+ ]),
2762
+ connection_id: z__namespace.string(),
2763
+ body: z__namespace.string().optional(),
2764
+ media: z__namespace.array(z__namespace.object({
2765
+ media_id: z__namespace.string(),
2766
+ crop_box: z__namespace.record(z__namespace.string(), z__namespace.unknown()).nullish(),
2767
+ alt_text_override: z__namespace.string().nullish()
2768
+ })).optional().default([]),
2769
+ settings: z__namespace.object({
2770
+ link: z__namespace.url().optional()
2771
+ }).optional().default({})
2772
+ }),
2773
+ z__namespace.object({
2774
+ platform: z__namespace.literal("tiktok"),
2775
+ post_type: z__namespace.enum([
2776
+ "video",
2777
+ "single_image",
2778
+ "carousel"
2779
+ ]),
2780
+ connection_id: z__namespace.string(),
2781
+ body: z__namespace.string().optional(),
2782
+ media: z__namespace.array(z__namespace.object({
2783
+ media_id: z__namespace.string(),
2784
+ crop_box: z__namespace.record(z__namespace.string(), z__namespace.unknown()).nullish(),
2785
+ alt_text_override: z__namespace.string().nullish()
2786
+ })).optional().default([]),
2787
+ settings: z__namespace.object({
2788
+ privacy_level: z__namespace.enum([
2789
+ "PUBLIC_TO_EVERYONE",
2790
+ "MUTUAL_FOLLOW_FRIENDS",
2791
+ "FOLLOWER_OF_CREATOR",
2792
+ "SELF_ONLY"
2793
+ ]).optional(),
2794
+ disable_comment: z__namespace.boolean().optional(),
2795
+ disable_duet: z__namespace.boolean().optional(),
2796
+ disable_stitch: z__namespace.boolean().optional(),
2797
+ video_cover_timestamp_ms: z__namespace.int().gte(0).lte(9007199254740991).optional(),
2798
+ photo_cover_index: z__namespace.int().gte(0).lte(9007199254740991).optional(),
2799
+ auto_add_music: z__namespace.boolean().optional(),
2800
+ brand_content_toggle: z__namespace.boolean().optional(),
2801
+ brand_organic_toggle: z__namespace.boolean().optional(),
2802
+ is_aigc: z__namespace.boolean().optional()
2803
+ }).optional().default({})
2804
+ })
2805
+ ])).min(1)
2806
+ });
2807
+ z__namespace.object({
2808
+ object: z__namespace.literal("validation"),
2809
+ publishable: z__namespace.boolean(),
2810
+ issues: z__namespace.array(z__namespace.object({
2811
+ code: z__namespace.enum([
2812
+ "unauthorized",
2813
+ "forbidden",
2814
+ "not_found",
2815
+ "conflict",
2816
+ "validation_failed",
2817
+ "rate_limited",
2818
+ "internal_error",
2819
+ "idempotency_key_invalid",
2820
+ "idempotency_key_reused",
2821
+ "idempotency_request_in_progress",
2822
+ "account_not_available",
2823
+ "connection_reauth_required",
2824
+ "connection_not_pending",
2825
+ "not_implemented",
2826
+ "connection_discovery_failed",
2827
+ "media_processing",
2828
+ "not_publishable",
2829
+ "invalid_connection",
2830
+ "invalid_media",
2831
+ "profile_scope_invalid",
2832
+ "media_unprobeable",
2833
+ "media_too_large",
2834
+ "media_aspect_ratio_unsupported",
2835
+ "media_resolution_too_low",
2836
+ "media_gif_unsupported",
2837
+ "media_format_recompressed",
2838
+ "media_resolution_downscaled",
2839
+ "video_container_unsupported",
2840
+ "video_codec_unsupported",
2841
+ "video_audio_codec_unsupported",
2842
+ "video_too_large",
2843
+ "video_too_small",
2844
+ "video_dimensions_unsupported",
2845
+ "video_dimensions_too_large",
2846
+ "video_fps_unsupported",
2847
+ "video_fps_too_low",
2848
+ "video_aspect_unsupported",
2849
+ "video_duration_too_short",
2850
+ "video_duration_exceeds_max",
2851
+ "video_transform_failed",
2852
+ "media_fetch_failed",
2853
+ "document_format_unsupported",
2854
+ "document_too_large",
2855
+ "document_too_many_pages",
2856
+ "media_format_indeterminate",
2857
+ "media_count_invalid",
2858
+ "body_too_long",
2859
+ "content_missing",
2860
+ "content_conflict",
2861
+ "content_incomplete",
2862
+ "content_kind_mismatch",
2863
+ "media_type_mismatch",
2864
+ "tag_limit_exceeded",
2865
+ "reel_field_on_non_reel",
2866
+ "field_placement_invalid",
2867
+ "media_not_ready",
2868
+ "media_failed",
2869
+ "media_unsupported",
2870
+ "media_kind_mismatch",
2871
+ "variant_unparseable",
2872
+ "publishing_unavailable",
2873
+ "x_duplicate_content",
2874
+ "x_not_authorized",
2875
+ "x_rate_limited",
2876
+ "x_publish_failed",
2877
+ "x_media_upload_failed",
2878
+ "linkedin_duplicate_content",
2879
+ "linkedin_auth_expired",
2880
+ "linkedin_permission_denied",
2881
+ "linkedin_media_processing",
2882
+ "linkedin_media_upload_failed",
2883
+ "linkedin_publish_failed",
2884
+ "instagram_media_processing",
2885
+ "instagram_container_expired",
2886
+ "instagram_container_failed",
2887
+ "instagram_rate_limited",
2888
+ "instagram_not_authorized",
2889
+ "instagram_publish_failed",
2890
+ "facebook_reel_processing",
2891
+ "facebook_reel_failed",
2892
+ "facebook_rate_limited",
2893
+ "facebook_not_authorized",
2894
+ "facebook_publish_failed",
2895
+ "tiktok_privacy_not_allowed",
2896
+ "tiktok_duration_exceeds_max",
2897
+ "tiktok_media_processing",
2898
+ "tiktok_not_authorized",
2899
+ "tiktok_rate_limited",
2900
+ "tiktok_publish_failed",
2901
+ "connection_platform_mismatch",
2902
+ "connection_removed"
2903
+ ]),
2904
+ message: z__namespace.string(),
2905
+ hint: z__namespace.string().optional(),
2906
+ allowed: z__namespace.array(z__namespace.string()).optional(),
2907
+ got: z__namespace.string().optional(),
2908
+ variant_index: z__namespace.int().gte(-9007199254740991).lte(9007199254740991),
2909
+ path: z__namespace.array(z__namespace.union([z__namespace.string(), z__namespace.number()]))
2910
+ }))
2911
+ });
2614
2912
  z__namespace.object({
2615
2913
  connection_id: z__namespace.string()
2616
2914
  });