node-type-registry 0.36.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.
- package/blueprint-types.generated.d.ts +39 -0
- package/codegen/generate-types.js +37 -1
- package/conditions/index.d.ts +1 -0
- package/conditions/index.js +8 -0
- package/conditions/trigger-condition.d.ts +35 -0
- package/conditions/trigger-condition.js +97 -0
- package/data/data-aggregate-limit-counter.d.ts +1 -1
- package/data/data-aggregate-limit-counter.js +7 -7
- package/data/data-billing-meter.d.ts +1 -1
- package/data/data-billing-meter.js +7 -7
- package/data/data-chunks.js +20 -0
- package/data/data-feature-flag.d.ts +1 -1
- package/data/data-feature-flag.js +7 -7
- package/data/data-file-embedding.js +22 -10
- package/data/data-image-embedding.js +15 -9
- package/data/data-job-trigger.js +3 -53
- package/data/data-limit-counter.d.ts +1 -1
- package/data/data-limit-counter.js +7 -7
- package/data/data-meter-rate-limit.d.ts +2 -0
- package/data/data-meter-rate-limit.js +42 -0
- package/data/event-tracker.d.ts +2 -0
- package/data/event-tracker.js +74 -0
- package/data/index.d.ts +9 -4
- package/data/index.js +15 -5
- package/data/limit-warning-aggregate.d.ts +2 -0
- package/data/limit-warning-aggregate.js +27 -0
- package/data/limit-warning-counter.d.ts +2 -0
- package/data/limit-warning-counter.js +33 -0
- package/data/limit-warning-rate.d.ts +2 -0
- package/data/limit-warning-rate.js +33 -0
- package/data/process-extraction.js +15 -10
- package/data/process-image-versions.js +3 -9
- package/data/search-unified.js +8 -0
- package/data/search-vector.js +12 -0
- package/esm/blueprint-types.generated.d.ts +39 -0
- package/esm/codegen/generate-types.js +37 -1
- package/esm/conditions/index.d.ts +1 -0
- package/esm/conditions/index.js +1 -0
- package/esm/conditions/trigger-condition.d.ts +35 -0
- package/esm/conditions/trigger-condition.js +94 -0
- package/esm/data/data-aggregate-limit-counter.d.ts +1 -1
- package/esm/data/data-aggregate-limit-counter.js +6 -6
- package/esm/data/data-billing-meter.d.ts +1 -1
- package/esm/data/data-billing-meter.js +6 -6
- package/esm/data/data-chunks.js +20 -0
- package/esm/data/data-feature-flag.d.ts +1 -1
- package/esm/data/data-feature-flag.js +6 -6
- package/esm/data/data-file-embedding.js +22 -10
- package/esm/data/data-image-embedding.js +15 -9
- package/esm/data/data-job-trigger.js +3 -53
- package/esm/data/data-limit-counter.d.ts +1 -1
- package/esm/data/data-limit-counter.js +6 -6
- package/esm/data/data-meter-rate-limit.d.ts +2 -0
- package/esm/data/data-meter-rate-limit.js +39 -0
- package/esm/data/event-tracker.d.ts +2 -0
- package/esm/data/event-tracker.js +71 -0
- package/esm/data/index.d.ts +9 -4
- package/esm/data/index.js +9 -4
- package/esm/data/limit-warning-aggregate.d.ts +2 -0
- package/esm/data/limit-warning-aggregate.js +24 -0
- package/esm/data/limit-warning-counter.d.ts +2 -0
- package/esm/data/limit-warning-counter.js +30 -0
- package/esm/data/limit-warning-rate.d.ts +2 -0
- package/esm/data/limit-warning-rate.js +30 -0
- package/esm/data/process-extraction.js +15 -10
- package/esm/data/process-image-versions.js +3 -9
- package/esm/data/search-unified.js +8 -0
- package/esm/data/search-vector.js +12 -0
- package/esm/index.d.ts +1 -0
- package/esm/index.js +1 -0
- package/index.d.ts +1 -0
- package/index.js +1 -0
- package/package.json +2 -2
|
@@ -830,6 +830,41 @@ export interface BlueprintStorageConfig {
|
|
|
830
830
|
buckets?: BlueprintEntityTableProvision;
|
|
831
831
|
};
|
|
832
832
|
}
|
|
833
|
+
/** A requirement entry within a blueprint achievement. Defines what events must occur to earn the achievement. */
|
|
834
|
+
export interface BlueprintAchievementRequirement {
|
|
835
|
+
/** Name identifier matching an event_type or step name. */
|
|
836
|
+
event_name: string;
|
|
837
|
+
/** Number of events needed to satisfy this requirement. */
|
|
838
|
+
count: number;
|
|
839
|
+
/** Human-readable description of what this requirement entails. */
|
|
840
|
+
description?: string;
|
|
841
|
+
}
|
|
842
|
+
/** A reward entry within a blueprint achievement. Defines credits granted when the achievement is earned. */
|
|
843
|
+
export interface BlueprintAchievementReward {
|
|
844
|
+
/** Type of reward: limit_credit (grants limit credits) or meter_credit (grants meter credits). */
|
|
845
|
+
reward_type: 'limit_credit' | 'meter_credit';
|
|
846
|
+
/** Target limit name or meter slug for the credit grant. */
|
|
847
|
+
target_name: string;
|
|
848
|
+
/** Number of credits to grant. */
|
|
849
|
+
amount: number;
|
|
850
|
+
/** Credit type: permanent, expiring, etc. Defaults to "permanent". */
|
|
851
|
+
credit_type?: string;
|
|
852
|
+
}
|
|
853
|
+
/** An achievement entry for the blueprint achievements[] section. 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). */
|
|
854
|
+
export interface BlueprintAchievement {
|
|
855
|
+
/** Unique name for the achievement level. */
|
|
856
|
+
name: string;
|
|
857
|
+
/** Human-readable description of this achievement. */
|
|
858
|
+
description?: string;
|
|
859
|
+
/** Display ordering priority; lower values appear first. Defaults to 100. */
|
|
860
|
+
priority?: number;
|
|
861
|
+
/** Requirements that must be met to earn this achievement. */
|
|
862
|
+
requirements: BlueprintAchievementRequirement[];
|
|
863
|
+
/** Rewards granted when the achievement is earned. */
|
|
864
|
+
rewards?: BlueprintAchievementReward[];
|
|
865
|
+
/** Entity prefix to scope this achievement to (e.g., "org", "app"). Used to resolve the correct events_module. Defaults to "app". */
|
|
866
|
+
entity_prefix?: string;
|
|
867
|
+
}
|
|
833
868
|
/** 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. */
|
|
834
869
|
export interface BlueprintEntityTableProvision {
|
|
835
870
|
/** Whether to enable RLS on the entity table. Forwarded to secure_table_provision. Defaults to true. */
|
|
@@ -870,6 +905,8 @@ export interface BlueprintEntityType {
|
|
|
870
905
|
has_storage?: boolean;
|
|
871
906
|
/** Whether to provision entity-scoped invite tables ({prefix}_invites, {prefix}_claimed_invites) and a submit_{prefix}_invite_code() function. Defaults to false. */
|
|
872
907
|
has_invites?: boolean;
|
|
908
|
+
/** Whether to auto-attach an EventTracker to the claimed_invites table for invite-based achievements. Requires has_invites=true AND has_levels=true. When true, records 'invite_claimed' events credited to the sender (inviter) on each claimed invite. Defaults to false. */
|
|
909
|
+
has_invite_achievements?: boolean;
|
|
873
910
|
/** Escape hatch: when true AND table_provision is NULL, zero policies are provisioned on the entity table. Defaults to false. */
|
|
874
911
|
skip_entity_policies?: boolean;
|
|
875
912
|
/** 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). */
|
|
@@ -1142,4 +1179,6 @@ export interface BlueprintDefinition {
|
|
|
1142
1179
|
entity_types?: BlueprintEntityType[];
|
|
1143
1180
|
/** App-level storage configuration. Creates a storage_module (membership_type = NULL), seeds initial buckets, and overrides module-level settings (expiry times, file size limits, CORS). Use provisions for per-table policy overrides. For entity-scoped storage, use entity_types[].has_storage + entity_types[].storage instead. */
|
|
1144
1181
|
storage?: BlueprintStorageConfig;
|
|
1182
|
+
/** 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). */
|
|
1183
|
+
achievements?: BlueprintAchievement[];
|
|
1145
1184
|
}
|
|
@@ -528,6 +528,37 @@ function buildBlueprintStorageConfig() {
|
|
|
528
528
|
])), 'Per-table overrides for storage tables. Each key targets a specific storage table (files, buckets) and uses the same shape as table_provision: { nodes, fields, grants, use_rls, policies }. Fanned out to secure_table_provision targeting the corresponding table. When a key includes policies[], those REPLACE the default storage policies for that table; tables without a key still get defaults.')
|
|
529
529
|
]), 'Storage configuration for an entity type. Seeds initial buckets, overrides module-level settings (expiry times, file size limits, CORS), and provides per-table provisioning overrides via provisions.');
|
|
530
530
|
}
|
|
531
|
+
// ---------------------------------------------------------------------------
|
|
532
|
+
// Achievement types
|
|
533
|
+
// ---------------------------------------------------------------------------
|
|
534
|
+
function buildBlueprintAchievementRequirement() {
|
|
535
|
+
return addJSDoc(exportInterface('BlueprintAchievementRequirement', [
|
|
536
|
+
addJSDoc(requiredProp('event_name', t.tsStringKeyword()), 'Name identifier matching an event_type or step name.'),
|
|
537
|
+
addJSDoc(requiredProp('count', t.tsNumberKeyword()), 'Number of events needed to satisfy this requirement.'),
|
|
538
|
+
addJSDoc(optionalProp('description', t.tsStringKeyword()), 'Human-readable description of what this requirement entails.')
|
|
539
|
+
]), 'A requirement entry within a blueprint achievement. Defines what events must occur to earn the achievement.');
|
|
540
|
+
}
|
|
541
|
+
function buildBlueprintAchievementReward() {
|
|
542
|
+
return addJSDoc(exportInterface('BlueprintAchievementReward', [
|
|
543
|
+
addJSDoc(requiredProp('reward_type', t.tsUnionType([
|
|
544
|
+
t.tsLiteralType(t.stringLiteral('limit_credit')),
|
|
545
|
+
t.tsLiteralType(t.stringLiteral('meter_credit'))
|
|
546
|
+
])), 'Type of reward: limit_credit (grants limit credits) or meter_credit (grants meter credits).'),
|
|
547
|
+
addJSDoc(requiredProp('target_name', t.tsStringKeyword()), 'Target limit name or meter slug for the credit grant.'),
|
|
548
|
+
addJSDoc(requiredProp('amount', t.tsNumberKeyword()), 'Number of credits to grant.'),
|
|
549
|
+
addJSDoc(optionalProp('credit_type', t.tsStringKeyword()), 'Credit type: permanent, expiring, etc. Defaults to "permanent".')
|
|
550
|
+
]), 'A reward entry within a blueprint achievement. Defines credits granted when the achievement is earned.');
|
|
551
|
+
}
|
|
552
|
+
function buildBlueprintAchievement() {
|
|
553
|
+
return addJSDoc(exportInterface('BlueprintAchievement', [
|
|
554
|
+
addJSDoc(requiredProp('name', t.tsStringKeyword()), 'Unique name for the achievement level.'),
|
|
555
|
+
addJSDoc(optionalProp('description', t.tsStringKeyword()), 'Human-readable description of this achievement.'),
|
|
556
|
+
addJSDoc(optionalProp('priority', t.tsNumberKeyword()), 'Display ordering priority; lower values appear first. Defaults to 100.'),
|
|
557
|
+
addJSDoc(requiredProp('requirements', t.tsArrayType(t.tsTypeReference(t.identifier('BlueprintAchievementRequirement')))), 'Requirements that must be met to earn this achievement.'),
|
|
558
|
+
addJSDoc(optionalProp('rewards', t.tsArrayType(t.tsTypeReference(t.identifier('BlueprintAchievementReward')))), 'Rewards granted when the achievement is earned.'),
|
|
559
|
+
addJSDoc(optionalProp('entity_prefix', t.tsStringKeyword()), 'Entity prefix to scope this achievement to (e.g., "org", "app"). Used to resolve the correct events_module. Defaults to "app".')
|
|
560
|
+
]), 'An achievement entry for the blueprint achievements[] section. 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).');
|
|
561
|
+
}
|
|
531
562
|
function buildBlueprintEntityTableProvision() {
|
|
532
563
|
return addJSDoc(exportInterface('BlueprintEntityTableProvision', [
|
|
533
564
|
addJSDoc(optionalProp('use_rls', t.tsBooleanKeyword()), 'Whether to enable RLS on the entity table. Forwarded to secure_table_provision. Defaults to true.'),
|
|
@@ -553,6 +584,7 @@ function buildBlueprintEntityType() {
|
|
|
553
584
|
addJSDoc(optionalProp('has_levels', t.tsBooleanKeyword()), 'Whether to provision a levels module for this entity type. Defaults to false.'),
|
|
554
585
|
addJSDoc(optionalProp('has_storage', t.tsBooleanKeyword()), 'Whether to provision a storage module (buckets, files tables) for this entity type. Defaults to false.'),
|
|
555
586
|
addJSDoc(optionalProp('has_invites', t.tsBooleanKeyword()), 'Whether to provision entity-scoped invite tables ({prefix}_invites, {prefix}_claimed_invites) and a submit_{prefix}_invite_code() function. Defaults to false.'),
|
|
587
|
+
addJSDoc(optionalProp('has_invite_achievements', t.tsBooleanKeyword()), "Whether to auto-attach an EventTracker to the claimed_invites table for invite-based achievements. Requires has_invites=true AND has_levels=true. When true, records 'invite_claimed' events credited to the sender (inviter) on each claimed invite. Defaults to false."),
|
|
556
588
|
addJSDoc(optionalProp('skip_entity_policies', t.tsBooleanKeyword()), 'Escape hatch: when true AND table_provision is NULL, zero policies are provisioned on the entity table. Defaults to false.'),
|
|
557
589
|
addJSDoc(optionalProp('table_provision', t.tsTypeReference(t.identifier('BlueprintEntityTableProvision'))), '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).'),
|
|
558
590
|
addJSDoc(optionalProp('storage', t.tsTypeReference(t.identifier('BlueprintStorageConfig'))), 'Storage configuration. Only used when has_storage is true. Controls RLS policies on storage tables, seeds initial buckets, and overrides module-level settings (expiry times, file size limits, CORS).')
|
|
@@ -583,7 +615,8 @@ function buildBlueprintDefinition() {
|
|
|
583
615
|
addJSDoc(optionalProp('full_text_searches', t.tsArrayType(t.tsTypeReference(t.identifier('BlueprintFullTextSearch')))), 'Full-text search configurations.'),
|
|
584
616
|
addJSDoc(optionalProp('unique_constraints', t.tsArrayType(t.tsTypeReference(t.identifier('BlueprintUniqueConstraint')))), 'Unique constraints on table columns.'),
|
|
585
617
|
addJSDoc(optionalProp('entity_types', t.tsArrayType(t.tsTypeReference(t.identifier('BlueprintEntityType')))), 'Entity types to provision in Phase 0 (before tables). Each entry creates an entity table with membership modules and security.'),
|
|
586
|
-
addJSDoc(optionalProp('storage', t.tsTypeReference(t.identifier('BlueprintStorageConfig'))), 'App-level storage configuration. Creates a storage_module (membership_type = NULL), seeds initial buckets, and overrides module-level settings (expiry times, file size limits, CORS). Use provisions for per-table policy overrides. For entity-scoped storage, use entity_types[].has_storage + entity_types[].storage instead.')
|
|
618
|
+
addJSDoc(optionalProp('storage', t.tsTypeReference(t.identifier('BlueprintStorageConfig'))), 'App-level storage configuration. Creates a storage_module (membership_type = NULL), seeds initial buckets, and overrides module-level settings (expiry times, file size limits, CORS). Use provisions for per-table policy overrides. For entity-scoped storage, use entity_types[].has_storage + entity_types[].storage instead.'),
|
|
619
|
+
addJSDoc(optionalProp('achievements', t.tsArrayType(t.tsTypeReference(t.identifier('BlueprintAchievement')))), '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).')
|
|
587
620
|
]), 'The complete blueprint definition -- the JSONB shape accepted by construct_blueprint().');
|
|
588
621
|
}
|
|
589
622
|
// ---------------------------------------------------------------------------
|
|
@@ -642,6 +675,9 @@ function buildProgram(meta) {
|
|
|
642
675
|
statements.push(buildBlueprintTableUniqueConstraint());
|
|
643
676
|
statements.push(buildBlueprintBucketSeed());
|
|
644
677
|
statements.push(buildBlueprintStorageConfig());
|
|
678
|
+
statements.push(buildBlueprintAchievementRequirement());
|
|
679
|
+
statements.push(buildBlueprintAchievementReward());
|
|
680
|
+
statements.push(buildBlueprintAchievement());
|
|
645
681
|
statements.push(buildBlueprintEntityTableProvision());
|
|
646
682
|
statements.push(buildBlueprintEntityType());
|
|
647
683
|
// -- Node types discriminated union --
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { conditionDefs, conditionProperties, triggerConditionSchema, triggerConditionsProperty } from './trigger-condition';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.triggerConditionsProperty = exports.triggerConditionSchema = exports.conditionProperties = exports.conditionDefs = void 0;
|
|
4
|
+
var trigger_condition_1 = require("./trigger-condition");
|
|
5
|
+
Object.defineProperty(exports, "conditionDefs", { enumerable: true, get: function () { return trigger_condition_1.conditionDefs; } });
|
|
6
|
+
Object.defineProperty(exports, "conditionProperties", { enumerable: true, get: function () { return trigger_condition_1.conditionProperties; } });
|
|
7
|
+
Object.defineProperty(exports, "triggerConditionSchema", { enumerable: true, get: function () { return trigger_condition_1.triggerConditionSchema; } });
|
|
8
|
+
Object.defineProperty(exports, "triggerConditionsProperty", { enumerable: true, get: function () { return trigger_condition_1.triggerConditionsProperty; } });
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { JSONSchema } from '../types';
|
|
2
|
+
/**
|
|
3
|
+
* Shared trigger condition schema used by any node type that creates
|
|
4
|
+
* PostgreSQL triggers with conditional WHEN clauses.
|
|
5
|
+
*
|
|
6
|
+
* Consumed by: JobTrigger, EventTracker, ProcessExtraction,
|
|
7
|
+
* ProcessImageVersions, ProcessFileEmbedding, ProcessImageEmbedding.
|
|
8
|
+
*
|
|
9
|
+
* On the SQL side, these conditions are compiled to AST via
|
|
10
|
+
* metaschema_generators.build_condition_ast().
|
|
11
|
+
*/
|
|
12
|
+
export declare const triggerConditionSchema: JSONSchema;
|
|
13
|
+
/**
|
|
14
|
+
* $defs block for parameter_schema. Spread into any node that uses conditions.
|
|
15
|
+
*
|
|
16
|
+
* Usage:
|
|
17
|
+
* parameter_schema: { type: 'object', $defs: conditionDefs, properties: { ... } }
|
|
18
|
+
*/
|
|
19
|
+
export declare const conditionDefs: Record<string, JSONSchema>;
|
|
20
|
+
/**
|
|
21
|
+
* Common condition-related properties for trigger-based nodes.
|
|
22
|
+
* Three mutually exclusive options for WHEN clause specification.
|
|
23
|
+
*
|
|
24
|
+
* Usage:
|
|
25
|
+
* properties: { event_name: { ... }, ...conditionProperties }
|
|
26
|
+
*/
|
|
27
|
+
export declare const conditionProperties: Record<string, JSONSchema>;
|
|
28
|
+
/**
|
|
29
|
+
* Standalone trigger_conditions property for nodes that compose on top of
|
|
30
|
+
* JobTrigger (Process* nodes). These use trigger_conditions instead of
|
|
31
|
+
* the full condition_field/conditions/watch_fields trio because the
|
|
32
|
+
* underlying JobTrigger handles the WHEN clause; this property adds
|
|
33
|
+
* additional conditions merged via AND.
|
|
34
|
+
*/
|
|
35
|
+
export declare const triggerConditionsProperty: JSONSchema;
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.triggerConditionsProperty = exports.conditionProperties = exports.conditionDefs = exports.triggerConditionSchema = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Shared trigger condition schema used by any node type that creates
|
|
6
|
+
* PostgreSQL triggers with conditional WHEN clauses.
|
|
7
|
+
*
|
|
8
|
+
* Consumed by: JobTrigger, EventTracker, ProcessExtraction,
|
|
9
|
+
* ProcessImageVersions, ProcessFileEmbedding, ProcessImageEmbedding.
|
|
10
|
+
*
|
|
11
|
+
* On the SQL side, these conditions are compiled to AST via
|
|
12
|
+
* metaschema_generators.build_condition_ast().
|
|
13
|
+
*/
|
|
14
|
+
exports.triggerConditionSchema = {
|
|
15
|
+
type: 'object',
|
|
16
|
+
description: 'A leaf condition ({field, op, value?, row?, ref?}) or a combinator ({AND, OR, NOT}).',
|
|
17
|
+
properties: {
|
|
18
|
+
field: { type: 'string', format: 'column-ref', description: 'Column name (validated against the table).' },
|
|
19
|
+
op: {
|
|
20
|
+
type: 'string',
|
|
21
|
+
enum: ['=', '!=', '>', '<', '>=', '<=', 'LIKE', 'NOT LIKE', 'IS NULL', 'IS NOT NULL', 'IS DISTINCT FROM'],
|
|
22
|
+
description: 'Comparison operator.'
|
|
23
|
+
},
|
|
24
|
+
value: { description: 'Comparison value. Type is resolved from the column definition. Omit for IS NULL, IS NOT NULL, IS DISTINCT FROM.' },
|
|
25
|
+
row: { type: 'string', enum: ['NEW', 'OLD'], default: 'NEW', description: 'Row reference (default: NEW).' },
|
|
26
|
+
ref: {
|
|
27
|
+
type: 'object',
|
|
28
|
+
description: 'Column reference for field-to-field comparison (alternative to value).',
|
|
29
|
+
properties: {
|
|
30
|
+
field: { type: 'string', format: 'column-ref' },
|
|
31
|
+
row: { type: 'string', enum: ['NEW', 'OLD'], default: 'NEW' }
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
AND: { type: 'array', description: 'Array of conditions combined with AND.', items: { $ref: '#/$defs/triggerCondition' } },
|
|
35
|
+
OR: { type: 'array', description: 'Array of conditions combined with OR.', items: { $ref: '#/$defs/triggerCondition' } },
|
|
36
|
+
NOT: { $ref: '#/$defs/triggerCondition', description: 'Negated condition.' }
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
/**
|
|
40
|
+
* $defs block for parameter_schema. Spread into any node that uses conditions.
|
|
41
|
+
*
|
|
42
|
+
* Usage:
|
|
43
|
+
* parameter_schema: { type: 'object', $defs: conditionDefs, properties: { ... } }
|
|
44
|
+
*/
|
|
45
|
+
exports.conditionDefs = {
|
|
46
|
+
triggerCondition: exports.triggerConditionSchema
|
|
47
|
+
};
|
|
48
|
+
/**
|
|
49
|
+
* Common condition-related properties for trigger-based nodes.
|
|
50
|
+
* Three mutually exclusive options for WHEN clause specification.
|
|
51
|
+
*
|
|
52
|
+
* Usage:
|
|
53
|
+
* properties: { event_name: { ... }, ...conditionProperties }
|
|
54
|
+
*/
|
|
55
|
+
exports.conditionProperties = {
|
|
56
|
+
condition_field: {
|
|
57
|
+
type: 'string',
|
|
58
|
+
format: 'column-ref',
|
|
59
|
+
description: 'Column name for conditional WHEN clause (fires only when field equals condition_value)'
|
|
60
|
+
},
|
|
61
|
+
condition_value: {
|
|
62
|
+
type: 'string',
|
|
63
|
+
description: 'Value to compare against condition_field in WHEN clause'
|
|
64
|
+
},
|
|
65
|
+
conditions: {
|
|
66
|
+
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.',
|
|
67
|
+
'x-codegen-type': 'TriggerCondition | TriggerCondition[]',
|
|
68
|
+
oneOf: [
|
|
69
|
+
{ $ref: '#/$defs/triggerCondition' },
|
|
70
|
+
{ type: 'array', items: { $ref: '#/$defs/triggerCondition' } }
|
|
71
|
+
]
|
|
72
|
+
},
|
|
73
|
+
watch_fields: {
|
|
74
|
+
type: 'array',
|
|
75
|
+
items: {
|
|
76
|
+
type: 'string',
|
|
77
|
+
format: 'column-ref'
|
|
78
|
+
},
|
|
79
|
+
description: 'For UPDATE triggers, only fire when these fields change (uses DISTINCT FROM)'
|
|
80
|
+
}
|
|
81
|
+
};
|
|
82
|
+
/**
|
|
83
|
+
* Standalone trigger_conditions property for nodes that compose on top of
|
|
84
|
+
* JobTrigger (Process* nodes). These use trigger_conditions instead of
|
|
85
|
+
* the full condition_field/conditions/watch_fields trio because the
|
|
86
|
+
* underlying JobTrigger handles the WHEN clause; this property adds
|
|
87
|
+
* additional conditions merged via AND.
|
|
88
|
+
*/
|
|
89
|
+
exports.triggerConditionsProperty = {
|
|
90
|
+
description: 'Additional compound conditions beyond auto-generated filtering. ' +
|
|
91
|
+
'Merged with the auto-generated conditions via AND.',
|
|
92
|
+
'x-codegen-type': 'TriggerCondition | TriggerCondition[]',
|
|
93
|
+
oneOf: [
|
|
94
|
+
{ $ref: '#/$defs/triggerCondition' },
|
|
95
|
+
{ type: 'array', items: { $ref: '#/$defs/triggerCondition' } }
|
|
96
|
+
]
|
|
97
|
+
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { NodeTypeDefinition } from '../types';
|
|
2
|
-
export declare const
|
|
2
|
+
export declare const LimitEnforceAggregate: NodeTypeDefinition;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
exports.
|
|
5
|
-
name: '
|
|
6
|
-
slug: '
|
|
7
|
-
category: '
|
|
8
|
-
display_name: 'Aggregate
|
|
3
|
+
exports.LimitEnforceAggregate = void 0;
|
|
4
|
+
exports.LimitEnforceAggregate = {
|
|
5
|
+
name: 'LimitEnforceAggregate',
|
|
6
|
+
slug: 'limit_enforce_aggregate',
|
|
7
|
+
category: 'limit_enforce',
|
|
8
|
+
display_name: 'Enforce Aggregate Counter',
|
|
9
9
|
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.',
|
|
10
10
|
parameter_schema: {
|
|
11
11
|
type: 'object',
|
|
@@ -32,5 +32,5 @@ exports.LimitAggregate = {
|
|
|
32
32
|
},
|
|
33
33
|
required: ['limit_name'],
|
|
34
34
|
},
|
|
35
|
-
tags: ['limits', 'triggers', 'aggregates', '
|
|
35
|
+
tags: ['limits', 'triggers', 'aggregates', 'enforce'],
|
|
36
36
|
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { NodeTypeDefinition } from '../types';
|
|
2
|
-
export declare const
|
|
2
|
+
export declare const LimitTrackUsage: NodeTypeDefinition;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
exports.
|
|
5
|
-
name: '
|
|
6
|
-
slug: '
|
|
7
|
-
category: '
|
|
8
|
-
display_name: '
|
|
3
|
+
exports.LimitTrackUsage = void 0;
|
|
4
|
+
exports.LimitTrackUsage = {
|
|
5
|
+
name: 'LimitTrackUsage',
|
|
6
|
+
slug: 'limit_track_usage',
|
|
7
|
+
category: 'limit_track',
|
|
8
|
+
display_name: 'Track Usage',
|
|
9
9
|
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.',
|
|
10
10
|
parameter_schema: {
|
|
11
11
|
type: 'object',
|
|
@@ -37,5 +37,5 @@ exports.BillingMeter = {
|
|
|
37
37
|
},
|
|
38
38
|
required: ['meter_slug'],
|
|
39
39
|
},
|
|
40
|
-
tags: ['billing', 'triggers', 'metering', 'usage'],
|
|
40
|
+
tags: ['billing', 'triggers', 'metering', 'usage', 'track'],
|
|
41
41
|
};
|
package/data/data-chunks.js
CHANGED
|
@@ -66,6 +66,17 @@ exports.ProcessChunks = {
|
|
|
66
66
|
description: 'Distance metric for the HNSW index on chunk embeddings',
|
|
67
67
|
default: 'cosine'
|
|
68
68
|
},
|
|
69
|
+
// ── Model config (optional — flows into job payload) ──────────
|
|
70
|
+
embedding_model: {
|
|
71
|
+
type: 'string',
|
|
72
|
+
description: 'Embedding model identifier for per-chunk embeddings. ' +
|
|
73
|
+
'When null, the worker falls back to runtime config (llm_module / env vars).'
|
|
74
|
+
},
|
|
75
|
+
embedding_provider: {
|
|
76
|
+
type: 'string',
|
|
77
|
+
description: 'Embedding provider name (e.g. "ollama", "openai"). ' +
|
|
78
|
+
'When null, the worker falls back to runtime config.'
|
|
79
|
+
},
|
|
69
80
|
// ── Table naming ───────────────────────────────────────────────
|
|
70
81
|
chunks_table_name: {
|
|
71
82
|
type: 'string',
|
|
@@ -77,6 +88,15 @@ exports.ProcessChunks = {
|
|
|
77
88
|
items: { type: 'string' },
|
|
78
89
|
description: 'Field names from the parent table to copy into chunk metadata'
|
|
79
90
|
},
|
|
91
|
+
// ── Search indexes ───────────────────────────────────────────────
|
|
92
|
+
search_indexes: {
|
|
93
|
+
type: 'array',
|
|
94
|
+
items: { type: 'string', enum: ['fulltext', 'bm25', 'trigram'] },
|
|
95
|
+
description: 'Text search indexes to create on the chunks content column. ' +
|
|
96
|
+
'Enables keyword-based retrieval alongside vector search for ' +
|
|
97
|
+
'hybrid RAG workflows.',
|
|
98
|
+
default: ['fulltext']
|
|
99
|
+
},
|
|
80
100
|
// ── Job trigger ────────────────────────────────────────────────
|
|
81
101
|
enqueue_chunking_job: {
|
|
82
102
|
type: 'boolean',
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { NodeTypeDefinition } from '../types';
|
|
2
|
-
export declare const
|
|
2
|
+
export declare const LimitEnforceFeature: NodeTypeDefinition;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
exports.
|
|
5
|
-
name: '
|
|
6
|
-
slug: '
|
|
7
|
-
category: '
|
|
8
|
-
display_name: 'Feature Flag',
|
|
3
|
+
exports.LimitEnforceFeature = void 0;
|
|
4
|
+
exports.LimitEnforceFeature = {
|
|
5
|
+
name: 'LimitEnforceFeature',
|
|
6
|
+
slug: 'limit_enforce_feature',
|
|
7
|
+
category: 'limit_enforce',
|
|
8
|
+
display_name: 'Enforce Feature Flag',
|
|
9
9
|
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).',
|
|
10
10
|
parameter_schema: {
|
|
11
11
|
type: 'object',
|
|
@@ -29,5 +29,5 @@ exports.LimitFeatureFlag = {
|
|
|
29
29
|
},
|
|
30
30
|
required: ['feature_name'],
|
|
31
31
|
},
|
|
32
|
-
tags: ['limits', 'triggers', 'feature-flags', '
|
|
32
|
+
tags: ['limits', 'triggers', 'feature-flags', 'enforce', 'caps'],
|
|
33
33
|
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ProcessFileEmbedding = void 0;
|
|
4
|
+
const conditions_1 = require("../conditions");
|
|
4
5
|
exports.ProcessFileEmbedding = {
|
|
5
6
|
name: 'ProcessFileEmbedding',
|
|
6
7
|
slug: 'data_file_embedding',
|
|
@@ -15,6 +16,7 @@ exports.ProcessFileEmbedding = {
|
|
|
15
16
|
'names, and embedding strategies.',
|
|
16
17
|
parameter_schema: {
|
|
17
18
|
type: 'object',
|
|
19
|
+
$defs: conditions_1.conditionDefs,
|
|
18
20
|
properties: {
|
|
19
21
|
// ── Vector config (passed through to SearchVector) ─────────────
|
|
20
22
|
field_name: {
|
|
@@ -45,6 +47,18 @@ exports.ProcessFileEmbedding = {
|
|
|
45
47
|
description: 'Index-specific options. HNSW: {m, ef_construction}. IVFFlat: {lists}.',
|
|
46
48
|
default: {}
|
|
47
49
|
},
|
|
50
|
+
// ── Model config (optional — flows into job payload) ──────────
|
|
51
|
+
embedding_model: {
|
|
52
|
+
type: 'string',
|
|
53
|
+
description: 'Embedding model identifier (e.g. "nomic-embed-text", "text-embedding-3-small", ' +
|
|
54
|
+
'"clip-vit-base-patch32"). Included in the job payload so the worker knows which ' +
|
|
55
|
+
'model to use. When null, the worker falls back to runtime config (llm_module / env vars).'
|
|
56
|
+
},
|
|
57
|
+
embedding_provider: {
|
|
58
|
+
type: 'string',
|
|
59
|
+
description: 'Embedding provider name (e.g. "ollama", "openai"). ' +
|
|
60
|
+
'When null, the worker falls back to runtime config.'
|
|
61
|
+
},
|
|
48
62
|
// ── MIME scoping ───────────────────────────────────────────────
|
|
49
63
|
mime_patterns: {
|
|
50
64
|
type: 'array',
|
|
@@ -77,16 +91,7 @@ exports.ProcessFileEmbedding = {
|
|
|
77
91
|
bucket_id: 'bucket_id'
|
|
78
92
|
}
|
|
79
93
|
},
|
|
80
|
-
trigger_conditions:
|
|
81
|
-
description: 'Additional compound conditions beyond MIME filtering. ' +
|
|
82
|
-
'Merged with the auto-generated MIME conditions via AND. ' +
|
|
83
|
-
'Use this to add status checks, field guards, etc.',
|
|
84
|
-
'x-codegen-type': 'TriggerCondition | TriggerCondition[]',
|
|
85
|
-
oneOf: [
|
|
86
|
-
{ $ref: '#/$defs/triggerCondition' },
|
|
87
|
-
{ type: 'array', items: { $ref: '#/$defs/triggerCondition' } }
|
|
88
|
-
]
|
|
89
|
-
},
|
|
94
|
+
trigger_conditions: conditions_1.triggerConditionsProperty,
|
|
90
95
|
// ── Extraction config (optional — enables extract mode) ────────
|
|
91
96
|
extraction: {
|
|
92
97
|
type: 'object',
|
|
@@ -150,6 +155,13 @@ exports.ProcessFileEmbedding = {
|
|
|
150
155
|
items: { type: 'string' },
|
|
151
156
|
description: 'Field names from parent to copy into chunk metadata'
|
|
152
157
|
},
|
|
158
|
+
search_indexes: {
|
|
159
|
+
type: 'array',
|
|
160
|
+
items: { type: 'string', enum: ['fulltext', 'bm25', 'trigram'] },
|
|
161
|
+
description: 'Text search indexes to create on the chunks content column. ' +
|
|
162
|
+
'Enables keyword-based retrieval alongside vector search.',
|
|
163
|
+
default: ['fulltext']
|
|
164
|
+
},
|
|
153
165
|
enqueue_chunking_job: {
|
|
154
166
|
type: 'boolean',
|
|
155
167
|
description: 'Whether to auto-enqueue a chunking job on insert/update',
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ProcessImageEmbedding = void 0;
|
|
4
|
+
const conditions_1 = require("../conditions");
|
|
4
5
|
/**
|
|
5
6
|
* Image-specific preset of ProcessFileEmbedding.
|
|
6
7
|
*
|
|
@@ -24,6 +25,7 @@ exports.ProcessImageEmbedding = {
|
|
|
24
25
|
'Accepts all ProcessFileEmbedding parameters — any overrides are forwarded through.',
|
|
25
26
|
parameter_schema: {
|
|
26
27
|
type: 'object',
|
|
28
|
+
$defs: conditions_1.conditionDefs,
|
|
27
29
|
properties: {
|
|
28
30
|
// ── Vector config (passed through to ProcessFileEmbedding) ──────────
|
|
29
31
|
field_name: {
|
|
@@ -54,6 +56,18 @@ exports.ProcessImageEmbedding = {
|
|
|
54
56
|
description: 'Index-specific options. HNSW: {m, ef_construction}. IVFFlat: {lists}.',
|
|
55
57
|
default: {}
|
|
56
58
|
},
|
|
59
|
+
// ── Model config (optional — flows into job payload) ──────────
|
|
60
|
+
embedding_model: {
|
|
61
|
+
type: 'string',
|
|
62
|
+
description: 'Embedding model identifier (e.g. "clip-vit-base-patch32"). ' +
|
|
63
|
+
'Included in the job payload so the worker knows which model to use. ' +
|
|
64
|
+
'When null, the worker falls back to runtime config (llm_module / env vars).'
|
|
65
|
+
},
|
|
66
|
+
embedding_provider: {
|
|
67
|
+
type: 'string',
|
|
68
|
+
description: 'Embedding provider name (e.g. "ollama", "openai"). ' +
|
|
69
|
+
'When null, the worker falls back to runtime config.'
|
|
70
|
+
},
|
|
57
71
|
// ── MIME scoping ───────────────────────────────────────────────
|
|
58
72
|
mime_patterns: {
|
|
59
73
|
type: 'array',
|
|
@@ -84,15 +98,7 @@ exports.ProcessImageEmbedding = {
|
|
|
84
98
|
bucket_id: 'bucket_id'
|
|
85
99
|
}
|
|
86
100
|
},
|
|
87
|
-
trigger_conditions:
|
|
88
|
-
description: 'Additional compound conditions beyond MIME filtering. ' +
|
|
89
|
-
'Merged with the auto-generated MIME conditions via AND.',
|
|
90
|
-
'x-codegen-type': 'TriggerCondition | TriggerCondition[]',
|
|
91
|
-
oneOf: [
|
|
92
|
-
{ $ref: '#/$defs/triggerCondition' },
|
|
93
|
-
{ type: 'array', items: { $ref: '#/$defs/triggerCondition' } }
|
|
94
|
-
]
|
|
95
|
-
},
|
|
101
|
+
trigger_conditions: conditions_1.triggerConditionsProperty,
|
|
96
102
|
// ── Extraction config (optional — enables extract mode) ────────
|
|
97
103
|
extraction: {
|
|
98
104
|
type: 'object',
|
package/data/data-job-trigger.js
CHANGED
|
@@ -1,31 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.JobTrigger = void 0;
|
|
4
|
-
const
|
|
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
|
-
|
|
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)'
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { NodeTypeDefinition } from '../types';
|
|
2
|
-
export declare const
|
|
2
|
+
export declare const LimitEnforceCounter: NodeTypeDefinition;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
exports.
|
|
5
|
-
name: '
|
|
6
|
-
slug: '
|
|
7
|
-
category: '
|
|
8
|
-
display_name: '
|
|
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', '
|
|
41
|
+
tags: ['limits', 'triggers', 'enforce'],
|
|
42
42
|
};
|