@headspace/protos-events 1.385.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
 
@@ -147,7 +175,8 @@ export namespace auth0 {
147
175
  SMSASSIST_OKTA_SSO = 22,
148
176
  BOOKINGHOLDINGS_OKTA_SSO = 23,
149
177
  MSFT_TEST_AZURE_SSO = 24,
150
- CITADEL_OKTA_SSO = 25
178
+ CITADEL_OKTA_SSO = 25,
179
+ HEADSPACE_E2E_OKTA_SSO = 26
151
180
  }
152
181
 
153
182
  /** ConnectionType enum. */
@@ -30038,6 +30067,120 @@ export class AssetCreated implements IAssetCreated {
30038
30067
  public toJSON(): { [k: string]: any };
30039
30068
  }
30040
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
+
30041
30184
  /** Properties of an OrganizationCreated. */
30042
30185
  export interface IOrganizationCreated {
30043
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
  /**
@@ -318,6 +384,7 @@ $root.auth0 = (function() {
318
384
  * @property {number} BOOKINGHOLDINGS_OKTA_SSO=23 BOOKINGHOLDINGS_OKTA_SSO value
319
385
  * @property {number} MSFT_TEST_AZURE_SSO=24 MSFT_TEST_AZURE_SSO value
320
386
  * @property {number} CITADEL_OKTA_SSO=25 CITADEL_OKTA_SSO value
387
+ * @property {number} HEADSPACE_E2E_OKTA_SSO=26 HEADSPACE_E2E_OKTA_SSO value
321
388
  */
322
389
  connections.Connection = (function() {
323
390
  var valuesById = {}, values = Object.create(valuesById);
@@ -347,6 +414,7 @@ $root.auth0 = (function() {
347
414
  values[valuesById[23] = "BOOKINGHOLDINGS_OKTA_SSO"] = 23;
348
415
  values[valuesById[24] = "MSFT_TEST_AZURE_SSO"] = 24;
349
416
  values[valuesById[25] = "CITADEL_OKTA_SSO"] = 25;
417
+ values[valuesById[26] = "HEADSPACE_E2E_OKTA_SSO"] = 26;
350
418
  return values;
351
419
  })();
352
420
 
@@ -32061,6 +32129,7 @@ $root.SuccessfulUserLogin = (function() {
32061
32129
  case 23:
32062
32130
  case 24:
32063
32131
  case 25:
32132
+ case 26:
32064
32133
  break;
32065
32134
  }
32066
32135
  return null;
@@ -32248,6 +32317,10 @@ $root.SuccessfulUserLogin = (function() {
32248
32317
  case 25:
32249
32318
  message.connection = 25;
32250
32319
  break;
32320
+ case "HEADSPACE_E2E_OKTA_SSO":
32321
+ case 26:
32322
+ message.connection = 26;
32323
+ break;
32251
32324
  }
32252
32325
  return message;
32253
32326
  };
@@ -32494,6 +32567,7 @@ $root.UnlinkedConnection = (function() {
32494
32567
  case 23:
32495
32568
  case 24:
32496
32569
  case 25:
32570
+ case 26:
32497
32571
  break;
32498
32572
  }
32499
32573
  if (message.unlinkedAt != null && message.hasOwnProperty("unlinkedAt"))
@@ -32621,6 +32695,10 @@ $root.UnlinkedConnection = (function() {
32621
32695
  case 25:
32622
32696
  message.connection = 25;
32623
32697
  break;
32698
+ case "HEADSPACE_E2E_OKTA_SSO":
32699
+ case 26:
32700
+ message.connection = 26;
32701
+ break;
32624
32702
  }
32625
32703
  if (object.unlinkedAt != null)
32626
32704
  if ($util.Long)
@@ -32915,6 +32993,7 @@ $root.ConnectionLinked = (function() {
32915
32993
  case 23:
32916
32994
  case 24:
32917
32995
  case 25:
32996
+ case 26:
32918
32997
  break;
32919
32998
  }
32920
32999
  if (message.linkedAt != null && message.hasOwnProperty("linkedAt"))
@@ -33058,6 +33137,10 @@ $root.ConnectionLinked = (function() {
33058
33137
  case 25:
33059
33138
  message.connection = 25;
33060
33139
  break;
33140
+ case "HEADSPACE_E2E_OKTA_SSO":
33141
+ case 26:
33142
+ message.connection = 26;
33143
+ break;
33061
33144
  }
33062
33145
  if (object.linkedAt != null)
33063
33146
  if ($util.Long)
@@ -83660,6 +83743,392 @@ $root.AssetCreated = (function() {
83660
83743
  return AssetCreated;
83661
83744
  })();
83662
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
+
83663
84132
  $root.OrganizationCreated = (function() {
83664
84133
 
83665
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.385.0"
19
+ "version": "1.387.0"
20
20
  }