@messagebird/sdk 0.43.0 → 0.45.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 +15 -11
- package/dist/index.mjs +4 -4
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -5853,7 +5853,7 @@ type MailboxOwner = {
|
|
|
5853
5853
|
readonly id: WorkspaceId;
|
|
5854
5854
|
};
|
|
5855
5855
|
/**
|
|
5856
|
-
* A durable mailbox identity for an agent. A mailbox owns an email address, groups mail into threads, applies receive policy, and remembers message metadata
|
|
5856
|
+
* A durable mailbox identity for an agent. A mailbox owns an email address, groups mail into threads, applies receive policy, and remembers message metadata, extracted text, and attachments for its retention tier. The body and raw MIME of each message remain available for 30 days.
|
|
5857
5857
|
*
|
|
5858
5858
|
*/
|
|
5859
5859
|
type Mailbox = {
|
|
@@ -5900,7 +5900,7 @@ type Mailbox = {
|
|
|
5900
5900
|
*/
|
|
5901
5901
|
readonly inbound_address_id: InboundAddressId;
|
|
5902
5902
|
/**
|
|
5903
|
-
* How long the mailbox remembers message metadata
|
|
5903
|
+
* How long the mailbox remembers message metadata, extracted text, and attachments. Message bodies and raw MIME stay available for 30 days regardless of tier.
|
|
5904
5904
|
*/
|
|
5905
5905
|
retention_tier: "30d" | "90d" | "1y";
|
|
5906
5906
|
/**
|
|
@@ -5911,6 +5911,10 @@ type Mailbox = {
|
|
|
5911
5911
|
* Number of retained threads.
|
|
5912
5912
|
*/
|
|
5913
5913
|
readonly thread_count: number;
|
|
5914
|
+
/**
|
|
5915
|
+
* Stored bytes across the mailbox's retained messages: the metadata and extracted text kept for the retention tier plus 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.
|
|
5916
|
+
*/
|
|
5917
|
+
readonly size_bytes: number;
|
|
5914
5918
|
/**
|
|
5915
5919
|
* Number of threads with unread messages in this mailbox, excluding trash. `null` on create/update responses.
|
|
5916
5920
|
*
|
|
@@ -5972,9 +5976,9 @@ type MailboxCreate = {
|
|
|
5972
5976
|
*/
|
|
5973
5977
|
receive_policy?: "open" | "replies_only" | "allowlist" | "drop";
|
|
5974
5978
|
/**
|
|
5975
|
-
* How long the mailbox remembers message metadata
|
|
5979
|
+
* 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.
|
|
5976
5980
|
*/
|
|
5977
|
-
retention_tier?: "30d";
|
|
5981
|
+
retention_tier?: "30d" | "90d" | "1y";
|
|
5978
5982
|
/**
|
|
5979
5983
|
* Your own key/value data to attach to the mailbox. Up to 2 KB. Keys starting with `__bird` are reserved.
|
|
5980
5984
|
*/
|
|
@@ -6007,9 +6011,9 @@ type MailboxUpdate = {
|
|
|
6007
6011
|
*/
|
|
6008
6012
|
receive_policy?: "open" | "replies_only" | "allowlist" | "drop";
|
|
6009
6013
|
/**
|
|
6010
|
-
* How long the mailbox remembers message metadata
|
|
6014
|
+
* 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 deletes remembered messages older than the new horizon, and requires `confirm=true` when that would happen.
|
|
6011
6015
|
*/
|
|
6012
|
-
retention_tier?: "30d";
|
|
6016
|
+
retention_tier?: "30d" | "90d" | "1y";
|
|
6013
6017
|
/**
|
|
6014
6018
|
* Replaces the mailbox's key/value data. Up to 2 KB. Keys starting with `__bird` are reserved.
|
|
6015
6019
|
*/
|
|
@@ -6245,7 +6249,7 @@ type EmailThreadMessageRecipient = {
|
|
|
6245
6249
|
readonly status: "delivered" | "failed";
|
|
6246
6250
|
};
|
|
6247
6251
|
/**
|
|
6248
|
-
* Attachment metadata on a conversation message.
|
|
6252
|
+
* Attachment metadata on a conversation message. Both the metadata and the attachment bytes stay available for the mailbox's retention tier.
|
|
6249
6253
|
*
|
|
6250
6254
|
*/
|
|
6251
6255
|
type EmailThreadMessageAttachment = {
|
|
@@ -6276,12 +6280,12 @@ type EmailThreadMessageSource = {
|
|
|
6276
6280
|
*/
|
|
6277
6281
|
readonly resource: string;
|
|
6278
6282
|
/**
|
|
6279
|
-
* When the log entry (and the message's
|
|
6283
|
+
* When the log entry (and the message's body and raw MIME) expires.
|
|
6280
6284
|
*/
|
|
6281
6285
|
readonly available_until: string;
|
|
6282
6286
|
};
|
|
6283
6287
|
/**
|
|
6284
|
-
* A message in a mailbox conversation, either direction. Message metadata
|
|
6288
|
+
* A message in a mailbox conversation, either direction. Message metadata, extracted text, and attachment bytes stay readable for the mailbox's retention tier. The body and raw MIME are available through the body and raw endpoints for 30 days after the message occurred.
|
|
6285
6289
|
*
|
|
6286
6290
|
*/
|
|
6287
6291
|
type EmailThreadMessage = {
|
|
@@ -6400,7 +6404,7 @@ type EmailThreadMessage = {
|
|
|
6400
6404
|
*/
|
|
6401
6405
|
readonly attachment_count: number;
|
|
6402
6406
|
/**
|
|
6403
|
-
* Attachment metadata (filename, content type, size).
|
|
6407
|
+
* Attachment metadata (filename, content type, size). Both the metadata and the attachment bytes stay available for the mailbox's retention tier.
|
|
6404
6408
|
*
|
|
6405
6409
|
*/
|
|
6406
6410
|
readonly attachment_manifest: Array<EmailThreadMessageAttachment>;
|
|
@@ -12702,7 +12706,7 @@ declare class EmailThreadsMessagesResource extends Resource {
|
|
|
12702
12706
|
*/
|
|
12703
12707
|
reply(threadId: string, messageId: string, params?: EmailThreadsMessagesReplyParams, options?: RequestOptions): APIPromise<EmailThreadMessage>;
|
|
12704
12708
|
/**
|
|
12705
|
-
* List the attachments on a conversation message. Bytes are downloadable for
|
|
12709
|
+
* List the attachments on a conversation message. Bytes are downloadable for the mailbox's retention tier, and the metadata stays readable afterward on the message's attachment_manifest.
|
|
12706
12710
|
*
|
|
12707
12711
|
* @example List a message's attachments
|
|
12708
12712
|
* const atts = await bird.email.threads.messages.attachments("thr_01abc", "rem_01xyz");
|
package/dist/index.mjs
CHANGED
|
@@ -3923,7 +3923,7 @@ const getEmailThreadMessageBody = (options) => (options.client ?? client).get({
|
|
|
3923
3923
|
/**
|
|
3924
3924
|
* List a thread message's attachments
|
|
3925
3925
|
*
|
|
3926
|
-
* Returns the attachments on a message in a conversation. Attachment bytes are downloadable for
|
|
3926
|
+
* Returns the attachments on a message in a conversation. Attachment bytes are downloadable for the mailbox's retention tier after the message occurred. Later requests return `410 Gone`, while the attachment metadata stays readable on the message's `attachment_manifest`.
|
|
3927
3927
|
*
|
|
3928
3928
|
*/
|
|
3929
3929
|
const listEmailThreadMessageAttachments = (options) => (options.client ?? client).get({
|
|
@@ -5216,7 +5216,7 @@ var EmailThreadsMessagesResource = class extends Resource {
|
|
|
5216
5216
|
}));
|
|
5217
5217
|
}
|
|
5218
5218
|
/**
|
|
5219
|
-
* List the attachments on a conversation message. Bytes are downloadable for
|
|
5219
|
+
* List the attachments on a conversation message. Bytes are downloadable for the mailbox's retention tier, and the metadata stays readable afterward on the message's attachment_manifest.
|
|
5220
5220
|
*
|
|
5221
5221
|
* @example List a message's attachments
|
|
5222
5222
|
* const atts = await bird.email.threads.messages.attachments("thr_01abc", "rem_01xyz");
|
|
@@ -7765,9 +7765,9 @@ var BirdClient = class {
|
|
|
7765
7765
|
this.#headers = {
|
|
7766
7766
|
...opts.defaultHeaders,
|
|
7767
7767
|
...opts.apiKey ? { Authorization: `Bearer ${opts.apiKey}` } : {},
|
|
7768
|
-
"User-Agent": `bird-sdk-js/0.
|
|
7768
|
+
"User-Agent": `bird-sdk-js/0.45.0`,
|
|
7769
7769
|
"Bird-Surface": "sdk-js",
|
|
7770
|
-
"Bird-Version": "0.
|
|
7770
|
+
"Bird-Version": "0.45.0"
|
|
7771
7771
|
};
|
|
7772
7772
|
const caller = detectCaller();
|
|
7773
7773
|
if (caller) this.#headers["Bird-Caller"] = caller;
|