@zudojs/errors 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +35 -0
- package/dist/.tsbuildinfo +1 -0
- package/dist/base/core/baseError.core.d.ts +40 -0
- package/dist/base/core/baseError.core.d.ts.map +1 -0
- package/dist/base/core/baseError.core.js +115 -0
- package/dist/base/core/baseError.core.js.map +1 -0
- package/dist/base/core/errorMetadata.core.d.ts +24 -0
- package/dist/base/core/errorMetadata.core.d.ts.map +1 -0
- package/dist/base/core/errorMetadata.core.js +87 -0
- package/dist/base/core/errorMetadata.core.js.map +1 -0
- package/dist/base/core/errorMetadata.type.d.ts +20 -0
- package/dist/base/core/errorMetadata.type.d.ts.map +1 -0
- package/dist/base/core/errorMetadata.type.js +2 -0
- package/dist/base/core/errorMetadata.type.js.map +1 -0
- package/dist/base/core/index.d.ts +9 -0
- package/dist/base/core/index.d.ts.map +1 -0
- package/dist/base/core/index.js +9 -0
- package/dist/base/core/index.js.map +1 -0
- package/dist/base/index.d.ts +9 -0
- package/dist/base/index.d.ts.map +1 -0
- package/dist/base/index.js +9 -0
- package/dist/base/index.js.map +1 -0
- package/dist/base/types/baseError.type.d.ts +35 -0
- package/dist/base/types/baseError.type.d.ts.map +1 -0
- package/dist/base/types/baseError.type.js +2 -0
- package/dist/base/types/baseError.type.js.map +1 -0
- package/dist/base/types/errorCategory.enum.d.ts +49 -0
- package/dist/base/types/errorCategory.enum.d.ts.map +1 -0
- package/dist/base/types/errorCategory.enum.js +50 -0
- package/dist/base/types/errorCategory.enum.js.map +1 -0
- package/dist/base/types/errorCategory.helpers.d.ts +17 -0
- package/dist/base/types/errorCategory.helpers.d.ts.map +1 -0
- package/dist/base/types/errorCategory.helpers.js +80 -0
- package/dist/base/types/errorCategory.helpers.js.map +1 -0
- package/dist/base/types/errorCategory.type.d.ts +6 -0
- package/dist/base/types/errorCategory.type.d.ts.map +1 -0
- package/dist/base/types/errorCategory.type.js +6 -0
- package/dist/base/types/errorCategory.type.js.map +1 -0
- package/dist/base/types/errorCode.type.d.ts +314 -0
- package/dist/base/types/errorCode.type.d.ts.map +1 -0
- package/dist/base/types/errorCode.type.js +355 -0
- package/dist/base/types/errorCode.type.js.map +1 -0
- package/dist/base/types/errorSeverity.type.d.ts +58 -0
- package/dist/base/types/errorSeverity.type.d.ts.map +1 -0
- package/dist/base/types/errorSeverity.type.js +90 -0
- package/dist/base/types/errorSeverity.type.js.map +1 -0
- package/dist/base/types/index.d.ts +10 -0
- package/dist/base/types/index.d.ts.map +1 -0
- package/dist/base/types/index.js +10 -0
- package/dist/base/types/index.js.map +1 -0
- package/dist/base/utils/baseError.utils.d.ts +38 -0
- package/dist/base/utils/baseError.utils.d.ts.map +1 -0
- package/dist/base/utils/baseError.utils.js +72 -0
- package/dist/base/utils/baseError.utils.js.map +1 -0
- package/dist/base/utils/index.d.ts +7 -0
- package/dist/base/utils/index.d.ts.map +1 -0
- package/dist/base/utils/index.js +7 -0
- package/dist/base/utils/index.js.map +1 -0
- package/dist/domain/access/authentication.error.d.ts +33 -0
- package/dist/domain/access/authentication.error.d.ts.map +1 -0
- package/dist/domain/access/authentication.error.js +70 -0
- package/dist/domain/access/authentication.error.js.map +1 -0
- package/dist/domain/access/authorization.error.d.ts +27 -0
- package/dist/domain/access/authorization.error.d.ts.map +1 -0
- package/dist/domain/access/authorization.error.js +65 -0
- package/dist/domain/access/authorization.error.js.map +1 -0
- package/dist/domain/access/index.d.ts +9 -0
- package/dist/domain/access/index.d.ts.map +1 -0
- package/dist/domain/access/index.js +9 -0
- package/dist/domain/access/index.js.map +1 -0
- package/dist/domain/access/rateLimit.error.d.ts +44 -0
- package/dist/domain/access/rateLimit.error.d.ts.map +1 -0
- package/dist/domain/access/rateLimit.error.js +67 -0
- package/dist/domain/access/rateLimit.error.js.map +1 -0
- package/dist/domain/api/api.error.d.ts +8 -0
- package/dist/domain/api/api.error.d.ts.map +1 -0
- package/dist/domain/api/api.error.js +7 -0
- package/dist/domain/api/api.error.js.map +1 -0
- package/dist/domain/api/apiError.base.d.ts +61 -0
- package/dist/domain/api/apiError.base.d.ts.map +1 -0
- package/dist/domain/api/apiError.base.js +80 -0
- package/dist/domain/api/apiError.base.js.map +1 -0
- package/dist/domain/api/apiError.lifecycle.d.ts +42 -0
- package/dist/domain/api/apiError.lifecycle.d.ts.map +1 -0
- package/dist/domain/api/apiError.lifecycle.js +73 -0
- package/dist/domain/api/apiError.lifecycle.js.map +1 -0
- package/dist/domain/api/apiError.routing.d.ts +31 -0
- package/dist/domain/api/apiError.routing.d.ts.map +1 -0
- package/dist/domain/api/apiError.routing.js +64 -0
- package/dist/domain/api/apiError.routing.js.map +1 -0
- package/dist/domain/api/index.d.ts +8 -0
- package/dist/domain/api/index.d.ts.map +1 -0
- package/dist/domain/api/index.js +7 -0
- package/dist/domain/api/index.js.map +1 -0
- package/dist/domain/app/application.error.d.ts +28 -0
- package/dist/domain/app/application.error.d.ts.map +1 -0
- package/dist/domain/app/application.error.js +36 -0
- package/dist/domain/app/application.error.js.map +1 -0
- package/dist/domain/app/configuration.error.d.ts +47 -0
- package/dist/domain/app/configuration.error.d.ts.map +1 -0
- package/dist/domain/app/configuration.error.js +73 -0
- package/dist/domain/app/configuration.error.js.map +1 -0
- package/dist/domain/app/domain.error.d.ts +36 -0
- package/dist/domain/app/domain.error.d.ts.map +1 -0
- package/dist/domain/app/domain.error.js +59 -0
- package/dist/domain/app/domain.error.js.map +1 -0
- package/dist/domain/app/index.d.ts +11 -0
- package/dist/domain/app/index.d.ts.map +1 -0
- package/dist/domain/app/index.js +11 -0
- package/dist/domain/app/index.js.map +1 -0
- package/dist/domain/app/lifecycle.error.d.ts +7 -0
- package/dist/domain/app/lifecycle.error.d.ts.map +1 -0
- package/dist/domain/app/lifecycle.error.js +6 -0
- package/dist/domain/app/lifecycle.error.js.map +1 -0
- package/dist/domain/app/lifecycleError.base.d.ts +39 -0
- package/dist/domain/app/lifecycleError.base.d.ts.map +1 -0
- package/dist/domain/app/lifecycleError.base.js +43 -0
- package/dist/domain/app/lifecycleError.base.js.map +1 -0
- package/dist/domain/app/lifecycleError.types.d.ts +41 -0
- package/dist/domain/app/lifecycleError.types.d.ts.map +1 -0
- package/dist/domain/app/lifecycleError.types.js +105 -0
- package/dist/domain/app/lifecycleError.types.js.map +1 -0
- package/dist/domain/app/module.error.d.ts +6 -0
- package/dist/domain/app/module.error.d.ts.map +1 -0
- package/dist/domain/app/module.error.js +6 -0
- package/dist/domain/app/module.error.js.map +1 -0
- package/dist/domain/app/moduleError.base.d.ts +40 -0
- package/dist/domain/app/moduleError.base.d.ts.map +1 -0
- package/dist/domain/app/moduleError.base.js +42 -0
- package/dist/domain/app/moduleError.base.js.map +1 -0
- package/dist/domain/app/moduleError.types.d.ts +27 -0
- package/dist/domain/app/moduleError.types.d.ts.map +1 -0
- package/dist/domain/app/moduleError.types.js +60 -0
- package/dist/domain/app/moduleError.types.js.map +1 -0
- package/dist/domain/body/bodyParser.error.d.ts +44 -0
- package/dist/domain/body/bodyParser.error.d.ts.map +1 -0
- package/dist/domain/body/bodyParser.error.js +71 -0
- package/dist/domain/body/bodyParser.error.js.map +1 -0
- package/dist/domain/body/httpBody.error.d.ts +6 -0
- package/dist/domain/body/httpBody.error.d.ts.map +1 -0
- package/dist/domain/body/httpBody.error.js +6 -0
- package/dist/domain/body/httpBody.error.js.map +1 -0
- package/dist/domain/body/httpBodyError.base.d.ts +20 -0
- package/dist/domain/body/httpBodyError.base.d.ts.map +1 -0
- package/dist/domain/body/httpBodyError.base.js +29 -0
- package/dist/domain/body/httpBodyError.base.js.map +1 -0
- package/dist/domain/body/httpBodyError.types.d.ts +24 -0
- package/dist/domain/body/httpBodyError.types.d.ts.map +1 -0
- package/dist/domain/body/httpBodyError.types.js +45 -0
- package/dist/domain/body/httpBodyError.types.js.map +1 -0
- package/dist/domain/body/httpFormData.error.d.ts +36 -0
- package/dist/domain/body/httpFormData.error.d.ts.map +1 -0
- package/dist/domain/body/httpFormData.error.js +55 -0
- package/dist/domain/body/httpFormData.error.js.map +1 -0
- package/dist/domain/body/index.d.ts +10 -0
- package/dist/domain/body/index.d.ts.map +1 -0
- package/dist/domain/body/index.js +10 -0
- package/dist/domain/body/index.js.map +1 -0
- package/dist/domain/body/multipart.error.d.ts +36 -0
- package/dist/domain/body/multipart.error.d.ts.map +1 -0
- package/dist/domain/body/multipart.error.js +56 -0
- package/dist/domain/body/multipart.error.js.map +1 -0
- package/dist/domain/documentation/documentation.error.d.ts +7 -0
- package/dist/domain/documentation/documentation.error.d.ts.map +1 -0
- package/dist/domain/documentation/documentation.error.js +6 -0
- package/dist/domain/documentation/documentation.error.js.map +1 -0
- package/dist/domain/documentation/documentationError.base.d.ts +36 -0
- package/dist/domain/documentation/documentationError.base.d.ts.map +1 -0
- package/dist/domain/documentation/documentationError.base.js +38 -0
- package/dist/domain/documentation/documentationError.base.js.map +1 -0
- package/dist/domain/documentation/documentationError.types.d.ts +46 -0
- package/dist/domain/documentation/documentationError.types.d.ts.map +1 -0
- package/dist/domain/documentation/documentationError.types.js +136 -0
- package/dist/domain/documentation/documentationError.types.js.map +1 -0
- package/dist/domain/documentation/index.d.ts +8 -0
- package/dist/domain/documentation/index.d.ts.map +1 -0
- package/dist/domain/documentation/index.js +7 -0
- package/dist/domain/documentation/index.js.map +1 -0
- package/dist/domain/event/event.error.d.ts +9 -0
- package/dist/domain/event/event.error.d.ts.map +1 -0
- package/dist/domain/event/event.error.js +8 -0
- package/dist/domain/event/event.error.js.map +1 -0
- package/dist/domain/event/eventError.base.d.ts +50 -0
- package/dist/domain/event/eventError.base.d.ts.map +1 -0
- package/dist/domain/event/eventError.base.js +64 -0
- package/dist/domain/event/eventError.base.js.map +1 -0
- package/dist/domain/event/eventError.handler.d.ts +34 -0
- package/dist/domain/event/eventError.handler.d.ts.map +1 -0
- package/dist/domain/event/eventError.handler.js +58 -0
- package/dist/domain/event/eventError.handler.js.map +1 -0
- package/dist/domain/event/eventError.lifecycle.d.ts +56 -0
- package/dist/domain/event/eventError.lifecycle.d.ts.map +1 -0
- package/dist/domain/event/eventError.lifecycle.js +118 -0
- package/dist/domain/event/eventError.lifecycle.js.map +1 -0
- package/dist/domain/event/eventError.serialization.d.ts +17 -0
- package/dist/domain/event/eventError.serialization.d.ts.map +1 -0
- package/dist/domain/event/eventError.serialization.js +23 -0
- package/dist/domain/event/eventError.serialization.js.map +1 -0
- package/dist/domain/event/index.d.ts +7 -0
- package/dist/domain/event/index.d.ts.map +1 -0
- package/dist/domain/event/index.js +7 -0
- package/dist/domain/event/index.js.map +1 -0
- package/dist/domain/index.d.ts +20 -0
- package/dist/domain/index.d.ts.map +1 -0
- package/dist/domain/index.js +20 -0
- package/dist/domain/index.js.map +1 -0
- package/dist/domain/message/index.d.ts +7 -0
- package/dist/domain/message/index.d.ts.map +1 -0
- package/dist/domain/message/index.js +7 -0
- package/dist/domain/message/index.js.map +1 -0
- package/dist/domain/message/message.error.d.ts +9 -0
- package/dist/domain/message/message.error.d.ts.map +1 -0
- package/dist/domain/message/message.error.js +8 -0
- package/dist/domain/message/message.error.js.map +1 -0
- package/dist/domain/message/messageError.base.d.ts +50 -0
- package/dist/domain/message/messageError.base.d.ts.map +1 -0
- package/dist/domain/message/messageError.base.js +66 -0
- package/dist/domain/message/messageError.base.js.map +1 -0
- package/dist/domain/message/messageError.handler.d.ts +34 -0
- package/dist/domain/message/messageError.handler.d.ts.map +1 -0
- package/dist/domain/message/messageError.handler.js +58 -0
- package/dist/domain/message/messageError.handler.js.map +1 -0
- package/dist/domain/message/messageError.lifecycle.d.ts +40 -0
- package/dist/domain/message/messageError.lifecycle.d.ts.map +1 -0
- package/dist/domain/message/messageError.lifecycle.js +76 -0
- package/dist/domain/message/messageError.lifecycle.js.map +1 -0
- package/dist/domain/message/messageError.validation.d.ts +10 -0
- package/dist/domain/message/messageError.validation.d.ts.map +1 -0
- package/dist/domain/message/messageError.validation.js +20 -0
- package/dist/domain/message/messageError.validation.js.map +1 -0
- package/dist/domain/plugin/index.d.ts +3 -0
- package/dist/domain/plugin/index.d.ts.map +1 -0
- package/dist/domain/plugin/index.js +2 -0
- package/dist/domain/plugin/index.js.map +1 -0
- package/dist/domain/plugin/plugin.error.d.ts +8 -0
- package/dist/domain/plugin/plugin.error.d.ts.map +1 -0
- package/dist/domain/plugin/plugin.error.js +7 -0
- package/dist/domain/plugin/plugin.error.js.map +1 -0
- package/dist/domain/plugin/pluginError.base.d.ts +36 -0
- package/dist/domain/plugin/pluginError.base.d.ts.map +1 -0
- package/dist/domain/plugin/pluginError.base.js +38 -0
- package/dist/domain/plugin/pluginError.base.js.map +1 -0
- package/dist/domain/plugin/pluginError.lifecycle.d.ts +41 -0
- package/dist/domain/plugin/pluginError.lifecycle.d.ts.map +1 -0
- package/dist/domain/plugin/pluginError.lifecycle.js +124 -0
- package/dist/domain/plugin/pluginError.lifecycle.js.map +1 -0
- package/dist/domain/plugin/pluginError.runtime.d.ts +13 -0
- package/dist/domain/plugin/pluginError.runtime.d.ts.map +1 -0
- package/dist/domain/plugin/pluginError.runtime.js +34 -0
- package/dist/domain/plugin/pluginError.runtime.js.map +1 -0
- package/dist/domain/queue/index.d.ts +9 -0
- package/dist/domain/queue/index.d.ts.map +1 -0
- package/dist/domain/queue/index.js +8 -0
- package/dist/domain/queue/index.js.map +1 -0
- package/dist/domain/queue/queue.error.d.ts +9 -0
- package/dist/domain/queue/queue.error.d.ts.map +1 -0
- package/dist/domain/queue/queue.error.js +8 -0
- package/dist/domain/queue/queue.error.js.map +1 -0
- package/dist/domain/queue/queueError.base.d.ts +25 -0
- package/dist/domain/queue/queueError.base.d.ts.map +1 -0
- package/dist/domain/queue/queueError.base.js +45 -0
- package/dist/domain/queue/queueError.base.js.map +1 -0
- package/dist/domain/queue/queueError.job.d.ts +72 -0
- package/dist/domain/queue/queueError.job.d.ts.map +1 -0
- package/dist/domain/queue/queueError.job.js +125 -0
- package/dist/domain/queue/queueError.job.js.map +1 -0
- package/dist/domain/queue/queueError.queue.d.ts +21 -0
- package/dist/domain/queue/queueError.queue.d.ts.map +1 -0
- package/dist/domain/queue/queueError.queue.js +49 -0
- package/dist/domain/queue/queueError.queue.js.map +1 -0
- package/dist/domain/queue/queueError.worker.d.ts +26 -0
- package/dist/domain/queue/queueError.worker.d.ts.map +1 -0
- package/dist/domain/queue/queueError.worker.js +38 -0
- package/dist/domain/queue/queueError.worker.js.map +1 -0
- package/dist/domain/rpc/index.d.ts +3 -0
- package/dist/domain/rpc/index.d.ts.map +1 -0
- package/dist/domain/rpc/index.js +2 -0
- package/dist/domain/rpc/index.js.map +1 -0
- package/dist/domain/rpc/rpc.error.d.ts +8 -0
- package/dist/domain/rpc/rpc.error.d.ts.map +1 -0
- package/dist/domain/rpc/rpc.error.js +7 -0
- package/dist/domain/rpc/rpc.error.js.map +1 -0
- package/dist/domain/rpc/rpcError.base.d.ts +44 -0
- package/dist/domain/rpc/rpcError.base.d.ts.map +1 -0
- package/dist/domain/rpc/rpcError.base.js +64 -0
- package/dist/domain/rpc/rpcError.base.js.map +1 -0
- package/dist/domain/rpc/rpcError.protocol.d.ts +35 -0
- package/dist/domain/rpc/rpcError.protocol.d.ts.map +1 -0
- package/dist/domain/rpc/rpcError.protocol.js +94 -0
- package/dist/domain/rpc/rpcError.protocol.js.map +1 -0
- package/dist/domain/rpc/rpcError.transport.d.ts +31 -0
- package/dist/domain/rpc/rpcError.transport.d.ts.map +1 -0
- package/dist/domain/rpc/rpcError.transport.js +85 -0
- package/dist/domain/rpc/rpcError.transport.js.map +1 -0
- package/dist/domain/scheduler/index.d.ts +3 -0
- package/dist/domain/scheduler/index.d.ts.map +1 -0
- package/dist/domain/scheduler/index.js +2 -0
- package/dist/domain/scheduler/index.js.map +1 -0
- package/dist/domain/scheduler/scheduler.error.d.ts +8 -0
- package/dist/domain/scheduler/scheduler.error.d.ts.map +1 -0
- package/dist/domain/scheduler/scheduler.error.js +7 -0
- package/dist/domain/scheduler/scheduler.error.js.map +1 -0
- package/dist/domain/scheduler/schedulerError.base.d.ts +63 -0
- package/dist/domain/scheduler/schedulerError.base.d.ts.map +1 -0
- package/dist/domain/scheduler/schedulerError.base.js +110 -0
- package/dist/domain/scheduler/schedulerError.base.js.map +1 -0
- package/dist/domain/scheduler/schedulerError.execution.d.ts +25 -0
- package/dist/domain/scheduler/schedulerError.execution.d.ts.map +1 -0
- package/dist/domain/scheduler/schedulerError.execution.js +68 -0
- package/dist/domain/scheduler/schedulerError.execution.js.map +1 -0
- package/dist/domain/scheduler/schedulerError.schedule.d.ts +25 -0
- package/dist/domain/scheduler/schedulerError.schedule.d.ts.map +1 -0
- package/dist/domain/scheduler/schedulerError.schedule.js +66 -0
- package/dist/domain/scheduler/schedulerError.schedule.js.map +1 -0
- package/dist/domain/schema/index.d.ts +7 -0
- package/dist/domain/schema/index.d.ts.map +1 -0
- package/dist/domain/schema/index.js +7 -0
- package/dist/domain/schema/index.js.map +1 -0
- package/dist/domain/schema/schema.error.d.ts +6 -0
- package/dist/domain/schema/schema.error.d.ts.map +1 -0
- package/dist/domain/schema/schema.error.js +6 -0
- package/dist/domain/schema/schema.error.js.map +1 -0
- package/dist/domain/schema/schemaError.base.d.ts +21 -0
- package/dist/domain/schema/schemaError.base.d.ts.map +1 -0
- package/dist/domain/schema/schemaError.base.js +25 -0
- package/dist/domain/schema/schemaError.base.js.map +1 -0
- package/dist/domain/schema/schemaError.types.d.ts +53 -0
- package/dist/domain/schema/schemaError.types.d.ts.map +1 -0
- package/dist/domain/schema/schemaError.types.js +94 -0
- package/dist/domain/schema/schemaError.types.js.map +1 -0
- package/dist/domain/serialization/index.d.ts +7 -0
- package/dist/domain/serialization/index.d.ts.map +1 -0
- package/dist/domain/serialization/index.js +7 -0
- package/dist/domain/serialization/index.js.map +1 -0
- package/dist/domain/serialization/serialization.error.d.ts +7 -0
- package/dist/domain/serialization/serialization.error.d.ts.map +1 -0
- package/dist/domain/serialization/serialization.error.js +6 -0
- package/dist/domain/serialization/serialization.error.js.map +1 -0
- package/dist/domain/serialization/serializationError.base.d.ts +47 -0
- package/dist/domain/serialization/serializationError.base.d.ts.map +1 -0
- package/dist/domain/serialization/serializationError.base.js +54 -0
- package/dist/domain/serialization/serializationError.base.js.map +1 -0
- package/dist/domain/serialization/serializationError.types.d.ts +64 -0
- package/dist/domain/serialization/serializationError.types.d.ts.map +1 -0
- package/dist/domain/serialization/serializationError.types.js +131 -0
- package/dist/domain/serialization/serializationError.types.js.map +1 -0
- package/dist/domain/state/conflict.error.d.ts +26 -0
- package/dist/domain/state/conflict.error.d.ts.map +1 -0
- package/dist/domain/state/conflict.error.js +77 -0
- package/dist/domain/state/conflict.error.js.map +1 -0
- package/dist/domain/state/index.d.ts +9 -0
- package/dist/domain/state/index.d.ts.map +1 -0
- package/dist/domain/state/index.js +9 -0
- package/dist/domain/state/index.js.map +1 -0
- package/dist/domain/state/notFound.error.d.ts +26 -0
- package/dist/domain/state/notFound.error.d.ts.map +1 -0
- package/dist/domain/state/notFound.error.js +71 -0
- package/dist/domain/state/notFound.error.js.map +1 -0
- package/dist/domain/state/validation.error.d.ts +6 -0
- package/dist/domain/state/validation.error.d.ts.map +1 -0
- package/dist/domain/state/validation.error.js +6 -0
- package/dist/domain/state/validation.error.js.map +1 -0
- package/dist/domain/state/validationError.base.d.ts +54 -0
- package/dist/domain/state/validationError.base.d.ts.map +1 -0
- package/dist/domain/state/validationError.base.js +50 -0
- package/dist/domain/state/validationError.base.js.map +1 -0
- package/dist/domain/state/validationError.helpers.d.ts +11 -0
- package/dist/domain/state/validationError.helpers.d.ts.map +1 -0
- package/dist/domain/state/validationError.helpers.js +24 -0
- package/dist/domain/state/validationError.helpers.js.map +1 -0
- package/dist/index.d.ts +12 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +17 -0
- package/dist/index.js.map +1 -0
- package/dist/infrastructure/adapter/adapter.error.d.ts +8 -0
- package/dist/infrastructure/adapter/adapter.error.d.ts.map +1 -0
- package/dist/infrastructure/adapter/adapter.error.js +7 -0
- package/dist/infrastructure/adapter/adapter.error.js.map +1 -0
- package/dist/infrastructure/adapter/adapterError.base.d.ts +44 -0
- package/dist/infrastructure/adapter/adapterError.base.d.ts.map +1 -0
- package/dist/infrastructure/adapter/adapterError.base.js +62 -0
- package/dist/infrastructure/adapter/adapterError.base.js.map +1 -0
- package/dist/infrastructure/adapter/adapterError.lifecycle.d.ts +17 -0
- package/dist/infrastructure/adapter/adapterError.lifecycle.d.ts.map +1 -0
- package/dist/infrastructure/adapter/adapterError.lifecycle.js +48 -0
- package/dist/infrastructure/adapter/adapterError.lifecycle.js.map +1 -0
- package/dist/infrastructure/adapter/adapterError.operation.d.ts +26 -0
- package/dist/infrastructure/adapter/adapterError.operation.d.ts.map +1 -0
- package/dist/infrastructure/adapter/adapterError.operation.js +78 -0
- package/dist/infrastructure/adapter/adapterError.operation.js.map +1 -0
- package/dist/infrastructure/adapter/index.d.ts +8 -0
- package/dist/infrastructure/adapter/index.d.ts.map +1 -0
- package/dist/infrastructure/adapter/index.js +7 -0
- package/dist/infrastructure/adapter/index.js.map +1 -0
- package/dist/infrastructure/cache/cache.error.d.ts +6 -0
- package/dist/infrastructure/cache/cache.error.d.ts.map +1 -0
- package/dist/infrastructure/cache/cache.error.js +6 -0
- package/dist/infrastructure/cache/cache.error.js.map +1 -0
- package/dist/infrastructure/cache/cacheError.base.d.ts +63 -0
- package/dist/infrastructure/cache/cacheError.base.d.ts.map +1 -0
- package/dist/infrastructure/cache/cacheError.base.js +69 -0
- package/dist/infrastructure/cache/cacheError.base.js.map +1 -0
- package/dist/infrastructure/cache/cacheError.factory.d.ts +17 -0
- package/dist/infrastructure/cache/cacheError.factory.d.ts.map +1 -0
- package/dist/infrastructure/cache/cacheError.factory.js +60 -0
- package/dist/infrastructure/cache/cacheError.factory.js.map +1 -0
- package/dist/infrastructure/cache/index.d.ts +7 -0
- package/dist/infrastructure/cache/index.d.ts.map +1 -0
- package/dist/infrastructure/cache/index.js +7 -0
- package/dist/infrastructure/cache/index.js.map +1 -0
- package/dist/infrastructure/container/container.error.d.ts +7 -0
- package/dist/infrastructure/container/container.error.d.ts.map +1 -0
- package/dist/infrastructure/container/container.error.js +6 -0
- package/dist/infrastructure/container/container.error.js.map +1 -0
- package/dist/infrastructure/container/containerError.base.d.ts +36 -0
- package/dist/infrastructure/container/containerError.base.d.ts.map +1 -0
- package/dist/infrastructure/container/containerError.base.js +38 -0
- package/dist/infrastructure/container/containerError.base.js.map +1 -0
- package/dist/infrastructure/container/containerError.registration.d.ts +93 -0
- package/dist/infrastructure/container/containerError.registration.d.ts.map +1 -0
- package/dist/infrastructure/container/containerError.registration.js +92 -0
- package/dist/infrastructure/container/containerError.registration.js.map +1 -0
- package/dist/infrastructure/container/index.d.ts +7 -0
- package/dist/infrastructure/container/index.d.ts.map +1 -0
- package/dist/infrastructure/container/index.js +7 -0
- package/dist/infrastructure/container/index.js.map +1 -0
- package/dist/infrastructure/index.d.ts +13 -0
- package/dist/infrastructure/index.d.ts.map +1 -0
- package/dist/infrastructure/index.js +13 -0
- package/dist/infrastructure/index.js.map +1 -0
- package/dist/infrastructure/middleware/index.d.ts +7 -0
- package/dist/infrastructure/middleware/index.d.ts.map +1 -0
- package/dist/infrastructure/middleware/index.js +7 -0
- package/dist/infrastructure/middleware/index.js.map +1 -0
- package/dist/infrastructure/middleware/middleware.error.d.ts +54 -0
- package/dist/infrastructure/middleware/middleware.error.d.ts.map +1 -0
- package/dist/infrastructure/middleware/middleware.error.js +71 -0
- package/dist/infrastructure/middleware/middleware.error.js.map +1 -0
- package/dist/infrastructure/network/http.error.d.ts +6 -0
- package/dist/infrastructure/network/http.error.d.ts.map +1 -0
- package/dist/infrastructure/network/http.error.js +6 -0
- package/dist/infrastructure/network/http.error.js.map +1 -0
- package/dist/infrastructure/network/httpAdapter.error.d.ts +43 -0
- package/dist/infrastructure/network/httpAdapter.error.d.ts.map +1 -0
- package/dist/infrastructure/network/httpAdapter.error.js +63 -0
- package/dist/infrastructure/network/httpAdapter.error.js.map +1 -0
- package/dist/infrastructure/network/httpClient.errors.d.ts +6 -0
- package/dist/infrastructure/network/httpClient.errors.d.ts.map +1 -0
- package/dist/infrastructure/network/httpClient.errors.js +6 -0
- package/dist/infrastructure/network/httpClient.errors.js.map +1 -0
- package/dist/infrastructure/network/httpClientError.advanced.d.ts +42 -0
- package/dist/infrastructure/network/httpClientError.advanced.d.ts.map +1 -0
- package/dist/infrastructure/network/httpClientError.advanced.js +104 -0
- package/dist/infrastructure/network/httpClientError.advanced.js.map +1 -0
- package/dist/infrastructure/network/httpClientError.base.d.ts +38 -0
- package/dist/infrastructure/network/httpClientError.base.d.ts.map +1 -0
- package/dist/infrastructure/network/httpClientError.base.js +44 -0
- package/dist/infrastructure/network/httpClientError.base.js.map +1 -0
- package/dist/infrastructure/network/httpClientError.common.d.ts +67 -0
- package/dist/infrastructure/network/httpClientError.common.d.ts.map +1 -0
- package/dist/infrastructure/network/httpClientError.common.js +172 -0
- package/dist/infrastructure/network/httpClientError.common.js.map +1 -0
- package/dist/infrastructure/network/httpClientError.error.d.ts +8 -0
- package/dist/infrastructure/network/httpClientError.error.d.ts.map +1 -0
- package/dist/infrastructure/network/httpClientError.error.js +7 -0
- package/dist/infrastructure/network/httpClientError.error.js.map +1 -0
- package/dist/infrastructure/network/httpClientError.options.d.ts +11 -0
- package/dist/infrastructure/network/httpClientError.options.d.ts.map +1 -0
- package/dist/infrastructure/network/httpClientError.options.js +5 -0
- package/dist/infrastructure/network/httpClientError.options.js.map +1 -0
- package/dist/infrastructure/network/httpClientError.specialized.d.ts +25 -0
- package/dist/infrastructure/network/httpClientError.specialized.d.ts.map +1 -0
- package/dist/infrastructure/network/httpClientError.specialized.js +56 -0
- package/dist/infrastructure/network/httpClientError.specialized.js.map +1 -0
- package/dist/infrastructure/network/httpClientError.types.d.ts +30 -0
- package/dist/infrastructure/network/httpClientError.types.d.ts.map +1 -0
- package/dist/infrastructure/network/httpClientError.types.js +83 -0
- package/dist/infrastructure/network/httpClientError.types.js.map +1 -0
- package/dist/infrastructure/network/httpError.base.d.ts +22 -0
- package/dist/infrastructure/network/httpError.base.d.ts.map +1 -0
- package/dist/infrastructure/network/httpError.base.js +40 -0
- package/dist/infrastructure/network/httpError.base.js.map +1 -0
- package/dist/infrastructure/network/httpError.helpers.d.ts +12 -0
- package/dist/infrastructure/network/httpError.helpers.d.ts.map +1 -0
- package/dist/infrastructure/network/httpError.helpers.js +20 -0
- package/dist/infrastructure/network/httpError.helpers.js.map +1 -0
- package/dist/infrastructure/network/httpResponse.error.d.ts +36 -0
- package/dist/infrastructure/network/httpResponse.error.d.ts.map +1 -0
- package/dist/infrastructure/network/httpResponse.error.js +55 -0
- package/dist/infrastructure/network/httpResponse.error.js.map +1 -0
- package/dist/infrastructure/network/httpRouter.error.d.ts +6 -0
- package/dist/infrastructure/network/httpRouter.error.d.ts.map +1 -0
- package/dist/infrastructure/network/httpRouter.error.js +6 -0
- package/dist/infrastructure/network/httpRouter.error.js.map +1 -0
- package/dist/infrastructure/network/httpRouterError.base.d.ts +20 -0
- package/dist/infrastructure/network/httpRouterError.base.d.ts.map +1 -0
- package/dist/infrastructure/network/httpRouterError.base.js +29 -0
- package/dist/infrastructure/network/httpRouterError.base.js.map +1 -0
- package/dist/infrastructure/network/httpRouterError.types.d.ts +20 -0
- package/dist/infrastructure/network/httpRouterError.types.d.ts.map +1 -0
- package/dist/infrastructure/network/httpRouterError.types.js +36 -0
- package/dist/infrastructure/network/httpRouterError.types.js.map +1 -0
- package/dist/infrastructure/network/httpServerError.error.d.ts +49 -0
- package/dist/infrastructure/network/httpServerError.error.d.ts.map +1 -0
- package/dist/infrastructure/network/httpServerError.error.js +79 -0
- package/dist/infrastructure/network/httpServerError.error.js.map +1 -0
- package/dist/infrastructure/network/httpServerLifecycle.error.d.ts +6 -0
- package/dist/infrastructure/network/httpServerLifecycle.error.d.ts.map +1 -0
- package/dist/infrastructure/network/httpServerLifecycle.error.js +6 -0
- package/dist/infrastructure/network/httpServerLifecycle.error.js.map +1 -0
- package/dist/infrastructure/network/httpServerLifecycleError.base.d.ts +20 -0
- package/dist/infrastructure/network/httpServerLifecycleError.base.d.ts.map +1 -0
- package/dist/infrastructure/network/httpServerLifecycleError.base.js +29 -0
- package/dist/infrastructure/network/httpServerLifecycleError.base.js.map +1 -0
- package/dist/infrastructure/network/httpServerLifecycleError.types.d.ts +22 -0
- package/dist/infrastructure/network/httpServerLifecycleError.types.d.ts.map +1 -0
- package/dist/infrastructure/network/httpServerLifecycleError.types.js +42 -0
- package/dist/infrastructure/network/httpServerLifecycleError.types.js.map +1 -0
- package/dist/infrastructure/network/httpStream.error.d.ts +24 -0
- package/dist/infrastructure/network/httpStream.error.d.ts.map +1 -0
- package/dist/infrastructure/network/httpStream.error.js +33 -0
- package/dist/infrastructure/network/httpStream.error.js.map +1 -0
- package/dist/infrastructure/network/index.d.ts +18 -0
- package/dist/infrastructure/network/index.d.ts.map +1 -0
- package/dist/infrastructure/network/index.js +18 -0
- package/dist/infrastructure/network/index.js.map +1 -0
- package/dist/infrastructure/network/network.error.d.ts +7 -0
- package/dist/infrastructure/network/network.error.d.ts.map +1 -0
- package/dist/infrastructure/network/network.error.js +6 -0
- package/dist/infrastructure/network/network.error.js.map +1 -0
- package/dist/infrastructure/network/networkError.base.d.ts +45 -0
- package/dist/infrastructure/network/networkError.base.d.ts.map +1 -0
- package/dist/infrastructure/network/networkError.base.js +62 -0
- package/dist/infrastructure/network/networkError.base.js.map +1 -0
- package/dist/infrastructure/network/networkError.factory.d.ts +11 -0
- package/dist/infrastructure/network/networkError.factory.d.ts.map +1 -0
- package/dist/infrastructure/network/networkError.factory.js +37 -0
- package/dist/infrastructure/network/networkError.factory.js.map +1 -0
- package/dist/infrastructure/network/routePattern.error.d.ts +44 -0
- package/dist/infrastructure/network/routePattern.error.d.ts.map +1 -0
- package/dist/infrastructure/network/routePattern.error.js +63 -0
- package/dist/infrastructure/network/routePattern.error.js.map +1 -0
- package/dist/infrastructure/network/timeout.error.d.ts +7 -0
- package/dist/infrastructure/network/timeout.error.d.ts.map +1 -0
- package/dist/infrastructure/network/timeout.error.js +6 -0
- package/dist/infrastructure/network/timeout.error.js.map +1 -0
- package/dist/infrastructure/network/timeoutError.base.d.ts +54 -0
- package/dist/infrastructure/network/timeoutError.base.d.ts.map +1 -0
- package/dist/infrastructure/network/timeoutError.base.js +77 -0
- package/dist/infrastructure/network/timeoutError.base.js.map +1 -0
- package/dist/infrastructure/network/timeoutError.factory.d.ts +13 -0
- package/dist/infrastructure/network/timeoutError.factory.d.ts.map +1 -0
- package/dist/infrastructure/network/timeoutError.factory.js +53 -0
- package/dist/infrastructure/network/timeoutError.factory.js.map +1 -0
- package/dist/infrastructure/service/externalService.error.d.ts +7 -0
- package/dist/infrastructure/service/externalService.error.d.ts.map +1 -0
- package/dist/infrastructure/service/externalService.error.js +6 -0
- package/dist/infrastructure/service/externalService.error.js.map +1 -0
- package/dist/infrastructure/service/externalServiceError.base.d.ts +45 -0
- package/dist/infrastructure/service/externalServiceError.base.d.ts.map +1 -0
- package/dist/infrastructure/service/externalServiceError.base.js +80 -0
- package/dist/infrastructure/service/externalServiceError.base.js.map +1 -0
- package/dist/infrastructure/service/externalServiceError.factory.d.ts +9 -0
- package/dist/infrastructure/service/externalServiceError.factory.d.ts.map +1 -0
- package/dist/infrastructure/service/externalServiceError.factory.js +32 -0
- package/dist/infrastructure/service/externalServiceError.factory.js.map +1 -0
- package/dist/infrastructure/service/index.d.ts +8 -0
- package/dist/infrastructure/service/index.d.ts.map +1 -0
- package/dist/infrastructure/service/index.js +8 -0
- package/dist/infrastructure/service/index.js.map +1 -0
- package/dist/infrastructure/service/service.error.d.ts +7 -0
- package/dist/infrastructure/service/service.error.d.ts.map +1 -0
- package/dist/infrastructure/service/service.error.js +6 -0
- package/dist/infrastructure/service/service.error.js.map +1 -0
- package/dist/infrastructure/service/serviceError.base.d.ts +39 -0
- package/dist/infrastructure/service/serviceError.base.d.ts.map +1 -0
- package/dist/infrastructure/service/serviceError.base.js +48 -0
- package/dist/infrastructure/service/serviceError.base.js.map +1 -0
- package/dist/infrastructure/service/serviceError.factory.d.ts +11 -0
- package/dist/infrastructure/service/serviceError.factory.d.ts.map +1 -0
- package/dist/infrastructure/service/serviceError.factory.js +43 -0
- package/dist/infrastructure/service/serviceError.factory.js.map +1 -0
- package/dist/infrastructure/storage/database.error.d.ts +7 -0
- package/dist/infrastructure/storage/database.error.d.ts.map +1 -0
- package/dist/infrastructure/storage/database.error.js +6 -0
- package/dist/infrastructure/storage/database.error.js.map +1 -0
- package/dist/infrastructure/storage/databaseError.base.d.ts +54 -0
- package/dist/infrastructure/storage/databaseError.base.d.ts.map +1 -0
- package/dist/infrastructure/storage/databaseError.base.js +69 -0
- package/dist/infrastructure/storage/databaseError.base.js.map +1 -0
- package/dist/infrastructure/storage/databaseError.factory.d.ts +13 -0
- package/dist/infrastructure/storage/databaseError.factory.d.ts.map +1 -0
- package/dist/infrastructure/storage/databaseError.factory.js +38 -0
- package/dist/infrastructure/storage/databaseError.factory.js.map +1 -0
- package/dist/infrastructure/storage/index.d.ts +8 -0
- package/dist/infrastructure/storage/index.d.ts.map +1 -0
- package/dist/infrastructure/storage/index.js +8 -0
- package/dist/infrastructure/storage/index.js.map +1 -0
- package/dist/infrastructure/storage/storage.error.d.ts +7 -0
- package/dist/infrastructure/storage/storage.error.d.ts.map +1 -0
- package/dist/infrastructure/storage/storage.error.js +6 -0
- package/dist/infrastructure/storage/storage.error.js.map +1 -0
- package/dist/infrastructure/storage/storageError.base.d.ts +55 -0
- package/dist/infrastructure/storage/storageError.base.d.ts.map +1 -0
- package/dist/infrastructure/storage/storageError.base.js +70 -0
- package/dist/infrastructure/storage/storageError.base.js.map +1 -0
- package/dist/infrastructure/storage/storageError.factory.d.ts +17 -0
- package/dist/infrastructure/storage/storageError.factory.d.ts.map +1 -0
- package/dist/infrastructure/storage/storageError.factory.js +67 -0
- package/dist/infrastructure/storage/storageError.factory.js.map +1 -0
- package/dist/system/crypto.error.d.ts +7 -0
- package/dist/system/crypto.error.d.ts.map +1 -0
- package/dist/system/crypto.error.js +6 -0
- package/dist/system/crypto.error.js.map +1 -0
- package/dist/system/cryptoError.base.d.ts +56 -0
- package/dist/system/cryptoError.base.d.ts.map +1 -0
- package/dist/system/cryptoError.base.js +68 -0
- package/dist/system/cryptoError.base.js.map +1 -0
- package/dist/system/cryptoError.factory.d.ts +15 -0
- package/dist/system/cryptoError.factory.d.ts.map +1 -0
- package/dist/system/cryptoError.factory.js +46 -0
- package/dist/system/cryptoError.factory.js.map +1 -0
- package/dist/system/index.d.ts +10 -0
- package/dist/system/index.d.ts.map +1 -0
- package/dist/system/index.js +10 -0
- package/dist/system/index.js.map +1 -0
- package/dist/system/logging/index.d.ts +7 -0
- package/dist/system/logging/index.d.ts.map +1 -0
- package/dist/system/logging/index.js +7 -0
- package/dist/system/logging/index.js.map +1 -0
- package/dist/system/logging/logging.error.d.ts +24 -0
- package/dist/system/logging/logging.error.d.ts.map +1 -0
- package/dist/system/logging/logging.error.js +33 -0
- package/dist/system/logging/logging.error.js.map +1 -0
- package/dist/system/runtime.error.d.ts +6 -0
- package/dist/system/runtime.error.d.ts.map +1 -0
- package/dist/system/runtime.error.js +6 -0
- package/dist/system/runtime.error.js.map +1 -0
- package/dist/system/runtimeError.base.d.ts +40 -0
- package/dist/system/runtimeError.base.d.ts.map +1 -0
- package/dist/system/runtimeError.base.js +40 -0
- package/dist/system/runtimeError.base.js.map +1 -0
- package/dist/system/runtimeError.types.d.ts +32 -0
- package/dist/system/runtimeError.types.d.ts.map +1 -0
- package/dist/system/runtimeError.types.js +68 -0
- package/dist/system/runtimeError.types.js.map +1 -0
- package/dist/system/system.error.d.ts +7 -0
- package/dist/system/system.error.d.ts.map +1 -0
- package/dist/system/system.error.js +6 -0
- package/dist/system/system.error.js.map +1 -0
- package/dist/system/systemError.base.d.ts +45 -0
- package/dist/system/systemError.base.d.ts.map +1 -0
- package/dist/system/systemError.base.js +54 -0
- package/dist/system/systemError.base.js.map +1 -0
- package/dist/system/systemError.factory.d.ts +13 -0
- package/dist/system/systemError.factory.d.ts.map +1 -0
- package/dist/system/systemError.factory.js +42 -0
- package/dist/system/systemError.factory.js.map +1 -0
- package/dist/utils/errorHandler.core.d.ts +30 -0
- package/dist/utils/errorHandler.core.d.ts.map +1 -0
- package/dist/utils/errorHandler.core.js +124 -0
- package/dist/utils/errorHandler.core.js.map +1 -0
- package/dist/utils/errorHandler.factory.d.ts +13 -0
- package/dist/utils/errorHandler.factory.d.ts.map +1 -0
- package/dist/utils/errorHandler.factory.js +18 -0
- package/dist/utils/errorHandler.factory.js.map +1 -0
- package/dist/utils/errorHandler.types.d.ts +43 -0
- package/dist/utils/errorHandler.types.d.ts.map +1 -0
- package/dist/utils/errorHandler.types.js +7 -0
- package/dist/utils/errorHandler.types.js.map +1 -0
- package/dist/utils/errorMapper.core.d.ts +7 -0
- package/dist/utils/errorMapper.core.d.ts.map +1 -0
- package/dist/utils/errorMapper.core.js +6 -0
- package/dist/utils/errorMapper.core.js.map +1 -0
- package/dist/utils/errorMapper.mappers.d.ts +15 -0
- package/dist/utils/errorMapper.mappers.d.ts.map +1 -0
- package/dist/utils/errorMapper.mappers.js +84 -0
- package/dist/utils/errorMapper.mappers.js.map +1 -0
- package/dist/utils/errorMapper.registry.d.ts +26 -0
- package/dist/utils/errorMapper.registry.d.ts.map +1 -0
- package/dist/utils/errorMapper.registry.js +58 -0
- package/dist/utils/errorMapper.registry.js.map +1 -0
- package/dist/utils/errorMapper.types.d.ts +36 -0
- package/dist/utils/errorMapper.types.d.ts.map +1 -0
- package/dist/utils/errorMapper.types.js +7 -0
- package/dist/utils/errorMapper.types.js.map +1 -0
- package/dist/utils/errorSerializer.core.d.ts +27 -0
- package/dist/utils/errorSerializer.core.d.ts.map +1 -0
- package/dist/utils/errorSerializer.core.js +82 -0
- package/dist/utils/errorSerializer.core.js.map +1 -0
- package/dist/utils/errorSerializer.factory.d.ts +16 -0
- package/dist/utils/errorSerializer.factory.d.ts.map +1 -0
- package/dist/utils/errorSerializer.factory.js +46 -0
- package/dist/utils/errorSerializer.factory.js.map +1 -0
- package/dist/utils/errorSerializer.types.d.ts +30 -0
- package/dist/utils/errorSerializer.types.d.ts.map +1 -0
- package/dist/utils/errorSerializer.types.js +5 -0
- package/dist/utils/errorSerializer.types.js.map +1 -0
- package/dist/utils/errorUtils.extraction.d.ts +17 -0
- package/dist/utils/errorUtils.extraction.d.ts.map +1 -0
- package/dist/utils/errorUtils.extraction.js +90 -0
- package/dist/utils/errorUtils.extraction.js.map +1 -0
- package/dist/utils/errorUtils.helper.d.ts +7 -0
- package/dist/utils/errorUtils.helper.d.ts.map +1 -0
- package/dist/utils/errorUtils.helper.js +7 -0
- package/dist/utils/errorUtils.helper.js.map +1 -0
- package/dist/utils/errorUtils.transform.d.ts +27 -0
- package/dist/utils/errorUtils.transform.d.ts.map +1 -0
- package/dist/utils/errorUtils.transform.js +64 -0
- package/dist/utils/errorUtils.transform.js.map +1 -0
- package/dist/utils/errorUtils.typeCheck.d.ts +24 -0
- package/dist/utils/errorUtils.typeCheck.d.ts.map +1 -0
- package/dist/utils/errorUtils.typeCheck.js +43 -0
- package/dist/utils/errorUtils.typeCheck.js.map +1 -0
- package/dist/utils/index.d.ts +10 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/index.js +10 -0
- package/dist/utils/index.js.map +1 -0
- package/package.json +44 -0
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Base DatabaseError class, options, and factory functions.
|
|
3
|
+
*/
|
|
4
|
+
import { BaseError } from "../../base/core/baseError.core.js";
|
|
5
|
+
import { ErrorCategory } from "../../base/types/errorCategory.type.js";
|
|
6
|
+
import { ErrorCode } from "../../base/types/errorCode.type.js";
|
|
7
|
+
import { ErrorSeverity } from "../../base/types/errorSeverity.type.js";
|
|
8
|
+
/** Database operation types used for diagnostics. */
|
|
9
|
+
export var DatabaseOperation;
|
|
10
|
+
(function (DatabaseOperation) {
|
|
11
|
+
DatabaseOperation["UNKNOWN"] = "unknown";
|
|
12
|
+
DatabaseOperation["CONNECT"] = "connect";
|
|
13
|
+
DatabaseOperation["DISCONNECT"] = "disconnect";
|
|
14
|
+
DatabaseOperation["QUERY"] = "query";
|
|
15
|
+
DatabaseOperation["INSERT"] = "insert";
|
|
16
|
+
DatabaseOperation["UPDATE"] = "update";
|
|
17
|
+
DatabaseOperation["DELETE"] = "delete";
|
|
18
|
+
DatabaseOperation["TRANSACTION"] = "transaction";
|
|
19
|
+
DatabaseOperation["MIGRATION"] = "migration";
|
|
20
|
+
})(DatabaseOperation || (DatabaseOperation = {}));
|
|
21
|
+
/** Error raised by a database or persistence operation. */
|
|
22
|
+
export class DatabaseError extends BaseError {
|
|
23
|
+
operation;
|
|
24
|
+
driver;
|
|
25
|
+
databaseCode;
|
|
26
|
+
constructor(message = "A database operation failed.", options = {}) {
|
|
27
|
+
super(message, {
|
|
28
|
+
...options,
|
|
29
|
+
code: options.code ?? ErrorCode.DATABASE,
|
|
30
|
+
category: options.category ?? ErrorCategory.DATABASE,
|
|
31
|
+
severity: options.severity ?? ErrorSeverity.ERROR,
|
|
32
|
+
statusCode: options.statusCode ?? 500,
|
|
33
|
+
expose: options.expose ?? false,
|
|
34
|
+
isOperational: options.isOperational ?? true,
|
|
35
|
+
metadata: {
|
|
36
|
+
...options.metadata,
|
|
37
|
+
...(options.operation !== undefined
|
|
38
|
+
? { operation: options.operation }
|
|
39
|
+
: {}),
|
|
40
|
+
...(options.driver !== undefined ? { driver: options.driver } : {}),
|
|
41
|
+
...(options.databaseCode !== undefined
|
|
42
|
+
? { databaseCode: String(options.databaseCode) }
|
|
43
|
+
: {}),
|
|
44
|
+
},
|
|
45
|
+
});
|
|
46
|
+
this.operation = options.operation ?? DatabaseOperation.UNKNOWN;
|
|
47
|
+
this.driver = options.driver;
|
|
48
|
+
this.databaseCode = options.databaseCode;
|
|
49
|
+
}
|
|
50
|
+
toJSON() {
|
|
51
|
+
return {
|
|
52
|
+
...super.toJSON(),
|
|
53
|
+
operation: this.operation,
|
|
54
|
+
...(this.driver !== undefined ? { driver: this.driver } : {}),
|
|
55
|
+
...(this.databaseCode !== undefined
|
|
56
|
+
? { databaseCode: String(this.databaseCode) }
|
|
57
|
+
: {}),
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
/** Creates a database error. */
|
|
62
|
+
export function createDatabaseError(message = "A database operation failed.", options = {}) {
|
|
63
|
+
return new DatabaseError(message, options);
|
|
64
|
+
}
|
|
65
|
+
/** Determines whether an unknown value is a DatabaseError. */
|
|
66
|
+
export function isDatabaseError(value) {
|
|
67
|
+
return value instanceof DatabaseError;
|
|
68
|
+
}
|
|
69
|
+
//# sourceMappingURL=databaseError.base.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"databaseError.base.js","sourceRoot":"","sources":["../../../src/infrastructure/storage/databaseError.base.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,mCAAmC,CAAC;AAE9D,OAAO,EAAE,aAAa,EAAE,MAAM,wCAAwC,CAAC;AACvE,OAAO,EAAE,SAAS,EAAE,MAAM,oCAAoC,CAAC;AAC/D,OAAO,EAAE,aAAa,EAAE,MAAM,wCAAwC,CAAC;AAEvE,qDAAqD;AACrD,MAAM,CAAN,IAAY,iBAUX;AAVD,WAAY,iBAAiB;IAC3B,wCAAmB,CAAA;IACnB,wCAAmB,CAAA;IACnB,8CAAyB,CAAA;IACzB,oCAAe,CAAA;IACf,sCAAiB,CAAA;IACjB,sCAAiB,CAAA;IACjB,sCAAiB,CAAA;IACjB,gDAA2B,CAAA;IAC3B,4CAAuB,CAAA;AACzB,CAAC,EAVW,iBAAiB,KAAjB,iBAAiB,QAU5B;AAaD,2DAA2D;AAC3D,MAAM,OAAO,aAAc,SAAQ,SAAS;IAC1B,SAAS,CAAoB;IAC7B,MAAM,CAAU;IAChB,YAAY,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AAE,IAAI,CAAC,SAAS;YACzB,GAAG,CAAC,IAAI,CAAC,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;YAC7D,GAAG,CAAC,IAAI,CAAC,YAAY,KAAK,SAAS;gBACjC,CAAC,CAAC,EAAE,YAAY,EAAE,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,EAAE;gBAC7C,CAAC,CAAC,EAAE,CAAC;SACR,CAAC;IACJ,CAAC;CACF;AAED,gCAAgC;AAChC,MAAM,UAAU,mBAAmB,CACjC,OAAO,GAAG,8BAA8B,EACxC,OAAO,GAAyB,EAAE;IAElC,OAAO,IAAI,aAAa,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;AAC7C,CAAC;AAED,8DAA8D;AAC9D,MAAM,UAAU,eAAe,CAAC,KAAc;IAC5C,OAAO,KAAK,YAAY,aAAa,CAAC;AACxC,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Database error factory functions.
|
|
3
|
+
*/
|
|
4
|
+
import { DatabaseError, type DatabaseErrorOptions } from "./databaseError.base.js";
|
|
5
|
+
/** Creates a database connection error. */
|
|
6
|
+
export declare function databaseConnectionError(message?: string, options?: Omit<DatabaseErrorOptions, "operation">): DatabaseError;
|
|
7
|
+
/** Creates a database query error. */
|
|
8
|
+
export declare function databaseQueryError(message?: string, options?: Omit<DatabaseErrorOptions, "operation">): DatabaseError;
|
|
9
|
+
/** Creates a database transaction error. */
|
|
10
|
+
export declare function databaseTransactionError(message?: string, options?: Omit<DatabaseErrorOptions, "operation">): DatabaseError;
|
|
11
|
+
/** Creates a database migration error. */
|
|
12
|
+
export declare function databaseMigrationError(message?: string, options?: Omit<DatabaseErrorOptions, "operation">): DatabaseError;
|
|
13
|
+
//# sourceMappingURL=databaseError.factory.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"databaseError.factory.d.ts","sourceRoot":"","sources":["../../../src/infrastructure/storage/databaseError.factory.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,EACL,aAAa,EAEb,KAAK,oBAAoB,EAC1B,MAAM,yBAAyB,CAAC;AAEjC,2CAA2C;AAC3C,wBAAgB,uBAAuB,CACrC,OAAO,SAAuC,EAC9C,OAAO,GAAE,IAAI,CAAC,oBAAoB,EAAE,WAAW,CAAM,GACpD,aAAa,CAMf;AAED,sCAAsC;AACtC,wBAAgB,kBAAkB,CAChC,OAAO,SAA+B,EACtC,OAAO,GAAE,IAAI,CAAC,oBAAoB,EAAE,WAAW,CAAM,GACpD,aAAa,CAMf;AAED,4CAA4C;AAC5C,wBAAgB,wBAAwB,CACtC,OAAO,SAAqC,EAC5C,OAAO,GAAE,IAAI,CAAC,oBAAoB,EAAE,WAAW,CAAM,GACpD,aAAa,CAMf;AAED,0CAA0C;AAC1C,wBAAgB,sBAAsB,CACpC,OAAO,SAAmC,EAC1C,OAAO,GAAE,IAAI,CAAC,oBAAoB,EAAE,WAAW,CAAM,GACpD,aAAa,CAMf"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Database error factory functions.
|
|
3
|
+
*/
|
|
4
|
+
import { ErrorCode } from "../../base/types/errorCode.type.js";
|
|
5
|
+
import { DatabaseError, DatabaseOperation, } from "./databaseError.base.js";
|
|
6
|
+
/** Creates a database connection error. */
|
|
7
|
+
export function databaseConnectionError(message = "Unable to connect to the database.", options = {}) {
|
|
8
|
+
return new DatabaseError(message, {
|
|
9
|
+
...options,
|
|
10
|
+
code: ErrorCode.DATABASE_CONNECTION,
|
|
11
|
+
operation: DatabaseOperation.CONNECT,
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
/** Creates a database query error. */
|
|
15
|
+
export function databaseQueryError(message = "The database query failed.", options = {}) {
|
|
16
|
+
return new DatabaseError(message, {
|
|
17
|
+
...options,
|
|
18
|
+
code: ErrorCode.DATABASE_QUERY,
|
|
19
|
+
operation: DatabaseOperation.QUERY,
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
/** Creates a database transaction error. */
|
|
23
|
+
export function databaseTransactionError(message = "The database transaction failed.", options = {}) {
|
|
24
|
+
return new DatabaseError(message, {
|
|
25
|
+
...options,
|
|
26
|
+
code: ErrorCode.DATABASE_TRANSACTION,
|
|
27
|
+
operation: DatabaseOperation.TRANSACTION,
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
/** Creates a database migration error. */
|
|
31
|
+
export function databaseMigrationError(message = "The database migration failed.", options = {}) {
|
|
32
|
+
return new DatabaseError(message, {
|
|
33
|
+
...options,
|
|
34
|
+
code: ErrorCode.DATABASE,
|
|
35
|
+
operation: DatabaseOperation.MIGRATION,
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
//# sourceMappingURL=databaseError.factory.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"databaseError.factory.js","sourceRoot":"","sources":["../../../src/infrastructure/storage/databaseError.factory.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,oCAAoC,CAAC;AAC/D,OAAO,EACL,aAAa,EACb,iBAAiB,GAElB,MAAM,yBAAyB,CAAC;AAEjC,2CAA2C;AAC3C,MAAM,UAAU,uBAAuB,CACrC,OAAO,GAAG,oCAAoC,EAC9C,OAAO,GAA4C,EAAE;IAErD,OAAO,IAAI,aAAa,CAAC,OAAO,EAAE;QAChC,GAAG,OAAO;QACV,IAAI,EAAE,SAAS,CAAC,mBAAmB;QACnC,SAAS,EAAE,iBAAiB,CAAC,OAAO;KACrC,CAAC,CAAC;AACL,CAAC;AAED,sCAAsC;AACtC,MAAM,UAAU,kBAAkB,CAChC,OAAO,GAAG,4BAA4B,EACtC,OAAO,GAA4C,EAAE;IAErD,OAAO,IAAI,aAAa,CAAC,OAAO,EAAE;QAChC,GAAG,OAAO;QACV,IAAI,EAAE,SAAS,CAAC,cAAc;QAC9B,SAAS,EAAE,iBAAiB,CAAC,KAAK;KACnC,CAAC,CAAC;AACL,CAAC;AAED,4CAA4C;AAC5C,MAAM,UAAU,wBAAwB,CACtC,OAAO,GAAG,kCAAkC,EAC5C,OAAO,GAA4C,EAAE;IAErD,OAAO,IAAI,aAAa,CAAC,OAAO,EAAE;QAChC,GAAG,OAAO;QACV,IAAI,EAAE,SAAS,CAAC,oBAAoB;QACpC,SAAS,EAAE,iBAAiB,CAAC,WAAW;KACzC,CAAC,CAAC;AACL,CAAC;AAED,0CAA0C;AAC1C,MAAM,UAAU,sBAAsB,CACpC,OAAO,GAAG,gCAAgC,EAC1C,OAAO,GAA4C,EAAE;IAErD,OAAO,IAAI,aAAa,CAAC,OAAO,EAAE;QAChC,GAAG,OAAO;QACV,IAAI,EAAE,SAAS,CAAC,QAAQ;QACxB,SAAS,EAAE,iBAAiB,CAAC,SAAS;KACvC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/infrastructure/storage/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/infrastructure/storage/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Storage error classes — re-exports from focused files.
|
|
3
|
+
*/
|
|
4
|
+
export { StorageError, createStorageError, isStorageError, StorageOperation, } from "./storageError.base.js";
|
|
5
|
+
export type { StorageErrorOptions } from "./storageError.base.js";
|
|
6
|
+
export { storageReadError, storageWriteError, storageUploadError, storageDownloadError, storageDeleteError, storageNotFoundError, } from "./storageError.factory.js";
|
|
7
|
+
//# sourceMappingURL=storage.error.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"storage.error.d.ts","sourceRoot":"","sources":["../../../src/infrastructure/storage/storage.error.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EACL,YAAY,EACZ,kBAAkB,EAClB,cAAc,EACd,gBAAgB,GACjB,MAAM,wBAAwB,CAAC;AAChC,YAAY,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAElE,OAAO,EACL,gBAAgB,EAChB,iBAAiB,EACjB,kBAAkB,EAClB,oBAAoB,EACpB,kBAAkB,EAClB,oBAAoB,GACrB,MAAM,2BAA2B,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Storage error classes — re-exports from focused files.
|
|
3
|
+
*/
|
|
4
|
+
export { StorageError, createStorageError, isStorageError, StorageOperation, } from "./storageError.base.js";
|
|
5
|
+
export { storageReadError, storageWriteError, storageUploadError, storageDownloadError, storageDeleteError, storageNotFoundError, } from "./storageError.factory.js";
|
|
6
|
+
//# sourceMappingURL=storage.error.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"storage.error.js","sourceRoot":"","sources":["../../../src/infrastructure/storage/storage.error.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EACL,YAAY,EACZ,kBAAkB,EAClB,cAAc,EACd,gBAAgB,GACjB,MAAM,wBAAwB,CAAC;AAGhC,OAAO,EACL,gBAAgB,EAChB,iBAAiB,EACjB,kBAAkB,EAClB,oBAAoB,EACpB,kBAAkB,EAClB,oBAAoB,GACrB,MAAM,2BAA2B,CAAC"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Base StorageError class and options.
|
|
3
|
+
*/
|
|
4
|
+
import { BaseError } from "../../base/core/baseError.core.js";
|
|
5
|
+
import type { BaseErrorOptions } from "../../base/types/baseError.type.js";
|
|
6
|
+
import { ErrorCategory } from "../../base/types/errorCategory.type.js";
|
|
7
|
+
import { ErrorSeverity } from "../../base/types/errorSeverity.type.js";
|
|
8
|
+
/** Storage operation types used for diagnostics. */
|
|
9
|
+
export declare enum StorageOperation {
|
|
10
|
+
UNKNOWN = "unknown",
|
|
11
|
+
READ = "read",
|
|
12
|
+
WRITE = "write",
|
|
13
|
+
DELETE = "delete",
|
|
14
|
+
UPLOAD = "upload",
|
|
15
|
+
DOWNLOAD = "download",
|
|
16
|
+
MOVE = "move",
|
|
17
|
+
COPY = "copy",
|
|
18
|
+
LIST = "list",
|
|
19
|
+
EXISTS = "exists"
|
|
20
|
+
}
|
|
21
|
+
/** Options for creating a storage error. */
|
|
22
|
+
export interface StorageErrorOptions extends Omit<BaseErrorOptions, "category"> {
|
|
23
|
+
readonly category?: ErrorCategory;
|
|
24
|
+
readonly operation?: StorageOperation;
|
|
25
|
+
readonly provider?: string;
|
|
26
|
+
readonly resource?: string;
|
|
27
|
+
}
|
|
28
|
+
/** Error raised when a storage operation fails. */
|
|
29
|
+
export declare class StorageError extends BaseError {
|
|
30
|
+
readonly operation: StorageOperation;
|
|
31
|
+
readonly provider?: string;
|
|
32
|
+
readonly resource?: string;
|
|
33
|
+
constructor(message?: string, options?: StorageErrorOptions);
|
|
34
|
+
toJSON(): {
|
|
35
|
+
name: string;
|
|
36
|
+
message: string;
|
|
37
|
+
code: string;
|
|
38
|
+
category: ErrorCategory;
|
|
39
|
+
severity: ErrorSeverity;
|
|
40
|
+
statusCode: number;
|
|
41
|
+
expose: boolean;
|
|
42
|
+
isOperational: boolean;
|
|
43
|
+
metadata: Readonly<import("../../index.js").ErrorMetadata>;
|
|
44
|
+
stack?: string;
|
|
45
|
+
cause?: import("../../base/types/baseError.type.js").SerializedBaseError | unknown;
|
|
46
|
+
operation: StorageOperation;
|
|
47
|
+
provider?: string | undefined;
|
|
48
|
+
resource?: string | undefined;
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
/** Creates a storage error. */
|
|
52
|
+
export declare function createStorageError(message?: string, options?: StorageErrorOptions): StorageError;
|
|
53
|
+
/** Determines whether an unknown value is a StorageError. */
|
|
54
|
+
export declare function isStorageError(value: unknown): value is StorageError;
|
|
55
|
+
//# sourceMappingURL=storageError.base.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"storageError.base.d.ts","sourceRoot":"","sources":["../../../src/infrastructure/storage/storageError.base.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,mCAAmC,CAAC;AAC9D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AAC3E,OAAO,EAAE,aAAa,EAAE,MAAM,wCAAwC,CAAC;AAEvE,OAAO,EAAE,aAAa,EAAE,MAAM,wCAAwC,CAAC;AAEvE,oDAAoD;AACpD,oBAAY,gBAAgB;IAC1B,OAAO,YAAY;IACnB,IAAI,SAAS;IACb,KAAK,UAAU;IACf,MAAM,WAAW;IACjB,MAAM,WAAW;IACjB,QAAQ,aAAa;IACrB,IAAI,SAAS;IACb,IAAI,SAAS;IACb,IAAI,SAAS;IACb,MAAM,WAAW;CAClB;AAED,4CAA4C;AAC5C,MAAM,WAAW,mBAAoB,SAAQ,IAAI,CAC/C,gBAAgB,EAChB,UAAU,CACX;IACC,QAAQ,CAAC,QAAQ,CAAC,EAAE,aAAa,CAAC;IAClC,QAAQ,CAAC,SAAS,CAAC,EAAE,gBAAgB,CAAC;IACtC,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED,mDAAmD;AACnD,qBAAa,YAAa,SAAQ,SAAS;IACzC,SAAgB,SAAS,EAAE,gBAAgB,CAAC;IAC5C,SAAgB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClC,SAAgB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElC,YACE,OAAO,SAAgC,EACvC,OAAO,GAAE,mBAAwB,EA0BlC;IAEe,MAAM;;;;;;;;;;;;;;;MAOrB;CACF;AAED,+BAA+B;AAC/B,wBAAgB,kBAAkB,CAChC,OAAO,SAAgC,EACvC,OAAO,GAAE,mBAAwB,GAChC,YAAY,CAEd;AAED,6DAA6D;AAC7D,wBAAgB,cAAc,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,YAAY,CAEpE"}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Base StorageError class and options.
|
|
3
|
+
*/
|
|
4
|
+
import { BaseError } from "../../base/core/baseError.core.js";
|
|
5
|
+
import { ErrorCategory } from "../../base/types/errorCategory.type.js";
|
|
6
|
+
import { ErrorCode } from "../../base/types/errorCode.type.js";
|
|
7
|
+
import { ErrorSeverity } from "../../base/types/errorSeverity.type.js";
|
|
8
|
+
/** Storage operation types used for diagnostics. */
|
|
9
|
+
export var StorageOperation;
|
|
10
|
+
(function (StorageOperation) {
|
|
11
|
+
StorageOperation["UNKNOWN"] = "unknown";
|
|
12
|
+
StorageOperation["READ"] = "read";
|
|
13
|
+
StorageOperation["WRITE"] = "write";
|
|
14
|
+
StorageOperation["DELETE"] = "delete";
|
|
15
|
+
StorageOperation["UPLOAD"] = "upload";
|
|
16
|
+
StorageOperation["DOWNLOAD"] = "download";
|
|
17
|
+
StorageOperation["MOVE"] = "move";
|
|
18
|
+
StorageOperation["COPY"] = "copy";
|
|
19
|
+
StorageOperation["LIST"] = "list";
|
|
20
|
+
StorageOperation["EXISTS"] = "exists";
|
|
21
|
+
})(StorageOperation || (StorageOperation = {}));
|
|
22
|
+
/** Error raised when a storage operation fails. */
|
|
23
|
+
export class StorageError extends BaseError {
|
|
24
|
+
operation;
|
|
25
|
+
provider;
|
|
26
|
+
resource;
|
|
27
|
+
constructor(message = "A storage operation failed.", options = {}) {
|
|
28
|
+
super(message, {
|
|
29
|
+
...options,
|
|
30
|
+
code: options.code ?? ErrorCode.STORAGE,
|
|
31
|
+
category: options.category ?? ErrorCategory.STORAGE,
|
|
32
|
+
severity: options.severity ?? ErrorSeverity.ERROR,
|
|
33
|
+
statusCode: options.statusCode ?? 500,
|
|
34
|
+
expose: options.expose ?? false,
|
|
35
|
+
isOperational: options.isOperational ?? true,
|
|
36
|
+
metadata: {
|
|
37
|
+
...options.metadata,
|
|
38
|
+
...(options.operation !== undefined
|
|
39
|
+
? { operation: options.operation }
|
|
40
|
+
: {}),
|
|
41
|
+
...(options.provider !== undefined
|
|
42
|
+
? { provider: options.provider }
|
|
43
|
+
: {}),
|
|
44
|
+
...(options.resource !== undefined
|
|
45
|
+
? { resource: options.resource }
|
|
46
|
+
: {}),
|
|
47
|
+
},
|
|
48
|
+
});
|
|
49
|
+
this.operation = options.operation ?? StorageOperation.UNKNOWN;
|
|
50
|
+
this.provider = options.provider;
|
|
51
|
+
this.resource = options.resource;
|
|
52
|
+
}
|
|
53
|
+
toJSON() {
|
|
54
|
+
return {
|
|
55
|
+
...super.toJSON(),
|
|
56
|
+
operation: this.operation,
|
|
57
|
+
...(this.provider !== undefined ? { provider: this.provider } : {}),
|
|
58
|
+
...(this.resource !== undefined ? { resource: this.resource } : {}),
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
/** Creates a storage error. */
|
|
63
|
+
export function createStorageError(message = "A storage operation failed.", options = {}) {
|
|
64
|
+
return new StorageError(message, options);
|
|
65
|
+
}
|
|
66
|
+
/** Determines whether an unknown value is a StorageError. */
|
|
67
|
+
export function isStorageError(value) {
|
|
68
|
+
return value instanceof StorageError;
|
|
69
|
+
}
|
|
70
|
+
//# sourceMappingURL=storageError.base.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"storageError.base.js","sourceRoot":"","sources":["../../../src/infrastructure/storage/storageError.base.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,SAAS,EAA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|
2
|
+
* Storage error factory functions.
|
|
3
|
+
*/
|
|
4
|
+
import { StorageError } from "./storageError.base.js";
|
|
5
|
+
/** Creates a storage read error. */
|
|
6
|
+
export declare function storageReadError(resource: string, provider?: string, cause?: unknown): StorageError;
|
|
7
|
+
/** Creates a storage write error. */
|
|
8
|
+
export declare function storageWriteError(resource: string, provider?: string, cause?: unknown): StorageError;
|
|
9
|
+
/** Creates a storage upload error. */
|
|
10
|
+
export declare function storageUploadError(resource: string, provider?: string, cause?: unknown): StorageError;
|
|
11
|
+
/** Creates a storage download error. */
|
|
12
|
+
export declare function storageDownloadError(resource: string, provider?: string, cause?: unknown): StorageError;
|
|
13
|
+
/** Creates a storage delete error. */
|
|
14
|
+
export declare function storageDeleteError(resource: string, provider?: string, cause?: unknown): StorageError;
|
|
15
|
+
/** Creates a storage not found error. */
|
|
16
|
+
export declare function storageNotFoundError(resource: string, provider?: string): StorageError;
|
|
17
|
+
//# sourceMappingURL=storageError.factory.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"storageError.factory.d.ts","sourceRoot":"","sources":["../../../src/infrastructure/storage/storageError.factory.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,EACL,YAAY,EAGb,MAAM,wBAAwB,CAAC;AAEhC,oCAAoC;AACpC,wBAAgB,gBAAgB,CAC9B,QAAQ,EAAE,MAAM,EAChB,QAAQ,CAAC,EAAE,MAAM,EACjB,KAAK,CAAC,EAAE,OAAO,GACd,YAAY,CAQd;AAED,qCAAqC;AACrC,wBAAgB,iBAAiB,CAC/B,QAAQ,EAAE,MAAM,EAChB,QAAQ,CAAC,EAAE,MAAM,EACjB,KAAK,CAAC,EAAE,OAAO,GACd,YAAY,CAQd;AAED,sCAAsC;AACtC,wBAAgB,kBAAkB,CAChC,QAAQ,EAAE,MAAM,EAChB,QAAQ,CAAC,EAAE,MAAM,EACjB,KAAK,CAAC,EAAE,OAAO,GACd,YAAY,CAQd;AAED,wCAAwC;AACxC,wBAAgB,oBAAoB,CAClC,QAAQ,EAAE,MAAM,EAChB,QAAQ,CAAC,EAAE,MAAM,EACjB,KAAK,CAAC,EAAE,OAAO,GACd,YAAY,CAQd;AAED,sCAAsC;AACtC,wBAAgB,kBAAkB,CAChC,QAAQ,EAAE,MAAM,EAChB,QAAQ,CAAC,EAAE,MAAM,EACjB,KAAK,CAAC,EAAE,OAAO,GACd,YAAY,CAQd;AAED,yCAAyC;AACzC,wBAAgB,oBAAoB,CAClC,QAAQ,EAAE,MAAM,EAChB,QAAQ,CAAC,EAAE,MAAM,GAChB,YAAY,CASd"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Storage error factory functions.
|
|
3
|
+
*/
|
|
4
|
+
import { ErrorCode } from "../../base/types/errorCode.type.js";
|
|
5
|
+
import { StorageError, StorageOperation, } from "./storageError.base.js";
|
|
6
|
+
/** Creates a storage read error. */
|
|
7
|
+
export function storageReadError(resource, provider, cause) {
|
|
8
|
+
return new StorageError(`Failed to read "${resource}".`, {
|
|
9
|
+
code: ErrorCode.STORAGE_READ,
|
|
10
|
+
operation: StorageOperation.READ,
|
|
11
|
+
provider,
|
|
12
|
+
resource,
|
|
13
|
+
cause,
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
/** Creates a storage write error. */
|
|
17
|
+
export function storageWriteError(resource, provider, cause) {
|
|
18
|
+
return new StorageError(`Failed to write "${resource}".`, {
|
|
19
|
+
code: ErrorCode.STORAGE_WRITE,
|
|
20
|
+
operation: StorageOperation.WRITE,
|
|
21
|
+
provider,
|
|
22
|
+
resource,
|
|
23
|
+
cause,
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
/** Creates a storage upload error. */
|
|
27
|
+
export function storageUploadError(resource, provider, cause) {
|
|
28
|
+
return new StorageError(`Failed to upload "${resource}".`, {
|
|
29
|
+
code: ErrorCode.STORAGE_UPLOAD,
|
|
30
|
+
operation: StorageOperation.UPLOAD,
|
|
31
|
+
provider,
|
|
32
|
+
resource,
|
|
33
|
+
cause,
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
/** Creates a storage download error. */
|
|
37
|
+
export function storageDownloadError(resource, provider, cause) {
|
|
38
|
+
return new StorageError(`Failed to download "${resource}".`, {
|
|
39
|
+
code: ErrorCode.STORAGE_DOWNLOAD,
|
|
40
|
+
operation: StorageOperation.DOWNLOAD,
|
|
41
|
+
provider,
|
|
42
|
+
resource,
|
|
43
|
+
cause,
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
/** Creates a storage delete error. */
|
|
47
|
+
export function storageDeleteError(resource, provider, cause) {
|
|
48
|
+
return new StorageError(`Failed to delete "${resource}".`, {
|
|
49
|
+
code: ErrorCode.STORAGE_DELETE,
|
|
50
|
+
operation: StorageOperation.DELETE,
|
|
51
|
+
provider,
|
|
52
|
+
resource,
|
|
53
|
+
cause,
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
/** Creates a storage not found error. */
|
|
57
|
+
export function storageNotFoundError(resource, provider) {
|
|
58
|
+
return new StorageError(`Resource "${resource}" was not found.`, {
|
|
59
|
+
code: ErrorCode.NOT_FOUND,
|
|
60
|
+
operation: StorageOperation.READ,
|
|
61
|
+
provider,
|
|
62
|
+
resource,
|
|
63
|
+
statusCode: 404,
|
|
64
|
+
expose: true,
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
//# sourceMappingURL=storageError.factory.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"storageError.factory.js","sourceRoot":"","sources":["../../../src/infrastructure/storage/storageError.factory.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,oCAAoC,CAAC;AAC/D,OAAO,EACL,YAAY,EACZ,gBAAgB,GAEjB,MAAM,wBAAwB,CAAC;AAEhC,oCAAoC;AACpC,MAAM,UAAU,gBAAgB,CAC9B,QAAgB,EAChB,QAAiB,EACjB,KAAe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AC,MAAM;QAClC,QAAQ;QACR,QAAQ;QACR,KAAK;KACN,CAAC,CAAC;AACL,CAAC;AAED,yCAAyC;AACzC,MAAM,UAAU,oBAAoB,CAClC,QAAgB,EAChB,QAAiB;IAEjB,OAAO,IAAI,YAAY,CAAC,aAAa,QAAQ,kBAAkB,EAAE;QAC/D,IAAI,EAAE,SAAS,CAAC,SAAS;QACzB,SAAS,EAAE,gBAAgB,CAAC,IAAI;QAChC,QAAQ;QACR,QAAQ;QACR,UAAU,EAAE,GAAG;QACf,MAAM,EAAE,IAAI;KACb,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Crypto error classes — re-exports from focused files.
|
|
3
|
+
*/
|
|
4
|
+
export { CryptoError, createCryptoError, isCryptoError, CryptoOperation, } from "./cryptoError.base.js";
|
|
5
|
+
export type { CryptoErrorOptions } from "./cryptoError.base.js";
|
|
6
|
+
export { cryptoHashError, cryptoCipherError, cryptoSignatureError, cryptoKeyDerivationError, cryptoKeyError, } from "./cryptoError.factory.js";
|
|
7
|
+
//# sourceMappingURL=crypto.error.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"crypto.error.d.ts","sourceRoot":"","sources":["../../src/system/crypto.error.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EACL,WAAW,EACX,iBAAiB,EACjB,aAAa,EACb,eAAe,GAChB,MAAM,uBAAuB,CAAC;AAC/B,YAAY,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAEhE,OAAO,EACL,eAAe,EACf,iBAAiB,EACjB,oBAAoB,EACpB,wBAAwB,EACxB,cAAc,GACf,MAAM,0BAA0B,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Crypto error classes — re-exports from focused files.
|
|
3
|
+
*/
|
|
4
|
+
export { CryptoError, createCryptoError, isCryptoError, CryptoOperation, } from "./cryptoError.base.js";
|
|
5
|
+
export { cryptoHashError, cryptoCipherError, cryptoSignatureError, cryptoKeyDerivationError, cryptoKeyError, } from "./cryptoError.factory.js";
|
|
6
|
+
//# sourceMappingURL=crypto.error.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"crypto.error.js","sourceRoot":"","sources":["../../src/system/crypto.error.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EACL,WAAW,EACX,iBAAiB,EACjB,aAAa,EACb,eAAe,GAChB,MAAM,uBAAuB,CAAC;AAG/B,OAAO,EACL,eAAe,EACf,iBAAiB,EACjB,oBAAoB,EACpB,wBAAwB,EACxB,cAAc,GACf,MAAM,0BAA0B,CAAC"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Base CryptoError class, options, and factory functions.
|
|
3
|
+
*/
|
|
4
|
+
import { BaseError } from "../base/core/baseError.core.js";
|
|
5
|
+
import type { BaseErrorOptions } from "../base/types/baseError.type.js";
|
|
6
|
+
import { ErrorCategory } from "../base/types/errorCategory.type.js";
|
|
7
|
+
import { ErrorSeverity } from "../base/types/errorSeverity.type.js";
|
|
8
|
+
/** Cryptographic operation types used for diagnostics. */
|
|
9
|
+
export declare enum CryptoOperation {
|
|
10
|
+
UNKNOWN = "unknown",
|
|
11
|
+
HASH = "hash",
|
|
12
|
+
VERIFY_HASH = "verify_hash",
|
|
13
|
+
ENCRYPT = "encrypt",
|
|
14
|
+
DECRYPT = "decrypt",
|
|
15
|
+
SIGN = "sign",
|
|
16
|
+
VERIFY_SIGNATURE = "verify_signature",
|
|
17
|
+
KEY_GENERATION = "key_generation",
|
|
18
|
+
KEY_DERIVATION = "key_derivation",
|
|
19
|
+
KEY_IMPORT = "key_import",
|
|
20
|
+
KEY_EXPORT = "key_export",
|
|
21
|
+
RANDOM = "random",
|
|
22
|
+
ENCODE = "encode",
|
|
23
|
+
DECODE = "decode"
|
|
24
|
+
}
|
|
25
|
+
/** Options for creating a cryptographic error. */
|
|
26
|
+
export interface CryptoErrorOptions extends Omit<BaseErrorOptions, "category"> {
|
|
27
|
+
readonly category?: ErrorCategory;
|
|
28
|
+
readonly operation?: CryptoOperation;
|
|
29
|
+
readonly algorithm?: string;
|
|
30
|
+
}
|
|
31
|
+
/** Error raised when a cryptographic operation fails. */
|
|
32
|
+
export declare class CryptoError extends BaseError {
|
|
33
|
+
readonly operation: CryptoOperation;
|
|
34
|
+
readonly algorithm?: string;
|
|
35
|
+
constructor(message?: string, options?: CryptoErrorOptions);
|
|
36
|
+
toJSON(): {
|
|
37
|
+
name: string;
|
|
38
|
+
message: string;
|
|
39
|
+
code: string;
|
|
40
|
+
category: ErrorCategory;
|
|
41
|
+
severity: ErrorSeverity;
|
|
42
|
+
statusCode: number;
|
|
43
|
+
expose: boolean;
|
|
44
|
+
isOperational: boolean;
|
|
45
|
+
metadata: Readonly<import("../index.js").ErrorMetadata>;
|
|
46
|
+
stack?: string;
|
|
47
|
+
cause?: import("../base/types/baseError.type.js").SerializedBaseError | unknown;
|
|
48
|
+
operation: CryptoOperation;
|
|
49
|
+
algorithm?: string | undefined;
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
/** Creates a cryptographic error. */
|
|
53
|
+
export declare function createCryptoError(message?: string, options?: CryptoErrorOptions): CryptoError;
|
|
54
|
+
/** Determines whether an unknown value is a CryptoError. */
|
|
55
|
+
export declare function isCryptoError(value: unknown): value is CryptoError;
|
|
56
|
+
//# sourceMappingURL=cryptoError.base.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cryptoError.base.d.ts","sourceRoot":"","sources":["../../src/system/cryptoError.base.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAC3D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AACxE,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AAEpE,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AAEpE,0DAA0D;AAC1D,oBAAY,eAAe;IACzB,OAAO,YAAY;IACnB,IAAI,SAAS;IACb,WAAW,gBAAgB;IAC3B,OAAO,YAAY;IACnB,OAAO,YAAY;IACnB,IAAI,SAAS;IACb,gBAAgB,qBAAqB;IACrC,cAAc,mBAAmB;IACjC,cAAc,mBAAmB;IACjC,UAAU,eAAe;IACzB,UAAU,eAAe;IACzB,MAAM,WAAW;IACjB,MAAM,WAAW;IACjB,MAAM,WAAW;CAClB;AAED,kDAAkD;AAClD,MAAM,WAAW,kBAAmB,SAAQ,IAAI,CAAC,gBAAgB,EAAE,UAAU,CAAC;IAC5E,QAAQ,CAAC,QAAQ,CAAC,EAAE,aAAa,CAAC;IAClC,QAAQ,CAAC,SAAS,CAAC,EAAE,eAAe,CAAC;IACrC,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED,yDAAyD;AACzD,qBAAa,WAAY,SAAQ,SAAS;IACxC,SAAgB,SAAS,EAAE,eAAe,CAAC;IAC3C,SAAgB,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnC,YACE,OAAO,SAAsC,EAC7C,OAAO,GAAE,kBAAuB,EAsBjC;IAEe,MAAM;;;;;;;;;;;;;;MAMrB;CACF;AAED,qCAAqC;AACrC,wBAAgB,iBAAiB,CAC/B,OAAO,SAAsC,EAC7C,OAAO,GAAE,kBAAuB,GAC/B,WAAW,CAEb;AAED,4DAA4D;AAC5D,wBAAgB,aAAa,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,WAAW,CAElE"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Base CryptoError class, options, and factory functions.
|
|
3
|
+
*/
|
|
4
|
+
import { BaseError } from "../base/core/baseError.core.js";
|
|
5
|
+
import { ErrorCategory } from "../base/types/errorCategory.type.js";
|
|
6
|
+
import { ErrorCode } from "../base/types/errorCode.type.js";
|
|
7
|
+
import { ErrorSeverity } from "../base/types/errorSeverity.type.js";
|
|
8
|
+
/** Cryptographic operation types used for diagnostics. */
|
|
9
|
+
export var CryptoOperation;
|
|
10
|
+
(function (CryptoOperation) {
|
|
11
|
+
CryptoOperation["UNKNOWN"] = "unknown";
|
|
12
|
+
CryptoOperation["HASH"] = "hash";
|
|
13
|
+
CryptoOperation["VERIFY_HASH"] = "verify_hash";
|
|
14
|
+
CryptoOperation["ENCRYPT"] = "encrypt";
|
|
15
|
+
CryptoOperation["DECRYPT"] = "decrypt";
|
|
16
|
+
CryptoOperation["SIGN"] = "sign";
|
|
17
|
+
CryptoOperation["VERIFY_SIGNATURE"] = "verify_signature";
|
|
18
|
+
CryptoOperation["KEY_GENERATION"] = "key_generation";
|
|
19
|
+
CryptoOperation["KEY_DERIVATION"] = "key_derivation";
|
|
20
|
+
CryptoOperation["KEY_IMPORT"] = "key_import";
|
|
21
|
+
CryptoOperation["KEY_EXPORT"] = "key_export";
|
|
22
|
+
CryptoOperation["RANDOM"] = "random";
|
|
23
|
+
CryptoOperation["ENCODE"] = "encode";
|
|
24
|
+
CryptoOperation["DECODE"] = "decode";
|
|
25
|
+
})(CryptoOperation || (CryptoOperation = {}));
|
|
26
|
+
/** Error raised when a cryptographic operation fails. */
|
|
27
|
+
export class CryptoError extends BaseError {
|
|
28
|
+
operation;
|
|
29
|
+
algorithm;
|
|
30
|
+
constructor(message = "A cryptographic operation failed.", options = {}) {
|
|
31
|
+
super(message, {
|
|
32
|
+
...options,
|
|
33
|
+
code: options.code ?? ErrorCode.CRYPTO,
|
|
34
|
+
category: options.category ?? ErrorCategory.CRYPTOGRAPHY,
|
|
35
|
+
severity: options.severity ?? ErrorSeverity.ERROR,
|
|
36
|
+
statusCode: options.statusCode ?? 500,
|
|
37
|
+
expose: options.expose ?? false,
|
|
38
|
+
isOperational: options.isOperational ?? true,
|
|
39
|
+
metadata: {
|
|
40
|
+
...options.metadata,
|
|
41
|
+
...(options.operation !== undefined
|
|
42
|
+
? { operation: options.operation }
|
|
43
|
+
: {}),
|
|
44
|
+
...(options.algorithm !== undefined
|
|
45
|
+
? { algorithm: options.algorithm }
|
|
46
|
+
: {}),
|
|
47
|
+
},
|
|
48
|
+
});
|
|
49
|
+
this.operation = options.operation ?? CryptoOperation.UNKNOWN;
|
|
50
|
+
this.algorithm = options.algorithm;
|
|
51
|
+
}
|
|
52
|
+
toJSON() {
|
|
53
|
+
return {
|
|
54
|
+
...super.toJSON(),
|
|
55
|
+
operation: this.operation,
|
|
56
|
+
...(this.algorithm !== undefined ? { algorithm: this.algorithm } : {}),
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
/** Creates a cryptographic error. */
|
|
61
|
+
export function createCryptoError(message = "A cryptographic operation failed.", options = {}) {
|
|
62
|
+
return new CryptoError(message, options);
|
|
63
|
+
}
|
|
64
|
+
/** Determines whether an unknown value is a CryptoError. */
|
|
65
|
+
export function isCryptoError(value) {
|
|
66
|
+
return value instanceof CryptoError;
|
|
67
|
+
}
|
|
68
|
+
//# sourceMappingURL=cryptoError.base.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cryptoError.base.js","sourceRoot":"","sources":["../../src/system/cryptoError.base.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAE3D,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AACpE,OAAO,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAC5D,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AAEpE,0DAA0D;AAC1D,MAAM,CAAN,IAAY,eAeX;AAfD,WAAY,eAAe;IACzB,sCAAmB,CAAA;IACnB,gCAAa,CAAA;IACb,8CAA2B,CAAA;IAC3B,sCAAmB,CAAA;IACnB,sCAAmB,CAAA;IACnB,gCAAa,CAAA;IACb,wDAAqC,CAAA;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AAO;YACL,GAAG,KAAK,CAAC,MAAM,EAAE;YACjB,SAAS,EAAE,IAAI,CAAC,SAAS;YACzB,GAAG,CAAC,IAAI,CAAC,SAAS,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,IAAI,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;SACvE,CAAC;IACJ,CAAC;CACF;AAED,qCAAqC;AACrC,MAAM,UAAU,iBAAiB,CAC/B,OAAO,GAAG,mCAAmC,EAC7C,OAAO,GAAuB,EAAE;IAEhC,OAAO,IAAI,WAAW,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;AAC3C,CAAC;AAED,4DAA4D;AAC5D,MAAM,UAAU,aAAa,CAAC,KAAc;IAC1C,OAAO,KAAK,YAAY,WAAW,CAAC;AACtC,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Crypto error factory functions.
|
|
3
|
+
*/
|
|
4
|
+
import { CryptoError, CryptoOperation } from "./cryptoError.base.js";
|
|
5
|
+
/** Creates a hashing error. */
|
|
6
|
+
export declare function cryptoHashError(message?: string, algorithm?: string): CryptoError;
|
|
7
|
+
/** Creates an encryption or cipher error. */
|
|
8
|
+
export declare function cryptoCipherError(message?: string, operation?: CryptoOperation.ENCRYPT | CryptoOperation.DECRYPT, algorithm?: string): CryptoError;
|
|
9
|
+
/** Creates a cryptographic signature error. */
|
|
10
|
+
export declare function cryptoSignatureError(message?: string, operation?: CryptoOperation.SIGN | CryptoOperation.VERIFY_SIGNATURE, algorithm?: string): CryptoError;
|
|
11
|
+
/** Creates a key derivation error. */
|
|
12
|
+
export declare function cryptoKeyDerivationError(message?: string, algorithm?: string): CryptoError;
|
|
13
|
+
/** Creates a cryptographic key error. */
|
|
14
|
+
export declare function cryptoKeyError(message?: string, operation?: CryptoOperation.KEY_GENERATION | CryptoOperation.KEY_IMPORT | CryptoOperation.KEY_EXPORT, algorithm?: string): CryptoError;
|
|
15
|
+
//# sourceMappingURL=cryptoError.factory.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cryptoError.factory.d.ts","sourceRoot":"","sources":["../../src/system/cryptoError.factory.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAErE,+BAA+B;AAC/B,wBAAgB,eAAe,CAC7B,OAAO,SAAkC,EACzC,SAAS,CAAC,EAAE,MAAM,GACjB,WAAW,CAMb;AAED,6CAA6C;AAC7C,wBAAgB,iBAAiB,CAC/B,OAAO,SAAmD,EAC1D,SAAS,GACP,eAAe,CAAC,OAAO,GAAG,eAAe,CAAC,OAAiC,EAC7E,SAAS,CAAC,EAAE,MAAM,GACjB,WAAW,CAMb;AAED,+CAA+C;AAC/C,wBAAgB,oBAAoB,CAClC,OAAO,SAAiD,EACxD,SAAS,GACL,eAAe,CAAC,IAAI,GACpB,eAAe,CAAC,gBAAmD,EACvE,SAAS,CAAC,EAAE,MAAM,GACjB,WAAW,CAMb;AAED,sCAAsC;AACtC,wBAAgB,wBAAwB,CACtC,OAAO,SAAyC,EAChD,SAAS,CAAC,EAAE,MAAM,GACjB,WAAW,CAMb;AAED,yCAAyC;AACzC,wBAAgB,cAAc,CAC5B,OAAO,SAAwC,EAC/C,SAAS,GACL,eAAe,CAAC,cAAc,GAC9B,eAAe,CAAC,UAAU,GAC1B,eAAe,CAAC,UAA2C,EAC/D,SAAS,CAAC,EAAE,MAAM,GACjB,WAAW,CAMb"}
|