@synnaxlabs/client 0.18.2 → 0.19.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.
@@ -1,5 +1,5 @@
1
1
 
2
- > @synnaxlabs/client@0.18.2 build /home/runner/work/synnax/synnax/client/ts
2
+ > @synnaxlabs/client@0.19.0 build /home/runner/work/synnax/synnax/client/ts
3
3
  > tsc --noEmit && vite build
4
4
 
5
5
  vite v5.1.2 building for production...
@@ -9,8 +9,8 @@ rendering chunks...
9
9
  
10
10
  [vite:dts] Start generate declaration files...
11
11
  computing gzip size...
12
- dist/client.js 464.55 kB │ gzip: 97.51 kB │ map: 1,057.93 kB
13
- [vite:dts] Declaration files built in 3793ms.
12
+ dist/client.js 465.02 kB │ gzip: 97.32 kB │ map: 1,060.15 kB
13
+ [vite:dts] Declaration files built in 3777ms.
14
14
  
15
- dist/client.cjs 308.33 kB │ gzip: 76.14 kB │ map: 1,006.49 kB
16
- ✓ built in 5.18s
15
+ dist/client.cjs 308.69 kB │ gzip: 75.75 kB │ map: 1,008.58 kB
16
+ ✓ built in 5.19s
@@ -1,8 +1,8 @@
1
1
  import { type UnaryClient } from "@synnaxlabs/freighter";
2
2
  import { DataType, Rate, type TypedArray, type CrudeDensity, type Series, type TimeRange, type AsyncTermSearcher, type CrudeTimeStamp } from "@synnaxlabs/x";
3
- import { type Creator } from './creator';
4
3
  import { type Key, type KeyOrName, type Params, type Payload, type NewPayload } from './payload';
5
4
  import { type Retriever } from './retriever';
5
+ import { type Writer } from './writer';
6
6
  import { type framer } from '../framer';
7
7
  interface CreateOptions {
8
8
  retrieveIfNameExists?: boolean;
@@ -90,10 +90,10 @@ export declare class Channel {
90
90
  */
91
91
  export declare class Client implements AsyncTermSearcher<string, Key, Channel> {
92
92
  private readonly frameClient;
93
- readonly retriever: Retriever;
94
- private readonly creator;
95
93
  private readonly client;
96
- constructor(frameClient: framer.Client, retriever: Retriever, client: UnaryClient, creator: Creator);
94
+ readonly retriever: Retriever;
95
+ readonly writer: Writer;
96
+ constructor(frameClient: framer.Client, retriever: Retriever, client: UnaryClient, writer: Writer);
97
97
  /**
98
98
  * Creates a single channel with the given properties.
99
99
  *
@@ -189,6 +189,7 @@ export declare class Client implements AsyncTermSearcher<string, Key, Channel> {
189
189
  *
190
190
  */
191
191
  retrieve(channels: Params, rangeKey?: string): Promise<Channel[]>;
192
+ delete(channels: Params): Promise<void>;
192
193
  search(term: string, rangeKey?: string): Promise<Channel[]>;
193
194
  newSearcherUnderRange(rangeKey?: string): AsyncTermSearcher<string, Key, Channel>;
194
195
  page(offset: number, limit: number, rangeKey?: string): Promise<Channel[]>;
@@ -1,4 +1,4 @@
1
- export * from './creator';
1
+ export * from './writer';
2
2
  export * from './client';
3
3
  export * from './payload';
4
4
  export * from './retriever';
@@ -44,16 +44,16 @@ export declare const newPayload: z.ZodObject<{
44
44
  key: z.ZodOptional<z.ZodNumber>;
45
45
  leaseholder: z.ZodOptional<z.ZodNumber>;
46
46
  index: z.ZodOptional<z.ZodNumber>;
47
- rate: z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodNumber, Rate, number>, z.ZodEffects<z.ZodType<Number, z.ZodTypeDef, Number>, Rate, Number>, z.ZodType<Rate, z.ZodTypeDef, Rate>]>>;
47
+ rate: z.ZodDefault<z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodNumber, Rate, number>, z.ZodEffects<z.ZodType<Number, z.ZodTypeDef, Number>, Rate, Number>, z.ZodType<Rate, z.ZodTypeDef, Rate>]>>>;
48
48
  isIndex: z.ZodOptional<z.ZodBoolean>;
49
49
  }, "strip", z.ZodTypeAny, {
50
50
  name: string;
51
+ rate: Rate;
51
52
  dataType: DataType;
52
53
  alias?: string | undefined;
53
54
  key?: number | undefined;
54
55
  leaseholder?: number | undefined;
55
56
  index?: number | undefined;
56
- rate?: Rate | undefined;
57
57
  isIndex?: boolean | undefined;
58
58
  }, {
59
59
  name: string;
@@ -66,4 +66,3 @@ export declare const newPayload: z.ZodObject<{
66
66
  isIndex?: boolean | undefined;
67
67
  }>;
68
68
  export type NewPayload = z.input<typeof newPayload>;
69
- export declare const parseChannels: (channels: NewPayload[]) => NewPayload[];
@@ -0,0 +1,21 @@
1
+ import { type UnaryClient } from "@synnaxlabs/freighter";
2
+ import { z } from "zod";
3
+ import { type Payload, type NewPayload } from './payload';
4
+ declare const deleteReqZ: z.ZodObject<{
5
+ keys: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
6
+ names: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
7
+ }, "strip", z.ZodTypeAny, {
8
+ keys?: number[] | undefined;
9
+ names?: string[] | undefined;
10
+ }, {
11
+ keys?: number[] | undefined;
12
+ names?: string[] | undefined;
13
+ }>;
14
+ export type DeleteProps = z.input<typeof deleteReqZ>;
15
+ export declare class Writer {
16
+ private readonly client;
17
+ constructor(client: UnaryClient);
18
+ create(channels: NewPayload[]): Promise<Payload[]>;
19
+ delete(props: DeleteProps): Promise<void>;
20
+ }
21
+ export {};