feat: add requestEmailVerification
This commit is contained in:
parent
dcd1fdc705
commit
db2212ab70
|
@ -10,6 +10,7 @@ import {
|
|||
PasswordResetVerifyRequest,
|
||||
PingResponse,
|
||||
postApiAccountPasswordResetRequest,
|
||||
postApiAccountVerifyEmailResend,
|
||||
postApiAuthPing,
|
||||
RegisterRequest,
|
||||
UploadLimitResponse,
|
||||
|
@ -124,6 +125,19 @@ export class AccountApi {
|
|||
return this.checkSuccessBool(ret);
|
||||
}
|
||||
|
||||
public async requestEmailVerification(): Promise<boolean | AccountError> {
|
||||
let ret: AxiosResponse<void>;
|
||||
try {
|
||||
ret = await postApiAccountVerifyEmailResend(this.buildOptions());
|
||||
} catch (e) {
|
||||
return new AccountError(
|
||||
(e as AxiosError).response?.data as string,
|
||||
(e as AxiosError).response?.status as number,
|
||||
);
|
||||
}
|
||||
return this.checkSuccessBool(ret);
|
||||
}
|
||||
|
||||
public async generateOtp(): Promise<
|
||||
boolean | OTPGenerateResponse | AccountError
|
||||
> {
|
||||
|
|
Loading…
Reference in New Issue