cmd-control-client-lib 3.0.18 → 3.0.23

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.
@@ -18,7 +18,7 @@ export * from "./protocol/noop";
18
18
  export * from "./protocol/lobby";
19
19
  export * from "./protocol/onlinestate";
20
20
  export * from "./protocol/sessionstate";
21
- export * from "./protocol/mediaoffer";
21
+ export * from "./protocol/mediaoffer-b2b";
22
22
  export * from "./protocol/mediaupload";
23
23
  export * from "./protocol/mediapurchase";
24
24
  export * from "./protocol/update-state";
@@ -33,4 +33,8 @@ export * from "./protocol/live/streamstate";
33
33
  export * from "./protocol/live/onlinesummary";
34
34
  export * from "./protocol/live/usersettings";
35
35
  export * from "./protocol/messenger/expo";
36
+ export * from "./protocol/messenger/signup";
37
+ export * from "./protocol/single-c2c";
38
+ export * from "./protocol/mediaoffer";
39
+ export * from "./protocol/mediaoffer-b2b";
36
40
  export { SupportedLanguage, CmdClientAgent, EnumFormatValues, baseParamsType } from "./protocol/command/baseparams";
@@ -293,6 +293,49 @@ export declare class CMDP_UPDATECHANNEL_RESPONSE extends CMDP_UPDATECHANNEL impl
293
293
  values: IKeyMaybeValue;
294
294
  payload?: unknown;
295
295
  }
296
+ /**
297
+ * channel summary info
298
+ */
299
+ export declare type channelSummaryInfo = {
300
+ [key: string]: string;
301
+ /** your business id */
302
+ usrId: string;
303
+ /** usrKey of your user */
304
+ usrKey: string;
305
+ /** number of channel */
306
+ channels: string;
307
+ /** number of unseen messages */
308
+ unseen: string;
309
+ /** number of unseen messages */
310
+ unseenWithoutArchived: string;
311
+ /** number of unanswered channels */
312
+ unanswered: string;
313
+ /** last time of incoming message */
314
+ lastTimeIn: string;
315
+ /** last time of outgoing message */
316
+ lastTimeOut: string;
317
+ /** number of archived channels */
318
+ archived: string;
319
+ /** number of advertised channels */
320
+ advertised: string;
321
+ /** number of regular channels */
322
+ regular: string;
323
+ /** number of pinned channels */
324
+ pinned: string;
325
+ /** number of muted channels */
326
+ muted: string;
327
+ /** number of banned channels */
328
+ banned: string;
329
+ /** number of vip channels */
330
+ vip: string;
331
+ };
332
+ /**
333
+ * channel summary
334
+ */
335
+ export declare class CMDC_CHANNELSUMMARY implements ICOMMAND {
336
+ action: ACTION;
337
+ params: channelSummaryInfo;
338
+ }
296
339
  /**
297
340
  * Query the summary info about all channels
298
341
  */
@@ -308,36 +351,5 @@ export declare class CMDP_CHANNELSSUMMARY_RESPONSE extends CMDP_CHANNELSSUMMARY
308
351
  /** unused */
309
352
  commands: ICOMMAND[];
310
353
  /** the summary info */
311
- values: {
312
- /** your business id */
313
- usrId: string;
314
- /** usrKey of your user */
315
- usrKey: string;
316
- /** number of channel */
317
- channels: string;
318
- /** number of unseen messages */
319
- unseen: string;
320
- /** number of unseen messages */
321
- unseenWithoutArchived: string;
322
- /** number of unanswered channels */
323
- unanswered: string;
324
- /** last time of incoming message */
325
- lastTimeIn: string;
326
- /** last time of outgoing message */
327
- lastTimeOut: string;
328
- /** number of archived channels */
329
- archived: string;
330
- /** number of advertised channels */
331
- advertised: string;
332
- /** number of regular channels */
333
- regular: string;
334
- /** number of pinned channels */
335
- pinned: string;
336
- /** number of muted channels */
337
- muted: string;
338
- /** number of banned channels */
339
- banned: string;
340
- /** number of vip channels */
341
- vip: string;
342
- };
354
+ values: channelSummaryInfo;
343
355
  }
