@kotori-bot/kotori-plugin-adapter-sandbox
Version:
Kotori modules test environment,a visual sandbox
258 lines (257 loc) • 11.3 kB
TypeScript
interface ActionSendPrivateMsg {
action: 'send_private_msg';
message: string;
userId: string;
}
interface ActionSendGroupMsg {
action: 'send_group_msg';
message: string;
groupId: string;
}
interface ActionDeleteMsg {
action: 'delete_msg';
messageId: string;
}
interface ActionGetSelfInfo {
action: 'get_self_info';
}
interface ActionGetUserInfo {
action: 'get_user_info';
userId: string;
}
interface ActionGetFriendList {
action: 'get_friend_list';
}
interface ActionGetGroupInfo {
action: 'get_group_info';
groupId: string;
}
interface ActionGetGroupList {
action: 'get_group_list';
}
interface ActionGetGroupMemberInfo {
action: 'get_group_member_info';
groupId: string;
userId: string;
}
interface ActionGetGroupMemberList {
action: 'get_group_member_list';
groupId: string;
}
interface ActionSetGroupName {
action: 'set_group_name';
groupId: string;
groupName: string;
}
interface ActionSetGroupLeave {
action: 'leave_group';
groupId: string;
}
interface ActionSetGroupAdmin {
action: 'set_group_admin';
groupId: string;
userId: string;
enable: boolean;
}
interface ActionSetGroupCard {
action: 'set_group_card';
groupId: string;
userId: string;
card: string;
}
interface ActionSetGroupKick {
action: 'set_group_kick';
groupId: string;
userId: string;
}
interface ActionSetGroupBan {
action: 'set_group_ban';
groupId: string;
userId: string;
time: number;
}
interface ActionSetGroupWholeBan {
action: 'set_group_whole_ban';
groupId: string;
enable: boolean;
}
interface ActionOnDataError {
action: 'on_data_error';
error: string;
}
export type ActionList = ActionSendPrivateMsg | ActionSendGroupMsg | ActionDeleteMsg | ActionGetSelfInfo | ActionGetUserInfo | ActionGetFriendList | ActionGetGroupInfo | ActionGetGroupList | ActionGetGroupMemberInfo | ActionGetGroupMemberList | ActionSetGroupName | ActionSetGroupLeave | ActionSetGroupAdmin | ActionSetGroupCard | ActionSetGroupKick | ActionSetGroupBan | ActionSetGroupWholeBan | ActionOnDataError;
export declare const eventDataSchema: import("kotori-bot").UnionParser<[import("kotori-bot").ObjectParser<{
event: import("kotori-bot").LiteralParser<"on_message">;
type: import("kotori-bot").LiteralParser<0>;
message: import("kotori-bot").StringParser;
messageAlt: import("kotori-bot").StringParser;
userId: import("kotori-bot").StringParser;
sender: import("kotori-bot").ObjectParser<{
nickname: import("kotori-bot").StringParser;
}>;
time: import("kotori-bot").NumberParser;
}>, import("kotori-bot").ObjectParser<{
event: import("kotori-bot").LiteralParser<"on_message">;
type: import("kotori-bot").LiteralParser<1>;
message: import("kotori-bot").StringParser;
messageAlt: import("kotori-bot").StringParser;
userId: import("kotori-bot").StringParser;
sender: import("kotori-bot").ObjectParser<{
nickname: import("kotori-bot").StringParser;
role: import("kotori-bot").EnumParser<[import("kotori-bot").LiteralParser<"owner">, import("kotori-bot").LiteralParser<"admin">, import("kotori-bot").LiteralParser<"member">]>;
}>;
time: import("kotori-bot").NumberParser;
groupId: import("kotori-bot").StringParser;
}>, import("kotori-bot").ObjectParser<{
event: import("kotori-bot").LiteralParser<"on_message">;
type: import("kotori-bot").LiteralParser<2>;
message: import("kotori-bot").StringParser;
messageAlt: import("kotori-bot").StringParser;
userId: import("kotori-bot").StringParser;
sender: import("kotori-bot").ObjectParser<{
nickname: import("kotori-bot").StringParser;
}>;
time: import("kotori-bot").NumberParser;
channelId: import("kotori-bot").StringParser;
}>, import("kotori-bot").ObjectParser<{
event: import("kotori-bot").LiteralParser<"on_message_delete">;
type: import("kotori-bot").LiteralParser<0>;
userId: import("kotori-bot").StringParser;
messageId: import("kotori-bot").StringParser;
time: import("kotori-bot").NumberParser;
}>, import("kotori-bot").ObjectParser<{
event: import("kotori-bot").LiteralParser<"on_message_delete">;
type: import("kotori-bot").LiteralParser<1>;
userId: import("kotori-bot").StringParser;
messageId: import("kotori-bot").StringParser;
operatorId: import("kotori-bot").StringParser;
groupId: import("kotori-bot").StringParser;
time: import("kotori-bot").NumberParser;
}>, import("kotori-bot").ObjectParser<{
event: import("kotori-bot").LiteralParser<"on_message_delete">;
type: import("kotori-bot").LiteralParser<2>;
userId: import("kotori-bot").StringParser;
messageId: import("kotori-bot").StringParser;
operatorId: import("kotori-bot").StringParser;
channelId: import("kotori-bot").StringParser;
guildId: import("kotori-bot").StringParser;
time: import("kotori-bot").NumberParser;
}>, import("kotori-bot").ObjectParser<{
event: import("kotori-bot").LiteralParser<"on_friend_increase">;
type: import("kotori-bot").LiteralParser<0>;
userId: import("kotori-bot").StringParser;
time: import("kotori-bot").NumberParser;
}>, import("kotori-bot").ObjectParser<{
event: import("kotori-bot").LiteralParser<"on_friend_decrease">;
type: import("kotori-bot").LiteralParser<0>;
userId: import("kotori-bot").StringParser;
time: import("kotori-bot").NumberParser;
}>, import("kotori-bot").ObjectParser<{
event: import("kotori-bot").LiteralParser<"on_group_increase">;
type: import("kotori-bot").LiteralParser<1>;
userId: import("kotori-bot").StringParser;
operatorId: import("kotori-bot").StringParser;
groupId: import("kotori-bot").StringParser;
time: import("kotori-bot").NumberParser;
}>, import("kotori-bot").ObjectParser<{
event: import("kotori-bot").LiteralParser<"on_group_decrease">;
type: import("kotori-bot").LiteralParser<1>;
userId: import("kotori-bot").StringParser;
operatorId: import("kotori-bot").StringParser;
groupId: import("kotori-bot").StringParser;
time: import("kotori-bot").NumberParser;
}>, import("kotori-bot").ObjectParser<{
event: import("kotori-bot").LiteralParser<"on_guild_increase">;
type: import("kotori-bot").LiteralParser<2>;
userId: import("kotori-bot").StringParser;
operatorId: import("kotori-bot").StringParser;
channelId: import("kotori-bot").StringParser;
guildId: import("kotori-bot").StringParser;
}>, import("kotori-bot").ObjectParser<{
event: import("kotori-bot").LiteralParser<"on_guild_decrease">;
type: import("kotori-bot").LiteralParser<2>;
userId: import("kotori-bot").StringParser;
operatorId: import("kotori-bot").StringParser;
channelId: import("kotori-bot").StringParser;
guildId: import("kotori-bot").StringParser;
time: import("kotori-bot").NumberParser;
}>, import("kotori-bot").ObjectParser<{
event: import("kotori-bot").LiteralParser<"on_channel_increase">;
type: import("kotori-bot").LiteralParser<2>;
userId: import("kotori-bot").StringParser;
operatorId: import("kotori-bot").StringParser;
channelId: import("kotori-bot").StringParser;
guildId: import("kotori-bot").StringParser;
time: import("kotori-bot").NumberParser;
}>, import("kotori-bot").ObjectParser<{
event: import("kotori-bot").LiteralParser<"on_channel_decrease">;
type: import("kotori-bot").LiteralParser<2>;
userId: import("kotori-bot").StringParser;
operatorId: import("kotori-bot").StringParser;
channelId: import("kotori-bot").StringParser;
guildId: import("kotori-bot").StringParser;
time: import("kotori-bot").NumberParser;
}>, import("kotori-bot").ObjectParser<{
event: import("kotori-bot").LiteralParser<"on_group_admin">;
type: import("kotori-bot").LiteralParser<1>;
userId: import("kotori-bot").StringParser;
operation: import("kotori-bot").UnionParser<[import("kotori-bot").LiteralParser<"set">, import("kotori-bot").LiteralParser<"unset">]>;
groupId: import("kotori-bot").StringParser;
time: import("kotori-bot").NumberParser;
}>, import("kotori-bot").ObjectParser<{
event: import("kotori-bot").LiteralParser<"on_group_ban">;
type: import("kotori-bot").LiteralParser<1>;
userId: import("kotori-bot").StringParser;
operatorId: import("kotori-bot").StringParser;
duration: import("kotori-bot").NumberParser;
groupId: import("kotori-bot").StringParser;
time: import("kotori-bot").NumberParser;
}>, import("kotori-bot").ObjectParser<{
event: import("kotori-bot").LiteralParser<"on_group_whole_ban">;
type: import("kotori-bot").LiteralParser<1>;
operatorId: import("kotori-bot").StringParser;
operation: import("kotori-bot").UnionParser<[import("kotori-bot").LiteralParser<"set">, import("kotori-bot").LiteralParser<"unset">]>;
groupId: import("kotori-bot").StringParser;
time: import("kotori-bot").NumberParser;
}>]>;
export declare const responseSchema: import("kotori-bot").UnionParser<[import("kotori-bot").ObjectParser<{
response: import("kotori-bot").LiteralParser<"send_message_response">;
messageId: import("kotori-bot").StringParser;
time: import("kotori-bot").NumberParser;
}>, import("kotori-bot").ObjectParser<{
response: import("kotori-bot").LiteralParser<"self_info_response">;
userId: import("kotori-bot").StringParser;
username: import("kotori-bot").StringParser;
userDisplayname: import("kotori-bot").StringParser;
}>, import("kotori-bot").ObjectParser<{
response: import("kotori-bot").LiteralParser<"user_info_response">;
userId: import("kotori-bot").StringParser;
username: import("kotori-bot").StringParser;
userDisplayname: import("kotori-bot").StringParser;
userRemark: import("kotori-bot").StringParser;
}>, import("kotori-bot").ArrayParser<import("kotori-bot").ObjectParser<{
response: import("kotori-bot").LiteralParser<"user_info_response">;
userId: import("kotori-bot").StringParser;
username: import("kotori-bot").StringParser;
userDisplayname: import("kotori-bot").StringParser;
userRemark: import("kotori-bot").StringParser;
}>>, import("kotori-bot").ObjectParser<{
response: import("kotori-bot").LiteralParser<"group_info_response">;
groupId: import("kotori-bot").StringParser;
groupName: import("kotori-bot").StringParser;
}>, import("kotori-bot").ArrayParser<import("kotori-bot").ObjectParser<{
response: import("kotori-bot").LiteralParser<"group_info_response">;
groupId: import("kotori-bot").StringParser;
groupName: import("kotori-bot").StringParser;
}>>, import("kotori-bot").ObjectParser<{
response: import("kotori-bot").LiteralParser<"group_member_info_response">;
userId: import("kotori-bot").StringParser;
username: import("kotori-bot").StringParser;
userDisplayname: import("kotori-bot").StringParser;
}>, import("kotori-bot").ArrayParser<import("kotori-bot").ObjectParser<{
response: import("kotori-bot").LiteralParser<"group_member_info_response">;
userId: import("kotori-bot").StringParser;
username: import("kotori-bot").StringParser;
userDisplayname: import("kotori-bot").StringParser;
}>>]>;
export {};