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

@c80/types

v2.18.0

Published

Contrato de tipos compartido del ecosistema barman (enums + interfaces de dominio + DTOs de WebSocket). Fuente unica de verdad para zerath-back, vulcan-arm, kyron-front, midas-front y chillbox.

Downloads

3,118

Readme

@c80/types

Contrato de tipos compartido del ecosistema barman. Lib TS pura (framework-agnostica: sin Angular, sin Nest, cero dependencias de runtime).

Es la fuente unica de verdad de los tipos que antes se duplicaban a mano en el core.types.ts de cada repo:

  • zerath-back — backend NestJS (dueno del contrato)
  • vulcan-arm — controlador del brazo
  • kyron-front — frontend de operacion
  • chillbox — frontend de cliente

Contenido (2.0.0)

Solo interface + enum + aliases:

  • Enums: Permission, RoomEvent, MovementStatus, MovementStepType, PurchaseStatus, RechargeStatus, WalletTransactionType.
  • Unions/aliases: Side, SystemMode, MessageType, RoomId, MotorCommand, DriverType, Timestamp, NullableTimestamp, QueryParams.
  • Dominio: Box, Task, Movement, Driver, Drivers, IngredientSlot, BoxIngredient, Product, Recipe, Part, User, Role, Favorite, Purchase, Rating, Recharge, Wallet, WalletTransaction, GlobalPoint, GlobalConfiguration, PriceConfiguration, MotorConfiguration, IngredientSlotConfiguration, FK.
  • WebSocket: ChatMessage, TaskStats, BoxHealthPayload, MovementStatusUpdateRequest, MovementStatusUpdateResponse.
  • Genericos / paginacion: ActionResponseDto, CreateProductResponseDto, PublicUser, LoginResponse, PaginationParams, PaginatedResponse<T>, CreateProductWithRecipeDto, CreatePartDto.
  • REST DTOs de respuesta (2.2.0): CreatePurchaseResponse, PurchaseStatusResponse, PurchaseHistoryItem, InvoicePublicDto, InvoiceAdminDto + enum InvoiceStatus, BoxStatus, RechargeConfig, AdminRecharge, AdminWallet, AdminWalletTransaction, CreatePayoutDto, SalesStatsResponse (+ SalesTotals, SalesByProductItem, SalesByBoxItem, SalesByDayItem).

Changelog 2.2.0 (minor aditivo)

Sube al contrato los DTOs REST que hasta 2.1.0 se replicaban a mano entre zerath (dueno del shape) y los fronts. TODO aditivo: no se remueve ni cambia ningun tipo existente.

  • Compra/canje (chillbox): CreatePurchaseResponse, PurchaseStatusResponse (con queuePosition/queueLength), PurchaseHistoryItem. Los dos ultimos incluyen el comprobante invoice: InvoicePublicDto | null.
  • Facturacion (ARCA, B2C): enum InvoiceStatus, InvoicePublicDto (el que ve el cliente) e InvoiceAdminDto (trazabilidad de emision para kyron).
  • Catalogo: BoxStatus (enabled/connected/queueLength + lastHealthAt/ health que consume el dashboard de kyron).
  • Recarga: RechargeConfig (config global D19).
  • Reporting admin (kyron): AdminRecharge, AdminWallet, AdminWalletTransaction, CreatePayoutDto, SalesStatsResponse + sub-items.
  • RechargeStatus.MANUAL_REVIEW: miembro nuevo (pago MP aprobado sin acreditar por usuario deshabilitado/anonimizado; requiere revision manual). Ya lo emitia zerath; el enum del contrato lo representaba de menos.
  • Timestamps de estos DTOs como Timestamp (string | Date): zerath los tipa con Date, los fronts los reciben como ISO string sobre HTTP.

Nota: el listado admin de compras (AdminPurchase) NO se subio en este corte (sigue como espejo local en kyron); InvoiceAdminDto ya viaja para que kyron consuma el estado fiscal en Ventas. Subir AdminPurchase es un aditivo futuro.

Changelog 2.0.0 (breaking)

Major unico que agrupa TODO el cambio de contrato pendiente (Fase 1 del plan).

