@eac-arch/infrastructure-persistence
v1.0.6
Published
Angular infrastructure library with HTTP repository/query abstractions for data access.
Readme
@eac-arch/infrastructure-persistence
Angular infrastructure library with HTTP repository/query abstractions for data access.
Purpose
@eac-arch/infrastructure-persistence provides reusable base classes to implement repositories and query services over HTTP, keeping client code aligned with DDD/CQRS contracts from shared-kernel.
Main Capabilities
ReadOnlyHttpRepository<TEntity, TDto, TQueryOptions>: Read operations (getAll,getById,exists) with DTO -> entity mapping.GenericHttpRepository<...>: Extends read-only base withcreate,upsert,updatePartial, anddelete.HttpRepository<...>: Thin alias for common full CRUD use cases.HttpQueryService<TModel, TQueryOptions>: Base read-model query service with pagination, specification support, sort formatting, and sparse field selection.
Public API
export { ReadOnlyHttpRepository };
export { GenericHttpRepository };
export { HttpRepository };
export { HttpQueryService, type BaseQueryOptions };Usage Pattern
- Extend a repository base.
- Implement transport delegates (
doGetAll,doGetById,doCreate, etc.). - Implement DTO mapping (
mapToEntity,extractId, optionalrehydrate). - Reuse
HttpQueryServicefor read-side pagination/filtering.
Dependencies
@eac-arch/shared-kernel@eac-arch/infrastructure-http- Angular core/common
tslib
Development
From eac-arch-infrastructure-persistence:
npm install
npm run build
npm testCreated By
Erick Arostegui Cunza
Enterprise Solutions Architect
Professional Profile:
- LinkedIn: https://www.linkedin.com/in/erick-arostegui-cunza/
Articles:
- Medium: https://medium.com/@scorpius86
Channels and Media:
- Facebook: https://www.facebook.com/Erick.Arostegui.Cunza
- TikTok: https://www.tiktok.com/@erick_arostegui_cunza
- Instagram: https://www.instagram.com/erickarosteguicunza/
- Spotify: https://open.spotify.com/show/2JQxlxcRg7k7cJ1hB52Ge5
Created by Erick Arostegui Cunza.
