@synnaxlabs/client 0.35.0 → 0.37.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 (122) hide show
  1. package/.turbo/turbo-build.log +7 -7
  2. package/dist/client.cjs +28 -28
  3. package/dist/client.d.ts +35 -0
  4. package/dist/client.d.ts.map +1 -1
  5. package/dist/client.js +3125 -2990
  6. package/dist/control/state.d.ts.map +1 -1
  7. package/dist/framer/deleter.d.ts.map +1 -1
  8. package/dist/framer/frame.d.ts +14 -7
  9. package/dist/framer/frame.d.ts.map +1 -1
  10. package/dist/framer/writer.d.ts +8 -8
  11. package/dist/framer/writer.d.ts.map +1 -1
  12. package/dist/hardware/device/payload.d.ts +2 -2
  13. package/dist/hardware/device/payload.d.ts.map +1 -1
  14. package/dist/hardware/task/payload.d.ts +4 -4
  15. package/dist/hardware/task/payload.d.ts.map +1 -1
  16. package/dist/index.d.ts +1 -0
  17. package/dist/index.d.ts.map +1 -1
  18. package/dist/ontology/group/payload.d.ts +3 -0
  19. package/dist/ontology/group/payload.d.ts.map +1 -1
  20. package/dist/ranger/client.d.ts +1 -0
  21. package/dist/ranger/client.d.ts.map +1 -1
  22. package/dist/ranger/payload.d.ts.map +1 -1
  23. package/dist/ranger/writer.d.ts.map +1 -1
  24. package/dist/transport.d.ts +2 -1
  25. package/dist/transport.d.ts.map +1 -1
  26. package/dist/workspace/client.d.ts +68 -11
  27. package/dist/workspace/client.d.ts.map +1 -1
  28. package/dist/workspace/index.d.ts +1 -1
  29. package/dist/workspace/index.d.ts.map +1 -1
  30. package/dist/workspace/lineplot/client.d.ts +48 -6
  31. package/dist/workspace/lineplot/client.d.ts.map +1 -1
  32. package/dist/workspace/lineplot/index.d.ts +1 -1
  33. package/dist/workspace/lineplot/index.d.ts.map +1 -1
  34. package/dist/workspace/log/client.d.ts +48 -6
  35. package/dist/workspace/log/client.d.ts.map +1 -1
  36. package/dist/workspace/log/index.d.ts +1 -1
  37. package/dist/workspace/log/index.d.ts.map +1 -1
  38. package/dist/workspace/schematic/client.d.ts +72 -6
  39. package/dist/workspace/schematic/client.d.ts.map +1 -1
  40. package/dist/workspace/schematic/index.d.ts +1 -1
  41. package/dist/workspace/schematic/index.d.ts.map +1 -1
  42. package/dist/workspace/table/client.d.ts +61 -6
  43. package/dist/workspace/table/client.d.ts.map +1 -1
  44. package/dist/workspace/table/index.d.ts +1 -1
  45. package/dist/workspace/table/index.d.ts.map +1 -1
  46. package/package.json +13 -13
  47. package/src/client.ts +16 -2
  48. package/src/control/state.ts +1 -1
  49. package/src/framer/frame.spec.ts +31 -3
  50. package/src/framer/frame.ts +17 -0
  51. package/src/framer/streamer.spec.ts +15 -6
  52. package/src/index.ts +1 -0
  53. package/src/ontology/group/payload.ts +9 -7
  54. package/src/ranger/client.ts +4 -1
  55. package/src/transport.ts +7 -2
  56. package/src/workspace/client.ts +147 -45
  57. package/src/workspace/index.ts +1 -1
  58. package/src/workspace/lineplot/client.ts +97 -28
  59. package/src/workspace/lineplot/index.ts +1 -1
  60. package/src/workspace/log/client.ts +94 -28
  61. package/src/workspace/log/index.ts +1 -1
  62. package/src/workspace/schematic/client.ts +122 -29
  63. package/src/workspace/schematic/index.ts +1 -1
  64. package/src/workspace/table/client.ts +103 -28
  65. package/src/workspace/table/index.ts +1 -1
  66. package/dist/workspace/external.d.ts +0 -3
  67. package/dist/workspace/external.d.ts.map +0 -1
  68. package/dist/workspace/lineplot/external.d.ts +0 -3
  69. package/dist/workspace/lineplot/external.d.ts.map +0 -1
  70. package/dist/workspace/lineplot/retriever.d.ts +0 -9
  71. package/dist/workspace/lineplot/retriever.d.ts.map +0 -1
  72. package/dist/workspace/lineplot/writer.d.ts +0 -35
  73. package/dist/workspace/lineplot/writer.d.ts.map +0 -1
  74. package/dist/workspace/log/external.d.ts +0 -3
  75. package/dist/workspace/log/external.d.ts.map +0 -1
  76. package/dist/workspace/log/payload.d.ts +0 -36
  77. package/dist/workspace/log/payload.d.ts.map +0 -1
  78. package/dist/workspace/log/retriever.d.ts +0 -9
  79. package/dist/workspace/log/retriever.d.ts.map +0 -1
  80. package/dist/workspace/log/writer.d.ts +0 -35
  81. package/dist/workspace/log/writer.d.ts.map +0 -1
  82. package/dist/workspace/payload.d.ts +0 -38
  83. package/dist/workspace/payload.d.ts.map +0 -1
  84. package/dist/workspace/retriever.d.ts +0 -13
  85. package/dist/workspace/retriever.d.ts.map +0 -1
  86. package/dist/workspace/schematic/external.d.ts +0 -3
  87. package/dist/workspace/schematic/external.d.ts.map +0 -1
  88. package/dist/workspace/schematic/payload.d.ts +0 -42
  89. package/dist/workspace/schematic/payload.d.ts.map +0 -1
  90. package/dist/workspace/schematic/retriever.d.ts +0 -9
  91. package/dist/workspace/schematic/retriever.d.ts.map +0 -1
  92. package/dist/workspace/schematic/writer.d.ts +0 -41
  93. package/dist/workspace/schematic/writer.d.ts.map +0 -1
  94. package/dist/workspace/table/external.d.ts +0 -3
  95. package/dist/workspace/table/external.d.ts.map +0 -1
  96. package/dist/workspace/table/payload.d.ts +0 -36
  97. package/dist/workspace/table/payload.d.ts.map +0 -1
  98. package/dist/workspace/table/retriever.d.ts +0 -8
  99. package/dist/workspace/table/retriever.d.ts.map +0 -1
  100. package/dist/workspace/table/writer.d.ts +0 -35
  101. package/dist/workspace/table/writer.d.ts.map +0 -1
  102. package/dist/workspace/writer.d.ts +0 -66
  103. package/dist/workspace/writer.d.ts.map +0 -1
  104. package/src/workspace/external.ts +0 -11
  105. package/src/workspace/lineplot/external.ts +0 -11
  106. package/src/workspace/lineplot/retriever.ts +0 -34
  107. package/src/workspace/lineplot/writer.ts +0 -115
  108. package/src/workspace/log/external.ts +0 -11
  109. package/src/workspace/log/payload.ts +0 -36
  110. package/src/workspace/log/retriever.ts +0 -38
  111. package/src/workspace/log/writer.ts +0 -116
  112. package/src/workspace/payload.ts +0 -44
  113. package/src/workspace/retriever.ts +0 -70
  114. package/src/workspace/schematic/external.ts +0 -11
  115. package/src/workspace/schematic/payload.ts +0 -38
  116. package/src/workspace/schematic/retriever.ts +0 -42
  117. package/src/workspace/schematic/writer.ts +0 -140
  118. package/src/workspace/table/external.ts +0 -11
  119. package/src/workspace/table/payload.ts +0 -36
  120. package/src/workspace/table/retriever.ts +0 -33
  121. package/src/workspace/table/writer.ts +0 -102
  122. package/src/workspace/writer.ts +0 -111
