Augment types for m2a

This commit is contained in:
rijkvanzanten
2020-10-08 15:47:33 -04:00
parent d8bd6c82ab
commit 25862429bd
2 changed files with 21 additions and 4 deletions

View File

@@ -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';

View File

@@ -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;
};