Compare commits
3 Commits
c12b24b284
...
1f69c9c1cc
Author | SHA1 | Date |
---|---|---|
Derrick Hammer | 1f69c9c1cc | |
Derrick Hammer | db2212ab70 | |
Derrick Hammer | dcd1fdc705 |
|
@ -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
|
||||
> {
|
||||
|
|
|
@ -54,6 +54,12 @@ paths:
|
|||
responses:
|
||||
"200":
|
||||
description: Email verified successfully
|
||||
/api/account/verify-email/resend:
|
||||
post:
|
||||
summary: Resend email verification
|
||||
responses:
|
||||
"200":
|
||||
description: Email verification resent successfully
|
||||
/api/auth/otp/generate:
|
||||
get:
|
||||
summary: Generate OTP for two-factor authentication
|
||||
|
@ -182,6 +188,16 @@ paths:
|
|||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/UploadLimitResponse"
|
||||
/api/meta:
|
||||
get:
|
||||
summary: Get metadata about the portal
|
||||
responses:
|
||||
"200":
|
||||
description: Metadata retrieved successfully
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/MetaResponse"
|
||||
|
||||
components:
|
||||
schemas:
|
||||
|
@ -317,3 +333,10 @@ components:
|
|||
type: number
|
||||
required:
|
||||
- limit
|
||||
MetaResponse:
|
||||
type: object
|
||||
required:
|
||||
- domain
|
||||
properties:
|
||||
domain:
|
||||
type: string
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
export * from './sdk.js';
|
||||
export * from './account/generated/openapi.schemas.js';
|
||||
export * from './protocol/index.js';
|
||||
export { AccountError } from './account.js';
|
||||
export * from "./sdk.js";
|
||||
export * from "./account/generated/openapi.schemas.js";
|
||||
export * from "./protocol/index.js";
|
||||
export { AccountError } from "./account.js";
|
||||
|
|
Loading…
Reference in New Issue