@publishq/sdk 0.0.1 → 0.0.3
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/README.md +6 -6
- package/dist/index.cjs +280 -16
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +798 -27
- package/dist/index.d.ts +798 -27
- package/dist/index.js +267 -16
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.d.cts
CHANGED
|
@@ -343,7 +343,7 @@ type ApiError = {
|
|
|
343
343
|
};
|
|
344
344
|
};
|
|
345
345
|
};
|
|
346
|
-
type ApiErrorCode = 'missing_auth' | 'invalid_auth_format' | 'invalid_api_key' | 'api_key_expired' | 'insufficient_scope' | 'validation_failed' | 'route_not_found' | 'internal_server_error' | 'rate_limit_exceeded' | 'post_not_found' | 'post_forbidden' | 'post_not_editable' | 'media_not_found' | 'media_in_use' | 'storage_limit_exceeded' | 'free_media_limit_exceeded' | 'free_pending_media_limit_exceeded' | 'file_required' | 'file_too_large' | 'unsupported_file_type' | 'unsupported_media_type' | 'invalid_file_extension' | 'social_accounts_not_found' | 'social_accounts_expired' | 'platform_validation_failed' | 'posting_limits_exceeded' | 'scheduled_at_required' | 'invalid_scheduled_at' | 'scheduled_at_too_soon' | 'reschedulable_posts_not_found' | 'workspace_not_found' | 'workspace_forbidden' | 'workspace_owner_required' | 'workspace_account_not_found' | 'workspace_account_conflict' | 'workspace_member_not_found' | 'workspace_member_conflict' | 'workspace_invitation_invalid' | 'workspace_invitation_expired';
|
|
346
|
+
type ApiErrorCode = 'missing_auth' | 'invalid_auth_format' | 'invalid_api_key' | 'api_key_expired' | 'insufficient_scope' | 'validation_failed' | 'route_not_found' | 'internal_server_error' | 'rate_limit_exceeded' | 'post_not_found' | 'post_forbidden' | 'post_not_editable' | 'media_not_found' | 'media_in_use' | 'media_upload_incomplete' | 'storage_limit_exceeded' | 'free_media_limit_exceeded' | 'free_pending_media_limit_exceeded' | 'file_required' | 'file_too_large' | 'unsupported_file_type' | 'unsupported_media_type' | 'invalid_file_extension' | 'social_accounts_not_found' | 'social_accounts_expired' | 'social_account_limit_exceeded' | 'platform_temporarily_unavailable' | 'platform_permission_missing' | 'platform_validation_failed' | 'posting_limits_exceeded' | 'scheduled_at_required' | 'invalid_scheduled_at' | 'scheduled_at_too_soon' | 'reschedulable_posts_not_found' | 'workspace_not_found' | 'workspace_forbidden' | 'workspace_owner_required' | 'workspace_limit_exceeded' | 'workspace_account_not_found' | 'workspace_account_conflict' | 'workspace_member_not_found' | 'workspace_member_conflict' | 'team_member_limit_exceeded' | 'workspace_invitation_invalid' | 'workspace_invitation_expired';
|
|
347
347
|
type Pagination = {
|
|
348
348
|
/**
|
|
349
349
|
* Current page number (starting from 1).
|
|
@@ -468,6 +468,10 @@ type YouTubePlatformSpecificSettings = {
|
|
|
468
468
|
* Playlist ID to add the video to after upload.
|
|
469
469
|
*/
|
|
470
470
|
playlistId?: string;
|
|
471
|
+
/**
|
|
472
|
+
* ID of an image in your media library to set as the custom thumbnail of this video. JPEG or PNG, up to 50MB; YouTube recommends 1280x720 (16:9). Upload the image with the media endpoints first. The thumbnail is set right after the video uploads. If YouTube refuses it (custom thumbnails need a verified channel), the video still publishes and `thumbnail` on the account says why. To replace it on a draft or scheduled post, update the account with the new id; to remove it, send `thumbnailMediaId: null`.
|
|
473
|
+
*/
|
|
474
|
+
thumbnailMediaId?: string;
|
|
471
475
|
};
|
|
472
476
|
/**
|
|
473
477
|
* TikTokPlatformSpecificSettings
|
|
@@ -582,6 +586,64 @@ type TwitterPlatformSpecificSettings = {
|
|
|
582
586
|
durationMinutes: number;
|
|
583
587
|
};
|
|
584
588
|
};
|
|
589
|
+
/**
|
|
590
|
+
* Where the post came from. PUBLISHQ: created in PublishQ. IMPORTED: published directly on the platform and discovered during an analytics sync, so the post history stays complete.
|
|
591
|
+
*/
|
|
592
|
+
type PostSource = 'PUBLISHQ' | 'IMPORTED';
|
|
593
|
+
type PostAnalytics = {
|
|
594
|
+
/**
|
|
595
|
+
* Views the platform reports for this post.
|
|
596
|
+
*/
|
|
597
|
+
views: number;
|
|
598
|
+
/**
|
|
599
|
+
* Likes the platform reports for this post.
|
|
600
|
+
*/
|
|
601
|
+
likes: number;
|
|
602
|
+
/**
|
|
603
|
+
* Comments the platform reports for this post.
|
|
604
|
+
*/
|
|
605
|
+
comments: number;
|
|
606
|
+
/**
|
|
607
|
+
* Shares the platform reports for this post. 0 on platforms that do not disclose it (including YouTube).
|
|
608
|
+
*/
|
|
609
|
+
shares: number;
|
|
610
|
+
/**
|
|
611
|
+
* Metrics only this platform reports, keyed by metric name — Bluesky bookmarks, for example. Every metric the platform reports is always present, 0 included, so no key has to be guessed. Empty on platforms that expose nothing beyond the fields above, and a metric that already has its own field is never repeated here.
|
|
612
|
+
*/
|
|
613
|
+
extraMetrics: {
|
|
614
|
+
[key: string]: number;
|
|
615
|
+
};
|
|
616
|
+
/**
|
|
617
|
+
* When these numbers were last recorded. Metrics are refreshed in the background roughly once a day, and only stored when they change.
|
|
618
|
+
*/
|
|
619
|
+
syncedAt: string;
|
|
620
|
+
};
|
|
621
|
+
type PublishFailure = {
|
|
622
|
+
/**
|
|
623
|
+
* What kind of action this failure needs. `RECONNECT`: the account has to be reconnected. `MEDIA`: the platform refused the attached file. `ACCOUNT_STATE`: the platform is blocking this account, so the fix is on the platform. `TRANSIENT`: the platform was unavailable and the same request can succeed unchanged. `MAYBE_PUBLISHED`: the platform reported an error for a post that may have gone out anyway. `UNKNOWN`: unrecognised, so read `errorMessage`.
|
|
624
|
+
*/
|
|
625
|
+
kind: 'RECONNECT' | 'MEDIA' | 'ACCOUNT_STATE' | 'TRANSIENT' | 'MAYBE_PUBLISHED' | 'UNKNOWN';
|
|
626
|
+
/**
|
|
627
|
+
* Short label for this failure.
|
|
628
|
+
*/
|
|
629
|
+
title: string;
|
|
630
|
+
/**
|
|
631
|
+
* One sentence about what the platform did.
|
|
632
|
+
*/
|
|
633
|
+
whatHappened: string;
|
|
634
|
+
/**
|
|
635
|
+
* One sentence naming the next action.
|
|
636
|
+
*/
|
|
637
|
+
whatToDo: string;
|
|
638
|
+
/**
|
|
639
|
+
* Whether retrying can succeed. False when the platform is blocking the account, since the same request will be refused the same way.
|
|
640
|
+
*/
|
|
641
|
+
canRetry: boolean;
|
|
642
|
+
/**
|
|
643
|
+
* Whether the post may already be live. A publish is not idempotent and no platform accepts a deduplication key, so when this is true a retry can create a second copy: check the profile before retrying.
|
|
644
|
+
*/
|
|
645
|
+
checkPlatformFirst: boolean;
|
|
646
|
+
};
|
|
585
647
|
type PostAccount = {
|
|
586
648
|
/**
|
|
587
649
|
* The connected social account identifier.
|
|
@@ -605,6 +667,15 @@ type PostAccount = {
|
|
|
605
667
|
* Error message from the platform if publishing failed for this account.
|
|
606
668
|
*/
|
|
607
669
|
errorMessage?: string;
|
|
670
|
+
/**
|
|
671
|
+
* Present on a published account whose post set a custom thumbnail: whether the platform applied it, and if not, why. The post itself is live either way.
|
|
672
|
+
*/
|
|
673
|
+
thumbnail?: {
|
|
674
|
+
status: 'APPLIED' | 'FAILED';
|
|
675
|
+
errorMessage?: string;
|
|
676
|
+
};
|
|
677
|
+
failure?: PublishFailure & unknown;
|
|
678
|
+
analytics?: PostAnalytics & unknown;
|
|
608
679
|
postOverrides?: PostOverrides;
|
|
609
680
|
platformSpecificSettings?: PlatformSpecificSettings;
|
|
610
681
|
};
|
|
@@ -620,7 +691,7 @@ type PostOverrides = {
|
|
|
620
691
|
*/
|
|
621
692
|
thumbnailTimestamp?: number;
|
|
622
693
|
/**
|
|
623
|
-
* Replacement media for this account. Completely replaces the post-level media.
|
|
694
|
+
* Replacement media for this account. Completely replaces the post-level media. Up to 35.
|
|
624
695
|
*/
|
|
625
696
|
mediaIds?: Array<string>;
|
|
626
697
|
};
|
|
@@ -660,6 +731,10 @@ type PlatformSpecificSettings = {
|
|
|
660
731
|
* Playlist ID to add the video to after upload.
|
|
661
732
|
*/
|
|
662
733
|
playlistId?: string;
|
|
734
|
+
/**
|
|
735
|
+
* ID of an image in your media library to set as the custom thumbnail of this video. JPEG or PNG, up to 50MB; YouTube recommends 1280x720 (16:9). Upload the image with the media endpoints first. The thumbnail is set right after the video uploads. If YouTube refuses it (custom thumbnails need a verified channel), the video still publishes and `thumbnail` on the account says why. To replace it on a draft or scheduled post, update the account with the new id; to remove it, send `thumbnailMediaId: null`.
|
|
736
|
+
*/
|
|
737
|
+
thumbnailMediaId?: string;
|
|
663
738
|
} | {
|
|
664
739
|
/**
|
|
665
740
|
* Who can view this post. The value must match one of the options returned by the TikTok creator_info/query endpoint for the target account.
|
|
@@ -793,6 +868,7 @@ type Post = {
|
|
|
793
868
|
*/
|
|
794
869
|
content: string;
|
|
795
870
|
status: PostStatus;
|
|
871
|
+
source: PostSource;
|
|
796
872
|
/**
|
|
797
873
|
* Human-readable error summary when one or more accounts failed.
|
|
798
874
|
*/
|
|
@@ -835,7 +911,7 @@ type CreatePostRequest = {
|
|
|
835
911
|
*/
|
|
836
912
|
content?: string;
|
|
837
913
|
/**
|
|
838
|
-
* Media to attach to the post. Shared across all accounts unless an account provides its own mediaIds in postOverrides.
|
|
914
|
+
* Media to attach to the post, up to 35. Shared across all accounts unless an account provides its own mediaIds in postOverrides. Accepts IDs from Upload media and from Create media upload.
|
|
839
915
|
*/
|
|
840
916
|
mediaIds?: Array<string>;
|
|
841
917
|
/**
|
|
@@ -847,7 +923,7 @@ type CreatePostRequest = {
|
|
|
847
923
|
*/
|
|
848
924
|
accounts: Array<CreatePostAccount>;
|
|
849
925
|
/**
|
|
850
|
-
* Schedule the post for a future date. If omitted and publishNow is false or absent, the post is saved as a draft.
|
|
926
|
+
* Schedule the post for a future date. If omitted and publishNow is false or absent, the post is saved as a draft. Accepts UTC (2026-04-01T12:00:00Z) or an explicit UTC offset (2026-04-01T14:00:00+02:00); a time without zone information is rejected.
|
|
851
927
|
*/
|
|
852
928
|
scheduledAt?: string;
|
|
853
929
|
/**
|
|
@@ -864,7 +940,7 @@ type CreatePostAccount = {
|
|
|
864
940
|
platformSpecificSettings?: PlatformSpecificSettings & unknown;
|
|
865
941
|
};
|
|
866
942
|
/**
|
|
867
|
-
* Update a draft or scheduled post. Published and publishing posts cannot be updated. Media behavior is explicit: omit mediaIds to keep existing media unchanged, provide mediaIds to replace all current media, or provide an empty mediaIds array to remove all media.
|
|
943
|
+
* Update a draft or scheduled post. Published and publishing posts cannot be updated. Only the fields you send change; everything you leave out keeps its current value. To remove an account setting, or an account's own text, media or thumbnail timestamp, send it as null. Media behavior is explicit: omit mediaIds to keep existing media unchanged, provide mediaIds to replace all current media, or provide an empty mediaIds array to remove all media. The post that results from the update is validated as a whole before anything is saved.
|
|
868
944
|
*/
|
|
869
945
|
type UpdatePostRequest = {
|
|
870
946
|
/**
|
|
@@ -872,11 +948,11 @@ type UpdatePostRequest = {
|
|
|
872
948
|
*/
|
|
873
949
|
content?: string;
|
|
874
950
|
/**
|
|
875
|
-
* New scheduled date for the post. Must be at least 1 minute in the future.
|
|
951
|
+
* New scheduled date for the post. Must be at least 1 minute in the future. Accepts UTC (2026-04-15T14:00:00Z) or an explicit UTC offset (2026-04-15T16:00:00+02:00); a time without zone information is rejected.
|
|
876
952
|
*/
|
|
877
953
|
scheduledAt?: string;
|
|
878
954
|
/**
|
|
879
|
-
* Full replacement for the post media. If omitted, the existing media stays unchanged. If provided, it replaces the current media across all accounts in the post. Send an empty array to remove all media from the post.
|
|
955
|
+
* Full replacement for the post media, up to 35. If omitted, the existing media stays unchanged. If provided, it replaces the current media across all accounts in the post. Send an empty array to remove all media from the post.
|
|
880
956
|
*/
|
|
881
957
|
mediaIds?: Array<string>;
|
|
882
958
|
/**
|
|
@@ -884,14 +960,39 @@ type UpdatePostRequest = {
|
|
|
884
960
|
*/
|
|
885
961
|
thumbnailTimestamp?: number;
|
|
886
962
|
/**
|
|
887
|
-
* Accounts
|
|
963
|
+
* Accounts to change, plus any connected accounts to add to the post. For an account already in the post, only the fields you send change: omitted fields keep their current value and a field sent as null is removed. Existing accounts left out of this array stay unchanged; remove an account through the account-specific delete endpoint.
|
|
888
964
|
*/
|
|
889
|
-
accounts?: Array<
|
|
965
|
+
accounts?: Array<UpdatePostAccount>;
|
|
890
966
|
/**
|
|
891
967
|
* Publish an existing draft immediately. Cannot be combined with scheduledAt.
|
|
892
968
|
*/
|
|
893
969
|
publishNow?: boolean;
|
|
894
970
|
};
|
|
971
|
+
type UpdatePostAccount = {
|
|
972
|
+
/**
|
|
973
|
+
* ID of a connected social account to post to.
|
|
974
|
+
*/
|
|
975
|
+
accountId: string;
|
|
976
|
+
postOverrides?: UpdatePostOverrides;
|
|
977
|
+
platformSpecificSettings?: PlatformSpecificSettings & unknown;
|
|
978
|
+
};
|
|
979
|
+
/**
|
|
980
|
+
* Override the post-level content, media or thumbnail timestamp for this specific account.
|
|
981
|
+
*/
|
|
982
|
+
type UpdatePostOverrides = {
|
|
983
|
+
/**
|
|
984
|
+
* Custom text for this account. Omit it to keep the current text, or send null to drop the custom text so the account uses the post-level content again.
|
|
985
|
+
*/
|
|
986
|
+
content?: string | null;
|
|
987
|
+
/**
|
|
988
|
+
* Media for this account only, up to 35, replacing what it has now. Omit it to keep the account's media, or send null so the account uses the post-level media again. Replacing it resets the account's thumbnail timestamp unless you send one too.
|
|
989
|
+
*/
|
|
990
|
+
mediaIds?: Array<string> | null;
|
|
991
|
+
/**
|
|
992
|
+
* Video thumbnail timestamp in milliseconds for this account. Applies to Instagram and TikTok. Omit it to keep the current one, or send null to use the post's own.
|
|
993
|
+
*/
|
|
994
|
+
thumbnailTimestamp?: number | null;
|
|
995
|
+
};
|
|
895
996
|
type SuccessMessage = {
|
|
896
997
|
deleted: true;
|
|
897
998
|
id: string;
|
|
@@ -1013,6 +1114,34 @@ type MediaListResponse = {
|
|
|
1013
1114
|
type UploadMediaRequest = {
|
|
1014
1115
|
file: Blob | File;
|
|
1015
1116
|
};
|
|
1117
|
+
type CreateMediaUploadRequest = {
|
|
1118
|
+
/**
|
|
1119
|
+
* Name of the file you are uploading.
|
|
1120
|
+
*/
|
|
1121
|
+
filename: string;
|
|
1122
|
+
/**
|
|
1123
|
+
* Content type of the file. One of: image/jpeg, image/png, image/gif, image/webp, video/mp4, video/webm, video/quicktime, video/x-msvideo.
|
|
1124
|
+
*/
|
|
1125
|
+
contentType: string;
|
|
1126
|
+
/**
|
|
1127
|
+
* Exact size of the file in bytes. Your plan's file size limit and your storage are checked before you upload, and storage refuses a file of any other size. Each platform's own size limits are checked when you attach the media to a post.
|
|
1128
|
+
*/
|
|
1129
|
+
fileSize: number;
|
|
1130
|
+
};
|
|
1131
|
+
type MediaUpload = {
|
|
1132
|
+
/**
|
|
1133
|
+
* Media ID of the file. Attach it to posts through mediaIds once the file is uploaded.
|
|
1134
|
+
*/
|
|
1135
|
+
id: string;
|
|
1136
|
+
/**
|
|
1137
|
+
* Signed storage URL. PUT the file to it with the same Content-Type. It goes to storage, not to the PublishQ API, so send no Authorization header.
|
|
1138
|
+
*/
|
|
1139
|
+
uploadUrl: string;
|
|
1140
|
+
/**
|
|
1141
|
+
* When uploadUrl stops accepting the file, 1 hour after it is created.
|
|
1142
|
+
*/
|
|
1143
|
+
expiresAt: string;
|
|
1144
|
+
};
|
|
1016
1145
|
type TikTokCreatorInfoResponse = {
|
|
1017
1146
|
/**
|
|
1018
1147
|
* Privacy levels available for this account. Use one of these values as `privacyLevel` in `platformSpecificSettings`.
|
|
@@ -1048,6 +1177,14 @@ type ListPostsData = {
|
|
|
1048
1177
|
* Page size. Max 100.
|
|
1049
1178
|
*/
|
|
1050
1179
|
limit?: number;
|
|
1180
|
+
/**
|
|
1181
|
+
* Also return posts imported from a connected platform (posts with source IMPORTED). Defaults to false: only posts created through PublishQ are returned.
|
|
1182
|
+
*/
|
|
1183
|
+
includeImported?: boolean;
|
|
1184
|
+
/**
|
|
1185
|
+
* Return ONLY posts imported from a connected platform. Cannot be combined with includeImported.
|
|
1186
|
+
*/
|
|
1187
|
+
onlyImported?: boolean;
|
|
1051
1188
|
};
|
|
1052
1189
|
url: '/posts';
|
|
1053
1190
|
};
|
|
@@ -1092,6 +1229,18 @@ type CreatePostErrors = {
|
|
|
1092
1229
|
* API key lacks the required scope
|
|
1093
1230
|
*/
|
|
1094
1231
|
403: ApiError;
|
|
1232
|
+
/**
|
|
1233
|
+
* A media ID from Create media upload whose file has not been uploaded yet
|
|
1234
|
+
*/
|
|
1235
|
+
409: ApiError;
|
|
1236
|
+
/**
|
|
1237
|
+
* A media ID from Create media upload whose file is over the size limit, or does not fit in your plan storage
|
|
1238
|
+
*/
|
|
1239
|
+
413: ApiError;
|
|
1240
|
+
/**
|
|
1241
|
+
* A media ID from Create media upload whose file is not a supported type
|
|
1242
|
+
*/
|
|
1243
|
+
415: ApiError;
|
|
1095
1244
|
/**
|
|
1096
1245
|
* Rate limit exceeded
|
|
1097
1246
|
*/
|
|
@@ -1199,9 +1348,17 @@ type UpdatePostErrors = {
|
|
|
1199
1348
|
*/
|
|
1200
1349
|
404: ApiError;
|
|
1201
1350
|
/**
|
|
1202
|
-
* Post cannot be updated (already published or publishing)
|
|
1351
|
+
* Post cannot be updated (already published or publishing), or a media ID from Create media upload whose file has not been uploaded yet
|
|
1203
1352
|
*/
|
|
1204
1353
|
409: ApiError;
|
|
1354
|
+
/**
|
|
1355
|
+
* A media ID from Create media upload whose file is over the size limit, or does not fit in your plan storage
|
|
1356
|
+
*/
|
|
1357
|
+
413: ApiError;
|
|
1358
|
+
/**
|
|
1359
|
+
* A media ID from Create media upload whose file is not a supported type
|
|
1360
|
+
*/
|
|
1361
|
+
415: ApiError;
|
|
1205
1362
|
/**
|
|
1206
1363
|
* Rate limit exceeded
|
|
1207
1364
|
*/
|
|
@@ -1293,9 +1450,13 @@ type GetTikTokCreatorInfoData = {
|
|
|
1293
1450
|
};
|
|
1294
1451
|
type GetTikTokCreatorInfoErrors = {
|
|
1295
1452
|
/**
|
|
1296
|
-
* Invalid or missing API key
|
|
1453
|
+
* Invalid or missing API key, or the TikTok connection expired and has to be reconnected
|
|
1297
1454
|
*/
|
|
1298
1455
|
401: ApiError;
|
|
1456
|
+
/**
|
|
1457
|
+
* TikTok has not granted a permission this call needs. The connection is otherwise intact and is left in place; reconnecting the account is what grants it.
|
|
1458
|
+
*/
|
|
1459
|
+
403: ApiError;
|
|
1299
1460
|
/**
|
|
1300
1461
|
* Account not found or not a TikTok account
|
|
1301
1462
|
*/
|
|
@@ -1304,6 +1465,10 @@ type GetTikTokCreatorInfoErrors = {
|
|
|
1304
1465
|
* Rate limit exceeded
|
|
1305
1466
|
*/
|
|
1306
1467
|
429: ApiError;
|
|
1468
|
+
/**
|
|
1469
|
+
* TikTok could not be reached. The values are read live from TikTok on every call, so no cached copy is returned in their place — retry shortly.
|
|
1470
|
+
*/
|
|
1471
|
+
503: ApiError;
|
|
1307
1472
|
};
|
|
1308
1473
|
type GetTikTokCreatorInfoError = GetTikTokCreatorInfoErrors[keyof GetTikTokCreatorInfoErrors];
|
|
1309
1474
|
type GetTikTokCreatorInfoResponses = {
|
|
@@ -1522,6 +1687,100 @@ type GetMediaResponses = {
|
|
|
1522
1687
|
200: Media$1;
|
|
1523
1688
|
};
|
|
1524
1689
|
type GetMediaResponse = GetMediaResponses[keyof GetMediaResponses];
|
|
1690
|
+
type CreateMediaUploadData = {
|
|
1691
|
+
body: CreateMediaUploadRequest;
|
|
1692
|
+
path?: never;
|
|
1693
|
+
query?: never;
|
|
1694
|
+
url: '/media/uploads';
|
|
1695
|
+
};
|
|
1696
|
+
type CreateMediaUploadErrors = {
|
|
1697
|
+
/**
|
|
1698
|
+
* Invalid upload request
|
|
1699
|
+
*/
|
|
1700
|
+
400: ApiError;
|
|
1701
|
+
/**
|
|
1702
|
+
* Invalid or missing API key
|
|
1703
|
+
*/
|
|
1704
|
+
401: ApiError;
|
|
1705
|
+
/**
|
|
1706
|
+
* Plan media limit reached
|
|
1707
|
+
*/
|
|
1708
|
+
402: ApiError;
|
|
1709
|
+
/**
|
|
1710
|
+
* API key lacks the required scope
|
|
1711
|
+
*/
|
|
1712
|
+
403: ApiError;
|
|
1713
|
+
/**
|
|
1714
|
+
* File too large, or not enough storage left on your plan
|
|
1715
|
+
*/
|
|
1716
|
+
413: ApiError;
|
|
1717
|
+
/**
|
|
1718
|
+
* Unsupported file type
|
|
1719
|
+
*/
|
|
1720
|
+
415: ApiError;
|
|
1721
|
+
/**
|
|
1722
|
+
* Rate limit exceeded
|
|
1723
|
+
*/
|
|
1724
|
+
429: ApiError;
|
|
1725
|
+
};
|
|
1726
|
+
type CreateMediaUploadError = CreateMediaUploadErrors[keyof CreateMediaUploadErrors];
|
|
1727
|
+
type CreateMediaUploadResponses = {
|
|
1728
|
+
/**
|
|
1729
|
+
* Upload created. Send the file to uploadUrl next.
|
|
1730
|
+
*/
|
|
1731
|
+
201: MediaUpload;
|
|
1732
|
+
};
|
|
1733
|
+
type CreateMediaUploadResponse = CreateMediaUploadResponses[keyof CreateMediaUploadResponses];
|
|
1734
|
+
type CompleteMediaUploadData = {
|
|
1735
|
+
body?: never;
|
|
1736
|
+
path: {
|
|
1737
|
+
id: string;
|
|
1738
|
+
};
|
|
1739
|
+
query?: never;
|
|
1740
|
+
url: '/media/uploads/{id}/complete';
|
|
1741
|
+
};
|
|
1742
|
+
type CompleteMediaUploadErrors = {
|
|
1743
|
+
/**
|
|
1744
|
+
* Invalid or missing API key
|
|
1745
|
+
*/
|
|
1746
|
+
401: ApiError;
|
|
1747
|
+
/**
|
|
1748
|
+
* Plan media limit reached
|
|
1749
|
+
*/
|
|
1750
|
+
402: ApiError;
|
|
1751
|
+
/**
|
|
1752
|
+
* API key lacks the required scope
|
|
1753
|
+
*/
|
|
1754
|
+
403: ApiError;
|
|
1755
|
+
/**
|
|
1756
|
+
* No upload or media with this id, or the upload expired
|
|
1757
|
+
*/
|
|
1758
|
+
404: ApiError;
|
|
1759
|
+
/**
|
|
1760
|
+
* The file has not finished uploading yet
|
|
1761
|
+
*/
|
|
1762
|
+
409: ApiError;
|
|
1763
|
+
/**
|
|
1764
|
+
* The file is over the size limit, or does not fit in your plan storage
|
|
1765
|
+
*/
|
|
1766
|
+
413: ApiError;
|
|
1767
|
+
/**
|
|
1768
|
+
* The file is not a supported type
|
|
1769
|
+
*/
|
|
1770
|
+
415: ApiError;
|
|
1771
|
+
/**
|
|
1772
|
+
* Rate limit exceeded
|
|
1773
|
+
*/
|
|
1774
|
+
429: ApiError;
|
|
1775
|
+
};
|
|
1776
|
+
type CompleteMediaUploadError = CompleteMediaUploadErrors[keyof CompleteMediaUploadErrors];
|
|
1777
|
+
type CompleteMediaUploadResponses = {
|
|
1778
|
+
/**
|
|
1779
|
+
* The file is in your media library
|
|
1780
|
+
*/
|
|
1781
|
+
200: Media$1;
|
|
1782
|
+
};
|
|
1783
|
+
type CompleteMediaUploadResponse = CompleteMediaUploadResponses[keyof CompleteMediaUploadResponses];
|
|
1525
1784
|
|
|
1526
1785
|
type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean, TResponse = unknown> = Options$1<TData, ThrowOnError, TResponse> & {
|
|
1527
1786
|
/**
|
|
@@ -1540,7 +1799,7 @@ declare class Posts {
|
|
|
1540
1799
|
/**
|
|
1541
1800
|
* List posts
|
|
1542
1801
|
*
|
|
1543
|
-
* Returns a paginated list of posts.
|
|
1802
|
+
* Returns a paginated list of the posts you created through PublishQ. Posts imported from a connected platform are excluded by default; pass includeImported=true to get both, or onlyImported=true for only the imported ones.
|
|
1544
1803
|
*/
|
|
1545
1804
|
static listPosts<ThrowOnError extends boolean = false>(options?: Options<ListPostsData, ThrowOnError>): RequestResult<ListPostsResponses, ListPostsErrors, ThrowOnError>;
|
|
1546
1805
|
/**
|
|
@@ -1618,7 +1877,7 @@ declare class Media {
|
|
|
1618
1877
|
/**
|
|
1619
1878
|
* Upload media
|
|
1620
1879
|
*
|
|
1621
|
-
* Upload
|
|
1880
|
+
* Upload a file smaller than 100 MB in a single request. It is the simplest way to upload: one call returns a media ID you can attach to posts. For bigger files, use Create media upload.
|
|
1622
1881
|
*/
|
|
1623
1882
|
static uploadMedia<ThrowOnError extends boolean = false>(options: Options<UploadMediaData, ThrowOnError>): RequestResult<UploadMediaResponses, UploadMediaErrors, ThrowOnError>;
|
|
1624
1883
|
/**
|
|
@@ -1627,6 +1886,23 @@ declare class Media {
|
|
|
1627
1886
|
* Return one media file by ID, including its URL, source, and usage count.
|
|
1628
1887
|
*/
|
|
1629
1888
|
static getMedia<ThrowOnError extends boolean = false>(options: Options<GetMediaData, ThrowOnError>): RequestResult<GetMediaResponses, GetMediaErrors, ThrowOnError>;
|
|
1889
|
+
/**
|
|
1890
|
+
* Create media upload
|
|
1891
|
+
*
|
|
1892
|
+
* Upload a file of up to 4 GB (500 MB on the Free plan) straight to storage:
|
|
1893
|
+
*
|
|
1894
|
+
* 1. Call this endpoint with `filename`, `contentType` and `fileSize`. You get back an `id` and an `uploadUrl`.
|
|
1895
|
+
* 2. `PUT` the file to `uploadUrl` with the same `Content-Type` header. Storage answers `200`, or `403` if the file is not exactly `fileSize` bytes.
|
|
1896
|
+
* 3. Optional: call Complete media upload to add the file to your media library now.
|
|
1897
|
+
* 4. Put the `id` in `mediaIds` when you create or update a post.
|
|
1898
|
+
*/
|
|
1899
|
+
static createMediaUpload<ThrowOnError extends boolean = false>(options: Options<CreateMediaUploadData, ThrowOnError>): RequestResult<CreateMediaUploadResponses, CreateMediaUploadErrors, ThrowOnError>;
|
|
1900
|
+
/**
|
|
1901
|
+
* Complete media upload
|
|
1902
|
+
*
|
|
1903
|
+
* Optional. Adds a file uploaded through Create media upload to your media library now and returns it. Without this call the file is added the first time you use its id in a post, and an upload nobody completes or uses within 1 day expires.
|
|
1904
|
+
*/
|
|
1905
|
+
static completeMediaUpload<ThrowOnError extends boolean = false>(options: Options<CompleteMediaUploadData, ThrowOnError>): RequestResult<CompleteMediaUploadResponses, CompleteMediaUploadErrors, ThrowOnError>;
|
|
1630
1906
|
}
|
|
1631
1907
|
|
|
1632
1908
|
declare const zApiErrorCode: z.ZodMiniEnum<{
|
|
@@ -1644,6 +1920,7 @@ declare const zApiErrorCode: z.ZodMiniEnum<{
|
|
|
1644
1920
|
post_not_editable: "post_not_editable";
|
|
1645
1921
|
media_not_found: "media_not_found";
|
|
1646
1922
|
media_in_use: "media_in_use";
|
|
1923
|
+
media_upload_incomplete: "media_upload_incomplete";
|
|
1647
1924
|
storage_limit_exceeded: "storage_limit_exceeded";
|
|
1648
1925
|
free_media_limit_exceeded: "free_media_limit_exceeded";
|
|
1649
1926
|
free_pending_media_limit_exceeded: "free_pending_media_limit_exceeded";
|
|
@@ -1654,6 +1931,9 @@ declare const zApiErrorCode: z.ZodMiniEnum<{
|
|
|
1654
1931
|
invalid_file_extension: "invalid_file_extension";
|
|
1655
1932
|
social_accounts_not_found: "social_accounts_not_found";
|
|
1656
1933
|
social_accounts_expired: "social_accounts_expired";
|
|
1934
|
+
social_account_limit_exceeded: "social_account_limit_exceeded";
|
|
1935
|
+
platform_temporarily_unavailable: "platform_temporarily_unavailable";
|
|
1936
|
+
platform_permission_missing: "platform_permission_missing";
|
|
1657
1937
|
platform_validation_failed: "platform_validation_failed";
|
|
1658
1938
|
posting_limits_exceeded: "posting_limits_exceeded";
|
|
1659
1939
|
scheduled_at_required: "scheduled_at_required";
|
|
@@ -1663,10 +1943,12 @@ declare const zApiErrorCode: z.ZodMiniEnum<{
|
|
|
1663
1943
|
workspace_not_found: "workspace_not_found";
|
|
1664
1944
|
workspace_forbidden: "workspace_forbidden";
|
|
1665
1945
|
workspace_owner_required: "workspace_owner_required";
|
|
1946
|
+
workspace_limit_exceeded: "workspace_limit_exceeded";
|
|
1666
1947
|
workspace_account_not_found: "workspace_account_not_found";
|
|
1667
1948
|
workspace_account_conflict: "workspace_account_conflict";
|
|
1668
1949
|
workspace_member_not_found: "workspace_member_not_found";
|
|
1669
1950
|
workspace_member_conflict: "workspace_member_conflict";
|
|
1951
|
+
team_member_limit_exceeded: "team_member_limit_exceeded";
|
|
1670
1952
|
workspace_invitation_invalid: "workspace_invitation_invalid";
|
|
1671
1953
|
workspace_invitation_expired: "workspace_invitation_expired";
|
|
1672
1954
|
}>;
|
|
@@ -1689,6 +1971,7 @@ declare const zApiError: z.ZodMiniObject<{
|
|
|
1689
1971
|
post_not_editable: "post_not_editable";
|
|
1690
1972
|
media_not_found: "media_not_found";
|
|
1691
1973
|
media_in_use: "media_in_use";
|
|
1974
|
+
media_upload_incomplete: "media_upload_incomplete";
|
|
1692
1975
|
storage_limit_exceeded: "storage_limit_exceeded";
|
|
1693
1976
|
free_media_limit_exceeded: "free_media_limit_exceeded";
|
|
1694
1977
|
free_pending_media_limit_exceeded: "free_pending_media_limit_exceeded";
|
|
@@ -1699,6 +1982,9 @@ declare const zApiError: z.ZodMiniObject<{
|
|
|
1699
1982
|
invalid_file_extension: "invalid_file_extension";
|
|
1700
1983
|
social_accounts_not_found: "social_accounts_not_found";
|
|
1701
1984
|
social_accounts_expired: "social_accounts_expired";
|
|
1985
|
+
social_account_limit_exceeded: "social_account_limit_exceeded";
|
|
1986
|
+
platform_temporarily_unavailable: "platform_temporarily_unavailable";
|
|
1987
|
+
platform_permission_missing: "platform_permission_missing";
|
|
1702
1988
|
platform_validation_failed: "platform_validation_failed";
|
|
1703
1989
|
posting_limits_exceeded: "posting_limits_exceeded";
|
|
1704
1990
|
scheduled_at_required: "scheduled_at_required";
|
|
@@ -1708,10 +1994,12 @@ declare const zApiError: z.ZodMiniObject<{
|
|
|
1708
1994
|
workspace_not_found: "workspace_not_found";
|
|
1709
1995
|
workspace_forbidden: "workspace_forbidden";
|
|
1710
1996
|
workspace_owner_required: "workspace_owner_required";
|
|
1997
|
+
workspace_limit_exceeded: "workspace_limit_exceeded";
|
|
1711
1998
|
workspace_account_not_found: "workspace_account_not_found";
|
|
1712
1999
|
workspace_account_conflict: "workspace_account_conflict";
|
|
1713
2000
|
workspace_member_not_found: "workspace_member_not_found";
|
|
1714
2001
|
workspace_member_conflict: "workspace_member_conflict";
|
|
2002
|
+
team_member_limit_exceeded: "team_member_limit_exceeded";
|
|
1715
2003
|
workspace_invitation_invalid: "workspace_invitation_invalid";
|
|
1716
2004
|
workspace_invitation_expired: "workspace_invitation_expired";
|
|
1717
2005
|
}>;
|
|
@@ -1808,6 +2096,7 @@ declare const zYouTubePlatformSpecificSettings: z.ZodMiniObject<{
|
|
|
1808
2096
|
tags: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
|
|
1809
2097
|
embeddable: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
|
|
1810
2098
|
playlistId: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
2099
|
+
thumbnailMediaId: z.ZodMiniOptional<z.ZodMiniUUID>;
|
|
1811
2100
|
}, z.z.core.$strip>;
|
|
1812
2101
|
/**
|
|
1813
2102
|
* TikTokPlatformSpecificSettings
|
|
@@ -1872,6 +2161,36 @@ declare const zTwitterPlatformSpecificSettings: z.ZodMiniObject<{
|
|
|
1872
2161
|
durationMinutes: z.ZodMiniNumberFormat;
|
|
1873
2162
|
}, z.z.core.$strip>>;
|
|
1874
2163
|
}, z.z.core.$strip>;
|
|
2164
|
+
/**
|
|
2165
|
+
* Where the post came from. PUBLISHQ: created in PublishQ. IMPORTED: published directly on the platform and discovered during an analytics sync, so the post history stays complete.
|
|
2166
|
+
*/
|
|
2167
|
+
declare const zPostSource: z.ZodMiniEnum<{
|
|
2168
|
+
PUBLISHQ: "PUBLISHQ";
|
|
2169
|
+
IMPORTED: "IMPORTED";
|
|
2170
|
+
}>;
|
|
2171
|
+
declare const zPostAnalytics: z.ZodMiniObject<{
|
|
2172
|
+
views: z.ZodMiniNumberFormat;
|
|
2173
|
+
likes: z.ZodMiniNumberFormat;
|
|
2174
|
+
comments: z.ZodMiniNumberFormat;
|
|
2175
|
+
shares: z.ZodMiniNumberFormat;
|
|
2176
|
+
extraMetrics: z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniNumberFormat>;
|
|
2177
|
+
syncedAt: z.z.iso.ZodMiniISODateTime;
|
|
2178
|
+
}, z.z.core.$strip>;
|
|
2179
|
+
declare const zPublishFailure: z.ZodMiniObject<{
|
|
2180
|
+
kind: z.ZodMiniEnum<{
|
|
2181
|
+
RECONNECT: "RECONNECT";
|
|
2182
|
+
MEDIA: "MEDIA";
|
|
2183
|
+
ACCOUNT_STATE: "ACCOUNT_STATE";
|
|
2184
|
+
TRANSIENT: "TRANSIENT";
|
|
2185
|
+
MAYBE_PUBLISHED: "MAYBE_PUBLISHED";
|
|
2186
|
+
UNKNOWN: "UNKNOWN";
|
|
2187
|
+
}>;
|
|
2188
|
+
title: z.ZodMiniString<string>;
|
|
2189
|
+
whatHappened: z.ZodMiniString<string>;
|
|
2190
|
+
whatToDo: z.ZodMiniString<string>;
|
|
2191
|
+
canRetry: z.ZodMiniBoolean<boolean>;
|
|
2192
|
+
checkPlatformFirst: z.ZodMiniBoolean<boolean>;
|
|
2193
|
+
}, z.z.core.$strip>;
|
|
1875
2194
|
declare const zSocialPlatform: z.ZodMiniEnum<{
|
|
1876
2195
|
TWITTER: "TWITTER";
|
|
1877
2196
|
INSTAGRAM: "INSTAGRAM";
|
|
@@ -1926,6 +2245,7 @@ declare const zPlatformSpecificSettings: z.ZodMiniUnion<readonly [z.ZodMiniObjec
|
|
|
1926
2245
|
tags: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
|
|
1927
2246
|
embeddable: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
|
|
1928
2247
|
playlistId: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
2248
|
+
thumbnailMediaId: z.ZodMiniOptional<z.ZodMiniUUID>;
|
|
1929
2249
|
}, z.z.core.$strip>, z.ZodMiniObject<{
|
|
1930
2250
|
privacyLevel: z.ZodMiniEnum<{
|
|
1931
2251
|
PUBLIC_TO_EVERYONE: "PUBLIC_TO_EVERYONE";
|
|
@@ -2006,6 +2326,36 @@ declare const zPostAccount: z.ZodMiniObject<{
|
|
|
2006
2326
|
externalUrl: z.ZodMiniOptional<z.ZodMiniURL>;
|
|
2007
2327
|
publishedAt: z.ZodMiniOptional<z.z.iso.ZodMiniISODateTime>;
|
|
2008
2328
|
errorMessage: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
2329
|
+
thumbnail: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
2330
|
+
status: z.ZodMiniEnum<{
|
|
2331
|
+
FAILED: "FAILED";
|
|
2332
|
+
APPLIED: "APPLIED";
|
|
2333
|
+
}>;
|
|
2334
|
+
errorMessage: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
2335
|
+
}, z.z.core.$strip>>;
|
|
2336
|
+
failure: z.ZodMiniOptional<z.ZodMiniIntersection<z.ZodMiniObject<{
|
|
2337
|
+
kind: z.ZodMiniEnum<{
|
|
2338
|
+
RECONNECT: "RECONNECT";
|
|
2339
|
+
MEDIA: "MEDIA";
|
|
2340
|
+
ACCOUNT_STATE: "ACCOUNT_STATE";
|
|
2341
|
+
TRANSIENT: "TRANSIENT";
|
|
2342
|
+
MAYBE_PUBLISHED: "MAYBE_PUBLISHED";
|
|
2343
|
+
UNKNOWN: "UNKNOWN";
|
|
2344
|
+
}>;
|
|
2345
|
+
title: z.ZodMiniString<string>;
|
|
2346
|
+
whatHappened: z.ZodMiniString<string>;
|
|
2347
|
+
whatToDo: z.ZodMiniString<string>;
|
|
2348
|
+
canRetry: z.ZodMiniBoolean<boolean>;
|
|
2349
|
+
checkPlatformFirst: z.ZodMiniBoolean<boolean>;
|
|
2350
|
+
}, z.z.core.$strip>, z.ZodMiniUnknown>>;
|
|
2351
|
+
analytics: z.ZodMiniOptional<z.ZodMiniIntersection<z.ZodMiniObject<{
|
|
2352
|
+
views: z.ZodMiniNumberFormat;
|
|
2353
|
+
likes: z.ZodMiniNumberFormat;
|
|
2354
|
+
comments: z.ZodMiniNumberFormat;
|
|
2355
|
+
shares: z.ZodMiniNumberFormat;
|
|
2356
|
+
extraMetrics: z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniNumberFormat>;
|
|
2357
|
+
syncedAt: z.z.iso.ZodMiniISODateTime;
|
|
2358
|
+
}, z.z.core.$strip>, z.ZodMiniUnknown>>;
|
|
2009
2359
|
postOverrides: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
2010
2360
|
content: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
2011
2361
|
thumbnailTimestamp: z.ZodMiniOptional<z.ZodMiniNumberFormat>;
|
|
@@ -2040,6 +2390,7 @@ declare const zPostAccount: z.ZodMiniObject<{
|
|
|
2040
2390
|
tags: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
|
|
2041
2391
|
embeddable: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
|
|
2042
2392
|
playlistId: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
2393
|
+
thumbnailMediaId: z.ZodMiniOptional<z.ZodMiniUUID>;
|
|
2043
2394
|
}, z.z.core.$strip>, z.ZodMiniObject<{
|
|
2044
2395
|
privacyLevel: z.ZodMiniEnum<{
|
|
2045
2396
|
PUBLIC_TO_EVERYONE: "PUBLIC_TO_EVERYONE";
|
|
@@ -2108,6 +2459,10 @@ declare const zPost: z.ZodMiniObject<{
|
|
|
2108
2459
|
PUBLISHED: "PUBLISHED";
|
|
2109
2460
|
FAILED: "FAILED";
|
|
2110
2461
|
}>;
|
|
2462
|
+
source: z.ZodMiniEnum<{
|
|
2463
|
+
PUBLISHQ: "PUBLISHQ";
|
|
2464
|
+
IMPORTED: "IMPORTED";
|
|
2465
|
+
}>;
|
|
2111
2466
|
errorMessage: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
2112
2467
|
mediaIds: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniUUID>>;
|
|
2113
2468
|
deletedMediaCount: z.ZodMiniOptional<z.ZodMiniNumberFormat>;
|
|
@@ -2137,6 +2492,36 @@ declare const zPost: z.ZodMiniObject<{
|
|
|
2137
2492
|
externalUrl: z.ZodMiniOptional<z.ZodMiniURL>;
|
|
2138
2493
|
publishedAt: z.ZodMiniOptional<z.z.iso.ZodMiniISODateTime>;
|
|
2139
2494
|
errorMessage: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
2495
|
+
thumbnail: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
2496
|
+
status: z.ZodMiniEnum<{
|
|
2497
|
+
FAILED: "FAILED";
|
|
2498
|
+
APPLIED: "APPLIED";
|
|
2499
|
+
}>;
|
|
2500
|
+
errorMessage: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
2501
|
+
}, z.z.core.$strip>>;
|
|
2502
|
+
failure: z.ZodMiniOptional<z.ZodMiniIntersection<z.ZodMiniObject<{
|
|
2503
|
+
kind: z.ZodMiniEnum<{
|
|
2504
|
+
RECONNECT: "RECONNECT";
|
|
2505
|
+
MEDIA: "MEDIA";
|
|
2506
|
+
ACCOUNT_STATE: "ACCOUNT_STATE";
|
|
2507
|
+
TRANSIENT: "TRANSIENT";
|
|
2508
|
+
MAYBE_PUBLISHED: "MAYBE_PUBLISHED";
|
|
2509
|
+
UNKNOWN: "UNKNOWN";
|
|
2510
|
+
}>;
|
|
2511
|
+
title: z.ZodMiniString<string>;
|
|
2512
|
+
whatHappened: z.ZodMiniString<string>;
|
|
2513
|
+
whatToDo: z.ZodMiniString<string>;
|
|
2514
|
+
canRetry: z.ZodMiniBoolean<boolean>;
|
|
2515
|
+
checkPlatformFirst: z.ZodMiniBoolean<boolean>;
|
|
2516
|
+
}, z.z.core.$strip>, z.ZodMiniUnknown>>;
|
|
2517
|
+
analytics: z.ZodMiniOptional<z.ZodMiniIntersection<z.ZodMiniObject<{
|
|
2518
|
+
views: z.ZodMiniNumberFormat;
|
|
2519
|
+
likes: z.ZodMiniNumberFormat;
|
|
2520
|
+
comments: z.ZodMiniNumberFormat;
|
|
2521
|
+
shares: z.ZodMiniNumberFormat;
|
|
2522
|
+
extraMetrics: z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniNumberFormat>;
|
|
2523
|
+
syncedAt: z.z.iso.ZodMiniISODateTime;
|
|
2524
|
+
}, z.z.core.$strip>, z.ZodMiniUnknown>>;
|
|
2140
2525
|
postOverrides: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
2141
2526
|
content: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
2142
2527
|
thumbnailTimestamp: z.ZodMiniOptional<z.ZodMiniNumberFormat>;
|
|
@@ -2171,6 +2556,7 @@ declare const zPost: z.ZodMiniObject<{
|
|
|
2171
2556
|
tags: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
|
|
2172
2557
|
embeddable: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
|
|
2173
2558
|
playlistId: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
2559
|
+
thumbnailMediaId: z.ZodMiniOptional<z.ZodMiniUUID>;
|
|
2174
2560
|
}, z.z.core.$strip>, z.ZodMiniObject<{
|
|
2175
2561
|
privacyLevel: z.ZodMiniEnum<{
|
|
2176
2562
|
PUBLIC_TO_EVERYONE: "PUBLIC_TO_EVERYONE";
|
|
@@ -2241,6 +2627,10 @@ declare const zPostsResponse: z.ZodMiniObject<{
|
|
|
2241
2627
|
PUBLISHED: "PUBLISHED";
|
|
2242
2628
|
FAILED: "FAILED";
|
|
2243
2629
|
}>;
|
|
2630
|
+
source: z.ZodMiniEnum<{
|
|
2631
|
+
PUBLISHQ: "PUBLISHQ";
|
|
2632
|
+
IMPORTED: "IMPORTED";
|
|
2633
|
+
}>;
|
|
2244
2634
|
errorMessage: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
2245
2635
|
mediaIds: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniUUID>>;
|
|
2246
2636
|
deletedMediaCount: z.ZodMiniOptional<z.ZodMiniNumberFormat>;
|
|
@@ -2270,6 +2660,36 @@ declare const zPostsResponse: z.ZodMiniObject<{
|
|
|
2270
2660
|
externalUrl: z.ZodMiniOptional<z.ZodMiniURL>;
|
|
2271
2661
|
publishedAt: z.ZodMiniOptional<z.z.iso.ZodMiniISODateTime>;
|
|
2272
2662
|
errorMessage: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
2663
|
+
thumbnail: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
2664
|
+
status: z.ZodMiniEnum<{
|
|
2665
|
+
FAILED: "FAILED";
|
|
2666
|
+
APPLIED: "APPLIED";
|
|
2667
|
+
}>;
|
|
2668
|
+
errorMessage: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
2669
|
+
}, z.z.core.$strip>>;
|
|
2670
|
+
failure: z.ZodMiniOptional<z.ZodMiniIntersection<z.ZodMiniObject<{
|
|
2671
|
+
kind: z.ZodMiniEnum<{
|
|
2672
|
+
RECONNECT: "RECONNECT";
|
|
2673
|
+
MEDIA: "MEDIA";
|
|
2674
|
+
ACCOUNT_STATE: "ACCOUNT_STATE";
|
|
2675
|
+
TRANSIENT: "TRANSIENT";
|
|
2676
|
+
MAYBE_PUBLISHED: "MAYBE_PUBLISHED";
|
|
2677
|
+
UNKNOWN: "UNKNOWN";
|
|
2678
|
+
}>;
|
|
2679
|
+
title: z.ZodMiniString<string>;
|
|
2680
|
+
whatHappened: z.ZodMiniString<string>;
|
|
2681
|
+
whatToDo: z.ZodMiniString<string>;
|
|
2682
|
+
canRetry: z.ZodMiniBoolean<boolean>;
|
|
2683
|
+
checkPlatformFirst: z.ZodMiniBoolean<boolean>;
|
|
2684
|
+
}, z.z.core.$strip>, z.ZodMiniUnknown>>;
|
|
2685
|
+
analytics: z.ZodMiniOptional<z.ZodMiniIntersection<z.ZodMiniObject<{
|
|
2686
|
+
views: z.ZodMiniNumberFormat;
|
|
2687
|
+
likes: z.ZodMiniNumberFormat;
|
|
2688
|
+
comments: z.ZodMiniNumberFormat;
|
|
2689
|
+
shares: z.ZodMiniNumberFormat;
|
|
2690
|
+
extraMetrics: z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniNumberFormat>;
|
|
2691
|
+
syncedAt: z.z.iso.ZodMiniISODateTime;
|
|
2692
|
+
}, z.z.core.$strip>, z.ZodMiniUnknown>>;
|
|
2273
2693
|
postOverrides: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
2274
2694
|
content: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
2275
2695
|
thumbnailTimestamp: z.ZodMiniOptional<z.ZodMiniNumberFormat>;
|
|
@@ -2304,6 +2724,7 @@ declare const zPostsResponse: z.ZodMiniObject<{
|
|
|
2304
2724
|
tags: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
|
|
2305
2725
|
embeddable: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
|
|
2306
2726
|
playlistId: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
2727
|
+
thumbnailMediaId: z.ZodMiniOptional<z.ZodMiniUUID>;
|
|
2307
2728
|
}, z.z.core.$strip>, z.ZodMiniObject<{
|
|
2308
2729
|
privacyLevel: z.ZodMiniEnum<{
|
|
2309
2730
|
PUBLIC_TO_EVERYONE: "PUBLIC_TO_EVERYONE";
|
|
@@ -2408,6 +2829,7 @@ declare const zCreatePostAccount: z.ZodMiniObject<{
|
|
|
2408
2829
|
tags: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
|
|
2409
2830
|
embeddable: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
|
|
2410
2831
|
playlistId: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
2832
|
+
thumbnailMediaId: z.ZodMiniOptional<z.ZodMiniUUID>;
|
|
2411
2833
|
}, z.z.core.$strip>, z.ZodMiniObject<{
|
|
2412
2834
|
privacyLevel: z.ZodMiniEnum<{
|
|
2413
2835
|
PUBLIC_TO_EVERYONE: "PUBLIC_TO_EVERYONE";
|
|
@@ -2509,6 +2931,7 @@ declare const zCreatePostRequest: z.ZodMiniObject<{
|
|
|
2509
2931
|
tags: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
|
|
2510
2932
|
embeddable: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
|
|
2511
2933
|
playlistId: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
2934
|
+
thumbnailMediaId: z.ZodMiniOptional<z.ZodMiniUUID>;
|
|
2512
2935
|
}, z.z.core.$strip>, z.ZodMiniObject<{
|
|
2513
2936
|
privacyLevel: z.ZodMiniEnum<{
|
|
2514
2937
|
PUBLIC_TO_EVERYONE: "PUBLIC_TO_EVERYONE";
|
|
@@ -2571,7 +2994,110 @@ declare const zCreatePostRequest: z.ZodMiniObject<{
|
|
|
2571
2994
|
publishNow: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
|
|
2572
2995
|
}, z.z.core.$strip>;
|
|
2573
2996
|
/**
|
|
2574
|
-
*
|
|
2997
|
+
* Override the post-level content, media or thumbnail timestamp for this specific account.
|
|
2998
|
+
*/
|
|
2999
|
+
declare const zUpdatePostOverrides: z.ZodMiniObject<{
|
|
3000
|
+
content: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>;
|
|
3001
|
+
mediaIds: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniArray<z.ZodMiniUUID>>>;
|
|
3002
|
+
thumbnailTimestamp: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniNumberFormat>>;
|
|
3003
|
+
}, z.z.core.$strip>;
|
|
3004
|
+
declare const zUpdatePostAccount: z.ZodMiniObject<{
|
|
3005
|
+
accountId: z.ZodMiniUUID;
|
|
3006
|
+
postOverrides: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
3007
|
+
content: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>;
|
|
3008
|
+
mediaIds: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniArray<z.ZodMiniUUID>>>;
|
|
3009
|
+
thumbnailTimestamp: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniNumberFormat>>;
|
|
3010
|
+
}, z.z.core.$strip>>;
|
|
3011
|
+
platformSpecificSettings: z.ZodMiniOptional<z.ZodMiniIntersection<z.ZodMiniUnion<readonly [z.ZodMiniObject<{
|
|
3012
|
+
description: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
3013
|
+
privacyStatus: z.ZodMiniOptional<z.ZodMiniEnum<{
|
|
3014
|
+
public: "public";
|
|
3015
|
+
unlisted: "unlisted";
|
|
3016
|
+
private: "private";
|
|
3017
|
+
}>>;
|
|
3018
|
+
madeForKids: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
|
|
3019
|
+
containsSyntheticMedia: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
|
|
3020
|
+
categoryId: z.ZodMiniOptional<z.ZodMiniEnum<{
|
|
3021
|
+
1: "1";
|
|
3022
|
+
2: "2";
|
|
3023
|
+
10: "10";
|
|
3024
|
+
15: "15";
|
|
3025
|
+
17: "17";
|
|
3026
|
+
19: "19";
|
|
3027
|
+
20: "20";
|
|
3028
|
+
22: "22";
|
|
3029
|
+
23: "23";
|
|
3030
|
+
24: "24";
|
|
3031
|
+
25: "25";
|
|
3032
|
+
26: "26";
|
|
3033
|
+
27: "27";
|
|
3034
|
+
28: "28";
|
|
3035
|
+
29: "29";
|
|
3036
|
+
}>>;
|
|
3037
|
+
tags: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
|
|
3038
|
+
embeddable: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
|
|
3039
|
+
playlistId: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
3040
|
+
thumbnailMediaId: z.ZodMiniOptional<z.ZodMiniUUID>;
|
|
3041
|
+
}, z.z.core.$strip>, z.ZodMiniObject<{
|
|
3042
|
+
privacyLevel: z.ZodMiniEnum<{
|
|
3043
|
+
PUBLIC_TO_EVERYONE: "PUBLIC_TO_EVERYONE";
|
|
3044
|
+
FOLLOWER_OF_CREATOR: "FOLLOWER_OF_CREATOR";
|
|
3045
|
+
MUTUAL_FOLLOW_FRIENDS: "MUTUAL_FOLLOW_FRIENDS";
|
|
3046
|
+
SELF_ONLY: "SELF_ONLY";
|
|
3047
|
+
}>;
|
|
3048
|
+
disableComment: z.ZodMiniBoolean<boolean>;
|
|
3049
|
+
disableDuet: z.ZodMiniBoolean<boolean>;
|
|
3050
|
+
disableStitch: z.ZodMiniBoolean<boolean>;
|
|
3051
|
+
brandContentToggle: z.ZodMiniBoolean<boolean>;
|
|
3052
|
+
brandOrganicToggle: z.ZodMiniBoolean<boolean>;
|
|
3053
|
+
autoAddMusic: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
|
|
3054
|
+
videoMadeWithAi: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
|
|
3055
|
+
description: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
3056
|
+
photoCoverIndex: z.ZodMiniOptional<z.ZodMiniNumberFormat>;
|
|
3057
|
+
}, z.z.core.$strip>, z.ZodMiniObject<{
|
|
3058
|
+
contentType: z.ZodMiniOptional<z.ZodMiniEnum<{
|
|
3059
|
+
story: "story";
|
|
3060
|
+
reels: "reels";
|
|
3061
|
+
}>>;
|
|
3062
|
+
shareToFeed: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
|
|
3063
|
+
trialParams: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
3064
|
+
graduationStrategy: z.ZodMiniEnum<{
|
|
3065
|
+
MANUAL: "MANUAL";
|
|
3066
|
+
SS_PERFORMANCE: "SS_PERFORMANCE";
|
|
3067
|
+
}>;
|
|
3068
|
+
}, z.z.core.$strip>>;
|
|
3069
|
+
audioName: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
3070
|
+
}, z.z.core.$strip>, z.ZodMiniObject<{
|
|
3071
|
+
contentType: z.ZodMiniOptional<z.ZodMiniEnum<{
|
|
3072
|
+
story: "story";
|
|
3073
|
+
}>>;
|
|
3074
|
+
}, z.z.core.$strip>, z.ZodMiniObject<{
|
|
3075
|
+
topicTag: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
3076
|
+
}, z.z.core.$strip>, z.ZodMiniObject<{
|
|
3077
|
+
communityId: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
3078
|
+
shareWithFollowers: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
|
|
3079
|
+
forSuperFollowersOnly: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
|
|
3080
|
+
replySettings: z.ZodMiniOptional<z.ZodMiniEnum<{
|
|
3081
|
+
following: "following";
|
|
3082
|
+
mentionedUsers: "mentionedUsers";
|
|
3083
|
+
subscribers: "subscribers";
|
|
3084
|
+
verified: "verified";
|
|
3085
|
+
}>>;
|
|
3086
|
+
quoteTweetId: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
3087
|
+
replyToTweetId: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
3088
|
+
poll: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
3089
|
+
options: z.ZodMiniArray<z.ZodMiniString<string>>;
|
|
3090
|
+
durationMinutes: z.ZodMiniNumberFormat;
|
|
3091
|
+
}, z.z.core.$strip>>;
|
|
3092
|
+
}, z.z.core.$strip>, z.ZodMiniObject<{
|
|
3093
|
+
visibility: z.ZodMiniOptional<z.ZodMiniEnum<{
|
|
3094
|
+
CONNECTIONS: "CONNECTIONS";
|
|
3095
|
+
PUBLIC: "PUBLIC";
|
|
3096
|
+
}>>;
|
|
3097
|
+
}, z.z.core.$strip>, z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniNever>, z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniUnknown>]>, z.ZodMiniUnknown>>;
|
|
3098
|
+
}, z.z.core.$strip>;
|
|
3099
|
+
/**
|
|
3100
|
+
* Update a draft or scheduled post. Published and publishing posts cannot be updated. Only the fields you send change; everything you leave out keeps its current value. To remove an account setting, or an account's own text, media or thumbnail timestamp, send it as null. Media behavior is explicit: omit mediaIds to keep existing media unchanged, provide mediaIds to replace all current media, or provide an empty mediaIds array to remove all media. The post that results from the update is validated as a whole before anything is saved.
|
|
2575
3101
|
*/
|
|
2576
3102
|
declare const zUpdatePostRequest: z.ZodMiniObject<{
|
|
2577
3103
|
content: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
@@ -2580,11 +3106,11 @@ declare const zUpdatePostRequest: z.ZodMiniObject<{
|
|
|
2580
3106
|
thumbnailTimestamp: z.ZodMiniOptional<z.ZodMiniNumberFormat>;
|
|
2581
3107
|
accounts: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniObject<{
|
|
2582
3108
|
accountId: z.ZodMiniUUID;
|
|
2583
|
-
postOverrides: z.ZodMiniOptional<z.
|
|
2584
|
-
content: z.ZodMiniOptional<z.ZodMiniString<string
|
|
2585
|
-
|
|
2586
|
-
|
|
2587
|
-
}, z.z.core.$strip
|
|
3109
|
+
postOverrides: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
3110
|
+
content: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>;
|
|
3111
|
+
mediaIds: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniArray<z.ZodMiniUUID>>>;
|
|
3112
|
+
thumbnailTimestamp: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniNumberFormat>>;
|
|
3113
|
+
}, z.z.core.$strip>>;
|
|
2588
3114
|
platformSpecificSettings: z.ZodMiniOptional<z.ZodMiniIntersection<z.ZodMiniUnion<readonly [z.ZodMiniObject<{
|
|
2589
3115
|
description: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
2590
3116
|
privacyStatus: z.ZodMiniOptional<z.ZodMiniEnum<{
|
|
@@ -2614,6 +3140,7 @@ declare const zUpdatePostRequest: z.ZodMiniObject<{
|
|
|
2614
3140
|
tags: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
|
|
2615
3141
|
embeddable: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
|
|
2616
3142
|
playlistId: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
3143
|
+
thumbnailMediaId: z.ZodMiniOptional<z.ZodMiniUUID>;
|
|
2617
3144
|
}, z.z.core.$strip>, z.ZodMiniObject<{
|
|
2618
3145
|
privacyLevel: z.ZodMiniEnum<{
|
|
2619
3146
|
PUBLIC_TO_EVERYONE: "PUBLIC_TO_EVERYONE";
|
|
@@ -2800,6 +3327,16 @@ declare const zMediaListResponse: z.ZodMiniObject<{
|
|
|
2800
3327
|
declare const zUploadMediaRequest: z.ZodMiniObject<{
|
|
2801
3328
|
file: z.ZodMiniString<string>;
|
|
2802
3329
|
}, z.z.core.$strip>;
|
|
3330
|
+
declare const zCreateMediaUploadRequest: z.ZodMiniObject<{
|
|
3331
|
+
filename: z.ZodMiniString<string>;
|
|
3332
|
+
contentType: z.ZodMiniString<string>;
|
|
3333
|
+
fileSize: z.ZodMiniNumberFormat;
|
|
3334
|
+
}, z.z.core.$strip>;
|
|
3335
|
+
declare const zMediaUpload: z.ZodMiniObject<{
|
|
3336
|
+
id: z.ZodMiniUUID;
|
|
3337
|
+
uploadUrl: z.ZodMiniURL;
|
|
3338
|
+
expiresAt: z.z.iso.ZodMiniISODateTime;
|
|
3339
|
+
}, z.z.core.$strip>;
|
|
2803
3340
|
declare const zTikTokCreatorInfoResponse: z.ZodMiniObject<{
|
|
2804
3341
|
privacyLevelOptions: z.ZodMiniArray<z.ZodMiniString<string>>;
|
|
2805
3342
|
commentDisabled: z.ZodMiniBoolean<boolean>;
|
|
@@ -2819,6 +3356,8 @@ declare const zApiKeyScope: z.ZodMiniEnum<{
|
|
|
2819
3356
|
declare const zListPostsQuery: z.ZodMiniObject<{
|
|
2820
3357
|
page: z.ZodMiniDefault<z.ZodMiniOptional<z.ZodMiniNumberFormat>>;
|
|
2821
3358
|
limit: z.ZodMiniDefault<z.ZodMiniOptional<z.ZodMiniNumberFormat>>;
|
|
3359
|
+
includeImported: z.ZodMiniDefault<z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>>;
|
|
3360
|
+
onlyImported: z.ZodMiniDefault<z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>>;
|
|
2822
3361
|
}, z.z.core.$strip>;
|
|
2823
3362
|
/**
|
|
2824
3363
|
* Posts retrieved successfully
|
|
@@ -2834,6 +3373,10 @@ declare const zListPostsResponse: z.ZodMiniObject<{
|
|
|
2834
3373
|
PUBLISHED: "PUBLISHED";
|
|
2835
3374
|
FAILED: "FAILED";
|
|
2836
3375
|
}>;
|
|
3376
|
+
source: z.ZodMiniEnum<{
|
|
3377
|
+
PUBLISHQ: "PUBLISHQ";
|
|
3378
|
+
IMPORTED: "IMPORTED";
|
|
3379
|
+
}>;
|
|
2837
3380
|
errorMessage: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
2838
3381
|
mediaIds: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniUUID>>;
|
|
2839
3382
|
deletedMediaCount: z.ZodMiniOptional<z.ZodMiniNumberFormat>;
|
|
@@ -2863,6 +3406,36 @@ declare const zListPostsResponse: z.ZodMiniObject<{
|
|
|
2863
3406
|
externalUrl: z.ZodMiniOptional<z.ZodMiniURL>;
|
|
2864
3407
|
publishedAt: z.ZodMiniOptional<z.z.iso.ZodMiniISODateTime>;
|
|
2865
3408
|
errorMessage: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
3409
|
+
thumbnail: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
3410
|
+
status: z.ZodMiniEnum<{
|
|
3411
|
+
FAILED: "FAILED";
|
|
3412
|
+
APPLIED: "APPLIED";
|
|
3413
|
+
}>;
|
|
3414
|
+
errorMessage: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
3415
|
+
}, z.z.core.$strip>>;
|
|
3416
|
+
failure: z.ZodMiniOptional<z.ZodMiniIntersection<z.ZodMiniObject<{
|
|
3417
|
+
kind: z.ZodMiniEnum<{
|
|
3418
|
+
RECONNECT: "RECONNECT";
|
|
3419
|
+
MEDIA: "MEDIA";
|
|
3420
|
+
ACCOUNT_STATE: "ACCOUNT_STATE";
|
|
3421
|
+
TRANSIENT: "TRANSIENT";
|
|
3422
|
+
MAYBE_PUBLISHED: "MAYBE_PUBLISHED";
|
|
3423
|
+
UNKNOWN: "UNKNOWN";
|
|
3424
|
+
}>;
|
|
3425
|
+
title: z.ZodMiniString<string>;
|
|
3426
|
+
whatHappened: z.ZodMiniString<string>;
|
|
3427
|
+
whatToDo: z.ZodMiniString<string>;
|
|
3428
|
+
canRetry: z.ZodMiniBoolean<boolean>;
|
|
3429
|
+
checkPlatformFirst: z.ZodMiniBoolean<boolean>;
|
|
3430
|
+
}, z.z.core.$strip>, z.ZodMiniUnknown>>;
|
|
3431
|
+
analytics: z.ZodMiniOptional<z.ZodMiniIntersection<z.ZodMiniObject<{
|
|
3432
|
+
views: z.ZodMiniNumberFormat;
|
|
3433
|
+
likes: z.ZodMiniNumberFormat;
|
|
3434
|
+
comments: z.ZodMiniNumberFormat;
|
|
3435
|
+
shares: z.ZodMiniNumberFormat;
|
|
3436
|
+
extraMetrics: z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniNumberFormat>;
|
|
3437
|
+
syncedAt: z.z.iso.ZodMiniISODateTime;
|
|
3438
|
+
}, z.z.core.$strip>, z.ZodMiniUnknown>>;
|
|
2866
3439
|
postOverrides: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
2867
3440
|
content: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
2868
3441
|
thumbnailTimestamp: z.ZodMiniOptional<z.ZodMiniNumberFormat>;
|
|
@@ -2897,6 +3470,7 @@ declare const zListPostsResponse: z.ZodMiniObject<{
|
|
|
2897
3470
|
tags: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
|
|
2898
3471
|
embeddable: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
|
|
2899
3472
|
playlistId: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
3473
|
+
thumbnailMediaId: z.ZodMiniOptional<z.ZodMiniUUID>;
|
|
2900
3474
|
}, z.z.core.$strip>, z.ZodMiniObject<{
|
|
2901
3475
|
privacyLevel: z.ZodMiniEnum<{
|
|
2902
3476
|
PUBLIC_TO_EVERYONE: "PUBLIC_TO_EVERYONE";
|
|
@@ -3005,6 +3579,7 @@ declare const zCreatePostBody: z.ZodMiniObject<{
|
|
|
3005
3579
|
tags: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
|
|
3006
3580
|
embeddable: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
|
|
3007
3581
|
playlistId: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
3582
|
+
thumbnailMediaId: z.ZodMiniOptional<z.ZodMiniUUID>;
|
|
3008
3583
|
}, z.z.core.$strip>, z.ZodMiniObject<{
|
|
3009
3584
|
privacyLevel: z.ZodMiniEnum<{
|
|
3010
3585
|
PUBLIC_TO_EVERYONE: "PUBLIC_TO_EVERYONE";
|
|
@@ -3079,6 +3654,10 @@ declare const zCreatePostResponse: z.ZodMiniObject<{
|
|
|
3079
3654
|
PUBLISHED: "PUBLISHED";
|
|
3080
3655
|
FAILED: "FAILED";
|
|
3081
3656
|
}>;
|
|
3657
|
+
source: z.ZodMiniEnum<{
|
|
3658
|
+
PUBLISHQ: "PUBLISHQ";
|
|
3659
|
+
IMPORTED: "IMPORTED";
|
|
3660
|
+
}>;
|
|
3082
3661
|
errorMessage: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
3083
3662
|
mediaIds: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniUUID>>;
|
|
3084
3663
|
deletedMediaCount: z.ZodMiniOptional<z.ZodMiniNumberFormat>;
|
|
@@ -3108,6 +3687,36 @@ declare const zCreatePostResponse: z.ZodMiniObject<{
|
|
|
3108
3687
|
externalUrl: z.ZodMiniOptional<z.ZodMiniURL>;
|
|
3109
3688
|
publishedAt: z.ZodMiniOptional<z.z.iso.ZodMiniISODateTime>;
|
|
3110
3689
|
errorMessage: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
3690
|
+
thumbnail: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
3691
|
+
status: z.ZodMiniEnum<{
|
|
3692
|
+
FAILED: "FAILED";
|
|
3693
|
+
APPLIED: "APPLIED";
|
|
3694
|
+
}>;
|
|
3695
|
+
errorMessage: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
3696
|
+
}, z.z.core.$strip>>;
|
|
3697
|
+
failure: z.ZodMiniOptional<z.ZodMiniIntersection<z.ZodMiniObject<{
|
|
3698
|
+
kind: z.ZodMiniEnum<{
|
|
3699
|
+
RECONNECT: "RECONNECT";
|
|
3700
|
+
MEDIA: "MEDIA";
|
|
3701
|
+
ACCOUNT_STATE: "ACCOUNT_STATE";
|
|
3702
|
+
TRANSIENT: "TRANSIENT";
|
|
3703
|
+
MAYBE_PUBLISHED: "MAYBE_PUBLISHED";
|
|
3704
|
+
UNKNOWN: "UNKNOWN";
|
|
3705
|
+
}>;
|
|
3706
|
+
title: z.ZodMiniString<string>;
|
|
3707
|
+
whatHappened: z.ZodMiniString<string>;
|
|
3708
|
+
whatToDo: z.ZodMiniString<string>;
|
|
3709
|
+
canRetry: z.ZodMiniBoolean<boolean>;
|
|
3710
|
+
checkPlatformFirst: z.ZodMiniBoolean<boolean>;
|
|
3711
|
+
}, z.z.core.$strip>, z.ZodMiniUnknown>>;
|
|
3712
|
+
analytics: z.ZodMiniOptional<z.ZodMiniIntersection<z.ZodMiniObject<{
|
|
3713
|
+
views: z.ZodMiniNumberFormat;
|
|
3714
|
+
likes: z.ZodMiniNumberFormat;
|
|
3715
|
+
comments: z.ZodMiniNumberFormat;
|
|
3716
|
+
shares: z.ZodMiniNumberFormat;
|
|
3717
|
+
extraMetrics: z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniNumberFormat>;
|
|
3718
|
+
syncedAt: z.z.iso.ZodMiniISODateTime;
|
|
3719
|
+
}, z.z.core.$strip>, z.ZodMiniUnknown>>;
|
|
3111
3720
|
postOverrides: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
3112
3721
|
content: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
3113
3722
|
thumbnailTimestamp: z.ZodMiniOptional<z.ZodMiniNumberFormat>;
|
|
@@ -3142,6 +3751,7 @@ declare const zCreatePostResponse: z.ZodMiniObject<{
|
|
|
3142
3751
|
tags: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
|
|
3143
3752
|
embeddable: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
|
|
3144
3753
|
playlistId: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
3754
|
+
thumbnailMediaId: z.ZodMiniOptional<z.ZodMiniUUID>;
|
|
3145
3755
|
}, z.z.core.$strip>, z.ZodMiniObject<{
|
|
3146
3756
|
privacyLevel: z.ZodMiniEnum<{
|
|
3147
3757
|
PUBLIC_TO_EVERYONE: "PUBLIC_TO_EVERYONE";
|
|
@@ -3224,6 +3834,10 @@ declare const zGetPostResponse: z.ZodMiniObject<{
|
|
|
3224
3834
|
PUBLISHED: "PUBLISHED";
|
|
3225
3835
|
FAILED: "FAILED";
|
|
3226
3836
|
}>;
|
|
3837
|
+
source: z.ZodMiniEnum<{
|
|
3838
|
+
PUBLISHQ: "PUBLISHQ";
|
|
3839
|
+
IMPORTED: "IMPORTED";
|
|
3840
|
+
}>;
|
|
3227
3841
|
errorMessage: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
3228
3842
|
mediaIds: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniUUID>>;
|
|
3229
3843
|
deletedMediaCount: z.ZodMiniOptional<z.ZodMiniNumberFormat>;
|
|
@@ -3253,6 +3867,36 @@ declare const zGetPostResponse: z.ZodMiniObject<{
|
|
|
3253
3867
|
externalUrl: z.ZodMiniOptional<z.ZodMiniURL>;
|
|
3254
3868
|
publishedAt: z.ZodMiniOptional<z.z.iso.ZodMiniISODateTime>;
|
|
3255
3869
|
errorMessage: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
3870
|
+
thumbnail: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
3871
|
+
status: z.ZodMiniEnum<{
|
|
3872
|
+
FAILED: "FAILED";
|
|
3873
|
+
APPLIED: "APPLIED";
|
|
3874
|
+
}>;
|
|
3875
|
+
errorMessage: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
3876
|
+
}, z.z.core.$strip>>;
|
|
3877
|
+
failure: z.ZodMiniOptional<z.ZodMiniIntersection<z.ZodMiniObject<{
|
|
3878
|
+
kind: z.ZodMiniEnum<{
|
|
3879
|
+
RECONNECT: "RECONNECT";
|
|
3880
|
+
MEDIA: "MEDIA";
|
|
3881
|
+
ACCOUNT_STATE: "ACCOUNT_STATE";
|
|
3882
|
+
TRANSIENT: "TRANSIENT";
|
|
3883
|
+
MAYBE_PUBLISHED: "MAYBE_PUBLISHED";
|
|
3884
|
+
UNKNOWN: "UNKNOWN";
|
|
3885
|
+
}>;
|
|
3886
|
+
title: z.ZodMiniString<string>;
|
|
3887
|
+
whatHappened: z.ZodMiniString<string>;
|
|
3888
|
+
whatToDo: z.ZodMiniString<string>;
|
|
3889
|
+
canRetry: z.ZodMiniBoolean<boolean>;
|
|
3890
|
+
checkPlatformFirst: z.ZodMiniBoolean<boolean>;
|
|
3891
|
+
}, z.z.core.$strip>, z.ZodMiniUnknown>>;
|
|
3892
|
+
analytics: z.ZodMiniOptional<z.ZodMiniIntersection<z.ZodMiniObject<{
|
|
3893
|
+
views: z.ZodMiniNumberFormat;
|
|
3894
|
+
likes: z.ZodMiniNumberFormat;
|
|
3895
|
+
comments: z.ZodMiniNumberFormat;
|
|
3896
|
+
shares: z.ZodMiniNumberFormat;
|
|
3897
|
+
extraMetrics: z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniNumberFormat>;
|
|
3898
|
+
syncedAt: z.z.iso.ZodMiniISODateTime;
|
|
3899
|
+
}, z.z.core.$strip>, z.ZodMiniUnknown>>;
|
|
3256
3900
|
postOverrides: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
3257
3901
|
content: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
3258
3902
|
thumbnailTimestamp: z.ZodMiniOptional<z.ZodMiniNumberFormat>;
|
|
@@ -3287,6 +3931,7 @@ declare const zGetPostResponse: z.ZodMiniObject<{
|
|
|
3287
3931
|
tags: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
|
|
3288
3932
|
embeddable: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
|
|
3289
3933
|
playlistId: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
3934
|
+
thumbnailMediaId: z.ZodMiniOptional<z.ZodMiniUUID>;
|
|
3290
3935
|
}, z.z.core.$strip>, z.ZodMiniObject<{
|
|
3291
3936
|
privacyLevel: z.ZodMiniEnum<{
|
|
3292
3937
|
PUBLIC_TO_EVERYONE: "PUBLIC_TO_EVERYONE";
|
|
@@ -3353,11 +3998,11 @@ declare const zUpdatePostBody: z.ZodMiniObject<{
|
|
|
3353
3998
|
thumbnailTimestamp: z.ZodMiniOptional<z.ZodMiniNumberFormat>;
|
|
3354
3999
|
accounts: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniObject<{
|
|
3355
4000
|
accountId: z.ZodMiniUUID;
|
|
3356
|
-
postOverrides: z.ZodMiniOptional<z.
|
|
3357
|
-
content: z.ZodMiniOptional<z.ZodMiniString<string
|
|
3358
|
-
|
|
3359
|
-
|
|
3360
|
-
}, z.z.core.$strip
|
|
4001
|
+
postOverrides: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
4002
|
+
content: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>;
|
|
4003
|
+
mediaIds: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniArray<z.ZodMiniUUID>>>;
|
|
4004
|
+
thumbnailTimestamp: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniNumberFormat>>;
|
|
4005
|
+
}, z.z.core.$strip>>;
|
|
3361
4006
|
platformSpecificSettings: z.ZodMiniOptional<z.ZodMiniIntersection<z.ZodMiniUnion<readonly [z.ZodMiniObject<{
|
|
3362
4007
|
description: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
3363
4008
|
privacyStatus: z.ZodMiniOptional<z.ZodMiniEnum<{
|
|
@@ -3387,6 +4032,7 @@ declare const zUpdatePostBody: z.ZodMiniObject<{
|
|
|
3387
4032
|
tags: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
|
|
3388
4033
|
embeddable: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
|
|
3389
4034
|
playlistId: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
4035
|
+
thumbnailMediaId: z.ZodMiniOptional<z.ZodMiniUUID>;
|
|
3390
4036
|
}, z.z.core.$strip>, z.ZodMiniObject<{
|
|
3391
4037
|
privacyLevel: z.ZodMiniEnum<{
|
|
3392
4038
|
PUBLIC_TO_EVERYONE: "PUBLIC_TO_EVERYONE";
|
|
@@ -3463,6 +4109,10 @@ declare const zUpdatePostResponse: z.ZodMiniObject<{
|
|
|
3463
4109
|
PUBLISHED: "PUBLISHED";
|
|
3464
4110
|
FAILED: "FAILED";
|
|
3465
4111
|
}>;
|
|
4112
|
+
source: z.ZodMiniEnum<{
|
|
4113
|
+
PUBLISHQ: "PUBLISHQ";
|
|
4114
|
+
IMPORTED: "IMPORTED";
|
|
4115
|
+
}>;
|
|
3466
4116
|
errorMessage: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
3467
4117
|
mediaIds: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniUUID>>;
|
|
3468
4118
|
deletedMediaCount: z.ZodMiniOptional<z.ZodMiniNumberFormat>;
|
|
@@ -3492,6 +4142,36 @@ declare const zUpdatePostResponse: z.ZodMiniObject<{
|
|
|
3492
4142
|
externalUrl: z.ZodMiniOptional<z.ZodMiniURL>;
|
|
3493
4143
|
publishedAt: z.ZodMiniOptional<z.z.iso.ZodMiniISODateTime>;
|
|
3494
4144
|
errorMessage: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
4145
|
+
thumbnail: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
4146
|
+
status: z.ZodMiniEnum<{
|
|
4147
|
+
FAILED: "FAILED";
|
|
4148
|
+
APPLIED: "APPLIED";
|
|
4149
|
+
}>;
|
|
4150
|
+
errorMessage: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
4151
|
+
}, z.z.core.$strip>>;
|
|
4152
|
+
failure: z.ZodMiniOptional<z.ZodMiniIntersection<z.ZodMiniObject<{
|
|
4153
|
+
kind: z.ZodMiniEnum<{
|
|
4154
|
+
RECONNECT: "RECONNECT";
|
|
4155
|
+
MEDIA: "MEDIA";
|
|
4156
|
+
ACCOUNT_STATE: "ACCOUNT_STATE";
|
|
4157
|
+
TRANSIENT: "TRANSIENT";
|
|
4158
|
+
MAYBE_PUBLISHED: "MAYBE_PUBLISHED";
|
|
4159
|
+
UNKNOWN: "UNKNOWN";
|
|
4160
|
+
}>;
|
|
4161
|
+
title: z.ZodMiniString<string>;
|
|
4162
|
+
whatHappened: z.ZodMiniString<string>;
|
|
4163
|
+
whatToDo: z.ZodMiniString<string>;
|
|
4164
|
+
canRetry: z.ZodMiniBoolean<boolean>;
|
|
4165
|
+
checkPlatformFirst: z.ZodMiniBoolean<boolean>;
|
|
4166
|
+
}, z.z.core.$strip>, z.ZodMiniUnknown>>;
|
|
4167
|
+
analytics: z.ZodMiniOptional<z.ZodMiniIntersection<z.ZodMiniObject<{
|
|
4168
|
+
views: z.ZodMiniNumberFormat;
|
|
4169
|
+
likes: z.ZodMiniNumberFormat;
|
|
4170
|
+
comments: z.ZodMiniNumberFormat;
|
|
4171
|
+
shares: z.ZodMiniNumberFormat;
|
|
4172
|
+
extraMetrics: z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniNumberFormat>;
|
|
4173
|
+
syncedAt: z.z.iso.ZodMiniISODateTime;
|
|
4174
|
+
}, z.z.core.$strip>, z.ZodMiniUnknown>>;
|
|
3495
4175
|
postOverrides: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
3496
4176
|
content: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
3497
4177
|
thumbnailTimestamp: z.ZodMiniOptional<z.ZodMiniNumberFormat>;
|
|
@@ -3526,6 +4206,7 @@ declare const zUpdatePostResponse: z.ZodMiniObject<{
|
|
|
3526
4206
|
tags: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
|
|
3527
4207
|
embeddable: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
|
|
3528
4208
|
playlistId: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
4209
|
+
thumbnailMediaId: z.ZodMiniOptional<z.ZodMiniUUID>;
|
|
3529
4210
|
}, z.z.core.$strip>, z.ZodMiniObject<{
|
|
3530
4211
|
privacyLevel: z.ZodMiniEnum<{
|
|
3531
4212
|
PUBLIC_TO_EVERYONE: "PUBLIC_TO_EVERYONE";
|
|
@@ -3769,11 +4450,45 @@ declare const zGetMediaResponse: z.ZodMiniObject<{
|
|
|
3769
4450
|
created_at: z.z.iso.ZodMiniISODateTime;
|
|
3770
4451
|
usageCount: z.ZodMiniNumberFormat;
|
|
3771
4452
|
}, z.z.core.$strip>;
|
|
4453
|
+
declare const zCreateMediaUploadBody: z.ZodMiniObject<{
|
|
4454
|
+
filename: z.ZodMiniString<string>;
|
|
4455
|
+
contentType: z.ZodMiniString<string>;
|
|
4456
|
+
fileSize: z.ZodMiniNumberFormat;
|
|
4457
|
+
}, z.z.core.$strip>;
|
|
4458
|
+
/**
|
|
4459
|
+
* Upload created. Send the file to uploadUrl next.
|
|
4460
|
+
*/
|
|
4461
|
+
declare const zCreateMediaUploadResponse: z.ZodMiniObject<{
|
|
4462
|
+
id: z.ZodMiniUUID;
|
|
4463
|
+
uploadUrl: z.ZodMiniURL;
|
|
4464
|
+
expiresAt: z.z.iso.ZodMiniISODateTime;
|
|
4465
|
+
}, z.z.core.$strip>;
|
|
4466
|
+
declare const zCompleteMediaUploadPath: z.ZodMiniObject<{
|
|
4467
|
+
id: z.ZodMiniUUID;
|
|
4468
|
+
}, z.z.core.$strip>;
|
|
4469
|
+
/**
|
|
4470
|
+
* The file is in your media library
|
|
4471
|
+
*/
|
|
4472
|
+
declare const zCompleteMediaUploadResponse: z.ZodMiniObject<{
|
|
4473
|
+
id: z.ZodMiniUUID;
|
|
4474
|
+
type: z.ZodMiniEnum<{
|
|
4475
|
+
IMAGE: "IMAGE";
|
|
4476
|
+
VIDEO: "VIDEO";
|
|
4477
|
+
}>;
|
|
4478
|
+
url: z.ZodMiniURL;
|
|
4479
|
+
source: z.ZodMiniEnum<{
|
|
4480
|
+
UPLOAD: "UPLOAD";
|
|
4481
|
+
GENERATED: "GENERATED";
|
|
4482
|
+
AI_GENERATED: "AI_GENERATED";
|
|
4483
|
+
}>;
|
|
4484
|
+
created_at: z.z.iso.ZodMiniISODateTime;
|
|
4485
|
+
usageCount: z.ZodMiniNumberFormat;
|
|
4486
|
+
}, z.z.core.$strip>;
|
|
3772
4487
|
|
|
3773
4488
|
interface PublishQOptions {
|
|
3774
4489
|
/**
|
|
3775
4490
|
* Your PublishQ API key (begins with `pq_live_`). Create one in the web app
|
|
3776
|
-
* under **
|
|
4491
|
+
* under **API Keys** and select the scopes you need.
|
|
3777
4492
|
*/
|
|
3778
4493
|
apiKey: string;
|
|
3779
4494
|
/**
|
|
@@ -3951,6 +4666,16 @@ declare function createWorkspacesNamespace(client: Client): {
|
|
|
3951
4666
|
response?: Response | undefined;
|
|
3952
4667
|
}>;
|
|
3953
4668
|
};
|
|
4669
|
+
/**
|
|
4670
|
+
* Returns the file with a usable `type`, inferring it from the filename when the
|
|
4671
|
+
* caller could not supply one. Anything that already declares a type, or whose
|
|
4672
|
+
* extension is unknown, is passed through untouched: guessing past that point
|
|
4673
|
+
* would be inventing a fact, and the API's own byte-level detection is the thing
|
|
4674
|
+
* that decides what the file really is.
|
|
4675
|
+
*/
|
|
4676
|
+
declare function withInferredContentType(file: Blob | File): Blob | File;
|
|
4677
|
+
/** Files above this size are sent straight to storage through `createUpload`. */
|
|
4678
|
+
declare const STORAGE_UPLOAD_THRESHOLD_BYTES: number;
|
|
3954
4679
|
declare function createMediaNamespace(client: Client): {
|
|
3955
4680
|
/** List your uploaded and generated media files. Filter by id, type, source. Wraps `Media.listMedia`. */
|
|
3956
4681
|
list: (query?: ListMediaData['query']) => Promise<({
|
|
@@ -3963,8 +4688,54 @@ declare function createMediaNamespace(client: Client): {
|
|
|
3963
4688
|
request?: Request | undefined;
|
|
3964
4689
|
response?: Response | undefined;
|
|
3965
4690
|
}>;
|
|
3966
|
-
/**
|
|
4691
|
+
/**
|
|
4692
|
+
* Upload one media file and get back a media ID to attach to posts. Wraps
|
|
4693
|
+
* `Media.uploadMedia`, or for files over `STORAGE_UPLOAD_THRESHOLD_BYTES`
|
|
4694
|
+
* runs `createUpload`, sends the file to storage and returns the finished
|
|
4695
|
+
* media from `completeUpload`. Both return the same `Media` object.
|
|
4696
|
+
*
|
|
4697
|
+
* The file's content type is filled in from its name when it has none, so a
|
|
4698
|
+
* file read off disk with `new File([buffer], 'photo.jpg')` is not sent as
|
|
4699
|
+
* `application/octet-stream` and refused. See `withInferredContentType`.
|
|
4700
|
+
*/
|
|
3967
4701
|
upload: (body: UploadMediaData['body']) => Promise<({
|
|
4702
|
+
data: undefined;
|
|
4703
|
+
error: ApiError;
|
|
4704
|
+
} & {
|
|
4705
|
+
request?: Request | undefined;
|
|
4706
|
+
response?: Response | undefined;
|
|
4707
|
+
}) | ({
|
|
4708
|
+
data: Media$1;
|
|
4709
|
+
error: undefined;
|
|
4710
|
+
} & {
|
|
4711
|
+
request?: Request | undefined;
|
|
4712
|
+
response?: Response | undefined;
|
|
4713
|
+
}) | {
|
|
4714
|
+
data: undefined;
|
|
4715
|
+
error: {
|
|
4716
|
+
error: {
|
|
4717
|
+
status: number;
|
|
4718
|
+
message: string;
|
|
4719
|
+
mediaId: string;
|
|
4720
|
+
storageResponse: string;
|
|
4721
|
+
};
|
|
4722
|
+
};
|
|
4723
|
+
request: Request;
|
|
4724
|
+
response: Response;
|
|
4725
|
+
}>;
|
|
4726
|
+
/** Get a storage upload URL for a file of up to 4 GB. Send the file there, then use the returned media ID in posts. Wraps `Media.createMediaUpload`. */
|
|
4727
|
+
createUpload: (body: CreateMediaUploadData['body']) => Promise<({
|
|
4728
|
+
data: MediaUpload;
|
|
4729
|
+
error: undefined;
|
|
4730
|
+
} | {
|
|
4731
|
+
data: undefined;
|
|
4732
|
+
error: ApiError;
|
|
4733
|
+
}) & {
|
|
4734
|
+
request?: Request | undefined;
|
|
4735
|
+
response?: Response | undefined;
|
|
4736
|
+
}>;
|
|
4737
|
+
/** Add a file sent to a `createUpload` URL to the media library now and return it. Optional: using the ID in a post does the same. Wraps `Media.completeMediaUpload`. */
|
|
4738
|
+
completeUpload: (id: string) => Promise<({
|
|
3968
4739
|
data: Media$1;
|
|
3969
4740
|
error: undefined;
|
|
3970
4741
|
} | {
|
|
@@ -3987,4 +4758,4 @@ declare function createMediaNamespace(client: Client): {
|
|
|
3987
4758
|
}>;
|
|
3988
4759
|
};
|
|
3989
4760
|
|
|
3990
|
-
export { type Account, Accounts, type AccountsResponse, type ApiError, type ApiErrorCode, type ApiKeyScope, type BlueskyPlatformSpecificSettings, type ClientOptions, type CreatePostAccount, type CreatePostData, type CreatePostError, type CreatePostErrors, type CreatePostRequest, type CreatePostResponse, type CreatePostResponses, type CreateWorkspaceData, type CreateWorkspaceError, type CreateWorkspaceErrors, type CreateWorkspaceRequest, type CreateWorkspaceResponse, type CreateWorkspaceResponses, type DeletePostData, type DeletePostError, type DeletePostErrors, type DeletePostResponse, type DeletePostResponses, type FacebookPlatformSpecificSettings, type GetMediaData, type GetMediaError, type GetMediaErrors, type GetMediaResponse, type GetMediaResponses, type GetPostData, type GetPostError, type GetPostErrors, type GetPostResponse, type GetPostResponses, type GetTikTokCreatorInfoData, type GetTikTokCreatorInfoError, type GetTikTokCreatorInfoErrors, type GetTikTokCreatorInfoResponse, type GetTikTokCreatorInfoResponses, type GetWorkspaceData, type GetWorkspaceError, type GetWorkspaceErrors, type GetWorkspaceResponse, type GetWorkspaceResponses, type InstagramPlatformSpecificSettings, type InstagramTrialParams, type LinkedInPlatformSpecificSettings, type ListAccountsData, type ListAccountsError, type ListAccountsErrors, type ListAccountsResponse, type ListAccountsResponses, type ListMediaData, type ListMediaError, type ListMediaErrors, type ListMediaResponse, type ListMediaResponses, type ListPostsData, type ListPostsError, type ListPostsErrors, type ListPostsResponse, type ListPostsResponses, type ListWorkspacesData, type ListWorkspacesError, type ListWorkspacesErrors, type ListWorkspacesResponse, type ListWorkspacesResponses, type Media$1 as Media, Media as Media2, type MediaListResponse, type MediaSource, type MediaType, type Options, type Pagination, type PlatformSpecificSettings, type Post, type PostAccount, type PostOverrides, type PostStatus, Posts, type PostsResponse, PublishQ, type PublishQOptions, type RemovePostAccountData, type RemovePostAccountError, type RemovePostAccountErrors, type RemovePostAccountResponse, type RemovePostAccountResponses, type SocialPlatform, type SuccessMessage, type ThreadsPlatformSpecificSettings, type TikTokCreatorInfoResponse, type TikTokPlatformSpecificSettings, type TwitterPlatformSpecificSettings, type UpdatePostData, type UpdatePostError, type UpdatePostErrors, type UpdatePostRequest, type UpdatePostResponse, type UpdatePostResponses, type UploadMediaData, type UploadMediaError, type UploadMediaErrors, type UploadMediaRequest, type UploadMediaResponse, type UploadMediaResponses, type Workspace, Workspaces, type WorkspacesResponse, type YouTubePlatformSpecificSettings, PublishQ as default, zAccount, zAccountsResponse, zApiError, zApiErrorCode, zApiKeyScope, zBlueskyPlatformSpecificSettings, zCreatePostAccount, zCreatePostBody, zCreatePostRequest, zCreatePostResponse, zCreateWorkspaceBody, zCreateWorkspaceRequest, zCreateWorkspaceResponse, zDeletePostPath, zDeletePostResponse, zFacebookPlatformSpecificSettings, zGetMediaPath, zGetMediaResponse, zGetPostPath, zGetPostResponse, zGetTikTokCreatorInfoPath, zGetTikTokCreatorInfoResponse, zGetWorkspacePath, zGetWorkspaceResponse, zInstagramPlatformSpecificSettings, zInstagramTrialParams, zLinkedInPlatformSpecificSettings, zListAccountsQuery, zListAccountsResponse, zListMediaQuery, zListMediaResponse, zListPostsQuery, zListPostsResponse, zListWorkspacesResponse, zMedia, zMediaListResponse, zMediaSource, zMediaType, zPagination, zPlatformSpecificSettings, zPost, zPostAccount, zPostOverrides, zPostStatus, zPostsResponse, zRemovePostAccountPath, zRemovePostAccountResponse, zSocialPlatform, zSuccessMessage, zThreadsPlatformSpecificSettings, zTikTokCreatorInfoResponse, zTikTokPlatformSpecificSettings, zTwitterPlatformSpecificSettings, zUpdatePostBody, zUpdatePostPath, zUpdatePostRequest, zUpdatePostResponse, zUploadMediaBody, zUploadMediaRequest, zUploadMediaResponse, zWorkspace, zWorkspacesResponse, zYouTubePlatformSpecificSettings };
|
|
4761
|
+
export { type Account, Accounts, type AccountsResponse, type ApiError, type ApiErrorCode, type ApiKeyScope, type BlueskyPlatformSpecificSettings, type ClientOptions, type CompleteMediaUploadData, type CompleteMediaUploadError, type CompleteMediaUploadErrors, type CompleteMediaUploadResponse, type CompleteMediaUploadResponses, type CreateMediaUploadData, type CreateMediaUploadError, type CreateMediaUploadErrors, type CreateMediaUploadRequest, type CreateMediaUploadResponse, type CreateMediaUploadResponses, type CreatePostAccount, type CreatePostData, type CreatePostError, type CreatePostErrors, type CreatePostRequest, type CreatePostResponse, type CreatePostResponses, type CreateWorkspaceData, type CreateWorkspaceError, type CreateWorkspaceErrors, type CreateWorkspaceRequest, type CreateWorkspaceResponse, type CreateWorkspaceResponses, type DeletePostData, type DeletePostError, type DeletePostErrors, type DeletePostResponse, type DeletePostResponses, type FacebookPlatformSpecificSettings, type GetMediaData, type GetMediaError, type GetMediaErrors, type GetMediaResponse, type GetMediaResponses, type GetPostData, type GetPostError, type GetPostErrors, type GetPostResponse, type GetPostResponses, type GetTikTokCreatorInfoData, type GetTikTokCreatorInfoError, type GetTikTokCreatorInfoErrors, type GetTikTokCreatorInfoResponse, type GetTikTokCreatorInfoResponses, type GetWorkspaceData, type GetWorkspaceError, type GetWorkspaceErrors, type GetWorkspaceResponse, type GetWorkspaceResponses, type InstagramPlatformSpecificSettings, type InstagramTrialParams, type LinkedInPlatformSpecificSettings, type ListAccountsData, type ListAccountsError, type ListAccountsErrors, type ListAccountsResponse, type ListAccountsResponses, type ListMediaData, type ListMediaError, type ListMediaErrors, type ListMediaResponse, type ListMediaResponses, type ListPostsData, type ListPostsError, type ListPostsErrors, type ListPostsResponse, type ListPostsResponses, type ListWorkspacesData, type ListWorkspacesError, type ListWorkspacesErrors, type ListWorkspacesResponse, type ListWorkspacesResponses, type Media$1 as Media, Media as Media2, type MediaListResponse, type MediaSource, type MediaType, type MediaUpload, type Options, type Pagination, type PlatformSpecificSettings, type Post, type PostAccount, type PostAnalytics, type PostOverrides, type PostSource, type PostStatus, Posts, type PostsResponse, type PublishFailure, PublishQ, type PublishQOptions, type RemovePostAccountData, type RemovePostAccountError, type RemovePostAccountErrors, type RemovePostAccountResponse, type RemovePostAccountResponses, STORAGE_UPLOAD_THRESHOLD_BYTES, type SocialPlatform, type SuccessMessage, type ThreadsPlatformSpecificSettings, type TikTokCreatorInfoResponse, type TikTokPlatformSpecificSettings, type TwitterPlatformSpecificSettings, type UpdatePostAccount, type UpdatePostData, type UpdatePostError, type UpdatePostErrors, type UpdatePostOverrides, type UpdatePostRequest, type UpdatePostResponse, type UpdatePostResponses, type UploadMediaData, type UploadMediaError, type UploadMediaErrors, type UploadMediaRequest, type UploadMediaResponse, type UploadMediaResponses, type Workspace, Workspaces, type WorkspacesResponse, type YouTubePlatformSpecificSettings, PublishQ as default, withInferredContentType, zAccount, zAccountsResponse, zApiError, zApiErrorCode, zApiKeyScope, zBlueskyPlatformSpecificSettings, zCompleteMediaUploadPath, zCompleteMediaUploadResponse, zCreateMediaUploadBody, zCreateMediaUploadRequest, zCreateMediaUploadResponse, zCreatePostAccount, zCreatePostBody, zCreatePostRequest, zCreatePostResponse, zCreateWorkspaceBody, zCreateWorkspaceRequest, zCreateWorkspaceResponse, zDeletePostPath, zDeletePostResponse, zFacebookPlatformSpecificSettings, zGetMediaPath, zGetMediaResponse, zGetPostPath, zGetPostResponse, zGetTikTokCreatorInfoPath, zGetTikTokCreatorInfoResponse, zGetWorkspacePath, zGetWorkspaceResponse, zInstagramPlatformSpecificSettings, zInstagramTrialParams, zLinkedInPlatformSpecificSettings, zListAccountsQuery, zListAccountsResponse, zListMediaQuery, zListMediaResponse, zListPostsQuery, zListPostsResponse, zListWorkspacesResponse, zMedia, zMediaListResponse, zMediaSource, zMediaType, zMediaUpload, zPagination, zPlatformSpecificSettings, zPost, zPostAccount, zPostAnalytics, zPostOverrides, zPostSource, zPostStatus, zPostsResponse, zPublishFailure, zRemovePostAccountPath, zRemovePostAccountResponse, zSocialPlatform, zSuccessMessage, zThreadsPlatformSpecificSettings, zTikTokCreatorInfoResponse, zTikTokPlatformSpecificSettings, zTwitterPlatformSpecificSettings, zUpdatePostAccount, zUpdatePostBody, zUpdatePostOverrides, zUpdatePostPath, zUpdatePostRequest, zUpdatePostResponse, zUploadMediaBody, zUploadMediaRequest, zUploadMediaResponse, zWorkspace, zWorkspacesResponse, zYouTubePlatformSpecificSettings };
|