node-type-registry 0.9.0 → 0.9.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.
Files changed (53) hide show
  1. package/blueprint-types.generated.d.ts +99 -99
  2. package/blueprint-types.generated.js +6 -0
  3. package/codegen/generate-types.js +1 -1
  4. package/data/index.d.ts +7 -7
  5. package/data/index.js +15 -15
  6. package/data/search-bm25.d.ts +2 -0
  7. package/data/{data-bm25.js → search-bm25.js} +5 -5
  8. package/data/search-full-text.d.ts +2 -0
  9. package/data/{data-full-text-search.js → search-full-text.js} +5 -5
  10. package/data/search-spatial-aggregate.d.ts +2 -0
  11. package/data/{data-postgis-aggregate.js → search-spatial-aggregate.js} +6 -6
  12. package/data/search-spatial.d.ts +2 -0
  13. package/data/{data-postgis.js → search-spatial.js} +6 -6
  14. package/data/search-trgm.d.ts +2 -0
  15. package/data/{data-trgm.js → search-trgm.js} +5 -5
  16. package/data/search-unified.d.ts +2 -0
  17. package/data/{data-search.js → search-unified.js} +8 -8
  18. package/data/search-vector.d.ts +2 -0
  19. package/data/{data-embedding.js → search-vector.js} +6 -6
  20. package/esm/blueprint-types.generated.d.ts +99 -99
  21. package/esm/blueprint-types.generated.js +6 -0
  22. package/esm/codegen/generate-types.js +1 -1
  23. package/esm/data/index.d.ts +7 -7
  24. package/esm/data/index.js +7 -7
  25. package/esm/data/search-bm25.d.ts +2 -0
  26. package/esm/data/{data-bm25.js → search-bm25.js} +4 -4
  27. package/esm/data/search-full-text.d.ts +2 -0
  28. package/esm/data/{data-full-text-search.js → search-full-text.js} +4 -4
  29. package/esm/data/search-spatial-aggregate.d.ts +2 -0
  30. package/esm/data/{data-postgis-aggregate.js → search-spatial-aggregate.js} +5 -5
  31. package/esm/data/search-spatial.d.ts +2 -0
  32. package/esm/data/{data-postgis.js → search-spatial.js} +5 -5
  33. package/esm/data/search-trgm.d.ts +2 -0
  34. package/esm/data/{data-trgm.js → search-trgm.js} +4 -4
  35. package/esm/data/search-unified.d.ts +2 -0
  36. package/esm/data/{data-search.js → search-unified.js} +7 -7
  37. package/esm/data/search-vector.d.ts +2 -0
  38. package/esm/data/{data-embedding.js → search-vector.js} +5 -5
  39. package/package.json +2 -2
  40. package/data/data-bm25.d.ts +0 -2
  41. package/data/data-embedding.d.ts +0 -2
  42. package/data/data-full-text-search.d.ts +0 -2
  43. package/data/data-postgis-aggregate.d.ts +0 -2
  44. package/data/data-postgis.d.ts +0 -2
  45. package/data/data-search.d.ts +0 -2
  46. package/data/data-trgm.d.ts +0 -2
  47. package/esm/data/data-bm25.d.ts +0 -2
  48. package/esm/data/data-embedding.d.ts +0 -2
  49. package/esm/data/data-full-text-search.d.ts +0 -2
  50. package/esm/data/data-postgis-aggregate.d.ts +0 -2
  51. package/esm/data/data-postgis.d.ts +0 -2
  52. package/esm/data/data-search.d.ts +0 -2
  53. package/esm/data/data-trgm.d.ts +0 -2
