@zernio/node 0.2.61 → 0.2.63
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +56 -56
- package/dist/index.d.ts +56 -56
- package/package.json +1 -1
- package/src/generated/sdk.gen.ts +91 -57
- package/src/generated/types.gen.ts +56 -56
|
@@ -87,7 +87,7 @@ export type Ad = {
|
|
|
87
87
|
_id?: string;
|
|
88
88
|
name?: string;
|
|
89
89
|
platform?: 'facebook' | 'instagram' | 'tiktok' | 'linkedin' | 'pinterest' | 'google' | 'twitter';
|
|
90
|
-
status?:
|
|
90
|
+
status?: AdStatus;
|
|
91
91
|
adType?: 'boost' | 'standalone';
|
|
92
92
|
goal?: 'engagement' | 'traffic' | 'awareness' | 'video_views';
|
|
93
93
|
/**
|
|
@@ -204,8 +204,6 @@ export type Ad = {
|
|
|
204
204
|
|
|
205
205
|
export type platform = 'facebook' | 'instagram' | 'tiktok' | 'linkedin' | 'pinterest' | 'google' | 'twitter';
|
|
206
206
|
|
|
207
|
-
export type status = 'active' | 'paused' | 'pending_review' | 'rejected' | 'completed' | 'cancelled' | 'error';
|
|
208
|
-
|
|
209
207
|
export type adType = 'boost' | 'standalone';
|
|
210
208
|
|
|
211
209
|
export type goal = 'engagement' | 'traffic' | 'awareness' | 'video_views';
|
|
@@ -219,7 +217,7 @@ export type AdCampaign = {
|
|
|
219
217
|
/**
|
|
220
218
|
* Derived from child ad statuses
|
|
221
219
|
*/
|
|
222
|
-
status?:
|
|
220
|
+
status?: (AdStatus);
|
|
223
221
|
adCount?: number;
|
|
224
222
|
budget?: {
|
|
225
223
|
amount?: number;
|
|
@@ -234,9 +232,9 @@ export type AdCampaign = {
|
|
|
234
232
|
*/
|
|
235
233
|
platformObjective?: (string) | null;
|
|
236
234
|
/**
|
|
237
|
-
* Meta optimization goal
|
|
235
|
+
* Meta optimization goal shared across ad sets, or comma-separated values when ad sets differ (e.g. OFFSITE_CONVERSIONS, VALUE, LEAD_GENERATION)
|
|
238
236
|
*/
|
|
239
|
-
optimizationGoal?: (
|
|
237
|
+
optimizationGoal?: (string) | null;
|
|
240
238
|
/**
|
|
241
239
|
* Campaign-level bid strategy (e.g. LOWEST_COST_WITHOUT_CAP, COST_CAP, LOWEST_COST_WITH_MIN_ROAS)
|
|
242
240
|
*/
|
|
@@ -277,6 +275,8 @@ export type AdMetrics = {
|
|
|
277
275
|
lastSyncedAt?: string;
|
|
278
276
|
};
|
|
279
277
|
|
|
278
|
+
export type AdStatus = 'active' | 'paused' | 'pending_review' | 'rejected' | 'completed' | 'cancelled' | 'error';
|
|
279
|
+
|
|
280
280
|
/**
|
|
281
281
|
* Ad set (or ad group/line item depending on platform) with rolled-up metrics and child ads
|
|
282
282
|
*/
|
|
@@ -286,7 +286,7 @@ export type AdTreeAdSet = {
|
|
|
286
286
|
/**
|
|
287
287
|
* Derived from child ad statuses
|
|
288
288
|
*/
|
|
289
|
-
status?:
|
|
289
|
+
status?: (AdStatus);
|
|
290
290
|
adCount?: number;
|
|
291
291
|
budget?: {
|
|
292
292
|
amount?: number;
|
|
@@ -325,7 +325,7 @@ export type AdTreeCampaign = {
|
|
|
325
325
|
/**
|
|
326
326
|
* Derived from child ad statuses
|
|
327
327
|
*/
|
|
328
|
-
status?:
|
|
328
|
+
status?: (AdStatus);
|
|
329
329
|
/**
|
|
330
330
|
* Total ads across all ad sets
|
|
331
331
|
*/
|
|
@@ -344,9 +344,9 @@ export type AdTreeCampaign = {
|
|
|
344
344
|
*/
|
|
345
345
|
platformObjective?: (string) | null;
|
|
346
346
|
/**
|
|
347
|
-
* Meta optimization goal
|
|
347
|
+
* Meta optimization goal shared across ad sets, or comma-separated values when ad sets differ (e.g. OFFSITE_CONVERSIONS, VALUE, LEAD_GENERATION)
|
|
348
348
|
*/
|
|
349
|
-
optimizationGoal?: (
|
|
349
|
+
optimizationGoal?: (string) | null;
|
|
350
350
|
/**
|
|
351
351
|
* Campaign-level bid strategy (e.g. LOWEST_COST_WITHOUT_CAP, COST_CAP, LOWEST_COST_WITH_MIN_ROAS)
|
|
352
352
|
*/
|
|
@@ -472,7 +472,7 @@ export type AnalyticsSinglePostResponse = {
|
|
|
472
472
|
/**
|
|
473
473
|
* Overall post status. "partial" when some platforms published and others failed.
|
|
474
474
|
*/
|
|
475
|
-
export type
|
|
475
|
+
export type status = 'published' | 'failed' | 'partial';
|
|
476
476
|
|
|
477
477
|
/**
|
|
478
478
|
* Overall sync state across all platforms
|
|
@@ -689,7 +689,7 @@ export type GoogleBusinessPlatformData = {
|
|
|
689
689
|
export type type2 = 'LEARN_MORE' | 'BOOK' | 'ORDER' | 'SHOP' | 'SIGN_UP' | 'CALL';
|
|
690
690
|
|
|
691
691
|
/**
|
|
692
|
-
* The
|
|
692
|
+
* The account context included in inbox webhook payloads.
|
|
693
693
|
*/
|
|
694
694
|
export type InboxWebhookAccount = {
|
|
695
695
|
/**
|
|
@@ -702,7 +702,7 @@ export type InboxWebhookAccount = {
|
|
|
702
702
|
};
|
|
703
703
|
|
|
704
704
|
/**
|
|
705
|
-
* The
|
|
705
|
+
* The conversation context included in inbox webhook payloads.
|
|
706
706
|
*/
|
|
707
707
|
export type InboxWebhookConversation = {
|
|
708
708
|
id: string;
|
|
@@ -714,10 +714,10 @@ export type InboxWebhookConversation = {
|
|
|
714
714
|
status: 'active' | 'archived';
|
|
715
715
|
};
|
|
716
716
|
|
|
717
|
-
export type
|
|
717
|
+
export type status2 = 'active' | 'archived';
|
|
718
718
|
|
|
719
719
|
/**
|
|
720
|
-
* The
|
|
720
|
+
* The message object included in inbox webhook payloads.
|
|
721
721
|
*/
|
|
722
722
|
export type InboxWebhookMessage = {
|
|
723
723
|
/**
|
|
@@ -1162,7 +1162,7 @@ export type PlatformAnalytics = {
|
|
|
1162
1162
|
errorMessage?: (string) | null;
|
|
1163
1163
|
};
|
|
1164
1164
|
|
|
1165
|
-
export type
|
|
1165
|
+
export type status3 = 'published' | 'failed';
|
|
1166
1166
|
|
|
1167
1167
|
/**
|
|
1168
1168
|
* Sync state of analytics for this platform
|
|
@@ -1272,7 +1272,7 @@ export type Post = {
|
|
|
1272
1272
|
updatedAt?: string;
|
|
1273
1273
|
};
|
|
1274
1274
|
|
|
1275
|
-
export type
|
|
1275
|
+
export type status4 = 'draft' | 'scheduled' | 'publishing' | 'published' | 'failed' | 'partial';
|
|
1276
1276
|
|
|
1277
1277
|
export type visibility = 'public' | 'private' | 'unlisted';
|
|
1278
1278
|
|
|
@@ -1651,13 +1651,13 @@ export type SocialAccount = {
|
|
|
1651
1651
|
enabled?: boolean;
|
|
1652
1652
|
/**
|
|
1653
1653
|
* Platform-specific metadata. Fields vary by platform. For WhatsApp accounts, includes:
|
|
1654
|
-
* -
|
|
1655
|
-
* -
|
|
1656
|
-
* -
|
|
1657
|
-
* -
|
|
1658
|
-
* -
|
|
1659
|
-
* -
|
|
1660
|
-
* -
|
|
1654
|
+
* - qualityRating: Phone number quality rating from Meta (GREEN, YELLOW, RED, or UNKNOWN)
|
|
1655
|
+
* - nameStatus: Display name review status (APPROVED, PENDING_REVIEW, DECLINED, or NONE). Messages cannot be sent until the display name is approved by Meta.
|
|
1656
|
+
* - messagingLimitTier: Maximum unique business-initiated conversations per 24h rolling window (TIER_250, TIER_1K, TIER_10K, TIER_100K, or TIER_UNLIMITED). Scales automatically as quality rating improves.
|
|
1657
|
+
* - verifiedName: Meta-verified business display name
|
|
1658
|
+
* - displayPhoneNumber: Formatted phone number (e.g., "+1 555-123-4567")
|
|
1659
|
+
* - wabaId: WhatsApp Business Account ID
|
|
1660
|
+
* - phoneNumberId: Meta phone number ID
|
|
1661
1661
|
*
|
|
1662
1662
|
*/
|
|
1663
1663
|
metadata?: {
|
|
@@ -1716,17 +1716,17 @@ export type ThreadsPlatformData = {
|
|
|
1716
1716
|
* Photo carousels up to 35 images. Video titles up to 2200 chars, photo titles truncated to 90 chars.
|
|
1717
1717
|
* privacyLevel must match creator_info options. Both camelCase and snake_case accepted.
|
|
1718
1718
|
*
|
|
1719
|
-
*
|
|
1719
|
+
* Creator Inbox (draft mode): Set draft: true to send content to the TikTok Creator Inbox
|
|
1720
1720
|
* instead of publishing immediately. The creator receives an inbox notification and completes
|
|
1721
|
-
* the post using TikTok's editing flow. This maps to TikTok's
|
|
1721
|
+
* the post using TikTok's editing flow. This maps to TikTok's post_mode: "MEDIA_UPLOAD" internally.
|
|
1722
1722
|
*
|
|
1723
|
-
*
|
|
1723
|
+
* Important: The field publish_type is NOT supported. Use draft: true for Creator Inbox flow.
|
|
1724
1724
|
*
|
|
1725
|
-
*
|
|
1726
|
-
*
|
|
1725
|
+
* Photo drafts use the /v2/post/publish/content/init/ endpoint with post_mode: "MEDIA_UPLOAD".
|
|
1726
|
+
* Video drafts use the dedicated /v2/post/publish/inbox/video/init/ endpoint.
|
|
1727
1727
|
*
|
|
1728
|
-
* When
|
|
1729
|
-
* (direct post), the
|
|
1728
|
+
* When draft: true, the video.upload scope is required. When draft is false or omitted
|
|
1729
|
+
* (direct post), the video.publish scope is required. For Creator Inbox, TikTok app version
|
|
1730
1730
|
* must be 31.8 or higher.
|
|
1731
1731
|
*
|
|
1732
1732
|
*/
|
|
@@ -1734,9 +1734,9 @@ export type TikTokPlatformData = {
|
|
|
1734
1734
|
/**
|
|
1735
1735
|
* When true, sends the post to the TikTok Creator Inbox as a draft instead of publishing
|
|
1736
1736
|
* immediately. The creator receives an inbox notification to complete posting via TikTok's
|
|
1737
|
-
* editing flow. Maps to TikTok API
|
|
1738
|
-
* inbox endpoint (videos). When false or omitted, publishes directly via
|
|
1739
|
-
* Note:
|
|
1737
|
+
* editing flow. Maps to TikTok API post_mode: "MEDIA_UPLOAD" (photos) or the dedicated
|
|
1738
|
+
* inbox endpoint (videos). When false or omitted, publishes directly via post_mode: "DIRECT_POST".
|
|
1739
|
+
* Note: publish_type is not a supported field. Use this field instead.
|
|
1740
1740
|
*
|
|
1741
1741
|
*/
|
|
1742
1742
|
draft?: boolean;
|
|
@@ -1874,7 +1874,7 @@ export type UploadTokenResponse = {
|
|
|
1874
1874
|
status?: 'pending' | 'completed' | 'expired';
|
|
1875
1875
|
};
|
|
1876
1876
|
|
|
1877
|
-
export type
|
|
1877
|
+
export type status5 = 'pending' | 'completed' | 'expired';
|
|
1878
1878
|
|
|
1879
1879
|
export type UploadTokenStatusResponse = {
|
|
1880
1880
|
token?: string;
|
|
@@ -2223,12 +2223,12 @@ export type WebhookPayloadMessage = {
|
|
|
2223
2223
|
export type event4 = 'message.received';
|
|
2224
2224
|
|
|
2225
2225
|
/**
|
|
2226
|
-
* Webhook payload for
|
|
2226
|
+
* Webhook payload for message.deleted events. Fires when the sender
|
|
2227
2227
|
* deletes (unsends) a message. Supported platforms: Instagram (incoming
|
|
2228
2228
|
* unsend) and WhatsApp (when the business deletes an outgoing message
|
|
2229
2229
|
* via the Cloud API).
|
|
2230
2230
|
*
|
|
2231
|
-
* The
|
|
2231
|
+
* The message.text and message.attachments fields retain the content
|
|
2232
2232
|
* that existed before the delete. The Zernio dashboard UI does not show
|
|
2233
2233
|
* this content, but authorized API consumers may access it for
|
|
2234
2234
|
* moderation, compliance, or archival use cases.
|
|
@@ -2247,14 +2247,14 @@ export type WebhookPayloadMessageDeleted = {
|
|
|
2247
2247
|
export type event5 = 'message.deleted';
|
|
2248
2248
|
|
|
2249
2249
|
/**
|
|
2250
|
-
* Shared payload for
|
|
2251
|
-
*
|
|
2250
|
+
* Shared payload for message.delivered, message.read, and
|
|
2251
|
+
* message.failed events. Fires when the platform reports a new
|
|
2252
2252
|
* delivery state for an outgoing message.
|
|
2253
2253
|
*
|
|
2254
2254
|
* Platform support:
|
|
2255
|
-
* *
|
|
2256
|
-
* *
|
|
2257
|
-
* *
|
|
2255
|
+
* * message.delivered — WhatsApp, Facebook Messenger.
|
|
2256
|
+
* * message.read — WhatsApp, Facebook Messenger, Instagram.
|
|
2257
|
+
* * message.failed — WhatsApp only (other platforms don't expose
|
|
2258
2258
|
* per-message failure via webhook).
|
|
2259
2259
|
*
|
|
2260
2260
|
*/
|
|
@@ -2267,7 +2267,7 @@ export type WebhookPayloadMessageDeliveryStatus = {
|
|
|
2267
2267
|
*/
|
|
2268
2268
|
statusAt: string;
|
|
2269
2269
|
/**
|
|
2270
|
-
* Populated only on
|
|
2270
|
+
* Populated only on message.failed.
|
|
2271
2271
|
*/
|
|
2272
2272
|
error?: {
|
|
2273
2273
|
code?: number;
|
|
@@ -2282,10 +2282,10 @@ export type WebhookPayloadMessageDeliveryStatus = {
|
|
|
2282
2282
|
export type event6 = 'message.delivered' | 'message.read' | 'message.failed';
|
|
2283
2283
|
|
|
2284
2284
|
/**
|
|
2285
|
-
* Webhook payload for
|
|
2285
|
+
* Webhook payload for message.edited events. Fires when the sender
|
|
2286
2286
|
* edits a previously-sent message. Supported platforms: Instagram,
|
|
2287
|
-
* Facebook Messenger, Telegram. The
|
|
2288
|
-
* LATEST state;
|
|
2287
|
+
* Facebook Messenger, Telegram. The message object reflects the
|
|
2288
|
+
* LATEST state; editHistory contains every prior version in order
|
|
2289
2289
|
* (oldest first), so the last entry is the version immediately before
|
|
2290
2290
|
* the current content.
|
|
2291
2291
|
*
|
|
@@ -7010,19 +7010,19 @@ export type CreateInboxConversationData = {
|
|
|
7010
7010
|
*/
|
|
7011
7011
|
accountId: string;
|
|
7012
7012
|
/**
|
|
7013
|
-
* Twitter numeric user ID of the recipient. Provide either this or
|
|
7013
|
+
* Twitter numeric user ID of the recipient. Provide either this or participantUsername.
|
|
7014
7014
|
*/
|
|
7015
7015
|
participantId?: string;
|
|
7016
7016
|
/**
|
|
7017
|
-
* Twitter username (with or without @) of the recipient. Resolved to a user ID via lookup. Provide either this or
|
|
7017
|
+
* Twitter username (with or without @) of the recipient. Resolved to a user ID via lookup. Provide either this or participantId.
|
|
7018
7018
|
*/
|
|
7019
7019
|
participantUsername?: string;
|
|
7020
7020
|
/**
|
|
7021
|
-
* Text content of the message. At least one of
|
|
7021
|
+
* Text content of the message. At least one of message or attachment is required.
|
|
7022
7022
|
*/
|
|
7023
7023
|
message?: string;
|
|
7024
7024
|
/**
|
|
7025
|
-
* Skip the
|
|
7025
|
+
* Skip the receives_your_dm eligibility check before sending. Use if you have already verified the recipient accepts DMs.
|
|
7026
7026
|
*/
|
|
7027
7027
|
skipDmCheck?: boolean;
|
|
7028
7028
|
};
|
|
@@ -7239,7 +7239,7 @@ export type GetInboxConversationMessagesResponse = ({
|
|
|
7239
7239
|
editedAt?: string;
|
|
7240
7240
|
}>;
|
|
7241
7241
|
/**
|
|
7242
|
-
* True if the sender has deleted (unsent) this message. The original
|
|
7242
|
+
* True if the sender has deleted (unsent) this message. The original message and attachments fields remain populated.
|
|
7243
7243
|
*/
|
|
7244
7244
|
isDeleted?: boolean;
|
|
7245
7245
|
deletedAt?: (string) | null;
|
|
@@ -7254,7 +7254,7 @@ export type GetInboxConversationMessagesResponse = ({
|
|
|
7254
7254
|
*/
|
|
7255
7255
|
sentAt?: (string) | null;
|
|
7256
7256
|
/**
|
|
7257
|
-
* Populated when
|
|
7257
|
+
* Populated when deliveryStatus === "failed".
|
|
7258
7258
|
*/
|
|
7259
7259
|
deliveryError?: {
|
|
7260
7260
|
code?: number;
|
|
@@ -8507,7 +8507,7 @@ export type CreateWhatsAppTemplateData = {
|
|
|
8507
8507
|
/**
|
|
8508
8508
|
* Name of a pre-built template from Meta's template library (e.g., "appointment_reminder",
|
|
8509
8509
|
* "auto_pay_reminder_1", "address_update"). When provided, the template is pre-approved
|
|
8510
|
-
* by Meta with no review wait. Omit
|
|
8510
|
+
* by Meta with no review wait. Omit components when using this field.
|
|
8511
8511
|
*
|
|
8512
8512
|
*/
|
|
8513
8513
|
library_template_name?: string;
|
|
@@ -10858,7 +10858,7 @@ export type ListAdsData = {
|
|
|
10858
10858
|
* zernio = Zernio-created only, all = include external ads
|
|
10859
10859
|
*/
|
|
10860
10860
|
source?: 'zernio' | 'all';
|
|
10861
|
-
status?:
|
|
10861
|
+
status?: AdStatus;
|
|
10862
10862
|
/**
|
|
10863
10863
|
* End of metrics date range (YYYY-MM-DD). Defaults to today. Max 90-day range.
|
|
10864
10864
|
*/
|
|
@@ -10899,7 +10899,7 @@ export type ListAdCampaignsData = {
|
|
|
10899
10899
|
/**
|
|
10900
10900
|
* Filter by derived campaign status (post-aggregation)
|
|
10901
10901
|
*/
|
|
10902
|
-
status?:
|
|
10902
|
+
status?: AdStatus;
|
|
10903
10903
|
};
|
|
10904
10904
|
};
|
|
10905
10905
|
|
|
@@ -10976,7 +10976,7 @@ export type GetAdTreeData = {
|
|
|
10976
10976
|
/**
|
|
10977
10977
|
* Filter by derived campaign status (post-aggregation)
|
|
10978
10978
|
*/
|
|
10979
|
-
status?:
|
|
10979
|
+
status?: AdStatus;
|
|
10980
10980
|
/**
|
|
10981
10981
|
* End of metrics date range (YYYY-MM-DD). Defaults to today. Max 90-day range.
|
|
10982
10982
|
*/
|