Node type definitions for the Constructive blueprint system. Single source of truth for all Authz*, Data*, Relation*, View*, and Table* node types.
import { allNodeTypes, AuthzDirectOwner, DataId } from 'node-type-registry';
// Access individual node types
console.log(AuthzDirectOwner.parameter_schema);
// Get all node types as a flat array
console.log(allNodeTypes.length); // 52The package exports TypeScript types that match the JSONB shape expected by construct_blueprint(). These provide client-side autocomplete and type safety when building blueprint definitions — the GraphQL API itself accepts plain JSONB.
import type {
BlueprintDefinition,
BlueprintTable,
BlueprintNode,
BlueprintRelation,
BlueprintField,
BlueprintIndex,
} from 'node-type-registry';
const definition: BlueprintDefinition = {
tables: [
{
table_name: 'tasks',
nodes: [
'DataId',
'DataTimestamps',
'DataDirectOwner',
],
fields: [
{ name: 'title', type: 'text', is_not_null: true },
{ name: 'description', type: 'text' },
],
policies: [{ $type: 'AuthzDirectOwner' }],
},
],
relations: [
{
$type: 'RelationBelongsTo',
source_table: 'tasks',
target_table: 'projects',
delete_action: 'c',
},
],
unique_constraints: [
{
table_name: 'tasks',
columns: ['title', 'owner_id'],
},
],
};When node type definitions are added or modified, regenerate with:
cd graphql/node-type-registry && pnpm generate:typesThis produces src/blueprint-types.generated.ts from the TS node type source of truth.
Generate SQL seed scripts for node_type_registry table:
cd graphql/node-type-registry && pnpm generate:seed --pgpm ../../constructive-db/packages/metaschema