@headspace/protos-events 1.57.0 → 1.59.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
@@ -1174,6 +1174,17 @@ export namespace subscription {
1174
1174
  CT_ACTIVE = 1,
1175
1175
  CT_PASSIVE = 2
1176
1176
  }
1177
+
1178
+ /** SubscriptionState enum. */
1179
+ enum SubscriptionState {
1180
+ SUBSTATE_UNKNOWN = 0,
1181
+ SUBSTATE_NONE = 1,
1182
+ SUBSTATE_FREE_SUBSCRIPTION = 2,
1183
+ SUBSTATE_FREE_TRIAL = 3,
1184
+ SUBSTATE_PAYING = 4,
1185
+ SUBSTATE_GRACE = 6,
1186
+ SUBSTATE_CANCELLED = 5
1187
+ }
1177
1188
  }
1178
1189
 
1179
1190
  /** Namespace userdomain. */
@@ -3457,6 +3468,96 @@ export class CheckInCompleted implements ICheckInCompleted {
3457
3468
  public toJSON(): { [k: string]: any };
3458
3469
  }
3459
3470
 
3471
+ /** Properties of a UserEnabledWakeupNotifications. */
3472
+ export interface IUserEnabledWakeupNotifications {
3473
+
3474
+ /** UserEnabledWakeupNotifications userId */
3475
+ userId?: (string|null);
3476
+ }
3477
+
3478
+ /** Represents a UserEnabledWakeupNotifications. */
3479
+ export class UserEnabledWakeupNotifications implements IUserEnabledWakeupNotifications {
3480
+
3481
+ /**
3482
+ * Constructs a new UserEnabledWakeupNotifications.
3483
+ * @param [properties] Properties to set
3484
+ */
3485
+ constructor(properties?: IUserEnabledWakeupNotifications);
3486
+
3487
+ /** UserEnabledWakeupNotifications userId. */
3488
+ public userId: string;
3489
+
3490
+ /**
3491
+ * Creates a new UserEnabledWakeupNotifications instance using the specified properties.
3492
+ * @param [properties] Properties to set
3493
+ * @returns UserEnabledWakeupNotifications instance
3494
+ */
3495
+ public static create(properties?: IUserEnabledWakeupNotifications): UserEnabledWakeupNotifications;
3496
+
3497
+ /**
3498
+ * Encodes the specified UserEnabledWakeupNotifications message. Does not implicitly {@link UserEnabledWakeupNotifications.verify|verify} messages.
3499
+ * @param message UserEnabledWakeupNotifications message or plain object to encode
3500
+ * @param [writer] Writer to encode to
3501
+ * @returns Writer
3502
+ */
3503
+ public static encode(message: IUserEnabledWakeupNotifications, writer?: $protobuf.Writer): $protobuf.Writer;
3504
+
3505
+ /**
3506
+ * Encodes the specified UserEnabledWakeupNotifications message, length delimited. Does not implicitly {@link UserEnabledWakeupNotifications.verify|verify} messages.
3507
+ * @param message UserEnabledWakeupNotifications message or plain object to encode
3508
+ * @param [writer] Writer to encode to
3509
+ * @returns Writer
3510
+ */
3511
+ public static encodeDelimited(message: IUserEnabledWakeupNotifications, writer?: $protobuf.Writer): $protobuf.Writer;
3512
+
3513
+ /**
3514
+ * Decodes a UserEnabledWakeupNotifications message from the specified reader or buffer.
3515
+ * @param reader Reader or buffer to decode from
3516
+ * @param [length] Message length if known beforehand
3517
+ * @returns UserEnabledWakeupNotifications
3518
+ * @throws {Error} If the payload is not a reader or valid buffer
3519
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
3520
+ */
3521
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): UserEnabledWakeupNotifications;
3522
+
3523
+ /**
3524
+ * Decodes a UserEnabledWakeupNotifications message from the specified reader or buffer, length delimited.
3525
+ * @param reader Reader or buffer to decode from
3526
+ * @returns UserEnabledWakeupNotifications
3527
+ * @throws {Error} If the payload is not a reader or valid buffer
3528
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
3529
+ */
3530
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): UserEnabledWakeupNotifications;
3531
+
3532
+ /**
3533
+ * Verifies a UserEnabledWakeupNotifications message.
3534
+ * @param message Plain object to verify
3535
+ * @returns `null` if valid, otherwise the reason why it is not
3536
+ */
3537
+ public static verify(message: { [k: string]: any }): (string|null);
3538
+
3539
+ /**
3540
+ * Creates a UserEnabledWakeupNotifications message from a plain object. Also converts values to their respective internal types.
3541
+ * @param object Plain object
3542
+ * @returns UserEnabledWakeupNotifications
3543
+ */
3544
+ public static fromObject(object: { [k: string]: any }): UserEnabledWakeupNotifications;
3545
+
3546
+ /**
3547
+ * Creates a plain object from a UserEnabledWakeupNotifications message. Also converts values to other types if specified.
3548
+ * @param message UserEnabledWakeupNotifications
3549
+ * @param [options] Conversion options
3550
+ * @returns Plain object
3551
+ */
3552
+ public static toObject(message: UserEnabledWakeupNotifications, options?: $protobuf.IConversionOptions): { [k: string]: any };
3553
+
3554
+ /**
3555
+ * Converts this UserEnabledWakeupNotifications to JSON.
3556
+ * @returns JSON object
3557
+ */
3558
+ public toJSON(): { [k: string]: any };
3559
+ }
3560
+
3460
3561
  /** Properties of a ReferralSignedUp. */
