payload 3.0.0-beta.3 → 3.0.0-beta.30
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/RichText.d.ts +25 -10
- package/dist/admin/RichText.d.ts.map +1 -1
- package/dist/admin/RichText.js.map +1 -1
- package/dist/admin/elements/PreviewButton.d.ts +2 -1
- package/dist/admin/elements/PreviewButton.d.ts.map +1 -1
- package/dist/admin/elements/PreviewButton.js.map +1 -1
- package/dist/admin/elements/PublishButton.d.ts +2 -1
- package/dist/admin/elements/PublishButton.d.ts.map +1 -1
- package/dist/admin/elements/PublishButton.js.map +1 -1
- package/dist/admin/elements/SaveButton.d.ts +2 -1
- package/dist/admin/elements/SaveButton.d.ts.map +1 -1
- package/dist/admin/elements/SaveButton.js.map +1 -1
- package/dist/admin/elements/SaveDraftButton.d.ts +2 -1
- package/dist/admin/elements/SaveDraftButton.d.ts.map +1 -1
- package/dist/admin/elements/SaveDraftButton.js.map +1 -1
- package/dist/admin/elements/Tab.d.ts +3 -0
- package/dist/admin/elements/Tab.d.ts.map +1 -1
- package/dist/admin/elements/Tab.js.map +1 -1
- package/dist/admin/elements/WithServerSideProps.d.ts +5 -0
- package/dist/admin/elements/WithServerSideProps.d.ts.map +1 -0
- package/dist/admin/elements/WithServerSideProps.js +3 -0
- package/dist/admin/elements/WithServerSideProps.js.map +1 -0
- package/dist/admin/forms/FieldDescription.d.ts +5 -3
- package/dist/admin/forms/FieldDescription.d.ts.map +1 -1
- package/dist/admin/forms/FieldDescription.js.map +1 -1
- package/dist/admin/forms/Label.d.ts +2 -2
- package/dist/admin/forms/Label.d.ts.map +1 -1
- package/dist/admin/forms/Label.js.map +1 -1
- package/dist/admin/forms/RowLabel.d.ts +3 -2
- package/dist/admin/forms/RowLabel.d.ts.map +1 -1
- package/dist/admin/forms/RowLabel.js.map +1 -1
- package/dist/admin/types.d.ts +3 -2
- package/dist/admin/types.d.ts.map +1 -1
- package/dist/admin/types.js.map +1 -1
- package/dist/admin/views/types.d.ts +2 -2
- package/dist/admin/views/types.d.ts.map +1 -1
- package/dist/admin/views/types.js.map +1 -1
- package/dist/auth/baseFields/apiKey.d.ts.map +1 -1
- package/dist/auth/baseFields/apiKey.js +6 -4
- package/dist/auth/baseFields/apiKey.js.map +1 -1
- package/dist/auth/cookies.d.ts +16 -4
- package/dist/auth/cookies.d.ts.map +1 -1
- package/dist/auth/cookies.js +45 -14
- package/dist/auth/cookies.js.map +1 -1
- package/dist/auth/defaultAccess.d.ts +2 -2
- package/dist/auth/defaultAccess.d.ts.map +1 -1
- package/dist/auth/defaultAccess.js.map +1 -1
- package/dist/auth/executeAccess.d.ts +2 -2
- package/dist/auth/executeAccess.d.ts.map +1 -1
- package/dist/auth/executeAccess.js.map +1 -1
- package/dist/auth/executeAuthStrategies.d.ts +3 -2
- package/dist/auth/executeAuthStrategies.d.ts.map +1 -1
- package/dist/auth/executeAuthStrategies.js.map +1 -1
- package/dist/auth/getAccessResults.d.ts +2 -2
- package/dist/auth/getAccessResults.d.ts.map +1 -1
- package/dist/auth/getAccessResults.js +1 -1
- package/dist/auth/getAccessResults.js.map +1 -1
- package/dist/auth/getFieldsToSign.d.ts +2 -2
- package/dist/auth/getFieldsToSign.d.ts.map +1 -1
- package/dist/auth/getFieldsToSign.js.map +1 -1
- package/dist/auth/operations/access.d.ts +2 -2
- package/dist/auth/operations/access.d.ts.map +1 -1
- package/dist/auth/operations/access.js.map +1 -1
- package/dist/auth/operations/auth.d.ts +5 -4
- package/dist/auth/operations/auth.d.ts.map +1 -1
- package/dist/auth/operations/auth.js.map +1 -1
- package/dist/auth/operations/forgotPassword.d.ts +2 -2
- package/dist/auth/operations/forgotPassword.d.ts.map +1 -1
- package/dist/auth/operations/forgotPassword.js +7 -8
- package/dist/auth/operations/forgotPassword.js.map +1 -1
- package/dist/auth/operations/init.d.ts +2 -2
- package/dist/auth/operations/init.d.ts.map +1 -1
- package/dist/auth/operations/init.js.map +1 -1
- package/dist/auth/operations/local/auth.js.map +1 -1
- package/dist/auth/operations/local/forgotPassword.d.ts +2 -2
- package/dist/auth/operations/local/forgotPassword.d.ts.map +1 -1
- package/dist/auth/operations/local/forgotPassword.js.map +1 -1
- package/dist/auth/operations/local/login.d.ts +2 -2
- package/dist/auth/operations/local/login.d.ts.map +1 -1
- package/dist/auth/operations/local/login.js.map +1 -1
- package/dist/auth/operations/local/resetPassword.d.ts +2 -2
- package/dist/auth/operations/local/resetPassword.d.ts.map +1 -1
- package/dist/auth/operations/local/resetPassword.js.map +1 -1
- package/dist/auth/operations/local/unlock.d.ts +2 -2
- package/dist/auth/operations/local/unlock.d.ts.map +1 -1
- package/dist/auth/operations/local/unlock.js.map +1 -1
- package/dist/auth/operations/local/verifyEmail.d.ts +2 -2
- package/dist/auth/operations/local/verifyEmail.d.ts.map +1 -1
- package/dist/auth/operations/local/verifyEmail.js.map +1 -1
- package/dist/auth/operations/login.d.ts +2 -2
- package/dist/auth/operations/login.d.ts.map +1 -1
- package/dist/auth/operations/login.js +21 -1
- package/dist/auth/operations/login.js.map +1 -1
- package/dist/auth/operations/logout.d.ts +2 -2
- package/dist/auth/operations/logout.d.ts.map +1 -1
- package/dist/auth/operations/logout.js.map +1 -1
- package/dist/auth/operations/me.d.ts +2 -2
- package/dist/auth/operations/me.d.ts.map +1 -1
- package/dist/auth/operations/me.js.map +1 -1
- package/dist/auth/operations/refresh.d.ts +2 -2
- package/dist/auth/operations/refresh.d.ts.map +1 -1
- package/dist/auth/operations/refresh.js.map +1 -1
- package/dist/auth/operations/registerFirstUser.d.ts +2 -2
- package/dist/auth/operations/registerFirstUser.d.ts.map +1 -1
- package/dist/auth/operations/registerFirstUser.js.map +1 -1
- package/dist/auth/operations/resetPassword.d.ts +2 -2
- package/dist/auth/operations/resetPassword.d.ts.map +1 -1
- package/dist/auth/operations/resetPassword.js.map +1 -1
- package/dist/auth/operations/unlock.d.ts +2 -2
- package/dist/auth/operations/unlock.d.ts.map +1 -1
- package/dist/auth/operations/unlock.js.map +1 -1
- package/dist/auth/operations/verifyEmail.d.ts +2 -2
- package/dist/auth/operations/verifyEmail.d.ts.map +1 -1
- package/dist/auth/operations/verifyEmail.js.map +1 -1
- package/dist/auth/sendVerificationEmail.d.ts +7 -8
- package/dist/auth/sendVerificationEmail.d.ts.map +1 -1
- package/dist/auth/sendVerificationEmail.js +7 -7
- package/dist/auth/sendVerificationEmail.js.map +1 -1
- package/dist/auth/strategies/local/incrementLoginAttempts.d.ts +2 -2
- package/dist/auth/strategies/local/incrementLoginAttempts.d.ts.map +1 -1
- package/dist/auth/strategies/local/incrementLoginAttempts.js.map +1 -1
- package/dist/auth/strategies/local/register.d.ts +2 -2
- package/dist/auth/strategies/local/register.d.ts.map +1 -1
- package/dist/auth/strategies/local/register.js.map +1 -1
- package/dist/auth/strategies/local/resetLoginAttempts.d.ts +2 -2
- package/dist/auth/strategies/local/resetLoginAttempts.d.ts.map +1 -1
- package/dist/auth/strategies/local/resetLoginAttempts.js.map +1 -1
- package/dist/auth/types.d.ts +5 -5
- package/dist/auth/types.d.ts.map +1 -1
- package/dist/auth/types.js.map +1 -1
- package/dist/bin/generateTypes.d.ts +1 -1
- package/dist/bin/generateTypes.d.ts.map +1 -1
- package/dist/bin/generateTypes.js +12 -8
- package/dist/bin/generateTypes.js.map +1 -1
- package/dist/bin/loader/index.d.ts.map +1 -1
- package/dist/bin/loader/index.js +6 -1
- package/dist/bin/loader/index.js.map +1 -1
- package/dist/bin/loader/resolveOriginalPath.d.ts +10 -0
- package/dist/bin/loader/resolveOriginalPath.d.ts.map +1 -0
- package/dist/bin/loader/resolveOriginalPath.js +32 -0
- package/dist/bin/loader/resolveOriginalPath.js.map +1 -0
- package/dist/collections/config/client.d.ts +19 -14
- package/dist/collections/config/client.d.ts.map +1 -1
- package/dist/collections/config/client.js +3 -1
- package/dist/collections/config/client.js.map +1 -1
- package/dist/collections/config/defaults.d.ts +6 -5
- package/dist/collections/config/defaults.d.ts.map +1 -1
- package/dist/collections/config/defaults.js +1 -0
- package/dist/collections/config/defaults.js.map +1 -1
- package/dist/collections/config/sanitize.d.ts +2 -3
- package/dist/collections/config/sanitize.d.ts.map +1 -1
- package/dist/collections/config/sanitize.js +7 -4
- package/dist/collections/config/sanitize.js.map +1 -1
- package/dist/collections/config/schema.d.ts.map +1 -1
- package/dist/collections/config/schema.js +7 -1
- package/dist/collections/config/schema.js.map +1 -1
- package/dist/collections/config/types.d.ts +34 -23
- package/dist/collections/config/types.d.ts.map +1 -1
- package/dist/collections/config/types.js.map +1 -1
- package/dist/collections/dataloader.d.ts +14 -0
- package/dist/collections/dataloader.d.ts.map +1 -1
- package/dist/collections/dataloader.js +31 -18
- package/dist/collections/dataloader.js.map +1 -1
- package/dist/collections/operations/count.d.ts +13 -0
- package/dist/collections/operations/count.d.ts.map +1 -0
- package/dist/collections/operations/count.js +75 -0
- package/dist/collections/operations/count.js.map +1 -0
- package/dist/collections/operations/create.d.ts +2 -2
- package/dist/collections/operations/create.d.ts.map +1 -1
- package/dist/collections/operations/create.js +5 -8
- package/dist/collections/operations/create.js.map +1 -1
- package/dist/collections/operations/delete.d.ts +2 -2
- package/dist/collections/operations/delete.d.ts.map +1 -1
- package/dist/collections/operations/delete.js +1 -0
- package/dist/collections/operations/delete.js.map +1 -1
- package/dist/collections/operations/deleteByID.d.ts +2 -2
- package/dist/collections/operations/deleteByID.d.ts.map +1 -1
- package/dist/collections/operations/deleteByID.js +1 -0
- package/dist/collections/operations/deleteByID.js.map +1 -1
- package/dist/collections/operations/docAccess.d.ts +2 -2
- package/dist/collections/operations/docAccess.d.ts.map +1 -1
- package/dist/collections/operations/docAccess.js.map +1 -1
- package/dist/collections/operations/duplicate.d.ts +2 -2
- package/dist/collections/operations/duplicate.d.ts.map +1 -1
- package/dist/collections/operations/duplicate.js +2 -0
- package/dist/collections/operations/duplicate.js.map +1 -1
- package/dist/collections/operations/find.d.ts +2 -2
- package/dist/collections/operations/find.d.ts.map +1 -1
- package/dist/collections/operations/find.js +1 -0
- package/dist/collections/operations/find.js.map +1 -1
- package/dist/collections/operations/findByID.d.ts +2 -2
- package/dist/collections/operations/findByID.d.ts.map +1 -1
- package/dist/collections/operations/findByID.js +1 -0
- package/dist/collections/operations/findByID.js.map +1 -1
- package/dist/collections/operations/findVersionByID.d.ts +2 -2
- package/dist/collections/operations/findVersionByID.d.ts.map +1 -1
- package/dist/collections/operations/findVersionByID.js +1 -0
- package/dist/collections/operations/findVersionByID.js.map +1 -1
- package/dist/collections/operations/findVersions.d.ts +2 -2
- package/dist/collections/operations/findVersions.d.ts.map +1 -1
- package/dist/collections/operations/findVersions.js +1 -0
- package/dist/collections/operations/findVersions.js.map +1 -1
- package/dist/collections/operations/local/count.d.ts +20 -0
- package/dist/collections/operations/local/count.d.ts.map +1 -0
- package/dist/collections/operations/local/count.js +19 -0
- package/dist/collections/operations/local/count.js.map +1 -0
- package/dist/collections/operations/local/create.d.ts +4 -4
- package/dist/collections/operations/local/create.d.ts.map +1 -1
- package/dist/collections/operations/local/create.js.map +1 -1
- package/dist/collections/operations/local/delete.d.ts +4 -4
- package/dist/collections/operations/local/delete.d.ts.map +1 -1
- package/dist/collections/operations/local/delete.js.map +1 -1
- package/dist/collections/operations/local/duplicate.d.ts +4 -4
- package/dist/collections/operations/local/duplicate.d.ts.map +1 -1
- package/dist/collections/operations/local/duplicate.js.map +1 -1
- package/dist/collections/operations/local/find.d.ts +4 -4
- package/dist/collections/operations/local/find.d.ts.map +1 -1
- package/dist/collections/operations/local/find.js.map +1 -1
- package/dist/collections/operations/local/findByID.d.ts +4 -4
- package/dist/collections/operations/local/findByID.d.ts.map +1 -1
- package/dist/collections/operations/local/findByID.js.map +1 -1
- package/dist/collections/operations/local/findVersionByID.d.ts +4 -4
- package/dist/collections/operations/local/findVersionByID.d.ts.map +1 -1
- package/dist/collections/operations/local/findVersionByID.js.map +1 -1
- package/dist/collections/operations/local/findVersions.d.ts +4 -4
- package/dist/collections/operations/local/findVersions.d.ts.map +1 -1
- package/dist/collections/operations/local/findVersions.js.map +1 -1
- package/dist/collections/operations/local/index.d.ts +2 -0
- package/dist/collections/operations/local/index.d.ts.map +1 -1
- package/dist/collections/operations/local/index.js +2 -0
- package/dist/collections/operations/local/index.js.map +1 -1
- package/dist/collections/operations/local/restoreVersion.d.ts +4 -4
- package/dist/collections/operations/local/restoreVersion.d.ts.map +1 -1
- package/dist/collections/operations/local/restoreVersion.js.map +1 -1
- package/dist/collections/operations/local/update.d.ts +4 -4
- package/dist/collections/operations/local/update.d.ts.map +1 -1
- package/dist/collections/operations/local/update.js.map +1 -1
- package/dist/collections/operations/restoreVersion.d.ts +2 -2
- package/dist/collections/operations/restoreVersion.d.ts.map +1 -1
- package/dist/collections/operations/restoreVersion.js +1 -0
- package/dist/collections/operations/restoreVersion.js.map +1 -1
- package/dist/collections/operations/update.d.ts +2 -2
- package/dist/collections/operations/update.d.ts.map +1 -1
- package/dist/collections/operations/update.js +5 -3
- package/dist/collections/operations/update.js.map +1 -1
- package/dist/collections/operations/updateByID.d.ts +2 -2
- package/dist/collections/operations/updateByID.d.ts.map +1 -1
- package/dist/collections/operations/updateByID.js +4 -2
- package/dist/collections/operations/updateByID.js.map +1 -1
- package/dist/collections/operations/utils.d.ts +8 -2
- package/dist/collections/operations/utils.d.ts.map +1 -1
- package/dist/collections/operations/utils.js.map +1 -1
- package/dist/config/build.d.ts.map +1 -1
- package/dist/config/build.js +3 -4
- package/dist/config/build.js.map +1 -1
- package/dist/config/client.d.ts +2 -1
- package/dist/config/client.d.ts.map +1 -1
- package/dist/config/client.js +3 -1
- package/dist/config/client.js.map +1 -1
- package/dist/config/defaults.d.ts.map +1 -1
- package/dist/config/defaults.js +2 -0
- package/dist/config/defaults.js.map +1 -1
- package/dist/config/find.d.ts.map +1 -1
- package/dist/config/find.js +20 -9
- package/dist/config/find.js.map +1 -1
- package/dist/config/sanitize.d.ts +1 -1
- package/dist/config/sanitize.d.ts.map +1 -1
- package/dist/config/sanitize.js +39 -10
- package/dist/config/sanitize.js.map +1 -1
- package/dist/config/schema.d.ts.map +1 -1
- package/dist/config/schema.js +5 -2
- package/dist/config/schema.js.map +1 -1
- package/dist/config/types.d.ts +54 -57
- package/dist/config/types.d.ts.map +1 -1
- package/dist/config/types.js +3 -12
- package/dist/config/types.js.map +1 -1
- package/dist/database/migrations/migrate.js.map +1 -1
- package/dist/database/migrations/migrateDown.js.map +1 -1
- package/dist/database/migrations/migrateRefresh.js.map +1 -1
- package/dist/database/migrations/migrateReset.js.map +1 -1
- package/dist/database/queryValidation/validateQueryPaths.d.ts +2 -2
- package/dist/database/queryValidation/validateQueryPaths.d.ts.map +1 -1
- package/dist/database/queryValidation/validateQueryPaths.js +1 -1
- package/dist/database/queryValidation/validateQueryPaths.js.map +1 -1
- package/dist/database/queryValidation/validateSearchParams.d.ts +2 -2
- package/dist/database/queryValidation/validateSearchParams.d.ts.map +1 -1
- package/dist/database/queryValidation/validateSearchParams.js.map +1 -1
- package/dist/database/types.d.ts +29 -19
- package/dist/database/types.d.ts.map +1 -1
- package/dist/database/types.js.map +1 -1
- package/dist/email/consoleEmailAdapter.d.ts +3 -0
- package/dist/email/consoleEmailAdapter.d.ts.map +1 -0
- package/dist/email/consoleEmailAdapter.js +17 -0
- package/dist/email/consoleEmailAdapter.js.map +1 -0
- package/dist/email/defaults.d.ts +2 -2
- package/dist/email/defaults.d.ts.map +1 -1
- package/dist/email/defaults.js +3 -3
- package/dist/email/defaults.js.map +1 -1
- package/dist/email/getStringifiedToAddress.d.ts +3 -0
- package/dist/email/getStringifiedToAddress.d.ts.map +1 -0
- package/dist/email/getStringifiedToAddress.js +20 -0
- package/dist/email/getStringifiedToAddress.js.map +1 -0
- package/dist/email/sendEmail.d.ts +3 -2
- package/dist/email/sendEmail.d.ts.map +1 -1
- package/dist/email/sendEmail.js +8 -4
- package/dist/email/sendEmail.js.map +1 -1
- package/dist/email/types.d.ts +26 -18
- package/dist/email/types.d.ts.map +1 -1
- package/dist/email/types.js +5 -1
- package/dist/email/types.js.map +1 -1
- package/dist/errors/APIError.d.ts +2 -2
- package/dist/errors/APIError.d.ts.map +1 -1
- package/dist/errors/APIError.js +1 -2
- package/dist/errors/APIError.js.map +1 -1
- package/dist/errors/AuthenticationError.d.ts +2 -3
- package/dist/errors/AuthenticationError.d.ts.map +1 -1
- package/dist/errors/AuthenticationError.js +2 -3
- package/dist/errors/AuthenticationError.js.map +1 -1
- package/dist/errors/DuplicateCollection.d.ts +2 -3
- package/dist/errors/DuplicateCollection.d.ts.map +1 -1
- package/dist/errors/DuplicateCollection.js +2 -3
- package/dist/errors/DuplicateCollection.js.map +1 -1
- package/dist/errors/DuplicateFieldName.d.ts +2 -3
- package/dist/errors/DuplicateFieldName.d.ts.map +1 -1
- package/dist/errors/DuplicateFieldName.js +2 -3
- package/dist/errors/DuplicateFieldName.js.map +1 -1
- package/dist/errors/DuplicateGlobal.d.ts +2 -3
- package/dist/errors/DuplicateGlobal.d.ts.map +1 -1
- package/dist/errors/DuplicateGlobal.js +2 -3
- package/dist/errors/DuplicateGlobal.js.map +1 -1
- package/dist/errors/ErrorDeletingFile.d.ts +2 -3
- package/dist/errors/ErrorDeletingFile.d.ts.map +1 -1
- package/dist/errors/ErrorDeletingFile.js +2 -3
- package/dist/errors/ErrorDeletingFile.js.map +1 -1
- package/dist/errors/FileRetrievalError.d.ts +6 -0
- package/dist/errors/FileRetrievalError.d.ts.map +1 -0
- package/dist/errors/FileRetrievalError.js +13 -0
- package/dist/errors/FileRetrievalError.js.map +1 -0
- package/dist/errors/FileUploadError.d.ts +2 -3
- package/dist/errors/FileUploadError.d.ts.map +1 -1
- package/dist/errors/FileUploadError.js +2 -3
- package/dist/errors/FileUploadError.js.map +1 -1
- package/dist/errors/Forbidden.d.ts +2 -3
- package/dist/errors/Forbidden.d.ts.map +1 -1
- package/dist/errors/Forbidden.js +2 -3
- package/dist/errors/Forbidden.js.map +1 -1
- package/dist/errors/InvalidConfiguration.d.ts +2 -3
- package/dist/errors/InvalidConfiguration.d.ts.map +1 -1
- package/dist/errors/InvalidConfiguration.js +2 -3
- package/dist/errors/InvalidConfiguration.js.map +1 -1
- package/dist/errors/InvalidFieldName.d.ts +2 -3
- package/dist/errors/InvalidFieldName.d.ts.map +1 -1
- package/dist/errors/InvalidFieldName.js +2 -3
- package/dist/errors/InvalidFieldName.js.map +1 -1
- package/dist/errors/InvalidFieldRelationship.d.ts +2 -3
- package/dist/errors/InvalidFieldRelationship.d.ts.map +1 -1
- package/dist/errors/InvalidFieldRelationship.js +2 -3
- package/dist/errors/InvalidFieldRelationship.js.map +1 -1
- package/dist/errors/InvalidSchema.d.ts +2 -3
- package/dist/errors/InvalidSchema.d.ts.map +1 -1
- package/dist/errors/InvalidSchema.js +2 -3
- package/dist/errors/InvalidSchema.js.map +1 -1
- package/dist/errors/LockedAuth.d.ts +2 -3
- package/dist/errors/LockedAuth.d.ts.map +1 -1
- package/dist/errors/LockedAuth.js +2 -3
- package/dist/errors/LockedAuth.js.map +1 -1
- package/dist/errors/MissingCollectionLabel.d.ts +2 -3
- package/dist/errors/MissingCollectionLabel.d.ts.map +1 -1
- package/dist/errors/MissingCollectionLabel.js +2 -3
- package/dist/errors/MissingCollectionLabel.js.map +1 -1
- package/dist/errors/MissingEditorProp.d.ts +2 -3
- package/dist/errors/MissingEditorProp.d.ts.map +1 -1
- package/dist/errors/MissingEditorProp.js +3 -4
- package/dist/errors/MissingEditorProp.js.map +1 -1
- package/dist/errors/MissingFieldInputOptions.d.ts +2 -3
- package/dist/errors/MissingFieldInputOptions.d.ts.map +1 -1
- package/dist/errors/MissingFieldInputOptions.js +2 -3
- package/dist/errors/MissingFieldInputOptions.js.map +1 -1
- package/dist/errors/MissingFieldType.d.ts +2 -3
- package/dist/errors/MissingFieldType.d.ts.map +1 -1
- package/dist/errors/MissingFieldType.js +2 -3
- package/dist/errors/MissingFieldType.js.map +1 -1
- package/dist/errors/MissingFile.d.ts +2 -3
- package/dist/errors/MissingFile.d.ts.map +1 -1
- package/dist/errors/MissingFile.js +2 -3
- package/dist/errors/MissingFile.js.map +1 -1
- package/dist/errors/NotFound.d.ts +2 -3
- package/dist/errors/NotFound.d.ts.map +1 -1
- package/dist/errors/NotFound.js +2 -3
- package/dist/errors/NotFound.js.map +1 -1
- package/dist/errors/QueryError.d.ts +2 -3
- package/dist/errors/QueryError.d.ts.map +1 -1
- package/dist/errors/QueryError.js +2 -3
- package/dist/errors/QueryError.js.map +1 -1
- package/dist/errors/TimestampsRequired.d.ts +2 -3
- package/dist/errors/TimestampsRequired.d.ts.map +1 -1
- package/dist/errors/TimestampsRequired.js +2 -3
- package/dist/errors/TimestampsRequired.js.map +1 -1
- package/dist/errors/UnathorizedError.d.ts +2 -3
- package/dist/errors/UnathorizedError.d.ts.map +1 -1
- package/dist/errors/UnathorizedError.js +2 -3
- package/dist/errors/UnathorizedError.js.map +1 -1
- package/dist/errors/ValidationError.d.ts +2 -3
- package/dist/errors/ValidationError.d.ts.map +1 -1
- package/dist/errors/ValidationError.js +2 -3
- package/dist/errors/ValidationError.js.map +1 -1
- package/dist/errors/index.d.ts +20 -19
- package/dist/errors/index.d.ts.map +1 -1
- package/dist/errors/index.js +20 -19
- package/dist/errors/index.js.map +1 -1
- package/dist/exports/auth.d.ts +1 -0
- package/dist/exports/auth.d.ts.map +1 -1
- package/dist/exports/auth.js +1 -0
- package/dist/exports/auth.js.map +1 -1
- package/dist/exports/database.d.ts +1 -1
- package/dist/exports/database.d.ts.map +1 -1
- package/dist/exports/database.js.map +1 -1
- package/dist/exports/i18n.d.ts +2 -0
- package/dist/exports/i18n.d.ts.map +1 -0
- package/dist/exports/i18n.js +3 -0
- package/dist/exports/i18n.js.map +1 -0
- package/dist/exports/node.d.ts +3 -0
- package/dist/exports/node.d.ts.map +1 -1
- package/dist/exports/node.js +3 -1
- package/dist/exports/node.js.map +1 -1
- package/dist/exports/operations.d.ts +1 -0
- package/dist/exports/operations.d.ts.map +1 -1
- package/dist/exports/operations.js +1 -0
- package/dist/exports/operations.js.map +1 -1
- package/dist/exports/types.d.ts +2 -1
- package/dist/exports/types.d.ts.map +1 -1
- package/dist/exports/types.js.map +1 -1
- package/dist/exports/utilities.d.ts +8 -3
- package/dist/exports/utilities.d.ts.map +1 -1
- package/dist/exports/utilities.js +7 -3
- package/dist/exports/utilities.js.map +1 -1
- package/dist/fields/config/client.d.ts +262 -106
- package/dist/fields/config/client.d.ts.map +1 -1
- package/dist/fields/config/client.js +2 -1
- package/dist/fields/config/client.js.map +1 -1
- package/dist/fields/config/sanitize.d.ts +7 -2
- package/dist/fields/config/sanitize.d.ts.map +1 -1
- package/dist/fields/config/sanitize.js +63 -34
- package/dist/fields/config/sanitize.js.map +1 -1
- package/dist/fields/config/sanitize.spec.js +76 -82
- package/dist/fields/config/sanitize.spec.js.map +1 -1
- package/dist/fields/config/schema.d.ts.map +1 -1
- package/dist/fields/config/schema.js +32 -6
- package/dist/fields/config/schema.js.map +1 -1
- package/dist/fields/config/types.d.ts +127 -65
- package/dist/fields/config/types.d.ts.map +1 -1
- package/dist/fields/config/types.js.map +1 -1
- package/dist/fields/getDefaultValue.d.ts +2 -2
- package/dist/fields/getDefaultValue.d.ts.map +1 -1
- package/dist/fields/getDefaultValue.js.map +1 -1
- package/dist/fields/hooks/afterChange/index.d.ts +2 -2
- package/dist/fields/hooks/afterChange/index.d.ts.map +1 -1
- package/dist/fields/hooks/afterChange/index.js.map +1 -1
- package/dist/fields/hooks/afterChange/promise.d.ts +2 -2
- package/dist/fields/hooks/afterChange/promise.d.ts.map +1 -1
- package/dist/fields/hooks/afterChange/promise.js.map +1 -1
- package/dist/fields/hooks/afterChange/traverseFields.d.ts +2 -2
- package/dist/fields/hooks/afterChange/traverseFields.d.ts.map +1 -1
- package/dist/fields/hooks/afterChange/traverseFields.js.map +1 -1
- package/dist/fields/hooks/afterRead/index.d.ts +3 -2
- package/dist/fields/hooks/afterRead/index.d.ts.map +1 -1
- package/dist/fields/hooks/afterRead/index.js +2 -1
- package/dist/fields/hooks/afterRead/index.js.map +1 -1
- package/dist/fields/hooks/afterRead/promise.d.ts +7 -3
- package/dist/fields/hooks/afterRead/promise.d.ts.map +1 -1
- package/dist/fields/hooks/afterRead/promise.js +20 -18
- package/dist/fields/hooks/afterRead/promise.js.map +1 -1
- package/dist/fields/hooks/afterRead/relationshipPopulationPromise.d.ts +4 -3
- package/dist/fields/hooks/afterRead/relationshipPopulationPromise.d.ts.map +1 -1
- package/dist/fields/hooks/afterRead/relationshipPopulationPromise.js +16 -10
- package/dist/fields/hooks/afterRead/relationshipPopulationPromise.js.map +1 -1
- package/dist/fields/hooks/afterRead/traverseFields.d.ts +7 -3
- package/dist/fields/hooks/afterRead/traverseFields.d.ts.map +1 -1
- package/dist/fields/hooks/afterRead/traverseFields.js +2 -1
- package/dist/fields/hooks/afterRead/traverseFields.js.map +1 -1
- package/dist/fields/hooks/beforeChange/index.d.ts +2 -2
- package/dist/fields/hooks/beforeChange/index.d.ts.map +1 -1
- package/dist/fields/hooks/beforeChange/index.js.map +1 -1
- package/dist/fields/hooks/beforeChange/promise.d.ts +2 -2
- package/dist/fields/hooks/beforeChange/promise.d.ts.map +1 -1
- package/dist/fields/hooks/beforeChange/promise.js +3 -1
- package/dist/fields/hooks/beforeChange/promise.js.map +1 -1
- package/dist/fields/hooks/beforeChange/traverseFields.d.ts +14 -2
- package/dist/fields/hooks/beforeChange/traverseFields.d.ts.map +1 -1
- package/dist/fields/hooks/beforeChange/traverseFields.js.map +1 -1
- package/dist/fields/hooks/beforeValidate/index.d.ts +2 -2
- package/dist/fields/hooks/beforeValidate/index.d.ts.map +1 -1
- package/dist/fields/hooks/beforeValidate/index.js.map +1 -1
- package/dist/fields/hooks/beforeValidate/promise.d.ts +8 -2
- package/dist/fields/hooks/beforeValidate/promise.d.ts.map +1 -1
- package/dist/fields/hooks/beforeValidate/promise.js +2 -0
- package/dist/fields/hooks/beforeValidate/promise.js.map +1 -1
- package/dist/fields/hooks/beforeValidate/traverseFields.d.ts +8 -2
- package/dist/fields/hooks/beforeValidate/traverseFields.d.ts.map +1 -1
- package/dist/fields/hooks/beforeValidate/traverseFields.js.map +1 -1
- package/dist/fields/validations.d.ts +9 -4
- package/dist/fields/validations.d.ts.map +1 -1
- package/dist/fields/validations.js +63 -12
- package/dist/fields/validations.js.map +1 -1
- package/dist/fields/validations.spec.js +6 -1
- package/dist/fields/validations.spec.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.d.ts +2 -3
- package/dist/globals/config/sanitize.d.ts.map +1 -1
- package/dist/globals/config/sanitize.js +36 -35
- package/dist/globals/config/sanitize.js.map +1 -1
- package/dist/globals/config/schema.d.ts.map +1 -1
- package/dist/globals/config/schema.js +5 -1
- package/dist/globals/config/schema.js.map +1 -1
- package/dist/globals/config/types.d.ts +12 -10
- package/dist/globals/config/types.d.ts.map +1 -1
- package/dist/globals/config/types.js.map +1 -1
- package/dist/globals/operations/docAccess.d.ts +2 -2
- package/dist/globals/operations/docAccess.d.ts.map +1 -1
- package/dist/globals/operations/docAccess.js.map +1 -1
- package/dist/globals/operations/findOne.d.ts +2 -3
- package/dist/globals/operations/findOne.d.ts.map +1 -1
- package/dist/globals/operations/findOne.js +1 -0
- package/dist/globals/operations/findOne.js.map +1 -1
- package/dist/globals/operations/findVersionByID.d.ts +2 -2
- package/dist/globals/operations/findVersionByID.d.ts.map +1 -1
- package/dist/globals/operations/findVersionByID.js +1 -0
- package/dist/globals/operations/findVersionByID.js.map +1 -1
- package/dist/globals/operations/findVersions.d.ts +2 -2
- package/dist/globals/operations/findVersions.d.ts.map +1 -1
- package/dist/globals/operations/findVersions.js +1 -0
- package/dist/globals/operations/findVersions.js.map +1 -1
- package/dist/globals/operations/local/findOne.d.ts +4 -4
- package/dist/globals/operations/local/findOne.d.ts.map +1 -1
- package/dist/globals/operations/local/findOne.js.map +1 -1
- package/dist/globals/operations/local/findVersionByID.d.ts +4 -4
- package/dist/globals/operations/local/findVersionByID.d.ts.map +1 -1
- package/dist/globals/operations/local/findVersionByID.js.map +1 -1
- package/dist/globals/operations/local/findVersions.d.ts +4 -4
- package/dist/globals/operations/local/findVersions.d.ts.map +1 -1
- package/dist/globals/operations/local/findVersions.js.map +1 -1
- package/dist/globals/operations/local/restoreVersion.d.ts +4 -4
- package/dist/globals/operations/local/restoreVersion.d.ts.map +1 -1
- package/dist/globals/operations/local/restoreVersion.js.map +1 -1
- package/dist/globals/operations/local/update.d.ts +4 -4
- package/dist/globals/operations/local/update.d.ts.map +1 -1
- package/dist/globals/operations/local/update.js.map +1 -1
- package/dist/globals/operations/restoreVersion.d.ts +2 -2
- package/dist/globals/operations/restoreVersion.d.ts.map +1 -1
- package/dist/globals/operations/restoreVersion.js +1 -0
- package/dist/globals/operations/restoreVersion.js.map +1 -1
- package/dist/globals/operations/update.d.ts +2 -2
- package/dist/globals/operations/update.d.ts.map +1 -1
- package/dist/globals/operations/update.js +2 -0
- package/dist/globals/operations/update.js.map +1 -1
- package/dist/index.d.ts +17 -6
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +32 -14
- package/dist/index.js.map +1 -1
- package/dist/preferences/deleteUserPreferences.d.ts +2 -2
- package/dist/preferences/deleteUserPreferences.d.ts.map +1 -1
- package/dist/preferences/deleteUserPreferences.js.map +1 -1
- package/dist/preferences/operations/delete.js +2 -2
- package/dist/preferences/operations/delete.js.map +1 -1
- package/dist/preferences/operations/update.d.ts +1 -1
- package/dist/preferences/operations/update.js +1 -1
- package/dist/preferences/operations/update.js.map +1 -1
- package/dist/preferences/requestHandlers/delete.d.ts.map +1 -1
- package/dist/preferences/requestHandlers/delete.js +18 -5
- package/dist/preferences/requestHandlers/delete.js.map +1 -1
- package/dist/preferences/requestHandlers/findOne.d.ts.map +1 -1
- package/dist/preferences/requestHandlers/findOne.js +18 -5
- package/dist/preferences/requestHandlers/findOne.js.map +1 -1
- package/dist/preferences/requestHandlers/update.d.ts.map +1 -1
- package/dist/preferences/requestHandlers/update.js +19 -7
- package/dist/preferences/requestHandlers/update.js.map +1 -1
- package/dist/preferences/types.d.ts +3 -4
- package/dist/preferences/types.d.ts.map +1 -1
- package/dist/preferences/types.js.map +1 -1
- package/dist/translations/getLocalI18n.d.ts +1 -1
- package/dist/translations/getLocalI18n.d.ts.map +1 -1
- package/dist/translations/getLocalI18n.js +1 -1
- package/dist/translations/getLocalI18n.js.map +1 -1
- package/dist/types/index.d.ts +21 -17
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js.map +1 -1
- package/dist/uploads/deleteAssociatedFiles.d.ts +2 -2
- package/dist/uploads/deleteAssociatedFiles.d.ts.map +1 -1
- package/dist/uploads/deleteAssociatedFiles.js.map +1 -1
- package/dist/uploads/docWithFilenameExists.d.ts +2 -2
- package/dist/uploads/docWithFilenameExists.d.ts.map +1 -1
- package/dist/uploads/docWithFilenameExists.js.map +1 -1
- package/dist/uploads/generateFileData.d.ts +2 -2
- package/dist/uploads/generateFileData.d.ts.map +1 -1
- package/dist/uploads/generateFileData.js +5 -4
- package/dist/uploads/generateFileData.js.map +1 -1
- package/dist/uploads/getBaseFields.d.ts.map +1 -1
- package/dist/uploads/getBaseFields.js +7 -3
- package/dist/uploads/getBaseFields.js.map +1 -1
- package/dist/uploads/getExternalFile.d.ts +5 -4
- package/dist/uploads/getExternalFile.d.ts.map +1 -1
- package/dist/uploads/getExternalFile.js +10 -6
- package/dist/uploads/getExternalFile.js.map +1 -1
- package/dist/uploads/getFileByPath.d.ts +2 -2
- package/dist/uploads/getFileByPath.d.ts.map +1 -1
- package/dist/uploads/getFileByPath.js.map +1 -1
- package/dist/uploads/getImageSize.d.ts +2 -2
- package/dist/uploads/getImageSize.d.ts.map +1 -1
- package/dist/uploads/getImageSize.js +19 -5
- package/dist/uploads/getImageSize.js.map +1 -1
- package/dist/uploads/getSafeFilename.d.ts +2 -2
- package/dist/uploads/getSafeFilename.d.ts.map +1 -1
- package/dist/uploads/getSafeFilename.js.map +1 -1
- package/dist/uploads/imageResizer.d.ts +3 -3
- package/dist/uploads/imageResizer.d.ts.map +1 -1
- package/dist/uploads/imageResizer.js.map +1 -1
- package/dist/uploads/tempFile.d.ts +7 -0
- package/dist/uploads/tempFile.d.ts.map +1 -0
- package/dist/uploads/tempFile.js +39 -0
- package/dist/uploads/tempFile.js.map +1 -0
- package/dist/uploads/types.d.ts +14 -2
- package/dist/uploads/types.d.ts.map +1 -1
- package/dist/uploads/types.js.map +1 -1
- package/dist/uploads/unlinkTempFiles.d.ts +2 -2
- package/dist/uploads/unlinkTempFiles.d.ts.map +1 -1
- package/dist/uploads/unlinkTempFiles.js.map +1 -1
- package/dist/uploads/uploadFiles.d.ts +2 -2
- package/dist/uploads/uploadFiles.d.ts.map +1 -1
- package/dist/uploads/uploadFiles.js.map +1 -1
- package/dist/utilities/checkDuplicateCollections.js +1 -1
- package/dist/utilities/checkDuplicateCollections.js.map +1 -1
- package/dist/utilities/commitTransaction.d.ts +2 -2
- package/dist/utilities/commitTransaction.d.ts.map +1 -1
- package/dist/utilities/commitTransaction.js.map +1 -1
- package/dist/utilities/configToJSONSchema.d.ts.map +1 -1
- package/dist/utilities/configToJSONSchema.js +56 -1
- package/dist/utilities/configToJSONSchema.js.map +1 -1
- package/dist/utilities/configToJSONSchema.spec.js +2 -2
- package/dist/utilities/configToJSONSchema.spec.js.map +1 -1
- package/dist/utilities/createLocalReq.d.ts +3 -3
- package/dist/utilities/createLocalReq.d.ts.map +1 -1
- package/dist/utilities/createLocalReq.js +8 -5
- package/dist/utilities/createLocalReq.js.map +1 -1
- package/dist/utilities/getEntityPolicies.d.ts +2 -2
- package/dist/utilities/getEntityPolicies.d.ts.map +1 -1
- package/dist/utilities/getEntityPolicies.js.map +1 -1
- package/dist/utilities/importWithoutClientFiles.d.ts.map +1 -1
- package/dist/utilities/importWithoutClientFiles.js +7 -4
- package/dist/utilities/importWithoutClientFiles.js.map +1 -1
- package/dist/utilities/initTransaction.d.ts +2 -2
- package/dist/utilities/initTransaction.d.ts.map +1 -1
- package/dist/utilities/initTransaction.js.map +1 -1
- package/dist/utilities/isEntityHidden.d.ts +2 -2
- package/dist/utilities/isEntityHidden.d.ts.map +1 -1
- package/dist/utilities/isEntityHidden.js.map +1 -1
- package/dist/utilities/isReactComponent.d.ts +3 -2
- package/dist/utilities/isReactComponent.d.ts.map +1 -1
- package/dist/utilities/isReactComponent.js +10 -6
- package/dist/utilities/isReactComponent.js.map +1 -1
- package/dist/utilities/killTransaction.d.ts +2 -2
- package/dist/utilities/killTransaction.d.ts.map +1 -1
- package/dist/utilities/killTransaction.js.map +1 -1
- package/dist/utilities/parseCookies.js +1 -1
- package/dist/utilities/parseCookies.js.map +1 -1
- package/dist/utilities/telemetry/events/adminInit.d.ts +2 -2
- package/dist/utilities/telemetry/events/adminInit.d.ts.map +1 -1
- package/dist/utilities/telemetry/events/adminInit.js.map +1 -1
- package/dist/utilities/telemetry/index.d.ts +9 -0
- package/dist/utilities/telemetry/index.d.ts.map +1 -1
- package/dist/utilities/telemetry/index.js +62 -14
- package/dist/utilities/telemetry/index.js.map +1 -1
- package/dist/versions/deleteCollectionVersions.d.ts +2 -2
- package/dist/versions/deleteCollectionVersions.d.ts.map +1 -1
- package/dist/versions/deleteCollectionVersions.js.map +1 -1
- package/dist/versions/drafts/replaceWithDraftIfAvailable.d.ts +2 -2
- package/dist/versions/drafts/replaceWithDraftIfAvailable.d.ts.map +1 -1
- package/dist/versions/drafts/replaceWithDraftIfAvailable.js.map +1 -1
- package/dist/versions/enforceMaxVersions.d.ts +2 -2
- package/dist/versions/enforceMaxVersions.d.ts.map +1 -1
- package/dist/versions/enforceMaxVersions.js.map +1 -1
- package/dist/versions/getLatestCollectionVersion.d.ts +2 -2
- package/dist/versions/getLatestCollectionVersion.d.ts.map +1 -1
- package/dist/versions/getLatestCollectionVersion.js.map +1 -1
- package/dist/versions/getLatestGlobalVersion.d.ts +2 -2
- package/dist/versions/getLatestGlobalVersion.d.ts.map +1 -1
- package/dist/versions/getLatestGlobalVersion.js.map +1 -1
- package/dist/versions/saveVersion.d.ts +2 -2
- package/dist/versions/saveVersion.d.ts.map +1 -1
- package/dist/versions/saveVersion.js +1 -1
- package/dist/versions/saveVersion.js.map +1 -1
- package/package.json +68 -67
- package/auth.d.ts +0 -6
- package/auth.js +0 -6
- package/config.d.ts +0 -14
- package/config.js +0 -14
- package/database.d.ts +0 -23
- package/database.js +0 -22
- package/dist/email/build.d.ts +0 -5
- package/dist/email/build.d.ts.map +0 -1
- package/dist/email/build.js +0 -63
- package/dist/email/build.js.map +0 -1
- package/dist/email/mockHandler.d.ts +0 -5
- package/dist/email/mockHandler.d.ts.map +0 -1
- package/dist/email/mockHandler.js +0 -24
- package/dist/email/mockHandler.js.map +0 -1
- package/dist/utilities/getIDType.d.ts +0 -4
- package/dist/utilities/getIDType.d.ts.map +0 -1
- package/dist/utilities/getIDType.js +0 -8
- package/dist/utilities/getIDType.js.map +0 -1
- package/errors.d.ts +0 -2
- package/errors.js +0 -3
- package/node.d.ts +0 -3
- package/node.js +0 -4
- package/operations.d.ts +0 -30
- package/operations.js +0 -31
- package/src/index.ts +0 -486
- package/types.d.ts +0 -17
- package/types.js +0 -5
- package/uploads.d.ts +0 -2
- package/uploads.js +0 -3
- package/utilities.d.ts +0 -32
- package/utilities.js +0 -33
- package/versions.d.ts +0 -9
- package/versions.js +0 -9
package/dist/config/types.d.ts
CHANGED
|
@@ -2,20 +2,20 @@
|
|
|
2
2
|
import type { I18nOptions, TFunction } from '@payloadcms/translations';
|
|
3
3
|
import type { Options as ExpressFileUploadOptions } from 'express-fileupload';
|
|
4
4
|
import type GraphQL from 'graphql';
|
|
5
|
-
import type { Transporter } from 'nodemailer';
|
|
6
|
-
import type SMTPConnection from 'nodemailer/lib/smtp-connection';
|
|
7
5
|
import type { DestinationStream, LoggerOptions } from 'pino';
|
|
8
6
|
import type React from 'react';
|
|
9
7
|
import type { default as sharp } from 'sharp';
|
|
10
8
|
import type { DeepRequired } from 'ts-essentials';
|
|
9
|
+
import type { RichTextAdapterProvider } from '../admin/RichText.js';
|
|
11
10
|
import type { DocumentTab, RichTextAdapter } from '../admin/types.js';
|
|
12
11
|
import type { AdminView, ServerSideEditViewProps } from '../admin/views/types.js';
|
|
13
12
|
import type { User } from '../auth/types.js';
|
|
14
13
|
import type { AfterErrorHook, Collection, CollectionConfig, SanitizedCollectionConfig } from '../collections/config/types.js';
|
|
15
14
|
import type { DatabaseAdapterResult } from '../database/types.js';
|
|
15
|
+
import type { EmailAdapter, SendEmailOptions } from '../email/types.js';
|
|
16
16
|
import type { GlobalConfig, Globals, SanitizedGlobalConfig } from '../globals/config/types.js';
|
|
17
17
|
import type { Payload } from '../index.js';
|
|
18
|
-
import type { PayloadRequest, Where } from '../types/index.js';
|
|
18
|
+
import type { PayloadRequest, PayloadRequestWithData, Where } from '../types/index.js';
|
|
19
19
|
import type { PayloadLogger } from '../utilities/logger.js';
|
|
20
20
|
export type BinScriptConfig = {
|
|
21
21
|
key: string;
|
|
@@ -25,11 +25,6 @@ export type BinScript = (config: SanitizedConfig) => Promise<void> | void;
|
|
|
25
25
|
type Prettify<T> = {
|
|
26
26
|
[K in keyof T]: T[K];
|
|
27
27
|
} & NonNullable<unknown>;
|
|
28
|
-
type Email = {
|
|
29
|
-
fromAddress: string;
|
|
30
|
-
fromName: string;
|
|
31
|
-
logMockCredentials?: boolean;
|
|
32
|
-
};
|
|
33
28
|
export type Plugin = (config: Config) => Config | Promise<Config>;
|
|
34
29
|
export type LivePreviewConfig = {
|
|
35
30
|
/**
|
|
@@ -60,28 +55,10 @@ export type LivePreviewConfig = {
|
|
|
60
55
|
export type ServerOnlyLivePreviewProperties = keyof Pick<LivePreviewConfig, 'url'>;
|
|
61
56
|
type GeneratePreviewURLOptions = {
|
|
62
57
|
locale: string;
|
|
63
|
-
|
|
58
|
+
req: PayloadRequestWithData;
|
|
59
|
+
token: null | string;
|
|
64
60
|
};
|
|
65
61
|
export type GeneratePreviewURL = (doc: Record<string, unknown>, options: GeneratePreviewURLOptions) => Promise<null | string> | null | string;
|
|
66
|
-
export type EmailTransport = Email & {
|
|
67
|
-
transport: Transporter;
|
|
68
|
-
transportOptions?: SMTPConnection.Options;
|
|
69
|
-
};
|
|
70
|
-
export type EmailTransportOptions = Email & {
|
|
71
|
-
transport?: Transporter;
|
|
72
|
-
transportOptions: SMTPConnection.Options;
|
|
73
|
-
};
|
|
74
|
-
export type EmailOptions = Email | EmailTransport | EmailTransportOptions;
|
|
75
|
-
/**
|
|
76
|
-
* type guard for EmailOptions
|
|
77
|
-
* @param emailConfig
|
|
78
|
-
*/
|
|
79
|
-
export declare function hasTransport(emailConfig: EmailOptions): emailConfig is EmailTransport;
|
|
80
|
-
/**
|
|
81
|
-
* type guard for EmailOptions
|
|
82
|
-
* @param emailConfig
|
|
83
|
-
*/
|
|
84
|
-
export declare function hasTransportOptions(emailConfig: EmailOptions): emailConfig is EmailTransportOptions;
|
|
85
62
|
export type GraphQLInfo = {
|
|
86
63
|
Mutation: {
|
|
87
64
|
fields: Record<string, any>;
|
|
@@ -123,12 +100,6 @@ export type InitOptions = {
|
|
|
123
100
|
* Disable running of the `onInit` function
|
|
124
101
|
*/
|
|
125
102
|
disableOnInit?: boolean;
|
|
126
|
-
/**
|
|
127
|
-
* Configuration for Payload's email functionality
|
|
128
|
-
*
|
|
129
|
-
* @see https://payloadcms.com/docs/email/overview
|
|
130
|
-
*/
|
|
131
|
-
email?: EmailOptions;
|
|
132
103
|
/**
|
|
133
104
|
* A previously instantiated logger instance. Must conform to the PayloadLogger interface which uses Pino
|
|
134
105
|
* This allows you to bring your own logger instance and let payload use it
|
|
@@ -172,7 +143,7 @@ export type AccessArgs<T = any, U = any> = {
|
|
|
172
143
|
/** If true, the request is for a static file */
|
|
173
144
|
isReadingStaticFile?: boolean;
|
|
174
145
|
/** The original request that requires an access check */
|
|
175
|
-
req:
|
|
146
|
+
req: PayloadRequestWithData<U>;
|
|
176
147
|
};
|
|
177
148
|
/**
|
|
178
149
|
* Access function runs on the server
|
|
@@ -225,7 +196,7 @@ export type EditViewConfig = {
|
|
|
225
196
|
Component: EditViewComponent;
|
|
226
197
|
path: string;
|
|
227
198
|
} | {
|
|
228
|
-
actions?:
|
|
199
|
+
actions?: CustomComponent[];
|
|
229
200
|
};
|
|
230
201
|
/**
|
|
231
202
|
* Override existing views
|
|
@@ -235,6 +206,11 @@ export type EditViewConfig = {
|
|
|
235
206
|
* i.e. you can change just the label, if desired
|
|
236
207
|
*/
|
|
237
208
|
export type EditView = EditViewComponent | EditViewConfig;
|
|
209
|
+
export type ServerProps = {
|
|
210
|
+
payload: Payload;
|
|
211
|
+
};
|
|
212
|
+
export declare const serverProps: (keyof ServerProps)[];
|
|
213
|
+
export type CustomComponent<T extends any = any> = React.ComponentType<T & ServerProps>;
|
|
238
214
|
export type Locale = {
|
|
239
215
|
/**
|
|
240
216
|
* value of supported locale
|
|
@@ -332,46 +308,46 @@ export type Config = {
|
|
|
332
308
|
/**
|
|
333
309
|
* Replace the navigation with a custom component
|
|
334
310
|
*/
|
|
335
|
-
Nav?:
|
|
311
|
+
Nav?: CustomComponent;
|
|
336
312
|
/**
|
|
337
313
|
* Add custom components to the top right of the Admin Panel
|
|
338
314
|
*/
|
|
339
|
-
actions?:
|
|
315
|
+
actions?: CustomComponent[];
|
|
340
316
|
/**
|
|
341
317
|
* Add custom components after the collection overview
|
|
342
318
|
*/
|
|
343
|
-
afterDashboard?:
|
|
319
|
+
afterDashboard?: CustomComponent[];
|
|
344
320
|
/**
|
|
345
321
|
* Add custom components after the email/password field
|
|
346
322
|
*/
|
|
347
|
-
afterLogin?:
|
|
323
|
+
afterLogin?: CustomComponent[];
|
|
348
324
|
/**
|
|
349
325
|
* Add custom components after the navigation links
|
|
350
326
|
*/
|
|
351
|
-
afterNavLinks?:
|
|
327
|
+
afterNavLinks?: CustomComponent[];
|
|
352
328
|
/**
|
|
353
329
|
* Add custom components before the collection overview
|
|
354
330
|
*/
|
|
355
|
-
beforeDashboard?:
|
|
331
|
+
beforeDashboard?: CustomComponent[];
|
|
356
332
|
/**
|
|
357
333
|
* Add custom components before the email/password field
|
|
358
334
|
*/
|
|
359
|
-
beforeLogin?:
|
|
335
|
+
beforeLogin?: CustomComponent[];
|
|
360
336
|
/**
|
|
361
337
|
* Add custom components before the navigation links
|
|
362
338
|
*/
|
|
363
|
-
beforeNavLinks?:
|
|
339
|
+
beforeNavLinks?: CustomComponent[];
|
|
364
340
|
/** Replace graphical components */
|
|
365
341
|
graphics?: {
|
|
366
342
|
/** Replace the icon in the navigation */
|
|
367
|
-
Icon?:
|
|
343
|
+
Icon?: CustomComponent;
|
|
368
344
|
/** Replace the logo on the login page */
|
|
369
|
-
Logo?:
|
|
345
|
+
Logo?: CustomComponent;
|
|
370
346
|
};
|
|
371
347
|
/** Replace logout related components */
|
|
372
348
|
logout?: {
|
|
373
349
|
/** Replace the logout button */
|
|
374
|
-
Button?:
|
|
350
|
+
Button?: CustomComponent;
|
|
375
351
|
};
|
|
376
352
|
/**
|
|
377
353
|
* Wrap the admin dashboard in custom context providers
|
|
@@ -394,6 +370,8 @@ export type Config = {
|
|
|
394
370
|
Dashboard?: AdminView;
|
|
395
371
|
};
|
|
396
372
|
};
|
|
373
|
+
/** Extension point to add your custom data. Available in server and client. */
|
|
374
|
+
custom?: Record<string, any>;
|
|
397
375
|
/** Global date format that will be used for all dates in the Admin panel. Any valid date-fns format pattern can be used. */
|
|
398
376
|
dateFormat?: string;
|
|
399
377
|
/** If set to true, the entire Admin panel will be disabled. */
|
|
@@ -453,7 +431,7 @@ export type Config = {
|
|
|
453
431
|
cors?: '*' | string[];
|
|
454
432
|
/** A whitelist array of URLs to allow Payload cookies to be accepted from as a form of CSRF protection. */
|
|
455
433
|
csrf?: string[];
|
|
456
|
-
/** Extension point to add your custom data. */
|
|
434
|
+
/** Extension point to add your custom data. Server only. */
|
|
457
435
|
custom?: Record<string, any>;
|
|
458
436
|
/** Pass in a database adapter for use on this project. */
|
|
459
437
|
db: DatabaseAdapterResult;
|
|
@@ -474,13 +452,13 @@ export type Config = {
|
|
|
474
452
|
*/
|
|
475
453
|
defaultMaxTextLength?: number;
|
|
476
454
|
/** Default richtext editor to use for richText fields */
|
|
477
|
-
editor:
|
|
455
|
+
editor: RichTextAdapterProvider<any, any, any>;
|
|
478
456
|
/**
|
|
479
|
-
* Email
|
|
457
|
+
* Email Adapter
|
|
480
458
|
*
|
|
481
459
|
* @see https://payloadcms.com/docs/email/overview
|
|
482
460
|
*/
|
|
483
|
-
email?:
|
|
461
|
+
email?: EmailAdapter | Promise<EmailAdapter>;
|
|
484
462
|
/** Custom REST endpoints */
|
|
485
463
|
endpoints?: Endpoint[];
|
|
486
464
|
/**
|
|
@@ -575,7 +553,16 @@ export type Config = {
|
|
|
575
553
|
/** Control how typescript interfaces are generated from your collections. */
|
|
576
554
|
typescript?: {
|
|
577
555
|
/** Disable declare block in generated types file */
|
|
578
|
-
declare?:
|
|
556
|
+
declare?: {
|
|
557
|
+
/**
|
|
558
|
+
* @internal internal use only to allow for multiple declarations within a monorepo and suppress the "Duplicate identifier GeneratedTypes" error
|
|
559
|
+
*
|
|
560
|
+
* Adds a @ts-ignore flag above the GeneratedTypes interface declaration
|
|
561
|
+
*
|
|
562
|
+
* @default false
|
|
563
|
+
*/
|
|
564
|
+
ignoreTSError?: boolean;
|
|
565
|
+
} | false;
|
|
579
566
|
/** Filename to write the generated types to */
|
|
580
567
|
outputFile?: string;
|
|
581
568
|
};
|
|
@@ -584,8 +571,10 @@ export type Config = {
|
|
|
584
571
|
*/
|
|
585
572
|
upload?: ExpressFileUploadOptions;
|
|
586
573
|
};
|
|
587
|
-
export type SanitizedConfig = Omit<DeepRequired<Config>, 'collections' | 'endpoint' | 'globals' | 'i18n' | 'localization'> & {
|
|
574
|
+
export type SanitizedConfig = Omit<DeepRequired<Config>, 'collections' | 'editor' | 'endpoint' | 'globals' | 'i18n' | 'localization' | 'upload'> & {
|
|
588
575
|
collections: SanitizedCollectionConfig[];
|
|
576
|
+
/** Default richtext editor to use for richText fields */
|
|
577
|
+
editor: RichTextAdapter<any, any, any>;
|
|
589
578
|
endpoints: Endpoint[];
|
|
590
579
|
globals: SanitizedGlobalConfig[];
|
|
591
580
|
i18n: Required<I18nOptions>;
|
|
@@ -595,6 +584,12 @@ export type SanitizedConfig = Omit<DeepRequired<Config>, 'collections' | 'endpoi
|
|
|
595
584
|
configDir: string;
|
|
596
585
|
rawConfig: string;
|
|
597
586
|
};
|
|
587
|
+
upload: ExpressFileUploadOptions & {
|
|
588
|
+
/**
|
|
589
|
+
* Deduped list of adapters used in the project
|
|
590
|
+
*/
|
|
591
|
+
adapters: string[];
|
|
592
|
+
};
|
|
598
593
|
};
|
|
599
594
|
export type EditConfig = ({
|
|
600
595
|
/**
|
|
@@ -616,8 +611,10 @@ export type EditConfig = ({
|
|
|
616
611
|
} | {
|
|
617
612
|
[key: string]: EditViewConfig;
|
|
618
613
|
}) | EditViewComponent;
|
|
619
|
-
export type EntityDescriptionComponent =
|
|
620
|
-
export type EntityDescriptionFunction = (
|
|
621
|
-
|
|
622
|
-
|
|
614
|
+
export type EntityDescriptionComponent = CustomComponent;
|
|
615
|
+
export type EntityDescriptionFunction = ({ t }: {
|
|
616
|
+
t: TFunction;
|
|
617
|
+
}) => string;
|
|
618
|
+
export type EntityDescription = EntityDescriptionFunction | Record<string, string> | string;
|
|
619
|
+
export type { EmailAdapter, SendEmailOptions };
|
|
623
620
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/config/types.ts"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAA;AACtE,OAAO,KAAK,EAAE,OAAO,IAAI,wBAAwB,EAAE,MAAM,oBAAoB,CAAA;AAC7E,OAAO,KAAK,OAAO,MAAM,SAAS,CAAA;AAClC,OAAO,KAA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asTransport(emailConfig) {
|
|
5
|
-
return emailConfig.transport !== undefined;
|
|
6
|
-
}
|
|
7
|
-
/**
|
|
8
|
-
* type guard for EmailOptions
|
|
9
|
-
* @param emailConfig
|
|
10
|
-
*/ export function hasTransportOptions(emailConfig) {
|
|
11
|
-
return emailConfig.transportOptions !== undefined;
|
|
12
|
-
}
|
|
1
|
+
export const serverProps = [
|
|
2
|
+
'payload'
|
|
3
|
+
];
|
|
13
4
|
|
|
14
5
|
//# sourceMappingURL=types.js.map
|
package/dist/config/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/config/types.ts"],"sourcesContent":["import type { I18nOptions, TFunction } from '@payloadcms/translations'\nimport type { Options as ExpressFileUploadOptions } from 'express-fileupload'\nimport type GraphQL from 'graphql'\nimport type { Transporter } from 'nodemailer'\nimport type SMTPConnection from 'nodemailer/lib/smtp-connection'\nimport type { DestinationStream, LoggerOptions } from 'pino'\nimport type React from 'react'\nimport type { default as sharp } from 'sharp'\nimport type { DeepRequired } from 'ts-essentials'\n\nimport type { DocumentTab, RichTextAdapter } from '../admin/types.js'\nimport type { AdminView, ServerSideEditViewProps } from '../admin/views/types.js'\nimport type { User } from '../auth/types.js'\nimport type {\n AfterErrorHook,\n Collection,\n CollectionConfig,\n SanitizedCollectionConfig,\n} from '../collections/config/types.js'\nimport type { DatabaseAdapterResult } from '../database/types.js'\nimport type { GlobalConfig, Globals, SanitizedGlobalConfig } from '../globals/config/types.js'\nimport type { Payload } from '../index.js'\nimport type { PayloadRequest, Where } from '../types/index.js'\nimport type { PayloadLogger } from '../utilities/logger.js'\n\nexport type BinScriptConfig = {\n key: string\n scriptPath: string\n}\n\nexport type BinScript = (config: SanitizedConfig) => Promise<void> | void\n\ntype Prettify<T> = {\n [K in keyof T]: T[K]\n} & NonNullable<unknown>\n\ntype Email = {\n fromAddress: string\n fromName: string\n logMockCredentials?: boolean\n}\n\n// eslint-disable-next-line no-use-before-define\nexport type Plugin = (config: Config) => Config | Promise<Config>\n\nexport type LivePreviewConfig = {\n /**\n Device breakpoints to use for the `iframe` of the Live Preview window.\n Options are displayed in the Live Preview toolbar.\n The `responsive` breakpoint is included by default.\n */\n breakpoints?: {\n height: number | string\n label: string\n name: string\n width: number | string\n }[]\n /**\n The URL of the frontend application. This will be rendered within an `iframe` as its `src`.\n Payload will send a `window.postMessage()` to this URL with the document data in real-time.\n The frontend application is responsible for receiving the message and updating the UI accordingly.\n Use the `useLivePreview` hook to get started in React applications.\n */\n url?:\n | ((args: {\n collectionConfig?: SanitizedCollectionConfig\n data: Record<string, any>\n globalConfig?: SanitizedGlobalConfig\n locale: Locale\n payload: Payload\n }) => Promise<string> | string)\n | string\n}\n\nexport type ServerOnlyLivePreviewProperties = keyof Pick<LivePreviewConfig, 'url'>\n\ntype GeneratePreviewURLOptions = {\n locale: string\n token: string\n}\n\nexport type GeneratePreviewURL = (\n doc: Record<string, unknown>,\n options: GeneratePreviewURLOptions,\n) => Promise<null | string> | null | string\n\nexport type EmailTransport = Email & {\n transport: Transporter\n transportOptions?: SMTPConnection.Options\n}\n\nexport type EmailTransportOptions = Email & {\n transport?: Transporter\n transportOptions: SMTPConnection.Options\n}\n\nexport type EmailOptions = Email | EmailTransport | EmailTransportOptions\n\n/**\n * type guard for EmailOptions\n * @param emailConfig\n */\nexport function hasTransport(emailConfig: EmailOptions): emailConfig is EmailTransport {\n return (emailConfig as EmailTransport).transport !== undefined\n}\n\n/**\n * type guard for EmailOptions\n * @param emailConfig\n */\nexport function hasTransportOptions(\n emailConfig: EmailOptions,\n): emailConfig is EmailTransportOptions {\n return (emailConfig as EmailTransportOptions).transportOptions !== undefined\n}\n\nexport type GraphQLInfo = {\n Mutation: {\n fields: Record<string, any>\n name: string\n }\n Query: {\n fields: Record<string, any>\n name: string\n }\n collections: {\n [slug: number | string | symbol]: Collection\n }\n globals: Globals\n types: {\n arrayTypes: Record<string, GraphQL.GraphQLType>\n blockInputTypes: Record<string, GraphQL.GraphQLInputObjectType>\n blockTypes: Record<string, GraphQL.GraphQLObjectType>\n fallbackLocaleInputType?: GraphQL.GraphQLEnumType | GraphQL.GraphQLScalarType\n groupTypes: Record<string, GraphQL.GraphQLObjectType>\n localeInputType?: GraphQL.GraphQLEnumType | GraphQL.GraphQLScalarType\n tabTypes: Record<string, GraphQL.GraphQLObjectType>\n }\n}\nexport type GraphQLExtension = (\n graphQL: typeof GraphQL,\n context: {\n config: SanitizedConfig\n } & GraphQLInfo,\n) => Record<string, unknown>\n\nexport type InitOptions = {\n /**\n * Sometimes, with the local API, you might need to pass a config file directly, for example, serverless on Vercel\n * The passed config should match the config file, and if it doesn't, there could be mismatches between the admin UI\n * and the backend functionality\n */\n config: Promise<SanitizedConfig> | SanitizedConfig\n /**\n * Disable connect to the database on init\n */\n disableDBConnect?: boolean\n\n /**\n * Disable running of the `onInit` function\n */\n disableOnInit?: boolean\n\n /**\n * Configuration for Payload's email functionality\n *\n * @see https://payloadcms.com/docs/email/overview\n */\n email?: EmailOptions\n\n /**\n * A previously instantiated logger instance. Must conform to the PayloadLogger interface which uses Pino\n * This allows you to bring your own logger instance and let payload use it\n */\n logger?: PayloadLogger\n\n loggerDestination?: DestinationStream\n\n /**\n * Specify options for the built-in Pino logger that Payload uses for internal logging.\n *\n * See Pino Docs for options: https://getpino.io/#/docs/api?id=options\n */\n loggerOptions?: LoggerOptions\n /**\n * A function that is called immediately following startup that receives the Payload instance as it's only argument.\n */\n onInit?: (payload: Payload) => Promise<void> | void\n}\n\n/**\n * This result is calculated on the server\n * and then sent to the client allowing the dashboard to show accessible data and actions.\n *\n * If the result is `true`, the user has access.\n * If the result is an object, it is interpreted as a MongoDB query.\n *\n * @example `{ createdBy: { equals: id } }`\n *\n * @example `{ tenant: { in: tenantIds } }`\n *\n * @see https://payloadcms.com/docs/access-control/overview\n */\nexport type AccessResult = Where | boolean\n\nexport type AccessArgs<T = any, U = any> = {\n /**\n * The relevant resource that is being accessed.\n *\n * `data` is null when a list is requested\n */\n data?: T\n /** ID of the resource being accessed */\n id?: number | string\n /** If true, the request is for a static file */\n isReadingStaticFile?: boolean\n /** The original request that requires an access check */\n req: PayloadRequest<U>\n}\n\n/**\n * Access function runs on the server\n * and is sent to the client allowing the dashboard to show accessible data and actions.\n *\n * @see https://payloadcms.com/docs/access-control/overview\n */\nexport type Access<T = any, U = any> = (\n args: AccessArgs<T, U>,\n) => AccessResult | Promise<AccessResult>\n\n/** Web Request/Response model, but the the req has more payload specific properties added to it. */\nexport type PayloadHandler = (req: PayloadRequest) => Promise<Response> | Response\n\n/**\n * Docs: https://payloadcms.com/docs/rest-api/overview#custom-endpoints\n */\nexport type Endpoint<U = User> = {\n /** Extension point to add your custom data. */\n custom?: Record<string, any>\n\n /**\n * Middleware that will be called when the path/method matches\n *\n * Compatible with Web Request/Response Model\n */\n handler: PayloadHandler\n /** HTTP method (or \"all\") */\n method: 'connect' | 'delete' | 'get' | 'head' | 'options' | 'patch' | 'post' | 'put'\n /**\n * Pattern that should match the path of the incoming request\n *\n * Compatible with the Express router\n */\n path: string\n /**\n * Please add \"root\" routes under the /api folder in the Payload Project.\n * https://nextjs.org/docs/app/api-reference/file-conventions/route\n *\n * @deprecated in 3.0\n */\n root?: never\n}\n\nexport type EditViewComponent = React.ComponentType<ServerSideEditViewProps>\n\nexport type EditViewConfig =\n | {\n /**\n * Add a new Edit view to the admin panel\n * i.e. you can render a custom view that has no tab, if desired\n * Or override a specific properties of an existing one\n * i.e. you can customize the `Default` view tab label, if desired\n */\n Tab?: DocumentTab\n path?: string\n }\n | {\n Component: EditViewComponent\n path: string\n }\n | {\n actions?: React.ComponentType<any>[]\n }\n\n/**\n * Override existing views\n * i.e. Dashboard, Account, API, LivePreview, etc.\n * Path is not available here\n * All Tab properties become optional\n * i.e. you can change just the label, if desired\n */\nexport type EditView = EditViewComponent | EditViewConfig\n\nexport type Locale = {\n /**\n * value of supported locale\n * @example \"en\"\n */\n code: string\n /**\n * Code of another locale to use when reading documents with fallback, if not specified defaultLocale is used\n */\n fallbackLocale?: string\n /**\n * label of supported locale\n * @example \"English\"\n */\n label: Record<string, string> | string\n /**\n * if true, defaults textAligmnent on text fields to RTL\n */\n rtl?: boolean\n}\n\nexport type BaseLocalizationConfig = {\n /**\n * Locale for users that have not expressed their preference for a specific locale\n * @example `\"en\"`\n */\n defaultLocale: string\n /** Set to `true` to let missing values in localised fields fall back to the values in `defaultLocale` */\n fallback?: boolean\n}\n\nexport type LocalizationConfigWithNoLabels = Prettify<\n BaseLocalizationConfig & {\n /**\n * List of supported locales\n * @example `[\"en\", \"es\", \"fr\", \"nl\", \"de\", \"jp\"]`\n */\n locales: string[]\n }\n>\n\nexport type LocalizationConfigWithLabels = Prettify<\n BaseLocalizationConfig & {\n /**\n * List of supported locales with labels\n * @example {\n * label: 'English',\n * value: 'en',\n * rtl: false\n * }\n */\n locales: Locale[]\n }\n>\n\nexport type SanitizedLocalizationConfig = Prettify<\n LocalizationConfigWithLabels & {\n /**\n * List of supported locales\n * @example `[\"en\", \"es\", \"fr\", \"nl\", \"de\", \"jp\"]`\n */\n localeCodes: string[]\n }\n>\n\n/**\n * @see https://payloadcms.com/docs/configuration/localization#localization\n */\nexport type LocalizationConfig = Prettify<\n LocalizationConfigWithLabels | LocalizationConfigWithNoLabels\n>\n\nexport type LabelFunction = ({ t }: { t: TFunction }) => string\n\nexport type SharpDependency = (\n input?:\n | ArrayBuffer\n | Buffer\n | Float32Array\n | Float64Array\n | Int8Array\n | Int16Array\n | Int32Array\n | Uint8Array\n | Uint8ClampedArray\n | Uint16Array\n | Uint32Array\n | string,\n options?: sharp.SharpOptions,\n) => sharp.Sharp\n\n/**\n * This is the central configuration\n *\n * @see https://payloadcms.com/docs/configuration/overview\n */\nexport type Config = {\n /** Configure admin dashboard */\n admin?: {\n /** Automatically log in as a user when visiting the admin dashboard. */\n autoLogin?:\n | {\n /**\n * The email address of the user to login as\n *\n */\n email: string\n /** The password of the user to login as */\n password: string\n /**\n * If set to true, the login credentials will be prefilled but the user will still need to click the login button.\n *\n * @default false\n */\n prefillOnly?: boolean\n }\n | false\n\n /** Set account profile picture. Options: gravatar, default or a custom React component. */\n avatar?: 'default' | 'gravatar' | React.ComponentType<any>\n /**\n * Add extra and/or replace built-in components with custom components\n *\n * @see https://payloadcms.com/docs/admin/components\n */\n components?: {\n /**\n * Replace the navigation with a custom component\n */\n Nav?: React.ComponentType<any>\n /**\n * Add custom components to the top right of the Admin Panel\n */\n actions?: React.ComponentType<any>[]\n /**\n * Add custom components after the collection overview\n */\n afterDashboard?: React.ComponentType<any>[]\n /**\n * Add custom components after the email/password field\n */\n afterLogin?: React.ComponentType<any>[]\n /**\n * Add custom components after the navigation links\n */\n afterNavLinks?: React.ComponentType<any>[]\n /**\n * Add custom components before the collection overview\n */\n beforeDashboard?: React.ComponentType<any>[]\n /**\n * Add custom components before the email/password field\n */\n beforeLogin?: React.ComponentType<any>[]\n /**\n * Add custom components before the navigation links\n */\n beforeNavLinks?: React.ComponentType<any>[]\n /** Replace graphical components */\n graphics?: {\n /** Replace the icon in the navigation */\n Icon?: React.ComponentType<any>\n /** Replace the logo on the login page */\n Logo?: React.ComponentType<any>\n }\n /** Replace logout related components */\n logout?: {\n /** Replace the logout button */\n Button?: React.ComponentType<any>\n }\n /**\n * Wrap the admin dashboard in custom context providers\n */\n providers?: React.ComponentType<{ children?: React.ReactNode }>[]\n /**\n * Replace or modify top-level admin routes, or add new ones:\n * + `Account` - `/admin/account`\n * + `Dashboard` - `/admin`\n * + `:path` - `/admin/:path`\n */\n views?: {\n /** Add custom admin views */\n [key: string]: AdminView\n /** Replace the account screen */\n Account?: AdminView\n /** Replace the admin homepage */\n Dashboard?: AdminView\n }\n }\n /** Global date format that will be used for all dates in the Admin panel. Any valid date-fns format pattern can be used. */\n dateFormat?: string\n /** If set to true, the entire Admin panel will be disabled. */\n disable?: boolean\n /** The route the user will be redirected to after being inactive for too long. */\n inactivityRoute?: string\n livePreview?: LivePreviewConfig & {\n collections?: string[]\n globals?: string[]\n }\n /** The route for the logout page. */\n logoutRoute?: string\n /** Base meta data to use for the Admin panel. Included properties are titleSuffix, ogImage, and favicon. */\n meta?: {\n /**\n * Public path to an icon\n *\n * This image may be displayed in the browser next to the title of the page\n */\n favicon?: string\n /**\n * Public path to an image\n *\n * This image may be displayed as preview when the link is shared on social media\n */\n ogImage?: string\n /**\n * String to append to the <title> of admin pages\n * @example `\" - My Brand\"`\n */\n titleSuffix?: string\n }\n /** The slug of a Collection that you want be used to log in to the Admin dashboard. */\n user?: string\n }\n /** Custom Payload bin scripts can be injected via the config. */\n bin?: BinScriptConfig[]\n /**\n * Manage the datamodel of your application\n *\n * @see https://payloadcms.com/docs/configuration/collections#collection-configs\n */\n collections?: CollectionConfig[]\n /**\n * Replace the built-in components with custom ones\n */\n components?: { [key: string]: (() => JSX.Element) | JSX.Element }\n /**\n * Prefix a string to all cookies that Payload sets.\n *\n * @default \"payload\"\n */\n cookiePrefix?: string\n /** Either a whitelist array of URLS to allow CORS requests from, or a wildcard string ('*') to accept incoming requests from any domain. */\n cors?: '*' | string[]\n /** A whitelist array of URLs to allow Payload cookies to be accepted from as a form of CSRF protection. */\n csrf?: string[]\n\n /** Extension point to add your custom data. */\n custom?: Record<string, any>\n\n /** Pass in a database adapter for use on this project. */\n db: DatabaseAdapterResult\n /** Enable to expose more detailed error information. */\n debug?: boolean\n /**\n * If a user does not specify `depth` while requesting a resource, this depth will be used.\n *\n * @see https://payloadcms.com/docs/getting-started/concepts#depth\n *\n * @default 2\n */\n defaultDepth?: number\n /**\n * The maximum allowed depth to be permitted application-wide. This setting helps prevent against malicious queries.\n *\n * @default 40000\n */\n defaultMaxTextLength?: number\n /** Default richtext editor to use for richText fields */\n editor: RichTextAdapter<any, any, any>\n /**\n * Email configuration options. This value is overridden by `email` in Payload.init if passed.\n *\n * @see https://payloadcms.com/docs/email/overview\n */\n email?: EmailOptions\n /** Custom REST endpoints */\n endpoints?: Endpoint[]\n /**\n * @see https://payloadcms.com/docs/configuration/globals#global-configs\n */\n globals?: GlobalConfig[]\n /**\n * Manage the GraphQL API\n *\n * You can add your own GraphQL queries and mutations to Payload, making use of all the types that Payload has defined for you.\n *\n * @see https://payloadcms.com/docs/graphql/overview\n */\n graphQL?: {\n disable?: boolean\n disablePlaygroundInProduction?: boolean\n maxComplexity?: number\n /**\n * Function that returns an object containing keys to custom GraphQL mutations\n *\n * @see https://payloadcms.com/docs/graphql/extending\n */\n mutations?: GraphQLExtension\n /**\n * Function that returns an object containing keys to custom GraphQL queries\n *\n * @see https://payloadcms.com/docs/graphql/extending\n */\n queries?: GraphQLExtension\n }\n /**\n * Tap into Payload-wide hooks.\n *\n * @see https://payloadcms.com/docs/hooks/overview\n */\n hooks?: {\n afterError?: AfterErrorHook\n }\n /** i18n config settings */\n i18n?: I18nOptions\n /** Automatically index all sortable top-level fields in the database to improve sort performance and add database compatibility for Azure Cosmos and similar. */\n indexSortableFields?: boolean\n /**\n * Translate your content to different languages/locales.\n *\n * @default false // disable localization\n */\n localization?: LocalizationConfig | false\n /**\n * The maximum allowed depth to be permitted application-wide. This setting helps prevent against malicious queries.\n *\n * @see https://payloadcms.com/docs/getting-started/concepts#depth\n *\n * @default 10\n */\n maxDepth?: number\n /** A function that is called immediately following startup that receives the Payload instance as its only argument. */\n onInit?: (payload: Payload) => Promise<void> | void\n /**\n * An array of Payload plugins.\n *\n * @see https://payloadcms.com/docs/plugins/overview\n */\n plugins?: Plugin[]\n /** Control the routing structure that Payload binds itself to. */\n routes?: {\n /** @default \"/admin\" */\n admin?: string\n /** @default \"/api\" */\n api?: string\n /** @default \"/graphql\" */\n graphQL?: string\n /** @default \"/graphql-playground\" */\n graphQLPlayground?: string\n }\n /** Secure string that Payload will use for any encryption workflows */\n secret: string\n /**\n * Define the absolute URL of your app including the protocol, for example `https://example.org`.\n * No paths allowed, only protocol, domain and (optionally) port.\n *\n * @see https://payloadcms.com/docs/configuration/overview#options\n */\n serverURL?: string\n /**\n * Pass in a local copy of Sharp if you'd like to use it.\n *\n */\n sharp?: SharpDependency\n /** Send anonymous telemetry data about general usage. */\n telemetry?: boolean\n /** Control how typescript interfaces are generated from your collections. */\n typescript?: {\n /** Disable declare block in generated types file */\n declare?: false\n /** Filename to write the generated types to */\n outputFile?: string\n }\n /**\n * Customize the handling of incoming file uploads for collections that have uploads enabled.\n */\n upload?: ExpressFileUploadOptions\n}\n\nexport type SanitizedConfig = Omit<\n DeepRequired<Config>,\n 'collections' | 'endpoint' | 'globals' | 'i18n' | 'localization'\n> & {\n collections: SanitizedCollectionConfig[]\n endpoints: Endpoint[]\n globals: SanitizedGlobalConfig[]\n i18n: Required<I18nOptions>\n localization: SanitizedLocalizationConfig | false\n paths: {\n config: string\n configDir: string\n rawConfig: string\n }\n}\n\nexport type EditConfig =\n | (\n | {\n /**\n * Replace or modify individual nested routes, or add new ones:\n * + `Default` - `/admin/collections/:collection/:id`\n * + `API` - `/admin/collections/:collection/:id/api`\n * + `LivePreview` - `/admin/collections/:collection/:id/preview`\n * + `References` - `/admin/collections/:collection/:id/references`\n * + `Relationships` - `/admin/collections/:collection/:id/relationships`\n * + `Versions` - `/admin/collections/:collection/:id/versions`\n * + `Version` - `/admin/collections/:collection/:id/versions/:version`\n * + `CustomView` - `/admin/collections/:collection/:id/:path`\n */\n API?: EditViewComponent | Partial<EditViewConfig>\n Default?: EditViewComponent | Partial<EditViewConfig>\n LivePreview?: EditViewComponent | Partial<EditViewConfig>\n Version?: EditViewComponent | Partial<EditViewConfig>\n Versions?: EditViewComponent | Partial<EditViewConfig>\n // TODO: uncomment these as they are built\n // References?: EditView\n // Relationships?: EditView\n }\n | {\n [key: string]: EditViewConfig\n }\n )\n | EditViewComponent\n\nexport type EntityDescriptionComponent = React.ComponentType<any>\n\nexport type EntityDescriptionFunction = () => string\n\nexport type EntityDescription =\n | EntityDescriptionComponent\n | EntityDescriptionFunction\n | Record<string, string>\n | string\n"],"names":["hasTransport","emailConfig","transport","undefined","hasTransportOptions","transportOptions"],"rangeMappings":";;;;;;;;;;;","mappings":"AAkGA;;;CAGC,GACD,OAAO,SAASA,aAAaC,WAAyB;IACpD,OAAO,AAACA,YAA+BC,SAAS,KAAKC;AACvD;AAEA;;;CAGC,GACD,OAAO,SAASC,oBACdH,WAAyB;IAEzB,OAAO,AAACA,YAAsCI,gBAAgB,KAAKF;AACrE"}
|
|
1
|
+
{"version":3,"sources":["../../src/config/types.ts"],"sourcesContent":["import type { I18nOptions, TFunction } from '@payloadcms/translations'\nimport type { Options as ExpressFileUploadOptions } from 'express-fileupload'\nimport type GraphQL from 'graphql'\nimport type { DestinationStream, LoggerOptions, P } from 'pino'\nimport type React from 'react'\nimport type { default as sharp } from 'sharp'\nimport type { DeepRequired } from 'ts-essentials'\n\nimport type { RichTextAdapterProvider } from '../admin/RichText.js'\nimport type { DocumentTab, RichTextAdapter } from '../admin/types.js'\nimport type { AdminView, ServerSideEditViewProps } from '../admin/views/types.js'\nimport type { User } from '../auth/types.js'\nimport type {\n AfterErrorHook,\n Collection,\n CollectionConfig,\n SanitizedCollectionConfig,\n} from '../collections/config/types.js'\nimport type { DatabaseAdapterResult } from '../database/types.js'\nimport type { EmailAdapter, SendEmailOptions } from '../email/types.js'\nimport type { GlobalConfig, Globals, SanitizedGlobalConfig } from '../globals/config/types.js'\nimport type { Payload } from '../index.js'\nimport type { PayloadRequest, PayloadRequestWithData, Where } from '../types/index.js'\nimport type { PayloadLogger } from '../utilities/logger.js'\n\nexport type BinScriptConfig = {\n key: string\n scriptPath: string\n}\n\nexport type BinScript = (config: SanitizedConfig) => Promise<void> | void\n\ntype Prettify<T> = {\n [K in keyof T]: T[K]\n} & NonNullable<unknown>\n\n// eslint-disable-next-line no-use-before-define\nexport type Plugin = (config: Config) => Config | Promise<Config>\n\nexport type LivePreviewConfig = {\n /**\n Device breakpoints to use for the `iframe` of the Live Preview window.\n Options are displayed in the Live Preview toolbar.\n The `responsive` breakpoint is included by default.\n */\n breakpoints?: {\n height: number | string\n label: string\n name: string\n width: number | string\n }[]\n /**\n The URL of the frontend application. This will be rendered within an `iframe` as its `src`.\n Payload will send a `window.postMessage()` to this URL with the document data in real-time.\n The frontend application is responsible for receiving the message and updating the UI accordingly.\n Use the `useLivePreview` hook to get started in React applications.\n */\n url?:\n | ((args: {\n collectionConfig?: SanitizedCollectionConfig\n data: Record<string, any>\n globalConfig?: SanitizedGlobalConfig\n locale: Locale\n payload: Payload\n }) => Promise<string> | string)\n | string\n}\n\nexport type ServerOnlyLivePreviewProperties = keyof Pick<LivePreviewConfig, 'url'>\n\ntype GeneratePreviewURLOptions = {\n locale: string\n req: PayloadRequestWithData\n token: null | string\n}\n\nexport type GeneratePreviewURL = (\n doc: Record<string, unknown>,\n options: GeneratePreviewURLOptions,\n) => Promise<null | string> | null | string\n\nexport type GraphQLInfo = {\n Mutation: {\n fields: Record<string, any>\n name: string\n }\n Query: {\n fields: Record<string, any>\n name: string\n }\n collections: {\n [slug: number | string | symbol]: Collection\n }\n globals: Globals\n types: {\n arrayTypes: Record<string, GraphQL.GraphQLType>\n blockInputTypes: Record<string, GraphQL.GraphQLInputObjectType>\n blockTypes: Record<string, GraphQL.GraphQLObjectType>\n fallbackLocaleInputType?: GraphQL.GraphQLEnumType | GraphQL.GraphQLScalarType\n groupTypes: Record<string, GraphQL.GraphQLObjectType>\n localeInputType?: GraphQL.GraphQLEnumType | GraphQL.GraphQLScalarType\n tabTypes: Record<string, GraphQL.GraphQLObjectType>\n }\n}\nexport type GraphQLExtension = (\n graphQL: typeof GraphQL,\n context: {\n config: SanitizedConfig\n } & GraphQLInfo,\n) => Record<string, unknown>\n\nexport type InitOptions = {\n /**\n * Sometimes, with the local API, you might need to pass a config file directly, for example, serverless on Vercel\n * The passed config should match the config file, and if it doesn't, there could be mismatches between the admin UI\n * and the backend functionality\n */\n config: Promise<SanitizedConfig> | SanitizedConfig\n /**\n * Disable connect to the database on init\n */\n disableDBConnect?: boolean\n\n /**\n * Disable running of the `onInit` function\n */\n disableOnInit?: boolean\n\n /**\n * A previously instantiated logger instance. Must conform to the PayloadLogger interface which uses Pino\n * This allows you to bring your own logger instance and let payload use it\n */\n logger?: PayloadLogger\n\n loggerDestination?: DestinationStream\n\n /**\n * Specify options for the built-in Pino logger that Payload uses for internal logging.\n *\n * See Pino Docs for options: https://getpino.io/#/docs/api?id=options\n */\n loggerOptions?: LoggerOptions\n /**\n * A function that is called immediately following startup that receives the Payload instance as it's only argument.\n */\n onInit?: (payload: Payload) => Promise<void> | void\n}\n\n/**\n * This result is calculated on the server\n * and then sent to the client allowing the dashboard to show accessible data and actions.\n *\n * If the result is `true`, the user has access.\n * If the result is an object, it is interpreted as a MongoDB query.\n *\n * @example `{ createdBy: { equals: id } }`\n *\n * @example `{ tenant: { in: tenantIds } }`\n *\n * @see https://payloadcms.com/docs/access-control/overview\n */\nexport type AccessResult = Where | boolean\n\nexport type AccessArgs<T = any, U = any> = {\n /**\n * The relevant resource that is being accessed.\n *\n * `data` is null when a list is requested\n */\n data?: T\n /** ID of the resource being accessed */\n id?: number | string\n /** If true, the request is for a static file */\n isReadingStaticFile?: boolean\n /** The original request that requires an access check */\n req: PayloadRequestWithData<U>\n}\n\n/**\n * Access function runs on the server\n * and is sent to the client allowing the dashboard to show accessible data and actions.\n *\n * @see https://payloadcms.com/docs/access-control/overview\n */\nexport type Access<T = any, U = any> = (\n args: AccessArgs<T, U>,\n) => AccessResult | Promise<AccessResult>\n\n/** Web Request/Response model, but the the req has more payload specific properties added to it. */\nexport type PayloadHandler = (req: PayloadRequest) => Promise<Response> | Response\n\n/**\n * Docs: https://payloadcms.com/docs/rest-api/overview#custom-endpoints\n */\nexport type Endpoint<U = User> = {\n /** Extension point to add your custom data. */\n custom?: Record<string, any>\n\n /**\n * Middleware that will be called when the path/method matches\n *\n * Compatible with Web Request/Response Model\n */\n handler: PayloadHandler\n /** HTTP method (or \"all\") */\n method: 'connect' | 'delete' | 'get' | 'head' | 'options' | 'patch' | 'post' | 'put'\n /**\n * Pattern that should match the path of the incoming request\n *\n * Compatible with the Express router\n */\n path: string\n /**\n * Please add \"root\" routes under the /api folder in the Payload Project.\n * https://nextjs.org/docs/app/api-reference/file-conventions/route\n *\n * @deprecated in 3.0\n */\n root?: never\n}\n\nexport type EditViewComponent = React.ComponentType<ServerSideEditViewProps>\n\nexport type EditViewConfig =\n | {\n /**\n * Add a new Edit view to the admin panel\n * i.e. you can render a custom view that has no tab, if desired\n * Or override a specific properties of an existing one\n * i.e. you can customize the `Default` view tab label, if desired\n */\n Tab?: DocumentTab\n path?: string\n }\n | {\n Component: EditViewComponent\n path: string\n }\n | {\n actions?: CustomComponent[]\n }\n\n/**\n * Override existing views\n * i.e. Dashboard, Account, API, LivePreview, etc.\n * Path is not available here\n * All Tab properties become optional\n * i.e. you can change just the label, if desired\n */\nexport type EditView = EditViewComponent | EditViewConfig\n\nexport type ServerProps = {\n payload: Payload\n}\n\nexport const serverProps: (keyof ServerProps)[] = ['payload']\n\nexport type CustomComponent<T extends any = any> = React.ComponentType<T & ServerProps>\n\nexport type Locale = {\n /**\n * value of supported locale\n * @example \"en\"\n */\n code: string\n /**\n * Code of another locale to use when reading documents with fallback, if not specified defaultLocale is used\n */\n fallbackLocale?: string\n /**\n * label of supported locale\n * @example \"English\"\n */\n label: Record<string, string> | string\n /**\n * if true, defaults textAligmnent on text fields to RTL\n */\n rtl?: boolean\n}\n\nexport type BaseLocalizationConfig = {\n /**\n * Locale for users that have not expressed their preference for a specific locale\n * @example `\"en\"`\n */\n defaultLocale: string\n /** Set to `true` to let missing values in localised fields fall back to the values in `defaultLocale` */\n fallback?: boolean\n}\n\nexport type LocalizationConfigWithNoLabels = Prettify<\n BaseLocalizationConfig & {\n /**\n * List of supported locales\n * @example `[\"en\", \"es\", \"fr\", \"nl\", \"de\", \"jp\"]`\n */\n locales: string[]\n }\n>\n\nexport type LocalizationConfigWithLabels = Prettify<\n BaseLocalizationConfig & {\n /**\n * List of supported locales with labels\n * @example {\n * label: 'English',\n * value: 'en',\n * rtl: false\n * }\n */\n locales: Locale[]\n }\n>\n\nexport type SanitizedLocalizationConfig = Prettify<\n LocalizationConfigWithLabels & {\n /**\n * List of supported locales\n * @example `[\"en\", \"es\", \"fr\", \"nl\", \"de\", \"jp\"]`\n */\n localeCodes: string[]\n }\n>\n\n/**\n * @see https://payloadcms.com/docs/configuration/localization#localization\n */\nexport type LocalizationConfig = Prettify<\n LocalizationConfigWithLabels | LocalizationConfigWithNoLabels\n>\n\nexport type LabelFunction = ({ t }: { t: TFunction }) => string\n\nexport type SharpDependency = (\n input?:\n | ArrayBuffer\n | Buffer\n | Float32Array\n | Float64Array\n | Int8Array\n | Int16Array\n | Int32Array\n | Uint8Array\n | Uint8ClampedArray\n | Uint16Array\n | Uint32Array\n | string,\n options?: sharp.SharpOptions,\n) => sharp.Sharp\n\n/**\n * This is the central configuration\n *\n * @see https://payloadcms.com/docs/configuration/overview\n */\nexport type Config = {\n /** Configure admin dashboard */\n admin?: {\n /** Automatically log in as a user when visiting the admin dashboard. */\n autoLogin?:\n | {\n /**\n * The email address of the user to login as\n *\n */\n email: string\n /** The password of the user to login as */\n password: string\n /**\n * If set to true, the login credentials will be prefilled but the user will still need to click the login button.\n *\n * @default false\n */\n prefillOnly?: boolean\n }\n | false\n /** Set account profile picture. Options: gravatar, default or a custom React component. */\n avatar?: 'default' | 'gravatar' | React.ComponentType<any>\n\n /**\n * Add extra and/or replace built-in components with custom components\n *\n * @see https://payloadcms.com/docs/admin/components\n */\n components?: {\n /**\n * Replace the navigation with a custom component\n */\n Nav?: CustomComponent\n /**\n * Add custom components to the top right of the Admin Panel\n */\n actions?: CustomComponent[]\n /**\n * Add custom components after the collection overview\n */\n afterDashboard?: CustomComponent[]\n /**\n * Add custom components after the email/password field\n */\n afterLogin?: CustomComponent[]\n /**\n * Add custom components after the navigation links\n */\n afterNavLinks?: CustomComponent[]\n /**\n * Add custom components before the collection overview\n */\n beforeDashboard?: CustomComponent[]\n /**\n * Add custom components before the email/password field\n */\n beforeLogin?: CustomComponent[]\n /**\n * Add custom components before the navigation links\n */\n beforeNavLinks?: CustomComponent[]\n /** Replace graphical components */\n graphics?: {\n /** Replace the icon in the navigation */\n Icon?: CustomComponent\n /** Replace the logo on the login page */\n Logo?: CustomComponent\n }\n /** Replace logout related components */\n logout?: {\n /** Replace the logout button */\n Button?: CustomComponent\n }\n /**\n * Wrap the admin dashboard in custom context providers\n */\n providers?: React.ComponentType<{ children?: React.ReactNode }>[]\n /**\n * Replace or modify top-level admin routes, or add new ones:\n * + `Account` - `/admin/account`\n * + `Dashboard` - `/admin`\n * + `:path` - `/admin/:path`\n */\n views?: {\n /** Add custom admin views */\n [key: string]: AdminView\n /** Replace the account screen */\n Account?: AdminView\n /** Replace the admin homepage */\n Dashboard?: AdminView\n }\n }\n /** Extension point to add your custom data. Available in server and client. */\n custom?: Record<string, any>\n /** Global date format that will be used for all dates in the Admin panel. Any valid date-fns format pattern can be used. */\n dateFormat?: string\n /** If set to true, the entire Admin panel will be disabled. */\n disable?: boolean\n /** The route the user will be redirected to after being inactive for too long. */\n inactivityRoute?: string\n livePreview?: LivePreviewConfig & {\n collections?: string[]\n globals?: string[]\n }\n /** The route for the logout page. */\n logoutRoute?: string\n /** Base meta data to use for the Admin panel. Included properties are titleSuffix, ogImage, and favicon. */\n meta?: {\n /**\n * Public path to an icon\n *\n * This image may be displayed in the browser next to the title of the page\n */\n favicon?: string\n /**\n * Public path to an image\n *\n * This image may be displayed as preview when the link is shared on social media\n */\n ogImage?: string\n /**\n * String to append to the <title> of admin pages\n * @example `\" - My Brand\"`\n */\n titleSuffix?: string\n }\n /** The slug of a Collection that you want be used to log in to the Admin dashboard. */\n user?: string\n }\n /** Custom Payload bin scripts can be injected via the config. */\n bin?: BinScriptConfig[]\n /**\n * Manage the datamodel of your application\n *\n * @see https://payloadcms.com/docs/configuration/collections#collection-configs\n */\n collections?: CollectionConfig[]\n /**\n * Replace the built-in components with custom ones\n */\n components?: { [key: string]: (() => JSX.Element) | JSX.Element }\n /**\n * Prefix a string to all cookies that Payload sets.\n *\n * @default \"payload\"\n */\n cookiePrefix?: string\n /** Either a whitelist array of URLS to allow CORS requests from, or a wildcard string ('*') to accept incoming requests from any domain. */\n cors?: '*' | string[]\n /** A whitelist array of URLs to allow Payload cookies to be accepted from as a form of CSRF protection. */\n csrf?: string[]\n\n /** Extension point to add your custom data. Server only. */\n custom?: Record<string, any>\n\n /** Pass in a database adapter for use on this project. */\n db: DatabaseAdapterResult\n /** Enable to expose more detailed error information. */\n debug?: boolean\n /**\n * If a user does not specify `depth` while requesting a resource, this depth will be used.\n *\n * @see https://payloadcms.com/docs/getting-started/concepts#depth\n *\n * @default 2\n */\n defaultDepth?: number\n /**\n * The maximum allowed depth to be permitted application-wide. This setting helps prevent against malicious queries.\n *\n * @default 40000\n */\n defaultMaxTextLength?: number\n /** Default richtext editor to use for richText fields */\n editor: RichTextAdapterProvider<any, any, any>\n /**\n * Email Adapter\n *\n * @see https://payloadcms.com/docs/email/overview\n */\n email?: EmailAdapter | Promise<EmailAdapter>\n /** Custom REST endpoints */\n endpoints?: Endpoint[]\n /**\n * @see https://payloadcms.com/docs/configuration/globals#global-configs\n */\n globals?: GlobalConfig[]\n /**\n * Manage the GraphQL API\n *\n * You can add your own GraphQL queries and mutations to Payload, making use of all the types that Payload has defined for you.\n *\n * @see https://payloadcms.com/docs/graphql/overview\n */\n graphQL?: {\n disable?: boolean\n disablePlaygroundInProduction?: boolean\n maxComplexity?: number\n /**\n * Function that returns an object containing keys to custom GraphQL mutations\n *\n * @see https://payloadcms.com/docs/graphql/extending\n */\n mutations?: GraphQLExtension\n /**\n * Function that returns an object containing keys to custom GraphQL queries\n *\n * @see https://payloadcms.com/docs/graphql/extending\n */\n queries?: GraphQLExtension\n }\n /**\n * Tap into Payload-wide hooks.\n *\n * @see https://payloadcms.com/docs/hooks/overview\n */\n hooks?: {\n afterError?: AfterErrorHook\n }\n /** i18n config settings */\n i18n?: I18nOptions\n /** Automatically index all sortable top-level fields in the database to improve sort performance and add database compatibility for Azure Cosmos and similar. */\n indexSortableFields?: boolean\n /**\n * Translate your content to different languages/locales.\n *\n * @default false // disable localization\n */\n localization?: LocalizationConfig | false\n /**\n * The maximum allowed depth to be permitted application-wide. This setting helps prevent against malicious queries.\n *\n * @see https://payloadcms.com/docs/getting-started/concepts#depth\n *\n * @default 10\n */\n maxDepth?: number\n /** A function that is called immediately following startup that receives the Payload instance as its only argument. */\n onInit?: (payload: Payload) => Promise<void> | void\n /**\n * An array of Payload plugins.\n *\n * @see https://payloadcms.com/docs/plugins/overview\n */\n plugins?: Plugin[]\n /** Control the routing structure that Payload binds itself to. */\n routes?: {\n /** @default \"/admin\" */\n admin?: string\n /** @default \"/api\" */\n api?: string\n /** @default \"/graphql\" */\n graphQL?: string\n /** @default \"/graphql-playground\" */\n graphQLPlayground?: string\n }\n /** Secure string that Payload will use for any encryption workflows */\n secret: string\n /**\n * Define the absolute URL of your app including the protocol, for example `https://example.org`.\n * No paths allowed, only protocol, domain and (optionally) port.\n *\n * @see https://payloadcms.com/docs/configuration/overview#options\n */\n serverURL?: string\n /**\n * Pass in a local copy of Sharp if you'd like to use it.\n *\n */\n sharp?: SharpDependency\n /** Send anonymous telemetry data about general usage. */\n telemetry?: boolean\n /** Control how typescript interfaces are generated from your collections. */\n typescript?: {\n /** Disable declare block in generated types file */\n declare?:\n | {\n /**\n * @internal internal use only to allow for multiple declarations within a monorepo and suppress the \"Duplicate identifier GeneratedTypes\" error\n *\n * Adds a @ts-ignore flag above the GeneratedTypes interface declaration\n *\n * @default false\n */\n ignoreTSError?: boolean\n }\n | false\n /** Filename to write the generated types to */\n outputFile?: string\n }\n /**\n * Customize the handling of incoming file uploads for collections that have uploads enabled.\n */\n upload?: ExpressFileUploadOptions\n}\n\nexport type SanitizedConfig = Omit<\n DeepRequired<Config>,\n 'collections' | 'editor' | 'endpoint' | 'globals' | 'i18n' | 'localization' | 'upload'\n> & {\n collections: SanitizedCollectionConfig[]\n /** Default richtext editor to use for richText fields */\n editor: RichTextAdapter<any, any, any>\n endpoints: Endpoint[]\n globals: SanitizedGlobalConfig[]\n i18n: Required<I18nOptions>\n localization: SanitizedLocalizationConfig | false\n paths: {\n config: string\n configDir: string\n rawConfig: string\n }\n upload: ExpressFileUploadOptions & {\n /**\n * Deduped list of adapters used in the project\n */\n adapters: string[]\n }\n}\n\nexport type EditConfig =\n | (\n | {\n /**\n * Replace or modify individual nested routes, or add new ones:\n * + `Default` - `/admin/collections/:collection/:id`\n * + `API` - `/admin/collections/:collection/:id/api`\n * + `LivePreview` - `/admin/collections/:collection/:id/preview`\n * + `References` - `/admin/collections/:collection/:id/references`\n * + `Relationships` - `/admin/collections/:collection/:id/relationships`\n * + `Versions` - `/admin/collections/:collection/:id/versions`\n * + `Version` - `/admin/collections/:collection/:id/versions/:version`\n * + `CustomView` - `/admin/collections/:collection/:id/:path`\n */\n API?: EditViewComponent | Partial<EditViewConfig>\n Default?: EditViewComponent | Partial<EditViewConfig>\n LivePreview?: EditViewComponent | Partial<EditViewConfig>\n Version?: EditViewComponent | Partial<EditViewConfig>\n Versions?: EditViewComponent | Partial<EditViewConfig>\n // TODO: uncomment these as they are built\n // References?: EditView\n // Relationships?: EditView\n }\n | {\n [key: string]: EditViewConfig\n }\n )\n | EditViewComponent\n\nexport type EntityDescriptionComponent = CustomComponent\n\nexport type EntityDescriptionFunction = ({ t }: { t: TFunction }) => string\n\nexport type EntityDescription = EntityDescriptionFunction | Record<string, string> | string\n\nexport type { EmailAdapter, SendEmailOptions }\n"],"names":["serverProps"],"rangeMappings":";;","mappings":"AA+PA,OAAO,MAAMA,cAAqC;IAAC;CAAU,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/database/migrations/migrate.ts"],"sourcesContent":["/* eslint-disable no-restricted-syntax, no-await-in-loop */\nimport type {
|
|
1
|
+
{"version":3,"sources":["../../../src/database/migrations/migrate.ts"],"sourcesContent":["/* eslint-disable no-restricted-syntax, no-await-in-loop */\nimport type { PayloadRequestWithData } from '../../types/index.js'\nimport type { BaseDatabaseAdapter } from '../types.js'\n\nimport { commitTransaction } from '../../utilities/commitTransaction.js'\nimport { initTransaction } from '../../utilities/initTransaction.js'\nimport { killTransaction } from '../../utilities/killTransaction.js'\nimport { getMigrations } from './getMigrations.js'\nimport { readMigrationFiles } from './readMigrationFiles.js'\n\nexport async function migrate(this: BaseDatabaseAdapter): Promise<void> {\n const { payload } = this\n const migrationFiles = await readMigrationFiles({ payload })\n const { existingMigrations, latestBatch } = await getMigrations({ payload })\n\n const newBatch = latestBatch + 1\n\n // Execute 'up' function for each migration sequentially\n for (const migration of migrationFiles) {\n const existingMigration = existingMigrations.find(\n (existing) => existing.name === migration.name,\n )\n\n // Run migration if not found in database\n if (existingMigration) {\n continue // eslint-disable-line no-continue\n }\n\n const start = Date.now()\n const req = { payload } as PayloadRequestWithData\n\n payload.logger.info({ msg: `Migrating: ${migration.name}` })\n\n try {\n await initTransaction(req)\n await migration.up({ payload, req })\n payload.logger.info({ msg: `Migrated: ${migration.name} (${Date.now() - start}ms)` })\n await payload.create({\n collection: 'payload-migrations',\n data: {\n name: migration.name,\n batch: newBatch,\n },\n req,\n })\n await commitTransaction(req)\n } catch (err: unknown) {\n await killTransaction(req)\n payload.logger.error({ err, msg: `Error running migration ${migration.name}` })\n throw err\n }\n }\n}\n"],"names":["commitTransaction","initTransaction","killTransaction","getMigrations","readMigrationFiles","migrate","payload","migrationFiles","existingMigrations","latestBatch","newBatch","migration","existingMigration","find","existing","name","start","Date","now","req","logger","info","msg","up","create","collection","data","batch","err","error"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,yDAAyD,GAIzD,SAASA,iBAAiB,QAAQ,uCAAsC;AACxE,SAASC,eAAe,QAAQ,qCAAoC;AACpE,SAASC,eAAe,QAAQ,qCAAoC;AACpE,SAASC,aAAa,QAAQ,qBAAoB;AAClD,SAASC,kBAAkB,QAAQ,0BAAyB;AAE5D,OA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/database/migrations/migrateDown.ts"],"sourcesContent":["/* eslint-disable no-restricted-syntax, no-await-in-loop */\nimport type {
|
|
1
|
+
{"version":3,"sources":["../../../src/database/migrations/migrateDown.ts"],"sourcesContent":["/* eslint-disable no-restricted-syntax, no-await-in-loop */\nimport type { PayloadRequestWithData } from '../../types/index.js'\nimport type { BaseDatabaseAdapter } from '../types.js'\n\nimport { commitTransaction } from '../../utilities/commitTransaction.js'\nimport { initTransaction } from '../../utilities/initTransaction.js'\nimport { killTransaction } from '../../utilities/killTransaction.js'\nimport { getMigrations } from './getMigrations.js'\nimport { readMigrationFiles } from './readMigrationFiles.js'\n\nexport async function migrateDown(this: BaseDatabaseAdapter): Promise<void> {\n const { payload } = this\n const migrationFiles = await readMigrationFiles({ payload })\n\n const { existingMigrations, latestBatch } = await getMigrations({\n payload,\n })\n\n if (!existingMigrations?.length) {\n payload.logger.info({ msg: 'No migrations to rollback.' })\n return\n }\n\n payload.logger.info({\n msg: `Rolling back batch ${latestBatch} consisting of ${existingMigrations.length} migration(s).`,\n })\n\n const latestBatchMigrations = existingMigrations.filter(({ batch }) => batch === latestBatch)\n\n for (const migration of latestBatchMigrations) {\n const migrationFile = migrationFiles.find((m) => m.name === migration.name)\n if (!migrationFile) {\n throw new Error(`Migration ${migration.name} not found locally.`)\n }\n\n const start = Date.now()\n const req = { payload } as PayloadRequestWithData\n\n try {\n payload.logger.info({ msg: `Migrating down: ${migrationFile.name}` })\n await initTransaction(req)\n await migrationFile.down({ payload, req })\n payload.logger.info({\n msg: `Migrated down: ${migrationFile.name} (${Date.now() - start}ms)`,\n })\n // Waiting for implementation here\n await payload.delete({\n id: migration.id,\n collection: 'payload-migrations',\n req,\n })\n\n await commitTransaction(req)\n } catch (err: unknown) {\n await killTransaction(req)\n payload.logger.error({\n err,\n msg: `Error running migration ${migrationFile.name}`,\n })\n process.exit(1)\n }\n }\n}\n"],"names":["commitTransaction","initTransaction","killTransaction","getMigrations","readMigrationFiles","migrateDown","payload","migrationFiles","existingMigrations","latestBatch","length","logger","info","msg","latestBatchMigrations","filter","batch","migration","migrationFile","find","m","name","Error","start","Date","now","req","down","delete","id","collection","err","error","process","exit"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,yDAAyD,GAIzD,SAASA,iBAAiB,QAAQ,uCAAsC;AACxE,SAASC,eAAe,QAAQ,qCAAoC;AACpE,SAASC,eAAe,QAAQ,qCAAoC;AACpE,SAASC,aAAa,QAAQ,qBAAoB;AAClD,SAASC,kBAAkB,QAAQ,0BAAyB;AAE5D,OAAO,eAAeC;IACpB,MAAM,EAAEC,OAAO,EAAE,GAAG,IAAI;IACxB,MAAMC,iBAAiB,MAAMH,mBAAmB;QAAEE;IAAQ;IAE1D,MAAM,EAAEE,kBAAkB,EAAEC,WAAW,EAAE,GAAG,MAAMN,cAAc;QAC9DG;IACF;IAEA,IAAI,CAACE,oBAAoBE,QAAQ;QAC/BJ,QAAQK,MAAM,CAACC,IAAI,CAAC;YAAEC,KAAK;QAA6B;QACxD;IACF;IAEAP,QAAQK,MAAM,CAACC,IAAI,CAAC;QAClBC,KAAK,CAAC,mBAAmB,EAAEJ,YAAY,eAAe,EAAED,mBAAmBE,MAAM,CAAC,cAAc,CAAC;IACnG;IAEA,MAAMI,wBAAwBN,mBAAmBO,MAAM,CAAC,CAAC,EAAEC,KAAK,EAAE,GAAKA,UAAUP;IAEjF,KAAK,MAAMQ,aAAaH,sBAAuB;QAC7C,MAAMI,gBAAgBX,eAAeY,IAAI,CAAC,CAACC,IAAMA,EAAEC,IAAI,KAAKJ,UAAUI,IAAI;QAC1E,IAAI,CAACH,eAAe;YAClB,MAAM,IAAII,MAAM,CAAC,UAAU,EAAEL,UAAUI,IAAI,CAAC,mBAAmB,CAAC;QAClE;QAEA,MAAME,QAAQC,KAAKC,GAAG;QACtB,MAAMC,MAAM;YAAEpB;QAAQ;QAEtB,IAAI;YACFA,QAAQK,MAAM,CAACC,IAAI,CAAC;gBAAEC,KAAK,CAAC,gBAAgB,EAAEK,cAAcG,IAAI,CAAC,CAAC;YAAC;YACnE,MAAMpB,gBAAgByB;YACtB,MAAMR,cAAcS,IAAI,CAAC;gBAAErB;gBAASoB;YAAI;YACxCpB,QAAQK,MAAM,CAACC,IAAI,CAAC;gBAClBC,KAAK,CAAC,gBAAgB,EAAEK,cAAcG,IAAI,CAAC,EAAE,EAAEG,KAAKC,GAAG,KAAKF,MAAM,GAAG,CAAC;YACxE;YACA,kCAAkC;YAClC,MAAMjB,QAAQsB,MAAM,CAAC;gBACnBC,IAAIZ,UAAUY,EAAE;gBAChBC,YAAY;gBACZJ;YACF;YAEA,MAAM1B,kBAAkB0B;QAC1B,EAAE,OAAOK,KAAc;YACrB,MAAM7B,gBAAgBwB;YACtBpB,QAAQK,MAAM,CAACqB,KAAK,CAAC;gBACnBD;gBACAlB,KAAK,CAAC,wBAAwB,EAAEK,cAAcG,IAAI,CAAC,CAAC;YACtD;YACAY,QAAQC,IAAI,CAAC;QACf;IACF;AACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/database/migrations/migrateRefresh.ts"],"sourcesContent":["/* eslint-disable no-restricted-syntax, no-await-in-loop */\nimport type {
|
|
1
|
+
{"version":3,"sources":["../../../src/database/migrations/migrateRefresh.ts"],"sourcesContent":["/* eslint-disable no-restricted-syntax, no-await-in-loop */\nimport type { PayloadRequestWithData } from '../../types/index.js'\nimport type { BaseDatabaseAdapter } from '../types.js'\n\nimport { commitTransaction } from '../../utilities/commitTransaction.js'\nimport { initTransaction } from '../../utilities/initTransaction.js'\nimport { killTransaction } from '../../utilities/killTransaction.js'\nimport { getMigrations } from './getMigrations.js'\nimport { readMigrationFiles } from './readMigrationFiles.js'\n\n/**\n * Run all migration down functions before running up\n */\nexport async function migrateRefresh(this: BaseDatabaseAdapter) {\n const { payload } = this\n const migrationFiles = await readMigrationFiles({ payload })\n\n const { existingMigrations, latestBatch } = await getMigrations({\n payload,\n })\n\n if (!existingMigrations?.length) {\n payload.logger.info({ msg: 'No migrations to rollback.' })\n return\n }\n\n payload.logger.info({\n msg: `Rolling back batch ${latestBatch} consisting of ${existingMigrations.length} migration(s).`,\n })\n\n const req = { payload } as PayloadRequestWithData\n\n // Reverse order of migrations to rollback\n existingMigrations.reverse()\n\n for (const migration of existingMigrations) {\n try {\n const migrationFile = migrationFiles.find((m) => m.name === migration.name)\n if (!migrationFile) {\n throw new Error(`Migration ${migration.name} not found locally.`)\n }\n\n payload.logger.info({ msg: `Migrating down: ${migration.name}` })\n const start = Date.now()\n await initTransaction(req)\n await migrationFile.down({ payload, req })\n payload.logger.info({\n msg: `Migrated down: ${migration.name} (${Date.now() - start}ms)`,\n })\n await payload.delete({\n collection: 'payload-migrations',\n req,\n where: {\n name: {\n equals: migration.name,\n },\n },\n })\n } catch (err: unknown) {\n await killTransaction(req)\n let msg = `Error running migration ${migration.name}. Rolling back.`\n if (err instanceof Error) {\n msg += ` ${err.message}`\n }\n payload.logger.error({\n err,\n msg,\n })\n process.exit(1)\n }\n }\n\n // Run all migrate up\n for (const migration of migrationFiles) {\n payload.logger.info({ msg: `Migrating: ${migration.name}` })\n try {\n const start = Date.now()\n await initTransaction(req)\n await migration.up({ payload, req })\n await payload.create({\n collection: 'payload-migrations',\n data: {\n name: migration.name,\n executed: true,\n },\n req,\n })\n await commitTransaction(req)\n\n payload.logger.info({ msg: `Migrated: ${migration.name} (${Date.now() - start}ms)` })\n } catch (err: unknown) {\n await killTransaction(req)\n let msg = `Error running migration ${migration.name}. Rolling back.`\n if (err instanceof Error) {\n msg += ` ${err.message}`\n }\n payload.logger.error({\n err,\n msg,\n })\n process.exit(1)\n }\n }\n}\n"],"names":["commitTransaction","initTransaction","killTransaction","getMigrations","readMigrationFiles","migrateRefresh","payload","migrationFiles","existingMigrations","latestBatch","length","logger","info","msg","req","reverse","migration","migrationFile","find","m","name","Error","start","Date","now","down","delete","collection","where","equals","err","message","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KAAKC,GAAG,KAAKF,MAAM,GAAG,CAAC;YAAC;QACtF,EAAE,OAAOQ,KAAc;YACrB,MAAM5B,gBAAgBY;YACtB,IAAID,MAAM,CAAC,wBAAwB,EAAEG,UAAUI,IAAI,CAAC,eAAe,CAAC;YACpE,IAAIU,eAAeT,OAAO;gBACxBR,OAAO,CAAC,CAAC,EAAEiB,IAAIC,OAAO,CAAC,CAAC;YAC1B;YACAzB,QAAQK,MAAM,CAACqB,KAAK,CAAC;gBACnBF;gBACAjB;YACF;YACAoB,QAAQC,IAAI,CAAC;QACf;IACF;AACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/database/migrations/migrateReset.ts"],"sourcesContent":["/* eslint-disable no-restricted-syntax, no-await-in-loop */\nimport type {
|
|
1
|
+
{"version":3,"sources":["../../../src/database/migrations/migrateReset.ts"],"sourcesContent":["/* eslint-disable no-restricted-syntax, no-await-in-loop */\nimport type { PayloadRequestWithData } from '../../types/index.js'\nimport type { BaseDatabaseAdapter } from '../types.js'\n\nimport { commitTransaction } from '../../utilities/commitTransaction.js'\nimport { initTransaction } from '../../utilities/initTransaction.js'\nimport { killTransaction } from '../../utilities/killTransaction.js'\nimport { getMigrations } from './getMigrations.js'\nimport { readMigrationFiles } from './readMigrationFiles.js'\n\nexport async function migrateReset(this: BaseDatabaseAdapter): Promise<void> {\n const { payload } = this\n const migrationFiles = await readMigrationFiles({ payload })\n\n const { existingMigrations } = await getMigrations({ payload })\n\n if (!existingMigrations?.length) {\n payload.logger.info({ msg: 'No migrations to reset.' })\n return\n }\n\n const req = { payload } as PayloadRequestWithData\n\n // Rollback all migrations in order\n for (const migration of migrationFiles) {\n // Create or update migration in database\n const existingMigration = existingMigrations.find(\n (existing) => existing.name === migration.name,\n )\n if (existingMigration) {\n payload.logger.info({ msg: `Migrating down: ${migration.name}` })\n try {\n const start = Date.now()\n await initTransaction(req)\n await migration.down({ payload, req })\n await payload.delete({\n collection: 'payload-migrations',\n req,\n where: {\n id: {\n equals: existingMigration.id,\n },\n },\n })\n await commitTransaction(req)\n payload.logger.info({ msg: `Migrated down: ${migration.name} (${Date.now() - start}ms)` })\n } catch (err: unknown) {\n await killTransaction(req)\n payload.logger.error({ err, msg: `Error running migration ${migration.name}` })\n throw err\n }\n }\n }\n\n // Delete dev migration\n try {\n await payload.delete({\n collection: 'payload-migrations',\n where: {\n batch: {\n equals: -1,\n },\n },\n })\n } catch (err: unknown) {\n payload.logger.error({ error: err, msg: 'Error deleting dev migration' })\n }\n}\n"],"names":["commitTransaction","initTransaction","killTransaction","getMigrations","readMigrationFiles","migrateReset","payload","migrationFiles","existingMigrations","length","logger","info","msg","req","migration","existingMigration","find","existing","name","start","Date","now","down","delete","collection","where","id","equals","err","error","batch"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,yDAAyD,GAIzD,SAASA,iBAAiB,QAAQ,uCAAsC;AACxE,SAASC,eAAe,QAAQ,qCAAoC;AACpE,SAASC,eAAe,QAAQ,qCAAoC;AACpE,SAASC,aAAa,QAAQ,qBAAoB;AAClD,SAASC,kBAAkB,QAAQ,0BAAyB;AAE5D,OAAO,eAAeC;IACpB,MAAM,EAAEC,OAAO,EAAE,GAAG,IAAI;IACxB,MAAMC,iBAAiB,MAAMH,mBAAmB;QAAEE;IAAQ;IAE1D,MAAM,EAAEE,kBAAkB,EAAE,GAAG,MAAML,cAAc;QAAEG;IAAQ;IAE7D,IAAI,CAACE,oBAAoBC,QAAQ;QAC/BH,QAAQI,MAAM,CAACC,IAAI,CAAC;YAAEC,KAAK;QAA0B;QACrD;IACF;IAEA,MAAMC,MAAM;QAAEP;IAAQ;IAEtB,mCAAmC;IACnC,KAAK,MAAMQ,aAAaP,eAAgB;QACtC,yCAAyC;QACzC,MAAMQ,oBAAoBP,mBAAmBQ,IAAI,CAC/C,CAACC,WAAaA,SAASC,IAAI,KAAKJ,UAAUI,IAAI;QAEhD,IAAIH,mBAAmB;YACrBT,QAAQI,MAAM,CAACC,IAAI,CAAC;gBAAEC,KAAK,CAAC,gBAAgB,EAAEE,UAAUI,IAAI,CAAC,CAAC;YAAC;YAC/D,IAAI;gBACF,MAAMC,QAAQC,KAAKC,GAAG;gBACtB,MAAMpB,gBAAgBY;gBACtB,MAAMC,UAAUQ,IAAI,CAAC;oBAAEhB;oBAASO;gBAAI;gBACpC,MAAMP,QAAQiB,MAAM,CAAC;oBACnBC,YAAY;oBACZX;oBACAY,OAAO;wBACLC,IAAI;4BACFC,QAAQZ,kBAAkBW,EAAE;wBAC9B;oBACF;gBACF;gBACA,MAAM1B,kBAAkBa;gBACxBP,QAAQI,MAAM,CAACC,IAAI,CAAC;oBAAEC,KAAK,CAAC,gBAAgB,EAAEE,UAAUI,IAAI,CAAC,EAAE,EAAEE,KAAKC,GAAG,KAAKF,MAAM,GAAG,CAAC;gBAAC;YAC3F,EAAE,OAAOS,KAAc;gBACrB,MAAM1B,gBAAgBW;gBACtBP,QAAQI,MAAM,CAACmB,KAAK,CAAC;oBAAED;oBAAKhB,KAAK,CAAC,wBAAwB,EAAEE,UAAUI,IAAI,CAAC,CAAC;gBAAC;gBAC7E,MAAMU;YACR;QACF;IACF;IAEA,uBAAuB;IACvB,IAAI;QACF,MAAMtB,QAAQiB,MAAM,CAAC;YACnBC,YAAY;YACZC,OAAO;gBACLK,OAAO;oBACLH,QAAQ,CAAC;gBACX;YACF;QACF;IACF,EAAE,OAAOC,KAAc;QACrBtB,QAAQI,MAAM,CAACmB,KAAK,CAAC;YAAEA,OAAOD;YAAKhB,KAAK;QAA+B;IACzE;AACF"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { SanitizedCollectionConfig } from '../../collections/config/types.js';
|
|
2
2
|
import type { Field } from '../../fields/config/types.js';
|
|
3
3
|
import type { SanitizedGlobalConfig } from '../../globals/config/types.js';
|
|
4
|
-
import type {
|
|
4
|
+
import type { PayloadRequestWithData, Where } from '../../types/index.js';
|
|
5
5
|
import type { EntityPolicies } from './types.js';
|
|
6
6
|
type Args = {
|
|
7
7
|
errors?: {
|
|
@@ -9,7 +9,7 @@ type Args = {
|
|
|
9
9
|
}[];
|
|
10
10
|
overrideAccess: boolean;
|
|
11
11
|
policies?: EntityPolicies;
|
|
12
|
-
req:
|
|
12
|
+
req: PayloadRequestWithData;
|
|
13
13
|
versionFields?: Field[];
|
|
14
14
|
where: Where;
|
|
15
15
|
} & ({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validateQueryPaths.d.ts","sourceRoot":"","sources":["../../../src/database/queryValidation/validateQueryPaths.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,mCAAmC,CAAA;AAClF,OAAO,KAAK,EAAE,KAAK,EAAsB,MAAM,8BAA8B,CAAA;AAC7E,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAA;AAE1E,OAAO,KAAK,EAAY,
|
|
1
|
+
{"version":3,"file":"validateQueryPaths.d.ts","sourceRoot":"","sources":["../../../src/database/queryValidation/validateQueryPaths.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,mCAAmC,CAAA;AAClF,OAAO,KAAK,EAAE,KAAK,EAAsB,MAAM,8BAA8B,CAAA;AAC7E,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAA;AAE1E,OAAO,KAAK,EAAY,sBAAsB,EAAE,KAAK,EAAc,MAAM,sBAAsB,CAAA;AAC/F,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAA;AAQhD,KAAK,IAAI,GAAG;IACV,MAAM,CAAC,EAAE;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,EAAE,CAAA;IAC3B,cAAc,EAAE,OAAO,CAAA;IACvB,QAAQ,CAAC,EAAE,cAAc,CAAA;IACzB,GAAG,EAAE,sBAAsB,CAAA;IAC3B,aAAa,CAAC,EAAE,KAAK,EAAE,CAAA;IACvB,KAAK,EAAE,KAAK,CAAA;CACb,GAAG,CACA;IACE,gBAAgB,EAAE,yBAAyB,CAAA;IAC3C,YAAY,CAAC,EAAE,KAAK,GAAG,SAAS,CAAA;CACjC,GACD;IACE,gBAAgB,CAAC,EAAE,KAAK,GAAG,SAAS,CAAA;IACpC,YAAY,EAAE,qBAAqB,CAAA;CACpC,CACJ,CAAA;AAeD,wBAAsB,kBAAkB,CAAC,EACvC,gBAAgB,EAChB,MAAW,EACX,YAAY,EACZ,cAAc,EACd,QAGC,EACD,GAAG,EACH,aAAa,EACb,KAAK,GACN,EAAE,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAoCtB"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* eslint-disable no-restricted-syntax */ import QueryError from '../../errors/QueryError.js';
|
|
1
|
+
/* eslint-disable no-restricted-syntax */ import { QueryError } from '../../errors/QueryError.js';
|
|
2
2
|
import { validOperators } from '../../types/constants.js';
|
|
3
3
|
import { deepCopyObject } from '../../utilities/deepCopyObject.js';
|
|
4
4
|
import flattenFields from '../../utilities/flattenTopLevelFields.js';
|