更新外部编辑器 OpenAPI 契约

补齐外部生成请求的画布写回字段

同步视频生成参数范围和队列状态响应

补充素材与项目资源返回字段

(cherry picked from commit 287c9cc2f86f0b319ef0c34bc45f8d59a744d0f7)
This commit is contained in:
2026-06-30 15:20:59 +08:00
parent dbb651e1f4
commit 65acf9f429
+368 -10
View File
@@ -2280,6 +2280,27 @@
"updatedAt": {
"type": "string",
"format": "date-time"
},
"ownerUserId": {
"type": [
"string",
"null"
]
},
"authorDisplayName": {
"type": [
"string",
"null"
]
},
"authorPublicUserCode": {
"type": [
"string",
"null"
]
},
"publicShowcaseEnabled": {
"type": "boolean"
}
}
},
@@ -2436,6 +2457,24 @@
"updatedAt": {
"type": "string",
"format": "date-time"
},
"thumbnailSrc": {
"type": [
"string",
"null"
]
},
"sourceResourceId": {
"type": [
"string",
"null"
]
},
"publicShowcaseEnabled": {
"type": [
"boolean",
"null"
]
}
}
},
@@ -2579,7 +2618,6 @@
"EditorCanvasGenerationCompletion": {
"type": "object",
"required": [
"dialogId",
"title",
"placeholder"
],
@@ -2680,6 +2718,31 @@
"string",
"null"
]
},
"size": {
"type": "string"
},
"model": {
"type": "string"
},
"referenceImageSrcs": {
"type": "array",
"items": {
"type": "string",
"description": "图片 Data URL、asset://、OSS object key 或公网 URL。"
},
"maxItems": 8
},
"canvasCompletion": {
"anyOf": [
{
"$ref": "#/components/schemas/EditorCanvasGenerationCompletion"
},
{
"type": "null"
}
],
"description": "带项目上下文生成时,服务端据此直接写入画布完成态并返回最新项目快照。"
}
},
"additionalProperties": false
@@ -2791,7 +2854,8 @@
"items": {
"type": "string",
"description": "额外图标素材参考图 Data URL 或 objectKey;上传参考图优先提交 objectKey。"
}
},
"maxItems": 8
},
"iconDescriptions": {
"type": "array",
@@ -2839,6 +2903,17 @@
"string",
"null"
]
},
"canvasCompletion": {
"anyOf": [
{
"$ref": "#/components/schemas/EditorCanvasGenerationCompletion"
},
{
"type": "null"
}
],
"description": "带项目上下文生成时,服务端据此直接写入画布完成态并返回最新项目快照。"
}
},
"additionalProperties": false
@@ -2865,7 +2940,8 @@
"items": {
"type": "string",
"description": "额外 UI 素材参考图 Data URL 或 objectKey;上传参考图优先提交 objectKey。"
}
},
"maxItems": 5
},
"aspectRatio": {
"type": "string",
@@ -2900,6 +2976,17 @@
"string",
"null"
]
},
"canvasCompletion": {
"anyOf": [
{
"$ref": "#/components/schemas/EditorCanvasGenerationCompletion"
},
{
"type": "null"
}
],
"description": "带项目上下文生成时,服务端据此直接写入画布完成态并返回最新项目快照。"
}
},
"additionalProperties": false
@@ -3021,6 +3108,17 @@
"type": "null"
}
]
},
"project": {
"anyOf": [
{
"$ref": "#/components/schemas/EditorProject"
},
{
"type": "null"
}
],
"description": "当请求携带 canvasCompletion 且服务端成功写入画布布局时返回最新项目快照。"
}
}
},
@@ -3097,6 +3195,32 @@
"model": {
"type": "string",
"const": "seedance2.0-fast"
},
"projectId": {
"type": [
"string",
"null"
]
},
"canvasCompletion": {
"anyOf": [
{
"$ref": "#/components/schemas/EditorCanvasGenerationCompletion"
},
{
"type": "null"
}
],
"description": "带项目上下文生成时,服务端据此直接写入画布完成态并返回最新项目快照。"
},
"generationInputs": {
"$ref": "#/components/schemas/JsonValue"
},
"sourceResourceId": {
"type": [
"string",
"null"
]
}
},
"additionalProperties": false
@@ -3188,6 +3312,27 @@
"priceMudPoints": {
"type": "integer",
"minimum": 0
},
"project": {
"anyOf": [
{
"$ref": "#/components/schemas/EditorProject"
},
{
"type": "null"
}
],
"description": "当请求携带 canvasCompletion 且服务端成功写入画布布局时返回最新项目快照。"
},
"queueState": {
"anyOf": [
{
"$ref": "#/components/schemas/ExternalGenerationJobStatusRecord"
},
{
"type": "null"
}
]
}
}
},
@@ -3221,20 +3366,26 @@
},
"aspectRatio": {
"type": "string",
"const": "16:9"
"enum": [
"16:9",
"9:16",
"1:1",
"4:3",
"3:4",
"21:9"
]
},
"durationSeconds": {
"type": "integer",
"enum": [
4,
5
]
"minimum": 4,
"maximum": 15
},
"resolution": {
"type": "string",
"enum": [
"480p",
"720p"
"720p",
"1080p"
]
},
"mode": {
@@ -3243,7 +3394,10 @@
},
"sound": {
"type": "string",
"const": "off"
"enum": [
"on",
"off"
]
},
"referenceImageSrcs": {
"type": "array",
@@ -3268,6 +3422,56 @@
"description": "公网 URL、asset://、OSS object key 或音频 Data URL。仅 Seedance 2.0 系列支持。"
},
"maxItems": 3
},
"webSearchEnabled": {
"type": "boolean",
"default": true,
"description": "是否允许视频模型联网增强提示;未传时默认开启。"
},
"projectId": {
"type": [
"string",
"null"
]
},
"canvasCompletion": {
"anyOf": [
{
"$ref": "#/components/schemas/EditorCanvasGenerationCompletion"
},
{
"type": "null"
}
],
"description": "带项目上下文生成时,服务端据此直接写入画布完成态并返回最新项目快照。"
},
"generationInputs": {
"$ref": "#/components/schemas/JsonValue"
},
"sourceResourceId": {
"type": [
"string",
"null"
]
},
"assetKind": {
"type": [
"string",
"null"
]
},
"assetFolderId": {
"type": [
"string",
"null"
]
},
"assetLabel": {
"type": [
"string",
"null"
],
"description": "写入素材库时使用的素材名称。"
}
},
"additionalProperties": false
@@ -3347,6 +3551,53 @@
"priceMudPoints": {
"type": "integer",
"minimum": 0
},
"thumbnailSrc": {
"type": [
"string",
"null"
]
},
"resource": {
"anyOf": [
{
"$ref": "#/components/schemas/EditorProjectResource"
},
{
"type": "null"
}
]
},
"asset": {
"anyOf": [
{
"$ref": "#/components/schemas/EditorAsset"
},
{
"type": "null"
}
]
},
"project": {
"anyOf": [
{
"$ref": "#/components/schemas/EditorProject"
},
{
"type": "null"
}
],
"description": "当请求携带 canvasCompletion 且服务端成功写入画布布局时返回最新项目快照。"
},
"queueState": {
"anyOf": [
{
"$ref": "#/components/schemas/ExternalGenerationJobStatusRecord"
},
{
"type": "null"
}
]
}
}
},
@@ -3372,6 +3623,26 @@
"type": "integer",
"minimum": 2,
"maximum": 10
},
"projectId": {
"type": [
"string",
"null"
]
},
"canvasCompletion": {
"anyOf": [
{
"$ref": "#/components/schemas/EditorCanvasGenerationCompletion"
},
{
"type": "null"
}
],
"description": "带项目上下文生成时,服务端据此直接写入画布完成态并返回最新项目快照。"
},
"generationInputs": {
"$ref": "#/components/schemas/JsonValue"
}
},
"additionalProperties": false
@@ -3390,6 +3661,26 @@
"makeInstrumental": {
"type": "boolean",
"const": true
},
"projectId": {
"type": [
"string",
"null"
]
},
"canvasCompletion": {
"anyOf": [
{
"$ref": "#/components/schemas/EditorCanvasGenerationCompletion"
},
{
"type": "null"
}
],
"description": "带项目上下文生成时,服务端据此直接写入画布完成态并返回最新项目快照。"
},
"generationInputs": {
"$ref": "#/components/schemas/JsonValue"
}
},
"additionalProperties": false
@@ -3468,8 +3759,75 @@
"sound-effect",
"background-music"
]
},
"project": {
"anyOf": [
{
"$ref": "#/components/schemas/EditorProject"
},
{
"type": "null"
}
],
"description": "当请求携带 canvasCompletion 且服务端成功写入画布布局时返回最新项目快照。"
},
"queueState": {
"anyOf": [
{
"$ref": "#/components/schemas/ExternalGenerationJobStatusRecord"
},
{
"type": "null"
}
]
}
}
},
"ExternalGenerationJobStatusRecord": {
"type": "object",
"required": [
"operationId",
"status",
"phaseLabel",
"phaseDetail",
"progress",
"updatedAtMicros"
],
"properties": {
"operationId": {
"type": "string"
},
"status": {
"type": "string",
"enum": [
"queued",
"running",
"completed",
"failed"
]
},
"phaseLabel": {
"type": "string"
},
"phaseDetail": {
"type": "string"
},
"progress": {
"type": "integer",
"minimum": 0,
"maximum": 100
},
"error": {
"type": [
"string",
"null"
]
},
"updatedAtMicros": {
"type": "integer"
}
},
"additionalProperties": false
}
}
}