@postrun/react 2.2.1 → 2.4.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/index.d.cts CHANGED
@@ -2,8 +2,8 @@ import * as react from 'react';
2
2
  import { ReactNode, CSSProperties } from 'react';
3
3
  import * as _tanstack_react_query from '@tanstack/react-query';
4
4
  import { QueryClient, QueryKey } from '@tanstack/react-query';
5
- import { PostrunClient, ListProfilesQuery, DiscoverableAccountList, Connection, ConnectionKind, ConnectionStatus, ListMediaQuery, ListPostsQuery, ConnectablePlatform, MediaResource, MediaTarget, MediaKind, Metadata, ComposePostInput, PostValidation, XPostVariant, LinkedInPostVariant } from '@postrun/js';
6
- export { PostValidation, PostVariant, PostVariantError, TikTokCreatorInfo, ValidationIssue } from '@postrun/js';
5
+ import { PostrunClient, ListProfilesQuery, DiscoverableAccountList, Connection, ConnectionKind, ConnectionStatus, ListMediaQuery, ListPostsQuery, ConnectablePlatform, MediaResource, MediaTarget, Metadata, ComposePostInput, PostValidation, MediaKind, XPostVariant, LinkedInPostVariant, TikTokPostVariant, TikTokCreatorInfo, TikTokOptionsValue } from '@postrun/js';
6
+ export { PostValidation, PostVariant, PostVariantError, TIKTOK_CAPTION_MAX, TikTokCreatorInfo, ValidationIssue, captionMaxFor } from '@postrun/js';
7
7
  import { TwitterComponents } from 'react-tweet';
8
8
 
9
9
  /**
@@ -601,14 +601,6 @@ interface MediaUploadOptions {
601
601
  profileId: string;
602
602
  /** Platforms to validate + render for (omit to add later via useUpdateMedia). */
603
603
  targets?: MediaTarget[];
604
- /** Optional override — omit and the API auto-detects the kind from the bytes. */
605
- kind?: MediaKind;
606
- /**
607
- * Optional override — omit and the API auto-detects the MIME from the bytes.
608
- * Still useful for a legacy Office binary (.doc/.ppt) whose magic bytes can't be
609
- * disambiguated by the server sniff.
610
- */
611
- contentType?: string;
612
604
  /** Store as-is with zero processing. */
613
605
  raw?: boolean;
614
606
  altText?: string;
@@ -683,11 +675,12 @@ declare function useMedia(id: string): _tanstack_react_query.UseQueryResult<NoIn
683
675
  };
684
676
  raw: boolean;
685
677
  error: {
686
- code: "media_unprobeable" | "media_format_indeterminate" | "media_too_large" | "media_aspect_ratio_unsupported" | "media_resolution_too_low" | "media_gif_unsupported" | "media_format_recompressed" | "media_resolution_downscaled" | "video_container_unsupported" | "video_codec_unsupported" | "video_audio_codec_unsupported" | "video_too_large" | "video_too_small" | "video_dimensions_unsupported" | "video_dimensions_too_large" | "video_fps_unsupported" | "video_fps_too_low" | "video_aspect_unsupported" | "video_duration_too_short" | "video_duration_exceeds_max" | "video_transform_failed" | "media_fetch_failed" | "document_format_unsupported" | "document_too_large" | "document_too_many_pages" | "media_unsupported";
678
+ code: "media_unprobeable" | "media_format_indeterminate" | "media_format_unsupported" | "media_too_large" | "media_aspect_ratio_unsupported" | "media_resolution_too_low" | "media_gif_unsupported" | "media_format_recompressed" | "media_resolution_downscaled" | "video_container_unsupported" | "video_codec_unsupported" | "video_audio_codec_unsupported" | "video_too_large" | "video_too_small" | "video_dimensions_unsupported" | "video_dimensions_too_large" | "video_fps_unsupported" | "video_fps_too_low" | "video_aspect_unsupported" | "video_duration_too_short" | "video_duration_exceeds_max" | "video_transform_failed" | "media_fetch_failed" | "document_format_unsupported" | "document_too_large" | "document_too_many_pages" | "media_unsupported";
687
679
  message: string;
688
680
  hint?: string;
689
681
  allowed?: Array<string>;
690
682
  got?: string;
683
+ display_error: string;
691
684
  } | null;
