cmd-control-client-lib 3.0.21 → 3.0.25

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";
@@ -34,4 +34,7 @@ export * from "./protocol/live/onlinesummary";
34
34
  export * from "./protocol/live/usersettings";
35
35
  export * from "./protocol/messenger/expo";
36
36
  export * from "./protocol/messenger/signup";
37
+ export * from "./protocol/single-c2c";
38
+ export * from "./protocol/mediaoffer";
39
+ export * from "./protocol/mediaoffer-b2b";
37
40
  export { SupportedLanguage, CmdClientAgent, EnumFormatValues, baseParamsType } from "./protocol/command/baseparams";
@@ -114,5 +114,8 @@ export declare enum ACTION {
114
114
  CMDP_SGETMEDIAINFO = "CMDP_SGETMEDIAINFO",
115
115
  CMDP_SFORWARDMEDIA = "CMDP_SFORWARDMEDIA",
116
116
  CMDP_SIGNUP = "CMDP_SIGNUP",
117
- CMDP_RESETPASSWORD = "CMDP_RESETPASSWORD"
117
+ CMDP_RESETPASSWORD = "CMDP_RESETPASSWORD",
118
+ CMDP_SQUERYSTARTSINGLEC2C = "CMDP_SQUERYSTARTSINGLEC2C",
119
+ CMDP_SOPENMEDIAOFFER = "CMDP_SOPENMEDIAOFFER",
120
+ CMDP_SCLOSEMEDIAOFFER = "CMDP_SCLOSEMEDIAOFFER"
118
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_SOPENMEDIAOFFER 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_SOPENMEDIAOFFER.
23
13
  */
24
- export declare class CMDP_SGETPRICESMEDIA_PRESPONSE extends CMDP_SMEDIAGETPRICES implements IRESPONSE, IBACKENDPAYLOAD {
14
+ export declare class CMDP_SOPENMEDIAOFFER_PRESPONSE extends CMDP_SOPENMEDIAOFFER 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_SCLOSEMEDIAOFFER 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_SCLOSEMEDIAOFFER.
43
28
  */
44
- export declare class CMDP_SMEDIAOFFERCREATE_PRESPONSE extends CMDP_SMEDIAOFFERCREATE implements IRESPONSE {
29
+ export declare class CMDP_SCLOSEMEDIAOFFER_PRESPONSE extends CMDP_SCLOSEMEDIAOFFER 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,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.21",
4
+ "version": "3.0.25",
5
5
  "directories": {
6
6
  "lib": "./dist"
7
7
  },