| Crates.io | cf-types-registry |
| lib.rs | cf-types-registry |
| version | 0.1.0 |
| created_at | 2026-01-25 20:09:14.809801+00 |
| updated_at | 2026-01-25 20:09:14.809801+00 |
| description | Types Registry module: GTS entity registration, storage, and REST API |
| homepage | |
| repository | |
| max_upload_size | |
| id | 2069433 |
| size | 297,023 |
GTS entity registration, storage, validation, and REST API endpoints for HyperSpot.
The types-registry module provides:
gts-rust for Phase 1.1hub.get::<dyn TypesRegistryClient>()?use types_registry_sdk::TypesRegistryClient;
// Get the client from ClientHub
let client = hub.get::<dyn TypesRegistryClient>()?;
// Register entities
let results = client.register(&ctx, entities).await?;
// List entities with filtering
let query = ListQuery::default().with_vendor("acme");
let entities = client.list(&ctx, query).await?;
// Get a single entity
let entity = client.get(&ctx, "gts.acme.core.events.user_created.v1~").await?;
# Register entities
POST /types-registry/v1/entities
Content-Type: application/json
{
"entities": [
{
"$id": "gts://gts.acme.core.events.user_created.v1~",
"type": "object",
"properties": { "userId": { "type": "string" } }
}
]
}
# List entities
GET /types-registry/v1/entities?vendor=acme&kind=type
# Get entity by ID
GET /types-registry/v1/entities/gts.acme.core.events.user_created.v1~
types_registry:
entity_id_fields:
- "$id"
- "gtsId"
- "id"
schema_id_fields:
- "$schema"
- "gtsTid"
- "type"
The types-registry module automatically registers core GTS types during initialization. These are framework-level types that other modules depend on:
| GTS ID | Description |
|---|---|
gts.x.core.modkit.plugin.v1~ |
Base plugin schema for all plugin systems |
This ensures that when modules register their derived schemas (e.g., plugin-specific types), the base types are already available for validation.
switch_to_production() to validate all entities and move to persistent storage// During module initialization (configuration phase)
registry.register(&ctx, entities).await?;
// When ready for production
module.switch_to_production()?;
cargo test -p types-registry