UNPKG

@directus/api

Version:

Directus is a real-time API and App dashboard for managing SQL database content

43 lines (42 loc) 1.09 kB
import type { Knex } from 'knex'; export interface AuthDriverOptions { knex: Knex; } export interface User { id: string; first_name: string | null; last_name: string | null; email: string | null; password: string | null; status: 'active' | 'suspended' | 'invited'; role: string | null; provider: string; external_identifier: string | null; auth_data: string | Record<string, unknown> | null; app_access: boolean; admin_access: boolean; } export type AuthData = Record<string, any> | null; export interface Session { token: string; expires: Date; share: string; } export type DirectusTokenPayload = { id?: string; role: string | null; app_access: boolean | number; admin_access: boolean | number; share?: string; session?: string; enforce_tfa?: boolean; }; export type ShareData = { share_id: string; share_start: Date; share_end: Date; share_times_used: number; share_max_uses?: number; share_password?: string; }; export type AuthenticationMode = 'json' | 'cookie' | 'session';