692
685
  source: {
693
686
  format: string;
@@ -705,18 +698,20 @@ declare function useMedia(id: string): _tanstack_react_query.UseQueryResult<NoIn
705
698
  height: number | null;
706
699
  bytes: number | null;
707
700
  warnings: Array<{
708
- code: "media_unprobeable" | "media_format_indeterminate" | "media_too_large" | "media_aspect_ratio_unsupported" | "media_resolution_too_low" | "media_gif_unsupported" | "media_format_recompressed" | "media_resolution_downscaled" | "video_container_unsupported" | "video_codec_unsupported" | "video_audio_codec_unsupported" | "video_too_large" | "video_too_small" | "video_dimensions_unsupported" | "video_dimensions_too_large" | "video_fps_unsupported" | "video_fps_too_low" | "video_aspect_unsupported" | "video_duration_too_short" | "video_duration_exceeds_max" | "video_transform_failed" | "media_fetch_failed" | "document_format_unsupported" | "document_too_large" | "document_too_many_pages" | "media_unsupported";
701
+ code: "media_unprobeable" | "media_format_indeterminate" | "media_format_unsupported" | "media_too_large" | "media_aspect_ratio_unsupported" | "media_resolution_too_low" | "media_gif_unsupported" | "media_format_recompressed" | "media_resolution_downscaled" | "video_container_unsupported" | "video_codec_unsupported" | "video_audio_codec_unsupported" | "video_too_large" | "video_too_small" | "video_dimensions_unsupported" | "video_dimensions_too_large" | "video_fps_unsupported" | "video_fps_too_low" | "video_aspect_unsupported" | "video_duration_too_short" | "video_duration_exceeds_max" | "video_transform_failed" | "media_fetch_failed" | "document_format_unsupported" | "document_too_large" | "document_too_many_pages" | "media_unsupported";
709
702
  message: string;
710
703
  hint?: string;
711
704
  allowed?: Array<string>;
712
705
  got?: string;
706
+ display_error: string;
713
707
  }>;
714
708
  errors: Array<{
715
- code: "media_unprobeable" | "media_format_indeterminate" | "media_too_large" | "media_aspect_ratio_unsupported" | "media_resolution_too_low" | "media_gif_unsupported" | "media_format_recompressed" | "media_resolution_downscaled" | "video_container_unsupported" | "video_codec_unsupported" | "video_audio_codec_unsupported" | "video_too_large" | "video_too_small" | "video_dimensions_unsupported" | "video_dimensions_too_large" | "video_fps_unsupported" | "video_fps_too_low" | "video_aspect_unsupported" | "video_duration_too_short" | "video_duration_exceeds_max" | "video_transform_failed" | "media_fetch_failed" | "document_format_unsupported" | "document_too_large" | "document_too_many_pages" | "media_unsupported";
709
+ code: "media_unprobeable" | "media_format_indeterminate" | "media_format_unsupported" | "media_too_large" | "media_aspect_ratio_unsupported" | "media_resolution_too_low" | "media_gif_unsupported" | "media_format_recompressed" | "media_resolution_downscaled" | "video_container_unsupported" | "video_codec_unsupported" | "video_audio_codec_unsupported" | "video_too_large" | "video_too_small" | "video_dimensions_unsupported" | "video_dimensions_too_large" | "video_fps_unsupported" | "video_fps_too_low" | "video_aspect_unsupported" | "video_duration_too_short" | "video_duration_exceeds_max" | "video_transform_failed" | "media_fetch_failed" | "document_format_unsupported" | "document_too_large" | "document_too_many_pages" | "media_unsupported";
716
710
  message: string;
717
711
  hint?: string;
718
712
  allowed?: Array<string>;
719
713
  got?: string;
714
+ display_error: string;
720
715
  }>;
721
716
  };
722
717
  };
@@ -748,11 +743,12 @@ declare function useMediaList(query?: ListMediaQuery): _tanstack_react_query.Use
748
743
  };
749
744
  raw: boolean;
750
745
  error: {
751
- code: "media_unprobeable" | "media_format_indeterminate" | "media_too_large" | "media_aspect_ratio_unsupported" | "media_resolution_too_low" | "media_gif_unsupported" | "media_format_recompressed" | "media_resolution_downscaled" | "video_container_unsupported" | "video_codec_unsupported" | "video_audio_codec_unsupported" | "video_too_large" | "video_too_small" | "video_dimensions_unsupported" | "video_dimensions_too_large" | "video_fps_unsupported" | "video_fps_too_low" | "video_aspect_unsupported" | "video_duration_too_short" | "video_duration_exceeds_max" | "video_transform_failed" | "media_fetch_failed" | "document_format_unsupported" | "document_too_large" | "document_too_many_pages" | "media_unsupported";
746
+ code: "media_unprobeable" | "media_format_indeterminate" | "media_format_unsupported" | "media_too_large" | "media_aspect_ratio_unsupported" | "media_resolution_too_low" | "media_gif_unsupported" | "media_format_recompressed" | "media_resolution_downscaled" | "video_container_unsupported" | "video_codec_unsupported" | "video_audio_codec_unsupported" | "video_too_large" | "video_too_small" | "video_dimensions_unsupported" | "video_dimensions_too_large" | "video_fps_unsupported" | "video_fps_too_low" | "video_aspect_unsupported" | "video_duration_too_short" | "video_duration_exceeds_max" | "video_transform_failed" | "media_fetch_failed" | "document_format_unsupported" | "document_too_large" | "document_too_many_pages" | "media_unsupported";
752
747
  message: string;
753
748
  hint?: string;
754
749
  allowed?: Array<string>;
755
750
  got?: string;
751
+ display_error: string;
756
752
  } | null;
