cmd-control-client-lib 3.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (66) hide show
  1. package/.arcconfig +4 -0
  2. package/.eslintignore +3 -0
  3. package/.eslintrc.js +65 -0
  4. package/.husky/pre-commit +5 -0
  5. package/README.md +35 -0
  6. package/dist/@types/enum-boolean-digitized.d.ts +4 -0
  7. package/dist/@types/enum-boolean-stringified-extended.d.ts +6 -0
  8. package/dist/@types/enum-boolean-stringified.d.ts +4 -0
  9. package/dist/@types/enum-channel-flags.d.ts +14 -0
  10. package/dist/@types/enum-currency.d.ts +5 -0
  11. package/dist/@types/enum-status-type.d.ts +15 -0
  12. package/dist/@types/icurrency-description.d.ts +5 -0
  13. package/dist/@types/iemoji.d.ts +4 -0
  14. package/dist/@types/index.d.ts +9 -0
  15. package/dist/@types/json-stringified.d.ts +8 -0
  16. package/dist/cmd-connection.d.ts +71 -0
  17. package/dist/cmd-control-client-lib.js +2 -0
  18. package/dist/cmd-control-client-lib.js.map +1 -0
  19. package/dist/cmd-control-lib.d.ts +5 -0
  20. package/dist/cmd-protocol.d.ts +35 -0
  21. package/dist/cmd-session.d.ts +15 -0
  22. package/dist/logger.d.ts +28 -0
  23. package/dist/protocol/b2b/b2bcontact.d.ts +58 -0
  24. package/dist/protocol/b2b/b2buserinfo.d.ts +106 -0
  25. package/dist/protocol/backend.d.ts +48 -0
  26. package/dist/protocol/channel.d.ts +341 -0
  27. package/dist/protocol/channelinfo.d.ts +98 -0
  28. package/dist/protocol/chatstate.d.ts +42 -0
  29. package/dist/protocol/command/action.d.ts +116 -0
  30. package/dist/protocol/command/baseparams.d.ts +40 -0
  31. package/dist/protocol/command/icommand.d.ts +61 -0
  32. package/dist/protocol/command/resultcode.d.ts +44 -0
  33. package/dist/protocol/connection.d.ts +16 -0
  34. package/dist/protocol/contactnote.d.ts +62 -0
  35. package/dist/protocol/gifts.d.ts +19 -0
  36. package/dist/protocol/init.d.ts +64 -0
  37. package/dist/protocol/live/devicestatus.d.ts +30 -0
  38. package/dist/protocol/live/live-commands.d.ts +386 -0
  39. package/dist/protocol/live/login.d.ts +14 -0
  40. package/dist/protocol/live/onlinesummary.d.ts +21 -0
  41. package/dist/protocol/live/products-config.d.ts +19 -0
  42. package/dist/protocol/live/streamstate.d.ts +25 -0
  43. package/dist/protocol/live/supdate.d.ts +34 -0
  44. package/dist/protocol/live/usersettings.d.ts +40 -0
  45. package/dist/protocol/lobby.d.ts +37 -0
  46. package/dist/protocol/login.d.ts +57 -0
  47. package/dist/protocol/logout.d.ts +22 -0
  48. package/dist/protocol/mediaoffer.d.ts +48 -0
  49. package/dist/protocol/mediapurchase.d.ts +49 -0
  50. package/dist/protocol/mediaupload.d.ts +86 -0
  51. package/dist/protocol/message.d.ts +184 -0
  52. package/dist/protocol/messenger/expo.d.ts +19 -0
  53. package/dist/protocol/noop.d.ts +14 -0
  54. package/dist/protocol/onlinestate.d.ts +74 -0
  55. package/dist/protocol/sessionstate.d.ts +74 -0
  56. package/dist/protocol/systemmessagekey.d.ts +157 -0
  57. package/dist/protocol/toy.d.ts +60 -0
  58. package/dist/protocol/unused.d.ts +26 -0
  59. package/dist/protocol/update-state.d.ts +11 -0
  60. package/dist/version.d.ts +1 -0
  61. package/package.json +88 -0
  62. package/test/.eslintrc.js +12 -0
  63. package/test/json-stringified.spec.ts +11 -0
  64. package/test/result.spec.ts +18 -0
  65. package/test/session-state.spec.ts +23 -0
  66. package/workspace.code-workspace +13 -0
