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,117 +8,188 @@
export interface Config {
collections: {
posts: Post
point: Point
relation: Relation
dummy: Dummy
'custom-id': CustomId
'custom-id-number': CustomIdNumber
'error-on-hooks': ErrorOnHook
users: User
}
globals: {}
posts: Post;
point: Point;
relation: Relation;
dummy: Dummy;
'custom-id': CustomId;
'custom-id-number': CustomIdNumber;
'error-on-hooks': ErrorOnHook;
users: User;
'payload-preferences': PayloadPreference;
'payload-migrations': PayloadMigration;
};
globals: {};
locale: null;
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
fakeLocalization?: string
relationField?: string | Relation
relationHasManyField?: string[] | Relation[]
id: string;
title?: string | null;
description?: string | null;
number?: number | null;
fakeLocalization?: string | null;
relationField?: (string | null) | Relation;
relationHasManyField?: (string | Relation)[] | null;
relationMultiRelationTo?:
| {
value: string | Relation
relationTo: 'relation'
}
| {
value: string | Dummy
relationTo: 'dummy'
}
| ({
relationTo: 'relation';
value: string | Relation;
} | null)
| ({
relationTo: 'dummy';
value: string | Dummy;
} | null);
relationMultiRelationToHasMany?:
| (
| {
value: string
relationTo: 'relation'
relationTo: 'relation';
value: string | Relation;
}
| {
value: string
relationTo: 'dummy'
relationTo: 'dummy';
value: string | Dummy;
}
)[]
| (
| {
value: Relation
relationTo: 'relation'
}
| {
value: Dummy
relationTo: 'dummy'
}
)[]
restrictedField?: string
| null;
restrictedField?: string | null;
D1: {
D2?: {
D3?: {
D4?: string
}
}
}
updatedAt: string
createdAt: string
D4?: string | null;
};
};
};
updatedAt: string;
createdAt: string;
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "relation".
*/
export interface Relation {
id: string
name?: string
updatedAt: string
createdAt: string
id: string;
name?: string | null;
updatedAt: string;
createdAt: string;
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "dummy".
*/
export interface Dummy {
id: string
title?: string
name?: string
updatedAt: string
createdAt: string
id: string;
title?: string | null;
name?: string | null;
updatedAt: string;
createdAt: string;
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "point".
*/
export interface Point {
id: string
id: string;
/**
* @minItems 2
* @maxItems 2
*/
point?: [number, number]
updatedAt: string
createdAt: string
point?: [number, number] | null;
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
updatedAt: string
createdAt: string
id: string;
name?: string | null;
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
updatedAt: string
createdAt: string
id: number;
name?: string | null;
updatedAt: string;
createdAt: string;
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "error-on-hooks".
*/
export interface ErrorOnHook {
id: string
text?: string
errorBeforeChange?: boolean
errorAfterDelete?: boolean
updatedAt: string
createdAt: string
id: string;
text?: string | null;
errorBeforeChange?: boolean | null;
errorAfterDelete?: boolean | null;
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` "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 {}
}