757
753
  source: {
758
754
  format: string;
@@ -770,18 +766,20 @@ declare function useMediaList(query?: ListMediaQuery): _tanstack_react_query.Use
770
766
  height: number | null;
771
767
  bytes: number | null;
772
768
  warnings: Array<{
773
- code: "media_unprobeable" | "media_format_indeterminate" | "media_too_large" | "media_aspect_ratio_unsupported" | "media_resolution_too_low" | "media_gif_unsupported" | "media_format_recompressed" | "media_resolution_downscaled" | "video_container_unsupported" | "video_codec_unsupported" | "video_audio_codec_unsupported" | "video_too_large" | "video_too_small" | "video_dimensions_unsupported" | "video_dimensions_too_large" | "video_fps_unsupported" | "video_fps_too_low" | "video_aspect_unsupported" | "video_duration_too_short" | "video_duration_exceeds_max" | "video_transform_failed" | "media_fetch_failed" | "document_format_unsupported" | "document_too_large" | "document_too_many_pages" | "media_unsupported";
769
+ code: "media_unprobeable" | "media_format_indeterminate" | "media_format_unsupported" | "media_too_large" | "media_aspect_ratio_unsupported" | "media_resolution_too_low" | "media_gif_unsupported" | "media_format_recompressed" | "media_resolution_downscaled" | "video_container_unsupported" | "video_codec_unsupported" | "video_audio_codec_unsupported" | "video_too_large" | "video_too_small" | "video_dimensions_unsupported" | "video_dimensions_too_large" | "video_fps_unsupported" | "video_fps_too_low" | "video_aspect_unsupported" | "video_duration_too_short" | "video_duration_exceeds_max" | "video_transform_failed" | "media_fetch_failed" | "document_format_unsupported" | "document_too_large" | "document_too_many_pages" | "media_unsupported";
774
770
  message: string;
775
771
  hint?: string;
776
772
  allowed?: Array<string>;
777
773
  got?: string;
774
+ display_error: string;
778
775
  }>;
779
776
  errors: Array<{
780
- code: "media_unprobeable" | "media_format_indeterminate" | "media_too_large" | "media_aspect_ratio_unsupported" | "media_resolution_too_low" | "media_gif_unsupported" | "media_format_recompressed" | "media_resolution_downscaled" | "video_container_unsupported" | "video_codec_unsupported" | "video_audio_codec_unsupported" | "video_too_large" | "video_too_small" | "video_dimensions_unsupported" | "video_dimensions_too_large" | "video_fps_unsupported" | "video_fps_too_low" | "video_aspect_unsupported" | "video_duration_too_short" | "video_duration_exceeds_max" | "video_transform_failed" | "media_fetch_failed" | "document_format_unsupported" | "document_too_large" | "document_too_many_pages" | "media_unsupported";
777
+ code: "media_unprobeable" | "media_format_indeterminate" | "media_format_unsupported" | "media_too_large" | "media_aspect_ratio_unsupported" | "media_resolution_too_low" | "media_gif_unsupported" | "media_format_recompressed" | "media_resolution_downscaled" | "video_container_unsupported" | "video_codec_unsupported" | "video_audio_codec_unsupported" | "video_too_large" | "video_too_small" | "video_dimensions_unsupported" | "video_dimensions_too_large" | "video_fps_unsupported" | "video_fps_too_low" | "video_aspect_unsupported" | "video_duration_too_short" | "video_duration_exceeds_max" | "video_transform_failed" | "media_fetch_failed" | "document_format_unsupported" | "document_too_large" | "document_too_many_pages" | "media_unsupported";
781
778
  message: string;
782
779
  hint?: string;
783
780
  allowed?: Array<string>;
784
781
  got?: string;
782
+ display_error: string;
785
783
  }>;
786
784
  };
787
785
  };
@@ -817,11 +815,12 @@ declare function useMediaInfinite(filters?: Omit<ListMediaQuery, 'limit' | 'offs
817
815
  };
818
816
  raw: boolean;
819
817
  error: {
820
- code: "media_unprobeable" | "media_format_indeterminate" | "media_too_large" | "media_aspect_ratio_unsupported" | "media_resolution_too_low" | "media_gif_unsupported" | "media_format_recompressed" | "media_resolution_downscaled" | "video_container_unsupported" | "video_codec_unsupported" | "video_audio_codec_unsupported" | "video_too_large" | "video_too_small" | "video_dimensions_unsupported" | "video_dimensions_too_large" | "video_fps_unsupported" | "video_fps_too_low" | "video_aspect_unsupported" | "video_duration_too_short" | "video_duration_exceeds_max" | "video_transform_failed" | "media_fetch_failed" | "document_format_unsupported" | "document_too_large" | "document_too_many_pages" | "media_unsupported";
818
+ code: "media_unprobeable" | "media_format_indeterminate" | "media_format_unsupported" | "media_too_large" | "media_aspect_ratio_unsupported" | "media_resolution_too_low" | "media_gif_unsupported" | "media_format_recompressed" | "media_resolution_downscaled" | "video_container_unsupported" | "video_codec_unsupported" | "video_audio_codec_unsupported" | "video_too_large" | "video_too_small" | "video_dimensions_unsupported" | "video_dimensions_too_large" | "video_fps_unsupported" | "video_fps_too_low" | "video_aspect_unsupported" | "video_duration_too_short" | "video_duration_exceeds_max" | "video_transform_failed" | "media_fetch_failed" | "document_format_unsupported" | "document_too_large" | "document_too_many_pages" | "media_unsupported";
821
819
  message: string;
822
820
  hint?: string;
823
821
  allowed?: Array<string>;
824
822
  got?: string;
823
+ display_error: string;
825
824
  } | null;
