@objectstack/spec 0.1.2 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +127 -5
- package/dist/ai/index.d.ts +14 -0
- package/dist/ai/index.d.ts.map +1 -0
- package/dist/ai/index.js +29 -0
- package/dist/ai/model-registry.zod.d.ts +1389 -0
- package/dist/ai/model-registry.zod.d.ts.map +1 -0
- package/dist/ai/model-registry.zod.js +164 -0
- package/dist/ai/nlq.zod.d.ts +1126 -0
- package/dist/ai/nlq.zod.d.ts.map +1 -0
- package/dist/ai/nlq.zod.js +246 -0
- package/dist/ai/rag-pipeline.zod.d.ts +1034 -0
- package/dist/ai/rag-pipeline.zod.d.ts.map +1 -0
- package/dist/ai/rag-pipeline.zod.js +244 -0
- package/dist/api/index.d.ts +9 -0
- package/dist/api/index.d.ts.map +1 -0
- package/dist/api/index.js +24 -0
- package/dist/data/filter.zod.d.ts +295 -0
- package/dist/data/filter.zod.d.ts.map +1 -0
- package/dist/data/filter.zod.js +226 -0
- package/dist/data/index.d.ts +21 -0
- package/dist/data/index.d.ts.map +1 -0
- package/dist/data/index.js +36 -0
- package/dist/data/query.zod.d.ts +386 -3
- package/dist/data/query.zod.d.ts.map +1 -1
- package/dist/data/query.zod.js +386 -3
- package/dist/data/validation.zod.d.ts +349 -0
- package/dist/data/validation.zod.d.ts.map +1 -1
- package/dist/data/validation.zod.js +395 -0
- package/dist/index.d.ts +36 -39
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +64 -47
- package/dist/system/auth-protocol.d.ts +175 -0
- package/dist/system/auth-protocol.d.ts.map +1 -0
- package/dist/system/auth-protocol.js +60 -0
- package/dist/system/auth.zod.d.ts +3319 -0
- package/dist/system/auth.zod.d.ts.map +1 -0
- package/dist/system/auth.zod.js +499 -0
- package/dist/system/datasource.zod.d.ts +118 -38
- package/dist/system/datasource.zod.d.ts.map +1 -1
- package/dist/system/datasource.zod.js +25 -6
- package/dist/system/driver.zod.d.ts +106 -0
- package/dist/system/driver.zod.d.ts.map +1 -1
- package/dist/system/driver.zod.js +47 -0
- package/dist/system/identity.zod.d.ts +234 -180
- package/dist/system/identity.zod.d.ts.map +1 -1
- package/dist/system/identity.zod.js +168 -51
- package/dist/system/index.d.ts +28 -0
- package/dist/system/index.d.ts.map +1 -0
- package/dist/system/index.js +43 -0
- package/dist/system/manifest.zod.d.ts +10 -10
- package/dist/system/organization.zod.d.ts +179 -0
- package/dist/system/organization.zod.d.ts.map +1 -0
- package/dist/system/organization.zod.js +129 -0
- package/dist/system/policy.zod.d.ts +10 -10
- package/dist/ui/action.zod.d.ts +2 -2
- package/dist/ui/dashboard.zod.d.ts +10 -10
- package/dist/ui/dashboard.zod.d.ts.map +1 -1
- package/dist/ui/dashboard.zod.js +3 -2
- package/dist/ui/index.d.ts +17 -0
- package/dist/ui/index.d.ts.map +1 -0
- package/dist/ui/index.js +32 -0
- package/dist/ui/report.zod.d.ts +4 -32
- package/dist/ui/report.zod.d.ts.map +1 -1
- package/dist/ui/report.zod.js +3 -8
- package/dist/ui/theme.zod.d.ts +6 -6
- package/json-schema/Account.json +87 -0
- package/json-schema/AccountLinkingConfig.json +27 -0
- package/json-schema/AuthConfig.json +841 -0
- package/json-schema/AuthPluginConfig.json +28 -0
- package/json-schema/AuthStrategy.json +17 -0
- package/json-schema/AuthenticationConfig.json +601 -0
- package/json-schema/AuthenticationProvider.json +617 -0
- package/json-schema/CSRFConfig.json +31 -0
- package/json-schema/ChunkingStrategy.json +133 -0
- package/json-schema/ComparisonOperator.json +56 -0
- package/json-schema/Dashboard.json +20 -0
- package/json-schema/DashboardWidget.json +20 -0
- package/json-schema/DatabaseAdapter.json +38 -0
- package/json-schema/DatabaseMapping.json +48 -0
- package/json-schema/Datasource.json +25 -5
- package/json-schema/DatasourceCapabilities.json +25 -5
- package/json-schema/DocumentChunk.json +97 -0
- package/json-schema/DocumentLoaderConfig.json +69 -0
- package/json-schema/DocumentMetadata.json +61 -0
- package/json-schema/DriverCapabilities.json +30 -0
- package/json-schema/DriverDefinition.json +25 -5
- package/json-schema/DriverInterface.json +30 -0
- package/json-schema/EmailPasswordConfig.json +43 -0
- package/json-schema/EmbeddingModel.json +57 -0
- package/json-schema/EnterpriseAuthConfig.json +172 -0
- package/json-schema/Entity.json +55 -0
- package/json-schema/EqualityOperator.json +14 -0
- package/json-schema/FieldOperators.json +108 -0
- package/json-schema/FieldSynonymConfig.json +39 -0
- package/json-schema/FilterCondition.json +28 -0
- package/json-schema/Invitation.json +69 -0
- package/json-schema/InvitationStatus.json +15 -0
- package/json-schema/LDAPConfig.json +22 -5
- package/json-schema/MagicLinkConfig.json +21 -0
- package/json-schema/Member.json +46 -0
- package/json-schema/ModelCapability.json +47 -0
- package/json-schema/ModelConfig.json +181 -0
- package/json-schema/ModelLimits.json +45 -0
- package/json-schema/ModelPricing.json +28 -0
- package/json-schema/ModelProvider.json +19 -0
- package/json-schema/ModelRegistry.json +427 -0
- package/json-schema/ModelRegistryEntry.json +239 -0
- package/json-schema/ModelSelectionCriteria.json +50 -0
- package/json-schema/NLQAnalytics.json +106 -0
- package/json-schema/NLQFieldMapping.json +40 -0
- package/json-schema/NLQModelConfig.json +78 -0
- package/json-schema/NLQParseResult.json +252 -0
- package/json-schema/NLQRequest.json +110 -0
- package/json-schema/NLQResponse.json +288 -0
- package/json-schema/NLQTrainingExample.json +120 -0
- package/json-schema/NormalizedFilter.json +348 -0
- package/json-schema/OAuthProvider.json +66 -0
- package/json-schema/OIDCConfig.json +18 -3
- package/json-schema/Organization.json +52 -0
- package/json-schema/PasskeyConfig.json +54 -0
- package/json-schema/PromptTemplate.json +163 -0
- package/json-schema/PromptVariable.json +56 -0
- package/json-schema/QueryContext.json +72 -0
- package/json-schema/QueryFilter.json +34 -0
- package/json-schema/QueryIntent.json +21 -0
- package/json-schema/QueryTemplate.json +81 -0
- package/json-schema/RAGPipelineConfig.json +552 -0
- package/json-schema/RAGPipelineStatus.json +66 -0
- package/json-schema/RAGQueryRequest.json +64 -0
- package/json-schema/RAGQueryResponse.json +108 -0
- package/json-schema/RangeOperator.json +41 -0
- package/json-schema/RateLimitConfig.json +36 -0
- package/json-schema/Report.json +20 -26
- package/json-schema/RerankingConfig.json +34 -0
- package/json-schema/RetrievalStrategy.json +121 -0
- package/json-schema/SAMLConfig.json +17 -3
- package/json-schema/Session.json +63 -0
- package/json-schema/SessionConfig.json +56 -0
- package/json-schema/SetOperator.json +18 -0
- package/json-schema/SpecialOperator.json +18 -0
- package/json-schema/StandardAuthProvider.json +857 -0
- package/json-schema/StringOperator.json +21 -0
- package/json-schema/Timeframe.json +68 -0
- package/json-schema/TwoFactorConfig.json +40 -0
- package/json-schema/User.json +51 -0
- package/json-schema/UserFieldMapping.json +47 -0
- package/json-schema/VectorStoreConfig.json +82 -0
- package/json-schema/VectorStoreProvider.json +21 -0
- package/json-schema/VerificationToken.json +36 -0
- package/package.json +27 -1
- package/json-schema/AuthProtocol.json +0 -17
- package/json-schema/AuthProvider.json +0 -171
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$ref": "#/definitions/ModelSelectionCriteria",
|
|
3
|
+
"definitions": {
|
|
4
|
+
"ModelSelectionCriteria": {
|
|
5
|
+
"type": "object",
|
|
6
|
+
"properties": {
|
|
7
|
+
"capabilities": {
|
|
8
|
+
"type": "array",
|
|
9
|
+
"items": {
|
|
10
|
+
"type": "string"
|
|
11
|
+
},
|
|
12
|
+
"description": "Required capabilities"
|
|
13
|
+
},
|
|
14
|
+
"maxCostPer1kTokens": {
|
|
15
|
+
"type": "number",
|
|
16
|
+
"description": "Maximum acceptable cost"
|
|
17
|
+
},
|
|
18
|
+
"minContextWindow": {
|
|
19
|
+
"type": "number",
|
|
20
|
+
"description": "Minimum context window size"
|
|
21
|
+
},
|
|
22
|
+
"provider": {
|
|
23
|
+
"type": "string",
|
|
24
|
+
"enum": [
|
|
25
|
+
"openai",
|
|
26
|
+
"azure_openai",
|
|
27
|
+
"anthropic",
|
|
28
|
+
"google",
|
|
29
|
+
"cohere",
|
|
30
|
+
"huggingface",
|
|
31
|
+
"local",
|
|
32
|
+
"custom"
|
|
33
|
+
]
|
|
34
|
+
},
|
|
35
|
+
"tags": {
|
|
36
|
+
"type": "array",
|
|
37
|
+
"items": {
|
|
38
|
+
"type": "string"
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
"excludeDeprecated": {
|
|
42
|
+
"type": "boolean",
|
|
43
|
+
"default": true
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
"additionalProperties": false
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
"$schema": "http://json-schema.org/draft-07/schema#"
|
|
50
|
+
}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$ref": "#/definitions/NLQAnalytics",
|
|
3
|
+
"definitions": {
|
|
4
|
+
"NLQAnalytics": {
|
|
5
|
+
"type": "object",
|
|
6
|
+
"properties": {
|
|
7
|
+
"totalQueries": {
|
|
8
|
+
"type": "integer"
|
|
9
|
+
},
|
|
10
|
+
"successfulQueries": {
|
|
11
|
+
"type": "integer"
|
|
12
|
+
},
|
|
13
|
+
"failedQueries": {
|
|
14
|
+
"type": "integer"
|
|
15
|
+
},
|
|
16
|
+
"averageConfidence": {
|
|
17
|
+
"type": "number",
|
|
18
|
+
"minimum": 0,
|
|
19
|
+
"maximum": 1
|
|
20
|
+
},
|
|
21
|
+
"intentDistribution": {
|
|
22
|
+
"type": "object",
|
|
23
|
+
"additionalProperties": {
|
|
24
|
+
"type": "integer"
|
|
25
|
+
},
|
|
26
|
+
"description": "Count by intent type"
|
|
27
|
+
},
|
|
28
|
+
"topQueries": {
|
|
29
|
+
"type": "array",
|
|
30
|
+
"items": {
|
|
31
|
+
"type": "object",
|
|
32
|
+
"properties": {
|
|
33
|
+
"query": {
|
|
34
|
+
"type": "string"
|
|
35
|
+
},
|
|
36
|
+
"count": {
|
|
37
|
+
"type": "integer"
|
|
38
|
+
},
|
|
39
|
+
"averageConfidence": {
|
|
40
|
+
"type": "number"
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
"required": [
|
|
44
|
+
"query",
|
|
45
|
+
"count",
|
|
46
|
+
"averageConfidence"
|
|
47
|
+
],
|
|
48
|
+
"additionalProperties": false
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
"averageParseTime": {
|
|
52
|
+
"type": "number",
|
|
53
|
+
"description": "Average parse time in milliseconds"
|
|
54
|
+
},
|
|
55
|
+
"averageExecutionTime": {
|
|
56
|
+
"type": "number"
|
|
57
|
+
},
|
|
58
|
+
"lowConfidenceQueries": {
|
|
59
|
+
"type": "array",
|
|
60
|
+
"items": {
|
|
61
|
+
"type": "object",
|
|
62
|
+
"properties": {
|
|
63
|
+
"query": {
|
|
64
|
+
"type": "string"
|
|
65
|
+
},
|
|
66
|
+
"confidence": {
|
|
67
|
+
"type": "number"
|
|
68
|
+
},
|
|
69
|
+
"timestamp": {
|
|
70
|
+
"type": "string"
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
"required": [
|
|
74
|
+
"query",
|
|
75
|
+
"confidence",
|
|
76
|
+
"timestamp"
|
|
77
|
+
],
|
|
78
|
+
"additionalProperties": false
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
"startDate": {
|
|
82
|
+
"type": "string",
|
|
83
|
+
"description": "ISO timestamp"
|
|
84
|
+
},
|
|
85
|
+
"endDate": {
|
|
86
|
+
"type": "string",
|
|
87
|
+
"description": "ISO timestamp"
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
"required": [
|
|
91
|
+
"totalQueries",
|
|
92
|
+
"successfulQueries",
|
|
93
|
+
"failedQueries",
|
|
94
|
+
"averageConfidence",
|
|
95
|
+
"intentDistribution",
|
|
96
|
+
"topQueries",
|
|
97
|
+
"averageParseTime",
|
|
98
|
+
"lowConfidenceQueries",
|
|
99
|
+
"startDate",
|
|
100
|
+
"endDate"
|
|
101
|
+
],
|
|
102
|
+
"additionalProperties": false
|
|
103
|
+
}
|
|
104
|
+
},
|
|
105
|
+
"$schema": "http://json-schema.org/draft-07/schema#"
|
|
106
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$ref": "#/definitions/NLQFieldMapping",
|
|
3
|
+
"definitions": {
|
|
4
|
+
"NLQFieldMapping": {
|
|
5
|
+
"type": "object",
|
|
6
|
+
"properties": {
|
|
7
|
+
"naturalLanguage": {
|
|
8
|
+
"type": "string",
|
|
9
|
+
"description": "NL field name (e.g., \"customer name\")"
|
|
10
|
+
},
|
|
11
|
+
"objectField": {
|
|
12
|
+
"type": "string",
|
|
13
|
+
"description": "Actual field name (e.g., \"account.name\")"
|
|
14
|
+
},
|
|
15
|
+
"object": {
|
|
16
|
+
"type": "string",
|
|
17
|
+
"description": "Object name"
|
|
18
|
+
},
|
|
19
|
+
"field": {
|
|
20
|
+
"type": "string",
|
|
21
|
+
"description": "Field name"
|
|
22
|
+
},
|
|
23
|
+
"confidence": {
|
|
24
|
+
"type": "number",
|
|
25
|
+
"minimum": 0,
|
|
26
|
+
"maximum": 1
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
"required": [
|
|
30
|
+
"naturalLanguage",
|
|
31
|
+
"objectField",
|
|
32
|
+
"object",
|
|
33
|
+
"field",
|
|
34
|
+
"confidence"
|
|
35
|
+
],
|
|
36
|
+
"additionalProperties": false
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
"$schema": "http://json-schema.org/draft-07/schema#"
|
|
40
|
+
}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$ref": "#/definitions/NLQModelConfig",
|
|
3
|
+
"definitions": {
|
|
4
|
+
"NLQModelConfig": {
|
|
5
|
+
"type": "object",
|
|
6
|
+
"properties": {
|
|
7
|
+
"modelId": {
|
|
8
|
+
"type": "string",
|
|
9
|
+
"description": "Model from registry"
|
|
10
|
+
},
|
|
11
|
+
"systemPrompt": {
|
|
12
|
+
"type": "string",
|
|
13
|
+
"description": "System prompt override"
|
|
14
|
+
},
|
|
15
|
+
"includeSchema": {
|
|
16
|
+
"type": "boolean",
|
|
17
|
+
"default": true,
|
|
18
|
+
"description": "Include object schema in prompt"
|
|
19
|
+
},
|
|
20
|
+
"includeExamples": {
|
|
21
|
+
"type": "boolean",
|
|
22
|
+
"default": true,
|
|
23
|
+
"description": "Include examples in prompt"
|
|
24
|
+
},
|
|
25
|
+
"enableIntentDetection": {
|
|
26
|
+
"type": "boolean",
|
|
27
|
+
"default": true
|
|
28
|
+
},
|
|
29
|
+
"intentThreshold": {
|
|
30
|
+
"type": "number",
|
|
31
|
+
"minimum": 0,
|
|
32
|
+
"maximum": 1,
|
|
33
|
+
"default": 0.7
|
|
34
|
+
},
|
|
35
|
+
"enableEntityRecognition": {
|
|
36
|
+
"type": "boolean",
|
|
37
|
+
"default": true
|
|
38
|
+
},
|
|
39
|
+
"entityRecognitionModel": {
|
|
40
|
+
"type": "string"
|
|
41
|
+
},
|
|
42
|
+
"enableFuzzyMatching": {
|
|
43
|
+
"type": "boolean",
|
|
44
|
+
"default": true,
|
|
45
|
+
"description": "Fuzzy match field names"
|
|
46
|
+
},
|
|
47
|
+
"fuzzyMatchThreshold": {
|
|
48
|
+
"type": "number",
|
|
49
|
+
"minimum": 0,
|
|
50
|
+
"maximum": 1,
|
|
51
|
+
"default": 0.8
|
|
52
|
+
},
|
|
53
|
+
"enableTimeframeDetection": {
|
|
54
|
+
"type": "boolean",
|
|
55
|
+
"default": true
|
|
56
|
+
},
|
|
57
|
+
"defaultTimeframe": {
|
|
58
|
+
"type": "string",
|
|
59
|
+
"description": "Default timeframe if not specified"
|
|
60
|
+
},
|
|
61
|
+
"enableCaching": {
|
|
62
|
+
"type": "boolean",
|
|
63
|
+
"default": true
|
|
64
|
+
},
|
|
65
|
+
"cacheTTL": {
|
|
66
|
+
"type": "integer",
|
|
67
|
+
"default": 3600,
|
|
68
|
+
"description": "Cache TTL in seconds"
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
"required": [
|
|
72
|
+
"modelId"
|
|
73
|
+
],
|
|
74
|
+
"additionalProperties": false
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
"$schema": "http://json-schema.org/draft-07/schema#"
|
|
78
|
+
}
|
|
@@ -0,0 +1,252 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$ref": "#/definitions/NLQParseResult",
|
|
3
|
+
"definitions": {
|
|
4
|
+
"NLQParseResult": {
|
|
5
|
+
"type": "object",
|
|
6
|
+
"properties": {
|
|
7
|
+
"originalQuery": {
|
|
8
|
+
"type": "string"
|
|
9
|
+
},
|
|
10
|
+
"intent": {
|
|
11
|
+
"type": "string",
|
|
12
|
+
"enum": [
|
|
13
|
+
"select",
|
|
14
|
+
"aggregate",
|
|
15
|
+
"filter",
|
|
16
|
+
"sort",
|
|
17
|
+
"compare",
|
|
18
|
+
"trend",
|
|
19
|
+
"insight",
|
|
20
|
+
"create",
|
|
21
|
+
"update",
|
|
22
|
+
"delete"
|
|
23
|
+
]
|
|
24
|
+
},
|
|
25
|
+
"intentConfidence": {
|
|
26
|
+
"type": "number",
|
|
27
|
+
"minimum": 0,
|
|
28
|
+
"maximum": 1
|
|
29
|
+
},
|
|
30
|
+
"entities": {
|
|
31
|
+
"type": "array",
|
|
32
|
+
"items": {
|
|
33
|
+
"type": "object",
|
|
34
|
+
"properties": {
|
|
35
|
+
"type": {
|
|
36
|
+
"type": "string",
|
|
37
|
+
"enum": [
|
|
38
|
+
"object",
|
|
39
|
+
"field",
|
|
40
|
+
"value",
|
|
41
|
+
"operator",
|
|
42
|
+
"function",
|
|
43
|
+
"timeframe"
|
|
44
|
+
]
|
|
45
|
+
},
|
|
46
|
+
"text": {
|
|
47
|
+
"type": "string",
|
|
48
|
+
"description": "Original text from query"
|
|
49
|
+
},
|
|
50
|
+
"value": {
|
|
51
|
+
"description": "Normalized value"
|
|
52
|
+
},
|
|
53
|
+
"confidence": {
|
|
54
|
+
"type": "number",
|
|
55
|
+
"minimum": 0,
|
|
56
|
+
"maximum": 1,
|
|
57
|
+
"description": "Confidence score"
|
|
58
|
+
},
|
|
59
|
+
"span": {
|
|
60
|
+
"type": "array",
|
|
61
|
+
"minItems": 2,
|
|
62
|
+
"maxItems": 2,
|
|
63
|
+
"items": [
|
|
64
|
+
{
|
|
65
|
+
"type": "number"
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
"type": "number"
|
|
69
|
+
}
|
|
70
|
+
],
|
|
71
|
+
"description": "Character span in query"
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
"required": [
|
|
75
|
+
"type",
|
|
76
|
+
"text",
|
|
77
|
+
"confidence"
|
|
78
|
+
],
|
|
79
|
+
"additionalProperties": false
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
"targetObject": {
|
|
83
|
+
"type": "string",
|
|
84
|
+
"description": "Primary object to query"
|
|
85
|
+
},
|
|
86
|
+
"fields": {
|
|
87
|
+
"type": "array",
|
|
88
|
+
"items": {
|
|
89
|
+
"type": "object",
|
|
90
|
+
"properties": {
|
|
91
|
+
"naturalLanguage": {
|
|
92
|
+
"type": "string",
|
|
93
|
+
"description": "NL field name (e.g., \"customer name\")"
|
|
94
|
+
},
|
|
95
|
+
"objectField": {
|
|
96
|
+
"type": "string",
|
|
97
|
+
"description": "Actual field name (e.g., \"account.name\")"
|
|
98
|
+
},
|
|
99
|
+
"object": {
|
|
100
|
+
"type": "string",
|
|
101
|
+
"description": "Object name"
|
|
102
|
+
},
|
|
103
|
+
"field": {
|
|
104
|
+
"type": "string",
|
|
105
|
+
"description": "Field name"
|
|
106
|
+
},
|
|
107
|
+
"confidence": {
|
|
108
|
+
"type": "number",
|
|
109
|
+
"minimum": 0,
|
|
110
|
+
"maximum": 1
|
|
111
|
+
}
|
|
112
|
+
},
|
|
113
|
+
"required": [
|
|
114
|
+
"naturalLanguage",
|
|
115
|
+
"objectField",
|
|
116
|
+
"object",
|
|
117
|
+
"field",
|
|
118
|
+
"confidence"
|
|
119
|
+
],
|
|
120
|
+
"additionalProperties": false
|
|
121
|
+
}
|
|
122
|
+
},
|
|
123
|
+
"timeframe": {
|
|
124
|
+
"type": "object",
|
|
125
|
+
"properties": {
|
|
126
|
+
"type": {
|
|
127
|
+
"type": "string",
|
|
128
|
+
"enum": [
|
|
129
|
+
"absolute",
|
|
130
|
+
"relative"
|
|
131
|
+
]
|
|
132
|
+
},
|
|
133
|
+
"start": {
|
|
134
|
+
"type": "string",
|
|
135
|
+
"description": "Start date (ISO format)"
|
|
136
|
+
},
|
|
137
|
+
"end": {
|
|
138
|
+
"type": "string",
|
|
139
|
+
"description": "End date (ISO format)"
|
|
140
|
+
},
|
|
141
|
+
"relative": {
|
|
142
|
+
"type": "object",
|
|
143
|
+
"properties": {
|
|
144
|
+
"unit": {
|
|
145
|
+
"type": "string",
|
|
146
|
+
"enum": [
|
|
147
|
+
"hour",
|
|
148
|
+
"day",
|
|
149
|
+
"week",
|
|
150
|
+
"month",
|
|
151
|
+
"quarter",
|
|
152
|
+
"year"
|
|
153
|
+
]
|
|
154
|
+
},
|
|
155
|
+
"value": {
|
|
156
|
+
"type": "integer"
|
|
157
|
+
},
|
|
158
|
+
"direction": {
|
|
159
|
+
"type": "string",
|
|
160
|
+
"enum": [
|
|
161
|
+
"past",
|
|
162
|
+
"future",
|
|
163
|
+
"current"
|
|
164
|
+
],
|
|
165
|
+
"default": "past"
|
|
166
|
+
}
|
|
167
|
+
},
|
|
168
|
+
"required": [
|
|
169
|
+
"unit",
|
|
170
|
+
"value"
|
|
171
|
+
],
|
|
172
|
+
"additionalProperties": false
|
|
173
|
+
},
|
|
174
|
+
"text": {
|
|
175
|
+
"type": "string",
|
|
176
|
+
"description": "Original timeframe text"
|
|
177
|
+
}
|
|
178
|
+
},
|
|
179
|
+
"required": [
|
|
180
|
+
"type",
|
|
181
|
+
"text"
|
|
182
|
+
],
|
|
183
|
+
"additionalProperties": false
|
|
184
|
+
},
|
|
185
|
+
"ast": {
|
|
186
|
+
"description": "Generated ObjectQL AST"
|
|
187
|
+
},
|
|
188
|
+
"confidence": {
|
|
189
|
+
"type": "number",
|
|
190
|
+
"minimum": 0,
|
|
191
|
+
"maximum": 1,
|
|
192
|
+
"description": "Overall confidence"
|
|
193
|
+
},
|
|
194
|
+
"ambiguities": {
|
|
195
|
+
"type": "array",
|
|
196
|
+
"items": {
|
|
197
|
+
"type": "object",
|
|
198
|
+
"properties": {
|
|
199
|
+
"type": {
|
|
200
|
+
"type": "string"
|
|
201
|
+
},
|
|
202
|
+
"description": {
|
|
203
|
+
"type": "string"
|
|
204
|
+
},
|
|
205
|
+
"suggestions": {
|
|
206
|
+
"type": "array",
|
|
207
|
+
"items": {
|
|
208
|
+
"type": "string"
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
},
|
|
212
|
+
"required": [
|
|
213
|
+
"type",
|
|
214
|
+
"description"
|
|
215
|
+
],
|
|
216
|
+
"additionalProperties": false
|
|
217
|
+
},
|
|
218
|
+
"description": "Detected ambiguities requiring clarification"
|
|
219
|
+
},
|
|
220
|
+
"alternatives": {
|
|
221
|
+
"type": "array",
|
|
222
|
+
"items": {
|
|
223
|
+
"type": "object",
|
|
224
|
+
"properties": {
|
|
225
|
+
"interpretation": {
|
|
226
|
+
"type": "string"
|
|
227
|
+
},
|
|
228
|
+
"confidence": {
|
|
229
|
+
"type": "number"
|
|
230
|
+
},
|
|
231
|
+
"ast": {}
|
|
232
|
+
},
|
|
233
|
+
"required": [
|
|
234
|
+
"interpretation",
|
|
235
|
+
"confidence"
|
|
236
|
+
],
|
|
237
|
+
"additionalProperties": false
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
},
|
|
241
|
+
"required": [
|
|
242
|
+
"originalQuery",
|
|
243
|
+
"intent",
|
|
244
|
+
"intentConfidence",
|
|
245
|
+
"entities",
|
|
246
|
+
"confidence"
|
|
247
|
+
],
|
|
248
|
+
"additionalProperties": false
|
|
249
|
+
}
|
|
250
|
+
},
|
|
251
|
+
"$schema": "http://json-schema.org/draft-07/schema#"
|
|
252
|
+
}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$ref": "#/definitions/NLQRequest",
|
|
3
|
+
"definitions": {
|
|
4
|
+
"NLQRequest": {
|
|
5
|
+
"type": "object",
|
|
6
|
+
"properties": {
|
|
7
|
+
"query": {
|
|
8
|
+
"type": "string",
|
|
9
|
+
"description": "Natural language query"
|
|
10
|
+
},
|
|
11
|
+
"context": {
|
|
12
|
+
"type": "object",
|
|
13
|
+
"properties": {
|
|
14
|
+
"userId": {
|
|
15
|
+
"type": "string"
|
|
16
|
+
},
|
|
17
|
+
"userRole": {
|
|
18
|
+
"type": "string"
|
|
19
|
+
},
|
|
20
|
+
"currentObject": {
|
|
21
|
+
"type": "string",
|
|
22
|
+
"description": "Current object being viewed"
|
|
23
|
+
},
|
|
24
|
+
"currentRecordId": {
|
|
25
|
+
"type": "string",
|
|
26
|
+
"description": "Current record ID"
|
|
27
|
+
},
|
|
28
|
+
"conversationHistory": {
|
|
29
|
+
"type": "array",
|
|
30
|
+
"items": {
|
|
31
|
+
"type": "object",
|
|
32
|
+
"properties": {
|
|
33
|
+
"query": {
|
|
34
|
+
"type": "string"
|
|
35
|
+
},
|
|
36
|
+
"timestamp": {
|
|
37
|
+
"type": "string"
|
|
38
|
+
},
|
|
39
|
+
"intent": {
|
|
40
|
+
"type": "string",
|
|
41
|
+
"enum": [
|
|
42
|
+
"select",
|
|
43
|
+
"aggregate",
|
|
44
|
+
"filter",
|
|
45
|
+
"sort",
|
|
46
|
+
"compare",
|
|
47
|
+
"trend",
|
|
48
|
+
"insight",
|
|
49
|
+
"create",
|
|
50
|
+
"update",
|
|
51
|
+
"delete"
|
|
52
|
+
]
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
"required": [
|
|
56
|
+
"query",
|
|
57
|
+
"timestamp"
|
|
58
|
+
],
|
|
59
|
+
"additionalProperties": false
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
"defaultLimit": {
|
|
63
|
+
"type": "integer",
|
|
64
|
+
"default": 100
|
|
65
|
+
},
|
|
66
|
+
"timezone": {
|
|
67
|
+
"type": "string",
|
|
68
|
+
"default": "UTC"
|
|
69
|
+
},
|
|
70
|
+
"locale": {
|
|
71
|
+
"type": "string",
|
|
72
|
+
"default": "en-US"
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
"additionalProperties": false
|
|
76
|
+
},
|
|
77
|
+
"includeAlternatives": {
|
|
78
|
+
"type": "boolean",
|
|
79
|
+
"default": false,
|
|
80
|
+
"description": "Include alternative interpretations"
|
|
81
|
+
},
|
|
82
|
+
"maxAlternatives": {
|
|
83
|
+
"type": "integer",
|
|
84
|
+
"default": 3
|
|
85
|
+
},
|
|
86
|
+
"minConfidence": {
|
|
87
|
+
"type": "number",
|
|
88
|
+
"minimum": 0,
|
|
89
|
+
"maximum": 1,
|
|
90
|
+
"default": 0.5,
|
|
91
|
+
"description": "Minimum confidence threshold"
|
|
92
|
+
},
|
|
93
|
+
"executeQuery": {
|
|
94
|
+
"type": "boolean",
|
|
95
|
+
"default": false,
|
|
96
|
+
"description": "Execute query and return results"
|
|
97
|
+
},
|
|
98
|
+
"maxResults": {
|
|
99
|
+
"type": "integer",
|
|
100
|
+
"description": "Maximum results to return"
|
|
101
|
+
}
|
|
102
|
+
},
|
|
103
|
+
"required": [
|
|
104
|
+
"query"
|
|
105
|
+
],
|
|
106
|
+
"additionalProperties": false
|
|
107
|
+
}
|
|
108
|
+
},
|
|
109
|
+
"$schema": "http://json-schema.org/draft-07/schema#"
|
|
110
|
+
}
|