Skip to content

Commit 6d585ff

Browse files
authored
Merge pull request #1048 from constructive-io/feat/complete-column-ref-annotations
feat(node-type-registry): complete column-ref annotations for all column-creating types
2 parents 02cfccd + e0ce86a commit 6d585ff

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
@@ -177,20 +177,32 @@ export interface DataOwnedFieldsParams {
177177
}
178178
/** 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. */
179179
export interface DataOwnershipInEntityParams {
180+
/* Column name for the owner reference */
181+
owner_field_name?: string;
182+
/* Column name for the entity reference */
183+
entity_field_name?: string;
180184
/* If true, also adds a UUID primary key column with auto-generation */
181185
include_id?: boolean;
182186
/* If true, adds foreign key constraints from owner_id and entity_id to the users table */
183187
include_user_fk?: boolean;
184188
}
185189
/** Adds user tracking for creates/updates with created_by and updated_by columns. */
186190
export interface DataPeoplestampsParams {
191+
/* Column name for the creating user reference */
192+
created_by_field?: string;
193+
/* Column name for the last-updating user reference */
194+
updated_by_field?: string;
187195
/* If true, also adds a UUID primary key column with auto-generation */
188196
include_id?: boolean;
189197
/* If true, adds foreign key constraints from created_by and updated_by to the users table */
190198
include_user_fk?: boolean;
191199
}
192200
/** Adds publish state columns (is_published, published_at) for content visibility. Enables AuthzPublishable and AuthzTemporal authorization. */
193201
export interface DataPublishableParams {
202+
/* Column name for the published boolean flag */
203+
is_published_field?: string;
204+
/* Column name for the publish timestamp */
205+
published_at_field?: string;
194206
/* If true, also adds a UUID primary key column with auto-generation */
195207
include_id?: boolean;
196208
}
@@ -203,6 +215,10 @@ export interface DataSlugParams {
203215
}
204216
/** Adds soft delete support with deleted_at and is_deleted columns. */
205217
export interface DataSoftDeleteParams {
218+
/* Column name for the soft-delete timestamp */
219+
deleted_at_field?: string;
220+
/* Column name for the soft-delete boolean flag */
221+
is_deleted_field?: string;
206222
/* If true, also adds a UUID primary key column with auto-generation */
207223
include_id?: boolean;
208224
}
@@ -230,6 +246,10 @@ export interface DataTagsParams {
230246
}
231247
/** Adds automatic timestamp tracking with created_at and updated_at columns. */
232248
export interface DataTimestampsParams {
249+
/* Column name for the creation timestamp */
250+
created_at_field?: string;
251+
/* Column name for the last-updated timestamp */
252+
updated_at_field?: string;
233253
/* If true, also adds a UUID primary key column with auto-generation */
234254
include_id?: boolean;
235255
}

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,8 @@ export const DataImageEmbedding: NodeTypeDefinition = {
5555
payload_custom: {
5656
type: 'object',
5757
additionalProperties: {
58-
type: 'string'
58+
type: 'string',
59+
format: 'column-ref'
5960
},
6061
description: 'Custom payload key-to-column mapping for the job trigger',
6162
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)