Compare commits
1 Commits
1f69c9c1cc
...
c12b24b284
Author | SHA1 | Date |
---|---|---|
Derrick Hammer | c12b24b284 |
|
@ -10,7 +10,6 @@ import {
|
|||
PasswordResetVerifyRequest,
|
||||
PingResponse,
|
||||
postApiAccountPasswordResetRequest,
|
||||
postApiAccountVerifyEmailResend,
|
||||
postApiAuthPing,
|
||||
RegisterRequest,
|
||||
UploadLimitResponse,
|
||||
|
@ -125,19 +124,6 @@ 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
|
||||
> {
|
||||
|
|
|
@ -12,21 +12,21 @@ paths:
|
|||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/LoginRequest"
|
||||
$ref: '#/components/schemas/LoginRequest'
|
||||
responses:
|
||||
"200":
|
||||
'200':
|
||||
description: Successfully logged in
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/LoginResponse"
|
||||
"401":
|
||||
$ref: '#/components/schemas/LoginResponse'
|
||||
'401':
|
||||
description: Unauthorized
|
||||
/api/auth/logout:
|
||||
post:
|
||||
summary: Logout of account service
|
||||
responses:
|
||||
"200":
|
||||
'200':
|
||||
description: Successfully logged out
|
||||
/api/auth/register:
|
||||
post:
|
||||
|
@ -36,11 +36,11 @@ paths:
|
|||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/RegisterRequest"
|
||||
$ref: '#/components/schemas/RegisterRequest'
|
||||
responses:
|
||||
"200":
|
||||
'200':
|
||||
description: Successfully registered
|
||||
"400":
|
||||
'400':
|
||||
description: Bad Request
|
||||
/api/account/verify-email:
|
||||
post:
|
||||
|
@ -50,26 +50,26 @@ paths:
|
|||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/VerifyEmailRequest"
|
||||
$ref: '#/components/schemas/VerifyEmailRequest'
|
||||
responses:
|
||||
"200":
|
||||
'200':
|
||||
description: Email verified successfully
|
||||
/api/account/verify-email/resend:
|
||||
post:
|
||||
summary: Resend email verification
|
||||
responses:
|
||||
"200":
|
||||
'200':
|
||||
description: Email verification resent successfully
|
||||
/api/auth/otp/generate:
|
||||
get:
|
||||
summary: Generate OTP for two-factor authentication
|
||||
responses:
|
||||
"200":
|
||||
'200':
|
||||
description: OTP generated successfully
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/OTPGenerateResponse"
|
||||
$ref: '#/components/schemas/OTPGenerateResponse'
|
||||
/api/account/otp/verify:
|
||||
post:
|
||||
summary: Verify OTP for enabling two-factor authentication
|
||||
|
@ -78,9 +78,9 @@ paths:
|
|||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/OTPVerifyRequest"
|
||||
$ref: '#/components/schemas/OTPVerifyRequest'
|
||||
responses:
|
||||
"200":
|
||||
'200':
|
||||
description: OTP verified successfully
|
||||
/api/account/otp/validate:
|
||||
post:
|
||||
|
@ -90,9 +90,9 @@ paths:
|
|||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/OTPValidateRequest"
|
||||
$ref: '#/components/schemas/OTPValidateRequest'
|
||||
responses:
|
||||
"200":
|
||||
'200':
|
||||
description: OTP validated successfully
|
||||
/api/auth/otp/disable:
|
||||
post:
|
||||
|
@ -102,9 +102,9 @@ paths:
|
|||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/OTPDisableRequest"
|
||||
$ref: '#/components/schemas/OTPDisableRequest'
|
||||
responses:
|
||||
"200":
|
||||
'200':
|
||||
description: OTP disabled successfully
|
||||
/api/account/password-reset/request:
|
||||
post:
|
||||
|
@ -114,9 +114,9 @@ paths:
|
|||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/PasswordResetRequest"
|
||||
$ref: '#/components/schemas/PasswordResetRequest'
|
||||
responses:
|
||||
"200":
|
||||
'200':
|
||||
description: Password reset requested successfully
|
||||
/api/account/password-reset/confirm:
|
||||
post:
|
||||
|
@ -126,33 +126,33 @@ paths:
|
|||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/PasswordResetVerifyRequest"
|
||||
$ref: '#/components/schemas/PasswordResetVerifyRequest'
|
||||
responses:
|
||||
"200":
|
||||
'200':
|
||||
description: Password reset successfully
|
||||
/api/auth/ping:
|
||||
post:
|
||||
summary: Auth check endpoint
|
||||
responses:
|
||||
"200":
|
||||
'200':
|
||||
description: Pong
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/PingResponse"
|
||||
"401":
|
||||
$ref: '#/components/schemas/PingResponse'
|
||||
'401':
|
||||
description: Unauthorized
|
||||
/api/account:
|
||||
get:
|
||||
summary: Get account information
|
||||
responses:
|
||||
"200":
|
||||
'200':
|
||||
description: Account information retrieved successfully
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/AccountInfoResponse"
|
||||
"401":
|
||||
$ref: '#/components/schemas/AccountInfoResponse'
|
||||
'401':
|
||||
description: Unauthorized
|
||||
/api/account/update-email:
|
||||
post:
|
||||
|
@ -162,9 +162,9 @@ paths:
|
|||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/UpdateEmailRequest"
|
||||
$ref: '#/components/schemas/UpdateEmailRequest'
|
||||
responses:
|
||||
"200":
|
||||
'200':
|
||||
description: Email updated successfully
|
||||
/api/account/update-password:
|
||||
post:
|
||||
|
@ -174,30 +174,31 @@ paths:
|
|||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/UpdatePasswordRequest"
|
||||
$ref: '#/components/schemas/UpdatePasswordRequest'
|
||||
responses:
|
||||
"200":
|
||||
'200':
|
||||
description: Password updated successfully
|
||||
/api/upload-limit:
|
||||
get:
|
||||
summary: Get the basic file upload (POST) upload limit set by the portal
|
||||
responses:
|
||||
"200":
|
||||
'200':
|
||||
description: Upload limit retrieved successfully
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/UploadLimitResponse"
|
||||
$ref: '#/components/schemas/UploadLimitResponse'
|
||||
/api/meta:
|
||||
get:
|
||||
summary: Get metadata about the portal
|
||||
responses:
|
||||
"200":
|
||||
'200':
|
||||
description: Metadata retrieved successfully
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/MetaResponse"
|
||||
$ref: '#/components/schemas/MetaResponse'
|
||||
|
||||
|
||||
components:
|
||||
schemas:
|
||||
|
|
|
@ -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