cmd-control-client-lib 3.0.300 → 3.0.303

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.
@@ -195,8 +195,9 @@ export declare enum ACTION {
195
195
  CMDP_SDELETEMVCSCHEDULE = "CMDP_SDELETEMVCSCHEDULE",
196
196
  CMDP_SGETUPLOADEDMEDIA2 = "CMDP_SGETUPLOADEDMEDIA2",
197
197
  CMDP_SSETMSETTINGS = "CMDP_SSETMSETTINGS",
198
- CMDP_REMOTETOYAPPQRCODE = "CMDP_REMOTETOYAPPQRCODE",
199
- CMDP_REMOTETOYAPPDATA = "CMDP_REMOTETOYAPPDATA",
200
- CMDP_REMOTETOYAPPCOMMAND = "CMDP_REMOTETOYAPPCOMMAND",
201
- CMDC_REMOTETOYAPPDATA = "CMDC_REMOTETOYAPPDATA"
198
+ CMDP_GETTOYQRCODE = "CMDP_GETTOYQRCODE",
199
+ CMDP_GETTOYLIST = "CMDP_GETTOYLIST",
200
+ CMDP_TOYCOMMAND = "CMDP_TOYCOMMAND",
201
+ CMDC_TOYCOMMAND = "CMDC_TOYCOMMAND",
202
+ CMDC_TOYLIST = "CMDC_TOYLIST"
202
203
  }
@@ -2,7 +2,26 @@ import { IMayHaveChannelId } from "./channel";
2
2
  import { ACTION } from "./command/action";
3
3
  import { baseParamsType } from "./command/baseparams";
4
4
  import { ICOMMAND, IKeyMaybeValue, IRESPONSE, RESULT } from "./command/icommand";
5
- import { JSONString } from "../@types";
5
+ import { EnumBooleanStringified, JSONString } from "../@types";
6
+ export declare type toyType = {
7
+ id: string;
8
+ nickName: string;
9
+ name: string;
10
+ status: number;
11
+ connect: string;
12
+ md5?: string;
13
+ battery?: string;
14
+ fVersion?: string;
15
+ control?: string;
16
+ mode?: string;
17
+ version?: string;
18
+ dateTime?: string;
19
+ };
20
+ export declare type toyLocalAppResponseType = {
21
+ type: string;
22
+ code: number;
23
+ data: Map<string, toyType>;
24
+ };
6
25
  /**
7
26
  * update the toy state
8
27
  */
@@ -10,6 +29,9 @@ export declare class CMDP_TOYSTATE implements ICOMMAND {
10
29
  action: ACTION;
11
30
  params: baseParamsType & {
12
31
  online: boolean;
32
+ } & {
33
+ toyListJson?: JSONString<Map<string, toyType>>;
34
+ localAppJson?: JSONString<toyLocalAppResponseType>;
13
35
  };
14
36
  }
15
37
  /**
@@ -28,7 +50,7 @@ export declare type toyActionParams = {
28
50
  duration: string;
29
51
  /** float value from 0.0 to 1.0 */
30
52
  intensity: string;
31
- /** the messageKey - corelation to CMDP_MSG with gift */
53
+ /** the messageKey - correlation to CMDP_MSG with gift */
32
54
  messageKey?: string;
33
55
  /** the relationId of this Action */
34
56
  relationId?: string;
@@ -59,33 +81,21 @@ export declare class CMDC_TOYACTION implements ICOMMAND {
59
81
  action: ACTION;
60
82
  params: IMayHaveChannelId & toyActionParams & IKeyMaybeValue;
61
83
  }