3461
3562
  export interface IReferralSignedUp {
3462
3563
 
@@ -3891,6 +3992,9 @@ export interface ISubscriptionCreated {
3891
3992
 
3892
3993
  /** SubscriptionCreated plan */
3893
3994
  plan?: (subscription.IPlan|null);
3995
+
3996
+ /** SubscriptionCreated subscriptionState */
3997
+ subscriptionState?: (subscription.SubscriptionState|null);
3894
3998
  }
3895
3999
 
3896
4000
  /** Represents a SubscriptionCreated. */
@@ -3932,6 +4036,9 @@ export class SubscriptionCreated implements ISubscriptionCreated {
3932
4036
  /** SubscriptionCreated plan. */
3933
4037
  public plan?: (subscription.IPlan|null);
3934
4038
 
4039
+ /** SubscriptionCreated subscriptionState. */
4040
+ public subscriptionState: subscription.SubscriptionState;
4041
+
3935
4042
  /**
3936
4043
  * Creates a new SubscriptionCreated instance using the specified properties.
3937
4044
  * @param [properties] Properties to set
@@ -4041,6 +4148,9 @@ export interface ISubscriptionCancelled {
4041
4148
 
4042
4149
  /** SubscriptionCancelled cancellationType */
4043
4150
  cancellationType?: (subscription.CancellationType|null);
4151
+
4152
+ /** SubscriptionCancelled subscriptionState */
4153
+ subscriptionState?: (subscription.SubscriptionState|null);
4044
4154
  }
4045
4155
 
4046
4156
  /** Represents a SubscriptionCancelled. */
@@ -4088,6 +4198,9 @@ export class SubscriptionCancelled implements ISubscriptionCancelled {
4088
4198
  /** SubscriptionCancelled cancellationType. */
4089
4199
  public cancellationType: subscription.CancellationType;
4090
4200
 
4201
+ /** SubscriptionCancelled subscriptionState. */
4202
+ public subscriptionState: subscription.SubscriptionState;
4203
+
4091
4204
  /**
4092
4205
  * Creates a new SubscriptionCancelled instance using the specified properties.
4093
4206
  * @param [properties] Properties to set
@@ -4191,6 +4304,9 @@ export interface ISubscriptionRenewed {
4191
4304
 
4192
4305
  /** SubscriptionRenewed plan */
4193
4306
  plan?: (subscription.IPlan|null);
4307
+
4308
+ /** SubscriptionRenewed subscriptionState */
4309
+ subscriptionState?: (subscription.SubscriptionState|null);
4194
4310
  }
4195
4311
 
4196
4312
  /** Represents a SubscriptionRenewed. */
@@ -4232,6 +4348,9 @@ export class SubscriptionRenewed implements ISubscriptionRenewed {
4232
4348
  /** SubscriptionRenewed plan. */
4233
4349
  public plan?: (subscription.IPlan|null);
4234
4350
 
4351
+ /** SubscriptionRenewed subscriptionState. */
4352
+ public subscriptionState: subscription.SubscriptionState;
4353
+
4235
4354
  /**
4236
4355
  * Creates a new SubscriptionRenewed instance using the specified properties.
4237
4356
  * @param [properties] Properties to set
@@ -4701,6 +4820,9 @@ export interface ISubscriptionGraced {
4701
4820
 
4702
4821
  /** SubscriptionGraced plan */
4703
4822
  plan?: (subscription.IPlan|null);
4823
+
4824
+ /** SubscriptionGraced subscriptionState */
4825
+ subscriptionState?: (subscription.SubscriptionState|null);
4704
4826
  }
4705
4827
 
4706
4828
  /** Represents a SubscriptionGraced. */
@@ -4742,6 +4864,9 @@ export class SubscriptionGraced implements ISubscriptionGraced {
4742
4864
  /** SubscriptionGraced plan. */
4743
4865
  public plan?: (subscription.IPlan|null);
4744
4866
 
4867
+ /** SubscriptionGraced subscriptionState. */
4868
+ public subscriptionState: subscription.SubscriptionState;
4869
+
4745
4870
  /**
4746
4871
  * Creates a new SubscriptionGraced instance using the specified properties.
4747
4872
  * @param [properties] Properties to set
@@ -4842,6 +4967,9 @@ export interface ISubscriptionStarted {
4842
4967
 
4843
4968
  /** SubscriptionStarted plan */
4844
4969
  plan?: (subscription.IPlan|null);
4970
+
4971
+ /** SubscriptionStarted subscriptionState */
4972
+ subscriptionState?: (subscription.SubscriptionState|null);
4845
4973
  }
4846
4974
 
4847
4975
  /** Represents a SubscriptionStarted. */
@@ -4880,6 +5008,9 @@ export class SubscriptionStarted implements ISubscriptionStarted {
4880
5008
  /** SubscriptionStarted plan. */
4881
5009
  public plan?: (subscription.IPlan|null);
4882
5010
 
5011
+ /** SubscriptionStarted subscriptionState. */
5012
+ public subscriptionState: subscription.SubscriptionState;
5013
+
4883
5014
  /**
4884
5015
  * Creates a new SubscriptionStarted instance using the specified properties.
4885
5016
  * @param [properties] Properties to set
@@ -4983,6 +5114,9 @@ export interface ISubscriptionEnded {
4983
5114
 
4984
5115
  /** SubscriptionEnded cancellationType */
4985
5116
  cancellationType?: (subscription.CancellationType|null);
5117
+
5118
+ /** SubscriptionEnded subscriptionState */
5119
+ subscriptionState?: (subscription.SubscriptionState|null);
4986
5120
  }
4987
5121
 
4988
5122
  /** Represents a SubscriptionEnded. */
@@ -5024,6 +5158,9 @@ export class SubscriptionEnded implements ISubscriptionEnded {
5024
5158
  /** SubscriptionEnded cancellationType. */
5025
5159
  public cancellationType: subscription.CancellationType;
5026
5160
 
5161
+ /** SubscriptionEnded subscriptionState. */
5162
+ public subscriptionState: subscription.SubscriptionState;
5163
+
5027
5164
  /**
5028
5165
  * Creates a new SubscriptionEnded instance using the specified properties.
5029
5166
  * @param [properties] Properties to set
@@ -5124,6 +5261,9 @@ export interface ISubscriptionRecovered {
5124
5261
 
5125
5262
  /** SubscriptionRecovered plan */
5126
5263
  plan?: (subscription.IPlan|null);
5264
+
5265
+ /** SubscriptionRecovered subscriptionState */
5266
+ subscriptionState?: (subscription.SubscriptionState|null);
5127
5267
  }
5128
5268
 
5129
5269
  /** Represents a SubscriptionRecovered. */
@@ -5162,6 +5302,9 @@ export class SubscriptionRecovered implements ISubscriptionRecovered {
5162
5302
  /** SubscriptionRecovered plan. */
5163
5303
  public plan?: (subscription.IPlan|null);
5164
5304
 
5305
+ /** SubscriptionRecovered subscriptionState. */
5306
+ public subscriptionState: subscription.SubscriptionState;
5307
+
5165
5308
  /**
5166
5309
  * Creates a new SubscriptionRecovered instance using the specified properties.
5167
5310
  * @param [properties] Properties to set
package/lib/index.js CHANGED
@@ -2664,6 +2664,30 @@ $root.subscription = (function() {
2664
2664
  return values;
2665
2665
  })();
2666
2666
 
2667
+ /**
2668
+ * SubscriptionState enum.
2669
+ * @name subscription.SubscriptionState
2670
+ * @enum {string}
2671
+ * @property {number} SUBSTATE_UNKNOWN=0 SUBSTATE_UNKNOWN value
2672
+ * @property {number} SUBSTATE_NONE=1 SUBSTATE_NONE value
2673
+ * @property {number} SUBSTATE_FREE_SUBSCRIPTION=2 SUBSTATE_FREE_SUBSCRIPTION value
2674
+ * @property {number} SUBSTATE_FREE_TRIAL=3 SUBSTATE_FREE_TRIAL value
2675
+ * @property {number} SUBSTATE_PAYING=4 SUBSTATE_PAYING value
2676
+ * @property {number} SUBSTATE_GRACE=6 SUBSTATE_GRACE value
2677
+ * @property {number} SUBSTATE_CANCELLED=5 SUBSTATE_CANCELLED value
2678
+ */
2679
+ subscription.SubscriptionState = (function() {
2680
+ var valuesById = {}, values = Object.create(valuesById);
2681
+ values[valuesById[0] = "SUBSTATE_UNKNOWN"] = 0;
2682
+ values[valuesById[1] = "SUBSTATE_NONE"] = 1;
2683
+ values[valuesById[2] = "SUBSTATE_FREE_SUBSCRIPTION"] = 2;
2684
+ values[valuesById[3] = "SUBSTATE_FREE_TRIAL"] = 3;
2685
+ values[valuesById[4] = "SUBSTATE_PAYING"] = 4;
2686
+ values[valuesById[6] = "SUBSTATE_GRACE"] = 6;
2687
+ values[valuesById[5] = "SUBSTATE_CANCELLED"] = 5;
2688
+ return values;
2689
+ })();
2690
+
2667
2691
  return subscription;
2668
2692
  })();
2669
2693
 
@@ -8359,6 +8383,193 @@ $root.CheckInCompleted = (function() {
8359
8383
  return CheckInCompleted;
8360
8384
  })();
8361
8385
 