@@ -1,55 +1,148 @@
1
- // Copyright 2024 Synnax Labs, Inc.
2
- //
3
- // Use of this software is governed by the Business Source License included in the file
4
- // licenses/BSL.txt.
5
- //
6
- // As of the Change Date specified in that file, in accordance with the Business Source
7
- // License, use of this software will be governed by the Apache License, Version 2.0,
8
- // included in the file licenses/APL.txt.
9
-
10
- import { type UnaryClient } from "@synnaxlabs/freighter";
11
- import { type UnknownRecord } from "@synnaxlabs/x/record";
12
-
13
- import { type Key, type Params, type Schematic } from "@/workspace/schematic/payload";
14
- import { Retriever } from "@/workspace/schematic/retriever";
15
- import { type NewSchematic, Writer } from "@/workspace/schematic/writer";
1
+ import { sendRequired, type UnaryClient } from "@synnaxlabs/freighter";
2
+ import { toArray, type UnknownRecord } from "@synnaxlabs/x";
3
+ import { unknownRecordZ } from "@synnaxlabs/x/record";
4
+ import { z } from "zod";
5
+
6
+ import { ontology } from "@/ontology";
7
+ import { nullableArrayZ } from "@/util/zod";
8
+
9
+ export const keyZ = z.string().uuid();
10
+ export type Key = z.infer<typeof keyZ>;
11
+ export type Params = Key | Key[];
12
+
13
+ export const schematicZ = z.object({
14
+ key: z.string(),
15
+ name: z.string(),
16
+ data: unknownRecordZ.or(z.string().transform((s) => JSON.parse(s) as UnknownRecord)),
17
+ snapshot: z.boolean(),
18
+ });
19
+
20
+ export const schematicRemoteZ = z.object({
21
+ key: z.string(),
22
+ name: z.string(),
23
+ snapshot: z.boolean(),
24
+ data: z.string().transform((s) => JSON.parse(s) as UnknownRecord),
25
+ });
26
+
27
+ export type Schematic = z.infer<typeof schematicZ>;
28
+
29
+ export const ONTOLOGY_TYPE: ontology.ResourceType = "schematic";
30
+
31
+ export const ontologyID = (key: Key): ontology.ID =>
32
+ new ontology.ID({ type: ONTOLOGY_TYPE, key });
33
+
34
+ const RETRIEVE_ENDPOINT = "/workspace/schematic/retrieve";
35
+ const CREATE_ENDPOINT = "/workspace/schematic/create";
36
+ const RENAME_ENDPOINT = "/workspace/schematic/rename";
37
+ const SET_DATA_ENDPOINT = "/workspace/schematic/set-data";
38
+ const DELETE_ENDPOINT = "/workspace/schematic/delete";
39
+ const COPY_ENDPOINT = "/workspace/schematic/copy";
40
+
41
+ export const newSchematicZ = schematicZ
42
+ .partial({ key: true, snapshot: true })
43
+ .transform((p) => ({
44
+ ...p,
45
+ data: JSON.stringify(p.data),
46
+ }));
47
+
48
+ export type NewSchematic = z.input<typeof newSchematicZ>;
49
+
50
+ const retrieveReqZ = z.object({ keys: z.string().array() });
51
+ const createReqZ = z.object({
52
+ workspace: z.string(),
53
+ schematics: newSchematicZ.array(),
54
+ });
55
+ const renameReqZ = z.object({ key: z.string(), name: z.string() });
56
+ const setDataReqZ = z.object({ key: z.string(), data: z.string() });
57
+ const deleteReqZ = z.object({ keys: z.string().array() });
58
+ const copyReqZ = z.object({ key: z.string(), name: z.string(), snapshot: z.boolean() });
59
+
60
+ const retrieveResZ = z.object({ schematics: nullableArrayZ(schematicRemoteZ) });
61
+ const createResZ = z.object({ schematics: schematicRemoteZ.array() });
62
+ const copyResZ = z.object({ schematic: schematicZ });
63
+ const emptyResZ = z.object({});
16
64
 
