Compare commits

...

3 Commits

Author SHA1 Message Date
Derrick Hammer 1f69c9c1cc
style: prettier 2024-03-26 15:18:48 -04:00
Derrick Hammer db2212ab70
feat: add requestEmailVerification 2024-03-26 15:18:29 -04:00
Derrick Hammer dcd1fdc705
chore: update swagger.yaml 2024-03-26 15:17:59 -04:00
3 changed files with 41 additions and 4 deletions

View File

@ -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
> {

View File

@ -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

View File

@ -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";