@zernio/node 0.2.61 → 0.2.62
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 +38 -38
- package/dist/index.d.ts +38 -38
- package/package.json +1 -1
- package/src/generated/sdk.gen.ts +91 -57
- package/src/generated/types.gen.ts +38 -38
package/dist/index.d.mts
CHANGED
|
@@ -1226,7 +1226,7 @@ type GoogleBusinessPlatformData = {
|
|
|
1226
1226
|
*/
|
|
1227
1227
|
type type2 = 'LEARN_MORE' | 'BOOK' | 'ORDER' | 'SHOP' | 'SIGN_UP' | 'CALL';
|
|
1228
1228
|
/**
|
|
1229
|
-
* The
|
|
1229
|
+
* The account context included in inbox webhook payloads.
|
|
1230
1230
|
*/
|
|
1231
1231
|
type InboxWebhookAccount = {
|
|
1232
1232
|
/**
|
|
@@ -1238,7 +1238,7 @@ type InboxWebhookAccount = {
|
|
|
1238
1238
|
displayName?: string;
|
|
1239
1239
|
};
|
|
1240
1240
|
/**
|
|
1241
|
-
* The
|
|
1241
|
+
* The conversation context included in inbox webhook payloads.
|
|
1242
1242
|
*/
|
|
1243
1243
|
type InboxWebhookConversation = {
|
|
1244
1244
|
id: string;
|
|
@@ -1251,7 +1251,7 @@ type InboxWebhookConversation = {
|
|
|
1251
1251
|
};
|
|
1252
1252
|
type status3 = 'active' | 'archived';
|
|
1253
1253
|
/**
|
|
1254
|
-
* The
|
|
1254
|
+
* The message object included in inbox webhook payloads.
|
|
1255
1255
|
*/
|
|
1256
1256
|
type InboxWebhookMessage = {
|
|
1257
1257
|
/**
|
|
@@ -2125,13 +2125,13 @@ type SocialAccount = {
|
|
|
2125
2125
|
enabled?: boolean;
|
|
2126
2126
|
/**
|
|
2127
2127
|
* Platform-specific metadata. Fields vary by platform. For WhatsApp accounts, includes:
|
|
2128
|
-
* -
|
|
2129
|
-
* -
|
|
2130
|
-
* -
|
|
2131
|
-
* -
|
|
2132
|
-
* -
|
|
2133
|
-
* -
|
|
2134
|
-
* -
|
|
2128
|
+
* - qualityRating: Phone number quality rating from Meta (GREEN, YELLOW, RED, or UNKNOWN)
|
|
2129
|
+
* - nameStatus: Display name review status (APPROVED, PENDING_REVIEW, DECLINED, or NONE). Messages cannot be sent until the display name is approved by Meta.
|
|
2130
|
+
* - 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.
|
|
2131
|
+
* - verifiedName: Meta-verified business display name
|
|
2132
|
+
* - displayPhoneNumber: Formatted phone number (e.g., "+1 555-123-4567")
|
|
2133
|
+
* - wabaId: WhatsApp Business Account ID
|
|
2134
|
+
* - phoneNumberId: Meta phone number ID
|
|
2135
2135
|
*
|
|
2136
2136
|
*/
|
|
2137
2137
|
metadata?: {
|
|
@@ -2185,17 +2185,17 @@ type ThreadsPlatformData = {
|
|
|
2185
2185
|
* Photo carousels up to 35 images. Video titles up to 2200 chars, photo titles truncated to 90 chars.
|
|
2186
2186
|
* privacyLevel must match creator_info options. Both camelCase and snake_case accepted.
|
|
2187
2187
|
*
|
|
2188
|
-
*
|
|
2188
|
+
* Creator Inbox (draft mode): Set draft: true to send content to the TikTok Creator Inbox
|
|
2189
2189
|
* instead of publishing immediately. The creator receives an inbox notification and completes
|
|
2190
|
-
* the post using TikTok's editing flow. This maps to TikTok's
|
|
2190
|
+
* the post using TikTok's editing flow. This maps to TikTok's post_mode: "MEDIA_UPLOAD" internally.
|
|
2191
2191
|
*
|
|
2192
|
-
*
|
|
2192
|
+
* Important: The field publish_type is NOT supported. Use draft: true for Creator Inbox flow.
|
|
2193
2193
|
*
|
|
2194
|
-
*
|
|
2195
|
-
*
|
|
2194
|
+
* Photo drafts use the /v2/post/publish/content/init/ endpoint with post_mode: "MEDIA_UPLOAD".
|
|
2195
|
+
* Video drafts use the dedicated /v2/post/publish/inbox/video/init/ endpoint.
|
|
2196
2196
|
*
|
|
2197
|
-
* When
|
|
2198
|
-
* (direct post), the
|
|
2197
|
+
* When draft: true, the video.upload scope is required. When draft is false or omitted
|
|
2198
|
+
* (direct post), the video.publish scope is required. For Creator Inbox, TikTok app version
|
|
2199
2199
|
* must be 31.8 or higher.
|
|
2200
2200
|
*
|
|
2201
2201
|
*/
|
|
@@ -2203,9 +2203,9 @@ type TikTokPlatformData = {
|
|
|
2203
2203
|
/**
|
|
2204
2204
|
* When true, sends the post to the TikTok Creator Inbox as a draft instead of publishing
|
|
2205
2205
|
* immediately. The creator receives an inbox notification to complete posting via TikTok's
|
|
2206
|
-
* editing flow. Maps to TikTok API
|
|
2207
|
-
* inbox endpoint (videos). When false or omitted, publishes directly via
|
|
2208
|
-
* Note:
|
|
2206
|
+
* editing flow. Maps to TikTok API post_mode: "MEDIA_UPLOAD" (photos) or the dedicated
|
|
2207
|
+
* inbox endpoint (videos). When false or omitted, publishes directly via post_mode: "DIRECT_POST".
|
|
2208
|
+
* Note: publish_type is not a supported field. Use this field instead.
|
|
2209
2209
|
*
|
|
2210
2210
|
*/
|
|
2211
2211
|
draft?: boolean;
|
|
@@ -2666,12 +2666,12 @@ type WebhookPayloadMessage = {
|
|
|
2666
2666
|
};
|
|
2667
2667
|
type event4 = 'message.received';
|
|
2668
2668
|
/**
|
|
2669
|
-
* Webhook payload for
|
|
2669
|
+
* Webhook payload for message.deleted events. Fires when the sender
|
|
2670
2670
|
* deletes (unsends) a message. Supported platforms: Instagram (incoming
|
|
2671
2671
|
* unsend) and WhatsApp (when the business deletes an outgoing message
|
|
2672
2672
|
* via the Cloud API).
|
|
2673
2673
|
*
|
|
2674
|
-
* The
|
|
2674
|
+
* The message.text and message.attachments fields retain the content
|
|
2675
2675
|
* that existed before the delete. The Zernio dashboard UI does not show
|
|
2676
2676
|
* this content, but authorized API consumers may access it for
|
|
2677
2677
|
* moderation, compliance, or archival use cases.
|
|
@@ -2688,14 +2688,14 @@ type WebhookPayloadMessageDeleted = {
|
|
|
2688
2688
|
};
|
|
2689
2689
|
type event5 = 'message.deleted';
|
|
2690
2690
|
/**
|
|
2691
|
-
* Shared payload for
|
|
2692
|
-
*
|
|
2691
|
+
* Shared payload for message.delivered, message.read, and
|
|
2692
|
+
* message.failed events. Fires when the platform reports a new
|
|
2693
2693
|
* delivery state for an outgoing message.
|
|
2694
2694
|
*
|
|
2695
2695
|
* Platform support:
|
|
2696
|
-
* *
|
|
2697
|
-
* *
|
|
2698
|
-
* *
|
|
2696
|
+
* * message.delivered — WhatsApp, Facebook Messenger.
|
|
2697
|
+
* * message.read — WhatsApp, Facebook Messenger, Instagram.
|
|
2698
|
+
* * message.failed — WhatsApp only (other platforms don't expose
|
|
2699
2699
|
* per-message failure via webhook).
|
|
2700
2700
|
*
|
|
2701
2701
|
*/
|
|
@@ -2708,7 +2708,7 @@ type WebhookPayloadMessageDeliveryStatus = {
|
|
|
2708
2708
|
*/
|
|
2709
2709
|
statusAt: string;
|
|
2710
2710
|
/**
|
|
2711
|
-
* Populated only on
|
|
2711
|
+
* Populated only on message.failed.
|
|
2712
2712
|
*/
|
|
2713
2713
|
error?: {
|
|
2714
2714
|
code?: number;
|
|
@@ -2721,10 +2721,10 @@ type WebhookPayloadMessageDeliveryStatus = {
|
|
|
2721
2721
|
};
|
|
2722
2722
|
type event6 = 'message.delivered' | 'message.read' | 'message.failed';
|
|
2723
2723
|
/**
|
|
2724
|
-
* Webhook payload for
|
|
2724
|
+
* Webhook payload for message.edited events. Fires when the sender
|
|
2725
2725
|
* edits a previously-sent message. Supported platforms: Instagram,
|
|
2726
|
-
* Facebook Messenger, Telegram. The
|
|
2727
|
-
* LATEST state;
|
|
2726
|
+
* Facebook Messenger, Telegram. The message object reflects the
|
|
2727
|
+
* LATEST state; editHistory contains every prior version in order
|
|
2728
2728
|
* (oldest first), so the last entry is the version immediately before
|
|
2729
2729
|
* the current content.
|
|
2730
2730
|
*
|
|
@@ -7091,19 +7091,19 @@ type CreateInboxConversationData = {
|
|
|
7091
7091
|
*/
|
|
7092
7092
|
accountId: string;
|
|
7093
7093
|
/**
|
|
7094
|
-
* Twitter numeric user ID of the recipient. Provide either this or
|
|
7094
|
+
* Twitter numeric user ID of the recipient. Provide either this or participantUsername.
|
|
7095
7095
|
*/
|
|
7096
7096
|
participantId?: string;
|
|
7097
7097
|
/**
|
|
7098
|
-
* Twitter username (with or without @) of the recipient. Resolved to a user ID via lookup. Provide either this or
|
|
7098
|
+
* Twitter username (with or without @) of the recipient. Resolved to a user ID via lookup. Provide either this or participantId.
|
|
7099
7099
|
*/
|
|
7100
7100
|
participantUsername?: string;
|
|
7101
7101
|
/**
|
|
7102
|
-
* Text content of the message. At least one of
|
|
7102
|
+
* Text content of the message. At least one of message or attachment is required.
|
|
7103
7103
|
*/
|
|
7104
7104
|
message?: string;
|
|
7105
7105
|
/**
|
|
7106
|
-
* Skip the
|
|
7106
|
+
* Skip the receives_your_dm eligibility check before sending. Use if you have already verified the recipient accepts DMs.
|
|
7107
7107
|
*/
|
|
7108
7108
|
skipDmCheck?: boolean;
|
|
7109
7109
|
};
|
|
@@ -7310,7 +7310,7 @@ type GetInboxConversationMessagesResponse = ({
|
|
|
7310
7310
|
editedAt?: string;
|
|
7311
7311
|
}>;
|
|
7312
7312
|
/**
|
|
7313
|
-
* True if the sender has deleted (unsent) this message. The original
|
|
7313
|
+
* True if the sender has deleted (unsent) this message. The original message and attachments fields remain populated.
|
|
7314
7314
|
*/
|
|
7315
7315
|
isDeleted?: boolean;
|
|
7316
7316
|
deletedAt?: (string) | null;
|
|
@@ -7325,7 +7325,7 @@ type GetInboxConversationMessagesResponse = ({
|
|
|
7325
7325
|
*/
|
|
7326
7326
|
sentAt?: (string) | null;
|
|
7327
7327
|
/**
|
|
7328
|
-
* Populated when
|
|
7328
|
+
* Populated when deliveryStatus === "failed".
|
|
7329
7329
|
*/
|
|
7330
7330
|
deliveryError?: {
|
|
7331
7331
|
code?: number;
|
|
@@ -8471,7 +8471,7 @@ type CreateWhatsAppTemplateData = {
|
|
|
8471
8471
|
/**
|
|
8472
8472
|
* Name of a pre-built template from Meta's template library (e.g., "appointment_reminder",
|
|
8473
8473
|
* "auto_pay_reminder_1", "address_update"). When provided, the template is pre-approved
|
|
8474
|
-
* by Meta with no review wait. Omit
|
|
8474
|
+
* by Meta with no review wait. Omit components when using this field.
|
|
8475
8475
|
*
|
|
8476
8476
|
*/
|
|
8477
8477
|
library_template_name?: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -1226,7 +1226,7 @@ type GoogleBusinessPlatformData = {
|
|
|
1226
1226
|
*/
|
|
1227
1227
|
type type2 = 'LEARN_MORE' | 'BOOK' | 'ORDER' | 'SHOP' | 'SIGN_UP' | 'CALL';
|
|
1228
1228
|
/**
|
|
1229
|
-
* The
|
|
1229
|
+
* The account context included in inbox webhook payloads.
|
|
1230
1230
|
*/
|
|
1231
1231
|
type InboxWebhookAccount = {
|
|
1232
1232
|
/**
|
|
@@ -1238,7 +1238,7 @@ type InboxWebhookAccount = {
|
|
|
1238
1238
|
displayName?: string;
|
|
1239
1239
|
};
|
|
1240
1240
|
/**
|
|
1241
|
-
* The
|
|
1241
|
+
* The conversation context included in inbox webhook payloads.
|
|
1242
1242
|
*/
|
|
1243
1243
|
type InboxWebhookConversation = {
|
|
1244
1244
|
id: string;
|
|
@@ -1251,7 +1251,7 @@ type InboxWebhookConversation = {
|
|
|
1251
1251
|
};
|
|
1252
1252
|
type status3 = 'active' | 'archived';
|
|
1253
1253
|
/**
|
|
1254
|
-
* The
|
|
1254
|
+
* The message object included in inbox webhook payloads.
|
|
1255
1255
|
*/
|
|
1256
1256
|
type InboxWebhookMessage = {
|
|
1257
1257
|
/**
|
|
@@ -2125,13 +2125,13 @@ type SocialAccount = {
|
|
|
2125
2125
|
enabled?: boolean;
|
|
2126
2126
|
/**
|
|
2127
2127
|
* Platform-specific metadata. Fields vary by platform. For WhatsApp accounts, includes:
|
|
2128
|
-
* -
|
|
2129
|
-
* -
|
|
2130
|
-
* -
|
|
2131
|
-
* -
|
|
2132
|
-
* -
|
|
2133
|
-
* -
|
|
2134
|
-
* -
|
|
2128
|
+
* - qualityRating: Phone number quality rating from Meta (GREEN, YELLOW, RED, or UNKNOWN)
|
|
2129
|
+
* - nameStatus: Display name review status (APPROVED, PENDING_REVIEW, DECLINED, or NONE). Messages cannot be sent until the display name is approved by Meta.
|
|
2130
|
+
* - 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.
|
|
2131
|
+
* - verifiedName: Meta-verified business display name
|
|
2132
|
+
* - displayPhoneNumber: Formatted phone number (e.g., "+1 555-123-4567")
|
|
2133
|
+
* - wabaId: WhatsApp Business Account ID
|
|
2134
|
+
* - phoneNumberId: Meta phone number ID
|
|
2135
2135
|
*
|
|
2136
2136
|
*/
|
|
2137
2137
|
metadata?: {
|
|
@@ -2185,17 +2185,17 @@ type ThreadsPlatformData = {
|
|
|
2185
2185
|
* Photo carousels up to 35 images. Video titles up to 2200 chars, photo titles truncated to 90 chars.
|
|
2186
2186
|
* privacyLevel must match creator_info options. Both camelCase and snake_case accepted.
|
|
2187
2187
|
*
|
|
2188
|
-
*
|
|
2188
|
+
* Creator Inbox (draft mode): Set draft: true to send content to the TikTok Creator Inbox
|
|
2189
2189
|
* instead of publishing immediately. The creator receives an inbox notification and completes
|
|
2190
|
-
* the post using TikTok's editing flow. This maps to TikTok's
|
|
2190
|
+
* the post using TikTok's editing flow. This maps to TikTok's post_mode: "MEDIA_UPLOAD" internally.
|
|
2191
2191
|
*
|
|
2192
|
-
*
|
|
2192
|
+
* Important: The field publish_type is NOT supported. Use draft: true for Creator Inbox flow.
|
|
2193
2193
|
*
|
|
2194
|
-
*
|
|
2195
|
-
*
|
|
2194
|
+
* Photo drafts use the /v2/post/publish/content/init/ endpoint with post_mode: "MEDIA_UPLOAD".
|
|
2195
|
+
* Video drafts use the dedicated /v2/post/publish/inbox/video/init/ endpoint.
|
|
2196
2196
|
*
|
|
2197
|
-
* When
|
|
2198
|
-
* (direct post), the
|
|
2197
|
+
* When draft: true, the video.upload scope is required. When draft is false or omitted
|
|
2198
|
+
* (direct post), the video.publish scope is required. For Creator Inbox, TikTok app version
|
|
2199
2199
|
* must be 31.8 or higher.
|
|
2200
2200
|
*
|
|
2201
2201
|
*/
|
|
@@ -2203,9 +2203,9 @@ type TikTokPlatformData = {
|
|
|
2203
2203
|
/**
|
|
2204
2204
|
* When true, sends the post to the TikTok Creator Inbox as a draft instead of publishing
|
|
2205
2205
|
* immediately. The creator receives an inbox notification to complete posting via TikTok's
|
|
2206
|
-
* editing flow. Maps to TikTok API
|
|
2207
|
-
* inbox endpoint (videos). When false or omitted, publishes directly via
|
|
2208
|
-
* Note:
|
|
2206
|
+
* editing flow. Maps to TikTok API post_mode: "MEDIA_UPLOAD" (photos) or the dedicated
|
|
2207
|
+
* inbox endpoint (videos). When false or omitted, publishes directly via post_mode: "DIRECT_POST".
|
|
2208
|
+
* Note: publish_type is not a supported field. Use this field instead.
|
|
2209
2209
|
*
|
|
2210
2210
|
*/
|
|
2211
2211
|
draft?: boolean;
|
|
@@ -2666,12 +2666,12 @@ type WebhookPayloadMessage = {
|
|
|
2666
2666
|
};
|
|
2667
2667
|
type event4 = 'message.received';
|
|
2668
2668
|
/**
|
|
2669
|
-
* Webhook payload for
|
|
2669
|
+
* Webhook payload for message.deleted events. Fires when the sender
|
|
2670
2670
|
* deletes (unsends) a message. Supported platforms: Instagram (incoming
|
|
2671
2671
|
* unsend) and WhatsApp (when the business deletes an outgoing message
|
|
2672
2672
|
* via the Cloud API).
|
|
2673
2673
|
*
|
|
2674
|
-
* The
|
|
2674
|
+
* The message.text and message.attachments fields retain the content
|
|
2675
2675
|
* that existed before the delete. The Zernio dashboard UI does not show
|
|
2676
2676
|
* this content, but authorized API consumers may access it for
|
|
2677
2677
|
* moderation, compliance, or archival use cases.
|
|
@@ -2688,14 +2688,14 @@ type WebhookPayloadMessageDeleted = {
|
|
|
2688
2688
|
};
|
|
2689
2689
|
type event5 = 'message.deleted';
|
|
2690
2690
|
/**
|
|
2691
|
-
* Shared payload for
|
|
2692
|
-
*
|
|
2691
|
+
* Shared payload for message.delivered, message.read, and
|
|
2692
|
+
* message.failed events. Fires when the platform reports a new
|
|
2693
2693
|
* delivery state for an outgoing message.
|
|
2694
2694
|
*
|
|
2695
2695
|
* Platform support:
|
|
2696
|
-
* *
|
|
2697
|
-
* *
|
|
2698
|
-
* *
|
|
2696
|
+
* * message.delivered — WhatsApp, Facebook Messenger.
|
|
2697
|
+
* * message.read — WhatsApp, Facebook Messenger, Instagram.
|
|
2698
|
+
* * message.failed — WhatsApp only (other platforms don't expose
|
|
2699
2699
|
* per-message failure via webhook).
|
|
2700
2700
|
*
|
|
2701
2701
|
*/
|
|
@@ -2708,7 +2708,7 @@ type WebhookPayloadMessageDeliveryStatus = {
|
|
|
2708
2708
|
*/
|
|
2709
2709
|
statusAt: string;
|
|
2710
2710
|
/**
|
|
2711
|
-
* Populated only on
|
|
2711
|
+
* Populated only on message.failed.
|
|
2712
2712
|
*/
|
|
2713
2713
|
error?: {
|
|
2714
2714
|
code?: number;
|
|
@@ -2721,10 +2721,10 @@ type WebhookPayloadMessageDeliveryStatus = {
|
|
|
2721
2721
|
};
|
|
2722
2722
|
type event6 = 'message.delivered' | 'message.read' | 'message.failed';
|
|
2723
2723
|
/**
|
|
2724
|
-
* Webhook payload for
|
|
2724
|
+
* Webhook payload for message.edited events. Fires when the sender
|
|
2725
2725
|
* edits a previously-sent message. Supported platforms: Instagram,
|
|
2726
|
-
* Facebook Messenger, Telegram. The
|
|
2727
|
-
* LATEST state;
|
|
2726
|
+
* Facebook Messenger, Telegram. The message object reflects the
|
|
2727
|
+
* LATEST state; editHistory contains every prior version in order
|
|
2728
2728
|
* (oldest first), so the last entry is the version immediately before
|
|
2729
2729
|
* the current content.
|
|
2730
2730
|
*
|
|
@@ -7091,19 +7091,19 @@ type CreateInboxConversationData = {
|
|
|
7091
7091
|
*/
|
|
7092
7092
|
accountId: string;
|
|
7093
7093
|
/**
|
|
7094
|
-
* Twitter numeric user ID of the recipient. Provide either this or
|
|
7094
|
+
* Twitter numeric user ID of the recipient. Provide either this or participantUsername.
|
|
7095
7095
|
*/
|
|
7096
7096
|
participantId?: string;
|
|
7097
7097
|
/**
|
|
7098
|
-
* Twitter username (with or without @) of the recipient. Resolved to a user ID via lookup. Provide either this or
|
|
7098
|
+
* Twitter username (with or without @) of the recipient. Resolved to a user ID via lookup. Provide either this or participantId.
|
|
7099
7099
|
*/
|
|
7100
7100
|
participantUsername?: string;
|
|
7101
7101
|
/**
|
|
7102
|
-
* Text content of the message. At least one of
|
|
7102
|
+
* Text content of the message. At least one of message or attachment is required.
|
|
7103
7103
|
*/
|
|
7104
7104
|
message?: string;
|
|
7105
7105
|
/**
|
|
7106
|
-
* Skip the
|
|
7106
|
+
* Skip the receives_your_dm eligibility check before sending. Use if you have already verified the recipient accepts DMs.
|
|
7107
7107
|
*/
|
|
7108
7108
|
skipDmCheck?: boolean;
|
|
7109
7109
|
};
|
|
@@ -7310,7 +7310,7 @@ type GetInboxConversationMessagesResponse = ({
|
|
|
7310
7310
|
editedAt?: string;
|
|
7311
7311
|
}>;
|
|
7312
7312
|
/**
|
|
7313
|
-
* True if the sender has deleted (unsent) this message. The original
|
|
7313
|
+
* True if the sender has deleted (unsent) this message. The original message and attachments fields remain populated.
|
|
7314
7314
|
*/
|
|
7315
7315
|
isDeleted?: boolean;
|
|
7316
7316
|
deletedAt?: (string) | null;
|
|
@@ -7325,7 +7325,7 @@ type GetInboxConversationMessagesResponse = ({
|
|
|
7325
7325
|
*/
|
|
7326
7326
|
sentAt?: (string) | null;
|
|
7327
7327
|
/**
|
|
7328
|
-
* Populated when
|
|
7328
|
+
* Populated when deliveryStatus === "failed".
|
|
7329
7329
|
*/
|
|
7330
7330
|
deliveryError?: {
|
|
7331
7331
|
code?: number;
|
|
@@ -8471,7 +8471,7 @@ type CreateWhatsAppTemplateData = {
|
|
|
8471
8471
|
/**
|
|
8472
8472
|
* Name of a pre-built template from Meta's template library (e.g., "appointment_reminder",
|
|
8473
8473
|
* "auto_pay_reminder_1", "address_update"). When provided, the template is pre-approved
|
|
8474
|
-
* by Meta with no review wait. Omit
|
|
8474
|
+
* by Meta with no review wait. Omit components when using this field.
|
|
8475
8475
|
*
|
|
8476
8476
|
*/
|
|
8477
8477
|
library_template_name?: string;
|
package/package.json
CHANGED
package/src/generated/sdk.gen.ts
CHANGED
|
@@ -25,7 +25,7 @@ export const validatePostLength = <ThrowOnError extends boolean = false>(options
|
|
|
25
25
|
* Validate post content
|
|
26
26
|
* Dry-run the full post validation pipeline without publishing. Catches issues like missing media for Instagram/TikTok/YouTube, hashtag limits, invalid thread formats, Facebook Reel requirements, and character limit violations.
|
|
27
27
|
*
|
|
28
|
-
* Accepts the same body as
|
|
28
|
+
* Accepts the same body as POST /v1/posts. Does NOT validate accounts, process media, or track usage. This is content-only validation.
|
|
29
29
|
*
|
|
30
30
|
* Returns errors for failures and warnings for near-limit content (>90% of character limit).
|
|
31
31
|
*
|
|
@@ -57,7 +57,7 @@ export const validateMedia = <ThrowOnError extends boolean = false>(options: Opt
|
|
|
57
57
|
* Check subreddit existence
|
|
58
58
|
* Check if a subreddit exists and return basic info (title, subscriber count, NSFW status, post types allowed).
|
|
59
59
|
*
|
|
60
|
-
* When accountId is provided, uses authenticated Reddit OAuth API with automatic token refresh (recommended). Falls back to Reddit's public JSON API, which may be unreliable from server IPs. Returns
|
|
60
|
+
* When accountId is provided, uses authenticated Reddit OAuth API with automatic token refresh (recommended). Falls back to Reddit's public JSON API, which may be unreliable from server IPs. Returns exists: false for private, banned, or nonexistent subreddits.
|
|
61
61
|
*
|
|
62
62
|
*/
|
|
63
63
|
export const validateSubreddit = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<ValidateSubredditData, ThrowOnError>) => {
|
|
@@ -73,7 +73,7 @@ export const validateSubreddit = <ThrowOnError extends boolean = false>(options:
|
|
|
73
73
|
* Accepts both Zernio Post IDs and External Post IDs (auto-resolved). fromDate defaults to 90 days ago if omitted, max range 366 days.
|
|
74
74
|
* Single post lookups may return 202 (sync pending) or 424 (all platforms failed). For follower stats, use /v1/accounts/follower-stats.
|
|
75
75
|
*
|
|
76
|
-
*
|
|
76
|
+
* LinkedIn personal accounts: Analytics are only available for posts published through Zernio. LinkedIn's API only returns metrics for posts authored by the authenticated user. Organization/company page analytics work for all posts.
|
|
77
77
|
*
|
|
78
78
|
*/
|
|
79
79
|
export const getAnalytics = <ThrowOnError extends boolean = false>(options?: OptionsLegacyParser<GetAnalyticsData, ThrowOnError>) => {
|
|
@@ -433,7 +433,7 @@ export const unpublishPost = <ThrowOnError extends boolean = false>(options: Opt
|
|
|
433
433
|
* Edit published post
|
|
434
434
|
* Edit a published post on a social media platform. Currently only supported for X (Twitter).
|
|
435
435
|
*
|
|
436
|
-
*
|
|
436
|
+
* Requirements:
|
|
437
437
|
* - Connected X account must have an active X Premium subscription
|
|
438
438
|
* - Must be within 1 hour of original publish time
|
|
439
439
|
* - Maximum 5 edits per tweet (enforced by X)
|
|
@@ -454,11 +454,11 @@ export const editPost = <ThrowOnError extends boolean = false>(options: OptionsL
|
|
|
454
454
|
* Updates metadata of a published video on the specified platform without re-uploading.
|
|
455
455
|
* Currently only supported for YouTube. At least one updatable field is required.
|
|
456
456
|
*
|
|
457
|
-
*
|
|
457
|
+
* Two modes:
|
|
458
458
|
*
|
|
459
|
-
* 1.
|
|
460
|
-
* 2.
|
|
461
|
-
* and pass
|
|
459
|
+
* 1. Post-based (video published through Zernio): pass the Zernio postId in the URL and platform in the body.
|
|
460
|
+
* 2. Direct video ID (video uploaded outside Zernio, e.g. directly to YouTube): use _ as the postId,
|
|
461
|
+
* and pass videoId + accountId + platform in the body. The accountId is the Zernio social account ID
|
|
462
462
|
* for the connected YouTube channel.
|
|
463
463
|
*
|
|
464
464
|
*/
|
|
@@ -701,13 +701,13 @@ export const handleOAuthCallback = <ThrowOnError extends boolean = false>(option
|
|
|
701
701
|
* Connect ads for a platform
|
|
702
702
|
* Unified ads connection endpoint. Creates a dedicated ads SocialAccount for the specified platform.
|
|
703
703
|
*
|
|
704
|
-
*
|
|
704
|
+
* Same-token platforms (facebook, instagram, linkedin, pinterest): Creates an ads SocialAccount (metaads, linkedinads, pinterestads) with a copied OAuth token from the parent posting account. If the ads account already exists, returns alreadyConnected: true. No extra OAuth needed.
|
|
705
705
|
*
|
|
706
|
-
*
|
|
706
|
+
* Separate-token platforms (tiktok, twitter): Starts the platform-specific marketing API OAuth flow and creates an ads SocialAccount (tiktokads, xads) with its own token. Requires an existing posting account (accountId param). If the ads account already exists, returns alreadyConnected: true.
|
|
707
707
|
*
|
|
708
|
-
*
|
|
708
|
+
* Standalone platforms (googleads): Starts the Google Ads OAuth flow and creates a standalone ads SocialAccount (googleads) with no parent. If the account already exists, returns alreadyConnected: true.
|
|
709
709
|
*
|
|
710
|
-
* Ads accounts appear as regular SocialAccount documents with ads platform values (e.g.,
|
|
710
|
+
* Ads accounts appear as regular SocialAccount documents with ads platform values (e.g., metaads, tiktokads) in GET /v1/accounts.
|
|
711
711
|
*
|
|
712
712
|
*/
|
|
713
713
|
export const connectAds = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<ConnectAdsData, ThrowOnError>) => {
|
|
@@ -1023,7 +1023,7 @@ export const connectBlueskyCredentials = <ThrowOnError extends boolean = false>(
|
|
|
1023
1023
|
* 1. Go to Meta Business Suite (business.facebook.com)
|
|
1024
1024
|
* 2. Create or select a WhatsApp Business Account
|
|
1025
1025
|
* 3. In Business Settings > System Users, create a System User
|
|
1026
|
-
* 4. Assign it the
|
|
1026
|
+
* 4. Assign it the whatsapp_business_management and whatsapp_business_messaging permissions
|
|
1027
1027
|
* 5. Generate a permanent access token
|
|
1028
1028
|
* 6. Get the WABA ID from WhatsApp Manager > Account Tools > Phone Numbers
|
|
1029
1029
|
* 7. Get the Phone Number ID from the same page (click on the number)
|
|
@@ -1130,7 +1130,7 @@ export const getLinkedInPostAnalytics = <ThrowOnError extends boolean = false>(o
|
|
|
1130
1130
|
* Get LinkedIn post reactions
|
|
1131
1131
|
* Returns individual reactions for a specific LinkedIn post, including reactor profiles
|
|
1132
1132
|
* (name, headline/job title, profile picture, profile URL, reaction type).
|
|
1133
|
-
* Only works for
|
|
1133
|
+
* Only works for organization/company page accounts. LinkedIn restricts reaction
|
|
1134
1134
|
* data for personal profiles (r_member_social_feed is a closed permission).
|
|
1135
1135
|
*
|
|
1136
1136
|
*/
|
|
@@ -1156,22 +1156,22 @@ export const updateLinkedInOrganization = <ThrowOnError extends boolean = false>
|
|
|
1156
1156
|
* Resolve LinkedIn mention
|
|
1157
1157
|
* Converts a LinkedIn profile or company URL to a URN for @mentions in posts.
|
|
1158
1158
|
*
|
|
1159
|
-
*
|
|
1159
|
+
* How to use LinkedIn @mentions (2-step workflow):
|
|
1160
1160
|
*
|
|
1161
1161
|
* 1. Call this endpoint with the LinkedIn profile/company URL to get the mention URN and format.
|
|
1162
|
-
* 2. Embed the returned
|
|
1162
|
+
* 2. Embed the returned mentionFormat (e.g. @[Vincent Jong](urn:li:person:xxx)) directly in your post's content field.
|
|
1163
1163
|
*
|
|
1164
|
-
*
|
|
1165
|
-
* - Resolve:
|
|
1166
|
-
* - Returns:
|
|
1167
|
-
* - Use in post content:
|
|
1164
|
+
* Example:
|
|
1165
|
+
* - Resolve: GET /v1/accounts/{id}/linkedin-mentions?url=linkedin.com/in/vincentjong&displayName=Vincent Jong
|
|
1166
|
+
* - Returns: mentionFormat: "@[Vincent Jong](urn:li:person:xxx)"
|
|
1167
|
+
* - Use in post content: "Great talk with @[Vincent Jong](urn:li:person:xxx) today!"
|
|
1168
1168
|
*
|
|
1169
|
-
*
|
|
1169
|
+
* Important: The mentions array field in POST /v1/posts is stored for reference only and does NOT trigger @mentions on LinkedIn. You must embed the mention format directly in the content text.
|
|
1170
1170
|
*
|
|
1171
|
-
*
|
|
1172
|
-
* -
|
|
1173
|
-
* -
|
|
1174
|
-
* - For person mentions to be clickable, the
|
|
1171
|
+
* Requirements:
|
|
1172
|
+
* - Person mentions require the LinkedIn account to be admin of at least one organization. This is a LinkedIn API limitation: the only endpoints that resolve profile URLs to member URNs (vanityUrl, peopleTypeahead) are scoped to organization followers. There is no public LinkedIn API to resolve a vanity URL without organization context.
|
|
1173
|
+
* - Organization mentions (e.g. @Microsoft) work without this requirement.
|
|
1174
|
+
* - For person mentions to be clickable, the displayName parameter must exactly match the name shown on their LinkedIn profile.
|
|
1175
1175
|
* - Person mentions DO work when published from personal profiles (the URN just needs to be valid). The limitation is only in the resolution step (URL to URN), not in publishing.
|
|
1176
1176
|
*
|
|
1177
1177
|
*/
|
|
@@ -1206,7 +1206,7 @@ export const updatePinterestBoards = <ThrowOnError extends boolean = false>(opti
|
|
|
1206
1206
|
|
|
1207
1207
|
/**
|
|
1208
1208
|
* List YouTube playlists
|
|
1209
|
-
* Returns the playlists available for a connected YouTube account. Use this to get a playlist ID when creating a YouTube post with the
|
|
1209
|
+
* Returns the playlists available for a connected YouTube account. Use this to get a playlist ID when creating a YouTube post with the playlistId field.
|
|
1210
1210
|
*/
|
|
1211
1211
|
export const getYoutubePlaylists = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<GetYoutubePlaylistsData, ThrowOnError>) => {
|
|
1212
1212
|
return (options?.client ?? client).get<GetYoutubePlaylistsResponse, GetYoutubePlaylistsError, ThrowOnError>({
|
|
@@ -1217,7 +1217,7 @@ export const getYoutubePlaylists = <ThrowOnError extends boolean = false>(option
|
|
|
1217
1217
|
|
|
1218
1218
|
/**
|
|
1219
1219
|
* Set default YouTube playlist
|
|
1220
|
-
* Sets the default playlist used when publishing videos for this account. When a post does not specify a
|
|
1220
|
+
* Sets the default playlist used when publishing videos for this account. When a post does not specify a playlistId, the default playlist is not automatically used (it is stored for client-side convenience).
|
|
1221
1221
|
*/
|
|
1222
1222
|
export const updateYoutubeDefaultPlaylist = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<UpdateYoutubeDefaultPlaylistData, ThrowOnError>) => {
|
|
1223
1223
|
return (options?.client ?? client).put<UpdateYoutubeDefaultPlaylistResponse, UpdateYoutubeDefaultPlaylistError, ThrowOnError>({
|
|
@@ -1432,7 +1432,7 @@ export const listLogs = <ThrowOnError extends boolean = false>(options?: Options
|
|
|
1432
1432
|
* Fetch conversations (DMs) from all connected messaging accounts in a single API call. Supports filtering by profile and platform. Results are aggregated and deduplicated.
|
|
1433
1433
|
* Supported platforms: Facebook, Instagram, Twitter/X, Bluesky, Reddit, Telegram.
|
|
1434
1434
|
*
|
|
1435
|
-
*
|
|
1435
|
+
* Twitter/X limitation: X has replaced traditional DMs with encrypted "X Chat" for many accounts. Messages sent or received through encrypted X Chat are not accessible via X's API (the /2/dm_events endpoint only returns legacy unencrypted DMs). This means some Twitter/X conversations may show only outgoing messages or appear empty. This is an X platform limitation that affects all third-party applications. See X's docs on encrypted messaging for more details.
|
|
1436
1436
|
*
|
|
1437
1437
|
*/
|
|
1438
1438
|
export const listInboxConversations = <ThrowOnError extends boolean = false>(options?: OptionsLegacyParser<ListInboxConversationsData, ThrowOnError>) => {
|
|
@@ -1446,13 +1446,13 @@ export const listInboxConversations = <ThrowOnError extends boolean = false>(opt
|
|
|
1446
1446
|
* Create conversation
|
|
1447
1447
|
* Initiate a new direct message conversation with a specified user. If a conversation already exists with the recipient, the message is added to the existing thread.
|
|
1448
1448
|
*
|
|
1449
|
-
*
|
|
1449
|
+
* Currently supported platforms: Twitter/X only. Other platforms will return PLATFORM_NOT_SUPPORTED.
|
|
1450
1450
|
*
|
|
1451
|
-
*
|
|
1451
|
+
* DM eligibility: Before sending, the endpoint checks if the recipient accepts DMs from your account (via the receives_your_dm field). If not, a 422 error with code DM_NOT_ALLOWED is returned. You can skip this check with skipDmCheck: true if you have already verified eligibility.
|
|
1452
1452
|
*
|
|
1453
|
-
*
|
|
1453
|
+
* X API tier requirement: DM write endpoints require X API Pro tier ($5,000/month) or Enterprise access. This applies to BYOK (Bring Your Own Key) users who provide their own X API credentials.
|
|
1454
1454
|
*
|
|
1455
|
-
*
|
|
1455
|
+
* Rate limits: 200 requests per 15 minutes, 1,000 per 24 hours per user, 15,000 per 24 hours per app (shared across all DM endpoints).
|
|
1456
1456
|
*
|
|
1457
1457
|
*/
|
|
1458
1458
|
export const createInboxConversation = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<CreateInboxConversationData, ThrowOnError>) => {
|
|
@@ -1488,7 +1488,7 @@ export const updateInboxConversation = <ThrowOnError extends boolean = false>(op
|
|
|
1488
1488
|
* List messages
|
|
1489
1489
|
* Fetch messages for a specific conversation. Requires accountId query parameter.
|
|
1490
1490
|
*
|
|
1491
|
-
*
|
|
1491
|
+
* Twitter/X limitation: X's encrypted "X Chat" messages are not accessible via the API. Conversations where the other participant uses encrypted X Chat may only show your outgoing messages. See the list conversations endpoint for more details.
|
|
1492
1492
|
*
|
|
1493
1493
|
*/
|
|
1494
1494
|
export const getInboxConversationMessages = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<GetInboxConversationMessagesData, ThrowOnError>) => {
|
|
@@ -1525,11 +1525,11 @@ export const editInboxMessage = <ThrowOnError extends boolean = false>(options:
|
|
|
1525
1525
|
/**
|
|
1526
1526
|
* Delete message
|
|
1527
1527
|
* Delete a message from a conversation. Platform support varies:
|
|
1528
|
-
* -
|
|
1529
|
-
* -
|
|
1530
|
-
* -
|
|
1531
|
-
* -
|
|
1532
|
-
* -
|
|
1528
|
+
* - Telegram: Full delete (bot's own messages anytime, others if admin)
|
|
1529
|
+
* - X/Twitter: Full delete (own DM events only)
|
|
1530
|
+
* - Bluesky: Delete for self only (recipient still sees it)
|
|
1531
|
+
* - Reddit: Delete from sender's view only
|
|
1532
|
+
* - Facebook, Instagram, WhatsApp: Not supported (returns 400)
|
|
1533
1533
|
*
|
|
1534
1534
|
*/
|
|
1535
1535
|
export const deleteInboxMessage = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<DeleteInboxMessageData, ThrowOnError>) => {
|
|
@@ -1542,9 +1542,9 @@ export const deleteInboxMessage = <ThrowOnError extends boolean = false>(options
|
|
|
1542
1542
|
/**
|
|
1543
1543
|
* Send typing indicator
|
|
1544
1544
|
* Show a typing indicator in a conversation. Platform support:
|
|
1545
|
-
* -
|
|
1546
|
-
* -
|
|
1547
|
-
* -
|
|
1545
|
+
* - Facebook Messenger: Shows "Page is typing..." for 20 seconds
|
|
1546
|
+
* - Telegram: Shows "Bot is typing..." for 5 seconds
|
|
1547
|
+
* - All others: Returns 200 but no-op (platform doesn't support it)
|
|
1548
1548
|
*
|
|
1549
1549
|
* Typing indicators are best-effort. The endpoint always returns 200 even if the platform call fails.
|
|
1550
1550
|
*
|
|
@@ -1559,9 +1559,9 @@ export const sendTypingIndicator = <ThrowOnError extends boolean = false>(option
|
|
|
1559
1559
|
/**
|
|
1560
1560
|
* Add reaction
|
|
1561
1561
|
* Add an emoji reaction to a message. Platform support:
|
|
1562
|
-
* -
|
|
1563
|
-
* -
|
|
1564
|
-
* -
|
|
1562
|
+
* - Telegram: Supports a subset of Unicode emoji reactions
|
|
1563
|
+
* - WhatsApp: Supports any standard emoji (one reaction per message per sender)
|
|
1564
|
+
* - All others: Returns 400 (not supported)
|
|
1565
1565
|
*
|
|
1566
1566
|
*/
|
|
1567
1567
|
export const addMessageReaction = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<AddMessageReactionData, ThrowOnError>) => {
|
|
@@ -1574,9 +1574,9 @@ export const addMessageReaction = <ThrowOnError extends boolean = false>(options
|
|
|
1574
1574
|
/**
|
|
1575
1575
|
* Remove reaction
|
|
1576
1576
|
* Remove a reaction from a message. Platform support:
|
|
1577
|
-
* -
|
|
1578
|
-
* -
|
|
1579
|
-
* -
|
|
1577
|
+
* - Telegram: Send empty reaction array to clear
|
|
1578
|
+
* - WhatsApp: Send empty emoji to remove
|
|
1579
|
+
* - All others: Returns 400 (not supported)
|
|
1580
1580
|
*
|
|
1581
1581
|
*/
|
|
1582
1582
|
export const removeMessageReaction = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<RemoveMessageReactionData, ThrowOnError>) => {
|
|
@@ -1589,12 +1589,12 @@ export const removeMessageReaction = <ThrowOnError extends boolean = false>(opti
|
|
|
1589
1589
|
/**
|
|
1590
1590
|
* Upload media file
|
|
1591
1591
|
* Upload a media file using API key authentication and get back a publicly accessible URL.
|
|
1592
|
-
* The URL can be used as
|
|
1592
|
+
* The URL can be used as attachmentUrl when sending inbox messages.
|
|
1593
1593
|
*
|
|
1594
1594
|
* Files are stored in temporary storage and auto-delete after 7 days.
|
|
1595
1595
|
* Maximum file size is 25MB.
|
|
1596
1596
|
*
|
|
1597
|
-
* Unlike
|
|
1597
|
+
* Unlike /v1/media/upload (which uses upload tokens for end-user flows),
|
|
1598
1598
|
* this endpoint uses standard Bearer token authentication for programmatic use.
|
|
1599
1599
|
*
|
|
1600
1600
|
*/
|
|
@@ -1947,11 +1947,11 @@ export const getWhatsAppTemplates = <ThrowOnError extends boolean = false>(optio
|
|
|
1947
1947
|
* Create template
|
|
1948
1948
|
* Create a new message template. Supports two modes:
|
|
1949
1949
|
*
|
|
1950
|
-
*
|
|
1950
|
+
* Custom template: Provide components with your own content. Submitted to Meta for review (can take up to 24h).
|
|
1951
1951
|
*
|
|
1952
|
-
*
|
|
1953
|
-
* from Meta's template library. Library templates are
|
|
1954
|
-
* customize parameters and buttons via
|
|
1952
|
+
* Library template: Provide library_template_name instead of components to use a pre-built template
|
|
1953
|
+
* from Meta's template library. Library templates are pre-approved (no review wait). You can optionally
|
|
1954
|
+
* customize parameters and buttons via library_template_body_inputs and library_template_button_inputs.
|
|
1955
1955
|
*
|
|
1956
1956
|
* Browse available library templates at: https://business.facebook.com/wa/manage/message-templates/
|
|
1957
1957
|
*
|
|
@@ -2354,9 +2354,9 @@ export const uploadWhatsAppFlowJson = <ThrowOnError extends boolean = false>(opt
|
|
|
2354
2354
|
|
|
2355
2355
|
/**
|
|
2356
2356
|
* Publish flow
|
|
2357
|
-
* Publish a DRAFT flow.
|
|
2357
|
+
* Publish a DRAFT flow. This is irreversible. Once published, the flow and its JSON
|
|
2358
2358
|
* become immutable and the flow can be sent to users. To update a published flow,
|
|
2359
|
-
* create a new flow (optionally cloning this one via
|
|
2359
|
+
* create a new flow (optionally cloning this one via cloneFlowId).
|
|
2360
2360
|
*
|
|
2361
2361
|
*/
|
|
2362
2362
|
export const publishWhatsAppFlow = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<PublishWhatsAppFlowData, ThrowOnError>) => {
|
|
@@ -2368,7 +2368,7 @@ export const publishWhatsAppFlow = <ThrowOnError extends boolean = false>(option
|
|
|
2368
2368
|
|
|
2369
2369
|
/**
|
|
2370
2370
|
* Deprecate flow
|
|
2371
|
-
* Deprecate a PUBLISHED flow.
|
|
2371
|
+
* Deprecate a PUBLISHED flow. This is irreversible. Deprecated flows cannot be sent
|
|
2372
2372
|
* or opened, but existing active sessions may continue until they complete.
|
|
2373
2373
|
*
|
|
2374
2374
|
*/
|
|
@@ -2417,6 +2417,7 @@ export const createContact = <ThrowOnError extends boolean = false>(options: Opt
|
|
|
2417
2417
|
|
|
2418
2418
|
/**
|
|
2419
2419
|
* Get contact
|
|
2420
|
+
* Returns a contact with all associated messaging channels.
|
|
2420
2421
|
*/
|
|
2421
2422
|
export const getContact = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<GetContactData, ThrowOnError>) => {
|
|
2422
2423
|
return (options?.client ?? client).get<GetContactResponse, GetContactError, ThrowOnError>({
|
|
@@ -2427,6 +2428,7 @@ export const getContact = <ThrowOnError extends boolean = false>(options: Option
|
|
|
2427
2428
|
|
|
2428
2429
|
/**
|
|
2429
2430
|
* Update contact
|
|
2431
|
+
* Update one or more fields on a contact. Only provided fields are changed.
|
|
2430
2432
|
*/
|
|
2431
2433
|
export const updateContact = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<UpdateContactData, ThrowOnError>) => {
|
|
2432
2434
|
return (options?.client ?? client).patch<UpdateContactResponse, UpdateContactError, ThrowOnError>({
|
|
@@ -2437,6 +2439,7 @@ export const updateContact = <ThrowOnError extends boolean = false>(options: Opt
|
|
|
2437
2439
|
|
|
2438
2440
|
/**
|
|
2439
2441
|
* Delete contact
|
|
2442
|
+
* Permanently deletes a contact and all associated channels.
|
|
2440
2443
|
*/
|
|
2441
2444
|
export const deleteContact = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<DeleteContactData, ThrowOnError>) => {
|
|
2442
2445
|
return (options?.client ?? client).delete<DeleteContactResponse, DeleteContactError, ThrowOnError>({
|
|
@@ -2447,6 +2450,7 @@ export const deleteContact = <ThrowOnError extends boolean = false>(options: Opt
|
|
|
2447
2450
|
|
|
2448
2451
|
/**
|
|
2449
2452
|
* List channels for a contact
|
|
2453
|
+
* Returns all messaging channels linked to a contact (e.g. Instagram DM, Telegram, WhatsApp).
|
|
2450
2454
|
*/
|
|
2451
2455
|
export const getContactChannels = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<GetContactChannelsData, ThrowOnError>) => {
|
|
2452
2456
|
return (options?.client ?? client).get<GetContactChannelsResponse, GetContactChannelsError, ThrowOnError>({
|
|
@@ -2468,6 +2472,7 @@ export const bulkCreateContacts = <ThrowOnError extends boolean = false>(options
|
|
|
2468
2472
|
|
|
2469
2473
|
/**
|
|
2470
2474
|
* Set custom field value
|
|
2475
|
+
* Set or overwrite a custom field value on a contact. The value type must match the field definition.
|
|
2471
2476
|
*/
|
|
2472
2477
|
export const setContactFieldValue = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<SetContactFieldValueData, ThrowOnError>) => {
|
|
2473
2478
|
return (options?.client ?? client).put<SetContactFieldValueResponse, SetContactFieldValueError, ThrowOnError>({
|
|
@@ -2478,6 +2483,7 @@ export const setContactFieldValue = <ThrowOnError extends boolean = false>(optio
|
|
|
2478
2483
|
|
|
2479
2484
|
/**
|
|
2480
2485
|
* Clear custom field value
|
|
2486
|
+
* Remove a custom field value from a contact. The field definition is not affected.
|
|
2481
2487
|
*/
|
|
2482
2488
|
export const clearContactFieldValue = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<ClearContactFieldValueData, ThrowOnError>) => {
|
|
2483
2489
|
return (options?.client ?? client).delete<ClearContactFieldValueResponse, ClearContactFieldValueError, ThrowOnError>({
|
|
@@ -2488,6 +2494,7 @@ export const clearContactFieldValue = <ThrowOnError extends boolean = false>(opt
|
|
|
2488
2494
|
|
|
2489
2495
|
/**
|
|
2490
2496
|
* List custom field definitions
|
|
2497
|
+
* Returns all custom field definitions. Optionally filter by profile.
|
|
2491
2498
|
*/
|
|
2492
2499
|
export const listCustomFields = <ThrowOnError extends boolean = false>(options?: OptionsLegacyParser<ListCustomFieldsData, ThrowOnError>) => {
|
|
2493
2500
|
return (options?.client ?? client).get<ListCustomFieldsResponse, ListCustomFieldsError, ThrowOnError>({
|
|
@@ -2498,6 +2505,7 @@ export const listCustomFields = <ThrowOnError extends boolean = false>(options?:
|
|
|
2498
2505
|
|
|
2499
2506
|
/**
|
|
2500
2507
|
* Create custom field
|
|
2508
|
+
* Create a new custom field definition. Supported types are text, number, date, boolean, and select.
|
|
2501
2509
|
*/
|
|
2502
2510
|
export const createCustomField = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<CreateCustomFieldData, ThrowOnError>) => {
|
|
2503
2511
|
return (options?.client ?? client).post<CreateCustomFieldResponse, CreateCustomFieldError, ThrowOnError>({
|
|
@@ -2508,6 +2516,7 @@ export const createCustomField = <ThrowOnError extends boolean = false>(options:
|
|
|
2508
2516
|
|
|
2509
2517
|
/**
|
|
2510
2518
|
* Update custom field
|
|
2519
|
+
* Update a custom field definition. The field type cannot be changed after creation.
|
|
2511
2520
|
*/
|
|
2512
2521
|
export const updateCustomField = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<UpdateCustomFieldData, ThrowOnError>) => {
|
|
2513
2522
|
return (options?.client ?? client).patch<UpdateCustomFieldResponse, UpdateCustomFieldError, ThrowOnError>({
|
|
@@ -2518,6 +2527,7 @@ export const updateCustomField = <ThrowOnError extends boolean = false>(options:
|
|
|
2518
2527
|
|
|
2519
2528
|
/**
|
|
2520
2529
|
* Delete custom field
|
|
2530
|
+
* Delete a custom field definition and remove its values from all contacts.
|
|
2521
2531
|
*/
|
|
2522
2532
|
export const deleteCustomField = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<DeleteCustomFieldData, ThrowOnError>) => {
|
|
2523
2533
|
return (options?.client ?? client).delete<DeleteCustomFieldResponse, DeleteCustomFieldError, ThrowOnError>({
|
|
@@ -2528,6 +2538,7 @@ export const deleteCustomField = <ThrowOnError extends boolean = false>(options:
|
|
|
2528
2538
|
|
|
2529
2539
|
/**
|
|
2530
2540
|
* List broadcasts
|
|
2541
|
+
* Returns broadcasts with delivery stats. Filter by status, platform, or profile.
|
|
2531
2542
|
*/
|
|
2532
2543
|
export const listBroadcasts = <ThrowOnError extends boolean = false>(options?: OptionsLegacyParser<ListBroadcastsData, ThrowOnError>) => {
|
|
2533
2544
|
return (options?.client ?? client).get<ListBroadcastsResponse, ListBroadcastsError, ThrowOnError>({
|
|
@@ -2538,6 +2549,7 @@ export const listBroadcasts = <ThrowOnError extends boolean = false>(options?: O
|
|
|
2538
2549
|
|
|
2539
2550
|
/**
|
|
2540
2551
|
* Create broadcast draft
|
|
2552
|
+
* Create a broadcast in draft status. Add recipients and then send or schedule it.
|
|
2541
2553
|
*/
|
|
2542
2554
|
export const createBroadcast = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<CreateBroadcastData, ThrowOnError>) => {
|
|
2543
2555
|
return (options?.client ?? client).post<CreateBroadcastResponse, CreateBroadcastError, ThrowOnError>({
|
|
@@ -2548,6 +2560,7 @@ export const createBroadcast = <ThrowOnError extends boolean = false>(options: O
|
|
|
2548
2560
|
|
|
2549
2561
|
/**
|
|
2550
2562
|
* Get broadcast details
|
|
2563
|
+
* Returns a broadcast with its full configuration and delivery stats.
|
|
2551
2564
|
*/
|
|
2552
2565
|
export const getBroadcast = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<GetBroadcastData, ThrowOnError>) => {
|
|
2553
2566
|
return (options?.client ?? client).get<GetBroadcastResponse, GetBroadcastError, ThrowOnError>({
|
|
@@ -2558,6 +2571,7 @@ export const getBroadcast = <ThrowOnError extends boolean = false>(options: Opti
|
|
|
2558
2571
|
|
|
2559
2572
|
/**
|
|
2560
2573
|
* Update broadcast
|
|
2574
|
+
* Update a broadcast's name, message, template, or segment filters. Only draft broadcasts can be updated.
|
|
2561
2575
|
*/
|
|
2562
2576
|
export const updateBroadcast = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<UpdateBroadcastData, ThrowOnError>) => {
|
|
2563
2577
|
return (options?.client ?? client).patch<UpdateBroadcastResponse, UpdateBroadcastError, ThrowOnError>({
|
|
@@ -2568,6 +2582,7 @@ export const updateBroadcast = <ThrowOnError extends boolean = false>(options: O
|
|
|
2568
2582
|
|
|
2569
2583
|
/**
|
|
2570
2584
|
* Delete broadcast
|
|
2585
|
+
* Permanently delete a broadcast. Only drafts can be deleted.
|
|
2571
2586
|
*/
|
|
2572
2587
|
export const deleteBroadcast = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<DeleteBroadcastData, ThrowOnError>) => {
|
|
2573
2588
|
return (options?.client ?? client).delete<DeleteBroadcastResponse, DeleteBroadcastError, ThrowOnError>({
|
|
@@ -2578,6 +2593,7 @@ export const deleteBroadcast = <ThrowOnError extends boolean = false>(options: O
|
|
|
2578
2593
|
|
|
2579
2594
|
/**
|
|
2580
2595
|
* Send broadcast now
|
|
2596
|
+
* Immediately start sending a draft broadcast to its recipients.
|
|
2581
2597
|
*/
|
|
2582
2598
|
export const sendBroadcast = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<SendBroadcastData, ThrowOnError>) => {
|
|
2583
2599
|
return (options?.client ?? client).post<SendBroadcastResponse, SendBroadcastError, ThrowOnError>({
|
|
@@ -2588,6 +2604,7 @@ export const sendBroadcast = <ThrowOnError extends boolean = false>(options: Opt
|
|
|
2588
2604
|
|
|
2589
2605
|
/**
|
|
2590
2606
|
* Schedule broadcast for later
|
|
2607
|
+
* Schedule a draft broadcast to be sent at a future date and time.
|
|
2591
2608
|
*/
|
|
2592
2609
|
export const scheduleBroadcast = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<ScheduleBroadcastData, ThrowOnError>) => {
|
|
2593
2610
|
return (options?.client ?? client).post<ScheduleBroadcastResponse, ScheduleBroadcastError, ThrowOnError>({
|
|
@@ -2598,6 +2615,7 @@ export const scheduleBroadcast = <ThrowOnError extends boolean = false>(options:
|
|
|
2598
2615
|
|
|
2599
2616
|
/**
|
|
2600
2617
|
* Cancel broadcast
|
|
2618
|
+
* Cancel a scheduled or in-progress broadcast. Already-sent messages are not affected.
|
|
2601
2619
|
*/
|
|
2602
2620
|
export const cancelBroadcast = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<CancelBroadcastData, ThrowOnError>) => {
|
|
2603
2621
|
return (options?.client ?? client).post<CancelBroadcastResponse, CancelBroadcastError, ThrowOnError>({
|
|
@@ -2608,6 +2626,7 @@ export const cancelBroadcast = <ThrowOnError extends boolean = false>(options: O
|
|
|
2608
2626
|
|
|
2609
2627
|
/**
|
|
2610
2628
|
* List broadcast recipients
|
|
2629
|
+
* Returns recipients for a broadcast with individual delivery status. Filter by status.
|
|
2611
2630
|
*/
|
|
2612
2631
|
export const listBroadcastRecipients = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<ListBroadcastRecipientsData, ThrowOnError>) => {
|
|
2613
2632
|
return (options?.client ?? client).get<ListBroadcastRecipientsResponse, ListBroadcastRecipientsError, ThrowOnError>({
|
|
@@ -2618,6 +2637,7 @@ export const listBroadcastRecipients = <ThrowOnError extends boolean = false>(op
|
|
|
2618
2637
|
|
|
2619
2638
|
/**
|
|
2620
2639
|
* Add recipients to a broadcast
|
|
2640
|
+
* Add recipients by contact IDs, raw phone numbers, or from the broadcast's segment filters.
|
|
2621
2641
|
*/
|
|
2622
2642
|
export const addBroadcastRecipients = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<AddBroadcastRecipientsData, ThrowOnError>) => {
|
|
2623
2643
|
return (options?.client ?? client).post<AddBroadcastRecipientsResponse, AddBroadcastRecipientsError, ThrowOnError>({
|
|
@@ -2628,6 +2648,7 @@ export const addBroadcastRecipients = <ThrowOnError extends boolean = false>(opt
|
|
|
2628
2648
|
|
|
2629
2649
|
/**
|
|
2630
2650
|
* List sequences
|
|
2651
|
+
* Returns sequences with enrollment stats. Filter by status, platform, or profile.
|
|
2631
2652
|
*/
|
|
2632
2653
|
export const listSequences = <ThrowOnError extends boolean = false>(options?: OptionsLegacyParser<ListSequencesData, ThrowOnError>) => {
|
|
2633
2654
|
return (options?.client ?? client).get<ListSequencesResponse, ListSequencesError, ThrowOnError>({
|
|
@@ -2638,6 +2659,7 @@ export const listSequences = <ThrowOnError extends boolean = false>(options?: Op
|
|
|
2638
2659
|
|
|
2639
2660
|
/**
|
|
2640
2661
|
* Create sequence
|
|
2662
|
+
* Create a multi-step messaging sequence. Each step has a delay and a message or WhatsApp template.
|
|
2641
2663
|
*/
|
|
2642
2664
|
export const createSequence = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<CreateSequenceData, ThrowOnError>) => {
|
|
2643
2665
|
return (options?.client ?? client).post<CreateSequenceResponse, CreateSequenceError, ThrowOnError>({
|
|
@@ -2648,6 +2670,7 @@ export const createSequence = <ThrowOnError extends boolean = false>(options: Op
|
|
|
2648
2670
|
|
|
2649
2671
|
/**
|
|
2650
2672
|
* Get sequence with steps
|
|
2673
|
+
* Returns a sequence with all its steps and enrollment stats.
|
|
2651
2674
|
*/
|
|
2652
2675
|
export const getSequence = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<GetSequenceData, ThrowOnError>) => {
|
|
2653
2676
|
return (options?.client ?? client).get<GetSequenceResponse, GetSequenceError, ThrowOnError>({
|
|
@@ -2658,6 +2681,7 @@ export const getSequence = <ThrowOnError extends boolean = false>(options: Optio
|
|
|
2658
2681
|
|
|
2659
2682
|
/**
|
|
2660
2683
|
* Update sequence
|
|
2684
|
+
* Update a sequence's name, steps, or exit conditions. Active sequences can be updated without pausing.
|
|
2661
2685
|
*/
|
|
2662
2686
|
export const updateSequence = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<UpdateSequenceData, ThrowOnError>) => {
|
|
2663
2687
|
return (options?.client ?? client).patch<UpdateSequenceResponse, UpdateSequenceError, ThrowOnError>({
|
|
@@ -2668,6 +2692,7 @@ export const updateSequence = <ThrowOnError extends boolean = false>(options: Op
|
|
|
2668
2692
|
|
|
2669
2693
|
/**
|
|
2670
2694
|
* Delete sequence
|
|
2695
|
+
* Permanently delete a sequence. Active enrollments are stopped.
|
|
2671
2696
|
*/
|
|
2672
2697
|
export const deleteSequence = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<DeleteSequenceData, ThrowOnError>) => {
|
|
2673
2698
|
return (options?.client ?? client).delete<DeleteSequenceResponse, DeleteSequenceError, ThrowOnError>({
|
|
@@ -2678,6 +2703,7 @@ export const deleteSequence = <ThrowOnError extends boolean = false>(options: Op
|
|
|
2678
2703
|
|
|
2679
2704
|
/**
|
|
2680
2705
|
* Activate sequence
|
|
2706
|
+
* Start a draft or paused sequence. The sequence must have at least one step.
|
|
2681
2707
|
*/
|
|
2682
2708
|
export const activateSequence = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<ActivateSequenceData, ThrowOnError>) => {
|
|
2683
2709
|
return (options?.client ?? client).post<ActivateSequenceResponse, ActivateSequenceError, ThrowOnError>({
|
|
@@ -2688,6 +2714,7 @@ export const activateSequence = <ThrowOnError extends boolean = false>(options:
|
|
|
2688
2714
|
|
|
2689
2715
|
/**
|
|
2690
2716
|
* Pause sequence
|
|
2717
|
+
* Pause an active sequence. Enrolled contacts stop receiving messages until the sequence is reactivated.
|
|
2691
2718
|
*/
|
|
2692
2719
|
export const pauseSequence = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<PauseSequenceData, ThrowOnError>) => {
|
|
2693
2720
|
return (options?.client ?? client).post<PauseSequenceResponse, PauseSequenceError, ThrowOnError>({
|
|
@@ -2698,6 +2725,7 @@ export const pauseSequence = <ThrowOnError extends boolean = false>(options: Opt
|
|
|
2698
2725
|
|
|
2699
2726
|
/**
|
|
2700
2727
|
* Enroll contacts in a sequence
|
|
2728
|
+
* Enroll one or more contacts into a sequence. Contacts already enrolled are skipped.
|
|
2701
2729
|
*/
|
|
2702
2730
|
export const enrollContacts = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<EnrollContactsData, ThrowOnError>) => {
|
|
2703
2731
|
return (options?.client ?? client).post<EnrollContactsResponse, EnrollContactsError, ThrowOnError>({
|
|
@@ -2708,6 +2736,7 @@ export const enrollContacts = <ThrowOnError extends boolean = false>(options: Op
|
|
|
2708
2736
|
|
|
2709
2737
|
/**
|
|
2710
2738
|
* Unenroll contact
|
|
2739
|
+
* Remove a contact from a sequence. No further messages will be sent to this contact.
|
|
2711
2740
|
*/
|
|
2712
2741
|
export const unenrollContact = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<UnenrollContactData, ThrowOnError>) => {
|
|
2713
2742
|
return (options?.client ?? client).delete<UnenrollContactResponse, UnenrollContactError, ThrowOnError>({
|
|
@@ -2718,6 +2747,7 @@ export const unenrollContact = <ThrowOnError extends boolean = false>(options: O
|
|
|
2718
2747
|
|
|
2719
2748
|
/**
|
|
2720
2749
|
* List enrollments for a sequence
|
|
2750
|
+
* Returns enrolled contacts with their progress, status, and next scheduled step.
|
|
2721
2751
|
*/
|
|
2722
2752
|
export const listSequenceEnrollments = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<ListSequenceEnrollmentsData, ThrowOnError>) => {
|
|
2723
2753
|
return (options?.client ?? client).get<ListSequenceEnrollmentsResponse, ListSequenceEnrollmentsError, ThrowOnError>({
|
|
@@ -2753,6 +2783,7 @@ export const createCommentAutomation = <ThrowOnError extends boolean = false>(op
|
|
|
2753
2783
|
|
|
2754
2784
|
/**
|
|
2755
2785
|
* Get automation details
|
|
2786
|
+
* Returns an automation with its configuration, stats, and recent trigger logs.
|
|
2756
2787
|
*/
|
|
2757
2788
|
export const getCommentAutomation = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<GetCommentAutomationData, ThrowOnError>) => {
|
|
2758
2789
|
return (options?.client ?? client).get<GetCommentAutomationResponse, GetCommentAutomationError, ThrowOnError>({
|
|
@@ -2763,6 +2794,7 @@ export const getCommentAutomation = <ThrowOnError extends boolean = false>(optio
|
|
|
2763
2794
|
|
|
2764
2795
|
/**
|
|
2765
2796
|
* Update automation settings
|
|
2797
|
+
* Update an automation's keywords, DM message, comment reply, or active status.
|
|
2766
2798
|
*/
|
|
2767
2799
|
export const updateCommentAutomation = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<UpdateCommentAutomationData, ThrowOnError>) => {
|
|
2768
2800
|
return (options?.client ?? client).patch<UpdateCommentAutomationResponse, UpdateCommentAutomationError, ThrowOnError>({
|
|
@@ -2773,6 +2805,7 @@ export const updateCommentAutomation = <ThrowOnError extends boolean = false>(op
|
|
|
2773
2805
|
|
|
2774
2806
|
/**
|
|
2775
2807
|
* Delete automation
|
|
2808
|
+
* Permanently delete an automation and all its trigger logs.
|
|
2776
2809
|
*/
|
|
2777
2810
|
export const deleteCommentAutomation = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<DeleteCommentAutomationData, ThrowOnError>) => {
|
|
2778
2811
|
return (options?.client ?? client).delete<DeleteCommentAutomationResponse, DeleteCommentAutomationError, ThrowOnError>({
|
|
@@ -2795,7 +2828,7 @@ export const listCommentAutomationLogs = <ThrowOnError extends boolean = false>(
|
|
|
2795
2828
|
/**
|
|
2796
2829
|
* List ads
|
|
2797
2830
|
* Returns a paginated list of ads with metrics computed over an optional date range.
|
|
2798
|
-
* Use
|
|
2831
|
+
* Use source=all to include externally-synced ads from platform ad managers.
|
|
2799
2832
|
* If no date range is provided, defaults to the last 90 days. Date range is capped at 90 days max.
|
|
2800
2833
|
*
|
|
2801
2834
|
*/
|
|
@@ -2852,6 +2885,7 @@ export const getAdTree = <ThrowOnError extends boolean = false>(options?: Option
|
|
|
2852
2885
|
|
|
2853
2886
|
/**
|
|
2854
2887
|
* Get ad details
|
|
2888
|
+
* Returns an ad with its creative, targeting, status, and performance metrics.
|
|
2855
2889
|
*/
|
|
2856
2890
|
export const getAd = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<GetAdData, ThrowOnError>) => {
|
|
2857
2891
|
return (options?.client ?? client).get<GetAdResponse, GetAdError, ThrowOnError>({
|
|
@@ -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;
|
|
@@ -717,7 +717,7 @@ export type InboxWebhookConversation = {
|
|
|
717
717
|
export type status3 = '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
|
/**
|
|
@@ -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;
|
|
@@ -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;
|