@messagebird/sdk 0.7.0 → 0.7.2
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 +20 -16
- package/dist/index.mjs +2 -2
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1522,6 +1522,10 @@ type WhatsAppError = {
|
|
|
1522
1522
|
* Human-readable explanation of the failure.
|
|
1523
1523
|
*/
|
|
1524
1524
|
readonly description: string;
|
|
1525
|
+
/**
|
|
1526
|
+
* Raw error code from the WhatsApp Cloud API, when available, for low-level debugging.
|
|
1527
|
+
*/
|
|
1528
|
+
readonly meta_error_code?: string | null;
|
|
1525
1529
|
/**
|
|
1526
1530
|
* When the failure occurred.
|
|
1527
1531
|
*/
|
|
@@ -2104,7 +2108,7 @@ type SmsMessageSendRequest = unknown & {
|
|
|
2104
2108
|
*/
|
|
2105
2109
|
category?: SmsMessageCategory;
|
|
2106
2110
|
/**
|
|
2107
|
-
* Preview feature — how long, in seconds (60–172800), Bird keeps trying to deliver before the message transitions to `expired`. Currently unavailable; supplying this field returns `422
|
|
2111
|
+
* Preview feature — how long, in seconds (60–172800), Bird keeps trying to deliver before the message transitions to `expired`. Currently unavailable; supplying this field returns `422 SMSUnsupportedFeature`.
|
|
2108
2112
|
*
|
|
2109
2113
|
*/
|
|
2110
2114
|
validity_period?: number;
|
|
@@ -2121,15 +2125,15 @@ type SmsMessageSendRequest = unknown & {
|
|
|
2121
2125
|
[key: string]: unknown;
|
|
2122
2126
|
};
|
|
2123
2127
|
/**
|
|
2124
|
-
* Preview feature — multimedia (MMS) attachments. Currently unavailable; supplying this field returns `422
|
|
2128
|
+
* Preview feature — multimedia (MMS) attachments. Currently unavailable; supplying this field returns `422 SMSUnsupportedFeature`.
|
|
2125
2129
|
*/
|
|
2126
2130
|
media_urls?: Array<string>;
|
|
2127
2131
|
/**
|
|
2128
|
-
* Preview feature — sender selection from a messaging profile pool. Currently unavailable; supplying this field returns `422
|
|
2132
|
+
* Preview feature — sender selection from a messaging profile pool. Currently unavailable; supplying this field returns `422 SMSUnsupportedFeature`.
|
|
2129
2133
|
*/
|
|
2130
2134
|
messaging_profile_id?: string;
|
|
2131
2135
|
/**
|
|
2132
|
-
* Preview feature — send-later scheduling. Currently unavailable; supplying this field returns `422
|
|
2136
|
+
* Preview feature — send-later scheduling. Currently unavailable; supplying this field returns `422 SMSUnsupportedFeature`.
|
|
2133
2137
|
*/
|
|
2134
2138
|
scheduled_at?: string;
|
|
2135
2139
|
/**
|
|
@@ -2138,37 +2142,37 @@ type SmsMessageSendRequest = unknown & {
|
|
|
2138
2142
|
*/
|
|
2139
2143
|
template?: SmsTemplateSend;
|
|
2140
2144
|
/**
|
|
2141
|
-
* Preview feature — broadcast correlation. Currently unavailable; supplying this field returns `422
|
|
2145
|
+
* Preview feature — broadcast correlation. Currently unavailable; supplying this field returns `422 SMSUnsupportedFeature`.
|
|
2142
2146
|
*/
|
|
2143
2147
|
broadcast_id?: string;
|
|
2144
2148
|
/**
|
|
2145
|
-
* Preview feature — campaign correlation for analytics. Currently unavailable; supplying this field returns `422
|
|
2149
|
+
* Preview feature — campaign correlation for analytics. Currently unavailable; supplying this field returns `422 SMSUnsupportedFeature`.
|
|
2146
2150
|
*/
|
|
2147
2151
|
campaign_id?: string;
|
|
2148
2152
|
/**
|
|
2149
|
-
* Preview feature — audience-targeted sends. Currently unavailable; supplying this field returns `422
|
|
2153
|
+
* Preview feature — audience-targeted sends. Currently unavailable; supplying this field returns `422 SMSUnsupportedFeature`.
|
|
2150
2154
|
*/
|
|
2151
2155
|
audience_id?: string;
|
|
2152
2156
|
/**
|
|
2153
|
-
* Preview feature — contact-targeted sends. Currently unavailable; supplying this field returns `422
|
|
2157
|
+
* Preview feature — contact-targeted sends. Currently unavailable; supplying this field returns `422 SMSUnsupportedFeature`.
|
|
2154
2158
|
*/
|
|
2155
2159
|
contact_id?: string;
|
|
2156
2160
|
/**
|
|
2157
|
-
* Preview feature — topic-gated sends. Currently unavailable; supplying this field returns `422
|
|
2161
|
+
* Preview feature — topic-gated sends. Currently unavailable; supplying this field returns `422 SMSUnsupportedFeature`.
|
|
2158
2162
|
*/
|
|
2159
2163
|
topic_id?: string;
|
|
2160
2164
|
/**
|
|
2161
|
-
* Preview feature — per-segment price ceiling. Currently unavailable; supplying this field returns `422
|
|
2165
|
+
* Preview feature — per-segment price ceiling. Currently unavailable; supplying this field returns `422 SMSUnsupportedFeature`.
|
|
2162
2166
|
*/
|
|
2163
2167
|
max_price_per_segment?: number;
|
|
2164
2168
|
/**
|
|
2165
|
-
* Preview feature — per-recipient substitution for batch sends. Currently unavailable; supplying this field returns `422
|
|
2169
|
+
* Preview feature — per-recipient substitution for batch sends. Currently unavailable; supplying this field returns `422 SMSUnsupportedFeature`.
|
|
2166
2170
|
*/
|
|
2167
2171
|
personalization?: {
|
|
2168
2172
|
[key: string]: unknown;
|
|
2169
2173
|
};
|
|
2170
2174
|
/**
|
|
2171
|
-
* Preview feature — link click tracking. Defaults to `false`. Currently unavailable; setting this to `true` returns `422
|
|
2175
|
+
* Preview feature — link click tracking. Defaults to `false`. Currently unavailable; setting this to `true` returns `422 SMSUnsupportedFeature`.
|
|
2172
2176
|
*/
|
|
2173
2177
|
track_clicks?: boolean;
|
|
2174
2178
|
};
|
|
@@ -2452,7 +2456,7 @@ type EmailAttachment = {
|
|
|
2452
2456
|
*/
|
|
2453
2457
|
content: string;
|
|
2454
2458
|
/**
|
|
2455
|
-
* Preview feature — provide a URL and Bird fetches the attachment for you. Currently unavailable. Use `content` instead. The schema currently requires `content`, so a request with only `path` is rejected with 422 for missing `content`; a request supplying both `content` and `path` is rejected with 422 `
|
|
2459
|
+
* Preview feature — provide a URL and Bird fetches the attachment for you. Currently unavailable. Use `content` instead. The schema currently requires `content`, so a request with only `path` is rejected with 422 for missing `content`; a request supplying both `content` and `path` is rejected with 422 `UnsupportedEmailFeature` until this preview ships. When generally available: HTTPS-only, single redirect followed and re-validated, private IP ranges blocked, request timeout enforced, fetched content counts toward the 20 MB estimated generated message-size cap after encoding and MIME wrapping.
|
|
2456
2460
|
*
|
|
2457
2461
|
*/
|
|
2458
2462
|
path?: string;
|
|
@@ -2574,7 +2578,7 @@ type EmailMessageSendRequest = {
|
|
|
2574
2578
|
*/
|
|
2575
2579
|
category?: "marketing" | "transactional";
|
|
2576
2580
|
/**
|
|
2577
|
-
* Preview feature — threaded replies. Currently unavailable; supplying this field returns `422
|
|
2581
|
+
* Preview feature — threaded replies. Currently unavailable; supplying this field returns `422 UnsupportedEmailFeature`. When generally available, sets In-Reply-To and References headers automatically.
|
|
2578
2582
|
*/
|
|
2579
2583
|
in_reply_to_message_id?: EmailId;
|
|
2580
2584
|
/**
|
|
@@ -2588,11 +2592,11 @@ type EmailMessageSendRequest = {
|
|
|
2588
2592
|
*/
|
|
2589
2593
|
scheduled_at?: string;
|
|
2590
2594
|
/**
|
|
2591
|
-
* Preview feature — contact-targeted sends. Currently unavailable; supplying this field returns `422
|
|
2595
|
+
* Preview feature — contact-targeted sends. Currently unavailable; supplying this field returns `422 UnsupportedEmailFeature`.
|
|
2592
2596
|
*/
|
|
2593
2597
|
contact_id?: string;
|
|
2594
2598
|
/**
|
|
2595
|
-
* Preview feature — topic-gated sends. Currently unavailable; supplying this field returns `422
|
|
2599
|
+
* Preview feature — topic-gated sends. Currently unavailable; supplying this field returns `422 UnsupportedEmailFeature`. When generally available, a non-empty `topic_id` gates delivery on the recipient's opt-in state for that topic — if the recipient is opt_out, the send is silently suppressed and an `email.suppressed` event fires with `reason: topic_opt_out`.
|
|
2596
2600
|
*
|
|
2597
2601
|
*/
|
|
2598
2602
|
topic_id?: string;
|
package/dist/index.mjs
CHANGED
|
@@ -2930,9 +2930,9 @@ var BirdClient = class {
|
|
|
2930
2930
|
this.#headers = {
|
|
2931
2931
|
...opts.defaultHeaders,
|
|
2932
2932
|
Authorization: `Bearer ${opts.apiKey}`,
|
|
2933
|
-
"User-Agent": `bird-sdk-js/0.7.
|
|
2933
|
+
"User-Agent": `bird-sdk-js/0.7.2`,
|
|
2934
2934
|
"Bird-Surface": "sdk-js",
|
|
2935
|
-
"Bird-Version": "0.7.
|
|
2935
|
+
"Bird-Version": "0.7.2"
|
|
2936
2936
|
};
|
|
2937
2937
|
const caller = detectCaller();
|
|
2938
2938
|
if (caller) this.#headers["Bird-Caller"] = caller;
|