@headspace/protos-events 1.381.0 → 1.383.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/lib/index.d.ts CHANGED
@@ -32305,6 +32305,9 @@ export interface IElfProcessingStats {
32305
32305
 
32306
32306
  /** ElfProcessingStats processingStartedTimestamp */
32307
32307
  processingStartedTimestamp?: (number|Long|null);
32308
+
32309
+ /** ElfProcessingStats emailMessage */
32310
+ emailMessage?: (string|null);
32308
32311
  }
32309
32312
 
32310
32313
  /** Represents an ElfProcessingStats. */
@@ -32361,6 +32364,9 @@ export class ElfProcessingStats implements IElfProcessingStats {
32361
32364
  /** ElfProcessingStats processingStartedTimestamp. */
32362
32365
  public processingStartedTimestamp: (number|Long);
32363
32366
 
32367
+ /** ElfProcessingStats emailMessage. */
32368
+ public emailMessage: string;
32369
+
32364
32370
  /**
32365
32371
  * Creates a new ElfProcessingStats instance using the specified properties.
32366
32372
  * @param [properties] Properties to set
@@ -38936,6 +38942,132 @@ export class ProductSkuVersioned implements IProductSkuVersioned {
38936
38942
  public toJSON(): { [k: string]: any };
38937
38943
  }
38938
38944
 
38945
+ /** Properties of a PubnubChatMessage. */
38946
+ export interface IPubnubChatMessage {
38947
+
38948
+ /** PubnubChatMessage senderId */
38949
+ senderId?: (number|null);
38950
+
38951
+ /** PubnubChatMessage senderType */
38952
+ senderType?: (string|null);
38953
+
38954
+ /** PubnubChatMessage id */
38955
+ id?: (string|null);
38956
+
38957
+ /** PubnubChatMessage message */
38958
+ message?: (string|null);
38959
+
38960
+ /** PubnubChatMessage senderTz */
38961
+ senderTz?: (string|null);
38962
+
38963
+ /** PubnubChatMessage blockTimestamp */
38964
+ blockTimestamp?: (number|Long|null);
38965
+
38966
+ /** PubnubChatMessage channels */
38967
+ channels?: (string[]|null);
38968
+ }
38969
+
38970
+ /** Represents a PubnubChatMessage. */
38971
+ export class PubnubChatMessage implements IPubnubChatMessage {
38972
+
38973
+ /**
38974
+ * Constructs a new PubnubChatMessage.
38975
+ * @param [properties] Properties to set
38976
+ */
38977
+ constructor(properties?: IPubnubChatMessage);
38978
+
38979
+ /** PubnubChatMessage senderId. */
38980
+ public senderId: number;
38981
+
38982
+ /** PubnubChatMessage senderType. */
38983
+ public senderType: string;
38984
+
38985
+ /** PubnubChatMessage id. */
38986
+ public id: string;
38987
+
38988
+ /** PubnubChatMessage message. */
38989
+ public message: string;
38990
+
38991
+ /** PubnubChatMessage senderTz. */
38992
+ public senderTz: string;
38993
+
38994
+ /** PubnubChatMessage blockTimestamp. */
38995
+ public blockTimestamp: (number|Long);
38996
+
38997
+ /** PubnubChatMessage channels. */
38998
+ public channels: string[];
38999
+
39000
+ /**
39001
+ * Creates a new PubnubChatMessage instance using the specified properties.
39002
+ * @param [properties] Properties to set
39003
+ * @returns PubnubChatMessage instance
39004
+ */
39005
+ public static create(properties?: IPubnubChatMessage): PubnubChatMessage;
39006
+
39007
+ /**
39008
+ * Encodes the specified PubnubChatMessage message. Does not implicitly {@link PubnubChatMessage.verify|verify} messages.
39009
+ * @param message PubnubChatMessage message or plain object to encode
39010
+ * @param [writer] Writer to encode to
39011
+ * @returns Writer
39012
+ */
39013
+ public static encode(message: IPubnubChatMessage, writer?: $protobuf.Writer): $protobuf.Writer;
39014
+
39015
+ /**
39016
+ * Encodes the specified PubnubChatMessage message, length delimited. Does not implicitly {@link PubnubChatMessage.verify|verify} messages.
39017
+ * @param message PubnubChatMessage message or plain object to encode
39018
+ * @param [writer] Writer to encode to
39019
+ * @returns Writer
39020
+ */
39021
+ public static encodeDelimited(message: IPubnubChatMessage, writer?: $protobuf.Writer): $protobuf.Writer;
39022
+
39023
+ /**
39024
+ * Decodes a PubnubChatMessage message from the specified reader or buffer.
39025
+ * @param reader Reader or buffer to decode from
39026
+ * @param [length] Message length if known beforehand
39027
+ * @returns PubnubChatMessage
39028
+ * @throws {Error} If the payload is not a reader or valid buffer
39029
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
39030
+ */
39031
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): PubnubChatMessage;
39032
+
39033
+ /**
39034
+ * Decodes a PubnubChatMessage message from the specified reader or buffer, length delimited.
39035
+ * @param reader Reader or buffer to decode from
39036
+ * @returns PubnubChatMessage
39037
+ * @throws {Error} If the payload is not a reader or valid buffer
39038
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
39039
+ */
39040
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): PubnubChatMessage;
39041
+
39042
+ /**
39043
+ * Verifies a PubnubChatMessage message.
39044
+ * @param message Plain object to verify
39045
+ * @returns `null` if valid, otherwise the reason why it is not
39046
+ */
39047
+ public static verify(message: { [k: string]: any }): (string|null);
39048
+
39049
+ /**
39050
+ * Creates a PubnubChatMessage message from a plain object. Also converts values to their respective internal types.
39051
+ * @param object Plain object
39052
+ * @returns PubnubChatMessage
39053
+ */
39054
+ public static fromObject(object: { [k: string]: any }): PubnubChatMessage;
39055
+
39056
+ /**
39057
+ * Creates a plain object from a PubnubChatMessage message. Also converts values to other types if specified.
39058
+ * @param message PubnubChatMessage
39059
+ * @param [options] Conversion options
39060
+ * @returns Plain object
39061
+ */
39062
+ public static toObject(message: PubnubChatMessage, options?: $protobuf.IConversionOptions): { [k: string]: any };
39063
+
39064
+ /**
39065
+ * Converts this PubnubChatMessage to JSON.
39066
+ * @returns JSON object
39067
+ */
39068
+ public toJSON(): { [k: string]: any };
39069
+ }
39070
+
38939
39071
  /** Properties of a ReferralSignedUp. */
