node-type-registry 0.9.0 → 0.10.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.
Files changed (57) hide show
  1. package/blueprint-types.generated.d.ts +108 -99
  2. package/blueprint-types.generated.js +6 -0
  3. package/codegen/generate-types.js +1 -1
  4. package/data/data-composite-field.d.ts +2 -0
  5. package/data/data-composite-field.js +38 -0
  6. package/data/index.d.ts +8 -7
  7. package/data/index.js +17 -15
  8. package/data/search-bm25.d.ts +2 -0
  9. package/data/{data-bm25.js → search-bm25.js} +5 -5
  10. package/data/search-full-text.d.ts +2 -0
  11. package/data/{data-full-text-search.js → search-full-text.js} +5 -5
  12. package/data/search-spatial-aggregate.d.ts +2 -0
  13. package/data/{data-postgis-aggregate.js → search-spatial-aggregate.js} +6 -6
  14. package/data/search-spatial.d.ts +2 -0
  15. package/data/{data-postgis.js → search-spatial.js} +6 -6
  16. package/data/search-trgm.d.ts +2 -0
  17. package/data/{data-trgm.js → search-trgm.js} +5 -5
  18. package/data/search-unified.d.ts +2 -0
  19. package/data/{data-search.js → search-unified.js} +8 -8
  20. package/data/search-vector.d.ts +2 -0
  21. package/data/{data-embedding.js → search-vector.js} +6 -6
  22. package/esm/blueprint-types.generated.d.ts +108 -99
  23. package/esm/blueprint-types.generated.js +6 -0
  24. package/esm/codegen/generate-types.js +1 -1
  25. package/esm/data/data-composite-field.d.ts +2 -0
  26. package/esm/data/data-composite-field.js +35 -0
  27. package/esm/data/index.d.ts +8 -7
  28. package/esm/data/index.js +8 -7
  29. package/esm/data/search-bm25.d.ts +2 -0
  30. package/esm/data/{data-bm25.js → search-bm25.js} +4 -4
  31. package/esm/data/search-full-text.d.ts +2 -0
  32. package/esm/data/{data-full-text-search.js → search-full-text.js} +4 -4
  33. package/esm/data/search-spatial-aggregate.d.ts +2 -0
  34. package/esm/data/{data-postgis-aggregate.js → search-spatial-aggregate.js} +5 -5
  35. package/esm/data/search-spatial.d.ts +2 -0
  36. package/esm/data/{data-postgis.js → search-spatial.js} +5 -5
  37. package/esm/data/search-trgm.d.ts +2 -0
  38. package/esm/data/{data-trgm.js → search-trgm.js} +4 -4
  39. package/esm/data/search-unified.d.ts +2 -0
  40. package/esm/data/{data-search.js → search-unified.js} +7 -7
  41. package/esm/data/search-vector.d.ts +2 -0
  42. package/esm/data/{data-embedding.js → search-vector.js} +5 -5
  43. package/package.json +2 -2
  44. package/data/data-bm25.d.ts +0 -2
  45. package/data/data-embedding.d.ts +0 -2
  46. package/data/data-full-text-search.d.ts +0 -2
  47. package/data/data-postgis-aggregate.d.ts +0 -2
  48. package/data/data-postgis.d.ts +0 -2
  49. package/data/data-search.d.ts +0 -2
  50. package/data/data-trgm.d.ts +0 -2
  51. package/esm/data/data-bm25.d.ts +0 -2
  52. package/esm/data/data-embedding.d.ts +0 -2
  53. package/esm/data/data-full-text-search.d.ts +0 -2
  54. package/esm/data/data-postgis-aggregate.d.ts +0 -2
  55. package/esm/data/data-postgis.d.ts +0 -2
  56. package/esm/data/data-search.d.ts +0 -2
  57. package/esm/data/data-trgm.d.ts +0 -2
