Added totp/mail otp, split up dto and api into multiple files

This commit is contained in:
2022-08-24 16:15:33 +02:00
parent af1df3e508
commit cd0d25ba4f
30 changed files with 535 additions and 379 deletions

10
dto/requests/auth.ts Normal file
View File

@@ -0,0 +1,10 @@
import { BaseRequest } from './base';
export interface AuthSignUpRequest extends BaseRequest {
username: string;
password: string;
}
export interface AuthLoginRequest extends AuthSignUpRequest {
otp?: string;
}

2
dto/requests/base.ts Normal file
View File

@@ -0,0 +1,2 @@
// eslint-disable-next-line @typescript-eslint/no-empty-interface
export interface BaseRequest {}

12
dto/requests/fs.ts Normal file
View File

@@ -0,0 +1,12 @@
import { BaseRequest } from './base';
export type CreateFileRequest = CreateFolderRequest;
export interface CreateFolderRequest extends BaseRequest {
parent: number;
name: string;
}
export interface DeleteRequest extends BaseRequest {
node: number;
}

3
dto/requests/index.ts Normal file
View File

@@ -0,0 +1,3 @@
export * from './base';
export * as Auth from './auth';
export * as FS from './fs';