@synnaxlabs/client 0.17.0 → 0.17.2
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 +6 -2
- package/dist/client.cjs +5 -5
- package/dist/client.cjs.map +1 -1
- package/dist/client.js +67 -56
- package/dist/client.js.map +1 -1
- package/examples/node/basicReadWrite.js +67 -0
- package/examples/node/package-lock.json +69 -57
- package/examples/node/package.json +1 -1
- package/examples/node/streamWrite.js +79 -0
- package/package.json +3 -3
- package/src/channel/channel.spec.ts +68 -2
- package/src/channel/client.ts +18 -6
- package/src/framer/frame.ts +5 -1
- package/examples/node/basicReadWriter.js +0 -66
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
> @synnaxlabs/client@0.17.
|
|
2
|
+
> @synnaxlabs/client@0.17.2 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[33m531.
|
|
13
|
-
[32m[36m[vite:dts][32m Declaration files built in
|
|
12
|
+
[2mdist/[22m[36mclient.js [39m[1m[33m531.80 kB[39m[22m[2m │ gzip: 116.94 kB[22m[2m │ map: 1,195.62 kB[22m
|
|
13
|
+
[32m[36m[vite:dts][32m Declaration files built in 3744ms.
|
|
14
14
|
[39m
|
|
15
|
-
[2mdist/[22m[36mclient.cjs [39m[1m[2m350.
|
|
16
|
-
[32m✓ built in 5.
|
|
15
|
+
[2mdist/[22m[36mclient.cjs [39m[1m[2m350.76 kB[22m[1m[22m[2m │ gzip: 92.53 kB[22m[2m │ map: 1,140.70 kB[22m
|
|
16
|
+
[32m✓ built in 5.29s[39m
|
package/dist/channel/client.d.ts
CHANGED
|
@@ -4,6 +4,9 @@ import { type Creator } from './creator';
|
|
|
4
4
|
import { type Key, type KeyOrName, type Params, type Payload, type NewPayload } from './payload';
|
|
5
5
|
import { type Retriever } from './retriever';
|
|
6
6
|
import { type framer } from '../framer';
|
|
7
|
+
interface CreateOptions {
|
|
8
|
+
retrieveIfNameExists?: boolean;
|
|
9
|
+
}
|
|
7
10
|
/**
|
|
8
11
|
* Represents a Channel in a Synnax database. Typically, channels should not be
|
|
9
12
|
* instantiated directly, but instead created via the `.channels.create` or retrieved
|
|
@@ -125,7 +128,7 @@ export declare class Client implements AsyncTermSearcher<string, Key, Channel> {
|
|
|
125
128
|
* });
|
|
126
129
|
* ```
|
|
127
130
|
*/
|
|
128
|
-
create(channel: NewPayload): Promise<Channel>;
|
|
131
|
+
create(channel: NewPayload, options?: CreateOptions): Promise<Channel>;
|
|
129
132
|
/**
|
|
130
133
|
* Creates multiple channels with the given properties. The order of the channels
|
|
131
134
|
* returned is guaranteed to match the order of the channels passed in.
|
|
@@ -149,7 +152,7 @@ export declare class Client implements AsyncTermSearcher<string, Key, Channel> {
|
|
|
149
152
|
*
|
|
150
153
|
* @param channels
|
|
151
154
|
*/
|
|
152
|
-
create(channels: NewPayload[]): Promise<Channel[]>;
|
|
155
|
+
create(channels: NewPayload[], options?: CreateOptions): Promise<Channel[]>;
|
|
153
156
|
/**
|
|
154
157
|
* Retrieves a channel from the database using the given key or name.
|
|
155
158
|
*
|
|
@@ -192,3 +195,4 @@ export declare class Client implements AsyncTermSearcher<string, Key, Channel> {
|
|
|
192
195
|
createDebouncedBatchRetriever(deb?: number): Retriever;
|
|
193
196
|
private sugar;
|
|
194
197
|
}
|
|
198
|
+
export {};
|