@headspace/protos-events 1.386.0 → 1.388.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.
Files changed (3) hide show
  1. package/lib/index.d.ts +142 -1
  2. package/lib/index.js +452 -17
  3. package/package.json +1 -1
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
 
@@ -130,7 +158,6 @@ export namespace auth0 {
130
158
  USER_PASSWORD_HEADSPACE = 5,
131
159
  VIRGINPULSE = 6,
132
160
  GOOGLE = 7,
133
- TEST_OKTA_SSO = 8,
134
161
  HEADSPACE_OKTA_SSO = 9,
135
162
  EXTERNAL_OKTA_QA = 10,
136
163
  THOUGHTWORKS_OKTA_SSO = 11,
@@ -30039,6 +30066,120 @@ export class AssetCreated implements IAssetCreated {
30039
30066
  public toJSON(): { [k: string]: any };
30040
30067
  }
30041
30068
 
30069
+ /** Properties of an AuthLoggedIn. */
30070
+ export interface IAuthLoggedIn {
30071
+
30072
+ /** HSUSER identifier */
30073
+ userId?: (string|null);
30074
+
30075
+ /** epoch millis of login event */
30076
+ timestamp?: (number|Long|null);
30077
+
30078
+ /** client application (e.g. headspace, ginger) */
30079
+ app?: (auth.AuthClientApp|null);
30080
+
30081
+ /** client platform (e.g. ios, android, web) */
30082
+ platform?: (auth.AuthClientPlatform|null);
30083
+
30084
+ /** tags for the login event */
30085
+ tags?: (auth.AuthLoginTag[]|null);
30086
+ }
30087
+
30088
+ /** Signals that a user logged in */
30089
+ export class AuthLoggedIn implements IAuthLoggedIn {
30090
+
30091
+ /**
30092
+ * Constructs a new AuthLoggedIn.
30093
+ * @param [properties] Properties to set
30094
+ */
30095
+ constructor(properties?: IAuthLoggedIn);
30096
+
30097
+ /** HSUSER identifier */
30098
+ public userId: string;
30099
+
30100
+ /** epoch millis of login event */
30101
+ public timestamp: (number|Long);
30102
+
30103
+ /** client application (e.g. headspace, ginger) */
30104
+ public app: auth.AuthClientApp;
30105
+
30106
+ /** client platform (e.g. ios, android, web) */
30107
+ public platform: auth.AuthClientPlatform;
30108
+
30109
+ /** tags for the login event */
30110
+ public tags: auth.AuthLoginTag[];
30111
+
30112
+ /**
30113
+ * Creates a new AuthLoggedIn instance using the specified properties.
30114
+ * @param [properties] Properties to set
30115
+ * @returns AuthLoggedIn instance
30116
+ */
30117
+ public static create(properties?: IAuthLoggedIn): AuthLoggedIn;
30118
+
30119
+ /**
30120
+ * Encodes the specified AuthLoggedIn message. Does not implicitly {@link AuthLoggedIn.verify|verify} messages.
30121
+ * @param message AuthLoggedIn message or plain object to encode
30122
+ * @param [writer] Writer to encode to
30123
+ * @returns Writer
30124
+ */
30125
+ public static encode(message: IAuthLoggedIn, writer?: $protobuf.Writer): $protobuf.Writer;
30126
+
30127
+ /**
30128
+ * Encodes the specified AuthLoggedIn message, length delimited. Does not implicitly {@link AuthLoggedIn.verify|verify} messages.
30129
+ * @param message AuthLoggedIn message or plain object to encode
30130
+ * @param [writer] Writer to encode to
30131
+ * @returns Writer
30132
+ */
30133
+ public static encodeDelimited(message: IAuthLoggedIn, writer?: $protobuf.Writer): $protobuf.Writer;
30134
+
30135
+ /**
30136
+ * Decodes an AuthLoggedIn message from the specified reader or buffer.
30137
+ * @param reader Reader or buffer to decode from
30138
+ * @param [length] Message length if known beforehand
30139
+ * @returns AuthLoggedIn
30140
+ * @throws {Error} If the payload is not a reader or valid buffer
30141
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
30142
+ */
30143
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): AuthLoggedIn;
30144
+
30145
+ /**
30146
+ * Decodes an AuthLoggedIn message from the specified reader or buffer, length delimited.
30147
+ * @param reader Reader or buffer to decode from
30148
+ * @returns AuthLoggedIn
30149
+ * @throws {Error} If the payload is not a reader or valid buffer
30150
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
30151
+ */
30152
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): AuthLoggedIn;
30153
+
30154
+ /**
30155
+ * Verifies an AuthLoggedIn message.
30156
+ * @param message Plain object to verify
30157
+ * @returns `null` if valid, otherwise the reason why it is not
30158
+ */
30159
+ public static verify(message: { [k: string]: any }): (string|null);
30160
+
30161
+ /**
30162
+ * Creates an AuthLoggedIn message from a plain object. Also converts values to their respective internal types.
30163
+ * @param object Plain object
30164
+ * @returns AuthLoggedIn
30165
+ */
30166
+ public static fromObject(object: { [k: string]: any }): AuthLoggedIn;
30167
+
30168
+ /**
30169
+ * Creates a plain object from an AuthLoggedIn message. Also converts values to other types if specified.
30170
+ * @param message AuthLoggedIn
30171
+ * @param [options] Conversion options
30172
+ * @returns Plain object
30173
+ */
30174
+ public static toObject(message: AuthLoggedIn, options?: $protobuf.IConversionOptions): { [k: string]: any };
30175
+
30176
+ /**
30177
+ * Converts this AuthLoggedIn to JSON.
30178
+ * @returns JSON object
30179
+ */
30180
+ public toJSON(): { [k: string]: any };
30181
+ }
30182
+
30042
30183
  /** Properties of an OrganizationCreated. */
