@wireapp/protocol-messaging 1.56.0 → 1.58.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/package.json +1 -3
- package/proto/messages.proto +53 -1
- package/web/messages.d.ts +164 -3
- package/web/messages.js +8122 -6222
package/package.json
CHANGED
|
@@ -23,10 +23,8 @@
|
|
|
23
23
|
},
|
|
24
24
|
"scripts": {
|
|
25
25
|
"dist": "node web/compile.js",
|
|
26
|
-
"postversion": "git push origin master --tags && npm publish",
|
|
27
|
-
"preversion": "git checkout master && git pull && yarn && yarn dist && yarn test",
|
|
28
26
|
"test": "tsc --noEmit"
|
|
29
27
|
},
|
|
30
|
-
"version": "1.
|
|
28
|
+
"version": "1.58.0",
|
|
31
29
|
"packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e"
|
|
32
30
|
}
|
package/proto/messages.proto
CHANGED
|
@@ -34,7 +34,6 @@ message GenericMessage {
|
|
|
34
34
|
ClientAction clientAction = 9;
|
|
35
35
|
Calling calling = 10;
|
|
36
36
|
Asset asset = 11;
|
|
37
|
-
Multipart multipart = 27;
|
|
38
37
|
MessageHide hidden = 12;
|
|
39
38
|
Location location = 13;
|
|
40
39
|
MessageDelete deleted = 14;
|
|
@@ -51,6 +50,12 @@ message GenericMessage {
|
|
|
51
50
|
// UnknownStrategy unknownStrategy = 25; -- Defined outside the oneof
|
|
52
51
|
// Next field should be 26 ↓
|
|
53
52
|
InCallHandRaise inCallHandRaise = 26;
|
|
53
|
+
Multipart multipart = 27;
|
|
54
|
+
HistoryClientAvailable historyClientAvailable = 28;
|
|
55
|
+
HistoryClientRequest historyClientRequest = 29;
|
|
56
|
+
HistoryClientResponse historyClientResponse = 30;
|
|
57
|
+
Poll poll = 31;
|
|
58
|
+
PollVote pollVote = 32;
|
|
54
59
|
}
|
|
55
60
|
optional UnknownStrategy unknownStrategy = 25 [default = IGNORE];
|
|
56
61
|
|
|
@@ -100,6 +105,29 @@ message ButtonActionConfirmation {
|
|
|
100
105
|
optional string button_id = 2; // if not present, no button is accepted
|
|
101
106
|
}
|
|
102
107
|
|
|
108
|
+
// A native poll. The GenericMessage id is the poll id. Votes are never anonymous:
|
|
109
|
+
// every client sees the sender of each encrypted PollVote.
|
|
110
|
+
message Poll {
|
|
111
|
+
required string question = 1;
|
|
112
|
+
repeated PollOption options = 2;
|
|
113
|
+
optional bool allow_multiple_answers = 3 [default = false];
|
|
114
|
+
// Standard flags for all message types
|
|
115
|
+
optional bool expects_read_confirmation = 4 [default = false];
|
|
116
|
+
optional LegalHoldStatus legal_hold_status = 5 [default = UNKNOWN];
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
message PollOption {
|
|
120
|
+
required string id = 1;
|
|
121
|
+
required string text = 2;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
// The sender's complete current selection for a poll. It replaces any earlier vote from the
|
|
125
|
+
// same user. An empty selection retracts the vote.
|
|
126
|
+
message PollVote {
|
|
127
|
+
required string reference_message_id = 1;
|
|
128
|
+
repeated string selected_option_ids = 2;
|
|
129
|
+
}
|
|
130
|
+
|
|
103
131
|
message Availability {
|
|
104
132
|
enum Type {
|
|
105
133
|
NONE = 0;
|
|
@@ -180,6 +208,9 @@ message Mention {
|
|
|
180
208
|
}
|
|
181
209
|
// only optional to maintain backwards compatibility.
|
|
182
210
|
optional QualifiedUserId qualified_user_id = 4;
|
|
211
|
+
// Explicit group-wide mention. Send without user_id or qualified_user_id.
|
|
212
|
+
// Older clients ignore this field and continue to display the literal text.
|
|
213
|
+
optional bool everyone = 5;
|
|
183
214
|
}
|
|
184
215
|
|
|
185
216
|
message LastRead {
|
|
@@ -198,6 +229,7 @@ message Cleared {
|
|
|
198
229
|
required int64 cleared_timestamp = 2;
|
|
199
230
|
// only optional to maintain backwards compatibility
|
|
200
231
|
optional QualifiedConversationId qualified_conversation_id = 3;
|
|
232
|
+
optional bool needToRemoveLocally = 4 [default = false];
|
|
201
233
|
}
|
|
202
234
|
|
|
203
235
|
message MessageHide {
|
|
@@ -219,6 +251,7 @@ message MessageEdit {
|
|
|
219
251
|
Text text = 2;
|
|
220
252
|
Composite composite = 3;
|
|
221
253
|
Multipart multipart = 4;
|
|
254
|
+
// Reply can also be edited, but the edit will only affect the Text part
|
|
222
255
|
}
|
|
223
256
|
}
|
|
224
257
|
|
|
@@ -422,6 +455,25 @@ message TrackingIdentifier {
|
|
|
422
455
|
required string identifier = 1;
|
|
423
456
|
}
|
|
424
457
|
|
|
458
|
+
message HistoryClient {
|
|
459
|
+
required string client_id = 1;
|
|
460
|
+
required string created_at = 2;
|
|
461
|
+
required bytes secret = 3;
|
|
462
|
+
}
|
|
463
|
+
|
|
464
|
+
// Sent in a conversation after new history client has been added
|
|
465
|
+
message HistoryClientAvailable {
|
|
466
|
+
required HistoryClient client = 1;
|
|
467
|
+
}
|
|
468
|
+
|
|
469
|
+
// Sent in a conversation after you've been added to conversation with history sharing enabled
|
|
470
|
+
message HistoryClientRequest {}
|
|
471
|
+
|
|
472
|
+
// Sent in a subconversation in response to a HistoryClientRequest
|
|
473
|
+
message HistoryClientResponse {
|
|
474
|
+
repeated HistoryClient clients = 1;
|
|
475
|
+
}
|
|
476
|
+
|
|
425
477
|
// Enums have to come last because of an unresolved issue with jsdoc
|
|
426
478
|
// https://github.com/jsdoc/jsdoc/pull/1686
|
|
427
479
|
|
package/web/messages.d.ts
CHANGED
|
@@ -11,7 +11,6 @@ export interface IGenericMessage {
|
|
|
11
11
|
clientAction?: (ClientAction|null);
|
|
12
12
|
calling?: (ICalling|null);
|
|
13
13
|
asset?: (IAsset|null);
|
|
14
|
-
multipart?: (IMultipart|null);
|
|
15
14
|
hidden?: (IMessageHide|null);
|
|
16
15
|
location?: (ILocation|null);
|
|
17
16
|
deleted?: (IMessageDelete|null);
|
|
@@ -26,6 +25,12 @@ export interface IGenericMessage {
|
|
|
26
25
|
dataTransfer?: (IDataTransfer|null);
|
|
27
26
|
inCallEmoji?: (IInCallEmoji|null);
|
|
28
27
|
inCallHandRaise?: (IInCallHandRaise|null);
|
|
28
|
+
multipart?: (IMultipart|null);
|
|
29
|
+
historyClientAvailable?: (IHistoryClientAvailable|null);
|
|
30
|
+
historyClientRequest?: (IHistoryClientRequest|null);
|
|
31
|
+
historyClientResponse?: (IHistoryClientResponse|null);
|
|
32
|
+
poll?: (IPoll|null);
|
|
33
|
+
pollVote?: (IPollVote|null);
|
|
29
34
|
unknownStrategy?: (GenericMessage.UnknownStrategy|null);
|
|
30
35
|
}
|
|
31
36
|
|
|
@@ -41,7 +46,6 @@ export class GenericMessage implements IGenericMessage {
|
|
|
41
46
|
public clientAction?: (ClientAction|null);
|
|
42
47
|
public calling?: (ICalling|null);
|
|
43
48
|
public asset?: (IAsset|null);
|
|
44
|
-
public multipart?: (IMultipart|null);
|
|
45
49
|
public hidden?: (IMessageHide|null);
|
|
46
50
|
public location?: (ILocation|null);
|
|
47
51
|
public deleted?: (IMessageDelete|null);
|
|
@@ -56,8 +60,14 @@ export class GenericMessage implements IGenericMessage {
|
|
|
56
60
|
public dataTransfer?: (IDataTransfer|null);
|
|
57
61
|
public inCallEmoji?: (IInCallEmoji|null);
|
|
58
62
|
public inCallHandRaise?: (IInCallHandRaise|null);
|
|
63
|
+
public multipart?: (IMultipart|null);
|
|
64
|
+
public historyClientAvailable?: (IHistoryClientAvailable|null);
|
|
65
|
+
public historyClientRequest?: (IHistoryClientRequest|null);
|
|
66
|
+
public historyClientResponse?: (IHistoryClientResponse|null);
|
|
67
|
+
public poll?: (IPoll|null);
|
|
68
|
+
public pollVote?: (IPollVote|null);
|
|
59
69
|
public unknownStrategy: GenericMessage.UnknownStrategy;
|
|
60
|
-
public content?: ("text"|"image"|"knock"|"lastRead"|"cleared"|"external"|"clientAction"|"calling"|"asset"|"
|
|
70
|
+
public content?: ("text"|"image"|"knock"|"lastRead"|"cleared"|"external"|"clientAction"|"calling"|"asset"|"hidden"|"location"|"deleted"|"edited"|"confirmation"|"reaction"|"ephemeral"|"availability"|"composite"|"buttonAction"|"buttonActionConfirmation"|"dataTransfer"|"inCallEmoji"|"inCallHandRaise"|"multipart"|"historyClientAvailable"|"historyClientRequest"|"historyClientResponse"|"poll"|"pollVote");
|
|
61
71
|
public static create(properties?: IGenericMessage): GenericMessage;
|
|
62
72
|
public static encode(message: IGenericMessage, writer?: $protobuf.Writer): $protobuf.Writer;
|
|
63
73
|
public static encodeDelimited(message: IGenericMessage, writer?: $protobuf.Writer): $protobuf.Writer;
|
|
@@ -232,6 +242,75 @@ export class ButtonActionConfirmation implements IButtonActionConfirmation {
|
|
|
232
242
|
public static getTypeUrl(typeUrlPrefix?: string): string;
|
|
233
243
|
}
|
|
234
244
|
|
|
245
|
+
export interface IPoll {
|
|
246
|
+
question: string;
|
|
247
|
+
options?: (IPollOption[]|null);
|
|
248
|
+
allowMultipleAnswers?: (boolean|null);
|
|
249
|
+
expectsReadConfirmation?: (boolean|null);
|
|
250
|
+
legalHoldStatus?: (LegalHoldStatus|null);
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
export class Poll implements IPoll {
|
|
254
|
+
constructor(properties?: IPoll);
|
|
255
|
+
public question: string;
|
|
256
|
+
public options: IPollOption[];
|
|
257
|
+
public allowMultipleAnswers: boolean;
|
|
258
|
+
public expectsReadConfirmation: boolean;
|
|
259
|
+
public legalHoldStatus: LegalHoldStatus;
|
|
260
|
+
public static create(properties?: IPoll): Poll;
|
|
261
|
+
public static encode(message: IPoll, writer?: $protobuf.Writer): $protobuf.Writer;
|
|
262
|
+
public static encodeDelimited(message: IPoll, writer?: $protobuf.Writer): $protobuf.Writer;
|
|
263
|
+
public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): Poll;
|
|
264
|
+
public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): Poll;
|
|
265
|
+
public static verify(message: { [k: string]: any }): (string|null);
|
|
266
|
+
public static fromObject(object: { [k: string]: any }): Poll;
|
|
267
|
+
public static toObject(message: Poll, options?: $protobuf.IConversionOptions): { [k: string]: any };
|
|
268
|
+
public toJSON(): { [k: string]: any };
|
|
269
|
+
public static getTypeUrl(typeUrlPrefix?: string): string;
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
export interface IPollOption {
|
|
273
|
+
id: string;
|
|
274
|
+
text: string;
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
export class PollOption implements IPollOption {
|
|
278
|
+
constructor(properties?: IPollOption);
|
|
279
|
+
public id: string;
|
|
280
|
+
public text: string;
|
|
281
|
+
public static create(properties?: IPollOption): PollOption;
|
|
282
|
+
public static encode(message: IPollOption, writer?: $protobuf.Writer): $protobuf.Writer;
|
|
283
|
+
public static encodeDelimited(message: IPollOption, writer?: $protobuf.Writer): $protobuf.Writer;
|
|
284
|
+
public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): PollOption;
|
|
285
|
+
public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): PollOption;
|
|
286
|
+
public static verify(message: { [k: string]: any }): (string|null);
|
|
287
|
+
public static fromObject(object: { [k: string]: any }): PollOption;
|
|
288
|
+
public static toObject(message: PollOption, options?: $protobuf.IConversionOptions): { [k: string]: any };
|
|
289
|
+
public toJSON(): { [k: string]: any };
|
|
290
|
+
public static getTypeUrl(typeUrlPrefix?: string): string;
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
export interface IPollVote {
|
|
294
|
+
referenceMessageId: string;
|
|
295
|
+
selectedOptionIds?: (string[]|null);
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
export class PollVote implements IPollVote {
|
|
299
|
+
constructor(properties?: IPollVote);
|
|
300
|
+
public referenceMessageId: string;
|
|
301
|
+
public selectedOptionIds: string[];
|
|
302
|
+
public static create(properties?: IPollVote): PollVote;
|
|
303
|
+
public static encode(message: IPollVote, writer?: $protobuf.Writer): $protobuf.Writer;
|
|
304
|
+
public static encodeDelimited(message: IPollVote, writer?: $protobuf.Writer): $protobuf.Writer;
|
|
305
|
+
public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): PollVote;
|
|
306
|
+
public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): PollVote;
|
|
307
|
+
public static verify(message: { [k: string]: any }): (string|null);
|
|
308
|
+
public static fromObject(object: { [k: string]: any }): PollVote;
|
|
309
|
+
public static toObject(message: PollVote, options?: $protobuf.IConversionOptions): { [k: string]: any };
|
|
310
|
+
public toJSON(): { [k: string]: any };
|
|
311
|
+
public static getTypeUrl(typeUrlPrefix?: string): string;
|
|
312
|
+
}
|
|
313
|
+
|
|
235
314
|
export interface IAvailability {
|
|
236
315
|
type: Availability.Type;
|
|
237
316
|
}
|
|
@@ -429,6 +508,7 @@ export interface IMention {
|
|
|
429
508
|
length: number;
|
|
430
509
|
userId?: (string|null);
|
|
431
510
|
qualifiedUserId?: (IQualifiedUserId|null);
|
|
511
|
+
everyone?: (boolean|null);
|
|
432
512
|
}
|
|
433
513
|
|
|
434
514
|
export class Mention implements IMention {
|
|
@@ -437,6 +517,7 @@ export class Mention implements IMention {
|
|
|
437
517
|
public length: number;
|
|
438
518
|
public userId?: (string|null);
|
|
439
519
|
public qualifiedUserId?: (IQualifiedUserId|null);
|
|
520
|
+
public everyone: boolean;
|
|
440
521
|
public mentionType?: "userId";
|
|
441
522
|
public static create(properties?: IMention): Mention;
|
|
442
523
|
public static encode(message: IMention, writer?: $protobuf.Writer): $protobuf.Writer;
|
|
@@ -477,6 +558,7 @@ export interface ICleared {
|
|
|
477
558
|
conversationId: string;
|
|
478
559
|
clearedTimestamp: (number|Long);
|
|
479
560
|
qualifiedConversationId?: (IQualifiedConversationId|null);
|
|
561
|
+
needToRemoveLocally?: (boolean|null);
|
|
480
562
|
}
|
|
481
563
|
|
|
482
564
|
export class Cleared implements ICleared {
|
|
@@ -484,6 +566,7 @@ export class Cleared implements ICleared {
|
|
|
484
566
|
public conversationId: string;
|
|
485
567
|
public clearedTimestamp: (number|Long);
|
|
486
568
|
public qualifiedConversationId?: (IQualifiedConversationId|null);
|
|
569
|
+
public needToRemoveLocally: boolean;
|
|
487
570
|
public static create(properties?: ICleared): Cleared;
|
|
488
571
|
public static encode(message: ICleared, writer?: $protobuf.Writer): $protobuf.Writer;
|
|
489
572
|
public static encodeDelimited(message: ICleared, writer?: $protobuf.Writer): $protobuf.Writer;
|
|
@@ -1168,6 +1251,84 @@ export class TrackingIdentifier implements ITrackingIdentifier {
|
|
|
1168
1251
|
public static getTypeUrl(typeUrlPrefix?: string): string;
|
|
1169
1252
|
}
|
|
1170
1253
|
|
|
1254
|
+
export interface IHistoryClient {
|
|
1255
|
+
clientId: string;
|
|
1256
|
+
createdAt: string;
|
|
1257
|
+
secret: Uint8Array;
|
|
1258
|
+
}
|
|
1259
|
+
|
|
1260
|
+
export class HistoryClient implements IHistoryClient {
|
|
1261
|
+
constructor(properties?: IHistoryClient);
|
|
1262
|
+
public clientId: string;
|
|
1263
|
+
public createdAt: string;
|
|
1264
|
+
public secret: Uint8Array;
|
|
1265
|
+
public static create(properties?: IHistoryClient): HistoryClient;
|
|
1266
|
+
public static encode(message: IHistoryClient, writer?: $protobuf.Writer): $protobuf.Writer;
|
|
1267
|
+
public static encodeDelimited(message: IHistoryClient, writer?: $protobuf.Writer): $protobuf.Writer;
|
|
1268
|
+
public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): HistoryClient;
|
|
1269
|
+
public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): HistoryClient;
|
|
1270
|
+
public static verify(message: { [k: string]: any }): (string|null);
|
|
1271
|
+
public static fromObject(object: { [k: string]: any }): HistoryClient;
|
|
1272
|
+
public static toObject(message: HistoryClient, options?: $protobuf.IConversionOptions): { [k: string]: any };
|
|
1273
|
+
public toJSON(): { [k: string]: any };
|
|
1274
|
+
public static getTypeUrl(typeUrlPrefix?: string): string;
|
|
1275
|
+
}
|
|
1276
|
+
|
|
1277
|
+
export interface IHistoryClientAvailable {
|
|
1278
|
+
client: IHistoryClient;
|
|
1279
|
+
}
|
|
1280
|
+
|
|
1281
|
+
export class HistoryClientAvailable implements IHistoryClientAvailable {
|
|
1282
|
+
constructor(properties?: IHistoryClientAvailable);
|
|
1283
|
+
public client: IHistoryClient;
|
|
1284
|
+
public static create(properties?: IHistoryClientAvailable): HistoryClientAvailable;
|
|
1285
|
+
public static encode(message: IHistoryClientAvailable, writer?: $protobuf.Writer): $protobuf.Writer;
|
|
1286
|
+
public static encodeDelimited(message: IHistoryClientAvailable, writer?: $protobuf.Writer): $protobuf.Writer;
|
|
1287
|
+
public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): HistoryClientAvailable;
|
|
1288
|
+
public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): HistoryClientAvailable;
|
|
1289
|
+
public static verify(message: { [k: string]: any }): (string|null);
|
|
1290
|
+
public static fromObject(object: { [k: string]: any }): HistoryClientAvailable;
|
|
1291
|
+
public static toObject(message: HistoryClientAvailable, options?: $protobuf.IConversionOptions): { [k: string]: any };
|
|
1292
|
+
public toJSON(): { [k: string]: any };
|
|
1293
|
+
public static getTypeUrl(typeUrlPrefix?: string): string;
|
|
1294
|
+
}
|
|
1295
|
+
|
|
1296
|
+
export interface IHistoryClientRequest {
|
|
1297
|
+
}
|
|
1298
|
+
|
|
1299
|
+
export class HistoryClientRequest implements IHistoryClientRequest {
|
|
1300
|
+
constructor(properties?: IHistoryClientRequest);
|
|
1301
|
+
public static create(properties?: IHistoryClientRequest): HistoryClientRequest;
|
|
1302
|
+
public static encode(message: IHistoryClientRequest, writer?: $protobuf.Writer): $protobuf.Writer;
|
|
1303
|
+
public static encodeDelimited(message: IHistoryClientRequest, writer?: $protobuf.Writer): $protobuf.Writer;
|
|
1304
|
+
public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): HistoryClientRequest;
|
|
1305
|
+
public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): HistoryClientRequest;
|
|
1306
|
+
public static verify(message: { [k: string]: any }): (string|null);
|
|
1307
|
+
public static fromObject(object: { [k: string]: any }): HistoryClientRequest;
|
|
1308
|
+
public static toObject(message: HistoryClientRequest, options?: $protobuf.IConversionOptions): { [k: string]: any };
|
|
1309
|
+
public toJSON(): { [k: string]: any };
|
|
1310
|
+
public static getTypeUrl(typeUrlPrefix?: string): string;
|
|
1311
|
+
}
|
|
1312
|
+
|
|
1313
|
+
export interface IHistoryClientResponse {
|
|
1314
|
+
clients?: (IHistoryClient[]|null);
|
|
1315
|
+
}
|
|
1316
|
+
|
|
1317
|
+
export class HistoryClientResponse implements IHistoryClientResponse {
|
|
1318
|
+
constructor(properties?: IHistoryClientResponse);
|
|
1319
|
+
public clients: IHistoryClient[];
|
|
1320
|
+
public static create(properties?: IHistoryClientResponse): HistoryClientResponse;
|
|
1321
|
+
public static encode(message: IHistoryClientResponse, writer?: $protobuf.Writer): $protobuf.Writer;
|
|
1322
|
+
public static encodeDelimited(message: IHistoryClientResponse, writer?: $protobuf.Writer): $protobuf.Writer;
|
|
1323
|
+
public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): HistoryClientResponse;
|
|
1324
|
+
public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): HistoryClientResponse;
|
|
1325
|
+
public static verify(message: { [k: string]: any }): (string|null);
|
|
1326
|
+
public static fromObject(object: { [k: string]: any }): HistoryClientResponse;
|
|
1327
|
+
public static toObject(message: HistoryClientResponse, options?: $protobuf.IConversionOptions): { [k: string]: any };
|
|
1328
|
+
public toJSON(): { [k: string]: any };
|
|
1329
|
+
public static getTypeUrl(typeUrlPrefix?: string): string;
|
|
1330
|
+
}
|
|
1331
|
+
|
|
1171
1332
|
export enum ClientAction {
|
|
1172
1333
|
RESET_SESSION = 0
|
|
1173
1334
|
}
|