@synnaxlabs/client 0.57.3 → 0.58.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 (65) hide show
  1. package/dist/{client-CX6CMvCc.js → client-0I0a7Hkw.js} +10152 -9184
  2. package/dist/client-0I0a7Hkw.js.map +1 -0
  3. package/dist/client.js +2061 -978
  4. package/dist/client.js.map +1 -1
  5. package/dist/src/access/policy/client.d.ts +1 -2
  6. package/dist/src/access/policy/client.d.ts.map +1 -1
  7. package/dist/src/channel/client.d.ts +1 -1
  8. package/dist/src/channel/client.d.ts.map +1 -1
  9. package/dist/src/device/client.d.ts +0 -2
  10. package/dist/src/device/client.d.ts.map +1 -1
  11. package/dist/src/framer/cache/cache.d.ts.map +1 -1
  12. package/dist/src/framer/cache/reader.d.ts.map +1 -1
  13. package/dist/src/framer/cache/static.d.ts +14 -0
  14. package/dist/src/framer/cache/static.d.ts.map +1 -1
  15. package/dist/src/framer/cache/unary.d.ts +3 -0
  16. package/dist/src/framer/cache/unary.d.ts.map +1 -1
  17. package/dist/src/framer/feed.d.ts.map +1 -1
  18. package/dist/src/framer/writer.d.ts.map +1 -1
  19. package/dist/src/index.d.ts.map +1 -1
  20. package/dist/src/lineplot/actions.d.ts +48 -0
  21. package/dist/src/lineplot/actions.d.ts.map +1 -1
  22. package/dist/src/lineplot/actions.gen.d.ts +237 -0
  23. package/dist/src/lineplot/actions.gen.d.ts.map +1 -1
  24. package/dist/src/lineplot/types.gen.d.ts +87 -7
  25. package/dist/src/lineplot/types.gen.d.ts.map +1 -1
  26. package/dist/src/panel/client.d.ts +1 -2
  27. package/dist/src/panel/client.d.ts.map +1 -1
  28. package/dist/src/project/client.d.ts +1 -2
  29. package/dist/src/project/client.d.ts.map +1 -1
  30. package/dist/src/query/indexes.d.ts +4 -5
  31. package/dist/src/query/indexes.d.ts.map +1 -1
  32. package/dist/src/query/table.d.ts +2 -3
  33. package/dist/src/query/table.d.ts.map +1 -1
  34. package/dist/src/ranger/client.d.ts +1 -3
  35. package/dist/src/ranger/client.d.ts.map +1 -1
  36. package/dist/src/schematic/actions.d.ts.map +1 -1
  37. package/dist/src/status/status.d.ts.map +1 -1
  38. package/dist/src/task/client.d.ts.map +1 -1
  39. package/dist/src/user/client.d.ts +1 -2
  40. package/dist/src/user/client.d.ts.map +1 -1
  41. package/dist/testutil.js +1 -1
  42. package/package.json +12 -12
  43. package/src/access/policy/client.ts +0 -2
  44. package/src/channel/client.ts +1 -2
  45. package/src/device/client.ts +0 -4
  46. package/src/framer/cache/cache.ts +9 -1
  47. package/src/framer/cache/reader.ts +5 -3
  48. package/src/framer/cache/static.ts +86 -3
  49. package/src/framer/cache/unary.ts +7 -0
  50. package/src/framer/feed.ts +2 -0
  51. package/src/framer/writer.ts +4 -5
  52. package/src/index.ts +2 -0
  53. package/src/lineplot/actions.gen.ts +30 -0
  54. package/src/lineplot/actions.ts +14 -0
  55. package/src/lineplot/types.gen.ts +59 -21
  56. package/src/panel/client.ts +0 -2
  57. package/src/project/client.ts +0 -2
  58. package/src/query/indexes.ts +3 -5
  59. package/src/query/table.ts +2 -3
  60. package/src/ranger/client.ts +5 -5
  61. package/src/schematic/actions.ts +21 -10
  62. package/src/status/status.ts +91 -1
  63. package/src/task/client.ts +4 -7
  64. package/src/user/client.ts +0 -2
  65. package/dist/client-CX6CMvCc.js.map +0 -1
@@ -600,7 +600,7 @@ export class Client extends query.Retriever<
600
600
  ): Promise<Task<S> | Task<S>[]> {
601
601
  const { schemas, ...params } =
602
602
  typeof rawParams === "string" ? { key: rawParams } : rawParams;
603
- const isSingle = singleRetrieveParamsZ.safeParse(params).success;
603
+ const isSingle = z.validate(singleRetrieveParamsZ, params);
604
604
  // Schema-parametrized retrieves validate config/status for one caller;
605
605
  // their results are not shared through the cache.
606
606
  if (schemas != null) {
@@ -608,11 +608,8 @@ export class Client extends query.Retriever<
608
608
  checkForMultipleOrNoResults("Task", params, sugared, isSingle);
609
609
  return isSingle ? sugared[0] : sugared;
610
610
  }
611
- if (isSingle)
612
- return (await super.retrieve(params as RetrieveSingleParams)) as Task<S>;
613
- return (await super.retrieve(
614
- params as RetrieveMultipleParams,
615
- )) as unknown as Task<S>[];
611
+ if (isSingle) return (await super.retrieve(params)) as Task<S>;
612
+ return (await super.retrieve(params)) as unknown as Task<S>[];
616
613
  }
617
614
 
618
615
  async copy(key: Key, name: string, snapshot: boolean): Promise<Task> {
@@ -898,7 +895,7 @@ export const statusKey = (key: Key): string => ontology.idToString(ontologyID(ke
898
895
  const statusTaskKey = (s: status.Status): Key | null => {
899
896
  const task = status.detailsOf(s)?.task;
900
897
  if (typeof task !== "string") return null;
901
- return keyZ.safeParse(task).success ? task : null;
898
+ return z.validate(keyZ, task) ? task : null;
902
899
  };
903
900
 
904
901
  /**
@@ -207,8 +207,6 @@ export class Client extends query.Retriever<
207
207
  });
208
208
  }
209
209
 
210
- async delete(key: Key, opts?: query.WriteOptions): Promise<void>;
211
- async delete(keys: Key[], opts?: query.WriteOptions): Promise<void>;
212
210
  async delete(keys: Key | Key[], opts: query.WriteOptions = {}): Promise<void> {
213
211
  const keysArr = array.toArray(keys);
214
212
  const drop = () => [