@synnaxlabs/client 0.44.1 → 0.44.3

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 (73) hide show
  1. package/.turbo/turbo-build.log +5 -5
  2. package/dist/channel/client.d.ts +11 -4
  3. package/dist/channel/client.d.ts.map +1 -1
  4. package/dist/channel/payload.d.ts +86 -14
  5. package/dist/channel/payload.d.ts.map +1 -1
  6. package/dist/channel/writer.d.ts.map +1 -1
  7. package/dist/client.cjs +24 -24
  8. package/dist/client.d.ts +2 -2
  9. package/dist/client.js +2953 -2600
  10. package/dist/framer/streamer.d.ts +98 -2
  11. package/dist/framer/streamer.d.ts.map +1 -1
  12. package/dist/framer/writer.d.ts +87 -7
  13. package/dist/framer/writer.d.ts.map +1 -1
  14. package/dist/hardware/device/payload.d.ts +4 -4
  15. package/dist/hardware/rack/payload.d.ts +4 -4
  16. package/dist/hardware/task/client.d.ts +7 -0
  17. package/dist/hardware/task/client.d.ts.map +1 -1
  18. package/dist/index.d.ts +1 -1
  19. package/dist/index.d.ts.map +1 -1
  20. package/dist/ontology/payload.d.ts +1 -0
  21. package/dist/ontology/payload.d.ts.map +1 -1
  22. package/dist/ranger/alias.d.ts +5 -1
  23. package/dist/ranger/alias.d.ts.map +1 -1
  24. package/dist/ranger/client.d.ts +5 -1
  25. package/dist/ranger/client.d.ts.map +1 -1
  26. package/dist/ranger/external.d.ts +1 -1
  27. package/dist/ranger/external.d.ts.map +1 -1
  28. package/dist/ranger/kv.d.ts +1 -0
  29. package/dist/ranger/kv.d.ts.map +1 -1
  30. package/dist/ranger/payload.d.ts +3 -7
  31. package/dist/ranger/payload.d.ts.map +1 -1
  32. package/dist/ranger/writer.d.ts +1 -1
  33. package/dist/testutil/client.d.ts +1 -1
  34. package/dist/testutil/client.d.ts.map +1 -1
  35. package/dist/workspace/payload.d.ts +1 -1
  36. package/package.json +3 -3
  37. package/src/access/policy/policy.spec.ts +3 -3
  38. package/src/channel/channel.spec.ts +2 -2
  39. package/src/channel/client.ts +21 -5
  40. package/src/channel/payload.ts +4 -4
  41. package/src/channel/writer.ts +4 -1
  42. package/src/control/state.spec.ts +2 -2
  43. package/src/errors.spec.ts +2 -2
  44. package/src/framer/adapter.spec.ts +2 -2
  45. package/src/framer/client.spec.ts +2 -2
  46. package/src/framer/deleter.spec.ts +2 -2
  47. package/src/framer/iterator.spec.ts +2 -2
  48. package/src/framer/streamer.spec.ts +3 -3
  49. package/src/framer/streamer.ts +4 -3
  50. package/src/framer/writer.spec.ts +3 -2
  51. package/src/framer/writer.ts +26 -16
  52. package/src/hardware/device/device.spec.ts +2 -2
  53. package/src/hardware/rack/rack.spec.ts +2 -2
  54. package/src/hardware/task/client.ts +93 -20
  55. package/src/hardware/task/task.spec.ts +2 -2
  56. package/src/index.ts +1 -1
  57. package/src/label/label.spec.ts +2 -2
  58. package/src/ontology/group/group.spec.ts +2 -2
  59. package/src/ontology/ontology.spec.ts +2 -2
  60. package/src/ontology/payload.ts +3 -0
  61. package/src/ranger/alias.ts +27 -1
  62. package/src/ranger/client.ts +30 -3
  63. package/src/ranger/external.ts +1 -9
  64. package/src/ranger/kv.ts +3 -0
  65. package/src/ranger/payload.ts +4 -2
  66. package/src/ranger/ranger.spec.ts +3 -3
  67. package/src/testutil/client.ts +8 -1
  68. package/src/user/user.spec.ts +2 -2
  69. package/src/workspace/lineplot/lineplot.spec.ts +2 -2
  70. package/src/workspace/log/log.spec.ts +2 -2
  71. package/src/workspace/schematic/schematic.spec.ts +2 -2
  72. package/src/workspace/table/table.spec.ts +2 -2
  73. package/src/workspace/workspace.spec.ts +2 -2
