cmd-control-client-lib 3.0.300 → 3.0.301
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
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
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
|
}
|
package/dist/protocol/toy.d.ts
CHANGED
|
@@ -2,7 +2,27 @@ 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
|
+
};
|
|
12
|
+
export declare type toyLocalAppResponseType = {
|
|
13
|
+
type: string;
|
|
14
|
+
code: number;
|
|
15
|
+
data: Map<string, toyType>;
|
|
16
|
+
};
|
|
17
|
+
export declare type remoteToyAppType = {
|
|
18
|
+
uid: string;
|
|
19
|
+
appVersion: string;
|
|
20
|
+
utoken: string;
|
|
21
|
+
appType: string;
|
|
22
|
+
version: string;
|
|
23
|
+
platform: string;
|
|
24
|
+
toys: Map<string, toyType>;
|
|
25
|
+
};
|
|
6
26
|
/**
|
|
7
27
|
* update the toy state
|
|
8
28
|
*/
|
|
@@ -10,6 +30,9 @@ export declare class CMDP_TOYSTATE implements ICOMMAND {
|
|
|
10
30
|
action: ACTION;
|
|
11
31
|
params: baseParamsType & {
|
|
12
32
|
online: boolean;
|
|
33
|
+
} & {
|
|
34
|
+
toyListJson?: JSONString<Map<string, toyType>>;
|
|
35
|
+
localAppJson?: JSONString<toyLocalAppResponseType>;
|
|
13
36
|
};
|
|
14
37
|
}
|
|
15
38
|
/**
|
|
@@ -28,7 +51,7 @@ export declare type toyActionParams = {
|
|
|
28
51
|
duration: string;
|
|
29
52
|
/** float value from 0.0 to 1.0 */
|
|
30
53
|
intensity: string;
|
|
31
|
-
/** the messageKey -
|
|
54
|
+
/** the messageKey - correlation to CMDP_MSG with gift */
|
|
32
55
|
messageKey?: string;
|
|
33
56
|
/** the relationId of this Action */
|
|
34
57
|
relationId?: string;
|
|
@@ -59,33 +82,21 @@ export declare class CMDC_TOYACTION implements ICOMMAND {
|
|
|
59
82
|
action: ACTION;
|
|
60
83
|
params: IMayHaveChannelId & toyActionParams & IKeyMaybeValue;
|
|
61
84
|
}
|
|
62
|
-
export declare
|
|
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 {
|
|
85
|
+
export declare class CMDP_GETTOYQRCODE implements ICOMMAND {
|
|
78
86
|
action: ACTION;
|
|
79
|
-
params: baseParamsType
|
|
87
|
+
params: baseParamsType & {
|
|
88
|
+
grBase64?: EnumBooleanStringified;
|
|
89
|
+
};
|
|
80
90
|
}
|
|
81
|
-
export declare class
|
|
91
|
+
export declare class CMDP_GETTOYQRCODE_RESPONSE extends CMDP_GETTOYQRCODE implements IRESPONSE {
|
|
82
92
|
result: RESULT;
|
|
83
93
|
values: {
|
|
84
94
|
code?: string;
|
|
95
|
+
grBase64?: string;
|
|
85
96
|
};
|
|
86
97
|
commands: ICOMMAND[];
|
|
87
98
|
}
|
|
88
|
-
export declare class
|
|
99
|
+
export declare class CMDP_GETTOYLIST implements ICOMMAND {
|
|
89
100
|
action: ACTION;
|
|
90
101
|
params: baseParamsType & ({
|
|
91
102
|
clientID?: string;
|
|
@@ -93,18 +104,18 @@ export declare class CMDP_REMOTETOYAPPDATA implements ICOMMAND {
|
|
|
93
104
|
chatID?: string;
|
|
94
105
|
});
|
|
95
106
|
}
|
|
96
|
-
export declare class
|
|
107
|
+
export declare class CMDP_GETTOYLIST_RESPONSE extends CMDP_GETTOYLIST implements IRESPONSE {
|
|
97
108
|
result: RESULT;
|
|
98
109
|
values: {
|
|
99
|
-
|
|
110
|
+
toys?: JSONString<Map<string, toyType>>;
|
|
100
111
|
};
|
|
101
112
|
commands: ICOMMAND[];
|
|
102
113
|
}
|
|
103
|
-
export declare class
|
|
114
|
+
export declare class CMDC_TOYLIST implements ICOMMAND {
|
|
104
115
|
action: ACTION;
|
|
105
116
|
params: {
|
|
106
|
-
sessionID
|
|
107
|
-
|
|
117
|
+
sessionID?: string;
|
|
118
|
+
toys?: JSONString<Map<string, toyType>>;
|
|
108
119
|
};
|
|
109
120
|
}
|
|
110
121
|
export declare type toyCommandFunctionType = {
|
|
@@ -129,16 +140,26 @@ export declare type toyCommandPresetType = {
|
|
|
129
140
|
timeSec: string;
|
|
130
141
|
toy: string;
|
|
131
142
|
};
|
|
132
|
-
export declare class
|
|
143
|
+
export declare class CMDP_TOYCOMMAND implements ICOMMAND {
|
|
133
144
|
action: ACTION;
|
|
134
145
|
params: baseParamsType & ({
|
|
135
146
|
clientID?: string;
|
|
136
147
|
} | {
|
|
137
148
|
chatID?: string;
|
|
138
|
-
}) &
|
|
149
|
+
}) & {
|
|
150
|
+
toy: string;
|
|
151
|
+
} & (toyCommandFunctionType | toyCommandPatternType | toyCommandPresetType);
|
|
139
152
|
}
|
|
140
|
-
export declare class
|
|
153
|
+
export declare class CMDP_TOYCOMMAND_RESPONSE extends CMDP_TOYCOMMAND implements IRESPONSE {
|
|
141
154
|
result: RESULT;
|
|
142
155
|
values: IKeyMaybeValue;
|
|
143
156
|
commands: ICOMMAND[];
|
|
144
157
|
}
|
|
158
|
+
export declare class CMDC_TOYCOMMAND implements ICOMMAND {
|
|
159
|
+
action: ACTION;
|
|
160
|
+
params: {
|
|
161
|
+
sessionID?: string;
|
|
162
|
+
} & {
|
|
163
|
+
toy: string;
|
|
164
|
+
} & (toyCommandFunctionType | toyCommandPatternType | toyCommandPresetType);
|
|
165
|
+
}
|