@stack0/sdk 0.5.9 → 0.5.12
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/crawl/index.d.mts +206 -0
- package/dist/crawl/index.d.ts +206 -0
- package/dist/crawl/index.js +179 -0
- package/dist/crawl/index.js.map +1 -0
- package/dist/crawl/index.mjs +176 -0
- package/dist/crawl/index.mjs.map +1 -0
- package/dist/documents/index.d.mts +84 -0
- package/dist/documents/index.d.ts +84 -0
- package/dist/documents/index.js +144 -0
- package/dist/documents/index.js.map +1 -0
- package/dist/documents/index.mjs +142 -0
- package/dist/documents/index.mjs.map +1 -0
- package/dist/index.d.mts +213 -6
- package/dist/index.d.ts +213 -6
- package/dist/index.js +431 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +426 -1
- package/dist/index.mjs.map +1 -1
- package/dist/mail/index.d.mts +147 -1
- package/dist/mail/index.d.ts +147 -1
- package/dist/mail/index.js +67 -0
- package/dist/mail/index.js.map +1 -1
- package/dist/mail/index.mjs +67 -1
- package/dist/mail/index.mjs.map +1 -1
- package/dist/map/index.d.mts +93 -0
- package/dist/map/index.d.ts +93 -0
- package/dist/map/index.js +151 -0
- package/dist/map/index.js.map +1 -0
- package/dist/map/index.mjs +148 -0
- package/dist/map/index.mjs.map +1 -0
- package/package.json +20 -2
package/dist/mail/index.d.mts
CHANGED
|
@@ -35,6 +35,8 @@ interface SendEmailRequest {
|
|
|
35
35
|
metadata?: Record<string, unknown>;
|
|
36
36
|
attachments?: Attachment[];
|
|
37
37
|
headers?: Record<string, string>;
|
|
38
|
+
inReplyTo?: string;
|
|
39
|
+
references?: string;
|
|
38
40
|
scheduledAt?: Date | string;
|
|
39
41
|
}
|
|
40
42
|
interface SendEmailResponse {
|
|
@@ -206,6 +208,8 @@ interface DnsRecord {
|
|
|
206
208
|
interface Domain {
|
|
207
209
|
id: string;
|
|
208
210
|
organizationId: string;
|
|
211
|
+
projectId: string | null;
|
|
212
|
+
environment: Environment;
|
|
209
213
|
domain: string;
|
|
210
214
|
status: DomainStatus;
|
|
211
215
|
dkimRecord: DnsRecord[] | null;
|
|
@@ -226,6 +230,8 @@ interface ListDomainsRequest {
|
|
|
226
230
|
type ListDomainsResponse = Domain[];
|
|
227
231
|
interface AddDomainRequest {
|
|
228
232
|
domain: string;
|
|
233
|
+
projectSlug: string;
|
|
234
|
+
environment?: Environment;
|
|
229
235
|
}
|
|
230
236
|
interface AddDomainResponse {
|
|
231
237
|
domain?: Domain;
|
|
@@ -878,6 +884,105 @@ interface EventAnalyticsResponse {
|
|
|
878
884
|
count: number;
|
|
879
885
|
}>;
|
|
880
886
|
}
|
|
887
|
+
interface Mailbox {
|
|
888
|
+
id: string;
|
|
889
|
+
address: string;
|
|
890
|
+
localPart: string;
|
|
891
|
+
displayName?: string;
|
|
892
|
+
domain: string;
|
|
893
|
+
domainId: string;
|
|
894
|
+
webhookUrl: string;
|
|
895
|
+
status: "active" | "paused" | "disabled";
|
|
896
|
+
maxInboundPerDay: number;
|
|
897
|
+
metadata?: Record<string, unknown>;
|
|
898
|
+
environment: Environment;
|
|
899
|
+
createdAt: Date | string;
|
|
900
|
+
updatedAt?: Date | string;
|
|
901
|
+
}
|
|
902
|
+
interface CreateMailboxRequest {
|
|
903
|
+
projectSlug?: string;
|
|
904
|
+
environment?: Environment;
|
|
905
|
+
address?: string;
|
|
906
|
+
displayName?: string;
|
|
907
|
+
domain: string;
|
|
908
|
+
webhookUrl: string;
|
|
909
|
+
metadata?: Record<string, unknown>;
|
|
910
|
+
maxInboundPerDay?: number;
|
|
911
|
+
}
|
|
912
|
+
interface UpdateMailboxRequest {
|
|
913
|
+
id: string;
|
|
914
|
+
displayName?: string;
|
|
915
|
+
webhookUrl?: string;
|
|
916
|
+
metadata?: Record<string, unknown>;
|
|
917
|
+
status?: "active" | "paused" | "disabled";
|
|
918
|
+
maxInboundPerDay?: number;
|
|
919
|
+
}
|
|
920
|
+
interface ListMailboxesRequest {
|
|
921
|
+
projectSlug?: string;
|
|
922
|
+
environment?: Environment;
|
|
923
|
+
domain?: string;
|
|
924
|
+
status?: "active" | "paused" | "disabled";
|
|
925
|
+
limit?: number;
|
|
926
|
+
cursor?: string;
|
|
927
|
+
}
|
|
928
|
+
interface ListMailboxesResponse {
|
|
929
|
+
mailboxes: Mailbox[];
|
|
930
|
+
hasMore: boolean;
|
|
931
|
+
nextCursor?: string;
|
|
932
|
+
}
|
|
933
|
+
interface InboundEmailAddress {
|
|
934
|
+
email: string;
|
|
935
|
+
name?: string;
|
|
936
|
+
}
|
|
937
|
+
interface InboundAttachment {
|
|
938
|
+
filename: string;
|
|
939
|
+
contentType: string;
|
|
940
|
+
size: number;
|
|
941
|
+
url?: string;
|
|
942
|
+
}
|
|
943
|
+
interface InboundMessage {
|
|
944
|
+
id: string;
|
|
945
|
+
mailboxId: string;
|
|
946
|
+
mailbox: string;
|
|
947
|
+
messageId?: string;
|
|
948
|
+
inReplyTo?: string;
|
|
949
|
+
references?: string;
|
|
950
|
+
from: InboundEmailAddress;
|
|
951
|
+
to: string;
|
|
952
|
+
subject?: string;
|
|
953
|
+
html?: string;
|
|
954
|
+
text?: string;
|
|
955
|
+
attachments?: InboundAttachment[];
|
|
956
|
+
webhookDelivered: boolean;
|
|
957
|
+
webhookAttempts: number;
|
|
958
|
+
createdAt: Date | string;
|
|
959
|
+
}
|
|
960
|
+
interface ListInboundMessagesRequest {
|
|
961
|
+
mailboxId?: string;
|
|
962
|
+
limit?: number;
|
|
963
|
+
cursor?: string;
|
|
964
|
+
}
|
|
965
|
+
interface ListInboundMessagesResponse {
|
|
966
|
+
messages: InboundMessage[];
|
|
967
|
+
hasMore: boolean;
|
|
968
|
+
nextCursor?: string;
|
|
969
|
+
}
|
|
970
|
+
interface InboundWebhookPayload {
|
|
971
|
+
event: "email.inbound";
|
|
972
|
+
mailbox: string;
|
|
973
|
+
mailboxId: string;
|
|
974
|
+
from: InboundEmailAddress;
|
|
975
|
+
to: string;
|
|
976
|
+
subject?: string;
|
|
977
|
+
text?: string;
|
|
978
|
+
html?: string;
|
|
979
|
+
messageId?: string;
|
|
980
|
+
inReplyTo?: string;
|
|
981
|
+
references?: string[];
|
|
982
|
+
attachments?: InboundAttachment[];
|
|
983
|
+
metadata?: Record<string, unknown>;
|
|
984
|
+
receivedAt: string;
|
|
985
|
+
}
|
|
881
986
|
|
|
882
987
|
/**
|
|
883
988
|
* Audiences client for Stack0 Mail API
|
|
@@ -1081,6 +1186,45 @@ declare class Events {
|
|
|
1081
1186
|
getAnalytics(id: string): Promise<EventAnalyticsResponse>;
|
|
1082
1187
|
}
|
|
1083
1188
|
|
|
1189
|
+
/**
|
|
1190
|
+
* Mailboxes client for Stack0 Mail API
|
|
1191
|
+
*/
|
|
1192
|
+
|
|
1193
|
+
declare class Mailboxes {
|
|
1194
|
+
private http;
|
|
1195
|
+
constructor(http: HttpClient);
|
|
1196
|
+
/**
|
|
1197
|
+
* Create a new mailbox
|
|
1198
|
+
*/
|
|
1199
|
+
create(request: CreateMailboxRequest): Promise<Mailbox>;
|
|
1200
|
+
/**
|
|
1201
|
+
* Get a mailbox by ID
|
|
1202
|
+
*/
|
|
1203
|
+
get(id: string): Promise<Mailbox>;
|
|
1204
|
+
/**
|
|
1205
|
+
* List mailboxes with optional filters
|
|
1206
|
+
*/
|
|
1207
|
+
list(request?: ListMailboxesRequest): Promise<ListMailboxesResponse>;
|
|
1208
|
+
/**
|
|
1209
|
+
* Update a mailbox
|
|
1210
|
+
*/
|
|
1211
|
+
update(request: UpdateMailboxRequest): Promise<Mailbox>;
|
|
1212
|
+
/**
|
|
1213
|
+
* Delete a mailbox
|
|
1214
|
+
*/
|
|
1215
|
+
delete(id: string): Promise<{
|
|
1216
|
+
success: boolean;
|
|
1217
|
+
}>;
|
|
1218
|
+
/**
|
|
1219
|
+
* List inbound messages across mailboxes
|
|
1220
|
+
*/
|
|
1221
|
+
listMessages(request?: ListInboundMessagesRequest): Promise<ListInboundMessagesResponse>;
|
|
1222
|
+
/**
|
|
1223
|
+
* Get an inbound message by ID
|
|
1224
|
+
*/
|
|
1225
|
+
getMessage(id: string): Promise<InboundMessage>;
|
|
1226
|
+
}
|
|
1227
|
+
|
|
1084
1228
|
/**
|
|
1085
1229
|
* Sequences client for Stack0 Mail API
|
|
1086
1230
|
*/
|
|
@@ -1248,6 +1392,8 @@ declare class Mail {
|
|
|
1248
1392
|
readonly sequences: Sequences;
|
|
1249
1393
|
/** Track and manage custom events */
|
|
1250
1394
|
readonly events: Events;
|
|
1395
|
+
/** Manage agent mailboxes */
|
|
1396
|
+
readonly mailboxes: Mailboxes;
|
|
1251
1397
|
constructor(config: HttpClientConfig);
|
|
1252
1398
|
/**
|
|
1253
1399
|
* Send a single email
|
|
@@ -1340,4 +1486,4 @@ declare class Mail {
|
|
|
1340
1486
|
listSenders(request?: ListSendersRequest): Promise<ListSendersResponse>;
|
|
1341
1487
|
}
|
|
1342
1488
|
|
|
1343
|
-
export { type AddContactToSequenceRequest, type AddContactsToAudienceRequest, type AddContactsToAudienceResponse, type AddDomainRequest, type AddDomainResponse, type ArchiveSequenceResponse, type Attachment, type Audience, type AudienceContact, Audiences, type BatchTrackEventsRequest, type BatchTrackEventsResponse, type Campaign, type CampaignStatsResponse, type CampaignStatus, Campaigns, type CancelCampaignResponse, type CancelEmailResponse, type ConnectionType, type ContactStatus, Contacts, type CreateAudienceRequest, type CreateCampaignRequest, type CreateConnectionRequest, type CreateContactRequest, type CreateEventRequest, type CreateNodeRequest, type CreateSequenceRequest, type CreateTemplateRequest, type DeleteAudienceResponse, type DeleteCampaignResponse, type DeleteConnectionResponse, type DeleteContactResponse, type DeleteDomainResponse, type DeleteEventResponse, type DeleteNodeResponse, type DeleteSequenceResponse, type DeleteTemplateResponse, type DnsRecord, type Domain, type DomainStatus, Domains, type Email, type EmailAddress, type EmailAnalyticsResponse, type EmailRecipient, type EmailStatus, type EventAnalyticsResponse, type EventOccurrence, type EventPropertiesSchema, type EventProperty, Events, type GetDnsRecordsResponse, type GetEmailResponse, type HourlyAnalyticsDataPoint, type HourlyAnalyticsResponse, type ImportContactsRequest, type ImportContactsResponse, type ListAudienceContactsRequest, type ListAudienceContactsResponse, type ListAudiencesRequest, type ListAudiencesResponse, type ListCampaignsRequest, type ListCampaignsResponse, type ListContactsRequest, type ListContactsResponse, type ListDomainsRequest, type ListDomainsResponse, type ListEmailsRequest, type ListEmailsResponse, type ListEventOccurrencesRequest, type ListEventOccurrencesResponse, type ListEventsRequest, type ListEventsResponse, type ListSendersRequest, type ListSendersResponse, type ListSequenceEntriesRequest, type ListSequenceEntriesResponse, type ListSequencesRequest, type ListSequencesResponse, type ListTemplatesRequest, type ListTemplatesResponse, Mail, type MailContact, type MailEvent, type PauseCampaignResponse, type PauseSequenceResponse, type PreviewTemplateRequest, type PreviewTemplateResponse, type PublishSequenceResponse, type RemoveContactFromSequenceRequest, type RemoveContactFromSequenceResponse, type RemoveContactsFromAudienceRequest, type RemoveContactsFromAudienceResponse, type ResendEmailResponse, type ResumeSequenceResponse, type SendBatchEmailRequest, type SendBatchEmailResponse, type SendBroadcastEmailRequest, type SendBroadcastEmailResponse, type SendCampaignRequest, type SendCampaignResponse, type SendEmailRequest, type SendEmailResponse, type Sender, type Sequence, type SequenceAnalyticsResponse, type SequenceConnection, type SequenceEntry, type SequenceEntryStatus, type SequenceNode, type SequenceNodeType, type SequenceStatus, type SequenceTriggerFrequency, type SequenceTriggerType, type SequenceWithNodes, Sequences, type SetDefaultDomainResponse, type SetNodeBranchRequest, type SetNodeEmailRequest, type SetNodeExperimentRequest, type SetNodeFilterRequest, type SetNodeTimerRequest, type Template, Templates, type TimeSeriesAnalyticsRequest, type TimeSeriesAnalyticsResponse, type TimeSeriesDataPoint, type TrackEventRequest, type TrackEventResponse, type UpdateAudienceRequest, type UpdateCampaignRequest, type UpdateContactRequest, type UpdateEventRequest, type UpdateNodePositionRequest, type UpdateNodeRequest, type UpdateSequenceRequest, type UpdateTemplateRequest, type VerifyDomainResponse };
|
|
1489
|
+
export { type AddContactToSequenceRequest, type AddContactsToAudienceRequest, type AddContactsToAudienceResponse, type AddDomainRequest, type AddDomainResponse, type ArchiveSequenceResponse, type Attachment, type Audience, type AudienceContact, Audiences, type BatchTrackEventsRequest, type BatchTrackEventsResponse, type Campaign, type CampaignStatsResponse, type CampaignStatus, Campaigns, type CancelCampaignResponse, type CancelEmailResponse, type ConnectionType, type ContactStatus, Contacts, type CreateAudienceRequest, type CreateCampaignRequest, type CreateConnectionRequest, type CreateContactRequest, type CreateEventRequest, type CreateMailboxRequest, type CreateNodeRequest, type CreateSequenceRequest, type CreateTemplateRequest, type DeleteAudienceResponse, type DeleteCampaignResponse, type DeleteConnectionResponse, type DeleteContactResponse, type DeleteDomainResponse, type DeleteEventResponse, type DeleteNodeResponse, type DeleteSequenceResponse, type DeleteTemplateResponse, type DnsRecord, type Domain, type DomainStatus, Domains, type Email, type EmailAddress, type EmailAnalyticsResponse, type EmailRecipient, type EmailStatus, type EventAnalyticsResponse, type EventOccurrence, type EventPropertiesSchema, type EventProperty, Events, type GetDnsRecordsResponse, type GetEmailResponse, type HourlyAnalyticsDataPoint, type HourlyAnalyticsResponse, type ImportContactsRequest, type ImportContactsResponse, type InboundAttachment, type InboundEmailAddress, type InboundMessage, type InboundWebhookPayload, type ListAudienceContactsRequest, type ListAudienceContactsResponse, type ListAudiencesRequest, type ListAudiencesResponse, type ListCampaignsRequest, type ListCampaignsResponse, type ListContactsRequest, type ListContactsResponse, type ListDomainsRequest, type ListDomainsResponse, type ListEmailsRequest, type ListEmailsResponse, type ListEventOccurrencesRequest, type ListEventOccurrencesResponse, type ListEventsRequest, type ListEventsResponse, type ListInboundMessagesRequest, type ListInboundMessagesResponse, type ListMailboxesRequest, type ListMailboxesResponse, type ListSendersRequest, type ListSendersResponse, type ListSequenceEntriesRequest, type ListSequenceEntriesResponse, type ListSequencesRequest, type ListSequencesResponse, type ListTemplatesRequest, type ListTemplatesResponse, Mail, type MailContact, type MailEvent, type Mailbox, Mailboxes, type PauseCampaignResponse, type PauseSequenceResponse, type PreviewTemplateRequest, type PreviewTemplateResponse, type PublishSequenceResponse, type RemoveContactFromSequenceRequest, type RemoveContactFromSequenceResponse, type RemoveContactsFromAudienceRequest, type RemoveContactsFromAudienceResponse, type ResendEmailResponse, type ResumeSequenceResponse, type SendBatchEmailRequest, type SendBatchEmailResponse, type SendBroadcastEmailRequest, type SendBroadcastEmailResponse, type SendCampaignRequest, type SendCampaignResponse, type SendEmailRequest, type SendEmailResponse, type Sender, type Sequence, type SequenceAnalyticsResponse, type SequenceConnection, type SequenceEntry, type SequenceEntryStatus, type SequenceNode, type SequenceNodeType, type SequenceStatus, type SequenceTriggerFrequency, type SequenceTriggerType, type SequenceWithNodes, Sequences, type SetDefaultDomainResponse, type SetNodeBranchRequest, type SetNodeEmailRequest, type SetNodeExperimentRequest, type SetNodeFilterRequest, type SetNodeTimerRequest, type Template, Templates, type TimeSeriesAnalyticsRequest, type TimeSeriesAnalyticsResponse, type TimeSeriesDataPoint, type TrackEventRequest, type TrackEventResponse, type UpdateAudienceRequest, type UpdateCampaignRequest, type UpdateContactRequest, type UpdateEventRequest, type UpdateMailboxRequest, type UpdateNodePositionRequest, type UpdateNodeRequest, type UpdateSequenceRequest, type UpdateTemplateRequest, type VerifyDomainResponse };
|
package/dist/mail/index.d.ts
CHANGED
|
@@ -35,6 +35,8 @@ interface SendEmailRequest {
|
|
|
35
35
|
metadata?: Record<string, unknown>;
|
|
36
36
|
attachments?: Attachment[];
|
|
37
37
|
headers?: Record<string, string>;
|
|
38
|
+
inReplyTo?: string;
|
|
39
|
+
references?: string;
|
|
38
40
|
scheduledAt?: Date | string;
|
|
39
41
|
}
|
|
40
42
|
interface SendEmailResponse {
|
|
@@ -206,6 +208,8 @@ interface DnsRecord {
|
|
|
206
208
|
interface Domain {
|
|
207
209
|
id: string;
|
|
208
210
|
organizationId: string;
|
|
211
|
+
projectId: string | null;
|
|
212
|
+
environment: Environment;
|
|
209
213
|
domain: string;
|
|
210
214
|
status: DomainStatus;
|
|
211
215
|
dkimRecord: DnsRecord[] | null;
|
|
@@ -226,6 +230,8 @@ interface ListDomainsRequest {
|
|
|
226
230
|
type ListDomainsResponse = Domain[];
|
|
227
231
|
interface AddDomainRequest {
|
|
228
232
|
domain: string;
|
|
233
|
+
projectSlug: string;
|
|
234
|
+
environment?: Environment;
|
|
229
235
|
}
|
|
230
236
|
interface AddDomainResponse {
|
|
231
237
|
domain?: Domain;
|
|
@@ -878,6 +884,105 @@ interface EventAnalyticsResponse {
|
|
|
878
884
|
count: number;
|
|
879
885
|
}>;
|
|
880
886
|
}
|
|
887
|
+
interface Mailbox {
|
|
888
|
+
id: string;
|
|
889
|
+
address: string;
|
|
890
|
+
localPart: string;
|
|
891
|
+
displayName?: string;
|
|
892
|
+
domain: string;
|
|
893
|
+
domainId: string;
|
|
894
|
+
webhookUrl: string;
|
|
895
|
+
status: "active" | "paused" | "disabled";
|
|
896
|
+
maxInboundPerDay: number;
|
|
897
|
+
metadata?: Record<string, unknown>;
|
|
898
|
+
environment: Environment;
|
|
899
|
+
createdAt: Date | string;
|
|
900
|
+
updatedAt?: Date | string;
|
|
901
|
+
}
|
|
902
|
+
interface CreateMailboxRequest {
|
|
903
|
+
projectSlug?: string;
|
|
904
|
+
environment?: Environment;
|
|
905
|
+
address?: string;
|
|
906
|
+
displayName?: string;
|
|
907
|
+
domain: string;
|
|
908
|
+
webhookUrl: string;
|
|
909
|
+
metadata?: Record<string, unknown>;
|
|
910
|
+
maxInboundPerDay?: number;
|
|
911
|
+
}
|
|
912
|
+
interface UpdateMailboxRequest {
|
|
913
|
+
id: string;
|
|
914
|
+
displayName?: string;
|
|
915
|
+
webhookUrl?: string;
|
|
916
|
+
metadata?: Record<string, unknown>;
|
|
917
|
+
status?: "active" | "paused" | "disabled";
|
|
918
|
+
maxInboundPerDay?: number;
|
|
919
|
+
}
|
|
920
|
+
interface ListMailboxesRequest {
|
|
921
|
+
projectSlug?: string;
|
|
922
|
+
environment?: Environment;
|
|
923
|
+
domain?: string;
|
|
924
|
+
status?: "active" | "paused" | "disabled";
|
|
925
|
+
limit?: number;
|
|
926
|
+
cursor?: string;
|
|
927
|
+
}
|
|
928
|
+
interface ListMailboxesResponse {
|
|
929
|
+
mailboxes: Mailbox[];
|
|
930
|
+
hasMore: boolean;
|
|
931
|
+
nextCursor?: string;
|
|
932
|
+
}
|
|
933
|
+
interface InboundEmailAddress {
|
|
934
|
+
email: string;
|
|
935
|
+
name?: string;
|
|
936
|
+
}
|
|
937
|
+
interface InboundAttachment {
|
|
938
|
+
filename: string;
|
|
939
|
+
contentType: string;
|
|
940
|
+
size: number;
|
|
941
|
+
url?: string;
|
|
942
|
+
}
|
|
943
|
+
interface InboundMessage {
|
|
944
|
+
id: string;
|
|
945
|
+
mailboxId: string;
|
|
946
|
+
mailbox: string;
|
|
947
|
+
messageId?: string;
|
|
948
|
+
inReplyTo?: string;
|
|
949
|
+
references?: string;
|
|
950
|
+
from: InboundEmailAddress;
|
|
951
|
+
to: string;
|
|
952
|
+
subject?: string;
|
|
953
|
+
html?: string;
|
|
954
|
+
text?: string;
|
|
955
|
+
attachments?: InboundAttachment[];
|
|
956
|
+
webhookDelivered: boolean;
|
|
957
|
+
webhookAttempts: number;
|
|
958
|
+
createdAt: Date | string;
|
|
959
|
+
}
|
|
960
|
+
interface ListInboundMessagesRequest {
|
|
961
|
+
mailboxId?: string;
|
|
962
|
+
limit?: number;
|
|
963
|
+
cursor?: string;
|
|
964
|
+
}
|
|
965
|
+
interface ListInboundMessagesResponse {
|
|
966
|
+
messages: InboundMessage[];
|
|
967
|
+
hasMore: boolean;
|
|
968
|
+
nextCursor?: string;
|
|
969
|
+
}
|
|
970
|
+
interface InboundWebhookPayload {
|
|
971
|
+
event: "email.inbound";
|
|
972
|
+
mailbox: string;
|
|
973
|
+
mailboxId: string;
|
|
974
|
+
from: InboundEmailAddress;
|
|
975
|
+
to: string;
|
|
976
|
+
subject?: string;
|
|
977
|
+
text?: string;
|
|
978
|
+
html?: string;
|
|
979
|
+
messageId?: string;
|
|
980
|
+
inReplyTo?: string;
|
|
981
|
+
references?: string[];
|
|
982
|
+
attachments?: InboundAttachment[];
|
|
983
|
+
metadata?: Record<string, unknown>;
|
|
984
|
+
receivedAt: string;
|
|
985
|
+
}
|
|
881
986
|
|
|
882
987
|
/**
|
|
883
988
|
* Audiences client for Stack0 Mail API
|
|
@@ -1081,6 +1186,45 @@ declare class Events {
|
|
|
1081
1186
|
getAnalytics(id: string): Promise<EventAnalyticsResponse>;
|
|
1082
1187
|
}
|
|
1083
1188
|
|
|
1189
|
+
/**
|
|
1190
|
+
* Mailboxes client for Stack0 Mail API
|
|
1191
|
+
*/
|
|
1192
|
+
|
|
1193
|
+
declare class Mailboxes {
|
|
1194
|
+
private http;
|
|
1195
|
+
constructor(http: HttpClient);
|
|
1196
|
+
/**
|
|
1197
|
+
* Create a new mailbox
|
|
1198
|
+
*/
|
|
1199
|
+
create(request: CreateMailboxRequest): Promise<Mailbox>;
|
|
1200
|
+
/**
|
|
1201
|
+
* Get a mailbox by ID
|
|
1202
|
+
*/
|
|
1203
|
+
get(id: string): Promise<Mailbox>;
|
|
1204
|
+
/**
|
|
1205
|
+
* List mailboxes with optional filters
|
|
1206
|
+
*/
|
|
1207
|
+
list(request?: ListMailboxesRequest): Promise<ListMailboxesResponse>;
|
|
1208
|
+
/**
|
|
1209
|
+
* Update a mailbox
|
|
1210
|
+
*/
|
|
1211
|
+
update(request: UpdateMailboxRequest): Promise<Mailbox>;
|
|
1212
|
+
/**
|
|
1213
|
+
* Delete a mailbox
|
|
1214
|
+
*/
|
|
1215
|
+
delete(id: string): Promise<{
|
|
1216
|
+
success: boolean;
|
|
1217
|
+
}>;
|
|
1218
|
+
/**
|
|
1219
|
+
* List inbound messages across mailboxes
|
|
1220
|
+
*/
|
|
1221
|
+
listMessages(request?: ListInboundMessagesRequest): Promise<ListInboundMessagesResponse>;
|
|
1222
|
+
/**
|
|
1223
|
+
* Get an inbound message by ID
|
|
1224
|
+
*/
|
|
1225
|
+
getMessage(id: string): Promise<InboundMessage>;
|
|
1226
|
+
}
|
|
1227
|
+
|
|
1084
1228
|
/**
|
|
1085
1229
|
* Sequences client for Stack0 Mail API
|
|
1086
1230
|
*/
|
|
@@ -1248,6 +1392,8 @@ declare class Mail {
|
|
|
1248
1392
|
readonly sequences: Sequences;
|
|
1249
1393
|
/** Track and manage custom events */
|
|
1250
1394
|
readonly events: Events;
|
|
1395
|
+
/** Manage agent mailboxes */
|
|
1396
|
+
readonly mailboxes: Mailboxes;
|
|
1251
1397
|
constructor(config: HttpClientConfig);
|
|
1252
1398
|
/**
|
|
1253
1399
|
* Send a single email
|
|
@@ -1340,4 +1486,4 @@ declare class Mail {
|
|
|
1340
1486
|
listSenders(request?: ListSendersRequest): Promise<ListSendersResponse>;
|
|
1341
1487
|
}
|
|
1342
1488
|
|
|
1343
|
-
export { type AddContactToSequenceRequest, type AddContactsToAudienceRequest, type AddContactsToAudienceResponse, type AddDomainRequest, type AddDomainResponse, type ArchiveSequenceResponse, type Attachment, type Audience, type AudienceContact, Audiences, type BatchTrackEventsRequest, type BatchTrackEventsResponse, type Campaign, type CampaignStatsResponse, type CampaignStatus, Campaigns, type CancelCampaignResponse, type CancelEmailResponse, type ConnectionType, type ContactStatus, Contacts, type CreateAudienceRequest, type CreateCampaignRequest, type CreateConnectionRequest, type CreateContactRequest, type CreateEventRequest, type CreateNodeRequest, type CreateSequenceRequest, type CreateTemplateRequest, type DeleteAudienceResponse, type DeleteCampaignResponse, type DeleteConnectionResponse, type DeleteContactResponse, type DeleteDomainResponse, type DeleteEventResponse, type DeleteNodeResponse, type DeleteSequenceResponse, type DeleteTemplateResponse, type DnsRecord, type Domain, type DomainStatus, Domains, type Email, type EmailAddress, type EmailAnalyticsResponse, type EmailRecipient, type EmailStatus, type EventAnalyticsResponse, type EventOccurrence, type EventPropertiesSchema, type EventProperty, Events, type GetDnsRecordsResponse, type GetEmailResponse, type HourlyAnalyticsDataPoint, type HourlyAnalyticsResponse, type ImportContactsRequest, type ImportContactsResponse, type ListAudienceContactsRequest, type ListAudienceContactsResponse, type ListAudiencesRequest, type ListAudiencesResponse, type ListCampaignsRequest, type ListCampaignsResponse, type ListContactsRequest, type ListContactsResponse, type ListDomainsRequest, type ListDomainsResponse, type ListEmailsRequest, type ListEmailsResponse, type ListEventOccurrencesRequest, type ListEventOccurrencesResponse, type ListEventsRequest, type ListEventsResponse, type ListSendersRequest, type ListSendersResponse, type ListSequenceEntriesRequest, type ListSequenceEntriesResponse, type ListSequencesRequest, type ListSequencesResponse, type ListTemplatesRequest, type ListTemplatesResponse, Mail, type MailContact, type MailEvent, type PauseCampaignResponse, type PauseSequenceResponse, type PreviewTemplateRequest, type PreviewTemplateResponse, type PublishSequenceResponse, type RemoveContactFromSequenceRequest, type RemoveContactFromSequenceResponse, type RemoveContactsFromAudienceRequest, type RemoveContactsFromAudienceResponse, type ResendEmailResponse, type ResumeSequenceResponse, type SendBatchEmailRequest, type SendBatchEmailResponse, type SendBroadcastEmailRequest, type SendBroadcastEmailResponse, type SendCampaignRequest, type SendCampaignResponse, type SendEmailRequest, type SendEmailResponse, type Sender, type Sequence, type SequenceAnalyticsResponse, type SequenceConnection, type SequenceEntry, type SequenceEntryStatus, type SequenceNode, type SequenceNodeType, type SequenceStatus, type SequenceTriggerFrequency, type SequenceTriggerType, type SequenceWithNodes, Sequences, type SetDefaultDomainResponse, type SetNodeBranchRequest, type SetNodeEmailRequest, type SetNodeExperimentRequest, type SetNodeFilterRequest, type SetNodeTimerRequest, type Template, Templates, type TimeSeriesAnalyticsRequest, type TimeSeriesAnalyticsResponse, type TimeSeriesDataPoint, type TrackEventRequest, type TrackEventResponse, type UpdateAudienceRequest, type UpdateCampaignRequest, type UpdateContactRequest, type UpdateEventRequest, type UpdateNodePositionRequest, type UpdateNodeRequest, type UpdateSequenceRequest, type UpdateTemplateRequest, type VerifyDomainResponse };
|
|
1489
|
+
export { type AddContactToSequenceRequest, type AddContactsToAudienceRequest, type AddContactsToAudienceResponse, type AddDomainRequest, type AddDomainResponse, type ArchiveSequenceResponse, type Attachment, type Audience, type AudienceContact, Audiences, type BatchTrackEventsRequest, type BatchTrackEventsResponse, type Campaign, type CampaignStatsResponse, type CampaignStatus, Campaigns, type CancelCampaignResponse, type CancelEmailResponse, type ConnectionType, type ContactStatus, Contacts, type CreateAudienceRequest, type CreateCampaignRequest, type CreateConnectionRequest, type CreateContactRequest, type CreateEventRequest, type CreateMailboxRequest, type CreateNodeRequest, type CreateSequenceRequest, type CreateTemplateRequest, type DeleteAudienceResponse, type DeleteCampaignResponse, type DeleteConnectionResponse, type DeleteContactResponse, type DeleteDomainResponse, type DeleteEventResponse, type DeleteNodeResponse, type DeleteSequenceResponse, type DeleteTemplateResponse, type DnsRecord, type Domain, type DomainStatus, Domains, type Email, type EmailAddress, type EmailAnalyticsResponse, type EmailRecipient, type EmailStatus, type EventAnalyticsResponse, type EventOccurrence, type EventPropertiesSchema, type EventProperty, Events, type GetDnsRecordsResponse, type GetEmailResponse, type HourlyAnalyticsDataPoint, type HourlyAnalyticsResponse, type ImportContactsRequest, type ImportContactsResponse, type InboundAttachment, type InboundEmailAddress, type InboundMessage, type InboundWebhookPayload, type ListAudienceContactsRequest, type ListAudienceContactsResponse, type ListAudiencesRequest, type ListAudiencesResponse, type ListCampaignsRequest, type ListCampaignsResponse, type ListContactsRequest, type ListContactsResponse, type ListDomainsRequest, type ListDomainsResponse, type ListEmailsRequest, type ListEmailsResponse, type ListEventOccurrencesRequest, type ListEventOccurrencesResponse, type ListEventsRequest, type ListEventsResponse, type ListInboundMessagesRequest, type ListInboundMessagesResponse, type ListMailboxesRequest, type ListMailboxesResponse, type ListSendersRequest, type ListSendersResponse, type ListSequenceEntriesRequest, type ListSequenceEntriesResponse, type ListSequencesRequest, type ListSequencesResponse, type ListTemplatesRequest, type ListTemplatesResponse, Mail, type MailContact, type MailEvent, type Mailbox, Mailboxes, type PauseCampaignResponse, type PauseSequenceResponse, type PreviewTemplateRequest, type PreviewTemplateResponse, type PublishSequenceResponse, type RemoveContactFromSequenceRequest, type RemoveContactFromSequenceResponse, type RemoveContactsFromAudienceRequest, type RemoveContactsFromAudienceResponse, type ResendEmailResponse, type ResumeSequenceResponse, type SendBatchEmailRequest, type SendBatchEmailResponse, type SendBroadcastEmailRequest, type SendBroadcastEmailResponse, type SendCampaignRequest, type SendCampaignResponse, type SendEmailRequest, type SendEmailResponse, type Sender, type Sequence, type SequenceAnalyticsResponse, type SequenceConnection, type SequenceEntry, type SequenceEntryStatus, type SequenceNode, type SequenceNodeType, type SequenceStatus, type SequenceTriggerFrequency, type SequenceTriggerType, type SequenceWithNodes, Sequences, type SetDefaultDomainResponse, type SetNodeBranchRequest, type SetNodeEmailRequest, type SetNodeExperimentRequest, type SetNodeFilterRequest, type SetNodeTimerRequest, type Template, Templates, type TimeSeriesAnalyticsRequest, type TimeSeriesAnalyticsResponse, type TimeSeriesDataPoint, type TrackEventRequest, type TrackEventResponse, type UpdateAudienceRequest, type UpdateCampaignRequest, type UpdateContactRequest, type UpdateEventRequest, type UpdateMailboxRequest, type UpdateNodePositionRequest, type UpdateNodeRequest, type UpdateSequenceRequest, type UpdateTemplateRequest, type VerifyDomainResponse };
|
package/dist/mail/index.js
CHANGED
|
@@ -418,6 +418,69 @@ var Events = class {
|
|
|
418
418
|
}
|
|
419
419
|
};
|
|
420
420
|
|
|
421
|
+
// src/mail/mailboxes.ts
|
|
422
|
+
var Mailboxes = class {
|
|
423
|
+
constructor(http) {
|
|
424
|
+
this.http = http;
|
|
425
|
+
}
|
|
426
|
+
/**
|
|
427
|
+
* Create a new mailbox
|
|
428
|
+
*/
|
|
429
|
+
async create(request) {
|
|
430
|
+
return this.http.post("/mail/mailboxes", request);
|
|
431
|
+
}
|
|
432
|
+
/**
|
|
433
|
+
* Get a mailbox by ID
|
|
434
|
+
*/
|
|
435
|
+
async get(id) {
|
|
436
|
+
return this.http.get(`/mail/mailboxes/${id}`);
|
|
437
|
+
}
|
|
438
|
+
/**
|
|
439
|
+
* List mailboxes with optional filters
|
|
440
|
+
*/
|
|
441
|
+
async list(request) {
|
|
442
|
+
const params = new URLSearchParams();
|
|
443
|
+
if (request?.projectSlug) params.set("projectSlug", request.projectSlug);
|
|
444
|
+
if (request?.environment) params.set("environment", request.environment);
|
|
445
|
+
if (request?.domain) params.set("domain", request.domain);
|
|
446
|
+
if (request?.status) params.set("status", request.status);
|
|
447
|
+
if (request?.limit) params.set("limit", String(request.limit));
|
|
448
|
+
if (request?.cursor) params.set("cursor", request.cursor);
|
|
449
|
+
const qs = params.toString();
|
|
450
|
+
return this.http.get(`/mail/mailboxes${qs ? `?${qs}` : ""}`);
|
|
451
|
+
}
|
|
452
|
+
/**
|
|
453
|
+
* Update a mailbox
|
|
454
|
+
*/
|
|
455
|
+
async update(request) {
|
|
456
|
+
const { id, ...data } = request;
|
|
457
|
+
return this.http.patch(`/mail/mailboxes/${id}`, data);
|
|
458
|
+
}
|
|
459
|
+
/**
|
|
460
|
+
* Delete a mailbox
|
|
461
|
+
*/
|
|
462
|
+
async delete(id) {
|
|
463
|
+
return this.http.delete(`/mail/mailboxes/${id}`);
|
|
464
|
+
}
|
|
465
|
+
/**
|
|
466
|
+
* List inbound messages across mailboxes
|
|
467
|
+
*/
|
|
468
|
+
async listMessages(request) {
|
|
469
|
+
const params = new URLSearchParams();
|
|
470
|
+
if (request?.mailboxId) params.set("mailboxId", request.mailboxId);
|
|
471
|
+
if (request?.limit) params.set("limit", String(request.limit));
|
|
472
|
+
if (request?.cursor) params.set("cursor", request.cursor);
|
|
473
|
+
const qs = params.toString();
|
|
474
|
+
return this.http.get(`/mail/mailboxes/messages${qs ? `?${qs}` : ""}`);
|
|
475
|
+
}
|
|
476
|
+
/**
|
|
477
|
+
* Get an inbound message by ID
|
|
478
|
+
*/
|
|
479
|
+
async getMessage(id) {
|
|
480
|
+
return this.http.get(`/mail/mailboxes/messages/${id}`);
|
|
481
|
+
}
|
|
482
|
+
};
|
|
483
|
+
|
|
421
484
|
// src/mail/sequences.ts
|
|
422
485
|
var Sequences = class {
|
|
423
486
|
constructor(http) {
|
|
@@ -700,6 +763,8 @@ var Mail = class {
|
|
|
700
763
|
sequences;
|
|
701
764
|
/** Track and manage custom events */
|
|
702
765
|
events;
|
|
766
|
+
/** Manage agent mailboxes */
|
|
767
|
+
mailboxes;
|
|
703
768
|
constructor(config) {
|
|
704
769
|
this.http = new HttpClient(config);
|
|
705
770
|
this.domains = new Domains(this.http);
|
|
@@ -709,6 +774,7 @@ var Mail = class {
|
|
|
709
774
|
this.campaigns = new Campaigns(this.http);
|
|
710
775
|
this.sequences = new Sequences(this.http);
|
|
711
776
|
this.events = new Events(this.http);
|
|
777
|
+
this.mailboxes = new Mailboxes(this.http);
|
|
712
778
|
}
|
|
713
779
|
// ============================================================================
|
|
714
780
|
// TRANSACTIONAL EMAILS
|
|
@@ -862,6 +928,7 @@ exports.Contacts = Contacts;
|
|
|
862
928
|
exports.Domains = Domains;
|
|
863
929
|
exports.Events = Events;
|
|
864
930
|
exports.Mail = Mail;
|
|
931
|
+
exports.Mailboxes = Mailboxes;
|
|
865
932
|
exports.Sequences = Sequences;
|
|
866
933
|
exports.Templates = Templates;
|
|
867
934
|
//# sourceMappingURL=index.js.map
|