@headspace/protos-events 1.88.0 → 1.89.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
@@ -3988,6 +3988,114 @@ export class SurveyAnswer implements ISurveyAnswer {
3988
3988
  public toJSON(): { [k: string]: any };
3989
3989
  }
3990
3990
 
3991
+ /** Properties of an AssessmentScore. */
3992
+ export interface IAssessmentScore {
3993
+
3994
+ /** AssessmentScore userId */
3995
+ userId?: (string|null);
3996
+
3997
+ /** AssessmentScore surveyId */
3998
+ surveyId?: (string|null);
3999
+
4000
+ /** AssessmentScore score */
4001
+ score?: (number|null);
4002
+
4003
+ /** AssessmentScore completedAtIsoDate */
4004
+ completedAtIsoDate?: (string|null);
4005
+ }
4006
+
4007
+ /** Represents an AssessmentScore. */
4008
+ export class AssessmentScore implements IAssessmentScore {
4009
+
4010
+ /**
4011
+ * Constructs a new AssessmentScore.
4012
+ * @param [properties] Properties to set
4013
+ */
4014
+ constructor(properties?: IAssessmentScore);
4015
+
4016
+ /** AssessmentScore userId. */
4017
+ public userId: string;
4018
+
4019
+ /** AssessmentScore surveyId. */
4020
+ public surveyId: string;
4021
+
4022
+ /** AssessmentScore score. */
4023
+ public score: number;
4024
+
4025
+ /** AssessmentScore completedAtIsoDate. */
4026
+ public completedAtIsoDate: string;
4027
+
4028
+ /**
4029
+ * Creates a new AssessmentScore instance using the specified properties.
4030
+ * @param [properties] Properties to set
4031
+ * @returns AssessmentScore instance
4032
+ */
4033
+ public static create(properties?: IAssessmentScore): AssessmentScore;
4034
+
4035
+ /**
4036
+ * Encodes the specified AssessmentScore message. Does not implicitly {@link AssessmentScore.verify|verify} messages.
4037
+ * @param message AssessmentScore message or plain object to encode
4038
+ * @param [writer] Writer to encode to
4039
+ * @returns Writer
4040
+ */
4041
+ public static encode(message: IAssessmentScore, writer?: $protobuf.Writer): $protobuf.Writer;
4042
+
4043
+ /**
4044
+ * Encodes the specified AssessmentScore message, length delimited. Does not implicitly {@link AssessmentScore.verify|verify} messages.
4045
+ * @param message AssessmentScore message or plain object to encode
4046
+ * @param [writer] Writer to encode to
4047
+ * @returns Writer
4048
+ */
4049
+ public static encodeDelimited(message: IAssessmentScore, writer?: $protobuf.Writer): $protobuf.Writer;
4050
+
4051
+ /**
4052
+ * Decodes an AssessmentScore message from the specified reader or buffer.
4053
+ * @param reader Reader or buffer to decode from
4054
+ * @param [length] Message length if known beforehand
4055
+ * @returns AssessmentScore
4056
+ * @throws {Error} If the payload is not a reader or valid buffer
4057
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
4058
+ */
4059
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): AssessmentScore;
4060
+
4061
+ /**
4062
+ * Decodes an AssessmentScore message from the specified reader or buffer, length delimited.
4063
+ * @param reader Reader or buffer to decode from
4064
+ * @returns AssessmentScore
4065
+ * @throws {Error} If the payload is not a reader or valid buffer
4066
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
4067
+ */
4068
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): AssessmentScore;
4069
+
4070
+ /**
4071
+ * Verifies an AssessmentScore message.
4072
+ * @param message Plain object to verify
4073
+ * @returns `null` if valid, otherwise the reason why it is not
4074
+ */
4075
+ public static verify(message: { [k: string]: any }): (string|null);
4076
+
4077
+ /**
4078
+ * Creates an AssessmentScore message from a plain object. Also converts values to their respective internal types.
4079
+ * @param object Plain object
4080
+ * @returns AssessmentScore
4081
+ */
4082
+ public static fromObject(object: { [k: string]: any }): AssessmentScore;
4083
+
4084
+ /**
4085
+ * Creates a plain object from an AssessmentScore message. Also converts values to other types if specified.
4086
+ * @param message AssessmentScore
4087
+ * @param [options] Conversion options
4088
+ * @returns Plain object
4089
+ */
4090
+ public static toObject(message: AssessmentScore, options?: $protobuf.IConversionOptions): { [k: string]: any };
4091
+
4092
+ /**
4093
+ * Converts this AssessmentScore to JSON.
4094
+ * @returns JSON object
4095
+ */
4096
+ public toJSON(): { [k: string]: any };
4097
+ }
4098
+
3991
4099
  /** Properties of a BuddyAccepted. */
