@headspace/protos-events 1.2.0 → 1.4.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
@@ -13,6 +13,12 @@ export interface IFamilyMemberAdded {
13
13
 
14
14
  /** FamilyMemberAdded userGroupId */
15
15
  userGroupId?: (number|null);
16
+
17
+ /** FamilyMemberAdded email */
18
+ email?: (string|null);
19
+
20
+ /** FamilyMemberAdded token */
21
+ token?: (string|null);
16
22
  }
17
23
 
18
24
  /** Represents a FamilyMemberAdded. */
@@ -36,6 +42,12 @@ export class FamilyMemberAdded implements IFamilyMemberAdded {
36
42
  /** FamilyMemberAdded userGroupId. */
37
43
  public userGroupId: number;
38
44
 
45
+ /** FamilyMemberAdded email. */
46
+ public email: string;
47
+
48
+ /** FamilyMemberAdded token. */
49
+ public token: string;
50
+
39
51
  /**
40
52
  * Creates a new FamilyMemberAdded instance using the specified properties.
41
53
  * @param [properties] Properties to set
@@ -557,6 +569,210 @@ export class VoiceDeviceConnected implements IVoiceDeviceConnected {
557
569
  public toJSON(): { [k: string]: any };
558
570
  }
559
571
 
572
+ /** Properties of a CheckInResponse. */
573
+ export interface ICheckInResponse {
574
+
575
+ /** CheckInResponse questionId */
576
+ questionId?: (number|null);
577
+
578
+ /** CheckInResponse response */
579
+ response?: (string|null);
580
+ }
581
+
582
+ /** Represents a CheckInResponse. */
583
+ export class CheckInResponse implements ICheckInResponse {
584
+
585
+ /**
586
+ * Constructs a new CheckInResponse.
587
+ * @param [properties] Properties to set
588
+ */
589
+ constructor(properties?: ICheckInResponse);
590
+
591
+ /** CheckInResponse questionId. */
592
+ public questionId: number;
593
+
594
+ /** CheckInResponse response. */
595
+ public response: string;
596
+
597
+ /**
598
+ * Creates a new CheckInResponse instance using the specified properties.
599
+ * @param [properties] Properties to set
600
+ * @returns CheckInResponse instance
601
+ */
602
+ public static create(properties?: ICheckInResponse): CheckInResponse;
603
+
604
+ /**
605
+ * Encodes the specified CheckInResponse message. Does not implicitly {@link CheckInResponse.verify|verify} messages.
606
+ * @param message CheckInResponse message or plain object to encode
607
+ * @param [writer] Writer to encode to
608
+ * @returns Writer
609
+ */
610
+ public static encode(message: ICheckInResponse, writer?: $protobuf.Writer): $protobuf.Writer;
611
+
612
+ /**
613
+ * Encodes the specified CheckInResponse message, length delimited. Does not implicitly {@link CheckInResponse.verify|verify} messages.
614
+ * @param message CheckInResponse message or plain object to encode
615
+ * @param [writer] Writer to encode to
616
+ * @returns Writer
617
+ */
618
+ public static encodeDelimited(message: ICheckInResponse, writer?: $protobuf.Writer): $protobuf.Writer;
619
+
620
+ /**
621
+ * Decodes a CheckInResponse message from the specified reader or buffer.
622
+ * @param reader Reader or buffer to decode from
623
+ * @param [length] Message length if known beforehand
624
+ * @returns CheckInResponse
625
+ * @throws {Error} If the payload is not a reader or valid buffer
626
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
627
+ */
628
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): CheckInResponse;
629
+
630
+ /**
631
+ * Decodes a CheckInResponse message from the specified reader or buffer, length delimited.
632
+ * @param reader Reader or buffer to decode from
633
+ * @returns CheckInResponse
634
+ * @throws {Error} If the payload is not a reader or valid buffer
635
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
636
+ */
637
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): CheckInResponse;
638
+
639
+ /**
640
+ * Verifies a CheckInResponse message.
641
+ * @param message Plain object to verify
642
+ * @returns `null` if valid, otherwise the reason why it is not
643
+ */
644
+ public static verify(message: { [k: string]: any }): (string|null);
645
+
646
+ /**
647
+ * Creates a CheckInResponse message from a plain object. Also converts values to their respective internal types.
648
+ * @param object Plain object
649
+ * @returns CheckInResponse
650
+ */
651
+ public static fromObject(object: { [k: string]: any }): CheckInResponse;
652
+
653
+ /**
654
+ * Creates a plain object from a CheckInResponse message. Also converts values to other types if specified.
655
+ * @param message CheckInResponse
656
+ * @param [options] Conversion options
657
+ * @returns Plain object
658
+ */
659
+ public static toObject(message: CheckInResponse, options?: $protobuf.IConversionOptions): { [k: string]: any };
660
+
661
+ /**
662
+ * Converts this CheckInResponse to JSON.
663
+ * @returns JSON object
664
+ */
665
+ public toJSON(): { [k: string]: any };
666
+ }
667
+
668
+ /** Properties of a CheckInCompleted. */
669
+ export interface ICheckInCompleted {
670
+
671
+ /** CheckInCompleted userId */
672
+ userId?: (string|null);
673
+
674
+ /** CheckInCompleted timestamp */
675
+ timestamp?: (number|Long|null);
676
+
677
+ /** CheckInCompleted checkInId */
678
+ checkInId?: (number|null);
679
+
680
+ /** CheckInCompleted responses */
681
+ responses?: (ICheckInResponse[]|null);
682
+ }
683
+
684
+ /** Represents a CheckInCompleted. */
685
+ export class CheckInCompleted implements ICheckInCompleted {
686
+
687
+ /**
688
+ * Constructs a new CheckInCompleted.
689
+ * @param [properties] Properties to set
690
+ */
691
+ constructor(properties?: ICheckInCompleted);
692
+
693
+ /** CheckInCompleted userId. */
694
+ public userId: string;
695
+
696
+ /** CheckInCompleted timestamp. */
697
+ public timestamp: (number|Long);
698
+
699
+ /** CheckInCompleted checkInId. */
700
+ public checkInId: number;
701
+
702
+ /** CheckInCompleted responses. */
703
+ public responses: ICheckInResponse[];
704
+
705
+ /**
706
+ * Creates a new CheckInCompleted instance using the specified properties.
707
+ * @param [properties] Properties to set
708
+ * @returns CheckInCompleted instance
709
+ */
710
+ public static create(properties?: ICheckInCompleted): CheckInCompleted;
711
+
712
+ /**
713
+ * Encodes the specified CheckInCompleted message. Does not implicitly {@link CheckInCompleted.verify|verify} messages.
714
+ * @param message CheckInCompleted message or plain object to encode
715
+ * @param [writer] Writer to encode to
716
+ * @returns Writer
717
+ */
718
+ public static encode(message: ICheckInCompleted, writer?: $protobuf.Writer): $protobuf.Writer;
719
+
720
+ /**
721
+ * Encodes the specified CheckInCompleted message, length delimited. Does not implicitly {@link CheckInCompleted.verify|verify} messages.
722
+ * @param message CheckInCompleted message or plain object to encode
723
+ * @param [writer] Writer to encode to
724
+ * @returns Writer
725
+ */
726
+ public static encodeDelimited(message: ICheckInCompleted, writer?: $protobuf.Writer): $protobuf.Writer;
727
+
728
+ /**
729
+ * Decodes a CheckInCompleted message from the specified reader or buffer.
730
+ * @param reader Reader or buffer to decode from
731
+ * @param [length] Message length if known beforehand
732
+ * @returns CheckInCompleted
733
+ * @throws {Error} If the payload is not a reader or valid buffer
734
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
735
+ */
736
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): CheckInCompleted;
737
+
738
+ /**
739
+ * Decodes a CheckInCompleted message from the specified reader or buffer, length delimited.
740
+ * @param reader Reader or buffer to decode from
741
+ * @returns CheckInCompleted
742
+ * @throws {Error} If the payload is not a reader or valid buffer
743
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
744
+ */
745
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): CheckInCompleted;
746
+
747
+ /**
748
+ * Verifies a CheckInCompleted message.
749
+ * @param message Plain object to verify
750
+ * @returns `null` if valid, otherwise the reason why it is not
751
+ */
752
+ public static verify(message: { [k: string]: any }): (string|null);
753
+
754
+ /**
755
+ * Creates a CheckInCompleted message from a plain object. Also converts values to their respective internal types.
756
+ * @param object Plain object
757
+ * @returns CheckInCompleted
758
+ */
759
+ public static fromObject(object: { [k: string]: any }): CheckInCompleted;
760
+
761
+ /**
762
+ * Creates a plain object from a CheckInCompleted message. Also converts values to other types if specified.
763
+ * @param message CheckInCompleted
764
+ * @param [options] Conversion options
765
+ * @returns Plain object
766
+ */
767
+ public static toObject(message: CheckInCompleted, options?: $protobuf.IConversionOptions): { [k: string]: any };
768
+
769
+ /**
770
+ * Converts this CheckInCompleted to JSON.
771
+ * @returns JSON object
772
+ */
773
+ public toJSON(): { [k: string]: any };
774
+ }
775
+
560
776
  /** Properties of a SleepcastEpisodeCompleted. */
