mirror of
https://github.com/spacebarchat/server.git
synced 2026-04-04 21:45:44 +00:00
auth routes
This commit is contained in:
@@ -58,6 +58,7 @@ export * from "./PurgeSchema";
|
||||
export * from "./RegisterSchema";
|
||||
export * from "./RelationshipPostSchema";
|
||||
export * from "./RelationshipPutSchema";
|
||||
export * from "./responses";
|
||||
export * from "./RoleModifySchema";
|
||||
export * from "./RolePositionUpdateSchema";
|
||||
export * from "./SelectProtocolSchema";
|
||||
|
||||
6
src/util/schemas/responses/APIErrorOrCaptchaResponse.ts
Normal file
6
src/util/schemas/responses/APIErrorOrCaptchaResponse.ts
Normal file
@@ -0,0 +1,6 @@
|
||||
import { APIErrorResponse } from "./APIErrorResponse";
|
||||
import { CaptchaRequiredResponse } from "./CaptchaRequiredResponse";
|
||||
|
||||
export type APIErrorOrCaptchaResponse =
|
||||
| CaptchaRequiredResponse
|
||||
| APIErrorResponse;
|
||||
12
src/util/schemas/responses/APIErrorResponse.ts
Normal file
12
src/util/schemas/responses/APIErrorResponse.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
export interface APIErrorResponse {
|
||||
code: number;
|
||||
message: string;
|
||||
errors: {
|
||||
[key: string]: {
|
||||
_errors: {
|
||||
message: string;
|
||||
code: string;
|
||||
}[];
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
export interface BackupCodesChallengeResponse {
|
||||
nonce: string;
|
||||
regenerate_nonce: string;
|
||||
}
|
||||
5
src/util/schemas/responses/CaptchaRequiredResponse.ts
Normal file
5
src/util/schemas/responses/CaptchaRequiredResponse.ts
Normal file
@@ -0,0 +1,5 @@
|
||||
export interface CaptchaRequiredResponse {
|
||||
captcha_key: string;
|
||||
captcha_sitekey: string;
|
||||
captcha_service: string;
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
export interface GenerateRegistrationTokensResponse {
|
||||
tokens: string[];
|
||||
}
|
||||
5
src/util/schemas/responses/LocationMetadataResponse.ts
Normal file
5
src/util/schemas/responses/LocationMetadataResponse.ts
Normal file
@@ -0,0 +1,5 @@
|
||||
export interface LocationMetadataResponse {
|
||||
consent_required: boolean;
|
||||
country_code: string;
|
||||
promotional_email_opt_in: { required: true; pre_checked: false };
|
||||
}
|
||||
6
src/util/schemas/responses/TokenResponse.ts
Normal file
6
src/util/schemas/responses/TokenResponse.ts
Normal file
@@ -0,0 +1,6 @@
|
||||
import { UserSettings } from "../../entities";
|
||||
|
||||
export interface TokenResponse {
|
||||
token: string;
|
||||
settings: UserSettings;
|
||||
}
|
||||
7
src/util/schemas/responses/index.ts
Normal file
7
src/util/schemas/responses/index.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
export * from "./APIErrorOrCaptchaResponse";
|
||||
export * from "./APIErrorResponse";
|
||||
export * from "./BackupCodesChallengeResponse";
|
||||
export * from "./CaptchaRequiredResponse";
|
||||
export * from "./GenerateRegistrationTokensResponse";
|
||||
export * from "./LocationMetadataResponse";
|
||||
export * from "./TokenResponse";
|
||||
Reference in New Issue
Block a user