@zernio/node 0.2.715 → 0.2.717
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 +6 -0
- package/dist/index.d.mts +323 -60
- package/dist/index.d.ts +323 -60
- package/dist/index.js +53 -1
- package/dist/index.mjs +53 -1
- package/package.json +1 -1
- package/src/client.ts +22 -0
- package/src/generated/sdk.gen.ts +103 -1
- package/src/generated/types.gen.ts +330 -59
|
@@ -661,6 +661,65 @@ export type AdFunnelCounts = {
|
|
|
661
661
|
messagingFirstReplies?: number;
|
|
662
662
|
};
|
|
663
663
|
|
|
664
|
+
export type AdKeyword = {
|
|
665
|
+
id?: string;
|
|
666
|
+
/**
|
|
667
|
+
* Social account ID owning the sync
|
|
668
|
+
*/
|
|
669
|
+
accountId?: string;
|
|
670
|
+
profileId?: string;
|
|
671
|
+
platform?: 'google';
|
|
672
|
+
/**
|
|
673
|
+
* Google customer ID
|
|
674
|
+
*/
|
|
675
|
+
adAccountId?: string;
|
|
676
|
+
campaignId?: string;
|
|
677
|
+
campaignName?: (string) | null;
|
|
678
|
+
campaignStatus?: (string) | null;
|
|
679
|
+
/**
|
|
680
|
+
* Google ad group ID
|
|
681
|
+
*/
|
|
682
|
+
adSetId?: string;
|
|
683
|
+
adSetName?: (string) | null;
|
|
684
|
+
adSetStatus?: (string) | null;
|
|
685
|
+
keyword?: string;
|
|
686
|
+
matchType?: 'exact' | 'phrase' | 'broad' | 'unknown';
|
|
687
|
+
status?: 'active' | 'paused';
|
|
688
|
+
negative?: boolean;
|
|
689
|
+
/**
|
|
690
|
+
* Google Quality Score, 1-10. Null when unrated.
|
|
691
|
+
*/
|
|
692
|
+
qualityScore?: (number) | null;
|
|
693
|
+
syncedAt?: (string) | null;
|
|
694
|
+
/**
|
|
695
|
+
* Trailing 30-day window. Null on rows synced before the metrics columns existed (re-synced on the keyword's next weekly sweep).
|
|
696
|
+
*/
|
|
697
|
+
metrics?: {
|
|
698
|
+
windowDays?: number;
|
|
699
|
+
clicks?: number;
|
|
700
|
+
impressions?: number;
|
|
701
|
+
/**
|
|
702
|
+
* Account currency, not USD-normalized
|
|
703
|
+
*/
|
|
704
|
+
cost?: number;
|
|
705
|
+
conversions?: number;
|
|
706
|
+
/**
|
|
707
|
+
* Account currency
|
|
708
|
+
*/
|
|
709
|
+
firstPageCpc?: (number) | null;
|
|
710
|
+
/**
|
|
711
|
+
* Account currency
|
|
712
|
+
*/
|
|
713
|
+
firstPositionCpc?: (number) | null;
|
|
714
|
+
} | null;
|
|
715
|
+
};
|
|
716
|
+
|
|
717
|
+
export type platform2 = 'google';
|
|
718
|
+
|
|
719
|
+
export type matchType = 'exact' | 'phrase' | 'broad' | 'unknown';
|
|
720
|
+
|
|
721
|
+
export type status = 'active' | 'paused';
|
|
722
|
+
|
|
664
723
|
export type AdMetrics = {
|
|
665
724
|
spend?: number;
|
|
666
725
|
impressions?: number;
|
|
@@ -1320,7 +1379,7 @@ export type AnalyticsSinglePostResponse = {
|
|
|
1320
1379
|
/**
|
|
1321
1380
|
* Overall post status. "partial" when some platforms published and others failed.
|
|
1322
1381
|
*/
|
|
1323
|
-
export type
|
|
1382
|
+
export type status2 = 'published' | 'failed' | 'partial';
|
|
1324
1383
|
|
|
1325
1384
|
/**
|
|
1326
1385
|
* Overall sync state across all platforms
|
|
@@ -1468,7 +1527,7 @@ export type Blog = {
|
|
|
1468
1527
|
handle?: string;
|
|
1469
1528
|
};
|
|
1470
1529
|
|
|
1471
|
-
export type
|
|
1530
|
+
export type platform3 = 'shopify';
|
|
1472
1531
|
|
|
1473
1532
|
/**
|
|
1474
1533
|
* An article inside a blog on the connected platform.
|
|
@@ -1757,7 +1816,7 @@ export type channel = 'whatsapp' | 'pstn';
|
|
|
1757
1816
|
|
|
1758
1817
|
export type direction = 'inbound' | 'outbound';
|
|
1759
1818
|
|
|
1760
|
-
export type
|
|
1819
|
+
export type status3 = 'ringing' | 'answered' | 'ended' | 'failed';
|
|
1761
1820
|
|
|
1762
1821
|
/**
|
|
1763
1822
|
* Caller ID presented on the forwarded leg.
|
|
@@ -1973,7 +2032,7 @@ export type ConversionDestination = {
|
|
|
1973
2032
|
* For LinkedIn, `inactive` means the rule is soft-deleted (`enabled: false`).
|
|
1974
2033
|
*
|
|
1975
2034
|
*/
|
|
1976
|
-
export type
|
|
2035
|
+
export type status4 = 'active' | 'inactive';
|
|
1977
2036
|
|
|
1978
2037
|
/**
|
|
1979
2038
|
* A single conversion event to relay to the ad platform. All PII fields
|
|
@@ -2569,7 +2628,7 @@ export type objective = 'OUTCOME_ENGAGEMENT' | 'OUTCOME_SALES' | 'OUTCOME_LEADS'
|
|
|
2569
2628
|
* newly created ad(s) after Meta accepts them.
|
|
2570
2629
|
*
|
|
2571
2630
|
*/
|
|
2572
|
-
export type
|
|
2631
|
+
export type status5 = 'ACTIVE' | 'PAUSED';
|
|
2573
2632
|
|
|
2574
2633
|
/**
|
|
2575
2634
|
* Campaign-level status, same semantics as `POST /v1/ads/create`. Defaults
|
|
@@ -2937,7 +2996,7 @@ export type privacy_level = 2;
|
|
|
2937
2996
|
/**
|
|
2938
2997
|
* 1=SCHEDULED, 2=ACTIVE, 3=COMPLETED, 4=CANCELED
|
|
2939
2998
|
*/
|
|
2940
|
-
export type
|
|
2999
|
+
export type status6 = 1 | 2 | 3 | 4;
|
|
2941
3000
|
|
|
2942
3001
|
/**
|
|
2943
3002
|
* 1=STAGE_INSTANCE, 2=VOICE, 3=EXTERNAL
|
|
@@ -3694,7 +3753,7 @@ export type InboxWebhookConversation = {
|
|
|
3694
3753
|
contactId?: string;
|
|
3695
3754
|
};
|
|
3696
3755
|
|
|
3697
|
-
export type
|
|
3756
|
+
export type status7 = 'active' | 'archived';
|
|
3698
3757
|
|
|
3699
3758
|
/**
|
|
3700
3759
|
* The message object included in inbox webhook payloads.
|
|
@@ -3810,7 +3869,7 @@ export type InboxWebhookMessage = {
|
|
|
3810
3869
|
isRead: boolean;
|
|
3811
3870
|
};
|
|
3812
3871
|
|
|
3813
|
-
export type
|
|
3872
|
+
export type platform4 = 'instagram' | 'facebook' | 'telegram' | 'whatsapp' | 'sms';
|
|
3814
3873
|
|
|
3815
3874
|
export type direction2 = 'incoming' | 'outgoing';
|
|
3816
3875
|
|
|
@@ -3938,7 +3997,7 @@ export type InstagramAccountInsightsResponse = {
|
|
|
3938
3997
|
/**
|
|
3939
3998
|
* Platform that served this response.
|
|
3940
3999
|
*/
|
|
3941
|
-
export type
|
|
4000
|
+
export type platform5 = 'facebook' | 'instagram' | 'youtube' | 'linkedin' | 'tiktok';
|
|
3942
4001
|
|
|
3943
4002
|
export type metricType = 'time_series' | 'total_value';
|
|
3944
4003
|
|
|
@@ -4153,6 +4212,16 @@ export type contentType2 = 'story';
|
|
|
4153
4212
|
*/
|
|
4154
4213
|
export type graduationStrategy = 'MANUAL' | 'SS_PERFORMANCE';
|
|
4155
4214
|
|
|
4215
|
+
/**
|
|
4216
|
+
* A Google Search keyword: a bare string (BROAD match), or an object naming the match type.
|
|
4217
|
+
*/
|
|
4218
|
+
export type KeywordEntry = string | {
|
|
4219
|
+
text: string;
|
|
4220
|
+
matchType?: 'exact' | 'phrase' | 'broad';
|
|
4221
|
+
};
|
|
4222
|
+
|
|
4223
|
+
export type matchType2 = 'exact' | 'phrase' | 'broad';
|
|
4224
|
+
|
|
4156
4225
|
/**
|
|
4157
4226
|
* LinkedIn-specific options for POST /v1/ads/boost and POST /v1/ads/create: campaign bidding and delivery controls, plus the LinkedIn-only creative formats on /v1/ads/create. Unknown keys are rejected.
|
|
4158
4227
|
*
|
|
@@ -4800,7 +4869,7 @@ export type PlatformAnalytics = {
|
|
|
4800
4869
|
errorMessage?: (string) | null;
|
|
4801
4870
|
};
|
|
4802
4871
|
|
|
4803
|
-
export type
|
|
4872
|
+
export type status8 = 'published' | 'failed';
|
|
4804
4873
|
|
|
4805
4874
|
/**
|
|
4806
4875
|
* Sync state of analytics for this platform
|
|
@@ -4829,7 +4898,7 @@ export type PlatformTarget = {
|
|
|
4829
4898
|
[key: string]: unknown;
|
|
4830
4899
|
};
|
|
4831
4900
|
/**
|
|
4832
|
-
* Platform-specific status: pending,
|
|
4901
|
+
* Platform-specific status: pending, processing, uploading, published, failed, cancelled (removed from the platform via DELETE /v1/posts/{postId}/unpublish)
|
|
4833
4902
|
*/
|
|
4834
4903
|
status?: string;
|
|
4835
4904
|
/**
|
|
@@ -4897,7 +4966,10 @@ export type Post = {
|
|
|
4897
4966
|
platforms?: Array<PlatformTarget>;
|
|
4898
4967
|
scheduledFor?: string;
|
|
4899
4968
|
timezone?: string;
|
|
4900
|
-
|
|
4969
|
+
/**
|
|
4970
|
+
* `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.
|
|
4971
|
+
*/
|
|
4972
|
+
status?: 'draft' | 'scheduled' | 'publishing' | 'published' | 'partial' | 'failed' | 'cancelled';
|
|
4901
4973
|
/**
|
|
4902
4974
|
* YouTube constraints: each tag max 100 chars, combined max 500 chars, duplicates removed.
|
|
4903
4975
|
*/
|
|
@@ -4931,7 +5003,10 @@ export type Post = {
|
|
|
4931
5003
|
updatedAt?: string;
|
|
4932
5004
|
};
|
|
4933
5005
|
|
|
4934
|
-
|
|
5006
|
+
/**
|
|
5007
|
+
* `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.
|
|
5008
|
+
*/
|
|
5009
|
+
export type status9 = 'draft' | 'scheduled' | 'publishing' | 'published' | 'partial' | 'failed' | 'cancelled';
|
|
4935
5010
|
|
|
4936
5011
|
export type visibility = 'public' | 'private' | 'unlisted';
|
|
4937
5012
|
|
|
@@ -5427,7 +5502,7 @@ export type ReviewWebhookReview = {
|
|
|
5427
5502
|
/**
|
|
5428
5503
|
* Platform the review originated on. Currently Google Business Profile only.
|
|
5429
5504
|
*/
|
|
5430
|
-
export type
|
|
5505
|
+
export type platform6 = 'googlebusiness';
|
|
5431
5506
|
|
|
5432
5507
|
/**
|
|
5433
5508
|
* A Meta Reach & Frequency prediction. Money values in whole units of the ad account currency.
|
|
@@ -5590,7 +5665,7 @@ export type SocialAccount = {
|
|
|
5590
5665
|
};
|
|
5591
5666
|
};
|
|
5592
5667
|
|
|
5593
|
-
export type
|
|
5668
|
+
export type platform7 = 'tiktok' | 'instagram' | 'facebook' | 'youtube' | 'linkedin' | 'twitter' | 'threads' | 'pinterest' | 'reddit' | 'bluesky' | 'googlebusiness' | 'telegram' | 'snapchat' | 'discord' | 'slack' | 'whatsapp' | 'linkedinads' | 'metaads' | 'pinterestads' | 'tiktokads' | 'xads' | 'googleads' | 'openaiads' | 'sms' | 'phone' | 'rcs';
|
|
5594
5669
|
|
|
5595
5670
|
/**
|
|
5596
5671
|
* Normalized, platform-agnostic ad-targeting spec. Every field is optional, an
|
|
@@ -6056,7 +6131,7 @@ export type TrackingTag = {
|
|
|
6056
6131
|
ownerAdAccountId?: string;
|
|
6057
6132
|
};
|
|
6058
6133
|
|
|
6059
|
-
export type
|
|
6134
|
+
export type platform8 = 'metaads';
|
|
6060
6135
|
|
|
6061
6136
|
/**
|
|
6062
6137
|
* Platform-native flavor of the tag (Meta: `pixel`).
|
|
@@ -6156,7 +6231,7 @@ export type UploadTokenResponse = {
|
|
|
6156
6231
|
status?: 'pending' | 'completed' | 'expired';
|
|
6157
6232
|
};
|
|
6158
6233
|
|
|
6159
|
-
export type
|
|
6234
|
+
export type status10 = 'pending' | 'completed' | 'expired';
|
|
6160
6235
|
|
|
6161
6236
|
export type UploadTokenStatusResponse = {
|
|
6162
6237
|
token?: string;
|
|
@@ -6631,7 +6706,7 @@ export type Verification = {
|
|
|
6631
6706
|
resend?: boolean;
|
|
6632
6707
|
};
|
|
6633
6708
|
|
|
6634
|
-
export type
|
|
6709
|
+
export type status11 = 'pending' | 'approved' | 'expired' | 'max_attempts_reached' | 'canceled' | 'delivery_failed';
|
|
6635
6710
|
|
|
6636
6711
|
export type channel2 = 'sms';
|
|
6637
6712
|
|
|
@@ -6700,7 +6775,7 @@ export type WebhookLog = {
|
|
|
6700
6775
|
*/
|
|
6701
6776
|
webhookName?: string;
|
|
6702
6777
|
/**
|
|
6703
|
-
* Stable webhook event ID
|
|
6778
|
+
* Stable webhook event ID: the payload `id`, also sent as the X-Zernio-Event-Id header. Shared by every attempt and redelivery of the same event.
|
|
6704
6779
|
*/
|
|
6705
6780
|
eventId?: string;
|
|
6706
6781
|
/**
|
|
@@ -6750,7 +6825,7 @@ export type WebhookLog = {
|
|
|
6750
6825
|
/**
|
|
6751
6826
|
* Delivery outcome
|
|
6752
6827
|
*/
|
|
6753
|
-
export type
|
|
6828
|
+
export type status12 = 'success' | 'failed';
|
|
6754
6829
|
|
|
6755
6830
|
/**
|
|
6756
6831
|
* Webhook payload for `account.ads.initial_sync_completed` events.
|
|
@@ -6862,7 +6937,7 @@ export type event = 'account.ads.initial_sync_completed';
|
|
|
6862
6937
|
/**
|
|
6863
6938
|
* Overall outcome of the initial sync.
|
|
6864
6939
|
*/
|
|
6865
|
-
export type
|
|
6940
|
+
export type status13 = 'success' | 'failure';
|
|
6866
6941
|
|
|
6867
6942
|
/**
|
|
6868
6943
|
* Stable category for UX branching. New values may be added; existing ones are
|
|
@@ -7489,7 +7564,7 @@ export type WebhookPayloadComment = {
|
|
|
7489
7564
|
|
|
7490
7565
|
export type event10 = 'comment.received';
|
|
7491
7566
|
|
|
7492
|
-
export type
|
|
7567
|
+
export type platform9 = 'instagram' | 'facebook' | 'twitter' | 'youtube' | 'linkedin' | 'bluesky' | 'reddit';
|
|
7493
7568
|
|
|
7494
7569
|
/**
|
|
7495
7570
|
* Fired once when a new conversation begins, in either direction. A conversation
|
|
@@ -7546,7 +7621,7 @@ export type WebhookPayloadConversationStarted = {
|
|
|
7546
7621
|
|
|
7547
7622
|
export type event11 = 'conversation.started';
|
|
7548
7623
|
|
|
7549
|
-
export type
|
|
7624
|
+
export type platform10 = 'instagram' | 'facebook' | 'telegram' | 'whatsapp' | 'twitter' | 'reddit' | 'bluesky' | 'sms' | 'slack';
|
|
7550
7625
|
|
|
7551
7626
|
/**
|
|
7552
7627
|
* Webhook payload for post.external.created / post.external.updated /
|
|
@@ -7647,7 +7722,7 @@ export type WebhookPayloadLead = {
|
|
|
7647
7722
|
|
|
7648
7723
|
export type event13 = 'lead.received';
|
|
7649
7724
|
|
|
7650
|
-
export type
|
|
7725
|
+
export type platform11 = 'facebook';
|
|
7651
7726
|
|
|
7652
7727
|
/**
|
|
7653
7728
|
* Webhook payload for message received events
|
|
@@ -8443,7 +8518,7 @@ export type event18 = 'message.sent';
|
|
|
8443
8518
|
/**
|
|
8444
8519
|
* Every platform whose outgoing messages Zernio observes. sms is absent on purpose: its carrier receipts update delivery status and never raise message.sent.
|
|
8445
8520
|
*/
|
|
8446
|
-
export type
|
|
8521
|
+
export type platform12 = 'instagram' | 'facebook' | 'telegram' | 'whatsapp' | 'twitter' | 'reddit' | 'bluesky' | 'slack';
|
|
8447
8522
|
|
|
8448
8523
|
/**
|
|
8449
8524
|
* 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). Absent on non-WhatsApp platforms. Says where WhatsApp saw the send come from, not which Zernio surface produced it: read sentVia for that.
|
|
@@ -8629,7 +8704,7 @@ export type event21 = 'post.platform.published' | 'post.platform.failed' | 'post
|
|
|
8629
8704
|
/**
|
|
8630
8705
|
* Terminal status this event fires on. Matches the event suffix.
|
|
8631
8706
|
*/
|
|
8632
|
-
export type
|
|
8707
|
+
export type status14 = 'published' | 'failed' | 'deleted';
|
|
8633
8708
|
|
|
8634
8709
|
/**
|
|
8635
8710
|
* Webhook payload for reaction received events (WhatsApp, Telegram, Slack, Instagram, Facebook Messenger)
|
|
@@ -8889,12 +8964,12 @@ export type WebhookPayloadWhatsAppAccountNameStatusUpdated = {
|
|
|
8889
8964
|
|
|
8890
8965
|
export type event27 = 'whatsapp.account.name_status_updated';
|
|
8891
8966
|
|
|
8892
|
-
export type
|
|
8967
|
+
export type platform13 = 'whatsapp';
|
|
8893
8968
|
|
|
8894
8969
|
/**
|
|
8895
8970
|
* Normalized from Meta's `decision` (REJECTED -> DECLINED, DEFERRED -> PENDING_REVIEW; the review is still open on DEFERRED, not a rejection).
|
|
8896
8971
|
*/
|
|
8897
|
-
export type
|
|
8972
|
+
export type status15 = 'APPROVED' | 'DECLINED' | 'PENDING_REVIEW';
|
|
8898
8973
|
|
|
8899
8974
|
/**
|
|
8900
8975
|
* Webhook payload for the `whatsapp.template.category_updated` event.
|
|
@@ -9043,7 +9118,7 @@ export type event29 = 'whatsapp.template.status_updated';
|
|
|
9043
9118
|
* request before the template is actually removed.
|
|
9044
9119
|
*
|
|
9045
9120
|
*/
|
|
9046
|
-
export type
|
|
9121
|
+
export type status16 = 'APPROVED' | 'REJECTED' | 'PENDING' | 'PAUSED' | 'DISABLED' | 'IN_APPEAL' | 'PENDING_DELETION';
|
|
9047
9122
|
|
|
9048
9123
|
export type WhatsAppBodyComponent = {
|
|
9049
9124
|
type: 'body';
|
|
@@ -9192,7 +9267,7 @@ export type WhatsAppSandboxSession = {
|
|
|
9192
9267
|
* list responses.
|
|
9193
9268
|
*
|
|
9194
9269
|
*/
|
|
9195
|
-
export type
|
|
9270
|
+
export type status17 = 'pending' | 'active';
|
|
9196
9271
|
|
|
9197
9272
|
export type WhatsAppTemplateButton = {
|
|
9198
9273
|
type: 'quick_reply' | 'url' | 'phone_number' | 'otp' | 'copy_code' | 'flow' | 'mpm' | 'catalog';
|
|
@@ -9311,7 +9386,7 @@ export type WorkflowExecutionEvent = {
|
|
|
9311
9386
|
|
|
9312
9387
|
export type action2 = 'execution_started' | 'execution_completed' | 'execution_exited' | 'execution_paused' | 'execution_resumed' | 'node_started' | 'node_completed' | 'node_failed' | 'node_skipped';
|
|
9313
9388
|
|
|
9314
|
-
export type
|
|
9389
|
+
export type status18 = 'success' | 'failed' | 'pending';
|
|
9315
9390
|
|
|
9316
9391
|
/**
|
|
9317
9392
|
* A node in a workflow graph. `config` shape depends on `type`.
|
|
@@ -11764,7 +11839,7 @@ export type ListPostsData = {
|
|
|
11764
11839
|
* Which collection to read. `zernio` (default) returns posts authored through Zernio. `external` returns posts synced from the platform (existing/historical posts that were published outside Zernio). Combine with `accountId` and paginate via `page`/`limit` to walk the full synced history (we keep up to the last ~12 months per account).
|
|
11765
11840
|
*/
|
|
11766
11841
|
source?: 'zernio' | 'external';
|
|
11767
|
-
status?: 'draft' | 'scheduled' | 'published' | 'failed';
|
|
11842
|
+
status?: 'draft' | 'scheduled' | 'publishing' | 'published' | 'partial' | 'failed' | 'cancelled';
|
|
11768
11843
|
};
|
|
11769
11844
|
};
|
|
11770
11845
|
|
|
@@ -11817,6 +11892,10 @@ export type CreatePostData = {
|
|
|
11817
11892
|
* When true, saves the post as a draft. When none of scheduledFor, publishNow, or queuedFromProfile are provided, the post defaults to draft automatically.
|
|
11818
11893
|
*/
|
|
11819
11894
|
isDraft?: boolean;
|
|
11895
|
+
/**
|
|
11896
|
+
* TikTok only. Preview whether each `tiktok` entry in `platforms` could publish right now under the TikTok Direct Post daily limits, without creating, scheduling or publishing anything: no post is persisted and no upload slot is claimed, so it can be repeated freely. The request still goes through auth, the payment gate and body validation, then returns HTTP 200 with `{ dryRun: true, canPublish, tiktok: [...] }` instead of 201. Only `tiktok` entries are evaluated; other platforms in the body are ignored, and a body with no `tiktok` entry is rejected with 400 `invalid_field_value` on `platforms`. An entry with `platformSpecificData.tiktokSettings.draft: true` (Creator Inbox upload) is not subject to the limit and always reports `canPublish: true`.
|
|
11897
|
+
*/
|
|
11898
|
+
dryRun?: boolean;
|
|
11820
11899
|
/**
|
|
11821
11900
|
* IANA timezone (`Europe/Madrid`, `America/New_York`) used to interpret a `scheduledFor` (root or per-platform) that carries no `Z` or offset. Has no effect on values that already carry one. An unknown name returns 400 when `scheduledFor` is set.
|
|
11822
11901
|
*/
|
|
@@ -11873,7 +11952,31 @@ export type CreatePostData = {
|
|
|
11873
11952
|
};
|
|
11874
11953
|
};
|
|
11875
11954
|
|
|
11876
|
-
export type CreatePostResponse = (
|
|
11955
|
+
export type CreatePostResponse = ({
|
|
11956
|
+
/**
|
|
11957
|
+
* Always true on this response
|
|
11958
|
+
*/
|
|
11959
|
+
dryRun: boolean;
|
|
11960
|
+
/**
|
|
11961
|
+
* True only when every evaluated TikTok account can publish now
|
|
11962
|
+
*/
|
|
11963
|
+
canPublish: boolean;
|
|
11964
|
+
/**
|
|
11965
|
+
* One verdict per `tiktok` entry in the request, in request order
|
|
11966
|
+
*/
|
|
11967
|
+
tiktok: Array<{
|
|
11968
|
+
accountId: string;
|
|
11969
|
+
canPublish: boolean;
|
|
11970
|
+
/**
|
|
11971
|
+
* Whether this account already published a Direct Post today (an account that did can keep publishing). Absent for Creator Inbox drafts and when no per-user limit applies.
|
|
11972
|
+
*/
|
|
11973
|
+
alreadyPostedToday?: boolean;
|
|
11974
|
+
/**
|
|
11975
|
+
* Human-readable explanation of the verdict
|
|
11976
|
+
*/
|
|
11977
|
+
reason: string;
|
|
11978
|
+
}>;
|
|
11979
|
+
} | PostCreateResponse | PostPublishIncompleteResponse);
|
|
11877
11980
|
|
|
11878
11981
|
export type CreatePostError = ({
|
|
11879
11982
|
error?: string;
|
|
@@ -16128,6 +16231,60 @@ export type ConnectDiscordChannelError = (ErrorResponse | {
|
|
|
16128
16231
|
};
|
|
16129
16232
|
} | unknown);
|
|
16130
16233
|
|
|
16234
|
+
export type ListSlackChannelsData = {
|
|
16235
|
+
query: {
|
|
16236
|
+
/**
|
|
16237
|
+
* Existing active Slack account (yours or a team member's) whose workspace token is reused.
|
|
16238
|
+
*/
|
|
16239
|
+
accountId?: string;
|
|
16240
|
+
/**
|
|
16241
|
+
* Nonce from the OAuth redirect (first connect).
|
|
16242
|
+
*/
|
|
16243
|
+
pendingDataToken?: string;
|
|
16244
|
+
/**
|
|
16245
|
+
* Zernio profile the channel account will belong to. Must match the profile the OAuth flow was started on when `pendingDataToken` is used.
|
|
16246
|
+
*/
|
|
16247
|
+
profileId: string;
|
|
16248
|
+
/**
|
|
16249
|
+
* Start-OAuth mode only: where to send the user after the connect completes. `redirectUrl` is accepted as an alias.
|
|
16250
|
+
*/
|
|
16251
|
+
redirect_url?: string;
|
|
16252
|
+
};
|
|
16253
|
+
};
|
|
16254
|
+
|
|
16255
|
+
export type ListSlackChannelsResponse = (({
|
|
16256
|
+
team: {
|
|
16257
|
+
/**
|
|
16258
|
+
* Slack workspace (team) id
|
|
16259
|
+
*/
|
|
16260
|
+
id?: string;
|
|
16261
|
+
name?: (string) | null;
|
|
16262
|
+
/**
|
|
16263
|
+
* Workspace icon URL
|
|
16264
|
+
*/
|
|
16265
|
+
icon?: (string) | null;
|
|
16266
|
+
};
|
|
16267
|
+
channels: Array<{
|
|
16268
|
+
/**
|
|
16269
|
+
* Channel id (C... or G...), the value to send as channelId on POST
|
|
16270
|
+
*/
|
|
16271
|
+
id: string;
|
|
16272
|
+
name: string;
|
|
16273
|
+
isPrivate: boolean;
|
|
16274
|
+
/**
|
|
16275
|
+
* Whether the Zernio bot is already a member of the channel
|
|
16276
|
+
*/
|
|
16277
|
+
isMember: boolean;
|
|
16278
|
+
}>;
|
|
16279
|
+
} | {
|
|
16280
|
+
authUrl: string;
|
|
16281
|
+
state: string;
|
|
16282
|
+
}));
|
|
16283
|
+
|
|
16284
|
+
export type ListSlackChannelsError = (unknown | {
|
|
16285
|
+
error?: string;
|
|
16286
|
+
});
|
|
16287
|
+
|
|
16131
16288
|
export type ConnectSlackChannelData = {
|
|
16132
16289
|
body: {
|
|
16133
16290
|
profileId: string;
|
|
@@ -30406,37 +30563,81 @@ export type ListAdKeywordsData = {
|
|
|
30406
30563
|
};
|
|
30407
30564
|
|
|
30408
30565
|
export type ListAdKeywordsResponse = ({
|
|
30409
|
-
keywords?: Array<
|
|
30410
|
-
|
|
30566
|
+
keywords?: Array<AdKeyword>;
|
|
30567
|
+
pagination?: Pagination;
|
|
30568
|
+
});
|
|
30569
|
+
|
|
30570
|
+
export type ListAdKeywordsError = (ErrorResponse | {
|
|
30571
|
+
error?: string;
|
|
30572
|
+
} | unknown);
|
|
30573
|
+
|
|
30574
|
+
export type AddAdKeywordsData = {
|
|
30575
|
+
body: {
|
|
30411
30576
|
/**
|
|
30412
|
-
* Social account ID
|
|
30577
|
+
* Social account ID (Google Ads)
|
|
30413
30578
|
*/
|
|
30414
|
-
accountId
|
|
30415
|
-
profileId?: string;
|
|
30416
|
-
platform?: 'google';
|
|
30579
|
+
accountId: string;
|
|
30417
30580
|
/**
|
|
30418
|
-
* Google
|
|
30581
|
+
* Google ad group ID to add the keywords to
|
|
30419
30582
|
*/
|
|
30420
|
-
|
|
30421
|
-
|
|
30422
|
-
|
|
30423
|
-
|
|
30583
|
+
adSetId: string;
|
|
30584
|
+
keywords: Array<(string | {
|
|
30585
|
+
text: string;
|
|
30586
|
+
matchType?: 'exact' | 'phrase' | 'broad';
|
|
30587
|
+
})>;
|
|
30424
30588
|
/**
|
|
30425
|
-
*
|
|
30589
|
+
* Add as ad-group-level negatives instead of positive keywords
|
|
30426
30590
|
*/
|
|
30427
|
-
adSetId?: string;
|
|
30428
|
-
adSetName?: (string) | null;
|
|
30429
|
-
adSetStatus?: (string) | null;
|
|
30430
|
-
keyword?: string;
|
|
30431
|
-
matchType?: 'exact' | 'phrase' | 'broad' | 'unknown';
|
|
30432
|
-
status?: 'active' | 'paused';
|
|
30433
30591
|
negative?: boolean;
|
|
30434
|
-
|
|
30435
|
-
|
|
30436
|
-
|
|
30592
|
+
};
|
|
30593
|
+
};
|
|
30594
|
+
|
|
30595
|
+
export type AddAdKeywordsResponse = ({
|
|
30596
|
+
keywords?: Array<AdKeyword>;
|
|
30437
30597
|
});
|
|
30438
30598
|
|
|
30439
|
-
export type
|
|
30599
|
+
export type AddAdKeywordsError = (ErrorResponse | {
|
|
30600
|
+
error?: string;
|
|
30601
|
+
} | unknown);
|
|
30602
|
+
|
|
30603
|
+
export type UpdateAdKeywordData = {
|
|
30604
|
+
body: {
|
|
30605
|
+
status: 'active' | 'paused';
|
|
30606
|
+
};
|
|
30607
|
+
path: {
|
|
30608
|
+
/**
|
|
30609
|
+
* Zernio keyword ID (not the Google criterion ID)
|
|
30610
|
+
*/
|
|
30611
|
+
keywordId: string;
|
|
30612
|
+
};
|
|
30613
|
+
};
|
|
30614
|
+
|
|
30615
|
+
export type UpdateAdKeywordResponse = ({
|
|
30616
|
+
keyword?: AdKeyword;
|
|
30617
|
+
});
|
|
30618
|
+
|
|
30619
|
+
export type UpdateAdKeywordError = (ErrorResponse | {
|
|
30620
|
+
error?: string;
|
|
30621
|
+
} | unknown);
|
|
30622
|
+
|
|
30623
|
+
export type RemoveAdKeywordData = {
|
|
30624
|
+
path: {
|
|
30625
|
+
/**
|
|
30626
|
+
* Zernio keyword ID (not the Google criterion ID)
|
|
30627
|
+
*/
|
|
30628
|
+
keywordId: string;
|
|
30629
|
+
};
|
|
30630
|
+
};
|
|
30631
|
+
|
|
30632
|
+
export type RemoveAdKeywordResponse = ({
|
|
30633
|
+
/**
|
|
30634
|
+
* Always true on success
|
|
30635
|
+
*/
|
|
30636
|
+
removed?: boolean;
|
|
30637
|
+
keywordId?: string;
|
|
30638
|
+
});
|
|
30639
|
+
|
|
30640
|
+
export type RemoveAdKeywordError = (ErrorResponse | {
|
|
30440
30641
|
error?: string;
|
|
30441
30642
|
} | unknown);
|
|
30442
30643
|
|
|
@@ -30701,6 +30902,72 @@ export type DeleteAdCampaignError = ({
|
|
|
30701
30902
|
error?: string;
|
|
30702
30903
|
} | unknown);
|
|
30703
30904
|
|
|
30905
|
+
export type ListCampaignNegativeKeywordsData = {
|
|
30906
|
+
path: {
|
|
30907
|
+
/**
|
|
30908
|
+
* Platform campaign ID
|
|
30909
|
+
*/
|
|
30910
|
+
campaignId: string;
|
|
30911
|
+
};
|
|
30912
|
+
query?: {
|
|
30913
|
+
/**
|
|
30914
|
+
* Optional and NOT authoritative: the resolved campaign's own platform decides 200 vs 501, never this hint.
|
|
30915
|
+
*/
|
|
30916
|
+
platform?: 'facebook' | 'instagram' | 'tiktok' | 'linkedin' | 'pinterest' | 'google' | 'twitter' | 'openai';
|
|
30917
|
+
};
|
|
30918
|
+
};
|
|
30919
|
+
|
|
30920
|
+
export type ListCampaignNegativeKeywordsResponse = ({
|
|
30921
|
+
keywords?: Array<{
|
|
30922
|
+
criterionId?: string;
|
|
30923
|
+
text?: string;
|
|
30924
|
+
matchType?: 'exact' | 'phrase' | 'broad';
|
|
30925
|
+
}>;
|
|
30926
|
+
});
|
|
30927
|
+
|
|
30928
|
+
export type ListCampaignNegativeKeywordsError = ({
|
|
30929
|
+
error?: string;
|
|
30930
|
+
} | unknown);
|
|
30931
|
+
|
|
30932
|
+
export type ReplaceCampaignNegativeKeywordsData = {
|
|
30933
|
+
body: {
|
|
30934
|
+
/**
|
|
30935
|
+
* Optional and NOT authoritative: the resolved campaign's own platform decides 200 vs 501, never this hint.
|
|
30936
|
+
*/
|
|
30937
|
+
platform?: 'facebook' | 'instagram' | 'tiktok' | 'linkedin' | 'pinterest' | 'google' | 'twitter' | 'openai';
|
|
30938
|
+
keywords: Array<KeywordEntry>;
|
|
30939
|
+
};
|
|
30940
|
+
path: {
|
|
30941
|
+
/**
|
|
30942
|
+
* Platform campaign ID
|
|
30943
|
+
*/
|
|
30944
|
+
campaignId: string;
|
|
30945
|
+
};
|
|
30946
|
+
};
|
|
30947
|
+
|
|
30948
|
+
export type ReplaceCampaignNegativeKeywordsResponse = ({
|
|
30949
|
+
/**
|
|
30950
|
+
* Negative criteria newly created on Google
|
|
30951
|
+
*/
|
|
30952
|
+
created?: number;
|
|
30953
|
+
/**
|
|
30954
|
+
* Negative criteria removed from Google
|
|
30955
|
+
*/
|
|
30956
|
+
removed?: number;
|
|
30957
|
+
/**
|
|
30958
|
+
* The full negative-keyword set after the replace
|
|
30959
|
+
*/
|
|
30960
|
+
keywords?: Array<{
|
|
30961
|
+
criterionId?: string;
|
|
30962
|
+
text?: string;
|
|
30963
|
+
matchType?: 'exact' | 'phrase' | 'broad';
|
|
30964
|
+
}>;
|
|
30965
|
+
});
|
|
30966
|
+
|
|
30967
|
+
export type ReplaceCampaignNegativeKeywordsError = (ErrorResponse | {
|
|
30968
|
+
error?: string;
|
|
30969
|
+
} | unknown);
|
|
30970
|
+
|
|
30704
30971
|
export type BulkUpdateAdCampaignStatusData = {
|
|
30705
30972
|
body: {
|
|
30706
30973
|
status: 'active' | 'paused';
|
|
@@ -34214,13 +34481,17 @@ export type CreateStandaloneAdData = {
|
|
|
34214
34481
|
*/
|
|
34215
34482
|
campaignType?: 'display' | 'search';
|
|
34216
34483
|
/**
|
|
34217
|
-
* Google Search only.
|
|
34484
|
+
* Google Search only. Keywords on the new ad group; entries are strings (BROAD) or { text, matchType }. Editable later via PUT /v1/ads/{adId} targeting.keywords.
|
|
34218
34485
|
*/
|
|
34219
|
-
keywords?: Array<
|
|
34486
|
+
keywords?: Array<KeywordEntry>;
|
|
34487
|
+
/**
|
|
34488
|
+
* Google Search only; other platforms return 400. Ad-group-level negative keywords on the new ad group. Editable later via PUT /v1/ads/{adId} targeting.negativeKeywords.
|
|
34489
|
+
*/
|
|
34490
|
+
negativeKeywords?: Array<KeywordEntry>;
|
|
34220
34491
|
/**
|
|
34221
|
-
* Google Search only; other platforms return 400.
|
|
34492
|
+
* Google Search only; other platforms return 400. Campaign-level negative keywords (campaign_criterion.negative), created alongside the ad group. Editable later via PUT /v1/ads/campaigns/{campaignId}/negative-keywords.
|
|
34222
34493
|
*/
|
|
34223
|
-
|
|
34494
|
+
campaignNegativeKeywords?: Array<KeywordEntry>;
|
|
34224
34495
|
/**
|
|
34225
34496
|
* Google Search RSA only. Extra headlines.
|
|
34226
34497
|
*/
|