node-type-registry 0.35.0 → 0.37.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (91) hide show
  1. package/blueprint-types.generated.d.ts +46 -1
  2. package/codegen/generate-types.js +37 -1
  3. package/conditions/index.d.ts +1 -0
  4. package/conditions/index.js +8 -0
  5. package/conditions/trigger-condition.d.ts +35 -0
  6. package/conditions/trigger-condition.js +97 -0
  7. package/data/data-aggregate-limit-counter.d.ts +1 -1
  8. package/data/data-aggregate-limit-counter.js +7 -7
  9. package/data/data-billing-meter.d.ts +1 -1
  10. package/data/data-billing-meter.js +7 -7
  11. package/data/data-chunks.js +20 -0
  12. package/data/data-composite-field.js +4 -2
  13. package/data/data-direct-owner.js +5 -0
  14. package/data/data-entity-membership.js +5 -0
  15. package/data/data-feature-flag.d.ts +1 -1
  16. package/data/data-feature-flag.js +7 -7
  17. package/data/data-file-embedding.js +23 -10
  18. package/data/data-image-embedding.js +15 -9
  19. package/data/data-job-trigger.js +3 -53
  20. package/data/data-jsonb.js +2 -1
  21. package/data/data-limit-counter.d.ts +1 -1
  22. package/data/data-limit-counter.js +7 -7
  23. package/data/data-meter-rate-limit.d.ts +2 -0
  24. package/data/data-meter-rate-limit.js +42 -0
  25. package/data/data-ownership-in-entity.js +5 -0
  26. package/data/data-peoplestamps.js +5 -0
  27. package/data/data-publishable.js +2 -2
  28. package/data/data-slug.js +3 -4
  29. package/data/data-tags.js +2 -1
  30. package/data/event-tracker.d.ts +2 -0
  31. package/data/event-tracker.js +74 -0
  32. package/data/index.d.ts +9 -4
  33. package/data/index.js +15 -5
  34. package/data/limit-warning-aggregate.d.ts +2 -0
  35. package/data/limit-warning-aggregate.js +27 -0
  36. package/data/limit-warning-counter.d.ts +2 -0
  37. package/data/limit-warning-counter.js +33 -0
  38. package/data/limit-warning-rate.d.ts +2 -0
  39. package/data/limit-warning-rate.js +33 -0
  40. package/data/process-extraction.js +15 -10
  41. package/data/process-image-versions.js +3 -9
  42. package/data/search-unified.js +20 -0
  43. package/data/search-vector.js +12 -0
  44. package/esm/blueprint-types.generated.d.ts +46 -1
  45. package/esm/codegen/generate-types.js +37 -1
  46. package/esm/conditions/index.d.ts +1 -0
  47. package/esm/conditions/index.js +1 -0
  48. package/esm/conditions/trigger-condition.d.ts +35 -0
  49. package/esm/conditions/trigger-condition.js +94 -0
  50. package/esm/data/data-aggregate-limit-counter.d.ts +1 -1
  51. package/esm/data/data-aggregate-limit-counter.js +6 -6
  52. package/esm/data/data-billing-meter.d.ts +1 -1
  53. package/esm/data/data-billing-meter.js +6 -6
  54. package/esm/data/data-chunks.js +20 -0
  55. package/esm/data/data-composite-field.js +4 -2
  56. package/esm/data/data-direct-owner.js +5 -0
  57. package/esm/data/data-entity-membership.js +5 -0
  58. package/esm/data/data-feature-flag.d.ts +1 -1
  59. package/esm/data/data-feature-flag.js +6 -6
  60. package/esm/data/data-file-embedding.js +23 -10
  61. package/esm/data/data-image-embedding.js +15 -9
  62. package/esm/data/data-job-trigger.js +3 -53
  63. package/esm/data/data-jsonb.js +2 -1
  64. package/esm/data/data-limit-counter.d.ts +1 -1
  65. package/esm/data/data-limit-counter.js +6 -6
  66. package/esm/data/data-meter-rate-limit.d.ts +2 -0
  67. package/esm/data/data-meter-rate-limit.js +39 -0
  68. package/esm/data/data-ownership-in-entity.js +5 -0
  69. package/esm/data/data-peoplestamps.js +5 -0
  70. package/esm/data/data-publishable.js +2 -2
  71. package/esm/data/data-slug.js +3 -4
  72. package/esm/data/data-tags.js +2 -1
  73. package/esm/data/event-tracker.d.ts +2 -0
  74. package/esm/data/event-tracker.js +71 -0
  75. package/esm/data/index.d.ts +9 -4
  76. package/esm/data/index.js +9 -4
  77. package/esm/data/limit-warning-aggregate.d.ts +2 -0
  78. package/esm/data/limit-warning-aggregate.js +24 -0
  79. package/esm/data/limit-warning-counter.d.ts +2 -0
  80. package/esm/data/limit-warning-counter.js +30 -0
  81. package/esm/data/limit-warning-rate.d.ts +2 -0
  82. package/esm/data/limit-warning-rate.js +30 -0
  83. package/esm/data/process-extraction.js +15 -10
  84. package/esm/data/process-image-versions.js +3 -9
  85. package/esm/data/search-unified.js +20 -0
  86. package/esm/data/search-vector.js +12 -0
  87. package/esm/index.d.ts +1 -0
  88. package/esm/index.js +1 -0
  89. package/index.d.ts +1 -0
  90. package/index.js +1 -0
  91. package/package.json +2 -2
