@synnaxlabs/client 0.33.0 → 0.34.0
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/.turbo/turbo-build.log +6 -6
- package/dist/auth/auth.d.ts.map +1 -1
- package/dist/channel/writer.d.ts.map +1 -1
- package/dist/client.cjs +26 -26
- package/dist/client.js +235 -190
- package/dist/control/client.d.ts.map +1 -1
- package/dist/control/state.d.ts.map +1 -1
- package/dist/errors.d.ts +3 -3
- package/dist/errors.d.ts.map +1 -1
- package/dist/framer/adapter.d.ts.map +1 -1
- package/dist/framer/client.d.ts.map +1 -1
- package/dist/framer/deleter.d.ts.map +1 -1
- package/dist/framer/frame.d.ts.map +1 -1
- package/dist/framer/writer.d.ts.map +1 -1
- package/dist/hardware/device/client.d.ts.map +1 -1
- package/dist/hardware/device/payload.d.ts.map +1 -1
- package/dist/hardware/rack/client.d.ts.map +1 -1
- package/dist/hardware/task/client.d.ts +1 -1
- package/dist/hardware/task/client.d.ts.map +1 -1
- package/dist/hardware/task/ni/types.d.ts.map +1 -1
- package/dist/hardware/task/payload.d.ts.map +1 -1
- package/dist/label/client.d.ts.map +1 -1
- package/dist/ontology/client.d.ts.map +1 -1
- package/dist/ontology/payload.d.ts.map +1 -1
- package/dist/ranger/alias.d.ts.map +1 -1
- package/dist/ranger/client.d.ts.map +1 -1
- package/dist/ranger/kv.d.ts.map +1 -1
- package/dist/ranger/payload.d.ts.map +1 -1
- package/dist/util/telem.d.ts.map +1 -1
- package/dist/workspace/lineplot/payload.d.ts.map +1 -1
- package/dist/workspace/log/payload.d.ts.map +1 -1
- package/dist/workspace/payload.d.ts.map +1 -1
- package/dist/workspace/schematic/payload.d.ts.map +1 -1
- package/eslint.config.js +1 -1
- package/package.json +11 -11
- package/src/access/policy/policy.spec.ts +2 -4
- package/src/auth/auth.spec.ts +1 -1
- package/src/auth/auth.ts +17 -18
- package/src/channel/writer.ts +2 -2
- package/src/connection/checker.ts +1 -1
- package/src/control/client.ts +1 -1
- package/src/control/state.ts +1 -1
- package/src/errors.spec.ts +1 -1
- package/src/errors.ts +14 -15
- package/src/framer/adapter.ts +5 -6
- package/src/framer/client.ts +9 -4
- package/src/framer/deleter.ts +1 -1
- package/src/framer/frame.ts +9 -11
- package/src/framer/iterator.spec.ts +2 -3
- package/src/framer/writer.ts +1 -1
- package/src/hardware/device/client.ts +3 -3
- package/src/hardware/device/payload.ts +1 -1
- package/src/hardware/rack/client.ts +3 -3
- package/src/hardware/task/client.ts +13 -11
- package/src/hardware/task/ni/types.ts +1 -1
- package/src/hardware/task/payload.ts +1 -1
- package/src/hardware/task/task.spec.ts +1 -1
- package/src/label/client.ts +1 -1
- package/src/ontology/client.ts +1 -3
- package/src/ontology/group/payload.ts +2 -2
- package/src/ontology/payload.ts +1 -1
- package/src/ranger/alias.ts +2 -3
- package/src/ranger/client.ts +7 -9
- package/src/ranger/kv.ts +2 -2
- package/src/ranger/payload.ts +2 -2
- package/src/ranger/ranger.spec.ts +2 -2
- package/src/user/user.spec.ts +1 -2
- package/src/util/telem.ts +1 -3
- package/src/workspace/lineplot/payload.ts +1 -1
- package/src/workspace/log/payload.ts +1 -1
- package/src/workspace/payload.ts +1 -1
- package/src/workspace/schematic/payload.ts +1 -1
|
@@ -7,12 +7,12 @@
|
|
|
7
7
|
// License, use of this software will be governed by the Apache License, Version 2.0,
|
|
8
8
|
// included in the file licenses/APL.txt.
|
|
9
9
|
|
|
10
|
-
import { change } from "@synnaxlabs/x";
|
|
10
|
+
import { type change } from "@synnaxlabs/x";
|
|
11
11
|
import { DataType, Rate, TimeSpan, TimeStamp } from "@synnaxlabs/x/telem";
|
|
12
12
|
import { describe, expect, it } from "vitest";
|
|
13
13
|
|
|
14
14
|
import { QueryError } from "@/errors";
|
|
15
|
-
import { ranger } from "@/ranger";
|
|
15
|
+
import { type ranger } from "@/ranger";
|
|
16
16
|
import { type NewPayload } from "@/ranger/payload";
|
|
17
17
|
import { newClient } from "@/setupspecs";
|
|
18
18
|
|
package/src/user/user.spec.ts
CHANGED
|
@@ -183,9 +183,8 @@ describe("User", () => {
|
|
|
183
183
|
});
|
|
184
184
|
});
|
|
185
185
|
test("not found", async () => {
|
|
186
|
-
for (const u of userArray)
|
|
186
|
+
for (const u of userArray)
|
|
187
187
|
await expect(client.user.delete(u.key as string)).resolves.toBeUndefined();
|
|
188
|
-
}
|
|
189
188
|
await expect(
|
|
190
189
|
client.user.retrieve(userArray.map((u) => u.key as string)),
|
|
191
190
|
).rejects.toThrow(NotFoundError);
|
package/src/util/telem.ts
CHANGED
|
@@ -12,8 +12,6 @@ import { type DataType, type TypedArray } from "@synnaxlabs/x/telem";
|
|
|
12
12
|
export const randomSeries = (length: number, dataType: DataType): TypedArray => {
|
|
13
13
|
// generate random bytes of the correct length
|
|
14
14
|
const bytes = new Uint8Array(length * dataType.density.valueOf());
|
|
15
|
-
for (let i = 0; i < bytes.byteLength; i++)
|
|
16
|
-
bytes[i] = Math.floor(Math.random() * 256);
|
|
17
|
-
}
|
|
15
|
+
for (let i = 0; i < bytes.byteLength; i++) bytes[i] = Math.floor(Math.random() * 256);
|
|
18
16
|
return new dataType.Array(bytes.buffer);
|
|
19
17
|
};
|
|
@@ -27,4 +27,4 @@ export type LinePlot = z.infer<typeof linePlotZ>;
|
|
|
27
27
|
export const ONTOLOGY_TYPE: ontology.ResourceType = "lineplot";
|
|
28
28
|
|
|
29
29
|
export const ontologyID = (key: Key): ontology.ID =>
|
|
30
|
-
new ontology.ID({ type: ONTOLOGY_TYPE, key
|
|
30
|
+
new ontology.ID({ type: ONTOLOGY_TYPE, key });
|
package/src/workspace/payload.ts
CHANGED
|
@@ -41,4 +41,4 @@ export type Workspace = z.infer<typeof workspaceZ>;
|
|
|
41
41
|
export const ONTOLOGY_TYPE: ontology.ResourceType = "workspace";
|
|
42
42
|
|
|
43
43
|
export const ontologyID = (key: Key): ontology.ID =>
|
|
44
|
-
new ontology.ID({ type: ONTOLOGY_TYPE, key
|
|
44
|
+
new ontology.ID({ type: ONTOLOGY_TYPE, key });
|
|
@@ -35,4 +35,4 @@ export type Schematic = z.infer<typeof schematicZ>;
|
|
|
35
35
|
export const ONTOLOGY_TYPE: ontology.ResourceType = "schematic";
|
|
36
36
|
|
|
37
37
|
export const ontologyID = (key: Key): ontology.ID =>
|
|
38
|
-
new ontology.ID({ type: ONTOLOGY_TYPE, key
|
|
38
|
+
new ontology.ID({ type: ONTOLOGY_TYPE, key });
|