@wireapp/protocol-messaging 1.48.0 → 1.49.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.48.0"
30
+ "version": "1.49.0"
31
31
  }
@@ -46,6 +46,7 @@ message GenericMessage {
46
46
  ButtonAction buttonAction = 21;
47
47
  ButtonActionConfirmation buttonActionConfirmation = 22;
48
48
  DataTransfer dataTransfer = 23; // client-side synchronization across devices of the same user
49
+ InCallEmoji inCallEmoji = 24;
49
50
  }
50
51
  }
51
52
 
@@ -331,6 +332,10 @@ message Reaction {
331
332
  optional LegalHoldStatus legal_hold_status = 3 [default = UNKNOWN]; // whether this message was sent to legal hold
332
333
  }
333
334
 
335
+ message InCallEmoji {
336
+ map<string, int32> emojis = 1;
337
+ }
338
+
334
339
  message Calling {
335
340
  required string content = 1;
336
341
  optional QualifiedConversationId qualified_conversation_id = 2;
package/web/messages.d.ts CHANGED
@@ -23,6 +23,7 @@ export interface IGenericMessage {
23
23
  buttonAction?: (IButtonAction|null);
24
24
  buttonActionConfirmation?: (IButtonActionConfirmation|null);
25
25
  dataTransfer?: (IDataTransfer|null);
26
+ inCallEmoji?: (IInCallEmoji|null);
26
27
  }
27
28
 
28
29
  export class GenericMessage implements IGenericMessage {
@@ -49,7 +50,8 @@ export class GenericMessage implements IGenericMessage {
49
50
  public buttonAction?: (IButtonAction|null);
50
51
  public buttonActionConfirmation?: (IButtonActionConfirmation|null);
51
52
  public dataTransfer?: (IDataTransfer|null);
52
- public content?: ("text"|"image"|"knock"|"lastRead"|"cleared"|"external"|"clientAction"|"calling"|"asset"|"hidden"|"location"|"deleted"|"edited"|"confirmation"|"reaction"|"ephemeral"|"availability"|"composite"|"buttonAction"|"buttonActionConfirmation"|"dataTransfer");
53
+ public inCallEmoji?: (IInCallEmoji|null);
54
+ public content?: ("text"|"image"|"knock"|"lastRead"|"cleared"|"external"|"clientAction"|"calling"|"asset"|"hidden"|"location"|"deleted"|"edited"|"confirmation"|"reaction"|"ephemeral"|"availability"|"composite"|"buttonAction"|"buttonActionConfirmation"|"dataTransfer"|"inCallEmoji");
53
55
  public static create(properties?: IGenericMessage): GenericMessage;
54
56
  public static encode(message: IGenericMessage, writer?: $protobuf.Writer): $protobuf.Writer;
55
57
  public static encodeDelimited(message: IGenericMessage, writer?: $protobuf.Writer): $protobuf.Writer;
@@ -905,6 +907,25 @@ export class Reaction implements IReaction {
905
907
  public static getTypeUrl(typeUrlPrefix?: string): string;
906
908
  }
907
909
 
910
+ export interface IInCallEmoji {
911
+ emojis?: ({ [k: string]: number }|null);
912
+ }
913
+
914
+ export class InCallEmoji implements IInCallEmoji {
915
+ constructor(properties?: IInCallEmoji);
916
+ public emojis: { [k: string]: number };
917
+ public static create(properties?: IInCallEmoji): InCallEmoji;
918
+ public static encode(message: IInCallEmoji, writer?: $protobuf.Writer): $protobuf.Writer;
919
+ public static encodeDelimited(message: IInCallEmoji, writer?: $protobuf.Writer): $protobuf.Writer;
920
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): InCallEmoji;
921
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): InCallEmoji;
922
+ public static verify(message: { [k: string]: any }): (string|null);
923
+ public static fromObject(object: { [k: string]: any }): InCallEmoji;
924
+ public static toObject(message: InCallEmoji, options?: $protobuf.IConversionOptions): { [k: string]: any };
925
+ public toJSON(): { [k: string]: any };
926
+ public static getTypeUrl(typeUrlPrefix?: string): string;
927
+ }
928
+
908
929
  export interface ICalling {
909
930
  content: string;
910
931
  qualifiedConversationId?: (IQualifiedConversationId|null);
package/web/messages.js CHANGED
@@ -37,6 +37,7 @@ $root.GenericMessage = (function() {
37
37
  * @property {IButtonAction|null} [buttonAction] GenericMessage buttonAction
38
38
  * @property {IButtonActionConfirmation|null} [buttonActionConfirmation] GenericMessage buttonActionConfirmation
39
39
  * @property {IDataTransfer|null} [dataTransfer] GenericMessage dataTransfer
40
+ * @property {IInCallEmoji|null} [inCallEmoji] GenericMessage inCallEmoji
40
41
  */
41
42
 
42
43
  /**
@@ -230,17 +231,25 @@ $root.GenericMessage = (function() {
230
231
  */
231
232
  GenericMessage.prototype.dataTransfer = null;
232
233
 
234
+ /**
235
+ * GenericMessage inCallEmoji.
236
+ * @member {IInCallEmoji|null|undefined} inCallEmoji
237
+ * @memberof GenericMessage
238
+ * @instance
239
+ */
240
+ GenericMessage.prototype.inCallEmoji = null;
241
+
233
242
  // OneOf field names bound to virtual getters and setters
234
243
  var $oneOfFields;
235
244
 
236
245
  /**
237
246
  * GenericMessage content.
238
- * @member {"text"|"image"|"knock"|"lastRead"|"cleared"|"external"|"clientAction"|"calling"|"asset"|"hidden"|"location"|"deleted"|"edited"|"confirmation"|"reaction"|"ephemeral"|"availability"|"composite"|"buttonAction"|"buttonActionConfirmation"|"dataTransfer"|undefined} content
247
+ * @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
239
248
  * @memberof GenericMessage
240
249
  * @instance
241
250
  */
242
251
  Object.defineProperty(GenericMessage.prototype, "content", {
243
- 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"]),
252
+ 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"]),
244
253
  set: $util.oneOfSetter($oneOfFields)
245
254
  });
246
255
 
@@ -311,6 +320,8 @@ $root.GenericMessage = (function() {
311
320
  $root.ButtonActionConfirmation.encode(message.buttonActionConfirmation, writer.uint32(/* id 22, wireType 2 =*/178).fork()).ldelim();
312
321
  if (message.dataTransfer != null && Object.hasOwnProperty.call(message, "dataTransfer"))
313
322
  $root.DataTransfer.encode(message.dataTransfer, writer.uint32(/* id 23, wireType 2 =*/186).fork()).ldelim();
323
+ if (message.inCallEmoji != null && Object.hasOwnProperty.call(message, "inCallEmoji"))
324
+ $root.InCallEmoji.encode(message.inCallEmoji, writer.uint32(/* id 24, wireType 2 =*/194).fork()).ldelim();
314
325
  return writer;
315
326
  };
316
327
 
@@ -433,6 +444,10 @@ $root.GenericMessage = (function() {
433
444
  message.dataTransfer = $root.DataTransfer.decode(reader, reader.uint32());
434
445
  break;
435
446
  }
447
+ case 24: {
448
+ message.inCallEmoji = $root.InCallEmoji.decode(reader, reader.uint32());
449
+ break;
450
+ }
436
451
  default:
437
452
  reader.skipType(tag & 7);
438
453
  break;
@@ -682,6 +697,16 @@ $root.GenericMessage = (function() {
682
697
  return "dataTransfer." + error;
683
698
  }
684
699
  }
700
+ if (message.inCallEmoji != null && message.hasOwnProperty("inCallEmoji")) {
701
+ if (properties.content === 1)
702
+ return "content: multiple values";
703
+ properties.content = 1;
704
+ {
705
+ var error = $root.InCallEmoji.verify(message.inCallEmoji);
706
+ if (error)
707
+ return "inCallEmoji." + error;
708
+ }
709
+ }
685
710
  return null;
686
711
  };
687
712
 
@@ -811,6 +836,11 @@ $root.GenericMessage = (function() {
811
836
  throw TypeError(".GenericMessage.dataTransfer: object expected");
812
837
  message.dataTransfer = $root.DataTransfer.fromObject(object.dataTransfer);
813
838
  }
839
+ if (object.inCallEmoji != null) {
840
+ if (typeof object.inCallEmoji !== "object")
841
+ throw TypeError(".GenericMessage.inCallEmoji: object expected");
842
+ message.inCallEmoji = $root.InCallEmoji.fromObject(object.inCallEmoji);
843
+ }
814
844
  return message;
815
845
  };
816
846
 
@@ -936,6 +966,11 @@ $root.GenericMessage = (function() {
936
966
  if (options.oneofs)
937
967
  object.content = "dataTransfer";
938
968
  }
969
+ if (message.inCallEmoji != null && message.hasOwnProperty("inCallEmoji")) {
970
+ object.inCallEmoji = $root.InCallEmoji.toObject(message.inCallEmoji, options);
971
+ if (options.oneofs)
972
+ object.content = "inCallEmoji";
973
+ }
939
974
  return object;
940
975
  };
941
976
 
@@ -10674,6 +10709,244 @@ $root.Reaction = (function() {
10674
10709
  return Reaction;
10675
10710
  })();
10676
10711
 
10712
+ $root.InCallEmoji = (function() {
10713
+
10714
+ /**
10715
+ * Properties of an InCallEmoji.
10716
+ * @exports IInCallEmoji
10717
+ * @interface IInCallEmoji
10718
+ * @property {Object.<string,number>|null} [emojis] InCallEmoji emojis
10719
+ */
10720
+
10721
+ /**
10722
+ * Constructs a new InCallEmoji.
10723
+ * @exports InCallEmoji
10724
+ * @classdesc Represents an InCallEmoji.
10725
+ * @implements IInCallEmoji
10726
+ * @constructor
10727
+ * @param {IInCallEmoji=} [properties] Properties to set
10728
+ */
10729
+ function InCallEmoji(properties) {
10730
+ this.emojis = {};
10731
+ if (properties)
10732
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
10733
+ if (properties[keys[i]] != null)
10734
+ this[keys[i]] = properties[keys[i]];
10735
+ }
10736
+
10737
+ /**
10738
+ * InCallEmoji emojis.
10739
+ * @member {Object.<string,number>} emojis
10740
+ * @memberof InCallEmoji
10741
+ * @instance
10742
+ */
10743
+ InCallEmoji.prototype.emojis = $util.emptyObject;
10744
+
10745
+ /**
10746
+ * Creates a new InCallEmoji instance using the specified properties.
10747
+ * @function create
10748
+ * @memberof InCallEmoji
10749
+ * @static
10750
+ * @param {IInCallEmoji=} [properties] Properties to set
10751
+ * @returns {InCallEmoji} InCallEmoji instance
10752
+ */
10753
+ InCallEmoji.create = function create(properties) {
10754
+ return new InCallEmoji(properties);
10755
+ };
10756
+
10757
+ /**
10758
+ * Encodes the specified InCallEmoji message. Does not implicitly {@link InCallEmoji.verify|verify} messages.
10759
+ * @function encode
10760
+ * @memberof InCallEmoji
10761
+ * @static
10762
+ * @param {IInCallEmoji} message InCallEmoji message or plain object to encode
10763
+ * @param {$protobuf.Writer} [writer] Writer to encode to
10764
+ * @returns {$protobuf.Writer} Writer
10765
+ */
10766
+ InCallEmoji.encode = function encode(message, writer) {
10767
+ if (!writer)
10768
+ writer = $Writer.create();
10769
+ if (message.emojis != null && Object.hasOwnProperty.call(message, "emojis"))
10770
+ for (var keys = Object.keys(message.emojis), i = 0; i < keys.length; ++i)
10771
+ writer.uint32(/* id 1, wireType 2 =*/10).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 0 =*/16).int32(message.emojis[keys[i]]).ldelim();
10772
+ return writer;
10773
+ };
10774
+
10775
+ /**
10776
+ * Encodes the specified InCallEmoji message, length delimited. Does not implicitly {@link InCallEmoji.verify|verify} messages.
10777
+ * @function encodeDelimited
10778
+ * @memberof InCallEmoji
10779
+ * @static
10780
+ * @param {IInCallEmoji} message InCallEmoji message or plain object to encode
10781
+ * @param {$protobuf.Writer} [writer] Writer to encode to
10782
+ * @returns {$protobuf.Writer} Writer
10783
+ */
10784
+ InCallEmoji.encodeDelimited = function encodeDelimited(message, writer) {
10785
+ return this.encode(message, writer).ldelim();
10786
+ };
10787
+
10788
+ /**
10789
+ * Decodes an InCallEmoji message from the specified reader or buffer.
10790
+ * @function decode
10791
+ * @memberof InCallEmoji
10792
+ * @static
10793
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
10794
+ * @param {number} [length] Message length if known beforehand
10795
+ * @returns {InCallEmoji} InCallEmoji
10796
+ * @throws {Error} If the payload is not a reader or valid buffer
10797
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
10798
+ */
10799
+ InCallEmoji.decode = function decode(reader, length) {
10800
+ if (!(reader instanceof $Reader))
10801
+ reader = $Reader.create(reader);
10802
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.InCallEmoji(), key, value;
10803
+ while (reader.pos < end) {
10804
+ var tag = reader.uint32();
10805
+ switch (tag >>> 3) {
10806
+ case 1: {
10807
+ if (message.emojis === $util.emptyObject)
10808
+ message.emojis = {};
10809
+ var end2 = reader.uint32() + reader.pos;
10810
+ key = "";
10811
+ value = 0;
10812
+ while (reader.pos < end2) {
10813
+ var tag2 = reader.uint32();
10814
+ switch (tag2 >>> 3) {
10815
+ case 1:
10816
+ key = reader.string();
10817
+ break;
10818
+ case 2:
10819
+ value = reader.int32();
10820
+ break;
10821
+ default:
10822
+ reader.skipType(tag2 & 7);
10823
+ break;
10824
+ }
10825
+ }
10826
+ message.emojis[key] = value;
10827
+ break;
10828
+ }
10829
+ default:
10830
+ reader.skipType(tag & 7);
10831
+ break;
10832
+ }
10833
+ }
10834
+ return message;
10835
+ };
10836
+
10837
+ /**
10838
+ * Decodes an InCallEmoji message from the specified reader or buffer, length delimited.
10839
+ * @function decodeDelimited
10840
+ * @memberof InCallEmoji
10841
+ * @static
10842
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
10843
+ * @returns {InCallEmoji} InCallEmoji
10844
+ * @throws {Error} If the payload is not a reader or valid buffer
10845
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
10846
+ */
10847
+ InCallEmoji.decodeDelimited = function decodeDelimited(reader) {
10848
+ if (!(reader instanceof $Reader))
10849
+ reader = new $Reader(reader);
10850
+ return this.decode(reader, reader.uint32());
10851
+ };
10852
+
10853
+ /**
10854
+ * Verifies an InCallEmoji message.
10855
+ * @function verify
10856
+ * @memberof InCallEmoji
10857
+ * @static
10858
+ * @param {Object.<string,*>} message Plain object to verify
10859
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
10860
+ */
10861
+ InCallEmoji.verify = function verify(message) {
10862
+ if (typeof message !== "object" || message === null)
10863
+ return "object expected";
10864
+ if (message.emojis != null && message.hasOwnProperty("emojis")) {
10865
+ if (!$util.isObject(message.emojis))
10866
+ return "emojis: object expected";
10867
+ var key = Object.keys(message.emojis);
10868
+ for (var i = 0; i < key.length; ++i)
10869
+ if (!$util.isInteger(message.emojis[key[i]]))
10870
+ return "emojis: integer{k:string} expected";
10871
+ }
10872
+ return null;
10873
+ };
10874
+
10875
+ /**
10876
+ * Creates an InCallEmoji message from a plain object. Also converts values to their respective internal types.
10877
+ * @function fromObject
10878
+ * @memberof InCallEmoji
10879
+ * @static
10880
+ * @param {Object.<string,*>} object Plain object
10881
+ * @returns {InCallEmoji} InCallEmoji
10882
+ */
10883
+ InCallEmoji.fromObject = function fromObject(object) {
10884
+ if (object instanceof $root.InCallEmoji)
10885
+ return object;
10886
+ var message = new $root.InCallEmoji();
10887
+ if (object.emojis) {
10888
+ if (typeof object.emojis !== "object")
10889
+ throw TypeError(".InCallEmoji.emojis: object expected");
10890
+ message.emojis = {};
10891
+ for (var keys = Object.keys(object.emojis), i = 0; i < keys.length; ++i)
10892
+ message.emojis[keys[i]] = object.emojis[keys[i]] | 0;
10893
+ }
10894
+ return message;
10895
+ };
10896
+
10897
+ /**
10898
+ * Creates a plain object from an InCallEmoji message. Also converts values to other types if specified.
10899
+ * @function toObject
10900
+ * @memberof InCallEmoji
10901
+ * @static
10902
+ * @param {InCallEmoji} message InCallEmoji
10903
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
10904
+ * @returns {Object.<string,*>} Plain object
10905
+ */
10906
+ InCallEmoji.toObject = function toObject(message, options) {
10907
+ if (!options)
10908
+ options = {};
10909
+ var object = {};
10910
+ if (options.objects || options.defaults)
10911
+ object.emojis = {};
10912
+ var keys2;
10913
+ if (message.emojis && (keys2 = Object.keys(message.emojis)).length) {
10914
+ object.emojis = {};
10915
+ for (var j = 0; j < keys2.length; ++j)
10916
+ object.emojis[keys2[j]] = message.emojis[keys2[j]];
10917
+ }
10918
+ return object;
10919
+ };
10920
+
10921
+ /**
10922
+ * Converts this InCallEmoji to JSON.
10923
+ * @function toJSON
10924
+ * @memberof InCallEmoji
10925
+ * @instance
10926
+ * @returns {Object.<string,*>} JSON object
10927
+ */
10928
+ InCallEmoji.prototype.toJSON = function toJSON() {
10929
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
10930
+ };
10931
+
10932
+ /**
10933
+ * Gets the default type url for InCallEmoji
10934
+ * @function getTypeUrl
10935
+ * @memberof InCallEmoji
10936
+ * @static
10937
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
10938
+ * @returns {string} The default type url
10939
+ */
10940
+ InCallEmoji.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
10941
+ if (typeUrlPrefix === undefined) {
10942
+ typeUrlPrefix = "type.googleapis.com";
10943
+ }
10944
+ return typeUrlPrefix + "/InCallEmoji";
10945
+ };
10946
+
10947
+ return InCallEmoji;
10948
+ })();
10949
+
10677
10950
  $root.Calling = (function() {
10678
10951
 
10679
10952
  /**