@doist/twist-sdk 2.3.1 → 2.4.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.
|
@@ -41,6 +41,8 @@ var InboxClient = /** @class */ (function (_super) {
|
|
|
41
41
|
params.limit = args.limit;
|
|
42
42
|
if (args.cursor)
|
|
43
43
|
params.cursor = args.cursor;
|
|
44
|
+
if (args.archiveFilter)
|
|
45
|
+
params.archive_filter = args.archiveFilter;
|
|
44
46
|
var method = 'GET';
|
|
45
47
|
var url = "".concat(endpoints_1.ENDPOINT_INBOX, "/get");
|
|
46
48
|
if (options === null || options === void 0 ? void 0 : options.batch) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.THREAD_ACTIONS = exports.AWAY_MODE_TYPES = exports.GetOrCreateConversationArgsSchema = exports.GetConversationsArgsSchema = exports.GetCommentsArgsSchema = exports.GetThreadsArgsSchema = exports.GetChannelsArgsSchema = exports.CreateMessageArgsSchema = exports.CreateConversationArgsSchema = exports.UpdateCommentArgsSchema = exports.CreateCommentArgsSchema = exports.UpdateThreadArgsSchema = exports.CreateThreadArgsSchema = exports.UpdateChannelArgsSchema = exports.CreateChannelArgsSchema = void 0;
|
|
3
|
+
exports.THREAD_ACTIONS = exports.ARCHIVE_FILTER_VALUES = exports.AWAY_MODE_TYPES = exports.GetOrCreateConversationArgsSchema = exports.GetConversationsArgsSchema = exports.GetCommentsArgsSchema = exports.GetThreadsArgsSchema = exports.GetChannelsArgsSchema = exports.CreateMessageArgsSchema = exports.CreateConversationArgsSchema = exports.UpdateCommentArgsSchema = exports.CreateCommentArgsSchema = exports.UpdateThreadArgsSchema = exports.CreateThreadArgsSchema = exports.UpdateChannelArgsSchema = exports.CreateChannelArgsSchema = void 0;
|
|
4
4
|
var zod_1 = require("zod");
|
|
5
5
|
exports.CreateChannelArgsSchema = zod_1.z.object({
|
|
6
6
|
workspaceId: zod_1.z.number(),
|
|
@@ -93,5 +93,7 @@ exports.GetOrCreateConversationArgsSchema = zod_1.z.object({
|
|
|
93
93
|
userIds: zod_1.z.array(zod_1.z.number()),
|
|
94
94
|
});
|
|
95
95
|
exports.AWAY_MODE_TYPES = ['parental', 'vacation', 'sickleave', 'other'];
|
|
96
|
+
// Inbox
|
|
97
|
+
exports.ARCHIVE_FILTER_VALUES = ['active', 'archived', 'all'];
|
|
96
98
|
// Threads
|
|
97
99
|
exports.THREAD_ACTIONS = ['close', 'reopen'];
|
|
@@ -38,6 +38,8 @@ var InboxClient = /** @class */ (function (_super) {
|
|
|
38
38
|
params.limit = args.limit;
|
|
39
39
|
if (args.cursor)
|
|
40
40
|
params.cursor = args.cursor;
|
|
41
|
+
if (args.archiveFilter)
|
|
42
|
+
params.archive_filter = args.archiveFilter;
|
|
41
43
|
var method = 'GET';
|
|
42
44
|
var url = "".concat(ENDPOINT_INBOX, "/get");
|
|
43
45
|
if (options === null || options === void 0 ? void 0 : options.batch) {
|
|
@@ -90,5 +90,7 @@ export var GetOrCreateConversationArgsSchema = z.object({
|
|
|
90
90
|
userIds: z.array(z.number()),
|
|
91
91
|
});
|
|
92
92
|
export var AWAY_MODE_TYPES = ['parental', 'vacation', 'sickleave', 'other'];
|
|
93
|
+
// Inbox
|
|
94
|
+
export var ARCHIVE_FILTER_VALUES = ['active', 'archived', 'all'];
|
|
93
95
|
// Threads
|
|
94
96
|
export var THREAD_ACTIONS = ['close', 'reopen'];
|
|
@@ -15,6 +15,7 @@ export declare class InboxClient extends BaseClient {
|
|
|
15
15
|
* @param args.until - Optional date to get items until.
|
|
16
16
|
* @param args.limit - Optional limit on number of items returned.
|
|
17
17
|
* @param args.cursor - Optional cursor for pagination.
|
|
18
|
+
* @param args.archiveFilter - Optional filter: 'active' (default), 'archived', or 'all'.
|
|
18
19
|
* @param options - Optional configuration. Set `batch: true` to return a descriptor for batch requests.
|
|
19
20
|
* @returns Inbox threads.
|
|
20
21
|
*
|
|
@@ -24,6 +25,12 @@ export declare class InboxClient extends BaseClient {
|
|
|
24
25
|
* workspaceId: 123,
|
|
25
26
|
* since: new Date('2024-01-01')
|
|
26
27
|
* })
|
|
28
|
+
*
|
|
29
|
+
* // Include archived (done) items alongside active ones
|
|
30
|
+
* const allInbox = await api.inbox.getInbox({
|
|
31
|
+
* workspaceId: 123,
|
|
32
|
+
* archiveFilter: 'all'
|
|
33
|
+
* })
|
|
27
34
|
* ```
|
|
28
35
|
*/
|
|
29
36
|
getInbox(args: GetInboxArgs, options: {
|
|
@@ -161,12 +161,15 @@ export type UpdateConversationMessageArgs = {
|
|
|
161
161
|
content: string;
|
|
162
162
|
attachments?: unknown[];
|
|
163
163
|
};
|
|
164
|
+
export declare const ARCHIVE_FILTER_VALUES: readonly ["active", "archived", "all"];
|
|
165
|
+
export type ArchiveFilter = (typeof ARCHIVE_FILTER_VALUES)[number];
|
|
164
166
|
export type GetInboxArgs = {
|
|
165
167
|
workspaceId: number;
|
|
166
168
|
since?: Date;
|
|
167
169
|
until?: Date;
|
|
168
170
|
limit?: number;
|
|
169
171
|
cursor?: string;
|
|
172
|
+
archiveFilter?: ArchiveFilter;
|
|
170
173
|
};
|
|
171
174
|
export type ArchiveAllArgs = {
|
|
172
175
|
workspaceId: number;
|