@synnaxlabs/client 0.20.0 → 0.22.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.
Files changed (262) hide show
  1. package/.turbo/turbo-build.log +7 -7
  2. package/.vscode/settings.json +3 -0
  3. package/README.md +13 -0
  4. package/dist/auth/auth.d.ts +7 -6
  5. package/dist/auth/auth.d.ts.map +1 -1
  6. package/dist/channel/client.d.ts +14 -11
  7. package/dist/channel/client.d.ts.map +1 -1
  8. package/dist/channel/creator.d.ts +10 -0
  9. package/dist/channel/creator.d.ts.map +1 -0
  10. package/dist/channel/payload.d.ts +6 -2
  11. package/dist/channel/payload.d.ts.map +1 -1
  12. package/dist/channel/retriever.d.ts +65 -35
  13. package/dist/channel/retriever.d.ts.map +1 -1
  14. package/dist/channel/writer.d.ts +4 -3
  15. package/dist/client.cjs +19 -22
  16. package/dist/client.cjs.map +1 -1
  17. package/dist/client.d.ts +12 -10
  18. package/dist/client.d.ts.map +1 -1
  19. package/dist/client.js +6781 -6675
  20. package/dist/client.js.map +1 -1
  21. package/dist/connection/checker.d.ts +4 -3
  22. package/dist/connection/checker.d.ts.map +1 -1
  23. package/dist/control/authority.d.ts +2 -1
  24. package/dist/control/state.d.ts +6 -4
  25. package/dist/control/state.d.ts.map +1 -1
  26. package/dist/errors.d.ts +24 -20
  27. package/dist/errors.d.ts.map +1 -1
  28. package/dist/framer/adapter.d.ts +5 -4
  29. package/dist/framer/adapter.d.ts.map +1 -1
  30. package/dist/framer/client.d.ts +12 -12
  31. package/dist/framer/client.d.ts.map +1 -1
  32. package/dist/framer/frame.d.ts +13 -12
  33. package/dist/framer/frame.d.ts.map +1 -1
  34. package/dist/framer/iterator.d.ts +5 -4
  35. package/dist/framer/iterator.d.ts.map +1 -1
  36. package/dist/framer/streamProxy.d.ts +3 -2
  37. package/dist/framer/streamProxy.d.ts.map +1 -1
  38. package/dist/framer/streamer.d.ts +13 -4
  39. package/dist/framer/streamer.d.ts.map +1 -1
  40. package/dist/framer/writer.d.ts +67 -33
  41. package/dist/framer/writer.d.ts.map +1 -1
  42. package/dist/hardware/client.d.ts +4 -3
  43. package/dist/hardware/device/client.d.ts +107 -14
  44. package/dist/hardware/device/client.d.ts.map +1 -1
  45. package/dist/hardware/device/external.d.ts +0 -2
  46. package/dist/hardware/device/external.d.ts.map +1 -1
  47. package/dist/hardware/device/index.d.ts +1 -1
  48. package/dist/hardware/device/index.d.ts.map +1 -1
  49. package/dist/hardware/rack/client.d.ts +43 -20
  50. package/dist/hardware/rack/client.d.ts.map +1 -1
  51. package/dist/hardware/rack/external.d.ts +0 -2
  52. package/dist/hardware/rack/external.d.ts.map +1 -1
  53. package/dist/hardware/task/client.d.ts +197 -14
  54. package/dist/hardware/task/client.d.ts.map +1 -1
  55. package/dist/hardware/task/index.d.ts +1 -1
  56. package/dist/hardware/task/index.d.ts.map +1 -1
  57. package/dist/index.d.ts +4 -3
  58. package/dist/index.d.ts.map +1 -1
  59. package/dist/label/client.d.ts +8 -6
  60. package/dist/label/client.d.ts.map +1 -1
  61. package/dist/label/payload.d.ts +2 -1
  62. package/dist/label/retriever.d.ts +3 -2
  63. package/dist/label/writer.d.ts +4 -3
  64. package/dist/ontology/client.d.ts +82 -14
  65. package/dist/ontology/client.d.ts.map +1 -1
  66. package/dist/ontology/external.d.ts +0 -1
  67. package/dist/ontology/external.d.ts.map +1 -1
  68. package/dist/ontology/group/client.d.ts +3 -2
  69. package/dist/ontology/group/client.d.ts.map +1 -1
  70. package/dist/ontology/group/group.d.ts +1 -0
  71. package/dist/ontology/group/payload.d.ts +2 -1
  72. package/dist/ontology/group/writer.d.ts +4 -3
  73. package/dist/ontology/payload.d.ts +71 -60
  74. package/dist/ontology/payload.d.ts.map +1 -1
  75. package/dist/ontology/writer.d.ts +3 -2
  76. package/dist/ranger/active.d.ts +3 -2
  77. package/dist/ranger/alias.d.ts +7 -6
  78. package/dist/ranger/alias.d.ts.map +1 -1
  79. package/dist/ranger/client.d.ts +162 -11
  80. package/dist/ranger/client.d.ts.map +1 -1
  81. package/dist/ranger/external.d.ts +0 -1
  82. package/dist/ranger/external.d.ts.map +1 -1
  83. package/dist/ranger/kv.d.ts +5 -3
  84. package/dist/ranger/kv.d.ts.map +1 -1
  85. package/dist/ranger/payload.d.ts +57 -50
  86. package/dist/ranger/payload.d.ts.map +1 -1
  87. package/dist/ranger/range.d.ts +12 -10
  88. package/dist/ranger/range.d.ts.map +1 -1
  89. package/dist/ranger/writer.d.ts +3 -2
  90. package/dist/setupspecs.d.ts +2 -1
  91. package/dist/signals/observable.d.ts +8 -15
  92. package/dist/signals/observable.d.ts.map +1 -1
  93. package/dist/transport.d.ts +3 -2
  94. package/dist/transport.d.ts.map +1 -1
  95. package/dist/user/payload.d.ts +2 -1
  96. package/dist/util/retrieve.d.ts +24 -0
  97. package/dist/util/retrieve.d.ts.map +1 -0
  98. package/dist/util/retrieve.spec.d.ts +2 -0
  99. package/dist/util/retrieve.spec.d.ts.map +1 -0
  100. package/dist/util/telem.d.ts +2 -1
  101. package/dist/util/telem.d.ts.map +1 -1
  102. package/dist/util/zod.d.ts +4 -0
  103. package/dist/util/zod.d.ts.map +1 -0
  104. package/dist/workspace/client.d.ts +9 -6
  105. package/dist/workspace/client.d.ts.map +1 -1
  106. package/dist/workspace/lineplot/client.d.ts +6 -5
  107. package/dist/workspace/lineplot/client.d.ts.map +1 -1
  108. package/dist/workspace/lineplot/payload.d.ts +3 -2
  109. package/dist/workspace/lineplot/payload.d.ts.map +1 -1
  110. package/dist/workspace/lineplot/retriever.d.ts +3 -2
  111. package/dist/workspace/lineplot/retriever.d.ts.map +1 -1
  112. package/dist/workspace/lineplot/writer.d.ts +7 -6
  113. package/dist/workspace/lineplot/writer.d.ts.map +1 -1
  114. package/dist/workspace/payload.d.ts +3 -2
  115. package/dist/workspace/payload.d.ts.map +1 -1
  116. package/dist/workspace/retriever.d.ts +3 -2
  117. package/dist/workspace/schematic/client.d.ts +18 -0
  118. package/dist/workspace/schematic/client.d.ts.map +1 -0
  119. package/dist/workspace/schematic/external.d.ts.map +1 -0
  120. package/dist/workspace/schematic/index.d.ts +2 -0
  121. package/dist/workspace/schematic/index.d.ts.map +1 -0
  122. package/dist/workspace/{pid → schematic}/payload.d.ts +6 -5
  123. package/dist/workspace/schematic/payload.d.ts.map +1 -0
  124. package/dist/workspace/schematic/retriever.d.ts +10 -0
  125. package/dist/workspace/schematic/retriever.d.ts.map +1 -0
  126. package/dist/workspace/schematic/schematic.spec.d.ts +2 -0
  127. package/dist/workspace/schematic/schematic.spec.d.ts.map +1 -0
  128. package/dist/workspace/{pid → schematic}/writer.d.ts +11 -10
  129. package/dist/workspace/schematic/writer.d.ts.map +1 -0
  130. package/dist/workspace/writer.d.ts +5 -4
  131. package/dist/workspace/writer.d.ts.map +1 -1
  132. package/examples/node/package-lock.json +29 -12
  133. package/examples/node/package.json +2 -2
  134. package/examples/node/streamWrite.js +8 -11
  135. package/package.json +10 -9
  136. package/src/auth/auth.spec.ts +55 -15
  137. package/src/auth/auth.ts +41 -42
  138. package/src/channel/batchRetriever.spec.ts +37 -40
  139. package/src/channel/channel.spec.ts +4 -4
  140. package/src/channel/client.ts +42 -49
  141. package/src/channel/creator.ts +37 -0
  142. package/src/channel/payload.ts +2 -1
  143. package/src/channel/retriever.ts +55 -71
  144. package/src/client.ts +23 -20
  145. package/src/connection/checker.ts +1 -1
  146. package/src/connection/connection.spec.ts +1 -6
  147. package/src/control/state.ts +3 -1
  148. package/src/errors.ts +71 -67
  149. package/src/framer/adapter.spec.ts +33 -1
  150. package/src/framer/adapter.ts +10 -6
  151. package/src/framer/client.ts +13 -12
  152. package/src/framer/frame.spec.ts +1 -1
  153. package/src/framer/frame.ts +9 -6
  154. package/src/framer/iterator.spec.ts +1 -1
  155. package/src/framer/iterator.ts +1 -1
  156. package/src/framer/streamProxy.ts +12 -13
  157. package/src/framer/streamer.spec.ts +1 -1
  158. package/src/framer/streamer.ts +25 -1
  159. package/src/framer/writer.spec.ts +49 -2
  160. package/src/framer/writer.ts +27 -2
  161. package/src/hardware/device/client.ts +155 -28
  162. package/src/hardware/device/device.spec.ts +2 -2
  163. package/src/hardware/device/external.ts +0 -2
  164. package/src/hardware/device/index.ts +2 -2
  165. package/src/hardware/rack/client.ts +139 -56
  166. package/src/hardware/rack/external.ts +0 -2
  167. package/src/hardware/rack/rack.spec.ts +20 -1
  168. package/src/hardware/task/client.ts +324 -31
  169. package/src/hardware/task/index.ts +1 -1
  170. package/src/hardware/task/task.spec.ts +41 -0
  171. package/src/index.ts +3 -4
  172. package/src/label/client.ts +3 -2
  173. package/src/label/retriever.ts +1 -1
  174. package/src/label/writer.ts +1 -1
  175. package/src/ontology/client.ts +195 -41
  176. package/src/ontology/external.ts +0 -1
  177. package/src/ontology/group/client.ts +1 -2
  178. package/src/ontology/group/payload.ts +1 -1
  179. package/src/ontology/ontology.spec.ts +16 -0
  180. package/src/ontology/payload.ts +22 -13
  181. package/src/ranger/active.ts +5 -5
  182. package/src/ranger/alias.ts +2 -2
  183. package/src/ranger/client.ts +68 -17
  184. package/src/ranger/external.ts +0 -1
  185. package/src/ranger/kv.ts +6 -1
  186. package/src/ranger/payload.ts +6 -4
  187. package/src/ranger/range.ts +4 -1
  188. package/src/ranger/ranger.spec.ts +24 -2
  189. package/src/signals/observable.ts +24 -63
  190. package/src/transport.ts +2 -1
  191. package/src/util/retrieve.spec.ts +56 -0
  192. package/src/util/retrieve.ts +103 -0
  193. package/src/util/telem.ts +1 -1
  194. package/src/util/zod.ts +4 -0
  195. package/src/workspace/client.ts +6 -4
  196. package/src/workspace/lineplot/client.ts +3 -3
  197. package/src/workspace/lineplot/linePlot.spec.ts +11 -11
  198. package/src/workspace/lineplot/payload.ts +1 -1
  199. package/src/workspace/lineplot/retriever.ts +5 -13
  200. package/src/workspace/lineplot/writer.ts +8 -7
  201. package/src/workspace/payload.ts +6 -3
  202. package/src/workspace/retriever.ts +1 -1
  203. package/src/workspace/{pid → schematic}/client.ts +10 -10
  204. package/src/workspace/{pid → schematic}/external.ts +2 -2
  205. package/src/workspace/{pid → schematic}/index.ts +1 -1
  206. package/src/workspace/{pid → schematic}/payload.ts +4 -4
  207. package/src/workspace/{pid → schematic}/retriever.ts +10 -10
  208. package/src/workspace/{pid/pid.spec.ts → schematic/schematic.spec.ts} +35 -35
  209. package/src/workspace/{pid → schematic}/writer.ts +26 -25
  210. package/src/workspace/workspace.spec.ts +7 -7
  211. package/src/workspace/writer.ts +8 -2
  212. package/dist/hardware/device/payload.d.ts +0 -30
  213. package/dist/hardware/device/payload.d.ts.map +0 -1
  214. package/dist/hardware/device/retriever.d.ts +0 -10
  215. package/dist/hardware/device/retriever.d.ts.map +0 -1
  216. package/dist/hardware/device/writer.d.ts +0 -9
  217. package/dist/hardware/device/writer.d.ts.map +0 -1
  218. package/dist/hardware/rack/payload.d.ts +0 -26
  219. package/dist/hardware/rack/payload.d.ts.map +0 -1
  220. package/dist/hardware/rack/retriever.d.ts +0 -10
  221. package/dist/hardware/rack/retriever.d.ts.map +0 -1
  222. package/dist/hardware/rack/writer.d.ts +0 -9
  223. package/dist/hardware/rack/writer.d.ts.map +0 -1
  224. package/dist/hardware/task/external.d.ts +0 -4
  225. package/dist/hardware/task/external.d.ts.map +0 -1
  226. package/dist/hardware/task/payload.d.ts +0 -42
  227. package/dist/hardware/task/payload.d.ts.map +0 -1
  228. package/dist/hardware/task/retriever.d.ts +0 -29
  229. package/dist/hardware/task/retriever.d.ts.map +0 -1
  230. package/dist/hardware/task/writer.d.ts +0 -9
  231. package/dist/hardware/task/writer.d.ts.map +0 -1
  232. package/dist/ontology/retriever.d.ts +0 -13
  233. package/dist/ontology/retriever.d.ts.map +0 -1
  234. package/dist/ontology/signals.d.ts +0 -30
  235. package/dist/ontology/signals.d.ts.map +0 -1
  236. package/dist/ranger/retriever.d.ts +0 -11
  237. package/dist/ranger/retriever.d.ts.map +0 -1
  238. package/dist/workspace/pid/client.d.ts +0 -17
  239. package/dist/workspace/pid/client.d.ts.map +0 -1
  240. package/dist/workspace/pid/external.d.ts.map +0 -1
  241. package/dist/workspace/pid/index.d.ts +0 -2
  242. package/dist/workspace/pid/index.d.ts.map +0 -1
  243. package/dist/workspace/pid/payload.d.ts.map +0 -1
  244. package/dist/workspace/pid/pid.spec.d.ts +0 -2
  245. package/dist/workspace/pid/pid.spec.d.ts.map +0 -1
  246. package/dist/workspace/pid/retriever.d.ts +0 -9
  247. package/dist/workspace/pid/retriever.d.ts.map +0 -1
  248. package/dist/workspace/pid/writer.d.ts.map +0 -1
  249. package/src/hardware/device/payload.ts +0 -27
  250. package/src/hardware/device/retriever.ts +0 -60
  251. package/src/hardware/device/writer.ts +0 -59
  252. package/src/hardware/rack/payload.ts +0 -26
  253. package/src/hardware/rack/retriever.ts +0 -68
  254. package/src/hardware/rack/writer.ts +0 -59
  255. package/src/hardware/task/external.ts +0 -12
  256. package/src/hardware/task/payload.ts +0 -40
  257. package/src/hardware/task/retriever.ts +0 -70
  258. package/src/hardware/task/writer.ts +0 -65
  259. package/src/ontology/retriever.ts +0 -91
  260. package/src/ontology/signals.ts +0 -139
  261. package/src/ranger/retriever.ts +0 -50
  262. /package/dist/workspace/{pid → schematic}/external.d.ts +0 -0
