feat(api): publish message history direction
Expose reverse_order in the SDK request types and regenerate the MCP action catalog for group and private message history. Describe the anchored older-or-newer semantics and retain true as the backward-compatible default for existing clients. Refs #229
This commit is contained in:
@@ -3075,6 +3075,16 @@
|
||||
"minimum": 0
|
||||
},
|
||||
"default": 20
|
||||
},
|
||||
{
|
||||
"name": "reverse_order",
|
||||
"type": "bool",
|
||||
"required": false,
|
||||
"schema": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"default": true,
|
||||
"desc": "仅在 message_id 非 0 时生效;true 返回锚点及更旧消息,false 返回锚点及更新消息"
|
||||
}
|
||||
],
|
||||
"invariants": [],
|
||||
@@ -3095,6 +3105,11 @@
|
||||
"type": "integer",
|
||||
"minimum": 0,
|
||||
"default": 20
|
||||
},
|
||||
"reverse_order": {
|
||||
"type": "boolean",
|
||||
"description": "仅在 message_id 非 0 时生效;true 返回锚点及更旧消息,false 返回锚点及更新消息",
|
||||
"default": true
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -4436,6 +4451,16 @@
|
||||
"minimum": 0
|
||||
},
|
||||
"default": 20
|
||||
},
|
||||
{
|
||||
"name": "reverse_order",
|
||||
"type": "bool",
|
||||
"required": false,
|
||||
"schema": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"default": true,
|
||||
"desc": "仅在 message_id 非 0 时生效;true 返回锚点及更旧消息,false 返回锚点及更新消息"
|
||||
}
|
||||
],
|
||||
"invariants": [],
|
||||
@@ -4457,6 +4482,11 @@
|
||||
"type": "integer",
|
||||
"minimum": 0,
|
||||
"default": 20
|
||||
},
|
||||
"reverse_order": {
|
||||
"type": "boolean",
|
||||
"description": "仅在 message_id 非 0 时生效;true 返回锚点及更旧消息,false 返回锚点及更新消息",
|
||||
"default": true
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
|
||||
@@ -3078,6 +3078,16 @@ export const ACTIONS: CatalogAction[] = [
|
||||
"minimum": 0
|
||||
},
|
||||
"default": 20
|
||||
},
|
||||
{
|
||||
"name": "reverse_order",
|
||||
"type": "bool",
|
||||
"required": false,
|
||||
"schema": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"default": true,
|
||||
"desc": "仅在 message_id 非 0 时生效;true 返回锚点及更旧消息,false 返回锚点及更新消息"
|
||||
}
|
||||
],
|
||||
"invariants": [],
|
||||
@@ -3098,6 +3108,11 @@ export const ACTIONS: CatalogAction[] = [
|
||||
"type": "integer",
|
||||
"minimum": 0,
|
||||
"default": 20
|
||||
},
|
||||
"reverse_order": {
|
||||
"type": "boolean",
|
||||
"description": "仅在 message_id 非 0 时生效;true 返回锚点及更旧消息,false 返回锚点及更新消息",
|
||||
"default": true
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -4439,6 +4454,16 @@ export const ACTIONS: CatalogAction[] = [
|
||||
"minimum": 0
|
||||
},
|
||||
"default": 20
|
||||
},
|
||||
{
|
||||
"name": "reverse_order",
|
||||
"type": "bool",
|
||||
"required": false,
|
||||
"schema": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"default": true,
|
||||
"desc": "仅在 message_id 非 0 时生效;true 返回锚点及更旧消息,false 返回锚点及更新消息"
|
||||
}
|
||||
],
|
||||
"invariants": [],
|
||||
@@ -4460,6 +4485,11 @@ export const ACTIONS: CatalogAction[] = [
|
||||
"type": "integer",
|
||||
"minimum": 0,
|
||||
"default": 20
|
||||
},
|
||||
"reverse_order": {
|
||||
"type": "boolean",
|
||||
"description": "仅在 message_id 非 0 时生效;true 返回锚点及更旧消息,false 返回锚点及更新消息",
|
||||
"default": true
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
|
||||
@@ -194,6 +194,8 @@ export interface SetGroupReactionParams extends JsonObject {
|
||||
export interface GetMessageHistoryParams extends JsonObject {
|
||||
message_id?: number;
|
||||
count?: number;
|
||||
/** With a non-zero message_id, include the anchor and query older (`true`) or newer (`false`) messages. Defaults to `true`. */
|
||||
reverse_order?: boolean;
|
||||
}
|
||||
|
||||
export interface GetGroupMessageHistoryParams extends GroupIdParams, GetMessageHistoryParams {}
|
||||
|
||||
Reference in New Issue
Block a user