@headspace/protos-events 1.40.0 → 1.42.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
@@ -1132,6 +1132,16 @@ export namespace subscription {
1132
1132
  PRIMARY = 0,
1133
1133
  MEMBER = 1
1134
1134
  }
1135
+
1136
+ /** SubscriptionPlatform enum. */
1137
+ enum SubscriptionPlatform {
1138
+ PLATFORM_UNKNOWN = 0,
1139
+ ITUNES = 1,
1140
+ PLAY_STORE = 2,
1141
+ ZUORA = 3,
1142
+ HEADSPACE = 4,
1143
+ SPOTIFY = 5
1144
+ }
1135
1145
  }
1136
1146
 
1137
1147
  /** Namespace com. */
@@ -1995,6 +2005,12 @@ export namespace com {
1995
2005
 
1996
2006
  /** UserPasswordResetCreated ticket */
1997
2007
  ticket?: (string|null);
2008
+
2009
+ /** UserPasswordResetCreated hsUserId */
2010
+ hsUserId?: (string|null);
2011
+
2012
+ /** UserPasswordResetCreated timestampMillis */
2013
+ timestampMillis?: (number|Long|null);
1998
2014
  }
1999
2015
 
2000
2016
  /** Represents a UserPasswordResetCreated. */
@@ -2012,6 +2028,12 @@ export namespace com {
2012
2028
  /** UserPasswordResetCreated ticket. */
2013
2029
  public ticket: string;
2014
2030
 
2031
+ /** UserPasswordResetCreated hsUserId. */
2032
+ public hsUserId: string;
2033
+
2034
+ /** UserPasswordResetCreated timestampMillis. */
2035
+ public timestampMillis: (number|Long);
2036
+
2015
2037
  /**
2016
2038
  * Creates a new UserPasswordResetCreated instance using the specified properties.
2017
2039
  * @param [properties] Properties to set
@@ -3582,6 +3604,21 @@ export interface ISubscriptionCreated {
3582
3604
 
3583
3605
  /** SubscriptionCreated userId */
3584
3606
  userId?: (string|null);
3607
+
3608
+ /** SubscriptionCreated createdAt */
3609
+ createdAt?: (number|Long|null);
3610
+
3611
+ /** SubscriptionCreated startsAt */
3612
+ startsAt?: (number|Long|null);
3613
+
3614
+ /** SubscriptionCreated endsAt */
3615
+ endsAt?: (number|Long|null);
3616
+
3617
+ /** SubscriptionCreated voucherCode */
3618
+ voucherCode?: (string|null);
3619
+
3620
+ /** SubscriptionCreated platform */
3621
+ platform?: (subscription.SubscriptionPlatform|null);
3585
3622
  }
3586
3623
 
3587
3624
  /** Represents a SubscriptionCreated. */
@@ -3602,6 +3639,21 @@ export class SubscriptionCreated implements ISubscriptionCreated {
3602
3639
  /** SubscriptionCreated userId. */
3603
3640
  public userId: string;
3604
3641
 
3642
+ /** SubscriptionCreated createdAt. */
3643
+ public createdAt: (number|Long);
3644
+
3645
+ /** SubscriptionCreated startsAt. */
3646
+ public startsAt: (number|Long);
3647
+
3648
+ /** SubscriptionCreated endsAt. */
3649
+ public endsAt: (number|Long);
3650
+
3651
+ /** SubscriptionCreated voucherCode. */
3652
+ public voucherCode: string;
3653
+
3654
+ /** SubscriptionCreated platform. */
3655
+ public platform: subscription.SubscriptionPlatform;
3656
+
3605
3657
  /**
3606
3658
  * Creates a new SubscriptionCreated instance using the specified properties.
3607
3659
  * @param [properties] Properties to set
@@ -3687,6 +3739,21 @@ export interface ISubscriptionCancelled {
3687
3739
 
3688
3740
  /** SubscriptionCancelled paymentMethod */
3689
3741
  paymentMethod?: (subscription.IPaymentMethod|null);
3742
+
3743
+ /** SubscriptionCancelled createdAt */
3744
+ createdAt?: (number|Long|null);
3745
+
3746
+ /** SubscriptionCancelled startsAt */
3747
+ startsAt?: (number|Long|null);
3748
+
3749
+ /** SubscriptionCancelled endsAt */
3750
+ endsAt?: (number|Long|null);
3751
+
3752
+ /** SubscriptionCancelled voucherCode */
3753
+ voucherCode?: (string|null);
3754
+
3755
+ /** SubscriptionCancelled platform */
3756
+ platform?: (subscription.SubscriptionPlatform|null);
3690
3757
  }
3691
3758
 
3692
3759
  /** Represents a SubscriptionCancelled. */
@@ -3710,6 +3777,21 @@ export class SubscriptionCancelled implements ISubscriptionCancelled {
3710
3777
  /** SubscriptionCancelled paymentMethod. */
3711
3778
  public paymentMethod?: (subscription.IPaymentMethod|null);
3712
3779
 
3780
+ /** SubscriptionCancelled createdAt. */
3781
+ public createdAt: (number|Long);
3782
+
3783
+ /** SubscriptionCancelled startsAt. */
3784
+ public startsAt: (number|Long);
3785
+
3786
+ /** SubscriptionCancelled endsAt. */
3787
+ public endsAt: (number|Long);
3788
+
3789
+ /** SubscriptionCancelled voucherCode. */
3790
+ public voucherCode: string;
3791
+
3792
+ /** SubscriptionCancelled platform. */
3793
+ public platform: subscription.SubscriptionPlatform;
3794
+
3713
3795
  /**
3714
3796
  * Creates a new SubscriptionCancelled instance using the specified properties.
3715
3797
  * @param [properties] Properties to set
@@ -3792,6 +3874,21 @@ export interface ISubscriptionRenewed {
3792
3874
 
3793
3875
  /** SubscriptionRenewed userId */
3794
3876
  userId?: (string|null);
3877
+
3878
+ /** SubscriptionRenewed createdAt */
3879
+ createdAt?: (number|Long|null);
3880
+
3881
+ /** SubscriptionRenewed startsAt */
3882
+ startsAt?: (number|Long|null);
3883
+
3884
+ /** SubscriptionRenewed endsAt */
3885
+ endsAt?: (number|Long|null);
3886
+
3887
+ /** SubscriptionRenewed voucherCode */
3888
+ voucherCode?: (string|null);
3889
+
3890
+ /** SubscriptionRenewed platform */
3891
+ platform?: (subscription.SubscriptionPlatform|null);
3795
3892
  }
