@synnaxlabs/client 0.27.0 → 0.28.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. package/.turbo/turbo-build.log +5 -5
  2. package/api/client.api.md +52 -8
  3. package/dist/client.cjs +22 -18
  4. package/dist/client.d.ts +4 -0
  5. package/dist/client.d.ts.map +1 -1
  6. package/dist/client.js +1880 -1719
  7. package/dist/connection/checker.d.ts +21 -1
  8. package/dist/connection/checker.d.ts.map +1 -1
  9. package/dist/framer/client.d.ts.map +1 -1
  10. package/dist/hardware/task/client.d.ts +12 -2
  11. package/dist/hardware/task/client.d.ts.map +1 -1
  12. package/dist/hardware/task/ni/types.d.ts +14495 -0
  13. package/dist/hardware/task/ni/types.d.ts.map +1 -0
  14. package/dist/hardware/task/payload.d.ts +6 -0
  15. package/dist/hardware/task/payload.d.ts.map +1 -1
  16. package/dist/ontology/client.d.ts +16 -5
  17. package/dist/ontology/client.d.ts.map +1 -1
  18. package/dist/ontology/group/writer.d.ts.map +1 -1
  19. package/dist/ontology/payload.d.ts +1 -2
  20. package/dist/ontology/payload.d.ts.map +1 -1
  21. package/dist/ranger/client.d.ts +3 -1
  22. package/dist/ranger/client.d.ts.map +1 -1
  23. package/package.json +5 -5
  24. package/src/client.ts +13 -5
  25. package/src/connection/checker.ts +58 -1
  26. package/src/connection/connection.spec.ts +43 -3
  27. package/src/framer/client.ts +0 -1
  28. package/src/hardware/task/client.ts +82 -6
  29. package/src/hardware/task/ni/types.ts +1716 -0
  30. package/src/hardware/task/payload.ts +1 -0
  31. package/src/hardware/task/task.spec.ts +45 -30
  32. package/src/label/client.ts +5 -5
  33. package/src/ontology/client.ts +43 -31
  34. package/src/ontology/group/writer.ts +10 -12
  35. package/src/ontology/ontology.spec.ts +3 -5
  36. package/src/ontology/payload.ts +1 -1
  37. package/src/ranger/client.ts +46 -40
  38. package/src/vite-env.d.ts +1 -1
  39. package/vite.config.ts +5 -0
@@ -1,5 +1,5 @@
1
1
 
2
- > @synnaxlabs/client@0.27.0 build /home/runner/work/synnax/synnax/client/ts
2
+ > @synnaxlabs/client@0.28.0 build /home/runner/work/synnax/synnax/client/ts
3
3
  > tsc --noEmit && vite build
4
4
 
5
5
   Synnax - Production mode
@@ -10,8 +10,8 @@ rendering chunks...
10
10
 
11
11
  [vite:dts] Start generate declaration files...
12
12
  computing gzip size...
13
- dist/client.js 241.71 kB │ gzip: 56.23 kB
14
- [vite:dts] Declaration files built in 4248ms.
13
+ dist/client.js 247.50 kB │ gzip: 57.76 kB
14
+ [vite:dts] Declaration files built in 6011ms.
15
15
 
16
- dist/client.cjs 150.65 kB │ gzip: 40.80 kB
17
- ✓ built in 5.22s
16
+ dist/client.cjs 155.13 kB │ gzip: 42.21 kB
17
+ ✓ built in 6.88s
package/api/client.api.md CHANGED
@@ -219,7 +219,7 @@ const ChannelOntologyType: ontology.ResourceType;
219
219
  //
220
220
  // @public
