@headspace/protos-events 1.3.0 → 1.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/index.d.ts CHANGED
@@ -1,4 +1,21 @@
1
1
  import * as $protobuf from "protobufjs";
2
+ /** Namespace subscription. */
3
+ export namespace subscription {
4
+
5
+ /** PlanAffiliation enum. */
6
+ enum PlanAffiliation {
7
+ STUDENT = 0,
8
+ VETERAN = 1,
9
+ FAMILY = 2
10
+ }
11
+
12
+ /** SubscriptionMembership enum. */
13
+ enum SubscriptionMembership {
14
+ PRIMARY = 0,
15
+ MEMBER = 1
16
+ }
17
+ }
18
+
2
19
  /** Properties of a FamilyMemberAdded. */
3
20
  export interface IFamilyMemberAdded {
4
21
 
@@ -569,6 +586,210 @@ export class VoiceDeviceConnected implements IVoiceDeviceConnected {
569
586
  public toJSON(): { [k: string]: any };
570
587
  }
571
588
 
589
+ /** Properties of a CheckInResponse. */
590
+ export interface ICheckInResponse {
591
+
592
+ /** CheckInResponse questionId */
593
+ questionId?: (number|null);
594
+
595
+ /** CheckInResponse response */
596
+ response?: (string|null);
597
+ }
598
+
599
+ /** Represents a CheckInResponse. */
600
+ export class CheckInResponse implements ICheckInResponse {
601
+
602
+ /**
603
+ * Constructs a new CheckInResponse.
604
+ * @param [properties] Properties to set
605
+ */
606
+ constructor(properties?: ICheckInResponse);
607
+
608
+ /** CheckInResponse questionId. */
609
+ public questionId: number;
610
+
611
+ /** CheckInResponse response. */
612
+ public response: string;
613
+
614
+ /**
615
+ * Creates a new CheckInResponse instance using the specified properties.
616
+ * @param [properties] Properties to set
617
+ * @returns CheckInResponse instance
618
+ */
619
+ public static create(properties?: ICheckInResponse): CheckInResponse;
620
+
621
+ /**
622
+ * Encodes the specified CheckInResponse message. Does not implicitly {@link CheckInResponse.verify|verify} messages.
623
+ * @param message CheckInResponse message or plain object to encode
624
+ * @param [writer] Writer to encode to
625
+ * @returns Writer
626
+ */
627
+ public static encode(message: ICheckInResponse, writer?: $protobuf.Writer): $protobuf.Writer;
628
+
629
+ /**
630
+ * Encodes the specified CheckInResponse message, length delimited. Does not implicitly {@link CheckInResponse.verify|verify} messages.
631
+ * @param message CheckInResponse message or plain object to encode
632
+ * @param [writer] Writer to encode to
633
+ * @returns Writer
634
+ */
635
+ public static encodeDelimited(message: ICheckInResponse, writer?: $protobuf.Writer): $protobuf.Writer;
636
+
637
+ /**
638
+ * Decodes a CheckInResponse message from the specified reader or buffer.
639
+ * @param reader Reader or buffer to decode from
640
+ * @param [length] Message length if known beforehand
641
+ * @returns CheckInResponse
642
+ * @throws {Error} If the payload is not a reader or valid buffer
643
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
644
+ */
645
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): CheckInResponse;
646
+
647
+ /**
648
+ * Decodes a CheckInResponse message from the specified reader or buffer, length delimited.
649
+ * @param reader Reader or buffer to decode from
650
+ * @returns CheckInResponse
651
+ * @throws {Error} If the payload is not a reader or valid buffer
652
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
653
+ */
654
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): CheckInResponse;
655
+
656
+ /**
657
+ * Verifies a CheckInResponse message.
658
+ * @param message Plain object to verify
659
+ * @returns `null` if valid, otherwise the reason why it is not
660
+ */
661
+ public static verify(message: { [k: string]: any }): (string|null);
662
+
663
+ /**
664
+ * Creates a CheckInResponse message from a plain object. Also converts values to their respective internal types.
665
+ * @param object Plain object
666
+ * @returns CheckInResponse
667
+ */
668
+ public static fromObject(object: { [k: string]: any }): CheckInResponse;
669
+
670
+ /**
671
+ * Creates a plain object from a CheckInResponse message. Also converts values to other types if specified.
672
+ * @param message CheckInResponse
673
+ * @param [options] Conversion options
674
+ * @returns Plain object
675
+ */
676
+ public static toObject(message: CheckInResponse, options?: $protobuf.IConversionOptions): { [k: string]: any };
677
+
678
+ /**
679
+ * Converts this CheckInResponse to JSON.
680
+ * @returns JSON object
681
+ */
682
+ public toJSON(): { [k: string]: any };
683
+ }
684
+
685
+ /** Properties of a CheckInCompleted. */
686
+ export interface ICheckInCompleted {
687
+
688
+ /** CheckInCompleted userId */
689
+ userId?: (string|null);
690
+
691
+ /** CheckInCompleted timestamp */
692
+ timestamp?: (number|Long|null);
693
+
694
+ /** CheckInCompleted checkInId */
695
+ checkInId?: (number|null);
696
+
697
+ /** CheckInCompleted responses */
698
+ responses?: (ICheckInResponse[]|null);
699
+ }
700
+
701
+ /** Represents a CheckInCompleted. */
702
+ export class CheckInCompleted implements ICheckInCompleted {
703
+
704
+ /**
705
+ * Constructs a new CheckInCompleted.
706
+ * @param [properties] Properties to set
707
+ */
708
+ constructor(properties?: ICheckInCompleted);
709
+
710
+ /** CheckInCompleted userId. */
711
+ public userId: string;
712
+
713
+ /** CheckInCompleted timestamp. */
714
+ public timestamp: (number|Long);
715
+
716
+ /** CheckInCompleted checkInId. */
717
+ public checkInId: number;
718
+
719
+ /** CheckInCompleted responses. */
720
+ public responses: ICheckInResponse[];
721
+
722
+ /**
723
+ * Creates a new CheckInCompleted instance using the specified properties.
724
+ * @param [properties] Properties to set
725
+ * @returns CheckInCompleted instance
726
+ */
727
+ public static create(properties?: ICheckInCompleted): CheckInCompleted;
728
+
729
+ /**
730
+ * Encodes the specified CheckInCompleted message. Does not implicitly {@link CheckInCompleted.verify|verify} messages.
731
+ * @param message CheckInCompleted message or plain object to encode
732
+ * @param [writer] Writer to encode to
733
+ * @returns Writer
734
+ */
735
+ public static encode(message: ICheckInCompleted, writer?: $protobuf.Writer): $protobuf.Writer;
736
+
737
+ /**
738
+ * Encodes the specified CheckInCompleted message, length delimited. Does not implicitly {@link CheckInCompleted.verify|verify} messages.
739
+ * @param message CheckInCompleted message or plain object to encode
740
+ * @param [writer] Writer to encode to
741
+ * @returns Writer
742
+ */
743
+ public static encodeDelimited(message: ICheckInCompleted, writer?: $protobuf.Writer): $protobuf.Writer;
744
+
745
+ /**
746
+ * Decodes a CheckInCompleted message from the specified reader or buffer.
747
+ * @param reader Reader or buffer to decode from
748
+ * @param [length] Message length if known beforehand
749
+ * @returns CheckInCompleted
750
+ * @throws {Error} If the payload is not a reader or valid buffer
751
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
752
+ */
753
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): CheckInCompleted;
754
+
755
+ /**
756
+ * Decodes a CheckInCompleted message from the specified reader or buffer, length delimited.
757
+ * @param reader Reader or buffer to decode from
758
+ * @returns CheckInCompleted
759
+ * @throws {Error} If the payload is not a reader or valid buffer
760
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
761
+ */
762
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): CheckInCompleted;
763
+
764
+ /**
765
+ * Verifies a CheckInCompleted message.
766
+ * @param message Plain object to verify
767
+ * @returns `null` if valid, otherwise the reason why it is not
768
+ */
769
+ public static verify(message: { [k: string]: any }): (string|null);
770
+
771
+ /**
772
+ * Creates a CheckInCompleted message from a plain object. Also converts values to their respective internal types.
773
+ * @param object Plain object
774
+ * @returns CheckInCompleted
775
+ */
776
+ public static fromObject(object: { [k: string]: any }): CheckInCompleted;
777
+
778
+ /**
779
+ * Creates a plain object from a CheckInCompleted message. Also converts values to other types if specified.
780
+ * @param message CheckInCompleted
781
+ * @param [options] Conversion options
782
+ * @returns Plain object
783
+ */
784
+ public static toObject(message: CheckInCompleted, options?: $protobuf.IConversionOptions): { [k: string]: any };
785
+
786
+ /**
787
+ * Converts this CheckInCompleted to JSON.
788
+ * @returns JSON object
789
+ */
790
+ public toJSON(): { [k: string]: any };
791
+ }
792
+
572
793
  /** Properties of a SleepcastEpisodeCompleted. */
