34 files changed
+2427
-211
No files matched your search
@@ -297,8 +297,12 @@ export abstract class SnowLumaApiClient {
|
||||
return this.call('delete_msg', { message_id: messageId }, options);
|
||||
}
|
||||
|
||||
getFriendList(options?: RequestOptions) {
|
||||
return this.call('get_friend_list', {}, options);
|
||||
getFriendList(options?: RequestOptions & { withProfile?: boolean }) {
|
||||
return this.call(
|
||||
'get_friend_list',
|
||||
options?.withProfile === undefined ? {} : { with_profile: options.withProfile },
|
||||
options,
|
||||
);
|
||||
}
|
||||
|
||||
getStrangerInfo(userId: number, options?: RequestOptions) {
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import type { JsonArray, JsonObject, JsonValue } from './json.js';
|
||||
import type {
|
||||
GetFriendListParams,
|
||||
CreateGroupFileFolderParams,
|
||||
DeleteFriendParams,
|
||||
DeleteGroupFileFolderParams,
|
||||
@@ -149,6 +150,8 @@ import type {
|
||||
EmptyData,
|
||||
ForwardMessageResult,
|
||||
FriendCategoryResult,
|
||||
FriendInfo,
|
||||
StrangerInfo,
|
||||
FriendMessageHistory,
|
||||
GroupAdminSettings,
|
||||
GroupAdminPermissions,
|
||||
@@ -230,8 +233,8 @@ export interface SnowLumaActionMap {
|
||||
send_group_msg: { params: SendGroupMsgParams; data: SendMessageResult };
|
||||
get_msg: { params: MessageIdParams; data: JsonObject };
|
||||
delete_msg: { params: MessageIdParams; data: EmptyData };
|
||||
get_friend_list: { params: JsonObject; data: JsonObject[] };
|
||||
get_stranger_info: { params: UserIdParams; data: JsonObject };
|
||||
get_friend_list: { params: GetFriendListParams; data: FriendInfo[] };
|
||||
get_stranger_info: { params: UserIdParams; data: StrangerInfo };
|
||||
delete_friend: { params: DeleteFriendParams; data: EmptyData };
|
||||
get_group_list: { params: GetGroupListParams; data: JsonObject[] };
|
||||
get_group_info: { params: GetGroupInfoParams; data: JsonObject };
|
||||
@@ -330,7 +333,7 @@ export interface SnowLumaActionMap {
|
||||
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[] };
|
||||
get_friends_with_category: { params: GetFriendListParams; data: FriendCategoryResult[] };
|
||||
set_friends_category: { params: SetFriendsCategoryParams; data: EmptyData };
|
||||
get_online_clients: { params: GetOnlineClientsParams; data: OnlineClientsInfo };
|
||||
_get_model_show: { params: JsonObject; data: { variants: JsonArray } };
|
||||
|
||||
@@ -804,3 +804,7 @@ export type DownloadFileStreamParams = JsonObject & {
|
||||
export interface TestDownloadStreamParams extends JsonObject {
|
||||
error?: ActionBooleanInput;
|
||||
}
|
||||
export interface GetFriendListParams extends JsonObject {
|
||||
/** Query missing public profiles explicitly; cached per account for five minutes. */
|
||||
with_profile?: boolean;
|
||||
}
|
||||
@@ -105,10 +105,58 @@ export interface GroupNoticeInfo {
|
||||
send_to_new_members: boolean;
|
||||
}
|
||||
|
||||
export interface CategorizedFriend {
|
||||
export interface ProfilePrivilege extends JsonObject {
|
||||
type?: number;
|
||||
level?: number;
|
||||
flag?: number;
|
||||
is_big?: number;
|
||||
jump_url?: string;
|
||||
icon_url?: string;
|
||||
deluxe_icon_url?: string;
|
||||
}
|
||||
|
||||
/** Fields are present only when supplied by QQ; empty strings, false and zero are valid. */
|
||||
export interface PublicProfileFields extends JsonObject {
|
||||
long_nick?: string;
|
||||
sex?: 'male' | 'female' | 'unknown';
|
||||
age?: number;
|
||||
level?: number;
|
||||
birthday_year?: number;
|
||||
birthday_month?: number;
|
||||
birthday_day?: number;
|
||||
phone_num?: string;
|
||||
email?: string;
|
||||
country?: string;
|
||||
province?: string;
|
||||
city?: string;
|
||||
college?: string;
|
||||
is_qq_vip?: boolean;
|
||||
is_vip?: boolean;
|
||||
is_years_vip?: boolean;
|
||||
vip_level?: number;
|
||||
privilege_icons?: {
|
||||
jump_url?: string;
|
||||
open: ProfilePrivilege[];
|
||||
closed: ProfilePrivilege[];
|
||||
};
|
||||
}
|
||||
|
||||
export interface FriendInfo extends PublicProfileFields {
|
||||
user_id: number;
|
||||
nickname: string;
|
||||
remark: string;
|
||||
category_id?: number;
|
||||
}
|
||||
|
||||
export interface CategorizedFriend extends FriendInfo {}
|
||||
|
||||
export interface StrangerInfo extends PublicProfileFields {
|
||||
user_id: number;
|
||||
nickname: string;
|
||||
remark: string;
|
||||
sex: 'male' | 'female' | 'unknown';
|
||||
age: number;
|
||||
long_nick: string;
|
||||
}
|
||||
|
||||
export interface FriendCategoryResult {
|
||||
|
||||
Reference in new issue
Block a user