chore: properly working generated types within tests (#6288)

This commit is contained in:
Alessio Gravili
2024-05-09 17:12:51 -04:00
committed by GitHub
parent cfeac79b99
commit f7a2cf96b9
93 changed files with 7012 additions and 3097 deletions

View File

@@ -1,4 +1,5 @@
/* tslint:disable */
/* eslint-disable */
/**
* This file was automatically generated by Payload.
* DO NOT MODIFY IT BY HAND. Instead, modify your source Payload config,
@@ -7,104 +8,235 @@
export interface Config {
collections: {
posts: Post
postsLocalized: PostsLocalized
relation: Relation
'strict-access': StrictAccess
'chained-relation': ChainedRelation
'custom-id-relation': CustomIdRelation
'custom-id-number-relation': CustomIdNumberRelation
screenings: Screening
movies: Movie
directors: Director
users: User
}
globals: {}
posts: Post;
postsLocalized: PostsLocalized;
relation: Relation;
'strict-access': StrictAccess;
chained: Chained;
'custom-id': CustomId;
'custom-id-number': CustomIdNumber;
screenings: Screening;
movies: Movie;
directors: Director;
movieReviews: MovieReview;
'polymorphic-relationships': PolymorphicRelationship;
tree: Tree;
users: User;
'payload-preferences': PayloadPreference;
'payload-migrations': PayloadMigration;
};
globals: {};
locale: 'en' | 'de';
user: User & {
collection: 'users';
};
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "posts".
*/
export interface Post {
id: string
title?: string
description?: string
number?: number
relationField?: string | Relation
defaultAccessRelation?: string | StrictAccess
chainedRelation?: string | ChainedRelation
maxDepthRelation?: string | Relation
customIdRelation?: string | CustomIdRelation
customIdNumberRelation?: number | CustomIdNumberRelation
filteredRelation?: string | Relation
updatedAt: string
createdAt: string
}
export interface PostsLocalized {
id: string
title?: string | null
relationField?: (string | null) | Relation
updatedAt: string
createdAt: string
id: string;
title?: string | null;
description?: string | null;
number?: number | null;
relationField?: (string | null) | Relation;
defaultAccessRelation?: (string | null) | StrictAccess;
chainedRelation?: (string | null) | Chained;
maxDepthRelation?: (string | null) | Relation;
customIdRelation?: (string | null) | CustomId;
customIdNumberRelation?: (number | null) | CustomIdNumber;
filteredRelation?: (string | null) | Relation;
updatedAt: string;
createdAt: string;
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "relation".
*/
export interface Relation {
id: string
name?: string
disableRelation: boolean
updatedAt: string
createdAt: string
id: string;
name?: string | null;
disableRelation: boolean;
updatedAt: string;
createdAt: string;
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "strict-access".
*/
export interface StrictAccess {
id: string
name?: string
disableRelation: boolean
updatedAt: string
createdAt: string
id: string;
name?: string | null;
disableRelation: boolean;
updatedAt: string;
createdAt: string;
}
export interface ChainedRelation {
id: string
name?: string
relation?: string | ChainedRelation
updatedAt: string
createdAt: string
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "chained".
*/
export interface Chained {
id: string;
name?: string | null;
relation?: (string | null) | Chained;
updatedAt: string;
createdAt: string;
}
export interface CustomIdRelation {
id: string
name?: string
updatedAt: string
createdAt: string
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "custom-id".
*/
export interface CustomId {
id: string;
name?: string | null;
updatedAt: string;
createdAt: string;
}
export interface CustomIdNumberRelation {
id: number
name?: string
updatedAt: string
createdAt: string
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "custom-id-number".
*/
export interface CustomIdNumber {
id: number;
name?: string | null;
updatedAt: string;
createdAt: string;
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "postsLocalized".
*/
export interface PostsLocalized {
id: string;
title?: string | null;
relationField?: (string | null) | Relation;
updatedAt: string;
createdAt: string;
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "screenings".
*/
export interface Screening {
id: string
name?: string
movie?: string | Movie
updatedAt: string
createdAt: string
id: string;
name?: string | null;
movie?: (string | null) | Movie;
updatedAt: string;
createdAt: string;
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "movies".
*/
export interface Movie {
id: string
name?: string
director?: string | Director
updatedAt: string
createdAt: string
id: string;
name?: string | null;
director?: (string | null) | Director;
updatedAt: string;
createdAt: string;
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "directors".
*/
export interface Director {
id: string
name?: string
movies?: Array<string | Movie>
updatedAt: string
createdAt: string
id: string;
name?: string | null;
movies?: (string | Movie)[] | null;
updatedAt: string;
createdAt: string;
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "movieReviews".
*/
export interface MovieReview {
id: string;
movieReviewer: string | User;
likes?: (string | User)[] | null;
visibility: 'followers' | 'public';
updatedAt: string;
createdAt: string;
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "users".
*/
export interface User {
id: string
updatedAt: string
createdAt: string
email?: string
resetPasswordToken?: string
resetPasswordExpiration?: string
loginAttempts?: number
lockUntil?: string
password?: string
id: string;
updatedAt: string;
createdAt: string;
email: string;
resetPasswordToken?: string | null;
resetPasswordExpiration?: string | null;
salt?: string | null;
hash?: string | null;
loginAttempts?: number | null;
lockUntil?: string | null;
password?: string | null;
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "polymorphic-relationships".
*/
export interface PolymorphicRelationship {
id: string;
polymorphic?: {
relationTo: 'movies';
value: string | Movie;
} | null;
updatedAt: string;
createdAt: string;
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "tree".
*/
export interface Tree {
id: string;
text?: string | null;
parent?: (string | null) | Tree;
updatedAt: string;
createdAt: string;
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "payload-preferences".
*/
export interface PayloadPreference {
id: string;
user: {
relationTo: 'users';
value: string | User;
};
key?: string | null;
value?:
| {
[k: string]: unknown;
}
| unknown[]
| string
| number
| boolean
| null;
updatedAt: string;
createdAt: string;
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "payload-migrations".
*/
export interface PayloadMigration {
id: string;
name?: string | null;
batch?: number | null;
updatedAt: string;
createdAt: string;
}
declare module 'payload' {
// @ts-ignore
export interface GeneratedTypes extends Config {}
}

View File

@@ -0,0 +1,3 @@
{
"extends": "../tsconfig.json",
}