@@ -1,31 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.JobTrigger = void 0;
4
- const triggerConditionSchema = {
5
- type: 'object',
6
- description: 'A leaf condition ({field, op, value?, row?, ref?}) or a combinator ({AND, OR, NOT}).',
7
- properties: {
8
- field: { type: 'string', format: 'column-ref', description: 'Column name (validated against the table).' },
9
- op: {
10
- type: 'string',
11
- enum: ['=', '!=', '>', '<', '>=', '<=', 'LIKE', 'NOT LIKE', 'IS NULL', 'IS NOT NULL', 'IS DISTINCT FROM'],
12
- description: 'Comparison operator.'
13
- },
14
- value: { description: 'Comparison value. Type is resolved from the column definition. Omit for IS NULL, IS NOT NULL, IS DISTINCT FROM.' },
15
- row: { type: 'string', enum: ['NEW', 'OLD'], default: 'NEW', description: 'Row reference (default: NEW).' },
16
- ref: {
17
- type: 'object',
18
- description: 'Column reference for field-to-field comparison (alternative to value).',
19
- properties: {
20
- field: { type: 'string', format: 'column-ref' },
21
- row: { type: 'string', enum: ['NEW', 'OLD'], default: 'NEW' }
22
- }
23
- },
24
- AND: { type: 'array', description: 'Array of conditions combined with AND.', items: { $ref: '#/$defs/triggerCondition' } },
25
- OR: { type: 'array', description: 'Array of conditions combined with OR.', items: { $ref: '#/$defs/triggerCondition' } },
26
- NOT: { $ref: '#/$defs/triggerCondition', description: 'Negated condition.' }
27
- }
28
- };
4
+ const conditions_1 = require("../conditions");
29
5
  exports.JobTrigger = {
30
6
  name: 'JobTrigger',
31
7
  slug: 'data_job_trigger',
@@ -34,9 +10,7 @@ exports.JobTrigger = {
34
10
  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).',
35
11
  parameter_schema: {
36
12
  type: 'object',
37
- $defs: {
38
- triggerCondition: triggerConditionSchema
39
- },
13
+ $defs: conditions_1.conditionDefs,
40
14
  properties: {
41
15
  task_identifier: {
42
16
  type: 'string',
@@ -95,31 +69,7 @@ exports.JobTrigger = {
95
69
  description: 'Include table/schema metadata in payload',
96
70
  default: false
97
71
  },
98
- condition_field: {
99
- type: 'string',
100
- format: 'column-ref',
101
- description: 'Column name for conditional WHEN clause (fires only when field equals condition_value)'
102
- },
103
- condition_value: {
104
- type: 'string',
105
- description: 'Value to compare against condition_field in WHEN clause'
106
- },
107
- conditions: {
108
- description: 'Compound conditions for the trigger WHEN clause. Accepts a single leaf condition, an array of conditions (implicitly AND), or a nested combinator tree ({AND: [...], OR: [...], NOT: {...}}). Each leaf is {field, op, value?, row?, ref?}. Column types are resolved automatically from the table schema. Cannot be combined with condition_field or watch_fields.',
109
- 'x-codegen-type': 'TriggerCondition | TriggerCondition[]',
110
- oneOf: [
111
- { $ref: '#/$defs/triggerCondition' },
112
- { type: 'array', items: { $ref: '#/$defs/triggerCondition' } }
113
- ]
114
- },
115
- watch_fields: {
116
- type: 'array',
117
- items: {
118
- type: 'string',
119
- format: 'column-ref'
120
- },
121
- description: 'For UPDATE triggers, only fire when these fields change (uses DISTINCT FROM)'
122
- },
72
+ ...conditions_1.conditionProperties,
123
73
  job_key: {
124
74
  type: 'string',
125
75
  description: 'Static job key for upsert semantics (prevents duplicate jobs)'
@@ -18,7 +18,8 @@ exports.DataJsonb = {
18
18
  },
19
19
  default_value: {
20
20
  type: 'string',
21
- description: 'Default value expression'
21
+ description: 'Default value expression',
22
+ default: "'{}'::jsonb"
22
23
  },
23
24
  is_required: {
24
25
  type: 'boolean',
@@ -1,2 +1,2 @@
1
1
  import type { NodeTypeDefinition } from '../types';
2
- export declare const LimitCounter: NodeTypeDefinition;
2
+ export declare const LimitEnforceCounter: NodeTypeDefinition;
@@ -1,11 +1,11 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.LimitCounter = void 0;
4
- exports.LimitCounter = {
5
- name: 'LimitCounter',
6
- slug: 'data_limit_counter',
7
- category: 'limit',
8
- display_name: 'Limit Counter',
3
+ exports.LimitEnforceCounter = void 0;
4
+ exports.LimitEnforceCounter = {
5
+ name: 'LimitEnforceCounter',
6
+ slug: 'limit_enforce_counter',
7
+ category: 'limit_enforce',
8
+ display_name: 'Enforce Counter',
9
9
  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.',
10
10
  parameter_schema: {
11
11
  type: 'object',
@@ -38,5 +38,5 @@ exports.LimitCounter = {
38
38
  },
39
39
  required: ['limit_name'],
40
40
  },
41
- tags: ['limits', 'triggers', 'billing'],
41
+ tags: ['limits', 'triggers', 'enforce'],
42
42
  };
@@ -0,0 +1,2 @@
1
+ import type { NodeTypeDefinition } from '../types';
2
+ export declare const LimitEnforceRate: NodeTypeDefinition;
@@ -0,0 +1,42 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.LimitEnforceRate = void 0;
4
+ exports.LimitEnforceRate = {
5
+ name: 'LimitEnforceRate',
6
+ slug: 'limit_enforce_rate',
7
+ category: 'limit_enforce',
8
+ display_name: 'Enforce Rate Limit',
9
+ description: '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.',
10
+ parameter_schema: {
11
+ type: 'object',
12
+ properties: {
13
+ meter_slug: {
14
+ type: 'string',
15
+ description: 'Slug of the billing meter to check rate limits against (must match a meters table entry, e.g. "messaging", "inference")',
16
+ },
17
+ entity_field: {
18
+ type: 'string',
19
+ format: 'column-ref',
20
+ description: 'Column on the target table that holds the entity id (org) for rate limiting',
21
+ default: 'entity_id',
22
+ },
23
+ actor_field: {
24
+ type: 'string',
25
+ format: 'column-ref',
26
+ description: 'Column on the target table that holds the actor id (user) for rate limiting',
27
+ default: 'owner_id',
28
+ },
29
+ events: {
30
+ type: 'array',
31
+ items: {
32
+ type: 'string',
33
+ enum: ['INSERT', 'UPDATE'],
34
+ },
35
+ description: 'Which DML events to enforce rate limits on (DELETE is excluded since it reduces load)',
36
+ default: ['INSERT'],
37
+ },
38
+ },
39
+ required: ['meter_slug'],
40
+ },
41
+ tags: ['rate-limits', 'triggers', 'enforce', 'metering', 'abuse-protection'],
42
+ };
@@ -31,6 +31,11 @@ exports.DataOwnershipInEntity = {
31
31
  type: 'boolean',
32
32
  description: 'If true, adds foreign key constraints from owner_id and entity_id to the users table',
33
33
  default: true
34
+ },
35
+ create_index: {
36
+ type: 'boolean',
37
+ description: 'If true, creates B-tree indexes on the owner and entity columns',
38
+ default: true
34
39
  }
35
40
  }
36
41
  },
@@ -31,6 +31,11 @@ exports.DataPeoplestamps = {
31
31
  type: 'boolean',
32
32
  description: 'If true, adds foreign key constraints from created_by and updated_by to the users table',
33
33
  default: false
34
+ },
35
+ create_index: {
36
+ type: 'boolean',
37
+ description: 'If true, creates B-tree indexes on the peoplestamp columns',
38
+ default: true
34
39
  }
35
40
  }
36
41
  },
@@ -10,13 +10,13 @@ exports.DataPublishable = {
10
10
  parameter_schema: {
11
11
  type: 'object',
12
12
  properties: {
13
- is_published_field: {
13
+ is_published_field_name: {
14
14
  type: 'string',
15
15
  format: 'column-ref',
16
16
  description: 'Column name for the published boolean flag',
17
17
  default: 'is_published'
18
18
  },
19
- published_at_field: {
19
+ published_at_field_name: {
20
20
  type: 'string',
21
21
  format: 'column-ref',
22
22
  description: 'Column name for the publish timestamp',
package/data/data-slug.js CHANGED
@@ -13,7 +13,8 @@ exports.DataSlug = {
13
13
  field_name: {
14
14
  type: 'string',
15
15
  format: 'column-ref',
16
- description: 'Name of the field to slugify'
16
+ description: 'Name of the field to slugify',
17
+ default: 'slug'
17
18
  },
18
19
  source_field_name: {
19
20
  type: 'string',
@@ -21,9 +22,7 @@ exports.DataSlug = {
21
22
  description: 'Optional source field name (defaults to field_name)'
22
23
  }
23
24
  },
24
- required: [
25
- 'field_name'
26
- ]
25
+ required: []
27
26
  },
28
27
  tags: [
29
28
  'transform',
package/data/data-tags.js CHANGED
@@ -18,7 +18,8 @@ exports.DataTags = {
18
18
  },
19
19
  default_value: {
20
20
  type: 'string',
21
- description: 'Default value expression for the tags column'
21
+ description: 'Default value expression for the tags column',
22
+ default: 'ARRAY[]::citext[]'
22
23
  },
23
24
  is_required: {
24
25
  type: 'boolean',
@@ -0,0 +1,2 @@
1
+ import type { NodeTypeDefinition } from '../types';
2
+ export declare const EventTracker: NodeTypeDefinition;
@@ -0,0 +1,74 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.EventTracker = void 0;
4
+ const conditions_1 = require("../conditions");
5
+ exports.EventTracker = {
6
+ name: 'EventTracker',
7
+ slug: 'event_tracker',
8
+ category: 'event',
9
+ display_name: 'Event Tracker',
10
+ description: 'Creates triggers that record events via the events module when table rows change. ' +
11
+ 'Supports the same compound condition system as JobTrigger (condition_field, watch_fields, ' +
12
+ 'or full AND/OR/NOT conditions). Events are recorded to app_events and aggregated ' +
13
+ 'automatically. Use with achievements (blueprint-level) to unlock levels and grant ' +
14
+ 'credits based on event accumulation.',
15
+ parameter_schema: {
16
+ type: 'object',
17
+ $defs: conditions_1.conditionDefs,
18
+ properties: {
19
+ event_name: {
20
+ type: 'string',
21
+ description: 'Event type name to record (e.g., "avatar_uploaded", "order_completed")'
22
+ },
23
+ events: {
24
+ type: 'array',
25
+ items: {
26
+ type: 'string',
27
+ enum: [
28
+ 'INSERT',
29
+ 'UPDATE',
30
+ 'DELETE'
31
+ ]
32
+ },
33
+ description: 'DML events that trigger recording',
34
+ default: ['INSERT']
35
+ },
36
+ count: {
37
+ type: 'integer',
38
+ description: 'Number of events to record per trigger fire',
39
+ default: 1
40
+ },
41
+ toggle: {
42
+ type: 'boolean',
43
+ description: 'Toggle mode: records event when condition is met, removes when condition is unmet',
44
+ default: false
45
+ },
46
+ actor_field: {
47
+ type: 'string',
48
+ format: 'column-ref',
49
+ description: 'Column containing the actor (user) ID to attribute the event to',
50
+ default: 'owner_id'
51
+ },
52
+ entity_field: {
53
+ type: 'string',
54
+ format: 'column-ref',
55
+ description: 'Column containing the entity ID (org/group) for entity-scoped events. Omit for user-only events.'
56
+ },
57
+ auto_register_type: {
58
+ type: 'boolean',
59
+ description: 'Automatically register the event_name in event_types during provisioning',
60
+ default: true
61
+ },
62
+ ...conditions_1.conditionProperties
63
+ },
64
+ required: [
65
+ 'event_name'
66
+ ]
67
+ },
68
+ tags: [
69
+ 'events',
70
+ 'triggers',
71
+ 'analytics',
72
+ 'tracking'
73
+ ]
74
+ };
package/data/index.d.ts CHANGED
@@ -2,15 +2,16 @@ 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 { LimitAggregate } from './data-aggregate-limit-counter';
6
- export { BillingMeter } from './data-billing-meter';
5
+ export { LimitEnforceAggregate } from './data-aggregate-limit-counter';
6
+ export { LimitTrackUsage } from './data-billing-meter';
7
7
  export { DataBulk } from './data-bulk';
8
8
  export { ProcessChunks } from './data-chunks';
9
9
  export { DataCompositeField } from './data-composite-field';
10
10
  export { DataDirectOwner } from './data-direct-owner';
11
11
  export { DataEntityMembership } from './data-entity-membership';
12
+ export { EventTracker } from './event-tracker';
12
13
  export { ProcessFileEmbedding } from './data-file-embedding';
13
- export { LimitFeatureFlag } from './data-feature-flag';
14
+ export { LimitEnforceFeature } from './data-feature-flag';
14
15
  export { DataForceCurrentUser } from './data-force-current-user';
15
16
  export { DataId } from './data-id';
16
17
  export { ProcessImageEmbedding } from './data-image-embedding';
@@ -18,7 +19,11 @@ export { DataImmutableFields } from './data-immutable-fields';
18
19
  export { DataInflection } from './data-inflection';
19
20
  export { DataInheritFromParent } from './data-inherit-from-parent';
20
21
  export { JobTrigger } from './data-job-trigger';
21
- export { LimitCounter } from './data-limit-counter';
22
+ export { LimitEnforceCounter } from './data-limit-counter';
23
+ export { LimitEnforceRate } from './data-meter-rate-limit';
24
+ export { LimitWarningCounter } from './limit-warning-counter';
25
+ export { LimitWarningAggregate } from './limit-warning-aggregate';
26
+ export { LimitWarningRate } from './limit-warning-rate';
22
27
  export { DataJsonb } from './data-jsonb';
23
28
  export { DataOwnedFields } from './data-owned-fields';
24
29
  export { ProcessExtraction } from './process-extraction';
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.TableUserProfiles = exports.TableOrganizationSettings = exports.SearchVector = exports.SearchUnified = exports.SearchTrgm = exports.SearchSpatialAggregate = exports.SearchSpatial = exports.SearchFullText = exports.SearchBm25 = exports.DataTimestamps = exports.DataTags = exports.DataStatusField = exports.DataSoftDelete = exports.DataSlug = exports.DataRealtime = exports.DataPublishable = exports.DataPeoplestamps = exports.DataOwnershipInEntity = exports.ProcessImageVersions = exports.ProcessExtraction = exports.DataOwnedFields = exports.DataJsonb = exports.LimitCounter = exports.JobTrigger = exports.DataInheritFromParent = exports.DataInflection = exports.DataImmutableFields = exports.ProcessImageEmbedding = exports.DataId = exports.DataForceCurrentUser = exports.LimitFeatureFlag = exports.ProcessFileEmbedding = exports.DataEntityMembership = exports.DataDirectOwner = exports.DataCompositeField = exports.ProcessChunks = exports.DataBulk = exports.BillingMeter = exports.LimitAggregate = exports.CheckOneOf = exports.CheckNotEqual = exports.CheckLessThan = exports.CheckGreaterThan = void 0;
3
+ exports.TableUserSettings = exports.TableUserProfiles = exports.TableOrganizationSettings = exports.SearchVector = exports.SearchUnified = exports.SearchTrgm = exports.SearchSpatialAggregate = exports.SearchSpatial = exports.SearchFullText = exports.SearchBm25 = exports.DataTimestamps = exports.DataTags = exports.DataStatusField = exports.DataSoftDelete = exports.DataSlug = exports.DataRealtime = exports.DataPublishable = exports.DataPeoplestamps = exports.DataOwnershipInEntity = exports.ProcessImageVersions = exports.ProcessExtraction = exports.DataOwnedFields = exports.DataJsonb = exports.LimitWarningRate = exports.LimitWarningAggregate = exports.LimitWarningCounter = exports.LimitEnforceRate = exports.LimitEnforceCounter = exports.JobTrigger = exports.DataInheritFromParent = exports.DataInflection = exports.DataImmutableFields = exports.ProcessImageEmbedding = exports.DataId = exports.DataForceCurrentUser = exports.LimitEnforceFeature = exports.ProcessFileEmbedding = exports.EventTracker = exports.DataEntityMembership = exports.DataDirectOwner = exports.DataCompositeField = exports.ProcessChunks = exports.DataBulk = exports.LimitTrackUsage = exports.LimitEnforceAggregate = exports.CheckOneOf = exports.CheckNotEqual = exports.CheckLessThan = exports.CheckGreaterThan = void 0;
4
4
  var check_greater_than_1 = require("./check-greater-than");
5
5
  Object.defineProperty(exports, "CheckGreaterThan", { enumerable: true, get: function () { return check_greater_than_1.CheckGreaterThan; } });
6
6
  var check_less_than_1 = require("./check-less-than");
@@ -10,9 +10,9 @@ Object.defineProperty(exports, "CheckNotEqual", { enumerable: true, get: functio
10
10
  var check_one_of_1 = require("./check-one-of");
11
11
  Object.defineProperty(exports, "CheckOneOf", { enumerable: true, get: function () { return check_one_of_1.CheckOneOf; } });
12
12
  var data_aggregate_limit_counter_1 = require("./data-aggregate-limit-counter");
13
- Object.defineProperty(exports, "LimitAggregate", { enumerable: true, get: function () { return data_aggregate_limit_counter_1.LimitAggregate; } });
13
+ Object.defineProperty(exports, "LimitEnforceAggregate", { enumerable: true, get: function () { return data_aggregate_limit_counter_1.LimitEnforceAggregate; } });
14
14
  var data_billing_meter_1 = require("./data-billing-meter");
15
- Object.defineProperty(exports, "BillingMeter", { enumerable: true, get: function () { return data_billing_meter_1.BillingMeter; } });
15
+ Object.defineProperty(exports, "LimitTrackUsage", { enumerable: true, get: function () { return data_billing_meter_1.LimitTrackUsage; } });
16
16
  var data_bulk_1 = require("./data-bulk");
17
17
  Object.defineProperty(exports, "DataBulk", { enumerable: true, get: function () { return data_bulk_1.DataBulk; } });
18
18
  var data_chunks_1 = require("./data-chunks");
@@ -23,10 +23,12 @@ var data_direct_owner_1 = require("./data-direct-owner");
23
23
  Object.defineProperty(exports, "DataDirectOwner", { enumerable: true, get: function () { return data_direct_owner_1.DataDirectOwner; } });
24
24
  var data_entity_membership_1 = require("./data-entity-membership");
25
25
  Object.defineProperty(exports, "DataEntityMembership", { enumerable: true, get: function () { return data_entity_membership_1.DataEntityMembership; } });
26
+ var event_tracker_1 = require("./event-tracker");
27
+ Object.defineProperty(exports, "EventTracker", { enumerable: true, get: function () { return event_tracker_1.EventTracker; } });
26
28
  var data_file_embedding_1 = require("./data-file-embedding");
27
29
  Object.defineProperty(exports, "ProcessFileEmbedding", { enumerable: true, get: function () { return data_file_embedding_1.ProcessFileEmbedding; } });
28
30
  var data_feature_flag_1 = require("./data-feature-flag");
29
- Object.defineProperty(exports, "LimitFeatureFlag", { enumerable: true, get: function () { return data_feature_flag_1.LimitFeatureFlag; } });
31
+ Object.defineProperty(exports, "LimitEnforceFeature", { enumerable: true, get: function () { return data_feature_flag_1.LimitEnforceFeature; } });
30
32
  var data_force_current_user_1 = require("./data-force-current-user");
31
33
  Object.defineProperty(exports, "DataForceCurrentUser", { enumerable: true, get: function () { return data_force_current_user_1.DataForceCurrentUser; } });
32
34
  var data_id_1 = require("./data-id");
@@ -42,7 +44,15 @@ Object.defineProperty(exports, "DataInheritFromParent", { enumerable: true, get:
42
44
  var data_job_trigger_1 = require("./data-job-trigger");
43
45
  Object.defineProperty(exports, "JobTrigger", { enumerable: true, get: function () { return data_job_trigger_1.JobTrigger; } });
44
46
  var data_limit_counter_1 = require("./data-limit-counter");
45
- Object.defineProperty(exports, "LimitCounter", { enumerable: true, get: function () { return data_limit_counter_1.LimitCounter; } });
47
+ Object.defineProperty(exports, "LimitEnforceCounter", { enumerable: true, get: function () { return data_limit_counter_1.LimitEnforceCounter; } });
48
+ var data_meter_rate_limit_1 = require("./data-meter-rate-limit");
49
+ Object.defineProperty(exports, "LimitEnforceRate", { enumerable: true, get: function () { return data_meter_rate_limit_1.LimitEnforceRate; } });
50
+ var limit_warning_counter_1 = require("./limit-warning-counter");
51
+ Object.defineProperty(exports, "LimitWarningCounter", { enumerable: true, get: function () { return limit_warning_counter_1.LimitWarningCounter; } });
52
+ var limit_warning_aggregate_1 = require("./limit-warning-aggregate");
53
+ Object.defineProperty(exports, "LimitWarningAggregate", { enumerable: true, get: function () { return limit_warning_aggregate_1.LimitWarningAggregate; } });
54
+ var limit_warning_rate_1 = require("./limit-warning-rate");
55
+ Object.defineProperty(exports, "LimitWarningRate", { enumerable: true, get: function () { return limit_warning_rate_1.LimitWarningRate; } });
46
56
  var data_jsonb_1 = require("./data-jsonb");
47
57
  Object.defineProperty(exports, "DataJsonb", { enumerable: true, get: function () { return data_jsonb_1.DataJsonb; } });
48
58
  var data_owned_fields_1 = require("./data-owned-fields");
@@ -0,0 +1,2 @@
1
+ import type { NodeTypeDefinition } from '../types';
2
+ export declare const LimitWarningAggregate: NodeTypeDefinition;
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.LimitWarningAggregate = void 0;
4
+ exports.LimitWarningAggregate = {
5
+ name: 'LimitWarningAggregate',
6
+ slug: 'limit_warning_aggregate',
7
+ category: 'limit_warning',
8
+ display_name: 'Warning Aggregate',
9
+ description: '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.',
10
+ parameter_schema: {
11
+ type: 'object',
12
+ properties: {
13
+ limit_name: {
14
+ type: 'string',
15
+ description: 'Name of the aggregate limit to watch (must match a limit_warnings.name entry, e.g. "databases", "members")',
16
+ },
17
+ entity_field: {
18
+ type: 'string',
19
+ format: 'column-ref',
20
+ description: 'Column on the target table that holds the entity id for aggregate limit lookup',
21
+ default: 'entity_id',
22
+ },
23
+ },
24
+ required: ['limit_name'],
25
+ },
26
+ tags: ['limits', 'triggers', 'aggregates', 'warning', 'notifications'],
27
+ };
@@ -0,0 +1,2 @@
1
+ import type { NodeTypeDefinition } from '../types';
2
+ export declare const LimitWarningCounter: NodeTypeDefinition;
@@ -0,0 +1,33 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.LimitWarningCounter = void 0;
4
+ exports.LimitWarningCounter = {
5
+ name: 'LimitWarningCounter',
6
+ slug: 'limit_warning_counter',
7
+ category: 'limit_warning',
8
+ display_name: 'Warning Counter',
9
+ description: '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.',
10
+ parameter_schema: {
11
+ type: 'object',
12
+ properties: {
13
+ limit_name: {
14
+ type: 'string',
15
+ description: 'Name of the limit to watch (must match a limit_warnings.name entry, e.g. "projects", "members")',
16
+ },
17
+ scope: {
18
+ type: 'string',
19
+ enum: ['app', 'org'],
20
+ description: 'Limit scope: "app" (membership_type=1, user-level) or "org" (membership_type=2, entity-level)',
21
+ default: 'app',
22
+ },
23
+ actor_field: {
24
+ type: 'string',
25
+ format: 'column-ref',
26
+ description: 'Column on the target table that holds the actor id for limit lookup',
27
+ default: 'owner_id',
28
+ },
29
+ },
30
+ required: ['limit_name'],
31
+ },
32
+ tags: ['limits', 'triggers', 'warning', 'notifications'],
33
+ };
@@ -0,0 +1,2 @@
1
+ import type { NodeTypeDefinition } from '../types';
2
+ export declare const LimitWarningRate: NodeTypeDefinition;
@@ -0,0 +1,33 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.LimitWarningRate = void 0;
4
+ exports.LimitWarningRate = {
5
+ name: 'LimitWarningRate',
6
+ slug: 'limit_warning_rate',
7
+ category: 'limit_warning',
8
+ display_name: 'Warning Rate Limit',
9
+ description: '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.',
10
+ parameter_schema: {
11
+ type: 'object',
12
+ properties: {
13
+ meter_slug: {
14
+ type: 'string',
15
+ description: 'Slug of the billing meter to check rate limits against (must match a meters table entry)',
16
+ },
17
+ entity_field: {
18
+ type: 'string',
19
+ format: 'column-ref',
20
+ description: 'Column on the target table that holds the entity id for rate limit lookup',
21
+ default: 'entity_id',
22
+ },
23
+ actor_field: {
24
+ type: 'string',
25
+ format: 'column-ref',
26
+ description: 'Column on the target table that holds the actor id for rate limit lookup',
27
+ default: 'owner_id',
28
+ },
29
+ },
30
+ required: ['meter_slug'],
31
+ },
32
+ tags: ['rate-limits', 'triggers', 'warning', 'notifications', 'metering'],
33
+ };
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ProcessExtraction = void 0;
4
+ const conditions_1 = require("../conditions");
4
5
  /**
5
6
  * File extraction processing node.
6
7
  *
@@ -25,6 +26,7 @@ exports.ProcessExtraction = {
25
26
  'Typically used upstream of ProcessFileEmbedding or ProcessChunks.',
26
27
  parameter_schema: {
27
28
  type: 'object',
29
+ $defs: conditions_1.conditionDefs,
28
30
  properties: {
29
31
  // ── Output fields ─────────────────────────────────────────────
30
32
  text_field: {
@@ -39,6 +41,18 @@ exports.ProcessExtraction = {
39
41
  description: 'JSONB field for extraction metadata (page count, language, etc.)',
40
42
  default: 'extracted_metadata'
41
43
  },
44
+ // ── Model config (optional — flows into job payload) ──────────
45
+ extraction_model: {
46
+ type: 'string',
47
+ description: 'Extraction model identifier (e.g. a vision model for OCR, an LLM for ' +
48
+ 'structured extraction). Included in the job payload so the worker knows ' +
49
+ 'which model to use. When null, the worker falls back to runtime config.'
50
+ },
51
+ extraction_provider: {
52
+ type: 'string',
53
+ description: 'Extraction provider name (e.g. "ollama", "openai"). ' +
54
+ 'When null, the worker falls back to runtime config.'
55
+ },
42
56
  // ── MIME scoping ──────────────────────────────────────────────
43
57
  mime_patterns: {
44
58
  type: 'array',
@@ -70,16 +84,7 @@ exports.ProcessExtraction = {
70
84
  bucket_id: 'bucket_id'
71
85
  }
72
86
  },
73
- trigger_conditions: {
74
- description: 'Additional compound conditions beyond MIME filtering. ' +
75
- 'Merged with the auto-generated MIME conditions via AND. ' +
76
- 'Use this to add status checks (e.g., status = \'uploaded\').',
77
- 'x-codegen-type': 'TriggerCondition | TriggerCondition[]',
78
- oneOf: [
79
- { $ref: '#/$defs/triggerCondition' },
80
- { type: 'array', items: { $ref: '#/$defs/triggerCondition' } }
81
- ]
82
- },
87
+ trigger_conditions: conditions_1.triggerConditionsProperty,
83
88
  // ── Job options ───────────────────────────────────────────────
84
89
  queue_name: {
85
90
  type: 'string',
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ProcessImageVersions = void 0;
4
+ const conditions_1 = require("../conditions");
4
5
  /**
5
6
  * Image version processing node.
6
7
  *
@@ -26,6 +27,7 @@ exports.ProcessImageVersions = {
26
27
  'file records linked to the source image.',
27
28
  parameter_schema: {
28
29
  type: 'object',
30
+ $defs: conditions_1.conditionDefs,
29
31
  required: ['versions'],
30
32
  properties: {
31
33
  // ── Version definitions ───────────────────────────────────────
@@ -101,15 +103,7 @@ exports.ProcessImageVersions = {
101
103
  bucket_id: 'bucket_id'
102
104
  }
103
105
  },
104
- trigger_conditions: {
105
- description: 'Additional compound conditions beyond MIME filtering. ' +
106
- 'Merged with the auto-generated MIME conditions via AND.',
107
- 'x-codegen-type': 'TriggerCondition | TriggerCondition[]',
108
- oneOf: [
109
- { $ref: '#/$defs/triggerCondition' },
110
- { type: 'array', items: { $ref: '#/$defs/triggerCondition' } }
111
- ]
112
- },
106
+ trigger_conditions: conditions_1.triggerConditionsProperty,
113
107
  // ── Job options ───────────────────────────────────────────────
114
108
  queue_name: {
115
109
  type: 'string',
@@ -111,6 +111,14 @@ exports.SearchUnified = {
111
111
  format: 'column-ref'
112
112
  }
113
113
  },
114
+ embedding_model: {
115
+ type: 'string',
116
+ description: 'Embedding model identifier. When null, the worker falls back to runtime config.'
117
+ },
118
+ embedding_provider: {
119
+ type: 'string',
120
+ description: 'Embedding provider name. When null, the worker falls back to runtime config.'
121
+ },
114
122
  search_score_weight: {
115
123
  type: 'number',
116
124
  default: 1
@@ -164,6 +172,18 @@ exports.SearchUnified = {
164
172
  }
165
173
  }
166
174
  },
175
+ embedding_text_field: {
176
+ type: 'string',
177
+ format: 'column-ref',
178
+ description: 'Name of the composite text field created for embedding input',
179
+ default: 'embedding_text'
180
+ },
181
+ composite_format: {
182
+ type: 'string',
183
+ enum: ['labeled', 'plain'],
184
+ description: 'Output format for the composite text field',
185
+ default: 'labeled'
186
+ },
167
187
  trgm_fields: {
168
188
  type: 'array',
169
189
  items: {