node-type-registry 0.41.0 → 0.43.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/authz/authz-app-membership.js +8 -8
- package/authz/authz-member-owner.d.ts +2 -0
- package/authz/authz-member-owner.js +51 -0
- package/authz/index.d.ts +2 -1
- package/authz/index.js +5 -3
- package/blueprint-types.generated.d.ts +355 -77
- package/blueprint-types.generated.js +16 -4
- package/codegen/generate-types.js +175 -8
- package/data/check-greater-than.js +6 -6
- package/data/check-less-than.js +6 -6
- package/data/check-not-equal.js +4 -4
- package/data/check-one-of.js +5 -5
- package/data/data-jsonb.js +4 -3
- package/data/data-member-owner.d.ts +2 -0
- package/data/data-member-owner.js +53 -0
- package/data/data-status-field.js +4 -3
- package/data/data-tags.js +4 -3
- package/data/index.d.ts +1 -0
- package/data/index.js +3 -1
- package/esm/authz/authz-app-membership.js +8 -8
- package/esm/authz/authz-member-owner.d.ts +2 -0
- package/esm/authz/authz-member-owner.js +48 -0
- package/esm/authz/index.d.ts +2 -1
- package/esm/authz/index.js +2 -1
- package/esm/blueprint-types.generated.d.ts +355 -77
- package/esm/blueprint-types.generated.js +16 -4
- package/esm/codegen/generate-types.js +175 -8
- package/esm/data/check-greater-than.js +6 -6
- package/esm/data/check-less-than.js +6 -6
- package/esm/data/check-not-equal.js +4 -4
- package/esm/data/check-one-of.js +5 -5
- package/esm/data/data-jsonb.js +4 -3
- package/esm/data/data-member-owner.d.ts +2 -0
- package/esm/data/data-member-owner.js +50 -0
- package/esm/data/data-status-field.js +4 -3
- package/esm/data/data-tags.js +4 -3
- package/esm/data/index.d.ts +1 -0
- package/esm/data/index.js +1 -0
- package/esm/event/referral.js +21 -2
- package/esm/event/tracker.js +20 -1
- package/esm/index.d.ts +1 -1
- package/esm/limit/enforce-aggregate.js +32 -8
- package/esm/limit/enforce-counter.js +33 -10
- package/esm/limit/enforce-feature.js +26 -8
- package/esm/limit/enforce-rate.js +28 -9
- package/esm/limit/track-usage.js +28 -9
- package/esm/limit/warning-aggregate.js +29 -5
- package/esm/limit/warning-counter.js +30 -7
- package/esm/limit/warning-rate.js +31 -7
- package/esm/module-presets/full.js +2 -2
- package/esm/process/chunks.js +1 -1
- package/esm/process/file-embedding.js +1 -1
- package/esm/types.d.ts +92 -0
- package/esm/types.js +1 -0
- package/event/referral.js +21 -2
- package/event/tracker.js +20 -1
- package/index.d.ts +1 -1
- package/limit/enforce-aggregate.js +32 -8
- package/limit/enforce-counter.js +33 -10
- package/limit/enforce-feature.js +26 -8
- package/limit/enforce-rate.js +28 -9
- package/limit/track-usage.js +28 -9
- package/limit/warning-aggregate.js +29 -5
- package/limit/warning-counter.js +30 -7
- package/limit/warning-rate.js +31 -7
- package/module-presets/full.js +2 -2
- package/package.json +2 -2
- package/process/chunks.js +1 -1
- package/process/file-embedding.js +1 -1
- package/types.d.ts +92 -0
- package/types.js +1 -0
|
@@ -20,12 +20,39 @@ export interface TriggerCondition {
|
|
|
20
20
|
/** Negated condition. */
|
|
21
21
|
NOT?: TriggerCondition;
|
|
22
22
|
}
|
|
23
|
-
/**
|
|
24
|
-
export interface
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
23
|
+
/** Structured representation of a PostgreSQL data type. Stored as JSONB in metaschema_public.field.type. */
|
|
24
|
+
export interface FieldType {
|
|
25
|
+
/** Type name. Must be a valid SQL identifier. */
|
|
26
|
+
name: string;
|
|
27
|
+
/** Schema qualifier. */
|
|
28
|
+
schema?: string;
|
|
29
|
+
/** Type arguments (e.g., [10, 2] for numeric(10,2), ["Point", 4326] for geometry). */
|
|
30
|
+
args?: (string | number | boolean)[];
|
|
31
|
+
/** Number of array dimensions. 1 = text[], 2 = text[][]. */
|
|
32
|
+
array_dimensions?: number;
|
|
33
|
+
/** Interval field range. 1-2 elements: ["day"] or ["day", "second"]. */
|
|
34
|
+
range?: string[];
|
|
35
|
+
}
|
|
36
|
+
/** Structured representation of a PostgreSQL default value expression. Stored as JSONB in metaschema_public.field.default_value. */
|
|
37
|
+
export interface FieldDefault {
|
|
38
|
+
/** Literal value (string, number, boolean, null, array, or object). */
|
|
39
|
+
value?: string | number | boolean | null | unknown[] | Record<string, unknown>;
|
|
40
|
+
/** Function name. Must be a valid SQL identifier. */
|
|
41
|
+
function?: string;
|
|
42
|
+
/** Schema qualifier for function. */
|
|
43
|
+
schema?: string;
|
|
44
|
+
/** Function arguments (recursive). */
|
|
45
|
+
args?: (string | number | boolean | null | FieldDefault)[];
|
|
46
|
+
/** Output type cast. */
|
|
47
|
+
cast?: FieldType;
|
|
48
|
+
/** Binary operator (e.g., "+", "-", "||"). */
|
|
49
|
+
operator?: string;
|
|
50
|
+
/** Left operand for operator expression. */
|
|
51
|
+
left?: FieldDefault;
|
|
52
|
+
/** Right operand for operator expression. */
|
|
53
|
+
right?: FieldDefault;
|
|
54
|
+
/** SQL keyword (e.g., "CURRENT_TIMESTAMP", "CURRENT_USER"). */
|
|
55
|
+
sql_keyword?: string;
|
|
29
56
|
}
|
|
30
57
|
/** Adds a CHECK constraint that validates a column value is greater than a threshold (single-column: column > value) or that one column is greater than another (cross-column: columns[0] > columns[1]). Compiled via AST helpers. */
|
|
31
58
|
export interface CheckGreaterThanParams {
|
|
@@ -102,10 +129,19 @@ export interface DataInheritFromParentParams {
|
|
|
102
129
|
/** Adds a JSONB column with optional GIN index for containment queries (@>, ?, ?|, ?&). Standard pattern for semi-structured metadata. */
|
|
103
130
|
export interface DataJsonbParams {
|
|
104
131
|
field_name?: string;
|
|
105
|
-
default_value?:
|
|
132
|
+
default_value?: FieldDefault;
|
|
106
133
|
is_required?: boolean;
|
|
107
134
|
create_index?: boolean;
|
|
108
135
|
}
|
|
136
|
+
/** Adds owner_id and entity_id columns with a compound AuthzMemberOwner policy. The actor must own the row (owner_id = current_user_id()) AND be a member of the entity (entity_id in SPRT). Use for private data within an entity scope — e.g., personal chat threads that belong to the company but only the author can see. */
|
|
137
|
+
export interface DataMemberOwnerParams {
|
|
138
|
+
owner_field_name?: string;
|
|
139
|
+
entity_field_name?: string;
|
|
140
|
+
include_id?: boolean;
|
|
141
|
+
include_user_fk?: boolean;
|
|
142
|
+
create_index?: boolean;
|
|
143
|
+
membership_type?: number;
|
|
144
|
+
}
|
|
109
145
|
/** 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. */
|
|
110
146
|
export interface DataOwnedFieldsParams {
|
|
111
147
|
role_key_field_name: string;
|
|
@@ -129,8 +165,8 @@ export interface DataPeoplestampsParams {
|
|
|
129
165
|
}
|
|
130
166
|
/** Adds publish state columns (is_published, published_at) for content visibility. Enables AuthzPublishable and AuthzTemporal authorization. */
|
|
131
167
|
export interface DataPublishableParams {
|
|
132
|
-
|
|
133
|
-
|
|
168
|
+
is_published_field_name?: string;
|
|
169
|
+
published_at_field_name?: string;
|
|
134
170
|
include_id?: boolean;
|
|
135
171
|
}
|
|
136
172
|
/** Creates per-table subscriber tables in subscriptions_public with RLS policies derived from source table SELECT policies. Attaches statement-level triggers to emit changes to subscribers. */
|
|
@@ -152,7 +188,7 @@ export interface DataSoftDeleteParams {
|
|
|
152
188
|
/** 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. */
|
|
153
189
|
export interface DataStatusFieldParams {
|
|
154
190
|
field_name?: string;
|
|
155
|
-
type?:
|
|
191
|
+
type?: FieldType;
|
|
156
192
|
default_value?: string;
|
|
157
193
|
is_required?: boolean;
|
|
158
194
|
allowed_values?: string[];
|
|
@@ -160,7 +196,7 @@ export interface DataStatusFieldParams {
|
|
|
160
196
|
/** Adds a citext[] tags column with GIN index for efficient array containment queries (@>, &&). Standard tagging pattern for categorization and filtering. */
|
|
161
197
|
export interface DataTagsParams {
|
|
162
198
|
field_name?: string;
|
|
163
|
-
default_value?:
|
|
199
|
+
default_value?: FieldDefault;
|
|
164
200
|
is_required?: boolean;
|
|
165
201
|
}
|
|
166
202
|
/** Adds automatic timestamp tracking with created_at and updated_at columns. */
|
|
@@ -175,25 +211,138 @@ export type TableOrganizationSettingsParams = {};
|
|
|
175
211
|
export type TableUserProfilesParams = {};
|
|
176
212
|
/** Creates a user settings table for user-specific configuration. Uses AuthzDirectOwner for access control. */
|
|
177
213
|
export type TableUserSettingsParams = {};
|
|
214
|
+
/** Creates triggers that record events for the referrer (inviter) when their invitees perform actions on a watched table. Resolves the referrer automatically via the invites module's claimed_invites table using the membership_type context. Supports the same compound condition system as EventTracker. Use with achievements to unlock levels and grant credits based on invitee activity. */
|
|
215
|
+
export interface EventReferralParams {
|
|
216
|
+
event_name: string;
|
|
217
|
+
events?: ('INSERT' | 'UPDATE' | 'DELETE')[];
|
|
218
|
+
actor_field?: string;
|
|
219
|
+
entity_field?: string;
|
|
220
|
+
entity_lookup?: {
|
|
221
|
+
obj_table: string;
|
|
222
|
+
obj_schema?: string;
|
|
223
|
+
obj_field: string;
|
|
224
|
+
};
|
|
225
|
+
max_depth?: number;
|
|
226
|
+
auto_register_type?: boolean;
|
|
227
|
+
condition_field?: string;
|
|
228
|
+
condition_value?: string;
|
|
229
|
+
conditions?: TriggerCondition | TriggerCondition[];
|
|
230
|
+
watch_fields?: string[];
|
|
231
|
+
}
|
|
232
|
+
/** Creates triggers that record events via the events module when table rows change. Supports the same compound condition system as JobTrigger (condition_field, watch_fields, or full AND/OR/NOT conditions). Events are recorded to app_events and aggregated automatically. Use with achievements (blueprint-level) to unlock levels and grant credits based on event accumulation. */
|
|
233
|
+
export interface EventTrackerParams {
|
|
234
|
+
event_name: string;
|
|
235
|
+
events?: ('INSERT' | 'UPDATE' | 'DELETE')[];
|
|
236
|
+
count?: number;
|
|
237
|
+
toggle?: boolean;
|
|
238
|
+
actor_field?: string;
|
|
239
|
+
entity_field?: string;
|
|
240
|
+
entity_lookup?: {
|
|
241
|
+
obj_table: string;
|
|
242
|
+
obj_schema?: string;
|
|
243
|
+
obj_field: string;
|
|
244
|
+
};
|
|
245
|
+
auto_register_type?: boolean;
|
|
246
|
+
condition_field?: string;
|
|
247
|
+
condition_value?: string;
|
|
248
|
+
conditions?: TriggerCondition | TriggerCondition[];
|
|
249
|
+
watch_fields?: string[];
|
|
250
|
+
}
|
|
178
251
|
/** Declaratively attaches aggregate limit-tracking triggers to a table. On INSERT the named limit is incremented per entity; on DELETE it is decremented. Uses org_limit_aggregates_inc/dec for per-entity (org-level) aggregate limits rather than per-user limits. Requires a provisioned limits_module for the target database. */
|
|
179
|
-
export interface
|
|
252
|
+
export interface LimitEnforceAggregateParams {
|
|
180
253
|
limit_name: string;
|
|
254
|
+
scope?: string;
|
|
181
255
|
entity_field?: string;
|
|
256
|
+
entity_lookup?: {
|
|
257
|
+
obj_table: string;
|
|
258
|
+
obj_schema?: string;
|
|
259
|
+
obj_field: string;
|
|
260
|
+
};
|
|
261
|
+
events?: ('INSERT' | 'DELETE' | 'UPDATE')[];
|
|
262
|
+
}
|
|
263
|
+
/** Declaratively attaches limit-tracking triggers to a table. On INSERT the named limit is incremented; on DELETE it is decremented. Requires a provisioned limits_module for the target scope. */
|
|
264
|
+
export interface LimitEnforceCounterParams {
|
|
265
|
+
limit_name: string;
|
|
266
|
+
scope?: string;
|
|
267
|
+
actor_field?: string;
|
|
268
|
+
entity_field?: string;
|
|
269
|
+
entity_lookup?: {
|
|
270
|
+
obj_table: string;
|
|
271
|
+
obj_schema?: string;
|
|
272
|
+
obj_field: string;
|
|
273
|
+
};
|
|
182
274
|
events?: ('INSERT' | 'DELETE' | 'UPDATE')[];
|
|
183
275
|
}
|
|
184
276
|
/** Gates a table behind a feature flag backed by the cap tables. Attaches a BEFORE INSERT trigger that checks whether the named feature cap value is > 0. Features are modeled as caps with max=0 (disabled) or max=1 (enabled) in limit_caps / limit_caps_defaults tables. Resolution: COALESCE(per-entity cap, scope default, 0). */
|
|
185
|
-
export interface
|
|
277
|
+
export interface LimitEnforceFeatureParams {
|
|
186
278
|
feature_name: string;
|
|
187
|
-
scope?:
|
|
279
|
+
scope?: string;
|
|
188
280
|
entity_field?: string;
|
|
281
|
+
entity_lookup?: {
|
|
282
|
+
obj_table: string;
|
|
283
|
+
obj_schema?: string;
|
|
284
|
+
obj_field: string;
|
|
285
|
+
};
|
|
189
286
|
}
|
|
190
|
-
/**
|
|
191
|
-
export interface
|
|
192
|
-
|
|
193
|
-
|
|
287
|
+
/** Attaches a BEFORE trigger that calls check_rate_limit() to enforce sliding-window rate limits before allowing mutations. The function checks all three scopes (entity, actor-in-entity, actor) in a single call; which scopes are actually enforced is controlled by what rows exist in rate_window_limits (plan-based config). Requires a provisioned meter_rate_limits_module and billing_module for the target database. */
|
|
288
|
+
export interface LimitEnforceRateParams {
|
|
289
|
+
meter_slug: string;
|
|
290
|
+
entity_field?: string;
|
|
291
|
+
entity_lookup?: {
|
|
292
|
+
obj_table: string;
|
|
293
|
+
obj_schema?: string;
|
|
294
|
+
obj_field: string;
|
|
295
|
+
};
|
|
194
296
|
actor_field?: string;
|
|
297
|
+
events?: ('INSERT' | 'UPDATE')[];
|
|
298
|
+
}
|
|
299
|
+
/** Declaratively attaches billing usage-recording triggers to a table. On INSERT the named meter is incremented via record_usage; on DELETE it is decremented (reversal). On UPDATE, if the entity_field changes, the old entity is decremented and the new entity is incremented. Requires a provisioned billing_module for the target database. */
|
|
300
|
+
export interface LimitTrackUsageParams {
|
|
301
|
+
meter_slug: string;
|
|
302
|
+
entity_field?: string;
|
|
303
|
+
entity_lookup?: {
|
|
304
|
+
obj_table: string;
|
|
305
|
+
obj_schema?: string;
|
|
306
|
+
obj_field: string;
|
|
307
|
+
};
|
|
308
|
+
quantity?: number;
|
|
195
309
|
events?: ('INSERT' | 'DELETE' | 'UPDATE')[];
|
|
196
310
|
}
|
|
311
|
+
/** Attaches an AFTER INSERT trigger that checks if the entity's aggregate usage has crossed any warning threshold configured in the limit_warnings table. If a threshold is reached for the first time, enqueues a background job (e.g. email notification). Uses limit_warning_state for one-time dedup per warning/actor/entity triple. Requires a provisioned limits_module with limit_warnings and aggregate limits enabled. */
|
|
312
|
+
export interface LimitWarningAggregateParams {
|
|
313
|
+
limit_name: string;
|
|
314
|
+
scope?: string;
|
|
315
|
+
entity_field?: string;
|
|
316
|
+
entity_lookup?: {
|
|
317
|
+
obj_table: string;
|
|
318
|
+
obj_schema?: string;
|
|
319
|
+
obj_field: string;
|
|
320
|
+
};
|
|
321
|
+
}
|
|
322
|
+
/** Attaches an AFTER INSERT trigger that checks if the actor's current usage has crossed any warning threshold configured in the limit_warnings table. If a threshold is reached for the first time, enqueues a background job (e.g. email notification). Uses limit_warning_state for one-time dedup per warning/actor pair. Requires a provisioned limits_module with limit_warnings enabled. */
|
|
323
|
+
export interface LimitWarningCounterParams {
|
|
324
|
+
limit_name: string;
|
|
325
|
+
scope?: string;
|
|
326
|
+
actor_field?: string;
|
|
327
|
+
entity_field?: string;
|
|
328
|
+
entity_lookup?: {
|
|
329
|
+
obj_table: string;
|
|
330
|
+
obj_schema?: string;
|
|
331
|
+
obj_field: string;
|
|
332
|
+
};
|
|
333
|
+
}
|
|
334
|
+
/** Attaches an AFTER INSERT trigger that checks if the actor's current request count in the active sliding window has crossed any warning threshold configured in the limit_warnings table. If a threshold is reached for the first time, enqueues a background job (e.g. email notification). Uses limit_warning_state for one-time dedup per warning/actor pair. Requires both a limits_module with limit_warnings enabled and a rate_limit_meters_module. */
|
|
335
|
+
export interface LimitWarningRateParams {
|
|
336
|
+
meter_slug: string;
|
|
337
|
+
scope?: string;
|
|
338
|
+
entity_field?: string;
|
|
339
|
+
entity_lookup?: {
|
|
340
|
+
obj_table: string;
|
|
341
|
+
obj_schema?: string;
|
|
342
|
+
obj_field: string;
|
|
343
|
+
};
|
|
344
|
+
actor_field?: string;
|
|
345
|
+
}
|
|
197
346
|
/** 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. */
|
|
198
347
|
export interface SearchBm25Params {
|
|
199
348
|
field_name: string;
|
|
@@ -262,6 +411,8 @@ export interface SearchUnifiedParams {
|
|
|
262
411
|
index_method?: 'hnsw' | 'ivfflat';
|
|
263
412
|
metric?: 'cosine' | 'l2' | 'ip';
|
|
264
413
|
source_fields?: string[];
|
|
414
|
+
embedding_model?: string;
|
|
415
|
+
embedding_provider?: string;
|
|
265
416
|
search_score_weight?: number;
|
|
266
417
|
chunks?: {
|
|
267
418
|
content_field_name?: string;
|
|
@@ -298,6 +449,8 @@ export interface SearchVectorParams {
|
|
|
298
449
|
[key: string]: unknown;
|
|
299
450
|
};
|
|
300
451
|
source_fields?: string[];
|
|
452
|
+
embedding_model?: string;
|
|
453
|
+
embedding_provider?: string;
|
|
301
454
|
enqueue_job?: boolean;
|
|
302
455
|
job_task_name?: string;
|
|
303
456
|
chunks?: {
|
|
@@ -347,6 +500,8 @@ export interface ProcessChunksParams {
|
|
|
347
500
|
chunk_strategy?: 'fixed' | 'sentence' | 'paragraph' | 'semantic';
|
|
348
501
|
dimensions?: number;
|
|
349
502
|
metric?: 'cosine' | 'l2' | 'ip';
|
|
503
|
+
embedding_model?: string;
|
|
504
|
+
embedding_provider?: string;
|
|
350
505
|
chunks_table_name?: string;
|
|
351
506
|
metadata_fields?: string[];
|
|
352
507
|
search_indexes?: ('fulltext' | 'bm25' | 'trigram')[];
|
|
@@ -359,6 +514,29 @@ export interface ProcessChunksParams {
|
|
|
359
514
|
enqueue_chunking_job?: boolean;
|
|
360
515
|
chunking_task_name?: string;
|
|
361
516
|
}
|
|
517
|
+
/** Creates extraction output fields and a job trigger for file text extraction. Fires when a file is uploaded (status = 'uploaded') or on INSERT. The external worker extracts text/metadata from the file (PDF, DOCX, HTML, etc.) and writes the result back to the configured output fields. Typically used upstream of ProcessFileEmbedding or ProcessChunks. */
|
|
518
|
+
export interface ProcessExtractionParams {
|
|
519
|
+
text_field?: string;
|
|
520
|
+
metadata_field?: string;
|
|
521
|
+
extraction_model?: string;
|
|
522
|
+
extraction_provider?: string;
|
|
523
|
+
mime_patterns?: string[];
|
|
524
|
+
task_identifier?: string;
|
|
525
|
+
events?: ('INSERT' | 'UPDATE')[];
|
|
526
|
+
payload_custom?: {
|
|
527
|
+
[key: string]: unknown;
|
|
528
|
+
};
|
|
529
|
+
trigger_conditions?: TriggerCondition | TriggerCondition[];
|
|
530
|
+
entity_field?: string;
|
|
531
|
+
entity_lookup?: {
|
|
532
|
+
obj_table: string;
|
|
533
|
+
obj_schema?: string;
|
|
534
|
+
obj_field: string;
|
|
535
|
+
};
|
|
536
|
+
queue_name?: string;
|
|
537
|
+
max_attempts?: number;
|
|
538
|
+
priority?: number;
|
|
539
|
+
}
|
|
362
540
|
/** Generic, MIME-scoped embedding node for file tables. Supports two modes: direct (whole-file to single vector, e.g. CLIP for images) when extraction is omitted, or extract (file to text to chunks to per-chunk vectors) when extraction config is provided. Composes SearchVector + JobTrigger + ProcessChunks (enabled by default in extract mode) internally. Multiple instances can coexist on the same table with different MIME scopes, field names, and embedding strategies. */
|
|
363
541
|
export interface ProcessFileEmbeddingParams {
|
|
364
542
|
field_name?: string;
|
|
@@ -368,6 +546,8 @@ export interface ProcessFileEmbeddingParams {
|
|
|
368
546
|
index_options?: {
|
|
369
547
|
[key: string]: unknown;
|
|
370
548
|
};
|
|
549
|
+
embedding_model?: string;
|
|
550
|
+
embedding_provider?: string;
|
|
371
551
|
mime_patterns?: string[];
|
|
372
552
|
task_identifier?: string;
|
|
373
553
|
events?: ('INSERT' | 'UPDATE')[];
|
|
@@ -392,6 +572,7 @@ export interface ProcessFileEmbeddingParams {
|
|
|
392
572
|
chunk_overlap?: number;
|
|
393
573
|
chunk_strategy?: 'fixed' | 'sentence' | 'paragraph' | 'semantic';
|
|
394
574
|
metadata_fields?: string[];
|
|
575
|
+
search_indexes?: ('fulltext' | 'bm25' | 'trigram')[];
|
|
395
576
|
enqueue_chunking_job?: boolean;
|
|
396
577
|
chunking_task_name?: string;
|
|
397
578
|
};
|
|
@@ -405,6 +586,8 @@ export interface ProcessImageEmbeddingParams {
|
|
|
405
586
|
index_options?: {
|
|
406
587
|
[key: string]: unknown;
|
|
407
588
|
};
|
|
589
|
+
embedding_model?: string;
|
|
590
|
+
embedding_provider?: string;
|
|
408
591
|
mime_patterns?: string[];
|
|
409
592
|
task_identifier?: string;
|
|
410
593
|
events?: ('INSERT' | 'UPDATE')[];
|
|
@@ -434,27 +617,6 @@ export interface ProcessImageEmbeddingParams {
|
|
|
434
617
|
chunking_task_name?: string;
|
|
435
618
|
};
|
|
436
619
|
}
|
|
437
|
-
/** Creates extraction output fields and a job trigger for file text extraction. Fires when a file is uploaded (status = 'uploaded') or on INSERT. The external worker extracts text/metadata from the file (PDF, DOCX, HTML, etc.) and writes the result back to the configured output fields. Typically used upstream of ProcessFileEmbedding or ProcessChunks. */
|
|
438
|
-
export interface ProcessExtractionParams {
|
|
439
|
-
text_field?: string;
|
|
440
|
-
metadata_field?: string;
|
|
441
|
-
mime_patterns?: string[];
|
|
442
|
-
task_identifier?: string;
|
|
443
|
-
events?: ('INSERT' | 'UPDATE')[];
|
|
444
|
-
payload_custom?: {
|
|
445
|
-
[key: string]: unknown;
|
|
446
|
-
};
|
|
447
|
-
trigger_conditions?: TriggerCondition | TriggerCondition[];
|
|
448
|
-
entity_field?: string;
|
|
449
|
-
entity_lookup?: {
|
|
450
|
-
obj_table: string;
|
|
451
|
-
obj_schema?: string;
|
|
452
|
-
obj_field: string;
|
|
453
|
-
};
|
|
454
|
-
queue_name?: string;
|
|
455
|
-
max_attempts?: number;
|
|
456
|
-
priority?: number;
|
|
457
|
-
}
|
|
458
620
|
/** Creates a job trigger for image variant generation. Fires when an image file is uploaded (status = 'uploaded') or on INSERT. The external worker generates resized, cropped, or reformatted versions (thumbnails, previews, WebP conversions, etc.) and stores them as new file records linked to the source image. */
|
|
459
621
|
export interface ProcessImageVersionsParams {
|
|
460
622
|
versions: {
|
|
@@ -547,6 +709,16 @@ export interface AuthzOrgHierarchyParams {
|
|
|
547
709
|
anchor_field: string;
|
|
548
710
|
max_depth?: number;
|
|
549
711
|
}
|
|
712
|
+
/** Compound policy: the row must be owned by the current user (owner_field = current_user_id) AND the current user must be a member of the entity referenced by entity_field. Combines direct ownership with entity membership — the actor can only access rows they own within entities they belong to. */
|
|
713
|
+
export interface AuthzMemberOwnerParams {
|
|
714
|
+
owner_field: string;
|
|
715
|
+
entity_field: string;
|
|
716
|
+
sel_field?: string;
|
|
717
|
+
membership_type?: number | string;
|
|
718
|
+
entity_type?: string;
|
|
719
|
+
permission?: string;
|
|
720
|
+
permissions?: string[];
|
|
721
|
+
}
|
|
550
722
|
/** Peer visibility through shared entity membership. Authorizes access to user-owned rows when the owner and current user are both members of the same entity. Self-joins the SPRT table to find peers. */
|
|
551
723
|
export interface AuthzPeerOwnershipParams {
|
|
552
724
|
owner_field: string;
|
|
@@ -721,19 +893,19 @@ export interface ViewTableProjectionParams {
|
|
|
721
893
|
export interface BlueprintField {
|
|
722
894
|
/** The column name. */
|
|
723
895
|
name: string;
|
|
724
|
-
/**
|
|
725
|
-
type: string;
|
|
896
|
+
/** PostgreSQL type as a FieldType object (e.g., { name: "text" }) or legacy string. */
|
|
897
|
+
type: FieldType | string;
|
|
726
898
|
/** Whether the column has a NOT NULL constraint. */
|
|
727
899
|
is_required?: boolean;
|
|
728
|
-
/**
|
|
729
|
-
default_value?: string;
|
|
900
|
+
/** Default value as a FieldDefault object (e.g., { function: "now" }) or legacy string. */
|
|
901
|
+
default_value?: FieldDefault | string;
|
|
730
902
|
/** Comment/description for this field. */
|
|
731
903
|
description?: string;
|
|
732
904
|
}
|
|
733
905
|
/** An RLS policy entry for a blueprint table. Uses $type to match the blueprint JSON convention. */
|
|
734
906
|
export interface BlueprintPolicy {
|
|
735
907
|
/** Authz* policy type name (e.g., "AuthzDirectOwner", "AuthzAllowAll"). */
|
|
736
|
-
$type: 'AuthzAllowAll' | 'AuthzAppMembership' | 'AuthzComposite' | 'AuthzDenyAll' | 'AuthzFilePath' | 'AuthzDirectOwner' | 'AuthzDirectOwnerAny' | 'AuthzEntityMembership' | 'AuthzMemberList' | 'AuthzNotReadOnly' | 'AuthzOrgHierarchy' | 'AuthzPeerOwnership' | 'AuthzPublishable' | 'AuthzRelatedEntityMembership' | 'AuthzRelatedMemberList' | 'AuthzRelatedPeerOwnership' | 'AuthzTemporal';
|
|
908
|
+
$type: 'AuthzAllowAll' | 'AuthzAppMembership' | 'AuthzComposite' | 'AuthzDenyAll' | 'AuthzFilePath' | 'AuthzDirectOwner' | 'AuthzDirectOwnerAny' | 'AuthzEntityMembership' | 'AuthzMemberList' | 'AuthzNotReadOnly' | 'AuthzOrgHierarchy' | 'AuthzMemberOwner' | 'AuthzPeerOwnership' | 'AuthzPublishable' | 'AuthzRelatedEntityMembership' | 'AuthzRelatedMemberList' | 'AuthzRelatedPeerOwnership' | 'AuthzTemporal';
|
|
737
909
|
/** Privileges this policy applies to (e.g., ["select"], ["insert", "update", "delete"]). */
|
|
738
910
|
privileges?: string[];
|
|
739
911
|
/** Whether this policy is permissive (true) or restrictive (false). Defaults to true. */
|
|
@@ -830,7 +1002,7 @@ export interface BlueprintTableUniqueConstraint {
|
|
|
830
1002
|
/** Optional schema name override. */
|
|
831
1003
|
schema_name?: string;
|
|
832
1004
|
}
|
|
833
|
-
/** A bucket seed entry for
|
|
1005
|
+
/** A bucket seed entry for storage.buckets[]. Creates an initial bucket row in the {prefix}_buckets table during entity type provisioning. Only used for app-level storage (not entity-scoped). */
|
|
834
1006
|
export interface BlueprintBucketSeed {
|
|
835
1007
|
/** Bucket key name (e.g., "avatars", "documents"). Becomes the key column value. */
|
|
836
1008
|
name: string;
|
|
@@ -906,6 +1078,74 @@ export interface BlueprintAchievement {
|
|
|
906
1078
|
/** Entity prefix to scope this achievement to (e.g., "org", "app"). Used to resolve the correct events_module. Defaults to "app". */
|
|
907
1079
|
entity_prefix?: string;
|
|
908
1080
|
}
|
|
1081
|
+
/** Namespace module configuration. When used at the top level of a blueprint, the scope field controls whether namespaces are app-level ("app", default) or org-level ("org"). When used inside entity_types[], scope is inherited from the entity type. Provisions a namespaces table with computed-name proxy, rename trigger, and entity-scoped RLS. */
|
|
1082
|
+
export interface BlueprintNamespaceConfig {
|
|
1083
|
+
/** Namespace scope. "app" (default) creates app-level namespaces (membership_type = NULL). "org" creates per-org namespaces. Only used at the top level of a blueprint definition — entity-scoped namespaces inherit scope from the entity type. */
|
|
1084
|
+
scope?: 'app' | 'org';
|
|
1085
|
+
/** Module discriminator for multi-module namespaces. Defaults to "default" (omitted from table names). Non-default keys appear as an infix: {prefix}_{key}_namespaces. */
|
|
1086
|
+
key?: string;
|
|
1087
|
+
/** RLS policy overrides for the namespaces table. NULL = apply defaults from apply_namespace_security(). */
|
|
1088
|
+
policies?: BlueprintPolicy[];
|
|
1089
|
+
/** Per-table overrides for namespace tables. Each key targets a specific table (namespaces, namespace_events) and uses the same shape as table_provision: { nodes, fields, grants, use_rls, policies }. Fanned out to secure_table_provision. */
|
|
1090
|
+
provisions?: {
|
|
1091
|
+
namespaces?: BlueprintEntityTableProvision;
|
|
1092
|
+
namespace_events?: BlueprintEntityTableProvision;
|
|
1093
|
+
};
|
|
1094
|
+
}
|
|
1095
|
+
/** Function module configuration. When used at the top level of a blueprint, the scope field controls whether functions are app-level ("app", default) or org-level ("org"). When used inside entity_types[], scope is inherited from the entity type. Provisions function_definitions, function_invocations (partitioned, 12-month retention), and function_execution_logs tables. */
|
|
1096
|
+
export interface BlueprintFunctionConfig {
|
|
1097
|
+
/** Function scope. "app" (default) creates app-level functions (membership_type = NULL). "org" creates per-org functions. Only used at the top level of a blueprint definition — entity-scoped functions inherit scope from the entity type. */
|
|
1098
|
+
scope?: 'app' | 'org';
|
|
1099
|
+
/** Module discriminator for multi-module functions. Defaults to "default" (omitted from table names). Non-default keys appear as an infix: {prefix}_{key}_function_definitions. */
|
|
1100
|
+
key?: string;
|
|
1101
|
+
/** RLS policy overrides for the function tables. NULL = apply defaults from apply_function_security(). */
|
|
1102
|
+
policies?: BlueprintPolicy[];
|
|
1103
|
+
/** Per-table overrides for function tables. Each key targets a specific table (definitions, invocations, execution_logs) and uses the same shape as table_provision: { nodes, fields, grants, use_rls, policies }. Fanned out to secure_table_provision. */
|
|
1104
|
+
provisions?: {
|
|
1105
|
+
definitions?: BlueprintEntityTableProvision;
|
|
1106
|
+
invocations?: BlueprintEntityTableProvision;
|
|
1107
|
+
execution_logs?: BlueprintEntityTableProvision;
|
|
1108
|
+
};
|
|
1109
|
+
}
|
|
1110
|
+
/** Agent module configuration. When used at the top level of a blueprint, the scope field controls whether agents are app-level ("app", default) or org-level ("org"). When used inside entity_types[], scope is inherited from the entity type. Provisions thread, message, task, prompt tables (and optionally knowledge with vector embeddings). */
|
|
1111
|
+
export interface BlueprintAgentConfig {
|
|
1112
|
+
/** Agent scope. "app" (default) creates app-level agent tables (membership_type = NULL). "org" creates per-org agent tables. Only used at the top level of a blueprint definition — entity-scoped agents inherit scope from the entity type. */
|
|
1113
|
+
scope?: 'app' | 'org';
|
|
1114
|
+
/** Module discriminator for multi-module agents. Defaults to "default" (omitted from table names). Non-default keys appear as an infix: {prefix}_{key}_agent_thread. */
|
|
1115
|
+
key?: string;
|
|
1116
|
+
/** API name for the agent module. Used in GraphQL naming. Defaults to "agent". */
|
|
1117
|
+
api_name?: string;
|
|
1118
|
+
/** Whether to provision the agent_knowledge table with vector embeddings, tags, and trigger_phrases. Also inferred when a "knowledge" key is present. Defaults to false. */
|
|
1119
|
+
has_knowledge?: boolean;
|
|
1120
|
+
/** Knowledge configuration overrides. Set has_chunks to false to disable the chunking pipeline. Controls vector dimensions, chunking strategy, embedding model/provider, and text search indexes for the agent_knowledge table. Presence implies has_knowledge = true. */
|
|
1121
|
+
knowledge?: {
|
|
1122
|
+
has_chunks?: boolean;
|
|
1123
|
+
dimensions?: number;
|
|
1124
|
+
chunk_size?: number;
|
|
1125
|
+
chunk_overlap?: number;
|
|
1126
|
+
chunk_strategy?: 'fixed' | 'sentence' | 'paragraph' | 'semantic';
|
|
1127
|
+
embedding_model?: string;
|
|
1128
|
+
embedding_provider?: string;
|
|
1129
|
+
search_indexes?: ('fulltext' | 'bm25' | 'trigram')[];
|
|
1130
|
+
};
|
|
1131
|
+
/** RLS policy overrides for the agent tables. NULL = apply defaults from apply_agent_security(). */
|
|
1132
|
+
policies?: BlueprintPolicy[];
|
|
1133
|
+
/** Per-table overrides for agent tables. Each key targets a specific table (thread, message, task, prompt, knowledge) and uses the same shape as table_provision: { nodes, fields, grants, use_rls, policies }. Fanned out to secure_table_provision. */
|
|
1134
|
+
provisions?: {
|
|
1135
|
+
thread?: BlueprintEntityTableProvision;
|
|
1136
|
+
message?: BlueprintEntityTableProvision;
|
|
1137
|
+
task?: BlueprintEntityTableProvision;
|
|
1138
|
+
prompt?: BlueprintEntityTableProvision;
|
|
1139
|
+
knowledge?: BlueprintEntityTableProvision;
|
|
1140
|
+
};
|
|
1141
|
+
}
|
|
1142
|
+
/** Graph module configuration. Presence triggers permission registration (manage_graphs, execute_graphs). The graph module requires a merkle_store_module_id dependency, so entity_type_provision only registers permissions here — the graph module itself must be provisioned separately. */
|
|
1143
|
+
export interface BlueprintGraphConfig {
|
|
1144
|
+
/** Module discriminator for multi-module graphs. Defaults to "default". */
|
|
1145
|
+
key?: string;
|
|
1146
|
+
/** RLS policy overrides for the graph tables. NULL = apply defaults from apply_graph_security(). */
|
|
1147
|
+
policies?: BlueprintPolicy[];
|
|
1148
|
+
}
|
|
909
1149
|
/** Override object for the entity table created by a BlueprintEntityType. Shape mirrors BlueprintTable / secure_table_provision vocabulary. When supplied, policies[] replaces the default entity-table policies entirely. */
|
|
910
1150
|
export interface BlueprintEntityTableProvision {
|
|
911
1151
|
/** Whether to enable RLS on the entity table. Forwarded to secure_table_provision. Defaults to true. */
|
|
@@ -950,11 +1190,19 @@ export interface BlueprintEntityType {
|
|
|
950
1190
|
skip_entity_policies?: boolean;
|
|
951
1191
|
/** Override for the entity table. Shape mirrors BlueprintTable / secure_table_provision vocabulary. When supplied, its policies[] replaces the five default entity-table policies; is_visible becomes a no-op. When NULL (default), the five default policies are applied (gated by is_visible). */
|
|
952
1192
|
table_provision?: BlueprintEntityTableProvision;
|
|
953
|
-
/** Storage configuration
|
|
1193
|
+
/** Storage module configuration array. Presence triggers provisioning (same inference model as namespaces, functions, agents). Each entry provisions a separate storage module with its own tables, RLS, and settings. Each entry may specify a storage_key for multi-module support (defaults to "default"). */
|
|
954
1194
|
storage?: BlueprintStorageConfig[];
|
|
1195
|
+
/** Namespace module configuration array. Presence triggers provisioning. Each entry provisions a namespace_module with its own tables, computed-name proxy, and entity-scoped RLS. Registers manage_namespaces permission bit. "[{}]" = provision one default namespace module. */
|
|
1196
|
+
namespaces?: BlueprintNamespaceConfig[];
|
|
1197
|
+
/** Function module configuration array. Presence triggers provisioning. Each entry provisions function_definitions, function_invocations (partitioned), and function_execution_logs tables. Registers manage_functions + invoke_functions permission bits. "[{}]" = provision one default function module. */
|
|
1198
|
+
functions?: BlueprintFunctionConfig[];
|
|
1199
|
+
/** Agent module configuration array. Presence triggers provisioning. Each entry provisions thread, message, task, prompt tables (and optionally knowledge with vector embeddings). "[{}]" = provision one default agent module. */
|
|
1200
|
+
agents?: BlueprintAgentConfig[];
|
|
1201
|
+
/** Graph module configuration array. Presence triggers permission registration (manage_graphs, execute_graphs). Graph module requires a merkle_store_module_id dependency, so entity_type_provision only registers permissions here. "[{}]" = register default graph permissions. */
|
|
1202
|
+
graphs?: BlueprintGraphConfig[];
|
|
955
1203
|
}
|
|
956
1204
|
/** String shorthand -- just the node type name. */
|
|
957
|
-
export type BlueprintNodeShorthand = 'AuthzAllowAll' | 'AuthzAppMembership' | 'AuthzComposite' | 'AuthzDenyAll' | 'AuthzFilePath' | 'AuthzDirectOwner' | 'AuthzDirectOwnerAny' | 'AuthzEntityMembership' | 'AuthzMemberList' | 'AuthzNotReadOnly' | 'AuthzOrgHierarchy' | 'AuthzPeerOwnership' | 'AuthzPublishable' | 'AuthzRelatedEntityMembership' | 'AuthzRelatedMemberList' | 'AuthzRelatedPeerOwnership' | 'AuthzTemporal' | 'CheckGreaterThan' | 'CheckLessThan' | 'CheckNotEqual' | 'CheckOneOf' | '
|
|
1205
|
+
export type BlueprintNodeShorthand = 'AuthzAllowAll' | 'AuthzAppMembership' | 'AuthzComposite' | 'AuthzDenyAll' | 'AuthzFilePath' | 'AuthzDirectOwner' | 'AuthzDirectOwnerAny' | 'AuthzEntityMembership' | 'AuthzMemberList' | 'AuthzNotReadOnly' | 'AuthzOrgHierarchy' | 'AuthzMemberOwner' | 'AuthzPeerOwnership' | 'AuthzPublishable' | 'AuthzRelatedEntityMembership' | 'AuthzRelatedMemberList' | 'AuthzRelatedPeerOwnership' | 'AuthzTemporal' | 'CheckGreaterThan' | 'CheckLessThan' | 'CheckNotEqual' | 'CheckOneOf' | 'DataBulk' | 'DataCompositeField' | 'DataDirectOwner' | 'DataEntityMembership' | 'DataForceCurrentUser' | 'DataId' | 'DataImmutableFields' | 'DataInflection' | 'DataInheritFromParent' | 'DataJsonb' | 'DataMemberOwner' | 'DataOwnedFields' | 'DataOwnershipInEntity' | 'DataPeoplestamps' | 'DataPublishable' | 'DataRealtime' | 'DataSlug' | 'DataSoftDelete' | 'DataStatusField' | 'DataTags' | 'DataTimestamps' | 'SearchBm25' | 'SearchFullText' | 'SearchSpatial' | 'SearchSpatialAggregate' | 'SearchTrgm' | 'SearchUnified' | 'SearchVector' | 'TableOrganizationSettings' | 'TableUserProfiles' | 'TableUserSettings' | 'EventReferral' | 'EventTracker' | 'JobTrigger' | 'LimitEnforceAggregate' | 'LimitEnforceCounter' | 'LimitEnforceFeature' | 'LimitEnforceRate' | 'LimitTrackUsage' | 'LimitWarningAggregate' | 'LimitWarningCounter' | 'LimitWarningRate' | 'ProcessChunks' | 'ProcessExtraction' | 'ProcessFileEmbedding' | 'ProcessImageEmbedding' | 'ProcessImageVersions';
|
|
958
1206
|
/** Object form -- { $type, data } with typed parameters. */
|
|
959
1207
|
export type BlueprintNodeObject = {
|
|
960
1208
|
$type: 'AuthzAllowAll';
|
|
@@ -989,6 +1237,9 @@ export type BlueprintNodeObject = {
|
|
|
989
1237
|
} | {
|
|
990
1238
|
$type: 'AuthzOrgHierarchy';
|
|
991
1239
|
data: AuthzOrgHierarchyParams;
|
|
1240
|
+
} | {
|
|
1241
|
+
$type: 'AuthzMemberOwner';
|
|
1242
|
+
data: AuthzMemberOwnerParams;
|
|
992
1243
|
} | {
|
|
993
1244
|
$type: 'AuthzPeerOwnership';
|
|
994
1245
|
data: AuthzPeerOwnershipParams;
|
|
@@ -1019,18 +1270,9 @@ export type BlueprintNodeObject = {
|
|
|
1019
1270
|
} | {
|
|
1020
1271
|
$type: 'CheckOneOf';
|
|
1021
1272
|
data: CheckOneOfParams;
|
|
1022
|
-
} | {
|
|
1023
|
-
$type: 'LimitAggregate';
|
|
1024
|
-
data: LimitAggregateParams;
|
|
1025
|
-
} | {
|
|
1026
|
-
$type: 'BillingMeter';
|
|
1027
|
-
data: BillingMeterParams;
|
|
1028
1273
|
} | {
|
|
1029
1274
|
$type: 'DataBulk';
|
|
1030
1275
|
data: DataBulkParams;
|
|
1031
|
-
} | {
|
|
1032
|
-
$type: 'ProcessChunks';
|
|
1033
|
-
data: ProcessChunksParams;
|
|
1034
1276
|
} | {
|
|
1035
1277
|
$type: 'DataCompositeField';
|
|
1036
1278
|
data: DataCompositeFieldParams;
|
|
@@ -1040,21 +1282,12 @@ export type BlueprintNodeObject = {
|
|
|
1040
1282
|
} | {
|
|
1041
1283
|
$type: 'DataEntityMembership';
|
|
1042
1284
|
data: DataEntityMembershipParams;
|
|
1043
|
-
} | {
|
|
1044
|
-
$type: 'ProcessFileEmbedding';
|
|
1045
|
-
data: ProcessFileEmbeddingParams;
|
|
1046
|
-
} | {
|
|
1047
|
-
$type: 'LimitFeatureFlag';
|
|
1048
|
-
data: LimitFeatureFlagParams;
|
|
1049
1285
|
} | {
|
|
1050
1286
|
$type: 'DataForceCurrentUser';
|
|
1051
1287
|
data: DataForceCurrentUserParams;
|
|
1052
1288
|
} | {
|
|
1053
1289
|
$type: 'DataId';
|
|
1054
1290
|
data: DataIdParams;
|
|
1055
|
-
} | {
|
|
1056
|
-
$type: 'ProcessImageEmbedding';
|
|
1057
|
-
data: ProcessImageEmbeddingParams;
|
|
1058
1291
|
} | {
|
|
1059
1292
|
$type: 'DataImmutableFields';
|
|
1060
1293
|
data: DataImmutableFieldsParams;
|
|
@@ -1064,24 +1297,15 @@ export type BlueprintNodeObject = {
|
|
|
1064
1297
|
} | {
|
|
1065
1298
|
$type: 'DataInheritFromParent';
|
|
1066
1299
|
data: DataInheritFromParentParams;
|
|
1067
|
-
} | {
|
|
1068
|
-
$type: 'JobTrigger';
|
|
1069
|
-
data: JobTriggerParams;
|
|
1070
|
-
} | {
|
|
1071
|
-
$type: 'LimitCounter';
|
|
1072
|
-
data: LimitCounterParams;
|
|
1073
1300
|
} | {
|
|
1074
1301
|
$type: 'DataJsonb';
|
|
1075
1302
|
data: DataJsonbParams;
|
|
1303
|
+
} | {
|
|
1304
|
+
$type: 'DataMemberOwner';
|
|
1305
|
+
data: DataMemberOwnerParams;
|
|
1076
1306
|
} | {
|
|
1077
1307
|
$type: 'DataOwnedFields';
|
|
1078
1308
|
data: DataOwnedFieldsParams;
|
|
1079
|
-
} | {
|
|
1080
|
-
$type: 'ProcessExtraction';
|
|
1081
|
-
data: ProcessExtractionParams;
|
|
1082
|
-
} | {
|
|
1083
|
-
$type: 'ProcessImageVersions';
|
|
1084
|
-
data: ProcessImageVersionsParams;
|
|
1085
1309
|
} | {
|
|
1086
1310
|
$type: 'DataOwnershipInEntity';
|
|
1087
1311
|
data: DataOwnershipInEntityParams;
|
|
@@ -1139,6 +1363,54 @@ export type BlueprintNodeObject = {
|
|
|
1139
1363
|
} | {
|
|
1140
1364
|
$type: 'TableUserSettings';
|
|
1141
1365
|
data?: Record<string, never>;
|
|
1366
|
+
} | {
|
|
1367
|
+
$type: 'EventReferral';
|
|
1368
|
+
data: EventReferralParams;
|
|
1369
|
+
} | {
|
|
1370
|
+
$type: 'EventTracker';
|
|
1371
|
+
data: EventTrackerParams;
|
|
1372
|
+
} | {
|
|
1373
|
+
$type: 'JobTrigger';
|
|
1374
|
+
data: JobTriggerParams;
|
|
1375
|
+
} | {
|
|
1376
|
+
$type: 'LimitEnforceAggregate';
|
|
1377
|
+
data: LimitEnforceAggregateParams;
|
|
1378
|
+
} | {
|
|
1379
|
+
$type: 'LimitEnforceCounter';
|
|
1380
|
+
data: LimitEnforceCounterParams;
|
|
1381
|
+
} | {
|
|
1382
|
+
$type: 'LimitEnforceFeature';
|
|
1383
|
+
data: LimitEnforceFeatureParams;
|
|
1384
|
+
} | {
|
|
1385
|
+
$type: 'LimitEnforceRate';
|
|
1386
|
+
data: LimitEnforceRateParams;
|
|
1387
|
+
} | {
|
|
1388
|
+
$type: 'LimitTrackUsage';
|
|
1389
|
+
data: LimitTrackUsageParams;
|
|
1390
|
+
} | {
|
|
1391
|
+
$type: 'LimitWarningAggregate';
|
|
1392
|
+
data: LimitWarningAggregateParams;
|
|
1393
|
+
} | {
|
|
1394
|
+
$type: 'LimitWarningCounter';
|
|
1395
|
+
data: LimitWarningCounterParams;
|
|
1396
|
+
} | {
|
|
1397
|
+
$type: 'LimitWarningRate';
|
|
1398
|
+
data: LimitWarningRateParams;
|
|
1399
|
+
} | {
|
|
1400
|
+
$type: 'ProcessChunks';
|
|
1401
|
+
data: ProcessChunksParams;
|
|
1402
|
+
} | {
|
|
1403
|
+
$type: 'ProcessExtraction';
|
|
1404
|
+
data: ProcessExtractionParams;
|
|
1405
|
+
} | {
|
|
1406
|
+
$type: 'ProcessFileEmbedding';
|
|
1407
|
+
data: ProcessFileEmbeddingParams;
|
|
1408
|
+
} | {
|
|
1409
|
+
$type: 'ProcessImageEmbedding';
|
|
1410
|
+
data: ProcessImageEmbeddingParams;
|
|
1411
|
+
} | {
|
|
1412
|
+
$type: 'ProcessImageVersions';
|
|
1413
|
+
data: ProcessImageVersionsParams;
|
|
1142
1414
|
};
|
|
1143
1415
|
/** A node entry in a blueprint table. Either a string shorthand or a typed object. */
|
|
1144
1416
|
export type BlueprintNode = BlueprintNodeShorthand | BlueprintNodeObject;
|
|
@@ -1220,4 +1492,10 @@ export interface BlueprintDefinition {
|
|
|
1220
1492
|
storage?: BlueprintStorageConfig[];
|
|
1221
1493
|
/** Achievement definitions. Each entry creates a level with requirements and optional rewards in the events_module. Requires events_module to be provisioned (e.g., via entity_types[].has_levels = true or modules includes events_module). */
|
|
1222
1494
|
achievements?: BlueprintAchievement[];
|
|
1495
|
+
/** Top-level namespace configuration array (Phase 0.6). Each entry has an optional scope ("app" or "org"). App-scoped (default) creates namespace_module with membership_type = NULL. Org-scoped creates per-org namespaces. For entity-scoped namespaces, use entity_types[].namespaces instead. */
|
|
1496
|
+
namespaces?: BlueprintNamespaceConfig[];
|
|
1497
|
+
/** Top-level function configuration array (Phase 0.6). Each entry has an optional scope ("app" or "org"). App-scoped (default) creates function_module with membership_type = NULL. Org-scoped creates per-org functions. For entity-scoped functions, use entity_types[].functions instead. */
|
|
1498
|
+
functions?: BlueprintFunctionConfig[];
|
|
1499
|
+
/** Top-level agent configuration array (Phase 0.6). Each entry has an optional scope ("app" or "org"). App-scoped (default) creates agent_module with membership_type = NULL. Org-scoped creates per-org agents. For entity-scoped agents, use entity_types[].agents instead. */
|
|
1500
|
+
agents?: BlueprintAgentConfig[];
|
|
1223
1501
|
}
|