@doist/twist-sdk 2.1.1 → 2.1.2
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.
|
@@ -11,7 +11,7 @@ var __assign = (this && this.__assign) || function () {
|
|
|
11
11
|
return __assign.apply(this, arguments);
|
|
12
12
|
};
|
|
13
13
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
-
exports.SearchResultSchema = exports.UnreadConversationSchema = exports.UnreadThreadSchema = exports.InboxThreadSchema = exports.ConversationMessageSchema = exports.WorkspaceUserSchema = exports.CommentSchema = exports.ConversationSchema = exports.GroupSchema = exports.ThreadSchema = exports.ChannelSchema = exports.WorkspaceSchema = exports.UserSchema = exports.SystemMessageSchema = void 0;
|
|
14
|
+
exports.SearchResultSchema = exports.SEARCH_RESULT_TYPES = exports.UnreadConversationSchema = exports.UnreadThreadSchema = exports.InboxThreadSchema = exports.ConversationMessageSchema = exports.WorkspaceUserSchema = exports.CommentSchema = exports.ConversationSchema = exports.GroupSchema = exports.ThreadSchema = exports.ChannelSchema = exports.WorkspaceSchema = exports.UserSchema = exports.SystemMessageSchema = void 0;
|
|
15
15
|
var zod_1 = require("zod");
|
|
16
16
|
var url_helpers_1 = require("../utils/url-helpers");
|
|
17
17
|
var enums_1 = require("./enums");
|
|
@@ -356,9 +356,10 @@ exports.UnreadConversationSchema = zod_1.z.object({
|
|
|
356
356
|
directMention: zod_1.z.boolean(),
|
|
357
357
|
});
|
|
358
358
|
// SearchResult entity from API
|
|
359
|
+
exports.SEARCH_RESULT_TYPES = ['thread', 'comment', 'message', 'conversation'];
|
|
359
360
|
exports.SearchResultSchema = zod_1.z.object({
|
|
360
361
|
id: zod_1.z.string(),
|
|
361
|
-
type: zod_1.z.enum(
|
|
362
|
+
type: zod_1.z.enum(exports.SEARCH_RESULT_TYPES),
|
|
362
363
|
snippet: zod_1.z.string(),
|
|
363
364
|
snippetCreatorId: zod_1.z.number(),
|
|
364
365
|
snippetLastUpdated: zod_1.z.date(),
|
|
@@ -353,9 +353,10 @@ export var UnreadConversationSchema = z.object({
|
|
|
353
353
|
directMention: z.boolean(),
|
|
354
354
|
});
|
|
355
355
|
// SearchResult entity from API
|
|
356
|
+
export var SEARCH_RESULT_TYPES = ['thread', 'comment', 'message', 'conversation'];
|
|
356
357
|
export var SearchResultSchema = z.object({
|
|
357
358
|
id: z.string(),
|
|
358
|
-
type: z.enum(
|
|
359
|
+
type: z.enum(SEARCH_RESULT_TYPES),
|
|
359
360
|
snippet: z.string(),
|
|
360
361
|
snippetCreatorId: z.number(),
|
|
361
362
|
snippetLastUpdated: z.date(),
|
|
@@ -829,12 +829,15 @@ export declare const UnreadConversationSchema: z.ZodObject<{
|
|
|
829
829
|
directMention: z.ZodBoolean;
|
|
830
830
|
}, z.core.$strip>;
|
|
831
831
|
export type UnreadConversation = z.infer<typeof UnreadConversationSchema>;
|
|
832
|
+
export declare const SEARCH_RESULT_TYPES: readonly ["thread", "comment", "message", "conversation"];
|
|
833
|
+
export type SearchResultType = (typeof SEARCH_RESULT_TYPES)[number];
|
|
832
834
|
export declare const SearchResultSchema: z.ZodObject<{
|
|
833
835
|
id: z.ZodString;
|
|
834
836
|
type: z.ZodEnum<{
|
|
835
837
|
thread: "thread";
|
|
836
838
|
comment: "comment";
|
|
837
839
|
message: "message";
|
|
840
|
+
conversation: "conversation";
|
|
838
841
|
}>;
|
|
839
842
|
snippet: z.ZodString;
|
|
840
843
|
snippetCreatorId: z.ZodNumber;
|