@zextras/carbonio-ws-collaboration-ui-sdk 0.6.0 → 0.7.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.
@@ -40,12 +40,13 @@ __export(testing_exports, {
40
40
  buildReactionChangedEvent: () => buildReactionChangedEvent,
41
41
  buildReadMarker: () => buildReadMarker,
42
42
  buildReadUpdatedEvent: () => buildReadUpdatedEvent,
43
+ buildRoomDescriptionChangedEvent: () => buildRoomDescriptionChangedEvent,
43
44
  buildRoomHistoryClearedEvent: () => buildRoomHistoryClearedEvent,
44
45
  buildRoomMemberAddedEvent: () => buildRoomMemberAddedEvent,
45
46
  buildRoomMemberRemovedEvent: () => buildRoomMemberRemovedEvent,
47
+ buildRoomNameChangedEvent: () => buildRoomNameChangedEvent,
46
48
  buildRoomPictureChangedEvent: () => buildRoomPictureChangedEvent,
47
49
  buildRoomPictureDeletedEvent: () => buildRoomPictureDeletedEvent,
48
- buildRoomUpdatedEvent: () => buildRoomUpdatedEvent,
49
50
  buildSearchResponse: () => buildSearchResponse,
50
51
  buildSystemEvent: () => buildSystemEvent,
51
52
  buildSystemEventTimelineItem: () => buildSystemEventTimelineItem,
@@ -115,19 +116,21 @@ function buildPinnedMessage(overrides = {}) {
115
116
  };
116
117
  }
117
118
  function buildInboxEntry(overrides = {}) {
119
+ const { room, ...rest } = overrides;
118
120
  const roomId = overrides.roomId ?? nextId("room");
119
121
  return {
120
122
  roomId,
123
+ unreadCount: 0,
124
+ muted: false,
125
+ markers: [],
126
+ ...rest,
121
127
  room: {
122
128
  id: roomId,
123
129
  type: "group",
124
130
  members: [buildInboxMember()],
125
- ...overrides.room ?? {}
126
- },
127
- unreadCount: 0,
128
- muted: false,
129
- markers: [],
130
- ...overrides
131
+ updatedAt: "2026-01-01T00:00:00Z",
132
+ ...room
133
+ }
131
134
  };
132
135
  }
133
136
  function buildInboxResponse(entries) {
@@ -166,17 +169,16 @@ function buildPresenceStatus(overrides = {}) {
166
169
  ...overrides
167
170
  };
168
171
  }
169
- var EVENT_SENT_DATE = "2026-08-01T10:00:05.123456Z";
172
+ var EVENT_INSTANT = "2026-08-01T10:00:05.123456Z";
170
173
  function buildMessageReceivedEvent(message, overrides = {}) {
171
- return { type: "MessageReceived", sentDate: EVENT_SENT_DATE, message, ...overrides };
174
+ return { type: "MessageReceived", message, ...overrides };
172
175
  }
173
176
  function buildMessageForwardedEvent(message, overrides = {}) {
174
- return { type: "MessageForwarded", sentDate: EVENT_SENT_DATE, message, ...overrides };
177
+ return { type: "MessageForwarded", message, ...overrides };
175
178
  }