@@ -7,5 +7,5 @@
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
- export * from "@/workspace/pid/payload";
11
- export * from "@/workspace/pid/client";
10
+ export * from "@/workspace/schematic/payload";
11
+ export * from "@/workspace/schematic/client";
@@ -7,4 +7,4 @@
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
- export * as pid from "@/workspace/pid/external";
10
+ export * as schematic from "@/workspace/schematic/external";
@@ -7,25 +7,25 @@
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 { type UnknownRecord, unknownRecordZ } from "@synnaxlabs/x";
10
+ import { type UnknownRecord, unknownRecordZ } from "@synnaxlabs/x/record";
11
11
  import { z } from "zod";
12
12
 
13
13
  export const keyZ = z.string().uuid();
14
14
  export type Key = z.infer<typeof keyZ>;
15
15
  export type Params = Key | Key[];
16
16
 
17
- export const pidZ = z.object({
17
+ export const schematicZ = z.object({
18
18
  key: z.string(),
19
19
  name: z.string(),
20
20
  data: unknownRecordZ.or(z.string().transform((s) => JSON.parse(s) as UnknownRecord)),
21
21
  snapshot: z.boolean(),
22
22
  });
23
23
 
24
- export const pidRemoteZ = z.object({
24
+ export const schematicRemoteZ = z.object({
25
25
  key: z.string(),
26
26
  name: z.string(),
27
27
  snapshot: z.boolean(),
28
28
  data: z.string().transform((s) => JSON.parse(s) as UnknownRecord),
29
29
  });
30
30
 
31
- export type PID = z.infer<typeof pidZ>;
31
+ export type Schematic = z.infer<typeof schematicZ>;
@@ -8,10 +8,10 @@
8
8
  // included in the file licenses/APL.txt.
9
9
 
10
10
  import { sendRequired, type UnaryClient } from "@synnaxlabs/freighter";
11
- import { toArray } from "@synnaxlabs/x";
11
+ import { toArray } from "@synnaxlabs/x/toArray";
12
12
  import { z } from "zod";
13
13
 
14
- import { type PID, type Params, pidRemoteZ } from "./payload";
14
+ import { type Schematic, type Params, schematicRemoteZ } from "@/workspace/schematic/payload";
15
15
 
16
16
  const reqZ = z.object({
17
17
  keys: z.string().array(),
@@ -20,24 +20,24 @@ const reqZ = z.object({
20
20
  type Request = z.infer<typeof reqZ>;
21
21
 
22
22
  const resZ = z.object({
23
- pids: pidRemoteZ.array(),
23
+ schematics: schematicRemoteZ.array(),
24
24
  });
25
25
 
26
26
  export class Retriever {
27
- private readonly ENDPOINT = "/workspace/pid/retrieve";
27
+ private readonly ENDPOINT = "/workspace/schematic/retrieve";
28
28
  private readonly client: UnaryClient;
29
29
 
30
30
  constructor(client: UnaryClient) {
31
31
  this.client = client;
32
32
  }
33
33
 
34
- async retrieve(params: Params): Promise<PID[]> {
34
+ async retrieve(params: Params): Promise<Schematic[]> {
35
35
  return (await sendRequired(
36
- this.client,
37
- this.ENDPOINT,
38
- { keys: toArray(params) },
39
- reqZ,
36
+ this.client,
37
+ this.ENDPOINT,
38
+ { keys: toArray(params) },
39
+ reqZ,
40
40
  resZ,
41
- )).pids;
41
+ )).schematics;
42
42
  }
43
43
  }
@@ -16,94 +16,94 @@ const client = newClient();
16
16
 
17
17
  const ZERO_UUID = "00000000-0000-0000-0000-000000000000";
18
18
 
19
- describe("PID", () => {
19
+ describe("Schematic", () => {
20
20
  describe("create", () => {
21
21
  test("create one", async () => {
22
22
  const ws = await client.workspaces.create({
23
- name: "PID",
23
+ name: "Schematic",
24
24
  layout: { one: 1 },
25
25
  });
26
- const pid = await client.workspaces.pid.create(ws.key, {
27
- name: "PID",
26
+ const schematic = await client.workspaces.schematic.create(ws.key, {
27
+ name: "Schematic",
28
28
  data: { one: 1 },
29
29
  });
30
- expect(pid.name).toEqual("PID");
31
- expect(pid.key).not.toEqual(ZERO_UUID);
32
- expect(pid.data.one).toEqual(1);
30
+ expect(schematic.name).toEqual("Schematic");
31
+ expect(schematic.key).not.toEqual(ZERO_UUID);
32
+ expect(schematic.data.one).toEqual(1);
33
33
  });
34
34
  });
35
35
  describe("rename", () => {
36
36
  test("rename one", async () => {
37
37
  const ws = await client.workspaces.create({
38
- name: "PID",
38
+ name: "Schematic",
39
39
  layout: { one: 1 },
40
40
  });
41
- const pid = await client.workspaces.pid.create(ws.key, {
42
- name: "PID",
41
+ const schematic = await client.workspaces.schematic.create(ws.key, {
42
+ name: "Schematic",
43
43
  data: { one: 1 },
44
44
  });
45
- await client.workspaces.pid.rename(pid.key, "PID2");
46
- const res = await client.workspaces.pid.retrieve(pid.key);
47
- expect(res.name).toEqual("PID2");
45
+ await client.workspaces.schematic.rename(schematic.key, "Schematic2");
46
+ const res = await client.workspaces.schematic.retrieve(schematic.key);
47
+ expect(res.name).toEqual("Schematic2");
48
48
  });
49
49
  });
50
50
  describe("setData", () => {
51
51
  test("set data", async () => {
52
52
  const ws = await client.workspaces.create({
53
- name: "PID",
53
+ name: "Schematic",
54
54
  layout: { one: 1 },
55
55
  });
56
- const pid = await client.workspaces.pid.create(ws.key, {
57
- name: "PID",
56
+ const schematic = await client.workspaces.schematic.create(ws.key, {
57
+ name: "Schematic",
58
58
  data: { one: 1 },
59
59
  });
60
- await client.workspaces.pid.setData(pid.key, { two: 2 });
61
- const res = await client.workspaces.pid.retrieve(pid.key);
60
+ await client.workspaces.schematic.setData(schematic.key, { two: 2 });
61
+ const res = await client.workspaces.schematic.retrieve(schematic.key);
62
62
  expect(res.data.two).toEqual(2);
63
63
  });
64
64
  });
65
65
  describe("delete", () => {
66
66
  test("delete one", async () => {
67
67
  const ws = await client.workspaces.create({
68
- name: "PID",
68
+ name: "Schematic",
69
69
  layout: { one: 1 },
70
70
  });
71
- const pid = await client.workspaces.pid.create(ws.key, {
72
- name: "PID",
71
+ const schematic = await client.workspaces.schematic.create(ws.key, {
72
+ name: "Schematic",
73
73
  data: { one: 1 },
74
74
  });
75
- await client.workspaces.pid.delete(pid.key);
76
- await expect(client.workspaces.pid.retrieve(pid.key)).rejects.toThrow();
75
+ await client.workspaces.schematic.delete(schematic.key);
76
+ await expect(client.workspaces.schematic.retrieve(schematic.key)).rejects.toThrow();
77
77
  });
78
78
  });
79
79
  describe("copy", () => {
80
80
  test("copy one", async () => {
81
81
  const ws = await client.workspaces.create({
82
- name: "PID",
82
+ name: "Schematic",
83
83
  layout: { one: 1 },
84
84
  });
85
- const pid = await client.workspaces.pid.create(ws.key, {
86
- name: "PID",
85
+ const schematic = await client.workspaces.schematic.create(ws.key, {
86
+ name: "Schematic",
87
87
  data: { one: 1 },
88
88
  });
89
- const pid2 = await client.workspaces.pid.copy(pid.key, "PID2", false);
90
- expect(pid2.name).toEqual("PID2");
91
- expect(pid2.key).not.toEqual(ZERO_UUID);
92
- expect(pid2.data.one).toEqual(1);
89
+ const schematic2 = await client.workspaces.schematic.copy(schematic.key, "Schematic2", false);
90
+ expect(schematic2.name).toEqual("Schematic2");
91
+ expect(schematic2.key).not.toEqual(ZERO_UUID);
92
+ expect(schematic2.data.one).toEqual(1);
93
93
  });
94
94
  describe("snapshot", () => {
95
95
  it("should not allow the caller to edit the snapshot", async () => {
96
96
  const ws = await client.workspaces.create({
97
- name: "PID",
97
+ name: "Schematic",
98
98
  layout: { one: 1 },
99
99
  });
100
- const pid = await client.workspaces.pid.create(ws.key, {
101
- name: "PID",
100
+ const schematic = await client.workspaces.schematic.create(ws.key, {
101
+ name: "Schematic",
102
102
  data: { one: 1 },
103
103
  });
104
- const pid2 = await client.workspaces.pid.copy(pid.key, "PID2", true);
104
+ const schematic2 = await client.workspaces.schematic.copy(schematic.key, "Schematic2", true);
105
105
  await expect(
106
- client.workspaces.pid.setData(pid2.key, { two: 2 }),
106
+ client.workspaces.schematic.setData(schematic2.key, { two: 2 }),
107
107
  ).rejects.toThrow(ValidationError);
108
108
  });
109
109
  });
@@ -8,33 +8,34 @@
8
8
  // included in the file licenses/APL.txt.
9
9
 
10
10
  import { sendRequired, type UnaryClient } from "@synnaxlabs/freighter";
11
- import { toArray, type UnknownRecord } from "@synnaxlabs/x";
11
+ import { type UnknownRecord } from "@synnaxlabs/x/record";
12
+ import { toArray } from "@synnaxlabs/x/toArray";
12
13
  import { z } from "zod";
13
14
 
14
15
  import { keyZ as workspaceKeyZ } from "@/workspace/payload";
15
16
  import {
16
- pidZ,
17
- type PID,
17
+ schematicZ,
18
+ type Schematic,
18
19
  type Params,
19
20
  keyZ,
20
21
  type Key,
21
- pidRemoteZ,
22
- } from "@/workspace/pid/payload";
22
+ schematicRemoteZ,
23
+ } from "@/workspace/schematic/payload";
23
24
 
24
- export const newPIDZ = pidZ.partial({ key: true, snapshot: true }).transform((p) => ({
25
+ export const newSchematicZ = schematicZ.partial({ key: true, snapshot: true }).transform((p) => ({
25
26
  ...p,
26
27
  data: JSON.stringify(p.data),
27
28
  }));
28
29
 
29
- export type NewPID = z.input<typeof newPIDZ>;
30
+ export type NewSchematic = z.input<typeof newSchematicZ>;
30
31
 
31
32
  const createReqZ = z.object({
32
33
  workspace: workspaceKeyZ,
33
- pids: newPIDZ.array(),
34
+ schematics: newSchematicZ.array(),
34
35
  });
35
36
 
36
37
  const createResZ = z.object({
37
- pids: pidRemoteZ.array(),
38
+ schematics: schematicRemoteZ.array(),
38
39
  });
39
40
 
40
41
  const deleteReqZ = z.object({
@@ -64,14 +65,14 @@ const copyReqZ = z.object({
64
65
  });
65
66
 
66
67
  const copyResZ = z.object({
67
- pid: pidRemoteZ,
68
+ schematic: schematicRemoteZ,
68
69
  });
69
70
 
70
- const CREATE_ENDPOINT = "/workspace/pid/create";
71
- const DELETE_ENDPOINT = "/workspace/pid/delete";
72
- const RENAME_ENDPOINT = "/workspace/pid/rename";
73
- const SET_DATA_ENDPOINT = "/workspace/pid/set-data";
74
- const COPY_ENDPOINT = "/workspace/pid/copy";
71
+ const CREATE_ENDPOINT = "/workspace/schematic/create";
72
+ const DELETE_ENDPOINT = "/workspace/schematic/delete";
73
+ const RENAME_ENDPOINT = "/workspace/schematic/rename";
74
+ const SET_DATA_ENDPOINT = "/workspace/schematic/set-data";
75
+ const COPY_ENDPOINT = "/workspace/schematic/copy";
75
76
 
76
77
  export class Writer {
77
78
  private readonly client: UnaryClient;
@@ -80,20 +81,20 @@ export class Writer {
80
81
  this.client = client;
81
82
  }
82
83
 
83
- async create(workspace: string, pid: NewPID): Promise<PID> {
84
- const pid_ = { ...pid, data: JSON.stringify(pid.data) };
84
+ async create(workspace: string, schematic: NewSchematic): Promise<Schematic> {
85
+ const schematic_ = { ...schematic, data: JSON.stringify(schematic.data) };
85
86
  const res = await sendRequired<typeof createReqZ, typeof createResZ>(
86
87
  this.client,
87
88
  CREATE_ENDPOINT,
88
- { workspace, pids: [pid_] },
89
+ { workspace, schematics: [schematic_] },
89
90
  createReqZ,
90
91
  createResZ,
91
92
  );
92
93
 
93
- return res.pids[0];
94
+ return res.schematics[0];
94
95
  }
95
96
 
96
- async copy(key: Key, name: string, snapshot: boolean): Promise<PID> {
97
+ async copy(key: Key, name: string, snapshot: boolean): Promise<Schematic> {
97
98
  const res = await sendRequired<typeof copyReqZ, typeof copyResZ>(
98
99
  this.client,
99
100
  COPY_ENDPOINT,
@@ -101,7 +102,7 @@ export class Writer {
101
102
  copyReqZ,
102
103
  copyResZ,
103
104
  );
104
- return res.pid;
105
+ return res.schematic;
105
106
  }
106
107
 
107
108
  async delete(params: Params): Promise<void> {
@@ -115,21 +116,21 @@ export class Writer {
115
116
  );
116
117
  }
117
118
 
118
- async rename(pid: Key, name: string): Promise<void> {
119
+ async rename(schematic: Key, name: string): Promise<void> {
119
120
  await sendRequired<typeof renameReqZ, typeof renameResZ>(
120
121
  this.client,
121
122
  RENAME_ENDPOINT,
122
- { key: pid, name },
123
+ { key: schematic, name },
123
124
  renameReqZ,
124
125
  renameResZ,
125
126
  );
126
127
  }
127
128
 
128
- async setData(pid: Key, data: UnknownRecord): Promise<void> {
129
+ async setData(schematic: Key, data: UnknownRecord): Promise<void> {
129
130
  await sendRequired<typeof setDataReqZ, typeof setDataResZ>(
130
131
  this.client,
131
132
  SET_DATA_ENDPOINT,
132
- { key: pid, data: JSON.stringify(data) },
133
+ { key: schematic, data: JSON.stringify(data) },
133
134
  setDataReqZ,
134
135
  renameResZ,
135
136
  );
@@ -19,10 +19,10 @@ describe("Workspace", () => {
19
19
  describe("create", () => {
20
20
  test("create one", async () => {
21
21
  const ws = await client.workspaces.create({
22
- name: "PID",
22
+ name: "Schematic",
23
23
  layout: { one: 1 },
24
24
  });
25
- expect(ws.name).toEqual("PID");
25
+ expect(ws.name).toEqual("Schematic");
26
26
  expect(ws.key).not.toEqual(ZERO_UUID);
27
27
  expect(ws.layout.one).toEqual(1);
28
28
  });
@@ -30,18 +30,18 @@ describe("Workspace", () => {
30
30
  describe("rename", () => {
31
31
  test("rename one", async () => {
32
32
  const ws = await client.workspaces.create({
33
- name: "PID",
33
+ name: "Schematic",
34
34
  layout: { one: 1 },
35
35
  });
36
- await client.workspaces.rename(ws.key, "PID2");
36
+ await client.workspaces.rename(ws.key, "Schematic2");
37
37
  const res = await client.workspaces.retrieve(ws.key);
38
- expect(res.name).toEqual("PID2");
38
+ expect(res.name).toEqual("Schematic2");
39
39
  });
40
40
  });
41
41
  describe("setLayout", () => {
42
42
  test("set layout", async () => {
43
43
  const ws = await client.workspaces.create({
44
- name: "PID",
44
+ name: "Schematic",
45
45
  layout: { one: 1 },
46
46
  });
47
47
  await client.workspaces.setLayout(ws.key, { two: 2 });
@@ -52,7 +52,7 @@ describe("Workspace", () => {
52
52
  describe("delete", () => {
53
53
  test("delete one", async () => {
54
54
  const ws = await client.workspaces.create({
55
- name: "PID",
55
+ name: "Schematic",
56
56
  layout: { one: 1 },
57
57
  });
58
58
  await client.workspaces.delete(ws.key);
@@ -8,10 +8,16 @@
8
8
  // included in the file licenses/APL.txt.
9
9
 
10
10
  import { sendRequired, type UnaryClient } from "@synnaxlabs/freighter";
11
- import { toArray, type UnknownRecord } from "@synnaxlabs/x";
11
+ import { type UnknownRecord } from "@synnaxlabs/x/record";
12
+ import { toArray } from "@synnaxlabs/x/toArray";
12
13
  import { z } from "zod";
13
14
 
14
- import { type Workspace, workspaceZ, keyZ, workspaceRemoteZ } from "./payload";
15
+ import {
16
+ type Workspace,
17
+ workspaceZ,
18
+ keyZ,
19
+ workspaceRemoteZ,
20
+ } from "@/workspace/payload";
15
21
 
16
22
  const newWorkspaceZ = workspaceZ.partial({ key: true }).transform((w) => ({
17
23
  ...w,
@@ -1,30 +0,0 @@
1
- import { z } from "zod";
2
- export declare const deviceKeyZ: z.ZodString;
3
- export declare const deviceZ: z.ZodObject<{
4
- key: z.ZodString;
5
- rack: z.ZodNumber;
6
- name: z.ZodString;
7
- make: z.ZodString;
8
- model: z.ZodString;
9
- location: z.ZodString;
10
- properties: z.ZodString;
11
- }, "strip", z.ZodTypeAny, {
12
- name: string;
13
- key: string;
14
- rack: number;
15
- make: string;
16
- model: string;
17
- location: string;
18
- properties: string;
19
- }, {
20
- name: string;
21
- key: string;
22
- rack: number;
23
- make: string;
24
- model: string;
25
- location: string;
26
- properties: string;
27
- }>;
28
- export type Device = z.infer<typeof deviceZ>;
29
- export type DeviceKey = z.infer<typeof deviceKeyZ>;
30
- //# sourceMappingURL=payload.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"payload.d.ts","sourceRoot":"","sources":["../../../src/hardware/device/payload.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,eAAO,MAAM,UAAU,aAAa,CAAC;AAErC,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;EAQlB,CAAC;AAEH,MAAM,MAAM,MAAM,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,OAAO,CAAC,CAAC;AAC7C,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,UAAU,CAAC,CAAC"}
@@ -1,10 +0,0 @@
1
- import { type UnaryClient } from "@synnaxlabs/freighter";
2
- import { type Device } from './payload';
3
- export declare class Retriever {
4
- private readonly client;
5
- constructor(client: UnaryClient);
6
- search(term: string): Promise<Device[]>;
7
- page(offset: number, limit: number): Promise<Device[]>;
8
- retrieve(keys: string[]): Promise<Device[]>;
9
- }
10
- //# sourceMappingURL=retriever.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"retriever.d.ts","sourceRoot":"","sources":["../../../src/hardware/device/retriever.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,KAAK,WAAW,EAAgB,MAAM,uBAAuB,CAAC;AAGvE,OAAO,EAAE,KAAK,MAAM,EAAuB,MAAM,2BAA2B,CAAC;AAgB7E,qBAAa,SAAS;IACpB,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAc;gBAEzB,MAAM,EAAE,WAAW;IAIzB,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;IAQvC,IAAI,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;IAStD,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;CAOlD"}
@@ -1,9 +0,0 @@
1
- import { type UnaryClient } from "@synnaxlabs/freighter";
2
- import { type Device } from './payload';
3
- export declare class Writer {
4
- private readonly client;
5
- constructor(client: UnaryClient);
6
- create(devices: Device[]): Promise<Device[]>;
7
- delete(keys: string[]): Promise<void>;
8
- }
9
- //# sourceMappingURL=writer.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"writer.d.ts","sourceRoot":"","sources":["../../../src/hardware/device/writer.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,KAAK,WAAW,EAAgB,MAAM,uBAAuB,CAAC;AAGvE,OAAO,EAAE,KAAK,MAAM,EAAuB,MAAM,2BAA2B,CAAC;AAmB7E,qBAAa,MAAM;IACjB,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAc;gBAEzB,MAAM,EAAE,WAAW;IAIzB,MAAM,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;IAW5C,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;CAS5C"}
@@ -1,26 +0,0 @@
1
- import { z } from "zod";
2
- export declare const rackKeyZ: z.ZodNumber;
3
- export type RackKey = z.infer<typeof rackKeyZ>;
4
- export declare const rackZ: z.ZodObject<{
5
- key: z.ZodNumber;
6
- name: z.ZodString;
7
- }, "strip", z.ZodTypeAny, {
8
- name: string;
9
- key: number;
10
- }, {
11
- name: string;
12
- key: number;
13
- }>;
14
- export type RackPayload = z.infer<typeof rackZ>;
15
- export declare const newRackZ: z.ZodObject<{
16
- name: z.ZodString;
17
- key: z.ZodOptional<z.ZodNumber>;
18
- }, "strip", z.ZodTypeAny, {
19
- name: string;
20
- key?: number | undefined;
21
- }, {
22
- name: string;
23
- key?: number | undefined;
24
- }>;
25
- export type NewRack = z.input<typeof newRackZ>;
26
- //# sourceMappingURL=payload.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"payload.d.ts","sourceRoot":"","sources":["../../../src/hardware/rack/payload.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,QAAQ,aAAa,CAAC;AAEnC,MAAM,MAAM,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,QAAQ,CAAC,CAAC;AAE/C,eAAO,MAAM,KAAK;;;;;;;;;EAGhB,CAAC;AAEH,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,KAAK,CAAC,CAAC;AAEhD,eAAO,MAAM,QAAQ;;;;;;;;;EAA+B,CAAC;AAErD,MAAM,MAAM,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,QAAQ,CAAC,CAAC"}
@@ -1,10 +0,0 @@
1
- import { type UnaryClient } from "@synnaxlabs/freighter";
2
- import { type RackPayload } from './payload';
3
- export declare class Retriever {
4
- private readonly client;
5
- constructor(client: UnaryClient);
6
- page(offset: number, limit: number): Promise<RackPayload[]>;
7
- search(term: string): Promise<RackPayload[]>;
8
- retrieve(keys: number[]): Promise<RackPayload[]>;
9
- }
10
- //# sourceMappingURL=retriever.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"retriever.d.ts","sourceRoot":"","sources":["../../../src/hardware/rack/retriever.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,KAAK,WAAW,EAAgB,MAAM,uBAAuB,CAAC;AAGvE,OAAO,EAAmB,KAAK,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAgB5E,qBAAa,SAAS;IACpB,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAc;gBAEzB,MAAM,EAAE,WAAW;IAIzB,IAAI,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,EAAE,CAAC;IAW3D,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,EAAE,CAAC;IAW5C,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,WAAW,EAAE,CAAC;CAUvD"}
@@ -1,9 +0,0 @@
1
- import { NewRack, RackPayload } from './payload';
2
- import { UnaryClient } from "@synnaxlabs/freighter";
3
- export declare class Writer {
4
- private readonly client;
5
- constructor(client: UnaryClient);
6
- create(racks: NewRack[]): Promise<RackPayload[]>;
7
- delete(keys: number[]): Promise<void>;
8
- }
9
- //# sourceMappingURL=writer.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"writer.d.ts","sourceRoot":"","sources":["../../../src/hardware/rack/writer.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,OAAO,EAAE,WAAW,EAA6B,MAAM,yBAAyB,CAAC;AAC1F,OAAO,EAAE,WAAW,EAAgB,MAAM,uBAAuB,CAAC;AAmBlE,qBAAa,MAAM;IACf,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAc;gBAEzB,MAAM,EAAE,WAAW;IAIzB,MAAM,CAAC,KAAK,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC,WAAW,EAAE,CAAC;IAWhD,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;CAU9C"}
@@ -1,4 +0,0 @@
1
- export * from './client';
2
- export * from './retriever';
3
- export * from './writer';
4
- //# sourceMappingURL=external.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"external.d.ts","sourceRoot":"","sources":["../../../src/hardware/task/external.ts"],"names":[],"mappings":"AASA,cAAc,wBAAwB,CAAC;AACvC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,wBAAwB,CAAC"}
@@ -1,42 +0,0 @@
1
- import { type UnknownRecord } from "@synnaxlabs/x";
2
- import { z } from "zod";
3
- export declare const taskKeyZ: z.ZodUnion<[z.ZodString, z.ZodEffects<z.ZodBigInt, string, bigint>, z.ZodEffects<z.ZodNumber, string, number>]>;
4
- export type TaskKey = z.infer<typeof taskKeyZ>;
5
- export declare const taskZ: z.ZodObject<{
6
- key: z.ZodUnion<[z.ZodString, z.ZodEffects<z.ZodBigInt, string, bigint>, z.ZodEffects<z.ZodNumber, string, number>]>;
7
- name: z.ZodString;
8
- type: z.ZodString;
9
- config: z.ZodType<UnknownRecord, z.ZodTypeDef, UnknownRecord>;
10
- }, "strip", z.ZodTypeAny, {
11
- name: string;
12
- key: string;
13
- type: string;
14
- config: UnknownRecord;
15
- }, {
16
- name: string;
17
- key: string | number | bigint;
18
- type: string;
19
- config: UnknownRecord;
20
- }>;
21
- export declare const newTaskZ: z.ZodObject<{
22
- name: z.ZodString;
23
- type: z.ZodString;
24
- key: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodEffects<z.ZodBigInt, string, bigint>, z.ZodEffects<z.ZodNumber, string, number>]>, string, string | number | bigint>>;
25
- config: z.ZodEffects<z.ZodUnknown, string, unknown>;
26
- }, "strip", z.ZodTypeAny, {
27
- name: string;
28
- type: string;
29
- config: string;
30
- key?: string | undefined;
31
- }, {
32
- name: string;
33
- type: string;
34
- key?: string | number | bigint | undefined;
35
- config?: unknown;
36
- }>;
37
- export type NewTask = z.input<typeof newTaskZ>;
38
- export type Task<T extends string = string, C extends UnknownRecord = UnknownRecord> = Omit<z.infer<typeof taskZ>, "config" | "type"> & {
39
- type: T;
40
- config: C;
41
- };
42
- //# sourceMappingURL=payload.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"payload.d.ts","sourceRoot":"","sources":["../../../src/hardware/task/payload.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,eAAe,CAAC;AACnD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,QAAQ,iHAInB,CAAA;AAEF,MAAM,MAAM,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,QAAQ,CAAC,CAAC;AAE/C,eAAO,MAAM,KAAK;;;;;;;;;;;;;;;EAOhB,CAAC;AAEH,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;EAGnB,CAAC;AAEH,MAAM,MAAM,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,QAAQ,CAAC,CAAC;AAE/C,MAAM,MAAM,IAAI,CACd,CAAC,SAAS,MAAM,GAAG,MAAM,EACzB,CAAC,SAAS,aAAa,GAAG,aAAa,IACrC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,KAAK,CAAC,EAAE,QAAQ,GAAG,MAAM,CAAC,GAAG;IAAE,IAAI,EAAE,CAAC,CAAC;IAAC,MAAM,EAAE,CAAC,CAAA;CAAE,CAAC"}
@@ -1,29 +0,0 @@
1
- import { type UnaryClient } from "@synnaxlabs/freighter";
2
- import { z } from "zod";
3
- import { type Task } from './payload';
4
- declare const retrieveReqZ: z.ZodObject<{
5
- rack: z.ZodOptional<z.ZodNumber>;
6
- keys: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
7
- offset: z.ZodOptional<z.ZodNumber>;
8
- limit: z.ZodOptional<z.ZodNumber>;
9
- }, "strip", z.ZodTypeAny, {
10
- rack?: number | undefined;
11
- keys?: string[] | undefined;
12
- offset?: number | undefined;
13
- limit?: number | undefined;
14
- }, {
15
- rack?: number | undefined;
16
- keys?: string[] | undefined;
17
- offset?: number | undefined;
18
- limit?: number | undefined;
19
- }>;
20
- export type RetrieveRequest = z.infer<typeof retrieveReqZ>;
21
- export declare class Retriever {
22
- private readonly client;
23
- constructor(client: UnaryClient);
24
- retrieve(params: RetrieveRequest): Promise<Task[]>;
25
- search(term: string): Promise<Task[]>;
26
- page(offset: number, limit: number): Promise<Task[]>;
27
- }
28
- export {};
29
- //# sourceMappingURL=retriever.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"retriever.d.ts","sourceRoot":"","sources":["../../../src/hardware/task/retriever.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,KAAK,WAAW,EAAgB,MAAM,uBAAuB,CAAC;AACvE,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,EAAE,KAAK,IAAI,EAAS,MAAM,yBAAyB,CAAC;AAE3D,QAAA,MAAM,YAAY;;;;;;;;;;;;;;;EAKhB,CAAC;AAMH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAC;AAI3D,qBAAa,SAAS;IACpB,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAc;gBAEzB,MAAM,EAAE,WAAW;IAIzB,QAAQ,CAAC,MAAM,EAAE,eAAe,GAAG,OAAO,CAAC,IAAI,EAAE,CAAC;IAWlD,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,EAAE,CAAC;IAWrC,IAAI,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,EAAE,CAAC;CAU3D"}
@@ -1,9 +0,0 @@
1
- import { type UnaryClient } from "@synnaxlabs/freighter";
2
- import { type NewTask, type Task } from './payload';
3
- export declare class Writer {
4
- private readonly client;
5
- constructor(client: UnaryClient);
6
- create(tasks: NewTask[]): Promise<Task[]>;
7
- delete(keys: bigint[]): Promise<void>;
8
- }
9
- //# sourceMappingURL=writer.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"writer.d.ts","sourceRoot":"","sources":["../../../src/hardware/task/writer.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,KAAK,WAAW,EAAgB,MAAM,uBAAuB,CAAC;AAGvE,OAAO,EACL,KAAK,OAAO,EACZ,KAAK,IAAI,EAIV,MAAM,yBAAyB,CAAC;AAmBjC,qBAAa,MAAM;IACjB,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAc;gBAEzB,MAAM,EAAE,WAAW;IAIzB,MAAM,CAAC,KAAK,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC,IAAI,EAAE,CAAC;IAWzC,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;CAS5C"}