@superclerk/sdk 0.2.0 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -145,7 +145,7 @@ export interface Chat {
145
145
  nextAt: string;
146
146
  } | null;
147
147
  /** What the agent waits on. */
148
- pending: Array<ChatApproval | ChatQuestion | ChatConnectionRequest | ChatSubagent | ChatSubagentWait>;
148
+ pending: Array<ChatApproval | ChatQuestion | ChatConnectionRequest | ChatSubagent | ChatSubagentWait | ChatVideo>;
149
149
  /** Why the agent's latest message ended without an answer. */
150
150
  error: ChatError | null;
151
151
  /** What the key started the chat with; null for a chat started in the app. */
@@ -242,6 +242,18 @@ export interface ChatSubagentWait {
242
242
  callID: string;
243
243
  };
244
244
  }
245
+ /** A video the agent is making; it arrives in the chat as a message, or the message says why it didn't. */
246
+ export interface ChatVideo {
247
+ type: "video";
248
+ id: string;
249
+ seconds: number;
250
+ /** The tool call that asked. */
251
+ call: {
252
+ messageID: string;
253
+ /** The tool call, as its tool part's callID names it. */
254
+ callID: string;
255
+ };
256
+ }
245
257
  export interface ChatError {
246
258
  /** stopped, context_too_long, output_too_long, provider_auth, provider_error, structured_output, failed, or the billing code that refused it, such as billing_credit_exhausted. */
247
259
  code: string;
@@ -260,10 +272,15 @@ export interface ChatUserMessage {
260
272
  /** The message's ID in the app it came in or went out through. */
261
273
  providerMessageID: string | null;
262
274
  role: "user";
263
- /** Written by Superclerk rather than the person. */
275
+ source: InputSource;
276
+ /** True exactly when source is trigger or runtime. Kept for older clients. */
264
277
  synthetic: boolean;
265
278
  context: ChatContext | null;
279
+ /** A call filed in a phone line's thread as the caller's message: what happened, and which call's transcript and recording it belongs to. Null for anything else. */
280
+ phone: PhoneEvent | null;
266
281
  }
282
+ /** Who wrote a message to the agent: the chat's member, their team or someone outside the workspace, the agent that gave a subagent its task, an automation the member set up (trigger: a trigger's or a workflow step's prompt), or Superclerk itself (runtime), such as a runtime notice or a subagent's report. A trigger's and the runtime's words are for the agent and never shown. */
283
+ export type InputSource = "member" | "team" | "outsider" | "agent" | "trigger" | "runtime";
267
284
  /** The page of the app the person had open, which the agent reads with the message. */
268
285
  export type ChatContext = {
269
286
  kind: "website";
@@ -281,6 +298,13 @@ export type ChatContext = {
281
298
  label: string;
282
299
  id: string;
283
300
  };
301
+ export type PhoneEvent = {
302
+ kind: "call" | "call_text";
303
+ callChatID: string;
304
+ } | {
305
+ kind: "missed_call" | "voicemail";
306
+ callChatID: null;
307
+ };
284
308
  export interface ChatAssistantMessage {
285
309
  id: string;
286
310
  chatID: string;
@@ -317,8 +341,9 @@ export interface ChatTextPart {
317
341
  id: string;
318
342
  chatID: string;
319
343
  messageID: string;
344
+ /** Empty in a message Superclerk wrote for the agent (source trigger or runtime): those words are never sent. */
320
345
  text: string;
321
- /** Written by Superclerk rather than the person or the agent. */
346
+ /** Always false: text Superclerk writes for the agent alone is never sent. Kept for older clients. */
322
347
  synthetic: boolean;
323
348
  startedAt: string | null;
324
349
  endedAt: string | null;
@@ -326,6 +351,8 @@ export interface ChatTextPart {
326
351
  metadata: {
327
352
  [key: string]: unknown;
328
353
  } | null;
354
+ /** What the agent suggests sending next, shown as buttons. */
355
+ nextSteps: Array<string> | null;
329
356
  }
330
357
  export interface ChatReasoningPart {
331
358
  type: "reasoning";
@@ -372,6 +399,8 @@ export type ChatToolState = {
372
399
  label: string;
373
400
  value: string;
374
401
  }> | null;
402
+ /** What approving does, in the words of its button, for a card that does one thing. */
403
+ button: string | null;
375
404
  metadata: {
376
405
  [key: string]: unknown;
377
406
  } | null;
@@ -501,6 +530,8 @@ export interface Conversation {
501
530
  status: "open" | "waiting" | "resolved";
502
531
  snoozedUntil: string | null;
503
532
  needsReply: boolean;
533
+ /** A person has something to do here: act on why it was handed to them, or answer a customer no AI will. The Inbox's Needs you view lists exactly these. */
534
+ needsYou: boolean;
504
535
  responder: ConversationResponder;
505
536
  /** The AI that answers this conversation. */
506
537
  agent: {
@@ -510,6 +541,8 @@ export interface Conversation {
510
541
  };
511
542
  contactID: string | null;
512
543
  contactName: string | null;
544
+ /** The domain of the email address the conversation reaches the customer at, such as acme.com; null where it doesn't reach them by email. */
545
+ contactDomain: string | null;
513
546
  contactLink: "automatic" | "manual" | "none";
514
547
  /** False for a group or shared thread, which can't belong to one contact. */
515
548
  linkable: boolean;
@@ -523,7 +556,7 @@ export type ConversationResponder = {
523
556
  } | {
524
557
  kind: "handed_off";
525
558
  reason: string;
526
- /** When the AI answers again; null until someone hands it back. */
559
+ /** Always null: a handed-off conversation stays with a person until someone hands it back. */
527
560
  until: string | null;
528
561
  } | {
529
562
  kind: "team";
@@ -818,7 +851,7 @@ export interface InboxAI {
818
851
  /** inbox: set up here, and changed only here. builder: built in Automations, and changed there. */
819
852
  managedBy: "builder" | "inbox";
820
853
  } | null;
821
- /** Turned off in the agent's Channels page while its workflow keeps it, which answers again once on. */
854
+ /** Turned off for its agent while its workflow keeps it, which answers again once turned on for everyone. */
822
855
  turnedOff: boolean;
823
856
  /** everyone, or only testers who sent testerCode. */
824
857
  audience: "testers" | "everyone";
@@ -846,6 +879,8 @@ export interface InboxTemplate {
846
879
  export interface InboxSettings {
847
880
  agent: {
848
881
  kind: "own";
882
+ /** What it's called, by the team in the Inbox and by customers, whom it introduces itself to by this name. */
883
+ name: string;
849
884
  instructions: string;
850
885
  /** The model it runs on; null runs on the workflow default model. */
851
886
  model: string | null;
@@ -1458,6 +1493,7 @@ export interface WorkflowCatalogResponse {
1458
1493
  attemptTimeoutMs: number;
1459
1494
  totalTimeoutMs: number;
1460
1495
  };
1496
+ recipientInput: string | null;
1461
1497
  }>;
1462
1498
  retainedActions: Array<{
1463
1499
  appID: string;
@@ -1499,6 +1535,7 @@ export interface WorkflowCatalogResponse {
1499
1535
  attemptTimeoutMs: number;
1500
1536
  totalTimeoutMs: number;
1501
1537
  };
1538
+ recipientInput: string | null;
1502
1539
  }>;
1503
1540
  triggers: Array<WorkflowTriggerCatalogEntry>;
1504
1541
  retainedTriggers: Array<WorkflowTriggerCatalogEntry>;
@@ -4157,11 +4194,11 @@ export type WorkflowFailureAlertDestination = {
4157
4194
  } | {
4158
4195
  state: "failed";
4159
4196
  terminalAt: number;
4160
- errorKind: "validation" | "permission" | "auth" | "quota_exhausted" | "provider_rejected" | "rate_limited" | "retryable_upstream" | "outcome_unknown" | "result_unavailable" | "upstream" | "timeout" | "internal" | "cancelled";
4197
+ errorKind: "validation" | "permission" | "auth" | "quota_exhausted" | "provider_rejected" | "rate_limited" | "retryable_upstream" | "outcome_unknown" | "result_unavailable" | "upstream" | "timeout" | "internal" | "cancelled" | "sender_restricted" | "recipient_refused";
4161
4198
  } | {
4162
4199
  state: "outcome_unknown";
4163
4200
  terminalAt: number;
4164
- errorKind: "validation" | "permission" | "auth" | "quota_exhausted" | "provider_rejected" | "rate_limited" | "retryable_upstream" | "outcome_unknown" | "result_unavailable" | "upstream" | "timeout" | "internal" | "cancelled";
4201
+ errorKind: "validation" | "permission" | "auth" | "quota_exhausted" | "provider_rejected" | "rate_limited" | "retryable_upstream" | "outcome_unknown" | "result_unavailable" | "upstream" | "timeout" | "internal" | "cancelled" | "sender_restricted" | "recipient_refused";
4165
4202
  } | null;
4166
4203
  provider: "slack";
4167
4204
  channelID: string;
@@ -4181,11 +4218,11 @@ export type WorkflowFailureAlertDestination = {
4181
4218
  } | {
4182
4219
  state: "failed";
4183
4220
  terminalAt: number;
4184
- errorKind: "validation" | "permission" | "auth" | "quota_exhausted" | "provider_rejected" | "rate_limited" | "retryable_upstream" | "outcome_unknown" | "result_unavailable" | "upstream" | "timeout" | "internal" | "cancelled";
4221
+ errorKind: "validation" | "permission" | "auth" | "quota_exhausted" | "provider_rejected" | "rate_limited" | "retryable_upstream" | "outcome_unknown" | "result_unavailable" | "upstream" | "timeout" | "internal" | "cancelled" | "sender_restricted" | "recipient_refused";
4185
4222
  } | {
4186
4223
  state: "outcome_unknown";
4187
4224
  terminalAt: number;
4188
- errorKind: "validation" | "permission" | "auth" | "quota_exhausted" | "provider_rejected" | "rate_limited" | "retryable_upstream" | "outcome_unknown" | "result_unavailable" | "upstream" | "timeout" | "internal" | "cancelled";
4225
+ errorKind: "validation" | "permission" | "auth" | "quota_exhausted" | "provider_rejected" | "rate_limited" | "retryable_upstream" | "outcome_unknown" | "result_unavailable" | "upstream" | "timeout" | "internal" | "cancelled" | "sender_restricted" | "recipient_refused";
4189
4226
  } | null;
4190
4227
  provider: "telegram";
4191
4228
  chatID: string;
@@ -4205,11 +4242,11 @@ export type WorkflowFailureAlertDestination = {
4205
4242
  } | {
4206
4243
  state: "failed";
4207
4244
  terminalAt: number;
4208
- errorKind: "validation" | "permission" | "auth" | "quota_exhausted" | "provider_rejected" | "rate_limited" | "retryable_upstream" | "outcome_unknown" | "result_unavailable" | "upstream" | "timeout" | "internal" | "cancelled";
4245
+ errorKind: "validation" | "permission" | "auth" | "quota_exhausted" | "provider_rejected" | "rate_limited" | "retryable_upstream" | "outcome_unknown" | "result_unavailable" | "upstream" | "timeout" | "internal" | "cancelled" | "sender_restricted" | "recipient_refused";
4209
4246
  } | {
4210
4247
  state: "outcome_unknown";
4211
4248
  terminalAt: number;
4212
- errorKind: "validation" | "permission" | "auth" | "quota_exhausted" | "provider_rejected" | "rate_limited" | "retryable_upstream" | "outcome_unknown" | "result_unavailable" | "upstream" | "timeout" | "internal" | "cancelled";
4249
+ errorKind: "validation" | "permission" | "auth" | "quota_exhausted" | "provider_rejected" | "rate_limited" | "retryable_upstream" | "outcome_unknown" | "result_unavailable" | "upstream" | "timeout" | "internal" | "cancelled" | "sender_restricted" | "recipient_refused";
4213
4250
  } | null;
4214
4251
  provider: "gmail";
4215
4252
  recipient: string;
@@ -4229,11 +4266,11 @@ export type WorkflowFailureAlertDestination = {
4229
4266
  } | {
4230
4267
  state: "failed";
4231
4268
  terminalAt: number;
4232
- errorKind: "validation" | "permission" | "auth" | "quota_exhausted" | "provider_rejected" | "rate_limited" | "retryable_upstream" | "outcome_unknown" | "result_unavailable" | "upstream" | "timeout" | "internal" | "cancelled";
4269
+ errorKind: "validation" | "permission" | "auth" | "quota_exhausted" | "provider_rejected" | "rate_limited" | "retryable_upstream" | "outcome_unknown" | "result_unavailable" | "upstream" | "timeout" | "internal" | "cancelled" | "sender_restricted" | "recipient_refused";
4233
4270
  } | {
4234
4271
  state: "outcome_unknown";
4235
4272
  terminalAt: number;
4236
- errorKind: "validation" | "permission" | "auth" | "quota_exhausted" | "provider_rejected" | "rate_limited" | "retryable_upstream" | "outcome_unknown" | "result_unavailable" | "upstream" | "timeout" | "internal" | "cancelled";
4273
+ errorKind: "validation" | "permission" | "auth" | "quota_exhausted" | "provider_rejected" | "rate_limited" | "retryable_upstream" | "outcome_unknown" | "result_unavailable" | "upstream" | "timeout" | "internal" | "cancelled" | "sender_restricted" | "recipient_refused";
4237
4274
  } | null;
4238
4275
  provider: "outlook";
4239
4276
  recipient: string;
@@ -5636,7 +5673,7 @@ export interface WorkflowAccount {
5636
5673
  /** Which of the connection's accounts it is, where each is an inbox of its own, such as a Facebook Page. */
5637
5674
  providerAccountID: string | null;
5638
5675
  label: string;
5639
- /** The account is turned off under Channels in the Superclerk app, which the API can't change yet; the workflow resumes there when it is on. */
5676
+ /** The account is turned off for its agent in the Superclerk app's Inbox, which the API can't change yet; the workflow resumes there once it is turned on for everyone. */
5640
5677
  turnedOff: boolean;
5641
5678
  }
5642
5679
  export type WorkflowWebhookSetup = {
@@ -5833,7 +5870,7 @@ export interface ToolRunFailedEvent {
5833
5870
  connectionID: string | null;
5834
5871
  status: "failed" | "cancelled";
5835
5872
  error: {
5836
- kind: "validation" | "permission" | "auth" | "quota_exhausted" | "provider_rejected" | "rate_limited" | "retryable_upstream" | "outcome_unknown" | "result_unavailable" | "upstream" | "timeout" | "internal" | "cancelled";
5873
+ kind: "validation" | "permission" | "auth" | "quota_exhausted" | "provider_rejected" | "rate_limited" | "retryable_upstream" | "outcome_unknown" | "result_unavailable" | "upstream" | "timeout" | "internal" | "cancelled" | "sender_restricted" | "recipient_refused";
5837
5874
  };
5838
5875
  };
5839
5876
  }
@@ -6012,7 +6049,7 @@ export type WorkspacesCreateParams = {
6012
6049
  name: string;
6013
6050
  /** Where the client's invoices and payment links go, and its admin's invitation from the Superclerk app. */
6014
6051
  billingEmail: string;
6015
- /** The plan the client pays, its own, in micros (1 USD = 1,000,000, whole cents): priceMicros every 30 days, includedMicros of usage, and topupPriceBps for extra usage. Superclerk's fee is a $49 base plus any includedMicros past $15, and 10% of the rest of the price; what is left must cover Whop's highest card fees, so priceMicros is at least $54.62 while includedMicros is $15 or less, and topupPriceBps at least 12041 (20.41% over cost). Optional: without one, the client has no plan until you set one in Partner → Clients. */
6052
+ /** The plan the client pays, its own, in micros (1 USD = 1,000,000, whole cents): priceMicros every 30 days, includedMicros of usage, and topupPriceBps for extra usage. Superclerk's fee is a $49 base plus any includedMicros past $15, and 10% of the rest of the price; what is left must cover Whop's highest card fees, so priceMicros is at least $54.62 while includedMicros is $15 or less. A topupPriceBps of 10000 sells extra usage at cost. Optional: without one, the client has no plan until you set one in Partner → Clients. */
6016
6053
  plan?: {
6017
6054
  name: string;
6018
6055
  icon: "circle" | "triangle" | "square" | "hexagon" | "star" | "sparkle" | "leaf" | "paper-plane" | "rocket" | "crown" | "diamond" | "heart";
@@ -6300,7 +6337,7 @@ export interface ConnectionsProxyDeleteParams {
6300
6337
  export type SocialAccountsListResponse = {
6301
6338
  accounts: Array<{
6302
6339
  id: string;
6303
- platform: "instagram" | "facebook" | "linkedin" | "threads" | "tiktok" | "youtube" | "googlebusiness";
6340
+ platform: "x" | "instagram" | "facebook" | "linkedin" | "threads" | "tiktok" | "youtube" | "googlebusiness";
6304
6341
  nativeId: string;
6305
6342
  /** The connection, as the Connections API names it; null until a new connection finishes setting up. */
6306
6343
  connectionID: string | null;
@@ -6328,6 +6365,7 @@ export type SocialAccountsAnalyticsOverviewResponse = {
6328
6365
  value: number | null;
6329
6366
  }>;
6330
6367
  }>;
6368
+ missingScopes?: Array<string>;
6331
6369
  status: "ready";
6332
6370
  retrievedAt: number;
6333
6371
  };
@@ -6397,7 +6435,7 @@ export type SocialAccountsTiktokVideosResponse = {
6397
6435
  };
6398
6436
  export type SocialAccountsDisconnectResponse = {
6399
6437
  id: string;
6400
- platform: "instagram" | "facebook" | "linkedin" | "threads" | "tiktok" | "youtube" | "googlebusiness";
6438
+ platform: "x" | "instagram" | "facebook" | "linkedin" | "threads" | "tiktok" | "youtube" | "googlebusiness";
6401
6439
  nativeId: string;
6402
6440
  /** The connection, as the Connections API names it; null until a new connection finishes setting up. */
6403
6441
  connectionID: string | null;
@@ -6408,6 +6446,10 @@ export interface SocialMediaListParams {
6408
6446
  limit?: number;
6409
6447
  cursor?: string;
6410
6448
  search?: string;
6449
+ /** true: only media AI made; false: only people's. */
6450
+ aiGenerated?: "true" | "false";
6451
+ /** true: only media a post published; false: only media none did. */
6452
+ posted?: "true" | "false";
6411
6453
  }
6412
6454
  export type SocialMediaListResponse = {
6413
6455
  items: Array<{
@@ -6419,9 +6461,19 @@ export type SocialMediaListResponse = {
6419
6461
  storageAccess: "private" | "public";
6420
6462
  status: "pending" | "ready";
6421
6463
  url: string | null;
6464
+ /** Whether AI made it: an agent's image or video, or a photo an agent edited. */
6465
+ aiGenerated: boolean;
6422
6466
  createdAt: number;
6423
6467
  updatedAt: number;
6424
6468
  confirmedAt: number | null;
6469
+ post: {
6470
+ postID: string;
6471
+ status: "posted" | "scheduled" | "draft" | "failed";
6472
+ /** Where that post goes. */
6473
+ platforms: Array<"x" | "instagram" | "facebook" | "linkedin" | "threads" | "tiktok" | "youtube" | "googlebusiness">;
6474
+ /** When it went out, goes out or failed; null for a draft. */
6475
+ at: string | null;
6476
+ } | null;
6425
6477
  }>;
6426
6478
  nextCursor: string | null;
6427
6479
  };
@@ -6448,6 +6500,8 @@ export type SocialMediaCreateResponse = {
6448
6500
  storageAccess: "private" | "public";
6449
6501
  status: "pending" | "ready";
6450
6502
  url: string | null;
6503
+ /** Whether AI made it: an agent's image or video, or a photo an agent edited. */
6504
+ aiGenerated: boolean;
6451
6505
  createdAt: number;
6452
6506
  updatedAt: number;
6453
6507
  confirmedAt: number | null;
@@ -6470,6 +6524,8 @@ export type SocialMediaConfirmResponse = {
6470
6524
  storageAccess: "private" | "public";
6471
6525
  status: "pending" | "ready";
6472
6526
  url: string | null;
6527
+ /** Whether AI made it: an agent's image or video, or a photo an agent edited. */
6528
+ aiGenerated: boolean;
6473
6529
  createdAt: number;
6474
6530
  updatedAt: number;
6475
6531
  confirmedAt: number | null;
@@ -6487,10 +6543,16 @@ export type SocialMediaGetResponse = {
6487
6543
  storageAccess: "private" | "public";
6488
6544
  status: "pending" | "ready";
6489
6545
  url: string | null;
6546
+ /** Whether AI made it: an agent's image or video, or a photo an agent edited. */
6547
+ aiGenerated: boolean;
6490
6548
  createdAt: number;
6491
6549
  updatedAt: number;
6492
6550
  confirmedAt: number | null;
6493
6551
  };
6552
+ export type SocialMediaDeleteResponse = {
6553
+ id: string;
6554
+ deleted: true;
6555
+ };
6494
6556
  export interface SocialPostsListParams {
6495
6557
  limit?: number;
6496
6558
  cursor?: string;
@@ -6516,6 +6578,8 @@ export type SocialPostsListResponse = {
6516
6578
  storageAccess: "private" | "public";
6517
6579
  status: "pending" | "ready";
6518
6580
  url: string | null;
6581
+ /** Whether AI made it: an agent's image or video, or a photo an agent edited. */
6582
+ aiGenerated: boolean;
6519
6583
  createdAt: number;
6520
6584
  updatedAt: number;
6521
6585
  confirmedAt: number | null;
@@ -6530,7 +6594,7 @@ export type SocialPostsListResponse = {
6530
6594
  cancelledAt: number | null;
6531
6595
  platforms: Array<{
6532
6596
  id: string;
6533
- platform: "instagram" | "facebook" | "linkedin" | "threads" | "tiktok" | "youtube" | "googlebusiness";
6597
+ platform: "x" | "instagram" | "facebook" | "linkedin" | "threads" | "tiktok" | "youtube" | "googlebusiness";
6534
6598
  accountId: string;
6535
6599
  accountLabel: string;
6536
6600
  customContent: string | null;
@@ -6546,6 +6610,8 @@ export type SocialPostsListResponse = {
6546
6610
  storageAccess: "private" | "public";
6547
6611
  status: "pending" | "ready";
6548
6612
  url: string | null;
6613
+ /** Whether AI made it: an agent's image or video, or a photo an agent edited. */
6614
+ aiGenerated: boolean;
6549
6615
  createdAt: number;
6550
6616
  updatedAt: number;
6551
6617
  confirmedAt: number | null;
@@ -6575,6 +6641,20 @@ export type SocialPostsCreateParams = {
6575
6641
  altText?: string;
6576
6642
  }>;
6577
6643
  platforms: Array<{
6644
+ accountId: string;
6645
+ customContent?: string;
6646
+ mediaItems?: Array<{
6647
+ assetId: string;
6648
+ altText?: string;
6649
+ }>;
6650
+ platform: "x";
6651
+ platformSpecificData: {
6652
+ replySettings?: "following" | "mentionedUsers" | "subscribers" | "verified";
6653
+ community?: string;
6654
+ isAiGenerated?: boolean;
6655
+ paidPartnership?: boolean;
6656
+ };
6657
+ } | {
6578
6658
  accountId: string;
6579
6659
  customContent?: string;
6580
6660
  mediaItems?: Array<{
@@ -6584,6 +6664,7 @@ export type SocialPostsCreateParams = {
6584
6664
  platform: "instagram";
6585
6665
  platformSpecificData: {
6586
6666
  format: "post" | "reel" | "story";
6667
+ /** The video frame to use as its cover, in milliseconds. A Reel can take a public JPEG cover instead, after its video in this platform's own mediaItems. */
6587
6668
  thumbOffsetMs?: number;
6588
6669
  /** Publish as a trial reel, shown to non-followers first. MANUAL: the account shares it with followers in Instagram. SS_PERFORMANCE: Instagram shares it with followers if it performs well. Omit for a normal Reel. */
6589
6670
  trialGraduation?: "MANUAL" | "SS_PERFORMANCE";
@@ -6658,6 +6739,8 @@ export type SocialPostsCreateParams = {
6658
6739
  format: "video";
6659
6740
  allowDuet: boolean;
6660
6741
  allowStitch: boolean;
6742
+ /** The video frame to use as its cover, in milliseconds. TikTok uses the first frame without it. */
6743
+ videoCoverTimestampMs?: number;
6661
6744
  } | {
6662
6745
  /** Exact creatorInfoFingerprint from the latest creator info: the TikTok account's settings from account discovery, or tiktok_get_creator_info. */
6663
6746
  creatorInfoFingerprint: string;
@@ -6799,6 +6882,20 @@ export type SocialPostsCreateParams = {
6799
6882
  altText?: string;
6800
6883
  }>;
6801
6884
  platforms: Array<{
6885
+ accountId: string;
6886
+ customContent?: string;
6887
+ mediaItems?: Array<{
6888
+ assetId: string;
6889
+ altText?: string;
6890
+ }>;
6891
+ platform: "x";
6892
+ platformSpecificData: {
6893
+ replySettings?: "following" | "mentionedUsers" | "subscribers" | "verified";
6894
+ community?: string;
6895
+ isAiGenerated?: boolean;
6896
+ paidPartnership?: boolean;
6897
+ };
6898
+ } | {
6802
6899
  accountId: string;
6803
6900
  customContent?: string;
6804
6901
  mediaItems?: Array<{
@@ -6808,6 +6905,7 @@ export type SocialPostsCreateParams = {
6808
6905
  platform: "instagram";
6809
6906
  platformSpecificData: {
6810
6907
  format: "post" | "reel" | "story";
6908
+ /** The video frame to use as its cover, in milliseconds. A Reel can take a public JPEG cover instead, after its video in this platform's own mediaItems. */
6811
6909
  thumbOffsetMs?: number;
6812
6910
  /** Publish as a trial reel, shown to non-followers first. MANUAL: the account shares it with followers in Instagram. SS_PERFORMANCE: Instagram shares it with followers if it performs well. Omit for a normal Reel. */
6813
6911
  trialGraduation?: "MANUAL" | "SS_PERFORMANCE";
@@ -6882,6 +6980,8 @@ export type SocialPostsCreateParams = {
6882
6980
  format: "video";
6883
6981
  allowDuet: boolean;
6884
6982
  allowStitch: boolean;
6983
+ /** The video frame to use as its cover, in milliseconds. TikTok uses the first frame without it. */
6984
+ videoCoverTimestampMs?: number;
6885
6985
  } | {
6886
6986
  /** Exact creatorInfoFingerprint from the latest creator info: the TikTok account's settings from account discovery, or tiktok_get_creator_info. */
6887
6987
  creatorInfoFingerprint: string;
@@ -7022,6 +7122,20 @@ export type SocialPostsCreateParams = {
7022
7122
  altText?: string;
7023
7123
  }>;
7024
7124
  platforms: Array<{
7125
+ accountId: string;
7126
+ customContent?: string;
7127
+ mediaItems?: Array<{
7128
+ assetId: string;
7129
+ altText?: string;
7130
+ }>;
7131
+ platform: "x";
7132
+ platformSpecificData: {
7133
+ replySettings?: "following" | "mentionedUsers" | "subscribers" | "verified";
7134
+ community?: string;
7135
+ isAiGenerated?: boolean;
7136
+ paidPartnership?: boolean;
7137
+ };
7138
+ } | {
7025
7139
  accountId: string;
7026
7140
  customContent?: string;
7027
7141
  mediaItems?: Array<{
@@ -7031,6 +7145,7 @@ export type SocialPostsCreateParams = {
7031
7145
  platform: "instagram";
7032
7146
  platformSpecificData: {
7033
7147
  format: "post" | "reel" | "story";
7148
+ /** The video frame to use as its cover, in milliseconds. A Reel can take a public JPEG cover instead, after its video in this platform's own mediaItems. */
7034
7149
  thumbOffsetMs?: number;
7035
7150
  /** Publish as a trial reel, shown to non-followers first. MANUAL: the account shares it with followers in Instagram. SS_PERFORMANCE: Instagram shares it with followers if it performs well. Omit for a normal Reel. */
7036
7151
  trialGraduation?: "MANUAL" | "SS_PERFORMANCE";
@@ -7105,6 +7220,8 @@ export type SocialPostsCreateParams = {
7105
7220
  format: "video";
7106
7221
  allowDuet: boolean;
7107
7222
  allowStitch: boolean;
7223
+ /** The video frame to use as its cover, in milliseconds. TikTok uses the first frame without it. */
7224
+ videoCoverTimestampMs?: number;
7108
7225
  } | {
7109
7226
  /** Exact creatorInfoFingerprint from the latest creator info: the TikTok account's settings from account discovery, or tiktok_get_creator_info. */
7110
7227
  creatorInfoFingerprint: string;
@@ -7254,6 +7371,8 @@ export type SocialPostsCreateResponse = {
7254
7371
  storageAccess: "private" | "public";
7255
7372
  status: "pending" | "ready";
7256
7373
  url: string | null;
7374
+ /** Whether AI made it: an agent's image or video, or a photo an agent edited. */
7375
+ aiGenerated: boolean;
7257
7376
  createdAt: number;
7258
7377
  updatedAt: number;
7259
7378
  confirmedAt: number | null;
@@ -7268,7 +7387,7 @@ export type SocialPostsCreateResponse = {
7268
7387
  cancelledAt: number | null;
7269
7388
  platforms: Array<{
7270
7389
  id: string;
7271
- platform: "instagram" | "facebook" | "linkedin" | "threads" | "tiktok" | "youtube" | "googlebusiness";
7390
+ platform: "x" | "instagram" | "facebook" | "linkedin" | "threads" | "tiktok" | "youtube" | "googlebusiness";
7272
7391
  accountId: string;
7273
7392
  accountLabel: string;
7274
7393
  customContent: string | null;
@@ -7284,6 +7403,8 @@ export type SocialPostsCreateResponse = {
7284
7403
  storageAccess: "private" | "public";
7285
7404
  status: "pending" | "ready";
7286
7405
  url: string | null;
7406
+ /** Whether AI made it: an agent's image or video, or a photo an agent edited. */
7407
+ aiGenerated: boolean;
7287
7408
  createdAt: number;
7288
7409
  updatedAt: number;
7289
7410
  confirmedAt: number | null;
@@ -7319,6 +7440,8 @@ export type SocialPostsGetResponse = {
7319
7440
  storageAccess: "private" | "public";
7320
7441
  status: "pending" | "ready";
7321
7442
  url: string | null;
7443
+ /** Whether AI made it: an agent's image or video, or a photo an agent edited. */
7444
+ aiGenerated: boolean;
7322
7445
  createdAt: number;
7323
7446
  updatedAt: number;
7324
7447
  confirmedAt: number | null;
@@ -7333,7 +7456,7 @@ export type SocialPostsGetResponse = {
7333
7456
  cancelledAt: number | null;
7334
7457
  platforms: Array<{
7335
7458
  id: string;
7336
- platform: "instagram" | "facebook" | "linkedin" | "threads" | "tiktok" | "youtube" | "googlebusiness";
7459
+ platform: "x" | "instagram" | "facebook" | "linkedin" | "threads" | "tiktok" | "youtube" | "googlebusiness";
7337
7460
  accountId: string;
7338
7461
  accountLabel: string;
7339
7462
  customContent: string | null;
@@ -7349,6 +7472,8 @@ export type SocialPostsGetResponse = {
7349
7472
  storageAccess: "private" | "public";
7350
7473
  status: "pending" | "ready";
7351
7474
  url: string | null;
7475
+ /** Whether AI made it: an agent's image or video, or a photo an agent edited. */
7476
+ aiGenerated: boolean;
7352
7477
  createdAt: number;
7353
7478
  updatedAt: number;
7354
7479
  confirmedAt: number | null;
@@ -7376,6 +7501,20 @@ export type SocialPostsUpdateParams = {
7376
7501
  altText?: string;
7377
7502
  }>;
7378
7503
  platforms: Array<{
7504
+ accountId: string;
7505
+ customContent?: string;
7506
+ mediaItems?: Array<{
7507
+ assetId: string;
7508
+ altText?: string;
7509
+ }>;
7510
+ platform: "x";
7511
+ platformSpecificData: {
7512
+ replySettings?: "following" | "mentionedUsers" | "subscribers" | "verified";
7513
+ community?: string;
7514
+ isAiGenerated?: boolean;
7515
+ paidPartnership?: boolean;
7516
+ };
7517
+ } | {
7379
7518
  accountId: string;
7380
7519
  customContent?: string;
7381
7520
  mediaItems?: Array<{
@@ -7385,6 +7524,7 @@ export type SocialPostsUpdateParams = {
7385
7524
  platform: "instagram";
7386
7525
  platformSpecificData: {
7387
7526
  format: "post" | "reel" | "story";
7527
+ /** The video frame to use as its cover, in milliseconds. A Reel can take a public JPEG cover instead, after its video in this platform's own mediaItems. */
7388
7528
  thumbOffsetMs?: number;
7389
7529
  /** Publish as a trial reel, shown to non-followers first. MANUAL: the account shares it with followers in Instagram. SS_PERFORMANCE: Instagram shares it with followers if it performs well. Omit for a normal Reel. */
7390
7530
  trialGraduation?: "MANUAL" | "SS_PERFORMANCE";
@@ -7459,6 +7599,8 @@ export type SocialPostsUpdateParams = {
7459
7599
  format: "video";
7460
7600
  allowDuet: boolean;
7461
7601
  allowStitch: boolean;
7602
+ /** The video frame to use as its cover, in milliseconds. TikTok uses the first frame without it. */
7603
+ videoCoverTimestampMs?: number;
7462
7604
  } | {
7463
7605
  /** Exact creatorInfoFingerprint from the latest creator info: the TikTok account's settings from account discovery, or tiktok_get_creator_info. */
7464
7606
  creatorInfoFingerprint: string;
@@ -7599,6 +7741,20 @@ export type SocialPostsUpdateParams = {
7599
7741
  altText?: string;
7600
7742
  }>;
7601
7743
  platforms: Array<{
7744
+ accountId: string;
7745
+ customContent?: string;
7746
+ mediaItems?: Array<{
7747
+ assetId: string;
7748
+ altText?: string;
7749
+ }>;
7750
+ platform: "x";
7751
+ platformSpecificData: {
7752
+ replySettings?: "following" | "mentionedUsers" | "subscribers" | "verified";
7753
+ community?: string;
7754
+ isAiGenerated?: boolean;
7755
+ paidPartnership?: boolean;
7756
+ };
7757
+ } | {
7602
7758
  accountId: string;
7603
7759
  customContent?: string;
7604
7760
  mediaItems?: Array<{
@@ -7608,6 +7764,7 @@ export type SocialPostsUpdateParams = {
7608
7764
  platform: "instagram";
7609
7765
  platformSpecificData: {
7610
7766
  format: "post" | "reel" | "story";
7767
+ /** The video frame to use as its cover, in milliseconds. A Reel can take a public JPEG cover instead, after its video in this platform's own mediaItems. */
7611
7768
  thumbOffsetMs?: number;
7612
7769
  /** Publish as a trial reel, shown to non-followers first. MANUAL: the account shares it with followers in Instagram. SS_PERFORMANCE: Instagram shares it with followers if it performs well. Omit for a normal Reel. */
7613
7770
  trialGraduation?: "MANUAL" | "SS_PERFORMANCE";
@@ -7682,6 +7839,8 @@ export type SocialPostsUpdateParams = {
7682
7839
  format: "video";
7683
7840
  allowDuet: boolean;
7684
7841
  allowStitch: boolean;
7842
+ /** The video frame to use as its cover, in milliseconds. TikTok uses the first frame without it. */
7843
+ videoCoverTimestampMs?: number;
7685
7844
  } | {
7686
7845
  /** Exact creatorInfoFingerprint from the latest creator info: the TikTok account's settings from account discovery, or tiktok_get_creator_info. */
7687
7846
  creatorInfoFingerprint: string;
@@ -7824,6 +7983,20 @@ export type SocialPostsUpdateParams = {
7824
7983
  altText?: string;
7825
7984
  }>;
7826
7985
  platforms: Array<{
7986
+ accountId: string;
7987
+ customContent?: string;
7988
+ mediaItems?: Array<{
7989
+ assetId: string;
7990
+ altText?: string;
7991
+ }>;
7992
+ platform: "x";
7993
+ platformSpecificData: {
7994
+ replySettings?: "following" | "mentionedUsers" | "subscribers" | "verified";
7995
+ community?: string;
7996
+ isAiGenerated?: boolean;
7997
+ paidPartnership?: boolean;
7998
+ };
7999
+ } | {
7827
8000
  accountId: string;
7828
8001
  customContent?: string;
7829
8002
  mediaItems?: Array<{
@@ -7833,6 +8006,7 @@ export type SocialPostsUpdateParams = {
7833
8006
  platform: "instagram";
7834
8007
  platformSpecificData: {
7835
8008
  format: "post" | "reel" | "story";
8009
+ /** The video frame to use as its cover, in milliseconds. A Reel can take a public JPEG cover instead, after its video in this platform's own mediaItems. */
7836
8010
  thumbOffsetMs?: number;
7837
8011
  /** Publish as a trial reel, shown to non-followers first. MANUAL: the account shares it with followers in Instagram. SS_PERFORMANCE: Instagram shares it with followers if it performs well. Omit for a normal Reel. */
7838
8012
  trialGraduation?: "MANUAL" | "SS_PERFORMANCE";
@@ -7907,6 +8081,8 @@ export type SocialPostsUpdateParams = {
7907
8081
  format: "video";
7908
8082
  allowDuet: boolean;
7909
8083
  allowStitch: boolean;
8084
+ /** The video frame to use as its cover, in milliseconds. TikTok uses the first frame without it. */
8085
+ videoCoverTimestampMs?: number;
7910
8086
  } | {
7911
8087
  /** Exact creatorInfoFingerprint from the latest creator info: the TikTok account's settings from account discovery, or tiktok_get_creator_info. */
7912
8088
  creatorInfoFingerprint: string;
@@ -8057,6 +8233,8 @@ export type SocialPostsUpdateResponse = {
8057
8233
  storageAccess: "private" | "public";
8058
8234
  status: "pending" | "ready";
8059
8235
  url: string | null;
8236
+ /** Whether AI made it: an agent's image or video, or a photo an agent edited. */
8237
+ aiGenerated: boolean;
8060
8238
  createdAt: number;
8061
8239
  updatedAt: number;
8062
8240
  confirmedAt: number | null;
@@ -8071,7 +8249,7 @@ export type SocialPostsUpdateResponse = {
8071
8249
  cancelledAt: number | null;
8072
8250
  platforms: Array<{
8073
8251
  id: string;
8074
- platform: "instagram" | "facebook" | "linkedin" | "threads" | "tiktok" | "youtube" | "googlebusiness";
8252
+ platform: "x" | "instagram" | "facebook" | "linkedin" | "threads" | "tiktok" | "youtube" | "googlebusiness";
8075
8253
  accountId: string;
8076
8254
  accountLabel: string;
8077
8255
  customContent: string | null;
@@ -8087,6 +8265,8 @@ export type SocialPostsUpdateResponse = {
8087
8265
  storageAccess: "private" | "public";
8088
8266
  status: "pending" | "ready";
8089
8267
  url: string | null;
8268
+ /** Whether AI made it: an agent's image or video, or a photo an agent edited. */
8269
+ aiGenerated: boolean;
8090
8270
  createdAt: number;
8091
8271
  updatedAt: number;
8092
8272
  confirmedAt: number | null;
@@ -8130,6 +8310,8 @@ export type SocialPostsRescheduleResponse = {
8130
8310
  storageAccess: "private" | "public";
8131
8311
  status: "pending" | "ready";
8132
8312
  url: string | null;
8313
+ /** Whether AI made it: an agent's image or video, or a photo an agent edited. */
8314
+ aiGenerated: boolean;
8133
8315
  createdAt: number;
8134
8316
  updatedAt: number;
8135
8317
  confirmedAt: number | null;
@@ -8144,7 +8326,7 @@ export type SocialPostsRescheduleResponse = {
8144
8326
  cancelledAt: number | null;
8145
8327
  platforms: Array<{
8146
8328
  id: string;
8147
- platform: "instagram" | "facebook" | "linkedin" | "threads" | "tiktok" | "youtube" | "googlebusiness";
8329
+ platform: "x" | "instagram" | "facebook" | "linkedin" | "threads" | "tiktok" | "youtube" | "googlebusiness";
8148
8330
  accountId: string;
8149
8331
  accountLabel: string;
8150
8332
  customContent: string | null;
@@ -8160,6 +8342,8 @@ export type SocialPostsRescheduleResponse = {
8160
8342
  storageAccess: "private" | "public";
8161
8343
  status: "pending" | "ready";
8162
8344
  url: string | null;
8345
+ /** Whether AI made it: an agent's image or video, or a photo an agent edited. */
8346
+ aiGenerated: boolean;
8163
8347
  createdAt: number;
8164
8348
  updatedAt: number;
8165
8349
  confirmedAt: number | null;
@@ -8198,6 +8382,8 @@ export type SocialPostsCancelResponse = {
8198
8382
  storageAccess: "private" | "public";
8199
8383
  status: "pending" | "ready";
8200
8384
  url: string | null;
8385
+ /** Whether AI made it: an agent's image or video, or a photo an agent edited. */
8386
+ aiGenerated: boolean;
8201
8387
  createdAt: number;
8202
8388
  updatedAt: number;
8203
8389
  confirmedAt: number | null;
@@ -8212,7 +8398,7 @@ export type SocialPostsCancelResponse = {
8212
8398
  cancelledAt: number | null;
8213
8399
  platforms: Array<{
8214
8400
  id: string;
8215
- platform: "instagram" | "facebook" | "linkedin" | "threads" | "tiktok" | "youtube" | "googlebusiness";
8401
+ platform: "x" | "instagram" | "facebook" | "linkedin" | "threads" | "tiktok" | "youtube" | "googlebusiness";
8216
8402
  accountId: string;
8217
8403
  accountLabel: string;
8218
8404
  customContent: string | null;
@@ -8228,6 +8414,8 @@ export type SocialPostsCancelResponse = {
8228
8414
  storageAccess: "private" | "public";
8229
8415
  status: "pending" | "ready";
8230
8416
  url: string | null;
8417
+ /** Whether AI made it: an agent's image or video, or a photo an agent edited. */
8418
+ aiGenerated: boolean;
8231
8419
  createdAt: number;
8232
8420
  updatedAt: number;
8233
8421
  confirmedAt: number | null;