Files
kotosoft-id/kotosoft-id-frontend/types.ts
T
2026-03-09 20:07:49 +03:00

54 lines
883 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 interface Permission {
id: string;
code: string;
description: string;
created_at: string;
}
export interface Position {
code: string;
name: string;
description?: string | null;
permissions: Permission[];
}
export const localeMap = {
ru,
en: enUS,
it,
};