Currently, Payload renders all custom components on initial compile of the admin panel. This is problematic for two key reasons: 1. Custom components do not receive contextual data, i.e. fields do not receive their field data, edit views do not receive their document data, etc. 2. Components are unnecessarily rendered before they are used This was initially required to support React Server Components within the Payload Admin Panel for two key reasons: 1. Fields can be dynamically rendered within arrays, blocks, etc. 2. Documents can be recursively rendered within a "drawer" UI, i.e. relationship fields 3. Payload supports server/client component composition In order to achieve this, components need to be rendered on the server and passed as "slots" to the client. Currently, the pattern for this is to render custom server components in the "client config". Then when a view or field is needed to be rendered, we first check the client config for a "pre-rendered" component, otherwise render our client-side fallback component. But for the reasons listed above, this pattern doesn't exactly make custom server components very useful within the Payload Admin Panel, which is where this PR comes in. Now, instead of pre-rendering all components on initial compile, we're able to render custom components _on demand_, only as they are needed. To achieve this, we've established [this pattern](https://github.com/payloadcms/payload/pull/8481) of React Server Functions in the Payload Admin Panel. With Server Functions, we can iterate the Payload Config and return JSX through React's `text/x-component` content-type. This means we're able to pass contextual props to custom components, such as data for fields and views. ## Breaking Changes 1. Add the following to your root layout file, typically located at `(app)/(payload)/layout.tsx`: ```diff /* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */ /* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ + import type { ServerFunctionClient } from 'payload' import config from '@payload-config' import { RootLayout } from '@payloadcms/next/layouts' import { handleServerFunctions } from '@payloadcms/next/utilities' import React from 'react' import { importMap } from './admin/importMap.js' import './custom.scss' type Args = { children: React.ReactNode } + const serverFunctions: ServerFunctionClient = async function (args) { + 'use server' + return handleServerFunctions({ + ...args, + config, + importMap, + }) + } const Layout = ({ children }: Args) => ( <RootLayout config={config} importMap={importMap} + serverFunctions={serverFunctions} > {children} </RootLayout> ) export default Layout ``` 2. If you were previously posting to the `/api/form-state` endpoint, it no longer exists. Instead, you'll need to invoke the `form-state` Server Function, which can be done through the _new_ `getFormState` utility: ```diff - import { getFormState } from '@payloadcms/ui' - const { state } = await getFormState({ - apiRoute: '', - body: { - // ... - }, - serverURL: '' - }) + const { getFormState } = useServerFunctions() + + const { state } = await getFormState({ + // ... + }) ``` ## Breaking Changes ```diff - useFieldProps() - useCellProps() ``` More details coming soon. --------- Co-authored-by: Alessio Gravili <alessio@gravili.de> Co-authored-by: Jarrod Flesch <jarrodmflesch@gmail.com> Co-authored-by: James <james@trbl.design>
813 lines
21 KiB
TypeScript
813 lines
21 KiB
TypeScript
/* 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 {
|
|
auth: {
|
|
users: UserAuthOperations;
|
|
};
|
|
collections: {
|
|
uploads: Upload;
|
|
posts: Post;
|
|
users: User;
|
|
'hidden-collection': HiddenCollection;
|
|
'collection-no-api-view': CollectionNoApiView;
|
|
'custom-views-one': CustomViewsOne;
|
|
'custom-views-two': CustomViewsTwo;
|
|
'custom-fields': CustomField;
|
|
'group-one-collection-ones': GroupOneCollectionOne;
|
|
'group-one-collection-twos': GroupOneCollectionTwo;
|
|
'group-two-collection-ones': GroupTwoCollectionOne;
|
|
'group-two-collection-twos': GroupTwoCollectionTwo;
|
|
geo: Geo;
|
|
customIdTab: CustomIdTab;
|
|
customIdRow: CustomIdRow;
|
|
'disable-duplicate': DisableDuplicate;
|
|
'payload-locked-documents': PayloadLockedDocument;
|
|
'payload-preferences': PayloadPreference;
|
|
'payload-migrations': PayloadMigration;
|
|
};
|
|
collectionsJoins: {};
|
|
collectionsSelect: {
|
|
uploads: UploadsSelect<false> | UploadsSelect<true>;
|
|
posts: PostsSelect<false> | PostsSelect<true>;
|
|
users: UsersSelect<false> | UsersSelect<true>;
|
|
'hidden-collection': HiddenCollectionSelect<false> | HiddenCollectionSelect<true>;
|
|
'collection-no-api-view': CollectionNoApiViewSelect<false> | CollectionNoApiViewSelect<true>;
|
|
'custom-views-one': CustomViewsOneSelect<false> | CustomViewsOneSelect<true>;
|
|
'custom-views-two': CustomViewsTwoSelect<false> | CustomViewsTwoSelect<true>;
|
|
'custom-fields': CustomFieldsSelect<false> | CustomFieldsSelect<true>;
|
|
'group-one-collection-ones': GroupOneCollectionOnesSelect<false> | GroupOneCollectionOnesSelect<true>;
|
|
'group-one-collection-twos': GroupOneCollectionTwosSelect<false> | GroupOneCollectionTwosSelect<true>;
|
|
'group-two-collection-ones': GroupTwoCollectionOnesSelect<false> | GroupTwoCollectionOnesSelect<true>;
|
|
'group-two-collection-twos': GroupTwoCollectionTwosSelect<false> | GroupTwoCollectionTwosSelect<true>;
|
|
geo: GeoSelect<false> | GeoSelect<true>;
|
|
customIdTab: CustomIdTabSelect<false> | CustomIdTabSelect<true>;
|
|
customIdRow: CustomIdRowSelect<false> | CustomIdRowSelect<true>;
|
|
'disable-duplicate': DisableDuplicateSelect<false> | DisableDuplicateSelect<true>;
|
|
'payload-locked-documents': PayloadLockedDocumentsSelect<false> | PayloadLockedDocumentsSelect<true>;
|
|
'payload-preferences': PayloadPreferencesSelect<false> | PayloadPreferencesSelect<true>;
|
|
'payload-migrations': PayloadMigrationsSelect<false> | PayloadMigrationsSelect<true>;
|
|
};
|
|
db: {
|
|
defaultIDType: string;
|
|
};
|
|
globals: {
|
|
'hidden-global': HiddenGlobal;
|
|
'global-no-api-view': GlobalNoApiView;
|
|
global: Global;
|
|
'custom-global-views-one': CustomGlobalViewsOne;
|
|
'custom-global-views-two': CustomGlobalViewsTwo;
|
|
'group-globals-one': GroupGlobalsOne;
|
|
'group-globals-two': GroupGlobalsTwo;
|
|
settings: Setting;
|
|
};
|
|
globalsSelect: {
|
|
'hidden-global': HiddenGlobalSelect<false> | HiddenGlobalSelect<true>;
|
|
'global-no-api-view': GlobalNoApiViewSelect<false> | GlobalNoApiViewSelect<true>;
|
|
global: GlobalSelect<false> | GlobalSelect<true>;
|
|
'custom-global-views-one': CustomGlobalViewsOneSelect<false> | CustomGlobalViewsOneSelect<true>;
|
|
'custom-global-views-two': CustomGlobalViewsTwoSelect<false> | CustomGlobalViewsTwoSelect<true>;
|
|
'group-globals-one': GroupGlobalsOneSelect<false> | GroupGlobalsOneSelect<true>;
|
|
'group-globals-two': GroupGlobalsTwoSelect<false> | GroupGlobalsTwoSelect<true>;
|
|
settings: SettingsSelect<false> | SettingsSelect<true>;
|
|
};
|
|
locale: 'es' | 'en';
|
|
user: User & {
|
|
collection: 'users';
|
|
};
|
|
jobs?: {
|
|
tasks: unknown;
|
|
workflows?: unknown;
|
|
};
|
|
}
|
|
export interface UserAuthOperations {
|
|
forgotPassword: {
|
|
email: string;
|
|
password: string;
|
|
};
|
|
login: {
|
|
email: string;
|
|
password: string;
|
|
};
|
|
registerFirstUser: {
|
|
email: string;
|
|
password: string;
|
|
};
|
|
unlock: {
|
|
email: string;
|
|
password: string;
|
|
};
|
|
}
|
|
/**
|
|
* This interface was referenced by `Config`'s JSON-Schema
|
|
* via the `definition` "uploads".
|
|
*/
|
|
export interface Upload {
|
|
id: string;
|
|
title?: string | null;
|
|
updatedAt: string;
|
|
createdAt: string;
|
|
url?: string | null;
|
|
thumbnailURL?: string | null;
|
|
filename?: string | null;
|
|
mimeType?: string | null;
|
|
filesize?: number | null;
|
|
width?: number | null;
|
|
height?: number | null;
|
|
focalX?: number | null;
|
|
focalY?: number | null;
|
|
}
|
|
/**
|
|
* This interface was referenced by `Config`'s JSON-Schema
|
|
* via the `definition` "posts".
|
|
*/
|
|
export interface Post {
|
|
id: string;
|
|
title?: string | null;
|
|
description?: string | null;
|
|
number?: number | null;
|
|
richText?:
|
|
| {
|
|
[k: string]: unknown;
|
|
}[]
|
|
| null;
|
|
group?: {
|
|
title?: string | null;
|
|
};
|
|
relationship?: (string | null) | Post;
|
|
customCell?: string | null;
|
|
sidebarField?: string | null;
|
|
updatedAt: string;
|
|
createdAt: string;
|
|
_status?: ('draft' | 'published') | null;
|
|
}
|
|
/**
|
|
* This interface was referenced by `Config`'s JSON-Schema
|
|
* via the `definition` "users".
|
|
*/
|
|
export interface User {
|
|
id: string;
|
|
textField?: string | null;
|
|
sidebarField?: string | null;
|
|
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` "hidden-collection".
|
|
*/
|
|
export interface HiddenCollection {
|
|
id: string;
|
|
title?: string | null;
|
|
updatedAt: string;
|
|
createdAt: string;
|
|
}
|
|
/**
|
|
* This interface was referenced by `Config`'s JSON-Schema
|
|
* via the `definition` "collection-no-api-view".
|
|
*/
|
|
export interface CollectionNoApiView {
|
|
id: string;
|
|
updatedAt: string;
|
|
createdAt: string;
|
|
}
|
|
/**
|
|
* This interface was referenced by `Config`'s JSON-Schema
|
|
* via the `definition` "custom-views-one".
|
|
*/
|
|
export interface CustomViewsOne {
|
|
id: string;
|
|
title?: string | null;
|
|
updatedAt: string;
|
|
createdAt: string;
|
|
}
|
|
/**
|
|
* This interface was referenced by `Config`'s JSON-Schema
|
|
* via the `definition` "custom-views-two".
|
|
*/
|
|
export interface CustomViewsTwo {
|
|
id: string;
|
|
title?: string | null;
|
|
updatedAt: string;
|
|
createdAt: string;
|
|
}
|
|
/**
|
|
* This interface was referenced by `Config`'s JSON-Schema
|
|
* via the `definition` "custom-fields".
|
|
*/
|
|
export interface CustomField {
|
|
id: string;
|
|
customTextServerField?: string | null;
|
|
customTextClientField?: string | null;
|
|
descriptionAsString?: string | null;
|
|
descriptionAsFunction?: string | null;
|
|
descriptionAsComponent?: string | null;
|
|
customSelectField?: string | null;
|
|
updatedAt: string;
|
|
createdAt: string;
|
|
}
|
|
/**
|
|
* This interface was referenced by `Config`'s JSON-Schema
|
|
* via the `definition` "group-one-collection-ones".
|
|
*/
|
|
export interface GroupOneCollectionOne {
|
|
id: string;
|
|
title?: string | null;
|
|
updatedAt: string;
|
|
createdAt: string;
|
|
}
|
|
/**
|
|
* This interface was referenced by `Config`'s JSON-Schema
|
|
* via the `definition` "group-one-collection-twos".
|
|
*/
|
|
export interface GroupOneCollectionTwo {
|
|
id: string;
|
|
title?: string | null;
|
|
updatedAt: string;
|
|
createdAt: string;
|
|
}
|
|
/**
|
|
* This interface was referenced by `Config`'s JSON-Schema
|
|
* via the `definition` "group-two-collection-ones".
|
|
*/
|
|
export interface GroupTwoCollectionOne {
|
|
id: string;
|
|
title?: string | null;
|
|
updatedAt: string;
|
|
createdAt: string;
|
|
}
|
|
/**
|
|
* This interface was referenced by `Config`'s JSON-Schema
|
|
* via the `definition` "group-two-collection-twos".
|
|
*/
|
|
export interface GroupTwoCollectionTwo {
|
|
id: string;
|
|
title?: string | null;
|
|
updatedAt: string;
|
|
createdAt: string;
|
|
}
|
|
/**
|
|
* This interface was referenced by `Config`'s JSON-Schema
|
|
* via the `definition` "geo".
|
|
*/
|
|
export interface Geo {
|
|
id: string;
|
|
/**
|
|
* @minItems 2
|
|
* @maxItems 2
|
|
*/
|
|
point?: [number, number] | null;
|
|
updatedAt: string;
|
|
createdAt: string;
|
|
}
|
|
/**
|
|
* This interface was referenced by `Config`'s JSON-Schema
|
|
* via the `definition` "customIdTab".
|
|
*/
|
|
export interface CustomIdTab {
|
|
id: string | null;
|
|
title?: string | null;
|
|
description?: string | null;
|
|
number?: number | null;
|
|
updatedAt: string;
|
|
createdAt: string;
|
|
}
|
|
/**
|
|
* This interface was referenced by `Config`'s JSON-Schema
|
|
* via the `definition` "customIdRow".
|
|
*/
|
|
export interface CustomIdRow {
|
|
id: string | null;
|
|
title?: string | null;
|
|
description?: string | null;
|
|
number?: number | null;
|
|
updatedAt: string;
|
|
createdAt: string;
|
|
}
|
|
/**
|
|
* This interface was referenced by `Config`'s JSON-Schema
|
|
* via the `definition` "disable-duplicate".
|
|
*/
|
|
export interface DisableDuplicate {
|
|
id: string;
|
|
title?: string | null;
|
|
updatedAt: string;
|
|
createdAt: string;
|
|
}
|
|
/**
|
|
* This interface was referenced by `Config`'s JSON-Schema
|
|
* via the `definition` "payload-locked-documents".
|
|
*/
|
|
export interface PayloadLockedDocument {
|
|
id: string;
|
|
document?:
|
|
| ({
|
|
relationTo: 'uploads';
|
|
value: string | Upload;
|
|
} | null)
|
|
| ({
|
|
relationTo: 'posts';
|
|
value: string | Post;
|
|
} | null)
|
|
| ({
|
|
relationTo: 'users';
|
|
value: string | User;
|
|
} | null)
|
|
| ({
|
|
relationTo: 'hidden-collection';
|
|
value: string | HiddenCollection;
|
|
} | null)
|
|
| ({
|
|
relationTo: 'collection-no-api-view';
|
|
value: string | CollectionNoApiView;
|
|
} | null)
|
|
| ({
|
|
relationTo: 'custom-views-one';
|
|
value: string | CustomViewsOne;
|
|
} | null)
|
|
| ({
|
|
relationTo: 'custom-views-two';
|
|
value: string | CustomViewsTwo;
|
|
} | null)
|
|
| ({
|
|
relationTo: 'custom-fields';
|
|
value: string | CustomField;
|
|
} | null)
|
|
| ({
|
|
relationTo: 'group-one-collection-ones';
|
|
value: string | GroupOneCollectionOne;
|
|
} | null)
|
|
| ({
|
|
relationTo: 'group-one-collection-twos';
|
|
value: string | GroupOneCollectionTwo;
|
|
} | null)
|
|
| ({
|
|
relationTo: 'group-two-collection-ones';
|
|
value: string | GroupTwoCollectionOne;
|
|
} | null)
|
|
| ({
|
|
relationTo: 'group-two-collection-twos';
|
|
value: string | GroupTwoCollectionTwo;
|
|
} | null)
|
|
| ({
|
|
relationTo: 'geo';
|
|
value: string | Geo;
|
|
} | null)
|
|
| ({
|
|
relationTo: 'customIdTab';
|
|
value: string | CustomIdTab;
|
|
} | null)
|
|
| ({
|
|
relationTo: 'customIdRow';
|
|
value: string | CustomIdRow;
|
|
} | null)
|
|
| ({
|
|
relationTo: 'disable-duplicate';
|
|
value: string | DisableDuplicate;
|
|
} | null);
|
|
globalSlug?: string | null;
|
|
user: {
|
|
relationTo: 'users';
|
|
value: string | User;
|
|
};
|
|
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;
|
|
}
|
|
/**
|
|
* This interface was referenced by `Config`'s JSON-Schema
|
|
* via the `definition` "uploads_select".
|
|
*/
|
|
export interface UploadsSelect<T extends boolean = true> {
|
|
title?: T;
|
|
updatedAt?: T;
|
|
createdAt?: T;
|
|
url?: T;
|
|
thumbnailURL?: T;
|
|
filename?: T;
|
|
mimeType?: T;
|
|
filesize?: T;
|
|
width?: T;
|
|
height?: T;
|
|
focalX?: T;
|
|
focalY?: T;
|
|
}
|
|
/**
|
|
* This interface was referenced by `Config`'s JSON-Schema
|
|
* via the `definition` "posts_select".
|
|
*/
|
|
export interface PostsSelect<T extends boolean = true> {
|
|
title?: T;
|
|
description?: T;
|
|
number?: T;
|
|
richText?: T;
|
|
demoUIField?: T;
|
|
group?:
|
|
| T
|
|
| {
|
|
title?: T;
|
|
};
|
|
relationship?: T;
|
|
customCell?: T;
|
|
sidebarField?: T;
|
|
updatedAt?: T;
|
|
createdAt?: T;
|
|
_status?: T;
|
|
}
|
|
/**
|
|
* This interface was referenced by `Config`'s JSON-Schema
|
|
* via the `definition` "users_select".
|
|
*/
|
|
export interface UsersSelect<T extends boolean = true> {
|
|
textField?: T;
|
|
sidebarField?: T;
|
|
updatedAt?: T;
|
|
createdAt?: T;
|
|
email?: T;
|
|
resetPasswordToken?: T;
|
|
resetPasswordExpiration?: T;
|
|
salt?: T;
|
|
hash?: T;
|
|
loginAttempts?: T;
|
|
lockUntil?: T;
|
|
}
|
|
/**
|
|
* This interface was referenced by `Config`'s JSON-Schema
|
|
* via the `definition` "hidden-collection_select".
|
|
*/
|
|
export interface HiddenCollectionSelect<T extends boolean = true> {
|
|
title?: T;
|
|
updatedAt?: T;
|
|
createdAt?: T;
|
|
}
|
|
/**
|
|
* This interface was referenced by `Config`'s JSON-Schema
|
|
* via the `definition` "collection-no-api-view_select".
|
|
*/
|
|
export interface CollectionNoApiViewSelect<T extends boolean = true> {
|
|
updatedAt?: T;
|
|
createdAt?: T;
|
|
}
|
|
/**
|
|
* This interface was referenced by `Config`'s JSON-Schema
|
|
* via the `definition` "custom-views-one_select".
|
|
*/
|
|
export interface CustomViewsOneSelect<T extends boolean = true> {
|
|
title?: T;
|
|
updatedAt?: T;
|
|
createdAt?: T;
|
|
}
|
|
/**
|
|
* This interface was referenced by `Config`'s JSON-Schema
|
|
* via the `definition` "custom-views-two_select".
|
|
*/
|
|
export interface CustomViewsTwoSelect<T extends boolean = true> {
|
|
title?: T;
|
|
updatedAt?: T;
|
|
createdAt?: T;
|
|
}
|
|
/**
|
|
* This interface was referenced by `Config`'s JSON-Schema
|
|
* via the `definition` "custom-fields_select".
|
|
*/
|
|
export interface CustomFieldsSelect<T extends boolean = true> {
|
|
customTextServerField?: T;
|
|
customTextClientField?: T;
|
|
descriptionAsString?: T;
|
|
descriptionAsFunction?: T;
|
|
descriptionAsComponent?: T;
|
|
customSelectField?: T;
|
|
updatedAt?: T;
|
|
createdAt?: T;
|
|
}
|
|
/**
|
|
* This interface was referenced by `Config`'s JSON-Schema
|
|
* via the `definition` "group-one-collection-ones_select".
|
|
*/
|
|
export interface GroupOneCollectionOnesSelect<T extends boolean = true> {
|
|
title?: T;
|
|
updatedAt?: T;
|
|
createdAt?: T;
|
|
}
|
|
/**
|
|
* This interface was referenced by `Config`'s JSON-Schema
|
|
* via the `definition` "group-one-collection-twos_select".
|
|
*/
|
|
export interface GroupOneCollectionTwosSelect<T extends boolean = true> {
|
|
title?: T;
|
|
updatedAt?: T;
|
|
createdAt?: T;
|
|
}
|
|
/**
|
|
* This interface was referenced by `Config`'s JSON-Schema
|
|
* via the `definition` "group-two-collection-ones_select".
|
|
*/
|
|
export interface GroupTwoCollectionOnesSelect<T extends boolean = true> {
|
|
title?: T;
|
|
updatedAt?: T;
|
|
createdAt?: T;
|
|
}
|
|
/**
|
|
* This interface was referenced by `Config`'s JSON-Schema
|
|
* via the `definition` "group-two-collection-twos_select".
|
|
*/
|
|
export interface GroupTwoCollectionTwosSelect<T extends boolean = true> {
|
|
title?: T;
|
|
updatedAt?: T;
|
|
createdAt?: T;
|
|
}
|
|
/**
|
|
* This interface was referenced by `Config`'s JSON-Schema
|
|
* via the `definition` "geo_select".
|
|
*/
|
|
export interface GeoSelect<T extends boolean = true> {
|
|
point?: T;
|
|
updatedAt?: T;
|
|
createdAt?: T;
|
|
}
|
|
/**
|
|
* This interface was referenced by `Config`'s JSON-Schema
|
|
* via the `definition` "customIdTab_select".
|
|
*/
|
|
export interface CustomIdTabSelect<T extends boolean = true> {
|
|
title?: T;
|
|
id?: T;
|
|
description?: T;
|
|
number?: T;
|
|
updatedAt?: T;
|
|
createdAt?: T;
|
|
}
|
|
/**
|
|
* This interface was referenced by `Config`'s JSON-Schema
|
|
* via the `definition` "customIdRow_select".
|
|
*/
|
|
export interface CustomIdRowSelect<T extends boolean = true> {
|
|
title?: T;
|
|
id?: T;
|
|
description?: T;
|
|
number?: T;
|
|
updatedAt?: T;
|
|
createdAt?: T;
|
|
}
|
|
/**
|
|
* This interface was referenced by `Config`'s JSON-Schema
|
|
* via the `definition` "disable-duplicate_select".
|
|
*/
|
|
export interface DisableDuplicateSelect<T extends boolean = true> {
|
|
title?: T;
|
|
updatedAt?: T;
|
|
createdAt?: T;
|
|
}
|
|
/**
|
|
* This interface was referenced by `Config`'s JSON-Schema
|
|
* via the `definition` "payload-locked-documents_select".
|
|
*/
|
|
export interface PayloadLockedDocumentsSelect<T extends boolean = true> {
|
|
document?: T;
|
|
globalSlug?: T;
|
|
user?: T;
|
|
updatedAt?: T;
|
|
createdAt?: T;
|
|
}
|
|
/**
|
|
* This interface was referenced by `Config`'s JSON-Schema
|
|
* via the `definition` "payload-preferences_select".
|
|
*/
|
|
export interface PayloadPreferencesSelect<T extends boolean = true> {
|
|
user?: T;
|
|
key?: T;
|
|
value?: T;
|
|
updatedAt?: T;
|
|
createdAt?: T;
|
|
}
|
|
/**
|
|
* This interface was referenced by `Config`'s JSON-Schema
|
|
* via the `definition` "payload-migrations_select".
|
|
*/
|
|
export interface PayloadMigrationsSelect<T extends boolean = true> {
|
|
name?: T;
|
|
batch?: T;
|
|
updatedAt?: T;
|
|
createdAt?: T;
|
|
}
|
|
/**
|
|
* This interface was referenced by `Config`'s JSON-Schema
|
|
* via the `definition` "hidden-global".
|
|
*/
|
|
export interface HiddenGlobal {
|
|
id: string;
|
|
title?: string | null;
|
|
updatedAt?: string | null;
|
|
createdAt?: string | null;
|
|
}
|
|
/**
|
|
* This interface was referenced by `Config`'s JSON-Schema
|
|
* via the `definition` "global-no-api-view".
|
|
*/
|
|
export interface GlobalNoApiView {
|
|
id: string;
|
|
updatedAt?: string | null;
|
|
createdAt?: string | null;
|
|
}
|
|
/**
|
|
* This interface was referenced by `Config`'s JSON-Schema
|
|
* via the `definition` "global".
|
|
*/
|
|
export interface Global {
|
|
id: string;
|
|
title?: string | null;
|
|
sidebarField?: string | null;
|
|
_status?: ('draft' | 'published') | null;
|
|
updatedAt?: string | null;
|
|
createdAt?: string | null;
|
|
}
|
|
/**
|
|
* This interface was referenced by `Config`'s JSON-Schema
|
|
* via the `definition` "custom-global-views-one".
|
|
*/
|
|
export interface CustomGlobalViewsOne {
|
|
id: string;
|
|
title?: string | null;
|
|
updatedAt?: string | null;
|
|
createdAt?: string | null;
|
|
}
|
|
/**
|
|
* This interface was referenced by `Config`'s JSON-Schema
|
|
* via the `definition` "custom-global-views-two".
|
|
*/
|
|
export interface CustomGlobalViewsTwo {
|
|
id: string;
|
|
title?: string | null;
|
|
updatedAt?: string | null;
|
|
createdAt?: string | null;
|
|
}
|
|
/**
|
|
* This interface was referenced by `Config`'s JSON-Schema
|
|
* via the `definition` "group-globals-one".
|
|
*/
|
|
export interface GroupGlobalsOne {
|
|
id: string;
|
|
title?: string | null;
|
|
updatedAt?: string | null;
|
|
createdAt?: string | null;
|
|
}
|
|
/**
|
|
* This interface was referenced by `Config`'s JSON-Schema
|
|
* via the `definition` "group-globals-two".
|
|
*/
|
|
export interface GroupGlobalsTwo {
|
|
id: string;
|
|
title?: string | null;
|
|
updatedAt?: string | null;
|
|
createdAt?: string | null;
|
|
}
|
|
/**
|
|
* This interface was referenced by `Config`'s JSON-Schema
|
|
* via the `definition` "settings".
|
|
*/
|
|
export interface Setting {
|
|
id: string;
|
|
canAccessProtected?: boolean | null;
|
|
updatedAt?: string | null;
|
|
createdAt?: string | null;
|
|
}
|
|
/**
|
|
* This interface was referenced by `Config`'s JSON-Schema
|
|
* via the `definition` "hidden-global_select".
|
|
*/
|
|
export interface HiddenGlobalSelect<T extends boolean = true> {
|
|
title?: T;
|
|
updatedAt?: T;
|
|
createdAt?: T;
|
|
globalType?: T;
|
|
}
|
|
/**
|
|
* This interface was referenced by `Config`'s JSON-Schema
|
|
* via the `definition` "global-no-api-view_select".
|
|
*/
|
|
export interface GlobalNoApiViewSelect<T extends boolean = true> {
|
|
updatedAt?: T;
|
|
createdAt?: T;
|
|
globalType?: T;
|
|
}
|
|
/**
|
|
* This interface was referenced by `Config`'s JSON-Schema
|
|
* via the `definition` "global_select".
|
|
*/
|
|
export interface GlobalSelect<T extends boolean = true> {
|
|
title?: T;
|
|
sidebarField?: T;
|
|
_status?: T;
|
|
updatedAt?: T;
|
|
createdAt?: T;
|
|
globalType?: T;
|
|
}
|
|
/**
|
|
* This interface was referenced by `Config`'s JSON-Schema
|
|
* via the `definition` "custom-global-views-one_select".
|
|
*/
|
|
export interface CustomGlobalViewsOneSelect<T extends boolean = true> {
|
|
title?: T;
|
|
updatedAt?: T;
|
|
createdAt?: T;
|
|
globalType?: T;
|
|
}
|
|
/**
|
|
* This interface was referenced by `Config`'s JSON-Schema
|
|
* via the `definition` "custom-global-views-two_select".
|
|
*/
|
|
export interface CustomGlobalViewsTwoSelect<T extends boolean = true> {
|
|
title?: T;
|
|
updatedAt?: T;
|
|
createdAt?: T;
|
|
globalType?: T;
|
|
}
|
|
/**
|
|
* This interface was referenced by `Config`'s JSON-Schema
|
|
* via the `definition` "group-globals-one_select".
|
|
*/
|
|
export interface GroupGlobalsOneSelect<T extends boolean = true> {
|
|
title?: T;
|
|
updatedAt?: T;
|
|
createdAt?: T;
|
|
globalType?: T;
|
|
}
|
|
/**
|
|
* This interface was referenced by `Config`'s JSON-Schema
|
|
* via the `definition` "group-globals-two_select".
|
|
*/
|
|
export interface GroupGlobalsTwoSelect<T extends boolean = true> {
|
|
title?: T;
|
|
updatedAt?: T;
|
|
createdAt?: T;
|
|
globalType?: T;
|
|
}
|
|
/**
|
|
* This interface was referenced by `Config`'s JSON-Schema
|
|
* via the `definition` "settings_select".
|
|
*/
|
|
export interface SettingsSelect<T extends boolean = true> {
|
|
canAccessProtected?: T;
|
|
updatedAt?: T;
|
|
createdAt?: T;
|
|
globalType?: T;
|
|
}
|
|
/**
|
|
* This interface was referenced by `Config`'s JSON-Schema
|
|
* via the `definition` "auth".
|
|
*/
|
|
export interface Auth {
|
|
[k: string]: unknown;
|
|
}
|
|
|
|
|
|
declare module 'payload' {
|
|
// @ts-ignore
|
|
export interface GeneratedTypes extends Config {}
|
|
} |