3796
3893
 
3797
3894
  /** Represents a SubscriptionRenewed. */
@@ -3812,6 +3909,21 @@ export class SubscriptionRenewed implements ISubscriptionRenewed {
3812
3909
  /** SubscriptionRenewed userId. */
3813
3910
  public userId: string;
3814
3911
 
3912
+ /** SubscriptionRenewed createdAt. */
3913
+ public createdAt: (number|Long);
3914
+
3915
+ /** SubscriptionRenewed startsAt. */
3916
+ public startsAt: (number|Long);
3917
+
3918
+ /** SubscriptionRenewed endsAt. */
3919
+ public endsAt: (number|Long);
3920
+
3921
+ /** SubscriptionRenewed voucherCode. */
3922
+ public voucherCode: string;
3923
+
3924
+ /** SubscriptionRenewed platform. */
3925
+ public platform: subscription.SubscriptionPlatform;
3926
+
3815
3927
  /**
3816
3928
  * Creates a new SubscriptionRenewed instance using the specified properties.
3817
3929
  * @param [properties] Properties to set
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
 
@@ -4510,6 +4532,8 @@ $root.com = (function() {
4510
4532
  * @interface IUserPasswordResetCreated
4511
4533
  * @property {string|null} [email] UserPasswordResetCreated email
4512
4534
  * @property {string|null} [ticket] UserPasswordResetCreated ticket
4535
+ * @property {string|null} [hsUserId] UserPasswordResetCreated hsUserId
4536
+ * @property {number|Long|null} [timestampMillis] UserPasswordResetCreated timestampMillis
4513
4537
  */
4514
4538
 
4515
4539
  /**
@@ -4543,6 +4567,22 @@ $root.com = (function() {
4543
4567
  */
4544
4568
  UserPasswordResetCreated.prototype.ticket = "";
4545
4569
 
4570
+ /**
4571
+ * UserPasswordResetCreated hsUserId.
4572
+ * @member {string} hsUserId
4573
+ * @memberof com.headspace.auth.grpc.auth0.events.UserPasswordResetCreated
4574
+ * @instance
4575
+ */
4576
+ UserPasswordResetCreated.prototype.hsUserId = "";
4577
+
4578
+ /**
4579
+ * UserPasswordResetCreated timestampMillis.
4580
+ * @member {number|Long} timestampMillis
4581
+ * @memberof com.headspace.auth.grpc.auth0.events.UserPasswordResetCreated
4582
+ * @instance
4583
+ */
4584
+ UserPasswordResetCreated.prototype.timestampMillis = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
4585
+
4546
4586
  /**
4547
4587
  * Creates a new UserPasswordResetCreated instance using the specified properties.
4548
4588
  * @function create
@@ -4571,6 +4611,10 @@ $root.com = (function() {
4571
4611
  writer.uint32(/* id 1, wireType 2 =*/10).string(message.email);
4572
4612
  if (message.ticket != null && message.hasOwnProperty("ticket"))
4573
4613
  writer.uint32(/* id 2, wireType 2 =*/18).string(message.ticket);
4614
+ if (message.hsUserId != null && message.hasOwnProperty("hsUserId"))
4615
+ writer.uint32(/* id 3, wireType 2 =*/26).string(message.hsUserId);
4616
+ if (message.timestampMillis != null && message.hasOwnProperty("timestampMillis"))
4617
+ writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.timestampMillis);
4574
4618
  return writer;
4575
4619
  };
4576
4620
 
