@synnaxlabs/client 0.43.1 → 0.44.2

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 (245) hide show
  1. package/.turbo/turbo-build.log +7 -7
  2. package/dist/access/payload.d.ts +1 -1
  3. package/dist/access/payload.d.ts.map +1 -1
  4. package/dist/access/policy/client.d.ts +263 -6
  5. package/dist/access/policy/client.d.ts.map +1 -1
  6. package/dist/access/policy/external.d.ts +0 -1
  7. package/dist/access/policy/external.d.ts.map +1 -1
  8. package/dist/access/policy/payload.d.ts +105 -93
  9. package/dist/access/policy/payload.d.ts.map +1 -1
  10. package/dist/auth/auth.d.ts +1 -1
  11. package/dist/auth/auth.d.ts.map +1 -1
  12. package/dist/channel/client.d.ts +23 -17
  13. package/dist/channel/client.d.ts.map +1 -1
  14. package/dist/channel/payload.d.ts +151 -21
  15. package/dist/channel/payload.d.ts.map +1 -1
  16. package/dist/channel/retriever.d.ts +9 -16
  17. package/dist/channel/retriever.d.ts.map +1 -1
  18. package/dist/channel/writer.d.ts +1 -1
  19. package/dist/channel/writer.d.ts.map +1 -1
  20. package/dist/client.cjs +27 -135
  21. package/dist/client.d.ts +3 -3
  22. package/dist/client.d.ts.map +1 -1
  23. package/dist/client.js +8657 -28963
  24. package/dist/connection/checker.d.ts +1 -1
  25. package/dist/connection/checker.d.ts.map +1 -1
  26. package/dist/control/client.d.ts +1 -0
  27. package/dist/control/client.d.ts.map +1 -1
  28. package/dist/control/state.d.ts +6 -6
  29. package/dist/control/state.d.ts.map +1 -1
  30. package/dist/errors.d.ts +18 -5
  31. package/dist/errors.d.ts.map +1 -1
  32. package/dist/framer/adapter.d.ts +3 -3
  33. package/dist/framer/adapter.d.ts.map +1 -1
  34. package/dist/framer/client.d.ts +4 -13
  35. package/dist/framer/client.d.ts.map +1 -1
  36. package/dist/framer/codec.d.ts +1 -1
  37. package/dist/framer/codec.d.ts.map +1 -1
  38. package/dist/framer/deleter.d.ts +5 -5
  39. package/dist/framer/deleter.d.ts.map +1 -1
  40. package/dist/framer/frame.d.ts +5 -7
  41. package/dist/framer/frame.d.ts.map +1 -1
  42. package/dist/framer/streamProxy.d.ts +1 -1
  43. package/dist/framer/streamProxy.d.ts.map +1 -1
  44. package/dist/framer/streamer.d.ts +235 -20
  45. package/dist/framer/streamer.d.ts.map +1 -1
  46. package/dist/framer/writer.d.ts +302 -33
  47. package/dist/framer/writer.d.ts.map +1 -1
  48. package/dist/hardware/device/client.d.ts +49 -28
  49. package/dist/hardware/device/client.d.ts.map +1 -1
  50. package/dist/hardware/device/payload.d.ts +126 -46
  51. package/dist/hardware/device/payload.d.ts.map +1 -1
  52. package/dist/hardware/rack/client.d.ts +78 -22
  53. package/dist/hardware/rack/client.d.ts.map +1 -1
  54. package/dist/hardware/rack/payload.d.ts +99 -56
  55. package/dist/hardware/rack/payload.d.ts.map +1 -1
  56. package/dist/hardware/task/client.d.ts +100 -41
  57. package/dist/hardware/task/client.d.ts.map +1 -1
  58. package/dist/hardware/task/payload.d.ts +83 -61
  59. package/dist/hardware/task/payload.d.ts.map +1 -1
  60. package/dist/index.d.ts +2 -2
  61. package/dist/index.d.ts.map +1 -1
  62. package/dist/label/client.d.ts +138 -20
  63. package/dist/label/client.d.ts.map +1 -1
  64. package/dist/label/external.d.ts +0 -2
  65. package/dist/label/external.d.ts.map +1 -1
  66. package/dist/label/payload.d.ts +4 -5
  67. package/dist/label/payload.d.ts.map +1 -1
  68. package/dist/ontology/client.d.ts +45 -135
  69. package/dist/ontology/client.d.ts.map +1 -1
  70. package/dist/ontology/group/group.d.ts +3 -3
  71. package/dist/ontology/group/group.d.ts.map +1 -1
  72. package/dist/ontology/group/payload.d.ts +3 -27
  73. package/dist/ontology/group/payload.d.ts.map +1 -1
  74. package/dist/ontology/payload.d.ts +114 -243
  75. package/dist/ontology/payload.d.ts.map +1 -1
  76. package/dist/ontology/writer.d.ts +4 -4
  77. package/dist/ontology/writer.d.ts.map +1 -1
  78. package/dist/ranger/alias.d.ts +15 -5
  79. package/dist/ranger/alias.d.ts.map +1 -1
  80. package/dist/ranger/client.d.ts +91 -30
  81. package/dist/ranger/client.d.ts.map +1 -1
  82. package/dist/ranger/external.d.ts +1 -1
  83. package/dist/ranger/external.d.ts.map +1 -1
  84. package/dist/ranger/kv.d.ts +11 -12
  85. package/dist/ranger/kv.d.ts.map +1 -1
  86. package/dist/ranger/payload.d.ts +19 -44
  87. package/dist/ranger/payload.d.ts.map +1 -1
  88. package/dist/ranger/writer.d.ts +22 -19
  89. package/dist/ranger/writer.d.ts.map +1 -1
  90. package/dist/testutil/client.d.ts +4 -0
  91. package/dist/testutil/client.d.ts.map +1 -0
  92. package/dist/user/client.d.ts +59 -6
  93. package/dist/user/client.d.ts.map +1 -1
  94. package/dist/user/payload.d.ts +4 -6
  95. package/dist/user/payload.d.ts.map +1 -1
  96. package/dist/user/retriever.d.ts +2 -2
  97. package/dist/user/retriever.d.ts.map +1 -1
  98. package/dist/util/decodeJSONString.d.ts +2 -2
  99. package/dist/util/decodeJSONString.d.ts.map +1 -1
  100. package/dist/util/parseWithoutKeyConversion.d.ts +2 -2
  101. package/dist/util/parseWithoutKeyConversion.d.ts.map +1 -1
  102. package/dist/util/retrieve.d.ts +1 -1
  103. package/dist/util/retrieve.d.ts.map +1 -1
  104. package/dist/util/zod.d.ts +1 -1
  105. package/dist/util/zod.d.ts.map +1 -1
  106. package/dist/workspace/client.d.ts +17 -6
  107. package/dist/workspace/client.d.ts.map +1 -1
  108. package/dist/workspace/lineplot/client.d.ts +2 -2
  109. package/dist/workspace/lineplot/client.d.ts.map +1 -1
  110. package/dist/workspace/lineplot/payload.d.ts +8 -9
  111. package/dist/workspace/lineplot/payload.d.ts.map +1 -1
  112. package/dist/workspace/log/client.d.ts +2 -2
  113. package/dist/workspace/log/client.d.ts.map +1 -1
  114. package/dist/workspace/log/payload.d.ts +8 -9
  115. package/dist/workspace/log/payload.d.ts.map +1 -1
  116. package/dist/workspace/payload.d.ts +10 -11
  117. package/dist/workspace/payload.d.ts.map +1 -1
  118. package/dist/workspace/schematic/client.d.ts +2 -2
  119. package/dist/workspace/schematic/client.d.ts.map +1 -1
  120. package/dist/workspace/schematic/payload.d.ts +10 -11
  121. package/dist/workspace/schematic/payload.d.ts.map +1 -1
  122. package/dist/workspace/table/client.d.ts +2 -2
  123. package/dist/workspace/table/client.d.ts.map +1 -1
  124. package/dist/workspace/table/payload.d.ts +10 -11
  125. package/dist/workspace/table/payload.d.ts.map +1 -1
  126. package/examples/node/package-lock.json +47 -39
  127. package/examples/node/package.json +2 -1
  128. package/examples/node/streamWrite.js +5 -11
  129. package/package.json +14 -13
  130. package/src/access/payload.ts +1 -1
  131. package/src/access/policy/client.ts +87 -32
  132. package/src/access/policy/external.ts +0 -1
  133. package/src/access/policy/payload.ts +4 -4
  134. package/src/access/policy/policy.spec.ts +86 -83
  135. package/src/auth/auth.spec.ts +29 -18
  136. package/src/auth/auth.ts +1 -1
  137. package/src/channel/batchRetriever.spec.ts +4 -9
  138. package/src/channel/channel.spec.ts +24 -6
  139. package/src/channel/client.ts +52 -51
  140. package/src/channel/payload.ts +15 -16
  141. package/src/channel/retriever.ts +26 -41
  142. package/src/channel/writer.ts +7 -4
  143. package/src/client.ts +4 -4
  144. package/src/connection/checker.ts +1 -1
  145. package/src/connection/connection.spec.ts +31 -23
  146. package/src/control/client.ts +2 -2
  147. package/src/control/state.spec.ts +3 -3
  148. package/src/control/state.ts +1 -1
  149. package/src/errors.spec.ts +9 -5
  150. package/src/errors.ts +28 -15
  151. package/src/framer/adapter.spec.ts +118 -9
  152. package/src/framer/adapter.ts +24 -11
  153. package/src/framer/client.spec.ts +125 -2
  154. package/src/framer/client.ts +41 -47
  155. package/src/framer/codec.ts +1 -1
  156. package/src/framer/deleter.spec.ts +2 -2
  157. package/src/framer/deleter.ts +1 -1
  158. package/src/framer/frame.ts +1 -4
  159. package/src/framer/iterator.spec.ts +8 -8
  160. package/src/framer/iterator.ts +1 -1
  161. package/src/framer/streamProxy.ts +1 -1
  162. package/src/framer/streamer.spec.ts +185 -36
  163. package/src/framer/streamer.ts +28 -36
  164. package/src/framer/writer.spec.ts +7 -6
  165. package/src/framer/writer.ts +97 -111
  166. package/src/hardware/device/client.ts +45 -131
  167. package/src/hardware/device/device.spec.ts +163 -52
  168. package/src/hardware/device/payload.ts +10 -21
  169. package/src/hardware/rack/client.ts +87 -105
  170. package/src/hardware/rack/payload.ts +4 -13
  171. package/src/hardware/rack/rack.spec.ts +28 -35
  172. package/src/hardware/task/client.ts +335 -291
  173. package/src/hardware/task/payload.ts +86 -62
  174. package/src/hardware/task/task.spec.ts +208 -32
  175. package/src/index.ts +2 -1
  176. package/src/label/client.ts +100 -95
  177. package/src/label/external.ts +0 -2
  178. package/src/label/label.spec.ts +8 -6
  179. package/src/label/payload.ts +3 -4
  180. package/src/ontology/client.ts +41 -324
  181. package/src/ontology/group/group.spec.ts +2 -2
  182. package/src/ontology/group/group.ts +4 -5
  183. package/src/ontology/group/payload.ts +2 -25
  184. package/src/ontology/group/writer.ts +1 -1
  185. package/src/ontology/ontology.spec.ts +355 -41
  186. package/src/ontology/payload.ts +77 -112
  187. package/src/ontology/writer.ts +8 -17
  188. package/src/ranger/alias.ts +45 -37
  189. package/src/ranger/client.ts +144 -149
  190. package/src/ranger/external.ts +1 -1
  191. package/src/ranger/kv.ts +9 -27
  192. package/src/ranger/payload.ts +23 -37
  193. package/src/ranger/ranger.spec.ts +37 -56
  194. package/src/ranger/writer.ts +1 -1
  195. package/src/{signals/index.ts → testutil/client.ts} +11 -1
  196. package/src/user/client.ts +122 -47
  197. package/src/user/payload.ts +2 -5
  198. package/src/user/retriever.ts +1 -1
  199. package/src/user/user.spec.ts +31 -31
  200. package/src/user/writer.ts +1 -1
  201. package/src/util/decodeJSONString.ts +3 -3
  202. package/src/util/parseWithoutKeyConversion.ts +2 -2
  203. package/src/util/retrieve.ts +1 -1
  204. package/src/util/zod.ts +1 -1
  205. package/src/workspace/client.ts +20 -36
  206. package/src/workspace/lineplot/client.ts +5 -7
  207. package/src/workspace/lineplot/lineplot.spec.ts +2 -2
  208. package/src/workspace/lineplot/payload.ts +4 -7
  209. package/src/workspace/log/client.ts +5 -7
  210. package/src/workspace/log/log.spec.ts +2 -2
  211. package/src/workspace/log/payload.ts +4 -7
  212. package/src/workspace/payload.ts +4 -7
  213. package/src/workspace/schematic/client.ts +5 -7
  214. package/src/workspace/schematic/payload.ts +4 -7
  215. package/src/workspace/schematic/schematic.spec.ts +2 -2
  216. package/src/workspace/table/client.ts +5 -7
  217. package/src/workspace/table/payload.ts +4 -7
  218. package/src/workspace/table/table.spec.ts +2 -2
  219. package/src/workspace/workspace.spec.ts +2 -2
  220. package/dist/access/policy/ontology.d.ts +0 -5
  221. package/dist/access/policy/ontology.d.ts.map +0 -1
  222. package/dist/access/policy/retriever.d.ts +0 -40
  223. package/dist/access/policy/retriever.d.ts.map +0 -1
  224. package/dist/access/policy/writer.d.ts +0 -9
  225. package/dist/access/policy/writer.d.ts.map +0 -1
  226. package/dist/label/retriever.d.ts +0 -14
  227. package/dist/label/retriever.d.ts.map +0 -1
  228. package/dist/label/writer.d.ts +0 -54
  229. package/dist/label/writer.d.ts.map +0 -1
  230. package/dist/setupspecs.d.ts +0 -5
  231. package/dist/setupspecs.d.ts.map +0 -1
  232. package/dist/signals/external.d.ts +0 -2
  233. package/dist/signals/external.d.ts.map +0 -1
  234. package/dist/signals/index.d.ts +0 -2
  235. package/dist/signals/index.d.ts.map +0 -1
  236. package/dist/signals/observable.d.ts +0 -12
  237. package/dist/signals/observable.d.ts.map +0 -1
  238. package/src/access/policy/ontology.ts +0 -17
  239. package/src/access/policy/retriever.ts +0 -44
  240. package/src/access/policy/writer.ts +0 -65
  241. package/src/label/retriever.ts +0 -63
  242. package/src/label/writer.ts +0 -95
  243. package/src/setupspecs.ts +0 -27
  244. package/src/signals/external.ts +0 -10
  245. package/src/signals/observable.ts +0 -42
