UNPKG

@directus/api

Version:

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

55 lines (54 loc) 1.58 kB
import type { Field, Relation } from '@directus/types'; import { z } from 'zod'; import type { Collection } from '../../../types/collection.js'; export interface fieldOverviewOutput { type: string; primary_key?: boolean; required?: boolean; readonly?: boolean; note?: string; interface?: { type: string; choices?: Array<string | number>; }; relation?: { type: string; related_collection?: string; many_collection?: string; many_field?: string; one_allowed_collections?: string[]; junction?: { collection: string; many_field: string; junction_field: string; one_collection_field?: string; sort_field?: string; }; }; fields?: Record<string, fieldOverviewOutput>; value?: string; } export interface OverviewOutput { [collection: string]: { [field: string]: fieldOverviewOutput; }; } export interface LightweightOverview { collections: string[]; collection_folders: string[]; notes: Record<string, string>; } export interface SchemaToolSnapshot { collections: Collection[]; fields: Field[]; relations: Relation[]; } export declare const SchemaValidateSchema: z.ZodObject<{ keys: z.ZodOptional<z.ZodArray<z.ZodString>>; }, z.core.$strict>; export declare const SchemaInputSchema: z.ZodObject<{ keys: z.ZodOptional<z.ZodArray<z.ZodString>>; }, z.core.$strip>; export declare const schema: import("../types.js").ToolConfig<{ keys?: string[] | undefined; }>;