@headspace/protos-events 1.825.0 → 1.826.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
@@ -71957,6 +71957,179 @@ export namespace CmsAccessEnrollmentInitiated {
71957
71957
  type $Shape = CmsAccessEnrollmentInitiated.$Properties;
71958
71958
  }
71959
71959
 
71960
+ /** CmsAccessExclusionCriteria enum. */
71961
+ export enum CmsAccessExclusionCriteria {
71962
+
71963
+ /** CMS_ACCESS_EXCLUSION_CRITERIA_UNKNOWN value */
71964
+ CMS_ACCESS_EXCLUSION_CRITERIA_UNKNOWN = 0,
71965
+
71966
+ /** CMS_ACCESS_EXCLUSION_CRITERIA_SUICIDAL_IDEATION value */
71967
+ CMS_ACCESS_EXCLUSION_CRITERIA_SUICIDAL_IDEATION = 1,
71968
+
71969
+ /** CMS_ACCESS_EXCLUSION_CRITERIA_DEMENTIA value */
71970
+ CMS_ACCESS_EXCLUSION_CRITERIA_DEMENTIA = 2,
71971
+
71972
+ /** CMS_ACCESS_EXCLUSION_CRITERIA_PSYCHOTIC_DISORDER value */
71973
+ CMS_ACCESS_EXCLUSION_CRITERIA_PSYCHOTIC_DISORDER = 3,
71974
+
71975
+ /** CMS_ACCESS_EXCLUSION_CRITERIA_EATING_DISORDER value */
71976
+ CMS_ACCESS_EXCLUSION_CRITERIA_EATING_DISORDER = 4,
71977
+
71978
+ /** CMS_ACCESS_EXCLUSION_CRITERIA_PREGNANCY value */
71979
+ CMS_ACCESS_EXCLUSION_CRITERIA_PREGNANCY = 5,
71980
+
71981
+ /** CMS_ACCESS_EXCLUSION_CRITERIA_FRAILTY value */
71982
+ CMS_ACCESS_EXCLUSION_CRITERIA_FRAILTY = 6,
71983
+
71984
+ /** CMS_ACCESS_EXCLUSION_CRITERIA_MINOR value */
71985
+ CMS_ACCESS_EXCLUSION_CRITERIA_MINOR = 7
71986
+ }
71987
+
71988
+ /**
71989
+ * Properties of a CmsAccessEnrollmentExcluded.
71990
+ * @deprecated Use CmsAccessEnrollmentExcluded.$Properties instead.
71991
+ */
71992
+ export interface ICmsAccessEnrollmentExcluded extends CmsAccessEnrollmentExcluded.$Properties {
71993
+ }
71994
+
71995
+ /**
71996
+ * Published when hs-cms-access-service excludes a beneficiary at pre-flight screening
71997
+ * (CREATED → EXCLUDED) without calling CMS. Fired after CmsAccessEnrollmentInitiated
71998
+ * for the same tracking_id (ADR-005 event ordering:
71999
+ * https://github.com/HeadspaceMeditation/hs-cms-access-service/pull/59).
72000
+ * Used by Data Engineering for per-criteria exclusion rates (PRD §3.41;
72001
+ * https://headspace.atlassian.net/browse/HPSO-1345). SNS/DE wiring:
72002
+ * https://headspace.atlassian.net/browse/HPSO-1348.
72003
+ * Fired by: hs-cms-access-service
72004
+ * Responsible team: Health Plans
72005
+ */
72006
+ export class CmsAccessEnrollmentExcluded {
72007
+
72008
+ /**
72009
+ * Constructs a new CmsAccessEnrollmentExcluded.
72010
+ * @param [properties] Properties to set
72011
+ */
72012
+ constructor(properties?: CmsAccessEnrollmentExcluded.$Properties);
72013
+
72014
+ /** Unknown fields preserved while decoding */
72015
+ $unknowns?: Uint8Array[];
72016
+
72017
+ /** CmsAccessEnrollmentExcluded timestamp. */
72018
+ timestamp: (number|Long);
72019
+
72020
+ /** CmsAccessEnrollmentExcluded hsUserId. */
72021
+ hsUserId: string;
72022
+
72023
+ /** CmsAccessEnrollmentExcluded trackingId. */
72024
+ trackingId: string;
72025
+
72026
+ /** CmsAccessEnrollmentExcluded criteria. */
72027
+ criteria: CmsAccessExclusionCriteria[];
72028
+
72029
+ /**
72030
+ * Creates a new CmsAccessEnrollmentExcluded instance using the specified properties.
72031
+ * @param [properties] Properties to set
72032
+ * @returns CmsAccessEnrollmentExcluded instance
72033
+ */
72034
+ static create(properties: CmsAccessEnrollmentExcluded.$Shape): CmsAccessEnrollmentExcluded & CmsAccessEnrollmentExcluded.$Shape;
72035
+ static create(properties?: CmsAccessEnrollmentExcluded.$Properties): CmsAccessEnrollmentExcluded;
72036
+
72037
+ /**
72038
+ * Encodes the specified CmsAccessEnrollmentExcluded message. Does not implicitly {@link CmsAccessEnrollmentExcluded.verify|verify} messages.
72039
+ * @param message CmsAccessEnrollmentExcluded message or plain object to encode
72040
+ * @param [writer] Writer to encode to
72041
+ * @returns Writer
72042
+ */
72043
+ static encode(message: CmsAccessEnrollmentExcluded.$Properties, writer?: $protobuf.Writer): $protobuf.Writer;
72044
+
72045
+ /**
72046
+ * Encodes the specified CmsAccessEnrollmentExcluded message, length delimited. Does not implicitly {@link CmsAccessEnrollmentExcluded.verify|verify} messages.
72047
+ * @param message CmsAccessEnrollmentExcluded message or plain object to encode
72048
+ * @param [writer] Writer to encode to
72049
+ * @returns Writer
72050
+ */
72051
+ static encodeDelimited(message: CmsAccessEnrollmentExcluded.$Properties, writer?: $protobuf.Writer): $protobuf.Writer;
72052
+
72053
+ /**
72054
+ * Decodes a CmsAccessEnrollmentExcluded message from the specified reader or buffer.
72055
+ * @param reader Reader or buffer to decode from
72056
+ * @param [length] Message length if known beforehand
72057
+ * @returns {CmsAccessEnrollmentExcluded & CmsAccessEnrollmentExcluded.$Shape} CmsAccessEnrollmentExcluded
72058
+ * @throws {Error} If the payload is not a reader or valid buffer
72059
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
72060
+ */
72061
+ static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): CmsAccessEnrollmentExcluded & CmsAccessEnrollmentExcluded.$Shape;
72062
+
72063
+ /**
72064
+ * Decodes a CmsAccessEnrollmentExcluded message from the specified reader or buffer, length delimited.
72065
+ * @param reader Reader or buffer to decode from
72066
+ * @returns {CmsAccessEnrollmentExcluded & CmsAccessEnrollmentExcluded.$Shape} CmsAccessEnrollmentExcluded
72067
+ * @throws {Error} If the payload is not a reader or valid buffer
72068
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
72069
+ */
72070
+ static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): CmsAccessEnrollmentExcluded & CmsAccessEnrollmentExcluded.$Shape;
72071
+
72072
+ /**
72073
+ * Verifies a CmsAccessEnrollmentExcluded message.
72074
+ * @param message Plain object to verify
72075
+ * @returns `null` if valid, otherwise the reason why it is not
72076
+ */
72077
+ static verify(message: { [k: string]: any }): (string|null);
72078
+
72079
+ /**
72080
+ * Creates a CmsAccessEnrollmentExcluded message from a plain object. Also converts values to their respective internal types.
72081
+ * @param object Plain object
72082
+ * @returns CmsAccessEnrollmentExcluded
72083
+ */
72084
+ static fromObject(object: { [k: string]: any }): CmsAccessEnrollmentExcluded;
72085
+
72086
+ /**
72087
+ * Creates a plain object from a CmsAccessEnrollmentExcluded message. Also converts values to other types if specified.
72088
+ * @param message CmsAccessEnrollmentExcluded
72089
+ * @param [options] Conversion options
72090
+ * @returns Plain object
72091
+ */
72092
+ static toObject(message: CmsAccessEnrollmentExcluded, options?: $protobuf.IConversionOptions): { [k: string]: any };
72093
+
72094
+ /**
72095
+ * Converts this CmsAccessEnrollmentExcluded to JSON.
72096
+ * @returns JSON object
72097
+ */
72098
+ toJSON(): { [k: string]: any };
72099
+
72100
+ /**
72101
+ * Gets the type url for CmsAccessEnrollmentExcluded
72102
+ * @param [prefix] Custom type url prefix, defaults to `"type.googleapis.com"`
72103
+ * @returns The type url
72104
+ */
72105
+ static getTypeUrl(prefix?: string): string;
72106
+ }
72107
+
72108
+ export namespace CmsAccessEnrollmentExcluded {
72109
+
72110
+ /** Properties of a CmsAccessEnrollmentExcluded. */
72111
+ interface $Properties {
72112
+
72113
+ /** CmsAccessEnrollmentExcluded timestamp */
72114
+ timestamp?: (number|Long|null);
72115
+
72116
+ /** CmsAccessEnrollmentExcluded hsUserId */
72117
+ hsUserId?: (string|null);
72118
+
72119
+ /** CmsAccessEnrollmentExcluded trackingId */
72120
+ trackingId?: (string|null);
72121
+
72122
+ /** CmsAccessEnrollmentExcluded criteria */
72123
+ criteria?: (CmsAccessExclusionCriteria[]|null);
72124
+
72125
+ /** Unknown fields preserved while decoding */
72126
+ $unknowns?: Uint8Array[];
72127
+ }
72128
+
72129
+ /** Shape of a CmsAccessEnrollmentExcluded. */
72130
+ type $Shape = CmsAccessEnrollmentExcluded.$Properties;
72131
+ }
72132
+
71960
72133
  /**
71961
72134
  * Properties of a TaggedCustomField.
71962
72135
  * @deprecated Use TaggedCustomField.$Properties instead.
package/lib/index.js CHANGED
@@ -208922,6 +208922,465 @@ $root.CmsAccessEnrollmentInitiated = (function() {
208922
208922
  return CmsAccessEnrollmentInitiated;
208923
208923
  })();
208924
208924
 
208925
+ /**
208926
+ * CmsAccessExclusionCriteria enum.
208927
+ * @name CmsAccessExclusionCriteria
208928
+ * @enum {number}
208929
+ * @property {number} CMS_ACCESS_EXCLUSION_CRITERIA_UNKNOWN=0 CMS_ACCESS_EXCLUSION_CRITERIA_UNKNOWN value
208930
+ * @property {number} CMS_ACCESS_EXCLUSION_CRITERIA_SUICIDAL_IDEATION=1 CMS_ACCESS_EXCLUSION_CRITERIA_SUICIDAL_IDEATION value
208931
+ * @property {number} CMS_ACCESS_EXCLUSION_CRITERIA_DEMENTIA=2 CMS_ACCESS_EXCLUSION_CRITERIA_DEMENTIA value
208932
+ * @property {number} CMS_ACCESS_EXCLUSION_CRITERIA_PSYCHOTIC_DISORDER=3 CMS_ACCESS_EXCLUSION_CRITERIA_PSYCHOTIC_DISORDER value
208933
+ * @property {number} CMS_ACCESS_EXCLUSION_CRITERIA_EATING_DISORDER=4 CMS_ACCESS_EXCLUSION_CRITERIA_EATING_DISORDER value
208934
+ * @property {number} CMS_ACCESS_EXCLUSION_CRITERIA_PREGNANCY=5 CMS_ACCESS_EXCLUSION_CRITERIA_PREGNANCY value
208935
+ * @property {number} CMS_ACCESS_EXCLUSION_CRITERIA_FRAILTY=6 CMS_ACCESS_EXCLUSION_CRITERIA_FRAILTY value
208936
+ * @property {number} CMS_ACCESS_EXCLUSION_CRITERIA_MINOR=7 CMS_ACCESS_EXCLUSION_CRITERIA_MINOR value
208937
+ */
208938
+ $root.CmsAccessExclusionCriteria = (function() {
208939
+ var valuesById = {}, values = Object.create(valuesById);
208940
+ values[valuesById[0] = "CMS_ACCESS_EXCLUSION_CRITERIA_UNKNOWN"] = 0;
208941
+ values[valuesById[1] = "CMS_ACCESS_EXCLUSION_CRITERIA_SUICIDAL_IDEATION"] = 1;
208942
+ values[valuesById[2] = "CMS_ACCESS_EXCLUSION_CRITERIA_DEMENTIA"] = 2;
208943
+ values[valuesById[3] = "CMS_ACCESS_EXCLUSION_CRITERIA_PSYCHOTIC_DISORDER"] = 3;
208944
+ values[valuesById[4] = "CMS_ACCESS_EXCLUSION_CRITERIA_EATING_DISORDER"] = 4;
208945
+ values[valuesById[5] = "CMS_ACCESS_EXCLUSION_CRITERIA_PREGNANCY"] = 5;
208946
+ values[valuesById[6] = "CMS_ACCESS_EXCLUSION_CRITERIA_FRAILTY"] = 6;
208947
+ values[valuesById[7] = "CMS_ACCESS_EXCLUSION_CRITERIA_MINOR"] = 7;
208948
+ return values;
208949
+ })();
208950
+
208951
+ $root.CmsAccessEnrollmentExcluded = (function() {
208952
+
208953
+ /**
208954
+ * Properties of a CmsAccessEnrollmentExcluded.
208955
+ * @typedef {Object} CmsAccessEnrollmentExcluded.$Properties
208956
+ * @property {number|Long|null} [timestamp] CmsAccessEnrollmentExcluded timestamp
208957
+ * @property {string|null} [hsUserId] CmsAccessEnrollmentExcluded hsUserId
208958
+ * @property {string|null} [trackingId] CmsAccessEnrollmentExcluded trackingId
208959
+ * @property {Array.<CmsAccessExclusionCriteria>|null} [criteria] CmsAccessEnrollmentExcluded criteria
208960
+ * @property {Array.<Uint8Array>} [$unknowns] Unknown fields preserved while decoding
208961
+ */
208962
+
208963
+ /**
208964
+ * Properties of a CmsAccessEnrollmentExcluded.
208965
+ * @name ICmsAccessEnrollmentExcluded
208966
+ * @interface ICmsAccessEnrollmentExcluded
208967
+ * @augments CmsAccessEnrollmentExcluded.$Properties
208968
+ * @deprecated Use CmsAccessEnrollmentExcluded.$Properties instead.
208969
+ */
208970
+
208971
+ /**
208972
+ * Shape of a CmsAccessEnrollmentExcluded.
208973
+ * @typedef {CmsAccessEnrollmentExcluded.$Properties} CmsAccessEnrollmentExcluded.$Shape
208974
+ */
208975
+
208976
+ /**
208977
+ * Constructs a new CmsAccessEnrollmentExcluded.
208978
+ * @name CmsAccessEnrollmentExcluded
208979
+ * @classdesc Published when hs-cms-access-service excludes a beneficiary at pre-flight screening
208980
+ * (CREATED → EXCLUDED) without calling CMS. Fired after CmsAccessEnrollmentInitiated
208981
+ * for the same tracking_id (ADR-005 event ordering:
208982
+ * https://github.com/HeadspaceMeditation/hs-cms-access-service/pull/59).
208983
+ * Used by Data Engineering for per-criteria exclusion rates (PRD §3.41;
208984
+ * https://headspace.atlassian.net/browse/HPSO-1345). SNS/DE wiring:
208985
+ * https://headspace.atlassian.net/browse/HPSO-1348.
208986
+ * Fired by: hs-cms-access-service
208987
+ * Responsible team: Health Plans
208988
+ * @constructor
208989
+ * @param {CmsAccessEnrollmentExcluded.$Properties=} [properties] Properties to set
208990
+ * @property {Array.<Uint8Array>} [$unknowns] Unknown fields preserved while decoding
208991
+ */
208992
+ function CmsAccessEnrollmentExcluded(properties) {
208993
+ this.criteria = [];
208994
+ if (properties)
208995
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
208996
+ if (properties[keys[i]] != null && keys[i] !== "__proto__")
208997
+ this[keys[i]] = properties[keys[i]];
208998
+ }
208999
+
209000
+ /**
209001
+ * CmsAccessEnrollmentExcluded timestamp.
209002
+ * @member {number|Long} timestamp
209003
+ * @memberof CmsAccessEnrollmentExcluded
209004
+ * @instance
209005
+ */
209006
+ CmsAccessEnrollmentExcluded.prototype.timestamp = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
209007
+
209008
+ /**
209009
+ * CmsAccessEnrollmentExcluded hsUserId.
209010
+ * @member {string} hsUserId
209011
+ * @memberof CmsAccessEnrollmentExcluded
209012
+ * @instance
209013
+ */
209014
+ CmsAccessEnrollmentExcluded.prototype.hsUserId = "";
209015
+
209016
+ /**
209017
+ * CmsAccessEnrollmentExcluded trackingId.
209018
+ * @member {string} trackingId
209019
+ * @memberof CmsAccessEnrollmentExcluded
209020
+ * @instance
209021
+ */
209022
+ CmsAccessEnrollmentExcluded.prototype.trackingId = "";
209023
+
209024
+ /**
209025
+ * CmsAccessEnrollmentExcluded criteria.
209026
+ * @member {Array.<CmsAccessExclusionCriteria>} criteria
209027
+ * @memberof CmsAccessEnrollmentExcluded
209028
+ * @instance
209029
+ */
209030
+ CmsAccessEnrollmentExcluded.prototype.criteria = $util.emptyArray;
209031
+
209032
+ /**
209033
+ * Creates a new CmsAccessEnrollmentExcluded instance using the specified properties.
209034
+ * @function create
209035
+ * @memberof CmsAccessEnrollmentExcluded
209036
+ * @static
209037
+ * @param {CmsAccessEnrollmentExcluded.$Properties=} [properties] Properties to set
209038
+ * @returns {CmsAccessEnrollmentExcluded} CmsAccessEnrollmentExcluded instance
209039
+ * @type {{
209040
+ * (properties: CmsAccessEnrollmentExcluded.$Shape): CmsAccessEnrollmentExcluded & CmsAccessEnrollmentExcluded.$Shape;
209041
+ * (properties?: CmsAccessEnrollmentExcluded.$Properties): CmsAccessEnrollmentExcluded;
209042
+ * }}
209043
+ */
209044
+ CmsAccessEnrollmentExcluded.create = function create(properties) {
209045
+ return new CmsAccessEnrollmentExcluded(properties);
209046
+ };
209047
+
209048
+ /**
209049
+ * Encodes the specified CmsAccessEnrollmentExcluded message. Does not implicitly {@link CmsAccessEnrollmentExcluded.verify|verify} messages.
209050
+ * @function encode
209051
+ * @memberof CmsAccessEnrollmentExcluded
209052
+ * @static
209053
+ * @param {CmsAccessEnrollmentExcluded.$Properties} message CmsAccessEnrollmentExcluded message or plain object to encode
209054
+ * @param {$protobuf.Writer} [writer] Writer to encode to
209055
+ * @returns {$protobuf.Writer} Writer
209056
+ */
209057
+ CmsAccessEnrollmentExcluded.encode = function encode(message, writer) {
209058
+ if (!writer)
209059
+ writer = $Writer.create();
209060
+ if (message.timestamp != null && Object.hasOwnProperty.call(message, "timestamp"))
209061
+ writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.timestamp);
209062
+ if (message.hsUserId != null && Object.hasOwnProperty.call(message, "hsUserId"))
209063
+ writer.uint32(/* id 2, wireType 2 =*/18).string(message.hsUserId);
209064
+ if (message.trackingId != null && Object.hasOwnProperty.call(message, "trackingId"))
209065
+ writer.uint32(/* id 3, wireType 2 =*/26).string(message.trackingId);
209066
+ if (message.criteria != null && message.criteria.length) {
209067
+ writer.uint32(/* id 4, wireType 2 =*/34).fork();
209068
+ for (var i = 0; i < message.criteria.length; ++i)
209069
+ writer.int32(message.criteria[i]);
209070
+ writer.ldelim();
209071
+ }
209072
+ if (message.$unknowns != null && Object.hasOwnProperty.call(message, "$unknowns"))
209073
+ for (var i = 0; i < message.$unknowns.length; ++i)
209074
+ writer.raw(message.$unknowns[i]);
209075
+ return writer;
209076
+ };
209077
+
209078
+ /**
209079
+ * Encodes the specified CmsAccessEnrollmentExcluded message, length delimited. Does not implicitly {@link CmsAccessEnrollmentExcluded.verify|verify} messages.
209080
+ * @function encodeDelimited
209081
+ * @memberof CmsAccessEnrollmentExcluded
209082
+ * @static
209083
+ * @param {CmsAccessEnrollmentExcluded.$Properties} message CmsAccessEnrollmentExcluded message or plain object to encode
209084
+ * @param {$protobuf.Writer} [writer] Writer to encode to
209085
+ * @returns {$protobuf.Writer} Writer
209086
+ */
209087
+ CmsAccessEnrollmentExcluded.encodeDelimited = function encodeDelimited(message, writer) {
209088
+ return this.encode(message, writer).ldelim();
209089
+ };
209090
+
209091
+ /**
209092
+ * Decodes a CmsAccessEnrollmentExcluded message from the specified reader or buffer.
209093
+ * @function decode
209094
+ * @memberof CmsAccessEnrollmentExcluded
209095
+ * @static
209096
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
209097
+ * @param {number} [length] Message length if known beforehand
209098
+ * @returns {CmsAccessEnrollmentExcluded & CmsAccessEnrollmentExcluded.$Shape} CmsAccessEnrollmentExcluded
209099
+ * @throws {Error} If the payload is not a reader or valid buffer
209100
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
209101
+ */
209102
+ CmsAccessEnrollmentExcluded.decode = function decode(reader, length, _end, _depth, _target) {
209103
+ if (!(reader instanceof $Reader))
209104
+ reader = $Reader.create(reader);
209105
+ if (_depth === undefined)
209106
+ _depth = 0;
209107
+ if (_depth > $Reader.recursionLimit)
209108
+ throw Error("max depth exceeded");
209109
+ var end = length === undefined ? reader.len : reader.pos + length, message = _target || new $root.CmsAccessEnrollmentExcluded(), value;
209110
+ while (reader.pos < end) {
209111
+ var start = reader.pos;
209112
+ var tag = reader.tag();
209113
+ if (tag === _end) {
209114
+ _end = undefined;
209115
+ break;
209116
+ }
209117
+ var wireType = tag & 7;
209118
+ switch (tag >>>= 3) {
209119
+ case 1: {
209120
+ if (wireType !== 0)
209121
+ break;
209122
+ if (typeof (value = reader.uint64()) === "object" ? value.low || value.high : value !== 0)
209123
+ message.timestamp = value;
209124
+ else
209125
+ delete message.timestamp;
209126
+ continue;
209127
+ }
209128
+ case 2: {
209129
+ if (wireType !== 2)
209130
+ break;
209131
+ if ((value = reader.string()).length)
209132
+ message.hsUserId = value;
209133
+ else
209134
+ delete message.hsUserId;
209135
+ continue;
209136
+ }
209137
+ case 3: {
209138
+ if (wireType !== 2)
209139
+ break;
209140
+ if ((value = reader.string()).length)
209141
+ message.trackingId = value;
209142
+ else
209143
+ delete message.trackingId;
209144
+ continue;
209145
+ }
209146
+ case 4: {
209147
+ if (wireType === 2) {
209148
+ if (!(message.criteria && message.criteria.length))
209149
+ message.criteria = [];
209150
+ var end2 = reader.uint32() + reader.pos;
209151
+ while (reader.pos < end2)
209152
+ message.criteria.push(reader.int32());
209153
+ continue;
209154
+ }
209155
+ if (wireType !== 0)
209156
+ break;
209157
+ if (!(message.criteria && message.criteria.length))
209158
+ message.criteria = [];
209159
+ message.criteria.push(reader.int32());
209160
+ continue;
209161
+ }
209162
+ }
209163
+ reader.skipType(wireType, _depth, tag);
209164
+ $util.makeProp(message, "$unknowns", false);
209165
+ (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos));
209166
+ }
209167
+ if (_end !== undefined)
209168
+ throw Error("missing end group");
209169
+ return message;
209170
+ };
209171
+
209172
+ /**
209173
+ * Decodes a CmsAccessEnrollmentExcluded message from the specified reader or buffer, length delimited.
209174
+ * @function decodeDelimited
209175
+ * @memberof CmsAccessEnrollmentExcluded
209176
+ * @static
209177
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
209178
+ * @returns {CmsAccessEnrollmentExcluded & CmsAccessEnrollmentExcluded.$Shape} CmsAccessEnrollmentExcluded
209179
+ * @throws {Error} If the payload is not a reader or valid buffer
209180
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
209181
+ */
209182
+ CmsAccessEnrollmentExcluded.decodeDelimited = function decodeDelimited(reader) {
209183
+ if (!(reader instanceof $Reader))
209184
+ reader = new $Reader(reader);
209185
+ return this.decode(reader, reader.uint32());
209186
+ };
209187
+
209188
+ /**
209189
+ * Verifies a CmsAccessEnrollmentExcluded message.
209190
+ * @function verify
209191
+ * @memberof CmsAccessEnrollmentExcluded
209192
+ * @static
209193
+ * @param {Object.<string,*>} message Plain object to verify
209194
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
209195
+ */
209196
+ CmsAccessEnrollmentExcluded.verify = function verify(message, _depth) {
209197
+ if (typeof message !== "object" || message === null)
209198
+ return "object expected";
209199
+ if (_depth === undefined)
209200
+ _depth = 0;
209201
+ if (_depth > $util.recursionLimit)
209202
+ return "max depth exceeded";
209203
+ if (message.timestamp != null && message.hasOwnProperty("timestamp"))
209204
+ if (!$util.isInteger(message.timestamp) && !(message.timestamp && $util.isInteger(message.timestamp.low) && $util.isInteger(message.timestamp.high)))
209205
+ return "timestamp: integer|Long expected";
209206
+ if (message.hsUserId != null && message.hasOwnProperty("hsUserId"))
209207
+ if (!$util.isString(message.hsUserId))
209208
+ return "hsUserId: string expected";
209209
+ if (message.trackingId != null && message.hasOwnProperty("trackingId"))
209210
+ if (!$util.isString(message.trackingId))
209211
+ return "trackingId: string expected";
209212
+ if (message.criteria != null && message.hasOwnProperty("criteria")) {
209213
+ if (!Array.isArray(message.criteria))
209214
+ return "criteria: array expected";
209215
+ for (var i = 0; i < message.criteria.length; ++i)
209216
+ switch (message.criteria[i]) {
209217
+ default:
209218
+ return "criteria: enum value[] expected";
209219
+ case 0:
209220
+ case 1:
209221
+ case 2:
209222
+ case 3:
209223
+ case 4:
209224
+ case 5:
209225
+ case 6:
209226
+ case 7:
209227
+ break;
209228
+ }
209229
+ }
209230
+ return null;
209231
+ };
209232
+
209233
+ /**
209234
+ * Creates a CmsAccessEnrollmentExcluded message from a plain object. Also converts values to their respective internal types.
209235
+ * @function fromObject
209236
+ * @memberof CmsAccessEnrollmentExcluded
209237
+ * @static
209238
+ * @param {Object.<string,*>} object Plain object
209239
+ * @returns {CmsAccessEnrollmentExcluded} CmsAccessEnrollmentExcluded
209240
+ */
209241
+ CmsAccessEnrollmentExcluded.fromObject = function fromObject(object, _depth) {
209242
+ if (object instanceof $root.CmsAccessEnrollmentExcluded)
209243
+ return object;
209244
+ if (_depth === undefined)
209245
+ _depth = 0;
209246
+ if (_depth > $util.recursionLimit)
209247
+ throw Error("max depth exceeded");
209248
+ var message = new $root.CmsAccessEnrollmentExcluded();
209249
+ if (object.timestamp != null)
209250
+ if (typeof object.timestamp === "object" ? object.timestamp.low || object.timestamp.high : Number(object.timestamp) !== 0)
209251
+ if ($util.Long)
209252
+ (message.timestamp = $util.Long.fromValue(object.timestamp)).unsigned = true;
209253
+ else if (typeof object.timestamp === "string")
209254
+ message.timestamp = parseInt(object.timestamp, 10);
209255
+ else if (typeof object.timestamp === "number")
209256
+ message.timestamp = object.timestamp;
209257
+ else if (typeof object.timestamp === "object")
209258
+ message.timestamp = new $util.LongBits(object.timestamp.low >>> 0, object.timestamp.high >>> 0).toNumber(true);
209259
+ if (object.hsUserId != null)
209260
+ if (typeof object.hsUserId !== "string" || object.hsUserId.length)
209261
+ message.hsUserId = String(object.hsUserId);
209262
+ if (object.trackingId != null)
209263
+ if (typeof object.trackingId !== "string" || object.trackingId.length)
209264
+ message.trackingId = String(object.trackingId);
209265
+ if (object.criteria) {
209266
+ if (!Array.isArray(object.criteria))
209267
+ throw TypeError(".CmsAccessEnrollmentExcluded.criteria: array expected");
209268
+ message.criteria = Array(object.criteria.length);
209269
+ for (var i = 0; i < object.criteria.length; ++i)
209270
+ switch (object.criteria[i]) {
209271
+ default:
209272
+ if (typeof object.criteria[i] === "number") {
209273
+ message.criteria[i] = object.criteria[i];
209274
+ break;
209275
+ }
209276
+ case "CMS_ACCESS_EXCLUSION_CRITERIA_UNKNOWN":
209277
+ case 0:
209278
+ message.criteria[i] = 0;
209279
+ break;
209280
+ case "CMS_ACCESS_EXCLUSION_CRITERIA_SUICIDAL_IDEATION":
209281
+ case 1:
209282
+ message.criteria[i] = 1;
209283
+ break;
209284
+ case "CMS_ACCESS_EXCLUSION_CRITERIA_DEMENTIA":
209285
+ case 2:
209286
+ message.criteria[i] = 2;
209287
+ break;
209288
+ case "CMS_ACCESS_EXCLUSION_CRITERIA_PSYCHOTIC_DISORDER":
209289
+ case 3:
209290
+ message.criteria[i] = 3;
209291
+ break;
209292
+ case "CMS_ACCESS_EXCLUSION_CRITERIA_EATING_DISORDER":
209293
+ case 4:
209294
+ message.criteria[i] = 4;
209295
+ break;
209296
+ case "CMS_ACCESS_EXCLUSION_CRITERIA_PREGNANCY":
209297
+ case 5:
209298
+ message.criteria[i] = 5;
209299
+ break;
209300
+ case "CMS_ACCESS_EXCLUSION_CRITERIA_FRAILTY":
209301
+ case 6:
209302
+ message.criteria[i] = 6;
209303
+ break;
209304
+ case "CMS_ACCESS_EXCLUSION_CRITERIA_MINOR":
209305
+ case 7:
209306
+ message.criteria[i] = 7;
209307
+ break;
209308
+ }
209309
+ }
209310
+ return message;
209311
+ };
209312
+
209313
+ /**
209314
+ * Creates a plain object from a CmsAccessEnrollmentExcluded message. Also converts values to other types if specified.
209315
+ * @function toObject
209316
+ * @memberof CmsAccessEnrollmentExcluded
209317
+ * @static
209318
+ * @param {CmsAccessEnrollmentExcluded} message CmsAccessEnrollmentExcluded
209319
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
209320
+ * @returns {Object.<string,*>} Plain object
209321
+ */
209322
+ CmsAccessEnrollmentExcluded.toObject = function toObject(message, options) {
209323
+ if (!options)
209324
+ options = {};
209325
+ var object = {};
209326
+ if (options.arrays || options.defaults)
209327
+ object.criteria = [];
209328
+ if (options.defaults) {
209329
+ if ($util.Long) {
209330
+ var long = new $util.Long(0, 0, true);
209331
+ object.timestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : typeof BigInt !== "undefined" && options.longs === BigInt ? long.toBigInt() : long;
209332
+ } else
209333
+ object.timestamp = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0;
209334
+ object.hsUserId = "";
209335
+ object.trackingId = "";
209336
+ }
209337
+ if (message.timestamp != null && message.hasOwnProperty("timestamp"))
209338
+ if (typeof BigInt !== "undefined" && options.longs === BigInt)
209339
+ object.timestamp = typeof message.timestamp === "number" ? BigInt(message.timestamp) : $util.Long.fromBits(message.timestamp.low >>> 0, message.timestamp.high >>> 0, true).toBigInt();
209340
+ else if (typeof message.timestamp === "number")
209341
+ object.timestamp = options.longs === String ? String(message.timestamp) : message.timestamp;
209342
+ else
209343
+ 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;
209344
+ if (message.hsUserId != null && message.hasOwnProperty("hsUserId"))
209345
+ object.hsUserId = message.hsUserId;
209346
+ if (message.trackingId != null && message.hasOwnProperty("trackingId"))
209347
+ object.trackingId = message.trackingId;
209348
+ if (message.criteria && message.criteria.length) {
209349
+ object.criteria = Array(message.criteria.length);
209350
+ for (var j = 0; j < message.criteria.length; ++j)
209351
+ object.criteria[j] = options.enums === String ? $root.CmsAccessExclusionCriteria[message.criteria[j]] === undefined ? message.criteria[j] : $root.CmsAccessExclusionCriteria[message.criteria[j]] : message.criteria[j];
209352
+ }
209353
+ return object;
209354
+ };
209355
+
209356
+ /**
209357
+ * Converts this CmsAccessEnrollmentExcluded to JSON.
209358
+ * @function toJSON
209359
+ * @memberof CmsAccessEnrollmentExcluded
209360
+ * @instance
209361
+ * @returns {Object.<string,*>} JSON object
209362
+ */
209363
+ CmsAccessEnrollmentExcluded.prototype.toJSON = function toJSON() {
209364
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
209365
+ };
209366
+
209367
+ /**
209368
+ * Gets the type url for CmsAccessEnrollmentExcluded
209369
+ * @function getTypeUrl
209370
+ * @memberof CmsAccessEnrollmentExcluded
209371
+ * @static
209372
+ * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"`
209373
+ * @returns {string} The type url
209374
+ */
209375
+ CmsAccessEnrollmentExcluded.getTypeUrl = function getTypeUrl(prefix) {
209376
+ if (prefix === undefined)
209377
+ prefix = "type.googleapis.com";
209378
+ return prefix + "/CmsAccessEnrollmentExcluded";
209379
+ };
209380
+
209381
+ return CmsAccessEnrollmentExcluded;
209382
+ })();
209383
+
208925
209384
  $root.TaggedCustomField = (function() {
208926
209385
 
208927
209386
  /**
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.825.0"
19
+ "version": "1.826.0"
20
20
  }