payload 3.84.0 → 4.0.0-internal.38b7f1d
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/admin/elements/Nav.d.ts +13 -0
- package/dist/admin/elements/Nav.d.ts.map +1 -1
- package/dist/admin/elements/Nav.js.map +1 -1
- package/dist/admin/functions/index.d.ts +1 -38
- 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 +5 -4
- package/dist/admin/types.d.ts.map +1 -1
- package/dist/admin/types.js.map +1 -1
- package/dist/admin/views/hierarchyList.d.ts +9 -0
- package/dist/admin/views/hierarchyList.d.ts.map +1 -0
- package/dist/admin/views/hierarchyList.js +3 -0
- package/dist/admin/views/hierarchyList.js.map +1 -0
- package/dist/admin/views/index.d.ts +1 -3
- package/dist/admin/views/index.d.ts.map +1 -1
- package/dist/admin/views/index.js.map +1 -1
- package/dist/admin/views/list.d.ts +43 -2
- package/dist/admin/views/list.d.ts.map +1 -1
- package/dist/admin/views/list.js.map +1 -1
- package/dist/bin/generateImportMap/iterateCollections.d.ts.map +1 -1
- package/dist/bin/generateImportMap/iterateCollections.js +1 -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 +7 -0
- package/dist/bin/generateImportMap/iterateConfig.js.map +1 -1
- package/dist/bin/generateImportMap/iterateGlobals.d.ts.map +1 -1
- package/dist/bin/generateImportMap/iterateGlobals.js +20 -8
- package/dist/bin/generateImportMap/iterateGlobals.js.map +1 -1
- package/dist/bin/index.d.ts.map +1 -1
- package/dist/bin/index.js +1 -3
- package/dist/bin/index.js.map +1 -1
- package/dist/collections/config/client.d.ts +4 -2
- package/dist/collections/config/client.d.ts.map +1 -1
- package/dist/collections/config/client.js +13 -1
- package/dist/collections/config/client.js.map +1 -1
- package/dist/collections/config/defaults.js +1 -1
- package/dist/collections/config/defaults.js.map +1 -1
- package/dist/collections/config/sanitize.d.ts.map +1 -1
- package/dist/collections/config/sanitize.js +51 -10
- package/dist/collections/config/sanitize.js.map +1 -1
- package/dist/collections/config/types.d.ts +76 -91
- package/dist/collections/config/types.d.ts.map +1 -1
- package/dist/collections/config/types.js.map +1 -1
- package/dist/collections/operations/create.d.ts.map +1 -1
- package/dist/collections/operations/create.js +24 -19
- 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 +7 -2
- package/dist/collections/operations/delete.js.map +1 -1
- package/dist/collections/operations/deleteByID.d.ts.map +1 -1
- package/dist/collections/operations/deleteByID.js +7 -2
- package/dist/collections/operations/deleteByID.js.map +1 -1
- package/dist/collections/operations/find.d.ts.map +1 -1
- package/dist/collections/operations/find.js +7 -2
- package/dist/collections/operations/find.js.map +1 -1
- package/dist/collections/operations/findByID.d.ts.map +1 -1
- package/dist/collections/operations/findByID.js +10 -5
- package/dist/collections/operations/findByID.js.map +1 -1
- package/dist/collections/operations/findVersionByID.d.ts.map +1 -1
- package/dist/collections/operations/findVersionByID.js +6 -4
- package/dist/collections/operations/findVersionByID.js.map +1 -1
- package/dist/collections/operations/findVersions.d.ts.map +1 -1
- package/dist/collections/operations/findVersions.js +6 -4
- package/dist/collections/operations/findVersions.js.map +1 -1
- package/dist/collections/operations/restoreVersion.d.ts.map +1 -1
- package/dist/collections/operations/restoreVersion.js +7 -2
- package/dist/collections/operations/restoreVersion.js.map +1 -1
- package/dist/collections/operations/update.d.ts.map +1 -1
- package/dist/collections/operations/update.js +7 -2
- package/dist/collections/operations/update.js.map +1 -1
- package/dist/collections/operations/updateByID.d.ts.map +1 -1
- package/dist/collections/operations/updateByID.js +7 -2
- package/dist/collections/operations/updateByID.js.map +1 -1
- package/dist/collections/operations/utilities/update.d.ts.map +1 -1
- package/dist/collections/operations/utilities/update.js +5 -4
- package/dist/collections/operations/utilities/update.js.map +1 -1
- package/dist/config/client.d.ts.map +1 -1
- package/dist/config/client.js +0 -10
- package/dist/config/client.js.map +1 -1
- package/dist/config/defaults.d.ts.map +1 -1
- package/dist/config/defaults.js +0 -15
- package/dist/config/defaults.js.map +1 -1
- package/dist/config/orderable/index.d.ts.map +1 -1
- package/dist/config/orderable/index.js +0 -4
- package/dist/config/orderable/index.js.map +1 -1
- package/dist/config/sanitize.d.ts.map +1 -1
- package/dist/config/sanitize.js +3 -38
- package/dist/config/sanitize.js.map +1 -1
- package/dist/config/types.d.ts +120 -13
- package/dist/config/types.d.ts.map +1 -1
- package/dist/config/types.js.map +1 -1
- package/dist/database/migrations/config/batchTransform.d.ts +16 -0
- package/dist/database/migrations/config/batchTransform.d.ts.map +1 -0
- package/dist/database/migrations/config/batchTransform.js +17 -0
- package/dist/database/migrations/config/batchTransform.js.map +1 -0
- package/dist/database/migrations/config/batchTransform.spec.js +68 -0
- package/dist/database/migrations/config/batchTransform.spec.js.map +1 -0
- package/dist/database/migrations/config/bootstrapConfigState.d.ts +4 -0
- package/dist/database/migrations/config/bootstrapConfigState.d.ts.map +1 -0
- package/dist/database/migrations/config/bootstrapConfigState.js +10 -0
- package/dist/database/migrations/config/bootstrapConfigState.js.map +1 -0
- package/dist/database/migrations/config/configStateStore.d.ts +4 -0
- package/dist/database/migrations/config/configStateStore.d.ts.map +1 -0
- package/dist/database/migrations/config/configStateStore.js +29 -0
- package/dist/database/migrations/config/configStateStore.js.map +1 -0
- package/dist/database/migrations/config/diffConfig.d.ts +3 -0
- package/dist/database/migrations/config/diffConfig.d.ts.map +1 -0
- package/dist/database/migrations/config/diffConfig.js +123 -0
- package/dist/database/migrations/config/diffConfig.js.map +1 -0
- package/dist/database/migrations/config/diffConfig.spec.js +136 -0
- package/dist/database/migrations/config/diffConfig.spec.js.map +1 -0
- package/dist/database/migrations/config/generateDataMigrationCode.d.ts +11 -0
- package/dist/database/migrations/config/generateDataMigrationCode.d.ts.map +1 -0
- package/dist/database/migrations/config/generateDataMigrationCode.js +28 -0
- package/dist/database/migrations/config/generateDataMigrationCode.js.map +1 -0
- package/dist/database/migrations/config/generateDataMigrationCode.spec.js +52 -0
- package/dist/database/migrations/config/generateDataMigrationCode.spec.js.map +1 -0
- package/dist/database/migrations/config/index.d.ts +9 -0
- package/dist/database/migrations/config/index.d.ts.map +1 -0
- package/dist/database/migrations/config/index.js +9 -0
- package/dist/database/migrations/config/index.js.map +1 -0
- package/dist/database/migrations/config/prompts.d.ts +5 -0
- package/dist/database/migrations/config/prompts.d.ts.map +1 -0
- package/dist/database/migrations/config/prompts.js +49 -0
- package/dist/database/migrations/config/prompts.js.map +1 -0
- package/dist/database/migrations/config/serializeConfig.d.ts +4 -0
- package/dist/database/migrations/config/serializeConfig.d.ts.map +1 -0
- package/dist/database/migrations/config/serializeConfig.js +65 -0
- package/dist/database/migrations/config/serializeConfig.js.map +1 -0
- package/dist/database/migrations/config/serializeConfig.spec.js +146 -0
- package/dist/database/migrations/config/serializeConfig.spec.js.map +1 -0
- package/dist/database/migrations/config/types.d.ts +66 -0
- package/dist/database/migrations/config/types.d.ts.map +1 -0
- package/dist/database/migrations/config/types.js.map +1 -0
- package/dist/database/migrations/migrate.d.ts.map +1 -1
- package/dist/database/migrations/migrate.js +3 -0
- package/dist/database/migrations/migrate.js.map +1 -1
- package/dist/database/types.d.ts +29 -0
- package/dist/database/types.d.ts.map +1 -1
- package/dist/database/types.js.map +1 -1
- package/dist/exports/migrations.d.ts +1 -0
- package/dist/exports/migrations.d.ts.map +1 -1
- package/dist/exports/migrations.js +2 -1
- package/dist/exports/migrations.js.map +1 -1
- package/dist/exports/shared.d.ts +6 -3
- package/dist/exports/shared.d.ts.map +1 -1
- package/dist/exports/shared.js +4 -2
- package/dist/exports/shared.js.map +1 -1
- package/dist/fields/baseFields/slug/index.d.ts.map +1 -1
- package/dist/fields/baseFields/slug/index.js +6 -4
- package/dist/fields/baseFields/slug/index.js.map +1 -1
- package/dist/fields/config/client.d.ts.map +1 -1
- package/dist/fields/config/client.js +3 -2
- 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 +12 -10
- package/dist/fields/config/sanitize.js.map +1 -1
- package/dist/fields/config/sanitizeJoinField.d.ts.map +1 -1
- package/dist/fields/config/sanitizeJoinField.js +3 -0
- package/dist/fields/config/sanitizeJoinField.js.map +1 -1
- package/dist/fields/config/types.d.ts +17 -73
- package/dist/fields/config/types.d.ts.map +1 -1
- package/dist/fields/config/types.js +11 -1
- package/dist/fields/config/types.js.map +1 -1
- package/dist/fields/isFieldDisabled.d.ts +12 -0
- package/dist/fields/isFieldDisabled.d.ts.map +1 -0
- package/dist/fields/isFieldDisabled.js +15 -0
- package/dist/fields/isFieldDisabled.js.map +1 -0
- package/dist/fields/isFieldDisabled.spec.js +134 -0
- package/dist/fields/isFieldDisabled.spec.js.map +1 -0
- package/dist/fields/validations.js +1 -1
- package/dist/fields/validations.js.map +1 -1
- package/dist/globals/config/client.d.ts +1 -1
- package/dist/globals/config/client.d.ts.map +1 -1
- package/dist/globals/config/client.js +2 -1
- package/dist/globals/config/client.js.map +1 -1
- package/dist/globals/config/sanitize.js +6 -2
- package/dist/globals/config/sanitize.js.map +1 -1
- package/dist/globals/config/types.d.ts +4 -57
- package/dist/globals/config/types.d.ts.map +1 -1
- package/dist/globals/config/types.js.map +1 -1
- package/dist/globals/operations/findOne.d.ts.map +1 -1
- package/dist/globals/operations/findOne.js +7 -2
- package/dist/globals/operations/findOne.js.map +1 -1
- package/dist/globals/operations/findVersionByID.d.ts.map +1 -1
- package/dist/globals/operations/findVersionByID.js +6 -4
- package/dist/globals/operations/findVersionByID.js.map +1 -1
- package/dist/globals/operations/findVersions.d.ts.map +1 -1
- package/dist/globals/operations/findVersions.js +6 -4
- package/dist/globals/operations/findVersions.js.map +1 -1
- package/dist/globals/operations/update.d.ts.map +1 -1
- package/dist/globals/operations/update.js +7 -2
- package/dist/globals/operations/update.js.map +1 -1
- package/dist/hierarchy/addHierarchyToCollection.d.ts +9 -0
- package/dist/hierarchy/addHierarchyToCollection.d.ts.map +1 -0
- package/dist/hierarchy/addHierarchyToCollection.js +76 -0
- package/dist/hierarchy/addHierarchyToCollection.js.map +1 -0
- package/dist/hierarchy/buildParentField.d.ts +11 -0
- package/dist/hierarchy/buildParentField.d.ts.map +1 -0
- package/dist/hierarchy/buildParentField.js +42 -0
- package/dist/hierarchy/buildParentField.js.map +1 -0
- package/dist/hierarchy/constants.d.ts +15 -0
- package/dist/hierarchy/constants.d.ts.map +1 -0
- package/dist/hierarchy/constants.js +11 -0
- package/dist/hierarchy/constants.js.map +1 -0
- package/dist/hierarchy/createFolderField.d.ts +39 -0
- package/dist/hierarchy/createFolderField.d.ts.map +1 -0
- package/dist/hierarchy/createFolderField.js +54 -0
- package/dist/hierarchy/createFolderField.js.map +1 -0
- package/dist/hierarchy/createTagField.d.ts +44 -0
- package/dist/hierarchy/createTagField.d.ts.map +1 -0
- package/dist/hierarchy/createTagField.js +48 -0
- package/dist/hierarchy/createTagField.js.map +1 -0
- package/dist/hierarchy/getInitialTreeData.d.ts +27 -0
- package/dist/hierarchy/getInitialTreeData.d.ts.map +1 -0
- package/dist/hierarchy/getInitialTreeData.js +125 -0
- package/dist/hierarchy/getInitialTreeData.js.map +1 -0
- package/dist/hierarchy/hooks/collectionAfterDelete.d.ts +14 -0
- package/dist/hierarchy/hooks/collectionAfterDelete.d.ts.map +1 -0
- package/dist/hierarchy/hooks/collectionAfterDelete.js +21 -0
- package/dist/hierarchy/hooks/collectionAfterDelete.js.map +1 -0
- package/dist/hierarchy/hooks/collectionAfterRead.d.ts +27 -0
- package/dist/hierarchy/hooks/collectionAfterRead.d.ts.map +1 -0
- package/dist/hierarchy/hooks/collectionAfterRead.js +72 -0
- package/dist/hierarchy/hooks/collectionAfterRead.js.map +1 -0
- package/dist/hierarchy/hooks/collectionBeforeChange.d.ts +19 -0
- package/dist/hierarchy/hooks/collectionBeforeChange.d.ts.map +1 -0
- package/dist/hierarchy/hooks/collectionBeforeChange.js +90 -0
- package/dist/hierarchy/hooks/collectionBeforeChange.js.map +1 -0
- package/dist/hierarchy/hooks/collectionBeforeDelete.d.ts +15 -0
- package/dist/hierarchy/hooks/collectionBeforeDelete.d.ts.map +1 -0
- package/dist/hierarchy/hooks/collectionBeforeDelete.js +20 -0
- package/dist/hierarchy/hooks/collectionBeforeDelete.js.map +1 -0
- package/dist/hierarchy/hooks/collectionBeforeOperation.d.ts +33 -0
- package/dist/hierarchy/hooks/collectionBeforeOperation.d.ts.map +1 -0
- package/dist/hierarchy/hooks/collectionBeforeOperation.js +66 -0
- package/dist/hierarchy/hooks/collectionBeforeOperation.js.map +1 -0
- package/dist/hierarchy/hooks/ensureSafeCollectionsChange.d.ts +8 -0
- package/dist/hierarchy/hooks/ensureSafeCollectionsChange.d.ts.map +1 -0
- package/dist/hierarchy/hooks/ensureSafeCollectionsChange.js +108 -0
- package/dist/hierarchy/hooks/ensureSafeCollectionsChange.js.map +1 -0
- package/dist/hierarchy/injectHierarchyButton.d.ts +14 -0
- package/dist/hierarchy/injectHierarchyButton.d.ts.map +1 -0
- package/dist/hierarchy/injectHierarchyButton.js +37 -0
- package/dist/hierarchy/injectHierarchyButton.js.map +1 -0
- package/dist/hierarchy/presets.d.ts +13 -0
- package/dist/hierarchy/presets.d.ts.map +1 -0
- package/dist/hierarchy/presets.js +52 -0
- package/dist/hierarchy/presets.js.map +1 -0
- package/dist/hierarchy/resolveHierarchyCollections.d.ts +23 -0
- package/dist/hierarchy/resolveHierarchyCollections.d.ts.map +1 -0
- package/dist/hierarchy/resolveHierarchyCollections.js +321 -0
- package/dist/hierarchy/resolveHierarchyCollections.js.map +1 -0
- package/dist/hierarchy/sanitizeHierarchyCollection.d.ts +14 -0
- package/dist/hierarchy/sanitizeHierarchyCollection.d.ts.map +1 -0
- package/dist/hierarchy/sanitizeHierarchyCollection.js +117 -0
- package/dist/hierarchy/sanitizeHierarchyCollection.js.map +1 -0
- package/dist/hierarchy/types.d.ts +155 -0
- package/dist/hierarchy/types.d.ts.map +1 -0
- package/dist/hierarchy/types.js +6 -0
- package/dist/hierarchy/types.js.map +1 -0
- package/dist/hierarchy/utils/buildLocalizedHierarchyPaths.d.ts +77 -0
- package/dist/hierarchy/utils/buildLocalizedHierarchyPaths.d.ts.map +1 -0
- package/dist/hierarchy/utils/buildLocalizedHierarchyPaths.js +77 -0
- package/dist/hierarchy/utils/buildLocalizedHierarchyPaths.js.map +1 -0
- package/dist/hierarchy/utils/computePaths.d.ts +31 -0
- package/dist/hierarchy/utils/computePaths.d.ts.map +1 -0
- package/dist/hierarchy/utils/computePaths.js +445 -0
- package/dist/hierarchy/utils/computePaths.js.map +1 -0
- package/dist/hierarchy/utils/findUseAsTitle.d.ts +14 -0
- package/dist/hierarchy/utils/findUseAsTitle.d.ts.map +1 -0
- package/dist/hierarchy/utils/findUseAsTitle.js +89 -0
- package/dist/hierarchy/utils/findUseAsTitle.js.map +1 -0
- package/dist/hierarchy/utils/getAncestors.d.ts +34 -0
- package/dist/hierarchy/utils/getAncestors.d.ts.map +1 -0
- package/dist/hierarchy/utils/getAncestors.js +94 -0
- package/dist/hierarchy/utils/getAncestors.js.map +1 -0
- package/dist/hierarchy/utils/getLocalizedValue.d.ts +30 -0
- package/dist/hierarchy/utils/getLocalizedValue.d.ts.map +1 -0
- package/dist/hierarchy/utils/getLocalizedValue.js +46 -0
- package/dist/hierarchy/utils/getLocalizedValue.js.map +1 -0
- package/dist/hierarchy/utils/getLocalizedValue.spec.js +250 -0
- package/dist/hierarchy/utils/getLocalizedValue.spec.js.map +1 -0
- package/dist/index.bundled.d.ts +856 -558
- package/dist/index.d.ts +29 -8
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +13 -8
- package/dist/index.js.map +1 -1
- package/dist/preferences/keys.d.ts +8 -4
- package/dist/preferences/keys.d.ts.map +1 -1
- package/dist/preferences/keys.js +7 -4
- package/dist/preferences/keys.js.map +1 -1
- package/dist/preferences/types.d.ts +1 -1
- package/dist/preferences/types.d.ts.map +1 -1
- package/dist/preferences/types.js.map +1 -1
- package/dist/query-presets/config.d.ts.map +1 -1
- package/dist/query-presets/config.js +5 -1
- package/dist/query-presets/config.js.map +1 -1
- package/dist/queues/config/types/index.d.ts +0 -21
- package/dist/queues/config/types/index.d.ts.map +1 -1
- package/dist/queues/config/types/index.js.map +1 -1
- package/dist/queues/config/types/taskTypes.d.ts +0 -20
- package/dist/queues/config/types/taskTypes.d.ts.map +1 -1
- package/dist/queues/config/types/taskTypes.js.map +1 -1
- package/dist/queues/errors/handleWorkflowError.d.ts.map +1 -1
- package/dist/queues/errors/handleWorkflowError.js +9 -1
- package/dist/queues/errors/handleWorkflowError.js.map +1 -1
- package/dist/queues/localAPI.d.ts.map +1 -1
- package/dist/queues/localAPI.js +26 -67
- package/dist/queues/localAPI.js.map +1 -1
- package/dist/queues/operations/handleSchedules/index.d.ts.map +1 -1
- package/dist/queues/operations/handleSchedules/index.js +1 -4
- package/dist/queues/operations/handleSchedules/index.js.map +1 -1
- package/dist/queues/operations/runJobs/index.d.ts.map +1 -1
- package/dist/queues/operations/runJobs/index.js +40 -37
- package/dist/queues/operations/runJobs/index.js.map +1 -1
- package/dist/queues/operations/runJobs/runJob/getRunTaskFunction.d.ts.map +1 -1
- package/dist/queues/operations/runJobs/runJob/getRunTaskFunction.js +3 -22
- package/dist/queues/operations/runJobs/runJob/getRunTaskFunction.js.map +1 -1
- package/dist/queues/operations/runJobs/runJob/getUpdateJobFunction.d.ts.map +1 -1
- package/dist/queues/operations/runJobs/runJob/getUpdateJobFunction.js +0 -2
- package/dist/queues/operations/runJobs/runJob/getUpdateJobFunction.js.map +1 -1
- package/dist/queues/utilities/updateJob.d.ts +1 -3
- package/dist/queues/utilities/updateJob.d.ts.map +1 -1
- package/dist/queues/utilities/updateJob.js +2 -18
- package/dist/queues/utilities/updateJob.js.map +1 -1
- package/dist/types/index.d.ts +44 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js.map +1 -1
- package/dist/uploads/getBaseFields.d.ts.map +1 -1
- package/dist/uploads/getBaseFields.js +35 -69
- package/dist/uploads/getBaseFields.js.map +1 -1
- package/dist/uploads/getSafeFilename.d.ts +9 -4
- package/dist/uploads/getSafeFilename.d.ts.map +1 -1
- package/dist/uploads/getSafeFilename.js +5 -5
- package/dist/uploads/getSafeFilename.js.map +1 -1
- package/dist/utilities/appendDateTimezoneSelectFields.d.ts +13 -0
- package/dist/utilities/appendDateTimezoneSelectFields.d.ts.map +1 -0
- package/dist/utilities/appendDateTimezoneSelectFields.js +47 -0
- package/dist/utilities/appendDateTimezoneSelectFields.js.map +1 -0
- package/dist/utilities/appendUploadSelectFields.d.ts.map +1 -1
- package/dist/utilities/appendUploadSelectFields.js +3 -0
- package/dist/utilities/appendUploadSelectFields.js.map +1 -1
- package/dist/utilities/extractID.js +1 -1
- package/dist/utilities/extractID.js.map +1 -1
- package/dist/utilities/formatAdminURL.d.ts +13 -2
- package/dist/utilities/formatAdminURL.d.ts.map +1 -1
- package/dist/utilities/formatAdminURL.js.map +1 -1
- package/dist/utilities/handleEndpoints.d.ts.map +1 -1
- package/dist/utilities/handleEndpoints.js +0 -1
- package/dist/utilities/handleEndpoints.js.map +1 -1
- package/dist/utilities/resolveSelect.d.ts +16 -0
- package/dist/utilities/resolveSelect.d.ts.map +1 -0
- package/dist/utilities/resolveSelect.js +19 -0
- package/dist/utilities/resolveSelect.js.map +1 -0
- package/dist/utilities/sanitizeSelect.d.ts +1 -2
- package/dist/utilities/sanitizeSelect.d.ts.map +1 -1
- package/dist/utilities/sanitizeSelect.js +19 -25
- package/dist/utilities/sanitizeSelect.js.map +1 -1
- package/dist/versions/baseFields.d.ts.map +1 -1
- package/dist/versions/baseFields.js +3 -2
- package/dist/versions/baseFields.js.map +1 -1
- package/dist/versions/buildCollectionFields.d.ts.map +1 -1
- package/dist/versions/buildCollectionFields.js +0 -1
- package/dist/versions/buildCollectionFields.js.map +1 -1
- package/dist/versions/buildGlobalFields.d.ts.map +1 -1
- package/dist/versions/buildGlobalFields.js +0 -1
- package/dist/versions/buildGlobalFields.js.map +1 -1
- package/dist/versions/payloadPackageList.d.ts.map +1 -1
- package/dist/versions/payloadPackageList.js +0 -1
- package/dist/versions/payloadPackageList.js.map +1 -1
- package/package.json +4 -4
- package/dist/admin/views/folderList.d.ts +0 -56
- package/dist/admin/views/folderList.d.ts.map +0 -1
- package/dist/admin/views/folderList.js +0 -3
- package/dist/admin/views/folderList.js.map +0 -1
- package/dist/folders/addFolderCollection.d.ts +0 -10
- package/dist/folders/addFolderCollection.d.ts.map +0 -1
- package/dist/folders/addFolderCollection.js +0 -26
- package/dist/folders/addFolderCollection.js.map +0 -1
- package/dist/folders/addFolderFieldToCollection.d.ts +0 -8
- package/dist/folders/addFolderFieldToCollection.d.ts.map +0 -1
- package/dist/folders/addFolderFieldToCollection.js +0 -20
- package/dist/folders/addFolderFieldToCollection.js.map +0 -1
- package/dist/folders/buildFolderField.d.ts +0 -8
- package/dist/folders/buildFolderField.d.ts.map +0 -1
- package/dist/folders/buildFolderField.js +0 -87
- package/dist/folders/buildFolderField.js.map +0 -1
- package/dist/folders/constants.d.ts +0 -3
- package/dist/folders/constants.d.ts.map +0 -1
- package/dist/folders/constants.js +0 -4
- package/dist/folders/constants.js.map +0 -1
- package/dist/folders/createFolderCollection.d.ts +0 -11
- package/dist/folders/createFolderCollection.d.ts.map +0 -1
- package/dist/folders/createFolderCollection.js +0 -115
- package/dist/folders/createFolderCollection.js.map +0 -1
- package/dist/folders/hooks/deleteSubfoldersAfterDelete.d.ts +0 -8
- package/dist/folders/hooks/deleteSubfoldersAfterDelete.d.ts.map +0 -1
- package/dist/folders/hooks/deleteSubfoldersAfterDelete.js +0 -15
- package/dist/folders/hooks/deleteSubfoldersAfterDelete.js.map +0 -1
- package/dist/folders/hooks/dissasociateAfterDelete.d.ts +0 -8
- package/dist/folders/hooks/dissasociateAfterDelete.d.ts.map +0 -1
- package/dist/folders/hooks/dissasociateAfterDelete.js +0 -20
- package/dist/folders/hooks/dissasociateAfterDelete.js.map +0 -1
- package/dist/folders/hooks/ensureSafeCollectionsChange.d.ts +0 -5
- package/dist/folders/hooks/ensureSafeCollectionsChange.d.ts.map +0 -1
- package/dist/folders/hooks/ensureSafeCollectionsChange.js +0 -107
- package/dist/folders/hooks/ensureSafeCollectionsChange.js.map +0 -1
- package/dist/folders/hooks/reparentChildFolder.d.ts +0 -24
- package/dist/folders/hooks/reparentChildFolder.d.ts.map +0 -1
- package/dist/folders/hooks/reparentChildFolder.js +0 -72
- package/dist/folders/hooks/reparentChildFolder.js.map +0 -1
- package/dist/folders/types.d.ts +0 -118
- package/dist/folders/types.d.ts.map +0 -1
- package/dist/folders/types.js.map +0 -1
- package/dist/folders/utils/buildFolderWhereConstraints.d.ts +0 -13
- package/dist/folders/utils/buildFolderWhereConstraints.d.ts.map +0 -1
- package/dist/folders/utils/buildFolderWhereConstraints.js +0 -45
- package/dist/folders/utils/buildFolderWhereConstraints.js.map +0 -1
- package/dist/folders/utils/formatFolderOrDocumentItem.d.ts +0 -12
- package/dist/folders/utils/formatFolderOrDocumentItem.d.ts.map +0 -1
- package/dist/folders/utils/formatFolderOrDocumentItem.js +0 -30
- package/dist/folders/utils/formatFolderOrDocumentItem.js.map +0 -1
- package/dist/folders/utils/getFolderBreadcrumbs.d.ts +0 -14
- package/dist/folders/utils/getFolderBreadcrumbs.d.ts.map +0 -1
- package/dist/folders/utils/getFolderBreadcrumbs.js +0 -45
- package/dist/folders/utils/getFolderBreadcrumbs.js.map +0 -1
- package/dist/folders/utils/getFolderData.d.ts +0 -33
- package/dist/folders/utils/getFolderData.d.ts.map +0 -1
- package/dist/folders/utils/getFolderData.js +0 -88
- package/dist/folders/utils/getFolderData.js.map +0 -1
- package/dist/folders/utils/getFoldersAndDocumentsFromJoin.d.ts +0 -24
- package/dist/folders/utils/getFoldersAndDocumentsFromJoin.d.ts.map +0 -1
- package/dist/folders/utils/getFoldersAndDocumentsFromJoin.js +0 -66
- package/dist/folders/utils/getFoldersAndDocumentsFromJoin.js.map +0 -1
- package/dist/folders/utils/getOrphanedDocs.d.ts +0 -15
- package/dist/folders/utils/getOrphanedDocs.d.ts.map +0 -1
- package/dist/folders/utils/getOrphanedDocs.js +0 -40
- package/dist/folders/utils/getOrphanedDocs.js.map +0 -1
- /package/dist/{folders → database/migrations/config}/types.js +0 -0
|
@@ -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 { 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 // 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 disableBulkEdit: 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 disableBulkEdit: 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 disableBulkEdit: 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 if (sanitized.folders === true) {\n sanitized.folders = {\n browseByFolder: true,\n }\n } else if (sanitized.folders) {\n sanitized.folders.browseByFolder = sanitized.folders.browseByFolder ?? true\n }\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","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","validRelationships","collections","map","c","joins","polymorphicJoins","fields","collectionConfig","joinPath","parentIsLocalized","endpoints","auth","endpoint","push","upload","timestamps","hasUpdatedAt","hasCreatedAt","hasDeletedAt","some","field","name","trash","type","disableBulkEdit","hidden","index","label","t","defaultLabels","labels","plural","singular","versions","drafts","maxPerDoc","autosave","validate","hasLocalizedFields","localization","localizeStatus","undefined","experimental","log","yellowBold","interval","autosaveInterval","localized","folders","browseByFolder","cacheTags","bulkUpload","staticDir","useAsTitle","uploadFields","disableDuplicate","loginWithUsername","loginWithUsernameWithDefaults","allowEmailLogin","requireUsername","pagination","limits","length","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,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,uBAAuB,EACvBC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;gBACA5D,UAAUY,IAAI,CAAC6C,iBAAiB,GAAGC;YACrC;QACF,OAAO;YACL1D,UAAUY,IAAI,CAAC6C,iBAAiB,GAAG;QACrC;QAEA,IAAI,CAAC1E,YAAYE,OAAOqE,YAAY;YAClCtD,UAAUf,KAAK,CAAEqE,UAAU,GAAGtD,UAAUY,IAAI,CAAC6C,iBAAiB,GAAG,aAAa;QAChF;QAEAzD,UAAUO,MAAM,GAAGxC,gBAAgBiC,UAAUO,MAAM,EAAE5C,kBAAkBqC,UAAUY,IAAI;IACvF;IAEA,IAAI7B,YAAYE,OAAO4E,YAAYC,QAAQC,QAAQ;QACjD/D,UAAUf,KAAK,CAAE4E,UAAU,CAAEC,MAAM,GAAG/E,WAAWE,KAAK,CAAC4E,UAAU,CAACC,MAAM;IAC1E;IAEAjF,mBAAmBmB;IAEnB,MAAMgE,kBAAkBhE;IAExBgE,gBAAgB3D,KAAK,GAAGA;IACxB2D,gBAAgB1D,gBAAgB,GAAGA;IAEnC0D,gBAAgBC,eAAe,GAAG/F,iBAAiB;QAAEqC,QAAQyD,gBAAgBzD,MAAM;IAAC;IAEpFyD,gBAAgBE,gBAAgB,GAAGtF,wBAAwB;QACzD2B,QAAQyD,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 {\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,SAAS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AC5D,IAAIC,8BAA8BC,eAAe,KAAK,OAAO;oBAC3DD,8BAA8BE,eAAe,GAAG;gBAClD;gBACAtE,UAAU2B,IAAI,CAACwC,iBAAiB,GAAGC;YACrC;QACF,OAAO;YACLpE,UAAU2B,IAAI,CAACwC,iBAAiB,GAAG;QACrC;QAEA,IAAI,CAACpF,YAAYE,OAAO+E,YAAY;YAClChE,UAAUf,KAAK,CAAE+E,UAAU,GAAGhE,UAAU2B,IAAI,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,15 +1,15 @@
|
|
|
1
1
|
import type { GraphQLInputObjectType, GraphQLNonNull, GraphQLObjectType } from 'graphql';
|
|
2
2
|
import type { DeepRequired, IsAny, MarkOptional } from 'ts-essentials';
|
|
3
|
-
import type {
|
|
3
|
+
import type { CustomUpload, ViewTypes } from '../../admin/types.js';
|
|
4
4
|
import type { Arguments as MeArguments } from '../../auth/operations/me.js';
|
|
5
5
|
import type { Arguments as RefreshArguments, Result as RefreshResult } from '../../auth/operations/refresh.js';
|
|
6
6
|
import type { Auth, ClientUser, IncomingAuthType } from '../../auth/types.js';
|
|
7
|
-
import type { Access, AfterErrorHookArgs, AfterErrorResult, CustomComponent,
|
|
7
|
+
import type { Access, AfterErrorHookArgs, AfterErrorResult, CustomComponent, Endpoint, EntityDescription, GeneratePreviewURL, LabelFunction, LivePreviewConfig, MetaConfig, PayloadComponent, SharedAdminComponents, SharedEditViewComponents, SharedEntityViews, StaticLabel } from '../../config/types.js';
|
|
8
8
|
import type { DBIdentifierName } from '../../database/types.js';
|
|
9
9
|
import type { Field, FlattenedField, JoinField, RelationshipField, UploadField } from '../../fields/config/types.js';
|
|
10
|
-
import type {
|
|
10
|
+
import type { HierarchyConfig, HierarchyJoinFieldConfig, SanitizedHierarchyConfig } from '../../hierarchy/types.js';
|
|
11
11
|
import type { CollectionAdminCustom, CollectionCustom, CollectionSlug, GeneratedTypes, JsonObject, RequestContext, TypedAuthOperations, TypedCollection, TypedCollectionSelect, TypedLocale } from '../../index.js';
|
|
12
|
-
import type { PayloadRequest, SelectIncludeType, SelectType, Sort, TransformCollectionWithSelect, Where } from '../../types/index.js';
|
|
12
|
+
import type { PayloadRequest, SelectIncludeType, SelectType, Sort, TransformCollectionWithSelect, Where, WithSelectFn } from '../../types/index.js';
|
|
13
13
|
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';
|
|
@@ -223,6 +223,36 @@ export type AfterForgotPasswordHook = (args: {
|
|
|
223
223
|
export type EnableFoldersOptions = {
|
|
224
224
|
debug?: boolean;
|
|
225
225
|
};
|
|
226
|
+
/**
|
|
227
|
+
* Configuration options for folder hierarchy preset.
|
|
228
|
+
* Subset of HierarchyConfig with folder-appropriate defaults applied.
|
|
229
|
+
*/
|
|
230
|
+
export type FoldersConfig = {
|
|
231
|
+
admin?: {
|
|
232
|
+
components?: {
|
|
233
|
+
Icon?: PayloadComponent;
|
|
234
|
+
};
|
|
235
|
+
injectSidebarTab?: boolean;
|
|
236
|
+
treeLimit?: number;
|
|
237
|
+
useHeaderButton?: boolean;
|
|
238
|
+
};
|
|
239
|
+
collectionSpecific?: {
|
|
240
|
+
fieldName?: string;
|
|
241
|
+
} | boolean;
|
|
242
|
+
joinField?: HierarchyJoinFieldConfig;
|
|
243
|
+
parentFieldName?: string;
|
|
244
|
+
slugField?: string;
|
|
245
|
+
slugify?: (text: string) => string;
|
|
246
|
+
slugPathFieldName?: string;
|
|
247
|
+
titlePathFieldName?: string;
|
|
248
|
+
};
|
|
249
|
+
/**
|
|
250
|
+
* Configuration options for tags hierarchy preset.
|
|
251
|
+
* Same as FoldersConfig but allowHasMany can be overridden.
|
|
252
|
+
*/
|
|
253
|
+
export type TagsConfig = {
|
|
254
|
+
allowHasMany?: boolean;
|
|
255
|
+
} & FoldersConfig;
|
|
226
256
|
export type BaseFilter = (args: {
|
|
227
257
|
limit: number;
|
|
228
258
|
locale?: TypedLocale;
|
|
@@ -263,80 +293,18 @@ export type CollectionAdminOptions = {
|
|
|
263
293
|
afterListTable?: CustomComponent[];
|
|
264
294
|
beforeList?: CustomComponent[];
|
|
265
295
|
beforeListTable?: CustomComponent[];
|
|
266
|
-
Description?: EntityDescriptionComponent;
|
|
267
296
|
/**
|
|
268
297
|
* Components within the edit view
|
|
269
298
|
*/
|
|
270
299
|
edit?: {
|
|
271
|
-
/**
|
|
272
|
-
* Inject custom components before the document controls
|
|
273
|
-
*/
|
|
274
|
-
beforeDocumentControls?: CustomComponent[];
|
|
275
|
-
/**
|
|
276
|
-
* Inject custom components within the 3-dot menu dropdown
|
|
277
|
-
*/
|
|
278
|
-
editMenuItems?: CustomComponent[];
|
|
279
|
-
/**
|
|
280
|
-
* Replaces the "Preview" button
|
|
281
|
-
*/
|
|
282
|
-
PreviewButton?: CustomComponent;
|
|
283
|
-
/**
|
|
284
|
-
* Replaces the "Publish" button
|
|
285
|
-
* + drafts must be enabled
|
|
286
|
-
*/
|
|
287
|
-
PublishButton?: PayloadComponent<PublishButtonServerProps, PublishButtonClientProps>;
|
|
288
|
-
/**
|
|
289
|
-
* Replaces the "Save" button
|
|
290
|
-
* + drafts must be disabled
|
|
291
|
-
*/
|
|
292
|
-
SaveButton?: CustomComponent;
|
|
293
|
-
/**
|
|
294
|
-
* Replaces the "Save Draft" button
|
|
295
|
-
* + drafts must be enabled
|
|
296
|
-
* + autosave must be disabled
|
|
297
|
-
*/
|
|
298
|
-
SaveDraftButton?: CustomComponent;
|
|
299
|
-
/**
|
|
300
|
-
* Replaces the "Status" section
|
|
301
|
-
*/
|
|
302
|
-
Status?: CustomStatus;
|
|
303
|
-
/**
|
|
304
|
-
* Replaces the "Unpublish" button
|
|
305
|
-
* + drafts must be enabled
|
|
306
|
-
*/
|
|
307
|
-
UnpublishButton?: PayloadComponent<UnpublishButtonServerProps, UnpublishButtonClientProps>;
|
|
308
300
|
/**
|
|
309
301
|
* Replaces the "Upload" section
|
|
310
302
|
* + upload must be enabled
|
|
311
303
|
*/
|
|
312
304
|
Upload?: CustomUpload;
|
|
313
|
-
};
|
|
305
|
+
} & SharedEditViewComponents;
|
|
314
306
|
listMenuItems?: CustomComponent[];
|
|
315
307
|
views?: {
|
|
316
|
-
/**
|
|
317
|
-
* Add custom collection views.
|
|
318
|
-
* Any additional keys define custom collection views that are matched by path and rendered at the collection level.
|
|
319
|
-
* @link https://payloadcms.com/docs/custom-components/custom-views
|
|
320
|
-
* @example
|
|
321
|
-
* ```ts
|
|
322
|
-
* views: {
|
|
323
|
-
* grid: {
|
|
324
|
-
* Component: '/path/to/GridView',
|
|
325
|
-
* path: '/grid',
|
|
326
|
-
* exact: true,
|
|
327
|
-
* }
|
|
328
|
-
* }
|
|
329
|
-
* ```
|
|
330
|
-
*/
|
|
331
|
-
[key: string]: {
|
|
332
|
-
actions?: CustomComponent[];
|
|
333
|
-
Component?: PayloadComponent;
|
|
334
|
-
} | AdminViewConfig | EditConfig | undefined;
|
|
335
|
-
/**
|
|
336
|
-
* Replace, modify, or add new "document" views.
|
|
337
|
-
* @link https://payloadcms.com/docs/custom-components/document-views
|
|
338
|
-
*/
|
|
339
|
-
edit?: EditConfig;
|
|
340
308
|
/**
|
|
341
309
|
* Replace or modify the "list" view.
|
|
342
310
|
* @link https://payloadcms.com/docs/custom-components/list-view
|
|
@@ -345,8 +313,8 @@ export type CollectionAdminOptions = {
|
|
|
345
313
|
actions?: CustomComponent[];
|
|
346
314
|
Component?: PayloadComponent;
|
|
347
315
|
};
|
|
348
|
-
};
|
|
349
|
-
}
|
|
316
|
+
} & SharedEntityViews;
|
|
317
|
+
} & Omit<SharedAdminComponents, 'edit' | 'views'>;
|
|
350
318
|
/** Extension point to add your custom data. Available in server and client. */
|
|
351
319
|
custom?: CollectionAdminCustom;
|
|
352
320
|
/**
|
|
@@ -362,15 +330,6 @@ export type CollectionAdminOptions = {
|
|
|
362
330
|
* @default false
|
|
363
331
|
*/
|
|
364
332
|
disableCopyToLocale?: boolean;
|
|
365
|
-
/**
|
|
366
|
-
* Performance opt-in. If true, will use the [Select API](https://payloadcms.com/docs/queries/select) when
|
|
367
|
-
* loading the list view to query only the active columns, as opposed to the entire documents.
|
|
368
|
-
* If your cells require specific fields that may be unselected, such as within hooks, etc.,
|
|
369
|
-
* use `forceSelect` in conjunction with this property.
|
|
370
|
-
*
|
|
371
|
-
* @experimental This is an experimental feature and may change in the future. Use at your own risk.
|
|
372
|
-
*/
|
|
373
|
-
enableListViewSelectAPI?: boolean;
|
|
374
333
|
enableRichTextLink?: boolean;
|
|
375
334
|
enableRichTextRelationship?: boolean;
|
|
376
335
|
/**
|
|
@@ -414,10 +373,6 @@ export type CollectionAdminOptions = {
|
|
|
414
373
|
hidden?: ((args: {
|
|
415
374
|
user: ClientUser;
|
|
416
375
|
}) => boolean) | boolean;
|
|
417
|
-
/**
|
|
418
|
-
* Hide the API URL within the Edit view
|
|
419
|
-
*/
|
|
420
|
-
hideAPIURL?: boolean;
|
|
421
376
|
/**
|
|
422
377
|
* Additional fields to be searched via the full text search
|
|
423
378
|
*/
|
|
@@ -507,13 +462,13 @@ export type CollectionConfig<TSlug extends CollectionSlug = any> = {
|
|
|
507
462
|
endpoints?: false | Omit<Endpoint, 'root'>[];
|
|
508
463
|
fields: Field[];
|
|
509
464
|
/**
|
|
510
|
-
*
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
*
|
|
465
|
+
* Enable folder hierarchy preset for this collection.
|
|
466
|
+
* Sets hierarchy with folder defaults: allowHasMany: false, FolderIcon, useHeaderButton: true
|
|
467
|
+
*
|
|
468
|
+
* Use `true` for defaults, or object for customization.
|
|
469
|
+
* Cannot be used together with `tags` or `hierarchy`.
|
|
515
470
|
*/
|
|
516
|
-
|
|
471
|
+
folders?: boolean | FoldersConfig;
|
|
517
472
|
/**
|
|
518
473
|
* GraphQL configuration
|
|
519
474
|
*/
|
|
@@ -523,6 +478,25 @@ export type CollectionConfig<TSlug extends CollectionSlug = any> = {
|
|
|
523
478
|
pluralName?: string;
|
|
524
479
|
singularName?: string;
|
|
525
480
|
} | false;
|
|
481
|
+
/**
|
|
482
|
+
* Enable hierarchical tree structure for this collection
|
|
483
|
+
*
|
|
484
|
+
* Use `true` to enable with defaults (auto-detects parent field)
|
|
485
|
+
* or provide configuration object
|
|
486
|
+
*
|
|
487
|
+
* @example
|
|
488
|
+
* // Enable with defaults
|
|
489
|
+
* hierarchy: true
|
|
490
|
+
*
|
|
491
|
+
* @example
|
|
492
|
+
* // Customize field names and slugify function
|
|
493
|
+
* hierarchy: {
|
|
494
|
+
* parentFieldName: 'parent',
|
|
495
|
+
* slugify: (text) => customSlugify(text),
|
|
496
|
+
* slugPathFieldName: '_breadcrumbPath'
|
|
497
|
+
* }
|
|
498
|
+
*/
|
|
499
|
+
hierarchy?: boolean | HierarchyConfig;
|
|
526
500
|
/**
|
|
527
501
|
* Hooks to modify Payload functionality
|
|
528
502
|
*/
|
|
@@ -593,6 +567,14 @@ export type CollectionConfig<TSlug extends CollectionSlug = any> = {
|
|
|
593
567
|
*/
|
|
594
568
|
orderable?: boolean;
|
|
595
569
|
slug: string;
|
|
570
|
+
/**
|
|
571
|
+
* Enable tags hierarchy preset for this collection.
|
|
572
|
+
* Sets hierarchy with tag defaults: allowHasMany: true, TagIcon
|
|
573
|
+
*
|
|
574
|
+
* Use `true` for defaults, or object for customization.
|
|
575
|
+
* Cannot be used together with `folders` or `hierarchy`.
|
|
576
|
+
*/
|
|
577
|
+
tags?: boolean | TagsConfig;
|
|
596
578
|
/**
|
|
597
579
|
* Add `createdAt`, `deletedAt` and `updatedAt` fields
|
|
598
580
|
*
|
|
@@ -632,7 +614,7 @@ export type CollectionConfig<TSlug extends CollectionSlug = any> = {
|
|
|
632
614
|
* @default false // disable versioning
|
|
633
615
|
*/
|
|
634
616
|
versions?: boolean | IncomingCollectionVersions;
|
|
635
|
-
}
|
|
617
|
+
} & Pick<WithSelectFn<IsAny<SelectFromCollectionSlug<TSlug>> extends true ? SelectIncludeType : SelectFromCollectionSlug<TSlug>>, 'select'>;
|
|
636
618
|
export type SanitizedJoin = {
|
|
637
619
|
/**
|
|
638
620
|
* The field configuration defining the join
|
|
@@ -659,7 +641,7 @@ export type SanitizedJoins = {
|
|
|
659
641
|
* @todo remove the `DeepRequired` in v4.
|
|
660
642
|
* We don't actually guarantee that all properties are set when sanitizing configs.
|
|
661
643
|
*/
|
|
662
|
-
export interface SanitizedCollectionConfig extends Omit<DeepRequired<CollectionConfig>, 'admin' | 'auth' | 'endpoints' | 'fields' | 'folders' | 'slug' | 'upload' | 'versions'> {
|
|
644
|
+
export interface SanitizedCollectionConfig extends Omit<DeepRequired<CollectionConfig>, 'admin' | 'auth' | 'endpoints' | 'fields' | 'folder' | 'folders' | 'hierarchy' | 'slug' | 'tags' | 'upload' | 'versions'> {
|
|
663
645
|
admin: CollectionAdminOptions;
|
|
664
646
|
auth: Auth;
|
|
665
647
|
endpoints: Endpoint[] | false;
|
|
@@ -669,10 +651,13 @@ export interface SanitizedCollectionConfig extends Omit<DeepRequired<CollectionC
|
|
|
669
651
|
* Rows / collapsible / tabs w/o name `fields` merged to top, UIs are excluded
|
|
670
652
|
*/
|
|
671
653
|
flattenedFields: FlattenedField[];
|
|
654
|
+
/**
|
|
655
|
+
* Hierarchy configuration (when collection is a hierarchy type like folders or tags)
|
|
656
|
+
*/
|
|
657
|
+
hierarchy: false | SanitizedHierarchyConfig;
|
|
672
658
|
/**
|
|
673
659
|
* Object of collections to join 'Join Fields object keyed by collection
|
|
674
660
|
*/
|
|
675
|
-
folders: CollectionFoldersConfiguration | false;
|
|
676
661
|
joins: SanitizedJoins;
|
|
677
662
|
/**
|
|
678
663
|
* List of all polymorphic join fields
|
|
@@ -1 +1 @@
|
|
|
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,EACV,eAAe,EACf,YAAY,EACZ,YAAY,EACZ,wBAAwB,EACxB,wBAAwB,EACxB,0BAA0B,EAC1B,0BAA0B,EAC1B,SAAS,EACV,MAAM,sBAAsB,CAAA;AAC7B,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,UAAU,EACV,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GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;IACtB,SAAS,EAAE,MAAM,CAAA;IACjB,SAAS,CAAC,EAAE,IAAI,GAAG,MAAM,CAAA;IACzB,EAAE,EAAE,MAAM,GAAG,MAAM,CAAA;IACnB,SAAS,EAAE,MAAM,CAAA;CAClB,CAAA;AAED,MAAM,MAAM,aAAa,GAAG;IAC1B,MAAM,EAAE,MAAM,EAAE,CAAA;IAChB,MAAM,CAAC,EAAE,OAAO,CAAA;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 {\n AdminViewConfig,\n CustomStatus,\n CustomUpload,\n PublishButtonClientProps,\n PublishButtonServerProps,\n UnpublishButtonClientProps,\n UnpublishButtonServerProps,\n ViewTypes,\n} 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 EditConfig,\n Endpoint,\n EntityDescription,\n EntityDescriptionComponent,\n GeneratePreviewURL,\n LabelFunction,\n LivePreviewConfig,\n MetaConfig,\n PayloadComponent,\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 { CollectionFoldersConfiguration } from '../../folders/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} 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\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 Description?: EntityDescriptionComponent\n /**\n * Components within the edit view\n */\n edit?: {\n /**\n * Inject custom components before the document controls\n */\n beforeDocumentControls?: CustomComponent[]\n /**\n * Inject custom components within the 3-dot menu dropdown\n */\n editMenuItems?: CustomComponent[]\n /**\n * Replaces the \"Preview\" button\n */\n PreviewButton?: CustomComponent\n /**\n * Replaces the \"Publish\" button\n * + drafts must be enabled\n */\n PublishButton?: PayloadComponent<PublishButtonServerProps, PublishButtonClientProps>\n /**\n * Replaces the \"Save\" button\n * + drafts must be disabled\n */\n SaveButton?: CustomComponent\n /**\n * Replaces the \"Save Draft\" button\n * + drafts must be enabled\n * + autosave must be disabled\n */\n SaveDraftButton?: CustomComponent\n /**\n * Replaces the \"Status\" section\n */\n Status?: CustomStatus\n /**\n * Replaces the \"Unpublish\" button\n * + drafts must be enabled\n */\n UnpublishButton?: PayloadComponent<UnpublishButtonServerProps, UnpublishButtonClientProps>\n /**\n * Replaces the \"Upload\" section\n * + upload must be enabled\n */\n Upload?: CustomUpload\n }\n listMenuItems?: CustomComponent[]\n views?: {\n /**\n * Add custom collection views.\n * Any additional keys define custom collection views that are matched by path and rendered at the collection level.\n * @link https://payloadcms.com/docs/custom-components/custom-views\n * @example\n * ```ts\n * views: {\n * grid: {\n * Component: '/path/to/GridView',\n * path: '/grid',\n * exact: true,\n * }\n * }\n * ```\n */\n [key: string]:\n | { actions?: CustomComponent[]; Component?: PayloadComponent }\n | AdminViewConfig\n | EditConfig\n | undefined\n /**\n * Replace, modify, or add new \"document\" views.\n * @link https://payloadcms.com/docs/custom-components/document-views\n */\n edit?: EditConfig\n /**\n * 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 }\n }\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 /**\n * Performance opt-in. If true, will use the [Select API](https://payloadcms.com/docs/queries/select) when\n * loading the list view to query only the active columns, as opposed to the entire documents.\n * If your cells require specific fields that may be unselected, such as within hooks, etc.,\n * use `forceSelect` in conjunction with this property.\n *\n * @experimental This is an experimental feature and may change in the future. Use at your own risk.\n */\n enableListViewSelectAPI?: 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 * Hide the API URL within the Edit view\n */\n hideAPIURL?: 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 * Enables folders for this collection\n */\n folders?: boolean | CollectionFoldersConfiguration\n /**\n * Specify which fields should be selected always, regardless of the `select` query which can be useful that the field exists for access control / hooks\n */\n forceSelect?: IsAny<SelectFromCollectionSlug<TSlug>> extends true\n ? SelectIncludeType\n : SelectFromCollectionSlug<TSlug>\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 * 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 * 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}\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' | 'auth' | 'endpoints' | 'fields' | 'folders' | 'slug' | 'upload' | '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 * Object of collections to join 'Join Fields object keyed by collection\n */\n folders: CollectionFoldersConfiguration | false\n joins: SanitizedJoins\n\n /**\n * List of all polymorphic join fields\n */\n polymorphicJoins: SanitizedJoin[]\n\n sanitizedIndexes: SanitizedCompoundIndex[]\n\n slug: CollectionSlug\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\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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create.d.ts","sourceRoot":"","sources":["../../../src/collections/operations/create.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,WAAW,EAAc,MAAM,gBAAgB,CAAA;AAC7E,OAAO,KAAK,EAEV,cAAc,EACd,YAAY,EACZ,UAAU,EACV,6BAA6B,EAC9B,MAAM,sBAAsB,CAAA;AAC7B,OAAO,KAAK,EACV,UAAU,EACV,sBAAsB,EACtB,8BAA8B,EAC9B,wBAAwB,EACzB,MAAM,oBAAoB,CAAA;
|
|
1
|
+
{"version":3,"file":"create.d.ts","sourceRoot":"","sources":["../../../src/collections/operations/create.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,WAAW,EAAc,MAAM,gBAAgB,CAAA;AAC7E,OAAO,KAAK,EAEV,cAAc,EACd,YAAY,EACZ,UAAU,EACV,6BAA6B,EAC9B,MAAM,sBAAsB,CAAA;AAC7B,OAAO,KAAK,EACV,UAAU,EACV,sBAAsB,EACtB,8BAA8B,EAC9B,wBAAwB,EACzB,MAAM,oBAAoB,CAAA;AA6B3B,MA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