@burdenoff/sdk-libs 2026.522.1 → 2026.525.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/modules/billing/index.cjs +46 -32
- package/dist/modules/billing/index.d.cts +19 -14
- package/dist/modules/billing/index.d.ts +19 -14
- package/dist/modules/billing/index.js +46 -32
- package/dist/modules/conversations/index.cjs +318 -39
- package/dist/modules/conversations/index.d.cts +255 -12
- package/dist/modules/conversations/index.d.ts +255 -12
- package/dist/modules/conversations/index.js +315 -36
- package/dist/modules/devportal/index.cjs +63 -48
- package/dist/modules/devportal/index.d.cts +84 -15
- package/dist/modules/devportal/index.d.ts +84 -15
- package/dist/modules/devportal/index.js +63 -48
- package/dist/modules/export/index.cjs +69 -15
- package/dist/modules/export/index.d.cts +59 -1
- package/dist/modules/export/index.d.ts +59 -1
- package/dist/modules/export/index.js +69 -15
- package/dist/modules/integrations/index.cjs +132 -16
- package/dist/modules/integrations/index.d.cts +109 -1
- package/dist/modules/integrations/index.d.ts +109 -1
- package/dist/modules/integrations/index.js +132 -16
- package/dist/modules/scheduler/index.cjs +194 -18
- package/dist/modules/scheduler/index.d.cts +193 -1
- package/dist/modules/scheduler/index.d.ts +193 -1
- package/dist/modules/scheduler/index.js +194 -18
- package/dist/modules/store/index.cjs +76 -54
- package/dist/modules/store/index.d.cts +101 -54
- package/dist/modules/store/index.d.ts +101 -54
- package/dist/modules/store/index.js +70 -48
- package/dist/modules/vibecontrols/index.cjs +1247 -289
- package/dist/modules/vibecontrols/index.d.cts +1603 -5
- package/dist/modules/vibecontrols/index.d.ts +1603 -5
- package/dist/modules/vibecontrols/index.js +1253 -295
- package/dist/modules/workspaces/index.cjs +19 -15
- package/dist/modules/workspaces/index.d.cts +54 -28
- package/dist/modules/workspaces/index.d.ts +54 -28
- package/dist/modules/workspaces/index.js +19 -15
- package/package.json +3 -3
|
@@ -2,16 +2,26 @@ import { J as Json, S as SdkModule } from '../../module-JDbvil5h.cjs';
|
|
|
2
2
|
import 'graphql-request';
|
|
3
3
|
|
|
4
4
|
type ConversationType = 'DIRECT' | 'GROUP' | 'CHANNEL' | 'BOT' | 'AI';
|
|
5
|
+
type ConversationState = 'ACTIVE' | 'ARCHIVED' | 'DELETED' | 'MUTED';
|
|
6
|
+
type ConversationVisibility = 'PRIVATE' | 'INTERNAL' | 'PUBLIC';
|
|
5
7
|
interface Conversation {
|
|
6
8
|
id: string;
|
|
7
9
|
title?: string | null;
|
|
8
10
|
type: ConversationType;
|
|
9
11
|
description?: string | null;
|
|
10
|
-
|
|
12
|
+
avatar?: string | null;
|
|
11
13
|
settings?: Json;
|
|
12
|
-
|
|
14
|
+
state: ConversationState;
|
|
15
|
+
visibility: ConversationVisibility;
|
|
16
|
+
isGroup: boolean;
|
|
17
|
+
memberCount: number;
|
|
18
|
+
unreadCount: number;
|
|
19
|
+
mentionCount: number;
|
|
20
|
+
workspaceId: string;
|
|
21
|
+
createdBy: string;
|
|
13
22
|
createdAt: string;
|
|
14
23
|
updatedAt: string;
|
|
24
|
+
deletedAt?: string | null;
|
|
15
25
|
}
|
|
16
26
|
interface ConversationConnection {
|
|
17
27
|
edges: Array<{
|
|
@@ -20,37 +30,61 @@ interface ConversationConnection {
|
|
|
20
30
|
}>;
|
|
21
31
|
pageInfo: {
|
|
22
32
|
hasNextPage: boolean;
|
|
33
|
+
hasPreviousPage?: boolean | null;
|
|
34
|
+
startCursor?: string | null;
|
|
23
35
|
endCursor?: string | null;
|
|
24
36
|
};
|
|
37
|
+
totalCount?: number | null;
|
|
25
38
|
}
|
|
26
39
|
interface ConversationFilterInput {
|
|
40
|
+
hasMentions?: boolean;
|
|
27
41
|
type?: ConversationType;
|
|
42
|
+
state?: ConversationState;
|
|
43
|
+
visibility?: ConversationVisibility;
|
|
28
44
|
search?: string;
|
|
29
|
-
|
|
45
|
+
workspaceId?: string;
|
|
30
46
|
}
|
|
47
|
+
type ConversationSort = 'CREATED_AT' | 'UPDATED_AT' | 'LAST_MESSAGE_AT';
|
|
31
48
|
interface CreateConversationInput {
|
|
32
49
|
title?: string;
|
|
33
50
|
type: ConversationType;
|
|
34
51
|
description?: string;
|
|
35
52
|
participantIds?: string[];
|
|
53
|
+
visibility?: ConversationVisibility;
|
|
36
54
|
metadata?: Json;
|
|
37
55
|
}
|
|
38
56
|
interface UpdateConversationInput {
|
|
39
57
|
id: string;
|
|
40
58
|
title?: string;
|
|
41
59
|
description?: string;
|
|
60
|
+
avatar?: string;
|
|
42
61
|
settings?: Json;
|
|
62
|
+
state?: ConversationState;
|
|
63
|
+
visibility?: ConversationVisibility;
|
|
43
64
|
}
|
|
44
|
-
type MessageType = 'TEXT' | 'IMAGE' | 'FILE' | 'SYSTEM';
|
|
65
|
+
type MessageType = 'TEXT' | 'IMAGE' | 'FILE' | 'SYSTEM' | 'CALL' | 'POLL' | 'EVENT' | 'COMMAND' | 'NOTIFICATION';
|
|
45
66
|
interface Message {
|
|
46
67
|
id: string;
|
|
47
68
|
conversationId: string;
|
|
48
|
-
|
|
49
|
-
|
|
69
|
+
authorId: string;
|
|
70
|
+
authorType: string;
|
|
71
|
+
content: Json;
|
|
50
72
|
type: MessageType;
|
|
51
73
|
metadata?: Json;
|
|
74
|
+
status: string;
|
|
75
|
+
isEdited: boolean;
|
|
76
|
+
isPinned: boolean;
|
|
77
|
+
isHidden: boolean;
|
|
78
|
+
isAnonymous: boolean;
|
|
79
|
+
readCount: number;
|
|
80
|
+
replyCount: number;
|
|
81
|
+
threadLevel: number;
|
|
82
|
+
threadRootId?: string | null;
|
|
83
|
+
parentMessageId?: string | null;
|
|
52
84
|
createdAt: string;
|
|
53
|
-
updatedAt
|
|
85
|
+
updatedAt: string;
|
|
86
|
+
editedAt?: string | null;
|
|
87
|
+
pinnedAt?: string | null;
|
|
54
88
|
}
|
|
55
89
|
interface MessageConnection {
|
|
56
90
|
edges: Array<{
|
|
@@ -59,14 +93,25 @@ interface MessageConnection {
|
|
|
59
93
|
}>;
|
|
60
94
|
pageInfo: {
|
|
61
95
|
hasNextPage: boolean;
|
|
96
|
+
hasPreviousPage?: boolean | null;
|
|
97
|
+
startCursor?: string | null;
|
|
62
98
|
endCursor?: string | null;
|
|
63
99
|
};
|
|
100
|
+
totalCount?: number | null;
|
|
101
|
+
}
|
|
102
|
+
interface MessageFilter {
|
|
103
|
+
type?: MessageType;
|
|
104
|
+
authorId?: string;
|
|
105
|
+
pinned?: boolean;
|
|
106
|
+
hasAttachments?: boolean;
|
|
107
|
+
search?: string;
|
|
64
108
|
}
|
|
65
109
|
interface SendMessageInput {
|
|
66
110
|
conversationId: string;
|
|
67
|
-
content:
|
|
111
|
+
content: Json;
|
|
68
112
|
type?: MessageType;
|
|
69
113
|
metadata?: Json;
|
|
114
|
+
parentMessageId?: string;
|
|
70
115
|
}
|
|
71
116
|
interface ConversationSettings {
|
|
72
117
|
conversationId: string;
|
|
@@ -82,29 +127,227 @@ interface UpdateConversationSettingsInput {
|
|
|
82
127
|
pinned?: boolean;
|
|
83
128
|
metadata?: Json;
|
|
84
129
|
}
|
|
130
|
+
interface EditMessageInput {
|
|
131
|
+
id: string;
|
|
132
|
+
content: Json;
|
|
133
|
+
reason?: string;
|
|
134
|
+
}
|
|
135
|
+
interface SaveDraftInput {
|
|
136
|
+
conversationId: string;
|
|
137
|
+
content: Json;
|
|
138
|
+
parentMessageId?: string;
|
|
139
|
+
}
|
|
140
|
+
interface DraftMessage {
|
|
141
|
+
id: string;
|
|
142
|
+
conversationId: string;
|
|
143
|
+
userId: string;
|
|
144
|
+
content: Json;
|
|
145
|
+
parentMessageId?: string | null;
|
|
146
|
+
createdAt: string;
|
|
147
|
+
updatedAt: string;
|
|
148
|
+
}
|
|
149
|
+
interface Reaction {
|
|
150
|
+
id: string;
|
|
151
|
+
messageId: string;
|
|
152
|
+
userId: string;
|
|
153
|
+
emoji: string;
|
|
154
|
+
createdAt: string;
|
|
155
|
+
}
|
|
156
|
+
type PresenceStatus = 'ONLINE' | 'OFFLINE' | 'AWAY' | 'DO_NOT_DISTURB';
|
|
157
|
+
interface Presence {
|
|
158
|
+
userId: string;
|
|
159
|
+
status: PresenceStatus;
|
|
160
|
+
customStatus?: string | null;
|
|
161
|
+
lastSeenAt?: string | null;
|
|
162
|
+
}
|
|
163
|
+
interface TypingIndicator {
|
|
164
|
+
conversationId: string;
|
|
165
|
+
userId: string;
|
|
166
|
+
startedAt: string;
|
|
167
|
+
}
|
|
168
|
+
type ParticipantRole = 'ADMIN' | 'MODERATOR' | 'MEMBER' | 'GUEST';
|
|
169
|
+
interface ConversationMembership {
|
|
170
|
+
id: string;
|
|
171
|
+
conversationId: string;
|
|
172
|
+
userId: string;
|
|
173
|
+
customTitle?: string | null;
|
|
174
|
+
customAvatar?: string | null;
|
|
175
|
+
invitedBy?: string | null;
|
|
176
|
+
canAddMembers: boolean;
|
|
177
|
+
canRemoveMembers: boolean;
|
|
178
|
+
canSendMessages: boolean;
|
|
179
|
+
createdAt: string;
|
|
180
|
+
}
|
|
181
|
+
interface AddParticipantInput {
|
|
182
|
+
conversationId: string;
|
|
183
|
+
userId: string;
|
|
184
|
+
role?: ParticipantRole;
|
|
185
|
+
}
|
|
186
|
+
interface RemoveParticipantInput {
|
|
187
|
+
conversationId: string;
|
|
188
|
+
userId: string;
|
|
189
|
+
reason?: string;
|
|
190
|
+
}
|
|
191
|
+
interface UpdateParticipantRoleInput {
|
|
192
|
+
conversationId: string;
|
|
193
|
+
userId: string;
|
|
194
|
+
role: ParticipantRole;
|
|
195
|
+
}
|
|
196
|
+
interface InviteLink {
|
|
197
|
+
code: string;
|
|
198
|
+
url: string;
|
|
199
|
+
createdBy: string;
|
|
200
|
+
currentUses: number;
|
|
201
|
+
maxUses?: number | null;
|
|
202
|
+
expiresAt?: string | null;
|
|
203
|
+
createdAt: string;
|
|
204
|
+
}
|
|
205
|
+
interface InviteLinkInfo {
|
|
206
|
+
valid: boolean;
|
|
207
|
+
usesRemaining?: number | null;
|
|
208
|
+
expiresAt?: string | null;
|
|
209
|
+
conversation?: Pick<Conversation, 'id' | 'title' | 'type'> | null;
|
|
210
|
+
}
|
|
211
|
+
interface CreateInviteLinkInput {
|
|
212
|
+
conversationId: string;
|
|
213
|
+
maxUses?: number;
|
|
214
|
+
expiresAt?: string;
|
|
215
|
+
}
|
|
216
|
+
type NotificationLevel = 'ALL' | 'MENTIONS' | 'MUTED' | 'NONE';
|
|
217
|
+
interface UpdateNotificationSettingsInput {
|
|
218
|
+
conversationId: string;
|
|
219
|
+
notificationLevel: NotificationLevel;
|
|
220
|
+
}
|
|
221
|
+
interface Poll {
|
|
222
|
+
id: string;
|
|
223
|
+
question: string;
|
|
224
|
+
totalVotes: number;
|
|
225
|
+
isClosed: boolean;
|
|
226
|
+
options: Array<{
|
|
227
|
+
id: string;
|
|
228
|
+
}>;
|
|
229
|
+
}
|
|
85
230
|
|
|
86
231
|
interface ConversationMessagesApi {
|
|
87
232
|
list(conversationId: string, opts?: {
|
|
88
233
|
first?: number;
|
|
89
234
|
after?: string;
|
|
235
|
+
before?: string;
|
|
236
|
+
filter?: MessageFilter;
|
|
90
237
|
}): Promise<MessageConnection>;
|
|
91
238
|
send(input: SendMessageInput): Promise<Message>;
|
|
239
|
+
get(id: string): Promise<Message | null>;
|
|
240
|
+
edit(input: EditMessageInput): Promise<Message>;
|
|
241
|
+
delete(id: string, hard?: boolean): Promise<boolean>;
|
|
242
|
+
forward(messageId: string, targetConversationId: string): Promise<Message>;
|
|
243
|
+
pin(messageId: string): Promise<Message>;
|
|
244
|
+
unpin(messageId: string): Promise<Message>;
|
|
245
|
+
hide(messageId: string, reason: string): Promise<Message>;
|
|
246
|
+
unhide(messageId: string): Promise<Message>;
|
|
247
|
+
search(query: string, opts?: {
|
|
248
|
+
conversationId?: string;
|
|
249
|
+
filter?: MessageFilter;
|
|
250
|
+
first?: number;
|
|
251
|
+
after?: string;
|
|
252
|
+
}): Promise<MessageConnection>;
|
|
253
|
+
unread(opts?: {
|
|
254
|
+
first?: number;
|
|
255
|
+
after?: string;
|
|
256
|
+
}): Promise<MessageConnection>;
|
|
257
|
+
report(messageId: string, reason: string): Promise<{
|
|
258
|
+
success: boolean;
|
|
259
|
+
reportId: string;
|
|
260
|
+
}>;
|
|
261
|
+
}
|
|
262
|
+
interface ConversationDraftsApi {
|
|
263
|
+
get(conversationId: string): Promise<DraftMessage | null>;
|
|
264
|
+
save(input: SaveDraftInput): Promise<DraftMessage>;
|
|
265
|
+
delete(conversationId: string): Promise<boolean>;
|
|
266
|
+
}
|
|
267
|
+
interface ConversationReactionsApi {
|
|
268
|
+
add(messageId: string, emoji: string): Promise<Reaction>;
|
|
269
|
+
remove(messageId: string, emoji: string): Promise<boolean>;
|
|
270
|
+
}
|
|
271
|
+
interface ConversationThreadsApi {
|
|
272
|
+
get(messageId: string, opts?: {
|
|
273
|
+
first?: number;
|
|
274
|
+
after?: string;
|
|
275
|
+
}): Promise<MessageConnection>;
|
|
276
|
+
}
|
|
277
|
+
interface ConversationMentionsApi {
|
|
278
|
+
list(opts?: {
|
|
279
|
+
first?: number;
|
|
280
|
+
after?: string;
|
|
281
|
+
unreadOnly?: boolean;
|
|
282
|
+
}): Promise<MessageConnection>;
|
|
283
|
+
}
|
|
284
|
+
interface ConversationPresenceApi {
|
|
285
|
+
get(userIds: string[]): Promise<Presence[]>;
|
|
286
|
+
update(status: PresenceStatus, customStatus?: string): Promise<Presence>;
|
|
287
|
+
}
|
|
288
|
+
interface ConversationTypingApi {
|
|
289
|
+
list(conversationId: string): Promise<TypingIndicator[]>;
|
|
290
|
+
start(conversationId: string): Promise<boolean>;
|
|
291
|
+
stop(conversationId: string): Promise<boolean>;
|
|
292
|
+
}
|
|
293
|
+
interface ConversationParticipantsApi {
|
|
294
|
+
add(input: AddParticipantInput): Promise<ConversationMembership>;
|
|
295
|
+
remove(input: RemoveParticipantInput): Promise<boolean>;
|
|
296
|
+
updateRole(input: UpdateParticipantRoleInput): Promise<ConversationMembership>;
|
|
297
|
+
}
|
|
298
|
+
interface ConversationInvitesApi {
|
|
299
|
+
create(input: CreateInviteLinkInput): Promise<InviteLink>;
|
|
300
|
+
join(code: string): Promise<ConversationMembership>;
|
|
301
|
+
validate(code: string): Promise<InviteLinkInfo>;
|
|
302
|
+
}
|
|
303
|
+
interface ConversationPollsApi {
|
|
304
|
+
vote(pollId: string, optionIds: string[]): Promise<Poll>;
|
|
305
|
+
}
|
|
306
|
+
interface ConversationNotificationsApi {
|
|
307
|
+
update(input: UpdateNotificationSettingsInput): Promise<ConversationMembership>;
|
|
92
308
|
}
|
|
93
309
|
interface ConversationSettingsApi {
|
|
94
310
|
get(conversationId: string): Promise<ConversationSettings | null>;
|
|
95
311
|
set(input: UpdateConversationSettingsInput): Promise<ConversationSettings>;
|
|
96
312
|
}
|
|
313
|
+
interface ConversationsListOptions {
|
|
314
|
+
filter?: ConversationFilterInput;
|
|
315
|
+
first?: number;
|
|
316
|
+
after?: string;
|
|
317
|
+
sort?: ConversationSort;
|
|
318
|
+
}
|
|
97
319
|
interface ConversationsApi {
|
|
98
|
-
list(
|
|
99
|
-
first?: number;
|
|
100
|
-
after?: string;
|
|
101
|
-
}): Promise<ConversationConnection>;
|
|
320
|
+
list(opts?: ConversationsListOptions): Promise<ConversationConnection>;
|
|
102
321
|
get(id: string): Promise<Conversation | null>;
|
|
103
322
|
create(input: CreateConversationInput): Promise<Conversation>;
|
|
104
323
|
update(input: UpdateConversationInput): Promise<Conversation>;
|
|
105
324
|
delete(id: string): Promise<boolean>;
|
|
106
325
|
messages: ConversationMessagesApi;
|
|
107
326
|
settings: ConversationSettingsApi;
|
|
327
|
+
drafts: ConversationDraftsApi;
|
|
328
|
+
reactions: ConversationReactionsApi;
|
|
329
|
+
threads: ConversationThreadsApi;
|
|
330
|
+
mentions: ConversationMentionsApi;
|
|
331
|
+
presence: ConversationPresenceApi;
|
|
332
|
+
typing: ConversationTypingApi;
|
|
333
|
+
participants: ConversationParticipantsApi;
|
|
334
|
+
invites: ConversationInvitesApi;
|
|
335
|
+
polls: ConversationPollsApi;
|
|
336
|
+
notifications: ConversationNotificationsApi;
|
|
337
|
+
getOrCreateDirect(userId: string): Promise<Conversation>;
|
|
338
|
+
search(query: string, opts?: {
|
|
339
|
+
filter?: ConversationFilterInput;
|
|
340
|
+
first?: number;
|
|
341
|
+
after?: string;
|
|
342
|
+
}): Promise<ConversationConnection>;
|
|
343
|
+
archive(id: string): Promise<Conversation>;
|
|
344
|
+
unarchive(id: string): Promise<Conversation>;
|
|
345
|
+
mute(conversationId: string, until?: string): Promise<ConversationMembership>;
|
|
346
|
+
unmute(conversationId: string): Promise<ConversationMembership>;
|
|
347
|
+
pin(conversationId: string): Promise<ConversationMembership>;
|
|
348
|
+
unpin(conversationId: string): Promise<ConversationMembership>;
|
|
349
|
+
markAsRead(conversationId: string, messageId?: string): Promise<ConversationMembership>;
|
|
350
|
+
leave(conversationId: string): Promise<boolean>;
|
|
108
351
|
}
|
|
109
352
|
|
|
110
353
|
declare const conversationsModule: SdkModule<ConversationsApi>;
|
|
@@ -2,16 +2,26 @@ import { J as Json, S as SdkModule } from '../../module-JDbvil5h.js';
|
|
|
2
2
|
import 'graphql-request';
|
|
3
3
|
|
|
4
4
|
type ConversationType = 'DIRECT' | 'GROUP' | 'CHANNEL' | 'BOT' | 'AI';
|
|
5
|
+
type ConversationState = 'ACTIVE' | 'ARCHIVED' | 'DELETED' | 'MUTED';
|
|
6
|
+
type ConversationVisibility = 'PRIVATE' | 'INTERNAL' | 'PUBLIC';
|
|
5
7
|
interface Conversation {
|
|
6
8
|
id: string;
|
|
7
9
|
title?: string | null;
|
|
8
10
|
type: ConversationType;
|
|
9
11
|
description?: string | null;
|
|
10
|
-
|
|
12
|
+
avatar?: string | null;
|
|
11
13
|
settings?: Json;
|
|
12
|
-
|
|
14
|
+
state: ConversationState;
|
|
15
|
+
visibility: ConversationVisibility;
|
|
16
|
+
isGroup: boolean;
|
|
17
|
+
memberCount: number;
|
|
18
|
+
unreadCount: number;
|
|
19
|
+
mentionCount: number;
|
|
20
|
+
workspaceId: string;
|
|
21
|
+
createdBy: string;
|
|
13
22
|
createdAt: string;
|
|
14
23
|
updatedAt: string;
|
|
24
|
+
deletedAt?: string | null;
|
|
15
25
|
}
|
|
16
26
|
interface ConversationConnection {
|
|
17
27
|
edges: Array<{
|
|
@@ -20,37 +30,61 @@ interface ConversationConnection {
|
|
|
20
30
|
}>;
|
|
21
31
|
pageInfo: {
|
|
22
32
|
hasNextPage: boolean;
|
|
33
|
+
hasPreviousPage?: boolean | null;
|
|
34
|
+
startCursor?: string | null;
|
|
23
35
|
endCursor?: string | null;
|
|
24
36
|
};
|
|
37
|
+
totalCount?: number | null;
|
|
25
38
|
}
|
|
26
39
|
interface ConversationFilterInput {
|
|
40
|
+
hasMentions?: boolean;
|
|
27
41
|
type?: ConversationType;
|
|
42
|
+
state?: ConversationState;
|
|
43
|
+
visibility?: ConversationVisibility;
|
|
28
44
|
search?: string;
|
|
29
|
-
|
|
45
|
+
workspaceId?: string;
|
|
30
46
|
}
|
|
47
|
+
type ConversationSort = 'CREATED_AT' | 'UPDATED_AT' | 'LAST_MESSAGE_AT';
|
|
31
48
|
interface CreateConversationInput {
|
|
32
49
|
title?: string;
|
|
33
50
|
type: ConversationType;
|
|
34
51
|
description?: string;
|
|
35
52
|
participantIds?: string[];
|
|
53
|
+
visibility?: ConversationVisibility;
|
|
36
54
|
metadata?: Json;
|
|
37
55
|
}
|
|
38
56
|
interface UpdateConversationInput {
|
|
39
57
|
id: string;
|
|
40
58
|
title?: string;
|
|
41
59
|
description?: string;
|
|
60
|
+
avatar?: string;
|
|
42
61
|
settings?: Json;
|
|
62
|
+
state?: ConversationState;
|
|
63
|
+
visibility?: ConversationVisibility;
|
|
43
64
|
}
|
|
44
|
-
type MessageType = 'TEXT' | 'IMAGE' | 'FILE' | 'SYSTEM';
|
|
65
|
+
type MessageType = 'TEXT' | 'IMAGE' | 'FILE' | 'SYSTEM' | 'CALL' | 'POLL' | 'EVENT' | 'COMMAND' | 'NOTIFICATION';
|
|
45
66
|
interface Message {
|
|
46
67
|
id: string;
|
|
47
68
|
conversationId: string;
|
|
48
|
-
|
|
49
|
-
|
|
69
|
+
authorId: string;
|
|
70
|
+
authorType: string;
|
|
71
|
+
content: Json;
|
|
50
72
|
type: MessageType;
|
|
51
73
|
metadata?: Json;
|
|
74
|
+
status: string;
|
|
75
|
+
isEdited: boolean;
|
|
76
|
+
isPinned: boolean;
|
|
77
|
+
isHidden: boolean;
|
|
78
|
+
isAnonymous: boolean;
|
|
79
|
+
readCount: number;
|
|
80
|
+
replyCount: number;
|
|
81
|
+
threadLevel: number;
|
|
82
|
+
threadRootId?: string | null;
|
|
83
|
+
parentMessageId?: string | null;
|
|
52
84
|
createdAt: string;
|
|
53
|
-
updatedAt
|
|
85
|
+
updatedAt: string;
|
|
86
|
+
editedAt?: string | null;
|
|
87
|
+
pinnedAt?: string | null;
|
|
54
88
|
}
|
|
55
89
|
interface MessageConnection {
|
|
56
90
|
edges: Array<{
|
|
@@ -59,14 +93,25 @@ interface MessageConnection {
|
|
|
59
93
|
}>;
|
|
60
94
|
pageInfo: {
|
|
61
95
|
hasNextPage: boolean;
|
|
96
|
+
hasPreviousPage?: boolean | null;
|
|
97
|
+
startCursor?: string | null;
|
|
62
98
|
endCursor?: string | null;
|
|
63
99
|
};
|
|
100
|
+
totalCount?: number | null;
|
|
101
|
+
}
|
|
102
|
+
interface MessageFilter {
|
|
103
|
+
type?: MessageType;
|
|
104
|
+
authorId?: string;
|
|
105
|
+
pinned?: boolean;
|
|
106
|
+
hasAttachments?: boolean;
|
|
107
|
+
search?: string;
|
|
64
108
|
}
|
|
65
109
|
interface SendMessageInput {
|
|
66
110
|
conversationId: string;
|
|
67
|
-
content:
|
|
111
|
+
content: Json;
|
|
68
112
|
type?: MessageType;
|
|
69
113
|
metadata?: Json;
|
|
114
|
+
parentMessageId?: string;
|
|
70
115
|
}
|
|
71
116
|
interface ConversationSettings {
|
|
72
117
|
conversationId: string;
|
|
@@ -82,29 +127,227 @@ interface UpdateConversationSettingsInput {
|
|
|
82
127
|
pinned?: boolean;
|
|
83
128
|
metadata?: Json;
|
|
84
129
|
}
|
|
130
|
+
interface EditMessageInput {
|
|
131
|
+
id: string;
|
|
132
|
+
content: Json;
|
|
133
|
+
reason?: string;
|
|
134
|
+
}
|
|
135
|
+
interface SaveDraftInput {
|
|
136
|
+
conversationId: string;
|
|
137
|
+
content: Json;
|
|
138
|
+
parentMessageId?: string;
|
|
139
|
+
}
|
|
140
|
+
interface DraftMessage {
|
|
141
|
+
id: string;
|
|
142
|
+
conversationId: string;
|
|
143
|
+
userId: string;
|
|
144
|
+
content: Json;
|
|
145
|
+
parentMessageId?: string | null;
|
|
146
|
+
createdAt: string;
|
|
147
|
+
updatedAt: string;
|
|
148
|
+
}
|
|
149
|
+
interface Reaction {
|
|
150
|
+
id: string;
|
|
151
|
+
messageId: string;
|
|
152
|
+
userId: string;
|
|
153
|
+
emoji: string;
|
|
154
|
+
createdAt: string;
|
|
155
|
+
}
|
|
156
|
+
type PresenceStatus = 'ONLINE' | 'OFFLINE' | 'AWAY' | 'DO_NOT_DISTURB';
|
|
157
|
+
interface Presence {
|
|
158
|
+
userId: string;
|
|
159
|
+
status: PresenceStatus;
|
|
160
|
+
customStatus?: string | null;
|
|
161
|
+
lastSeenAt?: string | null;
|
|
162
|
+
}
|
|
163
|
+
interface TypingIndicator {
|
|
164
|
+
conversationId: string;
|
|
165
|
+
userId: string;
|
|
166
|
+
startedAt: string;
|
|
167
|
+
}
|
|
168
|
+
type ParticipantRole = 'ADMIN' | 'MODERATOR' | 'MEMBER' | 'GUEST';
|
|
169
|
+
interface ConversationMembership {
|
|
170
|
+
id: string;
|
|
171
|
+
conversationId: string;
|
|
172
|
+
userId: string;
|
|
173
|
+
customTitle?: string | null;
|
|
174
|
+
customAvatar?: string | null;
|
|
175
|
+
invitedBy?: string | null;
|
|
176
|
+
canAddMembers: boolean;
|
|
177
|
+
canRemoveMembers: boolean;
|
|
178
|
+
canSendMessages: boolean;
|
|
179
|
+
createdAt: string;
|
|
180
|
+
}
|
|
181
|
+
interface AddParticipantInput {
|
|
182
|
+
conversationId: string;
|
|
183
|
+
userId: string;
|
|
184
|
+
role?: ParticipantRole;
|
|
185
|
+
}
|
|
186
|
+
interface RemoveParticipantInput {
|
|
187
|
+
conversationId: string;
|
|
188
|
+
userId: string;
|
|
189
|
+
reason?: string;
|
|
190
|
+
}
|
|
191
|
+
interface UpdateParticipantRoleInput {
|
|
192
|
+
conversationId: string;
|
|
193
|
+
userId: string;
|
|
194
|
+
role: ParticipantRole;
|
|
195
|
+
}
|
|
196
|
+
interface InviteLink {
|
|
197
|
+
code: string;
|
|
198
|
+
url: string;
|
|
199
|
+
createdBy: string;
|
|
200
|
+
currentUses: number;
|
|
201
|
+
maxUses?: number | null;
|
|
202
|
+
expiresAt?: string | null;
|
|
203
|
+
createdAt: string;
|
|
204
|
+
}
|
|
205
|
+
interface InviteLinkInfo {
|
|
206
|
+
valid: boolean;
|
|
207
|
+
usesRemaining?: number | null;
|
|
208
|
+
expiresAt?: string | null;
|
|
209
|
+
conversation?: Pick<Conversation, 'id' | 'title' | 'type'> | null;
|
|
210
|
+
}
|
|
211
|
+
interface CreateInviteLinkInput {
|
|
212
|
+
conversationId: string;
|
|
213
|
+
maxUses?: number;
|
|
214
|
+
expiresAt?: string;
|
|
215
|
+
}
|
|
216
|
+
type NotificationLevel = 'ALL' | 'MENTIONS' | 'MUTED' | 'NONE';
|
|
217
|
+
interface UpdateNotificationSettingsInput {
|
|
218
|
+
conversationId: string;
|
|
219
|
+
notificationLevel: NotificationLevel;
|
|
220
|
+
}
|
|
221
|
+
interface Poll {
|
|
222
|
+
id: string;
|
|
223
|
+
question: string;
|
|
224
|
+
totalVotes: number;
|
|
225
|
+
isClosed: boolean;
|
|
226
|
+
options: Array<{
|
|
227
|
+
id: string;
|
|
228
|
+
}>;
|
|
229
|
+
}
|
|
85
230
|
|
|
86
231
|
interface ConversationMessagesApi {
|
|
87
232
|
list(conversationId: string, opts?: {
|
|
88
233
|
first?: number;
|
|
89
234
|
after?: string;
|
|
235
|
+
before?: string;
|
|
236
|
+
filter?: MessageFilter;
|
|
90
237
|
}): Promise<MessageConnection>;
|
|
91
238
|
send(input: SendMessageInput): Promise<Message>;
|
|
239
|
+
get(id: string): Promise<Message | null>;
|
|
240
|
+
edit(input: EditMessageInput): Promise<Message>;
|
|
241
|
+
delete(id: string, hard?: boolean): Promise<boolean>;
|
|
242
|
+
forward(messageId: string, targetConversationId: string): Promise<Message>;
|
|
243
|
+
pin(messageId: string): Promise<Message>;
|
|
244
|
+
unpin(messageId: string): Promise<Message>;
|
|
245
|
+
hide(messageId: string, reason: string): Promise<Message>;
|
|
246
|
+
unhide(messageId: string): Promise<Message>;
|
|
247
|
+
search(query: string, opts?: {
|
|
248
|
+
conversationId?: string;
|
|
249
|
+
filter?: MessageFilter;
|
|
250
|
+
first?: number;
|
|
251
|
+
after?: string;
|
|
252
|
+
}): Promise<MessageConnection>;
|
|
253
|
+
unread(opts?: {
|
|
254
|
+
first?: number;
|
|
255
|
+
after?: string;
|
|
256
|
+
}): Promise<MessageConnection>;
|
|
257
|
+
report(messageId: string, reason: string): Promise<{
|
|
258
|
+
success: boolean;
|
|
259
|
+
reportId: string;
|
|
260
|
+
}>;
|
|
261
|
+
}
|
|
262
|
+
interface ConversationDraftsApi {
|
|
263
|
+
get(conversationId: string): Promise<DraftMessage | null>;
|
|
264
|
+
save(input: SaveDraftInput): Promise<DraftMessage>;
|
|
265
|
+
delete(conversationId: string): Promise<boolean>;
|
|
266
|
+
}
|
|
267
|
+
interface ConversationReactionsApi {
|
|
268
|
+
add(messageId: string, emoji: string): Promise<Reaction>;
|
|
269
|
+
remove(messageId: string, emoji: string): Promise<boolean>;
|
|
270
|
+
}
|
|
271
|
+
interface ConversationThreadsApi {
|
|
272
|
+
get(messageId: string, opts?: {
|
|
273
|
+
first?: number;
|
|
274
|
+
after?: string;
|
|
275
|
+
}): Promise<MessageConnection>;
|
|
276
|
+
}
|
|
277
|
+
interface ConversationMentionsApi {
|
|
278
|
+
list(opts?: {
|
|
279
|
+
first?: number;
|
|
280
|
+
after?: string;
|
|
281
|
+
unreadOnly?: boolean;
|
|
282
|
+
}): Promise<MessageConnection>;
|
|
283
|
+
}
|
|
284
|
+
interface ConversationPresenceApi {
|
|
285
|
+
get(userIds: string[]): Promise<Presence[]>;
|
|
286
|
+
update(status: PresenceStatus, customStatus?: string): Promise<Presence>;
|
|
287
|
+
}
|
|
288
|
+
interface ConversationTypingApi {
|
|
289
|
+
list(conversationId: string): Promise<TypingIndicator[]>;
|
|
290
|
+
start(conversationId: string): Promise<boolean>;
|
|
291
|
+
stop(conversationId: string): Promise<boolean>;
|
|
292
|
+
}
|
|
293
|
+
interface ConversationParticipantsApi {
|
|
294
|
+
add(input: AddParticipantInput): Promise<ConversationMembership>;
|
|
295
|
+
remove(input: RemoveParticipantInput): Promise<boolean>;
|
|
296
|
+
updateRole(input: UpdateParticipantRoleInput): Promise<ConversationMembership>;
|
|
297
|
+
}
|
|
298
|
+
interface ConversationInvitesApi {
|
|
299
|
+
create(input: CreateInviteLinkInput): Promise<InviteLink>;
|
|
300
|
+
join(code: string): Promise<ConversationMembership>;
|
|
301
|
+
validate(code: string): Promise<InviteLinkInfo>;
|
|
302
|
+
}
|
|
303
|
+
interface ConversationPollsApi {
|
|
304
|
+
vote(pollId: string, optionIds: string[]): Promise<Poll>;
|
|
305
|
+
}
|
|
306
|
+
interface ConversationNotificationsApi {
|
|
307
|
+
update(input: UpdateNotificationSettingsInput): Promise<ConversationMembership>;
|
|
92
308
|
}
|
|
93
309
|
interface ConversationSettingsApi {
|
|
94
310
|
get(conversationId: string): Promise<ConversationSettings | null>;
|
|
95
311
|
set(input: UpdateConversationSettingsInput): Promise<ConversationSettings>;
|
|
96
312
|
}
|
|
313
|
+
interface ConversationsListOptions {
|
|
314
|
+
filter?: ConversationFilterInput;
|
|
315
|
+
first?: number;
|
|
316
|
+
after?: string;
|
|
317
|
+
sort?: ConversationSort;
|
|
318
|
+
}
|
|
97
319
|
interface ConversationsApi {
|
|
98
|
-
list(
|
|
99
|
-
first?: number;
|
|
100
|
-
after?: string;
|
|
101
|
-
}): Promise<ConversationConnection>;
|
|
320
|
+
list(opts?: ConversationsListOptions): Promise<ConversationConnection>;
|
|
102
321
|
get(id: string): Promise<Conversation | null>;
|
|
103
322
|
create(input: CreateConversationInput): Promise<Conversation>;
|
|
104
323
|
update(input: UpdateConversationInput): Promise<Conversation>;
|
|
105
324
|
delete(id: string): Promise<boolean>;
|
|
106
325
|
messages: ConversationMessagesApi;
|
|
107
326
|
settings: ConversationSettingsApi;
|
|
327
|
+
drafts: ConversationDraftsApi;
|
|
328
|
+
reactions: ConversationReactionsApi;
|
|
329
|
+
threads: ConversationThreadsApi;
|
|
330
|
+
mentions: ConversationMentionsApi;
|
|
331
|
+
presence: ConversationPresenceApi;
|
|
332
|
+
typing: ConversationTypingApi;
|
|
333
|
+
participants: ConversationParticipantsApi;
|
|
334
|
+
invites: ConversationInvitesApi;
|
|
335
|
+
polls: ConversationPollsApi;
|
|
336
|
+
notifications: ConversationNotificationsApi;
|
|
337
|
+
getOrCreateDirect(userId: string): Promise<Conversation>;
|
|
338
|
+
search(query: string, opts?: {
|
|
339
|
+
filter?: ConversationFilterInput;
|
|
340
|
+
first?: number;
|
|
341
|
+
after?: string;
|
|
342
|
+
}): Promise<ConversationConnection>;
|
|
343
|
+
archive(id: string): Promise<Conversation>;
|
|
344
|
+
unarchive(id: string): Promise<Conversation>;
|
|
345
|
+
mute(conversationId: string, until?: string): Promise<ConversationMembership>;
|
|
346
|
+
unmute(conversationId: string): Promise<ConversationMembership>;
|
|
347
|
+
pin(conversationId: string): Promise<ConversationMembership>;
|
|
348
|
+
unpin(conversationId: string): Promise<ConversationMembership>;
|
|
349
|
+
markAsRead(conversationId: string, messageId?: string): Promise<ConversationMembership>;
|
|
350
|
+
leave(conversationId: string): Promise<boolean>;
|
|
108
351
|
}
|
|
109
352
|
|
|
110
353
|
declare const conversationsModule: SdkModule<ConversationsApi>;
|