17
65
  export class Client {
18
- private readonly writer: Writer;
19
- private readonly retriever: Retriever;
66
+ private readonly client: UnaryClient;
20
67
 
21
68
  constructor(client: UnaryClient) {
22
- this.writer = new Writer(client);
23
- this.retriever = new Retriever(client);
69
+ this.client = client;
24
70
  }
25
71
 
26
- async create(workspace: string, schematic: NewSchematic): Promise<Schematic> {
27
- return await this.writer.create(workspace, schematic);
72
+ async create(workspace: string, schematic: NewSchematic): Promise<Schematic>;
73
+ async create(workspace: string, schematics: NewSchematic[]): Promise<Schematic[]>;
74
+ async create(
75
+ workspace: string,
76
+ schematics: NewSchematic | NewSchematic[],
77
+ ): Promise<Schematic | Schematic[]> {
78
+ const isMany = Array.isArray(schematics);
79
+ const normalized = toArray(schematics);
80
+ const res = await sendRequired(
81
+ this.client,
82
+ CREATE_ENDPOINT,
83
+ { workspace, schematics: normalized },
84
+ createReqZ,
85
+ createResZ,
86
+ );
87
+ return isMany ? res.schematics : res.schematics[0];
28
88
  }
29
89
 
30
90
  async rename(key: Key, name: string): Promise<void> {
31
- await this.writer.rename(key, name);
91
+ await sendRequired(
92
+ this.client,
93
+ RENAME_ENDPOINT,
94
+ { key, name },
95
+ renameReqZ,
96
+ emptyResZ,
97
+ );
32
98
  }
33
99
 
34
100
  async setData(key: Key, data: UnknownRecord): Promise<void> {
35
- await this.writer.setData(key, data);
101
+ await sendRequired(
102
+ this.client,
103
+ SET_DATA_ENDPOINT,
104
+ { key, data: JSON.stringify(data) },
105
+ setDataReqZ,
106
+ emptyResZ,
107
+ );
36
108
  }
37
109
 
38
110
  async retrieve(key: Key): Promise<Schematic>;
39
-
40
111
  async retrieve(keys: Key[]): Promise<Schematic[]>;
41
-
42
112
  async retrieve(keys: Params): Promise<Schematic | Schematic[]> {
43
113
  const isMany = Array.isArray(keys);
44
- const res = await this.retriever.retrieve(keys);
45
- return isMany ? res : res[0];
114
+ const normalized = toArray(keys);
115
+ const res = await sendRequired(
116
+ this.client,
117
+ RETRIEVE_ENDPOINT,
118
+ { keys: normalized },
119
+ retrieveReqZ,
120
+ retrieveResZ,
121
+ );
122
+ return isMany ? res.schematics : res.schematics[0];
46
123
  }
47
124
 
125
+ async delete(key: Key): Promise<void>;
126
+ async delete(keys: Key[]): Promise<void>;
48
127
  async delete(keys: Params): Promise<void> {
49
- await this.writer.delete(keys);
128
+ const normalized = toArray(keys);
129
+ await sendRequired(
130
+ this.client,
131
+ DELETE_ENDPOINT,
132
+ { keys: normalized },
133
+ deleteReqZ,
134
+ emptyResZ,
135
+ );
50
136
  }
51
137
 
52
138
  async copy(key: Key, name: string, snapshot: boolean): Promise<Schematic> {
53
- return await this.writer.copy(key, name, snapshot);
139
+ const res = await sendRequired(
140
+ this.client,
141
+ COPY_ENDPOINT,
142
+ { key, name, snapshot },
143
+ copyReqZ,
144
+ copyResZ,
145
+ );
146
+ return res.schematic;
54
147
  }
55
148
  }
@@ -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 schematic from "@/workspace/schematic/external";
10
+ export * as schematic from "@/workspace/schematic/client";
@@ -1,51 +1,126 @@
1
- // Copyright 2024 Synnax Labs, Inc.
2
- //
3
- // Use of this software is governed by the Business Source License included in the file
4
- // licenses/BSL.txt.
5
- //
6
- // As of the Change Date specified in that file, in accordance with the Business Source
7
- // License, use of this software will be governed by the Apache License, Version 2.0,
8
- // included in the file licenses/APL.txt.
9
-
10
- import { type UnaryClient } from "@synnaxlabs/freighter";
11
- import { type UnknownRecord } from "@synnaxlabs/x/record";
12
-
13
- import { type Key, type Params, type Table } from "@/workspace/table/payload";
14
- import { Retriever } from "@/workspace/table/retriever";
15
- import { type NewTable, Writer } from "@/workspace/table/writer";
1
+ import { sendRequired, type UnaryClient } from "@synnaxlabs/freighter";
2
+ import { toArray, type UnknownRecord } from "@synnaxlabs/x";
3
+ import { unknownRecordZ } from "@synnaxlabs/x/record";
4
+ import { z } from "zod";
5
+
6
+ import { ontology } from "@/ontology";
7
+
8
+ export const keyZ = z.string().uuid();
9
+ export type Key = z.infer<typeof keyZ>;
10
+ export type Params = Key | Key[];
11
+
12
+ export const tableZ = z.object({
13
+ key: z.string(),
14
+ name: z.string(),
15
+ data: unknownRecordZ.or(z.string().transform((s) => JSON.parse(s) as UnknownRecord)),
16
+ });
17
+
18
+ export type Table = z.infer<typeof tableZ>;
19
+
20
+ export const ONTOLOGY_TYPE: ontology.ResourceType = "table";
21
+
22
+ export const ontologyID = (key: Key): ontology.ID =>
23
+ new ontology.ID({ type: ONTOLOGY_TYPE, key });
24
+
25
+ const RETRIEVE_ENDPOINT = "/workspace/table/retrieve";
26
+ const CREATE_ENDPOINT = "/workspace/table/create";
27
+ const RENAME_ENDPOINT = "/workspace/table/rename";
28
+ const SET_DATA_ENDPOINT = "/workspace/table/set-data";
29
+ const DELETE_ENDPOINT = "/workspace/table/delete";
30
+
31
+ export const newTableZ = tableZ.partial({ key: true }).transform((p) => ({
32
+ ...p,
33
+ data: JSON.stringify(p.data),
34
+ }));
35
+
36
+ export type NewTable = z.input<typeof newTableZ>;
37
+
38
+ export const tableRemoteZ = z.object({
39
+ key: z.string(),
40
+ name: z.string(),
41
+ data: z.string().transform((s) => JSON.parse(s) as UnknownRecord),
42
+ });
43
+
44
+ const retrieveReqZ = z.object({ keys: z.string().array() });
45
+ const createReqZ = z.object({ workspace: z.string(), tables: newTableZ.array() });
46
+ const renameReqZ = z.object({ key: z.string(), name: z.string() });
47
+ const setDataReqZ = z.object({ key: z.string(), data: z.string() });
48
+ const deleteReqZ = z.object({ keys: z.string().array() });
49
+
50
+ const retrieveResZ = z.object({ tables: tableRemoteZ.array() });
51
+ const createResZ = z.object({ tables: tableRemoteZ.array() });
52
+ const emptyResZ = z.object({});
16
53
 
17
54
  export class Client {
18
- private readonly writer: Writer;
19
- private readonly retriever: Retriever;
55
+ private readonly client: UnaryClient;
20
56
 
21
57
  constructor(client: UnaryClient) {
22
- this.writer = new Writer(client);
23
- this.retriever = new Retriever(client);
58
+ this.client = client;
24
59
  }
25
60
 
26
- async create(workspace: string, table: NewTable): Promise<Table> {
27
- return await this.writer.create(workspace, table);
61
+ async create(workspace: string, table: NewTable): Promise<Table>;
62
+ async create(workspace: string, tables: NewTable[]): Promise<Table[]>;
63
+ async create(
64
+ workspace: string,
65
+ tables: NewTable | NewTable[],
66
+ ): Promise<Table | Table[]> {
67
+ const isMany = Array.isArray(tables);
68
+ const normalized = toArray(tables);
69
+ const res = await sendRequired(
70
+ this.client,
71
+ CREATE_ENDPOINT,
72
+ { workspace, tables: normalized },
73
+ createReqZ,
74
+ createResZ,
75
+ );
76
+ return isMany ? res.tables : res.tables[0];
28
77
  }
29
78
 
30
79
  async rename(key: Key, name: string): Promise<void> {
31
- await this.writer.rename(key, name);
80
+ await sendRequired(
81
+ this.client,
82
+ RENAME_ENDPOINT,
83
+ { key, name },
84
+ renameReqZ,
85
+ emptyResZ,
86
+ );
32
87
  }
33
88
 
34
89
  async setData(key: Key, data: UnknownRecord): Promise<void> {
35
- await this.writer.setData(key, data);
90
+ await sendRequired(
91
+ this.client,
92
+ SET_DATA_ENDPOINT,
93
+ { key, data: JSON.stringify(data) },
94
+ setDataReqZ,
95
+ emptyResZ,
96
+ );
36
97
  }
37
98
 
38
99
  async retrieve(key: Key): Promise<Table>;
39
-
40
100
  async retrieve(keys: Key[]): Promise<Table[]>;
41
-
42
101
  async retrieve(keys: Params): Promise<Table | Table[]> {
43
102
  const isMany = Array.isArray(keys);
44
- const res = await this.retriever.retrieve(keys);
45
- return isMany ? res : res[0];
103
+ const normalized = toArray(keys);
104
+ const res = await sendRequired(
105
+ this.client,
106
+ RETRIEVE_ENDPOINT,
107
+ { keys: normalized },
108
+ retrieveReqZ,
109
+ retrieveResZ,
110
+ );
111
+ return isMany ? res.tables : res.tables[0];
46
112
  }
47
113
 
114
+ async delete(key: Key): Promise<void>;
115
+ async delete(keys: Key[]): Promise<void>;
48
116
  async delete(keys: Params): Promise<void> {
49
- await this.writer.delete(keys);
117
+ const normalized = toArray(keys);
118
+ await sendRequired(
119
+ this.client,
120
+ DELETE_ENDPOINT,
121
+ { keys: normalized },
122
+ deleteReqZ,
123
+ emptyResZ,
124
+ );
50
125
  }
51
126
  }
@@ -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 table from "@/workspace/table/external";
10
+ export * as table from "@/workspace/table/client";
@@ -1,3 +0,0 @@
1
- export * from './client';
2
- export * from './payload';
3
- //# sourceMappingURL=external.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"external.d.ts","sourceRoot":"","sources":["../../src/workspace/external.ts"],"names":[],"mappings":"AASA,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC"}
@@ -1,3 +0,0 @@
1
- export * from './client';
2
- export * from './payload';
3
- //# sourceMappingURL=external.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"external.d.ts","sourceRoot":"","sources":["../../../src/workspace/lineplot/external.ts"],"names":[],"mappings":"AASA,cAAc,6BAA6B,CAAC;AAC5C,cAAc,8BAA8B,CAAC"}
@@ -1,9 +0,0 @@
1
- import { UnaryClient } from '@synnaxlabs/freighter';
2
- import { LinePlot, Params } from './payload';
3
- export declare class Retriever {
4
- private readonly ENDPOINT;
5
- private readonly client;
6
- constructor(client: UnaryClient);
7
- retrieve(linePlots: Params): Promise<LinePlot[]>;
8
- }
9
- //# sourceMappingURL=retriever.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"retriever.d.ts","sourceRoot":"","sources":["../../../src/workspace/lineplot/retriever.ts"],"names":[],"mappings":"AASA,OAAO,EAAgB,KAAK,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAIvE,OAAO,EAAE,KAAK,QAAQ,EAAa,KAAK,MAAM,EAAE,MAAM,8BAA8B,CAAC;AAMrF,qBAAa,SAAS;IACpB,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAkC;IAC3D,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAc;gBAEzB,MAAM,EAAE,WAAW;IAIzB,QAAQ,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,QAAQ,EAAE,CAAC;CAMvD"}
@@ -1,35 +0,0 @@
1
- import { UnaryClient } from '@synnaxlabs/freighter';
2
- import { UnknownRecord } from '@synnaxlabs/x/record';
3
- import { z } from 'zod';
4
- import { Key, LinePlot, Params } from './payload';
5
- export declare const newLinePlotZ: z.ZodEffects<z.ZodObject<{
6
- name: z.ZodString;
7
- key: z.ZodOptional<z.ZodString>;
8
- data: z.ZodUnion<[z.ZodRecord<z.ZodUnion<[z.ZodNumber, z.ZodString, z.ZodSymbol]>, z.ZodUnknown>, z.ZodEffects<z.ZodString, UnknownRecord, string>]>;
9
- }, "strip", z.ZodTypeAny, {
10
- name: string;
11
- data: UnknownRecord | Record<string | number | symbol, unknown>;
12
- key?: string | undefined;
13
- }, {
14
- name: string;
15
- data: string | Record<string | number | symbol, unknown>;
16
- key?: string | undefined;
17
- }>, {
18
- data: string;
19
- name: string;
20
- key?: string | undefined;
21
- }, {
22
- name: string;
23
- data: string | Record<string | number | symbol, unknown>;
24
- key?: string | undefined;
25
- }>;
26
- export type NewLinePlot = z.input<typeof newLinePlotZ>;
27
- export declare class Writer {
28
- private readonly client;
29
- constructor(client: UnaryClient);
30
- create(workspace: string, plot: NewLinePlot): Promise<LinePlot>;
31
- delete(workspaces: Params): Promise<void>;
32
- rename(plot: Key, name: string): Promise<void>;
33
- setData(plot: Key, data: UnknownRecord): Promise<void>;
34
- }
35
- //# sourceMappingURL=writer.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"writer.d.ts","sourceRoot":"","sources":["../../../src/workspace/lineplot/writer.ts"],"names":[],"mappings":"AASA,OAAO,EAAgB,KAAK,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACvE,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAE1D,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EACL,KAAK,GAAG,EAER,KAAK,QAAQ,EAEb,KAAK,MAAM,EACZ,MAAM,8BAA8B,CAAC;AAGtC,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;EAGtB,CAAC;AAEJ,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAC;AAoCvD,qBAAa,MAAM;IACjB,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAc;gBAEzB,MAAM,EAAE,WAAW;IAIzB,MAAM,CAAC,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,WAAW,GAAG,OAAO,CAAC,QAAQ,CAAC;IAa/D,MAAM,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAWzC,MAAM,CAAC,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAU9C,OAAO,CAAC,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC;CAS7D"}
@@ -1,3 +0,0 @@
1
- export * from './client';
2
- export * from './payload';
3
- //# sourceMappingURL=external.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"external.d.ts","sourceRoot":"","sources":["../../../src/workspace/log/external.ts"],"names":[],"mappings":"AASA,cAAc,wBAAwB,CAAC;AACvC,cAAc,yBAAyB,CAAC"}
@@ -1,36 +0,0 @@
1
- import { UnknownRecord } from '@synnaxlabs/x/record';
2
- import { z } from 'zod';
3
- import { ontology } from '../../ontology';
4
- export declare const keyZ: z.ZodString;
5
- export type Key = z.infer<typeof keyZ>;
6
- export type Params = Key | Key[];
7
- export declare const logZ: z.ZodObject<{
8
- key: z.ZodString;
9
- name: z.ZodString;
10
- data: z.ZodUnion<[z.ZodRecord<z.ZodUnion<[z.ZodNumber, z.ZodString, z.ZodSymbol]>, z.ZodUnknown>, z.ZodEffects<z.ZodString, UnknownRecord, string>]>;
11
- }, "strip", z.ZodTypeAny, {
12
- name: string;
13
- key: string;
14
- data: UnknownRecord | Record<string | number | symbol, unknown>;
15
- }, {
16
- name: string;
17
- key: string;
18
- data: string | Record<string | number | symbol, unknown>;
19
- }>;
20
- export declare const logRemoteZ: z.ZodObject<{
21
- key: z.ZodString;
22
- name: z.ZodString;
23
- data: z.ZodEffects<z.ZodString, UnknownRecord, string>;
24
- }, "strip", z.ZodTypeAny, {
25
- name: string;
26
- key: string;
27
- data: UnknownRecord;
28
- }, {
29
- name: string;
30
- key: string;
31
- data: string;
32
- }>;
33
- export type Log = z.infer<typeof logZ>;
34
- export declare const ONTOLOGY_TYPE: ontology.ResourceType;
35
- export declare const ontologyID: (key: Key) => ontology.ID;
36
- //# sourceMappingURL=payload.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"payload.d.ts","sourceRoot":"","sources":["../../../src/workspace/log/payload.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,KAAK,aAAa,EAAkB,MAAM,sBAAsB,CAAC;AAC1E,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC,eAAO,MAAM,IAAI,aAAoB,CAAC;AACtC,MAAM,MAAM,GAAG,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,IAAI,CAAC,CAAC;AACvC,MAAM,MAAM,MAAM,GAAG,GAAG,GAAG,GAAG,EAAE,CAAC;AAEjC,eAAO,MAAM,IAAI;;;;;;;;;;;;EAIf,CAAC;AAEH,eAAO,MAAM,UAAU;;;;;;;;;;;;EAIrB,CAAC;AAEH,MAAM,MAAM,GAAG,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,IAAI,CAAC,CAAC;AAEvC,eAAO,MAAM,aAAa,EAAE,QAAQ,CAAC,YAAoB,CAAC;AAE1D,eAAO,MAAM,UAAU,QAAS,GAAG,KAAG,QAAQ,CAAC,EACA,CAAC"}
@@ -1,9 +0,0 @@
1
- import { UnaryClient } from '@synnaxlabs/freighter';
2
- import { Log, Params } from './payload';
3
- export declare class Retriever {
4
- private readonly ENDPOINT;
5
- private readonly client;
6
- constructor(client: UnaryClient);
7
- retrieve(logs: Params): Promise<Log[]>;
8
- }
9
- //# sourceMappingURL=retriever.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"retriever.d.ts","sourceRoot":"","sources":["../../../src/workspace/log/retriever.ts"],"names":[],"mappings":"AASA,OAAO,EAAgB,KAAK,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAIvE,OAAO,EAAE,KAAK,GAAG,EAAc,KAAK,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAK5E,qBAAa,SAAS;IACpB,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAA6B;IACtD,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAc;gBAEzB,MAAM,EAAE,WAAW;IAIzB,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC;CAW7C"}
@@ -1,35 +0,0 @@
1
- import { UnaryClient } from '@synnaxlabs/freighter';
2
- import { UnknownRecord } from '@synnaxlabs/x/record';
3
- import { z } from 'zod';
4
- import { Key, Log, Params } from './payload';
5
- export declare const newLogZ: z.ZodEffects<z.ZodObject<{
6
- name: z.ZodString;
7
- key: z.ZodOptional<z.ZodString>;
8
- data: z.ZodUnion<[z.ZodRecord<z.ZodUnion<[z.ZodNumber, z.ZodString, z.ZodSymbol]>, z.ZodUnknown>, z.ZodEffects<z.ZodString, UnknownRecord, string>]>;
9
- }, "strip", z.ZodTypeAny, {
10
- name: string;
11
- data: UnknownRecord | Record<string | number | symbol, unknown>;
12
- key?: string | undefined;
13
- }, {
14
- name: string;
15
- data: string | Record<string | number | symbol, unknown>;
16
- key?: string | undefined;
17
- }>, {
18
- data: string;
19
- name: string;
20
- key?: string | undefined;
21
- }, {
22
- name: string;
23
- data: string | Record<string | number | symbol, unknown>;
24
- key?: string | undefined;
25
- }>;
26
- export type NewLog = z.input<typeof newLogZ>;
27
- export declare class Writer {
28
- private readonly client;
29
- constructor(client: UnaryClient);
30
- create(workspace: string, log: NewLog): Promise<Log>;
31
- delete(logs: Params): Promise<void>;
32
- rename(log: Key, name: string): Promise<void>;
33
- setData(log: Key, data: UnknownRecord): Promise<void>;
34
- }
35
- //# sourceMappingURL=writer.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"writer.d.ts","sourceRoot":"","sources":["../../../src/workspace/log/writer.ts"],"names":[],"mappings":"AASA,OAAO,EAAgB,KAAK,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACvE,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAE1D,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EACL,KAAK,GAAG,EAER,KAAK,GAAG,EAGR,KAAK,MAAM,EACZ,MAAM,yBAAyB,CAAC;AAGjC,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;EAGjB,CAAC;AAEJ,MAAM,MAAM,MAAM,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,OAAO,CAAC,CAAC;AAoC7C,qBAAa,MAAM;IACjB,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAc;gBAEzB,MAAM,EAAE,WAAW;IAIzB,MAAM,CAAC,SAAS,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC;IAapD,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAWnC,MAAM,CAAC,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAU7C,OAAO,CAAC,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC;CAS5D"}
@@ -1,38 +0,0 @@
1
- import { UnknownRecord } from '@synnaxlabs/x/record';
2
- import { z } from 'zod';
3
- import { ontology } from '../ontology';
4
- export declare const keyZ: z.ZodString;
5
- export type Key = z.infer<typeof keyZ>;
6
- export type Params = Key | Key[];
7
- export declare const workspaceZ: z.ZodObject<{
8
- name: z.ZodString;
9
- key: z.ZodString;
10
- layout: z.ZodUnion<[z.ZodRecord<z.ZodUnion<[z.ZodNumber, z.ZodString, z.ZodSymbol]>, z.ZodUnknown>, z.ZodEffects<z.ZodString, UnknownRecord, string>]>;
11
- }, "strip", z.ZodTypeAny, {
12
- name: string;
13
- key: string;
14
- layout: UnknownRecord | Record<string | number | symbol, unknown>;
15
- }, {
16
- name: string;
17
- key: string;
18
- layout: string | Record<string | number | symbol, unknown>;
19
- }>;
20
- export declare const workspaceRemoteZ: z.ZodObject<z.objectUtil.extendShape<Omit<{
21
- name: z.ZodString;
22
- key: z.ZodString;
23
- layout: z.ZodUnion<[z.ZodRecord<z.ZodUnion<[z.ZodNumber, z.ZodString, z.ZodSymbol]>, z.ZodUnknown>, z.ZodEffects<z.ZodString, UnknownRecord, string>]>;
24
- }, "layout">, {
25
- layout: z.ZodEffects<z.ZodString, UnknownRecord, string>;
26
- }>, "strip", z.ZodTypeAny, {
27
- name: string;
28
- key: string;
29
- layout: UnknownRecord;
30
- }, {
31
- name: string;
32
- key: string;
33
- layout: string;
34
- }>;
35
- export type Workspace = z.infer<typeof workspaceZ>;
36
- export declare const ONTOLOGY_TYPE: ontology.ResourceType;
37
- export declare const ontologyID: (key: Key) => ontology.ID;
38
- //# sourceMappingURL=payload.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"payload.d.ts","sourceRoot":"","sources":["../../src/workspace/payload.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,KAAK,aAAa,EAAkB,MAAM,sBAAsB,CAAC;AAC1E,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC,eAAO,MAAM,IAAI,aAAoB,CAAC;AAEtC,MAAM,MAAM,GAAG,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,IAAI,CAAC,CAAC;AAEvC,MAAM,MAAM,MAAM,GAAG,GAAG,GAAG,GAAG,EAAE,CAAC;AAUjC,eAAO,MAAM,UAAU;;;;;;;;;;;;EAIrB,CAAC;AAEH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;EAE3B,CAAC;AAEH,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,UAAU,CAAC,CAAC;AAEnD,eAAO,MAAM,aAAa,EAAE,QAAQ,CAAC,YAA0B,CAAC;AAEhE,eAAO,MAAM,UAAU,QAAS,GAAG,KAAG,QAAQ,CAAC,EACA,CAAC"}
@@ -1,13 +0,0 @@
1
- import { UnaryClient } from '@synnaxlabs/freighter';
2
- import { Params, Workspace } from './payload';
3
- export declare class Retriever {
4
- private static readonly ENDPOINT;
5
- private readonly client;
6
- constructor(client: UnaryClient);
7
- retrieve(workspaces: Params): Promise<Workspace[]>;
8
- retrieveByAuthor(author: string): Promise<Workspace[]>;
9
- search(term: string): Promise<Workspace[]>;
10
- page(offset: number, limit: number): Promise<Workspace[]>;
11
- private execute;
12
- }
13
- //# sourceMappingURL=retriever.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"retriever.d.ts","sourceRoot":"","sources":["../../src/workspace/retriever.ts"],"names":[],"mappings":"AASA,OAAO,EAAgB,KAAK,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAKvE,OAAO,EAEL,KAAK,MAAM,EACX,KAAK,SAAS,EAEf,MAAM,qBAAqB,CAAC;AAc7B,qBAAa,SAAS;IACpB,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAyB;IAEzD,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAc;gBAEzB,MAAM,EAAE,WAAW;IAIzB,QAAQ,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,SAAS,EAAE,CAAC;IAKlD,gBAAgB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,SAAS,EAAE,CAAC;IAItD,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,SAAS,EAAE,CAAC;IAI1C,IAAI,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,SAAS,EAAE,CAAC;YAIjD,OAAO;CAUtB"}
@@ -1,3 +0,0 @@
1
- export * from './client';
2
- export * from './payload';
3
- //# sourceMappingURL=external.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"external.d.ts","sourceRoot":"","sources":["../../../src/workspace/schematic/external.ts"],"names":[],"mappings":"AASA,cAAc,8BAA8B,CAAC;AAC7C,cAAc,+BAA+B,CAAC"}
@@ -1,42 +0,0 @@
1
- import { UnknownRecord } from '@synnaxlabs/x/record';
2
- import { z } from 'zod';
3
- import { ontology } from '../../ontology';
4
- export declare const keyZ: z.ZodString;
5
- export type Key = z.infer<typeof keyZ>;
6
- export type Params = Key | Key[];
7
- export declare const schematicZ: z.ZodObject<{
8
- key: z.ZodString;
9
- name: z.ZodString;
10
- data: z.ZodUnion<[z.ZodRecord<z.ZodUnion<[z.ZodNumber, z.ZodString, z.ZodSymbol]>, z.ZodUnknown>, z.ZodEffects<z.ZodString, UnknownRecord, string>]>;
11
- snapshot: z.ZodBoolean;
12
- }, "strip", z.ZodTypeAny, {
13
- name: string;
14
- key: string;
15
- data: UnknownRecord | Record<string | number | symbol, unknown>;
16
- snapshot: boolean;
17
- }, {
18
- name: string;
19
- key: string;
20
- data: string | Record<string | number | symbol, unknown>;
21
- snapshot: boolean;
22
- }>;
23
- export declare const schematicRemoteZ: z.ZodObject<{
24
- key: z.ZodString;
25
- name: z.ZodString;
26
- snapshot: z.ZodBoolean;
27
- data: z.ZodEffects<z.ZodString, UnknownRecord, string>;
28
- }, "strip", z.ZodTypeAny, {
29
- name: string;
30
- key: string;
31
- data: UnknownRecord;
32
- snapshot: boolean;
33
- }, {
34
- name: string;
35
- key: string;
36
- data: string;
37
- snapshot: boolean;
38
- }>;
39
- export type Schematic = z.infer<typeof schematicZ>;
40
- export declare const ONTOLOGY_TYPE: ontology.ResourceType;
41
- export declare const ontologyID: (key: Key) => ontology.ID;
42
- //# sourceMappingURL=payload.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"payload.d.ts","sourceRoot":"","sources":["../../../src/workspace/schematic/payload.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,KAAK,aAAa,EAAkB,MAAM,sBAAsB,CAAC;AAC1E,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC,eAAO,MAAM,IAAI,aAAoB,CAAC;AACtC,MAAM,MAAM,GAAG,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,IAAI,CAAC,CAAC;AACvC,MAAM,MAAM,MAAM,GAAG,GAAG,GAAG,GAAG,EAAE,CAAC;AAEjC,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;EAKrB,CAAC;AAEH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;EAK3B,CAAC;AAEH,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,UAAU,CAAC,CAAC;AAEnD,eAAO,MAAM,aAAa,EAAE,QAAQ,CAAC,YAA0B,CAAC;AAEhE,eAAO,MAAM,UAAU,QAAS,GAAG,KAAG,QAAQ,CAAC,EACA,CAAC"}
@@ -1,9 +0,0 @@
1
- import { UnaryClient } from '@synnaxlabs/freighter';
2
- import { Params, Schematic } from './payload';
3
- export declare class Retriever {
4
- private readonly ENDPOINT;
5
- private readonly client;
6
- constructor(client: UnaryClient);
7
- retrieve(schematics: Params): Promise<Schematic[]>;
8
- }
9
- //# sourceMappingURL=retriever.d.ts.map