@science-corporation/synapse 2.2.7 → 2.2.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/dist/api/api.d.ts +4134 -4019
- package/dist/api/api.js +12560 -12266
- package/dist/api/proto.json +936 -905
- package/dist/device.d.ts +4 -0
- package/dist/device.d.ts.map +1 -1
- package/dist/device.js +20 -0
- package/dist/device.js.map +1 -1
- package/package.json +1 -1
- package/scripts/build.sh +0 -0
- package/scripts/generate.sh +0 -0
- package/scripts/postinstall.sh +0 -0
- package/src/api/api.d.ts +4134 -4019
- package/src/api/api.js +12560 -12266
- package/src/api/proto.json +936 -905
- package/src/device.ts +25 -0
- package/synapse-api/README.md +1 -1
- package/synapse-api/api/nodes/disk_writer.proto +1 -0
- package/synapse-api/api/status.proto +9 -2
- package/synapse-api/build.sh +0 -0
package/src/device.ts
CHANGED
|
@@ -221,6 +221,31 @@ class Device {
|
|
|
221
221
|
});
|
|
222
222
|
}
|
|
223
223
|
|
|
224
|
+
// Settings
|
|
225
|
+
|
|
226
|
+
async updateDeviceSettings(
|
|
227
|
+
settings: synapse.IDeviceSettings,
|
|
228
|
+
options: CallOptions = {}
|
|
229
|
+
): Promise<{ status: Status; response?: synapse.UpdateDeviceSettingsResponse }> {
|
|
230
|
+
return new Promise((resolve, reject) => {
|
|
231
|
+
const request: synapse.IUpdateDeviceSettingsRequest = { settings };
|
|
232
|
+
this.rpc.updateDeviceSettings(
|
|
233
|
+
request,
|
|
234
|
+
options,
|
|
235
|
+
(err: ServiceError, res: synapse.UpdateDeviceSettingsResponse) => {
|
|
236
|
+
if (err) {
|
|
237
|
+
reject(err);
|
|
238
|
+
} else if (!res) {
|
|
239
|
+
reject(new Error("No response from updateDeviceSettings"));
|
|
240
|
+
} else {
|
|
241
|
+
const status = res.status ? this._handleStatusResponse(res.status) : new Status();
|
|
242
|
+
resolve({ status, response: res });
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
);
|
|
246
|
+
});
|
|
247
|
+
}
|
|
248
|
+
|
|
224
249
|
deployApp(
|
|
225
250
|
options: CallOptions = {},
|
|
226
251
|
callbacks: {
|
package/synapse-api/README.md
CHANGED
|
@@ -23,9 +23,16 @@ enum DeviceState {
|
|
|
23
23
|
kError = 4;
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
+
message StorageDevice {
|
|
27
|
+
string name = 1;
|
|
28
|
+
uint32 storage_device_id = 2;
|
|
29
|
+
float total_gb = 3;
|
|
30
|
+
float used_gb = 4;
|
|
31
|
+
}
|
|
32
|
+
|
|
26
33
|
message DeviceStorage {
|
|
27
|
-
|
|
28
|
-
|
|
34
|
+
reserved 1, 2;
|
|
35
|
+
repeated StorageDevice storage_devices = 3;
|
|
29
36
|
}
|
|
30
37
|
|
|
31
38
|
message DevicePower {
|
package/synapse-api/build.sh
CHANGED
|
File without changes
|