feat(onebot): expose system face catalog queries
Add read-only actions for catalog retrieval, per-face lookup, search, and super-face classification. Publish matching SDK methods and generated MCP schemas, including valid face ID zero.
This commit is contained in:
11 files changed
+1257
-3
No files matched your search
@@ -409,6 +409,28 @@ export abstract class SnowLumaApiClient {
|
||||
return this.call('set_msg_emoji_like', { message_id: messageId, emoji_id: emojiId, set }, options);
|
||||
}
|
||||
|
||||
fetchSysFaces(refresh = false, options?: RequestOptions) {
|
||||
return this.call('fetch_sys_faces', { refresh }, options);
|
||||
}
|
||||
|
||||
fetchFaceEntity(faceId: number, options: RequestOptions & { refresh?: boolean } = {}) {
|
||||
return this.call('fetch_face_entity', {
|
||||
face_id: faceId,
|
||||
refresh: options.refresh ?? false,
|
||||
}, options);
|
||||
}
|
||||
|
||||
searchSysFaces(query: string, options?: RequestOptions) {
|
||||
return this.call('search_sys_faces', { query }, options);
|
||||
}
|
||||
|
||||
fetchSuperFaceId(faceId: number, options: RequestOptions & { refresh?: boolean } = {}) {
|
||||
return this.call('fetch_super_face_id', {
|
||||
face_id: faceId,
|
||||
refresh: options.refresh ?? false,
|
||||
}, options);
|
||||
}
|
||||
|
||||
markAllAsRead(options?: RequestOptions) {
|
||||
return this.call('_mark_all_as_read', {}, options);
|
||||
}
|
||||
|
||||
@@ -7,6 +7,8 @@ import type {
|
||||
DomainParams,
|
||||
DownloadFileParams,
|
||||
FetchCustomFaceParams,
|
||||
FetchFaceEntityParams,
|
||||
FetchSysFacesParams,
|
||||
FetchEmojiLikeParams,
|
||||
ForwardMessageParams,
|
||||
FriendPokeParams,
|
||||
@@ -70,6 +72,7 @@ import type {
|
||||
AiVoiceParams,
|
||||
DeleteGroupFolderParams,
|
||||
SendPacketParams,
|
||||
SearchSysFacesParams,
|
||||
} from './params';
|
||||
import type {
|
||||
CapabilityInfo,
|
||||
@@ -100,6 +103,10 @@ import type {
|
||||
UserOnlineStatus,
|
||||
SendGroupAiRecordResult,
|
||||
CollectionListInfo,
|
||||
SuperFaceInfo,
|
||||
SystemFaceCatalogInfo,
|
||||
SystemFaceInfo,
|
||||
SystemFaceSearchInfo,
|
||||
} from './results';
|
||||
|
||||
export type ActionData = JsonValue;
|
||||
@@ -200,6 +207,10 @@ export interface SnowLumaActionMap {
|
||||
get_recent_contact: { params: JsonObject; data: JsonArray };
|
||||
get_profile_like: { params: JsonObject; data: JsonObject };
|
||||
fetch_custom_face: { params: FetchCustomFaceParams; data: string[] };
|
||||
fetch_sys_faces: { params: FetchSysFacesParams; data: SystemFaceCatalogInfo };
|
||||
fetch_face_entity: { params: FetchFaceEntityParams; data: SystemFaceInfo | null };
|
||||
search_sys_faces: { params: SearchSysFacesParams; data: SystemFaceSearchInfo };
|
||||
fetch_super_face_id: { params: FetchFaceEntityParams; data: SuperFaceInfo };
|
||||
get_emoji_likes: { params: GetEmojiLikesParams; data: JsonObject };
|
||||
fetch_emoji_like: { params: FetchEmojiLikeParams; data: JsonObject };
|
||||
get_friends_with_category: { params: JsonObject; data: FriendCategoryResult[] };
|
||||
|
||||
@@ -302,6 +302,18 @@ export interface FetchCustomFaceParams extends JsonObject {
|
||||
count?: number;
|
||||
}
|
||||
|
||||
export interface FetchSysFacesParams extends JsonObject {
|
||||
refresh?: boolean;
|
||||
}
|
||||
|
||||
export interface FetchFaceEntityParams extends FetchSysFacesParams {
|
||||
face_id: number;
|
||||
}
|
||||
|
||||
export interface SearchSysFacesParams extends JsonObject {
|
||||
query: string;
|
||||
}
|
||||
|
||||
export interface GetCollectionListParams extends JsonObject {
|
||||
/** Collection category ID; 0 returns every category. */
|
||||
category?: number;
|
||||
|
||||
@@ -175,6 +175,38 @@ export interface CollectionListInfo extends JsonObject {
|
||||
collectionSearchList: CollectionSearchListInfo;
|
||||
}
|
||||
|
||||
export interface SystemFaceInfo extends JsonObject {
|
||||
q_sid: string;
|
||||
q_des: string;
|
||||
em_code: string;
|
||||
q_cid: number | null;
|
||||
ani_sticker_type: number | null;
|
||||
ani_sticker_pack_id: number | null;
|
||||
ani_sticker_id: number | null;
|
||||
url: string | null;
|
||||
emoji_name_alias: string[];
|
||||
ani_sticker_width: number | null;
|
||||
ani_sticker_height: number | null;
|
||||
is_super: boolean;
|
||||
}
|
||||
|
||||
export interface SystemFacePackInfo extends JsonObject {
|
||||
pack_name: string;
|
||||
emojis: SystemFaceInfo[];
|
||||
}
|
||||
|
||||
export interface SystemFaceCatalogInfo extends JsonObject {
|
||||
packs: SystemFacePackInfo[];
|
||||
}
|
||||
|
||||
export interface SystemFaceSearchInfo extends JsonObject {
|
||||
faces: SystemFaceInfo[];
|
||||
}
|
||||
|
||||
export interface SuperFaceInfo extends JsonObject {
|
||||
is_super: boolean;
|
||||
}
|
||||
|
||||
export interface UrlSafetyInfo {
|
||||
level: number;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user