561
777
  export interface ISleepcastEpisodeCompleted {
562
778
 
package/lib/index.js CHANGED
@@ -19,6 +19,8 @@ $root.FamilyMemberAdded = (function() {
19
19
  * @property {number|null} [userGroupEntryId] FamilyMemberAdded userGroupEntryId
20
20
  * @property {string|null} [userId] FamilyMemberAdded userId
21
21
  * @property {number|null} [userGroupId] FamilyMemberAdded userGroupId
22
+ * @property {string|null} [email] FamilyMemberAdded email
23
+ * @property {string|null} [token] FamilyMemberAdded token
22
24
  */
23
25
 
24
26
  /**
@@ -68,6 +70,22 @@ $root.FamilyMemberAdded = (function() {
68
70
  */
69
71
  FamilyMemberAdded.prototype.userGroupId = 0;
70
72
 
73
+ /**
74
+ * FamilyMemberAdded email.
75
+ * @member {string} email
76
+ * @memberof FamilyMemberAdded
77
+ * @instance
78
+ */
79
+ FamilyMemberAdded.prototype.email = "";
80
+
81
+ /**
82
+ * FamilyMemberAdded token.
83
+ * @member {string} token
84
+ * @memberof FamilyMemberAdded
85
+ * @instance
86
+ */
87
+ FamilyMemberAdded.prototype.token = "";
88
+
71
89
  /**
72
90
  * Creates a new FamilyMemberAdded instance using the specified properties.
73
91
  * @function create
@@ -100,6 +118,10 @@ $root.FamilyMemberAdded = (function() {
100
118
  writer.uint32(/* id 3, wireType 2 =*/26).string(message.userId);
101
119
  if (message.userGroupId != null && message.hasOwnProperty("userGroupId"))
102
120
  writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.userGroupId);
121
+ if (message.email != null && message.hasOwnProperty("email"))
122
+ writer.uint32(/* id 5, wireType 2 =*/42).string(message.email);
123
+ if (message.token != null && message.hasOwnProperty("token"))
124
+ writer.uint32(/* id 6, wireType 2 =*/50).string(message.token);
103
125
  return writer;
104
126
  };
