@getlatedev/node 0.2.1780 → 0.2.1782

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -36,7 +36,7 @@ module.exports = __toCommonJS(index_exports);
36
36
  // package.json
37
37
  var package_default = {
38
38
  name: "@getlatedev/node",
39
- version: "0.2.1780",
39
+ version: "0.2.1782",
40
40
  description: "The official Node.js library for the Zernio API",
41
41
  main: "dist/index.js",
42
42
  module: "dist/index.mjs",
package/dist/index.mjs CHANGED
@@ -5,7 +5,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
5
5
  // package.json
6
6
  var package_default = {
7
7
  name: "@getlatedev/node",
8
- version: "0.2.1780",
8
+ version: "0.2.1782",
9
9
  description: "The official Node.js library for the Zernio API",
10
10
  main: "dist/index.js",
11
11
  module: "dist/index.mjs",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@getlatedev/node",
3
- "version": "0.2.1780",
3
+ "version": "0.2.1782",
4
4
  "description": "The official Node.js library for the Zernio API",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -22475,7 +22475,7 @@ export const sendWhatsAppConversion = <ThrowOnError extends boolean = false>(opt
22475
22475
  *
22476
22476
  * `destinations` puts two or three of them on one ad set and lets Meta pick the app per viewer.
22477
22477
  *
22478
- * The ad set is created with the matching destination_type and CONVERSATIONS optimization. The campaign objective defaults to OUTCOME_ENGAGEMENT.
22478
+ * The ad set is created with the matching destination_type and CONVERSATIONS optimization by default (see `optimizationGoal` for LEAD_GENERATION). The campaign objective defaults to OUTCOME_ENGAGEMENT (OUTCOME_LEADS with LEAD_GENERATION).
22479
22479
  *
22480
22480
  * This endpoint supersedes POST /v1/ads/ctwa (deprecated, equivalent to `destination: whatsapp`).
22481
22481
  *
@@ -7943,6 +7943,39 @@ export type CampaignSubmissionFlag = {
7943
7943
 
7944
7944
  export type code = 'duplicate_media' | 'duplicate_post' | 'view_spike' | 'linked_accounts' | 'cross_operator' | 'unreachable' | 'post_deleted' | 'account_restricted' | 'low_authenticity' | 'x_read_cap' | 'paid_views' | 'organic_unverified';
7945
7945
 
7946
+ /**
7947
+ * The outcome of the latest chat history request Zernio sent Meta for a WhatsApp coexistence number, read from the account (not a live probe).
7948
+ */
7949
+ export type CoexistenceHistorySync = {
7950
+ /**
7951
+ * - `requested`: Meta accepted the request and has not sent history yet, which can take a while.
7952
+ * - `imported`: Meta sent chat history to this account, including history a reconnect kept.
7953
+ * - `declined`: the business chose not to share its chat history in Meta's window.
7954
+ * - `already_synced`: Meta refused the request because an earlier connection already used the number's one history share. Disconnecting inside the WhatsApp Business app (Settings > Account > Business Platform), then connecting again gets a new import.
7955
+ * - `refused`: Meta refused it for another reason.
7956
+ *
7957
+ */
7958
+ status?: 'requested' | 'imported' | 'declined' | 'already_synced' | 'refused';
7959
+ /**
7960
+ * The id of the last history request Meta accepted, kept across reconnects. Quote it in a Meta support case.
7961
+ */
7962
+ requestId?: (string) | null;
7963
+ /**
7964
+ * When Meta refused the latest request. Null when it was accepted.
7965
+ */
7966
+ refusedAt?: (string) | null;
7967
+ };
7968
+
7969
+ /**
7970
+ * - `requested`: Meta accepted the request and has not sent history yet, which can take a while.
7971
+ * - `imported`: Meta sent chat history to this account, including history a reconnect kept.
7972
+ * - `declined`: the business chose not to share its chat history in Meta's window.
7973
+ * - `already_synced`: Meta refused the request because an earlier connection already used the number's one history share. Disconnecting inside the WhatsApp Business app (Settings > Account > Business Platform), then connecting again gets a new import.
7974
+ * - `refused`: Meta refused it for another reason.
7975
+ *
7976
+ */
7977
+ export type status24 = 'requested' | 'imported' | 'declined' | 'already_synced' | 'refused';
7978
+
7946
7979
  /**
7947
7980
  * The media on a comment or reply, one per comment (the first item when the platform returns several).
7948
7981
  * `type` is the platform's own media kind:
@@ -8292,7 +8325,7 @@ export type source = 'comment' | 'live_comment' | 'story_reply' | 'story_mention
8292
8325
  * - 'gated': the follow-gate confirmation DM went out and we are waiting for the tap. It flips to 'sent' or 'skipped' when they tap.
8293
8326
  * - 'skipped': also covers repeatPolicy, cooldown and dedupeSameTextHours suppressions, with the reason in error.
8294
8327
  */
8295
- export type status24 = 'pending' | 'sent' | 'failed' | 'skipped' | 'gated';
8328
+ export type status25 = 'pending' | 'sent' | 'failed' | 'skipped' | 'gated';
8296
8329
 
8297
8330
  /**
8298
8331
  * How the audience rule resolved. Null on automations without one.
@@ -8601,7 +8634,7 @@ export type method3 = 'code' | 'automatic';
8601
8634
 
8602
8635
  export type type14 = 'percentage' | 'fixed_amount' | 'free_shipping' | 'buy_x_get_y' | 'app';
8603
8636
 
8604
- export type status25 = 'active' | 'scheduled' | 'expired';
8637
+ export type status26 = 'active' | 'scheduled' | 'expired';
8605
8638
 
8606
8639
  export type CommerceDraftOrder = {
8607
8640
  id?: string;
@@ -8651,7 +8684,7 @@ export type CommerceDraftOrder = {
8651
8684
  completedAt?: (string) | null;
8652
8685
  };
8653
8686
 
8654
- export type status26 = 'open' | 'invoice_sent' | 'completed';
8687
+ export type status27 = 'open' | 'invoice_sent' | 'completed';
8655
8688
 
8656
8689
  export type CommerceImage = {
8657
8690
  /**
@@ -8706,7 +8739,7 @@ export type CommerceMarket = {
8706
8739
  type?: string;
8707
8740
  };
8708
8741
 
8709
- export type status27 = 'active' | 'draft';
8742
+ export type status28 = 'active' | 'draft';
8710
8743
 
8711
8744
  export type CommerceMenu = {
8712
8745
  id?: string;
@@ -9350,7 +9383,7 @@ export type ConnectHandoff = {
9350
9383
  } | null;
9351
9384
  };
9352
9385
 
9353
- export type status28 = 'waiting' | 'opened' | 'connected' | 'failed' | 'expired';
9386
+ export type status29 = 'waiting' | 'opened' | 'connected' | 'failed' | 'expired';
9354
9387
 
9355
9388
  /**
9356
9389
  * Only with `handoff=true`: the link to show as a QR code.
@@ -9919,7 +9952,7 @@ export type visibility3 = 'full' | 'limited' | 'none';
9919
9952
  */
9920
9953
  export type scanMode = 'static' | 'rendered';
9921
9954
 
9922
- export type status29 = 'detected' | 'likely' | 'not-visible';
9955
+ export type status30 = 'detected' | 'likely' | 'not-visible';
9923
9956
 
9924
9957
  export type googleConsentMode = 'v2' | 'v1' | 'not-seen';
9925
9958
 
@@ -9963,7 +9996,7 @@ export type ConversionDestination = {
9963
9996
  * For LinkedIn, `inactive` means the rule is soft-deleted (`enabled: false`).
9964
9997
  *
9965
9998
  */
9966
- export type status30 = 'active' | 'inactive';
9999
+ export type status31 = 'active' | 'inactive';
9967
10000
 
9968
10001
  /**
9969
10002
  * A single conversion event to relay to the ad platform. All PII fields
@@ -10720,7 +10753,7 @@ export type CreatorCampaign = {
10720
10753
  /**
10721
10754
  * draft until activated; active accepts submissions and accrues; paused stops new submissions; closed is final.
10722
10755
  */
10723
- export type status31 = 'draft' | 'active' | 'paused' | 'closed';
10756
+ export type status32 = 'draft' | 'active' | 'paused' | 'closed';
10724
10757
 
10725
10758
  /**
10726
10759
  * Same as economics.type.
@@ -11296,7 +11329,7 @@ export type CreatorPortalPayoutSetup = {
11296
11329
  */
11297
11330
  export type mode5 = 'none' | 'external' | 'treasury';
11298
11331
 
11299
- export type status32 = 'not_started' | 'pending' | 'enabled' | 'not_applicable';
11332
+ export type status33 = 'not_started' | 'pending' | 'enabled' | 'not_applicable';
11300
11333
 
11301
11334
  export type CreatorPortalReferral = {
11302
11335
  /**
@@ -12101,7 +12134,10 @@ export type CtwaAdRequestBody = {
12101
12134
  */
12102
12135
  advantageAudience?: 0 | 1;
12103
12136
  /**
12104
- * Defaults to `OUTCOME_ENGAGEMENT`. `OUTCOME_SALES` and `OUTCOME_LEADS` require
12137
+ * Defaults to `OUTCOME_ENGAGEMENT` on POST /v1/ads/ctwa and POST /v1/ads/messaging,
12138
+ * and to `OUTCOME_LEADS` on POST /v1/ads/call and on POST /v1/ads/messaging with
12139
+ * `optimizationGoal: LEAD_GENERATION` (which accepts only `OUTCOME_LEADS`).
12140
+ * `OUTCOME_SALES` and `OUTCOME_LEADS` require
12105
12141
  * additional account configuration (Dataset linked to the WABA
12106
12142
  * for sales) and may be rejected by Meta if missing.
12107
12143
  *
@@ -12146,8 +12182,9 @@ export type CtwaAdRequestBody = {
12146
12182
  * `LOWEST_COST_WITHOUT_CAP` (auto-bid) when omitted.
12147
12183
  * `LOWEST_COST_WITH_BID_CAP` and `COST_CAP` require
12148
12184
  * `bidAmount`. `LOWEST_COST_WITH_MIN_ROAS` requires
12149
- * `roasAverageFloor`. CTWA's `optimization_goal` is fixed to
12150
- * `CONVERSATIONS`, but the bid strategy is independent.
12185
+ * `roasAverageFloor`. The ad set `optimization_goal` comes from the endpoint
12186
+ * (`CONVERSATIONS` on POST /v1/ads/ctwa, `QUALITY_CALL` on POST /v1/ads/call, the
12187
+ * `optimizationGoal` field on POST /v1/ads/messaging); the bid strategy is independent.
12151
12188
  *
12152
12189
  */
12153
12190
  bidStrategy?: 'LOWEST_COST_WITHOUT_CAP' | 'LOWEST_COST_WITH_BID_CAP' | 'COST_CAP' | 'LOWEST_COST_WITH_MIN_ROAS';
@@ -12237,7 +12274,10 @@ export type incomeTier = 'top_5' | 'top_10' | 'top_10_25' | 'top_25_50';
12237
12274
  export type advantageAudience = 0 | 1;
12238
12275
 
12239
12276
  /**
12240
- * Defaults to `OUTCOME_ENGAGEMENT`. `OUTCOME_SALES` and `OUTCOME_LEADS` require
12277
+ * Defaults to `OUTCOME_ENGAGEMENT` on POST /v1/ads/ctwa and POST /v1/ads/messaging,
12278
+ * and to `OUTCOME_LEADS` on POST /v1/ads/call and on POST /v1/ads/messaging with
12279
+ * `optimizationGoal: LEAD_GENERATION` (which accepts only `OUTCOME_LEADS`).
12280
+ * `OUTCOME_SALES` and `OUTCOME_LEADS` require
12241
12281
  * additional account configuration (Dataset linked to the WABA
12242
12282
  * for sales) and may be rejected by Meta if missing.
12243
12283
  *
@@ -12250,7 +12290,7 @@ export type objective = 'OUTCOME_ENGAGEMENT' | 'OUTCOME_SALES' | 'OUTCOME_LEADS'
12250
12290
  * `adSetId`, the new ads themselves.
12251
12291
  *
12252
12292
  */
12253
- export type status33 = 'ACTIVE' | 'PAUSED';
12293
+ export type status34 = 'ACTIVE' | 'PAUSED';
12254
12294
 
12255
12295
  /**
12256
12296
  * Campaign-level status, same semantics as `POST /v1/ads/create`. Defaults to `status`.
@@ -12278,8 +12318,9 @@ export type adSetStatus = 'ACTIVE' | 'PAUSED';
12278
12318
  * `LOWEST_COST_WITHOUT_CAP` (auto-bid) when omitted.
12279
12319
  * `LOWEST_COST_WITH_BID_CAP` and `COST_CAP` require
12280
12320
  * `bidAmount`. `LOWEST_COST_WITH_MIN_ROAS` requires
12281
- * `roasAverageFloor`. CTWA's `optimization_goal` is fixed to
12282
- * `CONVERSATIONS`, but the bid strategy is independent.
12321
+ * `roasAverageFloor`. The ad set `optimization_goal` comes from the endpoint
12322
+ * (`CONVERSATIONS` on POST /v1/ads/ctwa, `QUALITY_CALL` on POST /v1/ads/call, the
12323
+ * `optimizationGoal` field on POST /v1/ads/messaging); the bid strategy is independent.
12283
12324
  *
12284
12325
  */
12285
12326
  export type bidStrategy = 'LOWEST_COST_WITHOUT_CAP' | 'LOWEST_COST_WITH_BID_CAP' | 'COST_CAP' | 'LOWEST_COST_WITH_MIN_ROAS';
@@ -12664,7 +12705,7 @@ export type privacy_level = 2;
12664
12705
  /**
12665
12706
  * 1=SCHEDULED, 2=ACTIVE, 3=COMPLETED, 4=CANCELED
12666
12707
  */
12667
- export type status34 = 1 | 2 | 3 | 4;
12708
+ export type status35 = 1 | 2 | 3 | 4;
12668
12709
 
12669
12710
  /**
12670
12711
  * 1=STAGE_INSTANCE, 2=VOICE, 3=EXTERNAL
@@ -12838,7 +12879,7 @@ export type EmailClean = {
12838
12879
  } | null;
12839
12880
  };
12840
12881
 
12841
- export type status35 = 'stripped' | 'unchanged' | 'fallback';
12882
+ export type status36 = 'stripped' | 'unchanged' | 'fallback';
12842
12883
 
12843
12884
  /**
12844
12885
  * A draft in the mailbox. Carries the message fields; `id` is the draft id the drafts endpoints take. Store `id`, not `messageId`.
@@ -13465,7 +13506,7 @@ export type EventCorrection = {
13465
13506
  /**
13466
13507
  * `corrected`: the platform changed its count. `not_supported`: the platform has no API to change a conversion it already counted. `failed`: see `error`.
13467
13508
  */
13468
- export type status36 = 'corrected' | 'not_supported' | 'failed';
13509
+ export type status37 = 'corrected' | 'not_supported' | 'failed';
13469
13510
 
13470
13511
  export type EventDestination = {
13471
13512
  /**
@@ -13992,7 +14033,7 @@ export type FeedbackReceipt = {
13992
14033
  duplicate?: boolean;
13993
14034
  };
13994
14035
 
13995
- export type status37 = 'received';
14036
+ export type status38 = 'received';
13996
14037
 
13997
14038
  /**
13998
14039
  * A file or folder in a connected Google Drive or OneDrive. Ids are the provider's own.
@@ -14357,7 +14398,7 @@ export type GohighlevelAudienceSync = {
14357
14398
  }>;
14358
14399
  };
14359
14400
 
14360
- export type status38 = 'syncing' | 'ready' | 'error';
14401
+ export type status39 = 'syncing' | 'ready' | 'error';
14361
14402
 
14362
14403
  export type GohighlevelAudienceSyncOverview = {
14363
14404
  /**
@@ -14493,7 +14534,7 @@ export type GoogleAdLabel = {
14493
14534
  description?: (string) | null;
14494
14535
  };
14495
14536
 
14496
- export type status39 = 'ENABLED' | 'REMOVED' | 'UNKNOWN';
14537
+ export type status40 = 'ENABLED' | 'REMOVED' | 'UNKNOWN';
14497
14538
 
14498
14539
  /**
14499
14540
  * At least one id across the four target lists. Up to 1000 ids per list.
@@ -14596,7 +14637,7 @@ export type GoogleAdsManagerLink = {
14596
14637
  /**
14597
14638
  * Status the link has after this call.
14598
14639
  */
14599
- export type status40 = 'PENDING' | 'ACTIVE' | 'REFUSED' | 'CANCELED' | 'INACTIVE';
14640
+ export type status41 = 'PENDING' | 'ACTIVE' | 'REFUSED' | 'CANCELED' | 'INACTIVE';
14600
14641
 
14601
14642
  export type GoogleAdsPlatformQueryBody = {
14602
14643
  /**
@@ -14630,7 +14671,7 @@ export type GoogleAdsUserAccessInvitation = {
14630
14671
 
14631
14672
  export type accessRole = 'ADMIN' | 'STANDARD' | 'READ_ONLY' | 'EMAIL_ONLY' | 'UNKNOWN';
14632
14673
 
14633
- export type status41 = 'PENDING' | 'DECLINED' | 'EXPIRED' | 'UNKNOWN';
14674
+ export type status42 = 'PENDING' | 'DECLINED' | 'EXPIRED' | 'UNKNOWN';
14634
14675
 
14635
14676
  export type GoogleAdsUserAccessInvitationResult = {
14636
14677
  customerId?: string;
@@ -14654,7 +14695,7 @@ export type GoogleAdsUserAccessInvitationResult = {
14654
14695
  /**
14655
14696
  * PENDING once the email is sent; PENDING_APPROVAL while Google waits for a second admin's multi-party approval.
14656
14697
  */
14657
- export type status42 = 'PENDING' | 'PENDING_APPROVAL';
14698
+ export type status43 = 'PENDING' | 'PENDING_APPROVAL';
14658
14699
 
14659
14700
  export type GoogleAdsUserInvitationApproval = {
14660
14701
  /**
@@ -15653,7 +15694,7 @@ export type GoogleRecommendationResult = {
15653
15694
  error?: string;
15654
15695
  };
15655
15696
 
15656
- export type status43 = 'applied' | 'dismissed' | 'failed';
15697
+ export type status44 = 'applied' | 'dismissed' | 'failed';
15657
15698
 
15658
15699
  export type GoogleRsaDescription = {
15659
15700
  text: string;
@@ -16019,7 +16060,7 @@ export type ImessageSandboxContact = {
16019
16060
  createdAt?: string;
16020
16061
  };
16021
16062
 
16022
- export type status44 = 'pending' | 'active';
16063
+ export type status45 = 'pending' | 'active';
16023
16064
 
16024
16065
  /**
16025
16066
  * An iMessage sender registered as an account on a profile.
@@ -16094,7 +16135,7 @@ export type region = 'US' | 'GB';
16094
16135
  /**
16095
16136
  * `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.
16096
16137
  */
16097
- export type status45 = 'ordering' | 'awaiting_payment' | 'activating' | 'active' | 'suspended' | 'canceled' | 'failed';
16138
+ export type status46 = 'ordering' | 'awaiting_payment' | 'activating' | 'active' | 'suspended' | 'canceled' | 'failed';
16098
16139
 
16099
16140
  /**
16100
16141
  * When inbound messages and comments were first and last seen for the account. Only events matched to this account count. WhatsApp delivery statuses for outbound messages do not count, so the stamps of a number that only sends stay null. The stamps reset on every connect.
@@ -16393,7 +16434,7 @@ export type InboxWebhookConversation = {
16393
16434
  contactId?: string;
16394
16435
  };
16395
16436
 
16396
- export type status46 = 'active' | 'archived';
16437
+ export type status47 = 'active' | 'archived';
16397
16438
 
16398
16439
  /**
16399
16440
  * The conversation object included in conversation lifecycle webhook payloads (conversation.started, conversation.control_changed).
@@ -18991,7 +19032,7 @@ export type OAuthApp = {
18991
19032
  /**
18992
19033
  * `ok`: the platform accepted the keys at the last check. `unchecked`: the check could not reach a verdict (see lastError). `invalid`: the platform rejected the keys; connects and token refreshes through this app will fail until the secret is rotated.
18993
19034
  */
18994
- export type status47 = 'ok' | 'unchecked' | 'invalid';
19035
+ export type status48 = 'ok' | 'unchecked' | 'invalid';
18995
19036
 
18996
19037
  export type OAuthAppSetup = {
18997
19038
  platform: string;
@@ -19067,7 +19108,7 @@ export type OrgConnection = {
19067
19108
  };
19068
19109
  };
19069
19110
 
19070
- export type status48 = 'pending' | 'active' | 'revoked';
19111
+ export type status49 = 'pending' | 'active' | 'revoked';
19071
19112
 
19072
19113
  export type type28 = 'google_domain_wide_delegation' | 'microsoft_admin_consent';
19073
19114
 
@@ -19258,7 +19299,7 @@ export type OwnedPhoneNumber = {
19258
19299
  }>;
19259
19300
  };
19260
19301
 
19261
- export type status49 = 'pending_payment' | 'pending_regulatory' | 'regulatory_declined' | 'provisioning' | 'verifying' | 'active' | 'suspended' | 'releasing' | 'released';
19302
+ export type status50 = 'pending_payment' | 'pending_regulatory' | 'regulatory_declined' | 'provisioning' | 'verifying' | 'active' | 'suspended' | 'releasing' | 'released';
19262
19303
 
19263
19304
  export type metaVerificationStatus = 'pending' | 'code_requested' | 'verified' | 'expired';
19264
19305
 
@@ -19431,7 +19472,7 @@ export type PayoutBatch = {
19431
19472
  /**
19432
19473
  * `awaiting_payment` until the card charge succeeds (3D Secure included); `paying` during the 7-day card hold and while transfers go out; then `paid`, `partially_failed` (some items failed or were skipped), `failed` (the card was declined, or none paid) or `expired` (the payment was cancelled unpaid, every amount is payable again).
19433
19474
  */
19434
- export type status50 = 'awaiting_payment' | 'paying' | 'paid' | 'partially_failed' | 'failed' | 'expired';
19475
+ export type status51 = 'awaiting_payment' | 'paying' | 'paid' | 'partially_failed' | 'failed' | 'expired';
19435
19476
 
19436
19477
  export type method4 = 'card';
19437
19478
 
@@ -19474,7 +19515,7 @@ export type PayoutBatchItem = {
19474
19515
  /**
19475
19516
  * `skipped`: payout setup not finished, or the card payment never completed. `failed`: Stripe refused the transfer. `refunded`: failed or skipped after the card hold; its payout, fee and VAT on the fee went back to the card through a credit note. The amount is payable again in every case.
19476
19517
  */
19477
- export type status51 = 'pending' | 'paid' | 'failed' | 'skipped' | 'refunded';
19518
+ export type status52 = 'pending' | 'paid' | 'failed' | 'skipped' | 'refunded';
19478
19519
 
19479
19520
  export type PhoneNumberStockWatch = {
19480
19521
  id: string;
@@ -19592,7 +19633,7 @@ export type PlatformAnalytics = {
19592
19633
  isOwner?: (boolean) | null;
19593
19634
  };
19594
19635
 
19595
- export type status52 = 'published' | 'failed';
19636
+ export type status53 = 'published' | 'failed';
19596
19637
 
19597
19638
  /**
19598
19639
  * Sync state of analytics for this platform
@@ -19890,7 +19931,7 @@ export type Post = {
19890
19931
  /**
19891
19932
  * `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.
19892
19933
  */
19893
- export type status53 = 'draft' | 'pending_approval' | 'scheduled' | 'publishing' | 'published' | 'partial' | 'failed' | 'cancelled';
19934
+ export type status54 = 'draft' | 'pending_approval' | 'scheduled' | 'publishing' | 'published' | 'partial' | 'failed' | 'cancelled';
19894
19935
 
19895
19936
  export type visibility5 = 'public' | 'private' | 'unlisted';
19896
19937
 
@@ -20580,7 +20621,7 @@ export type Product = {
20580
20621
  publishedAt?: (string) | null;
20581
20622
  };
20582
20623
 
20583
- export type status54 = 'active' | 'draft' | 'archived';
20624
+ export type status55 = 'active' | 'draft' | 'archived';
20584
20625
 
20585
20626
  export type ProductImage = {
20586
20627
  url?: string;
@@ -20880,7 +20921,7 @@ export type RcsAgent = {
20880
20921
  createdAt?: string;
20881
20922
  };
20882
20923
 
20883
- export type status55 = 'requested' | 'changes_requested' | 'brand_vetting' | 'agent_review' | 'testing' | 'launch_review' | 'launching' | 'live' | 'rejected' | 'deactivated';
20924
+ export type status56 = 'requested' | 'changes_requested' | 'brand_vetting' | 'agent_review' | 'testing' | 'launch_review' | 'launching' | 'live' | 'rejected' | 'deactivated';
20884
20925
 
20885
20926
  export type useCase = 'MULTI_USE' | 'PROMOTIONAL' | 'TRANSACTIONAL' | 'OTP';
20886
20927
 
@@ -20932,7 +20973,7 @@ export type RcsBrand = RcsBrandInput & {
20932
20973
  /**
20933
20974
  * draft = not filed yet (still editable).
20934
20975
  */
20935
- export type status56 = 'draft' | 'vetting' | 'verified' | 'rejected';
20976
+ export type status57 = 'draft' | 'vetting' | 'verified' | 'rejected';
20936
20977
 
20937
20978
  export type RcsBrandInput = {
20938
20979
  displayName: string;
@@ -21019,7 +21060,7 @@ export type RcsCarrierApproval = {
21019
21060
 
21020
21061
  export type scope3 = 'carrier' | 'hub' | 'bot';
21021
21062
 
21022
- export type status57 = 'PENDING' | 'SUBMITTED' | 'APPROVED' | 'REJECTED';
21063
+ export type status58 = 'PENDING' | 'SUBMITTED' | 'APPROVED' | 'REJECTED';
21023
21064
 
21024
21065
  /**
21025
21066
  * Message content. `suggestions` (max 11) render as chips under the message.
@@ -21702,7 +21743,7 @@ export type ScheduledEmail = {
21702
21743
  createdAt?: string;
21703
21744
  };
21704
21745
 
21705
- export type status58 = 'scheduled' | 'sending' | 'sent' | 'failed' | 'cancelled';
21746
+ export type status59 = 'scheduled' | 'sending' | 'sent' | 'failed' | 'cancelled';
21706
21747
 
21707
21748
  export type SendEmailRequest = {
21708
21749
  accountId: string;
@@ -22322,7 +22363,7 @@ export type SupportRun = {
22322
22363
  /**
22323
22364
  * 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.
22324
22365
  */
22325
- export type status59 = 'queued' | 'running' | 'completed' | 'needs_human' | 'failed';
22366
+ export type status60 = 'queued' | 'running' | 'completed' | 'needs_human' | 'failed';
22326
22367
 
22327
22368
  /**
22328
22369
  * Why the run stopped. Null while it is in progress.
@@ -23290,7 +23331,7 @@ export type TrackingSite = {
23290
23331
  updatedAt?: string;
23291
23332
  };
23292
23333
 
23293
- export type status60 = 'active' | 'paused' | 'removing';
23334
+ export type status61 = 'active' | 'paused' | 'removing';
23294
23335
 
23295
23336
  /**
23296
23337
  * How the tag is installed. `snippet` means you paste it.
@@ -23609,7 +23650,7 @@ export type TrackingWindow = {
23609
23650
  } | null;
23610
23651
  };
23611
23652
 
23612
- export type status61 = 'open' | 'completing' | 'completed' | 'cancelled';
23653
+ export type status62 = 'open' | 'completing' | 'completed' | 'cancelled';
23613
23654
 
23614
23655
  /**
23615
23656
  * How the window closed. Null while it is open.
@@ -23703,7 +23744,7 @@ export type purpose = 'balance' | 'payout_batch';
23703
23744
  /**
23704
23745
  * `pending` until the card is charged (or 3D Secure is finished) and credited. `expired` means it ended unpaid: cancelled, or 3D Secure left unfinished for 30 minutes. Only `pending` counts toward pendingTopupCents.
23705
23746
  */
23706
- export type status62 = 'pending' | 'succeeded' | 'failed' | 'expired';
23747
+ export type status63 = 'pending' | 'succeeded' | 'failed' | 'expired';
23707
23748
 
23708
23749
  export type TreasuryTransfer = {
23709
23750
  id?: string;
@@ -23744,7 +23785,7 @@ export type TreasuryTransfer = {
23744
23785
 
23745
23786
  export type destinationType = 'creator' | 'ad_account';
23746
23787
 
23747
- export type status63 = 'pending' | 'paid' | 'failed' | 'reversed';
23788
+ export type status64 = 'pending' | 'paid' | 'failed' | 'reversed';
23748
23789
 
23749
23790
  /**
23750
23791
  * X-specific post options. The article field creates a long-form X Article and is mutually exclusive with tweet media and tweet-only options. Geo-restriction applies at the media level: media is hidden outside the specified countries while tweet text remains visible.
@@ -23935,7 +23976,7 @@ export type UploadTokenResponse = {
23935
23976
  status?: 'pending' | 'completed' | 'expired';
23936
23977
  };
23937
23978
 
23938
- export type status64 = 'pending' | 'completed' | 'expired';
23979
+ export type status65 = 'pending' | 'completed' | 'expired';
23939
23980
 
23940
23981
  export type UploadTokenStatusResponse = {
23941
23982
  token?: string;
@@ -24481,7 +24522,7 @@ export type Verification = {
24481
24522
  resend?: boolean;
24482
24523
  };
24483
24524
 
24484
- export type status65 = 'pending' | 'approved' | 'expired' | 'max_attempts_reached' | 'canceled' | 'delivery_failed';
24525
+ export type status66 = 'pending' | 'approved' | 'expired' | 'max_attempts_reached' | 'canceled' | 'delivery_failed';
24485
24526
 
24486
24527
  export type channel6 = 'sms' | 'whatsapp';
24487
24528
 
@@ -24740,7 +24781,7 @@ export type WebhookLog = {
24740
24781
  /**
24741
24782
  * Delivery outcome
24742
24783
  */
24743
- export type status66 = 'success' | 'failed';
24784
+ export type status67 = 'success' | 'failed';
24744
24785
 
24745
24786
  /**
24746
24787
  * Webhook payload for `account.ads.initial_sync_completed` events.
@@ -24854,7 +24895,7 @@ export type event = 'account.ads.initial_sync_completed';
24854
24895
  /**
24855
24896
  * Overall outcome of the initial sync.
24856
24897
  */
24857
- export type status67 = 'success' | 'failure';
24898
+ export type status68 = 'success' | 'failure';
24858
24899
 
24859
24900
  /**
24860
24901
  * Stable category for UX branching. New values may be added; existing ones are stable.
@@ -25537,7 +25578,7 @@ export type WebhookPayloadAdReview = {
25537
25578
 
25538
25579
  export type event14 = 'ad.review.approved' | 'ad.review.rejected';
25539
25580
 
25540
- export type status68 = 'approved' | 'rejected';
25581
+ export type status69 = 'approved' | 'rejected';
25541
25582
 
25542
25583
  /**
25543
25584
  * Webhook payload for the `ad_rule.triggered` event.
@@ -26108,7 +26149,7 @@ export type event20 = 'ad.video.processed';
26108
26149
  /**
26109
26150
  * `ready`: usable as `video.id` on the create endpoints. `error`: Meta could not process it; upload again.
26110
26151
  */
26111
- export type status69 = 'ready' | 'error';
26152
+ export type status70 = 'ready' | 'error';
26112
26153
 
26113
26154
  /**
26114
26155
  * Webhook payload for `analytics.synced`. Fired once per connected account each time its analytics sync cycle completes successfully. Poll-driven (roughly hourly per account), not real-time, and never fired for a skipped or failed cycle.
@@ -26249,7 +26290,7 @@ export type WebhookPayloadAutomationAction = {
26249
26290
 
26250
26291
  export type event23 = 'automation.action.applied' | 'automation.action.failed' | 'automation.action.unknown';
26251
26292
 
26252
- export type status70 = 'applied' | 'skipped' | 'failed' | 'unknown';
26293
+ export type status71 = 'applied' | 'skipped' | 'failed' | 'unknown';
26253
26294
 
26254
26295
  /**
26255
26296
  * Webhook payload for `automation.alert.opened`, `automation.alert.escalated` and `automation.alert.resolved`: an alert episode of an automation with a lifecycle (an ad rule's `lifecycle`).
@@ -30094,7 +30135,7 @@ export type event79 = 'post.platform.published' | 'post.platform.failed' | 'post
30094
30135
  /**
30095
30136
  * Terminal status this event fires on. Matches the event suffix.
30096
30137
  */
30097
- export type status71 = 'published' | 'failed' | 'deleted';
30138
+ export type status72 = 'published' | 'failed' | 'deleted';
30098
30139
 
30099
30140
  /**
30100
30141
  * Webhook payload for `post.tracking_completed`. Fired once when a post's tracking window ends and its final analytics read has run.
@@ -30684,7 +30725,7 @@ export type event92 = 'whatsapp.account.name_status_updated';
30684
30725
  /**
30685
30726
  * Normalized from Meta's `decision` (REJECTED -> DECLINED, DEFERRED -> PENDING_REVIEW; the review is still open on DEFERRED, not a rejection).
30686
30727
  */
30687
- export type status72 = 'APPROVED' | 'DECLINED' | 'PENDING_REVIEW';
30728
+ export type status73 = 'APPROVED' | 'DECLINED' | 'PENDING_REVIEW';
30688
30729
 
30689
30730
  /**
30690
30731
  * Webhook payload for `whatsapp.account.quality_updated`. Fired when a connected
@@ -30818,7 +30859,7 @@ export type event94 = 'whatsapp.account.status_updated';
30818
30859
  /**
30819
30860
  * `active` only on a reinstatement (DISABLED_UPDATE with ban state REINSTATE).
30820
30861
  */
30821
- export type status73 = 'restricted' | 'active';
30862
+ export type status74 = 'restricted' | 'active';
30822
30863
 
30823
30864
  /**
30824
30865
  * Webhook payload for the `whatsapp.contact.identity_changed` event. Fired when
@@ -31034,7 +31075,7 @@ export type event97 = 'whatsapp.template.status_updated';
31034
31075
  * request before the template is actually removed.
31035
31076
  *
31036
31077
  */
31037
- export type status74 = 'APPROVED' | 'REJECTED' | 'PENDING' | 'PAUSED' | 'DISABLED' | 'IN_APPEAL' | 'PENDING_DELETION';
31078
+ export type status75 = 'APPROVED' | 'REJECTED' | 'PENDING' | 'PAUSED' | 'DISABLED' | 'IN_APPEAL' | 'PENDING_DELETION';
31038
31079
 
31039
31080
  export type WebhookPayloadWorkflowRun = {
31040
31081
  /**
@@ -31098,7 +31139,7 @@ export type event98 = 'workflow.run.started' | 'workflow.run.completed' | 'workf
31098
31139
  /**
31099
31140
  * 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.
31100
31141
  */
31101
- export type status75 = 'running' | 'waiting' | 'completed' | 'exited' | 'failed';
31142
+ export type status76 = 'running' | 'waiting' | 'completed' | 'exited' | 'failed';
31102
31143
 
31103
31144
  /**
31104
31145
  * The profiles this event belongs to, each with the externalId you set on it (null when none is set). Use it to route the event to your tenant without storing Zernio profile ids.
@@ -31501,7 +31542,7 @@ export type WorkflowExecutionEvent = {
31501
31542
 
31502
31543
  export type action3 = 'execution_started' | 'execution_completed' | 'execution_exited' | 'execution_paused' | 'execution_resumed' | 'node_started' | 'node_completed' | 'node_failed' | 'node_skipped';
31503
31544
 
31504
- export type status76 = 'success' | 'failed' | 'pending';
31545
+ export type status77 = 'success' | 'failed' | 'pending';
31505
31546
 
31506
31547
  /**
31507
31548
  * A node in a workflow graph. `config` shape depends on `type`.
@@ -38943,6 +38984,10 @@ export type GetAllAccountsHealthResponse = ({
38943
38984
  * Present on WhatsApp, Instagram and Facebook accounts. An active WhatsApp number with no inbound message or comment 24 hours after its latest connect gets an entry in issues, which never changes status. Null for accounts connected before tracking shipped, until their first inbound event or next connect.
38944
38985
  */
38945
38986
  inboundActivity?: (InboundActivity | null);
38987
+ /**
38988
+ * WhatsApp accounts only. On `already_synced` an entry with the steps for a new import is added to `issues`, which never changes status. Null when no request ran for the current connection, and on numbers that are not in coexistence.
38989
+ */
38990
+ coexistenceHistorySync?: (CoexistenceHistorySync | null);
38946
38991
  /**
38947
38992
  * Set when the last 3 finished publishes failed with the same account-level error (suspended, restricted, a verification check, an expired login). The next successful publish or a reconnect clears it. While set, status is at least `warning`. Null when the account publishes normally.
38948
38993
  */
@@ -39257,27 +39302,9 @@ export type GetAccountHealthResponse = ({
39257
39302
  pausedUntil?: (string) | null;
39258
39303
  } | null;
39259
39304
  /**
39260
- * WhatsApp accounts only. The outcome of the latest chat history request Zernio sent Meta for a coexistence number, read from the account (not a live probe). Null when no request ran for the current connection, and on numbers that are not in coexistence.
39305
+ * WhatsApp accounts only. Null when no request ran for the current connection, and on numbers that are not in coexistence.
39261
39306
  */
39262
- coexistenceHistorySync?: {
39263
- /**
39264
- * - `requested`: Meta accepted the request and has not sent history yet, which can take a while.
39265
- * - `imported`: Meta sent chat history to this account, including history a reconnect kept.
39266
- * - `declined`: the business chose not to share its chat history in Meta's window.
39267
- * - `already_synced`: Meta refused the request because an earlier connection already used the number's one history share. The description above says how to get a new import.
39268
- * - `refused`: Meta refused it for another reason.
39269
- *
39270
- */
39271
- status?: 'requested' | 'imported' | 'declined' | 'already_synced' | 'refused';
39272
- /**
39273
- * The id of the last history request Meta accepted, kept across reconnects. Quote it in a Meta support case.
39274
- */
39275
- requestId?: (string) | null;
39276
- /**
39277
- * When Meta refused the latest request. Null when it was accepted.
39278
- */
39279
- refusedAt?: (string) | null;
39280
- } | null;
39307
+ coexistenceHistorySync?: (CoexistenceHistorySync | null);
39281
39308
  /**
39282
39309
  * WhatsApp accounts only. Live probe of the Meta link behind the channel, performed at request time (the same read as GET /v1/whatsapp/number-info).
39283
39310
  */
@@ -84469,6 +84496,15 @@ export type CreateMessagingAdData = {
84469
84496
  *
84470
84497
  */
84471
84498
  destinations?: Array<('whatsapp' | 'messenger' | 'instagram_direct')>;
84499
+ /**
84500
+ * What the ad set optimizes for. Defaults to `CONVERSATIONS`. Cannot be combined with `adSetId` (the existing ad set owns its goal).
84501
+ *
84502
+ * - `LEAD_GENERATION` needs a single `destination: whatsapp` (a 400 with `destinations` or another destination) and runs the campaign under `OUTCOME_LEADS`.
84503
+ * - `objective`, when sent with `LEAD_GENERATION`, must be `OUTCOME_LEADS`.
84504
+ * - With `existingCampaignId` the campaign must be `OUTCOME_LEADS` (a 400 otherwise).
84505
+ *
84506
+ */
84507
+ optimizationGoal?: 'CONVERSATIONS' | 'LEAD_GENERATION';
84472
84508
  /**
84473
84509
  * A different image or video per placement on one messaging ad, e.g. a 4:5 image on Feed and a 9:16 image on Stories/Reels. Works on the single-creative shape and on attach (`adSetId`).
84474
84510
  *