test: group relationships

* test: relationship fields inside groups and subgroup

* test: group nested relationships and arrays

* test: improves coverage for hooks

Co-authored-by: James <james@trbl.design>
This commit is contained in:
Dan Ribbens
2022-07-20 14:52:21 -04:00
committed by GitHub
parent 893772ebd8
commit 09f57e9a4c
14 changed files with 299 additions and 119 deletions

View File

@@ -0,0 +1,91 @@
/* tslint:disable */
/**
* This file was automatically generated by Payload CMS.
* DO NOT MODIFY IT BY HAND. Instead, modify your source Payload config,
* and re-run `payload generate:types` to regenerate this file.
*/
export interface Config {}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "transforms".
*/
export interface Transform {
id: string;
/**
* @minItems 2
* @maxItems 2
*/
transform?: [number, number];
/**
* @minItems 2
* @maxItems 2
*/
localizedTransform?: [number, number];
createdAt: string;
updatedAt: string;
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "hooks".
*/
export interface Hook {
id: string;
fieldBeforeValidate?: boolean;
fieldBeforeChange?: boolean;
fieldAfterChange?: boolean;
fieldAfterRead?: boolean;
collectionBeforeValidate?: boolean;
collectionBeforeChange?: boolean;
collectionAfterChange?: boolean;
collectionBeforeRead?: boolean;
collectionAfterRead?: boolean;
createdAt: string;
updatedAt: string;
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "nested-after-read-hooks".
*/
export interface NestedAfterReadHook {
id: string;
text?: string;
group: {
array: {
input?: string;
afterRead?: string;
shouldPopulate?: string | Relation;
id?: string;
}[];
subGroup: {
afterRead?: string;
shouldPopulate?: string | Relation;
};
};
createdAt: string;
updatedAt: string;
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "relations".
*/
export interface Relation {
id: string;
title: string;
createdAt: string;
updatedAt: string;
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "users".
*/
export interface User {
id: string;
email?: string;
resetPasswordToken?: string;
resetPasswordExpiration?: string;
loginAttempts?: number;
lockUntil?: string;
createdAt: string;
updatedAt: string;
}