@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 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"unique-id.js","sourceRoot":"","sources":["../../../src/domain/unique_id/unique-id.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,UAAU,CAAA;AAE7C;;;;;;;;;KASK;AACL,MAAM,OAAO,QAAQ;IAYkB;IAXrC;;;;;;;;;;OAUG;IACH,YAAqC,MAAY;QAAZ,WAAM,GAAN,MAAM,CAAM;QAC/C,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAA;IACrB,CAAC;IAED;;;;;;;;;OASG;IACI,MAAM,CAAC,MAAM,CAAC,EAAW;QAC9B,MAAM,QAAQ,GACZ,CAAC,MAAM,CAAC,aAAa,CAAC,EAAE,CAAC,IAAI,UAAU,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC,QAAQ,EAAE,CAAA;QAClF,OAAO,IAAI,QAAQ,CAAC,QAAQ,CAAC,CAAA;IAC/B,CAAC;IAED;;;;;;;;;OASG;IACI,QAAQ;QACb,OAAO,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE,CAAA;IAC/B,CAAC;IAED;;;;;;;;;OASG;IACI,QAAQ;QACb,OAAO,IAAI,CAAC,MAAM,CAAA;IACpB,CAAC;IAED;;;;;;;;;;OAUG;IACI,MAAM,CAAC,KAAe;QAC3B,IAAI,CAAC,CAAC,KAAK,YAAY,QAAQ,CAAC,EAAE,CAAC;YACjC,OAAO,KAAK,CAAA;QACd,CAAC;QACD,OAAO,IAAI,CAAC,MAAM,KAAK,KAAK,CAAC,QAAQ,EAAE,CAAA;IACzC,CAAC;CACF"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"value-object.test.d.ts","sourceRoot":"","sources":["../../../../src/domain/value_objects/__tests__/value-object.test.ts"],"names":[],"mappings":""}
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { describe, expect, it } from 'vitest';
|
|
2
|
-
import { ValueObject } from '../../../domain';
|
|
3
|
-
class TestValueObject extends ValueObject {
|
|
4
|
-
constructor(props) {
|
|
5
|
-
super(props);
|
|
6
|
-
}
|
|
7
|
-
}
|
|
8
|
-
describe('ValueObject', () => {
|
|
9
|
-
it('creates a ValueObject with the provided properties', () => {
|
|
10
|
-
const vo = new TestValueObject({ name: 'Alice', age: 30 });
|
|
11
|
-
expect(vo.getValue()).toEqual({ name: 'Alice', age: 30 });
|
|
12
|
-
});
|
|
13
|
-
it('equals returns true for ValueObjects with the same properties', () => {
|
|
14
|
-
const vo1 = new TestValueObject({ name: 'Alice', age: 30 });
|
|
15
|
-
const vo2 = new TestValueObject({ name: 'Alice', age: 30 });
|
|
16
|
-
expect(vo1.equals(vo2)).toBe(true);
|
|
17
|
-
});
|
|
18
|
-
it('equals returns false for ValueObjects with different properties', () => {
|
|
19
|
-
const vo1 = new TestValueObject({ name: 'Alice', age: 30 });
|
|
20
|
-
const vo2 = new TestValueObject({ name: 'Bob', age: 25 });
|
|
21
|
-
expect(vo1.equals(vo2)).toBe(false);
|
|
22
|
-
});
|
|
23
|
-
it('equals returns false when comparing with a non-ValueObject', () => {
|
|
24
|
-
const vo = new TestValueObject({ name: 'Alice', age: 30 });
|
|
25
|
-
const nonVO = undefined;
|
|
26
|
-
expect(vo.equals(nonVO)).toBe(false);
|
|
27
|
-
});
|
|
28
|
-
it('equals returns false when comparing with a value object with different properties', () => {
|
|
29
|
-
const vo = new TestValueObject({ name: 'Alice', age: 30 });
|
|
30
|
-
const nonVO = new TestValueObject({ name: 'Alice', age: 25 });
|
|
31
|
-
expect(vo.equals(nonVO)).toBe(false);
|
|
32
|
-
});
|
|
33
|
-
it('equals returns false when comparing with a value object with an empty properties', () => {
|
|
34
|
-
const vo = new TestValueObject({ name: 'Alice', age: 30 });
|
|
35
|
-
const nonVO = new TestValueObject(undefined);
|
|
36
|
-
expect(vo.equals(nonVO)).toBe(false);
|
|
37
|
-
});
|
|
38
|
-
it('toString returns the string representation of the ValueObject', () => {
|
|
39
|
-
const vo = new TestValueObject({ name: 'Alice', age: 30 });
|
|
40
|
-
expect(vo.toString()).toBe(JSON.stringify({ name: 'Alice', age: 30 }));
|
|
41
|
-
});
|
|
42
|
-
});
|
|
43
|
-
//# sourceMappingURL=value-object.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"value-object.test.js","sourceRoot":"","sources":["../../../../src/domain/value_objects/__tests__/value-object.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAA;AAE7C,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAA;AAOtC,MAAM,eAAgB,SAAQ,WAAsB;IAClD,YAAY,KAAgB;QAC1B,KAAK,CAAC,KAAK,CAAC,CAAA;IACd,CAAC;CACF;AAED,QAAQ,CAAC,aAAa,EAAE,GAAG,EAAE;IAC3B,EAAE,CAAC,oDAAoD,EAAE,GAAG,EAAE;QAC5D,MAAM,EAAE,GAAG,IAAI,eAAe,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,EAAE,EAAE,EAAE,CAAC,CAAA;QAC1D,MAAM,CAAC,EAAE,CAAC,QAAQ,EAAE,CAAC,CAAC,OAAO,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,EAAE,EAAE,EAAE,CAAC,CAAA;IAC3D,CAAC,CAAC,CAAA;IAEF,EAAE,CAAC,+DAA+D,EAAE,GAAG,EAAE;QACvE,MAAM,GAAG,GAAG,IAAI,eAAe,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,EAAE,EAAE,EAAE,CAAC,CAAA;QAC3D,MAAM,GAAG,GAAG,IAAI,eAAe,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,EAAE,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AE,CAAC,kFAAkF,EAAE,GAAG,EAAE;QAC1F,MAAM,EAAE,GAAG,IAAI,eAAe,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,EAAE,EAAE,EAAE,CAAC,CAAA;QAC1D,MAAM,KAAK,GAAG,IAAI,eAAe,CAAC,SAAiC,CAAC,CAAA;QACpE,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;IACtC,CAAC,CAAC,CAAA;IAEF,EAAE,CAAC,+DAA+D,EAAE,GAAG,EAAE;QACvE,MAAM,EAAE,GAAG,IAAI,eAAe,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,EAAE,EAAE,EAAE,CAAC,CAAA;QAC1D,MAAM,CAAC,EAAE,CAAC,QAAQ,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,EAAE,EAAE,EAAE,CAAC,CAAC,CAAA;IACxE,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/domain/value_objects/index.ts"],"names":[],"mappings":"AAAA,mBAAmB,2BAA2B,CAAA;AAC9C,cAAc,gBAAgB,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/domain/value_objects/index.ts"],"names":[],"mappings":"AACA,cAAc,gBAAgB,CAAA"}
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The IValueObject interface defines the contract for value objects in the domain. A value object is an immutable type that represents a concept or measurement in the domain, and its equality is based on its properties rather than its identity. The IValueObject interface includes methods for retrieving the underlying value, comparing value objects for equality, and providing a string representation of the value object.
|
|
3
|
-
|
|
4
|
-
*
|
|
5
|
-
* @author Xeno
|
|
6
|
-
* @version 1.0.0
|
|
7
|
-
* @since 2025-09-30
|
|
8
|
-
* @link https://github.com/xeno-js/xeno-js
|
|
9
|
-
*/
|
|
10
|
-
export interface IValueObject<T extends object> {
|
|
11
|
-
/**
|
|
12
|
-
* Retrieves the underlying value of the value object. This method provides access to the encapsulated data, allowing it to be used in comparisons, transformations, or other operations while maintaining the integrity and immutability of the value object.
|
|
13
|
-
* @returns The underlying value of the value object.
|
|
14
|
-
|
|
15
|
-
*
|
|
16
|
-
* @author Xeno
|
|
17
|
-
* @version 1.0.0
|
|
18
|
-
* @since 2025-09-30
|
|
19
|
-
* @link https://github.com/xeno-js/xeno-js
|
|
20
|
-
*/
|
|
21
|
-
getValue(): T;
|
|
22
|
-
/**
|
|
23
|
-
* Compares the current value object with another value object for equality. This method checks if the underlying values of both value objects are equal, allowing for meaningful comparisons between value objects based on their encapsulated data rather than their reference identity.
|
|
24
|
-
* @param other The other value object to compare with the current value object.
|
|
25
|
-
* @returns True if the underlying values of both value objects are equal; otherwise, returns false.
|
|
26
|
-
|
|
27
|
-
*
|
|
28
|
-
* @author Xeno
|
|
29
|
-
* @version 1.0.0
|
|
30
|
-
* @since 2025-09-30
|
|
31
|
-
* @link https://github.com/xeno-js/xeno-js
|
|
32
|
-
*/
|
|
33
|
-
equals(other: IValueObject<T>): boolean;
|
|
34
|
-
/**
|
|
35
|
-
* Returns a string representation of the value object. This method can be used for debugging, logging, or any scenario where a human-readable representation of the value object is needed. The string representation should ideally include relevant information about the underlying value to provide context when the value object is printed or logged.
|
|
36
|
-
* @returns A string representation of the value object.
|
|
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
|
-
toString(): string;
|
|
45
|
-
}
|
|
46
|
-
//# sourceMappingURL=ivalue-object.contracts.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ivalue-object.contracts.d.ts","sourceRoot":"","sources":["../../../src/domain/value_objects/ivalue-object.contracts.ts"],"names":[],"mappings":"AAAA;;;;;;;;KAQK;AACL,MAAM,WAAW,YAAY,CAAC,CAAC,SAAS,MAAM;IAC5C;;;;;;;;;OASG;IACH,QAAQ,IAAI,CAAC,CAAA;IAEb;;;;;;;;;;OAUG;IACH,MAAM,CAAC,KAAK,EAAE,YAAY,CAAC,CAAC,CAAC,GAAG,OAAO,CAAA;IAEvC;;;;;;;;;OASG;IACH,QAAQ,IAAI,MAAM,CAAA;CACnB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ivalue-object.contracts.js","sourceRoot":"","sources":["../../../src/domain/value_objects/ivalue-object.contracts.ts"],"names":[],"mappings":""}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import type { Optional } from '../../shared';
|
|
2
|
-
import type { IValueObject } from './ivalue-object.contracts';
|
|
3
|
-
/**
|
|
4
|
-
* The ValueObject class is an abstract implementation of the IValueObject interface, providing a base class for creating value objects in the domain. A value object is an immutable type that represents a concept or measurement in the domain, and its equality is based on its properties rather than its identity. The ValueObject class includes a constructor that initializes the properties of the value object and an equals method that compares two value objects for equality based on their properties.
|
|
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 abstract class ValueObject<T extends object> implements IValueObject<T> {
|
|
13
|
-
/** @description The properties of the value object, which are immutable and define the value represented by the value object.
|
|
14
|
-
*
|
|
15
|
-
* @author Xeno
|
|
16
|
-
* @version 1.0.0
|
|
17
|
-
* @since 2025-09-30
|
|
18
|
-
* @link https://github.com/xeno-js/xeno-js
|
|
19
|
-
*/
|
|
20
|
-
protected readonly _props: T;
|
|
21
|
-
protected constructor(props: T);
|
|
22
|
-
equals(vo?: Optional<IValueObject<T>>): boolean;
|
|
23
|
-
getValue(): T;
|
|
24
|
-
toString(): string;
|
|
25
|
-
}
|
|
26
|
-
//# sourceMappingURL=value-object.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"value-object.d.ts","sourceRoot":"","sources":["../../../src/domain/value_objects/value-object.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAA;AAGxC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AAE7D;;;;;;;;KAQK;AACL,8BAAsB,WAAW,CAAC,CAAC,SAAS,MAAM,CAAE,YAAW,YAAY,CAAC,CAAC,CAAC;IAC5E;;;;;;OAMG;IACH,SAAS,CAAC,QAAQ,CAAC,MAAM,EAAE,CAAC,CAAA;IAE5B,SAAS,aAAa,KAAK,EAAE,CAAC;IAKvB,MAAM,CAAC,EAAE,GAAE,QAAQ,CAAC,YAAY,CAAC,CAAC,CAAC,CAAa,GAAG,OAAO;IAQ1D,QAAQ,IAAI,CAAC;IAIb,QAAQ,IAAI,MAAM;CAG1B"}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { Guards, StringHelper } from '../../shared';
|
|
2
|
-
/**
|
|
3
|
-
* The ValueObject class is an abstract implementation of the IValueObject interface, providing a base class for creating value objects in the domain. A value object is an immutable type that represents a concept or measurement in the domain, and its equality is based on its properties rather than its identity. The ValueObject class includes a constructor that initializes the properties of the value object and an equals method that compares two value objects for equality based on their properties.
|
|
4
|
-
|
|
5
|
-
*
|
|
6
|
-
* @author Xeno
|
|
7
|
-
* @version 1.0.0
|
|
8
|
-
* @since 2025-09-30
|
|
9
|
-
* @link https://github.com/xeno-js/xeno-js
|
|
10
|
-
*/
|
|
11
|
-
export class ValueObject {
|
|
12
|
-
/** @description The properties of the value object, which are immutable and define the value represented by the value object.
|
|
13
|
-
*
|
|
14
|
-
* @author Xeno
|
|
15
|
-
* @version 1.0.0
|
|
16
|
-
* @since 2025-09-30
|
|
17
|
-
* @link https://github.com/xeno-js/xeno-js
|
|
18
|
-
*/
|
|
19
|
-
_props;
|
|
20
|
-
constructor(props) {
|
|
21
|
-
this._props = Object.freeze({ ...props });
|
|
22
|
-
Object.freeze(this);
|
|
23
|
-
}
|
|
24
|
-
equals(vo = undefined) {
|
|
25
|
-
if (Guards.isNullOrEmpty(vo) || Guards.isNullOrEmpty(vo.getValue())) {
|
|
26
|
-
return false;
|
|
27
|
-
}
|
|
28
|
-
return StringHelper.safeStringify(this._props) === StringHelper.safeStringify(vo.getValue());
|
|
29
|
-
}
|
|
30
|
-
getValue() {
|
|
31
|
-
return { ...this._props };
|
|
32
|
-
}
|
|
33
|
-
toString() {
|
|
34
|
-
return StringHelper.safeStringify(this._props);
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
//# sourceMappingURL=value-object.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"value-object.js","sourceRoot":"","sources":["../../../src/domain/value_objects/value-object.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,UAAU,CAAA;AAI/C;;;;;;;;KAQK;AACL,MAAM,OAAgB,WAAW;IAC/B;;;;;;OAMG;IACgB,MAAM,CAAG;IAE5B,YAAsB,KAAQ;QAC5B,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,EAAE,GAAG,KAAK,EAAE,CAAC,CAAA;QACzC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAA;IACrB,CAAC;IAEM,MAAM,CAAC,KAAgC,SAAS;QACrD,IAAI,MAAM,CAAC,aAAa,CAAC,EAAE,CAAC,IAAI,MAAM,CAAC,aAAa,CAAC,EAAE,CAAC,QAAQ,EAAE,CAAC,EAAE,CAAC;YACpE,OAAO,KAAK,CAAA;QACd,CAAC;QAED,OAAO,YAAY,CAAC,aAAa,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,YAAY,CAAC,aAAa,CAAC,EAAE,CAAC,QAAQ,EAAE,CAAC,CAAA;IAC9F,CAAC;IAEM,QAAQ;QACb,OAAO,EAAE,GAAG,IAAI,CAAC,MAAM,EAAE,CAAA;IAC3B,CAAC;IAEM,QAAQ;QACb,OAAO,YAAY,CAAC,aAAa,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;IAChD,CAAC;CACF"}
|
package/dist/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAA;AACnC,cAAc,gBAAgB,CAAA;AAC9B,OAAO,EACL,YAAY,EACZ,eAAe,EACf,eAAe,EACf,aAAa,EACb,aAAa,EACb,mBAAmB,EACnB,oBAAoB,EACpB,qBAAqB,EACrB,QAAQ,EACR,mBAAmB,GACpB,MAAM,wBAAwB,CAAA;AAC/B,cAAc,gBAAgB,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"supabase-auth.service.test.d.ts","sourceRoot":"","sources":["../../../../src/infrastructure/auth/__tests__/supabase-auth.service.test.ts"],"names":[],"mappings":""}
|
|
@@ -1,128 +0,0 @@
|
|
|
1
|
-
import { beforeEach, describe, expect, it, vi } from 'vitest';
|
|
2
|
-
import { AppError } from '../../../domain';
|
|
3
|
-
import { ERROR_CODES, STATUS_CODES } from '../../../shared';
|
|
4
|
-
import { SupabaseAuthService } from '../supabase-auth.service';
|
|
5
|
-
describe('SupabaseAuthService', () => {
|
|
6
|
-
const getUserMock = vi.fn();
|
|
7
|
-
const getSessionMock = vi.fn();
|
|
8
|
-
const mapMock = vi.fn();
|
|
9
|
-
let mockSupabaseClient;
|
|
10
|
-
let mockMapper;
|
|
11
|
-
let mockSessionMapper;
|
|
12
|
-
let sut;
|
|
13
|
-
const config = {
|
|
14
|
-
redirectTo: undefined,
|
|
15
|
-
};
|
|
16
|
-
beforeEach(() => {
|
|
17
|
-
vi.clearAllMocks();
|
|
18
|
-
mockSupabaseClient = {
|
|
19
|
-
auth: {
|
|
20
|
-
getUser: getUserMock,
|
|
21
|
-
getSession: getSessionMock,
|
|
22
|
-
},
|
|
23
|
-
};
|
|
24
|
-
mockMapper = {
|
|
25
|
-
map: mapMock,
|
|
26
|
-
};
|
|
27
|
-
mockSessionMapper = {
|
|
28
|
-
map: mapMock,
|
|
29
|
-
};
|
|
30
|
-
sut = new SupabaseAuthService(mockSupabaseClient, mockMapper, mockSessionMapper, config);
|
|
31
|
-
});
|
|
32
|
-
// ─── Test Suite: authenticate ──────────────────────────────────────────────
|
|
33
|
-
describe('authenticate', () => {
|
|
34
|
-
const fakeToken = 'valid-supabase-jwt-token';
|
|
35
|
-
it('should return a failed Result containing a standardized AppError when Supabase auth returns an error', async () => {
|
|
36
|
-
// Arrange
|
|
37
|
-
const supabaseError = { message: 'Auth token has expired' };
|
|
38
|
-
getUserMock.mockResolvedValue({
|
|
39
|
-
data: { user: null },
|
|
40
|
-
error: supabaseError,
|
|
41
|
-
});
|
|
42
|
-
// Act
|
|
43
|
-
const result = await sut.authenticate(fakeToken);
|
|
44
|
-
// Assert
|
|
45
|
-
expect(getUserMock).toHaveBeenCalledOnce();
|
|
46
|
-
expect(getUserMock).toHaveBeenCalledWith(fakeToken);
|
|
47
|
-
expect(result.isOk()).toBe(false);
|
|
48
|
-
const error = result.getErrorOrThrow();
|
|
49
|
-
expect(error).toBeInstanceOf(AppError);
|
|
50
|
-
expect(error.code).toBe(ERROR_CODES.AUTHENTICATION_FAILED);
|
|
51
|
-
expect(error.status).toBe(STATUS_CODES.UNAUTHORIZED);
|
|
52
|
-
});
|
|
53
|
-
it('should fall back to "Unknown error" when Supabase error message is missing or undefined', async () => {
|
|
54
|
-
// Arrange
|
|
55
|
-
getUserMock.mockResolvedValue({
|
|
56
|
-
data: { user: null },
|
|
57
|
-
error: { message: undefined },
|
|
58
|
-
});
|
|
59
|
-
// Act
|
|
60
|
-
const result = await sut.authenticate(fakeToken);
|
|
61
|
-
// Assert
|
|
62
|
-
expect(result.isOk()).toBe(false);
|
|
63
|
-
});
|
|
64
|
-
it('should return a failed Result if Supabase returns no error but the user object is undefined', async () => {
|
|
65
|
-
// Arrange
|
|
66
|
-
getUserMock.mockResolvedValue({
|
|
67
|
-
data: { user: null },
|
|
68
|
-
error: null,
|
|
69
|
-
});
|
|
70
|
-
// Act
|
|
71
|
-
const result = await sut.authenticate(fakeToken);
|
|
72
|
-
// Assert
|
|
73
|
-
expect(result.isOk()).toBe(false);
|
|
74
|
-
});
|
|
75
|
-
it('should map the user to claims and return a successful Result when authentication succeeds', async () => {
|
|
76
|
-
// Arrange
|
|
77
|
-
const fakeUser = { id: 'usr-456', email: 'user@Xeno.it' };
|
|
78
|
-
const expectedClaims = {
|
|
79
|
-
sub: 'usr-456',
|
|
80
|
-
email: 'admin@example.com',
|
|
81
|
-
name: 'admin',
|
|
82
|
-
tenantId: 'tenant-789',
|
|
83
|
-
roles: ['USER'],
|
|
84
|
-
permissions: ['read:items'],
|
|
85
|
-
};
|
|
86
|
-
getUserMock.mockResolvedValue({
|
|
87
|
-
data: { user: fakeUser },
|
|
88
|
-
error: null,
|
|
89
|
-
});
|
|
90
|
-
mapMock.mockReturnValue(expectedClaims);
|
|
91
|
-
// Act
|
|
92
|
-
const result = await sut.authenticate(fakeToken);
|
|
93
|
-
// Assert
|
|
94
|
-
expect(getUserMock).toHaveBeenCalledWith(fakeToken);
|
|
95
|
-
expect(mapMock).toHaveBeenCalledOnce();
|
|
96
|
-
expect(mapMock).toHaveBeenCalledWith(fakeUser);
|
|
97
|
-
expect(result.isOk()).toBe(true);
|
|
98
|
-
expect(result.getValueOrThrow()).toEqual(expectedClaims);
|
|
99
|
-
});
|
|
100
|
-
});
|
|
101
|
-
// ─── Test Suite: isAuthenticated ───────────────────────────────────────────
|
|
102
|
-
describe('isAuthenticated', () => {
|
|
103
|
-
it('should return true when an active session exists in Supabase context', async () => {
|
|
104
|
-
// Arrange
|
|
105
|
-
const fakeSession = { id: 'session-active-abc' };
|
|
106
|
-
getSessionMock.mockResolvedValue({
|
|
107
|
-
data: { session: fakeSession },
|
|
108
|
-
});
|
|
109
|
-
// Act
|
|
110
|
-
const isAuth = await sut.isAuthenticated();
|
|
111
|
-
// Assert
|
|
112
|
-
expect(getSessionMock).toHaveBeenCalledOnce();
|
|
113
|
-
expect(isAuth).toBe(true);
|
|
114
|
-
});
|
|
115
|
-
it('should return false when session is null or undefined', async () => {
|
|
116
|
-
// Arrange
|
|
117
|
-
getSessionMock.mockResolvedValue({
|
|
118
|
-
data: { session: null },
|
|
119
|
-
});
|
|
120
|
-
// Act
|
|
121
|
-
const isAuth = await sut.isAuthenticated();
|
|
122
|
-
// Assert
|
|
123
|
-
expect(getSessionMock).toHaveBeenCalledOnce();
|
|
124
|
-
expect(isAuth).toBe(false);
|
|
125
|
-
});
|
|
126
|
-
});
|
|
127
|
-
});
|
|
128
|
-
//# sourceMappingURL=supabase-auth.service.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"supabase-auth.service.test.js","sourceRoot":"","sources":["../../../../src/infrastructure/auth/__tests__/supabase-auth.service.test.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAA;AAG7D,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAA;AAEnC,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,UAAU,CAAA;AAEpD,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAA;AAE9D,QAAQ,CAAC,qBAAqB,EAAE,GAAG,EAAE;IACnC,MAAM,WAAW,GAAG,EAAE,CAAC,EAAE,EAAE,CAAA;IAC3B,MAAM,cAAc,GAAG,EAAE,CAAC,EAAE,EAAE,CAAA;IAC9B,MAAM,OAAO,GAAG,E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WAAW,EAAE;aAC/B,CAAC,CAAA;YAEF,MAAM;YACN,MAAM,MAAM,GAAG,MAAM,GAAG,CAAC,eAAe,EAAE,CAAA;YAE1C,SAAS;YACT,MAAM,CAAC,cAAc,CAAC,CAAC,oBAAoB,EAAE,CAAA;YAC7C,MAAM,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;QAC3B,CAAC,CAAC,CAAA;QAEF,EAAE,CAAC,uDAAuD,EAAE,KAAK,IAAI,EAAE;YACrE,UAAU;YACV,cAAc,CAAC,iBAAiB,CAAC;gBAC/B,IAAI,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE;aACxB,CAAC,CAAA;YAEF,MAAM;YACN,MAAM,MAAM,GAAG,MAAM,GAAG,CAAC,eAAe,EAAE,CAAA;YAE1C,SAAS;YACT,MAAM,CAAC,cAAc,CAAC,CAAC,oBAAoB,EAAE,CAAA;YAC7C,MAAM,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;QAC5B,CAAC,CAAC,CAAA;IACJ,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/infrastructure/auth/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAA;AACzB,cAAc,yBAAyB,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/infrastructure/auth/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAA;AACzB,cAAc,yBAAyB,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"cookie.storage.d.ts","sourceRoot":"","sources":["../../../../src/infrastructure/auth/storage/cookie.storage.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAA;AACxC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AAG7C,eAAO,MAAM,mBAAmB,GAAI,MAAM,aAAa,KAAG,QAoBxD,CAAA"}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { Guards } from '../../../shared';
|
|
2
|
-
export const createCookieStorage = (opts) => ({
|
|
3
|
-
getItem: (key) => {
|
|
4
|
-
if (!Guards.isDefined(document))
|
|
5
|
-
return null;
|
|
6
|
-
const match = new RegExp(`(^| )${encodeURIComponent(key)}=([^;]+)`).exec(document.cookie);
|
|
7
|
-
return Guards.isDefined(match) ? decodeURIComponent(match[2]) : null;
|
|
8
|
-
},
|
|
9
|
-
setItem: (key, value) => {
|
|
10
|
-
if (!Guards.isDefined(document))
|
|
11
|
-
return;
|
|
12
|
-
let cookieSuffix = '';
|
|
13
|
-
if (Guards.isDefined(opts.path))
|
|
14
|
-
cookieSuffix += `; path=${opts.path}`;
|
|
15
|
-
if (Guards.isDefined(opts.maxAge))
|
|
16
|
-
cookieSuffix += `; max-age=${opts.maxAge}`;
|
|
17
|
-
if (Guards.isDefined(opts.domain))
|
|
18
|
-
cookieSuffix += `; domain=${opts.domain}`;
|
|
19
|
-
if (Guards.isDefined(opts.secure))
|
|
20
|
-
cookieSuffix += `; Secure`;
|
|
21
|
-
if (Guards.isDefined(opts.sameSite))
|
|
22
|
-
cookieSuffix += `; SameSite=${opts.sameSite}`;
|
|
23
|
-
document.cookie = `${encodeURIComponent(key)}=${encodeURIComponent(value)}${cookieSuffix}`;
|
|
24
|
-
},
|
|
25
|
-
removeItem: (key) => {
|
|
26
|
-
if (!Guards.isDefined(document))
|
|
27
|
-
return;
|
|
28
|
-
document.cookie = `${encodeURIComponent(key)}=; path=${opts.path ?? '/'}; expires=Thu, 01 Jan 1970 00:00:00 GMT`;
|
|
29
|
-
},
|
|
30
|
-
});
|
|
31
|
-
//# sourceMappingURL=cookie.storage.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"cookie.storage.js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AC,IAAI,CAAC,QAAQ,CAAC;YAAE,YAAY,IAAI,cAAc,IAAI,CAAC,QAAQ,EAAE,CAAA;QAClF,QAAQ,CAAC,MAAM,GAAG,GAAG,kBAAkB,CAAC,GAAG,CAAC,IAAI,kBAAkB,CAAC,KAAK,CAAC,GAAG,YAAY,EAAE,CAAA;IAC5F,CAAC;IACD,UAAU,EAAE,CAAC,GAAW,EAAQ,EAAE;QAChC,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC;YAAE,OAAM;QACvC,QAAQ,CAAC,MAAM,GAAG,GAAG,kBAAkB,CAAC,GAAG,CAAC,WAAW,IAAI,CAAC,IAAI,IAAI,GAAG,yCAAyC,CAAA;IAClH,CAAC;CACF,CAAC,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/infrastructure/auth/storage/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAA;AAChC,cAAc,kBAAkB,CAAA;AAChC,cAAc,iBAAiB,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/infrastructure/auth/storage/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAA;AAChC,cAAc,kBAAkB,CAAA;AAChC,cAAc,iBAAiB,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"memory.storage.d.ts","sourceRoot":"","sources":["../../../../src/infrastructure/auth/storage/memory.storage.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAA;AAGxC,eAAO,MAAM,mBAAmB,QAAO,QAWtC,CAAA"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
// infrastructure/auth/memory-storage.adapter.ts
|
|
2
|
-
export const createMemoryStorage = () => {
|
|
3
|
-
const store = new Map();
|
|
4
|
-
return {
|
|
5
|
-
getItem: (key) => store.get(key) ?? null,
|
|
6
|
-
setItem: (key, value) => {
|
|
7
|
-
store.set(key, value);
|
|
8
|
-
},
|
|
9
|
-
removeItem: (key) => {
|
|
10
|
-
store.delete(key);
|
|
11
|
-
},
|
|
12
|
-
};
|
|
13
|
-
};
|
|
14
|
-
//# sourceMappingURL=memory.storage.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"memory.storage.js","sourceRoot":"","sources":["../../../../src/infrastructure/auth/storage/memory.storage.ts"],"names":[],"mappings":"AAEA,gDAAgD;AAChD,MAAM,CAAC,MAAM,mBAAmB,GAAG,GAAa,EAAE;IAChD,MAAM,KAAK,GAAG,IAAI,GAAG,EAAkB,CAAA;IACvC,OAAO;QACL,OAAO,EAAE,CAAC,GAAW,EAAiB,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,IAAI;QAC/D,OAAO,EAAE,CAAC,GAAW,EAAE,KAAa,EAAQ,EAAE;YAC5C,KAAK,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,CAAC,CAAA;QACvB,CAAC;QACD,UAAU,EAAE,CAAC,GAAW,EAAQ,EAAE;YAChC,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,CAAA;QACnB,CAAC;KACF,CAAA;AACH,CAAC,CAAA"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { IStorage } from '../../../domain';
|
|
2
|
-
import type { CookieOptions, Optional } from '../../../shared';
|
|
3
|
-
export declare const StorageHelper: Readonly<{
|
|
4
|
-
readonly create: (opts: {
|
|
5
|
-
type: Optional<"local" | "session" | "memory" | "cookie">;
|
|
6
|
-
storage: Optional<IStorage>;
|
|
7
|
-
cookieOpts: Optional<CookieOptions>;
|
|
8
|
-
}) => Optional<IStorage>;
|
|
9
|
-
}>;
|
|
10
|
-
//# sourceMappingURL=storage.utils.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"storage.utils.d.ts","sourceRoot":"","sources":["../../../../src/infrastructure/auth/storage/storage.utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAA;AACxC,OAAO,KAAK,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAA;AAMvD,eAAO,MAAM,aAAa;4BACX;QACX,IAAI,EAAE,QAAQ,CAAC,OAAO,GAAG,SAAS,GAAG,QAAQ,GAAG,QAAQ,CAAC,CAAA;QACzD,OAAO,EAAE,QAAQ,CAAC,QAAQ,CAAC,CAAA;QAC3B,UAAU,EAAE,QAAQ,CAAC,aAAa,CAAC,CAAA;KACpC,KAAG,QAAQ,CAAC,QAAQ,CAAC;EAgBb,CAAA"}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { Guards } from '../../../shared';
|
|
2
|
-
import { createCookieStorage } from './cookie.storage';
|
|
3
|
-
import { createMemoryStorage } from './memory.storage';
|
|
4
|
-
export const StorageHelper = Object.freeze({
|
|
5
|
-
create(opts) {
|
|
6
|
-
switch (opts.type) {
|
|
7
|
-
case 'memory':
|
|
8
|
-
return createMemoryStorage();
|
|
9
|
-
case 'cookie':
|
|
10
|
-
if (!Guards.isDefined(opts.cookieOpts))
|
|
11
|
-
throw new Error('At least ');
|
|
12
|
-
return createCookieStorage(opts.cookieOpts);
|
|
13
|
-
case 'session':
|
|
14
|
-
return sessionStorage;
|
|
15
|
-
case 'local':
|
|
16
|
-
return localStorage;
|
|
17
|
-
default:
|
|
18
|
-
return opts.storage;
|
|
19
|
-
}
|
|
20
|
-
},
|
|
21
|
-
});
|
|
22
|
-
//# sourceMappingURL=storage.utils.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"storage.utils.js","sourceRoot":"","sources":["../../../../src/infrastructure/auth/storage/storage.utils.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AAEjC,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAA;AACtD,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAA;AAEtD,MAAM,CAAC,MAAM,aAAa,GAAG,MAAM,CAAC,MAAM,CAAC;IACzC,MAAM,CAAC,IAIN;QACC,QAAQ,IAAI,CAAC,IAAI,EAAE,CAAC;YAClB,KAAK,QAAQ;gBACX,OAAO,mBAAmB,EAAE,CAAA;YAC9B,KAAK,QAAQ;gBACX,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC,UAAU,CAAC;oBAAE,MAAM,IAAI,KAAK,CAAC,WAAW,CAAC,CAAA;gBACpE,OAAO,mBAAmB,CAAC,IAAI,CAAC,UAAU,CAAC,CAAA;YAC7C,KAAK,SAAS;gBACZ,OAAO,cAAc,CAAA;YACvB,KAAK,OAAO;gBACV,OAAO,YAAY,CAAA;YAErB;gBACE,OAAO,IAAI,CAAC,OAAO,CAAA;QACvB,CAAC;IACH,CAAC;CACO,CAAC,CAAA"}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import type { Provider, Session as SupabaseSession, SupabaseClient, User } from '@supabase/supabase-js';
|
|
2
|
-
import type { IAuthService, IBaseAuthService, IBaseMapper, ResultType } from '../../domain';
|
|
3
|
-
import type { AuthClaims, Maybe, Optional, Session } from '../../shared';
|
|
4
|
-
/**
|
|
5
|
-
* @description The SupabaseAuthService class is responsible for handling authentication-related operations using a SupabaseClient instance. It implements the IAuthService interface, providing methods to check if a user is authenticated and to retrieve authentication claims from a given token. The authenticate method interacts with the Supabase authentication API to fetch user information based on the provided token, while the isAuthenticated method checks if there is an active session. The class also includes error handling to create standardized authentication errors when necessary.
|
|
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 SupabaseAuthService implements IBaseAuthService, IAuthService {
|
|
13
|
-
private readonly _supabase;
|
|
14
|
-
private readonly _mapper;
|
|
15
|
-
private readonly _sessionMapper;
|
|
16
|
-
private readonly _opts;
|
|
17
|
-
constructor(_supabase: SupabaseClient, _mapper: IBaseMapper<User, AuthClaims>, _sessionMapper: IBaseMapper<SupabaseSession, Session>, _opts: {
|
|
18
|
-
redirectTo: Optional<string>;
|
|
19
|
-
});
|
|
20
|
-
authenticate(token: string): Promise<ResultType<AuthClaims>>;
|
|
21
|
-
isAuthenticated(): Promise<boolean>;
|
|
22
|
-
exchangeCodeForSession(code: string): Promise<ResultType<Optional<Session>>>;
|
|
23
|
-
signInWithProvider(provider: Provider): Promise<ResultType<{
|
|
24
|
-
url: string;
|
|
25
|
-
}>>;
|
|
26
|
-
getSession(): Promise<ResultType<Maybe<Session>>>;
|
|
27
|
-
getUser(): Promise<ResultType<Maybe<AuthClaims>>>;
|
|
28
|
-
signOut(): Promise<ResultType<void>>;
|
|
29
|
-
getSessionToken(): Promise<ResultType<Optional<string>>>;
|
|
30
|
-
}
|
|
31
|
-
//# sourceMappingURL=supabase-auth.service.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"supabase-auth.service.d.ts","sourceRoot":"","sources":["../../../src/infrastructure/auth/supabase-auth.service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,QAAQ,EACR,OAAO,IAAI,eAAe,EAC1B,cAAc,EACd,IAAI,EACL,MAAM,uBAAuB,CAAA;AAE9B,OAAO,KAAK,EAAE,YAAY,EAAE,gBAAgB,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,UAAU,CAAA;AAEvF,OAAO,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,UAAU,CAAA;AAGpE;;;;;;;GAOG;AACH,qBAAa,mBAAoB,YAAW,gBAAgB,EAAE,YAAY;IAEtE,OAAO,CAAC,QAAQ,CAAC,SAAS;IAC1B,OAAO,CAAC,QAAQ,CAA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