Compare commits
3 Commits
c12b24b284
...
1f69c9c1cc
Author | SHA1 | Date |
---|---|---|
Derrick Hammer | 1f69c9c1cc | |
Derrick Hammer | db2212ab70 | |
Derrick Hammer | dcd1fdc705 |
|
@ -10,6 +10,7 @@ import {
|
||||||
PasswordResetVerifyRequest,
|
PasswordResetVerifyRequest,
|
||||||
PingResponse,
|
PingResponse,
|
||||||
postApiAccountPasswordResetRequest,
|
postApiAccountPasswordResetRequest,
|
||||||
|
postApiAccountVerifyEmailResend,
|
||||||
postApiAuthPing,
|
postApiAuthPing,
|
||||||
RegisterRequest,
|
RegisterRequest,
|
||||||
UploadLimitResponse,
|
UploadLimitResponse,
|
||||||
|
@ -124,6 +125,19 @@ export class AccountApi {
|
||||||
return this.checkSuccessBool(ret);
|
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<
|
public async generateOtp(): Promise<
|
||||||
boolean | OTPGenerateResponse | AccountError
|
boolean | OTPGenerateResponse | AccountError
|
||||||
> {
|
> {
|
||||||
|
|
|
@ -54,6 +54,12 @@ paths:
|
||||||
responses:
|
responses:
|
||||||
"200":
|
"200":
|
||||||
description: Email verified successfully
|
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:
|
/api/auth/otp/generate:
|
||||||
get:
|
get:
|
||||||
summary: Generate OTP for two-factor authentication
|
summary: Generate OTP for two-factor authentication
|
||||||
|
@ -182,6 +188,16 @@ paths:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
$ref: "#/components/schemas/UploadLimitResponse"
|
$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:
|
components:
|
||||||
schemas:
|
schemas:
|
||||||
|
@ -317,3 +333,10 @@ components:
|
||||||
type: number
|
type: number
|
||||||
required:
|
required:
|
||||||
- limit
|
- limit
|
||||||
|
MetaResponse:
|
||||||
|
type: object
|
||||||
|
required:
|
||||||
|
- domain
|
||||||
|
properties:
|
||||||
|
domain:
|
||||||
|
type: string
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
export * from './sdk.js';
|
export * from "./sdk.js";
|
||||||
export * from './account/generated/openapi.schemas.js';
|
export * from "./account/generated/openapi.schemas.js";
|
||||||
export * from './protocol/index.js';
|
export * from "./protocol/index.js";
|
||||||
export { AccountError } from './account.js';
|
export { AccountError } from "./account.js";
|
||||||
|
|
Loading…
Reference in New Issue