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 ArgsChannelCloseInput = {
channel?: string
};
export type ArgsChannelDeleteMessageInput = {
channel?: string,
message?: string
};
export type ArgsChannelInfoInput = {
channel?: string
};
export type ArgsChannelListInput = {
limit?: number,
offset?: number
};
export type ArgsChannelMessagesInput = {
channel?: string,
limit?: number,
offset?: number
};
export type ArgsChannelMessagesLastMaxUpdatedInput = {
channel?: string
};
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 ArgsJoinChannelListInput = {
limit?: number,
offset?: number
};
export type ArgsMFastAnswersInput = {
id?: string,
delete?: boolean,
name?: string,
text?: string
};
export type ArgsPinnedMessageInput = {
message?: string
};
export type ChannelListDLType = {
data?: ShmChannelType[],
lastMaxUpdated?: number
};
export type ChannelMessageDLType = {
data?: ShmChannelMessageType[],
lastMaxUpdated?: number
};
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 JoinChannelListDLType = {
data?: ShmChannelType[],
lastMaxUpdated?: number
};
export type MemberORUType = {
owner?: string,
ownerCollection?: string,
role?: RoleAMOSEnum,
uuid?: 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 ShmChannelMessageType = {
channel?: string,
owner?: string,
ownerCollection?: 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,
members?: MemberORUType[],
closed?: boolean,
unreadCounts?: UnreadCountMType,
type?: TypeDSEnum,
_id?: string,
created_at?: number,
updated_at?: number
};
export type ShmFastAnswerType = {
owner?: string,
ownerCollection?: string,
name?: string,
text?: string,
_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
};