@headspace/protos-events 1.386.0 → 1.387.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
@@ -93,6 +93,34 @@ export namespace date {
93
93
  }
94
94
  }
95
95
 
96
+ /** Namespace auth. */
97
+ export namespace auth {
98
+
99
+ /** AuthClientPlatform enum. */
100
+ enum AuthClientPlatform {
101
+ AUTH_CLIENT_PLATFORM_UNKNOWN = 0,
102
+ AUTH_CLIENT_PLATFORM_WEB = 1,
103
+ AUTH_CLIENT_PLATFORM_IOS = 2,
104
+ AUTH_CLIENT_PLATFORM_ANDROID = 3,
105
+ AUTH_CLIENT_PLATFORM_ALEXA = 4,
106
+ AUTH_CLIENT_PLATFORM_GOOGLE_ASSISTANT = 5,
107
+ AUTH_CLIENT_PLATFORM_IOS_WATCH = 6
108
+ }
109
+
110
+ /** AuthClientApp enum. */
111
+ enum AuthClientApp {
112
+ AUTH_CLIENT_APP_UNKNOWN = 0,
113
+ AUTH_CLIENT_APP_HEADSPACE = 1,
114
+ AUTH_CLIENT_APP_GINGER = 2
115
+ }
116
+
117
+ /** AuthLoginTag enum. */
118
+ enum AuthLoginTag {
119
+ AUTH_LOGIN_TAG_UNKNOWN = 0,
120
+ AUTH_LOGIN_TAG_FIRST_LOGIN = 1
121
+ }
122
+ }
123
+
96
124
  /** Namespace auth0. */
