跳到主要内容

ProjectStorageRequest

oneOf
projectIdstring<uuid>required

当前项目访问使用的项目 UUID;与 consumerProjectId/alias 互斥。

consumerProjectIdstring<uuid>

关联项目访问的消费项目 UUID;必须与 alias 一起提供。

aliasstring

消费项目声明中的关联项目 alias;Server 据此解析目标 UUID。

Possible values: Value must match regular expression ^[a-z][a-z0-9_-]{0,63}$

storageKindstringrequired

Possible values: [kv, persistent_value]

operationstringrequired

Possible values: [get, set, compare-and-set, knowledge-mutation]

entry object
scopeProjectStorageScoperequired

Possible values: [project, conversation]

keystringrequired
projectIdstring<uuid>

当前项目请求必填且必须等于顶层 projectId;关联项目请求不得提供。

conversationIdstring
value

set 和 compare-and-set 操作必填;必须是 JSON value 且不能省略。

expectedRevisionstring | nullnullable

compare-and-set 操作必填。传入 get 返回的 revision;首次创建没有值时传 null。

source object
projectIdstring<uuid>

当前项目请求必须等于 projectId;关联项目请求必须等于 consumerProjectId。

runIdstring
conversationIdstring
namespace object
scopestringrequired
Constant value: project
projectIdstring<uuid>required

必须等于请求 projectId。

mutation object
typestringrequired

Possible values: [create, edit, delete]

input objectrequired
oneOf
idstring

可选文档 id。省略时 server 根据 title 生成。

titlestringrequired
markdownstringrequired
ProjectStorageRequest
{
"projectId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"consumerProjectId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"alias": "string",
"storageKind": "kv",
"operation": "get",
"entry": {
"scope": "project",
"key": "string",
"projectId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"conversationId": "string"
},
"expectedRevision": "string",
"source": {
"projectId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"runId": "string",
"conversationId": "string"
},
"namespace": {
"scope": "project",
"projectId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
},
"mutation": {
"type": "create",
"input": {
"id": "string",
"title": "string",
"markdown": "string"
}
}
}