import { EnumBooleanDigitized, EnumBooleanStringified, JSONString } from "../../@types"; import { ACTION, baseParamsType, chatIdType, CMDC_CMSG, ComaSeparatedValues, EnumChannelFilterValues, EnumFsk, ICOMMAND, SessionFlag } from "../../cmd-protocol"; import { IKeyMaybeValue, IRESPONSE, RESULT } from "../command/icommand"; /** * Chat flags * SELECT CHAT_FLAG_SHORT || ' = "' || CHAT_FLAG_SHORT || '",// ' || CHAT_FLAG_DESCRIPTION FROM CHAT_FLAGS order by CHAT_FLAG_VAL */ export declare enum ChatFlags { VIDEO = "VIDEO", VOYEUR = "VOYEUR", CAM2CAM = "CAM2CAM", SINGLE = "SINGLE", DISCOUNT = "DISCOUNT", TEXT = "TEXT", FSK16 = "FSK16", VOYEUR2S = "VOYEUR2S", RECORD = "RECORD", FREE = "FREE", HASUPLPICS = "HASUPLPICS", PREVIEW = "PREVIEW", FSKACK = "FSKACK", VOYSHOWN = "VOYSHOWN", PARTY = "PARTY", FREECHAT = "FREECHAT", TOY = "TOY", CONVERSION = "CONVERSION", TESTCHAT = "TESTCHAT", SECONDARY = "SECONDARY", AUDIO = "AUDIO", CONVERTED = "CONVERTED", TIP = "TIP", GUESTCHAT = "GUESTCHAT", MOBILE = "MOBILE", FLATRATE = "FLATRATE", SINGLEC2C = "SINGLEC2C" } export declare enum EnumIntentionString { TEXT = "TEXT", VOYEUR = "VOYEUR", VIDEO = "VIDEO", SINGLECAM2CAM = "SINGLECAM2CAM" } export declare class SChatInfo { /** the unique chatId*/ chatID: string; /** the chat type, can be changed. 15 contentpartner, 16 prepaid, 13 - dialerchat*/ type: string; /** chat flags coma separated. see enum ChatFlags*/ flags: ComaSeparatedValues | SessionFlag; /** start timestamp */ startTime: string; /** stop timestamp */ stopTime?: string; /** the paid time */ paidTime?: string; /** exit code, see */ exitCode?: string; /** admin chat */ admin?: EnumBooleanDigitized; /** you can kick and ban this user */ canBan?: EnumBooleanDigitized; /** you can give a discount to this user*/ canDiscount?: EnumBooleanDigitized; /** single ability */ canSingle?: EnumBooleanDigitized; /** c2c ability */ canCam2Cam?: EnumBooleanDigitized; /** the category */ ccl_cat2?: string; /** messenger channel id */ channelId?: string; /** * @deprecated. obsolete */ fixedPayout?: string; /** the soft/hard status */ fsk?: EnumFsk; /** the discount */ hasDiscount?: string; /** info message for this chat */ infoMessage?: string; /** the chat is public, others users in ther public chats can see your messages */ isPublicText?: EnumBooleanDigitized; /** the chat is a mass lobby show, no system messages or CMDC_CHAT_UPDATE will be arrived */ isLobby?: EnumBooleanDigitized; /** stats about this user*/ jsonStats?: string; /** language of user */ lang?: string; /** the user name */ login?: string; /** the admin is shown */ showAdmin?: string; /** internal, the usr_id of user for type 13 chat */ userKey?: string; /** the related tiked id*/ ticketId?: string; imgSrc?: string; /** is voyeur to single */ voyeur2single?: EnumBooleanDigitized; /** the intention of chat type from guest. this is not actual chat type, only intention */ chattype: EnumIntentionString | string; /** preview state: "1" if the preview is run, "0" if the preview is stopped */ previewRun?: "1" | "0" | string; /** coefficient (number) of blur to be applied to video */ blurred?: string; } export declare class CMDC_CINIT implements ICOMMAND { action: ACTION; params: SChatInfo & IKeyMaybeValue; } export declare type ChatOnlineStats = { /** the video time in seconds */ videoTime?: string; /** the video time as string 00:33:22 */ videoTimeString?: string; lobbyUsers?: string; }; export declare class CMDC_UPDATE_CHAT implements ICOMMAND { action: ACTION; params: SChatInfo & ChatOnlineStats & IKeyMaybeValue; } export declare enum EndChatType { PREPARED = "PREPARED", LOBBY = "LOBBY", ADMIN = "ADMIN", SINGLEC2C = "SINGLEC2C", SINGLE = "SINGLE", LIVE = "LIVE", VOYEUR = "VOYEUR", VOYEUR2S = "VOYEUR2S", PREVIEW = "PREVIEW", PREVIEW_VIP = "PREVIEW_VIP", PREVIEW_SHORT = "PREVIEW_SHORT", PREVIEW_VOUCHER = "PREVIEW_VOUCHER", MOBILEVIDEOCALL = "MOBILEVIDEOCALL" } export declare class CMDC_CEXIT implements ICOMMAND { action: ACTION; params: { [key: string]: string; chatID: string; exitCode: string; exitMessage?: string; endChatType?: EndChatType; }; } export declare class CMDP_SGETCHATS implements ICOMMAND { action: ACTION; params: baseParamsType & { chatID?: string; }; } export declare class CMDP_SGETCHATS_RESPONSE extends CMDP_SGETCHATS implements IRESPONSE { result: RESULT; commands: CMDC_CINIT[]; values: IKeyMaybeValue; } export declare class CMDP_SGETCHATHISTORY implements ICOMMAND { action: ACTION; params: baseParamsType & chatIdType & { skipChannelMessages: EnumBooleanStringified; }; } export declare class CMDP_SGETCHATHISTORY_RESPONSE extends CMDP_SGETCHATHISTORY implements IRESPONSE { result: RESULT; commands: CMDC_CMSG[]; values: IKeyMaybeValue; } export declare class CMDP_SQUERY_DISCOUNT implements ICOMMAND { action: ACTION; params: baseParamsType & chatIdType; } export declare class CMDP_SQUERY_DISCOUNT_RESPONSE extends CMDP_SQUERY_DISCOUNT implements IRESPONSE { result: RESULT; commands: ICOMMAND[]; values: { canDiscount?: EnumBooleanDigitized; reason?: string; hasDiscount: EnumBooleanDigitized; endDate?: string; }; } export declare class CMDP_SET_DISCOUNT implements ICOMMAND { action: ACTION; params: baseParamsType & chatIdType & { rate: string; time: string; }; } export declare class CMDP_SET_DISCOUNT_RESPONSE extends CMDP_SET_DISCOUNT implements IRESPONSE { result: RESULT; commands: ICOMMAND[]; values: IKeyMaybeValue; } export declare class CMDP_KICK implements ICOMMAND { action: ACTION; params: baseParamsType & chatIdType; } export declare class CMDP_KICK_RESPONSE extends CMDP_KICK implements IRESPONSE { result: RESULT; commands: ICOMMAND[]; values: IKeyMaybeValue; } export declare class CMDP_SGETCHATSSUMMARY implements ICOMMAND { action: ACTION; params: baseParamsType & { channelId: string; }; } export declare class CMDP_SGETCHATSSUMMARY_RESPONSE extends CMDP_SGETCHATSSUMMARY implements IRESPONSE { result: RESULT; commands: ICOMMAND[]; values: IKeyMaybeValue & { summary?: string; } & { first?: string; last?: string; chats?: string; }; } /** * query online time summary for last 3 month */ export declare class CMDP_GETONLINESUMMARY implements ICOMMAND { action: ACTION; params: baseParamsType; } /** * Response for CMDP_GETONLINESUMMARY */ export declare class CMDP_GETONLINESUMMARY_RESPONSE extends CMDP_GETONLINESUMMARY implements IRESPONSE { result: RESULT; commands: ICOMMAND[]; values: { summary: JSONString | string; }; } export declare class CMDC_LIVESESSION implements ICOMMAND { action: ACTION.CMDC_LIVESESSION; params: { /** the Id on the session, not unique, but sesId + startTime is unique */ sesID: string; /** start time */ startTime: string; /** stop time */ stopTime: string; /** live chats counter*/ chats: string; }; } export declare class CMDC_LIVECHAT implements ICOMMAND { action: ACTION.CMDC_LIVECHAT; params: { /** the unique chat id */ chatID: string; /** the id of live session */ sesID: string; /** start time of live chat, is between startTime and stopTime of live session */ startTime: string; /** last timestamp of live chat*/ stopTime: string; /** the exit code, 0 -if chat is live */ exitCode: string; /** VIDEO, VOYEUR, SINGLE */ type: string; /** username (user alias) */ login?: string; /** channelId, if given */ channelId?: string; /** endChatType*/ endChatType?: EndChatType; }; } /** * query online time history for last 2 month max */ export declare class CMDP_GETLIVEHISTORY implements ICOMMAND { action: ACTION; params: baseParamsType & { /** json-encoded datetime, default now-6 month, will be adjusted if set to smaller than first known date */ dateFrom?: string; /** json-encoded datetime, default now() +1 day */ dateTo?: string; /** filter empty live sessions*/ filterEmpty?: EnumChannelFilterValues; /** pagination */ skip?: string; /** pagination */ limit?: string; }; } /** * Response for CMDP_GETLIVEHISTORY */ export declare class CMDP_GETLIVEHISTORY_RESPONSE extends CMDP_GETLIVEHISTORY implements IRESPONSE { result: RESULT; /** array of CMDC_LIVESESSION[] + CMDC_LIVECHAT[] */ commands: ICOMMAND[]; values: { /** json-encoded datetime*/ firstSession: string; /** json-encoded datetime*/ lastSession: string; /** number of Sessions */ totalSessions: string; }; }