30043
30184
  export interface IOrganizationCreated {
30044
30185
 
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
  /**
@@ -300,7 +366,6 @@ $root.auth0 = (function() {
300
366
  * @property {number} USER_PASSWORD_HEADSPACE=5 USER_PASSWORD_HEADSPACE value
301
367
  * @property {number} VIRGINPULSE=6 VIRGINPULSE value
302
368
  * @property {number} GOOGLE=7 GOOGLE value
303
- * @property {number} TEST_OKTA_SSO=8 TEST_OKTA_SSO value
304
369
  * @property {number} HEADSPACE_OKTA_SSO=9 HEADSPACE_OKTA_SSO value
305
370
  * @property {number} EXTERNAL_OKTA_QA=10 EXTERNAL_OKTA_QA value
306
371
  * @property {number} THOUGHTWORKS_OKTA_SSO=11 THOUGHTWORKS_OKTA_SSO value
@@ -330,7 +395,6 @@ $root.auth0 = (function() {
330
395
  values[valuesById[5] = "USER_PASSWORD_HEADSPACE"] = 5;
331
396
  values[valuesById[6] = "VIRGINPULSE"] = 6;
332
397
  values[valuesById[7] = "GOOGLE"] = 7;
333
- values[valuesById[8] = "TEST_OKTA_SSO"] = 8;
334
398
  values[valuesById[9] = "HEADSPACE_OKTA_SSO"] = 9;
335
399
  values[valuesById[10] = "EXTERNAL_OKTA_QA"] = 10;
336
400
  values[valuesById[11] = "THOUGHTWORKS_OKTA_SSO"] = 11;
@@ -32045,7 +32109,6 @@ $root.SuccessfulUserLogin = (function() {
32045
32109
  case 5:
32046
32110
  case 6:
32047
32111
  case 7:
32048
- case 8:
32049
32112
  case 9:
32050
32113
  case 10:
32051
32114
  case 11:
@@ -32179,10 +32242,6 @@ $root.SuccessfulUserLogin = (function() {
32179
32242
  case 7:
32180
32243
  message.connection = 7;
32181
32244
  break;
32182
- case "TEST_OKTA_SSO":
32183
- case 8:
32184
- message.connection = 8;
32185
- break;
32186
32245
  case "HEADSPACE_OKTA_SSO":
32187
32246
  case 9:
32188
32247
  message.connection = 9;
@@ -32483,7 +32542,6 @@ $root.UnlinkedConnection = (function() {
32483
32542
  case 5:
32484
32543
  case 6:
32485
32544
  case 7:
32486
- case 8:
32487
32545
  case 9:
32488
32546
  case 10:
32489
32547
  case 11:
@@ -32557,10 +32615,6 @@ $root.UnlinkedConnection = (function() {
32557
32615
  case 7:
32558
32616
  message.connection = 7;
32559
32617
  break;
32560
- case "TEST_OKTA_SSO":
32561
- case 8:
32562
- message.connection = 8;
32563
- break;
32564
32618
  case "HEADSPACE_OKTA_SSO":
32565
32619
  case 9:
32566
32620
  message.connection = 9;
@@ -32909,7 +32963,6 @@ $root.ConnectionLinked = (function() {
32909
32963
  case 5:
32910
32964
  case 6:
32911
32965
  case 7:
32912
- case 8:
32913
32966
  case 9:
32914
32967
  case 10:
32915
32968
  case 11:
@@ -32999,10 +33052,6 @@ $root.ConnectionLinked = (function() {
32999
33052
  case 7:
33000
33053
  message.connection = 7;
33001
33054
  break;
33002
- case "TEST_OKTA_SSO":
33003
- case 8:
33004
- message.connection = 8;
33005
- break;
33006
33055
  case "HEADSPACE_OKTA_SSO":
33007
33056
  case 9:
33008
33057
  message.connection = 9;
@@ -83677,6 +83726,392 @@ $root.AssetCreated = (function() {
83677
83726
  return AssetCreated;
83678
83727
  })();
83679
83728
 
83729
+ $root.AuthLoggedIn = (function() {
83730
+
83731
+ /**
83732
+ * Properties of an AuthLoggedIn.
83733
+ * @exports IAuthLoggedIn
83734
+ * @interface IAuthLoggedIn
83735
+ * @property {string|null} [userId] HSUSER identifier
83736
+ * @property {number|Long|null} [timestamp] epoch millis of login event
83737
+ * @property {auth.AuthClientApp|null} [app] client application (e.g. headspace, ginger)
83738
+ * @property {auth.AuthClientPlatform|null} [platform] client platform (e.g. ios, android, web)
83739
+ * @property {Array.<auth.AuthLoginTag>|null} [tags] tags for the login event
83740
+ */
83741
+
83742
+ /**
83743
+ * Constructs a new AuthLoggedIn.
83744
+ * @exports AuthLoggedIn
83745
+ * @classdesc Signals that a user logged in
83746
+ * @implements IAuthLoggedIn
83747
+ * @constructor
83748
+ * @param {IAuthLoggedIn=} [properties] Properties to set
83749
+ */
83750
+ function AuthLoggedIn(properties) {
83751
+ this.tags = [];
83752
+ if (properties)
83753
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
83754
+ if (properties[keys[i]] != null)
83755
+ this[keys[i]] = properties[keys[i]];
83756
+ }
83757
+
83758
+ /**
83759
+ * HSUSER identifier
83760
+ * @member {string} userId
83761
+ * @memberof AuthLoggedIn
83762
+ * @instance
83763
+ */
83764
+ AuthLoggedIn.prototype.userId = "";
83765
+
83766
+ /**
83767
+ * epoch millis of login event
83768
+ * @member {number|Long} timestamp
83769
+ * @memberof AuthLoggedIn
83770
+ * @instance
83771
+ */
83772
+ AuthLoggedIn.prototype.timestamp = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
83773
+
83774
+ /**
83775
+ * client application (e.g. headspace, ginger)
83776
+ * @member {auth.AuthClientApp} app
83777
+ * @memberof AuthLoggedIn
83778
+ * @instance
83779
+ */
83780
+ AuthLoggedIn.prototype.app = 0;
83781
+
83782
+ /**
83783
+ * client platform (e.g. ios, android, web)
83784
+ * @member {auth.AuthClientPlatform} platform
83785
+ * @memberof AuthLoggedIn
83786
+ * @instance
83787
+ */
83788
+ AuthLoggedIn.prototype.platform = 0;
83789
+
83790
+ /**
83791
+ * tags for the login event
83792
+ * @member {Array.<auth.AuthLoginTag>} tags
83793
+ * @memberof AuthLoggedIn
83794
+ * @instance
83795
+ */
83796
+ AuthLoggedIn.prototype.tags = $util.emptyArray;
83797
+
83798
+ /**
83799
+ * Creates a new AuthLoggedIn instance using the specified properties.
83800
+ * @function create
83801
+ * @memberof AuthLoggedIn
83802
+ * @static
83803
+ * @param {IAuthLoggedIn=} [properties] Properties to set
83804
+ * @returns {AuthLoggedIn} AuthLoggedIn instance
83805
+ */
83806
+ AuthLoggedIn.create = function create(properties) {
83807
+ return new AuthLoggedIn(properties);
83808
+ };
83809
+
83810
+ /**
83811
+ * Encodes the specified AuthLoggedIn message. Does not implicitly {@link AuthLoggedIn.verify|verify} messages.
83812
+ * @function encode
83813
+ * @memberof AuthLoggedIn
83814
+ * @static
83815
+ * @param {IAuthLoggedIn} message AuthLoggedIn message or plain object to encode
83816
+ * @param {$protobuf.Writer} [writer] Writer to encode to
83817
+ * @returns {$protobuf.Writer} Writer
83818
+ */
83819
+ AuthLoggedIn.encode = function encode(message, writer) {
83820
+ if (!writer)
83821
+ writer = $Writer.create();
83822
+ if (message.userId != null && message.hasOwnProperty("userId"))
83823
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.userId);
83824
+ if (message.timestamp != null && message.hasOwnProperty("timestamp"))
83825
+ writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.timestamp);
83826
+ if (message.app != null && message.hasOwnProperty("app"))
83827
+ writer.uint32(/* id 3, wireType 0 =*/24).int32(message.app);
83828
+ if (message.platform != null && message.hasOwnProperty("platform"))
83829
+ writer.uint32(/* id 4, wireType 0 =*/32).int32(message.platform);
83830
+ if (message.tags != null && message.tags.length) {
83831
+ writer.uint32(/* id 5, wireType 2 =*/42).fork();
83832
+ for (var i = 0; i < message.tags.length; ++i)
83833
+ writer.int32(message.tags[i]);
83834
+ writer.ldelim();
83835
+ }
83836
+ return writer;
83837
+ };
83838
+
83839
+ /**
83840
+ * Encodes the specified AuthLoggedIn message, length delimited. Does not implicitly {@link AuthLoggedIn.verify|verify} messages.
83841
+ * @function encodeDelimited
83842
+ * @memberof AuthLoggedIn
83843
+ * @static
83844
+ * @param {IAuthLoggedIn} message AuthLoggedIn message or plain object to encode
83845
+ * @param {$protobuf.Writer} [writer] Writer to encode to
83846
+ * @returns {$protobuf.Writer} Writer
83847
+ */
83848
+ AuthLoggedIn.encodeDelimited = function encodeDelimited(message, writer) {
83849
+ return this.encode(message, writer).ldelim();
83850
+ };
83851
+
83852
+ /**
83853
+ * Decodes an AuthLoggedIn message from the specified reader or buffer.
83854
+ * @function decode
83855
+ * @memberof AuthLoggedIn
83856
+ * @static
83857
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
83858
+ * @param {number} [length] Message length if known beforehand
83859
+ * @returns {AuthLoggedIn} AuthLoggedIn
83860
+ * @throws {Error} If the payload is not a reader or valid buffer
83861
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
83862
+ */
83863
+ AuthLoggedIn.decode = function decode(reader, length) {
83864
+ if (!(reader instanceof $Reader))
83865
+ reader = $Reader.create(reader);
83866
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.AuthLoggedIn();
83867
+ while (reader.pos < end) {
83868
+ var tag = reader.uint32();
83869
+ switch (tag >>> 3) {
83870
+ case 1:
83871
+ message.userId = reader.string();
83872
+ break;
83873
+ case 2:
83874
+ message.timestamp = reader.uint64();
83875
+ break;
83876
+ case 3:
83877
+ message.app = reader.int32();
83878
+ break;
83879
+ case 4:
83880
+ message.platform = reader.int32();
83881
+ break;
83882
+ case 5:
83883
+ if (!(message.tags && message.tags.length))
83884
+ message.tags = [];
83885
+ if ((tag & 7) === 2) {
83886
+ var end2 = reader.uint32() + reader.pos;
83887
+ while (reader.pos < end2)
83888
+ message.tags.push(reader.int32());
83889
+ } else
83890
+ message.tags.push(reader.int32());
83891
+ break;
83892
+ default:
83893
+ reader.skipType(tag & 7);
83894
+ break;
83895
+ }
83896
+ }
83897
+ return message;
83898
+ };
83899
+
83900
+ /**
83901
+ * Decodes an AuthLoggedIn message from the specified reader or buffer, length delimited.
83902
+ * @function decodeDelimited
83903
+ * @memberof AuthLoggedIn
83904
+ * @static
83905
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
83906
+ * @returns {AuthLoggedIn} AuthLoggedIn
83907
+ * @throws {Error} If the payload is not a reader or valid buffer
83908
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
83909
+ */
83910
+ AuthLoggedIn.decodeDelimited = function decodeDelimited(reader) {
83911
+ if (!(reader instanceof $Reader))
83912
+ reader = new $Reader(reader);
83913
+ return this.decode(reader, reader.uint32());
83914
+ };
83915
+
83916
+ /**
83917
+ * Verifies an AuthLoggedIn message.
83918
+ * @function verify
83919
+ * @memberof AuthLoggedIn
83920
+ * @static
83921
+ * @param {Object.<string,*>} message Plain object to verify
83922
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
83923
+ */
83924
+ AuthLoggedIn.verify = function verify(message) {
83925
+ if (typeof message !== "object" || message === null)
83926
+ return "object expected";
83927
+ if (message.userId != null && message.hasOwnProperty("userId"))
83928
+ if (!$util.isString(message.userId))
83929
+ return "userId: string expected";
83930
+ if (message.timestamp != null && message.hasOwnProperty("timestamp"))
83931
+ if (!$util.isInteger(message.timestamp) && !(message.timestamp && $util.isInteger(message.timestamp.low) && $util.isInteger(message.timestamp.high)))
83932
+ return "timestamp: integer|Long expected";
83933
+ if (message.app != null && message.hasOwnProperty("app"))
83934
+ switch (message.app) {
83935
+ default:
83936
+ return "app: enum value expected";
83937
+ case 0:
83938
+ case 1:
83939
+ case 2:
83940
+ break;
83941
+ }
83942
+ if (message.platform != null && message.hasOwnProperty("platform"))
83943
+ switch (message.platform) {
83944
+ default:
83945
+ return "platform: enum value expected";
83946
+ case 0:
83947
+ case 1:
83948
+ case 2:
83949
+ case 3:
83950
+ case 4:
83951
+ case 5:
83952
+ case 6:
83953
+ break;
83954
+ }
83955
+ if (message.tags != null && message.hasOwnProperty("tags")) {
83956
+ if (!Array.isArray(message.tags))
83957
+ return "tags: array expected";
83958
+ for (var i = 0; i < message.tags.length; ++i)
83959
+ switch (message.tags[i]) {
83960
+ default:
83961
+ return "tags: enum value[] expected";
83962
+ case 0:
83963
+ case 1:
83964
+ break;
83965
+ }
83966
+ }
83967
+ return null;
83968
+ };
83969
+
83970
+ /**
83971
+ * Creates an AuthLoggedIn message from a plain object. Also converts values to their respective internal types.
83972
+ * @function fromObject
83973
+ * @memberof AuthLoggedIn
83974
+ * @static
83975
+ * @param {Object.<string,*>} object Plain object
83976
+ * @returns {AuthLoggedIn} AuthLoggedIn
83977
+ */
83978
+ AuthLoggedIn.fromObject = function fromObject(object) {
83979
+ if (object instanceof $root.AuthLoggedIn)
83980
+ return object;
83981
+ var message = new $root.AuthLoggedIn();
83982
+ if (object.userId != null)
83983
+ message.userId = String(object.userId);
83984
+ if (object.timestamp != null)
83985
+ if ($util.Long)
83986
+ (message.timestamp = $util.Long.fromValue(object.timestamp)).unsigned = true;
83987
+ else if (typeof object.timestamp === "string")
83988
+ message.timestamp = parseInt(object.timestamp, 10);
83989
+ else if (typeof object.timestamp === "number")
83990
+ message.timestamp = object.timestamp;
83991
+ else if (typeof object.timestamp === "object")
83992
+ message.timestamp = new $util.LongBits(object.timestamp.low >>> 0, object.timestamp.high >>> 0).toNumber(true);
83993
+ switch (object.app) {
83994
+ case "AUTH_CLIENT_APP_UNKNOWN":
83995
+ case 0:
83996
+ message.app = 0;
83997
+ break;
83998
+ case "AUTH_CLIENT_APP_HEADSPACE":
83999
+ case 1:
84000
+ message.app = 1;
84001
+ break;
84002
+ case "AUTH_CLIENT_APP_GINGER":
84003
+ case 2:
84004
+ message.app = 2;
84005
+ break;
84006
+ }
84007
+ switch (object.platform) {
84008
+ case "AUTH_CLIENT_PLATFORM_UNKNOWN":
84009
+ case 0:
84010
+ message.platform = 0;
84011
+ break;
84012
+ case "AUTH_CLIENT_PLATFORM_WEB":
84013
+ case 1:
84014
+ message.platform = 1;
84015
+ break;
84016
+ case "AUTH_CLIENT_PLATFORM_IOS":
84017
+ case 2:
84018
+ message.platform = 2;
84019
+ break;
84020
+ case "AUTH_CLIENT_PLATFORM_ANDROID":
84021
+ case 3:
84022
+ message.platform = 3;
84023
+ break;
84024
+ case "AUTH_CLIENT_PLATFORM_ALEXA":
84025
+ case 4:
84026
+ message.platform = 4;
84027
+ break;
84028
+ case "AUTH_CLIENT_PLATFORM_GOOGLE_ASSISTANT":
84029
+ case 5:
84030
+ message.platform = 5;
84031
+ break;
84032
+ case "AUTH_CLIENT_PLATFORM_IOS_WATCH":
84033
+ case 6:
84034
+ message.platform = 6;
84035
+ break;
84036
+ }
84037
+ if (object.tags) {
84038
+ if (!Array.isArray(object.tags))
84039
+ throw TypeError(".AuthLoggedIn.tags: array expected");
84040
+ message.tags = [];
84041
+ for (var i = 0; i < object.tags.length; ++i)
84042
+ switch (object.tags[i]) {
84043
+ default:
84044
+ case "AUTH_LOGIN_TAG_UNKNOWN":
84045
+ case 0:
84046
+ message.tags[i] = 0;
84047
+ break;
84048
+ case "AUTH_LOGIN_TAG_FIRST_LOGIN":
84049
+ case 1:
84050
+ message.tags[i] = 1;
84051
+ break;
84052
+ }
84053
+ }
84054
+ return message;
84055
+ };
84056
+
84057
+ /**
84058
+ * Creates a plain object from an AuthLoggedIn message. Also converts values to other types if specified.
84059
+ * @function toObject
84060
+ * @memberof AuthLoggedIn
84061
+ * @static
84062
+ * @param {AuthLoggedIn} message AuthLoggedIn
84063
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
84064
+ * @returns {Object.<string,*>} Plain object
84065
+ */
84066
+ AuthLoggedIn.toObject = function toObject(message, options) {
84067
+ if (!options)
84068
+ options = {};
84069
+ var object = {};
84070
+ if (options.arrays || options.defaults)
84071
+ object.tags = [];
84072
+ if (options.defaults) {
84073
+ object.userId = "";
84074
+ if ($util.Long) {
84075
+ var long = new $util.Long(0, 0, true);
84076
+ object.timestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
84077
+ } else
84078
+ object.timestamp = options.longs === String ? "0" : 0;
84079
+ object.app = options.enums === String ? "AUTH_CLIENT_APP_UNKNOWN" : 0;
84080
+ object.platform = options.enums === String ? "AUTH_CLIENT_PLATFORM_UNKNOWN" : 0;
84081
+ }
84082
+ if (message.userId != null && message.hasOwnProperty("userId"))
84083
+ object.userId = message.userId;
84084
+ if (message.timestamp != null && message.hasOwnProperty("timestamp"))
84085
+ if (typeof message.timestamp === "number")
84086
+ object.timestamp = options.longs === String ? String(message.timestamp) : message.timestamp;
84087
+ else
84088
+ 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;
84089
+ if (message.app != null && message.hasOwnProperty("app"))
84090
+ object.app = options.enums === String ? $root.auth.AuthClientApp[message.app] : message.app;
84091
+ if (message.platform != null && message.hasOwnProperty("platform"))
84092
+ object.platform = options.enums === String ? $root.auth.AuthClientPlatform[message.platform] : message.platform;
84093
+ if (message.tags && message.tags.length) {
84094
+ object.tags = [];
84095
+ for (var j = 0; j < message.tags.length; ++j)
84096
+ object.tags[j] = options.enums === String ? $root.auth.AuthLoginTag[message.tags[j]] : message.tags[j];
84097
+ }
84098
+ return object;
84099
+ };
84100
+
84101
+ /**
84102
+ * Converts this AuthLoggedIn to JSON.
84103
+ * @function toJSON
84104
+ * @memberof AuthLoggedIn
84105
+ * @instance
84106
+ * @returns {Object.<string,*>} JSON object
84107
+ */
84108
+ AuthLoggedIn.prototype.toJSON = function toJSON() {
84109
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
84110
+ };
84111
+
84112
+ return AuthLoggedIn;
84113
+ })();
84114
+
83680
84115
  $root.OrganizationCreated = (function() {
83681
84116
 
83682
84117
  /**
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.388.0"
20
20
  }