korero-chat 0.1.0 → 0.1.1

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/README.md CHANGED
@@ -2,20 +2,16 @@
2
2
 
3
3
  Build clients and bots for the [Korero v1 protocol](../docs/protocol.md). The SDK runs in modern browsers with Web Crypto, Bun, and Node.js 22+. Each `KoreroClient` owns a connection to one server.
4
4
 
5
- ## Install from this checkout
5
+ ## Install
6
6
 
7
7
  ```sh
8
- cd sdk
9
- bun install --frozen-lockfile
10
- npm pack
8
+ npm install korero-chat
11
9
  ```
12
10
 
13
- In your project, install the generated package with `npm install /path/to/korero/sdk/korero-chat-sdk-0.1.0.tgz`.
14
-
15
11
  ## Listen and respond
16
12
 
17
13
  ```ts
18
- import { Channel, KoreroClient, identityFromPrivateKey } from "@korero-chat/sdk";
14
+ import { Channel, KoreroClient, identityFromPrivateKey } from "korero-chat";
19
15
 
20
16
  const client = new KoreroClient("https://chat.example.org:8443");
21
17
  const identity = identityFromPrivateKey(process.env.KORERO_PRIVATE_KEY!);
package/dist/http.d.ts CHANGED
@@ -34,6 +34,7 @@ export interface AccountPage {
34
34
  editable: boolean;
35
35
  bannable: boolean;
36
36
  banned: boolean;
37
+ bannedUntil?: number | null;
37
38
  })[];
38
39
  next: string | null;
39
40
  roles: string[];
package/dist/types.d.ts CHANGED
@@ -117,7 +117,13 @@ export type MemberRequest = {
117
117
  deafened: boolean;
118
118
  };
119
119
  } | {
120
- kind: "moderation.kick" | "moderation.ban" | "moderation.unban";
120
+ kind: "moderation.ban";
121
+ payload: {
122
+ accountId: string;
123
+ expiresInSeconds?: number;
124
+ };
125
+ } | {
126
+ kind: "moderation.kick" | "moderation.unban";
121
127
  payload: {
122
128
  accountId: string;
123
129
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "korero-chat",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "TypeScript client for the Korero.chat v1 protocol",
5
5
  "license": "AGPL-3.0-only",
6
6
  "type": "module",
package/src/http.ts CHANGED
@@ -21,7 +21,7 @@ export interface ChannelPermissionTable {
21
21
  }
22
22
 
23
23
  export interface AccountPage {
24
- accounts: (Account & { editable: boolean; bannable: boolean; banned: boolean })[];
24
+ accounts: (Account & { editable: boolean; bannable: boolean; banned: boolean; bannedUntil?: number | null })[];
25
25
  next: string | null;
26
26
  roles: string[];
27
27
  builtInRoles: (RoleDefinition & { editable: boolean; defaultPermissions: Permission[] })[];
package/src/types.ts CHANGED
@@ -91,7 +91,8 @@ export type MemberRequest =
91
91
  | { kind: "channel.move"; payload: { channelId: string } & ({ connectionId: string } | { connectionIds: string[] }) }
92
92
  | { kind: "moderation.mute"; payload: { connectionId: string; muted: boolean } }
93
93
  | { kind: "moderation.deafen"; payload: { connectionId: string; deafened: boolean } }
94
- | { kind: "moderation.kick" | "moderation.ban" | "moderation.unban"; payload: { accountId: string } }
94
+ | { kind: "moderation.ban"; payload: { accountId: string; expiresInSeconds?: number } }
95
+ | { kind: "moderation.kick" | "moderation.unban"; payload: { accountId: string } }
95
96
  | { kind: "role.set"; payload: { accountId: string; role: string } };
96
97
 
97
98
  export interface Message {