Skip to main content

createConversationMessageSchema()

function createConversationMessageSchema(linkBaseUrl?: string): ZodPipe<ZodObject<{
actions: ZodOptional<ZodNullable<ZodArray<ZodUnknown>>>;
attachments: ZodOptional<ZodNullable<ZodArray<ZodObject<{
attachmentId: ZodString;
description: ZodOptional<ZodNullable<ZodString>>;
duration: ZodOptional<ZodNullable<ZodString>>;
fileName: ZodOptional<ZodNullable<ZodString>>;
fileSize: ZodOptional<ZodNullable<ZodNumber>>;
image: ZodOptional<ZodNullable<ZodString>>;
imageHeight: ZodOptional<ZodNullable<ZodNumber>>;
imageWidth: ZodOptional<ZodNullable<ZodNumber>>;
title: ZodOptional<ZodNullable<ZodString>>;
underlyingType: ZodOptional<ZodNullable<ZodString>>;
uploadState: ZodOptional<ZodNullable<ZodString>>;
url: ZodOptional<ZodNullable<ZodString>>;
urlType: ZodString;
video: ZodOptional<ZodNullable<ZodString>>;
videoAutoPlay: ZodOptional<ZodNullable<ZodBoolean>>;
videoType: ZodOptional<ZodNullable<ZodString>>;
}, $loose>>>>;
content: ZodString;
conversationId: ZodString;
creator: ZodNumber;
directGroupMentions: ZodOptional<ZodNullable<ZodArray<ZodString>>>;
directMentions: ZodOptional<ZodNullable<ZodArray<ZodNumber>>>;
id: ZodPipe<ZodUnion<readonly [ZodString, ZodNumber]>, ZodTransform<string, string | number>>;
isDeleted: ZodOptional<ZodNullable<ZodBoolean>>;
lastEdited: ZodOptional<ZodNullable<ZodDate>>;
objIndex: ZodOptional<ZodNullable<ZodNumber>>;
posted: ZodDate;
reactions: ZodOptional<ZodNullable<ZodRecord<ZodString, ZodArray<ZodNumber>>>>;
systemMessage: ZodOptional<ZodNullable<ZodUnion<readonly [ZodString, ZodUnknown]>>>;
version: ZodOptional<ZodNullable<ZodNumber>>;
workspaceId: ZodNumber;
}, $strip>, ZodTransform<{
actions?: unknown[] | null;
attachments?: | {
[key: string]: unknown;
attachmentId: string;
description?: string | null;
duration?: string | null;
fileName?: string | null;
fileSize?: number | null;
image?: string | null;
imageHeight?: number | null;
imageWidth?: number | null;
title?: string | null;
underlyingType?: string | null;
uploadState?: string | null;
url?: string | null;
urlType: string;
video?: string | null;
videoAutoPlay?: boolean | null;
videoType?: string | null;
}[]
| null;
content: string;
conversationId: string;
creator: number;
directGroupMentions?: string[] | null;
directMentions?: number[] | null;
id: string;
isDeleted?: boolean | null;
lastEdited?: Date | null;
objIndex?: number | null;
posted: Date;
reactions?: Record<string, number[]> | null;
systemMessage?: unknown;
url: string;
version?: number | null;
workspaceId: number;
}, {
actions?: unknown[] | null;
attachments?: | {
[key: string]: unknown;
attachmentId: string;
description?: string | null;
duration?: string | null;
fileName?: string | null;
fileSize?: number | null;
image?: string | null;
imageHeight?: number | null;
imageWidth?: number | null;
title?: string | null;
underlyingType?: string | null;
uploadState?: string | null;
url?: string | null;
urlType: string;
video?: string | null;
videoAutoPlay?: boolean | null;
videoType?: string | null;
}[]
| null;
content: string;
conversationId: string;
creator: number;
directGroupMentions?: string[] | null;
directMentions?: number[] | null;
id: string;
isDeleted?: boolean | null;
lastEdited?: Date | null;
objIndex?: number | null;
posted: Date;
reactions?: Record<string, number[]> | null;
systemMessage?: unknown;
version?: number | null;
workspaceId: number;
}>>;

