@headspace/protos-events 1.170.0 → 1.172.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/lib/index.d.ts +180 -0
  2. package/lib/index.js +749 -10
  3. package/package.json +1 -1
package/lib/index.d.ts CHANGED
@@ -9165,6 +9165,9 @@ export interface IContentfulModuleDescriptorCreated {
9165
9165
  /** ContentfulModuleDescriptorCreated marketingId */
9166
9166
  marketingId?: (string|null);
9167
9167
 
9168
+ /** ContentfulModuleDescriptorCreated developerId */
9169
+ developerId?: (string|null);
9170
+
9168
9171
  /** ContentfulModuleDescriptorCreated accessGroups */
9169
9172
  accessGroups?: (contentful.ISlugReference[]|null);
9170
9173
 
@@ -9214,6 +9217,9 @@ export class ContentfulModuleDescriptorCreated implements IContentfulModuleDescr
9214
9217
  /** ContentfulModuleDescriptorCreated marketingId. */
9215
9218
  public marketingId: string;
9216
9219
 
9220
+ /** ContentfulModuleDescriptorCreated developerId. */
9221
+ public developerId: string;
9222
+
9217
9223
  /** ContentfulModuleDescriptorCreated accessGroups. */
9218
9224
  public accessGroups: contentful.ISlugReference[];
9219
9225
 
@@ -9327,6 +9333,9 @@ export interface IContentfulModuleDescriptorUpdated {
9327
9333
  /** ContentfulModuleDescriptorUpdated marketingId */
9328
9334
  marketingId?: (string|null);
9329
9335
 
9336
+ /** ContentfulModuleDescriptorUpdated developerId */
9337
+ developerId?: (string|null);
9338
+
9330
9339
  /** ContentfulModuleDescriptorUpdated accessGroups */
9331
9340
  accessGroups?: (contentful.ISlugReference[]|null);
9332
9341
 
@@ -9376,6 +9385,9 @@ export class ContentfulModuleDescriptorUpdated implements IContentfulModuleDescr
9376
9385
  /** ContentfulModuleDescriptorUpdated marketingId. */
9377
9386
  public marketingId: string;
9378
9387
 
9388
+ /** ContentfulModuleDescriptorUpdated developerId. */
9389
+ public developerId: string;
9390
+
9379
9391
  /** ContentfulModuleDescriptorUpdated accessGroups. */
9380
9392
  public accessGroups: contentful.ISlugReference[];
9381
9393
 
@@ -22312,6 +22324,174 @@ export class SubscriptionRecovered implements ISubscriptionRecovered {
22312
22324
  public toJSON(): { [k: string]: any };
22313
22325
  }
22314
22326
 
22327
+ /** Properties of a SubscriptionAmended. */
22328
+ export interface ISubscriptionAmended {
22329
+
22330
+ /** SubscriptionAmended updatedOn */
22331
+ updatedOn?: (number|Long|null);
22332
+
22333
+ /** SubscriptionAmended userId */
22334
+ userId?: (string|null);
22335
+
22336
+ /** SubscriptionAmended createdAt */
22337
+ createdAt?: (number|Long|null);
22338
+
22339
+ /** SubscriptionAmended startsAt */
22340
+ startsAt?: (number|Long|null);
22341
+
22342
+ /** SubscriptionAmended endsAt */
22343
+ endsAt?: (number|Long|null);
22344
+
22345
+ /** SubscriptionAmended voucherCode */
22346
+ voucherCode?: (string|null);
22347
+
22348
+ /** SubscriptionAmended platform */
22349
+ platform?: (subscription.SubscriptionPlatform|null);
22350
+
22351
+ /** SubscriptionAmended autoRenewalStatus */
22352
+ autoRenewalStatus?: (subscription.AutoRenewalStatus|null);
22353
+
22354
+ /** SubscriptionAmended plan */
22355
+ plan?: (subscription.IPlan|null);
22356
+
22357
+ /** SubscriptionAmended subscriptionState */
22358
+ subscriptionState?: (subscription.SubscriptionState|null);
22359
+
22360
+ /** SubscriptionAmended labels */
22361
+ labels?: (subscription.SubscriptionLabels[]|null);
22362
+
22363
+ /** SubscriptionAmended renewalCount */
22364
+ renewalCount?: (number|Long|null);
22365
+
22366
+ /** SubscriptionAmended id */
22367
+ id?: (number|null);
22368
+
22369
+ /** SubscriptionAmended terms */
22370
+ terms?: (subscription.ITerm[]|null);
22371
+ }
22372
+
22373
+ /** Represents a SubscriptionAmended. */
22374
+ export class SubscriptionAmended implements ISubscriptionAmended {
22375
+
22376
+ /**
22377
+ * Constructs a new SubscriptionAmended.
22378
+ * @param [properties] Properties to set
22379
+ */
22380
+ constructor(properties?: ISubscriptionAmended);
22381
+
22382
+ /** SubscriptionAmended updatedOn. */
22383
+ public updatedOn: (number|Long);
22384
+
22385
+ /** SubscriptionAmended userId. */
22386
+ public userId: string;
22387
+
22388
+ /** SubscriptionAmended createdAt. */
22389
+ public createdAt: (number|Long);
22390
+
22391
+ /** SubscriptionAmended startsAt. */
22392
+ public startsAt: (number|Long);
22393
+
22394
+ /** SubscriptionAmended endsAt. */
22395
+ public endsAt: (number|Long);
22396
+
22397
+ /** SubscriptionAmended voucherCode. */
22398
+ public voucherCode: string;
22399
+
22400
+ /** SubscriptionAmended platform. */
22401
+ public platform: subscription.SubscriptionPlatform;
22402
+
22403
+ /** SubscriptionAmended autoRenewalStatus. */
22404
+ public autoRenewalStatus: subscription.AutoRenewalStatus;
22405
+
22406
+ /** SubscriptionAmended plan. */
22407
+ public plan?: (subscription.IPlan|null);
22408
+
22409
+ /** SubscriptionAmended subscriptionState. */
22410
+ public subscriptionState: subscription.SubscriptionState;
22411
+
22412
+ /** SubscriptionAmended labels. */
22413
+ public labels: subscription.SubscriptionLabels[];
22414
+
22415
+ /** SubscriptionAmended renewalCount. */
22416
+ public renewalCount: (number|Long);
22417
+
22418
+ /** SubscriptionAmended id. */
22419
+ public id: number;
22420
+
22421
+ /** SubscriptionAmended terms. */
22422
+ public terms: subscription.ITerm[];
22423
+
22424
+ /**
22425
+ * Creates a new SubscriptionAmended instance using the specified properties.
22426
+ * @param [properties] Properties to set
22427
+ * @returns SubscriptionAmended instance
22428
+ */
22429
+ public static create(properties?: ISubscriptionAmended): SubscriptionAmended;
22430
+
22431
+ /**
22432
+ * Encodes the specified SubscriptionAmended message. Does not implicitly {@link SubscriptionAmended.verify|verify} messages.
22433
+ * @param message SubscriptionAmended message or plain object to encode
22434
+ * @param [writer] Writer to encode to
22435
+ * @returns Writer
22436
+ */
22437
+ public static encode(message: ISubscriptionAmended, writer?: $protobuf.Writer): $protobuf.Writer;
22438
+
22439
+ /**
22440
+ * Encodes the specified SubscriptionAmended message, length delimited. Does not implicitly {@link SubscriptionAmended.verify|verify} messages.
22441
+ * @param message SubscriptionAmended message or plain object to encode
22442
+ * @param [writer] Writer to encode to
22443
+ * @returns Writer
22444
+ */
22445
+ public static encodeDelimited(message: ISubscriptionAmended, writer?: $protobuf.Writer): $protobuf.Writer;
22446
+
22447
+ /**
22448
+ * Decodes a SubscriptionAmended message from the specified reader or buffer.
22449
+ * @param reader Reader or buffer to decode from
22450
+ * @param [length] Message length if known beforehand
22451
+ * @returns SubscriptionAmended
22452
+ * @throws {Error} If the payload is not a reader or valid buffer
22453
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
22454
+ */
22455
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): SubscriptionAmended;
22456
+
22457
+ /**
22458
+ * Decodes a SubscriptionAmended message from the specified reader or buffer, length delimited.
22459
+ * @param reader Reader or buffer to decode from
22460
+ * @returns SubscriptionAmended
22461
+ * @throws {Error} If the payload is not a reader or valid buffer
22462
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
22463
+ */
22464
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): SubscriptionAmended;
22465
+
22466
+ /**
22467
+ * Verifies a SubscriptionAmended message.
22468
+ * @param message Plain object to verify
22469
+ * @returns `null` if valid, otherwise the reason why it is not
22470
+ */
22471
+ public static verify(message: { [k: string]: any }): (string|null);
22472
+
22473
+ /**
22474
+ * Creates a SubscriptionAmended message from a plain object. Also converts values to their respective internal types.
22475
+ * @param object Plain object
22476
+ * @returns SubscriptionAmended
22477
+ */
22478
+ public static fromObject(object: { [k: string]: any }): SubscriptionAmended;
22479
+
22480
+ /**
22481
+ * Creates a plain object from a SubscriptionAmended message. Also converts values to other types if specified.
22482
+ * @param message SubscriptionAmended
22483
+ * @param [options] Conversion options
22484
+ * @returns Plain object
22485
+ */
22486
+ public static toObject(message: SubscriptionAmended, options?: $protobuf.IConversionOptions): { [k: string]: any };
22487
+
22488
+ /**
22489
+ * Converts this SubscriptionAmended to JSON.
22490
+ * @returns JSON object
22491
+ */
22492
+ public toJSON(): { [k: string]: any };
22493
+ }
22494
+
22315
22495
  /** Properties of a SubscriptionMemberSubscribed. */
