patchMyProposal
修改或撤回提案
需要 If-Match。需要用户访问令牌。令牌须带 catalog:edit scope。
/v2/me/proposals/{id}Authorization: Bearer <用户访问令牌>(用户授权后的访问令牌,不是 API 密钥)参数
| 参数 | 类型 | 位置 | 说明 |
|---|---|---|---|
id 必填 | string | path | 提案 id。 |
If-Match 必填 | string | header | 当前 ETag。必填;缺席为 428 PRECONDITION_REQUIRED。 |
请求体
application/json
patchmap<string, object>字段键到要修订的新值。
«key»object
statestring设为 withdrawn 以撤回。
枚举withdrawn
响应
amendmentsobject[]仅当 include=amendments 时出现。没有则为空数组。
amenderobject必填 可空amender_uid 对应的账号。仅在账号目录读取失败时为 null。
amender_uidstring必填修正者的中央账号 id。不是 catalog id。
created_atstringdate-time 必填RFC 3339 UTC。
idstring必填修订 id。
notestring必填修订者自己的摘要。不得用作判别条件。
objectstring必填类型判别字段。恒为 amendment。
枚举amendmentseqintegerint64 必填在此提案 amendment 链中的位置。
base_revision_seqintegerint64 必填本提案写就时所对照的修订 seq。
changed_fieldsstring[]include=patch 时出现。effective_patch 写入的字段键,已排序。
conflict_fieldsstring[]未关闭的提案在 include=patch 时出现。effective_patch 中被 base_revision_seq 之后记录的修订同样改动过的字段键:合并会覆盖那次后来的改动。没有时为空数组。
created_atstringdate-time 必填RFC 3339 UTC。
creationobjectparamsmap<string, object>必填提案提交时携带的创建参数(如发行的 work_id)。该家族不接受参数时为空对象。
decided_atstringdate-time 必填 可空RFC 3339 UTC。仍开放时为 null。
decided_byobject必填 可空decided_by_uid 对应的账号。提案仍待处理时,或账号目录读取失败时为 null。
avatarstringuri 必填 可空头像的绝对 URL。账号没有头像时为 null。
idstring必填中央账号 id,与记录中 *_uid 字段的值相同。
namestring必填显示名。已注销或已删除的账号显示为 已注销#<id>。不得用作判别字段。
objectstring必填类型判别字段。恒为 user。
枚举user
decided_by_uidstring必填 可空裁决者的中央账号 id。仍开放时为 null。
effective_patchmap<string, object>仅当 include=patch 时出现。把每条修正都折叠进去之后的 patch;这是合入时会写入的内容。
«key»object
entity_idstring必填目标 catalog id。
entity_typestring必填编辑引擎类型,例如 catalog.work。不得用作判别条件。
idstring必填提案 id。
notestring必填提案人自己写的摘要。不得用作判别条件。
objectstring必填类型判别字段。恒为 proposal。
枚举proposalorigin_sitestring必填 可空这次编辑来自哪个站点:kungal(鲲 Galgame 论坛)、moyu、letmoe、nextmoe,直接打开编辑台时为 editor。仅用于归因,从不作为权限依据。早于来源记录(2026-10-21)的记录与批处理工具写入的记录为 null。GET /v2/vocabularies/origin_site 给出各站点的显示名与用户主页 URL 模板。
枚举kungalmoyuletmoenextmoeeditorpatchmap<string, object>仅当 include=patch 时出现;该块只由 me 面与 moderation 面下发。字段键到拟议值。
«key»object
proposerobject必填 可空proposer_uid 对应的账号。仅在账号目录读取失败时为 null。
avatarstringuri 必填 可空头像的绝对 URL。账号没有头像时为 null。
idstring必填中央账号 id,与记录中 *_uid 字段的值相同。
namestring必填显示名。已注销或已删除的账号显示为 已注销#<id>。不得用作判别字段。
objectstring必填类型判别字段。恒为 user。
枚举user
proposer_uidstring必填提案者的中央账号 id,在每个第一方站点上都是同一个 id。不是 catalog id。
sitestring必填本提案提交时所在的租户。开放词表;不得用作判别条件。
statestring必填提案生命周期状态。
枚举openmergeddeclinedwithdrawntarget_objectstring必填本提案所针对实体的族。
枚举workcompanycharacterreleasetagengineseriespersoncredit_nametraitwalkthroughupdated_atstringdate-time 必填RFC 3339 UTC。
请求示例
curl -X PATCH "https://api.nextmoe.dev/v2/me/proposals/1" \
-H "Authorization: Bearer <ACCESS_TOKEN>" \
-H "Content-Type: application/json" \
-d '{"patch":{"key":"string"},"state":"withdrawn"}'