@headspace/protos-events 1.703.0 → 1.705.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 +139 -0
- package/lib/index.js +394 -0
- package/package.json +1 -1
package/lib/index.d.ts
CHANGED
|
@@ -44882,6 +44882,9 @@ export interface IOnboardingCompleted {
|
|
|
44882
44882
|
|
|
44883
44883
|
/** OnboardingCompleted completedAtIsoDate */
|
|
44884
44884
|
completedAtIsoDate?: (string|null);
|
|
44885
|
+
|
|
44886
|
+
/** OnboardingCompleted source */
|
|
44887
|
+
source?: (OnboardingSource|null);
|
|
44885
44888
|
}
|
|
44886
44889
|
|
|
44887
44890
|
/** Represents an OnboardingCompleted. */
|
|
@@ -44902,6 +44905,9 @@ export class OnboardingCompleted implements IOnboardingCompleted {
|
|
|
44902
44905
|
/** OnboardingCompleted completedAtIsoDate. */
|
|
44903
44906
|
public completedAtIsoDate: string;
|
|
44904
44907
|
|
|
44908
|
+
/** OnboardingCompleted source. */
|
|
44909
|
+
public source: OnboardingSource;
|
|
44910
|
+
|
|
44905
44911
|
/**
|
|
44906
44912
|
* Creates a new OnboardingCompleted instance using the specified properties.
|
|
44907
44913
|
* @param [properties] Properties to set
|
|
@@ -44973,6 +44979,13 @@ export class OnboardingCompleted implements IOnboardingCompleted {
|
|
|
44973
44979
|
public toJSON(): { [k: string]: any };
|
|
44974
44980
|
}
|
|
44975
44981
|
|
|
44982
|
+
/** OnboardingSource enum. */
|
|
44983
|
+
export enum OnboardingSource {
|
|
44984
|
+
ONBOARDING_SOURCE_UNKNOWN = 0,
|
|
44985
|
+
ONBOARDING_SOURCE_MOBILE = 1,
|
|
44986
|
+
ONBOARDING_SOURCE_WEB = 2
|
|
44987
|
+
}
|
|
44988
|
+
|
|
44976
44989
|
/** Properties of an OrgCoverageProfile. */
|
|
44977
44990
|
export interface IOrgCoverageProfile {
|
|
44978
44991
|
|
|
@@ -59544,6 +59557,132 @@ export namespace coaching {
|
|
|
59544
59557
|
COACHING_SESSION_FORMAT_VIDEO = 2
|
|
59545
59558
|
}
|
|
59546
59559
|
|
|
59560
|
+
/** SessionModality enum. */
|
|
59561
|
+
enum SessionModality {
|
|
59562
|
+
SESSION_MODALITY_UNKNOWN = 0,
|
|
59563
|
+
SESSION_MODALITY_TYPE_CHAT = 1,
|
|
59564
|
+
SESSION_MODALITY_TYPE_VIDEO = 2
|
|
59565
|
+
}
|
|
59566
|
+
|
|
59567
|
+
/** ModalityUpdateSourceType enum. */
|
|
59568
|
+
enum ModalityUpdateSourceType {
|
|
59569
|
+
MODALITY_UPDATE_SOURCE_TYPE_UNKNOWN = 0,
|
|
59570
|
+
MODALITY_UPDATE_SOURCE_TYPE_MEMBER = 1,
|
|
59571
|
+
MODALITY_UPDATE_SOURCE_TYPE_MEMBER_SERVICES = 2
|
|
59572
|
+
}
|
|
59573
|
+
|
|
59574
|
+
/** Properties of a PreferredModalitySet. */
|
|
59575
|
+
interface IPreferredModalitySet {
|
|
59576
|
+
|
|
59577
|
+
/** PreferredModalitySet hsUserId */
|
|
59578
|
+
hsUserId?: (string|null);
|
|
59579
|
+
|
|
59580
|
+
/** PreferredModalitySet modality */
|
|
59581
|
+
modality?: (coaching.SessionModality|null);
|
|
59582
|
+
|
|
59583
|
+
/** PreferredModalitySet source */
|
|
59584
|
+
source?: (coaching.ModalityUpdateSourceType|null);
|
|
59585
|
+
|
|
59586
|
+
/** PreferredModalitySet timestamp */
|
|
59587
|
+
timestamp?: (number|Long|null);
|
|
59588
|
+
}
|
|
59589
|
+
|
|
59590
|
+
/**
|
|
59591
|
+
* An instance of an event happening when an intake session is successfully booked and
|
|
59592
|
+
* the Caller model is updated OR when member support changes a lead coach for a
|
|
59593
|
+
* modality change request
|
|
59594
|
+
*/
|
|
59595
|
+
class PreferredModalitySet implements IPreferredModalitySet {
|
|
59596
|
+
|
|
59597
|
+
/**
|
|
59598
|
+
* Constructs a new PreferredModalitySet.
|
|
59599
|
+
* @param [properties] Properties to set
|
|
59600
|
+
*/
|
|
59601
|
+
constructor(properties?: coaching.IPreferredModalitySet);
|
|
59602
|
+
|
|
59603
|
+
/** PreferredModalitySet hsUserId. */
|
|
59604
|
+
public hsUserId: string;
|
|
59605
|
+
|
|
59606
|
+
/** PreferredModalitySet modality. */
|
|
59607
|
+
public modality: coaching.SessionModality;
|
|
59608
|
+
|
|
59609
|
+
/** PreferredModalitySet source. */
|
|
59610
|
+
public source: coaching.ModalityUpdateSourceType;
|
|
59611
|
+
|
|
59612
|
+
/** PreferredModalitySet timestamp. */
|
|
59613
|
+
public timestamp: (number|Long);
|
|
59614
|
+
|
|
59615
|
+
/**
|
|
59616
|
+
* Creates a new PreferredModalitySet instance using the specified properties.
|
|
59617
|
+
* @param [properties] Properties to set
|
|
59618
|
+
* @returns PreferredModalitySet instance
|
|
59619
|
+
*/
|
|
59620
|
+
public static create(properties?: coaching.IPreferredModalitySet): coaching.PreferredModalitySet;
|
|
59621
|
+
|
|
59622
|
+
/**
|
|
59623
|
+
* Encodes the specified PreferredModalitySet message. Does not implicitly {@link coaching.PreferredModalitySet.verify|verify} messages.
|
|
59624
|
+
* @param message PreferredModalitySet message or plain object to encode
|
|
59625
|
+
* @param [writer] Writer to encode to
|
|
59626
|
+
* @returns Writer
|
|
59627
|
+
*/
|
|
59628
|
+
public static encode(message: coaching.IPreferredModalitySet, writer?: $protobuf.Writer): $protobuf.Writer;
|
|
59629
|
+
|
|
59630
|
+
/**
|
|
59631
|
+
* Encodes the specified PreferredModalitySet message, length delimited. Does not implicitly {@link coaching.PreferredModalitySet.verify|verify} messages.
|
|
59632
|
+
* @param message PreferredModalitySet message or plain object to encode
|
|
59633
|
+
* @param [writer] Writer to encode to
|
|
59634
|
+
* @returns Writer
|
|
59635
|
+
*/
|
|
59636
|
+
public static encodeDelimited(message: coaching.IPreferredModalitySet, writer?: $protobuf.Writer): $protobuf.Writer;
|
|
59637
|
+
|
|
59638
|
+
/**
|
|
59639
|
+
* Decodes a PreferredModalitySet message from the specified reader or buffer.
|
|
59640
|
+
* @param reader Reader or buffer to decode from
|
|
59641
|
+
* @param [length] Message length if known beforehand
|
|
59642
|
+
* @returns PreferredModalitySet
|
|
59643
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
59644
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
59645
|
+
*/
|
|
59646
|
+
public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): coaching.PreferredModalitySet;
|
|
59647
|
+
|
|
59648
|
+
/**
|
|
59649
|
+
* Decodes a PreferredModalitySet message from the specified reader or buffer, length delimited.
|
|
59650
|
+
* @param reader Reader or buffer to decode from
|
|
59651
|
+
* @returns PreferredModalitySet
|
|
59652
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
59653
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
59654
|
+
*/
|
|
59655
|
+
public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): coaching.PreferredModalitySet;
|
|
59656
|
+
|
|
59657
|
+
/**
|
|
59658
|
+
* Verifies a PreferredModalitySet message.
|
|
59659
|
+
* @param message Plain object to verify
|
|
59660
|
+
* @returns `null` if valid, otherwise the reason why it is not
|
|
59661
|
+
*/
|
|
59662
|
+
public static verify(message: { [k: string]: any }): (string|null);
|
|
59663
|
+
|
|
59664
|
+
/**
|
|
59665
|
+
* Creates a PreferredModalitySet message from a plain object. Also converts values to their respective internal types.
|
|
59666
|
+
* @param object Plain object
|
|
59667
|
+
* @returns PreferredModalitySet
|
|
59668
|
+
*/
|
|
59669
|
+
public static fromObject(object: { [k: string]: any }): coaching.PreferredModalitySet;
|
|
59670
|
+
|
|
59671
|
+
/**
|
|
59672
|
+
* Creates a plain object from a PreferredModalitySet message. Also converts values to other types if specified.
|
|
59673
|
+
* @param message PreferredModalitySet
|
|
59674
|
+
* @param [options] Conversion options
|
|
59675
|
+
* @returns Plain object
|
|
59676
|
+
*/
|
|
59677
|
+
public static toObject(message: coaching.PreferredModalitySet, options?: $protobuf.IConversionOptions): { [k: string]: any };
|
|
59678
|
+
|
|
59679
|
+
/**
|
|
59680
|
+
* Converts this PreferredModalitySet to JSON.
|
|
59681
|
+
* @returns JSON object
|
|
59682
|
+
*/
|
|
59683
|
+
public toJSON(): { [k: string]: any };
|
|
59684
|
+
}
|
|
59685
|
+
|
|
59547
59686
|
/** Properties of a SuicidalIdeationAlert. */
|
|
59548
59687
|
interface ISuicidalIdeationAlert {
|
|
59549
59688
|
|
package/lib/index.js
CHANGED
|
@@ -128093,6 +128093,7 @@ $root.OnboardingCompleted = (function() {
|
|
|
128093
128093
|
* @property {string|null} [hsUserId] OnboardingCompleted hsUserId
|
|
128094
128094
|
* @property {number|null} [gingerUserId] OnboardingCompleted gingerUserId
|
|
128095
128095
|
* @property {string|null} [completedAtIsoDate] OnboardingCompleted completedAtIsoDate
|
|
128096
|
+
* @property {OnboardingSource|null} [source] OnboardingCompleted source
|
|
128096
128097
|
*/
|
|
128097
128098
|
|
|
128098
128099
|
/**
|
|
@@ -128134,6 +128135,14 @@ $root.OnboardingCompleted = (function() {
|
|
|
128134
128135
|
*/
|
|
128135
128136
|
OnboardingCompleted.prototype.completedAtIsoDate = "";
|
|
128136
128137
|
|
|
128138
|
+
/**
|
|
128139
|
+
* OnboardingCompleted source.
|
|
128140
|
+
* @member {OnboardingSource} source
|
|
128141
|
+
* @memberof OnboardingCompleted
|
|
128142
|
+
* @instance
|
|
128143
|
+
*/
|
|
128144
|
+
OnboardingCompleted.prototype.source = 0;
|
|
128145
|
+
|
|
128137
128146
|
/**
|
|
128138
128147
|
* Creates a new OnboardingCompleted instance using the specified properties.
|
|
128139
128148
|
* @function create
|
|
@@ -128164,6 +128173,8 @@ $root.OnboardingCompleted = (function() {
|
|
|
128164
128173
|
writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.gingerUserId);
|
|
128165
128174
|
if (message.completedAtIsoDate != null && message.hasOwnProperty("completedAtIsoDate"))
|
|
128166
128175
|
writer.uint32(/* id 3, wireType 2 =*/26).string(message.completedAtIsoDate);
|
|
128176
|
+
if (message.source != null && message.hasOwnProperty("source"))
|
|
128177
|
+
writer.uint32(/* id 4, wireType 0 =*/32).int32(message.source);
|
|
128167
128178
|
return writer;
|
|
128168
128179
|
};
|
|
128169
128180
|
|
|
@@ -128207,6 +128218,9 @@ $root.OnboardingCompleted = (function() {
|
|
|
128207
128218
|
case 3:
|
|
128208
128219
|
message.completedAtIsoDate = reader.string();
|
|
128209
128220
|
break;
|
|
128221
|
+
case 4:
|
|
128222
|
+
message.source = reader.int32();
|
|
128223
|
+
break;
|
|
128210
128224
|
default:
|
|
128211
128225
|
reader.skipType(tag & 7);
|
|
128212
128226
|
break;
|
|
@@ -128251,6 +128265,15 @@ $root.OnboardingCompleted = (function() {
|
|
|
128251
128265
|
if (message.completedAtIsoDate != null && message.hasOwnProperty("completedAtIsoDate"))
|
|
128252
128266
|
if (!$util.isString(message.completedAtIsoDate))
|
|
128253
128267
|
return "completedAtIsoDate: string expected";
|
|
128268
|
+
if (message.source != null && message.hasOwnProperty("source"))
|
|
128269
|
+
switch (message.source) {
|
|
128270
|
+
default:
|
|
128271
|
+
return "source: enum value expected";
|
|
128272
|
+
case 0:
|
|
128273
|
+
case 1:
|
|
128274
|
+
case 2:
|
|
128275
|
+
break;
|
|
128276
|
+
}
|
|
128254
128277
|
return null;
|
|
128255
128278
|
};
|
|
128256
128279
|
|
|
@@ -128272,6 +128295,20 @@ $root.OnboardingCompleted = (function() {
|
|
|
128272
128295
|
message.gingerUserId = object.gingerUserId >>> 0;
|
|
128273
128296
|
if (object.completedAtIsoDate != null)
|
|
128274
128297
|
message.completedAtIsoDate = String(object.completedAtIsoDate);
|
|
128298
|
+
switch (object.source) {
|
|
128299
|
+
case "ONBOARDING_SOURCE_UNKNOWN":
|
|
128300
|
+
case 0:
|
|
128301
|
+
message.source = 0;
|
|
128302
|
+
break;
|
|
128303
|
+
case "ONBOARDING_SOURCE_MOBILE":
|
|
128304
|
+
case 1:
|
|
128305
|
+
message.source = 1;
|
|
128306
|
+
break;
|
|
128307
|
+
case "ONBOARDING_SOURCE_WEB":
|
|
128308
|
+
case 2:
|
|
128309
|
+
message.source = 2;
|
|
128310
|
+
break;
|
|
128311
|
+
}
|
|
128275
128312
|
return message;
|
|
128276
128313
|
};
|
|
128277
128314
|
|
|
@@ -128292,6 +128329,7 @@ $root.OnboardingCompleted = (function() {
|
|
|
128292
128329
|
object.hsUserId = "";
|
|
128293
128330
|
object.gingerUserId = 0;
|
|
128294
128331
|
object.completedAtIsoDate = "";
|
|
128332
|
+
object.source = options.enums === String ? "ONBOARDING_SOURCE_UNKNOWN" : 0;
|
|
128295
128333
|
}
|
|
128296
128334
|
if (message.hsUserId != null && message.hasOwnProperty("hsUserId"))
|
|
128297
128335
|
object.hsUserId = message.hsUserId;
|
|
@@ -128299,6 +128337,8 @@ $root.OnboardingCompleted = (function() {
|
|
|
128299
128337
|
object.gingerUserId = message.gingerUserId;
|
|
128300
128338
|
if (message.completedAtIsoDate != null && message.hasOwnProperty("completedAtIsoDate"))
|
|
128301
128339
|
object.completedAtIsoDate = message.completedAtIsoDate;
|
|
128340
|
+
if (message.source != null && message.hasOwnProperty("source"))
|
|
128341
|
+
object.source = options.enums === String ? $root.OnboardingSource[message.source] : message.source;
|
|
128302
128342
|
return object;
|
|
128303
128343
|
};
|
|
128304
128344
|
|
|
@@ -128316,6 +128356,22 @@ $root.OnboardingCompleted = (function() {
|
|
|
128316
128356
|
return OnboardingCompleted;
|
|
128317
128357
|
})();
|
|
128318
128358
|
|
|
128359
|
+
/**
|
|
128360
|
+
* OnboardingSource enum.
|
|
128361
|
+
* @name OnboardingSource
|
|
128362
|
+
* @enum {string}
|
|
128363
|
+
* @property {number} ONBOARDING_SOURCE_UNKNOWN=0 ONBOARDING_SOURCE_UNKNOWN value
|
|
128364
|
+
* @property {number} ONBOARDING_SOURCE_MOBILE=1 ONBOARDING_SOURCE_MOBILE value
|
|
128365
|
+
* @property {number} ONBOARDING_SOURCE_WEB=2 ONBOARDING_SOURCE_WEB value
|
|
128366
|
+
*/
|
|
128367
|
+
$root.OnboardingSource = (function() {
|
|
128368
|
+
var valuesById = {}, values = Object.create(valuesById);
|
|
128369
|
+
values[valuesById[0] = "ONBOARDING_SOURCE_UNKNOWN"] = 0;
|
|
128370
|
+
values[valuesById[1] = "ONBOARDING_SOURCE_MOBILE"] = 1;
|
|
128371
|
+
values[valuesById[2] = "ONBOARDING_SOURCE_WEB"] = 2;
|
|
128372
|
+
return values;
|
|
128373
|
+
})();
|
|
128374
|
+
|
|
128319
128375
|
$root.OrgCoverageProfile = (function() {
|
|
128320
128376
|
|
|
128321
128377
|
/**
|
|
@@ -171408,6 +171464,344 @@ $root.coaching = (function() {
|
|
|
171408
171464
|
return values;
|
|
171409
171465
|
})();
|
|
171410
171466
|
|
|
171467
|
+
/**
|
|
171468
|
+
* SessionModality enum.
|
|
171469
|
+
* @name coaching.SessionModality
|
|
171470
|
+
* @enum {string}
|
|
171471
|
+
* @property {number} SESSION_MODALITY_UNKNOWN=0 SESSION_MODALITY_UNKNOWN value
|
|
171472
|
+
* @property {number} SESSION_MODALITY_TYPE_CHAT=1 SESSION_MODALITY_TYPE_CHAT value
|
|
171473
|
+
* @property {number} SESSION_MODALITY_TYPE_VIDEO=2 SESSION_MODALITY_TYPE_VIDEO value
|
|
171474
|
+
*/
|
|
171475
|
+
coaching.SessionModality = (function() {
|
|
171476
|
+
var valuesById = {}, values = Object.create(valuesById);
|
|
171477
|
+
values[valuesById[0] = "SESSION_MODALITY_UNKNOWN"] = 0;
|
|
171478
|
+
values[valuesById[1] = "SESSION_MODALITY_TYPE_CHAT"] = 1;
|
|
171479
|
+
values[valuesById[2] = "SESSION_MODALITY_TYPE_VIDEO"] = 2;
|
|
171480
|
+
return values;
|
|
171481
|
+
})();
|
|
171482
|
+
|
|
171483
|
+
/**
|
|
171484
|
+
* ModalityUpdateSourceType enum.
|
|
171485
|
+
* @name coaching.ModalityUpdateSourceType
|
|
171486
|
+
* @enum {string}
|
|
171487
|
+
* @property {number} MODALITY_UPDATE_SOURCE_TYPE_UNKNOWN=0 MODALITY_UPDATE_SOURCE_TYPE_UNKNOWN value
|
|
171488
|
+
* @property {number} MODALITY_UPDATE_SOURCE_TYPE_MEMBER=1 MODALITY_UPDATE_SOURCE_TYPE_MEMBER value
|
|
171489
|
+
* @property {number} MODALITY_UPDATE_SOURCE_TYPE_MEMBER_SERVICES=2 MODALITY_UPDATE_SOURCE_TYPE_MEMBER_SERVICES value
|
|
171490
|
+
*/
|
|
171491
|
+
coaching.ModalityUpdateSourceType = (function() {
|
|
171492
|
+
var valuesById = {}, values = Object.create(valuesById);
|
|
171493
|
+
values[valuesById[0] = "MODALITY_UPDATE_SOURCE_TYPE_UNKNOWN"] = 0;
|
|
171494
|
+
values[valuesById[1] = "MODALITY_UPDATE_SOURCE_TYPE_MEMBER"] = 1;
|
|
171495
|
+
values[valuesById[2] = "MODALITY_UPDATE_SOURCE_TYPE_MEMBER_SERVICES"] = 2;
|
|
171496
|
+
return values;
|
|
171497
|
+
})();
|
|
171498
|
+
|
|
171499
|
+
coaching.PreferredModalitySet = (function() {
|
|
171500
|
+
|
|
171501
|
+
/**
|
|
171502
|
+
* Properties of a PreferredModalitySet.
|
|
171503
|
+
* @memberof coaching
|
|
171504
|
+
* @interface IPreferredModalitySet
|
|
171505
|
+
* @property {string|null} [hsUserId] PreferredModalitySet hsUserId
|
|
171506
|
+
* @property {coaching.SessionModality|null} [modality] PreferredModalitySet modality
|
|
171507
|
+
* @property {coaching.ModalityUpdateSourceType|null} [source] PreferredModalitySet source
|
|
171508
|
+
* @property {number|Long|null} [timestamp] PreferredModalitySet timestamp
|
|
171509
|
+
*/
|
|
171510
|
+
|
|
171511
|
+
/**
|
|
171512
|
+
* Constructs a new PreferredModalitySet.
|
|
171513
|
+
* @memberof coaching
|
|
171514
|
+
* @classdesc An instance of an event happening when an intake session is successfully booked and
|
|
171515
|
+
* the Caller model is updated OR when member support changes a lead coach for a
|
|
171516
|
+
* modality change request
|
|
171517
|
+
* @implements IPreferredModalitySet
|
|
171518
|
+
* @constructor
|
|
171519
|
+
* @param {coaching.IPreferredModalitySet=} [properties] Properties to set
|
|
171520
|
+
*/
|
|
171521
|
+
function PreferredModalitySet(properties) {
|
|
171522
|
+
if (properties)
|
|
171523
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
171524
|
+
if (properties[keys[i]] != null)
|
|
171525
|
+
this[keys[i]] = properties[keys[i]];
|
|
171526
|
+
}
|
|
171527
|
+
|
|
171528
|
+
/**
|
|
171529
|
+
* PreferredModalitySet hsUserId.
|
|
171530
|
+
* @member {string} hsUserId
|
|
171531
|
+
* @memberof coaching.PreferredModalitySet
|
|
171532
|
+
* @instance
|
|
171533
|
+
*/
|
|
171534
|
+
PreferredModalitySet.prototype.hsUserId = "";
|
|
171535
|
+
|
|
171536
|
+
/**
|
|
171537
|
+
* PreferredModalitySet modality.
|
|
171538
|
+
* @member {coaching.SessionModality} modality
|
|
171539
|
+
* @memberof coaching.PreferredModalitySet
|
|
171540
|
+
* @instance
|
|
171541
|
+
*/
|
|
171542
|
+
PreferredModalitySet.prototype.modality = 0;
|
|
171543
|
+
|
|
171544
|
+
/**
|
|
171545
|
+
* PreferredModalitySet source.
|
|
171546
|
+
* @member {coaching.ModalityUpdateSourceType} source
|
|
171547
|
+
* @memberof coaching.PreferredModalitySet
|
|
171548
|
+
* @instance
|
|
171549
|
+
*/
|
|
171550
|
+
PreferredModalitySet.prototype.source = 0;
|
|
171551
|
+
|
|
171552
|
+
/**
|
|
171553
|
+
* PreferredModalitySet timestamp.
|
|
171554
|
+
* @member {number|Long} timestamp
|
|
171555
|
+
* @memberof coaching.PreferredModalitySet
|
|
171556
|
+
* @instance
|
|
171557
|
+
*/
|
|
171558
|
+
PreferredModalitySet.prototype.timestamp = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
|
|
171559
|
+
|
|
171560
|
+
/**
|
|
171561
|
+
* Creates a new PreferredModalitySet instance using the specified properties.
|
|
171562
|
+
* @function create
|
|
171563
|
+
* @memberof coaching.PreferredModalitySet
|
|
171564
|
+
* @static
|
|
171565
|
+
* @param {coaching.IPreferredModalitySet=} [properties] Properties to set
|
|
171566
|
+
* @returns {coaching.PreferredModalitySet} PreferredModalitySet instance
|
|
171567
|
+
*/
|
|
171568
|
+
PreferredModalitySet.create = function create(properties) {
|
|
171569
|
+
return new PreferredModalitySet(properties);
|
|
171570
|
+
};
|
|
171571
|
+
|
|
171572
|
+
/**
|
|
171573
|
+
* Encodes the specified PreferredModalitySet message. Does not implicitly {@link coaching.PreferredModalitySet.verify|verify} messages.
|
|
171574
|
+
* @function encode
|
|
171575
|
+
* @memberof coaching.PreferredModalitySet
|
|
171576
|
+
* @static
|
|
171577
|
+
* @param {coaching.IPreferredModalitySet} message PreferredModalitySet message or plain object to encode
|
|
171578
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
171579
|
+
* @returns {$protobuf.Writer} Writer
|
|
171580
|
+
*/
|
|
171581
|
+
PreferredModalitySet.encode = function encode(message, writer) {
|
|
171582
|
+
if (!writer)
|
|
171583
|
+
writer = $Writer.create();
|
|
171584
|
+
if (message.hsUserId != null && message.hasOwnProperty("hsUserId"))
|
|
171585
|
+
writer.uint32(/* id 1, wireType 2 =*/10).string(message.hsUserId);
|
|
171586
|
+
if (message.modality != null && message.hasOwnProperty("modality"))
|
|
171587
|
+
writer.uint32(/* id 2, wireType 0 =*/16).int32(message.modality);
|
|
171588
|
+
if (message.source != null && message.hasOwnProperty("source"))
|
|
171589
|
+
writer.uint32(/* id 3, wireType 0 =*/24).int32(message.source);
|
|
171590
|
+
if (message.timestamp != null && message.hasOwnProperty("timestamp"))
|
|
171591
|
+
writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.timestamp);
|
|
171592
|
+
return writer;
|
|
171593
|
+
};
|
|
171594
|
+
|
|
171595
|
+
/**
|
|
171596
|
+
* Encodes the specified PreferredModalitySet message, length delimited. Does not implicitly {@link coaching.PreferredModalitySet.verify|verify} messages.
|
|
171597
|
+
* @function encodeDelimited
|
|
171598
|
+
* @memberof coaching.PreferredModalitySet
|
|
171599
|
+
* @static
|
|
171600
|
+
* @param {coaching.IPreferredModalitySet} message PreferredModalitySet message or plain object to encode
|
|
171601
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
171602
|
+
* @returns {$protobuf.Writer} Writer
|
|
171603
|
+
*/
|
|
171604
|
+
PreferredModalitySet.encodeDelimited = function encodeDelimited(message, writer) {
|
|
171605
|
+
return this.encode(message, writer).ldelim();
|
|
171606
|
+
};
|
|
171607
|
+
|
|
171608
|
+
/**
|
|
171609
|
+
* Decodes a PreferredModalitySet message from the specified reader or buffer.
|
|
171610
|
+
* @function decode
|
|
171611
|
+
* @memberof coaching.PreferredModalitySet
|
|
171612
|
+
* @static
|
|
171613
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
171614
|
+
* @param {number} [length] Message length if known beforehand
|
|
171615
|
+
* @returns {coaching.PreferredModalitySet} PreferredModalitySet
|
|
171616
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
171617
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
171618
|
+
*/
|
|
171619
|
+
PreferredModalitySet.decode = function decode(reader, length) {
|
|
171620
|
+
if (!(reader instanceof $Reader))
|
|
171621
|
+
reader = $Reader.create(reader);
|
|
171622
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.coaching.PreferredModalitySet();
|
|
171623
|
+
while (reader.pos < end) {
|
|
171624
|
+
var tag = reader.uint32();
|
|
171625
|
+
switch (tag >>> 3) {
|
|
171626
|
+
case 1:
|
|
171627
|
+
message.hsUserId = reader.string();
|
|
171628
|
+
break;
|
|
171629
|
+
case 2:
|
|
171630
|
+
message.modality = reader.int32();
|
|
171631
|
+
break;
|
|
171632
|
+
case 3:
|
|
171633
|
+
message.source = reader.int32();
|
|
171634
|
+
break;
|
|
171635
|
+
case 4:
|
|
171636
|
+
message.timestamp = reader.uint64();
|
|
171637
|
+
break;
|
|
171638
|
+
default:
|
|
171639
|
+
reader.skipType(tag & 7);
|
|
171640
|
+
break;
|
|
171641
|
+
}
|
|
171642
|
+
}
|
|
171643
|
+
return message;
|
|
171644
|
+
};
|
|
171645
|
+
|
|
171646
|
+
/**
|
|
171647
|
+
* Decodes a PreferredModalitySet message from the specified reader or buffer, length delimited.
|
|
171648
|
+
* @function decodeDelimited
|
|
171649
|
+
* @memberof coaching.PreferredModalitySet
|
|
171650
|
+
* @static
|
|
171651
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
171652
|
+
* @returns {coaching.PreferredModalitySet} PreferredModalitySet
|
|
171653
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
171654
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
171655
|
+
*/
|
|
171656
|
+
PreferredModalitySet.decodeDelimited = function decodeDelimited(reader) {
|
|
171657
|
+
if (!(reader instanceof $Reader))
|
|
171658
|
+
reader = new $Reader(reader);
|
|
171659
|
+
return this.decode(reader, reader.uint32());
|
|
171660
|
+
};
|
|
171661
|
+
|
|
171662
|
+
/**
|
|
171663
|
+
* Verifies a PreferredModalitySet message.
|
|
171664
|
+
* @function verify
|
|
171665
|
+
* @memberof coaching.PreferredModalitySet
|
|
171666
|
+
* @static
|
|
171667
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
171668
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
171669
|
+
*/
|
|
171670
|
+
PreferredModalitySet.verify = function verify(message) {
|
|
171671
|
+
if (typeof message !== "object" || message === null)
|
|
171672
|
+
return "object expected";
|
|
171673
|
+
if (message.hsUserId != null && message.hasOwnProperty("hsUserId"))
|
|
171674
|
+
if (!$util.isString(message.hsUserId))
|
|
171675
|
+
return "hsUserId: string expected";
|
|
171676
|
+
if (message.modality != null && message.hasOwnProperty("modality"))
|
|
171677
|
+
switch (message.modality) {
|
|
171678
|
+
default:
|
|
171679
|
+
return "modality: enum value expected";
|
|
171680
|
+
case 0:
|
|
171681
|
+
case 1:
|
|
171682
|
+
case 2:
|
|
171683
|
+
break;
|
|
171684
|
+
}
|
|
171685
|
+
if (message.source != null && message.hasOwnProperty("source"))
|
|
171686
|
+
switch (message.source) {
|
|
171687
|
+
default:
|
|
171688
|
+
return "source: enum value expected";
|
|
171689
|
+
case 0:
|
|
171690
|
+
case 1:
|
|
171691
|
+
case 2:
|
|
171692
|
+
break;
|
|
171693
|
+
}
|
|
171694
|
+
if (message.timestamp != null && message.hasOwnProperty("timestamp"))
|
|
171695
|
+
if (!$util.isInteger(message.timestamp) && !(message.timestamp && $util.isInteger(message.timestamp.low) && $util.isInteger(message.timestamp.high)))
|
|
171696
|
+
return "timestamp: integer|Long expected";
|
|
171697
|
+
return null;
|
|
171698
|
+
};
|
|
171699
|
+
|
|
171700
|
+
/**
|
|
171701
|
+
* Creates a PreferredModalitySet message from a plain object. Also converts values to their respective internal types.
|
|
171702
|
+
* @function fromObject
|
|
171703
|
+
* @memberof coaching.PreferredModalitySet
|
|
171704
|
+
* @static
|
|
171705
|
+
* @param {Object.<string,*>} object Plain object
|
|
171706
|
+
* @returns {coaching.PreferredModalitySet} PreferredModalitySet
|
|
171707
|
+
*/
|
|
171708
|
+
PreferredModalitySet.fromObject = function fromObject(object) {
|
|
171709
|
+
if (object instanceof $root.coaching.PreferredModalitySet)
|
|
171710
|
+
return object;
|
|
171711
|
+
var message = new $root.coaching.PreferredModalitySet();
|
|
171712
|
+
if (object.hsUserId != null)
|
|
171713
|
+
message.hsUserId = String(object.hsUserId);
|
|
171714
|
+
switch (object.modality) {
|
|
171715
|
+
case "SESSION_MODALITY_UNKNOWN":
|
|
171716
|
+
case 0:
|
|
171717
|
+
message.modality = 0;
|
|
171718
|
+
break;
|
|
171719
|
+
case "SESSION_MODALITY_TYPE_CHAT":
|
|
171720
|
+
case 1:
|
|
171721
|
+
message.modality = 1;
|
|
171722
|
+
break;
|
|
171723
|
+
case "SESSION_MODALITY_TYPE_VIDEO":
|
|
171724
|
+
case 2:
|
|
171725
|
+
message.modality = 2;
|
|
171726
|
+
break;
|
|
171727
|
+
}
|
|
171728
|
+
switch (object.source) {
|
|
171729
|
+
case "MODALITY_UPDATE_SOURCE_TYPE_UNKNOWN":
|
|
171730
|
+
case 0:
|
|
171731
|
+
message.source = 0;
|
|
171732
|
+
break;
|
|
171733
|
+
case "MODALITY_UPDATE_SOURCE_TYPE_MEMBER":
|
|
171734
|
+
case 1:
|
|
171735
|
+
message.source = 1;
|
|
171736
|
+
break;
|
|
171737
|
+
case "MODALITY_UPDATE_SOURCE_TYPE_MEMBER_SERVICES":
|
|
171738
|
+
case 2:
|
|
171739
|
+
message.source = 2;
|
|
171740
|
+
break;
|
|
171741
|
+
}
|
|
171742
|
+
if (object.timestamp != null)
|
|
171743
|
+
if ($util.Long)
|
|
171744
|
+
(message.timestamp = $util.Long.fromValue(object.timestamp)).unsigned = true;
|
|
171745
|
+
else if (typeof object.timestamp === "string")
|
|
171746
|
+
message.timestamp = parseInt(object.timestamp, 10);
|
|
171747
|
+
else if (typeof object.timestamp === "number")
|
|
171748
|
+
message.timestamp = object.timestamp;
|
|
171749
|
+
else if (typeof object.timestamp === "object")
|
|
171750
|
+
message.timestamp = new $util.LongBits(object.timestamp.low >>> 0, object.timestamp.high >>> 0).toNumber(true);
|
|
171751
|
+
return message;
|
|
171752
|
+
};
|
|
171753
|
+
|
|
171754
|
+
/**
|
|
171755
|
+
* Creates a plain object from a PreferredModalitySet message. Also converts values to other types if specified.
|
|
171756
|
+
* @function toObject
|
|
171757
|
+
* @memberof coaching.PreferredModalitySet
|
|
171758
|
+
* @static
|
|
171759
|
+
* @param {coaching.PreferredModalitySet} message PreferredModalitySet
|
|
171760
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
171761
|
+
* @returns {Object.<string,*>} Plain object
|
|
171762
|
+
*/
|
|
171763
|
+
PreferredModalitySet.toObject = function toObject(message, options) {
|
|
171764
|
+
if (!options)
|
|
171765
|
+
options = {};
|
|
171766
|
+
var object = {};
|
|
171767
|
+
if (options.defaults) {
|
|
171768
|
+
object.hsUserId = "";
|
|
171769
|
+
object.modality = options.enums === String ? "SESSION_MODALITY_UNKNOWN" : 0;
|
|
171770
|
+
object.source = options.enums === String ? "MODALITY_UPDATE_SOURCE_TYPE_UNKNOWN" : 0;
|
|
171771
|
+
if ($util.Long) {
|
|
171772
|
+
var long = new $util.Long(0, 0, true);
|
|
171773
|
+
object.timestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
|
|
171774
|
+
} else
|
|
171775
|
+
object.timestamp = options.longs === String ? "0" : 0;
|
|
171776
|
+
}
|
|
171777
|
+
if (message.hsUserId != null && message.hasOwnProperty("hsUserId"))
|
|
171778
|
+
object.hsUserId = message.hsUserId;
|
|
171779
|
+
if (message.modality != null && message.hasOwnProperty("modality"))
|
|
171780
|
+
object.modality = options.enums === String ? $root.coaching.SessionModality[message.modality] : message.modality;
|
|
171781
|
+
if (message.source != null && message.hasOwnProperty("source"))
|
|
171782
|
+
object.source = options.enums === String ? $root.coaching.ModalityUpdateSourceType[message.source] : message.source;
|
|
171783
|
+
if (message.timestamp != null && message.hasOwnProperty("timestamp"))
|
|
171784
|
+
if (typeof message.timestamp === "number")
|
|
171785
|
+
object.timestamp = options.longs === String ? String(message.timestamp) : message.timestamp;
|
|
171786
|
+
else
|
|
171787
|
+
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;
|
|
171788
|
+
return object;
|
|
171789
|
+
};
|
|
171790
|
+
|
|
171791
|
+
/**
|
|
171792
|
+
* Converts this PreferredModalitySet to JSON.
|
|
171793
|
+
* @function toJSON
|
|
171794
|
+
* @memberof coaching.PreferredModalitySet
|
|
171795
|
+
* @instance
|
|
171796
|
+
* @returns {Object.<string,*>} JSON object
|
|
171797
|
+
*/
|
|
171798
|
+
PreferredModalitySet.prototype.toJSON = function toJSON() {
|
|
171799
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
171800
|
+
};
|
|
171801
|
+
|
|
171802
|
+
return PreferredModalitySet;
|
|
171803
|
+
})();
|
|
171804
|
+
|
|
171411
171805
|
coaching.SuicidalIdeationAlert = (function() {
|
|
171412
171806
|
|
|
171413
171807
|
/**
|
package/package.json
CHANGED