@zooid/sdk 0.0.10 → 0.0.12

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/dist/index.cjs CHANGED
@@ -125,6 +125,10 @@ var ZooidClient = class {
125
125
  { name }
126
126
  );
127
127
  }
128
+ /** Delete a channel and all its data. Requires admin token. */
129
+ async deleteChannel(channelId) {
130
+ await this.request("DELETE", `/api/v1/channels/${channelId}`);
131
+ }
128
132
  /** Publish a single event to a channel. Requires a publish-scoped token. */
129
133
  async publish(channelId, options) {
130
134
  const body = { data: options.data };
package/dist/index.d.cts CHANGED
@@ -161,6 +161,8 @@ declare class ZooidClient {
161
161
  getClaim(channels: string[], action?: 'delete'): Promise<ClaimResult>;
162
162
  /** Add a named publisher to a channel. Requires admin token. */
163
163
  addPublisher(channelId: string, name: string): Promise<PublisherResult>;
164
+ /** Delete a channel and all its data. Requires admin token. */
165
+ deleteChannel(channelId: string): Promise<void>;
164
166
  /** Publish a single event to a channel. Requires a publish-scoped token. */
165
167
  publish(channelId: string, options: PublishOptions): Promise<ZooidEvent$1>;
166
168
  /** Publish multiple events in a single request. Requires a publish-scoped token. */
package/dist/index.d.ts CHANGED
@@ -161,6 +161,8 @@ declare class ZooidClient {
161
161
  getClaim(channels: string[], action?: 'delete'): Promise<ClaimResult>;
162
162
  /** Add a named publisher to a channel. Requires admin token. */
163
163
  addPublisher(channelId: string, name: string): Promise<PublisherResult>;
164
+ /** Delete a channel and all its data. Requires admin token. */
165
+ deleteChannel(channelId: string): Promise<void>;
164
166
  /** Publish a single event to a channel. Requires a publish-scoped token. */
165
167
  publish(channelId: string, options: PublishOptions): Promise<ZooidEvent$1>;
166
168
  /** Publish multiple events in a single request. Requires a publish-scoped token. */
package/dist/index.js CHANGED
@@ -97,6 +97,10 @@ var ZooidClient = class {
97
97
  { name }
98
98
  );
99
99
  }
100
+ /** Delete a channel and all its data. Requires admin token. */
101
+ async deleteChannel(channelId) {
102
+ await this.request("DELETE", `/api/v1/channels/${channelId}`);
103
+ }
100
104
  /** Publish a single event to a channel. Requires a publish-scoped token. */
101
105
  async publish(channelId, options) {
102
106
  const body = { data: options.data };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zooid/sdk",
3
- "version": "0.0.10",
3
+ "version": "0.0.12",
4
4
  "type": "module",
5
5
  "main": "./dist/index.cjs",
6
6
  "module": "./dist/index.js",
@@ -13,7 +13,7 @@
13
13
  }
14
14
  },
15
15
  "dependencies": {
16
- "@zooid/types": "0.0.10"
16
+ "@zooid/types": "0.0.12"
17
17
  },
18
18
  "devDependencies": {
19
19
  "@cloudflare/vitest-pool-workers": "^0.8.34",