@@ -1 +1 @@
1
- {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/ranger/client.ts"],"names":[],"mappings":"AASA,OAAO,EAAgB,KAAK,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACvE,OAAO,EAA8B,SAAS,EAAE,MAAM,eAAe,CAAC;AACtE,OAAO,EAAE,KAAK,MAAM,EA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AAK;IAInD,aAAa,CAAC,KAAK,EAAE,GAAG,EAAE,OAAO,EAAE,OAAO,CAAC,GAAG,GAAG,OAAO,CAAC,MAAM,CAAC;IAKhE,eAAe,CACnB,KAAK,EAAE,GAAG,EACV,QAAQ,EAAE,OAAO,CAAC,GAAG,EAAE,GACtB,OAAO,CAAC,MAAM,CAAC,OAAO,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC;IAKjC,WAAW,CAAC,KAAK,EAAE,GAAG,GAAG,OAAO,CAAC,MAAM,CAAC,OAAO,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC;IAK7D,QAAQ,CAAC,KAAK,EAAE,GAAG,EAAE,OAAO,EAAE,OAAO,CAAC,GAAG,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAK9E,QAAQ,CAAC,OAAO,EAAE,OAAO,GAAG,KAAK;IAYjC,SAAS,CAAC,QAAQ,EAAE,OAAO,EAAE,GAAG,KAAK,EAAE;IAIvC,eAAe,CAAC,QAAQ,EAAE,QAAQ,CAAC,QAAQ,GAAG,KAAK;CAUpD;AAED,eAAO,MAAM,UAAU,GAAI,KAAK,GAAG,KAAG,QAAQ,CAAC,EAA8B,CAAC;AAE9E,eAAO,MAAM,eAAe,GAAI,KAAK,GAAG,KAAG,QAAQ,CAAC,EAGlD,CAAC;AAEH,eAAO,MAAM,gCAAgC,GAAI,8BAI9C,QAAQ,CAAC,QAAQ,KAAG,OAUtB,CAAC"}
@@ -1,4 +1,4 @@
1
- export { type Alias, type AliasChange, aliasZ, type DecodedDeleteAliasChange, decodeDeleteAliasChange, DELETE_ALIAS_CHANNEL_NAME, SET_ALIAS_CHANNEL_NAME, } from './alias';
1
+ export * from './alias';
2
2
  export * from './client';
3
3
  export * from './kv';
4
4
  export * from './payload';
@@ -1 +1 @@
1
- {"version":3,"file":"external.d.ts","sourceRoot":"","sources":["../../src/ranger/external.ts"],"names":[],"mappings":"AASA,OAAO,EACL,KAAK,KAAK,EACV,KAAK,WAAW,EAChB,MAAM,EACN,KAAK,wBAAwB,EAC7B,uBAAuB,EACvB,yBAAyB,EACzB,sBAAsB,GACvB,MAAM,gBAAgB,CAAC;AACxB,cAAc,iBAAiB,CAAC;AAChC,cAAc,aAAa,CAAC;AAC5B,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC"}
1
+ {"version":3,"file":"external.d.ts","sourceRoot":"","sources":["../../src/ranger/external.ts"],"names":[],"mappings":"AASA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,aAAa,CAAC;AAC5B,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC"}
@@ -10,6 +10,7 @@ export declare const kvPairZ: z.ZodObject<{
10
10
  }, z.core.$strip>;
11
11
  export interface KVPair extends z.infer<typeof kvPairZ> {
12
12
  }
13
+ export declare const kvPairKey: ({ range, key }: Omit<KVPair, "value">) => string;
13
14
  declare const getReqZ: z.ZodObject<{
14
15
  range: z.ZodUUID;
15
16
  keys: z.ZodArray<z.ZodString>;
@@ -1 +1 @@
1
- {"version":3,"file":"kv.d.ts","sourceRoot":"","sources":["../../src/ranger/kv.ts"],"names":[],"mappings":"AASA,OAAO,EAAgB,KAAK,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAGvE,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,KAAK,GAAG,EAAQ,MAAM,kBAAkB,CAAC;AAGlD,eAAO,MAAM,cAAc,oBAAoB,CAAC;AAChD,eAAO,MAAM,iBAAiB,uBAAuB,CAAC;AAEtD,eAAO,MAAM,OAAO;;;;iBAAgE,CAAC;AACrF,MAAM,WAAW,MAAO,SAAQ,CAAC,CAAC,KAAK,CAAC,OAAO,OAAO,CAAC;CAAG;AAE1D,QAAA,MAAM,OAAO;;;iBAAsD,CAAC;AACpE,MAAM,WAAW,UAAW,SAAQ,CAAC,CAAC,KAAK,CAAC,OAAO,OAAO,CAAC;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AAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAapD,IAAI,IAAI,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAIvC,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAC9C,GAAG,CAAC,EAAE,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;IAmB9C,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;CASpD"}
@@ -26,21 +26,17 @@ export declare const payloadZ: z.ZodObject<{
26
26
  end: import('@synnaxlabs/x').TimeStamp;
27
27
  }>>, z.ZodCustom<TimeRange, TimeRange>]>;
28
28
  color: z.ZodOptional<z.ZodString>;
29
- labels: z.ZodUnion<readonly [z.ZodPipe<z.ZodUnion<readonly [z.ZodNull, z.ZodUndefined]>, z.ZodTransform<{
30
- key: string;
31
- name: string;
32
- color: string;
33
- }[], null | undefined>>, z.ZodArray<z.ZodObject<{
29
+ labels: z.ZodOptional<z.ZodUnion<[z.ZodArray<z.ZodObject<{
34
30
  key: z.ZodUUID;
35
31
  name: z.ZodString;
36
32
  color: z.ZodString;
37
- }, z.core.$strip>>]>;
33
+ }, z.core.$strip>>, z.ZodPipe<z.ZodNull, z.ZodTransform<undefined, null>>]>>;
38
34
  parent: z.ZodUnion<readonly [z.ZodNull, typeof payloadZ]>;
39
35
  }, z.core.$strip>;
