@headspace/protos-events 1.28.0 → 1.30.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
@@ -905,8 +905,9 @@ export namespace subscription {
905
905
 
906
906
  /** PaymentMethodStatus enum. */
907
907
  enum PaymentMethodStatus {
908
- ACTIVE = 0,
909
- CLOSED = 1
908
+ UNKNOWN = 0,
909
+ CLOSED = 1,
910
+ ACTIVE = 2
910
911
  }
911
912
 
912
913
  /** Properties of a PaymentMethod. */
@@ -2644,6 +2645,12 @@ export interface ISubscriptionUpcomingRenewal {
2644
2645
 
2645
2646
  /** SubscriptionUpcomingRenewal paymentMethod */
2646
2647
  paymentMethod?: (subscription.IPaymentMethod|null);
2648
+
2649
+ /** SubscriptionUpcomingRenewal renewalAmount */
2650
+ renewalAmount?: (number|null);
2651
+
2652
+ /** SubscriptionUpcomingRenewal currency */
2653
+ currency?: (string|null);
2647
2654
  }
2648
2655
 
2649
2656
  /** Represents a SubscriptionUpcomingRenewal. */
@@ -2676,6 +2683,12 @@ export class SubscriptionUpcomingRenewal implements ISubscriptionUpcomingRenewal
2676
2683
  /** SubscriptionUpcomingRenewal paymentMethod. */
2677
2684
  public paymentMethod?: (subscription.IPaymentMethod|null);
2678
2685
 
2686
+ /** SubscriptionUpcomingRenewal renewalAmount. */
2687
+ public renewalAmount: number;
2688
+
2689
+ /** SubscriptionUpcomingRenewal currency. */
2690
+ public currency: string;
2691
+
2679
2692
  /**
2680
2693
  * Creates a new SubscriptionUpcomingRenewal instance using the specified properties.
2681
2694
  * @param [properties] Properties to set
@@ -2758,6 +2771,15 @@ export interface ISubscriptionPaymentProcessed {
2758
2771
 
2759
2772
  /** SubscriptionPaymentProcessed timestamp */
2760
2773
  timestamp?: (number|Long|null);
2774
+
2775
+ /** SubscriptionPaymentProcessed paymentAmount */
2776
+ paymentAmount?: (number|null);
2777
+
2778
+ /** SubscriptionPaymentProcessed renewalAmount */
2779
+ renewalAmount?: (number|null);
2780
+
2781
+ /** SubscriptionPaymentProcessed currency */
2782
+ currency?: (string|null);
2761
2783
  }
2762
2784
 
2763
2785
  /** Represents a SubscriptionPaymentProcessed. */
@@ -2778,6 +2800,15 @@ export class SubscriptionPaymentProcessed implements ISubscriptionPaymentProcess
2778
2800
  /** SubscriptionPaymentProcessed timestamp. */
2779
2801
  public timestamp: (number|Long);
2780
2802
 
2803
+ /** SubscriptionPaymentProcessed paymentAmount. */
2804
+ public paymentAmount: number;
2805
+
2806
+ /** SubscriptionPaymentProcessed renewalAmount. */
2807
+ public renewalAmount: number;
2808
+
2809
+ /** SubscriptionPaymentProcessed currency. */
2810
+ public currency: string;
2811
+
2781
2812
  /**
2782
2813
  * Creates a new SubscriptionPaymentProcessed instance using the specified properties.
2783
2814
  * @param [properties] Properties to set
package/lib/index.js CHANGED
@@ -1999,13 +1999,15 @@ $root.subscription = (function() {
1999
1999
  * PaymentMethodStatus enum.
2000
2000
  * @name subscription.PaymentMethodStatus
2001
2001
  * @enum {string}
2002
- * @property {number} ACTIVE=0 ACTIVE value
2002
+ * @property {number} UNKNOWN=0 UNKNOWN value
2003
2003
  * @property {number} CLOSED=1 CLOSED value
2004
+ * @property {number} ACTIVE=2 ACTIVE value
2004
2005
  */
