docs(contract): 优化 API summary/description,对齐工具箱端对接指南文档

This commit is contained in:
2026-03-06 14:30:09 +08:00
parent 9296ab31e4
commit 86754f73c1
2 changed files with 14 additions and 12 deletions

View File

@@ -11,8 +11,9 @@ export const get = oc
method: 'POST', method: 'POST',
path: '/config/get', path: '/config/get',
operationId: 'configGet', operationId: 'configGet',
summary: '读取 UX 本地身份配置', summary: '读取本机身份配置',
description: '返回 UX 当前存储的 licence 与本机 fingerprint。', description:
'返回 UX 本地持久化的 licence 和本机计算的设备特征码fingerprint。工具箱端可据此判断是否已完成本地身份初始化。',
tags: ['Config'], tags: ['Config'],
}) })
.input(z.object({})) .input(z.object({}))
@@ -23,8 +24,9 @@ export const setLicence = oc
method: 'POST', method: 'POST',
path: '/config/set-licence', path: '/config/set-licence',
operationId: 'configSetLicence', operationId: 'configSetLicence',
summary: '设置本地 licence', summary: '写入本地 licence',
description: '写入或更新 UX 本地 licence。fingerprint 始终由 UX 本机计算。', description:
'写入或更新本机持久化的 licence。设备特征码fingerprint始终由 UX 本机自动计算,无需外部传入。此接口应在设备授权流程前调用。',
tags: ['Config'], tags: ['Config'],
}) })
.input( .input(

View File

@@ -6,9 +6,9 @@ export const encryptDeviceInfo = oc
method: 'POST', method: 'POST',
path: '/crypto/encrypt-device-info', path: '/crypto/encrypt-device-info',
operationId: 'encryptDeviceInfo', operationId: 'encryptDeviceInfo',
summary: '加密设备信息', summary: '生成设备授权二维码密文',
description: description:
'读取 UX 本地存储的 licence 与 fingerprint组装为 UTF-8 JSON 字符串后,使用平台公钥执行 RSA-OAEP 加密返回 Base64 密文。', '将本机 licence 与 fingerprint 组装为 JSON使用平台 RSA 公钥RSA-OAEP + SHA-256加密返回 Base64 密文,供工具箱生成设备授权二维码。参见《工具箱端 - 设备授权二维码生成指南》。',
tags: ['Crypto'], tags: ['Crypto'],
}) })
.input( .input(
@@ -27,9 +27,9 @@ export const decryptTask = oc
method: 'POST', method: 'POST',
path: '/crypto/decrypt-task', path: '/crypto/decrypt-task',
operationId: 'decryptTask', operationId: 'decryptTask',
summary: '解密 AES-GCM 密文', summary: '解密任务二维码数据',
description: description:
'读取 UX 本地存储的 licence 与 fingerprintUTF-8 直接拼接(无分隔符)后取 SHA256 作为 AES-256-GCM 密钥,解密 Base64 密文。', '使用本机 licence 与 fingerprint 派生 AES-256-GCM 密钥SHA-256解密 App 任务二维码中的 Base64 密文,返回任务信息明文。参见《工具箱端 - 任务二维码解密指南》。',
tags: ['Crypto'], tags: ['Crypto'],
}) })
.input( .input(
@@ -48,9 +48,9 @@ export const encryptSummary = oc
method: 'POST', method: 'POST',
path: '/crypto/encrypt-summary', path: '/crypto/encrypt-summary',
operationId: 'encryptSummary', operationId: 'encryptSummary',
summary: '加密文本内容', summary: '加密摘要信息',
description: description:
'读取 UX 本地存储的 licence 与 fingerprint,使用 HKDF-SHA256 + AES-256-GCM 加密明文文本,返回 Base64 密文。', '使用本机 licence 与 fingerprint 通过 HKDF-SHA256 派生密钥,以 AES-256-GCM 加密检查摘要明文并返回 Base64 密文,供工具箱生成摘要信息二维码。参见《工具箱端 - 摘要信息二维码生成指南》。',
tags: ['Crypto'], tags: ['Crypto'],
}) })
.input( .input(
@@ -70,9 +70,9 @@ export const signAndPackReport = oc
method: 'POST', method: 'POST',
path: '/crypto/sign-and-pack-report', path: '/crypto/sign-and-pack-report',
operationId: 'signAndPackReport', operationId: 'signAndPackReport',
summary: '签名并打包 ZIP', summary: '签名并打包检查报告',
description: description:
'读取 UX 本地存储的 licence 与 fingerprint结合签名材料处理原始 ZIP,生成 summary.json、META-INF/manifest.json、META-INF/signature.asc,并返回签名后 ZIP 二进制文件。', '对原始报告 ZIP 执行设备签名HKDF + HMAC-SHA256与 OpenPGP 分离式签名,生成 summary.json、META-INF/manifest.json、META-INF/signature.asc 的签名报告 ZIP 文件。参见《工具箱端 - 报告加密与签名生成指南》。',
tags: ['Crypto', 'Report'], tags: ['Crypto', 'Report'],
}) })
.input( .input(