mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-05-03 21:02:40 +02:00
add auth api service
This commit is contained in:
parent
c8fae413d2
commit
4d02c2eeed
3 changed files with 84 additions and 55 deletions
34
surfsense_web/lib/apis/auth/contracts.ts
Normal file
34
surfsense_web/lib/apis/auth/contracts.ts
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
/**
|
||||
* LOGIN
|
||||
*/
|
||||
export type LoginRequest = {
|
||||
email: string;
|
||||
password: string;
|
||||
grant_type?: string;
|
||||
};
|
||||
|
||||
export type LoginResponse = {
|
||||
access_token: string;
|
||||
token_type: string;
|
||||
};
|
||||
|
||||
/**
|
||||
* REGISTER
|
||||
*/
|
||||
export type RegisterRequest = {
|
||||
email: string;
|
||||
password: string;
|
||||
is_active: boolean;
|
||||
is_superuser: boolean;
|
||||
is_verified: boolean;
|
||||
};
|
||||
|
||||
export type RegisterResponse = {
|
||||
id: number;
|
||||
email: string;
|
||||
is_active: boolean;
|
||||
is_superuser: boolean;
|
||||
is_verified: boolean;
|
||||
pages_limit: number;
|
||||
pages_used: number;
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue