node-type-registry 0.9.1 → 0.10.1

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.
package/README.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # node-type-registry
2
2
 
3
+ <p align="center" width="100%">
4
+ <img height="250" src="https://raw.githubusercontent.com/constructive-io/constructive/refs/heads/main/assets/outline-logo.svg" />
5
+ </p>
6
+
7
+ <p align="center" width="100%">
8
+ <a href="https://github.com/constructive-io/constructive/actions/workflows/run-tests.yaml">
9
+ <img height="20" src="https://github.com/constructive-io/constructive/actions/workflows/run-tests.yaml/badge.svg" />
10
+ </a>
11
+ <a href="https://github.com/constructive-io/constructive/blob/main/LICENSE"><img height="20" src="https://img.shields.io/badge/license-MIT-blue.svg"/></a>
12
+ <a href="https://www.npmjs.com/package/node-type-registry"><img height="20" src="https://img.shields.io/github/package-json/v/constructive-io/constructive?filename=graphql%2Fnode-type-registry%2Fpackage.json"/></a>
13
+ </p>
14
+
3
15
  Node type definitions for the Constructive blueprint system. Single source of truth for all Authz*, Data*, Relation*, View*, and Table* node types.
4
16
 
5
17
  ## Usage
@@ -107,6 +107,12 @@ export interface DataForceCurrentUserParams {
107
107
  export interface DataImmutableFieldsParams {
108
108
  fields: string[];
109
109
  }
110
+ /** Creates a derived text field that automatically concatenates multiple source fields via BEFORE INSERT/UPDATE triggers. Used to produce a unified text representation (e.g., embedding_text) from multiple columns on a table. The trigger fires with '_000' prefix to run before Search* triggers alphabetically. */
111
+ export interface DataCompositeFieldParams {
112
+ target?: string;
113
+ source_fields: string[];
114
+ format?: "labeled" | "plain";
115
+ }
110
116
  /** Creates a user profiles table with standard profile fields (profile_picture, bio, first_name, last_name, tags, desired). Uses AuthzDirectOwner for edit access and AuthzAllowAll for select. */
111
117
  export type TableUserProfilesParams = {};
112
118
  /** Creates an organization settings table with standard business fields (legal_name, address fields). Uses AuthzEntityMembership for access control. */
@@ -544,7 +550,7 @@ export interface BlueprintTableUniqueConstraint {
544
550
  schema_name?: string;
545
551
  }
546
552
  /** String shorthand -- just the node type name. */
547
- export type BlueprintNodeShorthand = "AuthzDirectOwner" | "AuthzDirectOwnerAny" | "AuthzMembership" | "AuthzEntityMembership" | "AuthzRelatedEntityMembership" | "AuthzOrgHierarchy" | "AuthzTemporal" | "AuthzPublishable" | "AuthzMemberList" | "AuthzRelatedMemberList" | "AuthzAllowAll" | "AuthzDenyAll" | "AuthzComposite" | "AuthzPeerOwnership" | "AuthzRelatedPeerOwnership" | "DataId" | "DataDirectOwner" | "DataEntityMembership" | "DataOwnershipInEntity" | "DataTimestamps" | "DataPeoplestamps" | "DataPublishable" | "DataSoftDelete" | "SearchVector" | "SearchFullText" | "SearchBm25" | "SearchUnified" | "SearchSpatial" | "SearchSpatialAggregate" | "DataJobTrigger" | "DataTags" | "DataStatusField" | "DataJsonb" | "SearchTrgm" | "DataSlug" | "DataInflection" | "DataOwnedFields" | "DataInheritFromParent" | "DataForceCurrentUser" | "DataImmutableFields" | "TableUserProfiles" | "TableOrganizationSettings" | "TableUserSettings";
553
+ export type BlueprintNodeShorthand = "AuthzDirectOwner" | "AuthzDirectOwnerAny" | "AuthzMembership" | "AuthzEntityMembership" | "AuthzRelatedEntityMembership" | "AuthzOrgHierarchy" | "AuthzTemporal" | "AuthzPublishable" | "AuthzMemberList" | "AuthzRelatedMemberList" | "AuthzAllowAll" | "AuthzDenyAll" | "AuthzComposite" | "AuthzPeerOwnership" | "AuthzRelatedPeerOwnership" | "DataId" | "DataDirectOwner" | "DataEntityMembership" | "DataOwnershipInEntity" | "DataTimestamps" | "DataPeoplestamps" | "DataPublishable" | "DataSoftDelete" | "SearchVector" | "SearchFullText" | "SearchBm25" | "SearchUnified" | "SearchSpatial" | "SearchSpatialAggregate" | "DataJobTrigger" | "DataTags" | "DataStatusField" | "DataJsonb" | "SearchTrgm" | "DataSlug" | "DataInflection" | "DataOwnedFields" | "DataInheritFromParent" | "DataForceCurrentUser" | "DataImmutableFields" | "DataCompositeField" | "TableUserProfiles" | "TableOrganizationSettings" | "TableUserSettings";
548
554
  /** Object form -- { $type, data } with typed parameters. */
549
555
  export type BlueprintNodeObject = {
550
556
  $type: "AuthzDirectOwner";
@@ -666,6 +672,9 @@ export type BlueprintNodeObject = {
666
672
  } | {
667
673
  $type: "DataImmutableFields";
668
674
  data: DataImmutableFieldsParams;
675
+ } | {
676
+ $type: "DataCompositeField";
677
+ data: DataCompositeFieldParams;
669
678
  } | {
670
679
  $type: "TableUserProfiles";
671
680
  data?: Record<string, never>;
@@ -0,0 +1,2 @@
1
+ import type { NodeTypeDefinition } from '../types';
2
+ export declare const DataCompositeField: NodeTypeDefinition;
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DataCompositeField = void 0;
4
+ exports.DataCompositeField = {
5
+ "name": "DataCompositeField",
6
+ "slug": "data_composite_field",
7
+ "category": "data",
8
+ "display_name": "Composite Field",
9
+ "description": "Creates a derived text field that automatically concatenates multiple source fields via BEFORE INSERT/UPDATE triggers. Used to produce a unified text representation (e.g., embedding_text) from multiple columns on a table. The trigger fires with '_000' prefix to run before Search* triggers alphabetically.",
10
+ "parameter_schema": {
11
+ "type": "object",
12
+ "properties": {
13
+ "target": {
14
+ "type": "string",
15
+ "description": "Name of the derived text field to create (default: 'embedding_text')"
16
+ },
17
+ "source_fields": {
18
+ "type": "array",
19
+ "items": {
20
+ "type": "string"
21
+ },
22
+ "description": "Array of source field names to concatenate into the target field"
23
+ },
24
+ "format": {
25
+ "type": "string",
26
+ "enum": ["labeled", "plain"],
27
+ "description": "Output format: 'labeled' (field_name: value) or 'plain' (values only). Default: 'labeled'"
28
+ }
29
+ },
30
+ "required": [
31
+ "source_fields"
32
+ ]
33
+ },
34
+ "tags": [
35
+ "transform",
36
+ "behavior"
37
+ ]
38
+ };
package/data/index.d.ts CHANGED
@@ -23,6 +23,7 @@ export { DataOwnedFields } from './data-owned-fields';
23
23
  export { DataInheritFromParent } from './data-inherit-from-parent';
24
24
  export { DataForceCurrentUser } from './data-force-current-user';
25
25
  export { DataImmutableFields } from './data-immutable-fields';
26
+ export { DataCompositeField } from './data-composite-field';
26
27
  export { TableUserProfiles } from './table-user-profiles';
27
28
  export { TableOrganizationSettings } from './table-organization-settings';
28
29
  export { TableUserSettings } from './table-user-settings';
package/data/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.TableUserSettings = exports.TableOrganizationSettings = exports.TableUserProfiles = exports.DataImmutableFields = exports.DataForceCurrentUser = exports.DataInheritFromParent = exports.DataOwnedFields = exports.DataInflection = exports.DataSlug = exports.SearchTrgm = exports.DataJsonb = exports.DataStatusField = exports.DataTags = exports.DataJobTrigger = exports.SearchSpatialAggregate = exports.SearchSpatial = exports.SearchUnified = exports.SearchBm25 = exports.SearchFullText = exports.SearchVector = exports.DataSoftDelete = exports.DataPublishable = exports.DataPeoplestamps = exports.DataTimestamps = exports.DataOwnershipInEntity = exports.DataEntityMembership = exports.DataDirectOwner = exports.DataId = void 0;
3
+ exports.TableUserSettings = exports.TableOrganizationSettings = exports.TableUserProfiles = exports.DataCompositeField = exports.DataImmutableFields = exports.DataForceCurrentUser = exports.DataInheritFromParent = exports.DataOwnedFields = exports.DataInflection = exports.DataSlug = exports.SearchTrgm = exports.DataJsonb = exports.DataStatusField = exports.DataTags = exports.DataJobTrigger = exports.SearchSpatialAggregate = exports.SearchSpatial = exports.SearchUnified = exports.SearchBm25 = exports.SearchFullText = exports.SearchVector = exports.DataSoftDelete = exports.DataPublishable = exports.DataPeoplestamps = exports.DataTimestamps = exports.DataOwnershipInEntity = exports.DataEntityMembership = exports.DataDirectOwner = exports.DataId = void 0;
4
4
  var data_id_1 = require("./data-id");
5
5
  Object.defineProperty(exports, "DataId", { enumerable: true, get: function () { return data_id_1.DataId; } });
6
6
  var data_direct_owner_1 = require("./data-direct-owner");
@@ -51,6 +51,8 @@ var data_force_current_user_1 = require("./data-force-current-user");
51
51
  Object.defineProperty(exports, "DataForceCurrentUser", { enumerable: true, get: function () { return data_force_current_user_1.DataForceCurrentUser; } });
52
52
  var data_immutable_fields_1 = require("./data-immutable-fields");
53
53
  Object.defineProperty(exports, "DataImmutableFields", { enumerable: true, get: function () { return data_immutable_fields_1.DataImmutableFields; } });
54
+ var data_composite_field_1 = require("./data-composite-field");
55
+ Object.defineProperty(exports, "DataCompositeField", { enumerable: true, get: function () { return data_composite_field_1.DataCompositeField; } });
54
56
  var table_user_profiles_1 = require("./table-user-profiles");
55
57
  Object.defineProperty(exports, "TableUserProfiles", { enumerable: true, get: function () { return table_user_profiles_1.TableUserProfiles; } });
56
58
  var table_organization_settings_1 = require("./table-organization-settings");
@@ -107,6 +107,12 @@ export interface DataForceCurrentUserParams {
107
107
  export interface DataImmutableFieldsParams {
108
108
  fields: string[];
109
109
  }
110
+ /** Creates a derived text field that automatically concatenates multiple source fields via BEFORE INSERT/UPDATE triggers. Used to produce a unified text representation (e.g., embedding_text) from multiple columns on a table. The trigger fires with '_000' prefix to run before Search* triggers alphabetically. */
111
+ export interface DataCompositeFieldParams {
112
+ target?: string;
113
+ source_fields: string[];
114
+ format?: "labeled" | "plain";
115
+ }
110
116
  /** Creates a user profiles table with standard profile fields (profile_picture, bio, first_name, last_name, tags, desired). Uses AuthzDirectOwner for edit access and AuthzAllowAll for select. */
111
117
  export type TableUserProfilesParams = {};
112
118
  /** Creates an organization settings table with standard business fields (legal_name, address fields). Uses AuthzEntityMembership for access control. */
@@ -544,7 +550,7 @@ export interface BlueprintTableUniqueConstraint {
544
550
  schema_name?: string;
545
551
  }
546
552
  /** String shorthand -- just the node type name. */
547
- export type BlueprintNodeShorthand = "AuthzDirectOwner" | "AuthzDirectOwnerAny" | "AuthzMembership" | "AuthzEntityMembership" | "AuthzRelatedEntityMembership" | "AuthzOrgHierarchy" | "AuthzTemporal" | "AuthzPublishable" | "AuthzMemberList" | "AuthzRelatedMemberList" | "AuthzAllowAll" | "AuthzDenyAll" | "AuthzComposite" | "AuthzPeerOwnership" | "AuthzRelatedPeerOwnership" | "DataId" | "DataDirectOwner" | "DataEntityMembership" | "DataOwnershipInEntity" | "DataTimestamps" | "DataPeoplestamps" | "DataPublishable" | "DataSoftDelete" | "SearchVector" | "SearchFullText" | "SearchBm25" | "SearchUnified" | "SearchSpatial" | "SearchSpatialAggregate" | "DataJobTrigger" | "DataTags" | "DataStatusField" | "DataJsonb" | "SearchTrgm" | "DataSlug" | "DataInflection" | "DataOwnedFields" | "DataInheritFromParent" | "DataForceCurrentUser" | "DataImmutableFields" | "TableUserProfiles" | "TableOrganizationSettings" | "TableUserSettings";
553
+ export type BlueprintNodeShorthand = "AuthzDirectOwner" | "AuthzDirectOwnerAny" | "AuthzMembership" | "AuthzEntityMembership" | "AuthzRelatedEntityMembership" | "AuthzOrgHierarchy" | "AuthzTemporal" | "AuthzPublishable" | "AuthzMemberList" | "AuthzRelatedMemberList" | "AuthzAllowAll" | "AuthzDenyAll" | "AuthzComposite" | "AuthzPeerOwnership" | "AuthzRelatedPeerOwnership" | "DataId" | "DataDirectOwner" | "DataEntityMembership" | "DataOwnershipInEntity" | "DataTimestamps" | "DataPeoplestamps" | "DataPublishable" | "DataSoftDelete" | "SearchVector" | "SearchFullText" | "SearchBm25" | "SearchUnified" | "SearchSpatial" | "SearchSpatialAggregate" | "DataJobTrigger" | "DataTags" | "DataStatusField" | "DataJsonb" | "SearchTrgm" | "DataSlug" | "DataInflection" | "DataOwnedFields" | "DataInheritFromParent" | "DataForceCurrentUser" | "DataImmutableFields" | "DataCompositeField" | "TableUserProfiles" | "TableOrganizationSettings" | "TableUserSettings";
548
554
  /** Object form -- { $type, data } with typed parameters. */
549
555
  export type BlueprintNodeObject = {
550
556
  $type: "AuthzDirectOwner";
@@ -666,6 +672,9 @@ export type BlueprintNodeObject = {
666
672
  } | {
667
673
  $type: "DataImmutableFields";
668
674
  data: DataImmutableFieldsParams;
675
+ } | {
676
+ $type: "DataCompositeField";
677
+ data: DataCompositeFieldParams;
669
678
  } | {
670
679
  $type: "TableUserProfiles";
671
680
  data?: Record<string, never>;
@@ -0,0 +1,2 @@
1
+ import type { NodeTypeDefinition } from '../types';
2
+ export declare const DataCompositeField: NodeTypeDefinition;
@@ -0,0 +1,35 @@
1
+ export const DataCompositeField = {
2
+ "name": "DataCompositeField",
3
+ "slug": "data_composite_field",
4
+ "category": "data",
5
+ "display_name": "Composite Field",
6
+ "description": "Creates a derived text field that automatically concatenates multiple source fields via BEFORE INSERT/UPDATE triggers. Used to produce a unified text representation (e.g., embedding_text) from multiple columns on a table. The trigger fires with '_000' prefix to run before Search* triggers alphabetically.",
7
+ "parameter_schema": {
8
+ "type": "object",
9
+ "properties": {
10
+ "target": {
11
+ "type": "string",
12
+ "description": "Name of the derived text field to create (default: 'embedding_text')"
13
+ },
14
+ "source_fields": {
15
+ "type": "array",
16
+ "items": {
17
+ "type": "string"
18
+ },
19
+ "description": "Array of source field names to concatenate into the target field"
20
+ },
21
+ "format": {
22
+ "type": "string",
23
+ "enum": ["labeled", "plain"],
24
+ "description": "Output format: 'labeled' (field_name: value) or 'plain' (values only). Default: 'labeled'"
25
+ }
26
+ },
27
+ "required": [
28
+ "source_fields"
29
+ ]
30
+ },
31
+ "tags": [
32
+ "transform",
33
+ "behavior"
34
+ ]
35
+ };
@@ -23,6 +23,7 @@ export { DataOwnedFields } from './data-owned-fields';
23
23
  export { DataInheritFromParent } from './data-inherit-from-parent';
24
24
  export { DataForceCurrentUser } from './data-force-current-user';
25
25
  export { DataImmutableFields } from './data-immutable-fields';
26
+ export { DataCompositeField } from './data-composite-field';
26
27
  export { TableUserProfiles } from './table-user-profiles';
27
28
  export { TableOrganizationSettings } from './table-organization-settings';
28
29
  export { TableUserSettings } from './table-user-settings';
package/esm/data/index.js CHANGED
@@ -23,6 +23,7 @@ export { DataOwnedFields } from './data-owned-fields';
23
23
  export { DataInheritFromParent } from './data-inherit-from-parent';
24
24
  export { DataForceCurrentUser } from './data-force-current-user';
25
25
  export { DataImmutableFields } from './data-immutable-fields';
26
+ export { DataCompositeField } from './data-composite-field';
26
27
  export { TableUserProfiles } from './table-user-profiles';
27
28
  export { TableOrganizationSettings } from './table-organization-settings';
28
29
  export { TableUserSettings } from './table-user-settings';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "node-type-registry",
3
- "version": "0.9.1",
3
+ "version": "0.10.1",
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": "d1cfd698f829c6fae346a5004f735acd44519bb7"
51
+ "gitHead": "fe60f7b81252eea53dce227bb581d5ae2ef0ec36"
52
52
  }