@secrecy/lib 1.63.0-feat-orgs.5 → 1.63.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.
|
@@ -36,7 +36,11 @@ export class SecrecyMailClient {
|
|
|
36
36
|
}
|
|
37
37
|
async create(data, customMessage) {
|
|
38
38
|
const mail = await this.createDraft(data);
|
|
39
|
-
|
|
39
|
+
const isSent = await this.sendDraft(mail.mailIntegrityId, customMessage);
|
|
40
|
+
if (!isSent) {
|
|
41
|
+
throw new Error('The mail does not sent!');
|
|
42
|
+
}
|
|
43
|
+
return { ...mail, type: 'sent' };
|
|
40
44
|
}
|
|
41
45
|
async waitingReceivedMails() {
|
|
42
46
|
const waitingReceivedMails = await this.#apiClient.mail.waitingReceived.query({});
|
|
@@ -24,7 +24,7 @@ export declare class BaseClient {
|
|
|
24
24
|
static getUser(userId: string, opts?: CreateTrpcClientOptions): Promise<PublicUser>;
|
|
25
25
|
getUser(userId: string): Promise<PublicUser>;
|
|
26
26
|
searchUsers(search: string): Promise<PublicUser[]>;
|
|
27
|
-
updateProfile(data: RouterInputs['user']['updateProfile']): Promise<Omit<SelfUser, 'account'
|
|
27
|
+
updateProfile(data: RouterInputs['user']['updateProfile']): Promise<Omit<SelfUser, 'account'>>;
|
|
28
28
|
static isCryptoTransactionDone({ idOrHash, network, opts, }: {
|
|
29
29
|
idOrHash: string;
|
|
30
30
|
network?: InfuraNetwork;
|
|
@@ -14,7 +14,7 @@ export declare class SecrecyMailClient {
|
|
|
14
14
|
deletedMails({ mailType, }: {
|
|
15
15
|
mailType: ApiMail['type'];
|
|
16
16
|
}): Promise<Mail[]>;
|
|
17
|
-
create(data: NewMail, customMessage?: string | null | undefined): Promise<
|
|
17
|
+
create(data: NewMail, customMessage?: string | null | undefined): Promise<SentMail>;
|
|
18
18
|
waitingReceivedMails(): Promise<WaitingReceivedMail[]>;
|
|
19
19
|
updateDraft(draftId: string, { body, subject, senderFiles, recipients, replyToId }: Partial<NewMail>): Promise<DraftMail>;
|
|
20
20
|
deleteDraft(draftId: string): Promise<boolean>;
|