573
794
  export interface ISleepcastEpisodeCompleted {
574
795
 
@@ -1181,6 +1402,120 @@ export class SubscriptionRenewed implements ISubscriptionRenewed {
1181
1402
  public toJSON(): { [k: string]: any };
1182
1403
  }
1183
1404
 
1405
+ /** Properties of a SubscriptionUpcomingRenewal. */
1406
+ export interface ISubscriptionUpcomingRenewal {
1407
+
1408
+ /** SubscriptionUpcomingRenewal id */
1409
+ id?: (number|null);
1410
+
1411
+ /** SubscriptionUpcomingRenewal userId */
1412
+ userId?: (string|null);
1413
+
1414
+ /** SubscriptionUpcomingRenewal daysBefore */
1415
+ daysBefore?: (number|null);
1416
+
1417
+ /** SubscriptionUpcomingRenewal membership */
1418
+ membership?: (subscription.SubscriptionMembership|null);
1419
+
1420
+ /** SubscriptionUpcomingRenewal planAffiliation */
1421
+ planAffiliation?: (subscription.PlanAffiliation|null);
1422
+ }
1423
+
1424
+ /** Represents a SubscriptionUpcomingRenewal. */
1425
+ export class SubscriptionUpcomingRenewal implements ISubscriptionUpcomingRenewal {
1426
+
1427
+ /**
1428
+ * Constructs a new SubscriptionUpcomingRenewal.
1429
+ * @param [properties] Properties to set
1430
+ */
1431
+ constructor(properties?: ISubscriptionUpcomingRenewal);
1432
+
1433
+ /** SubscriptionUpcomingRenewal id. */
1434
+ public id: number;
1435
+
1436
+ /** SubscriptionUpcomingRenewal userId. */
1437
+ public userId: string;
1438
+
1439
+ /** SubscriptionUpcomingRenewal daysBefore. */
1440
+ public daysBefore: number;
1441
+
1442
+ /** SubscriptionUpcomingRenewal membership. */
1443
+ public membership: subscription.SubscriptionMembership;
1444
+
1445
+ /** SubscriptionUpcomingRenewal planAffiliation. */
1446
+ public planAffiliation: subscription.PlanAffiliation;
1447
+
1448
+ /**
1449
+ * Creates a new SubscriptionUpcomingRenewal instance using the specified properties.
1450
+ * @param [properties] Properties to set
1451
+ * @returns SubscriptionUpcomingRenewal instance
1452
+ */
1453
+ public static create(properties?: ISubscriptionUpcomingRenewal): SubscriptionUpcomingRenewal;
1454
+
1455
+ /**
1456
+ * Encodes the specified SubscriptionUpcomingRenewal message. Does not implicitly {@link SubscriptionUpcomingRenewal.verify|verify} messages.
1457
+ * @param message SubscriptionUpcomingRenewal message or plain object to encode
1458
+ * @param [writer] Writer to encode to
1459
+ * @returns Writer
1460
+ */
1461
+ public static encode(message: ISubscriptionUpcomingRenewal, writer?: $protobuf.Writer): $protobuf.Writer;
1462
+
1463
+ /**
1464
+ * Encodes the specified SubscriptionUpcomingRenewal message, length delimited. Does not implicitly {@link SubscriptionUpcomingRenewal.verify|verify} messages.
1465
+ * @param message SubscriptionUpcomingRenewal message or plain object to encode
1466
+ * @param [writer] Writer to encode to
1467
+ * @returns Writer
1468
+ */
1469
+ public static encodeDelimited(message: ISubscriptionUpcomingRenewal, writer?: $protobuf.Writer): $protobuf.Writer;
1470
+
1471
+ /**
1472
+ * Decodes a SubscriptionUpcomingRenewal message from the specified reader or buffer.
1473
+ * @param reader Reader or buffer to decode from
1474
+ * @param [length] Message length if known beforehand
1475
+ * @returns SubscriptionUpcomingRenewal
1476
+ * @throws {Error} If the payload is not a reader or valid buffer
1477
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
1478
+ */
1479
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): SubscriptionUpcomingRenewal;
1480
+
1481
+ /**
1482
+ * Decodes a SubscriptionUpcomingRenewal message from the specified reader or buffer, length delimited.
1483
+ * @param reader Reader or buffer to decode from
1484
+ * @returns SubscriptionUpcomingRenewal
1485
+ * @throws {Error} If the payload is not a reader or valid buffer
1486
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
1487
+ */
1488
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): SubscriptionUpcomingRenewal;
1489
+
1490
+ /**
1491
+ * Verifies a SubscriptionUpcomingRenewal message.
1492
+ * @param message Plain object to verify
1493
+ * @returns `null` if valid, otherwise the reason why it is not
1494
+ */
1495
+ public static verify(message: { [k: string]: any }): (string|null);
1496
+
1497
+ /**
1498
+ * Creates a SubscriptionUpcomingRenewal message from a plain object. Also converts values to their respective internal types.
1499
+ * @param object Plain object
1500
+ * @returns SubscriptionUpcomingRenewal
1501
+ */
1502
+ public static fromObject(object: { [k: string]: any }): SubscriptionUpcomingRenewal;
1503
+
1504
+ /**
1505
+ * Creates a plain object from a SubscriptionUpcomingRenewal message. Also converts values to other types if specified.
1506
+ * @param message SubscriptionUpcomingRenewal
1507
+ * @param [options] Conversion options
1508
+ * @returns Plain object
1509
+ */
1510
+ public static toObject(message: SubscriptionUpcomingRenewal, options?: $protobuf.IConversionOptions): { [k: string]: any };
1511
+
1512
+ /**
1513
+ * Converts this SubscriptionUpcomingRenewal to JSON.
1514
+ * @returns JSON object
1515
+ */
1516
+ public toJSON(): { [k: string]: any };
1517
+ }
1518
+
1184
1519
  /** Properties of a UserPasswordUpdated. */
