Files
tyx_AI_xhs/openapi/openapi.json
T

1147 lines
34 KiB
JSON

{
"components": {
"schemas": {
"BootstrapResponse": {
"additionalProperties": false,
"properties": {
"app_version": {
"maxLength": 40,
"pattern": "^[0-9]+\\.[0-9]+\\.[0-9]+(?:[-+][A-Za-z0-9.-]+)?$",
"type": "string"
},
"dependencies": {
"items": {
"additionalProperties": false,
"properties": {
"service_id": {
"maxLength": 60,
"pattern": "^[a-z][a-z0-9_-]+$",
"type": "string"
},
"status": {
"anyOf": [
{
"enum": [
"available"
],
"type": "string"
},
{
"enum": [
"paused"
],
"type": "string"
},
{
"enum": [
"degraded"
],
"type": "string"
},
{
"enum": [
"unavailable"
],
"type": "string"
}
]
}
},
"required": [
"service_id",
"status"
],
"type": "object"
},
"type": "array"
},
"model_summary": {
"additionalProperties": false,
"properties": {
"config_set_version": {
"anyOf": [
{
"minimum": 0,
"type": "integer"
},
{
"type": "null"
}
]
},
"configured_default_model_id": {
"anyOf": [
{
"maxLength": 80,
"pattern": "^[a-z0-9][a-z0-9.-]+$",
"type": "string"
},
{
"type": "null"
}
]
},
"recommended_model_id": {
"anyOf": [
{
"maxLength": 80,
"pattern": "^[a-z0-9][a-z0-9.-]+$",
"type": "string"
},
{
"type": "null"
}
]
},
"runtime_availability_version": {
"anyOf": [
{
"minimum": 0,
"type": "integer"
},
{
"type": "null"
}
]
}
},
"required": [
"config_set_version",
"configured_default_model_id",
"recommended_model_id",
"runtime_availability_version"
],
"type": "object"
},
"public_features": {
"items": {
"additionalProperties": false,
"properties": {
"feature_id": {
"maxLength": 80,
"pattern": "^[a-z][a-z0-9_-]+$",
"type": "string"
},
"status": {
"anyOf": [
{
"enum": [
"enabled"
],
"type": "string"
},
{
"enum": [
"disabled"
],
"type": "string"
},
{
"enum": [
"paused"
],
"type": "string"
}
]
}
},
"required": [
"feature_id",
"status"
],
"type": "object"
},
"type": "array"
}
},
"required": [
"app_version",
"dependencies",
"model_summary",
"public_features"
],
"type": "object"
},
"CorrelationId": {
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$",
"type": "string"
},
"ErrorDetails": {
"additionalProperties": false,
"properties": {
"capacity_status": {
"anyOf": [
{
"enum": [
"normal"
],
"type": "string"
},
{
"enum": [
"warning"
],
"type": "string"
},
{
"enum": [
"critical"
],
"type": "string"
},
{
"enum": [
"full"
],
"type": "string"
},
{
"enum": [
"unavailable"
],
"type": "string"
}
]
},
"current_task_ref": {
"maxLength": 160,
"pattern": "^[a-z][a-z0-9_]*:[A-Za-z0-9_-]+$",
"type": "string"
},
"field_errors": {
"items": {
"additionalProperties": false,
"properties": {
"field": {
"maxLength": 120,
"pattern": "^[A-Za-z0-9_.\\[\\]-]+$",
"type": "string"
},
"message_key": {
"maxLength": 120,
"pattern": "^[A-Za-z0-9_.-]+$",
"type": "string"
}
},
"required": [
"field",
"message_key"
],
"type": "object"
},
"maxItems": 32,
"type": "array"
},
"latest_version": {
"anyOf": [
{
"minimum": 0,
"type": "integer"
},
{
"maxLength": 120,
"type": "string"
}
]
},
"remaining_bytes": {
"minimum": 0,
"type": "integer"
}
},
"type": "object"
},
"ErrorEnvelope": {
"additionalProperties": false,
"properties": {
"error": {
"additionalProperties": false,
"properties": {
"code": {
"anyOf": [
{
"enum": [
"BROWSER_UNSUPPORTED"
],
"type": "string"
},
{
"enum": [
"MODEL_CONFIG_VERSION_CONFLICT"
],
"type": "string"
},
{
"enum": [
"MODEL_DEFAULT_REPLACEMENT_REQUIRED"
],
"type": "string"
},
{
"enum": [
"MODEL_DEFAULT_REPLACEMENT_INVALID"
],
"type": "string"
},
{
"enum": [
"MODEL_RECOMMENDATION_PRIORITY_INVALID"
],
"type": "string"
},
{
"enum": [
"MODEL_RECOMMENDATION_PRIORITY_CONFLICT"
],
"type": "string"
},
{
"enum": [
"PRIVATE_CONTENT_NOTICE_ACK_REQUIRED"
],
"type": "string"
},
{
"enum": [
"ASSET_HISTORY_REFERENCE_CONFLICT"
],
"type": "string"
},
{
"enum": [
"ASSET_CLEANUP_CANDIDATE_STALE"
],
"type": "string"
},
{
"enum": [
"STORAGE_CAPACITY_EXCEEDED"
],
"type": "string"
}
]
},
"correlation_id": {
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$",
"type": "string"
},
"details": {
"additionalProperties": false,
"properties": {
"capacity_status": {
"anyOf": [
{
"enum": [
"normal"
],
"type": "string"
},
{
"enum": [
"warning"
],
"type": "string"
},
{
"enum": [
"critical"
],
"type": "string"
},
{
"enum": [
"full"
],
"type": "string"
},
{
"enum": [
"unavailable"
],
"type": "string"
}
]
},
"current_task_ref": {
"maxLength": 160,
"pattern": "^[a-z][a-z0-9_]*:[A-Za-z0-9_-]+$",
"type": "string"
},
"field_errors": {
"items": {
"additionalProperties": false,
"properties": {
"field": {
"maxLength": 120,
"pattern": "^[A-Za-z0-9_.\\[\\]-]+$",
"type": "string"
},
"message_key": {
"maxLength": 120,
"pattern": "^[A-Za-z0-9_.-]+$",
"type": "string"
}
},
"required": [
"field",
"message_key"
],
"type": "object"
},
"maxItems": 32,
"type": "array"
},
"latest_version": {
"anyOf": [
{
"minimum": 0,
"type": "integer"
},
{
"maxLength": 120,
"type": "string"
}
]
},
"remaining_bytes": {
"minimum": 0,
"type": "integer"
}
},
"type": "object"
},
"error_category": {
"anyOf": [
{
"enum": [
"upstream_timeout"
],
"type": "string"
},
{
"enum": [
"upstream_failed"
],
"type": "string"
},
{
"enum": [
"safety_rejected"
],
"type": "string"
},
{
"enum": [
"model_disabled"
],
"type": "string"
},
{
"enum": [
"gateway_balance_insufficient"
],
"type": "string"
},
{
"enum": [
"gateway_contract_invalid"
],
"type": "string"
},
{
"enum": [
"reference_invalid"
],
"type": "string"
},
{
"enum": [
"unknown_retryable"
],
"type": "string"
},
{
"enum": [
"unknown_non_retryable"
],
"type": "string"
}
]
},
"message_key": {
"maxLength": 120,
"pattern": "^[A-Za-z0-9_.-]+$",
"type": "string"
}
},
"required": [
"code",
"message_key",
"correlation_id",
"details"
],
"type": "object"
}
},
"required": [
"error"
],
"type": "object"
},
"GenerationErrorCategory": {
"anyOf": [
{
"enum": [
"upstream_timeout"
],
"type": "string"
},
{
"enum": [
"upstream_failed"
],
"type": "string"
},
{
"enum": [
"safety_rejected"
],
"type": "string"
},
{
"enum": [
"model_disabled"
],
"type": "string"
},
{
"enum": [
"gateway_balance_insufficient"
],
"type": "string"
},
{
"enum": [
"gateway_contract_invalid"
],
"type": "string"
},
{
"enum": [
"reference_invalid"
],
"type": "string"
},
{
"enum": [
"unknown_retryable"
],
"type": "string"
},
{
"enum": [
"unknown_non_retryable"
],
"type": "string"
}
]
},
"ModelConfigSseEvent": {
"additionalProperties": false,
"properties": {
"config_set_version": {
"minimum": 0,
"type": "integer"
},
"entity_ref": {
"maxLength": 160,
"pattern": "^[a-z][a-z0-9_]*:[A-Za-z0-9_-]+$",
"type": "string"
},
"event_id": {
"minimum": 0,
"type": "integer"
},
"event_type": {
"enum": [
"model_config_changed"
],
"type": "string"
},
"occurred_at": {
"pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(?:\\.[0-9]{3})?Z$",
"type": "string"
}
},
"required": [
"entity_ref",
"event_id",
"occurred_at",
"config_set_version",
"event_type"
],
"type": "object"
},
"ModelRuntimeSseEvent": {
"additionalProperties": false,
"properties": {
"entity_ref": {
"maxLength": 160,
"pattern": "^[a-z][a-z0-9_]*:[A-Za-z0-9_-]+$",
"type": "string"
},
"event_id": {
"minimum": 0,
"type": "integer"
},
"event_type": {
"enum": [
"model_runtime_changed"
],
"type": "string"
},
"occurred_at": {
"pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(?:\\.[0-9]{3})?Z$",
"type": "string"
},
"runtime_availability_version": {
"minimum": 0,
"type": "integer"
}
},
"required": [
"entity_ref",
"event_id",
"occurred_at",
"event_type",
"runtime_availability_version"
],
"type": "object"
},
"SseEvent": {
"anyOf": [
{
"additionalProperties": false,
"properties": {
"entity_ref": {
"maxLength": 160,
"pattern": "^[a-z][a-z0-9_]*:[A-Za-z0-9_-]+$",
"type": "string"
},
"event_id": {
"minimum": 0,
"type": "integer"
},
"event_type": {
"maxLength": 80,
"pattern": "^(?!model_config_changed$|model_runtime_changed$)[a-z][a-z0-9_]+$",
"type": "string"
},
"occurred_at": {
"pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(?:\\.[0-9]{3})?Z$",
"type": "string"
},
"state_version": {
"minimum": 0,
"type": "integer"
}
},
"required": [
"entity_ref",
"event_id",
"occurred_at",
"event_type",
"state_version"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"config_set_version": {
"minimum": 0,
"type": "integer"
},
"entity_ref": {
"maxLength": 160,
"pattern": "^[a-z][a-z0-9_]*:[A-Za-z0-9_-]+$",
"type": "string"
},
"event_id": {
"minimum": 0,
"type": "integer"
},
"event_type": {
"enum": [
"model_config_changed"
],
"type": "string"
},
"occurred_at": {
"pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(?:\\.[0-9]{3})?Z$",
"type": "string"
}
},
"required": [
"entity_ref",
"event_id",
"occurred_at",
"config_set_version",
"event_type"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"entity_ref": {
"maxLength": 160,
"pattern": "^[a-z][a-z0-9_]*:[A-Za-z0-9_-]+$",
"type": "string"
},
"event_id": {
"minimum": 0,
"type": "integer"
},
"event_type": {
"enum": [
"model_runtime_changed"
],
"type": "string"
},
"occurred_at": {
"pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(?:\\.[0-9]{3})?Z$",
"type": "string"
},
"runtime_availability_version": {
"minimum": 0,
"type": "integer"
}
},
"required": [
"entity_ref",
"event_id",
"occurred_at",
"event_type",
"runtime_availability_version"
],
"type": "object"
}
]
},
"StableEngineeringErrorCode": {
"anyOf": [
{
"enum": [
"BROWSER_UNSUPPORTED"
],
"type": "string"
},
{
"enum": [
"MODEL_CONFIG_VERSION_CONFLICT"
],
"type": "string"
},
{
"enum": [
"MODEL_DEFAULT_REPLACEMENT_REQUIRED"
],
"type": "string"
},
{
"enum": [
"MODEL_DEFAULT_REPLACEMENT_INVALID"
],
"type": "string"
},
{
"enum": [
"MODEL_RECOMMENDATION_PRIORITY_INVALID"
],
"type": "string"
},
{
"enum": [
"MODEL_RECOMMENDATION_PRIORITY_CONFLICT"
],
"type": "string"
},
{
"enum": [
"PRIVATE_CONTENT_NOTICE_ACK_REQUIRED"
],
"type": "string"
},
{
"enum": [
"ASSET_HISTORY_REFERENCE_CONFLICT"
],
"type": "string"
},
{
"enum": [
"ASSET_CLEANUP_CANDIDATE_STALE"
],
"type": "string"
},
{
"enum": [
"STORAGE_CAPACITY_EXCEEDED"
],
"type": "string"
}
]
},
"StateSseEvent": {
"additionalProperties": false,
"properties": {
"entity_ref": {
"maxLength": 160,
"pattern": "^[a-z][a-z0-9_]*:[A-Za-z0-9_-]+$",
"type": "string"
},
"event_id": {
"minimum": 0,
"type": "integer"
},
"event_type": {
"maxLength": 80,
"pattern": "^(?!model_config_changed$|model_runtime_changed$)[a-z][a-z0-9_]+$",
"type": "string"
},
"occurred_at": {
"pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(?:\\.[0-9]{3})?Z$",
"type": "string"
},
"state_version": {
"minimum": 0,
"type": "integer"
}
},
"required": [
"entity_ref",
"event_id",
"occurred_at",
"event_type",
"state_version"
],
"type": "object"
}
}
},
"info": {
"title": "Dada P0-A",
"version": "0.0.0"
},
"openapi": "3.1.0",
"paths": {
"/api/v1/bootstrap": {
"get": {
"operationId": "getBootstrap",
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"additionalProperties": false,
"properties": {
"app_version": {
"maxLength": 40,
"pattern": "^[0-9]+\\.[0-9]+\\.[0-9]+(?:[-+][A-Za-z0-9.-]+)?$",
"type": "string"
},
"dependencies": {
"items": {
"additionalProperties": false,
"properties": {
"service_id": {
"maxLength": 60,
"pattern": "^[a-z][a-z0-9_-]+$",
"type": "string"
},
"status": {
"anyOf": [
{
"enum": [
"available"
],
"type": "string"
},
{
"enum": [
"paused"
],
"type": "string"
},
{
"enum": [
"degraded"
],
"type": "string"
},
{
"enum": [
"unavailable"
],
"type": "string"
}
]
}
},
"required": [
"service_id",
"status"
],
"type": "object"
},
"type": "array"
},
"model_summary": {
"additionalProperties": false,
"properties": {
"config_set_version": {
"anyOf": [
{
"minimum": 0,
"type": "integer"
},
{
"type": "null"
}
]
},
"configured_default_model_id": {
"anyOf": [
{
"maxLength": 80,
"pattern": "^[a-z0-9][a-z0-9.-]+$",
"type": "string"
},
{
"type": "null"
}
]
},
"recommended_model_id": {
"anyOf": [
{
"maxLength": 80,
"pattern": "^[a-z0-9][a-z0-9.-]+$",
"type": "string"
},
{
"type": "null"
}
]
},
"runtime_availability_version": {
"anyOf": [
{
"minimum": 0,
"type": "integer"
},
{
"type": "null"
}
]
}
},
"required": [
"config_set_version",
"configured_default_model_id",
"recommended_model_id",
"runtime_availability_version"
],
"type": "object"
},
"public_features": {
"items": {
"additionalProperties": false,
"properties": {
"feature_id": {
"maxLength": 80,
"pattern": "^[a-z][a-z0-9_-]+$",
"type": "string"
},
"status": {
"anyOf": [
{
"enum": [
"enabled"
],
"type": "string"
},
{
"enum": [
"disabled"
],
"type": "string"
},
{
"enum": [
"paused"
],
"type": "string"
}
]
}
},
"required": [
"feature_id",
"status"
],
"type": "object"
},
"type": "array"
}
},
"required": [
"app_version",
"dependencies",
"model_summary",
"public_features"
],
"type": "object"
}
}
},
"description": "Default Response"
}
},
"tags": [
"Bootstrap"
]
}
},
"/api/v1/events": {
"get": {
"operationId": "getEvents",
"responses": {
"200": {
"content": {
"text/event-stream": {
"schema": {
"anyOf": [
{
"additionalProperties": false,
"properties": {
"entity_ref": {
"maxLength": 160,
"pattern": "^[a-z][a-z0-9_]*:[A-Za-z0-9_-]+$",
"type": "string"
},
"event_id": {
"minimum": 0,
"type": "integer"
},
"event_type": {
"maxLength": 80,
"pattern": "^(?!model_config_changed$|model_runtime_changed$)[a-z][a-z0-9_]+$",
"type": "string"
},
"occurred_at": {
"pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(?:\\.[0-9]{3})?Z$",
"type": "string"
},
"state_version": {
"minimum": 0,
"type": "integer"
}
},
"required": [
"entity_ref",
"event_id",
"occurred_at",
"event_type",
"state_version"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"config_set_version": {
"minimum": 0,
"type": "integer"
},
"entity_ref": {
"maxLength": 160,
"pattern": "^[a-z][a-z0-9_]*:[A-Za-z0-9_-]+$",
"type": "string"
},
"event_id": {
"minimum": 0,
"type": "integer"
},
"event_type": {
"enum": [
"model_config_changed"
],
"type": "string"
},
"occurred_at": {
"pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(?:\\.[0-9]{3})?Z$",
"type": "string"
}
},
"required": [
"entity_ref",
"event_id",
"occurred_at",
"config_set_version",
"event_type"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"entity_ref": {
"maxLength": 160,
"pattern": "^[a-z][a-z0-9_]*:[A-Za-z0-9_-]+$",
"type": "string"
},
"event_id": {
"minimum": 0,
"type": "integer"
},
"event_type": {
"enum": [
"model_runtime_changed"
],
"type": "string"
},
"occurred_at": {
"pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(?:\\.[0-9]{3})?Z$",
"type": "string"
},
"runtime_availability_version": {
"minimum": 0,
"type": "integer"
}
},
"required": [
"entity_ref",
"event_id",
"occurred_at",
"event_type",
"runtime_availability_version"
],
"type": "object"
}
]
}
}
},
"description": "Non-sensitive state change hints. REST remains authoritative."
}
},
"tags": [
"State events"
]
}
}
}
}