@headspace/protos-events 1.704.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 CHANGED
@@ -59557,6 +59557,132 @@ export namespace coaching {
59557
59557
  COACHING_SESSION_FORMAT_VIDEO = 2
59558
59558
  }
59559
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
+
59560
59686
  /** Properties of a SuicidalIdeationAlert. */
59561
59687
  interface ISuicidalIdeationAlert {
59562
59688
 
package/lib/index.js CHANGED
@@ -171464,6 +171464,344 @@ $root.coaching = (function() {
171464
171464
  return values;
171465
171465
  })();
171466
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
+
171467
171805
  coaching.SuicidalIdeationAlert = (function() {
171468
171806
 
171469
171807
  /**
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.704.0"
19
+ "version": "1.705.0"
20
20
  }