@rlynicrisis/link 0.0.1 → 0.0.2

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.
@@ -0,0 +1,587 @@
1
+ import * as $protobuf from "protobufjs";
2
+ import Long = require("long");
3
+ /** Namespace emb. */
4
+ export namespace emb {
5
+
6
+ /** Namespace message. */
7
+ namespace message {
8
+
9
+ /** Namespace format. */
10
+ namespace format {
11
+
12
+ /** Properties of a Message. */
13
+ interface IMessage {
14
+
15
+ /** Message msgId */
16
+ msgId?: (string|null);
17
+
18
+ /** Message type */
19
+ type?: (number|null);
20
+
21
+ /** Message sendTime */
22
+ sendTime?: (number|Long|null);
23
+
24
+ /** Message toDeviceTypes */
25
+ toDeviceTypes?: (string|null);
26
+
27
+ /** Message from */
28
+ from?: (emb.message.format.IMessageSender|null);
29
+
30
+ /** Message to */
31
+ to?: (emb.message.format.IMessageReceiver|null);
32
+
33
+ /** Message content */
34
+ content?: (Uint8Array|null);
35
+
36
+ /** Message isResend */
37
+ isResend?: (boolean|null);
38
+
39
+ /** Message batchNo */
40
+ batchNo?: (string|null);
41
+
42
+ /** Message replyMsgId */
43
+ replyMsgId?: (string|null);
44
+
45
+ /** Message protocolVersionSince */
46
+ protocolVersionSince?: (number|null);
47
+
48
+ /** Message atUserIds */
49
+ atUserIds?: (string|null);
50
+
51
+ /** Message userId */
52
+ userId?: (string|null);
53
+
54
+ /** Message eCode */
55
+ eCode?: (string|null);
56
+
57
+ /** Message options */
58
+ options?: (emb.message.format.IMessageOptions|null);
59
+ }
60
+
61
+ /** Represents a Message. */
62
+ class Message implements IMessage {
63
+
64
+ /**
65
+ * Constructs a new Message.
66
+ * @param [properties] Properties to set
67
+ */
68
+ constructor(properties?: emb.message.format.IMessage);
69
+
70
+ /** Message msgId. */
71
+ public msgId: string;
72
+
73
+ /** Message type. */
74
+ public type: number;
75
+
76
+ /** Message sendTime. */
77
+ public sendTime: (number|Long);
78
+
79
+ /** Message toDeviceTypes. */
80
+ public toDeviceTypes: string;
81
+
82
+ /** Message from. */
83
+ public from?: (emb.message.format.IMessageSender|null);
84
+
85
+ /** Message to. */
86
+ public to?: (emb.message.format.IMessageReceiver|null);
87
+
88
+ /** Message content. */
89
+ public content: Uint8Array;
90
+
91
+ /** Message isResend. */
92
+ public isResend: boolean;
93
+
94
+ /** Message batchNo. */
95
+ public batchNo: string;
96
+
97
+ /** Message replyMsgId. */
98
+ public replyMsgId: string;
99
+
100
+ /** Message protocolVersionSince. */
101
+ public protocolVersionSince: number;
102
+
103
+ /** Message atUserIds. */
104
+ public atUserIds: string;
105
+
106
+ /** Message userId. */
107
+ public userId: string;
108
+
109
+ /** Message eCode. */
110
+ public eCode: string;
111
+
112
+ /** Message options. */
113
+ public options?: (emb.message.format.IMessageOptions|null);
114
+
115
+ /**
116
+ * Creates a new Message instance using the specified properties.
117
+ * @param [properties] Properties to set
118
+ * @returns Message instance
119
+ */
120
+ public static create(properties?: emb.message.format.IMessage): emb.message.format.Message;
121
+
122
+ /**
123
+ * Encodes the specified Message message. Does not implicitly {@link emb.message.format.Message.verify|verify} messages.
124
+ * @param message Message message or plain object to encode
125
+ * @param [writer] Writer to encode to
126
+ * @returns Writer
127
+ */
128
+ public static encode(message: emb.message.format.IMessage, writer?: $protobuf.Writer): $protobuf.Writer;
129
+
130
+ /**
131
+ * Encodes the specified Message message, length delimited. Does not implicitly {@link emb.message.format.Message.verify|verify} messages.
132
+ * @param message Message message or plain object to encode
133
+ * @param [writer] Writer to encode to
134
+ * @returns Writer
135
+ */
136
+ public static encodeDelimited(message: emb.message.format.IMessage, writer?: $protobuf.Writer): $protobuf.Writer;
137
+
138
+ /**
139
+ * Decodes a Message message from the specified reader or buffer.
140
+ * @param reader Reader or buffer to decode from
141
+ * @param [length] Message length if known beforehand
142
+ * @returns Message
143
+ * @throws {Error} If the payload is not a reader or valid buffer
144
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
145
+ */
146
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): emb.message.format.Message;
147
+
148
+ /**
149
+ * Decodes a Message message from the specified reader or buffer, length delimited.
150
+ * @param reader Reader or buffer to decode from
151
+ * @returns Message
152
+ * @throws {Error} If the payload is not a reader or valid buffer
153
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
154
+ */
155
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): emb.message.format.Message;
156
+
157
+ /**
158
+ * Verifies a Message message.
159
+ * @param message Plain object to verify
160
+ * @returns `null` if valid, otherwise the reason why it is not
161
+ */
162
+ public static verify(message: { [k: string]: any }): (string|null);
163
+
164
+ /**
165
+ * Creates a Message message from a plain object. Also converts values to their respective internal types.
166
+ * @param object Plain object
167
+ * @returns Message
168
+ */
169
+ public static fromObject(object: { [k: string]: any }): emb.message.format.Message;
170
+
171
+ /**
172
+ * Creates a plain object from a Message message. Also converts values to other types if specified.
173
+ * @param message Message
174
+ * @param [options] Conversion options
175
+ * @returns Plain object
176
+ */
177
+ public static toObject(message: emb.message.format.Message, options?: $protobuf.IConversionOptions): { [k: string]: any };
178
+
179
+ /**
180
+ * Converts this Message to JSON.
181
+ * @returns JSON object
182
+ */
183
+ public toJSON(): { [k: string]: any };
184
+
185
+ /**
186
+ * Gets the default type url for Message
187
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
188
+ * @returns The default type url
189
+ */
190
+ public static getTypeUrl(typeUrlPrefix?: string): string;
191
+ }
192
+
193
+ /** Properties of a MessageSender. */
194
+ interface IMessageSender {
195
+
196
+ /** MessageSender fromId */
197
+ fromId?: (string|null);
198
+
199
+ /** MessageSender fromName */
200
+ fromName?: (string|null);
201
+
202
+ /** MessageSender fromType */
203
+ fromType?: (number|null);
204
+
205
+ /** MessageSender fromCompany */
206
+ fromCompany?: (string|null);
207
+
208
+ /** MessageSender fromDevice */
209
+ fromDevice?: (string|null);
210
+ }
211
+
212
+ /** Represents a MessageSender. */
213
+ class MessageSender implements IMessageSender {
214
+
215
+ /**
216
+ * Constructs a new MessageSender.
217
+ * @param [properties] Properties to set
218
+ */
219
+ constructor(properties?: emb.message.format.IMessageSender);
220
+
221
+ /** MessageSender fromId. */
222
+ public fromId: string;
223
+
224
+ /** MessageSender fromName. */
225
+ public fromName: string;
226
+
227
+ /** MessageSender fromType. */
228
+ public fromType: number;
229
+
230
+ /** MessageSender fromCompany. */
231
+ public fromCompany: string;
232
+
233
+ /** MessageSender fromDevice. */
234
+ public fromDevice: string;
235
+
236
+ /**
237
+ * Creates a new MessageSender instance using the specified properties.
238
+ * @param [properties] Properties to set
239
+ * @returns MessageSender instance
240
+ */
241
+ public static create(properties?: emb.message.format.IMessageSender): emb.message.format.MessageSender;
242
+
243
+ /**
244
+ * Encodes the specified MessageSender message. Does not implicitly {@link emb.message.format.MessageSender.verify|verify} messages.
245
+ * @param message MessageSender message or plain object to encode
246
+ * @param [writer] Writer to encode to
247
+ * @returns Writer
248
+ */
249
+ public static encode(message: emb.message.format.IMessageSender, writer?: $protobuf.Writer): $protobuf.Writer;
250
+
251
+ /**
252
+ * Encodes the specified MessageSender message, length delimited. Does not implicitly {@link emb.message.format.MessageSender.verify|verify} messages.
253
+ * @param message MessageSender message or plain object to encode
254
+ * @param [writer] Writer to encode to
255
+ * @returns Writer
256
+ */
257
+ public static encodeDelimited(message: emb.message.format.IMessageSender, writer?: $protobuf.Writer): $protobuf.Writer;
258
+
259
+ /**
260
+ * Decodes a MessageSender message from the specified reader or buffer.
261
+ * @param reader Reader or buffer to decode from
262
+ * @param [length] Message length if known beforehand
263
+ * @returns MessageSender
264
+ * @throws {Error} If the payload is not a reader or valid buffer
265
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
266
+ */
267
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): emb.message.format.MessageSender;
268
+
269
+ /**
270
+ * Decodes a MessageSender message from the specified reader or buffer, length delimited.
271
+ * @param reader Reader or buffer to decode from
272
+ * @returns MessageSender
273
+ * @throws {Error} If the payload is not a reader or valid buffer
274
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
275
+ */
276
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): emb.message.format.MessageSender;
277
+
278
+ /**
279
+ * Verifies a MessageSender message.
280
+ * @param message Plain object to verify
281
+ * @returns `null` if valid, otherwise the reason why it is not
282
+ */
283
+ public static verify(message: { [k: string]: any }): (string|null);
284
+
285
+ /**
286
+ * Creates a MessageSender message from a plain object. Also converts values to their respective internal types.
287
+ * @param object Plain object
288
+ * @returns MessageSender
289
+ */
290
+ public static fromObject(object: { [k: string]: any }): emb.message.format.MessageSender;
291
+
292
+ /**
293
+ * Creates a plain object from a MessageSender message. Also converts values to other types if specified.
294
+ * @param message MessageSender
295
+ * @param [options] Conversion options
296
+ * @returns Plain object
297
+ */
298
+ public static toObject(message: emb.message.format.MessageSender, options?: $protobuf.IConversionOptions): { [k: string]: any };
299
+
300
+ /**
301
+ * Converts this MessageSender to JSON.
302
+ * @returns JSON object
303
+ */
304
+ public toJSON(): { [k: string]: any };
305
+
306
+ /**
307
+ * Gets the default type url for MessageSender
308
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
309
+ * @returns The default type url
310
+ */
311
+ public static getTypeUrl(typeUrlPrefix?: string): string;
312
+ }
313
+
314
+ /** Properties of a MessageReceiver. */
315
+ interface IMessageReceiver {
316
+
317
+ /** MessageReceiver toId */
318
+ toId?: (string|null);
319
+
320
+ /** MessageReceiver toName */
321
+ toName?: (string|null);
322
+
323
+ /** MessageReceiver toType */
324
+ toType?: (number|null);
325
+
326
+ /** MessageReceiver toCompany */
327
+ toCompany?: (string|null);
328
+
329
+ /** MessageReceiver toDevice */
330
+ toDevice?: (string|null);
331
+ }
332
+
333
+ /** Represents a MessageReceiver. */
334
+ class MessageReceiver implements IMessageReceiver {
335
+
336
+ /**
337
+ * Constructs a new MessageReceiver.
338
+ * @param [properties] Properties to set
339
+ */
340
+ constructor(properties?: emb.message.format.IMessageReceiver);
341
+
342
+ /** MessageReceiver toId. */
343
+ public toId: string;
344
+
345
+ /** MessageReceiver toName. */
346
+ public toName: string;
347
+
348
+ /** MessageReceiver toType. */
349
+ public toType: number;
350
+
351
+ /** MessageReceiver toCompany. */
352
+ public toCompany: string;
353
+
354
+ /** MessageReceiver toDevice. */
355
+ public toDevice: string;
356
+
357
+ /**
358
+ * Creates a new MessageReceiver instance using the specified properties.
359
+ * @param [properties] Properties to set
360
+ * @returns MessageReceiver instance
361
+ */
362
+ public static create(properties?: emb.message.format.IMessageReceiver): emb.message.format.MessageReceiver;
363
+
364
+ /**
365
+ * Encodes the specified MessageReceiver message. Does not implicitly {@link emb.message.format.MessageReceiver.verify|verify} messages.
366
+ * @param message MessageReceiver message or plain object to encode
367
+ * @param [writer] Writer to encode to
368
+ * @returns Writer
369
+ */
370
+ public static encode(message: emb.message.format.IMessageReceiver, writer?: $protobuf.Writer): $protobuf.Writer;
371
+
372
+ /**
373
+ * Encodes the specified MessageReceiver message, length delimited. Does not implicitly {@link emb.message.format.MessageReceiver.verify|verify} messages.
374
+ * @param message MessageReceiver message or plain object to encode
375
+ * @param [writer] Writer to encode to
376
+ * @returns Writer
377
+ */
378
+ public static encodeDelimited(message: emb.message.format.IMessageReceiver, writer?: $protobuf.Writer): $protobuf.Writer;
379
+
380
+ /**
381
+ * Decodes a MessageReceiver message from the specified reader or buffer.
382
+ * @param reader Reader or buffer to decode from
383
+ * @param [length] Message length if known beforehand
384
+ * @returns MessageReceiver
385
+ * @throws {Error} If the payload is not a reader or valid buffer
386
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
387
+ */
388
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): emb.message.format.MessageReceiver;
389
+
390
+ /**
391
+ * Decodes a MessageReceiver message from the specified reader or buffer, length delimited.
392
+ * @param reader Reader or buffer to decode from
393
+ * @returns MessageReceiver
394
+ * @throws {Error} If the payload is not a reader or valid buffer
395
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
396
+ */
397
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): emb.message.format.MessageReceiver;
398
+
399
+ /**
400
+ * Verifies a MessageReceiver message.
401
+ * @param message Plain object to verify
402
+ * @returns `null` if valid, otherwise the reason why it is not
403
+ */
404
+ public static verify(message: { [k: string]: any }): (string|null);
405
+
406
+ /**
407
+ * Creates a MessageReceiver message from a plain object. Also converts values to their respective internal types.
408
+ * @param object Plain object
409
+ * @returns MessageReceiver
410
+ */
411
+ public static fromObject(object: { [k: string]: any }): emb.message.format.MessageReceiver;
412
+
413
+ /**
414
+ * Creates a plain object from a MessageReceiver message. Also converts values to other types if specified.
415
+ * @param message MessageReceiver
416
+ * @param [options] Conversion options
417
+ * @returns Plain object
418
+ */
419
+ public static toObject(message: emb.message.format.MessageReceiver, options?: $protobuf.IConversionOptions): { [k: string]: any };
420
+
421
+ /**
422
+ * Converts this MessageReceiver to JSON.
423
+ * @returns JSON object
424
+ */
425
+ public toJSON(): { [k: string]: any };
426
+
427
+ /**
428
+ * Gets the default type url for MessageReceiver
429
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
430
+ * @returns The default type url
431
+ */
432
+ public static getTypeUrl(typeUrlPrefix?: string): string;
433
+ }
434
+
435
+ /** Properties of a MessageOptions. */
436
+ interface IMessageOptions {
437
+
438
+ /** MessageOptions isRecReceipt */
439
+ isRecReceipt?: (boolean|null);
440
+
441
+ /** MessageOptions isReadonly */
442
+ isReadonly?: (boolean|null);
443
+
444
+ /** MessageOptions isOffline */
445
+ isOffline?: (boolean|null);
446
+
447
+ /** MessageOptions isRead */
448
+ isRead?: (boolean|null);
449
+
450
+ /** MessageOptions isNotDisturb */
451
+ isNotDisturb?: (boolean|null);
452
+
453
+ /** MessageOptions isHint4OldClient */
454
+ isHint4OldClient?: (boolean|null);
455
+
456
+ /** MessageOptions isDeleteAfterRead */
457
+ isDeleteAfterRead?: (boolean|null);
458
+
459
+ /** MessageOptions isNeedReadReceipt */
460
+ isNeedReadReceipt?: (boolean|null);
461
+
462
+ /** MessageOptions isCountUnread */
463
+ isCountUnread?: (boolean|null);
464
+
465
+ /** MessageOptions enabledVoicePlay */
466
+ enabledVoicePlay?: (boolean|null);
467
+ }
468
+
469
+ /** Represents a MessageOptions. */
470
+ class MessageOptions implements IMessageOptions {
471
+
472
+ /**
473
+ * Constructs a new MessageOptions.
474
+ * @param [properties] Properties to set
475
+ */
476
+ constructor(properties?: emb.message.format.IMessageOptions);
477
+
478
+ /** MessageOptions isRecReceipt. */
479
+ public isRecReceipt: boolean;
480
+
481
+ /** MessageOptions isReadonly. */
482
+ public isReadonly: boolean;
483
+
484
+ /** MessageOptions isOffline. */
485
+ public isOffline: boolean;
486
+
487
+ /** MessageOptions isRead. */
488
+ public isRead: boolean;
489
+
490
+ /** MessageOptions isNotDisturb. */
491
+ public isNotDisturb: boolean;
492
+
493
+ /** MessageOptions isHint4OldClient. */
494
+ public isHint4OldClient: boolean;
495
+
496
+ /** MessageOptions isDeleteAfterRead. */
497
+ public isDeleteAfterRead: boolean;
498
+
499
+ /** MessageOptions isNeedReadReceipt. */
500
+ public isNeedReadReceipt: boolean;
501
+
502
+ /** MessageOptions isCountUnread. */
503
+ public isCountUnread: boolean;
504
+
505
+ /** MessageOptions enabledVoicePlay. */
506
+ public enabledVoicePlay: boolean;
507
+
508
+ /**
509
+ * Creates a new MessageOptions instance using the specified properties.
510
+ * @param [properties] Properties to set
511
+ * @returns MessageOptions instance
512
+ */
513
+ public static create(properties?: emb.message.format.IMessageOptions): emb.message.format.MessageOptions;
514
+
515
+ /**
516
+ * Encodes the specified MessageOptions message. Does not implicitly {@link emb.message.format.MessageOptions.verify|verify} messages.
517
+ * @param message MessageOptions message or plain object to encode
518
+ * @param [writer] Writer to encode to
519
+ * @returns Writer
520
+ */
521
+ public static encode(message: emb.message.format.IMessageOptions, writer?: $protobuf.Writer): $protobuf.Writer;
522
+
523
+ /**
524
+ * Encodes the specified MessageOptions message, length delimited. Does not implicitly {@link emb.message.format.MessageOptions.verify|verify} messages.
525
+ * @param message MessageOptions message or plain object to encode
526
+ * @param [writer] Writer to encode to
527
+ * @returns Writer
528
+ */
529
+ public static encodeDelimited(message: emb.message.format.IMessageOptions, writer?: $protobuf.Writer): $protobuf.Writer;
530
+
531
+ /**
532
+ * Decodes a MessageOptions message from the specified reader or buffer.
533
+ * @param reader Reader or buffer to decode from
534
+ * @param [length] Message length if known beforehand
535
+ * @returns MessageOptions
536
+ * @throws {Error} If the payload is not a reader or valid buffer
537
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
538
+ */
539
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): emb.message.format.MessageOptions;
540
+
541
+ /**
542
+ * Decodes a MessageOptions message from the specified reader or buffer, length delimited.
543
+ * @param reader Reader or buffer to decode from
544
+ * @returns MessageOptions
545
+ * @throws {Error} If the payload is not a reader or valid buffer
546
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
547
+ */
548
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): emb.message.format.MessageOptions;
549
+
550
+ /**
551
+ * Verifies a MessageOptions message.
552
+ * @param message Plain object to verify
553
+ * @returns `null` if valid, otherwise the reason why it is not
554
+ */
555
+ public static verify(message: { [k: string]: any }): (string|null);
556
+
557
+ /**
558
+ * Creates a MessageOptions message from a plain object. Also converts values to their respective internal types.
559
+ * @param object Plain object
560
+ * @returns MessageOptions
561
+ */
562
+ public static fromObject(object: { [k: string]: any }): emb.message.format.MessageOptions;
563
+
564
+ /**
565
+ * Creates a plain object from a MessageOptions message. Also converts values to other types if specified.
566
+ * @param message MessageOptions
567
+ * @param [options] Conversion options
568
+ * @returns Plain object
569
+ */
570
+ public static toObject(message: emb.message.format.MessageOptions, options?: $protobuf.IConversionOptions): { [k: string]: any };
571
+
572
+ /**
573
+ * Converts this MessageOptions to JSON.
574
+ * @returns JSON object
575
+ */
576
+ public toJSON(): { [k: string]: any };
577
+
578
+ /**
579
+ * Gets the default type url for MessageOptions
580
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
581
+ * @returns The default type url
582
+ */
583
+ public static getTypeUrl(typeUrlPrefix?: string): string;
584
+ }
585
+ }
586
+ }
587
+ }