@pubnio/sdk 0.3.0 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.cts CHANGED
@@ -1260,19 +1260,19 @@ declare const ApiKeyRevocation: Schema.Struct<{
1260
1260
  }>;
1261
1261
  type ApiKeyRevocation = typeof ApiKeyRevocation.Type;
1262
1262
  export declare const PublishInput: Schema.Struct<{
1263
- readonly expectedRevision: Schema.Int;
1263
+ readonly expectedRevision: Schema.optionalKey<Schema.Int>;
1264
1264
  readonly scheduledAt: Schema.optionalKey<Schema.String>;
1265
- readonly accountIds: Schema.optionalKey<Schema.$Array<Schema.brand<Schema.String, "AccountId">>>;
1265
+ readonly accounts: Schema.optionalKey<Schema.$Array<Schema.brand<Schema.String, "AccountId">>>;
1266
1266
  readonly targets: Schema.optionalKey<Schema.$Array<Schema.Struct<{
1267
1267
  readonly accountId: Schema.brand<Schema.String, "AccountId">;
1268
- readonly placement: Schema.Literals<readonly [
1268
+ readonly placement: Schema.optionalKey<Schema.Literals<readonly [
1269
1269
  "feed",
1270
1270
  "reel",
1271
1271
  "story",
1272
1272
  "carousel",
1273
1273
  "video",
1274
1274
  "pin"
1275
- ]>;
1275
+ ]>>;
1276
1276
  readonly scheduledAt: Schema.optionalKey<Schema.Union<readonly [
1277
1277
  Schema.String,
1278
1278
  Schema.Null
@@ -3445,6 +3445,13 @@ declare class MediaUploadConflict extends MediaUploadConflict_base {
3445
3445
  declare const DestinationAlreadySubmitted_base: HttpApiError.ProblemClass<DestinationAlreadySubmitted, "DestinationAlreadySubmitted", "urn:pubnio:problem:destination-already-submitted", 409, {}, {}>;
3446
3446
  declare class DestinationAlreadySubmitted extends DestinationAlreadySubmitted_base {
3447
3447
  }
3448
+ declare const PostSubmitted_base: HttpApiError.ProblemClass<PostSubmitted, "PostSubmitted", "urn:pubnio:problem:post-submitted", 409, {
3449
+ readonly code: Schema.Literal<"post_submitted">;
3450
+ readonly targetIds: Schema.$Array<Schema.brand<Schema.String, "TargetId">>;
3451
+ readonly nextAction: Schema.String;
3452
+ }, {}>;
3453
+ declare class PostSubmitted extends PostSubmitted_base {
3454
+ }
3448
3455
  declare const DeliveryNotRetryable_base: HttpApiError.ProblemClass<DeliveryNotRetryable, "DeliveryNotRetryable", "urn:pubnio:problem:delivery-not-retryable", 409, {}, {}>;
3449
3456
  declare class DeliveryNotRetryable extends DeliveryNotRetryable_base {
3450
3457
  }
@@ -4153,6 +4160,7 @@ export declare const KnownProblem: Schema.Union<readonly [
4153
4160
  typeof AttemptChanged,
4154
4161
  typeof IdempotencyConflict,
4155
4162
  typeof DestinationAlreadySubmitted,
4163
+ typeof PostSubmitted,
4156
4164
  typeof DeliveryNotRetryable,
4157
4165
  typeof DeliveryNotReconcilable,
4158
4166
  typeof DeliveryScheduleLocked,
@@ -5239,7 +5247,17 @@ export declare const PublishTarget: Schema.Union<readonly [
5239
5247
  ]>;
5240
5248
  export type PublishTarget = typeof PublishTarget.Type;
5241
5249
  export declare const CreatePost: Schema.Struct<{
5242
- readonly text: Schema.optionalKey<Schema.Trim>;
5250
+ readonly media: Schema.optionalKey<Schema.$Array<Schema.Union<readonly [
5251
+ Schema.Struct<{
5252
+ readonly mediaId: Schema.brand<Schema.String, "MediaId">;
5253
+ }>,
5254
+ Schema.Struct<{
5255
+ readonly url: Schema.String;
5256
+ }>
5257
+ ]>>>;
5258
+ readonly scheduledAt: Schema.optionalKey<Schema.String>;
5259
+ readonly publishNow: Schema.optionalKey<Schema.Boolean>;
5260
+ readonly isDraft: Schema.optionalKey<Schema.Boolean>;
5243
5261
  readonly platforms: Schema.optionalKey<Schema.$Array<Schema.Literals<readonly [
5244
5262
  "bluesky",
5245
5263
  "facebook",
@@ -5563,6 +5581,335 @@ export declare const CreatePost: Schema.Struct<{
5563
5581
  }>
5564
5582
  ]>, never>>;
5565
5583
  }>>>;
5584
+ readonly text: Schema.optionalKey<Schema.Trim>;
5585
+ }>;
5586
+ export type CreatePost = typeof CreatePost.Type;
5587
+ export declare const UpdatePost: Schema.Struct<{
5588
+ readonly targets: Schema.optionalKey<Schema.$Array<Schema.Struct<{
5589
+ readonly accountId: Schema.brand<Schema.String, "AccountId">;
5590
+ readonly provider: Schema.optionalKey<Schema.Literals<readonly [
5591
+ "bluesky",
5592
+ "facebook",
5593
+ "instagram",
5594
+ "linkedin",
5595
+ "pinterest",
5596
+ "reddit",
5597
+ "snapchat",
5598
+ "tiktok",
5599
+ "threads",
5600
+ "x",
5601
+ "youtube",
5602
+ "google_business"
5603
+ ]>>;
5604
+ readonly placement: Schema.optionalKey<Schema.Literals<readonly [
5605
+ "feed",
5606
+ "reel",
5607
+ "story",
5608
+ "carousel",
5609
+ "video",
5610
+ "pin"
5611
+ ]>>;
5612
+ readonly text: Schema.optionalKey<Schema.String>;
5613
+ readonly thread: Schema.optionalKey<Schema.$Array<Schema.String>>;
5614
+ readonly media: Schema.optionalKey<Schema.$Array<Schema.Union<readonly [
5615
+ Schema.Struct<{
5616
+ readonly mediaId: Schema.brand<Schema.String, "MediaId">;
5617
+ }>,
5618
+ Schema.Struct<{
5619
+ readonly url: Schema.String;
5620
+ }>
5621
+ ]>>>;
5622
+ readonly scheduledAt: Schema.optionalKey<Schema.Union<readonly [
5623
+ Schema.String,
5624
+ Schema.Null
5625
+ ]>>;
5626
+ readonly queueId: Schema.optionalKey<Schema.String>;
5627
+ readonly settings: Schema.optionalKey<Schema.middlewareDecoding<Schema.Union<readonly [
5628
+ Schema.Struct<{
5629
+ readonly firstComment: Schema.optionalKey<Schema.String>;
5630
+ readonly thread: Schema.optionalKey<Schema.$Array<Schema.String>>;
5631
+ readonly altText: Schema.optionalKey<Schema.String>;
5632
+ }>,
5633
+ Schema.Struct<{
5634
+ readonly link: Schema.optionalKey<Schema.String>;
5635
+ readonly textFormatPresetId: Schema.optionalKey<Schema.String>;
5636
+ readonly albumId: Schema.optionalKey<Schema.String>;
5637
+ readonly firstComment: Schema.optionalKey<Schema.String>;
5638
+ readonly thread: Schema.optionalKey<Schema.$Array<Schema.String>>;
5639
+ readonly nativeDraft: Schema.optionalKey<Schema.Boolean>;
5640
+ readonly countries: Schema.optionalKey<Schema.$Array<Schema.String>>;
5641
+ }>,
5642
+ Schema.Struct<{
5643
+ readonly title: Schema.optionalKey<Schema.String>;
5644
+ readonly isAiGenerated: Schema.optionalKey<Schema.Boolean>;
5645
+ readonly collaboratorPageIds: Schema.optionalKey<Schema.$Array<Schema.String>>;
5646
+ readonly firstComment: Schema.optionalKey<Schema.String>;
5647
+ readonly thread: Schema.optionalKey<Schema.$Array<Schema.String>>;
5648
+ readonly nativeDraft: Schema.optionalKey<Schema.Boolean>;
5649
+ readonly countries: Schema.optionalKey<Schema.$Array<Schema.String>>;
5650
+ }>,
5651
+ Schema.Struct<{
5652
+ readonly isAiGenerated: Schema.optionalKey<Schema.Boolean>;
5653
+ }>,
5654
+ Schema.Struct<{
5655
+ readonly altText: Schema.optionalKey<Schema.String>;
5656
+ readonly userTags: Schema.optionalKey<Schema.$Array<Schema.Struct<{
5657
+ readonly username: Schema.String;
5658
+ readonly x: Schema.optionalKey<Schema.Number>;
5659
+ readonly y: Schema.optionalKey<Schema.Number>;
5660
+ }>>>;
5661
+ readonly firstComment: Schema.optionalKey<Schema.String>;
5662
+ readonly commentsEnabled: Schema.optionalKey<Schema.Boolean>;
5663
+ readonly collaborators: Schema.optionalKey<Schema.$Array<Schema.String>>;
5664
+ readonly locationId: Schema.optionalKey<Schema.String>;
5665
+ readonly isPaidPartnership: Schema.optionalKey<Schema.Boolean>;
5666
+ readonly brandedContentSponsors: Schema.optionalKey<Schema.$Array<Schema.Union<readonly [
5667
+ Schema.String,
5668
+ Schema.String
5669
+ ]>>>;
5670
+ readonly isAiGenerated: Schema.optionalKey<Schema.Boolean>;
5671
+ }>,
5672
+ Schema.Struct<{
5673
+ readonly shareToFeed: Schema.optionalKey<Schema.Boolean>;
5674
+ readonly muteAudio: Schema.optionalKey<Schema.Boolean>;
5675
+ readonly audioConfiguration: Schema.optionalKey<Schema.Struct<{
5676
+ readonly audioId: Schema.String;
5677
+ readonly audioVolume: Schema.optionalKey<Schema.Int>;
5678
+ readonly videoVolume: Schema.optionalKey<Schema.Int>;
5679
+ }>>;
5680
+ readonly coverUrl: Schema.optionalKey<Schema.String>;
5681
+ readonly thumbOffset: Schema.optionalKey<Schema.Int>;
5682
+ readonly audioName: Schema.optionalKey<Schema.String>;
5683
+ readonly trial: Schema.optionalKey<Schema.Struct<{
5684
+ readonly graduationStrategy: Schema.Literals<readonly [
5685
+ "MANUAL",
5686
+ "SS_PERFORMANCE"
5687
+ ]>;
5688
+ }>>;
5689
+ readonly userTags: Schema.optionalKey<Schema.$Array<Schema.Struct<{
5690
+ readonly username: Schema.String;
5691
+ readonly x: Schema.optionalKey<Schema.Number>;
5692
+ readonly y: Schema.optionalKey<Schema.Number>;
5693
+ }>>>;
5694
+ readonly firstComment: Schema.optionalKey<Schema.String>;
5695
+ readonly commentsEnabled: Schema.optionalKey<Schema.Boolean>;
5696
+ readonly collaborators: Schema.optionalKey<Schema.$Array<Schema.String>>;
5697
+ readonly locationId: Schema.optionalKey<Schema.String>;
5698
+ readonly isPaidPartnership: Schema.optionalKey<Schema.Boolean>;
5699
+ readonly brandedContentSponsors: Schema.optionalKey<Schema.$Array<Schema.Union<readonly [
5700
+ Schema.String,
5701
+ Schema.String
5702
+ ]>>>;
5703
+ readonly isAiGenerated: Schema.optionalKey<Schema.Boolean>;
5704
+ }>,
5705
+ Schema.Struct<{
5706
+ readonly muteAudio: Schema.optionalKey<Schema.Boolean>;
5707
+ readonly slides: Schema.optionalKey<Schema.$Array<Schema.Struct<{
5708
+ readonly altText: Schema.optionalKey<Schema.String>;
5709
+ readonly userTags: Schema.optionalKey<Schema.$Array<Schema.Struct<{
5710
+ readonly username: Schema.String;
5711
+ readonly x: Schema.optionalKey<Schema.Number>;
5712
+ readonly y: Schema.optionalKey<Schema.Number>;
5713
+ }>>>;
5714
+ }>>>;
5715
+ readonly firstComment: Schema.optionalKey<Schema.String>;
5716
+ readonly commentsEnabled: Schema.optionalKey<Schema.Boolean>;
5717
+ readonly collaborators: Schema.optionalKey<Schema.$Array<Schema.String>>;
5718
+ readonly locationId: Schema.optionalKey<Schema.String>;
5719
+ readonly isPaidPartnership: Schema.optionalKey<Schema.Boolean>;
5720
+ readonly brandedContentSponsors: Schema.optionalKey<Schema.$Array<Schema.Union<readonly [
5721
+ Schema.String,
5722
+ Schema.String
5723
+ ]>>>;
5724
+ readonly isAiGenerated: Schema.optionalKey<Schema.Boolean>;
5725
+ }>,
5726
+ Schema.Struct<{
5727
+ readonly muteAudio: Schema.optionalKey<Schema.Boolean>;
5728
+ readonly userTags: Schema.optionalKey<Schema.$Array<Schema.Struct<{
5729
+ readonly username: Schema.String;
5730
+ readonly x: Schema.optionalKey<Schema.Number>;
5731
+ readonly y: Schema.optionalKey<Schema.Number>;
5732
+ }>>>;
5733
+ readonly isAiGenerated: Schema.optionalKey<Schema.Boolean>;
5734
+ }>,
5735
+ Schema.Struct<{
5736
+ readonly poll: Schema.optionalKey<Schema.Struct<{
5737
+ readonly question: Schema.String;
5738
+ readonly options: Schema.$Array<Schema.String>;
5739
+ readonly duration: Schema.Literals<readonly [
5740
+ "ONE_DAY",
5741
+ "THREE_DAYS",
5742
+ "SEVEN_DAYS",
5743
+ "FOURTEEN_DAYS"
5744
+ ]>;
5745
+ }>>;
5746
+ readonly firstComment: Schema.optionalKey<Schema.String>;
5747
+ readonly thread: Schema.optionalKey<Schema.$Array<Schema.String>>;
5748
+ readonly visibility: Schema.optionalKey<Schema.Literals<readonly [
5749
+ "PUBLIC",
5750
+ "CONNECTIONS"
5751
+ ]>>;
5752
+ readonly altText: Schema.optionalKey<Schema.String>;
5753
+ readonly documentTitle: Schema.optionalKey<Schema.Trim>;
5754
+ }>,
5755
+ Schema.Struct<{
5756
+ readonly subreddit: Schema.String;
5757
+ readonly title: Schema.String;
5758
+ readonly link: Schema.optionalKey<Schema.String>;
5759
+ readonly flairId: Schema.optionalKey<Schema.String>;
5760
+ readonly flairText: Schema.optionalKey<Schema.String>;
5761
+ readonly nsfw: Schema.optionalKey<Schema.Boolean>;
5762
+ readonly spoiler: Schema.optionalKey<Schema.Boolean>;
5763
+ readonly sendReplies: Schema.optionalKey<Schema.Boolean>;
5764
+ readonly thumbnailMediaId: Schema.optionalKey<Schema.brand<Schema.String, "MediaId">>;
5765
+ readonly firstComment: Schema.optionalKey<Schema.String>;
5766
+ }>,
5767
+ Schema.Struct<{
5768
+ readonly contentType: Schema.optionalKey<Schema.Literals<readonly [
5769
+ "story",
5770
+ "saved_story",
5771
+ "spotlight"
5772
+ ]>>;
5773
+ readonly title: Schema.optionalKey<Schema.String>;
5774
+ readonly description: Schema.optionalKey<Schema.String>;
5775
+ readonly link: Schema.optionalKey<Schema.String>;
5776
+ readonly locale: Schema.optionalKey<Schema.String>;
5777
+ }>,
5778
+ Schema.Struct<{
5779
+ readonly firstComment: Schema.optionalKey<Schema.String>;
5780
+ readonly thread: Schema.optionalKey<Schema.$Array<Schema.String>>;
5781
+ }>,
5782
+ Schema.Struct<{
5783
+ readonly poll: Schema.optionalKey<Schema.Struct<{
5784
+ readonly options: Schema.$Array<Schema.String>;
5785
+ readonly durationMinutes: Schema.Number;
5786
+ }>>;
5787
+ readonly replySettings: Schema.optionalKey<Schema.Literals<readonly [
5788
+ "following",
5789
+ "mentionedUsers",
5790
+ "subscribers",
5791
+ "verified"
5792
+ ]>>;
5793
+ readonly quotePostId: Schema.optionalKey<Schema.String>;
5794
+ readonly mediaTaggedUserIds: Schema.optionalKey<Schema.$Array<Schema.String>>;
5795
+ readonly placeId: Schema.optionalKey<Schema.String>;
5796
+ readonly firstComment: Schema.optionalKey<Schema.String>;
5797
+ readonly thread: Schema.optionalKey<Schema.$Array<Schema.String>>;
5798
+ readonly article: Schema.optionalKey<Schema.Struct<{
5799
+ readonly title: Schema.String;
5800
+ readonly content: Schema.String;
5801
+ }>>;
5802
+ }>,
5803
+ Schema.Struct<{
5804
+ readonly title: Schema.String;
5805
+ readonly description: Schema.optionalKey<Schema.String>;
5806
+ readonly privacyStatus: Schema.Literals<readonly [
5807
+ "public",
5808
+ "unlisted",
5809
+ "private"
5810
+ ]>;
5811
+ readonly firstComment: Schema.optionalKey<Schema.String>;
5812
+ readonly tags: Schema.optionalKey<Schema.$Array<Schema.String>>;
5813
+ readonly categoryId: Schema.optionalKey<Schema.String>;
5814
+ readonly madeForKids: Schema.optionalKey<Schema.Boolean>;
5815
+ readonly containsSyntheticMedia: Schema.optionalKey<Schema.Boolean>;
5816
+ readonly thumbnailMediaId: Schema.optionalKey<Schema.brand<Schema.String, "MediaId">>;
5817
+ readonly notifySubscribers: Schema.optionalKey<Schema.Boolean>;
5818
+ readonly license: Schema.optionalKey<Schema.Literals<readonly [
5819
+ "youtube",
5820
+ "creativeCommon"
5821
+ ]>>;
5822
+ readonly embeddable: Schema.optionalKey<Schema.Boolean>;
5823
+ readonly publicStatsViewable: Schema.optionalKey<Schema.Boolean>;
5824
+ }>,
5825
+ Schema.Struct<{
5826
+ readonly title: Schema.optionalKey<Schema.String>;
5827
+ readonly description: Schema.optionalKey<Schema.String>;
5828
+ readonly link: Schema.optionalKey<Schema.String>;
5829
+ readonly altText: Schema.optionalKey<Schema.String>;
5830
+ }>,
5831
+ Schema.Union<readonly [
5832
+ Schema.Struct<{
5833
+ readonly format: Schema.optionalKey<Schema.Literal<"video">>;
5834
+ readonly disableDuet: Schema.optionalKey<Schema.Boolean>;
5835
+ readonly disableStitch: Schema.optionalKey<Schema.Boolean>;
5836
+ readonly privacy: Schema.Literals<readonly [
5837
+ "PUBLIC_TO_EVERYONE",
5838
+ "MUTUAL_FOLLOW_FRIENDS",
5839
+ "FOLLOWER_OF_CREATOR",
5840
+ "SELF_ONLY"
5841
+ ]>;
5842
+ readonly commercialDisclosure: Schema.optionalKey<Schema.Literals<readonly [
5843
+ "none",
5844
+ "own_brand",
5845
+ "paid_partnership"
5846
+ ]>>;
5847
+ readonly isAiGenerated: Schema.optionalKey<Schema.Boolean>;
5848
+ readonly disableComment: Schema.optionalKey<Schema.Boolean>;
5849
+ readonly nativeDraft: Schema.optionalKey<Schema.Boolean>;
5850
+ }>,
5851
+ Schema.Struct<{
5852
+ readonly format: Schema.Literal<"photo">;
5853
+ readonly title: Schema.optionalKey<Schema.String>;
5854
+ readonly coverIndex: Schema.optionalKey<Schema.Int>;
5855
+ readonly autoAddMusic: Schema.optionalKey<Schema.Boolean>;
5856
+ readonly privacy: Schema.Literals<readonly [
5857
+ "PUBLIC_TO_EVERYONE",
5858
+ "MUTUAL_FOLLOW_FRIENDS",
5859
+ "FOLLOWER_OF_CREATOR",
5860
+ "SELF_ONLY"
5861
+ ]>;
5862
+ readonly commercialDisclosure: Schema.optionalKey<Schema.Literals<readonly [
5863
+ "none",
5864
+ "own_brand",
5865
+ "paid_partnership"
5866
+ ]>>;
5867
+ readonly isAiGenerated: Schema.optionalKey<Schema.Boolean>;
5868
+ readonly disableComment: Schema.optionalKey<Schema.Boolean>;
5869
+ readonly nativeDraft: Schema.optionalKey<Schema.Boolean>;
5870
+ }>
5871
+ ]>,
5872
+ Schema.Struct<{
5873
+ readonly topicType: Schema.optionalKey<Schema.Literals<readonly [
5874
+ "standard",
5875
+ "event",
5876
+ "offer"
5877
+ ]>>;
5878
+ readonly title: Schema.optionalKey<Schema.String>;
5879
+ readonly startsAt: Schema.optionalKey<Schema.String>;
5880
+ readonly endsAt: Schema.optionalKey<Schema.String>;
5881
+ readonly couponCode: Schema.optionalKey<Schema.String>;
5882
+ readonly redeemUrl: Schema.optionalKey<Schema.String>;
5883
+ readonly terms: Schema.optionalKey<Schema.String>;
5884
+ readonly callToAction: Schema.optionalKey<Schema.Literals<readonly [
5885
+ "book",
5886
+ "order",
5887
+ "shop",
5888
+ "learn_more",
5889
+ "sign_up",
5890
+ "call"
5891
+ ]>>;
5892
+ readonly callToActionUrl: Schema.optionalKey<Schema.String>;
5893
+ }>
5894
+ ]>, never>>;
5895
+ }>>>;
5896
+ readonly expectedRevision: Schema.optionalKey<Schema.Int>;
5897
+ readonly platforms: Schema.optionalKey<Schema.$Array<Schema.Literals<readonly [
5898
+ "bluesky",
5899
+ "facebook",
5900
+ "instagram",
5901
+ "linkedin",
5902
+ "pinterest",
5903
+ "reddit",
5904
+ "snapchat",
5905
+ "tiktok",
5906
+ "threads",
5907
+ "x",
5908
+ "youtube",
5909
+ "google_business"
5910
+ ]>>>;
5911
+ readonly accounts: Schema.optionalKey<Schema.$Array<Schema.brand<Schema.String, "AccountId">>>;
5912
+ readonly text: Schema.optionalKey<Schema.Trim>;
5566
5913
  readonly media: Schema.optionalKey<Schema.$Array<Schema.Union<readonly [
5567
5914
  Schema.Struct<{
5568
5915
  readonly mediaId: Schema.brand<Schema.String, "MediaId">;
@@ -5571,15 +5918,27 @@ export declare const CreatePost: Schema.Struct<{
5571
5918
  readonly url: Schema.String;
5572
5919
  }>
5573
5920
  ]>>>;
5574
- readonly scheduledAt: Schema.optionalKey<Schema.String>;
5575
- readonly publishNow: Schema.optionalKey<Schema.Boolean>;
5576
- readonly isDraft: Schema.optionalKey<Schema.Boolean>;
5921
+ readonly scheduledAt: Schema.optionalKey<Schema.Union<readonly [
5922
+ Schema.String,
5923
+ Schema.Null
5924
+ ]>>;
5577
5925
  }>;
5578
- export type CreatePost = typeof CreatePost.Type;
5579
- export declare const UpdatePost: Schema.Struct<{
5580
- readonly expectedRevision: Schema.optionalKey<Schema.Int>;
5581
- readonly text: Schema.optionalKey<Schema.Trim>;
5582
- readonly targets: Schema.optionalKey<Schema.$Array<Schema.Union<readonly [
5926
+ export type UpdatePost = typeof UpdatePost.Type;
5927
+ /** One post or draft. Drafts have no deliveries yet. */
5928
+ export declare const Post: Schema.Struct<{
5929
+ readonly postId: Schema.brand<Schema.String, "PostId">;
5930
+ readonly isDraft: Schema.Boolean;
5931
+ readonly revision: Schema.Int;
5932
+ readonly text: Schema.Trim;
5933
+ readonly media: Schema.$Array<Schema.Union<readonly [
5934
+ Schema.Struct<{
5935
+ readonly mediaId: Schema.brand<Schema.String, "MediaId">;
5936
+ }>,
5937
+ Schema.Struct<{
5938
+ readonly url: Schema.String;
5939
+ }>
5940
+ ]>>;
5941
+ readonly targets: Schema.$Array<Schema.Union<readonly [
5583
5942
  Schema.Struct<{
5584
5943
  readonly settings: Schema.optionalKey<Schema.Struct<{
5585
5944
  readonly firstComment: Schema.optionalKey<Schema.String>;
@@ -6169,19 +6528,104 @@ export declare const UpdatePost: Schema.Struct<{
6169
6528
  readonly provider: Schema.Literal<"google_business">;
6170
6529
  readonly placement: Schema.Literal<"feed">;
6171
6530
  }>
6172
- ]>>>;
6173
- readonly media: Schema.optionalKey<Schema.$Array<Schema.Union<readonly [
6174
- Schema.Struct<{
6175
- readonly mediaId: Schema.brand<Schema.String, "MediaId">;
6176
- }>,
6177
- Schema.Struct<{
6178
- readonly url: Schema.String;
6179
- }>
6180
- ]>>>;
6531
+ ]>>;
6532
+ readonly scheduledAt: Schema.NullOr<Schema.String>;
6533
+ readonly deliveries: Schema.$Array<Schema.Struct<{
6534
+ readonly status: Schema.Literals<readonly [
6535
+ "scheduled",
6536
+ "queued",
6537
+ "submitting",
6538
+ "confirming",
6539
+ "published",
6540
+ "provider_draft",
6541
+ "failed",
6542
+ "unresolved",
6543
+ "cancelled"
6544
+ ]>;
6545
+ readonly providerRef: Schema.optionalKey<Schema.Struct<{
6546
+ readonly id: Schema.String;
6547
+ readonly kind: Schema.String;
6548
+ }>>;
6549
+ readonly url: Schema.optionalKey<Schema.String>;
6550
+ readonly issue: Schema.optionalKey<Schema.Literals<readonly [
6551
+ "authorization_changed",
6552
+ "account_not_ready",
6553
+ "credential_unavailable",
6554
+ "media_preparation_failed",
6555
+ "video_compression_failed",
6556
+ "audio_unavailable",
6557
+ "provider_rejected",
6558
+ "tiktok_settings_unavailable",
6559
+ "tiktok_settings_not_allowed",
6560
+ "tiktok_processing_failed",
6561
+ "submission_uncertain",
6562
+ "confirmation_unavailable",
6563
+ "billing_inactive",
6564
+ "spend_cap_reached",
6565
+ "insufficient_credit"
6566
+ ]>>;
6567
+ readonly canRetry: Schema.Boolean;
6568
+ readonly canReconcile: Schema.Boolean;
6569
+ readonly nextAction: Schema.optionalKey<Schema.String>;
6570
+ readonly revision: Schema.Int;
6571
+ readonly provider: Schema.Literals<readonly [
6572
+ "bluesky",
6573
+ "facebook",
6574
+ "instagram",
6575
+ "linkedin",
6576
+ "pinterest",
6577
+ "reddit",
6578
+ "snapchat",
6579
+ "tiktok",
6580
+ "threads",
6581
+ "x",
6582
+ "youtube",
6583
+ "google_business"
6584
+ ]>;
6585
+ readonly placement: Schema.Literals<readonly [
6586
+ "feed",
6587
+ "reel",
6588
+ "story",
6589
+ "carousel",
6590
+ "video",
6591
+ "pin"
6592
+ ]>;
6593
+ readonly queueId: Schema.optionalKey<Schema.String>;
6594
+ readonly slotId: Schema.optionalKey<Schema.String>;
6595
+ readonly assignmentId: Schema.optionalKey<Schema.String>;
6596
+ readonly occurrenceDate: Schema.optionalKey<Schema.String>;
6597
+ readonly localDate: Schema.optionalKey<Schema.String>;
6598
+ readonly localTime: Schema.optionalKey<Schema.String>;
6599
+ readonly timezone: Schema.optionalKey<Schema.String>;
6600
+ readonly targetId: Schema.brand<Schema.String, "TargetId">;
6601
+ readonly attemptId: Schema.brand<Schema.String, "AttemptId">;
6602
+ readonly accountId: Schema.brand<Schema.String, "AccountId">;
6603
+ readonly scheduledAt: Schema.optionalKey<Schema.String>;
6604
+ }>>;
6605
+ readonly status: Schema.Union<readonly [
6606
+ Schema.Literal<"draft">,
6607
+ Schema.Literals<readonly [
6608
+ "scheduled",
6609
+ "queued",
6610
+ "submitting",
6611
+ "confirming",
6612
+ "published",
6613
+ "provider_draft",
6614
+ "failed",
6615
+ "unresolved",
6616
+ "cancelled"
6617
+ ]>
6618
+ ]>;
6619
+ readonly createdAt: Schema.String;
6620
+ readonly updatedAt: Schema.String;
6181
6621
  }>;
6182
- export type UpdatePost = typeof UpdatePost.Type;
6183
- /** One post or draft. Drafts have no deliveries yet. */
6184
- export declare const Post: Schema.Struct<{
6622
+ export type Post = typeof Post.Type;
6623
+ /**
6624
+ * One created post or draft. A direct create also returns the resolved
6625
+ * idempotency key and the current delivery per destination.
6626
+ */
6627
+ export declare const PostCreated: Schema.Struct<{
6628
+ readonly idempotencyKey: Schema.optionalKey<Schema.String>;
6185
6629
  readonly postId: Schema.brand<Schema.String, "PostId">;
6186
6630
  readonly isDraft: Schema.Boolean;
6187
6631
  readonly revision: Schema.Int;
@@ -6785,6 +7229,7 @@ export declare const Post: Schema.Struct<{
6785
7229
  readonly placement: Schema.Literal<"feed">;
6786
7230
  }>
6787
7231
  ]>>;
7232
+ readonly scheduledAt: Schema.NullOr<Schema.String>;
6788
7233
  readonly deliveries: Schema.$Array<Schema.Struct<{
6789
7234
  readonly status: Schema.Literals<readonly [
6790
7235
  "scheduled",
@@ -6874,7 +7319,7 @@ export declare const Post: Schema.Struct<{
6874
7319
  readonly createdAt: Schema.String;
6875
7320
  readonly updatedAt: Schema.String;
6876
7321
  }>;
6877
- export type Post = typeof Post.Type;
7322
+ export type PostCreated = typeof PostCreated.Type;
6878
7323
  declare const PostCreateResult: Schema.Union<readonly [
6879
7324
  Schema.Struct<{
6880
7325
  readonly postId: Schema.brand<Schema.String, "PostId">;
@@ -7480,6 +7925,7 @@ declare const PostCreateResult: Schema.Union<readonly [
7480
7925
  readonly placement: Schema.Literal<"feed">;
7481
7926
  }>
7482
7927
  ]>>;
7928
+ readonly scheduledAt: Schema.NullOr<Schema.String>;
7483
7929
  readonly deliveries: Schema.$Array<Schema.Struct<{
7484
7930
  readonly status: Schema.Literals<readonly [
7485
7931
  "scheduled",
@@ -16897,7 +17343,7 @@ export interface PostsClient {
16897
17343
  iterate(options?: PostsListOptions, iteration?: IterationOptions): AsyncGenerator<PostList["data"][number], void, undefined>;
16898
17344
  create(input: CreatePostInput & {
16899
17345
  isDraft: true;
16900
- }): Promise<Post>;
17346
+ }): Promise<PostCreated>;
16901
17347
  create(input: CreatePostInput & {
16902
17348
  isDraft?: false;
16903
17349
  }): Promise<PublishAcceptedResult>;
@@ -16907,7 +17353,8 @@ export interface PostsClient {
16907
17353
  validate(postId: PostId): Promise<PostValidation>;
16908
17354
  /** Predict whether this body can be published without saving it. */
16909
17355
  validateBody(input: CreatePost): Promise<PostValidation>;
16910
- publish(postId: PostId, input: PublishPostInput): Promise<PublishAcceptedResult>;
17356
+ /** Publish the saved draft; every field is optional. */
17357
+ publish(postId: PostId, input?: PublishPostInput): Promise<PublishAcceptedResult>;
16911
17358
  delete(postId: PostId): Promise<PostArchived>;
16912
17359
  status(postId: PostId): Promise<PublishStatus>;
16913
17360
  attempts(postId: PostId, targetId: TargetId, options?: PageOptions): Promise<DeliveryHistory>;