Skip to content

Commit e0ce86a

Browse files
committed
feat(node-type-registry): complete column-ref annotations for all column-creating types
- DataPublishable: add is_published_field, published_at_field - DataTimestamps: add created_at_field, updated_at_field - DataPeoplestamps: add created_by_field, updated_by_field - DataSoftDelete: add deleted_at_field, is_deleted_field - DataOwnershipInEntity: add owner_field_name, entity_field_name - DataJobTrigger: add column-ref to payload_custom additionalProperties - DataImageEmbedding: add column-ref to payload_custom additionalProperties - ViewAggregated: add column-ref to aggregates[].alias - Regenerate blueprint-types.generated.ts
1 parent 66f9e77 commit e0ce86a

9 files changed

Lines changed: 85 additions & 2 deletions

packages/node-type-registry/src/blueprint-types.generated.ts

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,20 +183,32 @@ export interface DataOwnedFieldsParams {
183183
}
184184
/** Combines direct ownership with entity scoping. Adds both owner_id and entity_id columns. Enables AuthzDirectOwner, AuthzEntityMembership, and AuthzOrgHierarchy authorization. Particularly useful for OrgHierarchy where a user owns a row (owner_id) within an entity (entity_id), and managers above can see subordinate-owned records via the hierarchy closure table. */
185185
export interface DataOwnershipInEntityParams {
186+
/* Column name for the owner reference */
187+
owner_field_name?: string;
188+
/* Column name for the entity reference */
189+
entity_field_name?: string;
186190
/* If true, also adds a UUID primary key column with auto-generation */
187191
include_id?: boolean;
188192
/* If true, adds foreign key constraints from owner_id and entity_id to the users table */
189193
include_user_fk?: boolean;
190194
}
191195
/** Adds user tracking for creates/updates with created_by and updated_by columns. */
192196
export interface DataPeoplestampsParams {
197+
/* Column name for the creating user reference */
198+
created_by_field?: string;
199+
/* Column name for the last-updating user reference */
200+
updated_by_field?: string;
193201
/* If true, also adds a UUID primary key column with auto-generation */
194202
include_id?: boolean;
195203
/* If true, adds foreign key constraints from created_by and updated_by to the users table */
196204
include_user_fk?: boolean;
197205
}
198206
/** Adds publish state columns (is_published, published_at) for content visibility. Enables AuthzPublishable and AuthzTemporal authorization. */
199207
export interface DataPublishableParams {
208+
/* Column name for the published boolean flag */
209+
is_published_field?: string;
210+
/* Column name for the publish timestamp */
211+
published_at_field?: string;
200212
/* If true, also adds a UUID primary key column with auto-generation */
201213
include_id?: boolean;
202214
}
@@ -209,6 +221,10 @@ export interface DataSlugParams {
209221
}
210222
/** Adds soft delete support with deleted_at and is_deleted columns. */
211223
export interface DataSoftDeleteParams {
224+
/* Column name for the soft-delete timestamp */
225+
deleted_at_field?: string;
226+
/* Column name for the soft-delete boolean flag */
227+
is_deleted_field?: string;
212228
/* If true, also adds a UUID primary key column with auto-generation */
213229
include_id?: boolean;
214230
}
@@ -236,6 +252,10 @@ export interface DataTagsParams {
236252
}
237253
/** Adds automatic timestamp tracking with created_at and updated_at columns. */
238254
export interface DataTimestampsParams {
255+
/* Column name for the creation timestamp */
256+
created_at_field?: string;
257+
/* Column name for the last-updated timestamp */
258+
updated_at_field?: string;
239259
/* If true, also adds a UUID primary key column with auto-generation */
240260
include_id?: boolean;
241261
}

