payload 4.0.0-beta.8 → 4.0.0-beta.9
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/baseFields/sessions.d.ts.map +1 -1
- package/dist/auth/baseFields/sessions.js +12 -0
- package/dist/auth/baseFields/sessions.js.map +1 -1
- package/dist/auth/createAuthToken.d.ts +3 -3
- package/dist/auth/createAuthToken.d.ts.map +1 -1
- package/dist/auth/createAuthToken.js +4 -1
- package/dist/auth/createAuthToken.js.map +1 -1
- package/dist/auth/getUserAgentLabel.d.ts +8 -0
- package/dist/auth/getUserAgentLabel.d.ts.map +1 -0
- package/dist/auth/getUserAgentLabel.js +70 -0
- package/dist/auth/getUserAgentLabel.js.map +1 -0
- package/dist/auth/operations/login.d.ts.map +1 -1
- package/dist/auth/operations/login.js +5 -0
- package/dist/auth/operations/login.js.map +1 -1
- package/dist/auth/operations/resetPassword.d.ts.map +1 -1
- package/dist/auth/operations/resetPassword.js +5 -0
- package/dist/auth/operations/resetPassword.js.map +1 -1
- package/dist/auth/sessions.d.ts +2 -2
- package/dist/auth/sessions.d.ts.map +1 -1
- package/dist/auth/sessions.js +5 -2
- package/dist/auth/sessions.js.map +1 -1
- package/dist/auth/types.d.ts +9 -0
- package/dist/auth/types.d.ts.map +1 -1
- package/dist/auth/types.js.map +1 -1
- package/dist/cli/commands/generateImportMap/utilities/resolveImportMapFilePath.d.ts.map +1 -1
- package/dist/cli/commands/generateImportMap/utilities/resolveImportMapFilePath.js +7 -3
- package/dist/cli/commands/generateImportMap/utilities/resolveImportMapFilePath.js.map +1 -1
- package/dist/collections/operations/create.js +1 -1
- package/dist/collections/operations/create.js.map +1 -1
- package/dist/collections/operations/findByID.d.ts.map +1 -1
- package/dist/collections/operations/findByID.js +1 -3
- package/dist/collections/operations/findByID.js.map +1 -1
- package/dist/collections/operations/local/restoreVersion.d.ts.map +1 -1
- package/dist/collections/operations/local/restoreVersion.js +2 -1
- package/dist/collections/operations/local/restoreVersion.js.map +1 -1
- package/dist/collections/operations/restoreVersion.d.ts.map +1 -1
- package/dist/collections/operations/restoreVersion.js +22 -6
- package/dist/collections/operations/restoreVersion.js.map +1 -1
- package/dist/collections/operations/update.js +1 -1
- package/dist/collections/operations/update.js.map +1 -1
- package/dist/collections/operations/updateByID.js +1 -1
- package/dist/collections/operations/updateByID.js.map +1 -1
- package/dist/exports/internal.d.ts +1 -1
- package/dist/exports/internal.d.ts.map +1 -1
- package/dist/exports/internal.js.map +1 -1
- package/dist/index.bundled.d.ts +48 -63
- package/dist/index.d.ts +0 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +0 -2
- package/dist/index.js.map +1 -1
- package/dist/uploads/checkFileAccess.d.ts.map +1 -1
- package/dist/uploads/checkFileAccess.js +1 -0
- package/dist/uploads/checkFileAccess.js.map +1 -1
- package/dist/uploads/endpoints/getFile.d.ts.map +1 -1
- package/dist/uploads/endpoints/getFile.js +17 -5
- package/dist/uploads/endpoints/getFile.js.map +1 -1
- package/dist/uploads/fileSelectionParams.d.ts +10 -0
- package/dist/uploads/fileSelectionParams.d.ts.map +1 -0
- package/dist/uploads/fileSelectionParams.js +10 -0
- package/dist/uploads/fileSelectionParams.js.map +1 -0
- package/dist/uploads/fileVersioning/cloudStorage.d.ts +7 -0
- package/dist/uploads/fileVersioning/cloudStorage.d.ts.map +1 -1
- package/dist/uploads/fileVersioning/cloudStorage.js +43 -19
- package/dist/uploads/fileVersioning/cloudStorage.js.map +1 -1
- package/dist/uploads/fileVersioning/resolveHistoricalFile.d.ts +18 -4
- package/dist/uploads/fileVersioning/resolveHistoricalFile.d.ts.map +1 -1
- package/dist/uploads/fileVersioning/resolveHistoricalFile.js +73 -30
- package/dist/uploads/fileVersioning/resolveHistoricalFile.js.map +1 -1
- package/dist/uploads/fileVersioning/restore.d.ts +17 -3
- package/dist/uploads/fileVersioning/restore.d.ts.map +1 -1
- package/dist/uploads/fileVersioning/restore.js +42 -1
- package/dist/uploads/fileVersioning/restore.js.map +1 -1
- package/dist/uploads/fileVersioning/restoreRequestTime.d.ts +15 -0
- package/dist/uploads/fileVersioning/restoreRequestTime.d.ts.map +1 -0
- package/dist/uploads/fileVersioning/restoreRequestTime.js +176 -0
- package/dist/uploads/fileVersioning/restoreRequestTime.js.map +1 -0
- package/dist/uploads/fileVersioning/storedFiles.d.ts +4 -0
- package/dist/uploads/fileVersioning/storedFiles.d.ts.map +1 -1
- package/dist/uploads/fileVersioning/storedFiles.js +10 -1
- package/dist/uploads/fileVersioning/storedFiles.js.map +1 -1
- package/dist/uploads/generateFileData/edits/legacyUploadEdits.d.ts +122 -0
- package/dist/uploads/generateFileData/edits/legacyUploadEdits.d.ts.map +1 -0
- package/dist/uploads/generateFileData/edits/legacyUploadEdits.js +261 -0
- package/dist/uploads/generateFileData/edits/legacyUploadEdits.js.map +1 -0
- package/dist/uploads/generateFileData/edits/resolveUploadEdits.d.ts +30 -0
- package/dist/uploads/generateFileData/edits/resolveUploadEdits.d.ts.map +1 -0
- package/dist/uploads/generateFileData/edits/resolveUploadEdits.js +131 -0
- package/dist/uploads/generateFileData/edits/resolveUploadEdits.js.map +1 -0
- package/dist/uploads/generateFileData/index.d.ts +47 -0
- package/dist/uploads/generateFileData/index.d.ts.map +1 -0
- package/dist/uploads/generateFileData/index.js +365 -0
- package/dist/uploads/generateFileData/index.js.map +1 -0
- package/dist/uploads/generateFileData/output/buildUploadOutput.d.ts +52 -0
- package/dist/uploads/generateFileData/output/buildUploadOutput.d.ts.map +1 -0
- package/dist/uploads/generateFileData/output/buildUploadOutput.js +394 -0
- package/dist/uploads/generateFileData/output/buildUploadOutput.js.map +1 -0
- package/dist/uploads/generateFileData/output/buildVariantOutputs.d.ts +33 -0
- package/dist/uploads/generateFileData/output/buildVariantOutputs.d.ts.map +1 -0
- package/dist/uploads/generateFileData/output/buildVariantOutputs.js +100 -0
- package/dist/uploads/generateFileData/output/buildVariantOutputs.js.map +1 -0
- package/dist/uploads/generateFileData/output/resolveTempFileHandling.d.ts +20 -0
- package/dist/uploads/generateFileData/output/resolveTempFileHandling.d.ts.map +1 -0
- package/dist/uploads/generateFileData/output/resolveTempFileHandling.js +20 -0
- package/dist/uploads/generateFileData/output/resolveTempFileHandling.js.map +1 -0
- package/dist/uploads/generateFileData/plan/planSourceRebuild.d.ts +35 -0
- package/dist/uploads/generateFileData/plan/planSourceRebuild.d.ts.map +1 -0
- package/dist/uploads/generateFileData/plan/planSourceRebuild.js +54 -0
- package/dist/uploads/generateFileData/plan/planSourceRebuild.js.map +1 -0
- package/dist/uploads/generateFileData/plan/planUploadStages.d.ts +44 -0
- package/dist/uploads/generateFileData/plan/planUploadStages.d.ts.map +1 -0
- package/dist/uploads/generateFileData/plan/planUploadStages.js +63 -0
- package/dist/uploads/generateFileData/plan/planUploadStages.js.map +1 -0
- package/dist/uploads/generateFileData/runUploadTransformers.d.ts +46 -0
- package/dist/uploads/generateFileData/runUploadTransformers.d.ts.map +1 -0
- package/dist/uploads/generateFileData/runUploadTransformers.js +93 -0
- package/dist/uploads/generateFileData/runUploadTransformers.js.map +1 -0
- package/dist/uploads/generateFileData/source/downloadClientUpload.d.ts +32 -0
- package/dist/uploads/generateFileData/source/downloadClientUpload.d.ts.map +1 -0
- package/dist/uploads/generateFileData/source/downloadClientUpload.js +43 -0
- package/dist/uploads/generateFileData/source/downloadClientUpload.js.map +1 -0
- package/dist/uploads/generateFileData/source/readUploadSource.d.ts +27 -0
- package/dist/uploads/generateFileData/source/readUploadSource.d.ts.map +1 -0
- package/dist/uploads/generateFileData/source/readUploadSource.js +97 -0
- package/dist/uploads/generateFileData/source/readUploadSource.js.map +1 -0
- package/dist/uploads/generateFileData/source/selectUploadSource.d.ts +50 -0
- package/dist/uploads/generateFileData/source/selectUploadSource.d.ts.map +1 -0
- package/dist/uploads/generateFileData/source/selectUploadSource.js +42 -0
- package/dist/uploads/generateFileData/source/selectUploadSource.js.map +1 -0
- package/dist/uploads/generateFileData/utils/checkFileAndUseDetectedType.d.ts +9 -0
- package/dist/uploads/generateFileData/utils/checkFileAndUseDetectedType.d.ts.map +1 -0
- package/dist/uploads/generateFileData/utils/checkFileAndUseDetectedType.js +19 -0
- package/dist/uploads/generateFileData/utils/checkFileAndUseDetectedType.js.map +1 -0
- package/dist/uploads/generateFileData/utils/generateImageSizeFilename.d.ts.map +1 -0
- package/dist/uploads/generateFileData/utils/generateImageSizeFilename.js.map +1 -0
- package/dist/uploads/generateFileData/utils/getUploadStorage.d.ts +27 -0
- package/dist/uploads/generateFileData/utils/getUploadStorage.d.ts.map +1 -0
- package/dist/uploads/generateFileData/utils/getUploadStorage.js +22 -0
- package/dist/uploads/generateFileData/utils/getUploadStorage.js.map +1 -0
- package/dist/uploads/generateFileData/utils/toFileUploadError.d.ts +11 -0
- package/dist/uploads/generateFileData/utils/toFileUploadError.d.ts.map +1 -0
- package/dist/uploads/generateFileData/utils/toFileUploadError.js +15 -0
- package/dist/uploads/generateFileData/utils/toFileUploadError.js.map +1 -0
- package/dist/uploads/getFileFromUploadInstructions.js +2 -2
- package/dist/uploads/getFileFromUploadInstructions.js.map +1 -1
- package/dist/uploads/requestTimeFileData.d.ts +36 -0
- package/dist/uploads/requestTimeFileData.d.ts.map +1 -0
- package/dist/uploads/requestTimeFileData.js +56 -0
- package/dist/uploads/requestTimeFileData.js.map +1 -0
- package/dist/uploads/transformState/planUpload.d.ts +27 -2
- package/dist/uploads/transformState/planUpload.d.ts.map +1 -1
- package/dist/uploads/transformState/planUpload.js +27 -4
- package/dist/uploads/transformState/planUpload.js.map +1 -1
- package/dist/uploads/transformState/transformStateInput.d.ts +52 -0
- package/dist/uploads/transformState/transformStateInput.d.ts.map +1 -0
- package/dist/uploads/transformState/transformStateInput.js +113 -0
- package/dist/uploads/transformState/transformStateInput.js.map +1 -0
- package/dist/uploads/transformers/handleDynamicFileRequest.d.ts +7 -1
- package/dist/uploads/transformers/handleDynamicFileRequest.d.ts.map +1 -1
- package/dist/uploads/transformers/handleDynamicFileRequest.js +40 -10
- package/dist/uploads/transformers/handleDynamicFileRequest.js.map +1 -1
- package/dist/uploads/transformers/transformUploadFile.js +1 -1
- package/dist/uploads/transformers/transformUploadFile.js.map +1 -1
- package/dist/uploads/transformers/uploadTransformerBridge.d.ts +16 -6
- package/dist/uploads/transformers/uploadTransformerBridge.d.ts.map +1 -1
- package/dist/uploads/transformers/uploadTransformerBridge.js +3 -1
- package/dist/uploads/transformers/uploadTransformerBridge.js.map +1 -1
- package/dist/utilities/initTransaction.d.ts.map +1 -1
- package/dist/utilities/initTransaction.js +35 -7
- package/dist/utilities/initTransaction.js.map +1 -1
- package/dist/versions/getLatestCollectionVersion.d.ts +1 -2
- package/dist/versions/getLatestCollectionVersion.d.ts.map +1 -1
- package/dist/versions/getLatestCollectionVersion.js +7 -23
- package/dist/versions/getLatestCollectionVersion.js.map +1 -1
- package/dist/versions/getLatestGlobalVersion.d.ts +1 -2
- package/dist/versions/getLatestGlobalVersion.d.ts.map +1 -1
- package/dist/versions/getLatestGlobalVersion.js +2 -6
- package/dist/versions/getLatestGlobalVersion.js.map +1 -1
- package/package.json +3 -3
- package/skills/payload/SKILL.md +12 -9
- package/skills/payload/reference/ADAPTERS.md +21 -27
- package/skills/payload/reference/FIELDS.md +1 -1
- package/skills/payload/reference/HOOKS.md +1 -1
- package/skills/payload/reference/PLUGIN-DEVELOPMENT.md +1 -1
- package/skills/payload/reference/QUERIES.md +6 -6
- package/dist/uploads/generateFileData.d.ts +0 -60
- package/dist/uploads/generateFileData.d.ts.map +0 -1
- package/dist/uploads/generateFileData.js +0 -1022
- package/dist/uploads/generateFileData.js.map +0 -1
- package/dist/uploads/generateImageSizeFilename.d.ts.map +0 -1
- package/dist/uploads/generateImageSizeFilename.js.map +0 -1
- package/dist/uploads/transformState/resolveUploadEdits.d.ts +0 -91
- package/dist/uploads/transformState/resolveUploadEdits.d.ts.map +0 -1
- package/dist/uploads/transformState/resolveUploadEdits.js +0 -397
- package/dist/uploads/transformState/resolveUploadEdits.js.map +0 -1
- /package/dist/uploads/{generateImageSizeFilename.d.ts → generateFileData/utils/generateImageSizeFilename.d.ts} +0 -0
- /package/dist/uploads/{generateImageSizeFilename.js → generateFileData/utils/generateImageSizeFilename.js} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/collections/operations/updateByID.ts"],"sourcesContent":["import type { DeepPartial } from 'ts-essentials'\n\nimport type { FindOneArgs } from '../../database/types.js'\nimport type {\n PayloadRequest,\n PopulateType,\n SelectType,\n TransformCollectionWithSelect,\n} from '../../types/index.js'\nimport type {\n Collection,\n RequiredDataFromCollectionSlug,\n SelectFromCollectionSlug,\n TypeWithID,\n} from '../config/types.js'\n\nimport { executeAccess } from '../../auth/executeAccess.js'\nimport { hasWhereAccessResult } from '../../auth/types.js'\nimport { combineQueries } from '../../database/combineQueries.js'\nimport { APIError, Forbidden, NotFound } from '../../errors/index.js'\nimport { type CollectionSlug, deepCopyObjectSimple, type FindOptions } from '../../index.js'\nimport { runCloudFileUpdate } from '../../uploads/fileVersioning/cloudStorage.js'\nimport {\n abortFileOperationScope,\n beginFileOperationScope,\n completeFileOperationScope,\n} from '../../uploads/fileVersioning/fileOperationManager.js'\nimport { withLegacyCloudUploadFileData } from '../../uploads/fileVersioning/storedFiles.js'\nimport { generateFileData } from '../../uploads/generateFileData.js'\nimport {\n getLocalizedUploadProperties,\n getUploadDestination,\n mergeUploadDataWithDocument,\n sanitizeUploadData,\n} from '../../uploads/sanitizeUploadData.js'\nimport { unlinkTempFiles } from '../../uploads/unlinkTempFiles.js'\nimport { appendNonTrashedFilter } from '../../utilities/appendNonTrashedFilter.js'\nimport { assertNoValidationWrite } from '../../utilities/assertNoValidationWrite.js'\nimport { commitTransaction } from '../../utilities/commitTransaction.js'\nimport { hasLocalizeStatusEnabled } from '../../utilities/getVersionsConfig.js'\nimport { httpStatus } from '../../utilities/httpStatus.js'\nimport { initTransaction } from '../../utilities/initTransaction.js'\nimport { killTransaction } from '../../utilities/killTransaction.js'\nimport { resolveSelect } from '../../utilities/resolveSelect.js'\nimport { sanitizeSelect } from '../../utilities/sanitizeSelect.js'\nimport {\n getAllLocalesPublicationStatus,\n normalizeAllLocalesPublicationStatus,\n reconcileAllLocalesPublicationStatus,\n validateAllLocalesPublicationFlags,\n} from '../../versions/allLocalesPublicationStatus.js'\nimport { getLatestCollectionVersion } from '../../versions/getLatestCollectionVersion.js'\nimport { buildAfterOperation } from './utilities/buildAfterOperation.js'\nimport { buildBeforeOperation } from './utilities/buildBeforeOperation.js'\nimport { updateDocument } from './utilities/update.js'\n\nexport type Arguments<TSlug extends CollectionSlug> = {\n autosave?: boolean\n collection: Collection\n data: DeepPartial<RequiredDataFromCollectionSlug<TSlug>>\n depth?: number\n disableTransaction?: boolean\n disableVerificationEmail?: boolean\n draft?: boolean\n id: number | string\n overrideAccess?: boolean\n overrideLock?: boolean\n overwriteExistingFiles?: boolean\n populate?: PopulateType\n publishAllLocales?: boolean\n req: PayloadRequest\n showHiddenFields?: boolean\n trash?: boolean\n unpublishAllLocales?: boolean\n} & Pick<FindOptions<TSlug, SelectType>, 'select'>\n\nexport const updateByIDOperation = async <\n TSlug extends CollectionSlug,\n TSelect extends SelectFromCollectionSlug<TSlug> = SelectType,\n>(\n incomingArgs: Arguments<TSlug>,\n): Promise<TransformCollectionWithSelect<TSlug, TSelect>> => {\n let args = incomingArgs\n const hasFileOperationScope = Boolean(args.collection.config.upload)\n\n if (hasFileOperationScope) {\n beginFileOperationScope({ req: args.req })\n }\n\n assertNoValidationWrite(args.req)\n\n try {\n const shouldCommit = !args.disableTransaction && (await initTransaction(args.req))\n\n if (args.collection.config.upload && !args.overrideAccess) {\n const { objectKey, prefix } = getUploadDestination({ data: args.data, file: args.req.file })\n const data = sanitizeUploadData(args.data, 'update')\n\n args = {\n ...args,\n data:\n typeof data === 'object' && data !== null\n ? {\n ...data,\n ...(prefix !== undefined ? { prefix } : {}),\n ...(objectKey !== undefined ? { _objectKey: objectKey } : {}),\n }\n : data,\n }\n }\n\n validateAllLocalesPublicationFlags({\n publishAllLocales: args.publishAllLocales,\n unpublishAllLocales: args.unpublishAllLocales,\n })\n\n const initialCollectionConfig = args.collection.config\n const initialAllLocalesPublicationStatus = getAllLocalesPublicationStatus({\n hasLocalizedStatus: Boolean(\n args.req.payload.config.localization && hasLocalizeStatusEnabled(initialCollectionConfig),\n ),\n publishAllLocales:\n !args.draft &&\n (args.publishAllLocales ??\n (hasLocalizeStatusEnabled(initialCollectionConfig) && args.req.locale !== 'all'\n ? false\n : true)),\n unpublishAllLocales: Boolean(args.unpublishAllLocales),\n })\n\n const initialAllLocalesPublicationIntent = normalizeAllLocalesPublicationStatus({\n data: args.data,\n status: initialAllLocalesPublicationStatus,\n })\n // /////////////////////////////////////\n // beforeOperation - Collection\n // /////////////////////////////////////\n\n args = await buildBeforeOperation({\n args,\n collection: args.collection.config,\n operation: 'update',\n overrideAccess: args.overrideAccess!,\n })\n\n const {\n id,\n autosave = false,\n collection: { config: collectionConfig },\n collection,\n depth,\n draft: draftArg = false,\n overrideAccess,\n overrideLock,\n overwriteExistingFiles = false,\n populate,\n publishAllLocales: publishAllLocalesArg,\n req: {\n fallbackLocale,\n locale,\n payload: { config },\n payload,\n },\n req,\n select: incomingSelect,\n showHiddenFields,\n trash = false,\n unpublishAllLocales: unpublishAllLocalesArg,\n } = args\n\n if (!id) {\n throw new APIError('Missing ID of document to update.', httpStatus.BAD_REQUEST)\n }\n\n let { data } = args\n\n validateAllLocalesPublicationFlags({\n publishAllLocales: publishAllLocalesArg,\n unpublishAllLocales: unpublishAllLocalesArg,\n })\n\n const requestedAllLocalesPublicationStatus = getAllLocalesPublicationStatus({\n hasLocalizedStatus: Boolean(\n config.localization && hasLocalizeStatusEnabled(collectionConfig),\n ),\n publishAllLocales:\n !draftArg &&\n (publishAllLocalesArg ?? !(hasLocalizeStatusEnabled(collectionConfig) && locale !== 'all')),\n unpublishAllLocales: Boolean(unpublishAllLocalesArg),\n })\n const allLocalesPublicationStatus = reconcileAllLocalesPublicationStatus({\n data,\n intent: initialAllLocalesPublicationIntent,\n status: requestedAllLocalesPublicationStatus,\n })\n const publicationIntentSurvivedBeforeOperation =\n !requestedAllLocalesPublicationStatus || Boolean(allLocalesPublicationStatus)\n const publishAllLocales = publicationIntentSurvivedBeforeOperation\n ? publishAllLocalesArg\n : false\n const unpublishAllLocales = publicationIntentSurvivedBeforeOperation\n ? unpublishAllLocalesArg\n : false\n\n // /////////////////////////////////////\n // Access\n // /////////////////////////////////////\n\n const accessResults = !overrideAccess\n ? await executeAccess(\n { id, slug: collectionConfig.slug, data, req },\n collectionConfig.access.update,\n )\n : true\n const hasWherePolicy = hasWhereAccessResult(accessResults)\n\n // /////////////////////////////////////\n // Retrieve document\n // /////////////////////////////////////\n\n const where = { id: { equals: id } }\n\n let fullWhere = combineQueries(where, accessResults)\n\n const isTrashAttempt =\n collectionConfig.trash &&\n typeof data === 'object' &&\n data !== null &&\n 'deletedAt' in data &&\n data.deletedAt != null\n\n if (isTrashAttempt && !overrideAccess) {\n // Pass data so access function can check data.deletedAt to know it's a trash attempt\n const deleteAccessResult = await executeAccess(\n { id, slug: collectionConfig.slug, data, req },\n collectionConfig.access.delete,\n )\n fullWhere = combineQueries(fullWhere, deleteAccessResult)\n }\n\n // Exclude trashed documents when trash: false\n fullWhere = appendNonTrashedFilter({\n enableTrash: collectionConfig.trash,\n trash,\n where: fullWhere,\n })\n\n const findOneArgs: FindOneArgs = {\n collection: collectionConfig.slug,\n locale: locale!,\n req,\n where: fullWhere,\n }\n\n let docWithLocales = await getLatestCollectionVersion<\n RequiredDataFromCollectionSlug<TSlug> & TypeWithID\n >({\n id,\n config: collectionConfig,\n payload,\n query: findOneArgs,\n req,\n })\n\n if (!docWithLocales && !hasWherePolicy) {\n throw new NotFound(req.t)\n }\n if (!docWithLocales && hasWherePolicy) {\n throw new Forbidden(req.t)\n }\n if (!docWithLocales) {\n throw new NotFound(req.t)\n }\n\n const storedDocWithLocales = docWithLocales\n if (collectionConfig.upload.fileOperations) {\n docWithLocales = await withLegacyCloudUploadFileData({\n collection: collectionConfig,\n doc: docWithLocales,\n req,\n })\n }\n\n if (collectionConfig.upload && !overrideAccess) {\n data = mergeUploadDataWithDocument(data, docWithLocales, {\n locale:\n locale === 'all' || !locale\n ? config.localization\n ? config.localization.defaultLocale\n : undefined\n : locale,\n localizedProperties: getLocalizedUploadProperties(collectionConfig.flattenedFields),\n })\n }\n\n // /////////////////////////////////////\n // Generate data for all files and sizes\n // /////////////////////////////////////\n\n const { data: newFileData, files: filesToUpload } = await generateFileData({\n collection,\n config,\n data,\n operation: 'update',\n originalDoc: docWithLocales,\n overwriteExistingFiles,\n req,\n throwOnMissingFile: false,\n })\n\n const select = sanitizeSelect({\n fields: collectionConfig.flattenedFields,\n select: resolveSelect({\n config: collectionConfig.select,\n operation: 'update',\n req,\n select: incomingSelect,\n }),\n })\n\n // ///////////////////////////////////////////////\n // Update document, runs all document level hooks\n // ///////////////////////////////////////////////\n\n const updateArgs = {\n id,\n autosave,\n collectionConfig,\n config,\n data: deepCopyObjectSimple(newFileData),\n depth: depth!,\n docWithLocales,\n draftArg,\n fallbackLocale: fallbackLocale!,\n filesToUpload,\n locale: locale!,\n overrideAccess: overrideAccess!,\n overrideLock: overrideLock!,\n payload,\n populate,\n publishAllLocales,\n req,\n select: select!,\n shouldManageLocalFiles: true,\n showHiddenFields: showHiddenFields!,\n unpublishAllLocales,\n } as const\n\n const write = () => updateDocument<TSlug, TSelect>(updateArgs)\n let result = collectionConfig.upload.fileOperations\n ? await runCloudFileUpdate({\n id,\n collection: collectionConfig,\n current: storedDocWithLocales,\n data: updateArgs.data,\n files: filesToUpload,\n req,\n write,\n })\n : await write()\n\n // /////////////////////////////////////\n // Add collection property for auth collections\n // /////////////////////////////////////\n\n if (collectionConfig.auth) {\n result = { ...result, collection: collectionConfig.slug }\n }\n\n await unlinkTempFiles({\n collectionConfig,\n config,\n req,\n }).catch((unlinkError) => {\n req.payload.logger.error({ err: unlinkError, msg: 'Failed to remove temp file' })\n })\n\n // /////////////////////////////////////\n // afterOperation - Collection\n // /////////////////////////////////////\n\n result = (await buildAfterOperation({\n args,\n collection: collectionConfig,\n operation: 'updateByID',\n overrideAccess,\n result,\n })) as TransformCollectionWithSelect<TSlug, TSelect>\n\n // /////////////////////////////////////\n // Return results\n // /////////////////////////////////////\n\n if (shouldCommit) {\n await commitTransaction(req)\n }\n\n if (hasFileOperationScope) {\n await completeFileOperationScope({ req })\n }\n\n return result\n } catch (error: unknown) {\n await unlinkTempFiles({\n collectionConfig: args.collection.config,\n config: args.req.payload.config,\n req: args.req,\n }).catch((unlinkError) => {\n args.req.payload.logger.error({ err: unlinkError, msg: 'Failed to remove temp file' })\n })\n await killTransaction(args.req)\n if (hasFileOperationScope) {\n await abortFileOperationScope({ req: args.req })\n }\n throw error\n }\n}\n"],"names":["executeAccess","hasWhereAccessResult","combineQueries","APIError","Forbidden","NotFound","deepCopyObjectSimple","runCloudFileUpdate","abortFileOperationScope","beginFileOperationScope","completeFileOperationScope","withLegacyCloudUploadFileData","generateFileData","getLocalizedUploadProperties","getUploadDestination","mergeUploadDataWithDocument","sanitizeUploadData","unlinkTempFiles","appendNonTrashedFilter","assertNoValidationWrite","commitTransaction","hasLocalizeStatusEnabled","httpStatus","initTransaction","killTransaction","resolveSelect","sanitizeSelect","getAllLocalesPublicationStatus","normalizeAllLocalesPublicationStatus","reconcileAllLocalesPublicationStatus","validateAllLocalesPublicationFlags","getLatestCollectionVersion","buildAfterOperation","buildBeforeOperation","updateDocument","updateByIDOperation","incomingArgs","args","hasFileOperationScope","Boolean","collection","config","upload","req","shouldCommit","disableTransaction","overrideAccess","objectKey","prefix","data","file","undefined","_objectKey","publishAllLocales","unpublishAllLocales","initialCollectionConfig","initialAllLocalesPublicationStatus","hasLocalizedStatus","payload","localization","draft","locale","initialAllLocalesPublicationIntent","status","operation","id","autosave","collectionConfig","depth","draftArg","overrideLock","overwriteExistingFiles","populate","publishAllLocalesArg","fallbackLocale","select","incomingSelect","showHiddenFields","trash","unpublishAllLocalesArg","BAD_REQUEST","requestedAllLocalesPublicationStatus","allLocalesPublicationStatus","intent","publicationIntentSurvivedBeforeOperation","accessResults","slug","access","update","hasWherePolicy","where","equals","fullWhere","isTrashAttempt","deletedAt","deleteAccessResult","delete","enableTrash","findOneArgs","docWithLocales","query","t","storedDocWithLocales","fileOperations","doc","defaultLocale","localizedProperties","flattenedFields","newFileData","files","filesToUpload","originalDoc","throwOnMissingFile","fields","updateArgs","shouldManageLocalFiles","write","result","current","auth","catch","unlinkError","logger","error","err","msg"],"mappings":"AAgBA,SAASA,aAAa,QAAQ,8BAA6B;AAC3D,SAASC,oBAAoB,QAAQ,sBAAqB;AAC1D,SAASC,cAAc,QAAQ,mCAAkC;AACjE,SAASC,QAAQ,EAAEC,SAAS,EAAEC,QAAQ,QAAQ,wBAAuB;AACrE,SAA8BC,oBAAoB,QAA0B,iBAAgB;AAC5F,SAASC,kBAAkB,QAAQ,+CAA8C;AACjF,SACEC,uBAAuB,EACvBC,uBAAuB,EACvBC,0BAA0B,QACrB,uDAAsD;AAC7D,SAASC,6BAA6B,QAAQ,8CAA6C;AAC3F,SAASC,gBAAgB,QAAQ,oCAAmC;AACpE,SACEC,4BAA4B,EAC5BC,oBAAoB,EACpBC,2BAA2B,EAC3BC,kBAAkB,QACb,sCAAqC;AAC5C,SAASC,eAAe,QAAQ,mCAAkC;AAClE,SAASC,sBAAsB,QAAQ,4CAA2C;AAClF,SAASC,uBAAuB,QAAQ,6CAA4C;AACpF,SAASC,iBAAiB,QAAQ,uCAAsC;AACxE,SAASC,wBAAwB,QAAQ,uCAAsC;AAC/E,SAASC,UAAU,QAAQ,gCAA+B;AAC1D,SAASC,eAAe,QAAQ,qCAAoC;AACpE,SAASC,eAAe,QAAQ,qCAAoC;AACpE,SAASC,aAAa,QAAQ,mCAAkC;AAChE,SAASC,cAAc,QAAQ,oCAAmC;AAClE,SACEC,8BAA8B,EAC9BC,oCAAoC,EACpCC,oCA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ACxCA,QAAQJ,KAAKM,GAAG,CAACe,OAAO,CAACjB,MAAM;YAC/BE,KAAKN,KAAKM,GAAG;QACf,GAAG6E,KAAK,CAAC,CAACC;YACRpF,KAAKM,GAAG,CAACe,OAAO,CAACgE,MAAM,CAACC,KAAK,CAAC;gBAAEC,KAAKH;gBAAaI,KAAK;YAA6B;QACtF;QACA,MAAMrG,gBAAgBa,KAAKM,GAAG;QAC9B,IAAIL,uBAAuB;YACzB,MAAM9B,wBAAwB;gBAAEmC,KAAKN,KAAKM,GAAG;YAAC;QAChD;QACA,MAAMgF;IACR;AACF,EAAC"}
|
|
1
|
+
{"version":3,"sources":["../../../src/collections/operations/updateByID.ts"],"sourcesContent":["import type { DeepPartial } from 'ts-essentials'\n\nimport type { FindOneArgs } from '../../database/types.js'\nimport type {\n PayloadRequest,\n PopulateType,\n SelectType,\n TransformCollectionWithSelect,\n} from '../../types/index.js'\nimport type {\n Collection,\n RequiredDataFromCollectionSlug,\n SelectFromCollectionSlug,\n TypeWithID,\n} from '../config/types.js'\n\nimport { executeAccess } from '../../auth/executeAccess.js'\nimport { hasWhereAccessResult } from '../../auth/types.js'\nimport { combineQueries } from '../../database/combineQueries.js'\nimport { APIError, Forbidden, NotFound } from '../../errors/index.js'\nimport { type CollectionSlug, deepCopyObjectSimple, type FindOptions } from '../../index.js'\nimport { runCloudFileUpdate } from '../../uploads/fileVersioning/cloudStorage.js'\nimport {\n abortFileOperationScope,\n beginFileOperationScope,\n completeFileOperationScope,\n} from '../../uploads/fileVersioning/fileOperationManager.js'\nimport { withLegacyCloudUploadFileData } from '../../uploads/fileVersioning/storedFiles.js'\nimport { generateFileData } from '../../uploads/generateFileData/index.js'\nimport {\n getLocalizedUploadProperties,\n getUploadDestination,\n mergeUploadDataWithDocument,\n sanitizeUploadData,\n} from '../../uploads/sanitizeUploadData.js'\nimport { unlinkTempFiles } from '../../uploads/unlinkTempFiles.js'\nimport { appendNonTrashedFilter } from '../../utilities/appendNonTrashedFilter.js'\nimport { assertNoValidationWrite } from '../../utilities/assertNoValidationWrite.js'\nimport { commitTransaction } from '../../utilities/commitTransaction.js'\nimport { hasLocalizeStatusEnabled } from '../../utilities/getVersionsConfig.js'\nimport { httpStatus } from '../../utilities/httpStatus.js'\nimport { initTransaction } from '../../utilities/initTransaction.js'\nimport { killTransaction } from '../../utilities/killTransaction.js'\nimport { resolveSelect } from '../../utilities/resolveSelect.js'\nimport { sanitizeSelect } from '../../utilities/sanitizeSelect.js'\nimport {\n getAllLocalesPublicationStatus,\n normalizeAllLocalesPublicationStatus,\n reconcileAllLocalesPublicationStatus,\n validateAllLocalesPublicationFlags,\n} from '../../versions/allLocalesPublicationStatus.js'\nimport { getLatestCollectionVersion } from '../../versions/getLatestCollectionVersion.js'\nimport { buildAfterOperation } from './utilities/buildAfterOperation.js'\nimport { buildBeforeOperation } from './utilities/buildBeforeOperation.js'\nimport { updateDocument } from './utilities/update.js'\n\nexport type Arguments<TSlug extends CollectionSlug> = {\n autosave?: boolean\n collection: Collection\n data: DeepPartial<RequiredDataFromCollectionSlug<TSlug>>\n depth?: number\n disableTransaction?: boolean\n disableVerificationEmail?: boolean\n draft?: boolean\n id: number | string\n overrideAccess?: boolean\n overrideLock?: boolean\n overwriteExistingFiles?: boolean\n populate?: PopulateType\n publishAllLocales?: boolean\n req: PayloadRequest\n showHiddenFields?: boolean\n trash?: boolean\n unpublishAllLocales?: boolean\n} & Pick<FindOptions<TSlug, SelectType>, 'select'>\n\nexport const updateByIDOperation = async <\n TSlug extends CollectionSlug,\n TSelect extends SelectFromCollectionSlug<TSlug> = SelectType,\n>(\n incomingArgs: Arguments<TSlug>,\n): Promise<TransformCollectionWithSelect<TSlug, TSelect>> => {\n let args = incomingArgs\n const hasFileOperationScope = Boolean(args.collection.config.upload)\n\n if (hasFileOperationScope) {\n beginFileOperationScope({ req: args.req })\n }\n\n assertNoValidationWrite(args.req)\n\n try {\n const shouldCommit = !args.disableTransaction && (await initTransaction(args.req))\n\n if (args.collection.config.upload && !args.overrideAccess) {\n const { objectKey, prefix } = getUploadDestination({ data: args.data, file: args.req.file })\n const data = sanitizeUploadData(args.data, 'update')\n\n args = {\n ...args,\n data:\n typeof data === 'object' && data !== null\n ? {\n ...data,\n ...(prefix !== undefined ? { prefix } : {}),\n ...(objectKey !== undefined ? { _objectKey: objectKey } : {}),\n }\n : data,\n }\n }\n\n validateAllLocalesPublicationFlags({\n publishAllLocales: args.publishAllLocales,\n unpublishAllLocales: args.unpublishAllLocales,\n })\n\n const initialCollectionConfig = args.collection.config\n const initialAllLocalesPublicationStatus = getAllLocalesPublicationStatus({\n hasLocalizedStatus: Boolean(\n args.req.payload.config.localization && hasLocalizeStatusEnabled(initialCollectionConfig),\n ),\n publishAllLocales:\n !args.draft &&\n (args.publishAllLocales ??\n (hasLocalizeStatusEnabled(initialCollectionConfig) && args.req.locale !== 'all'\n ? false\n : true)),\n unpublishAllLocales: Boolean(args.unpublishAllLocales),\n })\n\n const initialAllLocalesPublicationIntent = normalizeAllLocalesPublicationStatus({\n data: args.data,\n status: initialAllLocalesPublicationStatus,\n })\n // /////////////////////////////////////\n // beforeOperation - Collection\n // /////////////////////////////////////\n\n args = await buildBeforeOperation({\n args,\n collection: args.collection.config,\n operation: 'update',\n overrideAccess: args.overrideAccess!,\n })\n\n const {\n id,\n autosave = false,\n collection: { config: collectionConfig },\n collection,\n depth,\n draft: draftArg = false,\n overrideAccess,\n overrideLock,\n overwriteExistingFiles = false,\n populate,\n publishAllLocales: publishAllLocalesArg,\n req: {\n fallbackLocale,\n locale,\n payload: { config },\n payload,\n },\n req,\n select: incomingSelect,\n showHiddenFields,\n trash = false,\n unpublishAllLocales: unpublishAllLocalesArg,\n } = args\n\n if (!id) {\n throw new APIError('Missing ID of document to update.', httpStatus.BAD_REQUEST)\n }\n\n let { data } = args\n\n validateAllLocalesPublicationFlags({\n publishAllLocales: publishAllLocalesArg,\n unpublishAllLocales: unpublishAllLocalesArg,\n })\n\n const requestedAllLocalesPublicationStatus = getAllLocalesPublicationStatus({\n hasLocalizedStatus: Boolean(\n config.localization && hasLocalizeStatusEnabled(collectionConfig),\n ),\n publishAllLocales:\n !draftArg &&\n (publishAllLocalesArg ?? !(hasLocalizeStatusEnabled(collectionConfig) && locale !== 'all')),\n unpublishAllLocales: Boolean(unpublishAllLocalesArg),\n })\n const allLocalesPublicationStatus = reconcileAllLocalesPublicationStatus({\n data,\n intent: initialAllLocalesPublicationIntent,\n status: requestedAllLocalesPublicationStatus,\n })\n const publicationIntentSurvivedBeforeOperation =\n !requestedAllLocalesPublicationStatus || Boolean(allLocalesPublicationStatus)\n const publishAllLocales = publicationIntentSurvivedBeforeOperation\n ? publishAllLocalesArg\n : false\n const unpublishAllLocales = publicationIntentSurvivedBeforeOperation\n ? unpublishAllLocalesArg\n : false\n\n // /////////////////////////////////////\n // Access\n // /////////////////////////////////////\n\n const accessResults = !overrideAccess\n ? await executeAccess(\n { id, slug: collectionConfig.slug, data, req },\n collectionConfig.access.update,\n )\n : true\n const hasWherePolicy = hasWhereAccessResult(accessResults)\n\n // /////////////////////////////////////\n // Retrieve document\n // /////////////////////////////////////\n\n const where = { id: { equals: id } }\n\n let fullWhere = combineQueries(where, accessResults)\n\n const isTrashAttempt =\n collectionConfig.trash &&\n typeof data === 'object' &&\n data !== null &&\n 'deletedAt' in data &&\n data.deletedAt != null\n\n if (isTrashAttempt && !overrideAccess) {\n // Pass data so access function can check data.deletedAt to know it's a trash attempt\n const deleteAccessResult = await executeAccess(\n { id, slug: collectionConfig.slug, data, req },\n collectionConfig.access.delete,\n )\n fullWhere = combineQueries(fullWhere, deleteAccessResult)\n }\n\n // Exclude trashed documents when trash: false\n fullWhere = appendNonTrashedFilter({\n enableTrash: collectionConfig.trash,\n trash,\n where: fullWhere,\n })\n\n const findOneArgs: FindOneArgs = {\n collection: collectionConfig.slug,\n locale: locale!,\n req,\n where: fullWhere,\n }\n\n let docWithLocales = await getLatestCollectionVersion<\n RequiredDataFromCollectionSlug<TSlug> & TypeWithID\n >({\n id,\n config: collectionConfig,\n payload,\n query: findOneArgs,\n req,\n })\n\n if (!docWithLocales && !hasWherePolicy) {\n throw new NotFound(req.t)\n }\n if (!docWithLocales && hasWherePolicy) {\n throw new Forbidden(req.t)\n }\n if (!docWithLocales) {\n throw new NotFound(req.t)\n }\n\n const storedDocWithLocales = docWithLocales\n if (collectionConfig.upload.fileOperations) {\n docWithLocales = await withLegacyCloudUploadFileData({\n collection: collectionConfig,\n doc: docWithLocales,\n req,\n })\n }\n\n if (collectionConfig.upload && !overrideAccess) {\n data = mergeUploadDataWithDocument(data, docWithLocales, {\n locale:\n locale === 'all' || !locale\n ? config.localization\n ? config.localization.defaultLocale\n : undefined\n : locale,\n localizedProperties: getLocalizedUploadProperties(collectionConfig.flattenedFields),\n })\n }\n\n // /////////////////////////////////////\n // Generate data for all files and sizes\n // /////////////////////////////////////\n\n const { data: newFileData, files: filesToUpload } = await generateFileData({\n collection,\n config,\n data,\n operation: 'update',\n originalDoc: docWithLocales,\n overwriteExistingFiles,\n req,\n throwOnMissingFile: false,\n })\n\n const select = sanitizeSelect({\n fields: collectionConfig.flattenedFields,\n select: resolveSelect({\n config: collectionConfig.select,\n operation: 'update',\n req,\n select: incomingSelect,\n }),\n })\n\n // ///////////////////////////////////////////////\n // Update document, runs all document level hooks\n // ///////////////////////////////////////////////\n\n const updateArgs = {\n id,\n autosave,\n collectionConfig,\n config,\n data: deepCopyObjectSimple(newFileData),\n depth: depth!,\n docWithLocales,\n draftArg,\n fallbackLocale: fallbackLocale!,\n filesToUpload,\n locale: locale!,\n overrideAccess: overrideAccess!,\n overrideLock: overrideLock!,\n payload,\n populate,\n publishAllLocales,\n req,\n select: select!,\n shouldManageLocalFiles: true,\n showHiddenFields: showHiddenFields!,\n unpublishAllLocales,\n } as const\n\n const write = () => updateDocument<TSlug, TSelect>(updateArgs)\n let result = collectionConfig.upload.fileOperations\n ? await runCloudFileUpdate({\n id,\n collection: collectionConfig,\n current: storedDocWithLocales,\n data: updateArgs.data,\n files: filesToUpload,\n req,\n write,\n })\n : await write()\n\n // /////////////////////////////////////\n // Add collection property for auth collections\n // /////////////////////////////////////\n\n if (collectionConfig.auth) {\n result = { ...result, collection: collectionConfig.slug }\n }\n\n await unlinkTempFiles({\n collectionConfig,\n config,\n req,\n }).catch((unlinkError) => {\n req.payload.logger.error({ err: unlinkError, msg: 'Failed to remove temp file' })\n })\n\n // /////////////////////////////////////\n // afterOperation - Collection\n // /////////////////////////////////////\n\n result = (await buildAfterOperation({\n args,\n collection: collectionConfig,\n operation: 'updateByID',\n overrideAccess,\n result,\n })) as TransformCollectionWithSelect<TSlug, TSelect>\n\n // /////////////////////////////////////\n // Return results\n // /////////////////////////////////////\n\n if (shouldCommit) {\n await commitTransaction(req)\n }\n\n if (hasFileOperationScope) {\n await completeFileOperationScope({ req })\n }\n\n return result\n } catch (error: unknown) {\n await unlinkTempFiles({\n collectionConfig: args.collection.config,\n config: args.req.payload.config,\n req: args.req,\n }).catch((unlinkError) => {\n args.req.payload.logger.error({ err: unlinkError, msg: 'Failed to remove temp file' })\n })\n await killTransaction(args.req)\n if (hasFileOperationScope) {\n await abortFileOperationScope({ req: args.req })\n }\n throw error\n }\n}\n"],"names":["executeAccess","hasWhereAccessResult","combineQueries","APIError","Forbidden","NotFound","deepCopyObjectSimple","runCloudFileUpdate","abortFileOperationScope","beginFileOperationScope","completeFileOperationScope","withLegacyCloudUploadFileData","generateFileData","getLocalizedUploadProperties","getUploadDestination","mergeUploadDataWithDocument","sanitizeUploadData","unlinkTempFiles","appendNonTrashedFilter","assertNoValidationWrite","commitTransaction","hasLocalizeStatusEnabled","httpStatus","initTransaction","killTransaction","resolveSelect","sanitizeSelect","getAllLocalesPublicationStatus","normalizeAllLocalesPublicationStatus","reconcileAllLocalesPublicationStatus","validateAllLocalesPublicationFlags","getLatestCollectionVersion","buildAfterOperation","buildBeforeOperation","updateDocument","updateByIDOperation","incomingArgs","args","hasFileOperationScope","Boolean","collection","config","upload","req","shouldCommit","disableTransaction","overrideAccess","objectKey","prefix","data","file","undefined","_objectKey","publishAllLocales","unpublishAllLocales","initialCollectionConfig","initialAllLocalesPublicationStatus","hasLocalizedStatus","payload","localization","draft","locale","initialAllLocalesPublicationIntent","status","operation","id","autosave","collectionConfig","depth","draftArg","overrideLock","overwriteExistingFiles","populate","publishAllLocalesArg","fallbackLocale","select","incomingSelect","showHiddenFields","trash","unpublishAllLocalesArg","BAD_REQUEST","requestedAllLocalesPublicationStatus","allLocalesPublicationStatus","intent","publicationIntentSurvivedBeforeOperation","accessResults","slug","access","update","hasWherePolicy","where","equals","fullWhere","isTrashAttempt","deletedAt","deleteAccessResult","delete","enableTrash","findOneArgs","docWithLocales","query","t","storedDocWithLocales","fileOperations","doc","defaultLocale","localizedProperties","flattenedFields","newFileData","files","filesToUpload","originalDoc","throwOnMissingFile","fields","updateArgs","shouldManageLocalFiles","write","result","current","auth","catch","unlinkError","logger","error","err","msg"],"mappings":"AAgBA,SAASA,aAAa,QAAQ,8BAA6B;AAC3D,SAASC,oBAAoB,QAAQ,sBAAqB;AAC1D,SAASC,cAAc,QAAQ,mCAAkC;AACjE,SAASC,QAAQ,EAAEC,SAAS,EAAEC,QAAQ,QAAQ,wBAAuB;AACrE,SAA8BC,oBAAoB,QAA0B,iBAAgB;AAC5F,SAASC,kBAAkB,QAAQ,+CAA8C;AACjF,SACEC,uBAAuB,EACvBC,uBAAuB,EACvBC,0BAA0B,QACrB,uDAAsD;AAC7D,SAASC,6BAA6B,QAAQ,8CAA6C;AAC3F,SAASC,gBAAgB,QAAQ,0CAAyC;AAC1E,SACEC,4BAA4B,EAC5BC,oBAAoB,EACpBC,2BAA2B,EAC3BC,kBAAkB,QACb,sCAAqC;AAC5C,SAASC,eAAe,QAAQ,mCAAkC;AAClE,SAASC,sBAAsB,QAAQ,4CAA2C;AAClF,SAASC,uBAAuB,QAAQ,6CAA4C;AACpF,SAASC,iBAAiB,QAAQ,uCAAsC;AACxE,SAASC,wBAAwB,QAAQ,uCAAs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IAAIzE,cAAc;YAChB,MAAMxB,kBAAkBuB;QAC1B;QAEA,IAAIL,uBAAuB;YACzB,MAAM5B,2BAA2B;gBAAEiC;YAAI;QACzC;QAEA,OAAO0E;IACT,EAAE,OAAOM,OAAgB;QACvB,MAAM1G,gBAAgB;YACpBkD,kBAAkB9B,KAAKG,UAAU,CAACC,MAAM;YACxCA,QAAQJ,KAAKM,GAAG,CAACe,OAAO,CAACjB,MAAM;YAC/BE,KAAKN,KAAKM,GAAG;QACf,GAAG6E,KAAK,CAAC,CAACC;YACRpF,KAAKM,GAAG,CAACe,OAAO,CAACgE,MAAM,CAACC,KAAK,CAAC;gBAAEC,KAAKH;gBAAaI,KAAK;YAA6B;QACtF;QACA,MAAMrG,gBAAgBa,KAAKM,GAAG;QAC9B,IAAIL,uBAAuB;YACzB,MAAM9B,wBAAwB;gBAAEmC,KAAKN,KAAKM,GAAG;YAAC;QAChD;QACA,MAAMgF;IACR;AACF,EAAC"}
|
|
@@ -23,7 +23,7 @@ export { parseRangeHeader } from '../uploads/parseRangeHeader.js';
|
|
|
23
23
|
export { externalURLInputSchema, resolveURLUploadInput } from '../uploads/resolveURLUploadInput.js';
|
|
24
24
|
export type { ExternalURLInput } from '../uploads/resolveURLUploadInput.js';
|
|
25
25
|
export { getUploadFilePath, getUploadTransformerInternal, setUploadFilePath, uploadTransformerInternal, } from '../uploads/transformers/uploadTransformerBridge.js';
|
|
26
|
-
export type {
|
|
26
|
+
export type { TransformerWithInternalBridge, UploadTransformation, UploadTransformerInternal, UploadTransformTask, } from '../uploads/transformers/uploadTransformerBridge.js';
|
|
27
27
|
export { uploadContentSecurityPolicy } from '../uploads/uploadContentSecurityPolicy.js';
|
|
28
28
|
export { batchProcessing, type BatchProcessingOptions, type BatchProcessorResult, } from '../utilities/batchProcessing.js';
|
|
29
29
|
export { getEntityPermissions } from '../utilities/getEntityPermissions/getEntityPermissions.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internal.d.ts","s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EAAE,MAAM,qCAAqC,CAAA;AAC3E,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAA;AACnE,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAA;AACjE,OAAO,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,MAAM,qCAAqC,CAAA;AACnG,YAAY,EAAE,gBAAgB,EAAE,MAAM,qCAAqC,CAAA;AAC3E,OAAO,EACL,iBAAiB,EACjB,4BAA4B,EAC5B,iBAAiB,EACjB,yBAAyB,GAC1B,MAAM,oDAAoD,CAAA;AAC3D,YAAY,EACV,6BAA6B,EAC7B,oBAAoB,EACpB,yBAAyB,EACzB,mBAAmB,GACpB,MAAM,oDAAoD,CAAA;AAC3D,OAAO,EAAE,2BAA2B,EAAE,MAAM,2CAA2C,CAAA;AACvF,OAAO,EACL,eAAe,EACf,KAAK,sBAAsB,EAC3B,KAAK,oBAAoB,GAC1B,MAAM,iCAAiC,CAAA;AACxC,OAAO,EAAE,oBAAoB,EAAE,MAAM,2DAA2D,CAAA;AAChG,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAA;AACvD,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAA;AAC3D,OAAO,EAAE,mBAAmB,EAAE,MAAM,qCAAqC,CAAA;AACzE,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/exports/internal.ts"],"sourcesContent":["/**\n * Modules exported here are not part of the public API and are subject to change without notice and without a major version bump.\n */\n\nexport {\n type AdminContextCache,\n initAdminContext,\n type InitAdminContextArgs,\n type PartialAdminContext,\n} from '../admin/initAdminContext.js'\nexport { applyUserReadAccess } from '../auth/applyUserReadAccess.js'\nexport { createCLI } from '../cli/index.js'\nexport { getCommandInput } from '../cli/runtime/getCommandInput.js'\nexport { createSchemaBuildContext } from '../database/createSchemaBuildContext.js'\nexport type { SchemaBuildContext } from '../database/createSchemaBuildContext.js'\nexport { getLLMInstructions } from '../llm-instructions/getInstructions.js'\nexport { assertClientUploadAccess } from '../uploads/assertClientUploadAccess.js'\nexport { assertClientUploadAllowed } from '../uploads/assertClientUploadAllowed.js'\nexport {\n createClientUploadReceipt,\n resignClientUploadReceipt,\n verifyClientUploadReceipt,\n} from '../uploads/clientUploadReceipt.js'\nexport { downloadFileToBuffer } from '../uploads/downloadFileToBuffer.js'\nexport { getUploadInstructions } from '../uploads/endpoints/uploadInstructions.js'\nexport { getFileFromUploadInstructions } from '../uploads/getFileFromUploadInstructions.js'\nexport { isXmlMimeType } from '../uploads/getFileTypeIdentity.js'\nexport { getRangeRequestInfo } from '../uploads/getRangeRequestInfo.js'\nexport { getSafeFileName, incrementName } from '../uploads/getSafeFilename.js'\nexport { isOriginalFileRequest } from '../uploads/isOriginalFileRequest.js'\nexport { isRequestTimeFile } from '../uploads/isRequestTimeFile.js'\nexport { parseRangeHeader } from '../uploads/parseRangeHeader.js'\nexport { externalURLInputSchema, resolveURLUploadInput } from '../uploads/resolveURLUploadInput.js'\nexport type { ExternalURLInput } from '../uploads/resolveURLUploadInput.js'\nexport {\n getUploadFilePath,\n getUploadTransformerInternal,\n setUploadFilePath,\n uploadTransformerInternal,\n} from '../uploads/transformers/uploadTransformerBridge.js'\nexport type {\n
|
|
1
|
+
{"version":3,"sources":["../../src/exports/internal.ts"],"sourcesContent":["/**\n * Modules exported here are not part of the public API and are subject to change without notice and without a major version bump.\n */\n\nexport {\n type AdminContextCache,\n initAdminContext,\n type InitAdminContextArgs,\n type PartialAdminContext,\n} from '../admin/initAdminContext.js'\nexport { applyUserReadAccess } from '../auth/applyUserReadAccess.js'\nexport { createCLI } from '../cli/index.js'\nexport { getCommandInput } from '../cli/runtime/getCommandInput.js'\nexport { createSchemaBuildContext } from '../database/createSchemaBuildContext.js'\nexport type { SchemaBuildContext } from '../database/createSchemaBuildContext.js'\nexport { getLLMInstructions } from '../llm-instructions/getInstructions.js'\nexport { assertClientUploadAccess } from '../uploads/assertClientUploadAccess.js'\nexport { assertClientUploadAllowed } from '../uploads/assertClientUploadAllowed.js'\nexport {\n createClientUploadReceipt,\n resignClientUploadReceipt,\n verifyClientUploadReceipt,\n} from '../uploads/clientUploadReceipt.js'\nexport { downloadFileToBuffer } from '../uploads/downloadFileToBuffer.js'\nexport { getUploadInstructions } from '../uploads/endpoints/uploadInstructions.js'\nexport { getFileFromUploadInstructions } from '../uploads/getFileFromUploadInstructions.js'\nexport { isXmlMimeType } from '../uploads/getFileTypeIdentity.js'\nexport { getRangeRequestInfo } from '../uploads/getRangeRequestInfo.js'\nexport { getSafeFileName, incrementName } from '../uploads/getSafeFilename.js'\nexport { isOriginalFileRequest } from '../uploads/isOriginalFileRequest.js'\nexport { isRequestTimeFile } from '../uploads/isRequestTimeFile.js'\nexport { parseRangeHeader } from '../uploads/parseRangeHeader.js'\nexport { externalURLInputSchema, resolveURLUploadInput } from '../uploads/resolveURLUploadInput.js'\nexport type { ExternalURLInput } from '../uploads/resolveURLUploadInput.js'\nexport {\n getUploadFilePath,\n getUploadTransformerInternal,\n setUploadFilePath,\n uploadTransformerInternal,\n} from '../uploads/transformers/uploadTransformerBridge.js'\nexport type {\n TransformerWithInternalBridge,\n UploadTransformation,\n UploadTransformerInternal,\n UploadTransformTask,\n} from '../uploads/transformers/uploadTransformerBridge.js'\nexport { uploadContentSecurityPolicy } from '../uploads/uploadContentSecurityPolicy.js'\nexport {\n batchProcessing,\n type BatchProcessingOptions,\n type BatchProcessorResult,\n} from '../utilities/batchProcessing.js'\nexport { getEntityPermissions } from '../utilities/getEntityPermissions/getEntityPermissions.js'\nexport { httpStatus } from '../utilities/httpStatus.js'\nexport { isURLAllowed } from '../utilities/isURLAllowed.js'\nexport { sanitizePermissions } from '../utilities/sanitizePermissions.js'\nexport { sendTelemetryEvent } from '../utilities/telemetry/index.js'\n"],"names":["initAdminContext","applyUserReadAccess","createCLI","getCommandInput","createSchemaBuildContext","getLLMInstructions","assertClientUploadAccess","assertClientUploadAllowed","createClientUploadReceipt","resignClientUploadReceipt","verifyClientUploadReceipt","downloadFileToBuffer","getUploadInstructions","getFileFromUploadInstructions","isXmlMimeType","getRangeRequestInfo","getSafeFileName","incrementName","isOriginalFileRequest","isRequestTimeFile","parseRangeHeader","externalURLInputSchema","resolveURLUploadInput","getUploadFilePath","getUploadTransformerInternal","setUploadFilePath","uploadTransformerInternal","uploadContentSecurityPolicy","batchProcessing","getEntityPermissions","httpStatus","isURLAllowed","sanitizePermissions","sendTelemetryEvent"],"mappings":"AAAA;;CAEC,GAED,SAEEA,gBAAgB,QAGX,+BAA8B;AACrC,SAASC,mBAAmB,QAAQ,iCAAgC;AACpE,SAASC,SAAS,QAAQ,kBAAiB;AAC3C,SAASC,eAAe,QAAQ,oCAAmC;AACnE,SAASC,wBAAwB,QAAQ,0CAAyC;AAElF,SAASC,kBAAkB,QAAQ,yCAAwC;AAC3E,SAASC,wBAAwB,QAAQ,yCAAwC;AACjF,SAASC,yBAAyB,QAAQ,0CAAyC;AACnF,SACEC,yBAAyB,EACzBC,yBAAyB,EACzBC,yBAAyB,QACpB,oCAAmC;AAC1C,SAASC,oBAAoB,QAAQ,qCAAoC;AACzE,SAASC,qBAAqB,QAAQ,6CAA4C;AAClF,SAASC,6BAA6B,QAAQ,8CAA6C;AAC3F,SAASC,aAAa,QAAQ,oCAAmC;AACjE,SAASC,mBAAmB,QAAQ,oCAAmC;AACvE,SAASC,eAAe,EAAEC,aAAa,QAAQ,gCAA+B;AAC9E,SAASC,qBAAqB,QAAQ,sCAAqC;AAC3E,SAASC,iBAAiB,QAAQ,kCAAiC;AACnE,SAASC,gBAAgB,QAAQ,iCAAgC;AACjE,SAASC,sBAAsB,EAAEC,qBAAqB,QAAQ,sCAAqC;AAEnG,SACEC,iBAAiB,EACjBC,4BAA4B,EAC5BC,iBAAiB,EACjBC,yBAAyB,QACpB,qDAAoD;AAO3D,SAASC,2BAA2B,QAAQ,4CAA2C;AACvF,SACEC,eAAe,QAGV,kCAAiC;AACxC,SAASC,oBAAoB,QAAQ,4DAA2D;AAChG,SAASC,UAAU,QAAQ,6BAA4B;AACvD,SAASC,YAAY,QAAQ,+BAA8B;AAC3D,SAASC,mBAAmB,QAAQ,sCAAqC;AACzE,SAASC,kBAAkB,QAAQ,kCAAiC"}
|
package/dist/index.bundled.d.ts
CHANGED
|
@@ -1116,6 +1116,10 @@ type UserSession = {
|
|
|
1116
1116
|
createdAt?: Date | null | string;
|
|
1117
1117
|
expiresAt: Date | string;
|
|
1118
1118
|
id: string;
|
|
1119
|
+
/** What the session is, for people to read, e.g. "Claude Code" or "Chrome on macOS". */
|
|
1120
|
+
label?: null | string;
|
|
1121
|
+
/** More to show next to the label, e.g. `{ redirectHost: 'claude.ai' }`. Never anything secret. */
|
|
1122
|
+
metadata?: null | Record<string, unknown>;
|
|
1119
1123
|
/**
|
|
1120
1124
|
* How many times the session was refreshed with a refresh token. Refresh tokens remember it, so
|
|
1121
1125
|
* the latest one can be told apart from older ones.
|
|
@@ -1123,6 +1127,11 @@ type UserSession = {
|
|
|
1123
1127
|
refreshCount?: null | number;
|
|
1124
1128
|
/** When the session was last refreshed with a refresh token. */
|
|
1125
1129
|
refreshedAt?: Date | null | string;
|
|
1130
|
+
/**
|
|
1131
|
+
* How the session was created: `'login'` for a sign-in, or e.g. `'mcp'` for an MCP client the
|
|
1132
|
+
* user allowed. Plugins can use their own values.
|
|
1133
|
+
*/
|
|
1134
|
+
type?: null | string;
|
|
1126
1135
|
};
|
|
1127
1136
|
type GenerateVerifyEmailHTML<TUser = any> = (args: {
|
|
1128
1137
|
req: PayloadRequest;
|
|
@@ -13310,7 +13319,7 @@ declare const verificationFields: Field[];
|
|
|
13310
13319
|
* Starts a login session for the user and signs the JWT for it, the same token a password login
|
|
13311
13320
|
* returns. Payload's JWT strategy accepts it. The session is saved on the user right away.
|
|
13312
13321
|
*/
|
|
13313
|
-
declare const createAuthToken: ({ collectionConfig, email, req, shouldCreateRefreshToken, user, }: {
|
|
13322
|
+
declare const createAuthToken: ({ type, collectionConfig, email, label, metadata, req, shouldCreateRefreshToken, user, }: {
|
|
13314
13323
|
collectionConfig: SanitizedCollectionConfig;
|
|
13315
13324
|
/** The `email` claim of the token. */
|
|
13316
13325
|
email: string;
|
|
@@ -13322,7 +13331,7 @@ declare const createAuthToken: ({ collectionConfig, email, req, shouldCreateRefr
|
|
|
13322
13331
|
*/
|
|
13323
13332
|
shouldCreateRefreshToken?: boolean;
|
|
13324
13333
|
user: AuthenticatedUser;
|
|
13325
|
-
}) => Promise<{
|
|
13334
|
+
} & Pick<UserSession, "label" | "metadata" | "type">) => Promise<{
|
|
13326
13335
|
exp: number;
|
|
13327
13336
|
refreshToken?: string;
|
|
13328
13337
|
/**
|
|
@@ -13413,12 +13422,12 @@ type Result<TData> = {
|
|
|
13413
13422
|
};
|
|
13414
13423
|
declare const registerFirstUserOperation: <TSlug extends AuthCollectionSlug>(args: Arguments$7<TSlug>) => Promise<Result<DataFromCollectionSlug<TSlug>>>;
|
|
13415
13424
|
|
|
13416
|
-
type Args$
|
|
13425
|
+
type Args$i = {
|
|
13417
13426
|
collection: Collection;
|
|
13418
13427
|
req: PayloadRequest;
|
|
13419
13428
|
token: string;
|
|
13420
13429
|
};
|
|
13421
|
-
declare const verifyEmailOperation: (args: Args$
|
|
13430
|
+
declare const verifyEmailOperation: (args: Args$i) => Promise<boolean>;
|
|
13422
13431
|
|
|
13423
13432
|
/**
|
|
13424
13433
|
* Trades a refresh token from `createAuthToken` or an earlier refresh for a new token and a new
|
|
@@ -13507,20 +13516,20 @@ declare const rotateSecret: ({ batchSize, collections, dryRun, oldSecret, payloa
|
|
|
13507
13516
|
*/
|
|
13508
13517
|
declare const JWTAuthentication: AuthStrategyFunction;
|
|
13509
13518
|
|
|
13510
|
-
type Args$
|
|
13519
|
+
type Args$h = {
|
|
13511
13520
|
collection: SanitizedCollectionConfig;
|
|
13512
13521
|
payload: Payload;
|
|
13513
13522
|
user: User;
|
|
13514
13523
|
};
|
|
13515
|
-
declare const incrementLoginAttempts: ({ collection, payload, user, }: Args$
|
|
13524
|
+
declare const incrementLoginAttempts: ({ collection, payload, user, }: Args$h) => Promise<void>;
|
|
13516
13525
|
|
|
13517
|
-
type Args$
|
|
13526
|
+
type Args$g = {
|
|
13518
13527
|
collection: SanitizedCollectionConfig;
|
|
13519
13528
|
doc: Record<string, unknown> & TypeWithID;
|
|
13520
13529
|
payload: Payload;
|
|
13521
13530
|
req: PayloadRequest;
|
|
13522
13531
|
};
|
|
13523
|
-
declare const resetLoginAttempts: ({ collection, doc, payload, req, }: Args$
|
|
13532
|
+
declare const resetLoginAttempts: ({ collection, doc, payload, req, }: Args$g) => Promise<void>;
|
|
13524
13533
|
|
|
13525
13534
|
declare function genImportMapIterateFields({ addToImportMap, baseDir, config, fields, importMap, imports, }: {
|
|
13526
13535
|
addToImportMap: AddToImportMap;
|
|
@@ -14676,7 +14685,7 @@ declare const writeMigrationIndex: (args: {
|
|
|
14676
14685
|
migrationsDir: string;
|
|
14677
14686
|
}) => void;
|
|
14678
14687
|
|
|
14679
|
-
type Args$
|
|
14688
|
+
type Args$f = {
|
|
14680
14689
|
errors?: {
|
|
14681
14690
|
path: string;
|
|
14682
14691
|
}[];
|
|
@@ -14694,9 +14703,9 @@ type Args$h = {
|
|
|
14694
14703
|
collectionConfig?: never | undefined;
|
|
14695
14704
|
globalConfig: SanitizedGlobalConfig;
|
|
14696
14705
|
});
|
|
14697
|
-
declare function validateQueryPaths({ collectionConfig, errors, globalConfig, overrideAccess, policies, polymorphicJoin, req, showHiddenFields, versionFields, where, }: Args$
|
|
14706
|
+
declare function validateQueryPaths({ collectionConfig, errors, globalConfig, overrideAccess, policies, polymorphicJoin, req, showHiddenFields, versionFields, where, }: Args$f): Promise<void>;
|
|
14698
14707
|
|
|
14699
|
-
type Args$
|
|
14708
|
+
type Args$e = {
|
|
14700
14709
|
collectionConfig?: SanitizedCollectionConfig;
|
|
14701
14710
|
constraint: WhereField;
|
|
14702
14711
|
errors: {
|
|
@@ -14718,7 +14727,7 @@ type Args$g = {
|
|
|
14718
14727
|
/**
|
|
14719
14728
|
* Validate the Payload key / value / operator
|
|
14720
14729
|
*/
|
|
14721
|
-
declare function validateSearchParam({ collectionConfig, constraint, errors, fields, globalConfig, operator, overrideAccess, parentIsLocalized, path: incomingPath, policies, polymorphicJoin, req, showHiddenFields, val, versionFields, }: Args$
|
|
14730
|
+
declare function validateSearchParam({ collectionConfig, constraint, errors, fields, globalConfig, operator, overrideAccess, parentIsLocalized, path: incomingPath, policies, polymorphicJoin, req, showHiddenFields, val, versionFields, }: Args$e): Promise<void>;
|
|
14722
14731
|
|
|
14723
14732
|
type AuthorshipFieldArgs = {
|
|
14724
14733
|
/**
|
|
@@ -14745,7 +14754,7 @@ declare const baseBlockFields: Field[];
|
|
|
14745
14754
|
|
|
14746
14755
|
declare const baseIDField: TextField;
|
|
14747
14756
|
|
|
14748
|
-
type Args$
|
|
14757
|
+
type Args$d = {
|
|
14749
14758
|
collection: SanitizedCollectionConfig;
|
|
14750
14759
|
field: string;
|
|
14751
14760
|
/** Exclude this doc from the check, so a regenerate can reuse its own value. */
|
|
@@ -14762,7 +14771,7 @@ type Args$f = {
|
|
|
14762
14771
|
* The format is: `<singular>-<N>`, where `N` is the first available integer. Uses the collection's singular
|
|
14763
14772
|
* label when it resolves to a plain string, otherwise the collection slug. See {@link getUniqueFieldValue}.
|
|
14764
14773
|
*/
|
|
14765
|
-
declare const getSlugFallbackValue: ({ id, collection, field, locale, overrideAccess, req, slugify, }: Args$
|
|
14774
|
+
declare const getSlugFallbackValue: ({ id, collection, field, locale, overrideAccess, req, slugify, }: Args$d) => Promise<string>;
|
|
14766
14775
|
|
|
14767
14776
|
/**
|
|
14768
14777
|
* Info about an orderable join field, collected during sanitization
|
|
@@ -14873,16 +14882,16 @@ type SanitizeFieldResult = {
|
|
|
14873
14882
|
declare const sanitizeField: ({ collectionConfig, config, existingFieldNames, field, globalConfig, index, isTopLevelField, joinPath, joins, orderableJoins, parentIndexPath, parentIsLocalized, parentSchemaPath, polymorphicJoins, requireFieldLevelRichTextEditor, richTextSanitizers, validRelationships, }: SanitizeFieldArgs) => SanitizeFieldResult;
|
|
14874
14883
|
declare const sanitizeFields: ({ collectionConfig, config, existingFieldNames, fields, globalConfig, isTopLevelField, joinPath, joins, orderableJoins, parentIndexPath, parentIsLocalized, parentSchemaPath, polymorphicJoins, requireFieldLevelRichTextEditor, richTextSanitizers, validRelationships, }: SanitizeFieldsArgs) => Field[];
|
|
14875
14884
|
|
|
14876
|
-
type Args$
|
|
14885
|
+
type Args$c = {
|
|
14877
14886
|
defaultValue: DefaultValue;
|
|
14878
14887
|
locale: string | undefined;
|
|
14879
14888
|
req: PayloadRequest;
|
|
14880
14889
|
user: PayloadRequest['user'];
|
|
14881
14890
|
value?: JsonValue;
|
|
14882
14891
|
};
|
|
14883
|
-
declare const getDefaultValue: ({ defaultValue, locale, req, user, value, }: Args$
|
|
14892
|
+
declare const getDefaultValue: ({ defaultValue, locale, req, user, value, }: Args$c) => Promise<JsonValue>;
|
|
14884
14893
|
|
|
14885
|
-
type Args$
|
|
14894
|
+
type Args$b = {
|
|
14886
14895
|
/**
|
|
14887
14896
|
* Data of the nearest parent block. If no parent block exists, this will be the `undefined`
|
|
14888
14897
|
*/
|
|
@@ -14908,9 +14917,9 @@ type Args$d = {
|
|
|
14908
14917
|
siblingDoc: JsonObject;
|
|
14909
14918
|
siblingFields?: (Field | TabAsField)[];
|
|
14910
14919
|
};
|
|
14911
|
-
declare const traverseFields$4: ({ blockData, collection, context, data, doc, fields, global, operation, parentIndexPath, parentIsLocalized, parentPath, parentSchemaPath, previousDoc, previousSiblingDoc, req, siblingData, siblingDoc, siblingFields, }: Args$
|
|
14920
|
+
declare const traverseFields$4: ({ blockData, collection, context, data, doc, fields, global, operation, parentIndexPath, parentIsLocalized, parentPath, parentSchemaPath, previousDoc, previousSiblingDoc, req, siblingData, siblingDoc, siblingFields, }: Args$b) => Promise<void>;
|
|
14912
14921
|
|
|
14913
|
-
type Args$
|
|
14922
|
+
type Args$a = {
|
|
14914
14923
|
/**
|
|
14915
14924
|
* Data of the nearest parent block. If no parent block exists, this will be the `undefined`
|
|
14916
14925
|
*/
|
|
@@ -14958,9 +14967,9 @@ type Args$c = {
|
|
|
14958
14967
|
triggerAccessControl?: boolean;
|
|
14959
14968
|
triggerHooks?: boolean;
|
|
14960
14969
|
} & Required<Pick<AfterReadArgs<JsonObject>, 'flattenLocales'>>;
|
|
14961
|
-
declare const promise: ({ blockData, collection, context, currentDepth, depth, doc, draft, fallbackLocale, field, fieldDepth, fieldIndex, fieldPromises, findMany, flattenLocales, global, locale, overrideAccess, parentIndexPath, parentIsLocalized, parentPath, parentSchemaPath, populate, populationPromises, req, select, selectMode, showHiddenFields, siblingDoc, siblingFields, triggerAccessControl, triggerHooks, }: Args$
|
|
14970
|
+
declare const promise: ({ blockData, collection, context, currentDepth, depth, doc, draft, fallbackLocale, field, fieldDepth, fieldIndex, fieldPromises, findMany, flattenLocales, global, locale, overrideAccess, parentIndexPath, parentIsLocalized, parentPath, parentSchemaPath, populate, populationPromises, req, select, selectMode, showHiddenFields, siblingDoc, siblingFields, triggerAccessControl, triggerHooks, }: Args$a) => Promise<void>;
|
|
14962
14971
|
|
|
14963
|
-
type Args$
|
|
14972
|
+
type Args$9 = {
|
|
14964
14973
|
/**
|
|
14965
14974
|
* Data of the nearest parent block. If no parent block exists, this will be the `undefined`
|
|
14966
14975
|
*/
|
|
@@ -15007,9 +15016,9 @@ type Args$b = {
|
|
|
15007
15016
|
triggerAccessControl?: boolean;
|
|
15008
15017
|
triggerHooks?: boolean;
|
|
15009
15018
|
};
|
|
15010
|
-
declare const traverseFields$3: ({ blockData, collection, context, currentDepth, depth, doc, draft, fallbackLocale, fieldDepth, fieldPromises, fields, findMany, flattenLocales, global, locale, overrideAccess, parentIndexPath, parentIsLocalized, parentPath, parentSchemaPath, populate, populationPromises, req, select, selectMode, showHiddenFields, siblingDoc, triggerAccessControl, triggerHooks, }: Args$
|
|
15019
|
+
declare const traverseFields$3: ({ blockData, collection, context, currentDepth, depth, doc, draft, fallbackLocale, fieldDepth, fieldPromises, fields, findMany, flattenLocales, global, locale, overrideAccess, parentIndexPath, parentIsLocalized, parentPath, parentSchemaPath, populate, populationPromises, req, select, selectMode, showHiddenFields, siblingDoc, triggerAccessControl, triggerHooks, }: Args$9) => void;
|
|
15011
15020
|
|
|
15012
|
-
type Args$
|
|
15021
|
+
type Args$8 = {
|
|
15013
15022
|
/**
|
|
15014
15023
|
* Data of the nearest parent block. If no parent block exists, this will be the `undefined`
|
|
15015
15024
|
*/
|
|
@@ -15069,9 +15078,9 @@ type Args$a = {
|
|
|
15069
15078
|
* - Transform data for storage
|
|
15070
15079
|
* - Unflatten locales. The input `data` is the normal document for one locale. The output result will become the document with locales.
|
|
15071
15080
|
*/
|
|
15072
|
-
declare const traverseFields$2: ({ id, blockData, blockFields, collection, context, data, doc, docWithLocales, errors, fieldLabelPath, fields, global, isValidationOperation, mergeLocaleActions, operation, overrideAccess, parentIndexPath, parentIsLocalized, parentPath, parentSchemaPath, req, siblingData, siblingDoc, siblingDocWithLocales, skipHooks, skipValidation, submittedTopLevelFieldNames, }: Args$
|
|
15081
|
+
declare const traverseFields$2: ({ id, blockData, blockFields, collection, context, data, doc, docWithLocales, errors, fieldLabelPath, fields, global, isValidationOperation, mergeLocaleActions, operation, overrideAccess, parentIndexPath, parentIsLocalized, parentPath, parentSchemaPath, req, siblingData, siblingDoc, siblingDocWithLocales, skipHooks, skipValidation, submittedTopLevelFieldNames, }: Args$8) => Promise<void>;
|
|
15073
15082
|
|
|
15074
|
-
type Args$
|
|
15083
|
+
type Args$7<T> = {
|
|
15075
15084
|
/**
|
|
15076
15085
|
* Data of the nearest parent block. If no parent block exists, this will be the `undefined`
|
|
15077
15086
|
*/
|
|
@@ -15107,7 +15116,7 @@ type Args$9<T> = {
|
|
|
15107
15116
|
*/
|
|
15108
15117
|
siblingDoc: JsonObject;
|
|
15109
15118
|
};
|
|
15110
|
-
declare const traverseFields$1: <T>({ id, blockData, collection, context, data, doc, docForHooks, fields, global, onFieldAccess, operation, overrideAccess, parentIndexPath, parentIsLocalized, parentPath, parentSchemaPath, req, siblingData, siblingDoc, }: Args$
|
|
15119
|
+
declare const traverseFields$1: <T>({ id, blockData, collection, context, data, doc, docForHooks, fields, global, onFieldAccess, operation, overrideAccess, parentIndexPath, parentIsLocalized, parentPath, parentSchemaPath, req, siblingData, siblingDoc, }: Args$7<T>) => Promise<void>;
|
|
15111
15120
|
|
|
15112
15121
|
declare const sortableFieldTypes: string[];
|
|
15113
15122
|
|
|
@@ -15526,7 +15535,7 @@ type Arguments = {
|
|
|
15526
15535
|
};
|
|
15527
15536
|
declare const restoreVersionOperation: <T extends JsonObject = any>(args: Arguments) => Promise<T>;
|
|
15528
15537
|
|
|
15529
|
-
type Args$
|
|
15538
|
+
type Args$6<TSlug extends GlobalSlug> = {
|
|
15530
15539
|
autosave?: boolean;
|
|
15531
15540
|
data: DeepPartial<Omit<DataFromGlobalSlug<TSlug>, 'id'>>;
|
|
15532
15541
|
depth?: number;
|
|
@@ -15542,7 +15551,7 @@ type Args$8<TSlug extends GlobalSlug> = {
|
|
|
15542
15551
|
slug: string;
|
|
15543
15552
|
unpublishAllLocales?: boolean;
|
|
15544
15553
|
} & Pick<FindOptions<string, SelectType>, 'select'>;
|
|
15545
|
-
declare const updateOperation: <TSlug extends GlobalSlug, TSelect extends SelectFromGlobalSlug<TSlug>>(args: Args$
|
|
15554
|
+
declare const updateOperation: <TSlug extends GlobalSlug, TSelect extends SelectFromGlobalSlug<TSlug>>(args: Args$6<TSlug>) => Promise<TransformGlobalWithSelect<TSlug, TSelect>>;
|
|
15546
15555
|
|
|
15547
15556
|
/**
|
|
15548
15557
|
* Default field names and constants for hierarchy feature
|
|
@@ -15937,7 +15946,7 @@ type CreatePayloadRequestArgs = {
|
|
|
15937
15946
|
type CreatePayloadRequest = (args: CreatePayloadRequestArgs) => Promise<PayloadRequest>;
|
|
15938
15947
|
declare const createPayloadRequest: CreatePayloadRequest;
|
|
15939
15948
|
|
|
15940
|
-
type Args$
|
|
15949
|
+
type Args$5 = {
|
|
15941
15950
|
canSetHeaders?: boolean;
|
|
15942
15951
|
config: Promise<SanitizedConfig> | SanitizedConfig;
|
|
15943
15952
|
params?: {
|
|
@@ -15952,7 +15961,7 @@ type Args$7 = {
|
|
|
15952
15961
|
*/
|
|
15953
15962
|
shouldAuthenticate?: boolean;
|
|
15954
15963
|
};
|
|
15955
|
-
declare const createPayloadRequestFromWebRequest: ({ canSetHeaders, config: configPromise, params, payloadInstanceCacheKey, request, shouldAuthenticate, }: Args$
|
|
15964
|
+
declare const createPayloadRequestFromWebRequest: ({ canSetHeaders, config: configPromise, params, payloadInstanceCacheKey, request, shouldAuthenticate, }: Args$5) => Promise<PayloadRequest>;
|
|
15956
15965
|
|
|
15957
15966
|
declare const deepCopyObject: <T>(o: T) => T;
|
|
15958
15967
|
/**
|
|
@@ -16257,7 +16266,7 @@ type GetRequestLanguageArgs = {
|
|
|
16257
16266
|
};
|
|
16258
16267
|
declare const getRequestLanguage: ({ config, cookies, headers, }: GetRequestLanguageArgs) => AcceptedLanguages;
|
|
16259
16268
|
|
|
16260
|
-
type Args$
|
|
16269
|
+
type Args$4 = {
|
|
16261
16270
|
collection: string;
|
|
16262
16271
|
/** Also treat a value taken by a draft-only version as unavailable. */
|
|
16263
16272
|
draftsEnabled?: boolean;
|
|
@@ -16280,7 +16289,7 @@ type Args$6 = {
|
|
|
16280
16289
|
* Returns the first available value for `field` in `collection` — either the bare `value` or a
|
|
16281
16290
|
* `value-N` variant. Useful when a unique field value is minted outside the operation pipeline.
|
|
16282
16291
|
*/
|
|
16283
|
-
declare const getUniqueFieldValue: ({ id, collection, draftsEnabled, field, locale, overrideAccess, req, startIndex, value, }: Args$
|
|
16292
|
+
declare const getUniqueFieldValue: ({ id, collection, draftsEnabled, field, locale, overrideAccess, req, startIndex, value, }: Args$4) => Promise<string>;
|
|
16284
16293
|
|
|
16285
16294
|
type EntityConfig = Pick<CollectionConfig | GlobalConfig, 'versions'>;
|
|
16286
16295
|
/**
|
|
@@ -16468,7 +16477,7 @@ type ParsedParams = {
|
|
|
16468
16477
|
*/
|
|
16469
16478
|
declare const parseParams: (params: RawParams) => ParsedParams;
|
|
16470
16479
|
|
|
16471
|
-
interface Args$
|
|
16480
|
+
interface Args$3 {
|
|
16472
16481
|
fallbackLocale: TypedFallbackLocale;
|
|
16473
16482
|
locale: string;
|
|
16474
16483
|
localization: SanitizedLocalizationConfig;
|
|
@@ -16481,7 +16490,7 @@ interface Args$5 {
|
|
|
16481
16490
|
* - determines if a locale specific fallback should be used in place of the default locale
|
|
16482
16491
|
* - sets the fallbackLocale to 'null' if no fallback locale should be used
|
|
16483
16492
|
*/
|
|
16484
|
-
declare const sanitizeFallbackLocale: ({ fallbackLocale, locale, localization, }: Args$
|
|
16493
|
+
declare const sanitizeFallbackLocale: ({ fallbackLocale, locale, localization, }: Args$3) => TypedFallbackLocale;
|
|
16485
16494
|
|
|
16486
16495
|
/**
|
|
16487
16496
|
* Sanitizes REST populate query to PopulateType
|
|
@@ -16582,7 +16591,7 @@ declare const versionDefaults: {
|
|
|
16582
16591
|
autosaveInterval: number;
|
|
16583
16592
|
};
|
|
16584
16593
|
|
|
16585
|
-
type Args$
|
|
16594
|
+
type Args$2 = {
|
|
16586
16595
|
id?: number | string;
|
|
16587
16596
|
/**
|
|
16588
16597
|
* Delete the versions of many parent documents at once. Takes precedence over `id`.
|
|
@@ -16598,7 +16607,7 @@ type Args$4 = {
|
|
|
16598
16607
|
* @internal - this may break or be removed at any time. It is exported from the package root only
|
|
16599
16608
|
* so that Payload 2.x `payload/versions` imports keep resolving, not as an API to build on.
|
|
16600
16609
|
*/
|
|
16601
|
-
declare const deleteCollectionVersions: ({ id, slug, ids, payload, req, }: Args$
|
|
16610
|
+
declare const deleteCollectionVersions: ({ id, slug, ids, payload, req, }: Args$2) => Promise<void>;
|
|
16602
16611
|
|
|
16603
16612
|
declare const appendVersionToQueryKey: (query?: Where) => Where;
|
|
16604
16613
|
|
|
@@ -16611,7 +16620,7 @@ declare const getQueryDraftsSort: ({ collectionConfig, sort, }: {
|
|
|
16611
16620
|
sort?: Sort;
|
|
16612
16621
|
}) => Sort;
|
|
16613
16622
|
|
|
16614
|
-
type Args$
|
|
16623
|
+
type Args$1 = {
|
|
16615
16624
|
collection?: SanitizedCollectionConfig;
|
|
16616
16625
|
global?: SanitizedGlobalConfig;
|
|
16617
16626
|
id?: number | string;
|
|
@@ -16619,31 +16628,7 @@ type Args$3 = {
|
|
|
16619
16628
|
payload: Payload;
|
|
16620
16629
|
req?: PayloadRequest;
|
|
16621
16630
|
};
|
|
16622
|
-
declare const enforceMaxVersions: ({ id, collection, global: globalConfig, max, payload, req, }: Args$
|
|
16623
|
-
|
|
16624
|
-
type Args$2 = {
|
|
16625
|
-
config: SanitizedCollectionConfig;
|
|
16626
|
-
id: number | string;
|
|
16627
|
-
payload: Payload;
|
|
16628
|
-
published?: boolean;
|
|
16629
|
-
query: FindOneArgs;
|
|
16630
|
-
req?: PayloadRequest;
|
|
16631
|
-
};
|
|
16632
|
-
declare const getLatestCollectionVersion: <T extends TypeWithID = any>({ id, config, payload, published, query, req, }: Args$2) => Promise<T | undefined>;
|
|
16633
|
-
|
|
16634
|
-
type Args$1 = {
|
|
16635
|
-
config: SanitizedGlobalConfig;
|
|
16636
|
-
locale?: string;
|
|
16637
|
-
payload: Payload;
|
|
16638
|
-
published?: boolean;
|
|
16639
|
-
req?: PayloadRequest;
|
|
16640
|
-
slug: string;
|
|
16641
|
-
where: Where;
|
|
16642
|
-
};
|
|
16643
|
-
declare const getLatestGlobalVersion: ({ slug, config, locale, payload, published, req, where, }: Args$1) => Promise<{
|
|
16644
|
-
global: Document;
|
|
16645
|
-
globalExists: boolean;
|
|
16646
|
-
}>;
|
|
16631
|
+
declare const enforceMaxVersions: ({ id, collection, global: globalConfig, max, payload, req, }: Args$1) => Promise<void>;
|
|
16647
16632
|
|
|
16648
16633
|
type Args<T extends JsonObject = JsonObject> = {
|
|
16649
16634
|
autosave?: boolean;
|
|
@@ -17249,5 +17234,5 @@ interface GlobalAdminCustom extends Record<string, any> {
|
|
|
17249
17234
|
interface GlobalAdminCustom extends Record<string, any> {
|
|
17250
17235
|
}
|
|
17251
17236
|
|
|
17252
|
-
export { APIError, APIErrorName, Action, AuthenticationError, BasePayload, DEFAULT_ALLOW_HAS_MANY, DEFAULT_HIERARCHY_TREE_LIMIT, DatabaseKVAdapter, DuplicateCollection, DuplicateFieldName, DuplicateGlobal, EntityType, ErrorDeletingFile, FileRetrievalError, FileUploadError, Forbidden, HIERARCHY_DEFAULT_LOCALE, HIERARCHY_SLUG_PATH_FIELD, HIERARCHY_TITLE_PATH_FIELD, InMemoryKVAdapter, InvalidConfiguration, InvalidFieldName, InvalidFieldRelationship, JWTAuthentication, JWT_AUTH_VERSION, JobCancelledError, Locked, LockedAuth, MissingCollectionLabel, MissingEditorProp, MissingFieldInputOptions, MissingFieldType, MissingFile, NotFound, QueryError, TransformerContractError, UnauthorizedError, UnverifiedEmail, ValidationError, ValidationErrorName, _internal_jobSystemGlobals, _internal_resetJobSystemGlobals, _internal_safeFetchGlobal, accessOperation, addDataAndFileToRequest, addDefaultsToConfig, addLocalesToRequestFromData, traverseFields$4 as afterChangeTraverseFields, promise as afterReadPromise, traverseFields$3 as afterReadTraverseFields, appendVersionToQueryKey, accountLockFields as baseAccountLockFields, baseAuthFields, baseBlockFields, emailFieldConfig as baseEmailField, baseIDField, sessionsFieldConfig as baseSessionsField, usernameFieldConfig as baseUsernameField, verificationFields as baseVerificationFields, batchProcessing, traverseFields$2 as beforeChangeTraverseFields, traverseFields$1 as beforeValidateTraverseFields, buildConfig, buildVersionCollectionFields, buildVersionCompoundIndexes, buildVersionGlobalFields, canAccessAdmin, checkDependencies, checkLoginPermission, combineQueries, commitTransaction, configToJSONSchema, countDocumentsInputSchema, countDocumentsLocalInputSchema, countGlobalVersionsInputSchema, countGlobalVersionsLocalInputSchema, countOperation, countRunnableOrActiveJobsForQueue, countVersionsInputSchema, countVersionsLocalInputSchema, createAPIKeyFields, createArrayFromCommaDelineated, createAuthToken, createClientBlocks, createClientCollectionConfig, createClientCollectionConfigs, createClientConfig, createClientField, createClientFields, createClientGlobalConfig, createClientGlobalConfigs, createCreatedByField, createDatabaseAdapter, createDataloaderCacheKey, createDocumentsInputSchema, createDocumentsLocalInputSchema, createFolderField, createMigration, createOperation, createPayloadRequest, createPayloadRequestFromWebRequest, createTagField, createUnauthenticatedClientConfig, createUpdatedByField, databaseKVAdapter, deepCopyObject, deepCopyObjectComplex, deepCopyObjectSimple, deepMergeSimple, deepMergeWithCombinedArrays, deepMergeWithReactComponents, deepMergeWithSourceArrays, initialized as default, defaultBeginTransaction, defaultLoggerOptions, defaultUserCollection, definePlugin, deleteByIDOperation, deleteCollectionVersions, deleteDocumentsInputSchema, deleteDocumentsLocalInputSchema, deleteOperation, docAccessOperation$1 as docAccessOperation, docAccessOperation as docAccessOperationGlobal, docHasTimestamps, duplicateDocumentInputSchema, duplicateDocumentLocalInputSchema, duplicateOperation, dynamicImport, enforceMaxVersions, entityToJSONSchema, entityToStandaloneJSONSchema, escapeRegExp, executeAccess, executeAuthStrategies, extractAccessFromPermission, extractJWT, fieldsToJSONSchema, findByIDOperation, findDistinctInputSchema, findDistinctLocalInputSchema, findDocumentsInputSchema, findDocumentsLocalInputSchema, findGlobalInputSchema, findGlobalLocalInputSchema, findGlobalVersionByIDInputSchema, findGlobalVersionByIDLocalInputSchema, findGlobalVersionsInputSchema, findGlobalVersionsLocalInputSchema, findMigrationDir, findOneOperation, findOperation, findUp, findUpSync, findVersionByIDInputSchema, findVersionByIDLocalInputSchema, findVersionByIDOperation$1 as findVersionByIDOperation, findVersionByIDOperation as findVersionByIDOperationGlobal, findVersionsInputSchema, findVersionsLocalInputSchema, findVersionsOperation$1 as findVersionsOperation, findVersionsOperation as findVersionsOperationGlobal, flattenAllFields, flattenTopLevelFields, flattenWhereToOperators, forgotPasswordOperation, formatErrors, formatLabels, formatNames, genImportMapIterateFields, generateCookie, generateExpiredPayloadCookie, generateImportMap, generatePayloadCookie, generatePayloadFileURL, getAccessResults, getAncestors, getBlockSelect, getCollectionIDFieldTypes, getCollectionInputSchema, getCollectionSchemaInputSchema, getCollectionVirtualFieldNames, getConfigInfoInputSchema, getCookieExpiration, getCurrentDate, getDataLoader, getDefaultValue, getDependencies, getFieldByPath, getFieldsToSign, getFileByPath, getGlobalInputSchema, getGlobalSchemaInputSchema, getGlobalVirtualFieldNames, getHierarchyFieldName, getInitialTreeData,
|
|
17237
|
+
export { APIError, APIErrorName, Action, AuthenticationError, BasePayload, DEFAULT_ALLOW_HAS_MANY, DEFAULT_HIERARCHY_TREE_LIMIT, DatabaseKVAdapter, DuplicateCollection, DuplicateFieldName, DuplicateGlobal, EntityType, ErrorDeletingFile, FileRetrievalError, FileUploadError, Forbidden, HIERARCHY_DEFAULT_LOCALE, HIERARCHY_SLUG_PATH_FIELD, HIERARCHY_TITLE_PATH_FIELD, InMemoryKVAdapter, InvalidConfiguration, InvalidFieldName, InvalidFieldRelationship, JWTAuthentication, JWT_AUTH_VERSION, JobCancelledError, Locked, LockedAuth, MissingCollectionLabel, MissingEditorProp, MissingFieldInputOptions, MissingFieldType, MissingFile, NotFound, QueryError, TransformerContractError, UnauthorizedError, UnverifiedEmail, ValidationError, ValidationErrorName, _internal_jobSystemGlobals, _internal_resetJobSystemGlobals, _internal_safeFetchGlobal, accessOperation, addDataAndFileToRequest, addDefaultsToConfig, addLocalesToRequestFromData, traverseFields$4 as afterChangeTraverseFields, promise as afterReadPromise, traverseFields$3 as afterReadTraverseFields, appendVersionToQueryKey, accountLockFields as baseAccountLockFields, baseAuthFields, baseBlockFields, emailFieldConfig as baseEmailField, baseIDField, sessionsFieldConfig as baseSessionsField, usernameFieldConfig as baseUsernameField, verificationFields as baseVerificationFields, batchProcessing, traverseFields$2 as beforeChangeTraverseFields, traverseFields$1 as beforeValidateTraverseFields, buildConfig, buildVersionCollectionFields, buildVersionCompoundIndexes, buildVersionGlobalFields, canAccessAdmin, checkDependencies, checkLoginPermission, combineQueries, commitTransaction, configToJSONSchema, countDocumentsInputSchema, countDocumentsLocalInputSchema, countGlobalVersionsInputSchema, countGlobalVersionsLocalInputSchema, countOperation, countRunnableOrActiveJobsForQueue, countVersionsInputSchema, countVersionsLocalInputSchema, createAPIKeyFields, createArrayFromCommaDelineated, createAuthToken, createClientBlocks, createClientCollectionConfig, createClientCollectionConfigs, createClientConfig, createClientField, createClientFields, createClientGlobalConfig, createClientGlobalConfigs, createCreatedByField, createDatabaseAdapter, createDataloaderCacheKey, createDocumentsInputSchema, createDocumentsLocalInputSchema, createFolderField, createMigration, createOperation, createPayloadRequest, createPayloadRequestFromWebRequest, createTagField, createUnauthenticatedClientConfig, createUpdatedByField, databaseKVAdapter, deepCopyObject, deepCopyObjectComplex, deepCopyObjectSimple, deepMergeSimple, deepMergeWithCombinedArrays, deepMergeWithReactComponents, deepMergeWithSourceArrays, initialized as default, defaultBeginTransaction, defaultLoggerOptions, defaultUserCollection, definePlugin, deleteByIDOperation, deleteCollectionVersions, deleteDocumentsInputSchema, deleteDocumentsLocalInputSchema, deleteOperation, docAccessOperation$1 as docAccessOperation, docAccessOperation as docAccessOperationGlobal, docHasTimestamps, duplicateDocumentInputSchema, duplicateDocumentLocalInputSchema, duplicateOperation, dynamicImport, enforceMaxVersions, entityToJSONSchema, entityToStandaloneJSONSchema, escapeRegExp, executeAccess, executeAuthStrategies, extractAccessFromPermission, extractJWT, fieldsToJSONSchema, findByIDOperation, findDistinctInputSchema, findDistinctLocalInputSchema, findDocumentsInputSchema, findDocumentsLocalInputSchema, findGlobalInputSchema, findGlobalLocalInputSchema, findGlobalVersionByIDInputSchema, findGlobalVersionByIDLocalInputSchema, findGlobalVersionsInputSchema, findGlobalVersionsLocalInputSchema, findMigrationDir, findOneOperation, findOperation, findUp, findUpSync, findVersionByIDInputSchema, findVersionByIDLocalInputSchema, findVersionByIDOperation$1 as findVersionByIDOperation, findVersionByIDOperation as findVersionByIDOperationGlobal, findVersionsInputSchema, findVersionsLocalInputSchema, findVersionsOperation$1 as findVersionsOperation, findVersionsOperation as findVersionsOperationGlobal, flattenAllFields, flattenTopLevelFields, flattenWhereToOperators, forgotPasswordOperation, formatErrors, formatLabels, formatNames, genImportMapIterateFields, generateCookie, generateExpiredPayloadCookie, generateImportMap, generatePayloadCookie, generatePayloadFileURL, getAccessResults, getAncestors, getBlockSelect, getCollectionIDFieldTypes, getCollectionInputSchema, getCollectionSchemaInputSchema, getCollectionVirtualFieldNames, getConfigInfoInputSchema, getCookieExpiration, getCurrentDate, getDataLoader, getDefaultValue, getDependencies, getFieldByPath, getFieldsToSign, getFileByPath, getGlobalInputSchema, getGlobalSchemaInputSchema, getGlobalVirtualFieldNames, getHierarchyFieldName, getInitialTreeData, getLocalI18n, getLocalizedPaths, getLoginOptions, getMigrations, getObjectDotNotation, getPayload, getPredefinedMigration, getQueryDraftsSort, getRegisteredDevReloadStrategy, getRequestLanguage, getSlugFallbackValue, getUniqueFieldValue, handleEndpoints, hasDraftValidationEnabled, hasDraftsEnabled, hasWhereAccessResult, headersWithCors, importHandlerPath, inMemoryKVAdapter, incrementLoginAttempts, initOperation, initTransaction, injectHierarchyButton, isEntityHidden, isPlainObject, isUserMenuSettingsGroup, isValidID, isolateObjectProperty, jobAfterRead, jwtSign, killTransaction, logError, loginOperation, logoutOperation, mapAsync, meOperation, mergeHeaders, migrate, migrateDown, migrateRefresh, migrateReset, migrateStatus, migrationTemplate, migrationsCollection, parseCookies, parseDocumentID, parseParams, pathExistsAndIsAccessible, pathExistsAndIsAccessibleSync, readMigrationFiles, redeemRefreshToken, refreshOperation, registerBlockInterface, registerCLIExitCodeHandler, registerDevReloadStrategy, registerFirstUserOperation, registerUploadVariants, reload, renameFileOperation, resetLoginAttempts, resetPasswordOperation, resolveHierarchyCollections, restoreGlobalVersionInputSchema, restoreGlobalVersionLocalInputSchema, restoreVersionInputSchema, restoreVersionLocalInputSchema, restoreVersionOperation$1 as restoreVersionOperation, restoreVersionOperation as restoreVersionOperationGlobal, rotateSecret, sanitizeConfig, sanitizeFallbackLocale, sanitizeField, sanitizeFields, sanitizeJoinParams, sanitizeLocales, sanitizePopulateParam, sanitizeSelectParam, sanitizeSortParams, saveVersion, serverOnlyAdminConfigProperties, serverOnlyConfigProperties, serverProps, sortableFieldTypes, strictObject, stripUnselectedFields, stripVirtualFields, toWords, transformPointDataToPayload, traverseFields, unlockOperation, updateByIDOperation, updateDocumentInputSchema, updateDocumentLocalInputSchema, updateGlobalInputSchema, updateGlobalLocalInputSchema, updateOperation$1 as updateOperation, updateOperation as updateOperationGlobal, validateBlocksFilterOptions, validateCollectionData, validateGlobalData, validateQueryPaths, validateSearchParam, validations, verifyEmailOperation, versionDefaults, withNullableJSONSchemaType, writeMigrationIndex };
|
|
17253
17238
|
export type { Access, AccessArgs, AccessResult, AdminClient, AdminComponent, AdminContext, AdminDependencies, AdminFunction, AdminView, AdminViewAdapter, AdminViewClientProps, AdminViewComponent, AdminViewConfig, AdminViewKey, AdminViewServerProps as AdminViewProps, AdminViewServerProps, AdminViewServerPropsOnly, AfterErrorHook$1 as AfterErrorHook, AfterErrorHookArgs, AfterErrorResult, AfterListClientProps, AfterListServerProps, AfterListServerPropsOnly, AfterListTableClientProps, AfterListTableServerProps, AfterListTableServerPropsOnly, AllOperations, AllowList, Ancestor, ApplyDisableErrors, ArrayField, ArrayFieldClient, ArrayFieldClientProps, ArrayFieldDescriptionClientProps, ArrayFieldDescriptionServerProps, ArrayFieldDiffClientProps, ArrayFieldDiffServerProps, ArrayFieldErrorClientProps, ArrayFieldErrorServerProps, ArrayFieldLabelClientProps, ArrayFieldLabelServerProps, ArrayFieldServerProps, ArrayFieldValidation, Auth, AuthCollection, AuthCollectionSlug, AuthOperations, AuthOperationsFromCollectionSlug, AuthRuntimeFields, AuthStrategy, AuthStrategyFunction, AuthStrategyFunctionArgs, AuthStrategyResult, AuthenticatedUser, Authorship, BaseAccess, BaseDatabaseAdapter, BaseFilter, BaseListFilter, BaseLocalizationConfig, BaseValidateOptions, BaseVersionField, BatchProcessing, BatchProcessingArgs, BatchProcessingOperation, BatchProcessingOptions, BatchProcessingResult, BatchProcessorResult, BeforeDocumentControlsClientProps, BeforeDocumentControlsServerProps, BeforeDocumentControlsServerPropsOnly, BeforeListClientProps, BeforeListServerProps, BeforeListServerPropsOnly, BeforeListTableClientProps, BeforeListTableServerProps, BeforeListTableServerPropsOnly, BeforeValidateOperation, BeginTransaction, Block, BlockJSX, BlockPermissions, BlockRowLabelClientProps, BlockRowLabelServerProps, BlockSlug, BlocksField, BlocksFieldClient, BlocksFieldClientProps, BlocksFieldDescriptionClientProps, BlocksFieldDescriptionServerProps, BlocksFieldDiffClientProps, BlocksFieldDiffServerProps, BlocksFieldErrorClientProps, BlocksFieldErrorServerProps, BlocksFieldLabelClientProps, BlocksFieldLabelServerProps, BlocksFieldServerProps, BlocksFieldValidation, BlocksPermissions, BrowserAutoComplete, BuildFormStateArgs, BuildTableStateArgs, BulkOperationResult, CLICommand, CLICommandDescription, CLICommandEntry, CLICommandResult, CLICommands, CLIExitCodeHandler, CLIFieldOverride, CLIGlobalOptionDescription, CLIHelp, CLIInputSchema, CLIRuntime, CORSConfig, CanTransformArgs, CanTransformResult, CheckboxField, CheckboxFieldClient, CheckboxFieldClientProps, CheckboxFieldDescriptionClientProps, CheckboxFieldDescriptionServerProps, CheckboxFieldDiffClientProps, CheckboxFieldDiffServerProps, CheckboxFieldErrorClientProps, CheckboxFieldErrorServerProps, CheckboxFieldLabelClientProps, CheckboxFieldLabelServerProps, CheckboxFieldServerProps, CheckboxFieldValidation, ClientBlock, ClientCollectionConfig, ClientComponentProps, ClientConfig, ClientField, ClientFieldBase, ClientFieldProps, ClientFieldSchemaMap, ClientFieldWithOptionalType, ClientGlobalConfig, DocumentViewClientProps as ClientSideEditViewProps, ClientTab, ClientWidget, CodeField, CodeFieldClient, CodeFieldClientProps, CodeFieldDescriptionClientProps, CodeFieldDescriptionServerProps, CodeFieldDiffClientProps, CodeFieldDiffServerProps, CodeFieldErrorClientProps, CodeFieldErrorServerProps, CodeFieldLabelClientProps, CodeFieldLabelServerProps, CodeFieldServerProps, CodeFieldValidation, CollapsedPreferences, CollapsibleField, CollapsibleFieldClient, CollapsibleFieldClientProps, CollapsibleFieldDescriptionClientProps, CollapsibleFieldDescriptionServerProps, CollapsibleFieldDiffClientProps, CollapsibleFieldDiffServerProps, CollapsibleFieldErrorClientProps, CollapsibleFieldErrorServerProps, CollapsibleFieldLabelClientProps, CollapsibleFieldLabelServerProps, CollapsibleFieldServerProps, Collection, CollectionAccess, CollectionAdminCustom, CollectionAdminOptions, AfterChangeHook as CollectionAfterChangeHook, AfterDeleteHook as CollectionAfterDeleteHook, AfterErrorHook as CollectionAfterErrorHook, AfterForgotPasswordHook as CollectionAfterForgotPasswordHook, AfterLoginHook as CollectionAfterLoginHook, AfterLogoutHook as CollectionAfterLogoutHook, AfterMeHook as CollectionAfterMeHook, AfterOperationHook as CollectionAfterOperationHook, AfterReadHook as CollectionAfterReadHook, AfterRefreshHook as CollectionAfterRefreshHook, BeforeChangeHook as CollectionBeforeChangeHook, BeforeDeleteHook as CollectionBeforeDeleteHook, BeforeLoginHook as CollectionBeforeLoginHook, BeforeOperationHook as CollectionBeforeOperationHook, BeforeReadHook as CollectionBeforeReadHook, BeforeValidateHook as CollectionBeforeValidateHook, CollectionConfig, CollectionCustom, MeHook as CollectionMeHook, CollectionPermission, CollectionPreferences, RefreshHook as CollectionRefreshHook, CollectionSlug, Column, ColumnPreference, CommitTransaction, ComponentRenderer, CompoundIndex, ConcurrencyConfig, Condition, ConditionalDateProps, Config, ConfirmPasswordFieldValidation, Connect, CookieOptions$1 as CookieOptions, CookieStore, Copy, CopyArgs, Count, CountArgs, CountGlobalVersionArgs, CountGlobalVersions, CountVersions, Create, CreateArgs, CreateClientConfigArgs, CreateFolderFieldOptions, CreateGlobal, CreateGlobalArgs, CreateGlobalVersion, CreateGlobalVersionArgs, CreateMigration, CreateMigrationResult, CreatePayloadRequestArgs, CreateTagFieldOptions, CreateVersion, CreateVersionArgs, Crop, CurrentHierarchyItem, CustomComponent, CustomDocumentViewConfig, CustomPayloadRequestProperties, CustomComponent as CustomPreviewButton, CustomComponent as CustomPublishButton, CustomComponent as CustomSaveButton, CustomComponent as CustomSaveDraftButton, CustomStatus, CustomUpload, CustomVersionParser, DBIdentifierName, DashboardConfig, Data, DataFromCollectionSlug, DataFromGlobalSlug, DataFromWidgetSlug, DatabaseAdapter, DatabaseAdapterResult as DatabaseAdapterObj, DatabaseKVAdapterOptions, DateField, DateFieldClient, DateFieldClientProps, DateFieldDescriptionClientProps, DateFieldDescriptionServerProps, DateFieldDiffClientProps, DateFieldDiffServerProps, DateFieldErrorClientProps, DateFieldErrorServerProps, DateFieldLabelClientProps, DateFieldLabelServerProps, DateFieldServerProps, DateFieldValidation, DayPickerProps, DefaultCellComponentProps, DefaultDocumentIDType, DefaultDocumentViewConfig, DefaultServerCellComponentProps, DefaultServerFunctionArgs, DefaultValue, DeleteMany, DeleteManyArgs, DeleteOne, DeleteOneArgs, DeleteVersions, DeleteVersionsArgs, Description, DescriptionFunction, Destroy, DevReloadCleanup, DevReloadStrategy, Document, DocumentEvent, DocumentPermissions, DocumentPreferences, DocumentSlots, DocumentSubViewTypes, DocumentTabClientProps, DocumentTabComponent, DocumentTabCondition, DocumentTabConfig, DocumentTabServerProps as DocumentTabProps, DocumentTabServerProps, DocumentTabServerPropsOnly, DocumentViewClientProps, DocumentViewComponent, DocumentViewConfig, DocumentViewServerProps, DocumentViewServerPropsOnly, DraftTransformCollectionWithSelect, DynamicMigrationTemplate, EditConfig, EditConfigWithRoot, EditConfigWithoutRoot, EditMenuItemsClientProps, EditMenuItemsServerProps, EditMenuItemsServerPropsOnly, EditViewComponent, EditViewConfig, EditViewProps, EmailAdapter, EmailField, EmailFieldClient, EmailFieldClientProps, EmailFieldDescriptionClientProps, EmailFieldDescriptionServerProps, EmailFieldDiffClientProps, EmailFieldDiffServerProps, EmailFieldErrorClientProps, EmailFieldErrorServerProps, EmailFieldLabelClientProps, EmailFieldLabelServerProps, EmailFieldServerProps, EmailFieldValidation, Endpoint, EntityDescription, EntityDescriptionComponent, EntityDescriptionFunction, EntityInputSchema, EntityPolicies, ErrorResult, ExternalFileHeaderFilterContext, FetchAPIFileUploadOptions, Field, FieldAccess, FieldAccessArgs, FieldAffectingData, FieldAffectingDataClient, FieldBase, FieldBaseClient, FieldClientProps, FieldCustom, FieldDescriptionClientProps, FieldDescriptionServerProps, FieldDiffClientProps, FieldDiffServerProps, FieldErrorClientProps, FieldErrorServerProps, FieldHook, FieldHookArgs, FieldLabelClientProps, FieldLabelServerProps, FieldOperation, FieldPaths, FieldPermissions, FieldPosition, FieldPresentationalOnly, FieldPresentationalOnlyClient, FieldRow, FieldSchemaMap, FieldServerProps, FieldState, FieldTypes, FieldWithMany, FieldWithManyClient, FieldWithMaxDepth, FieldWithMaxDepthClient, FieldWithPath, FieldWithPathClient, FieldWithSubFields, FieldWithSubFieldsClient, FieldsPermissions, FieldsPreferences, FieldsToJSONSchemaArgs, File$1 as File, FileAllowList, FileData, FileHandlerOperation, FileSize, FileSizes, FileSource, FileToSave, FilterOptions, FilterOptionsProps, FilterOptionsResult, Find, FindArgs, FindDistinct, FindGlobal, FindGlobalArgs, FindGlobalVersions, FindGlobalVersionsArgs, FindOne, FindOneArgs, FindOptions, FindVersions, FindVersionsArgs, FlattenedArrayField, FlattenedBlock, FlattenedBlocksField, FlattenedField$1 as FlattenedField, FlattenedGroupField, FlattenedJoinField, FlattenedTabAsField, FocalPoint, FoldersConfig, FieldState as FormField, FieldStateWithoutComponents as FormFieldWithoutComponents, FormState, FormStateWithoutComponents, GenerateImageName, GeneratePreviewURL, GenerateSchema, GenerateUploadInstructions, GenerateViewMetadata, GeneratedTypes, GenericDescriptionProps, GenericErrorProps, GenericLabelProps, GetAdminThumbnail, GetInitialTreeDataArgs, GlobalAccess, GlobalAdminCustom, GlobalAdminOptions, AfterChangeHook$1 as GlobalAfterChangeHook, AfterReadHook$1 as GlobalAfterReadHook, BeforeChangeHook$1 as GlobalBeforeChangeHook, BeforeOperationHook$1 as GlobalBeforeOperationHook, BeforeReadHook$1 as GlobalBeforeReadHook, BeforeValidateHook$1 as GlobalBeforeValidateHook, GlobalConfig, GlobalCustom, GlobalPermission, GlobalSlug, GlobalUploadConfig, GraphQLExtension, GraphQLInfo, GroupField, GroupFieldClient, GroupFieldClientProps, GroupFieldDescriptionClientProps, GroupFieldDescriptionServerProps, GroupFieldDiffClientProps, GroupFieldDiffServerProps, GroupFieldErrorClientProps, GroupFieldErrorServerProps, GroupFieldLabelClientProps, GroupFieldLabelServerProps, GroupFieldServerProps, HandleTransformRequestArgs, HandleTransformRequestResult, HasManyRelationshipOperator, HiddenFieldProps, HierarchyConfig, HierarchyViewData, HookName, HookOperationType, IDTypeForCollectionSlug, IfAny, ImageSize, ImportMap, ImportMapGenerators, IncomingAuthType, Init, InitOptions, InitPageResult, InitialTreeData, InsideFieldsPreferences, IsAny, JSONField, JSONFieldClient, JSONFieldClientProps, JSONFieldDescriptionClientProps, JSONFieldDescriptionServerProps, JSONFieldDiffClientProps, JSONFieldDiffServerProps, JSONFieldErrorClientProps, JSONFieldErrorServerProps, JSONFieldLabelClientProps, JSONFieldLabelServerProps, JSONFieldServerProps, JSONFieldValidation, JWTAuthVersion, Job, JobLog, JobTaskStatus, JobsConfig, JoinField, JoinFieldClient, JoinFieldClientProps, JoinFieldDescriptionClientProps, JoinFieldDescriptionServerProps, JoinFieldDiffClientProps, JoinFieldDiffServerProps, JoinFieldErrorClientProps, JoinFieldErrorServerProps, JoinFieldLabelClientProps, JoinFieldLabelServerProps, JoinFieldServerProps, JoinParams, JoinQuery, JsonArray, JsonObject, JsonValue, KVAdapter, KVAdapterResult, KVStoreValue, LabelFunction, Labels, LabelsClient, LanguageOptions, LinkAdapterProps, CollectionPreferences as ListPreferences, ListQuery, ListViewClientProps, ListViewGroup, ListViewServerProps, ListViewServerPropsOnly, ListViewSlotSharedClientProps, ListViewSlots, LivePreviewConfig, LivePreviewURLType, Locale, LocalizationConfig, LocalizationConfigWithLabels, LocalizationConfigWithNoLabels, LoginResult, LoginWithUsernameOptions, MappedClientComponent, MappedEmptyComponent, MappedServerComponent, MarkdownRichTextAdapter, MarkdownRichTextAdapterProvider, MaybePromise, MeOperationResult, MetaConfig, Migration, MigrationData, MigrationResult, MigrationStatus, MigrationTemplateArgs, NamedGroupField, NamedGroupFieldClient, NamedTab, NavGroupPreferences, NavPreferences, NoResultsClientProps, NoResultsServerProps, NoResultsServerPropsOnly, NonPresentationalField, NonPresentationalFieldClient, NumberField, NumberFieldClient, NumberFieldClientProps, NumberFieldDescriptionClientProps, NumberFieldDescriptionServerProps, NumberFieldDiffClientProps, NumberFieldDiffServerProps, NumberFieldErrorClientProps, NumberFieldErrorServerProps, NumberFieldLabelClientProps, NumberFieldLabelServerProps, NumberFieldManyValidation, NumberFieldServerProps, NumberFieldSingleValidation, NumberFieldValidation, OGImageConfig, Operation, Operator, Option, OptionLabel, OptionObject, OrderableEndpointBody, OriginalFileData, PaginatedDistinctDocs, PaginatedDocs, Params, ParsedParams, PasswordFieldValidation, PathToQuery, Payload, PayloadClientComponentProps, PayloadClientReactComponent, PayloadComponent, PayloadComponentProps, EmailAdapter as PayloadEmailAdapter, PayloadHandler, PayloadLogger, PayloadReactComponent, PayloadRequest, PayloadRequestAPI, PayloadServerAction, PayloadServerComponentProps, PayloadServerReactComponent, PayloadTypes, PayloadTypesShape, Permission, Permissions, PickPreserveOptional, PinnedDocument, PinnedDocumentsPreferences, Plugin, PluginsMap, PointField, PointFieldClient, PointFieldClientProps, PointFieldDescriptionClientProps, PointFieldDescriptionServerProps, PointFieldDiffClientProps, PointFieldDiffServerProps, PointFieldErrorClientProps, PointFieldErrorServerProps, PointFieldLabelClientProps, PointFieldLabelServerProps, PointFieldServerProps, PointFieldValidation, PolymorphicRelationshipField, PolymorphicRelationshipFieldClient, PopulateType, PreferenceRequest, PreferenceUpdateRequest, PreviewButtonClientProps, PreviewButtonServerProps, PreviewButtonServerPropsOnly, ProbedImageSize, PublishButtonClientProps, PublishButtonServerProps, PublishButtonServerPropsOnly, QueryDrafts, QueryDraftsArgs, QueryPreset, RadioField, RadioFieldClient, RadioFieldClientProps, RadioFieldDescriptionClientProps, RadioFieldDescriptionServerProps, RadioFieldDiffClientProps, RadioFieldDiffServerProps, RadioFieldErrorClientProps, RadioFieldErrorServerProps, RadioFieldLabelClientProps, RadioFieldLabelServerProps, RadioFieldServerProps, RadioFieldValidation, RawParams, RawPayloadComponent, RecentlyViewedItem, RecentlyViewedPreferences, RegisteredImageSizeOptions, RegisteredPlugins, RelatedDocumentsGrouped, RelationshipField, RelationshipFieldClient, RelationshipFieldClientProps, RelationshipFieldDescriptionClientProps, RelationshipFieldDescriptionServerProps, RelationshipFieldDiffClientProps, RelationshipFieldDiffServerProps, RelationshipFieldErrorClientProps, RelationshipFieldErrorServerProps, RelationshipFieldLabelClientProps, RelationshipFieldLabelServerProps, RelationshipFieldManyValidation, RelationshipFieldServerProps, RelationshipFieldSingleValidation, RelationshipFieldValidation, RelationshipValue, RenderConfigArgs, RenderDocumentVersionsProperties, RenderEntityConfigArgs, RenderFieldConfigArgs, RenderRootConfigArgs, RenderedField, ReplaceAny, RequestContext, RequiredDataFromCollection, RequiredDataFromCollectionSlug, ResolvedComponent, ResolvedFilterOptions, RichTextAdapter, RichTextAdapterProvider, RichTextField, RichTextFieldClient, RichTextFieldClientProps, RichTextFieldDescriptionClientProps, RichTextFieldDescriptionServerProps, RichTextFieldDiffClientProps, RichTextFieldDiffServerProps, RichTextFieldErrorClientProps, RichTextFieldErrorServerProps, RichTextFieldLabelClientProps, RichTextFieldLabelServerProps, RichTextFieldServerProps, RichTextFieldValidation, RichTextHooks, RollbackTransaction, RootLivePreviewConfig, RotateSecretArgs, RotateSecretResult, RouterAdapterComponent, RouterAdapterRouter, Row, RowField, RowFieldClient, RowFieldClientProps, RowFieldDescriptionClientProps, RowFieldDescriptionServerProps, RowFieldDiffClientProps, RowFieldDiffServerProps, RowFieldErrorClientProps, RowFieldErrorServerProps, RowFieldLabelClientProps, RowFieldLabelServerProps, RowFieldServerProps, RowLabel, RowLabelComponent, RunInlineTaskFunction, RunJobAccess, RunJobAccessArgs, RunTaskFunction, RunTaskFunctions, SanitizeFieldArgs, SanitizedAuthorship, SanitizedBlockPermissions, SanitizedBlocksPermissions, SanitizedCollectionConfig, SanitizedCollectionPermission, SanitizedCompoundIndex, SanitizedConfig, SanitizedDashboardConfig, SanitizedDocumentPermissions, SanitizedFieldPermissions, SanitizedFieldsPermissions, SanitizedGlobalConfig, SanitizedGlobalPermission, SanitizedHierarchyConfig, SanitizedHierarchyRelatedCollection, SanitizedJoins, SanitizedLabelProps, SanitizedLocalizationConfig, SanitizedPermissions, SanitizedUploadConfig, SaveButtonClientProps, SaveButtonServerProps, SaveButtonServerPropsOnly, SaveDraftButtonClientProps, SaveDraftButtonServerProps, SaveDraftButtonServerPropsOnly, SchedulePublish, SchedulePublishTaskInput, SchemaVariant, SelectExcludeType, SelectField, SelectFieldClient, SelectFieldClientProps, SelectFieldDescriptionClientProps, SelectFieldDescriptionServerProps, SelectFieldDiffClientProps, SelectFieldDiffServerProps, SelectFieldErrorClientProps, SelectFieldErrorServerProps, SelectFieldLabelClientProps, SelectFieldLabelServerProps, SelectFieldManyValidation, SelectFieldServerProps, SelectFieldSingleValidation, SelectFieldValidation, SelectFn, SelectFnArgs, SelectFnOperation, SelectIncludeType, SelectMode, SelectType, SendEmailOptions, ServerAdapter, ServerComponentProps, ServerFieldBase, ServerFunction, ServerFunctionArgs, ServerFunctionClient, ServerFunctionClientArgs, ServerFunctionConfig, ServerFunctionHandler, ServerOnlyCollectionAdminProperties, ServerOnlyCollectionProperties, ServerOnlyFieldAdminProperties, ServerOnlyFieldProperties, ServerOnlyGlobalAdminProperties, ServerOnlyGlobalProperties, ServerOnlyLivePreviewProperties, ServerOnlyUploadProperties, ServerProps, ServerPropsFromView, DocumentViewServerProps as ServerSideEditViewProps, SharedAdminComponents, SharedEditViewComponents, SharedEntityViews, SharedLocalAPIOptions, SharedProps, SidebarTab, SidebarTabClientProps, SidebarTabServerProps, SidebarTabServerPropsOnly, SingleRelationshipField, SingleRelationshipFieldClient, SingleTaskStatus, SlugField, SlugFieldClient, SlugFieldClientProps, SlugifyServerFunctionArgs, Sort, StaticDescription, StaticLabel, StorageAdapter, StringKeyOf, Tab, TabAsField, TabAsFieldClient, TabsField, TabsFieldClient, TabsFieldClientProps, TabsFieldDescriptionClientProps, TabsFieldDescriptionServerProps, TabsFieldDiffClientProps, TabsFieldDiffServerProps, TabsFieldErrorClientProps, TabsFieldErrorServerProps, TabsFieldLabelClientProps, TabsFieldLabelServerProps, TabsFieldServerProps, TabsPreferences, TagsConfig, TaskConfig, TaskHandler, TaskHandlerArgs, TaskHandlerResult, TaskHandlerResults, TaskInput, TaskOutput, TaskSlug, TextField, TextFieldClient, TextFieldClientProps, TextFieldDescriptionClientProps, TextFieldDescriptionServerProps, TextFieldDiffClientProps, TextFieldDiffServerProps, TextFieldErrorClientProps, TextFieldErrorServerProps, TextFieldLabelClientProps, TextFieldLabelServerProps, TextFieldManyValidation, TextFieldServerProps, TextFieldSingleValidation, TextFieldValidation, TextareaField, TextareaFieldClient, TextareaFieldClientProps, TextareaFieldDescriptionClientProps, TextareaFieldDescriptionServerProps, TextareaFieldDiffClientProps, TextareaFieldDiffServerProps, TextareaFieldErrorClientProps, TextareaFieldErrorServerProps, TextareaFieldLabelClientProps, TextareaFieldLabelServerProps, TextareaFieldServerProps, TextareaFieldValidation, TimePickerProps, Timezone, TimezonesConfig, Transaction, TransformCollectionWithSelect, TransformDataWithSelect, TransformFileArgs, TransformFileResult, TransformGlobalWithSelect, TraverseFieldsCallback, TypeWithID, TypeWithTimestamps, TypeWithVersion, TypedAuthOperations, TypedBlock, TypedCollection, TypedCollectionJoins, TypedCollectionSelect, TypedFallbackLocale, TypedGlobal, TypedGlobalSelect, TypedJobs, TypedLocale, TypedUploadCollection, TypedWidget, UIField, UIFieldClient, UIFieldClientProps, UIFieldDiffClientProps, UIFieldDiffServerProps, UIFieldServerProps, UnauthenticatedClientConfig, UnnamedGroupField, UnnamedGroupFieldClient, UnnamedTab, UnpublishButtonClientProps, UnpublishButtonServerProps, UnpublishButtonServerPropsOnly, UntypedPayloadTypes, UpdateGlobal, UpdateGlobalArgs, UpdateGlobalVersion, UpdateGlobalVersionArgs, UpdateJobs, UpdateJobsArgs, UpdateMany, UpdateManyArgs, UpdateOne, UpdateOneArgs, UpdateVersion, UpdateVersionArgs, UploadCollectionSlug, UploadConfig, UploadEdits, UploadField, UploadFieldClient, UploadFieldClientProps, UploadFieldDescriptionClientProps, UploadFieldDescriptionServerProps, UploadFieldDiffClientProps, UploadFieldDiffServerProps, UploadFieldErrorClientProps, UploadFieldErrorServerProps, UploadFieldLabelClientProps, UploadFieldLabelServerProps, UploadFieldManyValidation, UploadFieldServerProps, UploadFieldSingleValidation, UploadFieldValidation, UploadFilePreviewClientProps, UploadInstructions, UploadInstructionsAccess, UploadInstructionsCapability, UploadInstructionsRequest, UploadTransformer, Upsert, UpsertArgs, User, UserMenuSettingsGroup, UserMenuSettingsItem, UserSession, UsernameFieldValidation, Validate, ValidateCollectionOptions, ValidateGlobalOptions, ValidateOptions, ValidationFieldError, ValidationResult, ValueWithRelation, VerifyConfig, VersionField, VersionOperations, VersionTab, ViewDescriptionClientProps, ViewDescriptionServerProps, ViewDescriptionServerPropsOnly, ViewTypes, VisibleEntities, Where, WhereField, Widget, WidgetInstance, WidgetServerProps, WidgetSlug, WidgetWidth, WithSelectFn, WithServerSidePropsComponent, WithServerSidePropsComponentProps, WorkflowConfig, WorkflowHandler, WorkflowSlug, checkFileRestrictionsParams };
|
package/dist/index.d.ts
CHANGED
|
@@ -847,8 +847,6 @@ export { deleteCollectionVersions } from './versions/deleteCollectionVersions.js
|
|
|
847
847
|
export { appendVersionToQueryKey } from './versions/drafts/appendVersionToQueryKey.js';
|
|
848
848
|
export { getQueryDraftsSort } from './versions/drafts/getQueryDraftsSort.js';
|
|
849
849
|
export { enforceMaxVersions } from './versions/enforceMaxVersions.js';
|
|
850
|
-
export { getLatestCollectionVersion } from './versions/getLatestCollectionVersion.js';
|
|
851
|
-
export { getLatestGlobalVersion } from './versions/getLatestGlobalVersion.js';
|
|
852
850
|
export { saveVersion } from './versions/saveVersion.js';
|
|
853
851
|
export type { SchedulePublishTaskInput } from './versions/schedule/types.js';
|
|
854
852
|
export type { SchedulePublish, TypeWithVersion } from './versions/types.js';
|