@@ -112,5 +112,10 @@ export declare enum ACTION {
112
112
  CMDP_GETSETTINGS = "CMDP_GETSETTINGS",
113
113
  CMDC_MEDIAPURCHASED = "CMDC_MEDIAPURCHASED",
114
114
  CMDP_SGETMEDIAINFO = "CMDP_SGETMEDIAINFO",
115
- CMDP_SFORWARDMEDIA = "CMDP_SFORWARDMEDIA"
115
+ CMDP_SFORWARDMEDIA = "CMDP_SFORWARDMEDIA",
116
+ CMDP_SIGNUP = "CMDP_SIGNUP",
117
+ CMDP_RESETPASSWORD = "CMDP_RESETPASSWORD",
118
+ CMDP_SQUERYSTARTSINGLEC2C = "CMDP_SQUERYSTARTSINGLEC2C",
119
+ CMDP_SMEDIAOFFEROPEN = "CMDP_SMEDIAOFFEROPEN",
120
+ CMDP_SMEDIAOFFERCLOSE = "CMDP_SMEDIAOFFERCLOSE"
116
121
  }
@@ -311,11 +311,16 @@ export declare class CMDP_SQUERY_FORMAT_RESPONSE extends CMDP_SQUERY_FORMAT impl
311
311
  codec?: string;
312
312
  };
313
313
  }
