@htilabs/platform-common-models 0.2.0-beta.4 → 0.3.0-beta.5
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/README.md +38 -0
- package/dist/constants/index.cjs +0 -843
- package/dist/constants/index.cjs.map +1 -1
- package/dist/constants/index.d.cts +146 -5
- package/dist/constants/index.d.ts +146 -5
- package/dist/constants/index.js +0 -786
- package/dist/constants/index.js.map +1 -1
- package/dist/{platform-role-AHv1l5Og.d.cts → cvcEntry-wqktWfzE.d.cts} +231 -37
- package/dist/{platform-role-AHv1l5Og.d.ts → cvcEntry-wqktWfzE.d.ts} +231 -37
- package/dist/cvcs/index.cjs +2184 -0
- package/dist/cvcs/index.cjs.map +1 -0
- package/dist/cvcs/index.d.cts +2384 -0
- package/dist/cvcs/index.d.ts +2384 -0
- package/dist/cvcs/index.js +2154 -0
- package/dist/cvcs/index.js.map +1 -0
- package/dist/index--NCIPluF.d.cts +378 -0
- package/dist/index-CFOrHA8l.d.ts +378 -0
- package/dist/index.cjs +2962 -843
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +217 -3
- package/dist/index.d.ts +217 -3
- package/dist/index.js +2934 -786
- package/dist/index.js.map +1 -1
- package/dist/models/index.cjs +211 -0
- package/dist/models/index.cjs.map +1 -1
- package/dist/models/index.d.cts +3 -292
- package/dist/models/index.d.ts +3 -292
- package/dist/models/index.js +209 -0
- package/dist/models/index.js.map +1 -1
- package/dist/{platform-auth-BTbQIY3b.d.cts → platform-auth-C-G2qeGM.d.cts} +1 -297
- package/dist/{platform-auth-BTbQIY3b.d.ts → platform-auth-C-G2qeGM.d.ts} +1 -297
- package/dist/schemas/index.cjs +195 -729
- package/dist/schemas/index.cjs.map +1 -1
- package/dist/schemas/index.d.cts +11 -11
- package/dist/schemas/index.d.ts +11 -11
- package/dist/schemas/index.js +189 -729
- package/dist/schemas/index.js.map +1 -1
- package/dist/services/index.cjs +1442 -0
- package/dist/services/index.cjs.map +1 -0
- package/dist/services/index.d.cts +305 -0
- package/dist/services/index.d.ts +305 -0
- package/dist/services/index.js +1417 -0
- package/dist/services/index.js.map +1 -0
- package/dist/types/index.d.cts +2 -2
- package/dist/types/index.d.ts +2 -2
- package/dist/validation/index.cjs +261 -0
- package/dist/validation/index.cjs.map +1 -0
- package/dist/validation/index.d.cts +251 -0
- package/dist/validation/index.d.ts +251 -0
- package/dist/validation/index.js +228 -0
- package/dist/validation/index.js.map +1 -0
- package/package.json +36 -12
- package/src/__tests__/__snapshots__/cvc-sot.snap +22 -0
- package/src/__tests__/cvc-sot-snapshot.test.ts +184 -0
- package/src/__tests__/cvc-structural.test.ts +130 -0
- package/src/constants/ic.ts +0 -925
- package/src/constants/service-catalog.ts +146 -4
- package/src/cvcs/index.ts +31 -0
- package/src/cvcs/missingness.v1.0.0.json +50 -0
- package/src/cvcs/serviceCategories.v1.0.0.json +1947 -0
- package/src/cvcs/serviceMechanisms.v1.0.0.json +47 -0
- package/src/cvcs/serviceStates.v1.0.0.json +106 -0
- package/src/generated/cvc-enums.ts +215 -0
- package/src/index.ts +61 -1
- package/src/models/cvcEntryModel.ts +32 -0
- package/src/models/cvcRegistryModel.ts +35 -0
- package/src/models/index.ts +8 -0
- package/src/schemas/cvcEntry.ts +158 -0
- package/src/schemas/cvcRegistry.ts +149 -0
- package/src/schemas/index.ts +16 -0
- package/src/services/__tests__/cvcRegistryService.test.ts +614 -0
- package/src/services/cvcRegistryService.ts +729 -0
- package/src/services/index.ts +21 -0
- package/src/validation/cvc.ts +414 -0
- package/src/validation/index.ts +15 -0
package/README.md
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# @htilabs/platform-common-models
|
|
2
|
+
|
|
3
|
+
Shared data models, schemas, services, and controlled-vocabulary (CVC) data
|
|
4
|
+
layer for HTI Labs applications (PAVE, LEADS, Thread).
|
|
5
|
+
|
|
6
|
+
This package provides:
|
|
7
|
+
|
|
8
|
+
- Mongoose schemas and model factories (`src/schemas`, `src/models`)
|
|
9
|
+
- Zod validation schemas (`src/validation`)
|
|
10
|
+
- Shared domain enums and constants (`src/constants`, `src/enums`)
|
|
11
|
+
- The generalized CVC data layer (`src/services/cvcRegistryService.ts`) and
|
|
12
|
+
the locked Source-of-Truth catalogs under `src/cvcs/`
|
|
13
|
+
- Generated CVC key enums under `src/generated/`
|
|
14
|
+
|
|
15
|
+
Package exports are organized into a public root API and a small number of
|
|
16
|
+
dedicated subpaths (`/validation`, `/cvcs`) — consult `package.json` for the
|
|
17
|
+
authoritative `exports` map.
|
|
18
|
+
|
|
19
|
+
## Service Catalog: Deprecation Notice
|
|
20
|
+
|
|
21
|
+
The hardcoded `IC_48_*` constants and helpers in
|
|
22
|
+
`src/constants/service-catalog.ts` are **deprecated as of version 0.3.0**.
|
|
23
|
+
|
|
24
|
+
Use the generalized CVC data layer (`CvcRegistryService`) from
|
|
25
|
+
`@htilabs/platform-common-models` instead. The new API loads catalog data
|
|
26
|
+
from MongoDB at runtime rather than a hardcoded JSON bundle, and supports
|
|
27
|
+
multiple CVC domains beyond IC-48 service categories.
|
|
28
|
+
|
|
29
|
+
See `src/services/cvcRegistryService.ts` and the locked CVC Implementation
|
|
30
|
+
Spec at `/gt/docs/data/cvcs/` for the new API and migration guidance. The
|
|
31
|
+
file-level JSDoc at the top of `src/constants/service-catalog.ts` contains a
|
|
32
|
+
symbol-by-symbol migration table.
|
|
33
|
+
|
|
34
|
+
Removal of the legacy constants is intentionally deferred: it is tracked in a
|
|
35
|
+
downstream consumer-migration epic and will land in a future major version
|
|
36
|
+
only after Thread and PAVE have cut over to `CvcRegistryService`. Until then,
|
|
37
|
+
the legacy constants continue to ship alongside the new API — importing them
|
|
38
|
+
is safe but will surface a TypeScript `@deprecated` hint.
|