@synnaxlabs/client 0.15.2 → 0.15.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/.turbo/turbo-build.log +6 -6
- package/dist/channel/batchRetriever.spec.d.ts +1 -0
- package/dist/channel/client.d.ts +4 -1
- package/dist/channel/retriever.d.ts +15 -0
- package/dist/client.cjs.js +9 -9
- package/dist/client.cjs.js.map +1 -1
- package/dist/client.d.ts +1 -1
- package/dist/client.es.js +2880 -2657
- package/dist/client.es.js.map +1 -1
- package/package.json +6 -5
- package/src/channel/batchRetriever.spec.ts +95 -0
- package/src/channel/client.ts +15 -3
- package/src/channel/retriever.ts +62 -2
- package/src/client.ts +5 -6
- package/src/hardware/task/retriever.ts +1 -1
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
|
|
2
|
-
> @synnaxlabs/client@0.15.
|
|
2
|
+
> @synnaxlabs/client@0.15.3 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
|
|
6
6
|
transforming...
|
|
7
|
-
[32m✓[39m
|
|
7
|
+
[32m✓[39m 103 modules transformed.
|
|
8
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.es.js [39m[1m[
|
|
13
|
-
[32m[36m[vite:dts][32m Declaration files built in
|
|
12
|
+
[2mdist/[22m[36mclient.es.js [39m[1m[33m521.17 kB[39m[22m[2m │ gzip: 114.65 kB[22m[2m │ map: 1,285.87 kB[22m
|
|
13
|
+
[32m[36m[vite:dts][32m Declaration files built in 3563ms.
|
|
14
14
|
[39m
|
|
15
|
-
[2mdist/[22m[36mclient.cjs.js [39m[1m[
|
|
16
|
-
[32m✓ built in 5.
|
|
15
|
+
[2mdist/[22m[36mclient.cjs.js [39m[1m[2m347.31 kB[22m[1m[22m[2m │ gzip: 91.63 kB[22m[2m │ map: 1,231.44 kB[22m
|
|
16
|
+
[32m✓ built in 5.10s[39m
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/channel/client.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ import { type Creator } from './creator';
|
|
|
3
3
|
import { type Key, type KeyOrName, type Params, type Payload, type NewPayload } from './payload';
|
|
4
4
|
import { type Retriever } from './retriever';
|
|
5
5
|
import { type framer } from '../framer';
|
|
6
|
+
import { UnaryClient } from "@synnaxlabs/freighter";
|
|
6
7
|
/**
|
|
7
8
|
* Represents a Channel in a Synnax database. It should not be instantiated
|
|
8
9
|
* directly, but rather created or retrieved from a {@link Client}.
|
|
@@ -47,7 +48,8 @@ export declare class Client implements AsyncTermSearcher<string, Key, Channel> {
|
|
|
47
48
|
private readonly frameClient;
|
|
48
49
|
private readonly retriever;
|
|
49
50
|
private readonly creator;
|
|
50
|
-
|
|
51
|
+
private readonly client;
|
|
52
|
+
constructor(segmentClient: framer.Client, retriever: Retriever, client: UnaryClient, creator: Creator);
|
|
51
53
|
create(channel: NewPayload): Promise<Channel>;
|
|
52
54
|
create(channels: NewPayload[]): Promise<Channel[]>;
|
|
53
55
|
retrieve(channel: KeyOrName, rangeKey?: string): Promise<Channel>;
|
|
@@ -55,5 +57,6 @@ export declare class Client implements AsyncTermSearcher<string, Key, Channel> {
|
|
|
55
57
|
search(term: string, rangeKey?: string): Promise<Channel[]>;
|
|
56
58
|
newSearcherUnderRange(rangeKey?: string): AsyncTermSearcher<string, Key, Channel>;
|
|
57
59
|
page(offset: number, limit: number, rangeKey?: string): Promise<Channel[]>;
|
|
60
|
+
createDebouncedBatchRetriever(deb?: number): Retriever;
|
|
58
61
|
private sugar;
|
|
59
62
|
}
|
|
@@ -47,3 +47,18 @@ export type ParamAnalysisResult = {
|
|
|
47
47
|
actual: Names;
|
|
48
48
|
};
|
|
49
49
|
export declare const analyzeParams: (channels: Params) => ParamAnalysisResult;
|
|
50
|
+
export interface PromiseFns<T> {
|
|
51
|
+
resolve: (value: T) => void;
|
|
52
|
+
reject: (reason?: any) => void;
|
|
53
|
+
}
|
|
54
|
+
export declare class DebouncedBatchRetriever implements Retriever {
|
|
55
|
+
private readonly mu;
|
|
56
|
+
private readonly requests;
|
|
57
|
+
private readonly wrapped;
|
|
58
|
+
private readonly debouncedRun;
|
|
59
|
+
constructor(wrapped: Retriever, deb: number);
|
|
60
|
+
search(term: string, rangeKey?: string): Promise<Payload[]>;
|
|
61
|
+
page(offset: number, limit: number, rangeKey?: string): Promise<Payload[]>;
|
|
62
|
+
retrieve(channels: Params): Promise<Payload[]>;
|
|
63
|
+
run(): Promise<void>;
|
|
64
|
+
}
|