826
825
  source: {
827
826
  format: string;
@@ -839,18 +838,20 @@ declare function useMediaInfinite(filters?: Omit<ListMediaQuery, 'limit' | 'offs
839
838
  height: number | null;
840
839
  bytes: number | null;
841
840
  warnings: Array<{
842
- code: "media_unprobeable" | "media_format_indeterminate" | "media_too_large" | "media_aspect_ratio_unsupported" | "media_resolution_too_low" | "media_gif_unsupported" | "media_format_recompressed" | "media_resolution_downscaled" | "video_container_unsupported" | "video_codec_unsupported" | "video_audio_codec_unsupported" | "video_too_large" | "video_too_small" | "video_dimensions_unsupported" | "video_dimensions_too_large" | "video_fps_unsupported" | "video_fps_too_low" | "video_aspect_unsupported" | "video_duration_too_short" | "video_duration_exceeds_max" | "video_transform_failed" | "media_fetch_failed" | "document_format_unsupported" | "document_too_large" | "document_too_many_pages" | "media_unsupported";
841
+ code: "media_unprobeable" | "media_format_indeterminate" | "media_format_unsupported" | "media_too_large" | "media_aspect_ratio_unsupported" | "media_resolution_too_low" | "media_gif_unsupported" | "media_format_recompressed" | "media_resolution_downscaled" | "video_container_unsupported" | "video_codec_unsupported" | "video_audio_codec_unsupported" | "video_too_large" | "video_too_small" | "video_dimensions_unsupported" | "video_dimensions_too_large" | "video_fps_unsupported" | "video_fps_too_low" | "video_aspect_unsupported" | "video_duration_too_short" | "video_duration_exceeds_max" | "video_transform_failed" | "media_fetch_failed" | "document_format_unsupported" | "document_too_large" | "document_too_many_pages" | "media_unsupported";
843
842
  message: string;
844
843
  hint?: string;
845
844
  allowed?: Array<string>;
846
845
  got?: string;
846
+ display_error: string;
847
847
  }>;
848
848
  errors: Array<{
849
- code: "media_unprobeable" | "media_format_indeterminate" | "media_too_large" | "media_aspect_ratio_unsupported" | "media_resolution_too_low" | "media_gif_unsupported" | "media_format_recompressed" | "media_resolution_downscaled" | "video_container_unsupported" | "video_codec_unsupported" | "video_audio_codec_unsupported" | "video_too_large" | "video_too_small" | "video_dimensions_unsupported" | "video_dimensions_too_large" | "video_fps_unsupported" | "video_fps_too_low" | "video_aspect_unsupported" | "video_duration_too_short" | "video_duration_exceeds_max" | "video_transform_failed" | "media_fetch_failed" | "document_format_unsupported" | "document_too_large" | "document_too_many_pages" | "media_unsupported";
849
+ code: "media_unprobeable" | "media_format_indeterminate" | "media_format_unsupported" | "media_too_large" | "media_aspect_ratio_unsupported" | "media_resolution_too_low" | "media_gif_unsupported" | "media_format_recompressed" | "media_resolution_downscaled" | "video_container_unsupported" | "video_codec_unsupported" | "video_audio_codec_unsupported" | "video_too_large" | "video_too_small" | "video_dimensions_unsupported" | "video_dimensions_too_large" | "video_fps_unsupported" | "video_fps_too_low" | "video_aspect_unsupported" | "video_duration_too_short" | "video_duration_exceeds_max" | "video_transform_failed" | "media_fetch_failed" | "document_format_unsupported" | "document_too_large" | "document_too_many_pages" | "media_unsupported";
850
850
  message: string;
851
851
  hint?: string;
852
852
  allowed?: Array<string>;
853
853
  got?: string;
854
+ display_error: string;
854
855
  }>;
855
856
  };
856
857
  };
@@ -875,11 +876,12 @@ declare function useUpdateMedia(): _tanstack_react_query.UseMutationResult<{
875
876
  };
876
877
  raw: boolean;
877
878
  error: {
878
- code: "media_unprobeable" | "media_format_indeterminate" | "media_too_large" | "media_aspect_ratio_unsupported" | "media_resolution_too_low" | "media_gif_unsupported" | "media_format_recompressed" | "media_resolution_downscaled" | "video_container_unsupported" | "video_codec_unsupported" | "video_audio_codec_unsupported" | "video_too_large" | "video_too_small" | "video_dimensions_unsupported" | "video_dimensions_too_large" | "video_fps_unsupported" | "video_fps_too_low" | "video_aspect_unsupported" | "video_duration_too_short" | "video_duration_exceeds_max" | "video_transform_failed" | "media_fetch_failed" | "document_format_unsupported" | "document_too_large" | "document_too_many_pages" | "media_unsupported";
879
+ code: "media_unprobeable" | "media_format_indeterminate" | "media_format_unsupported" | "media_too_large" | "media_aspect_ratio_unsupported" | "media_resolution_too_low" | "media_gif_unsupported" | "media_format_recompressed" | "media_resolution_downscaled" | "video_container_unsupported" | "video_codec_unsupported" | "video_audio_codec_unsupported" | "video_too_large" | "video_too_small" | "video_dimensions_unsupported" | "video_dimensions_too_large" | "video_fps_unsupported" | "video_fps_too_low" | "video_aspect_unsupported" | "video_duration_too_short" | "video_duration_exceeds_max" | "video_transform_failed" | "media_fetch_failed" | "document_format_unsupported" | "document_too_large" | "document_too_many_pages" | "media_unsupported";
879
880
  message: string;
880
881
  hint?: string;
881
882
  allowed?: Array<string>;
882
883
  got?: string;
884
+ display_error: string;
883
885
  } | null;
