@doist/twist-sdk 2.5.1 → 2.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/dist/cjs/clients/add-comment-helper.js +43 -1
- package/dist/cjs/types/entities.js +33 -7
- package/dist/cjs/types/enums.js +15 -1
- package/dist/cjs/types/requests.js +7 -2
- package/dist/esm/clients/add-comment-helper.js +43 -1
- package/dist/esm/types/entities.js +32 -6
- package/dist/esm/types/enums.js +14 -0
- package/dist/esm/types/requests.js +7 -2
- package/dist/types/clients/add-comment-helper.d.ts +2 -2
- package/dist/types/clients/comments-client.d.ts +12 -4
- package/dist/types/clients/conversation-messages-client.d.ts +2 -2
- package/dist/types/clients/threads-client.d.ts +16 -6
- package/dist/types/types/entities.d.ts +450 -24
- package/dist/types/types/enums.d.ts +19 -0
- package/dist/types/types/requests.d.ts +53 -18
- package/package.json +1 -1
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
+
import { type Attachment } from './entities.js';
|
|
2
3
|
export declare const CreateChannelArgsSchema: z.ZodObject<{
|
|
3
4
|
workspaceId: z.ZodNumber;
|
|
4
5
|
name: z.ZodString;
|
|
@@ -44,9 +45,32 @@ export declare const CreateCommentArgsSchema: z.ZodObject<{
|
|
|
44
45
|
threadId: z.ZodNumber;
|
|
45
46
|
content: z.ZodString;
|
|
46
47
|
tempId: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
47
|
-
attachments: z.ZodOptional<z.ZodNullable<z.
|
|
48
|
+
attachments: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
49
|
+
attachmentId: z.ZodString;
|
|
50
|
+
urlType: z.ZodString;
|
|
51
|
+
title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
52
|
+
url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
53
|
+
fileName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
54
|
+
fileSize: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
55
|
+
underlyingType: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
56
|
+
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
57
|
+
image: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
58
|
+
imageWidth: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
59
|
+
imageHeight: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
60
|
+
duration: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
61
|
+
uploadState: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
62
|
+
video: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
63
|
+
videoType: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
64
|
+
videoAutoPlay: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
65
|
+
}, z.core.$loose>>>>;
|
|
48
66
|
actions: z.ZodOptional<z.ZodNullable<z.ZodUnknown>>;
|
|
49
67
|
recipients: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodNumber>>>;
|
|
68
|
+
groups: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodNumber>>>;
|
|
69
|
+
directMentions: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodNumber>>>;
|
|
70
|
+
notifyAudience: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
71
|
+
channel: "channel";
|
|
72
|
+
thread: "thread";
|
|
73
|
+
}>>>;
|
|
50
74
|
}, z.core.$strip>;
|
|
51
75
|
export type CreateCommentArgs = z.infer<typeof CreateCommentArgsSchema>;
|
|
52
76
|
export declare const UpdateCommentArgsSchema: z.ZodObject<{
|
|
@@ -64,7 +88,24 @@ export declare const CreateMessageArgsSchema: z.ZodObject<{
|
|
|
64
88
|
conversationId: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
65
89
|
threadId: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
66
90
|
content: z.ZodString;
|
|
67
|
-
attachments: z.ZodOptional<z.ZodNullable<z.ZodArray<z.
|
|
91
|
+
attachments: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
92
|
+
attachmentId: z.ZodString;
|
|
93
|
+
urlType: z.ZodString;
|
|
94
|
+
title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
95
|
+
url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
96
|
+
fileName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
97
|
+
fileSize: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
98
|
+
underlyingType: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
99
|
+
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
100
|
+
image: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
101
|
+
imageWidth: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
102
|
+
imageHeight: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
103
|
+
duration: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
104
|
+
uploadState: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
105
|
+
video: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
106
|
+
videoType: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
107
|
+
videoAutoPlay: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
108
|
+
}, z.core.$loose>>>>;
|
|
68
109
|
}, z.core.$strip>;
|
|
69
110
|
export type CreateMessageArgs = z.infer<typeof CreateMessageArgsSchema>;
|
|
70
111
|
export declare const GetChannelsArgsSchema: z.ZodObject<{
|
|
@@ -168,13 +209,13 @@ export type GetConversationMessagesArgs = {
|
|
|
168
209
|
export type CreateConversationMessageArgs = {
|
|
169
210
|
conversationId: number;
|
|
170
211
|
content: string;
|
|
171
|
-
attachments?:
|
|
212
|
+
attachments?: Attachment[];
|
|
172
213
|
actions?: unknown[];
|
|
173
214
|
};
|
|
174
215
|
export type UpdateConversationMessageArgs = {
|
|
175
216
|
id: number;
|
|
176
217
|
content: string;
|
|
177
|
-
attachments?:
|
|
218
|
+
attachments?: Attachment[];
|
|
178
219
|
};
|
|
179
220
|
export declare const ARCHIVE_FILTER_VALUES: readonly ["active", "archived", "all"];
|
|
180
221
|
export type ArchiveFilter = (typeof ARCHIVE_FILTER_VALUES)[number];
|
|
@@ -234,22 +275,16 @@ export type RemoveChannelUsersArgs = {
|
|
|
234
275
|
};
|
|
235
276
|
export declare const THREAD_ACTIONS: readonly ["close", "reopen"];
|
|
236
277
|
export type ThreadAction = (typeof THREAD_ACTIONS)[number];
|
|
237
|
-
|
|
278
|
+
/**
|
|
279
|
+
* Shared shape for endpoints that post a comment as part of a thread action
|
|
280
|
+
* (close, reopen). Identical to {@link CreateCommentArgs} except the target
|
|
281
|
+
* is identified by `id` (the thread ID) instead of `threadId`.
|
|
282
|
+
*/
|
|
283
|
+
type ThreadActionCommentArgs = Omit<CreateCommentArgs, 'threadId'> & {
|
|
238
284
|
id: number;
|
|
239
|
-
content: string;
|
|
240
|
-
tempId?: number | null;
|
|
241
|
-
attachments?: unknown | null;
|
|
242
|
-
actions?: unknown | null;
|
|
243
|
-
recipients?: number[] | null;
|
|
244
|
-
};
|
|
245
|
-
export type ReopenThreadArgs = {
|
|
246
|
-
id: number;
|
|
247
|
-
content: string;
|
|
248
|
-
tempId?: number | null;
|
|
249
|
-
attachments?: unknown | null;
|
|
250
|
-
actions?: unknown | null;
|
|
251
|
-
recipients?: number[] | null;
|
|
252
285
|
};
|
|
286
|
+
export type CloseThreadArgs = ThreadActionCommentArgs;
|
|
287
|
+
export type ReopenThreadArgs = ThreadActionCommentArgs;
|
|
253
288
|
export type MoveThreadToChannelArgs = {
|
|
254
289
|
id: number;
|
|
255
290
|
toChannel: number;
|