packages/node-type-registry/src/data/data-image-embedding.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,8 @@ export const DataImageEmbedding: NodeTypeDefinition = {
7171
payload_custom: {
7272
type: 'object',
7373
additionalProperties: {
74-
type: 'string'
74+
type: 'string',
75+
format: 'column-ref'
7576
},
7677
description: 'Custom payload key-to-column mapping for the job trigger',
7778
default: {

packages/node-type-registry/src/data/data-job-trigger.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,8 @@ export const DataJobTrigger: NodeTypeDefinition = {
6464
payload_custom: {
6565
type: 'object',
6666
additionalProperties: {
67-
type: 'string'
67+
type: 'string',
68+
format: 'column-ref'
6869
},
6970
description: 'Key-to-column mapping for custom payload (e.g., {"invoice_id": "id", "total": "amount"})'
7071
},

packages/node-type-registry/src/data/data-ownership-in-entity.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,18 @@ export const DataOwnershipInEntity: NodeTypeDefinition = {
99
parameter_schema: {
1010
type: 'object',
1111
properties: {
12+
owner_field_name: {
13+
type: 'string',
14+
format: 'column-ref',
15+
description: 'Column name for the owner reference',
16+
default: 'owner_id'
17+
},
18+
entity_field_name: {
19+
type: 'string',
20+
format: 'column-ref',
21+
description: 'Column name for the entity reference',
22+
default: 'entity_id'
23+
},
1224
include_id: {
1325
type: 'boolean',
1426
description: 'If true, also adds a UUID primary key column with auto-generation',

packages/node-type-registry/src/data/data-peoplestamps.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,18 @@ export const DataPeoplestamps: NodeTypeDefinition = {
99
parameter_schema: {
1010
type: 'object',
1111
properties: {
12+
created_by_field: {
13+
type: 'string',
14+
format: 'column-ref',
15+
description: 'Column name for the creating user reference',
16+
default: 'created_by'
17+
},
18+
updated_by_field: {
19+
type: 'string',
20+
format: 'column-ref',
21+
description: 'Column name for the last-updating user reference',
22+
default: 'updated_by'
23+
},
1224
include_id: {
1325
type: 'boolean',
1426
description: 'If true, also adds a UUID primary key column with auto-generation',

packages/node-type-registry/src/data/data-publishable.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,18 @@ export const DataPublishable: NodeTypeDefinition = {
99
parameter_schema: {
1010
type: 'object',
1111
properties: {
12+
is_published_field: {
13+
type: 'string',
14+
format: 'column-ref',
15+
description: 'Column name for the published boolean flag',
16+
default: 'is_published'
17+
},
18+
published_at_field: {
19+
type: 'string',
20+
format: 'column-ref',
21+
description: 'Column name for the publish timestamp',
22+
default: 'published_at'
23+
},
1224
include_id: {
1325
type: 'boolean',
1426
description: 'If true, also adds a UUID primary key column with auto-generation',

packages/node-type-registry/src/data/data-soft-delete.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,18 @@ export const DataSoftDelete: NodeTypeDefinition = {
99
parameter_schema: {
1010
type: 'object',
1111
properties: {
12+
deleted_at_field: {
13+
type: 'string',
14+
format: 'column-ref',
15+
description: 'Column name for the soft-delete timestamp',
16+
default: 'deleted_at'
17+
},
18+
is_deleted_field: {
19+
type: 'string',
20+
format: 'column-ref',
21+
description: 'Column name for the soft-delete boolean flag',
22+
default: 'is_deleted'
23+
},
1224
include_id: {
1325
type: 'boolean',
1426
description: 'If true, also adds a UUID primary key column with auto-generation',

packages/node-type-registry/src/data/data-timestamps.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,18 @@ export const DataTimestamps: NodeTypeDefinition = {
99
parameter_schema: {
1010
type: 'object',
1111
properties: {
12+
created_at_field: {
13+
type: 'string',
14+
format: 'column-ref',
15+
description: 'Column name for the creation timestamp',
16+
default: 'created_at'
17+
},
18+
updated_at_field: {
19+
type: 'string',
20+
format: 'column-ref',
21+
description: 'Column name for the last-updated timestamp',
22+
default: 'updated_at'
23+
},
1224
include_id: {
1325
type: 'boolean',
1426
description: 'If true, also adds a UUID primary key column with auto-generation',

packages/node-type-registry/src/view/view-aggregated.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ export const ViewAggregated: NodeTypeDefinition = {
4444
},
4545
alias: {
4646
type: 'string',
47+
format: 'column-ref',
4748
description: 'Output column name'
4849
}
4950
},

0 commit comments

Comments
 (0)