feat: AI API Setting page with 4 provider sections and toggles
Add OpenAI, Claude AI, and DentalManagement AI sections to the AI API Setting page, each with a masked API key input and an on/off toggle (defaulting to off). Rename sidebar label from "Google AI Settings" to "AI API Setting". Add provider-key and provider-enabled backend endpoints and extend the AiSettings schema with 6 new fields. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -15,9 +15,16 @@ router.get("/settings", async (req: Request, res: Response): Promise<any> => {
|
|||||||
if (!settings) return res.status(200).json(null);
|
if (!settings) return res.status(200).json(null);
|
||||||
|
|
||||||
return res.status(200).json({
|
return res.status(200).json({
|
||||||
id: settings.id,
|
id: settings.id,
|
||||||
apiKey: settings.apiKey,
|
apiKey: settings.apiKey,
|
||||||
openPhoneReply: settings.openPhoneReply ?? false,
|
aiEnabled: settings.aiEnabled ?? true,
|
||||||
|
openAiKey: settings.openAiKey ?? "",
|
||||||
|
openAiEnabled: settings.openAiEnabled ?? false,
|
||||||
|
claudeAiKey: settings.claudeAiKey ?? "",
|
||||||
|
claudeAiEnabled: settings.claudeAiEnabled ?? false,
|
||||||
|
dentalMgmtKey: settings.dentalMgmtKey ?? "",
|
||||||
|
dentalMgmtEnabled: settings.dentalMgmtEnabled ?? false,
|
||||||
|
openPhoneReply: settings.openPhoneReply ?? false,
|
||||||
});
|
});
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
return res.status(500).json({ error: "Failed to fetch AI settings", details: String(err) });
|
return res.status(500).json({ error: "Failed to fetch AI settings", details: String(err) });
|
||||||
@@ -30,18 +37,78 @@ router.put("/settings", async (req: Request, res: Response): Promise<any> => {
|
|||||||
const userId = req.user?.id;
|
const userId = req.user?.id;
|
||||||
if (!userId) return res.status(401).json({ message: "Unauthorized" });
|
if (!userId) return res.status(401).json({ message: "Unauthorized" });
|
||||||
|
|
||||||
const { apiKey } = req.body;
|
const { apiKey, aiEnabled } = req.body;
|
||||||
if (!apiKey?.trim()) {
|
if (!apiKey?.trim()) {
|
||||||
return res.status(400).json({ message: "apiKey is required" });
|
return res.status(400).json({ message: "apiKey is required" });
|
||||||
}
|
}
|
||||||
|
|
||||||
const settings = await storage.upsertAiSettings(userId, apiKey.trim());
|
const settings = await storage.upsertAiSettings(userId, apiKey.trim(), aiEnabled);
|
||||||
return res.status(200).json({ id: settings.id, apiKey: settings.apiKey });
|
return res.status(200).json({ id: settings.id, apiKey: settings.apiKey, aiEnabled: settings.aiEnabled ?? true });
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
return res.status(500).json({ error: "Failed to save AI settings", details: String(err) });
|
return res.status(500).json({ error: "Failed to save AI settings", details: String(err) });
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// PUT /api/ai/enabled
|
||||||
|
router.put("/enabled", async (req: Request, res: Response): Promise<any> => {
|
||||||
|
try {
|
||||||
|
const userId = req.user?.id;
|
||||||
|
if (!userId) return res.status(401).json({ message: "Unauthorized" });
|
||||||
|
|
||||||
|
const { aiEnabled } = req.body;
|
||||||
|
if (typeof aiEnabled !== "boolean") {
|
||||||
|
return res.status(400).json({ message: "aiEnabled must be a boolean" });
|
||||||
|
}
|
||||||
|
|
||||||
|
await storage.setAiEnabled(userId, aiEnabled);
|
||||||
|
return res.status(200).json({ aiEnabled });
|
||||||
|
} catch (err) {
|
||||||
|
return res.status(500).json({ error: "Failed to save AI enabled setting", details: String(err) });
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// PUT /api/ai/provider-key
|
||||||
|
router.put("/provider-key", async (req: Request, res: Response): Promise<any> => {
|
||||||
|
try {
|
||||||
|
const userId = req.user?.id;
|
||||||
|
if (!userId) return res.status(401).json({ message: "Unauthorized" });
|
||||||
|
|
||||||
|
const { provider, apiKey } = req.body;
|
||||||
|
if (!["openAi", "claudeAi", "dentalMgmt"].includes(provider)) {
|
||||||
|
return res.status(400).json({ message: "Invalid provider" });
|
||||||
|
}
|
||||||
|
if (!apiKey?.trim()) {
|
||||||
|
return res.status(400).json({ message: "apiKey is required" });
|
||||||
|
}
|
||||||
|
|
||||||
|
await storage.upsertProviderKey(userId, provider, apiKey.trim());
|
||||||
|
return res.status(200).json({ provider, apiKey: apiKey.trim() });
|
||||||
|
} catch (err) {
|
||||||
|
return res.status(500).json({ error: "Failed to save provider key", details: String(err) });
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// PUT /api/ai/provider-enabled
|
||||||
|
router.put("/provider-enabled", async (req: Request, res: Response): Promise<any> => {
|
||||||
|
try {
|
||||||
|
const userId = req.user?.id;
|
||||||
|
if (!userId) return res.status(401).json({ message: "Unauthorized" });
|
||||||
|
|
||||||
|
const { provider, enabled } = req.body;
|
||||||
|
if (!["openAi", "claudeAi", "dentalMgmt"].includes(provider)) {
|
||||||
|
return res.status(400).json({ message: "Invalid provider" });
|
||||||
|
}
|
||||||
|
if (typeof enabled !== "boolean") {
|
||||||
|
return res.status(400).json({ message: "enabled must be a boolean" });
|
||||||
|
}
|
||||||
|
|
||||||
|
await storage.setProviderEnabled(userId, provider, enabled);
|
||||||
|
return res.status(200).json({ provider, enabled });
|
||||||
|
} catch (err) {
|
||||||
|
return res.status(500).json({ error: "Failed to save provider enabled setting", details: String(err) });
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
// GET /api/ai/advanced-settings
|
// GET /api/ai/advanced-settings
|
||||||
router.get("/advanced-settings", async (req: Request, res: Response): Promise<any> => {
|
router.get("/advanced-settings", async (req: Request, res: Response): Promise<any> => {
|
||||||
try {
|
try {
|
||||||
|
|||||||
@@ -5,11 +5,37 @@ export const aiSettingsStorage = {
|
|||||||
return db.aiSettings.findUnique({ where: { userId } });
|
return db.aiSettings.findUnique({ where: { userId } });
|
||||||
},
|
},
|
||||||
|
|
||||||
async upsertAiSettings(userId: number, apiKey: string) {
|
async upsertAiSettings(userId: number, apiKey: string, aiEnabled?: boolean) {
|
||||||
return db.aiSettings.upsert({
|
return db.aiSettings.upsert({
|
||||||
where: { userId },
|
where: { userId },
|
||||||
update: { apiKey },
|
update: { apiKey, ...(aiEnabled !== undefined && { aiEnabled }) },
|
||||||
create: { userId, apiKey },
|
create: { userId, apiKey, aiEnabled: aiEnabled ?? true },
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
async setAiEnabled(userId: number, enabled: boolean): Promise<void> {
|
||||||
|
await db.aiSettings.upsert({
|
||||||
|
where: { userId },
|
||||||
|
update: { aiEnabled: enabled },
|
||||||
|
create: { userId, apiKey: "", aiEnabled: enabled },
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
async upsertProviderKey(userId: number, provider: "openAi" | "claudeAi" | "dentalMgmt", key: string): Promise<void> {
|
||||||
|
const field = provider === "openAi" ? "openAiKey" : provider === "claudeAi" ? "claudeAiKey" : "dentalMgmtKey";
|
||||||
|
await db.aiSettings.upsert({
|
||||||
|
where: { userId },
|
||||||
|
update: { [field]: key },
|
||||||
|
create: { userId, apiKey: "", [field]: key },
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
async setProviderEnabled(userId: number, provider: "openAi" | "claudeAi" | "dentalMgmt", enabled: boolean): Promise<void> {
|
||||||
|
const field = provider === "openAi" ? "openAiEnabled" : provider === "claudeAi" ? "claudeAiEnabled" : "dentalMgmtEnabled";
|
||||||
|
await db.aiSettings.upsert({
|
||||||
|
where: { userId },
|
||||||
|
update: { [field]: enabled },
|
||||||
|
create: { userId, apiKey: "", [field]: enabled, openAiEnabled: false, claudeAiEnabled: false, dentalMgmtEnabled: false },
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@@ -276,7 +276,7 @@ export function Sidebar() {
|
|||||||
icon: <Phone className="h-4 w-4 text-gray-400" />,
|
icon: <Phone className="h-4 w-4 text-gray-400" />,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "Google AI Settings",
|
name: "AI API Setting",
|
||||||
path: "/settings/ai",
|
path: "/settings/ai",
|
||||||
icon: <Bot className="h-4 w-4 text-gray-400" />,
|
icon: <Bot className="h-4 w-4 text-gray-400" />,
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
import { useState, useEffect } from "react";
|
import { useState, useEffect } from "react";
|
||||||
import { useQuery, useMutation } from "@tanstack/react-query";
|
import { useQuery, useMutation } from "@tanstack/react-query";
|
||||||
import { Card, CardContent } from "@/components/ui/card";
|
import { Card, CardContent } from "@/components/ui/card";
|
||||||
|
import { Separator } from "@/components/ui/separator";
|
||||||
|
import { Switch } from "@/components/ui/switch";
|
||||||
import { Eye, EyeOff, CheckCircle } from "lucide-react";
|
import { Eye, EyeOff, CheckCircle } from "lucide-react";
|
||||||
import { useToast } from "@/hooks/use-toast";
|
import { useToast } from "@/hooks/use-toast";
|
||||||
import { apiRequest, queryClient } from "@/lib/queryClient";
|
import { apiRequest, queryClient } from "@/lib/queryClient";
|
||||||
@@ -8,12 +10,101 @@ import { apiRequest, queryClient } from "@/lib/queryClient";
|
|||||||
type AiSettings = {
|
type AiSettings = {
|
||||||
id?: number;
|
id?: number;
|
||||||
apiKey: string;
|
apiKey: string;
|
||||||
|
aiEnabled: boolean;
|
||||||
|
openAiKey: string;
|
||||||
|
openAiEnabled: boolean;
|
||||||
|
claudeAiKey: string;
|
||||||
|
claudeAiEnabled: boolean;
|
||||||
|
dentalMgmtKey: string;
|
||||||
|
dentalMgmtEnabled: boolean;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
type Provider = "openAi" | "claudeAi" | "dentalMgmt";
|
||||||
|
|
||||||
|
function ApiKeySection({
|
||||||
|
title,
|
||||||
|
description,
|
||||||
|
apiKey,
|
||||||
|
enabled,
|
||||||
|
isConfigured,
|
||||||
|
onSave,
|
||||||
|
onToggle,
|
||||||
|
isSaving,
|
||||||
|
isToggling,
|
||||||
|
}: {
|
||||||
|
title: string;
|
||||||
|
description: string;
|
||||||
|
apiKey: string;
|
||||||
|
enabled: boolean;
|
||||||
|
isConfigured: boolean;
|
||||||
|
onSave: (key: string) => void;
|
||||||
|
onToggle: (enabled: boolean) => void;
|
||||||
|
isSaving: boolean;
|
||||||
|
isToggling: boolean;
|
||||||
|
}) {
|
||||||
|
const [localKey, setLocalKey] = useState(apiKey);
|
||||||
|
const [showKey, setShowKey] = useState(false);
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
setLocalKey(apiKey);
|
||||||
|
}, [apiKey]);
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div className="space-y-3">
|
||||||
|
<div className="flex items-center justify-between">
|
||||||
|
<div className="flex items-center gap-2">
|
||||||
|
<h3 className="text-lg font-semibold">{title}</h3>
|
||||||
|
{isConfigured && (
|
||||||
|
<span className="flex items-center gap-1 text-xs text-green-600 font-medium">
|
||||||
|
<CheckCircle className="h-3.5 w-3.5" /> Configured
|
||||||
|
</span>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
<div className="flex items-center gap-2">
|
||||||
|
<span className="text-sm text-gray-500">{enabled ? "On" : "Off"}</span>
|
||||||
|
<Switch checked={enabled} onCheckedChange={onToggle} disabled={isToggling} />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<p className="text-sm text-gray-500">{description}</p>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<label className="block text-sm font-medium">API Key</label>
|
||||||
|
<div className="relative mt-1">
|
||||||
|
<input
|
||||||
|
type={showKey ? "text" : "password"}
|
||||||
|
value={localKey}
|
||||||
|
onChange={(e) => setLocalKey(e.target.value)}
|
||||||
|
className="p-2 border rounded w-full pr-10 font-mono text-sm"
|
||||||
|
placeholder="••••••••••••••••••••••••••••••••••••••"
|
||||||
|
/>
|
||||||
|
<button
|
||||||
|
type="button"
|
||||||
|
onClick={() => setShowKey((v) => !v)}
|
||||||
|
className="absolute inset-y-0 right-2 flex items-center text-gray-500 hover:text-gray-700"
|
||||||
|
tabIndex={-1}
|
||||||
|
>
|
||||||
|
{showKey ? <EyeOff size={16} /> : <Eye size={16} />}
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<button
|
||||||
|
onClick={() => { if (localKey.trim()) onSave(localKey.trim()); }}
|
||||||
|
className="bg-teal-600 text-white px-4 py-2 rounded hover:bg-teal-700 text-sm"
|
||||||
|
disabled={isSaving || !localKey.trim()}
|
||||||
|
>
|
||||||
|
{isSaving ? "Saving..." : "Save"}
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
export function AiSettingsCard() {
|
export function AiSettingsCard() {
|
||||||
const { toast } = useToast();
|
const { toast } = useToast();
|
||||||
const [apiKey, setApiKey] = useState("");
|
const [apiKey, setApiKey] = useState("");
|
||||||
const [showKey, setShowKey] = useState(false);
|
const [showGoogleKey, setShowGoogleKey] = useState(false);
|
||||||
|
const [aiEnabled, setAiEnabled] = useState(true);
|
||||||
|
|
||||||
const { data: settings, isLoading } = useQuery<AiSettings | null>({
|
const { data: settings, isLoading } = useQuery<AiSettings | null>({
|
||||||
queryKey: ["/api/ai/settings"],
|
queryKey: ["/api/ai/settings"],
|
||||||
@@ -27,104 +118,183 @@ export function AiSettingsCard() {
|
|||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (settings) {
|
if (settings) {
|
||||||
setApiKey(settings.apiKey ?? "");
|
setApiKey(settings.apiKey ?? "");
|
||||||
|
setAiEnabled(settings.aiEnabled ?? true);
|
||||||
}
|
}
|
||||||
}, [settings]);
|
}, [settings]);
|
||||||
|
|
||||||
const saveMutation = useMutation({
|
// Google AI save
|
||||||
mutationFn: async (data: { apiKey: string }) => {
|
const googleSaveMutation = useMutation({
|
||||||
const res = await apiRequest("PUT", "/api/ai/settings", data);
|
mutationFn: async (key: string) => {
|
||||||
if (!res.ok) {
|
const res = await apiRequest("PUT", "/api/ai/settings", { apiKey: key });
|
||||||
const err = await res.json().catch(() => null);
|
if (!res.ok) throw new Error((await res.json().catch(() => null))?.message || "Failed to save");
|
||||||
throw new Error(err?.message || "Failed to save AI settings");
|
|
||||||
}
|
|
||||||
return res.json();
|
return res.json();
|
||||||
},
|
},
|
||||||
onSuccess: () => {
|
onSuccess: () => {
|
||||||
queryClient.invalidateQueries({ queryKey: ["/api/ai/settings"] });
|
queryClient.invalidateQueries({ queryKey: ["/api/ai/settings"] });
|
||||||
toast({ title: "AI Settings Saved", description: "Your Google AI API key has been saved." });
|
toast({ title: "Saved", description: "Google AI API key saved." });
|
||||||
|
},
|
||||||
|
onError: (err: any) => toast({ title: "Error", description: err?.message, variant: "destructive" }),
|
||||||
|
});
|
||||||
|
|
||||||
|
// Google AI toggle
|
||||||
|
const googleToggleMutation = useMutation({
|
||||||
|
mutationFn: async (enabled: boolean) => {
|
||||||
|
const res = await apiRequest("PUT", "/api/ai/enabled", { aiEnabled: enabled });
|
||||||
|
if (!res.ok) throw new Error((await res.json().catch(() => null))?.message || "Failed");
|
||||||
|
return res.json();
|
||||||
|
},
|
||||||
|
onSuccess: (_d, enabled) => {
|
||||||
|
queryClient.invalidateQueries({ queryKey: ["/api/ai/settings"] });
|
||||||
|
toast({ title: enabled ? "Google AI Enabled" : "Google AI Disabled" });
|
||||||
},
|
},
|
||||||
onError: (err: any) => {
|
onError: (err: any) => {
|
||||||
toast({ title: "Error", description: err?.message || "Failed to save AI settings", variant: "destructive" });
|
setAiEnabled((v) => !v);
|
||||||
|
toast({ title: "Error", description: err?.message, variant: "destructive" });
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const handleSubmit = (e: React.FormEvent) => {
|
// Provider key save
|
||||||
e.preventDefault();
|
const providerKeyMutation = useMutation({
|
||||||
if (!apiKey.trim()) return;
|
mutationFn: async ({ provider, apiKey }: { provider: Provider; apiKey: string }) => {
|
||||||
saveMutation.mutate({ apiKey: apiKey.trim() });
|
const res = await apiRequest("PUT", "/api/ai/provider-key", { provider, apiKey });
|
||||||
};
|
if (!res.ok) throw new Error((await res.json().catch(() => null))?.message || "Failed");
|
||||||
|
return { provider };
|
||||||
|
},
|
||||||
|
onSuccess: ({ provider }) => {
|
||||||
|
queryClient.invalidateQueries({ queryKey: ["/api/ai/settings"] });
|
||||||
|
const names: Record<Provider, string> = { openAi: "OpenAI", claudeAi: "Claude AI", dentalMgmt: "DentalManagement AI" };
|
||||||
|
toast({ title: "Saved", description: `${names[provider]} API key saved.` });
|
||||||
|
},
|
||||||
|
onError: (err: any) => toast({ title: "Error", description: err?.message, variant: "destructive" }),
|
||||||
|
});
|
||||||
|
|
||||||
const isConfigured = !!settings?.apiKey;
|
// Provider toggle
|
||||||
|
const providerToggleMutation = useMutation({
|
||||||
|
mutationFn: async ({ provider, enabled }: { provider: Provider; enabled: boolean }) => {
|
||||||
|
const res = await apiRequest("PUT", "/api/ai/provider-enabled", { provider, enabled });
|
||||||
|
if (!res.ok) throw new Error((await res.json().catch(() => null))?.message || "Failed");
|
||||||
|
return { provider, enabled };
|
||||||
|
},
|
||||||
|
onSuccess: ({ provider, enabled }) => {
|
||||||
|
queryClient.invalidateQueries({ queryKey: ["/api/ai/settings"] });
|
||||||
|
const names: Record<Provider, string> = { openAi: "OpenAI", claudeAi: "Claude AI", dentalMgmt: "DentalManagement AI" };
|
||||||
|
toast({ title: `${names[provider]} ${enabled ? "Enabled" : "Disabled"}` });
|
||||||
|
},
|
||||||
|
onError: (err: any) => toast({ title: "Error", description: err?.message, variant: "destructive" }),
|
||||||
|
});
|
||||||
|
|
||||||
|
if (isLoading) {
|
||||||
|
return <Card><CardContent className="py-6"><p className="text-sm text-gray-400">Loading...</p></CardContent></Card>;
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Card>
|
<Card>
|
||||||
<CardContent className="space-y-4 py-6">
|
<CardContent className="py-6 space-y-6">
|
||||||
<div className="flex items-center gap-2">
|
|
||||||
<h3 className="text-lg font-semibold">Google AI Settings</h3>
|
|
||||||
{isConfigured && (
|
|
||||||
<span className="flex items-center gap-1 text-xs text-green-600 font-medium">
|
|
||||||
<CheckCircle className="h-3.5 w-3.5" /> Configured
|
|
||||||
</span>
|
|
||||||
)}
|
|
||||||
</div>
|
|
||||||
<p className="text-sm text-gray-500">
|
|
||||||
Enter your Google AI Studio API key to enable AI-powered SMS replies. When a patient responds to an
|
|
||||||
appointment reminder, the AI will automatically reply based on their answer.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
{isLoading ? (
|
{/* Google AI */}
|
||||||
<p className="text-sm text-gray-400">Loading...</p>
|
<div className="space-y-3">
|
||||||
) : (
|
<div className="flex items-center justify-between">
|
||||||
<form className="space-y-4" onSubmit={handleSubmit}>
|
<div className="flex items-center gap-2">
|
||||||
<div>
|
<h3 className="text-lg font-semibold">Google AI Settings</h3>
|
||||||
<label className="block text-sm font-medium">Google AI Studio API Key</label>
|
{!!settings?.apiKey && (
|
||||||
<div className="relative mt-1">
|
<span className="flex items-center gap-1 text-xs text-green-600 font-medium">
|
||||||
<input
|
<CheckCircle className="h-3.5 w-3.5" /> Configured
|
||||||
type={showKey ? "text" : "password"}
|
</span>
|
||||||
value={apiKey}
|
)}
|
||||||
onChange={(e) => setApiKey(e.target.value)}
|
|
||||||
className="p-2 border rounded w-full pr-10 font-mono text-sm"
|
|
||||||
placeholder="AIza••••••••••••••••••••••••••••••••••••••"
|
|
||||||
required
|
|
||||||
/>
|
|
||||||
<button
|
|
||||||
type="button"
|
|
||||||
onClick={() => setShowKey((v) => !v)}
|
|
||||||
className="absolute inset-y-0 right-2 flex items-center text-gray-500 hover:text-gray-700"
|
|
||||||
tabIndex={-1}
|
|
||||||
>
|
|
||||||
{showKey ? <EyeOff size={16} /> : <Eye size={16} />}
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
<p className="text-xs text-gray-500 mt-1">
|
|
||||||
Get your free key from{" "}
|
|
||||||
<span className="font-medium">Google AI Studio</span> → Get API Key.
|
|
||||||
</p>
|
|
||||||
</div>
|
</div>
|
||||||
|
<div className="flex items-center gap-2">
|
||||||
<div className="flex items-center gap-3 pt-1">
|
<span className="text-sm text-gray-500">{aiEnabled ? "On" : "Off"}</span>
|
||||||
|
<Switch
|
||||||
|
checked={aiEnabled}
|
||||||
|
onCheckedChange={(v) => { setAiEnabled(v); googleToggleMutation.mutate(v); }}
|
||||||
|
disabled={googleToggleMutation.isPending}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<p className="text-sm text-gray-500">
|
||||||
|
Enter your Google AI Studio API key to enable AI-powered SMS replies.
|
||||||
|
</p>
|
||||||
|
<div>
|
||||||
|
<label className="block text-sm font-medium">Google AI Studio API Key</label>
|
||||||
|
<div className="relative mt-1">
|
||||||
|
<input
|
||||||
|
type={showGoogleKey ? "text" : "password"}
|
||||||
|
value={apiKey}
|
||||||
|
onChange={(e) => setApiKey(e.target.value)}
|
||||||
|
className="p-2 border rounded w-full pr-10 font-mono text-sm"
|
||||||
|
placeholder="AIza••••••••••••••••••••••••••••••••••••••"
|
||||||
|
/>
|
||||||
<button
|
<button
|
||||||
type="submit"
|
type="button"
|
||||||
className="bg-teal-600 text-white px-4 py-2 rounded hover:bg-teal-700 text-sm"
|
onClick={() => setShowGoogleKey((v) => !v)}
|
||||||
disabled={saveMutation.isPending}
|
className="absolute inset-y-0 right-2 flex items-center text-gray-500 hover:text-gray-700"
|
||||||
|
tabIndex={-1}
|
||||||
>
|
>
|
||||||
{saveMutation.isPending ? "Saving..." : "Save AI Settings"}
|
{showGoogleKey ? <EyeOff size={16} /> : <Eye size={16} />}
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
<button
|
||||||
|
onClick={() => { if (apiKey.trim()) googleSaveMutation.mutate(apiKey.trim()); }}
|
||||||
|
className="bg-teal-600 text-white px-4 py-2 rounded hover:bg-teal-700 text-sm"
|
||||||
|
disabled={googleSaveMutation.isPending || !apiKey.trim()}
|
||||||
|
>
|
||||||
|
{googleSaveMutation.isPending ? "Saving..." : "Save"}
|
||||||
|
</button>
|
||||||
|
{!!settings?.apiKey && (
|
||||||
|
<div className="mt-2 p-3 bg-gray-50 rounded border text-xs text-gray-600 space-y-1">
|
||||||
|
<p className="font-medium text-gray-700">AI Auto-Reply Rules</p>
|
||||||
|
<p><span className="text-green-600 font-medium">Patient replies "Yes"</span> → AI sends a thank-you confirmation</p>
|
||||||
|
<p><span className="text-red-500 font-medium">Patient replies "No" / "Not available"</span> → AI notifies them an assistant will follow up</p>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<Separator />
|
||||||
|
|
||||||
|
{/* OpenAI */}
|
||||||
|
<ApiKeySection
|
||||||
|
title="OpenAI Settings"
|
||||||
|
description="Enter your OpenAI API key to enable OpenAI-powered features."
|
||||||
|
apiKey={settings?.openAiKey ?? ""}
|
||||||
|
enabled={settings?.openAiEnabled ?? false}
|
||||||
|
isConfigured={!!settings?.openAiKey}
|
||||||
|
onSave={(key) => providerKeyMutation.mutate({ provider: "openAi", apiKey: key })}
|
||||||
|
onToggle={(v) => providerToggleMutation.mutate({ provider: "openAi", enabled: v })}
|
||||||
|
isSaving={providerKeyMutation.isPending && (providerKeyMutation.variables as any)?.provider === "openAi"}
|
||||||
|
isToggling={providerToggleMutation.isPending && (providerToggleMutation.variables as any)?.provider === "openAi"}
|
||||||
|
/>
|
||||||
|
|
||||||
|
<Separator />
|
||||||
|
|
||||||
|
{/* Claude AI */}
|
||||||
|
<ApiKeySection
|
||||||
|
title="Claude AI Settings"
|
||||||
|
description="Enter your Anthropic Claude API key to enable Claude-powered features."
|
||||||
|
apiKey={settings?.claudeAiKey ?? ""}
|
||||||
|
enabled={settings?.claudeAiEnabled ?? false}
|
||||||
|
isConfigured={!!settings?.claudeAiKey}
|
||||||
|
onSave={(key) => providerKeyMutation.mutate({ provider: "claudeAi", apiKey: key })}
|
||||||
|
onToggle={(v) => providerToggleMutation.mutate({ provider: "claudeAi", enabled: v })}
|
||||||
|
isSaving={providerKeyMutation.isPending && (providerKeyMutation.variables as any)?.provider === "claudeAi"}
|
||||||
|
isToggling={providerToggleMutation.isPending && (providerToggleMutation.variables as any)?.provider === "claudeAi"}
|
||||||
|
/>
|
||||||
|
|
||||||
|
<Separator />
|
||||||
|
|
||||||
|
{/* DentalManagement AI */}
|
||||||
|
<ApiKeySection
|
||||||
|
title="DentalManagement AI Settings"
|
||||||
|
description="Enter your DentalManagement AI API key to enable DentalManagement-powered features."
|
||||||
|
apiKey={settings?.dentalMgmtKey ?? ""}
|
||||||
|
enabled={settings?.dentalMgmtEnabled ?? false}
|
||||||
|
isConfigured={!!settings?.dentalMgmtKey}
|
||||||
|
onSave={(key) => providerKeyMutation.mutate({ provider: "dentalMgmt", apiKey: key })}
|
||||||
|
onToggle={(v) => providerToggleMutation.mutate({ provider: "dentalMgmt", enabled: v })}
|
||||||
|
isSaving={providerKeyMutation.isPending && (providerKeyMutation.variables as any)?.provider === "dentalMgmt"}
|
||||||
|
isToggling={providerToggleMutation.isPending && (providerToggleMutation.variables as any)?.provider === "dentalMgmt"}
|
||||||
|
/>
|
||||||
|
|
||||||
{isConfigured && (
|
|
||||||
<div className="mt-2 p-3 bg-gray-50 rounded border text-xs text-gray-600 space-y-1">
|
|
||||||
<p className="font-medium text-gray-700">AI Auto-Reply Rules</p>
|
|
||||||
<p>
|
|
||||||
<span className="text-green-600 font-medium">Patient replies "Yes"</span> → AI sends a thank-you confirmation
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
<span className="text-red-500 font-medium">Patient replies "No" / "Not available"</span> → AI notifies them an assistant will follow up
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
</form>
|
|
||||||
)}
|
|
||||||
</CardContent>
|
</CardContent>
|
||||||
</Card>
|
</Card>
|
||||||
);
|
);
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -435,6 +435,13 @@ exports.Prisma.AiSettingsScalarFieldEnum = {
|
|||||||
id: 'id',
|
id: 'id',
|
||||||
userId: 'userId',
|
userId: 'userId',
|
||||||
apiKey: 'apiKey',
|
apiKey: 'apiKey',
|
||||||
|
aiEnabled: 'aiEnabled',
|
||||||
|
openAiKey: 'openAiKey',
|
||||||
|
openAiEnabled: 'openAiEnabled',
|
||||||
|
claudeAiKey: 'claudeAiKey',
|
||||||
|
claudeAiEnabled: 'claudeAiEnabled',
|
||||||
|
dentalMgmtKey: 'dentalMgmtKey',
|
||||||
|
dentalMgmtEnabled: 'dentalMgmtEnabled',
|
||||||
afterHoursEnabled: 'afterHoursEnabled',
|
afterHoursEnabled: 'afterHoursEnabled',
|
||||||
openPhoneReply: 'openPhoneReply'
|
openPhoneReply: 'openPhoneReply'
|
||||||
};
|
};
|
||||||
|
|||||||
233
packages/db/generated/prisma/index.d.ts
vendored
233
packages/db/generated/prisma/index.d.ts
vendored
@@ -36381,6 +36381,13 @@ export namespace Prisma {
|
|||||||
id: number | null
|
id: number | null
|
||||||
userId: number | null
|
userId: number | null
|
||||||
apiKey: string | null
|
apiKey: string | null
|
||||||
|
aiEnabled: boolean | null
|
||||||
|
openAiKey: string | null
|
||||||
|
openAiEnabled: boolean | null
|
||||||
|
claudeAiKey: string | null
|
||||||
|
claudeAiEnabled: boolean | null
|
||||||
|
dentalMgmtKey: string | null
|
||||||
|
dentalMgmtEnabled: boolean | null
|
||||||
afterHoursEnabled: boolean | null
|
afterHoursEnabled: boolean | null
|
||||||
openPhoneReply: boolean | null
|
openPhoneReply: boolean | null
|
||||||
}
|
}
|
||||||
@@ -36389,6 +36396,13 @@ export namespace Prisma {
|
|||||||
id: number | null
|
id: number | null
|
||||||
userId: number | null
|
userId: number | null
|
||||||
apiKey: string | null
|
apiKey: string | null
|
||||||
|
aiEnabled: boolean | null
|
||||||
|
openAiKey: string | null
|
||||||
|
openAiEnabled: boolean | null
|
||||||
|
claudeAiKey: string | null
|
||||||
|
claudeAiEnabled: boolean | null
|
||||||
|
dentalMgmtKey: string | null
|
||||||
|
dentalMgmtEnabled: boolean | null
|
||||||
afterHoursEnabled: boolean | null
|
afterHoursEnabled: boolean | null
|
||||||
openPhoneReply: boolean | null
|
openPhoneReply: boolean | null
|
||||||
}
|
}
|
||||||
@@ -36397,6 +36411,13 @@ export namespace Prisma {
|
|||||||
id: number
|
id: number
|
||||||
userId: number
|
userId: number
|
||||||
apiKey: number
|
apiKey: number
|
||||||
|
aiEnabled: number
|
||||||
|
openAiKey: number
|
||||||
|
openAiEnabled: number
|
||||||
|
claudeAiKey: number
|
||||||
|
claudeAiEnabled: number
|
||||||
|
dentalMgmtKey: number
|
||||||
|
dentalMgmtEnabled: number
|
||||||
afterHoursEnabled: number
|
afterHoursEnabled: number
|
||||||
openPhoneReply: number
|
openPhoneReply: number
|
||||||
_all: number
|
_all: number
|
||||||
@@ -36417,6 +36438,13 @@ export namespace Prisma {
|
|||||||
id?: true
|
id?: true
|
||||||
userId?: true
|
userId?: true
|
||||||
apiKey?: true
|
apiKey?: true
|
||||||
|
aiEnabled?: true
|
||||||
|
openAiKey?: true
|
||||||
|
openAiEnabled?: true
|
||||||
|
claudeAiKey?: true
|
||||||
|
claudeAiEnabled?: true
|
||||||
|
dentalMgmtKey?: true
|
||||||
|
dentalMgmtEnabled?: true
|
||||||
afterHoursEnabled?: true
|
afterHoursEnabled?: true
|
||||||
openPhoneReply?: true
|
openPhoneReply?: true
|
||||||
}
|
}
|
||||||
@@ -36425,6 +36453,13 @@ export namespace Prisma {
|
|||||||
id?: true
|
id?: true
|
||||||
userId?: true
|
userId?: true
|
||||||
apiKey?: true
|
apiKey?: true
|
||||||
|
aiEnabled?: true
|
||||||
|
openAiKey?: true
|
||||||
|
openAiEnabled?: true
|
||||||
|
claudeAiKey?: true
|
||||||
|
claudeAiEnabled?: true
|
||||||
|
dentalMgmtKey?: true
|
||||||
|
dentalMgmtEnabled?: true
|
||||||
afterHoursEnabled?: true
|
afterHoursEnabled?: true
|
||||||
openPhoneReply?: true
|
openPhoneReply?: true
|
||||||
}
|
}
|
||||||
@@ -36433,6 +36468,13 @@ export namespace Prisma {
|
|||||||
id?: true
|
id?: true
|
||||||
userId?: true
|
userId?: true
|
||||||
apiKey?: true
|
apiKey?: true
|
||||||
|
aiEnabled?: true
|
||||||
|
openAiKey?: true
|
||||||
|
openAiEnabled?: true
|
||||||
|
claudeAiKey?: true
|
||||||
|
claudeAiEnabled?: true
|
||||||
|
dentalMgmtKey?: true
|
||||||
|
dentalMgmtEnabled?: true
|
||||||
afterHoursEnabled?: true
|
afterHoursEnabled?: true
|
||||||
openPhoneReply?: true
|
openPhoneReply?: true
|
||||||
_all?: true
|
_all?: true
|
||||||
@@ -36528,6 +36570,13 @@ export namespace Prisma {
|
|||||||
id: number
|
id: number
|
||||||
userId: number
|
userId: number
|
||||||
apiKey: string
|
apiKey: string
|
||||||
|
aiEnabled: boolean
|
||||||
|
openAiKey: string
|
||||||
|
openAiEnabled: boolean
|
||||||
|
claudeAiKey: string
|
||||||
|
claudeAiEnabled: boolean
|
||||||
|
dentalMgmtKey: string
|
||||||
|
dentalMgmtEnabled: boolean
|
||||||
afterHoursEnabled: boolean
|
afterHoursEnabled: boolean
|
||||||
openPhoneReply: boolean
|
openPhoneReply: boolean
|
||||||
_count: AiSettingsCountAggregateOutputType | null
|
_count: AiSettingsCountAggregateOutputType | null
|
||||||
@@ -36555,6 +36604,13 @@ export namespace Prisma {
|
|||||||
id?: boolean
|
id?: boolean
|
||||||
userId?: boolean
|
userId?: boolean
|
||||||
apiKey?: boolean
|
apiKey?: boolean
|
||||||
|
aiEnabled?: boolean
|
||||||
|
openAiKey?: boolean
|
||||||
|
openAiEnabled?: boolean
|
||||||
|
claudeAiKey?: boolean
|
||||||
|
claudeAiEnabled?: boolean
|
||||||
|
dentalMgmtKey?: boolean
|
||||||
|
dentalMgmtEnabled?: boolean
|
||||||
afterHoursEnabled?: boolean
|
afterHoursEnabled?: boolean
|
||||||
openPhoneReply?: boolean
|
openPhoneReply?: boolean
|
||||||
user?: boolean | UserDefaultArgs<ExtArgs>
|
user?: boolean | UserDefaultArgs<ExtArgs>
|
||||||
@@ -36564,6 +36620,13 @@ export namespace Prisma {
|
|||||||
id?: boolean
|
id?: boolean
|
||||||
userId?: boolean
|
userId?: boolean
|
||||||
apiKey?: boolean
|
apiKey?: boolean
|
||||||
|
aiEnabled?: boolean
|
||||||
|
openAiKey?: boolean
|
||||||
|
openAiEnabled?: boolean
|
||||||
|
claudeAiKey?: boolean
|
||||||
|
claudeAiEnabled?: boolean
|
||||||
|
dentalMgmtKey?: boolean
|
||||||
|
dentalMgmtEnabled?: boolean
|
||||||
afterHoursEnabled?: boolean
|
afterHoursEnabled?: boolean
|
||||||
openPhoneReply?: boolean
|
openPhoneReply?: boolean
|
||||||
user?: boolean | UserDefaultArgs<ExtArgs>
|
user?: boolean | UserDefaultArgs<ExtArgs>
|
||||||
@@ -36573,6 +36636,13 @@ export namespace Prisma {
|
|||||||
id?: boolean
|
id?: boolean
|
||||||
userId?: boolean
|
userId?: boolean
|
||||||
apiKey?: boolean
|
apiKey?: boolean
|
||||||
|
aiEnabled?: boolean
|
||||||
|
openAiKey?: boolean
|
||||||
|
openAiEnabled?: boolean
|
||||||
|
claudeAiKey?: boolean
|
||||||
|
claudeAiEnabled?: boolean
|
||||||
|
dentalMgmtKey?: boolean
|
||||||
|
dentalMgmtEnabled?: boolean
|
||||||
afterHoursEnabled?: boolean
|
afterHoursEnabled?: boolean
|
||||||
openPhoneReply?: boolean
|
openPhoneReply?: boolean
|
||||||
user?: boolean | UserDefaultArgs<ExtArgs>
|
user?: boolean | UserDefaultArgs<ExtArgs>
|
||||||
@@ -36582,11 +36652,18 @@ export namespace Prisma {
|
|||||||
id?: boolean
|
id?: boolean
|
||||||
userId?: boolean
|
userId?: boolean
|
||||||
apiKey?: boolean
|
apiKey?: boolean
|
||||||
|
aiEnabled?: boolean
|
||||||
|
openAiKey?: boolean
|
||||||
|
openAiEnabled?: boolean
|
||||||
|
claudeAiKey?: boolean
|
||||||
|
claudeAiEnabled?: boolean
|
||||||
|
dentalMgmtKey?: boolean
|
||||||
|
dentalMgmtEnabled?: boolean
|
||||||
afterHoursEnabled?: boolean
|
afterHoursEnabled?: boolean
|
||||||
openPhoneReply?: boolean
|
openPhoneReply?: boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
export type AiSettingsOmit<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetOmit<"id" | "userId" | "apiKey" | "afterHoursEnabled" | "openPhoneReply", ExtArgs["result"]["aiSettings"]>
|
export type AiSettingsOmit<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetOmit<"id" | "userId" | "apiKey" | "aiEnabled" | "openAiKey" | "openAiEnabled" | "claudeAiKey" | "claudeAiEnabled" | "dentalMgmtKey" | "dentalMgmtEnabled" | "afterHoursEnabled" | "openPhoneReply", ExtArgs["result"]["aiSettings"]>
|
||||||
export type AiSettingsInclude<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
|
export type AiSettingsInclude<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
|
||||||
user?: boolean | UserDefaultArgs<ExtArgs>
|
user?: boolean | UserDefaultArgs<ExtArgs>
|
||||||
}
|
}
|
||||||
@@ -36606,6 +36683,13 @@ export namespace Prisma {
|
|||||||
id: number
|
id: number
|
||||||
userId: number
|
userId: number
|
||||||
apiKey: string
|
apiKey: string
|
||||||
|
aiEnabled: boolean
|
||||||
|
openAiKey: string
|
||||||
|
openAiEnabled: boolean
|
||||||
|
claudeAiKey: string
|
||||||
|
claudeAiEnabled: boolean
|
||||||
|
dentalMgmtKey: string
|
||||||
|
dentalMgmtEnabled: boolean
|
||||||
afterHoursEnabled: boolean
|
afterHoursEnabled: boolean
|
||||||
openPhoneReply: boolean
|
openPhoneReply: boolean
|
||||||
}, ExtArgs["result"]["aiSettings"]>
|
}, ExtArgs["result"]["aiSettings"]>
|
||||||
@@ -37035,6 +37119,13 @@ export namespace Prisma {
|
|||||||
readonly id: FieldRef<"AiSettings", 'Int'>
|
readonly id: FieldRef<"AiSettings", 'Int'>
|
||||||
readonly userId: FieldRef<"AiSettings", 'Int'>
|
readonly userId: FieldRef<"AiSettings", 'Int'>
|
||||||
readonly apiKey: FieldRef<"AiSettings", 'String'>
|
readonly apiKey: FieldRef<"AiSettings", 'String'>
|
||||||
|
readonly aiEnabled: FieldRef<"AiSettings", 'Boolean'>
|
||||||
|
readonly openAiKey: FieldRef<"AiSettings", 'String'>
|
||||||
|
readonly openAiEnabled: FieldRef<"AiSettings", 'Boolean'>
|
||||||
|
readonly claudeAiKey: FieldRef<"AiSettings", 'String'>
|
||||||
|
readonly claudeAiEnabled: FieldRef<"AiSettings", 'Boolean'>
|
||||||
|
readonly dentalMgmtKey: FieldRef<"AiSettings", 'String'>
|
||||||
|
readonly dentalMgmtEnabled: FieldRef<"AiSettings", 'Boolean'>
|
||||||
readonly afterHoursEnabled: FieldRef<"AiSettings", 'Boolean'>
|
readonly afterHoursEnabled: FieldRef<"AiSettings", 'Boolean'>
|
||||||
readonly openPhoneReply: FieldRef<"AiSettings", 'Boolean'>
|
readonly openPhoneReply: FieldRef<"AiSettings", 'Boolean'>
|
||||||
}
|
}
|
||||||
@@ -45640,6 +45731,13 @@ export namespace Prisma {
|
|||||||
id: 'id',
|
id: 'id',
|
||||||
userId: 'userId',
|
userId: 'userId',
|
||||||
apiKey: 'apiKey',
|
apiKey: 'apiKey',
|
||||||
|
aiEnabled: 'aiEnabled',
|
||||||
|
openAiKey: 'openAiKey',
|
||||||
|
openAiEnabled: 'openAiEnabled',
|
||||||
|
claudeAiKey: 'claudeAiKey',
|
||||||
|
claudeAiEnabled: 'claudeAiEnabled',
|
||||||
|
dentalMgmtKey: 'dentalMgmtKey',
|
||||||
|
dentalMgmtEnabled: 'dentalMgmtEnabled',
|
||||||
afterHoursEnabled: 'afterHoursEnabled',
|
afterHoursEnabled: 'afterHoursEnabled',
|
||||||
openPhoneReply: 'openPhoneReply'
|
openPhoneReply: 'openPhoneReply'
|
||||||
};
|
};
|
||||||
@@ -48268,6 +48366,13 @@ export namespace Prisma {
|
|||||||
id?: IntFilter<"AiSettings"> | number
|
id?: IntFilter<"AiSettings"> | number
|
||||||
userId?: IntFilter<"AiSettings"> | number
|
userId?: IntFilter<"AiSettings"> | number
|
||||||
apiKey?: StringFilter<"AiSettings"> | string
|
apiKey?: StringFilter<"AiSettings"> | string
|
||||||
|
aiEnabled?: BoolFilter<"AiSettings"> | boolean
|
||||||
|
openAiKey?: StringFilter<"AiSettings"> | string
|
||||||
|
openAiEnabled?: BoolFilter<"AiSettings"> | boolean
|
||||||
|
claudeAiKey?: StringFilter<"AiSettings"> | string
|
||||||
|
claudeAiEnabled?: BoolFilter<"AiSettings"> | boolean
|
||||||
|
dentalMgmtKey?: StringFilter<"AiSettings"> | string
|
||||||
|
dentalMgmtEnabled?: BoolFilter<"AiSettings"> | boolean
|
||||||
afterHoursEnabled?: BoolFilter<"AiSettings"> | boolean
|
afterHoursEnabled?: BoolFilter<"AiSettings"> | boolean
|
||||||
openPhoneReply?: BoolFilter<"AiSettings"> | boolean
|
openPhoneReply?: BoolFilter<"AiSettings"> | boolean
|
||||||
user?: XOR<UserScalarRelationFilter, UserWhereInput>
|
user?: XOR<UserScalarRelationFilter, UserWhereInput>
|
||||||
@@ -48277,6 +48382,13 @@ export namespace Prisma {
|
|||||||
id?: SortOrder
|
id?: SortOrder
|
||||||
userId?: SortOrder
|
userId?: SortOrder
|
||||||
apiKey?: SortOrder
|
apiKey?: SortOrder
|
||||||
|
aiEnabled?: SortOrder
|
||||||
|
openAiKey?: SortOrder
|
||||||
|
openAiEnabled?: SortOrder
|
||||||
|
claudeAiKey?: SortOrder
|
||||||
|
claudeAiEnabled?: SortOrder
|
||||||
|
dentalMgmtKey?: SortOrder
|
||||||
|
dentalMgmtEnabled?: SortOrder
|
||||||
afterHoursEnabled?: SortOrder
|
afterHoursEnabled?: SortOrder
|
||||||
openPhoneReply?: SortOrder
|
openPhoneReply?: SortOrder
|
||||||
user?: UserOrderByWithRelationInput
|
user?: UserOrderByWithRelationInput
|
||||||
@@ -48289,6 +48401,13 @@ export namespace Prisma {
|
|||||||
OR?: AiSettingsWhereInput[]
|
OR?: AiSettingsWhereInput[]
|
||||||
NOT?: AiSettingsWhereInput | AiSettingsWhereInput[]
|
NOT?: AiSettingsWhereInput | AiSettingsWhereInput[]
|
||||||
apiKey?: StringFilter<"AiSettings"> | string
|
apiKey?: StringFilter<"AiSettings"> | string
|
||||||
|
aiEnabled?: BoolFilter<"AiSettings"> | boolean
|
||||||
|
openAiKey?: StringFilter<"AiSettings"> | string
|
||||||
|
openAiEnabled?: BoolFilter<"AiSettings"> | boolean
|
||||||
|
claudeAiKey?: StringFilter<"AiSettings"> | string
|
||||||
|
claudeAiEnabled?: BoolFilter<"AiSettings"> | boolean
|
||||||
|
dentalMgmtKey?: StringFilter<"AiSettings"> | string
|
||||||
|
dentalMgmtEnabled?: BoolFilter<"AiSettings"> | boolean
|
||||||
afterHoursEnabled?: BoolFilter<"AiSettings"> | boolean
|
afterHoursEnabled?: BoolFilter<"AiSettings"> | boolean
|
||||||
openPhoneReply?: BoolFilter<"AiSettings"> | boolean
|
openPhoneReply?: BoolFilter<"AiSettings"> | boolean
|
||||||
user?: XOR<UserScalarRelationFilter, UserWhereInput>
|
user?: XOR<UserScalarRelationFilter, UserWhereInput>
|
||||||
@@ -48298,6 +48417,13 @@ export namespace Prisma {
|
|||||||
id?: SortOrder
|
id?: SortOrder
|
||||||
userId?: SortOrder
|
userId?: SortOrder
|
||||||
apiKey?: SortOrder
|
apiKey?: SortOrder
|
||||||
|
aiEnabled?: SortOrder
|
||||||
|
openAiKey?: SortOrder
|
||||||
|
openAiEnabled?: SortOrder
|
||||||
|
claudeAiKey?: SortOrder
|
||||||
|
claudeAiEnabled?: SortOrder
|
||||||
|
dentalMgmtKey?: SortOrder
|
||||||
|
dentalMgmtEnabled?: SortOrder
|
||||||
afterHoursEnabled?: SortOrder
|
afterHoursEnabled?: SortOrder
|
||||||
openPhoneReply?: SortOrder
|
openPhoneReply?: SortOrder
|
||||||
_count?: AiSettingsCountOrderByAggregateInput
|
_count?: AiSettingsCountOrderByAggregateInput
|
||||||
@@ -48314,6 +48440,13 @@ export namespace Prisma {
|
|||||||
id?: IntWithAggregatesFilter<"AiSettings"> | number
|
id?: IntWithAggregatesFilter<"AiSettings"> | number
|
||||||
userId?: IntWithAggregatesFilter<"AiSettings"> | number
|
userId?: IntWithAggregatesFilter<"AiSettings"> | number
|
||||||
apiKey?: StringWithAggregatesFilter<"AiSettings"> | string
|
apiKey?: StringWithAggregatesFilter<"AiSettings"> | string
|
||||||
|
aiEnabled?: BoolWithAggregatesFilter<"AiSettings"> | boolean
|
||||||
|
openAiKey?: StringWithAggregatesFilter<"AiSettings"> | string
|
||||||
|
openAiEnabled?: BoolWithAggregatesFilter<"AiSettings"> | boolean
|
||||||
|
claudeAiKey?: StringWithAggregatesFilter<"AiSettings"> | string
|
||||||
|
claudeAiEnabled?: BoolWithAggregatesFilter<"AiSettings"> | boolean
|
||||||
|
dentalMgmtKey?: StringWithAggregatesFilter<"AiSettings"> | string
|
||||||
|
dentalMgmtEnabled?: BoolWithAggregatesFilter<"AiSettings"> | boolean
|
||||||
afterHoursEnabled?: BoolWithAggregatesFilter<"AiSettings"> | boolean
|
afterHoursEnabled?: BoolWithAggregatesFilter<"AiSettings"> | boolean
|
||||||
openPhoneReply?: BoolWithAggregatesFilter<"AiSettings"> | boolean
|
openPhoneReply?: BoolWithAggregatesFilter<"AiSettings"> | boolean
|
||||||
}
|
}
|
||||||
@@ -51004,6 +51137,13 @@ export namespace Prisma {
|
|||||||
|
|
||||||
export type AiSettingsCreateInput = {
|
export type AiSettingsCreateInput = {
|
||||||
apiKey: string
|
apiKey: string
|
||||||
|
aiEnabled?: boolean
|
||||||
|
openAiKey?: string
|
||||||
|
openAiEnabled?: boolean
|
||||||
|
claudeAiKey?: string
|
||||||
|
claudeAiEnabled?: boolean
|
||||||
|
dentalMgmtKey?: string
|
||||||
|
dentalMgmtEnabled?: boolean
|
||||||
afterHoursEnabled?: boolean
|
afterHoursEnabled?: boolean
|
||||||
openPhoneReply?: boolean
|
openPhoneReply?: boolean
|
||||||
user: UserCreateNestedOneWithoutAiSettingsInput
|
user: UserCreateNestedOneWithoutAiSettingsInput
|
||||||
@@ -51013,12 +51153,26 @@ export namespace Prisma {
|
|||||||
id?: number
|
id?: number
|
||||||
userId: number
|
userId: number
|
||||||
apiKey: string
|
apiKey: string
|
||||||
|
aiEnabled?: boolean
|
||||||
|
openAiKey?: string
|
||||||
|
openAiEnabled?: boolean
|
||||||
|
claudeAiKey?: string
|
||||||
|
claudeAiEnabled?: boolean
|
||||||
|
dentalMgmtKey?: string
|
||||||
|
dentalMgmtEnabled?: boolean
|
||||||
afterHoursEnabled?: boolean
|
afterHoursEnabled?: boolean
|
||||||
openPhoneReply?: boolean
|
openPhoneReply?: boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
export type AiSettingsUpdateInput = {
|
export type AiSettingsUpdateInput = {
|
||||||
apiKey?: StringFieldUpdateOperationsInput | string
|
apiKey?: StringFieldUpdateOperationsInput | string
|
||||||
|
aiEnabled?: BoolFieldUpdateOperationsInput | boolean
|
||||||
|
openAiKey?: StringFieldUpdateOperationsInput | string
|
||||||
|
openAiEnabled?: BoolFieldUpdateOperationsInput | boolean
|
||||||
|
claudeAiKey?: StringFieldUpdateOperationsInput | string
|
||||||
|
claudeAiEnabled?: BoolFieldUpdateOperationsInput | boolean
|
||||||
|
dentalMgmtKey?: StringFieldUpdateOperationsInput | string
|
||||||
|
dentalMgmtEnabled?: BoolFieldUpdateOperationsInput | boolean
|
||||||
afterHoursEnabled?: BoolFieldUpdateOperationsInput | boolean
|
afterHoursEnabled?: BoolFieldUpdateOperationsInput | boolean
|
||||||
openPhoneReply?: BoolFieldUpdateOperationsInput | boolean
|
openPhoneReply?: BoolFieldUpdateOperationsInput | boolean
|
||||||
user?: UserUpdateOneRequiredWithoutAiSettingsNestedInput
|
user?: UserUpdateOneRequiredWithoutAiSettingsNestedInput
|
||||||
@@ -51028,6 +51182,13 @@ export namespace Prisma {
|
|||||||
id?: IntFieldUpdateOperationsInput | number
|
id?: IntFieldUpdateOperationsInput | number
|
||||||
userId?: IntFieldUpdateOperationsInput | number
|
userId?: IntFieldUpdateOperationsInput | number
|
||||||
apiKey?: StringFieldUpdateOperationsInput | string
|
apiKey?: StringFieldUpdateOperationsInput | string
|
||||||
|
aiEnabled?: BoolFieldUpdateOperationsInput | boolean
|
||||||
|
openAiKey?: StringFieldUpdateOperationsInput | string
|
||||||
|
openAiEnabled?: BoolFieldUpdateOperationsInput | boolean
|
||||||
|
claudeAiKey?: StringFieldUpdateOperationsInput | string
|
||||||
|
claudeAiEnabled?: BoolFieldUpdateOperationsInput | boolean
|
||||||
|
dentalMgmtKey?: StringFieldUpdateOperationsInput | string
|
||||||
|
dentalMgmtEnabled?: BoolFieldUpdateOperationsInput | boolean
|
||||||
afterHoursEnabled?: BoolFieldUpdateOperationsInput | boolean
|
afterHoursEnabled?: BoolFieldUpdateOperationsInput | boolean
|
||||||
openPhoneReply?: BoolFieldUpdateOperationsInput | boolean
|
openPhoneReply?: BoolFieldUpdateOperationsInput | boolean
|
||||||
}
|
}
|
||||||
@@ -51036,12 +51197,26 @@ export namespace Prisma {
|
|||||||
id?: number
|
id?: number
|
||||||
userId: number
|
userId: number
|
||||||
apiKey: string
|
apiKey: string
|
||||||
|
aiEnabled?: boolean
|
||||||
|
openAiKey?: string
|
||||||
|
openAiEnabled?: boolean
|
||||||
|
claudeAiKey?: string
|
||||||
|
claudeAiEnabled?: boolean
|
||||||
|
dentalMgmtKey?: string
|
||||||
|
dentalMgmtEnabled?: boolean
|
||||||
afterHoursEnabled?: boolean
|
afterHoursEnabled?: boolean
|
||||||
openPhoneReply?: boolean
|
openPhoneReply?: boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
export type AiSettingsUpdateManyMutationInput = {
|
export type AiSettingsUpdateManyMutationInput = {
|
||||||
apiKey?: StringFieldUpdateOperationsInput | string
|
apiKey?: StringFieldUpdateOperationsInput | string
|
||||||
|
aiEnabled?: BoolFieldUpdateOperationsInput | boolean
|
||||||
|
openAiKey?: StringFieldUpdateOperationsInput | string
|
||||||
|
openAiEnabled?: BoolFieldUpdateOperationsInput | boolean
|
||||||
|
claudeAiKey?: StringFieldUpdateOperationsInput | string
|
||||||
|
claudeAiEnabled?: BoolFieldUpdateOperationsInput | boolean
|
||||||
|
dentalMgmtKey?: StringFieldUpdateOperationsInput | string
|
||||||
|
dentalMgmtEnabled?: BoolFieldUpdateOperationsInput | boolean
|
||||||
afterHoursEnabled?: BoolFieldUpdateOperationsInput | boolean
|
afterHoursEnabled?: BoolFieldUpdateOperationsInput | boolean
|
||||||
openPhoneReply?: BoolFieldUpdateOperationsInput | boolean
|
openPhoneReply?: BoolFieldUpdateOperationsInput | boolean
|
||||||
}
|
}
|
||||||
@@ -51050,6 +51225,13 @@ export namespace Prisma {
|
|||||||
id?: IntFieldUpdateOperationsInput | number
|
id?: IntFieldUpdateOperationsInput | number
|
||||||
userId?: IntFieldUpdateOperationsInput | number
|
userId?: IntFieldUpdateOperationsInput | number
|
||||||
apiKey?: StringFieldUpdateOperationsInput | string
|
apiKey?: StringFieldUpdateOperationsInput | string
|
||||||
|
aiEnabled?: BoolFieldUpdateOperationsInput | boolean
|
||||||
|
openAiKey?: StringFieldUpdateOperationsInput | string
|
||||||
|
openAiEnabled?: BoolFieldUpdateOperationsInput | boolean
|
||||||
|
claudeAiKey?: StringFieldUpdateOperationsInput | string
|
||||||
|
claudeAiEnabled?: BoolFieldUpdateOperationsInput | boolean
|
||||||
|
dentalMgmtKey?: StringFieldUpdateOperationsInput | string
|
||||||
|
dentalMgmtEnabled?: BoolFieldUpdateOperationsInput | boolean
|
||||||
afterHoursEnabled?: BoolFieldUpdateOperationsInput | boolean
|
afterHoursEnabled?: BoolFieldUpdateOperationsInput | boolean
|
||||||
openPhoneReply?: BoolFieldUpdateOperationsInput | boolean
|
openPhoneReply?: BoolFieldUpdateOperationsInput | boolean
|
||||||
}
|
}
|
||||||
@@ -53648,6 +53830,13 @@ export namespace Prisma {
|
|||||||
id?: SortOrder
|
id?: SortOrder
|
||||||
userId?: SortOrder
|
userId?: SortOrder
|
||||||
apiKey?: SortOrder
|
apiKey?: SortOrder
|
||||||
|
aiEnabled?: SortOrder
|
||||||
|
openAiKey?: SortOrder
|
||||||
|
openAiEnabled?: SortOrder
|
||||||
|
claudeAiKey?: SortOrder
|
||||||
|
claudeAiEnabled?: SortOrder
|
||||||
|
dentalMgmtKey?: SortOrder
|
||||||
|
dentalMgmtEnabled?: SortOrder
|
||||||
afterHoursEnabled?: SortOrder
|
afterHoursEnabled?: SortOrder
|
||||||
openPhoneReply?: SortOrder
|
openPhoneReply?: SortOrder
|
||||||
}
|
}
|
||||||
@@ -53661,6 +53850,13 @@ export namespace Prisma {
|
|||||||
id?: SortOrder
|
id?: SortOrder
|
||||||
userId?: SortOrder
|
userId?: SortOrder
|
||||||
apiKey?: SortOrder
|
apiKey?: SortOrder
|
||||||
|
aiEnabled?: SortOrder
|
||||||
|
openAiKey?: SortOrder
|
||||||
|
openAiEnabled?: SortOrder
|
||||||
|
claudeAiKey?: SortOrder
|
||||||
|
claudeAiEnabled?: SortOrder
|
||||||
|
dentalMgmtKey?: SortOrder
|
||||||
|
dentalMgmtEnabled?: SortOrder
|
||||||
afterHoursEnabled?: SortOrder
|
afterHoursEnabled?: SortOrder
|
||||||
openPhoneReply?: SortOrder
|
openPhoneReply?: SortOrder
|
||||||
}
|
}
|
||||||
@@ -53669,6 +53865,13 @@ export namespace Prisma {
|
|||||||
id?: SortOrder
|
id?: SortOrder
|
||||||
userId?: SortOrder
|
userId?: SortOrder
|
||||||
apiKey?: SortOrder
|
apiKey?: SortOrder
|
||||||
|
aiEnabled?: SortOrder
|
||||||
|
openAiKey?: SortOrder
|
||||||
|
openAiEnabled?: SortOrder
|
||||||
|
claudeAiKey?: SortOrder
|
||||||
|
claudeAiEnabled?: SortOrder
|
||||||
|
dentalMgmtKey?: SortOrder
|
||||||
|
dentalMgmtEnabled?: SortOrder
|
||||||
afterHoursEnabled?: SortOrder
|
afterHoursEnabled?: SortOrder
|
||||||
openPhoneReply?: SortOrder
|
openPhoneReply?: SortOrder
|
||||||
}
|
}
|
||||||
@@ -57953,6 +58156,13 @@ export namespace Prisma {
|
|||||||
|
|
||||||
export type AiSettingsCreateWithoutUserInput = {
|
export type AiSettingsCreateWithoutUserInput = {
|
||||||
apiKey: string
|
apiKey: string
|
||||||
|
aiEnabled?: boolean
|
||||||
|
openAiKey?: string
|
||||||
|
openAiEnabled?: boolean
|
||||||
|
claudeAiKey?: string
|
||||||
|
claudeAiEnabled?: boolean
|
||||||
|
dentalMgmtKey?: string
|
||||||
|
dentalMgmtEnabled?: boolean
|
||||||
afterHoursEnabled?: boolean
|
afterHoursEnabled?: boolean
|
||||||
openPhoneReply?: boolean
|
openPhoneReply?: boolean
|
||||||
}
|
}
|
||||||
@@ -57960,6 +58170,13 @@ export namespace Prisma {
|
|||||||
export type AiSettingsUncheckedCreateWithoutUserInput = {
|
export type AiSettingsUncheckedCreateWithoutUserInput = {
|
||||||
id?: number
|
id?: number
|
||||||
apiKey: string
|
apiKey: string
|
||||||
|
aiEnabled?: boolean
|
||||||
|
openAiKey?: string
|
||||||
|
openAiEnabled?: boolean
|
||||||
|
claudeAiKey?: string
|
||||||
|
claudeAiEnabled?: boolean
|
||||||
|
dentalMgmtKey?: string
|
||||||
|
dentalMgmtEnabled?: boolean
|
||||||
afterHoursEnabled?: boolean
|
afterHoursEnabled?: boolean
|
||||||
openPhoneReply?: boolean
|
openPhoneReply?: boolean
|
||||||
}
|
}
|
||||||
@@ -58564,6 +58781,13 @@ export namespace Prisma {
|
|||||||
|
|
||||||
export type AiSettingsUpdateWithoutUserInput = {
|
export type AiSettingsUpdateWithoutUserInput = {
|
||||||
apiKey?: StringFieldUpdateOperationsInput | string
|
apiKey?: StringFieldUpdateOperationsInput | string
|
||||||
|
aiEnabled?: BoolFieldUpdateOperationsInput | boolean
|
||||||
|
openAiKey?: StringFieldUpdateOperationsInput | string
|
||||||
|
openAiEnabled?: BoolFieldUpdateOperationsInput | boolean
|
||||||
|
claudeAiKey?: StringFieldUpdateOperationsInput | string
|
||||||
|
claudeAiEnabled?: BoolFieldUpdateOperationsInput | boolean
|
||||||
|
dentalMgmtKey?: StringFieldUpdateOperationsInput | string
|
||||||
|
dentalMgmtEnabled?: BoolFieldUpdateOperationsInput | boolean
|
||||||
afterHoursEnabled?: BoolFieldUpdateOperationsInput | boolean
|
afterHoursEnabled?: BoolFieldUpdateOperationsInput | boolean
|
||||||
openPhoneReply?: BoolFieldUpdateOperationsInput | boolean
|
openPhoneReply?: BoolFieldUpdateOperationsInput | boolean
|
||||||
}
|
}
|
||||||
@@ -58571,6 +58795,13 @@ export namespace Prisma {
|
|||||||
export type AiSettingsUncheckedUpdateWithoutUserInput = {
|
export type AiSettingsUncheckedUpdateWithoutUserInput = {
|
||||||
id?: IntFieldUpdateOperationsInput | number
|
id?: IntFieldUpdateOperationsInput | number
|
||||||
apiKey?: StringFieldUpdateOperationsInput | string
|
apiKey?: StringFieldUpdateOperationsInput | string
|
||||||
|
aiEnabled?: BoolFieldUpdateOperationsInput | boolean
|
||||||
|
openAiKey?: StringFieldUpdateOperationsInput | string
|
||||||
|
openAiEnabled?: BoolFieldUpdateOperationsInput | boolean
|
||||||
|
claudeAiKey?: StringFieldUpdateOperationsInput | string
|
||||||
|
claudeAiEnabled?: BoolFieldUpdateOperationsInput | boolean
|
||||||
|
dentalMgmtKey?: StringFieldUpdateOperationsInput | string
|
||||||
|
dentalMgmtEnabled?: BoolFieldUpdateOperationsInput | boolean
|
||||||
afterHoursEnabled?: BoolFieldUpdateOperationsInput | boolean
|
afterHoursEnabled?: BoolFieldUpdateOperationsInput | boolean
|
||||||
openPhoneReply?: BoolFieldUpdateOperationsInput | boolean
|
openPhoneReply?: BoolFieldUpdateOperationsInput | boolean
|
||||||
}
|
}
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"name": "prisma-client-ae04602e14efae70f6055fb4d588cf6860f72b63564d0ac2c7419c6c8e032b2d",
|
"name": "prisma-client-dffa61cfa33500c5a3d8eb3911d8102dda0abe78c0c02287d94a83d7e3de2af7",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"types": "index.d.ts",
|
"types": "index.d.ts",
|
||||||
"browser": "default.js",
|
"browser": "default.js",
|
||||||
|
|||||||
@@ -600,6 +600,13 @@ model AiSettings {
|
|||||||
id Int @id @default(autoincrement())
|
id Int @id @default(autoincrement())
|
||||||
userId Int @unique
|
userId Int @unique
|
||||||
apiKey String
|
apiKey String
|
||||||
|
aiEnabled Boolean @default(true)
|
||||||
|
openAiKey String @default("")
|
||||||
|
openAiEnabled Boolean @default(true)
|
||||||
|
claudeAiKey String @default("")
|
||||||
|
claudeAiEnabled Boolean @default(true)
|
||||||
|
dentalMgmtKey String @default("")
|
||||||
|
dentalMgmtEnabled Boolean @default(true)
|
||||||
afterHoursEnabled Boolean @default(true)
|
afterHoursEnabled Boolean @default(true)
|
||||||
openPhoneReply Boolean @default(false)
|
openPhoneReply Boolean @default(false)
|
||||||
|
|
||||||
|
|||||||
@@ -601,6 +601,13 @@ model AiSettings {
|
|||||||
id Int @id @default(autoincrement())
|
id Int @id @default(autoincrement())
|
||||||
userId Int @unique
|
userId Int @unique
|
||||||
apiKey String
|
apiKey String
|
||||||
|
aiEnabled Boolean @default(true)
|
||||||
|
openAiKey String @default("")
|
||||||
|
openAiEnabled Boolean @default(false)
|
||||||
|
claudeAiKey String @default("")
|
||||||
|
claudeAiEnabled Boolean @default(false)
|
||||||
|
dentalMgmtKey String @default("")
|
||||||
|
dentalMgmtEnabled Boolean @default(false)
|
||||||
afterHoursEnabled Boolean @default(true)
|
afterHoursEnabled Boolean @default(true)
|
||||||
openPhoneReply Boolean @default(false)
|
openPhoneReply Boolean @default(false)
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"version": "1.0",
|
"version": "1.0",
|
||||||
"generatorVersion": "1.0.0",
|
"generatorVersion": "1.0.0",
|
||||||
"generatedAt": "2026-05-29T02:31:29.315Z",
|
"generatedAt": "2026-06-05T20:31:36.056Z",
|
||||||
"outputPath": "/home/ff/Desktop/DentalManagementMH06/packages/db/shared",
|
"outputPath": "/home/ff/Desktop/DentalManagementMH06/packages/db/shared",
|
||||||
"files": [
|
"files": [
|
||||||
"schemas/enums/TransactionIsolationLevel.schema.ts",
|
"schemas/enums/TransactionIsolationLevel.schema.ts",
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import * as z from 'zod';
|
import * as z from 'zod';
|
||||||
|
|
||||||
export const AiSettingsScalarFieldEnumSchema = z.enum(['id', 'userId', 'apiKey', 'afterHoursEnabled', 'openPhoneReply'])
|
export const AiSettingsScalarFieldEnumSchema = z.enum(['id', 'userId', 'apiKey', 'aiEnabled', 'openAiKey', 'openAiEnabled', 'claudeAiKey', 'claudeAiEnabled', 'dentalMgmtKey', 'dentalMgmtEnabled', 'afterHoursEnabled', 'openPhoneReply'])
|
||||||
|
|
||||||
export type AiSettingsScalarFieldEnum = z.infer<typeof AiSettingsScalarFieldEnumSchema>;
|
export type AiSettingsScalarFieldEnum = z.infer<typeof AiSettingsScalarFieldEnumSchema>;
|
||||||
@@ -13,6 +13,13 @@ export const AiSettingsFindFirstSelectSchema: z.ZodType<Prisma.AiSettingsSelect>
|
|||||||
id: z.boolean().optional(),
|
id: z.boolean().optional(),
|
||||||
userId: z.boolean().optional(),
|
userId: z.boolean().optional(),
|
||||||
apiKey: z.boolean().optional(),
|
apiKey: z.boolean().optional(),
|
||||||
|
aiEnabled: z.boolean().optional(),
|
||||||
|
openAiKey: z.boolean().optional(),
|
||||||
|
openAiEnabled: z.boolean().optional(),
|
||||||
|
claudeAiKey: z.boolean().optional(),
|
||||||
|
claudeAiEnabled: z.boolean().optional(),
|
||||||
|
dentalMgmtKey: z.boolean().optional(),
|
||||||
|
dentalMgmtEnabled: z.boolean().optional(),
|
||||||
afterHoursEnabled: z.boolean().optional(),
|
afterHoursEnabled: z.boolean().optional(),
|
||||||
openPhoneReply: z.boolean().optional(),
|
openPhoneReply: z.boolean().optional(),
|
||||||
user: z.boolean().optional()
|
user: z.boolean().optional()
|
||||||
@@ -22,6 +29,13 @@ export const AiSettingsFindFirstSelectZodSchema = z.object({
|
|||||||
id: z.boolean().optional(),
|
id: z.boolean().optional(),
|
||||||
userId: z.boolean().optional(),
|
userId: z.boolean().optional(),
|
||||||
apiKey: z.boolean().optional(),
|
apiKey: z.boolean().optional(),
|
||||||
|
aiEnabled: z.boolean().optional(),
|
||||||
|
openAiKey: z.boolean().optional(),
|
||||||
|
openAiEnabled: z.boolean().optional(),
|
||||||
|
claudeAiKey: z.boolean().optional(),
|
||||||
|
claudeAiEnabled: z.boolean().optional(),
|
||||||
|
dentalMgmtKey: z.boolean().optional(),
|
||||||
|
dentalMgmtEnabled: z.boolean().optional(),
|
||||||
afterHoursEnabled: z.boolean().optional(),
|
afterHoursEnabled: z.boolean().optional(),
|
||||||
openPhoneReply: z.boolean().optional(),
|
openPhoneReply: z.boolean().optional(),
|
||||||
user: z.boolean().optional()
|
user: z.boolean().optional()
|
||||||
|
|||||||
@@ -13,6 +13,13 @@ export const AiSettingsFindFirstOrThrowSelectSchema: z.ZodType<Prisma.AiSettings
|
|||||||
id: z.boolean().optional(),
|
id: z.boolean().optional(),
|
||||||
userId: z.boolean().optional(),
|
userId: z.boolean().optional(),
|
||||||
apiKey: z.boolean().optional(),
|
apiKey: z.boolean().optional(),
|
||||||
|
aiEnabled: z.boolean().optional(),
|
||||||
|
openAiKey: z.boolean().optional(),
|
||||||
|
openAiEnabled: z.boolean().optional(),
|
||||||
|
claudeAiKey: z.boolean().optional(),
|
||||||
|
claudeAiEnabled: z.boolean().optional(),
|
||||||
|
dentalMgmtKey: z.boolean().optional(),
|
||||||
|
dentalMgmtEnabled: z.boolean().optional(),
|
||||||
afterHoursEnabled: z.boolean().optional(),
|
afterHoursEnabled: z.boolean().optional(),
|
||||||
openPhoneReply: z.boolean().optional(),
|
openPhoneReply: z.boolean().optional(),
|
||||||
user: z.boolean().optional()
|
user: z.boolean().optional()
|
||||||
@@ -22,6 +29,13 @@ export const AiSettingsFindFirstOrThrowSelectZodSchema = z.object({
|
|||||||
id: z.boolean().optional(),
|
id: z.boolean().optional(),
|
||||||
userId: z.boolean().optional(),
|
userId: z.boolean().optional(),
|
||||||
apiKey: z.boolean().optional(),
|
apiKey: z.boolean().optional(),
|
||||||
|
aiEnabled: z.boolean().optional(),
|
||||||
|
openAiKey: z.boolean().optional(),
|
||||||
|
openAiEnabled: z.boolean().optional(),
|
||||||
|
claudeAiKey: z.boolean().optional(),
|
||||||
|
claudeAiEnabled: z.boolean().optional(),
|
||||||
|
dentalMgmtKey: z.boolean().optional(),
|
||||||
|
dentalMgmtEnabled: z.boolean().optional(),
|
||||||
afterHoursEnabled: z.boolean().optional(),
|
afterHoursEnabled: z.boolean().optional(),
|
||||||
openPhoneReply: z.boolean().optional(),
|
openPhoneReply: z.boolean().optional(),
|
||||||
user: z.boolean().optional()
|
user: z.boolean().optional()
|
||||||
|
|||||||
@@ -13,6 +13,13 @@ export const AiSettingsFindManySelectSchema: z.ZodType<Prisma.AiSettingsSelect>
|
|||||||
id: z.boolean().optional(),
|
id: z.boolean().optional(),
|
||||||
userId: z.boolean().optional(),
|
userId: z.boolean().optional(),
|
||||||
apiKey: z.boolean().optional(),
|
apiKey: z.boolean().optional(),
|
||||||
|
aiEnabled: z.boolean().optional(),
|
||||||
|
openAiKey: z.boolean().optional(),
|
||||||
|
openAiEnabled: z.boolean().optional(),
|
||||||
|
claudeAiKey: z.boolean().optional(),
|
||||||
|
claudeAiEnabled: z.boolean().optional(),
|
||||||
|
dentalMgmtKey: z.boolean().optional(),
|
||||||
|
dentalMgmtEnabled: z.boolean().optional(),
|
||||||
afterHoursEnabled: z.boolean().optional(),
|
afterHoursEnabled: z.boolean().optional(),
|
||||||
openPhoneReply: z.boolean().optional(),
|
openPhoneReply: z.boolean().optional(),
|
||||||
user: z.boolean().optional()
|
user: z.boolean().optional()
|
||||||
@@ -22,6 +29,13 @@ export const AiSettingsFindManySelectZodSchema = z.object({
|
|||||||
id: z.boolean().optional(),
|
id: z.boolean().optional(),
|
||||||
userId: z.boolean().optional(),
|
userId: z.boolean().optional(),
|
||||||
apiKey: z.boolean().optional(),
|
apiKey: z.boolean().optional(),
|
||||||
|
aiEnabled: z.boolean().optional(),
|
||||||
|
openAiKey: z.boolean().optional(),
|
||||||
|
openAiEnabled: z.boolean().optional(),
|
||||||
|
claudeAiKey: z.boolean().optional(),
|
||||||
|
claudeAiEnabled: z.boolean().optional(),
|
||||||
|
dentalMgmtKey: z.boolean().optional(),
|
||||||
|
dentalMgmtEnabled: z.boolean().optional(),
|
||||||
afterHoursEnabled: z.boolean().optional(),
|
afterHoursEnabled: z.boolean().optional(),
|
||||||
openPhoneReply: z.boolean().optional(),
|
openPhoneReply: z.boolean().optional(),
|
||||||
user: z.boolean().optional()
|
user: z.boolean().optional()
|
||||||
|
|||||||
@@ -6,6 +6,13 @@ const makeSchema = () => z.object({
|
|||||||
id: z.literal(true).optional(),
|
id: z.literal(true).optional(),
|
||||||
userId: z.literal(true).optional(),
|
userId: z.literal(true).optional(),
|
||||||
apiKey: z.literal(true).optional(),
|
apiKey: z.literal(true).optional(),
|
||||||
|
aiEnabled: z.literal(true).optional(),
|
||||||
|
openAiKey: z.literal(true).optional(),
|
||||||
|
openAiEnabled: z.literal(true).optional(),
|
||||||
|
claudeAiKey: z.literal(true).optional(),
|
||||||
|
claudeAiEnabled: z.literal(true).optional(),
|
||||||
|
dentalMgmtKey: z.literal(true).optional(),
|
||||||
|
dentalMgmtEnabled: z.literal(true).optional(),
|
||||||
afterHoursEnabled: z.literal(true).optional(),
|
afterHoursEnabled: z.literal(true).optional(),
|
||||||
openPhoneReply: z.literal(true).optional(),
|
openPhoneReply: z.literal(true).optional(),
|
||||||
_all: z.literal(true).optional()
|
_all: z.literal(true).optional()
|
||||||
|
|||||||
@@ -6,6 +6,13 @@ const makeSchema = () => z.object({
|
|||||||
id: SortOrderSchema.optional(),
|
id: SortOrderSchema.optional(),
|
||||||
userId: SortOrderSchema.optional(),
|
userId: SortOrderSchema.optional(),
|
||||||
apiKey: SortOrderSchema.optional(),
|
apiKey: SortOrderSchema.optional(),
|
||||||
|
aiEnabled: SortOrderSchema.optional(),
|
||||||
|
openAiKey: SortOrderSchema.optional(),
|
||||||
|
openAiEnabled: SortOrderSchema.optional(),
|
||||||
|
claudeAiKey: SortOrderSchema.optional(),
|
||||||
|
claudeAiEnabled: SortOrderSchema.optional(),
|
||||||
|
dentalMgmtKey: SortOrderSchema.optional(),
|
||||||
|
dentalMgmtEnabled: SortOrderSchema.optional(),
|
||||||
afterHoursEnabled: SortOrderSchema.optional(),
|
afterHoursEnabled: SortOrderSchema.optional(),
|
||||||
openPhoneReply: SortOrderSchema.optional()
|
openPhoneReply: SortOrderSchema.optional()
|
||||||
}).strict();
|
}).strict();
|
||||||
|
|||||||
@@ -4,6 +4,13 @@ import { UserCreateNestedOneWithoutAiSettingsInputObjectSchema as UserCreateNest
|
|||||||
|
|
||||||
const makeSchema = () => z.object({
|
const makeSchema = () => z.object({
|
||||||
apiKey: z.string(),
|
apiKey: z.string(),
|
||||||
|
aiEnabled: z.boolean().optional(),
|
||||||
|
openAiKey: z.string().optional(),
|
||||||
|
openAiEnabled: z.boolean().optional(),
|
||||||
|
claudeAiKey: z.string().optional(),
|
||||||
|
claudeAiEnabled: z.boolean().optional(),
|
||||||
|
dentalMgmtKey: z.string().optional(),
|
||||||
|
dentalMgmtEnabled: z.boolean().optional(),
|
||||||
afterHoursEnabled: z.boolean().optional(),
|
afterHoursEnabled: z.boolean().optional(),
|
||||||
openPhoneReply: z.boolean().optional(),
|
openPhoneReply: z.boolean().optional(),
|
||||||
user: z.lazy(() => UserCreateNestedOneWithoutAiSettingsInputObjectSchema)
|
user: z.lazy(() => UserCreateNestedOneWithoutAiSettingsInputObjectSchema)
|
||||||
|
|||||||
@@ -6,6 +6,13 @@ const makeSchema = () => z.object({
|
|||||||
id: z.number().int().optional(),
|
id: z.number().int().optional(),
|
||||||
userId: z.number().int(),
|
userId: z.number().int(),
|
||||||
apiKey: z.string(),
|
apiKey: z.string(),
|
||||||
|
aiEnabled: z.boolean().optional(),
|
||||||
|
openAiKey: z.string().optional(),
|
||||||
|
openAiEnabled: z.boolean().optional(),
|
||||||
|
claudeAiKey: z.string().optional(),
|
||||||
|
claudeAiEnabled: z.boolean().optional(),
|
||||||
|
dentalMgmtKey: z.string().optional(),
|
||||||
|
dentalMgmtEnabled: z.boolean().optional(),
|
||||||
afterHoursEnabled: z.boolean().optional(),
|
afterHoursEnabled: z.boolean().optional(),
|
||||||
openPhoneReply: z.boolean().optional()
|
openPhoneReply: z.boolean().optional()
|
||||||
}).strict();
|
}).strict();
|
||||||
|
|||||||
@@ -4,6 +4,13 @@ import type { Prisma } from '../../../generated/prisma';
|
|||||||
|
|
||||||
const makeSchema = () => z.object({
|
const makeSchema = () => z.object({
|
||||||
apiKey: z.string(),
|
apiKey: z.string(),
|
||||||
|
aiEnabled: z.boolean().optional(),
|
||||||
|
openAiKey: z.string().optional(),
|
||||||
|
openAiEnabled: z.boolean().optional(),
|
||||||
|
claudeAiKey: z.string().optional(),
|
||||||
|
claudeAiEnabled: z.boolean().optional(),
|
||||||
|
dentalMgmtKey: z.string().optional(),
|
||||||
|
dentalMgmtEnabled: z.boolean().optional(),
|
||||||
afterHoursEnabled: z.boolean().optional(),
|
afterHoursEnabled: z.boolean().optional(),
|
||||||
openPhoneReply: z.boolean().optional()
|
openPhoneReply: z.boolean().optional()
|
||||||
}).strict();
|
}).strict();
|
||||||
|
|||||||
@@ -6,6 +6,13 @@ const makeSchema = () => z.object({
|
|||||||
id: z.literal(true).optional(),
|
id: z.literal(true).optional(),
|
||||||
userId: z.literal(true).optional(),
|
userId: z.literal(true).optional(),
|
||||||
apiKey: z.literal(true).optional(),
|
apiKey: z.literal(true).optional(),
|
||||||
|
aiEnabled: z.literal(true).optional(),
|
||||||
|
openAiKey: z.literal(true).optional(),
|
||||||
|
openAiEnabled: z.literal(true).optional(),
|
||||||
|
claudeAiKey: z.literal(true).optional(),
|
||||||
|
claudeAiEnabled: z.literal(true).optional(),
|
||||||
|
dentalMgmtKey: z.literal(true).optional(),
|
||||||
|
dentalMgmtEnabled: z.literal(true).optional(),
|
||||||
afterHoursEnabled: z.literal(true).optional(),
|
afterHoursEnabled: z.literal(true).optional(),
|
||||||
openPhoneReply: z.literal(true).optional()
|
openPhoneReply: z.literal(true).optional()
|
||||||
}).strict();
|
}).strict();
|
||||||
|
|||||||
@@ -6,6 +6,13 @@ const makeSchema = () => z.object({
|
|||||||
id: SortOrderSchema.optional(),
|
id: SortOrderSchema.optional(),
|
||||||
userId: SortOrderSchema.optional(),
|
userId: SortOrderSchema.optional(),
|
||||||
apiKey: SortOrderSchema.optional(),
|
apiKey: SortOrderSchema.optional(),
|
||||||
|
aiEnabled: SortOrderSchema.optional(),
|
||||||
|
openAiKey: SortOrderSchema.optional(),
|
||||||
|
openAiEnabled: SortOrderSchema.optional(),
|
||||||
|
claudeAiKey: SortOrderSchema.optional(),
|
||||||
|
claudeAiEnabled: SortOrderSchema.optional(),
|
||||||
|
dentalMgmtKey: SortOrderSchema.optional(),
|
||||||
|
dentalMgmtEnabled: SortOrderSchema.optional(),
|
||||||
afterHoursEnabled: SortOrderSchema.optional(),
|
afterHoursEnabled: SortOrderSchema.optional(),
|
||||||
openPhoneReply: SortOrderSchema.optional()
|
openPhoneReply: SortOrderSchema.optional()
|
||||||
}).strict();
|
}).strict();
|
||||||
|
|||||||
@@ -6,6 +6,13 @@ const makeSchema = () => z.object({
|
|||||||
id: z.literal(true).optional(),
|
id: z.literal(true).optional(),
|
||||||
userId: z.literal(true).optional(),
|
userId: z.literal(true).optional(),
|
||||||
apiKey: z.literal(true).optional(),
|
apiKey: z.literal(true).optional(),
|
||||||
|
aiEnabled: z.literal(true).optional(),
|
||||||
|
openAiKey: z.literal(true).optional(),
|
||||||
|
openAiEnabled: z.literal(true).optional(),
|
||||||
|
claudeAiKey: z.literal(true).optional(),
|
||||||
|
claudeAiEnabled: z.literal(true).optional(),
|
||||||
|
dentalMgmtKey: z.literal(true).optional(),
|
||||||
|
dentalMgmtEnabled: z.literal(true).optional(),
|
||||||
afterHoursEnabled: z.literal(true).optional(),
|
afterHoursEnabled: z.literal(true).optional(),
|
||||||
openPhoneReply: z.literal(true).optional()
|
openPhoneReply: z.literal(true).optional()
|
||||||
}).strict();
|
}).strict();
|
||||||
|
|||||||
@@ -6,6 +6,13 @@ const makeSchema = () => z.object({
|
|||||||
id: SortOrderSchema.optional(),
|
id: SortOrderSchema.optional(),
|
||||||
userId: SortOrderSchema.optional(),
|
userId: SortOrderSchema.optional(),
|
||||||
apiKey: SortOrderSchema.optional(),
|
apiKey: SortOrderSchema.optional(),
|
||||||
|
aiEnabled: SortOrderSchema.optional(),
|
||||||
|
openAiKey: SortOrderSchema.optional(),
|
||||||
|
openAiEnabled: SortOrderSchema.optional(),
|
||||||
|
claudeAiKey: SortOrderSchema.optional(),
|
||||||
|
claudeAiEnabled: SortOrderSchema.optional(),
|
||||||
|
dentalMgmtKey: SortOrderSchema.optional(),
|
||||||
|
dentalMgmtEnabled: SortOrderSchema.optional(),
|
||||||
afterHoursEnabled: SortOrderSchema.optional(),
|
afterHoursEnabled: SortOrderSchema.optional(),
|
||||||
openPhoneReply: SortOrderSchema.optional()
|
openPhoneReply: SortOrderSchema.optional()
|
||||||
}).strict();
|
}).strict();
|
||||||
|
|||||||
@@ -11,6 +11,13 @@ const makeSchema = () => z.object({
|
|||||||
id: SortOrderSchema.optional(),
|
id: SortOrderSchema.optional(),
|
||||||
userId: SortOrderSchema.optional(),
|
userId: SortOrderSchema.optional(),
|
||||||
apiKey: SortOrderSchema.optional(),
|
apiKey: SortOrderSchema.optional(),
|
||||||
|
aiEnabled: SortOrderSchema.optional(),
|
||||||
|
openAiKey: SortOrderSchema.optional(),
|
||||||
|
openAiEnabled: SortOrderSchema.optional(),
|
||||||
|
claudeAiKey: SortOrderSchema.optional(),
|
||||||
|
claudeAiEnabled: SortOrderSchema.optional(),
|
||||||
|
dentalMgmtKey: SortOrderSchema.optional(),
|
||||||
|
dentalMgmtEnabled: SortOrderSchema.optional(),
|
||||||
afterHoursEnabled: SortOrderSchema.optional(),
|
afterHoursEnabled: SortOrderSchema.optional(),
|
||||||
openPhoneReply: SortOrderSchema.optional(),
|
openPhoneReply: SortOrderSchema.optional(),
|
||||||
_count: z.lazy(() => AiSettingsCountOrderByAggregateInputObjectSchema).optional(),
|
_count: z.lazy(() => AiSettingsCountOrderByAggregateInputObjectSchema).optional(),
|
||||||
|
|||||||
@@ -7,6 +7,13 @@ const makeSchema = () => z.object({
|
|||||||
id: SortOrderSchema.optional(),
|
id: SortOrderSchema.optional(),
|
||||||
userId: SortOrderSchema.optional(),
|
userId: SortOrderSchema.optional(),
|
||||||
apiKey: SortOrderSchema.optional(),
|
apiKey: SortOrderSchema.optional(),
|
||||||
|
aiEnabled: SortOrderSchema.optional(),
|
||||||
|
openAiKey: SortOrderSchema.optional(),
|
||||||
|
openAiEnabled: SortOrderSchema.optional(),
|
||||||
|
claudeAiKey: SortOrderSchema.optional(),
|
||||||
|
claudeAiEnabled: SortOrderSchema.optional(),
|
||||||
|
dentalMgmtKey: SortOrderSchema.optional(),
|
||||||
|
dentalMgmtEnabled: SortOrderSchema.optional(),
|
||||||
afterHoursEnabled: SortOrderSchema.optional(),
|
afterHoursEnabled: SortOrderSchema.optional(),
|
||||||
openPhoneReply: SortOrderSchema.optional(),
|
openPhoneReply: SortOrderSchema.optional(),
|
||||||
user: z.lazy(() => UserOrderByWithRelationInputObjectSchema).optional()
|
user: z.lazy(() => UserOrderByWithRelationInputObjectSchema).optional()
|
||||||
|
|||||||
@@ -11,6 +11,13 @@ const aisettingsscalarwherewithaggregatesinputSchema = z.object({
|
|||||||
id: z.union([z.lazy(() => IntWithAggregatesFilterObjectSchema), z.number().int()]).optional(),
|
id: z.union([z.lazy(() => IntWithAggregatesFilterObjectSchema), z.number().int()]).optional(),
|
||||||
userId: z.union([z.lazy(() => IntWithAggregatesFilterObjectSchema), z.number().int()]).optional(),
|
userId: z.union([z.lazy(() => IntWithAggregatesFilterObjectSchema), z.number().int()]).optional(),
|
||||||
apiKey: z.union([z.lazy(() => StringWithAggregatesFilterObjectSchema), z.string()]).optional(),
|
apiKey: z.union([z.lazy(() => StringWithAggregatesFilterObjectSchema), z.string()]).optional(),
|
||||||
|
aiEnabled: z.union([z.lazy(() => BoolWithAggregatesFilterObjectSchema), z.boolean()]).optional(),
|
||||||
|
openAiKey: z.union([z.lazy(() => StringWithAggregatesFilterObjectSchema), z.string()]).optional(),
|
||||||
|
openAiEnabled: z.union([z.lazy(() => BoolWithAggregatesFilterObjectSchema), z.boolean()]).optional(),
|
||||||
|
claudeAiKey: z.union([z.lazy(() => StringWithAggregatesFilterObjectSchema), z.string()]).optional(),
|
||||||
|
claudeAiEnabled: z.union([z.lazy(() => BoolWithAggregatesFilterObjectSchema), z.boolean()]).optional(),
|
||||||
|
dentalMgmtKey: z.union([z.lazy(() => StringWithAggregatesFilterObjectSchema), z.string()]).optional(),
|
||||||
|
dentalMgmtEnabled: z.union([z.lazy(() => BoolWithAggregatesFilterObjectSchema), z.boolean()]).optional(),
|
||||||
afterHoursEnabled: z.union([z.lazy(() => BoolWithAggregatesFilterObjectSchema), z.boolean()]).optional(),
|
afterHoursEnabled: z.union([z.lazy(() => BoolWithAggregatesFilterObjectSchema), z.boolean()]).optional(),
|
||||||
openPhoneReply: z.union([z.lazy(() => BoolWithAggregatesFilterObjectSchema), z.boolean()]).optional()
|
openPhoneReply: z.union([z.lazy(() => BoolWithAggregatesFilterObjectSchema), z.boolean()]).optional()
|
||||||
}).strict();
|
}).strict();
|
||||||
|
|||||||
@@ -6,6 +6,13 @@ const makeSchema = () => z.object({
|
|||||||
id: z.boolean().optional(),
|
id: z.boolean().optional(),
|
||||||
userId: z.boolean().optional(),
|
userId: z.boolean().optional(),
|
||||||
apiKey: z.boolean().optional(),
|
apiKey: z.boolean().optional(),
|
||||||
|
aiEnabled: z.boolean().optional(),
|
||||||
|
openAiKey: z.boolean().optional(),
|
||||||
|
openAiEnabled: z.boolean().optional(),
|
||||||
|
claudeAiKey: z.boolean().optional(),
|
||||||
|
claudeAiEnabled: z.boolean().optional(),
|
||||||
|
dentalMgmtKey: z.boolean().optional(),
|
||||||
|
dentalMgmtEnabled: z.boolean().optional(),
|
||||||
afterHoursEnabled: z.boolean().optional(),
|
afterHoursEnabled: z.boolean().optional(),
|
||||||
openPhoneReply: z.boolean().optional(),
|
openPhoneReply: z.boolean().optional(),
|
||||||
user: z.union([z.boolean(), z.lazy(() => UserArgsObjectSchema)]).optional()
|
user: z.union([z.boolean(), z.lazy(() => UserArgsObjectSchema)]).optional()
|
||||||
|
|||||||
@@ -6,6 +6,13 @@ const makeSchema = () => z.object({
|
|||||||
id: z.number().int().optional(),
|
id: z.number().int().optional(),
|
||||||
userId: z.number().int(),
|
userId: z.number().int(),
|
||||||
apiKey: z.string(),
|
apiKey: z.string(),
|
||||||
|
aiEnabled: z.boolean().optional(),
|
||||||
|
openAiKey: z.string().optional(),
|
||||||
|
openAiEnabled: z.boolean().optional(),
|
||||||
|
claudeAiKey: z.string().optional(),
|
||||||
|
claudeAiEnabled: z.boolean().optional(),
|
||||||
|
dentalMgmtKey: z.string().optional(),
|
||||||
|
dentalMgmtEnabled: z.boolean().optional(),
|
||||||
afterHoursEnabled: z.boolean().optional(),
|
afterHoursEnabled: z.boolean().optional(),
|
||||||
openPhoneReply: z.boolean().optional()
|
openPhoneReply: z.boolean().optional()
|
||||||
}).strict();
|
}).strict();
|
||||||
|
|||||||
@@ -5,6 +5,13 @@ import type { Prisma } from '../../../generated/prisma';
|
|||||||
const makeSchema = () => z.object({
|
const makeSchema = () => z.object({
|
||||||
id: z.number().int().optional(),
|
id: z.number().int().optional(),
|
||||||
apiKey: z.string(),
|
apiKey: z.string(),
|
||||||
|
aiEnabled: z.boolean().optional(),
|
||||||
|
openAiKey: z.string().optional(),
|
||||||
|
openAiEnabled: z.boolean().optional(),
|
||||||
|
claudeAiKey: z.string().optional(),
|
||||||
|
claudeAiEnabled: z.boolean().optional(),
|
||||||
|
dentalMgmtKey: z.string().optional(),
|
||||||
|
dentalMgmtEnabled: z.boolean().optional(),
|
||||||
afterHoursEnabled: z.boolean().optional(),
|
afterHoursEnabled: z.boolean().optional(),
|
||||||
openPhoneReply: z.boolean().optional()
|
openPhoneReply: z.boolean().optional()
|
||||||
}).strict();
|
}).strict();
|
||||||
|
|||||||
@@ -8,6 +8,13 @@ const makeSchema = () => z.object({
|
|||||||
id: z.union([z.number().int(), z.lazy(() => IntFieldUpdateOperationsInputObjectSchema)]).optional(),
|
id: z.union([z.number().int(), z.lazy(() => IntFieldUpdateOperationsInputObjectSchema)]).optional(),
|
||||||
userId: z.union([z.number().int(), z.lazy(() => IntFieldUpdateOperationsInputObjectSchema)]).optional(),
|
userId: z.union([z.number().int(), z.lazy(() => IntFieldUpdateOperationsInputObjectSchema)]).optional(),
|
||||||
apiKey: z.union([z.string(), z.lazy(() => StringFieldUpdateOperationsInputObjectSchema)]).optional(),
|
apiKey: z.union([z.string(), z.lazy(() => StringFieldUpdateOperationsInputObjectSchema)]).optional(),
|
||||||
|
aiEnabled: z.union([z.boolean(), z.lazy(() => BoolFieldUpdateOperationsInputObjectSchema)]).optional(),
|
||||||
|
openAiKey: z.union([z.string(), z.lazy(() => StringFieldUpdateOperationsInputObjectSchema)]).optional(),
|
||||||
|
openAiEnabled: z.union([z.boolean(), z.lazy(() => BoolFieldUpdateOperationsInputObjectSchema)]).optional(),
|
||||||
|
claudeAiKey: z.union([z.string(), z.lazy(() => StringFieldUpdateOperationsInputObjectSchema)]).optional(),
|
||||||
|
claudeAiEnabled: z.union([z.boolean(), z.lazy(() => BoolFieldUpdateOperationsInputObjectSchema)]).optional(),
|
||||||
|
dentalMgmtKey: z.union([z.string(), z.lazy(() => StringFieldUpdateOperationsInputObjectSchema)]).optional(),
|
||||||
|
dentalMgmtEnabled: z.union([z.boolean(), z.lazy(() => BoolFieldUpdateOperationsInputObjectSchema)]).optional(),
|
||||||
afterHoursEnabled: z.union([z.boolean(), z.lazy(() => BoolFieldUpdateOperationsInputObjectSchema)]).optional(),
|
afterHoursEnabled: z.union([z.boolean(), z.lazy(() => BoolFieldUpdateOperationsInputObjectSchema)]).optional(),
|
||||||
openPhoneReply: z.union([z.boolean(), z.lazy(() => BoolFieldUpdateOperationsInputObjectSchema)]).optional()
|
openPhoneReply: z.union([z.boolean(), z.lazy(() => BoolFieldUpdateOperationsInputObjectSchema)]).optional()
|
||||||
}).strict();
|
}).strict();
|
||||||
|
|||||||
@@ -8,6 +8,13 @@ const makeSchema = () => z.object({
|
|||||||
id: z.union([z.number().int(), z.lazy(() => IntFieldUpdateOperationsInputObjectSchema)]).optional(),
|
id: z.union([z.number().int(), z.lazy(() => IntFieldUpdateOperationsInputObjectSchema)]).optional(),
|
||||||
userId: z.union([z.number().int(), z.lazy(() => IntFieldUpdateOperationsInputObjectSchema)]).optional(),
|
userId: z.union([z.number().int(), z.lazy(() => IntFieldUpdateOperationsInputObjectSchema)]).optional(),
|
||||||
apiKey: z.union([z.string(), z.lazy(() => StringFieldUpdateOperationsInputObjectSchema)]).optional(),
|
apiKey: z.union([z.string(), z.lazy(() => StringFieldUpdateOperationsInputObjectSchema)]).optional(),
|
||||||
|
aiEnabled: z.union([z.boolean(), z.lazy(() => BoolFieldUpdateOperationsInputObjectSchema)]).optional(),
|
||||||
|
openAiKey: z.union([z.string(), z.lazy(() => StringFieldUpdateOperationsInputObjectSchema)]).optional(),
|
||||||
|
openAiEnabled: z.union([z.boolean(), z.lazy(() => BoolFieldUpdateOperationsInputObjectSchema)]).optional(),
|
||||||
|
claudeAiKey: z.union([z.string(), z.lazy(() => StringFieldUpdateOperationsInputObjectSchema)]).optional(),
|
||||||
|
claudeAiEnabled: z.union([z.boolean(), z.lazy(() => BoolFieldUpdateOperationsInputObjectSchema)]).optional(),
|
||||||
|
dentalMgmtKey: z.union([z.string(), z.lazy(() => StringFieldUpdateOperationsInputObjectSchema)]).optional(),
|
||||||
|
dentalMgmtEnabled: z.union([z.boolean(), z.lazy(() => BoolFieldUpdateOperationsInputObjectSchema)]).optional(),
|
||||||
afterHoursEnabled: z.union([z.boolean(), z.lazy(() => BoolFieldUpdateOperationsInputObjectSchema)]).optional(),
|
afterHoursEnabled: z.union([z.boolean(), z.lazy(() => BoolFieldUpdateOperationsInputObjectSchema)]).optional(),
|
||||||
openPhoneReply: z.union([z.boolean(), z.lazy(() => BoolFieldUpdateOperationsInputObjectSchema)]).optional()
|
openPhoneReply: z.union([z.boolean(), z.lazy(() => BoolFieldUpdateOperationsInputObjectSchema)]).optional()
|
||||||
}).strict();
|
}).strict();
|
||||||
|
|||||||
@@ -7,6 +7,13 @@ import { BoolFieldUpdateOperationsInputObjectSchema as BoolFieldUpdateOperations
|
|||||||
const makeSchema = () => z.object({
|
const makeSchema = () => z.object({
|
||||||
id: z.union([z.number().int(), z.lazy(() => IntFieldUpdateOperationsInputObjectSchema)]).optional(),
|
id: z.union([z.number().int(), z.lazy(() => IntFieldUpdateOperationsInputObjectSchema)]).optional(),
|
||||||
apiKey: z.union([z.string(), z.lazy(() => StringFieldUpdateOperationsInputObjectSchema)]).optional(),
|
apiKey: z.union([z.string(), z.lazy(() => StringFieldUpdateOperationsInputObjectSchema)]).optional(),
|
||||||
|
aiEnabled: z.union([z.boolean(), z.lazy(() => BoolFieldUpdateOperationsInputObjectSchema)]).optional(),
|
||||||
|
openAiKey: z.union([z.string(), z.lazy(() => StringFieldUpdateOperationsInputObjectSchema)]).optional(),
|
||||||
|
openAiEnabled: z.union([z.boolean(), z.lazy(() => BoolFieldUpdateOperationsInputObjectSchema)]).optional(),
|
||||||
|
claudeAiKey: z.union([z.string(), z.lazy(() => StringFieldUpdateOperationsInputObjectSchema)]).optional(),
|
||||||
|
claudeAiEnabled: z.union([z.boolean(), z.lazy(() => BoolFieldUpdateOperationsInputObjectSchema)]).optional(),
|
||||||
|
dentalMgmtKey: z.union([z.string(), z.lazy(() => StringFieldUpdateOperationsInputObjectSchema)]).optional(),
|
||||||
|
dentalMgmtEnabled: z.union([z.boolean(), z.lazy(() => BoolFieldUpdateOperationsInputObjectSchema)]).optional(),
|
||||||
afterHoursEnabled: z.union([z.boolean(), z.lazy(() => BoolFieldUpdateOperationsInputObjectSchema)]).optional(),
|
afterHoursEnabled: z.union([z.boolean(), z.lazy(() => BoolFieldUpdateOperationsInputObjectSchema)]).optional(),
|
||||||
openPhoneReply: z.union([z.boolean(), z.lazy(() => BoolFieldUpdateOperationsInputObjectSchema)]).optional()
|
openPhoneReply: z.union([z.boolean(), z.lazy(() => BoolFieldUpdateOperationsInputObjectSchema)]).optional()
|
||||||
}).strict();
|
}).strict();
|
||||||
|
|||||||
@@ -6,6 +6,13 @@ import { UserUpdateOneRequiredWithoutAiSettingsNestedInputObjectSchema as UserUp
|
|||||||
|
|
||||||
const makeSchema = () => z.object({
|
const makeSchema = () => z.object({
|
||||||
apiKey: z.union([z.string(), z.lazy(() => StringFieldUpdateOperationsInputObjectSchema)]).optional(),
|
apiKey: z.union([z.string(), z.lazy(() => StringFieldUpdateOperationsInputObjectSchema)]).optional(),
|
||||||
|
aiEnabled: z.union([z.boolean(), z.lazy(() => BoolFieldUpdateOperationsInputObjectSchema)]).optional(),
|
||||||
|
openAiKey: z.union([z.string(), z.lazy(() => StringFieldUpdateOperationsInputObjectSchema)]).optional(),
|
||||||
|
openAiEnabled: z.union([z.boolean(), z.lazy(() => BoolFieldUpdateOperationsInputObjectSchema)]).optional(),
|
||||||
|
claudeAiKey: z.union([z.string(), z.lazy(() => StringFieldUpdateOperationsInputObjectSchema)]).optional(),
|
||||||
|
claudeAiEnabled: z.union([z.boolean(), z.lazy(() => BoolFieldUpdateOperationsInputObjectSchema)]).optional(),
|
||||||
|
dentalMgmtKey: z.union([z.string(), z.lazy(() => StringFieldUpdateOperationsInputObjectSchema)]).optional(),
|
||||||
|
dentalMgmtEnabled: z.union([z.boolean(), z.lazy(() => BoolFieldUpdateOperationsInputObjectSchema)]).optional(),
|
||||||
afterHoursEnabled: z.union([z.boolean(), z.lazy(() => BoolFieldUpdateOperationsInputObjectSchema)]).optional(),
|
afterHoursEnabled: z.union([z.boolean(), z.lazy(() => BoolFieldUpdateOperationsInputObjectSchema)]).optional(),
|
||||||
openPhoneReply: z.union([z.boolean(), z.lazy(() => BoolFieldUpdateOperationsInputObjectSchema)]).optional(),
|
openPhoneReply: z.union([z.boolean(), z.lazy(() => BoolFieldUpdateOperationsInputObjectSchema)]).optional(),
|
||||||
user: z.lazy(() => UserUpdateOneRequiredWithoutAiSettingsNestedInputObjectSchema).optional()
|
user: z.lazy(() => UserUpdateOneRequiredWithoutAiSettingsNestedInputObjectSchema).optional()
|
||||||
|
|||||||
@@ -5,6 +5,13 @@ import { BoolFieldUpdateOperationsInputObjectSchema as BoolFieldUpdateOperations
|
|||||||
|
|
||||||
const makeSchema = () => z.object({
|
const makeSchema = () => z.object({
|
||||||
apiKey: z.union([z.string(), z.lazy(() => StringFieldUpdateOperationsInputObjectSchema)]).optional(),
|
apiKey: z.union([z.string(), z.lazy(() => StringFieldUpdateOperationsInputObjectSchema)]).optional(),
|
||||||
|
aiEnabled: z.union([z.boolean(), z.lazy(() => BoolFieldUpdateOperationsInputObjectSchema)]).optional(),
|
||||||
|
openAiKey: z.union([z.string(), z.lazy(() => StringFieldUpdateOperationsInputObjectSchema)]).optional(),
|
||||||
|
openAiEnabled: z.union([z.boolean(), z.lazy(() => BoolFieldUpdateOperationsInputObjectSchema)]).optional(),
|
||||||
|
claudeAiKey: z.union([z.string(), z.lazy(() => StringFieldUpdateOperationsInputObjectSchema)]).optional(),
|
||||||
|
claudeAiEnabled: z.union([z.boolean(), z.lazy(() => BoolFieldUpdateOperationsInputObjectSchema)]).optional(),
|
||||||
|
dentalMgmtKey: z.union([z.string(), z.lazy(() => StringFieldUpdateOperationsInputObjectSchema)]).optional(),
|
||||||
|
dentalMgmtEnabled: z.union([z.boolean(), z.lazy(() => BoolFieldUpdateOperationsInputObjectSchema)]).optional(),
|
||||||
afterHoursEnabled: z.union([z.boolean(), z.lazy(() => BoolFieldUpdateOperationsInputObjectSchema)]).optional(),
|
afterHoursEnabled: z.union([z.boolean(), z.lazy(() => BoolFieldUpdateOperationsInputObjectSchema)]).optional(),
|
||||||
openPhoneReply: z.union([z.boolean(), z.lazy(() => BoolFieldUpdateOperationsInputObjectSchema)]).optional()
|
openPhoneReply: z.union([z.boolean(), z.lazy(() => BoolFieldUpdateOperationsInputObjectSchema)]).optional()
|
||||||
}).strict();
|
}).strict();
|
||||||
|
|||||||
@@ -5,6 +5,13 @@ import { BoolFieldUpdateOperationsInputObjectSchema as BoolFieldUpdateOperations
|
|||||||
|
|
||||||
const makeSchema = () => z.object({
|
const makeSchema = () => z.object({
|
||||||
apiKey: z.union([z.string(), z.lazy(() => StringFieldUpdateOperationsInputObjectSchema)]).optional(),
|
apiKey: z.union([z.string(), z.lazy(() => StringFieldUpdateOperationsInputObjectSchema)]).optional(),
|
||||||
|
aiEnabled: z.union([z.boolean(), z.lazy(() => BoolFieldUpdateOperationsInputObjectSchema)]).optional(),
|
||||||
|
openAiKey: z.union([z.string(), z.lazy(() => StringFieldUpdateOperationsInputObjectSchema)]).optional(),
|
||||||
|
openAiEnabled: z.union([z.boolean(), z.lazy(() => BoolFieldUpdateOperationsInputObjectSchema)]).optional(),
|
||||||
|
claudeAiKey: z.union([z.string(), z.lazy(() => StringFieldUpdateOperationsInputObjectSchema)]).optional(),
|
||||||
|
claudeAiEnabled: z.union([z.boolean(), z.lazy(() => BoolFieldUpdateOperationsInputObjectSchema)]).optional(),
|
||||||
|
dentalMgmtKey: z.union([z.string(), z.lazy(() => StringFieldUpdateOperationsInputObjectSchema)]).optional(),
|
||||||
|
dentalMgmtEnabled: z.union([z.boolean(), z.lazy(() => BoolFieldUpdateOperationsInputObjectSchema)]).optional(),
|
||||||
afterHoursEnabled: z.union([z.boolean(), z.lazy(() => BoolFieldUpdateOperationsInputObjectSchema)]).optional(),
|
afterHoursEnabled: z.union([z.boolean(), z.lazy(() => BoolFieldUpdateOperationsInputObjectSchema)]).optional(),
|
||||||
openPhoneReply: z.union([z.boolean(), z.lazy(() => BoolFieldUpdateOperationsInputObjectSchema)]).optional()
|
openPhoneReply: z.union([z.boolean(), z.lazy(() => BoolFieldUpdateOperationsInputObjectSchema)]).optional()
|
||||||
}).strict();
|
}).strict();
|
||||||
|
|||||||
@@ -13,6 +13,13 @@ const aisettingswhereinputSchema = z.object({
|
|||||||
id: z.union([z.lazy(() => IntFilterObjectSchema), z.number().int()]).optional(),
|
id: z.union([z.lazy(() => IntFilterObjectSchema), z.number().int()]).optional(),
|
||||||
userId: z.union([z.lazy(() => IntFilterObjectSchema), z.number().int()]).optional(),
|
userId: z.union([z.lazy(() => IntFilterObjectSchema), z.number().int()]).optional(),
|
||||||
apiKey: z.union([z.lazy(() => StringFilterObjectSchema), z.string()]).optional(),
|
apiKey: z.union([z.lazy(() => StringFilterObjectSchema), z.string()]).optional(),
|
||||||
|
aiEnabled: z.union([z.lazy(() => BoolFilterObjectSchema), z.boolean()]).optional(),
|
||||||
|
openAiKey: z.union([z.lazy(() => StringFilterObjectSchema), z.string()]).optional(),
|
||||||
|
openAiEnabled: z.union([z.lazy(() => BoolFilterObjectSchema), z.boolean()]).optional(),
|
||||||
|
claudeAiKey: z.union([z.lazy(() => StringFilterObjectSchema), z.string()]).optional(),
|
||||||
|
claudeAiEnabled: z.union([z.lazy(() => BoolFilterObjectSchema), z.boolean()]).optional(),
|
||||||
|
dentalMgmtKey: z.union([z.lazy(() => StringFilterObjectSchema), z.string()]).optional(),
|
||||||
|
dentalMgmtEnabled: z.union([z.lazy(() => BoolFilterObjectSchema), z.boolean()]).optional(),
|
||||||
afterHoursEnabled: z.union([z.lazy(() => BoolFilterObjectSchema), z.boolean()]).optional(),
|
afterHoursEnabled: z.union([z.lazy(() => BoolFilterObjectSchema), z.boolean()]).optional(),
|
||||||
openPhoneReply: z.union([z.lazy(() => BoolFilterObjectSchema), z.boolean()]).optional(),
|
openPhoneReply: z.union([z.lazy(() => BoolFilterObjectSchema), z.boolean()]).optional(),
|
||||||
user: z.union([z.lazy(() => UserScalarRelationFilterObjectSchema), z.lazy(() => UserWhereInputObjectSchema)]).optional()
|
user: z.union([z.lazy(() => UserScalarRelationFilterObjectSchema), z.lazy(() => UserWhereInputObjectSchema)]).optional()
|
||||||
|
|||||||
@@ -3,6 +3,13 @@ export const AiSettingsAggregateResultSchema = z.object({ _count: z.object({
|
|||||||
id: z.number(),
|
id: z.number(),
|
||||||
userId: z.number(),
|
userId: z.number(),
|
||||||
apiKey: z.number(),
|
apiKey: z.number(),
|
||||||
|
aiEnabled: z.number(),
|
||||||
|
openAiKey: z.number(),
|
||||||
|
openAiEnabled: z.number(),
|
||||||
|
claudeAiKey: z.number(),
|
||||||
|
claudeAiEnabled: z.number(),
|
||||||
|
dentalMgmtKey: z.number(),
|
||||||
|
dentalMgmtEnabled: z.number(),
|
||||||
afterHoursEnabled: z.number(),
|
afterHoursEnabled: z.number(),
|
||||||
openPhoneReply: z.number(),
|
openPhoneReply: z.number(),
|
||||||
user: z.number()
|
user: z.number()
|
||||||
@@ -18,10 +25,16 @@ export const AiSettingsAggregateResultSchema = z.object({ _count: z.object({
|
|||||||
_min: z.object({
|
_min: z.object({
|
||||||
id: z.number().int().nullable(),
|
id: z.number().int().nullable(),
|
||||||
userId: z.number().int().nullable(),
|
userId: z.number().int().nullable(),
|
||||||
apiKey: z.string().nullable()
|
apiKey: z.string().nullable(),
|
||||||
|
openAiKey: z.string().nullable(),
|
||||||
|
claudeAiKey: z.string().nullable(),
|
||||||
|
dentalMgmtKey: z.string().nullable()
|
||||||
}).nullable().optional(),
|
}).nullable().optional(),
|
||||||
_max: z.object({
|
_max: z.object({
|
||||||
id: z.number().int().nullable(),
|
id: z.number().int().nullable(),
|
||||||
userId: z.number().int().nullable(),
|
userId: z.number().int().nullable(),
|
||||||
apiKey: z.string().nullable()
|
apiKey: z.string().nullable(),
|
||||||
|
openAiKey: z.string().nullable(),
|
||||||
|
claudeAiKey: z.string().nullable(),
|
||||||
|
dentalMgmtKey: z.string().nullable()
|
||||||
}).nullable().optional()});
|
}).nullable().optional()});
|
||||||
@@ -3,6 +3,13 @@ export const AiSettingsCreateResultSchema = z.object({
|
|||||||
id: z.number().int(),
|
id: z.number().int(),
|
||||||
userId: z.number().int(),
|
userId: z.number().int(),
|
||||||
apiKey: z.string(),
|
apiKey: z.string(),
|
||||||
|
aiEnabled: z.boolean(),
|
||||||
|
openAiKey: z.string(),
|
||||||
|
openAiEnabled: z.boolean(),
|
||||||
|
claudeAiKey: z.string(),
|
||||||
|
claudeAiEnabled: z.boolean(),
|
||||||
|
dentalMgmtKey: z.string(),
|
||||||
|
dentalMgmtEnabled: z.boolean(),
|
||||||
afterHoursEnabled: z.boolean(),
|
afterHoursEnabled: z.boolean(),
|
||||||
openPhoneReply: z.boolean(),
|
openPhoneReply: z.boolean(),
|
||||||
user: z.unknown()
|
user: z.unknown()
|
||||||
|
|||||||
@@ -3,6 +3,13 @@ export const AiSettingsDeleteResultSchema = z.nullable(z.object({
|
|||||||
id: z.number().int(),
|
id: z.number().int(),
|
||||||
userId: z.number().int(),
|
userId: z.number().int(),
|
||||||
apiKey: z.string(),
|
apiKey: z.string(),
|
||||||
|
aiEnabled: z.boolean(),
|
||||||
|
openAiKey: z.string(),
|
||||||
|
openAiEnabled: z.boolean(),
|
||||||
|
claudeAiKey: z.string(),
|
||||||
|
claudeAiEnabled: z.boolean(),
|
||||||
|
dentalMgmtKey: z.string(),
|
||||||
|
dentalMgmtEnabled: z.boolean(),
|
||||||
afterHoursEnabled: z.boolean(),
|
afterHoursEnabled: z.boolean(),
|
||||||
openPhoneReply: z.boolean(),
|
openPhoneReply: z.boolean(),
|
||||||
user: z.unknown()
|
user: z.unknown()
|
||||||
|
|||||||
@@ -3,6 +3,13 @@ export const AiSettingsFindFirstResultSchema = z.nullable(z.object({
|
|||||||
id: z.number().int(),
|
id: z.number().int(),
|
||||||
userId: z.number().int(),
|
userId: z.number().int(),
|
||||||
apiKey: z.string(),
|
apiKey: z.string(),
|
||||||
|
aiEnabled: z.boolean(),
|
||||||
|
openAiKey: z.string(),
|
||||||
|
openAiEnabled: z.boolean(),
|
||||||
|
claudeAiKey: z.string(),
|
||||||
|
claudeAiEnabled: z.boolean(),
|
||||||
|
dentalMgmtKey: z.string(),
|
||||||
|
dentalMgmtEnabled: z.boolean(),
|
||||||
afterHoursEnabled: z.boolean(),
|
afterHoursEnabled: z.boolean(),
|
||||||
openPhoneReply: z.boolean(),
|
openPhoneReply: z.boolean(),
|
||||||
user: z.unknown()
|
user: z.unknown()
|
||||||
|
|||||||
@@ -4,6 +4,13 @@ export const AiSettingsFindManyResultSchema = z.object({
|
|||||||
id: z.number().int(),
|
id: z.number().int(),
|
||||||
userId: z.number().int(),
|
userId: z.number().int(),
|
||||||
apiKey: z.string(),
|
apiKey: z.string(),
|
||||||
|
aiEnabled: z.boolean(),
|
||||||
|
openAiKey: z.string(),
|
||||||
|
openAiEnabled: z.boolean(),
|
||||||
|
claudeAiKey: z.string(),
|
||||||
|
claudeAiEnabled: z.boolean(),
|
||||||
|
dentalMgmtKey: z.string(),
|
||||||
|
dentalMgmtEnabled: z.boolean(),
|
||||||
afterHoursEnabled: z.boolean(),
|
afterHoursEnabled: z.boolean(),
|
||||||
openPhoneReply: z.boolean(),
|
openPhoneReply: z.boolean(),
|
||||||
user: z.unknown()
|
user: z.unknown()
|
||||||
|
|||||||
@@ -3,6 +3,13 @@ export const AiSettingsFindUniqueResultSchema = z.nullable(z.object({
|
|||||||
id: z.number().int(),
|
id: z.number().int(),
|
||||||
userId: z.number().int(),
|
userId: z.number().int(),
|
||||||
apiKey: z.string(),
|
apiKey: z.string(),
|
||||||
|
aiEnabled: z.boolean(),
|
||||||
|
openAiKey: z.string(),
|
||||||
|
openAiEnabled: z.boolean(),
|
||||||
|
claudeAiKey: z.string(),
|
||||||
|
claudeAiEnabled: z.boolean(),
|
||||||
|
dentalMgmtKey: z.string(),
|
||||||
|
dentalMgmtEnabled: z.boolean(),
|
||||||
afterHoursEnabled: z.boolean(),
|
afterHoursEnabled: z.boolean(),
|
||||||
openPhoneReply: z.boolean(),
|
openPhoneReply: z.boolean(),
|
||||||
user: z.unknown()
|
user: z.unknown()
|
||||||
|
|||||||
@@ -3,12 +3,26 @@ export const AiSettingsGroupByResultSchema = z.array(z.object({
|
|||||||
id: z.number().int(),
|
id: z.number().int(),
|
||||||
userId: z.number().int(),
|
userId: z.number().int(),
|
||||||
apiKey: z.string(),
|
apiKey: z.string(),
|
||||||
|
aiEnabled: z.boolean(),
|
||||||
|
openAiKey: z.string(),
|
||||||
|
openAiEnabled: z.boolean(),
|
||||||
|
claudeAiKey: z.string(),
|
||||||
|
claudeAiEnabled: z.boolean(),
|
||||||
|
dentalMgmtKey: z.string(),
|
||||||
|
dentalMgmtEnabled: z.boolean(),
|
||||||
afterHoursEnabled: z.boolean(),
|
afterHoursEnabled: z.boolean(),
|
||||||
openPhoneReply: z.boolean(),
|
openPhoneReply: z.boolean(),
|
||||||
_count: z.object({
|
_count: z.object({
|
||||||
id: z.number(),
|
id: z.number(),
|
||||||
userId: z.number(),
|
userId: z.number(),
|
||||||
apiKey: z.number(),
|
apiKey: z.number(),
|
||||||
|
aiEnabled: z.number(),
|
||||||
|
openAiKey: z.number(),
|
||||||
|
openAiEnabled: z.number(),
|
||||||
|
claudeAiKey: z.number(),
|
||||||
|
claudeAiEnabled: z.number(),
|
||||||
|
dentalMgmtKey: z.number(),
|
||||||
|
dentalMgmtEnabled: z.number(),
|
||||||
afterHoursEnabled: z.number(),
|
afterHoursEnabled: z.number(),
|
||||||
openPhoneReply: z.number(),
|
openPhoneReply: z.number(),
|
||||||
user: z.number()
|
user: z.number()
|
||||||
@@ -24,11 +38,17 @@ export const AiSettingsGroupByResultSchema = z.array(z.object({
|
|||||||
_min: z.object({
|
_min: z.object({
|
||||||
id: z.number().int().nullable(),
|
id: z.number().int().nullable(),
|
||||||
userId: z.number().int().nullable(),
|
userId: z.number().int().nullable(),
|
||||||
apiKey: z.string().nullable()
|
apiKey: z.string().nullable(),
|
||||||
|
openAiKey: z.string().nullable(),
|
||||||
|
claudeAiKey: z.string().nullable(),
|
||||||
|
dentalMgmtKey: z.string().nullable()
|
||||||
}).nullable().optional(),
|
}).nullable().optional(),
|
||||||
_max: z.object({
|
_max: z.object({
|
||||||
id: z.number().int().nullable(),
|
id: z.number().int().nullable(),
|
||||||
userId: z.number().int().nullable(),
|
userId: z.number().int().nullable(),
|
||||||
apiKey: z.string().nullable()
|
apiKey: z.string().nullable(),
|
||||||
|
openAiKey: z.string().nullable(),
|
||||||
|
claudeAiKey: z.string().nullable(),
|
||||||
|
dentalMgmtKey: z.string().nullable()
|
||||||
}).nullable().optional()
|
}).nullable().optional()
|
||||||
}));
|
}));
|
||||||
@@ -3,6 +3,13 @@ export const AiSettingsUpdateResultSchema = z.nullable(z.object({
|
|||||||
id: z.number().int(),
|
id: z.number().int(),
|
||||||
userId: z.number().int(),
|
userId: z.number().int(),
|
||||||
apiKey: z.string(),
|
apiKey: z.string(),
|
||||||
|
aiEnabled: z.boolean(),
|
||||||
|
openAiKey: z.string(),
|
||||||
|
openAiEnabled: z.boolean(),
|
||||||
|
claudeAiKey: z.string(),
|
||||||
|
claudeAiEnabled: z.boolean(),
|
||||||
|
dentalMgmtKey: z.string(),
|
||||||
|
dentalMgmtEnabled: z.boolean(),
|
||||||
afterHoursEnabled: z.boolean(),
|
afterHoursEnabled: z.boolean(),
|
||||||
openPhoneReply: z.boolean(),
|
openPhoneReply: z.boolean(),
|
||||||
user: z.unknown()
|
user: z.unknown()
|
||||||
|
|||||||
@@ -3,6 +3,13 @@ export const AiSettingsUpsertResultSchema = z.object({
|
|||||||
id: z.number().int(),
|
id: z.number().int(),
|
||||||
userId: z.number().int(),
|
userId: z.number().int(),
|
||||||
apiKey: z.string(),
|
apiKey: z.string(),
|
||||||
|
aiEnabled: z.boolean(),
|
||||||
|
openAiKey: z.string(),
|
||||||
|
openAiEnabled: z.boolean(),
|
||||||
|
claudeAiKey: z.string(),
|
||||||
|
claudeAiEnabled: z.boolean(),
|
||||||
|
dentalMgmtKey: z.string(),
|
||||||
|
dentalMgmtEnabled: z.boolean(),
|
||||||
afterHoursEnabled: z.boolean(),
|
afterHoursEnabled: z.boolean(),
|
||||||
openPhoneReply: z.boolean(),
|
openPhoneReply: z.boolean(),
|
||||||
user: z.unknown()
|
user: z.unknown()
|
||||||
|
|||||||
@@ -4,6 +4,13 @@ export const AiSettingsInputSchema = z.object({
|
|||||||
id: z.number().int(),
|
id: z.number().int(),
|
||||||
userId: z.number().int(),
|
userId: z.number().int(),
|
||||||
apiKey: z.string(),
|
apiKey: z.string(),
|
||||||
|
aiEnabled: z.boolean(),
|
||||||
|
openAiKey: z.string(),
|
||||||
|
openAiEnabled: z.boolean(),
|
||||||
|
claudeAiKey: z.string(),
|
||||||
|
claudeAiEnabled: z.boolean(),
|
||||||
|
dentalMgmtKey: z.string(),
|
||||||
|
dentalMgmtEnabled: z.boolean(),
|
||||||
afterHoursEnabled: z.boolean(),
|
afterHoursEnabled: z.boolean(),
|
||||||
openPhoneReply: z.boolean(),
|
openPhoneReply: z.boolean(),
|
||||||
user: z.unknown()
|
user: z.unknown()
|
||||||
|
|||||||
@@ -4,6 +4,13 @@ export const AiSettingsModelSchema = z.object({
|
|||||||
id: z.number().int(),
|
id: z.number().int(),
|
||||||
userId: z.number().int(),
|
userId: z.number().int(),
|
||||||
apiKey: z.string(),
|
apiKey: z.string(),
|
||||||
|
aiEnabled: z.boolean(),
|
||||||
|
openAiKey: z.string(),
|
||||||
|
openAiEnabled: z.boolean(),
|
||||||
|
claudeAiKey: z.string(),
|
||||||
|
claudeAiEnabled: z.boolean(),
|
||||||
|
dentalMgmtKey: z.string(),
|
||||||
|
dentalMgmtEnabled: z.boolean(),
|
||||||
afterHoursEnabled: z.boolean(),
|
afterHoursEnabled: z.boolean(),
|
||||||
openPhoneReply: z.boolean(),
|
openPhoneReply: z.boolean(),
|
||||||
user: z.unknown()
|
user: z.unknown()
|
||||||
|
|||||||
@@ -4,6 +4,13 @@ export const AiSettingsResultSchema = z.object({
|
|||||||
id: z.number().int(),
|
id: z.number().int(),
|
||||||
userId: z.number().int(),
|
userId: z.number().int(),
|
||||||
apiKey: z.string(),
|
apiKey: z.string(),
|
||||||
|
aiEnabled: z.boolean(),
|
||||||
|
openAiKey: z.string(),
|
||||||
|
openAiEnabled: z.boolean(),
|
||||||
|
claudeAiKey: z.string(),
|
||||||
|
claudeAiEnabled: z.boolean(),
|
||||||
|
dentalMgmtKey: z.string(),
|
||||||
|
dentalMgmtEnabled: z.boolean(),
|
||||||
afterHoursEnabled: z.boolean(),
|
afterHoursEnabled: z.boolean(),
|
||||||
openPhoneReply: z.boolean(),
|
openPhoneReply: z.boolean(),
|
||||||
user: z.unknown()
|
user: z.unknown()
|
||||||
|
|||||||
Reference in New Issue
Block a user