38940
39072
  export interface IReferralSignedUp {
38941
39073
 
package/lib/index.js CHANGED
@@ -89528,6 +89528,7 @@ $root.ElfProcessingStats = (function() {
89528
89528
  * @property {string|null} [originalS3Key] ElfProcessingStats originalS3Key
89529
89529
  * @property {string|null} [normalizedS3Key] ElfProcessingStats normalizedS3Key
89530
89530
  * @property {number|Long|null} [processingStartedTimestamp] ElfProcessingStats processingStartedTimestamp
89531
+ * @property {string|null} [emailMessage] ElfProcessingStats emailMessage
89531
89532
  */
89532
89533
 
89533
89534
  /**
@@ -89668,6 +89669,14 @@ $root.ElfProcessingStats = (function() {
89668
89669
  */
89669
89670
  ElfProcessingStats.prototype.processingStartedTimestamp = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
89670
89671
 
89672
+ /**
89673
+ * ElfProcessingStats emailMessage.
89674
+ * @member {string} emailMessage
89675
+ * @memberof ElfProcessingStats
89676
+ * @instance
89677
+ */
89678
+ ElfProcessingStats.prototype.emailMessage = "";
89679
+
89671
89680
  /**
89672
89681
  * Creates a new ElfProcessingStats instance using the specified properties.
89673
89682
  * @function create
@@ -89725,6 +89734,8 @@ $root.ElfProcessingStats = (function() {
89725
89734
  writer.uint32(/* id 15, wireType 2 =*/122).string(message.normalizedS3Key);
89726
89735
  if (message.processingStartedTimestamp != null && message.hasOwnProperty("processingStartedTimestamp"))
89727
89736
  writer.uint32(/* id 16, wireType 0 =*/128).uint64(message.processingStartedTimestamp);
89737
+ if (message.emailMessage != null && message.hasOwnProperty("emailMessage"))
89738
+ writer.uint32(/* id 17, wireType 2 =*/138).string(message.emailMessage);
89728
89739
  return writer;
89729
89740
  };
89730
89741
 
@@ -89816,6 +89827,9 @@ $root.ElfProcessingStats = (function() {
89816
89827
  case 16:
89817
89828
  message.processingStartedTimestamp = reader.uint64();
89818
89829
  break;
89830
+ case 17:
89831
+ message.emailMessage = reader.string();
89832
+ break;
89819
89833
  default:
89820
89834
  reader.skipType(tag & 7);
89821
89835
  break;
@@ -89913,6 +89927,9 @@ $root.ElfProcessingStats = (function() {
89913
89927
  if (message.processingStartedTimestamp != null && message.hasOwnProperty("processingStartedTimestamp"))
89914
89928
  if (!$util.isInteger(message.processingStartedTimestamp) && !(message.processingStartedTimestamp && $util.isInteger(message.processingStartedTimestamp.low) && $util.isInteger(message.processingStartedTimestamp.high)))
89915
89929
  return "processingStartedTimestamp: integer|Long expected";
89930
+ if (message.emailMessage != null && message.hasOwnProperty("emailMessage"))
89931
+ if (!$util.isString(message.emailMessage))
89932
+ return "emailMessage: string expected";
89916
89933
  return null;
89917
89934
  };
89918
89935
 
@@ -89980,6 +89997,8 @@ $root.ElfProcessingStats = (function() {
89980
89997
  message.processingStartedTimestamp = object.processingStartedTimestamp;
89981
89998
  else if (typeof object.processingStartedTimestamp === "object")
89982
89999
  message.processingStartedTimestamp = new $util.LongBits(object.processingStartedTimestamp.low >>> 0, object.processingStartedTimestamp.high >>> 0).toNumber(true);
90000
+ if (object.emailMessage != null)
90001
+ message.emailMessage = String(object.emailMessage);
89983
90002
  return message;
89984
90003
  };
89985
90004
 
@@ -90019,6 +90038,7 @@ $root.ElfProcessingStats = (function() {
90019
90038
  object.processingStartedTimestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
90020
90039
  } else
90021
90040
  object.processingStartedTimestamp = options.longs === String ? "0" : 0;
90041
+ object.emailMessage = "";
90022
90042
  }
90023
90043
  if (message.headspaceHealthOrgId != null && message.hasOwnProperty("headspaceHealthOrgId"))
90024
90044
  object.headspaceHealthOrgId = message.headspaceHealthOrgId;
@@ -90063,6 +90083,8 @@ $root.ElfProcessingStats = (function() {
90063
90083
  object.processingStartedTimestamp = options.longs === String ? String(message.processingStartedTimestamp) : message.processingStartedTimestamp;
90064
90084
  else
90065
90085
  object.processingStartedTimestamp = options.longs === String ? $util.Long.prototype.toString.call(message.processingStartedTimestamp) : options.longs === Number ? new $util.LongBits(message.processingStartedTimestamp.low >>> 0, message.processingStartedTimestamp.high >>> 0).toNumber(true) : message.processingStartedTimestamp;
90086
+ if (message.emailMessage != null && message.hasOwnProperty("emailMessage"))
90087
+ object.emailMessage = message.emailMessage;
90066
90088
  return object;
90067
90089
  };
90068
90090
 
@@ -108972,6 +108994,357 @@ $root.ProductSkuVersioned = (function() {
108972
108994
  return ProductSkuVersioned;
108973
108995
  })();
108974
108996
 
108997
+ $root.PubnubChatMessage = (function() {
108998
+
108999
+ /**
109000
+ * Properties of a PubnubChatMessage.
109001
+ * @exports IPubnubChatMessage
109002
+ * @interface IPubnubChatMessage
109003
+ * @property {number|null} [senderId] PubnubChatMessage senderId
109004
+ * @property {string|null} [senderType] PubnubChatMessage senderType
109005
+ * @property {string|null} [id] PubnubChatMessage id
109006
+ * @property {string|null} [message] PubnubChatMessage message
109007
+ * @property {string|null} [senderTz] PubnubChatMessage senderTz
109008
+ * @property {number|Long|null} [blockTimestamp] PubnubChatMessage blockTimestamp
109009
+ * @property {Array.<string>|null} [channels] PubnubChatMessage channels
109010
+ */
109011
+
109012
+ /**
109013
+ * Constructs a new PubnubChatMessage.
109014
+ * @exports PubnubChatMessage
109015
+ * @classdesc Represents a PubnubChatMessage.
109016
+ * @implements IPubnubChatMessage
109017
+ * @constructor
109018
+ * @param {IPubnubChatMessage=} [properties] Properties to set
109019
+ */
109020
+ function PubnubChatMessage(properties) {
109021
+ this.channels = [];
109022
+ if (properties)
109023
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
109024
+ if (properties[keys[i]] != null)
109025
+ this[keys[i]] = properties[keys[i]];
109026
+ }
109027
+
109028
+ /**
109029
+ * PubnubChatMessage senderId.
109030
+ * @member {number} senderId
109031
+ * @memberof PubnubChatMessage
109032
+ * @instance
109033
+ */
109034
+ PubnubChatMessage.prototype.senderId = 0;
109035
+
109036
+ /**
109037
+ * PubnubChatMessage senderType.
109038
+ * @member {string} senderType
109039
+ * @memberof PubnubChatMessage
109040
+ * @instance
109041
+ */
109042
+ PubnubChatMessage.prototype.senderType = "";
109043
+
109044
+ /**
109045
+ * PubnubChatMessage id.
109046
+ * @member {string} id
109047
+ * @memberof PubnubChatMessage
109048
+ * @instance
109049
+ */
109050
+ PubnubChatMessage.prototype.id = "";
109051
+
109052
+ /**
109053
+ * PubnubChatMessage message.
109054
+ * @member {string} message
109055
+ * @memberof PubnubChatMessage
109056
+ * @instance
109057
+ */
109058
+ PubnubChatMessage.prototype.message = "";
109059
+
109060
+ /**
109061
+ * PubnubChatMessage senderTz.
109062
+ * @member {string} senderTz
109063
+ * @memberof PubnubChatMessage
109064
+ * @instance
109065
+ */
109066
+ PubnubChatMessage.prototype.senderTz = "";
109067
+
109068
+ /**
109069
+ * PubnubChatMessage blockTimestamp.
109070
+ * @member {number|Long} blockTimestamp
109071
+ * @memberof PubnubChatMessage
109072
+ * @instance
109073
+ */
109074
+ PubnubChatMessage.prototype.blockTimestamp = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
109075
+
109076
+ /**
109077
+ * PubnubChatMessage channels.
109078
+ * @member {Array.<string>} channels
109079
+ * @memberof PubnubChatMessage
109080
+ * @instance
109081
+ */
109082
+ PubnubChatMessage.prototype.channels = $util.emptyArray;
109083
+
109084
+ /**
109085
+ * Creates a new PubnubChatMessage instance using the specified properties.
109086
+ * @function create
109087
+ * @memberof PubnubChatMessage
109088
+ * @static
109089
+ * @param {IPubnubChatMessage=} [properties] Properties to set
109090
+ * @returns {PubnubChatMessage} PubnubChatMessage instance
109091
+ */
109092
+ PubnubChatMessage.create = function create(properties) {
109093
+ return new PubnubChatMessage(properties);
109094
+ };
109095
+
109096
+ /**
109097
+ * Encodes the specified PubnubChatMessage message. Does not implicitly {@link PubnubChatMessage.verify|verify} messages.
109098
+ * @function encode
109099
+ * @memberof PubnubChatMessage
109100
+ * @static
109101
+ * @param {IPubnubChatMessage} message PubnubChatMessage message or plain object to encode
109102
+ * @param {$protobuf.Writer} [writer] Writer to encode to
109103
+ * @returns {$protobuf.Writer} Writer
109104
+ */
109105
+ PubnubChatMessage.encode = function encode(message, writer) {
109106
+ if (!writer)
109107
+ writer = $Writer.create();
109108
+ if (message.senderId != null && message.hasOwnProperty("senderId"))
109109
+ writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.senderId);
109110
+ if (message.senderType != null && message.hasOwnProperty("senderType"))
109111
+ writer.uint32(/* id 2, wireType 2 =*/18).string(message.senderType);
109112
+ if (message.id != null && message.hasOwnProperty("id"))
109113
+ writer.uint32(/* id 3, wireType 2 =*/26).string(message.id);
109114
+ if (message.message != null && message.hasOwnProperty("message"))
109115
+ writer.uint32(/* id 4, wireType 2 =*/34).string(message.message);
109116
+ if (message.senderTz != null && message.hasOwnProperty("senderTz"))
109117
+ writer.uint32(/* id 5, wireType 2 =*/42).string(message.senderTz);
109118
+ if (message.blockTimestamp != null && message.hasOwnProperty("blockTimestamp"))
109119
+ writer.uint32(/* id 6, wireType 0 =*/48).uint64(message.blockTimestamp);
109120
+ if (message.channels != null && message.channels.length)
109121
+ for (var i = 0; i < message.channels.length; ++i)
109122
+ writer.uint32(/* id 7, wireType 2 =*/58).string(message.channels[i]);
109123
+ return writer;
109124
+ };
109125
+
109126
+ /**
109127
+ * Encodes the specified PubnubChatMessage message, length delimited. Does not implicitly {@link PubnubChatMessage.verify|verify} messages.
109128
+ * @function encodeDelimited
109129
+ * @memberof PubnubChatMessage
109130
+ * @static
109131
+ * @param {IPubnubChatMessage} message PubnubChatMessage message or plain object to encode
109132
+ * @param {$protobuf.Writer} [writer] Writer to encode to
109133
+ * @returns {$protobuf.Writer} Writer
109134
+ */
109135
+ PubnubChatMessage.encodeDelimited = function encodeDelimited(message, writer) {
109136
+ return this.encode(message, writer).ldelim();
109137
+ };
109138
+
109139
+ /**
109140
+ * Decodes a PubnubChatMessage message from the specified reader or buffer.
109141
+ * @function decode
109142
+ * @memberof PubnubChatMessage
109143
+ * @static
109144
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
109145
+ * @param {number} [length] Message length if known beforehand
109146
+ * @returns {PubnubChatMessage} PubnubChatMessage
109147
+ * @throws {Error} If the payload is not a reader or valid buffer
109148
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
109149
+ */
109150
+ PubnubChatMessage.decode = function decode(reader, length) {
109151
+ if (!(reader instanceof $Reader))
109152
+ reader = $Reader.create(reader);
109153
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.PubnubChatMessage();
109154
+ while (reader.pos < end) {
109155
+ var tag = reader.uint32();
109156
+ switch (tag >>> 3) {
109157
+ case 1:
109158
+ message.senderId = reader.uint32();
109159
+ break;
109160
+ case 2:
109161
+ message.senderType = reader.string();
109162
+ break;
109163
+ case 3:
109164
+ message.id = reader.string();
109165
+ break;
109166
+ case 4:
109167
+ message.message = reader.string();
109168
+ break;
109169
+ case 5:
109170
+ message.senderTz = reader.string();
109171
+ break;
109172
+ case 6:
109173
+ message.blockTimestamp = reader.uint64();
109174
+ break;
109175
+ case 7:
109176
+ if (!(message.channels && message.channels.length))
109177
+ message.channels = [];
109178
+ message.channels.push(reader.string());
109179
+ break;
109180
+ default:
109181
+ reader.skipType(tag & 7);
109182
+ break;
109183
+ }
109184
+ }
109185
+ return message;
109186
+ };
109187
+
109188
+ /**
109189
+ * Decodes a PubnubChatMessage message from the specified reader or buffer, length delimited.
109190
+ * @function decodeDelimited
109191
+ * @memberof PubnubChatMessage
109192
+ * @static
109193
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
109194
+ * @returns {PubnubChatMessage} PubnubChatMessage
109195
+ * @throws {Error} If the payload is not a reader or valid buffer
109196
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
109197
+ */
109198
+ PubnubChatMessage.decodeDelimited = function decodeDelimited(reader) {
109199
+ if (!(reader instanceof $Reader))
109200
+ reader = new $Reader(reader);
109201
+ return this.decode(reader, reader.uint32());
109202
+ };
109203
+
109204
+ /**
109205
+ * Verifies a PubnubChatMessage message.
109206
+ * @function verify
109207
+ * @memberof PubnubChatMessage
109208
+ * @static
109209
+ * @param {Object.<string,*>} message Plain object to verify
109210
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
109211
+ */
109212
+ PubnubChatMessage.verify = function verify(message) {
109213
+ if (typeof message !== "object" || message === null)
109214
+ return "object expected";
109215
+ if (message.senderId != null && message.hasOwnProperty("senderId"))
109216
+ if (!$util.isInteger(message.senderId))
109217
+ return "senderId: integer expected";
109218
+ if (message.senderType != null && message.hasOwnProperty("senderType"))
109219
+ if (!$util.isString(message.senderType))
109220
+ return "senderType: string expected";
109221
+ if (message.id != null && message.hasOwnProperty("id"))
109222
+ if (!$util.isString(message.id))
109223
+ return "id: string expected";
109224
+ if (message.message != null && message.hasOwnProperty("message"))
109225
+ if (!$util.isString(message.message))
109226
+ return "message: string expected";
109227
+ if (message.senderTz != null && message.hasOwnProperty("senderTz"))
109228
+ if (!$util.isString(message.senderTz))
109229
+ return "senderTz: string expected";
109230
+ if (message.blockTimestamp != null && message.hasOwnProperty("blockTimestamp"))
109231
+ if (!$util.isInteger(message.blockTimestamp) && !(message.blockTimestamp && $util.isInteger(message.blockTimestamp.low) && $util.isInteger(message.blockTimestamp.high)))
109232
+ return "blockTimestamp: integer|Long expected";
109233
+ if (message.channels != null && message.hasOwnProperty("channels")) {
109234
+ if (!Array.isArray(message.channels))
109235
+ return "channels: array expected";
109236
+ for (var i = 0; i < message.channels.length; ++i)
109237
+ if (!$util.isString(message.channels[i]))
109238
+ return "channels: string[] expected";
109239
+ }
109240
+ return null;
109241
+ };
109242
+
109243
+ /**
109244
+ * Creates a PubnubChatMessage message from a plain object. Also converts values to their respective internal types.
109245
+ * @function fromObject
109246
+ * @memberof PubnubChatMessage
109247
+ * @static
109248
+ * @param {Object.<string,*>} object Plain object
109249
+ * @returns {PubnubChatMessage} PubnubChatMessage
109250
+ */
109251
+ PubnubChatMessage.fromObject = function fromObject(object) {
109252
+ if (object instanceof $root.PubnubChatMessage)
109253
+ return object;
109254
+ var message = new $root.PubnubChatMessage();
109255
+ if (object.senderId != null)
109256
+ message.senderId = object.senderId >>> 0;
109257
+ if (object.senderType != null)
109258
+ message.senderType = String(object.senderType);
109259
+ if (object.id != null)
109260
+ message.id = String(object.id);
109261
+ if (object.message != null)
109262
+ message.message = String(object.message);
109263
+ if (object.senderTz != null)
109264
+ message.senderTz = String(object.senderTz);
109265
+ if (object.blockTimestamp != null)
109266
+ if ($util.Long)
109267
+ (message.blockTimestamp = $util.Long.fromValue(object.blockTimestamp)).unsigned = true;
109268
+ else if (typeof object.blockTimestamp === "string")
109269
+ message.blockTimestamp = parseInt(object.blockTimestamp, 10);
109270
+ else if (typeof object.blockTimestamp === "number")
109271
+ message.blockTimestamp = object.blockTimestamp;
109272
+ else if (typeof object.blockTimestamp === "object")
109273
+ message.blockTimestamp = new $util.LongBits(object.blockTimestamp.low >>> 0, object.blockTimestamp.high >>> 0).toNumber(true);
109274
+ if (object.channels) {
109275
+ if (!Array.isArray(object.channels))
109276
+ throw TypeError(".PubnubChatMessage.channels: array expected");
109277
+ message.channels = [];
109278
+ for (var i = 0; i < object.channels.length; ++i)
109279
+ message.channels[i] = String(object.channels[i]);
109280
+ }
109281
+ return message;
109282
+ };
109283
+
109284
+ /**
109285
+ * Creates a plain object from a PubnubChatMessage message. Also converts values to other types if specified.
109286
+ * @function toObject
109287
+ * @memberof PubnubChatMessage
109288
+ * @static
109289
+ * @param {PubnubChatMessage} message PubnubChatMessage
109290
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
109291
+ * @returns {Object.<string,*>} Plain object
109292
+ */
109293
+ PubnubChatMessage.toObject = function toObject(message, options) {
109294
+ if (!options)
109295
+ options = {};
109296
+ var object = {};
109297
+ if (options.arrays || options.defaults)
109298
+ object.channels = [];
109299
+ if (options.defaults) {
109300
+ object.senderId = 0;
109301
+ object.senderType = "";
109302
+ object.id = "";
109303
+ object.message = "";
109304
+ object.senderTz = "";
109305
+ if ($util.Long) {
109306
+ var long = new $util.Long(0, 0, true);
109307
+ object.blockTimestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
109308
+ } else
109309
+ object.blockTimestamp = options.longs === String ? "0" : 0;
109310
+ }
109311
+ if (message.senderId != null && message.hasOwnProperty("senderId"))
109312
+ object.senderId = message.senderId;
109313
+ if (message.senderType != null && message.hasOwnProperty("senderType"))
109314
+ object.senderType = message.senderType;
109315
+ if (message.id != null && message.hasOwnProperty("id"))
109316
+ object.id = message.id;
109317
+ if (message.message != null && message.hasOwnProperty("message"))
109318
+ object.message = message.message;
109319
+ if (message.senderTz != null && message.hasOwnProperty("senderTz"))
109320
+ object.senderTz = message.senderTz;
109321
+ if (message.blockTimestamp != null && message.hasOwnProperty("blockTimestamp"))
109322
+ if (typeof message.blockTimestamp === "number")
109323
+ object.blockTimestamp = options.longs === String ? String(message.blockTimestamp) : message.blockTimestamp;
109324
+ else
109325
+ object.blockTimestamp = options.longs === String ? $util.Long.prototype.toString.call(message.blockTimestamp) : options.longs === Number ? new $util.LongBits(message.blockTimestamp.low >>> 0, message.blockTimestamp.high >>> 0).toNumber(true) : message.blockTimestamp;
109326
+ if (message.channels && message.channels.length) {
109327
+ object.channels = [];
109328
+ for (var j = 0; j < message.channels.length; ++j)
109329
+ object.channels[j] = message.channels[j];
109330
+ }
109331
+ return object;
109332
+ };
109333
+
109334
+ /**
109335
+ * Converts this PubnubChatMessage to JSON.
109336
+ * @function toJSON
109337
+ * @memberof PubnubChatMessage
109338
+ * @instance
109339
+ * @returns {Object.<string,*>} JSON object
109340
+ */
109341
+ PubnubChatMessage.prototype.toJSON = function toJSON() {
109342
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
109343
+ };
109344
+
109345
+ return PubnubChatMessage;
109346
+ })();
109347
+
108975
109348
  $root.ReferralSignedUp = (function() {
108976
109349
 
108977
109350
  /**
package/package.json CHANGED
@@ -16,5 +16,5 @@
16
16
  "main": "lib/index.js",
17
17
  "name": "@headspace/protos-events",
18
18
  "typings": "lib/index.d.ts",
19
- "version": "1.381.0"
19
+ "version": "1.383.0"
20
20
  }