@headspace/protos-events 1.37.0 → 1.39.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/lib/index.d.ts +100 -198
  2. package/lib/index.js +577 -462
  3. package/package.json +1 -1
package/lib/index.js CHANGED
@@ -2544,6 +2544,28 @@ $root.subscription = (function() {
2544
2544
  return values;
2545
2545
  })();
2546
2546
 
2547
+ /**
2548
+ * SubscriptionPlatform enum.
2549
+ * @name subscription.SubscriptionPlatform
2550
+ * @enum {string}
2551
+ * @property {number} PLATFORM_UNKNOWN=0 PLATFORM_UNKNOWN value
2552
+ * @property {number} ITUNES=1 ITUNES value
2553
+ * @property {number} PLAY_STORE=2 PLAY_STORE value
2554
+ * @property {number} ZUORA=3 ZUORA value
2555
+ * @property {number} HEADSPACE=4 HEADSPACE value
2556
+ * @property {number} SPOTIFY=5 SPOTIFY value
2557
+ */
2558
+ subscription.SubscriptionPlatform = (function() {
2559
+ var valuesById = {}, values = Object.create(valuesById);
2560
+ values[valuesById[0] = "PLATFORM_UNKNOWN"] = 0;
2561
+ values[valuesById[1] = "ITUNES"] = 1;
2562
+ values[valuesById[2] = "PLAY_STORE"] = 2;
2563
+ values[valuesById[3] = "ZUORA"] = 3;
2564
+ values[valuesById[4] = "HEADSPACE"] = 4;
2565
+ values[valuesById[5] = "SPOTIFY"] = 5;
2566
+ return values;
2567
+ })();
2568
+
2547
2569
  return subscription;
2548
2570
  })();
2549
2571
 
@@ -4730,468 +4752,6 @@ $root.com = (function() {
4730
4752
  return com;
4731
4753
  })();
4732
4754
 
