Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions packages/spec/json-schema/api/AiChatRequest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"$ref": "#/definitions/AiChatRequest",
"definitions": {
"AiChatRequest": {
"type": "object",
"properties": {
"message": {
"type": "string",
"description": "User message"
},
"conversationId": {
"type": "string",
"description": "Conversation ID for context"
},
"context": {
"type": "object",
"additionalProperties": {},
"description": "Additional context data"
}
},
"required": [
"message"
],
"additionalProperties": false
}
},
"$schema": "http://json-schema.org/draft-07/schema#"
}
51 changes: 51 additions & 0 deletions packages/spec/json-schema/api/AiChatResponse.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
{
"$ref": "#/definitions/AiChatResponse",
"definitions": {
"AiChatResponse": {
"type": "object",
"properties": {
"message": {
"type": "string",
"description": "Assistant response message"
},
"conversationId": {
"type": "string",
"description": "Conversation ID"
},
"actions": {
"type": "array",
"items": {
"type": "object",
"properties": {
"type": {
"type": "string",
"description": "Action type"
},
"label": {
"type": "string",
"description": "Action display label"
},
"data": {
"type": "object",
"additionalProperties": {},
"description": "Action data"
}
},
"required": [
"type",
"label"
],
"additionalProperties": false
},
"description": "Suggested actions"
}
},
"required": [
"message",
"conversationId"
],
"additionalProperties": false
}
},
"$schema": "http://json-schema.org/draft-07/schema#"
}
33 changes: 33 additions & 0 deletions packages/spec/json-schema/api/AiInsightsRequest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"$ref": "#/definitions/AiInsightsRequest",
"definitions": {
"AiInsightsRequest": {
"type": "object",
"properties": {
"object": {
"type": "string",
"description": "Object name to analyze"
},
"recordId": {
"type": "string",
"description": "Specific record to analyze"
},
"type": {
"type": "string",
"enum": [
"summary",
"trends",
"anomalies",
"recommendations"
],
"description": "Type of insight"
}
},
"required": [
"object"
],
"additionalProperties": false
}
},
"$schema": "http://json-schema.org/draft-07/schema#"
}
53 changes: 53 additions & 0 deletions packages/spec/json-schema/api/AiInsightsResponse.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
{
"$ref": "#/definitions/AiInsightsResponse",
"definitions": {
"AiInsightsResponse": {
"type": "object",
"properties": {
"insights": {
"type": "array",
"items": {
"type": "object",
"properties": {
"type": {
"type": "string",
"description": "Insight type"
},
"title": {
"type": "string",
"description": "Insight title"
},
"description": {
"type": "string",
"description": "Detailed description"
},
"confidence": {
"type": "number",
"minimum": 0,
"maximum": 1,
"description": "Confidence score (0-1)"
},
"data": {
"type": "object",
"additionalProperties": {},
"description": "Supporting data"
}
},
"required": [
"type",
"title",
"description"
],
"additionalProperties": false
},
"description": "Generated insights"
}
},
"required": [
"insights"
],
"additionalProperties": false
}
},
"$schema": "http://json-schema.org/draft-07/schema#"
}
27 changes: 27 additions & 0 deletions packages/spec/json-schema/api/AiNlqRequest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"$ref": "#/definitions/AiNlqRequest",
"definitions": {
"AiNlqRequest": {
"type": "object",
"properties": {
"query": {
"type": "string",
"description": "Natural language query string"
},
"object": {
"type": "string",
"description": "Target object context"
},
"conversationId": {
"type": "string",
"description": "Conversation ID for multi-turn queries"
}
},
"required": [
"query"
],
"additionalProperties": false
}
},
"$schema": "http://json-schema.org/draft-07/schema#"
}
32 changes: 32 additions & 0 deletions packages/spec/json-schema/api/AiNlqResponse.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"$ref": "#/definitions/AiNlqResponse",
"definitions": {
"AiNlqResponse": {
"type": "object",
"properties": {
"query": {
"description": "Generated structured query (AST)"
},
"explanation": {
"type": "string",
"description": "Human-readable explanation of the query"
},
"confidence": {
"type": "number",
"minimum": 0,
"maximum": 1,
"description": "Confidence score (0-1)"
},
"suggestions": {
"type": "array",
"items": {
"type": "string"
},
"description": "Suggested follow-up queries"
}
},
"additionalProperties": false
}
},
"$schema": "http://json-schema.org/draft-07/schema#"
}
31 changes: 31 additions & 0 deletions packages/spec/json-schema/api/AiSuggestRequest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"$ref": "#/definitions/AiSuggestRequest",
"definitions": {
"AiSuggestRequest": {
"type": "object",
"properties": {
"object": {
"type": "string",
"description": "Object name for context"
},
"field": {
"type": "string",
"description": "Field to suggest values for"
},
"recordId": {
"type": "string",
"description": "Record ID for context"
},
"partial": {
"type": "string",
"description": "Partial input for completion"
}
},
"required": [
"object"
],
"additionalProperties": false
}
},
"$schema": "http://json-schema.org/draft-07/schema#"
}
45 changes: 45 additions & 0 deletions packages/spec/json-schema/api/AiSuggestResponse.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
{
"$ref": "#/definitions/AiSuggestResponse",
"definitions": {
"AiSuggestResponse": {
"type": "object",
"properties": {
"suggestions": {
"type": "array",
"items": {
"type": "object",
"properties": {
"value": {
"description": "Suggested value"
},
"label": {
"type": "string",
"description": "Display label"
},
"confidence": {
"type": "number",
"minimum": 0,
"maximum": 1,
"description": "Confidence score (0-1)"
},
"reason": {
"type": "string",
"description": "Reason for this suggestion"
}
},
"required": [
"label"
],
"additionalProperties": false
},
"description": "Suggested values"
}
},
"required": [
"suggestions"
],
"additionalProperties": false
}
},
"$schema": "http://json-schema.org/draft-07/schema#"
}
41 changes: 41 additions & 0 deletions packages/spec/json-schema/api/CheckPermissionRequest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
"$ref": "#/definitions/CheckPermissionRequest",
"definitions": {
"CheckPermissionRequest": {
"type": "object",
"properties": {
"object": {
"type": "string",
"description": "Object name to check permissions for"
},
"action": {
"type": "string",
"enum": [
"create",
"read",
"edit",
"delete",
"transfer",
"restore",
"purge"
],
"description": "Action to check"
},
"recordId": {
"type": "string",
"description": "Specific record ID (for record-level checks)"
},
"field": {
"type": "string",
"description": "Specific field name (for field-level checks)"
}
},
"required": [
"object",
"action"
],
"additionalProperties": false
}
},
"$schema": "http://json-schema.org/draft-07/schema#"
}
23 changes: 23 additions & 0 deletions packages/spec/json-schema/api/CheckPermissionResponse.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"$ref": "#/definitions/CheckPermissionResponse",
"definitions": {
"CheckPermissionResponse": {
"type": "object",
"properties": {
"allowed": {
"type": "boolean",
"description": "Whether the action is permitted"
},
"reason": {
"type": "string",
"description": "Reason if denied"
}
},
"required": [
"allowed"
],
"additionalProperties": false
}
},
"$schema": "http://json-schema.org/draft-07/schema#"
}
Loading
Loading