Constructors
constructor
- new SecrecyMailClient(client, keys, apiClient): SecrecyMailClient
Parameters
- client: SecrecyClient
- keys: {
privateKey: string;
publicKey: string;
}privateKey: string
publicKey: string
- apiClient: DecoratedProcedureRecord<CreateRouterInner<RootConfig<{}>, {}>, {}>
Methods
create
- create(data, customMessage?): Promise<boolean>
Parameters
- data: NewMail
Optional
customMessage: null | string
Returns Promise<boolean>
createDraft
- createDraft(__namedParameters): Promise<DraftMail>
delete
- delete(__namedParameters): Promise<boolean>
Parameters
- __namedParameters: {
mailId: string;
}
Returns Promise<boolean>
deletedMails
- deletedMails(__namedParameters): Promise<Mail[]>
Parameters
- __namedParameters: {
mailType: "sent" | "received";
}mailType: "sent" | "received"
Returns Promise<Mail[]>
deleteDraft
- deleteDraft(draftId): Promise<boolean>
Returns Promise<boolean>
deleteTrash
- deleteTrash(__namedParameters): Promise<boolean>
Parameters
- __namedParameters: {
ids: string[];
}
Returns Promise<boolean>
emptyTrash
- emptyTrash(): Promise<boolean>
Returns Promise<boolean>
get
- get(__namedParameters): Promise<Mail>
Parameters
- __namedParameters: {
id: string;
}
Returns Promise<Mail>
read
- read(__namedParameters): Promise<boolean>
Parameters
- __namedParameters: {
mailId: string;
}
Returns Promise<boolean>
recover
- recover(__namedParameters): Promise<boolean>
Parameters
- __namedParameters: {
mailId: string;
}
Returns Promise<boolean>
sendDraft
- sendDraft(draftId, customMessage?): Promise<boolean>
Parameters
- draftId: string
Optional
customMessage: null | string
Returns Promise<boolean>
sendWaitingEmails
- sendWaitingEmails(): Promise<void>
Returns Promise<void>
unread
- unread(__namedParameters): Promise<boolean>
Parameters
- __namedParameters: {
mailId: string;
}
Returns Promise<boolean>
unreadReceivedMailsCount
- unreadReceivedMailsCount(): Promise<number>
Returns Promise<number>
updateDraft
- updateDraft(draftId, __namedParameters): Promise<DraftMail>
Parameters
- draftId: string
- __namedParameters: Partial<NewMail>