feat: add SnowLuma TypeScript SDK
This commit is contained in:
43 files changed
+4157
-2
No files matched your search
@@ -0,0 +1,126 @@
|
||||
import type { SnowLumaActionMap } from './types/index';
|
||||
|
||||
export const SNOWLUMA_ACTIONS = [
|
||||
'get_login_info',
|
||||
'get_status',
|
||||
'get_version_info',
|
||||
'can_send_image',
|
||||
'can_send_record',
|
||||
'send_msg',
|
||||
'send_private_msg',
|
||||
'send_group_msg',
|
||||
'get_msg',
|
||||
'delete_msg',
|
||||
'get_friend_list',
|
||||
'get_stranger_info',
|
||||
'delete_friend',
|
||||
'get_group_list',
|
||||
'get_group_info',
|
||||
'get_group_member_list',
|
||||
'get_group_member_info',
|
||||
'get_group_honor_info',
|
||||
'get_group_system_msg',
|
||||
'set_group_kick',
|
||||
'set_group_ban',
|
||||
'set_group_whole_ban',
|
||||
'set_group_admin',
|
||||
'set_group_card',
|
||||
'set_group_name',
|
||||
'set_group_leave',
|
||||
'set_group_special_title',
|
||||
'set_group_anonymous',
|
||||
'set_group_anonymous_ban',
|
||||
'set_group_portrait',
|
||||
'upload_group_file',
|
||||
'upload_private_file',
|
||||
'get_group_file_url',
|
||||
'get_group_root_files',
|
||||
'get_group_files_by_folder',
|
||||
'delete_group_file',
|
||||
'move_group_file',
|
||||
'create_group_file_folder',
|
||||
'delete_group_file_folder',
|
||||
'rename_group_file_folder',
|
||||
'get_private_file_url',
|
||||
'set_friend_add_request',
|
||||
'set_group_add_request',
|
||||
'send_like',
|
||||
'friend_poke',
|
||||
'group_poke',
|
||||
'send_poke',
|
||||
'set_essence_msg',
|
||||
'delete_essence_msg',
|
||||
'get_essence_msg_list',
|
||||
'set_group_reaction',
|
||||
'get_group_msg_history',
|
||||
'get_friend_msg_history',
|
||||
'mark_group_msg_as_read',
|
||||
'mark_private_msg_as_read',
|
||||
'mark_msg_as_read',
|
||||
'get_rkey',
|
||||
'ocr_image',
|
||||
'.ocr_image',
|
||||
'_send_group_notice',
|
||||
'_get_group_notice',
|
||||
'_del_group_notice',
|
||||
'upload_forward_msg',
|
||||
'upload_foward_msg',
|
||||
'send_forward_msg',
|
||||
'send_group_forward_msg',
|
||||
'send_private_forward_msg',
|
||||
'get_forward_msg',
|
||||
'get_image',
|
||||
'get_record',
|
||||
'get_cookies',
|
||||
'get_csrf_token',
|
||||
'get_credentials',
|
||||
'set_restart',
|
||||
'clean_cache',
|
||||
'.handle_quick_operation',
|
||||
'set_friend_remark',
|
||||
'set_msg_emoji_like',
|
||||
'_mark_all_as_read',
|
||||
'get_group_file_system_info',
|
||||
'check_url_safely',
|
||||
'download_file',
|
||||
'set_qq_profile',
|
||||
'set_online_status',
|
||||
'get_group_ignored_notifies',
|
||||
'get_group_shut_list',
|
||||
'forward_friend_single_msg',
|
||||
'forward_group_single_msg',
|
||||
'get_recent_contact',
|
||||
'get_profile_like',
|
||||
'get_friends_with_category',
|
||||
'get_online_clients',
|
||||
'_get_model_show',
|
||||
'_set_model_show',
|
||||
'.get_word_slices',
|
||||
'get_group_at_all_remain',
|
||||
'get_unidirectional_friend_list',
|
||||
'set_self_longnick',
|
||||
'get_collection_list',
|
||||
'create_collection',
|
||||
'set_qq_avatar',
|
||||
'set_input_status',
|
||||
'translate_en2zh',
|
||||
'get_clientkey',
|
||||
'get_mini_app_ark',
|
||||
'click_inline_keyboard_button',
|
||||
'set_group_sign',
|
||||
'send_group_sign',
|
||||
'get_group_info_ex',
|
||||
'get_group_detail_info',
|
||||
'trans_group_file',
|
||||
'rename_group_file',
|
||||
'get_file',
|
||||
'.send_packet',
|
||||
] as const satisfies readonly (keyof SnowLumaActionMap)[];
|
||||
|
||||
export type SnowLumaKnownAction = typeof SNOWLUMA_ACTIONS[number];
|
||||
|
||||
const ACTION_SET = new Set<string>(SNOWLUMA_ACTIONS);
|
||||
|
||||
export function isSnowLumaAction(action: string): action is SnowLumaKnownAction {
|
||||
return ACTION_SET.has(action);
|
||||
}
|
||||
Reference in new issue
Block a user