agentlang 0.9.4 → 0.9.6

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 (105) hide show
  1. package/out/api/http.js +8 -2
  2. package/out/api/http.js.map +1 -1
  3. package/out/extension/main.cjs +253 -253
  4. package/out/extension/main.cjs.map +2 -2
  5. package/out/language/generated/ast.d.ts +1997 -151
  6. package/out/language/generated/ast.d.ts.map +1 -1
  7. package/out/language/generated/ast.js +2113 -1263
  8. package/out/language/generated/ast.js.map +1 -1
  9. package/out/language/generated/grammar.d.ts +1 -1
  10. package/out/language/generated/grammar.d.ts.map +1 -1
  11. package/out/language/generated/grammar.js +649 -762
  12. package/out/language/generated/grammar.js.map +1 -1
  13. package/out/language/generated/module.d.ts +1 -1
  14. package/out/language/generated/module.js +1 -1
  15. package/out/language/main.cjs +6401 -4072
  16. package/out/language/main.cjs.map +4 -4
  17. package/out/language/parser.js +8 -8
  18. package/out/language/parser.js.map +1 -1
  19. package/out/runtime/agents/common.d.ts +7 -1
  20. package/out/runtime/agents/common.d.ts.map +1 -1
  21. package/out/runtime/agents/common.js +101 -0
  22. package/out/runtime/agents/common.js.map +1 -1
  23. package/out/runtime/agents/impl/anthropic.js +4 -4
  24. package/out/runtime/agents/impl/anthropic.js.map +1 -1
  25. package/out/runtime/agents/impl/openai.js +4 -4
  26. package/out/runtime/agents/impl/openai.js.map +1 -1
  27. package/out/runtime/auth/defs.d.ts +1 -1
  28. package/out/runtime/auth/defs.js +1 -1
  29. package/out/runtime/defs.d.ts +1 -1
  30. package/out/runtime/defs.js +1 -1
  31. package/out/runtime/exec-graph.d.ts.map +1 -1
  32. package/out/runtime/exec-graph.js +5 -0
  33. package/out/runtime/exec-graph.js.map +1 -1
  34. package/out/runtime/interpreter.d.ts +4 -0
  35. package/out/runtime/interpreter.d.ts.map +1 -1
  36. package/out/runtime/interpreter.js +20 -4
  37. package/out/runtime/interpreter.js.map +1 -1
  38. package/out/runtime/loader.d.ts.map +1 -1
  39. package/out/runtime/loader.js +43 -6
  40. package/out/runtime/loader.js.map +1 -1
  41. package/out/runtime/module.d.ts +18 -3
  42. package/out/runtime/module.d.ts.map +1 -1
  43. package/out/runtime/module.js +62 -4
  44. package/out/runtime/module.js.map +1 -1
  45. package/out/runtime/modules/ai.d.ts +18 -2
  46. package/out/runtime/modules/ai.d.ts.map +1 -1
  47. package/out/runtime/modules/ai.js +271 -21
  48. package/out/runtime/modules/ai.js.map +1 -1
  49. package/out/runtime/modules/auth.d.ts.map +1 -1
  50. package/out/runtime/modules/auth.js +11 -5
  51. package/out/runtime/modules/auth.js.map +1 -1
  52. package/out/runtime/resolvers/interface.d.ts +1 -1
  53. package/out/runtime/resolvers/interface.d.ts.map +1 -1
  54. package/out/runtime/resolvers/interface.js.map +1 -1
  55. package/out/runtime/resolvers/sqldb/database.d.ts +1 -0
  56. package/out/runtime/resolvers/sqldb/database.d.ts.map +1 -1
  57. package/out/runtime/resolvers/sqldb/database.js +19 -10
  58. package/out/runtime/resolvers/sqldb/database.js.map +1 -1
  59. package/out/runtime/resolvers/sqldb/impl.d.ts +1 -1
  60. package/out/runtime/resolvers/sqldb/impl.d.ts.map +1 -1
  61. package/out/runtime/resolvers/sqldb/impl.js +2 -2
  62. package/out/runtime/resolvers/sqldb/impl.js.map +1 -1
  63. package/out/runtime/state.d.ts +37 -367
  64. package/out/runtime/state.d.ts.map +1 -1
  65. package/out/runtime/state.js +3 -0
  66. package/out/runtime/state.js.map +1 -1
  67. package/out/setupClassic.d.ts +98 -0
  68. package/out/setupClassic.d.ts.map +1 -0
  69. package/out/setupClassic.js +38 -0
  70. package/out/setupClassic.js.map +1 -0
  71. package/out/setupCommon.d.ts +2 -0
  72. package/out/setupCommon.d.ts.map +1 -0
  73. package/out/setupCommon.js +33 -0
  74. package/out/setupCommon.js.map +1 -0
  75. package/out/setupExtended.d.ts +40 -0
  76. package/out/setupExtended.d.ts.map +1 -0
  77. package/out/setupExtended.js +67 -0
  78. package/out/setupExtended.js.map +1 -0
  79. package/out/syntaxes/agentlang.monarch.js +4 -4
  80. package/out/syntaxes/agentlang.monarch.js.map +1 -1
  81. package/out/utils/runtime.d.ts +7 -6
  82. package/out/utils/runtime.d.ts.map +1 -1
  83. package/package.json +185 -187
  84. package/src/api/http.ts +8 -2
  85. package/src/language/agentlang.langium +8 -2
  86. package/src/language/generated/ast.ts +2204 -1322
  87. package/src/language/generated/grammar.ts +649 -762
  88. package/src/language/generated/module.ts +1 -1
  89. package/src/language/parser.ts +8 -8
  90. package/src/runtime/agents/common.ts +107 -0
  91. package/src/runtime/agents/impl/anthropic.ts +4 -4
  92. package/src/runtime/agents/impl/openai.ts +4 -4
  93. package/src/runtime/auth/defs.ts +1 -1
  94. package/src/runtime/defs.ts +1 -1
  95. package/src/runtime/exec-graph.ts +4 -0
  96. package/src/runtime/interpreter.ts +23 -4
  97. package/src/runtime/loader.ts +43 -4
  98. package/src/runtime/module.ts +80 -3
  99. package/src/runtime/modules/ai.ts +391 -19
  100. package/src/runtime/modules/auth.ts +11 -5
  101. package/src/runtime/resolvers/interface.ts +1 -1
  102. package/src/runtime/resolvers/sqldb/database.ts +20 -11
  103. package/src/runtime/resolvers/sqldb/impl.ts +3 -3
  104. package/src/runtime/state.ts +4 -0
  105. package/src/syntaxes/agentlang.monarch.ts +4 -4
@@ -1,15 +1,15 @@
1
1
  /******************************************************************************
2
- * This file was generated by langium-cli 3.5.2.
2
+ * This file was generated by langium-cli 4.1.0.
3
3
  * DO NOT EDIT MANUALLY!
4
4
  ******************************************************************************/
5
5
 
6
- /* eslint-disable */
6
+
7
7
  import * as langium from 'langium';
8
8
 
