57 lines
981 B
TypeScript
57 lines
981 B
TypeScript
import { enUS, it, ru } from "date-fns/locale";
|
|
|
|
export enum Sex {
|
|
MALE = "MALE",
|
|
FEMALE = "FEMALE"
|
|
}
|
|
|
|
export interface User {
|
|
id: string;
|
|
email: string;
|
|
first_name: string;
|
|
second_name: string;
|
|
birth_date: string;
|
|
sex: Sex;
|
|
is_admin: boolean;
|
|
}
|
|
|
|
export interface OAuthSession {
|
|
client_id: string;
|
|
client_name: string;
|
|
redirect_uri: string;
|
|
scopes: string[];
|
|
state: string;
|
|
user_id?: string;
|
|
}
|
|
|
|
export interface Consent {
|
|
client_id: string;
|
|
client_name: string;
|
|
scopes: string[];
|
|
authorized_at: string;
|
|
last_used_at: string | null;
|
|
isRevokable: boolean;
|
|
}
|
|
|
|
export const localeMap = {
|
|
ru,
|
|
en: enUS,
|
|
it,
|
|
};
|
|
|
|
export interface OAuthClient {
|
|
id: string;
|
|
client_id: string;
|
|
name: string;
|
|
redirect_uris: string[];
|
|
grant_types: string[];
|
|
scopes: string[];
|
|
trusted: boolean;
|
|
is_active: boolean;
|
|
created_at: string;
|
|
updated_at: string;
|
|
}
|
|
|
|
export interface CreatedOAuthClient extends OAuthClient {
|
|
client_secret: string;
|
|
} |