@synnaxlabs/client 0.42.3 → 0.43.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 +7 -7
- package/.vscode/settings.json +2 -2
- package/CONTRIBUTING.md +6 -5
- package/README.md +7 -8
- package/dist/access/payload.d.ts +1 -1
- package/dist/access/payload.d.ts.map +1 -1
- package/dist/access/policy/payload.d.ts +9 -9
- package/dist/access/policy/payload.d.ts.map +1 -1
- package/dist/access/policy/retriever.d.ts +3 -3
- package/dist/access/policy/retriever.d.ts.map +1 -1
- package/dist/auth/auth.d.ts +2 -2
- package/dist/auth/auth.d.ts.map +1 -1
- package/dist/channel/client.d.ts +1 -0
- package/dist/channel/client.d.ts.map +1 -1
- package/dist/channel/payload.d.ts +21 -8
- package/dist/channel/payload.d.ts.map +1 -1
- package/dist/channel/retriever.d.ts +5 -5
- package/dist/channel/retriever.d.ts.map +1 -1
- package/dist/channel/writer.d.ts +3 -3
- package/dist/channel/writer.d.ts.map +1 -1
- package/dist/client.cjs +135 -39
- package/dist/client.d.ts +8 -8
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +28505 -9345
- package/dist/connection/checker.d.ts +5 -5
- package/dist/connection/checker.d.ts.map +1 -1
- package/dist/control/state.d.ts +46 -3
- package/dist/control/state.d.ts.map +1 -1
- package/dist/framer/adapter.d.ts +2 -2
- package/dist/framer/adapter.d.ts.map +1 -1
- package/dist/framer/client.d.ts +2 -0
- package/dist/framer/client.d.ts.map +1 -1
- package/dist/framer/codec.d.ts +3 -3
- package/dist/framer/codec.d.ts.map +1 -1
- package/dist/framer/deleter.d.ts +8 -8
- package/dist/framer/deleter.d.ts.map +1 -1
- package/dist/framer/frame.d.ts +17 -17
- package/dist/framer/frame.d.ts.map +1 -1
- package/dist/framer/streamProxy.d.ts +3 -3
- package/dist/framer/streamProxy.d.ts.map +1 -1
- package/dist/framer/streamer.d.ts +103 -22
- package/dist/framer/streamer.d.ts.map +1 -1
- package/dist/framer/writer.d.ts +25 -25
- package/dist/framer/writer.d.ts.map +1 -1
- package/dist/hardware/device/client.d.ts +3 -3
- package/dist/hardware/device/client.d.ts.map +1 -1
- package/dist/hardware/device/payload.d.ts +65 -18
- package/dist/hardware/device/payload.d.ts.map +1 -1
- package/dist/hardware/rack/client.d.ts.map +1 -1
- package/dist/hardware/rack/payload.d.ts +87 -30
- package/dist/hardware/rack/payload.d.ts.map +1 -1
- package/dist/hardware/task/client.d.ts +3 -3
- package/dist/hardware/task/client.d.ts.map +1 -1
- package/dist/hardware/task/payload.d.ts +14 -15
- package/dist/hardware/task/payload.d.ts.map +1 -1
- package/dist/label/payload.d.ts +2 -2
- package/dist/label/payload.d.ts.map +1 -1
- package/dist/label/writer.d.ts +4 -4
- package/dist/label/writer.d.ts.map +1 -1
- package/dist/ontology/client.d.ts +3 -3
- package/dist/ontology/client.d.ts.map +1 -1
- package/dist/ontology/group/payload.d.ts +2 -2
- package/dist/ontology/group/payload.d.ts.map +1 -1
- package/dist/ontology/payload.d.ts +25 -25
- package/dist/ontology/payload.d.ts.map +1 -1
- package/dist/ranger/client.d.ts +8 -8
- package/dist/ranger/client.d.ts.map +1 -1
- package/dist/ranger/kv.d.ts +6 -6
- package/dist/ranger/kv.d.ts.map +1 -1
- package/dist/ranger/payload.d.ts +15 -15
- package/dist/ranger/payload.d.ts.map +1 -1
- package/dist/ranger/writer.d.ts +10 -10
- package/dist/ranger/writer.d.ts.map +1 -1
- package/dist/testutil/{indexedPair.d.ts → channels.d.ts} +1 -1
- package/dist/testutil/channels.d.ts.map +1 -0
- package/dist/user/payload.d.ts +3 -3
- package/dist/user/payload.d.ts.map +1 -1
- package/dist/user/retriever.d.ts +2 -2
- package/dist/user/retriever.d.ts.map +1 -1
- package/dist/util/retrieve.d.ts +6 -6
- package/dist/util/retrieve.d.ts.map +1 -1
- package/dist/util/zod.d.ts +2 -2
- package/dist/util/zod.d.ts.map +1 -1
- package/dist/workspace/client.d.ts.map +1 -1
- package/dist/workspace/lineplot/client.d.ts.map +1 -1
- package/dist/workspace/lineplot/lineplot.spec.d.ts +2 -0
- package/dist/workspace/lineplot/lineplot.spec.d.ts.map +1 -0
- package/dist/workspace/lineplot/payload.d.ts +5 -5
- package/dist/workspace/lineplot/payload.d.ts.map +1 -1
- package/dist/workspace/log/client.d.ts.map +1 -1
- package/dist/workspace/log/payload.d.ts +5 -5
- package/dist/workspace/log/payload.d.ts.map +1 -1
- package/dist/workspace/payload.d.ts +6 -6
- package/dist/workspace/payload.d.ts.map +1 -1
- package/dist/workspace/schematic/client.d.ts.map +1 -1
- package/dist/workspace/schematic/payload.d.ts +7 -7
- package/dist/workspace/schematic/payload.d.ts.map +1 -1
- package/dist/workspace/table/client.d.ts.map +1 -1
- package/dist/workspace/table/payload.d.ts +6 -6
- package/dist/workspace/table/payload.d.ts.map +1 -1
- package/package.json +11 -12
- package/src/access/payload.ts +1 -1
- package/src/access/policy/client.ts +3 -3
- package/src/access/policy/payload.ts +1 -1
- package/src/access/policy/retriever.ts +1 -1
- package/src/access/policy/writer.ts +7 -7
- package/src/auth/auth.ts +1 -1
- package/src/channel/client.ts +6 -4
- package/src/channel/payload.ts +10 -18
- package/src/channel/retriever.ts +2 -2
- package/src/channel/writer.ts +11 -2
- package/src/client.ts +3 -3
- package/src/connection/checker.ts +1 -1
- package/src/connection/connection.spec.ts +1 -1
- package/src/control/client.ts +1 -1
- package/src/control/state.ts +4 -5
- package/src/errors.spec.ts +2 -3
- package/src/errors.ts +2 -2
- package/src/framer/adapter.ts +2 -2
- package/src/framer/client.ts +4 -3
- package/src/framer/codec.spec.ts +2 -2
- package/src/framer/codec.ts +5 -9
- package/src/framer/deleter.spec.ts +1 -1
- package/src/framer/deleter.ts +1 -1
- package/src/framer/frame.ts +15 -15
- package/src/framer/iterator.spec.ts +1 -1
- package/src/framer/iterator.ts +1 -1
- package/src/framer/streamProxy.ts +4 -4
- package/src/framer/streamer.spec.ts +420 -215
- package/src/framer/streamer.ts +119 -21
- package/src/framer/writer.spec.ts +1 -1
- package/src/framer/writer.ts +15 -8
- package/src/hardware/device/client.ts +5 -5
- package/src/hardware/device/device.spec.ts +28 -30
- package/src/hardware/device/payload.ts +5 -5
- package/src/hardware/rack/client.ts +4 -4
- package/src/hardware/rack/payload.ts +6 -6
- package/src/hardware/rack/rack.spec.ts +1 -1
- package/src/hardware/task/client.ts +21 -19
- package/src/hardware/task/payload.ts +8 -6
- package/src/label/payload.ts +1 -1
- package/src/label/retriever.ts +3 -3
- package/src/label/writer.ts +4 -4
- package/src/ontology/client.ts +4 -4
- package/src/ontology/group/payload.ts +3 -3
- package/src/ontology/group/writer.ts +1 -1
- package/src/ontology/payload.ts +2 -2
- package/src/ontology/writer.ts +1 -1
- package/src/ranger/alias.ts +1 -1
- package/src/ranger/client.ts +6 -4
- package/src/ranger/kv.ts +4 -4
- package/src/ranger/payload.ts +3 -3
- package/src/ranger/writer.ts +1 -1
- package/src/user/client.ts +3 -3
- package/src/user/payload.ts +1 -1
- package/src/user/retriever.ts +1 -1
- package/src/user/writer.ts +4 -4
- package/src/util/retrieve.spec.ts +7 -4
- package/src/util/retrieve.ts +10 -10
- package/src/util/zod.ts +3 -3
- package/src/workspace/client.ts +5 -5
- package/src/workspace/lineplot/client.ts +5 -5
- package/src/workspace/lineplot/{linePlot.spec.ts → lineplot.spec.ts} +2 -2
- package/src/workspace/lineplot/payload.ts +1 -1
- package/src/workspace/log/client.ts +5 -5
- package/src/workspace/log/log.spec.ts +2 -2
- package/src/workspace/log/payload.ts +1 -1
- package/src/workspace/payload.ts +1 -1
- package/src/workspace/schematic/client.ts +5 -5
- package/src/workspace/schematic/payload.ts +1 -1
- package/src/workspace/schematic/schematic.spec.ts +3 -3
- package/src/workspace/table/client.ts +5 -5
- package/src/workspace/table/payload.ts +1 -1
- package/src/workspace/table/table.spec.ts +2 -2
- package/src/workspace/workspace.spec.ts +2 -2
- package/tsconfig.json +3 -5
- package/dist/testutil/indexedPair.d.ts.map +0 -1
- package/dist/workspace/lineplot/linePlot.spec.d.ts +0 -2
- package/dist/workspace/lineplot/linePlot.spec.d.ts.map +0 -1
- /package/src/testutil/{indexedPair.ts → channels.ts} +0 -0
package/src/workspace/payload.ts
CHANGED
|
@@ -8,8 +8,8 @@
|
|
|
8
8
|
// included in the file licenses/APL.txt.
|
|
9
9
|
|
|
10
10
|
import { sendRequired, type UnaryClient } from "@synnaxlabs/freighter";
|
|
11
|
-
import {
|
|
12
|
-
import { z } from "zod";
|
|
11
|
+
import { array, type UnknownRecord } from "@synnaxlabs/x";
|
|
12
|
+
import { z } from "zod/v4";
|
|
13
13
|
|
|
14
14
|
import { ontology } from "@/ontology";
|
|
15
15
|
import { nullableArrayZ } from "@/util/zod";
|
|
@@ -62,7 +62,7 @@ export class Client {
|
|
|
62
62
|
const res = await sendRequired(
|
|
63
63
|
this.client,
|
|
64
64
|
CREATE_ENDPOINT,
|
|
65
|
-
{ workspace, schematics: toArray(schematics) },
|
|
65
|
+
{ workspace, schematics: array.toArray(schematics) },
|
|
66
66
|
createReqZ,
|
|
67
67
|
createResZ,
|
|
68
68
|
);
|
|
@@ -96,7 +96,7 @@ export class Client {
|
|
|
96
96
|
const res = await sendRequired(
|
|
97
97
|
this.client,
|
|
98
98
|
RETRIEVE_ENDPOINT,
|
|
99
|
-
{ keys: toArray(keys) },
|
|
99
|
+
{ keys: array.toArray(keys) },
|
|
100
100
|
retrieveReqZ,
|
|
101
101
|
retrieveResZ,
|
|
102
102
|
);
|
|
@@ -109,7 +109,7 @@ export class Client {
|
|
|
109
109
|
await sendRequired(
|
|
110
110
|
this.client,
|
|
111
111
|
DELETE_ENDPOINT,
|
|
112
|
-
{ keys: toArray(keys) },
|
|
112
|
+
{ keys: array.toArray(keys) },
|
|
113
113
|
deleteReqZ,
|
|
114
114
|
emptyResZ,
|
|
115
115
|
);
|
|
@@ -7,7 +7,7 @@
|
|
|
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 {
|
|
10
|
+
import { uuid } from "@synnaxlabs/x";
|
|
11
11
|
import { describe, expect, it, test } from "vitest";
|
|
12
12
|
|
|
13
13
|
import { ValidationError } from "@/errors";
|
|
@@ -27,7 +27,7 @@ describe("Schematic", () => {
|
|
|
27
27
|
data: { one: 1 },
|
|
28
28
|
});
|
|
29
29
|
expect(schematic.name).toEqual("Schematic");
|
|
30
|
-
expect(schematic.key).not.toEqual(
|
|
30
|
+
expect(schematic.key).not.toEqual(uuid.ZERO);
|
|
31
31
|
expect(schematic.data.one).toEqual(1);
|
|
32
32
|
});
|
|
33
33
|
});
|
|
@@ -93,7 +93,7 @@ describe("Schematic", () => {
|
|
|
93
93
|
false,
|
|
94
94
|
);
|
|
95
95
|
expect(schematic2.name).toEqual("Schematic2");
|
|
96
|
-
expect(schematic2.key).not.toEqual(
|
|
96
|
+
expect(schematic2.key).not.toEqual(uuid.ZERO);
|
|
97
97
|
expect(schematic2.data.one).toEqual(1);
|
|
98
98
|
});
|
|
99
99
|
describe("snapshot", () => {
|
|
@@ -8,8 +8,8 @@
|
|
|
8
8
|
// included in the file licenses/APL.txt.
|
|
9
9
|
|
|
10
10
|
import { sendRequired, type UnaryClient } from "@synnaxlabs/freighter";
|
|
11
|
-
import {
|
|
12
|
-
import { z } from "zod";
|
|
11
|
+
import { array, type UnknownRecord } from "@synnaxlabs/x";
|
|
12
|
+
import { z } from "zod/v4";
|
|
13
13
|
|
|
14
14
|
import { ontology } from "@/ontology";
|
|
15
15
|
import { type Key as WorkspaceKey, keyZ as workspaceKeyZ } from "@/workspace/payload";
|
|
@@ -54,7 +54,7 @@ export class Client {
|
|
|
54
54
|
const res = await sendRequired(
|
|
55
55
|
this.client,
|
|
56
56
|
CREATE_ENDPOINT,
|
|
57
|
-
{ workspace, tables: toArray(tables) },
|
|
57
|
+
{ workspace, tables: array.toArray(tables) },
|
|
58
58
|
createReqZ,
|
|
59
59
|
createResZ,
|
|
60
60
|
);
|
|
@@ -88,7 +88,7 @@ export class Client {
|
|
|
88
88
|
const res = await sendRequired(
|
|
89
89
|
this.client,
|
|
90
90
|
RETRIEVE_ENDPOINT,
|
|
91
|
-
{ keys: toArray(keys) },
|
|
91
|
+
{ keys: array.toArray(keys) },
|
|
92
92
|
retrieveReqZ,
|
|
93
93
|
retrieveResZ,
|
|
94
94
|
);
|
|
@@ -101,7 +101,7 @@ export class Client {
|
|
|
101
101
|
await sendRequired(
|
|
102
102
|
this.client,
|
|
103
103
|
DELETE_ENDPOINT,
|
|
104
|
-
{ keys: toArray(keys) },
|
|
104
|
+
{ keys: array.toArray(keys) },
|
|
105
105
|
deleteReqZ,
|
|
106
106
|
emptyResZ,
|
|
107
107
|
);
|
|
@@ -7,7 +7,7 @@
|
|
|
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 {
|
|
10
|
+
import { uuid } from "@synnaxlabs/x";
|
|
11
11
|
import { describe, expect, test } from "vitest";
|
|
12
12
|
|
|
13
13
|
import { newClient } from "@/setupspecs";
|
|
@@ -23,7 +23,7 @@ describe("Table", () => {
|
|
|
23
23
|
data: { one: 1 },
|
|
24
24
|
});
|
|
25
25
|
expect(table.name).toEqual("Table");
|
|
26
|
-
expect(table.key).not.toEqual(
|
|
26
|
+
expect(table.key).not.toEqual(uuid.ZERO);
|
|
27
27
|
expect(table.data.one).toEqual(1);
|
|
28
28
|
});
|
|
29
29
|
});
|
|
@@ -7,7 +7,7 @@
|
|
|
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 {
|
|
10
|
+
import { uuid } from "@synnaxlabs/x";
|
|
11
11
|
import { describe, expect, test } from "vitest";
|
|
12
12
|
|
|
13
13
|
import { newClient } from "@/setupspecs";
|
|
@@ -22,7 +22,7 @@ describe("Workspace", () => {
|
|
|
22
22
|
layout: { one: 1 },
|
|
23
23
|
});
|
|
24
24
|
expect(ws.name).toEqual("Schematic");
|
|
25
|
-
expect(ws.key).not.toEqual(
|
|
25
|
+
expect(ws.key).not.toEqual(uuid.ZERO);
|
|
26
26
|
expect(ws.layout.one).toEqual(1);
|
|
27
27
|
});
|
|
28
28
|
});
|
package/tsconfig.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"indexedPair.d.ts","sourceRoot":"","sources":["../../src/testutil/indexedPair.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,KAAK,MAAM,MAAM,UAAU,CAAC;AAEnC,eAAO,MAAM,cAAc,GACzB,QAAQ,MAAM,KACb,OAAO,CAAC,CAAC,OAAO,CAAC,OAAO,EAAE,OAAO,CAAC,OAAO,CAAC,CAc5C,CAAC;AAEF,eAAO,MAAM,iBAAiB,GAAU,QAAQ,MAAM,KAAG,OAAO,CAAC,OAAO,CAAC,OAAO,CAO/E,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"linePlot.spec.d.ts","sourceRoot":"","sources":["../../../src/workspace/lineplot/linePlot.spec.ts"],"names":[],"mappings":""}
|
|
File without changes
|