@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.
- package/.turbo/turbo-build.log +5 -5
- package/dist/channel/client.d.ts +5 -4
- package/dist/channel/external.d.ts +1 -1
- package/dist/channel/payload.d.ts +2 -3
- package/dist/channel/writer.d.ts +21 -0
- package/dist/client.cjs +18 -18
- package/dist/client.cjs.map +1 -1
- package/dist/client.js +9179 -9168
- package/dist/client.js.map +1 -1
- package/examples/node/package-lock.json +8 -8
- package/examples/node/package.json +1 -1
- package/examples/node/seriesAndFrames.js +101 -2
- package/package.json +5 -5
- package/src/channel/channel.spec.ts +91 -33
- package/src/channel/client.ts +12 -6
- package/src/channel/external.ts +1 -1
- package/src/channel/payload.ts +1 -11
- package/src/channel/retriever.ts +1 -1
- package/src/channel/writer.ts +63 -0
- package/src/client.ts +1 -1
- package/src/framer/adapter.spec.ts +6 -6
- package/dist/channel/creator.d.ts +0 -8
- package/src/channel/creator.ts +0 -44
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
> @synnaxlabs/client@0.
|
|
2
|
+
> @synnaxlabs/client@0.19.0 build /home/runner/work/synnax/synnax/client/ts
|
|
3
3
|
> tsc --noEmit && vite build
|
|
4
4
|
|
|
5
5
|
[36mvite v5.1.2 [32mbuilding for production...[36m[39m
|
|
@@ -9,8 +9,8 @@ rendering chunks...
|
|
|
9
9
|
[32m
|
|
10
10
|
[36m[vite:dts][32m Start generate declaration files...[39m
|
|
11
11
|
computing gzip size...
|
|
12
|
-
[2mdist/[22m[36mclient.js [39m[1m[
|
|
13
|
-
[32m[36m[vite:dts][32m Declaration files built in
|
|
12
|
+
[2mdist/[22m[36mclient.js [39m[1m[2m465.02 kB[22m[1m[22m[2m │ gzip: 97.32 kB[22m[2m │ map: 1,060.15 kB[22m
|
|
13
|
+
[32m[36m[vite:dts][32m Declaration files built in 3777ms.
|
|
14
14
|
[39m
|
|
15
|
-
[2mdist/[22m[36mclient.cjs [39m[1m[2m308.
|
|
16
|
-
[32m✓ built in 5.
|
|
15
|
+
[2mdist/[22m[36mclient.cjs [39m[1m[2m308.69 kB[22m[1m[22m[2m │ gzip: 75.75 kB[22m[2m │ map: 1,008.58 kB[22m
|
|
16
|
+
[32m✓ built in 5.19s[39m
|
package/dist/channel/client.d.ts
CHANGED
|
@@ -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
|
-
|
|
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[]>;
|
|
@@ -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 {};
|