@@ -4611,6 +4655,12 @@ $root.com = (function() {
4611
4655
  case 2:
4612
4656
  message.ticket = reader.string();
4613
4657
  break;
4658
+ case 3:
4659
+ message.hsUserId = reader.string();
4660
+ break;
4661
+ case 4:
4662
+ message.timestampMillis = reader.uint64();
4663
+ break;
4614
4664
  default:
4615
4665
  reader.skipType(tag & 7);
4616
4666
  break;
@@ -4652,6 +4702,12 @@ $root.com = (function() {
4652
4702
  if (message.ticket != null && message.hasOwnProperty("ticket"))
4653
4703
  if (!$util.isString(message.ticket))
4654
4704
  return "ticket: string expected";
4705
+ if (message.hsUserId != null && message.hasOwnProperty("hsUserId"))
4706
+ if (!$util.isString(message.hsUserId))
4707
+ return "hsUserId: string expected";
4708
+ if (message.timestampMillis != null && message.hasOwnProperty("timestampMillis"))
4709
+ if (!$util.isInteger(message.timestampMillis) && !(message.timestampMillis && $util.isInteger(message.timestampMillis.low) && $util.isInteger(message.timestampMillis.high)))
4710
+ return "timestampMillis: integer|Long expected";
4655
4711
  return null;
4656
4712
  };
4657
4713
 
@@ -4671,6 +4727,17 @@ $root.com = (function() {
4671
4727
  message.email = String(object.email);
4672
4728
  if (object.ticket != null)
4673
4729
  message.ticket = String(object.ticket);
4730
+ if (object.hsUserId != null)
4731
+ message.hsUserId = String(object.hsUserId);
4732
+ if (object.timestampMillis != null)
4733
+ if ($util.Long)
4734
+ (message.timestampMillis = $util.Long.fromValue(object.timestampMillis)).unsigned = true;
4735
+ else if (typeof object.timestampMillis === "string")
4736
+ message.timestampMillis = parseInt(object.timestampMillis, 10);
4737
+ else if (typeof object.timestampMillis === "number")
4738
+ message.timestampMillis = object.timestampMillis;
4739
+ else if (typeof object.timestampMillis === "object")
4740
+ message.timestampMillis = new $util.LongBits(object.timestampMillis.low >>> 0, object.timestampMillis.high >>> 0).toNumber(true);
4674
4741
  return message;
4675
4742
  };
4676
4743
 
@@ -4690,11 +4757,24 @@ $root.com = (function() {
4690
4757
  if (options.defaults) {
4691
4758
  object.email = "";
4692
4759
  object.ticket = "";
4760
+ object.hsUserId = "";
4761
+ if ($util.Long) {
4762
+ var long = new $util.Long(0, 0, true);
4763
+ object.timestampMillis = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
4764
+ } else
4765
+ object.timestampMillis = options.longs === String ? "0" : 0;
4693
4766
  }
4694
4767
  if (message.email != null && message.hasOwnProperty("email"))
4695
4768
  object.email = message.email;
4696
4769
  if (message.ticket != null && message.hasOwnProperty("ticket"))
4697
4770
  object.ticket = message.ticket;
4771
+ if (message.hsUserId != null && message.hasOwnProperty("hsUserId"))
4772
+ object.hsUserId = message.hsUserId;
4773
+ if (message.timestampMillis != null && message.hasOwnProperty("timestampMillis"))
4774
+ if (typeof message.timestampMillis === "number")
4775
+ object.timestampMillis = options.longs === String ? String(message.timestampMillis) : message.timestampMillis;
4776
+ else
4777
+ object.timestampMillis = options.longs === String ? $util.Long.prototype.toString.call(message.timestampMillis) : options.longs === Number ? new $util.LongBits(message.timestampMillis.low >>> 0, message.timestampMillis.high >>> 0).toNumber(true) : message.timestampMillis;
4698
4778
  return object;
4699
4779
  };
4700
4780
 
@@ -8381,6 +8461,11 @@ $root.SubscriptionCreated = (function() {
8381
8461
  * @property {number|null} [id] SubscriptionCreated id
8382
8462
  * @property {number|Long|null} [updatedOn] SubscriptionCreated updatedOn
8383
8463
  * @property {string|null} [userId] SubscriptionCreated userId
8464
+ * @property {number|Long|null} [createdAt] SubscriptionCreated createdAt
8465
+ * @property {number|Long|null} [startsAt] SubscriptionCreated startsAt
8466
+ * @property {number|Long|null} [endsAt] SubscriptionCreated endsAt
8467
+ * @property {string|null} [voucherCode] SubscriptionCreated voucherCode
8468
+ * @property {subscription.SubscriptionPlatform|null} [platform] SubscriptionCreated platform
8384
8469
  */
8385
8470
 
8386
8471
  /**
@@ -8422,6 +8507,46 @@ $root.SubscriptionCreated = (function() {
8422
8507
  */
8423
8508
  SubscriptionCreated.prototype.userId = "";
8424
8509
 
8510
+ /**
8511
+ * SubscriptionCreated createdAt.
8512
+ * @member {number|Long} createdAt
8513
+ * @memberof SubscriptionCreated
8514
+ * @instance
8515
+ */
8516
+ SubscriptionCreated.prototype.createdAt = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
8517
+
8518
+ /**
8519
+ * SubscriptionCreated startsAt.
8520
+ * @member {number|Long} startsAt
8521
+ * @memberof SubscriptionCreated
8522
+ * @instance
8523
+ */
8524
+ SubscriptionCreated.prototype.startsAt = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
8525
+
8526
+ /**
8527
+ * SubscriptionCreated endsAt.
8528
+ * @member {number|Long} endsAt
8529
+ * @memberof SubscriptionCreated
8530
+ * @instance
8531
+ */
8532
+ SubscriptionCreated.prototype.endsAt = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
8533
+
8534
+ /**
8535
+ * SubscriptionCreated voucherCode.
8536
+ * @member {string} voucherCode
8537
+ * @memberof SubscriptionCreated
8538
+ * @instance
8539
+ */
8540
+ SubscriptionCreated.prototype.voucherCode = "";
8541
+
8542
+ /**
8543
+ * SubscriptionCreated platform.
8544
+ * @member {subscription.SubscriptionPlatform} platform
8545
+ * @memberof SubscriptionCreated
8546
+ * @instance
8547
+ */
8548
+ SubscriptionCreated.prototype.platform = 0;
8549
+
8425
8550
  /**
8426
8551
  * Creates a new SubscriptionCreated instance using the specified properties.
8427
8552
  * @function create
@@ -8452,6 +8577,16 @@ $root.SubscriptionCreated = (function() {
8452
8577
  writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.updatedOn);
8453
8578
  if (message.userId != null && message.hasOwnProperty("userId"))
8454
8579
  writer.uint32(/* id 3, wireType 2 =*/26).string(message.userId);
8580
+ if (message.createdAt != null && message.hasOwnProperty("createdAt"))
8581
+ writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.createdAt);
8582
+ if (message.startsAt != null && message.hasOwnProperty("startsAt"))
8583
+ writer.uint32(/* id 5, wireType 0 =*/40).uint64(message.startsAt);
8584
+ if (message.endsAt != null && message.hasOwnProperty("endsAt"))
8585
+ writer.uint32(/* id 6, wireType 0 =*/48).uint64(message.endsAt);
8586
+ if (message.voucherCode != null && message.hasOwnProperty("voucherCode"))
8587
+ writer.uint32(/* id 7, wireType 2 =*/58).string(message.voucherCode);
8588
+ if (message.platform != null && message.hasOwnProperty("platform"))
8589
+ writer.uint32(/* id 8, wireType 0 =*/64).int32(message.platform);
8455
8590
  return writer;
8456
8591
  };
8457
8592
 
@@ -8495,6 +8630,21 @@ $root.SubscriptionCreated = (function() {
8495
8630
  case 3:
8496
8631
  message.userId = reader.string();
8497
8632
  break;
8633
+ case 4:
8634
+ message.createdAt = reader.uint64();
8635
+ break;
8636
+ case 5:
8637
+ message.startsAt = reader.uint64();
8638
+ break;
8639
+ case 6:
8640
+ message.endsAt = reader.uint64();
8641
+ break;
8642
+ case 7:
8643
+ message.voucherCode = reader.string();
8644
+ break;
8645
+ case 8:
8646
+ message.platform = reader.int32();
8647
+ break;
8498
8648
  default:
8499
8649
  reader.skipType(tag & 7);
8500
8650
  break;
@@ -8539,6 +8689,30 @@ $root.SubscriptionCreated = (function() {
8539
8689
  if (message.userId != null && message.hasOwnProperty("userId"))
8540
8690
  if (!$util.isString(message.userId))
8541
8691
  return "userId: string expected";
8692
+ if (message.createdAt != null && message.hasOwnProperty("createdAt"))
8693
+ if (!$util.isInteger(message.createdAt) && !(message.createdAt && $util.isInteger(message.createdAt.low) && $util.isInteger(message.createdAt.high)))
8694
+ return "createdAt: integer|Long expected";
8695
+ if (message.startsAt != null && message.hasOwnProperty("startsAt"))
8696
+ if (!$util.isInteger(message.startsAt) && !(message.startsAt && $util.isInteger(message.startsAt.low) && $util.isInteger(message.startsAt.high)))
8697
+ return "startsAt: integer|Long expected";
8698
+ if (message.endsAt != null && message.hasOwnProperty("endsAt"))
8699
+ if (!$util.isInteger(message.endsAt) && !(message.endsAt && $util.isInteger(message.endsAt.low) && $util.isInteger(message.endsAt.high)))
8700
+ return "endsAt: integer|Long expected";
8701
+ if (message.voucherCode != null && message.hasOwnProperty("voucherCode"))
8702
+ if (!$util.isString(message.voucherCode))
8703
+ return "voucherCode: string expected";
8704
+ if (message.platform != null && message.hasOwnProperty("platform"))
8705
+ switch (message.platform) {
8706
+ default:
8707
+ return "platform: enum value expected";
8708
+ case 0:
8709
+ case 1:
8710
+ case 2:
8711
+ case 3:
8712
+ case 4:
8713
+ case 5:
8714
+ break;
8715
+ }
8542
8716
  return null;
8543
8717
  };
8544
8718
 
@@ -8567,6 +8741,61 @@ $root.SubscriptionCreated = (function() {
8567
8741
  message.updatedOn = new $util.LongBits(object.updatedOn.low >>> 0, object.updatedOn.high >>> 0).toNumber(true);
8568
8742
  if (object.userId != null)
8569
8743
  message.userId = String(object.userId);
8744
+ if (object.createdAt != null)
8745
+ if ($util.Long)
8746
+ (message.createdAt = $util.Long.fromValue(object.createdAt)).unsigned = true;
8747
+ else if (typeof object.createdAt === "string")
8748
+ message.createdAt = parseInt(object.createdAt, 10);
8749
+ else if (typeof object.createdAt === "number")
8750
+ message.createdAt = object.createdAt;
8751
+ else if (typeof object.createdAt === "object")
8752
+ message.createdAt = new $util.LongBits(object.createdAt.low >>> 0, object.createdAt.high >>> 0).toNumber(true);
8753
+ if (object.startsAt != null)
8754
+ if ($util.Long)
8755
+ (message.startsAt = $util.Long.fromValue(object.startsAt)).unsigned = true;
8756
+ else if (typeof object.startsAt === "string")
8757
+ message.startsAt = parseInt(object.startsAt, 10);
8758
+ else if (typeof object.startsAt === "number")
8759
+ message.startsAt = object.startsAt;
8760
+ else if (typeof object.startsAt === "object")
8761
+ message.startsAt = new $util.LongBits(object.startsAt.low >>> 0, object.startsAt.high >>> 0).toNumber(true);
8762
+ if (object.endsAt != null)
8763
+ if ($util.Long)
8764
+ (message.endsAt = $util.Long.fromValue(object.endsAt)).unsigned = true;
8765
+ else if (typeof object.endsAt === "string")
8766
+ message.endsAt = parseInt(object.endsAt, 10);
8767
+ else if (typeof object.endsAt === "number")
8768
+ message.endsAt = object.endsAt;
8769
+ else if (typeof object.endsAt === "object")
8770
+ message.endsAt = new $util.LongBits(object.endsAt.low >>> 0, object.endsAt.high >>> 0).toNumber(true);
8771
+ if (object.voucherCode != null)
8772
+ message.voucherCode = String(object.voucherCode);
8773
+ switch (object.platform) {
8774
+ case "PLATFORM_UNKNOWN":
8775
+ case 0:
8776
+ message.platform = 0;
8777
+ break;
8778
+ case "ITUNES":
8779
+ case 1:
8780
+ message.platform = 1;
8781
+ break;
8782
+ case "PLAY_STORE":
8783
+ case 2:
8784
+ message.platform = 2;
8785
+ break;
8786
+ case "ZUORA":
8787
+ case 3:
8788
+ message.platform = 3;
8789
+ break;
8790
+ case "HEADSPACE":
8791
+ case 4:
8792
+ message.platform = 4;
8793
+ break;
8794
+ case "SPOTIFY":
8795
+ case 5:
8796
+ message.platform = 5;
8797
+ break;
8798
+ }
8570
8799
  return message;
8571
8800
  };
8572
8801
 
@@ -8591,6 +8820,23 @@ $root.SubscriptionCreated = (function() {
8591
8820
  } else
8592
8821
  object.updatedOn = options.longs === String ? "0" : 0;
8593
8822
  object.userId = "";
8823
+ if ($util.Long) {
8824
+ var long = new $util.Long(0, 0, true);
8825
+ object.createdAt = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
8826
+ } else
8827
+ object.createdAt = options.longs === String ? "0" : 0;
8828
+ if ($util.Long) {
8829
+ var long = new $util.Long(0, 0, true);
8830
+ object.startsAt = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
8831
+ } else
8832
+ object.startsAt = options.longs === String ? "0" : 0;
8833
+ if ($util.Long) {
8834
+ var long = new $util.Long(0, 0, true);
8835
+ object.endsAt = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
8836
+ } else
8837
+ object.endsAt = options.longs === String ? "0" : 0;
8838
+ object.voucherCode = "";
8839
+ object.platform = options.enums === String ? "PLATFORM_UNKNOWN" : 0;
8594
8840
  }
8595
8841
  if (message.id != null && message.hasOwnProperty("id"))
8596
8842
  object.id = message.id;
@@ -8601,6 +8847,25 @@ $root.SubscriptionCreated = (function() {
8601
8847
  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;
8602
8848
  if (message.userId != null && message.hasOwnProperty("userId"))
8603
8849
  object.userId = message.userId;
8850
+ if (message.createdAt != null && message.hasOwnProperty("createdAt"))
8851
+ if (typeof message.createdAt === "number")
8852
+ object.createdAt = options.longs === String ? String(message.createdAt) : message.createdAt;
8853
+ else
8854
+ 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;
8855
+ if (message.startsAt != null && message.hasOwnProperty("startsAt"))
8856
+ if (typeof message.startsAt === "number")
8857
+ object.startsAt = options.longs === String ? String(message.startsAt) : message.startsAt;
8858
+ else
8859
+ 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;
8860
+ if (message.endsAt != null && message.hasOwnProperty("endsAt"))
8861
+ if (typeof message.endsAt === "number")
8862
+ object.endsAt = options.longs === String ? String(message.endsAt) : message.endsAt;
8863
+ else
8864
+ 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;
8865
+ if (message.voucherCode != null && message.hasOwnProperty("voucherCode"))
8866
+ object.voucherCode = message.voucherCode;
8867
+ if (message.platform != null && message.hasOwnProperty("platform"))
8868
+ object.platform = options.enums === String ? $root.subscription.SubscriptionPlatform[message.platform] : message.platform;
8604
8869
  return object;
8605
8870
  };
8606
8871
 
@@ -8628,6 +8893,11 @@ $root.SubscriptionCancelled = (function() {
8628
8893
  * @property {number|Long|null} [updatedOn] SubscriptionCancelled updatedOn
8629
8894
  * @property {string|null} [userId] SubscriptionCancelled userId
8630
8895
  * @property {subscription.IPaymentMethod|null} [paymentMethod] SubscriptionCancelled paymentMethod
8896
+ * @property {number|Long|null} [createdAt] SubscriptionCancelled createdAt
8897
+ * @property {number|Long|null} [startsAt] SubscriptionCancelled startsAt
8898
+ * @property {number|Long|null} [endsAt] SubscriptionCancelled endsAt
8899
+ * @property {string|null} [voucherCode] SubscriptionCancelled voucherCode
8900
+ * @property {subscription.SubscriptionPlatform|null} [platform] SubscriptionCancelled platform
8631
8901
  */
8632
8902
 
8633
8903
  /**
@@ -8677,6 +8947,46 @@ $root.SubscriptionCancelled = (function() {
8677
8947
  */
8678
8948
  SubscriptionCancelled.prototype.paymentMethod = null;
8679
8949
 
8950
+ /**
8951
+ * SubscriptionCancelled createdAt.
8952
+ * @member {number|Long} createdAt
8953
+ * @memberof SubscriptionCancelled
8954
+ * @instance
8955
+ */
8956
+ SubscriptionCancelled.prototype.createdAt = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
8957
+
8958
+ /**
8959
+ * SubscriptionCancelled startsAt.
8960
+ * @member {number|Long} startsAt
8961
+ * @memberof SubscriptionCancelled
8962
+ * @instance
8963
+ */
8964
+ SubscriptionCancelled.prototype.startsAt = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
8965
+
8966
+ /**
8967
+ * SubscriptionCancelled endsAt.
8968
+ * @member {number|Long} endsAt
8969
+ * @memberof SubscriptionCancelled
8970
+ * @instance
8971
+ */
8972
+ SubscriptionCancelled.prototype.endsAt = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
8973
+
8974
+ /**
8975
+ * SubscriptionCancelled voucherCode.
8976
+ * @member {string} voucherCode
8977
+ * @memberof SubscriptionCancelled
8978
+ * @instance
8979
+ */
8980
+ SubscriptionCancelled.prototype.voucherCode = "";
8981
+
8982
+ /**
8983
+ * SubscriptionCancelled platform.
8984
+ * @member {subscription.SubscriptionPlatform} platform
8985
+ * @memberof SubscriptionCancelled
8986
+ * @instance
8987
+ */
8988
+ SubscriptionCancelled.prototype.platform = 0;
8989
+
8680
8990
  /**
8681
8991
  * Creates a new SubscriptionCancelled instance using the specified properties.
8682
8992
  * @function create
@@ -8709,6 +9019,16 @@ $root.SubscriptionCancelled = (function() {
8709
9019
  writer.uint32(/* id 3, wireType 2 =*/26).string(message.userId);
8710
9020
  if (message.paymentMethod != null && message.hasOwnProperty("paymentMethod"))
8711
9021
  $root.subscription.PaymentMethod.encode(message.paymentMethod, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
9022
+ if (message.createdAt != null && message.hasOwnProperty("createdAt"))
9023
+ writer.uint32(/* id 5, wireType 0 =*/40).uint64(message.createdAt);
9024
+ if (message.startsAt != null && message.hasOwnProperty("startsAt"))
9025
+ writer.uint32(/* id 6, wireType 0 =*/48).uint64(message.startsAt);
9026
+ if (message.endsAt != null && message.hasOwnProperty("endsAt"))
9027
+ writer.uint32(/* id 7, wireType 0 =*/56).uint64(message.endsAt);
9028
+ if (message.voucherCode != null && message.hasOwnProperty("voucherCode"))
9029
+ writer.uint32(/* id 8, wireType 2 =*/66).string(message.voucherCode);
9030
+ if (message.platform != null && message.hasOwnProperty("platform"))
9031
+ writer.uint32(/* id 9, wireType 0 =*/72).int32(message.platform);
8712
9032
  return writer;
8713
9033
  };
8714
9034
 
@@ -8755,6 +9075,21 @@ $root.SubscriptionCancelled = (function() {
8755
9075
  case 4:
8756
9076
  message.paymentMethod = $root.subscription.PaymentMethod.decode(reader, reader.uint32());
8757
9077
  break;
9078
+ case 5:
9079
+ message.createdAt = reader.uint64();
9080
+ break;
9081
+ case 6:
9082
+ message.startsAt = reader.uint64();
9083
+ break;
9084
+ case 7:
9085
+ message.endsAt = reader.uint64();
9086
+ break;
9087
+ case 8:
9088
+ message.voucherCode = reader.string();
9089
+ break;
9090
+ case 9:
9091
+ message.platform = reader.int32();
9092
+ break;
8758
9093
  default:
8759
9094
  reader.skipType(tag & 7);
8760
9095
  break;
@@ -8804,6 +9139,30 @@ $root.SubscriptionCancelled = (function() {
8804
9139
  if (error)
8805
9140
  return "paymentMethod." + error;
8806
9141
  }
9142
+ if (message.createdAt != null && message.hasOwnProperty("createdAt"))
9143
+ if (!$util.isInteger(message.createdAt) && !(message.createdAt && $util.isInteger(message.createdAt.low) && $util.isInteger(message.createdAt.high)))
9144
+ return "createdAt: integer|Long expected";
9145
+ if (message.startsAt != null && message.hasOwnProperty("startsAt"))
9146
+ if (!$util.isInteger(message.startsAt) && !(message.startsAt && $util.isInteger(message.startsAt.low) && $util.isInteger(message.startsAt.high)))
9147
+ return "startsAt: integer|Long expected";
9148
+ if (message.endsAt != null && message.hasOwnProperty("endsAt"))
9149
+ if (!$util.isInteger(message.endsAt) && !(message.endsAt && $util.isInteger(message.endsAt.low) && $util.isInteger(message.endsAt.high)))
9150
+ return "endsAt: integer|Long expected";
9151
+ if (message.voucherCode != null && message.hasOwnProperty("voucherCode"))
9152
+ if (!$util.isString(message.voucherCode))
9153
+ return "voucherCode: string expected";
9154
+ if (message.platform != null && message.hasOwnProperty("platform"))
9155
+ switch (message.platform) {
9156
+ default:
9157
+ return "platform: enum value expected";
9158
+ case 0:
9159
+ case 1:
9160
+ case 2:
9161
+ case 3:
9162
+ case 4:
9163
+ case 5:
9164
+ break;
9165
+ }
8807
9166
  return null;
8808
9167
  };
8809
9168
 
@@ -8837,6 +9196,61 @@ $root.SubscriptionCancelled = (function() {
8837
9196
  throw TypeError(".SubscriptionCancelled.paymentMethod: object expected");
8838
9197
  message.paymentMethod = $root.subscription.PaymentMethod.fromObject(object.paymentMethod);
8839
9198
  }
9199
+ if (object.createdAt != null)
9200
+ if ($util.Long)
9201
+ (message.createdAt = $util.Long.fromValue(object.createdAt)).unsigned = true;
9202
+ else if (typeof object.createdAt === "string")
9203
+ message.createdAt = parseInt(object.createdAt, 10);
9204
+ else if (typeof object.createdAt === "number")
9205
+ message.createdAt = object.createdAt;
9206
+ else if (typeof object.createdAt === "object")
9207
+ message.createdAt = new $util.LongBits(object.createdAt.low >>> 0, object.createdAt.high >>> 0).toNumber(true);
9208
+ if (object.startsAt != null)
9209
+ if ($util.Long)
9210
+ (message.startsAt = $util.Long.fromValue(object.startsAt)).unsigned = true;
9211
+ else if (typeof object.startsAt === "string")
9212
+ message.startsAt = parseInt(object.startsAt, 10);
9213
+ else if (typeof object.startsAt === "number")
9214
+ message.startsAt = object.startsAt;
9215
+ else if (typeof object.startsAt === "object")
9216
+ message.startsAt = new $util.LongBits(object.startsAt.low >>> 0, object.startsAt.high >>> 0).toNumber(true);
9217
+ if (object.endsAt != null)
9218
+ if ($util.Long)
9219
+ (message.endsAt = $util.Long.fromValue(object.endsAt)).unsigned = true;
9220
+ else if (typeof object.endsAt === "string")
9221
+ message.endsAt = parseInt(object.endsAt, 10);
9222
+ else if (typeof object.endsAt === "number")
9223
+ message.endsAt = object.endsAt;
9224
+ else if (typeof object.endsAt === "object")
9225
+ message.endsAt = new $util.LongBits(object.endsAt.low >>> 0, object.endsAt.high >>> 0).toNumber(true);
9226
+ if (object.voucherCode != null)
9227
+ message.voucherCode = String(object.voucherCode);
9228
+ switch (object.platform) {
9229
+ case "PLATFORM_UNKNOWN":
9230
+ case 0:
9231
+ message.platform = 0;
9232
+ break;
9233
+ case "ITUNES":
9234
+ case 1:
9235
+ message.platform = 1;
9236
+ break;
9237
+ case "PLAY_STORE":
9238
+ case 2:
9239
+ message.platform = 2;
9240
+ break;
9241
+ case "ZUORA":
9242
+ case 3:
9243
+ message.platform = 3;
9244
+ break;
9245
+ case "HEADSPACE":
9246
+ case 4:
9247
+ message.platform = 4;
9248
+ break;
9249
+ case "SPOTIFY":
9250
+ case 5:
9251
+ message.platform = 5;
9252
+ break;
9253
+ }
8840
9254
  return message;
8841
9255
  };
8842
9256
 
@@ -8862,6 +9276,23 @@ $root.SubscriptionCancelled = (function() {
8862
9276
  object.updatedOn = options.longs === String ? "0" : 0;
8863
9277
  object.userId = "";
8864
9278
  object.paymentMethod = null;
9279
+ if ($util.Long) {
9280
+ var long = new $util.Long(0, 0, true);
9281
+ object.createdAt = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
9282
+ } else
9283
+ object.createdAt = options.longs === String ? "0" : 0;
9284
+ if ($util.Long) {
9285
+ var long = new $util.Long(0, 0, true);
9286
+ object.startsAt = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
9287
+ } else
9288
+ object.startsAt = options.longs === String ? "0" : 0;
9289
+ if ($util.Long) {
9290
+ var long = new $util.Long(0, 0, true);
9291
+ object.endsAt = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
9292
+ } else
9293
+ object.endsAt = options.longs === String ? "0" : 0;
9294
+ object.voucherCode = "";
9295
+ object.platform = options.enums === String ? "PLATFORM_UNKNOWN" : 0;
8865
9296
  }
8866
9297
  if (message.id != null && message.hasOwnProperty("id"))
8867
9298
  object.id = message.id;
@@ -8874,6 +9305,25 @@ $root.SubscriptionCancelled = (function() {
8874
9305
  object.userId = message.userId;
8875
9306
  if (message.paymentMethod != null && message.hasOwnProperty("paymentMethod"))
8876
9307
  object.paymentMethod = $root.subscription.PaymentMethod.toObject(message.paymentMethod, options);
9308
+ if (message.createdAt != null && message.hasOwnProperty("createdAt"))
9309
+ if (typeof message.createdAt === "number")
9310
+ object.createdAt = options.longs === String ? String(message.createdAt) : message.createdAt;
9311
+ else
9312
+ 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;
9313
+ if (message.startsAt != null && message.hasOwnProperty("startsAt"))
9314
+ if (typeof message.startsAt === "number")
9315
+ object.startsAt = options.longs === String ? String(message.startsAt) : message.startsAt;
9316
+ else
9317
+ 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;
9318
+ if (message.endsAt != null && message.hasOwnProperty("endsAt"))
9319
+ if (typeof message.endsAt === "number")
9320
+ object.endsAt = options.longs === String ? String(message.endsAt) : message.endsAt;
9321
+ else
9322
+ 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;
9323
+ if (message.voucherCode != null && message.hasOwnProperty("voucherCode"))
9324
+ object.voucherCode = message.voucherCode;
9325
+ if (message.platform != null && message.hasOwnProperty("platform"))
9326
+ object.platform = options.enums === String ? $root.subscription.SubscriptionPlatform[message.platform] : message.platform;
8877
9327
  return object;
8878
9328
  };
8879
9329
 
@@ -8900,6 +9350,11 @@ $root.SubscriptionRenewed = (function() {
8900
9350
  * @property {number|null} [id] SubscriptionRenewed id
8901
9351
  * @property {number|Long|null} [updatedOn] SubscriptionRenewed updatedOn
8902
9352
  * @property {string|null} [userId] SubscriptionRenewed userId
9353
+ * @property {number|Long|null} [createdAt] SubscriptionRenewed createdAt
9354
+ * @property {number|Long|null} [startsAt] SubscriptionRenewed startsAt
9355
+ * @property {number|Long|null} [endsAt] SubscriptionRenewed endsAt
9356
+ * @property {string|null} [voucherCode] SubscriptionRenewed voucherCode
9357
+ * @property {subscription.SubscriptionPlatform|null} [platform] SubscriptionRenewed platform
8903
9358
  */
8904
9359
 
8905
9360
  /**
@@ -8941,6 +9396,46 @@ $root.SubscriptionRenewed = (function() {
8941
9396
  */
8942
9397
  SubscriptionRenewed.prototype.userId = "";
8943
9398
 
9399
+ /**
9400
+ * SubscriptionRenewed createdAt.
9401
+ * @member {number|Long} createdAt
9402
+ * @memberof SubscriptionRenewed
9403
+ * @instance
9404
+ */
9405
+ SubscriptionRenewed.prototype.createdAt = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
9406
+
9407
+ /**
9408
+ * SubscriptionRenewed startsAt.
9409
+ * @member {number|Long} startsAt
9410
+ * @memberof SubscriptionRenewed
9411
+ * @instance
9412
+ */
9413
+ SubscriptionRenewed.prototype.startsAt = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
9414
+
9415
+ /**
9416
+ * SubscriptionRenewed endsAt.
9417
+ * @member {number|Long} endsAt
9418
+ * @memberof SubscriptionRenewed
9419
+ * @instance
9420
+ */
9421
+ SubscriptionRenewed.prototype.endsAt = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
9422
+
9423
+ /**
9424
+ * SubscriptionRenewed voucherCode.
9425
+ * @member {string} voucherCode
9426
+ * @memberof SubscriptionRenewed
9427
+ * @instance
9428
+ */
9429
+ SubscriptionRenewed.prototype.voucherCode = "";
9430
+
9431
+ /**
9432
+ * SubscriptionRenewed platform.
9433
+ * @member {subscription.SubscriptionPlatform} platform
9434
+ * @memberof SubscriptionRenewed
9435
+ * @instance
9436
+ */
9437
+ SubscriptionRenewed.prototype.platform = 0;
9438
+
8944
9439
  /**
8945
9440
  * Creates a new SubscriptionRenewed instance using the specified properties.
8946
9441
  * @function create
@@ -8971,6 +9466,16 @@ $root.SubscriptionRenewed = (function() {
8971
9466
  writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.updatedOn);
8972
9467
  if (message.userId != null && message.hasOwnProperty("userId"))
8973
9468
  writer.uint32(/* id 3, wireType 2 =*/26).string(message.userId);
9469
+ if (message.createdAt != null && message.hasOwnProperty("createdAt"))
9470
+ writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.createdAt);
9471
+ if (message.startsAt != null && message.hasOwnProperty("startsAt"))
9472
+ writer.uint32(/* id 5, wireType 0 =*/40).uint64(message.startsAt);
9473
+ if (message.endsAt != null && message.hasOwnProperty("endsAt"))
9474
+ writer.uint32(/* id 6, wireType 0 =*/48).uint64(message.endsAt);
9475
+ if (message.voucherCode != null && message.hasOwnProperty("voucherCode"))
9476
+ writer.uint32(/* id 7, wireType 2 =*/58).string(message.voucherCode);
9477
+ if (message.platform != null && message.hasOwnProperty("platform"))
9478
+ writer.uint32(/* id 8, wireType 0 =*/64).int32(message.platform);
8974
9479
  return writer;
8975
9480
  };
8976
9481
 
@@ -9014,6 +9519,21 @@ $root.SubscriptionRenewed = (function() {
9014
9519
  case 3:
9015
9520
  message.userId = reader.string();
9016
9521
  break;
9522
+ case 4:
9523
+ message.createdAt = reader.uint64();
9524
+ break;
9525
+ case 5:
9526
+ message.startsAt = reader.uint64();
9527
+ break;
9528
+ case 6:
9529
+ message.endsAt = reader.uint64();
9530
+ break;
9531
+ case 7:
9532
+ message.voucherCode = reader.string();
9533
+ break;
9534
+ case 8:
9535
+ message.platform = reader.int32();
9536
+ break;
9017
9537
  default:
9018
9538
  reader.skipType(tag & 7);
9019
9539
  break;
@@ -9058,6 +9578,30 @@ $root.SubscriptionRenewed = (function() {
9058
9578
  if (message.userId != null && message.hasOwnProperty("userId"))
9059
9579
  if (!$util.isString(message.userId))
9060
9580
  return "userId: string expected";
9581
+ if (message.createdAt != null && message.hasOwnProperty("createdAt"))
9582
+ if (!$util.isInteger(message.createdAt) && !(message.createdAt && $util.isInteger(message.createdAt.low) && $util.isInteger(message.createdAt.high)))
9583
+ return "createdAt: integer|Long expected";
9584
+ if (message.startsAt != null && message.hasOwnProperty("startsAt"))
9585
+ if (!$util.isInteger(message.startsAt) && !(message.startsAt && $util.isInteger(message.startsAt.low) && $util.isInteger(message.startsAt.high)))
9586
+ return "startsAt: integer|Long expected";
9587
+ if (message.endsAt != null && message.hasOwnProperty("endsAt"))
9588
+ if (!$util.isInteger(message.endsAt) && !(message.endsAt && $util.isInteger(message.endsAt.low) && $util.isInteger(message.endsAt.high)))
9589
+ return "endsAt: integer|Long expected";
9590
+ if (message.voucherCode != null && message.hasOwnProperty("voucherCode"))
9591
+ if (!$util.isString(message.voucherCode))
9592
+ return "voucherCode: string expected";
9593
+ if (message.platform != null && message.hasOwnProperty("platform"))
9594
+ switch (message.platform) {
9595
+ default:
9596
+ return "platform: enum value expected";
9597
+ case 0:
9598
+ case 1:
9599
+ case 2:
9600
+ case 3:
9601
+ case 4:
9602
+ case 5:
9603
+ break;
9604
+ }
9061
9605
  return null;
9062
9606
  };
9063
9607
 
@@ -9086,6 +9630,61 @@ $root.SubscriptionRenewed = (function() {
9086
9630
  message.updatedOn = new $util.LongBits(object.updatedOn.low >>> 0, object.updatedOn.high >>> 0).toNumber(true);
9087
9631
  if (object.userId != null)
9088
9632
  message.userId = String(object.userId);
9633
+ if (object.createdAt != null)
9634
+ if ($util.Long)
9635
+ (message.createdAt = $util.Long.fromValue(object.createdAt)).unsigned = true;
9636
+ else if (typeof object.createdAt === "string")
9637
+ message.createdAt = parseInt(object.createdAt, 10);
9638
+ else if (typeof object.createdAt === "number")
9639
+ message.createdAt = object.createdAt;
9640
+ else if (typeof object.createdAt === "object")
9641
+ message.createdAt = new $util.LongBits(object.createdAt.low >>> 0, object.createdAt.high >>> 0).toNumber(true);
9642
+ if (object.startsAt != null)
9643
+ if ($util.Long)
9644
+ (message.startsAt = $util.Long.fromValue(object.startsAt)).unsigned = true;
9645
+ else if (typeof object.startsAt === "string")
9646
+ message.startsAt = parseInt(object.startsAt, 10);
9647
+ else if (typeof object.startsAt === "number")
9648
+ message.startsAt = object.startsAt;
9649
+ else if (typeof object.startsAt === "object")
9650
+ message.startsAt = new $util.LongBits(object.startsAt.low >>> 0, object.startsAt.high >>> 0).toNumber(true);
9651
+ if (object.endsAt != null)
9652
+ if ($util.Long)
9653
+ (message.endsAt = $util.Long.fromValue(object.endsAt)).unsigned = true;
9654
+ else if (typeof object.endsAt === "string")
9655
+ message.endsAt = parseInt(object.endsAt, 10);
9656
+ else if (typeof object.endsAt === "number")
9657
+ message.endsAt = object.endsAt;
9658
+ else if (typeof object.endsAt === "object")
9659
+ message.endsAt = new $util.LongBits(object.endsAt.low >>> 0, object.endsAt.high >>> 0).toNumber(true);
9660
+ if (object.voucherCode != null)
9661
+ message.voucherCode = String(object.voucherCode);
9662
+ switch (object.platform) {
9663
+ case "PLATFORM_UNKNOWN":
9664
+ case 0:
9665
+ message.platform = 0;
9666
+ break;
9667
+ case "ITUNES":
9668
+ case 1:
9669
+ message.platform = 1;
9670
+ break;
9671
+ case "PLAY_STORE":
9672
+ case 2:
9673
+ message.platform = 2;
9674
+ break;
9675
+ case "ZUORA":
9676
+ case 3:
9677
+ message.platform = 3;
9678
+ break;
9679
+ case "HEADSPACE":
9680
+ case 4:
9681
+ message.platform = 4;
9682
+ break;
9683
+ case "SPOTIFY":
9684
+ case 5:
9685
+ message.platform = 5;
9686
+ break;
9687
+ }
9089
9688
  return message;
9090
9689
  };
9091
9690
 
@@ -9110,6 +9709,23 @@ $root.SubscriptionRenewed = (function() {
9110
9709
  } else
9111
9710
  object.updatedOn = options.longs === String ? "0" : 0;
9112
9711
  object.userId = "";
9712
+ if ($util.Long) {
9713
+ var long = new $util.Long(0, 0, true);
9714
+ object.createdAt = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
9715
+ } else
9716
+ object.createdAt = options.longs === String ? "0" : 0;
9717
+ if ($util.Long) {
9718
+ var long = new $util.Long(0, 0, true);
9719
+ object.startsAt = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
9720
+ } else
9721
+ object.startsAt = options.longs === String ? "0" : 0;
9722
+ if ($util.Long) {
9723
+ var long = new $util.Long(0, 0, true);
9724
+ object.endsAt = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
9725
+ } else
9726
+ object.endsAt = options.longs === String ? "0" : 0;
9727
+ object.voucherCode = "";
9728
+ object.platform = options.enums === String ? "PLATFORM_UNKNOWN" : 0;
9113
9729
  }
9114
9730
  if (message.id != null && message.hasOwnProperty("id"))
9115
9731
  object.id = message.id;
@@ -9120,6 +9736,25 @@ $root.SubscriptionRenewed = (function() {
9120
9736
  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;
9121
9737
  if (message.userId != null && message.hasOwnProperty("userId"))
9122
9738
  object.userId = message.userId;
9739
+ if (message.createdAt != null && message.hasOwnProperty("createdAt"))
9740
+ if (typeof message.createdAt === "number")
9741
+ object.createdAt = options.longs === String ? String(message.createdAt) : message.createdAt;
9742
+ else
9743
+ 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;
9744
+ if (message.startsAt != null && message.hasOwnProperty("startsAt"))
9745
+ if (typeof message.startsAt === "number")
9746
+ object.startsAt = options.longs === String ? String(message.startsAt) : message.startsAt;
9747
+ else
9748
+ 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;
9749
+ if (message.endsAt != null && message.hasOwnProperty("endsAt"))
9750
+ if (typeof message.endsAt === "number")
9751
+ object.endsAt = options.longs === String ? String(message.endsAt) : message.endsAt;
9752
+ else
9753
+ 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;
9754
+ if (message.voucherCode != null && message.hasOwnProperty("voucherCode"))
9755
+ object.voucherCode = message.voucherCode;
9756
+ if (message.platform != null && message.hasOwnProperty("platform"))
9757
+ object.platform = options.enums === String ? $root.subscription.SubscriptionPlatform[message.platform] : message.platform;
9123
9758
  return object;
9124
9759
  };
9125
9760
 
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.40.0"
19
+ "version": "1.42.0"
20
20
  }