@headspace/protos-events 1.102.0 → 1.104.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 +247 -0
  2. package/lib/index.js +831 -61
  3. package/package.json +1 -1
package/lib/index.js CHANGED
@@ -3026,6 +3026,22 @@ $root.appleReceipt = (function() {
3026
3026
  return values;
3027
3027
  })();
3028
3028
 
3029
+ /**
3030
+ * IosSubscriptionAutoRenewalStatus enum.
3031
+ * @name appleReceipt.IosSubscriptionAutoRenewalStatus
3032
+ * @enum {string}
3033
+ * @property {number} UNKNOWN=0 UNKNOWN value
3034
+ * @property {number} ACTIVE=1 ACTIVE value
3035
+ * @property {number} CANCELLED=2 CANCELLED value
3036
+ */
3037
+ appleReceipt.IosSubscriptionAutoRenewalStatus = (function() {
3038
+ var valuesById = {}, values = Object.create(valuesById);
3039
+ values[valuesById[0] = "UNKNOWN"] = 0;
3040
+ values[valuesById[1] = "ACTIVE"] = 1;
3041
+ values[valuesById[2] = "CANCELLED"] = 2;
3042
+ return values;
3043
+ })();
3044
+
3029
3045
  return appleReceipt;
3030
3046
  })();
3031
3047
 
