@noverachat/sdk-web 0.0.3 → 0.1.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.ko.md +8 -8
- package/README.md +8 -8
- package/dist/index.cjs +386 -258
- package/dist/index.d.cts +163 -170
- package/dist/index.d.ts +163 -170
- package/dist/index.js +386 -258
- package/package.json +1 -1
- package/src/client.ts +50 -157
- package/src/features/room.ts +187 -344
- package/src/generated/rest.ts +480 -0
- package/src/index.ts +1 -0
- package/src/types.ts +59 -177
|
@@ -0,0 +1,480 @@
|
|
|
1
|
+
/* GENERATED — do not edit. Source: packages/protocol/schema/openapi.dev.json (REST_MODELS in scripts/gen.mjs). Run `pnpm gen` (repo root). */
|
|
2
|
+
import type { MessageType, FileKind, FileThumbnailStatus } from "./wire";
|
|
3
|
+
export type { MessageType, FileKind, FileThumbnailStatus };
|
|
4
|
+
|
|
5
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
6
|
+
|
|
7
|
+
/** Client-facing feature flags for the caller's app. */
|
|
8
|
+
export interface AppPolicy {
|
|
9
|
+
appId: string;
|
|
10
|
+
allowMemberBulkDelete: boolean;
|
|
11
|
+
readReceiptsEnabled: boolean;
|
|
12
|
+
typingIndicatorsEnabled: boolean;
|
|
13
|
+
allowMemberDeleteAnyMessage: boolean;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export function parseAppPolicy(j: any): AppPolicy {
|
|
17
|
+
return {
|
|
18
|
+
appId: j["app_id"],
|
|
19
|
+
allowMemberBulkDelete: j["allow_member_bulk_delete"],
|
|
20
|
+
readReceiptsEnabled: j["read_receipts_enabled"],
|
|
21
|
+
typingIndicatorsEnabled: j["typing_indicators_enabled"],
|
|
22
|
+
allowMemberDeleteAnyMessage: j["allow_member_delete_any_message"],
|
|
23
|
+
} as AppPolicy;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/** Aggregate unread state across every room the calling user is in. */
|
|
27
|
+
export interface UnreadSummary {
|
|
28
|
+
total: number;
|
|
29
|
+
rooms: UnreadRoomItem[];
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export function parseUnreadSummary(j: any): UnreadSummary {
|
|
33
|
+
return {
|
|
34
|
+
total: j["total"],
|
|
35
|
+
rooms: (j["rooms"] as unknown[]).map((e: any) => parseUnreadRoomItem(e)),
|
|
36
|
+
} as UnreadSummary;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export interface UnreadRoomItem {
|
|
40
|
+
roomId: string;
|
|
41
|
+
name: string | null;
|
|
42
|
+
roomType?: string | null;
|
|
43
|
+
unreadCount: number;
|
|
44
|
+
lastMessageId?: string | null;
|
|
45
|
+
lastReadMessageId?: string | null;
|
|
46
|
+
lastMessagePreview?: string | null;
|
|
47
|
+
memberCount?: number;
|
|
48
|
+
membersPreview?: MemberPreview[];
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export function parseUnreadRoomItem(j: any): UnreadRoomItem {
|
|
52
|
+
return {
|
|
53
|
+
roomId: j["room_id"],
|
|
54
|
+
name: j["name"],
|
|
55
|
+
roomType: j["room_type"],
|
|
56
|
+
unreadCount: j["unread_count"],
|
|
57
|
+
lastMessageId: j["last_message_id"],
|
|
58
|
+
lastReadMessageId: j["last_read_message_id"],
|
|
59
|
+
lastMessagePreview: j["last_message_preview"],
|
|
60
|
+
memberCount: j["member_count"],
|
|
61
|
+
membersPreview: j["members_preview"] == null ? undefined : (j["members_preview"] as unknown[]).map((e: any) => parseMemberPreview(e)),
|
|
62
|
+
} as UnreadRoomItem;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/** A single member shown in a channel-list avatar mosaic. */
|
|
66
|
+
export interface MemberPreview {
|
|
67
|
+
userId: string;
|
|
68
|
+
nickname?: string | null;
|
|
69
|
+
profileImageUrl?: string | null;
|
|
70
|
+
isOnline?: boolean | null;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export function parseMemberPreview(j: any): MemberPreview {
|
|
74
|
+
return {
|
|
75
|
+
userId: j["user_id"],
|
|
76
|
+
nickname: j["nickname"],
|
|
77
|
+
profileImageUrl: j["profile_image_url"],
|
|
78
|
+
isOnline: j["is_online"],
|
|
79
|
+
} as MemberPreview;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
/** Per-room unread state for the calling user. */
|
|
83
|
+
export interface RoomUnread {
|
|
84
|
+
roomId: string;
|
|
85
|
+
unreadCount: number;
|
|
86
|
+
lastReadMessageId?: string | null;
|
|
87
|
+
lastMessageId?: string | null;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
export function parseRoomUnread(j: any): RoomUnread {
|
|
91
|
+
return {
|
|
92
|
+
roomId: j["room_id"],
|
|
93
|
+
unreadCount: j["unread_count"],
|
|
94
|
+
lastReadMessageId: j["last_read_message_id"],
|
|
95
|
+
lastMessageId: j["last_message_id"],
|
|
96
|
+
} as RoomUnread;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
/** Canonical NoveraChat message response. Bemily clients hit the compat adapter which translates this into Sendbird wire-format (channelUrl, data as JSON string, etc.). */
|
|
100
|
+
export interface MessageOut {
|
|
101
|
+
appId: string;
|
|
102
|
+
roomId: string;
|
|
103
|
+
messageId: string;
|
|
104
|
+
sender?: SenderMini | null;
|
|
105
|
+
senderId?: string | null;
|
|
106
|
+
messageType: MessageType;
|
|
107
|
+
customType?: string | null;
|
|
108
|
+
content?: string | null;
|
|
109
|
+
data?: Record<string, unknown> | null;
|
|
110
|
+
meta?: Record<string, unknown> | null;
|
|
111
|
+
fileId?: string | null;
|
|
112
|
+
file?: Record<string, unknown> | null;
|
|
113
|
+
files?: Record<string, unknown>[] | null;
|
|
114
|
+
replyToId?: string | null;
|
|
115
|
+
reactions?: ReactionEntry[];
|
|
116
|
+
createdAt: string;
|
|
117
|
+
updatedAt?: string | null;
|
|
118
|
+
deletedAt?: string | null;
|
|
119
|
+
deletedByUserId?: string | null;
|
|
120
|
+
deleteScope?: string | null;
|
|
121
|
+
editedCount?: number;
|
|
122
|
+
createdAtMs: number;
|
|
123
|
+
updatedAtMs: number | null;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
export function parseMessageOut(j: any): MessageOut {
|
|
127
|
+
return {
|
|
128
|
+
appId: j["app_id"],
|
|
129
|
+
roomId: j["room_id"],
|
|
130
|
+
messageId: j["message_id"],
|
|
131
|
+
sender: j["sender"] == null ? null : parseSenderMini(j["sender"]),
|
|
132
|
+
senderId: j["sender_id"],
|
|
133
|
+
messageType: j["message_type"] as MessageType,
|
|
134
|
+
customType: j["custom_type"],
|
|
135
|
+
content: j["content"],
|
|
136
|
+
data: j["data"],
|
|
137
|
+
meta: j["meta"],
|
|
138
|
+
fileId: j["file_id"],
|
|
139
|
+
file: j["file"],
|
|
140
|
+
files: j["files"],
|
|
141
|
+
replyToId: j["reply_to_id"],
|
|
142
|
+
reactions: j["reactions"] == null ? undefined : (j["reactions"] as unknown[]).map((e: any) => parseReactionEntry(e)),
|
|
143
|
+
createdAt: j["created_at"],
|
|
144
|
+
updatedAt: j["updated_at"],
|
|
145
|
+
deletedAt: j["deleted_at"],
|
|
146
|
+
deletedByUserId: j["deleted_by_user_id"],
|
|
147
|
+
deleteScope: j["delete_scope"],
|
|
148
|
+
editedCount: j["edited_count"],
|
|
149
|
+
createdAtMs: j["created_at_ms"],
|
|
150
|
+
updatedAtMs: j["updated_at_ms"],
|
|
151
|
+
} as MessageOut;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
export interface MessageListResponse {
|
|
155
|
+
items: MessageOut[];
|
|
156
|
+
nextCursor?: string | null;
|
|
157
|
+
hasMore: boolean;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
export function parseMessageListResponse(j: any): MessageListResponse {
|
|
161
|
+
return {
|
|
162
|
+
items: (j["items"] as unknown[]).map((e: any) => parseMessageOut(e)),
|
|
163
|
+
nextCursor: j["next_cursor"],
|
|
164
|
+
hasMore: j["has_more"],
|
|
165
|
+
} as MessageListResponse;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
/** 공지사항 (KakaoTalk 스타일) — 방마다 다수. `deleted_at` 이 세팅되면 소프트 삭제된 것으로 리스트/current 조회에서 제외된다. */
|
|
169
|
+
export interface AnnouncementOut {
|
|
170
|
+
id: number;
|
|
171
|
+
roomId: string;
|
|
172
|
+
content: string;
|
|
173
|
+
createdBy: string;
|
|
174
|
+
createdAt: string;
|
|
175
|
+
updatedAt: string;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
export function parseAnnouncementOut(j: any): AnnouncementOut {
|
|
179
|
+
return {
|
|
180
|
+
id: j["id"],
|
|
181
|
+
roomId: j["room_id"],
|
|
182
|
+
content: j["content"],
|
|
183
|
+
createdBy: j["created_by"],
|
|
184
|
+
createdAt: j["created_at"],
|
|
185
|
+
updatedAt: j["updated_at"],
|
|
186
|
+
} as AnnouncementOut;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
/** 방 초대 링크 (카톡 오픈채팅 URL 스타일). */
|
|
190
|
+
export interface InviteTokenOut {
|
|
191
|
+
token: string;
|
|
192
|
+
roomId: string;
|
|
193
|
+
createdBy: string;
|
|
194
|
+
createdAt: string;
|
|
195
|
+
expiresAt: string | null;
|
|
196
|
+
maxUses: number | null;
|
|
197
|
+
usedCount: number;
|
|
198
|
+
revokedAt: string | null;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
export function parseInviteTokenOut(j: any): InviteTokenOut {
|
|
202
|
+
return {
|
|
203
|
+
token: j["token"],
|
|
204
|
+
roomId: j["room_id"],
|
|
205
|
+
createdBy: j["created_by"],
|
|
206
|
+
createdAt: j["created_at"],
|
|
207
|
+
expiresAt: j["expires_at"],
|
|
208
|
+
maxUses: j["max_uses"],
|
|
209
|
+
usedCount: j["used_count"],
|
|
210
|
+
revokedAt: j["revoked_at"],
|
|
211
|
+
} as InviteTokenOut;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
/** `POST /invites/{token}/accept` 성공 응답. 가입한 방 정보. */
|
|
215
|
+
export interface InviteAcceptResponse {
|
|
216
|
+
roomId: string;
|
|
217
|
+
roomName: string | null;
|
|
218
|
+
wasAlreadyMember: boolean;
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
export function parseInviteAcceptResponse(j: any): InviteAcceptResponse {
|
|
222
|
+
return {
|
|
223
|
+
roomId: j["room_id"],
|
|
224
|
+
roomName: j["room_name"],
|
|
225
|
+
wasAlreadyMember: j["was_already_member"],
|
|
226
|
+
} as InviteAcceptResponse;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
export interface DeviceOut {
|
|
230
|
+
deviceId: string;
|
|
231
|
+
tokenType: string;
|
|
232
|
+
tokenPreview: string;
|
|
233
|
+
os: string | null;
|
|
234
|
+
appVersion: string | null;
|
|
235
|
+
pushEnabled: boolean;
|
|
236
|
+
lastActiveAt: string | null;
|
|
237
|
+
createdAt: string;
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
export function parseDeviceOut(j: any): DeviceOut {
|
|
241
|
+
return {
|
|
242
|
+
deviceId: j["device_id"],
|
|
243
|
+
tokenType: j["token_type"],
|
|
244
|
+
tokenPreview: j["token_preview"],
|
|
245
|
+
os: j["os"],
|
|
246
|
+
appVersion: j["app_version"],
|
|
247
|
+
pushEnabled: j["push_enabled"],
|
|
248
|
+
lastActiveAt: j["last_active_at"],
|
|
249
|
+
createdAt: j["created_at"],
|
|
250
|
+
} as DeviceOut;
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
export interface DeviceListResponse {
|
|
254
|
+
items: DeviceOut[];
|
|
255
|
+
total: number;
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
export function parseDeviceListResponse(j: any): DeviceListResponse {
|
|
259
|
+
return {
|
|
260
|
+
items: (j["items"] as unknown[]).map((e: any) => parseDeviceOut(e)),
|
|
261
|
+
total: j["total"],
|
|
262
|
+
} as DeviceListResponse;
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
/** Response shape for both GET and PATCH. */
|
|
266
|
+
export interface PushPreferencesOut {
|
|
267
|
+
pushEnabled: boolean;
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
export function parsePushPreferencesOut(j: any): PushPreferencesOut {
|
|
271
|
+
return {
|
|
272
|
+
pushEnabled: j["push_enabled"],
|
|
273
|
+
} as PushPreferencesOut;
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
/** Full file metadata — returned by ``POST /commit`` and ``GET /meta``. */
|
|
277
|
+
export interface FileOut {
|
|
278
|
+
id: string;
|
|
279
|
+
kind: FileKind;
|
|
280
|
+
mime: string;
|
|
281
|
+
sizeBytes: number;
|
|
282
|
+
originalName?: string | null;
|
|
283
|
+
width?: number | null;
|
|
284
|
+
height?: number | null;
|
|
285
|
+
durationSec?: number | null;
|
|
286
|
+
thumbnailStatus: FileThumbnailStatus;
|
|
287
|
+
uploadStatus: FileUploadStatus;
|
|
288
|
+
createdAt: string;
|
|
289
|
+
committedAt?: string | null;
|
|
290
|
+
forwardBlocked?: boolean;
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
export function parseFileOut(j: any): FileOut {
|
|
294
|
+
return {
|
|
295
|
+
id: j["id"],
|
|
296
|
+
kind: j["kind"] as FileKind,
|
|
297
|
+
mime: j["mime"],
|
|
298
|
+
sizeBytes: j["size_bytes"],
|
|
299
|
+
originalName: j["original_name"],
|
|
300
|
+
width: j["width"],
|
|
301
|
+
height: j["height"],
|
|
302
|
+
durationSec: j["duration_sec"],
|
|
303
|
+
thumbnailStatus: j["thumbnail_status"] as FileThumbnailStatus,
|
|
304
|
+
uploadStatus: j["upload_status"] as FileUploadStatus,
|
|
305
|
+
createdAt: j["created_at"],
|
|
306
|
+
committedAt: j["committed_at"],
|
|
307
|
+
forwardBlocked: j["forward_blocked"],
|
|
308
|
+
} as FileOut;
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
/** Reply to ``POST /api/v1/files`` — the upload URL + identity. */
|
|
312
|
+
export interface FileCreateResponse {
|
|
313
|
+
fileId: string;
|
|
314
|
+
uploadUrl: string;
|
|
315
|
+
headers: Record<string, unknown>;
|
|
316
|
+
expiresAtMs: number;
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
export function parseFileCreateResponse(j: any): FileCreateResponse {
|
|
320
|
+
return {
|
|
321
|
+
fileId: j["file_id"],
|
|
322
|
+
uploadUrl: j["upload_url"],
|
|
323
|
+
headers: j["headers"],
|
|
324
|
+
expiresAtMs: j["expires_at_ms"],
|
|
325
|
+
} as FileCreateResponse;
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
export interface RoomOut {
|
|
329
|
+
appId: string;
|
|
330
|
+
roomId: string;
|
|
331
|
+
roomType: RoomType;
|
|
332
|
+
customType: string | null;
|
|
333
|
+
name: string | null;
|
|
334
|
+
coverImageUrl: string | null;
|
|
335
|
+
isDistinct: boolean;
|
|
336
|
+
isPublic: boolean;
|
|
337
|
+
isFrozen: boolean;
|
|
338
|
+
joinPolicy: JoinPolicy;
|
|
339
|
+
timerSeconds: number | null;
|
|
340
|
+
memberCount: number;
|
|
341
|
+
lastMessageId?: string | null;
|
|
342
|
+
lastMessageAt: string | null;
|
|
343
|
+
lastMessagePreview?: string | null;
|
|
344
|
+
currentAnnouncement?: AnnouncementOut | null;
|
|
345
|
+
createdAt: string;
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
export function parseRoomOut(j: any): RoomOut {
|
|
349
|
+
return {
|
|
350
|
+
appId: j["app_id"],
|
|
351
|
+
roomId: j["room_id"],
|
|
352
|
+
roomType: j["room_type"] as RoomType,
|
|
353
|
+
customType: j["custom_type"],
|
|
354
|
+
name: j["name"],
|
|
355
|
+
coverImageUrl: j["cover_image_url"],
|
|
356
|
+
isDistinct: j["is_distinct"],
|
|
357
|
+
isPublic: j["is_public"],
|
|
358
|
+
isFrozen: j["is_frozen"],
|
|
359
|
+
joinPolicy: j["join_policy"] as JoinPolicy,
|
|
360
|
+
timerSeconds: j["timer_seconds"],
|
|
361
|
+
memberCount: j["member_count"],
|
|
362
|
+
lastMessageId: j["last_message_id"],
|
|
363
|
+
lastMessageAt: j["last_message_at"],
|
|
364
|
+
lastMessagePreview: j["last_message_preview"],
|
|
365
|
+
currentAnnouncement: j["current_announcement"] == null ? null : parseAnnouncementOut(j["current_announcement"]),
|
|
366
|
+
createdAt: j["created_at"],
|
|
367
|
+
} as RoomOut;
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
/** One row from ``user_blocks`` for the caller. We DON'T echo ``blocker_user_id`` — it's always the caller, and including it in every list entry would just add noise. ``model_config`` lets the router return ORM instances directly via ``response_model``. */
|
|
371
|
+
export interface BlockOut {
|
|
372
|
+
blockedUserId: string;
|
|
373
|
+
reason: string | null;
|
|
374
|
+
createdAt: string;
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
export function parseBlockOut(j: any): BlockOut {
|
|
378
|
+
return {
|
|
379
|
+
blockedUserId: j["blocked_user_id"],
|
|
380
|
+
reason: j["reason"],
|
|
381
|
+
createdAt: j["created_at"],
|
|
382
|
+
} as BlockOut;
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
export interface RoomMemberOut {
|
|
386
|
+
userId: string;
|
|
387
|
+
nickname?: string | null;
|
|
388
|
+
role: MemberRole;
|
|
389
|
+
pushTrigger: PushTrigger;
|
|
390
|
+
lastReadMessageId?: string | null;
|
|
391
|
+
joinedAt: string;
|
|
392
|
+
isOnline?: boolean | null;
|
|
393
|
+
mutedUntil?: string | null;
|
|
394
|
+
}
|
|
395
|
+
|
|
396
|
+
export function parseRoomMemberOut(j: any): RoomMemberOut {
|
|
397
|
+
return {
|
|
398
|
+
userId: j["user_id"],
|
|
399
|
+
nickname: j["nickname"],
|
|
400
|
+
role: j["role"] as MemberRole,
|
|
401
|
+
pushTrigger: j["push_trigger"] as PushTrigger,
|
|
402
|
+
lastReadMessageId: j["last_read_message_id"],
|
|
403
|
+
joinedAt: j["joined_at"],
|
|
404
|
+
isOnline: j["is_online"],
|
|
405
|
+
mutedUntil: j["muted_until"],
|
|
406
|
+
} as RoomMemberOut;
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
export interface RoomMemberListResponse {
|
|
410
|
+
items: RoomMemberOut[];
|
|
411
|
+
total: number;
|
|
412
|
+
}
|
|
413
|
+
|
|
414
|
+
export function parseRoomMemberListResponse(j: any): RoomMemberListResponse {
|
|
415
|
+
return {
|
|
416
|
+
items: (j["items"] as unknown[]).map((e: any) => parseRoomMemberOut(e)),
|
|
417
|
+
total: j["total"],
|
|
418
|
+
} as RoomMemberListResponse;
|
|
419
|
+
}
|
|
420
|
+
|
|
421
|
+
export interface BulkDeleteResult {
|
|
422
|
+
cleared: number;
|
|
423
|
+
upToMessageId: string | null;
|
|
424
|
+
}
|
|
425
|
+
|
|
426
|
+
export function parseBulkDeleteResult(j: any): BulkDeleteResult {
|
|
427
|
+
return {
|
|
428
|
+
cleared: j["cleared"],
|
|
429
|
+
upToMessageId: j["up_to_message_id"],
|
|
430
|
+
} as BulkDeleteResult;
|
|
431
|
+
}
|
|
432
|
+
|
|
433
|
+
export interface BulkDeleteBySenderResult {
|
|
434
|
+
cleared: number;
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
export function parseBulkDeleteBySenderResult(j: any): BulkDeleteBySenderResult {
|
|
438
|
+
return {
|
|
439
|
+
cleared: j["cleared"],
|
|
440
|
+
} as BulkDeleteBySenderResult;
|
|
441
|
+
}
|
|
442
|
+
|
|
443
|
+
/** Minimal sender identity — no friend/block/profile-url fluff. */
|
|
444
|
+
export interface SenderMini {
|
|
445
|
+
userId: string;
|
|
446
|
+
nickname?: string | null;
|
|
447
|
+
profileImageUrl?: string | null;
|
|
448
|
+
}
|
|
449
|
+
|
|
450
|
+
export function parseSenderMini(j: any): SenderMini {
|
|
451
|
+
return {
|
|
452
|
+
userId: j["user_id"],
|
|
453
|
+
nickname: j["nickname"],
|
|
454
|
+
profileImageUrl: j["profile_image_url"],
|
|
455
|
+
} as SenderMini;
|
|
456
|
+
}
|
|
457
|
+
|
|
458
|
+
export interface ReactionEntry {
|
|
459
|
+
key: string;
|
|
460
|
+
userIds: string[];
|
|
461
|
+
updatedAt: number;
|
|
462
|
+
}
|
|
463
|
+
|
|
464
|
+
export function parseReactionEntry(j: any): ReactionEntry {
|
|
465
|
+
return {
|
|
466
|
+
key: j["key"],
|
|
467
|
+
userIds: j["user_ids"],
|
|
468
|
+
updatedAt: j["updated_at"],
|
|
469
|
+
} as ReactionEntry;
|
|
470
|
+
}
|
|
471
|
+
|
|
472
|
+
export type FileUploadStatus = "pending" | "committed";
|
|
473
|
+
|
|
474
|
+
export type RoomType = "ONE" | "GROUP" | "SUPER_GROUP";
|
|
475
|
+
|
|
476
|
+
export type JoinPolicy = "OPEN" | "APPROVAL_REQUIRED";
|
|
477
|
+
|
|
478
|
+
export type MemberRole = "OPERATOR" | "MEMBER" | "KICKED";
|
|
479
|
+
|
|
480
|
+
export type PushTrigger = "ALL" | "MENTION_ONLY" | "OFF";
|