105
127
 
@@ -146,6 +168,12 @@ $root.FamilyMemberAdded = (function() {
146
168
  case 4:
147
169
  message.userGroupId = reader.uint32();
148
170
  break;
171
+ case 5:
172
+ message.email = reader.string();
173
+ break;
174
+ case 6:
175
+ message.token = reader.string();
176
+ break;
149
177
  default:
150
178
  reader.skipType(tag & 7);
151
179
  break;
@@ -193,6 +221,12 @@ $root.FamilyMemberAdded = (function() {
193
221
  if (message.userGroupId != null && message.hasOwnProperty("userGroupId"))
194
222
  if (!$util.isInteger(message.userGroupId))
195
223
  return "userGroupId: integer expected";
224
+ if (message.email != null && message.hasOwnProperty("email"))
225
+ if (!$util.isString(message.email))
226
+ return "email: string expected";
227
+ if (message.token != null && message.hasOwnProperty("token"))
228
+ if (!$util.isString(message.token))
229
+ return "token: string expected";
196
230
  return null;
197
231
  };
198
232
 
@@ -223,6 +257,10 @@ $root.FamilyMemberAdded = (function() {
223
257
  message.userId = String(object.userId);
224
258
  if (object.userGroupId != null)
225
259
  message.userGroupId = object.userGroupId >>> 0;
260
+ if (object.email != null)
261
+ message.email = String(object.email);
262
+ if (object.token != null)
263
+ message.token = String(object.token);
226
264
  return message;
227
265
  };
228
266
 
@@ -248,6 +286,8 @@ $root.FamilyMemberAdded = (function() {
248
286
  object.userGroupEntryId = 0;
249
287
  object.userId = "";
250
288
  object.userGroupId = 0;
289
+ object.email = "";
290
+ object.token = "";
251
291
  }
252
292
  if (message.timestamp != null && message.hasOwnProperty("timestamp"))
253
293
  if (typeof message.timestamp === "number")
@@ -260,6 +300,10 @@ $root.FamilyMemberAdded = (function() {
260
300
  object.userId = message.userId;
261
301
  if (message.userGroupId != null && message.hasOwnProperty("userGroupId"))
262
302
  object.userGroupId = message.userGroupId;
303
+ if (message.email != null && message.hasOwnProperty("email"))
304
+ object.email = message.email;
305
+ if (message.token != null && message.hasOwnProperty("token"))
306
+ object.token = message.token;
263
307
  return object;
264
308
  };
265
309
 
@@ -1415,6 +1459,506 @@ $root.VoiceDeviceConnected = (function() {
1415
1459
  return VoiceDeviceConnected;
1416
1460
  })();
1417
1461
 
1462
+ $root.CheckInResponse = (function() {
1463
+
1464
+ /**
1465
+ * Properties of a CheckInResponse.
1466
+ * @exports ICheckInResponse
1467
+ * @interface ICheckInResponse
1468
+ * @property {number|null} [questionId] CheckInResponse questionId
1469
+ * @property {string|null} [response] CheckInResponse response
1470
+ */
1471
+
1472
+ /**
1473
+ * Constructs a new CheckInResponse.
1474
+ * @exports CheckInResponse
1475
+ * @classdesc Represents a CheckInResponse.
1476
+ * @implements ICheckInResponse
1477
+ * @constructor
1478
+ * @param {ICheckInResponse=} [properties] Properties to set
1479
+ */
1480
+ function CheckInResponse(properties) {
1481
+ if (properties)
1482
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
1483
+ if (properties[keys[i]] != null)
1484
+ this[keys[i]] = properties[keys[i]];
1485
+ }
1486
+
1487
+ /**
1488
+ * CheckInResponse questionId.
1489
+ * @member {number} questionId
1490
+ * @memberof CheckInResponse
1491
+ * @instance
1492
+ */
1493
+ CheckInResponse.prototype.questionId = 0;
1494
+
1495
+ /**
1496
+ * CheckInResponse response.
1497
+ * @member {string} response
1498
+ * @memberof CheckInResponse
1499
+ * @instance
1500
+ */
1501
+ CheckInResponse.prototype.response = "";
1502
+
1503
+ /**
1504
+ * Creates a new CheckInResponse instance using the specified properties.
1505
+ * @function create
1506
+ * @memberof CheckInResponse
1507
+ * @static
1508
+ * @param {ICheckInResponse=} [properties] Properties to set
1509
+ * @returns {CheckInResponse} CheckInResponse instance
1510
+ */
1511
+ CheckInResponse.create = function create(properties) {
1512
+ return new CheckInResponse(properties);
1513
+ };
1514
+
1515
+ /**
1516
+ * Encodes the specified CheckInResponse message. Does not implicitly {@link CheckInResponse.verify|verify} messages.
1517
+ * @function encode
1518
+ * @memberof CheckInResponse
1519
+ * @static
1520
+ * @param {ICheckInResponse} message CheckInResponse message or plain object to encode
1521
+ * @param {$protobuf.Writer} [writer] Writer to encode to
1522
+ * @returns {$protobuf.Writer} Writer
1523
+ */
1524
+ CheckInResponse.encode = function encode(message, writer) {
1525
+ if (!writer)
1526
+ writer = $Writer.create();
1527
+ if (message.questionId != null && message.hasOwnProperty("questionId"))
1528
+ writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.questionId);
1529
+ if (message.response != null && message.hasOwnProperty("response"))
1530
+ writer.uint32(/* id 2, wireType 2 =*/18).string(message.response);
1531
+ return writer;
1532
+ };
1533
+
1534
+ /**
1535
+ * Encodes the specified CheckInResponse message, length delimited. Does not implicitly {@link CheckInResponse.verify|verify} messages.
1536
+ * @function encodeDelimited
1537
+ * @memberof CheckInResponse
1538
+ * @static
1539
+ * @param {ICheckInResponse} message CheckInResponse message or plain object to encode
1540
+ * @param {$protobuf.Writer} [writer] Writer to encode to
1541
+ * @returns {$protobuf.Writer} Writer
1542
+ */
1543
+ CheckInResponse.encodeDelimited = function encodeDelimited(message, writer) {
1544
+ return this.encode(message, writer).ldelim();
1545
+ };
1546
+
1547
+ /**
1548
+ * Decodes a CheckInResponse message from the specified reader or buffer.
1549
+ * @function decode
1550
+ * @memberof CheckInResponse
1551
+ * @static
1552
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
1553
+ * @param {number} [length] Message length if known beforehand
1554
+ * @returns {CheckInResponse} CheckInResponse
1555
+ * @throws {Error} If the payload is not a reader or valid buffer
1556
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
1557
+ */
1558
+ CheckInResponse.decode = function decode(reader, length) {
1559
+ if (!(reader instanceof $Reader))
1560
+ reader = $Reader.create(reader);
1561
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CheckInResponse();
1562
+ while (reader.pos < end) {
1563
+ var tag = reader.uint32();
1564
+ switch (tag >>> 3) {
1565
+ case 1:
1566
+ message.questionId = reader.uint32();
1567
+ break;
1568
+ case 2:
1569
+ message.response = reader.string();
1570
+ break;
1571
+ default:
1572
+ reader.skipType(tag & 7);
1573
+ break;
1574
+ }
1575
+ }
1576
+ return message;
1577
+ };
1578
+
1579
+ /**
1580
+ * Decodes a CheckInResponse message from the specified reader or buffer, length delimited.
1581
+ * @function decodeDelimited
1582
+ * @memberof CheckInResponse
1583
+ * @static
1584
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
1585
+ * @returns {CheckInResponse} CheckInResponse
1586
+ * @throws {Error} If the payload is not a reader or valid buffer
1587
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
1588
+ */
1589
+ CheckInResponse.decodeDelimited = function decodeDelimited(reader) {
1590
+ if (!(reader instanceof $Reader))
1591
+ reader = new $Reader(reader);
1592
+ return this.decode(reader, reader.uint32());
1593
+ };
1594
+
1595
+ /**
1596
+ * Verifies a CheckInResponse message.
1597
+ * @function verify
1598
+ * @memberof CheckInResponse
1599
+ * @static
1600
+ * @param {Object.<string,*>} message Plain object to verify
1601
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
1602
+ */
1603
+ CheckInResponse.verify = function verify(message) {
1604
+ if (typeof message !== "object" || message === null)
1605
+ return "object expected";
1606
+ if (message.questionId != null && message.hasOwnProperty("questionId"))
1607
+ if (!$util.isInteger(message.questionId))
1608
+ return "questionId: integer expected";
1609
+ if (message.response != null && message.hasOwnProperty("response"))
1610
+ if (!$util.isString(message.response))
1611
+ return "response: string expected";
1612
+ return null;
1613
+ };
1614
+
1615
+ /**
1616
+ * Creates a CheckInResponse message from a plain object. Also converts values to their respective internal types.
1617
+ * @function fromObject
1618
+ * @memberof CheckInResponse
1619
+ * @static
1620
+ * @param {Object.<string,*>} object Plain object
1621
+ * @returns {CheckInResponse} CheckInResponse
1622
+ */
1623
+ CheckInResponse.fromObject = function fromObject(object) {
1624
+ if (object instanceof $root.CheckInResponse)
1625
+ return object;
1626
+ var message = new $root.CheckInResponse();
1627
+ if (object.questionId != null)
1628
+ message.questionId = object.questionId >>> 0;
1629
+ if (object.response != null)
1630
+ message.response = String(object.response);
1631
+ return message;
1632
+ };
1633
+
1634
+ /**
1635
+ * Creates a plain object from a CheckInResponse message. Also converts values to other types if specified.
1636
+ * @function toObject
1637
+ * @memberof CheckInResponse
1638
+ * @static
1639
+ * @param {CheckInResponse} message CheckInResponse
1640
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
1641
+ * @returns {Object.<string,*>} Plain object
1642
+ */
1643
+ CheckInResponse.toObject = function toObject(message, options) {
1644
+ if (!options)
1645
+ options = {};
1646
+ var object = {};
1647
+ if (options.defaults) {
1648
+ object.questionId = 0;
1649
+ object.response = "";
1650
+ }
1651
+ if (message.questionId != null && message.hasOwnProperty("questionId"))
1652
+ object.questionId = message.questionId;
1653
+ if (message.response != null && message.hasOwnProperty("response"))
1654
+ object.response = message.response;
1655
+ return object;
1656
+ };
1657
+
1658
+ /**
1659
+ * Converts this CheckInResponse to JSON.
1660
+ * @function toJSON
1661
+ * @memberof CheckInResponse
1662
+ * @instance
1663
+ * @returns {Object.<string,*>} JSON object
1664
+ */
1665
+ CheckInResponse.prototype.toJSON = function toJSON() {
1666
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
1667
+ };
1668
+
1669
+ return CheckInResponse;
1670
+ })();
1671
+
1672
+ $root.CheckInCompleted = (function() {
1673
+
1674
+ /**
1675
+ * Properties of a CheckInCompleted.
1676
+ * @exports ICheckInCompleted
1677
+ * @interface ICheckInCompleted
1678
+ * @property {string|null} [userId] CheckInCompleted userId
1679
+ * @property {number|Long|null} [timestamp] CheckInCompleted timestamp
1680
+ * @property {number|null} [checkInId] CheckInCompleted checkInId
1681
+ * @property {Array.<ICheckInResponse>|null} [responses] CheckInCompleted responses
1682
+ */
1683
+
1684
+ /**
1685
+ * Constructs a new CheckInCompleted.
1686
+ * @exports CheckInCompleted
1687
+ * @classdesc Represents a CheckInCompleted.
1688
+ * @implements ICheckInCompleted
1689
+ * @constructor
1690
+ * @param {ICheckInCompleted=} [properties] Properties to set
1691
+ */
1692
+ function CheckInCompleted(properties) {
1693
+ this.responses = [];
1694
+ if (properties)
1695
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
1696
+ if (properties[keys[i]] != null)
1697
+ this[keys[i]] = properties[keys[i]];
1698
+ }
1699
+
1700
+ /**
1701
+ * CheckInCompleted userId.
1702
+ * @member {string} userId
1703
+ * @memberof CheckInCompleted
1704
+ * @instance
1705
+ */
1706
+ CheckInCompleted.prototype.userId = "";
1707
+
1708
+ /**
1709
+ * CheckInCompleted timestamp.
1710
+ * @member {number|Long} timestamp
1711
+ * @memberof CheckInCompleted
1712
+ * @instance
1713
+ */
1714
+ CheckInCompleted.prototype.timestamp = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
1715
+
1716
+ /**
1717
+ * CheckInCompleted checkInId.
1718
+ * @member {number} checkInId
1719
+ * @memberof CheckInCompleted
1720
+ * @instance
1721
+ */
1722
+ CheckInCompleted.prototype.checkInId = 0;
1723
+
1724
+ /**
1725
+ * CheckInCompleted responses.
1726
+ * @member {Array.<ICheckInResponse>} responses
1727
+ * @memberof CheckInCompleted
1728
+ * @instance
1729
+ */
1730
+ CheckInCompleted.prototype.responses = $util.emptyArray;
1731
+
1732
+ /**
1733
+ * Creates a new CheckInCompleted instance using the specified properties.
1734
+ * @function create
1735
+ * @memberof CheckInCompleted
1736
+ * @static
1737
+ * @param {ICheckInCompleted=} [properties] Properties to set
1738
+ * @returns {CheckInCompleted} CheckInCompleted instance
1739
+ */
1740
+ CheckInCompleted.create = function create(properties) {
1741
+ return new CheckInCompleted(properties);
1742
+ };
1743
+
1744
+ /**
1745
+ * Encodes the specified CheckInCompleted message. Does not implicitly {@link CheckInCompleted.verify|verify} messages.
1746
+ * @function encode
1747
+ * @memberof CheckInCompleted
1748
+ * @static
1749
+ * @param {ICheckInCompleted} message CheckInCompleted message or plain object to encode
1750
+ * @param {$protobuf.Writer} [writer] Writer to encode to
1751
+ * @returns {$protobuf.Writer} Writer
1752
+ */
1753
+ CheckInCompleted.encode = function encode(message, writer) {
1754
+ if (!writer)
1755
+ writer = $Writer.create();
1756
+ if (message.userId != null && message.hasOwnProperty("userId"))
1757
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.userId);
1758
+ if (message.timestamp != null && message.hasOwnProperty("timestamp"))
1759
+ writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.timestamp);
1760
+ if (message.checkInId != null && message.hasOwnProperty("checkInId"))
1761
+ writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.checkInId);
1762
+ if (message.responses != null && message.responses.length)
1763
+ for (var i = 0; i < message.responses.length; ++i)
1764
+ $root.CheckInResponse.encode(message.responses[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
1765
+ return writer;
1766
+ };
1767
+
1768
+ /**
1769
+ * Encodes the specified CheckInCompleted message, length delimited. Does not implicitly {@link CheckInCompleted.verify|verify} messages.
1770
+ * @function encodeDelimited
1771
+ * @memberof CheckInCompleted
1772
+ * @static
1773
+ * @param {ICheckInCompleted} message CheckInCompleted message or plain object to encode
1774
+ * @param {$protobuf.Writer} [writer] Writer to encode to
1775
+ * @returns {$protobuf.Writer} Writer
1776
+ */
1777
+ CheckInCompleted.encodeDelimited = function encodeDelimited(message, writer) {
1778
+ return this.encode(message, writer).ldelim();
1779
+ };
1780
+
1781
+ /**
1782
+ * Decodes a CheckInCompleted message from the specified reader or buffer.
1783
+ * @function decode
1784
+ * @memberof CheckInCompleted
1785
+ * @static
1786
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
1787
+ * @param {number} [length] Message length if known beforehand
1788
+ * @returns {CheckInCompleted} CheckInCompleted
1789
+ * @throws {Error} If the payload is not a reader or valid buffer
1790
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
1791
+ */
1792
+ CheckInCompleted.decode = function decode(reader, length) {
1793
+ if (!(reader instanceof $Reader))
1794
+ reader = $Reader.create(reader);
1795
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CheckInCompleted();
1796
+ while (reader.pos < end) {
1797
+ var tag = reader.uint32();
1798
+ switch (tag >>> 3) {
1799
+ case 1:
1800
+ message.userId = reader.string();
1801
+ break;
1802
+ case 2:
1803
+ message.timestamp = reader.uint64();
1804
+ break;
1805
+ case 3:
1806
+ message.checkInId = reader.uint32();
1807
+ break;
1808
+ case 4:
1809
+ if (!(message.responses && message.responses.length))
1810
+ message.responses = [];
1811
+ message.responses.push($root.CheckInResponse.decode(reader, reader.uint32()));
1812
+ break;
1813
+ default:
1814
+ reader.skipType(tag & 7);
1815
+ break;
1816
+ }
1817
+ }
1818
+ return message;
1819
+ };
1820
+
1821
+ /**
1822
+ * Decodes a CheckInCompleted message from the specified reader or buffer, length delimited.
1823
+ * @function decodeDelimited
1824
+ * @memberof CheckInCompleted
1825
+ * @static
1826
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
1827
+ * @returns {CheckInCompleted} CheckInCompleted
1828
+ * @throws {Error} If the payload is not a reader or valid buffer
1829
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
1830
+ */
1831
+ CheckInCompleted.decodeDelimited = function decodeDelimited(reader) {
1832
+ if (!(reader instanceof $Reader))
1833
+ reader = new $Reader(reader);
1834
+ return this.decode(reader, reader.uint32());
1835
+ };
1836
+
1837
+ /**
1838
+ * Verifies a CheckInCompleted message.
1839
+ * @function verify
1840
+ * @memberof CheckInCompleted
1841
+ * @static
1842
+ * @param {Object.<string,*>} message Plain object to verify
1843
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
1844
+ */
1845
+ CheckInCompleted.verify = function verify(message) {
1846
+ if (typeof message !== "object" || message === null)
1847
+ return "object expected";
1848
+ if (message.userId != null && message.hasOwnProperty("userId"))
1849
+ if (!$util.isString(message.userId))
1850
+ return "userId: string expected";
1851
+ if (message.timestamp != null && message.hasOwnProperty("timestamp"))
1852
+ if (!$util.isInteger(message.timestamp) && !(message.timestamp && $util.isInteger(message.timestamp.low) && $util.isInteger(message.timestamp.high)))
1853
+ return "timestamp: integer|Long expected";
1854
+ if (message.checkInId != null && message.hasOwnProperty("checkInId"))
1855
+ if (!$util.isInteger(message.checkInId))
1856
+ return "checkInId: integer expected";
1857
+ if (message.responses != null && message.hasOwnProperty("responses")) {
1858
+ if (!Array.isArray(message.responses))
1859
+ return "responses: array expected";
1860
+ for (var i = 0; i < message.responses.length; ++i) {
1861
+ var error = $root.CheckInResponse.verify(message.responses[i]);
1862
+ if (error)
1863
+ return "responses." + error;
1864
+ }
1865
+ }
1866
+ return null;
1867
+ };
1868
+
1869
+ /**
1870
+ * Creates a CheckInCompleted message from a plain object. Also converts values to their respective internal types.
1871
+ * @function fromObject
1872
+ * @memberof CheckInCompleted
1873
+ * @static
1874
+ * @param {Object.<string,*>} object Plain object
1875
+ * @returns {CheckInCompleted} CheckInCompleted
1876
+ */
1877
+ CheckInCompleted.fromObject = function fromObject(object) {
1878
+ if (object instanceof $root.CheckInCompleted)
1879
+ return object;
1880
+ var message = new $root.CheckInCompleted();
1881
+ if (object.userId != null)
1882
+ message.userId = String(object.userId);
1883
+ if (object.timestamp != null)
1884
+ if ($util.Long)
1885
+ (message.timestamp = $util.Long.fromValue(object.timestamp)).unsigned = true;
1886
+ else if (typeof object.timestamp === "string")
1887
+ message.timestamp = parseInt(object.timestamp, 10);
1888
+ else if (typeof object.timestamp === "number")
1889
+ message.timestamp = object.timestamp;
1890
+ else if (typeof object.timestamp === "object")
1891
+ message.timestamp = new $util.LongBits(object.timestamp.low >>> 0, object.timestamp.high >>> 0).toNumber(true);
1892
+ if (object.checkInId != null)
1893
+ message.checkInId = object.checkInId >>> 0;
1894
+ if (object.responses) {
1895
+ if (!Array.isArray(object.responses))
1896
+ throw TypeError(".CheckInCompleted.responses: array expected");
1897
+ message.responses = [];
1898
+ for (var i = 0; i < object.responses.length; ++i) {
1899
+ if (typeof object.responses[i] !== "object")
1900
+ throw TypeError(".CheckInCompleted.responses: object expected");
1901
+ message.responses[i] = $root.CheckInResponse.fromObject(object.responses[i]);
1902
+ }
1903
+ }
1904
+ return message;
1905
+ };
1906
+
1907
+ /**
1908
+ * Creates a plain object from a CheckInCompleted message. Also converts values to other types if specified.
1909
+ * @function toObject
1910
+ * @memberof CheckInCompleted
1911
+ * @static
1912
+ * @param {CheckInCompleted} message CheckInCompleted
1913
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
1914
+ * @returns {Object.<string,*>} Plain object
1915
+ */
1916
+ CheckInCompleted.toObject = function toObject(message, options) {
1917
+ if (!options)
1918
+ options = {};
1919
+ var object = {};
1920
+ if (options.arrays || options.defaults)
1921
+ object.responses = [];
1922
+ if (options.defaults) {
1923
+ object.userId = "";
1924
+ if ($util.Long) {
1925
+ var long = new $util.Long(0, 0, true);
1926
+ object.timestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
1927
+ } else
1928
+ object.timestamp = options.longs === String ? "0" : 0;
1929
+ object.checkInId = 0;
1930
+ }
1931
+ if (message.userId != null && message.hasOwnProperty("userId"))
1932
+ object.userId = message.userId;
1933
+ if (message.timestamp != null && message.hasOwnProperty("timestamp"))
1934
+ if (typeof message.timestamp === "number")
1935
+ object.timestamp = options.longs === String ? String(message.timestamp) : message.timestamp;
1936
+ else
1937
+ 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;
1938
+ if (message.checkInId != null && message.hasOwnProperty("checkInId"))
1939
+ object.checkInId = message.checkInId;
1940
+ if (message.responses && message.responses.length) {
1941
+ object.responses = [];
1942
+ for (var j = 0; j < message.responses.length; ++j)
1943
+ object.responses[j] = $root.CheckInResponse.toObject(message.responses[j], options);
1944
+ }
1945
+ return object;
1946
+ };
1947
+
1948
+ /**
1949
+ * Converts this CheckInCompleted to JSON.
1950
+ * @function toJSON
1951
+ * @memberof CheckInCompleted
1952
+ * @instance
1953
+ * @returns {Object.<string,*>} JSON object
1954
+ */
1955
+ CheckInCompleted.prototype.toJSON = function toJSON() {
1956
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
1957
+ };
1958
+
1959
+ return CheckInCompleted;
1960
+ })();
1961
+
1418
1962
  $root.SleepcastEpisodeCompleted = (function() {
1419
1963
 
1420
1964
  /**
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.2.0"
19
+ "version": "1.4.0"
20
20
  }