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,41 +1,150 @@
/* tslint:disable */
/* eslint-disable */
/**
* This file was automatically generated by Payload.
* 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` "global".
*/
export interface Global {
id: string
title?: string
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "array".
*/
export interface Array {
id: string
array: {
text?: string
id?: string
}[]
export interface Config {
collections: {
users: User;
'payload-preferences': PayloadPreference;
'payload-migrations': PayloadMigration;
};
globals: {
global: Global;
array: Array;
'default-value': DefaultValue;
'access-control': AccessControl;
'without-graphql': WithoutGraphql;
};
locale: 'en' | 'es';
user: User & {
collection: 'users';
};
}
/**
* 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
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;
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "global".
*/
export interface Global {
id: string;
json?:
| {
[k: string]: unknown;
}
| unknown[]
| string
| number
| boolean
| null;
title?: string | null;
updatedAt?: string | null;
createdAt?: string | null;
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "array".
*/
export interface Array {
id: string;
array?:
| {
text?: string | null;
id?: string | null;
}[]
| null;
updatedAt?: string | null;
createdAt?: string | null;
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "default-value".
*/
export interface DefaultValue {
id: string;
text?: string | null;
group?: {
text?: string | null;
};
updatedAt?: string | null;
createdAt?: string | null;
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "access-control".
*/
export interface AccessControl {
id: string;
title: string;
enabled?: boolean | null;
updatedAt?: string | null;
createdAt?: string | null;
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "without-graphql".
*/
export interface WithoutGraphql {
id: string;
updatedAt?: string | null;
createdAt?: string | null;
}
declare module 'payload' {
// @ts-ignore
export interface GeneratedTypes extends Config {}
}

View File

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