@headspace/protos-events 0.0.9 → 0.0.11
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/connected.proto +7 -0
- package/lib/index.d.ts +102 -0
- package/lib/index.js +246 -0
- package/package.json +2 -2
package/connected.proto
ADDED
package/lib/index.d.ts
CHANGED
|
@@ -215,6 +215,108 @@ export class FamilyMemberRemoved implements IFamilyMemberRemoved {
|
|
|
215
215
|
public toJSON(): { [k: string]: any };
|
|
216
216
|
}
|
|
217
217
|
|
|
218
|
+
/** Properties of a VoiceDeviceConnected. */
|
|
219
|
+
export interface IVoiceDeviceConnected {
|
|
220
|
+
|
|
221
|
+
/** VoiceDeviceConnected userId */
|
|
222
|
+
userId?: (string|null);
|
|
223
|
+
|
|
224
|
+
/** VoiceDeviceConnected platform */
|
|
225
|
+
platform?: (string|null);
|
|
226
|
+
|
|
227
|
+
/** VoiceDeviceConnected timestamp */
|
|
228
|
+
timestamp?: (number|Long|null);
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
/** Represents a VoiceDeviceConnected. */
|
|
232
|
+
export class VoiceDeviceConnected implements IVoiceDeviceConnected {
|
|
233
|
+
|
|
234
|
+
/**
|
|
235
|
+
* Constructs a new VoiceDeviceConnected.
|
|
236
|
+
* @param [properties] Properties to set
|
|
237
|
+
*/
|
|
238
|
+
constructor(properties?: IVoiceDeviceConnected);
|
|
239
|
+
|
|
240
|
+
/** VoiceDeviceConnected userId. */
|
|
241
|
+
public userId: string;
|
|
242
|
+
|
|
243
|
+
/** VoiceDeviceConnected platform. */
|
|
244
|
+
public platform: string;
|
|
245
|
+
|
|
246
|
+
/** VoiceDeviceConnected timestamp. */
|
|
247
|
+
public timestamp: (number|Long);
|
|
248
|
+
|
|
249
|
+
/**
|
|
250
|
+
* Creates a new VoiceDeviceConnected instance using the specified properties.
|
|
251
|
+
* @param [properties] Properties to set
|
|
252
|
+
* @returns VoiceDeviceConnected instance
|
|
253
|
+
*/
|
|
254
|
+
public static create(properties?: IVoiceDeviceConnected): VoiceDeviceConnected;
|
|
255
|
+
|
|
256
|
+
/**
|
|
257
|
+
* Encodes the specified VoiceDeviceConnected message. Does not implicitly {@link VoiceDeviceConnected.verify|verify} messages.
|
|
258
|
+
* @param message VoiceDeviceConnected message or plain object to encode
|
|
259
|
+
* @param [writer] Writer to encode to
|
|
260
|
+
* @returns Writer
|
|
261
|
+
*/
|
|
262
|
+
public static encode(message: IVoiceDeviceConnected, writer?: $protobuf.Writer): $protobuf.Writer;
|
|
263
|
+
|
|
264
|
+
/**
|
|
265
|
+
* Encodes the specified VoiceDeviceConnected message, length delimited. Does not implicitly {@link VoiceDeviceConnected.verify|verify} messages.
|
|
266
|
+
* @param message VoiceDeviceConnected message or plain object to encode
|
|
267
|
+
* @param [writer] Writer to encode to
|
|
268
|
+
* @returns Writer
|
|
269
|
+
*/
|
|
270
|
+
public static encodeDelimited(message: IVoiceDeviceConnected, writer?: $protobuf.Writer): $protobuf.Writer;
|
|
271
|
+
|
|
272
|
+
/**
|
|
273
|
+
* Decodes a VoiceDeviceConnected message from the specified reader or buffer.
|
|
274
|
+
* @param reader Reader or buffer to decode from
|
|
275
|
+
* @param [length] Message length if known beforehand
|
|
276
|
+
* @returns VoiceDeviceConnected
|
|
277
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
278
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
279
|
+
*/
|
|
280
|
+
public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): VoiceDeviceConnected;
|
|
281
|
+
|
|
282
|
+
/**
|
|
283
|
+
* Decodes a VoiceDeviceConnected message from the specified reader or buffer, length delimited.
|
|
284
|
+
* @param reader Reader or buffer to decode from
|
|
285
|
+
* @returns VoiceDeviceConnected
|
|
286
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
287
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
288
|
+
*/
|
|
289
|
+
public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): VoiceDeviceConnected;
|
|
290
|
+
|
|
291
|
+
/**
|
|
292
|
+
* Verifies a VoiceDeviceConnected message.
|
|
293
|
+
* @param message Plain object to verify
|
|
294
|
+
* @returns `null` if valid, otherwise the reason why it is not
|
|
295
|
+
*/
|
|
296
|
+
public static verify(message: { [k: string]: any }): (string|null);
|
|
297
|
+
|
|
298
|
+
/**
|
|
299
|
+
* Creates a VoiceDeviceConnected message from a plain object. Also converts values to their respective internal types.
|
|
300
|
+
* @param object Plain object
|
|
301
|
+
* @returns VoiceDeviceConnected
|
|
302
|
+
*/
|
|
303
|
+
public static fromObject(object: { [k: string]: any }): VoiceDeviceConnected;
|
|
304
|
+
|
|
305
|
+
/**
|
|
306
|
+
* Creates a plain object from a VoiceDeviceConnected message. Also converts values to other types if specified.
|
|
307
|
+
* @param message VoiceDeviceConnected
|
|
308
|
+
* @param [options] Conversion options
|
|
309
|
+
* @returns Plain object
|
|
310
|
+
*/
|
|
311
|
+
public static toObject(message: VoiceDeviceConnected, options?: $protobuf.IConversionOptions): { [k: string]: any };
|
|
312
|
+
|
|
313
|
+
/**
|
|
314
|
+
* Converts this VoiceDeviceConnected to JSON.
|
|
315
|
+
* @returns JSON object
|
|
316
|
+
*/
|
|
317
|
+
public toJSON(): { [k: string]: any };
|
|
318
|
+
}
|
|
319
|
+
|
|
218
320
|
/** Properties of a SleepcastEpisodeCompleted. */
|
|
219
321
|
export interface ISleepcastEpisodeCompleted {
|
|
220
322
|
|
package/lib/index.js
CHANGED
|
@@ -545,6 +545,252 @@ $root.FamilyMemberRemoved = (function() {
|
|
|
545
545
|
return FamilyMemberRemoved;
|
|
546
546
|
})();
|
|
547
547
|
|
|
548
|
+
$root.VoiceDeviceConnected = (function() {
|
|
549
|
+
|
|
550
|
+
/**
|
|
551
|
+
* Properties of a VoiceDeviceConnected.
|
|
552
|
+
* @exports IVoiceDeviceConnected
|
|
553
|
+
* @interface IVoiceDeviceConnected
|
|
554
|
+
* @property {string|null} [userId] VoiceDeviceConnected userId
|
|
555
|
+
* @property {string|null} [platform] VoiceDeviceConnected platform
|
|
556
|
+
* @property {number|Long|null} [timestamp] VoiceDeviceConnected timestamp
|
|
557
|
+
*/
|
|
558
|
+
|
|
559
|
+
/**
|
|
560
|
+
* Constructs a new VoiceDeviceConnected.
|
|
561
|
+
* @exports VoiceDeviceConnected
|
|
562
|
+
* @classdesc Represents a VoiceDeviceConnected.
|
|
563
|
+
* @implements IVoiceDeviceConnected
|
|
564
|
+
* @constructor
|
|
565
|
+
* @param {IVoiceDeviceConnected=} [properties] Properties to set
|
|
566
|
+
*/
|
|
567
|
+
function VoiceDeviceConnected(properties) {
|
|
568
|
+
if (properties)
|
|
569
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
570
|
+
if (properties[keys[i]] != null)
|
|
571
|
+
this[keys[i]] = properties[keys[i]];
|
|
572
|
+
}
|
|
573
|
+
|
|
574
|
+
/**
|
|
575
|
+
* VoiceDeviceConnected userId.
|
|
576
|
+
* @member {string} userId
|
|
577
|
+
* @memberof VoiceDeviceConnected
|
|
578
|
+
* @instance
|
|
579
|
+
*/
|
|
580
|
+
VoiceDeviceConnected.prototype.userId = "";
|
|
581
|
+
|
|
582
|
+
/**
|
|
583
|
+
* VoiceDeviceConnected platform.
|
|
584
|
+
* @member {string} platform
|
|
585
|
+
* @memberof VoiceDeviceConnected
|
|
586
|
+
* @instance
|
|
587
|
+
*/
|
|
588
|
+
VoiceDeviceConnected.prototype.platform = "";
|
|
589
|
+
|
|
590
|
+
/**
|
|
591
|
+
* VoiceDeviceConnected timestamp.
|
|
592
|
+
* @member {number|Long} timestamp
|
|
593
|
+
* @memberof VoiceDeviceConnected
|
|
594
|
+
* @instance
|
|
595
|
+
*/
|
|
596
|
+
VoiceDeviceConnected.prototype.timestamp = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
|
|
597
|
+
|
|
598
|
+
/**
|
|
599
|
+
* Creates a new VoiceDeviceConnected instance using the specified properties.
|
|
600
|
+
* @function create
|
|
601
|
+
* @memberof VoiceDeviceConnected
|
|
602
|
+
* @static
|
|
603
|
+
* @param {IVoiceDeviceConnected=} [properties] Properties to set
|
|
604
|
+
* @returns {VoiceDeviceConnected} VoiceDeviceConnected instance
|
|
605
|
+
*/
|
|
606
|
+
VoiceDeviceConnected.create = function create(properties) {
|
|
607
|
+
return new VoiceDeviceConnected(properties);
|
|
608
|
+
};
|
|
609
|
+
|
|
610
|
+
/**
|
|
611
|
+
* Encodes the specified VoiceDeviceConnected message. Does not implicitly {@link VoiceDeviceConnected.verify|verify} messages.
|
|
612
|
+
* @function encode
|
|
613
|
+
* @memberof VoiceDeviceConnected
|
|
614
|
+
* @static
|
|
615
|
+
* @param {IVoiceDeviceConnected} message VoiceDeviceConnected message or plain object to encode
|
|
616
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
617
|
+
* @returns {$protobuf.Writer} Writer
|
|
618
|
+
*/
|
|
619
|
+
VoiceDeviceConnected.encode = function encode(message, writer) {
|
|
620
|
+
if (!writer)
|
|
621
|
+
writer = $Writer.create();
|
|
622
|
+
if (message.userId != null && message.hasOwnProperty("userId"))
|
|
623
|
+
writer.uint32(/* id 1, wireType 2 =*/10).string(message.userId);
|
|
624
|
+
if (message.platform != null && message.hasOwnProperty("platform"))
|
|
625
|
+
writer.uint32(/* id 2, wireType 2 =*/18).string(message.platform);
|
|
626
|
+
if (message.timestamp != null && message.hasOwnProperty("timestamp"))
|
|
627
|
+
writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.timestamp);
|
|
628
|
+
return writer;
|
|
629
|
+
};
|
|
630
|
+
|
|
631
|
+
/**
|
|
632
|
+
* Encodes the specified VoiceDeviceConnected message, length delimited. Does not implicitly {@link VoiceDeviceConnected.verify|verify} messages.
|
|
633
|
+
* @function encodeDelimited
|
|
634
|
+
* @memberof VoiceDeviceConnected
|
|
635
|
+
* @static
|
|
636
|
+
* @param {IVoiceDeviceConnected} message VoiceDeviceConnected message or plain object to encode
|
|
637
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
638
|
+
* @returns {$protobuf.Writer} Writer
|
|
639
|
+
*/
|
|
640
|
+
VoiceDeviceConnected.encodeDelimited = function encodeDelimited(message, writer) {
|
|
641
|
+
return this.encode(message, writer).ldelim();
|
|
642
|
+
};
|
|
643
|
+
|
|
644
|
+
/**
|
|
645
|
+
* Decodes a VoiceDeviceConnected message from the specified reader or buffer.
|
|
646
|
+
* @function decode
|
|
647
|
+
* @memberof VoiceDeviceConnected
|
|
648
|
+
* @static
|
|
649
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
650
|
+
* @param {number} [length] Message length if known beforehand
|
|
651
|
+
* @returns {VoiceDeviceConnected} VoiceDeviceConnected
|
|
652
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
653
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
654
|
+
*/
|
|
655
|
+
VoiceDeviceConnected.decode = function decode(reader, length) {
|
|
656
|
+
if (!(reader instanceof $Reader))
|
|
657
|
+
reader = $Reader.create(reader);
|
|
658
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.VoiceDeviceConnected();
|
|
659
|
+
while (reader.pos < end) {
|
|
660
|
+
var tag = reader.uint32();
|
|
661
|
+
switch (tag >>> 3) {
|
|
662
|
+
case 1:
|
|
663
|
+
message.userId = reader.string();
|
|
664
|
+
break;
|
|
665
|
+
case 2:
|
|
666
|
+
message.platform = reader.string();
|
|
667
|
+
break;
|
|
668
|
+
case 3:
|
|
669
|
+
message.timestamp = reader.uint64();
|
|
670
|
+
break;
|
|
671
|
+
default:
|
|
672
|
+
reader.skipType(tag & 7);
|
|
673
|
+
break;
|
|
674
|
+
}
|
|
675
|
+
}
|
|
676
|
+
return message;
|
|
677
|
+
};
|
|
678
|
+
|
|
679
|
+
/**
|
|
680
|
+
* Decodes a VoiceDeviceConnected message from the specified reader or buffer, length delimited.
|
|
681
|
+
* @function decodeDelimited
|
|
682
|
+
* @memberof VoiceDeviceConnected
|
|
683
|
+
* @static
|
|
684
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
685
|
+
* @returns {VoiceDeviceConnected} VoiceDeviceConnected
|
|
686
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
687
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
688
|
+
*/
|
|
689
|
+
VoiceDeviceConnected.decodeDelimited = function decodeDelimited(reader) {
|
|
690
|
+
if (!(reader instanceof $Reader))
|
|
691
|
+
reader = new $Reader(reader);
|
|
692
|
+
return this.decode(reader, reader.uint32());
|
|
693
|
+
};
|
|
694
|
+
|
|
695
|
+
/**
|
|
696
|
+
* Verifies a VoiceDeviceConnected message.
|
|
697
|
+
* @function verify
|
|
698
|
+
* @memberof VoiceDeviceConnected
|
|
699
|
+
* @static
|
|
700
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
701
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
702
|
+
*/
|
|
703
|
+
VoiceDeviceConnected.verify = function verify(message) {
|
|
704
|
+
if (typeof message !== "object" || message === null)
|
|
705
|
+
return "object expected";
|
|
706
|
+
if (message.userId != null && message.hasOwnProperty("userId"))
|
|
707
|
+
if (!$util.isString(message.userId))
|
|
708
|
+
return "userId: string expected";
|
|
709
|
+
if (message.platform != null && message.hasOwnProperty("platform"))
|
|
710
|
+
if (!$util.isString(message.platform))
|
|
711
|
+
return "platform: string expected";
|
|
712
|
+
if (message.timestamp != null && message.hasOwnProperty("timestamp"))
|
|
713
|
+
if (!$util.isInteger(message.timestamp) && !(message.timestamp && $util.isInteger(message.timestamp.low) && $util.isInteger(message.timestamp.high)))
|
|
714
|
+
return "timestamp: integer|Long expected";
|
|
715
|
+
return null;
|
|
716
|
+
};
|
|
717
|
+
|
|
718
|
+
/**
|
|
719
|
+
* Creates a VoiceDeviceConnected message from a plain object. Also converts values to their respective internal types.
|
|
720
|
+
* @function fromObject
|
|
721
|
+
* @memberof VoiceDeviceConnected
|
|
722
|
+
* @static
|
|
723
|
+
* @param {Object.<string,*>} object Plain object
|
|
724
|
+
* @returns {VoiceDeviceConnected} VoiceDeviceConnected
|
|
725
|
+
*/
|
|
726
|
+
VoiceDeviceConnected.fromObject = function fromObject(object) {
|
|
727
|
+
if (object instanceof $root.VoiceDeviceConnected)
|
|
728
|
+
return object;
|
|
729
|
+
var message = new $root.VoiceDeviceConnected();
|
|
730
|
+
if (object.userId != null)
|
|
731
|
+
message.userId = String(object.userId);
|
|
732
|
+
if (object.platform != null)
|
|
733
|
+
message.platform = String(object.platform);
|
|
734
|
+
if (object.timestamp != null)
|
|
735
|
+
if ($util.Long)
|
|
736
|
+
(message.timestamp = $util.Long.fromValue(object.timestamp)).unsigned = true;
|
|
737
|
+
else if (typeof object.timestamp === "string")
|
|
738
|
+
message.timestamp = parseInt(object.timestamp, 10);
|
|
739
|
+
else if (typeof object.timestamp === "number")
|
|
740
|
+
message.timestamp = object.timestamp;
|
|
741
|
+
else if (typeof object.timestamp === "object")
|
|
742
|
+
message.timestamp = new $util.LongBits(object.timestamp.low >>> 0, object.timestamp.high >>> 0).toNumber(true);
|
|
743
|
+
return message;
|
|
744
|
+
};
|
|
745
|
+
|
|
746
|
+
/**
|
|
747
|
+
* Creates a plain object from a VoiceDeviceConnected message. Also converts values to other types if specified.
|
|
748
|
+
* @function toObject
|
|
749
|
+
* @memberof VoiceDeviceConnected
|
|
750
|
+
* @static
|
|
751
|
+
* @param {VoiceDeviceConnected} message VoiceDeviceConnected
|
|
752
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
753
|
+
* @returns {Object.<string,*>} Plain object
|
|
754
|
+
*/
|
|
755
|
+
VoiceDeviceConnected.toObject = function toObject(message, options) {
|
|
756
|
+
if (!options)
|
|
757
|
+
options = {};
|
|
758
|
+
var object = {};
|
|
759
|
+
if (options.defaults) {
|
|
760
|
+
object.userId = "";
|
|
761
|
+
object.platform = "";
|
|
762
|
+
if ($util.Long) {
|
|
763
|
+
var long = new $util.Long(0, 0, true);
|
|
764
|
+
object.timestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
|
|
765
|
+
} else
|
|
766
|
+
object.timestamp = options.longs === String ? "0" : 0;
|
|
767
|
+
}
|
|
768
|
+
if (message.userId != null && message.hasOwnProperty("userId"))
|
|
769
|
+
object.userId = message.userId;
|
|
770
|
+
if (message.platform != null && message.hasOwnProperty("platform"))
|
|
771
|
+
object.platform = message.platform;
|
|
772
|
+
if (message.timestamp != null && message.hasOwnProperty("timestamp"))
|
|
773
|
+
if (typeof message.timestamp === "number")
|
|
774
|
+
object.timestamp = options.longs === String ? String(message.timestamp) : message.timestamp;
|
|
775
|
+
else
|
|
776
|
+
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;
|
|
777
|
+
return object;
|
|
778
|
+
};
|
|
779
|
+
|
|
780
|
+
/**
|
|
781
|
+
* Converts this VoiceDeviceConnected to JSON.
|
|
782
|
+
* @function toJSON
|
|
783
|
+
* @memberof VoiceDeviceConnected
|
|
784
|
+
* @instance
|
|
785
|
+
* @returns {Object.<string,*>} JSON object
|
|
786
|
+
*/
|
|
787
|
+
VoiceDeviceConnected.prototype.toJSON = function toJSON() {
|
|
788
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
789
|
+
};
|
|
790
|
+
|
|
791
|
+
return VoiceDeviceConnected;
|
|
792
|
+
})();
|
|
793
|
+
|
|
548
794
|
$root.SleepcastEpisodeCompleted = (function() {
|
|
549
795
|
|
|
550
796
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@headspace/protos-events",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.11",
|
|
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": "88e5d7700611375ba1bb2f5f341fac26ce60331e"
|
|
20
20
|
}
|