@synnaxlabs/client 0.43.0 → 0.44.1
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/dist/access/payload.d.ts +1 -1
- package/dist/access/payload.d.ts.map +1 -1
- package/dist/access/policy/client.d.ts +263 -6
- package/dist/access/policy/client.d.ts.map +1 -1
- package/dist/access/policy/external.d.ts +0 -1
- package/dist/access/policy/external.d.ts.map +1 -1
- package/dist/access/policy/payload.d.ts +105 -93
- package/dist/access/policy/payload.d.ts.map +1 -1
- package/dist/auth/auth.d.ts +1 -1
- package/dist/auth/auth.d.ts.map +1 -1
- package/dist/channel/client.d.ts +12 -13
- package/dist/channel/client.d.ts.map +1 -1
- package/dist/channel/payload.d.ts +77 -19
- package/dist/channel/payload.d.ts.map +1 -1
- package/dist/channel/retriever.d.ts +9 -16
- package/dist/channel/retriever.d.ts.map +1 -1
- package/dist/channel/writer.d.ts +1 -1
- package/dist/channel/writer.d.ts.map +1 -1
- package/dist/client.cjs +27 -135
- package/dist/client.d.ts +3 -3
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +8619 -28938
- package/dist/connection/checker.d.ts +1 -1
- package/dist/connection/checker.d.ts.map +1 -1
- package/dist/control/client.d.ts +1 -0
- package/dist/control/client.d.ts.map +1 -1
- package/dist/control/state.d.ts +6 -6
- package/dist/control/state.d.ts.map +1 -1
- package/dist/errors.d.ts +18 -5
- package/dist/errors.d.ts.map +1 -1
- package/dist/framer/adapter.d.ts +3 -3
- package/dist/framer/adapter.d.ts.map +1 -1
- package/dist/framer/client.d.ts +4 -13
- package/dist/framer/client.d.ts.map +1 -1
- package/dist/framer/codec.d.ts +1 -1
- package/dist/framer/codec.d.ts.map +1 -1
- package/dist/framer/deleter.d.ts +5 -5
- package/dist/framer/deleter.d.ts.map +1 -1
- package/dist/framer/frame.d.ts +5 -7
- package/dist/framer/frame.d.ts.map +1 -1
- package/dist/framer/streamProxy.d.ts +1 -1
- package/dist/framer/streamProxy.d.ts.map +1 -1
- package/dist/framer/streamer.d.ts +139 -20
- package/dist/framer/streamer.d.ts.map +1 -1
- package/dist/framer/writer.d.ts +222 -33
- package/dist/framer/writer.d.ts.map +1 -1
- package/dist/hardware/device/client.d.ts +49 -28
- package/dist/hardware/device/client.d.ts.map +1 -1
- package/dist/hardware/device/payload.d.ts +126 -46
- package/dist/hardware/device/payload.d.ts.map +1 -1
- package/dist/hardware/rack/client.d.ts +78 -22
- package/dist/hardware/rack/client.d.ts.map +1 -1
- package/dist/hardware/rack/payload.d.ts +99 -56
- package/dist/hardware/rack/payload.d.ts.map +1 -1
- package/dist/hardware/task/client.d.ts +100 -41
- package/dist/hardware/task/client.d.ts.map +1 -1
- package/dist/hardware/task/payload.d.ts +83 -61
- package/dist/hardware/task/payload.d.ts.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/label/client.d.ts +138 -20
- package/dist/label/client.d.ts.map +1 -1
- package/dist/label/external.d.ts +0 -2
- package/dist/label/external.d.ts.map +1 -1
- package/dist/label/payload.d.ts +4 -5
- package/dist/label/payload.d.ts.map +1 -1
- package/dist/ontology/client.d.ts +45 -135
- package/dist/ontology/client.d.ts.map +1 -1
- package/dist/ontology/group/group.d.ts +3 -3
- package/dist/ontology/group/group.d.ts.map +1 -1
- package/dist/ontology/group/payload.d.ts +3 -27
- package/dist/ontology/group/payload.d.ts.map +1 -1
- package/dist/ontology/payload.d.ts +113 -243
- package/dist/ontology/payload.d.ts.map +1 -1
- package/dist/ontology/writer.d.ts +4 -4
- package/dist/ontology/writer.d.ts.map +1 -1
- package/dist/ranger/alias.d.ts +11 -5
- package/dist/ranger/alias.d.ts.map +1 -1
- package/dist/ranger/client.d.ts +87 -30
- package/dist/ranger/client.d.ts.map +1 -1
- package/dist/ranger/external.d.ts +1 -1
- package/dist/ranger/external.d.ts.map +1 -1
- package/dist/ranger/kv.d.ts +10 -12
- package/dist/ranger/kv.d.ts.map +1 -1
- package/dist/ranger/payload.d.ts +23 -44
- package/dist/ranger/payload.d.ts.map +1 -1
- package/dist/ranger/writer.d.ts +22 -19
- package/dist/ranger/writer.d.ts.map +1 -1
- package/dist/testutil/client.d.ts +4 -0
- package/dist/testutil/client.d.ts.map +1 -0
- package/dist/user/client.d.ts +59 -6
- package/dist/user/client.d.ts.map +1 -1
- package/dist/user/payload.d.ts +4 -6
- 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/decodeJSONString.d.ts +2 -2
- package/dist/util/decodeJSONString.d.ts.map +1 -1
- package/dist/util/parseWithoutKeyConversion.d.ts +2 -2
- package/dist/util/parseWithoutKeyConversion.d.ts.map +1 -1
- package/dist/util/retrieve.d.ts +1 -1
- package/dist/util/retrieve.d.ts.map +1 -1
- package/dist/util/zod.d.ts +1 -1
- package/dist/util/zod.d.ts.map +1 -1
- package/dist/workspace/client.d.ts +17 -6
- package/dist/workspace/client.d.ts.map +1 -1
- package/dist/workspace/lineplot/client.d.ts +2 -2
- package/dist/workspace/lineplot/client.d.ts.map +1 -1
- package/dist/workspace/lineplot/payload.d.ts +8 -9
- package/dist/workspace/lineplot/payload.d.ts.map +1 -1
- package/dist/workspace/log/client.d.ts +2 -2
- package/dist/workspace/log/client.d.ts.map +1 -1
- package/dist/workspace/log/payload.d.ts +8 -9
- package/dist/workspace/log/payload.d.ts.map +1 -1
- package/dist/workspace/payload.d.ts +10 -11
- package/dist/workspace/payload.d.ts.map +1 -1
- package/dist/workspace/schematic/client.d.ts +2 -2
- package/dist/workspace/schematic/client.d.ts.map +1 -1
- package/dist/workspace/schematic/payload.d.ts +10 -11
- package/dist/workspace/schematic/payload.d.ts.map +1 -1
- package/dist/workspace/table/client.d.ts +2 -2
- package/dist/workspace/table/client.d.ts.map +1 -1
- package/dist/workspace/table/payload.d.ts +10 -11
- package/dist/workspace/table/payload.d.ts.map +1 -1
- package/examples/node/package-lock.json +47 -39
- package/examples/node/package.json +2 -1
- package/examples/node/streamWrite.js +5 -11
- package/package.json +14 -13
- package/src/access/payload.ts +1 -1
- package/src/access/policy/client.ts +87 -32
- package/src/access/policy/external.ts +0 -1
- package/src/access/policy/payload.ts +4 -4
- package/src/access/policy/policy.spec.ts +86 -83
- package/src/auth/auth.spec.ts +29 -18
- package/src/auth/auth.ts +1 -1
- package/src/channel/batchRetriever.spec.ts +4 -9
- package/src/channel/channel.spec.ts +24 -6
- package/src/channel/client.ts +31 -46
- package/src/channel/payload.ts +13 -14
- package/src/channel/retriever.ts +26 -41
- package/src/channel/writer.ts +3 -3
- package/src/client.ts +4 -4
- package/src/connection/checker.ts +1 -1
- package/src/connection/connection.spec.ts +31 -23
- package/src/control/client.ts +2 -2
- package/src/control/state.spec.ts +3 -3
- package/src/control/state.ts +1 -1
- package/src/errors.spec.ts +9 -5
- package/src/errors.ts +28 -15
- package/src/framer/adapter.spec.ts +118 -9
- package/src/framer/adapter.ts +24 -11
- package/src/framer/client.spec.ts +125 -2
- package/src/framer/client.ts +41 -47
- package/src/framer/codec.ts +1 -1
- package/src/framer/deleter.spec.ts +2 -2
- package/src/framer/deleter.ts +1 -1
- package/src/framer/frame.ts +1 -4
- package/src/framer/iterator.spec.ts +8 -8
- package/src/framer/iterator.ts +1 -1
- package/src/framer/streamProxy.ts +1 -1
- package/src/framer/streamer.spec.ts +185 -36
- package/src/framer/streamer.ts +28 -36
- package/src/framer/writer.spec.ts +6 -6
- package/src/framer/writer.ts +97 -111
- package/src/hardware/device/client.ts +45 -131
- package/src/hardware/device/device.spec.ts +163 -52
- package/src/hardware/device/payload.ts +10 -21
- package/src/hardware/rack/client.ts +87 -105
- package/src/hardware/rack/payload.ts +4 -13
- package/src/hardware/rack/rack.spec.ts +28 -35
- package/src/hardware/task/client.ts +335 -291
- package/src/hardware/task/payload.ts +86 -62
- package/src/hardware/task/task.spec.ts +208 -32
- package/src/index.ts +2 -1
- package/src/label/client.ts +100 -95
- package/src/label/external.ts +0 -2
- package/src/label/label.spec.ts +8 -6
- package/src/label/payload.ts +3 -4
- package/src/ontology/client.ts +41 -324
- package/src/ontology/group/group.spec.ts +2 -2
- package/src/ontology/group/group.ts +4 -5
- package/src/ontology/group/payload.ts +2 -25
- package/src/ontology/group/writer.ts +1 -1
- package/src/ontology/ontology.spec.ts +355 -41
- package/src/ontology/payload.ts +74 -112
- package/src/ontology/writer.ts +8 -17
- package/src/ranger/alias.ts +19 -37
- package/src/ranger/client.ts +118 -150
- package/src/ranger/external.ts +9 -1
- package/src/ranger/kv.ts +6 -27
- package/src/ranger/payload.ts +21 -37
- package/src/ranger/ranger.spec.ts +37 -56
- package/src/ranger/writer.ts +1 -1
- package/src/{signals/index.ts → testutil/client.ts} +11 -1
- package/src/user/client.ts +122 -47
- package/src/user/payload.ts +2 -5
- package/src/user/retriever.ts +1 -1
- package/src/user/user.spec.ts +31 -31
- package/src/user/writer.ts +1 -1
- package/src/util/decodeJSONString.ts +3 -3
- package/src/util/parseWithoutKeyConversion.ts +2 -2
- package/src/util/retrieve.ts +1 -1
- package/src/util/zod.ts +1 -1
- package/src/workspace/client.ts +20 -36
- package/src/workspace/lineplot/client.ts +5 -7
- package/src/workspace/lineplot/lineplot.spec.ts +2 -2
- package/src/workspace/lineplot/payload.ts +4 -7
- package/src/workspace/log/client.ts +5 -7
- package/src/workspace/log/log.spec.ts +2 -2
- package/src/workspace/log/payload.ts +4 -7
- package/src/workspace/payload.ts +4 -7
- package/src/workspace/schematic/client.ts +5 -7
- package/src/workspace/schematic/payload.ts +4 -7
- package/src/workspace/schematic/schematic.spec.ts +2 -2
- package/src/workspace/table/client.ts +5 -7
- package/src/workspace/table/payload.ts +4 -7
- package/src/workspace/table/table.spec.ts +2 -2
- package/src/workspace/workspace.spec.ts +2 -2
- package/dist/access/policy/ontology.d.ts +0 -5
- package/dist/access/policy/ontology.d.ts.map +0 -1
- package/dist/access/policy/retriever.d.ts +0 -40
- package/dist/access/policy/retriever.d.ts.map +0 -1
- package/dist/access/policy/writer.d.ts +0 -9
- package/dist/access/policy/writer.d.ts.map +0 -1
- package/dist/label/retriever.d.ts +0 -14
- package/dist/label/retriever.d.ts.map +0 -1
- package/dist/label/writer.d.ts +0 -54
- package/dist/label/writer.d.ts.map +0 -1
- package/dist/setupspecs.d.ts +0 -5
- package/dist/setupspecs.d.ts.map +0 -1
- package/dist/signals/external.d.ts +0 -2
- package/dist/signals/external.d.ts.map +0 -1
- package/dist/signals/index.d.ts +0 -2
- package/dist/signals/index.d.ts.map +0 -1
- package/dist/signals/observable.d.ts +0 -12
- package/dist/signals/observable.d.ts.map +0 -1
- package/src/access/policy/ontology.ts +0 -17
- package/src/access/policy/retriever.ts +0 -44
- package/src/access/policy/writer.ts +0 -65
- package/src/label/retriever.ts +0 -63
- package/src/label/writer.ts +0 -95
- package/src/setupspecs.ts +0 -27
- package/src/signals/external.ts +0 -10
- package/src/signals/observable.ts +0 -42
package/dist/label/client.d.ts
CHANGED
|
@@ -1,31 +1,149 @@
|
|
|
1
1
|
import { UnaryClient } from '@synnaxlabs/freighter';
|
|
2
|
-
import {
|
|
3
|
-
import { AsyncTermSearcher } from '@synnaxlabs/x/search';
|
|
4
|
-
import { framer } from '../framer';
|
|
2
|
+
import { default as z } from 'zod';
|
|
5
3
|
import { Key, Label } from './payload';
|
|
6
|
-
import { New, SetOptions } from './writer';
|
|
7
4
|
import { ontology } from '../ontology';
|
|
8
|
-
|
|
9
|
-
export declare
|
|
5
|
+
export declare const SET_CHANNEL_NAME = "sy_label_set";
|
|
6
|
+
export declare const DELETE_CHANNEL_NAME = "sy_label_delete";
|
|
7
|
+
export declare const newZ: z.ZodObject<{
|
|
8
|
+
name: z.ZodString;
|
|
9
|
+
color: z.ZodString;
|
|
10
|
+
key: z.ZodOptional<z.ZodUUID>;
|
|
11
|
+
}, z.core.$strip>;
|
|
12
|
+
export interface New extends z.infer<typeof newZ> {
|
|
13
|
+
}
|
|
14
|
+
declare const setReqZ: z.ZodObject<{
|
|
15
|
+
id: z.ZodUnion<[z.ZodObject<{
|
|
16
|
+
type: z.ZodEnum<{
|
|
17
|
+
label: "label";
|
|
18
|
+
log: "log";
|
|
19
|
+
allow_all: "allow_all";
|
|
20
|
+
builtin: "builtin";
|
|
21
|
+
cluster: "cluster";
|
|
22
|
+
channel: "channel";
|
|
23
|
+
node: "node";
|
|
24
|
+
group: "group";
|
|
25
|
+
range: "range";
|
|
26
|
+
framer: "framer";
|
|
27
|
+
"range-alias": "range-alias";
|
|
28
|
+
user: "user";
|
|
29
|
+
workspace: "workspace";
|
|
30
|
+
schematic: "schematic";
|
|
31
|
+
lineplot: "lineplot";
|
|
32
|
+
rack: "rack";
|
|
33
|
+
device: "device";
|
|
34
|
+
task: "task";
|
|
35
|
+
policy: "policy";
|
|
36
|
+
table: "table";
|
|
37
|
+
}>;
|
|
38
|
+
key: z.ZodString;
|
|
39
|
+
}, z.core.$strip>, z.ZodPipe<z.ZodString, z.ZodTransform<{
|
|
40
|
+
type: "label" | "log" | "allow_all" | "builtin" | "cluster" | "channel" | "node" | "group" | "range" | "framer" | "range-alias" | "user" | "workspace" | "schematic" | "lineplot" | "rack" | "device" | "task" | "policy" | "table";
|
|
41
|
+
key: string;
|
|
42
|
+
}, string>>]>;
|
|
43
|
+
labels: z.ZodArray<z.ZodUUID>;
|
|
44
|
+
replace: z.ZodOptional<z.ZodBoolean>;
|
|
45
|
+
}, z.core.$strip>;
|
|
46
|
+
interface SetReq extends z.infer<typeof setReqZ> {
|
|
47
|
+
}
|
|
48
|
+
export interface SetOptions extends Pick<SetReq, "replace"> {
|
|
49
|
+
}
|
|
50
|
+
declare const retrieveRequestZ: z.ZodObject<{
|
|
51
|
+
keys: z.ZodOptional<z.ZodArray<z.ZodUUID>>;
|
|
52
|
+
for: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
|
|
53
|
+
type: z.ZodEnum<{
|
|
54
|
+
label: "label";
|
|
55
|
+
log: "log";
|
|
56
|
+
allow_all: "allow_all";
|
|
57
|
+
builtin: "builtin";
|
|
58
|
+
cluster: "cluster";
|
|
59
|
+
channel: "channel";
|
|
60
|
+
node: "node";
|
|
61
|
+
group: "group";
|
|
62
|
+
range: "range";
|
|
63
|
+
framer: "framer";
|
|
64
|
+
"range-alias": "range-alias";
|
|
65
|
+
user: "user";
|
|
66
|
+
workspace: "workspace";
|
|
67
|
+
schematic: "schematic";
|
|
68
|
+
lineplot: "lineplot";
|
|
69
|
+
rack: "rack";
|
|
70
|
+
device: "device";
|
|
71
|
+
task: "task";
|
|
72
|
+
policy: "policy";
|
|
73
|
+
table: "table";
|
|
74
|
+
}>;
|
|
75
|
+
key: z.ZodString;
|
|
76
|
+
}, z.core.$strip>, z.ZodPipe<z.ZodString, z.ZodTransform<{
|
|
77
|
+
type: "label" | "log" | "allow_all" | "builtin" | "cluster" | "channel" | "node" | "group" | "range" | "framer" | "range-alias" | "user" | "workspace" | "schematic" | "lineplot" | "rack" | "device" | "task" | "policy" | "table";
|
|
78
|
+
key: string;
|
|
79
|
+
}, string>>]>>;
|
|
80
|
+
searchTerm: z.ZodOptional<z.ZodString>;
|
|
81
|
+
offset: z.ZodOptional<z.ZodNumber>;
|
|
82
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
|
83
|
+
}, z.core.$strip>;
|
|
84
|
+
declare const singleRetrieveArgsZ: z.ZodPipe<z.ZodObject<{
|
|
85
|
+
key: z.ZodUUID;
|
|
86
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
87
|
+
keys: string[];
|
|
88
|
+
}, {
|
|
89
|
+
key: string;
|
|
90
|
+
}>>;
|
|
91
|
+
declare const retrieveArgsZ: z.ZodUnion<readonly [z.ZodPipe<z.ZodObject<{
|
|
92
|
+
key: z.ZodUUID;
|
|
93
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
94
|
+
keys: string[];
|
|
95
|
+
}, {
|
|
96
|
+
key: string;
|
|
97
|
+
}>>, z.ZodObject<{
|
|
98
|
+
keys: z.ZodOptional<z.ZodArray<z.ZodUUID>>;
|
|
99
|
+
for: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
|
|
100
|
+
type: z.ZodEnum<{
|
|
101
|
+
label: "label";
|
|
102
|
+
log: "log";
|
|
103
|
+
allow_all: "allow_all";
|
|
104
|
+
builtin: "builtin";
|
|
105
|
+
cluster: "cluster";
|
|
106
|
+
channel: "channel";
|
|
107
|
+
node: "node";
|
|
108
|
+
group: "group";
|
|
109
|
+
range: "range";
|
|
110
|
+
framer: "framer";
|
|
111
|
+
"range-alias": "range-alias";
|
|
112
|
+
user: "user";
|
|
113
|
+
workspace: "workspace";
|
|
114
|
+
schematic: "schematic";
|
|
115
|
+
lineplot: "lineplot";
|
|
116
|
+
rack: "rack";
|
|
117
|
+
device: "device";
|
|
118
|
+
task: "task";
|
|
119
|
+
policy: "policy";
|
|
120
|
+
table: "table";
|
|
121
|
+
}>;
|
|
122
|
+
key: z.ZodString;
|
|
123
|
+
}, z.core.$strip>, z.ZodPipe<z.ZodString, z.ZodTransform<{
|
|
124
|
+
type: "label" | "log" | "allow_all" | "builtin" | "cluster" | "channel" | "node" | "group" | "range" | "framer" | "range-alias" | "user" | "workspace" | "schematic" | "lineplot" | "rack" | "device" | "task" | "policy" | "table";
|
|
125
|
+
key: string;
|
|
126
|
+
}, string>>]>>;
|
|
127
|
+
searchTerm: z.ZodOptional<z.ZodString>;
|
|
128
|
+
offset: z.ZodOptional<z.ZodNumber>;
|
|
129
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
|
130
|
+
}, z.core.$strip>]>;
|
|
131
|
+
export type RetrieveArgs = z.input<typeof retrieveArgsZ>;
|
|
132
|
+
export type SingleRetrieveArgs = z.input<typeof singleRetrieveArgsZ>;
|
|
133
|
+
export type MultiRetrieveArgs = z.input<typeof retrieveRequestZ>;
|
|
134
|
+
export declare class Client {
|
|
10
135
|
readonly type: string;
|
|
11
|
-
private readonly
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
retrieve(key: Key): Promise<Label>;
|
|
18
|
-
retrieve(keys: Key[]): Promise<Label[]>;
|
|
19
|
-
retrieveFor(id: ontology.CrudeID): Promise<Label[]>;
|
|
20
|
-
label(id: ontology.CrudeID, labels: Key[], opts?: SetOptions): Promise<void>;
|
|
21
|
-
removeLabels(id: ontology.CrudeID, labels: Key[]): Promise<void>;
|
|
22
|
-
page(offset: number, limit: number): Promise<Label[]>;
|
|
136
|
+
private readonly client;
|
|
137
|
+
constructor(client: UnaryClient);
|
|
138
|
+
retrieve(args: SingleRetrieveArgs): Promise<Label>;
|
|
139
|
+
retrieve(args: MultiRetrieveArgs): Promise<Label[]>;
|
|
140
|
+
label(id: ontology.ID, labels: Key[], opts?: SetOptions): Promise<void>;
|
|
141
|
+
remove(id: ontology.ID, labels: Key[]): Promise<void>;
|
|
23
142
|
create(label: New): Promise<Label>;
|
|
24
143
|
create(labels: New[]): Promise<Label[]>;
|
|
25
144
|
delete(key: Key): Promise<void>;
|
|
26
145
|
delete(keys: Key[]): Promise<void>;
|
|
27
|
-
openChangeTracker(): Promise<signals.Observable<string, Label>>;
|
|
28
|
-
trackLabelsOf(id: ontology.CrudeID): Promise<observe.ObservableAsyncCloseable<Label[]>>;
|
|
29
146
|
}
|
|
30
147
|
export declare const ontologyID: (key: Key) => ontology.ID;
|
|
148
|
+
export {};
|
|
31
149
|
//# sourceMappingURL=client.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/label/client.ts"],"names":[],"mappings":"AASA,OAAO,
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/label/client.ts"],"names":[],"mappings":"AASA,OAAO,EAAgB,KAAK,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAEvE,OAAO,CAAC,MAAM,KAAK,CAAC;AAEpB,OAAO,EAAE,KAAK,GAAG,EAAQ,KAAK,KAAK,EAAU,MAAM,iBAAiB,CAAC;AACrE,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAItC,eAAO,MAAM,gBAAgB,iBAAiB,CAAC;AAC/C,eAAO,MAAM,mBAAmB,oBAAoB,CAAC;AAErD,eAAO,MAAM,IAAI;;;;iBAA0C,CAAC;AAC5D,MAAM,WAAW,GAAI,SAAQ,CAAC,CAAC,KAAK,CAAC,OAAO,IAAI,CAAC;CAAG;AAKpD,QAAA,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAIX,CAAC;AAEH,UAAU,MAAO,SAAQ,CAAC,CAAC,KAAK,CAAC,OAAO,OAAO,CAAC;CAAG;AACnD,MAAM,WAAW,UAAW,SAAQ,IAAI,CAAC,MAAM,EAAE,SAAS,CAAC;CAAG;AAW9D,QAAA,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAMpB,CAAC;AAEH,QAAA,MAAM,mBAAmB;;;;;;GAEmB,CAAC;AAE7C,QAAA,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mBAAmD,CAAC;AAEvE,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;AACzD,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AACrE,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAIjE,qBAAa,MAAM;IACjB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAW;IAChC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAc;gBAEzB,MAAM,EAAE,WAAW;IAIzB,QAAQ,CAAC,IAAI,EAAE,kBAAkB,GAAG,OAAO,CAAC,KAAK,CAAC;IAClD,QAAQ,CAAC,IAAI,EAAE,iBAAiB,GAAG,OAAO,CAAC,KAAK,EAAE,CAAC;IAcnD,KAAK,CAAC,EAAE,EAAE,QAAQ,CAAC,EAAE,EAAE,MAAM,EAAE,GAAG,EAAE,EAAE,IAAI,GAAE,UAAe,GAAG,OAAO,CAAC,IAAI,CAAC;IAU3E,MAAM,CAAC,EAAE,EAAE,QAAQ,CAAC,EAAE,EAAE,MAAM,EAAE,GAAG,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;IAUrD,MAAM,CAAC,KAAK,EAAE,GAAG,GAAG,OAAO,CAAC,KAAK,CAAC;IAClC,MAAM,CAAC,MAAM,EAAE,GAAG,EAAE,GAAG,OAAO,CAAC,KAAK,EAAE,CAAC;IAavC,MAAM,CAAC,GAAG,EAAE,GAAG,GAAG,OAAO,CAAC,IAAI,CAAC;IAC/B,MAAM,CAAC,IAAI,EAAE,GAAG,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;CAUzC;AAED,eAAO,MAAM,UAAU,GAAI,KAAK,GAAG,KAAG,QAAQ,CAAC,EAA8B,CAAC"}
|
package/dist/label/external.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"external.d.ts","sourceRoot":"","sources":["../../src/label/external.ts"],"names":[],"mappings":"AASA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC
|
|
1
|
+
{"version":3,"file":"external.d.ts","sourceRoot":"","sources":["../../src/label/external.ts"],"names":[],"mappings":"AASA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC"}
|
package/dist/label/payload.d.ts
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
|
-
import { z } from 'zod
|
|
2
|
-
export declare const keyZ: z.
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const keyZ: z.ZodUUID;
|
|
3
3
|
export type Key = z.infer<typeof keyZ>;
|
|
4
4
|
export type Params = Key | Key[];
|
|
5
5
|
export declare const labelZ: z.ZodObject<{
|
|
6
|
-
key: z.
|
|
6
|
+
key: z.ZodUUID;
|
|
7
7
|
name: z.ZodString;
|
|
8
8
|
color: z.ZodString;
|
|
9
9
|
}, z.core.$strip>;
|
|
10
10
|
export interface Label extends z.infer<typeof labelZ> {
|
|
11
11
|
}
|
|
12
|
-
export declare const
|
|
13
|
-
export type OntologyType = typeof ONTOLOGY_TYPE;
|
|
12
|
+
export declare const LABELED_BY_ONTOLOGY_RELATIONSHIP_TYPE = "labeled_by";
|
|
14
13
|
//# sourceMappingURL=payload.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"payload.d.ts","sourceRoot":"","sources":["../../src/label/payload.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,CAAC,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"payload.d.ts","sourceRoot":"","sources":["../../src/label/payload.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,IAAI,WAAW,CAAC;AAC7B,MAAM,MAAM,GAAG,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,IAAI,CAAC,CAAC;AAEvC,MAAM,MAAM,MAAM,GAAG,GAAG,GAAG,GAAG,EAAE,CAAC;AAEjC,eAAO,MAAM,MAAM;;;;iBAIjB,CAAC;AACH,MAAM,WAAW,KAAM,SAAQ,CAAC,CAAC,KAAK,CAAC,OAAO,MAAM,CAAC;CAAG;AAExD,eAAO,MAAM,qCAAqC,eAAe,CAAC"}
|
|
@@ -1,232 +1,142 @@
|
|
|
1
1
|
import { UnaryClient } from '@synnaxlabs/freighter';
|
|
2
|
-
import {
|
|
3
|
-
import { AsyncTermSearcher } from '@synnaxlabs/x/search';
|
|
4
|
-
import { z } from 'zod/v4';
|
|
2
|
+
import { z } from 'zod';
|
|
5
3
|
import { framer } from '../framer';
|
|
6
4
|
import { group } from './group';
|
|
7
|
-
import {
|
|
5
|
+
import { ID, Resource } from './payload';
|
|
8
6
|
declare const retrieveReqZ: z.ZodObject<{
|
|
9
|
-
ids: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
7
|
+
ids: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodObject<{
|
|
10
8
|
type: z.ZodEnum<{
|
|
11
|
-
|
|
9
|
+
label: "label";
|
|
10
|
+
log: "log";
|
|
12
11
|
allow_all: "allow_all";
|
|
12
|
+
builtin: "builtin";
|
|
13
|
+
cluster: "cluster";
|
|
13
14
|
channel: "channel";
|
|
15
|
+
node: "node";
|
|
14
16
|
group: "group";
|
|
15
|
-
framer: "framer";
|
|
16
|
-
rack: "rack";
|
|
17
|
-
device: "device";
|
|
18
|
-
task: "task";
|
|
19
|
-
label: "label";
|
|
20
17
|
range: "range";
|
|
18
|
+
framer: "framer";
|
|
21
19
|
"range-alias": "range-alias";
|
|
22
20
|
user: "user";
|
|
23
|
-
lineplot: "lineplot";
|
|
24
|
-
log: "log";
|
|
25
21
|
workspace: "workspace";
|
|
26
22
|
schematic: "schematic";
|
|
23
|
+
lineplot: "lineplot";
|
|
24
|
+
rack: "rack";
|
|
25
|
+
device: "device";
|
|
26
|
+
task: "task";
|
|
27
|
+
policy: "policy";
|
|
27
28
|
table: "table";
|
|
28
|
-
builtin: "builtin";
|
|
29
|
-
cluster: "cluster";
|
|
30
|
-
node: "node";
|
|
31
29
|
}>;
|
|
32
30
|
key: z.ZodString;
|
|
33
|
-
}, z.core.$strip
|
|
31
|
+
}, z.core.$strip>, z.ZodPipe<z.ZodString, z.ZodTransform<{
|
|
32
|
+
type: "label" | "log" | "allow_all" | "builtin" | "cluster" | "channel" | "node" | "group" | "range" | "framer" | "range-alias" | "user" | "workspace" | "schematic" | "lineplot" | "rack" | "device" | "task" | "policy" | "table";
|
|
33
|
+
key: string;
|
|
34
|
+
}, string>>]>>>;
|
|
34
35
|
children: z.ZodOptional<z.ZodBoolean>;
|
|
35
36
|
parents: z.ZodOptional<z.ZodBoolean>;
|
|
36
|
-
includeSchema: z.ZodOptional<z.ZodBoolean>;
|
|
37
37
|
excludeFieldData: z.ZodOptional<z.ZodBoolean>;
|
|
38
|
-
|
|
38
|
+
searchTerm: z.ZodOptional<z.ZodString>;
|
|
39
39
|
limit: z.ZodOptional<z.ZodNumber>;
|
|
40
40
|
offset: z.ZodOptional<z.ZodNumber>;
|
|
41
41
|
types: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
42
|
-
|
|
42
|
+
label: "label";
|
|
43
|
+
log: "log";
|
|
43
44
|
allow_all: "allow_all";
|
|
45
|
+
builtin: "builtin";
|
|
46
|
+
cluster: "cluster";
|
|
44
47
|
channel: "channel";
|
|
48
|
+
node: "node";
|
|
45
49
|
group: "group";
|
|
46
|
-
framer: "framer";
|
|
47
|
-
rack: "rack";
|
|
48
|
-
device: "device";
|
|
49
|
-
task: "task";
|
|
50
|
-
label: "label";
|
|
51
50
|
range: "range";
|
|
51
|
+
framer: "framer";
|
|
52
52
|
"range-alias": "range-alias";
|
|
53
53
|
user: "user";
|
|
54
|
-
lineplot: "lineplot";
|
|
55
|
-
log: "log";
|
|
56
54
|
workspace: "workspace";
|
|
57
55
|
schematic: "schematic";
|
|
56
|
+
lineplot: "lineplot";
|
|
57
|
+
rack: "rack";
|
|
58
|
+
device: "device";
|
|
59
|
+
task: "task";
|
|
60
|
+
policy: "policy";
|
|
58
61
|
table: "table";
|
|
59
|
-
builtin: "builtin";
|
|
60
|
-
cluster: "cluster";
|
|
61
|
-
node: "node";
|
|
62
62
|
}>>>;
|
|
63
63
|
}, z.core.$strip>;
|
|
64
|
-
interface RetrieveRequest extends z.infer<typeof retrieveReqZ> {
|
|
64
|
+
export interface RetrieveRequest extends z.infer<typeof retrieveReqZ> {
|
|
65
65
|
}
|
|
66
|
-
export interface RetrieveOptions extends Pick<RetrieveRequest, "
|
|
66
|
+
export interface RetrieveOptions extends Pick<RetrieveRequest, "excludeFieldData" | "types" | "children" | "parents"> {
|
|
67
67
|
}
|
|
68
|
-
export declare const parseIDs: (ids: CrudeID | CrudeID[] | string | string[]) => IDPayload[];
|
|
69
68
|
/** The core client class for executing queries against a Synnax cluster ontology */
|
|
70
|
-
export declare class Client
|
|
69
|
+
export declare class Client {
|
|
71
70
|
readonly type: string;
|
|
72
71
|
groups: group.Client;
|
|
73
72
|
private readonly client;
|
|
74
73
|
private readonly writer;
|
|
75
74
|
private readonly framer;
|
|
76
75
|
constructor(unary: UnaryClient, framer: framer.Client);
|
|
77
|
-
/**
|
|
78
|
-
* Executes a fuzzy search on the ontology for resources with names/fields similar to the
|
|
79
|
-
* given term.
|
|
80
|
-
*
|
|
81
|
-
* @param term The search term.
|
|
82
|
-
* @param options Additional options for the search.
|
|
83
|
-
* @param options.includeSchema Whether to include the schema of the resources in the
|
|
84
|
-
* results.
|
|
85
|
-
* @param options.excludeFieldData Whether to exclude the field data of the resources in
|
|
86
|
-
* the results.
|
|
87
|
-
* @returns A list of resources that match the search term.
|
|
88
|
-
*/
|
|
89
|
-
search(term: string, options?: RetrieveOptions): Promise<Resource[]>;
|
|
90
76
|
/**
|
|
91
77
|
* Retrieves the resource in the ontology with the given ID.
|
|
92
78
|
* @param id - The ID of the resource to retrieve.
|
|
93
79
|
* @param options - Additional options for the retrieval.
|
|
94
|
-
* @param options.includeSchema - Whether to include the schema of the resource in the
|
|
95
|
-
* results.
|
|
96
80
|
* @param options.excludeFieldData - Whether to exclude the field data of the resource
|
|
97
81
|
* in the results.
|
|
98
82
|
* @returns The resource with the given ID.
|
|
99
83
|
* @throws {QueryError} If no resource is found with the given ID.
|
|
100
84
|
*/
|
|
101
|
-
retrieve(id:
|
|
85
|
+
retrieve(id: ID | string, options?: RetrieveOptions): Promise<Resource>;
|
|
102
86
|
/**
|
|
103
87
|
* Retrieves the resources in the ontology with the given IDs.
|
|
104
88
|
*
|
|
105
89
|
* @param ids - The IDs of the resources to retrieve.
|
|
106
90
|
* @param options - Additional options for the retrieval.
|
|
107
|
-
* @param options.includeSchema - Whether to include the schema of the resources in
|
|
108
|
-
* the results.
|
|
109
91
|
* @param options.excludeFieldData - Whether to exclude the field data of the
|
|
110
92
|
* resources in the results.
|
|
111
93
|
* @returns The resources with the given IDs.
|
|
112
94
|
* @throws {QueryError} If no resource is found with any of the given IDs.
|
|
113
95
|
*/
|
|
114
|
-
retrieve(ids:
|
|
115
|
-
|
|
116
|
-
* Retrieves resources from the ontology in a paginated manner.
|
|
117
|
-
*
|
|
118
|
-
* @param offset - The offset of the page (i.e. how many resources to skip before
|
|
119
|
-
* returning results).
|
|
120
|
-
* @param limit - The maximum number of resources to return.
|
|
121
|
-
* @param options - Additional options for the retrieval.
|
|
122
|
-
* @returns A list of resources in the ontology.
|
|
123
|
-
*/
|
|
124
|
-
page(offset: number, limit: number, options?: RetrieveOptions): Promise<Resource[]>;
|
|
96
|
+
retrieve(ids: ID[] | string[], options?: RetrieveOptions): Promise<Resource[]>;
|
|
97
|
+
retrieve(params: RetrieveRequest): Promise<Resource[]>;
|
|
125
98
|
/**
|
|
126
99
|
* Retrieves the children of the resources with the given IDs.
|
|
127
100
|
* @param ids - The IDs of the resources whose children to retrieve.
|
|
128
101
|
* @param options - Additional options for the retrieval.
|
|
129
|
-
* @param options.includeSchema - Whether to include the schema of the children in the
|
|
130
|
-
* results.
|
|
131
|
-
* @param options.excludeFieldData - Whether to exclude the field data of the children in
|
|
132
102
|
* the results.
|
|
133
103
|
* @returns The children of the resources with the given IDs.
|
|
134
104
|
*/
|
|
135
|
-
retrieveChildren(ids:
|
|
105
|
+
retrieveChildren(ids: ID | ID[], options?: RetrieveOptions): Promise<Resource[]>;
|
|
136
106
|
/**
|
|
137
107
|
* Retrieves the parents of the resources with the given IDs.
|
|
138
108
|
*
|
|
139
109
|
* @param ids - the IDs of the resources whose parents to retrieve
|
|
140
110
|
* @param options - additional options for the retrieval
|
|
141
|
-
* @param options.includeSchema - whether to include the schema of the parents in the
|
|
142
|
-
* results
|
|
143
111
|
* @param options.excludeFieldData - whether to exclude the field data of the parents
|
|
144
112
|
* in the results
|
|
145
113
|
* @returns the parents of the resources with the given IDs
|
|
146
114
|
*/
|
|
147
|
-
retrieveParents(ids:
|
|
115
|
+
retrieveParents(ids: ID | ID[], options?: RetrieveOptions): Promise<Resource[]>;
|
|
148
116
|
/**
|
|
149
117
|
* Adds children to a resource in the ontology.
|
|
150
118
|
* @param id - The ID of the resource to add children to.
|
|
151
119
|
* @param children - The IDs of the children to add.
|
|
152
120
|
*/
|
|
153
|
-
addChildren(id:
|
|
121
|
+
addChildren(id: ID, ...children: ID[]): Promise<void>;
|
|
154
122
|
/**
|
|
155
123
|
* Removes children from a resource in the ontology.
|
|
156
124
|
* @param id - The ID of the resource to remove children from.
|
|
157
125
|
* @param children - The IDs of the children to remove.
|
|
158
126
|
*/
|
|
159
|
-
removeChildren(id:
|
|
127
|
+
removeChildren(id: ID, ...children: ID[]): Promise<void>;
|
|
160
128
|
/**
|
|
161
129
|
* Moves children from one resource to another in the ontology.
|
|
162
130
|
* @param from - The ID of the resource to move children from.
|
|
163
131
|
* @param to - The ID of the resource to move children to.
|
|
164
132
|
* @param children - The IDs of the children to move.
|
|
165
133
|
*/
|
|
166
|
-
moveChildren(from:
|
|
167
|
-
/**
|
|
168
|
-
* Opens an observable that can be used to subscribe to changes in both the ontology's
|
|
169
|
-
* resources and relationships.
|
|
170
|
-
* @link ChangeTracker for more information.
|
|
171
|
-
* @returns An observable that emits changes to the ontology's resources and relationships.
|
|
172
|
-
*/
|
|
173
|
-
openChangeTracker(): Promise<ChangeTracker>;
|
|
174
|
-
openDependentTracker(props: DependentTrackerProps): Promise<observe.ObservableAsyncCloseable<Resource[]>>;
|
|
175
|
-
newSearcherWithOptions(options: RetrieveOptions): AsyncTermSearcher<string, string, Resource>;
|
|
134
|
+
moveChildren(from: ID, to: ID, ...children: ID[]): Promise<void>;
|
|
176
135
|
private execRetrieve;
|
|
177
136
|
}
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
export declare
|
|
182
|
-
/**
|
|
183
|
-
* An observable that emits changes to the ontology's relationships.
|
|
184
|
-
*/
|
|
185
|
-
readonly relationships: observe.Observable<RelationshipChange[]>;
|
|
186
|
-
/**
|
|
187
|
-
* An observable that emits changes to the ontology's resources.
|
|
188
|
-
*/
|
|
189
|
-
readonly resources: observe.Observable<ResourceChange[]>;
|
|
190
|
-
private readonly resourceObs;
|
|
191
|
-
private readonly relationshipObs;
|
|
192
|
-
private readonly streamer;
|
|
193
|
-
private readonly client;
|
|
194
|
-
private readonly closePromise;
|
|
195
|
-
constructor(streamer: framer.Streamer, client: Client);
|
|
196
|
-
close(): Promise<void>;
|
|
197
|
-
private start;
|
|
198
|
-
private update;
|
|
199
|
-
private parseRelationshipSets;
|
|
200
|
-
private parseRelationshipDeletes;
|
|
201
|
-
private parseResourceSets;
|
|
202
|
-
private parseResourceDeletes;
|
|
203
|
-
static open(client: framer.Client, retriever: Client): Promise<ChangeTracker>;
|
|
204
|
-
}
|
|
205
|
-
interface DependentTrackerProps {
|
|
206
|
-
target: ID;
|
|
207
|
-
dependents: Resource[];
|
|
208
|
-
relationshipType?: string;
|
|
209
|
-
relationshipDirection?: RelationshipDirection;
|
|
210
|
-
resourceType?: string;
|
|
211
|
-
}
|
|
212
|
-
/**
|
|
213
|
-
* A class that tracks a resource (called the 'target' resource) and related resources
|
|
214
|
-
* (called 'dependents') of a particular type (called the 'type') in a Synnax cluster
|
|
215
|
-
* ontology.
|
|
216
|
-
*/
|
|
217
|
-
export declare class DependentTracker extends observe.Observer<Resource[]> implements observe.ObservableAsyncCloseable<Resource[]> {
|
|
218
|
-
private readonly internal;
|
|
219
|
-
private readonly target;
|
|
220
|
-
private readonly relDir;
|
|
221
|
-
private readonly resourceType?;
|
|
222
|
-
private dependents;
|
|
223
|
-
private readonly client;
|
|
224
|
-
private readonly relType;
|
|
225
|
-
private constructor();
|
|
226
|
-
static open(props: DependentTrackerProps, framer: framer.Client, client: Client): Promise<DependentTracker>;
|
|
227
|
-
private handleResourceChange;
|
|
228
|
-
private handleRelationshipChange;
|
|
229
|
-
close(): Promise<void>;
|
|
230
|
-
}
|
|
137
|
+
export declare const RESOURCE_SET_CHANNEL_NAME = "sy_ontology_resource_set";
|
|
138
|
+
export declare const RESOURCE_DELETE_CHANNEL_NAME = "sy_ontology_resource_delete";
|
|
139
|
+
export declare const RELATIONSHIP_SET_CHANNEL_NAME = "sy_ontology_relationship_set";
|
|
140
|
+
export declare const RELATIONSHIP_DELETE_CHANNEL_NAME = "sy_ontology_relationship_delete";
|
|
231
141
|
export {};
|
|
232
142
|
//# sourceMappingURL=client.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/ontology/client.ts"],"names":[],"mappings":"AASA,OAAO,EAAgB,KAAK,WAAW,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/ontology/client.ts"],"names":[],"mappings":"AASA,OAAO,EAAgB,KAAK,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAEvE,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,UAAU,CAAC;AACvC,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AACzC,OAAO,EACL,KAAK,EAAE,EAIP,KAAK,QAAQ,EAGd,MAAM,oBAAoB,CAAC;AAK5B,QAAA,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAShB,CAAC;AACH,MAAM,WAAW,eAAgB,SAAQ,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC;CAAG;AAExE,MAAM,WAAW,eACf,SAAQ,IAAI,CACV,eAAe,EACf,kBAAkB,GAAG,OAAO,GAAG,UAAU,GAAG,SAAS,CACtD;CAAG;AAIN,oFAAoF;AACpF,qBAAa,MAAM;IACjB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAc;IACnC,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC;IACrB,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAc;IACrC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAS;IAChC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAgB;gBAE3B,KAAK,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM;IAOrD;;;;;;;;OAQG;IACG,QAAQ,CAAC,EAAE,EAAE,EAAE,GAAG,MAAM,EAAE,OAAO,CAAC,EAAE,eAAe,GAAG,OAAO,CAAC,QAAQ,CAAC;IAE7E;;;;;;;;;OASG;IACG,QAAQ,CAAC,GAAG,EAAE,EAAE,EAAE,GAAG,MAAM,EAAE,EAAE,OAAO,CAAC,EAAE,eAAe,GAAG,OAAO,CAAC,QAAQ,EAAE,CAAC;IAE9E,QAAQ,CAAC,MAAM,EAAE,eAAe,GAAG,OAAO,CAAC,QAAQ,EAAE,CAAC;IAoB5D;;;;;;OAMG;IACG,gBAAgB,CACpB,GAAG,EAAE,EAAE,GAAG,EAAE,EAAE,EACd,OAAO,CAAC,EAAE,eAAe,GACxB,OAAO,CAAC,QAAQ,EAAE,CAAC;IAQtB;;;;;;;;OAQG;IACG,eAAe,CACnB,GAAG,EAAE,EAAE,GAAG,EAAE,EAAE,EACd,OAAO,CAAC,EAAE,eAAe,GACxB,OAAO,CAAC,QAAQ,EAAE,CAAC;IAQtB;;;;OAIG;IACG,WAAW,CAAC,EAAE,EAAE,EAAE,EAAE,GAAG,QAAQ,EAAE,EAAE,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;IAI3D;;;;OAIG;IACG,cAAc,CAAC,EAAE,EAAE,EAAE,EAAE,GAAG,QAAQ,EAAE,EAAE,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;IAI9D;;;;;OAKG;IACG,YAAY,CAAC,IAAI,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,GAAG,QAAQ,EAAE,EAAE,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;YAIxD,YAAY;CAU3B;AAED,eAAO,MAAM,yBAAyB,6BAA6B,CAAC;AACpE,eAAO,MAAM,4BAA4B,gCAAgC,CAAC;AAC1E,eAAO,MAAM,6BAA6B,iCAAiC,CAAC;AAC5E,eAAO,MAAM,gCAAgC,oCAAoC,CAAC"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
+
import { ontology } from '..';
|
|
1
2
|
import { Key, Name } from './payload';
|
|
2
|
-
import { ID as OntologyID } from '../payload';
|
|
3
3
|
export declare class Group {
|
|
4
4
|
key: Key;
|
|
5
5
|
name: Name;
|
|
6
6
|
constructor(name: Name, key: Key);
|
|
7
|
-
get ontologyID():
|
|
7
|
+
get ontologyID(): ontology.ID;
|
|
8
8
|
}
|
|
9
|
-
export declare const ontologyID: (key: Key) =>
|
|
9
|
+
export declare const ontologyID: (key: Key) => ontology.ID;
|
|
10
10
|
//# sourceMappingURL=group.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"group.d.ts","sourceRoot":"","sources":["../../../src/ontology/group/group.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,KAAK,
|
|
1
|
+
{"version":3,"file":"group.d.ts","sourceRoot":"","sources":["../../../src/ontology/group/group.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,YAAY,CAAC;AAC3C,OAAO,EAAE,KAAK,GAAG,EAAE,KAAK,IAAI,EAAE,MAAM,0BAA0B,CAAC;AAE/D,qBAAa,KAAK;IAChB,GAAG,EAAE,GAAG,CAAC;IACT,IAAI,EAAE,IAAI,CAAC;gBAEC,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG;IAKhC,IAAI,UAAU,IAAI,QAAQ,CAAC,EAAE,CAE5B;CACF;AAED,eAAO,MAAM,UAAU,GAAI,KAAK,GAAG,KAAG,QAAQ,CAAC,EAA8B,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { z } from 'zod
|
|
2
|
-
export declare const keyZ: z.
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const keyZ: z.ZodUUID;
|
|
3
3
|
export type Key = z.infer<typeof keyZ>;
|
|
4
4
|
export declare const nameZ: z.ZodString;
|
|
5
5
|
export type Name = z.infer<typeof nameZ>;
|
|
@@ -7,33 +7,9 @@ export type Keys = Key[];
|
|
|
7
7
|
export type Names = Name[];
|
|
8
8
|
export type Params = Key | Name | Keys | Names;
|
|
9
9
|
export declare const groupZ: z.ZodObject<{
|
|
10
|
-
key: z.
|
|
10
|
+
key: z.ZodUUID;
|
|
11
11
|
name: z.ZodString;
|
|
12
12
|
}, z.core.$strip>;
|
|
13
13
|
export interface Payload extends z.infer<typeof groupZ> {
|
|
14
14
|
}
|
|
15
|
-
export type ParamAnalysisResult = {
|
|
16
|
-
single: true;
|
|
17
|
-
variant: "keys";
|
|
18
|
-
normalized: Keys;
|
|
19
|
-
actual: Key;
|
|
20
|
-
} | {
|
|
21
|
-
single: true;
|
|
22
|
-
variant: "names";
|
|
23
|
-
normalized: Names;
|
|
24
|
-
actual: Name;
|
|
25
|
-
} | {
|
|
26
|
-
single: false;
|
|
27
|
-
variant: "keys";
|
|
28
|
-
normalized: Keys;
|
|
29
|
-
actual: Keys;
|
|
30
|
-
} | {
|
|
31
|
-
single: false;
|
|
32
|
-
variant: "names";
|
|
33
|
-
normalized: Names;
|
|
34
|
-
actual: Names;
|
|
35
|
-
};
|
|
36
|
-
export declare const analyzeParams: (groups: Params) => ParamAnalysisResult;
|
|
37
|
-
export declare const ONTOLOGY_TYPE = "group";
|
|
38
|
-
export type OntologyType = typeof ONTOLOGY_TYPE;
|
|
39
15
|
//# sourceMappingURL=payload.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"payload.d.ts","sourceRoot":"","sources":["../../../src/ontology/group/payload.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"payload.d.ts","sourceRoot":"","sources":["../../../src/ontology/group/payload.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,IAAI,WAAW,CAAC;AAC7B,MAAM,MAAM,GAAG,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,IAAI,CAAC,CAAC;AACvC,eAAO,MAAM,KAAK,aAAa,CAAC;AAChC,MAAM,MAAM,IAAI,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,KAAK,CAAC,CAAC;AACzC,MAAM,MAAM,IAAI,GAAG,GAAG,EAAE,CAAC;AACzB,MAAM,MAAM,KAAK,GAAG,IAAI,EAAE,CAAC;AAC3B,MAAM,MAAM,MAAM,GAAG,GAAG,GAAG,IAAI,GAAG,IAAI,GAAG,KAAK,CAAC;AAC/C,eAAO,MAAM,MAAM;;;iBAAuC,CAAC;AAC3D,MAAM,WAAW,OAAQ,SAAQ,CAAC,CAAC,KAAK,CAAC,OAAO,MAAM,CAAC;CAAG"}
|