40
36
  export type Payload = z.infer<typeof payloadZ>;
41
37
  export declare const newZ: z.ZodObject<{
42
- name: z.ZodString;
43
38
  key: z.ZodOptional<z.ZodUUID>;
39
+ name: z.ZodString;
44
40
  timeRange: z.ZodUnion<readonly [z.ZodPipe<z.ZodObject<{
45
41
  start: z.ZodUnion<readonly [z.ZodCustom<import('@synnaxlabs/x').TimeStamp, import('@synnaxlabs/x').TimeStamp>, z.ZodPipe<z.ZodObject<{
46
42
  value: z.ZodBigInt;
@@ -1 +1 @@
1
- {"version":3,"file":"payload.d.ts","sourceRoot":"","sources":["../../src/ranger/payload.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAChD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,eAAO,MAAM,IAAI,WAAW,CAAC;AAC7B,MAAM,MAAM,GAAG,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,IAAI,CAAC,CAAC;AACvC,eAAO,MAAM,KAAK,aAAoB,CAAC;AACvC,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;AAE/C,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;YAML,CAAC,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC,CAAC,OAAO,EAAE,OAAO,QAAQ,CAAC,CAAC;iBAU/D,CAAC;AAEH,MAAM,MAAM,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,QAAQ,CAAC,CAAC;AAE/C,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;iBAEQ,CAAC;AAC1B,MAAM,WAAW,GAAI,SAAQ,CAAC,CAAC,KAAK,CAAC,OAAO,IAAI,CAAC;CAAG"}
1
+ {"version":3,"file":"payload.d.ts","sourceRoot":"","sources":["../../src/ranger/payload.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAChD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,eAAO,MAAM,IAAI,WAAW,CAAC;AAC7B,MAAM,MAAM,GAAG,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,IAAI,CAAC,CAAC;AACvC,eAAO,MAAM,KAAK,aAAoB,CAAC;AACvC,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;AAE/C,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;YASL,CAAC,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC,CAAC,OAAO,EAAE,OAAO,QAAQ,CAAC,CAAC;iBAU/D,CAAC;AAEH,MAAM,MAAM,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,QAAQ,CAAC,CAAC;AAE/C,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;iBAEQ,CAAC;AAC1B,MAAM,WAAW,GAAI,SAAQ,CAAC,CAAC,KAAK,CAAC,OAAO,IAAI,CAAC;CAAG"}
@@ -31,8 +31,8 @@ declare const createReqZ: z.ZodObject<{
31
31
  key: string;
32
32
  }, string>>]>>;
33
33
  ranges: z.ZodArray<z.ZodObject<{
34
- name: z.ZodString;
35
34
  key: z.ZodOptional<z.ZodUUID>;
35
+ name: z.ZodString;
36
36
  timeRange: z.ZodUnion<readonly [z.ZodPipe<z.ZodObject<{
37
37
  start: z.ZodUnion<readonly [z.ZodCustom<import('@synnaxlabs/x').TimeStamp, import('@synnaxlabs/x').TimeStamp>, z.ZodPipe<z.ZodObject<{
38
38
  value: z.ZodBigInt;
@@ -1,4 +1,4 @@
1
1
  import { default as Synnax, SynnaxProps } from '../client';
2
2
  export declare const TEST_CLIENT_PROPS: SynnaxProps;
3
- export declare const newTestClient: (props?: Partial<SynnaxProps>) => Synnax;
3
+ export declare const createTestClient: (props?: Partial<SynnaxProps>) => Synnax;
4
4
  //# sourceMappingURL=client.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/testutil/client.ts"],"names":[],"mappings":"AASA,OAAO,MAAM,EAAE,EAAE,KAAK,WAAW,EAAE,MAAM,UAAU,CAAC;AAEpD,eAAO,MAAM,iBAAiB,EAAE,WAK/B,CAAC;AAEF,eAAO,MAAM,aAAa,GAAI,QAAQ,OAAO,CAAC,WAAW,CAAC,KAAG,MACb,CAAC"}
1
+ {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/testutil/client.ts"],"names":[],"mappings":"AAWA,OAAO,MAAM,EAAE,EAAE,KAAK,WAAW,EAAE,MAAM,UAAU,CAAC;AAEpD,eAAO,MAAM,iBAAiB,EAAE,WAU/B,CAAC;AAEF,eAAO,MAAM,gBAAgB,GAAI,QAAQ,OAAO,CAAC,WAAW,CAAC,KAAG,MAChB,CAAC"}
@@ -26,8 +26,8 @@ export declare const newZ: z.ZodPipe<z.ZodObject<{
26
26
  export interface New extends z.input<typeof newZ> {
27
27
  }
28
28
  export declare const remoteZ: z.ZodObject<{
29
- name: z.ZodString;
30
29
  key: z.ZodUUID;
30
+ name: z.ZodString;
31
31
  layout: z.ZodPipe<z.ZodString, z.ZodTransform<record.Unknown, string>>;
32
32
  }, z.core.$strip>;
33
33
  //# sourceMappingURL=payload.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@synnaxlabs/client",
3
- "version": "0.44.1",
3
+ "version": "0.44.3",
4
4
  "description": "The Synnax Client Library",
5
5
  "keywords": [
6
6
  "synnax",
@@ -26,8 +26,8 @@
26
26
  "dependencies": {
27
27
  "async-mutex": "^0.5.0",
28
28
  "zod": "^4.0.2",
29
- "@synnaxlabs/freighter": "^0.44.0",
30
- "@synnaxlabs/x": "^0.44.0"
29
+ "@synnaxlabs/x": "^0.44.3",
30
+ "@synnaxlabs/freighter": "^0.44.1"
31
31
  },
32
32
  "devDependencies": {
33
33
  "@vitest/coverage-v8": "^3.2.4",
@@ -12,10 +12,10 @@ import { describe, expect, test } from "vitest";
12
12
 
13
13
  import { type policy } from "@/access/policy";
14
14
  import { AuthError } from "@/errors";
15
- import { newTestClient } from "@/testutil/client";
15
+ import { createTestClient } from "@/testutil/client";
16
16
  import { user } from "@/user";
17
17
 
18
- const client = newTestClient();
18
+ const client = createTestClient();
19
19
 
20
20
  describe("Policy", () => {
21
21
  describe("create", () => {
@@ -299,7 +299,7 @@ describe("privilege", async () => {
299
299
  const username = id.create();
300
300
  const user2 = await client.user.create({ username, password: "pwd1" });
301
301
  expect(user2).toBeDefined();
302
- const client2 = newTestClient({ username: user2.username, password: "pwd1" });
302
+ const client2 = createTestClient({ username: user2.username, password: "pwd1" });
303
303
  await expect(
304
304
  client2.user.create({ username: id.create(), password: id.create() }),
305
305
  ).rejects.toThrow(AuthError);
@@ -12,9 +12,9 @@ import { beforeAll, describe, expect, it, test } from "vitest";
12
12
 
13
13
  import { Channel } from "@/channel/client";
14
14
  import { NotFoundError, PathError } from "@/errors";
15
- import { newTestClient } from "@/testutil/client";
15
+ import { createTestClient } from "@/testutil/client";
16
16
 
17
- const client = newTestClient();
17
+ const client = createTestClient();
18
18
 
19
19
  describe("Channel", () => {
20
20
  describe("create", () => {
@@ -8,7 +8,7 @@
8
8
  // included in the file licenses/APL.txt.
9
9
 
10
10
  import { sendRequired, type UnaryClient } from "@synnaxlabs/freighter";
11
- import { array } from "@synnaxlabs/x";
11
+ import { array, status } from "@synnaxlabs/x";
12
12
  import {
13
13
  type CrudeDensity,
14
14
  type CrudeTimeStamp,
@@ -27,6 +27,7 @@ import {
27
27
  type Params,
28
28
  type Payload,
29
29
  payloadZ,
30
+ type Status,
30
31
  } from "@/channel/payload";
31
32
  import {
32
33
  analyzeParams,
@@ -99,7 +100,7 @@ export class Channel {
99
100
  * An alias for the channel under a specific range. This parameter is unstable and
100
101
  * should not be relied upon in the current version of Synnax.
101
102
  */
102
- readonly alias: string | undefined;
103
+ alias: string | undefined;
103
104
  /**
104
105
  * Whether the channel is virtual. Virtual channels do not store any data in the
105
106
  * database, but can still be used for streaming purposes.
@@ -114,6 +115,10 @@ export class Channel {
114
115
  * Only used for calculated channels. Specifies the channels required for calculation
115
116
  */
116
117
  readonly requires: Key[];
118
+ /**
119
+ * The status of the channel.
120
+ */
121
+ readonly status?: Status;
117
122
 
118
123
  constructor({
119
124
  dataType,
@@ -126,9 +131,14 @@ export class Channel {
126
131
  virtual = false,
127
132
  frameClient,
128
133
  alias,
134
+ status: argsStatus,
129
135
  expression = "",
130
136
  requires = [],
131
- }: New & { frameClient?: framer.Client; density?: CrudeDensity }) {
137
+ }: New & {
138
+ frameClient?: framer.Client;
139
+ density?: CrudeDensity;
140
+ status?: status.Crude;
141
+ }) {
132
142
  this.key = key;
133
143
  this.name = name;
134
144
  this.dataType = new DataType(dataType);
@@ -140,6 +150,7 @@ export class Channel {
140
150
  this.virtual = virtual;
141
151
  this.expression = expression;
142
152
  this.requires = requires ?? [];
153
+ if (argsStatus != null) this.status = status.create(argsStatus);
143
154
  this._frameClient = frameClient ?? null;
144
155
  }
145
156
 
@@ -166,6 +177,7 @@ export class Channel {
166
177
  virtual: this.virtual,
167
178
  expression: this.expression,
168
179
  requires: this.requires,
180
+ status: this.status,
169
181
  });
170
182
  }
171
183
 
@@ -397,9 +409,13 @@ export class Client {
397
409
  );
398
410
  }
399
411
 
400
- private sugar(payloads: Payload[]): Channel[] {
412
+ sugar(payload: Payload): Channel;
413
+ sugar(payloads: Payload[]): Channel[];
414
+ sugar(payloads: Payload | Payload[]): Channel | Channel[] {
401
415
  const { frameClient } = this;
402
- return payloads.map((p) => new Channel({ ...p, frameClient }));
416
+ if (Array.isArray(payloads))
417
+ return payloads.map((p) => new Channel({ ...p, frameClient }));
418
+ return new Channel({ ...payloads, frameClient });
403
419
  }
404
420
 
405
421
  async retrieveGroup(): Promise<group.Group> {
@@ -22,6 +22,8 @@ export type KeyOrName = Key | Name;
22
22
  export type KeysOrNames = Keys | Names;
23
23
  export type PrimitiveParams = Key | Name | Keys | Names;
24
24
 
25
+ export const statusZ = status.statusZ();
26
+ export type Status = z.infer<typeof statusZ>;
25
27
  export const payloadZ = z.object({
26
28
  name: nameZ,
27
29
  key: keyZ,
@@ -34,6 +36,7 @@ export const payloadZ = z.object({
34
36
  alias: z.string().optional(),
35
37
  expression: z.string().default(""),
36
38
  requires: nullableArrayZ(keyZ),
39
+ status: statusZ.optional(),
37
40
  });
38
41
  export interface Payload extends z.infer<typeof payloadZ> {}
39
42
 
@@ -48,13 +51,10 @@ export const newZ = payloadZ.extend({
48
51
  requires: nullableArrayZ(keyZ).optional().default([]),
49
52
  });
50
53
 
51
- export interface New extends Omit<z.input<typeof newZ>, "dataType"> {
54
+ export interface New extends Omit<z.input<typeof newZ>, "dataType" | "status"> {
52
55
  dataType: CrudeDataType;
53
56
  }
54
57
 
55
- export const calculationStatusZ = status.statusZ();
56
- export type CalculationStatus = z.infer<typeof calculationStatusZ>;
57
-
58
58
  export const paramsZ = z.union([
59
59
  zod.toArray(keyZ),
60
60
  zod.toArray(nameZ),
@@ -58,7 +58,10 @@ export class Writer {
58
58
  this.client,
59
59
  CREATE_ENDPOINT,
60
60
  {
61
- channels: channels.map((c) => ({ ...c, dataType: c.dataType as DataType })),
61
+ channels: channels.map((c) => ({
62
+ ...c,
63
+ dataType: c.dataType as DataType,
64
+ })),
62
65
  },
63
66
  createReqZ,
64
67
  createResZ,
@@ -9,9 +9,9 @@
9
9
 
10
10
  import { describe, expect, it } from "vitest";
11
11
 
12
- import { newTestClient } from "@/testutil/client";
12
+ import { createTestClient } from "@/testutil/client";
13
13
 
14
- const client = newTestClient();
14
+ const client = createTestClient();
15
15
 
16
16
  describe("state", () => {
17
17
  it("should receive the initial control state from the cluster", async () => {
@@ -24,7 +24,7 @@ import {
24
24
  UnexpectedError,
25
25
  ValidationError,
26
26
  } from "@/errors";
27
- import { newTestClient } from "@/testutil/client";
27
+ import { createTestClient } from "@/testutil/client";
28
28
 
29
29
  describe("error", () => {
30
30
  describe("type matching", () => {
@@ -54,7 +54,7 @@ describe("error", () => {
54
54
  });
55
55
  });
56
56
 
57
- const client = newTestClient();
57
+ const client = createTestClient();
58
58
 
59
59
  test("client", async () => {
60
60
  expect.assertions(2);
@@ -13,9 +13,9 @@ import { beforeAll, describe, expect, it } from "vitest";
13
13
  import { type channel } from "@/channel";
14
14
  import { ReadAdapter, WriteAdapter } from "@/framer/adapter";
15
15
  import { Frame } from "@/index";
16
- import { newTestClient } from "@/testutil/client";
16
+ import { createTestClient } from "@/testutil/client";
17
17
 
18
- const client = newTestClient();
18
+ const client = createTestClient();
19
19
 
20
20
  describe("WriteFrameAdapter", () => {
21
21
  let timeCh: channel.Channel;
@@ -10,9 +10,9 @@
10
10
  import { TimeSpan, TimeStamp } from "@synnaxlabs/x";
11
11
  import { describe, expect, it } from "vitest";
12
12
 
13
- import { newTestClient } from "@/testutil/client";
13
+ import { createTestClient } from "@/testutil/client";
14
14
 
15
- const client = newTestClient();
15
+ const client = createTestClient();
16
16
 
17
17
  describe("Client", () => {
18
18
  describe("read + write", () => {
@@ -12,11 +12,11 @@ import { describe, expect, test } from "vitest";
12
12
 
13
13
  import { NotFoundError, UnauthorizedError } from "@/errors";
14
14
  import { newIndexedPair } from "@/testutil/channels";
15
- import { newTestClient } from "@/testutil/client";
15
+ import { createTestClient } from "@/testutil/client";
16
16
  import { secondsLinspace } from "@/testutil/telem";
17
17
  import { randomSeries } from "@/util/telem";
18
18
 
19
- const client = newTestClient();
19
+ const client = createTestClient();
20
20
 
21
21
  describe("Deleter", () => {
22
22
  test("Client - basic delete", async () => {
@@ -12,11 +12,11 @@ import { describe, expect, test } from "vitest";
12
12
 
13
13
  import { AUTO_SPAN } from "@/framer/iterator";
14
14
  import { newIndexedPair } from "@/testutil/channels";
15
- import { newTestClient } from "@/testutil/client";
15
+ import { createTestClient } from "@/testutil/client";
16
16
  import { secondsLinspace } from "@/testutil/telem";
17
17
  import { randomSeries } from "@/util/telem";
18
18
 
19
- const client = newTestClient();
19
+ const client = createTestClient();
20
20
 
21
21
  describe("Iterator", () => {
22
22
  test("happy path", async () => {
@@ -20,9 +20,9 @@ import {
20
20
  streamerConfigZ,
21
21
  } from "@/framer/streamer";
22
22
  import { newVirtualChannel } from "@/testutil/channels";
23
- import { newTestClient } from "@/testutil/client";
23
+ import { createTestClient } from "@/testutil/client";
24
24
 
25
- const client = newTestClient();
25
+ const client = createTestClient();
26
26
 
27
27
  describe("Streamer", () => {
28
28
  describe("standard", () => {
@@ -322,7 +322,7 @@ describe("Streamer", () => {
322
322
  it("should correctly call the underlying streamer methods", async () => {
323
323
  const streamer = new MockStreamer();
324
324
  const openMock = vi.fn();
325
- const config = { channels: [1, 2, 3], useExperimentalCodec: false };
325
+ const config = { channels: [1, 2, 3], useHighPerformanceCodec: true };
326
326
  const fr = new Frame({ 1: new Series([1]) });
327
327
  const hardened = await HardenedStreamer.open(
328
328
  async (cfg) => {
@@ -41,8 +41,9 @@ const intermediateStreamerConfigZ = z.object({
41
41
  channels: paramsZ,
42
42
  /** Optional factor to downsample the data by. Defaults to 1 (no downsampling). */
43
43
  downsampleFactor: z.number().optional().default(1),
44
- /** Whether to use the experimental codec for streaming. Defaults to true. */
45
- useExperimentalCodec: z.boolean().optional().default(false),
44
+ /** useHighPerformanceCodec sets whether the writer will use the synnax frame
45
+ /* encoder as opposed to the standard JSON encoding mechanisms for frames. */
46
+ useHighPerformanceCodec: z.boolean().optional().default(true),
46
47
  });
47
48
 
48
49
  export const streamerConfigZ = intermediateStreamerConfigZ.or(
@@ -103,7 +104,7 @@ export const createStreamOpener =
103
104
  async (config) => {
104
105
  const cfg = streamerConfigZ.parse(config);
105
106
  const adapter = await ReadAdapter.open(retriever, cfg.channels);
106
- if (cfg.useExperimentalCodec)
107
+ if (cfg.useHighPerformanceCodec)
107
108
  client = client.withCodec(new WSStreamerCodec(adapter.codec));
108
109
  const stream = await client.stream(ENDPOINT, reqZ, resZ);
109
110
  const streamer = new CoreStreamer(stream, adapter);
@@ -13,11 +13,12 @@ import { describe, expect, it, test } from "vitest";
13
13
  import { UnauthorizedError, ValidationError } from "@/errors";
14
14
  import { ALWAYS_INDEX_PERSIST_ON_AUTO_COMMIT, WriterMode } from "@/framer/writer";
15
15
  import { newIndexedPair } from "@/testutil/channels";
16
- import { newTestClient } from "@/testutil/client";
16
+ import { createTestClient } from "@/testutil/client";
17
17
  import { secondsLinspace } from "@/testutil/telem";
18
18
  import { randomSeries } from "@/util/telem";
19
19
 
20
- const client = newTestClient();
20
+ const client = createTestClient();
21
+
21
22
  describe("Writer", () => {
22
23
  describe("Writer", () => {
23
24
  test("basic write", async () => {
@@ -55,30 +55,40 @@ const writerModeZ = z.enum(WriterMode).or(
55
55
  export type CrudeWriterMode = z.input<typeof writerModeZ>;
56
56
 
57
57
  const baseWriterConfigZ = z.object({
58
- // start sets the starting timestamp for the first sample in the writer.
58
+ /** start sets the starting timestamp for the first sample in the writer. */
59
59
  start: TimeStamp.z.optional(),
60
- // controlSubject sets the control subject of the writer.
60
+ /** controlSubject sets the control subject of the writer. */
61
61
  controlSubject: control.subjectZ.optional(),
62
- // authorities set the control authority to set for each channel on the writer.
63
- // Defaults to absolute authority. If not working with concurrent control,
64
- // it's best to leave this as the default.
62
+ /** authorities set the control authority to set for each channel on the writer.
63
+ * Defaults to absolute authority. If not working with concurrent control,
64
+ * it's best to leave this as the default.
65
+ */
65
66
  authorities: z
66
67
  .union([control.authorityZ.transform((a) => [a]), control.authorityZ.array()])
67
68
  .default([control.ABSOLUTE_AUTHORITY]),
68
- // mode sets the persistence and streaming mode of the writer. The default
69
- // mode is WriterModePersistStream.
69
+ /** mode sets the persistence and streaming mode of the writer. The default
70
+ * mode is WriterModePersistStream.
71
+ */
70
72
  mode: writerModeZ.default(WriterMode.PersistStream),
71
- // errOnUnauthorized sets whether the writer raises an error when it attempts to write
72
- // to a channel without permission.
73
+ /**
74
+ * errOnUnauthorized sets whether the writer raises an error when it attempts to write
75
+ * to a channel without permission.
76
+ */
73
77
  errOnUnauthorized: z.boolean().default(false),
74
- // enableAutoCommit determines whether the writer will automatically commit.
75
- // If enableAutoCommit is true, then the writer will commit after each write, and
76
- // will flush that commit to index after the specified autoIndexPersistInterval.
78
+ /**
79
+ * enableAutoCommit determines whether the writer will automatically commit.
80
+ * If enableAutoCommit is true, then the writer will commit after each write, and
81
+ * will flush that commit to index after the specified autoIndexPersistInterval.
82
+ */
77
83
  enableAutoCommit: z.boolean().default(false),
78
- // autoIndexPersistInterval sets the interval at which commits to the index will be
84
+ /** autoIndexPersistInterval sets the interval at which commits will be flushed to
85
+ * disk. */
79
86
  autoIndexPersistInterval: TimeSpan.z.default(TimeSpan.SECOND),
80
- // useExperimentalCodec sets whether the writer will use the experimental codec.
81
- useExperimentalCodec: z.boolean().default(false),
87
+ /*
88
+ * useHighPerformanceCodec sets whether the writer will use the synnax frame
89
+ * encoder as opposed to the standard JSON encoding mechanisms for frames.
90
+ */
91
+ useHighPerformanceCodec: z.boolean().default(true),
82
92
  });
83
93
 
84
94
  const netWriterConfigZ = baseWriterConfigZ.extend({
@@ -198,7 +208,7 @@ export class Writer {
198
208
  ): Promise<Writer> {
199
209
  const cfg = writerConfigZ.parse(config);
200
210
  const adapter = await WriteAdapter.open(retriever, cfg.channels);
201
- if (cfg.useExperimentalCodec)
211
+ if (cfg.useHighPerformanceCodec)
202
212
  client = client.withCodec(new WSWriterCodec(adapter.codec));
203
213
  const stream = await client.stream(Writer.ENDPOINT, reqZ, resZ);
204
214
  const writer = new Writer(stream, adapter);
@@ -10,9 +10,9 @@
10
10
  import { id, unique } from "@synnaxlabs/x";
11
11
  import { beforeAll, describe, expect, it } from "vitest";
12
12
 
13
- import { newTestClient } from "@/testutil/client";
13
+ import { createTestClient } from "@/testutil/client";
14
14
 
15
- const client = newTestClient();
15
+ const client = createTestClient();
16
16
 
17
17
  describe("Device", async () => {
18
18
  const testRack = await client.hardware.racks.create({ name: "test" });
@@ -11,9 +11,9 @@ import { describe, expect, it } from "vitest";
11
11
  import { ZodError } from "zod";
12
12
 
13
13
  import { type rack } from "@/hardware/rack";
14
- import { newTestClient } from "@/testutil/client";
14
+ import { createTestClient } from "@/testutil/client";
15
15
 
16
- const client = newTestClient();
16
+ const client = createTestClient();
17
17
 
18
18
  describe("Rack", () => {
19
19
  describe("create", () => {