@getlatedev/node 0.2.1267 → 0.2.1269

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.
@@ -10188,9 +10188,9 @@ export type Post = {
10188
10188
  scheduledFor?: string;
10189
10189
  timezone?: string;
10190
10190
  /**
10191
- * `cancelled` is set by POST /v1/posts/{postId}/unpublish once every platform entry has been removed from its platform (a post with published entries left becomes `partial`); cancelled posts can be edited and rescheduled like drafts.
10191
+ * `cancelled` is set by POST /v1/posts/{postId}/unpublish once every platform entry has been removed from its platform (a post with published entries left becomes `partial`); cancelled posts can be edited and rescheduled like drafts. `pending_approval` (set by `requiresApproval: true`) never publishes until POST /v1/posts/{postId}/review approves it.
10192
10192
  */
10193
- status?: 'draft' | 'scheduled' | 'publishing' | 'published' | 'partial' | 'failed' | 'cancelled';
10193
+ status?: 'draft' | 'pending_approval' | 'scheduled' | 'publishing' | 'published' | 'partial' | 'failed' | 'cancelled';
10194
10194
  /**
10195
10195
  * YouTube constraints: each tag max 100 chars, combined max 500 chars, duplicates removed.
10196
10196
  */
@@ -10227,6 +10227,11 @@ export type Post = {
10227
10227
  updatedAt?: string;
10228
10228
  };
10229
10229
 
10230
+ /**
10231
+ * `cancelled` is set by POST /v1/posts/{postId}/unpublish once every platform entry has been removed from its platform (a post with published entries left becomes `partial`); cancelled posts can be edited and rescheduled like drafts. `pending_approval` (set by `requiresApproval: true`) never publishes until POST /v1/posts/{postId}/review approves it.
10232
+ */
10233
+ export type status28 = 'draft' | 'pending_approval' | 'scheduled' | 'publishing' | 'published' | 'partial' | 'failed' | 'cancelled';
10234
+
10230
10235
  export type visibility2 = 'public' | 'private' | 'unlisted';
10231
10236
 
10232
10237
  export type PostAnalytics = {
@@ -10462,7 +10467,7 @@ export type Product = {
10462
10467
  publishedAt?: (string) | null;
10463
10468
  };
10464
10469
 
10465
- export type status28 = 'active' | 'draft' | 'archived';
10470
+ export type status29 = 'active' | 'draft' | 'archived';
10466
10471
 
10467
10472
  export type ProductImage = {
10468
10473
  url?: string;
@@ -10681,7 +10686,7 @@ export type RcsAgent = {
10681
10686
  createdAt?: string;
10682
10687
  };
10683
10688
 
10684
- export type status29 = 'requested' | 'changes_requested' | 'brand_vetting' | 'agent_review' | 'testing' | 'launch_review' | 'launching' | 'live' | 'rejected' | 'deactivated';
10689
+ export type status30 = 'requested' | 'changes_requested' | 'brand_vetting' | 'agent_review' | 'testing' | 'launch_review' | 'launching' | 'live' | 'rejected' | 'deactivated';
10685
10690
 
10686
10691
  export type useCase = 'MULTI_USE' | 'PROMOTIONAL' | 'TRANSACTIONAL' | 'OTP';
10687
10692
 
@@ -10733,7 +10738,7 @@ export type RcsBrand = RcsBrandInput & {
10733
10738
  /**
10734
10739
  * draft = not filed yet (still editable).
10735
10740
  */
10736
- export type status30 = 'draft' | 'vetting' | 'verified' | 'rejected';
10741
+ export type status31 = 'draft' | 'vetting' | 'verified' | 'rejected';
10737
10742
 
10738
10743
  export type RcsBrandInput = {
10739
10744
  displayName: string;
@@ -10820,7 +10825,7 @@ export type RcsCarrierApproval = {
10820
10825
 
10821
10826
  export type scope2 = 'carrier' | 'hub' | 'bot';
10822
10827
 
10823
- export type status31 = 'PENDING' | 'SUBMITTED' | 'APPROVED' | 'REJECTED';
10828
+ export type status32 = 'PENDING' | 'SUBMITTED' | 'APPROVED' | 'REJECTED';
10824
10829
 
10825
10830
  /**
10826
10831
  * Message content. `suggestions` (max 11) render as chips under the message.
@@ -11652,7 +11657,7 @@ export type SupportRun = {
11652
11657
  /**
11653
11658
  * queued and running are in progress. needs_human means the assistant handed the question to a person instead of answering; when `supportTicket` is set, a Zernio teammate has been notified and will follow up by email.
11654
11659
  */
11655
- export type status32 = 'queued' | 'running' | 'completed' | 'needs_human' | 'failed';
11660
+ export type status33 = 'queued' | 'running' | 'completed' | 'needs_human' | 'failed';
11656
11661
 
11657
11662
  /**
11658
11663
  * Why the run stopped. Null while it is in progress.
@@ -12554,7 +12559,7 @@ export type UploadTokenResponse = {
12554
12559
  status?: 'pending' | 'completed' | 'expired';
12555
12560
  };
12556
12561
 
12557
- export type status33 = 'pending' | 'completed' | 'expired';
12562
+ export type status34 = 'pending' | 'completed' | 'expired';
12558
12563
 
12559
12564
  export type UploadTokenStatusResponse = {
12560
12565
  token?: string;
@@ -13061,7 +13066,7 @@ export type Verification = {
13061
13066
  resend?: boolean;
13062
13067
  };
13063
13068
 
13064
- export type status34 = 'pending' | 'approved' | 'expired' | 'max_attempts_reached' | 'canceled' | 'delivery_failed';
13069
+ export type status35 = 'pending' | 'approved' | 'expired' | 'max_attempts_reached' | 'canceled' | 'delivery_failed';
13065
13070
 
13066
13071
  export type channel5 = 'sms' | 'whatsapp';
13067
13072
 
@@ -13219,7 +13224,7 @@ export type WebhookLog = {
13219
13224
  /**
13220
13225
  * Delivery outcome
13221
13226
  */
13222
- export type status35 = 'success' | 'failed';
13227
+ export type status36 = 'success' | 'failed';
13223
13228
 
13224
13229
  /**
13225
13230
  * Webhook payload for `account.ads.initial_sync_completed` events.
@@ -13336,7 +13341,7 @@ export type event = 'account.ads.initial_sync_completed';
13336
13341
  /**
13337
13342
  * Overall outcome of the initial sync.
13338
13343
  */
13339
- export type status36 = 'success' | 'failure';
13344
+ export type status37 = 'success' | 'failure';
13340
13345
 
13341
13346
  /**
13342
13347
  * Stable category for UX branching. New values may be added; existing ones are
@@ -13727,7 +13732,7 @@ export type event7 = 'ad.video.processed';
13727
13732
  /**
13728
13733
  * `ready`: usable as `video.id` on the create endpoints. `error`: Meta could not process it; upload again.
13729
13734
  */
13730
- export type status37 = 'ready' | 'error';
13735
+ export type status38 = 'ready' | 'error';
13731
13736
 
13732
13737
  /**
13733
13738
  * Webhook payload for `analytics.synced`. Fired once per connected account each
@@ -15834,7 +15839,7 @@ export type event30 = 'post.platform.published' | 'post.platform.failed' | 'post
15834
15839
  /**
15835
15840
  * Terminal status this event fires on. Matches the event suffix.
15836
15841
  */
15837
- export type status38 = 'published' | 'failed' | 'deleted';
15842
+ export type status39 = 'published' | 'failed' | 'deleted';
15838
15843
 
15839
15844
  /**
15840
15845
  * Webhook payload for reaction received events (WhatsApp, Telegram, Slack, Instagram, Facebook Messenger, TikTok)
@@ -16231,7 +16236,7 @@ export type event39 = 'whatsapp.account.name_status_updated';
16231
16236
  /**
16232
16237
  * Normalized from Meta's `decision` (REJECTED -> DECLINED, DEFERRED -> PENDING_REVIEW; the review is still open on DEFERRED, not a rejection).
16233
16238
  */
16234
- export type status39 = 'APPROVED' | 'DECLINED' | 'PENDING_REVIEW';
16239
+ export type status40 = 'APPROVED' | 'DECLINED' | 'PENDING_REVIEW';
16235
16240
 
16236
16241
  /**
16237
16242
  * Webhook payload for `whatsapp.account.quality_updated`. Fired when a connected
@@ -16365,7 +16370,7 @@ export type event41 = 'whatsapp.account.status_updated';
16365
16370
  /**
16366
16371
  * `active` only on a reinstatement (DISABLED_UPDATE with ban state REINSTATE).
16367
16372
  */
16368
- export type status40 = 'restricted' | 'active';
16373
+ export type status41 = 'restricted' | 'active';
16369
16374
 
16370
16375
  /**
16371
16376
  * Webhook payload for the `whatsapp.contact.identity_changed` event. Fired when
@@ -16581,7 +16586,7 @@ export type event44 = 'whatsapp.template.status_updated';
16581
16586
  * request before the template is actually removed.
16582
16587
  *
16583
16588
  */
16584
- export type status41 = 'APPROVED' | 'REJECTED' | 'PENDING' | 'PAUSED' | 'DISABLED' | 'IN_APPEAL' | 'PENDING_DELETION';
16589
+ export type status42 = 'APPROVED' | 'REJECTED' | 'PENDING' | 'PAUSED' | 'DISABLED' | 'IN_APPEAL' | 'PENDING_DELETION';
16585
16590
 
16586
16591
  export type WebhookPayloadWorkflowRun = {
16587
16592
  /**
@@ -16645,7 +16650,7 @@ export type event45 = 'workflow.run.started' | 'workflow.run.completed' | 'workf
16645
16650
  /**
16646
16651
  * running on workflow.run.started; completed or exited (ended on purpose before the last node, e.g. a handoff) on workflow.run.completed; failed on workflow.run.failed.
16647
16652
  */
16648
- export type status42 = 'running' | 'waiting' | 'completed' | 'exited' | 'failed';
16653
+ export type status43 = 'running' | 'waiting' | 'completed' | 'exited' | 'failed';
16649
16654
 
16650
16655
  /**
16651
16656
  * The profiles this event belongs to, each with the externalId you set on it (null when none is set). Present on every event tied to a profile and absent on events that belong to none. Events spanning several profiles (a post published to accounts of different profiles) list each once. Use it to route the event to your tenant without storing Zernio profile ids.
@@ -17043,7 +17048,7 @@ export type WorkflowExecutionEvent = {
17043
17048
 
17044
17049
  export type action2 = 'execution_started' | 'execution_completed' | 'execution_exited' | 'execution_paused' | 'execution_resumed' | 'node_started' | 'node_completed' | 'node_failed' | 'node_skipped';
17045
17050
 
17046
- export type status43 = 'success' | 'failed' | 'pending';
17051
+ export type status44 = 'success' | 'failed' | 'pending';
17047
17052
 
17048
17053
  /**
17049
17054
  * A node in a workflow graph. `config` shape depends on `type`.
@@ -19886,7 +19891,7 @@ export type ListPostsData = {
19886
19891
  * Which collection to read. `zernio` (default) returns posts authored through Zernio. `external` returns posts synced from the platform (existing/historical posts that were published outside Zernio). Combine with `accountId` and paginate via `page`/`limit` to walk the full synced history (we keep up to the last ~12 months per account).
19887
19892
  */
19888
19893
  source?: 'zernio' | 'external';
19889
- status?: 'draft' | 'scheduled' | 'publishing' | 'published' | 'partial' | 'failed' | 'cancelled';
19894
+ status?: 'draft' | 'pending_approval' | 'scheduled' | 'publishing' | 'published' | 'partial' | 'failed' | 'cancelled';
19890
19895
  /**
19891
19896
  * Comma-separated tags (at most 20). Returns only posts carrying every listed tag, matched exactly and case-sensitively against the tags set when the post was created. An empty value means no tag filter. `tag` is accepted as an alias.
19892
19897
  */
@@ -19945,6 +19950,10 @@ export type CreatePostData = {
19945
19950
  * When true, saves the post as a draft. When none of scheduledFor, publishNow, or queuedFromProfile are provided, the post defaults to draft automatically.
19946
19951
  */
19947
19952
  isDraft?: boolean;
19953
+ /**
19954
+ * When true, saves the post as pending_approval instead of scheduled. Needs scheduledFor, at the root or on every platform; cannot be combined with isDraft, publishNow, queuedFromProfile or queueId. The post publishes only after POST /v1/posts/{postId}/review approves it; approving after the scheduled time publishes within a couple of minutes.
19955
+ */
19956
+ requiresApproval?: boolean;
19948
19957
  /**
19949
19958
  * TikTok only. Preview whether each `tiktok` entry in `platforms` could publish right now under the TikTok Direct Post daily limits, without creating, scheduling or publishing anything: no post is persisted and no upload slot is claimed, so it can be repeated freely. The request still goes through auth, the payment gate and body validation, then returns HTTP 200 with `{ dryRun: true, canPublish, tiktok: [...] }` instead of 201. Only `tiktok` entries are evaluated; other platforms in the body are ignored, and a body with no `tiktok` entry is rejected with 400 `invalid_field_value` on `platforms`. An entry with `platformSpecificData.tiktokSettings.draft: true` (Creator Inbox upload) is not subject to the limit and always reports `canPublish: true`. Accounts connected through the TikTok for Business app do not go through these limits at all and also always report `canPublish: true`, so on those accounts a dry run confirms the request is well-formed rather than gating it.
19950
19959
  */
@@ -20133,6 +20142,10 @@ export type UpdatePostData = {
20133
20142
  * When omitted, the post keeps its current draft status. Send `false` to promote a draft to scheduled (combined with `scheduledFor`, `publishNow`, or a queue).
20134
20143
  */
20135
20144
  isDraft?: boolean;
20145
+ /**
20146
+ * Send true on a draft to submit it for approval: it becomes pending_approval and publishes only after POST /v1/posts/{postId}/review approves it. Cannot be combined with isDraft, publishNow, queuedFromProfile or queueId. Returns 409 when the post is not a draft.
20147
+ */
20148
+ requiresApproval?: boolean;
20136
20149
  timezone?: string;
20137
20150
  visibility?: 'public' | 'private' | 'unlisted';
20138
20151
  tags?: Array<(string)>;
@@ -20231,6 +20244,24 @@ export type RetryPostError = (ErrorResponse | {
20231
20244
  };
20232
20245
  });
20233
20246
 
20247
+ export type ReviewPostData = {
20248
+ body: {
20249
+ /**
20250
+ * approve schedules the post; reject returns it to draft.
20251
+ */
20252
+ decision: 'approve' | 'reject';
20253
+ };
20254
+ path: {
20255
+ postId: string;
20256
+ };
20257
+ };
20258
+
20259
+ export type ReviewPostResponse = (PostGetResponse);
20260
+
20261
+ export type ReviewPostError = (ErrorResponse | {
20262
+ error?: string;
20263
+ });
20264
+
20234
20265
  export type UnpublishPostData = {
20235
20266
  body: {
20236
20267
  /**
@@ -21867,11 +21898,11 @@ export type GetConnectUrlData = {
21867
21898
  */
21868
21899
  signup?: 'hosted';
21869
21900
  /**
21870
- * Any platform. When `true`, `authUrl` points to a Zernio-hosted welcome screen that shows your brand next to the platform ("<brandName> wants to connect to your <platform>") whose button fills for about a second and then sends the user on to the platform's own authorization screen, with no click; the rest of the flow is unchanged. `brandName`, `logoUrl`, `primaryColor` and `welcomeTheme` are optional and default to Zernio's own name, mark and look. The link is valid for 30 minutes, after which the page asks the user to start again. The brand also carries to the account and channel pickers Zernio shows after authorization, and when you pass no `redirect_url` the flow ends on a branded Zernio-hosted page saying whether the account connected, instead of the Zernio dashboard. Cannot be combined with `headless=true` or `signup=hosted` (400 `INVALID_FIELD_VALUE`). The platform's authorization screen still names the Zernio app. Recommended. When left out, the screen is shown if the workspace saved it as on by default (`PUT /v1/connect/welcome-screen`), except with `headless=true` or `signup=hosted`; pass `false` to skip it. Branding you leave out of the call comes from those saved settings, and a `welcomeTheme` you send is merged key by key over the saved theme.
21901
+ * Any platform. When `true`, `authUrl` points to a Zernio-hosted welcome screen that shows your brand next to the platform ("<brandName> wants to connect to your <platform>") whose button reads Connecting for about a second and then sends the user on to the platform's own authorization screen, with no click; the rest of the flow is unchanged. `brandName`, `logoUrl`, `primaryColor` and `welcomeTheme` are optional and default to Zernio's own name, mark and look. The link is valid for 30 minutes, after which the page asks the user to start again. The brand also carries to the account and channel pickers Zernio shows after authorization, and when you pass no `redirect_url` the flow ends on a branded Zernio-hosted page saying whether the account connected, instead of the Zernio dashboard. Cannot be combined with `headless=true` or `signup=hosted` (400 `INVALID_FIELD_VALUE`). The platform's authorization screen still names the Zernio app. Recommended. When left out, the screen is shown if the workspace saved it as on by default (`PUT /v1/connect/welcome-screen`), except with `headless=true` or `signup=hosted`; pass `false` to skip it. Branding you leave out of the call comes from those saved settings, and a `welcomeTheme` you send is merged key by key over the saved theme.
21871
21902
  */
21872
21903
  welcome?: boolean;
21873
21904
  /**
21874
- * Welcome screen only (`welcome=true`): a URL-encoded JSON object that restyles and rewords the screen. All keys are optional. Copy: `heading` (up to 120 characters), `trustLine` and `consentLine` (up to 200 each), `buttonLabel` (up to 30, the label on that button); each may contain the placeholders `{brand}` and `{platform}`. Style: `primaryColor`, `pageColor`, `cardColor` and `textColor` as `#RRGGBB`, `cornerRadius` as an integer from 0 to 24 (pixels), `font` as `sans`, `serif` or `mono`. A `primaryColor` here wins over the `primaryColor` parameter. Unknown keys, invalid JSON or an invalid value are a 400 `INVALID_FIELD_VALUE`. Rejected when the welcome screen is not shown. Example: `{"heading":"Link your {platform} to {brand}","cardColor":"#FFF7ED","cornerRadius":12}`.
21905
+ * Welcome screen only (`welcome=true`): a URL-encoded JSON object that restyles and rewords the screen. All keys are optional. Copy: `heading` (up to 120 characters), `trustLine`, `consentLine` and `statusLine` (up to 200 each, `statusLine` being the line above the button), `buttonLabel` (up to 30, the label of the link the button becomes if the redirect stalls); each may contain the placeholders `{brand}` and `{platform}`. Style: `primaryColor` (the button), `accentColor` (the header gradient, built as a scale of that colour, and the icons), `pageColor`, `cardColor` and `textColor` as `#RRGGBB`, `cornerRadius` as an integer from 0 to 24 (pixels), `font` as `sans`, `serif` or `mono`. A `primaryColor` here wins over the `primaryColor` parameter. Unknown keys, invalid JSON or an invalid value are a 400 `INVALID_FIELD_VALUE`. Rejected when the welcome screen is not shown. Example: `{"heading":"Link your {platform} to {brand}","cardColor":"#FFF7ED","cornerRadius":12}`.
21875
21906
  */
21876
21907
  welcomeTheme?: string;
21877
21908
  };