884
886
  source: {
885
887
  format: string;
@@ -897,18 +899,20 @@ declare function useUpdateMedia(): _tanstack_react_query.UseMutationResult<{
897
899
  height: number | null;
898
900
  bytes: number | null;
899
901
  warnings: Array<{
900
- code: "media_unprobeable" | "media_format_indeterminate" | "media_too_large" | "media_aspect_ratio_unsupported" | "media_resolution_too_low" | "media_gif_unsupported" | "media_format_recompressed" | "media_resolution_downscaled" | "video_container_unsupported" | "video_codec_unsupported" | "video_audio_codec_unsupported" | "video_too_large" | "video_too_small" | "video_dimensions_unsupported" | "video_dimensions_too_large" | "video_fps_unsupported" | "video_fps_too_low" | "video_aspect_unsupported" | "video_duration_too_short" | "video_duration_exceeds_max" | "video_transform_failed" | "media_fetch_failed" | "document_format_unsupported" | "document_too_large" | "document_too_many_pages" | "media_unsupported";
902
+ code: "media_unprobeable" | "media_format_indeterminate" | "media_format_unsupported" | "media_too_large" | "media_aspect_ratio_unsupported" | "media_resolution_too_low" | "media_gif_unsupported" | "media_format_recompressed" | "media_resolution_downscaled" | "video_container_unsupported" | "video_codec_unsupported" | "video_audio_codec_unsupported" | "video_too_large" | "video_too_small" | "video_dimensions_unsupported" | "video_dimensions_too_large" | "video_fps_unsupported" | "video_fps_too_low" | "video_aspect_unsupported" | "video_duration_too_short" | "video_duration_exceeds_max" | "video_transform_failed" | "media_fetch_failed" | "document_format_unsupported" | "document_too_large" | "document_too_many_pages" | "media_unsupported";
901
903
  message: string;
902
904
  hint?: string;
903
905
  allowed?: Array<string>;
904
906
  got?: string;
907
+ display_error: string;
905
908
  }>;
906
909
  errors: Array<{
907
- code: "media_unprobeable" | "media_format_indeterminate" | "media_too_large" | "media_aspect_ratio_unsupported" | "media_resolution_too_low" | "media_gif_unsupported" | "media_format_recompressed" | "media_resolution_downscaled" | "video_container_unsupported" | "video_codec_unsupported" | "video_audio_codec_unsupported" | "video_too_large" | "video_too_small" | "video_dimensions_unsupported" | "video_dimensions_too_large" | "video_fps_unsupported" | "video_fps_too_low" | "video_aspect_unsupported" | "video_duration_too_short" | "video_duration_exceeds_max" | "video_transform_failed" | "media_fetch_failed" | "document_format_unsupported" | "document_too_large" | "document_too_many_pages" | "media_unsupported";
910
+ code: "media_unprobeable" | "media_format_indeterminate" | "media_format_unsupported" | "media_too_large" | "media_aspect_ratio_unsupported" | "media_resolution_too_low" | "media_gif_unsupported" | "media_format_recompressed" | "media_resolution_downscaled" | "video_container_unsupported" | "video_codec_unsupported" | "video_audio_codec_unsupported" | "video_too_large" | "video_too_small" | "video_dimensions_unsupported" | "video_dimensions_too_large" | "video_fps_unsupported" | "video_fps_too_low" | "video_aspect_unsupported" | "video_duration_too_short" | "video_duration_exceeds_max" | "video_transform_failed" | "media_fetch_failed" | "document_format_unsupported" | "document_too_large" | "document_too_many_pages" | "media_unsupported";
908
911
  message: string;
909
912
  hint?: string;
910
913
  allowed?: Array<string>;
911
914
  got?: string;
915
+ display_error: string;
912
916
  }>;
913
917
  };
914
918
  };
@@ -992,6 +996,7 @@ declare function usePosts(query?: ListPostsQuery): _tanstack_react_query.UseQuer
992
996
  error: {
993
997
  code: string;
994
998
  message: string;
999
+ display_error: string;
995
1000
  } | null;