1185
1520
  export interface IUserPasswordUpdated {
1186
1521
 
package/lib/index.js CHANGED
@@ -9,6 +9,48 @@ var $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.ut
9
9
  // Exported root namespace
10
10
  var $root = $protobuf.roots["default"] || ($protobuf.roots["default"] = {});
11
11
 
12
+ $root.subscription = (function() {
13
+
14
+ /**
15
+ * Namespace subscription.
16
+ * @exports subscription
17
+ * @namespace
18
+ */
19
+ var subscription = {};
20
+
21
+ /**
22
+ * PlanAffiliation enum.
23
+ * @name subscription.PlanAffiliation
24
+ * @enum {string}
25
+ * @property {number} STUDENT=0 STUDENT value
26
+ * @property {number} VETERAN=1 VETERAN value
27
+ * @property {number} FAMILY=2 FAMILY value
28
+ */
29
+ subscription.PlanAffiliation = (function() {
30
+ var valuesById = {}, values = Object.create(valuesById);
31
+ values[valuesById[0] = "STUDENT"] = 0;
32
+ values[valuesById[1] = "VETERAN"] = 1;
33
+ values[valuesById[2] = "FAMILY"] = 2;
34
+ return values;
35
+ })();
36
+
37
+ /**
38
+ * SubscriptionMembership enum.
39
+ * @name subscription.SubscriptionMembership
40
+ * @enum {string}
41
+ * @property {number} PRIMARY=0 PRIMARY value
42
+ * @property {number} MEMBER=1 MEMBER value
43
+ */
44
+ subscription.SubscriptionMembership = (function() {
45
+ var valuesById = {}, values = Object.create(valuesById);
46
+ values[valuesById[0] = "PRIMARY"] = 0;
47
+ values[valuesById[1] = "MEMBER"] = 1;
48
+ return values;
49
+ })();
50
+
51
+ return subscription;
52
+ })();
53
+
12
54
  $root.FamilyMemberAdded = (function() {
13
55
 
14
56
  /**
@@ -1459,6 +1501,506 @@ $root.VoiceDeviceConnected = (function() {
1459
1501
  return VoiceDeviceConnected;
1460
1502
  })();
1461
1503
 
1504
+ $root.CheckInResponse = (function() {
1505
+
1506
+ /**
1507
+ * Properties of a CheckInResponse.
1508
+ * @exports ICheckInResponse
1509
+ * @interface ICheckInResponse
1510
+ * @property {number|null} [questionId] CheckInResponse questionId
1511
+ * @property {string|null} [response] CheckInResponse response
1512
+ */
1513
+
1514
+ /**
1515
+ * Constructs a new CheckInResponse.
1516
+ * @exports CheckInResponse
1517
+ * @classdesc Represents a CheckInResponse.
1518
+ * @implements ICheckInResponse
1519
+ * @constructor
1520
+ * @param {ICheckInResponse=} [properties] Properties to set
1521
+ */
1522
+ function CheckInResponse(properties) {
1523
+ if (properties)
1524
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
1525
+ if (properties[keys[i]] != null)
1526
+ this[keys[i]] = properties[keys[i]];
1527
+ }
1528
+
1529
+ /**
1530
+ * CheckInResponse questionId.
1531
+ * @member {number} questionId
1532
+ * @memberof CheckInResponse
1533
+ * @instance
1534
+ */
1535
+ CheckInResponse.prototype.questionId = 0;
1536
+
1537
+ /**
1538
+ * CheckInResponse response.
1539
+ * @member {string} response
1540
+ * @memberof CheckInResponse
1541
+ * @instance
1542
+ */
1543
+ CheckInResponse.prototype.response = "";
1544
+
1545
+ /**
1546
+ * Creates a new CheckInResponse instance using the specified properties.
1547
+ * @function create
1548
+ * @memberof CheckInResponse
1549
+ * @static
1550
+ * @param {ICheckInResponse=} [properties] Properties to set
1551
+ * @returns {CheckInResponse} CheckInResponse instance
1552
+ */
1553
+ CheckInResponse.create = function create(properties) {
1554
+ return new CheckInResponse(properties);
1555
+ };
1556
+
1557
+ /**
1558
+ * Encodes the specified CheckInResponse message. Does not implicitly {@link CheckInResponse.verify|verify} messages.
1559
+ * @function encode
1560
+ * @memberof CheckInResponse
1561
+ * @static
1562
+ * @param {ICheckInResponse} message CheckInResponse message or plain object to encode
1563
+ * @param {$protobuf.Writer} [writer] Writer to encode to
1564
+ * @returns {$protobuf.Writer} Writer
1565
+ */
1566
+ CheckInResponse.encode = function encode(message, writer) {
1567
+ if (!writer)
1568
+ writer = $Writer.create();
1569
+ if (message.questionId != null && message.hasOwnProperty("questionId"))
1570
+ writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.questionId);
1571
+ if (message.response != null && message.hasOwnProperty("response"))
1572
+ writer.uint32(/* id 2, wireType 2 =*/18).string(message.response);
1573
+ return writer;
1574
+ };
1575
+
1576
+ /**
1577
+ * Encodes the specified CheckInResponse message, length delimited. Does not implicitly {@link CheckInResponse.verify|verify} messages.
1578
+ * @function encodeDelimited
1579
+ * @memberof CheckInResponse
1580
+ * @static
1581
+ * @param {ICheckInResponse} message CheckInResponse message or plain object to encode
1582
+ * @param {$protobuf.Writer} [writer] Writer to encode to
1583
+ * @returns {$protobuf.Writer} Writer
1584
+ */
1585
+ CheckInResponse.encodeDelimited = function encodeDelimited(message, writer) {
1586
+ return this.encode(message, writer).ldelim();
1587
+ };
1588
+
1589
+ /**
1590
+ * Decodes a CheckInResponse message from the specified reader or buffer.
1591
+ * @function decode
1592
+ * @memberof CheckInResponse
1593
+ * @static
1594
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
1595
+ * @param {number} [length] Message length if known beforehand
1596
+ * @returns {CheckInResponse} CheckInResponse
1597
+ * @throws {Error} If the payload is not a reader or valid buffer
1598
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
1599
+ */
1600
+ CheckInResponse.decode = function decode(reader, length) {
1601
+ if (!(reader instanceof $Reader))
1602
+ reader = $Reader.create(reader);
1603
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CheckInResponse();
1604
+ while (reader.pos < end) {
1605
+ var tag = reader.uint32();
1606
+ switch (tag >>> 3) {
1607
+ case 1:
1608
+ message.questionId = reader.uint32();
1609
+ break;
1610
+ case 2:
1611
+ message.response = reader.string();
1612
+ break;
1613
+ default:
1614
+ reader.skipType(tag & 7);
1615
+ break;
1616
+ }
1617
+ }
1618
+ return message;
1619
+ };
1620
+
1621
+ /**
1622
+ * Decodes a CheckInResponse message from the specified reader or buffer, length delimited.
1623
+ * @function decodeDelimited
1624
+ * @memberof CheckInResponse
1625
+ * @static
1626
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
1627
+ * @returns {CheckInResponse} CheckInResponse
1628
+ * @throws {Error} If the payload is not a reader or valid buffer
1629
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
1630
+ */
1631
+ CheckInResponse.decodeDelimited = function decodeDelimited(reader) {
1632
+ if (!(reader instanceof $Reader))
1633
+ reader = new $Reader(reader);
1634
+ return this.decode(reader, reader.uint32());
1635
+ };
1636
+
1637
+ /**
1638
+ * Verifies a CheckInResponse message.
1639
+ * @function verify
1640
+ * @memberof CheckInResponse
1641
+ * @static
1642
+ * @param {Object.<string,*>} message Plain object to verify
1643
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
1644
+ */
1645
+ CheckInResponse.verify = function verify(message) {
1646
+ if (typeof message !== "object" || message === null)
1647
+ return "object expected";
1648
+ if (message.questionId != null && message.hasOwnProperty("questionId"))
1649
+ if (!$util.isInteger(message.questionId))
1650
+ return "questionId: integer expected";
1651
+ if (message.response != null && message.hasOwnProperty("response"))
1652
+ if (!$util.isString(message.response))
1653
+ return "response: string expected";
1654
+ return null;
1655
+ };
1656
+
1657
+ /**
1658
+ * Creates a CheckInResponse message from a plain object. Also converts values to their respective internal types.
1659
+ * @function fromObject
1660
+ * @memberof CheckInResponse
1661
+ * @static
1662
+ * @param {Object.<string,*>} object Plain object
1663
+ * @returns {CheckInResponse} CheckInResponse
1664
+ */
1665
+ CheckInResponse.fromObject = function fromObject(object) {
1666
+ if (object instanceof $root.CheckInResponse)
1667
+ return object;
1668
+ var message = new $root.CheckInResponse();
1669
+ if (object.questionId != null)
1670
+ message.questionId = object.questionId >>> 0;
1671
+ if (object.response != null)
1672
+ message.response = String(object.response);
1673
+ return message;
1674
+ };
1675
+
1676
+ /**
1677
+ * Creates a plain object from a CheckInResponse message. Also converts values to other types if specified.
1678
+ * @function toObject
1679
+ * @memberof CheckInResponse
1680
+ * @static
1681
+ * @param {CheckInResponse} message CheckInResponse
1682
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
1683
+ * @returns {Object.<string,*>} Plain object
1684
+ */
1685
+ CheckInResponse.toObject = function toObject(message, options) {
1686
+ if (!options)
1687
+ options = {};
1688
+ var object = {};
1689
+ if (options.defaults) {
1690
+ object.questionId = 0;
1691
+ object.response = "";
1692
+ }
1693
+ if (message.questionId != null && message.hasOwnProperty("questionId"))
1694
+ object.questionId = message.questionId;
1695
+ if (message.response != null && message.hasOwnProperty("response"))
1696
+ object.response = message.response;
1697
+ return object;
1698
+ };
1699
+
1700
+ /**
1701
+ * Converts this CheckInResponse to JSON.
1702
+ * @function toJSON
1703
+ * @memberof CheckInResponse
1704
+ * @instance
1705
+ * @returns {Object.<string,*>} JSON object
1706
+ */
1707
+ CheckInResponse.prototype.toJSON = function toJSON() {
1708
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
1709
+ };
1710
+
1711
+ return CheckInResponse;
1712
+ })();
1713
+
1714
+ $root.CheckInCompleted = (function() {
1715
+
1716
+ /**
1717
+ * Properties of a CheckInCompleted.
1718
+ * @exports ICheckInCompleted
1719
+ * @interface ICheckInCompleted
1720
+ * @property {string|null} [userId] CheckInCompleted userId
1721
+ * @property {number|Long|null} [timestamp] CheckInCompleted timestamp
1722
+ * @property {number|null} [checkInId] CheckInCompleted checkInId
1723
+ * @property {Array.<ICheckInResponse>|null} [responses] CheckInCompleted responses
1724
+ */
1725
+
1726
+ /**
1727
+ * Constructs a new CheckInCompleted.
1728
+ * @exports CheckInCompleted
1729
+ * @classdesc Represents a CheckInCompleted.
1730
+ * @implements ICheckInCompleted
1731
+ * @constructor
1732
+ * @param {ICheckInCompleted=} [properties] Properties to set
1733
+ */
1734
+ function CheckInCompleted(properties) {
1735
+ this.responses = [];
1736
+ if (properties)
1737
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
1738
+ if (properties[keys[i]] != null)
1739
+ this[keys[i]] = properties[keys[i]];
1740
+ }
1741
+
1742
+ /**
1743
+ * CheckInCompleted userId.
1744
+ * @member {string} userId
1745
+ * @memberof CheckInCompleted
1746
+ * @instance
1747
+ */
1748
+ CheckInCompleted.prototype.userId = "";
1749
+
1750
+ /**
1751
+ * CheckInCompleted timestamp.
1752
+ * @member {number|Long} timestamp
1753
+ * @memberof CheckInCompleted
1754
+ * @instance
1755
+ */
1756
+ CheckInCompleted.prototype.timestamp = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
1757
+
1758
+ /**
1759
+ * CheckInCompleted checkInId.
1760
+ * @member {number} checkInId
1761
+ * @memberof CheckInCompleted
1762
+ * @instance
1763
+ */
1764
+ CheckInCompleted.prototype.checkInId = 0;
1765
+
1766
+ /**
1767
+ * CheckInCompleted responses.
1768
+ * @member {Array.<ICheckInResponse>} responses
1769
+ * @memberof CheckInCompleted
1770
+ * @instance
1771
+ */
1772
+ CheckInCompleted.prototype.responses = $util.emptyArray;
1773
+
1774
+ /**
1775
+ * Creates a new CheckInCompleted instance using the specified properties.
1776
+ * @function create
1777
+ * @memberof CheckInCompleted
1778
+ * @static
1779
+ * @param {ICheckInCompleted=} [properties] Properties to set
1780
+ * @returns {CheckInCompleted} CheckInCompleted instance
1781
+ */
1782
+ CheckInCompleted.create = function create(properties) {
1783
+ return new CheckInCompleted(properties);
1784
+ };
1785
+
1786
+ /**
1787
+ * Encodes the specified CheckInCompleted message. Does not implicitly {@link CheckInCompleted.verify|verify} messages.
1788
+ * @function encode
1789
+ * @memberof CheckInCompleted
1790
+ * @static
1791
+ * @param {ICheckInCompleted} message CheckInCompleted message or plain object to encode
1792
+ * @param {$protobuf.Writer} [writer] Writer to encode to
1793
+ * @returns {$protobuf.Writer} Writer
1794
+ */
1795
+ CheckInCompleted.encode = function encode(message, writer) {
1796
+ if (!writer)
1797
+ writer = $Writer.create();
1798
+ if (message.userId != null && message.hasOwnProperty("userId"))
1799
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.userId);
1800
+ if (message.timestamp != null && message.hasOwnProperty("timestamp"))
1801
+ writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.timestamp);
1802
+ if (message.checkInId != null && message.hasOwnProperty("checkInId"))
1803
+ writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.checkInId);
1804
+ if (message.responses != null && message.responses.length)
1805
+ for (var i = 0; i < message.responses.length; ++i)
1806
+ $root.CheckInResponse.encode(message.responses[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
1807
+ return writer;
1808
+ };
1809
+
1810
+ /**
1811
+ * Encodes the specified CheckInCompleted message, length delimited. Does not implicitly {@link CheckInCompleted.verify|verify} messages.
1812
+ * @function encodeDelimited
1813
+ * @memberof CheckInCompleted
1814
+ * @static
1815
+ * @param {ICheckInCompleted} message CheckInCompleted message or plain object to encode
1816
+ * @param {$protobuf.Writer} [writer] Writer to encode to
1817
+ * @returns {$protobuf.Writer} Writer
1818
+ */
1819
+ CheckInCompleted.encodeDelimited = function encodeDelimited(message, writer) {
1820
+ return this.encode(message, writer).ldelim();
1821
+ };
1822
+
1823
+ /**
1824
+ * Decodes a CheckInCompleted message from the specified reader or buffer.
1825
+ * @function decode
1826
+ * @memberof CheckInCompleted
1827
+ * @static
1828
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
1829
+ * @param {number} [length] Message length if known beforehand
1830
+ * @returns {CheckInCompleted} CheckInCompleted
1831
+ * @throws {Error} If the payload is not a reader or valid buffer
1832
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
1833
+ */
1834
+ CheckInCompleted.decode = function decode(reader, length) {
1835
+ if (!(reader instanceof $Reader))
1836
+ reader = $Reader.create(reader);
1837
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CheckInCompleted();
1838
+ while (reader.pos < end) {
1839
+ var tag = reader.uint32();
1840
+ switch (tag >>> 3) {
1841
+ case 1:
1842
+ message.userId = reader.string();
1843
+ break;
1844
+ case 2:
1845
+ message.timestamp = reader.uint64();
1846
+ break;
1847
+ case 3:
1848
+ message.checkInId = reader.uint32();
1849
+ break;
1850
+ case 4:
1851
+ if (!(message.responses && message.responses.length))
1852
+ message.responses = [];
1853
+ message.responses.push($root.CheckInResponse.decode(reader, reader.uint32()));
1854
+ break;
1855
+ default:
1856
+ reader.skipType(tag & 7);
1857
+ break;
1858
+ }
1859
+ }
1860
+ return message;
1861
+ };
1862
+
1863
+ /**
1864
+ * Decodes a CheckInCompleted message from the specified reader or buffer, length delimited.
1865
+ * @function decodeDelimited
1866
+ * @memberof CheckInCompleted
1867
+ * @static
1868
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
1869
+ * @returns {CheckInCompleted} CheckInCompleted
1870
+ * @throws {Error} If the payload is not a reader or valid buffer
1871
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
1872
+ */
1873
+ CheckInCompleted.decodeDelimited = function decodeDelimited(reader) {
1874
+ if (!(reader instanceof $Reader))
1875
+ reader = new $Reader(reader);
1876
+ return this.decode(reader, reader.uint32());
1877
+ };
1878
+
1879
+ /**
1880
+ * Verifies a CheckInCompleted message.
1881
+ * @function verify
1882
+ * @memberof CheckInCompleted
1883
+ * @static
1884
+ * @param {Object.<string,*>} message Plain object to verify
1885
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
1886
+ */
1887
+ CheckInCompleted.verify = function verify(message) {
1888
+ if (typeof message !== "object" || message === null)
1889
+ return "object expected";
1890
+ if (message.userId != null && message.hasOwnProperty("userId"))
1891
+ if (!$util.isString(message.userId))
1892
+ return "userId: string expected";
1893
+ if (message.timestamp != null && message.hasOwnProperty("timestamp"))
1894
+ if (!$util.isInteger(message.timestamp) && !(message.timestamp && $util.isInteger(message.timestamp.low) && $util.isInteger(message.timestamp.high)))
1895
+ return "timestamp: integer|Long expected";
1896
+ if (message.checkInId != null && message.hasOwnProperty("checkInId"))
1897
+ if (!$util.isInteger(message.checkInId))
1898
+ return "checkInId: integer expected";
1899
+ if (message.responses != null && message.hasOwnProperty("responses")) {
1900
+ if (!Array.isArray(message.responses))
1901
+ return "responses: array expected";
1902
+ for (var i = 0; i < message.responses.length; ++i) {
1903
+ var error = $root.CheckInResponse.verify(message.responses[i]);
1904
+ if (error)
1905
+ return "responses." + error;
1906
+ }
1907
+ }
1908
+ return null;
1909
+ };
1910
+
1911
+ /**
1912
+ * Creates a CheckInCompleted message from a plain object. Also converts values to their respective internal types.
1913
+ * @function fromObject
1914
+ * @memberof CheckInCompleted
1915
+ * @static
1916
+ * @param {Object.<string,*>} object Plain object
1917
+ * @returns {CheckInCompleted} CheckInCompleted
1918
+ */
1919
+ CheckInCompleted.fromObject = function fromObject(object) {
1920
+ if (object instanceof $root.CheckInCompleted)
1921
+ return object;
1922
+ var message = new $root.CheckInCompleted();
1923
+ if (object.userId != null)
1924
+ message.userId = String(object.userId);
1925
+ if (object.timestamp != null)
1926
+ if ($util.Long)
1927
+ (message.timestamp = $util.Long.fromValue(object.timestamp)).unsigned = true;
1928
+ else if (typeof object.timestamp === "string")
1929
+ message.timestamp = parseInt(object.timestamp, 10);
1930
+ else if (typeof object.timestamp === "number")
1931
+ message.timestamp = object.timestamp;
1932
+ else if (typeof object.timestamp === "object")
1933
+ message.timestamp = new $util.LongBits(object.timestamp.low >>> 0, object.timestamp.high >>> 0).toNumber(true);
1934
+ if (object.checkInId != null)
1935
+ message.checkInId = object.checkInId >>> 0;
1936
+ if (object.responses) {
1937
+ if (!Array.isArray(object.responses))
1938
+ throw TypeError(".CheckInCompleted.responses: array expected");
1939
+ message.responses = [];
1940
+ for (var i = 0; i < object.responses.length; ++i) {
1941
+ if (typeof object.responses[i] !== "object")
1942
+ throw TypeError(".CheckInCompleted.responses: object expected");
1943
+ message.responses[i] = $root.CheckInResponse.fromObject(object.responses[i]);
1944
+ }
1945
+ }
1946
+ return message;
1947
+ };
1948
+
1949
+ /**
1950
+ * Creates a plain object from a CheckInCompleted message. Also converts values to other types if specified.
1951
+ * @function toObject
1952
+ * @memberof CheckInCompleted
1953
+ * @static
1954
+ * @param {CheckInCompleted} message CheckInCompleted
1955
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
1956
+ * @returns {Object.<string,*>} Plain object
1957
+ */
1958
+ CheckInCompleted.toObject = function toObject(message, options) {
1959
+ if (!options)
1960
+ options = {};
1961
+ var object = {};
1962
+ if (options.arrays || options.defaults)
1963
+ object.responses = [];
1964
+ if (options.defaults) {
1965
+ object.userId = "";
1966
+ if ($util.Long) {
1967
+ var long = new $util.Long(0, 0, true);
1968
+ object.timestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
1969
+ } else
1970
+ object.timestamp = options.longs === String ? "0" : 0;
1971
+ object.checkInId = 0;
1972
+ }
1973
+ if (message.userId != null && message.hasOwnProperty("userId"))
1974
+ object.userId = message.userId;
1975
+ if (message.timestamp != null && message.hasOwnProperty("timestamp"))
1976
+ if (typeof message.timestamp === "number")
1977
+ object.timestamp = options.longs === String ? String(message.timestamp) : message.timestamp;
1978
+ else
1979
+ 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;
1980
+ if (message.checkInId != null && message.hasOwnProperty("checkInId"))
1981
+ object.checkInId = message.checkInId;
1982
+ if (message.responses && message.responses.length) {
1983
+ object.responses = [];
1984
+ for (var j = 0; j < message.responses.length; ++j)
1985
+ object.responses[j] = $root.CheckInResponse.toObject(message.responses[j], options);
1986
+ }
1987
+ return object;
1988
+ };
1989
+
1990
+ /**
1991
+ * Converts this CheckInCompleted to JSON.
1992
+ * @function toJSON
1993
+ * @memberof CheckInCompleted
1994
+ * @instance
1995
+ * @returns {Object.<string,*>} JSON object
1996
+ */
1997
+ CheckInCompleted.prototype.toJSON = function toJSON() {
1998
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
1999
+ };
2000
+
2001
+ return CheckInCompleted;
2002
+ })();
2003
+
1462
2004
  $root.SleepcastEpisodeCompleted = (function() {
1463
2005
 
1464
2006
  /**
@@ -2949,6 +3491,313 @@ $root.SubscriptionRenewed = (function() {
2949
3491
  return SubscriptionRenewed;
2950
3492
  })();
2951
3493
 
3494
+ $root.SubscriptionUpcomingRenewal = (function() {
3495
+
3496
+ /**
3497
+ * Properties of a SubscriptionUpcomingRenewal.
3498
+ * @exports ISubscriptionUpcomingRenewal
3499
+ * @interface ISubscriptionUpcomingRenewal
3500
+ * @property {number|null} [id] SubscriptionUpcomingRenewal id
3501
+ * @property {string|null} [userId] SubscriptionUpcomingRenewal userId
3502
+ * @property {number|null} [daysBefore] SubscriptionUpcomingRenewal daysBefore
3503
+ * @property {subscription.SubscriptionMembership|null} [membership] SubscriptionUpcomingRenewal membership
3504
+ * @property {subscription.PlanAffiliation|null} [planAffiliation] SubscriptionUpcomingRenewal planAffiliation
3505
+ */
3506
+
3507
+ /**
3508
+ * Constructs a new SubscriptionUpcomingRenewal.
3509
+ * @exports SubscriptionUpcomingRenewal
3510
+ * @classdesc Represents a SubscriptionUpcomingRenewal.
3511
+ * @implements ISubscriptionUpcomingRenewal
3512
+ * @constructor
3513
+ * @param {ISubscriptionUpcomingRenewal=} [properties] Properties to set
3514
+ */
3515
+ function SubscriptionUpcomingRenewal(properties) {
3516
+ if (properties)
3517
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
3518
+ if (properties[keys[i]] != null)
3519
+ this[keys[i]] = properties[keys[i]];
3520
+ }
3521
+
3522
+ /**
3523
+ * SubscriptionUpcomingRenewal id.
3524
+ * @member {number} id
3525
+ * @memberof SubscriptionUpcomingRenewal
3526
+ * @instance
3527
+ */
3528
+ SubscriptionUpcomingRenewal.prototype.id = 0;
3529
+
3530
+ /**
3531
+ * SubscriptionUpcomingRenewal userId.
3532
+ * @member {string} userId
3533
+ * @memberof SubscriptionUpcomingRenewal
3534
+ * @instance
3535
+ */
3536
+ SubscriptionUpcomingRenewal.prototype.userId = "";
3537
+
3538
+ /**
3539
+ * SubscriptionUpcomingRenewal daysBefore.
3540
+ * @member {number} daysBefore
3541
+ * @memberof SubscriptionUpcomingRenewal
3542
+ * @instance
3543
+ */
3544
+ SubscriptionUpcomingRenewal.prototype.daysBefore = 0;
3545
+
3546
+ /**
3547
+ * SubscriptionUpcomingRenewal membership.
3548
+ * @member {subscription.SubscriptionMembership} membership
3549
+ * @memberof SubscriptionUpcomingRenewal
3550
+ * @instance
3551
+ */
3552
+ SubscriptionUpcomingRenewal.prototype.membership = 0;
3553
+
3554
+ /**
3555
+ * SubscriptionUpcomingRenewal planAffiliation.
3556
+ * @member {subscription.PlanAffiliation} planAffiliation
3557
+ * @memberof SubscriptionUpcomingRenewal
3558
+ * @instance
3559
+ */
3560
+ SubscriptionUpcomingRenewal.prototype.planAffiliation = 0;
3561
+
3562
+ /**
3563
+ * Creates a new SubscriptionUpcomingRenewal instance using the specified properties.
3564
+ * @function create
3565
+ * @memberof SubscriptionUpcomingRenewal
3566
+ * @static
3567
+ * @param {ISubscriptionUpcomingRenewal=} [properties] Properties to set
3568
+ * @returns {SubscriptionUpcomingRenewal} SubscriptionUpcomingRenewal instance
3569
+ */
3570
+ SubscriptionUpcomingRenewal.create = function create(properties) {
3571
+ return new SubscriptionUpcomingRenewal(properties);
3572
+ };
3573
+
3574
+ /**
3575
+ * Encodes the specified SubscriptionUpcomingRenewal message. Does not implicitly {@link SubscriptionUpcomingRenewal.verify|verify} messages.
3576
+ * @function encode
3577
+ * @memberof SubscriptionUpcomingRenewal
3578
+ * @static
3579
+ * @param {ISubscriptionUpcomingRenewal} message SubscriptionUpcomingRenewal message or plain object to encode
3580
+ * @param {$protobuf.Writer} [writer] Writer to encode to
3581
+ * @returns {$protobuf.Writer} Writer
3582
+ */
3583
+ SubscriptionUpcomingRenewal.encode = function encode(message, writer) {
3584
+ if (!writer)
3585
+ writer = $Writer.create();
3586
+ if (message.id != null && message.hasOwnProperty("id"))
3587
+ writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.id);
3588
+ if (message.userId != null && message.hasOwnProperty("userId"))
3589
+ writer.uint32(/* id 2, wireType 2 =*/18).string(message.userId);
3590
+ if (message.daysBefore != null && message.hasOwnProperty("daysBefore"))
3591
+ writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.daysBefore);
3592
+ if (message.membership != null && message.hasOwnProperty("membership"))
3593
+ writer.uint32(/* id 4, wireType 0 =*/32).int32(message.membership);
3594
+ if (message.planAffiliation != null && message.hasOwnProperty("planAffiliation"))
3595
+ writer.uint32(/* id 5, wireType 0 =*/40).int32(message.planAffiliation);
3596
+ return writer;
3597
+ };
3598
+
3599
+ /**
3600
+ * Encodes the specified SubscriptionUpcomingRenewal message, length delimited. Does not implicitly {@link SubscriptionUpcomingRenewal.verify|verify} messages.
3601
+ * @function encodeDelimited
3602
+ * @memberof SubscriptionUpcomingRenewal
3603
+ * @static
3604
+ * @param {ISubscriptionUpcomingRenewal} message SubscriptionUpcomingRenewal message or plain object to encode
3605
+ * @param {$protobuf.Writer} [writer] Writer to encode to
3606
+ * @returns {$protobuf.Writer} Writer
3607
+ */
3608
+ SubscriptionUpcomingRenewal.encodeDelimited = function encodeDelimited(message, writer) {
3609
+ return this.encode(message, writer).ldelim();
3610
+ };
3611
+
3612
+ /**
3613
+ * Decodes a SubscriptionUpcomingRenewal message from the specified reader or buffer.
3614
+ * @function decode
3615
+ * @memberof SubscriptionUpcomingRenewal
3616
+ * @static
3617
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
3618
+ * @param {number} [length] Message length if known beforehand
3619
+ * @returns {SubscriptionUpcomingRenewal} SubscriptionUpcomingRenewal
3620
+ * @throws {Error} If the payload is not a reader or valid buffer
3621
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
3622
+ */
3623
+ SubscriptionUpcomingRenewal.decode = function decode(reader, length) {
3624
+ if (!(reader instanceof $Reader))
3625
+ reader = $Reader.create(reader);
3626
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.SubscriptionUpcomingRenewal();
3627
+ while (reader.pos < end) {
3628
+ var tag = reader.uint32();
3629
+ switch (tag >>> 3) {
3630
+ case 1:
3631
+ message.id = reader.uint32();
3632
+ break;
3633
+ case 2:
3634
+ message.userId = reader.string();
3635
+ break;
3636
+ case 3:
3637
+ message.daysBefore = reader.uint32();
3638
+ break;
3639
+ case 4:
3640
+ message.membership = reader.int32();
3641
+ break;
3642
+ case 5:
3643
+ message.planAffiliation = reader.int32();
3644
+ break;
3645
+ default:
3646
+ reader.skipType(tag & 7);
3647
+ break;
3648
+ }
3649
+ }
3650
+ return message;
3651
+ };
3652
+
3653
+ /**
3654
+ * Decodes a SubscriptionUpcomingRenewal message from the specified reader or buffer, length delimited.
3655
+ * @function decodeDelimited
3656
+ * @memberof SubscriptionUpcomingRenewal
3657
+ * @static
3658
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
3659
+ * @returns {SubscriptionUpcomingRenewal} SubscriptionUpcomingRenewal
3660
+ * @throws {Error} If the payload is not a reader or valid buffer
3661
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
3662
+ */
3663
+ SubscriptionUpcomingRenewal.decodeDelimited = function decodeDelimited(reader) {
3664
+ if (!(reader instanceof $Reader))
3665
+ reader = new $Reader(reader);
3666
+ return this.decode(reader, reader.uint32());
3667
+ };
3668
+
3669
+ /**
3670
+ * Verifies a SubscriptionUpcomingRenewal message.
3671
+ * @function verify
3672
+ * @memberof SubscriptionUpcomingRenewal
3673
+ * @static
3674
+ * @param {Object.<string,*>} message Plain object to verify
3675
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
3676
+ */
3677
+ SubscriptionUpcomingRenewal.verify = function verify(message) {
3678
+ if (typeof message !== "object" || message === null)
3679
+ return "object expected";
3680
+ if (message.id != null && message.hasOwnProperty("id"))
3681
+ if (!$util.isInteger(message.id))
3682
+ return "id: integer expected";
3683
+ if (message.userId != null && message.hasOwnProperty("userId"))
3684
+ if (!$util.isString(message.userId))
3685
+ return "userId: string expected";
3686
+ if (message.daysBefore != null && message.hasOwnProperty("daysBefore"))
3687
+ if (!$util.isInteger(message.daysBefore))
3688
+ return "daysBefore: integer expected";
3689
+ if (message.membership != null && message.hasOwnProperty("membership"))
3690
+ switch (message.membership) {
3691
+ default:
3692
+ return "membership: enum value expected";
3693
+ case 0:
3694
+ case 1:
3695
+ break;
3696
+ }
3697
+ if (message.planAffiliation != null && message.hasOwnProperty("planAffiliation"))
3698
+ switch (message.planAffiliation) {
3699
+ default:
3700
+ return "planAffiliation: enum value expected";
3701
+ case 0:
3702
+ case 1:
3703
+ case 2:
3704
+ break;
3705
+ }
3706
+ return null;
3707
+ };
3708
+
3709
+ /**
3710
+ * Creates a SubscriptionUpcomingRenewal message from a plain object. Also converts values to their respective internal types.
3711
+ * @function fromObject
3712
+ * @memberof SubscriptionUpcomingRenewal
3713
+ * @static
3714
+ * @param {Object.<string,*>} object Plain object
3715
+ * @returns {SubscriptionUpcomingRenewal} SubscriptionUpcomingRenewal
3716
+ */
3717
+ SubscriptionUpcomingRenewal.fromObject = function fromObject(object) {
3718
+ if (object instanceof $root.SubscriptionUpcomingRenewal)
3719
+ return object;
3720
+ var message = new $root.SubscriptionUpcomingRenewal();
3721
+ if (object.id != null)
3722
+ message.id = object.id >>> 0;
3723
+ if (object.userId != null)
3724
+ message.userId = String(object.userId);
3725
+ if (object.daysBefore != null)
3726
+ message.daysBefore = object.daysBefore >>> 0;
3727
+ switch (object.membership) {
3728
+ case "PRIMARY":
3729
+ case 0:
3730
+ message.membership = 0;
3731
+ break;
3732
+ case "MEMBER":
3733
+ case 1:
3734
+ message.membership = 1;
3735
+ break;
3736
+ }
3737
+ switch (object.planAffiliation) {
3738
+ case "STUDENT":
3739
+ case 0:
3740
+ message.planAffiliation = 0;
3741
+ break;
3742
+ case "VETERAN":
3743
+ case 1:
3744
+ message.planAffiliation = 1;
3745
+ break;
3746
+ case "FAMILY":
3747
+ case 2:
3748
+ message.planAffiliation = 2;
3749
+ break;
3750
+ }
3751
+ return message;
3752
+ };
3753
+
3754
+ /**
3755
+ * Creates a plain object from a SubscriptionUpcomingRenewal message. Also converts values to other types if specified.
3756
+ * @function toObject
3757
+ * @memberof SubscriptionUpcomingRenewal
3758
+ * @static
3759
+ * @param {SubscriptionUpcomingRenewal} message SubscriptionUpcomingRenewal
3760
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
3761
+ * @returns {Object.<string,*>} Plain object
3762
+ */
3763
+ SubscriptionUpcomingRenewal.toObject = function toObject(message, options) {
3764
+ if (!options)
3765
+ options = {};
3766
+ var object = {};
3767
+ if (options.defaults) {
3768
+ object.id = 0;
3769
+ object.userId = "";
3770
+ object.daysBefore = 0;
3771
+ object.membership = options.enums === String ? "PRIMARY" : 0;
3772
+ object.planAffiliation = options.enums === String ? "STUDENT" : 0;
3773
+ }
3774
+ if (message.id != null && message.hasOwnProperty("id"))
3775
+ object.id = message.id;
3776
+ if (message.userId != null && message.hasOwnProperty("userId"))
3777
+ object.userId = message.userId;
3778
+ if (message.daysBefore != null && message.hasOwnProperty("daysBefore"))
3779
+ object.daysBefore = message.daysBefore;
3780
+ if (message.membership != null && message.hasOwnProperty("membership"))
3781
+ object.membership = options.enums === String ? $root.subscription.SubscriptionMembership[message.membership] : message.membership;
3782
+ if (message.planAffiliation != null && message.hasOwnProperty("planAffiliation"))
3783
+ object.planAffiliation = options.enums === String ? $root.subscription.PlanAffiliation[message.planAffiliation] : message.planAffiliation;
3784
+ return object;
3785
+ };
3786
+
3787
+ /**
3788
+ * Converts this SubscriptionUpcomingRenewal to JSON.
3789
+ * @function toJSON
3790
+ * @memberof SubscriptionUpcomingRenewal
3791
+ * @instance
3792
+ * @returns {Object.<string,*>} JSON object
3793
+ */
3794
+ SubscriptionUpcomingRenewal.prototype.toJSON = function toJSON() {
3795
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
3796
+ };
3797
+
3798
+ return SubscriptionUpcomingRenewal;
3799
+ })();
3800
+
2952
3801
  $root.UserPasswordUpdated = (function() {
2953
3802
 
2954
3803
  /**
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.3.0"
19
+ "version": "1.5.0"
20
20
  }