feat: complete TASK-WP4-03 text templates

This commit is contained in:
suyx
2026-08-03 11:40:45 +08:00
parent d16802c164
commit dd7a23a281
24 changed files with 1934 additions and 20 deletions
+224
View File
@@ -3855,6 +3855,113 @@
}
]
},
"RecentAssetItem": {
"additionalProperties": false,
"properties": {
"asset_id": {
"maxLength": 120,
"pattern": "^[A-Za-z0-9][A-Za-z0-9_.:-]{0,119}$",
"type": "string"
},
"asset_kind": {
"$ref": "#/components/schemas/RecentAssetKind"
},
"resource_version": {
"maxLength": 120,
"pattern": "^[A-Za-z0-9][A-Za-z0-9_.:-]{0,119}$",
"type": "string"
}
},
"required": [
"asset_id",
"asset_kind",
"resource_version"
],
"type": "object"
},
"RecentAssetKind": {
"anyOf": [
{
"enum": [
"static_sticker"
],
"type": "string"
},
{
"enum": [
"text_template"
],
"type": "string"
}
]
},
"RecentAssetListResponse": {
"additionalProperties": false,
"properties": {
"items": {
"items": {
"$ref": "#/components/schemas/RecentAssetItem"
},
"maxItems": 12,
"type": "array"
}
},
"required": [
"items"
],
"type": "object"
},
"RecentAssetQuery": {
"additionalProperties": false,
"properties": {
"asset_kind": {
"$ref": "#/components/schemas/RecentAssetKind"
}
},
"required": [
"asset_kind"
],
"type": "object"
},
"RecentAssetRecordRequest": {
"additionalProperties": false,
"properties": {
"asset_id": {
"maxLength": 120,
"pattern": "^[A-Za-z0-9][A-Za-z0-9_.:-]{0,119}$",
"type": "string"
},
"asset_kind": {
"$ref": "#/components/schemas/RecentAssetKind"
},
"resource_version": {
"maxLength": 120,
"pattern": "^[A-Za-z0-9][A-Za-z0-9_.:-]{0,119}$",
"type": "string"
}
},
"required": [
"asset_id",
"asset_kind",
"resource_version"
],
"type": "object"
},
"RecentAssetRecordResponse": {
"additionalProperties": false,
"properties": {
"status": {
"enum": [
"recorded"
],
"type": "string"
}
},
"required": [
"status"
],
"type": "object"
},
"RegistrationCompleteHeaders": {
"additionalProperties": true,
"properties": {
@@ -7983,6 +8090,123 @@
]
}
},
"/api/v1/assets/recent": {
"get": {
"operationId": "listRecentAssets",
"parameters": [
{
"in": "query",
"name": "asset_kind",
"required": true,
"schema": {
"$ref": "#/components/schemas/RecentAssetKind"
}
}
],
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/RecentAssetListResponse"
}
}
},
"description": "Default Response"
},
"400": {
"description": "Default Response"
},
"401": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorEnvelope"
}
}
},
"description": "Default Response"
},
"503": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorEnvelope"
}
}
},
"description": "Default Response"
}
},
"tags": [
"Assets"
]
},
"post": {
"operationId": "recordRecentAsset",
"parameters": [
{
"in": "header",
"name": "x-csrf-token",
"required": true,
"schema": {
"maxLength": 64,
"minLength": 43,
"pattern": "^[A-Za-z0-9_-]+$",
"type": "string"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/RecentAssetRecordRequest"
}
}
},
"required": true
},
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/RecentAssetRecordResponse"
}
}
},
"description": "Default Response"
},
"400": {
"description": "Default Response"
},
"401": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorEnvelope"
}
}
},
"description": "Default Response"
},
"503": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorEnvelope"
}
}
},
"description": "Default Response"
}
},
"tags": [
"Assets"
]
}
},
"/api/v1/auth/login/complete": {
"post": {
"operationId": "completeLogin",