221
221
  class Checker {
222
- constructor(client: UnaryClient, pollFreq?: TimeSpan, name?: string);
222
+ constructor(client: UnaryClient, pollFreq: TimeSpan | undefined, clientVersion: string, name?: string);
223
223
  check(): Promise<State>;
224
224
  // (undocumented)
225
225
  static readonly connectionStateZ: z.ZodObject<{
@@ -227,16 +227,25 @@ class Checker {
227
227
  error: z.ZodOptional<z.ZodType<Error, z.ZodTypeDef, Error>>;
228
228
  message: z.ZodOptional<z.ZodString>;
229
229
  clusterKey: z.ZodString;
230
+ clientVersion: z.ZodString;
231
+ clientServerCompatible: z.ZodBoolean;
232
+ nodeVersion: z.ZodOptional<z.ZodString>;
230
233
  }, "strip", z.ZodTypeAny, {
231
234
  status: "disconnected" | "connecting" | "connected" | "failed";
232
235
  clusterKey: string;
236
+ clientVersion: string;
237
+ clientServerCompatible: boolean;
233
238
  message?: string | undefined;
234
239
  error?: Error | undefined;
240
+ nodeVersion?: string | undefined;
235
241
  }, {
236
242
  status: "disconnected" | "connecting" | "connected" | "failed";
237
243
  clusterKey: string;
244
+ clientVersion: string;
245
+ clientServerCompatible: boolean;
238
246
  message?: string | undefined;
239
247
  error?: Error | undefined;
248
+ nodeVersion?: string | undefined;
240
249
  }>;
241
250
  // (undocumented)
242
251
  static readonly DEFAULT: State;
@@ -330,7 +339,9 @@ class Client_13 {
330
339
  //
331
340
  // @public (undocumented)
332
341
  class Client_14 implements AsyncTermSearcher<string, TaskKey, Payload_5> {
333
- constructor(client: UnaryClient, frameClient: framer.Client);
342
+ constructor(client: UnaryClient, frameClient: framer.Client, ontologyClient: ontology.Client, rangeClient: ranger.Client);
343
+ // (undocumented)
344
+ copy(key: string, name: string, snapshot: boolean): Promise<Task>;
334
345
  // (undocumented)
335
346
  create<C extends UnknownRecord_2 = UnknownRecord_2, D extends {} = UnknownRecord_2, T extends string = string>(task: NewTask<C, T>): Promise<Task<C, D, T>>;
336
347
  // (undocumented)
@@ -437,8 +448,10 @@ class Client_2 implements AsyncTermSearcher<string, string, Resource> {
437
448
  // (undocumented)
438
449
  newSearcherWithOptions(options: RetrieveOptions_2): AsyncTermSearcher<string, string, Resource>;
439
450
  openChangeTracker(): Promise<ChangeTracker>;
451
+ // Warning: (ae-forgotten-export) The symbol "DependentTrackerProps" needs to be exported by the entry point index.d.ts
452
+ //
440
453
  // (undocumented)
441
- openDependentTracker(parent: ID, initial: Resource[], type?: string, direction?: RelationshipDirection): Promise<observe.ObservableAsyncCloseable<Resource[]>>;
454
+ openDependentTracker(props: DependentTrackerProps): Promise<observe.ObservableAsyncCloseable<Resource[]>>;
442
455
  page(offset: number, limit: number, options?: RetrieveOptions_2): Promise<Resource[]>;
443
456
  // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen
444
457
  // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen
@@ -578,6 +591,8 @@ class Client_6 implements AsyncTermSearcher<string, Key_3, Range_2> {
578
591
  // (undocumented)
579
592
  resourcesToRanges(resources: Resource[]): Range_2[];
580
593
  // (undocumented)
594
+ resourceToRange(resource: Resource): Range_2;
595
+ // (undocumented)
581
596
  retrieve(range: CrudeTimeRange): Promise<Range_2[]>;
582
597
  // (undocumented)
583
598
  retrieve(range: Key_3 | Name_3): Promise<Range_2>;
@@ -588,7 +603,9 @@ class Client_6 implements AsyncTermSearcher<string, Key_3, Range_2> {
588
603
  // (undocumented)
589
604
  search(term: string): Promise<Range_2[]>;
590
605
  // (undocumented)
591
- sugar(payloads: Payload_3[]): Range_2[];
606
+ sugarMany(payloads: Payload_3[]): Range_2[];
607
+ // (undocumented)
608
+ sugarOne(payload: Payload_3): Range_2;
592
609
  // (undocumented)
593
610
  readonly type: string;
594
611
  }
@@ -762,7 +779,7 @@ class DependentTracker extends observe.Observer<Resource[]> implements observe.O
762
779
  // (undocumented)
763
780
  close(): Promise<void>;
764
781
  // (undocumented)
765
- static open(from: ID, client: Client_2, framer: framer.Client, initial: Resource[], type?: string, direction?: RelationshipDirection): Promise<DependentTracker>;
782
+ static open(props: DependentTrackerProps, framer: framer.Client, client: Client_2): Promise<DependentTracker>;
766
783
  }
767
784
 
768
785
  // Warning: (ae-missing-release-tag) "Device" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal)
@@ -1536,6 +1553,7 @@ const newTaskZ: z.ZodObject<z.objectUtil.extendShape<Omit<{
1536
1553
  details: string | unknown[] | Record<string, unknown> | null;
1537
1554
  key?: string | undefined;
1538
1555
  }>>>;
1556
+ snapshot: z.ZodOptional<z.ZodBoolean>;
1539
1557
  }, "key">, {
1540
1558
  key: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodEffects<z.ZodBigInt, string, bigint>, z.ZodEffects<z.ZodNumber, string, number>]>, string, string | number | bigint>>;
1541
1559
  config: z.ZodEffects<z.ZodUnknown, string, unknown>;
@@ -1551,6 +1569,7 @@ const newTaskZ: z.ZodObject<z.objectUtil.extendShape<Omit<{
1551
1569
  key?: string | undefined;
1552
1570
  details?: any;
1553
1571
  } | null | undefined;
1572
+ snapshot?: boolean | undefined;
1554
1573
  }, {
1555
1574
  type: string;
1556
1575
  name: string;
@@ -1563,6 +1582,7 @@ const newTaskZ: z.ZodObject<z.objectUtil.extendShape<Omit<{
1563
1582
  details: string | unknown[] | Record<string, unknown> | null;
1564
1583
  key?: string | undefined;
1565
1584
  } | null | undefined;
1585
+ snapshot?: boolean | undefined;
1566
1586
  }>;
1567
1587
 
1568
1588
  // Warning: (ae-missing-release-tag) "NodeOntologyType" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal)
@@ -1612,6 +1632,7 @@ declare namespace ontology {
1612
1632
  RelationshipChange,
1613
1633
  RelationshipSet,
1614
1634
  RelationshipDelete,
1635
+ resourceTypeZ,
1615
1636
  ResourceType,
1616
1637
  BuiltinOntologyType,
1617
1638
  ClusterOntologyType,
@@ -2249,12 +2270,16 @@ const resourceSchemaZ: z.ZodEffects<z.ZodObject<{
2249
2270
  // @public (undocumented)
2250
2271
  type ResourceSet = change.Set<ID, Resource>;
2251
2272
 
2252
- // Warning: (ae-forgotten-export) The symbol "resourceTypeZ" needs to be exported by the entry point index.d.ts
2253
2273
  // Warning: (ae-missing-release-tag) "ResourceType" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal)
2254
2274
  //
2255
2275
  // @public (undocumented)
2256
2276
  type ResourceType = z.infer<typeof resourceTypeZ>;
2257
2277
 
2278
+ // Warning: (ae-missing-release-tag) "resourceTypeZ" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal)
2279
+ //
2280
+ // @public (undocumented)
2281
+ const resourceTypeZ: 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<"schematic">, z.ZodLiteral<"lineplot">, z.ZodLiteral<"rack">, z.ZodLiteral<"device">, z.ZodLiteral<"task">, z.ZodLiteral<"policy">]>;
2282
+
2258
2283
  // Warning: (ae-forgotten-export) The symbol "Request_2" needs to be exported by the entry point index.d.ts
2259
2284
  // Warning: (ae-missing-release-tag) "RetrieveOptions" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal)
2260
2285
  //
@@ -2265,7 +2290,7 @@ type RetrieveOptions = Omit<Request_2, "keys" | "names" | "search">;
2265
2290
  // Warning: (ae-missing-release-tag) "RetrieveOptions" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal)
2266
2291
  //
2267
2292
  // @public (undocumented)
2268
- type RetrieveOptions_2 = Pick<RetrieveRequest, "includeSchema" | "excludeFieldData">;
2293
+ type RetrieveOptions_2 = Pick<RetrieveRequest, "includeSchema" | "excludeFieldData" | "types">;
2269
2294
 
2270
2295
  // Warning: (ae-missing-release-tag) "RetrieveOptions" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal)
2271
2296
  //
@@ -2500,16 +2525,25 @@ const state: z.ZodObject<{
2500
2525
  error: z.ZodOptional<z.ZodType<Error, z.ZodTypeDef, Error>>;
2501
2526
  message: z.ZodOptional<z.ZodString>;
2502
2527
  clusterKey: z.ZodString;
2528
+ clientVersion: z.ZodString;
2529
+ clientServerCompatible: z.ZodBoolean;
2530
+ nodeVersion: z.ZodOptional<z.ZodString>;
2503
2531
  }, "strip", z.ZodTypeAny, {
2504
2532
  status: "disconnected" | "connecting" | "connected" | "failed";
2505
2533
  clusterKey: string;
2534
+ clientVersion: string;
2535
+ clientServerCompatible: boolean;
2506
2536
  message?: string | undefined;
2507
2537
  error?: Error | undefined;
2538
+ nodeVersion?: string | undefined;
2508
2539
  }, {
2509
2540
  status: "disconnected" | "connecting" | "connected" | "failed";
2510
2541
  clusterKey: string;
2542
+ clientVersion: string;
2543
+ clientServerCompatible: boolean;
2511
2544
  message?: string | undefined;
2512
2545
  error?: Error | undefined;
2546
+ nodeVersion?: string | undefined;
2513
2547
  }>;
2514
2548
 
2515
2549
  // Warning: (ae-missing-release-tag) "State" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal)
@@ -2670,6 +2704,7 @@ export class Synnax extends framer.Client {
2670
2704
  readonly auth: auth.Client | undefined;
2671
2705
  // (undocumented)
2672
2706
  readonly channels: channel.Client;
2707
+ readonly clientVersion: string;
2673
2708
  // (undocumented)
2674
2709
  close(): void;
2675
2710
  // (undocumented)
@@ -2750,7 +2785,7 @@ export const synnaxPropsZ: z.ZodObject<{
2750
2785
  //
2751
2786
  // @public (undocumented)
2752
2787
  class Task<C extends UnknownRecord_2 = UnknownRecord_2, D extends {} = UnknownRecord_2, T extends string = string> {
2753
- constructor(key: TaskKey, name: string, type: T, config: C, frameClient: framer.Client, internal?: boolean, state?: State_2<D> | null);
2788
+ constructor(key: TaskKey, name: string, type: T, config: C, internal?: boolean, snapshot?: boolean, state?: State_2<D> | null, frameClient?: framer.Client | null, ontologyClient?: ontology.Client | null, rangeClient?: ranger.Client | null);
2754
2789
  // (undocumented)
2755
2790
  readonly config: C;
2756
2791
  // (undocumented)
@@ -2764,10 +2799,16 @@ class Task<C extends UnknownRecord_2 = UnknownRecord_2, D extends {} = UnknownRe
2764
2799
  // (undocumented)
2765
2800
  readonly name: string;
2766
2801
  // (undocumented)
2802
+ get ontologyID(): ontology.ID;
2803
+ // (undocumented)
2767
2804
  openStateObserver<D extends UnknownRecord_2 = UnknownRecord_2>(): Promise<StateObservable<D>>;
2768
2805
  // (undocumented)
2769
2806
  get payload(): Payload_5<C, D>;
2770
2807
  // (undocumented)
2808
+ readonly snapshot: boolean;
2809
+ // (undocumented)
2810
+ snapshottedTo(): Promise<ontology.Resource | null>;
2811
+ // (undocumented)
2771
2812
  state?: State_2<D>;
2772
2813
  // (undocumented)
2773
2814
  readonly type: T;
@@ -2829,6 +2870,7 @@ const taskZ: z.ZodObject<{
2829
2870
  details: string | unknown[] | Record<string, unknown> | null;
2830
2871
  key?: string | undefined;
2831
2872
  }>>>;
2873
+ snapshot: z.ZodOptional<z.ZodBoolean>;
2832
2874
  }, "strip", z.ZodTypeAny, {
2833
2875
  type: string;
2834
2876
  name: string;
@@ -2841,6 +2883,7 @@ const taskZ: z.ZodObject<{
2841
2883
  key?: string | undefined;
2842
2884
  details?: any;
2843
2885
  } | null | undefined;
2886
+ snapshot?: boolean | undefined;
2844
2887
  }, {
2845
2888
  type: string;
2846
2889
  name: string;
@@ -2853,6 +2896,7 @@ const taskZ: z.ZodObject<{
2853
2896
  details: string | unknown[] | Record<string, unknown> | null;
2854
2897
  key?: string | undefined;
2855
2898
  } | null | undefined;
2899
+ snapshot?: boolean | undefined;
2856
2900
  }>;
2857
2901
 
2858
2902
  export { TelemValue }