payload 4.0.0-internal.e16cf59 → 4.0.0-internal.fa345ef
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/LICENSE.md +1 -1
- package/bin.js +11 -0
- package/dist/admin/RichText.d.ts +4 -17
- package/dist/admin/RichText.d.ts.map +1 -1
- package/dist/admin/RichText.js.map +1 -1
- package/dist/admin/adapters/cookies.d.ts +21 -0
- package/dist/admin/adapters/cookies.d.ts.map +1 -0
- package/dist/admin/adapters/cookies.js +3 -0
- package/dist/admin/adapters/cookies.js.map +1 -0
- package/dist/admin/adapters/devReload.d.ts +9 -0
- package/dist/admin/adapters/devReload.d.ts.map +1 -0
- package/dist/admin/adapters/devReload.js +6 -0
- package/dist/admin/adapters/devReload.js.map +1 -0
- package/dist/admin/adapters/index.d.ts +7 -0
- package/dist/admin/adapters/index.d.ts.map +1 -0
- package/dist/admin/adapters/index.js +3 -0
- package/dist/admin/adapters/index.js.map +1 -0
- package/dist/admin/adapters/render.d.ts +16 -0
- package/dist/admin/adapters/render.d.ts.map +1 -0
- package/dist/admin/adapters/render.js +7 -0
- package/dist/admin/adapters/render.js.map +1 -0
- package/dist/admin/adapters/router.d.ts +56 -0
- package/dist/admin/adapters/router.d.ts.map +1 -0
- package/dist/admin/adapters/router.js +3 -0
- package/dist/admin/adapters/router.js.map +1 -0
- package/dist/admin/adapters/server.d.ts +23 -0
- package/dist/admin/adapters/server.d.ts.map +1 -0
- package/dist/admin/adapters/server.js +6 -0
- package/dist/admin/adapters/server.js.map +1 -0
- package/dist/admin/adapters/views.d.ts +36 -0
- package/dist/admin/adapters/views.d.ts.map +1 -0
- package/dist/admin/adapters/views.js +7 -0
- package/dist/admin/adapters/views.js.map +1 -0
- package/dist/admin/elements/Table.d.ts +1 -0
- package/dist/admin/elements/Table.d.ts.map +1 -1
- package/dist/admin/elements/Table.js.map +1 -1
- package/dist/admin/fields/Row.d.ts +2 -2
- package/dist/admin/fields/Row.d.ts.map +1 -1
- package/dist/admin/fields/Row.js.map +1 -1
- package/dist/admin/forms/Description.d.ts +2 -2
- package/dist/admin/forms/Description.d.ts.map +1 -1
- package/dist/admin/forms/Description.js.map +1 -1
- package/dist/admin/forms/Field.d.ts +10 -5
- package/dist/admin/forms/Field.d.ts.map +1 -1
- package/dist/admin/forms/Field.js.map +1 -1
- package/dist/admin/functions/index.d.ts +9 -0
- package/dist/admin/functions/index.d.ts.map +1 -1
- package/dist/admin/functions/index.js.map +1 -1
- package/dist/admin/types.d.ts +3 -2
- package/dist/admin/types.d.ts.map +1 -1
- package/dist/admin/types.js.map +1 -1
- package/dist/admin/views/dashboard.d.ts +7 -0
- package/dist/admin/views/dashboard.d.ts.map +1 -1
- package/dist/admin/views/dashboard.js.map +1 -1
- package/dist/admin/views/document.d.ts +5 -3
- package/dist/admin/views/document.d.ts.map +1 -1
- package/dist/admin/views/document.js.map +1 -1
- package/dist/admin/views/hierarchyList.d.ts +1 -0
- package/dist/admin/views/hierarchyList.d.ts.map +1 -1
- package/dist/admin/views/hierarchyList.js.map +1 -1
- package/dist/admin/views/list.d.ts +10 -1
- package/dist/admin/views/list.d.ts.map +1 -1
- package/dist/admin/views/list.js.map +1 -1
- package/dist/auth/baseFields/apiKey.d.ts +10 -2
- package/dist/auth/baseFields/apiKey.d.ts.map +1 -1
- package/dist/auth/baseFields/apiKey.js +35 -24
- package/dist/auth/baseFields/apiKey.js.map +1 -1
- package/dist/auth/cookies.d.ts.map +1 -1
- package/dist/auth/defaultAccess.d.ts +1 -1
- package/dist/auth/defaultAccess.d.ts.map +1 -1
- package/dist/auth/defaultAccess.js +1 -1
- package/dist/auth/defaultAccess.js.map +1 -1
- package/dist/auth/defaultUser.d.ts.map +1 -1
- package/dist/auth/defaultUser.js +2 -1
- package/dist/auth/defaultUser.js.map +1 -1
- package/dist/auth/ensureUsernameOrEmail.d.ts.map +1 -1
- package/dist/auth/executeAccess.d.ts.map +1 -1
- package/dist/auth/executeAuthStrategies.d.ts.map +1 -1
- package/dist/auth/extractAccessFromPermission.d.ts.map +1 -1
- package/dist/auth/extractJWT.d.ts.map +1 -1
- package/dist/auth/getAuthFields.d.ts.map +1 -1
- package/dist/auth/getAuthFields.js +2 -2
- package/dist/auth/getAuthFields.js.map +1 -1
- package/dist/auth/getFieldsToSign.d.ts.map +1 -1
- package/dist/auth/getLoginOptions.d.ts.map +1 -1
- package/dist/auth/isUserLocked.d.ts.map +1 -1
- package/dist/auth/jwt.d.ts.map +1 -1
- package/dist/auth/operations/access.d.ts.map +1 -1
- package/dist/auth/operations/auth.d.ts +2 -2
- package/dist/auth/operations/auth.d.ts.map +1 -1
- package/dist/auth/operations/auth.js.map +1 -1
- package/dist/auth/operations/forgotPassword.d.ts.map +1 -1
- package/dist/auth/operations/init.d.ts.map +1 -1
- package/dist/auth/operations/local/auth.d.ts.map +1 -1
- package/dist/auth/operations/login.d.ts +2 -1
- package/dist/auth/operations/login.d.ts.map +1 -1
- package/dist/auth/operations/login.js.map +1 -1
- package/dist/auth/operations/logout.d.ts.map +1 -1
- package/dist/auth/operations/me.d.ts.map +1 -1
- package/dist/auth/operations/me.js.map +1 -1
- package/dist/auth/operations/refresh.d.ts.map +1 -1
- package/dist/auth/operations/refresh.js +9 -3
- package/dist/auth/operations/refresh.js.map +1 -1
- package/dist/auth/operations/registerFirstUser.d.ts.map +1 -1
- package/dist/auth/operations/resetPassword.d.ts.map +1 -1
- package/dist/auth/operations/resetPassword.js.map +1 -1
- package/dist/auth/operations/unlock.d.ts.map +1 -1
- package/dist/auth/operations/verifyEmail.d.ts.map +1 -1
- package/dist/auth/sendVerificationEmail.d.ts +2 -2
- package/dist/auth/sendVerificationEmail.d.ts.map +1 -1
- package/dist/auth/sendVerificationEmail.js +1 -1
- package/dist/auth/sendVerificationEmail.js.map +1 -1
- package/dist/auth/sessions.d.ts +4 -5
- package/dist/auth/sessions.d.ts.map +1 -1
- package/dist/auth/sessions.js +5 -3
- package/dist/auth/sessions.js.map +1 -1
- package/dist/auth/strategies/apiKey.d.ts.map +1 -1
- package/dist/auth/strategies/apiKey.js +6 -17
- package/dist/auth/strategies/apiKey.js.map +1 -1
- package/dist/auth/strategies/local/authenticate.d.ts.map +1 -1
- package/dist/auth/strategies/local/generatePasswordSaltHash.d.ts.map +1 -1
- package/dist/auth/strategies/local/incrementLoginAttempts.d.ts +2 -2
- package/dist/auth/strategies/local/incrementLoginAttempts.d.ts.map +1 -1
- package/dist/auth/strategies/local/incrementLoginAttempts.js +1 -1
- package/dist/auth/strategies/local/incrementLoginAttempts.js.map +1 -1
- package/dist/auth/strategies/local/register.d.ts.map +1 -1
- package/dist/auth/strategies/local/resetLoginAttempts.d.ts.map +1 -1
- package/dist/auth/types.d.ts +28 -21
- package/dist/auth/types.d.ts.map +1 -1
- package/dist/auth/types.js.map +1 -1
- package/dist/bin/build.d.ts +25 -0
- package/dist/bin/build.d.ts.map +1 -0
- package/dist/bin/build.js +80 -0
- package/dist/bin/build.js.map +1 -0
- package/dist/bin/build.spec.js +170 -0
- package/dist/bin/build.spec.js.map +1 -0
- package/dist/bin/generateImportMap/index.d.ts.map +1 -1
- package/dist/bin/generateImportMap/index.js +8 -5
- package/dist/bin/generateImportMap/index.js.map +1 -1
- package/dist/bin/generateImportMap/iterateCollections.d.ts.map +1 -1
- package/dist/bin/generateImportMap/iterateCollections.js +11 -0
- package/dist/bin/generateImportMap/iterateCollections.js.map +1 -1
- package/dist/bin/generateImportMap/iterateConfig.d.ts.map +1 -1
- package/dist/bin/generateImportMap/iterateConfig.js +12 -0
- package/dist/bin/generateImportMap/iterateConfig.js.map +1 -1
- package/dist/bin/generateImportMap/iterateFields.d.ts.map +1 -1
- package/dist/bin/generateImportMap/iterateFields.js +4 -1
- package/dist/bin/generateImportMap/iterateFields.js.map +1 -1
- package/dist/bin/generateImportMap/utilities/getFromImportMap.d.ts.map +1 -1
- package/dist/bin/generateImportMap/utilities/resolveImportMapFilePath.d.ts +5 -1
- package/dist/bin/generateImportMap/utilities/resolveImportMapFilePath.d.ts.map +1 -1
- package/dist/bin/generateImportMap/utilities/resolveImportMapFilePath.js +32 -18
- package/dist/bin/generateImportMap/utilities/resolveImportMapFilePath.js.map +1 -1
- package/dist/bin/generateTypes.d.ts +3 -2
- package/dist/bin/generateTypes.d.ts.map +1 -1
- package/dist/bin/generateTypes.js +11 -1
- package/dist/bin/generateTypes.js.map +1 -1
- package/dist/bin/index.d.ts.map +1 -1
- package/dist/bin/index.js +9 -0
- package/dist/bin/index.js.map +1 -1
- package/dist/bin/loadEnv.d.ts +3 -1
- package/dist/bin/loadEnv.d.ts.map +1 -1
- package/dist/bin/loadEnv.js +40 -10
- package/dist/bin/loadEnv.js.map +1 -1
- package/dist/bin/migrate.d.ts.map +1 -1
- package/dist/collections/config/client.d.ts +1 -1
- package/dist/collections/config/client.d.ts.map +1 -1
- package/dist/collections/config/client.js +1 -0
- package/dist/collections/config/client.js.map +1 -1
- package/dist/collections/config/defaults.d.ts +0 -4
- package/dist/collections/config/defaults.d.ts.map +1 -1
- package/dist/collections/config/defaults.js +2 -17
- package/dist/collections/config/defaults.js.map +1 -1
- package/dist/collections/config/defaults.spec.js +47 -0
- package/dist/collections/config/defaults.spec.js.map +1 -0
- package/dist/collections/config/sanitize.d.ts +10 -1
- package/dist/collections/config/sanitize.d.ts.map +1 -1
- package/dist/collections/config/sanitize.js +1 -11
- package/dist/collections/config/sanitize.js.map +1 -1
- package/dist/collections/config/sanitizeCompoundIndexes.d.ts.map +1 -1
- package/dist/collections/config/types.d.ts +11 -7
- package/dist/collections/config/types.d.ts.map +1 -1
- package/dist/collections/config/types.js.map +1 -1
- package/dist/collections/config/useAsTitle.d.ts.map +1 -1
- package/dist/collections/dataloader.d.ts.map +1 -1
- package/dist/collections/endpoints/create.d.ts.map +1 -1
- package/dist/collections/endpoints/create.js +0 -2
- package/dist/collections/endpoints/create.js.map +1 -1
- package/dist/collections/endpoints/updateByID.d.ts.map +1 -1
- package/dist/collections/endpoints/updateByID.js +1 -2
- package/dist/collections/endpoints/updateByID.js.map +1 -1
- package/dist/collections/operations/count.d.ts.map +1 -1
- package/dist/collections/operations/count.js +1 -0
- package/dist/collections/operations/count.js.map +1 -1
- package/dist/collections/operations/countVersions.d.ts.map +1 -1
- package/dist/collections/operations/create.d.ts +0 -1
- package/dist/collections/operations/create.d.ts.map +1 -1
- package/dist/collections/operations/create.js +15 -6
- package/dist/collections/operations/create.js.map +1 -1
- package/dist/collections/operations/delete.d.ts.map +1 -1
- package/dist/collections/operations/delete.js +3 -0
- package/dist/collections/operations/delete.js.map +1 -1
- package/dist/collections/operations/deleteByID.d.ts.map +1 -1
- package/dist/collections/operations/duplicate.d.ts.map +1 -1
- package/dist/collections/operations/find.d.ts.map +1 -1
- package/dist/collections/operations/findByID.d.ts.map +1 -1
- package/dist/collections/operations/findDistinct.d.ts.map +1 -1
- package/dist/collections/operations/findDistinct.js +1 -0
- package/dist/collections/operations/findDistinct.js.map +1 -1
- package/dist/collections/operations/findVersionByID.d.ts.map +1 -1
- package/dist/collections/operations/findVersions.d.ts.map +1 -1
- package/dist/collections/operations/local/count.d.ts +3 -3
- package/dist/collections/operations/local/count.d.ts.map +1 -1
- package/dist/collections/operations/local/count.js.map +1 -1
- package/dist/collections/operations/local/countVersions.d.ts +3 -3
- package/dist/collections/operations/local/countVersions.d.ts.map +1 -1
- package/dist/collections/operations/local/countVersions.js.map +1 -1
- package/dist/collections/operations/local/create.d.ts +3 -3
- package/dist/collections/operations/local/create.d.ts.map +1 -1
- package/dist/collections/operations/local/create.js.map +1 -1
- package/dist/collections/operations/local/delete.d.ts +3 -3
- package/dist/collections/operations/local/delete.d.ts.map +1 -1
- package/dist/collections/operations/local/delete.js.map +1 -1
- package/dist/collections/operations/local/duplicate.d.ts +3 -3
- package/dist/collections/operations/local/duplicate.d.ts.map +1 -1
- package/dist/collections/operations/local/duplicate.js.map +1 -1
- package/dist/collections/operations/local/find.d.ts +3 -3
- package/dist/collections/operations/local/find.d.ts.map +1 -1
- package/dist/collections/operations/local/find.js.map +1 -1
- package/dist/collections/operations/local/findByID.d.ts +3 -3
- package/dist/collections/operations/local/findByID.d.ts.map +1 -1
- package/dist/collections/operations/local/findByID.js.map +1 -1
- package/dist/collections/operations/local/findDistinct.d.ts +2 -2
- package/dist/collections/operations/local/findDistinct.d.ts.map +1 -1
- package/dist/collections/operations/local/findDistinct.js.map +1 -1
- package/dist/collections/operations/local/findVersionByID.d.ts +3 -3
- package/dist/collections/operations/local/findVersionByID.d.ts.map +1 -1
- package/dist/collections/operations/local/findVersionByID.js.map +1 -1
- package/dist/collections/operations/local/findVersions.d.ts +3 -3
- package/dist/collections/operations/local/findVersions.d.ts.map +1 -1
- package/dist/collections/operations/local/findVersions.js.map +1 -1
- package/dist/collections/operations/local/restoreVersion.d.ts +3 -3
- package/dist/collections/operations/local/restoreVersion.d.ts.map +1 -1
- package/dist/collections/operations/local/restoreVersion.js.map +1 -1
- package/dist/collections/operations/local/update.d.ts +7 -11
- package/dist/collections/operations/local/update.d.ts.map +1 -1
- package/dist/collections/operations/local/update.js +1 -2
- package/dist/collections/operations/local/update.js.map +1 -1
- package/dist/collections/operations/restoreVersion.d.ts.map +1 -1
- package/dist/collections/operations/update.d.ts +0 -1
- package/dist/collections/operations/update.d.ts.map +1 -1
- package/dist/collections/operations/update.js +8 -4
- package/dist/collections/operations/update.js.map +1 -1
- package/dist/collections/operations/updateByID.d.ts +0 -1
- package/dist/collections/operations/updateByID.d.ts.map +1 -1
- package/dist/collections/operations/updateByID.js +1 -5
- package/dist/collections/operations/updateByID.js.map +1 -1
- package/dist/collections/operations/utilities/buildAfterOperation.d.ts.map +1 -1
- package/dist/collections/operations/utilities/copyDataWithFreshRowIDs.d.ts +9 -0
- package/dist/collections/operations/utilities/copyDataWithFreshRowIDs.d.ts.map +1 -0
- package/dist/collections/operations/utilities/copyDataWithFreshRowIDs.js +170 -0
- package/dist/collections/operations/utilities/copyDataWithFreshRowIDs.js.map +1 -0
- package/dist/collections/operations/utilities/sanitizeSortQuery.d.ts.map +1 -1
- package/dist/collections/operations/utilities/types.d.ts +0 -9
- package/dist/collections/operations/utilities/types.d.ts.map +1 -1
- package/dist/collections/operations/utilities/types.js.map +1 -1
- package/dist/collections/operations/utilities/update.d.ts +1 -2
- package/dist/collections/operations/utilities/update.d.ts.map +1 -1
- package/dist/collections/operations/utilities/update.js +64 -65
- package/dist/collections/operations/utilities/update.js.map +1 -1
- package/dist/config/build.d.ts.map +1 -1
- package/dist/config/build.js +8 -0
- package/dist/config/build.js.map +1 -1
- package/dist/config/client.d.ts +3 -3
- package/dist/config/client.d.ts.map +1 -1
- package/dist/config/client.js +2 -1
- package/dist/config/client.js.map +1 -1
- package/dist/config/defaults.d.ts +0 -4
- package/dist/config/defaults.d.ts.map +1 -1
- package/dist/config/defaults.js +0 -78
- package/dist/config/defaults.js.map +1 -1
- package/dist/config/definePlugin.d.ts +10 -10
- package/dist/config/definePlugin.d.ts.map +1 -1
- package/dist/config/definePlugin.js +7 -11
- package/dist/config/definePlugin.js.map +1 -1
- package/dist/config/orderable/index.d.ts.map +1 -1
- package/dist/config/orderable/index.js +23 -0
- package/dist/config/orderable/index.js.map +1 -1
- package/dist/config/sanitize.d.ts.map +1 -1
- package/dist/config/sanitize.js +139 -27
- package/dist/config/sanitize.js.map +1 -1
- package/dist/config/types.d.ts +125 -38
- package/dist/config/types.d.ts.map +1 -1
- package/dist/config/types.js +2 -0
- package/dist/config/types.js.map +1 -1
- package/dist/database/combineQueries.d.ts.map +1 -1
- package/dist/database/getLocalizedPaths.d.ts.map +1 -1
- package/dist/database/getLocalizedPaths.js +1 -1
- package/dist/database/getLocalizedPaths.js.map +1 -1
- package/dist/database/migrations/findMigrationDir.d.ts.map +1 -1
- package/dist/database/migrations/getPredefinedMigration.d.ts.map +1 -1
- package/dist/database/migrations/migrationsCollection.d.ts.map +1 -1
- package/dist/database/migrations/migrationsCollection.js +2 -1
- package/dist/database/migrations/migrationsCollection.js.map +1 -1
- package/dist/database/migrations/readMigrationFiles.d.ts.map +1 -1
- package/dist/database/migrations/writeMigrationIndex.d.ts.map +1 -1
- package/dist/database/sanitizeJoinQuery.d.ts.map +1 -1
- package/dist/database/sanitizeWhereQuery.d.ts.map +1 -1
- package/dist/duplicateDocument/index.d.ts.map +1 -1
- package/dist/email/getStringifiedToAddress.d.ts.map +1 -1
- package/dist/errors/ValidationError.d.ts +1 -0
- package/dist/errors/ValidationError.d.ts.map +1 -1
- package/dist/errors/ValidationError.js.map +1 -1
- package/dist/exports/migrations.d.ts +5 -13
- package/dist/exports/migrations.d.ts.map +1 -1
- package/dist/exports/migrations.js +5 -13
- package/dist/exports/migrations.js.map +1 -1
- package/dist/exports/shared.d.ts +23 -1
- package/dist/exports/shared.d.ts.map +1 -1
- package/dist/exports/shared.js +23 -1
- package/dist/exports/shared.js.map +1 -1
- package/dist/fields/baseFields/slug/countVersions.d.ts.map +1 -1
- package/dist/fields/baseFields/slug/generateSlug.d.ts.map +1 -1
- package/dist/fields/baseFields/slug/index.js +1 -1
- package/dist/fields/baseFields/slug/index.js.map +1 -1
- package/dist/fields/config/client.d.ts +3 -3
- package/dist/fields/config/client.d.ts.map +1 -1
- package/dist/fields/config/client.js +12 -13
- package/dist/fields/config/client.js.map +1 -1
- package/dist/fields/config/sanitize.d.ts.map +1 -1
- package/dist/fields/config/sanitize.js +2 -14
- package/dist/fields/config/sanitize.js.map +1 -1
- package/dist/fields/config/sanitizeJoinField.d.ts.map +1 -1
- package/dist/fields/config/types.d.ts +45 -66
- package/dist/fields/config/types.d.ts.map +1 -1
- package/dist/fields/config/types.js +1 -1
- package/dist/fields/config/types.js.map +1 -1
- package/dist/fields/getDefaultValue.d.ts.map +1 -1
- package/dist/fields/hooks/afterChange/index.d.ts.map +1 -1
- package/dist/fields/hooks/afterChange/promise.d.ts.map +1 -1
- package/dist/fields/hooks/afterChange/promise.js +1 -1
- package/dist/fields/hooks/afterChange/promise.js.map +1 -1
- package/dist/fields/hooks/afterChange/traverseFields.d.ts.map +1 -1
- package/dist/fields/hooks/afterRead/promise.d.ts.map +1 -1
- package/dist/fields/hooks/afterRead/promise.js +12 -3
- package/dist/fields/hooks/afterRead/promise.js.map +1 -1
- package/dist/fields/hooks/afterRead/relationshipPopulationPromise.d.ts.map +1 -1
- package/dist/fields/hooks/afterRead/traverseFields.d.ts.map +1 -1
- package/dist/fields/hooks/afterRead/virtualFieldPopulationPromise.d.ts.map +1 -1
- package/dist/fields/hooks/beforeChange/cloneDataFromOriginalDoc.d.ts.map +1 -1
- package/dist/fields/hooks/beforeChange/getExistingRowDoc.d.ts.map +1 -1
- package/dist/fields/hooks/beforeChange/index.d.ts.map +1 -1
- package/dist/fields/hooks/beforeChange/promise.d.ts.map +1 -1
- package/dist/fields/hooks/beforeChange/promise.js +3 -3
- package/dist/fields/hooks/beforeChange/promise.js.map +1 -1
- package/dist/fields/hooks/beforeChange/traverseFields.d.ts.map +1 -1
- package/dist/fields/hooks/beforeDuplicate/index.d.ts.map +1 -1
- package/dist/fields/hooks/beforeDuplicate/promise.d.ts.map +1 -1
- package/dist/fields/hooks/beforeDuplicate/promise.js +2 -2
- package/dist/fields/hooks/beforeDuplicate/promise.js.map +1 -1
- package/dist/fields/hooks/beforeDuplicate/traverseFields.d.ts.map +1 -1
- package/dist/fields/hooks/beforeValidate/index.d.ts.map +1 -1
- package/dist/fields/hooks/beforeValidate/promise.d.ts.map +1 -1
- package/dist/fields/hooks/beforeValidate/promise.js +11 -2
- package/dist/fields/hooks/beforeValidate/promise.js.map +1 -1
- package/dist/fields/hooks/beforeValidate/traverseFields.d.ts.map +1 -1
- package/dist/fields/isFieldDisabled.d.ts.map +1 -1
- package/dist/fields/mergeBaseFields.d.ts.map +1 -1
- package/dist/fields/setDefaultBeforeDuplicate.d.ts.map +1 -1
- package/dist/fields/validations.d.ts.map +1 -1
- package/dist/fields/validations.js +5 -4
- package/dist/fields/validations.js.map +1 -1
- package/dist/globals/config/client.d.ts.map +1 -1
- package/dist/globals/config/sanitize.d.ts +6 -1
- package/dist/globals/config/sanitize.d.ts.map +1 -1
- package/dist/globals/config/sanitize.js +2 -6
- package/dist/globals/config/sanitize.js.map +1 -1
- package/dist/globals/config/sanitize.spec.js +43 -0
- package/dist/globals/config/sanitize.spec.js.map +1 -0
- package/dist/globals/endpoints/update.d.ts.map +1 -1
- package/dist/globals/endpoints/update.js +0 -2
- package/dist/globals/endpoints/update.js.map +1 -1
- package/dist/globals/operations/countGlobalVersions.d.ts.map +1 -1
- package/dist/globals/operations/docAccess.d.ts.map +1 -1
- package/dist/globals/operations/findOne.d.ts.map +1 -1
- package/dist/globals/operations/findVersionByID.d.ts.map +1 -1
- package/dist/globals/operations/findVersions.d.ts.map +1 -1
- package/dist/globals/operations/local/countVersions.d.ts +3 -3
- package/dist/globals/operations/local/countVersions.d.ts.map +1 -1
- package/dist/globals/operations/local/countVersions.js.map +1 -1
- package/dist/globals/operations/local/findOne.d.ts +3 -3
- package/dist/globals/operations/local/findOne.d.ts.map +1 -1
- package/dist/globals/operations/local/findOne.js.map +1 -1
- package/dist/globals/operations/local/findVersionByID.d.ts +3 -3
- package/dist/globals/operations/local/findVersionByID.d.ts.map +1 -1
- package/dist/globals/operations/local/findVersionByID.js.map +1 -1
- package/dist/globals/operations/local/findVersions.d.ts +3 -3
- package/dist/globals/operations/local/findVersions.d.ts.map +1 -1
- package/dist/globals/operations/local/findVersions.js.map +1 -1
- package/dist/globals/operations/local/restoreVersion.d.ts +3 -3
- package/dist/globals/operations/local/restoreVersion.d.ts.map +1 -1
- package/dist/globals/operations/local/restoreVersion.js.map +1 -1
- package/dist/globals/operations/local/update.d.ts +7 -9
- package/dist/globals/operations/local/update.d.ts.map +1 -1
- package/dist/globals/operations/local/update.js +1 -2
- package/dist/globals/operations/local/update.js.map +1 -1
- package/dist/globals/operations/restoreVersion.d.ts.map +1 -1
- package/dist/globals/operations/update.d.ts +0 -1
- package/dist/globals/operations/update.d.ts.map +1 -1
- package/dist/globals/operations/update.js +52 -58
- package/dist/globals/operations/update.js.map +1 -1
- package/dist/hierarchy/addHierarchyToCollection.d.ts.map +1 -1
- package/dist/hierarchy/buildParentField.d.ts.map +1 -1
- package/dist/hierarchy/constants.d.ts.map +1 -1
- package/dist/hierarchy/getInitialTreeData.d.ts.map +1 -1
- package/dist/hierarchy/hooks/collectionAfterDelete.d.ts.map +1 -1
- package/dist/hierarchy/hooks/collectionAfterRead.d.ts.map +1 -1
- package/dist/hierarchy/hooks/collectionBeforeChange.d.ts.map +1 -1
- package/dist/hierarchy/hooks/collectionBeforeDelete.d.ts.map +1 -1
- package/dist/hierarchy/hooks/collectionBeforeOperation.d.ts.map +1 -1
- package/dist/hierarchy/hooks/ensureSafeCollectionsChange.d.ts.map +1 -1
- package/dist/hierarchy/injectHierarchyButton.d.ts.map +1 -1
- package/dist/hierarchy/resolveHierarchyCollections.d.ts.map +1 -1
- package/dist/hierarchy/resolveHierarchyCollections.js +1 -1
- package/dist/hierarchy/resolveHierarchyCollections.js.map +1 -1
- package/dist/hierarchy/sanitizeHierarchyCollection.d.ts.map +1 -1
- package/dist/hierarchy/sanitizeHierarchyCollection.js +3 -1
- package/dist/hierarchy/sanitizeHierarchyCollection.js.map +1 -1
- package/dist/hierarchy/types.d.ts +8 -1
- package/dist/hierarchy/types.d.ts.map +1 -1
- package/dist/hierarchy/types.js.map +1 -1
- package/dist/index.bundled.d.ts +808 -366
- package/dist/index.d.ts +72 -24
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +55 -36
- package/dist/index.js.map +1 -1
- package/dist/kv/adapters/DatabaseKVAdapter.d.ts.map +1 -1
- package/dist/kv/adapters/DatabaseKVAdapter.js +1 -0
- package/dist/kv/adapters/DatabaseKVAdapter.js.map +1 -1
- package/dist/locked-documents/config.d.ts.map +1 -1
- package/dist/locked-documents/config.js +2 -1
- package/dist/locked-documents/config.js.map +1 -1
- package/dist/preferences/config.d.ts.map +1 -1
- package/dist/preferences/config.js +2 -1
- package/dist/preferences/config.js.map +1 -1
- package/dist/preferences/deleteUserPreferences.d.ts.map +1 -1
- package/dist/preferences/keys.d.ts +4 -0
- package/dist/preferences/keys.d.ts.map +1 -1
- package/dist/preferences/keys.js +4 -1
- package/dist/preferences/keys.js.map +1 -1
- package/dist/preferences/types.d.ts +15 -0
- package/dist/preferences/types.d.ts.map +1 -1
- package/dist/preferences/types.js +3 -1
- package/dist/preferences/types.js.map +1 -1
- package/dist/query-presets/access.d.ts.map +1 -1
- package/dist/query-presets/config.d.ts.map +1 -1
- package/dist/query-presets/config.js +77 -37
- package/dist/query-presets/config.js.map +1 -1
- package/dist/query-presets/constraints.d.ts.map +1 -1
- package/dist/query-presets/constraints.js +3 -2
- package/dist/query-presets/constraints.js.map +1 -1
- package/dist/queues/config/collection.d.ts.map +1 -1
- package/dist/queues/config/collection.js +2 -1
- package/dist/queues/config/collection.js.map +1 -1
- package/dist/queues/config/generateJobsJSONSchemas.d.ts +1 -1
- package/dist/queues/config/generateJobsJSONSchemas.d.ts.map +1 -1
- package/dist/queues/config/generateJobsJSONSchemas.js +33 -12
- package/dist/queues/config/generateJobsJSONSchemas.js.map +1 -1
- package/dist/queues/config/global.d.ts.map +1 -1
- package/dist/queues/config/global.js +2 -1
- package/dist/queues/config/global.js.map +1 -1
- package/dist/queues/endpoints/run.d.ts.map +1 -1
- package/dist/queues/localAPI.d.ts.map +1 -1
- package/dist/queues/operations/handleSchedules/getQueuesWithSchedules.d.ts.map +1 -1
- package/dist/queues/operations/runJobs/index.d.ts.map +1 -1
- package/dist/queues/operations/runJobs/runJSONJob/index.d.ts.map +1 -1
- package/dist/queues/operations/runJobs/runJob/getRunTaskFunction.d.ts.map +1 -1
- package/dist/queues/operations/runJobs/runJob/index.d.ts.map +1 -1
- package/dist/queues/utilities/getJobTaskStatus.d.ts.map +1 -1
- package/dist/translations/getLocalI18n.d.ts.map +1 -1
- package/dist/types/index.d.ts +18 -8
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js.map +1 -1
- package/dist/uploads/checkFileAccess.d.ts.map +1 -1
- package/dist/uploads/checkFileRestrictions.d.ts.map +1 -1
- package/dist/uploads/docWithFilenameExists.d.ts.map +1 -1
- package/dist/uploads/endpoints/getFileFromURL.d.ts.map +1 -1
- package/dist/uploads/endpoints/getFileFromURL.js +9 -5
- package/dist/uploads/endpoints/getFileFromURL.js.map +1 -1
- package/dist/uploads/fetchAPI-multipart/isEligibleRequest.d.ts.map +1 -1
- package/dist/uploads/fetchAPI-multipart/processNested.d.ts.map +1 -1
- package/dist/uploads/fetchAPI-multipart/utilities.d.ts.map +1 -1
- package/dist/uploads/fileExists.d.ts.map +1 -1
- package/dist/uploads/generateFileData.d.ts +2 -1
- package/dist/uploads/generateFileData.d.ts.map +1 -1
- package/dist/uploads/generateFileData.js +5 -2
- package/dist/uploads/generateFileData.js.map +1 -1
- package/dist/uploads/getBaseFields.d.ts.map +1 -1
- package/dist/uploads/getBaseFields.js +7 -19
- package/dist/uploads/getBaseFields.js.map +1 -1
- package/dist/uploads/getExternalFile.d.ts.map +1 -1
- package/dist/uploads/getFileByPath.d.ts.map +1 -1
- package/dist/uploads/getFileTypeFallback.d.ts.map +1 -1
- package/dist/uploads/getSafeFilename.d.ts.map +1 -1
- package/dist/uploads/image-resizing/createImageSize.d.ts.map +1 -1
- package/dist/uploads/image-resizing/generateImageSizeFilename.d.ts.map +1 -1
- package/dist/uploads/image-resizing/getImageResizeAction.d.ts.map +1 -1
- package/dist/uploads/image-resizing/parseFilename.d.ts.map +1 -1
- package/dist/uploads/image-resizing/sanitizeResizeConfig.d.ts.map +1 -1
- package/dist/uploads/matchMimeType.d.ts +8 -0
- package/dist/uploads/matchMimeType.d.ts.map +1 -0
- package/dist/uploads/matchMimeType.js +19 -0
- package/dist/uploads/matchMimeType.js.map +1 -0
- package/dist/uploads/matchMimeType.spec.js +66 -0
- package/dist/uploads/matchMimeType.spec.js.map +1 -0
- package/dist/uploads/mimeTypeValidator.d.ts.map +1 -1
- package/dist/uploads/safeFetch.d.ts +1 -1
- package/dist/uploads/safeFetch.d.ts.map +1 -1
- package/dist/uploads/safeFetch.js +11 -5
- package/dist/uploads/safeFetch.js.map +1 -1
- package/dist/uploads/saveBufferToFile.d.ts.map +1 -1
- package/dist/uploads/tempFile.d.ts.map +1 -1
- package/dist/uploads/types.d.ts +33 -29
- package/dist/uploads/types.d.ts.map +1 -1
- package/dist/uploads/types.js.map +1 -1
- package/dist/uploads/uploadFiles.d.ts.map +1 -1
- package/dist/utilities/addDataAndFileToRequest.d.ts.map +1 -1
- package/dist/utilities/addDataAndFileToRequest.js +6 -0
- package/dist/utilities/addDataAndFileToRequest.js.map +1 -1
- package/dist/utilities/addLocalesToRequest.d.ts.map +1 -1
- package/dist/utilities/addSelectGenericsToGeneretedTypes.d.ts.map +1 -1
- package/dist/utilities/appendDateTimezoneSelectFields.d.ts.map +1 -1
- package/dist/utilities/appendDateTimezoneSelectFields.js +2 -2
- package/dist/utilities/appendDateTimezoneSelectFields.js.map +1 -1
- package/dist/utilities/appendNonTrashedFilter.d.ts.map +1 -1
- package/dist/utilities/appendUploadSelectFields.d.ts.map +1 -1
- package/dist/utilities/canAccessAdmin.d.ts.map +1 -1
- package/dist/utilities/checkDocumentLockStatus.d.ts.map +1 -1
- package/dist/utilities/configToJSONSchema.d.ts +68 -16
- package/dist/utilities/configToJSONSchema.d.ts.map +1 -1
- package/dist/utilities/configToJSONSchema.js +311 -117
- package/dist/utilities/configToJSONSchema.js.map +1 -1
- package/dist/utilities/configToJSONSchema.spec.js +619 -85
- package/dist/utilities/configToJSONSchema.spec.js.map +1 -1
- package/dist/utilities/createLocalReq.d.ts +2 -2
- package/dist/utilities/createLocalReq.d.ts.map +1 -1
- package/dist/utilities/createLocalReq.js.map +1 -1
- package/dist/utilities/createPayloadRequest.d.ts.map +1 -1
- package/dist/utilities/createPayloadRequest.js +1 -0
- package/dist/utilities/createPayloadRequest.js.map +1 -1
- package/dist/utilities/deepCopyObject.d.ts.map +1 -1
- package/dist/utilities/deepCopyObject.js +8 -0
- package/dist/utilities/deepCopyObject.js.map +1 -1
- package/dist/utilities/dependencies/dependencyChecker.js +1 -1
- package/dist/utilities/dependencies/dependencyChecker.js.map +1 -1
- package/dist/utilities/dependencies/getDependencies.d.ts.map +1 -1
- package/dist/utilities/dependencies/getDependencies.js +5 -5
- package/dist/utilities/dependencies/getDependencies.js.map +1 -1
- package/dist/utilities/dependencies/resolveFrom.d.ts.map +1 -1
- package/dist/utilities/dynamicImport.js +1 -1
- package/dist/utilities/dynamicImport.js.map +1 -1
- package/dist/utilities/escapeRegExp.d.ts.map +1 -1
- package/dist/utilities/extractID.d.ts.map +1 -1
- package/dist/utilities/filterDataToSelectedLocales.d.ts.map +1 -1
- package/dist/utilities/filterDataToSelectedLocales.js +5 -12
- package/dist/utilities/filterDataToSelectedLocales.js.map +1 -1
- package/dist/utilities/filterDataToSelectedLocales.spec.js +1 -2
- package/dist/utilities/filterDataToSelectedLocales.spec.js.map +1 -1
- package/dist/utilities/flattenAllFields.d.ts.map +1 -1
- package/dist/utilities/flattenAllFields.js +7 -22
- package/dist/utilities/flattenAllFields.js.map +1 -1
- package/dist/utilities/formatAdminURL.d.ts.map +1 -1
- package/dist/utilities/formatErrors.d.ts.map +1 -1
- package/dist/utilities/formatErrors.js +3 -1
- package/dist/utilities/formatErrors.js.map +1 -1
- package/dist/utilities/formatLabels.d.ts.map +1 -1
- package/dist/utilities/getBestFitFromSizes.d.ts.map +1 -1
- package/dist/utilities/getBlockSelect.d.ts.map +1 -1
- package/dist/utilities/getDataByPath.d.ts.map +1 -1
- package/dist/utilities/getEntityPermissions/getEntityPermissions.d.ts.map +1 -1
- package/dist/utilities/getEntityPermissions/getEntityPermissions.js +2 -0
- package/dist/utilities/getEntityPermissions/getEntityPermissions.js.map +1 -1
- package/dist/utilities/getEntityPermissions/populateFieldPermissions.d.ts +7 -1
- package/dist/utilities/getEntityPermissions/populateFieldPermissions.d.ts.map +1 -1
- package/dist/utilities/getEntityPermissions/populateFieldPermissions.js +24 -7
- package/dist/utilities/getEntityPermissions/populateFieldPermissions.js.map +1 -1
- package/dist/utilities/getFieldByPath.d.ts.map +1 -1
- package/dist/utilities/getFieldByPath.js +1 -1
- package/dist/utilities/getFieldByPath.js.map +1 -1
- package/dist/utilities/getFieldPermissions.d.ts.map +1 -1
- package/dist/utilities/getObjectDotNotation.d.ts.map +1 -1
- package/dist/utilities/getRequestEntity.d.ts.map +1 -1
- package/dist/utilities/getRequestLanguage.d.ts +2 -2
- package/dist/utilities/getRequestLanguage.d.ts.map +1 -1
- package/dist/utilities/getRequestLanguage.js.map +1 -1
- package/dist/utilities/getRequestOrigin.d.ts.map +1 -1
- package/dist/utilities/getSafeRedirect.d.ts.map +1 -1
- package/dist/utilities/getSelectMode.d.ts.map +1 -1
- package/dist/utilities/getSiblingData.d.ts.map +1 -1
- package/dist/utilities/getTranslatedLabel.d.ts.map +1 -1
- package/dist/utilities/getVersionsConfig.d.ts.map +1 -1
- package/dist/utilities/getVersionsConfig.js.map +1 -1
- package/dist/utilities/handleEndpoints.d.ts.map +1 -1
- package/dist/utilities/handleEndpoints.js +7 -4
- package/dist/utilities/handleEndpoints.js.map +1 -1
- package/dist/utilities/headersWithCors.d.ts.map +1 -1
- package/dist/utilities/isEntityHidden.d.ts.map +1 -1
- package/dist/utilities/isURLAllowed.d.ts.map +1 -1
- package/dist/utilities/isValidID.d.ts.map +1 -1
- package/dist/utilities/logError.d.ts.map +1 -1
- package/dist/utilities/logger.d.ts.map +1 -1
- package/dist/utilities/mergeHeaders.d.ts.map +1 -1
- package/dist/utilities/mergeListSearchAndWhere.d.ts.map +1 -1
- package/dist/utilities/mergeLocalizedData.d.ts +14 -4
- package/dist/utilities/mergeLocalizedData.d.ts.map +1 -1
- package/dist/utilities/mergeLocalizedData.js +54 -46
- package/dist/utilities/mergeLocalizedData.js.map +1 -1
- package/dist/utilities/mergeLocalizedData.spec.js +23 -23
- package/dist/utilities/mergeLocalizedData.spec.js.map +1 -1
- package/dist/utilities/optionsAreEqual.d.ts.map +1 -1
- package/dist/utilities/parseBooleanString.d.ts.map +1 -1
- package/dist/utilities/parseCookies.d.ts.map +1 -1
- package/dist/utilities/parseParams/index.d.ts +2 -5
- package/dist/utilities/parseParams/index.d.ts.map +1 -1
- package/dist/utilities/parseParams/index.js.map +1 -1
- package/dist/utilities/parseParams/index.spec.js +0 -9
- package/dist/utilities/parseParams/index.spec.js.map +1 -1
- package/dist/utilities/profiling.d.ts.map +1 -1
- package/dist/utilities/reduceFieldsToValues.d.ts.map +1 -1
- package/dist/utilities/resolveSelect.d.ts.map +1 -1
- package/dist/utilities/routeError.d.ts.map +1 -1
- package/dist/utilities/sanitizeFallbackLocale.d.ts.map +1 -1
- package/dist/utilities/sanitizeInternalFields.d.ts.map +1 -1
- package/dist/utilities/sanitizeJoinParams.d.ts.map +1 -1
- package/dist/utilities/sanitizePopulateParam.d.ts.map +1 -1
- package/dist/utilities/sanitizeSelect.d.ts.map +1 -1
- package/dist/utilities/sanitizeSelectParam.d.ts.map +1 -1
- package/dist/utilities/sanitizeSortParams.d.ts.map +1 -1
- package/dist/utilities/setsAreEqual.d.ts.map +1 -1
- package/dist/utilities/slugify.d.ts.map +1 -1
- package/dist/utilities/stripUnselectedFields.d.ts.map +1 -1
- package/dist/utilities/telemetry/events/adminInit.d.ts.map +1 -1
- package/dist/utilities/telemetry/events/serverInit.d.ts.map +1 -1
- package/dist/utilities/telemetry/index.d.ts.map +1 -1
- package/dist/utilities/telemetry/oneWayHash.d.ts.map +1 -1
- package/dist/utilities/timestamp.d.ts.map +1 -1
- package/dist/utilities/toKebabCase.d.ts.map +1 -1
- package/dist/utilities/transformColumnPreferences.d.ts.map +1 -1
- package/dist/utilities/transformColumnPreferences.js +4 -2
- package/dist/utilities/transformColumnPreferences.js.map +1 -1
- package/dist/utilities/transformWhereQuery.d.ts.map +1 -1
- package/dist/utilities/traverseFields.d.ts.map +1 -1
- package/dist/utilities/traverseFields.js +2 -4
- package/dist/utilities/traverseFields.js.map +1 -1
- package/dist/utilities/traverseForLocalizedFields.d.ts.map +1 -1
- package/dist/utilities/traverseForLocalizedFields.js +3 -0
- package/dist/utilities/traverseForLocalizedFields.js.map +1 -1
- package/dist/utilities/unflatten.d.ts.map +1 -1
- package/dist/utilities/validateMimeType.d.ts.map +1 -1
- package/dist/utilities/validateTimezones.d.ts.map +1 -1
- package/dist/utilities/validateWhereQuery.d.ts.map +1 -1
- package/dist/utilities/wordBoundariesRegex.d.ts.map +1 -1
- package/dist/utilities/wrapInternalEndpoints.d.ts.map +1 -1
- package/dist/versions/baseFields.d.ts +1 -2
- package/dist/versions/baseFields.d.ts.map +1 -1
- package/dist/versions/baseFields.js +0 -13
- package/dist/versions/baseFields.js.map +1 -1
- package/dist/versions/buildCollectionFields.d.ts.map +1 -1
- package/dist/versions/buildCollectionFields.js +0 -2
- package/dist/versions/buildCollectionFields.js.map +1 -1
- package/dist/versions/buildGlobalFields.d.ts.map +1 -1
- package/dist/versions/buildGlobalFields.js +0 -2
- package/dist/versions/buildGlobalFields.js.map +1 -1
- package/dist/versions/buildSingleLocalePublishData.d.ts +32 -0
- package/dist/versions/buildSingleLocalePublishData.d.ts.map +1 -0
- package/dist/versions/buildSingleLocalePublishData.js +37 -0
- package/dist/versions/buildSingleLocalePublishData.js.map +1 -0
- package/dist/versions/buildVersionCompoundIndexes.d.ts.map +1 -1
- package/dist/versions/deleteCollectionVersions.d.ts.map +1 -1
- package/dist/versions/deleteScheduledPublishJobs.d.ts.map +1 -1
- package/dist/versions/drafts/appendVersionToQueryKey.d.ts.map +1 -1
- package/dist/versions/drafts/getQueryDraftsSelect.d.ts.map +1 -1
- package/dist/versions/drafts/getQueryDraftsSort.d.ts.map +1 -1
- package/dist/versions/drafts/replaceWithDraftIfAvailable.d.ts.map +1 -1
- package/dist/versions/enforceMaxVersions.d.ts.map +1 -1
- package/dist/versions/getLatestCollectionVersion.d.ts.map +1 -1
- package/dist/versions/getLatestGlobalVersion.d.ts.map +1 -1
- package/dist/versions/migrations/localizeStatus/shared.d.ts.map +1 -1
- package/dist/versions/saveVersion.d.ts +0 -2
- package/dist/versions/saveVersion.d.ts.map +1 -1
- package/dist/versions/saveVersion.js +12 -17
- package/dist/versions/saveVersion.js.map +1 -1
- package/dist/versions/schedule/job.d.ts.map +1 -1
- package/dist/versions/schedule/job.js +2 -9
- package/dist/versions/schedule/job.js.map +1 -1
- package/dist/versions/types.d.ts +2 -15
- package/dist/versions/types.d.ts.map +1 -1
- package/dist/versions/types.js.map +1 -1
- package/package.json +23 -20
- package/dist/database/migrations/templates/localizeStatus.d.ts +0 -10
- package/dist/database/migrations/templates/localizeStatus.d.ts.map +0 -1
- package/dist/database/migrations/templates/localizeStatus.js +0 -54
- package/dist/database/migrations/templates/localizeStatus.js.map +0 -1
- package/dist/versions/migrations/localizeStatus/index.d.ts +0 -12
- package/dist/versions/migrations/localizeStatus/index.d.ts.map +0 -1
- package/dist/versions/migrations/localizeStatus/index.js +0 -33
- package/dist/versions/migrations/localizeStatus/index.js.map +0 -1
- package/dist/versions/migrations/localizeStatus/mongo/down.d.ts +0 -9
- package/dist/versions/migrations/localizeStatus/mongo/down.d.ts.map +0 -1
- package/dist/versions/migrations/localizeStatus/mongo/down.js +0 -112
- package/dist/versions/migrations/localizeStatus/mongo/down.js.map +0 -1
- package/dist/versions/migrations/localizeStatus/mongo/index.d.ts +0 -8
- package/dist/versions/migrations/localizeStatus/mongo/index.d.ts.map +0 -1
- package/dist/versions/migrations/localizeStatus/mongo/index.js +0 -8
- package/dist/versions/migrations/localizeStatus/mongo/index.js.map +0 -1
- package/dist/versions/migrations/localizeStatus/mongo/up.d.ts +0 -9
- package/dist/versions/migrations/localizeStatus/mongo/up.d.ts.map +0 -1
- package/dist/versions/migrations/localizeStatus/mongo/up.js +0 -220
- package/dist/versions/migrations/localizeStatus/mongo/up.js.map +0 -1
- package/dist/versions/migrations/localizeStatus/sql/down.d.ts +0 -11
- package/dist/versions/migrations/localizeStatus/sql/down.d.ts.map +0 -1
- package/dist/versions/migrations/localizeStatus/sql/down.js +0 -213
- package/dist/versions/migrations/localizeStatus/sql/down.js.map +0 -1
- package/dist/versions/migrations/localizeStatus/sql/index.d.ts +0 -8
- package/dist/versions/migrations/localizeStatus/sql/index.d.ts.map +0 -1
- package/dist/versions/migrations/localizeStatus/sql/index.js +0 -8
- package/dist/versions/migrations/localizeStatus/sql/index.js.map +0 -1
- package/dist/versions/migrations/localizeStatus/sql/migrateMainCollection.d.ts +0 -13
- package/dist/versions/migrations/localizeStatus/sql/migrateMainCollection.d.ts.map +0 -1
- package/dist/versions/migrations/localizeStatus/sql/migrateMainCollection.js +0 -51
- package/dist/versions/migrations/localizeStatus/sql/migrateMainCollection.js.map +0 -1
- package/dist/versions/migrations/localizeStatus/sql/migrateMainGlobal.d.ts +0 -13
- package/dist/versions/migrations/localizeStatus/sql/migrateMainGlobal.d.ts.map +0 -1
- package/dist/versions/migrations/localizeStatus/sql/migrateMainGlobal.js +0 -54
- package/dist/versions/migrations/localizeStatus/sql/migrateMainGlobal.js.map +0 -1
- package/dist/versions/migrations/localizeStatus/sql/up.d.ts +0 -11
- package/dist/versions/migrations/localizeStatus/sql/up.d.ts.map +0 -1
- package/dist/versions/migrations/localizeStatus/sql/up.js +0 -277
- package/dist/versions/migrations/localizeStatus/sql/up.js.map +0 -1
- package/dist/versions/saveSnapshot.d.ts +0 -18
- package/dist/versions/saveSnapshot.d.ts.map +0 -1
- package/dist/versions/saveSnapshot.js +0 -38
- package/dist/versions/saveSnapshot.js.map +0 -1
|
@@ -52,7 +52,7 @@ import { defaultAccess } from '../../auth/defaultAccess.js';
|
|
|
52
52
|
indexes: [],
|
|
53
53
|
timestamps: true,
|
|
54
54
|
upload: false,
|
|
55
|
-
versions:
|
|
55
|
+
versions: true
|
|
56
56
|
};
|
|
57
57
|
export const addDefaultsToCollectionConfig = (collection)=>{
|
|
58
58
|
collection.access = {
|
|
@@ -109,25 +109,10 @@ export const addDefaultsToCollectionConfig = (collection)=>{
|
|
|
109
109
|
};
|
|
110
110
|
collection.timestamps = collection.timestamps ?? true;
|
|
111
111
|
collection.upload = collection.upload ?? false;
|
|
112
|
-
collection.versions = collection.versions ??
|
|
112
|
+
collection.versions = collection.versions ?? true;
|
|
113
113
|
collection.indexes = collection.indexes ?? [];
|
|
114
114
|
return collection;
|
|
115
115
|
};
|
|
116
|
-
/**
|
|
117
|
-
* @deprecated - remove in 4.0. This is error-prone, as mutating this object will affect any objects that use the defaults as a base.
|
|
118
|
-
*/ export const authDefaults = {
|
|
119
|
-
cookies: {
|
|
120
|
-
sameSite: 'Lax',
|
|
121
|
-
secure: false
|
|
122
|
-
},
|
|
123
|
-
forgotPassword: {},
|
|
124
|
-
lockTime: 600000,
|
|
125
|
-
loginWithUsername: false,
|
|
126
|
-
maxLoginAttempts: 5,
|
|
127
|
-
tokenExpiration: 7200,
|
|
128
|
-
useSessions: true,
|
|
129
|
-
verify: false
|
|
130
|
-
};
|
|
131
116
|
export const addDefaultsToAuthConfig = (auth)=>{
|
|
132
117
|
auth.cookies = {
|
|
133
118
|
sameSite: 'Lax',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/collections/config/defaults.ts"],"sourcesContent":["import type { IncomingAuthType, LoginWithUsernameOptions } from '../../auth/types.js'\nimport type { CollectionConfig } from './types.js'\n\nimport { defaultAccess } from '../../auth/defaultAccess.js'\n\n/**\n * @deprecated - remove in 4.0. This is error-prone, as mutating this object will affect any objects that use the defaults as a base.\n */\nexport const defaults: Partial<CollectionConfig> = {\n access: {\n create: defaultAccess,\n delete: defaultAccess,\n read: defaultAccess,\n unlock: defaultAccess,\n update: defaultAccess,\n },\n admin: {\n components: {},\n custom: {},\n enableRichTextLink: true,\n enableRichTextRelationship: true,\n pagination: {\n defaultLimit: 10,\n limits: [5, 10, 25, 50, 100],\n },\n useAsTitle: 'id',\n },\n auth: false,\n custom: {},\n endpoints: [],\n fields: [],\n hooks: {\n afterChange: [],\n afterDelete: [],\n afterForgotPassword: [],\n afterLogin: [],\n afterLogout: [],\n afterMe: [],\n afterOperation: [],\n afterRead: [],\n afterRefresh: [],\n beforeChange: [],\n beforeDelete: [],\n beforeLogin: [],\n beforeOperation: [],\n beforeRead: [],\n beforeValidate: [],\n me: [],\n refresh: [],\n },\n indexes: [],\n timestamps: true,\n upload: false,\n versions:
|
|
1
|
+
{"version":3,"sources":["../../../src/collections/config/defaults.ts"],"sourcesContent":["import type { IncomingAuthType, LoginWithUsernameOptions } from '../../auth/types.js'\nimport type { CollectionConfig } from './types.js'\n\nimport { defaultAccess } from '../../auth/defaultAccess.js'\n\n/**\n * @deprecated - remove in 4.0. This is error-prone, as mutating this object will affect any objects that use the defaults as a base.\n */\nexport const defaults: Partial<CollectionConfig> = {\n access: {\n create: defaultAccess,\n delete: defaultAccess,\n read: defaultAccess,\n unlock: defaultAccess,\n update: defaultAccess,\n },\n admin: {\n components: {},\n custom: {},\n enableRichTextLink: true,\n enableRichTextRelationship: true,\n pagination: {\n defaultLimit: 10,\n limits: [5, 10, 25, 50, 100],\n },\n useAsTitle: 'id',\n },\n auth: false,\n custom: {},\n endpoints: [],\n fields: [],\n hooks: {\n afterChange: [],\n afterDelete: [],\n afterForgotPassword: [],\n afterLogin: [],\n afterLogout: [],\n afterMe: [],\n afterOperation: [],\n afterRead: [],\n afterRefresh: [],\n beforeChange: [],\n beforeDelete: [],\n beforeLogin: [],\n beforeOperation: [],\n beforeRead: [],\n beforeValidate: [],\n me: [],\n refresh: [],\n },\n indexes: [],\n timestamps: true,\n upload: false,\n versions: true,\n}\n\nexport const addDefaultsToCollectionConfig = (collection: CollectionConfig): CollectionConfig => {\n collection.access = {\n create: defaultAccess,\n delete: defaultAccess,\n read: defaultAccess,\n unlock: defaultAccess,\n update: defaultAccess,\n ...(collection.access || {}),\n }\n\n collection.admin = {\n components: {},\n custom: {},\n enableRichTextLink: true,\n enableRichTextRelationship: true,\n useAsTitle: 'id',\n ...(collection.admin || {}),\n pagination: {\n defaultLimit: 10,\n limits: [5, 10, 25, 50, 100],\n ...(collection.admin?.pagination || {}),\n },\n }\n\n collection.auth = collection.auth ?? false\n collection.custom = collection.custom ?? {}\n collection.endpoints = collection.endpoints ?? []\n collection.fields = collection.fields ?? []\n collection.hierarchy = collection.hierarchy ?? false\n\n collection.hooks = {\n afterChange: [],\n afterDelete: [],\n afterForgotPassword: [],\n afterLogin: [],\n afterLogout: [],\n afterMe: [],\n afterOperation: [],\n afterRead: [],\n afterRefresh: [],\n beforeChange: [],\n beforeDelete: [],\n beforeLogin: [],\n beforeOperation: [],\n beforeRead: [],\n beforeValidate: [],\n me: [],\n refresh: [],\n ...(collection.hooks || {}),\n }\n\n collection.timestamps = collection.timestamps ?? true\n collection.upload = collection.upload ?? false\n collection.versions = collection.versions ?? true\n\n collection.indexes = collection.indexes ?? []\n\n return collection\n}\n\nexport const addDefaultsToAuthConfig = (auth: IncomingAuthType): IncomingAuthType => {\n auth.cookies = {\n sameSite: 'Lax',\n secure: false,\n ...(auth.cookies || {}),\n }\n\n auth.forgotPassword = auth.forgotPassword ?? {}\n auth.lockTime = auth.lockTime ?? 600000 // 10 minutes\n auth.loginWithUsername = auth.loginWithUsername ?? false\n auth.maxLoginAttempts = auth.maxLoginAttempts ?? 5\n auth.tokenExpiration = auth.tokenExpiration ?? 7200\n auth.useSessions = auth.useSessions ?? true\n auth.verify = auth.verify ?? false\n auth.strategies = auth.strategies ?? []\n\n if (!auth.disableLocalStrategy && auth.verify === true) {\n auth.verify = {}\n }\n\n return auth\n}\n\n/**\n * @deprecated - remove in 4.0. This is error-prone, as mutating this object will affect any objects that use the defaults as a base.\n */\nexport const loginWithUsernameDefaults: LoginWithUsernameOptions = {\n allowEmailLogin: false,\n requireEmail: false,\n requireUsername: true,\n}\n\nexport const addDefaultsToLoginWithUsernameConfig = (\n loginWithUsername: LoginWithUsernameOptions,\n): LoginWithUsernameOptions =>\n ({\n allowEmailLogin: false,\n requireEmail: false,\n requireUsername: true,\n ...(loginWithUsername || {}),\n }) as LoginWithUsernameOptions\n"],"names":["defaultAccess","defaults","access","create","delete","read","unlock","update","admin","components","custom","enableRichTextLink","enableRichTextRelationship","pagination","defaultLimit","limits","useAsTitle","auth","endpoints","fields","hooks","afterChange","afterDelete","afterForgotPassword","afterLogin","afterLogout","afterMe","afterOperation","afterRead","afterRefresh","beforeChange","beforeDelete","beforeLogin","beforeOperation","beforeRead","beforeValidate","me","refresh","indexes","timestamps","upload","versions","addDefaultsToCollectionConfig","collection","hierarchy","addDefaultsToAuthConfig","cookies","sameSite","secure","forgotPassword","lockTime","loginWithUsername","maxLoginAttempts","tokenExpiration","useSessions","verify","strategies","disableLocalStrategy","loginWithUsernameDefaults","allowEmailLogin","requireEmail","requireUsername","addDefaultsToLoginWithUsernameConfig"],"mappings":"AAGA,SAASA,aAAa,QAAQ,8BAA6B;AAE3D;;CAEC,GACD,OAAO,MAAMC,WAAsC;IACjDC,QAAQ;QACNC,QAAQH;QACRI,QAAQJ;QACRK,MAAML;QACNM,QAAQN;QACRO,QAAQP;IACV;IACAQ,OAAO;QACLC,YAAY,CAAC;QACbC,QAAQ,CAAC;QACTC,oBAAoB;QACpBC,4BAA4B;QAC5BC,YAAY;YACVC,cAAc;YACdC,QAAQ;gBAAC;gBAAG;gBAAI;gBAAI;gBAAI;aAAI;QAC9B;QACAC,YAAY;IACd;IACAC,MAAM;IACNP,QAAQ,CAAC;IACTQ,WAAW,EAAE;IACbC,QAAQ,EAAE;IACVC,OAAO;QACLC,aAAa,EAAE;QACfC,aAAa,EAAE;QACfC,qBAAqB,EAAE;QACvBC,YAAY,EAAE;QACdC,aAAa,EAAE;QACfC,SAAS,EAAE;QACXC,gBAAgB,EAAE;QAClBC,WAAW,EAAE;QACbC,cAAc,EAAE;QAChBC,cAAc,EAAE;QAChBC,cAAc,EAAE;QAChBC,aAAa,EAAE;QACfC,iBAAiB,EAAE;QACnBC,YAAY,EAAE;QACdC,gBAAgB,EAAE;QAClBC,IAAI,EAAE;QACNC,SAAS,EAAE;IACb;IACAC,SAAS,EAAE;IACXC,Y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'vitest';
|
|
2
|
+
import { addDefaultsToCollectionConfig } from './defaults.js';
|
|
3
|
+
describe('addDefaultsToCollectionConfig', ()=>{
|
|
4
|
+
it('should default versions to true when not specified', ()=>{
|
|
5
|
+
const collection = {
|
|
6
|
+
slug: 'posts',
|
|
7
|
+
fields: []
|
|
8
|
+
};
|
|
9
|
+
const result = addDefaultsToCollectionConfig(collection);
|
|
10
|
+
expect(result.versions).toBe(true);
|
|
11
|
+
});
|
|
12
|
+
it('should preserve explicit versions: false', ()=>{
|
|
13
|
+
const collection = {
|
|
14
|
+
slug: 'users',
|
|
15
|
+
fields: [],
|
|
16
|
+
versions: false
|
|
17
|
+
};
|
|
18
|
+
const result = addDefaultsToCollectionConfig(collection);
|
|
19
|
+
expect(result.versions).toBe(false);
|
|
20
|
+
});
|
|
21
|
+
it('should preserve explicit versions object config', ()=>{
|
|
22
|
+
const collection = {
|
|
23
|
+
slug: 'posts',
|
|
24
|
+
fields: [],
|
|
25
|
+
versions: {
|
|
26
|
+
drafts: true,
|
|
27
|
+
maxPerDoc: 50
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
const result = addDefaultsToCollectionConfig(collection);
|
|
31
|
+
expect(result.versions).toEqual({
|
|
32
|
+
drafts: true,
|
|
33
|
+
maxPerDoc: 50
|
|
34
|
+
});
|
|
35
|
+
});
|
|
36
|
+
it('should preserve explicit versions: true', ()=>{
|
|
37
|
+
const collection = {
|
|
38
|
+
slug: 'posts',
|
|
39
|
+
fields: [],
|
|
40
|
+
versions: true
|
|
41
|
+
};
|
|
42
|
+
const result = addDefaultsToCollectionConfig(collection);
|
|
43
|
+
expect(result.versions).toBe(true);
|
|
44
|
+
});
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
//# sourceMappingURL=defaults.spec.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/collections/config/defaults.spec.ts"],"sourcesContent":["import type { CollectionConfig } from './types.js'\n\nimport { describe, expect, it } from 'vitest'\n\nimport { addDefaultsToCollectionConfig } from './defaults.js'\n\ndescribe('addDefaultsToCollectionConfig', () => {\n it('should default versions to true when not specified', () => {\n const collection: CollectionConfig = {\n slug: 'posts',\n fields: [],\n }\n\n const result = addDefaultsToCollectionConfig(collection)\n\n expect(result.versions).toBe(true)\n })\n\n it('should preserve explicit versions: false', () => {\n const collection: CollectionConfig = {\n slug: 'users',\n fields: [],\n versions: false,\n }\n\n const result = addDefaultsToCollectionConfig(collection)\n\n expect(result.versions).toBe(false)\n })\n\n it('should preserve explicit versions object config', () => {\n const collection: CollectionConfig = {\n slug: 'posts',\n fields: [],\n versions: { drafts: true, maxPerDoc: 50 },\n }\n\n const result = addDefaultsToCollectionConfig(collection)\n\n expect(result.versions).toEqual({ drafts: true, maxPerDoc: 50 })\n })\n\n it('should preserve explicit versions: true', () => {\n const collection: CollectionConfig = {\n slug: 'posts',\n fields: [],\n versions: true,\n }\n\n const result = addDefaultsToCollectionConfig(collection)\n\n expect(result.versions).toBe(true)\n })\n})\n"],"names":["describe","expect","it","addDefaultsToCollectionConfig","collection","slug","fields","result","versions","toBe","drafts","maxPerDoc","toEqual"],"mappings":"AAEA,SAASA,QAAQ,EAAEC,MAAM,EAAEC,EAAE,QAAQ,SAAQ;AAE7C,SAASC,6BAA6B,QAAQ,gBAAe;AAE7DH,SAAS,iCAAiC;IACxCE,GAAG,sDAAsD;QACvD,MAAME,aAA+B;YACnCC,MAAM;YACNC,QAAQ,EAAE;QACZ;QAEA,MAAMC,SAASJ,8BAA8BC;QAE7CH,OAAOM,OAAOC,QAAQ,EAAEC,IAAI,CAAC;IAC/B;IAEAP,GAAG,4CAA4C;QAC7C,MAAME,aAA+B;YACnCC,MAAM;YACNC,QAAQ,EAAE;YACVE,UAAU;QACZ;QAEA,MAAMD,SAASJ,8BAA8BC;QAE7CH,OAAOM,OAAOC,QAAQ,EAAEC,IAAI,CAAC;IAC/B;IAEAP,GAAG,mDAAmD;QACpD,MAAME,aAA+B;YACnCC,MAAM;YACNC,QAAQ,EAAE;YACVE,UAAU;gBAAEE,QAAQ;gBAAMC,WAAW;YAAG;QAC1C;QAEA,MAAMJ,SAASJ,8BAA8BC;QAE7CH,OAAOM,OAAOC,QAAQ,EAAEI,OAAO,CAAC;YAAEF,QAAQ;YAAMC,WAAW;QAAG;IAChE;IAEAT,GAAG,2CAA2C;QAC5C,MAAME,aAA+B;YACnCC,MAAM;YACNC,QAAQ,EAAE;YACVE,UAAU;QACZ;QAEA,MAAMD,SAASJ,8BAA8BC;QAE7CH,OAAOM,OAAOC,QAAQ,EAAEC,IAAI,CAAC;IAC/B;AACF"}
|
|
@@ -6,5 +6,14 @@ import type { CollectionConfig, SanitizedCollectionConfig } from './types.js';
|
|
|
6
6
|
* Views without `path` will never be matched by the router and are silently ignored.
|
|
7
7
|
*/
|
|
8
8
|
export declare const warnOnInvalidCustomViews: (collection: CollectionConfig) => void;
|
|
9
|
-
export declare const sanitizeCollection: (config: Config, collection: CollectionConfig,
|
|
9
|
+
export declare const sanitizeCollection: (config: Config, collection: CollectionConfig,
|
|
10
|
+
/**
|
|
11
|
+
* If this property is set, RichText fields won't be sanitized immediately. Instead, they will be added to this array as promises
|
|
12
|
+
* so that you can sanitize them together, after the config has been sanitized.
|
|
13
|
+
*/
|
|
14
|
+
richTextSanitizationPromises?: Array<(config: SanitizedConfig) => Promise<void>>, _validRelationships?: string[],
|
|
15
|
+
/**
|
|
16
|
+
* Tracker for orderable join fields - populated during sanitization
|
|
17
|
+
*/
|
|
18
|
+
orderableJoins?: OrderableJoinInfo[]) => Promise<SanitizedCollectionConfig>;
|
|
10
19
|
//# sourceMappingURL=sanitize.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sanitize.d.ts","sourceRoot":"","sources":["../../../src/collections/config/sanitize.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAA;AACpE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,0CAA0C,CAAA;
|
|
1
|
+
{"version":3,"file":"sanitize.d.ts","sourceRoot":"","sources":["../../../src/collections/config/sanitize.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAA;AACpE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,0CAA0C,CAAA;AAEjF,OAAO,KAAK,EACV,gBAAgB,EAChB,yBAAyB,EAG1B,MAAM,YAAY,CAAA;AA0BnB;;;GAGG;AACH,eAAO,MAAM,wBAAwB,GAAI,YAAY,gBAAgB,KAAG,IAuBvE,CAAA;AAED,eAAO,MAAM,kBAAkB,GAC7B,QAAQ,MAAM,EACd,YAAY,gBAAgB;AAC5B;;;GAGG;AACH,+BAA+B,KAAK,CAAC,CAAC,MAAM,EAAE,eAAe,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC,EAChF,sBAAsB,MAAM,EAAE;AAC9B;;GAEG;AACH,iBAAiB,iBAAiB,EAAE,KACnC,OAAO,CAAC,yBAAyB,CA+SnC,CAAA"}
|
|
@@ -10,7 +10,6 @@ import { uploadCollectionEndpoints } from '../../uploads/endpoints/index.js';
|
|
|
10
10
|
import { getBaseUploadFields } from '../../uploads/getBaseFields.js';
|
|
11
11
|
import { flattenAllFields } from '../../utilities/flattenAllFields.js';
|
|
12
12
|
import { formatLabels } from '../../utilities/formatLabels.js';
|
|
13
|
-
import { miniChalk } from '../../utilities/miniChalk.js';
|
|
14
13
|
import { traverseForLocalizedFields } from '../../utilities/traverseForLocalizedFields.js';
|
|
15
14
|
import { baseVersionFields } from '../../versions/baseFields.js';
|
|
16
15
|
import { versionDefaults } from '../../versions/defaults.js';
|
|
@@ -214,16 +213,7 @@ export const sanitizeCollection = async (config, collection, /**
|
|
|
214
213
|
};
|
|
215
214
|
}
|
|
216
215
|
const hasLocalizedFields = traverseForLocalizedFields(sanitized.fields);
|
|
217
|
-
|
|
218
|
-
if (hasLocalizedFields && sanitized.versions.drafts.localizeStatus === undefined) {
|
|
219
|
-
sanitized.versions.drafts.localizeStatus = false;
|
|
220
|
-
}
|
|
221
|
-
}
|
|
222
|
-
// TODO v4: remove this sanitization check, should not need to enable the experimental flag
|
|
223
|
-
if (sanitized.versions.drafts.localizeStatus && !config.experimental?.localizeStatus) {
|
|
224
|
-
sanitized.versions.drafts.localizeStatus = false;
|
|
225
|
-
console.log(miniChalk.yellowBold(`Warning: "localizeStatus" for drafts is an experimental feature. To enable, set "experimental.localizeStatus" to true in your Payload config.`));
|
|
226
|
-
}
|
|
216
|
+
sanitized.versions.drafts.localizeStatus = !!(config.localization && hasLocalizedFields);
|
|
227
217
|
if (sanitized.versions.drafts.autosave === true) {
|
|
228
218
|
sanitized.versions.drafts.autosave = {
|
|
229
219
|
interval: versionDefaults.autosaveInterval
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/collections/config/sanitize.ts"],"sourcesContent":["import type { Config, SanitizedConfig } from '../../config/types.js'\nimport type { OrderableJoinInfo } from '../../fields/config/sanitizeJoinField.js'\nimport type {\n CollectionConfig,\n SanitizedCollectionConfig,\n SanitizedJoin,\n SanitizedJoins,\n} from './types.js'\n\nimport { authCollectionEndpoints } from '../../auth/endpoints/index.js'\nimport { getBaseAuthFields } from '../../auth/getAuthFields.js'\nimport { TimestampsRequired } from '../../errors/TimestampsRequired.js'\nimport { sanitizeFields } from '../../fields/config/sanitize.js'\nimport { fieldAffectsData } from '../../fields/config/types.js'\nimport { mergeBaseFields } from '../../fields/mergeBaseFields.js'\nimport { buildFoldersHierarchy, buildTagsHierarchy } from '../../hierarchy/presets.js'\nimport { sanitizeHierarchyCollection } from '../../hierarchy/sanitizeHierarchyCollection.js'\nimport { uploadCollectionEndpoints } from '../../uploads/endpoints/index.js'\nimport { getBaseUploadFields } from '../../uploads/getBaseFields.js'\nimport { flattenAllFields } from '../../utilities/flattenAllFields.js'\nimport { formatLabels } from '../../utilities/formatLabels.js'\nimport { miniChalk } from '../../utilities/miniChalk.js'\nimport { traverseForLocalizedFields } from '../../utilities/traverseForLocalizedFields.js'\nimport { baseVersionFields } from '../../versions/baseFields.js'\nimport { versionDefaults } from '../../versions/defaults.js'\nimport { defaultCollectionEndpoints } from '../endpoints/index.js'\nimport {\n addDefaultsToAuthConfig,\n addDefaultsToCollectionConfig,\n addDefaultsToLoginWithUsernameConfig,\n} from './defaults.js'\nimport { sanitizeCompoundIndexes } from './sanitizeCompoundIndexes.js'\nimport { validateUseAsTitle } from './useAsTitle.js'\n\n/**\n * Warns at startup when custom collection views are misconfigured with a missing `path`.\n * Views without `path` will never be matched by the router and are silently ignored.\n */\nexport const warnOnInvalidCustomViews = (collection: CollectionConfig): void => {\n const views = collection.admin?.components?.views\n if (!views || typeof views !== 'object') {\n return\n }\n\n for (const [key, view] of Object.entries(views)) {\n if (key === 'edit' || key === 'list') {\n continue\n }\n\n if (view && typeof view === 'object' && 'Component' in view && !('path' in view)) {\n console.warn(\n `[Payload] Custom collection view \"${key}\" in collection \"${collection.slug}\" is missing a \"path\" property. The view will never be rendered.`,\n )\n }\n\n if (view && typeof view === 'object' && 'path' in view && !('Component' in view)) {\n console.warn(\n `[Payload] Custom collection view \"${key}\" in collection \"${collection.slug}\" has a \"path\" but is missing a \"Component\". The view will never be rendered.`,\n )\n }\n }\n}\n\nexport const sanitizeCollection = async (\n config: Config,\n collection: CollectionConfig,\n /**\n * If this property is set, RichText fields won't be sanitized immediately. Instead, they will be added to this array as promises\n * so that you can sanitize them together, after the config has been sanitized.\n */\n richTextSanitizationPromises?: Array<(config: SanitizedConfig) => Promise<void>>,\n _validRelationships?: string[],\n /**\n * Tracker for orderable join fields - populated during sanitization\n */\n orderableJoins?: OrderableJoinInfo[],\n): Promise<SanitizedCollectionConfig> => {\n if (collection._sanitized) {\n return collection as SanitizedCollectionConfig\n }\n\n collection._sanitized = true\n\n warnOnInvalidCustomViews(collection)\n\n // /////////////////////////////////\n // Make copy of collection config\n // /////////////////////////////////\n\n const sanitized: CollectionConfig = addDefaultsToCollectionConfig(collection)\n\n // /////////////////////////////////\n // Convert folders/tags to hierarchy\n // /////////////////////////////////\n\n const presetCount = [sanitized.folders, sanitized.tags, sanitized.hierarchy].filter(\n Boolean,\n ).length\n if (presetCount > 1) {\n throw new Error(\n `Collection \"${sanitized.slug}\": Only one of 'folders', 'tags', or 'hierarchy' can be specified`,\n )\n }\n\n if (sanitized.folders) {\n sanitized.labels = {\n plural: 'Folders',\n singular: 'Folder',\n ...sanitized.labels,\n }\n sanitized.hierarchy = buildFoldersHierarchy(sanitized.folders, sanitized.slug)\n // Set admin.group: false when sidebar tab enabled (folders accessed via tab)\n const sidebarTabEnabled =\n typeof sanitized.hierarchy === 'object' &&\n sanitized.hierarchy.admin?.injectSidebarTab !== false\n if (sidebarTabEnabled && sanitized.admin!.group === undefined) {\n sanitized.admin!.group = false\n }\n delete sanitized.folders\n }\n\n if (sanitized.tags) {\n sanitized.labels = {\n plural: 'Tags',\n singular: 'Tag',\n ...sanitized.labels,\n }\n sanitized.hierarchy = buildTagsHierarchy(sanitized.tags, sanitized.slug)\n // Tags also hidden from nav by default\n if (sanitized.admin!.group === undefined) {\n sanitized.admin!.group = false\n }\n delete sanitized.tags\n }\n\n // /////////////////////////////////\n // Sanitize fields\n // /////////////////////////////////\n\n const validRelationships = _validRelationships ?? config.collections!.map((c) => c.slug) ?? []\n\n const joins: SanitizedJoins = {}\n\n const polymorphicJoins: SanitizedJoin[] = []\n\n sanitized.fields = await sanitizeFields({\n collectionConfig: sanitized,\n config,\n fields: sanitized.fields,\n joinPath: '',\n joins,\n orderableJoins,\n parentIsLocalized: false,\n polymorphicJoins,\n richTextSanitizationPromises,\n validRelationships,\n })\n\n if (sanitized.endpoints !== false) {\n if (!sanitized.endpoints) {\n sanitized.endpoints = []\n }\n\n if (sanitized.auth) {\n for (const endpoint of authCollectionEndpoints) {\n sanitized.endpoints.push(endpoint)\n }\n }\n\n if (sanitized.upload) {\n for (const endpoint of uploadCollectionEndpoints) {\n sanitized.endpoints.push(endpoint)\n }\n }\n\n for (const endpoint of defaultCollectionEndpoints) {\n sanitized.endpoints.push(endpoint)\n }\n }\n\n if (sanitized.timestamps !== false) {\n // add default timestamps fields only as needed\n let hasUpdatedAt: boolean | null = null\n let hasCreatedAt: boolean | null = null\n let hasDeletedAt: boolean | null = null\n\n sanitized.fields.some((field) => {\n if (fieldAffectsData(field)) {\n if (field.name === 'updatedAt') {\n hasUpdatedAt = true\n }\n\n if (field.name === 'createdAt') {\n hasCreatedAt = true\n }\n\n if (field.name === 'deletedAt') {\n hasDeletedAt = true\n }\n }\n\n return hasCreatedAt && hasUpdatedAt && (!sanitized.trash || hasDeletedAt)\n })\n\n if (!hasUpdatedAt) {\n sanitized.fields.push({\n name: 'updatedAt',\n type: 'date',\n admin: {\n disabled: { bulkEdit: true },\n hidden: true,\n },\n index: true,\n label: ({ t }) => t('general:updatedAt'),\n })\n }\n\n if (!hasCreatedAt) {\n sanitized.fields.push({\n name: 'createdAt',\n admin: {\n disabled: { bulkEdit: true },\n hidden: true,\n },\n // The default sort for list view is createdAt. Thus, enabling indexing by default, is a major performance improvement, especially for large or a large amount of collections.\n type: 'date',\n index: true,\n label: ({ t }) => t('general:createdAt'),\n })\n }\n\n if (sanitized.trash && !hasDeletedAt) {\n sanitized.fields.push({\n name: 'deletedAt',\n type: 'date',\n admin: {\n disabled: { bulkEdit: true },\n hidden: true,\n },\n index: true,\n label: ({ t }) => t('general:deletedAt'),\n })\n }\n }\n\n const defaultLabels = formatLabels(sanitized.slug)\n\n sanitized.labels = {\n plural: sanitized.labels?.plural || defaultLabels.plural,\n singular: sanitized.labels?.singular || defaultLabels.singular,\n }\n\n if (sanitized.versions) {\n if (sanitized.timestamps === false) {\n throw new TimestampsRequired(collection)\n }\n\n if (sanitized.versions === true) {\n sanitized.versions = {\n drafts: false,\n maxPerDoc: 100,\n }\n }\n\n sanitized.versions.maxPerDoc =\n typeof sanitized.versions.maxPerDoc === 'number' ? sanitized.versions.maxPerDoc : 100\n\n if (sanitized.versions.drafts) {\n if (sanitized.versions.drafts === true) {\n sanitized.versions.drafts = {\n autosave: false,\n validate: false,\n }\n }\n\n const hasLocalizedFields = traverseForLocalizedFields(sanitized.fields)\n\n if (config.localization) {\n if (hasLocalizedFields && sanitized.versions.drafts.localizeStatus === undefined) {\n sanitized.versions.drafts.localizeStatus = false\n }\n }\n\n // TODO v4: remove this sanitization check, should not need to enable the experimental flag\n if (sanitized.versions.drafts.localizeStatus && !config.experimental?.localizeStatus) {\n sanitized.versions.drafts.localizeStatus = false\n console.log(\n miniChalk.yellowBold(\n `Warning: \"localizeStatus\" for drafts is an experimental feature. To enable, set \"experimental.localizeStatus\" to true in your Payload config.`,\n ),\n )\n }\n\n if (sanitized.versions.drafts.autosave === true) {\n sanitized.versions.drafts.autosave = {\n interval: versionDefaults.autosaveInterval,\n }\n }\n\n if (sanitized.versions.drafts.validate === undefined) {\n sanitized.versions.drafts.validate = false\n }\n\n sanitized.fields = mergeBaseFields(\n sanitized.fields,\n baseVersionFields({\n localized: sanitized.versions.drafts.localizeStatus ?? false,\n }),\n )\n }\n } else {\n delete sanitized.versions\n }\n\n // Sanitize hierarchy configuration (phase 1 - per collection)\n sanitizeHierarchyCollection(sanitized, config)\n\n if (sanitized.upload) {\n if (sanitized.upload === true) {\n sanitized.upload = {}\n }\n\n sanitized.upload.cacheTags = sanitized.upload?.cacheTags ?? true\n sanitized.upload.bulkUpload = sanitized.upload?.bulkUpload ?? true\n sanitized.upload.staticDir = sanitized.upload.staticDir || sanitized.slug\n sanitized.admin!.useAsTitle =\n sanitized.admin?.useAsTitle && sanitized.admin.useAsTitle !== 'id'\n ? sanitized.admin.useAsTitle\n : 'filename'\n\n const uploadFields = getBaseUploadFields({\n collection: sanitized,\n config,\n })\n\n sanitized.fields = mergeBaseFields(sanitized.fields, uploadFields)\n }\n\n if (sanitized.auth) {\n sanitized.auth = addDefaultsToAuthConfig(\n typeof sanitized.auth === 'boolean' ? {} : sanitized.auth,\n )\n\n // disable duplicate for auth enabled collections by default\n sanitized.disableDuplicate = sanitized.disableDuplicate ?? true\n\n if (sanitized.auth.loginWithUsername) {\n if (sanitized.auth.loginWithUsername === true) {\n sanitized.auth.loginWithUsername = addDefaultsToLoginWithUsernameConfig({})\n } else {\n const loginWithUsernameWithDefaults = addDefaultsToLoginWithUsernameConfig(\n sanitized.auth.loginWithUsername,\n )\n\n // if allowEmailLogin is false, requireUsername must be true\n if (loginWithUsernameWithDefaults.allowEmailLogin === false) {\n loginWithUsernameWithDefaults.requireUsername = true\n }\n sanitized.auth.loginWithUsername = loginWithUsernameWithDefaults\n }\n } else {\n sanitized.auth.loginWithUsername = false\n }\n\n if (!collection?.admin?.useAsTitle) {\n sanitized.admin!.useAsTitle = sanitized.auth.loginWithUsername ? 'username' : 'email'\n }\n\n sanitized.fields = mergeBaseFields(sanitized.fields, getBaseAuthFields(sanitized.auth))\n }\n\n if (collection?.admin?.pagination?.limits?.length) {\n sanitized.admin!.pagination!.limits = collection.admin.pagination.limits\n }\n\n validateUseAsTitle(sanitized)\n\n const sanitizedConfig = sanitized as SanitizedCollectionConfig\n\n sanitizedConfig.joins = joins\n sanitizedConfig.polymorphicJoins = polymorphicJoins\n\n sanitizedConfig.flattenedFields = flattenAllFields({ fields: sanitizedConfig.fields })\n\n sanitizedConfig.sanitizedIndexes = sanitizeCompoundIndexes({\n fields: sanitizedConfig.flattenedFields,\n indexes: sanitizedConfig.indexes,\n })\n\n return sanitizedConfig\n}\n"],"names":["authCollectionEndpoints","getBaseAuthFields","TimestampsRequired","sanitizeFields","fieldAffectsData","mergeBaseFields","buildFoldersHierarchy","buildTagsHierarchy","sanitizeHierarchyCollection","uploadCollectionEndpoints","getBaseUploadFields","flattenAllFields","formatLabels","miniChalk","traverseForLocalizedFields","baseVersionFields","versionDefaults","defaultCollectionEndpoints","addDefaultsToAuthConfig","addDefaultsToCollectionConfig","addDefaultsToLoginWithUsernameConfig","sanitizeCompoundIndexes","validateUseAsTitle","warnOnInvalidCustomViews","collection","views","admin","components","key","view","Object","entries","console","warn","slug","sanitizeCollection","config","richTextSanitizationPromises","_validRelationships","orderableJoins","_sanitized","sanitized","presetCount","folders","tags","hierarchy","filter","Boolean","length","Error","labels","plural","singular","sidebarTabEnabled","injectSidebarTab","group","undefined","validRelationships","collections","map","c","joins","polymorphicJoins","fields","collectionConfig","joinPath","parentIsLocalized","endpoints","auth","endpoint","push","upload","timestamps","hasUpdatedAt","hasCreatedAt","hasDeletedAt","some","field","name","trash","type","disabled","bulkEdit","hidden","index","label","t","defaultLabels","versions","drafts","maxPerDoc","autosave","validate","hasLocalizedFields","localization","localizeStatus","experimental","log","yellowBold","interval","autosaveInterval","localized","cacheTags","bulkUpload","staticDir","useAsTitle","uploadFields","disableDuplicate","loginWithUsername","loginWithUsernameWithDefaults","allowEmailLogin","requireUsername","pagination","limits","sanitizedConfig","flattenedFields","sanitizedIndexes","indexes"],"mappings":"AASA,SAASA,uBAAuB,QAAQ,gCAA+B;AACvE,SAASC,iBAAiB,QAAQ,8BAA6B;AAC/D,SAASC,kBAAkB,QAAQ,qCAAoC;AACvE,SAASC,cAAc,QAAQ,kCAAiC;AAChE,SAASC,gBAAgB,QAAQ,+BAA8B;AAC/D,SAASC,eAAe,QAAQ,kCAAiC;AACjE,SAASC,qBAAqB,EAAEC,kBAAkB,QAAQ,6BAA4B;AACtF,SAASC,2BAA2B,QAAQ,iDAAgD;AAC5F,SAASC,yBAAyB,QAAQ,mCAAkC;AAC5E,SAASC,mBAAmB,QAAQ,iCAAgC;AACpE,SAASC,gBAAgB,QAAQ,sCAAqC;AACtE,SAASC,YAAY,QAAQ,kCAAiC;AAC9D,SAASC,SAAS,QAAQ,+BAA8B;AACxD,SAASC,0BAA0B,QAAQ,gDAA+C;AAC1F,SAASC,iBAAiB,QAAQ,+BAA8B;AAChE,SAASC,eAAe,QAAQ,6BAA4B;AAC5D,SAASC,0BAA0B,QAAQ,wBAAuB;AAClE,SACEC,u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,CAACwC,iBAAiB,GAAG,aAAa;QAChF;QAEAnE,UAAUsB,MAAM,GAAG1D,gBAAgBoC,UAAUsB,MAAM,EAAE9D,kBAAkBwC,UAAU2B,IAAI;IACvF;IAEA,IAAI5C,YAAYE,OAAOsF,YAAYC,QAAQjE,QAAQ;QACjDP,UAAUf,KAAK,CAAEsF,UAAU,CAAEC,MAAM,GAAGzF,WAAWE,KAAK,CAACsF,UAAU,CAACC,MAAM;IAC1E;IAEA3F,mBAAmBmB;IAEnB,MAAMyE,kBAAkBzE;IAExByE,gBAAgBrD,KAAK,GAAGA;IACxBqD,gBAAgBpD,gBAAgB,GAAGA;IAEnCoD,gBAAgBC,eAAe,GAAGxG,iBAAiB;QAAEoD,QAAQmD,gBAAgBnD,MAAM;IAAC;IAEpFmD,gBAAgBE,gBAAgB,GAAG/F,wBAAwB;QACzD0C,QAAQmD,gBAAgBC,eAAe;QACvCE,SAASH,gBAAgBG,OAAO;IAClC;IAEA,OAAOH;AACT,EAAC"}
|
|
1
|
+
{"version":3,"sources":["../../../src/collections/config/sanitize.ts"],"sourcesContent":["import type { Config, SanitizedConfig } from '../../config/types.js'\nimport type { OrderableJoinInfo } from '../../fields/config/sanitizeJoinField.js'\nimport type { SanitizedDrafts } from '../../versions/types.js'\nimport type {\n CollectionConfig,\n SanitizedCollectionConfig,\n SanitizedJoin,\n SanitizedJoins,\n} from './types.js'\n\nimport { authCollectionEndpoints } from '../../auth/endpoints/index.js'\nimport { getBaseAuthFields } from '../../auth/getAuthFields.js'\nimport { TimestampsRequired } from '../../errors/TimestampsRequired.js'\nimport { sanitizeFields } from '../../fields/config/sanitize.js'\nimport { fieldAffectsData } from '../../fields/config/types.js'\nimport { mergeBaseFields } from '../../fields/mergeBaseFields.js'\nimport { buildFoldersHierarchy, buildTagsHierarchy } from '../../hierarchy/presets.js'\nimport { sanitizeHierarchyCollection } from '../../hierarchy/sanitizeHierarchyCollection.js'\nimport { uploadCollectionEndpoints } from '../../uploads/endpoints/index.js'\nimport { getBaseUploadFields } from '../../uploads/getBaseFields.js'\nimport { flattenAllFields } from '../../utilities/flattenAllFields.js'\nimport { formatLabels } from '../../utilities/formatLabels.js'\nimport { traverseForLocalizedFields } from '../../utilities/traverseForLocalizedFields.js'\nimport { baseVersionFields } from '../../versions/baseFields.js'\nimport { versionDefaults } from '../../versions/defaults.js'\nimport { defaultCollectionEndpoints } from '../endpoints/index.js'\nimport {\n addDefaultsToAuthConfig,\n addDefaultsToCollectionConfig,\n addDefaultsToLoginWithUsernameConfig,\n} from './defaults.js'\nimport { sanitizeCompoundIndexes } from './sanitizeCompoundIndexes.js'\nimport { validateUseAsTitle } from './useAsTitle.js'\n\n/**\n * Warns at startup when custom collection views are misconfigured with a missing `path`.\n * Views without `path` will never be matched by the router and are silently ignored.\n */\nexport const warnOnInvalidCustomViews = (collection: CollectionConfig): void => {\n const views = collection.admin?.components?.views\n if (!views || typeof views !== 'object') {\n return\n }\n\n for (const [key, view] of Object.entries(views)) {\n if (key === 'edit' || key === 'list') {\n continue\n }\n\n if (view && typeof view === 'object' && 'Component' in view && !('path' in view)) {\n console.warn(\n `[Payload] Custom collection view \"${key}\" in collection \"${collection.slug}\" is missing a \"path\" property. The view will never be rendered.`,\n )\n }\n\n if (view && typeof view === 'object' && 'path' in view && !('Component' in view)) {\n console.warn(\n `[Payload] Custom collection view \"${key}\" in collection \"${collection.slug}\" has a \"path\" but is missing a \"Component\". The view will never be rendered.`,\n )\n }\n }\n}\n\nexport const sanitizeCollection = async (\n config: Config,\n collection: CollectionConfig,\n /**\n * If this property is set, RichText fields won't be sanitized immediately. Instead, they will be added to this array as promises\n * so that you can sanitize them together, after the config has been sanitized.\n */\n richTextSanitizationPromises?: Array<(config: SanitizedConfig) => Promise<void>>,\n _validRelationships?: string[],\n /**\n * Tracker for orderable join fields - populated during sanitization\n */\n orderableJoins?: OrderableJoinInfo[],\n): Promise<SanitizedCollectionConfig> => {\n if (collection._sanitized) {\n return collection as SanitizedCollectionConfig\n }\n\n collection._sanitized = true\n\n warnOnInvalidCustomViews(collection)\n\n // /////////////////////////////////\n // Make copy of collection config\n // /////////////////////////////////\n\n const sanitized: CollectionConfig = addDefaultsToCollectionConfig(collection)\n\n // /////////////////////////////////\n // Convert folders/tags to hierarchy\n // /////////////////////////////////\n\n const presetCount = [sanitized.folders, sanitized.tags, sanitized.hierarchy].filter(\n Boolean,\n ).length\n if (presetCount > 1) {\n throw new Error(\n `Collection \"${sanitized.slug}\": Only one of 'folders', 'tags', or 'hierarchy' can be specified`,\n )\n }\n\n if (sanitized.folders) {\n sanitized.labels = {\n plural: 'Folders',\n singular: 'Folder',\n ...sanitized.labels,\n }\n sanitized.hierarchy = buildFoldersHierarchy(sanitized.folders, sanitized.slug)\n // Set admin.group: false when sidebar tab enabled (folders accessed via tab)\n const sidebarTabEnabled =\n typeof sanitized.hierarchy === 'object' &&\n sanitized.hierarchy.admin?.injectSidebarTab !== false\n if (sidebarTabEnabled && sanitized.admin!.group === undefined) {\n sanitized.admin!.group = false\n }\n delete sanitized.folders\n }\n\n if (sanitized.tags) {\n sanitized.labels = {\n plural: 'Tags',\n singular: 'Tag',\n ...sanitized.labels,\n }\n sanitized.hierarchy = buildTagsHierarchy(sanitized.tags, sanitized.slug)\n // Tags also hidden from nav by default\n if (sanitized.admin!.group === undefined) {\n sanitized.admin!.group = false\n }\n delete sanitized.tags\n }\n\n // /////////////////////////////////\n // Sanitize fields\n // /////////////////////////////////\n\n const validRelationships = _validRelationships ?? config.collections!.map((c) => c.slug) ?? []\n\n const joins: SanitizedJoins = {}\n\n const polymorphicJoins: SanitizedJoin[] = []\n\n sanitized.fields = await sanitizeFields({\n collectionConfig: sanitized,\n config,\n fields: sanitized.fields,\n joinPath: '',\n joins,\n orderableJoins,\n parentIsLocalized: false,\n polymorphicJoins,\n richTextSanitizationPromises,\n validRelationships,\n })\n\n if (sanitized.endpoints !== false) {\n if (!sanitized.endpoints) {\n sanitized.endpoints = []\n }\n\n if (sanitized.auth) {\n for (const endpoint of authCollectionEndpoints) {\n sanitized.endpoints.push(endpoint)\n }\n }\n\n if (sanitized.upload) {\n for (const endpoint of uploadCollectionEndpoints) {\n sanitized.endpoints.push(endpoint)\n }\n }\n\n for (const endpoint of defaultCollectionEndpoints) {\n sanitized.endpoints.push(endpoint)\n }\n }\n\n if (sanitized.timestamps !== false) {\n // add default timestamps fields only as needed\n let hasUpdatedAt: boolean | null = null\n let hasCreatedAt: boolean | null = null\n let hasDeletedAt: boolean | null = null\n\n sanitized.fields.some((field) => {\n if (fieldAffectsData(field)) {\n if (field.name === 'updatedAt') {\n hasUpdatedAt = true\n }\n\n if (field.name === 'createdAt') {\n hasCreatedAt = true\n }\n\n if (field.name === 'deletedAt') {\n hasDeletedAt = true\n }\n }\n\n return hasCreatedAt && hasUpdatedAt && (!sanitized.trash || hasDeletedAt)\n })\n\n if (!hasUpdatedAt) {\n sanitized.fields.push({\n name: 'updatedAt',\n type: 'date',\n admin: {\n disabled: { bulkEdit: true },\n hidden: true,\n },\n index: true,\n label: ({ t }) => t('general:updatedAt'),\n })\n }\n\n if (!hasCreatedAt) {\n sanitized.fields.push({\n name: 'createdAt',\n admin: {\n disabled: { bulkEdit: true },\n hidden: true,\n },\n // The default sort for list view is createdAt. Thus, enabling indexing by default, is a major performance improvement, especially for large or a large amount of collections.\n type: 'date',\n index: true,\n label: ({ t }) => t('general:createdAt'),\n })\n }\n\n if (sanitized.trash && !hasDeletedAt) {\n sanitized.fields.push({\n name: 'deletedAt',\n type: 'date',\n admin: {\n disabled: { bulkEdit: true },\n hidden: true,\n },\n index: true,\n label: ({ t }) => t('general:deletedAt'),\n })\n }\n }\n\n const defaultLabels = formatLabels(sanitized.slug)\n\n sanitized.labels = {\n plural: sanitized.labels?.plural || defaultLabels.plural,\n singular: sanitized.labels?.singular || defaultLabels.singular,\n }\n\n if (sanitized.versions) {\n if (sanitized.timestamps === false) {\n throw new TimestampsRequired(collection)\n }\n\n if (sanitized.versions === true) {\n sanitized.versions = {\n drafts: false,\n maxPerDoc: 100,\n }\n }\n\n sanitized.versions.maxPerDoc =\n typeof sanitized.versions.maxPerDoc === 'number' ? sanitized.versions.maxPerDoc : 100\n\n if (sanitized.versions.drafts) {\n if (sanitized.versions.drafts === true) {\n sanitized.versions.drafts = {\n autosave: false,\n validate: false,\n }\n }\n\n const hasLocalizedFields = traverseForLocalizedFields(sanitized.fields)\n\n // Auto-enable per-locale status when localization is configured and the collection has localized fields.\n ;(sanitized.versions.drafts as SanitizedDrafts).localizeStatus = !!(\n config.localization && hasLocalizedFields\n )\n\n if (sanitized.versions.drafts.autosave === true) {\n sanitized.versions.drafts.autosave = {\n interval: versionDefaults.autosaveInterval,\n }\n }\n\n if (sanitized.versions.drafts.validate === undefined) {\n sanitized.versions.drafts.validate = false\n }\n\n sanitized.fields = mergeBaseFields(\n sanitized.fields,\n baseVersionFields({\n localized: (sanitized.versions.drafts as SanitizedDrafts).localizeStatus ?? false,\n }),\n )\n }\n } else {\n delete sanitized.versions\n }\n\n // Sanitize hierarchy configuration (phase 1 - per collection)\n sanitizeHierarchyCollection(sanitized, config)\n\n if (sanitized.upload) {\n if (sanitized.upload === true) {\n sanitized.upload = {}\n }\n\n sanitized.upload.cacheTags = sanitized.upload?.cacheTags ?? true\n sanitized.upload.bulkUpload = sanitized.upload?.bulkUpload ?? true\n sanitized.upload.staticDir = sanitized.upload.staticDir || sanitized.slug\n sanitized.admin!.useAsTitle =\n sanitized.admin?.useAsTitle && sanitized.admin.useAsTitle !== 'id'\n ? sanitized.admin.useAsTitle\n : 'filename'\n\n const uploadFields = getBaseUploadFields({\n collection: sanitized,\n config,\n })\n\n sanitized.fields = mergeBaseFields(sanitized.fields, uploadFields)\n }\n\n if (sanitized.auth) {\n sanitized.auth = addDefaultsToAuthConfig(\n typeof sanitized.auth === 'boolean' ? {} : sanitized.auth,\n )\n\n // disable duplicate for auth enabled collections by default\n sanitized.disableDuplicate = sanitized.disableDuplicate ?? true\n\n if (sanitized.auth.loginWithUsername) {\n if (sanitized.auth.loginWithUsername === true) {\n sanitized.auth.loginWithUsername = addDefaultsToLoginWithUsernameConfig({})\n } else {\n const loginWithUsernameWithDefaults = addDefaultsToLoginWithUsernameConfig(\n sanitized.auth.loginWithUsername,\n )\n\n // if allowEmailLogin is false, requireUsername must be true\n if (loginWithUsernameWithDefaults.allowEmailLogin === false) {\n loginWithUsernameWithDefaults.requireUsername = true\n }\n sanitized.auth.loginWithUsername = loginWithUsernameWithDefaults\n }\n } else {\n sanitized.auth.loginWithUsername = false\n }\n\n if (!collection?.admin?.useAsTitle) {\n sanitized.admin!.useAsTitle = sanitized.auth.loginWithUsername ? 'username' : 'email'\n }\n\n sanitized.fields = mergeBaseFields(sanitized.fields, getBaseAuthFields(sanitized.auth))\n }\n\n if (collection?.admin?.pagination?.limits?.length) {\n sanitized.admin!.pagination!.limits = collection.admin.pagination.limits\n }\n\n validateUseAsTitle(sanitized)\n\n const sanitizedConfig = sanitized as SanitizedCollectionConfig\n\n sanitizedConfig.joins = joins\n sanitizedConfig.polymorphicJoins = polymorphicJoins\n\n sanitizedConfig.flattenedFields = flattenAllFields({ fields: sanitizedConfig.fields })\n\n sanitizedConfig.sanitizedIndexes = sanitizeCompoundIndexes({\n fields: sanitizedConfig.flattenedFields,\n indexes: sanitizedConfig.indexes,\n })\n\n return sanitizedConfig\n}\n"],"names":["authCollectionEndpoints","getBaseAuthFields","TimestampsRequired","sanitizeFields","fieldAffectsData","mergeBaseFields","buildFoldersHierarchy","buildTagsHierarchy","sanitizeHierarchyCollection","uploadCollectionEndpoints","getBaseUploadFields","flattenAllFields","formatLabels","traverseForLocalizedFields","baseVersionFields","versionDefaults","defaultCollectionEndpoints","addDefaultsToAuthConfig","addDefaultsToCollectionConfig","addDefaultsToLoginWithUsernameConfig","sanitizeCompoundIndexes","validateUseAsTitle","warnOnInvalidCustomViews","collection","views","admin","components","key","view","Object","entries","console","warn","slug","sanitizeCollection","config","richTextSanitizationPromises","_validRelationships","orderableJoins","_sanitized","sanitized","presetCount","folders","tags","hierarchy","filter","Boolean","length","Error","labels","plural","singular","sidebarTabEnabled","injectSidebarTab","group","undefined","validRelationships","collections","map","c","joins","polymorphicJoins","fields","collectionConfig","joinPath","parentIsLocalized","endpoints","auth","endpoint","push","upload","timestamps","hasUpdatedAt","hasCreatedAt","hasDeletedAt","some","field","name","trash","type","disabled","bulkEdit","hidden","index","label","t","defaultLabels","versions","drafts","maxPerDoc","autosave","validate","hasLocalizedFields","localizeStatus","localization","interval","autosaveInterval","localized","cacheTags","bulkUpload","staticDir","useAsTitle","uploadFields","disableDuplicate","loginWithUsername","loginWithUsernameWithDefaults","allowEmailLogin","requireUsername","pagination","limits","sanitizedConfig","flattenedFields","sanitizedIndexes","indexes"],"mappings":"AAUA,SAASA,uBAAuB,QAAQ,gCAA+B;AACvE,SAASC,iBAAiB,QAAQ,8BAA6B;AAC/D,SAASC,kBAAkB,QAAQ,qCAAoC;AACvE,SAASC,cAAc,QAAQ,kCAAiC;AAChE,SAASC,gBAAgB,QAAQ,+BAA8B;AAC/D,SAASC,eAAe,QAAQ,kCAAiC;AACjE,SAASC,qBAAqB,EAAEC,kBAAkB,QAAQ,6BAA4B;AACtF,SAASC,2BAA2B,QAAQ,iDAAgD;AAC5F,SAASC,yBAAyB,QAAQ,mCAAkC;AAC5E,SAASC,mBAAmB,QAAQ,iCAAgC;AACpE,SAASC,gBAAgB,QAAQ,sCAAqC;AACtE,SAASC,YAAY,QAAQ,kCAAiC;AAC9D,SAASC,0BAA0B,QAAQ,gDAA+C;AAC1F,SAASC,iBAAiB,QAAQ,+BAA8B;AAChE,SAASC,eAAe,QAAQ,6BAA4B;AAC5D,SAASC,0BAA0B,QAAQ,wBAAuB;AAClE,SACEC,uBAAuB,EACvBC,6BAA6B,EAC7BC,oCAAoC,QAC/B,gBAAe;AACtB,SAASC,uBAAuB,QAAQ,+BAA8B;AACtE,SAASC,kBAAkB,QAAQ,kBAAiB;AAEpD;;;CAGC,GACD,OAAO,MAAMC,2BAA2B,CA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AM;IAAC;IAEpFgD,gBAAgBE,gBAAgB,GAAG5F,wBAAwB;QACzD0C,QAAQgD,gBAAgBC,eAAe;QACvCE,SAASH,gBAAgBG,OAAO;IAClC;IAEA,OAAOH;AACT,EAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sanitizeCompoundIndexes.d.ts","sourceRoot":"","sources":["../../../src/collections/config/sanitizeCompoundIndexes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAA;AAClE,OAAO,KAAK,EAAE,aAAa,EAAE,sBAAsB,EAAE,MAAM,YAAY,CAAA;AAKvE,eAAO,MAAM,uBAAuB,
|
|
1
|
+
{"version":3,"file":"sanitizeCompoundIndexes.d.ts","sourceRoot":"","sources":["../../../src/collections/config/sanitizeCompoundIndexes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAA;AAClE,OAAO,KAAK,EAAE,aAAa,EAAE,sBAAsB,EAAE,MAAM,YAAY,CAAA;AAKvE,eAAO,MAAM,uBAAuB,GAAI,sBAGrC;IACD,MAAM,EAAE,cAAc,EAAE,CAAA;IACxB,OAAO,EAAE,aAAa,EAAE,CAAA;CACzB,KAAG,sBAAsB,EA2BzB,CAAA"}
|
|
@@ -14,6 +14,12 @@ import type { SanitizedUploadConfig, UploadConfig } from '../../uploads/types.js
|
|
|
14
14
|
import type { IncomingCollectionVersions, SanitizedCollectionVersions } from '../../versions/types.js';
|
|
15
15
|
import type { AfterOperationArg, BeforeOperationArg, OperationMap } from '../operations/utilities/types.js';
|
|
16
16
|
export type DataFromCollectionSlug<TSlug extends CollectionSlug> = TypedCollection[TSlug];
|
|
17
|
+
/**
|
|
18
|
+
* The ID type of a given collection (e.g. `string` or `number`), taken from its generated type.
|
|
19
|
+
* Use this instead of the project-wide {@link DefaultDocumentIDType} when the collection slug is
|
|
20
|
+
* known, since each collection can have its own ID type.
|
|
21
|
+
*/
|
|
22
|
+
export type IDTypeForCollectionSlug<TSlug extends CollectionSlug> = DataFromCollectionSlug<TSlug>['id'];
|
|
17
23
|
export type SelectFromCollectionSlug<TSlug extends CollectionSlug> = TypedCollectionSelect[TSlug];
|
|
18
24
|
/**
|
|
19
25
|
* Collection slugs that do not have drafts enabled.
|
|
@@ -312,6 +318,7 @@ export type CollectionAdminOptions = {
|
|
|
312
318
|
list?: {
|
|
313
319
|
actions?: CustomComponent[];
|
|
314
320
|
Component?: PayloadComponent;
|
|
321
|
+
NoResults?: CustomComponent;
|
|
315
322
|
};
|
|
316
323
|
} & SharedEntityViews;
|
|
317
324
|
} & Omit<SharedAdminComponents, 'edit' | 'views'>;
|
|
@@ -360,13 +367,6 @@ export type CollectionAdminOptions = {
|
|
|
360
367
|
* - Set to `false` to exclude the entity from the sidebar / dashboard without disabling its routes.
|
|
361
368
|
*/
|
|
362
369
|
group?: false | Record<string, string> | string;
|
|
363
|
-
/**
|
|
364
|
-
* @description Enable grouping by a field in the list view.
|
|
365
|
-
* Uses `payload.findDistinct` under the hood to populate the group-by options.
|
|
366
|
-
*
|
|
367
|
-
* @experimental This option is currently in beta and may change in future releases. Use at your own risk.
|
|
368
|
-
*/
|
|
369
|
-
groupBy?: boolean;
|
|
370
370
|
/**
|
|
371
371
|
* Exclude the collection from the admin nav and routes
|
|
372
372
|
*/
|
|
@@ -443,6 +443,10 @@ export type CollectionConfig<TSlug extends CollectionSlug = any> = {
|
|
|
443
443
|
* Default field to sort by in collection list view
|
|
444
444
|
*/
|
|
445
445
|
defaultSort?: Sort;
|
|
446
|
+
/**
|
|
447
|
+
* Disable the bulk delete operation for the collection in the admin panel and the API
|
|
448
|
+
*/
|
|
449
|
+
disableBulkDelete?: boolean;
|
|
446
450
|
/**
|
|
447
451
|
* Disable the bulk edit operation for the collection in the admin panel and the API
|
|
448
452
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src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AA;CAChB,CAAA"}
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/collections/config/types.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,sBAAsB,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAA;AACxF,OAAO,KAAK,EAAE,YAAY,EAAE,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAA;AAEtE,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAA;AACnE,OAAO,KAAK,EAAE,SAAS,IAAI,WAAW,EAAE,MAAM,6BAA6B,CAAA;AAC3E,OAAO,KAAK,EACV,SAAS,IAAI,gBAAgB,EAC7B,MAAM,IAAI,aAAa,EACxB,MAAM,kCAAkC,CAAA;AACzC,OAAO,KAAK,EAAE,IAAI,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAA;AAC7E,OAAO,KAAK,EACV,MAAM,EACN,kBAAkB,EAClB,gBAAgB,EAChB,eAAe,EACf,QAAQ,EACR,iBAAiB,EACjB,kBAAkB,EAClB,aAAa,EACb,iBAAiB,EACjB,UAAU,EACV,gBAAgB,EAChB,qBAAqB,EACrB,wBAAwB,EACxB,iBAAiB,EACjB,WAAW,EACZ,MAAM,uBAAuB,CAAA;AAC9B,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAA;AAC/D,OAAO,KAAK,EACV,KAAK,EACL,cAAc,EACd,SAAS,EACT,iBAAiB,EACjB,WAAW,EACZ,MAAM,8BAA8B,CAAA;AACrC,OAAO,KAAK,EACV,eAAe,EACf,wBAAwB,EACxB,wBAAwB,EACzB,MAAM,0BAA0B,CAAA;AACjC,OAAO,KAAK,EACV,qBAAqB,EACrB,gBAAgB,EAChB,cAAc,EACd,cAAc,EACd,UAAU,EACV,cAAc,EACd,mBAAmB,EACnB,eAAe,EACf,qBAAqB,EACrB,WAAW,EACZ,MAAM,gBAAgB,CAAA;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AAA;CACjB,CAAA;AAED,MAAM,MAAM,sBAAsB,GAAG;IACnC,MAAM,EAAE;QACN,KAAK,EAAE,cAAc,CAAA;QACrB,aAAa,EAAE,MAAM,CAAA;QACrB,IAAI,EAAE,MAAM,CAAA;QACZ,gBAAgB,EAAE,OAAO,CAAA;KAC1B,EAAE,CAAA;IACH,MAAM,EAAE,OAAO,CAAA;CAChB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/collections/config/types.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\nimport type { GraphQLInputObjectType, GraphQLNonNull, GraphQLObjectType } from 'graphql'\nimport type { DeepRequired, IsAny, MarkOptional } from 'ts-essentials'\n\nimport type { CustomUpload, ViewTypes } from '../../admin/types.js'\nimport type { Arguments as MeArguments } from '../../auth/operations/me.js'\nimport type {\n Arguments as RefreshArguments,\n Result as RefreshResult,\n} from '../../auth/operations/refresh.js'\nimport type { Auth, ClientUser, IncomingAuthType } from '../../auth/types.js'\nimport type {\n Access,\n AfterErrorHookArgs,\n AfterErrorResult,\n CustomComponent,\n Endpoint,\n EntityDescription,\n GeneratePreviewURL,\n LabelFunction,\n LivePreviewConfig,\n MetaConfig,\n PayloadComponent,\n SharedAdminComponents,\n SharedEditViewComponents,\n SharedEntityViews,\n StaticLabel,\n} from '../../config/types.js'\nimport type { DBIdentifierName } from '../../database/types.js'\nimport type {\n Field,\n FlattenedField,\n JoinField,\n RelationshipField,\n UploadField,\n} from '../../fields/config/types.js'\nimport type {\n HierarchyConfig,\n HierarchyJoinFieldConfig,\n SanitizedHierarchyConfig,\n} from '../../hierarchy/types.js'\nimport type {\n CollectionAdminCustom,\n CollectionCustom,\n CollectionSlug,\n GeneratedTypes,\n JsonObject,\n RequestContext,\n TypedAuthOperations,\n TypedCollection,\n TypedCollectionSelect,\n TypedLocale,\n} from '../../index.js'\nimport type {\n PayloadRequest,\n SelectIncludeType,\n SelectType,\n Sort,\n TransformCollectionWithSelect,\n Where,\n WithSelectFn,\n} from '../../types/index.js'\nimport type { SanitizedUploadConfig, UploadConfig } from '../../uploads/types.js'\nimport type {\n IncomingCollectionVersions,\n SanitizedCollectionVersions,\n} from '../../versions/types.js'\nimport type {\n AfterOperationArg,\n BeforeOperationArg,\n OperationMap,\n} from '../operations/utilities/types.js'\n\nexport type DataFromCollectionSlug<TSlug extends CollectionSlug> = TypedCollection[TSlug]\n\nexport type SelectFromCollectionSlug<TSlug extends CollectionSlug> = TypedCollectionSelect[TSlug]\n\n/**\n * Collection slugs that do not have drafts enabled.\n * Detects collections without drafts by checking for the absence of the `_status` field.\n */\nexport type CollectionsWithoutDrafts = {\n [TSlug in CollectionSlug]: DataFromCollectionSlug<TSlug> extends { _status?: any } ? never : TSlug\n}[CollectionSlug]\n\n/**\n * Conditionally allows or forbids the `draft` property based on collection configuration.\n * When `strictDraftTypes` is enabled, the `draft` property is forbidden on collections without drafts.\n */\nexport type DraftFlagFromCollectionSlug<TSlug extends CollectionSlug> = GeneratedTypes extends {\n strictDraftTypes: true\n}\n ? TSlug extends CollectionsWithoutDrafts\n ? {\n /**\n * The `draft` property is not allowed because this collection does not have `versions.drafts` enabled.\n */\n draft?: never\n }\n : {\n /**\n * Whether the document(s) should be queried from the versions table/collection or not. [More](https://payloadcms.com/docs/versions/drafts#draft-api)\n */\n draft?: boolean\n }\n : {\n /**\n * Whether the document(s) should be queried from the versions table/collection or not. [More](https://payloadcms.com/docs/versions/drafts#draft-api)\n */\n draft?: boolean\n }\n\nexport type AuthOperationsFromCollectionSlug<TSlug extends CollectionSlug> =\n TypedAuthOperations[TSlug]\n\nexport type RequiredDataFromCollection<TData extends JsonObject> = MarkOptional<\n TData,\n 'collection' | 'createdAt' | 'deletedAt' | 'id' | 'updatedAt'\n>\n\nexport type RequiredDataFromCollectionSlug<TSlug extends CollectionSlug> =\n RequiredDataFromCollection<DataFromCollectionSlug<TSlug>>\n\n/**\n * Helper type for draft data INPUT (e.g., create operations) - makes all fields optional except system fields\n * When creating a draft, required fields don't need to be provided as validation is skipped\n * The id field is optional since it's auto-generated\n */\nexport type DraftDataFromCollection<TData extends JsonObject> = Partial<\n Omit<TData, 'collection' | 'createdAt' | 'deletedAt' | 'id' | 'sizes' | 'updatedAt'>\n> &\n Partial<Pick<TData, 'collection' | 'createdAt' | 'deletedAt' | 'id' | 'sizes' | 'updatedAt'>>\n\nexport type DraftDataFromCollectionSlug<TSlug extends CollectionSlug> = DraftDataFromCollection<\n DataFromCollectionSlug<TSlug>\n>\n\n/**\n * Helper type for draft data OUTPUT (e.g., query results) - makes user fields optional but keeps id required\n * When querying drafts, required fields may be null/undefined as validation is skipped, but system fields like id are always present\n */\nexport type QueryDraftDataFromCollection<TData extends JsonObject> = Partial<\n Omit<TData, 'createdAt' | 'deletedAt' | 'id' | 'sizes' | 'updatedAt'>\n> &\n Partial<Pick<TData, 'createdAt' | 'deletedAt' | 'sizes' | 'updatedAt'>> &\n Pick<TData, 'id'>\n\nexport type QueryDraftDataFromCollectionSlug<TSlug extends CollectionSlug> =\n QueryDraftDataFromCollection<DataFromCollectionSlug<TSlug>>\n\nexport type HookOperationType =\n | 'autosave'\n | 'count'\n | 'countVersions'\n | 'create'\n | 'delete'\n | 'forgotPassword'\n | 'login'\n | 'read'\n | 'readDistinct'\n | 'refresh'\n | 'resetPassword'\n | 'restoreVersion'\n | 'update'\n\ntype CreateOrUpdateOperation = Extract<HookOperationType, 'create' | 'update'>\n\nexport type BeforeOperationHook<TOperationGeneric extends CollectionSlug = string> = (\n arg: BeforeOperationArg<TOperationGeneric>,\n) =>\n | Parameters<OperationMap<TOperationGeneric>[keyof OperationMap<TOperationGeneric>]>[0]\n | Promise<Parameters<OperationMap<TOperationGeneric>[keyof OperationMap<TOperationGeneric>]>[0]>\n | Promise<void>\n | void\n\nexport type BeforeValidateHook<T extends TypeWithID = any> = (args: {\n /** The collection which this hook is being run on */\n collection: SanitizedCollectionConfig\n context: RequestContext\n data?: Partial<T>\n /**\n * Hook operation being performed\n */\n operation: CreateOrUpdateOperation\n /**\n * Original document before change\n *\n * `undefined` on 'create' operation\n */\n originalDoc?: T\n req: PayloadRequest\n}) => any\n\nexport type BeforeChangeHook<T extends TypeWithID = any> = (args: {\n /** The collection which this hook is being run on */\n collection: SanitizedCollectionConfig\n context: RequestContext\n data: Partial<T>\n /**\n * Hook operation being performed\n */\n operation: CreateOrUpdateOperation\n /**\n * Original document before change\n *\n * `undefined` on 'create' operation\n */\n originalDoc?: T\n req: PayloadRequest\n}) => any\n\nexport type AfterChangeHook<T extends TypeWithID = any> = (args: {\n /** The collection which this hook is being run on */\n collection: SanitizedCollectionConfig\n context: RequestContext\n data: Partial<T>\n doc: T\n /**\n * Hook operation being performed\n */\n operation: CreateOrUpdateOperation\n /**\n * Whether access control is being overridden for this operation\n */\n overrideAccess?: boolean\n previousDoc: T\n req: PayloadRequest\n}) => any\n\nexport type BeforeReadHook<T extends TypeWithID = any> = (args: {\n /** The collection which this hook is being run on */\n collection: SanitizedCollectionConfig\n context: RequestContext\n doc: T\n /**\n * Whether access control is being overridden for this operation\n */\n overrideAccess?: boolean\n query: { [key: string]: any }\n req: PayloadRequest\n}) => any\n\nexport type AfterReadHook<T extends TypeWithID = any> = (args: {\n /** The collection which this hook is being run on */\n collection: SanitizedCollectionConfig\n context: RequestContext\n doc: T\n findMany?: boolean\n /**\n * Whether access control is being overridden for this operation\n */\n overrideAccess?: boolean\n query?: { [key: string]: any }\n req: PayloadRequest\n}) => any\n\nexport type BeforeDeleteHook = (args: {\n /** The collection which this hook is being run on */\n collection: SanitizedCollectionConfig\n context: RequestContext\n id: number | string\n req: PayloadRequest\n}) => any\n\nexport type AfterDeleteHook<T extends TypeWithID = any> = (args: {\n /** The collection which this hook is being run on */\n collection: SanitizedCollectionConfig\n context: RequestContext\n doc: T\n id: number | string\n req: PayloadRequest\n}) => any\n\nexport type AfterOperationHook<TOperationGeneric extends CollectionSlug = string> = (\n arg: AfterOperationArg<TOperationGeneric>,\n) =>\n | Awaited<ReturnType<OperationMap<TOperationGeneric>[keyof OperationMap<TOperationGeneric>]>>\n | Promise<\n Awaited<ReturnType<OperationMap<TOperationGeneric>[keyof OperationMap<TOperationGeneric>]>>\n >\n\nexport type BeforeLoginHook<T extends TypeWithID = any> = (args: {\n /** The collection which this hook is being run on */\n collection: SanitizedCollectionConfig\n context: RequestContext\n req: PayloadRequest\n user: T\n}) => any\n\nexport type AfterLoginHook<T extends TypeWithID = any> = (args: {\n /** The collection which this hook is being run on */\n collection: SanitizedCollectionConfig\n context: RequestContext\n req: PayloadRequest\n token: string\n user: T\n}) => any\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport type AfterLogoutHook<T extends TypeWithID = any> = (args: {\n /** The collection which this hook is being run on */\n collection: SanitizedCollectionConfig\n context: RequestContext\n req: PayloadRequest\n}) => any\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport type AfterMeHook<T extends TypeWithID = any> = (args: {\n /** The collection which this hook is being run on */\n collection: SanitizedCollectionConfig\n context: RequestContext\n req: PayloadRequest\n response: unknown\n}) => any\n\nexport type RefreshHook<T extends TypeWithID = any> = (args: {\n args: RefreshArguments\n user: T\n}) => Promise<RefreshResult | void> | (RefreshResult | void)\n\nexport type MeHook<T extends TypeWithID = any> = (args: {\n args: MeArguments\n user: T\n}) => ({ exp: number; user: T } | void) | Promise<{ exp: number; user: T } | void>\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport type AfterRefreshHook<T extends TypeWithID = any> = (args: {\n /** The collection which this hook is being run on */\n collection: SanitizedCollectionConfig\n context: RequestContext\n exp: number\n req: PayloadRequest\n token: string\n}) => any\n\nexport type AfterErrorHook = (\n args: { collection: SanitizedCollectionConfig } & AfterErrorHookArgs,\n) => AfterErrorResult | Promise<AfterErrorResult>\n\nexport type AfterForgotPasswordHook = (args: {\n args?: any\n /** The collection which this hook is being run on */\n collection: SanitizedCollectionConfig\n context: RequestContext\n}) => any\n\nexport type EnableFoldersOptions = {\n // Displays the folder collection and parentFolder field in the document view\n debug?: boolean\n}\n\n/**\n * Configuration options for folder hierarchy preset.\n * Subset of HierarchyConfig with folder-appropriate defaults applied.\n */\nexport type FoldersConfig = {\n admin?: {\n components?: {\n Icon?: PayloadComponent\n }\n injectSidebarTab?: boolean\n treeLimit?: number\n useHeaderButton?: boolean\n }\n collectionSpecific?:\n | {\n fieldName?: string\n }\n | boolean\n joinField?: HierarchyJoinFieldConfig\n parentFieldName?: string\n slugField?: string\n slugify?: (text: string) => string\n slugPathFieldName?: string\n titlePathFieldName?: string\n}\n\n/**\n * Configuration options for tags hierarchy preset.\n * Same as FoldersConfig but allowHasMany can be overridden.\n */\nexport type TagsConfig = {\n allowHasMany?: boolean\n} & FoldersConfig\n\nexport type BaseFilter = (args: {\n limit: number\n locale?: TypedLocale\n page: number\n req: PayloadRequest\n sort: string\n}) => null | Promise<null | Where> | Where\n\n/**\n * @deprecated Use `BaseFilter` instead.\n */\nexport type BaseListFilter = BaseFilter\n\nexport type CollectionAdminOptions = {\n /**\n * Defines a default base filter which will be applied in the following parts of the admin panel:\n * - List View\n * - Relationship fields for internal links within the Lexical editor\n *\n * This is especially useful for plugins like multi-tenant. For example,\n * a user may have access to multiple tenants, but should only see content\n * related to the currently active or selected tenant in those places.\n */\n baseFilter?: BaseFilter\n /**\n * @deprecated Use `baseFilter` instead. If both are defined,\n * `baseFilter` will take precedence. This property remains only\n * for backward compatibility and may be removed in a future version.\n *\n * Originally, `baseListFilter` was intended to filter only the List View\n * in the admin panel. However, base filtering is often required in other areas\n * such as internal link relationships in the Lexical editor.\n */\n baseListFilter?: BaseListFilter\n /**\n * Custom admin components\n */\n components?: {\n afterList?: CustomComponent[]\n afterListTable?: CustomComponent[]\n beforeList?: CustomComponent[]\n beforeListTable?: CustomComponent[]\n /**\n * Components within the edit view\n */\n edit?: {\n /**\n * Replaces the \"Upload\" section\n * + upload must be enabled\n */\n Upload?: CustomUpload\n } & SharedEditViewComponents\n listMenuItems?: CustomComponent[]\n views?: {\n /**\n * Replace or modify the \"list\" view.\n * @link https://payloadcms.com/docs/custom-components/list-view\n */\n list?: {\n actions?: CustomComponent[]\n Component?: PayloadComponent\n }\n } & SharedEntityViews\n } & Omit<SharedAdminComponents, 'edit' | 'views'>\n /** Extension point to add your custom data. Available in server and client. */\n custom?: CollectionAdminCustom\n /**\n * Default columns to show in list view\n */\n defaultColumns?: string[]\n /**\n * Custom description for collection. This will also be used as JSDoc for the generated types\n */\n description?: EntityDescription\n /**\n * Disable the Copy To Locale button in the edit document view\n * @default false\n */\n disableCopyToLocale?: boolean\n enableRichTextLink?: boolean\n enableRichTextRelationship?: boolean\n /**\n * Function to format the URL for document links in the list view.\n * Return null to disable linking for that document.\n * Return a string to customize the link destination.\n * If not provided, uses the default admin edit URL.\n */\n formatDocURL?: (args: {\n collectionSlug: string\n /**\n * The default URL that would normally be used for this document link.\n * You can return this as-is, modify it, or completely replace it.\n */\n defaultURL: string\n doc: Record<string, unknown>\n req: PayloadRequest\n /**\n * The current view context where the link is being generated.\n * Most relevant values for document linking are 'list' and 'trash'.\n */\n viewType?: ViewTypes\n }) => null | string\n /**\n * Specify a navigational group for collections in the admin sidebar.\n * - Provide a string to place the entity in a custom group.\n * - Provide a record to define localized group names.\n * - Set to `false` to exclude the entity from the sidebar / dashboard without disabling its routes.\n */\n group?: false | Record<string, string> | string\n /**\n * @description Enable grouping by a field in the list view.\n * Uses `payload.findDistinct` under the hood to populate the group-by options.\n *\n * @experimental This option is currently in beta and may change in future releases. Use at your own risk.\n */\n groupBy?: boolean\n /**\n * Exclude the collection from the admin nav and routes\n */\n hidden?: ((args: { user: ClientUser }) => boolean) | boolean\n /**\n * Additional fields to be searched via the full text search\n */\n listSearchableFields?: string[]\n /**\n * Live Preview options.\n *\n * @see https://payloadcms.com/docs/live-preview/overview\n */\n livePreview?: LivePreviewConfig\n meta?: MetaConfig\n pagination?: {\n defaultLimit?: number\n limits?: number[]\n }\n /**\n * Function to generate custom preview URL\n */\n preview?: GeneratePreviewURL\n /**\n * Field to use as title in Edit View and first column in List view\n */\n useAsTitle?: string\n}\n\n/** Manage all aspects of a data collection */\nexport type CollectionConfig<TSlug extends CollectionSlug = any> = {\n /**\n * Do not set this property manually. This is set to true during sanitization, to avoid\n * sanitizing the same collection multiple times.\n */\n _sanitized?: boolean\n /**\n * Access control\n */\n access?: {\n admin?: ({ req }: { req: PayloadRequest }) => boolean | Promise<boolean>\n create?: Access\n delete?: Access\n read?: Access\n readVersions?: Access\n unlock?: Access\n update?: Access\n }\n /**\n * Collection admin options\n */\n admin?: CollectionAdminOptions\n /**\n * Collection login options\n *\n * Use `true` to enable with default options\n */\n auth?: boolean | IncomingAuthType\n /**\n * Configuration for bulk operations\n */\n /** Extension point to add your custom data. Server only. */\n custom?: CollectionCustom\n /**\n * Used to override the default naming of the database table or collection with your using a function or string\n * @WARNING: If you change this property with existing data, you will need to handle the renaming of the table in your database or by using migrations\n */\n dbName?: DBIdentifierName\n defaultPopulate?: IsAny<SelectFromCollectionSlug<TSlug>> extends true\n ? SelectType\n : SelectFromCollectionSlug<TSlug>\n /**\n * Default field to sort by in collection list view\n */\n defaultSort?: Sort\n /**\n * Disable the bulk edit operation for the collection in the admin panel and the API\n */\n disableBulkEdit?: boolean\n /**\n * When true, do not show the \"Duplicate\" button while editing documents within this collection and prevent `duplicate` from all APIs\n */\n disableDuplicate?: boolean\n /**\n * Opt-in to enable query presets for this collection.\n * @see https://payloadcms.com/docs/query-presets/overview\n */\n enableQueryPresets?: boolean\n /**\n * Custom rest api endpoints, set false to disable all rest endpoints for this collection.\n */\n endpoints?: false | Omit<Endpoint, 'root'>[]\n fields: Field[]\n /**\n * Enable folder hierarchy preset for this collection.\n * Sets hierarchy with folder defaults: allowHasMany: false, FolderIcon, useHeaderButton: true\n *\n * Use `true` for defaults, or object for customization.\n * Cannot be used together with `tags` or `hierarchy`.\n */\n folders?: boolean | FoldersConfig\n /**\n * GraphQL configuration\n */\n graphQL?:\n | {\n disableMutations?: true\n disableQueries?: true\n pluralName?: string\n singularName?: string\n }\n | false\n /**\n * Enable hierarchical tree structure for this collection\n *\n * Use `true` to enable with defaults (auto-detects parent field)\n * or provide configuration object\n *\n * @example\n * // Enable with defaults\n * hierarchy: true\n *\n * @example\n * // Customize field names and slugify function\n * hierarchy: {\n * parentFieldName: 'parent',\n * slugify: (text) => customSlugify(text),\n * slugPathFieldName: '_breadcrumbPath'\n * }\n */\n hierarchy?: boolean | HierarchyConfig\n /**\n * Hooks to modify Payload functionality\n */\n hooks?: {\n afterChange?: AfterChangeHook[]\n afterDelete?: AfterDeleteHook[]\n afterError?: AfterErrorHook[]\n afterForgotPassword?: AfterForgotPasswordHook[]\n afterLogin?: AfterLoginHook[]\n afterLogout?: AfterLogoutHook[]\n afterMe?: AfterMeHook[]\n afterOperation?: AfterOperationHook<TSlug>[]\n afterRead?: AfterReadHook[]\n afterRefresh?: AfterRefreshHook[]\n beforeChange?: BeforeChangeHook[]\n beforeDelete?: BeforeDeleteHook[]\n beforeLogin?: BeforeLoginHook[]\n beforeOperation?: BeforeOperationHook<TSlug>[]\n beforeRead?: BeforeReadHook[]\n beforeValidate?: BeforeValidateHook[]\n /**\n /**\n * Use the `me` hook to control the `me` operation.\n * Here, you can optionally instruct the me operation to return early,\n * and skip its default logic.\n */\n me?: MeHook[]\n /**\n * Use the `refresh` hook to control the refresh operation.\n * Here, you can optionally instruct the refresh operation to return early,\n * and skip its default logic.\n */\n refresh?: RefreshHook[]\n }\n /**\n * Define compound indexes for this collection.\n * This can be used to either speed up querying/sorting by 2 or more fields at the same time or\n * to ensure uniqueness between several fields.\n * Specify field paths\n * @example\n * [{ unique: true, fields: ['title', 'group.name'] }]\n * @default []\n */\n indexes?: CompoundIndex[]\n /**\n * Label configuration\n */\n labels?: {\n plural?: LabelFunction | StaticLabel\n singular?: LabelFunction | StaticLabel\n }\n /**\n * Enables / Disables the ability to lock documents while editing\n * @default true\n */\n lockDocuments?:\n | {\n duration: number\n }\n | false\n /**\n * If true, enables custom ordering for the collection, and documents in the listView can be reordered via drag and drop.\n * New documents are inserted at the end of the list according to this parameter.\n *\n * Under the hood, a field with {@link https://payloadcms.com/docs/configuration/collections#fractional-indexing|fractional indexing} is used to optimize inserts and reorderings.\n *\n * @default false\n *\n * @experimental There may be frequent breaking changes to this API\n */\n orderable?: boolean\n slug: string\n /**\n * Enable tags hierarchy preset for this collection.\n * Sets hierarchy with tag defaults: allowHasMany: true, TagIcon\n *\n * Use `true` for defaults, or object for customization.\n * Cannot be used together with `folders` or `hierarchy`.\n */\n tags?: boolean | TagsConfig\n /**\n * Add `createdAt`, `deletedAt` and `updatedAt` fields\n *\n * @default true\n */\n timestamps?: boolean\n /**\n * Enables trash support for this collection.\n *\n * When enabled, documents will include a `deletedAt` timestamp field.\n * This allows documents to be marked as deleted without being permanently removed.\n * The `deletedAt` field will be set to the current date and time when a document is trashed.\n *\n * @default false\n */\n trash?: boolean\n /**\n * Options used in typescript generation\n */\n typescript?: {\n /**\n * Typescript generation name given to the interface type\n */\n interface?: string\n }\n /**\n * Customize the handling of incoming file uploads\n *\n * @default false // disable uploads\n */\n upload?: boolean | UploadConfig\n /**\n * Enable versioning. Set it to true to enable default versions settings,\n * or customize versions options by setting the property equal to an object\n * containing the version options.\n *\n * @default false // disable versioning\n */\n versions?: boolean | IncomingCollectionVersions\n} & Pick<\n WithSelectFn<\n IsAny<SelectFromCollectionSlug<TSlug>> extends true\n ? SelectIncludeType\n : SelectFromCollectionSlug<TSlug>\n >,\n 'select'\n>\n\nexport type SanitizedJoin = {\n /**\n * The field configuration defining the join\n */\n field: JoinField\n getForeignPath?(args: { locale?: TypedLocale }): string\n /**\n * The path of the join field in dot notation\n */\n joinPath: string\n /**\n * `parentIsLocalized` is true if any parent field of the\n * field configuration defining the join is localized\n */\n parentIsLocalized: boolean\n targetField: RelationshipField | UploadField\n}\n\nexport type SanitizedJoins = {\n [collectionSlug: string]: SanitizedJoin[]\n}\n\n/**\n * @todo remove the `DeepRequired` in v4.\n * We don't actually guarantee that all properties are set when sanitizing configs.\n */\nexport interface SanitizedCollectionConfig\n extends Omit<\n DeepRequired<CollectionConfig>,\n | 'admin'\n | 'auth'\n | 'endpoints'\n | 'fields'\n | 'folder'\n | 'folders'\n | 'hierarchy'\n | 'slug'\n | 'tags'\n | 'upload'\n | 'versions'\n > {\n admin: CollectionAdminOptions\n auth: Auth\n endpoints: Endpoint[] | false\n fields: Field[]\n /**\n * Fields in the database schema structure\n * Rows / collapsible / tabs w/o name `fields` merged to top, UIs are excluded\n */\n flattenedFields: FlattenedField[]\n /**\n * Hierarchy configuration (when collection is a hierarchy type like folders or tags)\n */\n hierarchy: false | SanitizedHierarchyConfig\n /**\n * Object of collections to join 'Join Fields object keyed by collection\n */\n joins: SanitizedJoins\n /**\n * List of all polymorphic join fields\n */\n polymorphicJoins: SanitizedJoin[]\n\n sanitizedIndexes: SanitizedCompoundIndex[]\n\n slug: CollectionSlug\n\n upload: SanitizedUploadConfig\n versions?: SanitizedCollectionVersions\n}\n\nexport type Collection = {\n config: SanitizedCollectionConfig\n customIDType?: 'number' | 'text'\n graphQL?: {\n countType: GraphQLObjectType\n JWT: GraphQLObjectType\n mutationInputType: GraphQLNonNull<any>\n paginatedType: GraphQLObjectType\n type: GraphQLObjectType\n updateMutationInputType: GraphQLNonNull<any>\n versionType: GraphQLObjectType\n whereInputType: GraphQLInputObjectType\n }\n}\n\nexport type BulkOperationResult<TSlug extends CollectionSlug, TSelect extends SelectType> = {\n docs: TransformCollectionWithSelect<TSlug, TSelect>[]\n errors: {\n id: DataFromCollectionSlug<TSlug>['id']\n isPublic: boolean\n message: string\n }[]\n}\n\nexport type AuthCollection = {\n config: SanitizedCollectionConfig\n}\n\nexport type LocalizedMeta = {\n [locale: string]: {\n status: 'draft' | 'published'\n updatedAt: string\n }\n}\n\nexport type TypeWithID = {\n id: number | string\n}\n\nexport type TypeWithTimestamps = {\n [key: string]: unknown\n createdAt: string\n deletedAt?: null | string\n id: number | string\n updatedAt: string\n}\n\nexport type CompoundIndex = {\n fields: string[]\n unique?: boolean\n}\n\nexport type SanitizedCompoundIndex = {\n fields: {\n field: FlattenedField\n localizedPath: string\n path: string\n pathHasLocalized: boolean\n }[]\n unique: boolean\n}\n"],"names":[],"mappings":"AAAA,qDAAqD,GAm3BrD,WAQC"}
|
|
1
|
+
{"version":3,"sources":["../../../src/collections/config/types.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\nimport type { GraphQLInputObjectType, GraphQLNonNull, GraphQLObjectType } from 'graphql'\nimport type { DeepRequired, IsAny, MarkOptional } from 'ts-essentials'\n\nimport type { CustomUpload, ViewTypes } from '../../admin/types.js'\nimport type { Arguments as MeArguments } from '../../auth/operations/me.js'\nimport type {\n Arguments as RefreshArguments,\n Result as RefreshResult,\n} from '../../auth/operations/refresh.js'\nimport type { Auth, ClientUser, IncomingAuthType } from '../../auth/types.js'\nimport type {\n Access,\n AfterErrorHookArgs,\n AfterErrorResult,\n CustomComponent,\n Endpoint,\n EntityDescription,\n GeneratePreviewURL,\n LabelFunction,\n LivePreviewConfig,\n MetaConfig,\n PayloadComponent,\n SharedAdminComponents,\n SharedEditViewComponents,\n SharedEntityViews,\n StaticLabel,\n} from '../../config/types.js'\nimport type { DBIdentifierName } from '../../database/types.js'\nimport type {\n Field,\n FlattenedField,\n JoinField,\n RelationshipField,\n UploadField,\n} from '../../fields/config/types.js'\nimport type {\n HierarchyConfig,\n HierarchyJoinFieldConfig,\n SanitizedHierarchyConfig,\n} from '../../hierarchy/types.js'\nimport type {\n CollectionAdminCustom,\n CollectionCustom,\n CollectionSlug,\n GeneratedTypes,\n JsonObject,\n RequestContext,\n TypedAuthOperations,\n TypedCollection,\n TypedCollectionSelect,\n TypedLocale,\n} from '../../index.js'\nimport type {\n PayloadRequest,\n SelectIncludeType,\n SelectType,\n Sort,\n TransformCollectionWithSelect,\n Where,\n WithSelectFn,\n} from '../../types/index.js'\nimport type { SanitizedUploadConfig, UploadConfig } from '../../uploads/types.js'\nimport type {\n IncomingCollectionVersions,\n SanitizedCollectionVersions,\n} from '../../versions/types.js'\nimport type {\n AfterOperationArg,\n BeforeOperationArg,\n OperationMap,\n} from '../operations/utilities/types.js'\n\nexport type DataFromCollectionSlug<TSlug extends CollectionSlug> = TypedCollection[TSlug]\n\n/**\n * The ID type of a given collection (e.g. `string` or `number`), taken from its generated type.\n * Use this instead of the project-wide {@link DefaultDocumentIDType} when the collection slug is\n * known, since each collection can have its own ID type.\n */\nexport type IDTypeForCollectionSlug<TSlug extends CollectionSlug> = DataFromCollectionSlug<TSlug>['id']\n\nexport type SelectFromCollectionSlug<TSlug extends CollectionSlug> = TypedCollectionSelect[TSlug]\n\n/**\n * Collection slugs that do not have drafts enabled.\n * Detects collections without drafts by checking for the absence of the `_status` field.\n */\nexport type CollectionsWithoutDrafts = {\n [TSlug in CollectionSlug]: DataFromCollectionSlug<TSlug> extends { _status?: any } ? never : TSlug\n}[CollectionSlug]\n\n/**\n * Conditionally allows or forbids the `draft` property based on collection configuration.\n * When `strictDraftTypes` is enabled, the `draft` property is forbidden on collections without drafts.\n */\nexport type DraftFlagFromCollectionSlug<TSlug extends CollectionSlug> = GeneratedTypes extends {\n strictDraftTypes: true\n}\n ? TSlug extends CollectionsWithoutDrafts\n ? {\n /**\n * The `draft` property is not allowed because this collection does not have `versions.drafts` enabled.\n */\n draft?: never\n }\n : {\n /**\n * Whether the document(s) should be queried from the versions table/collection or not. [More](https://payloadcms.com/docs/versions/drafts#draft-api)\n */\n draft?: boolean\n }\n : {\n /**\n * Whether the document(s) should be queried from the versions table/collection or not. [More](https://payloadcms.com/docs/versions/drafts#draft-api)\n */\n draft?: boolean\n }\n\nexport type AuthOperationsFromCollectionSlug<TSlug extends CollectionSlug> =\n TypedAuthOperations[TSlug]\n\nexport type RequiredDataFromCollection<TData extends JsonObject> = MarkOptional<\n TData,\n 'collection' | 'createdAt' | 'deletedAt' | 'id' | 'updatedAt'\n>\n\nexport type RequiredDataFromCollectionSlug<TSlug extends CollectionSlug> =\n RequiredDataFromCollection<DataFromCollectionSlug<TSlug>>\n\n/**\n * Helper type for draft data INPUT (e.g., create operations) - makes all fields optional except system fields\n * When creating a draft, required fields don't need to be provided as validation is skipped\n * The id field is optional since it's auto-generated\n */\nexport type DraftDataFromCollection<TData extends JsonObject> = Partial<\n Omit<TData, 'collection' | 'createdAt' | 'deletedAt' | 'id' | 'sizes' | 'updatedAt'>\n> &\n Partial<Pick<TData, 'collection' | 'createdAt' | 'deletedAt' | 'id' | 'sizes' | 'updatedAt'>>\n\nexport type DraftDataFromCollectionSlug<TSlug extends CollectionSlug> = DraftDataFromCollection<\n DataFromCollectionSlug<TSlug>\n>\n\n/**\n * Helper type for draft data OUTPUT (e.g., query results) - makes user fields optional but keeps id required\n * When querying drafts, required fields may be null/undefined as validation is skipped, but system fields like id are always present\n */\nexport type QueryDraftDataFromCollection<TData extends JsonObject> = Partial<\n Omit<TData, 'createdAt' | 'deletedAt' | 'id' | 'sizes' | 'updatedAt'>\n> &\n Partial<Pick<TData, 'createdAt' | 'deletedAt' | 'sizes' | 'updatedAt'>> &\n Pick<TData, 'id'>\n\nexport type QueryDraftDataFromCollectionSlug<TSlug extends CollectionSlug> =\n QueryDraftDataFromCollection<DataFromCollectionSlug<TSlug>>\n\nexport type HookOperationType =\n | 'autosave'\n | 'count'\n | 'countVersions'\n | 'create'\n | 'delete'\n | 'forgotPassword'\n | 'login'\n | 'read'\n | 'readDistinct'\n | 'refresh'\n | 'resetPassword'\n | 'restoreVersion'\n | 'update'\n\ntype CreateOrUpdateOperation = Extract<HookOperationType, 'create' | 'update'>\n\nexport type BeforeOperationHook<TOperationGeneric extends CollectionSlug = string> = (\n arg: BeforeOperationArg<TOperationGeneric>,\n) =>\n | Parameters<OperationMap<TOperationGeneric>[keyof OperationMap<TOperationGeneric>]>[0]\n | Promise<Parameters<OperationMap<TOperationGeneric>[keyof OperationMap<TOperationGeneric>]>[0]>\n | Promise<void>\n | void\n\nexport type BeforeValidateHook<T extends TypeWithID = any> = (args: {\n /** The collection which this hook is being run on */\n collection: SanitizedCollectionConfig\n context: RequestContext\n data?: Partial<T>\n /**\n * Hook operation being performed\n */\n operation: CreateOrUpdateOperation\n /**\n * Original document before change\n *\n * `undefined` on 'create' operation\n */\n originalDoc?: T\n req: PayloadRequest\n}) => any\n\nexport type BeforeChangeHook<T extends TypeWithID = any> = (args: {\n /** The collection which this hook is being run on */\n collection: SanitizedCollectionConfig\n context: RequestContext\n data: Partial<T>\n /**\n * Hook operation being performed\n */\n operation: CreateOrUpdateOperation\n /**\n * Original document before change\n *\n * `undefined` on 'create' operation\n */\n originalDoc?: T\n req: PayloadRequest\n}) => any\n\nexport type AfterChangeHook<T extends TypeWithID = any> = (args: {\n /** The collection which this hook is being run on */\n collection: SanitizedCollectionConfig\n context: RequestContext\n data: Partial<T>\n doc: T\n /**\n * Hook operation being performed\n */\n operation: CreateOrUpdateOperation\n /**\n * Whether access control is being overridden for this operation\n */\n overrideAccess?: boolean\n previousDoc: T\n req: PayloadRequest\n}) => any\n\nexport type BeforeReadHook<T extends TypeWithID = any> = (args: {\n /** The collection which this hook is being run on */\n collection: SanitizedCollectionConfig\n context: RequestContext\n doc: T\n /**\n * Whether access control is being overridden for this operation\n */\n overrideAccess?: boolean\n query: { [key: string]: any }\n req: PayloadRequest\n}) => any\n\nexport type AfterReadHook<T extends TypeWithID = any> = (args: {\n /** The collection which this hook is being run on */\n collection: SanitizedCollectionConfig\n context: RequestContext\n doc: T\n findMany?: boolean\n /**\n * Whether access control is being overridden for this operation\n */\n overrideAccess?: boolean\n query?: { [key: string]: any }\n req: PayloadRequest\n}) => any\n\nexport type BeforeDeleteHook = (args: {\n /** The collection which this hook is being run on */\n collection: SanitizedCollectionConfig\n context: RequestContext\n id: number | string\n req: PayloadRequest\n}) => any\n\nexport type AfterDeleteHook<T extends TypeWithID = any> = (args: {\n /** The collection which this hook is being run on */\n collection: SanitizedCollectionConfig\n context: RequestContext\n doc: T\n id: number | string\n req: PayloadRequest\n}) => any\n\nexport type AfterOperationHook<TOperationGeneric extends CollectionSlug = string> = (\n arg: AfterOperationArg<TOperationGeneric>,\n) =>\n | Awaited<ReturnType<OperationMap<TOperationGeneric>[keyof OperationMap<TOperationGeneric>]>>\n | Promise<\n Awaited<ReturnType<OperationMap<TOperationGeneric>[keyof OperationMap<TOperationGeneric>]>>\n >\n\nexport type BeforeLoginHook<T extends TypeWithID = any> = (args: {\n /** The collection which this hook is being run on */\n collection: SanitizedCollectionConfig\n context: RequestContext\n req: PayloadRequest\n user: T\n}) => any\n\nexport type AfterLoginHook<T extends TypeWithID = any> = (args: {\n /** The collection which this hook is being run on */\n collection: SanitizedCollectionConfig\n context: RequestContext\n req: PayloadRequest\n token: string\n user: T\n}) => any\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport type AfterLogoutHook<T extends TypeWithID = any> = (args: {\n /** The collection which this hook is being run on */\n collection: SanitizedCollectionConfig\n context: RequestContext\n req: PayloadRequest\n}) => any\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport type AfterMeHook<T extends TypeWithID = any> = (args: {\n /** The collection which this hook is being run on */\n collection: SanitizedCollectionConfig\n context: RequestContext\n req: PayloadRequest\n response: unknown\n}) => any\n\nexport type RefreshHook<T extends TypeWithID = any> = (args: {\n args: RefreshArguments\n user: T\n}) => Promise<RefreshResult | void> | (RefreshResult | void)\n\nexport type MeHook<T extends TypeWithID = any> = (args: {\n args: MeArguments\n user: T\n}) => ({ exp: number; user: T } | void) | Promise<{ exp: number; user: T } | void>\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport type AfterRefreshHook<T extends TypeWithID = any> = (args: {\n /** The collection which this hook is being run on */\n collection: SanitizedCollectionConfig\n context: RequestContext\n exp: number\n req: PayloadRequest\n token: string\n}) => any\n\nexport type AfterErrorHook = (\n args: { collection: SanitizedCollectionConfig } & AfterErrorHookArgs,\n) => AfterErrorResult | Promise<AfterErrorResult>\n\nexport type AfterForgotPasswordHook = (args: {\n args?: any\n /** The collection which this hook is being run on */\n collection: SanitizedCollectionConfig\n context: RequestContext\n}) => any\n\nexport type EnableFoldersOptions = {\n // Displays the folder collection and parentFolder field in the document view\n debug?: boolean\n}\n\n/**\n * Configuration options for folder hierarchy preset.\n * Subset of HierarchyConfig with folder-appropriate defaults applied.\n */\nexport type FoldersConfig = {\n admin?: {\n components?: {\n Icon?: PayloadComponent\n }\n injectSidebarTab?: boolean\n treeLimit?: number\n useHeaderButton?: boolean\n }\n collectionSpecific?:\n | {\n fieldName?: string\n }\n | boolean\n joinField?: HierarchyJoinFieldConfig\n parentFieldName?: string\n slugField?: string\n slugify?: (text: string) => string\n slugPathFieldName?: string\n titlePathFieldName?: string\n}\n\n/**\n * Configuration options for tags hierarchy preset.\n * Same as FoldersConfig but allowHasMany can be overridden.\n */\nexport type TagsConfig = {\n allowHasMany?: boolean\n} & FoldersConfig\n\nexport type BaseFilter = (args: {\n limit: number\n locale?: TypedLocale\n page: number\n req: PayloadRequest\n sort: string\n}) => null | Promise<null | Where> | Where\n\n/**\n * @deprecated Use `BaseFilter` instead.\n */\nexport type BaseListFilter = BaseFilter\n\nexport type CollectionAdminOptions = {\n /**\n * Defines a default base filter which will be applied in the following parts of the admin panel:\n * - List View\n * - Relationship fields for internal links within the Lexical editor\n *\n * This is especially useful for plugins like multi-tenant. For example,\n * a user may have access to multiple tenants, but should only see content\n * related to the currently active or selected tenant in those places.\n */\n baseFilter?: BaseFilter\n /**\n * @deprecated Use `baseFilter` instead. If both are defined,\n * `baseFilter` will take precedence. This property remains only\n * for backward compatibility and may be removed in a future version.\n *\n * Originally, `baseListFilter` was intended to filter only the List View\n * in the admin panel. However, base filtering is often required in other areas\n * such as internal link relationships in the Lexical editor.\n */\n baseListFilter?: BaseListFilter\n /**\n * Custom admin components\n */\n components?: {\n afterList?: CustomComponent[]\n afterListTable?: CustomComponent[]\n beforeList?: CustomComponent[]\n beforeListTable?: CustomComponent[]\n /**\n * Components within the edit view\n */\n edit?: {\n /**\n * Replaces the \"Upload\" section\n * + upload must be enabled\n */\n Upload?: CustomUpload\n } & SharedEditViewComponents\n listMenuItems?: CustomComponent[]\n views?: {\n /**\n * Replace or modify the \"list\" view.\n * @link https://payloadcms.com/docs/custom-components/list-view\n */\n list?: {\n actions?: CustomComponent[]\n Component?: PayloadComponent\n NoResults?: CustomComponent\n }\n } & SharedEntityViews\n } & Omit<SharedAdminComponents, 'edit' | 'views'>\n /** Extension point to add your custom data. Available in server and client. */\n custom?: CollectionAdminCustom\n /**\n * Default columns to show in list view\n */\n defaultColumns?: string[]\n /**\n * Custom description for collection. This will also be used as JSDoc for the generated types\n */\n description?: EntityDescription\n /**\n * Disable the Copy To Locale button in the edit document view\n * @default false\n */\n disableCopyToLocale?: boolean\n enableRichTextLink?: boolean\n enableRichTextRelationship?: boolean\n /**\n * Function to format the URL for document links in the list view.\n * Return null to disable linking for that document.\n * Return a string to customize the link destination.\n * If not provided, uses the default admin edit URL.\n */\n formatDocURL?: (args: {\n collectionSlug: string\n /**\n * The default URL that would normally be used for this document link.\n * You can return this as-is, modify it, or completely replace it.\n */\n defaultURL: string\n doc: Record<string, unknown>\n req: PayloadRequest\n /**\n * The current view context where the link is being generated.\n * Most relevant values for document linking are 'list' and 'trash'.\n */\n viewType?: ViewTypes\n }) => null | string\n /**\n * Specify a navigational group for collections in the admin sidebar.\n * - Provide a string to place the entity in a custom group.\n * - Provide a record to define localized group names.\n * - Set to `false` to exclude the entity from the sidebar / dashboard without disabling its routes.\n */\n group?: false | Record<string, string> | string\n /**\n * Exclude the collection from the admin nav and routes\n */\n hidden?: ((args: { user: ClientUser }) => boolean) | boolean\n /**\n * Additional fields to be searched via the full text search\n */\n listSearchableFields?: string[]\n /**\n * Live Preview options.\n *\n * @see https://payloadcms.com/docs/live-preview/overview\n */\n livePreview?: LivePreviewConfig\n meta?: MetaConfig\n pagination?: {\n defaultLimit?: number\n limits?: number[]\n }\n /**\n * Function to generate custom preview URL\n */\n preview?: GeneratePreviewURL\n /**\n * Field to use as title in Edit View and first column in List view\n */\n useAsTitle?: string\n}\n\n/** Manage all aspects of a data collection */\nexport type CollectionConfig<TSlug extends CollectionSlug = any> = {\n /**\n * Do not set this property manually. This is set to true during sanitization, to avoid\n * sanitizing the same collection multiple times.\n */\n _sanitized?: boolean\n /**\n * Access control\n */\n access?: {\n admin?: ({ req }: { req: PayloadRequest }) => boolean | Promise<boolean>\n create?: Access\n delete?: Access\n read?: Access\n readVersions?: Access\n unlock?: Access\n update?: Access\n }\n /**\n * Collection admin options\n */\n admin?: CollectionAdminOptions\n /**\n * Collection login options\n *\n * Use `true` to enable with default options\n */\n auth?: boolean | IncomingAuthType\n /**\n * Configuration for bulk operations\n */\n /** Extension point to add your custom data. Server only. */\n custom?: CollectionCustom\n /**\n * Used to override the default naming of the database table or collection with your using a function or string\n * @WARNING: If you change this property with existing data, you will need to handle the renaming of the table in your database or by using migrations\n */\n dbName?: DBIdentifierName\n defaultPopulate?: IsAny<SelectFromCollectionSlug<TSlug>> extends true\n ? SelectType\n : SelectFromCollectionSlug<TSlug>\n /**\n * Default field to sort by in collection list view\n */\n defaultSort?: Sort\n /**\n * Disable the bulk delete operation for the collection in the admin panel and the API\n */\n disableBulkDelete?: boolean\n /**\n * Disable the bulk edit operation for the collection in the admin panel and the API\n */\n disableBulkEdit?: boolean\n /**\n * When true, do not show the \"Duplicate\" button while editing documents within this collection and prevent `duplicate` from all APIs\n */\n disableDuplicate?: boolean\n /**\n * Opt-in to enable query presets for this collection.\n * @see https://payloadcms.com/docs/query-presets/overview\n */\n enableQueryPresets?: boolean\n /**\n * Custom rest api endpoints, set false to disable all rest endpoints for this collection.\n */\n endpoints?: false | Omit<Endpoint, 'root'>[]\n fields: Field[]\n /**\n * Enable folder hierarchy preset for this collection.\n * Sets hierarchy with folder defaults: allowHasMany: false, FolderIcon, useHeaderButton: true\n *\n * Use `true` for defaults, or object for customization.\n * Cannot be used together with `tags` or `hierarchy`.\n */\n folders?: boolean | FoldersConfig\n /**\n * GraphQL configuration\n */\n graphQL?:\n | {\n disableMutations?: true\n disableQueries?: true\n pluralName?: string\n singularName?: string\n }\n | false\n /**\n * Enable hierarchical tree structure for this collection\n *\n * Use `true` to enable with defaults (auto-detects parent field)\n * or provide configuration object\n *\n * @example\n * // Enable with defaults\n * hierarchy: true\n *\n * @example\n * // Customize field names and slugify function\n * hierarchy: {\n * parentFieldName: 'parent',\n * slugify: (text) => customSlugify(text),\n * slugPathFieldName: '_breadcrumbPath'\n * }\n */\n hierarchy?: boolean | HierarchyConfig\n /**\n * Hooks to modify Payload functionality\n */\n hooks?: {\n afterChange?: AfterChangeHook[]\n afterDelete?: AfterDeleteHook[]\n afterError?: AfterErrorHook[]\n afterForgotPassword?: AfterForgotPasswordHook[]\n afterLogin?: AfterLoginHook[]\n afterLogout?: AfterLogoutHook[]\n afterMe?: AfterMeHook[]\n afterOperation?: AfterOperationHook<TSlug>[]\n afterRead?: AfterReadHook[]\n afterRefresh?: AfterRefreshHook[]\n beforeChange?: BeforeChangeHook[]\n beforeDelete?: BeforeDeleteHook[]\n beforeLogin?: BeforeLoginHook[]\n beforeOperation?: BeforeOperationHook<TSlug>[]\n beforeRead?: BeforeReadHook[]\n beforeValidate?: BeforeValidateHook[]\n /**\n /**\n * Use the `me` hook to control the `me` operation.\n * Here, you can optionally instruct the me operation to return early,\n * and skip its default logic.\n */\n me?: MeHook[]\n /**\n * Use the `refresh` hook to control the refresh operation.\n * Here, you can optionally instruct the refresh operation to return early,\n * and skip its default logic.\n */\n refresh?: RefreshHook[]\n }\n /**\n * Define compound indexes for this collection.\n * This can be used to either speed up querying/sorting by 2 or more fields at the same time or\n * to ensure uniqueness between several fields.\n * Specify field paths\n * @example\n * [{ unique: true, fields: ['title', 'group.name'] }]\n * @default []\n */\n indexes?: CompoundIndex[]\n /**\n * Label configuration\n */\n labels?: {\n plural?: LabelFunction | StaticLabel\n singular?: LabelFunction | StaticLabel\n }\n /**\n * Enables / Disables the ability to lock documents while editing\n * @default true\n */\n lockDocuments?:\n | {\n duration: number\n }\n | false\n /**\n * If true, enables custom ordering for the collection, and documents in the listView can be reordered via drag and drop.\n * New documents are inserted at the end of the list according to this parameter.\n *\n * Under the hood, a field with {@link https://payloadcms.com/docs/configuration/collections#fractional-indexing|fractional indexing} is used to optimize inserts and reorderings.\n *\n * @default false\n *\n * @experimental There may be frequent breaking changes to this API\n */\n orderable?: boolean\n slug: string\n /**\n * Enable tags hierarchy preset for this collection.\n * Sets hierarchy with tag defaults: allowHasMany: true, TagIcon\n *\n * Use `true` for defaults, or object for customization.\n * Cannot be used together with `folders` or `hierarchy`.\n */\n tags?: boolean | TagsConfig\n /**\n * Add `createdAt`, `deletedAt` and `updatedAt` fields\n *\n * @default true\n */\n timestamps?: boolean\n /**\n * Enables trash support for this collection.\n *\n * When enabled, documents will include a `deletedAt` timestamp field.\n * This allows documents to be marked as deleted without being permanently removed.\n * The `deletedAt` field will be set to the current date and time when a document is trashed.\n *\n * @default false\n */\n trash?: boolean\n /**\n * Options used in typescript generation\n */\n typescript?: {\n /**\n * Typescript generation name given to the interface type\n */\n interface?: string\n }\n /**\n * Customize the handling of incoming file uploads\n *\n * @default false // disable uploads\n */\n upload?: boolean | UploadConfig\n /**\n * Enable versioning. Set it to true to enable default versions settings,\n * or customize versions options by setting the property equal to an object\n * containing the version options.\n *\n * @default false // disable versioning\n */\n versions?: boolean | IncomingCollectionVersions\n} & Pick<\n WithSelectFn<\n IsAny<SelectFromCollectionSlug<TSlug>> extends true\n ? SelectIncludeType\n : SelectFromCollectionSlug<TSlug>\n >,\n 'select'\n>\n\nexport type SanitizedJoin = {\n /**\n * The field configuration defining the join\n */\n field: JoinField\n getForeignPath?(args: { locale?: TypedLocale }): string\n /**\n * The path of the join field in dot notation\n */\n joinPath: string\n /**\n * `parentIsLocalized` is true if any parent field of the\n * field configuration defining the join is localized\n */\n parentIsLocalized: boolean\n targetField: RelationshipField | UploadField\n}\n\nexport type SanitizedJoins = {\n [collectionSlug: string]: SanitizedJoin[]\n}\n\n/**\n * @todo remove the `DeepRequired` in v4.\n * We don't actually guarantee that all properties are set when sanitizing configs.\n */\nexport interface SanitizedCollectionConfig\n extends Omit<\n DeepRequired<CollectionConfig>,\n | 'admin'\n | 'auth'\n | 'endpoints'\n | 'fields'\n | 'folder'\n | 'folders'\n | 'hierarchy'\n | 'slug'\n | 'tags'\n | 'upload'\n | 'versions'\n > {\n admin: CollectionAdminOptions\n auth: Auth\n endpoints: Endpoint[] | false\n fields: Field[]\n /**\n * Fields in the database schema structure\n * Rows / collapsible / tabs w/o name `fields` merged to top, UIs are excluded\n */\n flattenedFields: FlattenedField[]\n /**\n * Hierarchy configuration (when collection is a hierarchy type like folders or tags)\n */\n hierarchy: false | SanitizedHierarchyConfig\n /**\n * Object of collections to join 'Join Fields object keyed by collection\n */\n joins: SanitizedJoins\n /**\n * List of all polymorphic join fields\n */\n polymorphicJoins: SanitizedJoin[]\n\n sanitizedIndexes: SanitizedCompoundIndex[]\n\n slug: CollectionSlug\n\n upload: SanitizedUploadConfig\n versions?: SanitizedCollectionVersions\n}\n\nexport type Collection = {\n config: SanitizedCollectionConfig\n customIDType?: 'number' | 'text'\n graphQL?: {\n countType: GraphQLObjectType\n JWT: GraphQLObjectType\n mutationInputType: GraphQLNonNull<any>\n paginatedType: GraphQLObjectType\n type: GraphQLObjectType\n updateMutationInputType: GraphQLNonNull<any>\n versionType: GraphQLObjectType\n whereInputType: GraphQLInputObjectType\n }\n}\n\nexport type BulkOperationResult<TSlug extends CollectionSlug, TSelect extends SelectType> = {\n docs: TransformCollectionWithSelect<TSlug, TSelect>[]\n errors: {\n id: DataFromCollectionSlug<TSlug>['id']\n isPublic: boolean\n message: string\n }[]\n}\n\nexport type AuthCollection = {\n config: SanitizedCollectionConfig\n}\n\nexport type LocalizedMeta = {\n [locale: string]: {\n status: 'draft' | 'published'\n updatedAt: string\n }\n}\n\nexport type TypeWithID = {\n id: number | string\n}\n\nexport type TypeWithTimestamps = {\n [key: string]: unknown\n createdAt: string\n deletedAt?: null | string\n id: number | string\n updatedAt: string\n}\n\nexport type CompoundIndex = {\n fields: string[]\n unique?: boolean\n}\n\nexport type SanitizedCompoundIndex = {\n fields: {\n field: FlattenedField\n localizedPath: string\n path: string\n pathHasLocalized: boolean\n }[]\n unique: boolean\n}\n"],"names":[],"mappings":"AAAA,qDAAqD,GAw3BrD,WAQC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useAsTitle.d.ts","sourceRoot":"","sources":["../../../src/collections/config/useAsTitle.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAA;AAMtD;;GAEG;AACH,eAAO,MAAM,kBAAkB,
|
|
1
|
+
{"version":3,"file":"useAsTitle.d.ts","sourceRoot":"","sources":["../../../src/collections/config/useAsTitle.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAA;AAMtD;;GAEG;AACH,eAAO,MAAM,kBAAkB,GAAI,QAAQ,gBAAgB,SAsC1D,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dataloader.d.ts","sourceRoot":"","sources":["../../src/collections/dataloader.ts"],"names":[],"mappings":"AAEA,OAAO,UAAU,MAAM,YAAY,CAAA;AAGnC,OAAO,KAAK,EAAE,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAA;AAC/D,OAAO,KAAK,EAAE,cAAc,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA;AACjF,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA;AA8JnD,eAAO,MAAM,aAAa,
|
|
1
|
+
{"version":3,"file":"dataloader.d.ts","sourceRoot":"","sources":["../../src/collections/dataloader.ts"],"names":[],"mappings":"AAEA,OAAO,UAAU,MAAM,YAAY,CAAA;AAGnC,OAAO,KAAK,EAAE,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAA;AAC/D,OAAO,KAAK,EAAE,cAAc,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA;AACjF,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA;AA8JnD,eAAO,MAAM,aAAa,GAAI,KAAK,cAAc;;0CAgBhD,CAAA;AA4CD,KAAK,kBAAkB,GAAG;IACxB,cAAc,EAAE,MAAM,CAAA;IACtB,YAAY,EAAE,MAAM,CAAA;IACpB,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,MAAM,GAAG,MAAM,CAAA;IACtB,KAAK,EAAE,OAAO,CAAA;IACd,cAAc,EAAE,mBAAmB,CAAA;IACnC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,CAAA;IACzB,cAAc,EAAE,OAAO,CAAA;IACvB,QAAQ,CAAC,EAAE,YAAY,CAAA;IACvB,MAAM,CAAC,EAAE,UAAU,CAAA;IACnB,gBAAgB,EAAE,OAAO,CAAA;IACzB,aAAa,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,MAAM,CAAC,GAAG,MAAM,CAAA;CAC1D,CAAA;AACD,eAAO,MAAM,wBAAwB,GAAI,mJAatC,kBAAkB,KAAG,MAcpB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create.d.ts","sourceRoot":"","sources":["../../../src/collections/endpoints/create.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAA;AAO3D,eAAO,MAAM,aAAa,EAAE,
|
|
1
|
+
{"version":3,"file":"create.d.ts","sourceRoot":"","sources":["../../../src/collections/endpoints/create.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAA;AAO3D,eAAO,MAAM,aAAa,EAAE,cAgC3B,CAAA"}
|