4733
- $root.CompletedActivity = (function() {
4734
-
4735
- /**
4736
- * Properties of a CompletedActivity.
4737
- * @exports ICompletedActivity
4738
- * @interface ICompletedActivity
4739
- * @property {string|null} [userId] CompletedActivity userId
4740
- * @property {number|null} [duration] CompletedActivity duration
4741
- * @property {number|null} [activityId] CompletedActivity activityId
4742
- * @property {string|null} [completedAt] CompletedActivity completedAt
4743
- */
4744
-
4745
- /**
4746
- * Constructs a new CompletedActivity.
4747
- * @exports CompletedActivity
4748
- * @classdesc Represents a CompletedActivity.
4749
- * @implements ICompletedActivity
4750
- * @constructor
4751
- * @param {ICompletedActivity=} [properties] Properties to set
4752
- */
4753
- function CompletedActivity(properties) {
4754
- if (properties)
4755
- for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
4756
- if (properties[keys[i]] != null)
4757
- this[keys[i]] = properties[keys[i]];
4758
- }
4759
-
4760
- /**
4761
- * CompletedActivity userId.
4762
- * @member {string} userId
4763
- * @memberof CompletedActivity
4764
- * @instance
4765
- */
4766
- CompletedActivity.prototype.userId = "";
4767
-
4768
- /**
4769
- * CompletedActivity duration.
4770
- * @member {number} duration
4771
- * @memberof CompletedActivity
4772
- * @instance
4773
- */
4774
- CompletedActivity.prototype.duration = 0;
4775
-
4776
- /**
4777
- * CompletedActivity activityId.
4778
- * @member {number} activityId
4779
- * @memberof CompletedActivity
4780
- * @instance
4781
- */
4782
- CompletedActivity.prototype.activityId = 0;
4783
-
4784
- /**
4785
- * CompletedActivity completedAt.
4786
- * @member {string} completedAt
4787
- * @memberof CompletedActivity
4788
- * @instance
4789
- */
4790
- CompletedActivity.prototype.completedAt = "";
4791
-
4792
- /**
4793
- * Creates a new CompletedActivity instance using the specified properties.
4794
- * @function create
4795
- * @memberof CompletedActivity
4796
- * @static
4797
- * @param {ICompletedActivity=} [properties] Properties to set
4798
- * @returns {CompletedActivity} CompletedActivity instance
4799
- */
4800
- CompletedActivity.create = function create(properties) {
4801
- return new CompletedActivity(properties);
4802
- };
4803
-
4804
- /**
4805
- * Encodes the specified CompletedActivity message. Does not implicitly {@link CompletedActivity.verify|verify} messages.
4806
- * @function encode
4807
- * @memberof CompletedActivity
4808
- * @static
4809
- * @param {ICompletedActivity} message CompletedActivity message or plain object to encode
4810
- * @param {$protobuf.Writer} [writer] Writer to encode to
4811
- * @returns {$protobuf.Writer} Writer
4812
- */
4813
- CompletedActivity.encode = function encode(message, writer) {
4814
- if (!writer)
4815
- writer = $Writer.create();
4816
- if (message.userId != null && message.hasOwnProperty("userId"))
4817
- writer.uint32(/* id 1, wireType 2 =*/10).string(message.userId);
4818
- if (message.duration != null && message.hasOwnProperty("duration"))
4819
- writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.duration);
4820
- if (message.activityId != null && message.hasOwnProperty("activityId"))
4821
- writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.activityId);
4822
- if (message.completedAt != null && message.hasOwnProperty("completedAt"))
4823
- writer.uint32(/* id 4, wireType 2 =*/34).string(message.completedAt);
4824
- return writer;
4825
- };
4826
-
4827
- /**
4828
- * Encodes the specified CompletedActivity message, length delimited. Does not implicitly {@link CompletedActivity.verify|verify} messages.
4829
- * @function encodeDelimited
4830
- * @memberof CompletedActivity
4831
- * @static
4832
- * @param {ICompletedActivity} message CompletedActivity message or plain object to encode
4833
- * @param {$protobuf.Writer} [writer] Writer to encode to
4834
- * @returns {$protobuf.Writer} Writer
4835
- */
4836
- CompletedActivity.encodeDelimited = function encodeDelimited(message, writer) {
4837
- return this.encode(message, writer).ldelim();
4838
- };
4839
-
4840
- /**
4841
- * Decodes a CompletedActivity message from the specified reader or buffer.
4842
- * @function decode
4843
- * @memberof CompletedActivity
4844
- * @static
4845
- * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
4846
- * @param {number} [length] Message length if known beforehand
4847
- * @returns {CompletedActivity} CompletedActivity
4848
- * @throws {Error} If the payload is not a reader or valid buffer
4849
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
4850
- */
4851
- CompletedActivity.decode = function decode(reader, length) {
4852
- if (!(reader instanceof $Reader))
4853
- reader = $Reader.create(reader);
4854
- var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CompletedActivity();
4855
- while (reader.pos < end) {
4856
- var tag = reader.uint32();
4857
- switch (tag >>> 3) {
4858
- case 1:
4859
- message.userId = reader.string();
4860
- break;
4861
- case 2:
4862
- message.duration = reader.uint32();
4863
- break;
4864
- case 3:
4865
- message.activityId = reader.uint32();
4866
- break;
4867
- case 4:
4868
- message.completedAt = reader.string();
4869
- break;
4870
- default:
4871
- reader.skipType(tag & 7);
4872
- break;
4873
- }
4874
- }
4875
- return message;
4876
- };
4877
-
4878
- /**
4879
- * Decodes a CompletedActivity message from the specified reader or buffer, length delimited.
4880
- * @function decodeDelimited
4881
- * @memberof CompletedActivity
4882
- * @static
4883
- * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
4884
- * @returns {CompletedActivity} CompletedActivity
4885
- * @throws {Error} If the payload is not a reader or valid buffer
4886
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
4887
- */
4888
- CompletedActivity.decodeDelimited = function decodeDelimited(reader) {
4889
- if (!(reader instanceof $Reader))
4890
- reader = new $Reader(reader);
4891
- return this.decode(reader, reader.uint32());
4892
- };
4893
-
4894
- /**
4895
- * Verifies a CompletedActivity message.
4896
- * @function verify
4897
- * @memberof CompletedActivity
4898
- * @static
4899
- * @param {Object.<string,*>} message Plain object to verify
4900
- * @returns {string|null} `null` if valid, otherwise the reason why it is not
4901
- */
4902
- CompletedActivity.verify = function verify(message) {
4903
- if (typeof message !== "object" || message === null)
4904
- return "object expected";
4905
- if (message.userId != null && message.hasOwnProperty("userId"))
4906
- if (!$util.isString(message.userId))
4907
- return "userId: string expected";
4908
- if (message.duration != null && message.hasOwnProperty("duration"))
4909
- if (!$util.isInteger(message.duration))
4910
- return "duration: integer expected";
4911
- if (message.activityId != null && message.hasOwnProperty("activityId"))
4912
- if (!$util.isInteger(message.activityId))
4913
- return "activityId: integer expected";
4914
- if (message.completedAt != null && message.hasOwnProperty("completedAt"))
4915
- if (!$util.isString(message.completedAt))
4916
- return "completedAt: string expected";
4917
- return null;
4918
- };
4919
-
4920
- /**
4921
- * Creates a CompletedActivity message from a plain object. Also converts values to their respective internal types.
4922
- * @function fromObject
4923
- * @memberof CompletedActivity
4924
- * @static
4925
- * @param {Object.<string,*>} object Plain object
4926
- * @returns {CompletedActivity} CompletedActivity
4927
- */
4928
- CompletedActivity.fromObject = function fromObject(object) {
4929
- if (object instanceof $root.CompletedActivity)
4930
- return object;
4931
- var message = new $root.CompletedActivity();
4932
- if (object.userId != null)
4933
- message.userId = String(object.userId);
4934
- if (object.duration != null)
4935
- message.duration = object.duration >>> 0;
4936
- if (object.activityId != null)
4937
- message.activityId = object.activityId >>> 0;
4938
- if (object.completedAt != null)
4939
- message.completedAt = String(object.completedAt);
4940
- return message;
4941
- };
4942
-
4943
- /**
4944
- * Creates a plain object from a CompletedActivity message. Also converts values to other types if specified.
4945
- * @function toObject
4946
- * @memberof CompletedActivity
4947
- * @static
4948
- * @param {CompletedActivity} message CompletedActivity
4949
- * @param {$protobuf.IConversionOptions} [options] Conversion options
4950
- * @returns {Object.<string,*>} Plain object
4951
- */
4952
- CompletedActivity.toObject = function toObject(message, options) {
4953
- if (!options)
4954
- options = {};
4955
- var object = {};
4956
- if (options.defaults) {
4957
- object.userId = "";
4958
- object.duration = 0;
4959
- object.activityId = 0;
4960
- object.completedAt = "";
4961
- }
4962
- if (message.userId != null && message.hasOwnProperty("userId"))
4963
- object.userId = message.userId;
4964
- if (message.duration != null && message.hasOwnProperty("duration"))
4965
- object.duration = message.duration;
4966
- if (message.activityId != null && message.hasOwnProperty("activityId"))
4967
- object.activityId = message.activityId;
4968
- if (message.completedAt != null && message.hasOwnProperty("completedAt"))
4969
- object.completedAt = message.completedAt;
4970
- return object;
4971
- };
4972
-
4973
- /**
4974
- * Converts this CompletedActivity to JSON.
4975
- * @function toJSON
4976
- * @memberof CompletedActivity
4977
- * @instance
4978
- * @returns {Object.<string,*>} JSON object
4979
- */
4980
- CompletedActivity.prototype.toJSON = function toJSON() {
4981
- return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
4982
- };
4983
-
4984
- return CompletedActivity;
4985
- })();
4986
-
4987
- $root.CompletedActivities = (function() {
4988
-
4989
- /**
4990
- * Properties of a CompletedActivities.
4991
- * @exports ICompletedActivities
4992
- * @interface ICompletedActivities
4993
- * @property {Array.<ICompletedActivity>|null} [activities] CompletedActivities activities
4994
- */
4995
-
4996
- /**
4997
- * Constructs a new CompletedActivities.
4998
- * @exports CompletedActivities
4999
- * @classdesc Represents a CompletedActivities.
5000
- * @implements ICompletedActivities
5001
- * @constructor
5002
- * @param {ICompletedActivities=} [properties] Properties to set
5003
- */
5004
- function CompletedActivities(properties) {
5005
- this.activities = [];
5006
- if (properties)
5007
- for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
5008
- if (properties[keys[i]] != null)
5009
- this[keys[i]] = properties[keys[i]];
5010
- }
5011
-
5012
- /**
5013
- * CompletedActivities activities.
5014
- * @member {Array.<ICompletedActivity>} activities
5015
- * @memberof CompletedActivities
5016
- * @instance
5017
- */
5018
- CompletedActivities.prototype.activities = $util.emptyArray;
5019
-
5020
- /**
5021
- * Creates a new CompletedActivities instance using the specified properties.
5022
- * @function create
5023
- * @memberof CompletedActivities
5024
- * @static
5025
- * @param {ICompletedActivities=} [properties] Properties to set
5026
- * @returns {CompletedActivities} CompletedActivities instance
5027
- */
5028
- CompletedActivities.create = function create(properties) {
5029
- return new CompletedActivities(properties);
5030
- };
5031
-
5032
- /**
5033
- * Encodes the specified CompletedActivities message. Does not implicitly {@link CompletedActivities.verify|verify} messages.
5034
- * @function encode
5035
- * @memberof CompletedActivities
5036
- * @static
5037
- * @param {ICompletedActivities} message CompletedActivities message or plain object to encode
5038
- * @param {$protobuf.Writer} [writer] Writer to encode to
5039
- * @returns {$protobuf.Writer} Writer
5040
- */
5041
- CompletedActivities.encode = function encode(message, writer) {
5042
- if (!writer)
5043
- writer = $Writer.create();
5044
- if (message.activities != null && message.activities.length)
5045
- for (var i = 0; i < message.activities.length; ++i)
5046
- $root.CompletedActivity.encode(message.activities[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
5047
- return writer;
5048
- };
5049
-
5050
- /**
5051
- * Encodes the specified CompletedActivities message, length delimited. Does not implicitly {@link CompletedActivities.verify|verify} messages.
5052
- * @function encodeDelimited
5053
- * @memberof CompletedActivities
5054
- * @static
5055
- * @param {ICompletedActivities} message CompletedActivities message or plain object to encode
5056
- * @param {$protobuf.Writer} [writer] Writer to encode to
5057
- * @returns {$protobuf.Writer} Writer
5058
- */
5059
- CompletedActivities.encodeDelimited = function encodeDelimited(message, writer) {
5060
- return this.encode(message, writer).ldelim();
5061
- };
5062
-
5063
- /**
5064
- * Decodes a CompletedActivities message from the specified reader or buffer.
5065
- * @function decode
5066
- * @memberof CompletedActivities
5067
- * @static
5068
- * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
5069
- * @param {number} [length] Message length if known beforehand
5070
- * @returns {CompletedActivities} CompletedActivities
5071
- * @throws {Error} If the payload is not a reader or valid buffer
5072
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
5073
- */
5074
- CompletedActivities.decode = function decode(reader, length) {
5075
- if (!(reader instanceof $Reader))
5076
- reader = $Reader.create(reader);
5077
- var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CompletedActivities();
5078
- while (reader.pos < end) {
5079
- var tag = reader.uint32();
5080
- switch (tag >>> 3) {
5081
- case 1:
5082
- if (!(message.activities && message.activities.length))
5083
- message.activities = [];
5084
- message.activities.push($root.CompletedActivity.decode(reader, reader.uint32()));
5085
- break;
5086
- default:
5087
- reader.skipType(tag & 7);
5088
- break;
5089
- }
5090
- }
5091
- return message;
5092
- };
5093
-
5094
- /**
5095
- * Decodes a CompletedActivities message from the specified reader or buffer, length delimited.
5096
- * @function decodeDelimited
5097
- * @memberof CompletedActivities
5098
- * @static
5099
- * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
5100
- * @returns {CompletedActivities} CompletedActivities
5101
- * @throws {Error} If the payload is not a reader or valid buffer
5102
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
5103
- */
5104
- CompletedActivities.decodeDelimited = function decodeDelimited(reader) {
5105
- if (!(reader instanceof $Reader))
5106
- reader = new $Reader(reader);
5107
- return this.decode(reader, reader.uint32());
5108
- };
5109
-
5110
- /**
5111
- * Verifies a CompletedActivities message.
5112
- * @function verify
5113
- * @memberof CompletedActivities
5114
- * @static
5115
- * @param {Object.<string,*>} message Plain object to verify
5116
- * @returns {string|null} `null` if valid, otherwise the reason why it is not
5117
- */
5118
- CompletedActivities.verify = function verify(message) {
5119
- if (typeof message !== "object" || message === null)
5120
- return "object expected";
5121
- if (message.activities != null && message.hasOwnProperty("activities")) {
5122
- if (!Array.isArray(message.activities))
5123
- return "activities: array expected";
5124
- for (var i = 0; i < message.activities.length; ++i) {
5125
- var error = $root.CompletedActivity.verify(message.activities[i]);
5126
- if (error)
5127
- return "activities." + error;
5128
- }
5129
- }
5130
- return null;
5131
- };
5132
-
5133
- /**
5134
- * Creates a CompletedActivities message from a plain object. Also converts values to their respective internal types.
5135
- * @function fromObject
5136
- * @memberof CompletedActivities
5137
- * @static
5138
- * @param {Object.<string,*>} object Plain object
5139
- * @returns {CompletedActivities} CompletedActivities
5140
- */
5141
- CompletedActivities.fromObject = function fromObject(object) {
5142
- if (object instanceof $root.CompletedActivities)
5143
- return object;
5144
- var message = new $root.CompletedActivities();
5145
- if (object.activities) {
5146
- if (!Array.isArray(object.activities))
5147
- throw TypeError(".CompletedActivities.activities: array expected");
5148
- message.activities = [];
5149
- for (var i = 0; i < object.activities.length; ++i) {
5150
- if (typeof object.activities[i] !== "object")
5151
- throw TypeError(".CompletedActivities.activities: object expected");
5152
- message.activities[i] = $root.CompletedActivity.fromObject(object.activities[i]);
5153
- }
5154
- }
5155
- return message;
5156
- };
5157
-
5158
- /**
5159
- * Creates a plain object from a CompletedActivities message. Also converts values to other types if specified.
5160
- * @function toObject
5161
- * @memberof CompletedActivities
5162
- * @static
5163
- * @param {CompletedActivities} message CompletedActivities
5164
- * @param {$protobuf.IConversionOptions} [options] Conversion options
5165
- * @returns {Object.<string,*>} Plain object
5166
- */
5167
- CompletedActivities.toObject = function toObject(message, options) {
5168
- if (!options)
5169
- options = {};
5170
- var object = {};
5171
- if (options.arrays || options.defaults)
5172
- object.activities = [];
5173
- if (message.activities && message.activities.length) {
5174
- object.activities = [];
5175
- for (var j = 0; j < message.activities.length; ++j)
5176
- object.activities[j] = $root.CompletedActivity.toObject(message.activities[j], options);
5177
- }
5178
- return object;
5179
- };
5180
-
5181
- /**
5182
- * Converts this CompletedActivities to JSON.
5183
- * @function toJSON
5184
- * @memberof CompletedActivities
5185
- * @instance
5186
- * @returns {Object.<string,*>} JSON object
5187
- */
5188
- CompletedActivities.prototype.toJSON = function toJSON() {
5189
- return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
5190
- };
5191
-
5192
- return CompletedActivities;
5193
- })();
5194
-
5195
4755
  $root.ContentPlayed = (function() {
5196
4756
 
5197
4757
  /**
@@ -8359,6 +7919,11 @@ $root.SubscriptionCreated = (function() {
8359
7919
  * @property {number|null} [id] SubscriptionCreated id
8360
7920
  * @property {number|Long|null} [updatedOn] SubscriptionCreated updatedOn
8361
7921
  * @property {string|null} [userId] SubscriptionCreated userId
7922
+ * @property {number|Long|null} [createdAt] SubscriptionCreated createdAt
7923
+ * @property {number|Long|null} [startsAt] SubscriptionCreated startsAt
7924
+ * @property {number|Long|null} [endsAt] SubscriptionCreated endsAt
7925
+ * @property {string|null} [voucherCode] SubscriptionCreated voucherCode
7926
+ * @property {subscription.SubscriptionPlatform|null} [platform] SubscriptionCreated platform
8362
7927
  */
8363
7928
 
8364
7929
  /**
@@ -8400,6 +7965,46 @@ $root.SubscriptionCreated = (function() {
8400
7965
  */
8401
7966
  SubscriptionCreated.prototype.userId = "";
8402
7967
 
7968
+ /**
7969
+ * SubscriptionCreated createdAt.
7970
+ * @member {number|Long} createdAt
7971
+ * @memberof SubscriptionCreated
7972
+ * @instance
7973
+ */
7974
+ SubscriptionCreated.prototype.createdAt = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
7975
+
7976
+ /**
7977
+ * SubscriptionCreated startsAt.
7978
+ * @member {number|Long} startsAt
7979
+ * @memberof SubscriptionCreated
7980
+ * @instance
7981
+ */
7982
+ SubscriptionCreated.prototype.startsAt = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
7983
+
7984
+ /**
7985
+ * SubscriptionCreated endsAt.
7986
+ * @member {number|Long} endsAt
7987
+ * @memberof SubscriptionCreated
7988
+ * @instance
7989
+ */
7990
+ SubscriptionCreated.prototype.endsAt = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
7991
+
7992
+ /**
7993
+ * SubscriptionCreated voucherCode.
7994
+ * @member {string} voucherCode
7995
+ * @memberof SubscriptionCreated
7996
+ * @instance
7997
+ */
7998
+ SubscriptionCreated.prototype.voucherCode = "";
7999
+
8000
+ /**
8001
+ * SubscriptionCreated platform.
8002
+ * @member {subscription.SubscriptionPlatform} platform
8003
+ * @memberof SubscriptionCreated
8004
+ * @instance
8005
+ */
8006
+ SubscriptionCreated.prototype.platform = 0;
8007
+
8403
8008
  /**
8404
8009
  * Creates a new SubscriptionCreated instance using the specified properties.
8405
8010
  * @function create
@@ -8430,6 +8035,16 @@ $root.SubscriptionCreated = (function() {
8430
8035
  writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.updatedOn);
8431
8036
  if (message.userId != null && message.hasOwnProperty("userId"))
8432
8037
  writer.uint32(/* id 3, wireType 2 =*/26).string(message.userId);
8038
+ if (message.createdAt != null && message.hasOwnProperty("createdAt"))
8039
+ writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.createdAt);
8040
+ if (message.startsAt != null && message.hasOwnProperty("startsAt"))
8041
+ writer.uint32(/* id 5, wireType 0 =*/40).uint64(message.startsAt);
8042
+ if (message.endsAt != null && message.hasOwnProperty("endsAt"))
8043
+ writer.uint32(/* id 6, wireType 0 =*/48).uint64(message.endsAt);
8044
+ if (message.voucherCode != null && message.hasOwnProperty("voucherCode"))
8045
+ writer.uint32(/* id 7, wireType 2 =*/58).string(message.voucherCode);
8046
+ if (message.platform != null && message.hasOwnProperty("platform"))
8047
+ writer.uint32(/* id 8, wireType 0 =*/64).int32(message.platform);
8433
8048
  return writer;
8434
8049
  };
8435
8050
 
@@ -8473,6 +8088,21 @@ $root.SubscriptionCreated = (function() {
8473
8088
  case 3:
8474
8089
  message.userId = reader.string();
8475
8090
  break;
8091
+ case 4:
8092
+ message.createdAt = reader.uint64();
8093
+ break;
8094
+ case 5:
8095
+ message.startsAt = reader.uint64();
8096
+ break;
8097
+ case 6:
8098
+ message.endsAt = reader.uint64();
8099
+ break;
8100
+ case 7:
8101
+ message.voucherCode = reader.string();
8102
+ break;
8103
+ case 8:
8104
+ message.platform = reader.int32();
8105
+ break;
8476
8106
  default:
8477
8107
  reader.skipType(tag & 7);
8478
8108
  break;
@@ -8517,6 +8147,30 @@ $root.SubscriptionCreated = (function() {
8517
8147
  if (message.userId != null && message.hasOwnProperty("userId"))
8518
8148
  if (!$util.isString(message.userId))
8519
8149
  return "userId: string expected";
8150
+ if (message.createdAt != null && message.hasOwnProperty("createdAt"))
8151
+ if (!$util.isInteger(message.createdAt) && !(message.createdAt && $util.isInteger(message.createdAt.low) && $util.isInteger(message.createdAt.high)))
8152
+ return "createdAt: integer|Long expected";
8153
+ if (message.startsAt != null && message.hasOwnProperty("startsAt"))
8154
+ if (!$util.isInteger(message.startsAt) && !(message.startsAt && $util.isInteger(message.startsAt.low) && $util.isInteger(message.startsAt.high)))
8155
+ return "startsAt: integer|Long expected";
8156
+ if (message.endsAt != null && message.hasOwnProperty("endsAt"))
8157
+ if (!$util.isInteger(message.endsAt) && !(message.endsAt && $util.isInteger(message.endsAt.low) && $util.isInteger(message.endsAt.high)))
8158
+ return "endsAt: integer|Long expected";
8159
+ if (message.voucherCode != null && message.hasOwnProperty("voucherCode"))
8160
+ if (!$util.isString(message.voucherCode))
8161
+ return "voucherCode: string expected";
8162
+ if (message.platform != null && message.hasOwnProperty("platform"))
8163
+ switch (message.platform) {
8164
+ default:
8165
+ return "platform: enum value expected";
8166
+ case 0:
8167
+ case 1:
8168
+ case 2:
8169
+ case 3:
8170
+ case 4:
8171
+ case 5:
8172
+ break;
8173
+ }
8520
8174
  return null;
8521
8175
  };
8522
8176
 
@@ -8545,6 +8199,61 @@ $root.SubscriptionCreated = (function() {
8545
8199
  message.updatedOn = new $util.LongBits(object.updatedOn.low >>> 0, object.updatedOn.high >>> 0).toNumber(true);
8546
8200
  if (object.userId != null)
8547
8201
  message.userId = String(object.userId);
8202
+ if (object.createdAt != null)
8203
+ if ($util.Long)
8204
+ (message.createdAt = $util.Long.fromValue(object.createdAt)).unsigned = true;
8205
+ else if (typeof object.createdAt === "string")
8206
+ message.createdAt = parseInt(object.createdAt, 10);
8207
+ else if (typeof object.createdAt === "number")
8208
+ message.createdAt = object.createdAt;
8209
+ else if (typeof object.createdAt === "object")
8210
+ message.createdAt = new $util.LongBits(object.createdAt.low >>> 0, object.createdAt.high >>> 0).toNumber(true);
8211
+ if (object.startsAt != null)
8212
+ if ($util.Long)
8213
+ (message.startsAt = $util.Long.fromValue(object.startsAt)).unsigned = true;
8214
+ else if (typeof object.startsAt === "string")
8215
+ message.startsAt = parseInt(object.startsAt, 10);
8216
+ else if (typeof object.startsAt === "number")
8217
+ message.startsAt = object.startsAt;
8218
+ else if (typeof object.startsAt === "object")
8219
+ message.startsAt = new $util.LongBits(object.startsAt.low >>> 0, object.startsAt.high >>> 0).toNumber(true);
8220
+ if (object.endsAt != null)
8221
+ if ($util.Long)
8222
+ (message.endsAt = $util.Long.fromValue(object.endsAt)).unsigned = true;
8223
+ else if (typeof object.endsAt === "string")
8224
+ message.endsAt = parseInt(object.endsAt, 10);
8225
+ else if (typeof object.endsAt === "number")
8226
+ message.endsAt = object.endsAt;
8227
+ else if (typeof object.endsAt === "object")
8228
+ message.endsAt = new $util.LongBits(object.endsAt.low >>> 0, object.endsAt.high >>> 0).toNumber(true);
8229
+ if (object.voucherCode != null)
8230
+ message.voucherCode = String(object.voucherCode);
8231
+ switch (object.platform) {
8232
+ case "PLATFORM_UNKNOWN":
8233
+ case 0:
8234
+ message.platform = 0;
8235
+ break;
8236
+ case "ITUNES":
8237
+ case 1:
8238
+ message.platform = 1;
8239
+ break;
8240
+ case "PLAY_STORE":
8241
+ case 2:
8242
+ message.platform = 2;
8243
+ break;
8244
+ case "ZUORA":
8245
+ case 3:
8246
+ message.platform = 3;
8247
+ break;
8248
+ case "HEADSPACE":
8249
+ case 4:
8250
+ message.platform = 4;
8251
+ break;
8252
+ case "SPOTIFY":
8253
+ case 5:
8254
+ message.platform = 5;
8255
+ break;
8256
+ }
8548
8257
  return message;
8549
8258
  };
8550
8259
 
@@ -8569,6 +8278,23 @@ $root.SubscriptionCreated = (function() {
8569
8278
  } else
8570
8279
  object.updatedOn = options.longs === String ? "0" : 0;
8571
8280
  object.userId = "";
8281
+ if ($util.Long) {
8282
+ var long = new $util.Long(0, 0, true);
8283
+ object.createdAt = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
8284
+ } else
8285
+ object.createdAt = options.longs === String ? "0" : 0;
8286
+ if ($util.Long) {
8287
+ var long = new $util.Long(0, 0, true);
8288
+ object.startsAt = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
8289
+ } else
8290
+ object.startsAt = options.longs === String ? "0" : 0;
8291
+ if ($util.Long) {
8292
+ var long = new $util.Long(0, 0, true);
8293
+ object.endsAt = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
8294
+ } else
8295
+ object.endsAt = options.longs === String ? "0" : 0;
8296
+ object.voucherCode = "";
8297
+ object.platform = options.enums === String ? "PLATFORM_UNKNOWN" : 0;
8572
8298
  }
8573
8299
  if (message.id != null && message.hasOwnProperty("id"))
8574
8300
  object.id = message.id;
@@ -8579,6 +8305,25 @@ $root.SubscriptionCreated = (function() {
8579
8305
  object.updatedOn = options.longs === String ? $util.Long.prototype.toString.call(message.updatedOn) : options.longs === Number ? new $util.LongBits(message.updatedOn.low >>> 0, message.updatedOn.high >>> 0).toNumber(true) : message.updatedOn;
8580
8306
  if (message.userId != null && message.hasOwnProperty("userId"))
8581
8307
  object.userId = message.userId;
8308
+ if (message.createdAt != null && message.hasOwnProperty("createdAt"))
8309
+ if (typeof message.createdAt === "number")
8310
+ object.createdAt = options.longs === String ? String(message.createdAt) : message.createdAt;
8311
+ else
8312
+ object.createdAt = options.longs === String ? $util.Long.prototype.toString.call(message.createdAt) : options.longs === Number ? new $util.LongBits(message.createdAt.low >>> 0, message.createdAt.high >>> 0).toNumber(true) : message.createdAt;
8313
+ if (message.startsAt != null && message.hasOwnProperty("startsAt"))
8314
+ if (typeof message.startsAt === "number")
8315
+ object.startsAt = options.longs === String ? String(message.startsAt) : message.startsAt;
8316
+ else
8317
+ object.startsAt = options.longs === String ? $util.Long.prototype.toString.call(message.startsAt) : options.longs === Number ? new $util.LongBits(message.startsAt.low >>> 0, message.startsAt.high >>> 0).toNumber(true) : message.startsAt;
8318
+ if (message.endsAt != null && message.hasOwnProperty("endsAt"))
8319
+ if (typeof message.endsAt === "number")
8320
+ object.endsAt = options.longs === String ? String(message.endsAt) : message.endsAt;
8321
+ else
8322
+ object.endsAt = options.longs === String ? $util.Long.prototype.toString.call(message.endsAt) : options.longs === Number ? new $util.LongBits(message.endsAt.low >>> 0, message.endsAt.high >>> 0).toNumber(true) : message.endsAt;
8323
+ if (message.voucherCode != null && message.hasOwnProperty("voucherCode"))
8324
+ object.voucherCode = message.voucherCode;
8325
+ if (message.platform != null && message.hasOwnProperty("platform"))
8326
+ object.platform = options.enums === String ? $root.subscription.SubscriptionPlatform[message.platform] : message.platform;
8582
8327
  return object;
8583
8328
  };
8584
8329
 
@@ -8606,6 +8351,11 @@ $root.SubscriptionCancelled = (function() {
8606
8351
  * @property {number|Long|null} [updatedOn] SubscriptionCancelled updatedOn
8607
8352
  * @property {string|null} [userId] SubscriptionCancelled userId
8608
8353
  * @property {subscription.IPaymentMethod|null} [paymentMethod] SubscriptionCancelled paymentMethod
8354
+ * @property {number|Long|null} [createdAt] SubscriptionCancelled createdAt
8355
+ * @property {number|Long|null} [startsAt] SubscriptionCancelled startsAt
8356
+ * @property {number|Long|null} [endsAt] SubscriptionCancelled endsAt
8357
+ * @property {string|null} [voucherCode] SubscriptionCancelled voucherCode
8358
+ * @property {subscription.SubscriptionPlatform|null} [platform] SubscriptionCancelled platform
8609
8359
  */
8610
8360
 
8611
8361
  /**
@@ -8655,6 +8405,46 @@ $root.SubscriptionCancelled = (function() {
8655
8405
  */
8656
8406
  SubscriptionCancelled.prototype.paymentMethod = null;
8657
8407
 
8408
+ /**
8409
+ * SubscriptionCancelled createdAt.
8410
+ * @member {number|Long} createdAt
8411
+ * @memberof SubscriptionCancelled
8412
+ * @instance
8413
+ */
8414
+ SubscriptionCancelled.prototype.createdAt = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
8415
+
8416
+ /**
8417
+ * SubscriptionCancelled startsAt.
8418
+ * @member {number|Long} startsAt
8419
+ * @memberof SubscriptionCancelled
8420
+ * @instance
8421
+ */
8422
+ SubscriptionCancelled.prototype.startsAt = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
8423
+
8424
+ /**
8425
+ * SubscriptionCancelled endsAt.
8426
+ * @member {number|Long} endsAt
8427
+ * @memberof SubscriptionCancelled
8428
+ * @instance
8429
+ */
8430
+ SubscriptionCancelled.prototype.endsAt = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
8431
+
8432
+ /**
8433
+ * SubscriptionCancelled voucherCode.
8434
+ * @member {string} voucherCode
8435
+ * @memberof SubscriptionCancelled
8436
+ * @instance
8437
+ */
8438
+ SubscriptionCancelled.prototype.voucherCode = "";
8439
+
8440
+ /**
8441
+ * SubscriptionCancelled platform.
8442
+ * @member {subscription.SubscriptionPlatform} platform
8443
+ * @memberof SubscriptionCancelled
8444
+ * @instance
8445
+ */
8446
+ SubscriptionCancelled.prototype.platform = 0;
8447
+
8658
8448
  /**
8659
8449
  * Creates a new SubscriptionCancelled instance using the specified properties.
8660
8450
  * @function create
@@ -8687,6 +8477,16 @@ $root.SubscriptionCancelled = (function() {
8687
8477
  writer.uint32(/* id 3, wireType 2 =*/26).string(message.userId);
8688
8478
  if (message.paymentMethod != null && message.hasOwnProperty("paymentMethod"))
8689
8479
  $root.subscription.PaymentMethod.encode(message.paymentMethod, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
8480
+ if (message.createdAt != null && message.hasOwnProperty("createdAt"))
8481
+ writer.uint32(/* id 5, wireType 0 =*/40).uint64(message.createdAt);
8482
+ if (message.startsAt != null && message.hasOwnProperty("startsAt"))
8483
+ writer.uint32(/* id 6, wireType 0 =*/48).uint64(message.startsAt);
8484
+ if (message.endsAt != null && message.hasOwnProperty("endsAt"))
8485
+ writer.uint32(/* id 7, wireType 0 =*/56).uint64(message.endsAt);
8486
+ if (message.voucherCode != null && message.hasOwnProperty("voucherCode"))
8487
+ writer.uint32(/* id 8, wireType 2 =*/66).string(message.voucherCode);
8488
+ if (message.platform != null && message.hasOwnProperty("platform"))
8489
+ writer.uint32(/* id 9, wireType 0 =*/72).int32(message.platform);
8690
8490
  return writer;
8691
8491
  };
8692
8492
 
@@ -8733,6 +8533,21 @@ $root.SubscriptionCancelled = (function() {
8733
8533
  case 4:
8734
8534
  message.paymentMethod = $root.subscription.PaymentMethod.decode(reader, reader.uint32());
8735
8535
  break;
8536
+ case 5:
8537
+ message.createdAt = reader.uint64();
8538
+ break;
8539
+ case 6:
8540
+ message.startsAt = reader.uint64();
8541
+ break;
8542
+ case 7:
8543
+ message.endsAt = reader.uint64();
8544
+ break;
8545
+ case 8:
8546
+ message.voucherCode = reader.string();
8547
+ break;
8548
+ case 9:
8549
+ message.platform = reader.int32();
8550
+ break;
8736
8551
  default:
8737
8552
  reader.skipType(tag & 7);
8738
8553
  break;
@@ -8782,6 +8597,30 @@ $root.SubscriptionCancelled = (function() {
8782
8597
  if (error)
8783
8598
  return "paymentMethod." + error;
8784
8599
  }
8600
+ if (message.createdAt != null && message.hasOwnProperty("createdAt"))
8601
+ if (!$util.isInteger(message.createdAt) && !(message.createdAt && $util.isInteger(message.createdAt.low) && $util.isInteger(message.createdAt.high)))
8602
+ return "createdAt: integer|Long expected";
8603
+ if (message.startsAt != null && message.hasOwnProperty("startsAt"))
8604
+ if (!$util.isInteger(message.startsAt) && !(message.startsAt && $util.isInteger(message.startsAt.low) && $util.isInteger(message.startsAt.high)))
8605
+ return "startsAt: integer|Long expected";
8606
+ if (message.endsAt != null && message.hasOwnProperty("endsAt"))
8607
+ if (!$util.isInteger(message.endsAt) && !(message.endsAt && $util.isInteger(message.endsAt.low) && $util.isInteger(message.endsAt.high)))
8608
+ return "endsAt: integer|Long expected";
8609
+ if (message.voucherCode != null && message.hasOwnProperty("voucherCode"))
8610
+ if (!$util.isString(message.voucherCode))
8611
+ return "voucherCode: string expected";
8612
+ if (message.platform != null && message.hasOwnProperty("platform"))
8613
+ switch (message.platform) {
8614
+ default:
8615
+ return "platform: enum value expected";
8616
+ case 0:
8617
+ case 1:
8618
+ case 2:
8619
+ case 3:
8620
+ case 4:
8621
+ case 5:
8622
+ break;
8623
+ }
8785
8624
  return null;
8786
8625
  };
8787
8626
 
@@ -8815,6 +8654,61 @@ $root.SubscriptionCancelled = (function() {
8815
8654
  throw TypeError(".SubscriptionCancelled.paymentMethod: object expected");
8816
8655
  message.paymentMethod = $root.subscription.PaymentMethod.fromObject(object.paymentMethod);
8817
8656
  }
8657
+ if (object.createdAt != null)
8658
+ if ($util.Long)
8659
+ (message.createdAt = $util.Long.fromValue(object.createdAt)).unsigned = true;
8660
+ else if (typeof object.createdAt === "string")
8661
+ message.createdAt = parseInt(object.createdAt, 10);
8662
+ else if (typeof object.createdAt === "number")
8663
+ message.createdAt = object.createdAt;
8664
+ else if (typeof object.createdAt === "object")
8665
+ message.createdAt = new $util.LongBits(object.createdAt.low >>> 0, object.createdAt.high >>> 0).toNumber(true);
8666
+ if (object.startsAt != null)
8667
+ if ($util.Long)
8668
+ (message.startsAt = $util.Long.fromValue(object.startsAt)).unsigned = true;
8669
+ else if (typeof object.startsAt === "string")
8670
+ message.startsAt = parseInt(object.startsAt, 10);
8671
+ else if (typeof object.startsAt === "number")
8672
+ message.startsAt = object.startsAt;
8673
+ else if (typeof object.startsAt === "object")
8674
+ message.startsAt = new $util.LongBits(object.startsAt.low >>> 0, object.startsAt.high >>> 0).toNumber(true);
8675
+ if (object.endsAt != null)
8676
+ if ($util.Long)
8677
+ (message.endsAt = $util.Long.fromValue(object.endsAt)).unsigned = true;
8678
+ else if (typeof object.endsAt === "string")
8679
+ message.endsAt = parseInt(object.endsAt, 10);
8680
+ else if (typeof object.endsAt === "number")
8681
+ message.endsAt = object.endsAt;
8682
+ else if (typeof object.endsAt === "object")
8683
+ message.endsAt = new $util.LongBits(object.endsAt.low >>> 0, object.endsAt.high >>> 0).toNumber(true);
8684
+ if (object.voucherCode != null)
8685
+ message.voucherCode = String(object.voucherCode);
8686
+ switch (object.platform) {
8687
+ case "PLATFORM_UNKNOWN":
8688
+ case 0:
8689
+ message.platform = 0;
8690
+ break;
8691
+ case "ITUNES":
8692
+ case 1:
8693
+ message.platform = 1;
8694
+ break;
8695
+ case "PLAY_STORE":
8696
+ case 2:
8697
+ message.platform = 2;
8698
+ break;
8699
+ case "ZUORA":
8700
+ case 3:
8701
+ message.platform = 3;
8702
+ break;
8703
+ case "HEADSPACE":
8704
+ case 4:
8705
+ message.platform = 4;
8706
+ break;
8707
+ case "SPOTIFY":
8708
+ case 5:
8709
+ message.platform = 5;
8710
+ break;
8711
+ }
8818
8712
  return message;
8819
8713
  };
8820
8714
 
@@ -8840,6 +8734,23 @@ $root.SubscriptionCancelled = (function() {
8840
8734
  object.updatedOn = options.longs === String ? "0" : 0;
8841
8735
  object.userId = "";
8842
8736
  object.paymentMethod = null;
8737
+ if ($util.Long) {
8738
+ var long = new $util.Long(0, 0, true);
8739
+ object.createdAt = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
8740
+ } else
8741
+ object.createdAt = options.longs === String ? "0" : 0;
8742
+ if ($util.Long) {
8743
+ var long = new $util.Long(0, 0, true);
8744
+ object.startsAt = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
8745
+ } else
8746
+ object.startsAt = options.longs === String ? "0" : 0;
8747
+ if ($util.Long) {
8748
+ var long = new $util.Long(0, 0, true);
8749
+ object.endsAt = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
8750
+ } else
8751
+ object.endsAt = options.longs === String ? "0" : 0;
8752
+ object.voucherCode = "";
8753
+ object.platform = options.enums === String ? "PLATFORM_UNKNOWN" : 0;
8843
8754
  }
8844
8755
  if (message.id != null && message.hasOwnProperty("id"))
8845
8756
  object.id = message.id;
@@ -8852,6 +8763,25 @@ $root.SubscriptionCancelled = (function() {
8852
8763
  object.userId = message.userId;
8853
8764
  if (message.paymentMethod != null && message.hasOwnProperty("paymentMethod"))
8854
8765
  object.paymentMethod = $root.subscription.PaymentMethod.toObject(message.paymentMethod, options);
8766
+ if (message.createdAt != null && message.hasOwnProperty("createdAt"))
8767
+ if (typeof message.createdAt === "number")
8768
+ object.createdAt = options.longs === String ? String(message.createdAt) : message.createdAt;
8769
+ else
8770
+ object.createdAt = options.longs === String ? $util.Long.prototype.toString.call(message.createdAt) : options.longs === Number ? new $util.LongBits(message.createdAt.low >>> 0, message.createdAt.high >>> 0).toNumber(true) : message.createdAt;
8771
+ if (message.startsAt != null && message.hasOwnProperty("startsAt"))
8772
+ if (typeof message.startsAt === "number")
8773
+ object.startsAt = options.longs === String ? String(message.startsAt) : message.startsAt;
8774
+ else
8775
+ object.startsAt = options.longs === String ? $util.Long.prototype.toString.call(message.startsAt) : options.longs === Number ? new $util.LongBits(message.startsAt.low >>> 0, message.startsAt.high >>> 0).toNumber(true) : message.startsAt;
8776
+ if (message.endsAt != null && message.hasOwnProperty("endsAt"))
8777
+ if (typeof message.endsAt === "number")
8778
+ object.endsAt = options.longs === String ? String(message.endsAt) : message.endsAt;
8779
+ else
8780
+ object.endsAt = options.longs === String ? $util.Long.prototype.toString.call(message.endsAt) : options.longs === Number ? new $util.LongBits(message.endsAt.low >>> 0, message.endsAt.high >>> 0).toNumber(true) : message.endsAt;
8781
+ if (message.voucherCode != null && message.hasOwnProperty("voucherCode"))
8782
+ object.voucherCode = message.voucherCode;
8783
+ if (message.platform != null && message.hasOwnProperty("platform"))
8784
+ object.platform = options.enums === String ? $root.subscription.SubscriptionPlatform[message.platform] : message.platform;
8855
8785
  return object;
8856
8786
  };
8857
8787
 
@@ -8878,6 +8808,11 @@ $root.SubscriptionRenewed = (function() {
8878
8808
  * @property {number|null} [id] SubscriptionRenewed id
8879
8809
  * @property {number|Long|null} [updatedOn] SubscriptionRenewed updatedOn
8880
8810
  * @property {string|null} [userId] SubscriptionRenewed userId
8811
+ * @property {number|Long|null} [createdAt] SubscriptionRenewed createdAt
8812
+ * @property {number|Long|null} [startsAt] SubscriptionRenewed startsAt
8813
+ * @property {number|Long|null} [endsAt] SubscriptionRenewed endsAt
8814
+ * @property {string|null} [voucherCode] SubscriptionRenewed voucherCode
8815
+ * @property {subscription.SubscriptionPlatform|null} [platform] SubscriptionRenewed platform
8881
8816
  */
8882
8817
 
8883
8818
  /**
@@ -8919,6 +8854,46 @@ $root.SubscriptionRenewed = (function() {
8919
8854
  */
8920
8855
  SubscriptionRenewed.prototype.userId = "";
8921
8856
 
8857
+ /**
8858
+ * SubscriptionRenewed createdAt.
8859
+ * @member {number|Long} createdAt
8860
+ * @memberof SubscriptionRenewed
8861
+ * @instance
8862
+ */
8863
+ SubscriptionRenewed.prototype.createdAt = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
8864
+
8865
+ /**
8866
+ * SubscriptionRenewed startsAt.
8867
+ * @member {number|Long} startsAt
8868
+ * @memberof SubscriptionRenewed
8869
+ * @instance
8870
+ */
8871
+ SubscriptionRenewed.prototype.startsAt = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
8872
+
8873
+ /**
8874
+ * SubscriptionRenewed endsAt.
8875
+ * @member {number|Long} endsAt
8876
+ * @memberof SubscriptionRenewed
8877
+ * @instance
8878
+ */
8879
+ SubscriptionRenewed.prototype.endsAt = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
8880
+
8881
+ /**
8882
+ * SubscriptionRenewed voucherCode.
8883
+ * @member {string} voucherCode
8884
+ * @memberof SubscriptionRenewed
8885
+ * @instance
8886
+ */
8887
+ SubscriptionRenewed.prototype.voucherCode = "";
8888
+
8889
+ /**
8890
+ * SubscriptionRenewed platform.
8891
+ * @member {subscription.SubscriptionPlatform} platform
8892
+ * @memberof SubscriptionRenewed
8893
+ * @instance
8894
+ */
8895
+ SubscriptionRenewed.prototype.platform = 0;
8896
+
8922
8897
  /**
8923
8898
  * Creates a new SubscriptionRenewed instance using the specified properties.
8924
8899
  * @function create
@@ -8949,6 +8924,16 @@ $root.SubscriptionRenewed = (function() {
8949
8924
  writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.updatedOn);
8950
8925
  if (message.userId != null && message.hasOwnProperty("userId"))
8951
8926
  writer.uint32(/* id 3, wireType 2 =*/26).string(message.userId);
8927
+ if (message.createdAt != null && message.hasOwnProperty("createdAt"))
8928
+ writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.createdAt);
8929
+ if (message.startsAt != null && message.hasOwnProperty("startsAt"))
8930
+ writer.uint32(/* id 5, wireType 0 =*/40).uint64(message.startsAt);
8931
+ if (message.endsAt != null && message.hasOwnProperty("endsAt"))
8932
+ writer.uint32(/* id 6, wireType 0 =*/48).uint64(message.endsAt);
8933
+ if (message.voucherCode != null && message.hasOwnProperty("voucherCode"))
8934
+ writer.uint32(/* id 7, wireType 2 =*/58).string(message.voucherCode);
8935
+ if (message.platform != null && message.hasOwnProperty("platform"))
8936
+ writer.uint32(/* id 8, wireType 0 =*/64).int32(message.platform);
8952
8937
  return writer;
8953
8938
  };
8954
8939
 
@@ -8992,6 +8977,21 @@ $root.SubscriptionRenewed = (function() {
8992
8977
  case 3:
8993
8978
  message.userId = reader.string();
8994
8979
  break;
8980
+ case 4:
8981
+ message.createdAt = reader.uint64();
8982
+ break;
8983
+ case 5:
8984
+ message.startsAt = reader.uint64();
8985
+ break;
8986
+ case 6:
8987
+ message.endsAt = reader.uint64();
8988
+ break;
8989
+ case 7:
8990
+ message.voucherCode = reader.string();
8991
+ break;
8992
+ case 8:
8993
+ message.platform = reader.int32();
8994
+ break;
8995
8995
  default:
8996
8996
  reader.skipType(tag & 7);
8997
8997
  break;
@@ -9036,6 +9036,30 @@ $root.SubscriptionRenewed = (function() {
9036
9036
  if (message.userId != null && message.hasOwnProperty("userId"))
9037
9037
  if (!$util.isString(message.userId))
9038
9038
  return "userId: string expected";
9039
+ if (message.createdAt != null && message.hasOwnProperty("createdAt"))
9040
+ if (!$util.isInteger(message.createdAt) && !(message.createdAt && $util.isInteger(message.createdAt.low) && $util.isInteger(message.createdAt.high)))
9041
+ return "createdAt: integer|Long expected";
9042
+ if (message.startsAt != null && message.hasOwnProperty("startsAt"))
9043
+ if (!$util.isInteger(message.startsAt) && !(message.startsAt && $util.isInteger(message.startsAt.low) && $util.isInteger(message.startsAt.high)))
9044
+ return "startsAt: integer|Long expected";
9045
+ if (message.endsAt != null && message.hasOwnProperty("endsAt"))
9046
+ if (!$util.isInteger(message.endsAt) && !(message.endsAt && $util.isInteger(message.endsAt.low) && $util.isInteger(message.endsAt.high)))
9047
+ return "endsAt: integer|Long expected";
9048
+ if (message.voucherCode != null && message.hasOwnProperty("voucherCode"))
9049
+ if (!$util.isString(message.voucherCode))
9050
+ return "voucherCode: string expected";
9051
+ if (message.platform != null && message.hasOwnProperty("platform"))
9052
+ switch (message.platform) {
9053
+ default:
9054
+ return "platform: enum value expected";
9055
+ case 0:
9056
+ case 1:
9057
+ case 2:
9058
+ case 3:
9059
+ case 4:
9060
+ case 5:
9061
+ break;
9062
+ }
9039
9063
  return null;
9040
9064
  };
9041
9065
 
@@ -9064,6 +9088,61 @@ $root.SubscriptionRenewed = (function() {
9064
9088
  message.updatedOn = new $util.LongBits(object.updatedOn.low >>> 0, object.updatedOn.high >>> 0).toNumber(true);
9065
9089
  if (object.userId != null)
9066
9090
  message.userId = String(object.userId);
9091
+ if (object.createdAt != null)
9092
+ if ($util.Long)
9093
+ (message.createdAt = $util.Long.fromValue(object.createdAt)).unsigned = true;
9094
+ else if (typeof object.createdAt === "string")
9095
+ message.createdAt = parseInt(object.createdAt, 10);
9096
+ else if (typeof object.createdAt === "number")
9097
+ message.createdAt = object.createdAt;
9098
+ else if (typeof object.createdAt === "object")
9099
+ message.createdAt = new $util.LongBits(object.createdAt.low >>> 0, object.createdAt.high >>> 0).toNumber(true);
9100
+ if (object.startsAt != null)
9101
+ if ($util.Long)
9102
+ (message.startsAt = $util.Long.fromValue(object.startsAt)).unsigned = true;
9103
+ else if (typeof object.startsAt === "string")
9104
+ message.startsAt = parseInt(object.startsAt, 10);
9105
+ else if (typeof object.startsAt === "number")
9106
+ message.startsAt = object.startsAt;
9107
+ else if (typeof object.startsAt === "object")
9108
+ message.startsAt = new $util.LongBits(object.startsAt.low >>> 0, object.startsAt.high >>> 0).toNumber(true);
9109
+ if (object.endsAt != null)
9110
+ if ($util.Long)
9111
+ (message.endsAt = $util.Long.fromValue(object.endsAt)).unsigned = true;
9112
+ else if (typeof object.endsAt === "string")
9113
+ message.endsAt = parseInt(object.endsAt, 10);
9114
+ else if (typeof object.endsAt === "number")
9115
+ message.endsAt = object.endsAt;
9116
+ else if (typeof object.endsAt === "object")
9117
+ message.endsAt = new $util.LongBits(object.endsAt.low >>> 0, object.endsAt.high >>> 0).toNumber(true);
9118
+ if (object.voucherCode != null)
9119
+ message.voucherCode = String(object.voucherCode);
9120
+ switch (object.platform) {
9121
+ case "PLATFORM_UNKNOWN":
9122
+ case 0:
9123
+ message.platform = 0;
9124
+ break;
9125
+ case "ITUNES":
9126
+ case 1:
9127
+ message.platform = 1;
9128
+ break;
9129
+ case "PLAY_STORE":
9130
+ case 2:
9131
+ message.platform = 2;
9132
+ break;
9133
+ case "ZUORA":
9134
+ case 3:
9135
+ message.platform = 3;
9136
+ break;
9137
+ case "HEADSPACE":
9138
+ case 4:
9139
+ message.platform = 4;
9140
+ break;
9141
+ case "SPOTIFY":
9142
+ case 5:
9143
+ message.platform = 5;
9144
+ break;
9145
+ }
9067
9146
  return message;
9068
9147
  };
9069
9148
 
@@ -9088,6 +9167,23 @@ $root.SubscriptionRenewed = (function() {
9088
9167
  } else
9089
9168
  object.updatedOn = options.longs === String ? "0" : 0;
9090
9169
  object.userId = "";
9170
+ if ($util.Long) {
9171
+ var long = new $util.Long(0, 0, true);
9172
+ object.createdAt = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
9173
+ } else
9174
+ object.createdAt = options.longs === String ? "0" : 0;
9175
+ if ($util.Long) {
9176
+ var long = new $util.Long(0, 0, true);
9177
+ object.startsAt = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
9178
+ } else
9179
+ object.startsAt = options.longs === String ? "0" : 0;
9180
+ if ($util.Long) {
9181
+ var long = new $util.Long(0, 0, true);
9182
+ object.endsAt = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
9183
+ } else
9184
+ object.endsAt = options.longs === String ? "0" : 0;
9185
+ object.voucherCode = "";
9186
+ object.platform = options.enums === String ? "PLATFORM_UNKNOWN" : 0;
9091
9187
  }
9092
9188
  if (message.id != null && message.hasOwnProperty("id"))
9093
9189
  object.id = message.id;
@@ -9098,6 +9194,25 @@ $root.SubscriptionRenewed = (function() {
9098
9194
  object.updatedOn = options.longs === String ? $util.Long.prototype.toString.call(message.updatedOn) : options.longs === Number ? new $util.LongBits(message.updatedOn.low >>> 0, message.updatedOn.high >>> 0).toNumber(true) : message.updatedOn;
9099
9195
  if (message.userId != null && message.hasOwnProperty("userId"))
9100
9196
  object.userId = message.userId;
9197
+ if (message.createdAt != null && message.hasOwnProperty("createdAt"))
9198
+ if (typeof message.createdAt === "number")
9199
+ object.createdAt = options.longs === String ? String(message.createdAt) : message.createdAt;
9200
+ else
9201
+ object.createdAt = options.longs === String ? $util.Long.prototype.toString.call(message.createdAt) : options.longs === Number ? new $util.LongBits(message.createdAt.low >>> 0, message.createdAt.high >>> 0).toNumber(true) : message.createdAt;
9202
+ if (message.startsAt != null && message.hasOwnProperty("startsAt"))
9203
+ if (typeof message.startsAt === "number")
9204
+ object.startsAt = options.longs === String ? String(message.startsAt) : message.startsAt;
9205
+ else
9206
+ object.startsAt = options.longs === String ? $util.Long.prototype.toString.call(message.startsAt) : options.longs === Number ? new $util.LongBits(message.startsAt.low >>> 0, message.startsAt.high >>> 0).toNumber(true) : message.startsAt;
9207
+ if (message.endsAt != null && message.hasOwnProperty("endsAt"))
9208
+ if (typeof message.endsAt === "number")
9209
+ object.endsAt = options.longs === String ? String(message.endsAt) : message.endsAt;
9210
+ else
9211
+ object.endsAt = options.longs === String ? $util.Long.prototype.toString.call(message.endsAt) : options.longs === Number ? new $util.LongBits(message.endsAt.low >>> 0, message.endsAt.high >>> 0).toNumber(true) : message.endsAt;
9212
+ if (message.voucherCode != null && message.hasOwnProperty("voucherCode"))
9213
+ object.voucherCode = message.voucherCode;
9214
+ if (message.platform != null && message.hasOwnProperty("platform"))
9215
+ object.platform = options.enums === String ? $root.subscription.SubscriptionPlatform[message.platform] : message.platform;
9101
9216
  return object;
9102
9217
  };
9103
9218