resend 6.28.1-preview-inboxes.0 → 6.28.1-preview-inboxes.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.cjs +10 -4
- package/dist/index.d.cts +116 -17
- package/dist/index.d.mts +116 -17
- package/dist/index.mjs +10 -4
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -53,7 +53,7 @@ const INBOX_LABEL_COLORS = [
|
|
|
53
53
|
];
|
|
54
54
|
//#endregion
|
|
55
55
|
//#region package.json
|
|
56
|
-
var version = "6.28.1-preview-inboxes.
|
|
56
|
+
var version = "6.28.1-preview-inboxes.2";
|
|
57
57
|
//#endregion
|
|
58
58
|
//#region src/common/utils/build-pagination-query.ts
|
|
59
59
|
function buildPaginationUrl(base, options) {
|
|
@@ -998,7 +998,9 @@ function buildInboxCursorUrl(base, options = {}) {
|
|
|
998
998
|
if (options.folder !== void 0) searchParams.set("folder", options.folder);
|
|
999
999
|
if (options.query !== void 0) searchParams.set("query", options.query);
|
|
1000
1000
|
if (options.from !== void 0) searchParams.set("from", options.from);
|
|
1001
|
-
if (options.
|
|
1001
|
+
if (options.limit !== void 0) searchParams.set("limit", String(options.limit));
|
|
1002
|
+
if (options.after !== void 0) searchParams.set("after", options.after);
|
|
1003
|
+
if (options.before !== void 0) searchParams.set("before", options.before);
|
|
1002
1004
|
const labels = options.label === void 0 ? [] : Array.isArray(options.label) ? options.label : [options.label];
|
|
1003
1005
|
for (const label of labels) searchParams.append("label", label);
|
|
1004
1006
|
const queryString = searchParams.toString();
|
|
@@ -1011,8 +1013,12 @@ var InboxDrafts = class {
|
|
|
1011
1013
|
this.resend = resend;
|
|
1012
1014
|
}
|
|
1013
1015
|
async list(options) {
|
|
1014
|
-
const { inboxId,
|
|
1015
|
-
const url = buildInboxCursorUrl(`/inboxes/${inboxId}/drafts`, {
|
|
1016
|
+
const { inboxId, limit, after, before } = options;
|
|
1017
|
+
const url = buildInboxCursorUrl(`/inboxes/${inboxId}/drafts`, {
|
|
1018
|
+
limit,
|
|
1019
|
+
after,
|
|
1020
|
+
before
|
|
1021
|
+
});
|
|
1016
1022
|
return this.resend.get(url);
|
|
1017
1023
|
}
|
|
1018
1024
|
async create(payload, options = {}) {
|
package/dist/index.d.cts
CHANGED
|
@@ -1822,14 +1822,12 @@ type GetInboxDraftResponseSuccess = InboxDraft;
|
|
|
1822
1822
|
type GetInboxDraftResponse = Response<GetInboxDraftResponseSuccess>;
|
|
1823
1823
|
//#endregion
|
|
1824
1824
|
//#region src/inboxes/drafts/interfaces/list-inbox-drafts.interface.d.ts
|
|
1825
|
-
|
|
1825
|
+
type ListInboxDraftsOptions = {
|
|
1826
1826
|
inboxId: string;
|
|
1827
|
-
|
|
1828
|
-
}
|
|
1827
|
+
} & PaginationOptions;
|
|
1829
1828
|
interface ListInboxDraftsResponseSuccess {
|
|
1830
1829
|
object: 'list';
|
|
1831
1830
|
has_more: boolean;
|
|
1832
|
-
next_cursor: string | null;
|
|
1833
1831
|
data: InboxDraftListItem[];
|
|
1834
1832
|
}
|
|
1835
1833
|
type ListInboxDraftsResponse = Response<ListInboxDraftsResponseSuccess>;
|
|
@@ -1921,7 +1919,6 @@ interface ListInboxLabelsOptions {
|
|
|
1921
1919
|
}
|
|
1922
1920
|
interface ListInboxLabelsResponseSuccess {
|
|
1923
1921
|
object: 'list';
|
|
1924
|
-
has_more: boolean;
|
|
1925
1922
|
data: InboxLabel[];
|
|
1926
1923
|
}
|
|
1927
1924
|
type ListInboxLabelsResponse = Response<ListInboxLabelsResponseSuccess>;
|
|
@@ -2020,6 +2017,9 @@ interface ForwardInboxThreadEmailResponseSuccess {
|
|
|
2020
2017
|
to: string[];
|
|
2021
2018
|
cc: string[];
|
|
2022
2019
|
bcc: string[];
|
|
2020
|
+
reply_to: string[];
|
|
2021
|
+
subject: string | null;
|
|
2022
|
+
message_id: string | null;
|
|
2023
2023
|
html: string | null;
|
|
2024
2024
|
text: string | null;
|
|
2025
2025
|
attachments: InboxMessageAttachment[];
|
|
@@ -2034,10 +2034,7 @@ interface GetInboxThreadOptions {
|
|
|
2034
2034
|
threadId: string;
|
|
2035
2035
|
}
|
|
2036
2036
|
interface GetInboxThreadResponseSuccess extends InboxThreadSummary {
|
|
2037
|
-
messages:
|
|
2038
|
-
has_more: boolean;
|
|
2039
|
-
data: InboxMessage[];
|
|
2040
|
-
};
|
|
2037
|
+
messages: InboxMessage[];
|
|
2041
2038
|
}
|
|
2042
2039
|
type GetInboxThreadResponse = Response<GetInboxThreadResponseSuccess>;
|
|
2043
2040
|
//#endregion
|
|
@@ -2051,18 +2048,16 @@ type GetInboxThreadEmailResponseSuccess = InboxMessage;
|
|
|
2051
2048
|
type GetInboxThreadEmailResponse = Response<GetInboxThreadEmailResponseSuccess>;
|
|
2052
2049
|
//#endregion
|
|
2053
2050
|
//#region src/inboxes/threads/interfaces/list-inbox-threads.interface.d.ts
|
|
2054
|
-
|
|
2051
|
+
type ListInboxThreadsOptions = {
|
|
2055
2052
|
inboxId: string;
|
|
2056
2053
|
folder?: InboxMessageFolder;
|
|
2057
2054
|
query?: string;
|
|
2058
2055
|
from?: string;
|
|
2059
2056
|
label?: string | string[];
|
|
2060
|
-
|
|
2061
|
-
}
|
|
2057
|
+
} & PaginationOptions;
|
|
2062
2058
|
interface ListInboxThreadsResponseSuccess {
|
|
2063
2059
|
object: 'list';
|
|
2064
2060
|
has_more: boolean;
|
|
2065
|
-
next_cursor: string | null;
|
|
2066
2061
|
data: InboxThread[];
|
|
2067
2062
|
}
|
|
2068
2063
|
type ListInboxThreadsResponse = Response<ListInboxThreadsResponseSuccess>;
|
|
@@ -2106,7 +2101,7 @@ type UpdateInboxThreadOptions = {
|
|
|
2106
2101
|
labelId?: string;
|
|
2107
2102
|
}>;
|
|
2108
2103
|
interface UpdateInboxThreadResponseSuccess {
|
|
2109
|
-
object: '
|
|
2104
|
+
object: 'inbox_thread';
|
|
2110
2105
|
id: string;
|
|
2111
2106
|
subject: string | null;
|
|
2112
2107
|
folder: InboxMessageFolder;
|
|
@@ -2823,7 +2818,7 @@ declare class Topics {
|
|
|
2823
2818
|
}
|
|
2824
2819
|
//#endregion
|
|
2825
2820
|
//#region src/webhooks/interfaces/webhook-event.interface.d.ts
|
|
2826
|
-
type WebhookEvent = 'email.sent' | 'email.scheduled' | 'email.delivered' | 'email.delivery_delayed' | 'email.complained' | 'email.bounced' | 'email.opened' | 'email.clicked' | 'email.received' | 'email.failed' | 'email.suppressed' | 'contact.created' | 'contact.updated' | 'contact.deleted' | 'domain.created' | 'domain.updated' | 'domain.deleted' | 'suppression.added' | 'suppression.removed';
|
|
2821
|
+
type WebhookEvent = 'email.sent' | 'email.scheduled' | 'email.delivered' | 'email.delivery_delayed' | 'email.complained' | 'email.bounced' | 'email.opened' | 'email.clicked' | 'email.received' | 'email.failed' | 'email.suppressed' | 'contact.created' | 'contact.updated' | 'contact.deleted' | 'domain.created' | 'domain.updated' | 'domain.deleted' | 'suppression.added' | 'suppression.removed' | 'inbox.created' | 'inbox.updated' | 'inbox.deleted' | 'inbox.thread.created' | 'inbox.thread.folder.updated' | 'inbox.thread.assigned' | 'inbox.thread.unassigned' | 'inbox.thread.labels.updated' | 'inbox.email.received' | 'inbox.email.sent' | 'inbox.draft.created' | 'inbox.draft.updated' | 'inbox.draft.sent' | 'inbox.draft.deleted';
|
|
2827
2822
|
interface BaseEmailEventData {
|
|
2828
2823
|
broadcast_id?: string;
|
|
2829
2824
|
created_at: string;
|
|
@@ -2907,6 +2902,28 @@ interface SuppressionEventData {
|
|
|
2907
2902
|
source_id: string | null;
|
|
2908
2903
|
created_at: string;
|
|
2909
2904
|
}
|
|
2905
|
+
interface InboxEventInbox {
|
|
2906
|
+
object: 'inbox';
|
|
2907
|
+
id: string;
|
|
2908
|
+
name: string;
|
|
2909
|
+
email_address: string;
|
|
2910
|
+
domain_id: string;
|
|
2911
|
+
receiving_address: string | null;
|
|
2912
|
+
friendly_name: string | null;
|
|
2913
|
+
unread: number;
|
|
2914
|
+
created_at: string;
|
|
2915
|
+
}
|
|
2916
|
+
interface InboxEventData {
|
|
2917
|
+
source: 'api' | 'dashboard' | 'agent' | 'system';
|
|
2918
|
+
inbox_id: string;
|
|
2919
|
+
thread_id?: string;
|
|
2920
|
+
email_id?: string;
|
|
2921
|
+
draft_id?: string;
|
|
2922
|
+
thread?: InboxThreadSummary;
|
|
2923
|
+
email?: Omit<InboxMessage, 'html' | 'text'>;
|
|
2924
|
+
draft?: Omit<InboxDraft, 'html' | 'text'>;
|
|
2925
|
+
inbox?: InboxEventInbox;
|
|
2926
|
+
}
|
|
2910
2927
|
interface EmailSentEvent {
|
|
2911
2928
|
type: 'email.sent';
|
|
2912
2929
|
created_at: string;
|
|
@@ -3010,7 +3027,89 @@ interface SuppressionRemovedEvent {
|
|
|
3010
3027
|
created_at: string;
|
|
3011
3028
|
data: SuppressionEventData;
|
|
3012
3029
|
}
|
|
3013
|
-
|
|
3030
|
+
interface InboxCreatedEvent {
|
|
3031
|
+
type: 'inbox.created';
|
|
3032
|
+
created_at: string;
|
|
3033
|
+
data: InboxEventData;
|
|
3034
|
+
}
|
|
3035
|
+
interface InboxUpdatedEvent {
|
|
3036
|
+
type: 'inbox.updated';
|
|
3037
|
+
created_at: string;
|
|
3038
|
+
data: InboxEventData;
|
|
3039
|
+
}
|
|
3040
|
+
interface InboxDeletedEvent {
|
|
3041
|
+
type: 'inbox.deleted';
|
|
3042
|
+
created_at: string;
|
|
3043
|
+
data: InboxEventData;
|
|
3044
|
+
}
|
|
3045
|
+
interface InboxThreadCreatedEvent {
|
|
3046
|
+
type: 'inbox.thread.created';
|
|
3047
|
+
created_at: string;
|
|
3048
|
+
data: InboxEventData;
|
|
3049
|
+
}
|
|
3050
|
+
interface InboxThreadFolderUpdatedEvent {
|
|
3051
|
+
type: 'inbox.thread.folder.updated';
|
|
3052
|
+
created_at: string;
|
|
3053
|
+
data: InboxEventData & {
|
|
3054
|
+
from: InboxMessageFolder;
|
|
3055
|
+
to: InboxMessageFolder;
|
|
3056
|
+
};
|
|
3057
|
+
}
|
|
3058
|
+
interface InboxThreadAssignedEvent {
|
|
3059
|
+
type: 'inbox.thread.assigned';
|
|
3060
|
+
created_at: string;
|
|
3061
|
+
data: InboxEventData & {
|
|
3062
|
+
assignee_email: string | null;
|
|
3063
|
+
assigned_by_email: string | null;
|
|
3064
|
+
previous_assignee_email: string | null;
|
|
3065
|
+
};
|
|
3066
|
+
}
|
|
3067
|
+
interface InboxThreadUnassignedEvent {
|
|
3068
|
+
type: 'inbox.thread.unassigned';
|
|
3069
|
+
created_at: string;
|
|
3070
|
+
data: InboxEventData & {
|
|
3071
|
+
previous_assignee_email: string | null;
|
|
3072
|
+
};
|
|
3073
|
+
}
|
|
3074
|
+
interface InboxThreadLabelsUpdatedEvent {
|
|
3075
|
+
type: 'inbox.thread.labels.updated';
|
|
3076
|
+
created_at: string;
|
|
3077
|
+
data: InboxEventData & {
|
|
3078
|
+
added: InboxThreadLabel[];
|
|
3079
|
+
removed: InboxThreadLabel[];
|
|
3080
|
+
};
|
|
3081
|
+
}
|
|
3082
|
+
interface InboxEmailReceivedEvent {
|
|
3083
|
+
type: 'inbox.email.received';
|
|
3084
|
+
created_at: string;
|
|
3085
|
+
data: InboxEventData;
|
|
3086
|
+
}
|
|
3087
|
+
interface InboxEmailSentEvent {
|
|
3088
|
+
type: 'inbox.email.sent';
|
|
3089
|
+
created_at: string;
|
|
3090
|
+
data: InboxEventData;
|
|
3091
|
+
}
|
|
3092
|
+
interface InboxDraftCreatedEvent {
|
|
3093
|
+
type: 'inbox.draft.created';
|
|
3094
|
+
created_at: string;
|
|
3095
|
+
data: InboxEventData;
|
|
3096
|
+
}
|
|
3097
|
+
interface InboxDraftUpdatedEvent {
|
|
3098
|
+
type: 'inbox.draft.updated';
|
|
3099
|
+
created_at: string;
|
|
3100
|
+
data: InboxEventData;
|
|
3101
|
+
}
|
|
3102
|
+
interface InboxDraftSentEvent {
|
|
3103
|
+
type: 'inbox.draft.sent';
|
|
3104
|
+
created_at: string;
|
|
3105
|
+
data: InboxEventData;
|
|
3106
|
+
}
|
|
3107
|
+
interface InboxDraftDeletedEvent {
|
|
3108
|
+
type: 'inbox.draft.deleted';
|
|
3109
|
+
created_at: string;
|
|
3110
|
+
data: InboxEventData;
|
|
3111
|
+
}
|
|
3112
|
+
type WebhookEventPayload = EmailSentEvent | EmailScheduledEvent | EmailDeliveredEvent | EmailDeliveryDelayedEvent | EmailComplainedEvent | EmailBouncedEvent | EmailOpenedEvent | EmailClickedEvent | EmailReceivedEvent | EmailFailedEvent | EmailSuppressedEvent | ContactCreatedEvent | ContactUpdatedEvent | ContactDeletedEvent | DomainCreatedEvent | DomainUpdatedEvent | DomainDeletedEvent | SuppressionAddedEvent | SuppressionRemovedEvent | InboxCreatedEvent | InboxUpdatedEvent | InboxDeletedEvent | InboxThreadCreatedEvent | InboxThreadFolderUpdatedEvent | InboxThreadAssignedEvent | InboxThreadUnassignedEvent | InboxThreadLabelsUpdatedEvent | InboxEmailReceivedEvent | InboxEmailSentEvent | InboxDraftCreatedEvent | InboxDraftUpdatedEvent | InboxDraftSentEvent | InboxDraftDeletedEvent;
|
|
3014
3113
|
//#endregion
|
|
3015
3114
|
//#region src/webhooks/interfaces/list-webhook-events.interface.d.ts
|
|
3016
3115
|
type WebhookEventLogStatus = 'success' | 'pending' | 'failed' | 'attempting';
|
|
@@ -3229,4 +3328,4 @@ export declare class Resend {
|
|
|
3229
3328
|
delete<T>(path: string, query?: unknown, options?: DeleteOptions): Promise<Response<T>>;
|
|
3230
3329
|
}
|
|
3231
3330
|
//#endregion
|
|
3232
|
-
export type { ContactCreatedEvent, ContactDeletedEvent, ContactUpdatedEvent, CreateInboxDraftOptions, CreateInboxDraftRequestOptions, CreateInboxDraftResponse, CreateInboxDraftResponseSuccess, CreateInboxLabelOptions, CreateInboxLabelRequestOptions, CreateInboxLabelResponse, CreateInboxLabelResponseSuccess, CreateInboxOptions, CreateInboxRequestOptions, CreateInboxResponse, CreateInboxResponseSuccess, CreateWebhookOptions, CreateWebhookRequestOptions, CreateWebhookResponse, CreateWebhookResponseSuccess, DomainCreatedEvent, DomainDeletedEvent, DomainUpdatedEvent, EmailBouncedEvent, EmailClickedEvent, EmailComplainedEvent, EmailDeliveredEvent, EmailDeliveryDelayedEvent, EmailFailedEvent, EmailOpenedEvent, EmailReceivedEvent, EmailScheduledEvent, EmailSentEvent, EmailSuppressedEvent, ErrorResponse, ForwardInboxThreadEmailOptions, ForwardInboxThreadEmailRequestOptions, ForwardInboxThreadEmailResponse, ForwardInboxThreadEmailResponseSuccess, GetAttachmentOptions, GetAttachmentResponse, GetAttachmentResponseSuccess, GetInboxDraftOptions, GetInboxDraftResponse, GetInboxDraftResponseSuccess, GetInboxResponse, GetInboxResponseSuccess, GetInboxThreadEmailOptions, GetInboxThreadEmailResponse, GetInboxThreadEmailResponseSuccess, GetInboxThreadOptions, GetInboxThreadResponse, GetInboxThreadResponseSuccess, GetWebhookEventOptions, GetWebhookEventResponse, GetWebhookEventResponseSuccess, GetWebhookResponse, GetWebhookResponseSuccess, Inbox, InboxDraft, InboxDraftListItem, InboxDraftType, InboxLabel, InboxLabelColor, InboxMessage, InboxMessageAttachment, InboxMessageFolder, InboxThread, InboxThreadLabel, InboxThreadSummary, ListAttachmentsOptions, ListAttachmentsResponse, ListAttachmentsResponseSuccess, ListInboxDraftsOptions, ListInboxDraftsResponse, ListInboxDraftsResponseSuccess, ListInboxLabelsOptions, ListInboxLabelsResponse, ListInboxLabelsResponseSuccess, ListInboxThreadsOptions, ListInboxThreadsResponse, ListInboxThreadsResponseSuccess, ListInboxesOptions, ListInboxesResponse, ListInboxesResponseSuccess, ListOAuthGrantsOptions, ListOAuthGrantsResponse, ListOAuthGrantsResponseSuccess, ListWebhookEventAttemptsOptions, ListWebhookEventAttemptsResponse, ListWebhookEventAttemptsResponseSuccess, ListWebhookEventsOptions, ListWebhookEventsResponse, ListWebhookEventsResponseSuccess, ListWebhooksOptions, ListWebhooksResponse, ListWebhooksResponseSuccess, MoveThreadFolder, OAuthGrant, RemoveInboxDraftOptions, RemoveInboxDraftResponse, RemoveInboxDraftResponseSuccess, RemoveInboxLabelOptions, RemoveInboxLabelResponse, RemoveInboxLabelResponseSuccess, RemoveInboxResponse, RemoveInboxResponseSuccess, RemoveInboxThreadOptions, RemoveInboxThreadResponse, RemoveInboxThreadResponseSuccess, RemoveWebhookResponse, RemoveWebhookResponseSuccess, ReplayWebhookEventOptions, ReplayWebhookEventResponse, ReplayWebhookEventResponseSuccess, ReplyInboxThreadEmailOptions, ReplyInboxThreadEmailRequestOptions, ReplyInboxThreadEmailResponse, ReplyInboxThreadEmailResponseSuccess, ResendOptions, Response, RevokeOAuthGrantResponse, RevokeOAuthGrantResponseSuccess, RotateWebhookSigningSecretResponse, RotateWebhookSigningSecretResponseSuccess, SendInboxDraftOptions, SendInboxDraftRequestOptions, SendInboxDraftResponse, SendInboxDraftResponseSuccess, SuppressionAddedEvent, SuppressionRemovedEvent, UpdateInboxDraftOptions, UpdateInboxDraftResponse, UpdateInboxDraftResponseSuccess, UpdateInboxLabelOptions, UpdateInboxLabelResponse, UpdateInboxLabelResponseSuccess, UpdateInboxOptions, UpdateInboxResponse, UpdateInboxResponseSuccess, UpdateInboxThreadOptions, UpdateInboxThreadResponse, UpdateInboxThreadResponseSuccess, UpdateWebhookOptions, UpdateWebhookResponse, UpdateWebhookResponseSuccess, Webhook, WebhookEvent, WebhookEventAttempt, WebhookEventLog, WebhookEventLogStatus, WebhookEventPayload };
|
|
3331
|
+
export type { ContactCreatedEvent, ContactDeletedEvent, ContactUpdatedEvent, CreateInboxDraftOptions, CreateInboxDraftRequestOptions, CreateInboxDraftResponse, CreateInboxDraftResponseSuccess, CreateInboxLabelOptions, CreateInboxLabelRequestOptions, CreateInboxLabelResponse, CreateInboxLabelResponseSuccess, CreateInboxOptions, CreateInboxRequestOptions, CreateInboxResponse, CreateInboxResponseSuccess, CreateWebhookOptions, CreateWebhookRequestOptions, CreateWebhookResponse, CreateWebhookResponseSuccess, DomainCreatedEvent, DomainDeletedEvent, DomainUpdatedEvent, EmailBouncedEvent, EmailClickedEvent, EmailComplainedEvent, EmailDeliveredEvent, EmailDeliveryDelayedEvent, EmailFailedEvent, EmailOpenedEvent, EmailReceivedEvent, EmailScheduledEvent, EmailSentEvent, EmailSuppressedEvent, ErrorResponse, ForwardInboxThreadEmailOptions, ForwardInboxThreadEmailRequestOptions, ForwardInboxThreadEmailResponse, ForwardInboxThreadEmailResponseSuccess, GetAttachmentOptions, GetAttachmentResponse, GetAttachmentResponseSuccess, GetInboxDraftOptions, GetInboxDraftResponse, GetInboxDraftResponseSuccess, GetInboxResponse, GetInboxResponseSuccess, GetInboxThreadEmailOptions, GetInboxThreadEmailResponse, GetInboxThreadEmailResponseSuccess, GetInboxThreadOptions, GetInboxThreadResponse, GetInboxThreadResponseSuccess, GetWebhookEventOptions, GetWebhookEventResponse, GetWebhookEventResponseSuccess, GetWebhookResponse, GetWebhookResponseSuccess, Inbox, InboxCreatedEvent, InboxDeletedEvent, InboxDraft, InboxDraftCreatedEvent, InboxDraftDeletedEvent, InboxDraftListItem, InboxDraftSentEvent, InboxDraftType, InboxDraftUpdatedEvent, InboxEmailReceivedEvent, InboxEmailSentEvent, InboxLabel, InboxLabelColor, InboxMessage, InboxMessageAttachment, InboxMessageFolder, InboxThread, InboxThreadAssignedEvent, InboxThreadCreatedEvent, InboxThreadFolderUpdatedEvent, InboxThreadLabel, InboxThreadLabelsUpdatedEvent, InboxThreadSummary, InboxThreadUnassignedEvent, InboxUpdatedEvent, ListAttachmentsOptions, ListAttachmentsResponse, ListAttachmentsResponseSuccess, ListInboxDraftsOptions, ListInboxDraftsResponse, ListInboxDraftsResponseSuccess, ListInboxLabelsOptions, ListInboxLabelsResponse, ListInboxLabelsResponseSuccess, ListInboxThreadsOptions, ListInboxThreadsResponse, ListInboxThreadsResponseSuccess, ListInboxesOptions, ListInboxesResponse, ListInboxesResponseSuccess, ListOAuthGrantsOptions, ListOAuthGrantsResponse, ListOAuthGrantsResponseSuccess, ListWebhookEventAttemptsOptions, ListWebhookEventAttemptsResponse, ListWebhookEventAttemptsResponseSuccess, ListWebhookEventsOptions, ListWebhookEventsResponse, ListWebhookEventsResponseSuccess, ListWebhooksOptions, ListWebhooksResponse, ListWebhooksResponseSuccess, MoveThreadFolder, OAuthGrant, RemoveInboxDraftOptions, RemoveInboxDraftResponse, RemoveInboxDraftResponseSuccess, RemoveInboxLabelOptions, RemoveInboxLabelResponse, RemoveInboxLabelResponseSuccess, RemoveInboxResponse, RemoveInboxResponseSuccess, RemoveInboxThreadOptions, RemoveInboxThreadResponse, RemoveInboxThreadResponseSuccess, RemoveWebhookResponse, RemoveWebhookResponseSuccess, ReplayWebhookEventOptions, ReplayWebhookEventResponse, ReplayWebhookEventResponseSuccess, ReplyInboxThreadEmailOptions, ReplyInboxThreadEmailRequestOptions, ReplyInboxThreadEmailResponse, ReplyInboxThreadEmailResponseSuccess, ResendOptions, Response, RevokeOAuthGrantResponse, RevokeOAuthGrantResponseSuccess, RotateWebhookSigningSecretResponse, RotateWebhookSigningSecretResponseSuccess, SendInboxDraftOptions, SendInboxDraftRequestOptions, SendInboxDraftResponse, SendInboxDraftResponseSuccess, SuppressionAddedEvent, SuppressionRemovedEvent, UpdateInboxDraftOptions, UpdateInboxDraftResponse, UpdateInboxDraftResponseSuccess, UpdateInboxLabelOptions, UpdateInboxLabelResponse, UpdateInboxLabelResponseSuccess, UpdateInboxOptions, UpdateInboxResponse, UpdateInboxResponseSuccess, UpdateInboxThreadOptions, UpdateInboxThreadResponse, UpdateInboxThreadResponseSuccess, UpdateWebhookOptions, UpdateWebhookResponse, UpdateWebhookResponseSuccess, Webhook, WebhookEvent, WebhookEventAttempt, WebhookEventLog, WebhookEventLogStatus, WebhookEventPayload };
|
package/dist/index.d.mts
CHANGED
|
@@ -1822,14 +1822,12 @@ type GetInboxDraftResponseSuccess = InboxDraft;
|
|
|
1822
1822
|
type GetInboxDraftResponse = Response<GetInboxDraftResponseSuccess>;
|
|
1823
1823
|
//#endregion
|
|
1824
1824
|
//#region src/inboxes/drafts/interfaces/list-inbox-drafts.interface.d.ts
|
|
1825
|
-
|
|
1825
|
+
type ListInboxDraftsOptions = {
|
|
1826
1826
|
inboxId: string;
|
|
1827
|
-
|
|
1828
|
-
}
|
|
1827
|
+
} & PaginationOptions;
|
|
1829
1828
|
interface ListInboxDraftsResponseSuccess {
|
|
1830
1829
|
object: 'list';
|
|
1831
1830
|
has_more: boolean;
|
|
1832
|
-
next_cursor: string | null;
|
|
1833
1831
|
data: InboxDraftListItem[];
|
|
1834
1832
|
}
|
|
1835
1833
|
type ListInboxDraftsResponse = Response<ListInboxDraftsResponseSuccess>;
|
|
@@ -1921,7 +1919,6 @@ interface ListInboxLabelsOptions {
|
|
|
1921
1919
|
}
|
|
1922
1920
|
interface ListInboxLabelsResponseSuccess {
|
|
1923
1921
|
object: 'list';
|
|
1924
|
-
has_more: boolean;
|
|
1925
1922
|
data: InboxLabel[];
|
|
1926
1923
|
}
|
|
1927
1924
|
type ListInboxLabelsResponse = Response<ListInboxLabelsResponseSuccess>;
|
|
@@ -2020,6 +2017,9 @@ interface ForwardInboxThreadEmailResponseSuccess {
|
|
|
2020
2017
|
to: string[];
|
|
2021
2018
|
cc: string[];
|
|
2022
2019
|
bcc: string[];
|
|
2020
|
+
reply_to: string[];
|
|
2021
|
+
subject: string | null;
|
|
2022
|
+
message_id: string | null;
|
|
2023
2023
|
html: string | null;
|
|
2024
2024
|
text: string | null;
|
|
2025
2025
|
attachments: InboxMessageAttachment[];
|
|
@@ -2034,10 +2034,7 @@ interface GetInboxThreadOptions {
|
|
|
2034
2034
|
threadId: string;
|
|
2035
2035
|
}
|
|
2036
2036
|
interface GetInboxThreadResponseSuccess extends InboxThreadSummary {
|
|
2037
|
-
messages:
|
|
2038
|
-
has_more: boolean;
|
|
2039
|
-
data: InboxMessage[];
|
|
2040
|
-
};
|
|
2037
|
+
messages: InboxMessage[];
|
|
2041
2038
|
}
|
|
2042
2039
|
type GetInboxThreadResponse = Response<GetInboxThreadResponseSuccess>;
|
|
2043
2040
|
//#endregion
|
|
@@ -2051,18 +2048,16 @@ type GetInboxThreadEmailResponseSuccess = InboxMessage;
|
|
|
2051
2048
|
type GetInboxThreadEmailResponse = Response<GetInboxThreadEmailResponseSuccess>;
|
|
2052
2049
|
//#endregion
|
|
2053
2050
|
//#region src/inboxes/threads/interfaces/list-inbox-threads.interface.d.ts
|
|
2054
|
-
|
|
2051
|
+
type ListInboxThreadsOptions = {
|
|
2055
2052
|
inboxId: string;
|
|
2056
2053
|
folder?: InboxMessageFolder;
|
|
2057
2054
|
query?: string;
|
|
2058
2055
|
from?: string;
|
|
2059
2056
|
label?: string | string[];
|
|
2060
|
-
|
|
2061
|
-
}
|
|
2057
|
+
} & PaginationOptions;
|
|
2062
2058
|
interface ListInboxThreadsResponseSuccess {
|
|
2063
2059
|
object: 'list';
|
|
2064
2060
|
has_more: boolean;
|
|
2065
|
-
next_cursor: string | null;
|
|
2066
2061
|
data: InboxThread[];
|
|
2067
2062
|
}
|
|
2068
2063
|
type ListInboxThreadsResponse = Response<ListInboxThreadsResponseSuccess>;
|
|
@@ -2106,7 +2101,7 @@ type UpdateInboxThreadOptions = {
|
|
|
2106
2101
|
labelId?: string;
|
|
2107
2102
|
}>;
|
|
2108
2103
|
interface UpdateInboxThreadResponseSuccess {
|
|
2109
|
-
object: '
|
|
2104
|
+
object: 'inbox_thread';
|
|
2110
2105
|
id: string;
|
|
2111
2106
|
subject: string | null;
|
|
2112
2107
|
folder: InboxMessageFolder;
|
|
@@ -2823,7 +2818,7 @@ declare class Topics {
|
|
|
2823
2818
|
}
|
|
2824
2819
|
//#endregion
|
|
2825
2820
|
//#region src/webhooks/interfaces/webhook-event.interface.d.ts
|
|
2826
|
-
type WebhookEvent = 'email.sent' | 'email.scheduled' | 'email.delivered' | 'email.delivery_delayed' | 'email.complained' | 'email.bounced' | 'email.opened' | 'email.clicked' | 'email.received' | 'email.failed' | 'email.suppressed' | 'contact.created' | 'contact.updated' | 'contact.deleted' | 'domain.created' | 'domain.updated' | 'domain.deleted' | 'suppression.added' | 'suppression.removed';
|
|
2821
|
+
type WebhookEvent = 'email.sent' | 'email.scheduled' | 'email.delivered' | 'email.delivery_delayed' | 'email.complained' | 'email.bounced' | 'email.opened' | 'email.clicked' | 'email.received' | 'email.failed' | 'email.suppressed' | 'contact.created' | 'contact.updated' | 'contact.deleted' | 'domain.created' | 'domain.updated' | 'domain.deleted' | 'suppression.added' | 'suppression.removed' | 'inbox.created' | 'inbox.updated' | 'inbox.deleted' | 'inbox.thread.created' | 'inbox.thread.folder.updated' | 'inbox.thread.assigned' | 'inbox.thread.unassigned' | 'inbox.thread.labels.updated' | 'inbox.email.received' | 'inbox.email.sent' | 'inbox.draft.created' | 'inbox.draft.updated' | 'inbox.draft.sent' | 'inbox.draft.deleted';
|
|
2827
2822
|
interface BaseEmailEventData {
|
|
2828
2823
|
broadcast_id?: string;
|
|
2829
2824
|
created_at: string;
|
|
@@ -2907,6 +2902,28 @@ interface SuppressionEventData {
|
|
|
2907
2902
|
source_id: string | null;
|
|
2908
2903
|
created_at: string;
|
|
2909
2904
|
}
|
|
2905
|
+
interface InboxEventInbox {
|
|
2906
|
+
object: 'inbox';
|
|
2907
|
+
id: string;
|
|
2908
|
+
name: string;
|
|
2909
|
+
email_address: string;
|
|
2910
|
+
domain_id: string;
|
|
2911
|
+
receiving_address: string | null;
|
|
2912
|
+
friendly_name: string | null;
|
|
2913
|
+
unread: number;
|
|
2914
|
+
created_at: string;
|
|
2915
|
+
}
|
|
2916
|
+
interface InboxEventData {
|
|
2917
|
+
source: 'api' | 'dashboard' | 'agent' | 'system';
|
|
2918
|
+
inbox_id: string;
|
|
2919
|
+
thread_id?: string;
|
|
2920
|
+
email_id?: string;
|
|
2921
|
+
draft_id?: string;
|
|
2922
|
+
thread?: InboxThreadSummary;
|
|
2923
|
+
email?: Omit<InboxMessage, 'html' | 'text'>;
|
|
2924
|
+
draft?: Omit<InboxDraft, 'html' | 'text'>;
|
|
2925
|
+
inbox?: InboxEventInbox;
|
|
2926
|
+
}
|
|
2910
2927
|
interface EmailSentEvent {
|
|
2911
2928
|
type: 'email.sent';
|
|
2912
2929
|
created_at: string;
|
|
@@ -3010,7 +3027,89 @@ interface SuppressionRemovedEvent {
|
|
|
3010
3027
|
created_at: string;
|
|
3011
3028
|
data: SuppressionEventData;
|
|
3012
3029
|
}
|
|
3013
|
-
|
|
3030
|
+
interface InboxCreatedEvent {
|
|
3031
|
+
type: 'inbox.created';
|
|
3032
|
+
created_at: string;
|
|
3033
|
+
data: InboxEventData;
|
|
3034
|
+
}
|
|
3035
|
+
interface InboxUpdatedEvent {
|
|
3036
|
+
type: 'inbox.updated';
|
|
3037
|
+
created_at: string;
|
|
3038
|
+
data: InboxEventData;
|
|
3039
|
+
}
|
|
3040
|
+
interface InboxDeletedEvent {
|
|
3041
|
+
type: 'inbox.deleted';
|
|
3042
|
+
created_at: string;
|
|
3043
|
+
data: InboxEventData;
|
|
3044
|
+
}
|
|
3045
|
+
interface InboxThreadCreatedEvent {
|
|
3046
|
+
type: 'inbox.thread.created';
|
|
3047
|
+
created_at: string;
|
|
3048
|
+
data: InboxEventData;
|
|
3049
|
+
}
|
|
3050
|
+
interface InboxThreadFolderUpdatedEvent {
|
|
3051
|
+
type: 'inbox.thread.folder.updated';
|
|
3052
|
+
created_at: string;
|
|
3053
|
+
data: InboxEventData & {
|
|
3054
|
+
from: InboxMessageFolder;
|
|
3055
|
+
to: InboxMessageFolder;
|
|
3056
|
+
};
|
|
3057
|
+
}
|
|
3058
|
+
interface InboxThreadAssignedEvent {
|
|
3059
|
+
type: 'inbox.thread.assigned';
|
|
3060
|
+
created_at: string;
|
|
3061
|
+
data: InboxEventData & {
|
|
3062
|
+
assignee_email: string | null;
|
|
3063
|
+
assigned_by_email: string | null;
|
|
3064
|
+
previous_assignee_email: string | null;
|
|
3065
|
+
};
|
|
3066
|
+
}
|
|
3067
|
+
interface InboxThreadUnassignedEvent {
|
|
3068
|
+
type: 'inbox.thread.unassigned';
|
|
3069
|
+
created_at: string;
|
|
3070
|
+
data: InboxEventData & {
|
|
3071
|
+
previous_assignee_email: string | null;
|
|
3072
|
+
};
|
|
3073
|
+
}
|
|
3074
|
+
interface InboxThreadLabelsUpdatedEvent {
|
|
3075
|
+
type: 'inbox.thread.labels.updated';
|
|
3076
|
+
created_at: string;
|
|
3077
|
+
data: InboxEventData & {
|
|
3078
|
+
added: InboxThreadLabel[];
|
|
3079
|
+
removed: InboxThreadLabel[];
|
|
3080
|
+
};
|
|
3081
|
+
}
|
|
3082
|
+
interface InboxEmailReceivedEvent {
|
|
3083
|
+
type: 'inbox.email.received';
|
|
3084
|
+
created_at: string;
|
|
3085
|
+
data: InboxEventData;
|
|
3086
|
+
}
|
|
3087
|
+
interface InboxEmailSentEvent {
|
|
3088
|
+
type: 'inbox.email.sent';
|
|
3089
|
+
created_at: string;
|
|
3090
|
+
data: InboxEventData;
|
|
3091
|
+
}
|
|
3092
|
+
interface InboxDraftCreatedEvent {
|
|
3093
|
+
type: 'inbox.draft.created';
|
|
3094
|
+
created_at: string;
|
|
3095
|
+
data: InboxEventData;
|
|
3096
|
+
}
|
|
3097
|
+
interface InboxDraftUpdatedEvent {
|
|
3098
|
+
type: 'inbox.draft.updated';
|
|
3099
|
+
created_at: string;
|
|
3100
|
+
data: InboxEventData;
|
|
3101
|
+
}
|
|
3102
|
+
interface InboxDraftSentEvent {
|
|
3103
|
+
type: 'inbox.draft.sent';
|
|
3104
|
+
created_at: string;
|
|
3105
|
+
data: InboxEventData;
|
|
3106
|
+
}
|
|
3107
|
+
interface InboxDraftDeletedEvent {
|
|
3108
|
+
type: 'inbox.draft.deleted';
|
|
3109
|
+
created_at: string;
|
|
3110
|
+
data: InboxEventData;
|
|
3111
|
+
}
|
|
3112
|
+
type WebhookEventPayload = EmailSentEvent | EmailScheduledEvent | EmailDeliveredEvent | EmailDeliveryDelayedEvent | EmailComplainedEvent | EmailBouncedEvent | EmailOpenedEvent | EmailClickedEvent | EmailReceivedEvent | EmailFailedEvent | EmailSuppressedEvent | ContactCreatedEvent | ContactUpdatedEvent | ContactDeletedEvent | DomainCreatedEvent | DomainUpdatedEvent | DomainDeletedEvent | SuppressionAddedEvent | SuppressionRemovedEvent | InboxCreatedEvent | InboxUpdatedEvent | InboxDeletedEvent | InboxThreadCreatedEvent | InboxThreadFolderUpdatedEvent | InboxThreadAssignedEvent | InboxThreadUnassignedEvent | InboxThreadLabelsUpdatedEvent | InboxEmailReceivedEvent | InboxEmailSentEvent | InboxDraftCreatedEvent | InboxDraftUpdatedEvent | InboxDraftSentEvent | InboxDraftDeletedEvent;
|
|
3014
3113
|
//#endregion
|
|
3015
3114
|
//#region src/webhooks/interfaces/list-webhook-events.interface.d.ts
|
|
3016
3115
|
type WebhookEventLogStatus = 'success' | 'pending' | 'failed' | 'attempting';
|
|
@@ -3229,4 +3328,4 @@ export declare class Resend {
|
|
|
3229
3328
|
delete<T>(path: string, query?: unknown, options?: DeleteOptions): Promise<Response<T>>;
|
|
3230
3329
|
}
|
|
3231
3330
|
//#endregion
|
|
3232
|
-
export type { ContactCreatedEvent, ContactDeletedEvent, ContactUpdatedEvent, CreateInboxDraftOptions, CreateInboxDraftRequestOptions, CreateInboxDraftResponse, CreateInboxDraftResponseSuccess, CreateInboxLabelOptions, CreateInboxLabelRequestOptions, CreateInboxLabelResponse, CreateInboxLabelResponseSuccess, CreateInboxOptions, CreateInboxRequestOptions, CreateInboxResponse, CreateInboxResponseSuccess, CreateWebhookOptions, CreateWebhookRequestOptions, CreateWebhookResponse, CreateWebhookResponseSuccess, DomainCreatedEvent, DomainDeletedEvent, DomainUpdatedEvent, EmailBouncedEvent, EmailClickedEvent, EmailComplainedEvent, EmailDeliveredEvent, EmailDeliveryDelayedEvent, EmailFailedEvent, EmailOpenedEvent, EmailReceivedEvent, EmailScheduledEvent, EmailSentEvent, EmailSuppressedEvent, ErrorResponse, ForwardInboxThreadEmailOptions, ForwardInboxThreadEmailRequestOptions, ForwardInboxThreadEmailResponse, ForwardInboxThreadEmailResponseSuccess, GetAttachmentOptions, GetAttachmentResponse, GetAttachmentResponseSuccess, GetInboxDraftOptions, GetInboxDraftResponse, GetInboxDraftResponseSuccess, GetInboxResponse, GetInboxResponseSuccess, GetInboxThreadEmailOptions, GetInboxThreadEmailResponse, GetInboxThreadEmailResponseSuccess, GetInboxThreadOptions, GetInboxThreadResponse, GetInboxThreadResponseSuccess, GetWebhookEventOptions, GetWebhookEventResponse, GetWebhookEventResponseSuccess, GetWebhookResponse, GetWebhookResponseSuccess, Inbox, InboxDraft, InboxDraftListItem, InboxDraftType, InboxLabel, InboxLabelColor, InboxMessage, InboxMessageAttachment, InboxMessageFolder, InboxThread, InboxThreadLabel, InboxThreadSummary, ListAttachmentsOptions, ListAttachmentsResponse, ListAttachmentsResponseSuccess, ListInboxDraftsOptions, ListInboxDraftsResponse, ListInboxDraftsResponseSuccess, ListInboxLabelsOptions, ListInboxLabelsResponse, ListInboxLabelsResponseSuccess, ListInboxThreadsOptions, ListInboxThreadsResponse, ListInboxThreadsResponseSuccess, ListInboxesOptions, ListInboxesResponse, ListInboxesResponseSuccess, ListOAuthGrantsOptions, ListOAuthGrantsResponse, ListOAuthGrantsResponseSuccess, ListWebhookEventAttemptsOptions, ListWebhookEventAttemptsResponse, ListWebhookEventAttemptsResponseSuccess, ListWebhookEventsOptions, ListWebhookEventsResponse, ListWebhookEventsResponseSuccess, ListWebhooksOptions, ListWebhooksResponse, ListWebhooksResponseSuccess, MoveThreadFolder, OAuthGrant, RemoveInboxDraftOptions, RemoveInboxDraftResponse, RemoveInboxDraftResponseSuccess, RemoveInboxLabelOptions, RemoveInboxLabelResponse, RemoveInboxLabelResponseSuccess, RemoveInboxResponse, RemoveInboxResponseSuccess, RemoveInboxThreadOptions, RemoveInboxThreadResponse, RemoveInboxThreadResponseSuccess, RemoveWebhookResponse, RemoveWebhookResponseSuccess, ReplayWebhookEventOptions, ReplayWebhookEventResponse, ReplayWebhookEventResponseSuccess, ReplyInboxThreadEmailOptions, ReplyInboxThreadEmailRequestOptions, ReplyInboxThreadEmailResponse, ReplyInboxThreadEmailResponseSuccess, ResendOptions, Response, RevokeOAuthGrantResponse, RevokeOAuthGrantResponseSuccess, RotateWebhookSigningSecretResponse, RotateWebhookSigningSecretResponseSuccess, SendInboxDraftOptions, SendInboxDraftRequestOptions, SendInboxDraftResponse, SendInboxDraftResponseSuccess, SuppressionAddedEvent, SuppressionRemovedEvent, UpdateInboxDraftOptions, UpdateInboxDraftResponse, UpdateInboxDraftResponseSuccess, UpdateInboxLabelOptions, UpdateInboxLabelResponse, UpdateInboxLabelResponseSuccess, UpdateInboxOptions, UpdateInboxResponse, UpdateInboxResponseSuccess, UpdateInboxThreadOptions, UpdateInboxThreadResponse, UpdateInboxThreadResponseSuccess, UpdateWebhookOptions, UpdateWebhookResponse, UpdateWebhookResponseSuccess, Webhook, WebhookEvent, WebhookEventAttempt, WebhookEventLog, WebhookEventLogStatus, WebhookEventPayload };
|
|
3331
|
+
export type { ContactCreatedEvent, ContactDeletedEvent, ContactUpdatedEvent, CreateInboxDraftOptions, CreateInboxDraftRequestOptions, CreateInboxDraftResponse, CreateInboxDraftResponseSuccess, CreateInboxLabelOptions, CreateInboxLabelRequestOptions, CreateInboxLabelResponse, CreateInboxLabelResponseSuccess, CreateInboxOptions, CreateInboxRequestOptions, CreateInboxResponse, CreateInboxResponseSuccess, CreateWebhookOptions, CreateWebhookRequestOptions, CreateWebhookResponse, CreateWebhookResponseSuccess, DomainCreatedEvent, DomainDeletedEvent, DomainUpdatedEvent, EmailBouncedEvent, EmailClickedEvent, EmailComplainedEvent, EmailDeliveredEvent, EmailDeliveryDelayedEvent, EmailFailedEvent, EmailOpenedEvent, EmailReceivedEvent, EmailScheduledEvent, EmailSentEvent, EmailSuppressedEvent, ErrorResponse, ForwardInboxThreadEmailOptions, ForwardInboxThreadEmailRequestOptions, ForwardInboxThreadEmailResponse, ForwardInboxThreadEmailResponseSuccess, GetAttachmentOptions, GetAttachmentResponse, GetAttachmentResponseSuccess, GetInboxDraftOptions, GetInboxDraftResponse, GetInboxDraftResponseSuccess, GetInboxResponse, GetInboxResponseSuccess, GetInboxThreadEmailOptions, GetInboxThreadEmailResponse, GetInboxThreadEmailResponseSuccess, GetInboxThreadOptions, GetInboxThreadResponse, GetInboxThreadResponseSuccess, GetWebhookEventOptions, GetWebhookEventResponse, GetWebhookEventResponseSuccess, GetWebhookResponse, GetWebhookResponseSuccess, Inbox, InboxCreatedEvent, InboxDeletedEvent, InboxDraft, InboxDraftCreatedEvent, InboxDraftDeletedEvent, InboxDraftListItem, InboxDraftSentEvent, InboxDraftType, InboxDraftUpdatedEvent, InboxEmailReceivedEvent, InboxEmailSentEvent, InboxLabel, InboxLabelColor, InboxMessage, InboxMessageAttachment, InboxMessageFolder, InboxThread, InboxThreadAssignedEvent, InboxThreadCreatedEvent, InboxThreadFolderUpdatedEvent, InboxThreadLabel, InboxThreadLabelsUpdatedEvent, InboxThreadSummary, InboxThreadUnassignedEvent, InboxUpdatedEvent, ListAttachmentsOptions, ListAttachmentsResponse, ListAttachmentsResponseSuccess, ListInboxDraftsOptions, ListInboxDraftsResponse, ListInboxDraftsResponseSuccess, ListInboxLabelsOptions, ListInboxLabelsResponse, ListInboxLabelsResponseSuccess, ListInboxThreadsOptions, ListInboxThreadsResponse, ListInboxThreadsResponseSuccess, ListInboxesOptions, ListInboxesResponse, ListInboxesResponseSuccess, ListOAuthGrantsOptions, ListOAuthGrantsResponse, ListOAuthGrantsResponseSuccess, ListWebhookEventAttemptsOptions, ListWebhookEventAttemptsResponse, ListWebhookEventAttemptsResponseSuccess, ListWebhookEventsOptions, ListWebhookEventsResponse, ListWebhookEventsResponseSuccess, ListWebhooksOptions, ListWebhooksResponse, ListWebhooksResponseSuccess, MoveThreadFolder, OAuthGrant, RemoveInboxDraftOptions, RemoveInboxDraftResponse, RemoveInboxDraftResponseSuccess, RemoveInboxLabelOptions, RemoveInboxLabelResponse, RemoveInboxLabelResponseSuccess, RemoveInboxResponse, RemoveInboxResponseSuccess, RemoveInboxThreadOptions, RemoveInboxThreadResponse, RemoveInboxThreadResponseSuccess, RemoveWebhookResponse, RemoveWebhookResponseSuccess, ReplayWebhookEventOptions, ReplayWebhookEventResponse, ReplayWebhookEventResponseSuccess, ReplyInboxThreadEmailOptions, ReplyInboxThreadEmailRequestOptions, ReplyInboxThreadEmailResponse, ReplyInboxThreadEmailResponseSuccess, ResendOptions, Response, RevokeOAuthGrantResponse, RevokeOAuthGrantResponseSuccess, RotateWebhookSigningSecretResponse, RotateWebhookSigningSecretResponseSuccess, SendInboxDraftOptions, SendInboxDraftRequestOptions, SendInboxDraftResponse, SendInboxDraftResponseSuccess, SuppressionAddedEvent, SuppressionRemovedEvent, UpdateInboxDraftOptions, UpdateInboxDraftResponse, UpdateInboxDraftResponseSuccess, UpdateInboxLabelOptions, UpdateInboxLabelResponse, UpdateInboxLabelResponseSuccess, UpdateInboxOptions, UpdateInboxResponse, UpdateInboxResponseSuccess, UpdateInboxThreadOptions, UpdateInboxThreadResponse, UpdateInboxThreadResponseSuccess, UpdateWebhookOptions, UpdateWebhookResponse, UpdateWebhookResponseSuccess, Webhook, WebhookEvent, WebhookEventAttempt, WebhookEventLog, WebhookEventLogStatus, WebhookEventPayload };
|
package/dist/index.mjs
CHANGED
|
@@ -29,7 +29,7 @@ const INBOX_LABEL_COLORS = [
|
|
|
29
29
|
];
|
|
30
30
|
//#endregion
|
|
31
31
|
//#region package.json
|
|
32
|
-
var version = "6.28.1-preview-inboxes.
|
|
32
|
+
var version = "6.28.1-preview-inboxes.2";
|
|
33
33
|
//#endregion
|
|
34
34
|
//#region src/common/utils/build-pagination-query.ts
|
|
35
35
|
function buildPaginationUrl(base, options) {
|
|
@@ -974,7 +974,9 @@ function buildInboxCursorUrl(base, options = {}) {
|
|
|
974
974
|
if (options.folder !== void 0) searchParams.set("folder", options.folder);
|
|
975
975
|
if (options.query !== void 0) searchParams.set("query", options.query);
|
|
976
976
|
if (options.from !== void 0) searchParams.set("from", options.from);
|
|
977
|
-
if (options.
|
|
977
|
+
if (options.limit !== void 0) searchParams.set("limit", String(options.limit));
|
|
978
|
+
if (options.after !== void 0) searchParams.set("after", options.after);
|
|
979
|
+
if (options.before !== void 0) searchParams.set("before", options.before);
|
|
978
980
|
const labels = options.label === void 0 ? [] : Array.isArray(options.label) ? options.label : [options.label];
|
|
979
981
|
for (const label of labels) searchParams.append("label", label);
|
|
980
982
|
const queryString = searchParams.toString();
|
|
@@ -987,8 +989,12 @@ var InboxDrafts = class {
|
|
|
987
989
|
this.resend = resend;
|
|
988
990
|
}
|
|
989
991
|
async list(options) {
|
|
990
|
-
const { inboxId,
|
|
991
|
-
const url = buildInboxCursorUrl(`/inboxes/${inboxId}/drafts`, {
|
|
992
|
+
const { inboxId, limit, after, before } = options;
|
|
993
|
+
const url = buildInboxCursorUrl(`/inboxes/${inboxId}/drafts`, {
|
|
994
|
+
limit,
|
|
995
|
+
after,
|
|
996
|
+
before
|
|
997
|
+
});
|
|
992
998
|
return this.resend.get(url);
|
|
993
999
|
}
|
|
994
1000
|
async create(payload, options = {}) {
|