@zernio/node 0.2.833 → 0.2.835
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/README.md +21 -0
- package/dist/index.d.mts +712 -40
- package/dist/index.d.ts +712 -40
- package/dist/index.js +125 -1
- package/dist/index.mjs +125 -1
- package/package.json +1 -1
- package/src/client.ts +40 -0
- package/src/generated/sdk.gen.ts +248 -3
- package/src/generated/types.gen.ts +746 -39
|
@@ -115,6 +115,18 @@ export type Ad = {
|
|
|
115
115
|
budget?: {
|
|
116
116
|
amount?: number;
|
|
117
117
|
type?: 'daily' | 'lifetime';
|
|
118
|
+
/**
|
|
119
|
+
* LinkedIn only. The parent campaign's `dailyBudget`. LinkedIn allows a daily AND a lifetime budget on the same campaign, which `amount`/`type` cannot express (daily wins there); read `daily` and `lifetime` to see both.
|
|
120
|
+
*/
|
|
121
|
+
daily?: number;
|
|
122
|
+
/**
|
|
123
|
+
* LinkedIn only. The parent campaign's `totalBudget`, readable even when a daily budget is also set.
|
|
124
|
+
*/
|
|
125
|
+
lifetime?: number;
|
|
126
|
+
/**
|
|
127
|
+
* LinkedIn only. The campaign's `pacingStrategy`: how fast LinkedIn may spend the budget. Typically LINEAR or ACCELERATED; the list is open.
|
|
128
|
+
*/
|
|
129
|
+
pacing?: string;
|
|
118
130
|
} | null;
|
|
119
131
|
metrics?: (AdMetrics | null);
|
|
120
132
|
platformAdId?: string;
|
|
@@ -124,7 +136,17 @@ export type Ad = {
|
|
|
124
136
|
campaignName?: string;
|
|
125
137
|
adSetName?: string;
|
|
126
138
|
/**
|
|
127
|
-
*
|
|
139
|
+
* The platform's own campaign objective, verbatim, alongside the normalized `goal` it maps to.
|
|
140
|
+
* The mapping is many-to-one, so `goal` alone cannot be mapped back to it.
|
|
141
|
+
*
|
|
142
|
+
* - Meta: campaign `objective` (e.g. OUTCOME_SALES, OUTCOME_LEADS, OUTCOME_TRAFFIC).
|
|
143
|
+
* - LinkedIn: campaign `objectiveType` (e.g. WEBSITE_VISIT, LEAD_GENERATION, BRAND_AWARENESS,
|
|
144
|
+
* VIDEO_VIEW, ENGAGEMENT, JOB_APPLICANT, WEBSITE_CONVERSION). The list is open, so treat an
|
|
145
|
+
* unrecognized value as valid rather than an error.
|
|
146
|
+
* - TikTok and Pinterest: their raw objective_type.
|
|
147
|
+
*
|
|
148
|
+
* Null on platforms that report none, and on LinkedIn ads not yet re-synced.
|
|
149
|
+
*
|
|
128
150
|
*/
|
|
129
151
|
platformObjective?: (string) | null;
|
|
130
152
|
/**
|
|
@@ -331,6 +353,10 @@ export type Ad = {
|
|
|
331
353
|
* LinkedIn only. Whether LinkedIn is currently serving this specific creative. Complements the ad-level `servingStatuses`, which describes the parent campaign.
|
|
332
354
|
*/
|
|
333
355
|
isServing?: (boolean) | null;
|
|
356
|
+
/**
|
|
357
|
+
* LinkedIn only. The LinkedIn ad format, in LinkedIn's own vocabulary: STANDARD_UPDATE, SINGLE_VIDEO, CAROUSEL, NATIVE_DOCUMENT, EVENT, TEXT_AD, SPOTLIGHT, FOLLOW_COMPANY, JOBS, SPONSORED_INMAILS and others. On an ad Zernio created this is the format it was created as; on an ad synced from Campaign Manager it is the parent campaign's raw `format`, which is what LinkedIn actually enforces on its creatives. The list is open, so treat an unrecognized value as valid. Absent on LinkedIn ads not yet re-synced, and on every other platform.
|
|
358
|
+
*/
|
|
359
|
+
adFormat?: (string) | null;
|
|
334
360
|
/**
|
|
335
361
|
* LinkedIn only. Why this specific creative is not being served. Empty when it is serving.
|
|
336
362
|
* A superset of the ad-level `servingStatuses`: it repeats the inherited campaign, campaign
|
|
@@ -423,6 +449,24 @@ export type AdAnalyticsResponse = {
|
|
|
423
449
|
daily?: Array<(AdMetrics & {
|
|
424
450
|
date?: string;
|
|
425
451
|
})>;
|
|
452
|
+
/**
|
|
453
|
+
* Requested demographic breakdowns, keyed by dimension. Fetched live from the
|
|
454
|
+
* platform per request and never stored, so these rows can carry fields the
|
|
455
|
+
* stored `summary` and `daily` series do not.
|
|
456
|
+
*
|
|
457
|
+
* LinkedIn rows carry `value` (the pivot URN), `name` (resolved label where
|
|
458
|
+
* LinkedIn provides one), the usual spend/impressions/clicks/ctr/cpc/cpm/engagement
|
|
459
|
+
* figures, plus two reach fields:
|
|
460
|
+
*
|
|
461
|
+
* - `reach`: the segment's `approximateMemberReach`.
|
|
462
|
+
* - `audiencePenetration`: LinkedIn's own ratio of members reached to the size of
|
|
463
|
+
* the targeted audience, passed through verbatim.
|
|
464
|
+
*
|
|
465
|
+
* LinkedIn withholds both below its audience privacy threshold, in which case the
|
|
466
|
+
* keys are ABSENT rather than 0. `audiencePenetration` is available here only: it
|
|
467
|
+
* is not part of the stored metrics series.
|
|
468
|
+
*
|
|
469
|
+
*/
|
|
426
470
|
breakdowns?: {
|
|
427
471
|
[key: string]: Array<{
|
|
428
472
|
[key: string]: unknown;
|
|
@@ -616,7 +660,7 @@ export type AdEngagementCounts = {
|
|
|
616
660
|
*/
|
|
617
661
|
pageLikes?: number;
|
|
618
662
|
/**
|
|
619
|
-
* 3-second
|
|
663
|
+
* Video views, from the `video_view` action. Meta counts a 3-second view; LinkedIn's own `videoViews` threshold (2 continuous seconds, or 25% of the video) lands under the same key, so compare across platforms with care. For completion-based counts use `videoThruplayWatchedActions`.
|
|
620
664
|
*/
|
|
621
665
|
videoViews?: number;
|
|
622
666
|
/**
|
|
@@ -802,7 +846,7 @@ export type AdMetrics = {
|
|
|
802
846
|
spend?: number;
|
|
803
847
|
impressions?: number;
|
|
804
848
|
/**
|
|
805
|
-
* Unique people reached in the requested date range. Meta (facebook/instagram) and TikTok: the platform's own de-duplicated reach for the exact range, fetched live and cached up to ~1 hour (may lag recent delivery; on a transient platform error the value temporarily falls back to a sum of per-day reach, which overcounts people reached on multiple days or by multiple child ads). Because it is de-duplicated, reach is NOT additive on these platforms: neither daily values nor child nodes sum to the range total.
|
|
849
|
+
* Unique people reached in the requested date range. Meta (facebook/instagram) and TikTok: the platform's own de-duplicated reach for the exact range, fetched live and cached up to ~1 hour (may lag recent delivery; on a transient platform error the value temporarily falls back to a sum of per-day reach, which overcounts people reached on multiple days or by multiple child ads). Because it is de-duplicated, reach is NOT additive on these platforms: neither daily values nor child nodes sum to the range total. LinkedIn: the campaign's `approximateMemberReach`, de-duplicated by LinkedIn per day and then summed over the range here, so it overcounts members reached on more than one day; LinkedIn withholds it below its audience privacy threshold, where it reads 0. Google, X, Pinterest and OpenAI report 0 (reach not synced). Frequency (impressions / reach) is only meaningful for Meta and TikTok.
|
|
806
850
|
*/
|
|
807
851
|
reach?: number;
|
|
808
852
|
clicks?: number;
|
|
@@ -832,7 +876,7 @@ export type AdMetrics = {
|
|
|
832
876
|
*/
|
|
833
877
|
costPerConversion?: number;
|
|
834
878
|
/**
|
|
835
|
-
* Per-action-type counts summed over the date range, keyed by the platform's action-type names. Meta: raw Insights action_type keys (link_click, offsite_conversion.fb_pixel_purchase, onsite_conversion.lead_grouped, ...), covering both engagement and conversion events. TikTok: pixel conversions (purchase, add_to_cart, initiate_checkout, view_content, complete_payment, lead) plus the paid-engagement family (follow, post_reaction for paid likes, comment, share). Follow is how FOLLOWERS-goal campaigns report their result. X: conversion types (purchase, sign_up, site_visit, download, custom). LinkedIn: conversion types (post_click, post_view, lead_gen). Google returns {} (its per-action names aren't synced per ad). Empty object when no actions are reported. NOTE: keys differ by platform, so branch on the ad's platform when interpreting them.
|
|
879
|
+
* Per-action-type counts summed over the date range, keyed by the platform's action-type names. Meta: raw Insights action_type keys (link_click, offsite_conversion.fb_pixel_purchase, onsite_conversion.lead_grouped, ...), covering both engagement and conversion events. TikTok: pixel conversions (purchase, add_to_cart, initiate_checkout, view_content, complete_payment, lead) plus the paid-engagement family (follow, post_reaction for paid likes, comment, share). Follow is how FOLLOWERS-goal campaigns report their result. X: conversion types (purchase, sign_up, site_visit, download, custom). LinkedIn: conversion types (post_click, post_view, lead_gen) plus `video_view`, which carries LinkedIn's `videoViews` under the same key every other platform uses, so it feeds `engagementBreakdown.videoViews` too; it is an engagement, NOT a conversion, and is excluded from `conversions`. Google returns {} (its per-action names aren't synced per ad). Empty object when no actions are reported. NOTE: keys differ by platform, so branch on the ad's platform when interpreting them.
|
|
836
880
|
*/
|
|
837
881
|
actions?: {
|
|
838
882
|
[key: string]: (number);
|
|
@@ -1229,6 +1273,18 @@ export type AdTreeAdSet = {
|
|
|
1229
1273
|
budget?: {
|
|
1230
1274
|
amount?: number;
|
|
1231
1275
|
type?: 'daily' | 'lifetime';
|
|
1276
|
+
/**
|
|
1277
|
+
* LinkedIn only. The campaign's `dailyBudget`. LinkedIn allows a daily AND a lifetime budget on the same campaign, which `amount`/`type` cannot express (daily wins there); read `daily` and `lifetime` to see both.
|
|
1278
|
+
*/
|
|
1279
|
+
daily?: number;
|
|
1280
|
+
/**
|
|
1281
|
+
* LinkedIn only. The campaign's `totalBudget`, readable even when a daily budget is also set.
|
|
1282
|
+
*/
|
|
1283
|
+
lifetime?: number;
|
|
1284
|
+
/**
|
|
1285
|
+
* LinkedIn only. The campaign's `pacingStrategy`: how fast LinkedIn may spend the budget. Typically LINEAR or ACCELERATED; the list is open.
|
|
1286
|
+
*/
|
|
1287
|
+
pacing?: string;
|
|
1232
1288
|
} | null;
|
|
1233
1289
|
/**
|
|
1234
1290
|
* Ad-set-level budget (ABO). Null for CBO campaigns where the budget is set on the campaign.
|
|
@@ -1236,6 +1292,18 @@ export type AdTreeAdSet = {
|
|
|
1236
1292
|
adSetBudget?: {
|
|
1237
1293
|
amount?: number;
|
|
1238
1294
|
type?: 'daily' | 'lifetime';
|
|
1295
|
+
/**
|
|
1296
|
+
* LinkedIn only. See `budget.daily`.
|
|
1297
|
+
*/
|
|
1298
|
+
daily?: number;
|
|
1299
|
+
/**
|
|
1300
|
+
* LinkedIn only. See `budget.lifetime`.
|
|
1301
|
+
*/
|
|
1302
|
+
lifetime?: number;
|
|
1303
|
+
/**
|
|
1304
|
+
* LinkedIn only. See `budget.pacing`.
|
|
1305
|
+
*/
|
|
1306
|
+
pacing?: string;
|
|
1239
1307
|
} | null;
|
|
1240
1308
|
metrics?: AdMetrics;
|
|
1241
1309
|
/**
|
|
@@ -2590,6 +2658,24 @@ export type CampaignAnalyticsResponse = {
|
|
|
2590
2658
|
daily?: Array<(AdMetrics & {
|
|
2591
2659
|
date?: string;
|
|
2592
2660
|
})>;
|
|
2661
|
+
/**
|
|
2662
|
+
* Requested demographic breakdowns, keyed by dimension. Fetched live from the
|
|
2663
|
+
* platform per request and never stored, so these rows can carry fields the
|
|
2664
|
+
* stored `summary` and `daily` series do not.
|
|
2665
|
+
*
|
|
2666
|
+
* LinkedIn rows carry `value` (the pivot URN), `name` (resolved label where
|
|
2667
|
+
* LinkedIn provides one), the usual spend/impressions/clicks/ctr/cpc/cpm/engagement
|
|
2668
|
+
* figures, plus two reach fields:
|
|
2669
|
+
*
|
|
2670
|
+
* - `reach`: the segment's `approximateMemberReach`.
|
|
2671
|
+
* - `audiencePenetration`: LinkedIn's own ratio of members reached to the size of
|
|
2672
|
+
* the targeted audience, passed through verbatim.
|
|
2673
|
+
*
|
|
2674
|
+
* LinkedIn withholds both below its audience privacy threshold, in which case the
|
|
2675
|
+
* keys are ABSENT rather than 0. `audiencePenetration` is available here only: it
|
|
2676
|
+
* is not part of the stored metrics series.
|
|
2677
|
+
*
|
|
2678
|
+
*/
|
|
2593
2679
|
breakdowns?: {
|
|
2594
2680
|
[key: string]: Array<{
|
|
2595
2681
|
[key: string]: unknown;
|
|
@@ -4821,6 +4907,98 @@ export type GoogleStructuredSnippet = {
|
|
|
4821
4907
|
|
|
4822
4908
|
export type header = 'Amenities' | 'Brands' | 'Courses' | 'Degree programs' | 'Destinations' | 'Featured hotels' | 'Insurance coverage' | 'Models' | 'Neighborhoods' | 'Service catalog' | 'Shows' | 'Styles' | 'Types';
|
|
4823
4909
|
|
|
4910
|
+
export type ImessageAudienceContact = {
|
|
4911
|
+
conversationId?: string;
|
|
4912
|
+
accountId?: string;
|
|
4913
|
+
/**
|
|
4914
|
+
* The contact handle (E.164 phone or email)
|
|
4915
|
+
*/
|
|
4916
|
+
contact?: string;
|
|
4917
|
+
name?: (string) | null;
|
|
4918
|
+
subscribed?: boolean;
|
|
4919
|
+
lastMessage?: (string) | null;
|
|
4920
|
+
lastMessageAt?: (string) | null;
|
|
4921
|
+
firstSeenAt?: (string) | null;
|
|
4922
|
+
/**
|
|
4923
|
+
* Present when the thread was opened through a tracked opt-in link
|
|
4924
|
+
*/
|
|
4925
|
+
optIn?: {
|
|
4926
|
+
at?: string;
|
|
4927
|
+
parameters?: {
|
|
4928
|
+
[key: string]: unknown;
|
|
4929
|
+
};
|
|
4930
|
+
} | null;
|
|
4931
|
+
};
|
|
4932
|
+
|
|
4933
|
+
/**
|
|
4934
|
+
* An iMessage sender registered as an account on a profile.
|
|
4935
|
+
*/
|
|
4936
|
+
export type ImessageSender = {
|
|
4937
|
+
/**
|
|
4938
|
+
* Account id (use it with the inbox endpoints' accountId)
|
|
4939
|
+
*/
|
|
4940
|
+
id?: string;
|
|
4941
|
+
platform?: 'imessage';
|
|
4942
|
+
/**
|
|
4943
|
+
* The sender handle (E.164 phone or email)
|
|
4944
|
+
*/
|
|
4945
|
+
sender?: string;
|
|
4946
|
+
/**
|
|
4947
|
+
* imessage:// deep link that opens Messages on this sender with a prefilled text. Share it so contacts message you first (Apple only lets a sender reach contacts who wrote to it first).
|
|
4948
|
+
*/
|
|
4949
|
+
optInLink?: (string) | null;
|
|
4950
|
+
displayName?: string;
|
|
4951
|
+
profileId?: (string) | null;
|
|
4952
|
+
/**
|
|
4953
|
+
* Delivery provider backing this sender (e.g. loopmessage)
|
|
4954
|
+
*/
|
|
4955
|
+
provider?: string;
|
|
4956
|
+
/**
|
|
4957
|
+
* Whether the provider confirmed the sender as active at registration time
|
|
4958
|
+
*/
|
|
4959
|
+
senderVerified?: boolean;
|
|
4960
|
+
isActive?: boolean;
|
|
4961
|
+
};
|
|
4962
|
+
|
|
4963
|
+
export type platform4 = 'imessage';
|
|
4964
|
+
|
|
4965
|
+
/**
|
|
4966
|
+
* A provisioned iMessage sender order and its lifecycle. Activation is asynchronous: poll GET /v1/imessage/senders/{senderId} or subscribe to account.connected.
|
|
4967
|
+
*/
|
|
4968
|
+
export type ImessageSenderLifecycle = {
|
|
4969
|
+
id?: string;
|
|
4970
|
+
kind?: 'phone' | 'email';
|
|
4971
|
+
region?: ('US' | 'GB') | null;
|
|
4972
|
+
/**
|
|
4973
|
+
* The sender handle once activation assigns it
|
|
4974
|
+
*/
|
|
4975
|
+
handle?: (string) | null;
|
|
4976
|
+
/**
|
|
4977
|
+
* imessage:// deep link that opens Messages on this sender with a prefilled text. Share it so contacts message you first (Apple only lets a sender reach contacts who wrote to it first); null until the handle is assigned.
|
|
4978
|
+
*/
|
|
4979
|
+
optInLink?: (string) | null;
|
|
4980
|
+
status?: 'ordering' | 'activating' | 'active' | 'suspended' | 'canceled' | 'failed';
|
|
4981
|
+
/**
|
|
4982
|
+
* Monthly price billed while the sender is active
|
|
4983
|
+
*/
|
|
4984
|
+
priceCents?: number;
|
|
4985
|
+
provider?: string;
|
|
4986
|
+
profileId?: string;
|
|
4987
|
+
displayName?: (string) | null;
|
|
4988
|
+
failureReason?: (string) | null;
|
|
4989
|
+
/**
|
|
4990
|
+
* The messaging account created at activation
|
|
4991
|
+
*/
|
|
4992
|
+
accountId?: (string) | null;
|
|
4993
|
+
createdAt?: string;
|
|
4994
|
+
};
|
|
4995
|
+
|
|
4996
|
+
export type kind = 'phone' | 'email';
|
|
4997
|
+
|
|
4998
|
+
export type region = 'US' | 'GB';
|
|
4999
|
+
|
|
5000
|
+
export type status11 = 'ordering' | 'activating' | 'active' | 'suspended' | 'canceled' | 'failed';
|
|
5001
|
+
|
|
4824
5002
|
/**
|
|
4825
5003
|
* Attachment snapshot inside an edit-history entry.
|
|
4826
5004
|
*/
|
|
@@ -4891,7 +5069,7 @@ export type InboxWebhookConversation = {
|
|
|
4891
5069
|
contactId?: string;
|
|
4892
5070
|
};
|
|
4893
5071
|
|
|
4894
|
-
export type
|
|
5072
|
+
export type status12 = 'active' | 'archived';
|
|
4895
5073
|
|
|
4896
5074
|
/**
|
|
4897
5075
|
* The conversation object included in conversation lifecycle webhook payloads (conversation.started, conversation.control_changed).
|
|
@@ -4901,7 +5079,7 @@ export type InboxWebhookConversationDetail = {
|
|
|
4901
5079
|
* The platform's conversation id, equal to `conversation.platformConversationId` on inbox webhooks (whose `conversation.id` is Zernio's internal id). Both are accepted by the conversation endpoints.
|
|
4902
5080
|
*/
|
|
4903
5081
|
id: string;
|
|
4904
|
-
platform: 'instagram' | 'facebook' | 'telegram' | 'whatsapp' | 'twitter' | 'reddit' | 'bluesky' | 'sms' | 'slack' | 'tiktok';
|
|
5082
|
+
platform: 'instagram' | 'facebook' | 'telegram' | 'whatsapp' | 'twitter' | 'reddit' | 'bluesky' | 'sms' | 'slack' | 'tiktok' | 'imessage';
|
|
4905
5083
|
/**
|
|
4906
5084
|
* Same value as `id`.
|
|
4907
5085
|
*/
|
|
@@ -4929,7 +5107,7 @@ export type InboxWebhookConversationDetail = {
|
|
|
4929
5107
|
contactId?: string;
|
|
4930
5108
|
};
|
|
4931
5109
|
|
|
4932
|
-
export type
|
|
5110
|
+
export type platform5 = 'instagram' | 'facebook' | 'telegram' | 'whatsapp' | 'twitter' | 'reddit' | 'bluesky' | 'sms' | 'slack' | 'tiktok' | 'imessage';
|
|
4933
5111
|
|
|
4934
5112
|
/**
|
|
4935
5113
|
* The message object included in inbox webhook payloads.
|
|
@@ -5045,7 +5223,7 @@ export type InboxWebhookMessage = {
|
|
|
5045
5223
|
isRead: boolean;
|
|
5046
5224
|
};
|
|
5047
5225
|
|
|
5048
|
-
export type
|
|
5226
|
+
export type platform6 = 'instagram' | 'facebook' | 'telegram' | 'whatsapp' | 'sms';
|
|
5049
5227
|
|
|
5050
5228
|
export type direction2 = 'incoming' | 'outgoing';
|
|
5051
5229
|
|
|
@@ -5173,7 +5351,7 @@ export type InstagramAccountInsightsResponse = {
|
|
|
5173
5351
|
/**
|
|
5174
5352
|
* Platform that served this response.
|
|
5175
5353
|
*/
|
|
5176
|
-
export type
|
|
5354
|
+
export type platform7 = 'facebook' | 'instagram' | 'youtube' | 'linkedin' | 'tiktok';
|
|
5177
5355
|
|
|
5178
5356
|
export type metricType = 'time_series' | 'total_value';
|
|
5179
5357
|
|
|
@@ -6428,7 +6606,7 @@ export type PlatformAnalytics = {
|
|
|
6428
6606
|
errorMessage?: (string) | null;
|
|
6429
6607
|
};
|
|
6430
6608
|
|
|
6431
|
-
export type
|
|
6609
|
+
export type status13 = 'published' | 'failed';
|
|
6432
6610
|
|
|
6433
6611
|
/**
|
|
6434
6612
|
* Sync state of analytics for this platform
|
|
@@ -6610,7 +6788,7 @@ export type Post = {
|
|
|
6610
6788
|
/**
|
|
6611
6789
|
* `cancelled` is set by DELETE /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.
|
|
6612
6790
|
*/
|
|
6613
|
-
export type
|
|
6791
|
+
export type status14 = 'draft' | 'scheduled' | 'publishing' | 'published' | 'partial' | 'failed' | 'cancelled';
|
|
6614
6792
|
|
|
6615
6793
|
export type visibility2 = 'public' | 'private' | 'unlisted';
|
|
6616
6794
|
|
|
@@ -6805,9 +6983,9 @@ export type Product = {
|
|
|
6805
6983
|
publishedAt?: (string) | null;
|
|
6806
6984
|
};
|
|
6807
6985
|
|
|
6808
|
-
export type
|
|
6986
|
+
export type platform8 = 'shopify';
|
|
6809
6987
|
|
|
6810
|
-
export type
|
|
6988
|
+
export type status15 = 'active' | 'draft' | 'archived';
|
|
6811
6989
|
|
|
6812
6990
|
export type ProductImage = {
|
|
6813
6991
|
url?: string;
|
|
@@ -7227,7 +7405,7 @@ export type ReviewWebhookReview = {
|
|
|
7227
7405
|
/**
|
|
7228
7406
|
* Platform the review originated on. Currently Google Business Profile only.
|
|
7229
7407
|
*/
|
|
7230
|
-
export type
|
|
7408
|
+
export type platform9 = 'googlebusiness';
|
|
7231
7409
|
|
|
7232
7410
|
/**
|
|
7233
7411
|
* A Meta Reach & Frequency prediction. Money values in whole units of the ad account currency.
|
|
@@ -7404,7 +7582,7 @@ export type SocialAccount = {
|
|
|
7404
7582
|
};
|
|
7405
7583
|
};
|
|
7406
7584
|
|
|
7407
|
-
export type
|
|
7585
|
+
export type platform10 = 'tiktok' | 'instagram' | 'facebook' | 'youtube' | 'linkedin' | 'twitter' | 'threads' | 'pinterest' | 'reddit' | 'bluesky' | 'googlebusiness' | 'telegram' | 'snapchat' | 'discord' | 'slack' | 'whatsapp' | 'shopify' | 'wordpress' | 'linkedinads' | 'metaads' | 'pinterestads' | 'tiktokads' | 'xads' | 'googleads' | 'openaiads' | 'sms' | 'phone' | 'rcs';
|
|
7408
7586
|
|
|
7409
7587
|
/**
|
|
7410
7588
|
* Normalized, platform-agnostic ad-targeting spec. Every field is optional, an
|
|
@@ -7954,12 +8132,12 @@ export type TrackingTag = {
|
|
|
7954
8132
|
ownerAdAccountId?: string;
|
|
7955
8133
|
};
|
|
7956
8134
|
|
|
7957
|
-
export type
|
|
8135
|
+
export type platform11 = 'metaads';
|
|
7958
8136
|
|
|
7959
8137
|
/**
|
|
7960
8138
|
* Platform-native flavor of the tag (Meta: `pixel`).
|
|
7961
8139
|
*/
|
|
7962
|
-
export type
|
|
8140
|
+
export type kind2 = 'pixel' | 'tag' | 'insight_tag';
|
|
7963
8141
|
|
|
7964
8142
|
/**
|
|
7965
8143
|
* 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.
|
|
@@ -8054,7 +8232,7 @@ export type UploadTokenResponse = {
|
|
|
8054
8232
|
status?: 'pending' | 'completed' | 'expired';
|
|
8055
8233
|
};
|
|
8056
8234
|
|
|
8057
|
-
export type
|
|
8235
|
+
export type status16 = 'pending' | 'completed' | 'expired';
|
|
8058
8236
|
|
|
8059
8237
|
export type UploadTokenStatusResponse = {
|
|
8060
8238
|
token?: string;
|
|
@@ -8529,7 +8707,7 @@ export type Verification = {
|
|
|
8529
8707
|
resend?: boolean;
|
|
8530
8708
|
};
|
|
8531
8709
|
|
|
8532
|
-
export type
|
|
8710
|
+
export type status17 = 'pending' | 'approved' | 'expired' | 'max_attempts_reached' | 'canceled' | 'delivery_failed';
|
|
8533
8711
|
|
|
8534
8712
|
export type channel3 = 'sms';
|
|
8535
8713
|
|
|
@@ -8648,7 +8826,7 @@ export type WebhookLog = {
|
|
|
8648
8826
|
/**
|
|
8649
8827
|
* Delivery outcome
|
|
8650
8828
|
*/
|
|
8651
|
-
export type
|
|
8829
|
+
export type status18 = 'success' | 'failed';
|
|
8652
8830
|
|
|
8653
8831
|
/**
|
|
8654
8832
|
* Webhook payload for `account.ads.initial_sync_completed` events.
|
|
@@ -8760,7 +8938,7 @@ export type event = 'account.ads.initial_sync_completed';
|
|
|
8760
8938
|
/**
|
|
8761
8939
|
* Overall outcome of the initial sync.
|
|
8762
8940
|
*/
|
|
8763
|
-
export type
|
|
8941
|
+
export type status19 = 'success' | 'failure';
|
|
8764
8942
|
|
|
8765
8943
|
/**
|
|
8766
8944
|
* Stable category for UX branching. New values may be added; existing ones are
|
|
@@ -9387,7 +9565,7 @@ export type WebhookPayloadComment = {
|
|
|
9387
9565
|
|
|
9388
9566
|
export type event10 = 'comment.received';
|
|
9389
9567
|
|
|
9390
|
-
export type
|
|
9568
|
+
export type platform12 = 'instagram' | 'facebook' | 'threads' | 'youtube' | 'linkedin' | 'bluesky' | 'reddit' | 'tiktok';
|
|
9391
9569
|
|
|
9392
9570
|
/**
|
|
9393
9571
|
* WhatsApp only. Who answers a conversation changed: Meta Business Agent took it over,
|
|
@@ -9561,7 +9739,7 @@ export type WebhookPayloadLead = {
|
|
|
9561
9739
|
|
|
9562
9740
|
export type event14 = 'lead.received';
|
|
9563
9741
|
|
|
9564
|
-
export type
|
|
9742
|
+
export type platform13 = 'facebook';
|
|
9565
9743
|
|
|
9566
9744
|
/**
|
|
9567
9745
|
* Webhook payload for message received events
|
|
@@ -9581,7 +9759,7 @@ export type WebhookPayloadMessage = {
|
|
|
9581
9759
|
* Internal conversation ID
|
|
9582
9760
|
*/
|
|
9583
9761
|
conversationId: string;
|
|
9584
|
-
platform: 'instagram' | 'facebook' | 'telegram' | 'whatsapp' | 'sms' | 'twitter' | 'bluesky' | 'reddit' | 'slack' | 'tiktok';
|
|
9762
|
+
platform: 'instagram' | 'facebook' | 'telegram' | 'whatsapp' | 'sms' | 'twitter' | 'bluesky' | 'reddit' | 'slack' | 'tiktok' | 'imessage';
|
|
9585
9763
|
/**
|
|
9586
9764
|
* Platform's message ID
|
|
9587
9765
|
*/
|
|
@@ -10249,7 +10427,7 @@ export type WebhookPayloadMessageSent = {
|
|
|
10249
10427
|
/**
|
|
10250
10428
|
* Every platform whose outgoing messages Zernio observes. sms is absent on purpose: its carrier receipts update delivery status and never raise message.sent.
|
|
10251
10429
|
*/
|
|
10252
|
-
platform: 'instagram' | 'facebook' | 'telegram' | 'whatsapp' | 'twitter' | 'reddit' | 'bluesky' | 'slack' | 'tiktok';
|
|
10430
|
+
platform: 'instagram' | 'facebook' | 'telegram' | 'whatsapp' | 'twitter' | 'reddit' | 'bluesky' | 'slack' | 'tiktok' | 'imessage';
|
|
10253
10431
|
/**
|
|
10254
10432
|
* Platform's message ID
|
|
10255
10433
|
*/
|
|
@@ -10441,7 +10619,7 @@ export type event19 = 'message.sent';
|
|
|
10441
10619
|
/**
|
|
10442
10620
|
* Every platform whose outgoing messages Zernio observes. sms is absent on purpose: its carrier receipts update delivery status and never raise message.sent.
|
|
10443
10621
|
*/
|
|
10444
|
-
export type
|
|
10622
|
+
export type platform14 = 'instagram' | 'facebook' | 'telegram' | 'whatsapp' | 'twitter' | 'reddit' | 'bluesky' | 'slack' | 'tiktok' | 'imessage';
|
|
10445
10623
|
|
|
10446
10624
|
/**
|
|
10447
10625
|
* WhatsApp send origin. whatsapp_business_app when sent from the WhatsApp Business phone app on a Coexistence number; cloud_api when sent through Zernio (dashboard, API, or broadcasts); meta_business_agent when Meta Business Agent answered on the number. Absent on non-WhatsApp platforms. Says where WhatsApp saw the send come from, not which Zernio surface produced it: read sentVia for that.
|
|
@@ -10638,7 +10816,7 @@ export type event22 = 'post.platform.published' | 'post.platform.failed' | 'post
|
|
|
10638
10816
|
/**
|
|
10639
10817
|
* Terminal status this event fires on. Matches the event suffix.
|
|
10640
10818
|
*/
|
|
10641
|
-
export type
|
|
10819
|
+
export type status20 = 'published' | 'failed' | 'deleted';
|
|
10642
10820
|
|
|
10643
10821
|
/**
|
|
10644
10822
|
* Webhook payload for reaction received events (WhatsApp, Telegram, Slack, Instagram, Facebook Messenger)
|
|
@@ -10898,12 +11076,12 @@ export type WebhookPayloadWhatsAppAccountNameStatusUpdated = {
|
|
|
10898
11076
|
|
|
10899
11077
|
export type event28 = 'whatsapp.account.name_status_updated';
|
|
10900
11078
|
|
|
10901
|
-
export type
|
|
11079
|
+
export type platform15 = 'whatsapp';
|
|
10902
11080
|
|
|
10903
11081
|
/**
|
|
10904
11082
|
* Normalized from Meta's `decision` (REJECTED -> DECLINED, DEFERRED -> PENDING_REVIEW; the review is still open on DEFERRED, not a rejection).
|
|
10905
11083
|
*/
|
|
10906
|
-
export type
|
|
11084
|
+
export type status21 = 'APPROVED' | 'DECLINED' | 'PENDING_REVIEW';
|
|
10907
11085
|
|
|
10908
11086
|
/**
|
|
10909
11087
|
* Webhook payload for the `whatsapp.template.category_updated` event.
|
|
@@ -11052,7 +11230,7 @@ export type event30 = 'whatsapp.template.status_updated';
|
|
|
11052
11230
|
* request before the template is actually removed.
|
|
11053
11231
|
*
|
|
11054
11232
|
*/
|
|
11055
|
-
export type
|
|
11233
|
+
export type status22 = 'APPROVED' | 'REJECTED' | 'PENDING' | 'PAUSED' | 'DISABLED' | 'IN_APPEAL' | 'PENDING_DELETION';
|
|
11056
11234
|
|
|
11057
11235
|
export type WhatsAppBodyComponent = {
|
|
11058
11236
|
type: 'body';
|
|
@@ -11206,7 +11384,7 @@ export type WhatsAppSandboxSession = {
|
|
|
11206
11384
|
* list responses.
|
|
11207
11385
|
*
|
|
11208
11386
|
*/
|
|
11209
|
-
export type
|
|
11387
|
+
export type status23 = 'pending' | 'active';
|
|
11210
11388
|
|
|
11211
11389
|
export type WhatsAppTemplateButton = {
|
|
11212
11390
|
type: 'quick_reply' | 'url' | 'phone_number' | 'otp' | 'copy_code' | 'flow' | 'mpm' | 'catalog';
|
|
@@ -11364,7 +11542,7 @@ export type WorkflowExecutionEvent = {
|
|
|
11364
11542
|
|
|
11365
11543
|
export type action2 = 'execution_started' | 'execution_completed' | 'execution_exited' | 'execution_paused' | 'execution_resumed' | 'node_started' | 'node_completed' | 'node_failed' | 'node_skipped';
|
|
11366
11544
|
|
|
11367
|
-
export type
|
|
11545
|
+
export type status24 = 'success' | 'failed' | 'pending';
|
|
11368
11546
|
|
|
11369
11547
|
/**
|
|
11370
11548
|
* A node in a workflow graph. `config` shape depends on `type`.
|
|
@@ -21670,7 +21848,7 @@ export type ListInboxConversationsData = {
|
|
|
21670
21848
|
/**
|
|
21671
21849
|
* Filter by platform
|
|
21672
21850
|
*/
|
|
21673
|
-
platform?: 'facebook' | 'instagram' | 'twitter' | 'bluesky' | 'reddit' | 'telegram' | 'whatsapp';
|
|
21851
|
+
platform?: 'facebook' | 'instagram' | 'twitter' | 'bluesky' | 'reddit' | 'telegram' | 'whatsapp' | 'imessage';
|
|
21674
21852
|
/**
|
|
21675
21853
|
* Filter by profile ID
|
|
21676
21854
|
*/
|
|
@@ -21713,6 +21891,10 @@ export type ListInboxConversationsResponse = ({
|
|
|
21713
21891
|
* WhatsApp only, present once Meta Business Agent has touched the thread. ai_agent: the agent answers and new inbound arrive flagged metadata.standby; app: you hold control; other: another partner app does. Change it with POST /v1/inbox/conversations/{conversationId}/thread-control.
|
|
21714
21892
|
*/
|
|
21715
21893
|
threadControl?: 'app' | 'ai_agent' | 'other';
|
|
21894
|
+
/**
|
|
21895
|
+
* iMessage only, true for a group thread. Manage it through the /v1/imessage/groups/{conversationId} endpoints.
|
|
21896
|
+
*/
|
|
21897
|
+
isGroup?: boolean;
|
|
21716
21898
|
/**
|
|
21717
21899
|
* Direct link to open the conversation on the platform (if available)
|
|
21718
21900
|
*/
|
|
@@ -22099,7 +22281,7 @@ export type SearchInboxConversationsData = {
|
|
|
22099
22281
|
/**
|
|
22100
22282
|
* Filter by platform (searchable platforms only)
|
|
22101
22283
|
*/
|
|
22102
|
-
platform?: 'facebook' | 'instagram' | 'telegram' | 'whatsapp' | 'sms' | 'slack';
|
|
22284
|
+
platform?: 'facebook' | 'instagram' | 'telegram' | 'whatsapp' | 'sms' | 'slack' | 'imessage';
|
|
22103
22285
|
/**
|
|
22104
22286
|
* Filter by profile ID
|
|
22105
22287
|
*/
|
|
@@ -22570,7 +22752,7 @@ export type SendInboxMessageData = {
|
|
|
22570
22752
|
*/
|
|
22571
22753
|
category?: 'utility';
|
|
22572
22754
|
/**
|
|
22573
|
-
* WhatsApp
|
|
22755
|
+
* WhatsApp and iMessage. Set false to send the message without a link-preview thumbnail (WhatsApp: the first URL; iMessage: every link renders as plain text). Defaults to true, which is how every WhatsApp text has been sent to date. Ignored on other platforms. Accepted on the JSON body only, not on multipart requests.
|
|
22574
22756
|
*/
|
|
22575
22757
|
linkPreview?: boolean;
|
|
22576
22758
|
/**
|
|
@@ -22590,6 +22772,22 @@ export type SendInboxMessageData = {
|
|
|
22590
22772
|
*
|
|
22591
22773
|
*/
|
|
22592
22774
|
voiceNote?: boolean;
|
|
22775
|
+
/**
|
|
22776
|
+
* iMessage only (JSON body only). Bold title line rendered above the message text. Rejected with 400 on other platforms; ignored on voice-message sends.
|
|
22777
|
+
*/
|
|
22778
|
+
subject?: string;
|
|
22779
|
+
/**
|
|
22780
|
+
* iMessage only (JSON body only). Apple screen/bubble animation played when the message arrives. Rejected with 400 on other platforms.
|
|
22781
|
+
*/
|
|
22782
|
+
effect?: 'slam' | 'loud' | 'gentle' | 'invisibleInk' | 'echo' | 'spotlight' | 'balloons' | 'confetti' | 'love' | 'lasers' | 'fireworks' | 'shootingStar' | 'celebration';
|
|
22783
|
+
/**
|
|
22784
|
+
* iMessage only (JSON body only). When `true`, attaches the sender's contact card (vCard) so the recipient can save the sender. Counts as message content on its own, so `message` becomes optional.
|
|
22785
|
+
*/
|
|
22786
|
+
contactCard?: boolean;
|
|
22787
|
+
/**
|
|
22788
|
+
* iMessage only (JSON body only). Overrides the delivery channel for this one send; the provider otherwise picks it automatically. The sender must carry the matching add-on (SMS, RCS or WhatsApp), or the send fails. Not a default to set on every request. Rejected with 400 on other platforms.
|
|
22789
|
+
*/
|
|
22790
|
+
channel?: 'imessage' | 'sms' | 'rcs' | 'whatsapp';
|
|
22593
22791
|
/**
|
|
22594
22792
|
* Quick reply buttons. Mutually exclusive with buttons. Max 13 items.
|
|
22595
22793
|
*/
|
|
@@ -23082,7 +23280,7 @@ export type SendInboxMessageData = {
|
|
|
23082
23280
|
*/
|
|
23083
23281
|
replyTo?: string;
|
|
23084
23282
|
/**
|
|
23085
|
-
* WhatsApp
|
|
23283
|
+
* WhatsApp and iMessage. Send a location pin (on iMessage it renders as a native map bubble).
|
|
23086
23284
|
*/
|
|
23087
23285
|
location?: {
|
|
23088
23286
|
/**
|
|
@@ -23293,7 +23491,7 @@ export type EditInboxMessageData = {
|
|
|
23293
23491
|
*/
|
|
23294
23492
|
conversationId: string;
|
|
23295
23493
|
/**
|
|
23296
|
-
* The
|
|
23494
|
+
* The platform message ID to edit (iMessage also accepts the Zernio message id)
|
|
23297
23495
|
*/
|
|
23298
23496
|
messageId: string;
|
|
23299
23497
|
};
|
|
@@ -26151,6 +26349,437 @@ export type DialVoiceWebCallError = ({
|
|
|
26151
26349
|
error?: string;
|
|
26152
26350
|
} | unknown);
|
|
26153
26351
|
|
|
26352
|
+
export type ListImessageSendersResponse = ({
|
|
26353
|
+
senders?: Array<ImessageSender>;
|
|
26354
|
+
});
|
|
26355
|
+
|
|
26356
|
+
export type ListImessageSendersError = ({
|
|
26357
|
+
error?: string;
|
|
26358
|
+
} | unknown);
|
|
26359
|
+
|
|
26360
|
+
export type RegisterImessageSenderData = {
|
|
26361
|
+
body: {
|
|
26362
|
+
/**
|
|
26363
|
+
* Profile to attach the sender to
|
|
26364
|
+
*/
|
|
26365
|
+
profileId: string;
|
|
26366
|
+
/**
|
|
26367
|
+
* The provider-provisioned sender handle: a phone number in international format (e.g. +18305551234) or an email address
|
|
26368
|
+
*/
|
|
26369
|
+
sender: string;
|
|
26370
|
+
displayName?: string;
|
|
26371
|
+
/**
|
|
26372
|
+
* Delivery provider. Defaults to the platform default.
|
|
26373
|
+
*/
|
|
26374
|
+
provider?: 'loopmessage';
|
|
26375
|
+
};
|
|
26376
|
+
};
|
|
26377
|
+
|
|
26378
|
+
export type RegisterImessageSenderResponse = ({
|
|
26379
|
+
success?: boolean;
|
|
26380
|
+
account?: ImessageSender;
|
|
26381
|
+
});
|
|
26382
|
+
|
|
26383
|
+
export type RegisterImessageSenderError = (ErrorResponse | {
|
|
26384
|
+
error?: string;
|
|
26385
|
+
} | unknown);
|
|
26386
|
+
|
|
26387
|
+
export type ListImessageSenderOrdersData = {
|
|
26388
|
+
query?: {
|
|
26389
|
+
includeCanceled?: boolean;
|
|
26390
|
+
};
|
|
26391
|
+
};
|
|
26392
|
+
|
|
26393
|
+
export type ListImessageSenderOrdersResponse = ({
|
|
26394
|
+
senders?: Array<ImessageSenderLifecycle>;
|
|
26395
|
+
});
|
|
26396
|
+
|
|
26397
|
+
export type ListImessageSenderOrdersError = (ErrorResponse | {
|
|
26398
|
+
error?: string;
|
|
26399
|
+
} | unknown);
|
|
26400
|
+
|
|
26401
|
+
export type OrderImessageSenderData = {
|
|
26402
|
+
body: {
|
|
26403
|
+
profileId: string;
|
|
26404
|
+
kind: 'phone' | 'email';
|
|
26405
|
+
/**
|
|
26406
|
+
* Required for phone senders. Without availableNumberId the number is carrier-assigned in this region and revealed once the sender activates.
|
|
26407
|
+
*/
|
|
26408
|
+
region?: 'US' | 'GB';
|
|
26409
|
+
/**
|
|
26410
|
+
* A number from GET /v1/imessage/senders/available-numbers. It is assigned and activated on order instead of waiting for provisioning. Phone senders only.
|
|
26411
|
+
*/
|
|
26412
|
+
availableNumberId?: string;
|
|
26413
|
+
/**
|
|
26414
|
+
* US phone senders only. Preferred area for a carrier-assigned number (ignored with availableNumberId).
|
|
26415
|
+
*/
|
|
26416
|
+
zipCode?: string;
|
|
26417
|
+
/**
|
|
26418
|
+
* Local part for email senders (required for kind: email)
|
|
26419
|
+
*/
|
|
26420
|
+
emailName?: string;
|
|
26421
|
+
/**
|
|
26422
|
+
* Domain for email senders (required for kind: email)
|
|
26423
|
+
*/
|
|
26424
|
+
emailDomain?: string;
|
|
26425
|
+
displayName?: string;
|
|
26426
|
+
/**
|
|
26427
|
+
* Idempotency key for safe retries
|
|
26428
|
+
*/
|
|
26429
|
+
purchaseIntentId?: string;
|
|
26430
|
+
/**
|
|
26431
|
+
* Contact card (vCard) attached to the sender, shown when recipients save it. Required before sending with contactCard.
|
|
26432
|
+
*/
|
|
26433
|
+
contact?: {
|
|
26434
|
+
firstName: string;
|
|
26435
|
+
lastName?: string;
|
|
26436
|
+
photoUrl?: string;
|
|
26437
|
+
};
|
|
26438
|
+
};
|
|
26439
|
+
};
|
|
26440
|
+
|
|
26441
|
+
export type OrderImessageSenderResponse = ({
|
|
26442
|
+
success?: boolean;
|
|
26443
|
+
sender?: ImessageSenderLifecycle;
|
|
26444
|
+
});
|
|
26445
|
+
|
|
26446
|
+
export type OrderImessageSenderError = (ErrorResponse | {
|
|
26447
|
+
error?: string;
|
|
26448
|
+
} | unknown);
|
|
26449
|
+
|
|
26450
|
+
export type GetImessageSenderData = {
|
|
26451
|
+
path: {
|
|
26452
|
+
senderId: string;
|
|
26453
|
+
};
|
|
26454
|
+
};
|
|
26455
|
+
|
|
26456
|
+
export type GetImessageSenderResponse = ({
|
|
26457
|
+
success?: boolean;
|
|
26458
|
+
sender?: ImessageSenderLifecycle;
|
|
26459
|
+
/**
|
|
26460
|
+
* Provider platform health for this sender; null when the provider cannot report it.
|
|
26461
|
+
*/
|
|
26462
|
+
health?: {
|
|
26463
|
+
imessage?: 'active' | 'degradation' | 'outage';
|
|
26464
|
+
whatsapp?: 'active' | 'degradation' | 'outage';
|
|
26465
|
+
} | null;
|
|
26466
|
+
/**
|
|
26467
|
+
* Provider-hosted opt-in page for this sender (opens Messages on any Apple device); null until the sender is active or when the provider cannot report it.
|
|
26468
|
+
*/
|
|
26469
|
+
imessageLink?: (string) | null;
|
|
26470
|
+
});
|
|
26471
|
+
|
|
26472
|
+
export type GetImessageSenderError = (ErrorResponse | {
|
|
26473
|
+
error?: string;
|
|
26474
|
+
} | unknown);
|
|
26475
|
+
|
|
26476
|
+
export type UpdateImessageSenderData = {
|
|
26477
|
+
body: {
|
|
26478
|
+
displayName?: string;
|
|
26479
|
+
contact?: {
|
|
26480
|
+
firstName: string;
|
|
26481
|
+
lastName?: string;
|
|
26482
|
+
/**
|
|
26483
|
+
* Square image
|
|
26484
|
+
*/
|
|
26485
|
+
photoUrl?: string;
|
|
26486
|
+
};
|
|
26487
|
+
};
|
|
26488
|
+
path: {
|
|
26489
|
+
senderId: string;
|
|
26490
|
+
};
|
|
26491
|
+
};
|
|
26492
|
+
|
|
26493
|
+
export type UpdateImessageSenderResponse = ({
|
|
26494
|
+
success?: boolean;
|
|
26495
|
+
sender?: ImessageSenderLifecycle;
|
|
26496
|
+
});
|
|
26497
|
+
|
|
26498
|
+
export type UpdateImessageSenderError = (ErrorResponse | {
|
|
26499
|
+
error?: string;
|
|
26500
|
+
} | unknown);
|
|
26501
|
+
|
|
26502
|
+
export type CancelImessageSenderData = {
|
|
26503
|
+
path: {
|
|
26504
|
+
senderId: string;
|
|
26505
|
+
};
|
|
26506
|
+
};
|
|
26507
|
+
|
|
26508
|
+
export type CancelImessageSenderResponse = ({
|
|
26509
|
+
success?: boolean;
|
|
26510
|
+
sender?: ImessageSenderLifecycle;
|
|
26511
|
+
});
|
|
26512
|
+
|
|
26513
|
+
export type CancelImessageSenderError = (ErrorResponse | {
|
|
26514
|
+
error?: string;
|
|
26515
|
+
} | unknown);
|
|
26516
|
+
|
|
26517
|
+
export type ListImessageAudienceData = {
|
|
26518
|
+
query?: {
|
|
26519
|
+
/**
|
|
26520
|
+
* Limit to one sender account
|
|
26521
|
+
*/
|
|
26522
|
+
accountId?: string;
|
|
26523
|
+
limit?: number;
|
|
26524
|
+
/**
|
|
26525
|
+
* Matches the contact handle or name
|
|
26526
|
+
*/
|
|
26527
|
+
search?: string;
|
|
26528
|
+
skip?: number;
|
|
26529
|
+
status?: 'subscribed' | 'unsubscribed';
|
|
26530
|
+
};
|
|
26531
|
+
};
|
|
26532
|
+
|
|
26533
|
+
export type ListImessageAudienceResponse = ({
|
|
26534
|
+
contacts?: Array<ImessageAudienceContact>;
|
|
26535
|
+
total?: number;
|
|
26536
|
+
limit?: number;
|
|
26537
|
+
skip?: number;
|
|
26538
|
+
});
|
|
26539
|
+
|
|
26540
|
+
export type ListImessageAudienceError = (ErrorResponse | {
|
|
26541
|
+
error?: string;
|
|
26542
|
+
} | unknown);
|
|
26543
|
+
|
|
26544
|
+
export type SetImessageSubscriptionData = {
|
|
26545
|
+
body: {
|
|
26546
|
+
accountId: string;
|
|
26547
|
+
conversationId: string;
|
|
26548
|
+
subscribed: boolean;
|
|
26549
|
+
};
|
|
26550
|
+
};
|
|
26551
|
+
|
|
26552
|
+
export type SetImessageSubscriptionResponse = ({
|
|
26553
|
+
success?: boolean;
|
|
26554
|
+
conversationId?: string;
|
|
26555
|
+
subscribed?: boolean;
|
|
26556
|
+
});
|
|
26557
|
+
|
|
26558
|
+
export type SetImessageSubscriptionError = (ErrorResponse | {
|
|
26559
|
+
error?: string;
|
|
26560
|
+
} | unknown);
|
|
26561
|
+
|
|
26562
|
+
export type CreateImessageOptInLinkData = {
|
|
26563
|
+
body: {
|
|
26564
|
+
/**
|
|
26565
|
+
* Prefilled message text. Must contain the literal `[opt-in-code]` placeholder, e.g. "Hi! My code is [opt-in-code]".
|
|
26566
|
+
*/
|
|
26567
|
+
body: string;
|
|
26568
|
+
/**
|
|
26569
|
+
* Custom key/values (e.g. leadId, campaign) echoed back on the opt-in message.
|
|
26570
|
+
*/
|
|
26571
|
+
parameters?: {
|
|
26572
|
+
[key: string]: (string);
|
|
26573
|
+
};
|
|
26574
|
+
/**
|
|
26575
|
+
* Your own code in place of the generated one (3-8 characters, no spaces or `#`, `!`, `-`). An unredeemed link lives 24 hours; re-issuing with the same code replaces it, and the earlier URL stops matching.
|
|
26576
|
+
*/
|
|
26577
|
+
optInCode?: string;
|
|
26578
|
+
};
|
|
26579
|
+
path: {
|
|
26580
|
+
senderId: string;
|
|
26581
|
+
};
|
|
26582
|
+
};
|
|
26583
|
+
|
|
26584
|
+
export type CreateImessageOptInLinkResponse = ({
|
|
26585
|
+
success?: boolean;
|
|
26586
|
+
link?: {
|
|
26587
|
+
id?: string;
|
|
26588
|
+
/**
|
|
26589
|
+
* imessage:// deep link
|
|
26590
|
+
*/
|
|
26591
|
+
imessage?: string;
|
|
26592
|
+
/**
|
|
26593
|
+
* sms: deep link for non-Apple devices
|
|
26594
|
+
*/
|
|
26595
|
+
sms?: (string) | null;
|
|
26596
|
+
whatsapp?: (string) | null;
|
|
26597
|
+
/**
|
|
26598
|
+
* Hosted landing URL that picks the right scheme for the device
|
|
26599
|
+
*/
|
|
26600
|
+
url?: string;
|
|
26601
|
+
};
|
|
26602
|
+
});
|
|
26603
|
+
|
|
26604
|
+
export type CreateImessageOptInLinkError = (ErrorResponse | {
|
|
26605
|
+
error?: string;
|
|
26606
|
+
} | unknown);
|
|
26607
|
+
|
|
26608
|
+
export type ListImessageAvailableNumbersData = {
|
|
26609
|
+
query?: {
|
|
26610
|
+
region?: 'US' | 'GB';
|
|
26611
|
+
};
|
|
26612
|
+
};
|
|
26613
|
+
|
|
26614
|
+
export type ListImessageAvailableNumbersResponse = ({
|
|
26615
|
+
numbers?: Array<{
|
|
26616
|
+
/**
|
|
26617
|
+
* Pass as availableNumberId when ordering
|
|
26618
|
+
*/
|
|
26619
|
+
id?: string;
|
|
26620
|
+
/**
|
|
26621
|
+
* E.164
|
|
26622
|
+
*/
|
|
26623
|
+
phone?: string;
|
|
26624
|
+
region?: string;
|
|
26625
|
+
}>;
|
|
26626
|
+
region?: (string) | null;
|
|
26627
|
+
});
|
|
26628
|
+
|
|
26629
|
+
export type ListImessageAvailableNumbersError = (ErrorResponse | {
|
|
26630
|
+
error?: string;
|
|
26631
|
+
} | unknown);
|
|
26632
|
+
|
|
26633
|
+
export type ReserveImessageAvailableNumberData = {
|
|
26634
|
+
path: {
|
|
26635
|
+
numberId: string;
|
|
26636
|
+
};
|
|
26637
|
+
};
|
|
26638
|
+
|
|
26639
|
+
export type ReserveImessageAvailableNumberResponse = ({
|
|
26640
|
+
success?: boolean;
|
|
26641
|
+
numberId?: string;
|
|
26642
|
+
expiresInSeconds?: number;
|
|
26643
|
+
});
|
|
26644
|
+
|
|
26645
|
+
export type ReserveImessageAvailableNumberError = (ErrorResponse | {
|
|
26646
|
+
error?: string;
|
|
26647
|
+
} | unknown);
|
|
26648
|
+
|
|
26649
|
+
export type CreateImessageGroupData = {
|
|
26650
|
+
body: {
|
|
26651
|
+
/**
|
|
26652
|
+
* The iMessage account (sender) that opens the group
|
|
26653
|
+
*/
|
|
26654
|
+
accountId: string;
|
|
26655
|
+
/**
|
|
26656
|
+
* Participant handles (E.164 phones or iMessage emails)
|
|
26657
|
+
*/
|
|
26658
|
+
contacts: Array<(string)>;
|
|
26659
|
+
/**
|
|
26660
|
+
* The first message
|
|
26661
|
+
*/
|
|
26662
|
+
text: string;
|
|
26663
|
+
/**
|
|
26664
|
+
* Group name (required for WhatsApp groups)
|
|
26665
|
+
*/
|
|
26666
|
+
name?: string;
|
|
26667
|
+
channel?: 'imessage' | 'sms' | 'rcs' | 'whatsapp';
|
|
26668
|
+
};
|
|
26669
|
+
};
|
|
26670
|
+
|
|
26671
|
+
export type CreateImessageGroupResponse = ({
|
|
26672
|
+
success?: boolean;
|
|
26673
|
+
/**
|
|
26674
|
+
* The provider's request id (not the group id)
|
|
26675
|
+
*/
|
|
26676
|
+
requestId?: string;
|
|
26677
|
+
});
|
|
26678
|
+
|
|
26679
|
+
export type CreateImessageGroupError = (ErrorResponse | {
|
|
26680
|
+
error?: string;
|
|
26681
|
+
} | unknown);
|
|
26682
|
+
|
|
26683
|
+
export type GetImessageGroupData = {
|
|
26684
|
+
path: {
|
|
26685
|
+
/**
|
|
26686
|
+
* The inbox conversation id (or the provider group id)
|
|
26687
|
+
*/
|
|
26688
|
+
conversationId: string;
|
|
26689
|
+
};
|
|
26690
|
+
query: {
|
|
26691
|
+
accountId: string;
|
|
26692
|
+
};
|
|
26693
|
+
};
|
|
26694
|
+
|
|
26695
|
+
export type GetImessageGroupResponse = ({
|
|
26696
|
+
success?: boolean;
|
|
26697
|
+
conversationId?: string;
|
|
26698
|
+
group?: {
|
|
26699
|
+
/**
|
|
26700
|
+
* Provider group id
|
|
26701
|
+
*/
|
|
26702
|
+
id?: string;
|
|
26703
|
+
name?: (string) | null;
|
|
26704
|
+
participants?: Array<(string)>;
|
|
26705
|
+
channel?: (string) | null;
|
|
26706
|
+
createdAt?: (string) | null;
|
|
26707
|
+
};
|
|
26708
|
+
});
|
|
26709
|
+
|
|
26710
|
+
export type GetImessageGroupError = (unknown | {
|
|
26711
|
+
error?: string;
|
|
26712
|
+
});
|
|
26713
|
+
|
|
26714
|
+
export type UpdateImessageGroupData = {
|
|
26715
|
+
body: {
|
|
26716
|
+
accountId: string;
|
|
26717
|
+
name?: string;
|
|
26718
|
+
/**
|
|
26719
|
+
* Public HTTPS image URL; empty string removes the photo
|
|
26720
|
+
*/
|
|
26721
|
+
photoUrl?: string;
|
|
26722
|
+
};
|
|
26723
|
+
path: {
|
|
26724
|
+
conversationId: string;
|
|
26725
|
+
};
|
|
26726
|
+
};
|
|
26727
|
+
|
|
26728
|
+
export type UpdateImessageGroupResponse = ({
|
|
26729
|
+
success?: boolean;
|
|
26730
|
+
conversationId?: string;
|
|
26731
|
+
});
|
|
26732
|
+
|
|
26733
|
+
export type UpdateImessageGroupError = (unknown | {
|
|
26734
|
+
error?: string;
|
|
26735
|
+
});
|
|
26736
|
+
|
|
26737
|
+
export type AddImessageGroupParticipantData = {
|
|
26738
|
+
body: {
|
|
26739
|
+
accountId: string;
|
|
26740
|
+
/**
|
|
26741
|
+
* E.164 phone or iMessage email
|
|
26742
|
+
*/
|
|
26743
|
+
contact: string;
|
|
26744
|
+
};
|
|
26745
|
+
path: {
|
|
26746
|
+
conversationId: string;
|
|
26747
|
+
};
|
|
26748
|
+
};
|
|
26749
|
+
|
|
26750
|
+
export type AddImessageGroupParticipantResponse = ({
|
|
26751
|
+
success?: boolean;
|
|
26752
|
+
conversationId?: string;
|
|
26753
|
+
contact?: string;
|
|
26754
|
+
});
|
|
26755
|
+
|
|
26756
|
+
export type AddImessageGroupParticipantError = (unknown | {
|
|
26757
|
+
error?: string;
|
|
26758
|
+
});
|
|
26759
|
+
|
|
26760
|
+
export type RemoveImessageGroupParticipantData = {
|
|
26761
|
+
path: {
|
|
26762
|
+
conversationId: string;
|
|
26763
|
+
};
|
|
26764
|
+
query: {
|
|
26765
|
+
accountId: string;
|
|
26766
|
+
/**
|
|
26767
|
+
* E.164 phone or iMessage email
|
|
26768
|
+
*/
|
|
26769
|
+
contact: string;
|
|
26770
|
+
};
|
|
26771
|
+
};
|
|
26772
|
+
|
|
26773
|
+
export type RemoveImessageGroupParticipantResponse = ({
|
|
26774
|
+
success?: boolean;
|
|
26775
|
+
conversationId?: string;
|
|
26776
|
+
contact?: string;
|
|
26777
|
+
});
|
|
26778
|
+
|
|
26779
|
+
export type RemoveImessageGroupParticipantError = (unknown | {
|
|
26780
|
+
error?: string;
|
|
26781
|
+
});
|
|
26782
|
+
|
|
26154
26783
|
export type SendSmsData = {
|
|
26155
26784
|
body: {
|
|
26156
26785
|
/**
|
|
@@ -27608,6 +28237,16 @@ export type ListPhoneNumbersResponse = ({
|
|
|
27608
28237
|
*/
|
|
27609
28238
|
callingEnabled?: boolean;
|
|
27610
28239
|
}>;
|
|
28240
|
+
/**
|
|
28241
|
+
* iMessage phone senders (see /v1/imessage/senders/order). Hosted
|
|
28242
|
+
* by the iMessage provider, not on your Telnyx numbers: SMS and
|
|
28243
|
+
* Calls can never be enabled on them, and they bill as iMessage
|
|
28244
|
+
* senders. `handle` is null until the carrier assigns the number
|
|
28245
|
+
* at activation. Included only on the default and `status=active`
|
|
28246
|
+
* views.
|
|
28247
|
+
*
|
|
28248
|
+
*/
|
|
28249
|
+
imessage?: Array<ImessageSenderLifecycle>;
|
|
27611
28250
|
/**
|
|
27612
28251
|
* The shared WhatsApp sandbox (one Zernio-owned number, all users test
|
|
27613
28252
|
* against it). Present when the sandbox is configured; null otherwise.
|
|
@@ -28092,6 +28731,16 @@ export type GetWhatsAppPhoneNumbersResponse = ({
|
|
|
28092
28731
|
*/
|
|
28093
28732
|
callingEnabled?: boolean;
|
|
28094
28733
|
}>;
|
|
28734
|
+
/**
|
|
28735
|
+
* iMessage phone senders (see /v1/imessage/senders/order). Hosted
|
|
28736
|
+
* by the iMessage provider, not on your Telnyx numbers: SMS and
|
|
28737
|
+
* Calls can never be enabled on them, and they bill as iMessage
|
|
28738
|
+
* senders. `handle` is null until the carrier assigns the number
|
|
28739
|
+
* at activation. Included only on the default and `status=active`
|
|
28740
|
+
* views.
|
|
28741
|
+
*
|
|
28742
|
+
*/
|
|
28743
|
+
imessage?: Array<ImessageSenderLifecycle>;
|
|
28095
28744
|
/**
|
|
28096
28745
|
* The shared WhatsApp sandbox (one Zernio-owned number, all users test
|
|
28097
28746
|
* against it). Present when the sandbox is configured; null otherwise.
|
|
@@ -31649,7 +32298,7 @@ export type CreateBroadcastData = {
|
|
|
31649
32298
|
body: {
|
|
31650
32299
|
profileId: string;
|
|
31651
32300
|
accountId: string;
|
|
31652
|
-
platform: 'instagram' | 'facebook' | 'telegram' | 'twitter' | 'bluesky' | 'reddit' | 'whatsapp' | 'sms' | 'slack';
|
|
32301
|
+
platform: 'instagram' | 'facebook' | 'telegram' | 'twitter' | 'bluesky' | 'reddit' | 'whatsapp' | 'sms' | 'slack' | 'imessage';
|
|
31653
32302
|
name: string;
|
|
31654
32303
|
description?: string;
|
|
31655
32304
|
message?: {
|
|
@@ -34735,7 +35384,61 @@ export type ListAdSetsResponse = ({
|
|
|
34735
35384
|
profileId?: string;
|
|
34736
35385
|
currency?: (string) | null;
|
|
34737
35386
|
budget?: {
|
|
34738
|
-
|
|
35387
|
+
amount?: number;
|
|
35388
|
+
type?: 'daily' | 'lifetime';
|
|
35389
|
+
/**
|
|
35390
|
+
* LinkedIn only. The campaign's `dailyBudget`. LinkedIn allows a daily AND a lifetime budget on the same campaign, which `amount`/`type` cannot express (daily wins there); read `daily` and `lifetime` to see both.
|
|
35391
|
+
*/
|
|
35392
|
+
daily?: number;
|
|
35393
|
+
/**
|
|
35394
|
+
* LinkedIn only. The campaign's `totalBudget`, readable even when a daily budget is also set.
|
|
35395
|
+
*/
|
|
35396
|
+
lifetime?: number;
|
|
35397
|
+
/**
|
|
35398
|
+
* LinkedIn only. The campaign's `pacingStrategy`: how fast LinkedIn may spend the budget. Typically LINEAR or ACCELERATED; the list is open.
|
|
35399
|
+
*/
|
|
35400
|
+
pacing?: string;
|
|
35401
|
+
} | null;
|
|
35402
|
+
/**
|
|
35403
|
+
* The ad set's own flight dates, as synced from the platform. On LinkedIn this is the campaign's `runSchedule`. Null when the platform reports none.
|
|
35404
|
+
*/
|
|
35405
|
+
schedule?: {
|
|
35406
|
+
startDate?: string;
|
|
35407
|
+
/**
|
|
35408
|
+
* Absent when the ad set runs until it is stopped.
|
|
35409
|
+
*/
|
|
35410
|
+
endDate?: string;
|
|
35411
|
+
} | null;
|
|
35412
|
+
/**
|
|
35413
|
+
* The audience this ad set delivers to, as the platform reports it. LinkedIn only
|
|
35414
|
+
* today; null for every other platform and for LinkedIn ad sets not yet re-synced.
|
|
35415
|
+
*
|
|
35416
|
+
* `include` and `exclude` are the campaign's `targetingCriteria` verbatim, so they
|
|
35417
|
+
* can be read, edited and sent back without reconstructing them from our normalized
|
|
35418
|
+
* targeting spec. Exclusions were previously not readable at all.
|
|
35419
|
+
*
|
|
35420
|
+
*/
|
|
35421
|
+
targeting?: {
|
|
35422
|
+
/**
|
|
35423
|
+
* LinkedIn `targetingCriteria.include`, verbatim (an `and` of `or` facet clauses).
|
|
35424
|
+
*/
|
|
35425
|
+
include?: {
|
|
35426
|
+
[key: string]: unknown;
|
|
35427
|
+
};
|
|
35428
|
+
/**
|
|
35429
|
+
* LinkedIn `targetingCriteria.exclude`, verbatim. Absent when the campaign excludes nothing.
|
|
35430
|
+
*/
|
|
35431
|
+
exclude?: {
|
|
35432
|
+
[key: string]: unknown;
|
|
35433
|
+
};
|
|
35434
|
+
/**
|
|
35435
|
+
* LinkedIn audience expansion: whether LinkedIn may also serve to members similar to the criteria.
|
|
35436
|
+
*/
|
|
35437
|
+
audienceExpansionEnabled?: boolean;
|
|
35438
|
+
/**
|
|
35439
|
+
* Whether the campaign may deliver on the LinkedIn Audience Network, off LinkedIn itself.
|
|
35440
|
+
*/
|
|
35441
|
+
offsiteDeliveryEnabled?: boolean;
|
|
34739
35442
|
} | null;
|
|
34740
35443
|
isExternal?: (boolean) | null;
|
|
34741
35444
|
platformCreatedAt?: (string) | null;
|
|
@@ -40898,6 +41601,10 @@ export type EstimateAdReachResponse = ({
|
|
|
40898
41601
|
* Optional estimated daily reach/results at the given budget, when the platform returns it.
|
|
40899
41602
|
*/
|
|
40900
41603
|
daily?: (number) | null;
|
|
41604
|
+
/**
|
|
41605
|
+
* LinkedIn only. LinkedIn's `audienceCounts.active`, verbatim: the active subset of the same audience `lower`/`upper` carry as its `total`. Absent when LinkedIn does not report it; `0` is a real answer, not a missing one.
|
|
41606
|
+
*/
|
|
41607
|
+
active?: (number) | null;
|
|
40901
41608
|
/**
|
|
40902
41609
|
* Currency of any monetary fields in the estimate, when applicable.
|
|
40903
41610
|
*/
|