3992
4100
  export interface IBuddyAccepted {
3993
4101
 
package/lib/index.js CHANGED
@@ -9936,6 +9936,260 @@ $root.SurveyAnswer = (function() {
9936
9936
  return SurveyAnswer;
9937
9937
  })();
9938
9938
 
9939
+ $root.AssessmentScore = (function() {
9940
+
9941
+ /**
9942
+ * Properties of an AssessmentScore.
9943
+ * @exports IAssessmentScore
9944
+ * @interface IAssessmentScore
9945
+ * @property {string|null} [userId] AssessmentScore userId
9946
+ * @property {string|null} [surveyId] AssessmentScore surveyId
9947
+ * @property {number|null} [score] AssessmentScore score
9948
+ * @property {string|null} [completedAtIsoDate] AssessmentScore completedAtIsoDate
9949
+ */
9950
+
9951
+ /**
9952
+ * Constructs a new AssessmentScore.
9953
+ * @exports AssessmentScore
9954
+ * @classdesc Represents an AssessmentScore.
9955
+ * @implements IAssessmentScore
9956
+ * @constructor
9957
+ * @param {IAssessmentScore=} [properties] Properties to set
9958
+ */
9959
+ function AssessmentScore(properties) {
9960
+ if (properties)
9961
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
9962
+ if (properties[keys[i]] != null)
9963
+ this[keys[i]] = properties[keys[i]];
9964
+ }
9965
+
9966
+ /**
9967
+ * AssessmentScore userId.
9968
+ * @member {string} userId
9969
+ * @memberof AssessmentScore
9970
+ * @instance
9971
+ */
9972
+ AssessmentScore.prototype.userId = "";
9973
+
9974
+ /**
9975
+ * AssessmentScore surveyId.
9976
+ * @member {string} surveyId
9977
+ * @memberof AssessmentScore
9978
+ * @instance
9979
+ */
9980
+ AssessmentScore.prototype.surveyId = "";
9981
+
9982
+ /**
9983
+ * AssessmentScore score.
9984
+ * @member {number} score
9985
+ * @memberof AssessmentScore
9986
+ * @instance
9987
+ */
9988
+ AssessmentScore.prototype.score = 0;
9989
+
9990
+ /**
9991
+ * AssessmentScore completedAtIsoDate.
9992
+ * @member {string} completedAtIsoDate
9993
+ * @memberof AssessmentScore
9994
+ * @instance
9995
+ */
9996
+ AssessmentScore.prototype.completedAtIsoDate = "";
9997
+
9998
+ /**
9999
+ * Creates a new AssessmentScore instance using the specified properties.
10000
+ * @function create
10001
+ * @memberof AssessmentScore
10002
+ * @static
10003
+ * @param {IAssessmentScore=} [properties] Properties to set
10004
+ * @returns {AssessmentScore} AssessmentScore instance
10005
+ */
10006
+ AssessmentScore.create = function create(properties) {
10007
+ return new AssessmentScore(properties);
10008
+ };
10009
+
10010
+ /**
10011
+ * Encodes the specified AssessmentScore message. Does not implicitly {@link AssessmentScore.verify|verify} messages.
10012
+ * @function encode
10013
+ * @memberof AssessmentScore
10014
+ * @static
10015
+ * @param {IAssessmentScore} message AssessmentScore message or plain object to encode
10016
+ * @param {$protobuf.Writer} [writer] Writer to encode to
10017
+ * @returns {$protobuf.Writer} Writer
10018
+ */
10019
+ AssessmentScore.encode = function encode(message, writer) {
10020
+ if (!writer)
10021
+ writer = $Writer.create();
10022
+ if (message.userId != null && message.hasOwnProperty("userId"))
10023
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.userId);
10024
+ if (message.surveyId != null && message.hasOwnProperty("surveyId"))
10025
+ writer.uint32(/* id 2, wireType 2 =*/18).string(message.surveyId);
10026
+ if (message.score != null && message.hasOwnProperty("score"))
10027
+ writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.score);
10028
+ if (message.completedAtIsoDate != null && message.hasOwnProperty("completedAtIsoDate"))
10029
+ writer.uint32(/* id 4, wireType 2 =*/34).string(message.completedAtIsoDate);
10030
+ return writer;
10031
+ };
10032
+
10033
+ /**
10034
+ * Encodes the specified AssessmentScore message, length delimited. Does not implicitly {@link AssessmentScore.verify|verify} messages.
10035
+ * @function encodeDelimited
10036
+ * @memberof AssessmentScore
10037
+ * @static
10038
+ * @param {IAssessmentScore} message AssessmentScore message or plain object to encode
10039
+ * @param {$protobuf.Writer} [writer] Writer to encode to
10040
+ * @returns {$protobuf.Writer} Writer
10041
+ */
10042
+ AssessmentScore.encodeDelimited = function encodeDelimited(message, writer) {
10043
+ return this.encode(message, writer).ldelim();
10044
+ };
10045
+
10046
+ /**
10047
+ * Decodes an AssessmentScore message from the specified reader or buffer.
10048
+ * @function decode
10049
+ * @memberof AssessmentScore
10050
+ * @static
10051
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
10052
+ * @param {number} [length] Message length if known beforehand
10053
+ * @returns {AssessmentScore} AssessmentScore
10054
+ * @throws {Error} If the payload is not a reader or valid buffer
10055
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
10056
+ */
10057
+ AssessmentScore.decode = function decode(reader, length) {
10058
+ if (!(reader instanceof $Reader))
10059
+ reader = $Reader.create(reader);
10060
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.AssessmentScore();
10061
+ while (reader.pos < end) {
10062
+ var tag = reader.uint32();
10063
+ switch (tag >>> 3) {
10064
+ case 1:
10065
+ message.userId = reader.string();
10066
+ break;
10067
+ case 2:
10068
+ message.surveyId = reader.string();
10069
+ break;
10070
+ case 3:
10071
+ message.score = reader.uint32();
10072
+ break;
10073
+ case 4:
10074
+ message.completedAtIsoDate = reader.string();
10075
+ break;
10076
+ default:
10077
+ reader.skipType(tag & 7);
10078
+ break;
10079
+ }
10080
+ }
10081
+ return message;
10082
+ };
10083
+
10084
+ /**
10085
+ * Decodes an AssessmentScore message from the specified reader or buffer, length delimited.
10086
+ * @function decodeDelimited
10087
+ * @memberof AssessmentScore
10088
+ * @static
10089
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
10090
+ * @returns {AssessmentScore} AssessmentScore
10091
+ * @throws {Error} If the payload is not a reader or valid buffer
10092
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
10093
+ */
10094
+ AssessmentScore.decodeDelimited = function decodeDelimited(reader) {
10095
+ if (!(reader instanceof $Reader))
10096
+ reader = new $Reader(reader);
10097
+ return this.decode(reader, reader.uint32());
10098
+ };
10099
+
10100
+ /**
10101
+ * Verifies an AssessmentScore message.
10102
+ * @function verify
10103
+ * @memberof AssessmentScore
10104
+ * @static
10105
+ * @param {Object.<string,*>} message Plain object to verify
10106
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
10107
+ */
10108
+ AssessmentScore.verify = function verify(message) {
10109
+ if (typeof message !== "object" || message === null)
10110
+ return "object expected";
10111
+ if (message.userId != null && message.hasOwnProperty("userId"))
10112
+ if (!$util.isString(message.userId))
10113
+ return "userId: string expected";
10114
+ if (message.surveyId != null && message.hasOwnProperty("surveyId"))
10115
+ if (!$util.isString(message.surveyId))
10116
+ return "surveyId: string expected";
10117
+ if (message.score != null && message.hasOwnProperty("score"))
10118
+ if (!$util.isInteger(message.score))
10119
+ return "score: integer expected";
10120
+ if (message.completedAtIsoDate != null && message.hasOwnProperty("completedAtIsoDate"))
10121
+ if (!$util.isString(message.completedAtIsoDate))
10122
+ return "completedAtIsoDate: string expected";
10123
+ return null;
10124
+ };
10125
+
10126
+ /**
10127
+ * Creates an AssessmentScore message from a plain object. Also converts values to their respective internal types.
10128
+ * @function fromObject
10129
+ * @memberof AssessmentScore
10130
+ * @static
10131
+ * @param {Object.<string,*>} object Plain object
10132
+ * @returns {AssessmentScore} AssessmentScore
10133
+ */
10134
+ AssessmentScore.fromObject = function fromObject(object) {
10135
+ if (object instanceof $root.AssessmentScore)
10136
+ return object;
10137
+ var message = new $root.AssessmentScore();
10138
+ if (object.userId != null)
10139
+ message.userId = String(object.userId);
10140
+ if (object.surveyId != null)
10141
+ message.surveyId = String(object.surveyId);
10142
+ if (object.score != null)
10143
+ message.score = object.score >>> 0;
10144
+ if (object.completedAtIsoDate != null)
10145
+ message.completedAtIsoDate = String(object.completedAtIsoDate);
10146
+ return message;
10147
+ };
10148
+
10149
+ /**
10150
+ * Creates a plain object from an AssessmentScore message. Also converts values to other types if specified.
10151
+ * @function toObject
10152
+ * @memberof AssessmentScore
10153
+ * @static
10154
+ * @param {AssessmentScore} message AssessmentScore
10155
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
10156
+ * @returns {Object.<string,*>} Plain object
10157
+ */
10158
+ AssessmentScore.toObject = function toObject(message, options) {
10159
+ if (!options)
10160
+ options = {};
10161
+ var object = {};
10162
+ if (options.defaults) {
10163
+ object.userId = "";
10164
+ object.surveyId = "";
10165
+ object.score = 0;
10166
+ object.completedAtIsoDate = "";
10167
+ }
10168
+ if (message.userId != null && message.hasOwnProperty("userId"))
10169
+ object.userId = message.userId;
10170
+ if (message.surveyId != null && message.hasOwnProperty("surveyId"))
10171
+ object.surveyId = message.surveyId;
10172
+ if (message.score != null && message.hasOwnProperty("score"))
10173
+ object.score = message.score;
10174
+ if (message.completedAtIsoDate != null && message.hasOwnProperty("completedAtIsoDate"))
10175
+ object.completedAtIsoDate = message.completedAtIsoDate;
10176
+ return object;
10177
+ };
10178
+
10179
+ /**
10180
+ * Converts this AssessmentScore to JSON.
10181
+ * @function toJSON
10182
+ * @memberof AssessmentScore
10183
+ * @instance
10184
+ * @returns {Object.<string,*>} JSON object
10185
+ */
10186
+ AssessmentScore.prototype.toJSON = function toJSON() {
10187
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
10188
+ };
10189
+
10190
+ return AssessmentScore;
10191
+ })();
10192
+
9939
10193
  $root.BuddyAccepted = (function() {
9940
10194
 
9941
10195
  /**
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.88.0"
19
+ "version": "1.89.0"
20
20
  }