node-type-registry 0.8.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 (55) hide show
  1. package/blueprint-types.generated.d.ts +102 -103
  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 +102 -103
  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/esm/relation/relation-many-to-many.js +8 -9
  40. package/package.json +2 -2
  41. package/relation/relation-many-to-many.js +8 -9
  42. package/data/data-bm25.d.ts +0 -2
  43. package/data/data-embedding.d.ts +0 -2
  44. package/data/data-full-text-search.d.ts +0 -2
  45. package/data/data-postgis-aggregate.d.ts +0 -2
  46. package/data/data-postgis.d.ts +0 -2
  47. package/data/data-search.d.ts +0 -2
  48. package/data/data-trgm.d.ts +0 -2
  49. package/esm/data/data-bm25.d.ts +0 -2
  50. package/esm/data/data-embedding.d.ts +0 -2
  51. package/esm/data/data-full-text-search.d.ts +0 -2
  52. package/esm/data/data-postgis-aggregate.d.ts +0 -2
  53. package/esm/data/data-postgis.d.ts +0 -2
  54. package/esm/data/data-search.d.ts +0 -2
  55. 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 {
231
+ export interface SearchTrgmParams {
196
232
  fields: string[];
197
233
  }
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
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;
@@ -363,7 +363,7 @@ export interface RelationHasManyParams {
363
363
  delete_action: "c" | "r" | "n" | "d" | "a";
364
364
  is_required?: boolean;
365
365
  }
366
- /** Creates a junction table between source and target tables with auto-derived naming and FK fields. The trigger creates a bare table (no implicit DataId or any node_type), adds FK fields to both tables, optionally creates a composite PK (use_composite_key), then forwards all security config to secure_table_provision as-is. The trigger never injects values the caller did not provide. Junction table FKs always CASCADE on delete. */
366
+ /** Creates a junction table between source and target tables with auto-derived naming and FK fields. The trigger creates a bare table (no implicit DataId), adds FK fields to both tables, optionally creates a composite PK (use_composite_key), then forwards all security config to secure_table_provision as-is. The trigger never injects values the caller did not provide. Junction table FKs always CASCADE on delete. */
367
367
  export interface RelationManyToManyParams {
368
368
  source_table_id: string;
369
369
  target_table_id: string;
@@ -372,10 +372,9 @@ export interface RelationManyToManyParams {
372
372
  source_field_name?: string;
373
373
  target_field_name?: string;
374
374
  use_composite_key?: boolean;
375
- node_type?: string;
376
- node_data?: {
375
+ nodes?: {
377
376
  [key: string]: unknown;
378
- };
377
+ }[];
379
378
  grant_roles?: string[];
380
379
  grant_privileges?: string[][];
381
380
  policy_type?: string;
@@ -545,7 +544,7 @@ export interface BlueprintTableUniqueConstraint {
545
544
  schema_name?: string;
546
545
  }
547
546
  /** String shorthand -- just the node type name. */
548
- 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";
549
548
  /** Object form -- { $type, data } with typed parameters. */
550
549
  export type BlueprintNodeObject = {
551
550
  $type: "AuthzDirectOwner";
@@ -617,23 +616,23 @@ export type BlueprintNodeObject = {
617
616
  $type: "DataSoftDelete";
618
617
  data: DataSoftDeleteParams;
619
618
  } | {
620
- $type: "DataEmbedding";
621
- data: DataEmbeddingParams;
619
+ $type: "SearchVector";
620
+ data: SearchVectorParams;
622
621
  } | {
623
- $type: "DataFullTextSearch";
624
- data: DataFullTextSearchParams;
622
+ $type: "SearchFullText";
623
+ data: SearchFullTextParams;
625
624
  } | {
626
- $type: "DataBm25";
627
- data: DataBm25Params;
625
+ $type: "SearchBm25";
626
+ data: SearchBm25Params;
628
627
  } | {
629
- $type: "DataSearch";
630
- data: DataSearchParams;
628
+ $type: "SearchUnified";
629
+ data: SearchUnifiedParams;
631
630
  } | {
632
- $type: "DataPostGIS";
633
- data: DataPostGISParams;
631
+ $type: "SearchSpatial";
632
+ data: SearchSpatialParams;
634
633
  } | {
635
- $type: "DataPostGISAggregate";
636
- data: DataPostGISAggregateParams;
634
+ $type: "SearchSpatialAggregate";
635
+ data: SearchSpatialAggregateParams;
637
636
  } | {
638
637
  $type: "DataJobTrigger";
639
638
  data: DataJobTriggerParams;
@@ -647,8 +646,8 @@ export type BlueprintNodeObject = {
647
646
  $type: "DataJsonb";
648
647
  data: DataJsonbParams;
649
648
  } | {
650
- $type: "DataTrgm";
651
- data: DataTrgmParams;
649
+ $type: "SearchTrgm";
650
+ data: SearchTrgmParams;
652
651
  } | {
653
652
  $type: "DataSlug";
654
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",