@getlatedev/node 0.2.1298 → 0.2.1300

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.
@@ -4483,6 +4483,59 @@ export type ConnectedApp = {
4483
4483
  tokenCount?: number;
4484
4484
  };
4485
4485
 
4486
+ export type ConnectHandoff = {
4487
+ id?: string;
4488
+ status?: 'waiting' | 'opened' | 'connected' | 'failed' | 'expired';
4489
+ platform?: string;
4490
+ /**
4491
+ * Filled when `status` is `connected`: every account the connect added (several when the user picked several pages, locations or organizations), each checked to be on the profile the connect was started for and written during this handoff. Empty otherwise.
4492
+ */
4493
+ accounts?: Array<{
4494
+ /**
4495
+ * The Zernio account id.
4496
+ */
4497
+ id?: string;
4498
+ profileId?: string;
4499
+ username?: string;
4500
+ }>;
4501
+ /**
4502
+ * Set when `status` is `failed`.
4503
+ */
4504
+ error?: {
4505
+ /**
4506
+ * The `error` code the flow ended on, as on a redirect_url. `connect_incomplete` when the phone reported no outcome, `connect_unverified` when it reported an account Zernio could not match to this connect.
4507
+ */
4508
+ code?: string;
4509
+ message?: (string) | null;
4510
+ /**
4511
+ * The other params the redirect flow appends for that error, such as `is_user_fixable`, `reason`, `dashboard_url`, `request_id` and `stage`. All optional.
4512
+ */
4513
+ details?: {
4514
+ [key: string]: (string);
4515
+ };
4516
+ } | null;
4517
+ };
4518
+
4519
+ export type status14 = 'waiting' | 'opened' | 'connected' | 'failed' | 'expired';
4520
+
4521
+ /**
4522
+ * Only with `handoff=true`: the link to show as a QR code.
4523
+ */
4524
+ export type ConnectHandoffLink = {
4525
+ /**
4526
+ * Pass to `GET /v1/connect/handoffs/{handoffId}`.
4527
+ */
4528
+ id?: string;
4529
+ /**
4530
+ * Short link to encode in the QR code. It opens the welcome screen on the phone.
4531
+ */
4532
+ url?: string;
4533
+ /**
4534
+ * When `url` stops working (30 minutes).
4535
+ */
4536
+ expiresAt?: string;
4537
+ };
4538
+
4486
4539
  export type ConnectWelcomeScreen = {
4487
4540
  showByDefault?: boolean;
4488
4541
  brandName?: (string) | null;
@@ -4684,7 +4737,7 @@ export type ConversionDestination = {
4684
4737
  * For LinkedIn, `inactive` means the rule is soft-deleted (`enabled: false`).
4685
4738
  *
4686
4739
  */
4687
- export type status14 = 'active' | 'inactive';
4740
+ export type status15 = 'active' | 'inactive';
4688
4741
 
4689
4742
  /**
4690
4743
  * A single conversion event to relay to the ad platform. All PII fields
@@ -5821,7 +5874,7 @@ export type objective = 'OUTCOME_ENGAGEMENT' | 'OUTCOME_SALES' | 'OUTCOME_LEADS'
5821
5874
  * `adSetId`, the new ads themselves.
5822
5875
  *
5823
5876
  */
5824
- export type status15 = 'ACTIVE' | 'PAUSED';
5877
+ export type status16 = 'ACTIVE' | 'PAUSED';
5825
5878
 
5826
5879
  /**
5827
5880
  * Campaign-level status, same semantics as `POST /v1/ads/create`. Defaults
@@ -6213,7 +6266,7 @@ export type privacy_level = 2;
6213
6266
  /**
6214
6267
  * 1=SCHEDULED, 2=ACTIVE, 3=COMPLETED, 4=CANCELED
6215
6268
  */
6216
- export type status16 = 1 | 2 | 3 | 4;
6269
+ export type status17 = 1 | 2 | 3 | 4;
6217
6270
 
6218
6271
  /**
6219
6272
  * 1=STAGE_INSTANCE, 2=VOICE, 3=EXTERNAL
@@ -6756,7 +6809,7 @@ export type FeedbackReceipt = {
6756
6809
  duplicate?: boolean;
6757
6810
  };
6758
6811
 
6759
- export type status17 = 'received';
6812
+ export type status18 = 'received';
6760
6813
 
6761
6814
  export type FollowerStatsResponse = {
6762
6815
  accounts?: Array<AccountWithFollowerStats>;
@@ -6885,7 +6938,7 @@ export type GoogleAdLabel = {
6885
6938
  description?: (string) | null;
6886
6939
  };
6887
6940
 
6888
- export type status18 = 'ENABLED' | 'REMOVED' | 'UNKNOWN';
6941
+ export type status19 = 'ENABLED' | 'REMOVED' | 'UNKNOWN';
6889
6942
 
6890
6943
  /**
6891
6944
  * At least one id across the four target lists. Up to 1000 ids per list.
@@ -6988,7 +7041,7 @@ export type GoogleAdsManagerLink = {
6988
7041
  /**
6989
7042
  * Status the link has after this call.
6990
7043
  */
6991
- export type status19 = 'PENDING' | 'ACTIVE' | 'REFUSED' | 'CANCELED' | 'INACTIVE';
7044
+ export type status20 = 'PENDING' | 'ACTIVE' | 'REFUSED' | 'CANCELED' | 'INACTIVE';
6992
7045
 
6993
7046
  export type GoogleAdsUserAccessInvitation = {
6994
7047
  invitationId?: string;
@@ -7003,7 +7056,7 @@ export type GoogleAdsUserAccessInvitation = {
7003
7056
 
7004
7057
  export type accessRole = 'ADMIN' | 'STANDARD' | 'READ_ONLY' | 'EMAIL_ONLY' | 'UNKNOWN';
7005
7058
 
7006
- export type status20 = 'PENDING' | 'DECLINED' | 'EXPIRED' | 'UNKNOWN';
7059
+ export type status21 = 'PENDING' | 'DECLINED' | 'EXPIRED' | 'UNKNOWN';
7007
7060
 
7008
7061
  export type GoogleAdsUserAccessInvitationResult = {
7009
7062
  customerId?: string;
@@ -7027,7 +7080,7 @@ export type GoogleAdsUserAccessInvitationResult = {
7027
7080
  /**
7028
7081
  * PENDING once the email is sent; PENDING_APPROVAL while Google waits for a second admin's multi-party approval.
7029
7082
  */
7030
- export type status21 = 'PENDING' | 'PENDING_APPROVAL';
7083
+ export type status22 = 'PENDING' | 'PENDING_APPROVAL';
7031
7084
 
7032
7085
  export type GoogleAdsUserInvitationApproval = {
7033
7086
  /**
@@ -7792,7 +7845,7 @@ export type GoogleRecommendationResult = {
7792
7845
  error?: string;
7793
7846
  };
7794
7847
 
7795
- export type status22 = 'applied' | 'dismissed' | 'failed';
7848
+ export type status23 = 'applied' | 'dismissed' | 'failed';
7796
7849
 
7797
7850
  export type GoogleRsaDescription = {
7798
7851
  text: string;
@@ -7927,7 +7980,7 @@ export type ImessageSandboxContact = {
7927
7980
  createdAt?: string;
7928
7981
  };
7929
7982
 
7930
- export type status23 = 'pending' | 'active';
7983
+ export type status24 = 'pending' | 'active';
7931
7984
 
7932
7985
  /**
7933
7986
  * An iMessage sender registered as an account on a profile.
@@ -8002,7 +8055,7 @@ export type region = 'US' | 'GB';
8002
8055
  /**
8003
8056
  * `awaiting_payment`: the first-month charge is still being confirmed by the card; the number is ordered automatically once it is paid (usually under 5 minutes), or the order fails with `failureReason` when the card declines or nothing confirms within 30 minutes.
8004
8057
  */
8005
- export type status24 = 'ordering' | 'awaiting_payment' | 'activating' | 'active' | 'suspended' | 'canceled' | 'failed';
8058
+ export type status25 = 'ordering' | 'awaiting_payment' | 'activating' | 'active' | 'suspended' | 'canceled' | 'failed';
8006
8059
 
8007
8060
  /**
8008
8061
  * Click attribution for a conversation that started from a Meta ad or
@@ -8205,7 +8258,7 @@ export type InboxWebhookConversation = {
8205
8258
  contactId?: string;
8206
8259
  };
8207
8260
 
8208
- export type status25 = 'active' | 'archived';
8261
+ export type status26 = 'active' | 'archived';
8209
8262
 
8210
8263
  /**
8211
8264
  * The conversation object included in conversation lifecycle webhook payloads (conversation.started, conversation.control_changed).
@@ -10222,7 +10275,7 @@ export type OwnedPhoneNumber = {
10222
10275
  }>;
10223
10276
  };
10224
10277
 
10225
- export type status26 = 'pending_payment' | 'pending_regulatory' | 'regulatory_declined' | 'provisioning' | 'verifying' | 'active' | 'suspended' | 'releasing' | 'released';
10278
+ export type status27 = 'pending_payment' | 'pending_regulatory' | 'regulatory_declined' | 'provisioning' | 'verifying' | 'active' | 'suspended' | 'releasing' | 'released';
10226
10279
 
10227
10280
  export type metaVerificationStatus = 'pending' | 'code_requested' | 'verified' | 'expired';
10228
10281
 
@@ -10360,7 +10413,7 @@ export type PlatformAnalytics = {
10360
10413
  isOwner?: (boolean) | null;
10361
10414
  };
10362
10415
 
10363
- export type status27 = 'published' | 'failed';
10416
+ export type status28 = 'published' | 'failed';
10364
10417
 
10365
10418
  /**
10366
10419
  * Sync state of analytics for this platform
@@ -10563,7 +10616,7 @@ export type Post = {
10563
10616
  /**
10564
10617
  * `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.
10565
10618
  */
10566
- export type status28 = 'draft' | 'pending_approval' | 'scheduled' | 'publishing' | 'published' | 'partial' | 'failed' | 'cancelled';
10619
+ export type status29 = 'draft' | 'pending_approval' | 'scheduled' | 'publishing' | 'published' | 'partial' | 'failed' | 'cancelled';
10567
10620
 
10568
10621
  export type visibility2 = 'public' | 'private' | 'unlisted';
10569
10622
 
@@ -10800,7 +10853,7 @@ export type Product = {
10800
10853
  publishedAt?: (string) | null;
10801
10854
  };
10802
10855
 
10803
- export type status29 = 'active' | 'draft' | 'archived';
10856
+ export type status30 = 'active' | 'draft' | 'archived';
10804
10857
 
10805
10858
  export type ProductImage = {
10806
10859
  url?: string;
@@ -11019,7 +11072,7 @@ export type RcsAgent = {
11019
11072
  createdAt?: string;
11020
11073
  };
11021
11074
 
11022
- export type status30 = 'requested' | 'changes_requested' | 'brand_vetting' | 'agent_review' | 'testing' | 'launch_review' | 'launching' | 'live' | 'rejected' | 'deactivated';
11075
+ export type status31 = 'requested' | 'changes_requested' | 'brand_vetting' | 'agent_review' | 'testing' | 'launch_review' | 'launching' | 'live' | 'rejected' | 'deactivated';
11023
11076
 
11024
11077
  export type useCase = 'MULTI_USE' | 'PROMOTIONAL' | 'TRANSACTIONAL' | 'OTP';
11025
11078
 
@@ -11071,7 +11124,7 @@ export type RcsBrand = RcsBrandInput & {
11071
11124
  /**
11072
11125
  * draft = not filed yet (still editable).
11073
11126
  */
11074
- export type status31 = 'draft' | 'vetting' | 'verified' | 'rejected';
11127
+ export type status32 = 'draft' | 'vetting' | 'verified' | 'rejected';
11075
11128
 
11076
11129
  export type RcsBrandInput = {
11077
11130
  displayName: string;
@@ -11158,7 +11211,7 @@ export type RcsCarrierApproval = {
11158
11211
 
11159
11212
  export type scope2 = 'carrier' | 'hub' | 'bot';
11160
11213
 
11161
- export type status32 = 'PENDING' | 'SUBMITTED' | 'APPROVED' | 'REJECTED';
11214
+ export type status33 = 'PENDING' | 'SUBMITTED' | 'APPROVED' | 'REJECTED';
11162
11215
 
11163
11216
  /**
11164
11217
  * Message content. `suggestions` (max 11) render as chips under the message.
@@ -11990,7 +12043,7 @@ export type SupportRun = {
11990
12043
  /**
11991
12044
  * 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.
11992
12045
  */
11993
- export type status33 = 'queued' | 'running' | 'completed' | 'needs_human' | 'failed';
12046
+ export type status34 = 'queued' | 'running' | 'completed' | 'needs_human' | 'failed';
11994
12047
 
11995
12048
  /**
11996
12049
  * Why the run stopped. Null while it is in progress.
@@ -12957,7 +13010,7 @@ export type UploadTokenResponse = {
12957
13010
  status?: 'pending' | 'completed' | 'expired';
12958
13011
  };
12959
13012
 
12960
- export type status34 = 'pending' | 'completed' | 'expired';
13013
+ export type status35 = 'pending' | 'completed' | 'expired';
12961
13014
 
12962
13015
  export type UploadTokenStatusResponse = {
12963
13016
  token?: string;
@@ -13309,6 +13362,10 @@ export type User = {
13309
13362
  email?: string;
13310
13363
  name?: string;
13311
13364
  role?: string;
13365
+ /**
13366
+ * Resource groups turned off for this team member. Empty for owners and unrestricted members.
13367
+ */
13368
+ disabledResourceGroups?: Array<(string)>;
13312
13369
  createdAt?: string;
13313
13370
  };
13314
13371
 
@@ -13464,7 +13521,7 @@ export type Verification = {
13464
13521
  resend?: boolean;
13465
13522
  };
13466
13523
 
13467
- export type status35 = 'pending' | 'approved' | 'expired' | 'max_attempts_reached' | 'canceled' | 'delivery_failed';
13524
+ export type status36 = 'pending' | 'approved' | 'expired' | 'max_attempts_reached' | 'canceled' | 'delivery_failed';
13468
13525
 
13469
13526
  export type channel5 = 'sms' | 'whatsapp';
13470
13527
 
@@ -13496,7 +13553,7 @@ export type Webhook = {
13496
13553
  /**
13497
13554
  * Events subscribed to
13498
13555
  */
13499
- events?: Array<('post.scheduled' | 'post.published' | 'post.failed' | 'post.partial' | 'post.cancelled' | 'post.recycled' | 'post.platform.published' | 'post.platform.failed' | 'post.platform.deleted' | 'post.tiktok.url_resolved' | 'post.external.created' | 'post.external.updated' | 'post.external.deleted' | 'account.connected' | 'account.disconnected' | 'account.ads.initial_sync_completed' | 'account.ads.sync_failed' | 'account.ads.sync_recovered' | 'analytics.synced' | 'message.received' | 'conversation.started' | 'conversation.control_changed' | 'call.received' | 'call.ended' | 'call.failed' | 'call.permission_request' | 'message.sent' | 'message.edited' | 'message.deleted' | 'message.delivered' | 'message.read' | 'message.played' | 'message.failed' | 'reaction.received' | 'referral.received' | 'comment.received' | 'review.new' | 'review.updated' | 'lead.received' | 'ad.status_changed' | 'ad.review.approved' | 'ad.review.rejected' | 'ad.delivery_issue' | 'campaign.budget.depleted' | 'ad_account.status_changed' | 'ad.video.processed' | 'whatsapp.template.status_updated' | 'whatsapp.template.category_updated' | 'whatsapp.account.name_status_updated' | 'whatsapp.account.quality_updated' | 'whatsapp.account.status_updated' | 'whatsapp.account.alert_received' | 'whatsapp.contact.identity_changed' | 'whatsapp.automatic_event' | 'whatsapp.number.activated' | 'whatsapp.number.declined' | 'whatsapp.number.action_required' | 'whatsapp.number.verification_required' | 'whatsapp.number.suspended' | 'whatsapp.number.reactivated' | 'whatsapp.number.released' | 'whatsapp.number.kyc_submitted' | 'phone_number.stock_available' | 'verification.approved' | 'verification.failed' | 'api.changelog.published' | 'sms.registration.action_required' | 'sms.registration.status_updated' | 'branded_calling.identity.status_updated' | 'branded_calling.identity.action_required' | 'branded_calling.number.status_updated' | 'rcs.agent.status_updated' | 'commerce.product.created' | 'commerce.product.updated' | 'commerce.product.deleted' | 'commerce.order.created' | 'commerce.order.updated' | 'commerce.order.refunded' | 'contact.tag_added' | 'contact.tag_removed' | 'contact.field_changed' | 'sequence.enrolled' | 'sequence.exited' | 'workflow.run.started' | 'workflow.run.completed' | 'workflow.run.failed' | 'support.run.completed' | 'support.run.failed')>;
13556
+ events?: Array<('post.scheduled' | 'post.published' | 'post.failed' | 'post.partial' | 'post.cancelled' | 'post.recycled' | 'post.platform.published' | 'post.platform.failed' | 'post.platform.deleted' | 'post.tiktok.url_resolved' | 'post.external.created' | 'post.external.updated' | 'post.external.deleted' | 'account.connected' | 'account.disconnected' | 'account.ads.initial_sync_completed' | 'account.ads.sync_failed' | 'account.ads.sync_recovered' | 'analytics.synced' | 'message.received' | 'conversation.started' | 'conversation.control_changed' | 'call.received' | 'call.ended' | 'call.failed' | 'call.permission_request' | 'message.sent' | 'message.edited' | 'message.deleted' | 'message.delivered' | 'message.read' | 'message.played' | 'message.failed' | 'reaction.received' | 'referral.received' | 'comment.received' | 'review.new' | 'review.updated' | 'lead.received' | 'ad.status_changed' | 'ad.review.approved' | 'ad.review.rejected' | 'ad.delivery_issue' | 'campaign.budget.depleted' | 'ad_account.status_changed' | 'ad.video.processed' | 'ad_rule.triggered' | 'whatsapp.template.status_updated' | 'whatsapp.template.category_updated' | 'whatsapp.account.name_status_updated' | 'whatsapp.account.quality_updated' | 'whatsapp.account.status_updated' | 'whatsapp.account.alert_received' | 'whatsapp.contact.identity_changed' | 'whatsapp.automatic_event' | 'whatsapp.number.activated' | 'whatsapp.number.declined' | 'whatsapp.number.action_required' | 'whatsapp.number.verification_required' | 'whatsapp.number.suspended' | 'whatsapp.number.reactivated' | 'whatsapp.number.released' | 'whatsapp.number.kyc_submitted' | 'phone_number.stock_available' | 'verification.approved' | 'verification.failed' | 'api.changelog.published' | 'sms.registration.action_required' | 'sms.registration.status_updated' | 'branded_calling.identity.status_updated' | 'branded_calling.identity.action_required' | 'branded_calling.number.status_updated' | 'rcs.agent.status_updated' | 'commerce.product.created' | 'commerce.product.updated' | 'commerce.product.deleted' | 'commerce.order.created' | 'commerce.order.updated' | 'commerce.order.refunded' | 'contact.tag_added' | 'contact.tag_removed' | 'contact.field_changed' | 'sequence.enrolled' | 'sequence.exited' | 'workflow.run.started' | 'workflow.run.completed' | 'workflow.run.failed' | 'support.run.completed' | 'support.run.failed')>;
13500
13557
  /**
13501
13558
  * Whether webhook delivery is enabled
13502
13559
  */
@@ -13642,7 +13699,7 @@ export type WebhookLog = {
13642
13699
  /**
13643
13700
  * Delivery outcome
13644
13701
  */
13645
- export type status36 = 'success' | 'failed';
13702
+ export type status37 = 'success' | 'failed';
13646
13703
 
13647
13704
  /**
13648
13705
  * Webhook payload for `account.ads.initial_sync_completed` events.
@@ -13759,7 +13816,7 @@ export type event = 'account.ads.initial_sync_completed';
13759
13816
  /**
13760
13817
  * Overall outcome of the initial sync.
13761
13818
  */
13762
- export type status37 = 'success' | 'failure';
13819
+ export type status38 = 'success' | 'failure';
13763
13820
 
13764
13821
  /**
13765
13822
  * Stable category for UX branching. New values may be added; existing ones are
@@ -14138,7 +14195,122 @@ export type WebhookPayloadAdReview = {
14138
14195
 
14139
14196
  export type event8 = 'ad.review.approved' | 'ad.review.rejected';
14140
14197
 
14141
- export type status38 = 'approved' | 'rejected';
14198
+ export type status39 = 'approved' | 'rejected';
14199
+
14200
+ /**
14201
+ * Webhook payload for the `ad_rule.triggered` event. Ad rules are in closed beta:
14202
+ * the event only fires for accounts in the ad rules pilot.
14203
+ *
14204
+ * Fires when a scheduled ad rule run finds campaigns or ad sets that meet every
14205
+ * condition of the rule. Each object is announced at most once per rule cooldown,
14206
+ * so `objects` lists only the objects the run acted on, never the ones still in
14207
+ * cooldown. A run where every matching object is still in cooldown sends nothing.
14208
+ *
14209
+ */
14210
+ export type WebhookPayloadAdRuleTriggered = {
14211
+ /**
14212
+ * Stable webhook event ID: the dedupe key, also sent as the X-Zernio-Event-Id header and identical on every retry and redelivery.
14213
+ */
14214
+ id: string;
14215
+ profiles?: WebhookProfiles;
14216
+ /**
14217
+ * Always true when present: only a sample sent by POST /v1/webhooks/test with an event carries it. Real deliveries never do.
14218
+ */
14219
+ test?: boolean;
14220
+ event: 'ad_rule.triggered';
14221
+ account: WebhookAdsAccount;
14222
+ rule: {
14223
+ /**
14224
+ * Zernio ad rule ID.
14225
+ */
14226
+ id: string;
14227
+ name: string;
14228
+ /**
14229
+ * Whether the rule evaluates campaigns or ad sets.
14230
+ */
14231
+ level: 'campaign' | 'adset';
14232
+ /**
14233
+ * Platform-native ad account ID the rule watches.
14234
+ */
14235
+ platformAdAccountId: string;
14236
+ };
14237
+ run: {
14238
+ /**
14239
+ * ID of the rule run that triggered.
14240
+ */
14241
+ id: string;
14242
+ /**
14243
+ * Scheduled time of the run (UTC).
14244
+ */
14245
+ ranAt: string;
14246
+ /**
14247
+ * The ad account's calendar date (YYYY-MM-DD) the condition windows were resolved against, so `today` and `last_7d` mean the account's days, not UTC days.
14248
+ */
14249
+ today: string;
14250
+ /**
14251
+ * IANA timezone used for `today`, for example `Europe/Madrid`.
14252
+ */
14253
+ timezone: string;
14254
+ /**
14255
+ * True when the ad account has no known timezone and UTC was assumed.
14256
+ */
14257
+ timezoneAssumed: boolean;
14258
+ /**
14259
+ * ISO 4217 currency of the ad account, which money metrics (`spend`, `cpc`, `cpm`, `cpa`) and condition values are in. Null when unknown.
14260
+ */
14261
+ currency: (string) | null;
14262
+ };
14263
+ /**
14264
+ * The campaigns or ad sets this run acted on, at the rule's `level`. Objects still in cooldown are left out.
14265
+ */
14266
+ objects: Array<{
14267
+ /**
14268
+ * Platform-native ID of the campaign or ad set.
14269
+ */
14270
+ platformId: string;
14271
+ /**
14272
+ * Name on the platform. Falls back to `platformId` when the platform reports none.
14273
+ */
14274
+ name: string;
14275
+ /**
14276
+ * Platform-native ID of the campaign the object belongs to (on a campaign-level rule, the campaign's own ID). Null when unknown.
14277
+ */
14278
+ platformCampaignId: (string) | null;
14279
+ /**
14280
+ * Every condition of the rule, with the value the object reached.
14281
+ */
14282
+ conditions: Array<{
14283
+ /**
14284
+ * `spend`, `impressions`, `clicks`, `conversions`, `ctr`, `cpc`, `cpm`, `cpa` or `roas`. New values may be added.
14285
+ */
14286
+ metric: string;
14287
+ /**
14288
+ * `today`, `yesterday`, `last_3d`, `last_7d`, `last_14d` or `last_30d`, in the account's calendar (see `run.today`). New values may be added.
14289
+ */
14290
+ window: string;
14291
+ op: '>' | '>=' | '<' | '<=';
14292
+ /**
14293
+ * The threshold set on the rule.
14294
+ */
14295
+ value: number;
14296
+ /**
14297
+ * The object's value for the metric over the window. Null when it cannot be computed, for example a cost per action with no actions.
14298
+ */
14299
+ actual: (number) | null;
14300
+ }>;
14301
+ }>;
14302
+ /**
14303
+ * UTC time at which Zernio generated this event.
14304
+ */
14305
+ timestamp: string;
14306
+ };
14307
+
14308
+ export type event9 = 'ad_rule.triggered';
14309
+
14310
+ /**
14311
+ * Whether the rule evaluates campaigns or ad sets.
14312
+ */
14313
+ export type level3 = 'campaign' | 'adset';
14142
14314
 
14143
14315
  /**
14144
14316
  * Webhook payload for the `ad.status_changed` event. Currently emitted
@@ -14265,12 +14437,12 @@ export type WebhookPayloadAdStatusChanged = {
14265
14437
  timestamp: string;
14266
14438
  };
14267
14439
 
14268
- export type event9 = 'ad.status_changed';
14440
+ export type event10 = 'ad.status_changed';
14269
14441
 
14270
14442
  /**
14271
14443
  * Hierarchy level the status applies to. Mirrors Meta's `level`. Creative-level events are not forwarded.
14272
14444
  */
14273
- export type level3 = 'CAMPAIGN' | 'AD_SET' | 'AD';
14445
+ export type level4 = 'CAMPAIGN' | 'AD_SET' | 'AD';
14274
14446
 
14275
14447
  /**
14276
14448
  * Webhook payload for the `ad.video.processed` event. Fires once per
@@ -14336,12 +14508,12 @@ export type WebhookPayloadAdVideoProcessed = {
14336
14508
  timestamp: string;
14337
14509
  };
14338
14510
 
14339
- export type event10 = 'ad.video.processed';
14511
+ export type event11 = 'ad.video.processed';
14340
14512
 
14341
14513
  /**
14342
14514
  * `ready`: usable as `video.id` on the create endpoints. `error`: Meta could not process it; upload again.
14343
14515
  */
14344
- export type status39 = 'ready' | 'error';
14516
+ export type status40 = 'ready' | 'error';
14345
14517
 
14346
14518
  /**
14347
14519
  * Webhook payload for `analytics.synced`. Fired once per connected account each
@@ -14419,7 +14591,7 @@ export type WebhookPayloadAnalyticsSynced = {
14419
14591
  timestamp: string;
14420
14592
  };
14421
14593
 
14422
- export type event11 = 'analytics.synced';
14594
+ export type event12 = 'analytics.synced';
14423
14595
 
14424
14596
  export type WebhookPayloadApiChangelogPublished = {
14425
14597
  /**
@@ -14438,7 +14610,7 @@ export type WebhookPayloadApiChangelogPublished = {
14438
14610
  timestamp: string;
14439
14611
  };
14440
14612
 
14441
- export type event12 = 'api.changelog.published';
14613
+ export type event13 = 'api.changelog.published';
14442
14614
 
14443
14615
  /**
14444
14616
  * Webhook payload for the `call.ended` event. Fires on call hangup
@@ -14513,7 +14685,7 @@ export type WebhookPayloadCallEnded = {
14513
14685
  timestamp: string;
14514
14686
  };
14515
14687
 
14516
- export type event13 = 'call.ended';
14688
+ export type event14 = 'call.ended';
14517
14689
 
14518
14690
  /**
14519
14691
  * Webhook payload for the `call.failed` event. Fired when a call
@@ -14552,7 +14724,7 @@ export type WebhookPayloadCallFailed = {
14552
14724
  timestamp: string;
14553
14725
  };
14554
14726
 
14555
- export type event14 = 'call.failed';
14727
+ export type event15 = 'call.failed';
14556
14728
 
14557
14729
  /**
14558
14730
  * Webhook payload for the `call.permission_request` event. Fires
@@ -14594,7 +14766,7 @@ export type WebhookPayloadCallPermissionRequest = {
14594
14766
  timestamp: string;
14595
14767
  };
14596
14768
 
14597
- export type event15 = 'call.permission_request';
14769
+ export type event16 = 'call.permission_request';
14598
14770
 
14599
14771
  export type response = 'accept' | 'reject';
14600
14772
 
@@ -14653,7 +14825,7 @@ export type WebhookPayloadCallReceived = {
14653
14825
  timestamp: string;
14654
14826
  };
14655
14827
 
14656
- export type event16 = 'call.received';
14828
+ export type event17 = 'call.received';
14657
14829
 
14658
14830
  /**
14659
14831
  * Webhook payload for the `campaign.budget.depleted` event. Fires when a campaign
@@ -14704,12 +14876,12 @@ export type WebhookPayloadCampaignBudgetDepleted = {
14704
14876
  timestamp: string;
14705
14877
  };
14706
14878
 
14707
- export type event17 = 'campaign.budget.depleted';
14879
+ export type event18 = 'campaign.budget.depleted';
14708
14880
 
14709
14881
  /**
14710
14882
  * Always `CAMPAIGN`.
14711
14883
  */
14712
- export type level4 = 'CAMPAIGN';
14884
+ export type level5 = 'CAMPAIGN';
14713
14885
 
14714
14886
  /**
14715
14887
  * Webhook payload for comment received events (Instagram, Facebook, Threads, YouTube, LinkedIn, Bluesky, Reddit, TikTok). X/Twitter does NOT fire this event. TikTok events carry only the author id: the comment.update webhook has no username, picture or owner flag.
@@ -14886,7 +15058,7 @@ export type WebhookPayloadComment = {
14886
15058
  timestamp: string;
14887
15059
  };
14888
15060
 
14889
- export type event18 = 'comment.received';
15061
+ export type event19 = 'comment.received';
14890
15062
 
14891
15063
  export type platform15 = 'instagram' | 'facebook' | 'threads' | 'youtube' | 'linkedin' | 'bluesky' | 'reddit' | 'tiktok';
14892
15064
 
@@ -14932,7 +15104,7 @@ export type WebhookPayloadCommerceOrder = {
14932
15104
  };
14933
15105
  };
14934
15106
 
14935
- export type event19 = 'commerce.order.created' | 'commerce.order.updated' | 'commerce.order.refunded';
15107
+ export type event20 = 'commerce.order.created' | 'commerce.order.updated' | 'commerce.order.refunded';
14936
15108
 
14937
15109
  export type type17 = 'order';
14938
15110
 
@@ -14975,7 +15147,7 @@ export type WebhookPayloadCommerceProduct = {
14975
15147
  };
14976
15148
  };
14977
15149
 
14978
- export type event20 = 'commerce.product.created' | 'commerce.product.updated' | 'commerce.product.deleted';
15150
+ export type event21 = 'commerce.product.created' | 'commerce.product.updated' | 'commerce.product.deleted';
14979
15151
 
14980
15152
  export type type18 = 'product';
14981
15153
 
@@ -15015,7 +15187,7 @@ export type WebhookPayloadContactFieldChanged = {
15015
15187
  source: 'api' | 'workflow' | 'automation';
15016
15188
  };
15017
15189
 
15018
- export type event21 = 'contact.field_changed';
15190
+ export type event22 = 'contact.field_changed';
15019
15191
 
15020
15192
  /**
15021
15193
  * Who wrote the field: the API or dashboard, a workflow set_field node, or an automation.
@@ -15047,7 +15219,7 @@ export type WebhookPayloadContactTag = {
15047
15219
  source: 'api' | 'workflow' | 'automation';
15048
15220
  };
15049
15221
 
15050
- export type event22 = 'contact.tag_added' | 'contact.tag_removed';
15222
+ export type event23 = 'contact.tag_added' | 'contact.tag_removed';
15051
15223
 
15052
15224
  /**
15053
15225
  * Who answers a conversation changed under Meta's handover protocol. WhatsApp: Meta
@@ -15093,7 +15265,7 @@ export type WebhookPayloadConversationControlChanged = {
15093
15265
  timestamp: string;
15094
15266
  };
15095
15267
 
15096
- export type event23 = 'conversation.control_changed';
15268
+ export type event24 = 'conversation.control_changed';
15097
15269
 
15098
15270
  /**
15099
15271
  * Who answers now. ai_agent: Meta Business Agent (WhatsApp); app: you; other: another app (a WhatsApp partner, or a Messenger / Instagram receiver such as Page Inbox).
@@ -15152,7 +15324,7 @@ export type WebhookPayloadConversationStarted = {
15152
15324
  timestamp: string;
15153
15325
  };
15154
15326
 
15155
- export type event24 = 'conversation.started';
15327
+ export type event25 = 'conversation.started';
15156
15328
 
15157
15329
  /**
15158
15330
  * Webhook payload for post.external.created / post.external.updated /
@@ -15189,7 +15361,7 @@ export type WebhookPayloadExternalPost = {
15189
15361
  timestamp: string;
15190
15362
  };
15191
15363
 
15192
- export type event25 = 'post.external.created' | 'post.external.updated' | 'post.external.deleted';
15364
+ export type event26 = 'post.external.created' | 'post.external.updated' | 'post.external.deleted';
15193
15365
 
15194
15366
  /**
15195
15367
  * Webhook payload for lead.received events (Meta Lead Gen / Instant Forms).
@@ -15265,7 +15437,7 @@ export type WebhookPayloadLead = {
15265
15437
  timestamp: string;
15266
15438
  };
15267
15439
 
15268
- export type event26 = 'lead.received';
15440
+ export type event27 = 'lead.received';
15269
15441
 
15270
15442
  export type platform16 = 'facebook';
15271
15443
 
@@ -15868,7 +16040,7 @@ export type WebhookPayloadMessage = {
15868
16040
  timestamp: string;
15869
16041
  };
15870
16042
 
15871
- export type event27 = 'message.received';
16043
+ export type event28 = 'message.received';
15872
16044
 
15873
16045
  /**
15874
16046
  * Which Zernio surface produced the message. Always present and
@@ -15934,7 +16106,7 @@ export type WebhookPayloadMessageDeleted = {
15934
16106
  timestamp: string;
15935
16107
  };
15936
16108
 
15937
- export type event28 = 'message.deleted';
16109
+ export type event29 = 'message.deleted';
15938
16110
 
15939
16111
  /**
15940
16112
  * Shared payload for message.delivered, message.read, message.played and
@@ -16002,7 +16174,7 @@ export type WebhookPayloadMessageDeliveryStatus = {
16002
16174
  timestamp: string;
16003
16175
  };
16004
16176
 
16005
- export type event29 = 'message.delivered' | 'message.read' | 'message.played' | 'message.failed';
16177
+ export type event30 = 'message.delivered' | 'message.read' | 'message.played' | 'message.failed';
16006
16178
 
16007
16179
  /**
16008
16180
  * Webhook payload for message.edited events. Fires when the sender
@@ -16045,7 +16217,7 @@ export type WebhookPayloadMessageEdited = {
16045
16217
  timestamp: string;
16046
16218
  };
16047
16219
 
16048
- export type event30 = 'message.edited';
16220
+ export type event31 = 'message.edited';
16049
16221
 
16050
16222
  /**
16051
16223
  * Webhook payload for message sent events (fired when a message is sent via the API, or from the WhatsApp Business app on Coexistence numbers)
@@ -16291,7 +16463,7 @@ export type WebhookPayloadMessageSent = {
16291
16463
  timestamp: string;
16292
16464
  };
16293
16465
 
16294
- export type event31 = 'message.sent';
16466
+ export type event32 = 'message.sent';
16295
16467
 
16296
16468
  /**
16297
16469
  * Every platform whose outgoing messages Zernio observes. sms is absent on purpose: its carrier receipts update delivery status and never raise message.sent.
@@ -16349,7 +16521,7 @@ export type WebhookPayloadPhoneNumberStockAvailable = {
16349
16521
  timestamp: string;
16350
16522
  };
16351
16523
 
16352
- export type event32 = 'phone_number.stock_available';
16524
+ export type event33 = 'phone_number.stock_available';
16353
16525
 
16354
16526
  /**
16355
16527
  * Webhook payload for post events
@@ -16404,7 +16576,7 @@ export type WebhookPayloadPost = {
16404
16576
  timestamp: string;
16405
16577
  };
16406
16578
 
16407
- export type event33 = 'post.scheduled' | 'post.published' | 'post.failed' | 'post.partial' | 'post.cancelled' | 'post.recycled';
16579
+ export type event34 = 'post.scheduled' | 'post.published' | 'post.failed' | 'post.partial' | 'post.cancelled' | 'post.recycled';
16408
16580
 
16409
16581
  /**
16410
16582
  * Webhook payload for the per-platform terminal events
@@ -16528,12 +16700,12 @@ export type WebhookPayloadPostPlatform = {
16528
16700
  timestamp: string;
16529
16701
  };
16530
16702
 
16531
- export type event34 = 'post.platform.published' | 'post.platform.failed' | 'post.platform.deleted' | 'post.tiktok.url_resolved';
16703
+ export type event35 = 'post.platform.published' | 'post.platform.failed' | 'post.platform.deleted' | 'post.tiktok.url_resolved';
16532
16704
 
16533
16705
  /**
16534
16706
  * Terminal status this event fires on. Matches the event suffix.
16535
16707
  */
16536
- export type status40 = 'published' | 'failed' | 'deleted';
16708
+ export type status41 = 'published' | 'failed' | 'deleted';
16537
16709
 
16538
16710
  /**
16539
16711
  * Webhook payload for reaction received events (WhatsApp, Telegram, Slack, Instagram, Facebook Messenger, TikTok)
@@ -16593,7 +16765,7 @@ export type WebhookPayloadReaction = {
16593
16765
  timestamp: string;
16594
16766
  };
16595
16767
 
16596
- export type event35 = 'reaction.received';
16768
+ export type event36 = 'reaction.received';
16597
16769
 
16598
16770
  export type action = 'added' | 'removed';
16599
16771
 
@@ -16672,7 +16844,7 @@ export type WebhookPayloadReferral = {
16672
16844
  timestamp: string;
16673
16845
  };
16674
16846
 
16675
- export type event36 = 'referral.received';
16847
+ export type event37 = 'referral.received';
16676
16848
 
16677
16849
  /**
16678
16850
  * Webhook payload for the review.new event (new review posted on a connected account).
@@ -16704,7 +16876,7 @@ export type WebhookPayloadReviewNew = {
16704
16876
  timestamp: string;
16705
16877
  };
16706
16878
 
16707
- export type event37 = 'review.new';
16879
+ export type event38 = 'review.new';
16708
16880
 
16709
16881
  /**
16710
16882
  * Webhook payload for the review.updated event. Fired when the reviewer edits their
@@ -16742,7 +16914,7 @@ export type WebhookPayloadReviewUpdated = {
16742
16914
  timestamp: string;
16743
16915
  };
16744
16916
 
16745
- export type event38 = 'review.updated';
16917
+ export type event39 = 'review.updated';
16746
16918
 
16747
16919
  export type WebhookPayloadSequenceEnrollment = {
16748
16920
  /**
@@ -16775,7 +16947,7 @@ export type WebhookPayloadSequenceEnrollment = {
16775
16947
  exitReason?: 'completed' | 'replied' | 'manual' | 'failed' | 'unsubscribed';
16776
16948
  };
16777
16949
 
16778
- export type event39 = 'sequence.enrolled' | 'sequence.exited';
16950
+ export type event40 = 'sequence.enrolled' | 'sequence.exited';
16779
16951
 
16780
16952
  /**
16781
16953
  * sequence.exited only. completed: the last step was sent; replied: the contact replied and the sequence exits on reply; manual: unenrolled through the API; failed: the step kept failing to send; unsubscribed: the contact opted out.
@@ -16796,7 +16968,7 @@ export type WebhookPayloadSupportRun = {
16796
16968
  run: SupportRun;
16797
16969
  };
16798
16970
 
16799
- export type event40 = 'support.run.completed' | 'support.run.failed';
16971
+ export type event41 = 'support.run.completed' | 'support.run.failed';
16800
16972
 
16801
16973
  /**
16802
16974
  * Webhook payload for test deliveries
@@ -16817,7 +16989,7 @@ export type WebhookPayloadTest = {
16817
16989
  timestamp: string;
16818
16990
  };
16819
16991
 
16820
- export type event41 = 'webhook.test';
16992
+ export type event42 = 'webhook.test';
16821
16993
 
16822
16994
  /**
16823
16995
  * Webhook payload for `whatsapp.account.alert_received`, forwarded from Meta's
@@ -16869,7 +17041,7 @@ export type WebhookPayloadWhatsAppAccountAlertReceived = {
16869
17041
  timestamp: string;
16870
17042
  };
16871
17043
 
16872
- export type event42 = 'whatsapp.account.alert_received';
17044
+ export type event43 = 'whatsapp.account.alert_received';
16873
17045
 
16874
17046
  export type platform18 = 'whatsapp';
16875
17047
 
@@ -16925,12 +17097,12 @@ export type WebhookPayloadWhatsAppAccountNameStatusUpdated = {
16925
17097
  timestamp: string;
16926
17098
  };
16927
17099
 
16928
- export type event43 = 'whatsapp.account.name_status_updated';
17100
+ export type event44 = 'whatsapp.account.name_status_updated';
16929
17101
 
16930
17102
  /**
16931
17103
  * Normalized from Meta's `decision` (REJECTED -> DECLINED, DEFERRED -> PENDING_REVIEW; the review is still open on DEFERRED, not a rejection).
16932
17104
  */
16933
- export type status41 = 'APPROVED' | 'DECLINED' | 'PENDING_REVIEW';
17105
+ export type status42 = 'APPROVED' | 'DECLINED' | 'PENDING_REVIEW';
16934
17106
 
16935
17107
  /**
16936
17108
  * Webhook payload for `whatsapp.account.quality_updated`. Fired when a connected
@@ -16983,7 +17155,7 @@ export type WebhookPayloadWhatsAppAccountQualityUpdated = {
16983
17155
  timestamp: string;
16984
17156
  };
16985
17157
 
16986
- export type event44 = 'whatsapp.account.quality_updated';
17158
+ export type event45 = 'whatsapp.account.quality_updated';
16987
17159
 
16988
17160
  /**
16989
17161
  * The Meta webhook field that reported the change.
@@ -17059,12 +17231,12 @@ export type WebhookPayloadWhatsAppAccountStatusUpdated = {
17059
17231
  timestamp: string;
17060
17232
  };
17061
17233
 
17062
- export type event45 = 'whatsapp.account.status_updated';
17234
+ export type event46 = 'whatsapp.account.status_updated';
17063
17235
 
17064
17236
  /**
17065
17237
  * `active` only on a reinstatement (DISABLED_UPDATE with ban state REINSTATE).
17066
17238
  */
17067
- export type status42 = 'restricted' | 'active';
17239
+ export type status43 = 'restricted' | 'active';
17068
17240
 
17069
17241
  /**
17070
17242
  * Webhook payload for the `whatsapp.contact.identity_changed` event. Fired when
@@ -17116,7 +17288,7 @@ export type WebhookPayloadWhatsAppContactIdentityChanged = {
17116
17288
  timestamp: string;
17117
17289
  };
17118
17290
 
17119
- export type event46 = 'whatsapp.contact.identity_changed';
17291
+ export type event47 = 'whatsapp.contact.identity_changed';
17120
17292
 
17121
17293
  /**
17122
17294
  * Which Meta signal reported the change. `user_changed_number`: new phone number. `user_changed_user_id` and `user_id_update`: new BSUID.
@@ -17190,7 +17362,7 @@ export type WebhookPayloadWhatsAppTemplateCategoryUpdated = {
17190
17362
  timestamp: string;
17191
17363
  };
17192
17364
 
17193
- export type event47 = 'whatsapp.template.category_updated';
17365
+ export type event48 = 'whatsapp.template.category_updated';
17194
17366
 
17195
17367
  /**
17196
17368
  * `scheduled` is Meta's 24h advance notice of an upcoming
@@ -17272,7 +17444,7 @@ export type WebhookPayloadWhatsAppTemplateStatusUpdated = {
17272
17444
  timestamp: string;
17273
17445
  };
17274
17446
 
17275
- export type event48 = 'whatsapp.template.status_updated';
17447
+ export type event49 = 'whatsapp.template.status_updated';
17276
17448
 
17277
17449
  /**
17278
17450
  * New status. Forwarded verbatim from Meta's `event` field.
@@ -17280,7 +17452,7 @@ export type event48 = 'whatsapp.template.status_updated';
17280
17452
  * request before the template is actually removed.
17281
17453
  *
17282
17454
  */
17283
- export type status43 = 'APPROVED' | 'REJECTED' | 'PENDING' | 'PAUSED' | 'DISABLED' | 'IN_APPEAL' | 'PENDING_DELETION';
17455
+ export type status44 = 'APPROVED' | 'REJECTED' | 'PENDING' | 'PAUSED' | 'DISABLED' | 'IN_APPEAL' | 'PENDING_DELETION';
17284
17456
 
17285
17457
  export type WebhookPayloadWorkflowRun = {
17286
17458
  /**
@@ -17339,12 +17511,12 @@ export type WebhookPayloadWorkflowRun = {
17339
17511
  error?: string;
17340
17512
  };
17341
17513
 
17342
- export type event49 = 'workflow.run.started' | 'workflow.run.completed' | 'workflow.run.failed';
17514
+ export type event50 = 'workflow.run.started' | 'workflow.run.completed' | 'workflow.run.failed';
17343
17515
 
17344
17516
  /**
17345
17517
  * 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.
17346
17518
  */
17347
- export type status44 = 'running' | 'waiting' | 'completed' | 'exited' | 'failed';
17519
+ export type status45 = 'running' | 'waiting' | 'completed' | 'exited' | 'failed';
17348
17520
 
17349
17521
  /**
17350
17522
  * 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.
@@ -17742,7 +17914,7 @@ export type WorkflowExecutionEvent = {
17742
17914
 
17743
17915
  export type action2 = 'execution_started' | 'execution_completed' | 'execution_exited' | 'execution_paused' | 'execution_resumed' | 'node_started' | 'node_completed' | 'node_failed' | 'node_skipped';
17744
17916
 
17745
- export type status45 = 'success' | 'failed' | 'pending';
17917
+ export type status46 = 'success' | 'failed' | 'pending';
17746
17918
 
17747
17919
  /**
17748
17920
  * A node in a workflow graph. `config` shape depends on `type`.
@@ -22334,6 +22506,10 @@ export type CreateInviteTokenData = {
22334
22506
  * Org role granted to the invitee. Defaults to 'member'. 'admin' can manage the team (invite/remove members, change roles and access) and billing, but not ownership transfer or account deletion. 'billing_admin' (displayed as Billing Manager) manages billing only. 'viewer' creates a read-only member who can view everything in their profile scope but cannot perform any content mutation (publish, edit, delete, connect accounts).
22335
22507
  */
22336
22508
  role?: 'admin' | 'member' | 'billing_admin' | 'viewer';
22509
+ /**
22510
+ * Resource groups the invitee may not use once they join (the same groups as restricted API keys). Their dashboard hides those sections and every API request into a disabled group, with any credential they hold, is refused with 403. Omitted or empty means full access. Groups the caller lacks themselves are always added.
22511
+ */
22512
+ disabledResourceGroups?: Array<('publishing' | 'engagement' | 'messages' | 'contacts' | 'analytics' | 'ads' | 'telephony' | 'accounts' | 'billing' | 'webhooks' | 'commerce')>;
22337
22513
  /**
22338
22514
  * Deprecated. Use role 'viewer' instead. When true, the invite is created with role 'viewer'. Cannot be combined with role 'billing_admin' or 'admin'.
22339
22515
  * @deprecated
@@ -22346,6 +22522,7 @@ export type CreateInviteTokenResponse = ({
22346
22522
  token?: string;
22347
22523
  scope?: string;
22348
22524
  invitedProfileIds?: Array<(string)>;
22525
+ disabledResourceGroups?: Array<(string)>;
22349
22526
  expiresAt?: string;
22350
22527
  inviteUrl?: string;
22351
22528
  });
@@ -22383,6 +22560,10 @@ export type GetConnectUrlData = {
22383
22560
  * Instagram Login only (the default loginMethod); ignored elsewhere. Makes Instagram show its login page and ask for the credentials of the account to connect even when another Instagram account is logged in on the device or in the app, and hides the Facebook login option on that page. Use it when the person connecting manages several Instagram accounts on one phone: Instagram otherwise logs in, and converts to a professional account, whichever account is active, before any consent screen. Pair it with expectedUsername to also refuse a wrong account at the end.
22384
22561
  */
22385
22562
  forceReauth?: boolean;
22563
+ /**
22564
+ * Let the user finish on their phone. When `true`, the response also carries `handoff`: show `handoff.url` as a QR code in your app (any QR library), the user scans it and the welcome screen opens on the phone, already carrying this connect, so they log in to the platform there without signing in to anything else. The phone ends on a Zernio result screen telling them to go back to their computer. Learn the outcome by polling `GET /v1/connect/handoffs/{handoffId}` (every 2 to 5 seconds is fine) or from the `account.connected` webhook. Shows the welcome screen with your branding parameters or saved settings. Cannot be combined with `welcome=false`, `headless=true`, `signup`, `redirect=true` or `redirect_url` (400 `INVALID_FIELD_VALUE`). `handoff.url` works for 30 minutes. When the account is re-enabled straight away the response carries `account` instead, as without `handoff`.
22565
+ */
22566
+ handoff?: boolean;
22386
22567
  /**
22387
22568
  * When true, the user is redirected to your redirect_url with raw OAuth data (code, state) instead of Zernio's default account selection UI. Use this to build a custom connect experience.
22388
22569
  */
@@ -22623,6 +22804,7 @@ export type GetConnectUrlResponse = ({
22623
22804
  * State parameter for security (handled automatically)
22624
22805
  */
22625
22806
  state?: string;
22807
+ handoff?: ConnectHandoffLink;
22626
22808
  });
22627
22809
 
22628
22810
  export type GetConnectUrlError = (unknown | ErrorResponse | {
@@ -25418,6 +25600,19 @@ export type DeleteGoogleBusinessReviewReplyError = (ErrorResponse | {
25418
25600
  error?: string;
25419
25601
  });
25420
25602
 
25603
+ export type GetConnectHandoffData = {
25604
+ path: {
25605
+ /**
25606
+ * `handoff.id` from the connect response.
25607
+ */
25608
+ handoffId: string;
25609
+ };
25610
+ };
25611
+
25612
+ export type GetConnectHandoffResponse = (ConnectHandoff);
25613
+
25614
+ export type GetConnectHandoffError = (ErrorResponse | unknown);
25615
+
25421
25616
  export type GetConnectWelcomeScreenResponse = (ConnectWelcomeScreen);
25422
25617
 
25423
25618
  export type GetConnectWelcomeScreenError = (ErrorResponse);
@@ -29094,7 +29289,7 @@ export type CreateWebhookSettingsData = {
29094
29289
  /**
29095
29290
  * Events to subscribe to (at least one required)
29096
29291
  */
29097
- events: Array<('post.scheduled' | 'post.published' | 'post.failed' | 'post.partial' | 'post.cancelled' | 'post.recycled' | 'post.platform.published' | 'post.platform.failed' | 'post.platform.deleted' | 'post.tiktok.url_resolved' | 'post.external.created' | 'post.external.updated' | 'post.external.deleted' | 'account.connected' | 'account.disconnected' | 'account.ads.initial_sync_completed' | 'account.ads.sync_failed' | 'account.ads.sync_recovered' | 'analytics.synced' | 'message.received' | 'conversation.started' | 'conversation.control_changed' | 'call.received' | 'call.ended' | 'call.failed' | 'call.permission_request' | 'message.sent' | 'message.edited' | 'message.deleted' | 'message.delivered' | 'message.read' | 'message.played' | 'message.failed' | 'reaction.received' | 'referral.received' | 'comment.received' | 'review.new' | 'review.updated' | 'lead.received' | 'ad.status_changed' | 'ad.review.approved' | 'ad.review.rejected' | 'ad.delivery_issue' | 'campaign.budget.depleted' | 'ad_account.status_changed' | 'ad.video.processed' | 'whatsapp.template.status_updated' | 'whatsapp.template.category_updated' | 'whatsapp.account.name_status_updated' | 'whatsapp.account.quality_updated' | 'whatsapp.account.status_updated' | 'whatsapp.account.alert_received' | 'whatsapp.contact.identity_changed' | 'whatsapp.automatic_event' | 'whatsapp.number.activated' | 'whatsapp.number.declined' | 'whatsapp.number.action_required' | 'whatsapp.number.verification_required' | 'whatsapp.number.suspended' | 'whatsapp.number.reactivated' | 'whatsapp.number.released' | 'whatsapp.number.kyc_submitted' | 'phone_number.stock_available' | 'verification.approved' | 'verification.failed' | 'api.changelog.published' | 'sms.registration.action_required' | 'sms.registration.status_updated' | 'branded_calling.identity.status_updated' | 'branded_calling.identity.action_required' | 'branded_calling.number.status_updated' | 'rcs.agent.status_updated' | 'commerce.product.created' | 'commerce.product.updated' | 'commerce.product.deleted' | 'commerce.order.created' | 'commerce.order.updated' | 'commerce.order.refunded' | 'contact.tag_added' | 'contact.tag_removed' | 'contact.field_changed' | 'sequence.enrolled' | 'sequence.exited' | 'workflow.run.started' | 'workflow.run.completed' | 'workflow.run.failed' | 'support.run.completed' | 'support.run.failed')>;
29292
+ events: Array<('post.scheduled' | 'post.published' | 'post.failed' | 'post.partial' | 'post.cancelled' | 'post.recycled' | 'post.platform.published' | 'post.platform.failed' | 'post.platform.deleted' | 'post.tiktok.url_resolved' | 'post.external.created' | 'post.external.updated' | 'post.external.deleted' | 'account.connected' | 'account.disconnected' | 'account.ads.initial_sync_completed' | 'account.ads.sync_failed' | 'account.ads.sync_recovered' | 'analytics.synced' | 'message.received' | 'conversation.started' | 'conversation.control_changed' | 'call.received' | 'call.ended' | 'call.failed' | 'call.permission_request' | 'message.sent' | 'message.edited' | 'message.deleted' | 'message.delivered' | 'message.read' | 'message.played' | 'message.failed' | 'reaction.received' | 'referral.received' | 'comment.received' | 'review.new' | 'review.updated' | 'lead.received' | 'ad.status_changed' | 'ad.review.approved' | 'ad.review.rejected' | 'ad.delivery_issue' | 'campaign.budget.depleted' | 'ad_account.status_changed' | 'ad.video.processed' | 'ad_rule.triggered' | 'whatsapp.template.status_updated' | 'whatsapp.template.category_updated' | 'whatsapp.account.name_status_updated' | 'whatsapp.account.quality_updated' | 'whatsapp.account.status_updated' | 'whatsapp.account.alert_received' | 'whatsapp.contact.identity_changed' | 'whatsapp.automatic_event' | 'whatsapp.number.activated' | 'whatsapp.number.declined' | 'whatsapp.number.action_required' | 'whatsapp.number.verification_required' | 'whatsapp.number.suspended' | 'whatsapp.number.reactivated' | 'whatsapp.number.released' | 'whatsapp.number.kyc_submitted' | 'phone_number.stock_available' | 'verification.approved' | 'verification.failed' | 'api.changelog.published' | 'sms.registration.action_required' | 'sms.registration.status_updated' | 'branded_calling.identity.status_updated' | 'branded_calling.identity.action_required' | 'branded_calling.number.status_updated' | 'rcs.agent.status_updated' | 'commerce.product.created' | 'commerce.product.updated' | 'commerce.product.deleted' | 'commerce.order.created' | 'commerce.order.updated' | 'commerce.order.refunded' | 'contact.tag_added' | 'contact.tag_removed' | 'contact.field_changed' | 'sequence.enrolled' | 'sequence.exited' | 'workflow.run.started' | 'workflow.run.completed' | 'workflow.run.failed' | 'support.run.completed' | 'support.run.failed')>;
29098
29293
  /**
29099
29294
  * Enable or disable webhook delivery. Defaults to `true` when omitted.
29100
29295
  */
@@ -29160,7 +29355,7 @@ export type UpdateWebhookSettingsData = {
29160
29355
  /**
29161
29356
  * Events to subscribe to. Must contain at least one event if provided.
29162
29357
  */
29163
- events?: Array<('post.scheduled' | 'post.published' | 'post.failed' | 'post.partial' | 'post.cancelled' | 'post.recycled' | 'post.platform.published' | 'post.platform.failed' | 'post.platform.deleted' | 'post.tiktok.url_resolved' | 'post.external.created' | 'post.external.updated' | 'post.external.deleted' | 'account.connected' | 'account.disconnected' | 'account.ads.initial_sync_completed' | 'account.ads.sync_failed' | 'account.ads.sync_recovered' | 'analytics.synced' | 'message.received' | 'conversation.started' | 'conversation.control_changed' | 'call.received' | 'call.ended' | 'call.failed' | 'call.permission_request' | 'message.sent' | 'message.edited' | 'message.deleted' | 'message.delivered' | 'message.read' | 'message.played' | 'message.failed' | 'reaction.received' | 'referral.received' | 'comment.received' | 'review.new' | 'review.updated' | 'lead.received' | 'ad.status_changed' | 'ad.review.approved' | 'ad.review.rejected' | 'ad.delivery_issue' | 'campaign.budget.depleted' | 'ad_account.status_changed' | 'ad.video.processed' | 'whatsapp.template.status_updated' | 'whatsapp.template.category_updated' | 'whatsapp.account.name_status_updated' | 'whatsapp.account.quality_updated' | 'whatsapp.account.status_updated' | 'whatsapp.account.alert_received' | 'whatsapp.contact.identity_changed' | 'whatsapp.automatic_event' | 'whatsapp.number.activated' | 'whatsapp.number.declined' | 'whatsapp.number.action_required' | 'whatsapp.number.verification_required' | 'whatsapp.number.suspended' | 'whatsapp.number.reactivated' | 'whatsapp.number.released' | 'whatsapp.number.kyc_submitted' | 'phone_number.stock_available' | 'verification.approved' | 'verification.failed' | 'api.changelog.published' | 'sms.registration.action_required' | 'sms.registration.status_updated' | 'branded_calling.identity.status_updated' | 'branded_calling.identity.action_required' | 'branded_calling.number.status_updated' | 'rcs.agent.status_updated' | 'commerce.product.created' | 'commerce.product.updated' | 'commerce.product.deleted' | 'commerce.order.created' | 'commerce.order.updated' | 'commerce.order.refunded' | 'contact.tag_added' | 'contact.tag_removed' | 'contact.field_changed' | 'sequence.enrolled' | 'sequence.exited' | 'workflow.run.started' | 'workflow.run.completed' | 'workflow.run.failed' | 'support.run.completed' | 'support.run.failed')>;
29358
+ events?: Array<('post.scheduled' | 'post.published' | 'post.failed' | 'post.partial' | 'post.cancelled' | 'post.recycled' | 'post.platform.published' | 'post.platform.failed' | 'post.platform.deleted' | 'post.tiktok.url_resolved' | 'post.external.created' | 'post.external.updated' | 'post.external.deleted' | 'account.connected' | 'account.disconnected' | 'account.ads.initial_sync_completed' | 'account.ads.sync_failed' | 'account.ads.sync_recovered' | 'analytics.synced' | 'message.received' | 'conversation.started' | 'conversation.control_changed' | 'call.received' | 'call.ended' | 'call.failed' | 'call.permission_request' | 'message.sent' | 'message.edited' | 'message.deleted' | 'message.delivered' | 'message.read' | 'message.played' | 'message.failed' | 'reaction.received' | 'referral.received' | 'comment.received' | 'review.new' | 'review.updated' | 'lead.received' | 'ad.status_changed' | 'ad.review.approved' | 'ad.review.rejected' | 'ad.delivery_issue' | 'campaign.budget.depleted' | 'ad_account.status_changed' | 'ad.video.processed' | 'ad_rule.triggered' | 'whatsapp.template.status_updated' | 'whatsapp.template.category_updated' | 'whatsapp.account.name_status_updated' | 'whatsapp.account.quality_updated' | 'whatsapp.account.status_updated' | 'whatsapp.account.alert_received' | 'whatsapp.contact.identity_changed' | 'whatsapp.automatic_event' | 'whatsapp.number.activated' | 'whatsapp.number.declined' | 'whatsapp.number.action_required' | 'whatsapp.number.verification_required' | 'whatsapp.number.suspended' | 'whatsapp.number.reactivated' | 'whatsapp.number.released' | 'whatsapp.number.kyc_submitted' | 'phone_number.stock_available' | 'verification.approved' | 'verification.failed' | 'api.changelog.published' | 'sms.registration.action_required' | 'sms.registration.status_updated' | 'branded_calling.identity.status_updated' | 'branded_calling.identity.action_required' | 'branded_calling.number.status_updated' | 'rcs.agent.status_updated' | 'commerce.product.created' | 'commerce.product.updated' | 'commerce.product.deleted' | 'commerce.order.created' | 'commerce.order.updated' | 'commerce.order.refunded' | 'contact.tag_added' | 'contact.tag_removed' | 'contact.field_changed' | 'sequence.enrolled' | 'sequence.exited' | 'workflow.run.started' | 'workflow.run.completed' | 'workflow.run.failed' | 'support.run.completed' | 'support.run.failed')>;
29164
29359
  /**
29165
29360
  * Enable or disable webhook delivery
29166
29361
  */
@@ -29330,7 +29525,7 @@ export type TestWebhookData = {
29330
29525
  /**
29331
29526
  * Send a sample payload of this event instead of `webhook.test`. The sample is marked with `test: true`.
29332
29527
  */
29333
- event?: 'post.scheduled' | 'post.published' | 'post.failed' | 'post.partial' | 'post.cancelled' | 'post.recycled' | 'post.platform.published' | 'post.platform.failed' | 'post.platform.deleted' | 'post.tiktok.url_resolved' | 'post.external.created' | 'post.external.updated' | 'post.external.deleted' | 'account.connected' | 'account.disconnected' | 'account.ads.initial_sync_completed' | 'account.ads.sync_failed' | 'account.ads.sync_recovered' | 'analytics.synced' | 'message.received' | 'message.sent' | 'message.edited' | 'message.deleted' | 'message.delivered' | 'message.read' | 'message.played' | 'message.failed' | 'reaction.received' | 'referral.received' | 'conversation.started' | 'conversation.control_changed' | 'contact.tag_added' | 'contact.tag_removed' | 'contact.field_changed' | 'sequence.enrolled' | 'sequence.exited' | 'workflow.run.started' | 'workflow.run.completed' | 'workflow.run.failed' | 'support.run.completed' | 'support.run.failed' | 'call.received' | 'call.ended' | 'call.failed' | 'call.permission_request' | 'comment.received' | 'review.new' | 'review.updated' | 'ad.status_changed' | 'ad.review.approved' | 'ad.review.rejected' | 'ad.delivery_issue' | 'campaign.budget.depleted' | 'ad_account.status_changed' | 'ad.video.processed' | 'lead.received' | 'whatsapp.template.status_updated' | 'whatsapp.template.category_updated' | 'whatsapp.account.name_status_updated' | 'whatsapp.account.quality_updated' | 'whatsapp.account.status_updated' | 'whatsapp.account.alert_received' | 'whatsapp.contact.identity_changed' | 'whatsapp.number.activated' | 'whatsapp.number.declined' | 'whatsapp.number.action_required' | 'whatsapp.automatic_event' | 'whatsapp.number.verification_required' | 'whatsapp.number.suspended' | 'whatsapp.number.reactivated' | 'whatsapp.number.released' | 'whatsapp.number.kyc_submitted' | 'phone_number.stock_available' | 'sms.registration.action_required' | 'sms.registration.status_updated' | 'branded_calling.identity.status_updated' | 'branded_calling.identity.action_required' | 'branded_calling.number.status_updated' | 'rcs.agent.status_updated' | 'verification.approved' | 'verification.failed' | 'commerce.product.created' | 'commerce.product.updated' | 'commerce.product.deleted' | 'commerce.order.created' | 'commerce.order.updated' | 'commerce.order.refunded' | 'api.changelog.published';
29528
+ event?: 'post.scheduled' | 'post.published' | 'post.failed' | 'post.partial' | 'post.cancelled' | 'post.recycled' | 'post.platform.published' | 'post.platform.failed' | 'post.platform.deleted' | 'post.tiktok.url_resolved' | 'post.external.created' | 'post.external.updated' | 'post.external.deleted' | 'account.connected' | 'account.disconnected' | 'account.ads.initial_sync_completed' | 'account.ads.sync_failed' | 'account.ads.sync_recovered' | 'analytics.synced' | 'message.received' | 'message.sent' | 'message.edited' | 'message.deleted' | 'message.delivered' | 'message.read' | 'message.played' | 'message.failed' | 'reaction.received' | 'referral.received' | 'conversation.started' | 'conversation.control_changed' | 'contact.tag_added' | 'contact.tag_removed' | 'contact.field_changed' | 'sequence.enrolled' | 'sequence.exited' | 'workflow.run.started' | 'workflow.run.completed' | 'workflow.run.failed' | 'support.run.completed' | 'support.run.failed' | 'call.received' | 'call.ended' | 'call.failed' | 'call.permission_request' | 'comment.received' | 'review.new' | 'review.updated' | 'ad.status_changed' | 'ad.review.approved' | 'ad.review.rejected' | 'ad.delivery_issue' | 'campaign.budget.depleted' | 'ad_account.status_changed' | 'ad.video.processed' | 'ad_rule.triggered' | 'lead.received' | 'whatsapp.template.status_updated' | 'whatsapp.template.category_updated' | 'whatsapp.account.name_status_updated' | 'whatsapp.account.quality_updated' | 'whatsapp.account.status_updated' | 'whatsapp.account.alert_received' | 'whatsapp.contact.identity_changed' | 'whatsapp.number.activated' | 'whatsapp.number.declined' | 'whatsapp.number.action_required' | 'whatsapp.automatic_event' | 'whatsapp.number.verification_required' | 'whatsapp.number.suspended' | 'whatsapp.number.reactivated' | 'whatsapp.number.released' | 'whatsapp.number.kyc_submitted' | 'phone_number.stock_available' | 'sms.registration.action_required' | 'sms.registration.status_updated' | 'branded_calling.identity.status_updated' | 'branded_calling.identity.action_required' | 'branded_calling.number.status_updated' | 'rcs.agent.status_updated' | 'verification.approved' | 'verification.failed' | 'commerce.product.created' | 'commerce.product.updated' | 'commerce.product.deleted' | 'commerce.order.created' | 'commerce.order.updated' | 'commerce.order.refunded' | 'api.changelog.published';
29334
29529
  };
29335
29530
  };
29336
29531