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.
- package/.arcconfig +4 -0
- package/.eslintignore +3 -0
- package/.eslintrc.js +65 -0
- package/.husky/pre-commit +5 -0
- package/README.md +35 -0
- package/dist/@types/enum-boolean-digitized.d.ts +4 -0
- package/dist/@types/enum-boolean-stringified-extended.d.ts +6 -0
- package/dist/@types/enum-boolean-stringified.d.ts +4 -0
- package/dist/@types/enum-channel-flags.d.ts +14 -0
- package/dist/@types/enum-currency.d.ts +5 -0
- package/dist/@types/enum-status-type.d.ts +15 -0
- package/dist/@types/icurrency-description.d.ts +5 -0
- package/dist/@types/iemoji.d.ts +4 -0
- package/dist/@types/index.d.ts +9 -0
- package/dist/@types/json-stringified.d.ts +8 -0
- package/dist/cmd-connection.d.ts +71 -0
- package/dist/cmd-control-client-lib.js +2 -0
- package/dist/cmd-control-client-lib.js.map +1 -0
- package/dist/cmd-control-lib.d.ts +5 -0
- package/dist/cmd-protocol.d.ts +35 -0
- package/dist/cmd-session.d.ts +15 -0
- package/dist/logger.d.ts +28 -0
- package/dist/protocol/b2b/b2bcontact.d.ts +58 -0
- package/dist/protocol/b2b/b2buserinfo.d.ts +106 -0
- package/dist/protocol/backend.d.ts +48 -0
- package/dist/protocol/channel.d.ts +341 -0
- package/dist/protocol/channelinfo.d.ts +98 -0
- package/dist/protocol/chatstate.d.ts +42 -0
- package/dist/protocol/command/action.d.ts +116 -0
- package/dist/protocol/command/baseparams.d.ts +40 -0
- package/dist/protocol/command/icommand.d.ts +61 -0
- package/dist/protocol/command/resultcode.d.ts +44 -0
- package/dist/protocol/connection.d.ts +16 -0
- package/dist/protocol/contactnote.d.ts +62 -0
- package/dist/protocol/gifts.d.ts +19 -0
- package/dist/protocol/init.d.ts +64 -0
- package/dist/protocol/live/devicestatus.d.ts +30 -0
- package/dist/protocol/live/live-commands.d.ts +386 -0
- package/dist/protocol/live/login.d.ts +14 -0
- package/dist/protocol/live/onlinesummary.d.ts +21 -0
- package/dist/protocol/live/products-config.d.ts +19 -0
- package/dist/protocol/live/streamstate.d.ts +25 -0
- package/dist/protocol/live/supdate.d.ts +34 -0
- package/dist/protocol/live/usersettings.d.ts +40 -0
- package/dist/protocol/lobby.d.ts +37 -0
- package/dist/protocol/login.d.ts +57 -0
- package/dist/protocol/logout.d.ts +22 -0
- package/dist/protocol/mediaoffer.d.ts +48 -0
- package/dist/protocol/mediapurchase.d.ts +49 -0
- package/dist/protocol/mediaupload.d.ts +86 -0
- package/dist/protocol/message.d.ts +184 -0
- package/dist/protocol/messenger/expo.d.ts +19 -0
- package/dist/protocol/noop.d.ts +14 -0
- package/dist/protocol/onlinestate.d.ts +74 -0
- package/dist/protocol/sessionstate.d.ts +74 -0
- package/dist/protocol/systemmessagekey.d.ts +157 -0
- package/dist/protocol/toy.d.ts +60 -0
- package/dist/protocol/unused.d.ts +26 -0
- package/dist/protocol/update-state.d.ts +11 -0
- package/dist/version.d.ts +1 -0
- package/package.json +88 -0
- package/test/.eslintrc.js +12 -0
- package/test/json-stringified.spec.ts +11 -0
- package/test/result.spec.ts +18 -0
- package/test/session-state.spec.ts +23 -0
- package/workspace.code-workspace +13 -0
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { ACTION, baseParamsType, IBACKENDPAYLOAD, ICOMMAND, IKeyMaybeValue, IRESPONSE, RESULT } from "../cmd-protocol";
|
|
2
|
+
import { channelIdType } from "./channel";
|
|
3
|
+
import { Currency, MediaFile, MediaPrice, MessageId } from "./message";
|
|
4
|
+
export declare type PriceInstruction = {
|
|
5
|
+
min: string;
|
|
6
|
+
max: string;
|
|
7
|
+
pick: string[];
|
|
8
|
+
};
|
|
9
|
+
export declare type MediaPrices = {
|
|
10
|
+
imagePrices: PriceInstruction;
|
|
11
|
+
audioPrices: PriceInstruction;
|
|
12
|
+
videoPrices: PriceInstruction;
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* Command for get prices for media. Will be forwarded to B2B backend.
|
|
16
|
+
*/
|
|
17
|
+
export declare class CMDP_SMEDIAGETPRICES implements ICOMMAND {
|
|
18
|
+
action: ACTION;
|
|
19
|
+
params: baseParamsType & channelIdType;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Response command for CMDP_SMEDIAGETPRICES
|
|
23
|
+
*/
|
|
24
|
+
export declare class CMDP_SGETPRICESMEDIA_PRESPONSE extends CMDP_SMEDIAGETPRICES implements IRESPONSE, IBACKENDPAYLOAD {
|
|
25
|
+
result: RESULT;
|
|
26
|
+
commands: ICOMMAND[];
|
|
27
|
+
values: IKeyMaybeValue;
|
|
28
|
+
/** B2B Infos */
|
|
29
|
+
payload: Currency & MediaPrices;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* B2B Command for create of media offer
|
|
33
|
+
*/
|
|
34
|
+
export declare class CMDP_SMEDIAOFFERCREATE implements ICOMMAND {
|
|
35
|
+
action: ACTION;
|
|
36
|
+
params: baseParamsType & channelIdType & Currency & MediaPrice & MediaFile & MessageId & {
|
|
37
|
+
userPoolId: string;
|
|
38
|
+
usrKey: string;
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* B2B Response command for CMDP_SMEDIAOFFERCREATE
|
|
43
|
+
*/
|
|
44
|
+
export declare class CMDP_SMEDIAOFFERCREATE_PRESPONSE extends CMDP_SMEDIAOFFERCREATE implements IRESPONSE {
|
|
45
|
+
result: RESULT;
|
|
46
|
+
commands: ICOMMAND[];
|
|
47
|
+
values: IKeyMaybeValue;
|
|
48
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { ACTION, baseParamsType, ICOMMAND, IKeyMaybeValue, IRESPONSE, RESULT } from "../cmd-protocol";
|
|
2
|
+
import { channelIdType } from "./channel";
|
|
3
|
+
import { CMDC_CMSG, MediaFile, MediaPrice, MessageId } from "./message";
|
|
4
|
+
/**
|
|
5
|
+
* Frontent command for media purchase. Will be forwarded to users pool B2B backend with additional infos
|
|
6
|
+
|
|
7
|
+
*/
|
|
8
|
+
export declare class CMDP_SMEDIAPURCHASE implements ICOMMAND {
|
|
9
|
+
action: ACTION;
|
|
10
|
+
params: baseParamsType & channelIdType &
|
|
11
|
+
/** the message id of related media offer */
|
|
12
|
+
MessageId &
|
|
13
|
+
/** MediaPrice is added to proxy call from Cmdontrol to B2B backend */
|
|
14
|
+
MediaPrice &
|
|
15
|
+
/** MediaFile is added to proxy call from CmdControl to B2B backend */
|
|
16
|
+
MediaFile;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Response command for CMDP_SMEDIAPURCHASE.
|
|
20
|
+
*/
|
|
21
|
+
export declare class CMDP_SMEDIAPURCHASE_PRESPONSE extends CMDP_SMEDIAPURCHASE implements IRESPONSE {
|
|
22
|
+
result: RESULT;
|
|
23
|
+
commands: ICOMMAND[];
|
|
24
|
+
values: IKeyMaybeValue;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* B2B command for inform partnter about media purchase. Will be sent to partners B2B backend.
|
|
28
|
+
*/
|
|
29
|
+
export declare class CMDP_SINFORMMEDIAPURCHASED implements ICOMMAND {
|
|
30
|
+
action: ACTION;
|
|
31
|
+
params: baseParamsType & channelIdType &
|
|
32
|
+
/** the message id of related media offer */
|
|
33
|
+
MessageId &
|
|
34
|
+
/** MediaPrice is added to proxy call from CmdControl to B2B backend */
|
|
35
|
+
MediaPrice &
|
|
36
|
+
/** MediaFile is added to proxy call from Cmdontrol to B2B backend */
|
|
37
|
+
MediaFile;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Response command for CMDP_SMEDIAPURCHASE.
|
|
41
|
+
*/
|
|
42
|
+
export declare class CMDP_SINFORMMEDIAPURCHASED_RESPONSE extends CMDP_SINFORMMEDIAPURCHASED implements IRESPONSE {
|
|
43
|
+
result: RESULT;
|
|
44
|
+
commands: ICOMMAND[];
|
|
45
|
+
values: IKeyMaybeValue;
|
|
46
|
+
}
|
|
47
|
+
export declare class CMDC_MEDIAPURCHASED extends CMDC_CMSG {
|
|
48
|
+
action: ACTION;
|
|
49
|
+
}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { IBACKENDPAYLOAD } from "./backend";
|
|
2
|
+
import { channelIdType } from "./channel";
|
|
3
|
+
import { ACTION } from "./command/action";
|
|
4
|
+
import { baseParamsType } from "./command/baseparams";
|
|
5
|
+
import { ICOMMAND, IRESPONSE, RESULT, IKeyMaybeValue } from "./command/icommand";
|
|
6
|
+
import { EnumMediaType, MediaFile, MediaOffer, MessageParams } from "./message";
|
|
7
|
+
export declare enum UploadStep {
|
|
8
|
+
earlyreject = "earlyreject",
|
|
9
|
+
lateaccept = "lateaccept",
|
|
10
|
+
informuploaded = "informuploaded",
|
|
11
|
+
transcoded = "transcoded",
|
|
12
|
+
error = "error"
|
|
13
|
+
}
|
|
14
|
+
/** internal use only, may be changed without announce*/
|
|
15
|
+
export declare type UploadServiceReadOnlyParams = {
|
|
16
|
+
step: UploadStep;
|
|
17
|
+
fileformat?: EnumMediaType;
|
|
18
|
+
md5?: string;
|
|
19
|
+
transactionID?: string;
|
|
20
|
+
origfilename?: string;
|
|
21
|
+
imgSrc?: string;
|
|
22
|
+
imgSrcSet?: string;
|
|
23
|
+
height?: string;
|
|
24
|
+
width?: string;
|
|
25
|
+
audioMp3?: string;
|
|
26
|
+
audioOgg?: string;
|
|
27
|
+
audioM4a?: string;
|
|
28
|
+
audioDuration?: string;
|
|
29
|
+
videoPoster?: string;
|
|
30
|
+
videoPosterPixelated?: string;
|
|
31
|
+
videoHls?: string;
|
|
32
|
+
videoHeight?: string;
|
|
33
|
+
videoWidth?: string;
|
|
34
|
+
videoDuration?: string;
|
|
35
|
+
};
|
|
36
|
+
/**
|
|
37
|
+
* the upload command
|
|
38
|
+
* usage POST to \{uploadMediaUrl\}?action=CMDP_SUPLOADMEDIA&sessionId=\{\}&channelId=\{\}.....
|
|
39
|
+
*/
|
|
40
|
+
export declare class CMDP_SUPLOADMEDIA implements ICOMMAND {
|
|
41
|
+
action: ACTION;
|
|
42
|
+
params: baseParamsType & MessageParams & UploadServiceReadOnlyParams & MediaOffer;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Response for CMDP_INIT
|
|
46
|
+
*/
|
|
47
|
+
export declare class CMDP_SUPLOADMEDIA_RESPONSE extends CMDP_SUPLOADMEDIA implements IRESPONSE, IBACKENDPAYLOAD {
|
|
48
|
+
result: RESULT;
|
|
49
|
+
commands: ICOMMAND[];
|
|
50
|
+
values: IKeyMaybeValue;
|
|
51
|
+
/** backendpayload */
|
|
52
|
+
payload?: unknown;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Get the Media Cache state.
|
|
56
|
+
* md5 - is filemd5
|
|
57
|
+
*/
|
|
58
|
+
export declare class CMDP_SGETMEDIAINFO implements ICOMMAND {
|
|
59
|
+
action: ACTION;
|
|
60
|
+
params: baseParamsType & {
|
|
61
|
+
md5: string;
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Media Info, if found in cache, or CHAT_NOT_FOUND, if not.
|
|
66
|
+
*/
|
|
67
|
+
export declare class CMDP_SGETMEDIAINFO_RESPONSE extends CMDP_SGETMEDIAINFO {
|
|
68
|
+
action: ACTION;
|
|
69
|
+
params: baseParamsType & {
|
|
70
|
+
md5: string;
|
|
71
|
+
};
|
|
72
|
+
values: MediaFile;
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Forward media to channel
|
|
76
|
+
*/
|
|
77
|
+
export declare class CMDP_SFORWARDMEDIA implements ICOMMAND {
|
|
78
|
+
action: ACTION;
|
|
79
|
+
params: baseParamsType & {
|
|
80
|
+
md5: string;
|
|
81
|
+
} & channelIdType & MediaOffer;
|
|
82
|
+
}
|
|
83
|
+
export declare class CMDP_SFORWARDMEDIA_RESPONSE extends CMDP_SFORWARDMEDIA {
|
|
84
|
+
commands: ICOMMAND[];
|
|
85
|
+
values: IKeyMaybeValue;
|
|
86
|
+
}
|
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
import { channelIdType, IMayHaveChannelId } from "./channel";
|
|
2
|
+
import { EnumBooleanStringified, EnumCurrency } from "../@types";
|
|
3
|
+
import { SystemMessageKey } from "./systemmessagekey";
|
|
4
|
+
import { IBACKENDPAYLOAD } from "./backend";
|
|
5
|
+
import { ACTION } from "./command/action";
|
|
6
|
+
import { baseParamsType } from "./command/baseparams";
|
|
7
|
+
import { ICOMMAND, IKeyMaybeValue, IRESPONSE, RESULT } from "./command/icommand";
|
|
8
|
+
export declare enum MessageFlags {
|
|
9
|
+
"canDeleted" = 0,
|
|
10
|
+
"isDeleted" = 1
|
|
11
|
+
}
|
|
12
|
+
export declare enum EnumMessageFlagValue {
|
|
13
|
+
NO = "0",
|
|
14
|
+
YES = "1"
|
|
15
|
+
}
|
|
16
|
+
export declare enum EnumMessageType {
|
|
17
|
+
MAIL = "mail",
|
|
18
|
+
CHAT = "chat",
|
|
19
|
+
MESSENGER = "msn",
|
|
20
|
+
SYSTEM = "sys"
|
|
21
|
+
}
|
|
22
|
+
export declare enum EnumMessageDirection {
|
|
23
|
+
IN = "in",
|
|
24
|
+
OUT = "out"
|
|
25
|
+
}
|
|
26
|
+
export declare enum EnumMediaType {
|
|
27
|
+
BITMAP = "Bitmap",
|
|
28
|
+
AUDIO = "Audio",
|
|
29
|
+
VIDEO = "Video"
|
|
30
|
+
}
|
|
31
|
+
export declare enum EnumMediaState {
|
|
32
|
+
OK = "ok",
|
|
33
|
+
TRANSCODING = "transcode",
|
|
34
|
+
ERROR = "error"
|
|
35
|
+
}
|
|
36
|
+
export declare enum EnumMessageStyle {
|
|
37
|
+
GUEST = "g" /** depretacted */,
|
|
38
|
+
SYSTEM = "s" /** depretacted */,
|
|
39
|
+
INFO = "info",
|
|
40
|
+
WARN = "warn",
|
|
41
|
+
ERROR = "error",
|
|
42
|
+
INFO_HIGHLIGHT = "InfoHighlight"
|
|
43
|
+
}
|
|
44
|
+
export declare type Currency = {
|
|
45
|
+
currency?: EnumCurrency;
|
|
46
|
+
};
|
|
47
|
+
export declare type Chargeable = {
|
|
48
|
+
isChargeable?: EnumBooleanStringified;
|
|
49
|
+
};
|
|
50
|
+
/** message params */
|
|
51
|
+
export declare type MessageParams = IMayHaveChannelId & {
|
|
52
|
+
/** your uniq key for message */
|
|
53
|
+
messageKey?: SystemMessageKey | string;
|
|
54
|
+
/** chat id */
|
|
55
|
+
chatID?: string;
|
|
56
|
+
/** text-message */
|
|
57
|
+
text?: string;
|
|
58
|
+
/** tip, eurocent */
|
|
59
|
+
tip?: string;
|
|
60
|
+
/** gift ids, coma separated */
|
|
61
|
+
gift?: string;
|
|
62
|
+
/** currency, todo: */
|
|
63
|
+
currency?: EnumCurrency;
|
|
64
|
+
link?: string;
|
|
65
|
+
clientData?: string;
|
|
66
|
+
};
|
|
67
|
+
export declare type MediaInfo = {
|
|
68
|
+
/** the media attached */
|
|
69
|
+
mediaType?: EnumMediaType | string;
|
|
70
|
+
/** state of media attached */
|
|
71
|
+
mediaState?: EnumMediaState | string;
|
|
72
|
+
};
|
|
73
|
+
export declare type MediaPrice = Currency & {
|
|
74
|
+
mediaPrice?: string;
|
|
75
|
+
};
|
|
76
|
+
export declare type MediaOffer = Chargeable & MediaPrice;
|
|
77
|
+
export declare type ImageFile = MediaInfo & {
|
|
78
|
+
/** Bitmap media*/
|
|
79
|
+
imgSrc?: string;
|
|
80
|
+
imgSrcSet?: string;
|
|
81
|
+
imgHeight?: string;
|
|
82
|
+
imgWidth?: string;
|
|
83
|
+
imgSrcBlurred?: string;
|
|
84
|
+
imgSrcSetBlurred?: string;
|
|
85
|
+
};
|
|
86
|
+
export declare type AudioFile = MediaInfo & {
|
|
87
|
+
/** Audio media*/
|
|
88
|
+
audioMp3?: string;
|
|
89
|
+
audioM4a?: string;
|
|
90
|
+
audioOgg?: string;
|
|
91
|
+
audioDuration?: string;
|
|
92
|
+
};
|
|
93
|
+
export declare type VideoFile = MediaInfo & {
|
|
94
|
+
/**Video media */
|
|
95
|
+
videoPoster?: string;
|
|
96
|
+
videoHls?: string;
|
|
97
|
+
videoHeight?: string;
|
|
98
|
+
videoWidth?: string;
|
|
99
|
+
videoDuration?: string;
|
|
100
|
+
videoPosterBlurred?: string;
|
|
101
|
+
};
|
|
102
|
+
export declare type MediaFile = ImageFile | AudioFile | VideoFile;
|
|
103
|
+
/** id of the message */
|
|
104
|
+
export declare type MessageId = {
|
|
105
|
+
messageId: string;
|
|
106
|
+
};
|
|
107
|
+
export declare type RelationId = {
|
|
108
|
+
/** messageId of related message */
|
|
109
|
+
relationId?: string;
|
|
110
|
+
};
|
|
111
|
+
/** more message params, readonly (set by server, ignored if set by client) */
|
|
112
|
+
export declare type MessageReadOnlyParams = {
|
|
113
|
+
/** the uniq message id */
|
|
114
|
+
messageId?: string;
|
|
115
|
+
/** source of the message IN CMDP_MSG, writable for B2B session */
|
|
116
|
+
msgType?: EnumMessageType;
|
|
117
|
+
/** sent time */
|
|
118
|
+
time?: string;
|
|
119
|
+
/** timeSeen */
|
|
120
|
+
timeSeen?: string;
|
|
121
|
+
/** direction */
|
|
122
|
+
direction?: EnumMessageDirection;
|
|
123
|
+
/** sound name */
|
|
124
|
+
sound?: string;
|
|
125
|
+
/** Will be present for paid message **/
|
|
126
|
+
priceCode?: string;
|
|
127
|
+
/** the message was bought by the opponent*/
|
|
128
|
+
isPaid?: EnumBooleanStringified.TRUE;
|
|
129
|
+
/**
|
|
130
|
+
* coma separated MessageFlags, const flags = cmd.params.flags ? cmd.params.flags.split(',').map((flag: string) =\> flag.trim()) : [];
|
|
131
|
+
* ignored IN CMDP_MSG
|
|
132
|
+
*/
|
|
133
|
+
flags?: string | "";
|
|
134
|
+
canDelete?: EnumBooleanStringified.TRUE;
|
|
135
|
+
isDeleted?: EnumBooleanStringified.TRUE;
|
|
136
|
+
/** message style/importance */
|
|
137
|
+
style?: EnumMessageStyle;
|
|
138
|
+
} & RelationId & MediaFile & MediaOffer;
|
|
139
|
+
/**
|
|
140
|
+
* Command for transport of MessageType
|
|
141
|
+
*/
|
|
142
|
+
export declare class CMDC_CMSG implements ICOMMAND {
|
|
143
|
+
action: ACTION;
|
|
144
|
+
params: MessageParams & MessageReadOnlyParams & IKeyMaybeValue;
|
|
145
|
+
}
|
|
146
|
+
/**
|
|
147
|
+
* send message
|
|
148
|
+
*/
|
|
149
|
+
export declare class CMDP_MSG implements ICOMMAND, IBACKENDPAYLOAD {
|
|
150
|
+
action: ACTION;
|
|
151
|
+
params: baseParamsType & MessageParams;
|
|
152
|
+
/** if jwt-session, any json-payload for transport to backend */
|
|
153
|
+
payload?: unknown;
|
|
154
|
+
}
|
|
155
|
+
/**
|
|
156
|
+
* Response command for CMDP_MSG
|
|
157
|
+
*/
|
|
158
|
+
export declare class CMDP_MSG_RESPONSE extends CMDP_MSG implements IRESPONSE {
|
|
159
|
+
result: RESULT;
|
|
160
|
+
/** unused */
|
|
161
|
+
commands: ICOMMAND[];
|
|
162
|
+
/** unused */
|
|
163
|
+
values: IKeyMaybeValue;
|
|
164
|
+
/** if jwt-session, any json-payload for transport to to client */
|
|
165
|
+
payload?: unknown;
|
|
166
|
+
}
|
|
167
|
+
/**
|
|
168
|
+
* delete of message
|
|
169
|
+
* your message will be deleted on your and partner side, partner message will be deleted only on your side
|
|
170
|
+
*/
|
|
171
|
+
export declare class CMDP_MSGDELETE implements ICOMMAND {
|
|
172
|
+
action: ACTION;
|
|
173
|
+
params: baseParamsType & channelIdType & MessageId;
|
|
174
|
+
}
|
|
175
|
+
/**
|
|
176
|
+
* Response for CMDP_MSGDELETE
|
|
177
|
+
*/
|
|
178
|
+
export declare class CMDP_MSGDELETE_RESPONSE extends CMDP_MSGDELETE implements IRESPONSE {
|
|
179
|
+
result: RESULT;
|
|
180
|
+
/** unused */
|
|
181
|
+
commands: ICOMMAND[];
|
|
182
|
+
/** unused */
|
|
183
|
+
values: IKeyMaybeValue;
|
|
184
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
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_SETEXPOTOKEN implements ICOMMAND {
|
|
7
|
+
action: ACTION;
|
|
8
|
+
params: baseParamsType & {
|
|
9
|
+
token?: string;
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* reponse.
|
|
14
|
+
*/
|
|
15
|
+
export declare class CMDP_SETEXPOTOKEN_RESPONSE extends CMDP_SETEXPOTOKEN implements IRESPONSE {
|
|
16
|
+
result: RESULT;
|
|
17
|
+
commands: ICOMMAND[];
|
|
18
|
+
values: IKeyMaybeValue;
|
|
19
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ACTION } from "./command/action";
|
|
2
|
+
import { baseParamsType } from "./command/baseparams";
|
|
3
|
+
import { ICOMMAND, IKeyMaybeValue, IRESPONSE, RESULT } from "./command/icommand";
|
|
4
|
+
export declare class CMDP_NOOP implements ICOMMAND {
|
|
5
|
+
action: ACTION;
|
|
6
|
+
params: baseParamsType;
|
|
7
|
+
}
|
|
8
|
+
export declare class CMDP_NOOP_RESPONSE extends CMDP_NOOP implements IRESPONSE {
|
|
9
|
+
result: RESULT;
|
|
10
|
+
/** server commands for your session/user */
|
|
11
|
+
commands: ICOMMAND[];
|
|
12
|
+
/** unused */
|
|
13
|
+
values: IKeyMaybeValue;
|
|
14
|
+
}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { EnumBooleanStringified } from "../@types/enum-boolean-stringified";
|
|
2
|
+
import { ACTION } from "./command/action";
|
|
3
|
+
import { baseParamsType } from "./command/baseparams";
|
|
4
|
+
import { ICOMMAND, IKeyMaybeValue, IRESPONSE, RESULT } from "./command/icommand";
|
|
5
|
+
import { IMayHaveChannelId, partnerIdKeyType } from "./channel";
|
|
6
|
+
/** online state of session */
|
|
7
|
+
export declare type OnlineStateType = {
|
|
8
|
+
partnerId: string;
|
|
9
|
+
/** model id */
|
|
10
|
+
partnerKey: string;
|
|
11
|
+
/** is online */
|
|
12
|
+
online: EnumBooleanStringified;
|
|
13
|
+
/** normal video vchat available */
|
|
14
|
+
multi: EnumBooleanStringified;
|
|
15
|
+
/** messaging available */
|
|
16
|
+
messenger: EnumBooleanStringified;
|
|
17
|
+
/** single vchat available */
|
|
18
|
+
single: EnumBooleanStringified;
|
|
19
|
+
/** soft vchat available */
|
|
20
|
+
soft: EnumBooleanStringified;
|
|
21
|
+
/** text over vchat available */
|
|
22
|
+
text: EnumBooleanStringified;
|
|
23
|
+
/** preview vchat available */
|
|
24
|
+
preview: EnumBooleanStringified;
|
|
25
|
+
/** visbility for Content Partnter */
|
|
26
|
+
visible: EnumBooleanStringified;
|
|
27
|
+
/** voyeur vchat available */
|
|
28
|
+
voyeur: EnumBooleanStringified;
|
|
29
|
+
/** voyeur into single vchat available */
|
|
30
|
+
voyeur2s: EnumBooleanStringified;
|
|
31
|
+
/** lobby vchat available */
|
|
32
|
+
lobby: EnumBooleanStringified;
|
|
33
|
+
/** toy state */
|
|
34
|
+
toy: EnumBooleanStringified;
|
|
35
|
+
};
|
|
36
|
+
/**
|
|
37
|
+
* Transport command for online state
|
|
38
|
+
*/
|
|
39
|
+
export declare class CMDC_ONLINESTATE implements ICOMMAND {
|
|
40
|
+
action: ACTION;
|
|
41
|
+
params: OnlineStateType;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Query online state of contact
|
|
45
|
+
*/
|
|
46
|
+
export declare class CMDP_GETONLINESTATE implements ICOMMAND {
|
|
47
|
+
action: ACTION;
|
|
48
|
+
params: baseParamsType & (IMayHaveChannelId | partnerIdKeyType);
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Response CMDP_GETONLINESTATE
|
|
52
|
+
*/
|
|
53
|
+
export declare class CMDP_GETONLINESTATE_RESPONSE extends CMDP_GETONLINESTATE implements IRESPONSE {
|
|
54
|
+
result: RESULT;
|
|
55
|
+
commands: CMDC_ONLINESTATE[];
|
|
56
|
+
/** unused */
|
|
57
|
+
values: IKeyMaybeValue;
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* get all onlilne 8320 users
|
|
61
|
+
*/
|
|
62
|
+
export declare class CMDP_GETONLINESTATES implements ICOMMAND {
|
|
63
|
+
action: ACTION;
|
|
64
|
+
params: baseParamsType & IMayHaveChannelId;
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Response for @see CMDP_GETONLINECONTACTS
|
|
68
|
+
*/
|
|
69
|
+
export declare class CMDP_GETONLINESTATES_RESPONSE extends CMDP_GETONLINESTATES implements IRESPONSE {
|
|
70
|
+
result: RESULT;
|
|
71
|
+
commands: CMDC_ONLINESTATE[];
|
|
72
|
+
/** unused */
|
|
73
|
+
values: IKeyMaybeValue;
|
|
74
|
+
}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { IProductConfig } from "./live/products-config";
|
|
2
|
+
import { EnumService0900State } from "./live/supdate";
|
|
3
|
+
import { IKeyMaybeValue } from "./command/icommand";
|
|
4
|
+
import { SupportedLanguage } from "./command/baseparams";
|
|
5
|
+
import { EnumBooleanStringified, JSONString, EnumBooleanStringifiedExtended } from "../@types";
|
|
6
|
+
export declare enum EnumSetTp {
|
|
7
|
+
OFFLINE = "0",
|
|
8
|
+
ONLINE = "1",
|
|
9
|
+
GOING_ONLINE = "2"
|
|
10
|
+
}
|
|
11
|
+
export declare enum EnumFsk {
|
|
12
|
+
SIXTEEN = "16",
|
|
13
|
+
EIGHTEEN = "18"
|
|
14
|
+
}
|
|
15
|
+
export declare enum SessionFlag {
|
|
16
|
+
MASTER = "MASTER",
|
|
17
|
+
B2B = "B2B",
|
|
18
|
+
FSK16 = "FSK16",
|
|
19
|
+
FSK18 = "FSK18",
|
|
20
|
+
BLOCKFSK16 = "BLOCKFSK16",
|
|
21
|
+
FSKMASK = "FSKMASK",
|
|
22
|
+
JWT = "JWT",
|
|
23
|
+
MSN = "MSN",
|
|
24
|
+
SHARED = "SHARED",
|
|
25
|
+
ADMIN = "ADMIN",
|
|
26
|
+
HASFSK18CHAT = "HASFSK18CHAT",
|
|
27
|
+
/**
|
|
28
|
+
* used only for avs moderator sessions
|
|
29
|
+
*/
|
|
30
|
+
WEBCAMAVS = "WEBCAMAVS",
|
|
31
|
+
FREEMODE = "FREEMODE",
|
|
32
|
+
PARTYMODE = "PARTYMODE",
|
|
33
|
+
BBS24 = "BBS24",
|
|
34
|
+
LOBBY_OPENED = "LOBBY_OPENED"
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* @remarks String having <T>'s separated by ','
|
|
38
|
+
*/
|
|
39
|
+
export interface ComaSeparatedValues<T> extends String {
|
|
40
|
+
readonly _valueType: T;
|
|
41
|
+
}
|
|
42
|
+
export interface SessionState extends IKeyMaybeValue {
|
|
43
|
+
/** the session mnumber */
|
|
44
|
+
sessionID: string;
|
|
45
|
+
/** loginname, deprecated, use CMDP_GETUSERINFO */
|
|
46
|
+
login: string;
|
|
47
|
+
/** start time */
|
|
48
|
+
startTime: string;
|
|
49
|
+
online?: EnumBooleanStringified;
|
|
50
|
+
setTp?: EnumSetTp;
|
|
51
|
+
flags?: ComaSeparatedValues<SessionFlag> | SessionFlag;
|
|
52
|
+
/** en de */
|
|
53
|
+
language?: SupportedLanguage;
|
|
54
|
+
/** unused */
|
|
55
|
+
broadcastData?: string;
|
|
56
|
+
/** Used for client-side short-cuts (live) */
|
|
57
|
+
permanentData?: string;
|
|
58
|
+
/** avatar */
|
|
59
|
+
imgSrc?: string;
|
|
60
|
+
/** FSKSTATE */
|
|
61
|
+
fsk?: EnumFsk;
|
|
62
|
+
/** SoftChat */
|
|
63
|
+
fsk16?: EnumBooleanStringifiedExtended;
|
|
64
|
+
/** deprecated, use service0900State*/
|
|
65
|
+
service0900state?: EnumService0900State;
|
|
66
|
+
/** service 0900 state, if missing in LOGIN values, the service is not available */
|
|
67
|
+
service0900State?: EnumService0900State;
|
|
68
|
+
/** the live preview*/
|
|
69
|
+
livePreviewState?: EnumBooleanStringified;
|
|
70
|
+
/** */
|
|
71
|
+
babeStation24State?: EnumBooleanStringified;
|
|
72
|
+
userLinks?: JSONString<IProductConfig["links"]>;
|
|
73
|
+
chatMotto?: string;
|
|
74
|
+
}
|