@zextras/carbonio-ws-collaboration-ui-sdk 0.5.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.
- package/README.md +1 -1
- package/dist/{asyncapi-DB0usrAf.d.cts → asyncapi-B8fJWyes.d.cts} +281 -44
- package/dist/{asyncapi-DB0usrAf.d.ts → asyncapi-B8fJWyes.d.ts} +281 -44
- package/dist/index.cjs +825 -222
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +459 -159
- package/dist/index.d.ts +459 -159
- package/dist/index.js +815 -222
- package/dist/index.js.map +1 -1
- package/dist/testing/index.cjs +84 -24
- package/dist/testing/index.cjs.map +1 -1
- package/dist/testing/index.d.cts +10 -3
- package/dist/testing/index.d.ts +10 -3
- package/dist/testing/index.js +79 -24
- package/dist/testing/index.js.map +1 -1
- package/package.json +1 -1
package/dist/testing/index.js
CHANGED
|
@@ -55,19 +55,21 @@ function buildPinnedMessage(overrides = {}) {
|
|
|
55
55
|
};
|
|
56
56
|
}
|
|
57
57
|
function buildInboxEntry(overrides = {}) {
|
|
58
|
+
const { room, ...rest } = overrides;
|
|
58
59
|
const roomId = overrides.roomId ?? nextId("room");
|
|
59
60
|
return {
|
|
60
61
|
roomId,
|
|
62
|
+
unreadCount: 0,
|
|
63
|
+
muted: false,
|
|
64
|
+
markers: [],
|
|
65
|
+
...rest,
|
|
61
66
|
room: {
|
|
62
67
|
id: roomId,
|
|
63
68
|
type: "group",
|
|
64
69
|
members: [buildInboxMember()],
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
muted: false,
|
|
69
|
-
markers: [],
|
|
70
|
-
...overrides
|
|
70
|
+
updatedAt: "2026-01-01T00:00:00Z",
|
|
71
|
+
...room
|
|
72
|
+
}
|
|
71
73
|
};
|
|
72
74
|
}
|
|
73
75
|
function buildInboxResponse(entries) {
|
|
@@ -106,17 +108,16 @@ function buildPresenceStatus(overrides = {}) {
|
|
|
106
108
|
...overrides
|
|
107
109
|
};
|
|
108
110
|
}
|
|
109
|
-
var
|
|
111
|
+
var EVENT_INSTANT = "2026-08-01T10:00:05.123456Z";
|
|
110
112
|
function buildMessageReceivedEvent(message, overrides = {}) {
|
|
111
|
-
return { type: "MessageReceived",
|
|
113
|
+
return { type: "MessageReceived", message, ...overrides };
|
|
112
114
|
}
|
|
113
115
|
function buildMessageForwardedEvent(message, overrides = {}) {
|
|
114
|
-
return { type: "MessageForwarded",
|
|
116
|
+
return { type: "MessageForwarded", message, ...overrides };
|
|
115
117
|
}
|
|
116
118
|
function buildMessageEditedEvent(overrides = {}) {
|
|
117
119
|
return {
|
|
118
120
|
type: "MessageEdited",
|
|
119
|
-
sentDate: EVENT_SENT_DATE,
|
|
120
121
|
messageId: nextId("msg"),
|
|
121
122
|
roomId: "room-default",
|
|
122
123
|
text: "edited text",
|
|
@@ -127,7 +128,6 @@ function buildMessageEditedEvent(overrides = {}) {
|
|
|
127
128
|
function buildMessageDeletedEvent(overrides = {}) {
|
|
128
129
|
return {
|
|
129
130
|
type: "MessageDeleted",
|
|
130
|
-
sentDate: EVENT_SENT_DATE,
|
|
131
131
|
messageId: nextId("msg"),
|
|
132
132
|
roomId: "room-default",
|
|
133
133
|
deletedBy: "user-default",
|
|
@@ -138,7 +138,6 @@ function buildMessageDeletedEvent(overrides = {}) {
|
|
|
138
138
|
function buildReadUpdatedEvent(overrides = {}) {
|
|
139
139
|
return {
|
|
140
140
|
type: "ReadUpdated",
|
|
141
|
-
sentDate: EVENT_SENT_DATE,
|
|
142
141
|
roomId: "room-default",
|
|
143
142
|
userId: nextId("user"),
|
|
144
143
|
itemCreatedAt: "2026-08-01T10:00:00Z",
|
|
@@ -146,14 +145,15 @@ function buildReadUpdatedEvent(overrides = {}) {
|
|
|
146
145
|
};
|
|
147
146
|
}
|
|
148
147
|
function buildReactionChangedEvent(overrides = {}) {
|
|
148
|
+
const operation = overrides.operation ?? "added";
|
|
149
149
|
return {
|
|
150
150
|
type: "ReactionChanged",
|
|
151
|
-
sentDate: EVENT_SENT_DATE,
|
|
152
151
|
messageId: nextId("msg"),
|
|
153
152
|
roomId: "room-default",
|
|
154
153
|
userId: "user-default",
|
|
155
154
|
reaction: "\u{1F44D}",
|
|
156
|
-
operation
|
|
155
|
+
operation,
|
|
156
|
+
...operation === "removed" ? { deletedAt: EVENT_INSTANT } : { updatedAt: EVENT_INSTANT },
|
|
157
157
|
...overrides
|
|
158
158
|
};
|
|
159
159
|
}
|
|
@@ -162,7 +162,6 @@ function buildMessagePinnedEvent(overrides = {}) {
|
|
|
162
162
|
const roomId = overrides.roomId ?? "room-default";
|
|
163
163
|
return {
|
|
164
164
|
type: "MessagePinned",
|
|
165
|
-
sentDate: EVENT_SENT_DATE,
|
|
166
165
|
messageId,
|
|
167
166
|
roomId,
|
|
168
167
|
pinnedBy: "user-default",
|
|
@@ -174,7 +173,6 @@ function buildMessagePinnedEvent(overrides = {}) {
|
|
|
174
173
|
function buildMessageUnpinnedEvent(overrides = {}) {
|
|
175
174
|
return {
|
|
176
175
|
type: "MessageUnpinned",
|
|
177
|
-
sentDate: EVENT_SENT_DATE,
|
|
178
176
|
messageId: nextId("msg"),
|
|
179
177
|
roomId: "room-default",
|
|
180
178
|
unpinnedBy: "user-default",
|
|
@@ -182,75 +180,127 @@ function buildMessageUnpinnedEvent(overrides = {}) {
|
|
|
182
180
|
...overrides
|
|
183
181
|
};
|
|
184
182
|
}
|
|
183
|
+
function buildRoomNameChangedEvent(overrides = {}) {
|
|
184
|
+
return {
|
|
185
|
+
type: "roomNameChanged",
|
|
186
|
+
roomId: "room-default",
|
|
187
|
+
name: "Room name",
|
|
188
|
+
updatedBy: "user-default",
|
|
189
|
+
systemEventId: nextId("event"),
|
|
190
|
+
systemEventCreatedAt: EVENT_INSTANT,
|
|
191
|
+
...overrides
|
|
192
|
+
};
|
|
193
|
+
}
|
|
194
|
+
function buildRoomDescriptionChangedEvent(overrides = {}) {
|
|
195
|
+
return {
|
|
196
|
+
type: "roomDescriptionChanged",
|
|
197
|
+
roomId: "room-default",
|
|
198
|
+
description: "Room description",
|
|
199
|
+
updatedBy: "user-default",
|
|
200
|
+
systemEventId: nextId("event"),
|
|
201
|
+
systemEventCreatedAt: EVENT_INSTANT,
|
|
202
|
+
...overrides
|
|
203
|
+
};
|
|
204
|
+
}
|
|
205
|
+
function buildRoomPictureChangedEvent(overrides = {}) {
|
|
206
|
+
return {
|
|
207
|
+
type: "roomPictureChanged",
|
|
208
|
+
roomId: "room-default",
|
|
209
|
+
updatedAt: "2026-08-01T10:00:05.120Z",
|
|
210
|
+
updatedBy: "user-default",
|
|
211
|
+
systemEventId: nextId("event"),
|
|
212
|
+
systemEventCreatedAt: EVENT_INSTANT,
|
|
213
|
+
...overrides
|
|
214
|
+
};
|
|
215
|
+
}
|
|
216
|
+
function buildRoomPictureDeletedEvent(overrides = {}) {
|
|
217
|
+
return {
|
|
218
|
+
type: "roomPictureDeleted",
|
|
219
|
+
roomId: "room-default",
|
|
220
|
+
deletedBy: "user-default",
|
|
221
|
+
systemEventId: nextId("event"),
|
|
222
|
+
systemEventCreatedAt: EVENT_INSTANT,
|
|
223
|
+
...overrides
|
|
224
|
+
};
|
|
225
|
+
}
|
|
226
|
+
function buildRoomHistoryClearedEvent(overrides = {}) {
|
|
227
|
+
return {
|
|
228
|
+
type: "roomHistoryCleared",
|
|
229
|
+
roomId: "room-default",
|
|
230
|
+
clearedAt: "2026-08-01T10:00:05.120Z",
|
|
231
|
+
clearedBy: "user-default",
|
|
232
|
+
systemEventId: nextId("event"),
|
|
233
|
+
systemEventCreatedAt: EVENT_INSTANT,
|
|
234
|
+
...overrides
|
|
235
|
+
};
|
|
236
|
+
}
|
|
185
237
|
function buildRoomMemberAddedEvent(overrides = {}) {
|
|
186
238
|
return {
|
|
187
239
|
type: "roomMemberAdded",
|
|
188
|
-
sentDate: EVENT_SENT_DATE,
|
|
189
240
|
roomId: "room-default",
|
|
190
241
|
userId: "user-added",
|
|
191
242
|
isOwner: false,
|
|
192
243
|
addedBy: "user-default",
|
|
193
244
|
systemEventId: nextId("event"),
|
|
245
|
+
systemEventCreatedAt: EVENT_INSTANT,
|
|
194
246
|
...overrides
|
|
195
247
|
};
|
|
196
248
|
}
|
|
197
249
|
function buildRoomMemberRemovedEvent(overrides = {}) {
|
|
198
250
|
return {
|
|
199
251
|
type: "roomMemberRemoved",
|
|
200
|
-
sentDate: EVENT_SENT_DATE,
|
|
201
252
|
roomId: "room-default",
|
|
202
253
|
userId: "user-removed",
|
|
203
254
|
removedBy: "user-default",
|
|
204
255
|
systemEventId: nextId("event"),
|
|
256
|
+
systemEventCreatedAt: EVENT_INSTANT,
|
|
205
257
|
...overrides
|
|
206
258
|
};
|
|
207
259
|
}
|
|
208
260
|
function buildMeetingStartedEvent(overrides = {}) {
|
|
209
261
|
return {
|
|
210
262
|
type: "meetingStarted",
|
|
211
|
-
sentDate: EVENT_SENT_DATE,
|
|
212
263
|
meetingId: "meeting-default",
|
|
213
264
|
starterUser: "user-default",
|
|
214
265
|
startedAt: "2026-08-01T10:00:05.120Z",
|
|
215
266
|
systemEventId: nextId("event"),
|
|
267
|
+
systemEventCreatedAt: EVENT_INSTANT,
|
|
216
268
|
...overrides
|
|
217
269
|
};
|
|
218
270
|
}
|
|
219
271
|
function buildMeetingStoppedEvent(overrides = {}) {
|
|
220
272
|
return {
|
|
221
273
|
type: "meetingStopped",
|
|
222
|
-
sentDate: EVENT_SENT_DATE,
|
|
223
274
|
meetingId: "meeting-default",
|
|
224
275
|
endedBy: "user-default",
|
|
225
276
|
systemEventId: nextId("event"),
|
|
277
|
+
systemEventCreatedAt: EVENT_INSTANT,
|
|
278
|
+
durationSec: 60,
|
|
226
279
|
...overrides
|
|
227
280
|
};
|
|
228
281
|
}
|
|
229
282
|
function buildMeetingDeclinedEvent(overrides = {}) {
|
|
230
283
|
return {
|
|
231
284
|
type: "meetingDeclined",
|
|
232
|
-
sentDate: EVENT_SENT_DATE,
|
|
233
285
|
meetingId: "meeting-default",
|
|
234
286
|
userId: "user-default",
|
|
235
287
|
systemEventId: nextId("event"),
|
|
288
|
+
systemEventCreatedAt: EVENT_INSTANT,
|
|
236
289
|
...overrides
|
|
237
290
|
};
|
|
238
291
|
}
|
|
239
292
|
function buildTypingEvent(overrides = {}) {
|
|
240
293
|
return {
|
|
241
294
|
type: "Typing",
|
|
242
|
-
sentDate: EVENT_SENT_DATE,
|
|
243
295
|
roomId: "room-default",
|
|
244
296
|
userId: "user-default",
|
|
245
297
|
status: "started",
|
|
246
|
-
timestamp: EVENT_SENT_DATE,
|
|
247
298
|
...overrides
|
|
248
299
|
};
|
|
249
300
|
}
|
|
250
301
|
function buildPresenceChangedEvent(overrides = {}) {
|
|
251
302
|
return {
|
|
252
303
|
type: "PresenceChanged",
|
|
253
|
-
sentDate: EVENT_SENT_DATE,
|
|
254
304
|
userId: "user-default",
|
|
255
305
|
online: true,
|
|
256
306
|
...overrides
|
|
@@ -326,8 +376,13 @@ export {
|
|
|
326
376
|
buildReactionChangedEvent,
|
|
327
377
|
buildReadMarker,
|
|
328
378
|
buildReadUpdatedEvent,
|
|
379
|
+
buildRoomDescriptionChangedEvent,
|
|
380
|
+
buildRoomHistoryClearedEvent,
|
|
329
381
|
buildRoomMemberAddedEvent,
|
|
330
382
|
buildRoomMemberRemovedEvent,
|
|
383
|
+
buildRoomNameChangedEvent,
|
|
384
|
+
buildRoomPictureChangedEvent,
|
|
385
|
+
buildRoomPictureDeletedEvent,
|
|
331
386
|
buildSearchResponse,
|
|
332
387
|
buildSystemEvent,
|
|
333
388
|
buildSystemEventTimelineItem,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/testing/fixtures.ts","../../src/testing/index.ts"],"sourcesContent":["/*\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 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","/*\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\tbuildRoomMemberAddedEvent,\n\tbuildRoomMemberRemovedEvent,\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"],"mappings":";AAwBA,IAAI,UAAU;AACd,SAAS,OAAO,QAAwB;AACvC,aAAW;AACX,SAAO,GAAG,MAAM,IAAI,QAAQ,SAAS,EAAE,SAAS,GAAG,G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IAAI;AAAA,IAC5B;AAAA,EACD;AACD;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../src/testing/fixtures.ts","../../src/testing/index.ts"],"sourcesContent":["/*\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","/*\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"],"mappings":";AAwBA,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,SAAS,oBACf,UACA,UAAU,OACgB;AAC1B,SAAO,EAAE,UAAU,QAAQ;AAC5B;AAEO,SAAS,mBAAmB,YAAwC,CAAC,GAAsB;AACjG,QAAM,YAAY,UAAU,aAAa,OAAO,KAAK;AACrD,QAAM,SAAS,UAAU,U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,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":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zextras/carbonio-ws-collaboration-ui-sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"description": "Shared SDK for the Carbonio WS Collaboration REST+WS protocol (backend >= 2.0.0), consumed by the web and mobile clients",
|
|
5
5
|
"license": "AGPL-3.0-only",
|
|
6
6
|
"repository": {
|