@@ -36,8 +36,85 @@ 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 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
+ export type TableUserProfilesParams = {};
112
+ /** Creates an organization settings table with standard business fields (legal_name, address fields). Uses AuthzEntityMembership for access control. */
113
+ export type TableOrganizationSettingsParams = {};
114
+ /** Creates a user settings table for user-specific configuration. Uses AuthzDirectOwner for access control. */
115
+ export type TableUserSettingsParams = {};
39
116
  /** 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 {
117
+ export interface SearchVectorParams {
41
118
  field_name?: string;
42
119
  dimensions?: number;
43
120
  index_method?: "hnsw" | "ivfflat";
@@ -63,7 +140,7 @@ export interface DataEmbeddingParams {
63
140
  };
64
141
  }
65
142
  /** 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 {
143
+ export interface SearchFullTextParams {
67
144
  field_name?: string;
68
145
  source_fields: {
69
146
  field: string;
@@ -73,7 +150,7 @@ export interface DataFullTextSearchParams {
73
150
  search_score_weight?: number;
74
151
  }
75
152
  /** 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 {
153
+ export interface SearchBm25Params {
77
154
  field_name: string;
78
155
  text_config?: string;
79
156
  k1?: number;
@@ -81,7 +158,7 @@ export interface DataBm25Params {
81
158
  search_score_weight?: number;
82
159
  }
83
160
  /** 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 {
161
+ export interface SearchUnifiedParams {
85
162
  full_text_search?: {
86
163
  field_name?: string;
87
164
  source_fields?: {
@@ -129,7 +206,7 @@ export interface DataSearchParams {
129
206
  };
130
207
  }
131
208
  /** 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 {
209
+ export interface SearchSpatialParams {
133
210
  field_name?: string;
134
211
  geometry_type?: "Point" | "LineString" | "Polygon" | "MultiPoint" | "MultiLineString" | "MultiPolygon" | "GeometryCollection" | "Geometry";
135
212
  srid?: number;
@@ -138,7 +215,7 @@ export interface DataPostGISParams {
138
215
  index_method?: "gist" | "spgist";
139
216
  }
140
217
  /** 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 {
218
+ export interface SearchSpatialAggregateParams {
142
219
  field_name?: string;
143
220
  source_table_id: string;
144
221
  source_geom_field?: string;
@@ -150,87 +227,10 @@ export interface DataPostGISAggregateParams {
150
227
  use_geography?: boolean;
151
228
  index_method?: "gist" | "spgist";
152
229
  }
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
230
  /** 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 {
196
- fields: string[];
197
- }
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;
231
+ export interface SearchTrgmParams {
216
232
  fields: string[];
217
- parent_table?: string;
218
- parent_schema?: string;
219
233
  }
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
234
  /** Direct equality comparison between a table column and the current user ID. Simplest authorization pattern with no subqueries. */
