npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@cbm-common/seat-repository

v0.0.1

Published

This project was generated using [Angular CLI](https://github.com/angular/angular-cli) version 20.1.0.

Downloads

9

Readme

SeatRepository

This project was generated using Angular CLI version 20.1.0.

Code scaffolding

Angular CLI includes powerful code scaffolding tools. To generate a new component, run:

ng generate component component-name

For a complete list of available schematics (such as components, directives, or pipes), run:

ng generate --help

Building

To build the library, run:

@cbm-common/seat-repository

Librería Angular que expone un repositorio para trabajar con asientos contables (Seat). Proporciona un servicio y un módulo de configuración para integrarlo fácilmente en otras aplicaciones o microfrontends.

Contenido

  • CbmSeatModule — módulo que expone la configuración por token (forRoot).
  • CbmSeatService — servicio HTTP que implementa las operaciones del repositorio.
  • CbmSeatRepository — wrapper/adapter que delega al servicio (interfaz pública de la librería).
  • Tipos y modelos en seat.model.ts.

Instalación

Esta librería suele consumirse como paquete monorepo o paquete npm. En este repo está disponible en projects/seat-repository.

Uso (ejemplo mínimo)

  1. Proveer la configuración global (por ejemplo en el bootstrap o módulo raíz):
import { bootstrapApplication } from '@angular/platform-browser';
import { AppComponent } from './app/app.component';
import { CbmSeatModule } from '@cbm-common/seat-repository';

bootstrapApplication(AppComponent, {
   providers: [
      CbmSeatModule.forRoot({ baseUrl: 'https://api.mi-app.com/seats' }) as any,
   ],
});
  1. Consumir el repositorio desde componentes o servicios:
import { Component, OnInit } from '@angular/core';
import { CbmSeatRepository, CbmSeatModel } from '@cbm-common/seat-repository';

@Component({ /* ... */ })
export class ExampleComponent implements OnInit {
   constructor(private repo: CbmSeatRepository) {}

   async ngOnInit() {
      this.repo.list({ dateFrom: 0, dateUntil: Date.now() }).subscribe((res) => {
         console.log(res.data);
      });
   }
}

API principal (resumen)

  • CbmSeatModule.forRoot(config: { baseUrl: string }) — registra el token SEAT_MODULE_CONFIG con la URL base.
  • CbmSeatService / CbmSeatRepository — métodos disponibles (basado en seat.model.ts):
    • list(params: ListParams): Observable
    • getOne(id: string): Observable
    • save(body: SaveBody): Observable
    • update(id: string, body: UpdateBody): Observable
    • changeStatus(id: string, body: ChangeStatusBody): Observable
    • delete(id: string): Observable
    • findAccountingMovements(id: string): Observable
    • downloadExcel(params): Observable<HttpResponse> (descarga blob)
    • downloadGeneralPdf(params): Observable<HttpResponse>
    • downloadIndividualPdf(params): Observable<HttpResponse>
    • downloadIndividualExcel(params): Observable<HttpResponse>
    • findByFilter(params): Observable

Modelos

  • Los modelos y tipos están en projects/seat-repository/src/lib/seat.model.ts. Revisa allí las formas de ListParams, ListResponse, GetOneResponse, SaveBody, UpdateBody, etc.

Desarrollo y pruebas

  • Build (local, crea dist/seat-repository):
ng build seat-repository
  • Ejecutar pruebas unitarias (Karma/jasmine) para la librería:
ng test seat-repository
  • Ejecutar todas las pruebas del workspace:
ng test

Notas de integración

  • Esta librería expecta que el consumidor provea un provider con CbmSeatModule.forRoot({ baseUrl }) o que se inyecte manualmente el token SEAT_MODULE_CONFIG si se desea otra estrategia.
  • El servicio usa HttpClient internamente; asegúrate de importar HttpClientModule en el contexto de la aplicación si no usas bootstrapApplication con providers.

Publicación

  1. Construir la librería: ng build seat-repository.
  2. Publicar desde dist/seat-repository si procede.

Ayuda y contribuciones

  • Para bugfixes o features, crea un branch, PR y añade tests que cubran cambios de comportamiento.

Si quieres, puedo añadir ejemplos adicionales (snippets para Angular modules tradicionales, pruebas de servicio con HttpClientTestingModule, o una pequeña guía de migración desde la antigua mf-common). ¿Qué prefieres que añada ahora?