npm.io
0.0.5 • Published 2d ago

@x-ecosystem/core

Licence
Version
0.0.5
Deps
3
Size
81 kB
Vulns
0
Weekly
0

@x-ecosystem/core

Shared types, Mongoose schemas, and proto definitions for the x-ecosystem.

Codifies the conventions in:

  • docs/STANDARDS-MONGODB.md
  • docs/STANDARDS-REST-API.md
  • docs/STANDARDS-GRPC-API.md

Planned layout

src/
  enums/            # RecordState, Currency, JobStatus
  interfaces/       # IRecord, IXRN, IMoney, IXError, IPage, IJob
  schemas/          # Mongoose embedded schemas: Record, XRN, Money
protos/             # Shared gRPC proto messages (XRN, Job, XError, ...)

Build

npm install
npm run build

Usage

import { RecordSchema, XRNSchema, MoneySchema } from '@x-ecosystem/core';

mongoose and @nestjs/mongoose are optional peer dependencies — install them in consuming services when you use the Mongoose schemas.

Status

Initial scaffold. Contents will be migrated from the standards docs.