@monsoft/davinci-ai
Version:
Davinci AI Client
69 lines (68 loc) • 1.58 kB
TypeScript
import { z } from 'zod';
export declare const ChatMessageSchema: z.ZodObject<{
message: z.ZodObject<{
message: z.ZodString;
id: z.ZodString;
direction: z.ZodEnum<["in", "out"]>;
}, "strip", z.ZodTypeAny, {
message: string;
id: string;
direction: "in" | "out";
}, {
message: string;
id: string;
direction: "in" | "out";
}>;
contact: z.ZodObject<{
phone: z.ZodString;
id: z.ZodString;
}, "strip", z.ZodTypeAny, {
id: string;
phone: string;
}, {
id: string;
phone: string;
}>;
user: z.ZodOptional<z.ZodObject<{
id: z.ZodString;
phone: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
id: string;
phone?: string | undefined;
}, {
id: string;
phone?: string | undefined;
}>>;
}, "strip", z.ZodTypeAny, {
message: {
message: string;
id: string;
direction: "in" | "out";
};
contact: {
id: string;
phone: string;
};
user?: {
id: string;
phone?: string | undefined;
} | undefined;
}, {
message: {
message: string;
id: string;
direction: "in" | "out";
};
contact: {
id: string;
phone: string;
};
user?: {
id: string;
phone?: string | undefined;
} | undefined;
}>;
export type ChatMessage = z.infer<typeof ChatMessageSchema>;
export type ChatMessageWithOrg = ChatMessage & {
organizationId: string;
};