314
+ export declare enum QueryUserKeyEnum {
315
+ FSK = "fsk",
316
+ SINGLE = "single",
317
+ SINGLEC2C = "singleC2C"
318
+ }
314
319
  export declare class CMDC_QUERYUSER implements ICOMMAND {
315
320
  action: ACTION;
316
321
  params: {
317
322
  queryId: string;
318
- key: string;
323
+ key: QueryUserKeyEnum;
319
324
  caption: string;
320
325
  text: string;
321
326
  btn0: string;
@@ -329,7 +334,7 @@ export declare class CMDC_QUERYUSER implements ICOMMAND {
329
334
  export declare class CMDP_QUERYUSER implements ICOMMAND {
330
335
  action: ACTION;
331
336
  params: baseParamsType & chatIdType & {
332
- key: "fsk" | "single";
337
+ key: QueryUserKeyEnum;
333
338
  button: EnumBooleanDigitized;
334
339
  queryId: string;
335
340
  /** if the answer sent by timeout */
@@ -0,0 +1,59 @@
1
+ import { ACTION, baseParamsType, IBACKENDPAYLOAD, ICOMMAND, IKeyMaybeValue, IRESPONSE, RESULT } from "../cmd-protocol";
2
+ import { channelIdType } from "./channel";
3
+ import { Currency, EnumTicketType, MediaFile, MediaPrice, MessageId } from "./message";
4
+ export declare type PriceInstruction = {
5
+ min: string;
6
+ max: string;
7
+ pick: string[];
8
+ };
9
+ export declare type DauerInstruction = {
10
+ min: string;
11
+ max: string;
12
+ pick: string[];
13
+ };
14
+ export declare type TicketPriceDauer = {
15
+ price: PriceInstruction;
16
+ /**dauer in seconds */
17
+ dauer: DauerInstruction;
18
+ };
19
+ export declare type MediaPrices = {
20
+ imagePrices: PriceInstruction;
21
+ audioPrices: PriceInstruction;
22
+ videoPrices: PriceInstruction;
23
+ ticketPrices?: Map<EnumTicketType, TicketPriceDauer>;
24
+ };
25
+ /**
26
+ * Command for get prices for media. Will be forwarded to B2B backend.
27
+ */
28
+ export declare class CMDP_SMEDIAGETPRICES implements ICOMMAND {
29
+ action: ACTION;
30
+ params: baseParamsType & channelIdType;
31
+ }
32
+ /**
33
+ * Response command for CMDP_SMEDIAGETPRICES
34
+ */
35
+ export declare class CMDP_SGETPRICESMEDIA_PRESPONSE extends CMDP_SMEDIAGETPRICES implements IRESPONSE, IBACKENDPAYLOAD {
36
+ result: RESULT;
37
+ commands: ICOMMAND[];
38
+ values: IKeyMaybeValue;
39
+ /** B2B Infos */
40
+ payload: Currency & MediaPrices;
41
+ }
42
+ /**
43
+ * B2B Command for create of media offer
44
+ */
45
+ export declare class CMDP_SMEDIAOFFERCREATE implements ICOMMAND {
46
+ action: ACTION;
47
+ params: baseParamsType & channelIdType & Currency & MediaPrice & MediaFile & MessageId & {
48
+ userPoolId: string;
49
+ usrKey: string;
50
+ };
51
+ }
52
+ /**
53
+ * B2B Response command for CMDP_SMEDIAOFFERCREATE
54
+ */
55
+ export declare class CMDP_SMEDIAOFFERCREATE_PRESPONSE extends CMDP_SMEDIAOFFERCREATE implements IRESPONSE {
56
+ result: RESULT;
57
+ commands: ICOMMAND[];
58
+ values: IKeyMaybeValue;
59
+ }
@@ -1,47 +1,32 @@
1
- import { ACTION, baseParamsType, IBACKENDPAYLOAD, ICOMMAND, IKeyMaybeValue, IRESPONSE, RESULT } from "../cmd-protocol";
1
+ import { ACTION, baseParamsType, ICOMMAND, IKeyMaybeValue, IRESPONSE, RESULT } from "../cmd-protocol";
2
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
- };
3
+ import { MediaFile, MediaPrice } from "./message";
14
4
  /**
15
- * Command for get prices for media. Will be forwarded to B2B backend.
5
+ * Frontent command for offer media.
16
6
  */
17
- export declare class CMDP_SMEDIAGETPRICES implements ICOMMAND {
7
+ export declare class CMDP_SMEDIAOFFEROPEN implements ICOMMAND {
18
8
  action: ACTION;
19
- params: baseParamsType & channelIdType;
9
+ params: baseParamsType & channelIdType & MediaPrice & MediaFile;
20
10
  }
21
11
  /**
22
- * Response command for CMDP_SMEDIAGETPRICES
12
+ * Response command for CMDP_SMEDIAOFFEROPEN.
23
13
  */
24
- export declare class CMDP_SGETPRICESMEDIA_PRESPONSE extends CMDP_SMEDIAGETPRICES implements IRESPONSE, IBACKENDPAYLOAD {
14
+ export declare class CMDP_SMEDIAOFFEROPEN_PRESPONSE extends CMDP_SMEDIAOFFEROPEN implements IRESPONSE {
25
15
  result: RESULT;
26
16
  commands: ICOMMAND[];
27
17
  values: IKeyMaybeValue;
28
- /** B2B Infos */
29
- payload: Currency & MediaPrices;
30
18
  }
31
19
  /**
32
- * B2B Command for create of media offer
20
+ * Frontent command for close of offer.
33
21
  */
34
- export declare class CMDP_SMEDIAOFFERCREATE implements ICOMMAND {
22
+ export declare class CMDP_SMEDIAOFFERCLOSE implements ICOMMAND {
35
23
  action: ACTION;
36
- params: baseParamsType & channelIdType & Currency & MediaPrice & MediaFile & MessageId & {
37
- userPoolId: string;
38
- usrKey: string;
39
- };
24
+ params: baseParamsType & channelIdType;
40
25
  }
41
26
  /**
42
- * B2B Response command for CMDP_SMEDIAOFFERCREATE
27
+ * Response command for CMDP_SMEDIAOFFERCLOSE.
43
28
  */
44
- export declare class CMDP_SMEDIAOFFERCREATE_PRESPONSE extends CMDP_SMEDIAOFFERCREATE implements IRESPONSE {
29
+ export declare class CMDP_SMEDIAOFFERCLOSE_PRESPONSE extends CMDP_SMEDIAOFFERCLOSE implements IRESPONSE {
45
30
  result: RESULT;
46
31
  commands: ICOMMAND[];
47
32
  values: IKeyMaybeValue;
@@ -3,7 +3,6 @@ import { channelIdType } from "./channel";
3
3
  import { CMDC_CMSG, MediaFile, MediaPrice, MessageId } from "./message";
4
4
  /**
5
5
  * Frontent command for media purchase. Will be forwarded to users pool B2B backend with additional infos
6
-
7
6
  */
8
7
  export declare class CMDP_SMEDIAPURCHASE implements ICOMMAND {
9
8
  action: ACTION;
@@ -44,6 +43,9 @@ export declare class CMDP_SINFORMMEDIAPURCHASED_RESPONSE extends CMDP_SINFORMMED
44
43
  commands: ICOMMAND[];
45
44
  values: IKeyMaybeValue;
46
45
  }
46
+ /**
47
+ * Inform the Session about purchase
48
+ */
47
49
  export declare class CMDC_MEDIAPURCHASED extends CMDC_CMSG {
48
50
  action: ACTION;
49
51
  }
@@ -3,7 +3,7 @@ import { channelIdType } from "./channel";
3
3
  import { ACTION } from "./command/action";
4
4
  import { baseParamsType } from "./command/baseparams";
5
5
  import { ICOMMAND, IRESPONSE, RESULT, IKeyMaybeValue } from "./command/icommand";
6
- import { EnumMediaType, MediaFile, MediaOffer, MessageParams } from "./message";
6
+ import { EnumMediaType, MediaFile, MediaMd5, MediaOffer, MessageParams } from "./message";
7
7
  export declare enum UploadStep {
8
8
  earlyreject = "earlyreject",
9
9
  lateaccept = "lateaccept",
@@ -57,18 +57,13 @@ export declare class CMDP_SUPLOADMEDIA_RESPONSE extends CMDP_SUPLOADMEDIA implem
57
57
  */
58
58
  export declare class CMDP_SGETMEDIAINFO implements ICOMMAND {
59
59
  action: ACTION;
60
- params: baseParamsType & {
61
- md5: string;
62
- };
60
+ params: baseParamsType & MediaMd5;
63
61
  }
64
62
  /**
65
63
  * Media Info, if found in cache, or CHAT_NOT_FOUND, if not.
66
64
  */
67
65
  export declare class CMDP_SGETMEDIAINFO_RESPONSE extends CMDP_SGETMEDIAINFO {
68
- action: ACTION;
69
- params: baseParamsType & {
70
- md5: string;
71
- };
66
+ commands: ICOMMAND[];
72
67
  values: MediaFile;
73
68
  }
74
69
  /**
@@ -26,13 +26,17 @@ export declare enum EnumMessageDirection {
26
26
  export declare enum EnumMediaType {
27
27
  BITMAP = "Bitmap",
28
28
  AUDIO = "Audio",
29
- VIDEO = "Video"
29
+ VIDEO = "Video",
30
+ TICKET = "Ticket"
30
31
  }
31
32
  export declare enum EnumMediaState {
32
33
  OK = "ok",
33
34
  TRANSCODING = "transcode",
34
35
  ERROR = "error"
35
36
  }
37
+ export declare enum EnumTicketType {
38
+ SingleC2C = "singleC2C"
39
+ }
36
40
  export declare enum EnumMessageStyle {
37
41
  GUEST = "g" /** depretacted */,
38
42
  SYSTEM = "s" /** depretacted */,
@@ -64,7 +68,10 @@ export declare type MessageParams = IMayHaveChannelId & {
64
68
  link?: string;
65
69
  clientData?: string;
66
70
  };
67
- export declare type MediaInfo = {
71
+ export declare type MediaMd5 = {
72
+ mediaMd5?: string;
73
+ };
74
+ export declare type MediaInfo = MediaMd5 & {
68
75
  /** the media attached */
69
76
  mediaType?: EnumMediaType | string;
70
77
  /** state of media attached */
@@ -93,13 +100,18 @@ export declare type AudioFile = MediaInfo & {
93
100
  export declare type VideoFile = MediaInfo & {
94
101
  /**Video media */
95
102
  videoPoster?: string;
103
+ videoPosterBlurred?: string;
104
+ videoFileUrl?: string;
96
105
  videoHls?: string;
97
106
  videoHeight?: string;
98
107
  videoWidth?: string;
99
108
  videoDuration?: string;
100
- videoPosterBlurred?: string;
101
109
  };
102
- export declare type MediaFile = ImageFile | AudioFile | VideoFile;
110
+ export declare type Ticket = MediaInfo & {
111
+ duration?: string;
112
+ ticketType?: EnumTicketType;
113
+ };
114
+ export declare type MediaFile = ImageFile | AudioFile | VideoFile | Ticket;
103
115
  /** id of the message */
104
116
  export declare type MessageId = {
105
117
  messageId: string;
@@ -0,0 +1,41 @@
1
+ import { ACTION } from "../command/action";
2
+ import { baseParamsType } from "../command/baseparams";
3
+ import { ICOMMAND, IKeyMaybeValue, IRESPONSE, RESULT } from "../command/icommand";
4
+ /**
5
+ * Create new user account
6
+ */
7
+ export declare class CMDP_SIGNUP implements ICOMMAND {
8
+ action: ACTION;
9
+ params: baseParamsType & {
10
+ login: string;
11
+ password: string;
12
+ ualias: string;
13
+ language: string;
14
+ };
15
+ }
16
+ /**
17
+ * reponse
18
+ */
19
+ export declare class CMDP_SIGNUP_RESPONSE extends CMDP_SIGNUP implements IRESPONSE {
20
+ result: RESULT;
21
+ commands: ICOMMAND[];
22
+ values: IKeyMaybeValue;
23
+ }
24
+ /**
25
+ * query password reset
26
+ */
27
+ export declare class CMDP_RESETPASSWORD implements ICOMMAND {
28
+ action: ACTION;
29
+ params: baseParamsType & {
30
+ login: string;
31
+ language: string;
32
+ };
33
+ }
34
+ /**
35
+ * reponse
36
+ */
37
+ export declare class CMDP_RESETPASSWORD_RESPONSE extends CMDP_SIGNUP implements IRESPONSE {
38
+ result: RESULT;
39
+ commands: ICOMMAND[];
40
+ values: IKeyMaybeValue;
41
+ }
@@ -0,0 +1,22 @@
1
+ import { ACTION, baseParamsType, ICOMMAND, IKeyMaybeValue, IRESPONSE, RESULT } from "../cmd-protocol";
2
+ import { channelIdType } from "./channel";
3
+ import { Ticket, MessageId } from "./message";
4
+ /**
5
+ * frontend command to start video cam2cam call
6
+ */
7
+ export declare class CMDP_SQUERYSTARTSINGLEC2C implements ICOMMAND {
8
+ action: ACTION;
9
+ params: baseParamsType & channelIdType &
10
+ /** the message id of related media offer */
11
+ MessageId &
12
+ /** MediaFile is added to proxy call from Cmdontrol to B2B backend */
13
+ Ticket;
14
+ }
15
+ /**
16
+ * Response command for CMDP_SQUERYSTARTSINGLEC2C.
17
+ */
18
+ export declare class CMDP_SQUERYSTARTSINGLEC2C_RESPONSE extends CMDP_SQUERYSTARTSINGLEC2C implements IRESPONSE {
19
+ result: RESULT;
20
+ commands: ICOMMAND[];
21
+ values: IKeyMaybeValue;
22
+ }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "cmd-control-client-lib",
3
3
  "description": "Cmd-Client-Library",
4
- "version": "3.0.18",
4
+ "version": "3.0.23",
5
5
  "directories": {
6
6
  "lib": "./dist"
7
7
  },