@headspace/protos-events 0.0.8-alpha.0 → 0.0.9
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 +8 -8
- package/lib/index.js +53 -39
- package/package.json +2 -2
- package/sleep.proto +3 -3
package/lib/index.d.ts
CHANGED
|
@@ -218,8 +218,8 @@ export class FamilyMemberRemoved implements IFamilyMemberRemoved {
|
|
|
218
218
|
/** Properties of a SleepcastEpisodeCompleted. */
|
|
219
219
|
export interface ISleepcastEpisodeCompleted {
|
|
220
220
|
|
|
221
|
-
/** SleepcastEpisodeCompleted
|
|
222
|
-
|
|
221
|
+
/** SleepcastEpisodeCompleted timestamp */
|
|
222
|
+
timestamp?: (number|Long|null);
|
|
223
223
|
|
|
224
224
|
/** SleepcastEpisodeCompleted sleepcastId */
|
|
225
225
|
sleepcastId?: (number|null);
|
|
@@ -237,8 +237,8 @@ export class SleepcastEpisodeCompleted implements ISleepcastEpisodeCompleted {
|
|
|
237
237
|
*/
|
|
238
238
|
constructor(properties?: ISleepcastEpisodeCompleted);
|
|
239
239
|
|
|
240
|
-
/** SleepcastEpisodeCompleted
|
|
241
|
-
public
|
|
240
|
+
/** SleepcastEpisodeCompleted timestamp. */
|
|
241
|
+
public timestamp: (number|Long);
|
|
242
242
|
|
|
243
243
|
/** SleepcastEpisodeCompleted sleepcastId. */
|
|
244
244
|
public sleepcastId: number;
|
|
@@ -326,8 +326,8 @@ export interface IFirstSleepcastPlayDateSet {
|
|
|
326
326
|
/** FirstSleepcastPlayDateSet userId */
|
|
327
327
|
userId?: (string|null);
|
|
328
328
|
|
|
329
|
-
/** FirstSleepcastPlayDateSet
|
|
330
|
-
|
|
329
|
+
/** FirstSleepcastPlayDateSet firstPlayTimestamp */
|
|
330
|
+
firstPlayTimestamp?: (number|Long|null);
|
|
331
331
|
}
|
|
332
332
|
|
|
333
333
|
/** Represents a FirstSleepcastPlayDateSet. */
|
|
@@ -345,8 +345,8 @@ export class FirstSleepcastPlayDateSet implements IFirstSleepcastPlayDateSet {
|
|
|
345
345
|
/** FirstSleepcastPlayDateSet userId. */
|
|
346
346
|
public userId: string;
|
|
347
347
|
|
|
348
|
-
/** FirstSleepcastPlayDateSet
|
|
349
|
-
public
|
|
348
|
+
/** FirstSleepcastPlayDateSet firstPlayTimestamp. */
|
|
349
|
+
public firstPlayTimestamp: (number|Long);
|
|
350
350
|
|
|
351
351
|
/**
|
|
352
352
|
* Creates a new FirstSleepcastPlayDateSet instance using the specified properties.
|
package/lib/index.js
CHANGED
|
@@ -551,7 +551,7 @@ $root.SleepcastEpisodeCompleted = (function() {
|
|
|
551
551
|
* Properties of a SleepcastEpisodeCompleted.
|
|
552
552
|
* @exports ISleepcastEpisodeCompleted
|
|
553
553
|
* @interface ISleepcastEpisodeCompleted
|
|
554
|
-
* @property {number|Long|null} [
|
|
554
|
+
* @property {number|Long|null} [timestamp] SleepcastEpisodeCompleted timestamp
|
|
555
555
|
* @property {number|null} [sleepcastId] SleepcastEpisodeCompleted sleepcastId
|
|
556
556
|
* @property {string|null} [userId] SleepcastEpisodeCompleted userId
|
|
557
557
|
*/
|
|
@@ -572,12 +572,12 @@ $root.SleepcastEpisodeCompleted = (function() {
|
|
|
572
572
|
}
|
|
573
573
|
|
|
574
574
|
/**
|
|
575
|
-
* SleepcastEpisodeCompleted
|
|
576
|
-
* @member {number|Long}
|
|
575
|
+
* SleepcastEpisodeCompleted timestamp.
|
|
576
|
+
* @member {number|Long} timestamp
|
|
577
577
|
* @memberof SleepcastEpisodeCompleted
|
|
578
578
|
* @instance
|
|
579
579
|
*/
|
|
580
|
-
SleepcastEpisodeCompleted.prototype.
|
|
580
|
+
SleepcastEpisodeCompleted.prototype.timestamp = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
|
|
581
581
|
|
|
582
582
|
/**
|
|
583
583
|
* SleepcastEpisodeCompleted sleepcastId.
|
|
@@ -619,8 +619,8 @@ $root.SleepcastEpisodeCompleted = (function() {
|
|
|
619
619
|
SleepcastEpisodeCompleted.encode = function encode(message, writer) {
|
|
620
620
|
if (!writer)
|
|
621
621
|
writer = $Writer.create();
|
|
622
|
-
if (message.
|
|
623
|
-
writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.
|
|
622
|
+
if (message.timestamp != null && message.hasOwnProperty("timestamp"))
|
|
623
|
+
writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.timestamp);
|
|
624
624
|
if (message.sleepcastId != null && message.hasOwnProperty("sleepcastId"))
|
|
625
625
|
writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.sleepcastId);
|
|
626
626
|
if (message.userId != null && message.hasOwnProperty("userId"))
|
|
@@ -660,7 +660,7 @@ $root.SleepcastEpisodeCompleted = (function() {
|
|
|
660
660
|
var tag = reader.uint32();
|
|
661
661
|
switch (tag >>> 3) {
|
|
662
662
|
case 1:
|
|
663
|
-
message.
|
|
663
|
+
message.timestamp = reader.uint64();
|
|
664
664
|
break;
|
|
665
665
|
case 2:
|
|
666
666
|
message.sleepcastId = reader.uint32();
|
|
@@ -703,9 +703,9 @@ $root.SleepcastEpisodeCompleted = (function() {
|
|
|
703
703
|
SleepcastEpisodeCompleted.verify = function verify(message) {
|
|
704
704
|
if (typeof message !== "object" || message === null)
|
|
705
705
|
return "object expected";
|
|
706
|
-
if (message.
|
|
707
|
-
if (!$util.isInteger(message.
|
|
708
|
-
return "
|
|
706
|
+
if (message.timestamp != null && message.hasOwnProperty("timestamp"))
|
|
707
|
+
if (!$util.isInteger(message.timestamp) && !(message.timestamp && $util.isInteger(message.timestamp.low) && $util.isInteger(message.timestamp.high)))
|
|
708
|
+
return "timestamp: integer|Long expected";
|
|
709
709
|
if (message.sleepcastId != null && message.hasOwnProperty("sleepcastId"))
|
|
710
710
|
if (!$util.isInteger(message.sleepcastId))
|
|
711
711
|
return "sleepcastId: integer expected";
|
|
@@ -727,15 +727,15 @@ $root.SleepcastEpisodeCompleted = (function() {
|
|
|
727
727
|
if (object instanceof $root.SleepcastEpisodeCompleted)
|
|
728
728
|
return object;
|
|
729
729
|
var message = new $root.SleepcastEpisodeCompleted();
|
|
730
|
-
if (object.
|
|
730
|
+
if (object.timestamp != null)
|
|
731
731
|
if ($util.Long)
|
|
732
|
-
(message.
|
|
733
|
-
else if (typeof object.
|
|
734
|
-
message.
|
|
735
|
-
else if (typeof object.
|
|
736
|
-
message.
|
|
737
|
-
else if (typeof object.
|
|
738
|
-
message.
|
|
732
|
+
(message.timestamp = $util.Long.fromValue(object.timestamp)).unsigned = true;
|
|
733
|
+
else if (typeof object.timestamp === "string")
|
|
734
|
+
message.timestamp = parseInt(object.timestamp, 10);
|
|
735
|
+
else if (typeof object.timestamp === "number")
|
|
736
|
+
message.timestamp = object.timestamp;
|
|
737
|
+
else if (typeof object.timestamp === "object")
|
|
738
|
+
message.timestamp = new $util.LongBits(object.timestamp.low >>> 0, object.timestamp.high >>> 0).toNumber(true);
|
|
739
739
|
if (object.sleepcastId != null)
|
|
740
740
|
message.sleepcastId = object.sleepcastId >>> 0;
|
|
741
741
|
if (object.userId != null)
|
|
@@ -759,17 +759,17 @@ $root.SleepcastEpisodeCompleted = (function() {
|
|
|
759
759
|
if (options.defaults) {
|
|
760
760
|
if ($util.Long) {
|
|
761
761
|
var long = new $util.Long(0, 0, true);
|
|
762
|
-
object.
|
|
762
|
+
object.timestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
|
|
763
763
|
} else
|
|
764
|
-
object.
|
|
764
|
+
object.timestamp = options.longs === String ? "0" : 0;
|
|
765
765
|
object.sleepcastId = 0;
|
|
766
766
|
object.userId = "";
|
|
767
767
|
}
|
|
768
|
-
if (message.
|
|
769
|
-
if (typeof message.
|
|
770
|
-
object.
|
|
768
|
+
if (message.timestamp != null && message.hasOwnProperty("timestamp"))
|
|
769
|
+
if (typeof message.timestamp === "number")
|
|
770
|
+
object.timestamp = options.longs === String ? String(message.timestamp) : message.timestamp;
|
|
771
771
|
else
|
|
772
|
-
object.
|
|
772
|
+
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;
|
|
773
773
|
if (message.sleepcastId != null && message.hasOwnProperty("sleepcastId"))
|
|
774
774
|
object.sleepcastId = message.sleepcastId;
|
|
775
775
|
if (message.userId != null && message.hasOwnProperty("userId"))
|
|
@@ -799,7 +799,7 @@ $root.FirstSleepcastPlayDateSet = (function() {
|
|
|
799
799
|
* @interface IFirstSleepcastPlayDateSet
|
|
800
800
|
* @property {number|Long|null} [timestamp] FirstSleepcastPlayDateSet timestamp
|
|
801
801
|
* @property {string|null} [userId] FirstSleepcastPlayDateSet userId
|
|
802
|
-
* @property {
|
|
802
|
+
* @property {number|Long|null} [firstPlayTimestamp] FirstSleepcastPlayDateSet firstPlayTimestamp
|
|
803
803
|
*/
|
|
804
804
|
|
|
805
805
|
/**
|
|
@@ -834,12 +834,12 @@ $root.FirstSleepcastPlayDateSet = (function() {
|
|
|
834
834
|
FirstSleepcastPlayDateSet.prototype.userId = "";
|
|
835
835
|
|
|
836
836
|
/**
|
|
837
|
-
* FirstSleepcastPlayDateSet
|
|
838
|
-
* @member {
|
|
837
|
+
* FirstSleepcastPlayDateSet firstPlayTimestamp.
|
|
838
|
+
* @member {number|Long} firstPlayTimestamp
|
|
839
839
|
* @memberof FirstSleepcastPlayDateSet
|
|
840
840
|
* @instance
|
|
841
841
|
*/
|
|
842
|
-
FirstSleepcastPlayDateSet.prototype.
|
|
842
|
+
FirstSleepcastPlayDateSet.prototype.firstPlayTimestamp = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
|
|
843
843
|
|
|
844
844
|
/**
|
|
845
845
|
* Creates a new FirstSleepcastPlayDateSet instance using the specified properties.
|
|
@@ -869,8 +869,8 @@ $root.FirstSleepcastPlayDateSet = (function() {
|
|
|
869
869
|
writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.timestamp);
|
|
870
870
|
if (message.userId != null && message.hasOwnProperty("userId"))
|
|
871
871
|
writer.uint32(/* id 2, wireType 2 =*/18).string(message.userId);
|
|
872
|
-
if (message.
|
|
873
|
-
writer.uint32(/* id 3, wireType
|
|
872
|
+
if (message.firstPlayTimestamp != null && message.hasOwnProperty("firstPlayTimestamp"))
|
|
873
|
+
writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.firstPlayTimestamp);
|
|
874
874
|
return writer;
|
|
875
875
|
};
|
|
876
876
|
|
|
@@ -912,7 +912,7 @@ $root.FirstSleepcastPlayDateSet = (function() {
|
|
|
912
912
|
message.userId = reader.string();
|
|
913
913
|
break;
|
|
914
914
|
case 3:
|
|
915
|
-
message.
|
|
915
|
+
message.firstPlayTimestamp = reader.uint64();
|
|
916
916
|
break;
|
|
917
917
|
default:
|
|
918
918
|
reader.skipType(tag & 7);
|
|
@@ -955,9 +955,9 @@ $root.FirstSleepcastPlayDateSet = (function() {
|
|
|
955
955
|
if (message.userId != null && message.hasOwnProperty("userId"))
|
|
956
956
|
if (!$util.isString(message.userId))
|
|
957
957
|
return "userId: string expected";
|
|
958
|
-
if (message.
|
|
959
|
-
if (!$util.
|
|
960
|
-
return "
|
|
958
|
+
if (message.firstPlayTimestamp != null && message.hasOwnProperty("firstPlayTimestamp"))
|
|
959
|
+
if (!$util.isInteger(message.firstPlayTimestamp) && !(message.firstPlayTimestamp && $util.isInteger(message.firstPlayTimestamp.low) && $util.isInteger(message.firstPlayTimestamp.high)))
|
|
960
|
+
return "firstPlayTimestamp: integer|Long expected";
|
|
961
961
|
return null;
|
|
962
962
|
};
|
|
963
963
|
|
|
@@ -984,8 +984,15 @@ $root.FirstSleepcastPlayDateSet = (function() {
|
|
|
984
984
|
message.timestamp = new $util.LongBits(object.timestamp.low >>> 0, object.timestamp.high >>> 0).toNumber(true);
|
|
985
985
|
if (object.userId != null)
|
|
986
986
|
message.userId = String(object.userId);
|
|
987
|
-
if (object.
|
|
988
|
-
|
|
987
|
+
if (object.firstPlayTimestamp != null)
|
|
988
|
+
if ($util.Long)
|
|
989
|
+
(message.firstPlayTimestamp = $util.Long.fromValue(object.firstPlayTimestamp)).unsigned = true;
|
|
990
|
+
else if (typeof object.firstPlayTimestamp === "string")
|
|
991
|
+
message.firstPlayTimestamp = parseInt(object.firstPlayTimestamp, 10);
|
|
992
|
+
else if (typeof object.firstPlayTimestamp === "number")
|
|
993
|
+
message.firstPlayTimestamp = object.firstPlayTimestamp;
|
|
994
|
+
else if (typeof object.firstPlayTimestamp === "object")
|
|
995
|
+
message.firstPlayTimestamp = new $util.LongBits(object.firstPlayTimestamp.low >>> 0, object.firstPlayTimestamp.high >>> 0).toNumber(true);
|
|
989
996
|
return message;
|
|
990
997
|
};
|
|
991
998
|
|
|
@@ -1009,7 +1016,11 @@ $root.FirstSleepcastPlayDateSet = (function() {
|
|
|
1009
1016
|
} else
|
|
1010
1017
|
object.timestamp = options.longs === String ? "0" : 0;
|
|
1011
1018
|
object.userId = "";
|
|
1012
|
-
|
|
1019
|
+
if ($util.Long) {
|
|
1020
|
+
var long = new $util.Long(0, 0, true);
|
|
1021
|
+
object.firstPlayTimestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
|
|
1022
|
+
} else
|
|
1023
|
+
object.firstPlayTimestamp = options.longs === String ? "0" : 0;
|
|
1013
1024
|
}
|
|
1014
1025
|
if (message.timestamp != null && message.hasOwnProperty("timestamp"))
|
|
1015
1026
|
if (typeof message.timestamp === "number")
|
|
@@ -1018,8 +1029,11 @@ $root.FirstSleepcastPlayDateSet = (function() {
|
|
|
1018
1029
|
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;
|
|
1019
1030
|
if (message.userId != null && message.hasOwnProperty("userId"))
|
|
1020
1031
|
object.userId = message.userId;
|
|
1021
|
-
if (message.
|
|
1022
|
-
|
|
1032
|
+
if (message.firstPlayTimestamp != null && message.hasOwnProperty("firstPlayTimestamp"))
|
|
1033
|
+
if (typeof message.firstPlayTimestamp === "number")
|
|
1034
|
+
object.firstPlayTimestamp = options.longs === String ? String(message.firstPlayTimestamp) : message.firstPlayTimestamp;
|
|
1035
|
+
else
|
|
1036
|
+
object.firstPlayTimestamp = options.longs === String ? $util.Long.prototype.toString.call(message.firstPlayTimestamp) : options.longs === Number ? new $util.LongBits(message.firstPlayTimestamp.low >>> 0, message.firstPlayTimestamp.high >>> 0).toNumber(true) : message.firstPlayTimestamp;
|
|
1023
1037
|
return object;
|
|
1024
1038
|
};
|
|
1025
1039
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@headspace/protos-events",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.9",
|
|
4
4
|
"main": "lib/index.js",
|
|
5
5
|
"typings": "lib/index.d.ts",
|
|
6
6
|
"scripts": {
|
|
@@ -16,5 +16,5 @@
|
|
|
16
16
|
"devDependencies": {
|
|
17
17
|
"typescript": "^3.0.1"
|
|
18
18
|
},
|
|
19
|
-
"gitHead": "
|
|
19
|
+
"gitHead": "505ba7232bcf8468c9ebbadb3599ce85e4916305"
|
|
20
20
|
}
|
package/sleep.proto
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
syntax = "proto3";
|
|
2
2
|
|
|
3
3
|
message SleepcastEpisodeCompleted {
|
|
4
|
-
uint64
|
|
4
|
+
uint64 timestamp = 1;
|
|
5
5
|
uint32 sleepcastId = 2;
|
|
6
6
|
string userId = 3;
|
|
7
7
|
}
|
|
@@ -9,11 +9,11 @@ message SleepcastEpisodeCompleted {
|
|
|
9
9
|
message FirstSleepcastPlayDateSet {
|
|
10
10
|
uint64 timestamp = 1;
|
|
11
11
|
string userId = 2;
|
|
12
|
-
|
|
12
|
+
uint64 firstPlayTimestamp = 3;
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
message NumSleepcastPlaysSet {
|
|
16
16
|
uint64 timestamp = 1;
|
|
17
17
|
string userId = 2;
|
|
18
18
|
uint32 numPlays = 3;
|
|
19
|
-
}
|
|
19
|
+
}
|