Parameters

ParameterType
linkBaseUrl?string

Returns

ZodPipe<ZodObject<{ actions: ZodOptional<ZodNullable<ZodArray<ZodUnknown>>>; attachments: ZodOptional<ZodNullable<ZodArray<ZodObject<{ attachmentId: ZodString; description: ZodOptional<ZodNullable<ZodString>>; duration: ZodOptional<ZodNullable<ZodString>>; fileName: ZodOptional<ZodNullable<ZodString>>; fileSize: ZodOptional<ZodNullable<ZodNumber>>; image: ZodOptional<ZodNullable<ZodString>>; imageHeight: ZodOptional<ZodNullable<ZodNumber>>; imageWidth: ZodOptional<ZodNullable<ZodNumber>>; title: ZodOptional<ZodNullable<ZodString>>; underlyingType: ZodOptional<ZodNullable<ZodString>>; uploadState: ZodOptional<ZodNullable<ZodString>>; url: ZodOptional<ZodNullable<ZodString>>; urlType: ZodString; video: ZodOptional<ZodNullable<ZodString>>; videoAutoPlay: ZodOptional<ZodNullable<ZodBoolean>>; videoType: ZodOptional<ZodNullable<ZodString>>; }, $loose>>>>; content: ZodString; conversationId: ZodString; creator: ZodNumber; directGroupMentions: ZodOptional<ZodNullable<ZodArray<ZodString>>>; directMentions: ZodOptional<ZodNullable<ZodArray<ZodNumber>>>; id: ZodPipe<ZodUnion<readonly [ZodString, ZodNumber]>, ZodTransform<string, string | number>>; isDeleted: ZodOptional<ZodNullable<ZodBoolean>>; lastEdited: ZodOptional<ZodNullable<ZodDate>>; objIndex: ZodOptional<ZodNullable<ZodNumber>>; posted: ZodDate; reactions: ZodOptional<ZodNullable<ZodRecord<ZodString, ZodArray<ZodNumber>>>>; systemMessage: ZodOptional<ZodNullable<ZodUnion<readonly [ZodString, ZodUnknown]>>>; version: ZodOptional<ZodNullable<ZodNumber>>; workspaceId: ZodNumber; }, $strip>, ZodTransform<{ actions?: unknown[] | null; attachments?: | { [key: string]: unknown; attachmentId: string; description?: string | null; duration?: string | null; fileName?: string | null; fileSize?: number | null; image?: string | null; imageHeight?: number | null; imageWidth?: number | null; title?: string | null; underlyingType?: string | null; uploadState?: string | null; url?: string | null; urlType: string; video?: string | null; videoAutoPlay?: boolean | null; videoType?: string | null; }[] | null; content: string; conversationId: string; creator: number; directGroupMentions?: string[] | null; directMentions?: number[] | null; id: string; isDeleted?: boolean | null; lastEdited?: Date | null; objIndex?: number | null; posted: Date; reactions?: Record<string, number[]> | null; systemMessage?: unknown; url: string; version?: number | null; workspaceId: number; }, { actions?: unknown[] | null; attachments?: | { [key: string]: unknown; attachmentId: string; description?: string | null; duration?: string | null; fileName?: string | null; fileSize?: number | null; image?: string | null; imageHeight?: number | null; imageWidth?: number | null; title?: string | null; underlyingType?: string | null; uploadState?: string | null; url?: string | null; urlType: string; video?: string | null; videoAutoPlay?: boolean | null; videoType?: string | null; }[] | null; content: string; conversationId: string; creator: number; directGroupMentions?: string[] | null; directMentions?: number[] | null; id: string; isDeleted?: boolean | null; lastEdited?: Date | null; objIndex?: number | null; posted: Date; reactions?: Record<string, number[]> | null; systemMessage?: unknown; version?: number | null; workspaceId: number; }>>