@synnaxlabs/client 0.15.3 → 0.16.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.
package/dist/errors.d.ts CHANGED
@@ -39,6 +39,10 @@ export declare class UnexpectedError extends BaseError {
39
39
  */
40
40
  export declare class QueryError extends BaseError {
41
41
  }
42
+ export declare class NoResultsError extends QueryError {
43
+ }
44
+ export declare class MultipleResultsError extends QueryError {
45
+ }
42
46
  /**
43
47
  * RouteError is raised when a routing error occurs.
44
48
  */
@@ -6,27 +6,27 @@ export declare const idZ: z.ZodObject<{
6
6
  key: z.ZodString;
7
7
  }, "strip", z.ZodTypeAny, {
8
8
  key: string;
9
- type: "user" | "cluster" | "label" | "builtin" | "channel" | "node" | "group" | "range" | "range-alias" | "workspace" | "pid" | "lineplot" | "rack";
9
+ type: "user" | "cluster" | "rack" | "label" | "builtin" | "channel" | "node" | "group" | "range" | "range-alias" | "workspace" | "pid" | "lineplot";
10
10
  }, {
11
11
  key: string;
12
- type: "user" | "cluster" | "label" | "builtin" | "channel" | "node" | "group" | "range" | "range-alias" | "workspace" | "pid" | "lineplot" | "rack";
12
+ type: "user" | "cluster" | "rack" | "label" | "builtin" | "channel" | "node" | "group" | "range" | "range-alias" | "workspace" | "pid" | "lineplot";
13
13
  }>;
14
14
  export declare const stringIDZ: z.ZodEffects<z.ZodString, {
15
- type: "user" | "cluster" | "label" | "builtin" | "channel" | "node" | "group" | "range" | "range-alias" | "workspace" | "pid" | "lineplot" | "rack";
15
+ type: "user" | "cluster" | "rack" | "label" | "builtin" | "channel" | "node" | "group" | "range" | "range-alias" | "workspace" | "pid" | "lineplot";
16
16
  key: string;
17
17
  }, string>;
18
18
  export declare const crudeIDZ: z.ZodUnion<[z.ZodEffects<z.ZodString, {
19
- type: "user" | "cluster" | "label" | "builtin" | "channel" | "node" | "group" | "range" | "range-alias" | "workspace" | "pid" | "lineplot" | "rack";
19
+ type: "user" | "cluster" | "rack" | "label" | "builtin" | "channel" | "node" | "group" | "range" | "range-alias" | "workspace" | "pid" | "lineplot";
20
20
  key: string;
21
21
  }, string>, z.ZodObject<{
22
22
  type: z.ZodUnion<[z.ZodLiteral<"label">, z.ZodLiteral<"builtin">, z.ZodLiteral<"cluster">, z.ZodLiteral<"channel">, z.ZodLiteral<"node">, z.ZodLiteral<"group">, z.ZodLiteral<"range">, z.ZodLiteral<"range-alias">, z.ZodLiteral<"user">, z.ZodLiteral<"workspace">, z.ZodLiteral<"pid">, z.ZodLiteral<"lineplot">, z.ZodLiteral<"rack">]>;
23
23
  key: z.ZodString;
24
24
  }, "strip", z.ZodTypeAny, {
25
25
  key: string;
26
- type: "user" | "cluster" | "label" | "builtin" | "channel" | "node" | "group" | "range" | "range-alias" | "workspace" | "pid" | "lineplot" | "rack";
26
+ type: "user" | "cluster" | "rack" | "label" | "builtin" | "channel" | "node" | "group" | "range" | "range-alias" | "workspace" | "pid" | "lineplot";
27
27
  }, {
28
28
  key: string;
29
- type: "user" | "cluster" | "label" | "builtin" | "channel" | "node" | "group" | "range" | "range-alias" | "workspace" | "pid" | "lineplot" | "rack";
29
+ type: "user" | "cluster" | "rack" | "label" | "builtin" | "channel" | "node" | "group" | "range" | "range-alias" | "workspace" | "pid" | "lineplot";
30
30
  }>]>;
31
31
  export declare class ID {
32
32
  type: ResourceType;
@@ -35,20 +35,20 @@ export declare class ID {
35
35
  toString(): string;
36
36
  get payload(): z.infer<typeof idZ>;
37
37
  static readonly z: z.ZodEffects<z.ZodUnion<[z.ZodUnion<[z.ZodEffects<z.ZodString, {
38
- type: "user" | "cluster" | "label" | "builtin" | "channel" | "node" | "group" | "range" | "range-alias" | "workspace" | "pid" | "lineplot" | "rack";
38
+ type: "user" | "cluster" | "rack" | "label" | "builtin" | "channel" | "node" | "group" | "range" | "range-alias" | "workspace" | "pid" | "lineplot";
39
39
  key: string;
40
40
  }, string>, z.ZodObject<{
41
41
  type: z.ZodUnion<[z.ZodLiteral<"label">, z.ZodLiteral<"builtin">, z.ZodLiteral<"cluster">, z.ZodLiteral<"channel">, z.ZodLiteral<"node">, z.ZodLiteral<"group">, z.ZodLiteral<"range">, z.ZodLiteral<"range-alias">, z.ZodLiteral<"user">, z.ZodLiteral<"workspace">, z.ZodLiteral<"pid">, z.ZodLiteral<"lineplot">, z.ZodLiteral<"rack">]>;
42
42
  key: z.ZodString;
43
43
  }, "strip", z.ZodTypeAny, {
44
44
  key: string;
45
- type: "user" | "cluster" | "label" | "builtin" | "channel" | "node" | "group" | "range" | "range-alias" | "workspace" | "pid" | "lineplot" | "rack";
45
+ type: "user" | "cluster" | "rack" | "label" | "builtin" | "channel" | "node" | "group" | "range" | "range-alias" | "workspace" | "pid" | "lineplot";
46
46
  }, {
47
47
  key: string;
48
- type: "user" | "cluster" | "label" | "builtin" | "channel" | "node" | "group" | "range" | "range-alias" | "workspace" | "pid" | "lineplot" | "rack";
48
+ type: "user" | "cluster" | "rack" | "label" | "builtin" | "channel" | "node" | "group" | "range" | "range-alias" | "workspace" | "pid" | "lineplot";
49
49
  }>]>, z.ZodType<ID, z.ZodTypeDef, ID>]>, ID, string | ID | {
50
50
  key: string;
51
- type: "user" | "cluster" | "label" | "builtin" | "channel" | "node" | "group" | "range" | "range-alias" | "workspace" | "pid" | "lineplot" | "rack";
51
+ type: "user" | "cluster" | "rack" | "label" | "builtin" | "channel" | "node" | "group" | "range" | "range-alias" | "workspace" | "pid" | "lineplot";
52
52
  }>;
53
53
  }
54
54
  export declare const Root: ID;
@@ -70,12 +70,12 @@ export declare const schemaZ: z.ZodObject<{
70
70
  type: number;
71
71
  }>>;
72
72
  }, "strip", z.ZodTypeAny, {
73
- type: "user" | "cluster" | "label" | "builtin" | "channel" | "node" | "group" | "range" | "range-alias" | "workspace" | "pid" | "lineplot" | "rack";
73
+ type: "user" | "cluster" | "rack" | "label" | "builtin" | "channel" | "node" | "group" | "range" | "range-alias" | "workspace" | "pid" | "lineplot";
74
74
  fields: Record<string, {
75
75
  type: number;
76
76
  }>;
77
77
  }, {
78
- type: "user" | "cluster" | "label" | "builtin" | "channel" | "node" | "group" | "range" | "range-alias" | "workspace" | "pid" | "lineplot" | "rack";
78
+ type: "user" | "cluster" | "rack" | "label" | "builtin" | "channel" | "node" | "group" | "range" | "range-alias" | "workspace" | "pid" | "lineplot";
79
79
  fields: Record<string, {
80
80
  type: number;
81
81
  }>;
@@ -83,20 +83,20 @@ export declare const schemaZ: z.ZodObject<{
83
83
  export type Schema = z.infer<typeof schemaZ>;
84
84
  export declare const resourceSchemaZ: z.ZodEffects<z.ZodObject<{
85
85
  id: z.ZodEffects<z.ZodUnion<[z.ZodUnion<[z.ZodEffects<z.ZodString, {
86
- type: "user" | "cluster" | "label" | "builtin" | "channel" | "node" | "group" | "range" | "range-alias" | "workspace" | "pid" | "lineplot" | "rack";
86
+ type: "user" | "cluster" | "rack" | "label" | "builtin" | "channel" | "node" | "group" | "range" | "range-alias" | "workspace" | "pid" | "lineplot";
87
87
  key: string;
88
88
  }, string>, z.ZodObject<{
89
89
  type: z.ZodUnion<[z.ZodLiteral<"label">, z.ZodLiteral<"builtin">, z.ZodLiteral<"cluster">, z.ZodLiteral<"channel">, z.ZodLiteral<"node">, z.ZodLiteral<"group">, z.ZodLiteral<"range">, z.ZodLiteral<"range-alias">, z.ZodLiteral<"user">, z.ZodLiteral<"workspace">, z.ZodLiteral<"pid">, z.ZodLiteral<"lineplot">, z.ZodLiteral<"rack">]>;
90
90
  key: z.ZodString;
91
91
  }, "strip", z.ZodTypeAny, {
92
92
  key: string;
93
- type: "user" | "cluster" | "label" | "builtin" | "channel" | "node" | "group" | "range" | "range-alias" | "workspace" | "pid" | "lineplot" | "rack";
93
+ type: "user" | "cluster" | "rack" | "label" | "builtin" | "channel" | "node" | "group" | "range" | "range-alias" | "workspace" | "pid" | "lineplot";
94
94
  }, {
95
95
  key: string;
96
- type: "user" | "cluster" | "label" | "builtin" | "channel" | "node" | "group" | "range" | "range-alias" | "workspace" | "pid" | "lineplot" | "rack";
96
+ type: "user" | "cluster" | "rack" | "label" | "builtin" | "channel" | "node" | "group" | "range" | "range-alias" | "workspace" | "pid" | "lineplot";
97
97
  }>]>, z.ZodType<ID, z.ZodTypeDef, ID>]>, ID, string | ID | {
98
98
  key: string;
99
- type: "user" | "cluster" | "label" | "builtin" | "channel" | "node" | "group" | "range" | "range-alias" | "workspace" | "pid" | "lineplot" | "rack";
99
+ type: "user" | "cluster" | "rack" | "label" | "builtin" | "channel" | "node" | "group" | "range" | "range-alias" | "workspace" | "pid" | "lineplot";
100
100
  }>;
101
101
  name: z.ZodString;
102
102
  schema: z.ZodOptional<z.ZodObject<{
@@ -109,12 +109,12 @@ export declare const resourceSchemaZ: z.ZodEffects<z.ZodObject<{
109
109
  type: number;
110
110
  }>>;
111
111
  }, "strip", z.ZodTypeAny, {
112
- type: "user" | "cluster" | "label" | "builtin" | "channel" | "node" | "group" | "range" | "range-alias" | "workspace" | "pid" | "lineplot" | "rack";
112
+ type: "user" | "cluster" | "rack" | "label" | "builtin" | "channel" | "node" | "group" | "range" | "range-alias" | "workspace" | "pid" | "lineplot";
113
113
  fields: Record<string, {
114
114
  type: number;
115
115
  }>;
116
116
  }, {
117
- type: "user" | "cluster" | "label" | "builtin" | "channel" | "node" | "group" | "range" | "range-alias" | "workspace" | "pid" | "lineplot" | "rack";
117
+ type: "user" | "cluster" | "rack" | "label" | "builtin" | "channel" | "node" | "group" | "range" | "range-alias" | "workspace" | "pid" | "lineplot";
118
118
  fields: Record<string, {
119
119
  type: number;
120
120
  }>;
@@ -124,7 +124,7 @@ export declare const resourceSchemaZ: z.ZodEffects<z.ZodObject<{
124
124
  name: string;
125
125
  id: ID;
126
126
  schema?: {
127
- type: "user" | "cluster" | "label" | "builtin" | "channel" | "node" | "group" | "range" | "range-alias" | "workspace" | "pid" | "lineplot" | "rack";
127
+ type: "user" | "cluster" | "rack" | "label" | "builtin" | "channel" | "node" | "group" | "range" | "range-alias" | "workspace" | "pid" | "lineplot";
128
128
  fields: Record<string, {
129
129
  type: number;
130
130
  }>;
@@ -134,13 +134,13 @@ export declare const resourceSchemaZ: z.ZodEffects<z.ZodObject<{
134
134
  name: string;
135
135
  id: (string | ID | {
136
136
  key: string;
137
- type: "user" | "cluster" | "label" | "builtin" | "channel" | "node" | "group" | "range" | "range-alias" | "workspace" | "pid" | "lineplot" | "rack";
137
+ type: "user" | "cluster" | "rack" | "label" | "builtin" | "channel" | "node" | "group" | "range" | "range-alias" | "workspace" | "pid" | "lineplot";
138
138
  }) & (string | ID | {
139
139
  key: string;
140
- type: "user" | "cluster" | "label" | "builtin" | "channel" | "node" | "group" | "range" | "range-alias" | "workspace" | "pid" | "lineplot" | "rack";
140
+ type: "user" | "cluster" | "rack" | "label" | "builtin" | "channel" | "node" | "group" | "range" | "range-alias" | "workspace" | "pid" | "lineplot";
141
141
  } | undefined);
142
142
  schema?: {
143
- type: "user" | "cluster" | "label" | "builtin" | "channel" | "node" | "group" | "range" | "range-alias" | "workspace" | "pid" | "lineplot" | "rack";
143
+ type: "user" | "cluster" | "rack" | "label" | "builtin" | "channel" | "node" | "group" | "range" | "range-alias" | "workspace" | "pid" | "lineplot";
144
144
  fields: Record<string, {
145
145
  type: number;
146
146
  }>;
@@ -150,7 +150,7 @@ export declare const resourceSchemaZ: z.ZodEffects<z.ZodObject<{
150
150
  name: string;
151
151
  id: ID;
152
152
  schema?: {
153
- type: "user" | "cluster" | "label" | "builtin" | "channel" | "node" | "group" | "range" | "range-alias" | "workspace" | "pid" | "lineplot" | "rack";
153
+ type: "user" | "cluster" | "rack" | "label" | "builtin" | "channel" | "node" | "group" | "range" | "range-alias" | "workspace" | "pid" | "lineplot";
154
154
  fields: Record<string, {
155
155
  type: number;
156
156
  }>;
@@ -161,13 +161,13 @@ export declare const resourceSchemaZ: z.ZodEffects<z.ZodObject<{
161
161
  name: string;
162
162
  id: (string | ID | {
163
163
  key: string;
164
- type: "user" | "cluster" | "label" | "builtin" | "channel" | "node" | "group" | "range" | "range-alias" | "workspace" | "pid" | "lineplot" | "rack";
164
+ type: "user" | "cluster" | "rack" | "label" | "builtin" | "channel" | "node" | "group" | "range" | "range-alias" | "workspace" | "pid" | "lineplot";
165
165
  }) & (string | ID | {
166
166
  key: string;
167
- type: "user" | "cluster" | "label" | "builtin" | "channel" | "node" | "group" | "range" | "range-alias" | "workspace" | "pid" | "lineplot" | "rack";
167
+ type: "user" | "cluster" | "rack" | "label" | "builtin" | "channel" | "node" | "group" | "range" | "range-alias" | "workspace" | "pid" | "lineplot";
168
168
  } | undefined);
169
169
  schema?: {
170
- type: "user" | "cluster" | "label" | "builtin" | "channel" | "node" | "group" | "range" | "range-alias" | "workspace" | "pid" | "lineplot" | "rack";
170
+ type: "user" | "cluster" | "rack" | "label" | "builtin" | "channel" | "node" | "group" | "range" | "range-alias" | "workspace" | "pid" | "lineplot";
171
171
  fields: Record<string, {
172
172
  type: number;
173
173
  }>;
@@ -177,37 +177,37 @@ export declare const resourceSchemaZ: z.ZodEffects<z.ZodObject<{
177
177
  export type Resource = z.infer<typeof resourceSchemaZ>;
178
178
  export declare const relationshipSchemaZ: z.ZodObject<{
179
179
  from: z.ZodEffects<z.ZodUnion<[z.ZodUnion<[z.ZodEffects<z.ZodString, {
180
- type: "user" | "cluster" | "label" | "builtin" | "channel" | "node" | "group" | "range" | "range-alias" | "workspace" | "pid" | "lineplot" | "rack";
180
+ type: "user" | "cluster" | "rack" | "label" | "builtin" | "channel" | "node" | "group" | "range" | "range-alias" | "workspace" | "pid" | "lineplot";
181
181
  key: string;
182
182
  }, string>, z.ZodObject<{
183
183
  type: z.ZodUnion<[z.ZodLiteral<"label">, z.ZodLiteral<"builtin">, z.ZodLiteral<"cluster">, z.ZodLiteral<"channel">, z.ZodLiteral<"node">, z.ZodLiteral<"group">, z.ZodLiteral<"range">, z.ZodLiteral<"range-alias">, z.ZodLiteral<"user">, z.ZodLiteral<"workspace">, z.ZodLiteral<"pid">, z.ZodLiteral<"lineplot">, z.ZodLiteral<"rack">]>;
184
184
  key: z.ZodString;
185
185
  }, "strip", z.ZodTypeAny, {
186
186
  key: string;
187
- type: "user" | "cluster" | "label" | "builtin" | "channel" | "node" | "group" | "range" | "range-alias" | "workspace" | "pid" | "lineplot" | "rack";
187
+ type: "user" | "cluster" | "rack" | "label" | "builtin" | "channel" | "node" | "group" | "range" | "range-alias" | "workspace" | "pid" | "lineplot";
188
188
  }, {
189
189
  key: string;
190
- type: "user" | "cluster" | "label" | "builtin" | "channel" | "node" | "group" | "range" | "range-alias" | "workspace" | "pid" | "lineplot" | "rack";
190
+ type: "user" | "cluster" | "rack" | "label" | "builtin" | "channel" | "node" | "group" | "range" | "range-alias" | "workspace" | "pid" | "lineplot";
191
191
  }>]>, z.ZodType<ID, z.ZodTypeDef, ID>]>, ID, string | ID | {
192
192
  key: string;
193
- type: "user" | "cluster" | "label" | "builtin" | "channel" | "node" | "group" | "range" | "range-alias" | "workspace" | "pid" | "lineplot" | "rack";
193
+ type: "user" | "cluster" | "rack" | "label" | "builtin" | "channel" | "node" | "group" | "range" | "range-alias" | "workspace" | "pid" | "lineplot";
194
194
  }>;
195
195
  type: z.ZodString;
196
196
  to: z.ZodEffects<z.ZodUnion<[z.ZodUnion<[z.ZodEffects<z.ZodString, {
197
- type: "user" | "cluster" | "label" | "builtin" | "channel" | "node" | "group" | "range" | "range-alias" | "workspace" | "pid" | "lineplot" | "rack";
197
+ type: "user" | "cluster" | "rack" | "label" | "builtin" | "channel" | "node" | "group" | "range" | "range-alias" | "workspace" | "pid" | "lineplot";
198
198
  key: string;
199
199
  }, string>, z.ZodObject<{
200
200
  type: z.ZodUnion<[z.ZodLiteral<"label">, z.ZodLiteral<"builtin">, z.ZodLiteral<"cluster">, z.ZodLiteral<"channel">, z.ZodLiteral<"node">, z.ZodLiteral<"group">, z.ZodLiteral<"range">, z.ZodLiteral<"range-alias">, z.ZodLiteral<"user">, z.ZodLiteral<"workspace">, z.ZodLiteral<"pid">, z.ZodLiteral<"lineplot">, z.ZodLiteral<"rack">]>;
201
201
  key: z.ZodString;
202
202
  }, "strip", z.ZodTypeAny, {
203
203
  key: string;
204
- type: "user" | "cluster" | "label" | "builtin" | "channel" | "node" | "group" | "range" | "range-alias" | "workspace" | "pid" | "lineplot" | "rack";
204
+ type: "user" | "cluster" | "rack" | "label" | "builtin" | "channel" | "node" | "group" | "range" | "range-alias" | "workspace" | "pid" | "lineplot";
205
205
  }, {
206
206
  key: string;
207
- type: "user" | "cluster" | "label" | "builtin" | "channel" | "node" | "group" | "range" | "range-alias" | "workspace" | "pid" | "lineplot" | "rack";
207
+ type: "user" | "cluster" | "rack" | "label" | "builtin" | "channel" | "node" | "group" | "range" | "range-alias" | "workspace" | "pid" | "lineplot";
208
208
  }>]>, z.ZodType<ID, z.ZodTypeDef, ID>]>, ID, string | ID | {
209
209
  key: string;
210
- type: "user" | "cluster" | "label" | "builtin" | "channel" | "node" | "group" | "range" | "range-alias" | "workspace" | "pid" | "lineplot" | "rack";
210
+ type: "user" | "cluster" | "rack" | "label" | "builtin" | "channel" | "node" | "group" | "range" | "range-alias" | "workspace" | "pid" | "lineplot";
211
211
  }>;
212
212
  }, "strip", z.ZodTypeAny, {
213
213
  type: string;
@@ -217,17 +217,17 @@ export declare const relationshipSchemaZ: z.ZodObject<{
217
217
  type: string;
218
218
  from: (string | ID | {
219
219
  key: string;
220
- type: "user" | "cluster" | "label" | "builtin" | "channel" | "node" | "group" | "range" | "range-alias" | "workspace" | "pid" | "lineplot" | "rack";
220
+ type: "user" | "cluster" | "rack" | "label" | "builtin" | "channel" | "node" | "group" | "range" | "range-alias" | "workspace" | "pid" | "lineplot";
221
221
  }) & (string | ID | {
222
222
  key: string;
223
- type: "user" | "cluster" | "label" | "builtin" | "channel" | "node" | "group" | "range" | "range-alias" | "workspace" | "pid" | "lineplot" | "rack";
223
+ type: "user" | "cluster" | "rack" | "label" | "builtin" | "channel" | "node" | "group" | "range" | "range-alias" | "workspace" | "pid" | "lineplot";
224
224
  } | undefined);
225
225
  to: (string | ID | {
226
226
  key: string;
227
- type: "user" | "cluster" | "label" | "builtin" | "channel" | "node" | "group" | "range" | "range-alias" | "workspace" | "pid" | "lineplot" | "rack";
227
+ type: "user" | "cluster" | "rack" | "label" | "builtin" | "channel" | "node" | "group" | "range" | "range-alias" | "workspace" | "pid" | "lineplot";
228
228
  }) & (string | ID | {
229
229
  key: string;
230
- type: "user" | "cluster" | "label" | "builtin" | "channel" | "node" | "group" | "range" | "range-alias" | "workspace" | "pid" | "lineplot" | "rack";
230
+ type: "user" | "cluster" | "rack" | "label" | "builtin" | "channel" | "node" | "group" | "range" | "range-alias" | "workspace" | "pid" | "lineplot";
231
231
  } | undefined);
232
232
  }>;
233
233
  export type Relationship = z.infer<typeof relationshipSchemaZ>;
@@ -0,0 +1 @@
1
+ import {Synnax} from "@synnaxlabs/client";
@@ -0,0 +1,16 @@
1
+ {
2
+ "name": "examples",
3
+ "type":"module",
4
+ "version": "1.0.0",
5
+ "description": "",
6
+ "main": "index.js",
7
+ "scripts": {
8
+ "main": "node index.js"
9
+ },
10
+ "dependencies": {
11
+ "@synnaxlabs/client": "workspace:*"
12
+ },
13
+ "keywords": [],
14
+ "author": "",
15
+ "license": "ISC"
16
+ }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@synnaxlabs/client",
3
3
  "private": false,
4
- "version": "0.15.3",
4
+ "version": "0.16.3",
5
5
  "type": "module",
6
6
  "description": "The Client Library for Synnax",
7
7
  "repository": "https://github.com/synnaxlabs/synnax/tree/main/client/ts",
@@ -18,8 +18,8 @@
18
18
  "dependencies": {
19
19
  "async-mutex": "^0.4.0",
20
20
  "zod": "3.22.4",
21
- "@synnaxlabs/x": "0.12.0",
22
- "@synnaxlabs/freighter": "0.7.1"
21
+ "@synnaxlabs/freighter": "0.7.1",
22
+ "@synnaxlabs/x": "0.12.0"
23
23
  },
24
24
  "devDependencies": {
25
25
  "@types/node": "^20.10.5",
@@ -31,8 +31,8 @@
31
31
  "@synnaxlabs/vite-plugin": "0.0.1",
32
32
  "eslint-config-synnaxlabs": "0.0.1"
33
33
  },
34
- "main": "dist/client.cjs.js",
35
- "module": "dist/client.es.js",
34
+ "main": "dist/client.cjs",
35
+ "module": "dist/client.js",
36
36
  "types": "dist/index.d.ts",
37
37
  "scripts": {
38
38
  "build": "tsc --noEmit && vite build",
@@ -43,6 +43,25 @@ describe("Channel", () => {
43
43
  });
44
44
  expect(two.key).not.toEqual(0);
45
45
  });
46
+ test("create many", async () => {
47
+ const channels = await client.channels.create([
48
+ {
49
+ name: "test1",
50
+ leaseholder: 1,
51
+ rate: Rate.hz(1),
52
+ dataType: DataType.FLOAT32,
53
+ },
54
+ {
55
+ name: "test2",
56
+ leaseholder: 1,
57
+ rate: Rate.hz(1),
58
+ dataType: DataType.FLOAT32,
59
+ },
60
+ ]);
61
+ expect(channels.length).toEqual(2);
62
+ expect(channels[0].name).toEqual("test1");
63
+ expect(channels[1].name).toEqual("test2");
64
+ });
46
65
  });
47
66
  test("retrieve by key", async () => {
48
67
  const channel = await client.channels.create({
@@ -62,7 +81,6 @@ describe("Channel", () => {
62
81
  QueryError,
63
82
  );
64
83
  });
65
-
66
84
  test("retrieve by name", async () => {
67
85
  const retrieved = await client.channels.retrieve(["test"]);
68
86
  expect(retrieved.length).toBeGreaterThan(0);
@@ -73,7 +91,6 @@ describe("Channel", () => {
73
91
  QueryError,
74
92
  );
75
93
  });
76
-
77
94
  test("retrieve by name", async () => {
78
95
  const retrieved = await client.channels.retrieve(["test"]);
79
96
  expect(retrieved.length).toBeGreaterThan(0);