payload 3.0.0-beta.17 → 3.0.0-beta.19
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 +2 -2
- package/dist/admin/RichText.d.ts.map +1 -1
- package/dist/admin/RichText.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/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.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.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.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/collections/config/client.d.ts +1 -1
- package/dist/collections/config/defaults.d.ts +5 -5
- package/dist/collections/config/sanitize.js +1 -1
- package/dist/collections/config/sanitize.js.map +1 -1
- package/dist/collections/config/types.d.ts +15 -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.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.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/types.d.ts +3 -3
- 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/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/fields/config/sanitize.js +1 -1
- package/dist/fields/config/sanitize.js.map +1 -1
- package/dist/fields/config/types.d.ts +6 -6
- 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 +2 -2
- package/dist/fields/hooks/afterRead/promise.d.ts.map +1 -1
- 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 +2 -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.map +1 -1
- package/dist/fields/hooks/beforeChange/traverseFields.d.ts +2 -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 +2 -2
- package/dist/fields/hooks/beforeValidate/promise.d.ts.map +1 -1
- package/dist/fields/hooks/beforeValidate/promise.js.map +1 -1
- package/dist/fields/hooks/beforeValidate/traverseFields.d.ts +2 -2
- package/dist/fields/hooks/beforeValidate/traverseFields.d.ts.map +1 -1
- package/dist/fields/hooks/beforeValidate/traverseFields.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 +9 -8
- 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 +9 -8
- 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 +10 -10
- 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 +15 -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 +2 -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/createLocalReq.d.ts +3 -3
- package/dist/utilities/createLocalReq.d.ts.map +1 -1
- 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/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/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 +66 -69
|
@@ -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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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'../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,mB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sB,CAAA;KAAE,KAAK,OAAO,CAAC,OAAO,CAAC,CAAA;CAC9F,CAAA;AAED,MAAM,MAAM,aAAa,GAAG;IAC1B,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,IAAI,EAAE,MAAM,CAAA;CACb,CAAA;AAED,MAAM,MAAM,aAAa,CAAC,CAAC,GAAG,GAAG,IAAI;IACnC,IAAI,EAAE,CAAC,EAAE,CAAA;IACT,WAAW,EAAE,OAAO,CAAA;IACpB,WAAW,EAAE,OAAO,CAAA;IACpB,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,IAAI,GAAG,MAAM,GAAG,SAAS,CAAA;IACpC,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,aAAa,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,EAAE,IAAI,GAAG,MAAM,GAAG,SAAS,CAAA;IACpC,SAAS,EAAE,MAAM,CAAA;IACjB,UAAU,EAAE,MAAM,CAAA;CACnB,CAAA;AAED,MAAM,MAAM,qBAAqB,CAAC,CAAC,GAAG,mBAAmB,IAAI;IAC3D,aAAa,EAAE,QAAQ,GAAG,MAAM,CAAA;IAChC,IAAI,EAAE,CAAC,IAAI,EAAE;QAAE,OAAO,EAAE,OAAO,CAAA;KAAE,KAAK,CAAC,CAAA;CACxC,CAAA;AAED,MAAM,MAAM,gBAAgB,GACxB,CAAC,CAAC,IAAI,EAAE;IACN,6DAA6D;IAC7D,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,KAAK,MAAM,CAAC,GACb,MAAM,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/database/types.ts"],"sourcesContent":["import type { TypeWithID } from '../collections/config/types.js'\nimport type { TypeWithID as GlobalsTypeWithID } from '../globals/config/types.js'\nimport type { Document, Payload, PayloadRequest, Where } from '../types/index.js'\nimport type { TypeWithVersion } from '../versions/types.js'\n\nexport type { TypeWithVersion }\n\nexport interface BaseDatabaseAdapter {\n /**\n * Start a transaction, requiring commitTransaction() to be called for any changes to be made.\n * @returns an identifier for the transaction or null if one cannot be established\n */\n beginTransaction?: BeginTransaction\n /**\n * Persist the changes made since the start of the transaction.\n */\n commitTransaction?: CommitTransaction\n\n /**\n * Open the connection to the database\n */\n connect?: Connect\n\n count: Count\n\n create: Create\n\n createGlobal: CreateGlobal\n\n createGlobalVersion: CreateGlobalVersion\n /**\n * Output a migration file\n */\n createMigration: CreateMigration\n\n createVersion: CreateVersion\n\n /**\n * Specify if the ID is a text or number field by default within this database adapter.\n */\n defaultIDType: 'number' | 'text'\n\n deleteMany: DeleteMany\n\n deleteOne: DeleteOne\n\n deleteVersions: DeleteVersions\n\n /**\n * Terminate the connection with the database\n */\n destroy?: Destroy\n\n find: <T = TypeWithID>(args: FindArgs) => Promise<PaginatedDocs<T>>\n\n findGlobal: FindGlobal\n\n findGlobalVersions: FindGlobalVersions\n\n findOne: FindOne\n\n findVersions: FindVersions\n\n /**\n * Perform startup tasks required to interact with the database such as building Schema and models\n */\n init?: Init\n\n /**\n * Run any migration up functions that have not yet been performed and update the status\n */\n migrate: () => Promise<void>\n\n /**\n * Run any migration down functions that have been performed\n */\n migrateDown: () => Promise<void>\n\n /**\n * Drop the current database and run all migrate up functions\n */\n migrateFresh: (args: { forceAcceptWarning?: boolean }) => Promise<void>\n /**\n * Run all migration down functions before running up\n */\n migrateRefresh: () => Promise<void>\n\n /**\n * Run all migrate down functions\n */\n migrateReset: () => Promise<void>\n /**\n * Read the current state of migrations and output the result to show which have been run\n */\n migrateStatus: () => Promise<void>\n /**\n * Path to read and write migration files from\n */\n migrationDir: string\n /**\n * The name of the database adapter\n */\n name: string\n /**\n * reference to the instance of payload\n */\n payload: Payload\n\n queryDrafts: QueryDrafts\n /**\n * Abort any changes since the start of the transaction.\n */\n rollbackTransaction?: RollbackTransaction\n /**\n * A key-value store of all sessions open (used for transactions)\n */\n sessions?: {\n [id: string]: {\n db: unknown\n reject: () => Promise<void>\n resolve: () => Promise<void>\n }\n }\n\n updateGlobal: UpdateGlobal\n\n updateGlobalVersion: UpdateGlobalVersion\n\n updateOne: UpdateOne\n\n updateVersion: UpdateVersion\n}\n\nexport type Init = () => Promise<void> | void\n\ntype ConnectArgs = {\n hotReload: boolean\n}\n\nexport type Connect = (args?: ConnectArgs) => Promise<void>\n\nexport type Destroy = () => Promise<void>\n\nexport type CreateMigration = (args: {\n file?: string\n /**\n * Skips the prompt asking to create empty migrations\n */\n forceAcceptWarning?: boolean\n migrationName?: string\n payload: Payload\n}) => Promise<void>\n\nexport type Transaction = (\n callback: () => Promise<void>,\n options?: Record<string, unknown>,\n) => Promise<void>\n\nexport type BeginTransaction = (\n options?: Record<string, unknown>,\n) => Promise<null | number | string>\n\nexport type RollbackTransaction = (id: number | string) => Promise<void>\n\nexport type CommitTransaction = (id: number | string) => Promise<void>\n\nexport type QueryDraftsArgs = {\n collection: string\n limit?: number\n locale?: string\n page?: number\n pagination?: boolean\n req: PayloadRequest\n sort?: string\n where?: Where\n}\n\nexport type QueryDrafts = <T = TypeWithID>(args: QueryDraftsArgs) => Promise<PaginatedDocs<T>>\n\nexport type FindOneArgs = {\n collection: string\n locale?: string\n req: PayloadRequest\n where?: Where\n}\n\nexport type FindOne = <T extends TypeWithID>(args: FindOneArgs) => Promise<T | null>\n\nexport type FindArgs = {\n collection: string\n /** Setting limit to 1 is equal to the previous Model.findOne(). Setting limit to 0 disables the limit */\n limit?: number\n locale?: string\n page?: number\n pagination?: boolean\n req: PayloadRequest\n skip?: number\n sort?: string\n versions?: boolean\n where?: Where\n}\n\nexport type Find = <T = TypeWithID>(args: FindArgs) => Promise<PaginatedDocs<T>>\n\nexport type CountArgs = {\n collection: string\n locale?: string\n req: PayloadRequest\n where?: Where\n}\n\nexport type Count = (args: CountArgs) => Promise<{ totalDocs: number }>\n\ntype BaseVersionArgs = {\n limit?: number\n locale?: string\n page?: number\n pagination?: boolean\n req: PayloadRequest\n skip?: number\n sort?: string\n versions?: boolean\n where?: Where\n}\n\nexport type FindVersionsArgs = BaseVersionArgs & {\n collection: string\n}\n\nexport type FindVersions = <T = TypeWithID>(\n args: FindVersionsArgs,\n) => Promise<PaginatedDocs<TypeWithVersion<T>>>\n\nexport type FindGlobalVersionsArgs = BaseVersionArgs & {\n global: string\n}\n\nexport type FindGlobalArgs = {\n locale?: string\n req: PayloadRequest\n slug: string\n where?: Where\n}\n\nexport type UpdateGlobalVersionArgs<T = TypeWithID> = {\n global: string\n locale?: string\n req: PayloadRequest\n versionData: T\n} & (\n | {\n id: number | string\n where?: never\n }\n | {\n id?: never\n where: Where\n }\n)\n\nexport type UpdateGlobalVersion = <T extends TypeWithID = TypeWithID>(\n args: UpdateGlobalVersionArgs<T>,\n) => Promise<TypeWithVersion<T>>\n\nexport type FindGlobal = <T extends GlobalsTypeWithID = any>(args: FindGlobalArgs) => Promise<T>\n\nexport type CreateGlobalArgs<T extends GlobalsTypeWithID = any> = {\n data: T\n req: PayloadRequest\n slug: string\n}\nexport type CreateGlobal = <T extends GlobalsTypeWithID = any>(\n args: CreateGlobalArgs<T>,\n) => Promise<T>\n\nexport type UpdateGlobalArgs<T extends GlobalsTypeWithID = any> = {\n data: T\n req: PayloadRequest\n slug: string\n}\nexport type UpdateGlobal = <T extends GlobalsTypeWithID = any>(\n args: UpdateGlobalArgs<T>,\n) => Promise<T>\n// export type UpdateOne = (args: UpdateOneArgs) => Promise<Document>\n\nexport type FindGlobalVersions = <T = TypeWithID>(\n args: FindGlobalVersionsArgs,\n) => Promise<PaginatedDocs<TypeWithVersion<T>>>\n\nexport type DeleteVersionsArgs = {\n collection: string\n locale?: string\n req: PayloadRequest\n sort?: {\n [key: string]: string\n }\n where: Where\n}\n\nexport type CreateVersionArgs<T = TypeWithID> = {\n autosave: boolean\n collectionSlug: string\n createdAt: string\n /** ID of the parent document for which the version should be created for */\n parent: number | string\n req: PayloadRequest\n updatedAt: string\n versionData: T\n}\n\nexport type CreateVersion = <T extends TypeWithID = TypeWithID>(\n args: CreateVersionArgs<T>,\n) => Promise<TypeWithVersion<T>>\n\nexport type CreateGlobalVersionArgs<T = TypeWithID> = {\n autosave: boolean\n createdAt: string\n globalSlug: string\n /** ID of the parent document for which the version should be created for */\n parent: number | string\n req: PayloadRequest\n updatedAt: string\n versionData: T\n}\n\nexport type CreateGlobalVersion = <T extends TypeWithID = TypeWithID>(\n args: CreateGlobalVersionArgs<T>,\n) => Promise<TypeWithVersion<T>>\n\nexport type DeleteVersions = (args: DeleteVersionsArgs) => Promise<void>\n\nexport type UpdateVersionArgs<T = TypeWithID> = {\n collection: string\n locale?: string\n req: PayloadRequest\n versionData: T\n} & (\n | {\n id: number | string\n where?: never\n }\n | {\n id?: never\n where: Where\n }\n)\n\nexport type UpdateVersion = <T extends TypeWithID = TypeWithID>(\n args: UpdateVersionArgs<T>,\n) => Promise<TypeWithVersion<T>>\n\nexport type CreateArgs = {\n collection: string\n data: Record<string, unknown>\n draft?: boolean\n locale?: string\n req: PayloadRequest\n}\n\nexport type Create = (args: CreateArgs) => Promise<Document>\n\nexport type UpdateOneArgs = {\n collection: string\n data: Record<string, unknown>\n draft?: boolean\n locale?: string\n req: PayloadRequest\n} & (\n | {\n id: number | string\n where?: never\n }\n | {\n id?: never\n where: Where\n }\n)\n\nexport type UpdateOne = (args: UpdateOneArgs) => Promise<Document>\n\nexport type DeleteOneArgs = {\n collection: string\n req: PayloadRequest\n where: Where\n}\n\nexport type DeleteOne = (args: DeleteOneArgs) => Promise<Document>\n\nexport type DeleteManyArgs = {\n collection: string\n req: PayloadRequest\n where: Where\n}\n\nexport type DeleteMany = (args: DeleteManyArgs) => Promise<void>\n\nexport type Migration = MigrationData & {\n down: ({ payload, req }: { payload: Payload; req: PayloadRequest }) => Promise<boolean>\n up: ({ payload, req }: { payload: Payload; req: PayloadRequest }) => Promise<boolean>\n}\n\nexport type MigrationData = {\n batch?: number\n id?: string\n name: string\n}\n\nexport type PaginatedDocs<T = any> = {\n docs: T[]\n hasNextPage: boolean\n hasPrevPage: boolean\n limit: number\n nextPage?: null | number | undefined\n page?: number\n pagingCounter: number\n prevPage?: null | number | undefined\n totalDocs: number\n totalPages: number\n}\n\nexport type DatabaseAdapterResult<T = BaseDatabaseAdapter> = {\n defaultIDType: 'number' | 'text'\n init: (args: { payload: Payload }) => T\n}\n\nexport type DBIdentifierName =\n | ((Args: {\n /** The name of the parent table when using relational DBs */\n tableName?: string\n }) => string)\n | string\n"],"names":[],"rangeMappings":"","mappings":"AAyaA,WAKU"}
|
|
1
|
+
{"version":3,"sources":["../../src/database/types.ts"],"sourcesContent":["import type { TypeWithID } from '../collections/config/types.js'\nimport type { TypeWithID as GlobalsTypeWithID } from '../globals/config/types.js'\nimport type { Document, Payload, PayloadRequestWithData, Where } from '../types/index.js'\nimport type { TypeWithVersion } from '../versions/types.js'\n\nexport type { TypeWithVersion }\n\nexport interface BaseDatabaseAdapter {\n /**\n * Start a transaction, requiring commitTransaction() to be called for any changes to be made.\n * @returns an identifier for the transaction or null if one cannot be established\n */\n beginTransaction?: BeginTransaction\n /**\n * Persist the changes made since the start of the transaction.\n */\n commitTransaction?: CommitTransaction\n\n /**\n * Open the connection to the database\n */\n connect?: Connect\n\n count: Count\n\n create: Create\n\n createGlobal: CreateGlobal\n\n createGlobalVersion: CreateGlobalVersion\n /**\n * Output a migration file\n */\n createMigration: CreateMigration\n\n createVersion: CreateVersion\n\n /**\n * Specify if the ID is a text or number field by default within this database adapter.\n */\n defaultIDType: 'number' | 'text'\n\n deleteMany: DeleteMany\n\n deleteOne: DeleteOne\n\n deleteVersions: DeleteVersions\n\n /**\n * Terminate the connection with the database\n */\n destroy?: Destroy\n\n find: <T = TypeWithID>(args: FindArgs) => Promise<PaginatedDocs<T>>\n\n findGlobal: FindGlobal\n\n findGlobalVersions: FindGlobalVersions\n\n findOne: FindOne\n\n findVersions: FindVersions\n\n /**\n * Perform startup tasks required to interact with the database such as building Schema and models\n */\n init?: Init\n\n /**\n * Run any migration up functions that have not yet been performed and update the status\n */\n migrate: () => Promise<void>\n\n /**\n * Run any migration down functions that have been performed\n */\n migrateDown: () => Promise<void>\n\n /**\n * Drop the current database and run all migrate up functions\n */\n migrateFresh: (args: { forceAcceptWarning?: boolean }) => Promise<void>\n /**\n * Run all migration down functions before running up\n */\n migrateRefresh: () => Promise<void>\n\n /**\n * Run all migrate down functions\n */\n migrateReset: () => Promise<void>\n /**\n * Read the current state of migrations and output the result to show which have been run\n */\n migrateStatus: () => Promise<void>\n /**\n * Path to read and write migration files from\n */\n migrationDir: string\n /**\n * The name of the database adapter\n */\n name: string\n /**\n * reference to the instance of payload\n */\n payload: Payload\n\n queryDrafts: QueryDrafts\n /**\n * Abort any changes since the start of the transaction.\n */\n rollbackTransaction?: RollbackTransaction\n /**\n * A key-value store of all sessions open (used for transactions)\n */\n sessions?: {\n [id: string]: {\n db: unknown\n reject: () => Promise<void>\n resolve: () => Promise<void>\n }\n }\n\n updateGlobal: UpdateGlobal\n\n updateGlobalVersion: UpdateGlobalVersion\n\n updateOne: UpdateOne\n\n updateVersion: UpdateVersion\n}\n\nexport type Init = () => Promise<void> | void\n\ntype ConnectArgs = {\n hotReload: boolean\n}\n\nexport type Connect = (args?: ConnectArgs) => Promise<void>\n\nexport type Destroy = () => Promise<void>\n\nexport type CreateMigration = (args: {\n file?: string\n /**\n * Skips the prompt asking to create empty migrations\n */\n forceAcceptWarning?: boolean\n migrationName?: string\n payload: Payload\n}) => Promise<void>\n\nexport type Transaction = (\n callback: () => Promise<void>,\n options?: Record<string, unknown>,\n) => Promise<void>\n\nexport type BeginTransaction = (\n options?: Record<string, unknown>,\n) => Promise<null | number | string>\n\nexport type RollbackTransaction = (id: number | string) => Promise<void>\n\nexport type CommitTransaction = (id: number | string) => Promise<void>\n\nexport type QueryDraftsArgs = {\n collection: string\n limit?: number\n locale?: string\n page?: number\n pagination?: boolean\n req: PayloadRequestWithData\n sort?: string\n where?: Where\n}\n\nexport type QueryDrafts = <T = TypeWithID>(args: QueryDraftsArgs) => Promise<PaginatedDocs<T>>\n\nexport type FindOneArgs = {\n collection: string\n locale?: string\n req: PayloadRequestWithData\n where?: Where\n}\n\nexport type FindOne = <T extends TypeWithID>(args: FindOneArgs) => Promise<T | null>\n\nexport type FindArgs = {\n collection: string\n /** Setting limit to 1 is equal to the previous Model.findOne(). Setting limit to 0 disables the limit */\n limit?: number\n locale?: string\n page?: number\n pagination?: boolean\n req: PayloadRequestWithData\n skip?: number\n sort?: string\n versions?: boolean\n where?: Where\n}\n\nexport type Find = <T = TypeWithID>(args: FindArgs) => Promise<PaginatedDocs<T>>\n\nexport type CountArgs = {\n collection: string\n locale?: string\n req: PayloadRequestWithData\n where?: Where\n}\n\nexport type Count = (args: CountArgs) => Promise<{ totalDocs: number }>\n\ntype BaseVersionArgs = {\n limit?: number\n locale?: string\n page?: number\n pagination?: boolean\n req: PayloadRequestWithData\n skip?: number\n sort?: string\n versions?: boolean\n where?: Where\n}\n\nexport type FindVersionsArgs = BaseVersionArgs & {\n collection: string\n}\n\nexport type FindVersions = <T = TypeWithID>(\n args: FindVersionsArgs,\n) => Promise<PaginatedDocs<TypeWithVersion<T>>>\n\nexport type FindGlobalVersionsArgs = BaseVersionArgs & {\n global: string\n}\n\nexport type FindGlobalArgs = {\n locale?: string\n req: PayloadRequestWithData\n slug: string\n where?: Where\n}\n\nexport type UpdateGlobalVersionArgs<T = TypeWithID> = {\n global: string\n locale?: string\n req: PayloadRequestWithData\n versionData: T\n} & (\n | {\n id: number | string\n where?: never\n }\n | {\n id?: never\n where: Where\n }\n)\n\nexport type UpdateGlobalVersion = <T extends TypeWithID = TypeWithID>(\n args: UpdateGlobalVersionArgs<T>,\n) => Promise<TypeWithVersion<T>>\n\nexport type FindGlobal = <T extends GlobalsTypeWithID = any>(args: FindGlobalArgs) => Promise<T>\n\nexport type CreateGlobalArgs<T extends GlobalsTypeWithID = any> = {\n data: T\n req: PayloadRequestWithData\n slug: string\n}\nexport type CreateGlobal = <T extends GlobalsTypeWithID = any>(\n args: CreateGlobalArgs<T>,\n) => Promise<T>\n\nexport type UpdateGlobalArgs<T extends GlobalsTypeWithID = any> = {\n data: T\n req: PayloadRequestWithData\n slug: string\n}\nexport type UpdateGlobal = <T extends GlobalsTypeWithID = any>(\n args: UpdateGlobalArgs<T>,\n) => Promise<T>\n// export type UpdateOne = (args: UpdateOneArgs) => Promise<Document>\n\nexport type FindGlobalVersions = <T = TypeWithID>(\n args: FindGlobalVersionsArgs,\n) => Promise<PaginatedDocs<TypeWithVersion<T>>>\n\nexport type DeleteVersionsArgs = {\n collection: string\n locale?: string\n req: PayloadRequestWithData\n sort?: {\n [key: string]: string\n }\n where: Where\n}\n\nexport type CreateVersionArgs<T = TypeWithID> = {\n autosave: boolean\n collectionSlug: string\n createdAt: string\n /** ID of the parent document for which the version should be created for */\n parent: number | string\n req: PayloadRequestWithData\n updatedAt: string\n versionData: T\n}\n\nexport type CreateVersion = <T extends TypeWithID = TypeWithID>(\n args: CreateVersionArgs<T>,\n) => Promise<TypeWithVersion<T>>\n\nexport type CreateGlobalVersionArgs<T = TypeWithID> = {\n autosave: boolean\n createdAt: string\n globalSlug: string\n /** ID of the parent document for which the version should be created for */\n parent: number | string\n req: PayloadRequestWithData\n updatedAt: string\n versionData: T\n}\n\nexport type CreateGlobalVersion = <T extends TypeWithID = TypeWithID>(\n args: CreateGlobalVersionArgs<T>,\n) => Promise<TypeWithVersion<T>>\n\nexport type DeleteVersions = (args: DeleteVersionsArgs) => Promise<void>\n\nexport type UpdateVersionArgs<T = TypeWithID> = {\n collection: string\n locale?: string\n req: PayloadRequestWithData\n versionData: T\n} & (\n | {\n id: number | string\n where?: never\n }\n | {\n id?: never\n where: Where\n }\n)\n\nexport type UpdateVersion = <T extends TypeWithID = TypeWithID>(\n args: UpdateVersionArgs<T>,\n) => Promise<TypeWithVersion<T>>\n\nexport type CreateArgs = {\n collection: string\n data: Record<string, unknown>\n draft?: boolean\n locale?: string\n req: PayloadRequestWithData\n}\n\nexport type Create = (args: CreateArgs) => Promise<Document>\n\nexport type UpdateOneArgs = {\n collection: string\n data: Record<string, unknown>\n draft?: boolean\n locale?: string\n req: PayloadRequestWithData\n} & (\n | {\n id: number | string\n where?: never\n }\n | {\n id?: never\n where: Where\n }\n)\n\nexport type UpdateOne = (args: UpdateOneArgs) => Promise<Document>\n\nexport type DeleteOneArgs = {\n collection: string\n req: PayloadRequestWithData\n where: Where\n}\n\nexport type DeleteOne = (args: DeleteOneArgs) => Promise<Document>\n\nexport type DeleteManyArgs = {\n collection: string\n req: PayloadRequestWithData\n where: Where\n}\n\nexport type DeleteMany = (args: DeleteManyArgs) => Promise<void>\n\nexport type Migration = MigrationData & {\n down: ({ payload, req }: { payload: Payload; req: PayloadRequestWithData }) => Promise<boolean>\n up: ({ payload, req }: { payload: Payload; req: PayloadRequestWithData }) => Promise<boolean>\n}\n\nexport type MigrationData = {\n batch?: number\n id?: string\n name: string\n}\n\nexport type PaginatedDocs<T = any> = {\n docs: T[]\n hasNextPage: boolean\n hasPrevPage: boolean\n limit: number\n nextPage?: null | number | undefined\n page?: number\n pagingCounter: number\n prevPage?: null | number | undefined\n totalDocs: number\n totalPages: number\n}\n\nexport type DatabaseAdapterResult<T = BaseDatabaseAdapter> = {\n defaultIDType: 'number' | 'text'\n init: (args: { payload: Payload }) => T\n}\n\nexport type DBIdentifierName =\n | ((Args: {\n /** The name of the parent table when using relational DBs */\n tableName?: string\n }) => string)\n | string\n"],"names":[],"rangeMappings":"","mappings":"AAyaA,WAKU"}
|
|
@@ -11,7 +11,7 @@ declare class ExtendableError<TData extends object = {
|
|
|
11
11
|
* Class representing an API error.
|
|
12
12
|
* @extends ExtendableError
|
|
13
13
|
*/
|
|
14
|
-
declare class APIError<TData extends null | object = {
|
|
14
|
+
export declare class APIError<TData extends null | object = {
|
|
15
15
|
[key: string]: unknown;
|
|
16
16
|
} | null> extends ExtendableError<TData> {
|
|
17
17
|
/**
|
|
@@ -23,5 +23,5 @@ declare class APIError<TData extends null | object = {
|
|
|
23
23
|
*/
|
|
24
24
|
constructor(message: string, status?: number, data?: TData, isPublic?: boolean);
|
|
25
25
|
}
|
|
26
|
-
export
|
|
26
|
+
export {};
|
|
27
27
|
//# sourceMappingURL=APIError.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"APIError.d.ts","sourceRoot":"","sources":["../../src/errors/APIError.ts"],"names":[],"mappings":"AAGA,cAAM,eAAe,CAAC,KAAK,SAAS,MAAM,GAAG;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;CAAE,CAAE,SAAQ,KAAK;IACpF,IAAI,EAAE,KAAK,CAAA;IAEX,aAAa,EAAE,OAAO,CAAA;IAEtB,QAAQ,EAAE,OAAO,CAAA;IAEjB,MAAM,EAAE,MAAM,CAAA;gBAEF,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAE,OAAO;CAU5E;AAED;;;GAGG;AACH,
|
|
1
|
+
{"version":3,"file":"APIError.d.ts","sourceRoot":"","sources":["../../src/errors/APIError.ts"],"names":[],"mappings":"AAGA,cAAM,eAAe,CAAC,KAAK,SAAS,MAAM,GAAG;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;CAAE,CAAE,SAAQ,KAAK;IACpF,IAAI,EAAE,KAAK,CAAA;IAEX,aAAa,EAAE,OAAO,CAAA;IAEtB,QAAQ,EAAE,OAAO,CAAA;IAEjB,MAAM,EAAE,MAAM,CAAA;gBAEF,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAE,OAAO;CAU5E;AAED;;;GAGG;AACH,qBAAa,QAAQ,CACnB,KAAK,SAAS,IAAI,GAAG,MAAM,GAAG;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;CAAE,GAAG,IAAI,CAC/D,SAAQ,eAAe,CAAC,KAAK,CAAC;IAC9B;;;;;;OAMG;gBAED,OAAO,EAAE,MAAM,EACf,MAAM,GAAE,MAAyC,EACjD,IAAI,GAAE,KAAY,EAClB,QAAQ,UAAQ;CAInB"}
|
package/dist/errors/APIError.js
CHANGED
|
@@ -19,7 +19,7 @@ class ExtendableError extends Error {
|
|
|
19
19
|
/**
|
|
20
20
|
* Class representing an API error.
|
|
21
21
|
* @extends ExtendableError
|
|
22
|
-
*/ class APIError extends ExtendableError {
|
|
22
|
+
*/ export class APIError extends ExtendableError {
|
|
23
23
|
/**
|
|
24
24
|
* Creates an API error.
|
|
25
25
|
* @param {string} message - Error message.
|
|
@@ -30,6 +30,5 @@ class ExtendableError extends Error {
|
|
|
30
30
|
super(message, status, data, isPublic);
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
|
-
export default APIError;
|
|
34
33
|
|
|
35
34
|
//# sourceMappingURL=APIError.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/errors/APIError.ts"],"sourcesContent":["/* eslint-disable max-classes-per-file */\nimport httpStatus from 'http-status'\n\nclass ExtendableError<TData extends object = { [key: string]: unknown }> extends Error {\n data: TData\n\n isOperational: boolean\n\n isPublic: boolean\n\n status: number\n\n constructor(message: string, status: number, data: TData, isPublic: boolean) {\n super(message)\n this.name = this.constructor.name\n this.message = message\n this.status = status\n this.data = data\n this.isPublic = isPublic\n this.isOperational = true // This is required since bluebird 4 doesn't append it anymore.\n Error.captureStackTrace(this, this.constructor)\n }\n}\n\n/**\n * Class representing an API error.\n * @extends ExtendableError\n */\
|
|
1
|
+
{"version":3,"sources":["../../src/errors/APIError.ts"],"sourcesContent":["/* eslint-disable max-classes-per-file */\nimport httpStatus from 'http-status'\n\nclass ExtendableError<TData extends object = { [key: string]: unknown }> extends Error {\n data: TData\n\n isOperational: boolean\n\n isPublic: boolean\n\n status: number\n\n constructor(message: string, status: number, data: TData, isPublic: boolean) {\n super(message)\n this.name = this.constructor.name\n this.message = message\n this.status = status\n this.data = data\n this.isPublic = isPublic\n this.isOperational = true // This is required since bluebird 4 doesn't append it anymore.\n Error.captureStackTrace(this, this.constructor)\n }\n}\n\n/**\n * Class representing an API error.\n * @extends ExtendableError\n */\nexport class APIError<\n TData extends null | object = { [key: string]: unknown } | null,\n> extends ExtendableError<TData> {\n /**\n * Creates an API error.\n * @param {string} message - Error message.\n * @param {number} status - HTTP status code of error.\n * @param {object} data - response data to be returned.\n * @param {boolean} isPublic - Whether the message should be visible to user or not.\n */\n constructor(\n message: string,\n status: number = httpStatus.INTERNAL_SERVER_ERROR,\n data: TData = null,\n isPublic = false,\n ) {\n super(message, status, data, isPublic)\n }\n}\n"],"names":["httpStatus","ExtendableError","Error","data","isOperational","isPublic","status","constructor","message","name","captureStackTrace","APIError","INTERNAL_SERVER_ERROR"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,uCAAuC,GACvC,OAAOA,gBAAgB,cAAa;AAEpC,MAAMC,wBAA2EC;IAC/EC,KAAW;IAEXC,cAAsB;IAEtBC,SAAiB;IAEjBC,OAAc;IAEdC,YAAYC,OAAe,EAAEF,MAAc,EAAEH,IAAW,EAAEE,QAAiB,CAAE;QAC3E,KAAK,CAACG;QACN,IAAI,CAACC,IAAI,GAAG,IAAI,CAACF,WAAW,CAACE,IAAI;QACjC,IAAI,CAACD,OAAO,GAAGA;QACf,IAAI,CAACF,MAAM,GAAGA;QACd,IAAI,CAACH,IAAI,GAAGA;QACZ,IAAI,CAACE,QAAQ,GAAGA;QAChB,IAAI,CAACD,aAAa,GAAG,KAAK,+DAA+D;;QACzFF,MAAMQ,iBAAiB,CAAC,IAAI,EAAE,IAAI,CAACH,WAAW;IAChD;AACF;AAEA;;;CAGC,GACD,OAAO,MAAMI,iBAEHV;IACR;;;;;;GAMC,GACDM,YACEC,OAAe,EACfF,SAAiBN,WAAWY,qBAAqB,EACjDT,OAAc,IAAI,EAClBE,WAAW,KAAK,CAChB;QACA,KAAK,CAACG,SAASF,QAAQH,MAAME;IAC/B;AACF"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import type { TFunction } from '@payloadcms/translations';
|
|
2
|
-
import APIError from './APIError.js';
|
|
3
|
-
declare class AuthenticationError extends APIError {
|
|
2
|
+
import { APIError } from './APIError.js';
|
|
3
|
+
export declare class AuthenticationError extends APIError {
|
|
4
4
|
constructor(t?: TFunction);
|
|
5
5
|
}
|
|
6
|
-
export default AuthenticationError;
|
|
7
6
|
//# sourceMappingURL=AuthenticationError.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AuthenticationError.d.ts","sourceRoot":"","sources":["../../src/errors/AuthenticationError.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAA;AAKzD,OAAO,QAAQ,MAAM,eAAe,CAAA;
|
|
1
|
+
{"version":3,"file":"AuthenticationError.d.ts","sourceRoot":"","sources":["../../src/errors/AuthenticationError.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAA;AAKzD,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AAExC,qBAAa,mBAAoB,SAAQ,QAAQ;gBACnC,CAAC,CAAC,EAAE,SAAS;CAM1B"}
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { en } from '@payloadcms/translations/languages/en';
|
|
2
2
|
import httpStatus from 'http-status';
|
|
3
|
-
import APIError from './APIError.js';
|
|
4
|
-
class AuthenticationError extends APIError {
|
|
3
|
+
import { APIError } from './APIError.js';
|
|
4
|
+
export class AuthenticationError extends APIError {
|
|
5
5
|
constructor(t){
|
|
6
6
|
super(t ? t('error:emailOrPasswordIncorrect') : en.translations.error.emailOrPasswordIncorrect, httpStatus.UNAUTHORIZED);
|
|
7
7
|
}
|
|
8
8
|
}
|
|
9
|
-
export default AuthenticationError;
|
|
10
9
|
|
|
11
10
|
//# sourceMappingURL=AuthenticationError.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/errors/AuthenticationError.ts"],"sourcesContent":["import type { TFunction } from '@payloadcms/translations'\n\nimport { en } from '@payloadcms/translations/languages/en'\nimport httpStatus from 'http-status'\n\nimport APIError from './APIError.js'\n\
|
|
1
|
+
{"version":3,"sources":["../../src/errors/AuthenticationError.ts"],"sourcesContent":["import type { TFunction } from '@payloadcms/translations'\n\nimport { en } from '@payloadcms/translations/languages/en'\nimport httpStatus from 'http-status'\n\nimport { APIError } from './APIError.js'\n\nexport class AuthenticationError extends APIError {\n constructor(t?: TFunction) {\n super(\n t ? t('error:emailOrPasswordIncorrect') : en.translations.error.emailOrPasswordIncorrect,\n httpStatus.UNAUTHORIZED,\n )\n }\n}\n"],"names":["en","httpStatus","APIError","AuthenticationError","constructor","t","translations","error","emailOrPasswordIncorrect","UNAUTHORIZED"],"rangeMappings":";;;;;;;","mappings":"AAEA,SAASA,EAAE,QAAQ,wCAAuC;AAC1D,OAAOC,gBAAgB,cAAa;AAEpC,SAASC,QAAQ,QAAQ,gBAAe;AAExC,OAAO,MAAMC,4BAA4BD;IACvCE,YAAYC,CAAa,CAAE;QACzB,KAAK,CACHA,IAAIA,EAAE,oCAAoCL,GAAGM,YAAY,CAACC,KAAK,CAACC,wBAAwB,EACxFP,WAAWQ,YAAY;IAE3B;AACF"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import APIError from './APIError.js';
|
|
2
|
-
declare class DuplicateCollection extends APIError {
|
|
1
|
+
import { APIError } from './APIError.js';
|
|
2
|
+
export declare class DuplicateCollection extends APIError {
|
|
3
3
|
constructor(propertyName: string, duplicates: string[]);
|
|
4
4
|
}
|
|
5
|
-
export default DuplicateCollection;
|
|
6
5
|
//# sourceMappingURL=DuplicateCollection.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DuplicateCollection.d.ts","sourceRoot":"","sources":["../../src/errors/DuplicateCollection.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,eAAe,CAAA;
|
|
1
|
+
{"version":3,"file":"DuplicateCollection.d.ts","sourceRoot":"","sources":["../../src/errors/DuplicateCollection.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AAExC,qBAAa,mBAAoB,SAAQ,QAAQ;gBACnC,YAAY,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE;CAGvD"}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import APIError from './APIError.js';
|
|
2
|
-
class DuplicateCollection extends APIError {
|
|
1
|
+
import { APIError } from './APIError.js';
|
|
2
|
+
export class DuplicateCollection extends APIError {
|
|
3
3
|
constructor(propertyName, duplicates){
|
|
4
4
|
super(`Collection ${propertyName} already in use: "${duplicates.join(', ')}"`);
|
|
5
5
|
}
|
|
6
6
|
}
|
|
7
|
-
export default DuplicateCollection;
|
|
8
7
|
|
|
9
8
|
//# sourceMappingURL=DuplicateCollection.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/errors/DuplicateCollection.ts"],"sourcesContent":["import APIError from './APIError.js'\n\
|
|
1
|
+
{"version":3,"sources":["../../src/errors/DuplicateCollection.ts"],"sourcesContent":["import { APIError } from './APIError.js'\n\nexport class DuplicateCollection extends APIError {\n constructor(propertyName: string, duplicates: string[]) {\n super(`Collection ${propertyName} already in use: \"${duplicates.join(', ')}\"`)\n }\n}\n"],"names":["APIError","DuplicateCollection","constructor","propertyName","duplicates","join"],"rangeMappings":";;;;;","mappings":"AAAA,SAASA,QAAQ,QAAQ,gBAAe;AAExC,OAAO,MAAMC,4BAA4BD;IACvCE,YAAYC,YAAoB,EAAEC,UAAoB,CAAE;QACtD,KAAK,CAAC,CAAC,WAAW,EAAED,aAAa,kBAAkB,EAAEC,WAAWC,IAAI,CAAC,MAAM,CAAC,CAAC;IAC/E;AACF"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import APIError from './APIError.js';
|
|
2
|
-
declare class DuplicateFieldName extends APIError {
|
|
1
|
+
import { APIError } from './APIError.js';
|
|
2
|
+
export declare class DuplicateFieldName extends APIError {
|
|
3
3
|
constructor(fieldName: string);
|
|
4
4
|
}
|
|
5
|
-
export default DuplicateFieldName;
|
|
6
5
|
//# sourceMappingURL=DuplicateFieldName.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DuplicateFieldName.d.ts","sourceRoot":"","sources":["../../src/errors/DuplicateFieldName.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,eAAe,CAAA;
|
|
1
|
+
{"version":3,"file":"DuplicateFieldName.d.ts","sourceRoot":"","sources":["../../src/errors/DuplicateFieldName.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AAExC,qBAAa,kBAAmB,SAAQ,QAAQ;gBAClC,SAAS,EAAE,MAAM;CAK9B"}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import APIError from './APIError.js';
|
|
2
|
-
class DuplicateFieldName extends APIError {
|
|
1
|
+
import { APIError } from './APIError.js';
|
|
2
|
+
export class DuplicateFieldName extends APIError {
|
|
3
3
|
constructor(fieldName){
|
|
4
4
|
super(`A field with the name '${fieldName}' was found multiple times on the same level. Field names must be unique.`);
|
|
5
5
|
}
|
|
6
6
|
}
|
|
7
|
-
export default DuplicateFieldName;
|
|
8
7
|
|
|
9
8
|
//# sourceMappingURL=DuplicateFieldName.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/errors/DuplicateFieldName.ts"],"sourcesContent":["import APIError from './APIError.js'\n\
|
|
1
|
+
{"version":3,"sources":["../../src/errors/DuplicateFieldName.ts"],"sourcesContent":["import { APIError } from './APIError.js'\n\nexport class DuplicateFieldName extends APIError {\n constructor(fieldName: string) {\n super(\n `A field with the name '${fieldName}' was found multiple times on the same level. Field names must be unique.`,\n )\n }\n}\n"],"names":["APIError","DuplicateFieldName","constructor","fieldName"],"rangeMappings":";;;;;","mappings":"AAAA,SAASA,QAAQ,QAAQ,gBAAe;AAExC,OAAO,MAAMC,2BAA2BD;IACtCE,YAAYC,SAAiB,CAAE;QAC7B,KAAK,CACH,CAAC,uBAAuB,EAAEA,UAAU,yEAAyE,CAAC;IAElH;AACF"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import type { GlobalConfig } from '../globals/config/types.js';
|
|
2
|
-
import APIError from './APIError.js';
|
|
3
|
-
declare class DuplicateGlobal extends APIError {
|
|
2
|
+
import { APIError } from './APIError.js';
|
|
3
|
+
export declare class DuplicateGlobal extends APIError {
|
|
4
4
|
constructor(config: GlobalConfig);
|
|
5
5
|
}
|
|
6
|
-
export default DuplicateGlobal;
|
|
7
6
|
//# sourceMappingURL=DuplicateGlobal.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DuplicateGlobal.d.ts","sourceRoot":"","sources":["../../src/errors/DuplicateGlobal.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAA;AAE9D,OAAO,QAAQ,MAAM,eAAe,CAAA;
|
|
1
|
+
{"version":3,"file":"DuplicateGlobal.d.ts","sourceRoot":"","sources":["../../src/errors/DuplicateGlobal.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAA;AAE9D,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AAExC,qBAAa,eAAgB,SAAQ,QAAQ;gBAC/B,MAAM,EAAE,YAAY;CAGjC"}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import APIError from './APIError.js';
|
|
2
|
-
class DuplicateGlobal extends APIError {
|
|
1
|
+
import { APIError } from './APIError.js';
|
|
2
|
+
export class DuplicateGlobal extends APIError {
|
|
3
3
|
constructor(config){
|
|
4
4
|
super(`Global label "${config.label}" is already in use`);
|
|
5
5
|
}
|
|
6
6
|
}
|
|
7
|
-
export default DuplicateGlobal;
|
|
8
7
|
|
|
9
8
|
//# sourceMappingURL=DuplicateGlobal.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/errors/DuplicateGlobal.ts"],"sourcesContent":["import type { GlobalConfig } from '../globals/config/types.js'\n\nimport APIError from './APIError.js'\n\
|
|
1
|
+
{"version":3,"sources":["../../src/errors/DuplicateGlobal.ts"],"sourcesContent":["import type { GlobalConfig } from '../globals/config/types.js'\n\nimport { APIError } from './APIError.js'\n\nexport class DuplicateGlobal extends APIError {\n constructor(config: GlobalConfig) {\n super(`Global label \"${config.label}\" is already in use`)\n }\n}\n"],"names":["APIError","DuplicateGlobal","constructor","config","label"],"rangeMappings":";;;;;","mappings":"AAEA,SAASA,QAAQ,QAAQ,gBAAe;AAExC,OAAO,MAAMC,wBAAwBD;IACnCE,YAAYC,MAAoB,CAAE;QAChC,KAAK,CAAC,CAAC,cAAc,EAAEA,OAAOC,KAAK,CAAC,mBAAmB,CAAC;IAC1D;AACF"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import type { TFunction } from '@payloadcms/translations';
|
|
2
|
-
import APIError from './APIError.js';
|
|
3
|
-
declare class ErrorDeletingFile extends APIError {
|
|
2
|
+
import { APIError } from './APIError.js';
|
|
3
|
+
export declare class ErrorDeletingFile extends APIError {
|
|
4
4
|
constructor(t?: TFunction);
|
|
5
5
|
}
|
|
6
|
-
export default ErrorDeletingFile;
|
|
7
6
|
//# sourceMappingURL=ErrorDeletingFile.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ErrorDeletingFile.d.ts","sourceRoot":"","sources":["../../src/errors/ErrorDeletingFile.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAA;AAKzD,OAAO,QAAQ,MAAM,eAAe,CAAA;
|
|
1
|
+
{"version":3,"file":"ErrorDeletingFile.d.ts","sourceRoot":"","sources":["../../src/errors/ErrorDeletingFile.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAA;AAKzD,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AAExC,qBAAa,iBAAkB,SAAQ,QAAQ;gBACjC,CAAC,CAAC,EAAE,SAAS;CAM1B"}
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { en } from '@payloadcms/translations/languages/en';
|
|
2
2
|
import httpStatus from 'http-status';
|
|
3
|
-
import APIError from './APIError.js';
|
|
4
|
-
class ErrorDeletingFile extends APIError {
|
|
3
|
+
import { APIError } from './APIError.js';
|
|
4
|
+
export class ErrorDeletingFile extends APIError {
|
|
5
5
|
constructor(t){
|
|
6
6
|
super(t ? t('error:deletingFile') : en.translations.error.deletingFile, httpStatus.INTERNAL_SERVER_ERROR);
|
|
7
7
|
}
|
|
8
8
|
}
|
|
9
|
-
export default ErrorDeletingFile;
|
|
10
9
|
|
|
11
10
|
//# sourceMappingURL=ErrorDeletingFile.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/errors/ErrorDeletingFile.ts"],"sourcesContent":["import type { TFunction } from '@payloadcms/translations'\n\nimport { en } from '@payloadcms/translations/languages/en'\nimport httpStatus from 'http-status'\n\nimport APIError from './APIError.js'\n\
|
|
1
|
+
{"version":3,"sources":["../../src/errors/ErrorDeletingFile.ts"],"sourcesContent":["import type { TFunction } from '@payloadcms/translations'\n\nimport { en } from '@payloadcms/translations/languages/en'\nimport httpStatus from 'http-status'\n\nimport { APIError } from './APIError.js'\n\nexport class ErrorDeletingFile extends APIError {\n constructor(t?: TFunction) {\n super(\n t ? t('error:deletingFile') : en.translations.error.deletingFile,\n httpStatus.INTERNAL_SERVER_ERROR,\n )\n }\n}\n"],"names":["en","httpStatus","APIError","ErrorDeletingFile","constructor","t","translations","error","deletingFile","INTERNAL_SERVER_ERROR"],"rangeMappings":";;;;;;;","mappings":"AAEA,SAASA,EAAE,QAAQ,wCAAuC;AAC1D,OAAOC,gBAAgB,cAAa;AAEpC,SAASC,QAAQ,QAAQ,gBAAe;AAExC,OAAO,MAAMC,0BAA0BD;IACrCE,YAAYC,CAAa,CAAE;QACzB,KAAK,CACHA,IAAIA,EAAE,wBAAwBL,GAAGM,YAAY,CAACC,KAAK,CAACC,YAAY,EAChEP,WAAWQ,qBAAqB;IAEpC;AACF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FileRetrievalError.d.ts","sourceRoot":"","sources":["../../src/errors/FileRetrievalError.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAA;AAIzD,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AAExC,qBAAa,kBAAmB,SAAQ,QAAQ;gBAClC,CAAC,CAAC,EAAE,SAAS,EAAE,OAAO,CAAC,EAAE,MAAM;CAQ5C"}
|