Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
98 changes: 84 additions & 14 deletions packages/node-type-registry/src/blueprint-types.generated.ts

Large diffs are not rendered by default.

25 changes: 24 additions & 1 deletion packages/node-type-registry/src/event/referral.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,30 @@ export const EventReferral: NodeTypeDefinition = {
entity_field: {
type: 'string',
format: 'column-ref',
description: 'Column containing the entity ID (org/group) for entity-scoped referral events. Omit for user-only events.'
description: 'Column containing the entity ID (org/group) for entity-scoped referral events. For FK lookups (e.g., channel_id → channels.entity_id), combine with entity_lookup. Omit for user-only events.'
},
entity_lookup: {
type: 'object',
description:
'FK lookup configuration for resolving entity_id through a related table. Used when entity_field is a FK (e.g., channel_id) rather than a direct entity_id. The generator validates all fields against metaschema within the same database_id.',
properties: {
obj_table: {
type: 'string',
description:
'Name of the related table to look up entity_id from (e.g., "channels"). Required.',
},
obj_schema: {
type: 'string',
description:
'Schema of the related table (user-facing name, e.g., "public"). Optional — if omitted, resolved by table name within the same database_id (raises error if ambiguous).',
},
obj_field: {
type: 'string',
description:
'Column on the related table that holds the entity_id (e.g., "entity_id"). Required.',
},
},
required: ['obj_table', 'obj_field'],
},
max_depth: {
type: 'integer',
Expand Down
25 changes: 24 additions & 1 deletion packages/node-type-registry/src/event/tracker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,30 @@ export const EventTracker: NodeTypeDefinition = {
entity_field: {
type: 'string',
format: 'column-ref',
description: 'Column containing the entity ID (org/group) for entity-scoped events. Omit for user-only events.'
description: 'Column containing the entity ID (org/group) for entity-scoped events. For FK lookups (e.g., channel_id → channels.entity_id), combine with entity_lookup. Omit for user-only events.'
},
entity_lookup: {
type: 'object',
description:
'FK lookup configuration for resolving entity_id through a related table. Used when entity_field is a FK (e.g., channel_id) rather than a direct entity_id. The generator validates all fields against metaschema within the same database_id.',
properties: {
obj_table: {
type: 'string',
description:
'Name of the related table to look up entity_id from (e.g., "channels"). Required.',
},
obj_schema: {
type: 'string',
description:
'Schema of the related table (user-facing name, e.g., "public"). Optional — if omitted, resolved by table name within the same database_id (raises error if ambiguous).',
},
obj_field: {
type: 'string',
description:
'Column on the related table that holds the entity_id (e.g., "entity_id"). Required.',
},
},
required: ['obj_table', 'obj_field'],
},
auto_register_type: {
type: 'boolean',
Expand Down
31 changes: 30 additions & 1 deletion packages/node-type-registry/src/limit/enforce-aggregate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,42 @@ export const LimitEnforceAggregate: NodeTypeDefinition = {
description:
'Name of the aggregate limit to track (must match a default_limits entry, e.g. "databases", "members")',
},
scope: {
type: 'string',
description:
'Membership type prefix that determines which limits_module row to use. Resolved dynamically via memberships_module — supports any provisioned type (e.g. "org", "data_room", "channel", "team").',
default: 'org',
},
entity_field: {
type: 'string',
format: 'column-ref',
description:
'Column on the target table that holds the entity id for aggregate limit lookup',
'Column on the target table that holds (or references) the entity id for aggregate limit lookup. For direct entity_id columns, just set this field. For FK lookups (e.g., channel_id → channels.entity_id), combine with entity_lookup.',
default: 'entity_id',
},
entity_lookup: {
type: 'object',
description:
'FK lookup configuration for resolving entity_id through a related table. Used when entity_field is a FK (e.g., channel_id) rather than a direct entity_id. The generator validates all fields against metaschema within the same database_id.',
properties: {
obj_table: {
type: 'string',
description:
'Name of the related table to look up entity_id from (e.g., "channels"). Required.',
},
obj_schema: {
type: 'string',
description:
'Schema of the related table (user-facing name, e.g., "public"). Optional — if omitted, resolved by table name within the same database_id (raises error if ambiguous).',
},
obj_field: {
type: 'string',
description:
'Column on the related table that holds the entity_id (e.g., "entity_id"). Required.',
},
},
required: ['obj_table', 'obj_field'],
},
events: {
type: 'array',
items: {
Expand Down
32 changes: 30 additions & 2 deletions packages/node-type-registry/src/limit/enforce-counter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,8 @@ export const LimitEnforceCounter: NodeTypeDefinition = {
},
scope: {
type: 'string',
enum: ['app', 'org'],
description:
'Limit scope: "app" (membership_type=1, user-level) or "org" (membership_type=2, entity-level)',
'Membership type prefix that determines which limits_module row to use. Resolved dynamically via memberships_module — supports any provisioned type (e.g. "app", "org", "data_room", "channel", "team").',
default: 'app',
},
actor_field: {
Expand All @@ -29,6 +28,35 @@ export const LimitEnforceCounter: NodeTypeDefinition = {
'Column on the target table that holds the actor or entity id used for limit lookup',
default: 'owner_id',
},
entity_field: {
type: 'string',
format: 'column-ref',
description:
'Column on the target table that holds (or references) the entity id for entity context resolution. For direct entity_id columns, just set this field. For FK lookups (e.g., channel_id → channels.entity_id), combine with entity_lookup.',
},
entity_lookup: {
type: 'object',
description:
'FK lookup configuration for resolving entity_id through a related table. Used when entity_field is a FK (e.g., channel_id) rather than a direct entity_id. The generator validates all fields against metaschema within the same database_id.',
properties: {
obj_table: {
type: 'string',
description:
'Name of the related table to look up entity_id from (e.g., "channels"). Required.',
},
obj_schema: {
type: 'string',
description:
'Schema of the related table (user-facing name, e.g., "public"). Optional — if omitted, resolved by table name within the same database_id (raises error if ambiguous).',
},
obj_field: {
type: 'string',
description:
'Column on the related table that holds the entity_id (e.g., "entity_id"). Required.',
},
},
required: ['obj_table', 'obj_field'],
},
events: {
type: 'array',
items: {
Expand Down
28 changes: 25 additions & 3 deletions packages/node-type-registry/src/limit/enforce-feature.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,40 @@ export const LimitEnforceFeature: NodeTypeDefinition = {
},
scope: {
type: 'string',
enum: ['app', 'org'],
description:
'Feature scope: "app" (membership_type=1, app-level caps) or "org" (membership_type=2, per-entity caps)',
'Membership type prefix that determines which limits_module row to use. Resolved dynamically via memberships_module — supports any provisioned type (e.g. "app", "org", "data_room", "channel", "team").',
default: 'app',
},
entity_field: {
type: 'string',
format: 'column-ref',
description:
'Column on the target table that holds the entity id for per-entity cap lookups (only used for org scope)',
'Column on the target table that holds (or references) the entity id for per-entity cap lookups (only used for org scope). For FK lookups (e.g., channel_id → channels.entity_id), combine with entity_lookup.',
default: 'entity_id',
},
entity_lookup: {
type: 'object',
description:
'FK lookup configuration for resolving entity_id through a related table. Used when entity_field is a FK (e.g., channel_id) rather than a direct entity_id. The generator validates all fields against metaschema within the same database_id.',
properties: {
obj_table: {
type: 'string',
description:
'Name of the related table to look up entity_id from (e.g., "channels"). Required.',
},
obj_schema: {
type: 'string',
description:
'Schema of the related table (user-facing name, e.g., "public"). Optional — if omitted, resolved by table name within the same database_id (raises error if ambiguous).',
},
obj_field: {
type: 'string',
description:
'Column on the related table that holds the entity_id (e.g., "entity_id"). Required.',
},
},
required: ['obj_table', 'obj_field'],
},
},
required: ['feature_name'],
},
Expand Down
25 changes: 24 additions & 1 deletion packages/node-type-registry/src/limit/enforce-rate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,32 @@ export const LimitEnforceRate: NodeTypeDefinition = {
type: 'string',
format: 'column-ref',
description:
'Column on the target table that holds the entity id (org) for rate limiting',
'Column on the target table that holds (or references) the entity id for rate limiting. For direct entity_id columns, just set this field. For FK lookups (e.g., channel_id → channels.entity_id), combine with entity_lookup.',
default: 'entity_id',
},
entity_lookup: {
type: 'object',
description:
'FK lookup configuration for resolving entity_id through a related table. Used when entity_field is a FK (e.g., channel_id) rather than a direct entity_id. The generator validates all fields against metaschema within the same database_id.',
properties: {
obj_table: {
type: 'string',
description:
'Name of the related table to look up entity_id from (e.g., "channels"). Required.',
},
obj_schema: {
type: 'string',
description:
'Schema of the related table (user-facing name, e.g., "public"). Optional — if omitted, resolved by table name within the same database_id (raises error if ambiguous).',
},
obj_field: {
type: 'string',
description:
'Column on the related table that holds the entity_id (e.g., "entity_id"). Required.',
},
},
required: ['obj_table', 'obj_field'],
},
actor_field: {
type: 'string',
format: 'column-ref',
Expand Down
25 changes: 24 additions & 1 deletion packages/node-type-registry/src/limit/track-usage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,32 @@ export const LimitTrackUsage: NodeTypeDefinition = {
type: 'string',
format: 'column-ref',
description:
'Column on the target table that holds the entity id for billing',
'Column on the target table that holds (or references) the entity id for billing. For direct entity_id columns, just set this field. For FK lookups (e.g., channel_id → channels.entity_id), combine with entity_lookup.',
default: 'entity_id',
},
entity_lookup: {
type: 'object',
description:
'FK lookup configuration for resolving entity_id through a related table. Used when entity_field is a FK (e.g., channel_id) rather than a direct entity_id. The generator validates all fields against metaschema within the same database_id.',
properties: {
obj_table: {
type: 'string',
description:
'Name of the related table to look up entity_id from (e.g., "channels"). Required.',
},
obj_schema: {
type: 'string',
description:
'Schema of the related table (user-facing name, e.g., "public"). Optional — if omitted, resolved by table name within the same database_id (raises error if ambiguous).',
},
obj_field: {
type: 'string',
description:
'Column on the related table that holds the entity_id (e.g., "entity_id"). Required.',
},
},
required: ['obj_table', 'obj_field'],
},
quantity: {
type: 'integer',
description: 'Units to record per event (default 1)',
Expand Down
31 changes: 30 additions & 1 deletion packages/node-type-registry/src/limit/warning-aggregate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,42 @@ export const LimitWarningAggregate: NodeTypeDefinition = {
description:
'Name of the aggregate limit to watch (must match a limit_warnings.name entry, e.g. "databases", "members")',
},
scope: {
type: 'string',
description:
'Membership type prefix that determines which limits_module row to use. Resolved dynamically via memberships_module — supports any provisioned type (e.g. "org", "data_room", "channel", "team").',
default: 'org',
},
entity_field: {
type: 'string',
format: 'column-ref',
description:
'Column on the target table that holds the entity id for aggregate limit lookup',
'Column on the target table that holds (or references) the entity id for aggregate limit lookup. For direct entity_id columns, just set this field. For FK lookups (e.g., channel_id → channels.entity_id), combine with entity_lookup.',
default: 'entity_id',
},
entity_lookup: {
type: 'object',
description:
'FK lookup configuration for resolving entity_id through a related table. Used when entity_field is a FK (e.g., channel_id) rather than a direct entity_id. The generator validates all fields against metaschema within the same database_id.',
properties: {
obj_table: {
type: 'string',
description:
'Name of the related table to look up entity_id from (e.g., "channels"). Required.',
},
obj_schema: {
type: 'string',
description:
'Schema of the related table (user-facing name, e.g., "public"). Optional — if omitted, resolved by table name within the same database_id (raises error if ambiguous).',
},
obj_field: {
type: 'string',
description:
'Column on the related table that holds the entity_id (e.g., "entity_id"). Required.',
},
},
required: ['obj_table', 'obj_field'],
},
},
required: ['limit_name'],
},
Expand Down
32 changes: 30 additions & 2 deletions packages/node-type-registry/src/limit/warning-counter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,8 @@ export const LimitWarningCounter: NodeTypeDefinition = {
},
scope: {
type: 'string',
enum: ['app', 'org'],
description:
'Limit scope: "app" (membership_type=1, user-level) or "org" (membership_type=2, entity-level)',
'Membership type prefix that determines which limits_module row to use. Resolved dynamically via memberships_module — supports any provisioned type (e.g. "app", "org", "data_room", "channel", "team").',
default: 'app',
},
actor_field: {
Expand All @@ -29,6 +28,35 @@ export const LimitWarningCounter: NodeTypeDefinition = {
'Column on the target table that holds the actor id for limit lookup',
default: 'owner_id',
},
entity_field: {
type: 'string',
format: 'column-ref',
description:
'Column on the target table that holds (or references) the entity id. When provided, entity_id is included in the job payload and dedup state. For FK lookups (e.g., channel_id → channels.entity_id), combine with entity_lookup.',
},
entity_lookup: {
type: 'object',
description:
'FK lookup configuration for resolving entity_id through a related table. Used when entity_field is a FK (e.g., channel_id) rather than a direct entity_id. The generator validates all fields against metaschema within the same database_id.',
properties: {
obj_table: {
type: 'string',
description:
'Name of the related table to look up entity_id from (e.g., "channels"). Required.',
},
obj_schema: {
type: 'string',
description:
'Schema of the related table (user-facing name, e.g., "public"). Optional — if omitted, resolved by table name within the same database_id (raises error if ambiguous).',
},
obj_field: {
type: 'string',
description:
'Column on the related table that holds the entity_id (e.g., "entity_id"). Required.',
},
},
required: ['obj_table', 'obj_field'],
},
},
required: ['limit_name'],
},
Expand Down
Loading
Loading