9
9
  export const AgentlangTerminals = {
10
- ID: /(([_a-zA-Z][\w_]*)(\/([_a-zA-Z][\w_]*))?)/,
11
- QUOTED_STRING: /("(((\\([\s\S]))|((?!(((\\|")|\r)|\n))[\s\S]*?))|(\r?\n))*")/,
12
- TICK_QUOTED_STRING: /(`(((\\([\s\S]))|((?!(((\\|`)|\r)|\n))[\s\S]*?))|(\r?\n))*`)/,
10
+ ID: /(?:[_a-zA-Z][\w_]*)(\/(?:[_a-zA-Z][\w_]*))?/,
11
+ QUOTED_STRING: /"(\\(?:[\s\S])|(?:(?!(\\|"|\r|\n))[\s\S]*?)|\r?\n)*"/,
12
+ TICK_QUOTED_STRING: /`(\\(?:[\s\S])|(?:(?!(\\|`|\r|\n))[\s\S]*?)|\r?\n)*`/,
13
13
  INT: /-?[0-9]+/,
14
14
  WS: /\s+/,
15
15
  ML_COMMENT: /\/\*[\s\S]*?\*\//,
@@ -68,6 +68,7 @@ export type AgentlangKeywordNames =
68
68
  | "@then"
69
69
  | "@upsert"
70
70
  | "@where"
71
+ | "@withRole"
71
72
  | "@with_unique"
72
73
  | "["
73
74
  | "]"
@@ -89,6 +90,7 @@ export type AgentlangKeywordNames =
89
90
  | "else"
90
91
  | "entity"
91
92
  | "error"
93
+ | "eval"
92
94
  | "event"
93
95
  | "extends"
94
96
  | "false"
@@ -127,132 +129,6 @@ export type AgentlangKeywordNames =
127
129
 
128
130
  export type AgentlangTokenNames = AgentlangTerminalNames | AgentlangKeywordNames;
129
131
 
130
- export type AttributeValueExpression = Expr;
131
-
132
- export const AttributeValueExpression = 'AttributeValueExpression';
133
-
134
- export function isAttributeValueExpression(item: unknown): item is AttributeValueExpression {
135
- return reflection.isInstance(item, AttributeValueExpression);
136
- }
137
-
138
- export type Boolean = 'false' | 'true';
139
-
140
- export function isBoolean(item: unknown): item is Boolean {
141
- return item === 'true' || item === 'false';
142
- }
143
-
144
- export type Decimal = number;
145
-
146
- export function isDecimal(item: unknown): item is Decimal {
147
- return typeof item === 'number';
148
- }
149
-
150
- export type Definition = AgentDefinition | DecisionDefinition | DirectiveDefinition | FlowDefinition | GlossaryEntryDefinition | PublicAgentDefinition | PublicWorkflowDefinition | RelationshipDefinition | ResolverDefinition | RetryDefinition | ScenarioDefinition | SchemaDefinition | StandaloneStatement | WorkflowDefinition;
151
-
152
- export const Definition = 'Definition';
153
-
154
- export function isDefinition(item: unknown): item is Definition {
155
- return reflection.isInstance(item, Definition);
156
- }
157
-
158
- export type Expr = BinExpr | PrimExpr;
159
-
160
- export const Expr = 'Expr';
161
-
162
- export function isExpr(item: unknown): item is Expr {
163
- return reflection.isInstance(item, Expr);
164
- }
165
-
166
- export type FlowStepSpec = Statement;
167
-
168
- export const FlowStepSpec = 'FlowStepSpec';
169
-
170
- export function isFlowStepSpec(item: unknown): item is FlowStepSpec {
171
- return reflection.isInstance(item, FlowStepSpec);
172
- }
173
-
174
- export type GenericName = STRING | string;
175
-
176
- export function isGenericName(item: unknown): item is GenericName {
177
- return isSTRING(item) || (typeof item === 'string' && (/(([_a-zA-Z][\w_]*)(\/([_a-zA-Z][\w_]*))?)/.test(item)));
178
- }
179
-
180
- export type JoinType = '@full_join' | '@inner_join' | '@join' | '@left_join' | '@right_join';
181
-
182
- export function isJoinType(item: unknown): item is JoinType {
183
- return item === '@join' || item === '@inner_join' || item === '@left_join' || item === '@right_join' || item === '@full_join';
184
- }
185
-
186
- export type PrimExpr = Group | Literal | NegExpr | NotExpr;
187
-
188
- export const PrimExpr = 'PrimExpr';
189
-
190
- export function isPrimExpr(item: unknown): item is PrimExpr {
191
- return reflection.isInstance(item, PrimExpr);
192
- }
193
-
194
- export type QualifiedName = Ref | string;
195
-
196
- export function isQualifiedName(item: unknown): item is QualifiedName {
197
- return isRef(item) || (typeof item === 'string' && (/(([_a-zA-Z][\w_]*)(\/([_a-zA-Z][\w_]*))?)/.test(item)));
198
- }
199
-
200
- export type QueryId = string;
201
-
202
- export function isQueryId(item: unknown): item is QueryId {
203
- return typeof item === 'string';
204
- }
205
-
206
- export type Ref = string;
207
-
208
- export function isRef(item: unknown): item is Ref {
209
- return typeof item === 'string';
210
- }
211
-
212
- export type ResolverPathEntry = GenericName | QualifiedName;
213
-
214
- export function isResolverPathEntry(item: unknown): item is ResolverPathEntry {
215
- return isQualifiedName(item) || isGenericName(item);
216
- }
217
-
218
- export type SchemaDefinition = EntityDefinition | EventDefinition | PublicEventDefinition | RecordDefinition;
219
-
220
- export const SchemaDefinition = 'SchemaDefinition';
221
-
222
- export function isSchemaDefinition(item: unknown): item is SchemaDefinition {
223
- return reflection.isInstance(item, SchemaDefinition);
224
- }
225
-
226
- export type SqlComparisonOpr = '!=' | '<' | '<=' | '<>' | '=' | '>' | '>=' | 'between' | 'in' | 'like';
227
-
228
- export function isSqlComparisonOpr(item: unknown): item is SqlComparisonOpr {
229
- return item === '=' || item === '<>' || item === '!=' || item === '<' || item === '<=' || item === '>' || item === '>=' || item === 'in' || item === 'like' || item === 'between';
230
- }
231
-
232
- export type STRING = string;
233
-
234
- export function isSTRING(item: unknown): item is STRING {
235
- return (typeof item === 'string' && (/("(((\\([\s\S]))|((?!(((\\|")|\r)|\n))[\s\S]*?))|(\r?\n))*")/.test(item) || /(`(((\\([\s\S]))|((?!(((\\|`)|\r)|\n))[\s\S]*?))|(\r?\n))*`)/.test(item)));
236
- }
237
-
238
- export type TaggedId = string;
239
-
240
- export function isTaggedId(item: unknown): item is TaggedId {
241
- return typeof item === 'string';
242
- }
243
-
244
- export type WorkflowHeaderPrefix = 'create' | 'delete' | 'update';
245
-
246
- export function isWorkflowHeaderPrefix(item: unknown): item is WorkflowHeaderPrefix {
247
- return item === 'create' || item === 'update' || item === 'delete';
248
- }
249
-
250
- export type WorkflowHeaderTag = '@after' | '@before';
251
-
252
- export function isWorkflowHeaderTag(item: unknown): item is WorkflowHeaderTag {
253
- return item === '@after' || item === '@before';
254
- }
255
-
256
132
  export interface ActionEntry extends langium.AstNode {
257
133
  readonly $container: EntityActionsDefinitions;
258
134
  readonly $type: 'ActionEntry';
@@ -260,10 +136,14 @@ export interface ActionEntry extends langium.AstNode {
260
136
  name: string;
261
137
  }
262
138
 
263
- export const ActionEntry = 'ActionEntry';
139
+ export const ActionEntry = {
140
+ $type: 'ActionEntry',
141
+ event: 'event',
142
+ name: 'name'
143
+ } as const;
264
144
 
265
145
  export function isActionEntry(item: unknown): item is ActionEntry {
266
- return reflection.isInstance(item, ActionEntry);
146
+ return reflection.isInstance(item, ActionEntry.$type);
267
147
  }
268
148
 
269
149
  export interface AfterTriggerDefinition extends langium.AstNode {
@@ -272,10 +152,13 @@ export interface AfterTriggerDefinition extends langium.AstNode {
272
152
  triggers: TriggerDefinition;
273
153
  }
274
154
 
275
- export const AfterTriggerDefinition = 'AfterTriggerDefinition';
155
+ export const AfterTriggerDefinition = {
156
+ $type: 'AfterTriggerDefinition',
157
+ triggers: 'triggers'
158
+ } as const;
276
159
 
277
160
  export function isAfterTriggerDefinition(item: unknown): item is AfterTriggerDefinition {
278
- return reflection.isInstance(item, AfterTriggerDefinition);
161
+ return reflection.isInstance(item, AfterTriggerDefinition.$type);
279
162
  }
280
163
 
281
164
  export interface AgentDefinition extends langium.AstNode {
@@ -285,10 +168,31 @@ export interface AgentDefinition extends langium.AstNode {
285
168
  name: GenericName;
286
169
  }
287
170
 
288
- export const AgentDefinition = 'AgentDefinition';
171
+ export const AgentDefinition = {
172
+ $type: 'AgentDefinition',
173
+ body: 'body',
174
+ name: 'name'
175
+ } as const;
289
176
 
290
177
  export function isAgentDefinition(item: unknown): item is AgentDefinition {
291
- return reflection.isInstance(item, AgentDefinition);
178
+ return reflection.isInstance(item, AgentDefinition.$type);
179
+ }
180
+
181
+ export interface AgentEvaluatorDefinition extends langium.AstNode {
182
+ readonly $container: ModuleDefinition;
183
+ readonly $type: 'AgentEvaluatorDefinition';
184
+ attributes: Array<SetAttribute>;
185
+ name?: string;
186
+ }
187
+
188
+ export const AgentEvaluatorDefinition = {
189
+ $type: 'AgentEvaluatorDefinition',
190
+ attributes: 'attributes',
191
+ name: 'name'
192
+ } as const;
193
+
194
+ export function isAgentEvaluatorDefinition(item: unknown): item is AgentEvaluatorDefinition {
195
+ return reflection.isInstance(item, AgentEvaluatorDefinition.$type);
292
196
  }
293
197
 
294
198
  export interface AgentXtraAttribute extends langium.AstNode {
@@ -298,10 +202,14 @@ export interface AgentXtraAttribute extends langium.AstNode {
298
202
  value: STRING;
299
203
  }
300
204
 
301
- export const AgentXtraAttribute = 'AgentXtraAttribute';
205
+ export const AgentXtraAttribute = {
206
+ $type: 'AgentXtraAttribute',
207
+ name: 'name',
208
+ value: 'value'
209
+ } as const;
302
210
 
303
211
  export function isAgentXtraAttribute(item: unknown): item is AgentXtraAttribute {
304
- return reflection.isInstance(item, AgentXtraAttribute);
212
+ return reflection.isInstance(item, AgentXtraAttribute.$type);
305
213
  }
306
214
 
307
215
  export interface AgentXtraSpec extends langium.AstNode {
@@ -310,10 +218,13 @@ export interface AgentXtraSpec extends langium.AstNode {
310
218
  attributes: Array<AgentXtraAttribute>;
311
219
  }
312
220
 
313
- export const AgentXtraSpec = 'AgentXtraSpec';
221
+ export const AgentXtraSpec = {
222
+ $type: 'AgentXtraSpec',
223
+ attributes: 'attributes'
224
+ } as const;
314
225
 
315
226
  export function isAgentXtraSpec(item: unknown): item is AgentXtraSpec {
316
- return reflection.isInstance(item, AgentXtraSpec);
227
+ return reflection.isInstance(item, AgentXtraSpec.$type);
317
228
  }
318
229
 
319
230
  export interface AggregateFunctionSpec extends langium.AstNode {
@@ -323,10 +234,14 @@ export interface AggregateFunctionSpec extends langium.AstNode {
323
234
  name: string;
324
235
  }
325
236
 
326
- export const AggregateFunctionSpec = 'AggregateFunctionSpec';
237
+ export const AggregateFunctionSpec = {
238
+ $type: 'AggregateFunctionSpec',
239
+ args: 'args',
240
+ name: 'name'
241
+ } as const;
327
242
 
328
243
  export function isAggregateFunctionSpec(item: unknown): item is AggregateFunctionSpec {
329
- return reflection.isInstance(item, AggregateFunctionSpec);
244
+ return reflection.isInstance(item, AggregateFunctionSpec.$type);
330
245
  }
331
246
 
332
247
  export interface AliasSpec extends langium.AstNode {
@@ -336,10 +251,14 @@ export interface AliasSpec extends langium.AstNode {
336
251
  aliases: Array<string>;
337
252
  }
338
253
 
339
- export const AliasSpec = 'AliasSpec';
254
+ export const AliasSpec = {
255
+ $type: 'AliasSpec',
256
+ alias: 'alias',
257
+ aliases: 'aliases'
258
+ } as const;
340
259
 
341
260
  export function isAliasSpec(item: unknown): item is AliasSpec {
342
- return reflection.isInstance(item, AliasSpec);
261
+ return reflection.isInstance(item, AliasSpec.$type);
343
262
  }
344
263
 
345
264
  export interface ArrayLiteral extends langium.AstNode {
@@ -348,10 +267,13 @@ export interface ArrayLiteral extends langium.AstNode {
348
267
  vals: Array<Statement>;
349
268
  }
350
269
 
351
- export const ArrayLiteral = 'ArrayLiteral';
270
+ export const ArrayLiteral = {
271
+ $type: 'ArrayLiteral',
272
+ vals: 'vals'
273
+ } as const;
352
274
 
353
275
  export function isArrayLiteral(item: unknown): item is ArrayLiteral {
354
- return reflection.isInstance(item, ArrayLiteral);
276
+ return reflection.isInstance(item, ArrayLiteral.$type);
355
277
  }
356
278
 
357
279
  export interface AsyncFnCall extends langium.AstNode {
@@ -360,10 +282,13 @@ export interface AsyncFnCall extends langium.AstNode {
360
282
  fnCall: FnCall;
361
283
  }
362
284
 
363
- export const AsyncFnCall = 'AsyncFnCall';
285
+ export const AsyncFnCall = {
286
+ $type: 'AsyncFnCall',
287
+ fnCall: 'fnCall'
288
+ } as const;
364
289
 
365
290
  export function isAsyncFnCall(item: unknown): item is AsyncFnCall {
366
- return reflection.isInstance(item, AsyncFnCall);
291
+ return reflection.isInstance(item, AsyncFnCall.$type);
367
292
  }
368
293
 
369
294
  export interface AttributeDefinition extends langium.AstNode {
@@ -379,10 +304,30 @@ export interface AttributeDefinition extends langium.AstNode {
379
304
  type?: QualifiedName;
380
305
  }
381
306
 
382
- export const AttributeDefinition = 'AttributeDefinition';
307
+ export const AttributeDefinition = {
308
+ $type: 'AttributeDefinition',
309
+ arrayType: 'arrayType',
310
+ enumSpec: 'enumSpec',
311
+ expr: 'expr',
312
+ name: 'name',
313
+ oneOfSpec: 'oneOfSpec',
314
+ properties: 'properties',
315
+ refSpec: 'refSpec',
316
+ type: 'type'
317
+ } as const;
383
318
 
384
319
  export function isAttributeDefinition(item: unknown): item is AttributeDefinition {
385
- return reflection.isInstance(item, AttributeDefinition);
320
+ return reflection.isInstance(item, AttributeDefinition.$type);
321
+ }
322
+
323
+ export type AttributeValueExpression = Expr;
324
+
325
+ export const AttributeValueExpression = {
326
+ $type: 'AttributeValueExpression'
327
+ } as const;
328
+
329
+ export function isAttributeValueExpression(item: unknown): item is AttributeValueExpression {
330
+ return reflection.isInstance(item, AttributeValueExpression.$type);
386
331
  }
387
332
 
388
333
  export interface BackoffSpec extends langium.AstNode {
@@ -391,10 +336,13 @@ export interface BackoffSpec extends langium.AstNode {
391
336
  attributes: Array<SetAttribute>;
392
337
  }
393
338
 
394
- export const BackoffSpec = 'BackoffSpec';
339
+ export const BackoffSpec = {
340
+ $type: 'BackoffSpec',
341
+ attributes: 'attributes'
342
+ } as const;
395
343
 
396
344
  export function isBackoffSpec(item: unknown): item is BackoffSpec {
397
- return reflection.isInstance(item, BackoffSpec);
345
+ return reflection.isInstance(item, BackoffSpec.$type);
398
346
  }
399
347
 
400
348
  export interface BeforeTriggerDefinition extends langium.AstNode {
@@ -403,10 +351,13 @@ export interface BeforeTriggerDefinition extends langium.AstNode {
403
351
  triggers: TriggerDefinition;
404
352
  }
405
353
 
406
- export const BeforeTriggerDefinition = 'BeforeTriggerDefinition';
354
+ export const BeforeTriggerDefinition = {
355
+ $type: 'BeforeTriggerDefinition',
356
+ triggers: 'triggers'
357
+ } as const;
407
358
 
408
359
  export function isBeforeTriggerDefinition(item: unknown): item is BeforeTriggerDefinition {
409
- return reflection.isInstance(item, BeforeTriggerDefinition);
360
+ return reflection.isInstance(item, BeforeTriggerDefinition.$type);
410
361
  }
411
362
 
412
363
  export interface BinExpr extends langium.AstNode {
@@ -417,10 +368,21 @@ export interface BinExpr extends langium.AstNode {
417
368
  op: '!=' | '*' | '+' | '-' | '/' | '<' | '<=' | '<>' | '==' | '>' | '>=' | 'and' | 'in' | 'like' | 'or';
418
369
  }
419
370
 
420
- export const BinExpr = 'BinExpr';
371
+ export const BinExpr = {
372
+ $type: 'BinExpr',
373
+ e1: 'e1',
374
+ e2: 'e2',
375
+ op: 'op'
376
+ } as const;
421
377
 
422
378
  export function isBinExpr(item: unknown): item is BinExpr {
423
- return reflection.isInstance(item, BinExpr);
379
+ return reflection.isInstance(item, BinExpr.$type);
380
+ }
381
+
382
+ export type Boolean = 'false' | 'true';
383
+
384
+ export function isBoolean(item: unknown): item is Boolean {
385
+ return item === 'true' || item === 'false';
424
386
  }
425
387
 
426
388
  export interface CaseEntry extends langium.AstNode {
@@ -430,10 +392,14 @@ export interface CaseEntry extends langium.AstNode {
430
392
  statements: Array<Statement>;
431
393
  }
432
394
 
433
- export const CaseEntry = 'CaseEntry';
395
+ export const CaseEntry = {
396
+ $type: 'CaseEntry',
397
+ cond: 'cond',
398
+ statements: 'statements'
399
+ } as const;
434
400
 
435
401
  export function isCaseEntry(item: unknown): item is CaseEntry {
436
- return reflection.isInstance(item, CaseEntry);
402
+ return reflection.isInstance(item, CaseEntry.$type);
437
403
  }
438
404
 
439
405
  export interface CatchSpec extends langium.AstNode {
@@ -442,10 +408,13 @@ export interface CatchSpec extends langium.AstNode {
442
408
  handlers: Array<Handler>;
443
409
  }
444
410
 
445
- export const CatchSpec = 'CatchSpec';
411
+ export const CatchSpec = {
412
+ $type: 'CatchSpec',
413
+ handlers: 'handlers'
414
+ } as const;
446
415
 
447
416
  export function isCatchSpec(item: unknown): item is CatchSpec {
448
- return reflection.isInstance(item, CatchSpec);
417
+ return reflection.isInstance(item, CatchSpec.$type);
449
418
  }
450
419
 
451
420
  export interface CompositeUniqueDefinition extends langium.AstNode {
@@ -454,10 +423,13 @@ export interface CompositeUniqueDefinition extends langium.AstNode {
454
423
  attrs: Array<string>;
455
424
  }
456
425
 
457
- export const CompositeUniqueDefinition = 'CompositeUniqueDefinition';
426
+ export const CompositeUniqueDefinition = {
427
+ $type: 'CompositeUniqueDefinition',
428
+ attrs: 'attrs'
429
+ } as const;
458
430
 
459
431
  export function isCompositeUniqueDefinition(item: unknown): item is CompositeUniqueDefinition {
460
- return reflection.isInstance(item, CompositeUniqueDefinition);
432
+ return reflection.isInstance(item, CompositeUniqueDefinition.$type);
461
433
  }
462
434
 
463
435
  export interface ConditionalFlowStep extends langium.AstNode {
@@ -467,10 +439,14 @@ export interface ConditionalFlowStep extends langium.AstNode {
467
439
  next: FlowStepSpec;
468
440
  }
469
441
 
470
- export const ConditionalFlowStep = 'ConditionalFlowStep';
442
+ export const ConditionalFlowStep = {
443
+ $type: 'ConditionalFlowStep',
444
+ expr: 'expr',
445
+ next: 'next'
446
+ } as const;
471
447
 
472
448
  export function isConditionalFlowStep(item: unknown): item is ConditionalFlowStep {
473
- return reflection.isInstance(item, ConditionalFlowStep);
449
+ return reflection.isInstance(item, ConditionalFlowStep.$type);
474
450
  }
475
451
 
476
452
  export interface CrudMap extends langium.AstNode {
@@ -489,10 +465,23 @@ export interface CrudMap extends langium.AstNode {
489
465
  where?: WhereSpec;
490
466
  }
491
467
 
492
- export const CrudMap = 'CrudMap';
468
+ export const CrudMap = {
469
+ $type: 'CrudMap',
470
+ body: 'body',
471
+ distinct: 'distinct',
472
+ groupByClause: 'groupByClause',
473
+ into: 'into',
474
+ joins: 'joins',
475
+ name: 'name',
476
+ orderByClause: 'orderByClause',
477
+ relationships: 'relationships',
478
+ source: 'source',
479
+ upsert: 'upsert',
480
+ where: 'where'
481
+ } as const;
493
482
 
494
483
  export function isCrudMap(item: unknown): item is CrudMap {
495
- return reflection.isInstance(item, CrudMap);
484
+ return reflection.isInstance(item, CrudMap.$type);
496
485
  }
497
486
 
498
487
  export interface CrudMapBody extends langium.AstNode {
@@ -502,10 +491,20 @@ export interface CrudMapBody extends langium.AstNode {
502
491
  properties: Array<PropertyDefinition>;
503
492
  }
504
493
 
505
- export const CrudMapBody = 'CrudMapBody';
494
+ export const CrudMapBody = {
495
+ $type: 'CrudMapBody',
496
+ attributes: 'attributes',
497
+ properties: 'properties'
498
+ } as const;
506
499
 
507
500
  export function isCrudMapBody(item: unknown): item is CrudMapBody {
508
- return reflection.isInstance(item, CrudMapBody);
501
+ return reflection.isInstance(item, CrudMapBody.$type);
502
+ }
503
+
504
+ export type Decimal = number;
505
+
506
+ export function isDecimal(item: unknown): item is Decimal {
507
+ return typeof item === 'number';
509
508
  }
510
509
 
511
510
  export interface DecisionDefBody extends langium.AstNode {
@@ -514,10 +513,13 @@ export interface DecisionDefBody extends langium.AstNode {
514
513
  cases: Array<CaseEntry>;
515
514
  }
516
515
 
517
- export const DecisionDefBody = 'DecisionDefBody';
516
+ export const DecisionDefBody = {
517
+ $type: 'DecisionDefBody',
518
+ cases: 'cases'
519
+ } as const;
518
520
 
519
521
  export function isDecisionDefBody(item: unknown): item is DecisionDefBody {
520
- return reflection.isInstance(item, DecisionDefBody);
522
+ return reflection.isInstance(item, DecisionDefBody.$type);
521
523
  }
522
524
 
523
525
  export interface DecisionDefinition extends langium.AstNode {
@@ -527,10 +529,24 @@ export interface DecisionDefinition extends langium.AstNode {
527
529
  name: GenericName;
528
530
  }
529
531
 
530
- export const DecisionDefinition = 'DecisionDefinition';
532
+ export const DecisionDefinition = {
533
+ $type: 'DecisionDefinition',
534
+ body: 'body',
535
+ name: 'name'
536
+ } as const;
531
537
 
532
538
  export function isDecisionDefinition(item: unknown): item is DecisionDefinition {
533
- return reflection.isInstance(item, DecisionDefinition);
539
+ return reflection.isInstance(item, DecisionDefinition.$type);
540
+ }
541
+
542
+ export type Definition = AgentDefinition | AgentEvaluatorDefinition | DecisionDefinition | DirectiveDefinition | FlowDefinition | GlossaryEntryDefinition | PublicAgentDefinition | PublicWorkflowDefinition | RelationshipDefinition | ResolverDefinition | RetryDefinition | ScenarioDefinition | SchemaDefinition | StandaloneStatement | WorkflowDefinition;
543
+
544
+ export const Definition = {
545
+ $type: 'Definition'
546
+ } as const;
547
+
548
+ export function isDefinition(item: unknown): item is Definition {
549
+ return reflection.isInstance(item, Definition.$type);
534
550
  }
535
551
 
536
552
  export interface Delete extends langium.AstNode {
@@ -539,10 +555,13 @@ export interface Delete extends langium.AstNode {
539
555
  pattern: Pattern;
540
556
  }
541
557
 
542
- export const Delete = 'Delete';
558
+ export const Delete = {
559
+ $type: 'Delete',
560
+ pattern: 'pattern'
561
+ } as const;
543
562
 
544
563
  export function isDelete(item: unknown): item is Delete {
545
- return reflection.isInstance(item, Delete);
564
+ return reflection.isInstance(item, Delete.$type);
546
565
  }
547
566
 
548
567
  export interface DirectiveDefinition extends langium.AstNode {
@@ -553,10 +572,15 @@ export interface DirectiveDefinition extends langium.AstNode {
553
572
  name: Ref;
554
573
  }
555
574
 
556
- export const DirectiveDefinition = 'DirectiveDefinition';
575
+ export const DirectiveDefinition = {
576
+ $type: 'DirectiveDefinition',
577
+ body: 'body',
578
+ dir: 'dir',
579
+ name: 'name'
580
+ } as const;
557
581
 
558
582
  export function isDirectiveDefinition(item: unknown): item is DirectiveDefinition {
559
- return reflection.isInstance(item, DirectiveDefinition);
583
+ return reflection.isInstance(item, DirectiveDefinition.$type);
560
584
  }
561
585
 
562
586
  export interface Else extends langium.AstNode {
@@ -565,10 +589,13 @@ export interface Else extends langium.AstNode {
565
589
  statements: Array<Statement>;
566
590
  }
567
591
 
568
- export const Else = 'Else';
592
+ export const Else = {
593
+ $type: 'Else',
594
+ statements: 'statements'
595
+ } as const;
569
596
 
570
597
  export function isElse(item: unknown): item is Else {
571
- return reflection.isInstance(item, Else);
598
+ return reflection.isInstance(item, Else.$type);
572
599
  }
573
600
 
574
601
  export interface EntityActionsDefinitions extends langium.AstNode {
@@ -577,10 +604,13 @@ export interface EntityActionsDefinitions extends langium.AstNode {
577
604
  entries: Array<ActionEntry>;
578
605
  }
579
606
 
580
- export const EntityActionsDefinitions = 'EntityActionsDefinitions';
607
+ export const EntityActionsDefinitions = {
608
+ $type: 'EntityActionsDefinitions',
609
+ entries: 'entries'
610
+ } as const;
581
611
 
582
612
  export function isEntityActionsDefinitions(item: unknown): item is EntityActionsDefinitions {
583
- return reflection.isInstance(item, EntityActionsDefinitions);
613
+ return reflection.isInstance(item, EntityActionsDefinitions.$type);
584
614
  }
585
615
 
586
616
  export interface EntityDefinition extends langium.AstNode {
@@ -591,10 +621,15 @@ export interface EntityDefinition extends langium.AstNode {
591
621
  schema: RecordSchemaDefinition;
592
622
  }
593
623
 
594
- export const EntityDefinition = 'EntityDefinition';
624
+ export const EntityDefinition = {
625
+ $type: 'EntityDefinition',
626
+ extends: 'extends',
627
+ name: 'name',
628
+ schema: 'schema'
629
+ } as const;
595
630
 
596
631
  export function isEntityDefinition(item: unknown): item is EntityDefinition {
597
- return reflection.isInstance(item, EntityDefinition);
632
+ return reflection.isInstance(item, EntityDefinition.$type);
598
633
  }
599
634
 
600
635
  export interface EnumSpec extends langium.AstNode {
@@ -604,10 +639,14 @@ export interface EnumSpec extends langium.AstNode {
604
639
  values: Array<STRING>;
605
640
  }
606
641
 
607
- export const EnumSpec = 'EnumSpec';
642
+ export const EnumSpec = {
643
+ $type: 'EnumSpec',
644
+ type: 'type',
645
+ values: 'values'
646
+ } as const;
608
647
 
609
648
  export function isEnumSpec(item: unknown): item is EnumSpec {
610
- return reflection.isInstance(item, EnumSpec);
649
+ return reflection.isInstance(item, EnumSpec.$type);
611
650
  }
612
651
 
613
652
  export interface EventDefinition extends langium.AstNode {
@@ -618,10 +657,25 @@ export interface EventDefinition extends langium.AstNode {
618
657
  schema: RecordSchemaDefinition;
619
658
  }
620
659
 
621
- export const EventDefinition = 'EventDefinition';
660
+ export const EventDefinition = {
661
+ $type: 'EventDefinition',
662
+ extends: 'extends',
663
+ name: 'name',
664
+ schema: 'schema'
665
+ } as const;
622
666
 
623
667
  export function isEventDefinition(item: unknown): item is EventDefinition {
624
- return reflection.isInstance(item, EventDefinition);
668
+ return reflection.isInstance(item, EventDefinition.$type);
669
+ }
670
+
671
+ export type Expr = BinExpr | PrimExpr;
672
+
673
+ export const Expr = {
674
+ $type: 'Expr'
675
+ } as const;
676
+
677
+ export function isExpr(item: unknown): item is Expr {
678
+ return reflection.isInstance(item, Expr.$type);
625
679
  }
626
680
 
627
681
  export interface ExtendsClause extends langium.AstNode {
@@ -630,10 +684,13 @@ export interface ExtendsClause extends langium.AstNode {
630
684
  parentName: QualifiedName;
631
685
  }
632
686
 
633
- export const ExtendsClause = 'ExtendsClause';
687
+ export const ExtendsClause = {
688
+ $type: 'ExtendsClause',
689
+ parentName: 'parentName'
690
+ } as const;
634
691
 
635
692
  export function isExtendsClause(item: unknown): item is ExtendsClause {
636
- return reflection.isInstance(item, ExtendsClause);
693
+ return reflection.isInstance(item, ExtendsClause.$type);
637
694
  }
638
695
 
639
696
  export interface FlowDefBody extends langium.AstNode {
@@ -642,10 +699,13 @@ export interface FlowDefBody extends langium.AstNode {
642
699
  entries: Array<FlowEntry>;
643
700
  }
644
701
 
645
- export const FlowDefBody = 'FlowDefBody';
702
+ export const FlowDefBody = {
703
+ $type: 'FlowDefBody',
704
+ entries: 'entries'
705
+ } as const;
646
706
 
647
707
  export function isFlowDefBody(item: unknown): item is FlowDefBody {
648
- return reflection.isInstance(item, FlowDefBody);
708
+ return reflection.isInstance(item, FlowDefBody.$type);
649
709
  }
650
710
 
651
711
  export interface FlowDefinition extends langium.AstNode {
@@ -655,10 +715,14 @@ export interface FlowDefinition extends langium.AstNode {
655
715
  name: GenericName;
656
716
  }
657
717
 
658
- export const FlowDefinition = 'FlowDefinition';
718
+ export const FlowDefinition = {
719
+ $type: 'FlowDefinition',
720
+ body: 'body',
721
+ name: 'name'
722
+ } as const;
659
723
 
660
724
  export function isFlowDefinition(item: unknown): item is FlowDefinition {
661
- return reflection.isInstance(item, FlowDefinition);
725
+ return reflection.isInstance(item, FlowDefinition.$type);
662
726
  }
663
727
 
664
728
  export interface FlowEntry extends langium.AstNode {
@@ -669,10 +733,25 @@ export interface FlowEntry extends langium.AstNode {
669
733
  root: QueryId;
670
734
  }
671
735
 
672
- export const FlowEntry = 'FlowEntry';
736
+ export const FlowEntry = {
737
+ $type: 'FlowEntry',
738
+ cond: 'cond',
739
+ next: 'next',
740
+ root: 'root'
741
+ } as const;
673
742
 
674
743
  export function isFlowEntry(item: unknown): item is FlowEntry {
675
- return reflection.isInstance(item, FlowEntry);
744
+ return reflection.isInstance(item, FlowEntry.$type);
745
+ }
746
+
747
+ export type FlowStepSpec = Statement;
748
+
749
+ export const FlowStepSpec = {
750
+ $type: 'FlowStepSpec'
751
+ } as const;
752
+
753
+ export function isFlowStepSpec(item: unknown): item is FlowStepSpec {
754
+ return reflection.isInstance(item, FlowStepSpec.$type);
676
755
  }
677
756
 
678
757
  export interface FnCall extends langium.AstNode {
@@ -682,10 +761,14 @@ export interface FnCall extends langium.AstNode {
682
761
  name: Ref | string;
683
762
  }
684
763
 
685
- export const FnCall = 'FnCall';
764
+ export const FnCall = {
765
+ $type: 'FnCall',
766
+ args: 'args',
767
+ name: 'name'
768
+ } as const;
686
769
 
687
770
  export function isFnCall(item: unknown): item is FnCall {
688
- return reflection.isInstance(item, FnCall);
771
+ return reflection.isInstance(item, FnCall.$type);
689
772
  }
690
773
 
691
774
  export interface ForEach extends langium.AstNode {
@@ -696,10 +779,15 @@ export interface ForEach extends langium.AstNode {
696
779
  var: string;
697
780
  }
698
781
 
699
- export const ForEach = 'ForEach';
782
+ export const ForEach = {
783
+ $type: 'ForEach',
784
+ src: 'src',
785
+ statements: 'statements',
786
+ var: 'var'
787
+ } as const;
700
788
 
701
789
  export function isForEach(item: unknown): item is ForEach {
702
- return reflection.isInstance(item, ForEach);
790
+ return reflection.isInstance(item, ForEach.$type);
703
791
  }
704
792
 
705
793
  export interface FullTextSearch extends langium.AstNode {
@@ -710,10 +798,15 @@ export interface FullTextSearch extends langium.AstNode {
710
798
  query: Literal;
711
799
  }
712
800
 
713
- export const FullTextSearch = 'FullTextSearch';
801
+ export const FullTextSearch = {
802
+ $type: 'FullTextSearch',
803
+ name: 'name',
804
+ options: 'options',
805
+ query: 'query'
806
+ } as const;
714
807
 
715
808
  export function isFullTextSearch(item: unknown): item is FullTextSearch {
716
- return reflection.isInstance(item, FullTextSearch);
809
+ return reflection.isInstance(item, FullTextSearch.$type);
717
810
  }
718
811
 
719
812
  export interface GenericDefBody extends langium.AstNode {
@@ -722,10 +815,19 @@ export interface GenericDefBody extends langium.AstNode {
722
815
  attributes: Array<GenericPropertyDef>;
723
816
  }
724
817
 
725
- export const GenericDefBody = 'GenericDefBody';
818
+ export const GenericDefBody = {
819
+ $type: 'GenericDefBody',
820
+ attributes: 'attributes'
821
+ } as const;
726
822
 
727
823
  export function isGenericDefBody(item: unknown): item is GenericDefBody {
728
- return reflection.isInstance(item, GenericDefBody);
824
+ return reflection.isInstance(item, GenericDefBody.$type);
825
+ }
826
+
827
+ export type GenericName = STRING | string;
828
+
829
+ export function isGenericName(item: unknown): item is GenericName {
830
+ return isSTRING(item) || (typeof item === 'string' && (/(?:[_a-zA-Z][\w_]*)(\/(?:[_a-zA-Z][\w_]*))?/.test(item)));
729
831
  }
730
832
 
731
833
  export interface GenericPropertyDef extends langium.AstNode {
@@ -735,10 +837,14 @@ export interface GenericPropertyDef extends langium.AstNode {
735
837
  value: Literal;
736
838
  }
737
839
 
738
- export const GenericPropertyDef = 'GenericPropertyDef';
840
+ export const GenericPropertyDef = {
841
+ $type: 'GenericPropertyDef',
842
+ name: 'name',
843
+ value: 'value'
844
+ } as const;
739
845
 
740
846
  export function isGenericPropertyDef(item: unknown): item is GenericPropertyDef {
741
- return reflection.isInstance(item, GenericPropertyDef);
847
+ return reflection.isInstance(item, GenericPropertyDef.$type);
742
848
  }
743
849
 
744
850
  export interface GlossaryEntryDefinition extends langium.AstNode {
@@ -749,10 +855,15 @@ export interface GlossaryEntryDefinition extends langium.AstNode {
749
855
  name: Ref;
750
856
  }
751
857
 
752
- export const GlossaryEntryDefinition = 'GlossaryEntryDefinition';
858
+ export const GlossaryEntryDefinition = {
859
+ $type: 'GlossaryEntryDefinition',
860
+ body: 'body',
861
+ glos: 'glos',
862
+ name: 'name'
863
+ } as const;
753
864
 
754
865
  export function isGlossaryEntryDefinition(item: unknown): item is GlossaryEntryDefinition {
755
- return reflection.isInstance(item, GlossaryEntryDefinition);
866
+ return reflection.isInstance(item, GlossaryEntryDefinition.$type);
756
867
  }
757
868
 
758
869
  export interface Group extends langium.AstNode {
@@ -761,10 +872,13 @@ export interface Group extends langium.AstNode {
761
872
  ge: Expr;
762
873
  }
763
874
 
764
- export const Group = 'Group';
875
+ export const Group = {
876
+ $type: 'Group',
877
+ ge: 'ge'
878
+ } as const;
765
879
 
766
880
  export function isGroup(item: unknown): item is Group {
767
- return reflection.isInstance(item, Group);
881
+ return reflection.isInstance(item, Group.$type);
768
882
  }
769
883
 
770
884
  export interface GroupByClause extends langium.AstNode {
@@ -773,10 +887,13 @@ export interface GroupByClause extends langium.AstNode {
773
887
  colNames: Array<QualifiedName>;
774
888
  }
775
889
 
776
- export const GroupByClause = 'GroupByClause';
890
+ export const GroupByClause = {
891
+ $type: 'GroupByClause',
892
+ colNames: 'colNames'
893
+ } as const;
777
894
 
778
895
  export function isGroupByClause(item: unknown): item is GroupByClause {
779
- return reflection.isInstance(item, GroupByClause);
896
+ return reflection.isInstance(item, GroupByClause.$type);
780
897
  }
781
898
 
782
899
  export interface Handler extends langium.AstNode {
@@ -786,10 +903,14 @@ export interface Handler extends langium.AstNode {
786
903
  stmt: Statement;
787
904
  }
788
905
 
789
- export const Handler = 'Handler';
906
+ export const Handler = {
907
+ $type: 'Handler',
908
+ except: 'except',
909
+ stmt: 'stmt'
910
+ } as const;
790
911
 
791
912
  export function isHandler(item: unknown): item is Handler {
792
- return reflection.isInstance(item, Handler);
913
+ return reflection.isInstance(item, Handler.$type);
793
914
  }
794
915
 
795
916
  export interface If extends langium.AstNode {
@@ -800,10 +921,15 @@ export interface If extends langium.AstNode {
800
921
  statements: Array<Statement>;
801
922
  }
802
923
 
803
- export const If = 'If';
924
+ export const If = {
925
+ $type: 'If',
926
+ cond: 'cond',
927
+ else: 'else',
928
+ statements: 'statements'
929
+ } as const;
804
930
 
805
931
  export function isIf(item: unknown): item is If {
806
- return reflection.isInstance(item, If);
932
+ return reflection.isInstance(item, If.$type);
807
933
  }
808
934
 
809
935
  export interface IfWithAlias extends langium.AstNode {
@@ -812,10 +938,13 @@ export interface IfWithAlias extends langium.AstNode {
812
938
  if: If;
813
939
  }
814
940
 
815
- export const IfWithAlias = 'IfWithAlias';
941
+ export const IfWithAlias = {
942
+ $type: 'IfWithAlias',
943
+ if: 'if'
944
+ } as const;
816
945
 
817
946
  export function isIfWithAlias(item: unknown): item is IfWithAlias {
818
- return reflection.isInstance(item, IfWithAlias);
947
+ return reflection.isInstance(item, IfWithAlias.$type);
819
948
  }
820
949
 
821
950
  export interface Import extends langium.AstNode {
@@ -825,10 +954,14 @@ export interface Import extends langium.AstNode {
825
954
  path: STRING;
826
955
  }
827
956
 
828
- export const Import = 'Import';
957
+ export const Import = {
958
+ $type: 'Import',
959
+ name: 'name',
960
+ path: 'path'
961
+ } as const;
829
962
 
830
963
  export function isImport(item: unknown): item is Import {
831
- return reflection.isInstance(item, Import);
964
+ return reflection.isInstance(item, Import.$type);
832
965
  }
833
966
 
834
967
  export interface JoinSpec extends langium.AstNode {
@@ -841,10 +974,23 @@ export interface JoinSpec extends langium.AstNode {
841
974
  type: JoinType;
842
975
  }
843
976
 
844
- export const JoinSpec = 'JoinSpec';
977
+ export const JoinSpec = {
978
+ $type: 'JoinSpec',
979
+ lhs: 'lhs',
980
+ name: 'name',
981
+ op: 'op',
982
+ rhs: 'rhs',
983
+ type: 'type'
984
+ } as const;
845
985
 
846
986
  export function isJoinSpec(item: unknown): item is JoinSpec {
847
- return reflection.isInstance(item, JoinSpec);
987
+ return reflection.isInstance(item, JoinSpec.$type);
988
+ }
989
+
990
+ export type JoinType = '@full_join' | '@inner_join' | '@join' | '@left_join' | '@right_join';
991
+
992
+ export function isJoinType(item: unknown): item is JoinType {
993
+ return item === '@join' || item === '@inner_join' || item === '@left_join' || item === '@right_join' || item === '@full_join';
848
994
  }
849
995
 
850
996
  export interface KvPair extends langium.AstNode {
@@ -854,10 +1000,14 @@ export interface KvPair extends langium.AstNode {
854
1000
  value: Literal;
855
1001
  }
856
1002
 
857
- export const KvPair = 'KvPair';
1003
+ export const KvPair = {
1004
+ $type: 'KvPair',
1005
+ key: 'key',
1006
+ value: 'value'
1007
+ } as const;
858
1008
 
859
1009
  export function isKvPair(item: unknown): item is KvPair {
860
- return reflection.isInstance(item, KvPair);
1010
+ return reflection.isInstance(item, KvPair.$type);
861
1011
  }
862
1012
 
863
1013
  export interface KvPairs extends langium.AstNode {
@@ -866,10 +1016,13 @@ export interface KvPairs extends langium.AstNode {
866
1016
  pairs: Array<KvPair>;
867
1017
  }
868
1018
 
869
- export const KvPairs = 'KvPairs';
1019
+ export const KvPairs = {
1020
+ $type: 'KvPairs',
1021
+ pairs: 'pairs'
1022
+ } as const;
870
1023
 
871
1024
  export function isKvPairs(item: unknown): item is KvPairs {
872
- return reflection.isInstance(item, KvPairs);
1025
+ return reflection.isInstance(item, KvPairs.$type);
873
1026
  }
874
1027
 
875
1028
  export interface Literal extends langium.AstNode {
@@ -886,10 +1039,21 @@ export interface Literal extends langium.AstNode {
886
1039
  str?: STRING;
887
1040
  }
888
1041
 
889
- export const Literal = 'Literal';
1042
+ export const Literal = {
1043
+ $type: 'Literal',
1044
+ array: 'array',
1045
+ asyncFnCall: 'asyncFnCall',
1046
+ bool: 'bool',
1047
+ fnCall: 'fnCall',
1048
+ id: 'id',
1049
+ map: 'map',
1050
+ num: 'num',
1051
+ ref: 'ref',
1052
+ str: 'str'
1053
+ } as const;
890
1054
 
891
1055
  export function isLiteral(item: unknown): item is Literal {
892
- return reflection.isInstance(item, Literal);
1056
+ return reflection.isInstance(item, Literal.$type);
893
1057
  }
894
1058
 
895
1059
  export interface MapEntry extends langium.AstNode {
@@ -899,10 +1063,14 @@ export interface MapEntry extends langium.AstNode {
899
1063
  value: Expr;
900
1064
  }
901
1065
 
902
- export const MapEntry = 'MapEntry';
1066
+ export const MapEntry = {
1067
+ $type: 'MapEntry',
1068
+ key: 'key',
1069
+ value: 'value'
1070
+ } as const;
903
1071
 
904
1072
  export function isMapEntry(item: unknown): item is MapEntry {
905
- return reflection.isInstance(item, MapEntry);
1073
+ return reflection.isInstance(item, MapEntry.$type);
906
1074
  }
907
1075
 
908
1076
  export interface MapKey extends langium.AstNode {
@@ -913,10 +1081,15 @@ export interface MapKey extends langium.AstNode {
913
1081
  str?: STRING;
914
1082
  }
915
1083
 
916
- export const MapKey = 'MapKey';
1084
+ export const MapKey = {
1085
+ $type: 'MapKey',
1086
+ bool: 'bool',
1087
+ num: 'num',
1088
+ str: 'str'
1089
+ } as const;
917
1090
 
918
1091
  export function isMapKey(item: unknown): item is MapKey {
919
- return reflection.isInstance(item, MapKey);
1092
+ return reflection.isInstance(item, MapKey.$type);
920
1093
  }
921
1094
 
922
1095
  export interface MapLiteral extends langium.AstNode {
@@ -925,10 +1098,13 @@ export interface MapLiteral extends langium.AstNode {
925
1098
  entries: Array<MapEntry>;
926
1099
  }
927
1100
 
928
- export const MapLiteral = 'MapLiteral';
1101
+ export const MapLiteral = {
1102
+ $type: 'MapLiteral',
1103
+ entries: 'entries'
1104
+ } as const;
929
1105
 
930
1106
  export function isMapLiteral(item: unknown): item is MapLiteral {
931
- return reflection.isInstance(item, MapLiteral);
1107
+ return reflection.isInstance(item, MapLiteral.$type);
932
1108
  }
933
1109
 
934
1110
  export interface MetaDefinition extends langium.AstNode {
@@ -937,10 +1113,13 @@ export interface MetaDefinition extends langium.AstNode {
937
1113
  spec: MapLiteral;
938
1114
  }
939
1115
 
940
- export const MetaDefinition = 'MetaDefinition';
1116
+ export const MetaDefinition = {
1117
+ $type: 'MetaDefinition',
1118
+ spec: 'spec'
1119
+ } as const;
941
1120
 
942
1121
  export function isMetaDefinition(item: unknown): item is MetaDefinition {
943
- return reflection.isInstance(item, MetaDefinition);
1122
+ return reflection.isInstance(item, MetaDefinition.$type);
944
1123
  }
945
1124
 
946
1125
  export interface ModuleDefinition extends langium.AstNode {
@@ -950,10 +1129,15 @@ export interface ModuleDefinition extends langium.AstNode {
950
1129
  name: QualifiedName;
951
1130
  }
952
1131
 
953
- export const ModuleDefinition = 'ModuleDefinition';
1132
+ export const ModuleDefinition = {
1133
+ $type: 'ModuleDefinition',
1134
+ defs: 'defs',
1135
+ imports: 'imports',
1136
+ name: 'name'
1137
+ } as const;
954
1138
 
955
1139
  export function isModuleDefinition(item: unknown): item is ModuleDefinition {
956
- return reflection.isInstance(item, ModuleDefinition);
1140
+ return reflection.isInstance(item, ModuleDefinition.$type);
957
1141
  }
958
1142
 
959
1143
  export interface NegExpr extends langium.AstNode {
@@ -962,10 +1146,13 @@ export interface NegExpr extends langium.AstNode {
962
1146
  ne: Expr;
963
1147
  }
964
1148
 
965
- export const NegExpr = 'NegExpr';
1149
+ export const NegExpr = {
1150
+ $type: 'NegExpr',
1151
+ ne: 'ne'
1152
+ } as const;
966
1153
 
967
1154
  export function isNegExpr(item: unknown): item is NegExpr {
968
- return reflection.isInstance(item, NegExpr);
1155
+ return reflection.isInstance(item, NegExpr.$type);
969
1156
  }
970
1157
 
971
1158
  export interface NodeDefinition extends langium.AstNode {
@@ -975,10 +1162,14 @@ export interface NodeDefinition extends langium.AstNode {
975
1162
  name: QualifiedName;
976
1163
  }
977
1164
 
978
- export const NodeDefinition = 'NodeDefinition';
1165
+ export const NodeDefinition = {
1166
+ $type: 'NodeDefinition',
1167
+ alias: 'alias',
1168
+ name: 'name'
1169
+ } as const;
979
1170
 
980
1171
  export function isNodeDefinition(item: unknown): item is NodeDefinition {
981
- return reflection.isInstance(item, NodeDefinition);
1172
+ return reflection.isInstance(item, NodeDefinition.$type);
982
1173
  }
983
1174
 
984
1175
  export interface NotExpr extends langium.AstNode {
@@ -987,10 +1178,13 @@ export interface NotExpr extends langium.AstNode {
987
1178
  ne: Expr;
988
1179
  }
989
1180
 
990
- export const NotExpr = 'NotExpr';
1181
+ export const NotExpr = {
1182
+ $type: 'NotExpr',
1183
+ ne: 'ne'
1184
+ } as const;
991
1185
 
992
1186
  export function isNotExpr(item: unknown): item is NotExpr {
993
- return reflection.isInstance(item, NotExpr);
1187
+ return reflection.isInstance(item, NotExpr.$type);
994
1188
  }
995
1189
 
996
1190
  export interface OneOfSpec extends langium.AstNode {
@@ -999,10 +1193,13 @@ export interface OneOfSpec extends langium.AstNode {
999
1193
  ref: Ref;
1000
1194
  }
1001
1195
 
1002
- export const OneOfSpec = 'OneOfSpec';
1196
+ export const OneOfSpec = {
1197
+ $type: 'OneOfSpec',
1198
+ ref: 'ref'
1199
+ } as const;
1003
1200
 
1004
1201
  export function isOneOfSpec(item: unknown): item is OneOfSpec {
1005
- return reflection.isInstance(item, OneOfSpec);
1202
+ return reflection.isInstance(item, OneOfSpec.$type);
1006
1203
  }
1007
1204
 
1008
1205
  export interface OrderByClause extends langium.AstNode {
@@ -1012,10 +1209,14 @@ export interface OrderByClause extends langium.AstNode {
1012
1209
  order?: '@asc' | '@desc';
1013
1210
  }
1014
1211
 
1015
- export const OrderByClause = 'OrderByClause';
1212
+ export const OrderByClause = {
1213
+ $type: 'OrderByClause',
1214
+ colNames: 'colNames',
1215
+ order: 'order'
1216
+ } as const;
1016
1217
 
1017
1218
  export function isOrderByClause(item: unknown): item is OrderByClause {
1018
- return reflection.isInstance(item, OrderByClause);
1219
+ return reflection.isInstance(item, OrderByClause.$type);
1019
1220
  }
1020
1221
 
1021
1222
  export interface Pattern extends langium.AstNode {
@@ -1033,10 +1234,22 @@ export interface Pattern extends langium.AstNode {
1033
1234
  throwError?: ThrowError;
1034
1235
  }
1035
1236
 
1036
- export const Pattern = 'Pattern';
1237
+ export const Pattern = {
1238
+ $type: 'Pattern',
1239
+ crudMap: 'crudMap',
1240
+ delete: 'delete',
1241
+ expr: 'expr',
1242
+ forEach: 'forEach',
1243
+ fullTextSearch: 'fullTextSearch',
1244
+ if: 'if',
1245
+ ifWithAlias: 'ifWithAlias',
1246
+ purge: 'purge',
1247
+ return: 'return',
1248
+ throwError: 'throwError'
1249
+ } as const;
1037
1250
 
1038
1251
  export function isPattern(item: unknown): item is Pattern {
1039
- return reflection.isInstance(item, Pattern);
1252
+ return reflection.isInstance(item, Pattern.$type);
1040
1253
  }
1041
1254
 
1042
1255
  export interface PrePostTriggerDefinition extends langium.AstNode {
@@ -1046,10 +1259,24 @@ export interface PrePostTriggerDefinition extends langium.AstNode {
1046
1259
  before?: BeforeTriggerDefinition;
1047
1260
  }
1048
1261
 
1049
- export const PrePostTriggerDefinition = 'PrePostTriggerDefinition';
1262
+ export const PrePostTriggerDefinition = {
1263
+ $type: 'PrePostTriggerDefinition',
1264
+ after: 'after',
1265
+ before: 'before'
1266
+ } as const;
1050
1267
 
1051
1268
  export function isPrePostTriggerDefinition(item: unknown): item is PrePostTriggerDefinition {
1052
- return reflection.isInstance(item, PrePostTriggerDefinition);
1269
+ return reflection.isInstance(item, PrePostTriggerDefinition.$type);
1270
+ }
1271
+
1272
+ export type PrimExpr = Group | Literal | NegExpr | NotExpr;
1273
+
1274
+ export const PrimExpr = {
1275
+ $type: 'PrimExpr'
1276
+ } as const;
1277
+
1278
+ export function isPrimExpr(item: unknown): item is PrimExpr {
1279
+ return reflection.isInstance(item, PrimExpr.$type);
1053
1280
  }
1054
1281
 
1055
1282
  export interface PropertyDefinition extends langium.AstNode {
@@ -1059,10 +1286,14 @@ export interface PropertyDefinition extends langium.AstNode {
1059
1286
  value?: KvPairs;
1060
1287
  }
1061
1288
 
1062
- export const PropertyDefinition = 'PropertyDefinition';
1289
+ export const PropertyDefinition = {
1290
+ $type: 'PropertyDefinition',
1291
+ name: 'name',
1292
+ value: 'value'
1293
+ } as const;
1063
1294
 
1064
1295
  export function isPropertyDefinition(item: unknown): item is PropertyDefinition {
1065
- return reflection.isInstance(item, PropertyDefinition);
1296
+ return reflection.isInstance(item, PropertyDefinition.$type);
1066
1297
  }
1067
1298
 
1068
1299
  export interface PublicAgentDefinition extends langium.AstNode {
@@ -1071,10 +1302,13 @@ export interface PublicAgentDefinition extends langium.AstNode {
1071
1302
  def: AgentDefinition;
1072
1303
  }
1073
1304
 
1074
- export const PublicAgentDefinition = 'PublicAgentDefinition';
1305
+ export const PublicAgentDefinition = {
1306
+ $type: 'PublicAgentDefinition',
1307
+ def: 'def'
1308
+ } as const;
1075
1309
 
1076
1310
  export function isPublicAgentDefinition(item: unknown): item is PublicAgentDefinition {
1077
- return reflection.isInstance(item, PublicAgentDefinition);
1311
+ return reflection.isInstance(item, PublicAgentDefinition.$type);
1078
1312
  }
1079
1313
 
1080
1314
  export interface PublicEventDefinition extends langium.AstNode {
@@ -1083,10 +1317,13 @@ export interface PublicEventDefinition extends langium.AstNode {
1083
1317
  def: EventDefinition;
1084
1318
  }
1085
1319
 
1086
- export const PublicEventDefinition = 'PublicEventDefinition';
1320
+ export const PublicEventDefinition = {
1321
+ $type: 'PublicEventDefinition',
1322
+ def: 'def'
1323
+ } as const;
1087
1324
 
1088
1325
  export function isPublicEventDefinition(item: unknown): item is PublicEventDefinition {
1089
- return reflection.isInstance(item, PublicEventDefinition);
1326
+ return reflection.isInstance(item, PublicEventDefinition.$type);
1090
1327
  }
1091
1328
 
1092
1329
  export interface PublicWorkflowDefinition extends langium.AstNode {
@@ -1095,10 +1332,13 @@ export interface PublicWorkflowDefinition extends langium.AstNode {
1095
1332
  def: WorkflowDefinition;
1096
1333
  }
1097
1334
 
1098
- export const PublicWorkflowDefinition = 'PublicWorkflowDefinition';
1335
+ export const PublicWorkflowDefinition = {
1336
+ $type: 'PublicWorkflowDefinition',
1337
+ def: 'def'
1338
+ } as const;
1099
1339
 
1100
1340
  export function isPublicWorkflowDefinition(item: unknown): item is PublicWorkflowDefinition {
1101
- return reflection.isInstance(item, PublicWorkflowDefinition);
1341
+ return reflection.isInstance(item, PublicWorkflowDefinition.$type);
1102
1342
  }
1103
1343
 
1104
1344
  export interface Purge extends langium.AstNode {
@@ -1107,10 +1347,25 @@ export interface Purge extends langium.AstNode {
1107
1347
  pattern: Pattern;
1108
1348
  }
1109
1349
 
1110
- export const Purge = 'Purge';
1350
+ export const Purge = {
1351
+ $type: 'Purge',
1352
+ pattern: 'pattern'
1353
+ } as const;
1111
1354
 
1112
1355
  export function isPurge(item: unknown): item is Purge {
1113
- return reflection.isInstance(item, Purge);
1356
+ return reflection.isInstance(item, Purge.$type);
1357
+ }
1358
+
1359
+ export type QualifiedName = Ref | string;
1360
+
1361
+ export function isQualifiedName(item: unknown): item is QualifiedName {
1362
+ return isRef(item) || (typeof item === 'string' && (/(?:[_a-zA-Z][\w_]*)(\/(?:[_a-zA-Z][\w_]*))?/.test(item)));
1363
+ }
1364
+
1365
+ export type QueryId = string;
1366
+
1367
+ export function isQueryId(item: unknown): item is QueryId {
1368
+ return typeof item === 'string';
1114
1369
  }
1115
1370
 
1116
1371
  export interface RbacAllowSpec extends langium.AstNode {
@@ -1119,10 +1374,13 @@ export interface RbacAllowSpec extends langium.AstNode {
1119
1374
  oprs: Array<RbacOpr>;
1120
1375
  }
1121
1376
 
1122
- export const RbacAllowSpec = 'RbacAllowSpec';
1377
+ export const RbacAllowSpec = {
1378
+ $type: 'RbacAllowSpec',
1379
+ oprs: 'oprs'
1380
+ } as const;
1123
1381
 
1124
1382
  export function isRbacAllowSpec(item: unknown): item is RbacAllowSpec {
1125
- return reflection.isInstance(item, RbacAllowSpec);
1383
+ return reflection.isInstance(item, RbacAllowSpec.$type);
1126
1384
  }
1127
1385
 
1128
1386
  export interface RbacExpressionSpec extends langium.AstNode {
@@ -1132,10 +1390,14 @@ export interface RbacExpressionSpec extends langium.AstNode {
1132
1390
  rhs: Ref;
1133
1391
  }
1134
1392
 
1135
- export const RbacExpressionSpec = 'RbacExpressionSpec';
1393
+ export const RbacExpressionSpec = {
1394
+ $type: 'RbacExpressionSpec',
1395
+ lhs: 'lhs',
1396
+ rhs: 'rhs'
1397
+ } as const;
1136
1398
 
1137
1399
  export function isRbacExpressionSpec(item: unknown): item is RbacExpressionSpec {
1138
- return reflection.isInstance(item, RbacExpressionSpec);
1400
+ return reflection.isInstance(item, RbacExpressionSpec.$type);
1139
1401
  }
1140
1402
 
1141
1403
  export interface RbacOpr extends langium.AstNode {
@@ -1144,10 +1406,13 @@ export interface RbacOpr extends langium.AstNode {
1144
1406
  value: 'create' | 'delete' | 'read' | 'update';
1145
1407
  }
1146
1408
 
1147
- export const RbacOpr = 'RbacOpr';
1409
+ export const RbacOpr = {
1410
+ $type: 'RbacOpr',
1411
+ value: 'value'
1412
+ } as const;
1148
1413
 
1149
1414
  export function isRbacOpr(item: unknown): item is RbacOpr {
1150
- return reflection.isInstance(item, RbacOpr);
1415
+ return reflection.isInstance(item, RbacOpr.$type);
1151
1416
  }
1152
1417
 
1153
1418
  export interface RbacRolesSpec extends langium.AstNode {
@@ -1156,10 +1421,13 @@ export interface RbacRolesSpec extends langium.AstNode {
1156
1421
  roles: Array<'*' | string>;
1157
1422
  }
1158
1423
 
1159
- export const RbacRolesSpec = 'RbacRolesSpec';
1424
+ export const RbacRolesSpec = {
1425
+ $type: 'RbacRolesSpec',
1426
+ roles: 'roles'
1427
+ } as const;
1160
1428
 
1161
1429
  export function isRbacRolesSpec(item: unknown): item is RbacRolesSpec {
1162
- return reflection.isInstance(item, RbacRolesSpec);
1430
+ return reflection.isInstance(item, RbacRolesSpec.$type);
1163
1431
  }
1164
1432
 
1165
1433
  export interface RbacSpecDefinition extends langium.AstNode {
@@ -1168,10 +1436,13 @@ export interface RbacSpecDefinition extends langium.AstNode {
1168
1436
  specEntries: Array<RbacSpecEntries>;
1169
1437
  }
1170
1438
 
1171
- export const RbacSpecDefinition = 'RbacSpecDefinition';
1439
+ export const RbacSpecDefinition = {
1440
+ $type: 'RbacSpecDefinition',
1441
+ specEntries: 'specEntries'
1442
+ } as const;
1172
1443
 
1173
1444
  export function isRbacSpecDefinition(item: unknown): item is RbacSpecDefinition {
1174
- return reflection.isInstance(item, RbacSpecDefinition);
1445
+ return reflection.isInstance(item, RbacSpecDefinition.$type);
1175
1446
  }
1176
1447
 
1177
1448
  export interface RbacSpecEntries extends langium.AstNode {
@@ -1180,10 +1451,13 @@ export interface RbacSpecEntries extends langium.AstNode {
1180
1451
  entries: Array<RbacSpecEntry>;
1181
1452
  }
1182
1453
 
1183
- export const RbacSpecEntries = 'RbacSpecEntries';
1454
+ export const RbacSpecEntries = {
1455
+ $type: 'RbacSpecEntries',
1456
+ entries: 'entries'
1457
+ } as const;
1184
1458
 
1185
1459
  export function isRbacSpecEntries(item: unknown): item is RbacSpecEntries {
1186
- return reflection.isInstance(item, RbacSpecEntries);
1460
+ return reflection.isInstance(item, RbacSpecEntries.$type);
1187
1461
  }
1188
1462
 
1189
1463
  export interface RbacSpecEntry extends langium.AstNode {
@@ -1194,10 +1468,15 @@ export interface RbacSpecEntry extends langium.AstNode {
1194
1468
  role?: RbacRolesSpec;
1195
1469
  }
1196
1470
 
1197
- export const RbacSpecEntry = 'RbacSpecEntry';
1471
+ export const RbacSpecEntry = {
1472
+ $type: 'RbacSpecEntry',
1473
+ allow: 'allow',
1474
+ expr: 'expr',
1475
+ role: 'role'
1476
+ } as const;
1198
1477
 
1199
1478
  export function isRbacSpecEntry(item: unknown): item is RbacSpecEntry {
1200
- return reflection.isInstance(item, RbacSpecEntry);
1479
+ return reflection.isInstance(item, RbacSpecEntry.$type);
1201
1480
  }
1202
1481
 
1203
1482
  export interface RecordDefinition extends langium.AstNode {
@@ -1208,10 +1487,15 @@ export interface RecordDefinition extends langium.AstNode {
1208
1487
  schema: RecordSchemaDefinition;
1209
1488
  }
1210
1489
 
1211
- export const RecordDefinition = 'RecordDefinition';
1490
+ export const RecordDefinition = {
1491
+ $type: 'RecordDefinition',
1492
+ extends: 'extends',
1493
+ name: 'name',
1494
+ schema: 'schema'
1495
+ } as const;
1212
1496
 
1213
1497
  export function isRecordDefinition(item: unknown): item is RecordDefinition {
1214
- return reflection.isInstance(item, RecordDefinition);
1498
+ return reflection.isInstance(item, RecordDefinition.$type);
1215
1499
  }
1216
1500
 
1217
1501
  export interface RecordExtraDefinition extends langium.AstNode {
@@ -1224,10 +1508,17 @@ export interface RecordExtraDefinition extends langium.AstNode {
1224
1508
  uq?: CompositeUniqueDefinition;
1225
1509
  }
1226
1510
 
1227
- export const RecordExtraDefinition = 'RecordExtraDefinition';
1511
+ export const RecordExtraDefinition = {
1512
+ $type: 'RecordExtraDefinition',
1513
+ actions: 'actions',
1514
+ meta: 'meta',
1515
+ prePost: 'prePost',
1516
+ rbacSpec: 'rbacSpec',
1517
+ uq: 'uq'
1518
+ } as const;
1228
1519
 
1229
1520
  export function isRecordExtraDefinition(item: unknown): item is RecordExtraDefinition {
1230
- return reflection.isInstance(item, RecordExtraDefinition);
1521
+ return reflection.isInstance(item, RecordExtraDefinition.$type);
1231
1522
  }
1232
1523
 
1233
1524
  export interface RecordSchemaDefinition extends langium.AstNode {
@@ -1237,10 +1528,20 @@ export interface RecordSchemaDefinition extends langium.AstNode {
1237
1528
  extras: Array<RecordExtraDefinition>;
1238
1529
  }
1239
1530
 
1240
- export const RecordSchemaDefinition = 'RecordSchemaDefinition';
1531
+ export const RecordSchemaDefinition = {
1532
+ $type: 'RecordSchemaDefinition',
1533
+ attributes: 'attributes',
1534
+ extras: 'extras'
1535
+ } as const;
1241
1536
 
1242
1537
  export function isRecordSchemaDefinition(item: unknown): item is RecordSchemaDefinition {
1243
- return reflection.isInstance(item, RecordSchemaDefinition);
1538
+ return reflection.isInstance(item, RecordSchemaDefinition.$type);
1539
+ }
1540
+
1541
+ export type Ref = string;
1542
+
1543
+ export function isRef(item: unknown): item is Ref {
1544
+ return typeof item === 'string';
1244
1545
  }
1245
1546
 
1246
1547
  export interface RefSpec extends langium.AstNode {
@@ -1250,10 +1551,14 @@ export interface RefSpec extends langium.AstNode {
1250
1551
  type?: QualifiedName;
1251
1552
  }
1252
1553
 
1253
- export const RefSpec = 'RefSpec';
1554
+ export const RefSpec = {
1555
+ $type: 'RefSpec',
1556
+ ref: 'ref',
1557
+ type: 'type'
1558
+ } as const;
1254
1559
 
1255
1560
  export function isRefSpec(item: unknown): item is RefSpec {
1256
- return reflection.isInstance(item, RefSpec);
1561
+ return reflection.isInstance(item, RefSpec.$type);
1257
1562
  }
1258
1563
 
1259
1564
  export interface RelationshipDefinition extends langium.AstNode {
@@ -1266,10 +1571,17 @@ export interface RelationshipDefinition extends langium.AstNode {
1266
1571
  type: 'between' | 'contains';
1267
1572
  }
1268
1573
 
1269
- export const RelationshipDefinition = 'RelationshipDefinition';
1574
+ export const RelationshipDefinition = {
1575
+ $type: 'RelationshipDefinition',
1576
+ name: 'name',
1577
+ nodes: 'nodes',
1578
+ properties: 'properties',
1579
+ schema: 'schema',
1580
+ type: 'type'
1581
+ } as const;
1270
1582
 
1271
1583
  export function isRelationshipDefinition(item: unknown): item is RelationshipDefinition {
1272
- return reflection.isInstance(item, RelationshipDefinition);
1584
+ return reflection.isInstance(item, RelationshipDefinition.$type);
1273
1585
  }
1274
1586
 
1275
1587
  export interface RelationshipPattern extends langium.AstNode {
@@ -1279,10 +1591,14 @@ export interface RelationshipPattern extends langium.AstNode {
1279
1591
  pattern: Pattern;
1280
1592
  }
1281
1593
 
1282
- export const RelationshipPattern = 'RelationshipPattern';
1594
+ export const RelationshipPattern = {
1595
+ $type: 'RelationshipPattern',
1596
+ name: 'name',
1597
+ pattern: 'pattern'
1598
+ } as const;
1283
1599
 
1284
1600
  export function isRelationshipPattern(item: unknown): item is RelationshipPattern {
1285
- return reflection.isInstance(item, RelationshipPattern);
1601
+ return reflection.isInstance(item, RelationshipPattern.$type);
1286
1602
  }
1287
1603
 
1288
1604
  export interface RelNodes extends langium.AstNode {
@@ -1292,10 +1608,14 @@ export interface RelNodes extends langium.AstNode {
1292
1608
  node2: NodeDefinition;
1293
1609
  }
1294
1610
 
1295
- export const RelNodes = 'RelNodes';
1611
+ export const RelNodes = {
1612
+ $type: 'RelNodes',
1613
+ node1: 'node1',
1614
+ node2: 'node2'
1615
+ } as const;
1296
1616
 
1297
1617
  export function isRelNodes(item: unknown): item is RelNodes {
1298
- return reflection.isInstance(item, RelNodes);
1618
+ return reflection.isInstance(item, RelNodes.$type);
1299
1619
  }
1300
1620
 
1301
1621
  export interface ResolverDefinition extends langium.AstNode {
@@ -1306,10 +1626,15 @@ export interface ResolverDefinition extends langium.AstNode {
1306
1626
  paths: Array<ResolverPathEntry>;
1307
1627
  }
1308
1628
 
1309
- export const ResolverDefinition = 'ResolverDefinition';
1629
+ export const ResolverDefinition = {
1630
+ $type: 'ResolverDefinition',
1631
+ methods: 'methods',
1632
+ name: 'name',
1633
+ paths: 'paths'
1634
+ } as const;
1310
1635
 
1311
1636
  export function isResolverDefinition(item: unknown): item is ResolverDefinition {
1312
- return reflection.isInstance(item, ResolverDefinition);
1637
+ return reflection.isInstance(item, ResolverDefinition.$type);
1313
1638
  }
1314
1639
 
1315
1640
  export interface ResolverFnName extends langium.AstNode {
@@ -1318,10 +1643,13 @@ export interface ResolverFnName extends langium.AstNode {
1318
1643
  name: Ref | STRING | string;
1319
1644
  }
1320
1645
 
1321
- export const ResolverFnName = 'ResolverFnName';
1646
+ export const ResolverFnName = {
1647
+ $type: 'ResolverFnName',
1648
+ name: 'name'
1649
+ } as const;
1322
1650
 
1323
1651
  export function isResolverFnName(item: unknown): item is ResolverFnName {
1324
- return reflection.isInstance(item, ResolverFnName);
1652
+ return reflection.isInstance(item, ResolverFnName.$type);
1325
1653
  }
1326
1654
 
1327
1655
  export interface ResolverMethodName extends langium.AstNode {
@@ -1330,10 +1658,13 @@ export interface ResolverMethodName extends langium.AstNode {
1330
1658
  name: 'commitTransaction' | 'create' | 'delete' | 'onSubscription' | 'query' | 'rollbackTransaction' | 'startTransaction' | 'subscribe' | 'update' | 'upsert';
1331
1659
  }
1332
1660
 
1333
- export const ResolverMethodName = 'ResolverMethodName';
1661
+ export const ResolverMethodName = {
1662
+ $type: 'ResolverMethodName',
1663
+ name: 'name'
1664
+ } as const;
1334
1665
 
1335
1666
  export function isResolverMethodName(item: unknown): item is ResolverMethodName {
1336
- return reflection.isInstance(item, ResolverMethodName);
1667
+ return reflection.isInstance(item, ResolverMethodName.$type);
1337
1668
  }
1338
1669
 
1339
1670
  export interface ResolverMethodSpec extends langium.AstNode {
@@ -1343,10 +1674,20 @@ export interface ResolverMethodSpec extends langium.AstNode {
1343
1674
  key: ResolverMethodName;
1344
1675
  }
1345
1676
 
1346
- export const ResolverMethodSpec = 'ResolverMethodSpec';
1677
+ export const ResolverMethodSpec = {
1678
+ $type: 'ResolverMethodSpec',
1679
+ fn: 'fn',
1680
+ key: 'key'
1681
+ } as const;
1347
1682
 
1348
1683
  export function isResolverMethodSpec(item: unknown): item is ResolverMethodSpec {
1349
- return reflection.isInstance(item, ResolverMethodSpec);
1684
+ return reflection.isInstance(item, ResolverMethodSpec.$type);
1685
+ }
1686
+
1687
+ export type ResolverPathEntry = GenericName | QualifiedName;
1688
+
1689
+ export function isResolverPathEntry(item: unknown): item is ResolverPathEntry {
1690
+ return isQualifiedName(item) || isGenericName(item);
1350
1691
  }
1351
1692
 
1352
1693
  export interface RetryDefinition extends langium.AstNode {
@@ -1357,10 +1698,15 @@ export interface RetryDefinition extends langium.AstNode {
1357
1698
  name: string;
1358
1699
  }
1359
1700
 
1360
- export const RetryDefinition = 'RetryDefinition';
1701
+ export const RetryDefinition = {
1702
+ $type: 'RetryDefinition',
1703
+ attempts: 'attempts',
1704
+ backoff: 'backoff',
1705
+ name: 'name'
1706
+ } as const;
1361
1707
 
1362
1708
  export function isRetryDefinition(item: unknown): item is RetryDefinition {
1363
- return reflection.isInstance(item, RetryDefinition);
1709
+ return reflection.isInstance(item, RetryDefinition.$type);
1364
1710
  }
1365
1711
 
1366
1712
  export interface Return extends langium.AstNode {
@@ -1369,10 +1715,13 @@ export interface Return extends langium.AstNode {
1369
1715
  pattern: Pattern;
1370
1716
  }
1371
1717
 
1372
- export const Return = 'Return';
1718
+ export const Return = {
1719
+ $type: 'Return',
1720
+ pattern: 'pattern'
1721
+ } as const;
1373
1722
 
1374
1723
  export function isReturn(item: unknown): item is Return {
1375
- return reflection.isInstance(item, Return);
1724
+ return reflection.isInstance(item, Return.$type);
1376
1725
  }
1377
1726
 
1378
1727
  export interface RuntimeHint extends langium.AstNode {
@@ -1383,10 +1732,15 @@ export interface RuntimeHint extends langium.AstNode {
1383
1732
  thenSpec?: ThenSpec;
1384
1733
  }
1385
1734
 
1386
- export const RuntimeHint = 'RuntimeHint';
1735
+ export const RuntimeHint = {
1736
+ $type: 'RuntimeHint',
1737
+ aliasSpec: 'aliasSpec',
1738
+ catchSpec: 'catchSpec',
1739
+ thenSpec: 'thenSpec'
1740
+ } as const;
1387
1741
 
1388
1742
  export function isRuntimeHint(item: unknown): item is RuntimeHint {
1389
- return reflection.isInstance(item, RuntimeHint);
1743
+ return reflection.isInstance(item, RuntimeHint.$type);
1390
1744
  }
1391
1745
 
1392
1746
  export interface ScenarioDefinition extends langium.AstNode {
@@ -1397,10 +1751,25 @@ export interface ScenarioDefinition extends langium.AstNode {
1397
1751
  scn?: If;
1398
1752
  }
1399
1753
 
1400
- export const ScenarioDefinition = 'ScenarioDefinition';
1754
+ export const ScenarioDefinition = {
1755
+ $type: 'ScenarioDefinition',
1756
+ body: 'body',
1757
+ name: 'name',
1758
+ scn: 'scn'
1759
+ } as const;
1401
1760
 
1402
1761
  export function isScenarioDefinition(item: unknown): item is ScenarioDefinition {
1403
- return reflection.isInstance(item, ScenarioDefinition);
1762
+ return reflection.isInstance(item, ScenarioDefinition.$type);
1763
+ }
1764
+
1765
+ export type SchemaDefinition = EntityDefinition | EventDefinition | PublicEventDefinition | RecordDefinition;
1766
+
1767
+ export const SchemaDefinition = {
1768
+ $type: 'SchemaDefinition'
1769
+ } as const;
1770
+
1771
+ export function isSchemaDefinition(item: unknown): item is SchemaDefinition {
1772
+ return reflection.isInstance(item, SchemaDefinition.$type);
1404
1773
  }
1405
1774
 
1406
1775
  export interface SelectIntoEntry extends langium.AstNode {
@@ -1411,10 +1780,15 @@ export interface SelectIntoEntry extends langium.AstNode {
1411
1780
  attribute?: Ref;
1412
1781
  }
1413
1782
 
1414
- export const SelectIntoEntry = 'SelectIntoEntry';
1783
+ export const SelectIntoEntry = {
1784
+ $type: 'SelectIntoEntry',
1785
+ aggregate: 'aggregate',
1786
+ alias: 'alias',
1787
+ attribute: 'attribute'
1788
+ } as const;
1415
1789
 
1416
1790
  export function isSelectIntoEntry(item: unknown): item is SelectIntoEntry {
1417
- return reflection.isInstance(item, SelectIntoEntry);
1791
+ return reflection.isInstance(item, SelectIntoEntry.$type);
1418
1792
  }
1419
1793
 
1420
1794
  export interface SelectIntoSpec extends langium.AstNode {
@@ -1423,14 +1797,17 @@ export interface SelectIntoSpec extends langium.AstNode {
1423
1797
  entries: Array<SelectIntoEntry>;
1424
1798
  }
1425
1799
 
1426
- export const SelectIntoSpec = 'SelectIntoSpec';
1800
+ export const SelectIntoSpec = {
1801
+ $type: 'SelectIntoSpec',
1802
+ entries: 'entries'
1803
+ } as const;
1427
1804
 
1428
1805
  export function isSelectIntoSpec(item: unknown): item is SelectIntoSpec {
1429
- return reflection.isInstance(item, SelectIntoSpec);
1806
+ return reflection.isInstance(item, SelectIntoSpec.$type);
1430
1807
  }
1431
1808
 
1432
1809
  export interface SetAttribute extends langium.AstNode {
1433
- readonly $container: BackoffSpec | CrudMapBody;
1810
+ readonly $container: AgentEvaluatorDefinition | BackoffSpec | CrudMapBody;
1434
1811
  readonly $type: 'SetAttribute';
1435
1812
  aggregate?: AggregateFunctionSpec;
1436
1813
  name: QueryId;
@@ -1438,10 +1815,22 @@ export interface SetAttribute extends langium.AstNode {
1438
1815
  value?: AttributeValueExpression;
1439
1816
  }
1440
1817
 
1441
- export const SetAttribute = 'SetAttribute';
1818
+ export const SetAttribute = {
1819
+ $type: 'SetAttribute',
1820
+ aggregate: 'aggregate',
1821
+ name: 'name',
1822
+ op: 'op',
1823
+ value: 'value'
1824
+ } as const;
1442
1825
 
1443
1826
  export function isSetAttribute(item: unknown): item is SetAttribute {
1444
- return reflection.isInstance(item, SetAttribute);
1827
+ return reflection.isInstance(item, SetAttribute.$type);
1828
+ }
1829
+
1830
+ export type SqlComparisonOpr = '!=' | '<' | '<=' | '<>' | '=' | '>' | '>=' | 'between' | 'in' | 'like';
1831
+
1832
+ export function isSqlComparisonOpr(item: unknown): item is SqlComparisonOpr {
1833
+ return item === '=' || item === '<>' || item === '!=' || item === '<' || item === '<=' || item === '>' || item === '>=' || item === 'in' || item === 'like' || item === 'between';
1445
1834
  }
1446
1835
 
1447
1836
  export interface StandaloneStatement extends langium.AstNode {
@@ -1450,10 +1839,13 @@ export interface StandaloneStatement extends langium.AstNode {
1450
1839
  stmt: Statement;
1451
1840
  }
1452
1841
 
1453
- export const StandaloneStatement = 'StandaloneStatement';
1842
+ export const StandaloneStatement = {
1843
+ $type: 'StandaloneStatement',
1844
+ stmt: 'stmt'
1845
+ } as const;
1454
1846
 
1455
1847
  export function isStandaloneStatement(item: unknown): item is StandaloneStatement {
1456
- return reflection.isInstance(item, StandaloneStatement);
1848
+ return reflection.isInstance(item, StandaloneStatement.$type);
1457
1849
  }
1458
1850
 
1459
1851
  export interface Statement extends langium.AstNode {
@@ -1463,10 +1855,26 @@ export interface Statement extends langium.AstNode {
1463
1855
  pattern: Pattern;
1464
1856
  }
1465
1857
 
1466
- export const Statement = 'Statement';
1858
+ export const Statement = {
1859
+ $type: 'Statement',
1860
+ hints: 'hints',
1861
+ pattern: 'pattern'
1862
+ } as const;
1467
1863
 
1468
1864
  export function isStatement(item: unknown): item is Statement {
1469
- return reflection.isInstance(item, Statement);
1865
+ return reflection.isInstance(item, Statement.$type);
1866
+ }
1867
+
1868
+ export type STRING = string;
1869
+
1870
+ export function isSTRING(item: unknown): item is STRING {
1871
+ return (typeof item === 'string' && (/"(\\(?:[\s\S])|(?:(?!(\\|"|\r|\n))[\s\S]*?)|\r?\n)*"/.test(item) || /`(\\(?:[\s\S])|(?:(?!(\\|`|\r|\n))[\s\S]*?)|\r?\n)*`/.test(item)));
1872
+ }
1873
+
1874
+ export type TaggedId = string;
1875
+
1876
+ export function isTaggedId(item: unknown): item is TaggedId {
1877
+ return typeof item === 'string';
1470
1878
  }
1471
1879
 
1472
1880
  export interface ThenSpec extends langium.AstNode {
@@ -1475,10 +1883,13 @@ export interface ThenSpec extends langium.AstNode {
1475
1883
  statements: Array<Statement>;
1476
1884
  }
1477
1885
 
1478
- export const ThenSpec = 'ThenSpec';
1886
+ export const ThenSpec = {
1887
+ $type: 'ThenSpec',
1888
+ statements: 'statements'
1889
+ } as const;
1479
1890
 
1480
1891
  export function isThenSpec(item: unknown): item is ThenSpec {
1481
- return reflection.isInstance(item, ThenSpec);
1892
+ return reflection.isInstance(item, ThenSpec.$type);
1482
1893
  }
1483
1894
 
1484
1895
  export interface ThrowError extends langium.AstNode {
@@ -1487,10 +1898,13 @@ export interface ThrowError extends langium.AstNode {
1487
1898
  reason: Expr;
1488
1899
  }
1489
1900
 
1490
- export const ThrowError = 'ThrowError';
1901
+ export const ThrowError = {
1902
+ $type: 'ThrowError',
1903
+ reason: 'reason'
1904
+ } as const;
1491
1905
 
1492
1906
  export function isThrowError(item: unknown): item is ThrowError {
1493
- return reflection.isInstance(item, ThrowError);
1907
+ return reflection.isInstance(item, ThrowError.$type);
1494
1908
  }
1495
1909
 
1496
1910
  export interface TriggerDefinition extends langium.AstNode {
@@ -1499,10 +1913,13 @@ export interface TriggerDefinition extends langium.AstNode {
1499
1913
  entries: Array<TriggerEntry>;
1500
1914
  }
1501
1915
 
1502
- export const TriggerDefinition = 'TriggerDefinition';
1916
+ export const TriggerDefinition = {
1917
+ $type: 'TriggerDefinition',
1918
+ entries: 'entries'
1919
+ } as const;
1503
1920
 
1504
1921
  export function isTriggerDefinition(item: unknown): item is TriggerDefinition {
1505
- return reflection.isInstance(item, TriggerDefinition);
1922
+ return reflection.isInstance(item, TriggerDefinition.$type);
1506
1923
  }
1507
1924
 
1508
1925
  export interface TriggerEntry extends langium.AstNode {
@@ -1513,10 +1930,15 @@ export interface TriggerEntry extends langium.AstNode {
1513
1930
  on: 'create' | 'delete' | 'update';
1514
1931
  }
1515
1932
 
1516
- export const TriggerEntry = 'TriggerEntry';
1933
+ export const TriggerEntry = {
1934
+ $type: 'TriggerEntry',
1935
+ async: 'async',
1936
+ event: 'event',
1937
+ on: 'on'
1938
+ } as const;
1517
1939
 
1518
1940
  export function isTriggerEntry(item: unknown): item is TriggerEntry {
1519
- return reflection.isInstance(item, TriggerEntry);
1941
+ return reflection.isInstance(item, TriggerEntry.$type);
1520
1942
  }
1521
1943
 
1522
1944
  export interface WhereSpec extends langium.AstNode {
@@ -1525,10 +1947,13 @@ export interface WhereSpec extends langium.AstNode {
1525
1947
  clauses: Array<WhereSpecClause>;
1526
1948
  }
1527
1949
 
1528
- export const WhereSpec = 'WhereSpec';
1950
+ export const WhereSpec = {
1951
+ $type: 'WhereSpec',
1952
+ clauses: 'clauses'
1953
+ } as const;
1529
1954
 
1530
1955
  export function isWhereSpec(item: unknown): item is WhereSpec {
1531
- return reflection.isInstance(item, WhereSpec);
1956
+ return reflection.isInstance(item, WhereSpec.$type);
1532
1957
  }
1533
1958
 
1534
1959
  export interface WhereSpecClause extends langium.AstNode {
@@ -1539,24 +1964,68 @@ export interface WhereSpecClause extends langium.AstNode {
1539
1964
  rhs: Expr;
1540
1965
  }
1541
1966
 
1542
- export const WhereSpecClause = 'WhereSpecClause';
1967
+ export const WhereSpecClause = {
1968
+ $type: 'WhereSpecClause',
1969
+ lhs: 'lhs',
1970
+ op: 'op',
1971
+ rhs: 'rhs'
1972
+ } as const;
1543
1973
 
1544
1974
  export function isWhereSpecClause(item: unknown): item is WhereSpecClause {
1545
- return reflection.isInstance(item, WhereSpecClause);
1975
+ return reflection.isInstance(item, WhereSpecClause.$type);
1546
1976
  }
1547
1977
 
1548
1978
  export interface WorkflowDefinition extends langium.AstNode {
1549
1979
  readonly $container: ModuleDefinition | PublicWorkflowDefinition;
1550
1980
  readonly $type: 'WorkflowDefinition';
1981
+ directives?: WorkflowDirectives;
1551
1982
  header?: WorkflowHeader;
1552
1983
  name?: string;
1553
1984
  statements: Array<Statement>;
1554
1985
  }
1555
1986
 
1556
- export const WorkflowDefinition = 'WorkflowDefinition';
1987
+ export const WorkflowDefinition = {
1988
+ $type: 'WorkflowDefinition',
1989
+ directives: 'directives',
1990
+ header: 'header',
1991
+ name: 'name',
1992
+ statements: 'statements'
1993
+ } as const;
1557
1994
 
1558
1995
  export function isWorkflowDefinition(item: unknown): item is WorkflowDefinition {
1559
- return reflection.isInstance(item, WorkflowDefinition);
1996
+ return reflection.isInstance(item, WorkflowDefinition.$type);
1997
+ }
1998
+
1999
+ export interface WorkflowDirectiveEntry extends langium.AstNode {
2000
+ readonly $container: WorkflowDirectives;
2001
+ readonly $type: 'WorkflowDirectiveEntry';
2002
+ tag: '@withRole';
2003
+ value: STRING | string;
2004
+ }
2005
+
2006
+ export const WorkflowDirectiveEntry = {
2007
+ $type: 'WorkflowDirectiveEntry',
2008
+ tag: 'tag',
2009
+ value: 'value'
2010
+ } as const;
2011
+
2012
+ export function isWorkflowDirectiveEntry(item: unknown): item is WorkflowDirectiveEntry {
2013
+ return reflection.isInstance(item, WorkflowDirectiveEntry.$type);
2014
+ }
2015
+
2016
+ export interface WorkflowDirectives extends langium.AstNode {
2017
+ readonly $container: WorkflowDefinition;
2018
+ readonly $type: 'WorkflowDirectives';
2019
+ entries: Array<WorkflowDirectiveEntry>;
2020
+ }
2021
+
2022
+ export const WorkflowDirectives = {
2023
+ $type: 'WorkflowDirectives',
2024
+ entries: 'entries'
2025
+ } as const;
2026
+
2027
+ export function isWorkflowDirectives(item: unknown): item is WorkflowDirectives {
2028
+ return reflection.isInstance(item, WorkflowDirectives.$type);
1560
2029
  }
1561
2030
 
1562
2031
  export interface WorkflowHeader extends langium.AstNode {
@@ -1567,16 +2036,34 @@ export interface WorkflowHeader extends langium.AstNode {
1567
2036
  tag: WorkflowHeaderTag;
1568
2037
  }
1569
2038
 
1570
- export const WorkflowHeader = 'WorkflowHeader';
2039
+ export const WorkflowHeader = {
2040
+ $type: 'WorkflowHeader',
2041
+ name: 'name',
2042
+ prefix: 'prefix',
2043
+ tag: 'tag'
2044
+ } as const;
1571
2045
 
1572
2046
  export function isWorkflowHeader(item: unknown): item is WorkflowHeader {
1573
- return reflection.isInstance(item, WorkflowHeader);
2047
+ return reflection.isInstance(item, WorkflowHeader.$type);
2048
+ }
2049
+
2050
+ export type WorkflowHeaderPrefix = 'create' | 'delete' | 'update';
2051
+
2052
+ export function isWorkflowHeaderPrefix(item: unknown): item is WorkflowHeaderPrefix {
2053
+ return item === 'create' || item === 'update' || item === 'delete';
2054
+ }
2055
+
2056
+ export type WorkflowHeaderTag = '@after' | '@before';
2057
+
2058
+ export function isWorkflowHeaderTag(item: unknown): item is WorkflowHeaderTag {
2059
+ return item === '@after' || item === '@before';
1574
2060
  }
1575
2061
 
1576
2062
  export type AgentlangAstType = {
1577
2063
  ActionEntry: ActionEntry
1578
2064
  AfterTriggerDefinition: AfterTriggerDefinition
1579
2065
  AgentDefinition: AgentDefinition
2066
+ AgentEvaluatorDefinition: AgentEvaluatorDefinition
1580
2067
  AgentXtraAttribute: AgentXtraAttribute
1581
2068
  AgentXtraSpec: AgentXtraSpec
1582
2069
  AggregateFunctionSpec: AggregateFunctionSpec
@@ -1679,1001 +2166,1396 @@ export type AgentlangAstType = {
1679
2166
  WhereSpec: WhereSpec
1680
2167
  WhereSpecClause: WhereSpecClause
1681
2168
  WorkflowDefinition: WorkflowDefinition
2169
+ WorkflowDirectiveEntry: WorkflowDirectiveEntry
2170
+ WorkflowDirectives: WorkflowDirectives
1682
2171
  WorkflowHeader: WorkflowHeader
1683
2172
  }
1684
2173
 
1685
2174
  export class AgentlangAstReflection extends langium.AbstractAstReflection {
1686
-
1687
- getAllTypes(): string[] {
1688
- return [ActionEntry, AfterTriggerDefinition, AgentDefinition, AgentXtraAttribute, AgentXtraSpec, AggregateFunctionSpec, AliasSpec, ArrayLiteral, AsyncFnCall, AttributeDefinition, AttributeValueExpression, BackoffSpec, BeforeTriggerDefinition, BinExpr, CaseEntry, CatchSpec, CompositeUniqueDefinition, ConditionalFlowStep, CrudMap, CrudMapBody, DecisionDefBody, DecisionDefinition, Definition, Delete, DirectiveDefinition, Else, EntityActionsDefinitions, EntityDefinition, EnumSpec, EventDefinition, Expr, ExtendsClause, FlowDefBody, FlowDefinition, FlowEntry, FlowStepSpec, FnCall, ForEach, FullTextSearch, GenericDefBody, GenericPropertyDef, GlossaryEntryDefinition, Group, GroupByClause, Handler, If, IfWithAlias, Import, JoinSpec, KvPair, KvPairs, Literal, MapEntry, MapKey, MapLiteral, MetaDefinition, ModuleDefinition, NegExpr, NodeDefinition, NotExpr, OneOfSpec, OrderByClause, Pattern, PrePostTriggerDefinition, PrimExpr, PropertyDefinition, PublicAgentDefinition, PublicEventDefinition, PublicWorkflowDefinition, Purge, RbacAllowSpec, RbacExpressionSpec, RbacOpr, RbacRolesSpec, RbacSpecDefinition, RbacSpecEntries, RbacSpecEntry, RecordDefinition, RecordExtraDefinition, RecordSchemaDefinition, RefSpec, RelNodes, RelationshipDefinition, RelationshipPattern, ResolverDefinition, ResolverFnName, ResolverMethodName, ResolverMethodSpec, RetryDefinition, Return, RuntimeHint, ScenarioDefinition, SchemaDefinition, SelectIntoEntry, SelectIntoSpec, SetAttribute, StandaloneStatement, Statement, ThenSpec, ThrowError, TriggerDefinition, TriggerEntry, WhereSpec, WhereSpecClause, WorkflowDefinition, WorkflowHeader];
1689
- }
1690
-
1691
- protected override computeIsSubtype(subtype: string, supertype: string): boolean {
1692
- switch (subtype) {
1693
- case AgentDefinition:
1694
- case DecisionDefinition:
1695
- case DirectiveDefinition:
1696
- case FlowDefinition:
1697
- case GlossaryEntryDefinition:
1698
- case PublicAgentDefinition:
1699
- case PublicWorkflowDefinition:
1700
- case RelationshipDefinition:
1701
- case ResolverDefinition:
1702
- case RetryDefinition:
1703
- case ScenarioDefinition:
1704
- case SchemaDefinition:
1705
- case StandaloneStatement:
1706
- case WorkflowDefinition: {
1707
- return this.isSubtype(Definition, supertype);
1708
- }
1709
- case BinExpr:
1710
- case PrimExpr: {
1711
- return this.isSubtype(Expr, supertype);
1712
- }
1713
- case EntityDefinition:
1714
- case EventDefinition:
1715
- case PublicEventDefinition:
1716
- case RecordDefinition: {
1717
- return this.isSubtype(SchemaDefinition, supertype);
1718
- }
1719
- case Expr: {
1720
- return this.isSubtype(AttributeValueExpression, supertype);
1721
- }
1722
- case Group:
1723
- case Literal:
1724
- case NegExpr:
1725
- case NotExpr: {
1726
- return this.isSubtype(PrimExpr, supertype);
1727
- }
1728
- case Statement: {
1729
- return this.isSubtype(FlowStepSpec, supertype);
1730
- }
1731
- default: {
1732
- return false;
1733
- }
1734
- }
1735
- }
1736
-
1737
- getReferenceType(refInfo: langium.ReferenceInfo): string {
1738
- const referenceId = `${refInfo.container.$type}:${refInfo.property}`;
1739
- switch (referenceId) {
1740
- default: {
1741
- throw new Error(`${referenceId} is not a valid reference id.`);
1742
- }
1743
- }
1744
- }
1745
-
1746
- getTypeMetaData(type: string): langium.TypeMetaData {
1747
- switch (type) {
1748
- case ActionEntry: {
1749
- return {
1750
- name: ActionEntry,
1751
- properties: [
1752
- { name: 'event' },
1753
- { name: 'name' }
1754
- ]
1755
- };
1756
- }
1757
- case AfterTriggerDefinition: {
1758
- return {
1759
- name: AfterTriggerDefinition,
1760
- properties: [
1761
- { name: 'triggers' }
1762
- ]
1763
- };
1764
- }
1765
- case AgentDefinition: {
1766
- return {
1767
- name: AgentDefinition,
1768
- properties: [
1769
- { name: 'body' },
1770
- { name: 'name' }
1771
- ]
1772
- };
1773
- }
1774
- case AgentXtraAttribute: {
1775
- return {
1776
- name: AgentXtraAttribute,
1777
- properties: [
1778
- { name: 'name' },
1779
- { name: 'value' }
1780
- ]
1781
- };
1782
- }
1783
- case AgentXtraSpec: {
1784
- return {
1785
- name: AgentXtraSpec,
1786
- properties: [
1787
- { name: 'attributes', defaultValue: [] }
1788
- ]
1789
- };
1790
- }
1791
- case AggregateFunctionSpec: {
1792
- return {
1793
- name: AggregateFunctionSpec,
1794
- properties: [
1795
- { name: 'args', defaultValue: [] },
1796
- { name: 'name' }
1797
- ]
1798
- };
1799
- }
1800
- case AliasSpec: {
1801
- return {
1802
- name: AliasSpec,
1803
- properties: [
1804
- { name: 'alias' },
1805
- { name: 'aliases', defaultValue: [] }
1806
- ]
1807
- };
1808
- }
1809
- case ArrayLiteral: {
1810
- return {
1811
- name: ArrayLiteral,
1812
- properties: [
1813
- { name: 'vals', defaultValue: [] }
1814
- ]
1815
- };
1816
- }
1817
- case AsyncFnCall: {
1818
- return {
1819
- name: AsyncFnCall,
1820
- properties: [
1821
- { name: 'fnCall' }
1822
- ]
1823
- };
1824
- }
1825
- case AttributeDefinition: {
1826
- return {
1827
- name: AttributeDefinition,
1828
- properties: [
1829
- { name: 'arrayType' },
1830
- { name: 'enumSpec' },
1831
- { name: 'expr' },
1832
- { name: 'name' },
1833
- { name: 'oneOfSpec' },
1834
- { name: 'properties', defaultValue: [] },
1835
- { name: 'refSpec' },
1836
- { name: 'type' }
1837
- ]
1838
- };
1839
- }
1840
- case BackoffSpec: {
1841
- return {
1842
- name: BackoffSpec,
1843
- properties: [
1844
- { name: 'attributes', defaultValue: [] }
1845
- ]
1846
- };
1847
- }
1848
- case BeforeTriggerDefinition: {
1849
- return {
1850
- name: BeforeTriggerDefinition,
1851
- properties: [
1852
- { name: 'triggers' }
1853
- ]
1854
- };
1855
- }
1856
- case BinExpr: {
1857
- return {
1858
- name: BinExpr,
1859
- properties: [
1860
- { name: 'e1' },
1861
- { name: 'e2' },
1862
- { name: 'op' }
1863
- ]
1864
- };
1865
- }
1866
- case CaseEntry: {
1867
- return {
1868
- name: CaseEntry,
1869
- properties: [
1870
- { name: 'cond' },
1871
- { name: 'statements', defaultValue: [] }
1872
- ]
1873
- };
1874
- }
1875
- case CatchSpec: {
1876
- return {
1877
- name: CatchSpec,
1878
- properties: [
1879
- { name: 'handlers', defaultValue: [] }
1880
- ]
1881
- };
1882
- }
1883
- case CompositeUniqueDefinition: {
1884
- return {
1885
- name: CompositeUniqueDefinition,
1886
- properties: [
1887
- { name: 'attrs', defaultValue: [] }
1888
- ]
1889
- };
1890
- }
1891
- case ConditionalFlowStep: {
1892
- return {
1893
- name: ConditionalFlowStep,
1894
- properties: [
1895
- { name: 'expr' },
1896
- { name: 'next' }
1897
- ]
1898
- };
1899
- }
1900
- case CrudMap: {
1901
- return {
1902
- name: CrudMap,
1903
- properties: [
1904
- { name: 'body' },
1905
- { name: 'distinct', defaultValue: [] },
1906
- { name: 'groupByClause' },
1907
- { name: 'into' },
1908
- { name: 'joins', defaultValue: [] },
1909
- { name: 'name' },
1910
- { name: 'orderByClause' },
1911
- { name: 'relationships', defaultValue: [] },
1912
- { name: 'source' },
1913
- { name: 'upsert', defaultValue: [] },
1914
- { name: 'where' }
1915
- ]
1916
- };
1917
- }
1918
- case CrudMapBody: {
1919
- return {
1920
- name: CrudMapBody,
1921
- properties: [
1922
- { name: 'attributes', defaultValue: [] },
1923
- { name: 'properties', defaultValue: [] }
1924
- ]
1925
- };
1926
- }
1927
- case DecisionDefBody: {
1928
- return {
1929
- name: DecisionDefBody,
1930
- properties: [
1931
- { name: 'cases', defaultValue: [] }
1932
- ]
1933
- };
1934
- }
1935
- case DecisionDefinition: {
1936
- return {
1937
- name: DecisionDefinition,
1938
- properties: [
1939
- { name: 'body' },
1940
- { name: 'name' }
1941
- ]
1942
- };
1943
- }
1944
- case Delete: {
1945
- return {
1946
- name: Delete,
1947
- properties: [
1948
- { name: 'pattern' }
1949
- ]
1950
- };
1951
- }
1952
- case DirectiveDefinition: {
1953
- return {
1954
- name: DirectiveDefinition,
1955
- properties: [
1956
- { name: 'body' },
1957
- { name: 'dir' },
1958
- { name: 'name' }
1959
- ]
1960
- };
1961
- }
1962
- case Else: {
1963
- return {
1964
- name: Else,
1965
- properties: [
1966
- { name: 'statements', defaultValue: [] }
1967
- ]
1968
- };
1969
- }
1970
- case EntityActionsDefinitions: {
1971
- return {
1972
- name: EntityActionsDefinitions,
1973
- properties: [
1974
- { name: 'entries', defaultValue: [] }
1975
- ]
1976
- };
1977
- }
1978
- case EntityDefinition: {
1979
- return {
1980
- name: EntityDefinition,
1981
- properties: [
1982
- { name: 'extends' },
1983
- { name: 'name' },
1984
- { name: 'schema' }
1985
- ]
1986
- };
1987
- }
1988
- case EnumSpec: {
1989
- return {
1990
- name: EnumSpec,
1991
- properties: [
1992
- { name: 'type' },
1993
- { name: 'values', defaultValue: [] }
1994
- ]
1995
- };
1996
- }
1997
- case EventDefinition: {
1998
- return {
1999
- name: EventDefinition,
2000
- properties: [
2001
- { name: 'extends' },
2002
- { name: 'name' },
2003
- { name: 'schema' }
2004
- ]
2005
- };
2006
- }
2007
- case ExtendsClause: {
2008
- return {
2009
- name: ExtendsClause,
2010
- properties: [
2011
- { name: 'parentName' }
2012
- ]
2013
- };
2014
- }
2015
- case FlowDefBody: {
2016
- return {
2017
- name: FlowDefBody,
2018
- properties: [
2019
- { name: 'entries', defaultValue: [] }
2020
- ]
2021
- };
2022
- }
2023
- case FlowDefinition: {
2024
- return {
2025
- name: FlowDefinition,
2026
- properties: [
2027
- { name: 'body' },
2028
- { name: 'name' }
2029
- ]
2030
- };
2031
- }
2032
- case FlowEntry: {
2033
- return {
2034
- name: FlowEntry,
2035
- properties: [
2036
- { name: 'cond' },
2037
- { name: 'next' },
2038
- { name: 'root' }
2039
- ]
2040
- };
2041
- }
2042
- case FnCall: {
2043
- return {
2044
- name: FnCall,
2045
- properties: [
2046
- { name: 'args', defaultValue: [] },
2047
- { name: 'name' }
2048
- ]
2049
- };
2050
- }
2051
- case ForEach: {
2052
- return {
2053
- name: ForEach,
2054
- properties: [
2055
- { name: 'src' },
2056
- { name: 'statements', defaultValue: [] },
2057
- { name: 'var' }
2058
- ]
2059
- };
2060
- }
2061
- case FullTextSearch: {
2062
- return {
2063
- name: FullTextSearch,
2064
- properties: [
2065
- { name: 'name' },
2066
- { name: 'options' },
2067
- { name: 'query' }
2068
- ]
2069
- };
2070
- }
2071
- case GenericDefBody: {
2072
- return {
2073
- name: GenericDefBody,
2074
- properties: [
2075
- { name: 'attributes', defaultValue: [] }
2076
- ]
2077
- };
2078
- }
2079
- case GenericPropertyDef: {
2080
- return {
2081
- name: GenericPropertyDef,
2082
- properties: [
2083
- { name: 'name' },
2084
- { name: 'value' }
2085
- ]
2086
- };
2087
- }
2088
- case GlossaryEntryDefinition: {
2089
- return {
2090
- name: GlossaryEntryDefinition,
2091
- properties: [
2092
- { name: 'body' },
2093
- { name: 'glos' },
2094
- { name: 'name' }
2095
- ]
2096
- };
2097
- }
2098
- case Group: {
2099
- return {
2100
- name: Group,
2101
- properties: [
2102
- { name: 'ge' }
2103
- ]
2104
- };
2105
- }
2106
- case GroupByClause: {
2107
- return {
2108
- name: GroupByClause,
2109
- properties: [
2110
- { name: 'colNames', defaultValue: [] }
2111
- ]
2112
- };
2113
- }
2114
- case Handler: {
2115
- return {
2116
- name: Handler,
2117
- properties: [
2118
- { name: 'except' },
2119
- { name: 'stmt' }
2120
- ]
2121
- };
2122
- }
2123
- case If: {
2124
- return {
2125
- name: If,
2126
- properties: [
2127
- { name: 'cond' },
2128
- { name: 'else' },
2129
- { name: 'statements', defaultValue: [] }
2130
- ]
2131
- };
2132
- }
2133
- case IfWithAlias: {
2134
- return {
2135
- name: IfWithAlias,
2136
- properties: [
2137
- { name: 'if' }
2138
- ]
2139
- };
2140
- }
2141
- case Import: {
2142
- return {
2143
- name: Import,
2144
- properties: [
2145
- { name: 'name' },
2146
- { name: 'path' }
2147
- ]
2148
- };
2149
- }
2150
- case JoinSpec: {
2151
- return {
2152
- name: JoinSpec,
2153
- properties: [
2154
- { name: 'lhs' },
2155
- { name: 'name' },
2156
- { name: 'op' },
2157
- { name: 'rhs' },
2158
- { name: 'type' }
2159
- ]
2160
- };
2161
- }
2162
- case KvPair: {
2163
- return {
2164
- name: KvPair,
2165
- properties: [
2166
- { name: 'key' },
2167
- { name: 'value' }
2168
- ]
2169
- };
2170
- }
2171
- case KvPairs: {
2172
- return {
2173
- name: KvPairs,
2174
- properties: [
2175
- { name: 'pairs', defaultValue: [] }
2176
- ]
2177
- };
2178
- }
2179
- case Literal: {
2180
- return {
2181
- name: Literal,
2182
- properties: [
2183
- { name: 'array' },
2184
- { name: 'asyncFnCall' },
2185
- { name: 'bool' },
2186
- { name: 'fnCall' },
2187
- { name: 'id' },
2188
- { name: 'map' },
2189
- { name: 'num' },
2190
- { name: 'ref' },
2191
- { name: 'str' }
2192
- ]
2193
- };
2194
- }
2195
- case MapEntry: {
2196
- return {
2197
- name: MapEntry,
2198
- properties: [
2199
- { name: 'key' },
2200
- { name: 'value' }
2201
- ]
2202
- };
2203
- }
2204
- case MapKey: {
2205
- return {
2206
- name: MapKey,
2207
- properties: [
2208
- { name: 'bool' },
2209
- { name: 'num' },
2210
- { name: 'str' }
2211
- ]
2212
- };
2213
- }
2214
- case MapLiteral: {
2215
- return {
2216
- name: MapLiteral,
2217
- properties: [
2218
- { name: 'entries', defaultValue: [] }
2219
- ]
2220
- };
2221
- }
2222
- case MetaDefinition: {
2223
- return {
2224
- name: MetaDefinition,
2225
- properties: [
2226
- { name: 'spec' }
2227
- ]
2228
- };
2229
- }
2230
- case ModuleDefinition: {
2231
- return {
2232
- name: ModuleDefinition,
2233
- properties: [
2234
- { name: 'defs', defaultValue: [] },
2235
- { name: 'imports', defaultValue: [] },
2236
- { name: 'name' }
2237
- ]
2238
- };
2239
- }
2240
- case NegExpr: {
2241
- return {
2242
- name: NegExpr,
2243
- properties: [
2244
- { name: 'ne' }
2245
- ]
2246
- };
2247
- }
2248
- case NodeDefinition: {
2249
- return {
2250
- name: NodeDefinition,
2251
- properties: [
2252
- { name: 'alias' },
2253
- { name: 'name' }
2254
- ]
2255
- };
2256
- }
2257
- case NotExpr: {
2258
- return {
2259
- name: NotExpr,
2260
- properties: [
2261
- { name: 'ne' }
2262
- ]
2263
- };
2264
- }
2265
- case OneOfSpec: {
2266
- return {
2267
- name: OneOfSpec,
2268
- properties: [
2269
- { name: 'ref' }
2270
- ]
2271
- };
2272
- }
2273
- case OrderByClause: {
2274
- return {
2275
- name: OrderByClause,
2276
- properties: [
2277
- { name: 'colNames', defaultValue: [] },
2278
- { name: 'order' }
2279
- ]
2280
- };
2281
- }
2282
- case Pattern: {
2283
- return {
2284
- name: Pattern,
2285
- properties: [
2286
- { name: 'crudMap' },
2287
- { name: 'delete' },
2288
- { name: 'expr' },
2289
- { name: 'forEach' },
2290
- { name: 'fullTextSearch' },
2291
- { name: 'if' },
2292
- { name: 'ifWithAlias' },
2293
- { name: 'purge' },
2294
- { name: 'return' },
2295
- { name: 'throwError' }
2296
- ]
2297
- };
2298
- }
2299
- case PrePostTriggerDefinition: {
2300
- return {
2301
- name: PrePostTriggerDefinition,
2302
- properties: [
2303
- { name: 'after' },
2304
- { name: 'before' }
2305
- ]
2306
- };
2307
- }
2308
- case PropertyDefinition: {
2309
- return {
2310
- name: PropertyDefinition,
2311
- properties: [
2312
- { name: 'name' },
2313
- { name: 'value' }
2314
- ]
2315
- };
2316
- }
2317
- case PublicAgentDefinition: {
2318
- return {
2319
- name: PublicAgentDefinition,
2320
- properties: [
2321
- { name: 'def' }
2322
- ]
2323
- };
2324
- }
2325
- case PublicEventDefinition: {
2326
- return {
2327
- name: PublicEventDefinition,
2328
- properties: [
2329
- { name: 'def' }
2330
- ]
2331
- };
2332
- }
2333
- case PublicWorkflowDefinition: {
2334
- return {
2335
- name: PublicWorkflowDefinition,
2336
- properties: [
2337
- { name: 'def' }
2338
- ]
2339
- };
2340
- }
2341
- case Purge: {
2342
- return {
2343
- name: Purge,
2344
- properties: [
2345
- { name: 'pattern' }
2346
- ]
2347
- };
2348
- }
2349
- case RbacAllowSpec: {
2350
- return {
2351
- name: RbacAllowSpec,
2352
- properties: [
2353
- { name: 'oprs', defaultValue: [] }
2354
- ]
2355
- };
2356
- }
2357
- case RbacExpressionSpec: {
2358
- return {
2359
- name: RbacExpressionSpec,
2360
- properties: [
2361
- { name: 'lhs' },
2362
- { name: 'rhs' }
2363
- ]
2364
- };
2365
- }
2366
- case RbacOpr: {
2367
- return {
2368
- name: RbacOpr,
2369
- properties: [
2370
- { name: 'value' }
2371
- ]
2372
- };
2373
- }
2374
- case RbacRolesSpec: {
2375
- return {
2376
- name: RbacRolesSpec,
2377
- properties: [
2378
- { name: 'roles', defaultValue: [] }
2379
- ]
2380
- };
2381
- }
2382
- case RbacSpecDefinition: {
2383
- return {
2384
- name: RbacSpecDefinition,
2385
- properties: [
2386
- { name: 'specEntries', defaultValue: [] }
2387
- ]
2388
- };
2389
- }
2390
- case RbacSpecEntries: {
2391
- return {
2392
- name: RbacSpecEntries,
2393
- properties: [
2394
- { name: 'entries', defaultValue: [] }
2395
- ]
2396
- };
2397
- }
2398
- case RbacSpecEntry: {
2399
- return {
2400
- name: RbacSpecEntry,
2401
- properties: [
2402
- { name: 'allow' },
2403
- { name: 'expr' },
2404
- { name: 'role' }
2405
- ]
2406
- };
2407
- }
2408
- case RecordDefinition: {
2409
- return {
2410
- name: RecordDefinition,
2411
- properties: [
2412
- { name: 'extends' },
2413
- { name: 'name' },
2414
- { name: 'schema' }
2415
- ]
2416
- };
2417
- }
2418
- case RecordExtraDefinition: {
2419
- return {
2420
- name: RecordExtraDefinition,
2421
- properties: [
2422
- { name: 'actions' },
2423
- { name: 'meta' },
2424
- { name: 'prePost' },
2425
- { name: 'rbacSpec' },
2426
- { name: 'uq' }
2427
- ]
2428
- };
2429
- }
2430
- case RecordSchemaDefinition: {
2431
- return {
2432
- name: RecordSchemaDefinition,
2433
- properties: [
2434
- { name: 'attributes', defaultValue: [] },
2435
- { name: 'extras', defaultValue: [] }
2436
- ]
2437
- };
2438
- }
2439
- case RefSpec: {
2440
- return {
2441
- name: RefSpec,
2442
- properties: [
2443
- { name: 'ref' },
2444
- { name: 'type' }
2445
- ]
2446
- };
2447
- }
2448
- case RelationshipDefinition: {
2449
- return {
2450
- name: RelationshipDefinition,
2451
- properties: [
2452
- { name: 'name' },
2453
- { name: 'nodes' },
2454
- { name: 'properties', defaultValue: [] },
2455
- { name: 'schema' },
2456
- { name: 'type' }
2457
- ]
2458
- };
2459
- }
2460
- case RelationshipPattern: {
2461
- return {
2462
- name: RelationshipPattern,
2463
- properties: [
2464
- { name: 'name' },
2465
- { name: 'pattern' }
2466
- ]
2467
- };
2468
- }
2469
- case RelNodes: {
2470
- return {
2471
- name: RelNodes,
2472
- properties: [
2473
- { name: 'node1' },
2474
- { name: 'node2' }
2475
- ]
2476
- };
2477
- }
2478
- case ResolverDefinition: {
2479
- return {
2480
- name: ResolverDefinition,
2481
- properties: [
2482
- { name: 'methods', defaultValue: [] },
2483
- { name: 'name' },
2484
- { name: 'paths', defaultValue: [] }
2485
- ]
2486
- };
2487
- }
2488
- case ResolverFnName: {
2489
- return {
2490
- name: ResolverFnName,
2491
- properties: [
2492
- { name: 'name' }
2493
- ]
2494
- };
2495
- }
2496
- case ResolverMethodName: {
2497
- return {
2498
- name: ResolverMethodName,
2499
- properties: [
2500
- { name: 'name' }
2501
- ]
2502
- };
2503
- }
2504
- case ResolverMethodSpec: {
2505
- return {
2506
- name: ResolverMethodSpec,
2507
- properties: [
2508
- { name: 'fn' },
2509
- { name: 'key' }
2510
- ]
2511
- };
2512
- }
2513
- case RetryDefinition: {
2514
- return {
2515
- name: RetryDefinition,
2516
- properties: [
2517
- { name: 'attempts' },
2518
- { name: 'backoff' },
2519
- { name: 'name' }
2520
- ]
2521
- };
2522
- }
2523
- case Return: {
2524
- return {
2525
- name: Return,
2526
- properties: [
2527
- { name: 'pattern' }
2528
- ]
2529
- };
2530
- }
2531
- case RuntimeHint: {
2532
- return {
2533
- name: RuntimeHint,
2534
- properties: [
2535
- { name: 'aliasSpec' },
2536
- { name: 'catchSpec' },
2537
- { name: 'thenSpec' }
2538
- ]
2539
- };
2540
- }
2541
- case ScenarioDefinition: {
2542
- return {
2543
- name: ScenarioDefinition,
2544
- properties: [
2545
- { name: 'body' },
2546
- { name: 'name' },
2547
- { name: 'scn' }
2548
- ]
2549
- };
2550
- }
2551
- case SelectIntoEntry: {
2552
- return {
2553
- name: SelectIntoEntry,
2554
- properties: [
2555
- { name: 'aggregate' },
2556
- { name: 'alias' },
2557
- { name: 'attribute' }
2558
- ]
2559
- };
2560
- }
2561
- case SelectIntoSpec: {
2562
- return {
2563
- name: SelectIntoSpec,
2564
- properties: [
2565
- { name: 'entries', defaultValue: [] }
2566
- ]
2567
- };
2568
- }
2569
- case SetAttribute: {
2570
- return {
2571
- name: SetAttribute,
2572
- properties: [
2573
- { name: 'aggregate' },
2574
- { name: 'name' },
2575
- { name: 'op' },
2576
- { name: 'value' }
2577
- ]
2578
- };
2579
- }
2580
- case StandaloneStatement: {
2581
- return {
2582
- name: StandaloneStatement,
2583
- properties: [
2584
- { name: 'stmt' }
2585
- ]
2586
- };
2587
- }
2588
- case Statement: {
2589
- return {
2590
- name: Statement,
2591
- properties: [
2592
- { name: 'hints', defaultValue: [] },
2593
- { name: 'pattern' }
2594
- ]
2595
- };
2596
- }
2597
- case ThenSpec: {
2598
- return {
2599
- name: ThenSpec,
2600
- properties: [
2601
- { name: 'statements', defaultValue: [] }
2602
- ]
2603
- };
2604
- }
2605
- case ThrowError: {
2606
- return {
2607
- name: ThrowError,
2608
- properties: [
2609
- { name: 'reason' }
2610
- ]
2611
- };
2612
- }
2613
- case TriggerDefinition: {
2614
- return {
2615
- name: TriggerDefinition,
2616
- properties: [
2617
- { name: 'entries', defaultValue: [] }
2618
- ]
2619
- };
2620
- }
2621
- case TriggerEntry: {
2622
- return {
2623
- name: TriggerEntry,
2624
- properties: [
2625
- { name: 'async' },
2626
- { name: 'event' },
2627
- { name: 'on' }
2628
- ]
2629
- };
2630
- }
2631
- case WhereSpec: {
2632
- return {
2633
- name: WhereSpec,
2634
- properties: [
2635
- { name: 'clauses', defaultValue: [] }
2636
- ]
2637
- };
2638
- }
2639
- case WhereSpecClause: {
2640
- return {
2641
- name: WhereSpecClause,
2642
- properties: [
2643
- { name: 'lhs' },
2644
- { name: 'op' },
2645
- { name: 'rhs' }
2646
- ]
2647
- };
2648
- }
2649
- case WorkflowDefinition: {
2650
- return {
2651
- name: WorkflowDefinition,
2652
- properties: [
2653
- { name: 'header' },
2654
- { name: 'name' },
2655
- { name: 'statements', defaultValue: [] }
2656
- ]
2657
- };
2658
- }
2659
- case WorkflowHeader: {
2660
- return {
2661
- name: WorkflowHeader,
2662
- properties: [
2663
- { name: 'name' },
2664
- { name: 'prefix' },
2665
- { name: 'tag' }
2666
- ]
2667
- };
2668
- }
2669
- default: {
2670
- return {
2671
- name: type,
2672
- properties: []
2673
- };
2674
- }
2175
+ override readonly types = {
2176
+ ActionEntry: {
2177
+ name: ActionEntry.$type,
2178
+ properties: {
2179
+ event: {
2180
+ name: ActionEntry.event
2181
+ },
2182
+ name: {
2183
+ name: ActionEntry.name
2184
+ }
2185
+ },
2186
+ superTypes: []
2187
+ },
2188
+ AfterTriggerDefinition: {
2189
+ name: AfterTriggerDefinition.$type,
2190
+ properties: {
2191
+ triggers: {
2192
+ name: AfterTriggerDefinition.triggers
2193
+ }
2194
+ },
2195
+ superTypes: []
2196
+ },
2197
+ AgentDefinition: {
2198
+ name: AgentDefinition.$type,
2199
+ properties: {
2200
+ body: {
2201
+ name: AgentDefinition.body
2202
+ },
2203
+ name: {
2204
+ name: AgentDefinition.name
2205
+ }
2206
+ },
2207
+ superTypes: [Definition.$type]
2208
+ },
2209
+ AgentEvaluatorDefinition: {
2210
+ name: AgentEvaluatorDefinition.$type,
2211
+ properties: {
2212
+ attributes: {
2213
+ name: AgentEvaluatorDefinition.attributes,
2214
+ defaultValue: []
2215
+ },
2216
+ name: {
2217
+ name: AgentEvaluatorDefinition.name
2218
+ }
2219
+ },
2220
+ superTypes: [Definition.$type]
2221
+ },
2222
+ AgentXtraAttribute: {
2223
+ name: AgentXtraAttribute.$type,
2224
+ properties: {
2225
+ name: {
2226
+ name: AgentXtraAttribute.name
2227
+ },
2228
+ value: {
2229
+ name: AgentXtraAttribute.value
2230
+ }
2231
+ },
2232
+ superTypes: []
2233
+ },
2234
+ AgentXtraSpec: {
2235
+ name: AgentXtraSpec.$type,
2236
+ properties: {
2237
+ attributes: {
2238
+ name: AgentXtraSpec.attributes,
2239
+ defaultValue: []
2240
+ }
2241
+ },
2242
+ superTypes: []
2243
+ },
2244
+ AggregateFunctionSpec: {
2245
+ name: AggregateFunctionSpec.$type,
2246
+ properties: {
2247
+ args: {
2248
+ name: AggregateFunctionSpec.args,
2249
+ defaultValue: []
2250
+ },
2251
+ name: {
2252
+ name: AggregateFunctionSpec.name
2253
+ }
2254
+ },
2255
+ superTypes: []
2256
+ },
2257
+ AliasSpec: {
2258
+ name: AliasSpec.$type,
2259
+ properties: {
2260
+ alias: {
2261
+ name: AliasSpec.alias
2262
+ },
2263
+ aliases: {
2264
+ name: AliasSpec.aliases,
2265
+ defaultValue: []
2266
+ }
2267
+ },
2268
+ superTypes: []
2269
+ },
2270
+ ArrayLiteral: {
2271
+ name: ArrayLiteral.$type,
2272
+ properties: {
2273
+ vals: {
2274
+ name: ArrayLiteral.vals,
2275
+ defaultValue: []
2276
+ }
2277
+ },
2278
+ superTypes: []
2279
+ },
2280
+ AsyncFnCall: {
2281
+ name: AsyncFnCall.$type,
2282
+ properties: {
2283
+ fnCall: {
2284
+ name: AsyncFnCall.fnCall
2285
+ }
2286
+ },
2287
+ superTypes: []
2288
+ },
2289
+ AttributeDefinition: {
2290
+ name: AttributeDefinition.$type,
2291
+ properties: {
2292
+ arrayType: {
2293
+ name: AttributeDefinition.arrayType
2294
+ },
2295
+ enumSpec: {
2296
+ name: AttributeDefinition.enumSpec
2297
+ },
2298
+ expr: {
2299
+ name: AttributeDefinition.expr
2300
+ },
2301
+ name: {
2302
+ name: AttributeDefinition.name
2303
+ },
2304
+ oneOfSpec: {
2305
+ name: AttributeDefinition.oneOfSpec
2306
+ },
2307
+ properties: {
2308
+ name: AttributeDefinition.properties,
2309
+ defaultValue: []
2310
+ },
2311
+ refSpec: {
2312
+ name: AttributeDefinition.refSpec
2313
+ },
2314
+ type: {
2315
+ name: AttributeDefinition.type
2316
+ }
2317
+ },
2318
+ superTypes: []
2319
+ },
2320
+ AttributeValueExpression: {
2321
+ name: AttributeValueExpression.$type,
2322
+ properties: {
2323
+ },
2324
+ superTypes: []
2325
+ },
2326
+ BackoffSpec: {
2327
+ name: BackoffSpec.$type,
2328
+ properties: {
2329
+ attributes: {
2330
+ name: BackoffSpec.attributes,
2331
+ defaultValue: []
2332
+ }
2333
+ },
2334
+ superTypes: []
2335
+ },
2336
+ BeforeTriggerDefinition: {
2337
+ name: BeforeTriggerDefinition.$type,
2338
+ properties: {
2339
+ triggers: {
2340
+ name: BeforeTriggerDefinition.triggers
2341
+ }
2342
+ },
2343
+ superTypes: []
2344
+ },
2345
+ BinExpr: {
2346
+ name: BinExpr.$type,
2347
+ properties: {
2348
+ e1: {
2349
+ name: BinExpr.e1
2350
+ },
2351
+ e2: {
2352
+ name: BinExpr.e2
2353
+ },
2354
+ op: {
2355
+ name: BinExpr.op
2356
+ }
2357
+ },
2358
+ superTypes: [Expr.$type]
2359
+ },
2360
+ CaseEntry: {
2361
+ name: CaseEntry.$type,
2362
+ properties: {
2363
+ cond: {
2364
+ name: CaseEntry.cond
2365
+ },
2366
+ statements: {
2367
+ name: CaseEntry.statements,
2368
+ defaultValue: []
2369
+ }
2370
+ },
2371
+ superTypes: []
2372
+ },
2373
+ CatchSpec: {
2374
+ name: CatchSpec.$type,
2375
+ properties: {
2376
+ handlers: {
2377
+ name: CatchSpec.handlers,
2378
+ defaultValue: []
2379
+ }
2380
+ },
2381
+ superTypes: []
2382
+ },
2383
+ CompositeUniqueDefinition: {
2384
+ name: CompositeUniqueDefinition.$type,
2385
+ properties: {
2386
+ attrs: {
2387
+ name: CompositeUniqueDefinition.attrs,
2388
+ defaultValue: []
2389
+ }
2390
+ },
2391
+ superTypes: []
2392
+ },
2393
+ ConditionalFlowStep: {
2394
+ name: ConditionalFlowStep.$type,
2395
+ properties: {
2396
+ expr: {
2397
+ name: ConditionalFlowStep.expr
2398
+ },
2399
+ next: {
2400
+ name: ConditionalFlowStep.next
2401
+ }
2402
+ },
2403
+ superTypes: []
2404
+ },
2405
+ CrudMap: {
2406
+ name: CrudMap.$type,
2407
+ properties: {
2408
+ body: {
2409
+ name: CrudMap.body
2410
+ },
2411
+ distinct: {
2412
+ name: CrudMap.distinct,
2413
+ defaultValue: []
2414
+ },
2415
+ groupByClause: {
2416
+ name: CrudMap.groupByClause
2417
+ },
2418
+ into: {
2419
+ name: CrudMap.into
2420
+ },
2421
+ joins: {
2422
+ name: CrudMap.joins,
2423
+ defaultValue: []
2424
+ },
2425
+ name: {
2426
+ name: CrudMap.name
2427
+ },
2428
+ orderByClause: {
2429
+ name: CrudMap.orderByClause
2430
+ },
2431
+ relationships: {
2432
+ name: CrudMap.relationships,
2433
+ defaultValue: []
2434
+ },
2435
+ source: {
2436
+ name: CrudMap.source
2437
+ },
2438
+ upsert: {
2439
+ name: CrudMap.upsert,
2440
+ defaultValue: []
2441
+ },
2442
+ where: {
2443
+ name: CrudMap.where
2444
+ }
2445
+ },
2446
+ superTypes: []
2447
+ },
2448
+ CrudMapBody: {
2449
+ name: CrudMapBody.$type,
2450
+ properties: {
2451
+ attributes: {
2452
+ name: CrudMapBody.attributes,
2453
+ defaultValue: []
2454
+ },
2455
+ properties: {
2456
+ name: CrudMapBody.properties,
2457
+ defaultValue: []
2458
+ }
2459
+ },
2460
+ superTypes: []
2461
+ },
2462
+ DecisionDefBody: {
2463
+ name: DecisionDefBody.$type,
2464
+ properties: {
2465
+ cases: {
2466
+ name: DecisionDefBody.cases,
2467
+ defaultValue: []
2468
+ }
2469
+ },
2470
+ superTypes: []
2471
+ },
2472
+ DecisionDefinition: {
2473
+ name: DecisionDefinition.$type,
2474
+ properties: {
2475
+ body: {
2476
+ name: DecisionDefinition.body
2477
+ },
2478
+ name: {
2479
+ name: DecisionDefinition.name
2480
+ }
2481
+ },
2482
+ superTypes: [Definition.$type]
2483
+ },
2484
+ Definition: {
2485
+ name: Definition.$type,
2486
+ properties: {
2487
+ },
2488
+ superTypes: []
2489
+ },
2490
+ Delete: {
2491
+ name: Delete.$type,
2492
+ properties: {
2493
+ pattern: {
2494
+ name: Delete.pattern
2495
+ }
2496
+ },
2497
+ superTypes: []
2498
+ },
2499
+ DirectiveDefinition: {
2500
+ name: DirectiveDefinition.$type,
2501
+ properties: {
2502
+ body: {
2503
+ name: DirectiveDefinition.body
2504
+ },
2505
+ dir: {
2506
+ name: DirectiveDefinition.dir
2507
+ },
2508
+ name: {
2509
+ name: DirectiveDefinition.name
2510
+ }
2511
+ },
2512
+ superTypes: [Definition.$type]
2513
+ },
2514
+ Else: {
2515
+ name: Else.$type,
2516
+ properties: {
2517
+ statements: {
2518
+ name: Else.statements,
2519
+ defaultValue: []
2520
+ }
2521
+ },
2522
+ superTypes: []
2523
+ },
2524
+ EntityActionsDefinitions: {
2525
+ name: EntityActionsDefinitions.$type,
2526
+ properties: {
2527
+ entries: {
2528
+ name: EntityActionsDefinitions.entries,
2529
+ defaultValue: []
2530
+ }
2531
+ },
2532
+ superTypes: []
2533
+ },
2534
+ EntityDefinition: {
2535
+ name: EntityDefinition.$type,
2536
+ properties: {
2537
+ extends: {
2538
+ name: EntityDefinition.extends
2539
+ },
2540
+ name: {
2541
+ name: EntityDefinition.name
2542
+ },
2543
+ schema: {
2544
+ name: EntityDefinition.schema
2545
+ }
2546
+ },
2547
+ superTypes: [SchemaDefinition.$type]
2548
+ },
2549
+ EnumSpec: {
2550
+ name: EnumSpec.$type,
2551
+ properties: {
2552
+ type: {
2553
+ name: EnumSpec.type
2554
+ },
2555
+ values: {
2556
+ name: EnumSpec.values,
2557
+ defaultValue: []
2558
+ }
2559
+ },
2560
+ superTypes: []
2561
+ },
2562
+ EventDefinition: {
2563
+ name: EventDefinition.$type,
2564
+ properties: {
2565
+ extends: {
2566
+ name: EventDefinition.extends
2567
+ },
2568
+ name: {
2569
+ name: EventDefinition.name
2570
+ },
2571
+ schema: {
2572
+ name: EventDefinition.schema
2573
+ }
2574
+ },
2575
+ superTypes: [SchemaDefinition.$type]
2576
+ },
2577
+ Expr: {
2578
+ name: Expr.$type,
2579
+ properties: {
2580
+ },
2581
+ superTypes: [AttributeValueExpression.$type]
2582
+ },
2583
+ ExtendsClause: {
2584
+ name: ExtendsClause.$type,
2585
+ properties: {
2586
+ parentName: {
2587
+ name: ExtendsClause.parentName
2588
+ }
2589
+ },
2590
+ superTypes: []
2591
+ },
2592
+ FlowDefBody: {
2593
+ name: FlowDefBody.$type,
2594
+ properties: {
2595
+ entries: {
2596
+ name: FlowDefBody.entries,
2597
+ defaultValue: []
2598
+ }
2599
+ },
2600
+ superTypes: []
2601
+ },
2602
+ FlowDefinition: {
2603
+ name: FlowDefinition.$type,
2604
+ properties: {
2605
+ body: {
2606
+ name: FlowDefinition.body
2607
+ },
2608
+ name: {
2609
+ name: FlowDefinition.name
2610
+ }
2611
+ },
2612
+ superTypes: [Definition.$type]
2613
+ },
2614
+ FlowEntry: {
2615
+ name: FlowEntry.$type,
2616
+ properties: {
2617
+ cond: {
2618
+ name: FlowEntry.cond
2619
+ },
2620
+ next: {
2621
+ name: FlowEntry.next
2622
+ },
2623
+ root: {
2624
+ name: FlowEntry.root
2625
+ }
2626
+ },
2627
+ superTypes: []
2628
+ },
2629
+ FlowStepSpec: {
2630
+ name: FlowStepSpec.$type,
2631
+ properties: {
2632
+ },
2633
+ superTypes: []
2634
+ },
2635
+ FnCall: {
2636
+ name: FnCall.$type,
2637
+ properties: {
2638
+ args: {
2639
+ name: FnCall.args,
2640
+ defaultValue: []
2641
+ },
2642
+ name: {
2643
+ name: FnCall.name
2644
+ }
2645
+ },
2646
+ superTypes: []
2647
+ },
2648
+ ForEach: {
2649
+ name: ForEach.$type,
2650
+ properties: {
2651
+ src: {
2652
+ name: ForEach.src
2653
+ },
2654
+ statements: {
2655
+ name: ForEach.statements,
2656
+ defaultValue: []
2657
+ },
2658
+ var: {
2659
+ name: ForEach.var
2660
+ }
2661
+ },
2662
+ superTypes: []
2663
+ },
2664
+ FullTextSearch: {
2665
+ name: FullTextSearch.$type,
2666
+ properties: {
2667
+ name: {
2668
+ name: FullTextSearch.name
2669
+ },
2670
+ options: {
2671
+ name: FullTextSearch.options
2672
+ },
2673
+ query: {
2674
+ name: FullTextSearch.query
2675
+ }
2676
+ },
2677
+ superTypes: []
2678
+ },
2679
+ GenericDefBody: {
2680
+ name: GenericDefBody.$type,
2681
+ properties: {
2682
+ attributes: {
2683
+ name: GenericDefBody.attributes,
2684
+ defaultValue: []
2685
+ }
2686
+ },
2687
+ superTypes: []
2688
+ },
2689
+ GenericPropertyDef: {
2690
+ name: GenericPropertyDef.$type,
2691
+ properties: {
2692
+ name: {
2693
+ name: GenericPropertyDef.name
2694
+ },
2695
+ value: {
2696
+ name: GenericPropertyDef.value
2697
+ }
2698
+ },
2699
+ superTypes: []
2700
+ },
2701
+ GlossaryEntryDefinition: {
2702
+ name: GlossaryEntryDefinition.$type,
2703
+ properties: {
2704
+ body: {
2705
+ name: GlossaryEntryDefinition.body
2706
+ },
2707
+ glos: {
2708
+ name: GlossaryEntryDefinition.glos
2709
+ },
2710
+ name: {
2711
+ name: GlossaryEntryDefinition.name
2712
+ }
2713
+ },
2714
+ superTypes: [Definition.$type]
2715
+ },
2716
+ Group: {
2717
+ name: Group.$type,
2718
+ properties: {
2719
+ ge: {
2720
+ name: Group.ge
2721
+ }
2722
+ },
2723
+ superTypes: [PrimExpr.$type]
2724
+ },
2725
+ GroupByClause: {
2726
+ name: GroupByClause.$type,
2727
+ properties: {
2728
+ colNames: {
2729
+ name: GroupByClause.colNames,
2730
+ defaultValue: []
2731
+ }
2732
+ },
2733
+ superTypes: []
2734
+ },
2735
+ Handler: {
2736
+ name: Handler.$type,
2737
+ properties: {
2738
+ except: {
2739
+ name: Handler.except
2740
+ },
2741
+ stmt: {
2742
+ name: Handler.stmt
2743
+ }
2744
+ },
2745
+ superTypes: []
2746
+ },
2747
+ If: {
2748
+ name: If.$type,
2749
+ properties: {
2750
+ cond: {
2751
+ name: If.cond
2752
+ },
2753
+ else: {
2754
+ name: If.else
2755
+ },
2756
+ statements: {
2757
+ name: If.statements,
2758
+ defaultValue: []
2759
+ }
2760
+ },
2761
+ superTypes: []
2762
+ },
2763
+ IfWithAlias: {
2764
+ name: IfWithAlias.$type,
2765
+ properties: {
2766
+ if: {
2767
+ name: IfWithAlias.if
2768
+ }
2769
+ },
2770
+ superTypes: []
2771
+ },
2772
+ Import: {
2773
+ name: Import.$type,
2774
+ properties: {
2775
+ name: {
2776
+ name: Import.name
2777
+ },
2778
+ path: {
2779
+ name: Import.path
2780
+ }
2781
+ },
2782
+ superTypes: []
2783
+ },
2784
+ JoinSpec: {
2785
+ name: JoinSpec.$type,
2786
+ properties: {
2787
+ lhs: {
2788
+ name: JoinSpec.lhs
2789
+ },
2790
+ name: {
2791
+ name: JoinSpec.name
2792
+ },
2793
+ op: {
2794
+ name: JoinSpec.op
2795
+ },
2796
+ rhs: {
2797
+ name: JoinSpec.rhs
2798
+ },
2799
+ type: {
2800
+ name: JoinSpec.type
2801
+ }
2802
+ },
2803
+ superTypes: []
2804
+ },
2805
+ KvPair: {
2806
+ name: KvPair.$type,
2807
+ properties: {
2808
+ key: {
2809
+ name: KvPair.key
2810
+ },
2811
+ value: {
2812
+ name: KvPair.value
2813
+ }
2814
+ },
2815
+ superTypes: []
2816
+ },
2817
+ KvPairs: {
2818
+ name: KvPairs.$type,
2819
+ properties: {
2820
+ pairs: {
2821
+ name: KvPairs.pairs,
2822
+ defaultValue: []
2823
+ }
2824
+ },
2825
+ superTypes: []
2826
+ },
2827
+ Literal: {
2828
+ name: Literal.$type,
2829
+ properties: {
2830
+ array: {
2831
+ name: Literal.array
2832
+ },
2833
+ asyncFnCall: {
2834
+ name: Literal.asyncFnCall
2835
+ },
2836
+ bool: {
2837
+ name: Literal.bool
2838
+ },
2839
+ fnCall: {
2840
+ name: Literal.fnCall
2841
+ },
2842
+ id: {
2843
+ name: Literal.id
2844
+ },
2845
+ map: {
2846
+ name: Literal.map
2847
+ },
2848
+ num: {
2849
+ name: Literal.num
2850
+ },
2851
+ ref: {
2852
+ name: Literal.ref
2853
+ },
2854
+ str: {
2855
+ name: Literal.str
2856
+ }
2857
+ },
2858
+ superTypes: [PrimExpr.$type]
2859
+ },
2860
+ MapEntry: {
2861
+ name: MapEntry.$type,
2862
+ properties: {
2863
+ key: {
2864
+ name: MapEntry.key
2865
+ },
2866
+ value: {
2867
+ name: MapEntry.value
2868
+ }
2869
+ },
2870
+ superTypes: []
2871
+ },
2872
+ MapKey: {
2873
+ name: MapKey.$type,
2874
+ properties: {
2875
+ bool: {
2876
+ name: MapKey.bool
2877
+ },
2878
+ num: {
2879
+ name: MapKey.num
2880
+ },
2881
+ str: {
2882
+ name: MapKey.str
2883
+ }
2884
+ },
2885
+ superTypes: []
2886
+ },
2887
+ MapLiteral: {
2888
+ name: MapLiteral.$type,
2889
+ properties: {
2890
+ entries: {
2891
+ name: MapLiteral.entries,
2892
+ defaultValue: []
2893
+ }
2894
+ },
2895
+ superTypes: []
2896
+ },
2897
+ MetaDefinition: {
2898
+ name: MetaDefinition.$type,
2899
+ properties: {
2900
+ spec: {
2901
+ name: MetaDefinition.spec
2902
+ }
2903
+ },
2904
+ superTypes: []
2905
+ },
2906
+ ModuleDefinition: {
2907
+ name: ModuleDefinition.$type,
2908
+ properties: {
2909
+ defs: {
2910
+ name: ModuleDefinition.defs,
2911
+ defaultValue: []
2912
+ },
2913
+ imports: {
2914
+ name: ModuleDefinition.imports,
2915
+ defaultValue: []
2916
+ },
2917
+ name: {
2918
+ name: ModuleDefinition.name
2919
+ }
2920
+ },
2921
+ superTypes: []
2922
+ },
2923
+ NegExpr: {
2924
+ name: NegExpr.$type,
2925
+ properties: {
2926
+ ne: {
2927
+ name: NegExpr.ne
2928
+ }
2929
+ },
2930
+ superTypes: [PrimExpr.$type]
2931
+ },
2932
+ NodeDefinition: {
2933
+ name: NodeDefinition.$type,
2934
+ properties: {
2935
+ alias: {
2936
+ name: NodeDefinition.alias
2937
+ },
2938
+ name: {
2939
+ name: NodeDefinition.name
2940
+ }
2941
+ },
2942
+ superTypes: []
2943
+ },
2944
+ NotExpr: {
2945
+ name: NotExpr.$type,
2946
+ properties: {
2947
+ ne: {
2948
+ name: NotExpr.ne
2949
+ }
2950
+ },
2951
+ superTypes: [PrimExpr.$type]
2952
+ },
2953
+ OneOfSpec: {
2954
+ name: OneOfSpec.$type,
2955
+ properties: {
2956
+ ref: {
2957
+ name: OneOfSpec.ref
2958
+ }
2959
+ },
2960
+ superTypes: []
2961
+ },
2962
+ OrderByClause: {
2963
+ name: OrderByClause.$type,
2964
+ properties: {
2965
+ colNames: {
2966
+ name: OrderByClause.colNames,
2967
+ defaultValue: []
2968
+ },
2969
+ order: {
2970
+ name: OrderByClause.order
2971
+ }
2972
+ },
2973
+ superTypes: []
2974
+ },
2975
+ Pattern: {
2976
+ name: Pattern.$type,
2977
+ properties: {
2978
+ crudMap: {
2979
+ name: Pattern.crudMap
2980
+ },
2981
+ delete: {
2982
+ name: Pattern.delete
2983
+ },
2984
+ expr: {
2985
+ name: Pattern.expr
2986
+ },
2987
+ forEach: {
2988
+ name: Pattern.forEach
2989
+ },
2990
+ fullTextSearch: {
2991
+ name: Pattern.fullTextSearch
2992
+ },
2993
+ if: {
2994
+ name: Pattern.if
2995
+ },
2996
+ ifWithAlias: {
2997
+ name: Pattern.ifWithAlias
2998
+ },
2999
+ purge: {
3000
+ name: Pattern.purge
3001
+ },
3002
+ return: {
3003
+ name: Pattern.return
3004
+ },
3005
+ throwError: {
3006
+ name: Pattern.throwError
3007
+ }
3008
+ },
3009
+ superTypes: []
3010
+ },
3011
+ PrePostTriggerDefinition: {
3012
+ name: PrePostTriggerDefinition.$type,
3013
+ properties: {
3014
+ after: {
3015
+ name: PrePostTriggerDefinition.after
3016
+ },
3017
+ before: {
3018
+ name: PrePostTriggerDefinition.before
3019
+ }
3020
+ },
3021
+ superTypes: []
3022
+ },
3023
+ PrimExpr: {
3024
+ name: PrimExpr.$type,
3025
+ properties: {
3026
+ },
3027
+ superTypes: [Expr.$type]
3028
+ },
3029
+ PropertyDefinition: {
3030
+ name: PropertyDefinition.$type,
3031
+ properties: {
3032
+ name: {
3033
+ name: PropertyDefinition.name
3034
+ },
3035
+ value: {
3036
+ name: PropertyDefinition.value
3037
+ }
3038
+ },
3039
+ superTypes: []
3040
+ },
3041
+ PublicAgentDefinition: {
3042
+ name: PublicAgentDefinition.$type,
3043
+ properties: {
3044
+ def: {
3045
+ name: PublicAgentDefinition.def
3046
+ }
3047
+ },
3048
+ superTypes: [Definition.$type]
3049
+ },
3050
+ PublicEventDefinition: {
3051
+ name: PublicEventDefinition.$type,
3052
+ properties: {
3053
+ def: {
3054
+ name: PublicEventDefinition.def
3055
+ }
3056
+ },
3057
+ superTypes: [SchemaDefinition.$type]
3058
+ },
3059
+ PublicWorkflowDefinition: {
3060
+ name: PublicWorkflowDefinition.$type,
3061
+ properties: {
3062
+ def: {
3063
+ name: PublicWorkflowDefinition.def
3064
+ }
3065
+ },
3066
+ superTypes: [Definition.$type]
3067
+ },
3068
+ Purge: {
3069
+ name: Purge.$type,
3070
+ properties: {
3071
+ pattern: {
3072
+ name: Purge.pattern
3073
+ }
3074
+ },
3075
+ superTypes: []
3076
+ },
3077
+ RbacAllowSpec: {
3078
+ name: RbacAllowSpec.$type,
3079
+ properties: {
3080
+ oprs: {
3081
+ name: RbacAllowSpec.oprs,
3082
+ defaultValue: []
3083
+ }
3084
+ },
3085
+ superTypes: []
3086
+ },
3087
+ RbacExpressionSpec: {
3088
+ name: RbacExpressionSpec.$type,
3089
+ properties: {
3090
+ lhs: {
3091
+ name: RbacExpressionSpec.lhs
3092
+ },
3093
+ rhs: {
3094
+ name: RbacExpressionSpec.rhs
3095
+ }
3096
+ },
3097
+ superTypes: []
3098
+ },
3099
+ RbacOpr: {
3100
+ name: RbacOpr.$type,
3101
+ properties: {
3102
+ value: {
3103
+ name: RbacOpr.value
3104
+ }
3105
+ },
3106
+ superTypes: []
3107
+ },
3108
+ RbacRolesSpec: {
3109
+ name: RbacRolesSpec.$type,
3110
+ properties: {
3111
+ roles: {
3112
+ name: RbacRolesSpec.roles,
3113
+ defaultValue: []
3114
+ }
3115
+ },
3116
+ superTypes: []
3117
+ },
3118
+ RbacSpecDefinition: {
3119
+ name: RbacSpecDefinition.$type,
3120
+ properties: {
3121
+ specEntries: {
3122
+ name: RbacSpecDefinition.specEntries,
3123
+ defaultValue: []
3124
+ }
3125
+ },
3126
+ superTypes: []
3127
+ },
3128
+ RbacSpecEntries: {
3129
+ name: RbacSpecEntries.$type,
3130
+ properties: {
3131
+ entries: {
3132
+ name: RbacSpecEntries.entries,
3133
+ defaultValue: []
3134
+ }
3135
+ },
3136
+ superTypes: []
3137
+ },
3138
+ RbacSpecEntry: {
3139
+ name: RbacSpecEntry.$type,
3140
+ properties: {
3141
+ allow: {
3142
+ name: RbacSpecEntry.allow
3143
+ },
3144
+ expr: {
3145
+ name: RbacSpecEntry.expr
3146
+ },
3147
+ role: {
3148
+ name: RbacSpecEntry.role
3149
+ }
3150
+ },
3151
+ superTypes: []
3152
+ },
3153
+ RecordDefinition: {
3154
+ name: RecordDefinition.$type,
3155
+ properties: {
3156
+ extends: {
3157
+ name: RecordDefinition.extends
3158
+ },
3159
+ name: {
3160
+ name: RecordDefinition.name
3161
+ },
3162
+ schema: {
3163
+ name: RecordDefinition.schema
3164
+ }
3165
+ },
3166
+ superTypes: [SchemaDefinition.$type]
3167
+ },
3168
+ RecordExtraDefinition: {
3169
+ name: RecordExtraDefinition.$type,
3170
+ properties: {
3171
+ actions: {
3172
+ name: RecordExtraDefinition.actions
3173
+ },
3174
+ meta: {
3175
+ name: RecordExtraDefinition.meta
3176
+ },
3177
+ prePost: {
3178
+ name: RecordExtraDefinition.prePost
3179
+ },
3180
+ rbacSpec: {
3181
+ name: RecordExtraDefinition.rbacSpec
3182
+ },
3183
+ uq: {
3184
+ name: RecordExtraDefinition.uq
3185
+ }
3186
+ },
3187
+ superTypes: []
3188
+ },
3189
+ RecordSchemaDefinition: {
3190
+ name: RecordSchemaDefinition.$type,
3191
+ properties: {
3192
+ attributes: {
3193
+ name: RecordSchemaDefinition.attributes,
3194
+ defaultValue: []
3195
+ },
3196
+ extras: {
3197
+ name: RecordSchemaDefinition.extras,
3198
+ defaultValue: []
3199
+ }
3200
+ },
3201
+ superTypes: []
3202
+ },
3203
+ RefSpec: {
3204
+ name: RefSpec.$type,
3205
+ properties: {
3206
+ ref: {
3207
+ name: RefSpec.ref
3208
+ },
3209
+ type: {
3210
+ name: RefSpec.type
3211
+ }
3212
+ },
3213
+ superTypes: []
3214
+ },
3215
+ RelNodes: {
3216
+ name: RelNodes.$type,
3217
+ properties: {
3218
+ node1: {
3219
+ name: RelNodes.node1
3220
+ },
3221
+ node2: {
3222
+ name: RelNodes.node2
3223
+ }
3224
+ },
3225
+ superTypes: []
3226
+ },
3227
+ RelationshipDefinition: {
3228
+ name: RelationshipDefinition.$type,
3229
+ properties: {
3230
+ name: {
3231
+ name: RelationshipDefinition.name
3232
+ },
3233
+ nodes: {
3234
+ name: RelationshipDefinition.nodes
3235
+ },
3236
+ properties: {
3237
+ name: RelationshipDefinition.properties,
3238
+ defaultValue: []
3239
+ },
3240
+ schema: {
3241
+ name: RelationshipDefinition.schema
3242
+ },
3243
+ type: {
3244
+ name: RelationshipDefinition.type
3245
+ }
3246
+ },
3247
+ superTypes: [Definition.$type]
3248
+ },
3249
+ RelationshipPattern: {
3250
+ name: RelationshipPattern.$type,
3251
+ properties: {
3252
+ name: {
3253
+ name: RelationshipPattern.name
3254
+ },
3255
+ pattern: {
3256
+ name: RelationshipPattern.pattern
3257
+ }
3258
+ },
3259
+ superTypes: []
3260
+ },
3261
+ ResolverDefinition: {
3262
+ name: ResolverDefinition.$type,
3263
+ properties: {
3264
+ methods: {
3265
+ name: ResolverDefinition.methods,
3266
+ defaultValue: []
3267
+ },
3268
+ name: {
3269
+ name: ResolverDefinition.name
3270
+ },
3271
+ paths: {
3272
+ name: ResolverDefinition.paths,
3273
+ defaultValue: []
3274
+ }
3275
+ },
3276
+ superTypes: [Definition.$type]
3277
+ },
3278
+ ResolverFnName: {
3279
+ name: ResolverFnName.$type,
3280
+ properties: {
3281
+ name: {
3282
+ name: ResolverFnName.name
3283
+ }
3284
+ },
3285
+ superTypes: []
3286
+ },
3287
+ ResolverMethodName: {
3288
+ name: ResolverMethodName.$type,
3289
+ properties: {
3290
+ name: {
3291
+ name: ResolverMethodName.name
3292
+ }
3293
+ },
3294
+ superTypes: []
3295
+ },
3296
+ ResolverMethodSpec: {
3297
+ name: ResolverMethodSpec.$type,
3298
+ properties: {
3299
+ fn: {
3300
+ name: ResolverMethodSpec.fn
3301
+ },
3302
+ key: {
3303
+ name: ResolverMethodSpec.key
3304
+ }
3305
+ },
3306
+ superTypes: []
3307
+ },
3308
+ RetryDefinition: {
3309
+ name: RetryDefinition.$type,
3310
+ properties: {
3311
+ attempts: {
3312
+ name: RetryDefinition.attempts
3313
+ },
3314
+ backoff: {
3315
+ name: RetryDefinition.backoff
3316
+ },
3317
+ name: {
3318
+ name: RetryDefinition.name
3319
+ }
3320
+ },
3321
+ superTypes: [Definition.$type]
3322
+ },
3323
+ Return: {
3324
+ name: Return.$type,
3325
+ properties: {
3326
+ pattern: {
3327
+ name: Return.pattern
3328
+ }
3329
+ },
3330
+ superTypes: []
3331
+ },
3332
+ RuntimeHint: {
3333
+ name: RuntimeHint.$type,
3334
+ properties: {
3335
+ aliasSpec: {
3336
+ name: RuntimeHint.aliasSpec
3337
+ },
3338
+ catchSpec: {
3339
+ name: RuntimeHint.catchSpec
3340
+ },
3341
+ thenSpec: {
3342
+ name: RuntimeHint.thenSpec
3343
+ }
3344
+ },
3345
+ superTypes: []
3346
+ },
3347
+ ScenarioDefinition: {
3348
+ name: ScenarioDefinition.$type,
3349
+ properties: {
3350
+ body: {
3351
+ name: ScenarioDefinition.body
3352
+ },
3353
+ name: {
3354
+ name: ScenarioDefinition.name
3355
+ },
3356
+ scn: {
3357
+ name: ScenarioDefinition.scn
3358
+ }
3359
+ },
3360
+ superTypes: [Definition.$type]
3361
+ },
3362
+ SchemaDefinition: {
3363
+ name: SchemaDefinition.$type,
3364
+ properties: {
3365
+ },
3366
+ superTypes: [Definition.$type]
3367
+ },
3368
+ SelectIntoEntry: {
3369
+ name: SelectIntoEntry.$type,
3370
+ properties: {
3371
+ aggregate: {
3372
+ name: SelectIntoEntry.aggregate
3373
+ },
3374
+ alias: {
3375
+ name: SelectIntoEntry.alias
3376
+ },
3377
+ attribute: {
3378
+ name: SelectIntoEntry.attribute
3379
+ }
3380
+ },
3381
+ superTypes: []
3382
+ },
3383
+ SelectIntoSpec: {
3384
+ name: SelectIntoSpec.$type,
3385
+ properties: {
3386
+ entries: {
3387
+ name: SelectIntoSpec.entries,
3388
+ defaultValue: []
3389
+ }
3390
+ },
3391
+ superTypes: []
3392
+ },
3393
+ SetAttribute: {
3394
+ name: SetAttribute.$type,
3395
+ properties: {
3396
+ aggregate: {
3397
+ name: SetAttribute.aggregate
3398
+ },
3399
+ name: {
3400
+ name: SetAttribute.name
3401
+ },
3402
+ op: {
3403
+ name: SetAttribute.op
3404
+ },
3405
+ value: {
3406
+ name: SetAttribute.value
3407
+ }
3408
+ },
3409
+ superTypes: []
3410
+ },
3411
+ StandaloneStatement: {
3412
+ name: StandaloneStatement.$type,
3413
+ properties: {
3414
+ stmt: {
3415
+ name: StandaloneStatement.stmt
3416
+ }
3417
+ },
3418
+ superTypes: [Definition.$type]
3419
+ },
3420
+ Statement: {
3421
+ name: Statement.$type,
3422
+ properties: {
3423
+ hints: {
3424
+ name: Statement.hints,
3425
+ defaultValue: []
3426
+ },
3427
+ pattern: {
3428
+ name: Statement.pattern
3429
+ }
3430
+ },
3431
+ superTypes: [FlowStepSpec.$type]
3432
+ },
3433
+ ThenSpec: {
3434
+ name: ThenSpec.$type,
3435
+ properties: {
3436
+ statements: {
3437
+ name: ThenSpec.statements,
3438
+ defaultValue: []
3439
+ }
3440
+ },
3441
+ superTypes: []
3442
+ },
3443
+ ThrowError: {
3444
+ name: ThrowError.$type,
3445
+ properties: {
3446
+ reason: {
3447
+ name: ThrowError.reason
3448
+ }
3449
+ },
3450
+ superTypes: []
3451
+ },
3452
+ TriggerDefinition: {
3453
+ name: TriggerDefinition.$type,
3454
+ properties: {
3455
+ entries: {
3456
+ name: TriggerDefinition.entries,
3457
+ defaultValue: []
3458
+ }
3459
+ },
3460
+ superTypes: []
3461
+ },
3462
+ TriggerEntry: {
3463
+ name: TriggerEntry.$type,
3464
+ properties: {
3465
+ async: {
3466
+ name: TriggerEntry.async
3467
+ },
3468
+ event: {
3469
+ name: TriggerEntry.event
3470
+ },
3471
+ on: {
3472
+ name: TriggerEntry.on
3473
+ }
3474
+ },
3475
+ superTypes: []
3476
+ },
3477
+ WhereSpec: {
3478
+ name: WhereSpec.$type,
3479
+ properties: {
3480
+ clauses: {
3481
+ name: WhereSpec.clauses,
3482
+ defaultValue: []
3483
+ }
3484
+ },
3485
+ superTypes: []
3486
+ },
3487
+ WhereSpecClause: {
3488
+ name: WhereSpecClause.$type,
3489
+ properties: {
3490
+ lhs: {
3491
+ name: WhereSpecClause.lhs
3492
+ },
3493
+ op: {
3494
+ name: WhereSpecClause.op
3495
+ },
3496
+ rhs: {
3497
+ name: WhereSpecClause.rhs
3498
+ }
3499
+ },
3500
+ superTypes: []
3501
+ },
3502
+ WorkflowDefinition: {
3503
+ name: WorkflowDefinition.$type,
3504
+ properties: {
3505
+ directives: {
3506
+ name: WorkflowDefinition.directives
3507
+ },
3508
+ header: {
3509
+ name: WorkflowDefinition.header
3510
+ },
3511
+ name: {
3512
+ name: WorkflowDefinition.name
3513
+ },
3514
+ statements: {
3515
+ name: WorkflowDefinition.statements,
3516
+ defaultValue: []
3517
+ }
3518
+ },
3519
+ superTypes: [Definition.$type]
3520
+ },
3521
+ WorkflowDirectiveEntry: {
3522
+ name: WorkflowDirectiveEntry.$type,
3523
+ properties: {
3524
+ tag: {
3525
+ name: WorkflowDirectiveEntry.tag
3526
+ },
3527
+ value: {
3528
+ name: WorkflowDirectiveEntry.value
3529
+ }
3530
+ },
3531
+ superTypes: []
3532
+ },
3533
+ WorkflowDirectives: {
3534
+ name: WorkflowDirectives.$type,
3535
+ properties: {
3536
+ entries: {
3537
+ name: WorkflowDirectives.entries,
3538
+ defaultValue: []
3539
+ }
3540
+ },
3541
+ superTypes: []
3542
+ },
3543
+ WorkflowHeader: {
3544
+ name: WorkflowHeader.$type,
3545
+ properties: {
3546
+ name: {
3547
+ name: WorkflowHeader.name
3548
+ },
3549
+ prefix: {
3550
+ name: WorkflowHeader.prefix
3551
+ },
3552
+ tag: {
3553
+ name: WorkflowHeader.tag
3554
+ }
3555
+ },
3556
+ superTypes: []
2675
3557
  }
2676
- }
3558
+ } as const satisfies langium.AstMetaData
2677
3559
  }
2678
3560
 
2679
3561
  export const reflection = new AgentlangAstReflection();