@@ -11796,6 +11812,7 @@ $root.IosSubscriptionCreated = (function() {
11796
11812
  * @property {number|Long|null} [startsAt] IosSubscriptionCreated startsAt
11797
11813
  * @property {string|null} [userId] IosSubscriptionCreated userId
11798
11814
  * @property {string|null} [productId] IosSubscriptionCreated productId
11815
+ * @property {appleReceipt.IosSubscriptionAutoRenewalStatus|null} [autoRenewalStatus] IosSubscriptionCreated autoRenewalStatus
11799
11816
  * @property {Array.<appleReceipt.IosSubscriptionTag>|null} [tags] IosSubscriptionCreated tags
11800
11817
  * @property {Array.<appleReceipt.IIosSubscriptionTerm>|null} [terms] IosSubscriptionCreated terms
11801
11818
  */
@@ -11857,6 +11874,14 @@ $root.IosSubscriptionCreated = (function() {
11857
11874
  */
11858
11875
  IosSubscriptionCreated.prototype.productId = "";
11859
11876
 
11877
+ /**
11878
+ * IosSubscriptionCreated autoRenewalStatus.
11879
+ * @member {appleReceipt.IosSubscriptionAutoRenewalStatus} autoRenewalStatus
11880
+ * @memberof IosSubscriptionCreated
11881
+ * @instance
11882
+ */
11883
+ IosSubscriptionCreated.prototype.autoRenewalStatus = 0;
11884
+
11860
11885
  /**
11861
11886
  * IosSubscriptionCreated tags.
11862
11887
  * @member {Array.<appleReceipt.IosSubscriptionTag>} tags
@@ -11916,6 +11941,8 @@ $root.IosSubscriptionCreated = (function() {
11916
11941
  $root.appleReceipt.IosSubscriptionTerm.encode(message.terms[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim();
11917
11942
  if (message.productId != null && message.hasOwnProperty("productId"))
11918
11943
  writer.uint32(/* id 7, wireType 2 =*/58).string(message.productId);
11944
+ if (message.autoRenewalStatus != null && message.hasOwnProperty("autoRenewalStatus"))
11945
+ writer.uint32(/* id 8, wireType 0 =*/64).int32(message.autoRenewalStatus);
11919
11946
  return writer;
11920
11947
  };
11921
11948
 
@@ -11965,6 +11992,9 @@ $root.IosSubscriptionCreated = (function() {
11965
11992
  case 7:
11966
11993
  message.productId = reader.string();
11967
11994
  break;
11995
+ case 8:
11996
+ message.autoRenewalStatus = reader.int32();
11997
+ break;
11968
11998
  case 5:
11969
11999
  if (!(message.tags && message.tags.length))
11970
12000
  message.tags = [];
@@ -12030,6 +12060,15 @@ $root.IosSubscriptionCreated = (function() {
12030
12060
  if (message.productId != null && message.hasOwnProperty("productId"))
12031
12061
  if (!$util.isString(message.productId))
12032
12062
  return "productId: string expected";
12063
+ if (message.autoRenewalStatus != null && message.hasOwnProperty("autoRenewalStatus"))
12064
+ switch (message.autoRenewalStatus) {
12065
+ default:
12066
+ return "autoRenewalStatus: enum value expected";
12067
+ case 0:
12068
+ case 1:
12069
+ case 2:
12070
+ break;
12071
+ }
12033
12072
  if (message.tags != null && message.hasOwnProperty("tags")) {
12034
12073
  if (!Array.isArray(message.tags))
12035
12074
  return "tags: array expected";
@@ -12090,6 +12129,20 @@ $root.IosSubscriptionCreated = (function() {
12090
12129
  message.userId = String(object.userId);
12091
12130
  if (object.productId != null)
12092
12131
  message.productId = String(object.productId);
12132
+ switch (object.autoRenewalStatus) {
12133
+ case "UNKNOWN":
12134
+ case 0:
12135
+ message.autoRenewalStatus = 0;
12136
+ break;
12137
+ case "ACTIVE":
12138
+ case 1:
12139
+ message.autoRenewalStatus = 1;
12140
+ break;
12141
+ case "CANCELLED":
12142
+ case 2:
12143
+ message.autoRenewalStatus = 2;
12144
+ break;
12145
+ }
12093
12146
  if (object.tags) {
12094
12147
  if (!Array.isArray(object.tags))
12095
12148
  throw TypeError(".IosSubscriptionCreated.tags: array expected");
@@ -12151,6 +12204,7 @@ $root.IosSubscriptionCreated = (function() {
12151
12204
  object.startsAt = options.longs === String ? "0" : 0;
12152
12205
  object.userId = "";
12153
12206
  object.productId = "";
12207
+ object.autoRenewalStatus = options.enums === String ? "UNKNOWN" : 0;
12154
12208
  }
12155
12209
  if (message.id != null && message.hasOwnProperty("id"))
12156
12210
  object.id = message.id;
@@ -12178,6 +12232,8 @@ $root.IosSubscriptionCreated = (function() {
12178
12232
  }
12179
12233
  if (message.productId != null && message.hasOwnProperty("productId"))
12180
12234
  object.productId = message.productId;
12235
+ if (message.autoRenewalStatus != null && message.hasOwnProperty("autoRenewalStatus"))
12236
+ object.autoRenewalStatus = options.enums === String ? $root.appleReceipt.IosSubscriptionAutoRenewalStatus[message.autoRenewalStatus] : message.autoRenewalStatus;
12181
12237
  return object;
12182
12238
  };
12183
12239
 
@@ -12206,6 +12262,7 @@ $root.IosSubscriptionRenewed = (function() {
12206
12262
  * @property {number|Long|null} [startsAt] IosSubscriptionRenewed startsAt
12207
12263
  * @property {string|null} [userId] IosSubscriptionRenewed userId
12208
12264
  * @property {string|null} [productId] IosSubscriptionRenewed productId
12265
+ * @property {appleReceipt.IosSubscriptionAutoRenewalStatus|null} [autoRenewalStatus] IosSubscriptionRenewed autoRenewalStatus
12209
12266
  * @property {Array.<appleReceipt.IosSubscriptionTag>|null} [tags] IosSubscriptionRenewed tags
12210
12267
  * @property {Array.<appleReceipt.IIosSubscriptionTerm>|null} [terms] IosSubscriptionRenewed terms
12211
12268
  */
@@ -12236,75 +12293,533 @@ $root.IosSubscriptionRenewed = (function() {
12236
12293
  IosSubscriptionRenewed.prototype.id = "";
12237
12294
 
12238
12295
  /**
12239
- * IosSubscriptionRenewed endsAt.
12296
+ * IosSubscriptionRenewed endsAt.
12297
+ * @member {number|Long} endsAt
12298
+ * @memberof IosSubscriptionRenewed
12299
+ * @instance
12300
+ */
12301
+ IosSubscriptionRenewed.prototype.endsAt = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
12302
+
12303
+ /**
12304
+ * IosSubscriptionRenewed startsAt.
12305
+ * @member {number|Long} startsAt
12306
+ * @memberof IosSubscriptionRenewed
12307
+ * @instance
12308
+ */
12309
+ IosSubscriptionRenewed.prototype.startsAt = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
12310
+
12311
+ /**
12312
+ * IosSubscriptionRenewed userId.
12313
+ * @member {string} userId
12314
+ * @memberof IosSubscriptionRenewed
12315
+ * @instance
12316
+ */
12317
+ IosSubscriptionRenewed.prototype.userId = "";
12318
+
12319
+ /**
12320
+ * IosSubscriptionRenewed productId.
12321
+ * @member {string} productId
12322
+ * @memberof IosSubscriptionRenewed
12323
+ * @instance
12324
+ */
12325
+ IosSubscriptionRenewed.prototype.productId = "";
12326
+
12327
+ /**
12328
+ * IosSubscriptionRenewed autoRenewalStatus.
12329
+ * @member {appleReceipt.IosSubscriptionAutoRenewalStatus} autoRenewalStatus
12330
+ * @memberof IosSubscriptionRenewed
12331
+ * @instance
12332
+ */
12333
+ IosSubscriptionRenewed.prototype.autoRenewalStatus = 0;
12334
+
12335
+ /**
12336
+ * IosSubscriptionRenewed tags.
12337
+ * @member {Array.<appleReceipt.IosSubscriptionTag>} tags
12338
+ * @memberof IosSubscriptionRenewed
12339
+ * @instance
12340
+ */
12341
+ IosSubscriptionRenewed.prototype.tags = $util.emptyArray;
12342
+
12343
+ /**
12344
+ * IosSubscriptionRenewed terms.
12345
+ * @member {Array.<appleReceipt.IIosSubscriptionTerm>} terms
12346
+ * @memberof IosSubscriptionRenewed
12347
+ * @instance
12348
+ */
12349
+ IosSubscriptionRenewed.prototype.terms = $util.emptyArray;
12350
+
12351
+ /**
12352
+ * Creates a new IosSubscriptionRenewed instance using the specified properties.
12353
+ * @function create
12354
+ * @memberof IosSubscriptionRenewed
12355
+ * @static
12356
+ * @param {IIosSubscriptionRenewed=} [properties] Properties to set
12357
+ * @returns {IosSubscriptionRenewed} IosSubscriptionRenewed instance
12358
+ */
12359
+ IosSubscriptionRenewed.create = function create(properties) {
12360
+ return new IosSubscriptionRenewed(properties);
12361
+ };
12362
+
12363
+ /**
12364
+ * Encodes the specified IosSubscriptionRenewed message. Does not implicitly {@link IosSubscriptionRenewed.verify|verify} messages.
12365
+ * @function encode
12366
+ * @memberof IosSubscriptionRenewed
12367
+ * @static
12368
+ * @param {IIosSubscriptionRenewed} message IosSubscriptionRenewed message or plain object to encode
12369
+ * @param {$protobuf.Writer} [writer] Writer to encode to
12370
+ * @returns {$protobuf.Writer} Writer
12371
+ */
12372
+ IosSubscriptionRenewed.encode = function encode(message, writer) {
12373
+ if (!writer)
12374
+ writer = $Writer.create();
12375
+ if (message.id != null && message.hasOwnProperty("id"))
12376
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.id);
12377
+ if (message.endsAt != null && message.hasOwnProperty("endsAt"))
12378
+ writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.endsAt);
12379
+ if (message.startsAt != null && message.hasOwnProperty("startsAt"))
12380
+ writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.startsAt);
12381
+ if (message.userId != null && message.hasOwnProperty("userId"))
12382
+ writer.uint32(/* id 4, wireType 2 =*/34).string(message.userId);
12383
+ if (message.tags != null && message.tags.length) {
12384
+ writer.uint32(/* id 5, wireType 2 =*/42).fork();
12385
+ for (var i = 0; i < message.tags.length; ++i)
12386
+ writer.int32(message.tags[i]);
12387
+ writer.ldelim();
12388
+ }
12389
+ if (message.terms != null && message.terms.length)
12390
+ for (var i = 0; i < message.terms.length; ++i)
12391
+ $root.appleReceipt.IosSubscriptionTerm.encode(message.terms[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim();
12392
+ if (message.productId != null && message.hasOwnProperty("productId"))
12393
+ writer.uint32(/* id 7, wireType 2 =*/58).string(message.productId);
12394
+ if (message.autoRenewalStatus != null && message.hasOwnProperty("autoRenewalStatus"))
12395
+ writer.uint32(/* id 8, wireType 0 =*/64).int32(message.autoRenewalStatus);
12396
+ return writer;
12397
+ };
12398
+
12399
+ /**
12400
+ * Encodes the specified IosSubscriptionRenewed message, length delimited. Does not implicitly {@link IosSubscriptionRenewed.verify|verify} messages.
12401
+ * @function encodeDelimited
12402
+ * @memberof IosSubscriptionRenewed
12403
+ * @static
12404
+ * @param {IIosSubscriptionRenewed} message IosSubscriptionRenewed message or plain object to encode
12405
+ * @param {$protobuf.Writer} [writer] Writer to encode to
12406
+ * @returns {$protobuf.Writer} Writer
12407
+ */
12408
+ IosSubscriptionRenewed.encodeDelimited = function encodeDelimited(message, writer) {
12409
+ return this.encode(message, writer).ldelim();
12410
+ };
12411
+
12412
+ /**
12413
+ * Decodes an IosSubscriptionRenewed message from the specified reader or buffer.
12414
+ * @function decode
12415
+ * @memberof IosSubscriptionRenewed
12416
+ * @static
12417
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
12418
+ * @param {number} [length] Message length if known beforehand
12419
+ * @returns {IosSubscriptionRenewed} IosSubscriptionRenewed
12420
+ * @throws {Error} If the payload is not a reader or valid buffer
12421
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
12422
+ */
12423
+ IosSubscriptionRenewed.decode = function decode(reader, length) {
12424
+ if (!(reader instanceof $Reader))
12425
+ reader = $Reader.create(reader);
12426
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.IosSubscriptionRenewed();
12427
+ while (reader.pos < end) {
12428
+ var tag = reader.uint32();
12429
+ switch (tag >>> 3) {
12430
+ case 1:
12431
+ message.id = reader.string();
12432
+ break;
12433
+ case 2:
12434
+ message.endsAt = reader.uint64();
12435
+ break;
12436
+ case 3:
12437
+ message.startsAt = reader.uint64();
12438
+ break;
12439
+ case 4:
12440
+ message.userId = reader.string();
12441
+ break;
12442
+ case 7:
12443
+ message.productId = reader.string();
12444
+ break;
12445
+ case 8:
12446
+ message.autoRenewalStatus = reader.int32();
12447
+ break;
12448
+ case 5:
12449
+ if (!(message.tags && message.tags.length))
12450
+ message.tags = [];
12451
+ if ((tag & 7) === 2) {
12452
+ var end2 = reader.uint32() + reader.pos;
12453
+ while (reader.pos < end2)
12454
+ message.tags.push(reader.int32());
12455
+ } else
12456
+ message.tags.push(reader.int32());
12457
+ break;
12458
+ case 6:
12459
+ if (!(message.terms && message.terms.length))
12460
+ message.terms = [];
12461
+ message.terms.push($root.appleReceipt.IosSubscriptionTerm.decode(reader, reader.uint32()));
12462
+ break;
12463
+ default:
12464
+ reader.skipType(tag & 7);
12465
+ break;
12466
+ }
12467
+ }
12468
+ return message;
12469
+ };
12470
+
12471
+ /**
12472
+ * Decodes an IosSubscriptionRenewed message from the specified reader or buffer, length delimited.
12473
+ * @function decodeDelimited
12474
+ * @memberof IosSubscriptionRenewed
12475
+ * @static
12476
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
12477
+ * @returns {IosSubscriptionRenewed} IosSubscriptionRenewed
12478
+ * @throws {Error} If the payload is not a reader or valid buffer
12479
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
12480
+ */
12481
+ IosSubscriptionRenewed.decodeDelimited = function decodeDelimited(reader) {
12482
+ if (!(reader instanceof $Reader))
12483
+ reader = new $Reader(reader);
12484
+ return this.decode(reader, reader.uint32());
12485
+ };
12486
+
12487
+ /**
12488
+ * Verifies an IosSubscriptionRenewed message.
12489
+ * @function verify
12490
+ * @memberof IosSubscriptionRenewed
12491
+ * @static
12492
+ * @param {Object.<string,*>} message Plain object to verify
12493
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
12494
+ */
12495
+ IosSubscriptionRenewed.verify = function verify(message) {
12496
+ if (typeof message !== "object" || message === null)
12497
+ return "object expected";
12498
+ if (message.id != null && message.hasOwnProperty("id"))
12499
+ if (!$util.isString(message.id))
12500
+ return "id: string expected";
12501
+ if (message.endsAt != null && message.hasOwnProperty("endsAt"))
12502
+ if (!$util.isInteger(message.endsAt) && !(message.endsAt && $util.isInteger(message.endsAt.low) && $util.isInteger(message.endsAt.high)))
12503
+ return "endsAt: integer|Long expected";
12504
+ if (message.startsAt != null && message.hasOwnProperty("startsAt"))
12505
+ if (!$util.isInteger(message.startsAt) && !(message.startsAt && $util.isInteger(message.startsAt.low) && $util.isInteger(message.startsAt.high)))
12506
+ return "startsAt: integer|Long expected";
12507
+ if (message.userId != null && message.hasOwnProperty("userId"))
12508
+ if (!$util.isString(message.userId))
12509
+ return "userId: string expected";
12510
+ if (message.productId != null && message.hasOwnProperty("productId"))
12511
+ if (!$util.isString(message.productId))
12512
+ return "productId: string expected";
12513
+ if (message.autoRenewalStatus != null && message.hasOwnProperty("autoRenewalStatus"))
12514
+ switch (message.autoRenewalStatus) {
12515
+ default:
12516
+ return "autoRenewalStatus: enum value expected";
12517
+ case 0:
12518
+ case 1:
12519
+ case 2:
12520
+ break;
12521
+ }
12522
+ if (message.tags != null && message.hasOwnProperty("tags")) {
12523
+ if (!Array.isArray(message.tags))
12524
+ return "tags: array expected";
12525
+ for (var i = 0; i < message.tags.length; ++i)
12526
+ switch (message.tags[i]) {
12527
+ default:
12528
+ return "tags: enum value[] expected";
12529
+ case 0:
12530
+ case 1:
12531
+ break;
12532
+ }
12533
+ }
12534
+ if (message.terms != null && message.hasOwnProperty("terms")) {
12535
+ if (!Array.isArray(message.terms))
12536
+ return "terms: array expected";
12537
+ for (var i = 0; i < message.terms.length; ++i) {
12538
+ var error = $root.appleReceipt.IosSubscriptionTerm.verify(message.terms[i]);
12539
+ if (error)
12540
+ return "terms." + error;
12541
+ }
12542
+ }
12543
+ return null;
12544
+ };
12545
+
12546
+ /**
12547
+ * Creates an IosSubscriptionRenewed message from a plain object. Also converts values to their respective internal types.
12548
+ * @function fromObject
12549
+ * @memberof IosSubscriptionRenewed
12550
+ * @static
12551
+ * @param {Object.<string,*>} object Plain object
12552
+ * @returns {IosSubscriptionRenewed} IosSubscriptionRenewed
12553
+ */
12554
+ IosSubscriptionRenewed.fromObject = function fromObject(object) {
12555
+ if (object instanceof $root.IosSubscriptionRenewed)
12556
+ return object;
12557
+ var message = new $root.IosSubscriptionRenewed();
12558
+ if (object.id != null)
12559
+ message.id = String(object.id);
12560
+ if (object.endsAt != null)
12561
+ if ($util.Long)
12562
+ (message.endsAt = $util.Long.fromValue(object.endsAt)).unsigned = true;
12563
+ else if (typeof object.endsAt === "string")
12564
+ message.endsAt = parseInt(object.endsAt, 10);
12565
+ else if (typeof object.endsAt === "number")
12566
+ message.endsAt = object.endsAt;
12567
+ else if (typeof object.endsAt === "object")
12568
+ message.endsAt = new $util.LongBits(object.endsAt.low >>> 0, object.endsAt.high >>> 0).toNumber(true);
12569
+ if (object.startsAt != null)
12570
+ if ($util.Long)
12571
+ (message.startsAt = $util.Long.fromValue(object.startsAt)).unsigned = true;
12572
+ else if (typeof object.startsAt === "string")
12573
+ message.startsAt = parseInt(object.startsAt, 10);
12574
+ else if (typeof object.startsAt === "number")
12575
+ message.startsAt = object.startsAt;
12576
+ else if (typeof object.startsAt === "object")
12577
+ message.startsAt = new $util.LongBits(object.startsAt.low >>> 0, object.startsAt.high >>> 0).toNumber(true);
12578
+ if (object.userId != null)
12579
+ message.userId = String(object.userId);
12580
+ if (object.productId != null)
12581
+ message.productId = String(object.productId);
12582
+ switch (object.autoRenewalStatus) {
12583
+ case "UNKNOWN":
12584
+ case 0:
12585
+ message.autoRenewalStatus = 0;
12586
+ break;
12587
+ case "ACTIVE":
12588
+ case 1:
12589
+ message.autoRenewalStatus = 1;
12590
+ break;
12591
+ case "CANCELLED":
12592
+ case 2:
12593
+ message.autoRenewalStatus = 2;
12594
+ break;
12595
+ }
12596
+ if (object.tags) {
12597
+ if (!Array.isArray(object.tags))
12598
+ throw TypeError(".IosSubscriptionRenewed.tags: array expected");
12599
+ message.tags = [];
12600
+ for (var i = 0; i < object.tags.length; ++i)
12601
+ switch (object.tags[i]) {
12602
+ default:
12603
+ case "IOSTAG_UNKNOWN":
12604
+ case 0:
12605
+ message.tags[i] = 0;
12606
+ break;
12607
+ case "IOSTAG_FREE_TRIAL":
12608
+ case 1:
12609
+ message.tags[i] = 1;
12610
+ break;
12611
+ }
12612
+ }
12613
+ if (object.terms) {
12614
+ if (!Array.isArray(object.terms))
12615
+ throw TypeError(".IosSubscriptionRenewed.terms: array expected");
12616
+ message.terms = [];
12617
+ for (var i = 0; i < object.terms.length; ++i) {
12618
+ if (typeof object.terms[i] !== "object")
12619
+ throw TypeError(".IosSubscriptionRenewed.terms: object expected");
12620
+ message.terms[i] = $root.appleReceipt.IosSubscriptionTerm.fromObject(object.terms[i]);
12621
+ }
12622
+ }
12623
+ return message;
12624
+ };
12625
+
12626
+ /**
12627
+ * Creates a plain object from an IosSubscriptionRenewed message. Also converts values to other types if specified.
12628
+ * @function toObject
12629
+ * @memberof IosSubscriptionRenewed
12630
+ * @static
12631
+ * @param {IosSubscriptionRenewed} message IosSubscriptionRenewed
12632
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
12633
+ * @returns {Object.<string,*>} Plain object
12634
+ */
12635
+ IosSubscriptionRenewed.toObject = function toObject(message, options) {
12636
+ if (!options)
12637
+ options = {};
12638
+ var object = {};
12639
+ if (options.arrays || options.defaults) {
12640
+ object.tags = [];
12641
+ object.terms = [];
12642
+ }
12643
+ if (options.defaults) {
12644
+ object.id = "";
12645
+ if ($util.Long) {
12646
+ var long = new $util.Long(0, 0, true);
12647
+ object.endsAt = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
12648
+ } else
12649
+ object.endsAt = options.longs === String ? "0" : 0;
12650
+ if ($util.Long) {
12651
+ var long = new $util.Long(0, 0, true);
12652
+ object.startsAt = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
12653
+ } else
12654
+ object.startsAt = options.longs === String ? "0" : 0;
12655
+ object.userId = "";
12656
+ object.productId = "";
12657
+ object.autoRenewalStatus = options.enums === String ? "UNKNOWN" : 0;
12658
+ }
12659
+ if (message.id != null && message.hasOwnProperty("id"))
12660
+ object.id = message.id;
12661
+ if (message.endsAt != null && message.hasOwnProperty("endsAt"))
12662
+ if (typeof message.endsAt === "number")
12663
+ object.endsAt = options.longs === String ? String(message.endsAt) : message.endsAt;
12664
+ else
12665
+ 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;
12666
+ if (message.startsAt != null && message.hasOwnProperty("startsAt"))
12667
+ if (typeof message.startsAt === "number")
12668
+ object.startsAt = options.longs === String ? String(message.startsAt) : message.startsAt;
12669
+ else
12670
+ 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;
12671
+ if (message.userId != null && message.hasOwnProperty("userId"))
12672
+ object.userId = message.userId;
12673
+ if (message.tags && message.tags.length) {
12674
+ object.tags = [];
12675
+ for (var j = 0; j < message.tags.length; ++j)
12676
+ object.tags[j] = options.enums === String ? $root.appleReceipt.IosSubscriptionTag[message.tags[j]] : message.tags[j];
12677
+ }
12678
+ if (message.terms && message.terms.length) {
12679
+ object.terms = [];
12680
+ for (var j = 0; j < message.terms.length; ++j)
12681
+ object.terms[j] = $root.appleReceipt.IosSubscriptionTerm.toObject(message.terms[j], options);
12682
+ }
12683
+ if (message.productId != null && message.hasOwnProperty("productId"))
12684
+ object.productId = message.productId;
12685
+ if (message.autoRenewalStatus != null && message.hasOwnProperty("autoRenewalStatus"))
12686
+ object.autoRenewalStatus = options.enums === String ? $root.appleReceipt.IosSubscriptionAutoRenewalStatus[message.autoRenewalStatus] : message.autoRenewalStatus;
12687
+ return object;
12688
+ };
12689
+
12690
+ /**
12691
+ * Converts this IosSubscriptionRenewed to JSON.
12692
+ * @function toJSON
12693
+ * @memberof IosSubscriptionRenewed
12694
+ * @instance
12695
+ * @returns {Object.<string,*>} JSON object
12696
+ */
12697
+ IosSubscriptionRenewed.prototype.toJSON = function toJSON() {
12698
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
12699
+ };
12700
+
12701
+ return IosSubscriptionRenewed;
12702
+ })();
12703
+
12704
+ $root.IosSubscriptionAutoRenewalUpdated = (function() {
12705
+
12706
+ /**
12707
+ * Properties of an IosSubscriptionAutoRenewalUpdated.
12708
+ * @exports IIosSubscriptionAutoRenewalUpdated
12709
+ * @interface IIosSubscriptionAutoRenewalUpdated
12710
+ * @property {string|null} [id] IosSubscriptionAutoRenewalUpdated id
12711
+ * @property {number|Long|null} [endsAt] IosSubscriptionAutoRenewalUpdated endsAt
12712
+ * @property {number|Long|null} [startsAt] IosSubscriptionAutoRenewalUpdated startsAt
12713
+ * @property {string|null} [userId] IosSubscriptionAutoRenewalUpdated userId
12714
+ * @property {string|null} [productId] IosSubscriptionAutoRenewalUpdated productId
12715
+ * @property {appleReceipt.IosSubscriptionAutoRenewalStatus|null} [autoRenewalStatus] IosSubscriptionAutoRenewalUpdated autoRenewalStatus
12716
+ * @property {Array.<appleReceipt.IosSubscriptionTag>|null} [tags] IosSubscriptionAutoRenewalUpdated tags
12717
+ * @property {Array.<appleReceipt.IIosSubscriptionTerm>|null} [terms] IosSubscriptionAutoRenewalUpdated terms
12718
+ */
12719
+
12720
+ /**
12721
+ * Constructs a new IosSubscriptionAutoRenewalUpdated.
12722
+ * @exports IosSubscriptionAutoRenewalUpdated
12723
+ * @classdesc Represents an IosSubscriptionAutoRenewalUpdated.
12724
+ * @implements IIosSubscriptionAutoRenewalUpdated
12725
+ * @constructor
12726
+ * @param {IIosSubscriptionAutoRenewalUpdated=} [properties] Properties to set
12727
+ */
12728
+ function IosSubscriptionAutoRenewalUpdated(properties) {
12729
+ this.tags = [];
12730
+ this.terms = [];
12731
+ if (properties)
12732
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
12733
+ if (properties[keys[i]] != null)
12734
+ this[keys[i]] = properties[keys[i]];
12735
+ }
12736
+
12737
+ /**
12738
+ * IosSubscriptionAutoRenewalUpdated id.
12739
+ * @member {string} id
12740
+ * @memberof IosSubscriptionAutoRenewalUpdated
12741
+ * @instance
12742
+ */
12743
+ IosSubscriptionAutoRenewalUpdated.prototype.id = "";
12744
+
12745
+ /**
12746
+ * IosSubscriptionAutoRenewalUpdated endsAt.
12240
12747
  * @member {number|Long} endsAt
12241
- * @memberof IosSubscriptionRenewed
12748
+ * @memberof IosSubscriptionAutoRenewalUpdated
12242
12749
  * @instance
12243
12750
  */
12244
- IosSubscriptionRenewed.prototype.endsAt = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
12751
+ IosSubscriptionAutoRenewalUpdated.prototype.endsAt = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
12245
12752
 
12246
12753
  /**
12247
- * IosSubscriptionRenewed startsAt.
12754
+ * IosSubscriptionAutoRenewalUpdated startsAt.
12248
12755
  * @member {number|Long} startsAt
12249
- * @memberof IosSubscriptionRenewed
12756
+ * @memberof IosSubscriptionAutoRenewalUpdated
12250
12757
  * @instance
12251
12758
  */
12252
- IosSubscriptionRenewed.prototype.startsAt = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
12759
+ IosSubscriptionAutoRenewalUpdated.prototype.startsAt = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
12253
12760
 
12254
12761
  /**
12255
- * IosSubscriptionRenewed userId.
12762
+ * IosSubscriptionAutoRenewalUpdated userId.
12256
12763
  * @member {string} userId
12257
- * @memberof IosSubscriptionRenewed
12764
+ * @memberof IosSubscriptionAutoRenewalUpdated
12258
12765
  * @instance
12259
12766
  */
12260
- IosSubscriptionRenewed.prototype.userId = "";
12767
+ IosSubscriptionAutoRenewalUpdated.prototype.userId = "";
12261
12768
 
12262
12769
  /**
12263
- * IosSubscriptionRenewed productId.
12770
+ * IosSubscriptionAutoRenewalUpdated productId.
12264
12771
  * @member {string} productId
12265
- * @memberof IosSubscriptionRenewed
12772
+ * @memberof IosSubscriptionAutoRenewalUpdated
12266
12773
  * @instance
12267
12774
  */
12268
- IosSubscriptionRenewed.prototype.productId = "";
12775
+ IosSubscriptionAutoRenewalUpdated.prototype.productId = "";
12269
12776
 
12270
12777
  /**
12271
- * IosSubscriptionRenewed tags.
12778
+ * IosSubscriptionAutoRenewalUpdated autoRenewalStatus.
12779
+ * @member {appleReceipt.IosSubscriptionAutoRenewalStatus} autoRenewalStatus
12780
+ * @memberof IosSubscriptionAutoRenewalUpdated
12781
+ * @instance
12782
+ */
12783
+ IosSubscriptionAutoRenewalUpdated.prototype.autoRenewalStatus = 0;
12784
+
12785
+ /**
12786
+ * IosSubscriptionAutoRenewalUpdated tags.
12272
12787
  * @member {Array.<appleReceipt.IosSubscriptionTag>} tags
12273
- * @memberof IosSubscriptionRenewed
12788
+ * @memberof IosSubscriptionAutoRenewalUpdated
12274
12789
  * @instance
12275
12790
  */
12276
- IosSubscriptionRenewed.prototype.tags = $util.emptyArray;
12791
+ IosSubscriptionAutoRenewalUpdated.prototype.tags = $util.emptyArray;
12277
12792
 
12278
12793
  /**
12279
- * IosSubscriptionRenewed terms.
12794
+ * IosSubscriptionAutoRenewalUpdated terms.
12280
12795
  * @member {Array.<appleReceipt.IIosSubscriptionTerm>} terms
12281
- * @memberof IosSubscriptionRenewed
12796
+ * @memberof IosSubscriptionAutoRenewalUpdated
12282
12797
  * @instance
12283
12798
  */
12284
- IosSubscriptionRenewed.prototype.terms = $util.emptyArray;
12799
+ IosSubscriptionAutoRenewalUpdated.prototype.terms = $util.emptyArray;
12285
12800
 
12286
12801
  /**
12287
- * Creates a new IosSubscriptionRenewed instance using the specified properties.
12802
+ * Creates a new IosSubscriptionAutoRenewalUpdated instance using the specified properties.
12288
12803
  * @function create
12289
- * @memberof IosSubscriptionRenewed
12804
+ * @memberof IosSubscriptionAutoRenewalUpdated
12290
12805
  * @static
12291
- * @param {IIosSubscriptionRenewed=} [properties] Properties to set
12292
- * @returns {IosSubscriptionRenewed} IosSubscriptionRenewed instance
12806
+ * @param {IIosSubscriptionAutoRenewalUpdated=} [properties] Properties to set
12807
+ * @returns {IosSubscriptionAutoRenewalUpdated} IosSubscriptionAutoRenewalUpdated instance
12293
12808
  */
12294
- IosSubscriptionRenewed.create = function create(properties) {
12295
- return new IosSubscriptionRenewed(properties);
12809
+ IosSubscriptionAutoRenewalUpdated.create = function create(properties) {
12810
+ return new IosSubscriptionAutoRenewalUpdated(properties);
12296
12811
  };
12297
12812
 
12298
12813
  /**
12299
- * Encodes the specified IosSubscriptionRenewed message. Does not implicitly {@link IosSubscriptionRenewed.verify|verify} messages.
12814
+ * Encodes the specified IosSubscriptionAutoRenewalUpdated message. Does not implicitly {@link IosSubscriptionAutoRenewalUpdated.verify|verify} messages.
12300
12815
  * @function encode
12301
- * @memberof IosSubscriptionRenewed
12816
+ * @memberof IosSubscriptionAutoRenewalUpdated
12302
12817
  * @static
12303
- * @param {IIosSubscriptionRenewed} message IosSubscriptionRenewed message or plain object to encode
12818
+ * @param {IIosSubscriptionAutoRenewalUpdated} message IosSubscriptionAutoRenewalUpdated message or plain object to encode
12304
12819
  * @param {$protobuf.Writer} [writer] Writer to encode to
12305
12820
  * @returns {$protobuf.Writer} Writer
12306
12821
  */
12307
- IosSubscriptionRenewed.encode = function encode(message, writer) {
12822
+ IosSubscriptionAutoRenewalUpdated.encode = function encode(message, writer) {
12308
12823
  if (!writer)
12309
12824
  writer = $Writer.create();
12310
12825
  if (message.id != null && message.hasOwnProperty("id"))
@@ -12326,37 +12841,39 @@ $root.IosSubscriptionRenewed = (function() {
12326
12841
  $root.appleReceipt.IosSubscriptionTerm.encode(message.terms[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim();
12327
12842
  if (message.productId != null && message.hasOwnProperty("productId"))
12328
12843
  writer.uint32(/* id 7, wireType 2 =*/58).string(message.productId);
12844
+ if (message.autoRenewalStatus != null && message.hasOwnProperty("autoRenewalStatus"))
12845
+ writer.uint32(/* id 8, wireType 0 =*/64).int32(message.autoRenewalStatus);
12329
12846
  return writer;
12330
12847
  };
12331
12848
 
12332
12849
  /**
12333
- * Encodes the specified IosSubscriptionRenewed message, length delimited. Does not implicitly {@link IosSubscriptionRenewed.verify|verify} messages.
12850
+ * Encodes the specified IosSubscriptionAutoRenewalUpdated message, length delimited. Does not implicitly {@link IosSubscriptionAutoRenewalUpdated.verify|verify} messages.
12334
12851
  * @function encodeDelimited
12335
- * @memberof IosSubscriptionRenewed
12852
+ * @memberof IosSubscriptionAutoRenewalUpdated
12336
12853
  * @static
12337
- * @param {IIosSubscriptionRenewed} message IosSubscriptionRenewed message or plain object to encode
12854
+ * @param {IIosSubscriptionAutoRenewalUpdated} message IosSubscriptionAutoRenewalUpdated message or plain object to encode
12338
12855
  * @param {$protobuf.Writer} [writer] Writer to encode to
12339
12856
  * @returns {$protobuf.Writer} Writer
12340
12857
  */
12341
- IosSubscriptionRenewed.encodeDelimited = function encodeDelimited(message, writer) {
12858
+ IosSubscriptionAutoRenewalUpdated.encodeDelimited = function encodeDelimited(message, writer) {
12342
12859
  return this.encode(message, writer).ldelim();
12343
12860
  };
12344
12861
 
12345
12862
  /**
12346
- * Decodes an IosSubscriptionRenewed message from the specified reader or buffer.
12863
+ * Decodes an IosSubscriptionAutoRenewalUpdated message from the specified reader or buffer.
12347
12864
  * @function decode
12348
- * @memberof IosSubscriptionRenewed
12865
+ * @memberof IosSubscriptionAutoRenewalUpdated
12349
12866
  * @static
12350
12867
  * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
12351
12868
  * @param {number} [length] Message length if known beforehand
12352
- * @returns {IosSubscriptionRenewed} IosSubscriptionRenewed
12869
+ * @returns {IosSubscriptionAutoRenewalUpdated} IosSubscriptionAutoRenewalUpdated
12353
12870
  * @throws {Error} If the payload is not a reader or valid buffer
12354
12871
  * @throws {$protobuf.util.ProtocolError} If required fields are missing
12355
12872
  */
12356
- IosSubscriptionRenewed.decode = function decode(reader, length) {
12873
+ IosSubscriptionAutoRenewalUpdated.decode = function decode(reader, length) {
12357
12874
  if (!(reader instanceof $Reader))
12358
12875
  reader = $Reader.create(reader);
12359
- var end = length === undefined ? reader.len : reader.pos + length, message = new $root.IosSubscriptionRenewed();
12876
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.IosSubscriptionAutoRenewalUpdated();
12360
12877
  while (reader.pos < end) {
12361
12878
  var tag = reader.uint32();
12362
12879
  switch (tag >>> 3) {
@@ -12375,6 +12892,9 @@ $root.IosSubscriptionRenewed = (function() {
12375
12892
  case 7:
12376
12893
  message.productId = reader.string();
12377
12894
  break;
12895
+ case 8:
12896
+ message.autoRenewalStatus = reader.int32();
12897
+ break;
12378
12898
  case 5:
12379
12899
  if (!(message.tags && message.tags.length))
12380
12900
  message.tags = [];
@@ -12399,30 +12919,30 @@ $root.IosSubscriptionRenewed = (function() {
12399
12919
  };
12400
12920
 
12401
12921
  /**
12402
- * Decodes an IosSubscriptionRenewed message from the specified reader or buffer, length delimited.
12922
+ * Decodes an IosSubscriptionAutoRenewalUpdated message from the specified reader or buffer, length delimited.
12403
12923
  * @function decodeDelimited
12404
- * @memberof IosSubscriptionRenewed
12924
+ * @memberof IosSubscriptionAutoRenewalUpdated
12405
12925
  * @static
12406
12926
  * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
12407
- * @returns {IosSubscriptionRenewed} IosSubscriptionRenewed
12927
+ * @returns {IosSubscriptionAutoRenewalUpdated} IosSubscriptionAutoRenewalUpdated
12408
12928
  * @throws {Error} If the payload is not a reader or valid buffer
12409
12929
  * @throws {$protobuf.util.ProtocolError} If required fields are missing
12410
12930
  */
12411
- IosSubscriptionRenewed.decodeDelimited = function decodeDelimited(reader) {
12931
+ IosSubscriptionAutoRenewalUpdated.decodeDelimited = function decodeDelimited(reader) {
12412
12932
  if (!(reader instanceof $Reader))
12413
12933
  reader = new $Reader(reader);
12414
12934
  return this.decode(reader, reader.uint32());
12415
12935
  };
12416
12936
 
12417
12937
  /**
12418
- * Verifies an IosSubscriptionRenewed message.
12938
+ * Verifies an IosSubscriptionAutoRenewalUpdated message.
12419
12939
  * @function verify
12420
- * @memberof IosSubscriptionRenewed
12940
+ * @memberof IosSubscriptionAutoRenewalUpdated
12421
12941
  * @static
12422
12942
  * @param {Object.<string,*>} message Plain object to verify
12423
12943
  * @returns {string|null} `null` if valid, otherwise the reason why it is not
12424
12944
  */
12425
- IosSubscriptionRenewed.verify = function verify(message) {
12945
+ IosSubscriptionAutoRenewalUpdated.verify = function verify(message) {
12426
12946
  if (typeof message !== "object" || message === null)
12427
12947
  return "object expected";
12428
12948
  if (message.id != null && message.hasOwnProperty("id"))
@@ -12440,6 +12960,15 @@ $root.IosSubscriptionRenewed = (function() {
12440
12960
  if (message.productId != null && message.hasOwnProperty("productId"))
12441
12961
  if (!$util.isString(message.productId))
12442
12962
  return "productId: string expected";
12963
+ if (message.autoRenewalStatus != null && message.hasOwnProperty("autoRenewalStatus"))
12964
+ switch (message.autoRenewalStatus) {
12965
+ default:
12966
+ return "autoRenewalStatus: enum value expected";
12967
+ case 0:
12968
+ case 1:
12969
+ case 2:
12970
+ break;
12971
+ }
12443
12972
  if (message.tags != null && message.hasOwnProperty("tags")) {
12444
12973
  if (!Array.isArray(message.tags))
12445
12974
  return "tags: array expected";
@@ -12465,17 +12994,17 @@ $root.IosSubscriptionRenewed = (function() {
12465
12994
  };
12466
12995
 
12467
12996
  /**
12468
- * Creates an IosSubscriptionRenewed message from a plain object. Also converts values to their respective internal types.
12997
+ * Creates an IosSubscriptionAutoRenewalUpdated message from a plain object. Also converts values to their respective internal types.
12469
12998
  * @function fromObject
12470
- * @memberof IosSubscriptionRenewed
12999
+ * @memberof IosSubscriptionAutoRenewalUpdated
12471
13000
  * @static
12472
13001
  * @param {Object.<string,*>} object Plain object
12473
- * @returns {IosSubscriptionRenewed} IosSubscriptionRenewed
13002
+ * @returns {IosSubscriptionAutoRenewalUpdated} IosSubscriptionAutoRenewalUpdated
12474
13003
  */
12475
- IosSubscriptionRenewed.fromObject = function fromObject(object) {
12476
- if (object instanceof $root.IosSubscriptionRenewed)
13004
+ IosSubscriptionAutoRenewalUpdated.fromObject = function fromObject(object) {
13005
+ if (object instanceof $root.IosSubscriptionAutoRenewalUpdated)
12477
13006
  return object;
12478
- var message = new $root.IosSubscriptionRenewed();
13007
+ var message = new $root.IosSubscriptionAutoRenewalUpdated();
12479
13008
  if (object.id != null)
12480
13009
  message.id = String(object.id);
12481
13010
  if (object.endsAt != null)
@@ -12500,9 +13029,23 @@ $root.IosSubscriptionRenewed = (function() {
12500
13029
  message.userId = String(object.userId);
12501
13030
  if (object.productId != null)
12502
13031
  message.productId = String(object.productId);
13032
+ switch (object.autoRenewalStatus) {
13033
+ case "UNKNOWN":
13034
+ case 0:
13035
+ message.autoRenewalStatus = 0;
13036
+ break;
13037
+ case "ACTIVE":
13038
+ case 1:
13039
+ message.autoRenewalStatus = 1;
13040
+ break;
13041
+ case "CANCELLED":
13042
+ case 2:
13043
+ message.autoRenewalStatus = 2;
13044
+ break;
13045
+ }
12503
13046
  if (object.tags) {
12504
13047
  if (!Array.isArray(object.tags))
12505
- throw TypeError(".IosSubscriptionRenewed.tags: array expected");
13048
+ throw TypeError(".IosSubscriptionAutoRenewalUpdated.tags: array expected");
12506
13049
  message.tags = [];
12507
13050
  for (var i = 0; i < object.tags.length; ++i)
12508
13051
  switch (object.tags[i]) {
@@ -12519,11 +13062,11 @@ $root.IosSubscriptionRenewed = (function() {
12519
13062
  }
12520
13063
  if (object.terms) {
12521
13064
  if (!Array.isArray(object.terms))
12522
- throw TypeError(".IosSubscriptionRenewed.terms: array expected");
13065
+ throw TypeError(".IosSubscriptionAutoRenewalUpdated.terms: array expected");
12523
13066
  message.terms = [];
12524
13067
  for (var i = 0; i < object.terms.length; ++i) {
12525
13068
  if (typeof object.terms[i] !== "object")
12526
- throw TypeError(".IosSubscriptionRenewed.terms: object expected");
13069
+ throw TypeError(".IosSubscriptionAutoRenewalUpdated.terms: object expected");
12527
13070
  message.terms[i] = $root.appleReceipt.IosSubscriptionTerm.fromObject(object.terms[i]);
12528
13071
  }
12529
13072
  }
@@ -12531,15 +13074,15 @@ $root.IosSubscriptionRenewed = (function() {
12531
13074
  };
12532
13075
 
12533
13076
  /**
12534
- * Creates a plain object from an IosSubscriptionRenewed message. Also converts values to other types if specified.
13077
+ * Creates a plain object from an IosSubscriptionAutoRenewalUpdated message. Also converts values to other types if specified.
12535
13078
  * @function toObject
12536
- * @memberof IosSubscriptionRenewed
13079
+ * @memberof IosSubscriptionAutoRenewalUpdated
12537
13080
  * @static
12538
- * @param {IosSubscriptionRenewed} message IosSubscriptionRenewed
13081
+ * @param {IosSubscriptionAutoRenewalUpdated} message IosSubscriptionAutoRenewalUpdated
12539
13082
  * @param {$protobuf.IConversionOptions} [options] Conversion options
12540
13083
  * @returns {Object.<string,*>} Plain object
12541
13084
  */
12542
- IosSubscriptionRenewed.toObject = function toObject(message, options) {
13085
+ IosSubscriptionAutoRenewalUpdated.toObject = function toObject(message, options) {
12543
13086
  if (!options)
12544
13087
  options = {};
12545
13088
  var object = {};
@@ -12561,6 +13104,7 @@ $root.IosSubscriptionRenewed = (function() {
12561
13104
  object.startsAt = options.longs === String ? "0" : 0;
12562
13105
  object.userId = "";
12563
13106
  object.productId = "";
13107
+ object.autoRenewalStatus = options.enums === String ? "UNKNOWN" : 0;
12564
13108
  }
12565
13109
  if (message.id != null && message.hasOwnProperty("id"))
12566
13110
  object.id = message.id;
@@ -12588,21 +13132,23 @@ $root.IosSubscriptionRenewed = (function() {
12588
13132
  }
12589
13133
  if (message.productId != null && message.hasOwnProperty("productId"))
12590
13134
  object.productId = message.productId;
13135
+ if (message.autoRenewalStatus != null && message.hasOwnProperty("autoRenewalStatus"))
13136
+ object.autoRenewalStatus = options.enums === String ? $root.appleReceipt.IosSubscriptionAutoRenewalStatus[message.autoRenewalStatus] : message.autoRenewalStatus;
12591
13137
  return object;
12592
13138
  };
12593
13139
 
12594
13140
  /**
12595
- * Converts this IosSubscriptionRenewed to JSON.
13141
+ * Converts this IosSubscriptionAutoRenewalUpdated to JSON.
12596
13142
  * @function toJSON
12597
- * @memberof IosSubscriptionRenewed
13143
+ * @memberof IosSubscriptionAutoRenewalUpdated
12598
13144
  * @instance
12599
13145
  * @returns {Object.<string,*>} JSON object
12600
13146
  */
12601
- IosSubscriptionRenewed.prototype.toJSON = function toJSON() {
13147
+ IosSubscriptionAutoRenewalUpdated.prototype.toJSON = function toJSON() {
12602
13148
  return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
12603
13149
  };
12604
13150
 
12605
- return IosSubscriptionRenewed;
13151
+ return IosSubscriptionAutoRenewalUpdated;
12606
13152
  })();
12607
13153
 
12608
13154
  $root.AssetCreated = (function() {
@@ -28744,4 +29290,228 @@ $root.UserEmailMarketingSubscriptionStatusUpdated = (function() {
28744
29290
  return UserEmailMarketingSubscriptionStatusUpdated;
28745
29291
  })();
28746
29292
 
29293
+ $root.UserUnsubscribeRequested = (function() {
29294
+
29295
+ /**
29296
+ * Properties of a UserUnsubscribeRequested.
29297
+ * @exports IUserUnsubscribeRequested
29298
+ * @interface IUserUnsubscribeRequested
29299
+ * @property {string|null} [userId] UserUnsubscribeRequested userId
29300
+ * @property {number|Long|null} [timestamp] UserUnsubscribeRequested timestamp
29301
+ */
29302
+
29303
+ /**
29304
+ * Constructs a new UserUnsubscribeRequested.
29305
+ * @exports UserUnsubscribeRequested
29306
+ * @classdesc Represents a UserUnsubscribeRequested.
29307
+ * @implements IUserUnsubscribeRequested
29308
+ * @constructor
29309
+ * @param {IUserUnsubscribeRequested=} [properties] Properties to set
29310
+ */
29311
+ function UserUnsubscribeRequested(properties) {
29312
+ if (properties)
29313
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
29314
+ if (properties[keys[i]] != null)
29315
+ this[keys[i]] = properties[keys[i]];
29316
+ }
29317
+
29318
+ /**
29319
+ * UserUnsubscribeRequested userId.
29320
+ * @member {string} userId
29321
+ * @memberof UserUnsubscribeRequested
29322
+ * @instance
29323
+ */
29324
+ UserUnsubscribeRequested.prototype.userId = "";
29325
+
29326
+ /**
29327
+ * UserUnsubscribeRequested timestamp.
29328
+ * @member {number|Long} timestamp
29329
+ * @memberof UserUnsubscribeRequested
29330
+ * @instance
29331
+ */
29332
+ UserUnsubscribeRequested.prototype.timestamp = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
29333
+
29334
+ /**
29335
+ * Creates a new UserUnsubscribeRequested instance using the specified properties.
29336
+ * @function create
29337
+ * @memberof UserUnsubscribeRequested
29338
+ * @static
29339
+ * @param {IUserUnsubscribeRequested=} [properties] Properties to set
29340
+ * @returns {UserUnsubscribeRequested} UserUnsubscribeRequested instance
29341
+ */
29342
+ UserUnsubscribeRequested.create = function create(properties) {
29343
+ return new UserUnsubscribeRequested(properties);
29344
+ };
29345
+
29346
+ /**
29347
+ * Encodes the specified UserUnsubscribeRequested message. Does not implicitly {@link UserUnsubscribeRequested.verify|verify} messages.
29348
+ * @function encode
29349
+ * @memberof UserUnsubscribeRequested
29350
+ * @static
29351
+ * @param {IUserUnsubscribeRequested} message UserUnsubscribeRequested message or plain object to encode
29352
+ * @param {$protobuf.Writer} [writer] Writer to encode to
29353
+ * @returns {$protobuf.Writer} Writer
29354
+ */
29355
+ UserUnsubscribeRequested.encode = function encode(message, writer) {
29356
+ if (!writer)
29357
+ writer = $Writer.create();
29358
+ if (message.userId != null && message.hasOwnProperty("userId"))
29359
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.userId);
29360
+ if (message.timestamp != null && message.hasOwnProperty("timestamp"))
29361
+ writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.timestamp);
29362
+ return writer;
29363
+ };
29364
+
29365
+ /**
29366
+ * Encodes the specified UserUnsubscribeRequested message, length delimited. Does not implicitly {@link UserUnsubscribeRequested.verify|verify} messages.
29367
+ * @function encodeDelimited
29368
+ * @memberof UserUnsubscribeRequested
29369
+ * @static
29370
+ * @param {IUserUnsubscribeRequested} message UserUnsubscribeRequested message or plain object to encode
29371
+ * @param {$protobuf.Writer} [writer] Writer to encode to
29372
+ * @returns {$protobuf.Writer} Writer
29373
+ */
29374
+ UserUnsubscribeRequested.encodeDelimited = function encodeDelimited(message, writer) {
29375
+ return this.encode(message, writer).ldelim();
29376
+ };
29377
+
29378
+ /**
29379
+ * Decodes a UserUnsubscribeRequested message from the specified reader or buffer.
29380
+ * @function decode
29381
+ * @memberof UserUnsubscribeRequested
29382
+ * @static
29383
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
29384
+ * @param {number} [length] Message length if known beforehand
29385
+ * @returns {UserUnsubscribeRequested} UserUnsubscribeRequested
29386
+ * @throws {Error} If the payload is not a reader or valid buffer
29387
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
29388
+ */
29389
+ UserUnsubscribeRequested.decode = function decode(reader, length) {
29390
+ if (!(reader instanceof $Reader))
29391
+ reader = $Reader.create(reader);
29392
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.UserUnsubscribeRequested();
29393
+ while (reader.pos < end) {
29394
+ var tag = reader.uint32();
29395
+ switch (tag >>> 3) {
29396
+ case 1:
29397
+ message.userId = reader.string();
29398
+ break;
29399
+ case 2:
29400
+ message.timestamp = reader.uint64();
29401
+ break;
29402
+ default:
29403
+ reader.skipType(tag & 7);
29404
+ break;
29405
+ }
29406
+ }
29407
+ return message;
29408
+ };
29409
+
29410
+ /**
29411
+ * Decodes a UserUnsubscribeRequested message from the specified reader or buffer, length delimited.
29412
+ * @function decodeDelimited
29413
+ * @memberof UserUnsubscribeRequested
29414
+ * @static
29415
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
29416
+ * @returns {UserUnsubscribeRequested} UserUnsubscribeRequested
29417
+ * @throws {Error} If the payload is not a reader or valid buffer
29418
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
29419
+ */
29420
+ UserUnsubscribeRequested.decodeDelimited = function decodeDelimited(reader) {
29421
+ if (!(reader instanceof $Reader))
29422
+ reader = new $Reader(reader);
29423
+ return this.decode(reader, reader.uint32());
29424
+ };
29425
+
29426
+ /**
29427
+ * Verifies a UserUnsubscribeRequested message.
29428
+ * @function verify
29429
+ * @memberof UserUnsubscribeRequested
29430
+ * @static
29431
+ * @param {Object.<string,*>} message Plain object to verify
29432
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
29433
+ */
29434
+ UserUnsubscribeRequested.verify = function verify(message) {
29435
+ if (typeof message !== "object" || message === null)
29436
+ return "object expected";
29437
+ if (message.userId != null && message.hasOwnProperty("userId"))
29438
+ if (!$util.isString(message.userId))
29439
+ return "userId: string expected";
29440
+ if (message.timestamp != null && message.hasOwnProperty("timestamp"))
29441
+ if (!$util.isInteger(message.timestamp) && !(message.timestamp && $util.isInteger(message.timestamp.low) && $util.isInteger(message.timestamp.high)))
29442
+ return "timestamp: integer|Long expected";
29443
+ return null;
29444
+ };
29445
+
29446
+ /**
29447
+ * Creates a UserUnsubscribeRequested message from a plain object. Also converts values to their respective internal types.
29448
+ * @function fromObject
29449
+ * @memberof UserUnsubscribeRequested
29450
+ * @static
29451
+ * @param {Object.<string,*>} object Plain object
29452
+ * @returns {UserUnsubscribeRequested} UserUnsubscribeRequested
29453
+ */
29454
+ UserUnsubscribeRequested.fromObject = function fromObject(object) {
29455
+ if (object instanceof $root.UserUnsubscribeRequested)
29456
+ return object;
29457
+ var message = new $root.UserUnsubscribeRequested();
29458
+ if (object.userId != null)
29459
+ message.userId = String(object.userId);
29460
+ if (object.timestamp != null)
29461
+ if ($util.Long)
29462
+ (message.timestamp = $util.Long.fromValue(object.timestamp)).unsigned = true;
29463
+ else if (typeof object.timestamp === "string")
29464
+ message.timestamp = parseInt(object.timestamp, 10);
29465
+ else if (typeof object.timestamp === "number")
29466
+ message.timestamp = object.timestamp;
29467
+ else if (typeof object.timestamp === "object")
29468
+ message.timestamp = new $util.LongBits(object.timestamp.low >>> 0, object.timestamp.high >>> 0).toNumber(true);
29469
+ return message;
29470
+ };
29471
+
29472
+ /**
29473
+ * Creates a plain object from a UserUnsubscribeRequested message. Also converts values to other types if specified.
29474
+ * @function toObject
29475
+ * @memberof UserUnsubscribeRequested
29476
+ * @static
29477
+ * @param {UserUnsubscribeRequested} message UserUnsubscribeRequested
29478
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
29479
+ * @returns {Object.<string,*>} Plain object
29480
+ */
29481
+ UserUnsubscribeRequested.toObject = function toObject(message, options) {
29482
+ if (!options)
29483
+ options = {};
29484
+ var object = {};
29485
+ if (options.defaults) {
29486
+ object.userId = "";
29487
+ if ($util.Long) {
29488
+ var long = new $util.Long(0, 0, true);
29489
+ object.timestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
29490
+ } else
29491
+ object.timestamp = options.longs === String ? "0" : 0;
29492
+ }
29493
+ if (message.userId != null && message.hasOwnProperty("userId"))
29494
+ object.userId = message.userId;
29495
+ if (message.timestamp != null && message.hasOwnProperty("timestamp"))
29496
+ if (typeof message.timestamp === "number")
29497
+ object.timestamp = options.longs === String ? String(message.timestamp) : message.timestamp;
29498
+ else
29499
+ 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;
29500
+ return object;
29501
+ };
29502
+
29503
+ /**
29504
+ * Converts this UserUnsubscribeRequested to JSON.
29505
+ * @function toJSON
29506
+ * @memberof UserUnsubscribeRequested
29507
+ * @instance
29508
+ * @returns {Object.<string,*>} JSON object
29509
+ */
29510
+ UserUnsubscribeRequested.prototype.toJSON = function toJSON() {
29511
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
29512
+ };
29513
+
29514
+ return UserUnsubscribeRequested;
29515
+ })();
29516
+
28747
29517
  module.exports = $root;