@kispi/chat 0.2.2 → 0.3.0

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
@@ -21,11 +21,10 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
21
21
  var src_exports = {};
22
22
  __export(src_exports, {
23
23
  ChatClient: () => ChatClient,
24
+ ChatEndpoint: () => ChatEndpoint,
24
25
  ChatError: () => ChatError,
25
26
  Room: () => Room,
26
- Timeline: () => Timeline,
27
- createChatClient: () => createChatClient,
28
- createTimeline: () => createTimeline
27
+ createChatClient: () => createChatClient
29
28
  });
30
29
  module.exports = __toCommonJS(src_exports);
31
30
 
@@ -60,6 +59,14 @@ var Emitter = class {
60
59
  }
61
60
  };
62
61
 
62
+ // src/endpoint.ts
63
+ var ChatEndpoint = "wss://api.chat.gravex.app";
64
+ function restURLFrom(socketURL) {
65
+ if (socketURL.startsWith("wss://")) return `https://${socketURL.slice("wss://".length)}`;
66
+ if (socketURL.startsWith("ws://")) return `http://${socketURL.slice("ws://".length)}`;
67
+ return socketURL;
68
+ }
69
+
63
70
  // src/errors.ts
64
71
  var ChatError = class extends Error {
65
72
  code;
@@ -67,7 +74,13 @@ var ChatError = class extends Error {
67
74
  retryAfterMs;
68
75
  /** The consumer's own code, when a before_publish hook denied this. */
69
76
  appCode;
70
- /** The HTTP status, when this came from a REST call. */
77
+ /**
78
+ * The HTTP status, when this came from a REST call.
79
+ *
80
+ * 읽기 전용이다. 이 값은 실패를 만든 응답의 성질이지 나중에 붙이는
81
+ * 꼬리표가 아니고, 쓸 수 있게 두면 소비자가 고쳐 쓴 상태가 SDK가
82
+ * 붙인 것과 구별되지 않는다.
83
+ */
71
84
  status;
72
85
  constructor(code, message, extra) {
73
86
  super(message);
@@ -75,9 +88,10 @@ var ChatError = class extends Error {
75
88
  this.code = code;
76
89
  if (extra?.retryAfterMs !== void 0) this.retryAfterMs = extra.retryAfterMs;
77
90
  if (extra?.appCode !== void 0) this.appCode = extra.appCode;
91
+ if (extra?.status !== void 0) this.status = extra.status;
78
92
  }
79
93
  };
80
- function errorFrom(data, fallback = "the server refused the request") {
94
+ function errorFrom(data, fallback = "the server refused the request", status) {
81
95
  if (typeof data === "object" && data !== null) {
82
96
  const d = data;
83
97
  const inner = d["error"] ?? d;
@@ -86,9 +100,10 @@ function errorFrom(data, fallback = "the server refused the request") {
86
100
  const extra = {};
87
101
  if (typeof inner["retryAfterMs"] === "number") extra.retryAfterMs = inner["retryAfterMs"];
88
102
  if (typeof inner["appCode"] === "string") extra.appCode = inner["appCode"];
103
+ if (status !== void 0) extra.status = status;
89
104
  return new ChatError(code, message, extra);
90
105
  }
91
- return new ChatError("internal", fallback);
106
+ return new ChatError("internal", fallback, status === void 0 ? void 0 : { status });
92
107
  }
93
108
 
94
109
  // src/rest.ts
@@ -144,9 +159,7 @@ var Rest = class {
144
159
  const text = await res.text();
145
160
  const parsed = text === "" ? void 0 : JSON.parse(text);
146
161
  if (!res.ok) {
147
- const err = errorFrom(parsed, `${method} ${path} failed with ${res.status}`);
148
- err.status = res.status;
149
- throw err;
162
+ throw errorFrom(parsed, `${method} ${path} failed with ${res.status}`, res.status);
150
163
  }
151
164
  return parsed;
152
165
  }
@@ -160,11 +173,6 @@ function queryString(query) {
160
173
  const s = params.toString();
161
174
  return s === "" ? "" : `?${s}`;
162
175
  }
163
- function restURLFrom(socketURL) {
164
- if (socketURL.startsWith("wss://")) return `https://${socketURL.slice("wss://".length)}`;
165
- if (socketURL.startsWith("ws://")) return `http://${socketURL.slice("ws://".length)}`;
166
- return socketURL;
167
- }
168
176
 
169
177
  // src/timeline.ts
170
178
  var MaxPageSize = 100;
@@ -211,6 +219,18 @@ var Timeline = class {
211
219
  floor = 1;
212
220
  /** A `loadOlder` came back short: the top of what the server keeps was reached. */
213
221
  exhausted = false;
222
+ /**
223
+ * Presses this client has made and the server has not answered yet, one
224
+ * entry per (message, emoji) pair, each remembering the last value the
225
+ * **server** gave for that pair.
226
+ *
227
+ * 되돌릴 자리로 "누르기 직전 화면값"을 쓰면 안 된다. 눌렀다 곧바로 취소하고
228
+ * 두 거절이 차례로 오면, 두 번째 거절이 첫 번째의 낙관값 — 서버가 한 번도
229
+ * 가진 적 없는 값 — 을 화면에 되살린다. 마지막으로 서버가 말한 값만이
230
+ * 되돌릴 자리다.
231
+ */
232
+ presses = /* @__PURE__ */ new Map();
233
+ pressSeq = 0;
214
234
  constructor(options) {
215
235
  this.options = options;
216
236
  }
@@ -278,6 +298,7 @@ var Timeline = class {
278
298
  this.epoch++;
279
299
  this.fills.clear();
280
300
  this.pendingDeletes.clear();
301
+ this.presses.clear();
281
302
  this.items = [];
282
303
  this.exhausted = false;
283
304
  this.shared = false;
@@ -305,6 +326,7 @@ var Timeline = class {
305
326
  this.epoch++;
306
327
  this.fills.clear();
307
328
  const page = [...messages].sort((a, b) => a.seq - b.seq);
329
+ for (const m of page) this.serverRendered(m.id);
308
330
  const top = page.at(-1)?.seq ?? 0;
309
331
  this.items = [...page, ...this.items.filter((m) => m.seq > top)];
310
332
  this.exhausted = false;
@@ -361,8 +383,57 @@ var Timeline = class {
361
383
  * cannot drift the way `+1`/`-1` would. `count` undefined leaves the
362
384
  * aggregate alone (the react ack path); `mine` undefined leaves
363
385
  * `myReactions` alone (somebody else's event).
386
+ *
387
+ * This is the **authoritative** entry point: a value the server sent.
388
+ * So a press still waiting on an answer for the same pair is finished
389
+ * here -- a refusal landing afterwards must not push this value back
390
+ * to the older one it was going to restore.
364
391
  */
365
392
  reaction(messageId, emoji, count, mine) {
393
+ if (mine !== void 0) this.presses.delete(pairKey(messageId, emoji));
394
+ this.applyReaction(messageId, emoji, count, mine);
395
+ }
396
+ /**
397
+ * Applies this client's own react/unreact to `myReactions` **before the
398
+ * frame goes out**, and returns the press so its answer can settle it.
399
+ *
400
+ * 누른 값은 (사용자, 이모지)로 로컬에서 정해지고 엔진은 멱등이므로, 미리
401
+ * 적용해도 ack가 새로 알려 줄 것이 없다. `count`는 일부러 건드리지 않는다 —
402
+ * 그 사이 남이 같은 이모지를 누르면 로컬 +1/-1은 서버가 보낼 수와 다르고,
403
+ * 그 차이를 고칠 이벤트는 이미 지나갔다.
404
+ *
405
+ * Undefined when the row is not held: there is nothing to show now and
406
+ * nothing to put back later.
407
+ */
408
+ pressReaction(messageId, emoji, mine) {
409
+ const at = this.items.findIndex((m) => m.id === messageId);
410
+ if (at === -1) return void 0;
411
+ const key = pairKey(messageId, emoji);
412
+ const base = this.presses.get(key)?.base ?? (this.items[at].myReactions ?? []).includes(emoji);
413
+ const press = { messageId, emoji, mine, seq: ++this.pressSeq };
414
+ this.presses.set(key, { seq: press.seq, base });
415
+ this.applyReaction(messageId, emoji, void 0, mine);
416
+ return press;
417
+ }
418
+ /**
419
+ * Settles a press with what the server said.
420
+ *
421
+ * `accepted` re-asserts the value the press asked for; a refusal puts
422
+ * the last server-given value back. Either way it does nothing once
423
+ * this press no longer owns the pair -- a newer press took it over
424
+ * (and that one's answer decides), or something authoritative already
425
+ * landed on it (a `reaction.*` event carrying this user's id, a
426
+ * `reload()`, a reconnect's catch-up page). Reverting there would
427
+ * resurrect a value older than what is on screen.
428
+ */
429
+ settleReaction(press, accepted) {
430
+ const key = pairKey(press.messageId, press.emoji);
431
+ const held = this.presses.get(key);
432
+ if (held === void 0 || held.seq !== press.seq) return;
433
+ this.presses.delete(key);
434
+ this.applyReaction(press.messageId, press.emoji, void 0, accepted ? press.mine : held.base);
435
+ }
436
+ applyReaction(messageId, emoji, count, mine) {
366
437
  const at = this.items.findIndex((m) => m.id === messageId);
367
438
  if (at === -1) return;
368
439
  const current = this.items[at];
@@ -479,6 +550,7 @@ var Timeline = class {
479
550
  }
480
551
  /** Inserts at the seq position, replacing an existing row with that seq. */
481
552
  insert(message, notify = true) {
553
+ this.serverRendered(message.id);
482
554
  const pending = this.pendingDeletes.has(message.id);
483
555
  if (pending) this.pendingDeletes.delete(message.id);
484
556
  const withDelete = pending ? emptied(message) : message;
@@ -503,6 +575,21 @@ var Timeline = class {
503
575
  this.changed();
504
576
  return true;
505
577
  }
578
+ /**
579
+ * Forgets the presses on a row the server has just re-rendered.
580
+ *
581
+ * 히스토리 응답의 행은 뷰어별 `myReactions`를 싣고 오므로 그 값이 서버의
582
+ * 값이다. 누름을 남겨 두면 그 뒤에 온 거절이 더 새로운 진실 위에 옛 값을
583
+ * 덮어쓴다. 행 전체 단위인 것은 페이지가 그 행의 이모지 전부를 다시 그려
584
+ * 주기 때문이다.
585
+ */
586
+ serverRendered(messageId) {
587
+ if (this.presses.size === 0) return;
588
+ const prefix = `${messageId}\0`;
589
+ for (const key of this.presses.keys()) {
590
+ if (key.startsWith(prefix)) this.presses.delete(key);
591
+ }
592
+ }
506
593
  /** Makes `items` safe to mutate: a copy, if the current one was handed out. */
507
594
  own() {
508
595
  if (!this.shared) return;
@@ -517,6 +604,9 @@ var Timeline = class {
517
604
  function emptied(message) {
518
605
  return { ...message, body: {}, deletedAt: message.deletedAt ?? Date.now() };
519
606
  }
607
+ function pairKey(messageId, emoji) {
608
+ return `${messageId}\0${emoji}`;
609
+ }
520
610
  function createTimeline(options) {
521
611
  return new Timeline(options);
522
612
  }
@@ -716,17 +806,49 @@ var Room = class extends Emitter {
716
806
  /**
717
807
  * Adds a reaction. Idempotent, like the frame.
718
808
  *
719
- * The ack updates the row's `myReactions` (not its count -- see below),
720
- * so the "I reacted" state is right even if the broadcast is missed.
809
+ * The row's `myReactions` moves **before the frame goes out** and rolls
810
+ * back if the server refuses; its count stays the server's. See
811
+ * `toggleReaction`.
721
812
  */
722
813
  async react(messageId, emoji) {
723
- await this.chat.send("react", { roomId: await this.resolveId("reacting"), messageId, emoji, op: "add" });
724
- this.timeline.reaction(messageId, emoji, void 0, true);
814
+ await this.toggleReaction(messageId, emoji, true);
725
815
  }
726
- /** Removes a reaction. Idempotent; the ack clears it from `myReactions`. */
816
+ /** Removes a reaction. Idempotent, and optimistic the same way `react` is. */
727
817
  async unreact(messageId, emoji) {
728
- await this.chat.send("react", { roomId: await this.resolveId("reacting"), messageId, emoji, op: "remove" });
729
- this.timeline.reaction(messageId, emoji, void 0, false);
818
+ await this.toggleReaction(messageId, emoji, false);
819
+ }
820
+ /**
821
+ * Moves `myReactions` now, sends the frame after.
822
+ *
823
+ * 누른 값은 (사용자, 이모지)로 로컬에서 정해지고 엔진은 멱등이므로 ack를
824
+ * 기다릴 이유가 없다 — 기다리면 누른 느낌이 왕복 시간만큼 늦는다. 소비자가
825
+ * 자기 낙관 계층을 덧대면 이 필드의 주인이 둘이 되므로, SDK가 한다.
826
+ * **발행은 다르다**: `before_publish` 훅이 본문을 바꿀 수 있어 미리 그릴 값이
827
+ * 로컬에 없다. 그래서 `send()`는 낙관적이지 않다.
828
+ *
829
+ * 개수는 옮기지 않는다. ack가 오기 전에 남이 같은 이모지를 누르면 로컬
830
+ * +1/-1은 서버가 보낸 수와 다른 값이 되고, 그것을 고칠 이벤트는 이미
831
+ * 지나갔다. 또 ack와 방 프레임은 다른 길로 와 순서가 없으므로, 늦게 온 내
832
+ * ack(count 1)가 앞서 온 남의 이벤트(count 2)를 되돌린다.
833
+ *
834
+ * 거절·타임아웃·끊김이면 되돌리지만, 그 사이 더 새로운 값이 자리를 차지했다면
835
+ * 두고 나온다(`Timeline.settleReaction`).
836
+ */
837
+ async toggleReaction(messageId, emoji, mine) {
838
+ const press = this.timeline.pressReaction(messageId, emoji, mine);
839
+ try {
840
+ await this.chat.sendFrame("react", {
841
+ roomId: await this.resolveId("reacting"),
842
+ messageId,
843
+ emoji,
844
+ op: mine ? "add" : "remove"
845
+ });
846
+ } catch (err) {
847
+ if (press !== void 0) this.timeline.settleReaction(press, false);
848
+ throw err;
849
+ }
850
+ if (press !== void 0) this.timeline.settleReaction(press, true);
851
+ else this.timeline.reaction(messageId, emoji, void 0, mine);
730
852
  }
731
853
  /**
732
854
  * Moves this user's read cursor.
@@ -738,7 +860,7 @@ var Room = class extends Emitter {
738
860
  async markRead(seq, options = {}) {
739
861
  const data = { roomId: await this.resolveId("marking read"), seq };
740
862
  if (options.threadId !== void 0) data["threadId"] = options.threadId;
741
- return await this.chat.send("read", data);
863
+ return await this.chat.sendFrame("read", data);
742
864
  }
743
865
  /**
744
866
  * Says this user is typing.
@@ -756,7 +878,7 @@ var Room = class extends Emitter {
756
878
  */
757
879
  typing() {
758
880
  try {
759
- void this.chat.send("typing", { roomId: this.requireId("typing") }).catch(() => {
881
+ void this.chat.sendFrame("typing", { roomId: this.requireId("typing") }).catch(() => {
760
882
  });
761
883
  } catch {
762
884
  }
@@ -790,6 +912,7 @@ var Room = class extends Emitter {
790
912
  });
791
913
  }
792
914
  /**
915
+ * @internal
793
916
  * Re-subscribes after a reconnect. Called by the client.
794
917
  *
795
918
  * The test is "was this room ever asked for", not "did the last
@@ -807,6 +930,7 @@ var Room = class extends Emitter {
807
930
  await this.subscribe();
808
931
  }
809
932
  /**
933
+ * @internal
810
934
  * Reports a failure no caller was waiting for, and repairs.
811
935
  *
812
936
  * 백그라운드 실패(재접속 뒤 다시 구독, 구멍 메우기)에는 거절을 받을 호출자가
@@ -837,13 +961,13 @@ var Room = class extends Emitter {
837
961
  */
838
962
  async subscribeFrame(data) {
839
963
  try {
840
- return { ack: await this.chat.send("subscribe", data), wasReset: false };
964
+ return { ack: await this.chat.sendFrame("subscribe", data), wasReset: false };
841
965
  } catch (err) {
842
966
  if (err.code !== "cursor_too_old") throw err;
843
967
  this.timeline.discard();
844
968
  const retry = { ...data };
845
969
  delete retry["since"];
846
- return { ack: await this.chat.send("subscribe", retry), wasReset: true };
970
+ return { ack: await this.chat.sendFrame("subscribe", retry), wasReset: true };
847
971
  }
848
972
  }
849
973
  async unsubscribe() {
@@ -852,7 +976,7 @@ var Room = class extends Emitter {
852
976
  this.subscribed = false;
853
977
  this.generation++;
854
978
  this.subscribing = void 0;
855
- await this.chat.send("unsubscribe", { roomId: this.id });
979
+ await this.chat.sendFrame("unsubscribe", { roomId: this.id });
856
980
  }
857
981
  /**
858
982
  * The room's id, or a refusal.
@@ -897,9 +1021,9 @@ var Room = class extends Emitter {
897
1021
  if (input.replyTo !== void 0) frame["replyTo"] = input.replyTo;
898
1022
  if (input.threadId !== void 0) frame["threadId"] = input.threadId;
899
1023
  if (input.meta !== void 0) frame["meta"] = input.meta;
900
- return await this.chat.send("publish", frame);
1024
+ return await this.chat.sendFrame("publish", frame);
901
1025
  }
902
- /** Routes a frame the client decided belongs to this room. */
1026
+ /** @internal Routes a frame the client decided belongs to this room. */
903
1027
  handle(type, data) {
904
1028
  switch (type) {
905
1029
  case "message.created":
@@ -972,6 +1096,8 @@ var ChatClient = class extends Emitter {
972
1096
  connectionId;
973
1097
  hello;
974
1098
  options;
1099
+ /** 소켓 주소. 상수이고, 테스트만 `endpoint`로 바꾼다. */
1100
+ socketURL;
975
1101
  makeSocket;
976
1102
  socket;
977
1103
  heartbeat;
@@ -1010,6 +1136,7 @@ var ChatClient = class extends Emitter {
1010
1136
  constructor(options) {
1011
1137
  super();
1012
1138
  this.options = options;
1139
+ this.socketURL = options.endpoint ?? ChatEndpoint;
1013
1140
  const ctor = options.WebSocket ?? globalThis.WebSocket;
1014
1141
  if (ctor === void 0) {
1015
1142
  throw new TypeError(
@@ -1018,7 +1145,7 @@ var ChatClient = class extends Emitter {
1018
1145
  }
1019
1146
  this.makeSocket = ctor;
1020
1147
  this.rest = new Rest({
1021
- url: options.restURL ?? restURLFrom(options.url),
1148
+ url: restURLFrom(this.socketURL),
1022
1149
  key: options.key,
1023
1150
  token: async () => this.lastToken,
1024
1151
  refreshToken: () => this.refreshToken(),
@@ -1093,17 +1220,23 @@ var ChatClient = class extends Emitter {
1093
1220
  /**
1094
1221
  * The unread totals across every room this user is a member of.
1095
1222
  *
1096
- * The field names are the route's own: `unread` and `unreadMentions`,
1097
- * **not** the `total`/`mentions` that `hello.unread` uses for the same
1098
- * two numbers. The server says it both ways and the SDK does not pick
1099
- * a third; renaming here would mean a consumer reading the protocol
1100
- * document finds a name that does not exist in either place.
1223
+ * `{total, mentions}` — `chat.hello.unread`와 **같은 이름**이다. 와이어는
1224
+ * 같은 두 숫자를 두 가지로 부르고(hello는 `total`/`mentions`, 이 라우트는
1225
+ * `unread`/`unreadMentions`), 그것을 그대로 넘기면 배지 하나를 그리는
1226
+ * 코드가 어디서 읽었느냐에 따라 다른 필드를 봐야 한다. 두 출처가 한 타입
1227
+ * (`UnreadCounts`)이면 그 분기가 아예 없다.
1101
1228
  *
1102
1229
  * `roomsCapped` means the totals cover a subset -- this route does not
1103
1230
  * page, so past 500 rooms it stops counting and says so.
1104
1231
  */
1105
1232
  async unread() {
1106
- return this.rest.get("/v1/me/unread");
1233
+ const body = await this.rest.get("/v1/me/unread");
1234
+ return {
1235
+ total: body.unread,
1236
+ mentions: body.unreadMentions,
1237
+ ...body.roomsCapped === void 0 ? {} : { roomsCapped: body.roomsCapped },
1238
+ rooms: (body.rooms ?? []).map((r) => ({ roomId: r.roomId, total: r.unread, mentions: r.unreadMentions }))
1239
+ };
1107
1240
  }
1108
1241
  /**
1109
1242
  * Updates this user's own profile.
@@ -1144,6 +1277,7 @@ var ChatClient = class extends Emitter {
1144
1277
  return room;
1145
1278
  }
1146
1279
  /**
1280
+ * @internal
1147
1281
  * Files a room under its id once `subscribe` has resolved one.
1148
1282
  *
1149
1283
  * A room addressed by key is filed under `key:<key>`, and every push
@@ -1267,6 +1401,7 @@ var ChatClient = class extends Emitter {
1267
1401
  this.emit("error", err);
1268
1402
  }
1269
1403
  /**
1404
+ * @internal
1270
1405
  * Resolves once the connection is open. Used by `Room.subscribe`.
1271
1406
  *
1272
1407
  * 연결 전에 부른 `subscribe()`를 `closed`로 거절하면 소비자는 "언제 다시
@@ -1288,8 +1423,16 @@ var ChatClient = class extends Emitter {
1288
1423
  else w.reject(err);
1289
1424
  }
1290
1425
  }
1291
- /** Sends a frame and resolves with its ack, or rejects with its error. */
1292
- send(type, data, timeoutMs = 15e3) {
1426
+ /**
1427
+ * @internal
1428
+ * Sends a raw frame and resolves with its ack, or rejects with its error.
1429
+ *
1430
+ * `Room`이 자기 프레임을 내보내는 통로다. 예전 이름은 `chat.send()`였고,
1431
+ * 그 이름은 `room.send()`(메시지 발행) 옆에서 "이걸로도 보낼 수 있나"로
1432
+ * 읽혔다 — 실제로는 와이어 프레임 이름을 직접 적는 탈출구라 계약이
1433
+ * 바뀌면 같이 깨진다. 1.0에서 얼릴 표면에 둘 것이 아니다.
1434
+ */
1435
+ sendFrame(type, data, timeoutMs = 15e3) {
1293
1436
  const socket = this.socket;
1294
1437
  if (socket === void 0 || this.state !== "open") {
1295
1438
  return Promise.reject(new ChatError("closed", `cannot send ${type}: the connection is ${this.state}`));
@@ -1343,7 +1486,7 @@ var ChatClient = class extends Emitter {
1343
1486
  if (this.stopped) {
1344
1487
  throw new ChatError("closed", "the client was closed while connecting");
1345
1488
  }
1346
- const socket = new this.makeSocket(`${this.options.url}/v1/ws?v=1`);
1489
+ const socket = new this.makeSocket(`${this.socketURL}/v1/ws?v=1`);
1347
1490
  this.socket = socket;
1348
1491
  return new Promise((resolve, reject) => {
1349
1492
  let settled = false;
@@ -1505,10 +1648,6 @@ var ChatClient = class extends Emitter {
1505
1648
  }
1506
1649
  async authData() {
1507
1650
  const data = { key: this.options.key };
1508
- if (this.options.externalToken !== void 0) {
1509
- data["externalToken"] = await this.options.externalToken();
1510
- return data;
1511
- }
1512
1651
  const token = await this.options.token();
1513
1652
  this.lastToken = token;
1514
1653
  data["token"] = token;
@@ -1523,7 +1662,6 @@ var ChatClient = class extends Emitter {
1523
1662
  * 각자 부르지 않도록 진행 중인 것 하나를 나눠 쓴다.
1524
1663
  */
1525
1664
  refreshToken() {
1526
- if (this.options.externalToken !== void 0) return Promise.resolve(void 0);
1527
1665
  this.refreshing ??= (async () => {
1528
1666
  try {
1529
1667
  const token = await this.options.token();
@@ -1562,9 +1700,8 @@ function createChatClient(options) {
1562
1700
  // Annotate the CommonJS export names for ESM import in node:
1563
1701
  0 && (module.exports = {
1564
1702
  ChatClient,
1703
+ ChatEndpoint,
1565
1704
  ChatError,
1566
1705
  Room,
1567
- Timeline,
1568
- createChatClient,
1569
- createTimeline
1706
+ createChatClient
1570
1707
  });