@wireapp/protocol-messaging 1.50.0 → 1.51.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 CHANGED
@@ -27,5 +27,5 @@
27
27
  "preversion": "git checkout master && git pull && yarn && yarn dist && yarn test",
28
28
  "test": "tsc --noEmit"
29
29
  },
30
- "version": "1.50.0"
30
+ "version": "1.51.0"
31
31
  }
@@ -49,6 +49,7 @@ message GenericMessage {
49
49
  InCallEmoji inCallEmoji = 24;
50
50
  // UnknownStrategy unknownStrategy = 25; -- Defined outside the oneof
51
51
  // Next field should be 26 ↓
52
+ InCallHandRaise inCallHandRaise = 26;
52
53
  }
53
54
  optional UnknownStrategy unknownStrategy = 25 [default = IGNORE];
54
55
 
@@ -346,6 +347,10 @@ message InCallEmoji {
346
347
  map<string, int32> emojis = 1;
347
348
  }
348
349
 
350
+ message InCallHandRaise {
351
+ required bool is_hand_up = 1; // true if the hand is raised, false if lowered
352
+ }
353
+
349
354
  message Calling {
350
355
  required string content = 1;
351
356
  optional QualifiedConversationId qualified_conversation_id = 2;
package/web/messages.d.ts CHANGED
@@ -24,6 +24,7 @@ export interface IGenericMessage {
24
24
  buttonActionConfirmation?: (IButtonActionConfirmation|null);
25
25
  dataTransfer?: (IDataTransfer|null);
26
26
  inCallEmoji?: (IInCallEmoji|null);
27
+ inCallHandRaise?: (IInCallHandRaise|null);
27
28
  unknownStrategy?: (GenericMessage.UnknownStrategy|null);
28
29
  }
29
30
 
@@ -52,8 +53,9 @@ export class GenericMessage implements IGenericMessage {
52
53
  public buttonActionConfirmation?: (IButtonActionConfirmation|null);
53
54
  public dataTransfer?: (IDataTransfer|null);
54
55
  public inCallEmoji?: (IInCallEmoji|null);
56
+ public inCallHandRaise?: (IInCallHandRaise|null);
55
57
  public unknownStrategy: GenericMessage.UnknownStrategy;
56
- public content?: ("text"|"image"|"knock"|"lastRead"|"cleared"|"external"|"clientAction"|"calling"|"asset"|"hidden"|"location"|"deleted"|"edited"|"confirmation"|"reaction"|"ephemeral"|"availability"|"composite"|"buttonAction"|"buttonActionConfirmation"|"dataTransfer"|"inCallEmoji");
58
+ 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");
57
59
  public static create(properties?: IGenericMessage): GenericMessage;
58
60
  public static encode(message: IGenericMessage, writer?: $protobuf.Writer): $protobuf.Writer;
59
61
  public static encodeDelimited(message: IGenericMessage, writer?: $protobuf.Writer): $protobuf.Writer;
@@ -937,6 +939,25 @@ export class InCallEmoji implements IInCallEmoji {
937
939
  public static getTypeUrl(typeUrlPrefix?: string): string;
938
940
  }
939
941
 
942
+ export interface IInCallHandRaise {
943
+ isHandUp: boolean;
944
+ }
945
+
946
+ export class InCallHandRaise implements IInCallHandRaise {
947
+ constructor(properties?: IInCallHandRaise);
948
+ public isHandUp: boolean;
949
+ public static create(properties?: IInCallHandRaise): InCallHandRaise;
950
+ public static encode(message: IInCallHandRaise, writer?: $protobuf.Writer): $protobuf.Writer;
951
+ public static encodeDelimited(message: IInCallHandRaise, writer?: $protobuf.Writer): $protobuf.Writer;
952
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): InCallHandRaise;
953
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): InCallHandRaise;
954
+ public static verify(message: { [k: string]: any }): (string|null);
955
+ public static fromObject(object: { [k: string]: any }): InCallHandRaise;
956
+ public static toObject(message: InCallHandRaise, options?: $protobuf.IConversionOptions): { [k: string]: any };
957
+ public toJSON(): { [k: string]: any };
958
+ public static getTypeUrl(typeUrlPrefix?: string): string;
959
+ }
960
+
940
961
  export interface ICalling {
941
962
  content: string;
942
963
  qualifiedConversationId?: (IQualifiedConversationId|null);
package/web/messages.js CHANGED
@@ -38,6 +38,7 @@ $root.GenericMessage = (function() {
38
38
  * @property {IButtonActionConfirmation|null} [buttonActionConfirmation] GenericMessage buttonActionConfirmation
39
39
  * @property {IDataTransfer|null} [dataTransfer] GenericMessage dataTransfer
40
40
  * @property {IInCallEmoji|null} [inCallEmoji] GenericMessage inCallEmoji
41
+ * @property {IInCallHandRaise|null} [inCallHandRaise] GenericMessage inCallHandRaise
41
42
  * @property {GenericMessage.UnknownStrategy|null} [unknownStrategy] GenericMessage unknownStrategy
42
43
  */
43
44
 
@@ -240,6 +241,14 @@ $root.GenericMessage = (function() {
240
241
  */
241
242
  GenericMessage.prototype.inCallEmoji = null;
242
243
 
244
+ /**
245
+ * GenericMessage inCallHandRaise.
246
+ * @member {IInCallHandRaise|null|undefined} inCallHandRaise
247
+ * @memberof GenericMessage
248
+ * @instance
249
+ */
250
+ GenericMessage.prototype.inCallHandRaise = null;
251
+
243
252
  /**
244
253
  * GenericMessage unknownStrategy.
245
254
  * @member {GenericMessage.UnknownStrategy} unknownStrategy
@@ -253,12 +262,12 @@ $root.GenericMessage = (function() {
253
262
 
254
263
  /**
255
264
  * GenericMessage content.
256
- * @member {"text"|"image"|"knock"|"lastRead"|"cleared"|"external"|"clientAction"|"calling"|"asset"|"hidden"|"location"|"deleted"|"edited"|"confirmation"|"reaction"|"ephemeral"|"availability"|"composite"|"buttonAction"|"buttonActionConfirmation"|"dataTransfer"|"inCallEmoji"|undefined} content
265
+ * @member {"text"|"image"|"knock"|"lastRead"|"cleared"|"external"|"clientAction"|"calling"|"asset"|"hidden"|"location"|"deleted"|"edited"|"confirmation"|"reaction"|"ephemeral"|"availability"|"composite"|"buttonAction"|"buttonActionConfirmation"|"dataTransfer"|"inCallEmoji"|"inCallHandRaise"|undefined} content
257
266
  * @memberof GenericMessage
258
267
  * @instance
259
268
  */
260
269
  Object.defineProperty(GenericMessage.prototype, "content", {
261
- get: $util.oneOfGetter($oneOfFields = ["text", "image", "knock", "lastRead", "cleared", "external", "clientAction", "calling", "asset", "hidden", "location", "deleted", "edited", "confirmation", "reaction", "ephemeral", "availability", "composite", "buttonAction", "buttonActionConfirmation", "dataTransfer", "inCallEmoji"]),
270
+ get: $util.oneOfGetter($oneOfFields = ["text", "image", "knock", "lastRead", "cleared", "external", "clientAction", "calling", "asset", "hidden", "location", "deleted", "edited", "confirmation", "reaction", "ephemeral", "availability", "composite", "buttonAction", "buttonActionConfirmation", "dataTransfer", "inCallEmoji", "inCallHandRaise"]),
262
271
  set: $util.oneOfSetter($oneOfFields)
263
272
  });
264
273
 
@@ -333,6 +342,8 @@ $root.GenericMessage = (function() {
333
342
  $root.InCallEmoji.encode(message.inCallEmoji, writer.uint32(/* id 24, wireType 2 =*/194).fork()).ldelim();
334
343
  if (message.unknownStrategy != null && Object.hasOwnProperty.call(message, "unknownStrategy"))
335
344
  writer.uint32(/* id 25, wireType 0 =*/200).int32(message.unknownStrategy);
345
+ if (message.inCallHandRaise != null && Object.hasOwnProperty.call(message, "inCallHandRaise"))
346
+ $root.InCallHandRaise.encode(message.inCallHandRaise, writer.uint32(/* id 26, wireType 2 =*/210).fork()).ldelim();
336
347
  return writer;
337
348
  };
338
349
 
@@ -459,6 +470,10 @@ $root.GenericMessage = (function() {
459
470
  message.inCallEmoji = $root.InCallEmoji.decode(reader, reader.uint32());
460
471
  break;
461
472
  }
473
+ case 26: {
474
+ message.inCallHandRaise = $root.InCallHandRaise.decode(reader, reader.uint32());
475
+ break;
476
+ }
462
477
  case 25: {
463
478
  message.unknownStrategy = reader.int32();
464
479
  break;
@@ -722,6 +737,16 @@ $root.GenericMessage = (function() {
722
737
  return "inCallEmoji." + error;
723
738
  }
724
739
  }
740
+ if (message.inCallHandRaise != null && message.hasOwnProperty("inCallHandRaise")) {
741
+ if (properties.content === 1)
742
+ return "content: multiple values";
743
+ properties.content = 1;
744
+ {
745
+ var error = $root.InCallHandRaise.verify(message.inCallHandRaise);
746
+ if (error)
747
+ return "inCallHandRaise." + error;
748
+ }
749
+ }
725
750
  if (message.unknownStrategy != null && message.hasOwnProperty("unknownStrategy"))
726
751
  switch (message.unknownStrategy) {
727
752
  default:
@@ -865,6 +890,11 @@ $root.GenericMessage = (function() {
865
890
  throw TypeError(".GenericMessage.inCallEmoji: object expected");
866
891
  message.inCallEmoji = $root.InCallEmoji.fromObject(object.inCallEmoji);
867
892
  }
893
+ if (object.inCallHandRaise != null) {
894
+ if (typeof object.inCallHandRaise !== "object")
895
+ throw TypeError(".GenericMessage.inCallHandRaise: object expected");
896
+ message.inCallHandRaise = $root.InCallHandRaise.fromObject(object.inCallHandRaise);
897
+ }
868
898
  switch (object.unknownStrategy) {
869
899
  default:
870
900
  if (typeof object.unknownStrategy === "number") {
@@ -1019,6 +1049,11 @@ $root.GenericMessage = (function() {
1019
1049
  }
1020
1050
  if (message.unknownStrategy != null && message.hasOwnProperty("unknownStrategy"))
1021
1051
  object.unknownStrategy = options.enums === String ? $root.GenericMessage.UnknownStrategy[message.unknownStrategy] === undefined ? message.unknownStrategy : $root.GenericMessage.UnknownStrategy[message.unknownStrategy] : message.unknownStrategy;
1052
+ if (message.inCallHandRaise != null && message.hasOwnProperty("inCallHandRaise")) {
1053
+ object.inCallHandRaise = $root.InCallHandRaise.toObject(message.inCallHandRaise, options);
1054
+ if (options.oneofs)
1055
+ object.content = "inCallHandRaise";
1056
+ }
1022
1057
  return object;
1023
1058
  };
1024
1059
 
@@ -11011,6 +11046,209 @@ $root.InCallEmoji = (function() {
11011
11046
  return InCallEmoji;
11012
11047
  })();
11013
11048
 
11049
+ $root.InCallHandRaise = (function() {
11050
+
11051
+ /**
11052
+ * Properties of an InCallHandRaise.
11053
+ * @exports IInCallHandRaise
11054
+ * @interface IInCallHandRaise
11055
+ * @property {boolean} isHandUp InCallHandRaise isHandUp
11056
+ */
11057
+
11058
+ /**
11059
+ * Constructs a new InCallHandRaise.
11060
+ * @exports InCallHandRaise
11061
+ * @classdesc Represents an InCallHandRaise.
11062
+ * @implements IInCallHandRaise
11063
+ * @constructor
11064
+ * @param {IInCallHandRaise=} [properties] Properties to set
11065
+ */
11066
+ function InCallHandRaise(properties) {
11067
+ if (properties)
11068
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
11069
+ if (properties[keys[i]] != null)
11070
+ this[keys[i]] = properties[keys[i]];
11071
+ }
11072
+
11073
+ /**
11074
+ * InCallHandRaise isHandUp.
11075
+ * @member {boolean} isHandUp
11076
+ * @memberof InCallHandRaise
11077
+ * @instance
11078
+ */
11079
+ InCallHandRaise.prototype.isHandUp = false;
11080
+
11081
+ /**
11082
+ * Creates a new InCallHandRaise instance using the specified properties.
11083
+ * @function create
11084
+ * @memberof InCallHandRaise
11085
+ * @static
11086
+ * @param {IInCallHandRaise=} [properties] Properties to set
11087
+ * @returns {InCallHandRaise} InCallHandRaise instance
11088
+ */
11089
+ InCallHandRaise.create = function create(properties) {
11090
+ return new InCallHandRaise(properties);
11091
+ };
11092
+
11093
+ /**
11094
+ * Encodes the specified InCallHandRaise message. Does not implicitly {@link InCallHandRaise.verify|verify} messages.
11095
+ * @function encode
11096
+ * @memberof InCallHandRaise
11097
+ * @static
11098
+ * @param {IInCallHandRaise} message InCallHandRaise message or plain object to encode
11099
+ * @param {$protobuf.Writer} [writer] Writer to encode to
11100
+ * @returns {$protobuf.Writer} Writer
11101
+ */
11102
+ InCallHandRaise.encode = function encode(message, writer) {
11103
+ if (!writer)
11104
+ writer = $Writer.create();
11105
+ writer.uint32(/* id 1, wireType 0 =*/8).bool(message.isHandUp);
11106
+ return writer;
11107
+ };
11108
+
11109
+ /**
11110
+ * Encodes the specified InCallHandRaise message, length delimited. Does not implicitly {@link InCallHandRaise.verify|verify} messages.
11111
+ * @function encodeDelimited
11112
+ * @memberof InCallHandRaise
11113
+ * @static
11114
+ * @param {IInCallHandRaise} message InCallHandRaise message or plain object to encode
11115
+ * @param {$protobuf.Writer} [writer] Writer to encode to
11116
+ * @returns {$protobuf.Writer} Writer
11117
+ */
11118
+ InCallHandRaise.encodeDelimited = function encodeDelimited(message, writer) {
11119
+ return this.encode(message, writer).ldelim();
11120
+ };
11121
+
11122
+ /**
11123
+ * Decodes an InCallHandRaise message from the specified reader or buffer.
11124
+ * @function decode
11125
+ * @memberof InCallHandRaise
11126
+ * @static
11127
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
11128
+ * @param {number} [length] Message length if known beforehand
11129
+ * @returns {InCallHandRaise} InCallHandRaise
11130
+ * @throws {Error} If the payload is not a reader or valid buffer
11131
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
11132
+ */
11133
+ InCallHandRaise.decode = function decode(reader, length) {
11134
+ if (!(reader instanceof $Reader))
11135
+ reader = $Reader.create(reader);
11136
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.InCallHandRaise();
11137
+ while (reader.pos < end) {
11138
+ var tag = reader.uint32();
11139
+ switch (tag >>> 3) {
11140
+ case 1: {
11141
+ message.isHandUp = reader.bool();
11142
+ break;
11143
+ }
11144
+ default:
11145
+ reader.skipType(tag & 7);
11146
+ break;
11147
+ }
11148
+ }
11149
+ if (!message.hasOwnProperty("isHandUp"))
11150
+ throw $util.ProtocolError("missing required 'isHandUp'", { instance: message });
11151
+ return message;
11152
+ };
11153
+
11154
+ /**
11155
+ * Decodes an InCallHandRaise message from the specified reader or buffer, length delimited.
11156
+ * @function decodeDelimited
11157
+ * @memberof InCallHandRaise
11158
+ * @static
11159
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
11160
+ * @returns {InCallHandRaise} InCallHandRaise
11161
+ * @throws {Error} If the payload is not a reader or valid buffer
11162
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
11163
+ */
11164
+ InCallHandRaise.decodeDelimited = function decodeDelimited(reader) {
11165
+ if (!(reader instanceof $Reader))
11166
+ reader = new $Reader(reader);
11167
+ return this.decode(reader, reader.uint32());
11168
+ };
11169
+
11170
+ /**
11171
+ * Verifies an InCallHandRaise message.
11172
+ * @function verify
11173
+ * @memberof InCallHandRaise
11174
+ * @static
11175
+ * @param {Object.<string,*>} message Plain object to verify
11176
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
11177
+ */
11178
+ InCallHandRaise.verify = function verify(message) {
11179
+ if (typeof message !== "object" || message === null)
11180
+ return "object expected";
11181
+ if (typeof message.isHandUp !== "boolean")
11182
+ return "isHandUp: boolean expected";
11183
+ return null;
11184
+ };
11185
+
11186
+ /**
11187
+ * Creates an InCallHandRaise message from a plain object. Also converts values to their respective internal types.
11188
+ * @function fromObject
11189
+ * @memberof InCallHandRaise
11190
+ * @static
11191
+ * @param {Object.<string,*>} object Plain object
11192
+ * @returns {InCallHandRaise} InCallHandRaise
11193
+ */
11194
+ InCallHandRaise.fromObject = function fromObject(object) {
11195
+ if (object instanceof $root.InCallHandRaise)
11196
+ return object;
11197
+ var message = new $root.InCallHandRaise();
11198
+ if (object.isHandUp != null)
11199
+ message.isHandUp = Boolean(object.isHandUp);
11200
+ return message;
11201
+ };
11202
+
11203
+ /**
11204
+ * Creates a plain object from an InCallHandRaise message. Also converts values to other types if specified.
11205
+ * @function toObject
11206
+ * @memberof InCallHandRaise
11207
+ * @static
11208
+ * @param {InCallHandRaise} message InCallHandRaise
11209
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
11210
+ * @returns {Object.<string,*>} Plain object
11211
+ */
11212
+ InCallHandRaise.toObject = function toObject(message, options) {
11213
+ if (!options)
11214
+ options = {};
11215
+ var object = {};
11216
+ if (options.defaults)
11217
+ object.isHandUp = false;
11218
+ if (message.isHandUp != null && message.hasOwnProperty("isHandUp"))
11219
+ object.isHandUp = message.isHandUp;
11220
+ return object;
11221
+ };
11222
+
11223
+ /**
11224
+ * Converts this InCallHandRaise to JSON.
11225
+ * @function toJSON
11226
+ * @memberof InCallHandRaise
11227
+ * @instance
11228
+ * @returns {Object.<string,*>} JSON object
11229
+ */
11230
+ InCallHandRaise.prototype.toJSON = function toJSON() {
11231
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
11232
+ };
11233
+
11234
+ /**
11235
+ * Gets the default type url for InCallHandRaise
11236
+ * @function getTypeUrl
11237
+ * @memberof InCallHandRaise
11238
+ * @static
11239
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
11240
+ * @returns {string} The default type url
11241
+ */
11242
+ InCallHandRaise.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
11243
+ if (typeUrlPrefix === undefined) {
11244
+ typeUrlPrefix = "type.googleapis.com";
11245
+ }
11246
+ return typeUrlPrefix + "/InCallHandRaise";
11247
+ };
11248
+
11249
+ return InCallHandRaise;
11250
+ })();
11251
+
11014
11252
  $root.Calling = (function() {
11015
11253
 
11016
11254
  /**