@stinkycomputing/sesame-api-client 1.10.0-alpha.2 → 1.10.0-alpha.4
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/README.md +9 -3
- package/dist/index.browser.mjs +169 -1
- package/dist/index.browser.mjs.map +2 -2
- package/dist/index.cjs +170 -1
- package/dist/index.cjs.map +2 -2
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.mjs +169 -1
- package/dist/index.mjs.map +2 -2
- package/dist/proto/api.d.ts +103 -0
- package/dist/proto/api.js +249 -0
- package/dist/sesame-wire-protocol.d.ts +31 -3
- package/dist/sesame-wire-protocol.d.ts.map +1 -1
- package/docs/protocol-reference.md +59 -9
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -52,6 +52,7 @@ __export(index_exports, {
|
|
|
52
52
|
WireProtocol: () => WireProtocol,
|
|
53
53
|
buildAudioControlFrame: () => buildAudioControlFrame,
|
|
54
54
|
buildBinaryDataFrame: () => buildBinaryDataFrame,
|
|
55
|
+
buildOutputControlFrame: () => buildOutputControlFrame,
|
|
55
56
|
buildSourceControlFrame: () => buildSourceControlFrame,
|
|
56
57
|
buildTransportControlFrame: () => buildTransportControlFrame,
|
|
57
58
|
getLogger: () => getLogger,
|
|
@@ -11045,6 +11046,7 @@ var sesame = $root.sesame = (() => {
|
|
|
11045
11046
|
}
|
|
11046
11047
|
TransportControlRequest.prototype.cmdType = 0;
|
|
11047
11048
|
TransportControlRequest.prototype.value = null;
|
|
11049
|
+
TransportControlRequest.prototype.sourceId = "";
|
|
11048
11050
|
TransportControlRequest.create = function create(properties) {
|
|
11049
11051
|
return new TransportControlRequest(properties);
|
|
11050
11052
|
};
|
|
@@ -11061,6 +11063,11 @@ var sesame = $root.sesame = (() => {
|
|
|
11061
11063
|
/* id 2, wireType 2 =*/
|
|
11062
11064
|
18
|
|
11063
11065
|
).fork()).ldelim();
|
|
11066
|
+
if (message.sourceId != null && Object.hasOwnProperty.call(message, "sourceId"))
|
|
11067
|
+
writer.uint32(
|
|
11068
|
+
/* id 3, wireType 2 =*/
|
|
11069
|
+
26
|
|
11070
|
+
).string(message.sourceId);
|
|
11064
11071
|
return writer;
|
|
11065
11072
|
};
|
|
11066
11073
|
TransportControlRequest.encodeDelimited = function encodeDelimited(message, writer) {
|
|
@@ -11083,6 +11090,10 @@ var sesame = $root.sesame = (() => {
|
|
|
11083
11090
|
message.value = $root.sesame.v1.common.PropValue.decode(reader, reader.uint32());
|
|
11084
11091
|
break;
|
|
11085
11092
|
}
|
|
11093
|
+
case 3: {
|
|
11094
|
+
message.sourceId = reader.string();
|
|
11095
|
+
break;
|
|
11096
|
+
}
|
|
11086
11097
|
default:
|
|
11087
11098
|
reader.skipType(tag & 7);
|
|
11088
11099
|
break;
|
|
@@ -11126,6 +11137,10 @@ var sesame = $root.sesame = (() => {
|
|
|
11126
11137
|
if (error)
|
|
11127
11138
|
return "value." + error;
|
|
11128
11139
|
}
|
|
11140
|
+
if (message.sourceId != null && message.hasOwnProperty("sourceId")) {
|
|
11141
|
+
if (!$util.isString(message.sourceId))
|
|
11142
|
+
return "sourceId: string expected";
|
|
11143
|
+
}
|
|
11129
11144
|
return null;
|
|
11130
11145
|
};
|
|
11131
11146
|
TransportControlRequest.fromObject = function fromObject(object) {
|
|
@@ -11213,6 +11228,8 @@ var sesame = $root.sesame = (() => {
|
|
|
11213
11228
|
throw TypeError(".sesame.v1.sources.TransportControlRequest.value: object expected");
|
|
11214
11229
|
message.value = $root.sesame.v1.common.PropValue.fromObject(object.value);
|
|
11215
11230
|
}
|
|
11231
|
+
if (object.sourceId != null)
|
|
11232
|
+
message.sourceId = String(object.sourceId);
|
|
11216
11233
|
return message;
|
|
11217
11234
|
};
|
|
11218
11235
|
TransportControlRequest.toObject = function toObject(message, options) {
|
|
@@ -11222,11 +11239,14 @@ var sesame = $root.sesame = (() => {
|
|
|
11222
11239
|
if (options.defaults) {
|
|
11223
11240
|
object.cmdType = options.enums === String ? "SOURCE_TRANSPORT_CMD_UNSPECIFIED" : 0;
|
|
11224
11241
|
object.value = null;
|
|
11242
|
+
object.sourceId = "";
|
|
11225
11243
|
}
|
|
11226
11244
|
if (message.cmdType != null && message.hasOwnProperty("cmdType"))
|
|
11227
11245
|
object.cmdType = options.enums === String ? $root.sesame.v1.sources.SourceTransportCommandType[message.cmdType] === void 0 ? message.cmdType : $root.sesame.v1.sources.SourceTransportCommandType[message.cmdType] : message.cmdType;
|
|
11228
11246
|
if (message.value != null && message.hasOwnProperty("value"))
|
|
11229
11247
|
object.value = $root.sesame.v1.common.PropValue.toObject(message.value, options);
|
|
11248
|
+
if (message.sourceId != null && message.hasOwnProperty("sourceId"))
|
|
11249
|
+
object.sourceId = message.sourceId;
|
|
11230
11250
|
return object;
|
|
11231
11251
|
};
|
|
11232
11252
|
TransportControlRequest.prototype.toJSON = function toJSON() {
|
|
@@ -17370,6 +17390,114 @@ var sesame = $root.sesame = (() => {
|
|
|
17370
17390
|
};
|
|
17371
17391
|
return TransportEvent;
|
|
17372
17392
|
}();
|
|
17393
|
+
status.TransportStatus = function() {
|
|
17394
|
+
function TransportStatus(properties) {
|
|
17395
|
+
this.sources = [];
|
|
17396
|
+
if (properties) {
|
|
17397
|
+
for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
17398
|
+
if (properties[keys[i]] != null)
|
|
17399
|
+
this[keys[i]] = properties[keys[i]];
|
|
17400
|
+
}
|
|
17401
|
+
}
|
|
17402
|
+
TransportStatus.prototype.sources = $util.emptyArray;
|
|
17403
|
+
TransportStatus.create = function create(properties) {
|
|
17404
|
+
return new TransportStatus(properties);
|
|
17405
|
+
};
|
|
17406
|
+
TransportStatus.encode = function encode(message, writer) {
|
|
17407
|
+
if (!writer)
|
|
17408
|
+
writer = $Writer.create();
|
|
17409
|
+
if (message.sources != null && message.sources.length)
|
|
17410
|
+
for (let i = 0; i < message.sources.length; ++i)
|
|
17411
|
+
$root.sesame.v1.status.TransportEvent.encode(message.sources[i], writer.uint32(
|
|
17412
|
+
/* id 1, wireType 2 =*/
|
|
17413
|
+
10
|
|
17414
|
+
).fork()).ldelim();
|
|
17415
|
+
return writer;
|
|
17416
|
+
};
|
|
17417
|
+
TransportStatus.encodeDelimited = function encodeDelimited(message, writer) {
|
|
17418
|
+
return this.encode(message, writer).ldelim();
|
|
17419
|
+
};
|
|
17420
|
+
TransportStatus.decode = function decode(reader, length, error) {
|
|
17421
|
+
if (!(reader instanceof $Reader))
|
|
17422
|
+
reader = $Reader.create(reader);
|
|
17423
|
+
let end = length === void 0 ? reader.len : reader.pos + length, message = new $root.sesame.v1.status.TransportStatus();
|
|
17424
|
+
while (reader.pos < end) {
|
|
17425
|
+
let tag = reader.uint32();
|
|
17426
|
+
if (tag === error)
|
|
17427
|
+
break;
|
|
17428
|
+
switch (tag >>> 3) {
|
|
17429
|
+
case 1: {
|
|
17430
|
+
if (!(message.sources && message.sources.length))
|
|
17431
|
+
message.sources = [];
|
|
17432
|
+
message.sources.push($root.sesame.v1.status.TransportEvent.decode(reader, reader.uint32()));
|
|
17433
|
+
break;
|
|
17434
|
+
}
|
|
17435
|
+
default:
|
|
17436
|
+
reader.skipType(tag & 7);
|
|
17437
|
+
break;
|
|
17438
|
+
}
|
|
17439
|
+
}
|
|
17440
|
+
return message;
|
|
17441
|
+
};
|
|
17442
|
+
TransportStatus.decodeDelimited = function decodeDelimited(reader) {
|
|
17443
|
+
if (!(reader instanceof $Reader))
|
|
17444
|
+
reader = new $Reader(reader);
|
|
17445
|
+
return this.decode(reader, reader.uint32());
|
|
17446
|
+
};
|
|
17447
|
+
TransportStatus.verify = function verify(message) {
|
|
17448
|
+
if (typeof message !== "object" || message === null)
|
|
17449
|
+
return "object expected";
|
|
17450
|
+
if (message.sources != null && message.hasOwnProperty("sources")) {
|
|
17451
|
+
if (!Array.isArray(message.sources))
|
|
17452
|
+
return "sources: array expected";
|
|
17453
|
+
for (let i = 0; i < message.sources.length; ++i) {
|
|
17454
|
+
let error = $root.sesame.v1.status.TransportEvent.verify(message.sources[i]);
|
|
17455
|
+
if (error)
|
|
17456
|
+
return "sources." + error;
|
|
17457
|
+
}
|
|
17458
|
+
}
|
|
17459
|
+
return null;
|
|
17460
|
+
};
|
|
17461
|
+
TransportStatus.fromObject = function fromObject(object) {
|
|
17462
|
+
if (object instanceof $root.sesame.v1.status.TransportStatus)
|
|
17463
|
+
return object;
|
|
17464
|
+
let message = new $root.sesame.v1.status.TransportStatus();
|
|
17465
|
+
if (object.sources) {
|
|
17466
|
+
if (!Array.isArray(object.sources))
|
|
17467
|
+
throw TypeError(".sesame.v1.status.TransportStatus.sources: array expected");
|
|
17468
|
+
message.sources = [];
|
|
17469
|
+
for (let i = 0; i < object.sources.length; ++i) {
|
|
17470
|
+
if (typeof object.sources[i] !== "object")
|
|
17471
|
+
throw TypeError(".sesame.v1.status.TransportStatus.sources: object expected");
|
|
17472
|
+
message.sources[i] = $root.sesame.v1.status.TransportEvent.fromObject(object.sources[i]);
|
|
17473
|
+
}
|
|
17474
|
+
}
|
|
17475
|
+
return message;
|
|
17476
|
+
};
|
|
17477
|
+
TransportStatus.toObject = function toObject(message, options) {
|
|
17478
|
+
if (!options)
|
|
17479
|
+
options = {};
|
|
17480
|
+
let object = {};
|
|
17481
|
+
if (options.arrays || options.defaults)
|
|
17482
|
+
object.sources = [];
|
|
17483
|
+
if (message.sources && message.sources.length) {
|
|
17484
|
+
object.sources = [];
|
|
17485
|
+
for (let j = 0; j < message.sources.length; ++j)
|
|
17486
|
+
object.sources[j] = $root.sesame.v1.status.TransportEvent.toObject(message.sources[j], options);
|
|
17487
|
+
}
|
|
17488
|
+
return object;
|
|
17489
|
+
};
|
|
17490
|
+
TransportStatus.prototype.toJSON = function toJSON() {
|
|
17491
|
+
return this.constructor.toObject(this, import_minimal.default.util.toJSONOptions);
|
|
17492
|
+
};
|
|
17493
|
+
TransportStatus.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
17494
|
+
if (typeUrlPrefix === void 0) {
|
|
17495
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
17496
|
+
}
|
|
17497
|
+
return typeUrlPrefix + "/sesame.v1.status.TransportStatus";
|
|
17498
|
+
};
|
|
17499
|
+
return TransportStatus;
|
|
17500
|
+
}();
|
|
17373
17501
|
status.MetadataEvent = function() {
|
|
17374
17502
|
function MetadataEvent(properties) {
|
|
17375
17503
|
if (properties) {
|
|
@@ -28851,7 +28979,7 @@ function parseDataFrame(frame) {
|
|
|
28851
28979
|
return {
|
|
28852
28980
|
dataType: "transport-status",
|
|
28853
28981
|
trackName,
|
|
28854
|
-
|
|
28982
|
+
status: sesame.v1.status.TransportStatus.decode(payload)
|
|
28855
28983
|
};
|
|
28856
28984
|
case sesame.v1.wire.DataType.DATA_TYPE_AUDIO_STATE:
|
|
28857
28985
|
return {
|
|
@@ -28871,6 +28999,36 @@ function parseDataFrame(frame) {
|
|
|
28871
28999
|
trackName,
|
|
28872
29000
|
request: sesame.v1.audio.AudioControlRequest.decode(payload)
|
|
28873
29001
|
};
|
|
29002
|
+
case sesame.v1.wire.DataType.DATA_TYPE_OUTPUT_CONTROL:
|
|
29003
|
+
return {
|
|
29004
|
+
dataType: "output-control",
|
|
29005
|
+
trackName,
|
|
29006
|
+
request: sesame.v1.outputs.OutputControlRequest.decode(payload)
|
|
29007
|
+
};
|
|
29008
|
+
case sesame.v1.wire.DataType.DATA_TYPE_SOURCE_CONTROL:
|
|
29009
|
+
return {
|
|
29010
|
+
dataType: "source-control",
|
|
29011
|
+
trackName,
|
|
29012
|
+
request: sesame.v1.sources.SourceControlRequest.decode(payload)
|
|
29013
|
+
};
|
|
29014
|
+
case sesame.v1.wire.DataType.DATA_TYPE_OUTPUT_STATUS:
|
|
29015
|
+
return {
|
|
29016
|
+
dataType: "output-status",
|
|
29017
|
+
trackName,
|
|
29018
|
+
status: sesame.v1.outputs.OutputStatus.decode(payload)
|
|
29019
|
+
};
|
|
29020
|
+
case sesame.v1.wire.DataType.DATA_TYPE_SOURCE_STATUS:
|
|
29021
|
+
return {
|
|
29022
|
+
dataType: "source-status",
|
|
29023
|
+
trackName,
|
|
29024
|
+
status: sesame.v1.sources.SourceStatus.decode(payload)
|
|
29025
|
+
};
|
|
29026
|
+
case sesame.v1.wire.DataType.DATA_TYPE_ENGINE_STATUS:
|
|
29027
|
+
return {
|
|
29028
|
+
dataType: "engine-status",
|
|
29029
|
+
trackName,
|
|
29030
|
+
status: sesame.v1.status.Status.decode(payload)
|
|
29031
|
+
};
|
|
28874
29032
|
case sesame.v1.wire.DataType.DATA_TYPE_BINARY:
|
|
28875
29033
|
return { dataType: "binary", trackName, data: payload };
|
|
28876
29034
|
default:
|
|
@@ -28933,6 +29091,16 @@ function buildSourceControlFrame(trackName, request) {
|
|
|
28933
29091
|
payload
|
|
28934
29092
|
);
|
|
28935
29093
|
}
|
|
29094
|
+
function buildOutputControlFrame(trackName, request) {
|
|
29095
|
+
const payload = sesame.v1.outputs.OutputControlRequest.encode(request).finish();
|
|
29096
|
+
return WireProtocol.serialize(
|
|
29097
|
+
{
|
|
29098
|
+
type: sesame.v1.wire.FrameType.FRAME_TYPE_DATA,
|
|
29099
|
+
data: { dataType: sesame.v1.wire.DataType.DATA_TYPE_OUTPUT_CONTROL, trackName }
|
|
29100
|
+
},
|
|
29101
|
+
payload
|
|
29102
|
+
);
|
|
29103
|
+
}
|
|
28936
29104
|
function buildBinaryDataFrame(trackName, payload) {
|
|
28937
29105
|
return WireProtocol.serialize(
|
|
28938
29106
|
{
|
|
@@ -29642,6 +29810,7 @@ var Event = sesame.v1.rpc.Event;
|
|
|
29642
29810
|
WireProtocol,
|
|
29643
29811
|
buildAudioControlFrame,
|
|
29644
29812
|
buildBinaryDataFrame,
|
|
29813
|
+
buildOutputControlFrame,
|
|
29645
29814
|
buildSourceControlFrame,
|
|
29646
29815
|
buildTransportControlFrame,
|
|
29647
29816
|
getLogger,
|