235
235
  export interface AuthzDirectOwnerParams {
236
236
  entity_field: string;
@@ -544,7 +544,7 @@ export interface BlueprintTableUniqueConstraint {
544
544
  schema_name?: string;
545
545
  }
546
546
  /** 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";
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";
548
548
  /** Object form -- { $type, data } with typed parameters. */
549
549
  export type BlueprintNodeObject = {
550
550
  $type: "AuthzDirectOwner";
@@ -616,23 +616,23 @@ export type BlueprintNodeObject = {
616
616
  $type: "DataSoftDelete";
617
617
  data: DataSoftDeleteParams;
618
618
  } | {
619
- $type: "DataEmbedding";
620
- data: DataEmbeddingParams;
619
+ $type: "SearchVector";
620
+ data: SearchVectorParams;
621
621
  } | {
622
- $type: "DataFullTextSearch";
623
- data: DataFullTextSearchParams;
622
+ $type: "SearchFullText";
623
+ data: SearchFullTextParams;
624
624
  } | {
625
- $type: "DataBm25";
626
- data: DataBm25Params;
625
+ $type: "SearchBm25";
626
+ data: SearchBm25Params;
627
627
  } | {
628
- $type: "DataSearch";
629
- data: DataSearchParams;
628
+ $type: "SearchUnified";
629
+ data: SearchUnifiedParams;
630
630
  } | {
631
- $type: "DataPostGIS";
632
- data: DataPostGISParams;
631
+ $type: "SearchSpatial";
632
+ data: SearchSpatialParams;
633
633
  } | {
634
- $type: "DataPostGISAggregate";
635
- data: DataPostGISAggregateParams;
634
+ $type: "SearchSpatialAggregate";
635
+ data: SearchSpatialAggregateParams;
636
636
  } | {
637
637
  $type: "DataJobTrigger";
638
638
  data: DataJobTriggerParams;
@@ -646,8 +646,8 @@ export type BlueprintNodeObject = {
646
646
  $type: "DataJsonb";
647
647
  data: DataJsonbParams;
648
648
  } | {
649
- $type: "DataTrgm";
650
- data: DataTrgmParams;
649
+ $type: "SearchTrgm";
650
+ data: SearchTrgmParams;
651
651
  } | {
652
652
  $type: "DataSlug";
653
653
  data: DataSlugParams;
@@ -13,6 +13,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
13
13
  * ===========================================================================
14
14
  */
15
15
  ;
16
+ /**
17
+ * ===========================================================================
18
+ * Search node type parameters
19
+ * ===========================================================================
20
+ */
21
+ ;
16
22
  /**
17
23
  * ===========================================================================
18
24
  * Authz node type parameters
@@ -437,7 +437,7 @@ function buildProgram(meta) {
437
437
  const relationNodes = index_1.allNodeTypes.filter((nt) => nt.category === 'relation');
438
438
  const authzNodes = index_1.allNodeTypes.filter((nt) => nt.category === 'authz');
439
439
  // -- Parameter interfaces grouped by category --
440
- const categoryOrder = ['data', 'authz', 'relation', 'view'];
440
+ const categoryOrder = ['data', 'search', 'authz', 'relation', 'view'];
441
441
  for (const cat of categoryOrder) {
442
442
  const nts = categories.get(cat);
443
443
  if (!nts || nts.length === 0)
package/data/index.d.ts CHANGED
@@ -6,17 +6,17 @@ 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';
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.DataTrgm = exports.DataJsonb = exports.DataStatusField = exports.DataTags = exports.DataJobTrigger = exports.DataPostGISAggregate = exports.DataPostGIS = exports.DataSearch = exports.DataBm25 = exports.DataFullTextSearch = exports.DataEmbedding = 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.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");
@@ -17,18 +17,18 @@ var data_publishable_1 = require("./data-publishable");
17
17
  Object.defineProperty(exports, "DataPublishable", { enumerable: true, get: function () { return data_publishable_1.DataPublishable; } });
18
18
  var data_soft_delete_1 = require("./data-soft-delete");
19
19
  Object.defineProperty(exports, "DataSoftDelete", { enumerable: true, get: function () { return data_soft_delete_1.DataSoftDelete; } });
20
- var data_embedding_1 = require("./data-embedding");
21
- Object.defineProperty(exports, "DataEmbedding", { enumerable: true, get: function () { return data_embedding_1.DataEmbedding; } });
22
- var data_full_text_search_1 = require("./data-full-text-search");
23
- Object.defineProperty(exports, "DataFullTextSearch", { enumerable: true, get: function () { return data_full_text_search_1.DataFullTextSearch; } });
24
- var data_bm25_1 = require("./data-bm25");
25
- Object.defineProperty(exports, "DataBm25", { enumerable: true, get: function () { return data_bm25_1.DataBm25; } });
26
- var data_search_1 = require("./data-search");
27
- Object.defineProperty(exports, "DataSearch", { enumerable: true, get: function () { return data_search_1.DataSearch; } });
28
- var data_postgis_1 = require("./data-postgis");
29
- Object.defineProperty(exports, "DataPostGIS", { enumerable: true, get: function () { return data_postgis_1.DataPostGIS; } });
30
- var data_postgis_aggregate_1 = require("./data-postgis-aggregate");
31
- Object.defineProperty(exports, "DataPostGISAggregate", { enumerable: true, get: function () { return data_postgis_aggregate_1.DataPostGISAggregate; } });
20
+ var search_vector_1 = require("./search-vector");
21
+ Object.defineProperty(exports, "SearchVector", { enumerable: true, get: function () { return search_vector_1.SearchVector; } });
22
+ var search_full_text_1 = require("./search-full-text");
23
+ Object.defineProperty(exports, "SearchFullText", { enumerable: true, get: function () { return search_full_text_1.SearchFullText; } });
24
+ var search_bm25_1 = require("./search-bm25");
25
+ Object.defineProperty(exports, "SearchBm25", { enumerable: true, get: function () { return search_bm25_1.SearchBm25; } });
26
+ var search_unified_1 = require("./search-unified");
27
+ Object.defineProperty(exports, "SearchUnified", { enumerable: true, get: function () { return search_unified_1.SearchUnified; } });
28
+ var search_spatial_1 = require("./search-spatial");
29
+ Object.defineProperty(exports, "SearchSpatial", { enumerable: true, get: function () { return search_spatial_1.SearchSpatial; } });
30
+ var search_spatial_aggregate_1 = require("./search-spatial-aggregate");
31
+ Object.defineProperty(exports, "SearchSpatialAggregate", { enumerable: true, get: function () { return search_spatial_aggregate_1.SearchSpatialAggregate; } });
32
32
  var data_job_trigger_1 = require("./data-job-trigger");
33
33
  Object.defineProperty(exports, "DataJobTrigger", { enumerable: true, get: function () { return data_job_trigger_1.DataJobTrigger; } });
34
34
  var data_tags_1 = require("./data-tags");
@@ -37,8 +37,8 @@ var data_status_field_1 = require("./data-status-field");
37
37
  Object.defineProperty(exports, "DataStatusField", { enumerable: true, get: function () { return data_status_field_1.DataStatusField; } });
38
38
  var data_jsonb_1 = require("./data-jsonb");
39
39
  Object.defineProperty(exports, "DataJsonb", { enumerable: true, get: function () { return data_jsonb_1.DataJsonb; } });
40
- var data_trgm_1 = require("./data-trgm");
41
- Object.defineProperty(exports, "DataTrgm", { enumerable: true, get: function () { return data_trgm_1.DataTrgm; } });
40
+ var search_trgm_1 = require("./search-trgm");
41
+ Object.defineProperty(exports, "SearchTrgm", { enumerable: true, get: function () { return search_trgm_1.SearchTrgm; } });
42
42
  var data_slug_1 = require("./data-slug");
43
43
  Object.defineProperty(exports, "DataSlug", { enumerable: true, get: function () { return data_slug_1.DataSlug; } });
44
44
  var data_inflection_1 = require("./data-inflection");
@@ -0,0 +1,2 @@
1
+ import type { NodeTypeDefinition } from '../types';
2
+ export declare const SearchBm25: NodeTypeDefinition;
@@ -1,10 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.DataBm25 = void 0;
4
- exports.DataBm25 = {
5
- "name": "DataBm25",
6
- "slug": "data_bm25",
7
- "category": "data",
3
+ exports.SearchBm25 = void 0;
4
+ exports.SearchBm25 = {
5
+ "name": "SearchBm25",
6
+ "slug": "search_bm25",
7
+ "category": "search",
8
8
  "display_name": "BM25 Search",
9
9
  "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.",
10
10
  "parameter_schema": {
@@ -0,0 +1,2 @@
1
+ import type { NodeTypeDefinition } from '../types';
2
+ export declare const SearchFullText: NodeTypeDefinition;
@@ -1,10 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.DataFullTextSearch = void 0;
4
- exports.DataFullTextSearch = {
5
- "name": "DataFullTextSearch",
6
- "slug": "data_full_text_search",
7
- "category": "data",
3
+ exports.SearchFullText = void 0;
4
+ exports.SearchFullText = {
5
+ "name": "SearchFullText",
6
+ "slug": "search_full_text",
7
+ "category": "search",
8
8
  "display_name": "Full-Text Search",
9
9
  "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.",
10
10
  "parameter_schema": {
@@ -0,0 +1,2 @@
1
+ import type { NodeTypeDefinition } from '../types';
2
+ export declare const SearchSpatialAggregate: NodeTypeDefinition;
@@ -1,11 +1,11 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.DataPostGISAggregate = void 0;
4
- exports.DataPostGISAggregate = {
5
- "name": "DataPostGISAggregate",
6
- "slug": "data_postgis_aggregate",
7
- "category": "data",
8
- "display_name": "PostGIS Aggregate Geometry",
3
+ exports.SearchSpatialAggregate = void 0;
4
+ exports.SearchSpatialAggregate = {
5
+ "name": "SearchSpatialAggregate",
6
+ "slug": "search_spatial_aggregate",
7
+ "category": "search",
8
+ "display_name": "Spatial Aggregate Search",
9
9
  "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.",
10
10
  "parameter_schema": {
11
11
  "type": "object",
@@ -0,0 +1,2 @@
1
+ import type { NodeTypeDefinition } from '../types';
2
+ export declare const SearchSpatial: NodeTypeDefinition;
@@ -1,11 +1,11 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.DataPostGIS = void 0;
4
- exports.DataPostGIS = {
5
- "name": "DataPostGIS",
6
- "slug": "data_postgis",
7
- "category": "data",
8
- "display_name": "PostGIS Geometry",
3
+ exports.SearchSpatial = void 0;
4
+ exports.SearchSpatial = {
5
+ "name": "SearchSpatial",
6
+ "slug": "search_spatial",
7
+ "category": "search",
8
+ "display_name": "Spatial Search",
9
9
  "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).",
10
10
  "parameter_schema": {
11
11
  "type": "object",
@@ -0,0 +1,2 @@
1
+ import type { NodeTypeDefinition } from '../types';
2
+ export declare const SearchTrgm: NodeTypeDefinition;
@@ -1,10 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.DataTrgm = void 0;
4
- exports.DataTrgm = {
5
- "name": "DataTrgm",
6
- "slug": "data_trgm",
7
- "category": "data",
3
+ exports.SearchTrgm = void 0;
4
+ exports.SearchTrgm = {
5
+ "name": "SearchTrgm",
6
+ "slug": "search_trgm",
7
+ "category": "search",
8
8
  "display_name": "Trigram Search",
9
9
  "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.",
10
10
  "parameter_schema": {
@@ -0,0 +1,2 @@
1
+ import type { NodeTypeDefinition } from '../types';
2
+ export declare const SearchUnified: NodeTypeDefinition;
@@ -1,10 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.DataSearch = void 0;
4
- exports.DataSearch = {
5
- "name": "DataSearch",
6
- "slug": "data_search",
7
- "category": "data",
3
+ exports.SearchUnified = void 0;
4
+ exports.SearchUnified = {
5
+ "name": "SearchUnified",
6
+ "slug": "search_unified",
7
+ "category": "search",
8
8
  "display_name": "Unified Search",
9
9
  "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.",
10
10
  "parameter_schema": {
@@ -12,7 +12,7 @@ exports.DataSearch = {
12
12
  "properties": {
13
13
  "full_text_search": {
14
14
  "type": "object",
15
- "description": "DataFullTextSearch parameters. Omit to skip FTS setup.",
15
+ "description": "SearchFullText parameters. Omit to skip FTS setup.",
16
16
  "properties": {
17
17
  "field_name": {
18
18
  "type": "string",
@@ -52,7 +52,7 @@ exports.DataSearch = {
52
52
  },
53
53
  "bm25": {
54
54
  "type": "object",
55
- "description": "DataBm25 parameters. Omit to skip BM25 setup.",
55
+ "description": "SearchBm25 parameters. Omit to skip BM25 setup.",
56
56
  "properties": {
57
57
  "field_name": {
58
58
  "type": "string"
@@ -75,7 +75,7 @@ exports.DataSearch = {
75
75
  },
76
76
  "embedding": {
77
77
  "type": "object",
78
- "description": "DataEmbedding parameters. Omit to skip embedding setup.",
78
+ "description": "SearchVector parameters. Omit to skip embedding setup.",
79
79
  "properties": {
80
80
  "field_name": {
81
81
  "type": "string",
@@ -0,0 +1,2 @@
1
+ import type { NodeTypeDefinition } from '../types';
2
+ export declare const SearchVector: NodeTypeDefinition;
@@ -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,85 @@ 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 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
+ export type TableUserProfilesParams = {};
112
+ /** Creates an organization settings table with standard business fields (legal_name, address fields). Uses AuthzEntityMembership for access control. */
113
+ export type TableOrganizationSettingsParams = {};
114
+ /** Creates a user settings table for user-specific configuration. Uses AuthzDirectOwner for access control. */
115
+ export type TableUserSettingsParams = {};
39
116
  /** 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 {
117
+ export interface SearchVectorParams {
41
118
  field_name?: string;
42
119
  dimensions?: number;
43
120
  index_method?: "hnsw" | "ivfflat";
@@ -63,7 +140,7 @@ export interface DataEmbeddingParams {
63
140
  };
64
141
  }
65
142
  /** 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 {
143
+ export interface SearchFullTextParams {
67
144
  field_name?: string;
68
145
  source_fields: {
69
146
  field: string;
@@ -73,7 +150,7 @@ export interface DataFullTextSearchParams {
73
150
  search_score_weight?: number;
74
151
  }
75
152
  /** 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 {
153
+ export interface SearchBm25Params {
77
154
  field_name: string;
78
155
  text_config?: string;
79
156
  k1?: number;
@@ -81,7 +158,7 @@ export interface DataBm25Params {
81
158
  search_score_weight?: number;
82
159
  }
83
160
  /** 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 {
161
+ export interface SearchUnifiedParams {
85
162
  full_text_search?: {
86
163
  field_name?: string;
87
164
  source_fields?: {
@@ -129,7 +206,7 @@ export interface DataSearchParams {
129
206
  };
130
207
  }
131
208
  /** 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 {
209
+ export interface SearchSpatialParams {
133
210
  field_name?: string;
134
211
  geometry_type?: "Point" | "LineString" | "Polygon" | "MultiPoint" | "MultiLineString" | "MultiPolygon" | "GeometryCollection" | "Geometry";
135
212
  srid?: number;
@@ -138,7 +215,7 @@ export interface DataPostGISParams {
138
215
  index_method?: "gist" | "spgist";
139
216
  }
140
217
  /** 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 {
218
+ export interface SearchSpatialAggregateParams {
142
219
  field_name?: string;
143
220
  source_table_id: string;
144
221
  source_geom_field?: string;
@@ -150,87 +227,10 @@ export interface DataPostGISAggregateParams {
150
227
  use_geography?: boolean;
151
228
  index_method?: "gist" | "spgist";
152
229
  }
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
230
  /** 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 {
196
- fields: string[];
197
- }
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;
231
+ export interface SearchTrgmParams {
216
232
  fields: string[];
217
- parent_table?: string;
218
- parent_schema?: string;
219
233
  }
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
234
  /** Direct equality comparison between a table column and the current user ID. Simplest authorization pattern with no subqueries. */
235
235
  export interface AuthzDirectOwnerParams {
236
236
  entity_field: string;
@@ -544,7 +544,7 @@ export interface BlueprintTableUniqueConstraint {
544
544
  schema_name?: string;
545
545
  }
546
546
  /** 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";
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";
548
548
  /** Object form -- { $type, data } with typed parameters. */
549
549
  export type BlueprintNodeObject = {
550
550
  $type: "AuthzDirectOwner";
@@ -616,23 +616,23 @@ export type BlueprintNodeObject = {
616
616
  $type: "DataSoftDelete";
617
617
  data: DataSoftDeleteParams;
618
618
  } | {
619
- $type: "DataEmbedding";
620
- data: DataEmbeddingParams;
619
+ $type: "SearchVector";
620
+ data: SearchVectorParams;
621
621
  } | {
622
- $type: "DataFullTextSearch";
623
- data: DataFullTextSearchParams;
622
+ $type: "SearchFullText";
623
+ data: SearchFullTextParams;
624
624
  } | {
625
- $type: "DataBm25";
626
- data: DataBm25Params;
625
+ $type: "SearchBm25";
626
+ data: SearchBm25Params;
627
627
  } | {
628
- $type: "DataSearch";
629
- data: DataSearchParams;
628
+ $type: "SearchUnified";
629
+ data: SearchUnifiedParams;
630
630
  } | {
631
- $type: "DataPostGIS";
632
- data: DataPostGISParams;
631
+ $type: "SearchSpatial";
632
+ data: SearchSpatialParams;
633
633
  } | {
634
- $type: "DataPostGISAggregate";
635
- data: DataPostGISAggregateParams;
634
+ $type: "SearchSpatialAggregate";
635
+ data: SearchSpatialAggregateParams;
636
636
  } | {
637
637
  $type: "DataJobTrigger";
638
638
  data: DataJobTriggerParams;
@@ -646,8 +646,8 @@ export type BlueprintNodeObject = {
646
646
  $type: "DataJsonb";
647
647
  data: DataJsonbParams;
648
648
  } | {
649
- $type: "DataTrgm";
650
- data: DataTrgmParams;
649
+ $type: "SearchTrgm";
650
+ data: SearchTrgmParams;
651
651
  } | {
652
652
  $type: "DataSlug";
653
653
  data: DataSlugParams;
@@ -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)
@@ -6,17 +6,17 @@ 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';
package/esm/data/index.js CHANGED
@@ -6,17 +6,17 @@ 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';
@@ -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.9.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": "fc23b83307d007a14e54b1d0fc36614b9650a5dc"
51
+ "gitHead": "d1cfd698f829c6fae346a5004f735acd44519bb7"
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;
@@ -1,2 +0,0 @@
1
- import type { NodeTypeDefinition } from '../types';
2
- export declare const DataPostGIS: NodeTypeDefinition;
@@ -1,2 +0,0 @@
1
- import type { NodeTypeDefinition } from '../types';
2
- export declare const DataSearch: NodeTypeDefinition;
@@ -1,2 +0,0 @@
1
- import type { NodeTypeDefinition } from '../types';
2
- export declare const DataTrgm: NodeTypeDefinition;
@@ -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;
@@ -1,2 +0,0 @@
1
- import type { NodeTypeDefinition } from '../types';
2
- export declare const DataPostGIS: NodeTypeDefinition;
@@ -1,2 +0,0 @@
1
- import type { NodeTypeDefinition } from '../types';
2
- export declare const DataSearch: NodeTypeDefinition;
@@ -1,2 +0,0 @@
1
- import type { NodeTypeDefinition } from '../types';
2
- export declare const DataTrgm: NodeTypeDefinition;