@postrun/react 2.10.0 → 2.12.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.cjs +8 -62
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1664 -213
- package/dist/index.d.ts +1664 -213
- package/dist/index.js +7 -62
- package/dist/index.js.map +1 -1
- package/package.json +2 -4
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, Metadata, ComposePostInput, PostValidation, MediaKind, XPostVariant, XPoll as XPoll$1,
|
|
6
|
-
export { PostValidation, PostVariant, PostVariantError, TIKTOK_CAPTION_MAX, TikTokCreatorInfo, ValidationIssue, captionMaxFor } from '@postrun/js';
|
|
5
|
+
import { PostrunClient, ListProfilesQuery, DiscoverableAccountList, Connection, ConnectionKind, ConnectionStatus, ListMediaQuery, ListPostsQuery, ConnectablePlatform, MediaResource, MediaTarget, Metadata, ComposePostInput, PostValidation, MediaKind, InstagramPostVariant, PostVariant, LinkedInPostVariant, TikTokPostVariant, XPostVariant, XPoll as XPoll$1, TikTokCreatorInfo, TikTokOptionsValue } from '@postrun/js';
|
|
6
|
+
export { PostValidation, PostVariant, PostVariantError, TIKTOK_CAPTION_MAX, TikTokCreatorInfo, UploadError, ValidationIssue, captionMaxFor } from '@postrun/js';
|
|
7
7
|
import { TwitterComponents } from 'react-tweet';
|
|
8
8
|
|
|
9
9
|
/**
|
|
@@ -939,12 +939,6 @@ declare function useDeleteMedia(): _tanstack_react_query.UseMutationResult<{
|
|
|
939
939
|
deleted: true;
|
|
940
940
|
}, Error, string, unknown>;
|
|
941
941
|
|
|
942
|
-
/** A failed direct-to-storage upload, carrying the HTTP status (0 = network). */
|
|
943
|
-
declare class UploadError extends Error {
|
|
944
|
-
readonly status: number;
|
|
945
|
-
constructor(status: number, message: string);
|
|
946
|
-
}
|
|
947
|
-
|
|
948
942
|
/**
|
|
949
943
|
* The calendar/queue filter surface — a date window over `schedule_at` plus a
|
|
950
944
|
* derived-status multi-select, scoped to an optional profile. Picked straight
|
|
@@ -977,16 +971,195 @@ declare function usePosts(query?: ListPostsQuery): _tanstack_react_query.UseQuer
|
|
|
977
971
|
[key: string]: string | number | boolean;
|
|
978
972
|
};
|
|
979
973
|
variants: Array<{
|
|
974
|
+
platform: "x";
|
|
975
|
+
post_type: "text" | "single_image" | "multi_image" | "video";
|
|
976
|
+
settings: {
|
|
977
|
+
reply_settings?: "everyone" | "following" | "mentionedUsers" | "subscribers" | "verified";
|
|
978
|
+
quote_tweet_id?: string;
|
|
979
|
+
poll?: {
|
|
980
|
+
options: Array<string>;
|
|
981
|
+
duration_minutes: number;
|
|
982
|
+
reply_settings?: "following" | "mentionedUsers" | "subscribers" | "verified";
|
|
983
|
+
};
|
|
984
|
+
reply?: {
|
|
985
|
+
in_reply_to_tweet_id: string;
|
|
986
|
+
exclude_reply_user_ids?: Array<string>;
|
|
987
|
+
auto_populate_reply_metadata?: boolean;
|
|
988
|
+
};
|
|
989
|
+
community_id?: string;
|
|
990
|
+
for_super_followers_only?: boolean;
|
|
991
|
+
geo?: {
|
|
992
|
+
place_id: string;
|
|
993
|
+
};
|
|
994
|
+
card_uri?: string;
|
|
995
|
+
media_tagged_user_ids?: Array<string>;
|
|
996
|
+
};
|
|
980
997
|
id: string;
|
|
981
998
|
object: "post_variant";
|
|
982
999
|
connection_id: string | null;
|
|
983
|
-
platform: "x" | "linkedin" | "facebook_page" | "instagram" | "tiktok";
|
|
984
|
-
post_type: "text" | "single_image" | "multi_image" | "video" | "reel" | "carousel";
|
|
985
1000
|
body: string | null;
|
|
986
1001
|
status: "draft" | "scheduled" | "publishing" | "published" | "failed";
|
|
1002
|
+
schedule_at: string | null;
|
|
1003
|
+
result: {
|
|
1004
|
+
platform_post_id: string;
|
|
1005
|
+
permalink: string | null;
|
|
1006
|
+
published_at: string;
|
|
1007
|
+
} | null;
|
|
1008
|
+
error: {
|
|
1009
|
+
code: string;
|
|
1010
|
+
message: string;
|
|
1011
|
+
display_error: string;
|
|
1012
|
+
} | null;
|
|
1013
|
+
media: Array<{
|
|
1014
|
+
media_id: string;
|
|
1015
|
+
position: number;
|
|
1016
|
+
crop_box: {
|
|
1017
|
+
[key: string]: unknown;
|
|
1018
|
+
} | null;
|
|
1019
|
+
alt_text_override: string | null;
|
|
1020
|
+
}>;
|
|
1021
|
+
} | {
|
|
1022
|
+
platform: "linkedin";
|
|
1023
|
+
post_type: "text" | "single_image" | "multi_image" | "video";
|
|
987
1024
|
settings: {
|
|
988
|
-
|
|
1025
|
+
visibility: "PUBLIC" | "CONNECTIONS";
|
|
1026
|
+
content_kind: "text" | "single_image" | "video" | "multi_image" | "document" | "article" | "poll";
|
|
1027
|
+
article?: {
|
|
1028
|
+
source: string;
|
|
1029
|
+
title?: string;
|
|
1030
|
+
description?: string;
|
|
1031
|
+
thumbnail_media_id?: string;
|
|
1032
|
+
};
|
|
1033
|
+
poll?: {
|
|
1034
|
+
question: string;
|
|
1035
|
+
options: Array<string>;
|
|
1036
|
+
duration: "ONE_DAY" | "THREE_DAYS" | "SEVEN_DAYS" | "FOURTEEN_DAYS";
|
|
1037
|
+
};
|
|
1038
|
+
document?: {
|
|
1039
|
+
title: string;
|
|
1040
|
+
};
|
|
1041
|
+
disable_reshare?: boolean;
|
|
1042
|
+
mentions?: Array<{
|
|
1043
|
+
type: "person" | "organization";
|
|
1044
|
+
name: string;
|
|
1045
|
+
urn: string;
|
|
1046
|
+
}>;
|
|
1047
|
+
};
|
|
1048
|
+
id: string;
|
|
1049
|
+
object: "post_variant";
|
|
1050
|
+
connection_id: string | null;
|
|
1051
|
+
body: string | null;
|
|
1052
|
+
status: "draft" | "scheduled" | "publishing" | "published" | "failed";
|
|
1053
|
+
schedule_at: string | null;
|
|
1054
|
+
result: {
|
|
1055
|
+
platform_post_id: string;
|
|
1056
|
+
permalink: string | null;
|
|
1057
|
+
published_at: string;
|
|
1058
|
+
} | null;
|
|
1059
|
+
error: {
|
|
1060
|
+
code: string;
|
|
1061
|
+
message: string;
|
|
1062
|
+
display_error: string;
|
|
1063
|
+
} | null;
|
|
1064
|
+
media: Array<{
|
|
1065
|
+
media_id: string;
|
|
1066
|
+
position: number;
|
|
1067
|
+
crop_box: {
|
|
1068
|
+
[key: string]: unknown;
|
|
1069
|
+
} | null;
|
|
1070
|
+
alt_text_override: string | null;
|
|
1071
|
+
}>;
|
|
1072
|
+
} | {
|
|
1073
|
+
platform: "facebook_page";
|
|
1074
|
+
post_type: "text" | "single_image" | "multi_image" | "reel";
|
|
1075
|
+
settings: {
|
|
1076
|
+
link?: string;
|
|
1077
|
+
};
|
|
1078
|
+
id: string;
|
|
1079
|
+
object: "post_variant";
|
|
1080
|
+
connection_id: string | null;
|
|
1081
|
+
body: string | null;
|
|
1082
|
+
status: "draft" | "scheduled" | "publishing" | "published" | "failed";
|
|
1083
|
+
schedule_at: string | null;
|
|
1084
|
+
result: {
|
|
1085
|
+
platform_post_id: string;
|
|
1086
|
+
permalink: string | null;
|
|
1087
|
+
published_at: string;
|
|
1088
|
+
} | null;
|
|
1089
|
+
error: {
|
|
1090
|
+
code: string;
|
|
1091
|
+
message: string;
|
|
1092
|
+
display_error: string;
|
|
1093
|
+
} | null;
|
|
1094
|
+
media: Array<{
|
|
1095
|
+
media_id: string;
|
|
1096
|
+
position: number;
|
|
1097
|
+
crop_box: {
|
|
1098
|
+
[key: string]: unknown;
|
|
1099
|
+
} | null;
|
|
1100
|
+
alt_text_override: string | null;
|
|
1101
|
+
}>;
|
|
1102
|
+
} | {
|
|
1103
|
+
platform: "instagram";
|
|
1104
|
+
post_type: "single_image" | "carousel" | "reel";
|
|
1105
|
+
settings: {
|
|
1106
|
+
media_type?: "IMAGE" | "CAROUSEL" | "REELS";
|
|
1107
|
+
location_id?: string;
|
|
1108
|
+
user_tags?: Array<{
|
|
1109
|
+
username: string;
|
|
1110
|
+
x: number;
|
|
1111
|
+
y: number;
|
|
1112
|
+
}>;
|
|
1113
|
+
collaborators?: Array<string>;
|
|
1114
|
+
share_to_feed?: boolean;
|
|
1115
|
+
thumb_offset?: number;
|
|
1116
|
+
cover_url?: string;
|
|
1117
|
+
audio_name?: string;
|
|
1118
|
+
};
|
|
1119
|
+
id: string;
|
|
1120
|
+
object: "post_variant";
|
|
1121
|
+
connection_id: string | null;
|
|
1122
|
+
body: string | null;
|
|
1123
|
+
status: "draft" | "scheduled" | "publishing" | "published" | "failed";
|
|
1124
|
+
schedule_at: string | null;
|
|
1125
|
+
result: {
|
|
1126
|
+
platform_post_id: string;
|
|
1127
|
+
permalink: string | null;
|
|
1128
|
+
published_at: string;
|
|
1129
|
+
} | null;
|
|
1130
|
+
error: {
|
|
1131
|
+
code: string;
|
|
1132
|
+
message: string;
|
|
1133
|
+
display_error: string;
|
|
1134
|
+
} | null;
|
|
1135
|
+
media: Array<{
|
|
1136
|
+
media_id: string;
|
|
1137
|
+
position: number;
|
|
1138
|
+
crop_box: {
|
|
1139
|
+
[key: string]: unknown;
|
|
1140
|
+
} | null;
|
|
1141
|
+
alt_text_override: string | null;
|
|
1142
|
+
}>;
|
|
1143
|
+
} | {
|
|
1144
|
+
platform: "tiktok";
|
|
1145
|
+
post_type: "video" | "single_image" | "carousel";
|
|
1146
|
+
settings: {
|
|
1147
|
+
privacy_level?: "PUBLIC_TO_EVERYONE" | "MUTUAL_FOLLOW_FRIENDS" | "FOLLOWER_OF_CREATOR" | "SELF_ONLY";
|
|
1148
|
+
disable_comment?: boolean;
|
|
1149
|
+
disable_duet?: boolean;
|
|
1150
|
+
disable_stitch?: boolean;
|
|
1151
|
+
video_cover_timestamp_ms?: number;
|
|
1152
|
+
photo_cover_index?: number;
|
|
1153
|
+
auto_add_music?: boolean;
|
|
1154
|
+
brand_content_toggle?: boolean;
|
|
1155
|
+
brand_organic_toggle?: boolean;
|
|
1156
|
+
is_aigc?: boolean;
|
|
989
1157
|
};
|
|
1158
|
+
id: string;
|
|
1159
|
+
object: "post_variant";
|
|
1160
|
+
connection_id: string | null;
|
|
1161
|
+
body: string | null;
|
|
1162
|
+
status: "draft" | "scheduled" | "publishing" | "published" | "failed";
|
|
990
1163
|
schedule_at: string | null;
|
|
991
1164
|
result: {
|
|
992
1165
|
platform_post_id: string;
|
|
@@ -1038,16 +1211,34 @@ declare function usePostsInfinite(filters?: Omit<ListPostsQuery, 'limit' | 'offs
|
|
|
1038
1211
|
[key: string]: string | number | boolean;
|
|
1039
1212
|
};
|
|
1040
1213
|
variants: Array<{
|
|
1214
|
+
platform: "x";
|
|
1215
|
+
post_type: "text" | "single_image" | "multi_image" | "video";
|
|
1216
|
+
settings: {
|
|
1217
|
+
reply_settings?: "everyone" | "following" | "mentionedUsers" | "subscribers" | "verified";
|
|
1218
|
+
quote_tweet_id?: string;
|
|
1219
|
+
poll?: {
|
|
1220
|
+
options: Array<string>;
|
|
1221
|
+
duration_minutes: number;
|
|
1222
|
+
reply_settings?: "following" | "mentionedUsers" | "subscribers" | "verified";
|
|
1223
|
+
};
|
|
1224
|
+
reply?: {
|
|
1225
|
+
in_reply_to_tweet_id: string;
|
|
1226
|
+
exclude_reply_user_ids?: Array<string>;
|
|
1227
|
+
auto_populate_reply_metadata?: boolean;
|
|
1228
|
+
};
|
|
1229
|
+
community_id?: string;
|
|
1230
|
+
for_super_followers_only?: boolean;
|
|
1231
|
+
geo?: {
|
|
1232
|
+
place_id: string;
|
|
1233
|
+
};
|
|
1234
|
+
card_uri?: string;
|
|
1235
|
+
media_tagged_user_ids?: Array<string>;
|
|
1236
|
+
};
|
|
1041
1237
|
id: string;
|
|
1042
1238
|
object: "post_variant";
|
|
1043
1239
|
connection_id: string | null;
|
|
1044
|
-
platform: "x" | "linkedin" | "facebook_page" | "instagram" | "tiktok";
|
|
1045
|
-
post_type: "text" | "single_image" | "multi_image" | "video" | "reel" | "carousel";
|
|
1046
1240
|
body: string | null;
|
|
1047
1241
|
status: "draft" | "scheduled" | "publishing" | "published" | "failed";
|
|
1048
|
-
settings: {
|
|
1049
|
-
[key: string]: unknown;
|
|
1050
|
-
};
|
|
1051
1242
|
schedule_at: string | null;
|
|
1052
1243
|
result: {
|
|
1053
1244
|
platform_post_id: string;
|
|
@@ -1067,105 +1258,38 @@ declare function usePostsInfinite(filters?: Omit<ListPostsQuery, 'limit' | 'offs
|
|
|
1067
1258
|
} | null;
|
|
1068
1259
|
alt_text_override: string | null;
|
|
1069
1260
|
}>;
|
|
1070
|
-
}
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
* window is in-flight it refetches (5s — a list is heavier than one detail), and
|
|
1082
|
-
* stops once every item is terminal (or the window is empty). `live` is a
|
|
1083
|
-
* separate option, never mixed into the API filter object; default-on, opt out
|
|
1084
|
-
* with `{ live: false }`.
|
|
1085
|
-
*/
|
|
1086
|
-
declare function useCalendar(filters?: CalendarFilters & Pick<ListPostsQuery, 'limit' | 'offset'>, options?: LiveOptions): _tanstack_react_query.UseQueryResult<NoInfer<{
|
|
1087
|
-
object: "list";
|
|
1088
|
-
data: Array<{
|
|
1089
|
-
id: string;
|
|
1090
|
-
object: "post";
|
|
1091
|
-
profile_id: string;
|
|
1092
|
-
external_id: string | null;
|
|
1093
|
-
status: "draft" | "scheduled" | "publishing" | "partially_published" | "published" | "failed";
|
|
1094
|
-
schedule_at: string | null;
|
|
1095
|
-
tags: Array<string>;
|
|
1096
|
-
notes: string | null;
|
|
1097
|
-
metadata: {
|
|
1098
|
-
[key: string]: string | number | boolean;
|
|
1099
|
-
};
|
|
1100
|
-
variants: Array<{
|
|
1101
|
-
id: string;
|
|
1102
|
-
object: "post_variant";
|
|
1103
|
-
connection_id: string | null;
|
|
1104
|
-
platform: "x" | "linkedin" | "facebook_page" | "instagram" | "tiktok";
|
|
1105
|
-
post_type: "text" | "single_image" | "multi_image" | "video" | "reel" | "carousel";
|
|
1106
|
-
body: string | null;
|
|
1107
|
-
status: "draft" | "scheduled" | "publishing" | "published" | "failed";
|
|
1108
|
-
settings: {
|
|
1109
|
-
[key: string]: unknown;
|
|
1261
|
+
} | {
|
|
1262
|
+
platform: "linkedin";
|
|
1263
|
+
post_type: "text" | "single_image" | "multi_image" | "video";
|
|
1264
|
+
settings: {
|
|
1265
|
+
visibility: "PUBLIC" | "CONNECTIONS";
|
|
1266
|
+
content_kind: "text" | "single_image" | "video" | "multi_image" | "document" | "article" | "poll";
|
|
1267
|
+
article?: {
|
|
1268
|
+
source: string;
|
|
1269
|
+
title?: string;
|
|
1270
|
+
description?: string;
|
|
1271
|
+
thumbnail_media_id?: string;
|
|
1110
1272
|
};
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
position: number;
|
|
1125
|
-
crop_box: {
|
|
1126
|
-
[key: string]: unknown;
|
|
1127
|
-
} | null;
|
|
1128
|
-
alt_text_override: string | null;
|
|
1273
|
+
poll?: {
|
|
1274
|
+
question: string;
|
|
1275
|
+
options: Array<string>;
|
|
1276
|
+
duration: "ONE_DAY" | "THREE_DAYS" | "SEVEN_DAYS" | "FOURTEEN_DAYS";
|
|
1277
|
+
};
|
|
1278
|
+
document?: {
|
|
1279
|
+
title: string;
|
|
1280
|
+
};
|
|
1281
|
+
disable_reshare?: boolean;
|
|
1282
|
+
mentions?: Array<{
|
|
1283
|
+
type: "person" | "organization";
|
|
1284
|
+
name: string;
|
|
1285
|
+
urn: string;
|
|
1129
1286
|
}>;
|
|
1130
|
-
}
|
|
1131
|
-
created_at: string;
|
|
1132
|
-
updated_at: string;
|
|
1133
|
-
}>;
|
|
1134
|
-
total: number;
|
|
1135
|
-
limit: number;
|
|
1136
|
-
offset: number;
|
|
1137
|
-
has_more: boolean;
|
|
1138
|
-
}>, Error>;
|
|
1139
|
-
/**
|
|
1140
|
-
* Retrieve a single post by id (its variants, schedule, and derived status).
|
|
1141
|
-
* Auto-polls (2s) while the post is in-flight (`scheduled` / `publishing`) and
|
|
1142
|
-
* stops once it reaches a terminal status — so a scheduled post visibly
|
|
1143
|
-
* transitions with no manual refetch. `live` is on by default; pass
|
|
1144
|
-
* `{ live: false }` to force a one-shot.
|
|
1145
|
-
*/
|
|
1146
|
-
declare function usePost(id: string, options?: LiveOptions): _tanstack_react_query.UseQueryResult<NoInfer<{
|
|
1147
|
-
id: string;
|
|
1148
|
-
object: "post";
|
|
1149
|
-
profile_id: string;
|
|
1150
|
-
external_id: string | null;
|
|
1151
|
-
status: "draft" | "scheduled" | "publishing" | "partially_published" | "published" | "failed";
|
|
1152
|
-
schedule_at: string | null;
|
|
1153
|
-
tags: Array<string>;
|
|
1154
|
-
notes: string | null;
|
|
1155
|
-
metadata: {
|
|
1156
|
-
[key: string]: string | number | boolean;
|
|
1157
|
-
};
|
|
1158
|
-
variants: Array<{
|
|
1287
|
+
};
|
|
1159
1288
|
id: string;
|
|
1160
1289
|
object: "post_variant";
|
|
1161
1290
|
connection_id: string | null;
|
|
1162
|
-
platform: "x" | "linkedin" | "facebook_page" | "instagram" | "tiktok";
|
|
1163
|
-
post_type: "text" | "single_image" | "multi_image" | "video" | "reel" | "carousel";
|
|
1164
1291
|
body: string | null;
|
|
1165
1292
|
status: "draft" | "scheduled" | "publishing" | "published" | "failed";
|
|
1166
|
-
settings: {
|
|
1167
|
-
[key: string]: unknown;
|
|
1168
|
-
};
|
|
1169
1293
|
schedule_at: string | null;
|
|
1170
1294
|
result: {
|
|
1171
1295
|
platform_post_id: string;
|
|
@@ -1185,37 +1309,135 @@ declare function usePost(id: string, options?: LiveOptions): _tanstack_react_que
|
|
|
1185
1309
|
} | null;
|
|
1186
1310
|
alt_text_override: string | null;
|
|
1187
1311
|
}>;
|
|
1188
|
-
}
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1312
|
+
} | {
|
|
1313
|
+
platform: "facebook_page";
|
|
1314
|
+
post_type: "text" | "single_image" | "multi_image" | "reel";
|
|
1315
|
+
settings: {
|
|
1316
|
+
link?: string;
|
|
1317
|
+
};
|
|
1318
|
+
id: string;
|
|
1319
|
+
object: "post_variant";
|
|
1320
|
+
connection_id: string | null;
|
|
1321
|
+
body: string | null;
|
|
1322
|
+
status: "draft" | "scheduled" | "publishing" | "published" | "failed";
|
|
1323
|
+
schedule_at: string | null;
|
|
1324
|
+
result: {
|
|
1325
|
+
platform_post_id: string;
|
|
1326
|
+
permalink: string | null;
|
|
1327
|
+
published_at: string;
|
|
1328
|
+
} | null;
|
|
1329
|
+
error: {
|
|
1330
|
+
code: string;
|
|
1331
|
+
message: string;
|
|
1332
|
+
display_error: string;
|
|
1333
|
+
} | null;
|
|
1334
|
+
media: Array<{
|
|
1335
|
+
media_id: string;
|
|
1336
|
+
position: number;
|
|
1337
|
+
crop_box: {
|
|
1338
|
+
[key: string]: unknown;
|
|
1339
|
+
} | null;
|
|
1340
|
+
alt_text_override: string | null;
|
|
1341
|
+
}>;
|
|
1342
|
+
} | {
|
|
1343
|
+
platform: "instagram";
|
|
1344
|
+
post_type: "single_image" | "carousel" | "reel";
|
|
1345
|
+
settings: {
|
|
1346
|
+
media_type?: "IMAGE" | "CAROUSEL" | "REELS";
|
|
1347
|
+
location_id?: string;
|
|
1348
|
+
user_tags?: Array<{
|
|
1349
|
+
username: string;
|
|
1350
|
+
x: number;
|
|
1351
|
+
y: number;
|
|
1352
|
+
}>;
|
|
1353
|
+
collaborators?: Array<string>;
|
|
1354
|
+
share_to_feed?: boolean;
|
|
1355
|
+
thumb_offset?: number;
|
|
1356
|
+
cover_url?: string;
|
|
1357
|
+
audio_name?: string;
|
|
1358
|
+
};
|
|
1359
|
+
id: string;
|
|
1360
|
+
object: "post_variant";
|
|
1361
|
+
connection_id: string | null;
|
|
1362
|
+
body: string | null;
|
|
1363
|
+
status: "draft" | "scheduled" | "publishing" | "published" | "failed";
|
|
1364
|
+
schedule_at: string | null;
|
|
1365
|
+
result: {
|
|
1366
|
+
platform_post_id: string;
|
|
1367
|
+
permalink: string | null;
|
|
1368
|
+
published_at: string;
|
|
1369
|
+
} | null;
|
|
1370
|
+
error: {
|
|
1371
|
+
code: string;
|
|
1372
|
+
message: string;
|
|
1373
|
+
display_error: string;
|
|
1374
|
+
} | null;
|
|
1375
|
+
media: Array<{
|
|
1376
|
+
media_id: string;
|
|
1377
|
+
position: number;
|
|
1378
|
+
crop_box: {
|
|
1379
|
+
[key: string]: unknown;
|
|
1380
|
+
} | null;
|
|
1381
|
+
alt_text_override: string | null;
|
|
1382
|
+
}>;
|
|
1383
|
+
} | {
|
|
1384
|
+
platform: "tiktok";
|
|
1385
|
+
post_type: "video" | "single_image" | "carousel";
|
|
1386
|
+
settings: {
|
|
1387
|
+
privacy_level?: "PUBLIC_TO_EVERYONE" | "MUTUAL_FOLLOW_FRIENDS" | "FOLLOWER_OF_CREATOR" | "SELF_ONLY";
|
|
1388
|
+
disable_comment?: boolean;
|
|
1389
|
+
disable_duet?: boolean;
|
|
1390
|
+
disable_stitch?: boolean;
|
|
1391
|
+
video_cover_timestamp_ms?: number;
|
|
1392
|
+
photo_cover_index?: number;
|
|
1393
|
+
auto_add_music?: boolean;
|
|
1394
|
+
brand_content_toggle?: boolean;
|
|
1395
|
+
brand_organic_toggle?: boolean;
|
|
1396
|
+
is_aigc?: boolean;
|
|
1397
|
+
};
|
|
1398
|
+
id: string;
|
|
1399
|
+
object: "post_variant";
|
|
1400
|
+
connection_id: string | null;
|
|
1401
|
+
body: string | null;
|
|
1402
|
+
status: "draft" | "scheduled" | "publishing" | "published" | "failed";
|
|
1403
|
+
schedule_at: string | null;
|
|
1404
|
+
result: {
|
|
1405
|
+
platform_post_id: string;
|
|
1406
|
+
permalink: string | null;
|
|
1407
|
+
published_at: string;
|
|
1408
|
+
} | null;
|
|
1409
|
+
error: {
|
|
1410
|
+
code: string;
|
|
1411
|
+
message: string;
|
|
1412
|
+
display_error: string;
|
|
1413
|
+
} | null;
|
|
1414
|
+
media: Array<{
|
|
1415
|
+
media_id: string;
|
|
1416
|
+
position: number;
|
|
1417
|
+
crop_box: {
|
|
1418
|
+
[key: string]: unknown;
|
|
1419
|
+
} | null;
|
|
1420
|
+
alt_text_override: string | null;
|
|
1421
|
+
}>;
|
|
1422
|
+
}>;
|
|
1423
|
+
created_at: string;
|
|
1424
|
+
updated_at: string;
|
|
1425
|
+
}>;
|
|
1426
|
+
/**
|
|
1427
|
+
* Calendar/queue view — list posts in a `schedule_at` date window, optionally
|
|
1428
|
+
* narrowed to a profile and to one or more derived statuses (e.g. only
|
|
1429
|
+
* `scheduled` + `failed`). Forwards the date-range + multi-status filters (and
|
|
1430
|
+
* any `limit`/`offset`) to the generated `postsList` and returns the same typed
|
|
1431
|
+
* `PostList` envelope. It shares the `postKeys.list(filters)` cache identity with
|
|
1432
|
+
* `usePosts` but owns its own self-terminating poll: while ANY post in the
|
|
1433
|
+
* window is in-flight it refetches (5s — a list is heavier than one detail), and
|
|
1434
|
+
* stops once every item is terminal (or the window is empty). `live` is a
|
|
1435
|
+
* separate option, never mixed into the API filter object; default-on, opt out
|
|
1436
|
+
* with `{ live: false }`.
|
|
1216
1437
|
*/
|
|
1217
|
-
declare function
|
|
1218
|
-
|
|
1438
|
+
declare function useCalendar(filters?: CalendarFilters & Pick<ListPostsQuery, 'limit' | 'offset'>, options?: LiveOptions): _tanstack_react_query.UseQueryResult<NoInfer<{
|
|
1439
|
+
object: "list";
|
|
1440
|
+
data: Array<{
|
|
1219
1441
|
id: string;
|
|
1220
1442
|
object: "post";
|
|
1221
1443
|
profile_id: string;
|
|
@@ -1228,16 +1450,85 @@ declare function useCreatePost(profileId: string): {
|
|
|
1228
1450
|
[key: string]: string | number | boolean;
|
|
1229
1451
|
};
|
|
1230
1452
|
variants: Array<{
|
|
1453
|
+
platform: "x";
|
|
1454
|
+
post_type: "text" | "single_image" | "multi_image" | "video";
|
|
1455
|
+
settings: {
|
|
1456
|
+
reply_settings?: "everyone" | "following" | "mentionedUsers" | "subscribers" | "verified";
|
|
1457
|
+
quote_tweet_id?: string;
|
|
1458
|
+
poll?: {
|
|
1459
|
+
options: Array<string>;
|
|
1460
|
+
duration_minutes: number;
|
|
1461
|
+
reply_settings?: "following" | "mentionedUsers" | "subscribers" | "verified";
|
|
1462
|
+
};
|
|
1463
|
+
reply?: {
|
|
1464
|
+
in_reply_to_tweet_id: string;
|
|
1465
|
+
exclude_reply_user_ids?: Array<string>;
|
|
1466
|
+
auto_populate_reply_metadata?: boolean;
|
|
1467
|
+
};
|
|
1468
|
+
community_id?: string;
|
|
1469
|
+
for_super_followers_only?: boolean;
|
|
1470
|
+
geo?: {
|
|
1471
|
+
place_id: string;
|
|
1472
|
+
};
|
|
1473
|
+
card_uri?: string;
|
|
1474
|
+
media_tagged_user_ids?: Array<string>;
|
|
1475
|
+
};
|
|
1231
1476
|
id: string;
|
|
1232
1477
|
object: "post_variant";
|
|
1233
1478
|
connection_id: string | null;
|
|
1234
|
-
platform: "x" | "linkedin" | "facebook_page" | "instagram" | "tiktok";
|
|
1235
|
-
post_type: "text" | "single_image" | "multi_image" | "video" | "reel" | "carousel";
|
|
1236
1479
|
body: string | null;
|
|
1237
1480
|
status: "draft" | "scheduled" | "publishing" | "published" | "failed";
|
|
1481
|
+
schedule_at: string | null;
|
|
1482
|
+
result: {
|
|
1483
|
+
platform_post_id: string;
|
|
1484
|
+
permalink: string | null;
|
|
1485
|
+
published_at: string;
|
|
1486
|
+
} | null;
|
|
1487
|
+
error: {
|
|
1488
|
+
code: string;
|
|
1489
|
+
message: string;
|
|
1490
|
+
display_error: string;
|
|
1491
|
+
} | null;
|
|
1492
|
+
media: Array<{
|
|
1493
|
+
media_id: string;
|
|
1494
|
+
position: number;
|
|
1495
|
+
crop_box: {
|
|
1496
|
+
[key: string]: unknown;
|
|
1497
|
+
} | null;
|
|
1498
|
+
alt_text_override: string | null;
|
|
1499
|
+
}>;
|
|
1500
|
+
} | {
|
|
1501
|
+
platform: "linkedin";
|
|
1502
|
+
post_type: "text" | "single_image" | "multi_image" | "video";
|
|
1238
1503
|
settings: {
|
|
1239
|
-
|
|
1504
|
+
visibility: "PUBLIC" | "CONNECTIONS";
|
|
1505
|
+
content_kind: "text" | "single_image" | "video" | "multi_image" | "document" | "article" | "poll";
|
|
1506
|
+
article?: {
|
|
1507
|
+
source: string;
|
|
1508
|
+
title?: string;
|
|
1509
|
+
description?: string;
|
|
1510
|
+
thumbnail_media_id?: string;
|
|
1511
|
+
};
|
|
1512
|
+
poll?: {
|
|
1513
|
+
question: string;
|
|
1514
|
+
options: Array<string>;
|
|
1515
|
+
duration: "ONE_DAY" | "THREE_DAYS" | "SEVEN_DAYS" | "FOURTEEN_DAYS";
|
|
1516
|
+
};
|
|
1517
|
+
document?: {
|
|
1518
|
+
title: string;
|
|
1519
|
+
};
|
|
1520
|
+
disable_reshare?: boolean;
|
|
1521
|
+
mentions?: Array<{
|
|
1522
|
+
type: "person" | "organization";
|
|
1523
|
+
name: string;
|
|
1524
|
+
urn: string;
|
|
1525
|
+
}>;
|
|
1240
1526
|
};
|
|
1527
|
+
id: string;
|
|
1528
|
+
object: "post_variant";
|
|
1529
|
+
connection_id: string | null;
|
|
1530
|
+
body: string | null;
|
|
1531
|
+
status: "draft" | "scheduled" | "publishing" | "published" | "failed";
|
|
1241
1532
|
schedule_at: string | null;
|
|
1242
1533
|
result: {
|
|
1243
1534
|
platform_post_id: string;
|
|
@@ -1257,37 +1548,97 @@ declare function useCreatePost(profileId: string): {
|
|
|
1257
1548
|
} | null;
|
|
1258
1549
|
alt_text_override: string | null;
|
|
1259
1550
|
}>;
|
|
1260
|
-
}
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
isPending: boolean;
|
|
1267
|
-
error: Error | null;
|
|
1268
|
-
data: {
|
|
1269
|
-
id: string;
|
|
1270
|
-
object: "post";
|
|
1271
|
-
profile_id: string;
|
|
1272
|
-
external_id: string | null;
|
|
1273
|
-
status: "draft" | "scheduled" | "publishing" | "partially_published" | "published" | "failed";
|
|
1274
|
-
schedule_at: string | null;
|
|
1275
|
-
tags: Array<string>;
|
|
1276
|
-
notes: string | null;
|
|
1277
|
-
metadata: {
|
|
1278
|
-
[key: string]: string | number | boolean;
|
|
1279
|
-
};
|
|
1280
|
-
variants: Array<{
|
|
1551
|
+
} | {
|
|
1552
|
+
platform: "facebook_page";
|
|
1553
|
+
post_type: "text" | "single_image" | "multi_image" | "reel";
|
|
1554
|
+
settings: {
|
|
1555
|
+
link?: string;
|
|
1556
|
+
};
|
|
1281
1557
|
id: string;
|
|
1282
1558
|
object: "post_variant";
|
|
1283
1559
|
connection_id: string | null;
|
|
1284
|
-
platform: "x" | "linkedin" | "facebook_page" | "instagram" | "tiktok";
|
|
1285
|
-
post_type: "text" | "single_image" | "multi_image" | "video" | "reel" | "carousel";
|
|
1286
1560
|
body: string | null;
|
|
1287
1561
|
status: "draft" | "scheduled" | "publishing" | "published" | "failed";
|
|
1562
|
+
schedule_at: string | null;
|
|
1563
|
+
result: {
|
|
1564
|
+
platform_post_id: string;
|
|
1565
|
+
permalink: string | null;
|
|
1566
|
+
published_at: string;
|
|
1567
|
+
} | null;
|
|
1568
|
+
error: {
|
|
1569
|
+
code: string;
|
|
1570
|
+
message: string;
|
|
1571
|
+
display_error: string;
|
|
1572
|
+
} | null;
|
|
1573
|
+
media: Array<{
|
|
1574
|
+
media_id: string;
|
|
1575
|
+
position: number;
|
|
1576
|
+
crop_box: {
|
|
1577
|
+
[key: string]: unknown;
|
|
1578
|
+
} | null;
|
|
1579
|
+
alt_text_override: string | null;
|
|
1580
|
+
}>;
|
|
1581
|
+
} | {
|
|
1582
|
+
platform: "instagram";
|
|
1583
|
+
post_type: "single_image" | "carousel" | "reel";
|
|
1288
1584
|
settings: {
|
|
1289
|
-
|
|
1585
|
+
media_type?: "IMAGE" | "CAROUSEL" | "REELS";
|
|
1586
|
+
location_id?: string;
|
|
1587
|
+
user_tags?: Array<{
|
|
1588
|
+
username: string;
|
|
1589
|
+
x: number;
|
|
1590
|
+
y: number;
|
|
1591
|
+
}>;
|
|
1592
|
+
collaborators?: Array<string>;
|
|
1593
|
+
share_to_feed?: boolean;
|
|
1594
|
+
thumb_offset?: number;
|
|
1595
|
+
cover_url?: string;
|
|
1596
|
+
audio_name?: string;
|
|
1597
|
+
};
|
|
1598
|
+
id: string;
|
|
1599
|
+
object: "post_variant";
|
|
1600
|
+
connection_id: string | null;
|
|
1601
|
+
body: string | null;
|
|
1602
|
+
status: "draft" | "scheduled" | "publishing" | "published" | "failed";
|
|
1603
|
+
schedule_at: string | null;
|
|
1604
|
+
result: {
|
|
1605
|
+
platform_post_id: string;
|
|
1606
|
+
permalink: string | null;
|
|
1607
|
+
published_at: string;
|
|
1608
|
+
} | null;
|
|
1609
|
+
error: {
|
|
1610
|
+
code: string;
|
|
1611
|
+
message: string;
|
|
1612
|
+
display_error: string;
|
|
1613
|
+
} | null;
|
|
1614
|
+
media: Array<{
|
|
1615
|
+
media_id: string;
|
|
1616
|
+
position: number;
|
|
1617
|
+
crop_box: {
|
|
1618
|
+
[key: string]: unknown;
|
|
1619
|
+
} | null;
|
|
1620
|
+
alt_text_override: string | null;
|
|
1621
|
+
}>;
|
|
1622
|
+
} | {
|
|
1623
|
+
platform: "tiktok";
|
|
1624
|
+
post_type: "video" | "single_image" | "carousel";
|
|
1625
|
+
settings: {
|
|
1626
|
+
privacy_level?: "PUBLIC_TO_EVERYONE" | "MUTUAL_FOLLOW_FRIENDS" | "FOLLOWER_OF_CREATOR" | "SELF_ONLY";
|
|
1627
|
+
disable_comment?: boolean;
|
|
1628
|
+
disable_duet?: boolean;
|
|
1629
|
+
disable_stitch?: boolean;
|
|
1630
|
+
video_cover_timestamp_ms?: number;
|
|
1631
|
+
photo_cover_index?: number;
|
|
1632
|
+
auto_add_music?: boolean;
|
|
1633
|
+
brand_content_toggle?: boolean;
|
|
1634
|
+
brand_organic_toggle?: boolean;
|
|
1635
|
+
is_aigc?: boolean;
|
|
1290
1636
|
};
|
|
1637
|
+
id: string;
|
|
1638
|
+
object: "post_variant";
|
|
1639
|
+
connection_id: string | null;
|
|
1640
|
+
body: string | null;
|
|
1641
|
+
status: "draft" | "scheduled" | "publishing" | "published" | "failed";
|
|
1291
1642
|
schedule_at: string | null;
|
|
1292
1643
|
result: {
|
|
1293
1644
|
platform_post_id: string;
|
|
@@ -1308,25 +1659,921 @@ declare function useCreatePost(profileId: string): {
|
|
|
1308
1659
|
alt_text_override: string | null;
|
|
1309
1660
|
}>;
|
|
1310
1661
|
}>;
|
|
1311
|
-
created_at: string;
|
|
1312
|
-
updated_at: string;
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1662
|
+
created_at: string;
|
|
1663
|
+
updated_at: string;
|
|
1664
|
+
}>;
|
|
1665
|
+
total: number;
|
|
1666
|
+
limit: number;
|
|
1667
|
+
offset: number;
|
|
1668
|
+
has_more: boolean;
|
|
1669
|
+
}>, Error>;
|
|
1670
|
+
/**
|
|
1671
|
+
* Retrieve a single post by id (its variants, schedule, and derived status).
|
|
1672
|
+
* Auto-polls (2s) while the post is in-flight (`scheduled` / `publishing`) and
|
|
1673
|
+
* stops once it reaches a terminal status — so a scheduled post visibly
|
|
1674
|
+
* transitions with no manual refetch. `live` is on by default; pass
|
|
1675
|
+
* `{ live: false }` to force a one-shot.
|
|
1676
|
+
*/
|
|
1677
|
+
declare function usePost(id: string, options?: LiveOptions): _tanstack_react_query.UseQueryResult<NoInfer<{
|
|
1678
|
+
id: string;
|
|
1679
|
+
object: "post";
|
|
1680
|
+
profile_id: string;
|
|
1681
|
+
external_id: string | null;
|
|
1682
|
+
status: "draft" | "scheduled" | "publishing" | "partially_published" | "published" | "failed";
|
|
1683
|
+
schedule_at: string | null;
|
|
1684
|
+
tags: Array<string>;
|
|
1685
|
+
notes: string | null;
|
|
1686
|
+
metadata: {
|
|
1687
|
+
[key: string]: string | number | boolean;
|
|
1688
|
+
};
|
|
1689
|
+
variants: Array<{
|
|
1690
|
+
platform: "x";
|
|
1691
|
+
post_type: "text" | "single_image" | "multi_image" | "video";
|
|
1692
|
+
settings: {
|
|
1693
|
+
reply_settings?: "everyone" | "following" | "mentionedUsers" | "subscribers" | "verified";
|
|
1694
|
+
quote_tweet_id?: string;
|
|
1695
|
+
poll?: {
|
|
1696
|
+
options: Array<string>;
|
|
1697
|
+
duration_minutes: number;
|
|
1698
|
+
reply_settings?: "following" | "mentionedUsers" | "subscribers" | "verified";
|
|
1699
|
+
};
|
|
1700
|
+
reply?: {
|
|
1701
|
+
in_reply_to_tweet_id: string;
|
|
1702
|
+
exclude_reply_user_ids?: Array<string>;
|
|
1703
|
+
auto_populate_reply_metadata?: boolean;
|
|
1704
|
+
};
|
|
1705
|
+
community_id?: string;
|
|
1706
|
+
for_super_followers_only?: boolean;
|
|
1707
|
+
geo?: {
|
|
1708
|
+
place_id: string;
|
|
1709
|
+
};
|
|
1710
|
+
card_uri?: string;
|
|
1711
|
+
media_tagged_user_ids?: Array<string>;
|
|
1712
|
+
};
|
|
1713
|
+
id: string;
|
|
1714
|
+
object: "post_variant";
|
|
1715
|
+
connection_id: string | null;
|
|
1716
|
+
body: string | null;
|
|
1717
|
+
status: "draft" | "scheduled" | "publishing" | "published" | "failed";
|
|
1718
|
+
schedule_at: string | null;
|
|
1719
|
+
result: {
|
|
1720
|
+
platform_post_id: string;
|
|
1721
|
+
permalink: string | null;
|
|
1722
|
+
published_at: string;
|
|
1723
|
+
} | null;
|
|
1724
|
+
error: {
|
|
1725
|
+
code: string;
|
|
1726
|
+
message: string;
|
|
1727
|
+
display_error: string;
|
|
1728
|
+
} | null;
|
|
1729
|
+
media: Array<{
|
|
1730
|
+
media_id: string;
|
|
1731
|
+
position: number;
|
|
1732
|
+
crop_box: {
|
|
1733
|
+
[key: string]: unknown;
|
|
1734
|
+
} | null;
|
|
1735
|
+
alt_text_override: string | null;
|
|
1736
|
+
}>;
|
|
1737
|
+
} | {
|
|
1738
|
+
platform: "linkedin";
|
|
1739
|
+
post_type: "text" | "single_image" | "multi_image" | "video";
|
|
1740
|
+
settings: {
|
|
1741
|
+
visibility: "PUBLIC" | "CONNECTIONS";
|
|
1742
|
+
content_kind: "text" | "single_image" | "video" | "multi_image" | "document" | "article" | "poll";
|
|
1743
|
+
article?: {
|
|
1744
|
+
source: string;
|
|
1745
|
+
title?: string;
|
|
1746
|
+
description?: string;
|
|
1747
|
+
thumbnail_media_id?: string;
|
|
1748
|
+
};
|
|
1749
|
+
poll?: {
|
|
1750
|
+
question: string;
|
|
1751
|
+
options: Array<string>;
|
|
1752
|
+
duration: "ONE_DAY" | "THREE_DAYS" | "SEVEN_DAYS" | "FOURTEEN_DAYS";
|
|
1753
|
+
};
|
|
1754
|
+
document?: {
|
|
1755
|
+
title: string;
|
|
1756
|
+
};
|
|
1757
|
+
disable_reshare?: boolean;
|
|
1758
|
+
mentions?: Array<{
|
|
1759
|
+
type: "person" | "organization";
|
|
1760
|
+
name: string;
|
|
1761
|
+
urn: string;
|
|
1762
|
+
}>;
|
|
1763
|
+
};
|
|
1764
|
+
id: string;
|
|
1765
|
+
object: "post_variant";
|
|
1766
|
+
connection_id: string | null;
|
|
1767
|
+
body: string | null;
|
|
1768
|
+
status: "draft" | "scheduled" | "publishing" | "published" | "failed";
|
|
1769
|
+
schedule_at: string | null;
|
|
1770
|
+
result: {
|
|
1771
|
+
platform_post_id: string;
|
|
1772
|
+
permalink: string | null;
|
|
1773
|
+
published_at: string;
|
|
1774
|
+
} | null;
|
|
1775
|
+
error: {
|
|
1776
|
+
code: string;
|
|
1777
|
+
message: string;
|
|
1778
|
+
display_error: string;
|
|
1779
|
+
} | null;
|
|
1780
|
+
media: Array<{
|
|
1781
|
+
media_id: string;
|
|
1782
|
+
position: number;
|
|
1783
|
+
crop_box: {
|
|
1784
|
+
[key: string]: unknown;
|
|
1785
|
+
} | null;
|
|
1786
|
+
alt_text_override: string | null;
|
|
1787
|
+
}>;
|
|
1788
|
+
} | {
|
|
1789
|
+
platform: "facebook_page";
|
|
1790
|
+
post_type: "text" | "single_image" | "multi_image" | "reel";
|
|
1791
|
+
settings: {
|
|
1792
|
+
link?: string;
|
|
1793
|
+
};
|
|
1794
|
+
id: string;
|
|
1795
|
+
object: "post_variant";
|
|
1796
|
+
connection_id: string | null;
|
|
1797
|
+
body: string | null;
|
|
1798
|
+
status: "draft" | "scheduled" | "publishing" | "published" | "failed";
|
|
1799
|
+
schedule_at: string | null;
|
|
1800
|
+
result: {
|
|
1801
|
+
platform_post_id: string;
|
|
1802
|
+
permalink: string | null;
|
|
1803
|
+
published_at: string;
|
|
1804
|
+
} | null;
|
|
1805
|
+
error: {
|
|
1806
|
+
code: string;
|
|
1807
|
+
message: string;
|
|
1808
|
+
display_error: string;
|
|
1809
|
+
} | null;
|
|
1810
|
+
media: Array<{
|
|
1811
|
+
media_id: string;
|
|
1812
|
+
position: number;
|
|
1813
|
+
crop_box: {
|
|
1814
|
+
[key: string]: unknown;
|
|
1815
|
+
} | null;
|
|
1816
|
+
alt_text_override: string | null;
|
|
1817
|
+
}>;
|
|
1818
|
+
} | {
|
|
1819
|
+
platform: "instagram";
|
|
1820
|
+
post_type: "single_image" | "carousel" | "reel";
|
|
1821
|
+
settings: {
|
|
1822
|
+
media_type?: "IMAGE" | "CAROUSEL" | "REELS";
|
|
1823
|
+
location_id?: string;
|
|
1824
|
+
user_tags?: Array<{
|
|
1825
|
+
username: string;
|
|
1826
|
+
x: number;
|
|
1827
|
+
y: number;
|
|
1828
|
+
}>;
|
|
1829
|
+
collaborators?: Array<string>;
|
|
1830
|
+
share_to_feed?: boolean;
|
|
1831
|
+
thumb_offset?: number;
|
|
1832
|
+
cover_url?: string;
|
|
1833
|
+
audio_name?: string;
|
|
1834
|
+
};
|
|
1835
|
+
id: string;
|
|
1836
|
+
object: "post_variant";
|
|
1837
|
+
connection_id: string | null;
|
|
1838
|
+
body: string | null;
|
|
1839
|
+
status: "draft" | "scheduled" | "publishing" | "published" | "failed";
|
|
1840
|
+
schedule_at: string | null;
|
|
1841
|
+
result: {
|
|
1842
|
+
platform_post_id: string;
|
|
1843
|
+
permalink: string | null;
|
|
1844
|
+
published_at: string;
|
|
1845
|
+
} | null;
|
|
1846
|
+
error: {
|
|
1847
|
+
code: string;
|
|
1848
|
+
message: string;
|
|
1849
|
+
display_error: string;
|
|
1850
|
+
} | null;
|
|
1851
|
+
media: Array<{
|
|
1852
|
+
media_id: string;
|
|
1853
|
+
position: number;
|
|
1854
|
+
crop_box: {
|
|
1855
|
+
[key: string]: unknown;
|
|
1856
|
+
} | null;
|
|
1857
|
+
alt_text_override: string | null;
|
|
1858
|
+
}>;
|
|
1859
|
+
} | {
|
|
1860
|
+
platform: "tiktok";
|
|
1861
|
+
post_type: "video" | "single_image" | "carousel";
|
|
1862
|
+
settings: {
|
|
1863
|
+
privacy_level?: "PUBLIC_TO_EVERYONE" | "MUTUAL_FOLLOW_FRIENDS" | "FOLLOWER_OF_CREATOR" | "SELF_ONLY";
|
|
1864
|
+
disable_comment?: boolean;
|
|
1865
|
+
disable_duet?: boolean;
|
|
1866
|
+
disable_stitch?: boolean;
|
|
1867
|
+
video_cover_timestamp_ms?: number;
|
|
1868
|
+
photo_cover_index?: number;
|
|
1869
|
+
auto_add_music?: boolean;
|
|
1870
|
+
brand_content_toggle?: boolean;
|
|
1871
|
+
brand_organic_toggle?: boolean;
|
|
1872
|
+
is_aigc?: boolean;
|
|
1873
|
+
};
|
|
1874
|
+
id: string;
|
|
1875
|
+
object: "post_variant";
|
|
1876
|
+
connection_id: string | null;
|
|
1877
|
+
body: string | null;
|
|
1878
|
+
status: "draft" | "scheduled" | "publishing" | "published" | "failed";
|
|
1879
|
+
schedule_at: string | null;
|
|
1880
|
+
result: {
|
|
1881
|
+
platform_post_id: string;
|
|
1882
|
+
permalink: string | null;
|
|
1883
|
+
published_at: string;
|
|
1884
|
+
} | null;
|
|
1885
|
+
error: {
|
|
1886
|
+
code: string;
|
|
1887
|
+
message: string;
|
|
1888
|
+
display_error: string;
|
|
1889
|
+
} | null;
|
|
1890
|
+
media: Array<{
|
|
1891
|
+
media_id: string;
|
|
1892
|
+
position: number;
|
|
1893
|
+
crop_box: {
|
|
1894
|
+
[key: string]: unknown;
|
|
1895
|
+
} | null;
|
|
1896
|
+
alt_text_override: string | null;
|
|
1897
|
+
}>;
|
|
1898
|
+
}>;
|
|
1899
|
+
created_at: string;
|
|
1900
|
+
updated_at: string;
|
|
1901
|
+
}>, Error>;
|
|
1902
|
+
/**
|
|
1903
|
+
* Compose and create a post. Resolves the profile's connections, builds the full
|
|
1904
|
+
* variant set from `{ content, channels }` (per the `buildCreatePost` rules), and
|
|
1905
|
+
* sends it — the customer never assembles variants or passes a `connection_id`.
|
|
1906
|
+
* `connectedChannels` is the set of posting platforms this profile can reach.
|
|
1907
|
+
*
|
|
1908
|
+
* ## Reading the publish outcome (do NOT stop at "it returned")
|
|
1909
|
+
* On `publish: 'now'` the API returns the created post with a rollup `status` and
|
|
1910
|
+
* a per-variant `status` + typed `error`. A 201 does NOT mean every platform
|
|
1911
|
+
* published — one can silently fail while another succeeds. Surface the outcome
|
|
1912
|
+
* via the derived fields, never assume success from a resolved `create`:
|
|
1913
|
+
*
|
|
1914
|
+
* - **`status`** — the rollup (`published | partially_published | failed |
|
|
1915
|
+
* draft | scheduled`), `undefined` until the first `create` resolves.
|
|
1916
|
+
* - **`isPublished`** — `true` ONLY when `status === 'published'`. This is the
|
|
1917
|
+
* one "fully published" state; `partially_published` and `failed` are NOT
|
|
1918
|
+
* success. Branch on this, not on the promise resolving.
|
|
1919
|
+
* - **`failedVariants`** — the variants that failed, each with its typed
|
|
1920
|
+
* `error` (`{ code, message }`); `[]` when none. Render "X failed: <message>".
|
|
1921
|
+
*
|
|
1922
|
+
* `create` still resolves with the FULL `Post` (read everything if you need to),
|
|
1923
|
+
* and it NEVER throws on a failed/partial publish — a throw would discard the
|
|
1924
|
+
* platforms that DID publish. A transport error (network / 4xx) still surfaces
|
|
1925
|
+
* via `error` (and rejects `create`), exactly as before.
|
|
1926
|
+
*/
|
|
1927
|
+
declare function useCreatePost(profileId: string): {
|
|
1928
|
+
create: _tanstack_react_query.UseMutateAsyncFunction<{
|
|
1929
|
+
id: string;
|
|
1930
|
+
object: "post";
|
|
1931
|
+
profile_id: string;
|
|
1932
|
+
external_id: string | null;
|
|
1933
|
+
status: "draft" | "scheduled" | "publishing" | "partially_published" | "published" | "failed";
|
|
1934
|
+
schedule_at: string | null;
|
|
1935
|
+
tags: Array<string>;
|
|
1936
|
+
notes: string | null;
|
|
1937
|
+
metadata: {
|
|
1938
|
+
[key: string]: string | number | boolean;
|
|
1939
|
+
};
|
|
1940
|
+
variants: Array<{
|
|
1941
|
+
platform: "x";
|
|
1942
|
+
post_type: "text" | "single_image" | "multi_image" | "video";
|
|
1943
|
+
settings: {
|
|
1944
|
+
reply_settings?: "everyone" | "following" | "mentionedUsers" | "subscribers" | "verified";
|
|
1945
|
+
quote_tweet_id?: string;
|
|
1946
|
+
poll?: {
|
|
1947
|
+
options: Array<string>;
|
|
1948
|
+
duration_minutes: number;
|
|
1949
|
+
reply_settings?: "following" | "mentionedUsers" | "subscribers" | "verified";
|
|
1950
|
+
};
|
|
1951
|
+
reply?: {
|
|
1952
|
+
in_reply_to_tweet_id: string;
|
|
1953
|
+
exclude_reply_user_ids?: Array<string>;
|
|
1954
|
+
auto_populate_reply_metadata?: boolean;
|
|
1955
|
+
};
|
|
1956
|
+
community_id?: string;
|
|
1957
|
+
for_super_followers_only?: boolean;
|
|
1958
|
+
geo?: {
|
|
1959
|
+
place_id: string;
|
|
1960
|
+
};
|
|
1961
|
+
card_uri?: string;
|
|
1962
|
+
media_tagged_user_ids?: Array<string>;
|
|
1963
|
+
};
|
|
1964
|
+
id: string;
|
|
1965
|
+
object: "post_variant";
|
|
1966
|
+
connection_id: string | null;
|
|
1967
|
+
body: string | null;
|
|
1968
|
+
status: "draft" | "scheduled" | "publishing" | "published" | "failed";
|
|
1969
|
+
schedule_at: string | null;
|
|
1970
|
+
result: {
|
|
1971
|
+
platform_post_id: string;
|
|
1972
|
+
permalink: string | null;
|
|
1973
|
+
published_at: string;
|
|
1974
|
+
} | null;
|
|
1975
|
+
error: {
|
|
1976
|
+
code: string;
|
|
1977
|
+
message: string;
|
|
1978
|
+
display_error: string;
|
|
1979
|
+
} | null;
|
|
1980
|
+
media: Array<{
|
|
1981
|
+
media_id: string;
|
|
1982
|
+
position: number;
|
|
1983
|
+
crop_box: {
|
|
1984
|
+
[key: string]: unknown;
|
|
1985
|
+
} | null;
|
|
1986
|
+
alt_text_override: string | null;
|
|
1987
|
+
}>;
|
|
1988
|
+
} | {
|
|
1989
|
+
platform: "linkedin";
|
|
1990
|
+
post_type: "text" | "single_image" | "multi_image" | "video";
|
|
1991
|
+
settings: {
|
|
1992
|
+
visibility: "PUBLIC" | "CONNECTIONS";
|
|
1993
|
+
content_kind: "text" | "single_image" | "video" | "multi_image" | "document" | "article" | "poll";
|
|
1994
|
+
article?: {
|
|
1995
|
+
source: string;
|
|
1996
|
+
title?: string;
|
|
1997
|
+
description?: string;
|
|
1998
|
+
thumbnail_media_id?: string;
|
|
1999
|
+
};
|
|
2000
|
+
poll?: {
|
|
2001
|
+
question: string;
|
|
2002
|
+
options: Array<string>;
|
|
2003
|
+
duration: "ONE_DAY" | "THREE_DAYS" | "SEVEN_DAYS" | "FOURTEEN_DAYS";
|
|
2004
|
+
};
|
|
2005
|
+
document?: {
|
|
2006
|
+
title: string;
|
|
2007
|
+
};
|
|
2008
|
+
disable_reshare?: boolean;
|
|
2009
|
+
mentions?: Array<{
|
|
2010
|
+
type: "person" | "organization";
|
|
2011
|
+
name: string;
|
|
2012
|
+
urn: string;
|
|
2013
|
+
}>;
|
|
2014
|
+
};
|
|
2015
|
+
id: string;
|
|
2016
|
+
object: "post_variant";
|
|
2017
|
+
connection_id: string | null;
|
|
2018
|
+
body: string | null;
|
|
2019
|
+
status: "draft" | "scheduled" | "publishing" | "published" | "failed";
|
|
2020
|
+
schedule_at: string | null;
|
|
2021
|
+
result: {
|
|
2022
|
+
platform_post_id: string;
|
|
2023
|
+
permalink: string | null;
|
|
2024
|
+
published_at: string;
|
|
2025
|
+
} | null;
|
|
2026
|
+
error: {
|
|
2027
|
+
code: string;
|
|
2028
|
+
message: string;
|
|
2029
|
+
display_error: string;
|
|
2030
|
+
} | null;
|
|
2031
|
+
media: Array<{
|
|
2032
|
+
media_id: string;
|
|
2033
|
+
position: number;
|
|
2034
|
+
crop_box: {
|
|
2035
|
+
[key: string]: unknown;
|
|
2036
|
+
} | null;
|
|
2037
|
+
alt_text_override: string | null;
|
|
2038
|
+
}>;
|
|
2039
|
+
} | {
|
|
2040
|
+
platform: "facebook_page";
|
|
2041
|
+
post_type: "text" | "single_image" | "multi_image" | "reel";
|
|
2042
|
+
settings: {
|
|
2043
|
+
link?: string;
|
|
2044
|
+
};
|
|
2045
|
+
id: string;
|
|
2046
|
+
object: "post_variant";
|
|
2047
|
+
connection_id: string | null;
|
|
2048
|
+
body: string | null;
|
|
2049
|
+
status: "draft" | "scheduled" | "publishing" | "published" | "failed";
|
|
2050
|
+
schedule_at: string | null;
|
|
2051
|
+
result: {
|
|
2052
|
+
platform_post_id: string;
|
|
2053
|
+
permalink: string | null;
|
|
2054
|
+
published_at: string;
|
|
2055
|
+
} | null;
|
|
2056
|
+
error: {
|
|
2057
|
+
code: string;
|
|
2058
|
+
message: string;
|
|
2059
|
+
display_error: string;
|
|
2060
|
+
} | null;
|
|
2061
|
+
media: Array<{
|
|
2062
|
+
media_id: string;
|
|
2063
|
+
position: number;
|
|
2064
|
+
crop_box: {
|
|
2065
|
+
[key: string]: unknown;
|
|
2066
|
+
} | null;
|
|
2067
|
+
alt_text_override: string | null;
|
|
2068
|
+
}>;
|
|
2069
|
+
} | {
|
|
2070
|
+
platform: "instagram";
|
|
2071
|
+
post_type: "single_image" | "carousel" | "reel";
|
|
2072
|
+
settings: {
|
|
2073
|
+
media_type?: "IMAGE" | "CAROUSEL" | "REELS";
|
|
2074
|
+
location_id?: string;
|
|
2075
|
+
user_tags?: Array<{
|
|
2076
|
+
username: string;
|
|
2077
|
+
x: number;
|
|
2078
|
+
y: number;
|
|
2079
|
+
}>;
|
|
2080
|
+
collaborators?: Array<string>;
|
|
2081
|
+
share_to_feed?: boolean;
|
|
2082
|
+
thumb_offset?: number;
|
|
2083
|
+
cover_url?: string;
|
|
2084
|
+
audio_name?: string;
|
|
2085
|
+
};
|
|
2086
|
+
id: string;
|
|
2087
|
+
object: "post_variant";
|
|
2088
|
+
connection_id: string | null;
|
|
2089
|
+
body: string | null;
|
|
2090
|
+
status: "draft" | "scheduled" | "publishing" | "published" | "failed";
|
|
2091
|
+
schedule_at: string | null;
|
|
2092
|
+
result: {
|
|
2093
|
+
platform_post_id: string;
|
|
2094
|
+
permalink: string | null;
|
|
2095
|
+
published_at: string;
|
|
2096
|
+
} | null;
|
|
2097
|
+
error: {
|
|
2098
|
+
code: string;
|
|
2099
|
+
message: string;
|
|
2100
|
+
display_error: string;
|
|
2101
|
+
} | null;
|
|
2102
|
+
media: Array<{
|
|
2103
|
+
media_id: string;
|
|
2104
|
+
position: number;
|
|
2105
|
+
crop_box: {
|
|
2106
|
+
[key: string]: unknown;
|
|
2107
|
+
} | null;
|
|
2108
|
+
alt_text_override: string | null;
|
|
2109
|
+
}>;
|
|
2110
|
+
} | {
|
|
2111
|
+
platform: "tiktok";
|
|
2112
|
+
post_type: "video" | "single_image" | "carousel";
|
|
2113
|
+
settings: {
|
|
2114
|
+
privacy_level?: "PUBLIC_TO_EVERYONE" | "MUTUAL_FOLLOW_FRIENDS" | "FOLLOWER_OF_CREATOR" | "SELF_ONLY";
|
|
2115
|
+
disable_comment?: boolean;
|
|
2116
|
+
disable_duet?: boolean;
|
|
2117
|
+
disable_stitch?: boolean;
|
|
2118
|
+
video_cover_timestamp_ms?: number;
|
|
2119
|
+
photo_cover_index?: number;
|
|
2120
|
+
auto_add_music?: boolean;
|
|
2121
|
+
brand_content_toggle?: boolean;
|
|
2122
|
+
brand_organic_toggle?: boolean;
|
|
2123
|
+
is_aigc?: boolean;
|
|
2124
|
+
};
|
|
2125
|
+
id: string;
|
|
2126
|
+
object: "post_variant";
|
|
2127
|
+
connection_id: string | null;
|
|
2128
|
+
body: string | null;
|
|
2129
|
+
status: "draft" | "scheduled" | "publishing" | "published" | "failed";
|
|
2130
|
+
schedule_at: string | null;
|
|
2131
|
+
result: {
|
|
2132
|
+
platform_post_id: string;
|
|
2133
|
+
permalink: string | null;
|
|
2134
|
+
published_at: string;
|
|
2135
|
+
} | null;
|
|
2136
|
+
error: {
|
|
2137
|
+
code: string;
|
|
2138
|
+
message: string;
|
|
2139
|
+
display_error: string;
|
|
2140
|
+
} | null;
|
|
2141
|
+
media: Array<{
|
|
2142
|
+
media_id: string;
|
|
2143
|
+
position: number;
|
|
2144
|
+
crop_box: {
|
|
2145
|
+
[key: string]: unknown;
|
|
2146
|
+
} | null;
|
|
2147
|
+
alt_text_override: string | null;
|
|
2148
|
+
}>;
|
|
2149
|
+
}>;
|
|
2150
|
+
created_at: string;
|
|
2151
|
+
updated_at: string;
|
|
2152
|
+
dry_run: boolean;
|
|
2153
|
+
executed: boolean;
|
|
2154
|
+
}, Error, Omit<ComposePostInput, "profileId">, unknown>;
|
|
2155
|
+
isPending: boolean;
|
|
2156
|
+
error: Error | null;
|
|
2157
|
+
data: {
|
|
2158
|
+
id: string;
|
|
2159
|
+
object: "post";
|
|
2160
|
+
profile_id: string;
|
|
2161
|
+
external_id: string | null;
|
|
2162
|
+
status: "draft" | "scheduled" | "publishing" | "partially_published" | "published" | "failed";
|
|
2163
|
+
schedule_at: string | null;
|
|
2164
|
+
tags: Array<string>;
|
|
2165
|
+
notes: string | null;
|
|
2166
|
+
metadata: {
|
|
2167
|
+
[key: string]: string | number | boolean;
|
|
2168
|
+
};
|
|
2169
|
+
variants: Array<{
|
|
2170
|
+
platform: "x";
|
|
2171
|
+
post_type: "text" | "single_image" | "multi_image" | "video";
|
|
2172
|
+
settings: {
|
|
2173
|
+
reply_settings?: "everyone" | "following" | "mentionedUsers" | "subscribers" | "verified";
|
|
2174
|
+
quote_tweet_id?: string;
|
|
2175
|
+
poll?: {
|
|
2176
|
+
options: Array<string>;
|
|
2177
|
+
duration_minutes: number;
|
|
2178
|
+
reply_settings?: "following" | "mentionedUsers" | "subscribers" | "verified";
|
|
2179
|
+
};
|
|
2180
|
+
reply?: {
|
|
2181
|
+
in_reply_to_tweet_id: string;
|
|
2182
|
+
exclude_reply_user_ids?: Array<string>;
|
|
2183
|
+
auto_populate_reply_metadata?: boolean;
|
|
2184
|
+
};
|
|
2185
|
+
community_id?: string;
|
|
2186
|
+
for_super_followers_only?: boolean;
|
|
2187
|
+
geo?: {
|
|
2188
|
+
place_id: string;
|
|
2189
|
+
};
|
|
2190
|
+
card_uri?: string;
|
|
2191
|
+
media_tagged_user_ids?: Array<string>;
|
|
2192
|
+
};
|
|
2193
|
+
id: string;
|
|
2194
|
+
object: "post_variant";
|
|
2195
|
+
connection_id: string | null;
|
|
2196
|
+
body: string | null;
|
|
2197
|
+
status: "draft" | "scheduled" | "publishing" | "published" | "failed";
|
|
2198
|
+
schedule_at: string | null;
|
|
2199
|
+
result: {
|
|
2200
|
+
platform_post_id: string;
|
|
2201
|
+
permalink: string | null;
|
|
2202
|
+
published_at: string;
|
|
2203
|
+
} | null;
|
|
2204
|
+
error: {
|
|
2205
|
+
code: string;
|
|
2206
|
+
message: string;
|
|
2207
|
+
display_error: string;
|
|
2208
|
+
} | null;
|
|
2209
|
+
media: Array<{
|
|
2210
|
+
media_id: string;
|
|
2211
|
+
position: number;
|
|
2212
|
+
crop_box: {
|
|
2213
|
+
[key: string]: unknown;
|
|
2214
|
+
} | null;
|
|
2215
|
+
alt_text_override: string | null;
|
|
2216
|
+
}>;
|
|
2217
|
+
} | {
|
|
2218
|
+
platform: "linkedin";
|
|
2219
|
+
post_type: "text" | "single_image" | "multi_image" | "video";
|
|
2220
|
+
settings: {
|
|
2221
|
+
visibility: "PUBLIC" | "CONNECTIONS";
|
|
2222
|
+
content_kind: "text" | "single_image" | "video" | "multi_image" | "document" | "article" | "poll";
|
|
2223
|
+
article?: {
|
|
2224
|
+
source: string;
|
|
2225
|
+
title?: string;
|
|
2226
|
+
description?: string;
|
|
2227
|
+
thumbnail_media_id?: string;
|
|
2228
|
+
};
|
|
2229
|
+
poll?: {
|
|
2230
|
+
question: string;
|
|
2231
|
+
options: Array<string>;
|
|
2232
|
+
duration: "ONE_DAY" | "THREE_DAYS" | "SEVEN_DAYS" | "FOURTEEN_DAYS";
|
|
2233
|
+
};
|
|
2234
|
+
document?: {
|
|
2235
|
+
title: string;
|
|
2236
|
+
};
|
|
2237
|
+
disable_reshare?: boolean;
|
|
2238
|
+
mentions?: Array<{
|
|
2239
|
+
type: "person" | "organization";
|
|
2240
|
+
name: string;
|
|
2241
|
+
urn: string;
|
|
2242
|
+
}>;
|
|
2243
|
+
};
|
|
2244
|
+
id: string;
|
|
2245
|
+
object: "post_variant";
|
|
2246
|
+
connection_id: string | null;
|
|
2247
|
+
body: string | null;
|
|
2248
|
+
status: "draft" | "scheduled" | "publishing" | "published" | "failed";
|
|
2249
|
+
schedule_at: string | null;
|
|
2250
|
+
result: {
|
|
2251
|
+
platform_post_id: string;
|
|
2252
|
+
permalink: string | null;
|
|
2253
|
+
published_at: string;
|
|
2254
|
+
} | null;
|
|
2255
|
+
error: {
|
|
2256
|
+
code: string;
|
|
2257
|
+
message: string;
|
|
2258
|
+
display_error: string;
|
|
2259
|
+
} | null;
|
|
2260
|
+
media: Array<{
|
|
2261
|
+
media_id: string;
|
|
2262
|
+
position: number;
|
|
2263
|
+
crop_box: {
|
|
2264
|
+
[key: string]: unknown;
|
|
2265
|
+
} | null;
|
|
2266
|
+
alt_text_override: string | null;
|
|
2267
|
+
}>;
|
|
2268
|
+
} | {
|
|
2269
|
+
platform: "facebook_page";
|
|
2270
|
+
post_type: "text" | "single_image" | "multi_image" | "reel";
|
|
2271
|
+
settings: {
|
|
2272
|
+
link?: string;
|
|
2273
|
+
};
|
|
2274
|
+
id: string;
|
|
2275
|
+
object: "post_variant";
|
|
2276
|
+
connection_id: string | null;
|
|
2277
|
+
body: string | null;
|
|
2278
|
+
status: "draft" | "scheduled" | "publishing" | "published" | "failed";
|
|
2279
|
+
schedule_at: string | null;
|
|
2280
|
+
result: {
|
|
2281
|
+
platform_post_id: string;
|
|
2282
|
+
permalink: string | null;
|
|
2283
|
+
published_at: string;
|
|
2284
|
+
} | null;
|
|
2285
|
+
error: {
|
|
2286
|
+
code: string;
|
|
2287
|
+
message: string;
|
|
2288
|
+
display_error: string;
|
|
2289
|
+
} | null;
|
|
2290
|
+
media: Array<{
|
|
2291
|
+
media_id: string;
|
|
2292
|
+
position: number;
|
|
2293
|
+
crop_box: {
|
|
2294
|
+
[key: string]: unknown;
|
|
2295
|
+
} | null;
|
|
2296
|
+
alt_text_override: string | null;
|
|
2297
|
+
}>;
|
|
2298
|
+
} | {
|
|
2299
|
+
platform: "instagram";
|
|
2300
|
+
post_type: "single_image" | "carousel" | "reel";
|
|
2301
|
+
settings: {
|
|
2302
|
+
media_type?: "IMAGE" | "CAROUSEL" | "REELS";
|
|
2303
|
+
location_id?: string;
|
|
2304
|
+
user_tags?: Array<{
|
|
2305
|
+
username: string;
|
|
2306
|
+
x: number;
|
|
2307
|
+
y: number;
|
|
2308
|
+
}>;
|
|
2309
|
+
collaborators?: Array<string>;
|
|
2310
|
+
share_to_feed?: boolean;
|
|
2311
|
+
thumb_offset?: number;
|
|
2312
|
+
cover_url?: string;
|
|
2313
|
+
audio_name?: string;
|
|
2314
|
+
};
|
|
2315
|
+
id: string;
|
|
2316
|
+
object: "post_variant";
|
|
2317
|
+
connection_id: string | null;
|
|
2318
|
+
body: string | null;
|
|
2319
|
+
status: "draft" | "scheduled" | "publishing" | "published" | "failed";
|
|
2320
|
+
schedule_at: string | null;
|
|
2321
|
+
result: {
|
|
2322
|
+
platform_post_id: string;
|
|
2323
|
+
permalink: string | null;
|
|
2324
|
+
published_at: string;
|
|
2325
|
+
} | null;
|
|
2326
|
+
error: {
|
|
2327
|
+
code: string;
|
|
2328
|
+
message: string;
|
|
2329
|
+
display_error: string;
|
|
2330
|
+
} | null;
|
|
2331
|
+
media: Array<{
|
|
2332
|
+
media_id: string;
|
|
2333
|
+
position: number;
|
|
2334
|
+
crop_box: {
|
|
2335
|
+
[key: string]: unknown;
|
|
2336
|
+
} | null;
|
|
2337
|
+
alt_text_override: string | null;
|
|
2338
|
+
}>;
|
|
2339
|
+
} | {
|
|
2340
|
+
platform: "tiktok";
|
|
2341
|
+
post_type: "video" | "single_image" | "carousel";
|
|
2342
|
+
settings: {
|
|
2343
|
+
privacy_level?: "PUBLIC_TO_EVERYONE" | "MUTUAL_FOLLOW_FRIENDS" | "FOLLOWER_OF_CREATOR" | "SELF_ONLY";
|
|
2344
|
+
disable_comment?: boolean;
|
|
2345
|
+
disable_duet?: boolean;
|
|
2346
|
+
disable_stitch?: boolean;
|
|
2347
|
+
video_cover_timestamp_ms?: number;
|
|
2348
|
+
photo_cover_index?: number;
|
|
2349
|
+
auto_add_music?: boolean;
|
|
2350
|
+
brand_content_toggle?: boolean;
|
|
2351
|
+
brand_organic_toggle?: boolean;
|
|
2352
|
+
is_aigc?: boolean;
|
|
2353
|
+
};
|
|
2354
|
+
id: string;
|
|
2355
|
+
object: "post_variant";
|
|
2356
|
+
connection_id: string | null;
|
|
2357
|
+
body: string | null;
|
|
2358
|
+
status: "draft" | "scheduled" | "publishing" | "published" | "failed";
|
|
2359
|
+
schedule_at: string | null;
|
|
2360
|
+
result: {
|
|
2361
|
+
platform_post_id: string;
|
|
2362
|
+
permalink: string | null;
|
|
2363
|
+
published_at: string;
|
|
2364
|
+
} | null;
|
|
2365
|
+
error: {
|
|
2366
|
+
code: string;
|
|
2367
|
+
message: string;
|
|
2368
|
+
display_error: string;
|
|
2369
|
+
} | null;
|
|
2370
|
+
media: Array<{
|
|
2371
|
+
media_id: string;
|
|
2372
|
+
position: number;
|
|
2373
|
+
crop_box: {
|
|
2374
|
+
[key: string]: unknown;
|
|
2375
|
+
} | null;
|
|
2376
|
+
alt_text_override: string | null;
|
|
2377
|
+
}>;
|
|
2378
|
+
}>;
|
|
2379
|
+
created_at: string;
|
|
2380
|
+
updated_at: string;
|
|
2381
|
+
dry_run: boolean;
|
|
2382
|
+
executed: boolean;
|
|
2383
|
+
} | undefined;
|
|
2384
|
+
reset: () => void;
|
|
2385
|
+
status: "draft" | "scheduled" | "publishing" | "partially_published" | "published" | "failed" | undefined;
|
|
2386
|
+
isPublished: boolean;
|
|
2387
|
+
failedVariants: ({
|
|
2388
|
+
platform: "x";
|
|
2389
|
+
post_type: "text" | "single_image" | "multi_image" | "video";
|
|
2390
|
+
settings: {
|
|
2391
|
+
reply_settings?: "everyone" | "following" | "mentionedUsers" | "subscribers" | "verified";
|
|
2392
|
+
quote_tweet_id?: string;
|
|
2393
|
+
poll?: {
|
|
2394
|
+
options: Array<string>;
|
|
2395
|
+
duration_minutes: number;
|
|
2396
|
+
reply_settings?: "following" | "mentionedUsers" | "subscribers" | "verified";
|
|
2397
|
+
};
|
|
2398
|
+
reply?: {
|
|
2399
|
+
in_reply_to_tweet_id: string;
|
|
2400
|
+
exclude_reply_user_ids?: Array<string>;
|
|
2401
|
+
auto_populate_reply_metadata?: boolean;
|
|
2402
|
+
};
|
|
2403
|
+
community_id?: string;
|
|
2404
|
+
for_super_followers_only?: boolean;
|
|
2405
|
+
geo?: {
|
|
2406
|
+
place_id: string;
|
|
2407
|
+
};
|
|
2408
|
+
card_uri?: string;
|
|
2409
|
+
media_tagged_user_ids?: Array<string>;
|
|
2410
|
+
};
|
|
2411
|
+
id: string;
|
|
2412
|
+
object: "post_variant";
|
|
2413
|
+
connection_id: string | null;
|
|
2414
|
+
body: string | null;
|
|
2415
|
+
status: "draft" | "scheduled" | "publishing" | "published" | "failed";
|
|
2416
|
+
schedule_at: string | null;
|
|
2417
|
+
result: {
|
|
2418
|
+
platform_post_id: string;
|
|
2419
|
+
permalink: string | null;
|
|
2420
|
+
published_at: string;
|
|
2421
|
+
} | null;
|
|
2422
|
+
error: {
|
|
2423
|
+
code: string;
|
|
2424
|
+
message: string;
|
|
2425
|
+
display_error: string;
|
|
2426
|
+
} | null;
|
|
2427
|
+
media: Array<{
|
|
2428
|
+
media_id: string;
|
|
2429
|
+
position: number;
|
|
2430
|
+
crop_box: {
|
|
2431
|
+
[key: string]: unknown;
|
|
2432
|
+
} | null;
|
|
2433
|
+
alt_text_override: string | null;
|
|
2434
|
+
}>;
|
|
2435
|
+
} | {
|
|
2436
|
+
platform: "linkedin";
|
|
2437
|
+
post_type: "text" | "single_image" | "multi_image" | "video";
|
|
2438
|
+
settings: {
|
|
2439
|
+
visibility: "PUBLIC" | "CONNECTIONS";
|
|
2440
|
+
content_kind: "text" | "single_image" | "video" | "multi_image" | "document" | "article" | "poll";
|
|
2441
|
+
article?: {
|
|
2442
|
+
source: string;
|
|
2443
|
+
title?: string;
|
|
2444
|
+
description?: string;
|
|
2445
|
+
thumbnail_media_id?: string;
|
|
2446
|
+
};
|
|
2447
|
+
poll?: {
|
|
2448
|
+
question: string;
|
|
2449
|
+
options: Array<string>;
|
|
2450
|
+
duration: "ONE_DAY" | "THREE_DAYS" | "SEVEN_DAYS" | "FOURTEEN_DAYS";
|
|
2451
|
+
};
|
|
2452
|
+
document?: {
|
|
2453
|
+
title: string;
|
|
2454
|
+
};
|
|
2455
|
+
disable_reshare?: boolean;
|
|
2456
|
+
mentions?: Array<{
|
|
2457
|
+
type: "person" | "organization";
|
|
2458
|
+
name: string;
|
|
2459
|
+
urn: string;
|
|
2460
|
+
}>;
|
|
2461
|
+
};
|
|
2462
|
+
id: string;
|
|
2463
|
+
object: "post_variant";
|
|
2464
|
+
connection_id: string | null;
|
|
2465
|
+
body: string | null;
|
|
2466
|
+
status: "draft" | "scheduled" | "publishing" | "published" | "failed";
|
|
2467
|
+
schedule_at: string | null;
|
|
2468
|
+
result: {
|
|
2469
|
+
platform_post_id: string;
|
|
2470
|
+
permalink: string | null;
|
|
2471
|
+
published_at: string;
|
|
2472
|
+
} | null;
|
|
2473
|
+
error: {
|
|
2474
|
+
code: string;
|
|
2475
|
+
message: string;
|
|
2476
|
+
display_error: string;
|
|
2477
|
+
} | null;
|
|
2478
|
+
media: Array<{
|
|
2479
|
+
media_id: string;
|
|
2480
|
+
position: number;
|
|
2481
|
+
crop_box: {
|
|
2482
|
+
[key: string]: unknown;
|
|
2483
|
+
} | null;
|
|
2484
|
+
alt_text_override: string | null;
|
|
2485
|
+
}>;
|
|
2486
|
+
} | {
|
|
2487
|
+
platform: "facebook_page";
|
|
2488
|
+
post_type: "text" | "single_image" | "multi_image" | "reel";
|
|
2489
|
+
settings: {
|
|
2490
|
+
link?: string;
|
|
2491
|
+
};
|
|
2492
|
+
id: string;
|
|
2493
|
+
object: "post_variant";
|
|
2494
|
+
connection_id: string | null;
|
|
2495
|
+
body: string | null;
|
|
2496
|
+
status: "draft" | "scheduled" | "publishing" | "published" | "failed";
|
|
2497
|
+
schedule_at: string | null;
|
|
2498
|
+
result: {
|
|
2499
|
+
platform_post_id: string;
|
|
2500
|
+
permalink: string | null;
|
|
2501
|
+
published_at: string;
|
|
2502
|
+
} | null;
|
|
2503
|
+
error: {
|
|
2504
|
+
code: string;
|
|
2505
|
+
message: string;
|
|
2506
|
+
display_error: string;
|
|
2507
|
+
} | null;
|
|
2508
|
+
media: Array<{
|
|
2509
|
+
media_id: string;
|
|
2510
|
+
position: number;
|
|
2511
|
+
crop_box: {
|
|
2512
|
+
[key: string]: unknown;
|
|
2513
|
+
} | null;
|
|
2514
|
+
alt_text_override: string | null;
|
|
2515
|
+
}>;
|
|
2516
|
+
} | {
|
|
2517
|
+
platform: "instagram";
|
|
2518
|
+
post_type: "single_image" | "carousel" | "reel";
|
|
2519
|
+
settings: {
|
|
2520
|
+
media_type?: "IMAGE" | "CAROUSEL" | "REELS";
|
|
2521
|
+
location_id?: string;
|
|
2522
|
+
user_tags?: Array<{
|
|
2523
|
+
username: string;
|
|
2524
|
+
x: number;
|
|
2525
|
+
y: number;
|
|
2526
|
+
}>;
|
|
2527
|
+
collaborators?: Array<string>;
|
|
2528
|
+
share_to_feed?: boolean;
|
|
2529
|
+
thumb_offset?: number;
|
|
2530
|
+
cover_url?: string;
|
|
2531
|
+
audio_name?: string;
|
|
2532
|
+
};
|
|
2533
|
+
id: string;
|
|
2534
|
+
object: "post_variant";
|
|
2535
|
+
connection_id: string | null;
|
|
2536
|
+
body: string | null;
|
|
2537
|
+
status: "draft" | "scheduled" | "publishing" | "published" | "failed";
|
|
2538
|
+
schedule_at: string | null;
|
|
2539
|
+
result: {
|
|
2540
|
+
platform_post_id: string;
|
|
2541
|
+
permalink: string | null;
|
|
2542
|
+
published_at: string;
|
|
2543
|
+
} | null;
|
|
2544
|
+
error: {
|
|
2545
|
+
code: string;
|
|
2546
|
+
message: string;
|
|
2547
|
+
display_error: string;
|
|
2548
|
+
} | null;
|
|
2549
|
+
media: Array<{
|
|
2550
|
+
media_id: string;
|
|
2551
|
+
position: number;
|
|
2552
|
+
crop_box: {
|
|
2553
|
+
[key: string]: unknown;
|
|
2554
|
+
} | null;
|
|
2555
|
+
alt_text_override: string | null;
|
|
2556
|
+
}>;
|
|
2557
|
+
} | {
|
|
2558
|
+
platform: "tiktok";
|
|
2559
|
+
post_type: "video" | "single_image" | "carousel";
|
|
2560
|
+
settings: {
|
|
2561
|
+
privacy_level?: "PUBLIC_TO_EVERYONE" | "MUTUAL_FOLLOW_FRIENDS" | "FOLLOWER_OF_CREATOR" | "SELF_ONLY";
|
|
2562
|
+
disable_comment?: boolean;
|
|
2563
|
+
disable_duet?: boolean;
|
|
2564
|
+
disable_stitch?: boolean;
|
|
2565
|
+
video_cover_timestamp_ms?: number;
|
|
2566
|
+
photo_cover_index?: number;
|
|
2567
|
+
auto_add_music?: boolean;
|
|
2568
|
+
brand_content_toggle?: boolean;
|
|
2569
|
+
brand_organic_toggle?: boolean;
|
|
2570
|
+
is_aigc?: boolean;
|
|
2571
|
+
};
|
|
1320
2572
|
id: string;
|
|
1321
2573
|
object: "post_variant";
|
|
1322
2574
|
connection_id: string | null;
|
|
1323
|
-
platform: "x" | "linkedin" | "facebook_page" | "instagram" | "tiktok";
|
|
1324
|
-
post_type: "text" | "single_image" | "multi_image" | "video" | "reel" | "carousel";
|
|
1325
2575
|
body: string | null;
|
|
1326
2576
|
status: "draft" | "scheduled" | "publishing" | "published" | "failed";
|
|
1327
|
-
settings: {
|
|
1328
|
-
[key: string]: unknown;
|
|
1329
|
-
};
|
|
1330
2577
|
schedule_at: string | null;
|
|
1331
2578
|
result: {
|
|
1332
2579
|
platform_post_id: string;
|
|
@@ -1346,7 +2593,7 @@ declare function useCreatePost(profileId: string): {
|
|
|
1346
2593
|
} | null;
|
|
1347
2594
|
alt_text_override: string | null;
|
|
1348
2595
|
}>;
|
|
1349
|
-
}[];
|
|
2596
|
+
})[];
|
|
1350
2597
|
isReady: boolean;
|
|
1351
2598
|
connectedChannels: ("tiktok" | "x" | "linkedin" | "facebook_page" | "instagram")[];
|
|
1352
2599
|
};
|
|
@@ -1400,16 +2647,195 @@ declare function useUpdatePost(postId: string): _tanstack_react_query.UseMutatio
|
|
|
1400
2647
|
[key: string]: string | number | boolean;
|
|
1401
2648
|
};
|
|
1402
2649
|
variants: Array<{
|
|
2650
|
+
platform: "x";
|
|
2651
|
+
post_type: "text" | "single_image" | "multi_image" | "video";
|
|
2652
|
+
settings: {
|
|
2653
|
+
reply_settings?: "everyone" | "following" | "mentionedUsers" | "subscribers" | "verified";
|
|
2654
|
+
quote_tweet_id?: string;
|
|
2655
|
+
poll?: {
|
|
2656
|
+
options: Array<string>;
|
|
2657
|
+
duration_minutes: number;
|
|
2658
|
+
reply_settings?: "following" | "mentionedUsers" | "subscribers" | "verified";
|
|
2659
|
+
};
|
|
2660
|
+
reply?: {
|
|
2661
|
+
in_reply_to_tweet_id: string;
|
|
2662
|
+
exclude_reply_user_ids?: Array<string>;
|
|
2663
|
+
auto_populate_reply_metadata?: boolean;
|
|
2664
|
+
};
|
|
2665
|
+
community_id?: string;
|
|
2666
|
+
for_super_followers_only?: boolean;
|
|
2667
|
+
geo?: {
|
|
2668
|
+
place_id: string;
|
|
2669
|
+
};
|
|
2670
|
+
card_uri?: string;
|
|
2671
|
+
media_tagged_user_ids?: Array<string>;
|
|
2672
|
+
};
|
|
2673
|
+
id: string;
|
|
2674
|
+
object: "post_variant";
|
|
2675
|
+
connection_id: string | null;
|
|
2676
|
+
body: string | null;
|
|
2677
|
+
status: "draft" | "scheduled" | "publishing" | "published" | "failed";
|
|
2678
|
+
schedule_at: string | null;
|
|
2679
|
+
result: {
|
|
2680
|
+
platform_post_id: string;
|
|
2681
|
+
permalink: string | null;
|
|
2682
|
+
published_at: string;
|
|
2683
|
+
} | null;
|
|
2684
|
+
error: {
|
|
2685
|
+
code: string;
|
|
2686
|
+
message: string;
|
|
2687
|
+
display_error: string;
|
|
2688
|
+
} | null;
|
|
2689
|
+
media: Array<{
|
|
2690
|
+
media_id: string;
|
|
2691
|
+
position: number;
|
|
2692
|
+
crop_box: {
|
|
2693
|
+
[key: string]: unknown;
|
|
2694
|
+
} | null;
|
|
2695
|
+
alt_text_override: string | null;
|
|
2696
|
+
}>;
|
|
2697
|
+
} | {
|
|
2698
|
+
platform: "linkedin";
|
|
2699
|
+
post_type: "text" | "single_image" | "multi_image" | "video";
|
|
2700
|
+
settings: {
|
|
2701
|
+
visibility: "PUBLIC" | "CONNECTIONS";
|
|
2702
|
+
content_kind: "text" | "single_image" | "video" | "multi_image" | "document" | "article" | "poll";
|
|
2703
|
+
article?: {
|
|
2704
|
+
source: string;
|
|
2705
|
+
title?: string;
|
|
2706
|
+
description?: string;
|
|
2707
|
+
thumbnail_media_id?: string;
|
|
2708
|
+
};
|
|
2709
|
+
poll?: {
|
|
2710
|
+
question: string;
|
|
2711
|
+
options: Array<string>;
|
|
2712
|
+
duration: "ONE_DAY" | "THREE_DAYS" | "SEVEN_DAYS" | "FOURTEEN_DAYS";
|
|
2713
|
+
};
|
|
2714
|
+
document?: {
|
|
2715
|
+
title: string;
|
|
2716
|
+
};
|
|
2717
|
+
disable_reshare?: boolean;
|
|
2718
|
+
mentions?: Array<{
|
|
2719
|
+
type: "person" | "organization";
|
|
2720
|
+
name: string;
|
|
2721
|
+
urn: string;
|
|
2722
|
+
}>;
|
|
2723
|
+
};
|
|
2724
|
+
id: string;
|
|
2725
|
+
object: "post_variant";
|
|
2726
|
+
connection_id: string | null;
|
|
2727
|
+
body: string | null;
|
|
2728
|
+
status: "draft" | "scheduled" | "publishing" | "published" | "failed";
|
|
2729
|
+
schedule_at: string | null;
|
|
2730
|
+
result: {
|
|
2731
|
+
platform_post_id: string;
|
|
2732
|
+
permalink: string | null;
|
|
2733
|
+
published_at: string;
|
|
2734
|
+
} | null;
|
|
2735
|
+
error: {
|
|
2736
|
+
code: string;
|
|
2737
|
+
message: string;
|
|
2738
|
+
display_error: string;
|
|
2739
|
+
} | null;
|
|
2740
|
+
media: Array<{
|
|
2741
|
+
media_id: string;
|
|
2742
|
+
position: number;
|
|
2743
|
+
crop_box: {
|
|
2744
|
+
[key: string]: unknown;
|
|
2745
|
+
} | null;
|
|
2746
|
+
alt_text_override: string | null;
|
|
2747
|
+
}>;
|
|
2748
|
+
} | {
|
|
2749
|
+
platform: "facebook_page";
|
|
2750
|
+
post_type: "text" | "single_image" | "multi_image" | "reel";
|
|
2751
|
+
settings: {
|
|
2752
|
+
link?: string;
|
|
2753
|
+
};
|
|
2754
|
+
id: string;
|
|
2755
|
+
object: "post_variant";
|
|
2756
|
+
connection_id: string | null;
|
|
2757
|
+
body: string | null;
|
|
2758
|
+
status: "draft" | "scheduled" | "publishing" | "published" | "failed";
|
|
2759
|
+
schedule_at: string | null;
|
|
2760
|
+
result: {
|
|
2761
|
+
platform_post_id: string;
|
|
2762
|
+
permalink: string | null;
|
|
2763
|
+
published_at: string;
|
|
2764
|
+
} | null;
|
|
2765
|
+
error: {
|
|
2766
|
+
code: string;
|
|
2767
|
+
message: string;
|
|
2768
|
+
display_error: string;
|
|
2769
|
+
} | null;
|
|
2770
|
+
media: Array<{
|
|
2771
|
+
media_id: string;
|
|
2772
|
+
position: number;
|
|
2773
|
+
crop_box: {
|
|
2774
|
+
[key: string]: unknown;
|
|
2775
|
+
} | null;
|
|
2776
|
+
alt_text_override: string | null;
|
|
2777
|
+
}>;
|
|
2778
|
+
} | {
|
|
2779
|
+
platform: "instagram";
|
|
2780
|
+
post_type: "single_image" | "carousel" | "reel";
|
|
2781
|
+
settings: {
|
|
2782
|
+
media_type?: "IMAGE" | "CAROUSEL" | "REELS";
|
|
2783
|
+
location_id?: string;
|
|
2784
|
+
user_tags?: Array<{
|
|
2785
|
+
username: string;
|
|
2786
|
+
x: number;
|
|
2787
|
+
y: number;
|
|
2788
|
+
}>;
|
|
2789
|
+
collaborators?: Array<string>;
|
|
2790
|
+
share_to_feed?: boolean;
|
|
2791
|
+
thumb_offset?: number;
|
|
2792
|
+
cover_url?: string;
|
|
2793
|
+
audio_name?: string;
|
|
2794
|
+
};
|
|
1403
2795
|
id: string;
|
|
1404
2796
|
object: "post_variant";
|
|
1405
2797
|
connection_id: string | null;
|
|
1406
|
-
platform: "x" | "linkedin" | "facebook_page" | "instagram" | "tiktok";
|
|
1407
|
-
post_type: "text" | "single_image" | "multi_image" | "video" | "reel" | "carousel";
|
|
1408
2798
|
body: string | null;
|
|
1409
2799
|
status: "draft" | "scheduled" | "publishing" | "published" | "failed";
|
|
2800
|
+
schedule_at: string | null;
|
|
2801
|
+
result: {
|
|
2802
|
+
platform_post_id: string;
|
|
2803
|
+
permalink: string | null;
|
|
2804
|
+
published_at: string;
|
|
2805
|
+
} | null;
|
|
2806
|
+
error: {
|
|
2807
|
+
code: string;
|
|
2808
|
+
message: string;
|
|
2809
|
+
display_error: string;
|
|
2810
|
+
} | null;
|
|
2811
|
+
media: Array<{
|
|
2812
|
+
media_id: string;
|
|
2813
|
+
position: number;
|
|
2814
|
+
crop_box: {
|
|
2815
|
+
[key: string]: unknown;
|
|
2816
|
+
} | null;
|
|
2817
|
+
alt_text_override: string | null;
|
|
2818
|
+
}>;
|
|
2819
|
+
} | {
|
|
2820
|
+
platform: "tiktok";
|
|
2821
|
+
post_type: "video" | "single_image" | "carousel";
|
|
1410
2822
|
settings: {
|
|
1411
|
-
|
|
2823
|
+
privacy_level?: "PUBLIC_TO_EVERYONE" | "MUTUAL_FOLLOW_FRIENDS" | "FOLLOWER_OF_CREATOR" | "SELF_ONLY";
|
|
2824
|
+
disable_comment?: boolean;
|
|
2825
|
+
disable_duet?: boolean;
|
|
2826
|
+
disable_stitch?: boolean;
|
|
2827
|
+
video_cover_timestamp_ms?: number;
|
|
2828
|
+
photo_cover_index?: number;
|
|
2829
|
+
auto_add_music?: boolean;
|
|
2830
|
+
brand_content_toggle?: boolean;
|
|
2831
|
+
brand_organic_toggle?: boolean;
|
|
2832
|
+
is_aigc?: boolean;
|
|
1412
2833
|
};
|
|
2834
|
+
id: string;
|
|
2835
|
+
object: "post_variant";
|
|
2836
|
+
connection_id: string | null;
|
|
2837
|
+
body: string | null;
|
|
2838
|
+
status: "draft" | "scheduled" | "publishing" | "published" | "failed";
|
|
1413
2839
|
schedule_at: string | null;
|
|
1414
2840
|
result: {
|
|
1415
2841
|
platform_post_id: string;
|
|
@@ -1447,15 +2873,6 @@ declare function useUpdatePost(postId: string): _tanstack_react_query.UseMutatio
|
|
|
1447
2873
|
variants?: Array<{
|
|
1448
2874
|
platform: "x";
|
|
1449
2875
|
post_type: "text" | "single_image" | "multi_image" | "video";
|
|
1450
|
-
connection_id: string;
|
|
1451
|
-
body?: string;
|
|
1452
|
-
media?: Array<{
|
|
1453
|
-
media_id: string;
|
|
1454
|
-
crop_box?: {
|
|
1455
|
-
[key: string]: unknown;
|
|
1456
|
-
} | null;
|
|
1457
|
-
alt_text_override?: string | null;
|
|
1458
|
-
}>;
|
|
1459
2876
|
settings?: {
|
|
1460
2877
|
reply_settings?: "everyone" | "following" | "mentionedUsers" | "subscribers" | "verified";
|
|
1461
2878
|
quote_tweet_id?: string;
|
|
@@ -1477,9 +2894,6 @@ declare function useUpdatePost(postId: string): _tanstack_react_query.UseMutatio
|
|
|
1477
2894
|
card_uri?: string;
|
|
1478
2895
|
media_tagged_user_ids?: Array<string>;
|
|
1479
2896
|
};
|
|
1480
|
-
} | {
|
|
1481
|
-
platform: "linkedin";
|
|
1482
|
-
post_type: "text" | "single_image" | "multi_image" | "video";
|
|
1483
2897
|
connection_id: string;
|
|
1484
2898
|
body?: string;
|
|
1485
2899
|
media?: Array<{
|
|
@@ -1489,6 +2903,9 @@ declare function useUpdatePost(postId: string): _tanstack_react_query.UseMutatio
|
|
|
1489
2903
|
} | null;
|
|
1490
2904
|
alt_text_override?: string | null;
|
|
1491
2905
|
}>;
|
|
2906
|
+
} | {
|
|
2907
|
+
platform: "linkedin";
|
|
2908
|
+
post_type: "text" | "single_image" | "multi_image" | "video";
|
|
1492
2909
|
settings: {
|
|
1493
2910
|
visibility: "PUBLIC" | "CONNECTIONS";
|
|
1494
2911
|
content_kind: "text" | "single_image" | "video" | "multi_image" | "document" | "article" | "poll";
|
|
@@ -1513,9 +2930,6 @@ declare function useUpdatePost(postId: string): _tanstack_react_query.UseMutatio
|
|
|
1513
2930
|
urn: string;
|
|
1514
2931
|
}>;
|
|
1515
2932
|
};
|
|
1516
|
-
} | {
|
|
1517
|
-
platform: "instagram";
|
|
1518
|
-
post_type: "single_image" | "carousel" | "reel";
|
|
1519
2933
|
connection_id: string;
|
|
1520
2934
|
body?: string;
|
|
1521
2935
|
media?: Array<{
|
|
@@ -1525,6 +2939,9 @@ declare function useUpdatePost(postId: string): _tanstack_react_query.UseMutatio
|
|
|
1525
2939
|
} | null;
|
|
1526
2940
|
alt_text_override?: string | null;
|
|
1527
2941
|
}>;
|
|
2942
|
+
} | {
|
|
2943
|
+
platform: "instagram";
|
|
2944
|
+
post_type: "single_image" | "carousel" | "reel";
|
|
1528
2945
|
settings: {
|
|
1529
2946
|
media_type?: "IMAGE" | "CAROUSEL" | "REELS";
|
|
1530
2947
|
location_id?: string;
|
|
@@ -1539,9 +2956,6 @@ declare function useUpdatePost(postId: string): _tanstack_react_query.UseMutatio
|
|
|
1539
2956
|
cover_url?: string;
|
|
1540
2957
|
audio_name?: string;
|
|
1541
2958
|
};
|
|
1542
|
-
} | {
|
|
1543
|
-
platform: "facebook_page";
|
|
1544
|
-
post_type: "text" | "single_image" | "multi_image" | "reel";
|
|
1545
2959
|
connection_id: string;
|
|
1546
2960
|
body?: string;
|
|
1547
2961
|
media?: Array<{
|
|
@@ -1551,12 +2965,12 @@ declare function useUpdatePost(postId: string): _tanstack_react_query.UseMutatio
|
|
|
1551
2965
|
} | null;
|
|
1552
2966
|
alt_text_override?: string | null;
|
|
1553
2967
|
}>;
|
|
2968
|
+
} | {
|
|
2969
|
+
platform: "facebook_page";
|
|
2970
|
+
post_type: "text" | "single_image" | "multi_image" | "reel";
|
|
1554
2971
|
settings?: {
|
|
1555
2972
|
link?: string;
|
|
1556
2973
|
};
|
|
1557
|
-
} | {
|
|
1558
|
-
platform: "tiktok";
|
|
1559
|
-
post_type: "video" | "single_image" | "carousel";
|
|
1560
2974
|
connection_id: string;
|
|
1561
2975
|
body?: string;
|
|
1562
2976
|
media?: Array<{
|
|
@@ -1566,6 +2980,9 @@ declare function useUpdatePost(postId: string): _tanstack_react_query.UseMutatio
|
|
|
1566
2980
|
} | null;
|
|
1567
2981
|
alt_text_override?: string | null;
|
|
1568
2982
|
}>;
|
|
2983
|
+
} | {
|
|
2984
|
+
platform: "tiktok";
|
|
2985
|
+
post_type: "video" | "single_image" | "carousel";
|
|
1569
2986
|
settings?: {
|
|
1570
2987
|
privacy_level?: "PUBLIC_TO_EVERYONE" | "MUTUAL_FOLLOW_FRIENDS" | "FOLLOWER_OF_CREATOR" | "SELF_ONLY";
|
|
1571
2988
|
disable_comment?: boolean;
|
|
@@ -1578,6 +2995,15 @@ declare function useUpdatePost(postId: string): _tanstack_react_query.UseMutatio
|
|
|
1578
2995
|
brand_organic_toggle?: boolean;
|
|
1579
2996
|
is_aigc?: boolean;
|
|
1580
2997
|
};
|
|
2998
|
+
connection_id: string;
|
|
2999
|
+
body?: string;
|
|
3000
|
+
media?: Array<{
|
|
3001
|
+
media_id: string;
|
|
3002
|
+
crop_box?: {
|
|
3003
|
+
[key: string]: unknown;
|
|
3004
|
+
} | null;
|
|
3005
|
+
alt_text_override?: string | null;
|
|
3006
|
+
}>;
|
|
1581
3007
|
}>;
|
|
1582
3008
|
}, unknown>;
|
|
1583
3009
|
/** Delete a post by id; on success the lists refresh and its detail is dropped. */
|
|
@@ -1617,6 +3043,27 @@ declare function useTikTokCreatorInfo(connectionId: string | null): _tanstack_re
|
|
|
1617
3043
|
max_video_duration_sec: number;
|
|
1618
3044
|
}>, Error>;
|
|
1619
3045
|
|
|
3046
|
+
/**
|
|
3047
|
+
* A platform's FETCHED (read) variant — one member of a stored `Post`'s
|
|
3048
|
+
* `variants`, as returned by `usePost`/`usePosts`/the calendar. Since the API's
|
|
3049
|
+
* read variant is now a typed discriminated union, it carries the SAME typed
|
|
3050
|
+
* `settings`/`body`/`post_type`/`media` the write variant does, plus the
|
|
3051
|
+
* read-only `id`/`status`/`result`/`error`.
|
|
3052
|
+
*/
|
|
3053
|
+
type ReadPostVariant<P extends PostVariant['platform']> = Extract<PostVariant, {
|
|
3054
|
+
platform: P;
|
|
3055
|
+
}>;
|
|
3056
|
+
/**
|
|
3057
|
+
* What a preview's `variant` prop accepts: EITHER the compose-time **write**
|
|
3058
|
+
* variant (`XPostVariant`, …) OR the fetched **read** variant. Both expose the
|
|
3059
|
+
* typed `settings`, `body`, `post_type`, and `media[].alt_text_override` the cards
|
|
3060
|
+
* read — so you can hand a preview a post you just built OR one you fetched from
|
|
3061
|
+
* the API, with no transform.
|
|
3062
|
+
*/
|
|
3063
|
+
type XPreviewVariant = XPostVariant | ReadPostVariant<'x'>;
|
|
3064
|
+
type LinkedInPreviewVariant = LinkedInPostVariant | ReadPostVariant<'linkedin'>;
|
|
3065
|
+
type TikTokPreviewVariant = TikTokPostVariant | ReadPostVariant<'tiktok'>;
|
|
3066
|
+
type InstagramPreviewVariant = InstagramPostVariant | ReadPostVariant<'instagram'>;
|
|
1620
3067
|
/**
|
|
1621
3068
|
* Public input types for the post-preview components.
|
|
1622
3069
|
*
|
|
@@ -1716,8 +3163,9 @@ interface XPreviewQuotedTweet {
|
|
|
1716
3163
|
declare function toPreviewMedia(items: readonly MediaUploadItem[]): PreviewMedia[];
|
|
1717
3164
|
|
|
1718
3165
|
interface XPostPreviewProps {
|
|
1719
|
-
/** The X variant
|
|
1720
|
-
|
|
3166
|
+
/** The X variant — either a compose-time write variant or a fetched read
|
|
3167
|
+
* variant (both carry the typed settings/body the card renders). */
|
|
3168
|
+
variant: XPreviewVariant;
|
|
1721
3169
|
/** Author identity (not stored on our connection — supplied by you). */
|
|
1722
3170
|
author: XPreviewAuthor;
|
|
1723
3171
|
/** Resolved media pixels (URLs or compose-time File blobs). */
|
|
@@ -1789,8 +3237,9 @@ type LinkedInTheme = 'light' | 'dark' | 'auto';
|
|
|
1789
3237
|
* the `--pr-li-*` CSS variables the card reads.
|
|
1790
3238
|
*/
|
|
1791
3239
|
interface LinkedInPostPreviewProps {
|
|
1792
|
-
/** The LinkedIn variant
|
|
1793
|
-
|
|
3240
|
+
/** The LinkedIn variant — either a compose-time write variant or a fetched read
|
|
3241
|
+
* variant (both carry the typed settings/body the card renders). */
|
|
3242
|
+
variant: LinkedInPreviewVariant;
|
|
1794
3243
|
/** Author identity (LinkedIn stores no avatar/headline on our connection). */
|
|
1795
3244
|
author: LinkedInPreviewAuthor;
|
|
1796
3245
|
/** Resolved media pixels (URLs or compose-time File blobs). */
|
|
@@ -1880,8 +3329,9 @@ type InstagramTheme = 'light' | 'dark' | 'auto';
|
|
|
1880
3329
|
* already-published posts), referencing the real IG feed + Postiz.
|
|
1881
3330
|
*/
|
|
1882
3331
|
interface InstagramPostPreviewProps {
|
|
1883
|
-
/** The Instagram variant
|
|
1884
|
-
|
|
3332
|
+
/** The Instagram variant — either a compose-time write variant or a fetched
|
|
3333
|
+
* read variant (both carry the typed settings/body the card renders). */
|
|
3334
|
+
variant: InstagramPreviewVariant;
|
|
1885
3335
|
/** Author identity (SDK-driven; `verified` is a presentation extra). */
|
|
1886
3336
|
author: InstagramPreviewAuthor;
|
|
1887
3337
|
/** Resolved media pixels (processed URLs or compose-time File blobs). */
|
|
@@ -1925,8 +3375,9 @@ declare function ReelPreview({ author, body, media, pending, audioName, classNam
|
|
|
1925
3375
|
* chunks add the editable caption + the consent-gated Post button.
|
|
1926
3376
|
*/
|
|
1927
3377
|
interface TikTokPostPreviewProps {
|
|
1928
|
-
/** The TikTok variant
|
|
1929
|
-
|
|
3378
|
+
/** The TikTok variant — either a compose-time write variant or a fetched read
|
|
3379
|
+
* variant (both carry the typed settings/body the card renders). */
|
|
3380
|
+
variant: TikTokPreviewVariant;
|
|
1930
3381
|
/** Live creator info (nickname/avatar, audience options, interaction flags). */
|
|
1931
3382
|
creatorInfo: TikTokCreatorInfo;
|
|
1932
3383
|
/** Resolved media pixels (processed URLs or compose-time File blobs). */
|
|
@@ -2048,4 +3499,4 @@ declare function Declaration({ brandedContent }: {
|
|
|
2048
3499
|
brandedContent: boolean;
|
|
2049
3500
|
}): react.JSX.Element;
|
|
2050
3501
|
|
|
2051
|
-
export { ArticleCard, type ArticleCardProps, AudienceSelect, type CalendarFilters, CommercialDisclosure, Connect, type ConnectErrorReason, type ConnectOutcome, type ConnectProps, type ConnectRenderApi, type ConnectState, type ConnectionIdentity, type ConnectionsFilter, Declaration, type DiscoverableAccount, DocumentCard, type DocumentCardProps, type InfiniteList, InstagramPostPreview, type InstagramPostPreviewProps, type InstagramPreviewAuthor, type InstagramTheme, InteractionToggles, LinkedInPostPreview, type LinkedInPostPreviewProps, type LinkedInPreviewAuthor, type LiveOptions, type MediaUploadItem, type MediaUploadOptions, type MediaUploadStatus, Poll, type PollProps, type PostrunContextValue, PostrunProvider, type PostrunProviderProps, type PreviewMedia, type PreviewMediaKind, ReelPreview, type ReelPreviewProps, type ResolvedMedia, TikTokCaptionField, type TikTokCaptionFieldProps, TikTokPostPreview, type TikTokPostPreviewProps, TikTokPublishPanel, type TikTokPublishPanelProps, type TikTokTheme,
|
|
3502
|
+
export { ArticleCard, type ArticleCardProps, AudienceSelect, type CalendarFilters, CommercialDisclosure, Connect, type ConnectErrorReason, type ConnectOutcome, type ConnectProps, type ConnectRenderApi, type ConnectState, type ConnectionIdentity, type ConnectionsFilter, Declaration, type DiscoverableAccount, DocumentCard, type DocumentCardProps, type InfiniteList, InstagramPostPreview, type InstagramPostPreviewProps, type InstagramPreviewAuthor, type InstagramPreviewVariant, type InstagramTheme, InteractionToggles, LinkedInPostPreview, type LinkedInPostPreviewProps, type LinkedInPreviewAuthor, type LinkedInPreviewVariant, type LiveOptions, type MediaUploadItem, type MediaUploadOptions, type MediaUploadStatus, Poll, type PollProps, type PostrunContextValue, PostrunProvider, type PostrunProviderProps, type PreviewMedia, type PreviewMediaKind, type ReadPostVariant, ReelPreview, type ReelPreviewProps, type ResolvedMedia, TikTokCaptionField, type TikTokCaptionFieldProps, TikTokPostPreview, type TikTokPostPreviewProps, type TikTokPreviewVariant, TikTokPublishPanel, type TikTokPublishPanelProps, type TikTokTheme, type UseConnectParams, type UseConnectResult, type UseMediaUploadOptions, type UseMediaUploadResult, XPoll, type XPollProps, XPostPreview, type XPostPreviewProps, type XPreviewAuthor, type XPreviewMedia, type XPreviewQuotedTweet, type XPreviewVariant, connectionKeys, mediaKeys, postKeys, profileKeys, tiktokKeys, toPreviewMedia, 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 };
|