node-type-registry 0.8.0 → 0.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -363,7 +363,7 @@ export interface RelationHasManyParams {
363
363
  delete_action: "c" | "r" | "n" | "d" | "a";
364
364
  is_required?: boolean;
365
365
  }
366
- /** Creates a junction table between source and target tables with auto-derived naming and FK fields. The trigger creates a bare table (no implicit DataId or any node_type), adds FK fields to both tables, optionally creates a composite PK (use_composite_key), then forwards all security config to secure_table_provision as-is. The trigger never injects values the caller did not provide. Junction table FKs always CASCADE on delete. */
366
+ /** Creates a junction table between source and target tables with auto-derived naming and FK fields. The trigger creates a bare table (no implicit DataId), adds FK fields to both tables, optionally creates a composite PK (use_composite_key), then forwards all security config to secure_table_provision as-is. The trigger never injects values the caller did not provide. Junction table FKs always CASCADE on delete. */
367
367
  export interface RelationManyToManyParams {
368
368
  source_table_id: string;
369
369
  target_table_id: string;
@@ -372,10 +372,9 @@ export interface RelationManyToManyParams {
372
372
  source_field_name?: string;
373
373
  target_field_name?: string;
374
374
  use_composite_key?: boolean;
375
- node_type?: string;
376
- node_data?: {
375
+ nodes?: {
377
376
  [key: string]: unknown;
378
- };
377
+ }[];
379
378
  grant_roles?: string[];
380
379
  grant_privileges?: string[][];
381
380
  policy_type?: string;
@@ -363,7 +363,7 @@ export interface RelationHasManyParams {
363
363
  delete_action: "c" | "r" | "n" | "d" | "a";
364
364
  is_required?: boolean;
365
365
  }
366
- /** Creates a junction table between source and target tables with auto-derived naming and FK fields. The trigger creates a bare table (no implicit DataId or any node_type), adds FK fields to both tables, optionally creates a composite PK (use_composite_key), then forwards all security config to secure_table_provision as-is. The trigger never injects values the caller did not provide. Junction table FKs always CASCADE on delete. */
366
+ /** Creates a junction table between source and target tables with auto-derived naming and FK fields. The trigger creates a bare table (no implicit DataId), adds FK fields to both tables, optionally creates a composite PK (use_composite_key), then forwards all security config to secure_table_provision as-is. The trigger never injects values the caller did not provide. Junction table FKs always CASCADE on delete. */
367
367
  export interface RelationManyToManyParams {
368
368
  source_table_id: string;
369
369
  target_table_id: string;
@@ -372,10 +372,9 @@ export interface RelationManyToManyParams {
372
372
  source_field_name?: string;
373
373
  target_field_name?: string;
374
374
  use_composite_key?: boolean;
375
- node_type?: string;
376
- node_data?: {
375
+ nodes?: {
377
376
  [key: string]: unknown;
378
- };
377
+ }[];
379
378
  grant_roles?: string[];
380
379
  grant_privileges?: string[][];
381
380
  policy_type?: string;
@@ -3,7 +3,7 @@ export const RelationManyToMany = {
3
3
  "slug": "relation_many_to_many",
4
4
  "category": "relation",
5
5
  "display_name": "Many to Many",
6
- "description": "Creates a junction table between source and target tables with auto-derived naming and FK fields. The trigger creates a bare table (no implicit DataId or any node_type), adds FK fields to both tables, optionally creates a composite PK (use_composite_key), then forwards all security config to secure_table_provision as-is. The trigger never injects values the caller did not provide. Junction table FKs always CASCADE on delete.",
6
+ "description": "Creates a junction table between source and target tables with auto-derived naming and FK fields. The trigger creates a bare table (no implicit DataId), adds FK fields to both tables, optionally creates a composite PK (use_composite_key), then forwards all security config to secure_table_provision as-is. The trigger never injects values the caller did not provide. Junction table FKs always CASCADE on delete.",
7
7
  "parameter_schema": {
8
8
  "type": "object",
9
9
  "properties": {
@@ -36,16 +36,15 @@ export const RelationManyToMany = {
36
36
  },
37
37
  "use_composite_key": {
38
38
  "type": "boolean",
39
- "description": "When true, creates a composite PK from the two FK fields. When false, no PK is created by the trigger (use node_type=DataId for UUID PK). Mutually exclusive with node_type=DataId.",
39
+ "description": "When true, creates a composite PK from the two FK fields. When false, no PK is created by the trigger (use nodes with DataId for UUID PK). Mutually exclusive with nodes containing DataId.",
40
40
  "default": false
41
41
  },
42
- "node_type": {
43
- "type": "string",
44
- "description": "Generator for field creation on junction table. Forwarded to secure_table_provision as-is. Examples: DataId, DataEntityMembership, DataDirectOwner. NULL means no additional fields."
45
- },
46
- "node_data": {
47
- "type": "object",
48
- "description": "Configuration for the generator. Forwarded to secure_table_provision as-is. Only used when node_type is set."
42
+ "nodes": {
43
+ "type": "array",
44
+ "items": {
45
+ "type": "object"
46
+ },
47
+ "description": "Array of node objects for field creation on junction table. Each object has a $type key (e.g. DataId, DataEntityMembership) and optional data keys. Forwarded to secure_table_provision as-is. Empty array means no additional fields."
49
48
  },
50
49
  "grant_roles": {
51
50
  "type": "array",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "node-type-registry",
3
- "version": "0.8.0",
3
+ "version": "0.9.0",
4
4
  "description": "Node type definitions for the Constructive blueprint system. Single source of truth for all Authz*, Data*, Relation*, and View* node types.",
5
5
  "author": "Constructive <developers@constructive.io>",
6
6
  "main": "index.js",
@@ -48,5 +48,5 @@
48
48
  "registry",
49
49
  "graphile"
50
50
  ],
51
- "gitHead": "091694a30420500790004997a61770972e158d82"
51
+ "gitHead": "fc23b83307d007a14e54b1d0fc36614b9650a5dc"
52
52
  }
@@ -6,7 +6,7 @@ exports.RelationManyToMany = {
6
6
  "slug": "relation_many_to_many",
7
7
  "category": "relation",
8
8
  "display_name": "Many to Many",
9
- "description": "Creates a junction table between source and target tables with auto-derived naming and FK fields. The trigger creates a bare table (no implicit DataId or any node_type), adds FK fields to both tables, optionally creates a composite PK (use_composite_key), then forwards all security config to secure_table_provision as-is. The trigger never injects values the caller did not provide. Junction table FKs always CASCADE on delete.",
9
+ "description": "Creates a junction table between source and target tables with auto-derived naming and FK fields. The trigger creates a bare table (no implicit DataId), adds FK fields to both tables, optionally creates a composite PK (use_composite_key), then forwards all security config to secure_table_provision as-is. The trigger never injects values the caller did not provide. Junction table FKs always CASCADE on delete.",
10
10
  "parameter_schema": {
11
11
  "type": "object",
12
12
  "properties": {
@@ -39,16 +39,15 @@ exports.RelationManyToMany = {
39
39
  },
40
40
  "use_composite_key": {
41
41
  "type": "boolean",
42
- "description": "When true, creates a composite PK from the two FK fields. When false, no PK is created by the trigger (use node_type=DataId for UUID PK). Mutually exclusive with node_type=DataId.",
42
+ "description": "When true, creates a composite PK from the two FK fields. When false, no PK is created by the trigger (use nodes with DataId for UUID PK). Mutually exclusive with nodes containing DataId.",
43
43
  "default": false
44
44
  },
45
- "node_type": {
46
- "type": "string",
47
- "description": "Generator for field creation on junction table. Forwarded to secure_table_provision as-is. Examples: DataId, DataEntityMembership, DataDirectOwner. NULL means no additional fields."
48
- },
49
- "node_data": {
50
- "type": "object",
51
- "description": "Configuration for the generator. Forwarded to secure_table_provision as-is. Only used when node_type is set."
45
+ "nodes": {
46
+ "type": "array",
47
+ "items": {
48
+ "type": "object"
49
+ },
50
+ "description": "Array of node objects for field creation on junction table. Each object has a $type key (e.g. DataId, DataEntityMembership) and optional data keys. Forwarded to secure_table_provision as-is. Empty array means no additional fields."
52
51
  },
53
52
  "grant_roles": {
54
53
  "type": "array",