22316
22496
  export interface ISubscriptionMemberSubscribed {
22317
22497
 
package/lib/index.js CHANGED
@@ -25092,6 +25092,7 @@ $root.ContentfulModuleDescriptorCreated = (function() {
25092
25092
  * @property {Object.<string,contentful.IIdReference>|null} [tabAsset] ContentfulModuleDescriptorCreated tabAsset
25093
25093
  * @property {string|null} [analyticsId] ContentfulModuleDescriptorCreated analyticsId
25094
25094
  * @property {string|null} [marketingId] ContentfulModuleDescriptorCreated marketingId
25095
+ * @property {string|null} [developerId] ContentfulModuleDescriptorCreated developerId
25095
25096
  * @property {Array.<contentful.ISlugReference>|null} [accessGroups] ContentfulModuleDescriptorCreated accessGroups
25096
25097
  * @property {Array.<contentful.ISlugReference>|null} [excludedAccessGroups] ContentfulModuleDescriptorCreated excludedAccessGroups
25097
25098
  * @property {number|Long|null} [createdAt] ContentfulModuleDescriptorCreated createdAt
@@ -25197,6 +25198,14 @@ $root.ContentfulModuleDescriptorCreated = (function() {
25197
25198
  */
25198
25199
  ContentfulModuleDescriptorCreated.prototype.marketingId = "";
25199
25200
 
25201
+ /**
25202
+ * ContentfulModuleDescriptorCreated developerId.
25203
+ * @member {string} developerId
25204
+ * @memberof ContentfulModuleDescriptorCreated
25205
+ * @instance
25206
+ */
25207
+ ContentfulModuleDescriptorCreated.prototype.developerId = "";
25208
+
25200
25209
  /**
25201
25210
  * ContentfulModuleDescriptorCreated accessGroups.
25202
25211
  * @member {Array.<contentful.ISlugReference>} accessGroups
@@ -25270,14 +25279,16 @@ $root.ContentfulModuleDescriptorCreated = (function() {
25270
25279
  writer.uint32(/* id 9, wireType 2 =*/74).string(message.analyticsId);
25271
25280
  if (message.marketingId != null && message.hasOwnProperty("marketingId"))
25272
25281
  writer.uint32(/* id 10, wireType 2 =*/82).string(message.marketingId);
25282
+ if (message.developerId != null && message.hasOwnProperty("developerId"))
25283
+ writer.uint32(/* id 11, wireType 2 =*/90).string(message.developerId);
25273
25284
  if (message.accessGroups != null && message.accessGroups.length)
25274
25285
  for (var i = 0; i < message.accessGroups.length; ++i)
25275
- $root.contentful.SlugReference.encode(message.accessGroups[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim();
25286
+ $root.contentful.SlugReference.encode(message.accessGroups[i], writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim();
25276
25287
  if (message.excludedAccessGroups != null && message.excludedAccessGroups.length)
25277
25288
  for (var i = 0; i < message.excludedAccessGroups.length; ++i)
25278
- $root.contentful.SlugReference.encode(message.excludedAccessGroups[i], writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim();
25289
+ $root.contentful.SlugReference.encode(message.excludedAccessGroups[i], writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim();
25279
25290
  if (message.createdAt != null && message.hasOwnProperty("createdAt"))
25280
- writer.uint32(/* id 13, wireType 0 =*/104).uint64(message.createdAt);
25291
+ writer.uint32(/* id 14, wireType 0 =*/112).uint64(message.createdAt);
25281
25292
  return writer;
25282
25293
  };
25283
25294
 
@@ -25355,16 +25366,19 @@ $root.ContentfulModuleDescriptorCreated = (function() {
25355
25366
  message.marketingId = reader.string();
25356
25367
  break;
25357
25368
  case 11:
25369
+ message.developerId = reader.string();
25370
+ break;
25371
+ case 12:
25358
25372
  if (!(message.accessGroups && message.accessGroups.length))
25359
25373
  message.accessGroups = [];
25360
25374
  message.accessGroups.push($root.contentful.SlugReference.decode(reader, reader.uint32()));
25361
25375
  break;
25362
- case 12:
25376
+ case 13:
25363
25377
  if (!(message.excludedAccessGroups && message.excludedAccessGroups.length))
25364
25378
  message.excludedAccessGroups = [];
25365
25379
  message.excludedAccessGroups.push($root.contentful.SlugReference.decode(reader, reader.uint32()));
25366
25380
  break;
25367
- case 13:
25381
+ case 14:
25368
25382
  message.createdAt = reader.uint64();
25369
25383
  break;
25370
25384
  default:
@@ -25448,6 +25462,9 @@ $root.ContentfulModuleDescriptorCreated = (function() {
25448
25462
  if (message.marketingId != null && message.hasOwnProperty("marketingId"))
25449
25463
  if (!$util.isString(message.marketingId))
25450
25464
  return "marketingId: string expected";
25465
+ if (message.developerId != null && message.hasOwnProperty("developerId"))
25466
+ if (!$util.isString(message.developerId))
25467
+ return "developerId: string expected";
25451
25468
  if (message.accessGroups != null && message.hasOwnProperty("accessGroups")) {
25452
25469
  if (!Array.isArray(message.accessGroups))
25453
25470
  return "accessGroups: array expected";
@@ -25522,6 +25539,8 @@ $root.ContentfulModuleDescriptorCreated = (function() {
25522
25539
  message.analyticsId = String(object.analyticsId);
25523
25540
  if (object.marketingId != null)
25524
25541
  message.marketingId = String(object.marketingId);
25542
+ if (object.developerId != null)
25543
+ message.developerId = String(object.developerId);
25525
25544
  if (object.accessGroups) {
25526
25545
  if (!Array.isArray(object.accessGroups))
25527
25546
  throw TypeError(".ContentfulModuleDescriptorCreated.accessGroups: array expected");
@@ -25584,6 +25603,7 @@ $root.ContentfulModuleDescriptorCreated = (function() {
25584
25603
  object.theme = "";
25585
25604
  object.analyticsId = "";
25586
25605
  object.marketingId = "";
25606
+ object.developerId = "";
25587
25607
  if ($util.Long) {
25588
25608
  var long = new $util.Long(0, 0, true);
25589
25609
  object.createdAt = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
@@ -25620,6 +25640,8 @@ $root.ContentfulModuleDescriptorCreated = (function() {
25620
25640
  object.analyticsId = message.analyticsId;
25621
25641
  if (message.marketingId != null && message.hasOwnProperty("marketingId"))
25622
25642
  object.marketingId = message.marketingId;
25643
+ if (message.developerId != null && message.hasOwnProperty("developerId"))
25644
+ object.developerId = message.developerId;
25623
25645
  if (message.accessGroups && message.accessGroups.length) {
25624
25646
  object.accessGroups = [];
25625
25647
  for (var j = 0; j < message.accessGroups.length; ++j)
@@ -25668,6 +25690,7 @@ $root.ContentfulModuleDescriptorUpdated = (function() {
25668
25690
  * @property {Object.<string,contentful.IIdReference>|null} [tabAsset] ContentfulModuleDescriptorUpdated tabAsset
25669
25691
  * @property {string|null} [analyticsId] ContentfulModuleDescriptorUpdated analyticsId
25670
25692
  * @property {string|null} [marketingId] ContentfulModuleDescriptorUpdated marketingId
25693
+ * @property {string|null} [developerId] ContentfulModuleDescriptorUpdated developerId
25671
25694
  * @property {Array.<contentful.ISlugReference>|null} [accessGroups] ContentfulModuleDescriptorUpdated accessGroups
25672
25695
  * @property {Array.<contentful.ISlugReference>|null} [excludedAccessGroups] ContentfulModuleDescriptorUpdated excludedAccessGroups
25673
25696
  * @property {number|Long|null} [updatedAt] ContentfulModuleDescriptorUpdated updatedAt
@@ -25773,6 +25796,14 @@ $root.ContentfulModuleDescriptorUpdated = (function() {
25773
25796
  */
25774
25797
  ContentfulModuleDescriptorUpdated.prototype.marketingId = "";
25775
25798
 
25799
+ /**
25800
+ * ContentfulModuleDescriptorUpdated developerId.
25801
+ * @member {string} developerId
25802
+ * @memberof ContentfulModuleDescriptorUpdated
25803
+ * @instance
25804
+ */
25805
+ ContentfulModuleDescriptorUpdated.prototype.developerId = "";
25806
+
25776
25807
  /**
25777
25808
  * ContentfulModuleDescriptorUpdated accessGroups.
25778
25809
  * @member {Array.<contentful.ISlugReference>} accessGroups
@@ -25846,14 +25877,16 @@ $root.ContentfulModuleDescriptorUpdated = (function() {
25846
25877
  writer.uint32(/* id 9, wireType 2 =*/74).string(message.analyticsId);
25847
25878
  if (message.marketingId != null && message.hasOwnProperty("marketingId"))
25848
25879
  writer.uint32(/* id 10, wireType 2 =*/82).string(message.marketingId);
25880
+ if (message.developerId != null && message.hasOwnProperty("developerId"))
25881
+ writer.uint32(/* id 11, wireType 2 =*/90).string(message.developerId);
25849
25882
  if (message.accessGroups != null && message.accessGroups.length)
25850
25883
  for (var i = 0; i < message.accessGroups.length; ++i)
25851
- $root.contentful.SlugReference.encode(message.accessGroups[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim();
25884
+ $root.contentful.SlugReference.encode(message.accessGroups[i], writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim();
25852
25885
  if (message.excludedAccessGroups != null && message.excludedAccessGroups.length)
25853
25886
  for (var i = 0; i < message.excludedAccessGroups.length; ++i)
25854
- $root.contentful.SlugReference.encode(message.excludedAccessGroups[i], writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim();
25887
+ $root.contentful.SlugReference.encode(message.excludedAccessGroups[i], writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim();
25855
25888
  if (message.updatedAt != null && message.hasOwnProperty("updatedAt"))
25856
- writer.uint32(/* id 13, wireType 0 =*/104).uint64(message.updatedAt);
25889
+ writer.uint32(/* id 14, wireType 0 =*/112).uint64(message.updatedAt);
25857
25890
  return writer;
25858
25891
  };
25859
25892
 
@@ -25931,16 +25964,19 @@ $root.ContentfulModuleDescriptorUpdated = (function() {
25931
25964
  message.marketingId = reader.string();
25932
25965
  break;
25933
25966
  case 11:
25967
+ message.developerId = reader.string();
25968
+ break;
25969
+ case 12:
25934
25970
  if (!(message.accessGroups && message.accessGroups.length))
25935
25971
  message.accessGroups = [];
25936
25972
  message.accessGroups.push($root.contentful.SlugReference.decode(reader, reader.uint32()));
25937
25973
  break;
25938
- case 12:
25974
+ case 13:
25939
25975
  if (!(message.excludedAccessGroups && message.excludedAccessGroups.length))
25940
25976
  message.excludedAccessGroups = [];
25941
25977
  message.excludedAccessGroups.push($root.contentful.SlugReference.decode(reader, reader.uint32()));
25942
25978
  break;
25943
- case 13:
25979
+ case 14:
25944
25980
  message.updatedAt = reader.uint64();
25945
25981
  break;
25946
25982
  default:
@@ -26024,6 +26060,9 @@ $root.ContentfulModuleDescriptorUpdated = (function() {
26024
26060
  if (message.marketingId != null && message.hasOwnProperty("marketingId"))
26025
26061
  if (!$util.isString(message.marketingId))
26026
26062
  return "marketingId: string expected";
26063
+ if (message.developerId != null && message.hasOwnProperty("developerId"))
26064
+ if (!$util.isString(message.developerId))
26065
+ return "developerId: string expected";
26027
26066
  if (message.accessGroups != null && message.hasOwnProperty("accessGroups")) {
26028
26067
  if (!Array.isArray(message.accessGroups))
26029
26068
  return "accessGroups: array expected";
@@ -26098,6 +26137,8 @@ $root.ContentfulModuleDescriptorUpdated = (function() {
26098
26137
  message.analyticsId = String(object.analyticsId);
26099
26138
  if (object.marketingId != null)
26100
26139
  message.marketingId = String(object.marketingId);
26140
+ if (object.developerId != null)
26141
+ message.developerId = String(object.developerId);
26101
26142
  if (object.accessGroups) {
26102
26143
  if (!Array.isArray(object.accessGroups))
26103
26144
  throw TypeError(".ContentfulModuleDescriptorUpdated.accessGroups: array expected");
@@ -26160,6 +26201,7 @@ $root.ContentfulModuleDescriptorUpdated = (function() {
26160
26201
  object.theme = "";
26161
26202
  object.analyticsId = "";
26162
26203
  object.marketingId = "";
26204
+ object.developerId = "";
26163
26205
  if ($util.Long) {
26164
26206
  var long = new $util.Long(0, 0, true);
26165
26207
  object.updatedAt = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
@@ -26196,6 +26238,8 @@ $root.ContentfulModuleDescriptorUpdated = (function() {
26196
26238
  object.analyticsId = message.analyticsId;
26197
26239
  if (message.marketingId != null && message.hasOwnProperty("marketingId"))
26198
26240
  object.marketingId = message.marketingId;
26241
+ if (message.developerId != null && message.hasOwnProperty("developerId"))
26242
+ object.developerId = message.developerId;
26199
26243
  if (message.accessGroups && message.accessGroups.length) {
26200
26244
  object.accessGroups = [];
26201
26245
  for (var j = 0; j < message.accessGroups.length; ++j)
@@ -62921,6 +62965,701 @@ $root.SubscriptionRecovered = (function() {
62921
62965
  return SubscriptionRecovered;
62922
62966
  })();
62923
62967
 
62968
+ $root.SubscriptionAmended = (function() {
62969
+
62970
+ /**
62971
+ * Properties of a SubscriptionAmended.
62972
+ * @exports ISubscriptionAmended
62973
+ * @interface ISubscriptionAmended
62974
+ * @property {number|Long|null} [updatedOn] SubscriptionAmended updatedOn
62975
+ * @property {string|null} [userId] SubscriptionAmended userId
62976
+ * @property {number|Long|null} [createdAt] SubscriptionAmended createdAt
62977
+ * @property {number|Long|null} [startsAt] SubscriptionAmended startsAt
62978
+ * @property {number|Long|null} [endsAt] SubscriptionAmended endsAt
62979
+ * @property {string|null} [voucherCode] SubscriptionAmended voucherCode
62980
+ * @property {subscription.SubscriptionPlatform|null} [platform] SubscriptionAmended platform
62981
+ * @property {subscription.AutoRenewalStatus|null} [autoRenewalStatus] SubscriptionAmended autoRenewalStatus
62982
+ * @property {subscription.IPlan|null} [plan] SubscriptionAmended plan
62983
+ * @property {subscription.SubscriptionState|null} [subscriptionState] SubscriptionAmended subscriptionState
62984
+ * @property {Array.<subscription.SubscriptionLabels>|null} [labels] SubscriptionAmended labels
62985
+ * @property {number|Long|null} [renewalCount] SubscriptionAmended renewalCount
62986
+ * @property {number|null} [id] SubscriptionAmended id
62987
+ * @property {Array.<subscription.ITerm>|null} [terms] SubscriptionAmended terms
62988
+ */
62989
+
62990
+ /**
62991
+ * Constructs a new SubscriptionAmended.
62992
+ * @exports SubscriptionAmended
62993
+ * @classdesc Represents a SubscriptionAmended.
62994
+ * @implements ISubscriptionAmended
62995
+ * @constructor
62996
+ * @param {ISubscriptionAmended=} [properties] Properties to set
62997
+ */
62998
+ function SubscriptionAmended(properties) {
62999
+ this.labels = [];
63000
+ this.terms = [];
63001
+ if (properties)
63002
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
63003
+ if (properties[keys[i]] != null)
63004
+ this[keys[i]] = properties[keys[i]];
63005
+ }
63006
+
63007
+ /**
63008
+ * SubscriptionAmended updatedOn.
63009
+ * @member {number|Long} updatedOn
63010
+ * @memberof SubscriptionAmended
63011
+ * @instance
63012
+ */
63013
+ SubscriptionAmended.prototype.updatedOn = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
63014
+
63015
+ /**
63016
+ * SubscriptionAmended userId.
63017
+ * @member {string} userId
63018
+ * @memberof SubscriptionAmended
63019
+ * @instance
63020
+ */
63021
+ SubscriptionAmended.prototype.userId = "";
63022
+
63023
+ /**
63024
+ * SubscriptionAmended createdAt.
63025
+ * @member {number|Long} createdAt
63026
+ * @memberof SubscriptionAmended
63027
+ * @instance
63028
+ */
63029
+ SubscriptionAmended.prototype.createdAt = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
63030
+
63031
+ /**
63032
+ * SubscriptionAmended startsAt.
63033
+ * @member {number|Long} startsAt
63034
+ * @memberof SubscriptionAmended
63035
+ * @instance
63036
+ */
63037
+ SubscriptionAmended.prototype.startsAt = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
63038
+
63039
+ /**
63040
+ * SubscriptionAmended endsAt.
63041
+ * @member {number|Long} endsAt
63042
+ * @memberof SubscriptionAmended
63043
+ * @instance
63044
+ */
63045
+ SubscriptionAmended.prototype.endsAt = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
63046
+
63047
+ /**
63048
+ * SubscriptionAmended voucherCode.
63049
+ * @member {string} voucherCode
63050
+ * @memberof SubscriptionAmended
63051
+ * @instance
63052
+ */
63053
+ SubscriptionAmended.prototype.voucherCode = "";
63054
+
63055
+ /**
63056
+ * SubscriptionAmended platform.
63057
+ * @member {subscription.SubscriptionPlatform} platform
63058
+ * @memberof SubscriptionAmended
63059
+ * @instance
63060
+ */
63061
+ SubscriptionAmended.prototype.platform = 0;
63062
+
63063
+ /**
63064
+ * SubscriptionAmended autoRenewalStatus.
63065
+ * @member {subscription.AutoRenewalStatus} autoRenewalStatus
63066
+ * @memberof SubscriptionAmended
63067
+ * @instance
63068
+ */
63069
+ SubscriptionAmended.prototype.autoRenewalStatus = 0;
63070
+
63071
+ /**
63072
+ * SubscriptionAmended plan.
63073
+ * @member {subscription.IPlan|null|undefined} plan
63074
+ * @memberof SubscriptionAmended
63075
+ * @instance
63076
+ */
63077
+ SubscriptionAmended.prototype.plan = null;
63078
+
63079
+ /**
63080
+ * SubscriptionAmended subscriptionState.
63081
+ * @member {subscription.SubscriptionState} subscriptionState
63082
+ * @memberof SubscriptionAmended
63083
+ * @instance
63084
+ */
63085
+ SubscriptionAmended.prototype.subscriptionState = 0;
63086
+
63087
+ /**
63088
+ * SubscriptionAmended labels.
63089
+ * @member {Array.<subscription.SubscriptionLabels>} labels
63090
+ * @memberof SubscriptionAmended
63091
+ * @instance
63092
+ */
63093
+ SubscriptionAmended.prototype.labels = $util.emptyArray;
63094
+
63095
+ /**
63096
+ * SubscriptionAmended renewalCount.
63097
+ * @member {number|Long} renewalCount
63098
+ * @memberof SubscriptionAmended
63099
+ * @instance
63100
+ */
63101
+ SubscriptionAmended.prototype.renewalCount = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
63102
+
63103
+ /**
63104
+ * SubscriptionAmended id.
63105
+ * @member {number} id
63106
+ * @memberof SubscriptionAmended
63107
+ * @instance
63108
+ */
63109
+ SubscriptionAmended.prototype.id = 0;
63110
+
63111
+ /**
63112
+ * SubscriptionAmended terms.
63113
+ * @member {Array.<subscription.ITerm>} terms
63114
+ * @memberof SubscriptionAmended
63115
+ * @instance
63116
+ */
63117
+ SubscriptionAmended.prototype.terms = $util.emptyArray;
63118
+
63119
+ /**
63120
+ * Creates a new SubscriptionAmended instance using the specified properties.
63121
+ * @function create
63122
+ * @memberof SubscriptionAmended
63123
+ * @static
63124
+ * @param {ISubscriptionAmended=} [properties] Properties to set
63125
+ * @returns {SubscriptionAmended} SubscriptionAmended instance
63126
+ */
63127
+ SubscriptionAmended.create = function create(properties) {
63128
+ return new SubscriptionAmended(properties);
63129
+ };
63130
+
63131
+ /**
63132
+ * Encodes the specified SubscriptionAmended message. Does not implicitly {@link SubscriptionAmended.verify|verify} messages.
63133
+ * @function encode
63134
+ * @memberof SubscriptionAmended
63135
+ * @static
63136
+ * @param {ISubscriptionAmended} message SubscriptionAmended message or plain object to encode
63137
+ * @param {$protobuf.Writer} [writer] Writer to encode to
63138
+ * @returns {$protobuf.Writer} Writer
63139
+ */
63140
+ SubscriptionAmended.encode = function encode(message, writer) {
63141
+ if (!writer)
63142
+ writer = $Writer.create();
63143
+ if (message.updatedOn != null && message.hasOwnProperty("updatedOn"))
63144
+ writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.updatedOn);
63145
+ if (message.userId != null && message.hasOwnProperty("userId"))
63146
+ writer.uint32(/* id 3, wireType 2 =*/26).string(message.userId);
63147
+ if (message.createdAt != null && message.hasOwnProperty("createdAt"))
63148
+ writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.createdAt);
63149
+ if (message.startsAt != null && message.hasOwnProperty("startsAt"))
63150
+ writer.uint32(/* id 5, wireType 0 =*/40).uint64(message.startsAt);
63151
+ if (message.endsAt != null && message.hasOwnProperty("endsAt"))
63152
+ writer.uint32(/* id 6, wireType 0 =*/48).uint64(message.endsAt);
63153
+ if (message.voucherCode != null && message.hasOwnProperty("voucherCode"))
63154
+ writer.uint32(/* id 7, wireType 2 =*/58).string(message.voucherCode);
63155
+ if (message.platform != null && message.hasOwnProperty("platform"))
63156
+ writer.uint32(/* id 8, wireType 0 =*/64).int32(message.platform);
63157
+ if (message.autoRenewalStatus != null && message.hasOwnProperty("autoRenewalStatus"))
63158
+ writer.uint32(/* id 9, wireType 0 =*/72).int32(message.autoRenewalStatus);
63159
+ if (message.plan != null && message.hasOwnProperty("plan"))
63160
+ $root.subscription.Plan.encode(message.plan, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim();
63161
+ if (message.subscriptionState != null && message.hasOwnProperty("subscriptionState"))
63162
+ writer.uint32(/* id 11, wireType 0 =*/88).int32(message.subscriptionState);
63163
+ if (message.labels != null && message.labels.length) {
63164
+ writer.uint32(/* id 12, wireType 2 =*/98).fork();
63165
+ for (var i = 0; i < message.labels.length; ++i)
63166
+ writer.int32(message.labels[i]);
63167
+ writer.ldelim();
63168
+ }
63169
+ if (message.renewalCount != null && message.hasOwnProperty("renewalCount"))
63170
+ writer.uint32(/* id 13, wireType 0 =*/104).uint64(message.renewalCount);
63171
+ if (message.id != null && message.hasOwnProperty("id"))
63172
+ writer.uint32(/* id 14, wireType 0 =*/112).uint32(message.id);
63173
+ if (message.terms != null && message.terms.length)
63174
+ for (var i = 0; i < message.terms.length; ++i)
63175
+ $root.subscription.Term.encode(message.terms[i], writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim();
63176
+ return writer;
63177
+ };
63178
+
63179
+ /**
63180
+ * Encodes the specified SubscriptionAmended message, length delimited. Does not implicitly {@link SubscriptionAmended.verify|verify} messages.
63181
+ * @function encodeDelimited
63182
+ * @memberof SubscriptionAmended
63183
+ * @static
63184
+ * @param {ISubscriptionAmended} message SubscriptionAmended message or plain object to encode
63185
+ * @param {$protobuf.Writer} [writer] Writer to encode to
63186
+ * @returns {$protobuf.Writer} Writer
63187
+ */
63188
+ SubscriptionAmended.encodeDelimited = function encodeDelimited(message, writer) {
63189
+ return this.encode(message, writer).ldelim();
63190
+ };
63191
+
63192
+ /**
63193
+ * Decodes a SubscriptionAmended message from the specified reader or buffer.
63194
+ * @function decode
63195
+ * @memberof SubscriptionAmended
63196
+ * @static
63197
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
63198
+ * @param {number} [length] Message length if known beforehand
63199
+ * @returns {SubscriptionAmended} SubscriptionAmended
63200
+ * @throws {Error} If the payload is not a reader or valid buffer
63201
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
63202
+ */
63203
+ SubscriptionAmended.decode = function decode(reader, length) {
63204
+ if (!(reader instanceof $Reader))
63205
+ reader = $Reader.create(reader);
63206
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.SubscriptionAmended();
63207
+ while (reader.pos < end) {
63208
+ var tag = reader.uint32();
63209
+ switch (tag >>> 3) {
63210
+ case 2:
63211
+ message.updatedOn = reader.uint64();
63212
+ break;
63213
+ case 3:
63214
+ message.userId = reader.string();
63215
+ break;
63216
+ case 4:
63217
+ message.createdAt = reader.uint64();
63218
+ break;
63219
+ case 5:
63220
+ message.startsAt = reader.uint64();
63221
+ break;
63222
+ case 6:
63223
+ message.endsAt = reader.uint64();
63224
+ break;
63225
+ case 7:
63226
+ message.voucherCode = reader.string();
63227
+ break;
63228
+ case 8:
63229
+ message.platform = reader.int32();
63230
+ break;
63231
+ case 9:
63232
+ message.autoRenewalStatus = reader.int32();
63233
+ break;
63234
+ case 10:
63235
+ message.plan = $root.subscription.Plan.decode(reader, reader.uint32());
63236
+ break;
63237
+ case 11:
63238
+ message.subscriptionState = reader.int32();
63239
+ break;
63240
+ case 12:
63241
+ if (!(message.labels && message.labels.length))
63242
+ message.labels = [];
63243
+ if ((tag & 7) === 2) {
63244
+ var end2 = reader.uint32() + reader.pos;
63245
+ while (reader.pos < end2)
63246
+ message.labels.push(reader.int32());
63247
+ } else
63248
+ message.labels.push(reader.int32());
63249
+ break;
63250
+ case 13:
63251
+ message.renewalCount = reader.uint64();
63252
+ break;
63253
+ case 14:
63254
+ message.id = reader.uint32();
63255
+ break;
63256
+ case 15:
63257
+ if (!(message.terms && message.terms.length))
63258
+ message.terms = [];
63259
+ message.terms.push($root.subscription.Term.decode(reader, reader.uint32()));
63260
+ break;
63261
+ default:
63262
+ reader.skipType(tag & 7);
63263
+ break;
63264
+ }
63265
+ }
63266
+ return message;
63267
+ };
63268
+
63269
+ /**
63270
+ * Decodes a SubscriptionAmended message from the specified reader or buffer, length delimited.
63271
+ * @function decodeDelimited
63272
+ * @memberof SubscriptionAmended
63273
+ * @static
63274
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
63275
+ * @returns {SubscriptionAmended} SubscriptionAmended
63276
+ * @throws {Error} If the payload is not a reader or valid buffer
63277
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
63278
+ */
63279
+ SubscriptionAmended.decodeDelimited = function decodeDelimited(reader) {
63280
+ if (!(reader instanceof $Reader))
63281
+ reader = new $Reader(reader);
63282
+ return this.decode(reader, reader.uint32());
63283
+ };
63284
+
63285
+ /**
63286
+ * Verifies a SubscriptionAmended message.
63287
+ * @function verify
63288
+ * @memberof SubscriptionAmended
63289
+ * @static
63290
+ * @param {Object.<string,*>} message Plain object to verify
63291
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
63292
+ */
63293
+ SubscriptionAmended.verify = function verify(message) {
63294
+ if (typeof message !== "object" || message === null)
63295
+ return "object expected";
63296
+ if (message.updatedOn != null && message.hasOwnProperty("updatedOn"))
63297
+ if (!$util.isInteger(message.updatedOn) && !(message.updatedOn && $util.isInteger(message.updatedOn.low) && $util.isInteger(message.updatedOn.high)))
63298
+ return "updatedOn: integer|Long expected";
63299
+ if (message.userId != null && message.hasOwnProperty("userId"))
63300
+ if (!$util.isString(message.userId))
63301
+ return "userId: string expected";
63302
+ if (message.createdAt != null && message.hasOwnProperty("createdAt"))
63303
+ if (!$util.isInteger(message.createdAt) && !(message.createdAt && $util.isInteger(message.createdAt.low) && $util.isInteger(message.createdAt.high)))
63304
+ return "createdAt: integer|Long expected";
63305
+ if (message.startsAt != null && message.hasOwnProperty("startsAt"))
63306
+ if (!$util.isInteger(message.startsAt) && !(message.startsAt && $util.isInteger(message.startsAt.low) && $util.isInteger(message.startsAt.high)))
63307
+ return "startsAt: integer|Long expected";
63308
+ if (message.endsAt != null && message.hasOwnProperty("endsAt"))
63309
+ if (!$util.isInteger(message.endsAt) && !(message.endsAt && $util.isInteger(message.endsAt.low) && $util.isInteger(message.endsAt.high)))
63310
+ return "endsAt: integer|Long expected";
63311
+ if (message.voucherCode != null && message.hasOwnProperty("voucherCode"))
63312
+ if (!$util.isString(message.voucherCode))
63313
+ return "voucherCode: string expected";
63314
+ if (message.platform != null && message.hasOwnProperty("platform"))
63315
+ switch (message.platform) {
63316
+ default:
63317
+ return "platform: enum value expected";
63318
+ case 0:
63319
+ case 1:
63320
+ case 2:
63321
+ case 3:
63322
+ case 4:
63323
+ case 5:
63324
+ break;
63325
+ }
63326
+ if (message.autoRenewalStatus != null && message.hasOwnProperty("autoRenewalStatus"))
63327
+ switch (message.autoRenewalStatus) {
63328
+ default:
63329
+ return "autoRenewalStatus: enum value expected";
63330
+ case 0:
63331
+ case 1:
63332
+ case 2:
63333
+ break;
63334
+ }
63335
+ if (message.plan != null && message.hasOwnProperty("plan")) {
63336
+ var error = $root.subscription.Plan.verify(message.plan);
63337
+ if (error)
63338
+ return "plan." + error;
63339
+ }
63340
+ if (message.subscriptionState != null && message.hasOwnProperty("subscriptionState"))
63341
+ switch (message.subscriptionState) {
63342
+ default:
63343
+ return "subscriptionState: enum value expected";
63344
+ case 0:
63345
+ case 1:
63346
+ case 2:
63347
+ case 3:
63348
+ case 4:
63349
+ case 6:
63350
+ case 5:
63351
+ break;
63352
+ }
63353
+ if (message.labels != null && message.hasOwnProperty("labels")) {
63354
+ if (!Array.isArray(message.labels))
63355
+ return "labels: array expected";
63356
+ for (var i = 0; i < message.labels.length; ++i)
63357
+ switch (message.labels[i]) {
63358
+ default:
63359
+ return "labels: enum value[] expected";
63360
+ case 0:
63361
+ break;
63362
+ }
63363
+ }
63364
+ if (message.renewalCount != null && message.hasOwnProperty("renewalCount"))
63365
+ if (!$util.isInteger(message.renewalCount) && !(message.renewalCount && $util.isInteger(message.renewalCount.low) && $util.isInteger(message.renewalCount.high)))
63366
+ return "renewalCount: integer|Long expected";
63367
+ if (message.id != null && message.hasOwnProperty("id"))
63368
+ if (!$util.isInteger(message.id))
63369
+ return "id: integer expected";
63370
+ if (message.terms != null && message.hasOwnProperty("terms")) {
63371
+ if (!Array.isArray(message.terms))
63372
+ return "terms: array expected";
63373
+ for (var i = 0; i < message.terms.length; ++i) {
63374
+ var error = $root.subscription.Term.verify(message.terms[i]);
63375
+ if (error)
63376
+ return "terms." + error;
63377
+ }
63378
+ }
63379
+ return null;
63380
+ };
63381
+
63382
+ /**
63383
+ * Creates a SubscriptionAmended message from a plain object. Also converts values to their respective internal types.
63384
+ * @function fromObject
63385
+ * @memberof SubscriptionAmended
63386
+ * @static
63387
+ * @param {Object.<string,*>} object Plain object
63388
+ * @returns {SubscriptionAmended} SubscriptionAmended
63389
+ */
63390
+ SubscriptionAmended.fromObject = function fromObject(object) {
63391
+ if (object instanceof $root.SubscriptionAmended)
63392
+ return object;
63393
+ var message = new $root.SubscriptionAmended();
63394
+ if (object.updatedOn != null)
63395
+ if ($util.Long)
63396
+ (message.updatedOn = $util.Long.fromValue(object.updatedOn)).unsigned = true;
63397
+ else if (typeof object.updatedOn === "string")
63398
+ message.updatedOn = parseInt(object.updatedOn, 10);
63399
+ else if (typeof object.updatedOn === "number")
63400
+ message.updatedOn = object.updatedOn;
63401
+ else if (typeof object.updatedOn === "object")
63402
+ message.updatedOn = new $util.LongBits(object.updatedOn.low >>> 0, object.updatedOn.high >>> 0).toNumber(true);
63403
+ if (object.userId != null)
63404
+ message.userId = String(object.userId);
63405
+ if (object.createdAt != null)
63406
+ if ($util.Long)
63407
+ (message.createdAt = $util.Long.fromValue(object.createdAt)).unsigned = true;
63408
+ else if (typeof object.createdAt === "string")
63409
+ message.createdAt = parseInt(object.createdAt, 10);
63410
+ else if (typeof object.createdAt === "number")
63411
+ message.createdAt = object.createdAt;
63412
+ else if (typeof object.createdAt === "object")
63413
+ message.createdAt = new $util.LongBits(object.createdAt.low >>> 0, object.createdAt.high >>> 0).toNumber(true);
63414
+ if (object.startsAt != null)
63415
+ if ($util.Long)
63416
+ (message.startsAt = $util.Long.fromValue(object.startsAt)).unsigned = true;
63417
+ else if (typeof object.startsAt === "string")
63418
+ message.startsAt = parseInt(object.startsAt, 10);
63419
+ else if (typeof object.startsAt === "number")
63420
+ message.startsAt = object.startsAt;
63421
+ else if (typeof object.startsAt === "object")
63422
+ message.startsAt = new $util.LongBits(object.startsAt.low >>> 0, object.startsAt.high >>> 0).toNumber(true);
63423
+ if (object.endsAt != null)
63424
+ if ($util.Long)
63425
+ (message.endsAt = $util.Long.fromValue(object.endsAt)).unsigned = true;
63426
+ else if (typeof object.endsAt === "string")
63427
+ message.endsAt = parseInt(object.endsAt, 10);
63428
+ else if (typeof object.endsAt === "number")
63429
+ message.endsAt = object.endsAt;
63430
+ else if (typeof object.endsAt === "object")
63431
+ message.endsAt = new $util.LongBits(object.endsAt.low >>> 0, object.endsAt.high >>> 0).toNumber(true);
63432
+ if (object.voucherCode != null)
63433
+ message.voucherCode = String(object.voucherCode);
63434
+ switch (object.platform) {
63435
+ case "PLATFORM_UNKNOWN":
63436
+ case 0:
63437
+ message.platform = 0;
63438
+ break;
63439
+ case "ITUNES":
63440
+ case 1:
63441
+ message.platform = 1;
63442
+ break;
63443
+ case "PLAY_STORE":
63444
+ case 2:
63445
+ message.platform = 2;
63446
+ break;
63447
+ case "ZUORA":
63448
+ case 3:
63449
+ message.platform = 3;
63450
+ break;
63451
+ case "HEADSPACE":
63452
+ case 4:
63453
+ message.platform = 4;
63454
+ break;
63455
+ case "SPOTIFY":
63456
+ case 5:
63457
+ message.platform = 5;
63458
+ break;
63459
+ }
63460
+ switch (object.autoRenewalStatus) {
63461
+ case "UNKNOWN_STATUS":
63462
+ case 0:
63463
+ message.autoRenewalStatus = 0;
63464
+ break;
63465
+ case "ENABLED":
63466
+ case 1:
63467
+ message.autoRenewalStatus = 1;
63468
+ break;
63469
+ case "DISABLED":
63470
+ case 2:
63471
+ message.autoRenewalStatus = 2;
63472
+ break;
63473
+ }
63474
+ if (object.plan != null) {
63475
+ if (typeof object.plan !== "object")
63476
+ throw TypeError(".SubscriptionAmended.plan: object expected");
63477
+ message.plan = $root.subscription.Plan.fromObject(object.plan);
63478
+ }
63479
+ switch (object.subscriptionState) {
63480
+ case "SUBSTATE_UNKNOWN":
63481
+ case 0:
63482
+ message.subscriptionState = 0;
63483
+ break;
63484
+ case "SUBSTATE_NONE":
63485
+ case 1:
63486
+ message.subscriptionState = 1;
63487
+ break;
63488
+ case "SUBSTATE_FREE_SUBSCRIPTION":
63489
+ case 2:
63490
+ message.subscriptionState = 2;
63491
+ break;
63492
+ case "SUBSTATE_FREE_TRIAL":
63493
+ case 3:
63494
+ message.subscriptionState = 3;
63495
+ break;
63496
+ case "SUBSTATE_PAYING":
63497
+ case 4:
63498
+ message.subscriptionState = 4;
63499
+ break;
63500
+ case "SUBSTATE_GRACE":
63501
+ case 6:
63502
+ message.subscriptionState = 6;
63503
+ break;
63504
+ case "SUBSTATE_CANCELLED":
63505
+ case 5:
63506
+ message.subscriptionState = 5;
63507
+ break;
63508
+ }
63509
+ if (object.labels) {
63510
+ if (!Array.isArray(object.labels))
63511
+ throw TypeError(".SubscriptionAmended.labels: array expected");
63512
+ message.labels = [];
63513
+ for (var i = 0; i < object.labels.length; ++i)
63514
+ switch (object.labels[i]) {
63515
+ default:
63516
+ case "SUBLABEL_FREE_TRIAL":
63517
+ case 0:
63518
+ message.labels[i] = 0;
63519
+ break;
63520
+ }
63521
+ }
63522
+ if (object.renewalCount != null)
63523
+ if ($util.Long)
63524
+ (message.renewalCount = $util.Long.fromValue(object.renewalCount)).unsigned = true;
63525
+ else if (typeof object.renewalCount === "string")
63526
+ message.renewalCount = parseInt(object.renewalCount, 10);
63527
+ else if (typeof object.renewalCount === "number")
63528
+ message.renewalCount = object.renewalCount;
63529
+ else if (typeof object.renewalCount === "object")
63530
+ message.renewalCount = new $util.LongBits(object.renewalCount.low >>> 0, object.renewalCount.high >>> 0).toNumber(true);
63531
+ if (object.id != null)
63532
+ message.id = object.id >>> 0;
63533
+ if (object.terms) {
63534
+ if (!Array.isArray(object.terms))
63535
+ throw TypeError(".SubscriptionAmended.terms: array expected");
63536
+ message.terms = [];
63537
+ for (var i = 0; i < object.terms.length; ++i) {
63538
+ if (typeof object.terms[i] !== "object")
63539
+ throw TypeError(".SubscriptionAmended.terms: object expected");
63540
+ message.terms[i] = $root.subscription.Term.fromObject(object.terms[i]);
63541
+ }
63542
+ }
63543
+ return message;
63544
+ };
63545
+
63546
+ /**
63547
+ * Creates a plain object from a SubscriptionAmended message. Also converts values to other types if specified.
63548
+ * @function toObject
63549
+ * @memberof SubscriptionAmended
63550
+ * @static
63551
+ * @param {SubscriptionAmended} message SubscriptionAmended
63552
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
63553
+ * @returns {Object.<string,*>} Plain object
63554
+ */
63555
+ SubscriptionAmended.toObject = function toObject(message, options) {
63556
+ if (!options)
63557
+ options = {};
63558
+ var object = {};
63559
+ if (options.arrays || options.defaults) {
63560
+ object.labels = [];
63561
+ object.terms = [];
63562
+ }
63563
+ if (options.defaults) {
63564
+ if ($util.Long) {
63565
+ var long = new $util.Long(0, 0, true);
63566
+ object.updatedOn = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
63567
+ } else
63568
+ object.updatedOn = options.longs === String ? "0" : 0;
63569
+ object.userId = "";
63570
+ if ($util.Long) {
63571
+ var long = new $util.Long(0, 0, true);
63572
+ object.createdAt = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
63573
+ } else
63574
+ object.createdAt = options.longs === String ? "0" : 0;
63575
+ if ($util.Long) {
63576
+ var long = new $util.Long(0, 0, true);
63577
+ object.startsAt = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
63578
+ } else
63579
+ object.startsAt = options.longs === String ? "0" : 0;
63580
+ if ($util.Long) {
63581
+ var long = new $util.Long(0, 0, true);
63582
+ object.endsAt = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
63583
+ } else
63584
+ object.endsAt = options.longs === String ? "0" : 0;
63585
+ object.voucherCode = "";
63586
+ object.platform = options.enums === String ? "PLATFORM_UNKNOWN" : 0;
63587
+ object.autoRenewalStatus = options.enums === String ? "UNKNOWN_STATUS" : 0;
63588
+ object.plan = null;
63589
+ object.subscriptionState = options.enums === String ? "SUBSTATE_UNKNOWN" : 0;
63590
+ if ($util.Long) {
63591
+ var long = new $util.Long(0, 0, true);
63592
+ object.renewalCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
63593
+ } else
63594
+ object.renewalCount = options.longs === String ? "0" : 0;
63595
+ object.id = 0;
63596
+ }
63597
+ if (message.updatedOn != null && message.hasOwnProperty("updatedOn"))
63598
+ if (typeof message.updatedOn === "number")
63599
+ object.updatedOn = options.longs === String ? String(message.updatedOn) : message.updatedOn;
63600
+ else
63601
+ 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;
63602
+ if (message.userId != null && message.hasOwnProperty("userId"))
63603
+ object.userId = message.userId;
63604
+ if (message.createdAt != null && message.hasOwnProperty("createdAt"))
63605
+ if (typeof message.createdAt === "number")
63606
+ object.createdAt = options.longs === String ? String(message.createdAt) : message.createdAt;
63607
+ else
63608
+ 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;
63609
+ if (message.startsAt != null && message.hasOwnProperty("startsAt"))
63610
+ if (typeof message.startsAt === "number")
63611
+ object.startsAt = options.longs === String ? String(message.startsAt) : message.startsAt;
63612
+ else
63613
+ 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;
63614
+ if (message.endsAt != null && message.hasOwnProperty("endsAt"))
63615
+ if (typeof message.endsAt === "number")
63616
+ object.endsAt = options.longs === String ? String(message.endsAt) : message.endsAt;
63617
+ else
63618
+ 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;
63619
+ if (message.voucherCode != null && message.hasOwnProperty("voucherCode"))
63620
+ object.voucherCode = message.voucherCode;
63621
+ if (message.platform != null && message.hasOwnProperty("platform"))
63622
+ object.platform = options.enums === String ? $root.subscription.SubscriptionPlatform[message.platform] : message.platform;
63623
+ if (message.autoRenewalStatus != null && message.hasOwnProperty("autoRenewalStatus"))
63624
+ object.autoRenewalStatus = options.enums === String ? $root.subscription.AutoRenewalStatus[message.autoRenewalStatus] : message.autoRenewalStatus;
63625
+ if (message.plan != null && message.hasOwnProperty("plan"))
63626
+ object.plan = $root.subscription.Plan.toObject(message.plan, options);
63627
+ if (message.subscriptionState != null && message.hasOwnProperty("subscriptionState"))
63628
+ object.subscriptionState = options.enums === String ? $root.subscription.SubscriptionState[message.subscriptionState] : message.subscriptionState;
63629
+ if (message.labels && message.labels.length) {
63630
+ object.labels = [];
63631
+ for (var j = 0; j < message.labels.length; ++j)
63632
+ object.labels[j] = options.enums === String ? $root.subscription.SubscriptionLabels[message.labels[j]] : message.labels[j];
63633
+ }
63634
+ if (message.renewalCount != null && message.hasOwnProperty("renewalCount"))
63635
+ if (typeof message.renewalCount === "number")
63636
+ object.renewalCount = options.longs === String ? String(message.renewalCount) : message.renewalCount;
63637
+ else
63638
+ object.renewalCount = options.longs === String ? $util.Long.prototype.toString.call(message.renewalCount) : options.longs === Number ? new $util.LongBits(message.renewalCount.low >>> 0, message.renewalCount.high >>> 0).toNumber(true) : message.renewalCount;
63639
+ if (message.id != null && message.hasOwnProperty("id"))
63640
+ object.id = message.id;
63641
+ if (message.terms && message.terms.length) {
63642
+ object.terms = [];
63643
+ for (var j = 0; j < message.terms.length; ++j)
63644
+ object.terms[j] = $root.subscription.Term.toObject(message.terms[j], options);
63645
+ }
63646
+ return object;
63647
+ };
63648
+
63649
+ /**
63650
+ * Converts this SubscriptionAmended to JSON.
63651
+ * @function toJSON
63652
+ * @memberof SubscriptionAmended
63653
+ * @instance
63654
+ * @returns {Object.<string,*>} JSON object
63655
+ */
63656
+ SubscriptionAmended.prototype.toJSON = function toJSON() {
63657
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
63658
+ };
63659
+
63660
+ return SubscriptionAmended;
63661
+ })();
63662
+
62924
63663
  $root.SubscriptionMemberSubscribed = (function() {
62925
63664
 
62926
63665
  /**
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.170.0"
19
+ "version": "1.172.0"
20
20
  }