payload 3.0.0-alpha.64 → 3.0.0-alpha.66
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 +16 -10
- package/dist/admin/RichText.d.ts.map +1 -1
- package/dist/admin/RichText.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/types.d.ts +1 -1
- 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/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/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 +2 -2
- package/dist/auth/operations/auth.d.ts.map +1 -1
- package/dist/auth/operations/auth.js.map +1 -1
- package/dist/auth/operations/forgotPassword.d.ts +2 -2
- package/dist/auth/operations/forgotPassword.d.ts.map +1 -1
- package/dist/auth/operations/forgotPassword.js +3 -2
- 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.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 +2 -2
- package/dist/auth/sendVerificationEmail.d.ts.map +1 -1
- package/dist/auth/sendVerificationEmail.js +3 -2
- 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/loader/index.d.ts.map +1 -1
- package/dist/bin/loader/index.js +2 -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 +2 -1
- package/dist/collections/config/client.d.ts.map +1 -1
- package/dist/collections/config/defaults.d.ts +5 -5
- 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 +1 -0
- package/dist/collections/config/schema.js.map +1 -1
- package/dist/collections/config/types.d.ts +21 -15
- 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.map +1 -1
- package/dist/collections/dataloader.js +1 -1
- package/dist/collections/dataloader.js.map +1 -1
- package/dist/collections/operations/count.d.ts +2 -2
- package/dist/collections/operations/count.d.ts.map +1 -1
- package/dist/collections/operations/count.js.map +1 -1
- 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.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.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.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.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.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.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.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.map +1 -1
- package/dist/collections/operations/local/count.d.ts +2 -2
- package/dist/collections/operations/local/count.d.ts.map +1 -1
- package/dist/collections/operations/local/count.js.map +1 -1
- package/dist/collections/operations/local/create.d.ts +2 -2
- 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 +2 -2
- 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 +2 -2
- 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 +2 -2
- 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 +2 -2
- 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 +2 -2
- 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 +2 -2
- package/dist/collections/operations/local/findVersions.d.ts.map +1 -1
- package/dist/collections/operations/local/findVersions.js.map +1 -1
- package/dist/collections/operations/local/restoreVersion.d.ts +2 -2
- 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 +2 -2
- 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.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 +1 -1
- 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 +1 -1
- package/dist/collections/operations/updateByID.js.map +1 -1
- package/dist/collections/operations/utils.d.ts +2 -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/sanitize.d.ts +1 -1
- package/dist/config/sanitize.d.ts.map +1 -1
- package/dist/config/sanitize.js +28 -7
- package/dist/config/sanitize.js.map +1 -1
- package/dist/config/schema.js +1 -1
- package/dist/config/schema.js.map +1 -1
- package/dist/config/types.d.ts +14 -5
- package/dist/config/types.d.ts.map +1 -1
- 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 +20 -20
- package/dist/database/types.d.ts.map +1 -1
- package/dist/database/types.js.map +1 -1
- package/dist/email/consoleEmailAdapter.d.ts.map +1 -1
- package/dist/email/consoleEmailAdapter.js +1 -0
- package/dist/email/consoleEmailAdapter.js.map +1 -1
- package/dist/email/types.d.ts +1 -0
- package/dist/email/types.d.ts.map +1 -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 +2 -3
- 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/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/utilities.d.ts +3 -0
- package/dist/exports/utilities.d.ts.map +1 -1
- package/dist/exports/utilities.js +3 -0
- package/dist/exports/utilities.js.map +1 -1
- package/dist/fields/config/client.d.ts +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 +61 -33
- package/dist/fields/config/sanitize.js.map +1 -1
- package/dist/fields/config/sanitize.spec.js +76 -85
- package/dist/fields/config/sanitize.spec.js.map +1 -1
- package/dist/fields/config/types.d.ts +14 -10
- 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 +2 -2
- package/dist/fields/hooks/afterRead/index.d.ts.map +1 -1
- package/dist/fields/hooks/afterRead/index.js.map +1 -1
- package/dist/fields/hooks/afterRead/promise.d.ts +5 -2
- package/dist/fields/hooks/afterRead/promise.d.ts.map +1 -1
- package/dist/fields/hooks/afterRead/promise.js +7 -16
- package/dist/fields/hooks/afterRead/promise.js.map +1 -1
- package/dist/fields/hooks/afterRead/relationshipPopulationPromise.d.ts +2 -2
- package/dist/fields/hooks/afterRead/relationshipPopulationPromise.d.ts.map +1 -1
- package/dist/fields/hooks/afterRead/relationshipPopulationPromise.js.map +1 -1
- package/dist/fields/hooks/afterRead/traverseFields.d.ts +5 -2
- package/dist/fields/hooks/afterRead/traverseFields.d.ts.map +1 -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.map +1 -1
- package/dist/fields/validations.js +3 -0
- package/dist/fields/validations.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/types.d.ts +7 -7
- 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 -2
- package/dist/globals/operations/findOne.d.ts.map +1 -1
- 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.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.map +1 -1
- package/dist/globals/operations/local/findOne.d.ts +2 -2
- 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 +2 -2
- 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 +2 -2
- 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 +2 -2
- 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 +2 -2
- 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.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.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.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 -3
- package/dist/preferences/types.d.ts.map +1 -1
- package/dist/preferences/types.js.map +1 -1
- package/dist/types/index.d.ts +18 -14
- 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 +2 -2
- package/dist/uploads/generateFileData.js.map +1 -1
- package/dist/uploads/getExternalFile.d.ts +2 -2
- package/dist/uploads/getExternalFile.d.ts.map +1 -1
- package/dist/uploads/getExternalFile.js +5 -2
- 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.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/types.d.ts +6 -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 +3 -0
- 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 +4 -2
- 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.js +1 -1
- 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/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 +7 -1
- package/dist/utilities/telemetry/index.d.ts.map +1 -1
- package/dist/utilities/telemetry/index.js +41 -19
- 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.map +1 -1
- package/package.json +67 -70
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 { 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 { 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, 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: PayloadRequest\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: 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?: 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: RichTextAdapter<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?: 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 = CustomComponent\n\nexport type EntityDescriptionFunction = () => string\n\nexport type EntityDescription =\n | EntityDescriptionComponent\n | EntityDescriptionFunction\n | Record<string, string>\n | string\n\nexport type { EmailAdapter, SendEmailOptions }\n"],"names":["serverProps"],"rangeMappings":";;","mappings":"AA8PA,OAAO,MAAMA,cAAqC;IAAC;CAAU,CAAA"}
|
|
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?: 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 = () => string\n\nexport type EntityDescription =\n | EntityDescriptionComponent\n | EntityDescriptionFunction\n | Record<string, string>\n | 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,OAAO,eAAeC;IACpB,MAAM,EAAEC,OAAO,EAAE,GAAG,IAAI;IACxB,MAAMC,iBAAiB,MAAMH,mBAAmB;QAAEE;IAAQ;IAC1D,MAAM,EAAEE,kBAAkB,EAAEC,WAAW,EAAE,GAAG,MAAMN,cAAc;QAAEG;IAAQ;IAE1E,MAAMI,WAAWD,cAAc;IAE/B,wDAAwD;IACxD,KAAK,MAAME,aAAaJ,eAAgB;QACtC,MAAMK,oBAAoBJ,mBAAmBK,IAAI,CAC/C,CAACC,WAAaA,SAASC,IAAI,KAAKJ,UAAUI,IAAI;QAGhD,yCAAyC;QACzC,IAAIH,mBAAmB;YACrB,UAAS,kCAAkC;QAC7C;QAEA,MAAMI,QAAQC,KAAKC,GAAG;QACtB,MAAMC,MAAM;YAAEb;QAAQ;QAEtBA,QAAQc,MAAM,CAACC,IAAI,CAAC;YAAEC,KAAK,CAAC,WAAW,EAAEX,UAAUI,IAAI,CAAC,CAAC;QAAC;QAE1D,IAAI;YACF,MAAMd,gBAAgBkB;YACtB,MAAMR,UAAUY,EAAE,CAAC;gBAAEjB;gBAASa;YAAI;YAClCb,QAAQc,MAAM,CAACC,IAAI,CAAC;gBAAEC,KAAK,CAAC,WAAW,EAAEX,UAAUI,IAAI,CAAC,EAAE,EAAEE,KAAKC,GAAG,KAAKF,MAAM,GAAG,CAAC;YAAC;YACpF,MAAMV,QAAQkB,MAAM,CAAC;gBACnBC,YAAY;gBACZC,MAAM;oBACJX,MAAMJ,UAAUI,IAAI;oBACpBY,OAAOjB;gBACT;gBACAS;YACF;YACA,MAAMnB,kBAAkBmB;QAC1B,EAAE,OAAOS,KAAc;YACrB,MAAM1B,gBAAgBiB;YACtBb,QAAQc,MAAM,CAACS,KAAK,CAAC;gBAAED;gBAAKN,KAAK,CAAC,wBAAwB,EAAEX,UAAUI,IAAI,CAAC,CAAC;YAAC;YAC7E,MAAMa;QACR;IACF;AACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/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;AAC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AC;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","error","process","exit","up","create","data","executed"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,yDAAyD,GAIzD,SAASA,iBAAiB,QAAQ,uCAAsC;AACxE,SAASC,eAAe,QAAQ,qCAAoC;AACpE,SAASC,eAAe,QAAQ,qCAAoC;AACpE,SAASC,aAAa,QAAQ,qBAA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B;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';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/database/queryValidation/validateQueryPaths.ts"],"sourcesContent":["/* eslint-disable no-restricted-syntax */\nimport type { SanitizedCollectionConfig } from '../../collections/config/types.js'\nimport type { Field, FieldAffectingData } from '../../fields/config/types.js'\nimport type { SanitizedGlobalConfig } from '../../globals/config/types.js'\n/* eslint-disable no-await-in-loop */\nimport type { Operator,
|
|
1
|
+
{"version":3,"sources":["../../../src/database/queryValidation/validateQueryPaths.ts"],"sourcesContent":["/* eslint-disable no-restricted-syntax */\nimport type { SanitizedCollectionConfig } from '../../collections/config/types.js'\nimport type { Field, FieldAffectingData } from '../../fields/config/types.js'\nimport type { SanitizedGlobalConfig } from '../../globals/config/types.js'\n/* eslint-disable no-await-in-loop */\nimport type { Operator, PayloadRequestWithData, Where, WhereField } from '../../types/index.js'\nimport type { EntityPolicies } from './types.js'\n\nimport { QueryError } from '../../errors/QueryError.js'\nimport { validOperators } from '../../types/constants.js'\nimport { deepCopyObject } from '../../utilities/deepCopyObject.js'\nimport flattenFields from '../../utilities/flattenTopLevelFields.js'\nimport { validateSearchParam } from './validateSearchParams.js'\n\ntype Args = {\n errors?: { path: string }[]\n overrideAccess: boolean\n policies?: EntityPolicies\n req: PayloadRequestWithData\n versionFields?: Field[]\n where: Where\n} & (\n | {\n collectionConfig: SanitizedCollectionConfig\n globalConfig?: never | undefined\n }\n | {\n collectionConfig?: never | undefined\n globalConfig: SanitizedGlobalConfig\n }\n)\n\nconst flattenWhere = (query: Where): WhereField[] =>\n Object.entries(query).reduce((flattenedConstraints, [key, val]) => {\n if ((key === 'and' || key === 'or') && Array.isArray(val)) {\n const subWhereConstraints: Where[] = val.reduce((acc, subVal) => {\n const subWhere = flattenWhere(subVal)\n return [...acc, ...subWhere]\n }, [])\n return [...flattenedConstraints, ...subWhereConstraints]\n }\n\n return [...flattenedConstraints, { [key]: val }]\n }, [])\n\nexport async function validateQueryPaths({\n collectionConfig,\n errors = [],\n globalConfig,\n overrideAccess,\n policies = {\n collections: {},\n globals: {},\n },\n req,\n versionFields,\n where,\n}: Args): Promise<void> {\n const fields = flattenFields(\n versionFields || (globalConfig || collectionConfig).fields,\n ) as FieldAffectingData[]\n if (typeof where === 'object') {\n const whereFields = flattenWhere(where)\n // We need to determine if the whereKey is an AND, OR, or a schema path\n const promises = []\n whereFields.map(async (constraint) => {\n Object.keys(constraint).map(async (path) => {\n Object.entries(constraint[path]).map(async ([operator, val]) => {\n if (validOperators.includes(operator as Operator)) {\n promises.push(\n validateSearchParam({\n collectionConfig: deepCopyObject(collectionConfig),\n errors,\n fields: fields as Field[],\n globalConfig: deepCopyObject(globalConfig),\n operator,\n overrideAccess,\n path,\n policies,\n req,\n val,\n versionFields,\n }),\n )\n }\n })\n })\n })\n await Promise.all(promises)\n if (errors.length > 0) {\n throw new QueryError(errors)\n }\n }\n}\n"],"names":["QueryError","validOperators","deepCopyObject","flattenFields","validateSearchParam","flattenWhere","query","Object","entries","reduce","flattenedConstraints","key","val","Array","isArray","subWhereConstraints","acc","subVal","subWhere","validateQueryPaths","collectionConfig","errors","globalConfig","overrideAccess","policies","collections","globals","req","versionFields","where","fields","whereFields","promises","map","constraint","keys","path","operator","includes","push","Promise","all","length"],"rangeMappings":";;;;;;;;;;;;;;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AAO,CAACI,UAAUzB,IAAI;oBACzD,IAAIX,eAAeqC,QAAQ,CAACD,WAAuB;wBACjDL,SAASO,IAAI,CACXnC,oBAAoB;4BAClBgB,kBAAkBlB,eAAekB;4BACjCC;4BACAS,QAAQA;4BACRR,cAAcpB,eAAeoB;4BAC7Be;4BACAd;4BACAa;4BACAZ;4BACAG;4BACAf;4BACAgB;wBACF;oBAEJ;gBACF;YACF;QACF;QACA,MAAMY,QAAQC,GAAG,CAACT;QAClB,IAAIX,OAAOqB,MAAM,GAAG,GAAG;YACrB,MAAM,IAAI1C,WAAWqB;QACvB;IACF;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 } from '../../types/index.js';
|
|
5
5
|
import type { EntityPolicies } from './types.js';
|
|
6
6
|
type Args = {
|
|
7
7
|
collectionConfig?: SanitizedCollectionConfig;
|
|
@@ -14,7 +14,7 @@ type Args = {
|
|
|
14
14
|
overrideAccess: boolean;
|
|
15
15
|
path: string;
|
|
16
16
|
policies: EntityPolicies;
|
|
17
|
-
req:
|
|
17
|
+
req: PayloadRequestWithData;
|
|
18
18
|
val: unknown;
|
|
19
19
|
versionFields?: Field[];
|
|
20
20
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validateSearchParams.d.ts","sourceRoot":"","sources":["../../../src/database/queryValidation/validateSearchParams.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,mCAAmC,CAAA;AAClF,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,8BAA8B,CAAA;AACzD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAA;AAC1E,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"validateSearchParams.d.ts","sourceRoot":"","sources":["../../../src/database/queryValidation/validateSearchParams.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,mCAAmC,CAAA;AAClF,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,8BAA8B,CAAA;AACzD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAA;AAC1E,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAA;AAClE,OAAO,KAAK,EAAE,cAAc,EAAe,MAAM,YAAY,CAAA;AAQ7D,KAAK,IAAI,GAAG;IACV,gBAAgB,CAAC,EAAE,yBAAyB,CAAA;IAC5C,MAAM,EAAE;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,EAAE,CAAA;IAC1B,MAAM,EAAE,KAAK,EAAE,CAAA;IACf,YAAY,CAAC,EAAE,qBAAqB,CAAA;IACpC,QAAQ,EAAE,MAAM,CAAA;IAChB,cAAc,EAAE,OAAO,CAAA;IACvB,IAAI,EAAE,MAAM,CAAA;IACZ,QAAQ,EAAE,cAAc,CAAA;IACxB,GAAG,EAAE,sBAAsB,CAAA;IAC3B,GAAG,EAAE,OAAO,CAAA;IACZ,aAAa,CAAC,EAAE,KAAK,EAAE,CAAA;CACxB,CAAA;AAED;;GAEG;AACH,wBAAsB,mBAAmB,CAAC,EACxC,gBAAgB,EAChB,MAAM,EACN,MAAM,EACN,YAAY,EACZ,QAAQ,EACR,cAAc,EACd,IAAI,EAAE,YAAY,EAClB,QAAQ,EACR,GAAG,EACH,GAAG,EACH,aAAa,GACd,EAAE,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAuItB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/database/queryValidation/validateSearchParams.ts"],"sourcesContent":["import type { SanitizedCollectionConfig } from '../../collections/config/types.js'\nimport type { Field } from '../../fields/config/types.js'\nimport type { SanitizedGlobalConfig } from '../../globals/config/types.js'\nimport type {
|
|
1
|
+
{"version":3,"sources":["../../../src/database/queryValidation/validateSearchParams.ts"],"sourcesContent":["import type { SanitizedCollectionConfig } from '../../collections/config/types.js'\nimport type { Field } from '../../fields/config/types.js'\nimport type { SanitizedGlobalConfig } from '../../globals/config/types.js'\nimport type { PayloadRequestWithData } from '../../types/index.js'\nimport type { EntityPolicies, PathToQuery } from './types.js'\n\nimport { fieldAffectsData } from '../../fields/config/types.js'\nimport { getEntityPolicies } from '../../utilities/getEntityPolicies.js'\nimport isolateObjectProperty from '../../utilities/isolateObjectProperty.js'\nimport { getLocalizedPaths } from '../getLocalizedPaths.js'\nimport { validateQueryPaths } from './validateQueryPaths.js'\n\ntype Args = {\n collectionConfig?: SanitizedCollectionConfig\n errors: { path: string }[]\n fields: Field[]\n globalConfig?: SanitizedGlobalConfig\n operator: string\n overrideAccess: boolean\n path: string\n policies: EntityPolicies\n req: PayloadRequestWithData\n val: unknown\n versionFields?: Field[]\n}\n\n/**\n * Validate the Payload key / value / operator\n */\nexport async function validateSearchParam({\n collectionConfig,\n errors,\n fields,\n globalConfig,\n operator,\n overrideAccess,\n path: incomingPath,\n policies,\n req,\n val,\n versionFields,\n}: Args): Promise<void> {\n // Replace GraphQL nested field double underscore formatting\n let sanitizedPath\n if (incomingPath === '_id') {\n sanitizedPath = 'id'\n } else {\n sanitizedPath = incomingPath.replace(/__/g, '.')\n }\n let paths: PathToQuery[] = []\n const { slug } = collectionConfig || globalConfig\n\n if (globalConfig && !policies.globals[slug]) {\n // eslint-disable-next-line no-param-reassign\n globalConfig.fields = fields\n\n // eslint-disable-next-line no-param-reassign\n policies.globals[slug] = await getEntityPolicies({\n type: 'global',\n entity: globalConfig,\n operations: ['read'],\n req,\n })\n }\n\n if (sanitizedPath !== 'id') {\n paths = await getLocalizedPaths({\n collectionSlug: collectionConfig?.slug,\n fields,\n globalSlug: globalConfig?.slug,\n incomingPath: sanitizedPath,\n locale: req.locale,\n overrideAccess,\n payload: req.payload,\n })\n }\n const promises = []\n promises.push(\n ...paths.map(async ({ collectionSlug, field, invalid, path }, i) => {\n if (invalid) {\n errors.push({ path })\n return\n }\n\n if (!overrideAccess && fieldAffectsData(field)) {\n if (collectionSlug) {\n if (!policies.collections[collectionSlug]) {\n // eslint-disable-next-line no-param-reassign\n policies.collections[collectionSlug] = await getEntityPolicies({\n type: 'collection',\n entity: req.payload.collections[collectionSlug].config,\n operations: ['read'],\n req: isolateObjectProperty(req, 'transactionID'),\n })\n }\n\n if (\n ['hash', 'salt'].includes(incomingPath) &&\n collectionConfig.auth &&\n !collectionConfig.auth?.disableLocalStrategy\n ) {\n errors.push({ path: incomingPath })\n }\n }\n let fieldPath = path\n // remove locale from end of path\n if (path.endsWith(`.${req.locale}`)) {\n fieldPath = path.slice(0, -(req.locale.length + 1))\n }\n // remove \".value\" from ends of polymorphic relationship paths\n if (field.type === 'relationship' && Array.isArray(field.relationTo)) {\n fieldPath = fieldPath.replace('.value', '')\n }\n const entityType: 'collections' | 'globals' = globalConfig ? 'globals' : 'collections'\n const entitySlug = collectionSlug || globalConfig.slug\n const segments = fieldPath.split('.')\n\n let fieldAccess\n if (versionFields) {\n fieldAccess = policies[entityType][entitySlug]\n if (segments[0] === 'parent' || segments[0] === 'version') {\n segments.shift()\n }\n } else {\n fieldAccess = policies[entityType][entitySlug].fields\n }\n\n segments.forEach((segment) => {\n if (fieldAccess[segment]) {\n if ('fields' in fieldAccess[segment]) {\n fieldAccess = fieldAccess[segment].fields\n } else if ('blocks' in fieldAccess[segment]) {\n fieldAccess = fieldAccess[segment]\n } else {\n fieldAccess = fieldAccess[segment]\n }\n }\n })\n\n if (!fieldAccess?.read?.permission) {\n errors.push({ path: fieldPath })\n }\n }\n\n if (i > 1) {\n // Remove top collection and reverse array\n // to work backwards from top\n const pathsToQuery = paths.slice(1).reverse()\n\n pathsToQuery.forEach(\n ({ collectionSlug: pathCollectionSlug, path: subPath }, pathToQueryIndex) => {\n // On the \"deepest\" collection,\n // validate query of the relationship\n if (pathToQueryIndex === 0) {\n promises.push(\n validateQueryPaths({\n collectionConfig: req.payload.collections[pathCollectionSlug].config,\n errors,\n globalConfig: undefined,\n overrideAccess,\n policies,\n req,\n where: {\n [subPath]: {\n [operator]: val,\n },\n },\n }),\n )\n }\n },\n )\n }\n }),\n )\n await Promise.all(promises)\n}\n"],"names":["fieldAffectsData","getEntityPolicies","isolateObjectProperty","getLocalizedPaths","validateQueryPaths","validateSearchParam","collectionConfig","errors","fields","globalConfig","operator","overrideAccess","path","incomingPath","policies","req","val","versionFields","sanitizedPath","replace","paths","slug","globals","type","entity","operations","collectionSlug","globalSlug","locale","payload","promises","push","map","field","invalid","i","collections","config","includes","auth","disableLocalStrategy","fieldPath","endsWith","slice","length","Array","isArray","relationTo","entityType","entitySlug","segments","split","fieldAccess","shift","forEach","segment","read","permission","pathsToQuery","reverse","pathCollectionSlug","subPath","pathToQueryIndex","undefined","where","Promise","all"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAMA,SAASA,gBAAgB,QAAQ,+BAA8B;AAC/D,SAASC,iBAAiB,QAAQ,uCAAsC;AACxE,OAAOC,2BAA2B,2CAA0C;AAC5E,SAASC,iBAAiB,QAAQ,0BAAyB;AAC3D,SAASC,kBAAkB,QAAQ,0BAAyB;AAgB5D;;CAEC,GACD,OAAO,eAAeC,oBAAoB,EACxCC,gBAAgB,EAChBC,MAAM,EACNC,MAAM,EACNC,YAAY,EACZC,QAAQ,EACRC,cAAc,EACdC,MAAMC,YAAY,EAClBC,QAAQ,EACRC,GAAG,EACHC,GAAG,EACHC,aAAa,EACR;IACL,4DAA4D;IAC5D,IAAIC;IACJ,IAAIL,iBAAiB,OAAO;QAC1BK,gBAAgB;IAClB,OAAO;QACLA,g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wB,IAAI,CAAC;oBAAEnB,MAAM6B;gBAAU;YAChC;QACF;QAEA,IAAIN,IAAI,GAAG;YACT,0CAA0C;YAC1C,6BAA6B;YAC7B,MAAMuB,eAAetC,MAAMuB,KAAK,CAAC,GAAGgB,OAAO;YAE3CD,aAAaJ,OAAO,CAClB,CAAC,EAAE5B,gBAAgBkC,kBAAkB,EAAEhD,MAAMiD,OAAO,EAAE,EAAEC;gBACtD,+BAA+B;gBAC/B,qCAAqC;gBACrC,IAAIA,qBAAqB,GAAG;oBAC1BhC,SAASC,IAAI,CACX3B,mBAAmB;wBACjBE,kBAAkBS,IAAIc,OAAO,CAACO,WAAW,CAACwB,mBAAmB,CAACvB,MAAM;wBACpE9B;wBACAE,cAAcsD;wBACdpD;wBACAG;wBACAC;wBACAiD,OAAO;4BACL,CAACH,QAAQ,EAAE;gCACT,CAACnD,SAAS,EAAEM;4BACd;wBACF;oBACF;gBAEJ;YACF;QAEJ;IACF;IAEF,MAAMiD,QAAQC,GAAG,CAACpC;AACpB"}
|
package/dist/database/types.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { TypeWithID } from '../collections/config/types.js';
|
|
2
2
|
import type { TypeWithID as GlobalsTypeWithID } from '../globals/config/types.js';
|
|
3
|
-
import type { Document, Payload,
|
|
3
|
+
import type { Document, Payload, PayloadRequestWithData, Where } from '../types/index.js';
|
|
4
4
|
import type { TypeWithVersion } from '../versions/types.js';
|
|
5
5
|
export type { TypeWithVersion };
|
|
6
6
|
export interface BaseDatabaseAdapter {
|
|
@@ -129,7 +129,7 @@ export type QueryDraftsArgs = {
|
|
|
129
129
|
locale?: string;
|
|
130
130
|
page?: number;
|
|
131
131
|
pagination?: boolean;
|
|
132
|
-
req:
|
|
132
|
+
req: PayloadRequestWithData;
|
|
133
133
|
sort?: string;
|
|
134
134
|
where?: Where;
|
|
135
135
|
};
|
|
@@ -137,7 +137,7 @@ export type QueryDrafts = <T = TypeWithID>(args: QueryDraftsArgs) => Promise<Pag
|
|
|
137
137
|
export type FindOneArgs = {
|
|
138
138
|
collection: string;
|
|
139
139
|
locale?: string;
|
|
140
|
-
req:
|
|
140
|
+
req: PayloadRequestWithData;
|
|
141
141
|
where?: Where;
|
|
142
142
|
};
|
|
143
143
|
export type FindOne = <T extends TypeWithID>(args: FindOneArgs) => Promise<T | null>;
|
|
@@ -148,7 +148,7 @@ export type FindArgs = {
|
|
|
148
148
|
locale?: string;
|
|
149
149
|
page?: number;
|
|
150
150
|
pagination?: boolean;
|
|
151
|
-
req:
|
|
151
|
+
req: PayloadRequestWithData;
|
|
152
152
|
skip?: number;
|
|
153
153
|
sort?: string;
|
|
154
154
|
versions?: boolean;
|
|
@@ -158,7 +158,7 @@ export type Find = <T = TypeWithID>(args: FindArgs) => Promise<PaginatedDocs<T>>
|
|
|
158
158
|
export type CountArgs = {
|
|
159
159
|
collection: string;
|
|
160
160
|
locale?: string;
|
|
161
|
-
req:
|
|
161
|
+
req: PayloadRequestWithData;
|
|
162
162
|
where?: Where;
|
|
163
163
|
};
|
|
164
164
|
export type Count = (args: CountArgs) => Promise<{
|
|
@@ -169,7 +169,7 @@ type BaseVersionArgs = {
|
|
|
169
169
|
locale?: string;
|
|
170
170
|
page?: number;
|
|
171
171
|
pagination?: boolean;
|
|
172
|
-
req:
|
|
172
|
+
req: PayloadRequestWithData;
|
|
173
173
|
skip?: number;
|
|
174
174
|
sort?: string;
|
|
175
175
|
versions?: boolean;
|
|
@@ -184,14 +184,14 @@ export type FindGlobalVersionsArgs = BaseVersionArgs & {
|
|
|
184
184
|
};
|
|
185
185
|
export type FindGlobalArgs = {
|
|
186
186
|
locale?: string;
|
|
187
|
-
req:
|
|
187
|
+
req: PayloadRequestWithData;
|
|
188
188
|
slug: string;
|
|
189
189
|
where?: Where;
|
|
190
190
|
};
|
|
191
191
|
export type UpdateGlobalVersionArgs<T = TypeWithID> = {
|
|
192
192
|
global: string;
|
|
193
193
|
locale?: string;
|
|
194
|
-
req:
|
|
194
|
+
req: PayloadRequestWithData;
|
|
195
195
|
versionData: T;
|
|
196
196
|
} & ({
|
|
197
197
|
id: number | string;
|
|
@@ -204,13 +204,13 @@ export type UpdateGlobalVersion = <T extends TypeWithID = TypeWithID>(args: Upda
|
|
|
204
204
|
export type FindGlobal = <T extends GlobalsTypeWithID = any>(args: FindGlobalArgs) => Promise<T>;
|
|
205
205
|
export type CreateGlobalArgs<T extends GlobalsTypeWithID = any> = {
|
|
206
206
|
data: T;
|
|
207
|
-
req:
|
|
207
|
+
req: PayloadRequestWithData;
|
|
208
208
|
slug: string;
|
|
209
209
|
};
|
|
210
210
|
export type CreateGlobal = <T extends GlobalsTypeWithID = any>(args: CreateGlobalArgs<T>) => Promise<T>;
|
|
211
211
|
export type UpdateGlobalArgs<T extends GlobalsTypeWithID = any> = {
|
|
212
212
|
data: T;
|
|
213
|
-
req:
|
|
213
|
+
req: PayloadRequestWithData;
|
|
214
214
|
slug: string;
|
|
215
215
|
};
|
|
216
216
|
export type UpdateGlobal = <T extends GlobalsTypeWithID = any>(args: UpdateGlobalArgs<T>) => Promise<T>;
|
|
@@ -218,7 +218,7 @@ export type FindGlobalVersions = <T = TypeWithID>(args: FindGlobalVersionsArgs)
|
|
|
218
218
|
export type DeleteVersionsArgs = {
|
|
219
219
|
collection: string;
|
|
220
220
|
locale?: string;
|
|
221
|
-
req:
|
|
221
|
+
req: PayloadRequestWithData;
|
|
222
222
|
sort?: {
|
|
223
223
|
[key: string]: string;
|
|
224
224
|
};
|
|
@@ -230,7 +230,7 @@ export type CreateVersionArgs<T = TypeWithID> = {
|
|
|
230
230
|
createdAt: string;
|
|
231
231
|
/** ID of the parent document for which the version should be created for */
|
|
232
232
|
parent: number | string;
|
|
233
|
-
req:
|
|
233
|
+
req: PayloadRequestWithData;
|
|
234
234
|
updatedAt: string;
|
|
235
235
|
versionData: T;
|
|
236
236
|
};
|
|
@@ -241,7 +241,7 @@ export type CreateGlobalVersionArgs<T = TypeWithID> = {
|
|
|
241
241
|
globalSlug: string;
|
|
242
242
|
/** ID of the parent document for which the version should be created for */
|
|
243
243
|
parent: number | string;
|
|
244
|
-
req:
|
|
244
|
+
req: PayloadRequestWithData;
|
|
245
245
|
updatedAt: string;
|
|
246
246
|
versionData: T;
|
|
247
247
|
};
|
|
@@ -250,7 +250,7 @@ export type DeleteVersions = (args: DeleteVersionsArgs) => Promise<void>;
|
|
|
250
250
|
export type UpdateVersionArgs<T = TypeWithID> = {
|
|
251
251
|
collection: string;
|
|
252
252
|
locale?: string;
|
|
253
|
-
req:
|
|
253
|
+
req: PayloadRequestWithData;
|
|
254
254
|
versionData: T;
|
|
255
255
|
} & ({
|
|
256
256
|
id: number | string;
|
|
@@ -265,7 +265,7 @@ export type CreateArgs = {
|
|
|
265
265
|
data: Record<string, unknown>;
|
|
266
266
|
draft?: boolean;
|
|
267
267
|
locale?: string;
|
|
268
|
-
req:
|
|
268
|
+
req: PayloadRequestWithData;
|
|
269
269
|
};
|
|
270
270
|
export type Create = (args: CreateArgs) => Promise<Document>;
|
|
271
271
|
export type UpdateOneArgs = {
|
|
@@ -273,7 +273,7 @@ export type UpdateOneArgs = {
|
|
|
273
273
|
data: Record<string, unknown>;
|
|
274
274
|
draft?: boolean;
|
|
275
275
|
locale?: string;
|
|
276
|
-
req:
|
|
276
|
+
req: PayloadRequestWithData;
|
|
277
277
|
} & ({
|
|
278
278
|
id: number | string;
|
|
279
279
|
where?: never;
|
|
@@ -284,24 +284,24 @@ export type UpdateOneArgs = {
|
|
|
284
284
|
export type UpdateOne = (args: UpdateOneArgs) => Promise<Document>;
|
|
285
285
|
export type DeleteOneArgs = {
|
|
286
286
|
collection: string;
|
|
287
|
-
req:
|
|
287
|
+
req: PayloadRequestWithData;
|
|
288
288
|
where: Where;
|
|
289
289
|
};
|
|
290
290
|
export type DeleteOne = (args: DeleteOneArgs) => Promise<Document>;
|
|
291
291
|
export type DeleteManyArgs = {
|
|
292
292
|
collection: string;
|
|
293
|
-
req:
|
|
293
|
+
req: PayloadRequestWithData;
|
|
294
294
|
where: Where;
|
|
295
295
|
};
|
|
296
296
|
export type DeleteMany = (args: DeleteManyArgs) => Promise<void>;
|
|
297
297
|
export type Migration = MigrationData & {
|
|
298
298
|
down: ({ payload, req }: {
|
|
299
299
|
payload: Payload;
|
|
300
|
-
req:
|
|
300
|
+
req: PayloadRequestWithData;
|
|
301
301
|
}) => Promise<boolean>;
|
|
302
302
|
up: ({ payload, req }: {
|
|
303
303
|
payload: Payload;
|
|
304
|
-
req:
|
|
304
|
+
req: PayloadRequestWithData;
|
|
305
305
|
}) => Promise<boolean>;
|
|
306
306
|
};
|
|
307
307
|
export type MigrationData = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/database/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAA;AAChE,OAAO,KAAK,EAAE,UAAU,IAAI,iBAAiB,EAAE,MAAM,4BAA4B,CAAA;AACjF,OAAO,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,cAAc,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AACjF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAA;AAE3D,YAAY,EAAE,eAAe,EAAE,CAAA;AAE/B,MAAM,WAAW,mBAAmB;IAClC;;;OAGG;IACH,gBAAgB,CAAC,EAAE,gBAAgB,CAAA;IACnC;;OAEG;IACH,iBAAiB,CAAC,EAAE,iBAAiB,CAAA;IAErC;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAA;IAEjB,KAAK,EAAE,KAAK,CAAA;IAEZ,MAAM,EAAE,MAAM,CAAA;IAEd,YAAY,EAAE,YAAY,CAAA;IAE1B,mBAAmB,EAAE,mBAAmB,CAAA;IACxC;;OAEG;IACH,eAAe,EAAE,eAAe,CAAA;IAEhC,aAAa,EAAE,aAAa,CAAA;IAE5B;;OAEG;IACH,aAAa,EAAE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