62
- export declare type remoteToyType = {
63
- nickname: string;
64
- name: string;
65
- id: string;
66
- status: number;
67
- };
68
- export declare type remoteToyAppType = {
69
- uid: string;
70
- appVersion: string;
71
- toys: Map<string, remoteToyType>;
72
- utoken: string;
73
- appType: string;
74
- version: string;
75
- platform: string;
76
- };
77
- export declare class CMDP_REMOTETOYAPPQRCODE implements ICOMMAND {
84
+ export declare class CMDP_GETTOYQRCODE implements ICOMMAND {
78
85
  action: ACTION;
79
- params: baseParamsType;
86
+ params: baseParamsType & {
87
+ grBase64?: EnumBooleanStringified;
88
+ };
80
89
  }
81
- export declare class CMDP_REMOTETOYAPPQRCODE_RESPONSE extends CMDP_REMOTETOYAPPQRCODE implements IRESPONSE {
90
+ export declare class CMDP_GETTOYQRCODE_RESPONSE extends CMDP_GETTOYQRCODE implements IRESPONSE {
82
91
  result: RESULT;
83
92
  values: {
84
93
  code?: string;
94
+ grBase64?: string;
85
95
  };
86
96
  commands: ICOMMAND[];
87
97
  }
88
- export declare class CMDP_REMOTETOYAPPDATA implements ICOMMAND {
98
+ export declare class CMDP_GETTOYLIST implements ICOMMAND {
89
99
  action: ACTION;
90
100
  params: baseParamsType & ({
91
101
  clientID?: string;
@@ -93,18 +103,18 @@ export declare class CMDP_REMOTETOYAPPDATA implements ICOMMAND {
93
103
  chatID?: string;
94
104
  });
95
105
  }
96
- export declare class CMDP_REMOTETOYAPPDATA_RESPONSE extends CMDP_REMOTETOYAPPDATA implements IRESPONSE {
106
+ export declare class CMDP_GETTOYLIST_RESPONSE extends CMDP_GETTOYLIST implements IRESPONSE {
97
107
  result: RESULT;
98
108
  values: {
99
- remoteAppData?: JSONString<remoteToyAppType>;
109
+ toys?: JSONString<Map<string, toyType>>;
100
110
  };
101
111
  commands: ICOMMAND[];
102
112
  }
103
- export declare class CMDC_REMOTETOYAPPDATA implements ICOMMAND {
113
+ export declare class CMDC_TOYLIST implements ICOMMAND {
104
114
  action: ACTION;
105
115
  params: {
106
- sessionID: string;
107
- remoteAppData: JSONString<remoteToyAppType>;
116
+ sessionID?: string;
117
+ toys?: JSONString<Map<string, toyType>>;
108
118
  };
109
119
  }
110
120
  export declare type toyCommandFunctionType = {
@@ -129,16 +139,26 @@ export declare type toyCommandPresetType = {
129
139
  timeSec: string;
130
140
  toy: string;
131
141
  };
132
- export declare class CMDP_REMOTETOYAPPCOMMAND implements ICOMMAND {
142
+ export declare class CMDP_TOYCOMMAND implements ICOMMAND {
133
143
  action: ACTION;
134
144
  params: baseParamsType & ({
135
145
  clientID?: string;
136
146
  } | {
137
147
  chatID?: string;
138
- }) & (toyCommandFunctionType | toyCommandPatternType | toyCommandPresetType);
148
+ }) & {
149
+ toy: string;
150
+ } & (toyCommandFunctionType | toyCommandPatternType | toyCommandPresetType);
139
151
  }
140
- export declare class CMDP_REMOTETOYAPPCOMMAND_RESPONSE extends CMDP_REMOTETOYAPPCOMMAND implements IRESPONSE {
152
+ export declare class CMDP_TOYCOMMAND_RESPONSE extends CMDP_TOYCOMMAND implements IRESPONSE {
141
153
  result: RESULT;
142
154
  values: IKeyMaybeValue;
143
155
  commands: ICOMMAND[];
144
156
  }
157
+ export declare class CMDC_TOYCOMMAND implements ICOMMAND {
158
+ action: ACTION;
159
+ params: {
160
+ sessionID?: string;
161
+ } & {
162
+ toy: string;
163
+ } & (toyCommandFunctionType | toyCommandPatternType | toyCommandPresetType);
164
+ }
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.300",
4
+ "version": "3.0.303",
5
5
  "directories": {
6
6
  "lib": "./dist"
7
7
  },