payload 4.0.0-beta.2 → 4.0.0-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/auth/types.d.ts.map +1 -1
- package/dist/auth/types.js.map +1 -1
- package/dist/cli/commands/data/utilities.d.ts +1 -1
- package/dist/cli/commands/data/utilities.d.ts.map +1 -1
- package/dist/cli/commands/data/utilities.js.map +1 -1
- package/dist/collections/config/types.d.ts.map +1 -1
- package/dist/collections/config/types.js.map +1 -1
- package/dist/collections/operations/utilities/update.js.map +1 -1
- package/dist/config/sanitize.js.map +1 -1
- package/dist/config/types.d.ts.map +1 -1
- package/dist/config/types.js.map +1 -1
- package/dist/database/types.d.ts +4 -0
- package/dist/database/types.d.ts.map +1 -1
- package/dist/database/types.js.map +1 -1
- package/dist/fields/config/reservedFieldNames.d.ts.map +1 -1
- package/dist/fields/config/reservedFieldNames.js.map +1 -1
- package/dist/fields/config/types.d.ts.map +1 -1
- package/dist/fields/config/types.js.map +1 -1
- package/dist/fields/hooks/afterRead/promise.js.map +1 -1
- package/dist/fields/hooks/beforeChange/flattenValidationData.d.ts +14 -0
- package/dist/fields/hooks/beforeChange/flattenValidationData.d.ts.map +1 -0
- package/dist/fields/hooks/beforeChange/flattenValidationData.js +36 -0
- package/dist/fields/hooks/beforeChange/flattenValidationData.js.map +1 -0
- package/dist/fields/hooks/beforeChange/promise.d.ts +2 -1
- package/dist/fields/hooks/beforeChange/promise.d.ts.map +1 -1
- package/dist/fields/hooks/beforeChange/promise.js +96 -22
- package/dist/fields/hooks/beforeChange/promise.js.map +1 -1
- package/dist/fields/hooks/beforeChange/traverseFields.d.ts +2 -1
- package/dist/fields/hooks/beforeChange/traverseFields.d.ts.map +1 -1
- package/dist/fields/hooks/beforeChange/traverseFields.js +2 -1
- package/dist/fields/hooks/beforeChange/traverseFields.js.map +1 -1
- package/dist/globals/config/types.d.ts.map +1 -1
- package/dist/globals/config/types.js.map +1 -1
- package/dist/index.bundled.d.ts +6 -1
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js.map +1 -1
- package/dist/uploads/fileVersioning/cloudStorage.js.map +1 -1
- package/dist/uploads/generateFileData.js.map +1 -1
- package/dist/uploads/getFileContentRequirement.js.map +1 -1
- package/dist/utilities/entityInputSchema/validateEntityData.d.ts.map +1 -1
- package/dist/utilities/entityInputSchema/validateEntityData.js.map +1 -1
- package/dist/utilities/getVersionsConfig.js.map +1 -1
- package/dist/utilities/telemetry/conf/index.d.ts +4 -1
- package/dist/utilities/telemetry/conf/index.d.ts.map +1 -1
- package/dist/utilities/telemetry/conf/index.js.map +1 -1
- package/dist/versions/isInheritedReadVersionsAccess.js.map +1 -1
- package/package.json +20 -20
- package/skills/payload/reference/ENDPOINTS.md +3 -9
package/dist/config/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/config/types.ts"],"sourcesContent":["import type {\n ClientTranslationKeys,\n DefaultTranslationsObject,\n I18n,\n I18nClient,\n I18nOptions,\n TFunction,\n} from '@payloadcms/translations'\nimport type { StandardJSONSchemaV1, StandardSchemaV1 } from '@standard-schema/spec'\nimport type { BusboyConfig } from 'busboy'\nimport type GraphQL from 'graphql'\nimport type { GraphQLFormattedError } from 'graphql'\nimport type { JSONSchema4 } from 'json-schema'\nimport type { Metadata } from 'next'\nimport type { DestinationStream, Level, LoggerOptions } from 'pino'\nimport type React from 'react'\n\nimport type { ComponentRenderer } from '../admin/adapters/render.js'\nimport type { ServerAdapter } from '../admin/adapters/server.js'\nimport type { RichTextAdapterProvider } from '../admin/RichText.js'\nimport type {\n CustomStatus,\n DocumentSubViewTypes,\n DocumentTabConfig,\n DocumentViewServerProps,\n PublishButtonClientProps,\n PublishButtonServerProps,\n RichTextAdapter,\n UnpublishButtonClientProps,\n UnpublishButtonServerProps,\n} from '../admin/types.js'\nimport type { AdminViewConfig, ViewTypes, VisibleEntities } from '../admin/views/index.js'\nimport type { SanitizedPermissions } from '../auth/index.js'\nimport type {\n AddToImportMap,\n ImportMap,\n Imports,\n InternalImportMap,\n} from '../cli/commands/generateImportMap/generateImportMap.js'\nimport type {\n Collection,\n CollectionAccess,\n CollectionConfig,\n SanitizedCollectionConfig,\n} from '../collections/config/types.js'\nimport type { DatabaseAdapterResult } from '../database/types.js'\nimport type { EmailAdapter, SendEmailOptions } from '../email/types.js'\nimport type { ErrorName } from '../errors/types.js'\nimport type {\n GlobalAccess,\n GlobalConfig,\n Globals,\n SanitizedGlobalConfig,\n} from '../globals/config/types.js'\nimport type {\n Block,\n ClientField,\n DataFromWidgetSlug,\n DefaultDocumentIDType,\n Field,\n FlattenedBlock,\n JobsConfig,\n KVAdapterResult,\n Payload,\n RegisteredPlugins,\n RequestContext,\n SelectField,\n TypedWidget,\n User,\n WidgetSlug,\n} from '../index.js'\nimport type { QueryPreset, QueryPresetConstraints } from '../query-presets/types.js'\nimport type { SanitizedJobsConfig } from '../queues/config/types/index.js'\nimport type { MaybePromise, PayloadRequest, Where } from '../types/index.js'\nimport type { UploadTransformer } from '../uploads/transformers/types.js'\nimport type { PayloadLogger } from '../utilities/logger.js'\n\n/**\n * The string path pointing to the React component. If one of the generics is `never`, you effectively mark it as a server-only or client-only component.\n *\n * If it is `false` an empty component will be rendered.\n */\nexport type PayloadComponent<\n TComponentServerProps extends never | object = Record<string, any>,\n TComponentClientProps extends never | object = Record<string, any>,\n> = false | RawPayloadComponent<TComponentServerProps, TComponentClientProps> | string\n\n// We need the actual object as its own type, otherwise the infers for the PayloadClientReactComponent / PayloadServerReactComponent will not work due to the string union.\n// We also NEED to actually use those generics for this to work, thus they are part of the props.\nexport type RawPayloadComponent<\n TComponentServerProps extends never | object = Record<string, any>,\n TComponentClientProps extends never | object = Record<string, any>,\n> = {\n clientProps?: object | TComponentClientProps\n exportName?: string\n path: string\n serverProps?: object | TComponentServerProps\n}\n\nexport type PayloadComponentProps<TPayloadComponent> =\n TPayloadComponent extends RawPayloadComponent<\n infer TComponentServerProps,\n infer TComponentClientProps\n >\n ? TComponentClientProps | TComponentServerProps\n : never\n\nexport type PayloadClientComponentProps<TPayloadComponent> =\n TPayloadComponent extends RawPayloadComponent<infer _, infer TComponentClientProps>\n ? TComponentClientProps\n : never\n\nexport type PayloadServerComponentProps<TPayloadComponent> =\n TPayloadComponent extends RawPayloadComponent<infer TComponentServerProps, infer _>\n ? TComponentServerProps\n : never\n\nexport type PayloadReactComponent<TPayloadComponent> = React.FC<\n PayloadComponentProps<TPayloadComponent>\n>\n\n// This also ensures that if never is passed to TComponentClientProps, this entire type will be never.\n// => TypeScript will now ensure that users cannot even define the typed Server Components if the PayloadComponent is marked as\n// Client-Only (marked as Client-Only = TComponentServerProps is never)\nexport type PayloadClientReactComponent<TPayloadComponent> =\n TPayloadComponent extends RawPayloadComponent<infer _, infer TComponentClientProps>\n ? TComponentClientProps extends never\n ? never\n : React.FC<TComponentClientProps>\n : never\n\nexport type PayloadServerReactComponent<TPayloadComponent> =\n TPayloadComponent extends RawPayloadComponent<infer TComponentServerProps, infer _>\n ? TComponentServerProps extends never\n ? never\n : React.FC<TComponentServerProps>\n : never\n\nexport type ResolvedComponent<\n TComponentServerProps extends never | object,\n TComponentClientProps extends never | object,\n> = {\n clientProps?: TComponentClientProps\n Component: React.FC<TComponentClientProps | TComponentServerProps>\n serverProps?: TComponentServerProps\n}\n\n/** Shared resources used while the Payload CLI is running. */\nexport type CLIRuntime = {\n /** Directory containing the Payload config, used to resolve relative command paths. */\n configDir: string\n destroy: () => Promise<void>\n getConfig: () => Promise<SanitizedConfig>\n getPayload: (options?: Omit<InitOptions, 'config'>) => Promise<Payload>\n readonly isScheduled: boolean\n markScheduled: () => void\n}\n\nexport type CLICommandDescription = {\n aliases?: string[]\n description: string\n examples?: string[]\n inputSchema: Record<string, unknown>\n name: string\n}\n\nexport type CLIGlobalOptionDescription = {\n description: string\n flags: string\n}\n\nexport type CLIHelp = {\n commands: CLICommandDescription[]\n globalOptions: CLIGlobalOptionDescription[]\n output: (args?: { command?: string }) => void\n}\n\nexport type CLIInputSchema<\n Input extends Record<string, unknown> = Record<string, unknown>,\n Output extends Record<string, unknown> = Input,\n> = StandardJSONSchemaV1<Input, Output> & StandardSchemaV1<Input, Output>\n\nexport type CLIFieldOverride =\n | 'argument'\n | {\n flags?: string\n parse?: (value: string, previous: unknown) => unknown\n type?: 'option'\n }\n | {\n parse?: (value: string, previous: unknown) => unknown\n position?: number\n syntax?: string\n type: 'argument'\n }\n | false\n\n/** A schema-backed command definition created with `defineCLICommand`. */\nexport type CLICommand = {\n aliases?: string[]\n allowUnknownOption: boolean\n cli: false | Partial<Record<string, CLIFieldOverride>>\n description: string\n examples?: string[]\n handler: (context: {\n args: Record<string, unknown>\n getConfig: CLIRuntime['getConfig']\n getPayload: CLIRuntime['getPayload']\n help: CLIHelp\n isJSON: boolean\n }) => MaybePromise<CLICommandResult | number | void>\n helpGroup?: string\n input: CLIInputSchema\n readonly schema: Record<string, unknown>\n}\n\n/** Structured data and an optional exit code returned by a Payload CLI command. */\nexport type CLICommandResult = {\n /** Process exit code. Omit this, or use `0`, when the command succeeds. */\n exitCode?: number\n /** Data included under `result` when the command uses JSON output. */\n result?: unknown\n}\n\n/** A CLI command definition, import reference, or `false` to disable the command. */\nexport type CLICommandEntry = CLICommand | PayloadComponent\n\n/** CLI commands keyed by their command-line name. */\nexport type CLICommands = Record<string, CLICommandEntry>\n\ntype Prettify<T> = {\n [K in keyof T]: T[K]\n} & NonNullable<unknown>\n\n/**\n * @experimental The plugin API (`order`, `slug`, `options`) may change before being declared stable.\n */\nexport type Plugin = ((config: Config) => MaybePromise<Config>) & {\n /** @experimental Plugin options exposed for cross-plugin mutation. */\n options?: Record<string, unknown>\n /** @experimental Execution order - lower values run first. Defaults to 0. */\n order?: number\n /** @experimental Unique identifier for cross-plugin discovery via `config.plugins`. */\n slug?: string\n}\n\n/**\n * Configures where uploaded files are stored (S3, GCS, Azure, Vercel Blob, etc.).\n *\n * Storage adapters run **before plugins**, so upload hooks, static file handlers,\n * and presigned-URL endpoints are guaranteed to be in place before any plugin\n * modifies the config.\n *\n * Pass the return value of a storage adapter factory to `storage` in your\n * Payload config:\n *\n * ```ts\n * import { s3Storage } from '@payloadcms/storage-s3'\n *\n * export default buildConfig({\n * storage: [\n * s3Storage({\n * bucket: process.env.S3_BUCKET,\n * collections: { media: true },\n * config: { region: process.env.S3_REGION },\n * }),\n * ],\n * })\n * ```\n *\n * @see https://payloadcms.com/docs/uploads/storage-adapters\n */\nexport interface StorageAdapter {\n /** Collection slugs this adapter is configured to handle. */\n collections: string[]\n /** Initializes the adapter and returns the modified config with upload hooks and handlers injected. */\n init: (config: Config) => Config | Promise<Config>\n /** Unique identifier for this adapter (e.g. `'s3'`, `'gcs'`, `'azure'`). Surfaced in telemetry and on `payload.config.upload.adapters`. */\n name: string\n}\n\n/**\n * A map of plugin slugs to Plugin instances, built from `config.plugins`.\n * Registered slugs (via `RegisteredPlugins` module augmentation) return typed options.\n *\n * @experimental\n */\nexport type PluginsMap = {\n [K in keyof RegisteredPlugins]: ({ options: RegisteredPlugins[K] } & Plugin) | undefined\n} & Record<string, Plugin | undefined>\n\nexport type LivePreviewURLType = null | string | undefined\n\nexport type LivePreviewConfig = {\n /**\n Device breakpoints to use for the `iframe` of the Live Preview window.\n Options are displayed in the Live Preview toolbar.\n The `responsive` breakpoint is included by default.\n */\n breakpoints?: {\n height: number | string\n label: string\n name: string\n width: number | string\n }[]\n /**\n * When `true`, Live Preview opens automatically the first time a user views a document,\n * before they have manually toggled it on. Once the user toggles Live Preview on or off,\n * their stored preference takes precedence and this setting is ignored.\n * @default false\n */\n openByDefault?: boolean\n /**\n * The URL of the frontend application. This will be rendered within an `iframe` as its `src`.\n * Payload will send a `window.postMessage()` to this URL with the document data in real-time.\n * The frontend application is responsible for receiving the message and updating the UI accordingly.\n * @see https://payloadcms.com/docs/live-preview/frontend\n *\n * To conditionally render Live Preview, use a function that returns `undefined` or `null`.\n *\n * Note: this function may run often if autosave is enabled with a small interval.\n * For performance, avoid long-running tasks or expensive operations within this function,\n * or if you need to do something more complex, cache your function as needed.\n */\n url?:\n | ((args: {\n collectionConfig?: SanitizedCollectionConfig\n data: Record<string, any>\n globalConfig?: SanitizedGlobalConfig\n locale: Locale\n /**\n * @deprecated\n * Use `req.payload` instead. This will be removed in the next major version.\n */\n payload: Payload\n req: PayloadRequest\n }) => LivePreviewURLType | Promise<LivePreviewURLType>)\n | LivePreviewURLType\n}\n\nexport type RootLivePreviewConfig = {\n collections?: string[]\n globals?: string[]\n} & LivePreviewConfig\n\nexport type OGImageConfig = {\n alt?: string\n height?: number | string\n type?: string\n url: string\n width?: number | string\n}\n\nexport type MetaConfig = {\n /**\n * When `static`, a pre-made image will be used for all pages.\n * When `dynamic`, a unique image will be generated for each page based on page content and given overrides.\n * When `off`, no Open Graph images will be generated and the `/api/og` endpoint will be disabled. You can still provide custom images using the `openGraph.images` property.\n * @default 'dynamic'\n */\n defaultOGImageType?: 'dynamic' | 'off' | 'static'\n /**\n * String to append to the auto-generated <title> of admin pages\n * @example `\" - Custom CMS\"`\n */\n titleSuffix?: string\n} & Metadata\n\nexport type ServerOnlyLivePreviewProperties = keyof Pick<RootLivePreviewConfig, 'url'>\n\ntype GeneratePreviewURLOptions = {\n locale: string\n req: PayloadRequest\n token: null | string\n}\n\nexport type GeneratePreviewURL = (\n doc: Record<string, unknown>,\n options: GeneratePreviewURLOptions,\n) => null | Promise<null | string> | string\n\nexport type GraphQLInfo = {\n collections: {\n [slug: string]: Collection\n }\n globals: Globals\n Mutation: {\n fields: Record<string, any>\n name: string\n }\n Query: {\n fields: Record<string, any>\n name: string\n }\n types: {\n arrayTypes: Record<string, GraphQL.GraphQLType>\n blockInputTypes: Record<string, GraphQL.GraphQLInputObjectType>\n blockTypes: Record<string, GraphQL.GraphQLObjectType>\n fallbackLocaleInputType?: GraphQL.GraphQLEnumType | GraphQL.GraphQLScalarType\n groupTypes: Record<string, GraphQL.GraphQLObjectType>\n localeInputType?: GraphQL.GraphQLEnumType | GraphQL.GraphQLScalarType\n tabTypes: Record<string, GraphQL.GraphQLObjectType>\n validationResultType?: GraphQL.GraphQLObjectType\n }\n}\nexport type GraphQLExtension = (\n graphQL: typeof GraphQL,\n context: {\n config: SanitizedConfig\n } & GraphQLInfo,\n) => Record<string, unknown>\n\nexport type InitOptions = {\n /**\n * Sometimes, with the local API, you might need to pass a config file directly, for example, serverless on Vercel\n * The passed config should match the config file, and if it doesn't, there could be mismatches between the admin UI\n * and the backend functionality\n */\n config: Promise<SanitizedConfig> | SanitizedConfig\n /**\n * If set to `true`, payload will initialize crons for things like autorunning jobs on initialization.\n *\n * @default false\n */\n cron?: boolean\n\n /**\n * Disable connect to the database on init\n */\n disableDBConnect?: boolean\n\n /**\n * Disable running of the `onInit` function\n */\n disableOnInit?: boolean\n\n importMap?: ImportMap\n\n /**\n * A function that is called immediately following startup that receives the Payload instance as it's only argument.\n */\n onInit?: (payload: Payload) => Promise<void> | void\n}\n\n/**\n * This result is calculated on the server\n * and then sent to the client allowing the dashboard to show accessible data and actions.\n *\n * If the result is `true`, the user has access.\n * If the result is an object, it is interpreted as a MongoDB query.\n *\n * @example `{ createdBy: { equals: id } }`\n *\n * @example `{ tenant: { in: tenantIds } }`\n *\n * @see https://payloadcms.com/docs/access-control/overview\n */\nexport type AccessResult = boolean | Where\n\nexport type AccessArgs<TData = any> = {\n /**\n * The relevant resource that is being accessed.\n *\n * `data` is null when a list is requested\n */\n data?: TData\n /** ID of the resource being accessed */\n id?: DefaultDocumentIDType\n /** If true, the request is for a static file */\n isReadingStaticFile?: boolean\n /** The original request that requires an access check */\n req: PayloadRequest\n /** The slug of the Collection or Global document being accessed */\n slug: string\n}\n\n/**\n * Access function runs on the server\n * and is sent to the client allowing the dashboard to show accessible data and actions.\n *\n * @see https://payloadcms.com/docs/access-control/overview\n */\nexport type Access<TData = any> = (args: AccessArgs<TData>) => AccessResult | Promise<AccessResult>\n\nexport type BaseAccess = {\n collections?: CollectionAccess\n globals?: GlobalAccess\n}\n\n/** Web Request/Response model, but the req has more payload specific properties added to it. */\nexport type PayloadHandler = (req: PayloadRequest) => Promise<Response> | Response\n\n/**\n * Docs: https://payloadcms.com/docs/rest-api/overview#custom-endpoints\n */\nexport type Endpoint = {\n /** Extension point to add your custom data. */\n custom?: Record<string, any>\n\n /**\n * Middleware that will be called when the path/method matches\n *\n * Compatible with Web Request/Response Model\n */\n handler: PayloadHandler\n /** HTTP method */\n method: 'connect' | 'delete' | 'get' | 'head' | 'options' | 'patch' | 'post' | 'put'\n /**\n * Pattern that should match the path of the incoming request\n *\n * Compatible with the Express router\n */\n path: string\n /**\n * Please add \"root\" routes under the /api folder in the Payload Project.\n * https://nextjs.org/docs/app/api-reference/file-conventions/route\n *\n * @deprecated in 3.0\n */\n root?: never\n}\n\n/**\n * @deprecated\n * This type will be renamed in v4.\n * Use `DocumentViewComponent` instead.\n */\nexport type EditViewComponent = DocumentViewComponent\n\nexport type DocumentViewComponent = PayloadComponent<DocumentViewServerProps>\n\n/**\n * @deprecated\n * This type will be renamed in v4.\n * Use `DocumentViewConfig` instead.\n */\nexport type EditViewConfig = DocumentViewConfig\n\ntype BaseDocumentViewConfig = {\n actions?: CustomComponent[]\n meta?: MetaConfig\n tab?: DocumentTabConfig\n}\n\n/*\n If your view does not originate from a \"known\" key, e.g. `myCustomView`, then it is considered a \"custom\" view and can accept a `path`, etc.\n To render just a tab component without an accompanying view, you can omit the `path` and `Component` properties altogether.\n*/\nexport type CustomDocumentViewConfig =\n | ({\n Component: DocumentViewComponent\n path: `/${string}`\n } & BaseDocumentViewConfig)\n | ({\n Component?: DocumentViewComponent\n path?: never\n } & BaseDocumentViewConfig)\n\n/*\n If your view does originates from a \"known\" key, e.g. `api`, then it is considered a \"default\" view and cannot accept a `path`, etc.\n*/\nexport type DefaultDocumentViewConfig = {\n Component?: DocumentViewComponent\n} & BaseDocumentViewConfig\n\nexport type DocumentViewConfig = CustomDocumentViewConfig | DefaultDocumentViewConfig\n\nexport type Params = { [key: string]: string | string[] | undefined }\n\nexport type ServerProps = {\n readonly documentSubViewType?: DocumentSubViewTypes\n readonly i18n: I18nClient\n readonly id?: number | string\n readonly locale?: Locale\n readonly params?: Params\n readonly payload: Payload\n readonly permissions?: SanitizedPermissions\n /**\n * Adapter-injected component renderer. Server components can use this\n * to render other import map components without importing a\n * framework-specific renderer directly.\n */\n readonly renderComponent?: ComponentRenderer\n readonly searchParams?: Params\n /**\n * Framework-agnostic methods for server-side navigation, headers, cookies, and other server-only APIs.\n * Plugins should call these methods instead of importing directly from `next/navigation`, `next/headers`, etc.\n * These methods are populated by the given framework adapter, e.g. `@payloadcms/next`.\n *\n * Optional because non-framework contexts (jobs, scripts, tests) may not have an adapter attached.\n */\n readonly server: ServerAdapter\n /**\n * Authenticated user with field read access applied. Use for values sent to the client.\n * For access-control checks use the full principal at `req.user`.\n */\n readonly user?: User\n readonly viewType?: ViewTypes\n readonly visibleEntities?: VisibleEntities\n}\n\nexport const serverProps: (keyof ServerProps)[] = [\n 'payload',\n 'i18n',\n 'locale',\n 'params',\n 'permissions',\n 'renderComponent',\n 'searchParams',\n 'permissions',\n]\n\nexport type Timezone = {\n label: string\n value: string\n}\n\ntype SupportedTimezonesFn = (args: { defaultTimezones: Timezone[] }) => Timezone[]\n\nexport type TimezonesConfig = {\n /**\n * The default timezone to use for the admin panel.\n */\n defaultTimezone?: string\n /**\n * Provide your own list of supported timezones for the admin panel\n *\n * Values should be IANA timezone names, eg. `America/New_York`\n *\n * We use `@date-fns/tz` to handle timezones\n */\n supportedTimezones?: SupportedTimezonesFn | Timezone[]\n}\n\ntype SanitizedTimezoneConfig = {\n supportedTimezones: Timezone[]\n} & Omit<TimezonesConfig, 'supportedTimezones'>\n\nexport type CustomComponent<TAdditionalProps extends object = Record<string, any>> =\n PayloadComponent<ServerProps & TAdditionalProps, TAdditionalProps>\n\nexport type UserMenuSettingsGroup = {\n group: LabelFunction | StaticLabel\n items: CustomComponent[]\n}\n\nexport type UserMenuSettingsItem = CustomComponent | UserMenuSettingsGroup\n\nexport const isUserMenuSettingsGroup = (\n userMenuSettingsItem: UserMenuSettingsItem,\n): userMenuSettingsItem is UserMenuSettingsGroup =>\n typeof userMenuSettingsItem === 'object' &&\n userMenuSettingsItem !== null &&\n 'items' in userMenuSettingsItem &&\n Array.isArray(userMenuSettingsItem.items)\n\nexport type Locale = {\n /**\n * value of supported locale\n * @example \"en\"\n */\n code: string\n /**\n * Code of another locale to use when reading documents with fallback, if not specified defaultLocale is used\n */\n fallbackLocale?: string | string[]\n /**\n * label of supported locale\n * @example \"English\"\n */\n label: Record<string, string> | string\n /**\n * if true, defaults textAligmnent on text fields to RTL\n */\n rtl?: boolean\n}\n\nexport type BaseLocalizationConfig = {\n /**\n * Locale for users that have not expressed their preference for a specific locale\n * @example `\"en\"`\n */\n defaultLocale: string\n /** Set to `true` to let missing values in localised fields fall back to the values in `defaultLocale`\n *\n * If false, then no requests will fallback unless a fallbackLocale is specified in the request.\n * @default true\n */\n fallback?: boolean\n /**\n * Define a function to filter the locales made available in Payload admin UI\n * based on user.\n */\n filterAvailableLocales?: (args: {\n locales: Locale[]\n req: PayloadRequest\n }) => Locale[] | Promise<Locale[]>\n}\n\nexport type LocalizationConfigWithNoLabels = Prettify<\n {\n /**\n * List of supported locales\n * @example `[\"en\", \"es\", \"fr\", \"nl\", \"de\", \"jp\"]`\n */\n locales: string[]\n } & BaseLocalizationConfig\n>\n\nexport type LocalizationConfigWithLabels = Prettify<\n {\n /**\n * List of supported locales with labels\n * @example {\n * label: 'English',\n * value: 'en',\n * rtl: false\n * }\n */\n locales: Locale[]\n } & BaseLocalizationConfig\n>\n\nexport type SanitizedLocalizationConfig = Prettify<\n {\n /**\n * List of supported locales\n * @example `[\"en\", \"es\", \"fr\", \"nl\", \"de\", \"jp\"]`\n */\n localeCodes: string[]\n locales: Locale[]\n } & Omit<LocalizationConfigWithLabels, 'fallback' | 'locales'> &\n Required<Pick<LocalizationConfigWithLabels, 'fallback'>>\n>\n\n/**\n * @see https://payloadcms.com/docs/configuration/localization#localization\n */\nexport type LocalizationConfig = Prettify<\n LocalizationConfigWithLabels | LocalizationConfigWithNoLabels\n>\n\nexport type LabelFunction<TTranslationKeys = ClientTranslationKeys> = (args: {\n i18n: I18nClient\n t: TFunction<TTranslationKeys>\n}) => string\n\nexport type StaticLabel = Record<string, string> | string\n\nexport type CORSConfig = {\n headers?: string[]\n origins: '*' | string[]\n}\n\nexport type AdminFunction = {\n args?: object\n path: string\n type: 'function'\n}\n\nexport type AdminComponent = {\n clientProps?: object\n path: string\n serverProps?: object\n type: 'component'\n}\n\nexport interface AdminDependencies {\n [key: string]: AdminComponent | AdminFunction\n}\n\nexport type FetchAPIFileUploadOptions = {\n /**\n * Returns a HTTP 413 when the file is bigger than the size limit if `true`.\n * Otherwise, it will add a `truncated = true` to the resulting file structure.\n * @default true\n */\n abortOnLimit?: boolean | undefined\n /**\n * Automatically creates the directory path specified in `.mv(filePathName)`\n * @default false\n */\n createParentPath?: boolean | undefined\n /**\n * Turn on/off upload process logging. Can be useful for troubleshooting.\n * @default false\n */\n debug?: boolean | undefined\n /**\n * User defined limit handler which will be invoked if the file is bigger than configured limits.\n * @default false\n */\n limitHandler?: ((args: { request: Request; size: number }) => void) | boolean | undefined\n /**\n * By default, `req.body` and `req.files` are flattened like this:\n * `{'name': 'John', 'hobbies[0]': 'Cinema', 'hobbies[1]': 'Bike'}\n *\n * When this option is enabled they are parsed in order to be nested like this:\n * `{'name': 'John', 'hobbies': ['Cinema', 'Bike']}`\n * @default false\n */\n parseNested?: boolean | undefined\n /**\n * Preserves filename extension when using `safeFileNames` option.\n * If set to `true`, will default to an extension length of `3`.\n * If set to `number`, this will be the max allowable extension length.\n * If an extension is smaller than the extension length, it remains untouched. If the extension is longer,\n * it is shifted.\n * @default false\n *\n * @example\n * // true\n * app.use(fileUpload({ safeFileNames: true, preserveExtension: true }));\n * // myFileName.ext --> myFileName.ext\n *\n * @example\n * // max extension length 2, extension shifted\n * app.use(fileUpload({ safeFileNames: true, preserveExtension: 2 }));\n * // myFileName.ext --> myFileNamee.xt\n */\n preserveExtension?: boolean | number | undefined\n /**\n * Maximum size in bytes for the complete raw multipart request, including files, fields, headers, and boundaries.\n * Must be a non-negative safe integer. Set to `Infinity` to disable the request-wide limit.\n * @default 50 * 1024 * 1024\n */\n requestSizeLimit?: number | undefined\n /**\n * Response which will be send to client if file size limit exceeded when `abortOnLimit` set to `true`.\n * @default 'File size limit has been reached'\n */\n responseOnLimit?: string | undefined\n /**\n * Strips characters from the upload's filename.\n * You can use custom regex to determine what to strip.\n * If set to `true`, non-alphanumeric characters _except_ dashes and underscores will be stripped.\n * This option is off by default.\n * @default false\n *\n * @example\n * // strip slashes from file names\n * app.use(fileUpload({ safeFileNames: /\\\\/g }))\n *\n * @example\n * app.use(fileUpload({ safeFileNames: true }))\n */\n safeFileNames?: boolean | RegExp | undefined\n /**\n * Path to store temporary files.\n * Used along with the `useTempFiles` option. By default this module uses `'tmp'` folder\n * in the current working directory.\n * You can use trailing slash, but it is not necessary.\n * @default 'tmp'\n */\n tempFileDir?: string | undefined\n /**\n * This defines how long to wait for data before aborting. Set to `0` if you want to turn off timeout checks.\n * @default 60_000\n */\n uploadTimeout?: number | undefined\n /**\n * Applies uri decoding to file names if set `true`.\n * @default false\n */\n uriDecodeFileNames?: boolean | undefined\n /**\n * By default this module uploads files into RAM.\n * Setting this option to `true` turns on using temporary files instead of utilising RAM.\n * This avoids memory overflow issues when uploading large files or in case of uploading\n * lots of files at same time.\n * @default false\n */\n useTempFiles?: boolean | undefined\n} & Partial<BusboyConfig>\n\nexport type GlobalUploadConfig = {\n /**\n * Ordered list of file transformers. Every eligible transformer joins the pipeline\n * for a given upload or dynamic request in declaration order. Slugs must be unique.\n *\n * @see https://payloadcms.com/docs/upload/transformers\n */\n transformers?: UploadTransformer[]\n} & FetchAPIFileUploadOptions\n\nexport type ErrorResult = {\n data?: any\n errors: {\n data?: Record<string, unknown>\n field?: string\n message?: string\n name?: string\n }[]\n stack?: string\n}\n\nexport type AfterErrorResult = {\n graphqlResult?: GraphQLFormattedError\n response?: Partial<ErrorResult> & Record<string, unknown>\n status?: number\n} | void\n\nexport type AfterErrorHookArgs = {\n /** The Collection that the hook is operating on. This will be undefined if the hook is executed from a non-collection endpoint or GraphQL. */\n collection?: SanitizedCollectionConfig\n /** \tCustom context passed between hooks */\n context: RequestContext\n /** The error that occurred. */\n error: Error\n /** The GraphQL result object, available if the hook is executed within a GraphQL context. */\n graphqlResult?: GraphQLFormattedError\n /** The Request object containing the currently authenticated user. */\n req: PayloadRequest\n /** The formatted error result object, available if the hook is executed from a REST context. */\n result?: ErrorResult\n}\n\nexport type ImportMapGenerators = Array<\n (props: {\n addToImportMap: AddToImportMap\n baseDir: string\n config: SanitizedConfig\n importMap: InternalImportMap\n imports: Imports\n }) => void\n>\n\nexport type AfterErrorHook = (\n args: AfterErrorHookArgs,\n) => AfterErrorResult | Promise<AfterErrorResult>\n\nexport type WidgetWidth = 'full' | 'large' | 'medium' | 'small' | 'x-large' | 'x-small'\n\nexport type Widget = {\n Component: PayloadComponent\n fields?: Field[]\n /**\n * Human-friendly label for the widget.\n * Supports i18n by passing an object with locale keys, or a function with `t` for translations.\n * If not provided, the label will be auto-generated from the slug.\n */\n label?: LabelFunction | StaticLabel\n maxWidth?: WidgetWidth\n minWidth?: WidgetWidth\n slug: string\n // Maybe:\n // ImageURL?: string // similar to Block\n}\n\n/**\n * Client-side widget type with resolved label (no functions).\n */\nexport type ClientWidget = {\n fields?: ClientField[]\n label?: StaticLabel\n maxWidth?: WidgetWidth\n minWidth?: WidgetWidth\n slug: string\n}\n\nexport type WidgetInstance<TSlug extends WidgetSlug = WidgetSlug> = TSlug extends WidgetSlug\n ? {\n data?: DataFromWidgetSlug<TSlug> extends Record<string, unknown>\n ? DataFromWidgetSlug<TSlug>\n : Record<string, unknown>\n widgetSlug: TSlug\n width: [\n Extract<\n TypedWidget[TSlug] extends { width: infer TWidth } ? TWidth : WidgetWidth,\n WidgetWidth\n >,\n ] extends [never]\n ? WidgetWidth\n : Extract<\n TypedWidget[TSlug] extends { width: infer TWidth } ? TWidth : WidgetWidth,\n WidgetWidth\n >\n }\n : never\n\nexport type DashboardConfig = {\n defaultLayout?:\n | ((args: { req: PayloadRequest }) => Array<WidgetInstance> | Promise<Array<WidgetInstance>>)\n | Array<WidgetInstance>\n widgets: Array<Widget>\n}\n\nexport type SanitizedDashboardConfig = {\n widgets: Array<Omit<Widget, 'Component'>>\n}\n\nexport type SidebarTab = {\n /** Tab components */\n components: {\n /** Component to render as tab content */\n Content: CustomComponent\n /** Component to render as tab icon */\n Icon: PayloadComponent\n }\n /** Disable this tab */\n disabled?: boolean\n /** Make this tab active by default */\n isDefaultActive?: boolean\n /**\n * Label for accessibility and tab display.\n * Supports i18n by passing an object with locale keys, or a function with `t` for translations.\n * If not provided, the slug will be used as fallback.\n */\n label?: LabelFunction | StaticLabel\n /** Unique identifier for override/disable */\n slug: string\n}\n\ntype RootAdminConfig = {\n /** Automatically log in as a user */\n autoLogin?:\n | {\n /**\n * The email address of the user to login as\n */\n email?: string\n /** The password of the user to login as. This is only needed if `prefillOnly` is set to true */\n password?: string\n /**\n * If set to true, the login credentials will be prefilled but the user will still need to click the login button.\n *\n * @default false\n */\n prefillOnly?: boolean\n /** The username of the user to login as */\n username?: string\n }\n | false\n /**\n * Automatically refresh user tokens for users logged into the dashboard\n *\n * @default false\n */\n autoRefresh?: boolean\n /** Set account profile picture. Options: gravatar, default or a custom React component. */\n avatar?:\n | 'default'\n | 'gravatar'\n | {\n Component: PayloadComponent\n }\n\n /**\n * Add extra and/or replace built-in components with custom components\n *\n * @see https://payloadcms.com/docs/custom-components/overview\n */\n components?: {\n /**\n * Add custom components to the top right of the Admin Panel\n */\n actions?: CustomComponent[]\n /**\n * Add custom components after the collection overview\n */\n afterDashboard?: CustomComponent[]\n /**\n * Add custom components after the email/password field\n */\n afterLogin?: CustomComponent[]\n /**\n * Add custom components after the navigation section\n */\n afterNav?: CustomComponent[]\n /**\n * Add custom components after the navigation links\n */\n afterNavLinks?: CustomComponent[]\n /**\n * Add custom components before the collection overview\n */\n beforeDashboard?: CustomComponent[]\n /**\n * Add custom components before the email/password field\n */\n beforeLogin?: CustomComponent[]\n /**\n * Add custom components before the navigation section\n */\n beforeNav?: CustomComponent[]\n /**\n * Add custom components before the navigation links\n */\n beforeNavLinks?: CustomComponent[]\n /** Replace graphical components */\n graphics?: {\n /** Replace the icon in the navigation */\n Icon?: CustomComponent\n /** Replace the logo on the login page */\n Logo?: CustomComponent\n }\n /**\n * Add custom header to top of page globally\n */\n header?: CustomComponent[]\n /** Replace logout related components */\n logout?: {\n /** Replace the logout button */\n Button?: CustomComponent\n }\n /**\n * Replace the navigation with a custom component\n */\n Nav?: CustomComponent\n /**\n * Wrap the admin dashboard in custom context providers\n */\n providers?: PayloadComponent<{ children?: React.ReactNode }, { children?: React.ReactNode }>[]\n /**\n * Add custom menu items to the navigation menu accessible via the gear icon.\n * These components will be rendered in a popup menu above the logout button.\n */\n settingsMenu?: CustomComponent[]\n /** Sidebar configuration */\n sidebar?: {\n /** Extensible tab system */\n tabs?: SidebarTab[]\n }\n /**\n * Add custom items to the user menu popup in the admin panel header.\n * These components will be rendered in the Settings sub-popup of the user menu.\n * When empty or absent, the Settings sub-trigger is not shown.\n */\n userMenuSettingsItems?: UserMenuSettingsItem[]\n /**\n * Replace or modify top-level admin routes, or add new ones:\n * + `Account` - `/admin/account`\n * + `Dashboard` - `/admin`\n * + `:path` - `/admin/:path`\n */\n views?: {\n /** Add custom admin views */\n [key: string]: AdminViewConfig\n /** Replace the account screen */\n // @ts-expect-error - vestiges of when tsconfig was not strict. Feel free to improve\n account?: AdminViewConfig\n /** Replace the admin homepage */\n // @ts-expect-error - vestiges of when tsconfig was not strict. Feel free to improve\n dashboard?: AdminViewConfig\n }\n }\n /**\n * Constrain the Admin Panel content width to 1080px on desktop.\n *\n * @experimental This property is subject to change in future releases.\n * @default false\n */\n constrainWidth?: boolean\n /** Extension point to add your custom data. Available in server and client. */\n custom?: Record<string, any>\n /**\n * Customize the dashboard widgets\n * @experimental This prop is subject to change in future releases.\n */\n dashboard?: DashboardConfig\n /** Global date format that will be used for all dates in the Admin panel. Any valid date-fns format pattern can be used. */\n dateFormat?: string\n /**\n * Each entry in this map generates an entry in the importMap.\n */\n dependencies?: AdminDependencies\n /**\n * @deprecated\n * This option is deprecated and will be removed in v4.\n * To disable the admin panel itself, delete your `/app/(payload)/admin` directory.\n * To disable all REST API and GraphQL endpoints, delete your `/app/(payload)/api` directory.\n * Note: If you've modified the default paths via `admin.routes`, delete those directories instead.\n */\n disable?: boolean\n importMap?: {\n /**\n * Automatically generate component map during development\n * @default true\n */\n autoGenerate?: boolean\n /**\n * The base directory for component paths starting with /.\n * @default process.cwd()\n **/\n baseDir?: string\n /**\n * You can use generators to add custom components to the component import map.\n * This allows you to import custom components in the admin panel.\n */\n generators?: ImportMapGenerators\n /**\n * If Payload cannot find the import map file location automatically,\n * you can manually provide it here.\n */\n importMapFile?: string\n }\n /**\n * Live Preview options.\n *\n * @see https://payloadcms.com/docs/live-preview/overview\n */\n livePreview?: RootLivePreviewConfig\n /** Base meta data to use for the Admin Panel. Included properties are titleSuffix, ogImage, and favicon. */\n meta?: MetaConfig\n routes?: {\n /** The route for the account page.\n *\n * @default '/account'\n */\n account?: `/${string}`\n /** The route for the create first user page.\n *\n * @default '/create-first-user'\n */\n createFirstUser?: `/${string}`\n /** The route for the forgot password page.\n *\n * @default '/forgot'\n */\n forgot?: `/${string}`\n /** The route the user will be redirected to after being inactive for too long.\n *\n * @default '/logout-inactivity'\n */\n inactivity?: `/${string}`\n /** The route for the login page.\n *\n * @default '/login'\n */\n login?: `/${string}`\n /** The route for the logout page.\n *\n * @default '/logout'\n */\n logout?: `/${string}`\n /** The route for the reset password page.\n *\n * @default '/reset'\n */\n reset?: `/${string}`\n /** The route for the unauthorized page.\n *\n * @default '/unauthorized'\n */\n unauthorized?: `/${string}`\n }\n /**\n * Suppresses React hydration mismatch warnings during the hydration of the root <html> tag.\n * Useful in scenarios where the server-rendered HTML might intentionally differ from the client-rendered DOM.\n * @default false\n */\n suppressHydrationWarning?: boolean\n /**\n * Restrict the Admin Panel theme to use only one of your choice\n *\n * @default 'all' // The theme can be configured by users\n */\n theme?: 'all' | 'dark' | 'light'\n /**\n * Configure timezone related settings for the admin panel.\n */\n timezones?: TimezonesConfig\n /**\n * Configure toast message behavior and appearance in the admin panel.\n * Currently using [Sonner](https://sonner.emilkowal.ski) for toast notifications.\n *\n * @experimental This property is experimental and may change in future releases. Use at your own risk.\n */\n toast?: {\n /**\n * Time in milliseconds until the toast automatically closes.\n * @default 6000\n */\n duration?: number\n /**\n * If `true`, will expand the message stack so that all messages are shown simultaneously without user interaction.\n * Otherwise only the latest notification can be read until the user hovers the stack.\n * @default false\n */\n expand?: boolean\n /**\n * The maximum number of toasts that can be visible on the screen at once.\n * @default 5\n */\n limit?: number\n /**\n * The position of the toast on the screen.\n * @default 'bottom-right'\n */\n position?:\n | 'bottom-center'\n | 'bottom-left'\n | 'bottom-right'\n | 'top-center'\n | 'top-left'\n | 'top-right'\n }\n /** The slug of a Collection that you want to be used to log in to the Admin dashboard. */\n user?: string\n}\n\ntype RootGraphQLConfig = {\n disable?: boolean\n /**\n * Disable introspection queries in production.\n *\n * @default true\n */\n disableIntrospectionInProduction?: boolean\n /**\n * Disable the GraphQL Playground in production.\n *\n * @default true\n */\n disablePlaygroundInProduction?: boolean\n maxComplexity?: number\n /**\n * Function that returns an object containing keys to custom GraphQL mutations\n *\n * @see https://payloadcms.com/docs/graphql/extending\n */\n mutations?: GraphQLExtension\n /**\n * Function that returns an object containing keys to custom GraphQL queries\n *\n * @see https://payloadcms.com/docs/graphql/extending\n */\n queries?: GraphQLExtension\n /**\n * Filepath to write the generated schema to\n */\n schemaOutputFile?: string\n /**\n * Function that returns an array of validation rules to apply to the GraphQL schema\n *\n * @see https://payloadcms.com/docs/graphql/overview#custom-validation-rules\n */\n validationRules?: (args: GraphQL.ExecutionArgs) => GraphQL.ValidationRule[]\n}\n\ntype RootTypeScriptConfig = {\n /**\n * Automatically generate types during development\n * @default true\n */\n autoGenerate?: boolean\n\n /** Disable declare block in generated types file */\n declare?:\n | {\n /**\n * @internal internal use only to allow for multiple declarations within a monorepo and suppress the \"Duplicate identifier GeneratedTypes\" error\n *\n * Adds a @ts-ignore flag above the GeneratedTypes interface declaration\n *\n * @default false\n */\n ignoreTSError?: boolean\n }\n | false\n\n /**\n * Also generate a write-shaped input type (e.g. `PostInput`) next to each read type, describing\n * what `create`/`update` accept: relationships and uploads as IDs only, `id` and `defaultValue`\n * fields optional, and `createdAt`/`updatedAt`/virtual/join fields removed. These are\n * exposed on `Config['collectionsInput']` and `Config['globalsInput']`. Set `true` to turn them on.\n * Draft-enabled entities retain `_status` because it is a writable create/update field.\n *\n * @default false\n *\n * @remarks\n * Off by default. The Local API's `create`/`update` still type their `data` against the read\n * type, so these input types aren't used internally - they're here for you to opt into, e.g. to\n * type a form payload, a seed script, or an API client. `@payloadcms/plugin-mcp` also uses the\n * input schema, but it builds that itself at runtime, so MCP gets the accurate write schema\n * whether or not this flag is on.\n *\n * @todo We'd like to turn this on by default (or have the Local API use the input type\n * directly), but there's a catch. When you read a document with `depth > 0`, its relationships\n * come back as full documents rather than IDs. A strict ID-only input type would reject that and\n * break the common \"read a doc, change a field, save it back\" pattern. To enable it by default,\n * the input type would first need to accept a relationship as either an ID or the full document\n * (which is what Payload already does at runtime), while keeping `id`, `defaultValue`, and\n * auto-managed fields optional. Until then it stays opt-in, so we don't put a type that's\n * stricter than the runtime on the main write path.\n */\n generateInputTypes?: boolean\n\n /** Filename to write the generated types to */\n outputFile?: string\n\n /**\n * Post-process the generated TypeScript types string before writing to file.\n * Useful for plugins that need to inject generic types that JSON Schema cannot express.\n *\n * Functions are applied in order after the built-in Select generics are added.\n *\n * @example\n * ```ts\n * postProcess: [\n * ({ compiledTypes, config }) => {\n * const genericType = `export type MyGeneric<T> = { value: T };`\n * return compiledTypes.replace(/(\\/\\*[\\s\\S]*?\\*\\/\\n)/, `$1\\n${genericType}\\n`)\n * },\n * ]\n * ```\n */\n postProcess?: Array<(args: { compiledTypes: string; config: SanitizedConfig }) => string>\n\n /**\n * Allows you to modify the base JSON schema that is generated during generate:types. This JSON schema will be used\n * to generate the TypeScript interfaces.\n */\n schema?: Array<\n (args: {\n collectionIDFieldTypes: {\n [key: string]: 'number' | 'string'\n }\n config: SanitizedConfig\n i18n: I18n\n jsonSchema: JSONSchema4\n }) => JSONSchema4\n >\n\n /**\n * Enable strict type safety for draft operations. When enabled, the `draft` parameter is forbidden\n * on collections without drafts, and query results with `draft: true` type required fields as optional.\n * This prevents invalid draft usage at compile time and ensures type correctness across all Local API operations.\n *\n * @default false\n * @todo Remove in v4. Strict draft types will become the default behavior.\n */\n strictDraftTypes?: boolean\n}\n\n/**\n * This is the central configuration\n *\n * @see https://payloadcms.com/docs/configuration/overview\n */\nexport type Config = {\n /** Configure admin dashboard */\n admin?: RootAdminConfig\n\n /**\n * Configure authentication-related Payload-wide settings.\n */\n auth?: {\n /**\n * Define which JWT identification methods you'd like to support for Payload's local auth strategy, as well as the order that they're retrieved in.\n * Defaults to ['JWT', 'Bearer', 'cookie]\n */\n jwtOrder?: ('Bearer' | 'cookie' | 'JWT')[]\n }\n /**\n * Define Collection and Global access constraints that are combined with document Access Control using AND semantics.\n */\n baseAccess?: BaseAccess\n blocks?: Block[]\n /**\n * Pass additional options to the parser used to process `multipart/form-data` requests.\n * For example, a PATCH request containing HTML form data.\n * For example, you may want to increase the `limits` imposed by the parser.\n * Currently using @link {https://www.npmjs.com/package/busboy|busboy} under the hood.\n *\n * @experimental This property is experimental and may change in future releases. Use at your own risk.\n */\n bodyParser?: Partial<BusboyConfig>\n /** Customize the Payload CLI, or set to `false` to disable it. */\n cli?:\n | {\n /** Add, replace, or disable commands by name. Built-in commands are added during sanitization. */\n commands?: CLICommands\n }\n | false\n /**\n * Manage the datamodel of your application\n *\n * @see https://payloadcms.com/docs/configuration/collections#collection-configs\n */\n collections?: CollectionConfig[]\n /**\n * Prefix a string to all cookies that Payload sets.\n *\n * @default \"payload\"\n */\n cookiePrefix?: string\n /** Either a whitelist array of URLS to allow CORS requests from, or a wildcard string ('*') to accept incoming requests from any domain. */\n cors?: '*' | CORSConfig | string[]\n /** A whitelist array of URLs to allow Payload cookies to be accepted from as a form of CSRF protection. */\n csrf?: string[]\n /** Extension point to add your custom data. Server only. */\n custom?: Record<string, any>\n /** Pass in a database adapter for use on this project. */\n db: DatabaseAdapterResult\n /** Enable to expose more detailed error information. */\n debug?: boolean\n /**\n * If a user does not specify `depth` while requesting a resource, this depth will be used.\n *\n * @see https://payloadcms.com/docs/getting-started/concepts#depth\n *\n * @default 1\n */\n defaultDepth?: number\n /**\n * The maximum allowed depth to be permitted application-wide. This setting helps prevent against malicious queries.\n *\n * @default 40000\n */\n defaultMaxTextLength?: number\n /** Default richtext editor to use for richText fields */\n editor?: RichTextAdapterProvider<any, any, any>\n /**\n * Email Adapter\n *\n * @see https://payloadcms.com/docs/email/overview\n */\n email?: EmailAdapter | Promise<EmailAdapter>\n /** Custom REST endpoints */\n endpoints?: Endpoint[]\n /**\n * @see https://payloadcms.com/docs/configuration/globals#global-configs\n */\n globals?: GlobalConfig[]\n /**\n * Manage the GraphQL API\n *\n * You can add your own GraphQL queries and mutations to Payload, making use of all the types that Payload has defined for you.\n *\n * @see https://payloadcms.com/docs/graphql/overview\n */\n graphQL?: RootGraphQLConfig\n /**\n * Tap into Payload-wide hooks.\n *\n * @see https://payloadcms.com/docs/hooks/overview\n */\n hooks?: {\n afterError?: AfterErrorHook[]\n }\n /** i18n config settings */\n // eslint-disable-next-line @typescript-eslint/no-empty-object-type\n i18n?: I18nOptions<{} | DefaultTranslationsObject> // loosen the type here to allow for custom translations\n /** Automatically index all sortable top-level fields in the database to improve sort performance and add database compatibility for Azure Cosmos and similar. */\n indexSortableFields?: boolean\n /**\n * @experimental There may be frequent breaking changes to this API\n */\n jobs?: JobsConfig\n /**\n * Pass in a KV adapter for use on this project.\n * @default `DatabaseKVAdapter` from:\n * ```ts\n * import { createDatabaseKVAdapter } from 'payload'\n * createDatabaseKVAdapter()\n * ```\n */\n kv?: KVAdapterResult\n /** Manage instructions shared by MCP and CLI consumers. Set to false to disable the management UI and collection. */\n llmInstructions?:\n | {\n /** Who may edit saved instructions, in addition to the target's read and update access. Defaults to users of the admin auth collection. */\n access?: Access\n /** Editor for instructions. Defaults to the root editor's llmInstructions preset, or plain text if unavailable. */\n editor?: Config['editor']\n }\n | false\n /**\n * Translate your content to different languages/locales.\n *\n * @default false // disable localization\n */\n localization?: false | LocalizationConfig\n /**\n * Logger options, logger options with a destination stream, or an instantiated logger instance.\n *\n * See Pino Docs for options: https://getpino.io/#/docs/api?id=options\n *\n * ```ts\n * // Logger options only\n * logger: {\n * level: 'info',\n * }\n *\n * // Logger options with destination stream\n * logger: {\n * options: {\n * level: 'info',\n * },\n * destination: process.stdout\n * },\n *\n * // Logger instance\n * logger: pino({ name: 'my-logger' })\n *\n * ```\n */\n logger?: 'sync' | { destination?: DestinationStream; options: LoggerOptions } | PayloadLogger\n\n /**\n * Override the log level of errors for Payload's error handler or disable logging with `false`.\n * Levels can be any of the following: 'trace', 'debug', 'info', 'warn', 'error', 'fatal' or false.\n *\n * Default levels:\n * {\n `* APIError: 'error',\n `* AuthenticationError: 'error',\n `* ErrorDeletingFile: 'error',\n `* FileRetrievalError: 'error',\n `* FileUploadError: 'error',\n `* Forbidden: 'info',\n `* Locked: 'info',\n `* LockedAuth: 'error',\n `* MissingFile: 'info',\n `* NotFound: 'info',\n `* QueryError: 'error',\n `* ValidationError: 'info',\n * }\n */\n loggingLevels?: Partial<Record<ErrorName, false | Level>>\n\n /**\n * The maximum allowed depth to be permitted application-wide. This setting helps prevent against malicious queries.\n *\n * @see https://payloadcms.com/docs/getting-started/concepts#depth\n *\n * @default 10\n */\n maxDepth?: number\n\n /** A function that is called immediately following startup that receives the Payload instance as its only argument. */\n onInit?: (payload: Payload) => Promise<void> | void\n /**\n * An array of Payload plugins.\n *\n * @see https://payloadcms.com/docs/plugins/overview\n */\n plugins?: Plugin[]\n /**\n * Previous `secret` values that should still be accepted for reads (verifying\n * JWTs, matching API keys, decrypting stored values) during a bounded key\n * rotation. New data is always written with the current `secret`. Retire these\n * once `rotateSecret` has re-keyed existing data.\n */\n previousSecrets?: string[]\n /**\n * Allow you to save and share filters, columns, and sort orders for your collections.\n * @see https://payloadcms.com/docs/query-presets/overview\n */\n queryPresets?: {\n /**\n * Define collection-level access control that applies to all presets globally.\n * This is separate from document-level access (constraints) which users can configure per-preset.\n */\n access: {\n create?: Access<QueryPreset>\n delete?: Access<QueryPreset>\n read?: Access<QueryPreset>\n update?: Access<QueryPreset>\n }\n /**\n * Define custom document-level access control options for presets.\n *\n * Payload provides sensible defaults (Only Me, Everyone, Specific Users), but you can\n * add custom constraints for more complex patterns like RBAC.\n *\n * @example\n * ```ts\n * constraints: {\n * read: [\n * {\n * label: 'Specific Roles',\n * value: 'specificRoles',\n * fields: [\n * {\n * name: 'roles',\n * type: 'select',\n * hasMany: true,\n * options: [\n * { label: 'Admin', value: 'admin' },\n * { label: 'User', value: 'user' },\n * ],\n * },\n * ],\n * access: ({ req: { user } }) => ({\n * 'access.read.roles': { in: [user?.roles] },\n * }),\n * },\n * ],\n * }\n * ```\n *\n * @see https://payloadcms.com/docs/query-presets/overview#custom-access-control\n */\n constraints: {\n create?: QueryPresetConstraints\n delete?: QueryPresetConstraints\n read?: QueryPresetConstraints\n update?: QueryPresetConstraints\n }\n /**\n * Used to dynamically filter which constraints are available based on the current user, document data,\n * or other criteria.\n *\n * Some examples of this might include:\n *\n * - Ensuring that only \"admins\" are allowed to make a preset available to \"everyone\"\n * - Preventing the \"onlyMe\" option from being selected based on a hypothetical \"disablePrivatePresets\" checkbox\n *\n * When a user lacks the permission to set a constraint, the option will either be hidden from them, or disabled if it is already saved to that preset.\n *\n * @see https://payloadcms.com/docs/query-presets/overview#constraint-access-control\n */\n filterConstraints?: SelectField['filterOptions']\n labels?: CollectionConfig['labels']\n }\n /**\n * Control the routing structure that Payload binds itself to.\n * @link https://payloadcms.com/docs/admin/overview#root-level-routes\n */\n routes?: {\n /**\n * The route for the admin panel.\n * @example \"/my-admin\" or \"/\"\n * @default \"/admin\"\n * @link https://payloadcms.com/docs/admin/overview#root-level-routes\n */\n admin?: string\n /**\n * The base route for all REST API endpoints.\n * @default \"/api\"\n * @link https://payloadcms.com/docs/admin/overview#root-level-routes\n */\n api?: string\n /**\n * The base route for all GraphQL endpoints.\n * @default \"/graphql\"\n * @link https://payloadcms.com/docs/admin/overview#root-level-routes\n */\n graphQL?: string\n /**\n * The route for the GraphQL Playground.\n * @default \"/graphql-playground\"\n * @link https://payloadcms.com/docs/admin/overview#root-level-routes\n */\n graphQLPlayground?: string\n }\n /** Secure string that Payload will use for any encryption workflows */\n secret: string\n /**\n * Define the absolute URL of your app including the protocol, for example `https://example.org`.\n * No paths allowed, only protocol, domain and (optionally) port.\n *\n * @see https://payloadcms.com/docs/configuration/overview#options\n */\n serverURL?: string\n /**\n * Storage adapters that handle where uploaded files are stored (S3, GCS, Azure, Vercel Blob, etc.).\n *\n * Adapters are initialized **before** `plugins`, so file handling is fully wired before any plugin\n * runs. Use this instead of placing storage adapter packages in `plugins`.\n *\n * Migrate existing `plugins` usage automatically with:\n * ```sh\n * npx @payloadcms/codemod --transform migrate-storage-adapters-to-config\n * ```\n *\n * @see https://payloadcms.com/docs/uploads/storage-adapters\n */\n storage?: StorageAdapter[]\n /** Send anonymous telemetry data about general usage. */\n telemetry?: boolean\n /** Control how typescript interfaces are generated from your collections. */\n typescript?: RootTypeScriptConfig\n /**\n * Customize the handling of incoming file uploads for collections that have uploads enabled,\n * including the `transformers` pipeline.\n */\n upload?: GlobalUploadConfig\n}\n\ninterface SanitizedAdminConfig\n extends Omit<\n RootAdminConfig,\n | 'avatar'\n | 'components'\n | 'custom'\n | 'dashboard'\n | 'dateFormat'\n | 'dependencies'\n | 'importMap'\n | 'meta'\n | 'routes'\n | 'theme'\n | 'timezones'\n | 'user'\n >,\n Required<\n Pick<\n RootAdminConfig,\n 'avatar' | 'components' | 'custom' | 'dateFormat' | 'dependencies' | 'theme' | 'user'\n >\n > {\n dashboard: Required<DashboardConfig>\n importMap: Omit<NonNullable<RootAdminConfig['importMap']>, 'baseDir'> &\n Required<Pick<NonNullable<RootAdminConfig['importMap']>, 'baseDir'>>\n meta: Omit<MetaConfig, 'defaultOGImageType' | 'robots' | 'titleSuffix'> &\n Required<Pick<MetaConfig, 'defaultOGImageType' | 'robots' | 'titleSuffix'>>\n routes: Required<NonNullable<RootAdminConfig['routes']>>\n timezones: SanitizedTimezoneConfig\n}\n\ntype SanitizedGraphQLConfig = Omit<\n RootGraphQLConfig,\n | 'disableIntrospectionInProduction'\n | 'disablePlaygroundInProduction'\n | 'maxComplexity'\n | 'schemaOutputFile'\n> &\n Required<\n Pick<\n RootGraphQLConfig,\n | 'disableIntrospectionInProduction'\n | 'disablePlaygroundInProduction'\n | 'maxComplexity'\n | 'schemaOutputFile'\n >\n >\n\ntype SanitizedTypeScriptConfig = Omit<RootTypeScriptConfig, 'autoGenerate' | 'outputFile'> &\n Required<Pick<RootTypeScriptConfig, 'autoGenerate' | 'outputFile'>>\n\nexport interface SanitizedConfig\n extends Omit<\n Config,\n | 'admin'\n | 'auth'\n | 'blocks'\n | 'cli'\n | 'collections'\n | 'cookiePrefix'\n | 'cors'\n | 'csrf'\n | 'custom'\n | 'defaultDepth'\n | 'defaultMaxTextLength'\n | 'editor'\n | 'endpoints'\n | 'globals'\n | 'graphQL'\n | 'hooks'\n | 'i18n'\n | 'jobs'\n | 'kv'\n | 'localization'\n | 'loggingLevels'\n | 'maxDepth'\n | 'routes'\n | 'serverURL'\n | 'storage'\n | 'telemetry'\n | 'typescript'\n | 'upload'\n >,\n Required<\n Pick<\n Config,\n | 'cookiePrefix'\n | 'cors'\n | 'csrf'\n | 'custom'\n | 'defaultDepth'\n | 'defaultMaxTextLength'\n | 'endpoints'\n | 'hooks'\n | 'kv'\n | 'loggingLevels'\n | 'maxDepth'\n | 'serverURL'\n | 'storage'\n | 'telemetry'\n >\n > {\n admin: SanitizedAdminConfig\n auth: Required<NonNullable<Config['auth']>>\n blocks: FlattenedBlock[]\n cli:\n | {\n commands: CLICommands\n }\n | false\n collections: SanitizedCollectionConfig[]\n /** Default richtext editor to use for richText fields */\n editor?: RichTextAdapter<any, any, any>\n globals: SanitizedGlobalConfig[]\n graphQL: SanitizedGraphQLConfig\n i18n: Required<I18nOptions>\n jobs: SanitizedJobsConfig\n localization: false | SanitizedLocalizationConfig\n routes: Required<NonNullable<Config['routes']>>\n typescript: SanitizedTypeScriptConfig\n upload: {\n /**\n * Deduped list of adapters used in the project\n */\n adapters: string[]\n } & GlobalUploadConfig &\n Required<Pick<GlobalUploadConfig, 'transformers'>>\n}\n\nexport type EditConfig = EditConfigWithoutRoot | EditConfigWithRoot\n\n/**\n * Replace or modify _all_ nested document views and routes, including the document header, controls, and tabs. This cannot be used in conjunction with other nested views.\n * + `root` - `/admin/collections/:collection/:id/**\\/*`\n * @link https://payloadcms.com/docs/custom-components/document-views#document-root\n */\nexport type EditConfigWithRoot = {\n api?: never\n default?: never\n livePreview?: never\n root: DefaultDocumentViewConfig\n version?: never\n versions?: never\n}\n\ntype KnownEditKeys = 'api' | 'default' | 'livePreview' | 'root' | 'version' | 'versions'\n\n/**\n * Replace or modify individual nested routes, or add new ones:\n * + `default` - `/admin/collections/:collection/:id`\n * + `api` - `/admin/collections/:collection/:id/api`\n * + `livePreview` - `/admin/collections/:collection/:id/preview`\n * + `references` - `/admin/collections/:collection/:id/references`\n * + `relationships` - `/admin/collections/:collection/:id/relationships`\n * + `versions` - `/admin/collections/:collection/:id/versions`\n * + `version` - `/admin/collections/:collection/:id/versions/:version`\n * + `customView` - `/admin/collections/:collection/:id/:path`\n *\n * To override the entire Edit View including all nested views, use the `root` key.\n *\n * @link https://payloadcms.com/docs/custom-components/document-views\n */\nexport type EditConfigWithoutRoot = {\n [K in Exclude<string, KnownEditKeys>]: CustomDocumentViewConfig\n} & {\n api?: DefaultDocumentViewConfig\n default?: DefaultDocumentViewConfig\n livePreview?: DefaultDocumentViewConfig\n root?: never\n version?: DefaultDocumentViewConfig\n versions?: DefaultDocumentViewConfig\n}\n\nexport type EntityDescriptionComponent = CustomComponent\n\n/**\n * Custom components rendered within the Edit View.\n * Shared by Collection and Global configs.\n */\nexport type SharedEditViewComponents = {\n /**\n * Inject custom components before the document controls\n */\n beforeDocumentControls?: CustomComponent[]\n /**\n * Inject custom components before the document metadata (left of status/timestamps)\n */\n BeforeDocumentMeta?: CustomComponent[]\n /**\n * Inject custom components within the 3-dot menu dropdown\n */\n editMenuItems?: CustomComponent[]\n /**\n * Replaces the \"Preview\" button\n */\n PreviewButton?: CustomComponent\n /**\n * Replaces the \"Publish\" button\n * + drafts must be enabled\n */\n PublishButton?: PayloadComponent<PublishButtonServerProps, PublishButtonClientProps>\n /**\n * Replaces the \"Save\" button\n * + drafts must be disabled\n */\n SaveButton?: CustomComponent\n /**\n * Replaces the \"Save Draft\" button\n * + drafts must be enabled\n * + autosave must be disabled\n */\n SaveDraftButton?: CustomComponent\n /**\n * Replaces the \"Status\" section\n */\n Status?: CustomStatus\n /**\n * Replaces the \"Unpublish\" button\n * + drafts must be enabled\n */\n UnpublishButton?: PayloadComponent<UnpublishButtonServerProps, UnpublishButtonClientProps>\n}\n\n/**\n * Custom views object shared by Collection and Global configs.\n * Allows custom view keys (matched by path) alongside the document `edit` view.\n */\nexport type SharedEntityViews = {\n /**\n * Add custom views.\n * Any additional keys define custom views that are matched by path and rendered at the entity level.\n * @link https://payloadcms.com/docs/custom-components/custom-views\n * @example\n * ```ts\n * views: {\n * audit: {\n * Component: '/path/to/AuditView',\n * path: '/audit',\n * exact: true,\n * }\n * }\n * ```\n */\n [key: string]:\n | { actions?: CustomComponent[]; Component?: PayloadComponent; NoResults?: CustomComponent }\n | AdminViewConfig\n | EditConfig\n | undefined\n /**\n * Replace, modify, or add new \"document\" views.\n * @link https://payloadcms.com/docs/custom-components/document-views\n */\n edit?: EditConfig\n}\n\n/**\n * Admin component slots shared by Collection and Global configs.\n * Collection extends this with list-only slots and `edit.Upload`; Global uses it as-is.\n */\nexport type SharedAdminComponents = {\n /**\n * Custom Description component for the entity. Rendered in the Edit View\n * (and List View for Collections).\n */\n Description?: EntityDescriptionComponent\n /**\n * Components within the edit view\n */\n edit?: SharedEditViewComponents\n views?: SharedEntityViews\n}\n\nexport type EntityDescriptionFunction = ({ t }: { t: TFunction<ClientTranslationKeys> }) => string\n\nexport type EntityDescription = EntityDescriptionFunction | Record<string, string> | string\n\nexport type { EmailAdapter, SendEmailOptions }\n"],"names":["serverProps","isUserMenuSettingsGroup","userMenuSettingsItem","Array","isArray","items"],"mappings":"AAylBA,OAAO,MAAMA,cAAqC;IAChD;IACA;IACA;IACA;IACA;IACA;IACA;IACA;CACD,CAAA;AAsCD,OAAO,MAAMC,0BAA0B,CACrCC,uBAEA,OAAOA,yBAAyB,YAChCA,yBAAyB,QACzB,WAAWA,wBACXC,MAAMC,OAAO,CAACF,qBAAqBG,KAAK,EAAC"}
|
|
1
|
+
{"version":3,"sources":["../../src/config/types.ts"],"sourcesContent":["import type {\n ClientTranslationKeys,\n DefaultTranslationsObject,\n I18n,\n I18nClient,\n I18nOptions,\n TFunction,\n} from '@payloadcms/translations'\nimport type { StandardJSONSchemaV1, StandardSchemaV1 } from '@standard-schema/spec'\nimport type { BusboyConfig } from 'busboy'\nimport type GraphQL from 'graphql'\nimport type { GraphQLFormattedError } from 'graphql'\nimport type { JSONSchema4 } from 'json-schema'\nimport type { Metadata } from 'next'\nimport type { DestinationStream, Level, LoggerOptions } from 'pino'\nimport type React from 'react'\n\nimport type { ComponentRenderer } from '../admin/adapters/render.js'\nimport type { ServerAdapter } from '../admin/adapters/server.js'\nimport type { RichTextAdapterProvider } from '../admin/RichText.js'\nimport type {\n CustomStatus,\n DocumentSubViewTypes,\n DocumentTabConfig,\n DocumentViewServerProps,\n PublishButtonClientProps,\n PublishButtonServerProps,\n RichTextAdapter,\n UnpublishButtonClientProps,\n UnpublishButtonServerProps,\n} from '../admin/types.js'\nimport type { AdminViewConfig, ViewTypes, VisibleEntities } from '../admin/views/index.js'\nimport type { SanitizedPermissions } from '../auth/index.js'\nimport type {\n AddToImportMap,\n ImportMap,\n Imports,\n InternalImportMap,\n} from '../cli/commands/generateImportMap/generateImportMap.js'\nimport type {\n Collection,\n CollectionAccess,\n CollectionConfig,\n SanitizedCollectionConfig,\n} from '../collections/config/types.js'\nimport type { DatabaseAdapterResult } from '../database/types.js'\nimport type { EmailAdapter, SendEmailOptions } from '../email/types.js'\nimport type { ErrorName } from '../errors/types.js'\nimport type {\n GlobalAccess,\n GlobalConfig,\n Globals,\n SanitizedGlobalConfig,\n} from '../globals/config/types.js'\nimport type {\n Block,\n ClientField,\n DataFromWidgetSlug,\n DefaultDocumentIDType,\n Field,\n FlattenedBlock,\n JobsConfig,\n KVAdapterResult,\n Payload,\n RegisteredPlugins,\n RequestContext,\n SelectField,\n TypedWidget,\n User,\n WidgetSlug,\n} from '../index.js'\nimport type { QueryPreset, QueryPresetConstraints } from '../query-presets/types.js'\nimport type { SanitizedJobsConfig } from '../queues/config/types/index.js'\nimport type { MaybePromise, PayloadRequest, Where } from '../types/index.js'\nimport type { UploadTransformer } from '../uploads/transformers/types.js'\nimport type { PayloadLogger } from '../utilities/logger.js'\n\n/**\n * The string path pointing to the React component. If one of the generics is `never`, you effectively mark it as a server-only or client-only component.\n *\n * If it is `false` an empty component will be rendered.\n */\nexport type PayloadComponent<\n TComponentServerProps extends never | object = Record<string, any>,\n TComponentClientProps extends never | object = Record<string, any>,\n> = false | RawPayloadComponent<TComponentServerProps, TComponentClientProps> | string\n\n// We need the actual object as its own type, otherwise the infers for the PayloadClientReactComponent / PayloadServerReactComponent will not work due to the string union.\n// We also NEED to actually use those generics for this to work, thus they are part of the props.\nexport type RawPayloadComponent<\n TComponentServerProps extends never | object = Record<string, any>,\n TComponentClientProps extends never | object = Record<string, any>,\n> = {\n clientProps?: object | TComponentClientProps\n exportName?: string\n path: string\n serverProps?: object | TComponentServerProps\n}\n\nexport type PayloadComponentProps<TPayloadComponent> =\n TPayloadComponent extends RawPayloadComponent<\n infer TComponentServerProps,\n infer TComponentClientProps\n >\n ? TComponentClientProps | TComponentServerProps\n : never\n\nexport type PayloadClientComponentProps<TPayloadComponent> =\n TPayloadComponent extends RawPayloadComponent<infer _, infer TComponentClientProps>\n ? TComponentClientProps\n : never\n\nexport type PayloadServerComponentProps<TPayloadComponent> =\n TPayloadComponent extends RawPayloadComponent<infer TComponentServerProps, infer _>\n ? TComponentServerProps\n : never\n\nexport type PayloadReactComponent<TPayloadComponent> = React.FC<\n PayloadComponentProps<TPayloadComponent>\n>\n\n// This also ensures that if never is passed to TComponentClientProps, this entire type will be never.\n// => TypeScript will now ensure that users cannot even define the typed Server Components if the PayloadComponent is marked as\n// Client-Only (marked as Client-Only = TComponentServerProps is never)\nexport type PayloadClientReactComponent<TPayloadComponent> =\n TPayloadComponent extends RawPayloadComponent<infer _, infer TComponentClientProps>\n ? TComponentClientProps extends never\n ? never\n : React.FC<TComponentClientProps>\n : never\n\nexport type PayloadServerReactComponent<TPayloadComponent> =\n TPayloadComponent extends RawPayloadComponent<infer TComponentServerProps, infer _>\n ? TComponentServerProps extends never\n ? never\n : React.FC<TComponentServerProps>\n : never\n\nexport type ResolvedComponent<\n TComponentServerProps extends never | object,\n TComponentClientProps extends never | object,\n> = {\n clientProps?: TComponentClientProps\n Component: React.FC<TComponentClientProps | TComponentServerProps>\n serverProps?: TComponentServerProps\n}\n\n/** Shared resources used while the Payload CLI is running. */\nexport type CLIRuntime = {\n /** Directory containing the Payload config, used to resolve relative command paths. */\n configDir: string\n destroy: () => Promise<void>\n getConfig: () => Promise<SanitizedConfig>\n getPayload: (options?: Omit<InitOptions, 'config'>) => Promise<Payload>\n readonly isScheduled: boolean\n markScheduled: () => void\n}\n\nexport type CLICommandDescription = {\n aliases?: string[]\n description: string\n examples?: string[]\n inputSchema: Record<string, unknown>\n name: string\n}\n\nexport type CLIGlobalOptionDescription = {\n description: string\n flags: string\n}\n\nexport type CLIHelp = {\n commands: CLICommandDescription[]\n globalOptions: CLIGlobalOptionDescription[]\n output: (args?: { command?: string }) => void\n}\n\nexport type CLIInputSchema<\n Input extends Record<string, unknown> = Record<string, unknown>,\n Output extends Record<string, unknown> = Input,\n> = StandardJSONSchemaV1<Input, Output> & StandardSchemaV1<Input, Output>\n\nexport type CLIFieldOverride =\n | 'argument'\n | {\n flags?: string\n parse?: (value: string, previous: unknown) => unknown\n type?: 'option'\n }\n | {\n parse?: (value: string, previous: unknown) => unknown\n position?: number\n syntax?: string\n type: 'argument'\n }\n | false\n\n/** A schema-backed command definition created with `defineCLICommand`. */\nexport type CLICommand = {\n aliases?: string[]\n allowUnknownOption: boolean\n cli: false | Partial<Record<string, CLIFieldOverride>>\n description: string\n examples?: string[]\n handler: (context: {\n args: Record<string, unknown>\n getConfig: CLIRuntime['getConfig']\n getPayload: CLIRuntime['getPayload']\n help: CLIHelp\n isJSON: boolean\n }) => MaybePromise<CLICommandResult | number | void>\n helpGroup?: string\n input: CLIInputSchema\n readonly schema: Record<string, unknown>\n}\n\n/** Structured data and an optional exit code returned by a Payload CLI command. */\nexport type CLICommandResult = {\n /** Process exit code. Omit this, or use `0`, when the command succeeds. */\n exitCode?: number\n /** Data included under `result` when the command uses JSON output. */\n result?: unknown\n}\n\n/** A CLI command definition, import reference, or `false` to disable the command. */\nexport type CLICommandEntry = CLICommand | PayloadComponent\n\n/** CLI commands keyed by their command-line name. */\nexport type CLICommands = Record<string, CLICommandEntry>\n\ntype Prettify<T> = {\n [K in keyof T]: T[K]\n} & NonNullable<unknown>\n\n/**\n * @experimental The plugin API (`order`, `slug`, `options`) may change before being declared stable.\n */\nexport type Plugin = ((config: Config) => MaybePromise<Config>) & {\n /** @experimental Plugin options exposed for cross-plugin mutation. */\n options?: Record<string, unknown>\n /** @experimental Execution order - lower values run first. Defaults to 0. */\n order?: number\n /** @experimental Unique identifier for cross-plugin discovery via `config.plugins`. */\n slug?: string\n}\n\n/**\n * Configures where uploaded files are stored (S3, GCS, Azure, Vercel Blob, etc.).\n *\n * Storage adapters run **before plugins**, so upload hooks, static file handlers,\n * and presigned-URL endpoints are guaranteed to be in place before any plugin\n * modifies the config.\n *\n * Pass the return value of a storage adapter factory to `storage` in your\n * Payload config:\n *\n * ```ts\n * import { s3Storage } from '@payloadcms/storage-s3'\n *\n * export default buildConfig({\n * storage: [\n * s3Storage({\n * bucket: process.env.S3_BUCKET,\n * collections: { media: true },\n * config: { region: process.env.S3_REGION },\n * }),\n * ],\n * })\n * ```\n *\n * @see https://payloadcms.com/docs/uploads/storage-adapters\n */\nexport interface StorageAdapter {\n /** Collection slugs this adapter is configured to handle. */\n collections: string[]\n /** Initializes the adapter and returns the modified config with upload hooks and handlers injected. */\n init: (config: Config) => Config | Promise<Config>\n /** Unique identifier for this adapter (e.g. `'s3'`, `'gcs'`, `'azure'`). Surfaced in telemetry and on `payload.config.upload.adapters`. */\n name: string\n}\n\n/**\n * A map of plugin slugs to Plugin instances, built from `config.plugins`.\n * Registered slugs (via `RegisteredPlugins` module augmentation) return typed options.\n *\n * @experimental\n */\nexport type PluginsMap = {\n [K in keyof RegisteredPlugins]: ({ options: RegisteredPlugins[K] } & Plugin) | undefined\n} & Record<string, Plugin | undefined>\n\nexport type LivePreviewURLType = null | string | undefined\n\nexport type LivePreviewConfig = {\n /**\n Device breakpoints to use for the `iframe` of the Live Preview window.\n Options are displayed in the Live Preview toolbar.\n The `responsive` breakpoint is included by default.\n */\n breakpoints?: {\n height: number | string\n label: string\n name: string\n width: number | string\n }[]\n /**\n * When `true`, Live Preview opens automatically the first time a user views a document,\n * before they have manually toggled it on. Once the user toggles Live Preview on or off,\n * their stored preference takes precedence and this setting is ignored.\n * @default false\n */\n openByDefault?: boolean\n /**\n * The URL of the frontend application. This will be rendered within an `iframe` as its `src`.\n * Payload will send a `window.postMessage()` to this URL with the document data in real-time.\n * The frontend application is responsible for receiving the message and updating the UI accordingly.\n * @see https://payloadcms.com/docs/live-preview/frontend\n *\n * To conditionally render Live Preview, use a function that returns `undefined` or `null`.\n *\n * Note: this function may run often if autosave is enabled with a small interval.\n * For performance, avoid long-running tasks or expensive operations within this function,\n * or if you need to do something more complex, cache your function as needed.\n */\n url?:\n | ((args: {\n collectionConfig?: SanitizedCollectionConfig\n data: Record<string, any>\n globalConfig?: SanitizedGlobalConfig\n locale: Locale\n /**\n * @deprecated\n * Use `req.payload` instead. This will be removed in the next major version.\n */\n payload: Payload\n req: PayloadRequest\n }) => LivePreviewURLType | Promise<LivePreviewURLType>)\n | LivePreviewURLType\n}\n\nexport type RootLivePreviewConfig = {\n collections?: string[]\n globals?: string[]\n} & LivePreviewConfig\n\nexport type OGImageConfig = {\n alt?: string\n height?: number | string\n type?: string\n url: string\n width?: number | string\n}\n\nexport type MetaConfig = {\n /**\n * When `static`, a pre-made image will be used for all pages.\n * When `dynamic`, a unique image will be generated for each page based on page content and given overrides.\n * When `off`, no Open Graph images will be generated and the `/api/og` endpoint will be disabled. You can still provide custom images using the `openGraph.images` property.\n * @default 'dynamic'\n */\n defaultOGImageType?: 'dynamic' | 'off' | 'static'\n /**\n * String to append to the auto-generated <title> of admin pages\n * @example `\" - Custom CMS\"`\n */\n titleSuffix?: string\n} & Metadata\n\nexport type ServerOnlyLivePreviewProperties = keyof Pick<RootLivePreviewConfig, 'url'>\n\ntype GeneratePreviewURLOptions = {\n locale: string\n req: PayloadRequest\n token: null | string\n}\n\nexport type GeneratePreviewURL = (\n doc: Record<string, unknown>,\n options: GeneratePreviewURLOptions,\n) => null | Promise<null | string> | string\n\nexport type GraphQLInfo = {\n collections: {\n [slug: string]: Collection\n }\n globals: Globals\n Mutation: {\n fields: Record<string, any>\n name: string\n }\n Query: {\n fields: Record<string, any>\n name: string\n }\n types: {\n arrayTypes: Record<string, GraphQL.GraphQLType>\n blockInputTypes: Record<string, GraphQL.GraphQLInputObjectType>\n blockTypes: Record<string, GraphQL.GraphQLObjectType>\n fallbackLocaleInputType?: GraphQL.GraphQLEnumType | GraphQL.GraphQLScalarType\n groupTypes: Record<string, GraphQL.GraphQLObjectType>\n localeInputType?: GraphQL.GraphQLEnumType | GraphQL.GraphQLScalarType\n tabTypes: Record<string, GraphQL.GraphQLObjectType>\n validationResultType?: GraphQL.GraphQLObjectType\n }\n}\nexport type GraphQLExtension = (\n graphQL: typeof GraphQL,\n context: {\n config: SanitizedConfig\n } & GraphQLInfo,\n) => Record<string, unknown>\n\nexport type InitOptions = {\n /**\n * Sometimes, with the local API, you might need to pass a config file directly, for example, serverless on Vercel\n * The passed config should match the config file, and if it doesn't, there could be mismatches between the admin UI\n * and the backend functionality\n */\n config: Promise<SanitizedConfig> | SanitizedConfig\n /**\n * If set to `true`, payload will initialize crons for things like autorunning jobs on initialization.\n *\n * @default false\n */\n cron?: boolean\n\n /**\n * Disable connect to the database on init\n */\n disableDBConnect?: boolean\n\n /**\n * Disable running of the `onInit` function\n */\n disableOnInit?: boolean\n\n importMap?: ImportMap\n\n /**\n * A function that is called immediately following startup that receives the Payload instance as it's only argument.\n */\n onInit?: (payload: Payload) => Promise<void> | void\n}\n\n/**\n * This result is calculated on the server\n * and then sent to the client allowing the dashboard to show accessible data and actions.\n *\n * If the result is `true`, the user has access.\n * If the result is an object, it is interpreted as a MongoDB query.\n *\n * @example `{ createdBy: { equals: id } }`\n *\n * @example `{ tenant: { in: tenantIds } }`\n *\n * @see https://payloadcms.com/docs/access-control/overview\n */\nexport type AccessResult = boolean | Where\n\nexport type AccessArgs<TData = any> = {\n /**\n * The relevant resource that is being accessed.\n *\n * `data` is null when a list is requested\n */\n data?: TData\n /** ID of the resource being accessed */\n id?: DefaultDocumentIDType\n /** If true, the request is for a static file */\n isReadingStaticFile?: boolean\n /** The original request that requires an access check */\n req: PayloadRequest\n /** The slug of the Collection or Global document being accessed */\n slug: string\n}\n\n/**\n * Access function runs on the server\n * and is sent to the client allowing the dashboard to show accessible data and actions.\n *\n * @see https://payloadcms.com/docs/access-control/overview\n */\nexport type Access<TData = any> = (args: AccessArgs<TData>) => AccessResult | Promise<AccessResult>\n\nexport type BaseAccess = {\n collections?: CollectionAccess\n globals?: GlobalAccess\n}\n\n/** Web Request/Response model, but the req has more payload specific properties added to it. */\nexport type PayloadHandler = (req: PayloadRequest) => Promise<Response> | Response\n\n/**\n * Docs: https://payloadcms.com/docs/rest-api/overview#custom-endpoints\n */\nexport type Endpoint = {\n /** Extension point to add your custom data. */\n custom?: Record<string, any>\n\n /**\n * Middleware that will be called when the path/method matches\n *\n * Compatible with Web Request/Response Model\n */\n handler: PayloadHandler\n /** HTTP method */\n method: 'connect' | 'delete' | 'get' | 'head' | 'options' | 'patch' | 'post' | 'put'\n /**\n * Pattern that should match the path of the incoming request\n *\n * Compatible with the Express router\n */\n path: string\n /**\n * Please add \"root\" routes under the /api folder in the Payload Project.\n * https://nextjs.org/docs/app/api-reference/file-conventions/route\n *\n * @deprecated in 3.0\n */\n root?: never\n}\n\n/**\n * @deprecated\n * This type will be renamed in v4.\n * Use `DocumentViewComponent` instead.\n */\nexport type EditViewComponent = DocumentViewComponent\n\nexport type DocumentViewComponent = PayloadComponent<DocumentViewServerProps>\n\n/**\n * @deprecated\n * This type will be renamed in v4.\n * Use `DocumentViewConfig` instead.\n */\nexport type EditViewConfig = DocumentViewConfig\n\ntype BaseDocumentViewConfig = {\n actions?: CustomComponent[]\n meta?: MetaConfig\n tab?: DocumentTabConfig\n}\n\n/*\n If your view does not originate from a \"known\" key, e.g. `myCustomView`, then it is considered a \"custom\" view and can accept a `path`, etc.\n To render just a tab component without an accompanying view, you can omit the `path` and `Component` properties altogether.\n*/\nexport type CustomDocumentViewConfig =\n | ({\n Component: DocumentViewComponent\n path: `/${string}`\n } & BaseDocumentViewConfig)\n | ({\n Component?: DocumentViewComponent\n path?: never\n } & BaseDocumentViewConfig)\n\n/*\n If your view does originates from a \"known\" key, e.g. `api`, then it is considered a \"default\" view and cannot accept a `path`, etc.\n*/\nexport type DefaultDocumentViewConfig = {\n Component?: DocumentViewComponent\n} & BaseDocumentViewConfig\n\nexport type DocumentViewConfig = CustomDocumentViewConfig | DefaultDocumentViewConfig\n\nexport type Params = { [key: string]: string | string[] | undefined }\n\nexport type ServerProps = {\n readonly documentSubViewType?: DocumentSubViewTypes\n readonly i18n: I18nClient\n readonly id?: number | string\n readonly locale?: Locale\n readonly params?: Params\n readonly payload: Payload\n readonly permissions?: SanitizedPermissions\n /**\n * Adapter-injected component renderer. Server components can use this\n * to render other import map components without importing a\n * framework-specific renderer directly.\n */\n readonly renderComponent?: ComponentRenderer\n readonly searchParams?: Params\n /**\n * Framework-agnostic methods for server-side navigation, headers, cookies, and other server-only APIs.\n * Plugins should call these methods instead of importing directly from `next/navigation`, `next/headers`, etc.\n * These methods are populated by the given framework adapter, e.g. `@payloadcms/next`.\n *\n * Optional because non-framework contexts (jobs, scripts, tests) may not have an adapter attached.\n */\n readonly server: ServerAdapter\n /**\n * Authenticated user with field read access applied. Use for values sent to the client.\n * For access-control checks use the full principal at `req.user`.\n */\n readonly user?: User\n readonly viewType?: ViewTypes\n readonly visibleEntities?: VisibleEntities\n}\n\nexport const serverProps: (keyof ServerProps)[] = [\n 'payload',\n 'i18n',\n 'locale',\n 'params',\n 'permissions',\n 'renderComponent',\n 'searchParams',\n 'permissions',\n]\n\nexport type Timezone = {\n label: string\n value: string\n}\n\ntype SupportedTimezonesFn = (args: { defaultTimezones: Timezone[] }) => Timezone[]\n\nexport type TimezonesConfig = {\n /**\n * The default timezone to use for the admin panel.\n */\n defaultTimezone?: string\n /**\n * Provide your own list of supported timezones for the admin panel\n *\n * Values should be IANA timezone names, eg. `America/New_York`\n *\n * We use `@date-fns/tz` to handle timezones\n */\n supportedTimezones?: SupportedTimezonesFn | Timezone[]\n}\n\ntype SanitizedTimezoneConfig = {\n supportedTimezones: Timezone[]\n} & Omit<TimezonesConfig, 'supportedTimezones'>\n\nexport type CustomComponent<TAdditionalProps extends object = Record<string, any>> =\n PayloadComponent<ServerProps & TAdditionalProps, TAdditionalProps>\n\nexport type UserMenuSettingsGroup = {\n group: LabelFunction | StaticLabel\n items: CustomComponent[]\n}\n\nexport type UserMenuSettingsItem = CustomComponent | UserMenuSettingsGroup\n\nexport const isUserMenuSettingsGroup = (\n userMenuSettingsItem: UserMenuSettingsItem,\n): userMenuSettingsItem is UserMenuSettingsGroup =>\n typeof userMenuSettingsItem === 'object' &&\n userMenuSettingsItem !== null &&\n 'items' in userMenuSettingsItem &&\n Array.isArray(userMenuSettingsItem.items)\n\nexport type Locale = {\n /**\n * value of supported locale\n * @example \"en\"\n */\n code: string\n /**\n * Code of another locale to use when reading documents with fallback, if not specified defaultLocale is used\n */\n fallbackLocale?: string | string[]\n /**\n * label of supported locale\n * @example \"English\"\n */\n label: Record<string, string> | string\n /**\n * if true, defaults textAligmnent on text fields to RTL\n */\n rtl?: boolean\n}\n\nexport type BaseLocalizationConfig = {\n /**\n * Locale for users that have not expressed their preference for a specific locale\n * @example `\"en\"`\n */\n defaultLocale: string\n /** Set to `true` to let missing values in localised fields fall back to the values in `defaultLocale`\n *\n * If false, then no requests will fallback unless a fallbackLocale is specified in the request.\n * @default true\n */\n fallback?: boolean\n /**\n * Define a function to filter the locales made available in Payload admin UI\n * based on user.\n */\n filterAvailableLocales?: (args: {\n locales: Locale[]\n req: PayloadRequest\n }) => Locale[] | Promise<Locale[]>\n}\n\nexport type LocalizationConfigWithNoLabels = Prettify<\n {\n /**\n * List of supported locales\n * @example `[\"en\", \"es\", \"fr\", \"nl\", \"de\", \"jp\"]`\n */\n locales: string[]\n } & BaseLocalizationConfig\n>\n\nexport type LocalizationConfigWithLabels = Prettify<\n {\n /**\n * List of supported locales with labels\n * @example {\n * label: 'English',\n * value: 'en',\n * rtl: false\n * }\n */\n locales: Locale[]\n } & BaseLocalizationConfig\n>\n\nexport type SanitizedLocalizationConfig = Prettify<\n {\n /**\n * List of supported locales\n * @example `[\"en\", \"es\", \"fr\", \"nl\", \"de\", \"jp\"]`\n */\n localeCodes: string[]\n locales: Locale[]\n } & Omit<LocalizationConfigWithLabels, 'fallback' | 'locales'> &\n Required<Pick<LocalizationConfigWithLabels, 'fallback'>>\n>\n\n/**\n * @see https://payloadcms.com/docs/configuration/localization#localization\n */\nexport type LocalizationConfig = Prettify<\n LocalizationConfigWithLabels | LocalizationConfigWithNoLabels\n>\n\nexport type LabelFunction<TTranslationKeys = ClientTranslationKeys> = (args: {\n i18n: I18nClient\n t: TFunction<TTranslationKeys>\n}) => string\n\nexport type StaticLabel = Record<string, string> | string\n\nexport type CORSConfig = {\n headers?: string[]\n origins: '*' | string[]\n}\n\nexport type AdminFunction = {\n args?: object\n path: string\n type: 'function'\n}\n\nexport type AdminComponent = {\n clientProps?: object\n path: string\n serverProps?: object\n type: 'component'\n}\n\nexport interface AdminDependencies {\n [key: string]: AdminComponent | AdminFunction\n}\n\nexport type FetchAPIFileUploadOptions = {\n /**\n * Returns a HTTP 413 when the file is bigger than the size limit if `true`.\n * Otherwise, it will add a `truncated = true` to the resulting file structure.\n * @default true\n */\n abortOnLimit?: boolean | undefined\n /**\n * Automatically creates the directory path specified in `.mv(filePathName)`\n * @default false\n */\n createParentPath?: boolean | undefined\n /**\n * Turn on/off upload process logging. Can be useful for troubleshooting.\n * @default false\n */\n debug?: boolean | undefined\n /**\n * User defined limit handler which will be invoked if the file is bigger than configured limits.\n * @default false\n */\n limitHandler?: ((args: { request: Request; size: number }) => void) | boolean | undefined\n /**\n * By default, `req.body` and `req.files` are flattened like this:\n * `{'name': 'John', 'hobbies[0]': 'Cinema', 'hobbies[1]': 'Bike'}\n *\n * When this option is enabled they are parsed in order to be nested like this:\n * `{'name': 'John', 'hobbies': ['Cinema', 'Bike']}`\n * @default false\n */\n parseNested?: boolean | undefined\n /**\n * Preserves filename extension when using `safeFileNames` option.\n * If set to `true`, will default to an extension length of `3`.\n * If set to `number`, this will be the max allowable extension length.\n * If an extension is smaller than the extension length, it remains untouched. If the extension is longer,\n * it is shifted.\n * @default false\n *\n * @example\n * // true\n * app.use(fileUpload({ safeFileNames: true, preserveExtension: true }));\n * // myFileName.ext --> myFileName.ext\n *\n * @example\n * // max extension length 2, extension shifted\n * app.use(fileUpload({ safeFileNames: true, preserveExtension: 2 }));\n * // myFileName.ext --> myFileNamee.xt\n */\n preserveExtension?: boolean | number | undefined\n /**\n * Maximum size in bytes for the complete raw multipart request, including files, fields, headers, and boundaries.\n * Must be a non-negative safe integer. Set to `Infinity` to disable the request-wide limit.\n * @default 50 * 1024 * 1024\n */\n requestSizeLimit?: number | undefined\n /**\n * Response which will be send to client if file size limit exceeded when `abortOnLimit` set to `true`.\n * @default 'File size limit has been reached'\n */\n responseOnLimit?: string | undefined\n /**\n * Strips characters from the upload's filename.\n * You can use custom regex to determine what to strip.\n * If set to `true`, non-alphanumeric characters _except_ dashes and underscores will be stripped.\n * This option is off by default.\n * @default false\n *\n * @example\n * // strip slashes from file names\n * app.use(fileUpload({ safeFileNames: /\\\\/g }))\n *\n * @example\n * app.use(fileUpload({ safeFileNames: true }))\n */\n safeFileNames?: boolean | RegExp | undefined\n /**\n * Path to store temporary files.\n * Used along with the `useTempFiles` option. By default this module uses `'tmp'` folder\n * in the current working directory.\n * You can use trailing slash, but it is not necessary.\n * @default 'tmp'\n */\n tempFileDir?: string | undefined\n /**\n * This defines how long to wait for data before aborting. Set to `0` if you want to turn off timeout checks.\n * @default 60_000\n */\n uploadTimeout?: number | undefined\n /**\n * Applies uri decoding to file names if set `true`.\n * @default false\n */\n uriDecodeFileNames?: boolean | undefined\n /**\n * By default this module uploads files into RAM.\n * Setting this option to `true` turns on using temporary files instead of utilising RAM.\n * This avoids memory overflow issues when uploading large files or in case of uploading\n * lots of files at same time.\n * @default false\n */\n useTempFiles?: boolean | undefined\n} & Partial<BusboyConfig>\n\nexport type GlobalUploadConfig = {\n /**\n * Ordered list of file transformers. Every eligible transformer joins the pipeline\n * for a given upload or dynamic request in declaration order. Slugs must be unique.\n *\n * @see https://payloadcms.com/docs/upload/transformers\n */\n transformers?: UploadTransformer[]\n} & FetchAPIFileUploadOptions\n\nexport type ErrorResult = {\n data?: any\n errors: {\n data?: Record<string, unknown>\n field?: string\n message?: string\n name?: string\n }[]\n stack?: string\n}\n\nexport type AfterErrorResult = {\n graphqlResult?: GraphQLFormattedError\n response?: Partial<ErrorResult> & Record<string, unknown>\n status?: number\n} | void\n\nexport type AfterErrorHookArgs = {\n /** The Collection that the hook is operating on. This will be undefined if the hook is executed from a non-collection endpoint or GraphQL. */\n collection?: SanitizedCollectionConfig\n /** \tCustom context passed between hooks */\n context: RequestContext\n /** The error that occurred. */\n error: Error\n /** The GraphQL result object, available if the hook is executed within a GraphQL context. */\n graphqlResult?: GraphQLFormattedError\n /** The Request object containing the currently authenticated user. */\n req: PayloadRequest\n /** The formatted error result object, available if the hook is executed from a REST context. */\n result?: ErrorResult\n}\n\nexport type ImportMapGenerators = Array<\n (props: {\n addToImportMap: AddToImportMap\n baseDir: string\n config: SanitizedConfig\n importMap: InternalImportMap\n imports: Imports\n }) => void\n>\n\nexport type AfterErrorHook = (\n args: AfterErrorHookArgs,\n) => AfterErrorResult | Promise<AfterErrorResult>\n\nexport type WidgetWidth = 'full' | 'large' | 'medium' | 'small' | 'x-large' | 'x-small'\n\nexport type Widget = {\n Component: PayloadComponent\n fields?: Field[]\n /**\n * Human-friendly label for the widget.\n * Supports i18n by passing an object with locale keys, or a function with `t` for translations.\n * If not provided, the label will be auto-generated from the slug.\n */\n label?: LabelFunction | StaticLabel\n maxWidth?: WidgetWidth\n minWidth?: WidgetWidth\n slug: string\n // Maybe:\n // ImageURL?: string // similar to Block\n}\n\n/**\n * Client-side widget type with resolved label (no functions).\n */\nexport type ClientWidget = {\n fields?: ClientField[]\n label?: StaticLabel\n maxWidth?: WidgetWidth\n minWidth?: WidgetWidth\n slug: string\n}\n\nexport type WidgetInstance<TSlug extends WidgetSlug = WidgetSlug> = TSlug extends WidgetSlug\n ? {\n data?: DataFromWidgetSlug<TSlug> extends Record<string, unknown>\n ? DataFromWidgetSlug<TSlug>\n : Record<string, unknown>\n widgetSlug: TSlug\n width: [\n Extract<\n TypedWidget[TSlug] extends { width: infer TWidth } ? TWidth : WidgetWidth,\n WidgetWidth\n >,\n ] extends [never]\n ? WidgetWidth\n : Extract<\n TypedWidget[TSlug] extends { width: infer TWidth } ? TWidth : WidgetWidth,\n WidgetWidth\n >\n }\n : never\n\nexport type DashboardConfig = {\n defaultLayout?:\n | ((args: { req: PayloadRequest }) => Array<WidgetInstance> | Promise<Array<WidgetInstance>>)\n | Array<WidgetInstance>\n widgets: Array<Widget>\n}\n\nexport type SanitizedDashboardConfig = {\n widgets: Array<Omit<Widget, 'Component'>>\n}\n\nexport type SidebarTab = {\n /** Tab components */\n components: {\n /** Component to render as tab content */\n Content: CustomComponent\n /** Component to render as tab icon */\n Icon: PayloadComponent\n }\n /** Disable this tab */\n disabled?: boolean\n /** Make this tab active by default */\n isDefaultActive?: boolean\n /**\n * Label for accessibility and tab display.\n * Supports i18n by passing an object with locale keys, or a function with `t` for translations.\n * If not provided, the slug will be used as fallback.\n */\n label?: LabelFunction | StaticLabel\n /** Unique identifier for override/disable */\n slug: string\n}\n\ntype RootAdminConfig = {\n /** Automatically log in as a user */\n autoLogin?:\n | {\n /**\n * The email address of the user to login as\n */\n email?: string\n /** The password of the user to login as. This is only needed if `prefillOnly` is set to true */\n password?: string\n /**\n * If set to true, the login credentials will be prefilled but the user will still need to click the login button.\n *\n * @default false\n */\n prefillOnly?: boolean\n /** The username of the user to login as */\n username?: string\n }\n | false\n /**\n * Automatically refresh user tokens for users logged into the dashboard\n *\n * @default false\n */\n autoRefresh?: boolean\n /** Set account profile picture. Options: gravatar, default or a custom React component. */\n avatar?:\n | 'default'\n | 'gravatar'\n | {\n Component: PayloadComponent\n }\n\n /**\n * Add extra and/or replace built-in components with custom components\n *\n * @see https://payloadcms.com/docs/custom-components/overview\n */\n components?: {\n /**\n * Add custom components to the top right of the Admin Panel\n */\n actions?: CustomComponent[]\n /**\n * Add custom components after the collection overview\n */\n afterDashboard?: CustomComponent[]\n /**\n * Add custom components after the email/password field\n */\n afterLogin?: CustomComponent[]\n /**\n * Add custom components after the navigation section\n */\n afterNav?: CustomComponent[]\n /**\n * Add custom components after the navigation links\n */\n afterNavLinks?: CustomComponent[]\n /**\n * Add custom components before the collection overview\n */\n beforeDashboard?: CustomComponent[]\n /**\n * Add custom components before the email/password field\n */\n beforeLogin?: CustomComponent[]\n /**\n * Add custom components before the navigation section\n */\n beforeNav?: CustomComponent[]\n /**\n * Add custom components before the navigation links\n */\n beforeNavLinks?: CustomComponent[]\n /** Replace graphical components */\n graphics?: {\n /** Replace the icon in the navigation */\n Icon?: CustomComponent\n /** Replace the logo on the login page */\n Logo?: CustomComponent\n }\n /**\n * Add custom header to top of page globally\n */\n header?: CustomComponent[]\n /** Replace logout related components */\n logout?: {\n /** Replace the logout button */\n Button?: CustomComponent\n }\n /**\n * Replace the navigation with a custom component\n */\n Nav?: CustomComponent\n /**\n * Wrap the admin dashboard in custom context providers\n */\n providers?: PayloadComponent<{ children?: React.ReactNode }, { children?: React.ReactNode }>[]\n /**\n * Add custom menu items to the navigation menu accessible via the gear icon.\n * These components will be rendered in a popup menu above the logout button.\n */\n settingsMenu?: CustomComponent[]\n /** Sidebar configuration */\n sidebar?: {\n /** Extensible tab system */\n tabs?: SidebarTab[]\n }\n /**\n * Add custom items to the user menu popup in the admin panel header.\n * These components will be rendered in the Settings sub-popup of the user menu.\n * When empty or absent, the Settings sub-trigger is not shown.\n */\n userMenuSettingsItems?: UserMenuSettingsItem[]\n /**\n * Replace or modify top-level admin routes, or add new ones:\n * + `Account` - `/admin/account`\n * + `Dashboard` - `/admin`\n * + `:path` - `/admin/:path`\n */\n views?: {\n /** Add custom admin views */\n [key: string]: AdminViewConfig\n /** Replace the account screen */\n // @ts-expect-error - vestiges of when tsconfig was not strict. Feel free to improve\n account?: AdminViewConfig\n /** Replace the admin homepage */\n // @ts-expect-error - vestiges of when tsconfig was not strict. Feel free to improve\n dashboard?: AdminViewConfig\n }\n }\n /**\n * Constrain the Admin Panel content width to 1080px on desktop.\n *\n * @experimental This property is subject to change in future releases.\n * @default false\n */\n constrainWidth?: boolean\n /** Extension point to add your custom data. Available in server and client. */\n custom?: Record<string, any>\n /**\n * Customize the dashboard widgets\n * @experimental This prop is subject to change in future releases.\n */\n dashboard?: DashboardConfig\n /** Global date format that will be used for all dates in the Admin panel. Any valid date-fns format pattern can be used. */\n dateFormat?: string\n /**\n * Each entry in this map generates an entry in the importMap.\n */\n dependencies?: AdminDependencies\n /**\n * @deprecated\n * This option is deprecated and will be removed in v4.\n * To disable the admin panel itself, delete your `/app/(payload)/admin` directory.\n * To disable all REST API and GraphQL endpoints, delete your `/app/(payload)/api` directory.\n * Note: If you've modified the default paths via `admin.routes`, delete those directories instead.\n */\n disable?: boolean\n importMap?: {\n /**\n * Automatically generate component map during development\n * @default true\n */\n autoGenerate?: boolean\n /**\n * The base directory for component paths starting with /.\n * @default process.cwd()\n **/\n baseDir?: string\n /**\n * You can use generators to add custom components to the component import map.\n * This allows you to import custom components in the admin panel.\n */\n generators?: ImportMapGenerators\n /**\n * If Payload cannot find the import map file location automatically,\n * you can manually provide it here.\n */\n importMapFile?: string\n }\n /**\n * Live Preview options.\n *\n * @see https://payloadcms.com/docs/live-preview/overview\n */\n livePreview?: RootLivePreviewConfig\n /** Base meta data to use for the Admin Panel. Included properties are titleSuffix, ogImage, and favicon. */\n meta?: MetaConfig\n routes?: {\n /** The route for the account page.\n *\n * @default '/account'\n */\n account?: `/${string}`\n /** The route for the create first user page.\n *\n * @default '/create-first-user'\n */\n createFirstUser?: `/${string}`\n /** The route for the forgot password page.\n *\n * @default '/forgot'\n */\n forgot?: `/${string}`\n /** The route the user will be redirected to after being inactive for too long.\n *\n * @default '/logout-inactivity'\n */\n inactivity?: `/${string}`\n /** The route for the login page.\n *\n * @default '/login'\n */\n login?: `/${string}`\n /** The route for the logout page.\n *\n * @default '/logout'\n */\n logout?: `/${string}`\n /** The route for the reset password page.\n *\n * @default '/reset'\n */\n reset?: `/${string}`\n /** The route for the unauthorized page.\n *\n * @default '/unauthorized'\n */\n unauthorized?: `/${string}`\n }\n /**\n * Suppresses React hydration mismatch warnings during the hydration of the root <html> tag.\n * Useful in scenarios where the server-rendered HTML might intentionally differ from the client-rendered DOM.\n * @default false\n */\n suppressHydrationWarning?: boolean\n /**\n * Restrict the Admin Panel theme to use only one of your choice\n *\n * @default 'all' // The theme can be configured by users\n */\n theme?: 'all' | 'dark' | 'light'\n /**\n * Configure timezone related settings for the admin panel.\n */\n timezones?: TimezonesConfig\n /**\n * Configure toast message behavior and appearance in the admin panel.\n * Currently using [Sonner](https://sonner.emilkowal.ski) for toast notifications.\n *\n * @experimental This property is experimental and may change in future releases. Use at your own risk.\n */\n toast?: {\n /**\n * Time in milliseconds until the toast automatically closes.\n * @default 6000\n */\n duration?: number\n /**\n * If `true`, will expand the message stack so that all messages are shown simultaneously without user interaction.\n * Otherwise only the latest notification can be read until the user hovers the stack.\n * @default false\n */\n expand?: boolean\n /**\n * The maximum number of toasts that can be visible on the screen at once.\n * @default 5\n */\n limit?: number\n /**\n * The position of the toast on the screen.\n * @default 'bottom-right'\n */\n position?:\n | 'bottom-center'\n | 'bottom-left'\n | 'bottom-right'\n | 'top-center'\n | 'top-left'\n | 'top-right'\n }\n /** The slug of a Collection that you want to be used to log in to the Admin dashboard. */\n user?: string\n}\n\ntype RootGraphQLConfig = {\n disable?: boolean\n /**\n * Disable introspection queries in production.\n *\n * @default true\n */\n disableIntrospectionInProduction?: boolean\n /**\n * Disable the GraphQL Playground in production.\n *\n * @default true\n */\n disablePlaygroundInProduction?: boolean\n maxComplexity?: number\n /**\n * Function that returns an object containing keys to custom GraphQL mutations\n *\n * @see https://payloadcms.com/docs/graphql/extending\n */\n mutations?: GraphQLExtension\n /**\n * Function that returns an object containing keys to custom GraphQL queries\n *\n * @see https://payloadcms.com/docs/graphql/extending\n */\n queries?: GraphQLExtension\n /**\n * Filepath to write the generated schema to\n */\n schemaOutputFile?: string\n /**\n * Function that returns an array of validation rules to apply to the GraphQL schema\n *\n * @see https://payloadcms.com/docs/graphql/overview#custom-validation-rules\n */\n validationRules?: (args: GraphQL.ExecutionArgs) => GraphQL.ValidationRule[]\n}\n\ntype RootTypeScriptConfig = {\n /**\n * Automatically generate types during development\n * @default true\n */\n autoGenerate?: boolean\n\n /** Disable declare block in generated types file */\n declare?:\n | {\n /**\n * @internal internal use only to allow for multiple declarations within a monorepo and suppress the \"Duplicate identifier GeneratedTypes\" error\n *\n * Adds a @ts-ignore flag above the GeneratedTypes interface declaration\n *\n * @default false\n */\n ignoreTSError?: boolean\n }\n | false\n\n /**\n * Also generate a write-shaped input type (e.g. `PostInput`) next to each read type, describing\n * what `create`/`update` accept: relationships and uploads as IDs only, `id` and `defaultValue`\n * fields optional, and `createdAt`/`updatedAt`/virtual/join fields removed. These are\n * exposed on `Config['collectionsInput']` and `Config['globalsInput']`. Set `true` to turn them on.\n * Draft-enabled entities retain `_status` because it is a writable create/update field.\n *\n * @default false\n *\n * @remarks\n * Off by default. The Local API's `create`/`update` still type their `data` against the read\n * type, so these input types aren't used internally - they're here for you to opt into, e.g. to\n * type a form payload, a seed script, or an API client. `@payloadcms/plugin-mcp` also uses the\n * input schema, but it builds that itself at runtime, so MCP gets the accurate write schema\n * whether or not this flag is on.\n *\n * @todo We'd like to turn this on by default (or have the Local API use the input type\n * directly), but there's a catch. When you read a document with `depth > 0`, its relationships\n * come back as full documents rather than IDs. A strict ID-only input type would reject that and\n * break the common \"read a doc, change a field, save it back\" pattern. To enable it by default,\n * the input type would first need to accept a relationship as either an ID or the full document\n * (which is what Payload already does at runtime), while keeping `id`, `defaultValue`, and\n * auto-managed fields optional. Until then it stays opt-in, so we don't put a type that's\n * stricter than the runtime on the main write path.\n */\n generateInputTypes?: boolean\n\n /** Filename to write the generated types to */\n outputFile?: string\n\n /**\n * Post-process the generated TypeScript types string before writing to file.\n * Useful for plugins that need to inject generic types that JSON Schema cannot express.\n *\n * Functions are applied in order after the built-in Select generics are added.\n *\n * @example\n * ```ts\n * postProcess: [\n * ({ compiledTypes, config }) => {\n * const genericType = `export type MyGeneric<T> = { value: T };`\n * return compiledTypes.replace(/(\\/\\*[\\s\\S]*?\\*\\/\\n)/, `$1\\n${genericType}\\n`)\n * },\n * ]\n * ```\n */\n postProcess?: Array<(args: { compiledTypes: string; config: SanitizedConfig }) => string>\n\n /**\n * Allows you to modify the base JSON schema that is generated during generate:types. This JSON schema will be used\n * to generate the TypeScript interfaces.\n */\n schema?: Array<\n (args: {\n collectionIDFieldTypes: {\n [key: string]: 'number' | 'string'\n }\n config: SanitizedConfig\n i18n: I18n\n jsonSchema: JSONSchema4\n }) => JSONSchema4\n >\n\n /**\n * Enable strict type safety for draft operations. When enabled, the `draft` parameter is forbidden\n * on collections without drafts, and query results with `draft: true` type required fields as optional.\n * This prevents invalid draft usage at compile time and ensures type correctness across all Local API operations.\n *\n * @default false\n * @todo Remove in v4. Strict draft types will become the default behavior.\n */\n strictDraftTypes?: boolean\n}\n\n/**\n * This is the central configuration\n *\n * @see https://payloadcms.com/docs/configuration/overview\n */\nexport type Config = {\n /** Configure admin dashboard */\n admin?: RootAdminConfig\n\n /**\n * Configure authentication-related Payload-wide settings.\n */\n auth?: {\n /**\n * Define which JWT identification methods you'd like to support for Payload's local auth strategy, as well as the order that they're retrieved in.\n * Defaults to ['JWT', 'Bearer', 'cookie]\n */\n jwtOrder?: ('Bearer' | 'cookie' | 'JWT')[]\n }\n /**\n * Define Collection and Global access constraints that are combined with document Access Control using AND semantics.\n */\n baseAccess?: BaseAccess\n blocks?: Block[]\n /**\n * Pass additional options to the parser used to process `multipart/form-data` requests.\n * For example, a PATCH request containing HTML form data.\n * For example, you may want to increase the `limits` imposed by the parser.\n * Currently using @link {https://www.npmjs.com/package/busboy|busboy} under the hood.\n *\n * @experimental This property is experimental and may change in future releases. Use at your own risk.\n */\n bodyParser?: Partial<BusboyConfig>\n /** Customize the Payload CLI, or set to `false` to disable it. */\n cli?:\n | {\n /** Add, replace, or disable commands by name. Built-in commands are added during sanitization. */\n commands?: CLICommands\n }\n | false\n /**\n * Manage the datamodel of your application\n *\n * @see https://payloadcms.com/docs/configuration/collections#collection-configs\n */\n collections?: CollectionConfig[]\n /**\n * Prefix a string to all cookies that Payload sets.\n *\n * @default \"payload\"\n */\n cookiePrefix?: string\n /** Either a whitelist array of URLS to allow CORS requests from, or a wildcard string ('*') to accept incoming requests from any domain. */\n cors?: '*' | CORSConfig | string[]\n /** A whitelist array of URLs to allow Payload cookies to be accepted from as a form of CSRF protection. */\n csrf?: string[]\n /** Extension point to add your custom data. Server only. */\n custom?: Record<string, any>\n /** Pass in a database adapter for use on this project. */\n db: DatabaseAdapterResult\n /** Enable to expose more detailed error information. */\n debug?: boolean\n /**\n * If a user does not specify `depth` while requesting a resource, this depth will be used.\n *\n * @see https://payloadcms.com/docs/getting-started/concepts#depth\n *\n * @default 1\n */\n defaultDepth?: number\n /**\n * The maximum allowed depth to be permitted application-wide. This setting helps prevent against malicious queries.\n *\n * @default 40000\n */\n defaultMaxTextLength?: number\n /** Default richtext editor to use for richText fields */\n editor?: RichTextAdapterProvider<any, any, any>\n /**\n * Email Adapter\n *\n * @see https://payloadcms.com/docs/email/overview\n */\n email?: EmailAdapter | Promise<EmailAdapter>\n /** Custom REST endpoints */\n endpoints?: Endpoint[]\n /**\n * @see https://payloadcms.com/docs/configuration/globals#global-configs\n */\n globals?: GlobalConfig[]\n /**\n * Manage the GraphQL API\n *\n * You can add your own GraphQL queries and mutations to Payload, making use of all the types that Payload has defined for you.\n *\n * @see https://payloadcms.com/docs/graphql/overview\n */\n graphQL?: RootGraphQLConfig\n /**\n * Tap into Payload-wide hooks.\n *\n * @see https://payloadcms.com/docs/hooks/overview\n */\n hooks?: {\n afterError?: AfterErrorHook[]\n }\n /** i18n config settings */\n // eslint-disable-next-line @typescript-eslint/no-empty-object-type\n i18n?: I18nOptions<{} | DefaultTranslationsObject> // loosen the type here to allow for custom translations\n /** Automatically index all sortable top-level fields in the database to improve sort performance and add database compatibility for Azure Cosmos and similar. */\n indexSortableFields?: boolean\n /**\n * @experimental There may be frequent breaking changes to this API\n */\n jobs?: JobsConfig\n /**\n * Pass in a KV adapter for use on this project.\n * @default `DatabaseKVAdapter` from:\n * ```ts\n * import { createDatabaseKVAdapter } from 'payload'\n * createDatabaseKVAdapter()\n * ```\n */\n kv?: KVAdapterResult\n /** Manage instructions shared by MCP and CLI consumers. Set to false to disable the management UI and collection. */\n llmInstructions?:\n | {\n /** Who may edit saved instructions, in addition to the target's read and update access. Defaults to users of the admin auth collection. */\n access?: Access\n /** Editor for instructions. Defaults to the root editor's llmInstructions preset, or plain text if unavailable. */\n editor?: Config['editor']\n }\n | false\n /**\n * Translate your content to different languages/locales.\n *\n * @default false // disable localization\n */\n localization?: false | LocalizationConfig\n /**\n * Logger options, logger options with a destination stream, or an instantiated logger instance.\n *\n * See Pino Docs for options: https://getpino.io/#/docs/api?id=options\n *\n * ```ts\n * // Logger options only\n * logger: {\n * level: 'info',\n * }\n *\n * // Logger options with destination stream\n * logger: {\n * options: {\n * level: 'info',\n * },\n * destination: process.stdout\n * },\n *\n * // Logger instance\n * logger: pino({ name: 'my-logger' })\n *\n * ```\n */\n logger?: 'sync' | { destination?: DestinationStream; options: LoggerOptions } | PayloadLogger\n\n /**\n * Override the log level of errors for Payload's error handler or disable logging with `false`.\n * Levels can be any of the following: 'trace', 'debug', 'info', 'warn', 'error', 'fatal' or false.\n *\n * Default levels:\n * {\n `* APIError: 'error',\n `* AuthenticationError: 'error',\n `* ErrorDeletingFile: 'error',\n `* FileRetrievalError: 'error',\n `* FileUploadError: 'error',\n `* Forbidden: 'info',\n `* Locked: 'info',\n `* LockedAuth: 'error',\n `* MissingFile: 'info',\n `* NotFound: 'info',\n `* QueryError: 'error',\n `* ValidationError: 'info',\n * }\n */\n loggingLevels?: Partial<Record<ErrorName, false | Level>>\n\n /**\n * The maximum allowed depth to be permitted application-wide. This setting helps prevent against malicious queries.\n *\n * @see https://payloadcms.com/docs/getting-started/concepts#depth\n *\n * @default 10\n */\n maxDepth?: number\n\n /** A function that is called immediately following startup that receives the Payload instance as its only argument. */\n onInit?: (payload: Payload) => Promise<void> | void\n /**\n * An array of Payload plugins.\n *\n * @see https://payloadcms.com/docs/plugins/overview\n */\n plugins?: Plugin[]\n /**\n * Previous `secret` values that should still be accepted for reads (verifying\n * JWTs, matching API keys, decrypting stored values) during a bounded key\n * rotation. New data is always written with the current `secret`. Retire these\n * once `rotateSecret` has re-keyed existing data.\n */\n previousSecrets?: string[]\n /**\n * Allow you to save and share filters, columns, and sort orders for your collections.\n * @see https://payloadcms.com/docs/query-presets/overview\n */\n queryPresets?: {\n /**\n * Define collection-level access control that applies to all presets globally.\n * This is separate from document-level access (constraints) which users can configure per-preset.\n */\n access: {\n create?: Access<QueryPreset>\n delete?: Access<QueryPreset>\n read?: Access<QueryPreset>\n update?: Access<QueryPreset>\n }\n /**\n * Define custom document-level access control options for presets.\n *\n * Payload provides sensible defaults (Only Me, Everyone, Specific Users), but you can\n * add custom constraints for more complex patterns like RBAC.\n *\n * @example\n * ```ts\n * constraints: {\n * read: [\n * {\n * label: 'Specific Roles',\n * value: 'specificRoles',\n * fields: [\n * {\n * name: 'roles',\n * type: 'select',\n * hasMany: true,\n * options: [\n * { label: 'Admin', value: 'admin' },\n * { label: 'User', value: 'user' },\n * ],\n * },\n * ],\n * access: ({ req: { user } }) => ({\n * 'access.read.roles': { in: [user?.roles] },\n * }),\n * },\n * ],\n * }\n * ```\n *\n * @see https://payloadcms.com/docs/query-presets/overview#custom-access-control\n */\n constraints: {\n create?: QueryPresetConstraints\n delete?: QueryPresetConstraints\n read?: QueryPresetConstraints\n update?: QueryPresetConstraints\n }\n /**\n * Used to dynamically filter which constraints are available based on the current user, document data,\n * or other criteria.\n *\n * Some examples of this might include:\n *\n * - Ensuring that only \"admins\" are allowed to make a preset available to \"everyone\"\n * - Preventing the \"onlyMe\" option from being selected based on a hypothetical \"disablePrivatePresets\" checkbox\n *\n * When a user lacks the permission to set a constraint, the option will either be hidden from them, or disabled if it is already saved to that preset.\n *\n * @see https://payloadcms.com/docs/query-presets/overview#constraint-access-control\n */\n filterConstraints?: SelectField['filterOptions']\n labels?: CollectionConfig['labels']\n }\n /**\n * Control the routing structure that Payload binds itself to.\n * @link https://payloadcms.com/docs/admin/overview#root-level-routes\n */\n routes?: {\n /**\n * The route for the admin panel.\n * @example \"/my-admin\" or \"/\"\n * @default \"/admin\"\n * @link https://payloadcms.com/docs/admin/overview#root-level-routes\n */\n admin?: string\n /**\n * The base route for all REST API endpoints.\n * @default \"/api\"\n * @link https://payloadcms.com/docs/admin/overview#root-level-routes\n */\n api?: string\n /**\n * The base route for all GraphQL endpoints.\n * @default \"/graphql\"\n * @link https://payloadcms.com/docs/admin/overview#root-level-routes\n */\n graphQL?: string\n /**\n * The route for the GraphQL Playground.\n * @default \"/graphql-playground\"\n * @link https://payloadcms.com/docs/admin/overview#root-level-routes\n */\n graphQLPlayground?: string\n }\n /** Secure string that Payload will use for any encryption workflows */\n secret: string\n /**\n * Define the absolute URL of your app including the protocol, for example `https://example.org`.\n * No paths allowed, only protocol, domain and (optionally) port.\n *\n * @see https://payloadcms.com/docs/configuration/overview#options\n */\n serverURL?: string\n /**\n * Storage adapters that handle where uploaded files are stored (S3, GCS, Azure, Vercel Blob, etc.).\n *\n * Adapters are initialized **before** `plugins`, so file handling is fully wired before any plugin\n * runs. Use this instead of placing storage adapter packages in `plugins`.\n *\n * Migrate existing `plugins` usage automatically with:\n * ```sh\n * npx @payloadcms/codemod --transform migrate-storage-adapters-to-config\n * ```\n *\n * @see https://payloadcms.com/docs/uploads/storage-adapters\n */\n storage?: StorageAdapter[]\n /** Send anonymous telemetry data about general usage. */\n telemetry?: boolean\n /** Control how typescript interfaces are generated from your collections. */\n typescript?: RootTypeScriptConfig\n /**\n * Customize the handling of incoming file uploads for collections that have uploads enabled,\n * including the `transformers` pipeline.\n */\n upload?: GlobalUploadConfig\n}\n\ninterface SanitizedAdminConfig\n extends\n Omit<\n RootAdminConfig,\n | 'avatar'\n | 'components'\n | 'custom'\n | 'dashboard'\n | 'dateFormat'\n | 'dependencies'\n | 'importMap'\n | 'meta'\n | 'routes'\n | 'theme'\n | 'timezones'\n | 'user'\n >,\n Required<\n Pick<\n RootAdminConfig,\n 'avatar' | 'components' | 'custom' | 'dateFormat' | 'dependencies' | 'theme' | 'user'\n >\n > {\n dashboard: Required<DashboardConfig>\n importMap: Omit<NonNullable<RootAdminConfig['importMap']>, 'baseDir'> &\n Required<Pick<NonNullable<RootAdminConfig['importMap']>, 'baseDir'>>\n meta: Omit<MetaConfig, 'defaultOGImageType' | 'robots' | 'titleSuffix'> &\n Required<Pick<MetaConfig, 'defaultOGImageType' | 'robots' | 'titleSuffix'>>\n routes: Required<NonNullable<RootAdminConfig['routes']>>\n timezones: SanitizedTimezoneConfig\n}\n\ntype SanitizedGraphQLConfig = Omit<\n RootGraphQLConfig,\n | 'disableIntrospectionInProduction'\n | 'disablePlaygroundInProduction'\n | 'maxComplexity'\n | 'schemaOutputFile'\n> &\n Required<\n Pick<\n RootGraphQLConfig,\n | 'disableIntrospectionInProduction'\n | 'disablePlaygroundInProduction'\n | 'maxComplexity'\n | 'schemaOutputFile'\n >\n >\n\ntype SanitizedTypeScriptConfig = Omit<RootTypeScriptConfig, 'autoGenerate' | 'outputFile'> &\n Required<Pick<RootTypeScriptConfig, 'autoGenerate' | 'outputFile'>>\n\nexport interface SanitizedConfig\n extends\n Omit<\n Config,\n | 'admin'\n | 'auth'\n | 'blocks'\n | 'cli'\n | 'collections'\n | 'cookiePrefix'\n | 'cors'\n | 'csrf'\n | 'custom'\n | 'defaultDepth'\n | 'defaultMaxTextLength'\n | 'editor'\n | 'endpoints'\n | 'globals'\n | 'graphQL'\n | 'hooks'\n | 'i18n'\n | 'jobs'\n | 'kv'\n | 'localization'\n | 'loggingLevels'\n | 'maxDepth'\n | 'routes'\n | 'serverURL'\n | 'storage'\n | 'telemetry'\n | 'typescript'\n | 'upload'\n >,\n Required<\n Pick<\n Config,\n | 'cookiePrefix'\n | 'cors'\n | 'csrf'\n | 'custom'\n | 'defaultDepth'\n | 'defaultMaxTextLength'\n | 'endpoints'\n | 'hooks'\n | 'kv'\n | 'loggingLevels'\n | 'maxDepth'\n | 'serverURL'\n | 'storage'\n | 'telemetry'\n >\n > {\n admin: SanitizedAdminConfig\n auth: Required<NonNullable<Config['auth']>>\n blocks: FlattenedBlock[]\n cli:\n | {\n commands: CLICommands\n }\n | false\n collections: SanitizedCollectionConfig[]\n /** Default richtext editor to use for richText fields */\n editor?: RichTextAdapter<any, any, any>\n globals: SanitizedGlobalConfig[]\n graphQL: SanitizedGraphQLConfig\n i18n: Required<I18nOptions>\n jobs: SanitizedJobsConfig\n localization: false | SanitizedLocalizationConfig\n routes: Required<NonNullable<Config['routes']>>\n typescript: SanitizedTypeScriptConfig\n upload: {\n /**\n * Deduped list of adapters used in the project\n */\n adapters: string[]\n } & GlobalUploadConfig &\n Required<Pick<GlobalUploadConfig, 'transformers'>>\n}\n\nexport type EditConfig = EditConfigWithoutRoot | EditConfigWithRoot\n\n/**\n * Replace or modify _all_ nested document views and routes, including the document header, controls, and tabs. This cannot be used in conjunction with other nested views.\n * + `root` - `/admin/collections/:collection/:id/**\\/*`\n * @link https://payloadcms.com/docs/custom-components/document-views#document-root\n */\nexport type EditConfigWithRoot = {\n api?: never\n default?: never\n livePreview?: never\n root: DefaultDocumentViewConfig\n version?: never\n versions?: never\n}\n\ntype KnownEditKeys = 'api' | 'default' | 'livePreview' | 'root' | 'version' | 'versions'\n\n/**\n * Replace or modify individual nested routes, or add new ones:\n * + `default` - `/admin/collections/:collection/:id`\n * + `api` - `/admin/collections/:collection/:id/api`\n * + `livePreview` - `/admin/collections/:collection/:id/preview`\n * + `references` - `/admin/collections/:collection/:id/references`\n * + `relationships` - `/admin/collections/:collection/:id/relationships`\n * + `versions` - `/admin/collections/:collection/:id/versions`\n * + `version` - `/admin/collections/:collection/:id/versions/:version`\n * + `customView` - `/admin/collections/:collection/:id/:path`\n *\n * To override the entire Edit View including all nested views, use the `root` key.\n *\n * @link https://payloadcms.com/docs/custom-components/document-views\n */\nexport type EditConfigWithoutRoot = {\n [K in Exclude<string, KnownEditKeys>]: CustomDocumentViewConfig\n} & {\n api?: DefaultDocumentViewConfig\n default?: DefaultDocumentViewConfig\n livePreview?: DefaultDocumentViewConfig\n root?: never\n version?: DefaultDocumentViewConfig\n versions?: DefaultDocumentViewConfig\n}\n\nexport type EntityDescriptionComponent = CustomComponent\n\n/**\n * Custom components rendered within the Edit View.\n * Shared by Collection and Global configs.\n */\nexport type SharedEditViewComponents = {\n /**\n * Inject custom components before the document controls\n */\n beforeDocumentControls?: CustomComponent[]\n /**\n * Inject custom components before the document metadata (left of status/timestamps)\n */\n BeforeDocumentMeta?: CustomComponent[]\n /**\n * Inject custom components within the 3-dot menu dropdown\n */\n editMenuItems?: CustomComponent[]\n /**\n * Replaces the \"Preview\" button\n */\n PreviewButton?: CustomComponent\n /**\n * Replaces the \"Publish\" button\n * + drafts must be enabled\n */\n PublishButton?: PayloadComponent<PublishButtonServerProps, PublishButtonClientProps>\n /**\n * Replaces the \"Save\" button\n * + drafts must be disabled\n */\n SaveButton?: CustomComponent\n /**\n * Replaces the \"Save Draft\" button\n * + drafts must be enabled\n * + autosave must be disabled\n */\n SaveDraftButton?: CustomComponent\n /**\n * Replaces the \"Status\" section\n */\n Status?: CustomStatus\n /**\n * Replaces the \"Unpublish\" button\n * + drafts must be enabled\n */\n UnpublishButton?: PayloadComponent<UnpublishButtonServerProps, UnpublishButtonClientProps>\n}\n\n/**\n * Custom views object shared by Collection and Global configs.\n * Allows custom view keys (matched by path) alongside the document `edit` view.\n */\nexport type SharedEntityViews = {\n /**\n * Add custom views.\n * Any additional keys define custom views that are matched by path and rendered at the entity level.\n * @link https://payloadcms.com/docs/custom-components/custom-views\n * @example\n * ```ts\n * views: {\n * audit: {\n * Component: '/path/to/AuditView',\n * path: '/audit',\n * exact: true,\n * }\n * }\n * ```\n */\n [key: string]:\n | { actions?: CustomComponent[]; Component?: PayloadComponent; NoResults?: CustomComponent }\n | AdminViewConfig\n | EditConfig\n | undefined\n /**\n * Replace, modify, or add new \"document\" views.\n * @link https://payloadcms.com/docs/custom-components/document-views\n */\n edit?: EditConfig\n}\n\n/**\n * Admin component slots shared by Collection and Global configs.\n * Collection extends this with list-only slots and `edit.Upload`; Global uses it as-is.\n */\nexport type SharedAdminComponents = {\n /**\n * Custom Description component for the entity. Rendered in the Edit View\n * (and List View for Collections).\n */\n Description?: EntityDescriptionComponent\n /**\n * Components within the edit view\n */\n edit?: SharedEditViewComponents\n views?: SharedEntityViews\n}\n\nexport type EntityDescriptionFunction = ({ t }: { t: TFunction<ClientTranslationKeys> }) => string\n\nexport type EntityDescription = EntityDescriptionFunction | Record<string, string> | string\n\nexport type { EmailAdapter, SendEmailOptions }\n"],"names":["serverProps","isUserMenuSettingsGroup","userMenuSettingsItem","Array","isArray","items"],"mappings":"AAylBA,OAAO,MAAMA,cAAqC;IAChD;IACA;IACA;IACA;IACA;IACA;IACA;IACA;CACD,CAAA;AAsCD,OAAO,MAAMC,0BAA0B,CACrCC,uBAEA,OAAOA,yBAAyB,YAChCA,yBAAyB,QACzB,WAAWA,wBACXC,MAAMC,OAAO,CAACF,qBAAqBG,KAAK,EAAC"}
|
package/dist/database/types.d.ts
CHANGED
|
@@ -692,6 +692,10 @@ export type MigrationTemplateArgs = {
|
|
|
692
692
|
export type GenerateSchemaArgs = {
|
|
693
693
|
log?: boolean;
|
|
694
694
|
outputFile?: string;
|
|
695
|
+
/**
|
|
696
|
+
* Format the generated schema with the project's oxfmt, falling back to Prettier.
|
|
697
|
+
* @default true
|
|
698
|
+
*/
|
|
695
699
|
prettify?: boolean;
|
|
696
700
|
};
|
|
697
701
|
export type GenerateSchema = (args?: GenerateSchemaArgs) => Promise<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/database/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAA;AAChE,OAAO,KAAK,EAAE,cAAc,EAAE,UAAU,EAAE,GAAG,EAAE,MAAM,aAAa,CAAA;AAClE,OAAO,KAAK,EACV,QAAQ,EACR,SAAS,EACT,UAAU,EACV,OAAO,EACP,cAAc,EACd,UAAU,EACV,IAAI,EACJ,KAAK,EACN,MAAM,mBAAmB,CAAA;AAC1B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAA;AAE3D,YAAY,EAAE,eAAe,EAAE,CAAA;AAE/B,MAAM,WAAW,mBAAmB;IAClC,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB;;OAEG;IACH,eAAe,EAAE,eAAe,CAAA;IAChC;;;OAGG;IACH,gBAAgB,EAAE,gBAAgB,CAAA;IAClC;;;;;;OAMG;IACH,+BAA+B,CAAC,EAAE,OAAO,CAAA;IAEzC;;OAEG;IACH,iBAAiB,EAAE,iBAAiB,CAAA;IAEpC;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB;;OAEG;IACH,IAAI,EAAE,IAAI,CAAA;IACV,KAAK,EAAE,KAAK,CAAA;IACZ,mBAAmB,EAAE,mBAAmB,CAAA;IACxC,aAAa,EAAE,aAAa,CAAA;IAE5B,MAAM,EAAE,MAAM,CAAA;IAEd,YAAY,EAAE,YAAY,CAAA;IAE1B,mBAAmB,EAAE,mBAAmB,CAAA;IACxC;;OAEG;IACH,eAAe,EAAE,eAAe,CAAA;IAEhC,aAAa,EAAE,aAAa,CAAA;IAE5B;;OAEG;IACH,aAAa,EAAE,QAAQ,GAAG,MAAM,CAAA;IAEhC,UAAU,EAAE,UAAU,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EAAE,MAAM,CAAA;CACnB,KAAK,MAAM,CAAC,GACb,MAAM,CAAA;AAEV,MAAM,MAAM,wBAAwB,GAAG,CAAC,IAAI,EAAE;IAAE,QAAQ,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,OAAO,CAAA;CAAE,KAAK,OAAO,CAAC;IAC/F,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,KAAK,CAAC,EAAE,MAAM,CAAA;CACf,CAAC,CAAA;AAEF,MAAM,MAAM,qBAAqB,GAAG;IAClC,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,OAAO,CAAC,EAAE,wBAAwB,CAAA;IAClC,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,KAAK,CAAC,EAAE,MAAM,CAAA;CACf,CAAA;AAED,MAAM,MAAM,kBAAkB,GAAG;IAC/B,GAAG,CAAC,EAAE,OAAO,CAAA;IACb,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB,CAAA;AAED,MAAM,MAAM,cAAc,GAAG,CAAC,IAAI,CAAC,EAAE,kBAAkB,KAAK,OAAO,CAAC;IAAE,UAAU,EAAE,MAAM,CAAA;CAAE,CAAC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/database/types.ts"],"sourcesContent":["import type { TypeWithID } from '../collections/config/types.js'\nimport type { CollectionSlug, GlobalSlug, Job } from '../index.js'\nimport type {\n Document,\n JoinQuery,\n JsonObject,\n Payload,\n PayloadRequest,\n SelectType,\n Sort,\n Where,\n} from '../types/index.js'\nimport type { TypeWithVersion } from '../versions/types.js'\n\nexport type { TypeWithVersion }\n\nexport interface BaseDatabaseAdapter {\n allowIDOnCreate?: boolean\n /**\n * Process ordered create, update, and delete operations in bounded batches.\n */\n batchProcessing: BatchProcessing\n /**\n * Start a transaction, requiring commitTransaction() to be called for any changes to be made.\n * @returns an identifier for the transaction or null if one cannot be established\n */\n beginTransaction: BeginTransaction\n /**\n * When true, bulk operations will process documents one at a time\n * in separate transactions instead of all at once in a single transaction.\n * Useful for avoiding transaction limitations with large datasets.\n *\n * @default false\n */\n bulkOperationsSingleTransaction?: boolean\n\n /**\n * Persist the changes made since the start of the transaction.\n */\n commitTransaction: CommitTransaction\n\n /**\n * Open the connection to the database\n */\n connect?: Connect\n /**\n * Copy one stored collection document without running Local API operations.\n */\n copy: Copy\n count: Count\n countGlobalVersions: CountGlobalVersions\n countVersions: CountVersions\n\n create: Create\n\n createGlobal: CreateGlobal\n\n createGlobalVersion: CreateGlobalVersion\n /**\n * Output a migration file\n */\n createMigration: CreateMigration\n\n createVersion: CreateVersion\n\n /**\n * Specify if the ID is a text or number field by default within this database adapter.\n */\n defaultIDType: 'number' | 'text'\n\n deleteMany: DeleteMany\n\n deleteOne: DeleteOne\n deleteVersions: DeleteVersions\n\n /**\n * Terminate the connection with the database\n */\n destroy?: Destroy\n\n find: Find\n\n findDistinct: FindDistinct\n\n findGlobal: FindGlobal\n\n findGlobalVersions: FindGlobalVersions\n\n findOne: FindOne\n\n findVersions: FindVersions\n\n generateSchema?: GenerateSchema\n\n /**\n * Perform startup tasks required to interact with the database such as building Schema and models\n */\n init?: Init\n\n /**\n * Run any migration up functions that have not yet been performed and update the status\n */\n migrate: (args?: {\n forceAcceptWarning?: boolean\n migrations?: Migration[]\n shouldPrompt?: boolean\n }) => Promise<MigrationResult | void>\n /**\n * Run any migration down functions that have been performed\n */\n migrateDown: () => Promise<MigrationResult | void>\n\n /**\n * Drop the current database and run all migrate up functions\n */\n migrateFresh: (args: {\n forceAcceptWarning?: boolean\n shouldPrompt?: boolean\n }) => Promise<MigrationResult | void>\n /**\n * Run all migration down functions before running up\n */\n migrateRefresh: () => Promise<MigrationResult | void>\n /**\n * Run all migrate down functions\n */\n migrateReset: () => Promise<MigrationResult | void>\n /**\n * Read the current state of migrations and output the result to show which have been run\n */\n migrateStatus: () => Promise<MigrationStatus[] | void>\n\n /**\n * Path to read and write migration files from\n */\n migrationDir: string\n\n /**\n * The name of the database adapter\n */\n name: string\n /**\n * Full package name of the database adapter\n *\n * @example @payloadcms/db-postgres\n */\n packageName: string\n /**\n * reference to the instance of payload\n */\n payload: Payload\n\n queryDrafts: QueryDrafts\n\n /**\n * Abort any changes since the start of the transaction.\n */\n rollbackTransaction: RollbackTransaction\n\n /**\n * A key-value store of all sessions open (used for transactions)\n */\n sessions?: {\n [id: string]: unknown\n }\n\n /**\n * Updates a global that exists. If the global doesn't exist yet, this will not work - you should use `createGlobal` instead.\n */\n updateGlobal: UpdateGlobal\n\n updateGlobalVersion: UpdateGlobalVersion\n\n updateJobs: UpdateJobs\n\n updateMany: UpdateMany\n\n updateOne: UpdateOne\n updateVersion: UpdateVersion\n upsert: Upsert\n}\n\nexport type Init = () => Promise<void> | void\n\ntype ConnectArgs = {\n hotReload: boolean\n}\n\nexport type Connect = (args?: ConnectArgs) => Promise<void>\n\nexport type Destroy = () => Promise<void>\n\nexport type BatchProcessingOperation =\n | {\n args: WithoutRequest<CreateArgs>\n operation: 'create'\n }\n | {\n args: WithoutRequest<DeleteOneArgs>\n operation: 'deleteOne'\n }\n | {\n args: WithoutRequest<UpdateOneArgs>\n operation: 'updateOne'\n }\n\ntype WithoutRequest<T> = T extends unknown ? Omit<T, 'req'> : never\n\nexport type BatchProcessingResult = {\n index: number\n operation: BatchProcessingOperation['operation']\n} & (\n | {\n document?: Document\n documentID: number | string\n status: 'succeeded'\n }\n | {\n error: unknown\n status: 'failed'\n }\n | {\n status: 'noMatch'\n }\n | {\n status: 'unattempted'\n }\n)\n\nexport type BatchProcessingArgs = {\n batchSize?: number\n operations: BatchProcessingOperation[]\n req?: Partial<PayloadRequest>\n shouldContinueOnError?: boolean\n}\n\nexport type BatchProcessing = (\n this: BaseDatabaseAdapter,\n args: BatchProcessingArgs,\n) => Promise<BatchProcessingResult[]>\n\nexport type CopyArgs = {\n collection: CollectionSlug\n /**\n * Top-level field values that replace values from the source document.\n * Custom-ID collections require an `id` that matches the configured ID type.\n */\n data?: Record<string, unknown>\n req?: Partial<PayloadRequest>\n /** Selects the stored source document. */\n where: Where\n}\n\nexport type Copy = (this: BaseDatabaseAdapter, args: CopyArgs) => Promise<Document>\n\nexport type CreateMigration = (args: {\n file?: string\n forceAcceptWarning?: boolean\n migrationName?: string\n payload: Payload\n /** Set to false when the caller cannot answer interactive prompts. */\n shouldPrompt?: boolean\n /**\n * Skips the prompt asking to create empty migrations\n */\n skipEmpty?: boolean\n}) => CreateMigrationResult | Promise<CreateMigrationResult | void> | void\n\nexport type CreateMigrationResult = {\n created: boolean\n path?: string\n}\n\nexport type MigrationResult = {\n batch?: number\n cancelled?: true\n migrated: string[]\n rolledBack: string[]\n}\n\nexport type MigrationStatus = {\n batch?: number\n name: string\n ran: boolean\n}\n\nexport type Transaction = (\n callback: () => Promise<void>,\n options?: Record<string, unknown>,\n) => Promise<void>\n\nexport type BeginTransaction = (\n options?: Record<string, unknown>,\n) => Promise<null | number | string>\n\nexport type RollbackTransaction = (id: number | Promise<number | string> | string) => Promise<void>\n\nexport type CommitTransaction = (id: number | Promise<number | string> | string) => Promise<void>\n\nexport type QueryDraftsArgs = {\n collection: CollectionSlug\n joins?: JoinQuery\n limit?: number\n locale?: string\n page?: number\n pagination?: boolean\n req?: Partial<PayloadRequest>\n select?: SelectType\n sort?: Sort\n where?: Where\n}\n\nexport type QueryDrafts = <T = TypeWithID>(args: QueryDraftsArgs) => Promise<PaginatedDocs<T>>\n\nexport type FindOneArgs = {\n collection: CollectionSlug\n draftsEnabled?: boolean\n joins?: JoinQuery\n locale?: string\n req?: Partial<PayloadRequest>\n select?: SelectType\n where?: Where\n}\n\nexport type FindOne = <T extends TypeWithID>(args: FindOneArgs) => Promise<null | T>\n\nexport type FindArgs = {\n collection: CollectionSlug\n draftsEnabled?: boolean\n joins?: JoinQuery\n /** Setting limit to 1 is equal to the previous Model.findOne(). Setting limit to 0 disables the limit */\n limit?: number\n locale?: string\n page?: number\n pagination?: boolean\n projection?: Record<string, unknown>\n req?: Partial<PayloadRequest>\n select?: SelectType\n /**\n * @deprecated This parameter is going to be removed in the next major version. Use page instead.\n */\n skip?: number\n sort?: Sort\n versions?: boolean\n where?: Where\n}\n\nexport type Find = <T = TypeWithID>(args: FindArgs) => Promise<PaginatedDocs<T>>\n\nexport type CountArgs = {\n collection: CollectionSlug\n locale?: string\n req?: Partial<PayloadRequest>\n where?: Where\n}\n\nexport type Count = (args: CountArgs) => Promise<{ totalDocs: number }>\n\nexport type CountVersions = (args: CountArgs) => Promise<{ totalDocs: number }>\n\nexport type CountGlobalVersionArgs = {\n global: string\n locale?: string\n req?: Partial<PayloadRequest>\n where?: Where\n}\n\nexport type CountGlobalVersions = (args: CountGlobalVersionArgs) => Promise<{ totalDocs: number }>\n\ntype BaseVersionArgs = {\n limit?: number\n locale?: string\n page?: number\n pagination?: boolean\n req?: Partial<PayloadRequest>\n select?: SelectType\n /**\n * @deprecated This parameter is going to be removed in the next major version. Use page instead.\n */\n skip?: number\n sort?: Sort\n versions?: boolean\n where?: Where\n}\n\nexport type FindVersionsArgs = {\n collection: CollectionSlug\n} & BaseVersionArgs\n\nexport type FindVersions = <T = JsonObject>(\n args: FindVersionsArgs,\n) => Promise<PaginatedDocs<TypeWithVersion<T>>>\n\nexport type FindGlobalVersionsArgs = {\n global: GlobalSlug\n} & BaseVersionArgs\n\nexport type FindGlobalArgs = {\n locale?: string\n req?: Partial<PayloadRequest>\n select?: SelectType\n slug: string\n where?: Where\n}\n\nexport type UpdateGlobalVersionArgs<T extends JsonObject = JsonObject> = {\n global: GlobalSlug\n locale?: string\n /**\n * Additional database adapter specific options to pass to the query\n */\n options?: Record<string, unknown>\n req?: Partial<PayloadRequest>\n /**\n * If true, returns the updated documents\n *\n * @default true\n */\n returning?: boolean\n select?: SelectType\n versionData: {\n createdAt?: string\n latest?: boolean\n parent?: number | string\n publishedLocale?: string\n updatedAt?: string\n version: T\n }\n} & (\n | {\n id: number | string\n where?: never\n }\n | {\n id?: never\n where: Where\n }\n)\n\n/**\n * @todo type as Promise<TypeWithVersion<T> | null> in 4.0\n */\nexport type UpdateGlobalVersion = <T extends JsonObject = JsonObject>(\n args: UpdateGlobalVersionArgs<T>,\n) => Promise<TypeWithVersion<T>>\n\nexport type FindGlobal = <T extends Record<string, unknown> = any>(\n args: FindGlobalArgs,\n) => Promise<T>\n\nexport type CreateGlobalArgs<T extends Record<string, unknown> = any> = {\n data: T\n req?: Partial<PayloadRequest>\n /**\n * If true, returns the updated documents\n *\n * @default true\n */\n returning?: boolean\n slug: string\n}\nexport type CreateGlobal = <T extends Record<string, unknown> = any>(\n args: CreateGlobalArgs<T>,\n) => Promise<T>\n\nexport type UpdateGlobalArgs<T extends Record<string, unknown> = any> = {\n data: T\n /**\n * Additional database adapter specific options to pass to the query\n */\n options?: Record<string, unknown>\n req?: Partial<PayloadRequest>\n /**\n * If true, returns the updated documents\n *\n * @default true\n */\n returning?: boolean\n select?: SelectType\n slug: string\n}\n/**\n * @todo type as Promise<T | null> in 4.0\n */\nexport type UpdateGlobal = <T extends Record<string, unknown> = any>(\n args: UpdateGlobalArgs<T>,\n) => Promise<T>\n// export type UpdateOne = (args: UpdateOneArgs) => Promise<Document>\n\nexport type FindGlobalVersions = <T = JsonObject>(\n args: FindGlobalVersionsArgs,\n) => Promise<PaginatedDocs<TypeWithVersion<T>>>\n\nexport type DeleteVersionsArgs = {\n collection?: CollectionSlug\n globalSlug?: GlobalSlug\n locale?: string\n req?: Partial<PayloadRequest>\n sort?: {\n [key: string]: string\n }\n where: Where\n}\n\nexport type CreateVersionArgs<T extends JsonObject = JsonObject> = {\n autosave: boolean\n collectionSlug: CollectionSlug\n createdAt: string\n /** ID of the parent document for which the version should be created for */\n parent: number | string\n publishedLocale?: string\n req?: Partial<PayloadRequest>\n /**\n * If true, returns the updated documents\n *\n * @default true\n */\n returning?: boolean\n select?: SelectType\n /**\n * If provided, the snapshot will be created\n * after a version is created (not during autosave)\n */\n snapshot?: true\n updatedAt: string\n versionData: T\n}\n\nexport type CreateVersion = <T extends JsonObject = JsonObject>(\n args: CreateVersionArgs<T>,\n) => Promise<TypeWithVersion<T>>\n\nexport type CreateGlobalVersionArgs<T extends JsonObject = JsonObject> = {\n autosave: boolean\n createdAt: string\n globalSlug: GlobalSlug\n publishedLocale?: string\n req?: Partial<PayloadRequest>\n /**\n * If true, returns the updated documents\n *\n * @default true\n */\n returning?: boolean\n select?: SelectType\n /**\n * If provided, the snapshot will be created\n * after a version is created (not during autosave)\n */\n snapshot?: true\n updatedAt: string\n versionData: T\n}\n\nexport type CreateGlobalVersion = <T extends JsonObject = JsonObject>(\n args: CreateGlobalVersionArgs<T>,\n) => Promise<Omit<TypeWithVersion<T>, 'parent'>>\n\nexport type DeleteVersions = (args: DeleteVersionsArgs) => Promise<void>\n\nexport type UpdateVersionArgs<T extends JsonObject = JsonObject> = {\n collection: CollectionSlug\n locale?: string\n /**\n * Additional database adapter specific options to pass to the query\n */\n options?: Record<string, unknown>\n req?: Partial<PayloadRequest>\n /**\n * If true, returns the updated documents\n *\n * @default true\n */\n returning?: boolean\n select?: SelectType\n versionData: {\n createdAt?: string\n latest?: boolean\n parent?: number | string\n publishedLocale?: string\n updatedAt?: string\n version: T\n }\n} & (\n | {\n id: number | string\n where?: never\n }\n | {\n id?: never\n where: Where\n }\n)\n\n/**\n * @todo type as Promise<TypeWithVersion<T> | null> in 4.0\n */\nexport type UpdateVersion = <T extends JsonObject = JsonObject>(\n args: UpdateVersionArgs<T>,\n) => Promise<TypeWithVersion<T>>\n\nexport type CreateArgs = {\n collection: CollectionSlug\n customID?: number | string\n data: Record<string, unknown>\n draft?: boolean\n locale?: string\n req?: Partial<PayloadRequest>\n /**\n * If true, returns the updated documents\n *\n * @default true\n */\n returning?: boolean\n select?: SelectType\n}\n\nexport type FindDistinctArgs = {\n collection: CollectionSlug\n field: string\n limit?: number\n locale?: string\n page?: number\n /**\n * Access constraints for relationship values traversed by the distinct field path.\n * Keys are relationship paths relative to the queried collection.\n */\n relatedAccess?: Record<string, Where>\n req?: Partial<PayloadRequest>\n sort?: Sort\n where?: Where\n}\n\nexport type PaginatedDistinctDocs<T extends Record<string, unknown>> = {\n hasNextPage: boolean\n hasPrevPage: boolean\n limit: number\n nextPage?: null | number | undefined\n page: number\n pagingCounter: number\n prevPage?: null | number | undefined\n totalDocs: number\n totalPages: number\n values: T[]\n}\n\nexport type FindDistinct = (\n args: FindDistinctArgs,\n) => Promise<PaginatedDistinctDocs<Record<string, any>>>\n\nexport type Create = (args: CreateArgs) => Promise<Document>\n\nexport type UpdateOneArgs = {\n collection: CollectionSlug\n data: Record<string, unknown>\n draft?: boolean\n joins?: JoinQuery\n locale?: string\n /**\n * Additional database adapter specific options to pass to the query\n */\n options?: Record<string, unknown>\n req?: Partial<PayloadRequest>\n /**\n * If true, returns the updated documents\n *\n * @default true\n */\n returning?: boolean\n select?: SelectType\n} & (\n | {\n id: number | string\n where?: never\n }\n | {\n id?: never\n where: Where\n }\n)\n\n/**\n * @todo type as Promise<Document | null> in 4.0\n */\nexport type UpdateOne = (args: UpdateOneArgs) => Promise<Document>\n\nexport type UpdateManyArgs = {\n collection: CollectionSlug\n data: Record<string, unknown>\n draft?: boolean\n joins?: JoinQuery\n limit?: number\n locale?: string\n /**\n * Additional database adapter specific options to pass to the query\n */\n options?: Record<string, unknown>\n req?: Partial<PayloadRequest>\n /**\n * If true, returns the updated documents\n *\n * @default true\n */\n returning?: boolean\n select?: SelectType\n sort?: Sort\n where: Where\n}\n\nexport type UpdateMany = (args: UpdateManyArgs) => Promise<Document[] | null>\n\nexport type UpdateJobsArgs = {\n data: Record<string, unknown>\n req?: Partial<PayloadRequest>\n /**\n * If true, returns the updated documents\n *\n * @default true\n */\n returning?: boolean\n} & (\n | {\n id: number | string\n limit?: never\n sort?: never\n where?: never\n }\n | {\n id?: never\n limit?: number\n sort?: Sort\n where: Where\n }\n)\n\n/**\n * Updates jobs matching the provided `where` condition.\n *\n * Job claims must only update jobs whose lease is missing or expired.\n * When a `processingToken` is provided, only jobs updated with that token may be returned.\n */\nexport type UpdateJobs = (args: UpdateJobsArgs) => Promise<Job[] | null>\n\nexport type UpsertArgs = {\n collection: CollectionSlug\n data: Record<string, unknown>\n joins?: JoinQuery\n locale?: string\n req?: Partial<PayloadRequest>\n /**\n * If true, returns the updated documents\n *\n * @default true\n */\n returning?: boolean\n select?: SelectType\n where: Where\n}\n\nexport type Upsert = (args: UpsertArgs) => Promise<Document>\n\nexport type DeleteOneArgs = {\n collection: CollectionSlug\n joins?: JoinQuery\n req?: Partial<PayloadRequest>\n /**\n * If true, returns the updated documents\n *\n * @default true\n */\n returning?: boolean\n select?: SelectType\n where: Where\n}\n\n/**\n * @todo type as Promise<Document | null> in 4.0\n */\nexport type DeleteOne = (args: DeleteOneArgs) => Promise<Document>\n\nexport type DeleteManyArgs = {\n collection: CollectionSlug\n joins?: JoinQuery\n req?: Partial<PayloadRequest>\n where: Where\n}\n\nexport type DeleteMany = (args: DeleteManyArgs) => Promise<void>\n\nexport type Migration = {\n down: (args: unknown) => Promise<void>\n up: (args: unknown) => Promise<void>\n} & MigrationData\n\nexport type MigrationData = {\n batch?: number\n id?: string\n name: string\n}\n\nexport type PaginatedDocs<T = any> = {\n docs: T[]\n hasNextPage: boolean\n hasPrevPage: boolean\n limit: number\n nextPage?: null | number | undefined\n page?: number\n pagingCounter: number\n prevPage?: null | number | undefined\n totalDocs: number\n totalPages: number\n}\n\nexport type DatabaseAdapterResult<T = BaseDatabaseAdapter> = {\n allowIDOnCreate?: boolean\n defaultIDType: 'number' | 'text'\n init: (args: { payload: Payload }) => T\n /**\n * The name of the database adapter. For example, \"postgres\" or \"mongoose\".\n *\n * @todo make required in 4.0\n */\n name?: string\n}\n\nexport type DBIdentifierName =\n | ((Args: {\n /** The name of the parent table when using relational DBs */\n tableName?: string\n }) => string)\n | string\n\nexport type DynamicMigrationTemplate = (args: { filePath: string; payload: Payload }) => Promise<{\n downSQL?: string\n imports?: string\n upSQL?: string\n}>\n\nexport type MigrationTemplateArgs = {\n downSQL?: string\n dynamic?: DynamicMigrationTemplate\n imports?: string\n packageName?: string\n upSQL?: string\n}\n\nexport type GenerateSchemaArgs = {\n log?: boolean\n outputFile?: string\n prettify?: boolean\n}\n\nexport type GenerateSchema = (args?: GenerateSchemaArgs) => Promise<{ outputFile: string }>\n"],"names":[],"mappings":"AAo1BA,WAA2F"}
|
|
1
|
+
{"version":3,"sources":["../../src/database/types.ts"],"sourcesContent":["import type { TypeWithID } from '../collections/config/types.js'\nimport type { CollectionSlug, GlobalSlug, Job } from '../index.js'\nimport type {\n Document,\n JoinQuery,\n JsonObject,\n Payload,\n PayloadRequest,\n SelectType,\n Sort,\n Where,\n} from '../types/index.js'\nimport type { TypeWithVersion } from '../versions/types.js'\n\nexport type { TypeWithVersion }\n\nexport interface BaseDatabaseAdapter {\n allowIDOnCreate?: boolean\n /**\n * Process ordered create, update, and delete operations in bounded batches.\n */\n batchProcessing: BatchProcessing\n /**\n * Start a transaction, requiring commitTransaction() to be called for any changes to be made.\n * @returns an identifier for the transaction or null if one cannot be established\n */\n beginTransaction: BeginTransaction\n /**\n * When true, bulk operations will process documents one at a time\n * in separate transactions instead of all at once in a single transaction.\n * Useful for avoiding transaction limitations with large datasets.\n *\n * @default false\n */\n bulkOperationsSingleTransaction?: boolean\n\n /**\n * Persist the changes made since the start of the transaction.\n */\n commitTransaction: CommitTransaction\n\n /**\n * Open the connection to the database\n */\n connect?: Connect\n /**\n * Copy one stored collection document without running Local API operations.\n */\n copy: Copy\n count: Count\n countGlobalVersions: CountGlobalVersions\n countVersions: CountVersions\n\n create: Create\n\n createGlobal: CreateGlobal\n\n createGlobalVersion: CreateGlobalVersion\n /**\n * Output a migration file\n */\n createMigration: CreateMigration\n\n createVersion: CreateVersion\n\n /**\n * Specify if the ID is a text or number field by default within this database adapter.\n */\n defaultIDType: 'number' | 'text'\n\n deleteMany: DeleteMany\n\n deleteOne: DeleteOne\n deleteVersions: DeleteVersions\n\n /**\n * Terminate the connection with the database\n */\n destroy?: Destroy\n\n find: Find\n\n findDistinct: FindDistinct\n\n findGlobal: FindGlobal\n\n findGlobalVersions: FindGlobalVersions\n\n findOne: FindOne\n\n findVersions: FindVersions\n\n generateSchema?: GenerateSchema\n\n /**\n * Perform startup tasks required to interact with the database such as building Schema and models\n */\n init?: Init\n\n /**\n * Run any migration up functions that have not yet been performed and update the status\n */\n migrate: (args?: {\n forceAcceptWarning?: boolean\n migrations?: Migration[]\n shouldPrompt?: boolean\n }) => Promise<MigrationResult | void>\n /**\n * Run any migration down functions that have been performed\n */\n migrateDown: () => Promise<MigrationResult | void>\n\n /**\n * Drop the current database and run all migrate up functions\n */\n migrateFresh: (args: {\n forceAcceptWarning?: boolean\n shouldPrompt?: boolean\n }) => Promise<MigrationResult | void>\n /**\n * Run all migration down functions before running up\n */\n migrateRefresh: () => Promise<MigrationResult | void>\n /**\n * Run all migrate down functions\n */\n migrateReset: () => Promise<MigrationResult | void>\n /**\n * Read the current state of migrations and output the result to show which have been run\n */\n migrateStatus: () => Promise<MigrationStatus[] | void>\n\n /**\n * Path to read and write migration files from\n */\n migrationDir: string\n\n /**\n * The name of the database adapter\n */\n name: string\n /**\n * Full package name of the database adapter\n *\n * @example @payloadcms/db-postgres\n */\n packageName: string\n /**\n * reference to the instance of payload\n */\n payload: Payload\n\n queryDrafts: QueryDrafts\n\n /**\n * Abort any changes since the start of the transaction.\n */\n rollbackTransaction: RollbackTransaction\n\n /**\n * A key-value store of all sessions open (used for transactions)\n */\n sessions?: {\n [id: string]: unknown\n }\n\n /**\n * Updates a global that exists. If the global doesn't exist yet, this will not work - you should use `createGlobal` instead.\n */\n updateGlobal: UpdateGlobal\n\n updateGlobalVersion: UpdateGlobalVersion\n\n updateJobs: UpdateJobs\n\n updateMany: UpdateMany\n\n updateOne: UpdateOne\n updateVersion: UpdateVersion\n upsert: Upsert\n}\n\nexport type Init = () => Promise<void> | void\n\ntype ConnectArgs = {\n hotReload: boolean\n}\n\nexport type Connect = (args?: ConnectArgs) => Promise<void>\n\nexport type Destroy = () => Promise<void>\n\nexport type BatchProcessingOperation =\n | {\n args: WithoutRequest<CreateArgs>\n operation: 'create'\n }\n | {\n args: WithoutRequest<DeleteOneArgs>\n operation: 'deleteOne'\n }\n | {\n args: WithoutRequest<UpdateOneArgs>\n operation: 'updateOne'\n }\n\ntype WithoutRequest<T> = T extends unknown ? Omit<T, 'req'> : never\n\nexport type BatchProcessingResult = {\n index: number\n operation: BatchProcessingOperation['operation']\n} & (\n | {\n document?: Document\n documentID: number | string\n status: 'succeeded'\n }\n | {\n error: unknown\n status: 'failed'\n }\n | {\n status: 'noMatch'\n }\n | {\n status: 'unattempted'\n }\n)\n\nexport type BatchProcessingArgs = {\n batchSize?: number\n operations: BatchProcessingOperation[]\n req?: Partial<PayloadRequest>\n shouldContinueOnError?: boolean\n}\n\nexport type BatchProcessing = (\n this: BaseDatabaseAdapter,\n args: BatchProcessingArgs,\n) => Promise<BatchProcessingResult[]>\n\nexport type CopyArgs = {\n collection: CollectionSlug\n /**\n * Top-level field values that replace values from the source document.\n * Custom-ID collections require an `id` that matches the configured ID type.\n */\n data?: Record<string, unknown>\n req?: Partial<PayloadRequest>\n /** Selects the stored source document. */\n where: Where\n}\n\nexport type Copy = (this: BaseDatabaseAdapter, args: CopyArgs) => Promise<Document>\n\nexport type CreateMigration = (args: {\n file?: string\n forceAcceptWarning?: boolean\n migrationName?: string\n payload: Payload\n /** Set to false when the caller cannot answer interactive prompts. */\n shouldPrompt?: boolean\n /**\n * Skips the prompt asking to create empty migrations\n */\n skipEmpty?: boolean\n}) => CreateMigrationResult | Promise<CreateMigrationResult | void> | void\n\nexport type CreateMigrationResult = {\n created: boolean\n path?: string\n}\n\nexport type MigrationResult = {\n batch?: number\n cancelled?: true\n migrated: string[]\n rolledBack: string[]\n}\n\nexport type MigrationStatus = {\n batch?: number\n name: string\n ran: boolean\n}\n\nexport type Transaction = (\n callback: () => Promise<void>,\n options?: Record<string, unknown>,\n) => Promise<void>\n\nexport type BeginTransaction = (\n options?: Record<string, unknown>,\n) => Promise<null | number | string>\n\nexport type RollbackTransaction = (id: number | Promise<number | string> | string) => Promise<void>\n\nexport type CommitTransaction = (id: number | Promise<number | string> | string) => Promise<void>\n\nexport type QueryDraftsArgs = {\n collection: CollectionSlug\n joins?: JoinQuery\n limit?: number\n locale?: string\n page?: number\n pagination?: boolean\n req?: Partial<PayloadRequest>\n select?: SelectType\n sort?: Sort\n where?: Where\n}\n\nexport type QueryDrafts = <T = TypeWithID>(args: QueryDraftsArgs) => Promise<PaginatedDocs<T>>\n\nexport type FindOneArgs = {\n collection: CollectionSlug\n draftsEnabled?: boolean\n joins?: JoinQuery\n locale?: string\n req?: Partial<PayloadRequest>\n select?: SelectType\n where?: Where\n}\n\nexport type FindOne = <T extends TypeWithID>(args: FindOneArgs) => Promise<null | T>\n\nexport type FindArgs = {\n collection: CollectionSlug\n draftsEnabled?: boolean\n joins?: JoinQuery\n /** Setting limit to 1 is equal to the previous Model.findOne(). Setting limit to 0 disables the limit */\n limit?: number\n locale?: string\n page?: number\n pagination?: boolean\n projection?: Record<string, unknown>\n req?: Partial<PayloadRequest>\n select?: SelectType\n /**\n * @deprecated This parameter is going to be removed in the next major version. Use page instead.\n */\n skip?: number\n sort?: Sort\n versions?: boolean\n where?: Where\n}\n\nexport type Find = <T = TypeWithID>(args: FindArgs) => Promise<PaginatedDocs<T>>\n\nexport type CountArgs = {\n collection: CollectionSlug\n locale?: string\n req?: Partial<PayloadRequest>\n where?: Where\n}\n\nexport type Count = (args: CountArgs) => Promise<{ totalDocs: number }>\n\nexport type CountVersions = (args: CountArgs) => Promise<{ totalDocs: number }>\n\nexport type CountGlobalVersionArgs = {\n global: string\n locale?: string\n req?: Partial<PayloadRequest>\n where?: Where\n}\n\nexport type CountGlobalVersions = (args: CountGlobalVersionArgs) => Promise<{ totalDocs: number }>\n\ntype BaseVersionArgs = {\n limit?: number\n locale?: string\n page?: number\n pagination?: boolean\n req?: Partial<PayloadRequest>\n select?: SelectType\n /**\n * @deprecated This parameter is going to be removed in the next major version. Use page instead.\n */\n skip?: number\n sort?: Sort\n versions?: boolean\n where?: Where\n}\n\nexport type FindVersionsArgs = {\n collection: CollectionSlug\n} & BaseVersionArgs\n\nexport type FindVersions = <T = JsonObject>(\n args: FindVersionsArgs,\n) => Promise<PaginatedDocs<TypeWithVersion<T>>>\n\nexport type FindGlobalVersionsArgs = {\n global: GlobalSlug\n} & BaseVersionArgs\n\nexport type FindGlobalArgs = {\n locale?: string\n req?: Partial<PayloadRequest>\n select?: SelectType\n slug: string\n where?: Where\n}\n\nexport type UpdateGlobalVersionArgs<T extends JsonObject = JsonObject> = {\n global: GlobalSlug\n locale?: string\n /**\n * Additional database adapter specific options to pass to the query\n */\n options?: Record<string, unknown>\n req?: Partial<PayloadRequest>\n /**\n * If true, returns the updated documents\n *\n * @default true\n */\n returning?: boolean\n select?: SelectType\n versionData: {\n createdAt?: string\n latest?: boolean\n parent?: number | string\n publishedLocale?: string\n updatedAt?: string\n version: T\n }\n} & (\n | {\n id: number | string\n where?: never\n }\n | {\n id?: never\n where: Where\n }\n)\n\n/**\n * @todo type as Promise<TypeWithVersion<T> | null> in 4.0\n */\nexport type UpdateGlobalVersion = <T extends JsonObject = JsonObject>(\n args: UpdateGlobalVersionArgs<T>,\n) => Promise<TypeWithVersion<T>>\n\nexport type FindGlobal = <T extends Record<string, unknown> = any>(\n args: FindGlobalArgs,\n) => Promise<T>\n\nexport type CreateGlobalArgs<T extends Record<string, unknown> = any> = {\n data: T\n req?: Partial<PayloadRequest>\n /**\n * If true, returns the updated documents\n *\n * @default true\n */\n returning?: boolean\n slug: string\n}\nexport type CreateGlobal = <T extends Record<string, unknown> = any>(\n args: CreateGlobalArgs<T>,\n) => Promise<T>\n\nexport type UpdateGlobalArgs<T extends Record<string, unknown> = any> = {\n data: T\n /**\n * Additional database adapter specific options to pass to the query\n */\n options?: Record<string, unknown>\n req?: Partial<PayloadRequest>\n /**\n * If true, returns the updated documents\n *\n * @default true\n */\n returning?: boolean\n select?: SelectType\n slug: string\n}\n/**\n * @todo type as Promise<T | null> in 4.0\n */\nexport type UpdateGlobal = <T extends Record<string, unknown> = any>(\n args: UpdateGlobalArgs<T>,\n) => Promise<T>\n// export type UpdateOne = (args: UpdateOneArgs) => Promise<Document>\n\nexport type FindGlobalVersions = <T = JsonObject>(\n args: FindGlobalVersionsArgs,\n) => Promise<PaginatedDocs<TypeWithVersion<T>>>\n\nexport type DeleteVersionsArgs = {\n collection?: CollectionSlug\n globalSlug?: GlobalSlug\n locale?: string\n req?: Partial<PayloadRequest>\n sort?: {\n [key: string]: string\n }\n where: Where\n}\n\nexport type CreateVersionArgs<T extends JsonObject = JsonObject> = {\n autosave: boolean\n collectionSlug: CollectionSlug\n createdAt: string\n /** ID of the parent document for which the version should be created for */\n parent: number | string\n publishedLocale?: string\n req?: Partial<PayloadRequest>\n /**\n * If true, returns the updated documents\n *\n * @default true\n */\n returning?: boolean\n select?: SelectType\n /**\n * If provided, the snapshot will be created\n * after a version is created (not during autosave)\n */\n snapshot?: true\n updatedAt: string\n versionData: T\n}\n\nexport type CreateVersion = <T extends JsonObject = JsonObject>(\n args: CreateVersionArgs<T>,\n) => Promise<TypeWithVersion<T>>\n\nexport type CreateGlobalVersionArgs<T extends JsonObject = JsonObject> = {\n autosave: boolean\n createdAt: string\n globalSlug: GlobalSlug\n publishedLocale?: string\n req?: Partial<PayloadRequest>\n /**\n * If true, returns the updated documents\n *\n * @default true\n */\n returning?: boolean\n select?: SelectType\n /**\n * If provided, the snapshot will be created\n * after a version is created (not during autosave)\n */\n snapshot?: true\n updatedAt: string\n versionData: T\n}\n\nexport type CreateGlobalVersion = <T extends JsonObject = JsonObject>(\n args: CreateGlobalVersionArgs<T>,\n) => Promise<Omit<TypeWithVersion<T>, 'parent'>>\n\nexport type DeleteVersions = (args: DeleteVersionsArgs) => Promise<void>\n\nexport type UpdateVersionArgs<T extends JsonObject = JsonObject> = {\n collection: CollectionSlug\n locale?: string\n /**\n * Additional database adapter specific options to pass to the query\n */\n options?: Record<string, unknown>\n req?: Partial<PayloadRequest>\n /**\n * If true, returns the updated documents\n *\n * @default true\n */\n returning?: boolean\n select?: SelectType\n versionData: {\n createdAt?: string\n latest?: boolean\n parent?: number | string\n publishedLocale?: string\n updatedAt?: string\n version: T\n }\n} & (\n | {\n id: number | string\n where?: never\n }\n | {\n id?: never\n where: Where\n }\n)\n\n/**\n * @todo type as Promise<TypeWithVersion<T> | null> in 4.0\n */\nexport type UpdateVersion = <T extends JsonObject = JsonObject>(\n args: UpdateVersionArgs<T>,\n) => Promise<TypeWithVersion<T>>\n\nexport type CreateArgs = {\n collection: CollectionSlug\n customID?: number | string\n data: Record<string, unknown>\n draft?: boolean\n locale?: string\n req?: Partial<PayloadRequest>\n /**\n * If true, returns the updated documents\n *\n * @default true\n */\n returning?: boolean\n select?: SelectType\n}\n\nexport type FindDistinctArgs = {\n collection: CollectionSlug\n field: string\n limit?: number\n locale?: string\n page?: number\n /**\n * Access constraints for relationship values traversed by the distinct field path.\n * Keys are relationship paths relative to the queried collection.\n */\n relatedAccess?: Record<string, Where>\n req?: Partial<PayloadRequest>\n sort?: Sort\n where?: Where\n}\n\nexport type PaginatedDistinctDocs<T extends Record<string, unknown>> = {\n hasNextPage: boolean\n hasPrevPage: boolean\n limit: number\n nextPage?: null | number | undefined\n page: number\n pagingCounter: number\n prevPage?: null | number | undefined\n totalDocs: number\n totalPages: number\n values: T[]\n}\n\nexport type FindDistinct = (\n args: FindDistinctArgs,\n) => Promise<PaginatedDistinctDocs<Record<string, any>>>\n\nexport type Create = (args: CreateArgs) => Promise<Document>\n\nexport type UpdateOneArgs = {\n collection: CollectionSlug\n data: Record<string, unknown>\n draft?: boolean\n joins?: JoinQuery\n locale?: string\n /**\n * Additional database adapter specific options to pass to the query\n */\n options?: Record<string, unknown>\n req?: Partial<PayloadRequest>\n /**\n * If true, returns the updated documents\n *\n * @default true\n */\n returning?: boolean\n select?: SelectType\n} & (\n | {\n id: number | string\n where?: never\n }\n | {\n id?: never\n where: Where\n }\n)\n\n/**\n * @todo type as Promise<Document | null> in 4.0\n */\nexport type UpdateOne = (args: UpdateOneArgs) => Promise<Document>\n\nexport type UpdateManyArgs = {\n collection: CollectionSlug\n data: Record<string, unknown>\n draft?: boolean\n joins?: JoinQuery\n limit?: number\n locale?: string\n /**\n * Additional database adapter specific options to pass to the query\n */\n options?: Record<string, unknown>\n req?: Partial<PayloadRequest>\n /**\n * If true, returns the updated documents\n *\n * @default true\n */\n returning?: boolean\n select?: SelectType\n sort?: Sort\n where: Where\n}\n\nexport type UpdateMany = (args: UpdateManyArgs) => Promise<Document[] | null>\n\nexport type UpdateJobsArgs = {\n data: Record<string, unknown>\n req?: Partial<PayloadRequest>\n /**\n * If true, returns the updated documents\n *\n * @default true\n */\n returning?: boolean\n} & (\n | {\n id: number | string\n limit?: never\n sort?: never\n where?: never\n }\n | {\n id?: never\n limit?: number\n sort?: Sort\n where: Where\n }\n)\n\n/**\n * Updates jobs matching the provided `where` condition.\n *\n * Job claims must only update jobs whose lease is missing or expired.\n * When a `processingToken` is provided, only jobs updated with that token may be returned.\n */\nexport type UpdateJobs = (args: UpdateJobsArgs) => Promise<Job[] | null>\n\nexport type UpsertArgs = {\n collection: CollectionSlug\n data: Record<string, unknown>\n joins?: JoinQuery\n locale?: string\n req?: Partial<PayloadRequest>\n /**\n * If true, returns the updated documents\n *\n * @default true\n */\n returning?: boolean\n select?: SelectType\n where: Where\n}\n\nexport type Upsert = (args: UpsertArgs) => Promise<Document>\n\nexport type DeleteOneArgs = {\n collection: CollectionSlug\n joins?: JoinQuery\n req?: Partial<PayloadRequest>\n /**\n * If true, returns the updated documents\n *\n * @default true\n */\n returning?: boolean\n select?: SelectType\n where: Where\n}\n\n/**\n * @todo type as Promise<Document | null> in 4.0\n */\nexport type DeleteOne = (args: DeleteOneArgs) => Promise<Document>\n\nexport type DeleteManyArgs = {\n collection: CollectionSlug\n joins?: JoinQuery\n req?: Partial<PayloadRequest>\n where: Where\n}\n\nexport type DeleteMany = (args: DeleteManyArgs) => Promise<void>\n\nexport type Migration = {\n down: (args: unknown) => Promise<void>\n up: (args: unknown) => Promise<void>\n} & MigrationData\n\nexport type MigrationData = {\n batch?: number\n id?: string\n name: string\n}\n\nexport type PaginatedDocs<T = any> = {\n docs: T[]\n hasNextPage: boolean\n hasPrevPage: boolean\n limit: number\n nextPage?: null | number | undefined\n page?: number\n pagingCounter: number\n prevPage?: null | number | undefined\n totalDocs: number\n totalPages: number\n}\n\nexport type DatabaseAdapterResult<T = BaseDatabaseAdapter> = {\n allowIDOnCreate?: boolean\n defaultIDType: 'number' | 'text'\n init: (args: { payload: Payload }) => T\n /**\n * The name of the database adapter. For example, \"postgres\" or \"mongoose\".\n *\n * @todo make required in 4.0\n */\n name?: string\n}\n\nexport type DBIdentifierName =\n | ((Args: {\n /** The name of the parent table when using relational DBs */\n tableName?: string\n }) => string)\n | string\n\nexport type DynamicMigrationTemplate = (args: { filePath: string; payload: Payload }) => Promise<{\n downSQL?: string\n imports?: string\n upSQL?: string\n}>\n\nexport type MigrationTemplateArgs = {\n downSQL?: string\n dynamic?: DynamicMigrationTemplate\n imports?: string\n packageName?: string\n upSQL?: string\n}\n\nexport type GenerateSchemaArgs = {\n log?: boolean\n outputFile?: string\n /**\n * Format the generated schema with the project's oxfmt, falling back to Prettier.\n * @default true\n */\n prettify?: boolean\n}\n\nexport type GenerateSchema = (args?: GenerateSchemaArgs) => Promise<{ outputFile: string }>\n"],"names":[],"mappings":"AAw1BA,WAA2F"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reservedFieldNames.d.ts","sourceRoot":"","sources":["../../../src/fields/config/reservedFieldNames.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,eAAO,MAAM,0BAA0B,UAMtC,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,wBAAwB,
|
|
1
|
+
{"version":3,"file":"reservedFieldNames.d.ts","sourceRoot":"","sources":["../../../src/fields/config/reservedFieldNames.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,eAAO,MAAM,0BAA0B,UAMtC,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,wBAAwB,SAA4C,CAAA;AAEjF;;GAEG;AACH,eAAO,MAAM,wBAAwB,SAAiD,CAAA;AAEtF;;GAEG;AACH,eAAO,MAAM,4BAA4B,UAYxC,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,0BAA0B,SAA2B,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/fields/config/reservedFieldNames.ts"],"sourcesContent":["/**\n * Reserved field names for collections with auth config enabled\n */\nexport const reservedBaseAuthFieldNames = [\n /* 'email',\n 'resetPasswordToken',\n 'resetPasswordExpiration', */\n 'salt',\n 'hash',\n]\n\n/**\n * Reserved field names for auth collections with verify: true\n */\nexport const reservedVerifyFieldNames = [
|
|
1
|
+
{"version":3,"sources":["../../../src/fields/config/reservedFieldNames.ts"],"sourcesContent":["/**\n * Reserved field names for collections with auth config enabled\n */\nexport const reservedBaseAuthFieldNames = [\n /* 'email',\n 'resetPasswordToken',\n 'resetPasswordExpiration', */\n 'salt',\n 'hash',\n]\n\n/**\n * Reserved field names for auth collections with verify: true\n */\nexport const reservedVerifyFieldNames = [/* '_verified', '_verificationToken' */]\n\n/**\n * Reserved field names for auth collections with useApiKey: true\n */\nexport const reservedAPIKeyFieldNames = [/* 'apiKeyIndex', 'apiKeyLast4', 'apiKey' */]\n\n/**\n * Reserved field names for collections with upload config enabled\n */\nexport const reservedBaseUploadFieldNames = [\n 'file',\n /* 'mimeType',\n 'thumbnailURL',\n 'width',\n 'height',\n 'filesize',\n 'filename',\n 'url',\n 'focalX',\n 'focalY',\n 'variants', */\n]\n\n/**\n * Reserved field names for collections with versions enabled\n */\nexport const reservedVersionsFieldNames = [/* '__v', '_status' */]\n"],"names":["reservedBaseAuthFieldNames","reservedVerifyFieldNames","reservedAPIKeyFieldNames","reservedBaseUploadFieldNames","reservedVersionsFieldNames"],"mappings":"AAAA;;CAEC,GACD,OAAO,MAAMA,6BAA6B;IACxC;;+BAE6B,GAC7B;IACA;CACD,CAAA;AAED;;CAEC,GACD,OAAO,MAAMC,2BAA2B,EAAyC,CAAA;AAEjF;;CAEC,GACD,OAAO,MAAMC,2BAA2B,EAA8C,CAAA;AAEtF;;CAEC,GACD,OAAO,MAAMC,+BAA+B;IAC1C;CAWD,CAAA;AAED;;CAEC,GACD,OAAO,MAAMC,6BAA6B,EAAwB,CAAA"}
|