@@ -1,31 +1,149 @@
1
1
  import { UnaryClient } from '@synnaxlabs/freighter';
2
- import { observe } from '@synnaxlabs/x';
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
- import { signals } from '../signals';
9
- export declare class Client implements AsyncTermSearcher<string, Key, Label> {
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 retriever;
12
- private readonly writer;
13
- private readonly frameClient;
14
- private readonly ontology;
15
- constructor(client: UnaryClient, frameClient: framer.Client, ontology: ontology.Client);
16
- search(term: string): Promise<Label[]>;
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,EAAE,KAAK,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AACxC,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAE9D,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,UAAU,CAAC;AACvC,OAAO,EAAE,KAAK,GAAG,EAAE,KAAK,KAAK,EAAyB,MAAM,iBAAiB,CAAC;AAE9E,OAAO,EAAE,KAAK,GAAG,EAAE,KAAK,UAAU,EAAU,MAAM,gBAAgB,CAAC;AACnE,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAKpC,qBAAa,MAAO,YAAW,iBAAiB,CAAC,MAAM,EAAE,GAAG,EAAE,KAAK,CAAC;IAClE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAW;IAChC,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAY;IACtC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAS;IAChC,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAgB;IAC5C,OAAO,CAAC,QAAQ,CAAC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AC,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"}
@@ -1,5 +1,3 @@
1
1
  export * from './client';
2
2
  export * from './payload';
3
- export * from './retriever';
4
- export * from './writer';
5
3
  //# sourceMappingURL=external.d.ts.map
@@ -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;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,gBAAgB,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"}
@@ -1,14 +1,13 @@
1
- import { z } from 'zod/v4';
2
- export declare const keyZ: z.ZodString;
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.ZodString;
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 ONTOLOGY_TYPE = "label";
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,QAAQ,CAAC;AAE3B,eAAO,MAAM,IAAI,aAAoB,CAAC;AACtC,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,aAAa,UAAU,CAAC;AACrC,MAAM,MAAM,YAAY,GAAG,OAAO,aAAa,CAAC"}
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 { observe } from '@synnaxlabs/x';
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 { CrudeID, ID, IDPayload, RelationshipChange, RelationshipDirection, Resource, ResourceChange } from './payload';
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
- policy: "policy";
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
- term: z.ZodOptional<z.ZodString>;
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
- policy: "policy";
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, "includeSchema" | "excludeFieldData" | "types"> {
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 implements AsyncTermSearcher<string, string, Resource> {
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: CrudeID, options?: RetrieveOptions): Promise<Resource>;
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: CrudeID[], options?: RetrieveOptions): Promise<Resource[]>;
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: CrudeID | CrudeID[], options?: RetrieveOptions): Promise<Resource[]>;
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: CrudeID | CrudeID[], options?: RetrieveOptions): Promise<Resource[]>;
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: CrudeID, ...children: CrudeID[]): Promise<void>;
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: CrudeID, ...children: CrudeID[]): Promise<void>;
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: CrudeID, to: CrudeID, ...children: CrudeID[]): Promise<void>;
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
- * A class that tracks changes to the ontology's resources and relationships.
180
- */
181
- export declare class ChangeTracker {
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;AACvE,OAAO,EAAS,OAAO,EAAW,MAAM,eAAe,CAAC;AACxD,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAC9D,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAC;AAG3B,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,UAAU,CAAC;AACvC,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AACzC,OAAO,EACL,KAAK,OAAO,EACZ,EAAE,EACF,KAAK,SAAS,EAGd,KAAK,kBAAkB,EACvB,KAAK,qBAAqB,EAC1B,KAAK,QAAQ,EACb,KAAK,cAAc,EAGpB,MAAM,oBAAoB,CAAC;AAK5B,QAAA,MAAM,YAAY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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(): OntologyID;
7
+ get ontologyID(): ontology.ID;
8
8
  }
9
- export declare const ontologyID: (key: Key) => OntologyID;
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,GAAG,EAAE,KAAK,IAAI,EAAiB,MAAM,0BAA0B,CAAC;AAC9E,OAAO,EAAE,EAAE,IAAI,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAEtD,qBAAa,KAAK;IAChB,GAAG,EAAE,GAAG,CAAC;IACT,IAAI,EAAE,IAAI,CAAC;gBAEC,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG;IAKhC,IAAI,UAAU,IAAI,UAAU,CAE3B;CACF;AAED,eAAO,MAAM,UAAU,GAAI,KAAK,GAAG,KAAG,UACQ,CAAC"}
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/v4';
2
- export declare const keyZ: z.ZodString;
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.ZodString;
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":"AAUA,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAC;AAE3B,eAAO,MAAM,IAAI,aAAoB,CAAC;AACtC,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,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