2005
2006
  subscription.PaymentMethodStatus = (function() {
2006
2007
  var valuesById = {}, values = Object.create(valuesById);
2007
- values[valuesById[0] = "ACTIVE"] = 0;
2008
+ values[valuesById[0] = "UNKNOWN"] = 0;
2008
2009
  values[valuesById[1] = "CLOSED"] = 1;
2010
+ values[valuesById[2] = "ACTIVE"] = 2;
2009
2011
  return values;
2010
2012
  })();
2011
2013
 
@@ -2145,6 +2147,7 @@ $root.subscription = (function() {
2145
2147
  return "paymentMethodStatus: enum value expected";
2146
2148
  case 0:
2147
2149
  case 1:
2150
+ case 2:
2148
2151
  break;
2149
2152
  }
2150
2153
  return null;
@@ -2163,7 +2166,7 @@ $root.subscription = (function() {
2163
2166
  return object;
2164
2167
  var message = new $root.subscription.PaymentMethod();
2165
2168
  switch (object.paymentMethodStatus) {
2166
- case "ACTIVE":
2169
+ case "UNKNOWN":
2167
2170
  case 0:
2168
2171
  message.paymentMethodStatus = 0;
2169
2172
  break;
@@ -2171,6 +2174,10 @@ $root.subscription = (function() {
2171
2174
  case 1:
2172
2175
  message.paymentMethodStatus = 1;
2173
2176
  break;
2177
+ case "ACTIVE":
2178
+ case 2:
2179
+ message.paymentMethodStatus = 2;
2180
+ break;
2174
2181
  }
2175
2182
  return message;
2176
2183
  };
@@ -2189,7 +2196,7 @@ $root.subscription = (function() {
2189
2196
  options = {};
2190
2197
  var object = {};
2191
2198
  if (options.defaults)
2192
- object.paymentMethodStatus = options.enums === String ? "ACTIVE" : 0;
2199
+ object.paymentMethodStatus = options.enums === String ? "UNKNOWN" : 0;
2193
2200
  if (message.paymentMethodStatus != null && message.hasOwnProperty("paymentMethodStatus"))
2194
2201
  object.paymentMethodStatus = options.enums === String ? $root.subscription.PaymentMethodStatus[message.paymentMethodStatus] : message.paymentMethodStatus;
2195
2202
  return object;
@@ -6230,6 +6237,8 @@ $root.SubscriptionUpcomingRenewal = (function() {
6230
6237
  * @property {subscription.PlanAffiliation|null} [planAffiliation] SubscriptionUpcomingRenewal planAffiliation
6231
6238
  * @property {number|Long|null} [renewalDate] SubscriptionUpcomingRenewal renewalDate
6232
6239
  * @property {subscription.IPaymentMethod|null} [paymentMethod] SubscriptionUpcomingRenewal paymentMethod
6240
+ * @property {number|null} [renewalAmount] SubscriptionUpcomingRenewal renewalAmount
6241
+ * @property {string|null} [currency] SubscriptionUpcomingRenewal currency
6233
6242
  */
6234
6243
 
6235
6244
  /**
@@ -6303,6 +6312,22 @@ $root.SubscriptionUpcomingRenewal = (function() {
6303
6312
  */
6304
6313
  SubscriptionUpcomingRenewal.prototype.paymentMethod = null;
6305
6314
 
6315
+ /**
6316
+ * SubscriptionUpcomingRenewal renewalAmount.
6317
+ * @member {number} renewalAmount
6318
+ * @memberof SubscriptionUpcomingRenewal
6319
+ * @instance
6320
+ */
6321
+ SubscriptionUpcomingRenewal.prototype.renewalAmount = 0;
6322
+
6323
+ /**
6324
+ * SubscriptionUpcomingRenewal currency.
6325
+ * @member {string} currency
6326
+ * @memberof SubscriptionUpcomingRenewal
6327
+ * @instance
6328
+ */
6329
+ SubscriptionUpcomingRenewal.prototype.currency = "";
6330
+
6306
6331
  /**
6307
6332
  * Creates a new SubscriptionUpcomingRenewal instance using the specified properties.
6308
6333
  * @function create
@@ -6341,6 +6366,10 @@ $root.SubscriptionUpcomingRenewal = (function() {
6341
6366
  writer.uint32(/* id 6, wireType 0 =*/48).uint64(message.renewalDate);
6342
6367
  if (message.paymentMethod != null && message.hasOwnProperty("paymentMethod"))
6343
6368
  $root.subscription.PaymentMethod.encode(message.paymentMethod, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim();
6369
+ if (message.renewalAmount != null && message.hasOwnProperty("renewalAmount"))
6370
+ writer.uint32(/* id 8, wireType 1 =*/65).double(message.renewalAmount);
6371
+ if (message.currency != null && message.hasOwnProperty("currency"))
6372
+ writer.uint32(/* id 9, wireType 2 =*/74).string(message.currency);
6344
6373
  return writer;
6345
6374
  };
6346
6375
 
@@ -6396,6 +6425,12 @@ $root.SubscriptionUpcomingRenewal = (function() {
6396
6425
  case 7:
6397
6426
  message.paymentMethod = $root.subscription.PaymentMethod.decode(reader, reader.uint32());
6398
6427
  break;
6428
+ case 8:
6429
+ message.renewalAmount = reader.double();
6430
+ break;
6431
+ case 9:
6432
+ message.currency = reader.string();
6433
+ break;
6399
6434
  default:
6400
6435
  reader.skipType(tag & 7);
6401
6436
  break;
@@ -6465,6 +6500,12 @@ $root.SubscriptionUpcomingRenewal = (function() {
6465
6500
  if (error)
6466
6501
  return "paymentMethod." + error;
6467
6502
  }
6503
+ if (message.renewalAmount != null && message.hasOwnProperty("renewalAmount"))
6504
+ if (typeof message.renewalAmount !== "number")
6505
+ return "renewalAmount: number expected";
6506
+ if (message.currency != null && message.hasOwnProperty("currency"))
6507
+ if (!$util.isString(message.currency))
6508
+ return "currency: string expected";
6468
6509
  return null;
6469
6510
  };
6470
6511
 
@@ -6524,6 +6565,10 @@ $root.SubscriptionUpcomingRenewal = (function() {
6524
6565
  throw TypeError(".SubscriptionUpcomingRenewal.paymentMethod: object expected");
6525
6566
  message.paymentMethod = $root.subscription.PaymentMethod.fromObject(object.paymentMethod);
6526
6567
  }
6568
+ if (object.renewalAmount != null)
6569
+ message.renewalAmount = Number(object.renewalAmount);
6570
+ if (object.currency != null)
6571
+ message.currency = String(object.currency);
6527
6572
  return message;
6528
6573
  };
6529
6574
 
@@ -6552,6 +6597,8 @@ $root.SubscriptionUpcomingRenewal = (function() {
6552
6597
  } else
6553
6598
  object.renewalDate = options.longs === String ? "0" : 0;
6554
6599
  object.paymentMethod = null;
6600
+ object.renewalAmount = 0;
6601
+ object.currency = "";
6555
6602
  }
6556
6603
  if (message.id != null && message.hasOwnProperty("id"))
6557
6604
  object.id = message.id;
@@ -6570,6 +6617,10 @@ $root.SubscriptionUpcomingRenewal = (function() {
6570
6617
  object.renewalDate = options.longs === String ? $util.Long.prototype.toString.call(message.renewalDate) : options.longs === Number ? new $util.LongBits(message.renewalDate.low >>> 0, message.renewalDate.high >>> 0).toNumber(true) : message.renewalDate;
6571
6618
  if (message.paymentMethod != null && message.hasOwnProperty("paymentMethod"))
6572
6619
  object.paymentMethod = $root.subscription.PaymentMethod.toObject(message.paymentMethod, options);
6620
+ if (message.renewalAmount != null && message.hasOwnProperty("renewalAmount"))
6621
+ object.renewalAmount = options.json && !isFinite(message.renewalAmount) ? String(message.renewalAmount) : message.renewalAmount;
6622
+ if (message.currency != null && message.hasOwnProperty("currency"))
6623
+ object.currency = message.currency;
6573
6624
  return object;
6574
6625
  };
6575
6626
 
@@ -6596,6 +6647,9 @@ $root.SubscriptionPaymentProcessed = (function() {
6596
6647
  * @property {string|null} [userId] SubscriptionPaymentProcessed userId
6597
6648
  * @property {number|Long|null} [paymentDate] SubscriptionPaymentProcessed paymentDate
6598
6649
  * @property {number|Long|null} [timestamp] SubscriptionPaymentProcessed timestamp
6650
+ * @property {number|null} [paymentAmount] SubscriptionPaymentProcessed paymentAmount
6651
+ * @property {number|null} [renewalAmount] SubscriptionPaymentProcessed renewalAmount
6652
+ * @property {string|null} [currency] SubscriptionPaymentProcessed currency
6599
6653
  */
6600
6654
 
6601
6655
  /**
@@ -6637,6 +6691,30 @@ $root.SubscriptionPaymentProcessed = (function() {
6637
6691
  */
6638
6692
  SubscriptionPaymentProcessed.prototype.timestamp = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
6639
6693
 
6694
+ /**
6695
+ * SubscriptionPaymentProcessed paymentAmount.
6696
+ * @member {number} paymentAmount
6697
+ * @memberof SubscriptionPaymentProcessed
6698
+ * @instance
6699
+ */
6700
+ SubscriptionPaymentProcessed.prototype.paymentAmount = 0;
6701
+
6702
+ /**
6703
+ * SubscriptionPaymentProcessed renewalAmount.
6704
+ * @member {number} renewalAmount
6705
+ * @memberof SubscriptionPaymentProcessed
6706
+ * @instance
6707
+ */
6708
+ SubscriptionPaymentProcessed.prototype.renewalAmount = 0;
6709
+
6710
+ /**
6711
+ * SubscriptionPaymentProcessed currency.
6712
+ * @member {string} currency
6713
+ * @memberof SubscriptionPaymentProcessed
6714
+ * @instance
6715
+ */
6716
+ SubscriptionPaymentProcessed.prototype.currency = "";
6717
+
6640
6718
  /**
6641
6719
  * Creates a new SubscriptionPaymentProcessed instance using the specified properties.
6642
6720
  * @function create
@@ -6667,6 +6745,12 @@ $root.SubscriptionPaymentProcessed = (function() {
6667
6745
  writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.paymentDate);
6668
6746
  if (message.timestamp != null && message.hasOwnProperty("timestamp"))
6669
6747
  writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.timestamp);
6748
+ if (message.paymentAmount != null && message.hasOwnProperty("paymentAmount"))
6749
+ writer.uint32(/* id 4, wireType 1 =*/33).double(message.paymentAmount);
6750
+ if (message.renewalAmount != null && message.hasOwnProperty("renewalAmount"))
6751
+ writer.uint32(/* id 5, wireType 1 =*/41).double(message.renewalAmount);
6752
+ if (message.currency != null && message.hasOwnProperty("currency"))
6753
+ writer.uint32(/* id 6, wireType 2 =*/50).string(message.currency);
6670
6754
  return writer;
6671
6755
  };
6672
6756
 
@@ -6710,6 +6794,15 @@ $root.SubscriptionPaymentProcessed = (function() {
6710
6794
  case 3:
6711
6795
  message.timestamp = reader.uint64();
6712
6796
  break;
6797
+ case 4:
6798
+ message.paymentAmount = reader.double();
6799
+ break;
6800
+ case 5:
6801
+ message.renewalAmount = reader.double();
6802
+ break;
6803
+ case 6:
6804
+ message.currency = reader.string();
6805
+ break;
6713
6806
  default:
6714
6807
  reader.skipType(tag & 7);
6715
6808
  break;
@@ -6754,6 +6847,15 @@ $root.SubscriptionPaymentProcessed = (function() {
6754
6847
  if (message.timestamp != null && message.hasOwnProperty("timestamp"))
6755
6848
  if (!$util.isInteger(message.timestamp) && !(message.timestamp && $util.isInteger(message.timestamp.low) && $util.isInteger(message.timestamp.high)))
6756
6849
  return "timestamp: integer|Long expected";
6850
+ if (message.paymentAmount != null && message.hasOwnProperty("paymentAmount"))
6851
+ if (typeof message.paymentAmount !== "number")
6852
+ return "paymentAmount: number expected";
6853
+ if (message.renewalAmount != null && message.hasOwnProperty("renewalAmount"))
6854
+ if (typeof message.renewalAmount !== "number")
6855
+ return "renewalAmount: number expected";
6856
+ if (message.currency != null && message.hasOwnProperty("currency"))
6857
+ if (!$util.isString(message.currency))
6858
+ return "currency: string expected";
6757
6859
  return null;
6758
6860
  };
6759
6861
 
@@ -6789,6 +6891,12 @@ $root.SubscriptionPaymentProcessed = (function() {
6789
6891
  message.timestamp = object.timestamp;
6790
6892
  else if (typeof object.timestamp === "object")
6791
6893
  message.timestamp = new $util.LongBits(object.timestamp.low >>> 0, object.timestamp.high >>> 0).toNumber(true);
6894
+ if (object.paymentAmount != null)
6895
+ message.paymentAmount = Number(object.paymentAmount);
6896
+ if (object.renewalAmount != null)
6897
+ message.renewalAmount = Number(object.renewalAmount);
6898
+ if (object.currency != null)
6899
+ message.currency = String(object.currency);
6792
6900
  return message;
6793
6901
  };
6794
6902
 
@@ -6817,6 +6925,9 @@ $root.SubscriptionPaymentProcessed = (function() {
6817
6925
  object.timestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
6818
6926
  } else
6819
6927
  object.timestamp = options.longs === String ? "0" : 0;
6928
+ object.paymentAmount = 0;
6929
+ object.renewalAmount = 0;
6930
+ object.currency = "";
6820
6931
  }
6821
6932
  if (message.userId != null && message.hasOwnProperty("userId"))
6822
6933
  object.userId = message.userId;
@@ -6830,6 +6941,12 @@ $root.SubscriptionPaymentProcessed = (function() {
6830
6941
  object.timestamp = options.longs === String ? String(message.timestamp) : message.timestamp;
6831
6942
  else
6832
6943
  object.timestamp = options.longs === String ? $util.Long.prototype.toString.call(message.timestamp) : options.longs === Number ? new $util.LongBits(message.timestamp.low >>> 0, message.timestamp.high >>> 0).toNumber(true) : message.timestamp;
6944
+ if (message.paymentAmount != null && message.hasOwnProperty("paymentAmount"))
6945
+ object.paymentAmount = options.json && !isFinite(message.paymentAmount) ? String(message.paymentAmount) : message.paymentAmount;
6946
+ if (message.renewalAmount != null && message.hasOwnProperty("renewalAmount"))
6947
+ object.renewalAmount = options.json && !isFinite(message.renewalAmount) ? String(message.renewalAmount) : message.renewalAmount;
6948
+ if (message.currency != null && message.hasOwnProperty("currency"))
6949
+ object.currency = message.currency;
6833
6950
  return object;
6834
6951
  };
6835
6952
 
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.28.0"
19
+ "version": "1.30.0"
20
20
  }