export interface RpcError {
  type: 'UNAUTHORIZED' | 'VALIDATION_ERROR' | 'NOT_FOUND' | 'INTERNAL_ERROR' | 'FORBIDDEN' | 'RATE_LIMITED' | string;
  message: string;
  code?: number;
}

export interface RpcResponse<T = unknown, Extensions = unknown> {
  datetime: number;
  success: boolean;
  result: T | null;
  extensions: Extensions | null;
  error: RpcError | null;
}

export type ActionNSTVType = {
name?: string,
type?: string,
value?: string,
text?: string,
style?: StyleDPEnum,
uuid?: string
};
export type ArgsAuthInput = {
withEmailCode?: boolean,
code?: number,
login: string,
password?: string,
deviceInfo?: DeviceInfoMNPUInput
};
export type ArgsChannelDeleteMessageInput = {
channel?: string,
message?: string
};
export type ArgsChannelInfoInput = {
channel?: string
};
export type ArgsChannelListInput = {
limit?: number,
offset?: number
};
export type ArgsChannelMembersInput = {
channel?: string
};
export type ArgsChannelMessagesInput = {
channel?: string,
limit?: number,
offset?: number
};
export type ArgsChannelReactionInput = {
message?: string,
channel?: string,
reaction?: ReactionACFHLPSWEnum
};
export type ArgsChannelSendMessageInput = {
channel: string,
reply?: string,
text?: string,
attachments?: FileDocumentFileInput[],
voice?: FileAudioFileInput,
payload?: PayloadMInput
};
export type ArgsJoinChannelInput = {
channel: string
};
export type ArgsJoinableChannelsInput = {
limit?: number,
offset?: number
};
export type ArgsPinnedMessageInput = {
message?: string
};
export type ChannelListDHType = {
data?: ShmChannelType[],
hash?: string
};
export type ChannelMessageDHType = {
data?: ShmChannelMessageType[],
hash?: string
};
export type DeviceInfoMNPUInput = {
name?: string,
model?: string,
platform?: string,
uuid?: string
};
export type FileAudioFileInput = {
_id?: string
};
export type FileAudioFileType = {
_id?: string,
fileType?: string,
name?: string,
url?: string,
duration?: number,
type?: string,
created_at?: string
};
export type FileDocumentFileInput = {
_id?: string
};
export type FileDocumentFileType = {
_id?: string,
fileType?: string,
name?: string,
url?: string,
type?: string,
created_at?: string
};
export type ModeFWEnum = "widget"|"full";
export type PayloadMInput = {
[key: string]: any
};
export type PayloadMType = {
[key: string]: any
};
export type PinnedETUType = {
enabled?: boolean,
user?: string,
timestamp?: number
};
export type ReactionACFHLPSWEnum = "heart"|"like"|"laugh"|"wow"|"sad"|"angry"|"clap"|"party"|"poop"|"fire";
export type ReactionCTUType = {
user?: string,
type?: TypeACFHLPSWEnum,
created_at?: number,
uuid?: string
};
export type RoleAMOSEnum = "member"|"owner"|"admin"|"support";
export type ShmChannelMemberType = {
member?: string,
memberCollection?: string,
avatar?: string,
name?: string,
channel?: string,
role?: RoleAMOSEnum,
payload?: PayloadMType,
_id?: string,
created_at?: number,
updated_at?: number
};
export type ShmChannelMessageType = {
channel?: string,
member?: string,
text?: string,
type?: TypeRSEnum,
attachments?: FileDocumentFileType[],
reply?: string,
voice?: FileAudioFileType,
actions?: ActionNSTVType[],
reactions?: ReactionCTUType[],
pinned?: PinnedETUType,
payload?: PayloadMType,
deleted?: string,
_id?: string,
created_at?: number,
updated_at?: number
};
export type ShmChannelType = {
name?: string,
lastMessage?: string,
payload?: PayloadMType,
unreadCounts?: UnreadCountMType,
type?: TypeDSEnum,
_id?: string,
created_at?: number,
updated_at?: number
};
export type StyleDPEnum = "default"|"primary"|"danger";
export type TypeACFHLPSWEnum = "heart"|"like"|"laugh"|"wow"|"sad"|"angry"|"clap"|"party"|"poop"|"fire";
export type TypeDSEnum = "default"|"support"|"supportSystem";
export type TypeRSEnum = "regular"|"system";
export type UnreadCountMType = {
[key: string]: number
};