External module "src/crud/email"
Functions
Const checkIfNewEmail
- checkIfNewEmail(email: string): Promise<void>
-
Parameters
Returns Promise<void>
Const createEmail
- createEmail(email: Email, sendVerification?: boolean, sendPasswordSet?: boolean): Promise<InsertResult>
-
Parameters
-
-
Default value sendVerification: boolean = true
-
Default value sendPasswordSet: boolean = false
Const deleteAllUserEmails
- deleteAllUserEmails(userId: string): Promise<any>
-
Parameters
Returns Promise<any>
Const deleteEmail
- deleteEmail(id: string): Promise<any>
-
Parameters
Returns Promise<any>
Const getEmail
- getEmail(id: string): Promise<Email>
-
Parameters
Returns Promise<Email>
Const getEmailObject
- getEmailObject(email: string): Promise<Email>
-
Parameters
Returns Promise<Email>
Const getUserBestEmail
- getUserBestEmail(userId: string): Promise<string>
-
Parameters
Returns Promise<string>
Const getUserEmails
- getUserEmails(userId: string): Promise<Email[]>
-
Parameters
Returns Promise<Email[]>
Const getUserPrimaryEmail
- getUserPrimaryEmail(user: User | string): Promise<string>
-
Parameters
Returns Promise<string>
Const getUserPrimaryEmailObject
- getUserPrimaryEmailObject(user: User | string): Promise<Email>
-
Parameters
Returns Promise<Email>
Const getUserVerifiedEmails
- getUserVerifiedEmails(user: User | string): Promise<Email[]>
-
Parameters
Returns Promise<Email[]>
Const getVerifiedEmailObject
- getVerifiedEmailObject(email: string): Promise<Email>
-
Parameters
Returns Promise<Email>
Const resendEmailVerification
- resendEmailVerification(id: string): Promise<void>
-
Parameters
Returns Promise<void>
Const sendEmailVerification
- sendEmailVerification(id: string, email: string, user: User): Promise<void>
-
Parameters
Returns Promise<void>
Const updateEmail
- updateEmail(id: string, email: KeyValue): Promise<any>
-
Parameters
Returns Promise<any>
Create a new email for a user