@@ -0,0 +1,116 @@
1
+ /**
2
+ * command names that CmdControl can handle
3
+ */
4
+ export declare enum ACTION {
5
+ CMDP_INIT = "CMDP_INIT",
6
+ CMDP_SINIT = "CMDP_SINIT",
7
+ CMDP_LOGIN = "CMDP_LOGIN",
8
+ CMDP_SLOGIN = "CMDP_SLOGIN",
9
+ CMDP_LOGOUT = "CMDP_LOGOUT",
10
+ CMDP_SLOGOUT = "CMDP_SLOGOUT",
11
+ CMDC_USERINFO = "CMDC_USERINFO",
12
+ CMDP_SETUSERINFO = "CMDP_SETUSERINFO",
13
+ CMDP_GETUSERINFO = "CMDP_GETUSERINFO",
14
+ CMDC_CONTACTNOTE = "CMDC_CONTACTNOTE",
15
+ CMDP_SETCONTACTNOTE = "CMDP_SETCONTACTNOTE",
16
+ CMDP_SSETCONTACTNOTE = "CMDP_SSETCONTACTNOTE",
17
+ CMDP_GETCONTACTNOTE = "CMDP_GETCONTACTNOTE",
18
+ CMDP_SGETCONTACTNOTE = "CMDP_SGETCONTACTNOTE",
19
+ CMDC_CONTACTINFO = "CMDC_CONTACTINFO",
20
+ CMDP_SETCONTACTINFO = "CMDP_SETCONTACTINFO",
21
+ CMDP_SGETCONTACTINFO = "CMDP_SGETCONTACTINFO",
22
+ CMDP_GETCONTACTINFO = "CMDP_GETCONTACTINFO",
23
+ CMDC_CHANNELINFO = "CMDC_CHANNELINFO",
24
+ CMDP_GETCHANNELINFO = "CMDP_GETCHANNELINFO",
25
+ CMDP_SETCHANNELINFO = "CMDP_SETCHANNELINFO",
26
+ CMDC_CHANNEL = "CMDC_CHANNEL",
27
+ CMDP_NEWCHANNEL = "CMDP_NEWCHANNEL",
28
+ CMDP_GETCHANNELS = "CMDP_GETCHANNELS",
29
+ CMDP_SGETCHANNELS = "CMDP_SGETCHANNELS",
30
+ CMDP_GETCHANNEL = "CMDP_GETCHANNEL",
31
+ CMDP_SGETCHANNEL = "CMDP_SGETCHANNEL",
32
+ CMDP_CHANNELSEEN = "CMDP_CHANNELSEEN",
33
+ CMDP_SCHANNELSEEN = "CMDP_SCHANNELSEEN",
34
+ CMDP_UPDATECHANNEL = "CMDP_UPDATECHANNEL",
35
+ CMDC_CHANNELSSUMMARY = "CMDC_CHANNELSSUMMARY",
36
+ CMDP_CHANNELSSUMMARY = "CMDP_CHANNELSSUMMARY",
37
+ CMDP_SUPLOADPIC = "CMDP_SUPLOADPIC",
38
+ CMDC_CMSG = "CMDC_CMSG",
39
+ CMDP_GETHISTORY = "CMDP_GETHISTORY",
40
+ CMDP_MSG = "CMDP_MSG",
41
+ CMDP_MSGDELETE = "CMDP_MSGDELETE",
42
+ CMDC_ONLINESTATE = "CMDC_ONLINESTATE",
43
+ CMDP_GETONLINESTATE = "CMDP_GETONLINESTATE",
44
+ CMDP_GETONLINESTATES = "CMDP_GETONLINESTATES",
45
+ CMDC_VALUE = "CMDC_VALUE",
46
+ CMDP_SET_DISCOUNT = "CMDP_SET_DISCOUNT",
47
+ CMDP_SQUERY_DISCOUNT = "CMDP_SQUERY_DISCOUNT",
48
+ CMDP_QUERYUSER = "CMDP_QUERYUSER",
49
+ CMDC_QUERYANSWERED = "CMDC_QUERYANSWERED",
50
+ CMDP_SQUERY_FORMAT = "CMDP_SQUERY_FORMAT",
51
+ CMDP_STOPLOOPBACK9 = "CMDP_STOPLOOPBACK9",
52
+ CMDP_STARTLOOPBACK9 = "CMDP_STARTLOOPBACK9",
53
+ CMDP_STOPBANDWIDTHTEST = "CMDP_STOPBANDWIDTHTEST",
54
+ CMDP_STARTBANDWIDTHTEST = "CMDP_STARTBANDWIDTHTEST",
55
+ CMDP_STOP_STREAM_PREVIEW = "CMDP_STOP_STREAM_PREVIEW",
56
+ CMDP_START_STREAM_PREVIEW = "CMDP_START_STREAM_PREVIEW",
57
+ CMDP_UPDATE = "CMDP_UPDATE",
58
+ CMDP_SGETCHATS = "CMDP_SGETCHATS",
59
+ CMDP_FSK16 = "CMDP_FSK16",
60
+ CMDP_KICK = "CMDP_KICK",
61
+ CMDP_TRACERT_REPLY = "CMDP_TRACERT_REPLY",
62
+ CMDP_STOPSEND = "CMDP_STOPSEND",
63
+ CMDP_STARTSEND = "CMDP_STARTSEND",
64
+ CMDP_SERVICE0900 = "CMDP_SERVICE0900",
65
+ CMDP_NOOP = "CMDP_NOOP",
66
+ CMDP_QUERYBACKEND = "CMDP_QUERYBACKEND",
67
+ CMDP_UNDEFINED = "CMDP_UNDEFINED",
68
+ CMDC_CINIT = "CMDC_CINIT",
69
+ CMDC_FEEDBACK = "CMDC_FEEDBACK",
70
+ CMDC_DSRELOAD = "CMDC_DSRELOAD",
71
+ CMDC_UPDATE = "CMDC_UPDATE",
72
+ CMDC_CEXIT = "CMDC_CEXIT",
73
+ CMDC_CSTARTSTREAMPUSH = "CMDC_CSTARTSTREAMPUSH",
74
+ CMDC_CSTOPVIDEOPUSH = "CMDC_CSTOPVIDEOPUSH",
75
+ CMDC_QUERYUSER = "CMDC_QUERYUSER",
76
+ CMDC_CQUERYUSER = "CMDC_CQUERYUSER",
77
+ CMDC_UPDATE_CHAT = "CMDC_UPDATE_CHAT",
78
+ CMDC_BACKENDPAYLOAD = "CMDC_BACKENDPAYLOAD",
79
+ CMDP_BACKENDPAYLOAD = "CMDP_BACKENDPAYLOAD",
80
+ CMDP_TOYSTATE = "CMDP_TOYSTATE",
81
+ CMDP_TOYACTION = "CMDP_TOYACTION",
82
+ CMDC_TOYACTION = "CMDC_TOYACTION",
83
+ CMDC_CSTREAMRESTART = "CMDC_CSTREAMRESTART",
84
+ CMDP_SUPLOADMEDIA = "CMDP_SUPLOADMEDIA",
85
+ /** Commands used on Live but not mentioned here **/
86
+ CMDC_CSTOPAUDIOPUSH = "CMDC_CSTOPAUDIOPUSH",
87
+ CMDC_CSTARTAUDIOPUSH = "CMDC_CSTARTAUDIOPUSH",
88
+ CMDP_CSTOPTEXT = "CMDP_CSTOPTEXT",
89
+ CMDC_CSTARTVIDEOPULL = "CMDC_CSTARTVIDEOPULL",
90
+ CMDC_CSTARTVOYEUR = "CMDC_CSTARTVOYEUR",
91
+ CMDC_CSTOPVIDEOPULL = "CMDC_CSTOPVIDEOPULL",
92
+ CMDC_CSTOPVOYEUR = "CMDC_CSTOPVOYEUR",
93
+ CMDP_SUPDATE = "CMDP_SUPDATE",
94
+ CMDC_CSHOWADMIN = "CMDC_CSHOWADMIN",
95
+ CMDC_CSTOPSTREAMPUSH = "CMDC_CSTOPSTREAMPUSH",
96
+ CMDP_SSTATUS = "CMDP_SSTATUS",
97
+ CMDC_CSTARTTEXT = "CMDC_CSTARTTEXT",
98
+ CMDC_CSTARTVIDEOPUSH = "CMDC_CSTARTVIDEOPUSH",
99
+ CMDC_SLOGOUT = "CMDC_SLOGOUT",
100
+ CMDP_SDEVICESTATUS = "CMDP_SDEVICESTATUS",
101
+ CMDC_STREAMSTATE = "CMDC_STREAMSTATE",
102
+ CMDP_GETONLINESUMMARY = "CMDP_GETONLINESUMMARY",
103
+ CMDP_SMEDIAGETPRICES = "CMDP_SMEDIAGETPRICES",
104
+ CMDP_SMEDIAPURCHASE = "CMDP_SMEDIAPURCHASE",
105
+ CMDP_OPEN_LOBBY = "CMDP_OPEN_LOBBY",
106
+ CMDP_CLOSE_LOBBY = "CMDP_CLOSE_LOBBY",
107
+ CMDP_SMEDIAOFFERCREATE = "CMDP_SMEDIAOFFERCREATE",
108
+ CMDP_SINFORMMEDIAPURCHASED = "CMDP_SINFORMMEDIAPURCHASED",
109
+ CMDP_SETEXPOTOKEN = "CMDP_SETEXPOTOKEN",
110
+ CMDP_SGETCHATHISTORY = "CMDP_SGETCHATHISTORY",
111
+ CMDP_SETSETTINGS = "CMDP_SETSETTINGS",
112
+ CMDP_GETSETTINGS = "CMDP_GETSETTINGS",
113
+ CMDC_MEDIAPURCHASED = "CMDC_MEDIAPURCHASED",
114
+ CMDP_SGETMEDIAINFO = "CMDP_SGETMEDIAINFO",
115
+ CMDP_SFORWARDMEDIA = "CMDP_SFORWARDMEDIA"
116
+ }
@@ -0,0 +1,40 @@
1
+ import { EnumBooleanStringified } from "../../@types/enum-boolean-stringified";
2
+ export declare enum SupportedLanguage {
3
+ DE = "de",
4
+ EN = "en",
5
+ ES = "es"
6
+ }
7
+ export declare enum CmdClientAgent {
8
+ WEB = "we",
9
+ MC = "mc"
10
+ }
11
+ /** the format, use 'json', 'plain' is default, but depricated */
12
+ export declare enum EnumFormatValues {
13
+ JSON = "json",
14
+ PLAIN = "plain"
15
+ }
16
+ export declare type baseParamsType = {
17
+ [key: string]: string;
18
+ /** your app instance id, internal */
19
+ _iid?: string;
20
+ /** your app type */
21
+ agent?: CmdClientAgent;
22
+ /** your sessionID from CMDP_LOGIN_RESPONSE, Ignored in CMDP_LOGIN, CMDP_INIT */
23
+ sessionID?: string;
24
+ /** the format, use 'json', 'plain' is default, but depricated */
25
+ format?: EnumFormatValues;
26
+ /** short json, use '1' , default is '0' and force delivery of plain-text non-json format response */
27
+ strip?: EnumBooleanStringified;
28
+ /** version info */
29
+ version?: string;
30
+ /** language, CmdControl has only de and en implemented */
31
+ language?: SupportedLanguage;
32
+ /** webtoken for call into Backend
33
+ * https://jwt.io/
34
+ * \{
35
+ * usrId - your content partner usrId
36
+ * usrKey - your customer key
37
+ * \}
38
+ */
39
+ webtoken?: string;
40
+ };
@@ -0,0 +1,61 @@
1
+ import { JSONString } from "../../@types/json-stringified";
2
+ import { ComaSeparatedValues } from "../sessionstate";
3
+ import { ResultCode } from "./resultcode";
4
+ import { ACTION } from "./action";
5
+ /**
6
+ * @remarks cmd-control socket by default returns only string values
7
+ */
8
+ export declare type StringBasedType = ComaSeparatedValues<string> | JSONString<Object> | string;
9
+ /**
10
+ * Base dictionary\<strting,string\> object used for params and values
11
+ * @remarks might not have some of the values, e.g. value might be undefined
12
+ */
13
+ export interface IKeyMaybeValue {
14
+ [key: string]: StringBasedType | undefined;
15
+ }
16
+ /**
17
+ * @remarks always has values
18
+ */
19
+ export interface IKeyValue {
20
+ [key: string]: StringBasedType;
21
+ }
22
+ /**
23
+ * Base command interface
24
+ */
25
+ export interface ICOMMAND {
26
+ /**
27
+ * action is the name of command
28
+ */
29
+ action: ACTION;
30
+ /**
31
+ * command parameters
32
+ */
33
+ params: IKeyMaybeValue;
34
+ }
35
+ /**
36
+ * result object is the status of CMDP_XXXX_RESPONSE
37
+ */
38
+ export declare class RESULT {
39
+ code: ResultCode;
40
+ /**
41
+ * infostring string to client
42
+ */
43
+ reason: string;
44
+ }
45
+ /**
46
+ * Response from CmdControl to client
47
+ */
48
+ export interface IRESPONSE extends ICOMMAND {
49
+ /**
50
+ * Response status
51
+ */
52
+ result: RESULT;
53
+ /**
54
+ * command array to client
55
+ */
56
+ commands: ICOMMAND[];
57
+ /**
58
+ * response values
59
+ */
60
+ values: IKeyMaybeValue;
61
+ }
@@ -0,0 +1,44 @@
1
+ /**
2
+ * known values for RESULT.code
3
+ *
4
+ * for B2B : Use for your custom ERROR_CODE the range 6001-6999
5
+ */
6
+ export declare enum ResultCode {
7
+ OK = 2000,
8
+ WRONG_USER_NAME_OR_PASSWORD = 4002,
9
+ ACCESS_DENIED = 4003,
10
+ SESSION_NOT_FOUND = 4004,
11
+ LOGIN_FAILED = 4006,
12
+ LOGIN_DOUBLE = 4007,
13
+ SESSION_ERROR = 4008,
14
+ PROFIL_NOT_COMPLETE = 4009,
15
+ TOO_MANY_SESSIONS = 4010,
16
+ TOO_MANY_SESSIONS2 = 4011,
17
+ TOO_MANY_SESSIONS3 = 4012,
18
+ VERSION_NOT_SUPPORTED = 4013,
19
+ MAIL_NOT_VERYFIED = 4014,
20
+ AUDIO_NOT_AVAILABLE = 4015,
21
+ SINGLE_NOT_STARTED = 4016,
22
+ CHAT_NOT_CLOSED = 4020,
23
+ CHAT_NOT_FOUND = 4104,
24
+ NOT_ENOUGH_MONEY = 4141,
25
+ CANT_UPDATE_CHAT = 4150,
26
+ CANT_UPDATE_CHAT2 = 4151,
27
+ INVALID_PARAMETER = 5001,
28
+ FEATURE_NOT_AVAILABLE = 5002,
29
+ UNEXPECTED = 5004,
30
+ NOT_IMPLEMENTED = 5005,
31
+ NO_CONNECTION = 5096,
32
+ SCRIPT_ERROR = 5097,
33
+ TIMEOUT = 5098,
34
+ NETWORK_ERROR = 5099,
35
+ /** B2B error-codes start with 6000 */
36
+ B2B_INTERFACE_ERROR = 6000,
37
+ UNKNOWN_ERROR = 6001,
38
+ INVALID_WEB_TOKEN = 6002,
39
+ NO_CREDIT_VIDEOCHAT = 6106,
40
+ MODEL_IS_OFFLINE = 6403,
41
+ SOFT_CHAT = 6601,
42
+ PREVIEW_LIMIT_EXCEEDED = 6401,
43
+ MODEL_IS_IN_PRIVATE_CHAT = 6906
44
+ }
@@ -0,0 +1,16 @@
1
+ import { ACTION } from "./command/action";
2
+ import { ICOMMAND } from "./command/icommand";
3
+ /**
4
+ * internal commando used for maintenance of CmdControl-Server-Farm
5
+ */
6
+ export declare class CMDC_DSRELOAD implements ICOMMAND {
7
+ action: ACTION;
8
+ params: {
9
+ id: string;
10
+ host: string;
11
+ PlatformUrl: string;
12
+ wsshost: string;
13
+ wssport: string;
14
+ wsspath: string;
15
+ };
16
+ }
@@ -0,0 +1,62 @@
1
+ import { ICOMMAND, ACTION, IRESPONSE, RESULT, IKeyMaybeValue } from "../cmd-protocol";
2
+ import { IBACKENDPAYLOAD } from "./backend";
3
+ import { baseParamsType } from "./command/baseparams";
4
+ import { channelIdOrChatId } from "./channel";
5
+ import IChannelNote from "./channelinfo";
6
+ /**
7
+ * Transport for Contact note
8
+ */
9
+ export declare class CMDC_CONTACTNOTE implements ICOMMAND {
10
+ action: ACTION;
11
+ params: channelIdOrChatId & IChannelNote;
12
+ }
13
+ /**
14
+ * Set Contact note
15
+ */
16
+ export declare class CMDP_SETCONTACTNOTE implements ICOMMAND, IBACKENDPAYLOAD {
17
+ action: ACTION;
18
+ params: baseParamsType & channelIdOrChatId & IChannelNote;
19
+ payload?: unknown;
20
+ }
21
+ /**
22
+ * Response for CMDP_SETCONTACTNOTE
23
+ */
24
+ export declare class CMDP_SETCONTACTNOTE_RESPONSE extends CMDP_SETCONTACTNOTE implements IRESPONSE, IBACKENDPAYLOAD {
25
+ result: RESULT;
26
+ commands: ICOMMAND[];
27
+ /** unused */
28
+ values: IKeyMaybeValue;
29
+ }
30
+ /**
31
+ * Get Contact Note
32
+ */
33
+ export declare class CMDP_GETCONTACTNOTE implements ICOMMAND, IBACKENDPAYLOAD {
34
+ action: ACTION;
35
+ params: baseParamsType & channelIdOrChatId;
36
+ payload?: unknown;
37
+ }
38
+ /**
39
+ * Response for CMDP_GETCONTACTNOTE
40
+ */
41
+ export declare class CMDP_GETCONTACTNOTE_RESPONSE extends CMDP_GETCONTACTNOTE implements IRESPONSE {
42
+ result: RESULT;
43
+ commands: CMDC_CONTACTNOTE[];
44
+ /** unused */
45
+ values: IKeyMaybeValue;
46
+ }
47
+ /** depricated, 8320 only */
48
+ export declare class CMDP_SSETCONTACTNOTE extends CMDP_SETCONTACTNOTE {
49
+ action: ACTION;
50
+ }
51
+ /** depricated, 8320 only */
52
+ export declare class CMDP_SSETCONTACTNOTE_RESPONSE extends CMDP_SETCONTACTNOTE_RESPONSE {
53
+ action: ACTION;
54
+ }
55
+ /** depricated, 8320 only */
56
+ export declare class CMDP_SGETCONTACTNOTE extends CMDP_GETCONTACTNOTE {
57
+ action: ACTION;
58
+ }
59
+ /** depricated, 8320 only */
60
+ export declare class CMDP_SGETCONTACTNOTE_RESPONSE extends CMDP_GETCONTACTNOTE_RESPONSE {
61
+ action: ACTION;
62
+ }
@@ -0,0 +1,19 @@
1
+ import { EnumBooleanStringified, EnumCurrency } from "../@types";
2
+ import { SupportedLanguage } from "./command/baseparams";
3
+ export interface IGiftPrice {
4
+ value: number | string;
5
+ currency: EnumCurrency;
6
+ }
7
+ export interface IGiftTranslation {
8
+ language: SupportedLanguage;
9
+ value: string;
10
+ }
11
+ export interface IGift {
12
+ id: number | string;
13
+ name: string;
14
+ price: IGiftPrice;
15
+ imageUrl: string;
16
+ active: EnumBooleanStringified;
17
+ categoryId: number | string;
18
+ translations: IGiftTranslation[];
19
+ }
@@ -0,0 +1,64 @@
1
+ import { EnumCurrency, ICurrencyDescription, IEmoji, JSONString } from "../@types";
2
+ import { IGift } from "./gifts";
3
+ import { IBACKENDPAYLOAD } from "./backend";
4
+ import { ACTION } from "./command/action";
5
+ import { baseParamsType, SupportedLanguage } from "./command/baseparams";
6
+ import { ICOMMAND, IKeyValue, IRESPONSE, RESULT } from "./command/icommand";
7
+ export interface IInitBackendPayload {
8
+ giftBundles: any;
9
+ giftCategories: any;
10
+ gifts: any;
11
+ emoticons: any;
12
+ currency: any;
13
+ toyControls: any;
14
+ icons: any;
15
+ }
16
+ /**
17
+ * the initial command
18
+ */
19
+ export declare class CMDP_INIT implements ICOMMAND {
20
+ action: ACTION;
21
+ params: baseParamsType & {
22
+ login?: string;
23
+ initData?: string;
24
+ };
25
+ }
26
+ /**
27
+ * Response for CMDP_INIT
28
+ */
29
+ export declare class CMDP_INIT_RESPONSE extends CMDP_INIT implements IRESPONSE, IBACKENDPAYLOAD {
30
+ result: RESULT;
31
+ commands: ICOMMAND[];
32
+ values: {
33
+ /** minimal version info */
34
+ versionRequired?: string;
35
+ /** version last */
36
+ versionLast?: string;
37
+ /** update url */
38
+ versionUpdateUrl?: string;
39
+ /** where to send message media */
40
+ uploadMediaUrl?: string;
41
+ translations?: JSONString<InitialTranslations>;
42
+ gifts?: JSONString<IGift[]>;
43
+ emojiList?: JSONString<IEmoji[]>;
44
+ currency?: JSONString<InitialCurrencies>;
45
+ };
46
+ /** backendpayload */
47
+ payload?: IInitBackendPayload;
48
+ }
49
+ export declare type InitialTranslations = {
50
+ [key in SupportedLanguage]?: IKeyValue;
51
+ };
52
+ export declare type InitialCurrencies = {
53
+ [key in EnumCurrency]?: ICurrencyDescription;
54
+ };
55
+ /**
56
+ * the initial command, 8320 only
57
+ */
58
+ export declare class CMDP_SINIT extends CMDP_INIT {
59
+ action: ACTION;
60
+ }
61
+ /** Response for CMDP_SINIT, 8320 only */
62
+ export declare class CMDP_SINIT_RESPONSE extends CMDP_INIT_RESPONSE {
63
+ action: ACTION;
64
+ }
@@ -0,0 +1,30 @@
1
+ import { ICOMMAND, ACTION, IRESPONSE, RESULT, IKeyMaybeValue } from "../../cmd-protocol";
2
+ import { baseParamsType } from "../command/baseparams";
3
+ /**
4
+ * update media device infos
5
+ */
6
+ export declare class CMDP_SDEVICESTATUS implements ICOMMAND {
7
+ action: ACTION;
8
+ params: baseParamsType & {
9
+ camName?: string;
10
+ width?: number;
11
+ height?: number;
12
+ fps?: number;
13
+ microName?: string;
14
+ muted?: boolean;
15
+ volume?: number;
16
+ channels?: number;
17
+ sampleRate?: number;
18
+ sampleSize?: number;
19
+ bandWidth?: number;
20
+ cpuLoad?: number;
21
+ };
22
+ }
23
+ /**
24
+ * reponse.
25
+ */
26
+ export declare class CMDP_SDEVICESTATUS_RESPONSE extends CMDP_SDEVICESTATUS implements IRESPONSE {
27
+ result: RESULT;
28
+ commands: ICOMMAND[];
29
+ values: IKeyMaybeValue;
30
+ }