8386
+ $root.UserEnabledWakeupNotifications = (function() {
8387
+
8388
+ /**
8389
+ * Properties of a UserEnabledWakeupNotifications.
8390
+ * @exports IUserEnabledWakeupNotifications
8391
+ * @interface IUserEnabledWakeupNotifications
8392
+ * @property {string|null} [userId] UserEnabledWakeupNotifications userId
8393
+ */
8394
+
8395
+ /**
8396
+ * Constructs a new UserEnabledWakeupNotifications.
8397
+ * @exports UserEnabledWakeupNotifications
8398
+ * @classdesc Represents a UserEnabledWakeupNotifications.
8399
+ * @implements IUserEnabledWakeupNotifications
8400
+ * @constructor
8401
+ * @param {IUserEnabledWakeupNotifications=} [properties] Properties to set
8402
+ */
8403
+ function UserEnabledWakeupNotifications(properties) {
8404
+ if (properties)
8405
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
8406
+ if (properties[keys[i]] != null)
8407
+ this[keys[i]] = properties[keys[i]];
8408
+ }
8409
+
8410
+ /**
8411
+ * UserEnabledWakeupNotifications userId.
8412
+ * @member {string} userId
8413
+ * @memberof UserEnabledWakeupNotifications
8414
+ * @instance
8415
+ */
8416
+ UserEnabledWakeupNotifications.prototype.userId = "";
8417
+
8418
+ /**
8419
+ * Creates a new UserEnabledWakeupNotifications instance using the specified properties.
8420
+ * @function create
8421
+ * @memberof UserEnabledWakeupNotifications
8422
+ * @static
8423
+ * @param {IUserEnabledWakeupNotifications=} [properties] Properties to set
8424
+ * @returns {UserEnabledWakeupNotifications} UserEnabledWakeupNotifications instance
8425
+ */
8426
+ UserEnabledWakeupNotifications.create = function create(properties) {
8427
+ return new UserEnabledWakeupNotifications(properties);
8428
+ };
8429
+
8430
+ /**
8431
+ * Encodes the specified UserEnabledWakeupNotifications message. Does not implicitly {@link UserEnabledWakeupNotifications.verify|verify} messages.
8432
+ * @function encode
8433
+ * @memberof UserEnabledWakeupNotifications
8434
+ * @static
8435
+ * @param {IUserEnabledWakeupNotifications} message UserEnabledWakeupNotifications message or plain object to encode
8436
+ * @param {$protobuf.Writer} [writer] Writer to encode to
8437
+ * @returns {$protobuf.Writer} Writer
8438
+ */
8439
+ UserEnabledWakeupNotifications.encode = function encode(message, writer) {
8440
+ if (!writer)
8441
+ writer = $Writer.create();
8442
+ if (message.userId != null && message.hasOwnProperty("userId"))
8443
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.userId);
8444
+ return writer;
8445
+ };
8446
+
8447
+ /**
8448
+ * Encodes the specified UserEnabledWakeupNotifications message, length delimited. Does not implicitly {@link UserEnabledWakeupNotifications.verify|verify} messages.
8449
+ * @function encodeDelimited
8450
+ * @memberof UserEnabledWakeupNotifications
8451
+ * @static
8452
+ * @param {IUserEnabledWakeupNotifications} message UserEnabledWakeupNotifications message or plain object to encode
8453
+ * @param {$protobuf.Writer} [writer] Writer to encode to
8454
+ * @returns {$protobuf.Writer} Writer
8455
+ */
8456
+ UserEnabledWakeupNotifications.encodeDelimited = function encodeDelimited(message, writer) {
8457
+ return this.encode(message, writer).ldelim();
8458
+ };
8459
+
8460
+ /**
8461
+ * Decodes a UserEnabledWakeupNotifications message from the specified reader or buffer.
8462
+ * @function decode
8463
+ * @memberof UserEnabledWakeupNotifications
8464
+ * @static
8465
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
8466
+ * @param {number} [length] Message length if known beforehand
8467
+ * @returns {UserEnabledWakeupNotifications} UserEnabledWakeupNotifications
8468
+ * @throws {Error} If the payload is not a reader or valid buffer
8469
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
8470
+ */
8471
+ UserEnabledWakeupNotifications.decode = function decode(reader, length) {
8472
+ if (!(reader instanceof $Reader))
8473
+ reader = $Reader.create(reader);
8474
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.UserEnabledWakeupNotifications();
8475
+ while (reader.pos < end) {
8476
+ var tag = reader.uint32();
8477
+ switch (tag >>> 3) {
8478
+ case 1:
8479
+ message.userId = reader.string();
8480
+ break;
8481
+ default:
8482
+ reader.skipType(tag & 7);
8483
+ break;
8484
+ }
8485
+ }
8486
+ return message;
8487
+ };
8488
+
8489
+ /**
8490
+ * Decodes a UserEnabledWakeupNotifications message from the specified reader or buffer, length delimited.
8491
+ * @function decodeDelimited
8492
+ * @memberof UserEnabledWakeupNotifications
8493
+ * @static
8494
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
8495
+ * @returns {UserEnabledWakeupNotifications} UserEnabledWakeupNotifications
8496
+ * @throws {Error} If the payload is not a reader or valid buffer
8497
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
8498
+ */
8499
+ UserEnabledWakeupNotifications.decodeDelimited = function decodeDelimited(reader) {
8500
+ if (!(reader instanceof $Reader))
8501
+ reader = new $Reader(reader);
8502
+ return this.decode(reader, reader.uint32());
8503
+ };
8504
+
8505
+ /**
8506
+ * Verifies a UserEnabledWakeupNotifications message.
8507
+ * @function verify
8508
+ * @memberof UserEnabledWakeupNotifications
8509
+ * @static
8510
+ * @param {Object.<string,*>} message Plain object to verify
8511
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
8512
+ */
8513
+ UserEnabledWakeupNotifications.verify = function verify(message) {
8514
+ if (typeof message !== "object" || message === null)
8515
+ return "object expected";
8516
+ if (message.userId != null && message.hasOwnProperty("userId"))
8517
+ if (!$util.isString(message.userId))
8518
+ return "userId: string expected";
8519
+ return null;
8520
+ };
8521
+
8522
+ /**
8523
+ * Creates a UserEnabledWakeupNotifications message from a plain object. Also converts values to their respective internal types.
8524
+ * @function fromObject
8525
+ * @memberof UserEnabledWakeupNotifications
8526
+ * @static
8527
+ * @param {Object.<string,*>} object Plain object
8528
+ * @returns {UserEnabledWakeupNotifications} UserEnabledWakeupNotifications
8529
+ */
8530
+ UserEnabledWakeupNotifications.fromObject = function fromObject(object) {
8531
+ if (object instanceof $root.UserEnabledWakeupNotifications)
8532
+ return object;
8533
+ var message = new $root.UserEnabledWakeupNotifications();
8534
+ if (object.userId != null)
8535
+ message.userId = String(object.userId);
8536
+ return message;
8537
+ };
8538
+
8539
+ /**
8540
+ * Creates a plain object from a UserEnabledWakeupNotifications message. Also converts values to other types if specified.
8541
+ * @function toObject
8542
+ * @memberof UserEnabledWakeupNotifications
8543
+ * @static
8544
+ * @param {UserEnabledWakeupNotifications} message UserEnabledWakeupNotifications
8545
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
8546
+ * @returns {Object.<string,*>} Plain object
8547
+ */
8548
+ UserEnabledWakeupNotifications.toObject = function toObject(message, options) {
8549
+ if (!options)
8550
+ options = {};
8551
+ var object = {};
8552
+ if (options.defaults)
8553
+ object.userId = "";
8554
+ if (message.userId != null && message.hasOwnProperty("userId"))
8555
+ object.userId = message.userId;
8556
+ return object;
8557
+ };
8558
+
8559
+ /**
8560
+ * Converts this UserEnabledWakeupNotifications to JSON.
8561
+ * @function toJSON
8562
+ * @memberof UserEnabledWakeupNotifications
8563
+ * @instance
8564
+ * @returns {Object.<string,*>} JSON object
8565
+ */
8566
+ UserEnabledWakeupNotifications.prototype.toJSON = function toJSON() {
8567
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
8568
+ };
8569
+
8570
+ return UserEnabledWakeupNotifications;
8571
+ })();
8572
+
8362
8573
  $root.ReferralSignedUp = (function() {
8363
8574
 
8364
8575
  /**
@@ -9337,6 +9548,7 @@ $root.SubscriptionCreated = (function() {
9337
9548
  * @property {subscription.SubscriptionPlatform|null} [platform] SubscriptionCreated platform
9338
9549
  * @property {subscription.AutoRenewalStatus|null} [autoRenewalStatus] SubscriptionCreated autoRenewalStatus
9339
9550
  * @property {subscription.IPlan|null} [plan] SubscriptionCreated plan
9551
+ * @property {subscription.SubscriptionState|null} [subscriptionState] SubscriptionCreated subscriptionState
9340
9552
  */
9341
9553
 
9342
9554
  /**
@@ -9434,6 +9646,14 @@ $root.SubscriptionCreated = (function() {
9434
9646
  */
9435
9647
  SubscriptionCreated.prototype.plan = null;
9436
9648
 
9649
+ /**
9650
+ * SubscriptionCreated subscriptionState.
9651
+ * @member {subscription.SubscriptionState} subscriptionState
9652
+ * @memberof SubscriptionCreated
9653
+ * @instance
9654
+ */
9655
+ SubscriptionCreated.prototype.subscriptionState = 0;
9656
+
9437
9657
  /**
9438
9658
  * Creates a new SubscriptionCreated instance using the specified properties.
9439
9659
  * @function create
@@ -9478,6 +9698,8 @@ $root.SubscriptionCreated = (function() {
9478
9698
  writer.uint32(/* id 9, wireType 0 =*/72).int32(message.autoRenewalStatus);
9479
9699
  if (message.plan != null && message.hasOwnProperty("plan"))
9480
9700
  $root.subscription.Plan.encode(message.plan, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim();
9701
+ if (message.subscriptionState != null && message.hasOwnProperty("subscriptionState"))
9702
+ writer.uint32(/* id 11, wireType 0 =*/88).int32(message.subscriptionState);
9481
9703
  return writer;
9482
9704
  };
9483
9705
 
@@ -9542,6 +9764,9 @@ $root.SubscriptionCreated = (function() {
9542
9764
  case 10:
9543
9765
  message.plan = $root.subscription.Plan.decode(reader, reader.uint32());
9544
9766
  break;
9767
+ case 11:
9768
+ message.subscriptionState = reader.int32();
9769
+ break;
9545
9770
  default:
9546
9771
  reader.skipType(tag & 7);
9547
9772
  break;
@@ -9624,6 +9849,19 @@ $root.SubscriptionCreated = (function() {
9624
9849
  if (error)
9625
9850
  return "plan." + error;
9626
9851
  }
9852
+ if (message.subscriptionState != null && message.hasOwnProperty("subscriptionState"))
9853
+ switch (message.subscriptionState) {
9854
+ default:
9855
+ return "subscriptionState: enum value expected";
9856
+ case 0:
9857
+ case 1:
9858
+ case 2:
9859
+ case 3:
9860
+ case 4:
9861
+ case 6:
9862
+ case 5:
9863
+ break;
9864
+ }
9627
9865
  return null;
9628
9866
  };
9629
9867
 
@@ -9726,6 +9964,36 @@ $root.SubscriptionCreated = (function() {
9726
9964
  throw TypeError(".SubscriptionCreated.plan: object expected");
9727
9965
  message.plan = $root.subscription.Plan.fromObject(object.plan);
9728
9966
  }
9967
+ switch (object.subscriptionState) {
9968
+ case "SUBSTATE_UNKNOWN":
9969
+ case 0:
9970
+ message.subscriptionState = 0;
9971
+ break;
9972
+ case "SUBSTATE_NONE":
9973
+ case 1:
9974
+ message.subscriptionState = 1;
9975
+ break;
9976
+ case "SUBSTATE_FREE_SUBSCRIPTION":
9977
+ case 2:
9978
+ message.subscriptionState = 2;
9979
+ break;
9980
+ case "SUBSTATE_FREE_TRIAL":
9981
+ case 3:
9982
+ message.subscriptionState = 3;
9983
+ break;
9984
+ case "SUBSTATE_PAYING":
9985
+ case 4:
9986
+ message.subscriptionState = 4;
9987
+ break;
9988
+ case "SUBSTATE_GRACE":
9989
+ case 6:
9990
+ message.subscriptionState = 6;
9991
+ break;
9992
+ case "SUBSTATE_CANCELLED":
9993
+ case 5:
9994
+ message.subscriptionState = 5;
9995
+ break;
9996
+ }
9729
9997
  return message;
9730
9998
  };
9731
9999
 
@@ -9769,6 +10037,7 @@ $root.SubscriptionCreated = (function() {
9769
10037
  object.platform = options.enums === String ? "PLATFORM_UNKNOWN" : 0;
9770
10038
  object.autoRenewalStatus = options.enums === String ? "UNKNOWN_STATUS" : 0;
9771
10039
  object.plan = null;
10040
+ object.subscriptionState = options.enums === String ? "SUBSTATE_UNKNOWN" : 0;
9772
10041
  }
9773
10042
  if (message.id != null && message.hasOwnProperty("id"))
9774
10043
  object.id = message.id;
@@ -9802,6 +10071,8 @@ $root.SubscriptionCreated = (function() {
9802
10071
  object.autoRenewalStatus = options.enums === String ? $root.subscription.AutoRenewalStatus[message.autoRenewalStatus] : message.autoRenewalStatus;
9803
10072
  if (message.plan != null && message.hasOwnProperty("plan"))
9804
10073
  object.plan = $root.subscription.Plan.toObject(message.plan, options);
10074
+ if (message.subscriptionState != null && message.hasOwnProperty("subscriptionState"))
10075
+ object.subscriptionState = options.enums === String ? $root.subscription.SubscriptionState[message.subscriptionState] : message.subscriptionState;
9805
10076
  return object;
9806
10077
  };
9807
10078
 
@@ -9837,6 +10108,7 @@ $root.SubscriptionCancelled = (function() {
9837
10108
  * @property {subscription.AutoRenewalStatus|null} [autoRenewalStatus] SubscriptionCancelled autoRenewalStatus
9838
10109
  * @property {subscription.IPlan|null} [plan] SubscriptionCancelled plan
9839
10110
  * @property {subscription.CancellationType|null} [cancellationType] SubscriptionCancelled cancellationType
10111
+ * @property {subscription.SubscriptionState|null} [subscriptionState] SubscriptionCancelled subscriptionState
9840
10112
  */
9841
10113
 
9842
10114
  /**
@@ -9950,6 +10222,14 @@ $root.SubscriptionCancelled = (function() {
9950
10222
  */
9951
10223
  SubscriptionCancelled.prototype.cancellationType = 0;
9952
10224
 
10225
+ /**
10226
+ * SubscriptionCancelled subscriptionState.
10227
+ * @member {subscription.SubscriptionState} subscriptionState
10228
+ * @memberof SubscriptionCancelled
10229
+ * @instance
10230
+ */
10231
+ SubscriptionCancelled.prototype.subscriptionState = 0;
10232
+
9953
10233
  /**
9954
10234
  * Creates a new SubscriptionCancelled instance using the specified properties.
9955
10235
  * @function create
@@ -9998,6 +10278,8 @@ $root.SubscriptionCancelled = (function() {
9998
10278
  $root.subscription.Plan.encode(message.plan, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim();
9999
10279
  if (message.cancellationType != null && message.hasOwnProperty("cancellationType"))
10000
10280
  writer.uint32(/* id 12, wireType 0 =*/96).int32(message.cancellationType);
10281
+ if (message.subscriptionState != null && message.hasOwnProperty("subscriptionState"))
10282
+ writer.uint32(/* id 13, wireType 0 =*/104).int32(message.subscriptionState);
10001
10283
  return writer;
10002
10284
  };
10003
10285
 
@@ -10068,6 +10350,9 @@ $root.SubscriptionCancelled = (function() {
10068
10350
  case 12:
10069
10351
  message.cancellationType = reader.int32();
10070
10352
  break;
10353
+ case 13:
10354
+ message.subscriptionState = reader.int32();
10355
+ break;
10071
10356
  default:
10072
10357
  reader.skipType(tag & 7);
10073
10358
  break;
@@ -10164,6 +10449,19 @@ $root.SubscriptionCancelled = (function() {
10164
10449
  case 2:
10165
10450
  break;
10166
10451
  }
10452
+ if (message.subscriptionState != null && message.hasOwnProperty("subscriptionState"))
10453
+ switch (message.subscriptionState) {
10454
+ default:
10455
+ return "subscriptionState: enum value expected";
10456
+ case 0:
10457
+ case 1:
10458
+ case 2:
10459
+ case 3:
10460
+ case 4:
10461
+ case 6:
10462
+ case 5:
10463
+ break;
10464
+ }
10167
10465
  return null;
10168
10466
  };
10169
10467
 
@@ -10285,6 +10583,36 @@ $root.SubscriptionCancelled = (function() {
10285
10583
  message.cancellationType = 2;
10286
10584
  break;
10287
10585
  }
10586
+ switch (object.subscriptionState) {
10587
+ case "SUBSTATE_UNKNOWN":
10588
+ case 0:
10589
+ message.subscriptionState = 0;
10590
+ break;
10591
+ case "SUBSTATE_NONE":
10592
+ case 1:
10593
+ message.subscriptionState = 1;
10594
+ break;
10595
+ case "SUBSTATE_FREE_SUBSCRIPTION":
10596
+ case 2:
10597
+ message.subscriptionState = 2;
10598
+ break;
10599
+ case "SUBSTATE_FREE_TRIAL":
10600
+ case 3:
10601
+ message.subscriptionState = 3;
10602
+ break;
10603
+ case "SUBSTATE_PAYING":
10604
+ case 4:
10605
+ message.subscriptionState = 4;
10606
+ break;
10607
+ case "SUBSTATE_GRACE":
10608
+ case 6:
10609
+ message.subscriptionState = 6;
10610
+ break;
10611
+ case "SUBSTATE_CANCELLED":
10612
+ case 5:
10613
+ message.subscriptionState = 5;
10614
+ break;
10615
+ }
10288
10616
  return message;
10289
10617
  };
10290
10618
 
@@ -10330,6 +10658,7 @@ $root.SubscriptionCancelled = (function() {
10330
10658
  object.autoRenewalStatus = options.enums === String ? "UNKNOWN_STATUS" : 0;
10331
10659
  object.plan = null;
10332
10660
  object.cancellationType = options.enums === String ? "CT_UNKNOWN" : 0;
10661
+ object.subscriptionState = options.enums === String ? "SUBSTATE_UNKNOWN" : 0;
10333
10662
  }
10334
10663
  if (message.id != null && message.hasOwnProperty("id"))
10335
10664
  object.id = message.id;
@@ -10367,6 +10696,8 @@ $root.SubscriptionCancelled = (function() {
10367
10696
  object.plan = $root.subscription.Plan.toObject(message.plan, options);
10368
10697
  if (message.cancellationType != null && message.hasOwnProperty("cancellationType"))
10369
10698
  object.cancellationType = options.enums === String ? $root.subscription.CancellationType[message.cancellationType] : message.cancellationType;
10699
+ if (message.subscriptionState != null && message.hasOwnProperty("subscriptionState"))
10700
+ object.subscriptionState = options.enums === String ? $root.subscription.SubscriptionState[message.subscriptionState] : message.subscriptionState;
10370
10701
  return object;
10371
10702
  };
10372
10703
 
@@ -10400,6 +10731,7 @@ $root.SubscriptionRenewed = (function() {
10400
10731
  * @property {subscription.SubscriptionPlatform|null} [platform] SubscriptionRenewed platform
10401
10732
  * @property {subscription.AutoRenewalStatus|null} [autoRenewalStatus] SubscriptionRenewed autoRenewalStatus
10402
10733
  * @property {subscription.IPlan|null} [plan] SubscriptionRenewed plan
10734
+ * @property {subscription.SubscriptionState|null} [subscriptionState] SubscriptionRenewed subscriptionState
10403
10735
  */
10404
10736
 
10405
10737
  /**
@@ -10497,6 +10829,14 @@ $root.SubscriptionRenewed = (function() {
10497
10829
  */
10498
10830
  SubscriptionRenewed.prototype.plan = null;
10499
10831
 
10832
+ /**
10833
+ * SubscriptionRenewed subscriptionState.
10834
+ * @member {subscription.SubscriptionState} subscriptionState
10835
+ * @memberof SubscriptionRenewed
10836
+ * @instance
10837
+ */
10838
+ SubscriptionRenewed.prototype.subscriptionState = 0;
10839
+
10500
10840
  /**
10501
10841
  * Creates a new SubscriptionRenewed instance using the specified properties.
10502
10842
  * @function create
@@ -10541,6 +10881,8 @@ $root.SubscriptionRenewed = (function() {
10541
10881
  writer.uint32(/* id 9, wireType 0 =*/72).int32(message.autoRenewalStatus);
10542
10882
  if (message.plan != null && message.hasOwnProperty("plan"))
10543
10883
  $root.subscription.Plan.encode(message.plan, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim();
10884
+ if (message.subscriptionState != null && message.hasOwnProperty("subscriptionState"))
10885
+ writer.uint32(/* id 11, wireType 0 =*/88).int32(message.subscriptionState);
10544
10886
  return writer;
10545
10887
  };
10546
10888
 
@@ -10605,6 +10947,9 @@ $root.SubscriptionRenewed = (function() {
10605
10947
  case 10:
10606
10948
  message.plan = $root.subscription.Plan.decode(reader, reader.uint32());
10607
10949
  break;
10950
+ case 11:
10951
+ message.subscriptionState = reader.int32();
10952
+ break;
10608
10953
  default:
10609
10954
  reader.skipType(tag & 7);
10610
10955
  break;
@@ -10687,6 +11032,19 @@ $root.SubscriptionRenewed = (function() {
10687
11032
  if (error)
10688
11033
  return "plan." + error;
10689
11034
  }
11035
+ if (message.subscriptionState != null && message.hasOwnProperty("subscriptionState"))
11036
+ switch (message.subscriptionState) {
11037
+ default:
11038
+ return "subscriptionState: enum value expected";
11039
+ case 0:
11040
+ case 1:
11041
+ case 2:
11042
+ case 3:
11043
+ case 4:
11044
+ case 6:
11045
+ case 5:
11046
+ break;
11047
+ }
10690
11048
  return null;
10691
11049
  };
10692
11050
 
@@ -10789,6 +11147,36 @@ $root.SubscriptionRenewed = (function() {
10789
11147
  throw TypeError(".SubscriptionRenewed.plan: object expected");
10790
11148
  message.plan = $root.subscription.Plan.fromObject(object.plan);
10791
11149
  }
11150
+ switch (object.subscriptionState) {
11151
+ case "SUBSTATE_UNKNOWN":
11152
+ case 0:
11153
+ message.subscriptionState = 0;
11154
+ break;
11155
+ case "SUBSTATE_NONE":
11156
+ case 1:
11157
+ message.subscriptionState = 1;
11158
+ break;
11159
+ case "SUBSTATE_FREE_SUBSCRIPTION":
11160
+ case 2:
11161
+ message.subscriptionState = 2;
11162
+ break;
11163
+ case "SUBSTATE_FREE_TRIAL":
11164
+ case 3:
11165
+ message.subscriptionState = 3;
11166
+ break;
11167
+ case "SUBSTATE_PAYING":
11168
+ case 4:
11169
+ message.subscriptionState = 4;
11170
+ break;
11171
+ case "SUBSTATE_GRACE":
11172
+ case 6:
11173
+ message.subscriptionState = 6;
11174
+ break;
11175
+ case "SUBSTATE_CANCELLED":
11176
+ case 5:
11177
+ message.subscriptionState = 5;
11178
+ break;
11179
+ }
10792
11180
  return message;
10793
11181
  };
10794
11182
 
@@ -10832,6 +11220,7 @@ $root.SubscriptionRenewed = (function() {
10832
11220
  object.platform = options.enums === String ? "PLATFORM_UNKNOWN" : 0;
10833
11221
  object.autoRenewalStatus = options.enums === String ? "UNKNOWN_STATUS" : 0;
10834
11222
  object.plan = null;
11223
+ object.subscriptionState = options.enums === String ? "SUBSTATE_UNKNOWN" : 0;
10835
11224
  }
10836
11225
  if (message.id != null && message.hasOwnProperty("id"))
10837
11226
  object.id = message.id;
@@ -10865,6 +11254,8 @@ $root.SubscriptionRenewed = (function() {
10865
11254
  object.autoRenewalStatus = options.enums === String ? $root.subscription.AutoRenewalStatus[message.autoRenewalStatus] : message.autoRenewalStatus;
10866
11255
  if (message.plan != null && message.hasOwnProperty("plan"))
10867
11256
  object.plan = $root.subscription.Plan.toObject(message.plan, options);
11257
+ if (message.subscriptionState != null && message.hasOwnProperty("subscriptionState"))
11258
+ object.subscriptionState = options.enums === String ? $root.subscription.SubscriptionState[message.subscriptionState] : message.subscriptionState;
10868
11259
  return object;
10869
11260
  };
10870
11261
 
@@ -11920,6 +12311,7 @@ $root.SubscriptionGraced = (function() {
11920
12311
  * @property {subscription.SubscriptionPlatform|null} [platform] SubscriptionGraced platform
11921
12312
  * @property {subscription.AutoRenewalStatus|null} [autoRenewalStatus] SubscriptionGraced autoRenewalStatus
11922
12313
  * @property {subscription.IPlan|null} [plan] SubscriptionGraced plan
12314
+ * @property {subscription.SubscriptionState|null} [subscriptionState] SubscriptionGraced subscriptionState
11923
12315
  */
11924
12316
 
11925
12317
  /**
@@ -12017,6 +12409,14 @@ $root.SubscriptionGraced = (function() {
12017
12409
  */
12018
12410
  SubscriptionGraced.prototype.plan = null;
12019
12411
 
12412
+ /**
12413
+ * SubscriptionGraced subscriptionState.
12414
+ * @member {subscription.SubscriptionState} subscriptionState
12415
+ * @memberof SubscriptionGraced
12416
+ * @instance
12417
+ */
12418
+ SubscriptionGraced.prototype.subscriptionState = 0;
12419
+
12020
12420
  /**
12021
12421
  * Creates a new SubscriptionGraced instance using the specified properties.
12022
12422
  * @function create
@@ -12061,6 +12461,8 @@ $root.SubscriptionGraced = (function() {
12061
12461
  writer.uint32(/* id 9, wireType 0 =*/72).int32(message.autoRenewalStatus);
12062
12462
  if (message.plan != null && message.hasOwnProperty("plan"))
12063
12463
  $root.subscription.Plan.encode(message.plan, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim();
12464
+ if (message.subscriptionState != null && message.hasOwnProperty("subscriptionState"))
12465
+ writer.uint32(/* id 11, wireType 0 =*/88).int32(message.subscriptionState);
12064
12466
  return writer;
12065
12467
  };
12066
12468
 
@@ -12125,6 +12527,9 @@ $root.SubscriptionGraced = (function() {
12125
12527
  case 10:
12126
12528
  message.plan = $root.subscription.Plan.decode(reader, reader.uint32());
12127
12529
  break;
12530
+ case 11:
12531
+ message.subscriptionState = reader.int32();
12532
+ break;
12128
12533
  default:
12129
12534
  reader.skipType(tag & 7);
12130
12535
  break;
@@ -12207,6 +12612,19 @@ $root.SubscriptionGraced = (function() {
12207
12612
  if (error)
12208
12613
  return "plan." + error;
12209
12614
  }
12615
+ if (message.subscriptionState != null && message.hasOwnProperty("subscriptionState"))
12616
+ switch (message.subscriptionState) {
12617
+ default:
12618
+ return "subscriptionState: enum value expected";
12619
+ case 0:
12620
+ case 1:
12621
+ case 2:
12622
+ case 3:
12623
+ case 4:
12624
+ case 6:
12625
+ case 5:
12626
+ break;
12627
+ }
12210
12628
  return null;
12211
12629
  };
12212
12630
 
@@ -12309,6 +12727,36 @@ $root.SubscriptionGraced = (function() {
12309
12727
  throw TypeError(".SubscriptionGraced.plan: object expected");
12310
12728
  message.plan = $root.subscription.Plan.fromObject(object.plan);
12311
12729
  }
12730
+ switch (object.subscriptionState) {
12731
+ case "SUBSTATE_UNKNOWN":
12732
+ case 0:
12733
+ message.subscriptionState = 0;
12734
+ break;
12735
+ case "SUBSTATE_NONE":
12736
+ case 1:
12737
+ message.subscriptionState = 1;
12738
+ break;
12739
+ case "SUBSTATE_FREE_SUBSCRIPTION":
12740
+ case 2:
12741
+ message.subscriptionState = 2;
12742
+ break;
12743
+ case "SUBSTATE_FREE_TRIAL":
12744
+ case 3:
12745
+ message.subscriptionState = 3;
12746
+ break;
12747
+ case "SUBSTATE_PAYING":
12748
+ case 4:
12749
+ message.subscriptionState = 4;
12750
+ break;
12751
+ case "SUBSTATE_GRACE":
12752
+ case 6:
12753
+ message.subscriptionState = 6;
12754
+ break;
12755
+ case "SUBSTATE_CANCELLED":
12756
+ case 5:
12757
+ message.subscriptionState = 5;
12758
+ break;
12759
+ }
12312
12760
  return message;
12313
12761
  };
12314
12762
 
@@ -12352,6 +12800,7 @@ $root.SubscriptionGraced = (function() {
12352
12800
  object.platform = options.enums === String ? "PLATFORM_UNKNOWN" : 0;
12353
12801
  object.autoRenewalStatus = options.enums === String ? "UNKNOWN_STATUS" : 0;
12354
12802
  object.plan = null;
12803
+ object.subscriptionState = options.enums === String ? "SUBSTATE_UNKNOWN" : 0;
12355
12804
  }
12356
12805
  if (message.id != null && message.hasOwnProperty("id"))
12357
12806
  object.id = message.id;
@@ -12385,6 +12834,8 @@ $root.SubscriptionGraced = (function() {
12385
12834
  object.autoRenewalStatus = options.enums === String ? $root.subscription.AutoRenewalStatus[message.autoRenewalStatus] : message.autoRenewalStatus;
12386
12835
  if (message.plan != null && message.hasOwnProperty("plan"))
12387
12836
  object.plan = $root.subscription.Plan.toObject(message.plan, options);
12837
+ if (message.subscriptionState != null && message.hasOwnProperty("subscriptionState"))
12838
+ object.subscriptionState = options.enums === String ? $root.subscription.SubscriptionState[message.subscriptionState] : message.subscriptionState;
12388
12839
  return object;
12389
12840
  };
12390
12841
 
@@ -12417,6 +12868,7 @@ $root.SubscriptionStarted = (function() {
12417
12868
  * @property {subscription.SubscriptionPlatform|null} [platform] SubscriptionStarted platform
12418
12869
  * @property {subscription.AutoRenewalStatus|null} [autoRenewalStatus] SubscriptionStarted autoRenewalStatus
12419
12870
  * @property {subscription.IPlan|null} [plan] SubscriptionStarted plan
12871
+ * @property {subscription.SubscriptionState|null} [subscriptionState] SubscriptionStarted subscriptionState
12420
12872
  */
12421
12873
 
12422
12874
  /**
@@ -12506,6 +12958,14 @@ $root.SubscriptionStarted = (function() {
12506
12958
  */
12507
12959
  SubscriptionStarted.prototype.plan = null;
12508
12960
 
12961
+ /**
12962
+ * SubscriptionStarted subscriptionState.
12963
+ * @member {subscription.SubscriptionState} subscriptionState
12964
+ * @memberof SubscriptionStarted
12965
+ * @instance
12966
+ */
12967
+ SubscriptionStarted.prototype.subscriptionState = 0;
12968
+
12509
12969
  /**
12510
12970
  * Creates a new SubscriptionStarted instance using the specified properties.
12511
12971
  * @function create
@@ -12548,6 +13008,8 @@ $root.SubscriptionStarted = (function() {
12548
13008
  writer.uint32(/* id 9, wireType 0 =*/72).int32(message.autoRenewalStatus);
12549
13009
  if (message.plan != null && message.hasOwnProperty("plan"))
12550
13010
  $root.subscription.Plan.encode(message.plan, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim();
13011
+ if (message.subscriptionState != null && message.hasOwnProperty("subscriptionState"))
13012
+ writer.uint32(/* id 11, wireType 0 =*/88).int32(message.subscriptionState);
12551
13013
  return writer;
12552
13014
  };
12553
13015
 
@@ -12609,6 +13071,9 @@ $root.SubscriptionStarted = (function() {
12609
13071
  case 10:
12610
13072
  message.plan = $root.subscription.Plan.decode(reader, reader.uint32());
12611
13073
  break;
13074
+ case 11:
13075
+ message.subscriptionState = reader.int32();
13076
+ break;
12612
13077
  default:
12613
13078
  reader.skipType(tag & 7);
12614
13079
  break;
@@ -12688,6 +13153,19 @@ $root.SubscriptionStarted = (function() {
12688
13153
  if (error)
12689
13154
  return "plan." + error;
12690
13155
  }
13156
+ if (message.subscriptionState != null && message.hasOwnProperty("subscriptionState"))
13157
+ switch (message.subscriptionState) {
13158
+ default:
13159
+ return "subscriptionState: enum value expected";
13160
+ case 0:
13161
+ case 1:
13162
+ case 2:
13163
+ case 3:
13164
+ case 4:
13165
+ case 6:
13166
+ case 5:
13167
+ break;
13168
+ }
12691
13169
  return null;
12692
13170
  };
12693
13171
 
@@ -12788,6 +13266,36 @@ $root.SubscriptionStarted = (function() {
12788
13266
  throw TypeError(".SubscriptionStarted.plan: object expected");
12789
13267
  message.plan = $root.subscription.Plan.fromObject(object.plan);
12790
13268
  }
13269
+ switch (object.subscriptionState) {
13270
+ case "SUBSTATE_UNKNOWN":
13271
+ case 0:
13272
+ message.subscriptionState = 0;
13273
+ break;
13274
+ case "SUBSTATE_NONE":
13275
+ case 1:
13276
+ message.subscriptionState = 1;
13277
+ break;
13278
+ case "SUBSTATE_FREE_SUBSCRIPTION":
13279
+ case 2:
13280
+ message.subscriptionState = 2;
13281
+ break;
13282
+ case "SUBSTATE_FREE_TRIAL":
13283
+ case 3:
13284
+ message.subscriptionState = 3;
13285
+ break;
13286
+ case "SUBSTATE_PAYING":
13287
+ case 4:
13288
+ message.subscriptionState = 4;
13289
+ break;
13290
+ case "SUBSTATE_GRACE":
13291
+ case 6:
13292
+ message.subscriptionState = 6;
13293
+ break;
13294
+ case "SUBSTATE_CANCELLED":
13295
+ case 5:
13296
+ message.subscriptionState = 5;
13297
+ break;
13298
+ }
12791
13299
  return message;
12792
13300
  };
12793
13301
 
@@ -12830,6 +13338,7 @@ $root.SubscriptionStarted = (function() {
12830
13338
  object.platform = options.enums === String ? "PLATFORM_UNKNOWN" : 0;
12831
13339
  object.autoRenewalStatus = options.enums === String ? "UNKNOWN_STATUS" : 0;
12832
13340
  object.plan = null;
13341
+ object.subscriptionState = options.enums === String ? "SUBSTATE_UNKNOWN" : 0;
12833
13342
  }
12834
13343
  if (message.updatedOn != null && message.hasOwnProperty("updatedOn"))
12835
13344
  if (typeof message.updatedOn === "number")
@@ -12861,6 +13370,8 @@ $root.SubscriptionStarted = (function() {
12861
13370
  object.autoRenewalStatus = options.enums === String ? $root.subscription.AutoRenewalStatus[message.autoRenewalStatus] : message.autoRenewalStatus;
12862
13371
  if (message.plan != null && message.hasOwnProperty("plan"))
12863
13372
  object.plan = $root.subscription.Plan.toObject(message.plan, options);
13373
+ if (message.subscriptionState != null && message.hasOwnProperty("subscriptionState"))
13374
+ object.subscriptionState = options.enums === String ? $root.subscription.SubscriptionState[message.subscriptionState] : message.subscriptionState;
12864
13375
  return object;
12865
13376
  };
12866
13377
 
@@ -12894,6 +13405,7 @@ $root.SubscriptionEnded = (function() {
12894
13405
  * @property {subscription.AutoRenewalStatus|null} [autoRenewalStatus] SubscriptionEnded autoRenewalStatus
12895
13406
  * @property {subscription.IPlan|null} [plan] SubscriptionEnded plan
12896
13407
  * @property {subscription.CancellationType|null} [cancellationType] SubscriptionEnded cancellationType
13408
+ * @property {subscription.SubscriptionState|null} [subscriptionState] SubscriptionEnded subscriptionState
12897
13409
  */
12898
13410
 
12899
13411
  /**
@@ -12991,6 +13503,14 @@ $root.SubscriptionEnded = (function() {
12991
13503
  */
12992
13504
  SubscriptionEnded.prototype.cancellationType = 0;
12993
13505
 
13506
+ /**
13507
+ * SubscriptionEnded subscriptionState.
13508
+ * @member {subscription.SubscriptionState} subscriptionState
13509
+ * @memberof SubscriptionEnded
13510
+ * @instance
13511
+ */
13512
+ SubscriptionEnded.prototype.subscriptionState = 0;
13513
+
12994
13514
  /**
12995
13515
  * Creates a new SubscriptionEnded instance using the specified properties.
12996
13516
  * @function create
@@ -13035,6 +13555,8 @@ $root.SubscriptionEnded = (function() {
13035
13555
  $root.subscription.Plan.encode(message.plan, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim();
13036
13556
  if (message.cancellationType != null && message.hasOwnProperty("cancellationType"))
13037
13557
  writer.uint32(/* id 11, wireType 0 =*/88).int32(message.cancellationType);
13558
+ if (message.subscriptionState != null && message.hasOwnProperty("subscriptionState"))
13559
+ writer.uint32(/* id 12, wireType 0 =*/96).int32(message.subscriptionState);
13038
13560
  return writer;
13039
13561
  };
13040
13562
 
@@ -13099,6 +13621,9 @@ $root.SubscriptionEnded = (function() {
13099
13621
  case 11:
13100
13622
  message.cancellationType = reader.int32();
13101
13623
  break;
13624
+ case 12:
13625
+ message.subscriptionState = reader.int32();
13626
+ break;
13102
13627
  default:
13103
13628
  reader.skipType(tag & 7);
13104
13629
  break;
@@ -13187,6 +13712,19 @@ $root.SubscriptionEnded = (function() {
13187
13712
  case 2:
13188
13713
  break;
13189
13714
  }
13715
+ if (message.subscriptionState != null && message.hasOwnProperty("subscriptionState"))
13716
+ switch (message.subscriptionState) {
13717
+ default:
13718
+ return "subscriptionState: enum value expected";
13719
+ case 0:
13720
+ case 1:
13721
+ case 2:
13722
+ case 3:
13723
+ case 4:
13724
+ case 6:
13725
+ case 5:
13726
+ break;
13727
+ }
13190
13728
  return null;
13191
13729
  };
13192
13730
 
@@ -13301,6 +13839,36 @@ $root.SubscriptionEnded = (function() {
13301
13839
  message.cancellationType = 2;
13302
13840
  break;
13303
13841
  }
13842
+ switch (object.subscriptionState) {
13843
+ case "SUBSTATE_UNKNOWN":
13844
+ case 0:
13845
+ message.subscriptionState = 0;
13846
+ break;
13847
+ case "SUBSTATE_NONE":
13848
+ case 1:
13849
+ message.subscriptionState = 1;
13850
+ break;
13851
+ case "SUBSTATE_FREE_SUBSCRIPTION":
13852
+ case 2:
13853
+ message.subscriptionState = 2;
13854
+ break;
13855
+ case "SUBSTATE_FREE_TRIAL":
13856
+ case 3:
13857
+ message.subscriptionState = 3;
13858
+ break;
13859
+ case "SUBSTATE_PAYING":
13860
+ case 4:
13861
+ message.subscriptionState = 4;
13862
+ break;
13863
+ case "SUBSTATE_GRACE":
13864
+ case 6:
13865
+ message.subscriptionState = 6;
13866
+ break;
13867
+ case "SUBSTATE_CANCELLED":
13868
+ case 5:
13869
+ message.subscriptionState = 5;
13870
+ break;
13871
+ }
13304
13872
  return message;
13305
13873
  };
13306
13874
 
@@ -13344,6 +13912,7 @@ $root.SubscriptionEnded = (function() {
13344
13912
  object.autoRenewalStatus = options.enums === String ? "UNKNOWN_STATUS" : 0;
13345
13913
  object.plan = null;
13346
13914
  object.cancellationType = options.enums === String ? "CT_UNKNOWN" : 0;
13915
+ object.subscriptionState = options.enums === String ? "SUBSTATE_UNKNOWN" : 0;
13347
13916
  }
13348
13917
  if (message.updatedOn != null && message.hasOwnProperty("updatedOn"))
13349
13918
  if (typeof message.updatedOn === "number")
@@ -13377,6 +13946,8 @@ $root.SubscriptionEnded = (function() {
13377
13946
  object.plan = $root.subscription.Plan.toObject(message.plan, options);
13378
13947
  if (message.cancellationType != null && message.hasOwnProperty("cancellationType"))
13379
13948
  object.cancellationType = options.enums === String ? $root.subscription.CancellationType[message.cancellationType] : message.cancellationType;
13949
+ if (message.subscriptionState != null && message.hasOwnProperty("subscriptionState"))
13950
+ object.subscriptionState = options.enums === String ? $root.subscription.SubscriptionState[message.subscriptionState] : message.subscriptionState;
13380
13951
  return object;
13381
13952
  };
13382
13953
 
@@ -13409,6 +13980,7 @@ $root.SubscriptionRecovered = (function() {
13409
13980
  * @property {subscription.SubscriptionPlatform|null} [platform] SubscriptionRecovered platform
13410
13981
  * @property {subscription.AutoRenewalStatus|null} [autoRenewalStatus] SubscriptionRecovered autoRenewalStatus
13411
13982
  * @property {subscription.IPlan|null} [plan] SubscriptionRecovered plan
13983
+ * @property {subscription.SubscriptionState|null} [subscriptionState] SubscriptionRecovered subscriptionState
13412
13984
  */
13413
13985
 
13414
13986
  /**
@@ -13498,6 +14070,14 @@ $root.SubscriptionRecovered = (function() {
13498
14070
  */
13499
14071
  SubscriptionRecovered.prototype.plan = null;
13500
14072
 
14073
+ /**
14074
+ * SubscriptionRecovered subscriptionState.
14075
+ * @member {subscription.SubscriptionState} subscriptionState
14076
+ * @memberof SubscriptionRecovered
14077
+ * @instance
14078
+ */
14079
+ SubscriptionRecovered.prototype.subscriptionState = 0;
14080
+
13501
14081
  /**
13502
14082
  * Creates a new SubscriptionRecovered instance using the specified properties.
13503
14083
  * @function create
@@ -13540,6 +14120,8 @@ $root.SubscriptionRecovered = (function() {
13540
14120
  writer.uint32(/* id 9, wireType 0 =*/72).int32(message.autoRenewalStatus);
13541
14121
  if (message.plan != null && message.hasOwnProperty("plan"))
13542
14122
  $root.subscription.Plan.encode(message.plan, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim();
14123
+ if (message.subscriptionState != null && message.hasOwnProperty("subscriptionState"))
14124
+ writer.uint32(/* id 11, wireType 0 =*/88).int32(message.subscriptionState);
13543
14125
  return writer;
13544
14126
  };
13545
14127
 
@@ -13601,6 +14183,9 @@ $root.SubscriptionRecovered = (function() {
13601
14183
  case 10:
13602
14184
  message.plan = $root.subscription.Plan.decode(reader, reader.uint32());
13603
14185
  break;
14186
+ case 11:
14187
+ message.subscriptionState = reader.int32();
14188
+ break;
13604
14189
  default:
13605
14190
  reader.skipType(tag & 7);
13606
14191
  break;
@@ -13680,6 +14265,19 @@ $root.SubscriptionRecovered = (function() {
13680
14265
  if (error)
13681
14266
  return "plan." + error;
13682
14267
  }
14268
+ if (message.subscriptionState != null && message.hasOwnProperty("subscriptionState"))
14269
+ switch (message.subscriptionState) {
14270
+ default:
14271
+ return "subscriptionState: enum value expected";
14272
+ case 0:
14273
+ case 1:
14274
+ case 2:
14275
+ case 3:
14276
+ case 4:
14277
+ case 6:
14278
+ case 5:
14279
+ break;
14280
+ }
13683
14281
  return null;
13684
14282
  };
13685
14283
 
@@ -13780,6 +14378,36 @@ $root.SubscriptionRecovered = (function() {
13780
14378
  throw TypeError(".SubscriptionRecovered.plan: object expected");
13781
14379
  message.plan = $root.subscription.Plan.fromObject(object.plan);
13782
14380
  }
14381
+ switch (object.subscriptionState) {
14382
+ case "SUBSTATE_UNKNOWN":
14383
+ case 0:
14384
+ message.subscriptionState = 0;
14385
+ break;
14386
+ case "SUBSTATE_NONE":
14387
+ case 1:
14388
+ message.subscriptionState = 1;
14389
+ break;
14390
+ case "SUBSTATE_FREE_SUBSCRIPTION":
14391
+ case 2:
14392
+ message.subscriptionState = 2;
14393
+ break;
14394
+ case "SUBSTATE_FREE_TRIAL":
14395
+ case 3:
14396
+ message.subscriptionState = 3;
14397
+ break;
14398
+ case "SUBSTATE_PAYING":
14399
+ case 4:
14400
+ message.subscriptionState = 4;
14401
+ break;
14402
+ case "SUBSTATE_GRACE":
14403
+ case 6:
14404
+ message.subscriptionState = 6;
14405
+ break;
14406
+ case "SUBSTATE_CANCELLED":
14407
+ case 5:
14408
+ message.subscriptionState = 5;
14409
+ break;
14410
+ }
13783
14411
  return message;
13784
14412
  };
13785
14413
 
@@ -13822,6 +14450,7 @@ $root.SubscriptionRecovered = (function() {
13822
14450
  object.platform = options.enums === String ? "PLATFORM_UNKNOWN" : 0;
13823
14451
  object.autoRenewalStatus = options.enums === String ? "UNKNOWN_STATUS" : 0;
13824
14452
  object.plan = null;
14453
+ object.subscriptionState = options.enums === String ? "SUBSTATE_UNKNOWN" : 0;
13825
14454
  }
13826
14455
  if (message.updatedOn != null && message.hasOwnProperty("updatedOn"))
13827
14456
  if (typeof message.updatedOn === "number")
@@ -13853,6 +14482,8 @@ $root.SubscriptionRecovered = (function() {
13853
14482
  object.autoRenewalStatus = options.enums === String ? $root.subscription.AutoRenewalStatus[message.autoRenewalStatus] : message.autoRenewalStatus;
13854
14483
  if (message.plan != null && message.hasOwnProperty("plan"))
13855
14484
  object.plan = $root.subscription.Plan.toObject(message.plan, options);
14485
+ if (message.subscriptionState != null && message.hasOwnProperty("subscriptionState"))
14486
+ object.subscriptionState = options.enums === String ? $root.subscription.SubscriptionState[message.subscriptionState] : message.subscriptionState;
13856
14487
  return object;
13857
14488
  };
13858
14489
 
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.57.0"
19
+ "version": "1.59.0"
20
20
  }