@directus/api
Version:
Directus is a real-time API and App dashboard for managing SQL database content
74 lines (73 loc) • 3.02 kB
TypeScript
export declare const relations: import("../types.js").ToolConfig<{
action: "create";
collection: string;
data: {
collection: string;
field: string;
related_collection: string | null;
meta: {
id?: number | undefined;
many_collection?: string | undefined;
many_field?: string | undefined;
one_collection?: string | null | undefined;
one_field?: string | null | undefined;
one_collection_field?: string | null | undefined;
one_allowed_collections?: string[] | null | undefined;
one_deselect_action?: "nullify" | "delete" | undefined;
junction_field?: string | null | undefined;
sort_field?: string | null | undefined;
system?: boolean | undefined;
} | null;
schema?: {
table?: string | undefined;
column?: string | undefined;
foreign_key_table?: string | undefined;
foreign_key_column?: string | undefined;
foreign_key_schema?: string | undefined;
constraint_name?: string | null | undefined;
on_update?: "NO ACTION" | "RESTRICT" | "CASCADE" | "SET NULL" | "SET DEFAULT" | null | undefined;
on_delete?: "NO ACTION" | "RESTRICT" | "CASCADE" | "SET NULL" | "SET DEFAULT" | null | undefined;
} | null | undefined;
};
field?: string | undefined;
} | {
action: "read";
collection?: string | undefined;
field?: string | undefined;
} | {
action: "update";
collection: string;
field: string;
data?: {
collection: string;
field: string;
related_collection?: string | null | undefined;
schema?: {
table?: string | undefined;
column?: string | undefined;
foreign_key_table?: string | undefined;
foreign_key_column?: string | undefined;
foreign_key_schema?: string | undefined;
constraint_name?: string | null | undefined;
on_update?: "NO ACTION" | "RESTRICT" | "CASCADE" | "SET NULL" | "SET DEFAULT" | null | undefined;
on_delete?: "NO ACTION" | "RESTRICT" | "CASCADE" | "SET NULL" | "SET DEFAULT" | null | undefined;
} | null | undefined;
meta?: {
id?: number | undefined;
many_collection?: string | undefined;
many_field?: string | undefined;
one_collection?: string | null | undefined;
one_field?: string | null | undefined;
one_collection_field?: string | null | undefined;
one_allowed_collections?: string[] | null | undefined;
one_deselect_action?: "nullify" | "delete" | undefined;
junction_field?: string | null | undefined;
sort_field?: string | null | undefined;
system?: boolean | undefined;
} | null | undefined;
} | undefined;
} | {
action: "delete";
collection: string;
field: string;
}>;