@@ -1,11 +1,11 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.DataEmbedding = void 0;
4
- exports.DataEmbedding = {
5
- "name": "DataEmbedding",
6
- "slug": "data_embedding",
7
- "category": "data",
8
- "display_name": "Embedding",
3
+ exports.SearchVector = void 0;
4
+ exports.SearchVector = {
5
+ "name": "SearchVector",
6
+ "slug": "search_vector",
7
+ "category": "search",
8
+ "display_name": "Vector Search",
9
9
  "description": "Adds a vector embedding column with HNSW or IVFFlat index for similarity search. Supports configurable dimensions, distance metrics (cosine, l2, ip), stale tracking strategies (column, null, hash), and automatic job enqueue triggers for embedding generation.",
10
10
  "parameter_schema": {
11
11
  "type": "object",
@@ -36,8 +36,91 @@ export interface DataPublishableParams {
36
36
  export interface DataSoftDeleteParams {
37
37
  include_id?: boolean;
38
38
  }
39
+ /** Dynamically creates PostgreSQL triggers that enqueue jobs via app_jobs.add_job() when table rows are inserted, updated, or deleted. Supports configurable payload strategies (full row, row ID, selected fields, or custom mapping), conditional firing via WHEN clauses, watched field changes, and extended job options (queue, priority, delay, max attempts). */
40
+ export interface DataJobTriggerParams {
41
+ task_identifier: string;
42
+ payload_strategy?: "row" | "row_id" | "fields" | "custom";
43
+ payload_fields?: string[];
44
+ payload_custom?: {
45
+ [key: string]: unknown;
46
+ };
47
+ events?: ("INSERT" | "UPDATE" | "DELETE")[];
48
+ include_old?: boolean;
49
+ include_meta?: boolean;
50
+ condition_field?: string;
51
+ condition_value?: string;
52
+ watch_fields?: string[];
53
+ job_key?: string;
54
+ queue_name?: string;
55
+ priority?: number;
56
+ run_at_delay?: string;
57
+ max_attempts?: number;
58
+ }
59
+ /** Adds a citext[] tags column with GIN index for efficient array containment queries (@>, &&). Standard tagging pattern for categorization and filtering. */
60
+ export interface DataTagsParams {
61
+ field_name?: string;
62
+ default_value?: string;
63
+ is_required?: boolean;
64
+ }
65
+ /** Adds a status column with B-tree index for efficient equality filtering and sorting. Optionally constrains values via CHECK constraint when allowed_values is provided. */
66
+ export interface DataStatusFieldParams {
67
+ field_name?: string;
68
+ type?: string;
69
+ default_value?: string;
70
+ is_required?: boolean;
71
+ allowed_values?: string[];
72
+ }
73
+ /** Adds a JSONB column with optional GIN index for containment queries (@>, ?, ?|, ?&). Standard pattern for semi-structured metadata. */
74
+ export interface DataJsonbParams {
75
+ field_name?: string;
76
+ default_value?: string;
77
+ is_required?: boolean;
78
+ create_index?: boolean;
79
+ }
80
+ /** Auto-generates URL-friendly slugs from field values on insert/update. Attaches BEFORE INSERT and BEFORE UPDATE triggers that call inflection.slugify() on the target field. References fields by name in data jsonb. */
81
+ export interface DataSlugParams {
82
+ field_name: string;
83
+ source_field_name?: string;
84
+ }
85
+ /** Transforms field values using inflection operations (snake_case, camelCase, slugify, plural, singular, etc). Attaches BEFORE INSERT and BEFORE UPDATE triggers. References fields by name in data jsonb. */
86
+ export interface DataInflectionParams {
87
+ field_name: string;
88
+ ops: ("plural" | "singular" | "camel" | "pascal" | "dashed" | "slugify" | "underscore" | "lower" | "upper")[];
89
+ }
90
+ /** Restricts which user can modify specific columns in shared objects. Creates an AFTER UPDATE trigger that throws OWNED_PROPS when a non-owner tries to change protected fields. References fields by name in data jsonb. */
91
+ export interface DataOwnedFieldsParams {
92
+ role_key_field_name: string;
93
+ protected_field_names: string[];
94
+ }
95
+ /** BEFORE INSERT trigger that copies specified fields from a parent table via a foreign key. The parent row is looked up through RLS (SECURITY INVOKER), so the insert fails if the caller cannot see the parent. Used by the storage module to inherit owner_id and is_public from buckets to files. */
96
+ export interface DataInheritFromParentParams {
97
+ parent_fk_field: string;
98
+ fields: string[];
99
+ parent_table?: string;
100
+ parent_schema?: string;
101
+ }
102
+ /** BEFORE INSERT trigger that forces a field to the value of jwt_public.current_user_id(). Prevents clients from spoofing the actor/uploader identity. The field value is always overwritten regardless of what the client provides. */
103
+ export interface DataForceCurrentUserParams {
104
+ field_name?: string;
105
+ }
106
+ /** BEFORE UPDATE trigger that prevents changes to a list of specified fields after INSERT. Raises an exception if any of the listed fields have changed. Unlike FieldImmutable (single-field), this handles multiple fields in a single trigger for efficiency. */
107
+ export interface DataImmutableFieldsParams {
108
+ fields: string[];
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
+ }
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. */
117
+ export type TableUserProfilesParams = {};
118
+ /** Creates an organization settings table with standard business fields (legal_name, address fields). Uses AuthzEntityMembership for access control. */
119
+ export type TableOrganizationSettingsParams = {};
120
+ /** Creates a user settings table for user-specific configuration. Uses AuthzDirectOwner for access control. */
121
+ export type TableUserSettingsParams = {};
39
122
  /** Adds a vector embedding column with HNSW or IVFFlat index for similarity search. Supports configurable dimensions, distance metrics (cosine, l2, ip), stale tracking strategies (column, null, hash), and automatic job enqueue triggers for embedding generation. */
40
- export interface DataEmbeddingParams {
123
+ export interface SearchVectorParams {
41
124
  field_name?: string;
42
125
  dimensions?: number;
43
126
  index_method?: "hnsw" | "ivfflat";
@@ -63,7 +146,7 @@ export interface DataEmbeddingParams {
63
146
  };
64
147
  }
65
148
  /** Adds a tsvector column with GIN index and automatic trigger population from source fields. Enables PostgreSQL full-text search with configurable weights and language support. Leverages the existing metaschema full_text_search infrastructure. */
66
- export interface DataFullTextSearchParams {
149
+ export interface SearchFullTextParams {
67
150
  field_name?: string;
68
151
  source_fields: {
69
152
  field: string;
@@ -73,7 +156,7 @@ export interface DataFullTextSearchParams {
73
156
  search_score_weight?: number;
74
157
  }
75
158
  /** Creates a BM25 index on an existing text column using pg_textsearch. Enables statistical relevance ranking with configurable k1 and b parameters. The BM25 index is auto-detected by graphile-search. */
76
- export interface DataBm25Params {
159
+ export interface SearchBm25Params {
77
160
  field_name: string;
78
161
  text_config?: string;
79
162
  k1?: number;
@@ -81,7 +164,7 @@ export interface DataBm25Params {
81
164
  search_score_weight?: number;
82
165
  }
83
166
  /** Composite node type that orchestrates multiple search modalities (full-text search, BM25, embeddings, trigram) on a single table. Configures per-table search score weights, normalization strategy, and recency boost via the @searchConfig smart tag. */
84
- export interface DataSearchParams {
167
+ export interface SearchUnifiedParams {
85
168
  full_text_search?: {
86
169
  field_name?: string;
87
170
  source_fields?: {
@@ -129,7 +212,7 @@ export interface DataSearchParams {
129
212
  };
130
213
  }
131
214
  /** Adds a PostGIS geometry or geography column with a spatial index (GiST or SP-GiST). Supports configurable geometry types (Point, Polygon, etc.), SRID, and dimensionality. The graphile-postgis plugin auto-detects geometry/geography columns by codec type for spatial filtering (ST_Contains, ST_DWithin, bbox operators). */
132
- export interface DataPostGISParams {
215
+ export interface SearchSpatialParams {
133
216
  field_name?: string;
134
217
  geometry_type?: "Point" | "LineString" | "Polygon" | "MultiPoint" | "MultiLineString" | "MultiPolygon" | "GeometryCollection" | "Geometry";
135
218
  srid?: number;
@@ -138,7 +221,7 @@ export interface DataPostGISParams {
138
221
  index_method?: "gist" | "spgist";
139
222
  }
140
223
  /** Creates a derived/materialized geometry field on the parent table that automatically aggregates geometries from a source (child) table via triggers. When child rows are inserted/updated/deleted, the parent aggregate field is recalculated using the specified PostGIS aggregation function (ST_Union, ST_Collect, ST_ConvexHull, ST_ConcaveHull). Useful for materializing spatial boundaries from collections of points or polygons. */
141
- export interface DataPostGISAggregateParams {
224
+ export interface SearchSpatialAggregateParams {
142
225
  field_name?: string;
143
226
  source_table_id: string;
144
227
  source_geom_field?: string;
@@ -150,87 +233,10 @@ export interface DataPostGISAggregateParams {
150
233
  use_geography?: boolean;
151
234
  index_method?: "gist" | "spgist";
152
235
  }
153
- /** Dynamically creates PostgreSQL triggers that enqueue jobs via app_jobs.add_job() when table rows are inserted, updated, or deleted. Supports configurable payload strategies (full row, row ID, selected fields, or custom mapping), conditional firing via WHEN clauses, watched field changes, and extended job options (queue, priority, delay, max attempts). */
154
- export interface DataJobTriggerParams {
155
- task_identifier: string;
156
- payload_strategy?: "row" | "row_id" | "fields" | "custom";
157
- payload_fields?: string[];
158
- payload_custom?: {
159
- [key: string]: unknown;
160
- };
161
- events?: ("INSERT" | "UPDATE" | "DELETE")[];
162
- include_old?: boolean;
163
- include_meta?: boolean;
164
- condition_field?: string;
165
- condition_value?: string;
166
- watch_fields?: string[];
167
- job_key?: string;
168
- queue_name?: string;
169
- priority?: number;
170
- run_at_delay?: string;
171
- max_attempts?: number;
172
- }
173
- /** Adds a citext[] tags column with GIN index for efficient array containment queries (@>, &&). Standard tagging pattern for categorization and filtering. */
174
- export interface DataTagsParams {
175
- field_name?: string;
176
- default_value?: string;
177
- is_required?: boolean;
178
- }
179
- /** Adds a status column with B-tree index for efficient equality filtering and sorting. Optionally constrains values via CHECK constraint when allowed_values is provided. */
180
- export interface DataStatusFieldParams {
181
- field_name?: string;
182
- type?: string;
183
- default_value?: string;
184
- is_required?: boolean;
185
- allowed_values?: string[];
186
- }
187
- /** Adds a JSONB column with optional GIN index for containment queries (@>, ?, ?|, ?&). Standard pattern for semi-structured metadata. */
188
- export interface DataJsonbParams {
189
- field_name?: string;
190
- default_value?: string;
191
- is_required?: boolean;
192
- create_index?: boolean;
193
- }
194
236
  /** Creates GIN trigram indexes (gin_trgm_ops) on specified text/citext fields for fuzzy LIKE/ILIKE/similarity search. Adds @trgmSearch smart tag for PostGraphile integration. Fields must already exist on the table. */
195
- export interface DataTrgmParams {
237
+ export interface SearchTrgmParams {
196
238
  fields: string[];
197
239
  }
198
- /** Auto-generates URL-friendly slugs from field values on insert/update. Attaches BEFORE INSERT and BEFORE UPDATE triggers that call inflection.slugify() on the target field. References fields by name in data jsonb. */
199
- export interface DataSlugParams {
200
- field_name: string;
201
- source_field_name?: string;
202
- }
203
- /** Transforms field values using inflection operations (snake_case, camelCase, slugify, plural, singular, etc). Attaches BEFORE INSERT and BEFORE UPDATE triggers. References fields by name in data jsonb. */
204
- export interface DataInflectionParams {
205
- field_name: string;
206
- ops: ("plural" | "singular" | "camel" | "pascal" | "dashed" | "slugify" | "underscore" | "lower" | "upper")[];
207
- }
208
- /** Restricts which user can modify specific columns in shared objects. Creates an AFTER UPDATE trigger that throws OWNED_PROPS when a non-owner tries to change protected fields. References fields by name in data jsonb. */
209
- export interface DataOwnedFieldsParams {
210
- role_key_field_name: string;
211
- protected_field_names: string[];
212
- }
213
- /** BEFORE INSERT trigger that copies specified fields from a parent table via a foreign key. The parent row is looked up through RLS (SECURITY INVOKER), so the insert fails if the caller cannot see the parent. Used by the storage module to inherit owner_id and is_public from buckets to files. */
214
- export interface DataInheritFromParentParams {
215
- parent_fk_field: string;
216
- fields: string[];
217
- parent_table?: string;
218
- parent_schema?: string;
219
- }
220
- /** BEFORE INSERT trigger that forces a field to the value of jwt_public.current_user_id(). Prevents clients from spoofing the actor/uploader identity. The field value is always overwritten regardless of what the client provides. */
221
- export interface DataForceCurrentUserParams {
222
- field_name?: string;
223
- }
224
- /** BEFORE UPDATE trigger that prevents changes to a list of specified fields after INSERT. Raises an exception if any of the listed fields have changed. Unlike FieldImmutable (single-field), this handles multiple fields in a single trigger for efficiency. */
225
- export interface DataImmutableFieldsParams {
226
- fields: string[];
227
- }
228
- /** 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. */
229
- export type TableUserProfilesParams = {};
230
- /** Creates an organization settings table with standard business fields (legal_name, address fields). Uses AuthzEntityMembership for access control. */
231
- export type TableOrganizationSettingsParams = {};
232
- /** Creates a user settings table for user-specific configuration. Uses AuthzDirectOwner for access control. */
233
- export type TableUserSettingsParams = {};
234
240
  /** Direct equality comparison between a table column and the current user ID. Simplest authorization pattern with no subqueries. */
235
241
  export interface AuthzDirectOwnerParams {
236
242
  entity_field: string;
@@ -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" | "DataEmbedding" | "DataFullTextSearch" | "DataBm25" | "DataSearch" | "DataPostGIS" | "DataPostGISAggregate" | "DataJobTrigger" | "DataTags" | "DataStatusField" | "DataJsonb" | "DataTrgm" | "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";
@@ -616,23 +622,23 @@ export type BlueprintNodeObject = {
616
622
  $type: "DataSoftDelete";
617
623
  data: DataSoftDeleteParams;
618
624
  } | {
619
- $type: "DataEmbedding";
620
- data: DataEmbeddingParams;
625
+ $type: "SearchVector";
626
+ data: SearchVectorParams;
621
627
  } | {
622
- $type: "DataFullTextSearch";
623
- data: DataFullTextSearchParams;
628
+ $type: "SearchFullText";
629
+ data: SearchFullTextParams;
624
630
  } | {
625
- $type: "DataBm25";
626
- data: DataBm25Params;
631
+ $type: "SearchBm25";
632
+ data: SearchBm25Params;
627
633
  } | {
628
- $type: "DataSearch";
629
- data: DataSearchParams;
634
+ $type: "SearchUnified";
635
+ data: SearchUnifiedParams;
630
636
  } | {
631
- $type: "DataPostGIS";
632
- data: DataPostGISParams;
637
+ $type: "SearchSpatial";
638
+ data: SearchSpatialParams;
633
639
  } | {
634
- $type: "DataPostGISAggregate";
635
- data: DataPostGISAggregateParams;
640
+ $type: "SearchSpatialAggregate";
641
+ data: SearchSpatialAggregateParams;
636
642
  } | {
637
643
  $type: "DataJobTrigger";
638
644
  data: DataJobTriggerParams;
@@ -646,8 +652,8 @@ export type BlueprintNodeObject = {
646
652
  $type: "DataJsonb";
647
653
  data: DataJsonbParams;
648
654
  } | {
649
- $type: "DataTrgm";
650
- data: DataTrgmParams;
655
+ $type: "SearchTrgm";
656
+ data: SearchTrgmParams;
651
657
  } | {
652
658
  $type: "DataSlug";
653
659
  data: DataSlugParams;
@@ -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>;
@@ -11,6 +11,12 @@
11
11
  * ===========================================================================
12
12
  */
13
13
  ;
14
+ /**
15
+ * ===========================================================================
16
+ * Search node type parameters
17
+ * ===========================================================================
18
+ */
19
+ ;
14
20
  /**
15
21
  * ===========================================================================
16
22
  * Authz node type parameters
@@ -402,7 +402,7 @@ function buildProgram(meta) {
402
402
  const relationNodes = allNodeTypes.filter((nt) => nt.category === 'relation');
403
403
  const authzNodes = allNodeTypes.filter((nt) => nt.category === 'authz');
404
404
  // -- Parameter interfaces grouped by category --
405
- const categoryOrder = ['data', 'authz', 'relation', 'view'];
405
+ const categoryOrder = ['data', 'search', 'authz', 'relation', 'view'];
406
406
  for (const cat of categoryOrder) {
407
407
  const nts = categories.get(cat);
408
408
  if (!nts || nts.length === 0)
@@ -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
+ };
@@ -6,23 +6,24 @@ export { DataTimestamps } from './data-timestamps';
6
6
  export { DataPeoplestamps } from './data-peoplestamps';
7
7
  export { DataPublishable } from './data-publishable';
8
8
  export { DataSoftDelete } from './data-soft-delete';
9
- export { DataEmbedding } from './data-embedding';
10
- export { DataFullTextSearch } from './data-full-text-search';
11
- export { DataBm25 } from './data-bm25';
12
- export { DataSearch } from './data-search';
13
- export { DataPostGIS } from './data-postgis';
14
- export { DataPostGISAggregate } from './data-postgis-aggregate';
9
+ export { SearchVector } from './search-vector';
10
+ export { SearchFullText } from './search-full-text';
11
+ export { SearchBm25 } from './search-bm25';
12
+ export { SearchUnified } from './search-unified';
13
+ export { SearchSpatial } from './search-spatial';
14
+ export { SearchSpatialAggregate } from './search-spatial-aggregate';
15
15
  export { DataJobTrigger } from './data-job-trigger';
16
16
  export { DataTags } from './data-tags';
17
17
  export { DataStatusField } from './data-status-field';
18
18
  export { DataJsonb } from './data-jsonb';
19
- export { DataTrgm } from './data-trgm';
19
+ export { SearchTrgm } from './search-trgm';
20
20
  export { DataSlug } from './data-slug';
21
21
  export { DataInflection } from './data-inflection';
22
22
  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
@@ -6,23 +6,24 @@ export { DataTimestamps } from './data-timestamps';
6
6
  export { DataPeoplestamps } from './data-peoplestamps';
7
7
  export { DataPublishable } from './data-publishable';
8
8
  export { DataSoftDelete } from './data-soft-delete';
9
- export { DataEmbedding } from './data-embedding';
10
- export { DataFullTextSearch } from './data-full-text-search';
11
- export { DataBm25 } from './data-bm25';
12
- export { DataSearch } from './data-search';
13
- export { DataPostGIS } from './data-postgis';
14
- export { DataPostGISAggregate } from './data-postgis-aggregate';
9
+ export { SearchVector } from './search-vector';
10
+ export { SearchFullText } from './search-full-text';
11
+ export { SearchBm25 } from './search-bm25';
12
+ export { SearchUnified } from './search-unified';
13
+ export { SearchSpatial } from './search-spatial';
14
+ export { SearchSpatialAggregate } from './search-spatial-aggregate';
15
15
  export { DataJobTrigger } from './data-job-trigger';
16
16
  export { DataTags } from './data-tags';
17
17
  export { DataStatusField } from './data-status-field';
18
18
  export { DataJsonb } from './data-jsonb';
19
- export { DataTrgm } from './data-trgm';
19
+ export { SearchTrgm } from './search-trgm';
20
20
  export { DataSlug } from './data-slug';
21
21
  export { DataInflection } from './data-inflection';
22
22
  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';
@@ -0,0 +1,2 @@
1
+ import type { NodeTypeDefinition } from '../types';
2
+ export declare const SearchBm25: NodeTypeDefinition;
@@ -1,7 +1,7 @@
1
- export const DataBm25 = {
2
- "name": "DataBm25",
3
- "slug": "data_bm25",
4
- "category": "data",
1
+ export const SearchBm25 = {
2
+ "name": "SearchBm25",
3
+ "slug": "search_bm25",
4
+ "category": "search",
5
5
  "display_name": "BM25 Search",
6
6
  "description": "Creates a BM25 index on an existing text column using pg_textsearch. Enables statistical relevance ranking with configurable k1 and b parameters. The BM25 index is auto-detected by graphile-search.",
7
7
  "parameter_schema": {
@@ -0,0 +1,2 @@
1
+ import type { NodeTypeDefinition } from '../types';
2
+ export declare const SearchFullText: NodeTypeDefinition;
@@ -1,7 +1,7 @@
1
- export const DataFullTextSearch = {
2
- "name": "DataFullTextSearch",
3
- "slug": "data_full_text_search",
4
- "category": "data",
1
+ export const SearchFullText = {
2
+ "name": "SearchFullText",
3
+ "slug": "search_full_text",
4
+ "category": "search",
5
5
  "display_name": "Full-Text Search",
6
6
  "description": "Adds a tsvector column with GIN index and automatic trigger population from source fields. Enables PostgreSQL full-text search with configurable weights and language support. Leverages the existing metaschema full_text_search infrastructure.",
7
7
  "parameter_schema": {
@@ -0,0 +1,2 @@
1
+ import type { NodeTypeDefinition } from '../types';
2
+ export declare const SearchSpatialAggregate: NodeTypeDefinition;
@@ -1,8 +1,8 @@
1
- export const DataPostGISAggregate = {
2
- "name": "DataPostGISAggregate",
3
- "slug": "data_postgis_aggregate",
4
- "category": "data",
5
- "display_name": "PostGIS Aggregate Geometry",
1
+ export const SearchSpatialAggregate = {
2
+ "name": "SearchSpatialAggregate",
3
+ "slug": "search_spatial_aggregate",
4
+ "category": "search",
5
+ "display_name": "Spatial Aggregate Search",
6
6
  "description": "Creates a derived/materialized geometry field on the parent table that automatically aggregates geometries from a source (child) table via triggers. When child rows are inserted/updated/deleted, the parent aggregate field is recalculated using the specified PostGIS aggregation function (ST_Union, ST_Collect, ST_ConvexHull, ST_ConcaveHull). Useful for materializing spatial boundaries from collections of points or polygons.",
7
7
  "parameter_schema": {
8
8
  "type": "object",
@@ -0,0 +1,2 @@
1
+ import type { NodeTypeDefinition } from '../types';
2
+ export declare const SearchSpatial: NodeTypeDefinition;
@@ -1,8 +1,8 @@
1
- export const DataPostGIS = {
2
- "name": "DataPostGIS",
3
- "slug": "data_postgis",
4
- "category": "data",
5
- "display_name": "PostGIS Geometry",
1
+ export const SearchSpatial = {
2
+ "name": "SearchSpatial",
3
+ "slug": "search_spatial",
4
+ "category": "search",
5
+ "display_name": "Spatial Search",
6
6
  "description": "Adds a PostGIS geometry or geography column with a spatial index (GiST or SP-GiST). Supports configurable geometry types (Point, Polygon, etc.), SRID, and dimensionality. The graphile-postgis plugin auto-detects geometry/geography columns by codec type for spatial filtering (ST_Contains, ST_DWithin, bbox operators).",
7
7
  "parameter_schema": {
8
8
  "type": "object",
@@ -0,0 +1,2 @@
1
+ import type { NodeTypeDefinition } from '../types';
2
+ export declare const SearchTrgm: NodeTypeDefinition;
@@ -1,7 +1,7 @@
1
- export const DataTrgm = {
2
- "name": "DataTrgm",
3
- "slug": "data_trgm",
4
- "category": "data",
1
+ export const SearchTrgm = {
2
+ "name": "SearchTrgm",
3
+ "slug": "search_trgm",
4
+ "category": "search",
5
5
  "display_name": "Trigram Search",
6
6
  "description": "Creates GIN trigram indexes (gin_trgm_ops) on specified text/citext fields for fuzzy LIKE/ILIKE/similarity search. Adds @trgmSearch smart tag for PostGraphile integration. Fields must already exist on the table.",
7
7
  "parameter_schema": {
@@ -0,0 +1,2 @@
1
+ import type { NodeTypeDefinition } from '../types';
2
+ export declare const SearchUnified: NodeTypeDefinition;
@@ -1,7 +1,7 @@
1
- export const DataSearch = {
2
- "name": "DataSearch",
3
- "slug": "data_search",
4
- "category": "data",
1
+ export const SearchUnified = {
2
+ "name": "SearchUnified",
3
+ "slug": "search_unified",
4
+ "category": "search",
5
5
  "display_name": "Unified Search",
6
6
  "description": "Composite node type that orchestrates multiple search modalities (full-text search, BM25, embeddings, trigram) on a single table. Configures per-table search score weights, normalization strategy, and recency boost via the @searchConfig smart tag.",
7
7
  "parameter_schema": {
@@ -9,7 +9,7 @@ export const DataSearch = {
9
9
  "properties": {
10
10
  "full_text_search": {
11
11
  "type": "object",
12
- "description": "DataFullTextSearch parameters. Omit to skip FTS setup.",
12
+ "description": "SearchFullText parameters. Omit to skip FTS setup.",
13
13
  "properties": {
14
14
  "field_name": {
15
15
  "type": "string",
@@ -49,7 +49,7 @@ export const DataSearch = {
49
49
  },
50
50
  "bm25": {
51
51
  "type": "object",
52
- "description": "DataBm25 parameters. Omit to skip BM25 setup.",
52
+ "description": "SearchBm25 parameters. Omit to skip BM25 setup.",
53
53
  "properties": {
54
54
  "field_name": {
55
55
  "type": "string"
@@ -72,7 +72,7 @@ export const DataSearch = {
72
72
  },
73
73
  "embedding": {
74
74
  "type": "object",
75
- "description": "DataEmbedding parameters. Omit to skip embedding setup.",
75
+ "description": "SearchVector parameters. Omit to skip embedding setup.",
76
76
  "properties": {
77
77
  "field_name": {
78
78
  "type": "string",
@@ -0,0 +1,2 @@
1
+ import type { NodeTypeDefinition } from '../types';
2
+ export declare const SearchVector: NodeTypeDefinition;
@@ -1,8 +1,8 @@
1
- export const DataEmbedding = {
2
- "name": "DataEmbedding",
3
- "slug": "data_embedding",
4
- "category": "data",
5
- "display_name": "Embedding",
1
+ export const SearchVector = {
2
+ "name": "SearchVector",
3
+ "slug": "search_vector",
4
+ "category": "search",
5
+ "display_name": "Vector Search",
6
6
  "description": "Adds a vector embedding column with HNSW or IVFFlat index for similarity search. Supports configurable dimensions, distance metrics (cosine, l2, ip), stale tracking strategies (column, null, hash), and automatic job enqueue triggers for embedding generation.",
7
7
  "parameter_schema": {
8
8
  "type": "object",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "node-type-registry",
3
- "version": "0.9.0",
3
+ "version": "0.10.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": "fc23b83307d007a14e54b1d0fc36614b9650a5dc"
51
+ "gitHead": "2128d45cd2dba727e18910a05665b1f5c7c137ae"
52
52
  }
@@ -1,2 +0,0 @@
1
- import type { NodeTypeDefinition } from '../types';
2
- export declare const DataBm25: NodeTypeDefinition;
@@ -1,2 +0,0 @@
1
- import type { NodeTypeDefinition } from '../types';
2
- export declare const DataEmbedding: NodeTypeDefinition;
@@ -1,2 +0,0 @@
1
- import type { NodeTypeDefinition } from '../types';
2
- export declare const DataFullTextSearch: NodeTypeDefinition;
@@ -1,2 +0,0 @@
1
- import type { NodeTypeDefinition } from '../types';
2
- export declare const DataPostGISAggregate: NodeTypeDefinition;