@science-corporation/synapse 2.2.3 → 2.2.5
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 +13 -0
- package/dist/api/api.d.ts +4084 -4084
- package/dist/api/api.js +13869 -12429
- package/dist/api/proto.json +1654 -1654
- package/dist/device.d.ts +4 -0
- package/dist/device.d.ts.map +1 -1
- package/dist/device.js +18 -0
- package/dist/device.js.map +1 -1
- package/package.json +1 -1
- package/scripts/build.sh +5 -3
- package/scripts/postinstall.sh +17 -1
- package/src/api/api.d.ts +4084 -4084
- package/src/api/api.js +12268 -12268
- package/src/api/proto.json +542 -542
- package/src/device.ts +19 -0
- package/dist/api/api.d.ts.map +0 -1
- package/dist/api/api.js.map +0 -1
package/src/device.ts
CHANGED
|
@@ -120,6 +120,25 @@ class Device {
|
|
|
120
120
|
return call;
|
|
121
121
|
}
|
|
122
122
|
|
|
123
|
+
// Query (unary RPC for things like listing taps)
|
|
124
|
+
|
|
125
|
+
async query(
|
|
126
|
+
request: synapse.IQueryRequest,
|
|
127
|
+
options: CallOptions = {}
|
|
128
|
+
): Promise<{ status: Status; response?: synapse.QueryResponse }> {
|
|
129
|
+
return new Promise((resolve, reject) => {
|
|
130
|
+
this.rpc.query(request, options, (err: ServiceError, res: synapse.QueryResponse) => {
|
|
131
|
+
if (err) {
|
|
132
|
+
reject(err);
|
|
133
|
+
} else if (!res) {
|
|
134
|
+
reject(new Error("No response from query"));
|
|
135
|
+
} else {
|
|
136
|
+
resolve({ status: new Status(), response: res });
|
|
137
|
+
}
|
|
138
|
+
});
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
|
|
123
142
|
// Logs
|
|
124
143
|
|
|
125
144
|
async getLogs(
|
package/dist/api/api.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../src/api/api.js"],"names":[],"mappings":""}
|