@xeno-js/shared 0.1.0 → 0.1.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/dist/index.cjs +3165 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +6062 -0
- package/dist/index.d.ts +6062 -5
- package/dist/index.js +3085 -4
- package/dist/index.js.map +1 -1
- package/package.json +5 -4
- package/dist/application/cqrs/command/command.d.ts +0 -8
- package/dist/application/cqrs/command/command.d.ts.map +0 -1
- package/dist/application/cqrs/command/command.js +0 -9
- package/dist/application/cqrs/command/command.js.map +0 -1
- package/dist/application/cqrs/command/index.d.ts +0 -2
- package/dist/application/cqrs/command/index.d.ts.map +0 -1
- package/dist/application/cqrs/command/index.js +0 -2
- package/dist/application/cqrs/command/index.js.map +0 -1
- package/dist/application/cqrs/index.d.ts +0 -3
- package/dist/application/cqrs/index.d.ts.map +0 -1
- package/dist/application/cqrs/index.js +0 -3
- package/dist/application/cqrs/index.js.map +0 -1
- package/dist/application/cqrs/query/index.d.ts +0 -2
- package/dist/application/cqrs/query/index.d.ts.map +0 -1
- package/dist/application/cqrs/query/index.js +0 -2
- package/dist/application/cqrs/query/index.js.map +0 -1
- package/dist/application/cqrs/query/query.d.ts +0 -9
- package/dist/application/cqrs/query/query.d.ts.map +0 -1
- package/dist/application/cqrs/query/query.js +0 -11
- package/dist/application/cqrs/query/query.js.map +0 -1
- package/dist/application/index.d.ts +0 -3
- package/dist/application/index.d.ts.map +0 -1
- package/dist/application/index.js +0 -3
- package/dist/application/index.js.map +0 -1
- package/dist/application/loggers/__tests__/base.logger.test.d.ts +0 -2
- package/dist/application/loggers/__tests__/base.logger.test.d.ts.map +0 -1
- package/dist/application/loggers/__tests__/base.logger.test.js +0 -132
- package/dist/application/loggers/__tests__/base.logger.test.js.map +0 -1
- package/dist/application/loggers/base.logger.d.ts +0 -48
- package/dist/application/loggers/base.logger.d.ts.map +0 -1
- package/dist/application/loggers/base.logger.js +0 -68
- package/dist/application/loggers/base.logger.js.map +0 -1
- package/dist/application/loggers/index.d.ts +0 -2
- package/dist/application/loggers/index.d.ts.map +0 -1
- package/dist/application/loggers/index.js +0 -2
- package/dist/application/loggers/index.js.map +0 -1
- package/dist/domain/config/auth.config.d.ts +0 -14
- package/dist/domain/config/auth.config.d.ts.map +0 -1
- package/dist/domain/config/auth.config.js +0 -2
- package/dist/domain/config/auth.config.js.map +0 -1
- package/dist/domain/config/cache.config.d.ts +0 -92
- package/dist/domain/config/cache.config.d.ts.map +0 -1
- package/dist/domain/config/cache.config.js +0 -2
- package/dist/domain/config/cache.config.js.map +0 -1
- package/dist/domain/config/db.config.d.ts +0 -29
- package/dist/domain/config/db.config.d.ts.map +0 -1
- package/dist/domain/config/db.config.js +0 -2
- package/dist/domain/config/db.config.js.map +0 -1
- package/dist/domain/config/http.config.d.ts +0 -148
- package/dist/domain/config/http.config.d.ts.map +0 -1
- package/dist/domain/config/http.config.js +0 -2
- package/dist/domain/config/http.config.js.map +0 -1
- package/dist/domain/config/index.d.ts +0 -5
- package/dist/domain/config/index.d.ts.map +0 -1
- package/dist/domain/config/index.js +0 -2
- package/dist/domain/config/index.js.map +0 -1
- package/dist/domain/config/resilience.config.d.ts +0 -94
- package/dist/domain/config/resilience.config.d.ts.map +0 -1
- package/dist/domain/config/resilience.config.js +0 -2
- package/dist/domain/config/resilience.config.js.map +0 -1
- package/dist/domain/contracts/cache/icache.contracts.d.ts +0 -93
- package/dist/domain/contracts/cache/icache.contracts.d.ts.map +0 -1
- package/dist/domain/contracts/cache/icache.contracts.js +0 -2
- package/dist/domain/contracts/cache/icache.contracts.js.map +0 -1
- package/dist/domain/contracts/cache/ikey-builder.contracts.d.ts +0 -34
- package/dist/domain/contracts/cache/ikey-builder.contracts.d.ts.map +0 -1
- package/dist/domain/contracts/cache/ikey-builder.contracts.js +0 -2
- package/dist/domain/contracts/cache/ikey-builder.contracts.js.map +0 -1
- package/dist/domain/contracts/cache/index.d.ts +0 -3
- package/dist/domain/contracts/cache/index.d.ts.map +0 -1
- package/dist/domain/contracts/cache/index.js +0 -2
- package/dist/domain/contracts/cache/index.js.map +0 -1
- package/dist/domain/contracts/configuration/iconfiguration.contracts.d.ts +0 -61
- package/dist/domain/contracts/configuration/iconfiguration.contracts.d.ts.map +0 -1
- package/dist/domain/contracts/configuration/iconfiguration.contracts.js +0 -2
- package/dist/domain/contracts/configuration/iconfiguration.contracts.js.map +0 -1
- package/dist/domain/contracts/configuration/index.d.ts +0 -2
- package/dist/domain/contracts/configuration/index.d.ts.map +0 -1
- package/dist/domain/contracts/configuration/index.js +0 -2
- package/dist/domain/contracts/configuration/index.js.map +0 -1
- package/dist/domain/contracts/context/context_types/identity-context.types.d.ts +0 -63
- package/dist/domain/contracts/context/context_types/identity-context.types.d.ts.map +0 -1
- package/dist/domain/contracts/context/context_types/identity-context.types.js +0 -2
- package/dist/domain/contracts/context/context_types/identity-context.types.js.map +0 -1
- package/dist/domain/contracts/context/context_types/index.d.ts +0 -6
- package/dist/domain/contracts/context/context_types/index.d.ts.map +0 -1
- package/dist/domain/contracts/context/context_types/index.js +0 -2
- package/dist/domain/contracts/context/context_types/index.js.map +0 -1
- package/dist/domain/contracts/context/context_types/messaging-context.types.d.ts +0 -70
- package/dist/domain/contracts/context/context_types/messaging-context.types.d.ts.map +0 -1
- package/dist/domain/contracts/context/context_types/messaging-context.types.js +0 -2
- package/dist/domain/contracts/context/context_types/messaging-context.types.js.map +0 -1
- package/dist/domain/contracts/context/context_types/network-context.types.d.ts +0 -82
- package/dist/domain/contracts/context/context_types/network-context.types.d.ts.map +0 -1
- package/dist/domain/contracts/context/context_types/network-context.types.js +0 -2
- package/dist/domain/contracts/context/context_types/network-context.types.js.map +0 -1
- package/dist/domain/contracts/context/context_types/request-context.types.d.ts +0 -48
- package/dist/domain/contracts/context/context_types/request-context.types.d.ts.map +0 -1
- package/dist/domain/contracts/context/context_types/request-context.types.js +0 -2
- package/dist/domain/contracts/context/context_types/request-context.types.js.map +0 -1
- package/dist/domain/contracts/context/context_types/tracing-context.types.d.ts +0 -54
- package/dist/domain/contracts/context/context_types/tracing-context.types.d.ts.map +0 -1
- package/dist/domain/contracts/context/context_types/tracing-context.types.js +0 -2
- package/dist/domain/contracts/context/context_types/tracing-context.types.js.map +0 -1
- package/dist/domain/contracts/context/index.d.ts +0 -3
- package/dist/domain/contracts/context/index.d.ts.map +0 -1
- package/dist/domain/contracts/context/index.js +0 -2
- package/dist/domain/contracts/context/index.js.map +0 -1
- package/dist/domain/contracts/context/irequest-context.contracts.d.ts +0 -68
- package/dist/domain/contracts/context/irequest-context.contracts.d.ts.map +0 -1
- package/dist/domain/contracts/context/irequest-context.contracts.js +0 -2
- package/dist/domain/contracts/context/irequest-context.contracts.js.map +0 -1
- package/dist/domain/contracts/controllers/icontroller.contracts.d.ts +0 -25
- package/dist/domain/contracts/controllers/icontroller.contracts.d.ts.map +0 -1
- package/dist/domain/contracts/controllers/icontroller.contracts.js +0 -2
- package/dist/domain/contracts/controllers/icontroller.contracts.js.map +0 -1
- package/dist/domain/contracts/controllers/index.d.ts +0 -2
- package/dist/domain/contracts/controllers/index.d.ts.map +0 -1
- package/dist/domain/contracts/controllers/index.js +0 -2
- package/dist/domain/contracts/controllers/index.js.map +0 -1
- package/dist/domain/contracts/cqrs/cqrs_types/icommand.types.d.ts +0 -30
- package/dist/domain/contracts/cqrs/cqrs_types/icommand.types.d.ts.map +0 -1
- package/dist/domain/contracts/cqrs/cqrs_types/icommand.types.js +0 -2
- package/dist/domain/contracts/cqrs/cqrs_types/icommand.types.js.map +0 -1
- package/dist/domain/contracts/cqrs/cqrs_types/index.d.ts +0 -4
- package/dist/domain/contracts/cqrs/cqrs_types/index.d.ts.map +0 -1
- package/dist/domain/contracts/cqrs/cqrs_types/index.js +0 -2
- package/dist/domain/contracts/cqrs/cqrs_types/index.js.map +0 -1
- package/dist/domain/contracts/cqrs/cqrs_types/iquery.types.d.ts +0 -32
- package/dist/domain/contracts/cqrs/cqrs_types/iquery.types.d.ts.map +0 -1
- package/dist/domain/contracts/cqrs/cqrs_types/iquery.types.js +0 -2
- package/dist/domain/contracts/cqrs/cqrs_types/iquery.types.js.map +0 -1
- package/dist/domain/contracts/cqrs/cqrs_types/irequest.types.d.ts +0 -30
- package/dist/domain/contracts/cqrs/cqrs_types/irequest.types.d.ts.map +0 -1
- package/dist/domain/contracts/cqrs/cqrs_types/irequest.types.js +0 -2
- package/dist/domain/contracts/cqrs/cqrs_types/irequest.types.js.map +0 -1
- package/dist/domain/contracts/cqrs/ihandler.contracts.d.ts +0 -30
- package/dist/domain/contracts/cqrs/ihandler.contracts.d.ts.map +0 -1
- package/dist/domain/contracts/cqrs/ihandler.contracts.js +0 -2
- package/dist/domain/contracts/cqrs/ihandler.contracts.js.map +0 -1
- package/dist/domain/contracts/cqrs/imediator.contracts.d.ts +0 -41
- package/dist/domain/contracts/cqrs/imediator.contracts.d.ts.map +0 -1
- package/dist/domain/contracts/cqrs/imediator.contracts.js +0 -2
- package/dist/domain/contracts/cqrs/imediator.contracts.js.map +0 -1
- package/dist/domain/contracts/cqrs/index.d.ts +0 -5
- package/dist/domain/contracts/cqrs/index.d.ts.map +0 -1
- package/dist/domain/contracts/cqrs/index.js +0 -2
- package/dist/domain/contracts/cqrs/index.js.map +0 -1
- package/dist/domain/contracts/cqrs/ipipeline-behavior.contracts.d.ts +0 -42
- package/dist/domain/contracts/cqrs/ipipeline-behavior.contracts.d.ts.map +0 -1
- package/dist/domain/contracts/cqrs/ipipeline-behavior.contracts.js +0 -2
- package/dist/domain/contracts/cqrs/ipipeline-behavior.contracts.js.map +0 -1
- package/dist/domain/contracts/datasources/index.d.ts +0 -4
- package/dist/domain/contracts/datasources/index.d.ts.map +0 -1
- package/dist/domain/contracts/datasources/index.js +0 -2
- package/dist/domain/contracts/datasources/index.js.map +0 -1
- package/dist/domain/contracts/datasources/iread-datasource.contracts.d.ts +0 -41
- package/dist/domain/contracts/datasources/iread-datasource.contracts.d.ts.map +0 -1
- package/dist/domain/contracts/datasources/iread-datasource.contracts.js +0 -2
- package/dist/domain/contracts/datasources/iread-datasource.contracts.js.map +0 -1
- package/dist/domain/contracts/datasources/iremote-datasource.contracts.d.ts +0 -73
- package/dist/domain/contracts/datasources/iremote-datasource.contracts.d.ts.map +0 -1
- package/dist/domain/contracts/datasources/iremote-datasource.contracts.js +0 -2
- package/dist/domain/contracts/datasources/iremote-datasource.contracts.js.map +0 -1
- package/dist/domain/contracts/datasources/iwrite-datasource.contracts.d.ts +0 -82
- package/dist/domain/contracts/datasources/iwrite-datasource.contracts.d.ts.map +0 -1
- package/dist/domain/contracts/datasources/iwrite-datasource.contracts.js +0 -2
- package/dist/domain/contracts/datasources/iwrite-datasource.contracts.js.map +0 -1
- package/dist/domain/contracts/disposables/idisposable.contracts.d.ts +0 -23
- package/dist/domain/contracts/disposables/idisposable.contracts.d.ts.map +0 -1
- package/dist/domain/contracts/disposables/idisposable.contracts.js +0 -6
- package/dist/domain/contracts/disposables/idisposable.contracts.js.map +0 -1
- package/dist/domain/contracts/disposables/index.d.ts +0 -2
- package/dist/domain/contracts/disposables/index.d.ts.map +0 -1
- package/dist/domain/contracts/disposables/index.js +0 -2
- package/dist/domain/contracts/disposables/index.js.map +0 -1
- package/dist/domain/contracts/factories/ifactory.contracts.d.ts +0 -29
- package/dist/domain/contracts/factories/ifactory.contracts.d.ts.map +0 -1
- package/dist/domain/contracts/factories/ifactory.contracts.js +0 -2
- package/dist/domain/contracts/factories/ifactory.contracts.js.map +0 -1
- package/dist/domain/contracts/factories/index.d.ts +0 -2
- package/dist/domain/contracts/factories/index.d.ts.map +0 -1
- package/dist/domain/contracts/factories/index.js +0 -2
- package/dist/domain/contracts/factories/index.js.map +0 -1
- package/dist/domain/contracts/gate_keepers/igate-keeper.contracts.d.ts +0 -27
- package/dist/domain/contracts/gate_keepers/igate-keeper.contracts.d.ts.map +0 -1
- package/dist/domain/contracts/gate_keepers/igate-keeper.contracts.js +0 -2
- package/dist/domain/contracts/gate_keepers/igate-keeper.contracts.js.map +0 -1
- package/dist/domain/contracts/gate_keepers/index.d.ts +0 -2
- package/dist/domain/contracts/gate_keepers/index.d.ts.map +0 -1
- package/dist/domain/contracts/gate_keepers/index.js +0 -2
- package/dist/domain/contracts/gate_keepers/index.js.map +0 -1
- package/dist/domain/contracts/http/iallow-origin.contracts.d.ts +0 -1
- package/dist/domain/contracts/http/iallow-origin.contracts.d.ts.map +0 -1
- package/dist/domain/contracts/http/iallow-origin.contracts.js +0 -2
- package/dist/domain/contracts/http/iallow-origin.contracts.js.map +0 -1
- package/dist/domain/contracts/http/ihttp-client.contracts.d.ts +0 -81
- package/dist/domain/contracts/http/ihttp-client.contracts.d.ts.map +0 -1
- package/dist/domain/contracts/http/ihttp-client.contracts.js +0 -2
- package/dist/domain/contracts/http/ihttp-client.contracts.js.map +0 -1
- package/dist/domain/contracts/http/index.d.ts +0 -2
- package/dist/domain/contracts/http/index.d.ts.map +0 -1
- package/dist/domain/contracts/http/index.js +0 -2
- package/dist/domain/contracts/http/index.js.map +0 -1
- package/dist/domain/contracts/idempotency/idempotency-store.contracts.d.ts +0 -71
- package/dist/domain/contracts/idempotency/idempotency-store.contracts.d.ts.map +0 -1
- package/dist/domain/contracts/idempotency/idempotency-store.contracts.js +0 -2
- package/dist/domain/contracts/idempotency/idempotency-store.contracts.js.map +0 -1
- package/dist/domain/contracts/idempotency/index.d.ts +0 -2
- package/dist/domain/contracts/idempotency/index.d.ts.map +0 -1
- package/dist/domain/contracts/idempotency/index.js +0 -2
- package/dist/domain/contracts/idempotency/index.js.map +0 -1
- package/dist/domain/contracts/index.d.ts +0 -22
- package/dist/domain/contracts/index.d.ts.map +0 -1
- package/dist/domain/contracts/index.js +0 -2
- package/dist/domain/contracts/index.js.map +0 -1
- package/dist/domain/contracts/loggers/ilogger-client.contracts.d.ts +0 -27
- package/dist/domain/contracts/loggers/ilogger-client.contracts.d.ts.map +0 -1
- package/dist/domain/contracts/loggers/ilogger-client.contracts.js +0 -2
- package/dist/domain/contracts/loggers/ilogger-client.contracts.js.map +0 -1
- package/dist/domain/contracts/loggers/ilogger.contracts.d.ts +0 -62
- package/dist/domain/contracts/loggers/ilogger.contracts.d.ts.map +0 -1
- package/dist/domain/contracts/loggers/ilogger.contracts.js +0 -2
- package/dist/domain/contracts/loggers/ilogger.contracts.js.map +0 -1
- package/dist/domain/contracts/loggers/index.d.ts +0 -3
- package/dist/domain/contracts/loggers/index.d.ts.map +0 -1
- package/dist/domain/contracts/loggers/index.js +0 -2
- package/dist/domain/contracts/loggers/index.js.map +0 -1
- package/dist/domain/contracts/mappers/ibase-mapper.contracts.d.ts +0 -33
- package/dist/domain/contracts/mappers/ibase-mapper.contracts.d.ts.map +0 -1
- package/dist/domain/contracts/mappers/ibase-mapper.contracts.js +0 -2
- package/dist/domain/contracts/mappers/ibase-mapper.contracts.js.map +0 -1
- package/dist/domain/contracts/mappers/imapper.contracts.d.ts +0 -53
- package/dist/domain/contracts/mappers/imapper.contracts.d.ts.map +0 -1
- package/dist/domain/contracts/mappers/imapper.contracts.js +0 -2
- package/dist/domain/contracts/mappers/imapper.contracts.js.map +0 -1
- package/dist/domain/contracts/mappers/index.d.ts +0 -3
- package/dist/domain/contracts/mappers/index.d.ts.map +0 -1
- package/dist/domain/contracts/mappers/index.js +0 -2
- package/dist/domain/contracts/mappers/index.js.map +0 -1
- package/dist/domain/contracts/middlewares/imiddleware.contracts.d.ts +0 -34
- package/dist/domain/contracts/middlewares/imiddleware.contracts.d.ts.map +0 -1
- package/dist/domain/contracts/middlewares/imiddleware.contracts.js +0 -2
- package/dist/domain/contracts/middlewares/imiddleware.contracts.js.map +0 -1
- package/dist/domain/contracts/middlewares/index.d.ts +0 -2
- package/dist/domain/contracts/middlewares/index.d.ts.map +0 -1
- package/dist/domain/contracts/middlewares/index.js +0 -2
- package/dist/domain/contracts/middlewares/index.js.map +0 -1
- package/dist/domain/contracts/policies/index.d.ts +0 -2
- package/dist/domain/contracts/policies/index.d.ts.map +0 -1
- package/dist/domain/contracts/policies/index.js +0 -2
- package/dist/domain/contracts/policies/index.js.map +0 -1
- package/dist/domain/contracts/policies/ipolicy-registry.contracts.d.ts +0 -38
- package/dist/domain/contracts/policies/ipolicy-registry.contracts.d.ts.map +0 -1
- package/dist/domain/contracts/policies/ipolicy-registry.contracts.js +0 -2
- package/dist/domain/contracts/policies/ipolicy-registry.contracts.js.map +0 -1
- package/dist/domain/contracts/repositories/index.d.ts +0 -3
- package/dist/domain/contracts/repositories/index.d.ts.map +0 -1
- package/dist/domain/contracts/repositories/index.js +0 -2
- package/dist/domain/contracts/repositories/index.js.map +0 -1
- package/dist/domain/contracts/repositories/iread-dao.contracts.d.ts +0 -41
- package/dist/domain/contracts/repositories/iread-dao.contracts.d.ts.map +0 -1
- package/dist/domain/contracts/repositories/iread-dao.contracts.js +0 -2
- package/dist/domain/contracts/repositories/iread-dao.contracts.js.map +0 -1
- package/dist/domain/contracts/repositories/irepository.contracts.d.ts +0 -95
- package/dist/domain/contracts/repositories/irepository.contracts.d.ts.map +0 -1
- package/dist/domain/contracts/repositories/irepository.contracts.js +0 -2
- package/dist/domain/contracts/repositories/irepository.contracts.js.map +0 -1
- package/dist/domain/contracts/services/auth/iauth-service.contracts.d.ts +0 -71
- package/dist/domain/contracts/services/auth/iauth-service.contracts.d.ts.map +0 -1
- package/dist/domain/contracts/services/auth/iauth-service.contracts.js +0 -2
- package/dist/domain/contracts/services/auth/iauth-service.contracts.js.map +0 -1
- package/dist/domain/contracts/services/auth/index.d.ts +0 -2
- package/dist/domain/contracts/services/auth/index.d.ts.map +0 -1
- package/dist/domain/contracts/services/auth/index.js +0 -2
- package/dist/domain/contracts/services/auth/index.js.map +0 -1
- package/dist/domain/contracts/services/concurrency/concurrency-service.contracts.d.ts +0 -25
- package/dist/domain/contracts/services/concurrency/concurrency-service.contracts.d.ts.map +0 -1
- package/dist/domain/contracts/services/concurrency/concurrency-service.contracts.js +0 -2
- package/dist/domain/contracts/services/concurrency/concurrency-service.contracts.js.map +0 -1
- package/dist/domain/contracts/services/concurrency/index.d.ts +0 -2
- package/dist/domain/contracts/services/concurrency/index.d.ts.map +0 -1
- package/dist/domain/contracts/services/concurrency/index.js +0 -2
- package/dist/domain/contracts/services/concurrency/index.js.map +0 -1
- package/dist/domain/contracts/services/extractors/iextractor-service.contracts.d.ts +0 -24
- package/dist/domain/contracts/services/extractors/iextractor-service.contracts.d.ts.map +0 -1
- package/dist/domain/contracts/services/extractors/iextractor-service.contracts.js +0 -2
- package/dist/domain/contracts/services/extractors/iextractor-service.contracts.js.map +0 -1
- package/dist/domain/contracts/services/extractors/index.d.ts +0 -2
- package/dist/domain/contracts/services/extractors/index.d.ts.map +0 -1
- package/dist/domain/contracts/services/extractors/index.js +0 -2
- package/dist/domain/contracts/services/extractors/index.js.map +0 -1
- package/dist/domain/contracts/services/index.d.ts +0 -6
- package/dist/domain/contracts/services/index.d.ts.map +0 -1
- package/dist/domain/contracts/services/index.js +0 -2
- package/dist/domain/contracts/services/index.js.map +0 -1
- package/dist/domain/contracts/services/resiliences/index.d.ts +0 -2
- package/dist/domain/contracts/services/resiliences/index.d.ts.map +0 -1
- package/dist/domain/contracts/services/resiliences/index.js +0 -2
- package/dist/domain/contracts/services/resiliences/index.js.map +0 -1
- package/dist/domain/contracts/services/resiliences/iresilience-service.contracts.d.ts +0 -26
- package/dist/domain/contracts/services/resiliences/iresilience-service.contracts.d.ts.map +0 -1
- package/dist/domain/contracts/services/resiliences/iresilience-service.contracts.js +0 -2
- package/dist/domain/contracts/services/resiliences/iresilience-service.contracts.js.map +0 -1
- package/dist/domain/contracts/services/validators/index.d.ts +0 -2
- package/dist/domain/contracts/services/validators/index.d.ts.map +0 -1
- package/dist/domain/contracts/services/validators/index.js +0 -2
- package/dist/domain/contracts/services/validators/index.js.map +0 -1
- package/dist/domain/contracts/services/validators/ivalidator-service.contracts.d.ts +0 -38
- package/dist/domain/contracts/services/validators/ivalidator-service.contracts.d.ts.map +0 -1
- package/dist/domain/contracts/services/validators/ivalidator-service.contracts.js +0 -2
- package/dist/domain/contracts/services/validators/ivalidator-service.contracts.js.map +0 -1
- package/dist/domain/contracts/specifications/index.d.ts +0 -2
- package/dist/domain/contracts/specifications/index.d.ts.map +0 -1
- package/dist/domain/contracts/specifications/index.js +0 -2
- package/dist/domain/contracts/specifications/index.js.map +0 -1
- package/dist/domain/contracts/specifications/ispecification.contracts.d.ts +0 -58
- package/dist/domain/contracts/specifications/ispecification.contracts.d.ts.map +0 -1
- package/dist/domain/contracts/specifications/ispecification.contracts.js +0 -2
- package/dist/domain/contracts/specifications/ispecification.contracts.js.map +0 -1
- package/dist/domain/contracts/storage/index.d.ts +0 -2
- package/dist/domain/contracts/storage/index.d.ts.map +0 -1
- package/dist/domain/contracts/storage/index.js +0 -2
- package/dist/domain/contracts/storage/index.js.map +0 -1
- package/dist/domain/contracts/storage/istorage.contracts.d.ts +0 -6
- package/dist/domain/contracts/storage/istorage.contracts.d.ts.map +0 -1
- package/dist/domain/contracts/storage/istorage.contracts.js +0 -2
- package/dist/domain/contracts/storage/istorage.contracts.js.map +0 -1
- package/dist/domain/contracts/strategies/index.d.ts +0 -2
- package/dist/domain/contracts/strategies/index.d.ts.map +0 -1
- package/dist/domain/contracts/strategies/index.js +0 -2
- package/dist/domain/contracts/strategies/index.js.map +0 -1
- package/dist/domain/contracts/strategies/istrategy.contracts.d.ts +0 -25
- package/dist/domain/contracts/strategies/istrategy.contracts.d.ts.map +0 -1
- package/dist/domain/contracts/strategies/istrategy.contracts.js +0 -2
- package/dist/domain/contracts/strategies/istrategy.contracts.js.map +0 -1
- package/dist/domain/contracts/transaction/index.d.ts +0 -3
- package/dist/domain/contracts/transaction/index.d.ts.map +0 -1
- package/dist/domain/contracts/transaction/index.js +0 -2
- package/dist/domain/contracts/transaction/index.js.map +0 -1
- package/dist/domain/contracts/transaction/itransaction-state.types.d.ts +0 -44
- package/dist/domain/contracts/transaction/itransaction-state.types.d.ts.map +0 -1
- package/dist/domain/contracts/transaction/itransaction-state.types.js +0 -2
- package/dist/domain/contracts/transaction/itransaction-state.types.js.map +0 -1
- package/dist/domain/contracts/transaction/iunit-of-work.types.d.ts +0 -25
- package/dist/domain/contracts/transaction/iunit-of-work.types.d.ts.map +0 -1
- package/dist/domain/contracts/transaction/iunit-of-work.types.js +0 -2
- package/dist/domain/contracts/transaction/iunit-of-work.types.js.map +0 -1
- package/dist/domain/entities/__tests__/entity.test.d.ts +0 -2
- package/dist/domain/entities/__tests__/entity.test.d.ts.map +0 -1
- package/dist/domain/entities/__tests__/entity.test.js +0 -53
- package/dist/domain/entities/__tests__/entity.test.js.map +0 -1
- package/dist/domain/entities/entity.d.ts +0 -43
- package/dist/domain/entities/entity.d.ts.map +0 -1
- package/dist/domain/entities/entity.js +0 -55
- package/dist/domain/entities/entity.js.map +0 -1
- package/dist/domain/entities/ientity.contracts.d.ts +0 -43
- package/dist/domain/entities/ientity.contracts.d.ts.map +0 -1
- package/dist/domain/entities/ientity.contracts.js +0 -2
- package/dist/domain/entities/ientity.contracts.js.map +0 -1
- package/dist/domain/entities/index.d.ts +0 -3
- package/dist/domain/entities/index.d.ts.map +0 -1
- package/dist/domain/entities/index.js +0 -2
- package/dist/domain/entities/index.js.map +0 -1
- package/dist/domain/errors/__tests__/app-error.test.d.ts +0 -2
- package/dist/domain/errors/__tests__/app-error.test.d.ts.map +0 -1
- package/dist/domain/errors/__tests__/app-error.test.js +0 -94
- package/dist/domain/errors/__tests__/app-error.test.js.map +0 -1
- package/dist/domain/errors/app-error.d.ts +0 -243
- package/dist/domain/errors/app-error.d.ts.map +0 -1
- package/dist/domain/errors/app-error.js +0 -259
- package/dist/domain/errors/app-error.js.map +0 -1
- package/dist/domain/errors/index.d.ts +0 -2
- package/dist/domain/errors/index.d.ts.map +0 -1
- package/dist/domain/errors/index.js +0 -2
- package/dist/domain/errors/index.js.map +0 -1
- package/dist/domain/index.d.ts +0 -8
- package/dist/domain/index.d.ts.map +0 -1
- package/dist/domain/index.js +0 -6
- package/dist/domain/index.js.map +0 -1
- package/dist/domain/results/__tests__/result.test.d.ts +0 -2
- package/dist/domain/results/__tests__/result.test.d.ts.map +0 -1
- package/dist/domain/results/__tests__/result.test.js +0 -109
- package/dist/domain/results/__tests__/result.test.js.map +0 -1
- package/dist/domain/results/index.d.ts +0 -3
- package/dist/domain/results/index.d.ts.map +0 -1
- package/dist/domain/results/index.js +0 -2
- package/dist/domain/results/index.js.map +0 -1
- package/dist/domain/results/result.d.ts +0 -125
- package/dist/domain/results/result.d.ts.map +0 -1
- package/dist/domain/results/result.js +0 -144
- package/dist/domain/results/result.js.map +0 -1
- package/dist/domain/results/result.types.d.ts +0 -15
- package/dist/domain/results/result.types.d.ts.map +0 -1
- package/dist/domain/results/result.types.js +0 -2
- package/dist/domain/results/result.types.js.map +0 -1
- package/dist/domain/unique_id/__tests__/unique-id.test.d.ts +0 -2
- package/dist/domain/unique_id/__tests__/unique-id.test.d.ts.map +0 -1
- package/dist/domain/unique_id/__tests__/unique-id.test.js +0 -29
- package/dist/domain/unique_id/__tests__/unique-id.test.js.map +0 -1
- package/dist/domain/unique_id/index.d.ts +0 -2
- package/dist/domain/unique_id/index.d.ts.map +0 -1
- package/dist/domain/unique_id/index.js +0 -2
- package/dist/domain/unique_id/index.js.map +0 -1
- package/dist/domain/unique_id/unique-id.d.ts +0 -72
- package/dist/domain/unique_id/unique-id.d.ts.map +0 -1
- package/dist/domain/unique_id/unique-id.js +0 -87
- package/dist/domain/unique_id/unique-id.js.map +0 -1
- package/dist/domain/value_objects/__tests__/value-object.test.d.ts +0 -2
- package/dist/domain/value_objects/__tests__/value-object.test.d.ts.map +0 -1
- package/dist/domain/value_objects/__tests__/value-object.test.js +0 -43
- package/dist/domain/value_objects/__tests__/value-object.test.js.map +0 -1
- package/dist/domain/value_objects/index.d.ts +0 -3
- package/dist/domain/value_objects/index.d.ts.map +0 -1
- package/dist/domain/value_objects/index.js +0 -2
- package/dist/domain/value_objects/index.js.map +0 -1
- package/dist/domain/value_objects/ivalue-object.contracts.d.ts +0 -46
- package/dist/domain/value_objects/ivalue-object.contracts.d.ts.map +0 -1
- package/dist/domain/value_objects/ivalue-object.contracts.js +0 -2
- package/dist/domain/value_objects/ivalue-object.contracts.js.map +0 -1
- package/dist/domain/value_objects/value-object.d.ts +0 -26
- package/dist/domain/value_objects/value-object.d.ts.map +0 -1
- package/dist/domain/value_objects/value-object.js +0 -37
- package/dist/domain/value_objects/value-object.js.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/infrastructure/auth/__tests__/supabase-auth.service.test.d.ts +0 -2
- package/dist/infrastructure/auth/__tests__/supabase-auth.service.test.d.ts.map +0 -1
- package/dist/infrastructure/auth/__tests__/supabase-auth.service.test.js +0 -128
- package/dist/infrastructure/auth/__tests__/supabase-auth.service.test.js.map +0 -1
- package/dist/infrastructure/auth/index.d.ts +0 -3
- package/dist/infrastructure/auth/index.d.ts.map +0 -1
- package/dist/infrastructure/auth/index.js +0 -3
- package/dist/infrastructure/auth/index.js.map +0 -1
- package/dist/infrastructure/auth/storage/cookie.storage.d.ts +0 -4
- package/dist/infrastructure/auth/storage/cookie.storage.d.ts.map +0 -1
- package/dist/infrastructure/auth/storage/cookie.storage.js +0 -31
- package/dist/infrastructure/auth/storage/cookie.storage.js.map +0 -1
- package/dist/infrastructure/auth/storage/index.d.ts +0 -4
- package/dist/infrastructure/auth/storage/index.d.ts.map +0 -1
- package/dist/infrastructure/auth/storage/index.js +0 -4
- package/dist/infrastructure/auth/storage/index.js.map +0 -1
- package/dist/infrastructure/auth/storage/memory.storage.d.ts +0 -3
- package/dist/infrastructure/auth/storage/memory.storage.d.ts.map +0 -1
- package/dist/infrastructure/auth/storage/memory.storage.js +0 -14
- package/dist/infrastructure/auth/storage/memory.storage.js.map +0 -1
- package/dist/infrastructure/auth/storage/storage.utils.d.ts +0 -10
- package/dist/infrastructure/auth/storage/storage.utils.d.ts.map +0 -1
- package/dist/infrastructure/auth/storage/storage.utils.js +0 -22
- package/dist/infrastructure/auth/storage/storage.utils.js.map +0 -1
- package/dist/infrastructure/auth/supabase-auth.service.d.ts +0 -31
- package/dist/infrastructure/auth/supabase-auth.service.d.ts.map +0 -1
- package/dist/infrastructure/auth/supabase-auth.service.js +0 -90
- package/dist/infrastructure/auth/supabase-auth.service.js.map +0 -1
- package/dist/infrastructure/cache/__tests__/in-memory.cache.test.d.ts +0 -2
- package/dist/infrastructure/cache/__tests__/in-memory.cache.test.d.ts.map +0 -1
- package/dist/infrastructure/cache/__tests__/in-memory.cache.test.js +0 -69
- package/dist/infrastructure/cache/__tests__/in-memory.cache.test.js.map +0 -1
- package/dist/infrastructure/cache/in-memory.cache.d.ts +0 -34
- package/dist/infrastructure/cache/in-memory.cache.d.ts.map +0 -1
- package/dist/infrastructure/cache/in-memory.cache.js +0 -66
- package/dist/infrastructure/cache/in-memory.cache.js.map +0 -1
- package/dist/infrastructure/cache/index.d.ts +0 -3
- package/dist/infrastructure/cache/index.d.ts.map +0 -1
- package/dist/infrastructure/cache/index.js +0 -3
- package/dist/infrastructure/cache/index.js.map +0 -1
- package/dist/infrastructure/cache/key-builder.cache.d.ts +0 -25
- package/dist/infrastructure/cache/key-builder.cache.d.ts.map +0 -1
- package/dist/infrastructure/cache/key-builder.cache.js +0 -39
- package/dist/infrastructure/cache/key-builder.cache.js.map +0 -1
- package/dist/infrastructure/datasources/__tests__/remote.datasource.test.d.ts +0 -2
- package/dist/infrastructure/datasources/__tests__/remote.datasource.test.d.ts.map +0 -1
- package/dist/infrastructure/datasources/__tests__/remote.datasource.test.js +0 -176
- package/dist/infrastructure/datasources/__tests__/remote.datasource.test.js.map +0 -1
- package/dist/infrastructure/datasources/index.d.ts +0 -2
- package/dist/infrastructure/datasources/index.d.ts.map +0 -1
- package/dist/infrastructure/datasources/index.js +0 -2
- package/dist/infrastructure/datasources/index.js.map +0 -1
- package/dist/infrastructure/datasources/remote.datasource.d.ts +0 -43
- package/dist/infrastructure/datasources/remote.datasource.d.ts.map +0 -1
- package/dist/infrastructure/datasources/remote.datasource.js +0 -111
- package/dist/infrastructure/datasources/remote.datasource.js.map +0 -1
- package/dist/infrastructure/factories/axios.factory.d.ts +0 -15
- package/dist/infrastructure/factories/axios.factory.d.ts.map +0 -1
- package/dist/infrastructure/factories/axios.factory.js +0 -26
- package/dist/infrastructure/factories/axios.factory.js.map +0 -1
- package/dist/infrastructure/factories/cockatiel-resilience.factory.d.ts +0 -16
- package/dist/infrastructure/factories/cockatiel-resilience.factory.d.ts.map +0 -1
- package/dist/infrastructure/factories/cockatiel-resilience.factory.js +0 -114
- package/dist/infrastructure/factories/cockatiel-resilience.factory.js.map +0 -1
- package/dist/infrastructure/factories/index.d.ts +0 -2
- package/dist/infrastructure/factories/index.d.ts.map +0 -1
- package/dist/infrastructure/factories/index.js +0 -2
- package/dist/infrastructure/factories/index.js.map +0 -1
- package/dist/infrastructure/http/__tests__/axios.http.test.d.ts +0 -2
- package/dist/infrastructure/http/__tests__/axios.http.test.d.ts.map +0 -1
- package/dist/infrastructure/http/__tests__/axios.http.test.js +0 -196
- package/dist/infrastructure/http/__tests__/axios.http.test.js.map +0 -1
- package/dist/infrastructure/http/allow-origin.http.d.ts +0 -8
- package/dist/infrastructure/http/allow-origin.http.d.ts.map +0 -1
- package/dist/infrastructure/http/allow-origin.http.js +0 -13
- package/dist/infrastructure/http/allow-origin.http.js.map +0 -1
- package/dist/infrastructure/http/axios.http.d.ts +0 -17
- package/dist/infrastructure/http/axios.http.d.ts.map +0 -1
- package/dist/infrastructure/http/axios.http.js +0 -89
- package/dist/infrastructure/http/axios.http.js.map +0 -1
- package/dist/infrastructure/http/index.d.ts +0 -2
- package/dist/infrastructure/http/index.d.ts.map +0 -1
- package/dist/infrastructure/http/index.js +0 -2
- package/dist/infrastructure/http/index.js.map +0 -1
- package/dist/infrastructure/index.d.ts +0 -7
- package/dist/infrastructure/index.d.ts.map +0 -1
- package/dist/infrastructure/index.js +0 -7
- package/dist/infrastructure/index.js.map +0 -1
- package/dist/infrastructure/mappers/index.d.ts +0 -3
- package/dist/infrastructure/mappers/index.d.ts.map +0 -1
- package/dist/infrastructure/mappers/index.js +0 -3
- package/dist/infrastructure/mappers/index.js.map +0 -1
- package/dist/infrastructure/mappers/supabase-claims.mapper.d.ts +0 -15
- package/dist/infrastructure/mappers/supabase-claims.mapper.d.ts.map +0 -1
- package/dist/infrastructure/mappers/supabase-claims.mapper.js +0 -30
- package/dist/infrastructure/mappers/supabase-claims.mapper.js.map +0 -1
- package/dist/infrastructure/mappers/supabase-session.mapper.d.ts +0 -8
- package/dist/infrastructure/mappers/supabase-session.mapper.d.ts.map +0 -1
- package/dist/infrastructure/mappers/supabase-session.mapper.js +0 -16
- package/dist/infrastructure/mappers/supabase-session.mapper.js.map +0 -1
- package/dist/infrastructure/resiliences/__tests__/resilience.service.test.d.ts +0 -2
- package/dist/infrastructure/resiliences/__tests__/resilience.service.test.d.ts.map +0 -1
- package/dist/infrastructure/resiliences/__tests__/resilience.service.test.js +0 -47
- package/dist/infrastructure/resiliences/__tests__/resilience.service.test.js.map +0 -1
- package/dist/infrastructure/resiliences/index.d.ts +0 -2
- package/dist/infrastructure/resiliences/index.d.ts.map +0 -1
- package/dist/infrastructure/resiliences/index.js +0 -2
- package/dist/infrastructure/resiliences/index.js.map +0 -1
- package/dist/infrastructure/resiliences/resilience.service.d.ts +0 -18
- package/dist/infrastructure/resiliences/resilience.service.d.ts.map +0 -1
- package/dist/infrastructure/resiliences/resilience.service.js +0 -21
- package/dist/infrastructure/resiliences/resilience.service.js.map +0 -1
- package/dist/infrastructure/validators/__tests__/schema-zod.utils.test.d.ts +0 -2
- package/dist/infrastructure/validators/__tests__/schema-zod.utils.test.d.ts.map +0 -1
- package/dist/infrastructure/validators/__tests__/schema-zod.utils.test.js +0 -68
- package/dist/infrastructure/validators/__tests__/schema-zod.utils.test.js.map +0 -1
- package/dist/infrastructure/validators/__tests__/zod.validator.test.d.ts +0 -2
- package/dist/infrastructure/validators/__tests__/zod.validator.test.d.ts.map +0 -1
- package/dist/infrastructure/validators/__tests__/zod.validator.test.js +0 -72
- package/dist/infrastructure/validators/__tests__/zod.validator.test.js.map +0 -1
- package/dist/infrastructure/validators/base-schema.constant.d.ts +0 -30
- package/dist/infrastructure/validators/base-schema.constant.d.ts.map +0 -1
- package/dist/infrastructure/validators/base-schema.constant.js +0 -41
- package/dist/infrastructure/validators/base-schema.constant.js.map +0 -1
- package/dist/infrastructure/validators/constants/zod.constant.d.ts +0 -24
- package/dist/infrastructure/validators/constants/zod.constant.d.ts.map +0 -1
- package/dist/infrastructure/validators/constants/zod.constant.js +0 -23
- package/dist/infrastructure/validators/constants/zod.constant.js.map +0 -1
- package/dist/infrastructure/validators/index.d.ts +0 -3
- package/dist/infrastructure/validators/index.d.ts.map +0 -1
- package/dist/infrastructure/validators/index.js +0 -3
- package/dist/infrastructure/validators/index.js.map +0 -1
- package/dist/infrastructure/validators/schema-zod.utils.d.ts +0 -27
- package/dist/infrastructure/validators/schema-zod.utils.d.ts.map +0 -1
- package/dist/infrastructure/validators/schema-zod.utils.js +0 -27
- package/dist/infrastructure/validators/schema-zod.utils.js.map +0 -1
- package/dist/infrastructure/validators/zod.validator.d.ts +0 -31
- package/dist/infrastructure/validators/zod.validator.d.ts.map +0 -1
- package/dist/infrastructure/validators/zod.validator.js +0 -53
- package/dist/infrastructure/validators/zod.validator.js.map +0 -1
- package/dist/shared/constants/concurrency.constants.d.ts +0 -42
- package/dist/shared/constants/concurrency.constants.d.ts.map +0 -1
- package/dist/shared/constants/concurrency.constants.js +0 -42
- package/dist/shared/constants/concurrency.constants.js.map +0 -1
- package/dist/shared/constants/error.constants.d.ts +0 -272
- package/dist/shared/constants/error.constants.d.ts.map +0 -1
- package/dist/shared/constants/error.constants.js +0 -278
- package/dist/shared/constants/error.constants.js.map +0 -1
- package/dist/shared/constants/guest.constants.d.ts +0 -52
- package/dist/shared/constants/guest.constants.d.ts.map +0 -1
- package/dist/shared/constants/guest.constants.js +0 -53
- package/dist/shared/constants/guest.constants.js.map +0 -1
- package/dist/shared/constants/idempotency.constants.d.ts +0 -72
- package/dist/shared/constants/idempotency.constants.d.ts.map +0 -1
- package/dist/shared/constants/idempotency.constants.js +0 -72
- package/dist/shared/constants/idempotency.constants.js.map +0 -1
- package/dist/shared/constants/index.d.ts +0 -11
- package/dist/shared/constants/index.d.ts.map +0 -1
- package/dist/shared/constants/index.js +0 -11
- package/dist/shared/constants/index.js.map +0 -1
- package/dist/shared/constants/log-level.constants.d.ts +0 -64
- package/dist/shared/constants/log-level.constants.d.ts.map +0 -1
- package/dist/shared/constants/log-level.constants.js +0 -89
- package/dist/shared/constants/log-level.constants.js.map +0 -1
- package/dist/shared/constants/pagination.constants.d.ts +0 -70
- package/dist/shared/constants/pagination.constants.d.ts.map +0 -1
- package/dist/shared/constants/pagination.constants.js +0 -88
- package/dist/shared/constants/pagination.constants.js.map +0 -1
- package/dist/shared/constants/request.constants.d.ts +0 -34
- package/dist/shared/constants/request.constants.d.ts.map +0 -1
- package/dist/shared/constants/request.constants.js +0 -26
- package/dist/shared/constants/request.constants.js.map +0 -1
- package/dist/shared/constants/resilience.constants.d.ts +0 -89
- package/dist/shared/constants/resilience.constants.d.ts.map +0 -1
- package/dist/shared/constants/resilience.constants.js +0 -89
- package/dist/shared/constants/resilience.constants.js.map +0 -1
- package/dist/shared/constants/roles.constants.d.ts +0 -84
- package/dist/shared/constants/roles.constants.d.ts.map +0 -1
- package/dist/shared/constants/roles.constants.js +0 -68
- package/dist/shared/constants/roles.constants.js.map +0 -1
- package/dist/shared/constants/tokens.constants.d.ts +0 -373
- package/dist/shared/constants/tokens.constants.d.ts.map +0 -1
- package/dist/shared/constants/tokens.constants.js +0 -373
- package/dist/shared/constants/tokens.constants.js.map +0 -1
- package/dist/shared/index.d.ts +0 -4
- package/dist/shared/index.d.ts.map +0 -1
- package/dist/shared/index.js +0 -3
- package/dist/shared/index.js.map +0 -1
- package/dist/shared/types/api-response.types.d.ts +0 -185
- package/dist/shared/types/api-response.types.d.ts.map +0 -1
- package/dist/shared/types/api-response.types.js +0 -2
- package/dist/shared/types/api-response.types.js.map +0 -1
- package/dist/shared/types/auth-policy.types.d.ts +0 -48
- package/dist/shared/types/auth-policy.types.d.ts.map +0 -1
- package/dist/shared/types/auth-policy.types.js +0 -2
- package/dist/shared/types/auth-policy.types.js.map +0 -1
- package/dist/shared/types/auth.types.d.ts +0 -106
- package/dist/shared/types/auth.types.d.ts.map +0 -1
- package/dist/shared/types/auth.types.js +0 -2
- package/dist/shared/types/auth.types.js.map +0 -1
- package/dist/shared/types/cache.types.d.ts +0 -64
- package/dist/shared/types/cache.types.d.ts.map +0 -1
- package/dist/shared/types/cache.types.js +0 -2
- package/dist/shared/types/cache.types.js.map +0 -1
- package/dist/shared/types/common.types.d.ts +0 -213
- package/dist/shared/types/common.types.d.ts.map +0 -1
- package/dist/shared/types/common.types.js +0 -3
- package/dist/shared/types/common.types.js.map +0 -1
- package/dist/shared/types/http.types.d.ts +0 -188
- package/dist/shared/types/http.types.d.ts.map +0 -1
- package/dist/shared/types/http.types.js +0 -2
- package/dist/shared/types/http.types.js.map +0 -1
- package/dist/shared/types/index.d.ts +0 -10
- package/dist/shared/types/index.d.ts.map +0 -1
- package/dist/shared/types/index.js +0 -2
- package/dist/shared/types/index.js.map +0 -1
- package/dist/shared/types/injection-token.types.d.ts +0 -38
- package/dist/shared/types/injection-token.types.d.ts.map +0 -1
- package/dist/shared/types/injection-token.types.js +0 -2
- package/dist/shared/types/injection-token.types.js.map +0 -1
- package/dist/shared/types/metadata.types.d.ts +0 -150
- package/dist/shared/types/metadata.types.d.ts.map +0 -1
- package/dist/shared/types/metadata.types.js +0 -2
- package/dist/shared/types/metadata.types.js.map +0 -1
- package/dist/shared/types/pagination.types.d.ts +0 -88
- package/dist/shared/types/pagination.types.d.ts.map +0 -1
- package/dist/shared/types/pagination.types.js +0 -3
- package/dist/shared/types/pagination.types.js.map +0 -1
- package/dist/shared/utils/__tests__/date.utils.test.d.ts +0 -2
- package/dist/shared/utils/__tests__/date.utils.test.d.ts.map +0 -1
- package/dist/shared/utils/__tests__/date.utils.test.js +0 -97
- package/dist/shared/utils/__tests__/date.utils.test.js.map +0 -1
- package/dist/shared/utils/__tests__/guards.utils.test.d.ts +0 -2
- package/dist/shared/utils/__tests__/guards.utils.test.d.ts.map +0 -1
- package/dist/shared/utils/__tests__/guards.utils.test.js +0 -324
- package/dist/shared/utils/__tests__/guards.utils.test.js.map +0 -1
- package/dist/shared/utils/__tests__/guid.utils.test.d.ts +0 -2
- package/dist/shared/utils/__tests__/guid.utils.test.d.ts.map +0 -1
- package/dist/shared/utils/__tests__/guid.utils.test.js +0 -97
- package/dist/shared/utils/__tests__/guid.utils.test.js.map +0 -1
- package/dist/shared/utils/__tests__/http.utils.test.d.ts +0 -2
- package/dist/shared/utils/__tests__/http.utils.test.d.ts.map +0 -1
- package/dist/shared/utils/__tests__/http.utils.test.js +0 -230
- package/dist/shared/utils/__tests__/http.utils.test.js.map +0 -1
- package/dist/shared/utils/__tests__/math.utils.test.d.ts +0 -2
- package/dist/shared/utils/__tests__/math.utils.test.d.ts.map +0 -1
- package/dist/shared/utils/__tests__/math.utils.test.js +0 -93
- package/dist/shared/utils/__tests__/math.utils.test.js.map +0 -1
- package/dist/shared/utils/__tests__/promise.utils.test.d.ts +0 -2
- package/dist/shared/utils/__tests__/promise.utils.test.d.ts.map +0 -1
- package/dist/shared/utils/__tests__/promise.utils.test.js +0 -101
- package/dist/shared/utils/__tests__/promise.utils.test.js.map +0 -1
- package/dist/shared/utils/__tests__/string.utils.test.d.ts +0 -2
- package/dist/shared/utils/__tests__/string.utils.test.d.ts.map +0 -1
- package/dist/shared/utils/__tests__/string.utils.test.js +0 -153
- package/dist/shared/utils/__tests__/string.utils.test.js.map +0 -1
- package/dist/shared/utils/abort.utils.d.ts +0 -34
- package/dist/shared/utils/abort.utils.d.ts.map +0 -1
- package/dist/shared/utils/abort.utils.js +0 -55
- package/dist/shared/utils/abort.utils.js.map +0 -1
- package/dist/shared/utils/date.utils.d.ts +0 -75
- package/dist/shared/utils/date.utils.d.ts.map +0 -1
- package/dist/shared/utils/date.utils.js +0 -88
- package/dist/shared/utils/date.utils.js.map +0 -1
- package/dist/shared/utils/enumerable.utils.d.ts +0 -43
- package/dist/shared/utils/enumerable.utils.d.ts.map +0 -1
- package/dist/shared/utils/enumerable.utils.js +0 -52
- package/dist/shared/utils/enumerable.utils.js.map +0 -1
- package/dist/shared/utils/guards.utils.d.ts +0 -245
- package/dist/shared/utils/guards.utils.d.ts.map +0 -1
- package/dist/shared/utils/guards.utils.js +0 -308
- package/dist/shared/utils/guards.utils.js.map +0 -1
- package/dist/shared/utils/guid.utils.d.ts +0 -73
- package/dist/shared/utils/guid.utils.d.ts.map +0 -1
- package/dist/shared/utils/guid.utils.js +0 -89
- package/dist/shared/utils/guid.utils.js.map +0 -1
- package/dist/shared/utils/http.utils.d.ts +0 -75
- package/dist/shared/utils/http.utils.d.ts.map +0 -1
- package/dist/shared/utils/http.utils.js +0 -144
- package/dist/shared/utils/http.utils.js.map +0 -1
- package/dist/shared/utils/index.d.ts +0 -11
- package/dist/shared/utils/index.d.ts.map +0 -1
- package/dist/shared/utils/index.js +0 -11
- package/dist/shared/utils/index.js.map +0 -1
- package/dist/shared/utils/math.utils.d.ts +0 -79
- package/dist/shared/utils/math.utils.d.ts.map +0 -1
- package/dist/shared/utils/math.utils.js +0 -97
- package/dist/shared/utils/math.utils.js.map +0 -1
- package/dist/shared/utils/promise.utils.d.ts +0 -40
- package/dist/shared/utils/promise.utils.d.ts.map +0 -1
- package/dist/shared/utils/promise.utils.js +0 -45
- package/dist/shared/utils/promise.utils.js.map +0 -1
- package/dist/shared/utils/sanitize.utils.d.ts +0 -39
- package/dist/shared/utils/sanitize.utils.d.ts.map +0 -1
- package/dist/shared/utils/sanitize.utils.js +0 -67
- package/dist/shared/utils/sanitize.utils.js.map +0 -1
- package/dist/shared/utils/string.utils.d.ts +0 -102
- package/dist/shared/utils/string.utils.d.ts.map +0 -1
- package/dist/shared/utils/string.utils.js +0 -157
- package/dist/shared/utils/string.utils.js.map +0 -1
|
@@ -1,109 +0,0 @@
|
|
|
1
|
-
import { describe, expect, it } from 'vitest';
|
|
2
|
-
import { Result } from '../../../domain';
|
|
3
|
-
describe('Result', () => {
|
|
4
|
-
describe('ok', () => {
|
|
5
|
-
it('creates a successful result and returns its value', () => {
|
|
6
|
-
const result = Result.ok('value');
|
|
7
|
-
expect(result.isOk()).toBe(true);
|
|
8
|
-
expect(result.getValueOrThrow()).toBe('value');
|
|
9
|
-
});
|
|
10
|
-
it('supports undefined as a valid success payload', () => {
|
|
11
|
-
const result = Result.ok();
|
|
12
|
-
expect(result.isOk()).toBe(true);
|
|
13
|
-
expect(result.getValueOrThrow()).toBeUndefined();
|
|
14
|
-
});
|
|
15
|
-
it('throws when requesting value from a failed result', () => {
|
|
16
|
-
const result = Result.fail('domain-error');
|
|
17
|
-
expect(() => result.getValueOrThrow()).toThrowError('Cannot get the value of a failed result.');
|
|
18
|
-
});
|
|
19
|
-
it('supports complex objects as success payloads', () => {
|
|
20
|
-
const payload = { id: '123', name: 'Alice' };
|
|
21
|
-
const result = Result.ok(payload);
|
|
22
|
-
expect(result.isOk()).toBe(true);
|
|
23
|
-
expect(result.getValueOrThrow()).toEqual(payload);
|
|
24
|
-
});
|
|
25
|
-
it('supports generic type parameters for value and error', () => {
|
|
26
|
-
const result = Result.ok(42);
|
|
27
|
-
expect(result.isOk()).toBe(true);
|
|
28
|
-
expect(result.getValueOrThrow()).toBe(42);
|
|
29
|
-
});
|
|
30
|
-
it('supports null as a valid success payload', () => {
|
|
31
|
-
const result = Result.ok(null);
|
|
32
|
-
expect(result.isOk()).toBe(true);
|
|
33
|
-
expect(result.getValueOrThrow()).toBeNull();
|
|
34
|
-
});
|
|
35
|
-
});
|
|
36
|
-
describe('fail', () => {
|
|
37
|
-
it('creates a failed result and returns its error', () => {
|
|
38
|
-
const error = new Error('failure');
|
|
39
|
-
const result = Result.fail(error);
|
|
40
|
-
expect(result.isOk()).toBe(false);
|
|
41
|
-
expect(result.getErrorOrThrow()).toBe(error);
|
|
42
|
-
});
|
|
43
|
-
it('supports non-Error failure values', () => {
|
|
44
|
-
const result = Result.fail('domain-error');
|
|
45
|
-
expect(result.isOk()).toBe(false);
|
|
46
|
-
expect(result.getErrorOrThrow()).toBe('domain-error');
|
|
47
|
-
});
|
|
48
|
-
it('throws when requesting value from a failed result', () => {
|
|
49
|
-
const result = Result.fail('domain-error');
|
|
50
|
-
expect(() => result.getValueOrThrow()).toThrowError('Cannot get the value of a failed result.');
|
|
51
|
-
});
|
|
52
|
-
});
|
|
53
|
-
describe('isOk', () => {
|
|
54
|
-
it('returns true for successful results', () => {
|
|
55
|
-
const result = Result.ok('value');
|
|
56
|
-
expect(result.isOk()).toBe(true);
|
|
57
|
-
});
|
|
58
|
-
it('returns false for failed results', () => {
|
|
59
|
-
const result = Result.fail('domain-error');
|
|
60
|
-
expect(result.isOk()).toBe(false);
|
|
61
|
-
});
|
|
62
|
-
it('returns true for successful results with undefined payload', () => {
|
|
63
|
-
const result = Result.ok();
|
|
64
|
-
expect(result.isOk()).toBe(true);
|
|
65
|
-
});
|
|
66
|
-
it('returns false for failed results with non-Error payload', () => {
|
|
67
|
-
const result = Result.fail('domain-error');
|
|
68
|
-
expect(result.isOk()).toBe(false);
|
|
69
|
-
});
|
|
70
|
-
it('returns true for successful results with null payload', () => {
|
|
71
|
-
const result = Result.ok(null);
|
|
72
|
-
expect(result.isOk()).toBe(true);
|
|
73
|
-
});
|
|
74
|
-
});
|
|
75
|
-
describe('getValueOrThrow', () => {
|
|
76
|
-
it('returns the value for successful results', () => {
|
|
77
|
-
const result = Result.ok('value');
|
|
78
|
-
expect(result.getValueOrThrow()).toBe('value');
|
|
79
|
-
});
|
|
80
|
-
it('throws an error when called on a failed result', () => {
|
|
81
|
-
const result = Result.fail('domain-error');
|
|
82
|
-
expect(() => result.getValueOrThrow()).toThrowError('Cannot get the value of a failed result.');
|
|
83
|
-
});
|
|
84
|
-
it('returns undefined for successful results with undefined payload', () => {
|
|
85
|
-
const result = Result.ok();
|
|
86
|
-
expect(result.getValueOrThrow()).toBeUndefined();
|
|
87
|
-
});
|
|
88
|
-
it('returns null for successful results with null payload', () => {
|
|
89
|
-
const result = Result.ok(null);
|
|
90
|
-
expect(result.getValueOrThrow()).toBeNull();
|
|
91
|
-
});
|
|
92
|
-
});
|
|
93
|
-
describe('getErrorOrThrow', () => {
|
|
94
|
-
it('returns the error for failed results', () => {
|
|
95
|
-
const error = new Error('failure');
|
|
96
|
-
const result = Result.fail(error);
|
|
97
|
-
expect(result.getErrorOrThrow()).toBe(error);
|
|
98
|
-
});
|
|
99
|
-
it('throws an error when called on a successful result', () => {
|
|
100
|
-
const result = Result.ok('value');
|
|
101
|
-
expect(() => result.getErrorOrThrow()).toThrowError('Cannot get the error of a successful result.');
|
|
102
|
-
});
|
|
103
|
-
it('returns non-Error payloads for failed results', () => {
|
|
104
|
-
const result = Result.fail('domain-error');
|
|
105
|
-
expect(result.getErrorOrThrow()).toBe('domain-error');
|
|
106
|
-
});
|
|
107
|
-
});
|
|
108
|
-
});
|
|
109
|
-
//# sourceMappingURL=result.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"result.test.js","sourceRoot":"","sources":["../../../../src/domain/results/__tests__/result.test.ts"],"names":[],"mappings":"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"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/domain/results/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAA;AACxB,mBAAmB,gBAAgB,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/domain/results/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAA"}
|
|
@@ -1,125 +0,0 @@
|
|
|
1
|
-
import type { Optional } from '../../shared';
|
|
2
|
-
/**
|
|
3
|
-
* A class representing the result of an operation, which can either be a success or a failure.
|
|
4
|
-
* It encapsulates the value of a successful operation or the error of a failed operation.
|
|
5
|
-
*
|
|
6
|
-
* @template TValue - The type of the value in case of a successful operation.
|
|
7
|
-
* @template TError - The type of the error in case of a failed operation (default is never).
|
|
8
|
-
|
|
9
|
-
*
|
|
10
|
-
* @author Xeno
|
|
11
|
-
* @version 1.0.0
|
|
12
|
-
* @since 2025-09-30
|
|
13
|
-
* @link https://github.com/xeno-js/xeno-js
|
|
14
|
-
*/
|
|
15
|
-
export declare class Result<TValue, TError = never> {
|
|
16
|
-
/**
|
|
17
|
-
* Indicates whether the operation was successful or not.
|
|
18
|
-
|
|
19
|
-
*
|
|
20
|
-
* @author Xeno
|
|
21
|
-
* @version 1.0.0
|
|
22
|
-
* @since 2025-09-30
|
|
23
|
-
* @link https://github.com/xeno-js/xeno-js
|
|
24
|
-
*/
|
|
25
|
-
private readonly _isSuccess;
|
|
26
|
-
/**
|
|
27
|
-
* The error of the operation in case it failed.
|
|
28
|
-
|
|
29
|
-
*
|
|
30
|
-
* @author Xeno
|
|
31
|
-
* @version 1.0.0
|
|
32
|
-
* @since 2025-09-30
|
|
33
|
-
* @link https://github.com/xeno-js/xeno-js
|
|
34
|
-
*/
|
|
35
|
-
private readonly _error;
|
|
36
|
-
/**
|
|
37
|
-
* The value of the operation in case it succeeded.
|
|
38
|
-
|
|
39
|
-
*
|
|
40
|
-
* @author Xeno
|
|
41
|
-
* @version 1.0.0
|
|
42
|
-
* @since 2025-09-30
|
|
43
|
-
* @link https://github.com/xeno-js/xeno-js
|
|
44
|
-
*/
|
|
45
|
-
private readonly _value;
|
|
46
|
-
/**
|
|
47
|
-
* Private constructor to prevent direct instantiation. Use the static methods `ok` and `fail` to create instances.
|
|
48
|
-
*
|
|
49
|
-
* @param isSuccess - A boolean indicating whether the operation was successful.
|
|
50
|
-
* @param error - The error of the operation in case it failed (optional).
|
|
51
|
-
* @param value - The value of the operation in case it succeeded (optional).
|
|
52
|
-
|
|
53
|
-
*
|
|
54
|
-
* @author Xeno
|
|
55
|
-
* @version 1.0.0
|
|
56
|
-
* @since 2025-09-30
|
|
57
|
-
* @link https://github.com/xeno-js/xeno-js
|
|
58
|
-
*/
|
|
59
|
-
private constructor();
|
|
60
|
-
/**
|
|
61
|
-
* Creates a successful result with the given value.
|
|
62
|
-
*
|
|
63
|
-
* @param value - The value of the successful operation.
|
|
64
|
-
* @returns A Result instance representing a successful operation.
|
|
65
|
-
|
|
66
|
-
*
|
|
67
|
-
* @author Xeno
|
|
68
|
-
* @version 1.0.0
|
|
69
|
-
* @since 2025-09-30
|
|
70
|
-
* @link https://github.com/xeno-js/xeno-js
|
|
71
|
-
*/
|
|
72
|
-
static ok<U>(value?: U): Result<U>;
|
|
73
|
-
/**
|
|
74
|
-
* Creates a failed result with the given error.
|
|
75
|
-
*
|
|
76
|
-
* @param error - The error of the failed operation.
|
|
77
|
-
* @returns A Result instance representing a failed operation.
|
|
78
|
-
|
|
79
|
-
*
|
|
80
|
-
* @author Xeno
|
|
81
|
-
* @version 1.0.0
|
|
82
|
-
* @since 2025-09-30
|
|
83
|
-
* @link https://github.com/xeno-js/xeno-js
|
|
84
|
-
*/
|
|
85
|
-
static fail<U, V = never>(error: V): Result<U, V>;
|
|
86
|
-
/**
|
|
87
|
-
* Checks if the result is a success.
|
|
88
|
-
*
|
|
89
|
-
* @returns True if the result is a success, false otherwise.
|
|
90
|
-
|
|
91
|
-
*
|
|
92
|
-
* @author Xeno
|
|
93
|
-
* @version 1.0.0
|
|
94
|
-
* @since 2025-09-30
|
|
95
|
-
* @link https://github.com/xeno-js/xeno-js
|
|
96
|
-
*/
|
|
97
|
-
isOk(): boolean;
|
|
98
|
-
/**
|
|
99
|
-
* Gets the value of the result or throws an error if the result is a failure.
|
|
100
|
-
*
|
|
101
|
-
* @returns The value of the result.
|
|
102
|
-
* @throws An error if the result is a failure.
|
|
103
|
-
|
|
104
|
-
*
|
|
105
|
-
* @author Xeno
|
|
106
|
-
* @version 1.0.0
|
|
107
|
-
* @since 2025-09-30
|
|
108
|
-
* @link https://github.com/xeno-js/xeno-js
|
|
109
|
-
*/
|
|
110
|
-
getValueOrThrow(): Optional<TValue>;
|
|
111
|
-
/**
|
|
112
|
-
* Gets the error of the result or throws an error if the result is a success.
|
|
113
|
-
*
|
|
114
|
-
* @returns The error of the result.
|
|
115
|
-
* @throws An error if the result is a success.
|
|
116
|
-
|
|
117
|
-
*
|
|
118
|
-
* @author Xeno
|
|
119
|
-
* @version 1.0.0
|
|
120
|
-
* @since 2025-09-30
|
|
121
|
-
* @link https://github.com/xeno-js/xeno-js
|
|
122
|
-
*/
|
|
123
|
-
getErrorOrThrow(): TError;
|
|
124
|
-
}
|
|
125
|
-
//# sourceMappingURL=result.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"result.d.ts","sourceRoot":"","sources":["../../../src/domain/results/result.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAA;AAExC;;;;;;;;;;;;KAYK;AACL,qBAAa,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,KAAK;IACxC;;;;;;;;OAQG;IACH,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAS;IACpC;;;;;;;;OAQG;IACH,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAkB;IACzC;;;;;;;;OAQG;IACH,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAkB;IAEzC;;;;;;;;;;;;OAYG;IACH,OAAO;IAMP;;;;;;;;;;;OAWG;WACW,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,EAAE,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC;IAIzC;;;;;;;;;;;OAWG;WACW,IAAI,CAAC,CAAC,EAAE,CAAC,GAAG,KAAK,EAAE,KAAK,EAAE,CAAC,GAAG,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC;IAIxD;;;;;;;;;;OAUG;IACI,IAAI,IAAI,OAAO;IAItB;;;;;;;;;;;OAWG;IACI,eAAe,IAAI,QAAQ,CAAC,MAAM,CAAC;IAO1C;;;;;;;;;;;OAWG;IACI,eAAe,IAAI,MAAM;CAMjC"}
|
|
@@ -1,144 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* A class representing the result of an operation, which can either be a success or a failure.
|
|
3
|
-
* It encapsulates the value of a successful operation or the error of a failed operation.
|
|
4
|
-
*
|
|
5
|
-
* @template TValue - The type of the value in case of a successful operation.
|
|
6
|
-
* @template TError - The type of the error in case of a failed operation (default is never).
|
|
7
|
-
|
|
8
|
-
*
|
|
9
|
-
* @author Xeno
|
|
10
|
-
* @version 1.0.0
|
|
11
|
-
* @since 2025-09-30
|
|
12
|
-
* @link https://github.com/xeno-js/xeno-js
|
|
13
|
-
*/
|
|
14
|
-
export class Result {
|
|
15
|
-
/**
|
|
16
|
-
* Indicates whether the operation was successful or not.
|
|
17
|
-
|
|
18
|
-
*
|
|
19
|
-
* @author Xeno
|
|
20
|
-
* @version 1.0.0
|
|
21
|
-
* @since 2025-09-30
|
|
22
|
-
* @link https://github.com/xeno-js/xeno-js
|
|
23
|
-
*/
|
|
24
|
-
_isSuccess;
|
|
25
|
-
/**
|
|
26
|
-
* The error of the operation in case it failed.
|
|
27
|
-
|
|
28
|
-
*
|
|
29
|
-
* @author Xeno
|
|
30
|
-
* @version 1.0.0
|
|
31
|
-
* @since 2025-09-30
|
|
32
|
-
* @link https://github.com/xeno-js/xeno-js
|
|
33
|
-
*/
|
|
34
|
-
_error;
|
|
35
|
-
/**
|
|
36
|
-
* The value of the operation in case it succeeded.
|
|
37
|
-
|
|
38
|
-
*
|
|
39
|
-
* @author Xeno
|
|
40
|
-
* @version 1.0.0
|
|
41
|
-
* @since 2025-09-30
|
|
42
|
-
* @link https://github.com/xeno-js/xeno-js
|
|
43
|
-
*/
|
|
44
|
-
_value;
|
|
45
|
-
/**
|
|
46
|
-
* Private constructor to prevent direct instantiation. Use the static methods `ok` and `fail` to create instances.
|
|
47
|
-
*
|
|
48
|
-
* @param isSuccess - A boolean indicating whether the operation was successful.
|
|
49
|
-
* @param error - The error of the operation in case it failed (optional).
|
|
50
|
-
* @param value - The value of the operation in case it succeeded (optional).
|
|
51
|
-
|
|
52
|
-
*
|
|
53
|
-
* @author Xeno
|
|
54
|
-
* @version 1.0.0
|
|
55
|
-
* @since 2025-09-30
|
|
56
|
-
* @link https://github.com/xeno-js/xeno-js
|
|
57
|
-
*/
|
|
58
|
-
constructor(isSuccess, error, value) {
|
|
59
|
-
this._isSuccess = isSuccess;
|
|
60
|
-
this._error = error;
|
|
61
|
-
this._value = value;
|
|
62
|
-
}
|
|
63
|
-
/**
|
|
64
|
-
* Creates a successful result with the given value.
|
|
65
|
-
*
|
|
66
|
-
* @param value - The value of the successful operation.
|
|
67
|
-
* @returns A Result instance representing a successful operation.
|
|
68
|
-
|
|
69
|
-
*
|
|
70
|
-
* @author Xeno
|
|
71
|
-
* @version 1.0.0
|
|
72
|
-
* @since 2025-09-30
|
|
73
|
-
* @link https://github.com/xeno-js/xeno-js
|
|
74
|
-
*/
|
|
75
|
-
static ok(value) {
|
|
76
|
-
return new Result(true, undefined, value);
|
|
77
|
-
}
|
|
78
|
-
/**
|
|
79
|
-
* Creates a failed result with the given error.
|
|
80
|
-
*
|
|
81
|
-
* @param error - The error of the failed operation.
|
|
82
|
-
* @returns A Result instance representing a failed operation.
|
|
83
|
-
|
|
84
|
-
*
|
|
85
|
-
* @author Xeno
|
|
86
|
-
* @version 1.0.0
|
|
87
|
-
* @since 2025-09-30
|
|
88
|
-
* @link https://github.com/xeno-js/xeno-js
|
|
89
|
-
*/
|
|
90
|
-
static fail(error) {
|
|
91
|
-
return new Result(false, error, undefined);
|
|
92
|
-
}
|
|
93
|
-
/**
|
|
94
|
-
* Checks if the result is a success.
|
|
95
|
-
*
|
|
96
|
-
* @returns True if the result is a success, false otherwise.
|
|
97
|
-
|
|
98
|
-
*
|
|
99
|
-
* @author Xeno
|
|
100
|
-
* @version 1.0.0
|
|
101
|
-
* @since 2025-09-30
|
|
102
|
-
* @link https://github.com/xeno-js/xeno-js
|
|
103
|
-
*/
|
|
104
|
-
isOk() {
|
|
105
|
-
return this._isSuccess;
|
|
106
|
-
}
|
|
107
|
-
/**
|
|
108
|
-
* Gets the value of the result or throws an error if the result is a failure.
|
|
109
|
-
*
|
|
110
|
-
* @returns The value of the result.
|
|
111
|
-
* @throws An error if the result is a failure.
|
|
112
|
-
|
|
113
|
-
*
|
|
114
|
-
* @author Xeno
|
|
115
|
-
* @version 1.0.0
|
|
116
|
-
* @since 2025-09-30
|
|
117
|
-
* @link https://github.com/xeno-js/xeno-js
|
|
118
|
-
*/
|
|
119
|
-
getValueOrThrow() {
|
|
120
|
-
if (!this._isSuccess) {
|
|
121
|
-
throw new Error('Cannot get the value of a failed result.');
|
|
122
|
-
}
|
|
123
|
-
return this._value;
|
|
124
|
-
}
|
|
125
|
-
/**
|
|
126
|
-
* Gets the error of the result or throws an error if the result is a success.
|
|
127
|
-
*
|
|
128
|
-
* @returns The error of the result.
|
|
129
|
-
* @throws An error if the result is a success.
|
|
130
|
-
|
|
131
|
-
*
|
|
132
|
-
* @author Xeno
|
|
133
|
-
* @version 1.0.0
|
|
134
|
-
* @since 2025-09-30
|
|
135
|
-
* @link https://github.com/xeno-js/xeno-js
|
|
136
|
-
*/
|
|
137
|
-
getErrorOrThrow() {
|
|
138
|
-
if (this._isSuccess) {
|
|
139
|
-
throw new Error('Cannot get the error of a successful result.');
|
|
140
|
-
}
|
|
141
|
-
return this._error;
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
//# sourceMappingURL=result.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"result.js","sourceRoot":"","sources":["../../../src/domain/results/result.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;KAYK;AACL,MAAM,OAAO,MAAM;IACjB;;;;;;;;OAQG;IACc,UAAU,CAAS;IACpC;;;;;;;;OAQG;IACc,MAAM,CAAkB;IACzC;;;;;;;;OAQG;IACc,MAAM,CAAkB;IAEzC;;;;;;;;;;;;OAYG;IACH,YAAoB,SAAkB,EAAE,KAAuB,EAAE,KAAuB;QACtF,IAAI,CAAC,UAAU,GAAG,SAAS,CAAA;QAC3B,IAAI,CAAC,MAAM,GAAG,KAAK,CAAA;QACnB,IAAI,CAAC,MAAM,GAAG,KAAK,CAAA;IACrB,CAAC;IAED;;;;;;;;;;;OAWG;IACI,MAAM,CAAC,EAAE,CAAI,KAAS;QAC3B,OAAO,IAAI,MAAM,CAAI,IAAI,EAAE,SAAS,EAAE,KAAK,CAAC,CAAA;IAC9C,CAAC;IAED;;;;;;;;;;;OAWG;IACI,MAAM,CAAC,IAAI,CAAe,KAAQ;QACvC,OAAO,IAAI,MAAM,CAAO,KAAK,EAAE,KAAK,EAAE,SAAS,CAAC,CAAA;IAClD,CAAC;IAED;;;;;;;;;;OAUG;IACI,IAAI;QACT,OAAO,IAAI,CAAC,UAAU,CAAA;IACxB,CAAC;IAED;;;;;;;;;;;OAWG;IACI,eAAe;QACpB,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,CAAC;YACrB,MAAM,IAAI,KAAK,CAAC,0CAA0C,CAAC,CAAA;QAC7D,CAAC;QACD,OAAO,IAAI,CAAC,MAAM,CAAA;IACpB,CAAC;IAED;;;;;;;;;;;OAWG;IACI,eAAe;QACpB,IAAI,IAAI,CAAC,UAAU,EAAE,CAAC;YACpB,MAAM,IAAI,KAAK,CAAC,8CAA8C,CAAC,CAAA;QACjE,CAAC;QACD,OAAO,IAAI,CAAC,MAAgB,CAAA;IAC9B,CAAC;CACF"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import type { AppError } from '../errors/app-error';
|
|
2
|
-
import type { Result } from './result';
|
|
3
|
-
/**
|
|
4
|
-
* A utility type to extract the value type from a Result instance.
|
|
5
|
-
*
|
|
6
|
-
* @template T - The type of the Result instance.
|
|
7
|
-
|
|
8
|
-
*
|
|
9
|
-
* @author Xeno
|
|
10
|
-
* @version 1.0.0
|
|
11
|
-
* @since 2025-09-30
|
|
12
|
-
* @link https://github.com/xeno-js/xeno-js
|
|
13
|
-
*/
|
|
14
|
-
export type ResultType<T, E = AppError> = Result<T, E>;
|
|
15
|
-
//# sourceMappingURL=result.types.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"result.types.d.ts","sourceRoot":"","sources":["../../../src/domain/results/result.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAA;AACnD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AAEtC;;;;;;;;;;KAUK;AACL,MAAM,MAAM,UAAU,CAAC,CAAC,EAAE,CAAC,GAAG,QAAQ,IAAI,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"result.types.js","sourceRoot":"","sources":["../../../src/domain/results/result.types.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"unique-id.test.d.ts","sourceRoot":"","sources":["../../../../src/domain/unique_id/__tests__/unique-id.test.ts"],"names":[],"mappings":""}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { describe, expect, it } from 'vitest';
|
|
2
|
-
import { UniqueId } from '../../../domain';
|
|
3
|
-
describe('UniqueId', () => {
|
|
4
|
-
it('creates a UniqueId with a valid UUID v4 string', () => {
|
|
5
|
-
const uniqueId = UniqueId.create();
|
|
6
|
-
const value = uniqueId.getValue();
|
|
7
|
-
expect(value).toMatch(/^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i);
|
|
8
|
-
});
|
|
9
|
-
it('toString returns the string representation of the UniqueId', () => {
|
|
10
|
-
const uniqueId = UniqueId.create();
|
|
11
|
-
expect(uniqueId.toString()).toBe(uniqueId.getValue());
|
|
12
|
-
});
|
|
13
|
-
it('equals returns true for UniqueIds with the same value', () => {
|
|
14
|
-
const uniqueId1 = UniqueId.create();
|
|
15
|
-
const uniqueId2 = uniqueId1;
|
|
16
|
-
expect(uniqueId1.equals(uniqueId2)).toBe(true);
|
|
17
|
-
});
|
|
18
|
-
it('equals returns false for UniqueIds with different values', () => {
|
|
19
|
-
const uniqueId1 = UniqueId.create();
|
|
20
|
-
const uniqueId2 = UniqueId.create();
|
|
21
|
-
expect(uniqueId1.equals(uniqueId2)).toBe(false);
|
|
22
|
-
});
|
|
23
|
-
it('equals returns false when comparing with a non-UniqueId object', () => {
|
|
24
|
-
const uniqueId = UniqueId.create();
|
|
25
|
-
const nonUniqueId = { getValue: () => uniqueId.getValue() };
|
|
26
|
-
expect(uniqueId.equals(nonUniqueId)).toBe(false);
|
|
27
|
-
});
|
|
28
|
-
});
|
|
29
|
-
//# sourceMappingURL=unique-id.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"unique-id.test.js","sourceRoot":"","sources":["../../../../src/domain/unique_id/__tests__/unique-id.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAA;AAE7C,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAA;AAEnC,QAAQ,CAAC,UAAU,EAAE,GAAG,EAAE;IACxB,EAAE,CAAC,gDAAgD,EAAE,GAAG,EAAE;QACxD,MAAM,QAAQ,GAAG,QAAQ,CAAC,MAAM,EAAE,CAAA;QAClC,MAAM,KAAK,GAAG,QAAQ,CAAC,QAAQ,EAAE,CAAA;QACjC,MAAM,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,wEAAwE,CAAC,CAAA;IACjG,CAAC,CAAC,CAAA;IAEF,EAAE,CAAC,4DAA4D,EAAE,GAAG,EAAE;QACpE,MAAM,QAAQ,GAAG,QAAQ,CAAC,MAAM,EAAE,CAAA;QAClC,MAAM,CAAC,QAAQ,CAAC,QAAQ,EAAE,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,QAAQ,EAAE,CAAC,CAAA;IACvD,CAAC,CAAC,CAAA;IAEF,EAAE,CAAC,uDAAuD,EAAE,GAAG,EAAE;QAC/D,MAAM,SAAS,GAAG,QAAQ,CAAC,MAAM,EAAE,CAAA;QACnC,MAAM,SAAS,GAAG,SAAS,CAAA;QAC3B,MAAM,CAAC,SAAS,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;IAChD,CAAC,CAAC,CAAA;IAEF,EAAE,CAAC,0DAA0D,EAAE,GAAG,EAAE;QAClE,MAAM,SAAS,GAAG,QAAQ,CAAC,MAAM,EAAE,CAAA;QACnC,MAAM,SAAS,GAAG,QAAQ,CAAC,MAAM,EAAE,CAAA;QACnC,MAAM,CAAC,SAAS,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;IACjD,CAAC,CAAC,CAAA;IAEF,EAAE,CAAC,gEAAgE,EAAE,GAAG,EAAE;QACxE,MAAM,QAAQ,GAAG,QAAQ,CAAC,MAAM,EAAE,CAAA;QAClC,MAAM,WAAW,GAAG,EAAE,QAAQ,EAAE,GAAG,EAAE,CAAC,QAAQ,CAAC,QAAQ,EAAE,EAAyB,CAAA;QAClF,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;IAClD,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/domain/unique_id/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/domain/unique_id/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAA"}
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
import type { Guid } from '../../shared';
|
|
2
|
-
/**
|
|
3
|
-
* A class representing a unique identifier (UUID v4) for entities in the domain.
|
|
4
|
-
* This class encapsulates the generation and representation of unique identifiers.
|
|
5
|
-
|
|
6
|
-
*
|
|
7
|
-
* @author Xeno
|
|
8
|
-
* @version 1.0.0
|
|
9
|
-
* @since 2025-09-30
|
|
10
|
-
* @link https://github.com/xeno-js/xeno-js
|
|
11
|
-
*/
|
|
12
|
-
export declare class UniqueId {
|
|
13
|
-
private readonly _value;
|
|
14
|
-
/**
|
|
15
|
-
* Private constructor to prevent direct instantiation. Use the static method `create` to generate a new unique identifier.
|
|
16
|
-
* @param _value The string representation of the unique identifier (UUID v4).
|
|
17
|
-
* @returns A new instance of UniqueId with a generated UUID v4.
|
|
18
|
-
|
|
19
|
-
*
|
|
20
|
-
* @author Xeno
|
|
21
|
-
* @version 1.0.0
|
|
22
|
-
* @since 2025-09-30
|
|
23
|
-
* @link https://github.com/xeno-js/xeno-js
|
|
24
|
-
*/
|
|
25
|
-
private constructor();
|
|
26
|
-
/**
|
|
27
|
-
* Static factory method to create a new UniqueId instance with a generated UUID v4.
|
|
28
|
-
* @returns A new instance of UniqueId with a generated UUID v4.
|
|
29
|
-
|
|
30
|
-
*
|
|
31
|
-
* @author Xeno
|
|
32
|
-
* @version 1.0.0
|
|
33
|
-
* @since 2025-09-30
|
|
34
|
-
* @link https://github.com/xeno-js/xeno-js
|
|
35
|
-
*/
|
|
36
|
-
static create(id?: string): UniqueId;
|
|
37
|
-
/**
|
|
38
|
-
* Returns the string representation of the unique identifier.
|
|
39
|
-
* @returns The string representation of the unique identifier (UUID v4).
|
|
40
|
-
|
|
41
|
-
*
|
|
42
|
-
* @author Xeno
|
|
43
|
-
* @version 1.0.0
|
|
44
|
-
* @since 2025-09-30
|
|
45
|
-
* @link https://github.com/xeno-js/xeno-js
|
|
46
|
-
*/
|
|
47
|
-
toString(): string;
|
|
48
|
-
/**
|
|
49
|
-
* Returns the underlying GUID value of the UniqueId instance.
|
|
50
|
-
* @returns The GUID value of the UniqueId instance.
|
|
51
|
-
|
|
52
|
-
*
|
|
53
|
-
* @author Xeno
|
|
54
|
-
* @version 1.0.0
|
|
55
|
-
* @since 2025-09-30
|
|
56
|
-
* @link https://github.com/xeno-js/xeno-js
|
|
57
|
-
*/
|
|
58
|
-
getValue(): Guid;
|
|
59
|
-
/**
|
|
60
|
-
* Compares this UniqueId with another for equality based on their string values.
|
|
61
|
-
* @param other The other UniqueId to compare with.
|
|
62
|
-
* @returns True if both UniqueIds have the same string value, false otherwise.
|
|
63
|
-
|
|
64
|
-
*
|
|
65
|
-
* @author Xeno
|
|
66
|
-
* @version 1.0.0
|
|
67
|
-
* @since 2025-09-30
|
|
68
|
-
* @link https://github.com/xeno-js/xeno-js
|
|
69
|
-
*/
|
|
70
|
-
equals(other: UniqueId): boolean;
|
|
71
|
-
}
|
|
72
|
-
//# sourceMappingURL=unique-id.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"unique-id.d.ts","sourceRoot":"","sources":["../../../src/domain/unique_id/unique-id.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,UAAU,CAAA;AAGpC;;;;;;;;;KASK;AACL,qBAAa,QAAQ;IAYC,OAAO,CAAC,QAAQ,CAAC,MAAM;IAX3C;;;;;;;;;;OAUG;IACH,OAAO;IAIP;;;;;;;;;OASG;WACW,MAAM,CAAC,EAAE,CAAC,EAAE,MAAM,GAAG,QAAQ;IAM3C;;;;;;;;;OASG;IACI,QAAQ,IAAI,MAAM;IAIzB;;;;;;;;;OASG;IACI,QAAQ,IAAI,IAAI;IAIvB;;;;;;;;;;OAUG;IACI,MAAM,CAAC,KAAK,EAAE,QAAQ,GAAG,OAAO;CAMxC"}
|
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
import { Guards, GuidHelper } from '../../shared';
|
|
2
|
-
/**
|
|
3
|
-
* A class representing a unique identifier (UUID v4) for entities in the domain.
|
|
4
|
-
* This class encapsulates the generation and representation of unique identifiers.
|
|
5
|
-
|
|
6
|
-
*
|
|
7
|
-
* @author Xeno
|
|
8
|
-
* @version 1.0.0
|
|
9
|
-
* @since 2025-09-30
|
|
10
|
-
* @link https://github.com/xeno-js/xeno-js
|
|
11
|
-
*/
|
|
12
|
-
export class UniqueId {
|
|
13
|
-
_value;
|
|
14
|
-
/**
|
|
15
|
-
* Private constructor to prevent direct instantiation. Use the static method `create` to generate a new unique identifier.
|
|
16
|
-
* @param _value The string representation of the unique identifier (UUID v4).
|
|
17
|
-
* @returns A new instance of UniqueId with a generated UUID v4.
|
|
18
|
-
|
|
19
|
-
*
|
|
20
|
-
* @author Xeno
|
|
21
|
-
* @version 1.0.0
|
|
22
|
-
* @since 2025-09-30
|
|
23
|
-
* @link https://github.com/xeno-js/xeno-js
|
|
24
|
-
*/
|
|
25
|
-
constructor(_value) {
|
|
26
|
-
this._value = _value;
|
|
27
|
-
Object.freeze(this);
|
|
28
|
-
}
|
|
29
|
-
/**
|
|
30
|
-
* Static factory method to create a new UniqueId instance with a generated UUID v4.
|
|
31
|
-
* @returns A new instance of UniqueId with a generated UUID v4.
|
|
32
|
-
|
|
33
|
-
*
|
|
34
|
-
* @author Xeno
|
|
35
|
-
* @version 1.0.0
|
|
36
|
-
* @since 2025-09-30
|
|
37
|
-
* @link https://github.com/xeno-js/xeno-js
|
|
38
|
-
*/
|
|
39
|
-
static create(id) {
|
|
40
|
-
const uniqueId = !Guards.isNullOrEmpty(id) && GuidHelper.isValid(id) ? id : GuidHelper.generate();
|
|
41
|
-
return new UniqueId(uniqueId);
|
|
42
|
-
}
|
|
43
|
-
/**
|
|
44
|
-
* Returns the string representation of the unique identifier.
|
|
45
|
-
* @returns The string representation of the unique identifier (UUID v4).
|
|
46
|
-
|
|
47
|
-
*
|
|
48
|
-
* @author Xeno
|
|
49
|
-
* @version 1.0.0
|
|
50
|
-
* @since 2025-09-30
|
|
51
|
-
* @link https://github.com/xeno-js/xeno-js
|
|
52
|
-
*/
|
|
53
|
-
toString() {
|
|
54
|
-
return this._value.toString();
|
|
55
|
-
}
|
|
56
|
-
/**
|
|
57
|
-
* Returns the underlying GUID value of the UniqueId instance.
|
|
58
|
-
* @returns The GUID value of the UniqueId instance.
|
|
59
|
-
|
|
60
|
-
*
|
|
61
|
-
* @author Xeno
|
|
62
|
-
* @version 1.0.0
|
|
63
|
-
* @since 2025-09-30
|
|
64
|
-
* @link https://github.com/xeno-js/xeno-js
|
|
65
|
-
*/
|
|
66
|
-
getValue() {
|
|
67
|
-
return this._value;
|
|
68
|
-
}
|
|
69
|
-
/**
|
|
70
|
-
* Compares this UniqueId with another for equality based on their string values.
|
|
71
|
-
* @param other The other UniqueId to compare with.
|
|
72
|
-
* @returns True if both UniqueIds have the same string value, false otherwise.
|
|
73
|
-
|
|
74
|
-
*
|
|
75
|
-
* @author Xeno
|
|
76
|
-
* @version 1.0.0
|
|
77
|
-
* @since 2025-09-30
|
|
78
|
-
* @link https://github.com/xeno-js/xeno-js
|
|
79
|
-
*/
|
|
80
|
-
equals(other) {
|
|
81
|
-
if (!(other instanceof UniqueId)) {
|
|
82
|
-
return false;
|
|
83
|
-
}
|
|
84
|
-
return this._value === other.getValue();
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
//# sourceMappingURL=unique-id.js.map
|