@messagebird/sdk 0.51.0 → 0.52.0
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 +12 -12
- package/dist/index.mjs +8 -8
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -6580,7 +6580,7 @@ type Mailbox = {
|
|
|
6580
6580
|
*/
|
|
6581
6581
|
receive_policy: "open" | "replies_only" | "allowlist" | "drop";
|
|
6582
6582
|
/**
|
|
6583
|
-
* Lifecycle state.
|
|
6583
|
+
* Lifecycle state. `active` means the mailbox can send, receive, and expose conversations. `suspended` pauses sending, conversation reads, and events; inbound mail is retained with the `blocked` label until you resume it.
|
|
6584
6584
|
*/
|
|
6585
6585
|
readonly state: "active" | "suspended";
|
|
6586
6586
|
/**
|
|
@@ -6605,7 +6605,7 @@ type Mailbox = {
|
|
|
6605
6605
|
*/
|
|
6606
6606
|
readonly thread_count: number;
|
|
6607
6607
|
/**
|
|
6608
|
-
* Stored bytes across the mailbox's retained messages:
|
|
6608
|
+
* Stored bytes across the mailbox's retained messages: subject, preview, extracted text, and attachment bytes. Message bodies and raw MIME expire after 30 days and do not count. Maintained with each message written or deleted, so the value is current; messages stored before the counter existed are not counted.
|
|
6609
6609
|
*/
|
|
6610
6610
|
readonly size_bytes: number;
|
|
6611
6611
|
/**
|
|
@@ -6622,7 +6622,7 @@ type Mailbox = {
|
|
|
6622
6622
|
/**
|
|
6623
6623
|
* Whether we generated the local part of the address. `false` means a custom handle was chosen at creation. On the shared `inbox.ai` domain a custom handle counts against your plan's custom-handle allowance.
|
|
6624
6624
|
*/
|
|
6625
|
-
readonly local_part_generated
|
|
6625
|
+
readonly local_part_generated: boolean;
|
|
6626
6626
|
/**
|
|
6627
6627
|
* When the mailbox was created.
|
|
6628
6628
|
*/
|
|
@@ -6632,7 +6632,7 @@ type Mailbox = {
|
|
|
6632
6632
|
*/
|
|
6633
6633
|
readonly updated_at: string;
|
|
6634
6634
|
/**
|
|
6635
|
-
* When the mailbox was deleted, or `null` if it is active. A deleted mailbox stops receiving mail immediately but can be restored for 30 days, after which it and
|
|
6635
|
+
* When the mailbox was deleted, or `null` if it is active. A deleted mailbox stops receiving mail immediately but can be restored for 30 days, after which it and any remaining remembered messages are permanently removed.
|
|
6636
6636
|
*/
|
|
6637
6637
|
readonly deleted_at?: string | null;
|
|
6638
6638
|
};
|
|
@@ -6704,7 +6704,7 @@ type MailboxUpdate = {
|
|
|
6704
6704
|
*/
|
|
6705
6705
|
receive_policy?: "open" | "replies_only" | "allowlist" | "drop";
|
|
6706
6706
|
/**
|
|
6707
|
-
* How long the mailbox remembers message metadata, extracted text, and attachments. Message bodies and raw MIME stay available for 30 days regardless of tier. Tiers longer than 30 days require a plan that includes them. Lowering the tier
|
|
6707
|
+
* How long the mailbox remembers message metadata, extracted text, and attachments. Message bodies and raw MIME stay available for 30 days regardless of tier. Tiers longer than 30 days require a plan that includes them. Lowering the tier immediately hides remembered messages older than the new horizon. Deletion waits at least ten minutes and until the background retention update has processed every stored message. The update starts every ten minutes and can take hours for large mailboxes; the next hourly purge deletes eligible messages. A lowering that would affect messages requires `confirm=true`.
|
|
6708
6708
|
*/
|
|
6709
6709
|
retention_tier?: "30d" | "90d" | "1y";
|
|
6710
6710
|
/**
|
|
@@ -7166,7 +7166,7 @@ type EmailThreadMessageReplyRequest = {
|
|
|
7166
7166
|
};
|
|
7167
7167
|
category?: EmailMessageCategory;
|
|
7168
7168
|
/**
|
|
7169
|
-
* File attachments to include with the reply. The send is rejected when the estimated generated message size exceeds 20 MB (bodies plus all attachments after base64 encoding). Keep total raw attachment content at or below 15 MB for reliable headroom. Attachment metadata stays on the message's `attachment_manifest`, and the bytes are downloadable for
|
|
7169
|
+
* File attachments to include with the reply. The send is rejected when the estimated generated message size exceeds 20 MB (bodies plus all attachments after base64 encoding). Keep total raw attachment content at or below 15 MB for reliable headroom. Attachment metadata stays on the message's `attachment_manifest`, and the bytes are downloadable for the mailbox's retention tier.
|
|
7170
7170
|
*
|
|
7171
7171
|
*/
|
|
7172
7172
|
attachments?: Array<EmailAttachment>;
|
|
@@ -7206,7 +7206,7 @@ type EmailMailboxComposeRequest = {
|
|
|
7206
7206
|
*/
|
|
7207
7207
|
reply_to?: Array<EmailAddressInput>;
|
|
7208
7208
|
/**
|
|
7209
|
-
* File attachments. The send is rejected when the estimated generated message size exceeds 20 MB (bodies plus all attachments after base64 encoding). Keep total raw attachment content at or below 15 MB for reliable headroom. Attachment metadata stays on the message's `attachment_manifest`, and the bytes are downloadable for
|
|
7209
|
+
* File attachments. The send is rejected when the estimated generated message size exceeds 20 MB (bodies plus all attachments after base64 encoding). Keep total raw attachment content at or below 15 MB for reliable headroom. Attachment metadata stays on the message's `attachment_manifest`, and the bytes are downloadable for the mailbox's retention tier.
|
|
7210
7210
|
*
|
|
7211
7211
|
*/
|
|
7212
7212
|
attachments?: Array<EmailAttachment>;
|
|
@@ -8031,7 +8031,7 @@ type EventEmailMailboxMessageReceivedData = {
|
|
|
8031
8031
|
*/
|
|
8032
8032
|
truncated_text?: boolean;
|
|
8033
8033
|
/**
|
|
8034
|
-
* Number of attachments on the message. Attachment content remains available
|
|
8034
|
+
* Number of attachments on the message. Attachment content remains available for the mailbox's retention tier.
|
|
8035
8035
|
*/
|
|
8036
8036
|
attachment_count: number;
|
|
8037
8037
|
/**
|
|
@@ -12079,7 +12079,7 @@ type UpdateMailboxData = {
|
|
|
12079
12079
|
};
|
|
12080
12080
|
query?: {
|
|
12081
12081
|
/**
|
|
12082
|
-
* Set to `true` when lowering `retention_tier` would
|
|
12082
|
+
* Set to `true` when lowering `retention_tier` would make remembered messages older than the new cutoff eligible for deletion. The request is rejected without it in that case.
|
|
12083
12083
|
*/
|
|
12084
12084
|
confirm?: boolean;
|
|
12085
12085
|
};
|
|
@@ -13308,7 +13308,7 @@ declare class EmailMailboxesResourceBase extends Resource {
|
|
|
13308
13308
|
*/
|
|
13309
13309
|
get(mailboxId: string, options?: RequestOptions): APIPromise<Mailbox>;
|
|
13310
13310
|
/**
|
|
13311
|
-
* Update a mailbox's display name, reply-to, receive policy, retention tier, IP pool, or metadata. Lowering the retention tier requires `confirm=true` when it would
|
|
13311
|
+
* Update a mailbox's display name, reply-to, receive policy, retention tier, IP pool, or metadata. Lowering the retention tier requires `confirm=true` when it would make remembered messages older than the new cutoff eligible for deletion. Retention tier changes apply in the background, and lowering the tier again before the first change finishes is refused.
|
|
13312
13312
|
*
|
|
13313
13313
|
* @example Change a mailbox's receive policy
|
|
13314
13314
|
* const mailbox = await bird.email.mailboxes.update("mbx_01abc", {
|
|
@@ -13318,14 +13318,14 @@ declare class EmailMailboxesResourceBase extends Resource {
|
|
|
13318
13318
|
*/
|
|
13319
13319
|
update(mailboxId: string, params?: EmailMailboxesUpdateParams, query?: EmailMailboxesUpdateQuery, options?: RequestOptions): APIPromise<Mailbox>;
|
|
13320
13320
|
/**
|
|
13321
|
-
* Delete a mailbox. The address stops receiving immediately and is quarantined. The mailbox
|
|
13321
|
+
* Delete a mailbox. The address stops receiving immediately and is quarantined. The mailbox can be restored for 30 days, while normal message-retention expiry continues. After 30 days, the mailbox and its remaining messages are permanently deleted.
|
|
13322
13322
|
*
|
|
13323
13323
|
* @example Delete a mailbox
|
|
13324
13324
|
* await bird.email.mailboxes.delete("mbx_01abc");
|
|
13325
13325
|
*/
|
|
13326
13326
|
delete(mailboxId: string, options?: RequestOptions): APIPromise<void>;
|
|
13327
13327
|
/**
|
|
13328
|
-
* Restore a mailbox deleted less than 30 days ago: the address starts receiving again and
|
|
13328
|
+
* Restore a mailbox deleted less than 30 days ago: the address starts receiving again and its remaining remembered messages are available. Normal message-retention expiry continues while a mailbox is deleted. Past the restore window the mailbox is permanently deleted and returns `404`. A mailbox that is not deleted returns `409`.
|
|
13329
13329
|
*
|
|
13330
13330
|
* @example Restore a deleted mailbox
|
|
13331
13331
|
* const mailbox = await bird.email.mailboxes.restore("mbx_01abc");
|
package/dist/index.mjs
CHANGED
|
@@ -3671,7 +3671,7 @@ const createMailbox = (options) => (options.client ?? client).post({
|
|
|
3671
3671
|
/**
|
|
3672
3672
|
* Delete a mailbox
|
|
3673
3673
|
*
|
|
3674
|
-
* Deletes a mailbox. The address stops receiving mail immediately and enters quarantine. After 30 days, your workspace can bind the address to a new mailbox; the address remains reserved to your workspace.
|
|
3674
|
+
* Deletes a mailbox. The address stops receiving mail immediately and enters quarantine. After 30 days, your workspace can bind the address to a new mailbox; the address remains reserved to your workspace. You can restore the mailbox for 30 days with `POST /email/mailboxes/{mailbox_id}/restore`. Normal message-retention expiry continues during that period. After 30 days, the mailbox and its remaining messages are permanently deleted.
|
|
3675
3675
|
*
|
|
3676
3676
|
*/
|
|
3677
3677
|
const deleteMailbox = (options) => (options.client ?? client).delete({
|
|
@@ -3707,7 +3707,7 @@ const getMailbox = (options) => (options.client ?? client).get({
|
|
|
3707
3707
|
/**
|
|
3708
3708
|
* Update a mailbox
|
|
3709
3709
|
*
|
|
3710
|
-
* Updates a mailbox. The address and domain are immutable. Lowering the retention tier
|
|
3710
|
+
* Updates a mailbox. The address and domain are immutable. Lowering the retention tier makes remembered messages older than the new cutoff eligible for deletion. If any exist, the request requires `confirm=true`. A tier change is applied to the mailbox's stored messages in the background; lowering the tier again while that is still being applied is refused with `E17050`. You can still raise it to a tier your plan permits.
|
|
3711
3711
|
*
|
|
3712
3712
|
*/
|
|
3713
3713
|
const updateMailbox = (options) => (options.client ?? client).patch({
|
|
@@ -3729,7 +3729,7 @@ const updateMailbox = (options) => (options.client ?? client).patch({
|
|
|
3729
3729
|
/**
|
|
3730
3730
|
* Restore a deleted mailbox
|
|
3731
3731
|
*
|
|
3732
|
-
* Restores a mailbox deleted less than 30 days ago. The address is bound back to the mailbox and starts receiving again
|
|
3732
|
+
* Restores a mailbox deleted less than 30 days ago. The address is bound back to the mailbox and starts receiving again. Remaining remembered messages and conversations become available again; normal message-retention expiry continues while a mailbox is deleted. Once the 30-day window has passed, the mailbox and any remaining messages are permanently deleted and can no longer be restored (`404`). Restoring a mailbox that is not deleted returns a conflict, as does an address that is no longer available.
|
|
3733
3733
|
*
|
|
3734
3734
|
*/
|
|
3735
3735
|
const restoreMailbox = (options) => (options.client ?? client).post({
|
|
@@ -4927,7 +4927,7 @@ var EmailMailboxesResourceBase = class extends Resource {
|
|
|
4927
4927
|
}));
|
|
4928
4928
|
}
|
|
4929
4929
|
/**
|
|
4930
|
-
* Update a mailbox's display name, reply-to, receive policy, retention tier, IP pool, or metadata. Lowering the retention tier requires `confirm=true` when it would
|
|
4930
|
+
* Update a mailbox's display name, reply-to, receive policy, retention tier, IP pool, or metadata. Lowering the retention tier requires `confirm=true` when it would make remembered messages older than the new cutoff eligible for deletion. Retention tier changes apply in the background, and lowering the tier again before the first change finishes is refused.
|
|
4931
4931
|
*
|
|
4932
4932
|
* @example Change a mailbox's receive policy
|
|
4933
4933
|
* const mailbox = await bird.email.mailboxes.update("mbx_01abc", {
|
|
@@ -4946,7 +4946,7 @@ var EmailMailboxesResourceBase = class extends Resource {
|
|
|
4946
4946
|
}));
|
|
4947
4947
|
}
|
|
4948
4948
|
/**
|
|
4949
|
-
* Delete a mailbox. The address stops receiving immediately and is quarantined. The mailbox
|
|
4949
|
+
* Delete a mailbox. The address stops receiving immediately and is quarantined. The mailbox can be restored for 30 days, while normal message-retention expiry continues. After 30 days, the mailbox and its remaining messages are permanently deleted.
|
|
4950
4950
|
*
|
|
4951
4951
|
* @example Delete a mailbox
|
|
4952
4952
|
* await bird.email.mailboxes.delete("mbx_01abc");
|
|
@@ -4960,7 +4960,7 @@ var EmailMailboxesResourceBase = class extends Resource {
|
|
|
4960
4960
|
}));
|
|
4961
4961
|
}
|
|
4962
4962
|
/**
|
|
4963
|
-
* Restore a mailbox deleted less than 30 days ago: the address starts receiving again and
|
|
4963
|
+
* Restore a mailbox deleted less than 30 days ago: the address starts receiving again and its remaining remembered messages are available. Normal message-retention expiry continues while a mailbox is deleted. Past the restore window the mailbox is permanently deleted and returns `404`. A mailbox that is not deleted returns `409`.
|
|
4964
4964
|
*
|
|
4965
4965
|
* @example Restore a deleted mailbox
|
|
4966
4966
|
* const mailbox = await bird.email.mailboxes.restore("mbx_01abc");
|
|
@@ -7939,9 +7939,9 @@ var BirdClient = class {
|
|
|
7939
7939
|
this.#headers = {
|
|
7940
7940
|
...opts.defaultHeaders,
|
|
7941
7941
|
...opts.apiKey ? { Authorization: `Bearer ${opts.apiKey}` } : {},
|
|
7942
|
-
"User-Agent": `bird-sdk-js/0.
|
|
7942
|
+
"User-Agent": `bird-sdk-js/0.52.0`,
|
|
7943
7943
|
"Bird-Surface": "sdk-js",
|
|
7944
|
-
"Bird-Version": "0.
|
|
7944
|
+
"Bird-Version": "0.52.0"
|
|
7945
7945
|
};
|
|
7946
7946
|
const caller = detectCaller();
|
|
7947
7947
|
if (caller) this.#headers["Bird-Caller"] = caller;
|