97
125
  export namespace auth0 {
98
126
 
@@ -30039,6 +30067,120 @@ export class AssetCreated implements IAssetCreated {
30039
30067
  public toJSON(): { [k: string]: any };
30040
30068
  }
30041
30069
 
30070
+ /** Properties of an AuthLoggedIn. */
30071
+ export interface IAuthLoggedIn {
30072
+
30073
+ /** HSUSER identifier */
30074
+ userId?: (string|null);
30075
+
30076
+ /** epoch millis of login event */
30077
+ timestamp?: (number|Long|null);
30078
+
30079
+ /** client application (e.g. headspace, ginger) */
30080
+ app?: (auth.AuthClientApp|null);
30081
+
30082
+ /** client platform (e.g. ios, android, web) */
30083
+ platform?: (auth.AuthClientPlatform|null);
30084
+
30085
+ /** tags for the login event */
30086
+ tags?: (auth.AuthLoginTag[]|null);
30087
+ }
30088
+
30089
+ /** Signals that a user logged in */
30090
+ export class AuthLoggedIn implements IAuthLoggedIn {
30091
+
30092
+ /**
30093
+ * Constructs a new AuthLoggedIn.
30094
+ * @param [properties] Properties to set
30095
+ */
30096
+ constructor(properties?: IAuthLoggedIn);
30097
+
30098
+ /** HSUSER identifier */
30099
+ public userId: string;
30100
+
30101
+ /** epoch millis of login event */
30102
+ public timestamp: (number|Long);
30103
+
30104
+ /** client application (e.g. headspace, ginger) */
30105
+ public app: auth.AuthClientApp;
30106
+
30107
+ /** client platform (e.g. ios, android, web) */
30108
+ public platform: auth.AuthClientPlatform;
30109
+
30110
+ /** tags for the login event */
30111
+ public tags: auth.AuthLoginTag[];
30112
+
30113
+ /**
30114
+ * Creates a new AuthLoggedIn instance using the specified properties.
30115
+ * @param [properties] Properties to set
30116
+ * @returns AuthLoggedIn instance
30117
+ */
30118
+ public static create(properties?: IAuthLoggedIn): AuthLoggedIn;
30119
+
30120
+ /**
30121
+ * Encodes the specified AuthLoggedIn message. Does not implicitly {@link AuthLoggedIn.verify|verify} messages.
30122
+ * @param message AuthLoggedIn message or plain object to encode
30123
+ * @param [writer] Writer to encode to
30124
+ * @returns Writer
30125
+ */
30126
+ public static encode(message: IAuthLoggedIn, writer?: $protobuf.Writer): $protobuf.Writer;
30127
+
30128
+ /**
30129
+ * Encodes the specified AuthLoggedIn message, length delimited. Does not implicitly {@link AuthLoggedIn.verify|verify} messages.
30130
+ * @param message AuthLoggedIn message or plain object to encode
30131
+ * @param [writer] Writer to encode to
30132
+ * @returns Writer
30133
+ */
30134
+ public static encodeDelimited(message: IAuthLoggedIn, writer?: $protobuf.Writer): $protobuf.Writer;
30135
+
30136
+ /**
30137
+ * Decodes an AuthLoggedIn message from the specified reader or buffer.
30138
+ * @param reader Reader or buffer to decode from
30139
+ * @param [length] Message length if known beforehand
30140
+ * @returns AuthLoggedIn
30141
+ * @throws {Error} If the payload is not a reader or valid buffer
30142
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
30143
+ */
30144
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): AuthLoggedIn;
30145
+
30146
+ /**
30147
+ * Decodes an AuthLoggedIn message from the specified reader or buffer, length delimited.
30148
+ * @param reader Reader or buffer to decode from
30149
+ * @returns AuthLoggedIn
30150
+ * @throws {Error} If the payload is not a reader or valid buffer
30151
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
30152
+ */
30153
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): AuthLoggedIn;
30154
+
30155
+ /**
30156
+ * Verifies an AuthLoggedIn message.
30157
+ * @param message Plain object to verify
30158
+ * @returns `null` if valid, otherwise the reason why it is not
30159
+ */
30160
+ public static verify(message: { [k: string]: any }): (string|null);
30161
+
30162
+ /**
30163
+ * Creates an AuthLoggedIn message from a plain object. Also converts values to their respective internal types.
30164
+ * @param object Plain object
30165
+ * @returns AuthLoggedIn
30166
+ */
30167
+ public static fromObject(object: { [k: string]: any }): AuthLoggedIn;
30168
+
30169
+ /**
30170
+ * Creates a plain object from an AuthLoggedIn message. Also converts values to other types if specified.
30171
+ * @param message AuthLoggedIn
30172
+ * @param [options] Conversion options
30173
+ * @returns Plain object
30174
+ */
30175
+ public static toObject(message: AuthLoggedIn, options?: $protobuf.IConversionOptions): { [k: string]: any };
30176
+
30177
+ /**
30178
+ * Converts this AuthLoggedIn to JSON.
30179
+ * @returns JSON object
30180
+ */
30181
+ public toJSON(): { [k: string]: any };
30182
+ }
30183
+
30042
30184
  /** Properties of an OrganizationCreated. */
