@stinkycomputing/sesame-api-client 1.10.0-alpha.2 → 1.10.0-alpha.3
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 +8 -2
- package/dist/index.browser.mjs +60 -0
- package/dist/index.browser.mjs.map +2 -2
- package/dist/index.cjs +61 -0
- 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 +60 -0
- package/dist/index.mjs.map +2 -2
- package/dist/proto/api.d.ts +6 -0
- package/dist/proto/api.js +23 -0
- package/dist/sesame-wire-protocol.d.ts +27 -1
- package/dist/sesame-wire-protocol.d.ts.map +1 -1
- package/docs/protocol-reference.md +47 -8
- 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() {
|
|
@@ -28871,6 +28891,36 @@ function parseDataFrame(frame) {
|
|
|
28871
28891
|
trackName,
|
|
28872
28892
|
request: sesame.v1.audio.AudioControlRequest.decode(payload)
|
|
28873
28893
|
};
|
|
28894
|
+
case sesame.v1.wire.DataType.DATA_TYPE_OUTPUT_CONTROL:
|
|
28895
|
+
return {
|
|
28896
|
+
dataType: "output-control",
|
|
28897
|
+
trackName,
|
|
28898
|
+
request: sesame.v1.outputs.OutputControlRequest.decode(payload)
|
|
28899
|
+
};
|
|
28900
|
+
case sesame.v1.wire.DataType.DATA_TYPE_SOURCE_CONTROL:
|
|
28901
|
+
return {
|
|
28902
|
+
dataType: "source-control",
|
|
28903
|
+
trackName,
|
|
28904
|
+
request: sesame.v1.sources.SourceControlRequest.decode(payload)
|
|
28905
|
+
};
|
|
28906
|
+
case sesame.v1.wire.DataType.DATA_TYPE_OUTPUT_STATUS:
|
|
28907
|
+
return {
|
|
28908
|
+
dataType: "output-status",
|
|
28909
|
+
trackName,
|
|
28910
|
+
status: sesame.v1.outputs.OutputStatus.decode(payload)
|
|
28911
|
+
};
|
|
28912
|
+
case sesame.v1.wire.DataType.DATA_TYPE_SOURCE_STATUS:
|
|
28913
|
+
return {
|
|
28914
|
+
dataType: "source-status",
|
|
28915
|
+
trackName,
|
|
28916
|
+
status: sesame.v1.sources.SourceStatus.decode(payload)
|
|
28917
|
+
};
|
|
28918
|
+
case sesame.v1.wire.DataType.DATA_TYPE_ENGINE_STATUS:
|
|
28919
|
+
return {
|
|
28920
|
+
dataType: "engine-status",
|
|
28921
|
+
trackName,
|
|
28922
|
+
status: sesame.v1.status.Status.decode(payload)
|
|
28923
|
+
};
|
|
28874
28924
|
case sesame.v1.wire.DataType.DATA_TYPE_BINARY:
|
|
28875
28925
|
return { dataType: "binary", trackName, data: payload };
|
|
28876
28926
|
default:
|
|
@@ -28933,6 +28983,16 @@ function buildSourceControlFrame(trackName, request) {
|
|
|
28933
28983
|
payload
|
|
28934
28984
|
);
|
|
28935
28985
|
}
|
|
28986
|
+
function buildOutputControlFrame(trackName, request) {
|
|
28987
|
+
const payload = sesame.v1.outputs.OutputControlRequest.encode(request).finish();
|
|
28988
|
+
return WireProtocol.serialize(
|
|
28989
|
+
{
|
|
28990
|
+
type: sesame.v1.wire.FrameType.FRAME_TYPE_DATA,
|
|
28991
|
+
data: { dataType: sesame.v1.wire.DataType.DATA_TYPE_OUTPUT_CONTROL, trackName }
|
|
28992
|
+
},
|
|
28993
|
+
payload
|
|
28994
|
+
);
|
|
28995
|
+
}
|
|
28936
28996
|
function buildBinaryDataFrame(trackName, payload) {
|
|
28937
28997
|
return WireProtocol.serialize(
|
|
28938
28998
|
{
|
|
@@ -29642,6 +29702,7 @@ var Event = sesame.v1.rpc.Event;
|
|
|
29642
29702
|
WireProtocol,
|
|
29643
29703
|
buildAudioControlFrame,
|
|
29644
29704
|
buildBinaryDataFrame,
|
|
29705
|
+
buildOutputControlFrame,
|
|
29645
29706
|
buildSourceControlFrame,
|
|
29646
29707
|
buildTransportControlFrame,
|
|
29647
29708
|
getLogger,
|