996
1001
  media: Array<{
997
1002
  media_id: string;
@@ -1052,6 +1057,7 @@ declare function usePostsInfinite(filters?: Omit<ListPostsQuery, 'limit' | 'offs
1052
1057
  error: {
1053
1058
  code: string;
1054
1059
  message: string;
1060
+ display_error: string;
1055
1061
  } | null;
1056
1062
  media: Array<{
1057
1063
  media_id: string;
@@ -1111,6 +1117,7 @@ declare function useCalendar(filters?: CalendarFilters & Pick<ListPostsQuery, 'l
1111
1117
  error: {
1112
1118
  code: string;
1113
1119
  message: string;
1120
+ display_error: string;
1114
1121
  } | null;
1115
1122
  media: Array<{
1116
1123
  media_id: string;
@@ -1168,6 +1175,7 @@ declare function usePost(id: string, options?: LiveOptions): _tanstack_react_que
1168
1175
  error: {
1169
1176
  code: string;
1170
1177
  message: string;
1178
+ display_error: string;
1171
1179
  } | null;
1172
1180
  media: Array<{
1173
1181
  media_id: string;
@@ -1239,6 +1247,7 @@ declare function useCreatePost(profileId: string): {
1239
1247
  error: {
1240
1248
  code: string;
1241
1249
  message: string;
1250
+ display_error: string;
1242
1251
  } | null;
1243
1252
  media: Array<{
1244
1253
  media_id: string;
@@ -1288,6 +1297,7 @@ declare function useCreatePost(profileId: string): {
1288
1297
  error: {
1289
1298
  code: string;
1290
1299
  message: string;
1300
+ display_error: string;
1291
1301
  } | null;
1292
1302
  media: Array<{
1293
1303
  media_id: string;
@@ -1326,6 +1336,7 @@ declare function useCreatePost(profileId: string): {
1326
1336
  error: {
1327
1337
  code: string;
1328
1338
  message: string;
1339
+ display_error: string;
1329
1340
  } | null;
1330
1341
  media: Array<{
1331
1342
  media_id: string;
@@ -1356,13 +1367,15 @@ declare function useValidatePost(profileId: string): {
1356
1367
  validate: (input: Omit<ComposePostInput, "profileId">) => Promise<PostValidation>;
1357
1368
  publishable: boolean | undefined;
1358
1369
  issues: {
1359
- code: "unauthorized" | "forbidden" | "not_found" | "conflict" | "validation_failed" | "rate_limited" | "internal_error" | "idempotency_key_invalid" | "idempotency_key_reused" | "idempotency_request_in_progress" | "account_not_available" | "connection_reauth_required" | "connection_not_pending" | "not_implemented" | "connection_discovery_failed" | "tiktok_creator_info_unavailable" | "media_processing" | "not_publishable" | "invalid_connection" | "invalid_media" | "profile_scope_invalid" | "media_unprobeable" | "media_too_large" | "media_aspect_ratio_unsupported" | "media_resolution_too_low" | "media_gif_unsupported" | "media_format_recompressed" | "media_resolution_downscaled" | "video_container_unsupported" | "video_codec_unsupported" | "video_audio_codec_unsupported" | "video_too_large" | "video_too_small" | "video_dimensions_unsupported" | "video_dimensions_too_large" | "video_fps_unsupported" | "video_fps_too_low" | "video_aspect_unsupported" | "video_duration_too_short" | "video_duration_exceeds_max" | "video_transform_failed" | "media_fetch_failed" | "document_format_unsupported" | "document_too_large" | "document_too_many_pages" | "media_format_indeterminate" | "media_count_invalid" | "body_too_long" | "content_missing" | "content_conflict" | "content_incomplete" | "content_kind_mismatch" | "media_type_mismatch" | "tag_limit_exceeded" | "reel_field_on_non_reel" | "field_placement_invalid" | "media_not_ready" | "media_failed" | "media_unsupported" | "media_kind_mismatch" | "variant_unparseable" | "publishing_unavailable" | "x_duplicate_content" | "x_not_authorized" | "x_access_not_permitted" | "x_rate_limited" | "x_publish_failed" | "x_media_upload_failed" | "linkedin_duplicate_content" | "linkedin_auth_expired" | "linkedin_permission_denied" | "linkedin_rate_limited" | "linkedin_media_processing" | "linkedin_media_failed" | "linkedin_media_upload_failed" | "linkedin_publish_failed" | "instagram_media_processing" | "instagram_container_expired" | "instagram_container_failed" | "instagram_rate_limited" | "instagram_not_authorized" | "instagram_publish_failed" | "facebook_reel_processing" | "facebook_reel_failed" | "facebook_rate_limited" | "facebook_not_authorized" | "facebook_publish_failed" | "tiktok_privacy_not_allowed" | "tiktok_duration_exceeds_max" | "tiktok_media_processing" | "tiktok_not_authorized" | "tiktok_rate_limited" | "tiktok_publish_failed" | "post_publish_failed" | "post_partially_published" | "connection_platform_mismatch" | "connection_removed";
1370
+ code: "unauthorized" | "forbidden" | "not_found" | "conflict" | "validation_failed" | "rate_limited" | "internal_error" | "idempotency_key_invalid" | "idempotency_key_reused" | "idempotency_request_in_progress" | "account_not_available" | "connection_reauth_required" | "connection_not_pending" | "not_implemented" | "connection_discovery_failed" | "tiktok_creator_info_unavailable" | "media_processing" | "not_publishable" | "invalid_connection" | "invalid_media" | "profile_scope_invalid" | "media_unprobeable" | "media_too_large" | "media_aspect_ratio_unsupported" | "media_resolution_too_low" | "media_gif_unsupported" | "media_format_recompressed" | "media_resolution_downscaled" | "video_container_unsupported" | "video_codec_unsupported" | "video_audio_codec_unsupported" | "video_too_large" | "video_too_small" | "video_dimensions_unsupported" | "video_dimensions_too_large" | "video_fps_unsupported" | "video_fps_too_low" | "video_aspect_unsupported" | "video_duration_too_short" | "video_duration_exceeds_max" | "video_transform_failed" | "media_fetch_failed" | "document_format_unsupported" | "document_too_large" | "document_too_many_pages" | "media_format_indeterminate" | "media_format_unsupported" | "media_count_invalid" | "body_too_long" | "content_missing" | "content_conflict" | "content_incomplete" | "content_kind_mismatch" | "media_type_mismatch" | "tag_limit_exceeded" | "reel_field_on_non_reel" | "field_placement_invalid" | "media_not_ready" | "media_failed" | "media_unsupported" | "media_kind_mismatch" | "variant_unparseable" | "publishing_unavailable" | "x_duplicate_content" | "x_not_authorized" | "x_access_not_permitted" | "x_rate_limited" | "x_publish_failed" | "x_media_upload_failed" | "linkedin_duplicate_content" | "linkedin_auth_expired" | "linkedin_permission_denied" | "linkedin_rate_limited" | "linkedin_media_processing" | "linkedin_media_failed" | "linkedin_media_upload_failed" | "linkedin_publish_failed" | "instagram_media_processing" | "instagram_container_expired" | "instagram_container_failed" | "instagram_rate_limited" | "instagram_not_authorized" | "instagram_publish_failed" | "facebook_reel_processing" | "facebook_reel_failed" | "facebook_rate_limited" | "facebook_not_authorized" | "facebook_publish_failed" | "tiktok_privacy_not_allowed" | "tiktok_duration_exceeds_max" | "tiktok_media_processing" | "tiktok_not_authorized" | "tiktok_rate_limited" | "tiktok_url_ownership_unverified" | "tiktok_unaudited_private_only" | "tiktok_spam_risk" | "tiktok_publish_failed" | "post_publish_failed" | "post_partially_published" | "connection_platform_mismatch" | "connection_removed";
1360
1371
  message: string;
1361
1372
  hint?: string;
1362
1373
  allowed?: Array<string>;
1363
1374
  got?: string;
1364
1375
  variant_index: number;
1365
1376
  path: Array<string | number>;
1377
+ platform?: "x" | "linkedin" | "facebook_page" | "instagram" | "tiktok";
1378
+ display_error: string;
1366
1379
  }[];
1367
1380
  isPending: boolean;
1368
1381
  error: Error | null;
@@ -1406,6 +1419,7 @@ declare function useUpdatePost(postId: string): _tanstack_react_query.UseMutatio
1406
1419
  error: {
1407
1420
  code: string;
1408
1421
  message: string;
1422
+ display_error: string;
1409
1423
  } | null;
1410
1424
  media: Array<{
1411
1425
  media_id: string;
@@ -1751,4 +1765,136 @@ declare function LinkedInPostPreviewImpl({ variant, author, media, theme, time,
1751
1765
  * absorbs unstable media arrays). */
1752
1766
  declare const LinkedInPostPreview: react.MemoExoticComponent<typeof LinkedInPostPreviewImpl>;
1753
1767
 
1754
- export { type CalendarFilters, Connect, type ConnectErrorReason, type ConnectOutcome, type ConnectProps, type ConnectRenderApi, type ConnectState, type ConnectionsFilter, type DiscoverableAccount, type InfiniteList, LinkedInPostPreview, type LinkedInPostPreviewProps, type LinkedInPreviewAuthor, type LiveOptions, type MediaUploadItem, type MediaUploadOptions, type MediaUploadStatus, type PostrunContextValue, PostrunProvider, type PostrunProviderProps, type PreviewMedia, type PreviewMediaKind, UploadError, type UseConnectParams, type UseConnectResult, type UseMediaUploadOptions, type UseMediaUploadResult, XPostPreview, type XPostPreviewProps, type XPreviewAuthor, type XPreviewMedia, type XPreviewQuotedTweet, connectionKeys, mediaKeys, postKeys, profileKeys, tiktokKeys, useCalendar, useConnect, useConnection, useConnections, useCreatePost, useCreateProfile, useDeleteMedia, useDeletePost, useDeleteProfile, useDisconnect, useDiscoverableAccounts, useInfiniteList, useMedia, useMediaInfinite, useMediaList, useMediaUpload, usePost, usePostrun, usePosts, usePostsInfinite, useProfile, useProfiles, useProfilesInfinite, useSelectAccount, useTikTokCreatorInfo, useUpdateMedia, useUpdatePost, useUpdateProfile, useValidatePost };
1768
+ /**
1769
+ * Public props for the TikTok post preview — a faithful render of how a post will
1770
+ * look on TikTok, driven straight from our Post object plus the live creator info
1771
+ * the Content-Posting policy requires the publishing UI to show.
1772
+ *
1773
+ * The component is presentational: the host collects the variant + creator info
1774
+ * (via `useTikTokCreatorInfo`) + resolves media pixels, and passes them in. Later
1775
+ * chunks add the editable caption + the consent-gated Post button.
1776
+ */
1777
+ interface TikTokPostPreviewProps {
1778
+ /** The TikTok variant from our schema — the content source, untouched. */
1779
+ variant: TikTokPostVariant;
1780
+ /** Live creator info (nickname/avatar, audience options, interaction flags). */
1781
+ creatorInfo: TikTokCreatorInfo;
1782
+ /** Resolved media pixels (processed URLs or compose-time File blobs). */
1783
+ media?: PreviewMedia[];
1784
+ /** Class applied to the phone frame — your hook for sizing. */
1785
+ className?: string;
1786
+ /** Inline styles on the frame. */
1787
+ style?: CSSProperties;
1788
+ }
1789
+
1790
+ declare function TikTokPostPreviewImpl({ variant, creatorInfo, media, className, style, }: TikTokPostPreviewProps): react.JSX.Element;
1791
+ /** Memoized: the resolved-media hook absorbs unstable media arrays. */
1792
+ declare const TikTokPostPreview: react.MemoExoticComponent<typeof TikTokPostPreviewImpl>;
1793
+
1794
+ /**
1795
+ * Theming for the TikTok publish PANEL. The preview card itself is always dark
1796
+ * (TikTok's video surface is always dark), so only the panel adapts. We expose a
1797
+ * small set of CSS custom properties on the panel root; controls read
1798
+ * `var(--pr-tt-*)`, so a customer can restyle via `style`/`className` without a
1799
+ * fork. Mirrors the LinkedIn preview's theme approach.
1800
+ */
1801
+ type TikTokTheme = 'light' | 'dark' | 'auto';
1802
+
1803
+ /**
1804
+ * The TikTok publish/confirmation panel — the Required-UX surface that turns a
1805
+ * preview into a compliant publish flow. It composes the editable caption (#2),
1806
+ * audience (#5), interaction (#6), commercial disclosure (#7), the video-only
1807
+ * AIGC toggle (SHOULD), the processing notice (#10), the consent declaration
1808
+ * directly above the button (#8), and the consent-gated Post button (#9) — which
1809
+ * fires `onPost` ONLY on an explicit click and is disabled until the post is
1810
+ * valid.
1811
+ *
1812
+ * All logic comes from `@postrun/js` (the single source); this is the render.
1813
+ */
1814
+ interface TikTokPublishPanelProps {
1815
+ /** The variant — drives post_type (caps, interaction set) + media count. */
1816
+ variant: TikTokPostVariant;
1817
+ /** Live creator info (audience options, interaction gates). */
1818
+ creatorInfo: TikTokCreatorInfo;
1819
+ /** Editable caption (controlled) + its setter. */
1820
+ caption: string;
1821
+ onCaptionChange: (value: string) => void;
1822
+ /** The TikTok options value (controlled) + its setter. */
1823
+ options: TikTokOptionsValue;
1824
+ onOptionsChange: (value: TikTokOptionsValue) => void;
1825
+ /** Fired ONLY on an explicit Post click — the affirmative-consent gate (#9). */
1826
+ onPost: () => void;
1827
+ /** Disable the button + show a busy label while a publish is in flight. */
1828
+ posting?: boolean;
1829
+ /** Colour scheme. `auto` (default) follows the OS preference. */
1830
+ theme?: TikTokTheme;
1831
+ className?: string;
1832
+ style?: CSSProperties;
1833
+ }
1834
+ declare function TikTokPublishPanel({ variant, creatorInfo, caption, onCaptionChange, options, onOptionsChange, onPost, posting, theme, className, style, }: TikTokPublishPanelProps): react.JSX.Element;
1835
+
1836
+ interface TikTokCaptionFieldProps {
1837
+ /** The caption text (controlled). */
1838
+ value: string;
1839
+ /** Fired on every edit — keep your variant `body` in sync with this. */
1840
+ onChange: (value: string) => void;
1841
+ /** Drives the cap (video → 2200, photo → 4000). */
1842
+ postType: TikTokPostVariant['post_type'];
1843
+ /** Placeholder shown when empty. */
1844
+ placeholder?: string;
1845
+ className?: string;
1846
+ style?: CSSProperties;
1847
+ }
1848
+ declare function TikTokCaptionField({ value, onChange, postType, placeholder, className, style, }: TikTokCaptionFieldProps): react.JSX.Element;
1849
+
1850
+ /**
1851
+ * The audience / privacy selector — MUST #5. TikTok mandates an explicit choice
1852
+ * with NO default, so the select opens on a disabled placeholder and an unchosen
1853
+ * value shows the required hint. Options come from the creator's allowed set;
1854
+ * branded content drops SELF_ONLY (handled in `audiencePrivacyOptions`).
1855
+ */
1856
+ declare function AudienceSelect({ creatorInfo, value, onChange, }: {
1857
+ creatorInfo: TikTokCreatorInfo;
1858
+ value: TikTokOptionsValue;
1859
+ onChange: (value: TikTokOptionsValue) => void;
1860
+ }): react.JSX.Element;
1861
+
1862
+ /**
1863
+ * The interaction toggles — MUST #6. Video shows Comment / Duet / Stitch; a photo
1864
+ * post shows only Comment (TikTok mandate). None default on; an interaction the
1865
+ * creator forbids renders disabled and forced off. The rows + the forbidden flags
1866
+ * come from `interactionRows` (the single source).
1867
+ */
1868
+ declare function InteractionToggles({ creatorInfo, value, onChange, isVideo, }: {
1869
+ creatorInfo: TikTokCreatorInfo;
1870
+ value: TikTokOptionsValue;
1871
+ onChange: (value: TikTokOptionsValue) => void;
1872
+ isVideo: boolean;
1873
+ }): react.JSX.Element;
1874
+
1875
+ /**
1876
+ * Commercial-content disclosure — MUST #7. Off by default. When on, the user must
1877
+ * pick at least one of "Your brand" / "Branded content" (else the required hint
1878
+ * blocks publish), and the resulting label notice is shown verbatim:
1879
+ * Your brand → "Your photo/video will be labeled as 'Promotional content'"
1880
+ * Branded content→ "Your photo/video will be labeled as 'Paid partnership'"
1881
+ * Branded content can't be private (handled in `setBrandKind` / the audience list).
1882
+ */
1883
+ declare function CommercialDisclosure({ value, onChange, }: {
1884
+ value: TikTokOptionsValue;
1885
+ onChange: (value: TikTokOptionsValue) => void;
1886
+ }): react.JSX.Element;
1887
+
1888
+ /**
1889
+ * The consent declaration — MUST #8. Rendered DIRECTLY above the Post button. The
1890
+ * wording switches on whether the post is disclosed as branded content (verbatim
1891
+ * TikTok copy):
1892
+ * default → "By posting, you agree to TikTok's Music Usage Confirmation"
1893
+ * branded → "By posting, you agree to TikTok's Branded Content Policy and
1894
+ * Music Usage Confirmation."
1895
+ */
1896
+ declare function Declaration({ brandedContent }: {
1897
+ brandedContent: boolean;
1898
+ }): react.JSX.Element;
1899
+
1900
+ export { AudienceSelect, type CalendarFilters, CommercialDisclosure, Connect, type ConnectErrorReason, type ConnectOutcome, type ConnectProps, type ConnectRenderApi, type ConnectState, type ConnectionsFilter, Declaration, type DiscoverableAccount, type InfiniteList, InteractionToggles, LinkedInPostPreview, type LinkedInPostPreviewProps, type LinkedInPreviewAuthor, type LiveOptions, type MediaUploadItem, type MediaUploadOptions, type MediaUploadStatus, type PostrunContextValue, PostrunProvider, type PostrunProviderProps, type PreviewMedia, type PreviewMediaKind, TikTokCaptionField, type TikTokCaptionFieldProps, TikTokPostPreview, type TikTokPostPreviewProps, TikTokPublishPanel, type TikTokPublishPanelProps, type TikTokTheme, UploadError, type UseConnectParams, type UseConnectResult, type UseMediaUploadOptions, type UseMediaUploadResult, XPostPreview, type XPostPreviewProps, type XPreviewAuthor, type XPreviewMedia, type XPreviewQuotedTweet, connectionKeys, mediaKeys, postKeys, profileKeys, tiktokKeys, useCalendar, useConnect, useConnection, useConnections, useCreatePost, useCreateProfile, useDeleteMedia, useDeletePost, useDeleteProfile, useDisconnect, useDiscoverableAccounts, useInfiniteList, useMedia, useMediaInfinite, useMediaList, useMediaUpload, usePost, usePostrun, usePosts, usePostsInfinite, useProfile, useProfiles, useProfilesInfinite, useSelectAccount, useTikTokCreatorInfo, useUpdateMedia, useUpdatePost, useUpdateProfile, useValidatePost };