@zernio/node 0.2.37 → 0.2.39
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 +18 -13
- package/dist/index.d.mts +629 -247
- package/dist/index.d.ts +629 -247
- package/dist/index.js +104 -69
- package/dist/index.mjs +104 -69
- package/package.json +1 -1
- package/src/client.ts +34 -24
- package/src/generated/sdk.gen.ts +192 -127
- package/src/generated/types.gen.ts +661 -274
|
@@ -107,11 +107,41 @@ export type Ad = {
|
|
|
107
107
|
campaignName?: string;
|
|
108
108
|
adSetName?: string;
|
|
109
109
|
/**
|
|
110
|
-
* Platform-specific creative data
|
|
110
|
+
* Platform-specific creative data. Fields vary by platform.
|
|
111
111
|
*/
|
|
112
112
|
creative?: {
|
|
113
|
-
|
|
114
|
-
|
|
113
|
+
/**
|
|
114
|
+
* Primary thumbnail/image URL
|
|
115
|
+
*/
|
|
116
|
+
thumbnailUrl?: string;
|
|
117
|
+
/**
|
|
118
|
+
* Alternative image URL
|
|
119
|
+
*/
|
|
120
|
+
imageUrl?: string;
|
|
121
|
+
/**
|
|
122
|
+
* All media URLs for this ad (carousel images, multiple assets). Populated for Meta (carousel child_attachments), Google Ads (responsive display marketing_images), and LinkedIn (multi-image posts).
|
|
123
|
+
*/
|
|
124
|
+
mediaUrls?: Array<(string)>;
|
|
125
|
+
/**
|
|
126
|
+
* Ad copy/text
|
|
127
|
+
*/
|
|
128
|
+
body?: string;
|
|
129
|
+
/**
|
|
130
|
+
* Google Ads headline
|
|
131
|
+
*/
|
|
132
|
+
googleHeadline?: string;
|
|
133
|
+
/**
|
|
134
|
+
* Google Ads description
|
|
135
|
+
*/
|
|
136
|
+
googleDescription?: string;
|
|
137
|
+
/**
|
|
138
|
+
* Destination URL
|
|
139
|
+
*/
|
|
140
|
+
linkUrl?: string;
|
|
141
|
+
pinterestImageUrl?: string;
|
|
142
|
+
pinterestTitle?: string;
|
|
143
|
+
pinterestDescription?: string;
|
|
144
|
+
} | null;
|
|
115
145
|
targeting?: {
|
|
116
146
|
[key: string]: unknown;
|
|
117
147
|
};
|
|
@@ -179,6 +209,55 @@ export type AdMetrics = {
|
|
|
179
209
|
lastSyncedAt?: string;
|
|
180
210
|
};
|
|
181
211
|
|
|
212
|
+
/**
|
|
213
|
+
* Ad set (or ad group/line item depending on platform) with rolled-up metrics and child ads
|
|
214
|
+
*/
|
|
215
|
+
export type AdTreeAdSet = {
|
|
216
|
+
platformAdSetId?: string;
|
|
217
|
+
adSetName?: string;
|
|
218
|
+
/**
|
|
219
|
+
* Derived from child ad statuses
|
|
220
|
+
*/
|
|
221
|
+
status?: 'active' | 'paused' | 'pending_review' | 'rejected' | 'completed' | 'cancelled' | 'error';
|
|
222
|
+
adCount?: number;
|
|
223
|
+
budget?: {
|
|
224
|
+
amount?: number;
|
|
225
|
+
type?: 'daily' | 'lifetime';
|
|
226
|
+
} | null;
|
|
227
|
+
metrics?: AdMetrics;
|
|
228
|
+
/**
|
|
229
|
+
* Individual ads within this ad set (capped at 100). Returns a subset of Ad fields from the aggregation (core fields like _id, name, platform, status, budget, metrics, creative, goal are included; targeting and schedule may be absent).
|
|
230
|
+
*/
|
|
231
|
+
ads?: Array<Ad>;
|
|
232
|
+
};
|
|
233
|
+
|
|
234
|
+
/**
|
|
235
|
+
* Campaign with nested ad sets and rolled-up metrics
|
|
236
|
+
*/
|
|
237
|
+
export type AdTreeCampaign = {
|
|
238
|
+
platformCampaignId?: string;
|
|
239
|
+
platform?: 'facebook' | 'instagram' | 'tiktok' | 'linkedin' | 'pinterest' | 'google' | 'twitter';
|
|
240
|
+
campaignName?: string;
|
|
241
|
+
/**
|
|
242
|
+
* Derived from child ad statuses
|
|
243
|
+
*/
|
|
244
|
+
status?: 'active' | 'paused' | 'pending_review' | 'rejected' | 'completed' | 'cancelled' | 'error';
|
|
245
|
+
/**
|
|
246
|
+
* Total ads across all ad sets
|
|
247
|
+
*/
|
|
248
|
+
adCount?: number;
|
|
249
|
+
adSetCount?: number;
|
|
250
|
+
budget?: {
|
|
251
|
+
amount?: number;
|
|
252
|
+
type?: 'daily' | 'lifetime';
|
|
253
|
+
} | null;
|
|
254
|
+
metrics?: AdMetrics;
|
|
255
|
+
platformAdAccountId?: string;
|
|
256
|
+
accountId?: string;
|
|
257
|
+
profileId?: string;
|
|
258
|
+
adSets?: Array<AdTreeAdSet>;
|
|
259
|
+
};
|
|
260
|
+
|
|
182
261
|
export type AnalyticsListResponse = {
|
|
183
262
|
overview?: AnalyticsOverview;
|
|
184
263
|
posts?: Array<{
|
|
@@ -350,10 +429,6 @@ export type BlueskyPlatformData = {
|
|
|
350
429
|
}>;
|
|
351
430
|
};
|
|
352
431
|
|
|
353
|
-
export type CaptionResponse = {
|
|
354
|
-
caption?: string;
|
|
355
|
-
};
|
|
356
|
-
|
|
357
432
|
/**
|
|
358
433
|
* Connection event log showing account connection/disconnection history
|
|
359
434
|
*/
|
|
@@ -450,22 +525,6 @@ export type eventType = 'connect_success' | 'connect_failed' | 'disconnect' | 'r
|
|
|
450
525
|
*/
|
|
451
526
|
export type connectionMethod = 'oauth' | 'credentials' | 'invitation';
|
|
452
527
|
|
|
453
|
-
export type DownloadFormat = {
|
|
454
|
-
formatId?: string;
|
|
455
|
-
ext?: string;
|
|
456
|
-
resolution?: string;
|
|
457
|
-
filesize?: number;
|
|
458
|
-
quality?: string;
|
|
459
|
-
};
|
|
460
|
-
|
|
461
|
-
export type DownloadResponse = {
|
|
462
|
-
url?: string;
|
|
463
|
-
title?: string;
|
|
464
|
-
thumbnail?: string;
|
|
465
|
-
duration?: number;
|
|
466
|
-
formats?: Array<DownloadFormat>;
|
|
467
|
-
};
|
|
468
|
-
|
|
469
528
|
export type ErrorResponse = {
|
|
470
529
|
error?: string;
|
|
471
530
|
details?: {
|
|
@@ -616,18 +675,6 @@ export type GoogleBusinessPlatformData = {
|
|
|
616
675
|
*/
|
|
617
676
|
export type type2 = 'LEARN_MORE' | 'BOOK' | 'ORDER' | 'SHOP' | 'SIGN_UP' | 'CALL';
|
|
618
677
|
|
|
619
|
-
export type HashtagCheckResponse = {
|
|
620
|
-
hashtags?: Array<HashtagInfo>;
|
|
621
|
-
};
|
|
622
|
-
|
|
623
|
-
export type HashtagInfo = {
|
|
624
|
-
hashtag?: string;
|
|
625
|
-
status?: 'safe' | 'banned' | 'restricted' | 'unknown';
|
|
626
|
-
postCount?: number;
|
|
627
|
-
};
|
|
628
|
-
|
|
629
|
-
export type status3 = 'safe' | 'banned' | 'restricted' | 'unknown';
|
|
630
|
-
|
|
631
678
|
export type InstagramAccountInsightsResponse = {
|
|
632
679
|
success?: boolean;
|
|
633
680
|
/**
|
|
@@ -1013,7 +1060,7 @@ export type PlatformAnalytics = {
|
|
|
1013
1060
|
errorMessage?: (string) | null;
|
|
1014
1061
|
};
|
|
1015
1062
|
|
|
1016
|
-
export type
|
|
1063
|
+
export type status3 = 'published' | 'failed';
|
|
1017
1064
|
|
|
1018
1065
|
/**
|
|
1019
1066
|
* Sync state of analytics for this platform
|
|
@@ -1123,7 +1170,7 @@ export type Post = {
|
|
|
1123
1170
|
updatedAt?: string;
|
|
1124
1171
|
};
|
|
1125
1172
|
|
|
1126
|
-
export type
|
|
1173
|
+
export type status4 = 'draft' | 'scheduled' | 'publishing' | 'published' | 'failed' | 'partial';
|
|
1127
1174
|
|
|
1128
1175
|
export type visibility = 'public' | 'private' | 'unlisted';
|
|
1129
1176
|
|
|
@@ -1239,7 +1286,7 @@ export type PostLog = {
|
|
|
1239
1286
|
*/
|
|
1240
1287
|
export type action = 'publish' | 'retry' | 'media_upload' | 'rate_limit_pause' | 'token_refresh' | 'cancelled';
|
|
1241
1288
|
|
|
1242
|
-
export type
|
|
1289
|
+
export type status5 = 'success' | 'failed' | 'pending' | 'skipped';
|
|
1243
1290
|
|
|
1244
1291
|
export type PostRetryResponse = {
|
|
1245
1292
|
message?: string;
|
|
@@ -1659,18 +1706,6 @@ export type commercialContentType = 'none' | 'brand_organic' | 'brand_content';
|
|
|
1659
1706
|
*/
|
|
1660
1707
|
export type mediaType2 = 'video' | 'photo';
|
|
1661
1708
|
|
|
1662
|
-
export type TranscriptResponse = {
|
|
1663
|
-
transcript?: string;
|
|
1664
|
-
segments?: Array<TranscriptSegment>;
|
|
1665
|
-
language?: string;
|
|
1666
|
-
};
|
|
1667
|
-
|
|
1668
|
-
export type TranscriptSegment = {
|
|
1669
|
-
text?: string;
|
|
1670
|
-
start?: number;
|
|
1671
|
-
duration?: number;
|
|
1672
|
-
};
|
|
1673
|
-
|
|
1674
1709
|
export type TwitterPlatformData = {
|
|
1675
1710
|
/**
|
|
1676
1711
|
* ID of an existing tweet to reply to. The published tweet will appear as a reply in that tweet's thread. For threads, only the first tweet replies to the target; subsequent tweets chain normally.
|
|
@@ -1724,7 +1759,7 @@ export type UploadTokenResponse = {
|
|
|
1724
1759
|
status?: 'pending' | 'completed' | 'expired';
|
|
1725
1760
|
};
|
|
1726
1761
|
|
|
1727
|
-
export type
|
|
1762
|
+
export type status6 = 'pending' | 'completed' | 'expired';
|
|
1728
1763
|
|
|
1729
1764
|
export type UploadTokenStatusResponse = {
|
|
1730
1765
|
token?: string;
|
|
@@ -1863,7 +1898,7 @@ export type WebhookLog = {
|
|
|
1863
1898
|
|
|
1864
1899
|
export type event = 'post.scheduled' | 'post.published' | 'post.failed' | 'post.partial' | 'post.cancelled' | 'post.recycled' | 'account.connected' | 'account.disconnected' | 'message.received' | 'comment.received' | 'webhook.test';
|
|
1865
1900
|
|
|
1866
|
-
export type
|
|
1901
|
+
export type status7 = 'success' | 'failed';
|
|
1867
1902
|
|
|
1868
1903
|
/**
|
|
1869
1904
|
* Webhook payload for account connected events
|
|
@@ -2125,7 +2160,7 @@ export type platform4 = 'instagram' | 'facebook' | 'telegram' | 'whatsapp';
|
|
|
2125
2160
|
|
|
2126
2161
|
export type direction = 'incoming' | 'outgoing';
|
|
2127
2162
|
|
|
2128
|
-
export type
|
|
2163
|
+
export type status8 = 'active' | 'archived';
|
|
2129
2164
|
|
|
2130
2165
|
/**
|
|
2131
2166
|
* Webhook payload for post events
|
|
@@ -2306,6 +2341,35 @@ export type YouTubeDailyViewsResponse = {
|
|
|
2306
2341
|
};
|
|
2307
2342
|
};
|
|
2308
2343
|
|
|
2344
|
+
export type YouTubeDemographicsResponse = {
|
|
2345
|
+
success?: boolean;
|
|
2346
|
+
/**
|
|
2347
|
+
* The Zernio SocialAccount ID
|
|
2348
|
+
*/
|
|
2349
|
+
accountId?: string;
|
|
2350
|
+
platform?: string;
|
|
2351
|
+
/**
|
|
2352
|
+
* Object keyed by breakdown dimension (age, gender, country)
|
|
2353
|
+
*/
|
|
2354
|
+
demographics?: {
|
|
2355
|
+
[key: string]: Array<{
|
|
2356
|
+
/**
|
|
2357
|
+
* The dimension value (e.g., "25-34", "US", "male")
|
|
2358
|
+
*/
|
|
2359
|
+
dimension?: string;
|
|
2360
|
+
/**
|
|
2361
|
+
* Viewer percentage (age/gender) or view count (country)
|
|
2362
|
+
*/
|
|
2363
|
+
value?: number;
|
|
2364
|
+
}>;
|
|
2365
|
+
};
|
|
2366
|
+
dateRange?: {
|
|
2367
|
+
startDate?: string;
|
|
2368
|
+
endDate?: string;
|
|
2369
|
+
};
|
|
2370
|
+
note?: string;
|
|
2371
|
+
};
|
|
2372
|
+
|
|
2309
2373
|
/**
|
|
2310
2374
|
* Videos under 3 min auto-detected as Shorts. Custom thumbnails for regular videos only. Scheduled videos are uploaded immediately with the specified visibility.
|
|
2311
2375
|
*/
|
|
@@ -2354,219 +2418,6 @@ export type YouTubeScopeMissingResponse = {
|
|
|
2354
2418
|
};
|
|
2355
2419
|
};
|
|
2356
2420
|
|
|
2357
|
-
export type DownloadYouTubeVideoData = {
|
|
2358
|
-
query: {
|
|
2359
|
-
/**
|
|
2360
|
-
* Action to perform: 'download' returns download URL, 'formats' lists available formats
|
|
2361
|
-
*/
|
|
2362
|
-
action?: 'download' | 'formats';
|
|
2363
|
-
/**
|
|
2364
|
-
* Desired format (when action=download)
|
|
2365
|
-
*/
|
|
2366
|
-
format?: 'video' | 'audio';
|
|
2367
|
-
/**
|
|
2368
|
-
* Specific format ID from formats list
|
|
2369
|
-
*/
|
|
2370
|
-
formatId?: string;
|
|
2371
|
-
/**
|
|
2372
|
-
* Desired quality (when action=download)
|
|
2373
|
-
*/
|
|
2374
|
-
quality?: 'hd' | 'sd';
|
|
2375
|
-
/**
|
|
2376
|
-
* YouTube video URL or video ID
|
|
2377
|
-
*/
|
|
2378
|
-
url: string;
|
|
2379
|
-
};
|
|
2380
|
-
};
|
|
2381
|
-
|
|
2382
|
-
export type DownloadYouTubeVideoResponse = ({
|
|
2383
|
-
success?: boolean;
|
|
2384
|
-
title?: string;
|
|
2385
|
-
downloadUrl?: string;
|
|
2386
|
-
formats?: Array<{
|
|
2387
|
-
id?: string;
|
|
2388
|
-
label?: string;
|
|
2389
|
-
ext?: string;
|
|
2390
|
-
type?: string;
|
|
2391
|
-
height?: number;
|
|
2392
|
-
width?: number;
|
|
2393
|
-
}>;
|
|
2394
|
-
});
|
|
2395
|
-
|
|
2396
|
-
export type DownloadYouTubeVideoError = ({
|
|
2397
|
-
error?: string;
|
|
2398
|
-
} | unknown);
|
|
2399
|
-
|
|
2400
|
-
export type GetYouTubeTranscriptData = {
|
|
2401
|
-
query: {
|
|
2402
|
-
/**
|
|
2403
|
-
* Language code for transcript
|
|
2404
|
-
*/
|
|
2405
|
-
lang?: string;
|
|
2406
|
-
/**
|
|
2407
|
-
* YouTube video URL or video ID
|
|
2408
|
-
*/
|
|
2409
|
-
url: string;
|
|
2410
|
-
};
|
|
2411
|
-
};
|
|
2412
|
-
|
|
2413
|
-
export type GetYouTubeTranscriptResponse = ({
|
|
2414
|
-
success?: boolean;
|
|
2415
|
-
videoId?: string;
|
|
2416
|
-
language?: string;
|
|
2417
|
-
fullText?: string;
|
|
2418
|
-
segments?: Array<{
|
|
2419
|
-
text?: string;
|
|
2420
|
-
start?: number;
|
|
2421
|
-
duration?: number;
|
|
2422
|
-
}>;
|
|
2423
|
-
});
|
|
2424
|
-
|
|
2425
|
-
export type GetYouTubeTranscriptError = (unknown);
|
|
2426
|
-
|
|
2427
|
-
export type DownloadInstagramMediaData = {
|
|
2428
|
-
query: {
|
|
2429
|
-
/**
|
|
2430
|
-
* Instagram reel or post URL
|
|
2431
|
-
*/
|
|
2432
|
-
url: string;
|
|
2433
|
-
};
|
|
2434
|
-
};
|
|
2435
|
-
|
|
2436
|
-
export type DownloadInstagramMediaResponse = ({
|
|
2437
|
-
success?: boolean;
|
|
2438
|
-
title?: string;
|
|
2439
|
-
downloadUrl?: string;
|
|
2440
|
-
});
|
|
2441
|
-
|
|
2442
|
-
export type DownloadInstagramMediaError = unknown;
|
|
2443
|
-
|
|
2444
|
-
export type CheckInstagramHashtagsData = {
|
|
2445
|
-
body: {
|
|
2446
|
-
hashtags: Array<(string)>;
|
|
2447
|
-
};
|
|
2448
|
-
};
|
|
2449
|
-
|
|
2450
|
-
export type CheckInstagramHashtagsResponse = ({
|
|
2451
|
-
success?: boolean;
|
|
2452
|
-
results?: Array<{
|
|
2453
|
-
hashtag?: string;
|
|
2454
|
-
status?: 'banned' | 'restricted' | 'safe' | 'unknown';
|
|
2455
|
-
reason?: string;
|
|
2456
|
-
confidence?: number;
|
|
2457
|
-
}>;
|
|
2458
|
-
summary?: {
|
|
2459
|
-
banned?: number;
|
|
2460
|
-
restricted?: number;
|
|
2461
|
-
safe?: number;
|
|
2462
|
-
};
|
|
2463
|
-
});
|
|
2464
|
-
|
|
2465
|
-
export type CheckInstagramHashtagsError = unknown;
|
|
2466
|
-
|
|
2467
|
-
export type DownloadTikTokVideoData = {
|
|
2468
|
-
query: {
|
|
2469
|
-
/**
|
|
2470
|
-
* 'formats' to list available formats
|
|
2471
|
-
*/
|
|
2472
|
-
action?: 'download' | 'formats';
|
|
2473
|
-
/**
|
|
2474
|
-
* Specific format ID (0 = no watermark, etc.)
|
|
2475
|
-
*/
|
|
2476
|
-
formatId?: string;
|
|
2477
|
-
/**
|
|
2478
|
-
* TikTok video URL or ID
|
|
2479
|
-
*/
|
|
2480
|
-
url: string;
|
|
2481
|
-
};
|
|
2482
|
-
};
|
|
2483
|
-
|
|
2484
|
-
export type DownloadTikTokVideoResponse = ({
|
|
2485
|
-
success?: boolean;
|
|
2486
|
-
title?: string;
|
|
2487
|
-
downloadUrl?: string;
|
|
2488
|
-
formats?: Array<{
|
|
2489
|
-
id?: string;
|
|
2490
|
-
label?: string;
|
|
2491
|
-
ext?: string;
|
|
2492
|
-
}>;
|
|
2493
|
-
});
|
|
2494
|
-
|
|
2495
|
-
export type DownloadTikTokVideoError = unknown;
|
|
2496
|
-
|
|
2497
|
-
export type DownloadTwitterMediaData = {
|
|
2498
|
-
query: {
|
|
2499
|
-
action?: 'download' | 'formats';
|
|
2500
|
-
formatId?: string;
|
|
2501
|
-
/**
|
|
2502
|
-
* Twitter/X post URL
|
|
2503
|
-
*/
|
|
2504
|
-
url: string;
|
|
2505
|
-
};
|
|
2506
|
-
};
|
|
2507
|
-
|
|
2508
|
-
export type DownloadTwitterMediaResponse = ({
|
|
2509
|
-
success?: boolean;
|
|
2510
|
-
title?: string;
|
|
2511
|
-
downloadUrl?: string;
|
|
2512
|
-
});
|
|
2513
|
-
|
|
2514
|
-
export type DownloadTwitterMediaError = unknown;
|
|
2515
|
-
|
|
2516
|
-
export type DownloadFacebookVideoData = {
|
|
2517
|
-
query: {
|
|
2518
|
-
/**
|
|
2519
|
-
* Facebook video or reel URL
|
|
2520
|
-
*/
|
|
2521
|
-
url: string;
|
|
2522
|
-
};
|
|
2523
|
-
};
|
|
2524
|
-
|
|
2525
|
-
export type DownloadFacebookVideoResponse = ({
|
|
2526
|
-
success?: boolean;
|
|
2527
|
-
title?: string;
|
|
2528
|
-
downloadUrl?: string;
|
|
2529
|
-
thumbnail?: string;
|
|
2530
|
-
});
|
|
2531
|
-
|
|
2532
|
-
export type DownloadFacebookVideoError = unknown;
|
|
2533
|
-
|
|
2534
|
-
export type DownloadLinkedInVideoData = {
|
|
2535
|
-
query: {
|
|
2536
|
-
/**
|
|
2537
|
-
* LinkedIn post URL
|
|
2538
|
-
*/
|
|
2539
|
-
url: string;
|
|
2540
|
-
};
|
|
2541
|
-
};
|
|
2542
|
-
|
|
2543
|
-
export type DownloadLinkedInVideoResponse = ({
|
|
2544
|
-
success?: boolean;
|
|
2545
|
-
title?: string;
|
|
2546
|
-
downloadUrl?: string;
|
|
2547
|
-
});
|
|
2548
|
-
|
|
2549
|
-
export type DownloadLinkedInVideoError = unknown;
|
|
2550
|
-
|
|
2551
|
-
export type DownloadBlueskyMediaData = {
|
|
2552
|
-
query: {
|
|
2553
|
-
/**
|
|
2554
|
-
* Bluesky post URL
|
|
2555
|
-
*/
|
|
2556
|
-
url: string;
|
|
2557
|
-
};
|
|
2558
|
-
};
|
|
2559
|
-
|
|
2560
|
-
export type DownloadBlueskyMediaResponse = ({
|
|
2561
|
-
success?: boolean;
|
|
2562
|
-
title?: string;
|
|
2563
|
-
text?: string;
|
|
2564
|
-
downloadUrl?: string;
|
|
2565
|
-
thumbnail?: string;
|
|
2566
|
-
});
|
|
2567
|
-
|
|
2568
|
-
export type DownloadBlueskyMediaError = unknown;
|
|
2569
|
-
|
|
2570
2421
|
export type ValidatePostLengthData = {
|
|
2571
2422
|
body: {
|
|
2572
2423
|
/**
|
|
@@ -2896,20 +2747,63 @@ export type GetInstagramDemographicsError = ({
|
|
|
2896
2747
|
code?: string;
|
|
2897
2748
|
});
|
|
2898
2749
|
|
|
2899
|
-
export type
|
|
2900
|
-
query
|
|
2750
|
+
export type GetYouTubeDemographicsData = {
|
|
2751
|
+
query: {
|
|
2901
2752
|
/**
|
|
2902
|
-
*
|
|
2753
|
+
* The Zernio SocialAccount ID for the YouTube account
|
|
2903
2754
|
*/
|
|
2904
|
-
accountId
|
|
2755
|
+
accountId: string;
|
|
2905
2756
|
/**
|
|
2906
|
-
*
|
|
2757
|
+
* Comma-separated list of demographic dimensions: age, gender, country.
|
|
2758
|
+
* Defaults to all three if omitted.
|
|
2759
|
+
*
|
|
2907
2760
|
*/
|
|
2908
|
-
|
|
2761
|
+
breakdown?: string;
|
|
2909
2762
|
/**
|
|
2910
|
-
*
|
|
2763
|
+
* End date in YYYY-MM-DD format. Defaults to 3 days ago (YouTube data latency).
|
|
2764
|
+
*
|
|
2911
2765
|
*/
|
|
2912
|
-
|
|
2766
|
+
endDate?: string;
|
|
2767
|
+
/**
|
|
2768
|
+
* Start date in YYYY-MM-DD format. Defaults to 90 days ago.
|
|
2769
|
+
*
|
|
2770
|
+
*/
|
|
2771
|
+
startDate?: string;
|
|
2772
|
+
};
|
|
2773
|
+
};
|
|
2774
|
+
|
|
2775
|
+
export type GetYouTubeDemographicsResponse = (YouTubeDemographicsResponse);
|
|
2776
|
+
|
|
2777
|
+
export type GetYouTubeDemographicsError = ({
|
|
2778
|
+
error?: string;
|
|
2779
|
+
} | {
|
|
2780
|
+
error?: string;
|
|
2781
|
+
code?: string;
|
|
2782
|
+
} | {
|
|
2783
|
+
success?: boolean;
|
|
2784
|
+
error?: string;
|
|
2785
|
+
code?: string;
|
|
2786
|
+
scopeStatus?: {
|
|
2787
|
+
hasAnalyticsScope?: boolean;
|
|
2788
|
+
requiresReauthorization?: boolean;
|
|
2789
|
+
reauthorizeUrl?: string;
|
|
2790
|
+
};
|
|
2791
|
+
});
|
|
2792
|
+
|
|
2793
|
+
export type GetDailyMetricsData = {
|
|
2794
|
+
query?: {
|
|
2795
|
+
/**
|
|
2796
|
+
* Filter by social account ID
|
|
2797
|
+
*/
|
|
2798
|
+
accountId?: string;
|
|
2799
|
+
/**
|
|
2800
|
+
* Inclusive start date (ISO 8601). Defaults to 180 days ago.
|
|
2801
|
+
*/
|
|
2802
|
+
fromDate?: string;
|
|
2803
|
+
/**
|
|
2804
|
+
* Filter by platform (e.g. "instagram", "tiktok"). Omit for all platforms.
|
|
2805
|
+
*/
|
|
2806
|
+
platform?: string;
|
|
2913
2807
|
/**
|
|
2914
2808
|
* Filter by profile ID. Omit for all profiles.
|
|
2915
2809
|
*/
|
|
@@ -3178,6 +3072,107 @@ export type GetPostTimelineError = ({
|
|
|
3178
3072
|
code?: string;
|
|
3179
3073
|
});
|
|
3180
3074
|
|
|
3075
|
+
export type GetGoogleBusinessPerformanceData = {
|
|
3076
|
+
query: {
|
|
3077
|
+
/**
|
|
3078
|
+
* The Zernio SocialAccount ID for the Google Business Profile account.
|
|
3079
|
+
*/
|
|
3080
|
+
accountId: string;
|
|
3081
|
+
/**
|
|
3082
|
+
* End date (YYYY-MM-DD). Defaults to today.
|
|
3083
|
+
*/
|
|
3084
|
+
endDate?: string;
|
|
3085
|
+
/**
|
|
3086
|
+
* Comma-separated metric names. Defaults to all available metrics.
|
|
3087
|
+
* Valid values: BUSINESS_IMPRESSIONS_DESKTOP_MAPS, BUSINESS_IMPRESSIONS_DESKTOP_SEARCH,
|
|
3088
|
+
* BUSINESS_IMPRESSIONS_MOBILE_MAPS, BUSINESS_IMPRESSIONS_MOBILE_SEARCH,
|
|
3089
|
+
* BUSINESS_CONVERSATIONS, BUSINESS_DIRECTION_REQUESTS, CALL_CLICKS, WEBSITE_CLICKS,
|
|
3090
|
+
* BUSINESS_BOOKINGS, BUSINESS_FOOD_ORDERS, BUSINESS_FOOD_MENU_CLICKS
|
|
3091
|
+
*
|
|
3092
|
+
*/
|
|
3093
|
+
metrics?: string;
|
|
3094
|
+
/**
|
|
3095
|
+
* Start date (YYYY-MM-DD). Defaults to 30 days ago. Max 18 months back.
|
|
3096
|
+
*/
|
|
3097
|
+
startDate?: string;
|
|
3098
|
+
};
|
|
3099
|
+
};
|
|
3100
|
+
|
|
3101
|
+
export type GetGoogleBusinessPerformanceResponse = ({
|
|
3102
|
+
success?: boolean;
|
|
3103
|
+
accountId?: string;
|
|
3104
|
+
platform?: string;
|
|
3105
|
+
dateRange?: {
|
|
3106
|
+
startDate?: string;
|
|
3107
|
+
endDate?: string;
|
|
3108
|
+
};
|
|
3109
|
+
/**
|
|
3110
|
+
* Each key is a metric name containing total and daily values.
|
|
3111
|
+
*/
|
|
3112
|
+
metrics?: {
|
|
3113
|
+
[key: string]: {
|
|
3114
|
+
/**
|
|
3115
|
+
* Sum of all daily values in the range
|
|
3116
|
+
*/
|
|
3117
|
+
total?: number;
|
|
3118
|
+
values?: Array<{
|
|
3119
|
+
date?: string;
|
|
3120
|
+
value?: number;
|
|
3121
|
+
}>;
|
|
3122
|
+
};
|
|
3123
|
+
};
|
|
3124
|
+
dataDelay?: string;
|
|
3125
|
+
});
|
|
3126
|
+
|
|
3127
|
+
export type GetGoogleBusinessPerformanceError = ({
|
|
3128
|
+
error?: string;
|
|
3129
|
+
validMetrics?: Array<(string)>;
|
|
3130
|
+
} | {
|
|
3131
|
+
error?: string;
|
|
3132
|
+
} | {
|
|
3133
|
+
error?: string;
|
|
3134
|
+
code?: string;
|
|
3135
|
+
});
|
|
3136
|
+
|
|
3137
|
+
export type GetGoogleBusinessSearchKeywordsData = {
|
|
3138
|
+
query: {
|
|
3139
|
+
/**
|
|
3140
|
+
* The Zernio SocialAccount ID for the Google Business Profile account.
|
|
3141
|
+
*/
|
|
3142
|
+
accountId: string;
|
|
3143
|
+
/**
|
|
3144
|
+
* End month (YYYY-MM). Defaults to current month.
|
|
3145
|
+
*/
|
|
3146
|
+
endMonth?: string;
|
|
3147
|
+
/**
|
|
3148
|
+
* Start month (YYYY-MM). Defaults to 3 months ago.
|
|
3149
|
+
*/
|
|
3150
|
+
startMonth?: string;
|
|
3151
|
+
};
|
|
3152
|
+
};
|
|
3153
|
+
|
|
3154
|
+
export type GetGoogleBusinessSearchKeywordsResponse = ({
|
|
3155
|
+
success?: boolean;
|
|
3156
|
+
accountId?: string;
|
|
3157
|
+
platform?: string;
|
|
3158
|
+
monthRange?: {
|
|
3159
|
+
startMonth?: string;
|
|
3160
|
+
endMonth?: string;
|
|
3161
|
+
};
|
|
3162
|
+
keywords?: Array<{
|
|
3163
|
+
keyword?: string;
|
|
3164
|
+
impressions?: number;
|
|
3165
|
+
}>;
|
|
3166
|
+
note?: string;
|
|
3167
|
+
});
|
|
3168
|
+
|
|
3169
|
+
export type GetGoogleBusinessSearchKeywordsError = ({
|
|
3170
|
+
error?: string;
|
|
3171
|
+
} | {
|
|
3172
|
+
error?: string;
|
|
3173
|
+
code?: string;
|
|
3174
|
+
});
|
|
3175
|
+
|
|
3181
3176
|
export type ListAccountGroupsResponse = ({
|
|
3182
3177
|
groups?: Array<{
|
|
3183
3178
|
_id?: string;
|
|
@@ -3778,6 +3773,14 @@ export type ListAccountsData = {
|
|
|
3778
3773
|
* When true, includes accounts from over-limit profiles.
|
|
3779
3774
|
*/
|
|
3780
3775
|
includeOverLimit?: boolean;
|
|
3776
|
+
/**
|
|
3777
|
+
* Page size. Required alongside page for pagination.
|
|
3778
|
+
*/
|
|
3779
|
+
limit?: number;
|
|
3780
|
+
/**
|
|
3781
|
+
* Page number (1-based). When provided with limit, enables server-side pagination. Omit for all accounts.
|
|
3782
|
+
*/
|
|
3783
|
+
page?: number;
|
|
3781
3784
|
/**
|
|
3782
3785
|
* Filter accounts by platform (e.g. "instagram", "twitter").
|
|
3783
3786
|
*/
|
|
@@ -3795,6 +3798,10 @@ export type ListAccountsResponse = ({
|
|
|
3795
3798
|
* Whether user has analytics add-on access
|
|
3796
3799
|
*/
|
|
3797
3800
|
hasAnalyticsAccess?: boolean;
|
|
3801
|
+
/**
|
|
3802
|
+
* Only present when page/limit params are provided
|
|
3803
|
+
*/
|
|
3804
|
+
pagination?: Pagination;
|
|
3798
3805
|
});
|
|
3799
3806
|
|
|
3800
3807
|
export type ListAccountsError = ({
|
|
@@ -9867,6 +9874,346 @@ export type RejectWhatsAppGroupJoinRequestsError = ({
|
|
|
9867
9874
|
error?: string;
|
|
9868
9875
|
});
|
|
9869
9876
|
|
|
9877
|
+
export type ListWhatsAppFlowsData = {
|
|
9878
|
+
query: {
|
|
9879
|
+
/**
|
|
9880
|
+
* WhatsApp social account ID
|
|
9881
|
+
*/
|
|
9882
|
+
accountId: string;
|
|
9883
|
+
};
|
|
9884
|
+
};
|
|
9885
|
+
|
|
9886
|
+
export type ListWhatsAppFlowsResponse = ({
|
|
9887
|
+
success?: boolean;
|
|
9888
|
+
flows?: Array<{
|
|
9889
|
+
id?: string;
|
|
9890
|
+
name?: string;
|
|
9891
|
+
status?: 'DRAFT' | 'PUBLISHED' | 'DEPRECATED' | 'BLOCKED' | 'THROTTLED';
|
|
9892
|
+
categories?: Array<(string)>;
|
|
9893
|
+
validation_errors?: Array<{
|
|
9894
|
+
[key: string]: unknown;
|
|
9895
|
+
}>;
|
|
9896
|
+
}>;
|
|
9897
|
+
});
|
|
9898
|
+
|
|
9899
|
+
export type ListWhatsAppFlowsError = (unknown | {
|
|
9900
|
+
error?: string;
|
|
9901
|
+
});
|
|
9902
|
+
|
|
9903
|
+
export type CreateWhatsAppFlowData = {
|
|
9904
|
+
body: {
|
|
9905
|
+
/**
|
|
9906
|
+
* WhatsApp social account ID
|
|
9907
|
+
*/
|
|
9908
|
+
accountId: string;
|
|
9909
|
+
/**
|
|
9910
|
+
* Flow display name
|
|
9911
|
+
*/
|
|
9912
|
+
name: string;
|
|
9913
|
+
/**
|
|
9914
|
+
* Flow categories
|
|
9915
|
+
*/
|
|
9916
|
+
categories: Array<('SIGN_UP' | 'SIGN_IN' | 'APPOINTMENT_BOOKING' | 'LEAD_GENERATION' | 'CONTACT_US' | 'CUSTOMER_SUPPORT' | 'SURVEY' | 'OTHER')>;
|
|
9917
|
+
/**
|
|
9918
|
+
* Optional: ID of an existing flow to clone
|
|
9919
|
+
*/
|
|
9920
|
+
cloneFlowId?: string;
|
|
9921
|
+
};
|
|
9922
|
+
};
|
|
9923
|
+
|
|
9924
|
+
export type CreateWhatsAppFlowResponse = ({
|
|
9925
|
+
success?: boolean;
|
|
9926
|
+
flow?: {
|
|
9927
|
+
id?: string;
|
|
9928
|
+
name?: string;
|
|
9929
|
+
status?: string;
|
|
9930
|
+
categories?: Array<(string)>;
|
|
9931
|
+
};
|
|
9932
|
+
});
|
|
9933
|
+
|
|
9934
|
+
export type CreateWhatsAppFlowError = (unknown | {
|
|
9935
|
+
error?: string;
|
|
9936
|
+
});
|
|
9937
|
+
|
|
9938
|
+
export type GetWhatsAppFlowData = {
|
|
9939
|
+
path: {
|
|
9940
|
+
/**
|
|
9941
|
+
* Flow ID
|
|
9942
|
+
*/
|
|
9943
|
+
flowId: string;
|
|
9944
|
+
};
|
|
9945
|
+
query: {
|
|
9946
|
+
/**
|
|
9947
|
+
* WhatsApp social account ID
|
|
9948
|
+
*/
|
|
9949
|
+
accountId: string;
|
|
9950
|
+
/**
|
|
9951
|
+
* Comma-separated fields to return (default: id,name,status,categories,validation_errors,json_version,preview,data_api_version,endpoint_uri)
|
|
9952
|
+
*/
|
|
9953
|
+
fields?: string;
|
|
9954
|
+
};
|
|
9955
|
+
};
|
|
9956
|
+
|
|
9957
|
+
export type GetWhatsAppFlowResponse = ({
|
|
9958
|
+
success?: boolean;
|
|
9959
|
+
flow?: {
|
|
9960
|
+
id?: string;
|
|
9961
|
+
name?: string;
|
|
9962
|
+
status?: string;
|
|
9963
|
+
categories?: Array<(string)>;
|
|
9964
|
+
validation_errors?: Array<{
|
|
9965
|
+
[key: string]: unknown;
|
|
9966
|
+
}>;
|
|
9967
|
+
json_version?: string;
|
|
9968
|
+
preview?: {
|
|
9969
|
+
preview_url?: string;
|
|
9970
|
+
expires_at?: string;
|
|
9971
|
+
};
|
|
9972
|
+
};
|
|
9973
|
+
});
|
|
9974
|
+
|
|
9975
|
+
export type GetWhatsAppFlowError = ({
|
|
9976
|
+
error?: string;
|
|
9977
|
+
} | unknown);
|
|
9978
|
+
|
|
9979
|
+
export type UpdateWhatsAppFlowData = {
|
|
9980
|
+
body: {
|
|
9981
|
+
/**
|
|
9982
|
+
* WhatsApp social account ID
|
|
9983
|
+
*/
|
|
9984
|
+
accountId: string;
|
|
9985
|
+
/**
|
|
9986
|
+
* New flow name
|
|
9987
|
+
*/
|
|
9988
|
+
name?: string;
|
|
9989
|
+
categories?: Array<('SIGN_UP' | 'SIGN_IN' | 'APPOINTMENT_BOOKING' | 'LEAD_GENERATION' | 'CONTACT_US' | 'CUSTOMER_SUPPORT' | 'SURVEY' | 'OTHER')>;
|
|
9990
|
+
};
|
|
9991
|
+
path: {
|
|
9992
|
+
/**
|
|
9993
|
+
* Flow ID
|
|
9994
|
+
*/
|
|
9995
|
+
flowId: string;
|
|
9996
|
+
};
|
|
9997
|
+
};
|
|
9998
|
+
|
|
9999
|
+
export type UpdateWhatsAppFlowResponse = ({
|
|
10000
|
+
success?: boolean;
|
|
10001
|
+
});
|
|
10002
|
+
|
|
10003
|
+
export type UpdateWhatsAppFlowError = (unknown | {
|
|
10004
|
+
error?: string;
|
|
10005
|
+
});
|
|
10006
|
+
|
|
10007
|
+
export type DeleteWhatsAppFlowData = {
|
|
10008
|
+
path: {
|
|
10009
|
+
/**
|
|
10010
|
+
* Flow ID
|
|
10011
|
+
*/
|
|
10012
|
+
flowId: string;
|
|
10013
|
+
};
|
|
10014
|
+
query: {
|
|
10015
|
+
/**
|
|
10016
|
+
* WhatsApp social account ID
|
|
10017
|
+
*/
|
|
10018
|
+
accountId: string;
|
|
10019
|
+
};
|
|
10020
|
+
};
|
|
10021
|
+
|
|
10022
|
+
export type DeleteWhatsAppFlowResponse = ({
|
|
10023
|
+
success?: boolean;
|
|
10024
|
+
});
|
|
10025
|
+
|
|
10026
|
+
export type DeleteWhatsAppFlowError = (unknown | {
|
|
10027
|
+
error?: string;
|
|
10028
|
+
});
|
|
10029
|
+
|
|
10030
|
+
export type GetWhatsAppFlowJsonData = {
|
|
10031
|
+
path: {
|
|
10032
|
+
/**
|
|
10033
|
+
* Flow ID
|
|
10034
|
+
*/
|
|
10035
|
+
flowId: string;
|
|
10036
|
+
};
|
|
10037
|
+
query: {
|
|
10038
|
+
/**
|
|
10039
|
+
* WhatsApp social account ID
|
|
10040
|
+
*/
|
|
10041
|
+
accountId: string;
|
|
10042
|
+
};
|
|
10043
|
+
};
|
|
10044
|
+
|
|
10045
|
+
export type GetWhatsAppFlowJsonResponse = ({
|
|
10046
|
+
success?: boolean;
|
|
10047
|
+
assets?: Array<{
|
|
10048
|
+
name?: string;
|
|
10049
|
+
asset_type?: string;
|
|
10050
|
+
/**
|
|
10051
|
+
* Temporary URL to download the flow JSON
|
|
10052
|
+
*/
|
|
10053
|
+
download_url?: string;
|
|
10054
|
+
}>;
|
|
10055
|
+
});
|
|
10056
|
+
|
|
10057
|
+
export type GetWhatsAppFlowJsonError = ({
|
|
10058
|
+
error?: string;
|
|
10059
|
+
} | unknown);
|
|
10060
|
+
|
|
10061
|
+
export type UploadWhatsAppFlowJsonData = {
|
|
10062
|
+
body: {
|
|
10063
|
+
/**
|
|
10064
|
+
* WhatsApp social account ID
|
|
10065
|
+
*/
|
|
10066
|
+
accountId: string;
|
|
10067
|
+
/**
|
|
10068
|
+
* The Flow JSON content. Pass as a JSON object or a JSON string.
|
|
10069
|
+
*/
|
|
10070
|
+
flow_json: ({
|
|
10071
|
+
[key: string]: unknown;
|
|
10072
|
+
} | string);
|
|
10073
|
+
};
|
|
10074
|
+
path: {
|
|
10075
|
+
/**
|
|
10076
|
+
* Flow ID
|
|
10077
|
+
*/
|
|
10078
|
+
flowId: string;
|
|
10079
|
+
};
|
|
10080
|
+
};
|
|
10081
|
+
|
|
10082
|
+
export type UploadWhatsAppFlowJsonResponse = ({
|
|
10083
|
+
success?: boolean;
|
|
10084
|
+
/**
|
|
10085
|
+
* Empty array if valid; otherwise, contains validation error details from Meta
|
|
10086
|
+
*/
|
|
10087
|
+
validation_errors?: Array<{
|
|
10088
|
+
error?: string;
|
|
10089
|
+
error_type?: string;
|
|
10090
|
+
message?: string;
|
|
10091
|
+
line_start?: number;
|
|
10092
|
+
line_end?: number;
|
|
10093
|
+
column_start?: number;
|
|
10094
|
+
column_end?: number;
|
|
10095
|
+
}>;
|
|
10096
|
+
});
|
|
10097
|
+
|
|
10098
|
+
export type UploadWhatsAppFlowJsonError = (unknown | {
|
|
10099
|
+
error?: string;
|
|
10100
|
+
});
|
|
10101
|
+
|
|
10102
|
+
export type PublishWhatsAppFlowData = {
|
|
10103
|
+
body: {
|
|
10104
|
+
/**
|
|
10105
|
+
* WhatsApp social account ID
|
|
10106
|
+
*/
|
|
10107
|
+
accountId: string;
|
|
10108
|
+
};
|
|
10109
|
+
path: {
|
|
10110
|
+
/**
|
|
10111
|
+
* Flow ID
|
|
10112
|
+
*/
|
|
10113
|
+
flowId: string;
|
|
10114
|
+
};
|
|
10115
|
+
};
|
|
10116
|
+
|
|
10117
|
+
export type PublishWhatsAppFlowResponse = ({
|
|
10118
|
+
success?: boolean;
|
|
10119
|
+
});
|
|
10120
|
+
|
|
10121
|
+
export type PublishWhatsAppFlowError = (unknown | {
|
|
10122
|
+
error?: string;
|
|
10123
|
+
});
|
|
10124
|
+
|
|
10125
|
+
export type DeprecateWhatsAppFlowData = {
|
|
10126
|
+
body: {
|
|
10127
|
+
/**
|
|
10128
|
+
* WhatsApp social account ID
|
|
10129
|
+
*/
|
|
10130
|
+
accountId: string;
|
|
10131
|
+
};
|
|
10132
|
+
path: {
|
|
10133
|
+
/**
|
|
10134
|
+
* Flow ID
|
|
10135
|
+
*/
|
|
10136
|
+
flowId: string;
|
|
10137
|
+
};
|
|
10138
|
+
};
|
|
10139
|
+
|
|
10140
|
+
export type DeprecateWhatsAppFlowResponse = ({
|
|
10141
|
+
success?: boolean;
|
|
10142
|
+
});
|
|
10143
|
+
|
|
10144
|
+
export type DeprecateWhatsAppFlowError = (unknown | {
|
|
10145
|
+
error?: string;
|
|
10146
|
+
});
|
|
10147
|
+
|
|
10148
|
+
export type SendWhatsAppFlowMessageData = {
|
|
10149
|
+
body: {
|
|
10150
|
+
/**
|
|
10151
|
+
* WhatsApp social account ID
|
|
10152
|
+
*/
|
|
10153
|
+
accountId: string;
|
|
10154
|
+
/**
|
|
10155
|
+
* Recipient phone number (E.164 format, e.g. +1234567890)
|
|
10156
|
+
*/
|
|
10157
|
+
to: string;
|
|
10158
|
+
/**
|
|
10159
|
+
* Published flow ID
|
|
10160
|
+
*/
|
|
10161
|
+
flow_id: string;
|
|
10162
|
+
/**
|
|
10163
|
+
* CTA button text (e.g. 'Book Now', 'Sign Up')
|
|
10164
|
+
*/
|
|
10165
|
+
flow_cta: string;
|
|
10166
|
+
/**
|
|
10167
|
+
* Action type: navigate opens a screen directly, data_exchange hits your endpoint first
|
|
10168
|
+
*/
|
|
10169
|
+
flow_action?: 'navigate' | 'data_exchange';
|
|
10170
|
+
/**
|
|
10171
|
+
* Unique token to correlate responses. Auto-generated UUID if omitted.
|
|
10172
|
+
*/
|
|
10173
|
+
flow_token?: string;
|
|
10174
|
+
flow_action_payload?: {
|
|
10175
|
+
/**
|
|
10176
|
+
* First screen ID to navigate to
|
|
10177
|
+
*/
|
|
10178
|
+
screen?: string;
|
|
10179
|
+
/**
|
|
10180
|
+
* Optional data to pass to the screen
|
|
10181
|
+
*/
|
|
10182
|
+
data?: {
|
|
10183
|
+
[key: string]: unknown;
|
|
10184
|
+
};
|
|
10185
|
+
};
|
|
10186
|
+
/**
|
|
10187
|
+
* Message body text
|
|
10188
|
+
*/
|
|
10189
|
+
body: string;
|
|
10190
|
+
header?: {
|
|
10191
|
+
type?: 'text';
|
|
10192
|
+
text?: string;
|
|
10193
|
+
};
|
|
10194
|
+
/**
|
|
10195
|
+
* Optional footer text
|
|
10196
|
+
*/
|
|
10197
|
+
footer?: string;
|
|
10198
|
+
/**
|
|
10199
|
+
* Set true to test an unpublished (DRAFT) flow
|
|
10200
|
+
*/
|
|
10201
|
+
draft?: boolean;
|
|
10202
|
+
};
|
|
10203
|
+
};
|
|
10204
|
+
|
|
10205
|
+
export type SendWhatsAppFlowMessageResponse = ({
|
|
10206
|
+
success?: boolean;
|
|
10207
|
+
/**
|
|
10208
|
+
* WhatsApp message ID (WAMID)
|
|
10209
|
+
*/
|
|
10210
|
+
messageId?: string;
|
|
10211
|
+
});
|
|
10212
|
+
|
|
10213
|
+
export type SendWhatsAppFlowMessageError = (unknown | {
|
|
10214
|
+
error?: string;
|
|
10215
|
+
});
|
|
10216
|
+
|
|
9870
10217
|
export type ListContactsData = {
|
|
9871
10218
|
query?: {
|
|
9872
10219
|
isSubscribed?: 'true' | 'false';
|
|
@@ -11196,6 +11543,46 @@ export type UpdateAdCampaignStatusError = (unknown | {
|
|
|
11196
11543
|
error?: string;
|
|
11197
11544
|
});
|
|
11198
11545
|
|
|
11546
|
+
export type GetAdTreeData = {
|
|
11547
|
+
query?: {
|
|
11548
|
+
/**
|
|
11549
|
+
* Social account ID
|
|
11550
|
+
*/
|
|
11551
|
+
accountId?: string;
|
|
11552
|
+
/**
|
|
11553
|
+
* Platform ad account ID
|
|
11554
|
+
*/
|
|
11555
|
+
adAccountId?: string;
|
|
11556
|
+
/**
|
|
11557
|
+
* Campaigns per page
|
|
11558
|
+
*/
|
|
11559
|
+
limit?: number;
|
|
11560
|
+
/**
|
|
11561
|
+
* Page number (1-based)
|
|
11562
|
+
*/
|
|
11563
|
+
page?: number;
|
|
11564
|
+
platform?: 'facebook' | 'instagram' | 'tiktok' | 'linkedin' | 'pinterest' | 'google' | 'twitter';
|
|
11565
|
+
/**
|
|
11566
|
+
* Profile ID
|
|
11567
|
+
*/
|
|
11568
|
+
profileId?: string;
|
|
11569
|
+
source?: 'zernio' | 'all';
|
|
11570
|
+
/**
|
|
11571
|
+
* Filter by derived campaign status (post-aggregation)
|
|
11572
|
+
*/
|
|
11573
|
+
status?: 'active' | 'paused' | 'pending_review' | 'rejected' | 'completed' | 'cancelled' | 'error';
|
|
11574
|
+
};
|
|
11575
|
+
};
|
|
11576
|
+
|
|
11577
|
+
export type GetAdTreeResponse = ({
|
|
11578
|
+
campaigns?: Array<AdTreeCampaign>;
|
|
11579
|
+
pagination?: Pagination;
|
|
11580
|
+
});
|
|
11581
|
+
|
|
11582
|
+
export type GetAdTreeError = ({
|
|
11583
|
+
error?: string;
|
|
11584
|
+
} | unknown);
|
|
11585
|
+
|
|
11199
11586
|
export type GetAdData = {
|
|
11200
11587
|
path: {
|
|
11201
11588
|
adId: string;
|