node-type-registry 0.33.1 → 0.35.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/blueprint-types.generated.d.ts +256 -59
- package/blueprint-types.generated.js +30 -0
- package/codegen/generate-types.js +3 -1
- package/data/data-aggregate-limit-counter.d.ts +1 -1
- package/data/data-aggregate-limit-counter.js +4 -4
- package/data/data-billing-meter.d.ts +1 -1
- package/data/data-billing-meter.js +4 -4
- package/data/data-bulk.d.ts +2 -0
- package/data/data-bulk.js +40 -0
- package/data/data-chunks.d.ts +2 -2
- package/data/data-chunks.js +6 -6
- package/data/data-feature-flag.d.ts +1 -1
- package/data/data-feature-flag.js +4 -4
- package/data/data-file-embedding.d.ts +1 -1
- package/data/data-file-embedding.js +8 -27
- package/data/data-image-embedding.d.ts +4 -4
- package/data/data-image-embedding.js +13 -31
- package/data/data-job-trigger.d.ts +1 -1
- package/data/data-job-trigger.js +4 -4
- package/data/data-limit-counter.d.ts +1 -1
- package/data/data-limit-counter.js +4 -4
- package/data/index.d.ts +11 -8
- package/data/index.js +15 -9
- package/data/process-extraction.d.ts +14 -0
- package/data/process-extraction.js +108 -0
- package/data/process-image-versions.d.ts +15 -0
- package/data/process-image-versions.js +139 -0
- package/data/search-vector.js +1 -16
- package/esm/blueprint-types.generated.d.ts +256 -59
- package/esm/blueprint-types.generated.js +30 -0
- package/esm/codegen/generate-types.js +3 -1
- package/esm/data/data-aggregate-limit-counter.d.ts +1 -1
- package/esm/data/data-aggregate-limit-counter.js +3 -3
- package/esm/data/data-billing-meter.d.ts +1 -1
- package/esm/data/data-billing-meter.js +3 -3
- package/esm/data/data-bulk.d.ts +2 -0
- package/esm/data/data-bulk.js +37 -0
- package/esm/data/data-chunks.d.ts +2 -2
- package/esm/data/data-chunks.js +5 -5
- package/esm/data/data-feature-flag.d.ts +1 -1
- package/esm/data/data-feature-flag.js +3 -3
- package/esm/data/data-file-embedding.d.ts +1 -1
- package/esm/data/data-file-embedding.js +7 -26
- package/esm/data/data-image-embedding.d.ts +4 -4
- package/esm/data/data-image-embedding.js +12 -30
- package/esm/data/data-job-trigger.d.ts +1 -1
- package/esm/data/data-job-trigger.js +3 -3
- package/esm/data/data-limit-counter.d.ts +1 -1
- package/esm/data/data-limit-counter.js +3 -3
- package/esm/data/index.d.ts +11 -8
- package/esm/data/index.js +11 -8
- package/esm/data/process-extraction.d.ts +14 -0
- package/esm/data/process-extraction.js +105 -0
- package/esm/data/process-image-versions.d.ts +15 -0
- package/esm/data/process-image-versions.js +136 -0
- package/esm/data/search-vector.js +1 -16
- package/esm/module-presets/auth-hardened.js +4 -2
- package/esm/module-presets/b2b-storage.js +4 -2
- package/esm/module-presets/b2b.js +4 -2
- package/module-presets/auth-hardened.js +4 -2
- package/module-presets/b2b-storage.js +4 -2
- package/module-presets/b2b.js +4 -2
- package/package.json +2 -2
|
@@ -12,18 +12,48 @@
|
|
|
12
12
|
* ===========================================================================
|
|
13
13
|
*/
|
|
14
14
|
;
|
|
15
|
+
/**
|
|
16
|
+
* ===========================================================================
|
|
17
|
+
* Billing node type parameters
|
|
18
|
+
* ===========================================================================
|
|
19
|
+
*/
|
|
20
|
+
;
|
|
21
|
+
/**
|
|
22
|
+
* ===========================================================================
|
|
23
|
+
* Check node type parameters
|
|
24
|
+
* ===========================================================================
|
|
25
|
+
*/
|
|
26
|
+
;
|
|
15
27
|
/**
|
|
16
28
|
* ===========================================================================
|
|
17
29
|
* Data node type parameters
|
|
18
30
|
* ===========================================================================
|
|
19
31
|
*/
|
|
20
32
|
;
|
|
33
|
+
/**
|
|
34
|
+
* ===========================================================================
|
|
35
|
+
* Limit node type parameters
|
|
36
|
+
* ===========================================================================
|
|
37
|
+
*/
|
|
38
|
+
;
|
|
21
39
|
/**
|
|
22
40
|
* ===========================================================================
|
|
23
41
|
* Search node type parameters
|
|
24
42
|
* ===========================================================================
|
|
25
43
|
*/
|
|
26
44
|
;
|
|
45
|
+
/**
|
|
46
|
+
* ===========================================================================
|
|
47
|
+
* Job node type parameters
|
|
48
|
+
* ===========================================================================
|
|
49
|
+
*/
|
|
50
|
+
;
|
|
51
|
+
/**
|
|
52
|
+
* ===========================================================================
|
|
53
|
+
* Process node type parameters
|
|
54
|
+
* ===========================================================================
|
|
55
|
+
*/
|
|
56
|
+
;
|
|
27
57
|
/**
|
|
28
58
|
* ===========================================================================
|
|
29
59
|
* Authz node type parameters
|
|
@@ -485,6 +485,8 @@ function buildBlueprintStorageConfig() {
|
|
|
485
485
|
addJSDoc(optionalProp('download_url_expiry_seconds', t.tsNumberKeyword()), 'Override for presigned download URL expiry time in seconds.'),
|
|
486
486
|
addJSDoc(optionalProp('default_max_file_size', t.tsNumberKeyword()), 'Default maximum file size in bytes for the storage module.'),
|
|
487
487
|
addJSDoc(optionalProp('allowed_origins', t.tsArrayType(t.tsStringKeyword())), 'CORS allowed origins for the storage module.'),
|
|
488
|
+
addJSDoc(optionalProp('has_confirm_upload', t.tsBooleanKeyword()), 'Enable deferred upload confirmation via HeadObject. When true, creates SECURITY DEFINER status transition functions (confirm_uploaded, mark_processed) and an AFTER INSERT trigger that enqueues a storage:confirm_upload job. The job verifies the file exists in S3 before transitioning status from requested to uploaded. Defaults to false.'),
|
|
489
|
+
addJSDoc(optionalProp('confirm_upload_delay', t.tsStringKeyword()), 'Delay before the first upload confirmation attempt (PostgreSQL interval string, e.g. "30 seconds"). Only used when has_confirm_upload is true. Defaults to "30 seconds".'),
|
|
488
490
|
addJSDoc(optionalProp('provisions', t.tsTypeLiteral([
|
|
489
491
|
optionalProp('files', t.tsTypeReference(t.identifier('BlueprintEntityTableProvision'))),
|
|
490
492
|
optionalProp('buckets', t.tsTypeReference(t.identifier('BlueprintEntityTableProvision')))
|
|
@@ -581,7 +583,7 @@ function buildProgram(meta) {
|
|
|
581
583
|
statements.push(sectionComment('Shared recursive types'));
|
|
582
584
|
statements.push(buildTriggerConditionInterface());
|
|
583
585
|
// -- Parameter interfaces grouped by category --
|
|
584
|
-
const categoryOrder = ['data', 'search', 'authz', 'relation', 'view'];
|
|
586
|
+
const categoryOrder = ['billing', 'check', 'data', 'limit', 'search', 'job', 'process', 'authz', 'relation', 'view'];
|
|
585
587
|
for (const cat of categoryOrder) {
|
|
586
588
|
const nts = categories.get(cat);
|
|
587
589
|
if (!nts || nts.length === 0)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { NodeTypeDefinition } from '../types';
|
|
2
|
-
export declare const
|
|
2
|
+
export declare const LimitAggregate: NodeTypeDefinition;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export const
|
|
2
|
-
name: '
|
|
1
|
+
export const LimitAggregate = {
|
|
2
|
+
name: 'LimitAggregate',
|
|
3
3
|
slug: 'data_aggregate_limit_counter',
|
|
4
|
-
category: '
|
|
4
|
+
category: 'limit',
|
|
5
5
|
display_name: 'Aggregate Limit Counter',
|
|
6
6
|
description: '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.',
|
|
7
7
|
parameter_schema: {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { NodeTypeDefinition } from '../types';
|
|
2
|
-
export declare const
|
|
2
|
+
export declare const BillingMeter: NodeTypeDefinition;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export const
|
|
2
|
-
name: '
|
|
1
|
+
export const BillingMeter = {
|
|
2
|
+
name: 'BillingMeter',
|
|
3
3
|
slug: 'data_billing_meter',
|
|
4
|
-
category: '
|
|
4
|
+
category: 'billing',
|
|
5
5
|
display_name: 'Billing Meter',
|
|
6
6
|
description: '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.',
|
|
7
7
|
parameter_schema: {
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
export const DataBulk = {
|
|
2
|
+
name: 'DataBulk',
|
|
3
|
+
slug: 'data_bulk',
|
|
4
|
+
category: 'data',
|
|
5
|
+
display_name: 'Bulk Operations',
|
|
6
|
+
description: 'Enables bulk mutation smart tags on a table. When provisioned, adds @behavior tags for the selected bulk operations (insert, upsert, update, delete). Requires the graphile-bulk-mutations plugin.',
|
|
7
|
+
parameter_schema: {
|
|
8
|
+
type: 'object',
|
|
9
|
+
properties: {
|
|
10
|
+
insert: {
|
|
11
|
+
type: 'boolean',
|
|
12
|
+
description: 'Enable bulk insert (+bulkInsert)',
|
|
13
|
+
default: true
|
|
14
|
+
},
|
|
15
|
+
upsert: {
|
|
16
|
+
type: 'boolean',
|
|
17
|
+
description: 'Enable bulk upsert (+bulkUpsert)',
|
|
18
|
+
default: false
|
|
19
|
+
},
|
|
20
|
+
update: {
|
|
21
|
+
type: 'boolean',
|
|
22
|
+
description: 'Enable bulk update (+bulkUpdate)',
|
|
23
|
+
default: false
|
|
24
|
+
},
|
|
25
|
+
delete: {
|
|
26
|
+
type: 'boolean',
|
|
27
|
+
description: 'Enable bulk delete (+bulkDelete)',
|
|
28
|
+
default: false
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
tags: [
|
|
33
|
+
'bulk',
|
|
34
|
+
'mutations',
|
|
35
|
+
'graphile'
|
|
36
|
+
]
|
|
37
|
+
};
|
|
@@ -11,8 +11,8 @@ import type { NodeTypeDefinition } from '../types';
|
|
|
11
11
|
* - RLS policies inherited from parent
|
|
12
12
|
* - Optional job trigger for automatic chunking on INSERT/UPDATE
|
|
13
13
|
*
|
|
14
|
-
* This node is also composed internally by
|
|
14
|
+
* This node is also composed internally by ProcessFileEmbedding (enabled by
|
|
15
15
|
* default in extract mode). Use it standalone when you want a chunks table
|
|
16
16
|
* without the full file-embedding pipeline.
|
|
17
17
|
*/
|
|
18
|
-
export declare const
|
|
18
|
+
export declare const ProcessChunks: NodeTypeDefinition;
|
package/esm/data/data-chunks.js
CHANGED
|
@@ -10,19 +10,19 @@
|
|
|
10
10
|
* - RLS policies inherited from parent
|
|
11
11
|
* - Optional job trigger for automatic chunking on INSERT/UPDATE
|
|
12
12
|
*
|
|
13
|
-
* This node is also composed internally by
|
|
13
|
+
* This node is also composed internally by ProcessFileEmbedding (enabled by
|
|
14
14
|
* default in extract mode). Use it standalone when you want a chunks table
|
|
15
15
|
* without the full file-embedding pipeline.
|
|
16
16
|
*/
|
|
17
|
-
export const
|
|
18
|
-
name: '
|
|
17
|
+
export const ProcessChunks = {
|
|
18
|
+
name: 'ProcessChunks',
|
|
19
19
|
slug: 'data_chunks',
|
|
20
|
-
category: '
|
|
20
|
+
category: 'process',
|
|
21
21
|
display_name: 'Chunks',
|
|
22
22
|
description: 'Creates a chunked-embedding child table for any parent table. ' +
|
|
23
23
|
'Provisions the chunks table with content, chunk_index, embedding vector, ' +
|
|
24
24
|
'metadata, HNSW index, inherited RLS, and optional job trigger for ' +
|
|
25
|
-
'automatic text splitting. Composed internally by
|
|
25
|
+
'automatic text splitting. Composed internally by ProcessFileEmbedding ' +
|
|
26
26
|
'(enabled by default in extract mode) but can also be used standalone.',
|
|
27
27
|
parameter_schema: {
|
|
28
28
|
type: 'object',
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { NodeTypeDefinition } from '../types';
|
|
2
|
-
export declare const
|
|
2
|
+
export declare const LimitFeatureFlag: NodeTypeDefinition;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export const
|
|
2
|
-
name: '
|
|
1
|
+
export const LimitFeatureFlag = {
|
|
2
|
+
name: 'LimitFeatureFlag',
|
|
3
3
|
slug: 'data_feature_flag',
|
|
4
|
-
category: '
|
|
4
|
+
category: 'limit',
|
|
5
5
|
display_name: 'Feature Flag',
|
|
6
6
|
description: '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).',
|
|
7
7
|
parameter_schema: {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { NodeTypeDefinition } from '../types';
|
|
2
|
-
export declare const
|
|
2
|
+
export declare const ProcessFileEmbedding: NodeTypeDefinition;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
export const
|
|
2
|
-
name: '
|
|
1
|
+
export const ProcessFileEmbedding = {
|
|
2
|
+
name: 'ProcessFileEmbedding',
|
|
3
3
|
slug: 'data_file_embedding',
|
|
4
|
-
category: '
|
|
4
|
+
category: 'process',
|
|
5
5
|
display_name: 'File Embedding',
|
|
6
6
|
description: 'Generic, MIME-scoped embedding node for file tables. Supports two modes: ' +
|
|
7
7
|
'direct (whole-file to single vector, e.g. CLIP for images) when extraction ' +
|
|
8
8
|
'is omitted, or extract (file to text to chunks to per-chunk vectors) when ' +
|
|
9
|
-
'extraction config is provided. Composes SearchVector +
|
|
10
|
-
'
|
|
9
|
+
'extraction config is provided. Composes SearchVector + JobTrigger + ' +
|
|
10
|
+
'ProcessChunks (enabled by default in extract mode) internally. Multiple ' +
|
|
11
11
|
'instances can coexist on the same table with different MIME scopes, field ' +
|
|
12
12
|
'names, and embedding strategies.',
|
|
13
13
|
parameter_schema: {
|
|
@@ -103,25 +103,19 @@ export const DataFileEmbedding = {
|
|
|
103
103
|
format: 'column-ref',
|
|
104
104
|
description: 'JSONB field for extraction metadata (page count, language, etc.)',
|
|
105
105
|
default: 'extracted_metadata'
|
|
106
|
-
},
|
|
107
|
-
status_field: {
|
|
108
|
-
type: 'string',
|
|
109
|
-
format: 'column-ref',
|
|
110
|
-
description: 'Extraction lifecycle status field',
|
|
111
|
-
default: 'extraction_status'
|
|
112
106
|
}
|
|
113
107
|
}
|
|
114
108
|
},
|
|
115
109
|
// ── Chunking (enabled by default in extract mode) ──────────────
|
|
116
110
|
include_chunks: {
|
|
117
111
|
type: 'boolean',
|
|
118
|
-
description: 'Whether to create a chunks table via
|
|
112
|
+
description: 'Whether to create a chunks table via ProcessChunks. Defaults to true ' +
|
|
119
113
|
'when extraction is provided, false in direct mode. Set explicitly ' +
|
|
120
114
|
'to override.',
|
|
121
115
|
},
|
|
122
116
|
chunks: {
|
|
123
117
|
type: 'object',
|
|
124
|
-
description: 'Chunking configuration passed through to
|
|
118
|
+
description: 'Chunking configuration passed through to ProcessChunks. When ' +
|
|
125
119
|
'include_chunks is true (or defaults to true in extract mode), these ' +
|
|
126
120
|
'params configure the chunks table, embedding dimensions, strategy, etc.',
|
|
127
121
|
properties: {
|
|
@@ -163,19 +157,6 @@ export const DataFileEmbedding = {
|
|
|
163
157
|
default: 'generate_chunks'
|
|
164
158
|
}
|
|
165
159
|
}
|
|
166
|
-
},
|
|
167
|
-
// ── Stale tracking (meaningful in extract mode) ────────────────
|
|
168
|
-
stale_strategy: {
|
|
169
|
-
type: 'string',
|
|
170
|
-
enum: ['column', 'null', 'hash'],
|
|
171
|
-
description: 'Strategy for tracking embedding staleness when extraction is enabled. ' +
|
|
172
|
-
'column: embedding_stale boolean. null: set embedding to NULL. hash: md5 hash.',
|
|
173
|
-
default: 'column'
|
|
174
|
-
},
|
|
175
|
-
include_stale_field: {
|
|
176
|
-
type: 'boolean',
|
|
177
|
-
description: 'Whether to include the embedding_stale boolean field (extract mode)',
|
|
178
|
-
default: true
|
|
179
160
|
}
|
|
180
161
|
}
|
|
181
162
|
},
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import type { NodeTypeDefinition } from '../types';
|
|
2
2
|
/**
|
|
3
|
-
* Image-specific preset of
|
|
3
|
+
* Image-specific preset of ProcessFileEmbedding.
|
|
4
4
|
*
|
|
5
5
|
* At the SQL layer, data_image_embedding delegates entirely to
|
|
6
6
|
* data_file_embedding, merging image-specific defaults before forwarding.
|
|
7
|
-
* The parameter schema here is intentionally identical to
|
|
7
|
+
* The parameter schema here is intentionally identical to ProcessFileEmbedding;
|
|
8
8
|
* only the defaults differ (dimensions: 512, task: process_image_embedding,
|
|
9
9
|
* mime_patterns: ['image/%']).
|
|
10
10
|
*
|
|
11
11
|
* Kept as a separate node type for backward compatibility — existing
|
|
12
|
-
* blueprints that reference
|
|
12
|
+
* blueprints that reference ProcessImageEmbedding continue to work unchanged.
|
|
13
13
|
*/
|
|
14
|
-
export declare const
|
|
14
|
+
export declare const ProcessImageEmbedding: NodeTypeDefinition;
|
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Image-specific preset of
|
|
2
|
+
* Image-specific preset of ProcessFileEmbedding.
|
|
3
3
|
*
|
|
4
4
|
* At the SQL layer, data_image_embedding delegates entirely to
|
|
5
5
|
* data_file_embedding, merging image-specific defaults before forwarding.
|
|
6
|
-
* The parameter schema here is intentionally identical to
|
|
6
|
+
* The parameter schema here is intentionally identical to ProcessFileEmbedding;
|
|
7
7
|
* only the defaults differ (dimensions: 512, task: process_image_embedding,
|
|
8
8
|
* mime_patterns: ['image/%']).
|
|
9
9
|
*
|
|
10
10
|
* Kept as a separate node type for backward compatibility — existing
|
|
11
|
-
* blueprints that reference
|
|
11
|
+
* blueprints that reference ProcessImageEmbedding continue to work unchanged.
|
|
12
12
|
*/
|
|
13
|
-
export const
|
|
14
|
-
name: '
|
|
13
|
+
export const ProcessImageEmbedding = {
|
|
14
|
+
name: 'ProcessImageEmbedding',
|
|
15
15
|
slug: 'data_image_embedding',
|
|
16
|
-
category: '
|
|
16
|
+
category: 'process',
|
|
17
17
|
display_name: 'Image Embedding',
|
|
18
|
-
description: 'Image-specific preset of
|
|
18
|
+
description: 'Image-specific preset of ProcessFileEmbedding. Delegates to ProcessFileEmbedding ' +
|
|
19
19
|
'with image-oriented defaults: dimensions=512 (CLIP), mime_patterns=[\'image/%\'], ' +
|
|
20
20
|
'task_identifier=\'process_image_embedding\', direct mode (no extraction). ' +
|
|
21
|
-
'Accepts all
|
|
21
|
+
'Accepts all ProcessFileEmbedding parameters — any overrides are forwarded through.',
|
|
22
22
|
parameter_schema: {
|
|
23
23
|
type: 'object',
|
|
24
24
|
properties: {
|
|
25
|
-
// ── Vector config (passed through to
|
|
25
|
+
// ── Vector config (passed through to ProcessFileEmbedding) ──────────
|
|
26
26
|
field_name: {
|
|
27
27
|
type: 'string',
|
|
28
28
|
format: 'column-ref',
|
|
@@ -93,7 +93,7 @@ export const DataImageEmbedding = {
|
|
|
93
93
|
// ── Extraction config (optional — enables extract mode) ────────
|
|
94
94
|
extraction: {
|
|
95
95
|
type: 'object',
|
|
96
|
-
description: 'Text extraction configuration. Forwarded to
|
|
96
|
+
description: 'Text extraction configuration. Forwarded to ProcessFileEmbedding. ' +
|
|
97
97
|
'When present, enables extract mode (e.g., OCR for images).',
|
|
98
98
|
properties: {
|
|
99
99
|
text_field: {
|
|
@@ -107,19 +107,13 @@ export const DataImageEmbedding = {
|
|
|
107
107
|
format: 'column-ref',
|
|
108
108
|
description: 'JSONB field for extraction metadata',
|
|
109
109
|
default: 'extracted_metadata'
|
|
110
|
-
},
|
|
111
|
-
status_field: {
|
|
112
|
-
type: 'string',
|
|
113
|
-
format: 'column-ref',
|
|
114
|
-
description: 'Extraction lifecycle status field',
|
|
115
|
-
default: 'extraction_status'
|
|
116
110
|
}
|
|
117
111
|
}
|
|
118
112
|
},
|
|
119
|
-
// ── Chunking config (optional — forwarded to
|
|
113
|
+
// ── Chunking config (optional — forwarded to ProcessFileEmbedding) ─
|
|
120
114
|
chunks: {
|
|
121
115
|
type: 'object',
|
|
122
|
-
description: 'Chunking configuration. Forwarded to
|
|
116
|
+
description: 'Chunking configuration. Forwarded to ProcessFileEmbedding. ' +
|
|
123
117
|
'Only meaningful when extraction is also provided.',
|
|
124
118
|
properties: {
|
|
125
119
|
content_field_name: {
|
|
@@ -138,18 +132,6 @@ export const DataImageEmbedding = {
|
|
|
138
132
|
enqueue_chunking_job: { type: 'boolean', default: true },
|
|
139
133
|
chunking_task_name: { type: 'string', default: 'generate_chunks' }
|
|
140
134
|
}
|
|
141
|
-
},
|
|
142
|
-
// ── Stale tracking (forwarded to DataFileEmbedding) ────────────
|
|
143
|
-
stale_strategy: {
|
|
144
|
-
type: 'string',
|
|
145
|
-
enum: ['column', 'null', 'hash'],
|
|
146
|
-
description: 'Strategy for tracking embedding staleness in extract mode',
|
|
147
|
-
default: 'column'
|
|
148
|
-
},
|
|
149
|
-
include_stale_field: {
|
|
150
|
-
type: 'boolean',
|
|
151
|
-
description: 'Whether to include the embedding_stale boolean field',
|
|
152
|
-
default: true
|
|
153
135
|
}
|
|
154
136
|
}
|
|
155
137
|
},
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { NodeTypeDefinition } from '../types';
|
|
2
|
-
export declare const
|
|
2
|
+
export declare const JobTrigger: NodeTypeDefinition;
|
|
@@ -23,10 +23,10 @@ const triggerConditionSchema = {
|
|
|
23
23
|
NOT: { $ref: '#/$defs/triggerCondition', description: 'Negated condition.' }
|
|
24
24
|
}
|
|
25
25
|
};
|
|
26
|
-
export const
|
|
27
|
-
name: '
|
|
26
|
+
export const JobTrigger = {
|
|
27
|
+
name: 'JobTrigger',
|
|
28
28
|
slug: 'data_job_trigger',
|
|
29
|
-
category: '
|
|
29
|
+
category: 'job',
|
|
30
30
|
display_name: 'Job Trigger',
|
|
31
31
|
description: '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).',
|
|
32
32
|
parameter_schema: {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { NodeTypeDefinition } from '../types';
|
|
2
|
-
export declare const
|
|
2
|
+
export declare const LimitCounter: NodeTypeDefinition;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export const
|
|
2
|
-
name: '
|
|
1
|
+
export const LimitCounter = {
|
|
2
|
+
name: 'LimitCounter',
|
|
3
3
|
slug: 'data_limit_counter',
|
|
4
|
-
category: '
|
|
4
|
+
category: 'limit',
|
|
5
5
|
display_name: 'Limit Counter',
|
|
6
6
|
description: '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.',
|
|
7
7
|
parameter_schema: {
|
package/esm/data/index.d.ts
CHANGED
|
@@ -2,24 +2,27 @@ export { CheckGreaterThan } from './check-greater-than';
|
|
|
2
2
|
export { CheckLessThan } from './check-less-than';
|
|
3
3
|
export { CheckNotEqual } from './check-not-equal';
|
|
4
4
|
export { CheckOneOf } from './check-one-of';
|
|
5
|
-
export {
|
|
6
|
-
export {
|
|
7
|
-
export {
|
|
5
|
+
export { LimitAggregate } from './data-aggregate-limit-counter';
|
|
6
|
+
export { BillingMeter } from './data-billing-meter';
|
|
7
|
+
export { DataBulk } from './data-bulk';
|
|
8
|
+
export { ProcessChunks } from './data-chunks';
|
|
8
9
|
export { DataCompositeField } from './data-composite-field';
|
|
9
10
|
export { DataDirectOwner } from './data-direct-owner';
|
|
10
11
|
export { DataEntityMembership } from './data-entity-membership';
|
|
11
|
-
export {
|
|
12
|
-
export {
|
|
12
|
+
export { ProcessFileEmbedding } from './data-file-embedding';
|
|
13
|
+
export { LimitFeatureFlag } from './data-feature-flag';
|
|
13
14
|
export { DataForceCurrentUser } from './data-force-current-user';
|
|
14
15
|
export { DataId } from './data-id';
|
|
15
|
-
export {
|
|
16
|
+
export { ProcessImageEmbedding } from './data-image-embedding';
|
|
16
17
|
export { DataImmutableFields } from './data-immutable-fields';
|
|
17
18
|
export { DataInflection } from './data-inflection';
|
|
18
19
|
export { DataInheritFromParent } from './data-inherit-from-parent';
|
|
19
|
-
export {
|
|
20
|
-
export {
|
|
20
|
+
export { JobTrigger } from './data-job-trigger';
|
|
21
|
+
export { LimitCounter } from './data-limit-counter';
|
|
21
22
|
export { DataJsonb } from './data-jsonb';
|
|
22
23
|
export { DataOwnedFields } from './data-owned-fields';
|
|
24
|
+
export { ProcessExtraction } from './process-extraction';
|
|
25
|
+
export { ProcessImageVersions } from './process-image-versions';
|
|
23
26
|
export { DataOwnershipInEntity } from './data-ownership-in-entity';
|
|
24
27
|
export { DataPeoplestamps } from './data-peoplestamps';
|
|
25
28
|
export { DataPublishable } from './data-publishable';
|
package/esm/data/index.js
CHANGED
|
@@ -2,24 +2,27 @@ export { CheckGreaterThan } from './check-greater-than';
|
|
|
2
2
|
export { CheckLessThan } from './check-less-than';
|
|
3
3
|
export { CheckNotEqual } from './check-not-equal';
|
|
4
4
|
export { CheckOneOf } from './check-one-of';
|
|
5
|
-
export {
|
|
6
|
-
export {
|
|
7
|
-
export {
|
|
5
|
+
export { LimitAggregate } from './data-aggregate-limit-counter';
|
|
6
|
+
export { BillingMeter } from './data-billing-meter';
|
|
7
|
+
export { DataBulk } from './data-bulk';
|
|
8
|
+
export { ProcessChunks } from './data-chunks';
|
|
8
9
|
export { DataCompositeField } from './data-composite-field';
|
|
9
10
|
export { DataDirectOwner } from './data-direct-owner';
|
|
10
11
|
export { DataEntityMembership } from './data-entity-membership';
|
|
11
|
-
export {
|
|
12
|
-
export {
|
|
12
|
+
export { ProcessFileEmbedding } from './data-file-embedding';
|
|
13
|
+
export { LimitFeatureFlag } from './data-feature-flag';
|
|
13
14
|
export { DataForceCurrentUser } from './data-force-current-user';
|
|
14
15
|
export { DataId } from './data-id';
|
|
15
|
-
export {
|
|
16
|
+
export { ProcessImageEmbedding } from './data-image-embedding';
|
|
16
17
|
export { DataImmutableFields } from './data-immutable-fields';
|
|
17
18
|
export { DataInflection } from './data-inflection';
|
|
18
19
|
export { DataInheritFromParent } from './data-inherit-from-parent';
|
|
19
|
-
export {
|
|
20
|
-
export {
|
|
20
|
+
export { JobTrigger } from './data-job-trigger';
|
|
21
|
+
export { LimitCounter } from './data-limit-counter';
|
|
21
22
|
export { DataJsonb } from './data-jsonb';
|
|
22
23
|
export { DataOwnedFields } from './data-owned-fields';
|
|
24
|
+
export { ProcessExtraction } from './process-extraction';
|
|
25
|
+
export { ProcessImageVersions } from './process-image-versions';
|
|
23
26
|
export { DataOwnershipInEntity } from './data-ownership-in-entity';
|
|
24
27
|
export { DataPeoplestamps } from './data-peoplestamps';
|
|
25
28
|
export { DataPublishable } from './data-publishable';
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { NodeTypeDefinition } from '../types';
|
|
2
|
+
/**
|
|
3
|
+
* File extraction processing node.
|
|
4
|
+
*
|
|
5
|
+
* Composes a JobTrigger that fires when a file transitions to status = 'uploaded'
|
|
6
|
+
* (or on INSERT if confirm_upload is not enabled). The trigger enqueues a
|
|
7
|
+
* text-extraction job that converts the file contents (PDF, DOCX, HTML, etc.)
|
|
8
|
+
* into plain text or markdown, storing the result in configurable output fields.
|
|
9
|
+
*
|
|
10
|
+
* The extraction worker is external (Knative function) — this node only creates
|
|
11
|
+
* the trigger infrastructure and output fields. The worker calls back into the
|
|
12
|
+
* database to write extracted text and metadata.
|
|
13
|
+
*/
|
|
14
|
+
export declare const ProcessExtraction: NodeTypeDefinition;
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* File extraction processing node.
|
|
3
|
+
*
|
|
4
|
+
* Composes a JobTrigger that fires when a file transitions to status = 'uploaded'
|
|
5
|
+
* (or on INSERT if confirm_upload is not enabled). The trigger enqueues a
|
|
6
|
+
* text-extraction job that converts the file contents (PDF, DOCX, HTML, etc.)
|
|
7
|
+
* into plain text or markdown, storing the result in configurable output fields.
|
|
8
|
+
*
|
|
9
|
+
* The extraction worker is external (Knative function) — this node only creates
|
|
10
|
+
* the trigger infrastructure and output fields. The worker calls back into the
|
|
11
|
+
* database to write extracted text and metadata.
|
|
12
|
+
*/
|
|
13
|
+
export const ProcessExtraction = {
|
|
14
|
+
name: 'ProcessExtraction',
|
|
15
|
+
slug: 'process_extraction',
|
|
16
|
+
category: 'process',
|
|
17
|
+
display_name: 'File Extraction',
|
|
18
|
+
description: 'Creates extraction output fields and a job trigger for file text extraction. ' +
|
|
19
|
+
'Fires when a file is uploaded (status = \'uploaded\') or on INSERT. ' +
|
|
20
|
+
'The external worker extracts text/metadata from the file (PDF, DOCX, HTML, etc.) ' +
|
|
21
|
+
'and writes the result back to the configured output fields. ' +
|
|
22
|
+
'Typically used upstream of ProcessFileEmbedding or ProcessChunks.',
|
|
23
|
+
parameter_schema: {
|
|
24
|
+
type: 'object',
|
|
25
|
+
properties: {
|
|
26
|
+
// ── Output fields ─────────────────────────────────────────────
|
|
27
|
+
text_field: {
|
|
28
|
+
type: 'string',
|
|
29
|
+
format: 'column-ref',
|
|
30
|
+
description: 'Field to store extracted text/markdown',
|
|
31
|
+
default: 'extracted_text'
|
|
32
|
+
},
|
|
33
|
+
metadata_field: {
|
|
34
|
+
type: 'string',
|
|
35
|
+
format: 'column-ref',
|
|
36
|
+
description: 'JSONB field for extraction metadata (page count, language, etc.)',
|
|
37
|
+
default: 'extracted_metadata'
|
|
38
|
+
},
|
|
39
|
+
// ── MIME scoping ──────────────────────────────────────────────
|
|
40
|
+
mime_patterns: {
|
|
41
|
+
type: 'array',
|
|
42
|
+
items: { type: 'string' },
|
|
43
|
+
description: 'MIME type LIKE patterns to match. Multiple patterns are OR\'d together. ' +
|
|
44
|
+
'Examples: [\'application/pdf\', \'text/%\'], [\'application/vnd.openxmlformats%\'].',
|
|
45
|
+
default: ['application/pdf', 'text/%']
|
|
46
|
+
},
|
|
47
|
+
// ── Job routing ───────────────────────────────────────────────
|
|
48
|
+
task_identifier: {
|
|
49
|
+
type: 'string',
|
|
50
|
+
description: 'Job task identifier for the extraction worker',
|
|
51
|
+
default: 'extract_file_text'
|
|
52
|
+
},
|
|
53
|
+
events: {
|
|
54
|
+
type: 'array',
|
|
55
|
+
items: { type: 'string', enum: ['INSERT', 'UPDATE'] },
|
|
56
|
+
description: 'Trigger events that fire the job',
|
|
57
|
+
default: ['INSERT']
|
|
58
|
+
},
|
|
59
|
+
payload_custom: {
|
|
60
|
+
type: 'object',
|
|
61
|
+
additionalProperties: { type: 'string', format: 'column-ref' },
|
|
62
|
+
description: 'Custom payload key-to-column mapping for the job trigger',
|
|
63
|
+
default: {
|
|
64
|
+
file_id: 'id',
|
|
65
|
+
key: 'key',
|
|
66
|
+
mime_type: 'mime_type',
|
|
67
|
+
bucket_id: 'bucket_id'
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
trigger_conditions: {
|
|
71
|
+
description: 'Additional compound conditions beyond MIME filtering. ' +
|
|
72
|
+
'Merged with the auto-generated MIME conditions via AND. ' +
|
|
73
|
+
'Use this to add status checks (e.g., status = \'uploaded\').',
|
|
74
|
+
'x-codegen-type': 'TriggerCondition | TriggerCondition[]',
|
|
75
|
+
oneOf: [
|
|
76
|
+
{ $ref: '#/$defs/triggerCondition' },
|
|
77
|
+
{ type: 'array', items: { $ref: '#/$defs/triggerCondition' } }
|
|
78
|
+
]
|
|
79
|
+
},
|
|
80
|
+
// ── Job options ───────────────────────────────────────────────
|
|
81
|
+
queue_name: {
|
|
82
|
+
type: 'string',
|
|
83
|
+
description: 'Job queue name for extraction tasks',
|
|
84
|
+
default: 'extraction'
|
|
85
|
+
},
|
|
86
|
+
max_attempts: {
|
|
87
|
+
type: 'integer',
|
|
88
|
+
description: 'Maximum number of retry attempts',
|
|
89
|
+
default: 5
|
|
90
|
+
},
|
|
91
|
+
priority: {
|
|
92
|
+
type: 'integer',
|
|
93
|
+
description: 'Job priority (lower = higher priority)',
|
|
94
|
+
default: 0
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
},
|
|
98
|
+
tags: [
|
|
99
|
+
'extraction',
|
|
100
|
+
'files',
|
|
101
|
+
'processing',
|
|
102
|
+
'jobs',
|
|
103
|
+
'text'
|
|
104
|
+
]
|
|
105
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { NodeTypeDefinition } from '../types';
|
|
2
|
+
/**
|
|
3
|
+
* Image version processing node.
|
|
4
|
+
*
|
|
5
|
+
* Composes a JobTrigger that fires when an image file transitions to
|
|
6
|
+
* status = 'uploaded' (or on INSERT if confirm_upload is not enabled).
|
|
7
|
+
* The trigger enqueues an image-processing job that generates resized,
|
|
8
|
+
* cropped, or reformatted variants of the source image.
|
|
9
|
+
*
|
|
10
|
+
* The image processing worker is external (Knative function) — this node
|
|
11
|
+
* only creates the trigger infrastructure. The worker generates the variants
|
|
12
|
+
* and writes them back to the storage system as new file records linked to
|
|
13
|
+
* the source file.
|
|
14
|
+
*/
|
|
15
|
+
export declare const ProcessImageVersions: NodeTypeDefinition;
|