Breaking:

  • RoomEvent: se eliminan los miembros huerfanos USER_JOINED, USER_LEFT, RECHARGE_PENDING, RECHARGE_APPROVED, RECHARGE_REJECTED (0 usos en los 4 repos). Tambien se elimina ChatMessage.rechargeData (carga de esos eventos, 0 usos).
  • Se eliminan InterpolatedMovement y Movement.interpolatedMovements (deprecados; vulcan interpola localmente y ya los ignoraba).
  • Se elimina PriceConfiguration.pointValue (deprecado; el punto es GLOBAL, ver GlobalConfiguration.pointValue).
  • Product.points pasa de string (formateado a 6 decimales) a number.

Runtime / packaging (fix de raiz):

  • Build dual CJS/ESM: la 1.0.x era ESM-only y con el barrel sin extension NO cargaba en ningun Node en runtime (ERR_MODULE_NOT_FOUND). Ahora el paquete expone exports con require (NestJS: zerath/vulcan) e import (fronts y Node ESM), y los imports internos llevan extension.

Nuevo:

  • Dosis discretas (D1-D8): Movement.dwellMs (dwell POST-llegada, aplicado UNA vez), Movement.stepType + enum MovementStepType (TRANSIT|POUR|ICE|CUP|DELIVER), IngredientSlotConfiguration.cupCapacityMl (OPCIONAL hasta que zerath lo implemente en Fase 2, zb-vaso-capacidad; default 500 en el backend), IngredientSlot.unitMlOverride (reservado), Part.unitMl. Movement.sleep queda @deprecated (semantica rota; las tasks grabadas lo usan).
  • Operacion: PurchaseStatus.QUEUED (cola de servido, D17), RoomId tipado (DEFAULT-ROOM deprecado pero valido | admin | box:{id}), RoomEvent.BOX_HEALTH + BoxHealthPayload + ChatMessage.boxHealth, RoomEvent.MOVEMENT_STATUS_UPDATE_RESPONSE (antes string literal en zerath/vulcan), limites de recarga globales opcionales en GlobalConfiguration (minRechargeAmount/maxRechargeAmount/rechargeStep, D19; los de PriceConfiguration quedan @deprecated). Recharge.box pasa a box?: Box | FK | null por la misma D19 (recarga global sin sesion de box, Fase 3); hoy zerath SIEMPRE lo envia, el opcional prepara el corte sin otro major.
  • Completitud: Purchase.pointValueUsed/soldAtArs/errorMessage, Box.maxPartsPerProduct, User.boxes, Permission.GLOBAL_CONFIGURATION_READ/UPDATE.
  • F4/F5 (definidos ahora para no cortar otro major): Box.owner, Wallet, WalletTransaction + WalletTransactionType, Permission.WALLET_READ/WALLET_PAYOUT/STATS_READ. Esquema de scoping por box DECIDIDO: Box.owner + User.boxes son el modelo completo; el guard de F4 valida pertenencia del recurso server-side, sin tipos adicionales de contrato.

Que NO vive aca

Tipos propios de un solo repo (UI de un front, Dispenser* de vulcan, payloads concretos de sensores, etc.) quedan locales en cada repo.

Uso

import { Box, Movement, RoomEvent } from '@c80/types';

Build dual CJS/ESM

scripts/build-types.js compila el mismo fuente dos veces:

  • dist/libs/types/esm/ — ESM (con stub {"type":"module"}); condicion import.
  • dist/libs/types/cjs/ — CommonJS (el package.json raiz no declara type); condicion require y main (consumidores NestJS).

El package.json de esta carpeta es el PUBLICABLE (se copia tal cual al dist). Regla: los imports internos del fuente llevan extension .js (sin ella la resolucion ESM de Node revienta en runtime aunque el gate compile).

Build / publish (desde la raiz del workspace)

pnpm build:types          # arma dist/libs/types (esm + cjs)
pnpm publish:types        # gate + bump + build + publish (ver README raiz para minor/major)

Antes de publicar, validar el runtime del dist: require('@c80/types') e import('@c80/types') deben cargar y exponer los enums (el gate NO lo detecta; probar con el dist montado en un node_modules suelto).