30043
30185
  export interface IOrganizationCreated {
30044
30186
 
package/lib/index.js CHANGED
@@ -222,6 +222,72 @@ $root.date = (function() {
222
222
  return date;
223
223
  })();
224
224
 
225
+ $root.auth = (function() {
226
+
227
+ /**
228
+ * Namespace auth.
229
+ * @exports auth
230
+ * @namespace
231
+ */
232
+ var auth = {};
233
+
234
+ /**
235
+ * AuthClientPlatform enum.
236
+ * @name auth.AuthClientPlatform
237
+ * @enum {string}
238
+ * @property {number} AUTH_CLIENT_PLATFORM_UNKNOWN=0 AUTH_CLIENT_PLATFORM_UNKNOWN value
239
+ * @property {number} AUTH_CLIENT_PLATFORM_WEB=1 AUTH_CLIENT_PLATFORM_WEB value
240
+ * @property {number} AUTH_CLIENT_PLATFORM_IOS=2 AUTH_CLIENT_PLATFORM_IOS value
241
+ * @property {number} AUTH_CLIENT_PLATFORM_ANDROID=3 AUTH_CLIENT_PLATFORM_ANDROID value
242
+ * @property {number} AUTH_CLIENT_PLATFORM_ALEXA=4 AUTH_CLIENT_PLATFORM_ALEXA value
243
+ * @property {number} AUTH_CLIENT_PLATFORM_GOOGLE_ASSISTANT=5 AUTH_CLIENT_PLATFORM_GOOGLE_ASSISTANT value
244
+ * @property {number} AUTH_CLIENT_PLATFORM_IOS_WATCH=6 AUTH_CLIENT_PLATFORM_IOS_WATCH value
245
+ */
246
+ auth.AuthClientPlatform = (function() {
247
+ var valuesById = {}, values = Object.create(valuesById);
248
+ values[valuesById[0] = "AUTH_CLIENT_PLATFORM_UNKNOWN"] = 0;
249
+ values[valuesById[1] = "AUTH_CLIENT_PLATFORM_WEB"] = 1;
250
+ values[valuesById[2] = "AUTH_CLIENT_PLATFORM_IOS"] = 2;
251
+ values[valuesById[3] = "AUTH_CLIENT_PLATFORM_ANDROID"] = 3;
252
+ values[valuesById[4] = "AUTH_CLIENT_PLATFORM_ALEXA"] = 4;
253
+ values[valuesById[5] = "AUTH_CLIENT_PLATFORM_GOOGLE_ASSISTANT"] = 5;
254
+ values[valuesById[6] = "AUTH_CLIENT_PLATFORM_IOS_WATCH"] = 6;
255
+ return values;
256
+ })();
257
+
258
+ /**
259
+ * AuthClientApp enum.
260
+ * @name auth.AuthClientApp
261
+ * @enum {string}
262
+ * @property {number} AUTH_CLIENT_APP_UNKNOWN=0 AUTH_CLIENT_APP_UNKNOWN value
263
+ * @property {number} AUTH_CLIENT_APP_HEADSPACE=1 AUTH_CLIENT_APP_HEADSPACE value
264
+ * @property {number} AUTH_CLIENT_APP_GINGER=2 AUTH_CLIENT_APP_GINGER value
265
+ */
266
+ auth.AuthClientApp = (function() {
267
+ var valuesById = {}, values = Object.create(valuesById);
268
+ values[valuesById[0] = "AUTH_CLIENT_APP_UNKNOWN"] = 0;
269
+ values[valuesById[1] = "AUTH_CLIENT_APP_HEADSPACE"] = 1;
270
+ values[valuesById[2] = "AUTH_CLIENT_APP_GINGER"] = 2;
271
+ return values;
272
+ })();
273
+
274
+ /**
275
+ * AuthLoginTag enum.
276
+ * @name auth.AuthLoginTag
277
+ * @enum {string}
278
+ * @property {number} AUTH_LOGIN_TAG_UNKNOWN=0 AUTH_LOGIN_TAG_UNKNOWN value
279
+ * @property {number} AUTH_LOGIN_TAG_FIRST_LOGIN=1 AUTH_LOGIN_TAG_FIRST_LOGIN value
280
+ */
281
+ auth.AuthLoginTag = (function() {
282
+ var valuesById = {}, values = Object.create(valuesById);
283
+ values[valuesById[0] = "AUTH_LOGIN_TAG_UNKNOWN"] = 0;
284
+ values[valuesById[1] = "AUTH_LOGIN_TAG_FIRST_LOGIN"] = 1;
285
+ return values;
286
+ })();
287
+
288
+ return auth;
289
+ })();
290
+
225
291
  $root.auth0 = (function() {
226
292
 
227
293
  /**
@@ -83677,6 +83743,392 @@ $root.AssetCreated = (function() {
83677
83743
  return AssetCreated;
83678
83744
  })();
83679
83745
 
83746
+ $root.AuthLoggedIn = (function() {
83747
+
83748
+ /**
83749
+ * Properties of an AuthLoggedIn.
83750
+ * @exports IAuthLoggedIn
83751
+ * @interface IAuthLoggedIn
83752
+ * @property {string|null} [userId] HSUSER identifier
83753
+ * @property {number|Long|null} [timestamp] epoch millis of login event
83754
+ * @property {auth.AuthClientApp|null} [app] client application (e.g. headspace, ginger)
83755
+ * @property {auth.AuthClientPlatform|null} [platform] client platform (e.g. ios, android, web)
83756
+ * @property {Array.<auth.AuthLoginTag>|null} [tags] tags for the login event
83757
+ */
83758
+
83759
+ /**
83760
+ * Constructs a new AuthLoggedIn.
83761
+ * @exports AuthLoggedIn
83762
+ * @classdesc Signals that a user logged in
83763
+ * @implements IAuthLoggedIn
83764
+ * @constructor
83765
+ * @param {IAuthLoggedIn=} [properties] Properties to set
83766
+ */
83767
+ function AuthLoggedIn(properties) {
83768
+ this.tags = [];
83769
+ if (properties)
83770
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
83771
+ if (properties[keys[i]] != null)
83772
+ this[keys[i]] = properties[keys[i]];
83773
+ }
83774
+
83775
+ /**
83776
+ * HSUSER identifier
83777
+ * @member {string} userId
83778
+ * @memberof AuthLoggedIn
83779
+ * @instance
83780
+ */
83781
+ AuthLoggedIn.prototype.userId = "";
83782
+
83783
+ /**
83784
+ * epoch millis of login event
83785
+ * @member {number|Long} timestamp
83786
+ * @memberof AuthLoggedIn
83787
+ * @instance
83788
+ */
83789
+ AuthLoggedIn.prototype.timestamp = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
83790
+
83791
+ /**
83792
+ * client application (e.g. headspace, ginger)
83793
+ * @member {auth.AuthClientApp} app
83794
+ * @memberof AuthLoggedIn
83795
+ * @instance
83796
+ */
83797
+ AuthLoggedIn.prototype.app = 0;
83798
+
83799
+ /**
83800
+ * client platform (e.g. ios, android, web)
83801
+ * @member {auth.AuthClientPlatform} platform
83802
+ * @memberof AuthLoggedIn
83803
+ * @instance
83804
+ */
83805
+ AuthLoggedIn.prototype.platform = 0;
83806
+
83807
+ /**
83808
+ * tags for the login event
83809
+ * @member {Array.<auth.AuthLoginTag>} tags
83810
+ * @memberof AuthLoggedIn
83811
+ * @instance
83812
+ */
83813
+ AuthLoggedIn.prototype.tags = $util.emptyArray;
83814
+
83815
+ /**
83816
+ * Creates a new AuthLoggedIn instance using the specified properties.
83817
+ * @function create
83818
+ * @memberof AuthLoggedIn
83819
+ * @static
83820
+ * @param {IAuthLoggedIn=} [properties] Properties to set
83821
+ * @returns {AuthLoggedIn} AuthLoggedIn instance
83822
+ */
83823
+ AuthLoggedIn.create = function create(properties) {
83824
+ return new AuthLoggedIn(properties);
83825
+ };
83826
+
83827
+ /**
83828
+ * Encodes the specified AuthLoggedIn message. Does not implicitly {@link AuthLoggedIn.verify|verify} messages.
83829
+ * @function encode
83830
+ * @memberof AuthLoggedIn
83831
+ * @static
83832
+ * @param {IAuthLoggedIn} message AuthLoggedIn message or plain object to encode
83833
+ * @param {$protobuf.Writer} [writer] Writer to encode to
83834
+ * @returns {$protobuf.Writer} Writer
83835
+ */
83836
+ AuthLoggedIn.encode = function encode(message, writer) {
83837
+ if (!writer)
83838
+ writer = $Writer.create();
83839
+ if (message.userId != null && message.hasOwnProperty("userId"))
83840
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.userId);
83841
+ if (message.timestamp != null && message.hasOwnProperty("timestamp"))
83842
+ writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.timestamp);
83843
+ if (message.app != null && message.hasOwnProperty("app"))
83844
+ writer.uint32(/* id 3, wireType 0 =*/24).int32(message.app);
83845
+ if (message.platform != null && message.hasOwnProperty("platform"))
83846
+ writer.uint32(/* id 4, wireType 0 =*/32).int32(message.platform);
83847
+ if (message.tags != null && message.tags.length) {
83848
+ writer.uint32(/* id 5, wireType 2 =*/42).fork();
83849
+ for (var i = 0; i < message.tags.length; ++i)
83850
+ writer.int32(message.tags[i]);
83851
+ writer.ldelim();
83852
+ }
83853
+ return writer;
83854
+ };
83855
+
83856
+ /**
83857
+ * Encodes the specified AuthLoggedIn message, length delimited. Does not implicitly {@link AuthLoggedIn.verify|verify} messages.
83858
+ * @function encodeDelimited
83859
+ * @memberof AuthLoggedIn
83860
+ * @static
83861
+ * @param {IAuthLoggedIn} message AuthLoggedIn message or plain object to encode
83862
+ * @param {$protobuf.Writer} [writer] Writer to encode to
83863
+ * @returns {$protobuf.Writer} Writer
83864
+ */
83865
+ AuthLoggedIn.encodeDelimited = function encodeDelimited(message, writer) {
83866
+ return this.encode(message, writer).ldelim();
83867
+ };
83868
+
83869
+ /**
83870
+ * Decodes an AuthLoggedIn message from the specified reader or buffer.
83871
+ * @function decode
83872
+ * @memberof AuthLoggedIn
83873
+ * @static
83874
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
83875
+ * @param {number} [length] Message length if known beforehand
83876
+ * @returns {AuthLoggedIn} AuthLoggedIn
83877
+ * @throws {Error} If the payload is not a reader or valid buffer
83878
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
83879
+ */
83880
+ AuthLoggedIn.decode = function decode(reader, length) {
83881
+ if (!(reader instanceof $Reader))
83882
+ reader = $Reader.create(reader);
83883
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.AuthLoggedIn();
83884
+ while (reader.pos < end) {
83885
+ var tag = reader.uint32();
83886
+ switch (tag >>> 3) {
83887
+ case 1:
83888
+ message.userId = reader.string();
83889
+ break;
83890
+ case 2:
83891
+ message.timestamp = reader.uint64();
83892
+ break;
83893
+ case 3:
83894
+ message.app = reader.int32();
83895
+ break;
83896
+ case 4:
83897
+ message.platform = reader.int32();
83898
+ break;
83899
+ case 5:
83900
+ if (!(message.tags && message.tags.length))
83901
+ message.tags = [];
83902
+ if ((tag & 7) === 2) {
83903
+ var end2 = reader.uint32() + reader.pos;
83904
+ while (reader.pos < end2)
83905
+ message.tags.push(reader.int32());
83906
+ } else
83907
+ message.tags.push(reader.int32());
83908
+ break;
83909
+ default:
83910
+ reader.skipType(tag & 7);
83911
+ break;
83912
+ }
83913
+ }
83914
+ return message;
83915
+ };
83916
+
83917
+ /**
83918
+ * Decodes an AuthLoggedIn message from the specified reader or buffer, length delimited.
83919
+ * @function decodeDelimited
83920
+ * @memberof AuthLoggedIn
83921
+ * @static
83922
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
83923
+ * @returns {AuthLoggedIn} AuthLoggedIn
83924
+ * @throws {Error} If the payload is not a reader or valid buffer
83925
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
83926
+ */
83927
+ AuthLoggedIn.decodeDelimited = function decodeDelimited(reader) {
83928
+ if (!(reader instanceof $Reader))
83929
+ reader = new $Reader(reader);
83930
+ return this.decode(reader, reader.uint32());
83931
+ };
83932
+
83933
+ /**
83934
+ * Verifies an AuthLoggedIn message.
83935
+ * @function verify
83936
+ * @memberof AuthLoggedIn
83937
+ * @static
83938
+ * @param {Object.<string,*>} message Plain object to verify
83939
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
83940
+ */
83941
+ AuthLoggedIn.verify = function verify(message) {
83942
+ if (typeof message !== "object" || message === null)
83943
+ return "object expected";
83944
+ if (message.userId != null && message.hasOwnProperty("userId"))
83945
+ if (!$util.isString(message.userId))
83946
+ return "userId: string expected";
83947
+ if (message.timestamp != null && message.hasOwnProperty("timestamp"))
83948
+ if (!$util.isInteger(message.timestamp) && !(message.timestamp && $util.isInteger(message.timestamp.low) && $util.isInteger(message.timestamp.high)))
83949
+ return "timestamp: integer|Long expected";
83950
+ if (message.app != null && message.hasOwnProperty("app"))
83951
+ switch (message.app) {
83952
+ default:
83953
+ return "app: enum value expected";
83954
+ case 0:
83955
+ case 1:
83956
+ case 2:
83957
+ break;
83958
+ }
83959
+ if (message.platform != null && message.hasOwnProperty("platform"))
83960
+ switch (message.platform) {
83961
+ default:
83962
+ return "platform: enum value expected";
83963
+ case 0:
83964
+ case 1:
83965
+ case 2:
83966
+ case 3:
83967
+ case 4:
83968
+ case 5:
83969
+ case 6:
83970
+ break;
83971
+ }
83972
+ if (message.tags != null && message.hasOwnProperty("tags")) {
83973
+ if (!Array.isArray(message.tags))
83974
+ return "tags: array expected";
83975
+ for (var i = 0; i < message.tags.length; ++i)
83976
+ switch (message.tags[i]) {
83977
+ default:
83978
+ return "tags: enum value[] expected";
83979
+ case 0:
83980
+ case 1:
83981
+ break;
83982
+ }
83983
+ }
83984
+ return null;
83985
+ };
83986
+
83987
+ /**
83988
+ * Creates an AuthLoggedIn message from a plain object. Also converts values to their respective internal types.
83989
+ * @function fromObject
83990
+ * @memberof AuthLoggedIn
83991
+ * @static
83992
+ * @param {Object.<string,*>} object Plain object
83993
+ * @returns {AuthLoggedIn} AuthLoggedIn
83994
+ */
83995
+ AuthLoggedIn.fromObject = function fromObject(object) {
83996
+ if (object instanceof $root.AuthLoggedIn)
83997
+ return object;
83998
+ var message = new $root.AuthLoggedIn();
83999
+ if (object.userId != null)
84000
+ message.userId = String(object.userId);
84001
+ if (object.timestamp != null)
84002
+ if ($util.Long)
84003
+ (message.timestamp = $util.Long.fromValue(object.timestamp)).unsigned = true;
84004
+ else if (typeof object.timestamp === "string")
84005
+ message.timestamp = parseInt(object.timestamp, 10);
84006
+ else if (typeof object.timestamp === "number")
84007
+ message.timestamp = object.timestamp;
84008
+ else if (typeof object.timestamp === "object")
84009
+ message.timestamp = new $util.LongBits(object.timestamp.low >>> 0, object.timestamp.high >>> 0).toNumber(true);
84010
+ switch (object.app) {
84011
+ case "AUTH_CLIENT_APP_UNKNOWN":
84012
+ case 0:
84013
+ message.app = 0;
84014
+ break;
84015
+ case "AUTH_CLIENT_APP_HEADSPACE":
84016
+ case 1:
84017
+ message.app = 1;
84018
+ break;
84019
+ case "AUTH_CLIENT_APP_GINGER":
84020
+ case 2:
84021
+ message.app = 2;
84022
+ break;
84023
+ }
84024
+ switch (object.platform) {
84025
+ case "AUTH_CLIENT_PLATFORM_UNKNOWN":
84026
+ case 0:
84027
+ message.platform = 0;
84028
+ break;
84029
+ case "AUTH_CLIENT_PLATFORM_WEB":
84030
+ case 1:
84031
+ message.platform = 1;
84032
+ break;
84033
+ case "AUTH_CLIENT_PLATFORM_IOS":
84034
+ case 2:
84035
+ message.platform = 2;
84036
+ break;
84037
+ case "AUTH_CLIENT_PLATFORM_ANDROID":
84038
+ case 3:
84039
+ message.platform = 3;
84040
+ break;
84041
+ case "AUTH_CLIENT_PLATFORM_ALEXA":
84042
+ case 4:
84043
+ message.platform = 4;
84044
+ break;
84045
+ case "AUTH_CLIENT_PLATFORM_GOOGLE_ASSISTANT":
84046
+ case 5:
84047
+ message.platform = 5;
84048
+ break;
84049
+ case "AUTH_CLIENT_PLATFORM_IOS_WATCH":
84050
+ case 6:
84051
+ message.platform = 6;
84052
+ break;
84053
+ }
84054
+ if (object.tags) {
84055
+ if (!Array.isArray(object.tags))
84056
+ throw TypeError(".AuthLoggedIn.tags: array expected");
84057
+ message.tags = [];
84058
+ for (var i = 0; i < object.tags.length; ++i)
84059
+ switch (object.tags[i]) {
84060
+ default:
84061
+ case "AUTH_LOGIN_TAG_UNKNOWN":
84062
+ case 0:
84063
+ message.tags[i] = 0;
84064
+ break;
84065
+ case "AUTH_LOGIN_TAG_FIRST_LOGIN":
84066
+ case 1:
84067
+ message.tags[i] = 1;
84068
+ break;
84069
+ }
84070
+ }
84071
+ return message;
84072
+ };
84073
+
84074
+ /**
84075
+ * Creates a plain object from an AuthLoggedIn message. Also converts values to other types if specified.
84076
+ * @function toObject
84077
+ * @memberof AuthLoggedIn
84078
+ * @static
84079
+ * @param {AuthLoggedIn} message AuthLoggedIn
84080
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
84081
+ * @returns {Object.<string,*>} Plain object
84082
+ */
84083
+ AuthLoggedIn.toObject = function toObject(message, options) {
84084
+ if (!options)
84085
+ options = {};
84086
+ var object = {};
84087
+ if (options.arrays || options.defaults)
84088
+ object.tags = [];
84089
+ if (options.defaults) {
84090
+ object.userId = "";
84091
+ if ($util.Long) {
84092
+ var long = new $util.Long(0, 0, true);
84093
+ object.timestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
84094
+ } else
84095
+ object.timestamp = options.longs === String ? "0" : 0;
84096
+ object.app = options.enums === String ? "AUTH_CLIENT_APP_UNKNOWN" : 0;
84097
+ object.platform = options.enums === String ? "AUTH_CLIENT_PLATFORM_UNKNOWN" : 0;
84098
+ }
84099
+ if (message.userId != null && message.hasOwnProperty("userId"))
84100
+ object.userId = message.userId;
84101
+ if (message.timestamp != null && message.hasOwnProperty("timestamp"))
84102
+ if (typeof message.timestamp === "number")
84103
+ object.timestamp = options.longs === String ? String(message.timestamp) : message.timestamp;
84104
+ else
84105
+ object.timestamp = options.longs === String ? $util.Long.prototype.toString.call(message.timestamp) : options.longs === Number ? new $util.LongBits(message.timestamp.low >>> 0, message.timestamp.high >>> 0).toNumber(true) : message.timestamp;
84106
+ if (message.app != null && message.hasOwnProperty("app"))
84107
+ object.app = options.enums === String ? $root.auth.AuthClientApp[message.app] : message.app;
84108
+ if (message.platform != null && message.hasOwnProperty("platform"))
84109
+ object.platform = options.enums === String ? $root.auth.AuthClientPlatform[message.platform] : message.platform;
84110
+ if (message.tags && message.tags.length) {
84111
+ object.tags = [];
84112
+ for (var j = 0; j < message.tags.length; ++j)
84113
+ object.tags[j] = options.enums === String ? $root.auth.AuthLoginTag[message.tags[j]] : message.tags[j];
84114
+ }
84115
+ return object;
84116
+ };
84117
+
84118
+ /**
84119
+ * Converts this AuthLoggedIn to JSON.
84120
+ * @function toJSON
84121
+ * @memberof AuthLoggedIn
84122
+ * @instance
84123
+ * @returns {Object.<string,*>} JSON object
84124
+ */
84125
+ AuthLoggedIn.prototype.toJSON = function toJSON() {
84126
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
84127
+ };
84128
+
84129
+ return AuthLoggedIn;
84130
+ })();
84131
+
83680
84132
  $root.OrganizationCreated = (function() {
83681
84133
 
83682
84134
  /**
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.386.0"
19
+ "version": "1.387.0"
20
20
  }