@publishq/sdk 0.0.2 → 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/dist/index.d.ts CHANGED
@@ -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
@@ -663,6 +667,13 @@ type PostAccount = {
663
667
  * Error message from the platform if publishing failed for this account.
664
668
  */
665
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
+ };
666
677
  failure?: PublishFailure & unknown;
667
678
  analytics?: PostAnalytics & unknown;
668
679
  postOverrides?: PostOverrides;
@@ -720,6 +731,10 @@ type PlatformSpecificSettings = {
720
731
  * Playlist ID to add the video to after upload.
721
732
  */
722
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;
723
738
  } | {
724
739
  /**
725
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.
@@ -925,7 +940,7 @@ type CreatePostAccount = {
925
940
  platformSpecificSettings?: PlatformSpecificSettings & unknown;
926
941
  };
927
942
  /**
928
- * 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.
929
944
  */
930
945
  type UpdatePostRequest = {
931
946
  /**
@@ -945,14 +960,39 @@ type UpdatePostRequest = {
945
960
  */
946
961
  thumbnailTimestamp?: number;
947
962
  /**
948
- * Accounts whose content overrides or platform-specific settings should be updated, plus any additional connected accounts to add to the post. Existing accounts omitted from this array remain unchanged and must be removed through the account-specific delete endpoint.
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.
949
964
  */
950
- accounts?: Array<CreatePostAccount>;
965
+ accounts?: Array<UpdatePostAccount>;
951
966
  /**
952
967
  * Publish an existing draft immediately. Cannot be combined with scheduledAt.
953
968
  */
954
969
  publishNow?: boolean;
955
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
+ };
956
996
  type SuccessMessage = {
957
997
  deleted: true;
958
998
  id: string;
@@ -2056,6 +2096,7 @@ declare const zYouTubePlatformSpecificSettings: z.ZodMiniObject<{
2056
2096
  tags: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
2057
2097
  embeddable: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
2058
2098
  playlistId: z.ZodMiniOptional<z.ZodMiniString<string>>;
2099
+ thumbnailMediaId: z.ZodMiniOptional<z.ZodMiniUUID>;
2059
2100
  }, z.z.core.$strip>;
2060
2101
  /**
2061
2102
  * TikTokPlatformSpecificSettings
@@ -2204,6 +2245,7 @@ declare const zPlatformSpecificSettings: z.ZodMiniUnion<readonly [z.ZodMiniObjec
2204
2245
  tags: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
2205
2246
  embeddable: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
2206
2247
  playlistId: z.ZodMiniOptional<z.ZodMiniString<string>>;
2248
+ thumbnailMediaId: z.ZodMiniOptional<z.ZodMiniUUID>;
2207
2249
  }, z.z.core.$strip>, z.ZodMiniObject<{
2208
2250
  privacyLevel: z.ZodMiniEnum<{
2209
2251
  PUBLIC_TO_EVERYONE: "PUBLIC_TO_EVERYONE";
@@ -2284,6 +2326,13 @@ declare const zPostAccount: z.ZodMiniObject<{
2284
2326
  externalUrl: z.ZodMiniOptional<z.ZodMiniURL>;
2285
2327
  publishedAt: z.ZodMiniOptional<z.z.iso.ZodMiniISODateTime>;
2286
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>>;
2287
2336
  failure: z.ZodMiniOptional<z.ZodMiniIntersection<z.ZodMiniObject<{
2288
2337
  kind: z.ZodMiniEnum<{
2289
2338
  RECONNECT: "RECONNECT";
@@ -2341,6 +2390,7 @@ declare const zPostAccount: z.ZodMiniObject<{
2341
2390
  tags: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
2342
2391
  embeddable: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
2343
2392
  playlistId: z.ZodMiniOptional<z.ZodMiniString<string>>;
2393
+ thumbnailMediaId: z.ZodMiniOptional<z.ZodMiniUUID>;
2344
2394
  }, z.z.core.$strip>, z.ZodMiniObject<{
2345
2395
  privacyLevel: z.ZodMiniEnum<{
2346
2396
  PUBLIC_TO_EVERYONE: "PUBLIC_TO_EVERYONE";
@@ -2442,6 +2492,13 @@ declare const zPost: z.ZodMiniObject<{
2442
2492
  externalUrl: z.ZodMiniOptional<z.ZodMiniURL>;
2443
2493
  publishedAt: z.ZodMiniOptional<z.z.iso.ZodMiniISODateTime>;
2444
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>>;
2445
2502
  failure: z.ZodMiniOptional<z.ZodMiniIntersection<z.ZodMiniObject<{
2446
2503
  kind: z.ZodMiniEnum<{
2447
2504
  RECONNECT: "RECONNECT";
@@ -2499,6 +2556,7 @@ declare const zPost: z.ZodMiniObject<{
2499
2556
  tags: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
2500
2557
  embeddable: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
2501
2558
  playlistId: z.ZodMiniOptional<z.ZodMiniString<string>>;
2559
+ thumbnailMediaId: z.ZodMiniOptional<z.ZodMiniUUID>;
2502
2560
  }, z.z.core.$strip>, z.ZodMiniObject<{
2503
2561
  privacyLevel: z.ZodMiniEnum<{
2504
2562
  PUBLIC_TO_EVERYONE: "PUBLIC_TO_EVERYONE";
@@ -2602,6 +2660,13 @@ declare const zPostsResponse: z.ZodMiniObject<{
2602
2660
  externalUrl: z.ZodMiniOptional<z.ZodMiniURL>;
2603
2661
  publishedAt: z.ZodMiniOptional<z.z.iso.ZodMiniISODateTime>;
2604
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>>;
2605
2670
  failure: z.ZodMiniOptional<z.ZodMiniIntersection<z.ZodMiniObject<{
2606
2671
  kind: z.ZodMiniEnum<{
2607
2672
  RECONNECT: "RECONNECT";
@@ -2659,6 +2724,7 @@ declare const zPostsResponse: z.ZodMiniObject<{
2659
2724
  tags: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
2660
2725
  embeddable: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
2661
2726
  playlistId: z.ZodMiniOptional<z.ZodMiniString<string>>;
2727
+ thumbnailMediaId: z.ZodMiniOptional<z.ZodMiniUUID>;
2662
2728
  }, z.z.core.$strip>, z.ZodMiniObject<{
2663
2729
  privacyLevel: z.ZodMiniEnum<{
2664
2730
  PUBLIC_TO_EVERYONE: "PUBLIC_TO_EVERYONE";
@@ -2763,6 +2829,7 @@ declare const zCreatePostAccount: z.ZodMiniObject<{
2763
2829
  tags: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
2764
2830
  embeddable: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
2765
2831
  playlistId: z.ZodMiniOptional<z.ZodMiniString<string>>;
2832
+ thumbnailMediaId: z.ZodMiniOptional<z.ZodMiniUUID>;
2766
2833
  }, z.z.core.$strip>, z.ZodMiniObject<{
2767
2834
  privacyLevel: z.ZodMiniEnum<{
2768
2835
  PUBLIC_TO_EVERYONE: "PUBLIC_TO_EVERYONE";
@@ -2864,6 +2931,7 @@ declare const zCreatePostRequest: z.ZodMiniObject<{
2864
2931
  tags: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
2865
2932
  embeddable: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
2866
2933
  playlistId: z.ZodMiniOptional<z.ZodMiniString<string>>;
2934
+ thumbnailMediaId: z.ZodMiniOptional<z.ZodMiniUUID>;
2867
2935
  }, z.z.core.$strip>, z.ZodMiniObject<{
2868
2936
  privacyLevel: z.ZodMiniEnum<{
2869
2937
  PUBLIC_TO_EVERYONE: "PUBLIC_TO_EVERYONE";
@@ -2926,7 +2994,110 @@ declare const zCreatePostRequest: z.ZodMiniObject<{
2926
2994
  publishNow: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
2927
2995
  }, z.z.core.$strip>;
2928
2996
  /**
2929
- * 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.
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.
2930
3101
  */
2931
3102
  declare const zUpdatePostRequest: z.ZodMiniObject<{
2932
3103
  content: z.ZodMiniOptional<z.ZodMiniString<string>>;
@@ -2935,11 +3106,11 @@ declare const zUpdatePostRequest: z.ZodMiniObject<{
2935
3106
  thumbnailTimestamp: z.ZodMiniOptional<z.ZodMiniNumberFormat>;
2936
3107
  accounts: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniObject<{
2937
3108
  accountId: z.ZodMiniUUID;
2938
- postOverrides: z.ZodMiniOptional<z.ZodMiniIntersection<z.ZodMiniObject<{
2939
- content: z.ZodMiniOptional<z.ZodMiniString<string>>;
2940
- thumbnailTimestamp: z.ZodMiniOptional<z.ZodMiniNumberFormat>;
2941
- mediaIds: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniUUID>>;
2942
- }, z.z.core.$strip>, z.ZodMiniUnknown>>;
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>>;
2943
3114
  platformSpecificSettings: z.ZodMiniOptional<z.ZodMiniIntersection<z.ZodMiniUnion<readonly [z.ZodMiniObject<{
2944
3115
  description: z.ZodMiniOptional<z.ZodMiniString<string>>;
2945
3116
  privacyStatus: z.ZodMiniOptional<z.ZodMiniEnum<{
@@ -2969,6 +3140,7 @@ declare const zUpdatePostRequest: z.ZodMiniObject<{
2969
3140
  tags: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
2970
3141
  embeddable: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
2971
3142
  playlistId: z.ZodMiniOptional<z.ZodMiniString<string>>;
3143
+ thumbnailMediaId: z.ZodMiniOptional<z.ZodMiniUUID>;
2972
3144
  }, z.z.core.$strip>, z.ZodMiniObject<{
2973
3145
  privacyLevel: z.ZodMiniEnum<{
2974
3146
  PUBLIC_TO_EVERYONE: "PUBLIC_TO_EVERYONE";
@@ -3234,6 +3406,13 @@ declare const zListPostsResponse: z.ZodMiniObject<{
3234
3406
  externalUrl: z.ZodMiniOptional<z.ZodMiniURL>;
3235
3407
  publishedAt: z.ZodMiniOptional<z.z.iso.ZodMiniISODateTime>;
3236
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>>;
3237
3416
  failure: z.ZodMiniOptional<z.ZodMiniIntersection<z.ZodMiniObject<{
3238
3417
  kind: z.ZodMiniEnum<{
3239
3418
  RECONNECT: "RECONNECT";
@@ -3291,6 +3470,7 @@ declare const zListPostsResponse: z.ZodMiniObject<{
3291
3470
  tags: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
3292
3471
  embeddable: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
3293
3472
  playlistId: z.ZodMiniOptional<z.ZodMiniString<string>>;
3473
+ thumbnailMediaId: z.ZodMiniOptional<z.ZodMiniUUID>;
3294
3474
  }, z.z.core.$strip>, z.ZodMiniObject<{
3295
3475
  privacyLevel: z.ZodMiniEnum<{
3296
3476
  PUBLIC_TO_EVERYONE: "PUBLIC_TO_EVERYONE";
@@ -3399,6 +3579,7 @@ declare const zCreatePostBody: z.ZodMiniObject<{
3399
3579
  tags: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
3400
3580
  embeddable: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
3401
3581
  playlistId: z.ZodMiniOptional<z.ZodMiniString<string>>;
3582
+ thumbnailMediaId: z.ZodMiniOptional<z.ZodMiniUUID>;
3402
3583
  }, z.z.core.$strip>, z.ZodMiniObject<{
3403
3584
  privacyLevel: z.ZodMiniEnum<{
3404
3585
  PUBLIC_TO_EVERYONE: "PUBLIC_TO_EVERYONE";
@@ -3506,6 +3687,13 @@ declare const zCreatePostResponse: z.ZodMiniObject<{
3506
3687
  externalUrl: z.ZodMiniOptional<z.ZodMiniURL>;
3507
3688
  publishedAt: z.ZodMiniOptional<z.z.iso.ZodMiniISODateTime>;
3508
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>>;
3509
3697
  failure: z.ZodMiniOptional<z.ZodMiniIntersection<z.ZodMiniObject<{
3510
3698
  kind: z.ZodMiniEnum<{
3511
3699
  RECONNECT: "RECONNECT";
@@ -3563,6 +3751,7 @@ declare const zCreatePostResponse: z.ZodMiniObject<{
3563
3751
  tags: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
3564
3752
  embeddable: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
3565
3753
  playlistId: z.ZodMiniOptional<z.ZodMiniString<string>>;
3754
+ thumbnailMediaId: z.ZodMiniOptional<z.ZodMiniUUID>;
3566
3755
  }, z.z.core.$strip>, z.ZodMiniObject<{
3567
3756
  privacyLevel: z.ZodMiniEnum<{
3568
3757
  PUBLIC_TO_EVERYONE: "PUBLIC_TO_EVERYONE";
@@ -3678,6 +3867,13 @@ declare const zGetPostResponse: z.ZodMiniObject<{
3678
3867
  externalUrl: z.ZodMiniOptional<z.ZodMiniURL>;
3679
3868
  publishedAt: z.ZodMiniOptional<z.z.iso.ZodMiniISODateTime>;
3680
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>>;
3681
3877
  failure: z.ZodMiniOptional<z.ZodMiniIntersection<z.ZodMiniObject<{
3682
3878
  kind: z.ZodMiniEnum<{
3683
3879
  RECONNECT: "RECONNECT";
@@ -3735,6 +3931,7 @@ declare const zGetPostResponse: z.ZodMiniObject<{
3735
3931
  tags: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
3736
3932
  embeddable: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
3737
3933
  playlistId: z.ZodMiniOptional<z.ZodMiniString<string>>;
3934
+ thumbnailMediaId: z.ZodMiniOptional<z.ZodMiniUUID>;
3738
3935
  }, z.z.core.$strip>, z.ZodMiniObject<{
3739
3936
  privacyLevel: z.ZodMiniEnum<{
3740
3937
  PUBLIC_TO_EVERYONE: "PUBLIC_TO_EVERYONE";
@@ -3801,11 +3998,11 @@ declare const zUpdatePostBody: z.ZodMiniObject<{
3801
3998
  thumbnailTimestamp: z.ZodMiniOptional<z.ZodMiniNumberFormat>;
3802
3999
  accounts: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniObject<{
3803
4000
  accountId: z.ZodMiniUUID;
3804
- postOverrides: z.ZodMiniOptional<z.ZodMiniIntersection<z.ZodMiniObject<{
3805
- content: z.ZodMiniOptional<z.ZodMiniString<string>>;
3806
- thumbnailTimestamp: z.ZodMiniOptional<z.ZodMiniNumberFormat>;
3807
- mediaIds: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniUUID>>;
3808
- }, z.z.core.$strip>, z.ZodMiniUnknown>>;
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>>;
3809
4006
  platformSpecificSettings: z.ZodMiniOptional<z.ZodMiniIntersection<z.ZodMiniUnion<readonly [z.ZodMiniObject<{
3810
4007
  description: z.ZodMiniOptional<z.ZodMiniString<string>>;
3811
4008
  privacyStatus: z.ZodMiniOptional<z.ZodMiniEnum<{
@@ -3835,6 +4032,7 @@ declare const zUpdatePostBody: z.ZodMiniObject<{
3835
4032
  tags: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
3836
4033
  embeddable: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
3837
4034
  playlistId: z.ZodMiniOptional<z.ZodMiniString<string>>;
4035
+ thumbnailMediaId: z.ZodMiniOptional<z.ZodMiniUUID>;
3838
4036
  }, z.z.core.$strip>, z.ZodMiniObject<{
3839
4037
  privacyLevel: z.ZodMiniEnum<{
3840
4038
  PUBLIC_TO_EVERYONE: "PUBLIC_TO_EVERYONE";
@@ -3944,6 +4142,13 @@ declare const zUpdatePostResponse: z.ZodMiniObject<{
3944
4142
  externalUrl: z.ZodMiniOptional<z.ZodMiniURL>;
3945
4143
  publishedAt: z.ZodMiniOptional<z.z.iso.ZodMiniISODateTime>;
3946
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>>;
3947
4152
  failure: z.ZodMiniOptional<z.ZodMiniIntersection<z.ZodMiniObject<{
3948
4153
  kind: z.ZodMiniEnum<{
3949
4154
  RECONNECT: "RECONNECT";
@@ -4001,6 +4206,7 @@ declare const zUpdatePostResponse: z.ZodMiniObject<{
4001
4206
  tags: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
4002
4207
  embeddable: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
4003
4208
  playlistId: z.ZodMiniOptional<z.ZodMiniString<string>>;
4209
+ thumbnailMediaId: z.ZodMiniOptional<z.ZodMiniUUID>;
4004
4210
  }, z.z.core.$strip>, z.ZodMiniObject<{
4005
4211
  privacyLevel: z.ZodMiniEnum<{
4006
4212
  PUBLIC_TO_EVERYONE: "PUBLIC_TO_EVERYONE";
@@ -4552,4 +4758,4 @@ declare function createMediaNamespace(client: Client): {
4552
4758
  }>;
4553
4759
  };
4554
4760
 
4555
- 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 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, 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, 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 };
package/dist/index.js CHANGED
@@ -1199,6 +1199,9 @@ var zYouTubePlatformSpecificSettings = z.object({
1199
1199
  })),
1200
1200
  playlistId: z.optional(z.string().register(z.globalRegistry, {
1201
1201
  description: "Playlist ID to add the video to after upload."
1202
+ })),
1203
+ thumbnailMediaId: z.optional(z.uuid().register(z.globalRegistry, {
1204
+ description: "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`."
1202
1205
  }))
1203
1206
  }).register(z.globalRegistry, {
1204
1207
  description: "YouTube-specific upload settings, such as description and privacy."
@@ -1416,6 +1419,9 @@ var zPlatformSpecificSettings = z.union([
1416
1419
  })),
1417
1420
  playlistId: z.optional(z.string().register(z.globalRegistry, {
1418
1421
  description: "Playlist ID to add the video to after upload."
1422
+ })),
1423
+ thumbnailMediaId: z.optional(z.uuid().register(z.globalRegistry, {
1424
+ description: "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`."
1419
1425
  }))
1420
1426
  }).register(z.globalRegistry, {
1421
1427
  description: "YouTube-specific upload settings, such as description and privacy."
@@ -1560,6 +1566,12 @@ var zPostAccount = z.object({
1560
1566
  errorMessage: z.optional(z.string().register(z.globalRegistry, {
1561
1567
  description: "Error message from the platform if publishing failed for this account."
1562
1568
  })),
1569
+ thumbnail: z.optional(z.object({
1570
+ status: z.enum(["APPLIED", "FAILED"]),
1571
+ errorMessage: z.optional(z.string())
1572
+ }).register(z.globalRegistry, {
1573
+ description: "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."
1574
+ })),
1563
1575
  failure: z.optional(z.intersection(zPublishFailure, z.unknown().register(z.globalRegistry, {
1564
1576
  description: "The same failure read as an action: what happened and the one thing to do about it. Present whenever status is FAILED, including when the platform gave no reason. The wording is what the app and the failure email show, so a client does not have to interpret `errorMessage` itself."
1565
1577
  }))),
@@ -1637,6 +1649,22 @@ var zCreatePostRequest = z.object({
1637
1649
  }).register(z.globalRegistry, {
1638
1650
  description: "Create a post across one or more connected social accounts."
1639
1651
  });
1652
+ var zUpdatePostOverrides = z.object({
1653
+ content: z.nullish(z.string()),
1654
+ mediaIds: z.nullish(z.array(z.uuid()).check(z.maxLength(35))),
1655
+ thumbnailTimestamp: z.nullish(z.int().check(z.gte(0)))
1656
+ }).register(z.globalRegistry, {
1657
+ description: "Override the post-level content, media or thumbnail timestamp for this specific account."
1658
+ });
1659
+ var zUpdatePostAccount = z.object({
1660
+ accountId: z.uuid().register(z.globalRegistry, {
1661
+ description: "ID of a connected social account to post to."
1662
+ }),
1663
+ postOverrides: z.optional(zUpdatePostOverrides),
1664
+ platformSpecificSettings: z.optional(z.intersection(zPlatformSpecificSettings, z.unknown().register(z.globalRegistry, {
1665
+ description: "Platform-specific settings to change. Only the settings you send change, and every setting you leave out keeps its current value. Send a setting as null to remove it. Nested objects merge the same way (JSON Merge Patch, RFC 7396). The resulting settings must still be valid for the platform, so a required setting cannot be removed."
1666
+ })))
1667
+ });
1640
1668
  var zUpdatePostRequest = z.object({
1641
1669
  content: z.optional(z.string().register(z.globalRegistry, {
1642
1670
  description: "New shared text content for the post."
@@ -1650,14 +1678,14 @@ var zUpdatePostRequest = z.object({
1650
1678
  thumbnailTimestamp: z.optional(z.int().check(z.gte(0)).register(z.globalRegistry, {
1651
1679
  description: "New video thumbnail timestamp in milliseconds for Instagram and TikTok media. Does not change which media files are attached. Combine with mediaIds if you want to replace media and set the new thumbnail timestamp in the same request."
1652
1680
  })),
1653
- accounts: z.optional(z.array(zCreatePostAccount).check(z.minLength(1)).register(z.globalRegistry, {
1654
- description: "Accounts whose content overrides or platform-specific settings should be updated, plus any additional connected accounts to add to the post. Existing accounts omitted from this array remain unchanged and must be removed through the account-specific delete endpoint."
1681
+ accounts: z.optional(z.array(zUpdatePostAccount).check(z.minLength(1)).register(z.globalRegistry, {
1682
+ description: "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."
1655
1683
  })),
1656
1684
  publishNow: z.optional(z.boolean().register(z.globalRegistry, {
1657
1685
  description: "Publish an existing draft immediately. Cannot be combined with scheduledAt."
1658
1686
  }))
1659
1687
  }).register(z.globalRegistry, {
1660
- description: "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."
1688
+ description: "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."
1661
1689
  });
1662
1690
  var zSuccessMessage = z.object({
1663
1691
  deleted: z.literal(true),
@@ -2154,7 +2182,9 @@ export {
2154
2182
  zTikTokCreatorInfoResponse,
2155
2183
  zTikTokPlatformSpecificSettings,
2156
2184
  zTwitterPlatformSpecificSettings,
2185
+ zUpdatePostAccount,
2157
2186
  zUpdatePostBody,
2187
+ zUpdatePostOverrides,
2158
2188
  zUpdatePostPath,
2159
2189
  zUpdatePostRequest,
2160
2190
  zUpdatePostResponse,