agentlang 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +83 -0
- package/README.md +120 -0
- package/bin/cli.js +4 -0
- package/out/api/http.d.ts +3 -0
- package/out/api/http.d.ts.map +1 -0
- package/out/api/http.js +290 -0
- package/out/api/http.js.map +1 -0
- package/out/cli/cli-util.d.ts +7 -0
- package/out/cli/cli-util.d.ts.map +1 -0
- package/out/cli/cli-util.js +9 -0
- package/out/cli/cli-util.js.map +1 -0
- package/out/cli/docs.d.ts +2 -0
- package/out/cli/docs.d.ts.map +1 -0
- package/out/cli/docs.js +236 -0
- package/out/cli/docs.js.map +1 -0
- package/out/cli/main.d.ts +288 -0
- package/out/cli/main.d.ts.map +1 -0
- package/out/cli/main.js +119 -0
- package/out/cli/main.js.map +1 -0
- package/out/cli/openapi-docs.yml +695 -0
- package/out/extension/main.cjs +18093 -0
- package/out/extension/main.cjs.map +7 -0
- package/out/extension/main.d.ts +4 -0
- package/out/extension/main.d.ts.map +1 -0
- package/out/extension/main.js +42 -0
- package/out/extension/main.js.map +1 -0
- package/out/language/agentlang-module.d.ts +42 -0
- package/out/language/agentlang-module.d.ts.map +1 -0
- package/out/language/agentlang-module.js +42 -0
- package/out/language/agentlang-module.js.map +1 -0
- package/out/language/agentlang-validator.d.ts +15 -0
- package/out/language/agentlang-validator.d.ts.map +1 -0
- package/out/language/agentlang-validator.js +50 -0
- package/out/language/agentlang-validator.js.map +1 -0
- package/out/language/generated/ast.d.ts +491 -0
- package/out/language/generated/ast.d.ts.map +1 -0
- package/out/language/generated/ast.js +934 -0
- package/out/language/generated/ast.js.map +1 -0
- package/out/language/generated/grammar.d.ts +7 -0
- package/out/language/generated/grammar.d.ts.map +1 -0
- package/out/language/generated/grammar.js +4475 -0
- package/out/language/generated/grammar.js.map +1 -0
- package/out/language/generated/module.d.ts +14 -0
- package/out/language/generated/module.d.ts.map +1 -0
- package/out/language/generated/module.js +21 -0
- package/out/language/generated/module.js.map +1 -0
- package/out/language/main-browser.d.ts +2 -0
- package/out/language/main-browser.d.ts.map +1 -0
- package/out/language/main-browser.js +10 -0
- package/out/language/main-browser.js.map +1 -0
- package/out/language/main.cjs +36229 -0
- package/out/language/main.cjs.map +7 -0
- package/out/language/main.d.ts +2 -0
- package/out/language/main.d.ts.map +1 -0
- package/out/language/main.js +11 -0
- package/out/language/main.js.map +1 -0
- package/out/language/parser.d.ts +9 -0
- package/out/language/parser.d.ts.map +1 -0
- package/out/language/parser.js +273 -0
- package/out/language/parser.js.map +1 -0
- package/out/language/syntax.d.ts +155 -0
- package/out/language/syntax.d.ts.map +1 -0
- package/out/language/syntax.js +527 -0
- package/out/language/syntax.js.map +1 -0
- package/out/runtime/agents/common.d.ts +2 -0
- package/out/runtime/agents/common.d.ts.map +1 -0
- package/out/runtime/agents/common.js +178 -0
- package/out/runtime/agents/common.js.map +1 -0
- package/out/runtime/agents/impl/openai.d.ts +8 -0
- package/out/runtime/agents/impl/openai.d.ts.map +1 -0
- package/out/runtime/agents/impl/openai.js +15 -0
- package/out/runtime/agents/impl/openai.js.map +1 -0
- package/out/runtime/agents/provider.d.ts +21 -0
- package/out/runtime/agents/provider.d.ts.map +1 -0
- package/out/runtime/agents/provider.js +32 -0
- package/out/runtime/agents/provider.js.map +1 -0
- package/out/runtime/agents/registry.d.ts +2 -0
- package/out/runtime/agents/registry.d.ts.map +1 -0
- package/out/runtime/agents/registry.js +10 -0
- package/out/runtime/agents/registry.js.map +1 -0
- package/out/runtime/auth/cognito.d.ts +16 -0
- package/out/runtime/auth/cognito.d.ts.map +1 -0
- package/out/runtime/auth/cognito.js +186 -0
- package/out/runtime/auth/cognito.js.map +1 -0
- package/out/runtime/auth/defs.d.ts +11 -0
- package/out/runtime/auth/defs.d.ts.map +1 -0
- package/out/runtime/auth/defs.js +24 -0
- package/out/runtime/auth/defs.js.map +1 -0
- package/out/runtime/auth/interface.d.ts +22 -0
- package/out/runtime/auth/interface.d.ts.map +1 -0
- package/out/runtime/auth/interface.js +2 -0
- package/out/runtime/auth/interface.js.map +1 -0
- package/out/runtime/defs.js +24 -0
- package/out/runtime/defs.js.map +1 -0
- package/out/runtime/interpreter.d.ts +69 -0
- package/out/runtime/interpreter.d.ts.map +1 -0
- package/out/runtime/interpreter.js +1163 -0
- package/out/runtime/interpreter.js.map +1 -0
- package/out/runtime/loader.d.ts +25 -0
- package/out/runtime/loader.d.ts.map +1 -0
- package/out/runtime/loader.js +346 -0
- package/out/runtime/loader.js.map +1 -0
- package/out/runtime/logger.d.ts +2 -0
- package/out/runtime/logger.d.ts.map +1 -0
- package/out/runtime/logger.js +44 -0
- package/out/runtime/logger.js.map +1 -0
- package/out/runtime/module.d.ts +273 -0
- package/out/runtime/module.d.ts.map +1 -0
- package/out/runtime/module.js +1786 -0
- package/out/runtime/module.js.map +1 -0
- package/out/runtime/modules/ai.d.ts +26 -0
- package/out/runtime/modules/ai.d.ts.map +1 -0
- package/out/runtime/modules/ai.js +211 -0
- package/out/runtime/modules/ai.js.map +1 -0
- package/out/runtime/modules/auth.d.ts +39 -0
- package/out/runtime/modules/auth.d.ts.map +1 -0
- package/out/runtime/modules/auth.js +359 -0
- package/out/runtime/modules/auth.js.map +1 -0
- package/out/runtime/modules/core.d.ts +2 -0
- package/out/runtime/modules/core.d.ts.map +1 -0
- package/out/runtime/modules/core.js +67 -0
- package/out/runtime/modules/core.js.map +1 -0
- package/out/runtime/relgraph.d.ts +21 -0
- package/out/runtime/relgraph.d.ts.map +1 -0
- package/out/runtime/relgraph.js +156 -0
- package/out/runtime/relgraph.js.map +1 -0
- package/out/runtime/resolvers/interface.d.ts +59 -0
- package/out/runtime/resolvers/interface.d.ts.map +1 -0
- package/out/runtime/resolvers/interface.js +111 -0
- package/out/runtime/resolvers/interface.js.map +1 -0
- package/out/runtime/resolvers/registry.d.ts +8 -0
- package/out/runtime/resolvers/registry.d.ts.map +1 -0
- package/out/runtime/resolvers/registry.js +26 -0
- package/out/runtime/resolvers/registry.js.map +1 -0
- package/out/runtime/resolvers/sqldb/database.d.ts +50 -0
- package/out/runtime/resolvers/sqldb/database.d.ts.map +1 -0
- package/out/runtime/resolvers/sqldb/database.js +618 -0
- package/out/runtime/resolvers/sqldb/database.js.map +1 -0
- package/out/runtime/resolvers/sqldb/dbutil.d.ts +18 -0
- package/out/runtime/resolvers/sqldb/dbutil.d.ts.map +1 -0
- package/out/runtime/resolvers/sqldb/dbutil.js +221 -0
- package/out/runtime/resolvers/sqldb/dbutil.js.map +1 -0
- package/out/runtime/resolvers/sqldb/impl.d.ts +26 -0
- package/out/runtime/resolvers/sqldb/impl.d.ts.map +1 -0
- package/out/runtime/resolvers/sqldb/impl.js +300 -0
- package/out/runtime/resolvers/sqldb/impl.js.map +1 -0
- package/out/runtime/state.js +83 -0
- package/out/runtime/state.js.map +1 -0
- package/out/runtime/util.d.ts +43 -0
- package/out/runtime/util.d.ts.map +1 -0
- package/out/runtime/util.js +447 -0
- package/out/runtime/util.js.map +1 -0
- package/out/setupClassic.d.ts +98 -0
- package/out/setupClassic.d.ts.map +1 -0
- package/out/setupClassic.js +38 -0
- package/out/setupClassic.js.map +1 -0
- package/out/setupCommon.d.ts +2 -0
- package/out/setupCommon.d.ts.map +1 -0
- package/out/setupCommon.js +33 -0
- package/out/setupCommon.js.map +1 -0
- package/out/setupExtended.d.ts +40 -0
- package/out/setupExtended.d.ts.map +1 -0
- package/out/setupExtended.js +67 -0
- package/out/setupExtended.js.map +1 -0
- package/out/syntaxes/agentlang.monarch.d.ts +77 -0
- package/out/syntaxes/agentlang.monarch.d.ts.map +1 -0
- package/out/syntaxes/agentlang.monarch.js +31 -0
- package/out/syntaxes/agentlang.monarch.js.map +1 -0
- package/out/utils/fs/index.d.ts +14 -0
- package/out/utils/fs/index.d.ts.map +1 -0
- package/out/utils/fs/index.js +26 -0
- package/out/utils/fs/index.js.map +1 -0
- package/out/utils/fs/interfaces.d.ts +105 -0
- package/out/utils/fs/interfaces.d.ts.map +1 -0
- package/out/utils/fs/interfaces.js +5 -0
- package/out/utils/fs/interfaces.js.map +1 -0
- package/out/utils/fs/lightning-fs.d.ts +116 -0
- package/out/utils/fs/lightning-fs.d.ts.map +1 -0
- package/out/utils/fs/lightning-fs.js +243 -0
- package/out/utils/fs/lightning-fs.js.map +1 -0
- package/out/utils/fs/node-fs.d.ts +93 -0
- package/out/utils/fs/node-fs.d.ts.map +1 -0
- package/out/utils/fs/node-fs.js +169 -0
- package/out/utils/fs/node-fs.js.map +1 -0
- package/out/utils/fs-utils.d.ts +153 -0
- package/out/utils/fs-utils.d.ts.map +1 -0
- package/out/utils/fs-utils.js +271 -0
- package/out/utils/fs-utils.js.map +1 -0
- package/out/utils/runtime.d.ts +36 -0
- package/out/utils/runtime.d.ts.map +1 -0
- package/out/utils/runtime.js +39 -0
- package/out/utils/runtime.js.map +1 -0
- package/package.json +155 -0
- package/src/api/http.ts +361 -0
- package/src/cli/cli-util.ts +18 -0
- package/src/cli/main.ts +146 -0
- package/src/extension/main.ts +51 -0
- package/src/language/agentlang-module.ts +75 -0
- package/src/language/agentlang-validator.ts +60 -0
- package/src/language/agentlang.langium +178 -0
- package/src/language/generated/ast.ts +1698 -0
- package/src/language/generated/grammar.ts +4477 -0
- package/src/language/generated/module.ts +25 -0
- package/src/language/main-browser.ts +19 -0
- package/src/language/main.ts +13 -0
- package/src/language/parser.ts +329 -0
- package/src/language/syntax.ts +646 -0
- package/src/runtime/agents/common.ts +177 -0
- package/src/runtime/agents/impl/openai.ts +19 -0
- package/src/runtime/agents/provider.ts +58 -0
- package/src/runtime/agents/registry.ts +9 -0
- package/src/runtime/auth/cognito.ts +225 -0
- package/src/runtime/auth/defs.ts +33 -0
- package/src/runtime/auth/interface.ts +31 -0
- package/src/runtime/defs.ts +33 -0
- package/src/runtime/interpreter.ts +1352 -0
- package/src/runtime/loader.ts +450 -0
- package/src/runtime/logger.ts +51 -0
- package/src/runtime/module.ts +2188 -0
- package/src/runtime/modules/ai.ts +257 -0
- package/src/runtime/modules/auth.ts +489 -0
- package/src/runtime/modules/core.ts +95 -0
- package/src/runtime/relgraph.ts +195 -0
- package/src/runtime/resolvers/interface.ts +160 -0
- package/src/runtime/resolvers/registry.ts +30 -0
- package/src/runtime/resolvers/sqldb/database.ts +823 -0
- package/src/runtime/resolvers/sqldb/dbutil.ts +257 -0
- package/src/runtime/resolvers/sqldb/impl.ts +471 -0
- package/src/runtime/state.ts +87 -0
- package/src/runtime/util.ts +513 -0
- package/src/setupClassic.ts +43 -0
- package/src/setupCommon.ts +33 -0
- package/src/setupExtended.ts +79 -0
- package/src/syntaxes/agentlang.monarch.ts +31 -0
- package/src/utils/fs/index.ts +28 -0
- package/src/utils/fs/interfaces.ts +118 -0
- package/src/utils/fs/lightning-fs.ts +284 -0
- package/src/utils/fs/node-fs.ts +185 -0
- package/src/utils/fs-utils.ts +304 -0
- package/src/utils/runtime.ts +43 -0
|
@@ -0,0 +1,1698 @@
|
|
|
1
|
+
/******************************************************************************
|
|
2
|
+
* This file was generated by langium-cli 3.5.0.
|
|
3
|
+
* DO NOT EDIT MANUALLY!
|
|
4
|
+
******************************************************************************/
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
import * as langium from 'langium';
|
|
8
|
+
|
|
9
|
+
export const AgentlangTerminals = {
|
|
10
|
+
ID: /(([_a-zA-Z][\w_]*)(\/([_a-zA-Z][\w_]*))?)/,
|
|
11
|
+
STRING: /(["'])((\\{2})*|(.*?[^\\](\\{2})*))\1/,
|
|
12
|
+
INT: /-?[0-9]+/,
|
|
13
|
+
WS: /\s+/,
|
|
14
|
+
ML_COMMENT: /\/\*[\s\S]*?\*\//,
|
|
15
|
+
SL_COMMENT: /\/\/[^\n\r]*/,
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
export type AgentlangTerminalNames = keyof typeof AgentlangTerminals;
|
|
19
|
+
|
|
20
|
+
export type AgentlangKeywordNames =
|
|
21
|
+
| "("
|
|
22
|
+
| ")"
|
|
23
|
+
| "*"
|
|
24
|
+
| "+"
|
|
25
|
+
| ","
|
|
26
|
+
| "-"
|
|
27
|
+
| "."
|
|
28
|
+
| "/"
|
|
29
|
+
| ":"
|
|
30
|
+
| ";"
|
|
31
|
+
| "<"
|
|
32
|
+
| "<="
|
|
33
|
+
| "<>"
|
|
34
|
+
| "="
|
|
35
|
+
| ">"
|
|
36
|
+
| ">="
|
|
37
|
+
| "?"
|
|
38
|
+
| "@"
|
|
39
|
+
| "@after"
|
|
40
|
+
| "@async"
|
|
41
|
+
| "@before"
|
|
42
|
+
| "@enum"
|
|
43
|
+
| "@expr"
|
|
44
|
+
| "@meta"
|
|
45
|
+
| "@oneof"
|
|
46
|
+
| "@rbac"
|
|
47
|
+
| "@ref"
|
|
48
|
+
| "@with_unique"
|
|
49
|
+
| "["
|
|
50
|
+
| "]"
|
|
51
|
+
| "allow"
|
|
52
|
+
| "and"
|
|
53
|
+
| "as"
|
|
54
|
+
| "await"
|
|
55
|
+
| "between"
|
|
56
|
+
| "catch"
|
|
57
|
+
| "contains"
|
|
58
|
+
| "create"
|
|
59
|
+
| "delete"
|
|
60
|
+
| "else"
|
|
61
|
+
| "entity"
|
|
62
|
+
| "error"
|
|
63
|
+
| "event"
|
|
64
|
+
| "extends"
|
|
65
|
+
| "false"
|
|
66
|
+
| "for"
|
|
67
|
+
| "if"
|
|
68
|
+
| "import"
|
|
69
|
+
| "in"
|
|
70
|
+
| "into"
|
|
71
|
+
| "like"
|
|
72
|
+
| "module"
|
|
73
|
+
| "not"
|
|
74
|
+
| "not_found"
|
|
75
|
+
| "or"
|
|
76
|
+
| "purge"
|
|
77
|
+
| "read"
|
|
78
|
+
| "record"
|
|
79
|
+
| "relationship"
|
|
80
|
+
| "roles"
|
|
81
|
+
| "true"
|
|
82
|
+
| "update"
|
|
83
|
+
| "upsert"
|
|
84
|
+
| "where"
|
|
85
|
+
| "workflow"
|
|
86
|
+
| "{"
|
|
87
|
+
| "}";
|
|
88
|
+
|
|
89
|
+
export type AgentlangTokenNames = AgentlangTerminalNames | AgentlangKeywordNames;
|
|
90
|
+
|
|
91
|
+
export type AttributeValueExpression = Expr;
|
|
92
|
+
|
|
93
|
+
export const AttributeValueExpression = 'AttributeValueExpression';
|
|
94
|
+
|
|
95
|
+
export function isAttributeValueExpression(item: unknown): item is AttributeValueExpression {
|
|
96
|
+
return reflection.isInstance(item, AttributeValueExpression);
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
export type Boolean = 'false' | 'true';
|
|
100
|
+
|
|
101
|
+
export function isBoolean(item: unknown): item is Boolean {
|
|
102
|
+
return item === 'true' || item === 'false';
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
export type Decimal = number;
|
|
106
|
+
|
|
107
|
+
export function isDecimal(item: unknown): item is Decimal {
|
|
108
|
+
return typeof item === 'number';
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
export type Definition = RelationshipDefinition | SchemaDefinition | StandaloneStatement | WorkflowDefinition;
|
|
112
|
+
|
|
113
|
+
export const Definition = 'Definition';
|
|
114
|
+
|
|
115
|
+
export function isDefinition(item: unknown): item is Definition {
|
|
116
|
+
return reflection.isInstance(item, Definition);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
export type Expr = BinExpr | PrimExpr;
|
|
120
|
+
|
|
121
|
+
export const Expr = 'Expr';
|
|
122
|
+
|
|
123
|
+
export function isExpr(item: unknown): item is Expr {
|
|
124
|
+
return reflection.isInstance(item, Expr);
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
export type PrimExpr = Group | Literal | NegExpr | NotExpr;
|
|
128
|
+
|
|
129
|
+
export const PrimExpr = 'PrimExpr';
|
|
130
|
+
|
|
131
|
+
export function isPrimExpr(item: unknown): item is PrimExpr {
|
|
132
|
+
return reflection.isInstance(item, PrimExpr);
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
export type QueryId = string;
|
|
136
|
+
|
|
137
|
+
export function isQueryId(item: unknown): item is QueryId {
|
|
138
|
+
return typeof item === 'string';
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
export type Ref = string;
|
|
142
|
+
|
|
143
|
+
export function isRef(item: unknown): item is Ref {
|
|
144
|
+
return typeof item === 'string';
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
export type SchemaDefinition = EntityDefinition | EventDefinition | RecordDefinition;
|
|
148
|
+
|
|
149
|
+
export const SchemaDefinition = 'SchemaDefinition';
|
|
150
|
+
|
|
151
|
+
export function isSchemaDefinition(item: unknown): item is SchemaDefinition {
|
|
152
|
+
return reflection.isInstance(item, SchemaDefinition);
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
export type TaggedId = string;
|
|
156
|
+
|
|
157
|
+
export function isTaggedId(item: unknown): item is TaggedId {
|
|
158
|
+
return typeof item === 'string';
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
export interface AfterTriggerDefinition extends langium.AstNode {
|
|
162
|
+
readonly $container: PrePostTriggerDefinition;
|
|
163
|
+
readonly $type: 'AfterTriggerDefinition';
|
|
164
|
+
triggers: TriggerDefinition;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
export const AfterTriggerDefinition = 'AfterTriggerDefinition';
|
|
168
|
+
|
|
169
|
+
export function isAfterTriggerDefinition(item: unknown): item is AfterTriggerDefinition {
|
|
170
|
+
return reflection.isInstance(item, AfterTriggerDefinition);
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
export interface AliasSpec extends langium.AstNode {
|
|
174
|
+
readonly $container: RuntimeHint;
|
|
175
|
+
readonly $type: 'AliasSpec';
|
|
176
|
+
alias?: string;
|
|
177
|
+
aliases: Array<string>;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
export const AliasSpec = 'AliasSpec';
|
|
181
|
+
|
|
182
|
+
export function isAliasSpec(item: unknown): item is AliasSpec {
|
|
183
|
+
return reflection.isInstance(item, AliasSpec);
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
export interface ArrayLiteral extends langium.AstNode {
|
|
187
|
+
readonly $container: Literal;
|
|
188
|
+
readonly $type: 'ArrayLiteral';
|
|
189
|
+
vals: Array<Statement>;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
export const ArrayLiteral = 'ArrayLiteral';
|
|
193
|
+
|
|
194
|
+
export function isArrayLiteral(item: unknown): item is ArrayLiteral {
|
|
195
|
+
return reflection.isInstance(item, ArrayLiteral);
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
export interface AsyncFnCall extends langium.AstNode {
|
|
199
|
+
readonly $container: Literal;
|
|
200
|
+
readonly $type: 'AsyncFnCall';
|
|
201
|
+
fnCall: FnCall;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
export const AsyncFnCall = 'AsyncFnCall';
|
|
205
|
+
|
|
206
|
+
export function isAsyncFnCall(item: unknown): item is AsyncFnCall {
|
|
207
|
+
return reflection.isInstance(item, AsyncFnCall);
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
export interface AttributeDefinition extends langium.AstNode {
|
|
211
|
+
readonly $container: RecordSchemaDefinition;
|
|
212
|
+
readonly $type: 'AttributeDefinition';
|
|
213
|
+
arrayType?: string;
|
|
214
|
+
enumSpec?: EnumSpec;
|
|
215
|
+
expr?: Expr;
|
|
216
|
+
name: string;
|
|
217
|
+
oneOfSpec?: OneOfSpec;
|
|
218
|
+
properties: Array<PropertyDefinition>;
|
|
219
|
+
refSpec?: RefSpec;
|
|
220
|
+
type?: string;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
export const AttributeDefinition = 'AttributeDefinition';
|
|
224
|
+
|
|
225
|
+
export function isAttributeDefinition(item: unknown): item is AttributeDefinition {
|
|
226
|
+
return reflection.isInstance(item, AttributeDefinition);
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
export interface BeforeTriggerDefinition extends langium.AstNode {
|
|
230
|
+
readonly $container: PrePostTriggerDefinition;
|
|
231
|
+
readonly $type: 'BeforeTriggerDefinition';
|
|
232
|
+
triggers: TriggerDefinition;
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
export const BeforeTriggerDefinition = 'BeforeTriggerDefinition';
|
|
236
|
+
|
|
237
|
+
export function isBeforeTriggerDefinition(item: unknown): item is BeforeTriggerDefinition {
|
|
238
|
+
return reflection.isInstance(item, BeforeTriggerDefinition);
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
export interface BinExpr extends langium.AstNode {
|
|
242
|
+
readonly $container: AttributeDefinition | BinExpr | Group | If | NegExpr | NotExpr | SetAttribute;
|
|
243
|
+
readonly $type: 'BinExpr';
|
|
244
|
+
e1: Expr | PrimExpr;
|
|
245
|
+
e2: Expr | PrimExpr;
|
|
246
|
+
op: '*' | '+' | '-' | '/' | '<' | '<=' | '<>' | '=' | '>' | '>=' | 'and' | 'in' | 'like' | 'or';
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
export const BinExpr = 'BinExpr';
|
|
250
|
+
|
|
251
|
+
export function isBinExpr(item: unknown): item is BinExpr {
|
|
252
|
+
return reflection.isInstance(item, BinExpr);
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
export interface CatchSpec extends langium.AstNode {
|
|
256
|
+
readonly $container: RuntimeHint;
|
|
257
|
+
readonly $type: 'CatchSpec';
|
|
258
|
+
handlers: Array<Handler>;
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
export const CatchSpec = 'CatchSpec';
|
|
262
|
+
|
|
263
|
+
export function isCatchSpec(item: unknown): item is CatchSpec {
|
|
264
|
+
return reflection.isInstance(item, CatchSpec);
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
export interface CompositeUniqueDefinition extends langium.AstNode {
|
|
268
|
+
readonly $container: RecordExtraDefinition;
|
|
269
|
+
readonly $type: 'CompositeUniqueDefinition';
|
|
270
|
+
attrs: Array<string>;
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
export const CompositeUniqueDefinition = 'CompositeUniqueDefinition';
|
|
274
|
+
|
|
275
|
+
export function isCompositeUniqueDefinition(item: unknown): item is CompositeUniqueDefinition {
|
|
276
|
+
return reflection.isInstance(item, CompositeUniqueDefinition);
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
export interface CrudMap extends langium.AstNode {
|
|
280
|
+
readonly $container: Pattern | Upsert;
|
|
281
|
+
readonly $type: 'CrudMap';
|
|
282
|
+
attributes: Array<SetAttribute>;
|
|
283
|
+
into?: SelectIntoSpec;
|
|
284
|
+
name: QueryId | string;
|
|
285
|
+
properties: Array<PropertyDefinition>;
|
|
286
|
+
relationships: Array<RelationshipPattern>;
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
export const CrudMap = 'CrudMap';
|
|
290
|
+
|
|
291
|
+
export function isCrudMap(item: unknown): item is CrudMap {
|
|
292
|
+
return reflection.isInstance(item, CrudMap);
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
export interface Delete extends langium.AstNode {
|
|
296
|
+
readonly $container: Pattern;
|
|
297
|
+
readonly $type: 'Delete';
|
|
298
|
+
pattern: Pattern;
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
export const Delete = 'Delete';
|
|
302
|
+
|
|
303
|
+
export function isDelete(item: unknown): item is Delete {
|
|
304
|
+
return reflection.isInstance(item, Delete);
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
export interface Else extends langium.AstNode {
|
|
308
|
+
readonly $container: If;
|
|
309
|
+
readonly $type: 'Else';
|
|
310
|
+
statements: Array<Statement>;
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
export const Else = 'Else';
|
|
314
|
+
|
|
315
|
+
export function isElse(item: unknown): item is Else {
|
|
316
|
+
return reflection.isInstance(item, Else);
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
export interface EntityDefinition extends langium.AstNode {
|
|
320
|
+
readonly $container: ModuleDefinition;
|
|
321
|
+
readonly $type: 'EntityDefinition';
|
|
322
|
+
extends?: ExtendsClause;
|
|
323
|
+
name: string;
|
|
324
|
+
schema: RecordSchemaDefinition;
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
export const EntityDefinition = 'EntityDefinition';
|
|
328
|
+
|
|
329
|
+
export function isEntityDefinition(item: unknown): item is EntityDefinition {
|
|
330
|
+
return reflection.isInstance(item, EntityDefinition);
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
export interface EnumSpec extends langium.AstNode {
|
|
334
|
+
readonly $container: AttributeDefinition;
|
|
335
|
+
readonly $type: 'EnumSpec';
|
|
336
|
+
values: Array<string>;
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
export const EnumSpec = 'EnumSpec';
|
|
340
|
+
|
|
341
|
+
export function isEnumSpec(item: unknown): item is EnumSpec {
|
|
342
|
+
return reflection.isInstance(item, EnumSpec);
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
export interface EventDefinition extends langium.AstNode {
|
|
346
|
+
readonly $container: ModuleDefinition;
|
|
347
|
+
readonly $type: 'EventDefinition';
|
|
348
|
+
extends?: ExtendsClause;
|
|
349
|
+
name: string;
|
|
350
|
+
schema: RecordSchemaDefinition;
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
export const EventDefinition = 'EventDefinition';
|
|
354
|
+
|
|
355
|
+
export function isEventDefinition(item: unknown): item is EventDefinition {
|
|
356
|
+
return reflection.isInstance(item, EventDefinition);
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
export interface ExtendsClause extends langium.AstNode {
|
|
360
|
+
readonly $container: EntityDefinition | EventDefinition | RecordDefinition;
|
|
361
|
+
readonly $type: 'ExtendsClause';
|
|
362
|
+
parentName: string;
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
export const ExtendsClause = 'ExtendsClause';
|
|
366
|
+
|
|
367
|
+
export function isExtendsClause(item: unknown): item is ExtendsClause {
|
|
368
|
+
return reflection.isInstance(item, ExtendsClause);
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
export interface FnCall extends langium.AstNode {
|
|
372
|
+
readonly $container: AsyncFnCall | Literal;
|
|
373
|
+
readonly $type: 'FnCall';
|
|
374
|
+
args: Array<Literal>;
|
|
375
|
+
name: Ref | string;
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
export const FnCall = 'FnCall';
|
|
379
|
+
|
|
380
|
+
export function isFnCall(item: unknown): item is FnCall {
|
|
381
|
+
return reflection.isInstance(item, FnCall);
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
export interface ForEach extends langium.AstNode {
|
|
385
|
+
readonly $container: Pattern;
|
|
386
|
+
readonly $type: 'ForEach';
|
|
387
|
+
src: Pattern;
|
|
388
|
+
statements: Array<Statement>;
|
|
389
|
+
var: string;
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
export const ForEach = 'ForEach';
|
|
393
|
+
|
|
394
|
+
export function isForEach(item: unknown): item is ForEach {
|
|
395
|
+
return reflection.isInstance(item, ForEach);
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
export interface FullTextSearch extends langium.AstNode {
|
|
399
|
+
readonly $container: Pattern;
|
|
400
|
+
readonly $type: 'FullTextSearch';
|
|
401
|
+
name: QueryId;
|
|
402
|
+
options?: MapLiteral;
|
|
403
|
+
query: Literal;
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
export const FullTextSearch = 'FullTextSearch';
|
|
407
|
+
|
|
408
|
+
export function isFullTextSearch(item: unknown): item is FullTextSearch {
|
|
409
|
+
return reflection.isInstance(item, FullTextSearch);
|
|
410
|
+
}
|
|
411
|
+
|
|
412
|
+
export interface Group extends langium.AstNode {
|
|
413
|
+
readonly $container: AttributeDefinition | BinExpr | Group | If | NegExpr | NotExpr | SetAttribute;
|
|
414
|
+
readonly $type: 'Group';
|
|
415
|
+
ge: Expr;
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
export const Group = 'Group';
|
|
419
|
+
|
|
420
|
+
export function isGroup(item: unknown): item is Group {
|
|
421
|
+
return reflection.isInstance(item, Group);
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
export interface Handler extends langium.AstNode {
|
|
425
|
+
readonly $container: CatchSpec;
|
|
426
|
+
readonly $type: 'Handler';
|
|
427
|
+
except: 'error' | 'not_found';
|
|
428
|
+
stmt: Statement;
|
|
429
|
+
}
|
|
430
|
+
|
|
431
|
+
export const Handler = 'Handler';
|
|
432
|
+
|
|
433
|
+
export function isHandler(item: unknown): item is Handler {
|
|
434
|
+
return reflection.isInstance(item, Handler);
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
export interface If extends langium.AstNode {
|
|
438
|
+
readonly $container: Pattern;
|
|
439
|
+
readonly $type: 'If';
|
|
440
|
+
cond: Expr;
|
|
441
|
+
else?: Else;
|
|
442
|
+
statements: Array<Statement>;
|
|
443
|
+
}
|
|
444
|
+
|
|
445
|
+
export const If = 'If';
|
|
446
|
+
|
|
447
|
+
export function isIf(item: unknown): item is If {
|
|
448
|
+
return reflection.isInstance(item, If);
|
|
449
|
+
}
|
|
450
|
+
|
|
451
|
+
export interface Import extends langium.AstNode {
|
|
452
|
+
readonly $container: ModuleDefinition;
|
|
453
|
+
readonly $type: 'Import';
|
|
454
|
+
name: string;
|
|
455
|
+
path: string;
|
|
456
|
+
}
|
|
457
|
+
|
|
458
|
+
export const Import = 'Import';
|
|
459
|
+
|
|
460
|
+
export function isImport(item: unknown): item is Import {
|
|
461
|
+
return reflection.isInstance(item, Import);
|
|
462
|
+
}
|
|
463
|
+
|
|
464
|
+
export interface KvPair extends langium.AstNode {
|
|
465
|
+
readonly $container: KvPairs;
|
|
466
|
+
readonly $type: 'KvPair';
|
|
467
|
+
key?: string;
|
|
468
|
+
value: Literal;
|
|
469
|
+
}
|
|
470
|
+
|
|
471
|
+
export const KvPair = 'KvPair';
|
|
472
|
+
|
|
473
|
+
export function isKvPair(item: unknown): item is KvPair {
|
|
474
|
+
return reflection.isInstance(item, KvPair);
|
|
475
|
+
}
|
|
476
|
+
|
|
477
|
+
export interface KvPairs extends langium.AstNode {
|
|
478
|
+
readonly $container: PropertyDefinition;
|
|
479
|
+
readonly $type: 'KvPairs';
|
|
480
|
+
pairs: Array<KvPair>;
|
|
481
|
+
}
|
|
482
|
+
|
|
483
|
+
export const KvPairs = 'KvPairs';
|
|
484
|
+
|
|
485
|
+
export function isKvPairs(item: unknown): item is KvPairs {
|
|
486
|
+
return reflection.isInstance(item, KvPairs);
|
|
487
|
+
}
|
|
488
|
+
|
|
489
|
+
export interface Literal extends langium.AstNode {
|
|
490
|
+
readonly $container: AttributeDefinition | BinExpr | FnCall | FullTextSearch | Group | If | KvPair | MapEntry | NegExpr | NotExpr | Pattern | SetAttribute;
|
|
491
|
+
readonly $type: 'Literal';
|
|
492
|
+
array?: ArrayLiteral;
|
|
493
|
+
asyncFnCall?: AsyncFnCall;
|
|
494
|
+
bool?: Boolean;
|
|
495
|
+
fnCall?: FnCall;
|
|
496
|
+
id?: string;
|
|
497
|
+
map?: MapLiteral;
|
|
498
|
+
num?: Decimal;
|
|
499
|
+
ref?: Ref;
|
|
500
|
+
str?: string;
|
|
501
|
+
}
|
|
502
|
+
|
|
503
|
+
export const Literal = 'Literal';
|
|
504
|
+
|
|
505
|
+
export function isLiteral(item: unknown): item is Literal {
|
|
506
|
+
return reflection.isInstance(item, Literal);
|
|
507
|
+
}
|
|
508
|
+
|
|
509
|
+
export interface MapEntry extends langium.AstNode {
|
|
510
|
+
readonly $container: MapLiteral;
|
|
511
|
+
readonly $type: 'MapEntry';
|
|
512
|
+
key: MapKey;
|
|
513
|
+
value: Literal;
|
|
514
|
+
}
|
|
515
|
+
|
|
516
|
+
export const MapEntry = 'MapEntry';
|
|
517
|
+
|
|
518
|
+
export function isMapEntry(item: unknown): item is MapEntry {
|
|
519
|
+
return reflection.isInstance(item, MapEntry);
|
|
520
|
+
}
|
|
521
|
+
|
|
522
|
+
export interface MapKey extends langium.AstNode {
|
|
523
|
+
readonly $container: MapEntry;
|
|
524
|
+
readonly $type: 'MapKey';
|
|
525
|
+
bool?: Boolean;
|
|
526
|
+
num?: Decimal;
|
|
527
|
+
str?: string;
|
|
528
|
+
}
|
|
529
|
+
|
|
530
|
+
export const MapKey = 'MapKey';
|
|
531
|
+
|
|
532
|
+
export function isMapKey(item: unknown): item is MapKey {
|
|
533
|
+
return reflection.isInstance(item, MapKey);
|
|
534
|
+
}
|
|
535
|
+
|
|
536
|
+
export interface MapLiteral extends langium.AstNode {
|
|
537
|
+
readonly $container: FullTextSearch | Literal | MetaDefinition;
|
|
538
|
+
readonly $type: 'MapLiteral';
|
|
539
|
+
entries: Array<MapEntry>;
|
|
540
|
+
}
|
|
541
|
+
|
|
542
|
+
export const MapLiteral = 'MapLiteral';
|
|
543
|
+
|
|
544
|
+
export function isMapLiteral(item: unknown): item is MapLiteral {
|
|
545
|
+
return reflection.isInstance(item, MapLiteral);
|
|
546
|
+
}
|
|
547
|
+
|
|
548
|
+
export interface MetaDefinition extends langium.AstNode {
|
|
549
|
+
readonly $container: RecordExtraDefinition;
|
|
550
|
+
readonly $type: 'MetaDefinition';
|
|
551
|
+
spec: MapLiteral;
|
|
552
|
+
}
|
|
553
|
+
|
|
554
|
+
export const MetaDefinition = 'MetaDefinition';
|
|
555
|
+
|
|
556
|
+
export function isMetaDefinition(item: unknown): item is MetaDefinition {
|
|
557
|
+
return reflection.isInstance(item, MetaDefinition);
|
|
558
|
+
}
|
|
559
|
+
|
|
560
|
+
export interface ModuleDefinition extends langium.AstNode {
|
|
561
|
+
readonly $type: 'ModuleDefinition';
|
|
562
|
+
defs: Array<Definition>;
|
|
563
|
+
imports: Array<Import>;
|
|
564
|
+
name: string;
|
|
565
|
+
}
|
|
566
|
+
|
|
567
|
+
export const ModuleDefinition = 'ModuleDefinition';
|
|
568
|
+
|
|
569
|
+
export function isModuleDefinition(item: unknown): item is ModuleDefinition {
|
|
570
|
+
return reflection.isInstance(item, ModuleDefinition);
|
|
571
|
+
}
|
|
572
|
+
|
|
573
|
+
export interface NegExpr extends langium.AstNode {
|
|
574
|
+
readonly $container: AttributeDefinition | BinExpr | Group | If | NegExpr | NotExpr | SetAttribute;
|
|
575
|
+
readonly $type: 'NegExpr';
|
|
576
|
+
ne: Expr;
|
|
577
|
+
}
|
|
578
|
+
|
|
579
|
+
export const NegExpr = 'NegExpr';
|
|
580
|
+
|
|
581
|
+
export function isNegExpr(item: unknown): item is NegExpr {
|
|
582
|
+
return reflection.isInstance(item, NegExpr);
|
|
583
|
+
}
|
|
584
|
+
|
|
585
|
+
export interface NodeDefinition extends langium.AstNode {
|
|
586
|
+
readonly $container: RelNodes;
|
|
587
|
+
readonly $type: 'NodeDefinition';
|
|
588
|
+
alias?: string;
|
|
589
|
+
name: string;
|
|
590
|
+
}
|
|
591
|
+
|
|
592
|
+
export const NodeDefinition = 'NodeDefinition';
|
|
593
|
+
|
|
594
|
+
export function isNodeDefinition(item: unknown): item is NodeDefinition {
|
|
595
|
+
return reflection.isInstance(item, NodeDefinition);
|
|
596
|
+
}
|
|
597
|
+
|
|
598
|
+
export interface NotExpr extends langium.AstNode {
|
|
599
|
+
readonly $container: AttributeDefinition | BinExpr | Group | If | NegExpr | NotExpr | SetAttribute;
|
|
600
|
+
readonly $type: 'NotExpr';
|
|
601
|
+
ne: Expr;
|
|
602
|
+
}
|
|
603
|
+
|
|
604
|
+
export const NotExpr = 'NotExpr';
|
|
605
|
+
|
|
606
|
+
export function isNotExpr(item: unknown): item is NotExpr {
|
|
607
|
+
return reflection.isInstance(item, NotExpr);
|
|
608
|
+
}
|
|
609
|
+
|
|
610
|
+
export interface OneOfSpec extends langium.AstNode {
|
|
611
|
+
readonly $container: AttributeDefinition;
|
|
612
|
+
readonly $type: 'OneOfSpec';
|
|
613
|
+
ref: Ref;
|
|
614
|
+
}
|
|
615
|
+
|
|
616
|
+
export const OneOfSpec = 'OneOfSpec';
|
|
617
|
+
|
|
618
|
+
export function isOneOfSpec(item: unknown): item is OneOfSpec {
|
|
619
|
+
return reflection.isInstance(item, OneOfSpec);
|
|
620
|
+
}
|
|
621
|
+
|
|
622
|
+
export interface Pattern extends langium.AstNode {
|
|
623
|
+
readonly $container: Delete | ForEach | Purge | RelationshipPattern | Statement;
|
|
624
|
+
readonly $type: 'Pattern';
|
|
625
|
+
crudMap?: CrudMap;
|
|
626
|
+
delete?: Delete;
|
|
627
|
+
forEach?: ForEach;
|
|
628
|
+
fullTextSearch?: FullTextSearch;
|
|
629
|
+
if?: If;
|
|
630
|
+
literal?: Literal;
|
|
631
|
+
purge?: Purge;
|
|
632
|
+
upsert?: Upsert;
|
|
633
|
+
}
|
|
634
|
+
|
|
635
|
+
export const Pattern = 'Pattern';
|
|
636
|
+
|
|
637
|
+
export function isPattern(item: unknown): item is Pattern {
|
|
638
|
+
return reflection.isInstance(item, Pattern);
|
|
639
|
+
}
|
|
640
|
+
|
|
641
|
+
export interface PrePostTriggerDefinition extends langium.AstNode {
|
|
642
|
+
readonly $container: RecordExtraDefinition;
|
|
643
|
+
readonly $type: 'PrePostTriggerDefinition';
|
|
644
|
+
after?: AfterTriggerDefinition;
|
|
645
|
+
before?: BeforeTriggerDefinition;
|
|
646
|
+
}
|
|
647
|
+
|
|
648
|
+
export const PrePostTriggerDefinition = 'PrePostTriggerDefinition';
|
|
649
|
+
|
|
650
|
+
export function isPrePostTriggerDefinition(item: unknown): item is PrePostTriggerDefinition {
|
|
651
|
+
return reflection.isInstance(item, PrePostTriggerDefinition);
|
|
652
|
+
}
|
|
653
|
+
|
|
654
|
+
export interface PropertyDefinition extends langium.AstNode {
|
|
655
|
+
readonly $container: AttributeDefinition | CrudMap | RelationshipDefinition;
|
|
656
|
+
readonly $type: 'PropertyDefinition';
|
|
657
|
+
name: TaggedId;
|
|
658
|
+
value?: KvPairs;
|
|
659
|
+
}
|
|
660
|
+
|
|
661
|
+
export const PropertyDefinition = 'PropertyDefinition';
|
|
662
|
+
|
|
663
|
+
export function isPropertyDefinition(item: unknown): item is PropertyDefinition {
|
|
664
|
+
return reflection.isInstance(item, PropertyDefinition);
|
|
665
|
+
}
|
|
666
|
+
|
|
667
|
+
export interface Purge extends langium.AstNode {
|
|
668
|
+
readonly $container: Pattern;
|
|
669
|
+
readonly $type: 'Purge';
|
|
670
|
+
pattern: Pattern;
|
|
671
|
+
}
|
|
672
|
+
|
|
673
|
+
export const Purge = 'Purge';
|
|
674
|
+
|
|
675
|
+
export function isPurge(item: unknown): item is Purge {
|
|
676
|
+
return reflection.isInstance(item, Purge);
|
|
677
|
+
}
|
|
678
|
+
|
|
679
|
+
export interface RbacAllowSpec extends langium.AstNode {
|
|
680
|
+
readonly $container: RbacSpecEntry;
|
|
681
|
+
readonly $type: 'RbacAllowSpec';
|
|
682
|
+
oprs: Array<RbacOpr>;
|
|
683
|
+
}
|
|
684
|
+
|
|
685
|
+
export const RbacAllowSpec = 'RbacAllowSpec';
|
|
686
|
+
|
|
687
|
+
export function isRbacAllowSpec(item: unknown): item is RbacAllowSpec {
|
|
688
|
+
return reflection.isInstance(item, RbacAllowSpec);
|
|
689
|
+
}
|
|
690
|
+
|
|
691
|
+
export interface RbacExpressionSpec extends langium.AstNode {
|
|
692
|
+
readonly $container: RbacSpecEntry;
|
|
693
|
+
readonly $type: 'RbacExpressionSpec';
|
|
694
|
+
lhs: Ref;
|
|
695
|
+
rhs: Ref;
|
|
696
|
+
}
|
|
697
|
+
|
|
698
|
+
export const RbacExpressionSpec = 'RbacExpressionSpec';
|
|
699
|
+
|
|
700
|
+
export function isRbacExpressionSpec(item: unknown): item is RbacExpressionSpec {
|
|
701
|
+
return reflection.isInstance(item, RbacExpressionSpec);
|
|
702
|
+
}
|
|
703
|
+
|
|
704
|
+
export interface RbacOpr extends langium.AstNode {
|
|
705
|
+
readonly $container: RbacAllowSpec;
|
|
706
|
+
readonly $type: 'RbacOpr';
|
|
707
|
+
value: 'create' | 'delete' | 'read' | 'update';
|
|
708
|
+
}
|
|
709
|
+
|
|
710
|
+
export const RbacOpr = 'RbacOpr';
|
|
711
|
+
|
|
712
|
+
export function isRbacOpr(item: unknown): item is RbacOpr {
|
|
713
|
+
return reflection.isInstance(item, RbacOpr);
|
|
714
|
+
}
|
|
715
|
+
|
|
716
|
+
export interface RbacRolesSpec extends langium.AstNode {
|
|
717
|
+
readonly $container: RbacSpecEntry;
|
|
718
|
+
readonly $type: 'RbacRolesSpec';
|
|
719
|
+
roles: Array<string>;
|
|
720
|
+
}
|
|
721
|
+
|
|
722
|
+
export const RbacRolesSpec = 'RbacRolesSpec';
|
|
723
|
+
|
|
724
|
+
export function isRbacRolesSpec(item: unknown): item is RbacRolesSpec {
|
|
725
|
+
return reflection.isInstance(item, RbacRolesSpec);
|
|
726
|
+
}
|
|
727
|
+
|
|
728
|
+
export interface RbacSpecDefinition extends langium.AstNode {
|
|
729
|
+
readonly $container: RecordExtraDefinition;
|
|
730
|
+
readonly $type: 'RbacSpecDefinition';
|
|
731
|
+
specEntries: Array<RbacSpecEntries>;
|
|
732
|
+
}
|
|
733
|
+
|
|
734
|
+
export const RbacSpecDefinition = 'RbacSpecDefinition';
|
|
735
|
+
|
|
736
|
+
export function isRbacSpecDefinition(item: unknown): item is RbacSpecDefinition {
|
|
737
|
+
return reflection.isInstance(item, RbacSpecDefinition);
|
|
738
|
+
}
|
|
739
|
+
|
|
740
|
+
export interface RbacSpecEntries extends langium.AstNode {
|
|
741
|
+
readonly $container: RbacSpecDefinition;
|
|
742
|
+
readonly $type: 'RbacSpecEntries';
|
|
743
|
+
entries: Array<RbacSpecEntry>;
|
|
744
|
+
}
|
|
745
|
+
|
|
746
|
+
export const RbacSpecEntries = 'RbacSpecEntries';
|
|
747
|
+
|
|
748
|
+
export function isRbacSpecEntries(item: unknown): item is RbacSpecEntries {
|
|
749
|
+
return reflection.isInstance(item, RbacSpecEntries);
|
|
750
|
+
}
|
|
751
|
+
|
|
752
|
+
export interface RbacSpecEntry extends langium.AstNode {
|
|
753
|
+
readonly $container: RbacSpecEntries;
|
|
754
|
+
readonly $type: 'RbacSpecEntry';
|
|
755
|
+
allow?: RbacAllowSpec;
|
|
756
|
+
expr?: RbacExpressionSpec;
|
|
757
|
+
role?: RbacRolesSpec;
|
|
758
|
+
}
|
|
759
|
+
|
|
760
|
+
export const RbacSpecEntry = 'RbacSpecEntry';
|
|
761
|
+
|
|
762
|
+
export function isRbacSpecEntry(item: unknown): item is RbacSpecEntry {
|
|
763
|
+
return reflection.isInstance(item, RbacSpecEntry);
|
|
764
|
+
}
|
|
765
|
+
|
|
766
|
+
export interface RecordDefinition extends langium.AstNode {
|
|
767
|
+
readonly $container: ModuleDefinition;
|
|
768
|
+
readonly $type: 'RecordDefinition';
|
|
769
|
+
extends?: ExtendsClause;
|
|
770
|
+
name: string;
|
|
771
|
+
schema: RecordSchemaDefinition;
|
|
772
|
+
}
|
|
773
|
+
|
|
774
|
+
export const RecordDefinition = 'RecordDefinition';
|
|
775
|
+
|
|
776
|
+
export function isRecordDefinition(item: unknown): item is RecordDefinition {
|
|
777
|
+
return reflection.isInstance(item, RecordDefinition);
|
|
778
|
+
}
|
|
779
|
+
|
|
780
|
+
export interface RecordExtraDefinition extends langium.AstNode {
|
|
781
|
+
readonly $container: RecordSchemaDefinition;
|
|
782
|
+
readonly $type: 'RecordExtraDefinition';
|
|
783
|
+
meta?: MetaDefinition;
|
|
784
|
+
prePost?: PrePostTriggerDefinition;
|
|
785
|
+
rbacSpec?: RbacSpecDefinition;
|
|
786
|
+
uq?: CompositeUniqueDefinition;
|
|
787
|
+
}
|
|
788
|
+
|
|
789
|
+
export const RecordExtraDefinition = 'RecordExtraDefinition';
|
|
790
|
+
|
|
791
|
+
export function isRecordExtraDefinition(item: unknown): item is RecordExtraDefinition {
|
|
792
|
+
return reflection.isInstance(item, RecordExtraDefinition);
|
|
793
|
+
}
|
|
794
|
+
|
|
795
|
+
export interface RecordSchemaDefinition extends langium.AstNode {
|
|
796
|
+
readonly $container: EntityDefinition | EventDefinition | RecordDefinition | RelationshipDefinition;
|
|
797
|
+
readonly $type: 'RecordSchemaDefinition';
|
|
798
|
+
attributes: Array<AttributeDefinition>;
|
|
799
|
+
extras: Array<RecordExtraDefinition>;
|
|
800
|
+
}
|
|
801
|
+
|
|
802
|
+
export const RecordSchemaDefinition = 'RecordSchemaDefinition';
|
|
803
|
+
|
|
804
|
+
export function isRecordSchemaDefinition(item: unknown): item is RecordSchemaDefinition {
|
|
805
|
+
return reflection.isInstance(item, RecordSchemaDefinition);
|
|
806
|
+
}
|
|
807
|
+
|
|
808
|
+
export interface RefSpec extends langium.AstNode {
|
|
809
|
+
readonly $container: AttributeDefinition;
|
|
810
|
+
readonly $type: 'RefSpec';
|
|
811
|
+
ref: string;
|
|
812
|
+
}
|
|
813
|
+
|
|
814
|
+
export const RefSpec = 'RefSpec';
|
|
815
|
+
|
|
816
|
+
export function isRefSpec(item: unknown): item is RefSpec {
|
|
817
|
+
return reflection.isInstance(item, RefSpec);
|
|
818
|
+
}
|
|
819
|
+
|
|
820
|
+
export interface RelationshipDefinition extends langium.AstNode {
|
|
821
|
+
readonly $container: ModuleDefinition;
|
|
822
|
+
readonly $type: 'RelationshipDefinition';
|
|
823
|
+
name: string;
|
|
824
|
+
nodes: RelNodes;
|
|
825
|
+
properties: Array<PropertyDefinition>;
|
|
826
|
+
schema?: RecordSchemaDefinition;
|
|
827
|
+
type: 'between' | 'contains';
|
|
828
|
+
}
|
|
829
|
+
|
|
830
|
+
export const RelationshipDefinition = 'RelationshipDefinition';
|
|
831
|
+
|
|
832
|
+
export function isRelationshipDefinition(item: unknown): item is RelationshipDefinition {
|
|
833
|
+
return reflection.isInstance(item, RelationshipDefinition);
|
|
834
|
+
}
|
|
835
|
+
|
|
836
|
+
export interface RelationshipPattern extends langium.AstNode {
|
|
837
|
+
readonly $container: CrudMap;
|
|
838
|
+
readonly $type: 'RelationshipPattern';
|
|
839
|
+
name: string;
|
|
840
|
+
pattern: Pattern;
|
|
841
|
+
}
|
|
842
|
+
|
|
843
|
+
export const RelationshipPattern = 'RelationshipPattern';
|
|
844
|
+
|
|
845
|
+
export function isRelationshipPattern(item: unknown): item is RelationshipPattern {
|
|
846
|
+
return reflection.isInstance(item, RelationshipPattern);
|
|
847
|
+
}
|
|
848
|
+
|
|
849
|
+
export interface RelNodes extends langium.AstNode {
|
|
850
|
+
readonly $container: RelationshipDefinition;
|
|
851
|
+
readonly $type: 'RelNodes';
|
|
852
|
+
node1: NodeDefinition;
|
|
853
|
+
node2: NodeDefinition;
|
|
854
|
+
}
|
|
855
|
+
|
|
856
|
+
export const RelNodes = 'RelNodes';
|
|
857
|
+
|
|
858
|
+
export function isRelNodes(item: unknown): item is RelNodes {
|
|
859
|
+
return reflection.isInstance(item, RelNodes);
|
|
860
|
+
}
|
|
861
|
+
|
|
862
|
+
export interface RuntimeHint extends langium.AstNode {
|
|
863
|
+
readonly $container: Statement;
|
|
864
|
+
readonly $type: 'RuntimeHint';
|
|
865
|
+
aliasSpec?: AliasSpec;
|
|
866
|
+
catchSpec?: CatchSpec;
|
|
867
|
+
}
|
|
868
|
+
|
|
869
|
+
export const RuntimeHint = 'RuntimeHint';
|
|
870
|
+
|
|
871
|
+
export function isRuntimeHint(item: unknown): item is RuntimeHint {
|
|
872
|
+
return reflection.isInstance(item, RuntimeHint);
|
|
873
|
+
}
|
|
874
|
+
|
|
875
|
+
export interface SelectIntoEntry extends langium.AstNode {
|
|
876
|
+
readonly $container: SelectIntoSpec;
|
|
877
|
+
readonly $type: 'SelectIntoEntry';
|
|
878
|
+
alias: string;
|
|
879
|
+
attribute: Ref;
|
|
880
|
+
}
|
|
881
|
+
|
|
882
|
+
export const SelectIntoEntry = 'SelectIntoEntry';
|
|
883
|
+
|
|
884
|
+
export function isSelectIntoEntry(item: unknown): item is SelectIntoEntry {
|
|
885
|
+
return reflection.isInstance(item, SelectIntoEntry);
|
|
886
|
+
}
|
|
887
|
+
|
|
888
|
+
export interface SelectIntoSpec extends langium.AstNode {
|
|
889
|
+
readonly $container: CrudMap;
|
|
890
|
+
readonly $type: 'SelectIntoSpec';
|
|
891
|
+
entries: Array<SelectIntoEntry>;
|
|
892
|
+
}
|
|
893
|
+
|
|
894
|
+
export const SelectIntoSpec = 'SelectIntoSpec';
|
|
895
|
+
|
|
896
|
+
export function isSelectIntoSpec(item: unknown): item is SelectIntoSpec {
|
|
897
|
+
return reflection.isInstance(item, SelectIntoSpec);
|
|
898
|
+
}
|
|
899
|
+
|
|
900
|
+
export interface SetAttribute extends langium.AstNode {
|
|
901
|
+
readonly $container: CrudMap;
|
|
902
|
+
readonly $type: 'SetAttribute';
|
|
903
|
+
name: QueryId;
|
|
904
|
+
op?: '<' | '<=' | '<>' | '=' | '>' | '>=' | 'between' | 'in' | 'like';
|
|
905
|
+
value: AttributeValueExpression;
|
|
906
|
+
}
|
|
907
|
+
|
|
908
|
+
export const SetAttribute = 'SetAttribute';
|
|
909
|
+
|
|
910
|
+
export function isSetAttribute(item: unknown): item is SetAttribute {
|
|
911
|
+
return reflection.isInstance(item, SetAttribute);
|
|
912
|
+
}
|
|
913
|
+
|
|
914
|
+
export interface StandaloneStatement extends langium.AstNode {
|
|
915
|
+
readonly $container: ModuleDefinition;
|
|
916
|
+
readonly $type: 'StandaloneStatement';
|
|
917
|
+
stmt: Statement;
|
|
918
|
+
}
|
|
919
|
+
|
|
920
|
+
export const StandaloneStatement = 'StandaloneStatement';
|
|
921
|
+
|
|
922
|
+
export function isStandaloneStatement(item: unknown): item is StandaloneStatement {
|
|
923
|
+
return reflection.isInstance(item, StandaloneStatement);
|
|
924
|
+
}
|
|
925
|
+
|
|
926
|
+
export interface Statement extends langium.AstNode {
|
|
927
|
+
readonly $container: ArrayLiteral | Else | ForEach | Handler | If | StandaloneStatement | WorkflowDefinition;
|
|
928
|
+
readonly $type: 'Statement';
|
|
929
|
+
hints: Array<RuntimeHint>;
|
|
930
|
+
pattern: Pattern;
|
|
931
|
+
}
|
|
932
|
+
|
|
933
|
+
export const Statement = 'Statement';
|
|
934
|
+
|
|
935
|
+
export function isStatement(item: unknown): item is Statement {
|
|
936
|
+
return reflection.isInstance(item, Statement);
|
|
937
|
+
}
|
|
938
|
+
|
|
939
|
+
export interface TriggerDefinition extends langium.AstNode {
|
|
940
|
+
readonly $container: AfterTriggerDefinition | BeforeTriggerDefinition;
|
|
941
|
+
readonly $type: 'TriggerDefinition';
|
|
942
|
+
entries: Array<TriggerEntry>;
|
|
943
|
+
}
|
|
944
|
+
|
|
945
|
+
export const TriggerDefinition = 'TriggerDefinition';
|
|
946
|
+
|
|
947
|
+
export function isTriggerDefinition(item: unknown): item is TriggerDefinition {
|
|
948
|
+
return reflection.isInstance(item, TriggerDefinition);
|
|
949
|
+
}
|
|
950
|
+
|
|
951
|
+
export interface TriggerEntry extends langium.AstNode {
|
|
952
|
+
readonly $container: TriggerDefinition;
|
|
953
|
+
readonly $type: 'TriggerEntry';
|
|
954
|
+
async?: '@async';
|
|
955
|
+
event: string;
|
|
956
|
+
on: 'create' | 'delete' | 'update';
|
|
957
|
+
}
|
|
958
|
+
|
|
959
|
+
export const TriggerEntry = 'TriggerEntry';
|
|
960
|
+
|
|
961
|
+
export function isTriggerEntry(item: unknown): item is TriggerEntry {
|
|
962
|
+
return reflection.isInstance(item, TriggerEntry);
|
|
963
|
+
}
|
|
964
|
+
|
|
965
|
+
export interface Upsert extends langium.AstNode {
|
|
966
|
+
readonly $container: Pattern;
|
|
967
|
+
readonly $type: 'Upsert';
|
|
968
|
+
pattern: CrudMap;
|
|
969
|
+
}
|
|
970
|
+
|
|
971
|
+
export const Upsert = 'Upsert';
|
|
972
|
+
|
|
973
|
+
export function isUpsert(item: unknown): item is Upsert {
|
|
974
|
+
return reflection.isInstance(item, Upsert);
|
|
975
|
+
}
|
|
976
|
+
|
|
977
|
+
export interface WorkflowDefinition extends langium.AstNode {
|
|
978
|
+
readonly $container: ModuleDefinition;
|
|
979
|
+
readonly $type: 'WorkflowDefinition';
|
|
980
|
+
name: string;
|
|
981
|
+
statements: Array<Statement>;
|
|
982
|
+
}
|
|
983
|
+
|
|
984
|
+
export const WorkflowDefinition = 'WorkflowDefinition';
|
|
985
|
+
|
|
986
|
+
export function isWorkflowDefinition(item: unknown): item is WorkflowDefinition {
|
|
987
|
+
return reflection.isInstance(item, WorkflowDefinition);
|
|
988
|
+
}
|
|
989
|
+
|
|
990
|
+
export type AgentlangAstType = {
|
|
991
|
+
AfterTriggerDefinition: AfterTriggerDefinition
|
|
992
|
+
AliasSpec: AliasSpec
|
|
993
|
+
ArrayLiteral: ArrayLiteral
|
|
994
|
+
AsyncFnCall: AsyncFnCall
|
|
995
|
+
AttributeDefinition: AttributeDefinition
|
|
996
|
+
AttributeValueExpression: AttributeValueExpression
|
|
997
|
+
BeforeTriggerDefinition: BeforeTriggerDefinition
|
|
998
|
+
BinExpr: BinExpr
|
|
999
|
+
CatchSpec: CatchSpec
|
|
1000
|
+
CompositeUniqueDefinition: CompositeUniqueDefinition
|
|
1001
|
+
CrudMap: CrudMap
|
|
1002
|
+
Definition: Definition
|
|
1003
|
+
Delete: Delete
|
|
1004
|
+
Else: Else
|
|
1005
|
+
EntityDefinition: EntityDefinition
|
|
1006
|
+
EnumSpec: EnumSpec
|
|
1007
|
+
EventDefinition: EventDefinition
|
|
1008
|
+
Expr: Expr
|
|
1009
|
+
ExtendsClause: ExtendsClause
|
|
1010
|
+
FnCall: FnCall
|
|
1011
|
+
ForEach: ForEach
|
|
1012
|
+
FullTextSearch: FullTextSearch
|
|
1013
|
+
Group: Group
|
|
1014
|
+
Handler: Handler
|
|
1015
|
+
If: If
|
|
1016
|
+
Import: Import
|
|
1017
|
+
KvPair: KvPair
|
|
1018
|
+
KvPairs: KvPairs
|
|
1019
|
+
Literal: Literal
|
|
1020
|
+
MapEntry: MapEntry
|
|
1021
|
+
MapKey: MapKey
|
|
1022
|
+
MapLiteral: MapLiteral
|
|
1023
|
+
MetaDefinition: MetaDefinition
|
|
1024
|
+
ModuleDefinition: ModuleDefinition
|
|
1025
|
+
NegExpr: NegExpr
|
|
1026
|
+
NodeDefinition: NodeDefinition
|
|
1027
|
+
NotExpr: NotExpr
|
|
1028
|
+
OneOfSpec: OneOfSpec
|
|
1029
|
+
Pattern: Pattern
|
|
1030
|
+
PrePostTriggerDefinition: PrePostTriggerDefinition
|
|
1031
|
+
PrimExpr: PrimExpr
|
|
1032
|
+
PropertyDefinition: PropertyDefinition
|
|
1033
|
+
Purge: Purge
|
|
1034
|
+
RbacAllowSpec: RbacAllowSpec
|
|
1035
|
+
RbacExpressionSpec: RbacExpressionSpec
|
|
1036
|
+
RbacOpr: RbacOpr
|
|
1037
|
+
RbacRolesSpec: RbacRolesSpec
|
|
1038
|
+
RbacSpecDefinition: RbacSpecDefinition
|
|
1039
|
+
RbacSpecEntries: RbacSpecEntries
|
|
1040
|
+
RbacSpecEntry: RbacSpecEntry
|
|
1041
|
+
RecordDefinition: RecordDefinition
|
|
1042
|
+
RecordExtraDefinition: RecordExtraDefinition
|
|
1043
|
+
RecordSchemaDefinition: RecordSchemaDefinition
|
|
1044
|
+
RefSpec: RefSpec
|
|
1045
|
+
RelNodes: RelNodes
|
|
1046
|
+
RelationshipDefinition: RelationshipDefinition
|
|
1047
|
+
RelationshipPattern: RelationshipPattern
|
|
1048
|
+
RuntimeHint: RuntimeHint
|
|
1049
|
+
SchemaDefinition: SchemaDefinition
|
|
1050
|
+
SelectIntoEntry: SelectIntoEntry
|
|
1051
|
+
SelectIntoSpec: SelectIntoSpec
|
|
1052
|
+
SetAttribute: SetAttribute
|
|
1053
|
+
StandaloneStatement: StandaloneStatement
|
|
1054
|
+
Statement: Statement
|
|
1055
|
+
TriggerDefinition: TriggerDefinition
|
|
1056
|
+
TriggerEntry: TriggerEntry
|
|
1057
|
+
Upsert: Upsert
|
|
1058
|
+
WorkflowDefinition: WorkflowDefinition
|
|
1059
|
+
}
|
|
1060
|
+
|
|
1061
|
+
export class AgentlangAstReflection extends langium.AbstractAstReflection {
|
|
1062
|
+
|
|
1063
|
+
getAllTypes(): string[] {
|
|
1064
|
+
return [AfterTriggerDefinition, AliasSpec, ArrayLiteral, AsyncFnCall, AttributeDefinition, AttributeValueExpression, BeforeTriggerDefinition, BinExpr, CatchSpec, CompositeUniqueDefinition, CrudMap, Definition, Delete, Else, EntityDefinition, EnumSpec, EventDefinition, Expr, ExtendsClause, FnCall, ForEach, FullTextSearch, Group, Handler, If, Import, KvPair, KvPairs, Literal, MapEntry, MapKey, MapLiteral, MetaDefinition, ModuleDefinition, NegExpr, NodeDefinition, NotExpr, OneOfSpec, Pattern, PrePostTriggerDefinition, PrimExpr, PropertyDefinition, Purge, RbacAllowSpec, RbacExpressionSpec, RbacOpr, RbacRolesSpec, RbacSpecDefinition, RbacSpecEntries, RbacSpecEntry, RecordDefinition, RecordExtraDefinition, RecordSchemaDefinition, RefSpec, RelNodes, RelationshipDefinition, RelationshipPattern, RuntimeHint, SchemaDefinition, SelectIntoEntry, SelectIntoSpec, SetAttribute, StandaloneStatement, Statement, TriggerDefinition, TriggerEntry, Upsert, WorkflowDefinition];
|
|
1065
|
+
}
|
|
1066
|
+
|
|
1067
|
+
protected override computeIsSubtype(subtype: string, supertype: string): boolean {
|
|
1068
|
+
switch (subtype) {
|
|
1069
|
+
case BinExpr:
|
|
1070
|
+
case PrimExpr: {
|
|
1071
|
+
return this.isSubtype(Expr, supertype);
|
|
1072
|
+
}
|
|
1073
|
+
case EntityDefinition:
|
|
1074
|
+
case EventDefinition:
|
|
1075
|
+
case RecordDefinition: {
|
|
1076
|
+
return this.isSubtype(SchemaDefinition, supertype);
|
|
1077
|
+
}
|
|
1078
|
+
case Expr: {
|
|
1079
|
+
return this.isSubtype(AttributeValueExpression, supertype);
|
|
1080
|
+
}
|
|
1081
|
+
case Group:
|
|
1082
|
+
case Literal:
|
|
1083
|
+
case NegExpr:
|
|
1084
|
+
case NotExpr: {
|
|
1085
|
+
return this.isSubtype(PrimExpr, supertype);
|
|
1086
|
+
}
|
|
1087
|
+
case RelationshipDefinition:
|
|
1088
|
+
case SchemaDefinition:
|
|
1089
|
+
case StandaloneStatement:
|
|
1090
|
+
case WorkflowDefinition: {
|
|
1091
|
+
return this.isSubtype(Definition, supertype);
|
|
1092
|
+
}
|
|
1093
|
+
default: {
|
|
1094
|
+
return false;
|
|
1095
|
+
}
|
|
1096
|
+
}
|
|
1097
|
+
}
|
|
1098
|
+
|
|
1099
|
+
getReferenceType(refInfo: langium.ReferenceInfo): string {
|
|
1100
|
+
const referenceId = `${refInfo.container.$type}:${refInfo.property}`;
|
|
1101
|
+
switch (referenceId) {
|
|
1102
|
+
default: {
|
|
1103
|
+
throw new Error(`${referenceId} is not a valid reference id.`);
|
|
1104
|
+
}
|
|
1105
|
+
}
|
|
1106
|
+
}
|
|
1107
|
+
|
|
1108
|
+
getTypeMetaData(type: string): langium.TypeMetaData {
|
|
1109
|
+
switch (type) {
|
|
1110
|
+
case AfterTriggerDefinition: {
|
|
1111
|
+
return {
|
|
1112
|
+
name: AfterTriggerDefinition,
|
|
1113
|
+
properties: [
|
|
1114
|
+
{ name: 'triggers' }
|
|
1115
|
+
]
|
|
1116
|
+
};
|
|
1117
|
+
}
|
|
1118
|
+
case AliasSpec: {
|
|
1119
|
+
return {
|
|
1120
|
+
name: AliasSpec,
|
|
1121
|
+
properties: [
|
|
1122
|
+
{ name: 'alias' },
|
|
1123
|
+
{ name: 'aliases', defaultValue: [] }
|
|
1124
|
+
]
|
|
1125
|
+
};
|
|
1126
|
+
}
|
|
1127
|
+
case ArrayLiteral: {
|
|
1128
|
+
return {
|
|
1129
|
+
name: ArrayLiteral,
|
|
1130
|
+
properties: [
|
|
1131
|
+
{ name: 'vals', defaultValue: [] }
|
|
1132
|
+
]
|
|
1133
|
+
};
|
|
1134
|
+
}
|
|
1135
|
+
case AsyncFnCall: {
|
|
1136
|
+
return {
|
|
1137
|
+
name: AsyncFnCall,
|
|
1138
|
+
properties: [
|
|
1139
|
+
{ name: 'fnCall' }
|
|
1140
|
+
]
|
|
1141
|
+
};
|
|
1142
|
+
}
|
|
1143
|
+
case AttributeDefinition: {
|
|
1144
|
+
return {
|
|
1145
|
+
name: AttributeDefinition,
|
|
1146
|
+
properties: [
|
|
1147
|
+
{ name: 'arrayType' },
|
|
1148
|
+
{ name: 'enumSpec' },
|
|
1149
|
+
{ name: 'expr' },
|
|
1150
|
+
{ name: 'name' },
|
|
1151
|
+
{ name: 'oneOfSpec' },
|
|
1152
|
+
{ name: 'properties', defaultValue: [] },
|
|
1153
|
+
{ name: 'refSpec' },
|
|
1154
|
+
{ name: 'type' }
|
|
1155
|
+
]
|
|
1156
|
+
};
|
|
1157
|
+
}
|
|
1158
|
+
case BeforeTriggerDefinition: {
|
|
1159
|
+
return {
|
|
1160
|
+
name: BeforeTriggerDefinition,
|
|
1161
|
+
properties: [
|
|
1162
|
+
{ name: 'triggers' }
|
|
1163
|
+
]
|
|
1164
|
+
};
|
|
1165
|
+
}
|
|
1166
|
+
case BinExpr: {
|
|
1167
|
+
return {
|
|
1168
|
+
name: BinExpr,
|
|
1169
|
+
properties: [
|
|
1170
|
+
{ name: 'e1' },
|
|
1171
|
+
{ name: 'e2' },
|
|
1172
|
+
{ name: 'op' }
|
|
1173
|
+
]
|
|
1174
|
+
};
|
|
1175
|
+
}
|
|
1176
|
+
case CatchSpec: {
|
|
1177
|
+
return {
|
|
1178
|
+
name: CatchSpec,
|
|
1179
|
+
properties: [
|
|
1180
|
+
{ name: 'handlers', defaultValue: [] }
|
|
1181
|
+
]
|
|
1182
|
+
};
|
|
1183
|
+
}
|
|
1184
|
+
case CompositeUniqueDefinition: {
|
|
1185
|
+
return {
|
|
1186
|
+
name: CompositeUniqueDefinition,
|
|
1187
|
+
properties: [
|
|
1188
|
+
{ name: 'attrs', defaultValue: [] }
|
|
1189
|
+
]
|
|
1190
|
+
};
|
|
1191
|
+
}
|
|
1192
|
+
case CrudMap: {
|
|
1193
|
+
return {
|
|
1194
|
+
name: CrudMap,
|
|
1195
|
+
properties: [
|
|
1196
|
+
{ name: 'attributes', defaultValue: [] },
|
|
1197
|
+
{ name: 'into' },
|
|
1198
|
+
{ name: 'name' },
|
|
1199
|
+
{ name: 'properties', defaultValue: [] },
|
|
1200
|
+
{ name: 'relationships', defaultValue: [] }
|
|
1201
|
+
]
|
|
1202
|
+
};
|
|
1203
|
+
}
|
|
1204
|
+
case Delete: {
|
|
1205
|
+
return {
|
|
1206
|
+
name: Delete,
|
|
1207
|
+
properties: [
|
|
1208
|
+
{ name: 'pattern' }
|
|
1209
|
+
]
|
|
1210
|
+
};
|
|
1211
|
+
}
|
|
1212
|
+
case Else: {
|
|
1213
|
+
return {
|
|
1214
|
+
name: Else,
|
|
1215
|
+
properties: [
|
|
1216
|
+
{ name: 'statements', defaultValue: [] }
|
|
1217
|
+
]
|
|
1218
|
+
};
|
|
1219
|
+
}
|
|
1220
|
+
case EntityDefinition: {
|
|
1221
|
+
return {
|
|
1222
|
+
name: EntityDefinition,
|
|
1223
|
+
properties: [
|
|
1224
|
+
{ name: 'extends' },
|
|
1225
|
+
{ name: 'name' },
|
|
1226
|
+
{ name: 'schema' }
|
|
1227
|
+
]
|
|
1228
|
+
};
|
|
1229
|
+
}
|
|
1230
|
+
case EnumSpec: {
|
|
1231
|
+
return {
|
|
1232
|
+
name: EnumSpec,
|
|
1233
|
+
properties: [
|
|
1234
|
+
{ name: 'values', defaultValue: [] }
|
|
1235
|
+
]
|
|
1236
|
+
};
|
|
1237
|
+
}
|
|
1238
|
+
case EventDefinition: {
|
|
1239
|
+
return {
|
|
1240
|
+
name: EventDefinition,
|
|
1241
|
+
properties: [
|
|
1242
|
+
{ name: 'extends' },
|
|
1243
|
+
{ name: 'name' },
|
|
1244
|
+
{ name: 'schema' }
|
|
1245
|
+
]
|
|
1246
|
+
};
|
|
1247
|
+
}
|
|
1248
|
+
case ExtendsClause: {
|
|
1249
|
+
return {
|
|
1250
|
+
name: ExtendsClause,
|
|
1251
|
+
properties: [
|
|
1252
|
+
{ name: 'parentName' }
|
|
1253
|
+
]
|
|
1254
|
+
};
|
|
1255
|
+
}
|
|
1256
|
+
case FnCall: {
|
|
1257
|
+
return {
|
|
1258
|
+
name: FnCall,
|
|
1259
|
+
properties: [
|
|
1260
|
+
{ name: 'args', defaultValue: [] },
|
|
1261
|
+
{ name: 'name' }
|
|
1262
|
+
]
|
|
1263
|
+
};
|
|
1264
|
+
}
|
|
1265
|
+
case ForEach: {
|
|
1266
|
+
return {
|
|
1267
|
+
name: ForEach,
|
|
1268
|
+
properties: [
|
|
1269
|
+
{ name: 'src' },
|
|
1270
|
+
{ name: 'statements', defaultValue: [] },
|
|
1271
|
+
{ name: 'var' }
|
|
1272
|
+
]
|
|
1273
|
+
};
|
|
1274
|
+
}
|
|
1275
|
+
case FullTextSearch: {
|
|
1276
|
+
return {
|
|
1277
|
+
name: FullTextSearch,
|
|
1278
|
+
properties: [
|
|
1279
|
+
{ name: 'name' },
|
|
1280
|
+
{ name: 'options' },
|
|
1281
|
+
{ name: 'query' }
|
|
1282
|
+
]
|
|
1283
|
+
};
|
|
1284
|
+
}
|
|
1285
|
+
case Group: {
|
|
1286
|
+
return {
|
|
1287
|
+
name: Group,
|
|
1288
|
+
properties: [
|
|
1289
|
+
{ name: 'ge' }
|
|
1290
|
+
]
|
|
1291
|
+
};
|
|
1292
|
+
}
|
|
1293
|
+
case Handler: {
|
|
1294
|
+
return {
|
|
1295
|
+
name: Handler,
|
|
1296
|
+
properties: [
|
|
1297
|
+
{ name: 'except' },
|
|
1298
|
+
{ name: 'stmt' }
|
|
1299
|
+
]
|
|
1300
|
+
};
|
|
1301
|
+
}
|
|
1302
|
+
case If: {
|
|
1303
|
+
return {
|
|
1304
|
+
name: If,
|
|
1305
|
+
properties: [
|
|
1306
|
+
{ name: 'cond' },
|
|
1307
|
+
{ name: 'else' },
|
|
1308
|
+
{ name: 'statements', defaultValue: [] }
|
|
1309
|
+
]
|
|
1310
|
+
};
|
|
1311
|
+
}
|
|
1312
|
+
case Import: {
|
|
1313
|
+
return {
|
|
1314
|
+
name: Import,
|
|
1315
|
+
properties: [
|
|
1316
|
+
{ name: 'name' },
|
|
1317
|
+
{ name: 'path' }
|
|
1318
|
+
]
|
|
1319
|
+
};
|
|
1320
|
+
}
|
|
1321
|
+
case KvPair: {
|
|
1322
|
+
return {
|
|
1323
|
+
name: KvPair,
|
|
1324
|
+
properties: [
|
|
1325
|
+
{ name: 'key' },
|
|
1326
|
+
{ name: 'value' }
|
|
1327
|
+
]
|
|
1328
|
+
};
|
|
1329
|
+
}
|
|
1330
|
+
case KvPairs: {
|
|
1331
|
+
return {
|
|
1332
|
+
name: KvPairs,
|
|
1333
|
+
properties: [
|
|
1334
|
+
{ name: 'pairs', defaultValue: [] }
|
|
1335
|
+
]
|
|
1336
|
+
};
|
|
1337
|
+
}
|
|
1338
|
+
case Literal: {
|
|
1339
|
+
return {
|
|
1340
|
+
name: Literal,
|
|
1341
|
+
properties: [
|
|
1342
|
+
{ name: 'array' },
|
|
1343
|
+
{ name: 'asyncFnCall' },
|
|
1344
|
+
{ name: 'bool' },
|
|
1345
|
+
{ name: 'fnCall' },
|
|
1346
|
+
{ name: 'id' },
|
|
1347
|
+
{ name: 'map' },
|
|
1348
|
+
{ name: 'num' },
|
|
1349
|
+
{ name: 'ref' },
|
|
1350
|
+
{ name: 'str' }
|
|
1351
|
+
]
|
|
1352
|
+
};
|
|
1353
|
+
}
|
|
1354
|
+
case MapEntry: {
|
|
1355
|
+
return {
|
|
1356
|
+
name: MapEntry,
|
|
1357
|
+
properties: [
|
|
1358
|
+
{ name: 'key' },
|
|
1359
|
+
{ name: 'value' }
|
|
1360
|
+
]
|
|
1361
|
+
};
|
|
1362
|
+
}
|
|
1363
|
+
case MapKey: {
|
|
1364
|
+
return {
|
|
1365
|
+
name: MapKey,
|
|
1366
|
+
properties: [
|
|
1367
|
+
{ name: 'bool' },
|
|
1368
|
+
{ name: 'num' },
|
|
1369
|
+
{ name: 'str' }
|
|
1370
|
+
]
|
|
1371
|
+
};
|
|
1372
|
+
}
|
|
1373
|
+
case MapLiteral: {
|
|
1374
|
+
return {
|
|
1375
|
+
name: MapLiteral,
|
|
1376
|
+
properties: [
|
|
1377
|
+
{ name: 'entries', defaultValue: [] }
|
|
1378
|
+
]
|
|
1379
|
+
};
|
|
1380
|
+
}
|
|
1381
|
+
case MetaDefinition: {
|
|
1382
|
+
return {
|
|
1383
|
+
name: MetaDefinition,
|
|
1384
|
+
properties: [
|
|
1385
|
+
{ name: 'spec' }
|
|
1386
|
+
]
|
|
1387
|
+
};
|
|
1388
|
+
}
|
|
1389
|
+
case ModuleDefinition: {
|
|
1390
|
+
return {
|
|
1391
|
+
name: ModuleDefinition,
|
|
1392
|
+
properties: [
|
|
1393
|
+
{ name: 'defs', defaultValue: [] },
|
|
1394
|
+
{ name: 'imports', defaultValue: [] },
|
|
1395
|
+
{ name: 'name' }
|
|
1396
|
+
]
|
|
1397
|
+
};
|
|
1398
|
+
}
|
|
1399
|
+
case NegExpr: {
|
|
1400
|
+
return {
|
|
1401
|
+
name: NegExpr,
|
|
1402
|
+
properties: [
|
|
1403
|
+
{ name: 'ne' }
|
|
1404
|
+
]
|
|
1405
|
+
};
|
|
1406
|
+
}
|
|
1407
|
+
case NodeDefinition: {
|
|
1408
|
+
return {
|
|
1409
|
+
name: NodeDefinition,
|
|
1410
|
+
properties: [
|
|
1411
|
+
{ name: 'alias' },
|
|
1412
|
+
{ name: 'name' }
|
|
1413
|
+
]
|
|
1414
|
+
};
|
|
1415
|
+
}
|
|
1416
|
+
case NotExpr: {
|
|
1417
|
+
return {
|
|
1418
|
+
name: NotExpr,
|
|
1419
|
+
properties: [
|
|
1420
|
+
{ name: 'ne' }
|
|
1421
|
+
]
|
|
1422
|
+
};
|
|
1423
|
+
}
|
|
1424
|
+
case OneOfSpec: {
|
|
1425
|
+
return {
|
|
1426
|
+
name: OneOfSpec,
|
|
1427
|
+
properties: [
|
|
1428
|
+
{ name: 'ref' }
|
|
1429
|
+
]
|
|
1430
|
+
};
|
|
1431
|
+
}
|
|
1432
|
+
case Pattern: {
|
|
1433
|
+
return {
|
|
1434
|
+
name: Pattern,
|
|
1435
|
+
properties: [
|
|
1436
|
+
{ name: 'crudMap' },
|
|
1437
|
+
{ name: 'delete' },
|
|
1438
|
+
{ name: 'forEach' },
|
|
1439
|
+
{ name: 'fullTextSearch' },
|
|
1440
|
+
{ name: 'if' },
|
|
1441
|
+
{ name: 'literal' },
|
|
1442
|
+
{ name: 'purge' },
|
|
1443
|
+
{ name: 'upsert' }
|
|
1444
|
+
]
|
|
1445
|
+
};
|
|
1446
|
+
}
|
|
1447
|
+
case PrePostTriggerDefinition: {
|
|
1448
|
+
return {
|
|
1449
|
+
name: PrePostTriggerDefinition,
|
|
1450
|
+
properties: [
|
|
1451
|
+
{ name: 'after' },
|
|
1452
|
+
{ name: 'before' }
|
|
1453
|
+
]
|
|
1454
|
+
};
|
|
1455
|
+
}
|
|
1456
|
+
case PropertyDefinition: {
|
|
1457
|
+
return {
|
|
1458
|
+
name: PropertyDefinition,
|
|
1459
|
+
properties: [
|
|
1460
|
+
{ name: 'name' },
|
|
1461
|
+
{ name: 'value' }
|
|
1462
|
+
]
|
|
1463
|
+
};
|
|
1464
|
+
}
|
|
1465
|
+
case Purge: {
|
|
1466
|
+
return {
|
|
1467
|
+
name: Purge,
|
|
1468
|
+
properties: [
|
|
1469
|
+
{ name: 'pattern' }
|
|
1470
|
+
]
|
|
1471
|
+
};
|
|
1472
|
+
}
|
|
1473
|
+
case RbacAllowSpec: {
|
|
1474
|
+
return {
|
|
1475
|
+
name: RbacAllowSpec,
|
|
1476
|
+
properties: [
|
|
1477
|
+
{ name: 'oprs', defaultValue: [] }
|
|
1478
|
+
]
|
|
1479
|
+
};
|
|
1480
|
+
}
|
|
1481
|
+
case RbacExpressionSpec: {
|
|
1482
|
+
return {
|
|
1483
|
+
name: RbacExpressionSpec,
|
|
1484
|
+
properties: [
|
|
1485
|
+
{ name: 'lhs' },
|
|
1486
|
+
{ name: 'rhs' }
|
|
1487
|
+
]
|
|
1488
|
+
};
|
|
1489
|
+
}
|
|
1490
|
+
case RbacOpr: {
|
|
1491
|
+
return {
|
|
1492
|
+
name: RbacOpr,
|
|
1493
|
+
properties: [
|
|
1494
|
+
{ name: 'value' }
|
|
1495
|
+
]
|
|
1496
|
+
};
|
|
1497
|
+
}
|
|
1498
|
+
case RbacRolesSpec: {
|
|
1499
|
+
return {
|
|
1500
|
+
name: RbacRolesSpec,
|
|
1501
|
+
properties: [
|
|
1502
|
+
{ name: 'roles', defaultValue: [] }
|
|
1503
|
+
]
|
|
1504
|
+
};
|
|
1505
|
+
}
|
|
1506
|
+
case RbacSpecDefinition: {
|
|
1507
|
+
return {
|
|
1508
|
+
name: RbacSpecDefinition,
|
|
1509
|
+
properties: [
|
|
1510
|
+
{ name: 'specEntries', defaultValue: [] }
|
|
1511
|
+
]
|
|
1512
|
+
};
|
|
1513
|
+
}
|
|
1514
|
+
case RbacSpecEntries: {
|
|
1515
|
+
return {
|
|
1516
|
+
name: RbacSpecEntries,
|
|
1517
|
+
properties: [
|
|
1518
|
+
{ name: 'entries', defaultValue: [] }
|
|
1519
|
+
]
|
|
1520
|
+
};
|
|
1521
|
+
}
|
|
1522
|
+
case RbacSpecEntry: {
|
|
1523
|
+
return {
|
|
1524
|
+
name: RbacSpecEntry,
|
|
1525
|
+
properties: [
|
|
1526
|
+
{ name: 'allow' },
|
|
1527
|
+
{ name: 'expr' },
|
|
1528
|
+
{ name: 'role' }
|
|
1529
|
+
]
|
|
1530
|
+
};
|
|
1531
|
+
}
|
|
1532
|
+
case RecordDefinition: {
|
|
1533
|
+
return {
|
|
1534
|
+
name: RecordDefinition,
|
|
1535
|
+
properties: [
|
|
1536
|
+
{ name: 'extends' },
|
|
1537
|
+
{ name: 'name' },
|
|
1538
|
+
{ name: 'schema' }
|
|
1539
|
+
]
|
|
1540
|
+
};
|
|
1541
|
+
}
|
|
1542
|
+
case RecordExtraDefinition: {
|
|
1543
|
+
return {
|
|
1544
|
+
name: RecordExtraDefinition,
|
|
1545
|
+
properties: [
|
|
1546
|
+
{ name: 'meta' },
|
|
1547
|
+
{ name: 'prePost' },
|
|
1548
|
+
{ name: 'rbacSpec' },
|
|
1549
|
+
{ name: 'uq' }
|
|
1550
|
+
]
|
|
1551
|
+
};
|
|
1552
|
+
}
|
|
1553
|
+
case RecordSchemaDefinition: {
|
|
1554
|
+
return {
|
|
1555
|
+
name: RecordSchemaDefinition,
|
|
1556
|
+
properties: [
|
|
1557
|
+
{ name: 'attributes', defaultValue: [] },
|
|
1558
|
+
{ name: 'extras', defaultValue: [] }
|
|
1559
|
+
]
|
|
1560
|
+
};
|
|
1561
|
+
}
|
|
1562
|
+
case RefSpec: {
|
|
1563
|
+
return {
|
|
1564
|
+
name: RefSpec,
|
|
1565
|
+
properties: [
|
|
1566
|
+
{ name: 'ref' }
|
|
1567
|
+
]
|
|
1568
|
+
};
|
|
1569
|
+
}
|
|
1570
|
+
case RelationshipDefinition: {
|
|
1571
|
+
return {
|
|
1572
|
+
name: RelationshipDefinition,
|
|
1573
|
+
properties: [
|
|
1574
|
+
{ name: 'name' },
|
|
1575
|
+
{ name: 'nodes' },
|
|
1576
|
+
{ name: 'properties', defaultValue: [] },
|
|
1577
|
+
{ name: 'schema' },
|
|
1578
|
+
{ name: 'type' }
|
|
1579
|
+
]
|
|
1580
|
+
};
|
|
1581
|
+
}
|
|
1582
|
+
case RelationshipPattern: {
|
|
1583
|
+
return {
|
|
1584
|
+
name: RelationshipPattern,
|
|
1585
|
+
properties: [
|
|
1586
|
+
{ name: 'name' },
|
|
1587
|
+
{ name: 'pattern' }
|
|
1588
|
+
]
|
|
1589
|
+
};
|
|
1590
|
+
}
|
|
1591
|
+
case RelNodes: {
|
|
1592
|
+
return {
|
|
1593
|
+
name: RelNodes,
|
|
1594
|
+
properties: [
|
|
1595
|
+
{ name: 'node1' },
|
|
1596
|
+
{ name: 'node2' }
|
|
1597
|
+
]
|
|
1598
|
+
};
|
|
1599
|
+
}
|
|
1600
|
+
case RuntimeHint: {
|
|
1601
|
+
return {
|
|
1602
|
+
name: RuntimeHint,
|
|
1603
|
+
properties: [
|
|
1604
|
+
{ name: 'aliasSpec' },
|
|
1605
|
+
{ name: 'catchSpec' }
|
|
1606
|
+
]
|
|
1607
|
+
};
|
|
1608
|
+
}
|
|
1609
|
+
case SelectIntoEntry: {
|
|
1610
|
+
return {
|
|
1611
|
+
name: SelectIntoEntry,
|
|
1612
|
+
properties: [
|
|
1613
|
+
{ name: 'alias' },
|
|
1614
|
+
{ name: 'attribute' }
|
|
1615
|
+
]
|
|
1616
|
+
};
|
|
1617
|
+
}
|
|
1618
|
+
case SelectIntoSpec: {
|
|
1619
|
+
return {
|
|
1620
|
+
name: SelectIntoSpec,
|
|
1621
|
+
properties: [
|
|
1622
|
+
{ name: 'entries', defaultValue: [] }
|
|
1623
|
+
]
|
|
1624
|
+
};
|
|
1625
|
+
}
|
|
1626
|
+
case SetAttribute: {
|
|
1627
|
+
return {
|
|
1628
|
+
name: SetAttribute,
|
|
1629
|
+
properties: [
|
|
1630
|
+
{ name: 'name' },
|
|
1631
|
+
{ name: 'op' },
|
|
1632
|
+
{ name: 'value' }
|
|
1633
|
+
]
|
|
1634
|
+
};
|
|
1635
|
+
}
|
|
1636
|
+
case StandaloneStatement: {
|
|
1637
|
+
return {
|
|
1638
|
+
name: StandaloneStatement,
|
|
1639
|
+
properties: [
|
|
1640
|
+
{ name: 'stmt' }
|
|
1641
|
+
]
|
|
1642
|
+
};
|
|
1643
|
+
}
|
|
1644
|
+
case Statement: {
|
|
1645
|
+
return {
|
|
1646
|
+
name: Statement,
|
|
1647
|
+
properties: [
|
|
1648
|
+
{ name: 'hints', defaultValue: [] },
|
|
1649
|
+
{ name: 'pattern' }
|
|
1650
|
+
]
|
|
1651
|
+
};
|
|
1652
|
+
}
|
|
1653
|
+
case TriggerDefinition: {
|
|
1654
|
+
return {
|
|
1655
|
+
name: TriggerDefinition,
|
|
1656
|
+
properties: [
|
|
1657
|
+
{ name: 'entries', defaultValue: [] }
|
|
1658
|
+
]
|
|
1659
|
+
};
|
|
1660
|
+
}
|
|
1661
|
+
case TriggerEntry: {
|
|
1662
|
+
return {
|
|
1663
|
+
name: TriggerEntry,
|
|
1664
|
+
properties: [
|
|
1665
|
+
{ name: 'async' },
|
|
1666
|
+
{ name: 'event' },
|
|
1667
|
+
{ name: 'on' }
|
|
1668
|
+
]
|
|
1669
|
+
};
|
|
1670
|
+
}
|
|
1671
|
+
case Upsert: {
|
|
1672
|
+
return {
|
|
1673
|
+
name: Upsert,
|
|
1674
|
+
properties: [
|
|
1675
|
+
{ name: 'pattern' }
|
|
1676
|
+
]
|
|
1677
|
+
};
|
|
1678
|
+
}
|
|
1679
|
+
case WorkflowDefinition: {
|
|
1680
|
+
return {
|
|
1681
|
+
name: WorkflowDefinition,
|
|
1682
|
+
properties: [
|
|
1683
|
+
{ name: 'name' },
|
|
1684
|
+
{ name: 'statements', defaultValue: [] }
|
|
1685
|
+
]
|
|
1686
|
+
};
|
|
1687
|
+
}
|
|
1688
|
+
default: {
|
|
1689
|
+
return {
|
|
1690
|
+
name: type,
|
|
1691
|
+
properties: []
|
|
1692
|
+
};
|
|
1693
|
+
}
|
|
1694
|
+
}
|
|
1695
|
+
}
|
|
1696
|
+
}
|
|
1697
|
+
|
|
1698
|
+
export const reflection = new AgentlangAstReflection();
|