@getlatedev/node 0.2.395 → 0.2.397

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.
@@ -2535,7 +2535,13 @@ export type InboxWebhookMessage = {
2535
2535
  */
2536
2536
  type: string;
2537
2537
  /**
2538
- * Attachment URL (may expire for Meta platforms)
2538
+ * Where to fetch the attachment. The contract depends on direction and
2539
+ * platform: inbound WhatsApp media points at the authenticated
2540
+ * `GET /v1/whatsapp/media/{mediaId}` and requires
2541
+ * `Authorization: Bearer <your API key>`, while outgoing media carries the
2542
+ * URL originally supplied and Instagram / Facebook / Telegram carry direct
2543
+ * platform CDN links that need no authentication.
2544
+ *
2539
2545
  */
2540
2546
  url: string;
2541
2547
  /**
@@ -4853,6 +4859,33 @@ export type UsersListResponse = {
4853
4859
  users?: Array<User>;
4854
4860
  };
4855
4861
 
4862
+ /**
4863
+ * A managed OTP verification. The code itself is never returned or stored (hash only).
4864
+ */
4865
+ export type Verification = {
4866
+ id?: string;
4867
+ status?: 'pending' | 'approved' | 'expired' | 'max_attempts_reached' | 'canceled' | 'delivery_failed';
4868
+ channel?: 'sms';
4869
+ to?: string;
4870
+ expiresAt?: string;
4871
+ attempts?: number;
4872
+ maxAttempts?: number;
4873
+ /**
4874
+ * Accepted deliveries (initial send + resends); each bills one verification fee.
4875
+ */
4876
+ sendCount?: number;
4877
+ lastSentAt?: (string) | null;
4878
+ createdAt?: string;
4879
+ /**
4880
+ * Present on create responses: true when an active verification was resent instead of created.
4881
+ */
4882
+ resend?: boolean;
4883
+ };
4884
+
4885
+ export type status9 = 'pending' | 'approved' | 'expired' | 'max_attempts_reached' | 'canceled' | 'delivery_failed';
4886
+
4887
+ export type channel2 = 'sms';
4888
+
4856
4889
  /**
4857
4890
  * Individual webhook configuration for receiving real-time notifications
4858
4891
  */
@@ -4876,7 +4909,7 @@ export type Webhook = {
4876
4909
  /**
4877
4910
  * Events subscribed to
4878
4911
  */
4879
- events?: Array<('post.scheduled' | 'post.published' | 'post.failed' | 'post.partial' | 'post.cancelled' | 'post.recycled' | 'post.platform.published' | 'post.platform.failed' | 'post.tiktok.url_resolved' | 'post.external.created' | 'post.external.updated' | 'post.external.deleted' | 'account.connected' | 'account.disconnected' | 'account.ads.initial_sync_completed' | 'message.received' | 'conversation.started' | 'call.received' | 'call.ended' | 'call.failed' | 'call.permission_request' | 'message.sent' | 'message.edited' | 'message.deleted' | 'message.delivered' | 'message.read' | 'message.failed' | 'reaction.received' | 'comment.received' | 'review.new' | 'review.updated' | 'lead.received' | 'ad.status_changed' | 'whatsapp.template.status_updated' | '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')>;
4912
+ events?: Array<('post.scheduled' | 'post.published' | 'post.failed' | 'post.partial' | 'post.cancelled' | 'post.recycled' | 'post.platform.published' | 'post.platform.failed' | 'post.tiktok.url_resolved' | 'post.external.created' | 'post.external.updated' | 'post.external.deleted' | 'account.connected' | 'account.disconnected' | 'account.ads.initial_sync_completed' | 'message.received' | 'conversation.started' | 'call.received' | 'call.ended' | 'call.failed' | 'call.permission_request' | 'message.sent' | 'message.edited' | 'message.deleted' | 'message.delivered' | 'message.read' | 'message.failed' | 'reaction.received' | 'comment.received' | 'review.new' | 'review.updated' | 'lead.received' | 'ad.status_changed' | 'whatsapp.template.status_updated' | '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' | 'verification.approved' | 'verification.failed')>;
4880
4913
  /**
4881
4914
  * Whether webhook delivery is enabled
4882
4915
  */
@@ -4964,7 +4997,7 @@ export type WebhookLog = {
4964
4997
  /**
4965
4998
  * Delivery outcome
4966
4999
  */
4967
- export type status9 = 'success' | 'failed';
5000
+ export type status10 = 'success' | 'failed';
4968
5001
 
4969
5002
  /**
4970
5003
  * Webhook payload for `account.ads.initial_sync_completed` events.
@@ -5073,7 +5106,7 @@ export type event = 'account.ads.initial_sync_completed';
5073
5106
  /**
5074
5107
  * Overall outcome of the initial sync.
5075
5108
  */
5076
- export type status10 = 'success' | 'failure';
5109
+ export type status11 = 'success' | 'failure';
5077
5110
 
5078
5111
  /**
5079
5112
  * Stable category for UX branching. New values may be added; existing ones are
@@ -5736,7 +5769,19 @@ export type WebhookPayloadMessage = {
5736
5769
  */
5737
5770
  type: string;
5738
5771
  /**
5739
- * Attachment URL (may expire for Meta platforms)
5772
+ * Where to fetch the attachment. **The contract differs by platform.**
5773
+ *
5774
+ * - **WhatsApp**: points at `GET /v1/whatsapp/media/{mediaId}`, an
5775
+ * authenticated Zernio endpoint. You MUST send
5776
+ * `Authorization: Bearer <your API key>`; fetching it without that
5777
+ * header returns `401`. Download and store the bytes when this
5778
+ * webhook arrives: Meta drops inbound media after a limited
5779
+ * retention window, after which the endpoint answers `400`
5780
+ * permanently and the media is unrecoverable.
5781
+ * - **Instagram / Facebook / Telegram**: a direct platform CDN link
5782
+ * that needs no authentication and expires on the platform's own
5783
+ * schedule.
5784
+ *
5740
5785
  */
5741
5786
  url: string;
5742
5787
  /**
@@ -6167,7 +6212,13 @@ export type WebhookPayloadMessageSent = {
6167
6212
  */
6168
6213
  type: string;
6169
6214
  /**
6170
- * Attachment URL (may expire for Meta platforms)
6215
+ * Where to fetch the attachment. For outgoing messages this is the
6216
+ * media URL as sent, so for WhatsApp it is the URL you supplied when
6217
+ * publishing (WhatsApp sends media by link), not a Zernio endpoint,
6218
+ * and it needs no Zernio credentials. Contrast the inbound direction:
6219
+ * `message.received` attachment URLs on WhatsApp point at the
6220
+ * authenticated `GET /v1/whatsapp/media/{mediaId}`.
6221
+ *
6171
6222
  */
6172
6223
  url: string;
6173
6224
  /**
@@ -6509,7 +6560,7 @@ export type platform10 = 'whatsapp';
6509
6560
  * request before the template is actually removed.
6510
6561
  *
6511
6562
  */
6512
- export type status11 = 'APPROVED' | 'REJECTED' | 'PENDING' | 'PAUSED' | 'DISABLED' | 'IN_APPEAL' | 'PENDING_DELETION';
6563
+ export type status12 = 'APPROVED' | 'REJECTED' | 'PENDING' | 'PAUSED' | 'DISABLED' | 'IN_APPEAL' | 'PENDING_DELETION';
6513
6564
 
6514
6565
  export type WhatsAppBodyComponent = {
6515
6566
  type: 'body';
@@ -6610,7 +6661,7 @@ export type WhatsAppSandboxSession = {
6610
6661
  * list responses.
6611
6662
  *
6612
6663
  */
6613
- export type status12 = 'pending' | 'active';
6664
+ export type status13 = 'pending' | 'active';
6614
6665
 
6615
6666
  export type WhatsAppTemplateButton = {
6616
6667
  type: 'quick_reply' | 'url' | 'phone_number' | 'otp' | 'copy_code' | 'flow' | 'mpm' | 'catalog';
@@ -6729,7 +6780,7 @@ export type WorkflowExecutionEvent = {
6729
6780
 
6730
6781
  export type action2 = 'execution_started' | 'execution_completed' | 'execution_exited' | 'execution_paused' | 'execution_resumed' | 'node_started' | 'node_completed' | 'node_failed' | 'node_skipped';
6731
6782
 
6732
- export type status13 = 'success' | 'failed' | 'pending';
6783
+ export type status14 = 'success' | 'failed' | 'pending';
6733
6784
 
6734
6785
  /**
6735
6786
  * A node in a workflow graph. `config` shape depends on `type`.
@@ -7622,7 +7673,7 @@ export type GetInstagramAccountInsightsData = {
7622
7673
 
7623
7674
  export type GetInstagramAccountInsightsResponse = (InstagramAccountInsightsResponse);
7624
7675
 
7625
- export type GetInstagramAccountInsightsError = (ErrorResponse | {
7676
+ export type GetInstagramAccountInsightsError = ({
7626
7677
  error?: string;
7627
7678
  } | {
7628
7679
  error?: string;
@@ -8621,7 +8672,7 @@ export type GetMediaPresignedUrlResponse = ({
8621
8672
  expiresIn?: number;
8622
8673
  });
8623
8674
 
8624
- export type GetMediaPresignedUrlError = ({
8675
+ export type GetMediaPresignedUrlError = (ErrorResponse | {
8625
8676
  error?: string;
8626
8677
  });
8627
8678
 
@@ -14146,7 +14197,7 @@ export type CreateWebhookSettingsData = {
14146
14197
  /**
14147
14198
  * Events to subscribe to (at least one required)
14148
14199
  */
14149
- events: Array<('post.scheduled' | 'post.published' | 'post.failed' | 'post.partial' | 'post.cancelled' | 'post.recycled' | 'post.platform.published' | 'post.platform.failed' | 'post.tiktok.url_resolved' | 'post.external.created' | 'post.external.updated' | 'post.external.deleted' | 'account.connected' | 'account.disconnected' | 'account.ads.initial_sync_completed' | 'message.received' | 'conversation.started' | 'call.received' | 'call.ended' | 'call.failed' | 'call.permission_request' | 'message.sent' | 'message.edited' | 'message.deleted' | 'message.delivered' | 'message.read' | 'message.failed' | 'reaction.received' | 'comment.received' | 'review.new' | 'review.updated' | 'lead.received' | 'ad.status_changed' | 'whatsapp.template.status_updated' | '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')>;
14200
+ events: Array<('post.scheduled' | 'post.published' | 'post.failed' | 'post.partial' | 'post.cancelled' | 'post.recycled' | 'post.platform.published' | 'post.platform.failed' | 'post.tiktok.url_resolved' | 'post.external.created' | 'post.external.updated' | 'post.external.deleted' | 'account.connected' | 'account.disconnected' | 'account.ads.initial_sync_completed' | 'message.received' | 'conversation.started' | 'call.received' | 'call.ended' | 'call.failed' | 'call.permission_request' | 'message.sent' | 'message.edited' | 'message.deleted' | 'message.delivered' | 'message.read' | 'message.failed' | 'reaction.received' | 'comment.received' | 'review.new' | 'review.updated' | 'lead.received' | 'ad.status_changed' | 'whatsapp.template.status_updated' | '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' | 'verification.approved' | 'verification.failed')>;
14150
14201
  /**
14151
14202
  * Enable or disable webhook delivery. Defaults to `true` when omitted.
14152
14203
  */
@@ -14190,7 +14241,7 @@ export type UpdateWebhookSettingsData = {
14190
14241
  /**
14191
14242
  * Events to subscribe to. Must contain at least one event if provided.
14192
14243
  */
14193
- events?: Array<('post.scheduled' | 'post.published' | 'post.failed' | 'post.partial' | 'post.cancelled' | 'post.recycled' | 'post.platform.published' | 'post.platform.failed' | 'post.tiktok.url_resolved' | 'post.external.created' | 'post.external.updated' | 'post.external.deleted' | 'account.connected' | 'account.disconnected' | 'account.ads.initial_sync_completed' | 'message.received' | 'conversation.started' | 'call.received' | 'call.ended' | 'call.failed' | 'call.permission_request' | 'message.sent' | 'message.edited' | 'message.deleted' | 'message.delivered' | 'message.read' | 'message.failed' | 'reaction.received' | 'comment.received' | 'review.new' | 'review.updated' | 'lead.received' | 'ad.status_changed' | 'whatsapp.template.status_updated' | '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')>;
14244
+ events?: Array<('post.scheduled' | 'post.published' | 'post.failed' | 'post.partial' | 'post.cancelled' | 'post.recycled' | 'post.platform.published' | 'post.platform.failed' | 'post.tiktok.url_resolved' | 'post.external.created' | 'post.external.updated' | 'post.external.deleted' | 'account.connected' | 'account.disconnected' | 'account.ads.initial_sync_completed' | 'message.received' | 'conversation.started' | 'call.received' | 'call.ended' | 'call.failed' | 'call.permission_request' | 'message.sent' | 'message.edited' | 'message.deleted' | 'message.delivered' | 'message.read' | 'message.failed' | 'reaction.received' | 'comment.received' | 'review.new' | 'review.updated' | 'lead.received' | 'ad.status_changed' | 'whatsapp.template.status_updated' | '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' | 'verification.approved' | 'verification.failed')>;
14194
14245
  /**
14195
14246
  * Enable or disable webhook delivery
14196
14247
  */
@@ -15546,6 +15597,27 @@ export type SendInboxMessageError = ({
15546
15597
  error?: string;
15547
15598
  } | unknown);
15548
15599
 
15600
+ export type GetWhatsAppMediaData = {
15601
+ path: {
15602
+ /**
15603
+ * The media id from `attachments[].payload.id`.
15604
+ */
15605
+ mediaId: string;
15606
+ };
15607
+ query: {
15608
+ /**
15609
+ * The WhatsApp account that received the media.
15610
+ */
15611
+ accountId: string;
15612
+ };
15613
+ };
15614
+
15615
+ export type GetWhatsAppMediaResponse = ((Blob | File));
15616
+
15617
+ export type GetWhatsAppMediaError = (unknown | {
15618
+ error?: string;
15619
+ });
15620
+
15549
15621
  export type EditInboxMessageData = {
15550
15622
  body: {
15551
15623
  /**
@@ -17791,7 +17863,7 @@ export type DialVoiceWebCallError = ({
17791
17863
  export type SendSmsData = {
17792
17864
  body: {
17793
17865
  /**
17794
- * One of your SMS-enabled numbers (E.164; formatting is normalized), or an approved alphanumeric sender ID (3-11 letters/digits/spaces, created via `/v1/sms/sender-ids`).
17866
+ * One of your SMS-enabled numbers (E.164; formatting is normalized).
17795
17867
  */
17796
17868
  from: string;
17797
17869
  /**
@@ -17831,7 +17903,7 @@ export type SendSmsResponse = ({
17831
17903
  status?: 'sent';
17832
17904
  });
17833
17905
 
17834
- export type SendSmsError = (ErrorResponse | {
17906
+ export type SendSmsError = ({
17835
17907
  error?: string;
17836
17908
  } | unknown);
17837
17909
 
@@ -17885,105 +17957,6 @@ export type ListSmsOptOutsError = ({
17885
17957
  error?: string;
17886
17958
  });
17887
17959
 
17888
- export type CreateSmsSenderIdData = {
17889
- body: {
17890
- /**
17891
- * The sender ID recipients will see (3-11 letters/digits/spaces, at least one letter, no leading/trailing space).
17892
- */
17893
- senderId: string;
17894
- };
17895
- };
17896
-
17897
- export type CreateSmsSenderIdResponse = ({
17898
- /**
17899
- * Sender ID resource id.
17900
- */
17901
- id?: string;
17902
- senderId?: string;
17903
- isActive?: boolean;
17904
- });
17905
-
17906
- export type CreateSmsSenderIdError = (ErrorResponse | {
17907
- error?: string;
17908
- } | unknown);
17909
-
17910
- export type ListSmsSenderIdsResponse = ({
17911
- senderIds?: Array<{
17912
- id?: string;
17913
- senderId?: string;
17914
- isActive?: boolean;
17915
- createdAt?: (string) | null;
17916
- }>;
17917
- /**
17918
- * Workspace-wide daily sending budget, shared by every sender ID (resets midnight UTC).
17919
- */
17920
- budget?: {
17921
- /**
17922
- * Daily message cap (raisable via `/v1/sms/sender-ids/limit-request`).
17923
- */
17924
- cap?: number;
17925
- /**
17926
- * Messages already counted against today's cap.
17927
- */
17928
- usedToday?: number;
17929
- /**
17930
- * Cap tier (Level 1 = 500/day).
17931
- */
17932
- level?: number;
17933
- /**
17934
- * The in-flight cap-raise request awaiting review, or null. While set, further requests return 409.
17935
- */
17936
- pendingRequest?: {
17937
- requestedCap?: number;
17938
- level?: number;
17939
- requestedAt?: (string) | null;
17940
- } | null;
17941
- };
17942
- });
17943
-
17944
- export type ListSmsSenderIdsError = ({
17945
- error?: string;
17946
- });
17947
-
17948
- export type RequestSmsSenderIdLimitIncreaseData = {
17949
- body: {
17950
- /**
17951
- * Desired daily message cap. Must exceed the current cap.
17952
- */
17953
- requestedCap: number;
17954
- /**
17955
- * Use case and audience (what you send, to whom, opt-in status).
17956
- */
17957
- reason: string;
17958
- };
17959
- };
17960
-
17961
- export type RequestSmsSenderIdLimitIncreaseResponse = ({
17962
- requested?: boolean;
17963
- requestedCap?: number;
17964
- });
17965
-
17966
- export type RequestSmsSenderIdLimitIncreaseError = (ErrorResponse | {
17967
- error?: string;
17968
- } | unknown);
17969
-
17970
- export type DeleteSmsSenderIdData = {
17971
- path: {
17972
- /**
17973
- * Sender ID resource id.
17974
- */
17975
- id: string;
17976
- };
17977
- };
17978
-
17979
- export type DeleteSmsSenderIdResponse = ({
17980
- deleted?: boolean;
17981
- });
17982
-
17983
- export type DeleteSmsSenderIdError = (ErrorResponse | {
17984
- error?: string;
17985
- } | unknown);
17986
-
17987
17960
  export type StartSmsRegistrationData = {
17988
17961
  body: {
17989
17962
  registrationType: 'standard_10dlc' | 'sole_prop_10dlc' | 'toll_free';
@@ -23758,48 +23731,6 @@ export type ListAdCampaignsError = ({
23758
23731
  error?: string;
23759
23732
  } | unknown);
23760
23733
 
23761
- export type CreateAdCampaignData = {
23762
- body: {
23763
- /**
23764
- * Zernio SocialAccount id (posting or ads variant) used to resolve the Meta token.
23765
- */
23766
- accountId: string;
23767
- /**
23768
- * Meta ad account id (act_<n>).
23769
- */
23770
- adAccountId: string;
23771
- name: string;
23772
- /**
23773
- * Mapped to the ODAX objective (same mapping as POST /v1/ads/create).
23774
- */
23775
- goal: 'engagement' | 'traffic' | 'awareness' | 'video_views' | 'lead_generation' | 'lead_conversion' | 'job_applicants' | 'conversions' | 'app_promotion' | 'catalog_sales';
23776
- specialAdCategories?: Array<('HOUSING' | 'EMPLOYMENT' | 'CREDIT' | 'ISSUES_ELECTIONS_POLITICS' | 'FINANCIAL_PRODUCTS_SERVICES' | 'ONLINE_GAMBLING_AND_GAMING')>;
23777
- /**
23778
- * Campaign-level (CBO) budget in whole currency units. Requires budgetType.
23779
- */
23780
- budgetAmount?: number;
23781
- budgetType?: 'daily' | 'lifetime';
23782
- status?: 'ACTIVE' | 'PAUSED';
23783
- };
23784
- };
23785
-
23786
- export type CreateAdCampaignResponse = ({
23787
- adAccountId?: string;
23788
- /**
23789
- * Platform id of the new campaign
23790
- */
23791
- campaignId?: string;
23792
- /**
23793
- * Resolved ODAX objective (e.g. OUTCOME_SALES).
23794
- */
23795
- objective?: string;
23796
- status?: 'ACTIVE' | 'PAUSED';
23797
- });
23798
-
23799
- export type CreateAdCampaignError = (unknown | {
23800
- error?: string;
23801
- });
23802
-
23803
23734
  export type UpdateAdCampaignStatusData = {
23804
23735
  body: {
23805
23736
  status: 'active' | 'paused';
@@ -23991,89 +23922,6 @@ export type DuplicateAdCampaignError = (unknown | {
23991
23922
  error?: string;
23992
23923
  });
23993
23924
 
23994
- export type DuplicateAdSetData = {
23995
- body: {
23996
- platform: 'facebook' | 'instagram';
23997
- /**
23998
- * Destination platform campaign id (defaults to the source's campaign)
23999
- */
24000
- campaignId?: string;
24001
- /**
24002
- * Copy child ads + creatives
24003
- */
24004
- deepCopy?: boolean;
24005
- statusOption?: 'ACTIVE' | 'PAUSED' | 'INHERITED_FROM_SOURCE';
24006
- /**
24007
- * Reschedule the copy's start time
24008
- */
24009
- startTime?: string;
24010
- endTime?: string;
24011
- renameStrategy?: 'DEEP_RENAME' | 'ONLY_TOP_LEVEL_RENAME' | 'NO_RENAME';
24012
- renamePrefix?: string;
24013
- renameSuffix?: string;
24014
- syncAfter?: boolean;
24015
- };
24016
- path: {
24017
- /**
24018
- * Source platform ad set ID
24019
- */
24020
- adSetId: string;
24021
- };
24022
- };
24023
-
24024
- export type DuplicateAdSetResponse = ({
24025
- /**
24026
- * Platform ID of the new ad set
24027
- */
24028
- copiedAdSetId?: string;
24029
- discovery?: 'triggered' | 'skipped' | 'failed';
24030
- /**
24031
- * Meta's native copy response (includes ad_object_ids for child copies)
24032
- */
24033
- raw?: {
24034
- [key: string]: unknown;
24035
- };
24036
- });
24037
-
24038
- export type DuplicateAdSetError = (unknown | {
24039
- error?: string;
24040
- });
24041
-
24042
- export type DuplicateAdData = {
24043
- body?: {
24044
- /**
24045
- * Destination platform ad set id (defaults to the source's ad set)
24046
- */
24047
- adSetId?: string;
24048
- statusOption?: 'ACTIVE' | 'PAUSED' | 'INHERITED_FROM_SOURCE';
24049
- renameStrategy?: 'DEEP_RENAME' | 'ONLY_TOP_LEVEL_RENAME' | 'NO_RENAME';
24050
- renamePrefix?: string;
24051
- renameSuffix?: string;
24052
- syncAfter?: boolean;
24053
- };
24054
- path: {
24055
- /**
24056
- * Zernio ad ID or platform ad ID
24057
- */
24058
- adId: string;
24059
- };
24060
- };
24061
-
24062
- export type DuplicateAdResponse = ({
24063
- /**
24064
- * Platform ID of the new ad
24065
- */
24066
- copiedAdId?: string;
24067
- discovery?: 'triggered' | 'skipped' | 'failed';
24068
- raw?: {
24069
- [key: string]: unknown;
24070
- };
24071
- });
24072
-
24073
- export type DuplicateAdError = (unknown | {
24074
- error?: string;
24075
- });
24076
-
24077
23925
  export type GetAdSetDetailsData = {
24078
23926
  path: {
24079
23927
  /**
@@ -25305,271 +25153,6 @@ export type ListAdStudiesError = (unknown | {
25305
25153
  error?: string;
25306
25154
  });
25307
25155
 
25308
- export type ListAdLabelsData = {
25309
- query: {
25310
- /**
25311
- * Zernio SocialAccount id (posting or ads variant) used to resolve the Meta token.
25312
- */
25313
- accountId: string;
25314
- /**
25315
- * Meta ad account id (act_<n>).
25316
- */
25317
- adAccountId: string;
25318
- /**
25319
- * Cursor from paging.after of the previous page.
25320
- */
25321
- after?: string;
25322
- /**
25323
- * Rows per page
25324
- */
25325
- limit?: number;
25326
- };
25327
- };
25328
-
25329
- export type ListAdLabelsResponse = ({
25330
- adAccountId?: string;
25331
- data?: Array<{
25332
- [key: string]: unknown;
25333
- }>;
25334
- paging?: {
25335
- /**
25336
- * Cursor for the next page; null when exhausted.
25337
- */
25338
- after?: (string) | null;
25339
- };
25340
- });
25341
-
25342
- export type ListAdLabelsError = (unknown | {
25343
- error?: string;
25344
- });
25345
-
25346
- export type ListHighDemandPeriodsData = {
25347
- query: {
25348
- /**
25349
- * Zernio SocialAccount id (posting or ads variant) used to resolve the Meta token.
25350
- */
25351
- accountId: string;
25352
- /**
25353
- * Platform ad set id. Exactly one of campaignId / adSetId.
25354
- */
25355
- adSetId?: string;
25356
- /**
25357
- * Cursor from paging.after of the previous page.
25358
- */
25359
- after?: string;
25360
- /**
25361
- * Platform campaign id. Exactly one of campaignId / adSetId.
25362
- */
25363
- campaignId?: string;
25364
- /**
25365
- * Rows per page
25366
- */
25367
- limit?: number;
25368
- };
25369
- };
25370
-
25371
- export type ListHighDemandPeriodsResponse = ({
25372
- /**
25373
- * The campaign / ad set id the schedules belong to.
25374
- */
25375
- objectId?: string;
25376
- data?: Array<{
25377
- [key: string]: unknown;
25378
- }>;
25379
- paging?: {
25380
- /**
25381
- * Cursor for the next page; null when exhausted.
25382
- */
25383
- after?: (string) | null;
25384
- };
25385
- });
25386
-
25387
- export type ListHighDemandPeriodsError = (unknown | {
25388
- error?: string;
25389
- });
25390
-
25391
- export type ListAdCreativesData = {
25392
- query: {
25393
- /**
25394
- * Zernio SocialAccount id (posting or ads variant) used to resolve the Meta token.
25395
- */
25396
- accountId: string;
25397
- /**
25398
- * Meta ad account id (act_<n>).
25399
- */
25400
- adAccountId: string;
25401
- /**
25402
- * Cursor from paging.after of the previous page.
25403
- */
25404
- after?: string;
25405
- /**
25406
- * Comma-separated Graph field override (supports nested {} projections).
25407
- */
25408
- fields?: string;
25409
- /**
25410
- * Rows per page
25411
- */
25412
- limit?: number;
25413
- };
25414
- };
25415
-
25416
- export type ListAdCreativesResponse = ({
25417
- adAccountId?: string;
25418
- data?: Array<{
25419
- [key: string]: unknown;
25420
- }>;
25421
- paging?: {
25422
- /**
25423
- * Cursor for the next page; null when exhausted.
25424
- */
25425
- after?: (string) | null;
25426
- };
25427
- });
25428
-
25429
- export type ListAdCreativesError = (unknown | {
25430
- error?: string;
25431
- });
25432
-
25433
- export type CreateAdCreativeData = {
25434
- body: {
25435
- /**
25436
- * Zernio SocialAccount id (posting or ads variant) used to resolve the Meta token and Page.
25437
- */
25438
- accountId: string;
25439
- /**
25440
- * Meta ad account id (act_<n>).
25441
- */
25442
- adAccountId: string;
25443
- headline: string;
25444
- /**
25445
- * Primary text
25446
- */
25447
- body: string;
25448
- /**
25449
- * Link description below the headline; omitted = Meta scrapes the destination's OG description.
25450
- */
25451
- description?: string;
25452
- /**
25453
- * CTA type (same whitelist as POST /v1/ads/create).
25454
- */
25455
- callToAction?: string;
25456
- linkUrl: string;
25457
- /**
25458
- * Publicly reachable image; uploaded to the account's library server-side.
25459
- */
25460
- imageUrl?: string;
25461
- /**
25462
- * Existing library image hash (POST /v1/ads/images or GET /v1/ads/images).
25463
- */
25464
- imageHash?: string;
25465
- carouselCards?: Array<{
25466
- imageUrl: string;
25467
- linkUrl: string;
25468
- headline?: string;
25469
- description?: string;
25470
- callToAction?: string;
25471
- }>;
25472
- /**
25473
- * Appended to every outbound URL (e.g. utm_source=fb).
25474
- */
25475
- urlTags?: string;
25476
- };
25477
- };
25478
-
25479
- export type CreateAdCreativeResponse = ({
25480
- adAccountId?: string;
25481
- /**
25482
- * Platform creative id, reusable via existingCreativeId.
25483
- */
25484
- creativeId?: string;
25485
- });
25486
-
25487
- export type CreateAdCreativeError = (unknown | {
25488
- error?: string;
25489
- });
25490
-
25491
- export type GetAdCreativeData = {
25492
- path: {
25493
- /**
25494
- * Platform creative id
25495
- */
25496
- creativeId: string;
25497
- };
25498
- query: {
25499
- /**
25500
- * Zernio SocialAccount id (posting or ads variant) used to resolve the Meta token.
25501
- */
25502
- accountId: string;
25503
- /**
25504
- * Comma-separated Graph field override (supports nested {} projections).
25505
- */
25506
- fields?: string;
25507
- };
25508
- };
25509
-
25510
- export type GetAdCreativeResponse = ({
25511
- /**
25512
- * Raw Meta creative node
25513
- */
25514
- creative?: {
25515
- [key: string]: unknown;
25516
- };
25517
- });
25518
-
25519
- export type GetAdCreativeError = (unknown | {
25520
- error?: string;
25521
- });
25522
-
25523
- export type UpdateAdCreativeData = {
25524
- body: {
25525
- /**
25526
- * Zernio SocialAccount id (posting or ads variant) used to resolve the Meta token.
25527
- */
25528
- accountId: string;
25529
- name: string;
25530
- };
25531
- path: {
25532
- /**
25533
- * Platform creative id
25534
- */
25535
- creativeId: string;
25536
- };
25537
- };
25538
-
25539
- export type UpdateAdCreativeResponse = ({
25540
- creativeId?: string;
25541
- name?: string;
25542
- message?: string;
25543
- });
25544
-
25545
- export type UpdateAdCreativeError = (unknown | {
25546
- error?: string;
25547
- });
25548
-
25549
- export type DeleteAdCreativeData = {
25550
- path: {
25551
- /**
25552
- * Platform creative id
25553
- */
25554
- creativeId: string;
25555
- };
25556
- query: {
25557
- /**
25558
- * Zernio SocialAccount id (posting or ads variant) used to resolve the Meta token.
25559
- */
25560
- accountId: string;
25561
- };
25562
- };
25563
-
25564
- export type DeleteAdCreativeResponse = ({
25565
- creativeId?: string;
25566
- message?: string;
25567
- });
25568
-
25569
- export type DeleteAdCreativeError = (unknown | {
25570
- error?: string;
25571
- });
25572
-
25573
25156
  export type GetAdAccountFinanceData = {
25574
25157
  query: {
25575
25158
  /**
@@ -27050,48 +26633,6 @@ export type UploadAdImageError = (unknown | {
27050
26633
  error?: string;
27051
26634
  });
27052
26635
 
27053
- export type ListAdImagesData = {
27054
- query: {
27055
- /**
27056
- * Zernio SocialAccount id (posting or ads variant) used to resolve the Meta token.
27057
- */
27058
- accountId: string;
27059
- /**
27060
- * Meta ad account id (act_<n>).
27061
- */
27062
- adAccountId: string;
27063
- /**
27064
- * Cursor from paging.after of the previous page.
27065
- */
27066
- after?: string;
27067
- /**
27068
- * Comma-separated Graph field override (supports nested {} projections).
27069
- */
27070
- fields?: string;
27071
- /**
27072
- * Rows per page
27073
- */
27074
- limit?: number;
27075
- };
27076
- };
27077
-
27078
- export type ListAdImagesResponse = ({
27079
- adAccountId?: string;
27080
- data?: Array<{
27081
- [key: string]: unknown;
27082
- }>;
27083
- paging?: {
27084
- /**
27085
- * Cursor for the next page; null when exhausted.
27086
- */
27087
- after?: (string) | null;
27088
- };
27089
- });
27090
-
27091
- export type ListAdImagesError = (unknown | {
27092
- error?: string;
27093
- });
27094
-
27095
26636
  export type SearchAdInterestsData = {
27096
26637
  query: {
27097
26638
  /**
@@ -28647,4 +28188,62 @@ export type GetTrackingTagStatsResponse = ({
28647
28188
 
28648
28189
  export type GetTrackingTagStatsError = (unknown | {
28649
28190
  error?: string;
28650
- });
28191
+ });
28192
+
28193
+ export type CreateVerificationData = {
28194
+ body: {
28195
+ /**
28196
+ * SMS-only for now.
28197
+ */
28198
+ channel: 'sms';
28199
+ /**
28200
+ * E.164 phone number.
28201
+ */
28202
+ to: string;
28203
+ /**
28204
+ * The SMS-enabled number on your account to send from. Defaults to your only SMS number.
28205
+ */
28206
+ from?: string;
28207
+ /**
28208
+ * Your app or business name, rendered in the message. Defaults to your account name. Letters, numbers, and basic punctuation only.
28209
+ */
28210
+ brandName?: string;
28211
+ codeLength?: number;
28212
+ ttlMinutes?: number;
28213
+ };
28214
+ };
28215
+
28216
+ export type CreateVerificationResponse = (Verification);
28217
+
28218
+ export type CreateVerificationError = (ErrorResponse | {
28219
+ error?: string;
28220
+ } | unknown);
28221
+
28222
+ export type GetVerificationData = {
28223
+ path: {
28224
+ verificationId: string;
28225
+ };
28226
+ };
28227
+
28228
+ export type GetVerificationResponse = (Verification);
28229
+
28230
+ export type GetVerificationError = (ErrorResponse | {
28231
+ error?: string;
28232
+ } | unknown);
28233
+
28234
+ export type CheckVerificationData = {
28235
+ body: {
28236
+ code: string;
28237
+ };
28238
+ path: {
28239
+ verificationId: string;
28240
+ };
28241
+ };
28242
+
28243
+ export type CheckVerificationResponse = ((Verification & {
28244
+ valid?: boolean;
28245
+ }));
28246
+
28247
+ export type CheckVerificationError = (ErrorResponse | {
28248
+ error?: string;
28249
+ } | unknown);