@fabriktor/client 0.0.53 → 0.0.54

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.
@@ -32,6 +32,7 @@ export type ChatClientOptions = {
32
32
  };
33
33
  export interface ChatOperator {
34
34
  queryChats(opts?: QueryOptionsCRUD): Promise<OperationResultOf<Chat[]>>;
35
+ queryChatRooms(opts?: QueryOptionsCRUD): Promise<OperationResultOf<ChatRoom[]>>;
35
36
  queryChatRoomMembers(opts?: QueryOptionsCRUD): Promise<OperationResultOf<ChatRoomMember[]>>;
36
37
  insertOneChat(opts: InsertOneOptionsCRUD<InChat>): Promise<OperationResult>;
37
38
  findOneChat(opts: FindOneOptionsCRUD): Promise<OperationResultOf<Chat>>;
@@ -50,12 +51,14 @@ export interface ChatOperator {
50
51
  }
51
52
  export declare class ChatClient implements ChatOperator {
52
53
  private chats;
54
+ private chat_rooms;
53
55
  private chat_room_members;
54
56
  private http;
55
57
  private base_url;
56
58
  private get_token?;
57
59
  constructor(opts: ChatClientOptions);
58
60
  queryChats(opts?: QueryOptionsCRUD): Promise<OperationResultOf<Chat[]>>;
61
+ queryChatRooms(opts?: QueryOptionsCRUD): Promise<OperationResultOf<ChatRoom[]>>;
59
62
  queryChatRoomMembers(opts?: QueryOptionsCRUD): Promise<OperationResultOf<ChatRoomMember[]>>;
60
63
  insertOneChat(opts: InsertOneOptionsCRUD<InChat>): Promise<OperationResult>;
61
64
  findOneChat(opts: FindOneOptionsCRUD): Promise<OperationResultOf<Chat>>;
@@ -11,6 +11,7 @@ import { buildPath } from "../core/path.js";
11
11
  import { openWS, } from "../core/ws.js";
12
12
  export class ChatClient {
13
13
  chats;
14
+ chat_rooms;
14
15
  chat_room_members;
15
16
  http;
16
17
  base_url;
@@ -23,6 +24,13 @@ export class ChatClient {
23
24
  col: ColChatChats,
24
25
  get_token: opts.get_token,
25
26
  });
27
+ this.chat_rooms = newCRUDClient({
28
+ http: opts.http,
29
+ base_url: opts.base_url,
30
+ svc: SvcChat,
31
+ col: ColChatChatRooms,
32
+ get_token: opts.get_token,
33
+ });
26
34
  this.chat_room_members = newCRUDClient({
27
35
  http: opts.http,
28
36
  base_url: opts.base_url,
@@ -37,6 +45,9 @@ export class ChatClient {
37
45
  async queryChats(opts) {
38
46
  return await this.chats.query(opts);
39
47
  }
48
+ async queryChatRooms(opts) {
49
+ return await this.chat_rooms.query(opts);
50
+ }
40
51
  async queryChatRoomMembers(opts) {
41
52
  return await this.chat_room_members.query(opts);
42
53
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fabriktor/client",
3
- "version": "0.0.53",
3
+ "version": "0.0.54",
4
4
  "description": "![Fabriktor Logo](./img/fabriktor-character.gif)",
5
5
  "type": "module",
6
6
  "exports": {