176
179
  function buildMessageEditedEvent(overrides = {}) {
177
180
  return {
178
181
  type: "MessageEdited",
179
- sentDate: EVENT_SENT_DATE,
180
182
  messageId: nextId("msg"),
181
183
  roomId: "room-default",
182
184
  text: "edited text",
@@ -187,7 +189,6 @@ function buildMessageEditedEvent(overrides = {}) {
187
189
  function buildMessageDeletedEvent(overrides = {}) {
188
190
  return {
189
191
  type: "MessageDeleted",
190
- sentDate: EVENT_SENT_DATE,
191
192
  messageId: nextId("msg"),
192
193
  roomId: "room-default",
193
194
  deletedBy: "user-default",
@@ -198,7 +199,6 @@ function buildMessageDeletedEvent(overrides = {}) {
198
199
  function buildReadUpdatedEvent(overrides = {}) {
199
200
  return {
200
201
  type: "ReadUpdated",
201
- sentDate: EVENT_SENT_DATE,
202
202
  roomId: "room-default",
203
203
  userId: nextId("user"),
204
204
  itemCreatedAt: "2026-08-01T10:00:00Z",
@@ -206,14 +206,15 @@ function buildReadUpdatedEvent(overrides = {}) {
206
206
  };
207
207
  }
208
208
  function buildReactionChangedEvent(overrides = {}) {
209
+ const operation = overrides.operation ?? "added";
209
210
  return {
210
211
  type: "ReactionChanged",
211
- sentDate: EVENT_SENT_DATE,
212
212
  messageId: nextId("msg"),
213
213
  roomId: "room-default",
214
214
  userId: "user-default",
215
215
  reaction: "\u{1F44D}",
216
- operation: "added",
216
+ operation,
217
+ ...operation === "removed" ? { deletedAt: EVENT_INSTANT } : { updatedAt: EVENT_INSTANT },
217
218
  ...overrides
218
219
  };
219
220
  }
@@ -222,7 +223,6 @@ function buildMessagePinnedEvent(overrides = {}) {
222
223
  const roomId = overrides.roomId ?? "room-default";
223
224
  return {
224
225
  type: "MessagePinned",
225
- sentDate: EVENT_SENT_DATE,
226
226
  messageId,
227
227
  roomId,
228
228
  pinnedBy: "user-default",
@@ -234,7 +234,6 @@ function buildMessagePinnedEvent(overrides = {}) {
234
234
  function buildMessageUnpinnedEvent(overrides = {}) {
235
235
  return {
236
236
  type: "MessageUnpinned",
237
- sentDate: EVENT_SENT_DATE,
238
237
  messageId: nextId("msg"),
239
238
  roomId: "room-default",
240
239
  unpinnedBy: "user-default",
@@ -242,119 +241,127 @@ function buildMessageUnpinnedEvent(overrides = {}) {
242
241
  ...overrides
243
242
  };
244
243
  }
245
- function buildRoomUpdatedEvent(overrides = {}) {
244
+ function buildRoomNameChangedEvent(overrides = {}) {
246
245
  return {
247
- type: "roomUpdated",
248
- sentDate: EVENT_SENT_DATE,
246
+ type: "roomNameChanged",
249
247
  roomId: "room-default",
250
248
  name: "Room name",
249
+ updatedBy: "user-default",
250
+ systemEventId: nextId("event"),
251
+ systemEventCreatedAt: EVENT_INSTANT,
252
+ ...overrides
253
+ };
254
+ }
255
+ function buildRoomDescriptionChangedEvent(overrides = {}) {
256
+ return {
257
+ type: "roomDescriptionChanged",
258
+ roomId: "room-default",
251
259
  description: "Room description",
252
260
  updatedBy: "user-default",
253
- nameSystemEventId: nextId("event"),
261
+ systemEventId: nextId("event"),
262
+ systemEventCreatedAt: EVENT_INSTANT,
254
263
  ...overrides
255
264
  };
256
265
  }
257
266
  function buildRoomPictureChangedEvent(overrides = {}) {
258
267
  return {
259
268
  type: "roomPictureChanged",
260
- sentDate: EVENT_SENT_DATE,
261
269
  roomId: "room-default",
262
270
  updatedAt: "2026-08-01T10:00:05.120Z",
263
271
  updatedBy: "user-default",
264
272
  systemEventId: nextId("event"),
273
+ systemEventCreatedAt: EVENT_INSTANT,
265
274
  ...overrides
266
275
  };
267
276
  }
268
277
  function buildRoomPictureDeletedEvent(overrides = {}) {
269
278
  return {
270
279
  type: "roomPictureDeleted",
271
- sentDate: EVENT_SENT_DATE,
272
280
  roomId: "room-default",
273
281
  deletedBy: "user-default",
274
282
  systemEventId: nextId("event"),
283
+ systemEventCreatedAt: EVENT_INSTANT,
275
284
  ...overrides
276
285
  };
277
286
  }
278
287
  function buildRoomHistoryClearedEvent(overrides = {}) {
279
288
  return {
280
289
  type: "roomHistoryCleared",
281
- sentDate: EVENT_SENT_DATE,
282
290
  roomId: "room-default",
283
291
  clearedAt: "2026-08-01T10:00:05.120Z",
284
292
  clearedBy: "user-default",
285
293
  systemEventId: nextId("event"),
294
+ systemEventCreatedAt: EVENT_INSTANT,
286
295
  ...overrides
287
296
  };
288
297
  }
289
298
  function buildRoomMemberAddedEvent(overrides = {}) {
290
299
  return {
291
300
  type: "roomMemberAdded",
292
- sentDate: EVENT_SENT_DATE,
293
301
  roomId: "room-default",
294
302
  userId: "user-added",
295
303
  isOwner: false,
296
304
  addedBy: "user-default",
297
305
  systemEventId: nextId("event"),
306
+ systemEventCreatedAt: EVENT_INSTANT,
298
307
  ...overrides
299
308
  };
300
309
  }
301
310
  function buildRoomMemberRemovedEvent(overrides = {}) {
302
311
  return {
303
312
  type: "roomMemberRemoved",
304
- sentDate: EVENT_SENT_DATE,
305
313
  roomId: "room-default",
306
314
  userId: "user-removed",
307
315
  removedBy: "user-default",
308
316
  systemEventId: nextId("event"),
317
+ systemEventCreatedAt: EVENT_INSTANT,
309
318
  ...overrides
310
319
  };
311
320
  }
312
321
  function buildMeetingStartedEvent(overrides = {}) {
313
322
  return {
314
323
  type: "meetingStarted",
315
- sentDate: EVENT_SENT_DATE,
316
324
  meetingId: "meeting-default",
317
325
  starterUser: "user-default",
318
326
  startedAt: "2026-08-01T10:00:05.120Z",
319
327
  systemEventId: nextId("event"),
328
+ systemEventCreatedAt: EVENT_INSTANT,
320
329
  ...overrides
321
330
  };
322
331
  }
323
332
  function buildMeetingStoppedEvent(overrides = {}) {
324
333
  return {
325
334
  type: "meetingStopped",
326
- sentDate: EVENT_SENT_DATE,
327
335
  meetingId: "meeting-default",
328
336
  endedBy: "user-default",
329
337
  systemEventId: nextId("event"),
338
+ systemEventCreatedAt: EVENT_INSTANT,
339
+ durationSec: 60,
330
340
  ...overrides
331
341
  };
332
342
  }
333
343
  function buildMeetingDeclinedEvent(overrides = {}) {
334
344
  return {
335
345
  type: "meetingDeclined",
336
- sentDate: EVENT_SENT_DATE,
337
346
  meetingId: "meeting-default",
338
347
  userId: "user-default",
339
348
  systemEventId: nextId("event"),
349
+ systemEventCreatedAt: EVENT_INSTANT,
340
350
  ...overrides
341
351
  };
342
352
  }
343
353
  function buildTypingEvent(overrides = {}) {
344
354
  return {
345
355
  type: "Typing",
346
- sentDate: EVENT_SENT_DATE,
347
356
  roomId: "room-default",
348
357
  userId: "user-default",
349
358
  status: "started",
350
- timestamp: EVENT_SENT_DATE,
351
359
  ...overrides
352
360
  };
353
361
  }
354
362
  function buildPresenceChangedEvent(overrides = {}) {
355
363
  return {
356
364
  type: "PresenceChanged",
357
- sentDate: EVENT_SENT_DATE,
358
365
  userId: "user-default",
359
366
  online: true,
360
367
  ...overrides
@@ -431,12 +438,13 @@ function createFakeFetch(responses) {
431
438
  buildReactionChangedEvent,
432
439
  buildReadMarker,
433
440
  buildReadUpdatedEvent,
441
+ buildRoomDescriptionChangedEvent,
434
442
  buildRoomHistoryClearedEvent,
435
443
  buildRoomMemberAddedEvent,
436
444
  buildRoomMemberRemovedEvent,
445
+ buildRoomNameChangedEvent,
437
446
  buildRoomPictureChangedEvent,
438
447
  buildRoomPictureDeletedEvent,
439
- buildRoomUpdatedEvent,
440
448
  buildSearchResponse,
441
449
  buildSystemEvent,
442
450
  buildSystemEventTimelineItem,
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/testing/index.ts","../../src/testing/fixtures.ts"],"sourcesContent":["/*\n * SPDX-FileCopyrightText: 2026 Zextras <https://www.zextras.com>\n *\n * SPDX-License-Identifier: AGPL-3.0-only\n */\n\nimport type { FetchLike, RequestInitLike, ResponseLike, VersionStore } from '../types/ports';\n\nexport {\n\tbuildInboxEntry,\n\tbuildInboxMember,\n\tbuildInboxResponse,\n\tbuildMeetingDeclinedEvent,\n\tbuildMeetingStartedEvent,\n\tbuildMeetingStoppedEvent,\n\tbuildMessage,\n\tbuildMessageDeletedEvent,\n\tbuildMessageEditedEvent,\n\tbuildMessageForwardedEvent,\n\tbuildMessagePinnedEvent,\n\tbuildMessageReceivedEvent,\n\tbuildMessageTimelineItem,\n\tbuildMessageUnpinnedEvent,\n\tbuildPinnedMessage,\n\tbuildPresenceChangedEvent,\n\tbuildPresenceStatus,\n\tbuildReactionChangedEvent,\n\tbuildReadMarker,\n\tbuildReadUpdatedEvent,\n\tbuildRoomHistoryClearedEvent,\n\tbuildRoomMemberAddedEvent,\n\tbuildRoomMemberRemovedEvent,\n\tbuildRoomPictureChangedEvent,\n\tbuildRoomPictureDeletedEvent,\n\tbuildRoomUpdatedEvent,\n\tbuildSearchResponse,\n\tbuildSystemEvent,\n\tbuildSystemEventTimelineItem,\n\tbuildTimelineResponse,\n\tbuildTypingEvent,\n\tbuildWireMessage\n} from './fixtures';\n\nexport type MemoryVersionStore = VersionStore & {\n\thistory: Array<string>;\n};\n\nexport function createMemoryVersionStore(\n\tinitialVersion: string | undefined,\n\tsupportedVersions: ReadonlyArray<string>\n): MemoryVersionStore {\n\tlet current = initialVersion;\n\tconst history: Array<string> = [];\n\treturn {\n\t\thistory,\n\t\tgetApiVersion: (): string | undefined => current,\n\t\tsetApiVersion: (version: string): void => {\n\t\t\tcurrent = version;\n\t\t\thistory.push(version);\n\t\t},\n\t\tgetSupportedVersions: (): ReadonlyArray<string> => supportedVersions\n\t};\n}\n\nexport type FakeResponseInit = {\n\tstatus?: number;\n\theaders?: Record<string, string>;\n\tjsonBody?: unknown;\n\tblobBody?: unknown;\n};\n\nexport function fakeResponse(init: FakeResponseInit = {}): ResponseLike {\n\tconst status = init.status ?? 200;\n\tconst lowerCased: Record<string, string> = {};\n\tObject.entries(init.headers ?? {}).forEach(([key, value]) => {\n\t\tlowerCased[key.toLowerCase()] = value;\n\t});\n\tif (init.jsonBody !== undefined && lowerCased['content-type'] === undefined) {\n\t\tlowerCased['content-type'] = 'application/json';\n\t}\n\treturn {\n\t\tok: status >= 200 && status < 300,\n\t\tstatus,\n\t\theaders: {\n\t\t\tget: (name: string): string | null => lowerCased[name.toLowerCase()] ?? null\n\t\t},\n\t\tjson: (): Promise<unknown> => Promise.resolve(init.jsonBody),\n\t\tblob: (): Promise<unknown> => Promise.resolve(init.blobBody)\n\t};\n}\n\nexport type RecordedCall = {\n\turl: string;\n\tinit: RequestInitLike;\n};\n\nexport type FakeFetch = {\n\tfetch: FetchLike;\n\tcalls: Array<RecordedCall>;\n};\n\n/**\n * FIFO fetch stub: each call consumes the next queued response and records\n * `(url, init)` for assertions. Throws when the queue is exhausted, so a test\n * making more requests than expected fails loudly instead of hanging.\n */\nexport function createFakeFetch(responses: Array<ResponseLike>): FakeFetch {\n\tconst queue = [...responses];\n\tconst calls: Array<RecordedCall> = [];\n\treturn {\n\t\tcalls,\n\t\tfetch: (url: string, init: RequestInitLike): Promise<ResponseLike> => {\n\t\t\tcalls.push({ url, init });\n\t\t\tconst next = queue.shift();\n\t\t\tif (!next) {\n\t\t\t\treturn Promise.reject(new Error('createFakeFetch: no more queued responses'));\n\t\t\t}\n\t\t\treturn Promise.resolve(next);\n\t\t}\n\t};\n}\n","/*\n * SPDX-FileCopyrightText: 2026 Zextras <https://www.zextras.com>\n *\n * SPDX-License-Identifier: AGPL-3.0-only\n */\n\nimport type {\n\tWireInboxEntry,\n\tWireInboxMember,\n\tWireInboxResponse,\n\tWireMessage,\n\tWireMessageSearchResult,\n\tWirePinnedMessage,\n\tWirePresenceStatus,\n\tWireReadMarker,\n\tWireSystemEvent,\n\tWireTimeline,\n\tWireTimelineItem,\n\tWireTimelineMessage\n} from '../types/api';\nimport type { components as EventComponents } from '../types/asyncapi';\n\ntype EventSchemas = EventComponents['schemas'];\n\nlet counter = 0;\nfunction nextId(prefix: string): string {\n\tcounter += 1;\n\treturn `${prefix}-${counter.toString().padStart(4, '0')}`;\n}\n\nexport function buildInboxMember(overrides: Partial<WireInboxMember> = {}): WireInboxMember {\n\treturn {\n\t\tuserId: nextId('user'),\n\t\towner: false,\n\t\tonline: false,\n\t\t...overrides\n\t};\n}\n\n/** The required fields `TimelineMessage` and `Message` share. */\nfunction buildMessageFields(): Pick<\n\tWireMessage,\n\t'id' | 'roomId' | 'senderId' | 'text' | 'createdAt'\n> {\n\treturn {\n\t\tid: nextId('msg'),\n\t\troomId: 'room-default',\n\t\tsenderId: 'user-default',\n\t\ttext: 'hello world',\n\t\tcreatedAt: '2026-08-01T10:00:00Z'\n\t};\n}\n\nexport function buildWireMessage(\n\toverrides: Partial<WireTimelineMessage> = {}\n): WireTimelineMessage {\n\treturn { ...buildMessageFields(), ...overrides };\n}\n\nexport function buildReadMarker(overrides: Partial<WireReadMarker> = {}): WireReadMarker {\n\treturn {\n\t\tuserId: nextId('user'),\n\t\titemCreatedAt: '2026-08-01T10:00:00Z',\n\t\t...overrides\n\t};\n}\n\n/** The `Message` DTO: write responses (send, edit, forward) and search entries. */\nexport function buildMessage(overrides: Partial<WireMessage> = {}): WireMessage {\n\treturn { ...buildMessageFields(), ...overrides };\n}\n\nexport function buildSearchResponse(\n\tmessages: Array<WireMessage>,\n\thasMore = false\n): WireMessageSearchResult {\n\treturn { messages, hasMore };\n}\n\nexport function buildPinnedMessage(overrides: Partial<WirePinnedMessage> = {}): WirePinnedMessage {\n\tconst messageId = overrides.messageId ?? nextId('msg');\n\tconst roomId = overrides.roomId ?? 'room-default';\n\treturn {\n\t\tmessageId,\n\t\troomId,\n\t\tpinnedBy: 'user-default',\n\t\tpinnedAt: '2026-08-01T12:00:00Z',\n\t\tmessage: buildWireMessage({\n\t\t\tid: messageId,\n\t\t\troomId,\n\t\t\ttext: 'pinned text',\n\t\t\tsenderId: 'user-sender'\n\t\t}),\n\t\t...overrides\n\t};\n}\n\nexport function buildInboxEntry(overrides: Partial<WireInboxEntry> = {}): WireInboxEntry {\n\tconst roomId = overrides.roomId ?? nextId('room');\n\treturn {\n\t\troomId,\n\t\troom: {\n\t\t\tid: roomId,\n\t\t\ttype: 'group',\n\t\t\tmembers: [buildInboxMember()],\n\t\t\t...(overrides.room ?? {})\n\t\t},\n\t\tunreadCount: 0,\n\t\tmuted: false,\n\t\tmarkers: [],\n\t\t...overrides\n\t};\n}\n\nexport function buildInboxResponse(entries: Array<WireInboxEntry>): WireInboxResponse {\n\treturn { conversations: entries };\n}\n\nexport function buildSystemEvent(overrides: Partial<WireSystemEvent> = {}): WireSystemEvent {\n\treturn {\n\t\tid: nextId('event'),\n\t\troomId: 'room-default',\n\t\ttype: 'ROOM_CREATED',\n\t\tactorId: 'user-default',\n\t\tcontent: {},\n\t\tcreatedAt: '2026-08-01T08:00:00Z',\n\t\t...overrides\n\t};\n}\n\nexport function buildMessageTimelineItem(message: WireTimelineMessage): WireTimelineItem {\n\treturn { itemType: 'message', createdAt: message.createdAt, message };\n}\n\nexport function buildSystemEventTimelineItem(event: WireSystemEvent): WireTimelineItem {\n\treturn { itemType: 'system_event', createdAt: event.createdAt, systemEvent: event };\n}\n\nexport function buildTimelineResponse(\n\titems: Array<WireTimelineItem>,\n\toverrides: Partial<Omit<WireTimeline, 'items'>> = {}\n): WireTimeline {\n\treturn {\n\t\titems,\n\t\thasMoreBefore: false,\n\t\thasMoreAfter: false,\n\t\tmarkers: [],\n\t\t...overrides\n\t};\n}\n\nexport function buildPresenceStatus(\n\toverrides: Partial<WirePresenceStatus> = {}\n): WirePresenceStatus {\n\treturn {\n\t\tuserId: 'user-default',\n\t\tonline: false,\n\t\t...overrides\n\t};\n}\n\n/**\n * Push events as the socket delivers them, `type` and `sentDate` included:\n * the shapes are the generated `asyncapi.yaml` schemas. `sentDate` carries\n * microseconds, like the backend's `OffsetDateTime.now()`.\n */\nconst EVENT_SENT_DATE = '2026-08-01T10:00:05.123456Z';\n\nexport function buildMessageReceivedEvent(\n\tmessage: WireTimelineMessage,\n\toverrides: Partial<Omit<EventSchemas['MessageReceived'], 'message'>> = {}\n): EventSchemas['MessageReceived'] {\n\treturn { type: 'MessageReceived', sentDate: EVENT_SENT_DATE, message, ...overrides };\n}\n\nexport function buildMessageForwardedEvent(\n\tmessage: WireTimelineMessage,\n\toverrides: Partial<Omit<EventSchemas['MessageForwarded'], 'message'>> = {}\n): EventSchemas['MessageForwarded'] {\n\treturn { type: 'MessageForwarded', sentDate: EVENT_SENT_DATE, message, ...overrides };\n}\n\nexport function buildMessageEditedEvent(\n\toverrides: Partial<EventSchemas['MessageEdited']> = {}\n): EventSchemas['MessageEdited'] {\n\treturn {\n\t\ttype: 'MessageEdited',\n\t\tsentDate: EVENT_SENT_DATE,\n\t\tmessageId: nextId('msg'),\n\t\troomId: 'room-default',\n\t\ttext: 'edited text',\n\t\teditedAt: '2026-08-01T10:00:05.120Z',\n\t\t...overrides\n\t};\n}\n\nexport function buildMessageDeletedEvent(\n\toverrides: Partial<EventSchemas['MessageDeleted']> = {}\n): EventSchemas['MessageDeleted'] {\n\treturn {\n\t\ttype: 'MessageDeleted',\n\t\tsentDate: EVENT_SENT_DATE,\n\t\tmessageId: nextId('msg'),\n\t\troomId: 'room-default',\n\t\tdeletedBy: 'user-default',\n\t\tdeletedAt: '2026-08-01T10:00:05.120Z',\n\t\t...overrides\n\t};\n}\n\nexport function buildReadUpdatedEvent(\n\toverrides: Partial<EventSchemas['ReadUpdated']> = {}\n): EventSchemas['ReadUpdated'] {\n\treturn {\n\t\ttype: 'ReadUpdated',\n\t\tsentDate: EVENT_SENT_DATE,\n\t\troomId: 'room-default',\n\t\tuserId: nextId('user'),\n\t\titemCreatedAt: '2026-08-01T10:00:00Z',\n\t\t...overrides\n\t};\n}\n\nexport function buildReactionChangedEvent(\n\toverrides: Partial<EventSchemas['ReactionChanged']> = {}\n): EventSchemas['ReactionChanged'] {\n\treturn {\n\t\ttype: 'ReactionChanged',\n\t\tsentDate: EVENT_SENT_DATE,\n\t\tmessageId: nextId('msg'),\n\t\troomId: 'room-default',\n\t\tuserId: 'user-default',\n\t\treaction: '👍',\n\t\toperation: 'added',\n\t\t...overrides\n\t};\n}\n\nexport function buildMessagePinnedEvent(\n\toverrides: Partial<EventSchemas['MessagePinned']> = {}\n): EventSchemas['MessagePinned'] {\n\tconst messageId = overrides.messageId ?? nextId('msg');\n\tconst roomId = overrides.roomId ?? 'room-default';\n\treturn {\n\t\ttype: 'MessagePinned',\n\t\tsentDate: EVENT_SENT_DATE,\n\t\tmessageId,\n\t\troomId,\n\t\tpinnedBy: 'user-default',\n\t\tmessage: buildWireMessage({ id: messageId, roomId }),\n\t\ttimestamp: '2026-08-01T10:00:05.120Z',\n\t\t...overrides\n\t};\n}\n\nexport function buildMessageUnpinnedEvent(\n\toverrides: Partial<EventSchemas['MessageUnpinned']> = {}\n): EventSchemas['MessageUnpinned'] {\n\treturn {\n\t\ttype: 'MessageUnpinned',\n\t\tsentDate: EVENT_SENT_DATE,\n\t\tmessageId: nextId('msg'),\n\t\troomId: 'room-default',\n\t\tunpinnedBy: 'user-default',\n\t\ttimestamp: '2026-08-01T10:00:05.120Z',\n\t\t...overrides\n\t};\n}\n\nexport function buildRoomUpdatedEvent(\n\toverrides: Partial<EventSchemas['RoomUpdated']> = {}\n): EventSchemas['RoomUpdated'] {\n\treturn {\n\t\ttype: 'roomUpdated',\n\t\tsentDate: EVENT_SENT_DATE,\n\t\troomId: 'room-default',\n\t\tname: 'Room name',\n\t\tdescription: 'Room description',\n\t\tupdatedBy: 'user-default',\n\t\tnameSystemEventId: nextId('event'),\n\t\t...overrides\n\t};\n}\n\nexport function buildRoomPictureChangedEvent(\n\toverrides: Partial<EventSchemas['RoomPictureChanged']> = {}\n): EventSchemas['RoomPictureChanged'] {\n\treturn {\n\t\ttype: 'roomPictureChanged',\n\t\tsentDate: EVENT_SENT_DATE,\n\t\troomId: 'room-default',\n\t\tupdatedAt: '2026-08-01T10:00:05.120Z',\n\t\tupdatedBy: 'user-default',\n\t\tsystemEventId: nextId('event'),\n\t\t...overrides\n\t};\n}\n\nexport function buildRoomPictureDeletedEvent(\n\toverrides: Partial<EventSchemas['RoomPictureDeleted']> = {}\n): EventSchemas['RoomPictureDeleted'] {\n\treturn {\n\t\ttype: 'roomPictureDeleted',\n\t\tsentDate: EVENT_SENT_DATE,\n\t\troomId: 'room-default',\n\t\tdeletedBy: 'user-default',\n\t\tsystemEventId: nextId('event'),\n\t\t...overrides\n\t};\n}\n\nexport function buildRoomHistoryClearedEvent(\n\toverrides: Partial<EventSchemas['RoomHistoryCleared']> = {}\n): EventSchemas['RoomHistoryCleared'] {\n\treturn {\n\t\ttype: 'roomHistoryCleared',\n\t\tsentDate: EVENT_SENT_DATE,\n\t\troomId: 'room-default',\n\t\tclearedAt: '2026-08-01T10:00:05.120Z',\n\t\tclearedBy: 'user-default',\n\t\tsystemEventId: nextId('event'),\n\t\t...overrides\n\t};\n}\n\nexport function buildRoomMemberAddedEvent(\n\toverrides: Partial<EventSchemas['RoomMemberAdded']> = {}\n): EventSchemas['RoomMemberAdded'] {\n\treturn {\n\t\ttype: 'roomMemberAdded',\n\t\tsentDate: EVENT_SENT_DATE,\n\t\troomId: 'room-default',\n\t\tuserId: 'user-added',\n\t\tisOwner: false,\n\t\taddedBy: 'user-default',\n\t\tsystemEventId: nextId('event'),\n\t\t...overrides\n\t};\n}\n\nexport function buildRoomMemberRemovedEvent(\n\toverrides: Partial<EventSchemas['RoomMemberRemoved']> = {}\n): EventSchemas['RoomMemberRemoved'] {\n\treturn {\n\t\ttype: 'roomMemberRemoved',\n\t\tsentDate: EVENT_SENT_DATE,\n\t\troomId: 'room-default',\n\t\tuserId: 'user-removed',\n\t\tremovedBy: 'user-default',\n\t\tsystemEventId: nextId('event'),\n\t\t...overrides\n\t};\n}\n\nexport function buildMeetingStartedEvent(\n\toverrides: Partial<EventSchemas['MeetingStarted']> = {}\n): EventSchemas['MeetingStarted'] {\n\treturn {\n\t\ttype: 'meetingStarted',\n\t\tsentDate: EVENT_SENT_DATE,\n\t\tmeetingId: 'meeting-default',\n\t\tstarterUser: 'user-default',\n\t\tstartedAt: '2026-08-01T10:00:05.120Z',\n\t\tsystemEventId: nextId('event'),\n\t\t...overrides\n\t};\n}\n\nexport function buildMeetingStoppedEvent(\n\toverrides: Partial<EventSchemas['MeetingStopped']> = {}\n): EventSchemas['MeetingStopped'] {\n\treturn {\n\t\ttype: 'meetingStopped',\n\t\tsentDate: EVENT_SENT_DATE,\n\t\tmeetingId: 'meeting-default',\n\t\tendedBy: 'user-default',\n\t\tsystemEventId: nextId('event'),\n\t\t...overrides\n\t};\n}\n\nexport function buildMeetingDeclinedEvent(\n\toverrides: Partial<EventSchemas['MeetingDeclined']> = {}\n): EventSchemas['MeetingDeclined'] {\n\treturn {\n\t\ttype: 'meetingDeclined',\n\t\tsentDate: EVENT_SENT_DATE,\n\t\tmeetingId: 'meeting-default',\n\t\tuserId: 'user-default',\n\t\tsystemEventId: nextId('event'),\n\t\t...overrides\n\t};\n}\n\nexport function buildTypingEvent(\n\toverrides: Partial<EventSchemas['Typing']> = {}\n): EventSchemas['Typing'] {\n\treturn {\n\t\ttype: 'Typing',\n\t\tsentDate: EVENT_SENT_DATE,\n\t\troomId: 'room-default',\n\t\tuserId: 'user-default',\n\t\tstatus: 'started',\n\t\ttimestamp: EVENT_SENT_DATE,\n\t\t...overrides\n\t};\n}\n\nexport function buildPresenceChangedEvent(\n\toverrides: Partial<EventSchemas['PresenceChanged']> = {}\n): EventSchemas['PresenceChanged'] {\n\treturn {\n\t\ttype: 'PresenceChanged',\n\t\tsentDate: EVENT_SENT_DATE,\n\t\tuserId: 'user-default',\n\t\tonline: true,\n\t\t...overrides\n\t};\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;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/fixtures.ts"],"sourcesContent":["/*\n * SPDX-FileCopyrightText: 2026 Zextras <https://www.zextras.com>\n *\n * SPDX-License-Identifier: AGPL-3.0-only\n */\n\nimport type { FetchLike, RequestInitLike, ResponseLike, VersionStore } from '../types/ports';\n\nexport {\n\tbuildInboxEntry,\n\tbuildInboxMember,\n\tbuildInboxResponse,\n\tbuildMeetingDeclinedEvent,\n\tbuildMeetingStartedEvent,\n\tbuildMeetingStoppedEvent,\n\tbuildMessage,\n\tbuildMessageDeletedEvent,\n\tbuildMessageEditedEvent,\n\tbuildMessageForwardedEvent,\n\tbuildMessagePinnedEvent,\n\tbuildMessageReceivedEvent,\n\tbuildMessageTimelineItem,\n\tbuildMessageUnpinnedEvent,\n\tbuildPinnedMessage,\n\tbuildPresenceChangedEvent,\n\tbuildPresenceStatus,\n\tbuildReactionChangedEvent,\n\tbuildReadMarker,\n\tbuildReadUpdatedEvent,\n\tbuildRoomHistoryClearedEvent,\n\tbuildRoomMemberAddedEvent,\n\tbuildRoomDescriptionChangedEvent,\n\tbuildRoomMemberRemovedEvent,\n\tbuildRoomNameChangedEvent,\n\tbuildRoomPictureChangedEvent,\n\tbuildRoomPictureDeletedEvent,\n\tbuildSearchResponse,\n\tbuildSystemEvent,\n\tbuildSystemEventTimelineItem,\n\tbuildTimelineResponse,\n\tbuildTypingEvent,\n\tbuildWireMessage\n} from './fixtures';\n\nexport type MemoryVersionStore = VersionStore & {\n\thistory: Array<string>;\n};\n\nexport function createMemoryVersionStore(\n\tinitialVersion: string | undefined,\n\tsupportedVersions: ReadonlyArray<string>\n): MemoryVersionStore {\n\tlet current = initialVersion;\n\tconst history: Array<string> = [];\n\treturn {\n\t\thistory,\n\t\tgetApiVersion: (): string | undefined => current,\n\t\tsetApiVersion: (version: string): void => {\n\t\t\tcurrent = version;\n\t\t\thistory.push(version);\n\t\t},\n\t\tgetSupportedVersions: (): ReadonlyArray<string> => supportedVersions\n\t};\n}\n\nexport type FakeResponseInit = {\n\tstatus?: number;\n\theaders?: Record<string, string>;\n\tjsonBody?: unknown;\n\tblobBody?: unknown;\n};\n\nexport function fakeResponse(init: FakeResponseInit = {}): ResponseLike {\n\tconst status = init.status ?? 200;\n\tconst lowerCased: Record<string, string> = {};\n\tObject.entries(init.headers ?? {}).forEach(([key, value]) => {\n\t\tlowerCased[key.toLowerCase()] = value;\n\t});\n\tif (init.jsonBody !== undefined && lowerCased['content-type'] === undefined) {\n\t\tlowerCased['content-type'] = 'application/json';\n\t}\n\treturn {\n\t\tok: status >= 200 && status < 300,\n\t\tstatus,\n\t\theaders: {\n\t\t\tget: (name: string): string | null => lowerCased[name.toLowerCase()] ?? null\n\t\t},\n\t\tjson: (): Promise<unknown> => Promise.resolve(init.jsonBody),\n\t\tblob: (): Promise<unknown> => Promise.resolve(init.blobBody)\n\t};\n}\n\nexport type RecordedCall = {\n\turl: string;\n\tinit: RequestInitLike;\n};\n\nexport type FakeFetch = {\n\tfetch: FetchLike;\n\tcalls: Array<RecordedCall>;\n};\n\n/**\n * FIFO fetch stub: each call consumes the next queued response and records\n * `(url, init)` for assertions. Throws when the queue is exhausted, so a test\n * making more requests than expected fails loudly instead of hanging.\n */\nexport function createFakeFetch(responses: Array<ResponseLike>): FakeFetch {\n\tconst queue = [...responses];\n\tconst calls: Array<RecordedCall> = [];\n\treturn {\n\t\tcalls,\n\t\tfetch: (url: string, init: RequestInitLike): Promise<ResponseLike> => {\n\t\t\tcalls.push({ url, init });\n\t\t\tconst next = queue.shift();\n\t\t\tif (!next) {\n\t\t\t\treturn Promise.reject(new Error('createFakeFetch: no more queued responses'));\n\t\t\t}\n\t\t\treturn Promise.resolve(next);\n\t\t}\n\t};\n}\n","/*\n * SPDX-FileCopyrightText: 2026 Zextras <https://www.zextras.com>\n *\n * SPDX-License-Identifier: AGPL-3.0-only\n */\n\nimport type {\n\tWireInboxEntry,\n\tWireInboxMember,\n\tWireInboxResponse,\n\tWireMessage,\n\tWireMessageSearchResult,\n\tWirePinnedMessage,\n\tWirePresenceStatus,\n\tWireReadMarker,\n\tWireSystemEvent,\n\tWireTimeline,\n\tWireTimelineItem,\n\tWireTimelineMessage\n} from '../types/api';\nimport type { components as EventComponents } from '../types/asyncapi';\n\ntype EventSchemas = EventComponents['schemas'];\n\nlet counter = 0;\nfunction nextId(prefix: string): string {\n\tcounter += 1;\n\treturn `${prefix}-${counter.toString().padStart(4, '0')}`;\n}\n\nexport function buildInboxMember(overrides: Partial<WireInboxMember> = {}): WireInboxMember {\n\treturn {\n\t\tuserId: nextId('user'),\n\t\towner: false,\n\t\tonline: false,\n\t\t...overrides\n\t};\n}\n\n/** The required fields `TimelineMessage` and `Message` share. */\nfunction buildMessageFields(): Pick<\n\tWireMessage,\n\t'id' | 'roomId' | 'senderId' | 'text' | 'createdAt'\n> {\n\treturn {\n\t\tid: nextId('msg'),\n\t\troomId: 'room-default',\n\t\tsenderId: 'user-default',\n\t\ttext: 'hello world',\n\t\tcreatedAt: '2026-08-01T10:00:00Z'\n\t};\n}\n\nexport function buildWireMessage(\n\toverrides: Partial<WireTimelineMessage> = {}\n): WireTimelineMessage {\n\treturn { ...buildMessageFields(), ...overrides };\n}\n\nexport function buildReadMarker(overrides: Partial<WireReadMarker> = {}): WireReadMarker {\n\treturn {\n\t\tuserId: nextId('user'),\n\t\titemCreatedAt: '2026-08-01T10:00:00Z',\n\t\t...overrides\n\t};\n}\n\n/** The `Message` DTO: write responses (send, edit, forward) and search entries. */\nexport function buildMessage(overrides: Partial<WireMessage> = {}): WireMessage {\n\treturn { ...buildMessageFields(), ...overrides };\n}\n\nexport function buildSearchResponse(\n\tmessages: Array<WireMessage>,\n\thasMore = false\n): WireMessageSearchResult {\n\treturn { messages, hasMore };\n}\n\nexport function buildPinnedMessage(overrides: Partial<WirePinnedMessage> = {}): WirePinnedMessage {\n\tconst messageId = overrides.messageId ?? nextId('msg');\n\tconst roomId = overrides.roomId ?? 'room-default';\n\treturn {\n\t\tmessageId,\n\t\troomId,\n\t\tpinnedBy: 'user-default',\n\t\tpinnedAt: '2026-08-01T12:00:00Z',\n\t\tmessage: buildWireMessage({\n\t\t\tid: messageId,\n\t\t\troomId,\n\t\t\ttext: 'pinned text',\n\t\t\tsenderId: 'user-sender'\n\t\t}),\n\t\t...overrides\n\t};\n}\n\nexport function buildInboxEntry(\n\toverrides: Partial<Omit<WireInboxEntry, 'room'>> & { room?: Partial<WireInboxEntry['room']> } = {}\n): WireInboxEntry {\n\tconst { room, ...rest } = overrides;\n\tconst roomId = overrides.roomId ?? nextId('room');\n\treturn {\n\t\troomId,\n\t\tunreadCount: 0,\n\t\tmuted: false,\n\t\tmarkers: [],\n\t\t...rest,\n\t\troom: {\n\t\t\tid: roomId,\n\t\t\ttype: 'group',\n\t\t\tmembers: [buildInboxMember()],\n\t\t\tupdatedAt: '2026-01-01T00:00:00Z',\n\t\t\t...room\n\t\t}\n\t};\n}\n\nexport function buildInboxResponse(entries: Array<WireInboxEntry>): WireInboxResponse {\n\treturn { conversations: entries };\n}\n\nexport function buildSystemEvent(overrides: Partial<WireSystemEvent> = {}): WireSystemEvent {\n\treturn {\n\t\tid: nextId('event'),\n\t\troomId: 'room-default',\n\t\ttype: 'ROOM_CREATED',\n\t\tactorId: 'user-default',\n\t\tcontent: {},\n\t\tcreatedAt: '2026-08-01T08:00:00Z',\n\t\t...overrides\n\t};\n}\n\nexport function buildMessageTimelineItem(message: WireTimelineMessage): WireTimelineItem {\n\treturn { itemType: 'message', createdAt: message.createdAt, message };\n}\n\nexport function buildSystemEventTimelineItem(event: WireSystemEvent): WireTimelineItem {\n\treturn { itemType: 'system_event', createdAt: event.createdAt, systemEvent: event };\n}\n\nexport function buildTimelineResponse(\n\titems: Array<WireTimelineItem>,\n\toverrides: Partial<Omit<WireTimeline, 'items'>> = {}\n): WireTimeline {\n\treturn {\n\t\titems,\n\t\thasMoreBefore: false,\n\t\thasMoreAfter: false,\n\t\tmarkers: [],\n\t\t...overrides\n\t};\n}\n\nexport function buildPresenceStatus(\n\toverrides: Partial<WirePresenceStatus> = {}\n): WirePresenceStatus {\n\treturn {\n\t\tuserId: 'user-default',\n\t\tonline: false,\n\t\t...overrides\n\t};\n}\n\n/**\n * Push events as the socket delivers them, `type` included: the shapes are\n * the generated `asyncapi.yaml` schemas. Their times are the stored database\n * values, microseconds included.\n */\nconst EVENT_INSTANT = '2026-08-01T10:00:05.123456Z';\n\nexport function buildMessageReceivedEvent(\n\tmessage: WireTimelineMessage,\n\toverrides: Partial<Omit<EventSchemas['MessageReceived'], 'message'>> = {}\n): EventSchemas['MessageReceived'] {\n\treturn { type: 'MessageReceived', message, ...overrides };\n}\n\nexport function buildMessageForwardedEvent(\n\tmessage: WireTimelineMessage,\n\toverrides: Partial<Omit<EventSchemas['MessageForwarded'], 'message'>> = {}\n): EventSchemas['MessageForwarded'] {\n\treturn { type: 'MessageForwarded', message, ...overrides };\n}\n\nexport function buildMessageEditedEvent(\n\toverrides: Partial<EventSchemas['MessageEdited']> = {}\n): EventSchemas['MessageEdited'] {\n\treturn {\n\t\ttype: 'MessageEdited',\n\t\tmessageId: nextId('msg'),\n\t\troomId: 'room-default',\n\t\ttext: 'edited text',\n\t\teditedAt: '2026-08-01T10:00:05.120Z',\n\t\t...overrides\n\t};\n}\n\nexport function buildMessageDeletedEvent(\n\toverrides: Partial<EventSchemas['MessageDeleted']> = {}\n): EventSchemas['MessageDeleted'] {\n\treturn {\n\t\ttype: 'MessageDeleted',\n\t\tmessageId: nextId('msg'),\n\t\troomId: 'room-default',\n\t\tdeletedBy: 'user-default',\n\t\tdeletedAt: '2026-08-01T10:00:05.120Z',\n\t\t...overrides\n\t};\n}\n\nexport function buildReadUpdatedEvent(\n\toverrides: Partial<EventSchemas['ReadUpdated']> = {}\n): EventSchemas['ReadUpdated'] {\n\treturn {\n\t\ttype: 'ReadUpdated',\n\t\troomId: 'room-default',\n\t\tuserId: nextId('user'),\n\t\titemCreatedAt: '2026-08-01T10:00:00Z',\n\t\t...overrides\n\t};\n}\n\nexport function buildReactionChangedEvent(\n\toverrides: Partial<EventSchemas['ReactionChanged']> = {}\n): EventSchemas['ReactionChanged'] {\n\tconst operation = overrides.operation ?? 'added';\n\treturn {\n\t\ttype: 'ReactionChanged',\n\t\tmessageId: nextId('msg'),\n\t\troomId: 'room-default',\n\t\tuserId: 'user-default',\n\t\treaction: '👍',\n\t\toperation,\n\t\t...(operation === 'removed' ? { deletedAt: EVENT_INSTANT } : { updatedAt: EVENT_INSTANT }),\n\t\t...overrides\n\t};\n}\n\nexport function buildMessagePinnedEvent(\n\toverrides: Partial<EventSchemas['MessagePinned']> = {}\n): EventSchemas['MessagePinned'] {\n\tconst messageId = overrides.messageId ?? nextId('msg');\n\tconst roomId = overrides.roomId ?? 'room-default';\n\treturn {\n\t\ttype: 'MessagePinned',\n\t\tmessageId,\n\t\troomId,\n\t\tpinnedBy: 'user-default',\n\t\tmessage: buildWireMessage({ id: messageId, roomId }),\n\t\ttimestamp: '2026-08-01T10:00:05.120Z',\n\t\t...overrides\n\t};\n}\n\nexport function buildMessageUnpinnedEvent(\n\toverrides: Partial<EventSchemas['MessageUnpinned']> = {}\n): EventSchemas['MessageUnpinned'] {\n\treturn {\n\t\ttype: 'MessageUnpinned',\n\t\tmessageId: nextId('msg'),\n\t\troomId: 'room-default',\n\t\tunpinnedBy: 'user-default',\n\t\ttimestamp: '2026-08-01T10:00:05.120Z',\n\t\t...overrides\n\t};\n}\n\nexport function buildRoomNameChangedEvent(\n\toverrides: Partial<EventSchemas['RoomNameChanged']> = {}\n): EventSchemas['RoomNameChanged'] {\n\treturn {\n\t\ttype: 'roomNameChanged',\n\t\troomId: 'room-default',\n\t\tname: 'Room name',\n\t\tupdatedBy: 'user-default',\n\t\tsystemEventId: nextId('event'),\n\t\tsystemEventCreatedAt: EVENT_INSTANT,\n\t\t...overrides\n\t};\n}\n\nexport function buildRoomDescriptionChangedEvent(\n\toverrides: Partial<EventSchemas['RoomDescriptionChanged']> = {}\n): EventSchemas['RoomDescriptionChanged'] {\n\treturn {\n\t\ttype: 'roomDescriptionChanged',\n\t\troomId: 'room-default',\n\t\tdescription: 'Room description',\n\t\tupdatedBy: 'user-default',\n\t\tsystemEventId: nextId('event'),\n\t\tsystemEventCreatedAt: EVENT_INSTANT,\n\t\t...overrides\n\t};\n}\n\nexport function buildRoomPictureChangedEvent(\n\toverrides: Partial<EventSchemas['RoomPictureChanged']> = {}\n): EventSchemas['RoomPictureChanged'] {\n\treturn {\n\t\ttype: 'roomPictureChanged',\n\t\troomId: 'room-default',\n\t\tupdatedAt: '2026-08-01T10:00:05.120Z',\n\t\tupdatedBy: 'user-default',\n\t\tsystemEventId: nextId('event'),\n\t\tsystemEventCreatedAt: EVENT_INSTANT,\n\t\t...overrides\n\t};\n}\n\nexport function buildRoomPictureDeletedEvent(\n\toverrides: Partial<EventSchemas['RoomPictureDeleted']> = {}\n): EventSchemas['RoomPictureDeleted'] {\n\treturn {\n\t\ttype: 'roomPictureDeleted',\n\t\troomId: 'room-default',\n\t\tdeletedBy: 'user-default',\n\t\tsystemEventId: nextId('event'),\n\t\tsystemEventCreatedAt: EVENT_INSTANT,\n\t\t...overrides\n\t};\n}\n\nexport function buildRoomHistoryClearedEvent(\n\toverrides: Partial<EventSchemas['RoomHistoryCleared']> = {}\n): EventSchemas['RoomHistoryCleared'] {\n\treturn {\n\t\ttype: 'roomHistoryCleared',\n\t\troomId: 'room-default',\n\t\tclearedAt: '2026-08-01T10:00:05.120Z',\n\t\tclearedBy: 'user-default',\n\t\tsystemEventId: nextId('event'),\n\t\tsystemEventCreatedAt: EVENT_INSTANT,\n\t\t...overrides\n\t};\n}\n\nexport function buildRoomMemberAddedEvent(\n\toverrides: Partial<EventSchemas['RoomMemberAdded']> = {}\n): EventSchemas['RoomMemberAdded'] {\n\treturn {\n\t\ttype: 'roomMemberAdded',\n\t\troomId: 'room-default',\n\t\tuserId: 'user-added',\n\t\tisOwner: false,\n\t\taddedBy: 'user-default',\n\t\tsystemEventId: nextId('event'),\n\t\tsystemEventCreatedAt: EVENT_INSTANT,\n\t\t...overrides\n\t};\n}\n\nexport function buildRoomMemberRemovedEvent(\n\toverrides: Partial<EventSchemas['RoomMemberRemoved']> = {}\n): EventSchemas['RoomMemberRemoved'] {\n\treturn {\n\t\ttype: 'roomMemberRemoved',\n\t\troomId: 'room-default',\n\t\tuserId: 'user-removed',\n\t\tremovedBy: 'user-default',\n\t\tsystemEventId: nextId('event'),\n\t\tsystemEventCreatedAt: EVENT_INSTANT,\n\t\t...overrides\n\t};\n}\n\nexport function buildMeetingStartedEvent(\n\toverrides: Partial<EventSchemas['MeetingStarted']> = {}\n): EventSchemas['MeetingStarted'] {\n\treturn {\n\t\ttype: 'meetingStarted',\n\t\tmeetingId: 'meeting-default',\n\t\tstarterUser: 'user-default',\n\t\tstartedAt: '2026-08-01T10:00:05.120Z',\n\t\tsystemEventId: nextId('event'),\n\t\tsystemEventCreatedAt: EVENT_INSTANT,\n\t\t...overrides\n\t};\n}\n\nexport function buildMeetingStoppedEvent(\n\toverrides: Partial<EventSchemas['MeetingStopped']> = {}\n): EventSchemas['MeetingStopped'] {\n\treturn {\n\t\ttype: 'meetingStopped',\n\t\tmeetingId: 'meeting-default',\n\t\tendedBy: 'user-default',\n\t\tsystemEventId: nextId('event'),\n\t\tsystemEventCreatedAt: EVENT_INSTANT,\n\t\tdurationSec: 60,\n\t\t...overrides\n\t};\n}\n\nexport function buildMeetingDeclinedEvent(\n\toverrides: Partial<EventSchemas['MeetingDeclined']> = {}\n): EventSchemas['MeetingDeclined'] {\n\treturn {\n\t\ttype: 'meetingDeclined',\n\t\tmeetingId: 'meeting-default',\n\t\tuserId: 'user-default',\n\t\tsystemEventId: nextId('event'),\n\t\tsystemEventCreatedAt: EVENT_INSTANT,\n\t\t...overrides\n\t};\n}\n\nexport function buildTypingEvent(\n\toverrides: Partial<EventSchemas['Typing']> = {}\n): EventSchemas['Typing'] {\n\treturn {\n\t\ttype: 'Typing',\n\t\troomId: 'room-default',\n\t\tuserId: 'user-default',\n\t\tstatus: 'started',\n\t\t...overrides\n\t};\n}\n\nexport function buildPresenceChangedEvent(\n\toverrides: Partial<EventSchemas['PresenceChanged']> = {}\n): EventSchemas['PresenceChanged'] {\n\treturn {\n\t\ttype: 'PresenceChanged',\n\t\tuserId: 'user-default',\n\t\tonline: true,\n\t\t...overrides\n\t};\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACwBA,IAAI,UAAU;AACd,SAAS,OAAO,QAAwB;AACvC,aAAW;AACX,SAAO,GAAG,MAAM,IAAI,QAAQ,SAAS,EAAE,SAAS,GAAG,GAAG,CAAC;AACxD;AAEO,SAAS,iBAAiB,YAAsC,CAAC,GAAoB;AAC3F,SAAO;AAAA,IACN,QAAQ,OAAO,MAAM;AAAA,IACrB,OAAO;AAAA,IACP,QAAQ;AAAA,IACR,GAAG;AAAA,EACJ;AACD;AAGA,SAAS,qBAGP;AACD,SAAO;AAAA,IACN,IAAI,OAAO,KAAK;AAAA,IAChB,QAAQ;AAAA,IACR,UAAU;AAAA,IACV,MAAM;AAAA,IACN,WAAW;AAAA,EACZ;AACD;AAEO,SAAS,iBACf,YAA0C,CAAC,GACrB;AACtB,SAAO,EAAE,GAAG,mBAAmB,GAAG,GAAG,UAAU;AAChD;AAEO,SAAS,gBAAgB,YAAqC,CAAC,GAAmB;AACxF,SAAO;AAAA,IACN,QAAQ,OAAO,MAAM;AAAA,IACrB,eAAe;AAAA,IACf,GAAG;AAAA,EACJ;AACD;AAGO,SAAS,aAAa,YAAkC,CAAC,GAAgB;AAC/E,SAAO,EAAE,GAAG,mBAAmB,GAAG,GAAG,UAAU;AAChD;AAEO,S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AAiBO,SAAS,gBAAgB,WAA2C;AAC1E,QAAM,QAAQ,CAAC,GAAG,SAAS;AAC3B,QAAM,QAA6B,CAAC;AACpC,SAAO;AAAA,IACN;AAAA,IACA,OAAO,CAAC,KAAa,SAAiD;AACrE,YAAM,KAAK,EAAE,KAAK,KAAK,CAAC;AACxB,YAAM,OAAO,MAAM,MAAM;AACzB,UAAI,CAAC,MAAM;AACV,eAAO,QAAQ,OAAO,IAAI,MAAM,2CAA2C,CAAC;AAAA,MAC7E;AACA,aAAO,QAAQ,QAAQ,IAAI;AAAA,IAC5B;AAAA,EACD;AACD;","names":[]}
@@ -1,4 +1,4 @@
1
- import { b as WireInboxEntry, k as WireInboxMember, l as WireInboxResponse, c as components, W as WireMessage, f as WireTimelineMessage, p as WireTimelineItem, o as WirePinnedMessage, g as WirePresenceStatus, e as WireReadMarker, n as WireMessageSearchResult, d as WireSystemEvent, h as WireTimeline, F as FetchLike, R as RequestInitLike, V as VersionStore, j as ResponseLike } from '../asyncapi-DCETfyZY.cjs';
1
+ import { b as WireInboxEntry, k as WireInboxMember, l as WireInboxResponse, c as components, W as WireMessage, f as WireTimelineMessage, p as WireTimelineItem, o as WirePinnedMessage, g as WirePresenceStatus, e as WireReadMarker, n as WireMessageSearchResult, d as WireSystemEvent, h as WireTimeline, F as FetchLike, R as RequestInitLike, V as VersionStore, j as ResponseLike } from '../asyncapi-B8fJWyes.cjs';
2
2
 
3
3
  type EventSchemas = components['schemas'];
4
4
  declare function buildInboxMember(overrides?: Partial<WireInboxMember>): WireInboxMember;
@@ -8,7 +8,9 @@ declare function buildReadMarker(overrides?: Partial<WireReadMarker>): WireReadM
8
8
  declare function buildMessage(overrides?: Partial<WireMessage>): WireMessage;
9
9
  declare function buildSearchResponse(messages: Array<WireMessage>, hasMore?: boolean): WireMessageSearchResult;
10
10
  declare function buildPinnedMessage(overrides?: Partial<WirePinnedMessage>): WirePinnedMessage;
11
- declare function buildInboxEntry(overrides?: Partial<WireInboxEntry>): WireInboxEntry;
11
+ declare function buildInboxEntry(overrides?: Partial<Omit<WireInboxEntry, 'room'>> & {
12
+ room?: Partial<WireInboxEntry['room']>;
13
+ }): WireInboxEntry;
12
14
  declare function buildInboxResponse(entries: Array<WireInboxEntry>): WireInboxResponse;
13
15
  declare function buildSystemEvent(overrides?: Partial<WireSystemEvent>): WireSystemEvent;
14
16
  declare function buildMessageTimelineItem(message: WireTimelineMessage): WireTimelineItem;
@@ -23,7 +25,8 @@ declare function buildReadUpdatedEvent(overrides?: Partial<EventSchemas['ReadUpd
23
25
  declare function buildReactionChangedEvent(overrides?: Partial<EventSchemas['ReactionChanged']>): EventSchemas['ReactionChanged'];
24
26
  declare function buildMessagePinnedEvent(overrides?: Partial<EventSchemas['MessagePinned']>): EventSchemas['MessagePinned'];
25
27
  declare function buildMessageUnpinnedEvent(overrides?: Partial<EventSchemas['MessageUnpinned']>): EventSchemas['MessageUnpinned'];
26
- declare function buildRoomUpdatedEvent(overrides?: Partial<EventSchemas['RoomUpdated']>): EventSchemas['RoomUpdated'];
28
+ declare function buildRoomNameChangedEvent(overrides?: Partial<EventSchemas['RoomNameChanged']>): EventSchemas['RoomNameChanged'];
29
+ declare function buildRoomDescriptionChangedEvent(overrides?: Partial<EventSchemas['RoomDescriptionChanged']>): EventSchemas['RoomDescriptionChanged'];
27
30
  declare function buildRoomPictureChangedEvent(overrides?: Partial<EventSchemas['RoomPictureChanged']>): EventSchemas['RoomPictureChanged'];
28
31
  declare function buildRoomPictureDeletedEvent(overrides?: Partial<EventSchemas['RoomPictureDeleted']>): EventSchemas['RoomPictureDeleted'];
29
32
  declare function buildRoomHistoryClearedEvent(overrides?: Partial<EventSchemas['RoomHistoryCleared']>): EventSchemas['RoomHistoryCleared'];
@@ -61,4 +64,4 @@ type FakeFetch = {
61
64
  */
62
65
  declare function createFakeFetch(responses: Array<ResponseLike>): FakeFetch;
63
66
 
64
- export { type FakeFetch, type FakeResponseInit, type MemoryVersionStore, type RecordedCall, buildInboxEntry, buildInboxMember, buildInboxResponse, buildMeetingDeclinedEvent, buildMeetingStartedEvent, buildMeetingStoppedEvent, buildMessage, buildMessageDeletedEvent, buildMessageEditedEvent, buildMessageForwardedEvent, buildMessagePinnedEvent, buildMessageReceivedEvent, buildMessageTimelineItem, buildMessageUnpinnedEvent, buildPinnedMessage, buildPresenceChangedEvent, buildPresenceStatus, buildReactionChangedEvent, buildReadMarker, buildReadUpdatedEvent, buildRoomHistoryClearedEvent, buildRoomMemberAddedEvent, buildRoomMemberRemovedEvent, buildRoomPictureChangedEvent, buildRoomPictureDeletedEvent, buildRoomUpdatedEvent, buildSearchResponse, buildSystemEvent, buildSystemEventTimelineItem, buildTimelineResponse, buildTypingEvent, buildWireMessage, createFakeFetch, createMemoryVersionStore, fakeResponse };
67
+ export { type FakeFetch, type FakeResponseInit, type MemoryVersionStore, type RecordedCall, buildInboxEntry, buildInboxMember, buildInboxResponse, buildMeetingDeclinedEvent, buildMeetingStartedEvent, buildMeetingStoppedEvent, buildMessage, buildMessageDeletedEvent, buildMessageEditedEvent, buildMessageForwardedEvent, buildMessagePinnedEvent, buildMessageReceivedEvent, buildMessageTimelineItem, buildMessageUnpinnedEvent, buildPinnedMessage, buildPresenceChangedEvent, buildPresenceStatus, buildReactionChangedEvent, buildReadMarker, buildReadUpdatedEvent, buildRoomDescriptionChangedEvent, buildRoomHistoryClearedEvent, buildRoomMemberAddedEvent, buildRoomMemberRemovedEvent, buildRoomNameChangedEvent, buildRoomPictureChangedEvent, buildRoomPictureDeletedEvent, buildSearchResponse, buildSystemEvent, buildSystemEventTimelineItem, buildTimelineResponse, buildTypingEvent, buildWireMessage, createFakeFetch, createMemoryVersionStore, fakeResponse };
@@ -1,4 +1,4 @@
1
- import { b as WireInboxEntry, k as WireInboxMember, l as WireInboxResponse, c as components, W as WireMessage, f as WireTimelineMessage, p as WireTimelineItem, o as WirePinnedMessage, g as WirePresenceStatus, e as WireReadMarker, n as WireMessageSearchResult, d as WireSystemEvent, h as WireTimeline, F as FetchLike, R as RequestInitLike, V as VersionStore, j as ResponseLike } from '../asyncapi-DCETfyZY.js';
1
+ import { b as WireInboxEntry, k as WireInboxMember, l as WireInboxResponse, c as components, W as WireMessage, f as WireTimelineMessage, p as WireTimelineItem, o as WirePinnedMessage, g as WirePresenceStatus, e as WireReadMarker, n as WireMessageSearchResult, d as WireSystemEvent, h as WireTimeline, F as FetchLike, R as RequestInitLike, V as VersionStore, j as ResponseLike } from '../asyncapi-B8fJWyes.js';
2
2
 
3
3
  type EventSchemas = components['schemas'];
4
4
  declare function buildInboxMember(overrides?: Partial<WireInboxMember>): WireInboxMember;
@@ -8,7 +8,9 @@ declare function buildReadMarker(overrides?: Partial<WireReadMarker>): WireReadM
8
8
  declare function buildMessage(overrides?: Partial<WireMessage>): WireMessage;
9
9
  declare function buildSearchResponse(messages: Array<WireMessage>, hasMore?: boolean): WireMessageSearchResult;
10
10
  declare function buildPinnedMessage(overrides?: Partial<WirePinnedMessage>): WirePinnedMessage;
11
- declare function buildInboxEntry(overrides?: Partial<WireInboxEntry>): WireInboxEntry;
11
+ declare function buildInboxEntry(overrides?: Partial<Omit<WireInboxEntry, 'room'>> & {
12
+ room?: Partial<WireInboxEntry['room']>;
13
+ }): WireInboxEntry;
12
14
  declare function buildInboxResponse(entries: Array<WireInboxEntry>): WireInboxResponse;
13
15
  declare function buildSystemEvent(overrides?: Partial<WireSystemEvent>): WireSystemEvent;
14
16
  declare function buildMessageTimelineItem(message: WireTimelineMessage): WireTimelineItem;
@@ -23,7 +25,8 @@ declare function buildReadUpdatedEvent(overrides?: Partial<EventSchemas['ReadUpd
23
25
  declare function buildReactionChangedEvent(overrides?: Partial<EventSchemas['ReactionChanged']>): EventSchemas['ReactionChanged'];
24
26
  declare function buildMessagePinnedEvent(overrides?: Partial<EventSchemas['MessagePinned']>): EventSchemas['MessagePinned'];
25
27
  declare function buildMessageUnpinnedEvent(overrides?: Partial<EventSchemas['MessageUnpinned']>): EventSchemas['MessageUnpinned'];
26
- declare function buildRoomUpdatedEvent(overrides?: Partial<EventSchemas['RoomUpdated']>): EventSchemas['RoomUpdated'];
28
+ declare function buildRoomNameChangedEvent(overrides?: Partial<EventSchemas['RoomNameChanged']>): EventSchemas['RoomNameChanged'];
29
+ declare function buildRoomDescriptionChangedEvent(overrides?: Partial<EventSchemas['RoomDescriptionChanged']>): EventSchemas['RoomDescriptionChanged'];
27
30
  declare function buildRoomPictureChangedEvent(overrides?: Partial<EventSchemas['RoomPictureChanged']>): EventSchemas['RoomPictureChanged'];
28
31
  declare function buildRoomPictureDeletedEvent(overrides?: Partial<EventSchemas['RoomPictureDeleted']>): EventSchemas['RoomPictureDeleted'];
29
32
  declare function buildRoomHistoryClearedEvent(overrides?: Partial<EventSchemas['RoomHistoryCleared']>): EventSchemas['RoomHistoryCleared'];
@@ -61,4 +64,4 @@ type FakeFetch = {
61
64
  */
62
65
  declare function createFakeFetch(responses: Array<ResponseLike>): FakeFetch;
63
66
 
64
- export { type FakeFetch, type FakeResponseInit, type MemoryVersionStore, type RecordedCall, buildInboxEntry, buildInboxMember, buildInboxResponse, buildMeetingDeclinedEvent, buildMeetingStartedEvent, buildMeetingStoppedEvent, buildMessage, buildMessageDeletedEvent, buildMessageEditedEvent, buildMessageForwardedEvent, buildMessagePinnedEvent, buildMessageReceivedEvent, buildMessageTimelineItem, buildMessageUnpinnedEvent, buildPinnedMessage, buildPresenceChangedEvent, buildPresenceStatus, buildReactionChangedEvent, buildReadMarker, buildReadUpdatedEvent, buildRoomHistoryClearedEvent, buildRoomMemberAddedEvent, buildRoomMemberRemovedEvent, buildRoomPictureChangedEvent, buildRoomPictureDeletedEvent, buildRoomUpdatedEvent, buildSearchResponse, buildSystemEvent, buildSystemEventTimelineItem, buildTimelineResponse, buildTypingEvent, buildWireMessage, createFakeFetch, createMemoryVersionStore, fakeResponse };
67
+ export { type FakeFetch, type FakeResponseInit, type MemoryVersionStore, type RecordedCall, buildInboxEntry, buildInboxMember, buildInboxResponse, buildMeetingDeclinedEvent, buildMeetingStartedEvent, buildMeetingStoppedEvent, buildMessage, buildMessageDeletedEvent, buildMessageEditedEvent, buildMessageForwardedEvent, buildMessagePinnedEvent, buildMessageReceivedEvent, buildMessageTimelineItem, buildMessageUnpinnedEvent, buildPinnedMessage, buildPresenceChangedEvent, buildPresenceStatus, buildReactionChangedEvent, buildReadMarker, buildReadUpdatedEvent, buildRoomDescriptionChangedEvent, buildRoomHistoryClearedEvent, buildRoomMemberAddedEvent, buildRoomMemberRemovedEvent, buildRoomNameChangedEvent, buildRoomPictureChangedEvent, buildRoomPictureDeletedEvent, buildSearchResponse, buildSystemEvent, buildSystemEventTimelineItem, buildTimelineResponse, buildTypingEvent, buildWireMessage, createFakeFetch, createMemoryVersionStore, fakeResponse };