larksr_websdk 3.2.0
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/README.md +31 -0
- package/dist/larksr-web-sdk.min.js +15 -0
- package/dist/larksr-web-sdk.min.worker.js +1 -0
- package/dist/types/api.d.ts +85 -0
- package/dist/types/appli_params.d.ts +244 -0
- package/dist/types/common/cmd.d.ts +28 -0
- package/dist/types/common/constant.d.ts +4 -0
- package/dist/types/common/interface.d.ts +30 -0
- package/dist/types/config.d.ts +59 -0
- package/dist/types/event/bus.d.ts +8 -0
- package/dist/types/event/event_base.d.ts +14 -0
- package/dist/types/event/events.d.ts +126 -0
- package/dist/types/event/iframe_poster.d.ts +9 -0
- package/dist/types/event/message.d.ts +69 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/lark/Worker.d.ts +3 -0
- package/dist/types/lark/application.d.ts +102 -0
- package/dist/types/lark/custom.d.ts +7 -0
- package/dist/types/lark/lark_event_type.d.ts +109 -0
- package/dist/types/lark/message.d.ts +19 -0
- package/dist/types/lark/peer_connection.d.ts +113 -0
- package/dist/types/lark/sdp_util.d.ts +36 -0
- package/dist/types/lark/websocket_channel.d.ts +57 -0
- package/dist/types/lark/websocket_proxy.d.ts +57 -0
- package/dist/types/larksr.d.ts +138 -0
- package/dist/types/localization/base.d.ts +8 -0
- package/dist/types/localization/gesture_ins.d.ts +4 -0
- package/dist/types/localization/language.d.ts +6 -0
- package/dist/types/localization/loader.d.ts +14 -0
- package/dist/types/localization/message.d.ts +81 -0
- package/dist/types/localization/ui.d.ts +58 -0
- package/dist/types/operation/gamepad_handler.d.ts +67 -0
- package/dist/types/operation/gesture.d.ts +70 -0
- package/dist/types/operation/gesture_handler.d.ts +13 -0
- package/dist/types/operation/handler_base.d.ts +8 -0
- package/dist/types/operation/keyboard_handler.d.ts +15 -0
- package/dist/types/operation/keymap.d.ts +20 -0
- package/dist/types/operation/letter_keymap.d.ts +8 -0
- package/dist/types/operation/mouse_handler.d.ts +40 -0
- package/dist/types/operation/num_keymap.d.ts +12 -0
- package/dist/types/operation/operation.d.ts +58 -0
- package/dist/types/operation/touch_handler.d.ts +11 -0
- package/dist/types/operation/utils.d.ts +18 -0
- package/dist/types/protobuf/cloudlark.d.ts +5944 -0
- package/dist/types/protobuf/message.d.ts +528 -0
- package/dist/types/screen_state.d.ts +108 -0
- package/dist/types/sdk_auth.d.ts +11 -0
- package/dist/types/utils/browser_type.d.ts +37 -0
- package/dist/types/utils/capabilities.d.ts +48 -0
- package/dist/types/utils/full_screen.d.ts +25 -0
- package/dist/types/utils/lock_pointer.d.ts +23 -0
- package/dist/types/utils/log.d.ts +25 -0
- package/dist/types/utils/scale_mode.d.ts +20 -0
- package/dist/types/utils/unit.d.ts +152 -0
- package/package.json +61 -0
|
@@ -0,0 +1,528 @@
|
|
|
1
|
+
import * as $protobuf from "protobufjs";
|
|
2
|
+
/** Namespace pxyproto. */
|
|
3
|
+
export namespace pxyproto {
|
|
4
|
+
|
|
5
|
+
/** CONTROL_MSG_TYPE enum. */
|
|
6
|
+
enum CONTROL_MSG_TYPE {
|
|
7
|
+
MSG_HELLO = 0,
|
|
8
|
+
MSG_PING = 1,
|
|
9
|
+
MSG_PONG = 2
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
/** Properties of a ControlMessage. */
|
|
13
|
+
interface IControlMessage {
|
|
14
|
+
|
|
15
|
+
/** ControlMessage type */
|
|
16
|
+
type?: (pxyproto.CONTROL_MSG_TYPE|null);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/** Represents a ControlMessage. */
|
|
20
|
+
class ControlMessage implements IControlMessage {
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Constructs a new ControlMessage.
|
|
24
|
+
* @param [properties] Properties to set
|
|
25
|
+
*/
|
|
26
|
+
constructor(properties?: pxyproto.IControlMessage);
|
|
27
|
+
|
|
28
|
+
/** ControlMessage type. */
|
|
29
|
+
public type: pxyproto.CONTROL_MSG_TYPE;
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Creates a new ControlMessage instance using the specified properties.
|
|
33
|
+
* @param [properties] Properties to set
|
|
34
|
+
* @returns ControlMessage instance
|
|
35
|
+
*/
|
|
36
|
+
public static create(properties?: pxyproto.IControlMessage): pxyproto.ControlMessage;
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Encodes the specified ControlMessage message. Does not implicitly {@link pxyproto.ControlMessage.verify|verify} messages.
|
|
40
|
+
* @param message ControlMessage message or plain object to encode
|
|
41
|
+
* @param [writer] Writer to encode to
|
|
42
|
+
* @returns Writer
|
|
43
|
+
*/
|
|
44
|
+
public static encode(message: pxyproto.IControlMessage, writer?: $protobuf.Writer): $protobuf.Writer;
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Encodes the specified ControlMessage message, length delimited. Does not implicitly {@link pxyproto.ControlMessage.verify|verify} messages.
|
|
48
|
+
* @param message ControlMessage message or plain object to encode
|
|
49
|
+
* @param [writer] Writer to encode to
|
|
50
|
+
* @returns Writer
|
|
51
|
+
*/
|
|
52
|
+
public static encodeDelimited(message: pxyproto.IControlMessage, writer?: $protobuf.Writer): $protobuf.Writer;
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Decodes a ControlMessage message from the specified reader or buffer.
|
|
56
|
+
* @param reader Reader or buffer to decode from
|
|
57
|
+
* @param [length] Message length if known beforehand
|
|
58
|
+
* @returns ControlMessage
|
|
59
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
60
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
61
|
+
*/
|
|
62
|
+
public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): pxyproto.ControlMessage;
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* Decodes a ControlMessage message from the specified reader or buffer, length delimited.
|
|
66
|
+
* @param reader Reader or buffer to decode from
|
|
67
|
+
* @returns ControlMessage
|
|
68
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
69
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
70
|
+
*/
|
|
71
|
+
public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): pxyproto.ControlMessage;
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* Verifies a ControlMessage message.
|
|
75
|
+
* @param message Plain object to verify
|
|
76
|
+
* @returns `null` if valid, otherwise the reason why it is not
|
|
77
|
+
*/
|
|
78
|
+
public static verify(message: { [k: string]: any }): (string|null);
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* Creates a ControlMessage message from a plain object. Also converts values to their respective internal types.
|
|
82
|
+
* @param object Plain object
|
|
83
|
+
* @returns ControlMessage
|
|
84
|
+
*/
|
|
85
|
+
public static fromObject(object: { [k: string]: any }): pxyproto.ControlMessage;
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* Creates a plain object from a ControlMessage message. Also converts values to other types if specified.
|
|
89
|
+
* @param message ControlMessage
|
|
90
|
+
* @param [options] Conversion options
|
|
91
|
+
* @returns Plain object
|
|
92
|
+
*/
|
|
93
|
+
public static toObject(message: pxyproto.ControlMessage, options?: $protobuf.IConversionOptions): { [k: string]: any };
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* Converts this ControlMessage to JSON.
|
|
97
|
+
* @returns JSON object
|
|
98
|
+
*/
|
|
99
|
+
public toJSON(): { [k: string]: any };
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
/** SystemType enum. */
|
|
103
|
+
enum SystemType {
|
|
104
|
+
WINDOWS = 0,
|
|
105
|
+
MAC = 1,
|
|
106
|
+
LINUX = 3,
|
|
107
|
+
ANDROID = 4,
|
|
108
|
+
IOS = 5
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
/** ClientType enum. */
|
|
112
|
+
enum ClientType {
|
|
113
|
+
WEB = 0,
|
|
114
|
+
NATIVE = 1
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
/** PlatformType enum. */
|
|
118
|
+
enum PlatformType {
|
|
119
|
+
PC = 0,
|
|
120
|
+
PHONE = 1,
|
|
121
|
+
TABLET = 2
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
/** Properties of a ClientInfo. */
|
|
125
|
+
interface IClientInfo {
|
|
126
|
+
|
|
127
|
+
/** ClientInfo clientVersion */
|
|
128
|
+
clientVersion?: (string|null);
|
|
129
|
+
|
|
130
|
+
/** ClientInfo systemType */
|
|
131
|
+
systemType?: (pxyproto.SystemType|null);
|
|
132
|
+
|
|
133
|
+
/** ClientInfo clientType */
|
|
134
|
+
clientType?: (pxyproto.ClientType|null);
|
|
135
|
+
|
|
136
|
+
/** ClientInfo platformType */
|
|
137
|
+
platformType?: (pxyproto.PlatformType|null);
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
/** Represents a ClientInfo. */
|
|
141
|
+
class ClientInfo implements IClientInfo {
|
|
142
|
+
|
|
143
|
+
/**
|
|
144
|
+
* Constructs a new ClientInfo.
|
|
145
|
+
* @param [properties] Properties to set
|
|
146
|
+
*/
|
|
147
|
+
constructor(properties?: pxyproto.IClientInfo);
|
|
148
|
+
|
|
149
|
+
/** ClientInfo clientVersion. */
|
|
150
|
+
public clientVersion: string;
|
|
151
|
+
|
|
152
|
+
/** ClientInfo systemType. */
|
|
153
|
+
public systemType: pxyproto.SystemType;
|
|
154
|
+
|
|
155
|
+
/** ClientInfo clientType. */
|
|
156
|
+
public clientType: pxyproto.ClientType;
|
|
157
|
+
|
|
158
|
+
/** ClientInfo platformType. */
|
|
159
|
+
public platformType: pxyproto.PlatformType;
|
|
160
|
+
|
|
161
|
+
/**
|
|
162
|
+
* Creates a new ClientInfo instance using the specified properties.
|
|
163
|
+
* @param [properties] Properties to set
|
|
164
|
+
* @returns ClientInfo instance
|
|
165
|
+
*/
|
|
166
|
+
public static create(properties?: pxyproto.IClientInfo): pxyproto.ClientInfo;
|
|
167
|
+
|
|
168
|
+
/**
|
|
169
|
+
* Encodes the specified ClientInfo message. Does not implicitly {@link pxyproto.ClientInfo.verify|verify} messages.
|
|
170
|
+
* @param message ClientInfo message or plain object to encode
|
|
171
|
+
* @param [writer] Writer to encode to
|
|
172
|
+
* @returns Writer
|
|
173
|
+
*/
|
|
174
|
+
public static encode(message: pxyproto.IClientInfo, writer?: $protobuf.Writer): $protobuf.Writer;
|
|
175
|
+
|
|
176
|
+
/**
|
|
177
|
+
* Encodes the specified ClientInfo message, length delimited. Does not implicitly {@link pxyproto.ClientInfo.verify|verify} messages.
|
|
178
|
+
* @param message ClientInfo message or plain object to encode
|
|
179
|
+
* @param [writer] Writer to encode to
|
|
180
|
+
* @returns Writer
|
|
181
|
+
*/
|
|
182
|
+
public static encodeDelimited(message: pxyproto.IClientInfo, writer?: $protobuf.Writer): $protobuf.Writer;
|
|
183
|
+
|
|
184
|
+
/**
|
|
185
|
+
* Decodes a ClientInfo message from the specified reader or buffer.
|
|
186
|
+
* @param reader Reader or buffer to decode from
|
|
187
|
+
* @param [length] Message length if known beforehand
|
|
188
|
+
* @returns ClientInfo
|
|
189
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
190
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
191
|
+
*/
|
|
192
|
+
public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): pxyproto.ClientInfo;
|
|
193
|
+
|
|
194
|
+
/**
|
|
195
|
+
* Decodes a ClientInfo message from the specified reader or buffer, length delimited.
|
|
196
|
+
* @param reader Reader or buffer to decode from
|
|
197
|
+
* @returns ClientInfo
|
|
198
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
199
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
200
|
+
*/
|
|
201
|
+
public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): pxyproto.ClientInfo;
|
|
202
|
+
|
|
203
|
+
/**
|
|
204
|
+
* Verifies a ClientInfo message.
|
|
205
|
+
* @param message Plain object to verify
|
|
206
|
+
* @returns `null` if valid, otherwise the reason why it is not
|
|
207
|
+
*/
|
|
208
|
+
public static verify(message: { [k: string]: any }): (string|null);
|
|
209
|
+
|
|
210
|
+
/**
|
|
211
|
+
* Creates a ClientInfo message from a plain object. Also converts values to their respective internal types.
|
|
212
|
+
* @param object Plain object
|
|
213
|
+
* @returns ClientInfo
|
|
214
|
+
*/
|
|
215
|
+
public static fromObject(object: { [k: string]: any }): pxyproto.ClientInfo;
|
|
216
|
+
|
|
217
|
+
/**
|
|
218
|
+
* Creates a plain object from a ClientInfo message. Also converts values to other types if specified.
|
|
219
|
+
* @param message ClientInfo
|
|
220
|
+
* @param [options] Conversion options
|
|
221
|
+
* @returns Plain object
|
|
222
|
+
*/
|
|
223
|
+
public static toObject(message: pxyproto.ClientInfo, options?: $protobuf.IConversionOptions): { [k: string]: any };
|
|
224
|
+
|
|
225
|
+
/**
|
|
226
|
+
* Converts this ClientInfo to JSON.
|
|
227
|
+
* @returns JSON object
|
|
228
|
+
*/
|
|
229
|
+
public toJSON(): { [k: string]: any };
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
/** Properties of a ViewPort. */
|
|
233
|
+
interface IViewPort {
|
|
234
|
+
|
|
235
|
+
/** ViewPort width */
|
|
236
|
+
width?: (number|null);
|
|
237
|
+
|
|
238
|
+
/** ViewPort height */
|
|
239
|
+
height?: (number|null);
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
/** Represents a ViewPort. */
|
|
243
|
+
class ViewPort implements IViewPort {
|
|
244
|
+
|
|
245
|
+
/**
|
|
246
|
+
* Constructs a new ViewPort.
|
|
247
|
+
* @param [properties] Properties to set
|
|
248
|
+
*/
|
|
249
|
+
constructor(properties?: pxyproto.IViewPort);
|
|
250
|
+
|
|
251
|
+
/** ViewPort width. */
|
|
252
|
+
public width: number;
|
|
253
|
+
|
|
254
|
+
/** ViewPort height. */
|
|
255
|
+
public height: number;
|
|
256
|
+
|
|
257
|
+
/**
|
|
258
|
+
* Creates a new ViewPort instance using the specified properties.
|
|
259
|
+
* @param [properties] Properties to set
|
|
260
|
+
* @returns ViewPort instance
|
|
261
|
+
*/
|
|
262
|
+
public static create(properties?: pxyproto.IViewPort): pxyproto.ViewPort;
|
|
263
|
+
|
|
264
|
+
/**
|
|
265
|
+
* Encodes the specified ViewPort message. Does not implicitly {@link pxyproto.ViewPort.verify|verify} messages.
|
|
266
|
+
* @param message ViewPort message or plain object to encode
|
|
267
|
+
* @param [writer] Writer to encode to
|
|
268
|
+
* @returns Writer
|
|
269
|
+
*/
|
|
270
|
+
public static encode(message: pxyproto.IViewPort, writer?: $protobuf.Writer): $protobuf.Writer;
|
|
271
|
+
|
|
272
|
+
/**
|
|
273
|
+
* Encodes the specified ViewPort message, length delimited. Does not implicitly {@link pxyproto.ViewPort.verify|verify} messages.
|
|
274
|
+
* @param message ViewPort message or plain object to encode
|
|
275
|
+
* @param [writer] Writer to encode to
|
|
276
|
+
* @returns Writer
|
|
277
|
+
*/
|
|
278
|
+
public static encodeDelimited(message: pxyproto.IViewPort, writer?: $protobuf.Writer): $protobuf.Writer;
|
|
279
|
+
|
|
280
|
+
/**
|
|
281
|
+
* Decodes a ViewPort message from the specified reader or buffer.
|
|
282
|
+
* @param reader Reader or buffer to decode from
|
|
283
|
+
* @param [length] Message length if known beforehand
|
|
284
|
+
* @returns ViewPort
|
|
285
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
286
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
287
|
+
*/
|
|
288
|
+
public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): pxyproto.ViewPort;
|
|
289
|
+
|
|
290
|
+
/**
|
|
291
|
+
* Decodes a ViewPort message from the specified reader or buffer, length delimited.
|
|
292
|
+
* @param reader Reader or buffer to decode from
|
|
293
|
+
* @returns ViewPort
|
|
294
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
295
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
296
|
+
*/
|
|
297
|
+
public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): pxyproto.ViewPort;
|
|
298
|
+
|
|
299
|
+
/**
|
|
300
|
+
* Verifies a ViewPort message.
|
|
301
|
+
* @param message Plain object to verify
|
|
302
|
+
* @returns `null` if valid, otherwise the reason why it is not
|
|
303
|
+
*/
|
|
304
|
+
public static verify(message: { [k: string]: any }): (string|null);
|
|
305
|
+
|
|
306
|
+
/**
|
|
307
|
+
* Creates a ViewPort message from a plain object. Also converts values to their respective internal types.
|
|
308
|
+
* @param object Plain object
|
|
309
|
+
* @returns ViewPort
|
|
310
|
+
*/
|
|
311
|
+
public static fromObject(object: { [k: string]: any }): pxyproto.ViewPort;
|
|
312
|
+
|
|
313
|
+
/**
|
|
314
|
+
* Creates a plain object from a ViewPort message. Also converts values to other types if specified.
|
|
315
|
+
* @param message ViewPort
|
|
316
|
+
* @param [options] Conversion options
|
|
317
|
+
* @returns Plain object
|
|
318
|
+
*/
|
|
319
|
+
public static toObject(message: pxyproto.ViewPort, options?: $protobuf.IConversionOptions): { [k: string]: any };
|
|
320
|
+
|
|
321
|
+
/**
|
|
322
|
+
* Converts this ViewPort to JSON.
|
|
323
|
+
* @returns JSON object
|
|
324
|
+
*/
|
|
325
|
+
public toJSON(): { [k: string]: any };
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
/** Properties of a DataMessage. */
|
|
329
|
+
interface IDataMessage {
|
|
330
|
+
|
|
331
|
+
/** DataMessage data */
|
|
332
|
+
data?: (Uint8Array|null);
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
/** Represents a DataMessage. */
|
|
336
|
+
class DataMessage implements IDataMessage {
|
|
337
|
+
|
|
338
|
+
/**
|
|
339
|
+
* Constructs a new DataMessage.
|
|
340
|
+
* @param [properties] Properties to set
|
|
341
|
+
*/
|
|
342
|
+
constructor(properties?: pxyproto.IDataMessage);
|
|
343
|
+
|
|
344
|
+
/** DataMessage data. */
|
|
345
|
+
public data: Uint8Array;
|
|
346
|
+
|
|
347
|
+
/**
|
|
348
|
+
* Creates a new DataMessage instance using the specified properties.
|
|
349
|
+
* @param [properties] Properties to set
|
|
350
|
+
* @returns DataMessage instance
|
|
351
|
+
*/
|
|
352
|
+
public static create(properties?: pxyproto.IDataMessage): pxyproto.DataMessage;
|
|
353
|
+
|
|
354
|
+
/**
|
|
355
|
+
* Encodes the specified DataMessage message. Does not implicitly {@link pxyproto.DataMessage.verify|verify} messages.
|
|
356
|
+
* @param message DataMessage message or plain object to encode
|
|
357
|
+
* @param [writer] Writer to encode to
|
|
358
|
+
* @returns Writer
|
|
359
|
+
*/
|
|
360
|
+
public static encode(message: pxyproto.IDataMessage, writer?: $protobuf.Writer): $protobuf.Writer;
|
|
361
|
+
|
|
362
|
+
/**
|
|
363
|
+
* Encodes the specified DataMessage message, length delimited. Does not implicitly {@link pxyproto.DataMessage.verify|verify} messages.
|
|
364
|
+
* @param message DataMessage message or plain object to encode
|
|
365
|
+
* @param [writer] Writer to encode to
|
|
366
|
+
* @returns Writer
|
|
367
|
+
*/
|
|
368
|
+
public static encodeDelimited(message: pxyproto.IDataMessage, writer?: $protobuf.Writer): $protobuf.Writer;
|
|
369
|
+
|
|
370
|
+
/**
|
|
371
|
+
* Decodes a DataMessage message from the specified reader or buffer.
|
|
372
|
+
* @param reader Reader or buffer to decode from
|
|
373
|
+
* @param [length] Message length if known beforehand
|
|
374
|
+
* @returns DataMessage
|
|
375
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
376
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
377
|
+
*/
|
|
378
|
+
public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): pxyproto.DataMessage;
|
|
379
|
+
|
|
380
|
+
/**
|
|
381
|
+
* Decodes a DataMessage message from the specified reader or buffer, length delimited.
|
|
382
|
+
* @param reader Reader or buffer to decode from
|
|
383
|
+
* @returns DataMessage
|
|
384
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
385
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
386
|
+
*/
|
|
387
|
+
public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): pxyproto.DataMessage;
|
|
388
|
+
|
|
389
|
+
/**
|
|
390
|
+
* Verifies a DataMessage message.
|
|
391
|
+
* @param message Plain object to verify
|
|
392
|
+
* @returns `null` if valid, otherwise the reason why it is not
|
|
393
|
+
*/
|
|
394
|
+
public static verify(message: { [k: string]: any }): (string|null);
|
|
395
|
+
|
|
396
|
+
/**
|
|
397
|
+
* Creates a DataMessage message from a plain object. Also converts values to their respective internal types.
|
|
398
|
+
* @param object Plain object
|
|
399
|
+
* @returns DataMessage
|
|
400
|
+
*/
|
|
401
|
+
public static fromObject(object: { [k: string]: any }): pxyproto.DataMessage;
|
|
402
|
+
|
|
403
|
+
/**
|
|
404
|
+
* Creates a plain object from a DataMessage message. Also converts values to other types if specified.
|
|
405
|
+
* @param message DataMessage
|
|
406
|
+
* @param [options] Conversion options
|
|
407
|
+
* @returns Plain object
|
|
408
|
+
*/
|
|
409
|
+
public static toObject(message: pxyproto.DataMessage, options?: $protobuf.IConversionOptions): { [k: string]: any };
|
|
410
|
+
|
|
411
|
+
/**
|
|
412
|
+
* Converts this DataMessage to JSON.
|
|
413
|
+
* @returns JSON object
|
|
414
|
+
*/
|
|
415
|
+
public toJSON(): { [k: string]: any };
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
/** Properties of a Message. */
|
|
419
|
+
interface IMessage {
|
|
420
|
+
|
|
421
|
+
/** Message controlMsg */
|
|
422
|
+
controlMsg?: (pxyproto.IControlMessage|null);
|
|
423
|
+
|
|
424
|
+
/** Message dataMsg */
|
|
425
|
+
dataMsg?: (pxyproto.IDataMessage|null);
|
|
426
|
+
|
|
427
|
+
/** Message clientInfo */
|
|
428
|
+
clientInfo?: (pxyproto.IClientInfo|null);
|
|
429
|
+
|
|
430
|
+
/** Message viewPort */
|
|
431
|
+
viewPort?: (pxyproto.IViewPort|null);
|
|
432
|
+
}
|
|
433
|
+
|
|
434
|
+
/** Represents a Message. */
|
|
435
|
+
class Message implements IMessage {
|
|
436
|
+
|
|
437
|
+
/**
|
|
438
|
+
* Constructs a new Message.
|
|
439
|
+
* @param [properties] Properties to set
|
|
440
|
+
*/
|
|
441
|
+
constructor(properties?: pxyproto.IMessage);
|
|
442
|
+
|
|
443
|
+
/** Message controlMsg. */
|
|
444
|
+
public controlMsg?: (pxyproto.IControlMessage|null);
|
|
445
|
+
|
|
446
|
+
/** Message dataMsg. */
|
|
447
|
+
public dataMsg?: (pxyproto.IDataMessage|null);
|
|
448
|
+
|
|
449
|
+
/** Message clientInfo. */
|
|
450
|
+
public clientInfo?: (pxyproto.IClientInfo|null);
|
|
451
|
+
|
|
452
|
+
/** Message viewPort. */
|
|
453
|
+
public viewPort?: (pxyproto.IViewPort|null);
|
|
454
|
+
|
|
455
|
+
/** Message msg. */
|
|
456
|
+
public msg?: ("controlMsg"|"dataMsg"|"clientInfo"|"viewPort");
|
|
457
|
+
|
|
458
|
+
/**
|
|
459
|
+
* Creates a new Message instance using the specified properties.
|
|
460
|
+
* @param [properties] Properties to set
|
|
461
|
+
* @returns Message instance
|
|
462
|
+
*/
|
|
463
|
+
public static create(properties?: pxyproto.IMessage): pxyproto.Message;
|
|
464
|
+
|
|
465
|
+
/**
|
|
466
|
+
* Encodes the specified Message message. Does not implicitly {@link pxyproto.Message.verify|verify} messages.
|
|
467
|
+
* @param message Message message or plain object to encode
|
|
468
|
+
* @param [writer] Writer to encode to
|
|
469
|
+
* @returns Writer
|
|
470
|
+
*/
|
|
471
|
+
public static encode(message: pxyproto.IMessage, writer?: $protobuf.Writer): $protobuf.Writer;
|
|
472
|
+
|
|
473
|
+
/**
|
|
474
|
+
* Encodes the specified Message message, length delimited. Does not implicitly {@link pxyproto.Message.verify|verify} messages.
|
|
475
|
+
* @param message Message message or plain object to encode
|
|
476
|
+
* @param [writer] Writer to encode to
|
|
477
|
+
* @returns Writer
|
|
478
|
+
*/
|
|
479
|
+
public static encodeDelimited(message: pxyproto.IMessage, writer?: $protobuf.Writer): $protobuf.Writer;
|
|
480
|
+
|
|
481
|
+
/**
|
|
482
|
+
* Decodes a Message message from the specified reader or buffer.
|
|
483
|
+
* @param reader Reader or buffer to decode from
|
|
484
|
+
* @param [length] Message length if known beforehand
|
|
485
|
+
* @returns Message
|
|
486
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
487
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
488
|
+
*/
|
|
489
|
+
public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): pxyproto.Message;
|
|
490
|
+
|
|
491
|
+
/**
|
|
492
|
+
* Decodes a Message message from the specified reader or buffer, length delimited.
|
|
493
|
+
* @param reader Reader or buffer to decode from
|
|
494
|
+
* @returns Message
|
|
495
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
496
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
497
|
+
*/
|
|
498
|
+
public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): pxyproto.Message;
|
|
499
|
+
|
|
500
|
+
/**
|
|
501
|
+
* Verifies a Message message.
|
|
502
|
+
* @param message Plain object to verify
|
|
503
|
+
* @returns `null` if valid, otherwise the reason why it is not
|
|
504
|
+
*/
|
|
505
|
+
public static verify(message: { [k: string]: any }): (string|null);
|
|
506
|
+
|
|
507
|
+
/**
|
|
508
|
+
* Creates a Message message from a plain object. Also converts values to their respective internal types.
|
|
509
|
+
* @param object Plain object
|
|
510
|
+
* @returns Message
|
|
511
|
+
*/
|
|
512
|
+
public static fromObject(object: { [k: string]: any }): pxyproto.Message;
|
|
513
|
+
|
|
514
|
+
/**
|
|
515
|
+
* Creates a plain object from a Message message. Also converts values to other types if specified.
|
|
516
|
+
* @param message Message
|
|
517
|
+
* @param [options] Conversion options
|
|
518
|
+
* @returns Plain object
|
|
519
|
+
*/
|
|
520
|
+
public static toObject(message: pxyproto.Message, options?: $protobuf.IConversionOptions): { [k: string]: any };
|
|
521
|
+
|
|
522
|
+
/**
|
|
523
|
+
* Converts this Message to JSON.
|
|
524
|
+
* @returns JSON object
|
|
525
|
+
*/
|
|
526
|
+
public toJSON(): { [k: string]: any };
|
|
527
|
+
}
|
|
528
|
+
}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import { ViewPort } from "./common/interface";
|
|
2
|
+
import { IAppliParams } from "./appli_params";
|
|
3
|
+
import { CloudLark } from "./protobuf/cloudlark";
|
|
4
|
+
import ScaleMode from "./utils/scale_mode";
|
|
5
|
+
import { LocalEvent, EventBase } from './event/event_base';
|
|
6
|
+
export interface ContainerSize {
|
|
7
|
+
marginTop: number;
|
|
8
|
+
marginLeft: number;
|
|
9
|
+
width: number;
|
|
10
|
+
height: number;
|
|
11
|
+
}
|
|
12
|
+
export interface ContainerStyle {
|
|
13
|
+
marginTop: string;
|
|
14
|
+
marginLeft: string;
|
|
15
|
+
width: string;
|
|
16
|
+
height: string;
|
|
17
|
+
cursor: any;
|
|
18
|
+
}
|
|
19
|
+
export declare type ScreenOrientation = 'portrait' | 'landscape';
|
|
20
|
+
export declare enum CursorType {
|
|
21
|
+
ARROW = 0,
|
|
22
|
+
IBEAM = 1,
|
|
23
|
+
WAIT = 2,
|
|
24
|
+
CROSS = 3,
|
|
25
|
+
SIZENWSE = 4,
|
|
26
|
+
SIZENESW = 5,
|
|
27
|
+
SIZEWE = 6,
|
|
28
|
+
SIZENS = 7,
|
|
29
|
+
SIZEALL = 8,
|
|
30
|
+
NO = 9,
|
|
31
|
+
HAND = 10,
|
|
32
|
+
CUSTOM = 11,
|
|
33
|
+
DEFAULT = 1000
|
|
34
|
+
}
|
|
35
|
+
export interface SyncCursorStyle {
|
|
36
|
+
type: CursorType;
|
|
37
|
+
hotX: number;
|
|
38
|
+
hotY: number;
|
|
39
|
+
width: number;
|
|
40
|
+
height: number;
|
|
41
|
+
customBase64: string;
|
|
42
|
+
}
|
|
43
|
+
export declare const enum SCREEN_EVENT_TYPE {
|
|
44
|
+
ReSize = 0
|
|
45
|
+
}
|
|
46
|
+
export interface ScreenEvent extends LocalEvent<SCREEN_EVENT_TYPE> {
|
|
47
|
+
container: ContainerSize;
|
|
48
|
+
viewPort: ViewPort;
|
|
49
|
+
}
|
|
50
|
+
export default class ScreenState extends EventBase<SCREEN_EVENT_TYPE, ScreenEvent> {
|
|
51
|
+
get appSize(): CloudLark.IAppResize;
|
|
52
|
+
set appSize(size: CloudLark.IAppResize);
|
|
53
|
+
private _appSize;
|
|
54
|
+
get viewPort(): ViewPort;
|
|
55
|
+
private _viewPort;
|
|
56
|
+
get viewPortStyle(): string;
|
|
57
|
+
get orientationIndexStyle(): {
|
|
58
|
+
width: string;
|
|
59
|
+
height: string;
|
|
60
|
+
top: string;
|
|
61
|
+
left: string;
|
|
62
|
+
transform: string;
|
|
63
|
+
transformOrigin: string;
|
|
64
|
+
backgroundColor: string;
|
|
65
|
+
} | {
|
|
66
|
+
width: string;
|
|
67
|
+
height: string;
|
|
68
|
+
transform: string;
|
|
69
|
+
transformOrigin: string;
|
|
70
|
+
backgroundColor: string;
|
|
71
|
+
top?: undefined;
|
|
72
|
+
left?: undefined;
|
|
73
|
+
};
|
|
74
|
+
get container(): ContainerSize;
|
|
75
|
+
private _container;
|
|
76
|
+
get containerStyle(): string;
|
|
77
|
+
get screenOrientation(): ScreenOrientation;
|
|
78
|
+
private _screenOrientation;
|
|
79
|
+
get scaleMode(): ScaleMode;
|
|
80
|
+
private _scaleMode;
|
|
81
|
+
get isFullScreen(): boolean;
|
|
82
|
+
private _isFullScreen;
|
|
83
|
+
get isLockMouse(): boolean;
|
|
84
|
+
private _isLockMouse;
|
|
85
|
+
get cursorStyle(): SyncCursorStyle;
|
|
86
|
+
private _cursorStyle;
|
|
87
|
+
get appMouseMode(): CloudLark.IAppMouseMode;
|
|
88
|
+
set appMouseMode(mode: CloudLark.IAppMouseMode);
|
|
89
|
+
private _appMouseMode;
|
|
90
|
+
get operateScale(): {
|
|
91
|
+
scaleX: number;
|
|
92
|
+
scaleY: number;
|
|
93
|
+
};
|
|
94
|
+
get initCursorMode(): boolean;
|
|
95
|
+
private _initCursorMode;
|
|
96
|
+
get isMobile(): boolean;
|
|
97
|
+
private _isMobile;
|
|
98
|
+
get isLocalRenderMouse(): boolean | null | undefined;
|
|
99
|
+
get isLockMosue(): boolean | null | undefined;
|
|
100
|
+
get rootElement(): HTMLElement;
|
|
101
|
+
private _rootElement;
|
|
102
|
+
private videoViewPort;
|
|
103
|
+
private mobileForceLandScape;
|
|
104
|
+
private bgColor;
|
|
105
|
+
private handelRootElementSize;
|
|
106
|
+
constructor(rootElement: HTMLElement, params: IAppliParams);
|
|
107
|
+
resize(): void;
|
|
108
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare class SDKAuth {
|
|
2
|
+
get isSuccess(): boolean;
|
|
3
|
+
private _isSuccess;
|
|
4
|
+
get error(): any;
|
|
5
|
+
private _error;
|
|
6
|
+
constructor();
|
|
7
|
+
auth(id: string): Promise<void>;
|
|
8
|
+
signature(key: string, secret: string, timestamp: string): string;
|
|
9
|
+
check(id: string): boolean;
|
|
10
|
+
save(id: string, expire: string): void;
|
|
11
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
export default class BrowserType {
|
|
2
|
+
static Type: {
|
|
3
|
+
Chrome: string;
|
|
4
|
+
iOSChrome: string;
|
|
5
|
+
Firefox: string;
|
|
6
|
+
Edge: string;
|
|
7
|
+
Opera: string;
|
|
8
|
+
IE: string;
|
|
9
|
+
Safari: string;
|
|
10
|
+
};
|
|
11
|
+
static Support: {
|
|
12
|
+
Chrome: number;
|
|
13
|
+
Firefox: number;
|
|
14
|
+
Edge: number;
|
|
15
|
+
};
|
|
16
|
+
static AdviseSupportVersion: {
|
|
17
|
+
Chrome: number;
|
|
18
|
+
Firefox: number;
|
|
19
|
+
Edge: number;
|
|
20
|
+
};
|
|
21
|
+
static SupportMobile: {
|
|
22
|
+
Chrome: number;
|
|
23
|
+
iOSChrome: number;
|
|
24
|
+
Firefox: number;
|
|
25
|
+
Edge: number;
|
|
26
|
+
};
|
|
27
|
+
static getBrowserType(): string;
|
|
28
|
+
/**
|
|
29
|
+
* @return
|
|
30
|
+
* -2 推荐升级版本
|
|
31
|
+
* -1 有问题版本
|
|
32
|
+
* 0 不支持
|
|
33
|
+
* 1 支持
|
|
34
|
+
*/
|
|
35
|
+
static checkSupport(): 0 | 1 | -1 | -2;
|
|
36
|
+
static getBrowserVersion(type?: string): number;
|
|
37
|
+
}
|