mirror of
https://github.com/directus/directus.git
synced 2026-04-25 03:00:53 -04:00
Augment types for m2a
This commit is contained in:
@@ -11,6 +11,20 @@ export type M2ONode = {
|
||||
parentKey: string;
|
||||
};
|
||||
|
||||
export type M2ANode = {
|
||||
type: 'm2a';
|
||||
name: string;
|
||||
children: {
|
||||
[collection: string]: (NestedCollectionNode | FieldNode)[];
|
||||
};
|
||||
query: {
|
||||
[collection: string]: Query;
|
||||
};
|
||||
fieldKey: string;
|
||||
relation: Relation;
|
||||
parentKey: string;
|
||||
};
|
||||
|
||||
export type O2MNode = {
|
||||
type: 'o2m';
|
||||
name: string;
|
||||
@@ -21,7 +35,7 @@ export type O2MNode = {
|
||||
parentKey: string;
|
||||
};
|
||||
|
||||
export type NestedCollectionNode = M2ONode | O2MNode;
|
||||
export type NestedCollectionNode = M2ONode | O2MNode | M2ANode;
|
||||
|
||||
export type FieldNode = {
|
||||
type: 'field';
|
||||
|
||||
@@ -5,7 +5,10 @@ export type Relation = {
|
||||
many_field: string;
|
||||
many_primary: string;
|
||||
|
||||
one_collection: string;
|
||||
one_field: string;
|
||||
one_primary: string;
|
||||
one_collection: string | null;
|
||||
one_field: string | null;
|
||||
one_primary: string | null;
|
||||
|
||||
one_collection_field: string | null;
|
||||
one_allowed_collections: string | null;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user