feat: office address, multi-template SMS manager, hardcoded defaults with auto-seed
- Add streetAddress/city/state/zipCode fields to OfficeContact (schema + storage + UI)
- Support {officeAddress} variable in batch reminder SMS
- Replace single SMS template field with full CRUD template list (add/rename/edit/delete)
- Store SMS template list under _sms_template_list; first template synced to batch reminder
- Hardcode all AI chat template defaults into codebase (reminder SMS, greetings, fallback)
- Add seed-templates.ts that auto-seeds default templates for all users on server boot
- Update README: note that templates are auto-configured on first boot
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -159,6 +159,8 @@ Open two terminals:
|
||||
npm run dev
|
||||
```
|
||||
|
||||
> On first boot the server automatically seeds all AI chat templates, SMS templates, and greeting messages for every user — no manual configuration needed.
|
||||
|
||||
**Terminal 2** — Selenium service:
|
||||
```sh
|
||||
cd apps/SeleniumService
|
||||
|
||||
@@ -4,6 +4,7 @@ import http from "http";
|
||||
import { initSocket } from "./socket";
|
||||
import { startSeleniumWorker } from "./queue/workers/seleniumWorker";
|
||||
import { startOcrWorker } from "./queue/workers/ocrWorker";
|
||||
import { seedAllUsersTemplates } from "./storage/seed-templates";
|
||||
|
||||
dotenv.config();
|
||||
|
||||
@@ -29,6 +30,9 @@ server.listen(PORT, HOST, () => {
|
||||
console.log(
|
||||
`✅ Server running in ${NODE_ENV} mode at http://${HOST}:${PORT}`
|
||||
);
|
||||
seedAllUsersTemplates().catch((err) =>
|
||||
console.error("⚠️ Template seed failed:", err)
|
||||
);
|
||||
});
|
||||
|
||||
// Handle startup errors
|
||||
|
||||
@@ -22,7 +22,7 @@ router.put("/", async (req: Request, res: Response): Promise<any> => {
|
||||
const userId = req.user?.id;
|
||||
if (!userId) return res.status(401).json({ message: "Unauthorized" });
|
||||
|
||||
const { officeName, receptionistName, dentistName, phoneNumber, email, fax } = req.body;
|
||||
const { officeName, receptionistName, dentistName, phoneNumber, email, fax, streetAddress, city, state, zipCode } = req.body;
|
||||
const record = await storage.upsertOfficeContact(userId, {
|
||||
officeName: officeName ?? undefined,
|
||||
receptionistName: receptionistName ?? undefined,
|
||||
@@ -30,6 +30,10 @@ router.put("/", async (req: Request, res: Response): Promise<any> => {
|
||||
phoneNumber: phoneNumber ?? undefined,
|
||||
email: email ?? undefined,
|
||||
fax: fax ?? undefined,
|
||||
streetAddress: streetAddress ?? undefined,
|
||||
city: city ?? undefined,
|
||||
state: state ?? undefined,
|
||||
zipCode: zipCode ?? undefined,
|
||||
});
|
||||
return res.status(200).json(record);
|
||||
} catch (err) {
|
||||
|
||||
@@ -132,13 +132,19 @@ router.post("/send-reminders-batch", async (req: Request, res: Response): Promis
|
||||
return res.status(400).json({ message: "Twilio is not configured. Please add your Twilio credentials in Settings." });
|
||||
}
|
||||
|
||||
// Resolve office name and reminder SMS template
|
||||
// Resolve office name, address, and reminder SMS template
|
||||
const officeContact = await storage.getOfficeContact(userId);
|
||||
const officeName = (officeContact as any)?.officeName?.trim() || "";
|
||||
const officeAddress = [
|
||||
(officeContact as any)?.streetAddress?.trim(),
|
||||
(officeContact as any)?.city?.trim(),
|
||||
(officeContact as any)?.state?.trim(),
|
||||
(officeContact as any)?.zipCode?.trim(),
|
||||
].filter(Boolean).join(", ");
|
||||
const chatTemplates = await storage.getAiChatTemplates(userId);
|
||||
|
||||
const DEFAULT_REMINDER_SMS =
|
||||
"Hi {firstName}, this is a reminder from {officeName}. You have an appointment on {appointmentDate} at {appointmentTime}. Please reply YES to confirm or NO to reschedule. Thank you!";
|
||||
"Hi {firstName}, this is a reminder from {officeName}. You have an appointment on {appointmentDate} at {appointmentTime}. Please come to our office at {officeAddress}. Please reply YES to confirm or NO to reschedule. Thank you!";
|
||||
const templateBody = chatTemplates.reminderSms?.trim() || DEFAULT_REMINDER_SMS;
|
||||
|
||||
// Fetch appointments for the selected staff columns on the given date
|
||||
@@ -187,6 +193,7 @@ router.post("/send-reminders-batch", async (req: Request, res: Response): Promis
|
||||
const message = templateBody
|
||||
.replace(/\{firstName\}/g, patient.firstName ?? "")
|
||||
.replace(/\{officeName\}/g, officeName)
|
||||
.replace(/\{officeAddress\}/g, officeAddress)
|
||||
.replace(/\{appointmentDate\}/g, apptDate)
|
||||
.replace(/\{appointmentTime\}/g, apptTime)
|
||||
.replace(/\{date\}/g, apptDate)
|
||||
@@ -222,6 +229,32 @@ router.post("/send-reminders-batch", async (req: Request, res: Response): Promis
|
||||
}
|
||||
});
|
||||
|
||||
// GET /api/twilio/sms-template-list
|
||||
router.get("/sms-template-list", async (req: Request, res: Response): Promise<any> => {
|
||||
try {
|
||||
const userId = req.user?.id;
|
||||
if (!userId) return res.status(401).json({ message: "Unauthorized" });
|
||||
const list = await storage.getSmsTemplateList(userId);
|
||||
return res.status(200).json(list);
|
||||
} catch (err) {
|
||||
return res.status(500).json({ error: "Failed to fetch SMS templates", details: String(err) });
|
||||
}
|
||||
});
|
||||
|
||||
// PUT /api/twilio/sms-template-list
|
||||
router.put("/sms-template-list", async (req: Request, res: Response): Promise<any> => {
|
||||
try {
|
||||
const userId = req.user?.id;
|
||||
if (!userId) return res.status(401).json({ message: "Unauthorized" });
|
||||
const templates = req.body;
|
||||
if (!Array.isArray(templates)) return res.status(400).json({ message: "Expected an array of templates" });
|
||||
await storage.saveSmsTemplateList(userId, templates);
|
||||
return res.status(200).json({ ok: true });
|
||||
} catch (err) {
|
||||
return res.status(500).json({ error: "Failed to save SMS templates", details: String(err) });
|
||||
}
|
||||
});
|
||||
|
||||
// GET /api/twilio/templates
|
||||
router.get("/templates", async (req: Request, res: Response): Promise<any> => {
|
||||
try {
|
||||
|
||||
@@ -12,6 +12,10 @@ export const officeContactStorage = {
|
||||
phoneNumber?: string;
|
||||
email?: string;
|
||||
fax?: string;
|
||||
streetAddress?: string;
|
||||
city?: string;
|
||||
state?: string;
|
||||
zipCode?: string;
|
||||
}) {
|
||||
return db.officeContact.upsert({
|
||||
where: { userId },
|
||||
|
||||
65
apps/Backend/src/storage/seed-templates.ts
Normal file
65
apps/Backend/src/storage/seed-templates.ts
Normal file
@@ -0,0 +1,65 @@
|
||||
import { prisma as db } from "@repo/db/client";
|
||||
|
||||
// ── Default template values ───────────────────────────────────────────────────
|
||||
// Keep these in sync with the frontend constants in ai-chat-settings-card.tsx
|
||||
|
||||
export const DEFAULT_REMINDER_SMS =
|
||||
"Hi {firstName}, this is a reminder from {officeName}. You have an appointment on {appointmentDate} at {appointmentTime}. Please come to our office at {officeAddress}. Please reply YES to confirm or NO to reschedule. Thank you!";
|
||||
|
||||
export const DEFAULT_AI_CHAT_TEMPLATES = {
|
||||
_ai_chat_reminder_sms: DEFAULT_REMINDER_SMS,
|
||||
_ai_chat_reminder_greeting: "Hi! My name is Lisa, the dedicated AI assistant at {officeName}. I can confirm or reschedule your appointment and answer general questions 24/7. I will reply you message at any time you need.",
|
||||
_ai_chat_new_patient_greeting: "Hi! My name is Lisa, the dedicated AI assistant at {officeName}. I can help you schedule an appointment, check your insurance, and answer general questions 24/7. How can I help you today?",
|
||||
_ai_chat_general_fallback: "Hi! My name is Lisa, the dedicated AI assistant at {officeName}. How can I help you today?",
|
||||
_ai_chat_reschedule_greeting: "Hi! My name is Lisa, the dedicated AI assistant at {officeName}. I can help you find a new appointment time that works for you. Would you like to reschedule your appointment?",
|
||||
};
|
||||
|
||||
export const DEFAULT_SMS_TEMPLATE_LIST = JSON.stringify([
|
||||
{
|
||||
id: "default-appt-reminder",
|
||||
name: "Appointment Reminder SMS",
|
||||
body: DEFAULT_REMINDER_SMS,
|
||||
},
|
||||
{
|
||||
id: "default-follow-up",
|
||||
name: "Follow up reminder",
|
||||
body: "Hi {firstName}, this is a follow-up from {officeName}. We wanted to check in with you after your recent appointment. Please don't hesitate to call us if you have any questions.",
|
||||
},
|
||||
]);
|
||||
|
||||
// ── Auto-seed for a single user ───────────────────────────────────────────────
|
||||
// Writes defaults only for keys that are not yet set, so existing data is never
|
||||
// overwritten. Safe to call on every boot.
|
||||
|
||||
export async function seedTemplatesForUser(userId: number): Promise<void> {
|
||||
const settings = await db.twilioSettings.findUnique({ where: { userId } });
|
||||
const existing = (settings?.templates as Record<string, string>) || {};
|
||||
|
||||
const patch: Record<string, string> = {};
|
||||
|
||||
for (const [key, value] of Object.entries(DEFAULT_AI_CHAT_TEMPLATES)) {
|
||||
if (!existing[key]) patch[key] = value;
|
||||
}
|
||||
if (!existing["_sms_template_list"]) {
|
||||
patch["_sms_template_list"] = DEFAULT_SMS_TEMPLATE_LIST;
|
||||
}
|
||||
|
||||
if (Object.keys(patch).length === 0) return; // nothing to seed
|
||||
|
||||
const updated = { ...existing, ...patch };
|
||||
await db.twilioSettings.upsert({
|
||||
where: { userId },
|
||||
update: { templates: updated },
|
||||
create: { userId, accountSid: "", authToken: "", phoneNumber: "", templates: updated },
|
||||
});
|
||||
}
|
||||
|
||||
// ── Seed all existing users ───────────────────────────────────────────────────
|
||||
|
||||
export async function seedAllUsersTemplates(): Promise<void> {
|
||||
const users = await db.user.findMany({ select: { id: true } });
|
||||
await Promise.all(users.map((u: { id: number }) => seedTemplatesForUser(u.id)));
|
||||
if (users.length > 0) {
|
||||
console.log(`✅ Seeded AI chat templates for ${users.length} user(s)`);
|
||||
}
|
||||
}
|
||||
@@ -87,6 +87,30 @@ export const twilioStorage = {
|
||||
});
|
||||
},
|
||||
|
||||
async getSmsTemplateList(userId: number): Promise<{ id: string; name: string; body: string }[]> {
|
||||
const settings = await db.twilioSettings.findUnique({ where: { userId } });
|
||||
const all = (settings?.templates as Record<string, string>) || {};
|
||||
const raw = all["_sms_template_list"];
|
||||
if (!raw) return [];
|
||||
try { return JSON.parse(raw); } catch { return []; }
|
||||
},
|
||||
|
||||
async saveSmsTemplateList(userId: number, templates: { id: string; name: string; body: string }[]) {
|
||||
const settings = await db.twilioSettings.findUnique({ where: { userId } });
|
||||
const existing = (settings?.templates as Record<string, string>) || {};
|
||||
const updated: Record<string, string> = {
|
||||
...existing,
|
||||
"_sms_template_list": JSON.stringify(templates),
|
||||
};
|
||||
// Keep _ai_chat_reminder_sms in sync with the first template for batch sends
|
||||
if (templates.length > 0) updated["_ai_chat_reminder_sms"] = templates[0]!.body;
|
||||
return db.twilioSettings.upsert({
|
||||
where: { userId },
|
||||
update: { templates: updated },
|
||||
create: { userId, accountSid: "", authToken: "", phoneNumber: "", templates: updated },
|
||||
});
|
||||
},
|
||||
|
||||
async getRecentCommunicationsByUser(userId: number, limit = 20) {
|
||||
return db.communication.findMany({
|
||||
where: { patient: { userId } },
|
||||
|
||||
@@ -5,11 +5,13 @@ import { Button } from "@/components/ui/button";
|
||||
import { Textarea } from "@/components/ui/textarea";
|
||||
import { useToast } from "@/hooks/use-toast";
|
||||
import { apiRequest, queryClient } from "@/lib/queryClient";
|
||||
import { Bot, CalendarCheck, UserPlus, MessageCircle, Info, GitFork } from "lucide-react";
|
||||
import { Bot, CalendarCheck, UserPlus, MessageCircle, Info, GitFork, MessageSquare, Trash2, Plus } from "lucide-react";
|
||||
import { Tabs, TabsList, TabsTrigger, TabsContent } from "@/components/ui/tabs";
|
||||
|
||||
// ─── Types ────────────────────────────────────────────────────────────────────
|
||||
|
||||
type SmsTemplate = { id: string; name: string; body: string };
|
||||
|
||||
type AiChatTemplates = {
|
||||
reminderGreeting: string;
|
||||
newPatientGreeting: string;
|
||||
@@ -22,18 +24,39 @@ type OfficeContact = {
|
||||
|
||||
// ─── Defaults ─────────────────────────────────────────────────────────────────
|
||||
|
||||
const DEFAULT_REMINDER_SMS =
|
||||
"Hi {firstName}, this is a reminder from {officeName}. You have an appointment on {appointmentDate} at {appointmentTime}. Please come to our office at {officeAddress}. Please reply YES to confirm or NO to reschedule. Thank you!";
|
||||
|
||||
const DEFAULTS = {
|
||||
reminderGreeting:
|
||||
"Hi! My name is Lisa, the dedicated AI assistant at {officeName}. I can confirm or reschedule your appointment and answer general questions 24/7. I will reply your message at any time you need.",
|
||||
"Hi! My name is Lisa, the dedicated AI assistant at {officeName}. I can confirm or reschedule your appointment and answer general questions 24/7. I will reply you message at any time you need.",
|
||||
newPatientGreeting:
|
||||
"Hi! My name is Lisa, the dedicated AI assistant at {officeName}. I can help you schedule an appointment, check your insurance, and answer general questions 24/7. How can I help you today?",
|
||||
generalFallback: "How can I help you today?",
|
||||
generalFallback:
|
||||
"Hi! My name is Lisa, the dedicated AI assistant at {officeName}. How can I help you today?",
|
||||
};
|
||||
|
||||
const DEFAULT_SMS_TEMPLATES = [
|
||||
{
|
||||
id: "default-appt-reminder",
|
||||
name: "Appointment Reminder SMS",
|
||||
body: DEFAULT_REMINDER_SMS,
|
||||
},
|
||||
{
|
||||
id: "default-follow-up",
|
||||
name: "Follow up reminder",
|
||||
body: "Hi {firstName}, this is a follow-up from {officeName}. We wanted to check in with you after your recent appointment. Please don't hesitate to call us if you have any questions.",
|
||||
},
|
||||
];
|
||||
|
||||
function previewTemplate(text: string, officeName: string) {
|
||||
return text.replace(/\{officeName\}/g, officeName || "your dental office");
|
||||
}
|
||||
|
||||
function newId() {
|
||||
return Date.now().toString(36) + Math.random().toString(36).slice(2);
|
||||
}
|
||||
|
||||
// ─── LangGraph flow diagram (SVG) ─────────────────────────────────────────────
|
||||
|
||||
function LangGraphFlow() {
|
||||
@@ -503,6 +526,10 @@ export function AiChatSettingsCard() {
|
||||
const [generalFallback, setGeneralFallback] = useState(DEFAULTS.generalFallback);
|
||||
const initialized = useRef(false);
|
||||
|
||||
// ── SMS template list ──────────────────────────────────────────
|
||||
const [smsTemplates, setSmsTemplates] = useState<SmsTemplate[]>([]);
|
||||
const smsInitialized = useRef(false);
|
||||
|
||||
const { data: officeContact } = useQuery<OfficeContact | null>({
|
||||
queryKey: ["/api/office-contact"],
|
||||
queryFn: async () => {
|
||||
@@ -524,7 +551,18 @@ export function AiChatSettingsCard() {
|
||||
refetchOnWindowFocus: false,
|
||||
});
|
||||
|
||||
// Seed local state from server on first load only
|
||||
const { data: smsTemplateListData, isLoading: smsLoading } = useQuery<SmsTemplate[]>({
|
||||
queryKey: ["/api/twilio/sms-template-list"],
|
||||
queryFn: async () => {
|
||||
const res = await apiRequest("GET", "/api/twilio/sms-template-list");
|
||||
if (!res.ok) return [];
|
||||
return res.json();
|
||||
},
|
||||
staleTime: Infinity,
|
||||
refetchOnWindowFocus: false,
|
||||
});
|
||||
|
||||
// Seed AI chat templates
|
||||
useEffect(() => {
|
||||
if (templates && !initialized.current) {
|
||||
initialized.current = true;
|
||||
@@ -534,6 +572,18 @@ export function AiChatSettingsCard() {
|
||||
}
|
||||
}, [templates]);
|
||||
|
||||
// Seed SMS template list — fall back to the saved reminderSms if list is empty
|
||||
useEffect(() => {
|
||||
if (smsTemplateListData && !smsInitialized.current) {
|
||||
smsInitialized.current = true;
|
||||
if (smsTemplateListData.length > 0) {
|
||||
setSmsTemplates(smsTemplateListData);
|
||||
} else {
|
||||
setSmsTemplates(DEFAULT_SMS_TEMPLATES);
|
||||
}
|
||||
}
|
||||
}, [smsTemplateListData, templates]);
|
||||
|
||||
const saveMutation = useMutation({
|
||||
mutationFn: async (data: AiChatTemplates) => {
|
||||
const res = await apiRequest("PUT", "/api/ai/chat-templates", data);
|
||||
@@ -552,6 +602,24 @@ export function AiChatSettingsCard() {
|
||||
},
|
||||
});
|
||||
|
||||
const saveSmsListMutation = useMutation({
|
||||
mutationFn: async (list: SmsTemplate[]) => {
|
||||
const res = await apiRequest("PUT", "/api/twilio/sms-template-list", list);
|
||||
if (!res.ok) {
|
||||
const err = await res.json().catch(() => null);
|
||||
throw new Error(err?.message || "Failed to save SMS templates");
|
||||
}
|
||||
return res.json();
|
||||
},
|
||||
onSuccess: () => {
|
||||
queryClient.invalidateQueries({ queryKey: ["/api/twilio/sms-template-list"] });
|
||||
toast({ title: "SMS template saved" });
|
||||
},
|
||||
onError: (err: any) => {
|
||||
toast({ title: "Error", description: err?.message, variant: "destructive" });
|
||||
},
|
||||
});
|
||||
|
||||
const handleSubmit = (e: React.FormEvent) => {
|
||||
e.preventDefault();
|
||||
saveMutation.mutate({
|
||||
@@ -561,6 +629,20 @@ export function AiChatSettingsCard() {
|
||||
});
|
||||
};
|
||||
|
||||
const updateSmsTemplate = (idx: number, field: "name" | "body", value: string) => {
|
||||
setSmsTemplates((prev) => prev.map((t, i) => i === idx ? { ...t, [field]: value } : t));
|
||||
};
|
||||
|
||||
const deleteSmsTemplate = (idx: number) => {
|
||||
const updated = smsTemplates.filter((_, i) => i !== idx);
|
||||
setSmsTemplates(updated);
|
||||
saveSmsListMutation.mutate(updated);
|
||||
};
|
||||
|
||||
const addSmsTemplate = () => {
|
||||
setSmsTemplates((prev) => [...prev, { id: newId(), name: "", body: "" }]);
|
||||
};
|
||||
|
||||
const officeName = officeContact?.officeName?.trim() || "";
|
||||
|
||||
const templateFields = [
|
||||
@@ -596,6 +678,113 @@ export function AiChatSettingsCard() {
|
||||
return (
|
||||
<div className="space-y-6">
|
||||
|
||||
{/* ── Section 0: SMS Templates ─────────────────────────────── */}
|
||||
<Card>
|
||||
<CardContent className="py-6 space-y-5">
|
||||
<div className="flex items-center justify-between">
|
||||
<div className="flex items-center gap-2">
|
||||
<MessageSquare className="h-5 w-5 text-primary" />
|
||||
<h3 className="text-lg font-semibold">SMS Templates</h3>
|
||||
</div>
|
||||
<Button
|
||||
type="button"
|
||||
size="sm"
|
||||
variant="outline"
|
||||
className="gap-1.5 text-xs"
|
||||
onClick={addSmsTemplate}
|
||||
>
|
||||
<Plus className="h-3.5 w-3.5" />
|
||||
Add Template
|
||||
</Button>
|
||||
</div>
|
||||
|
||||
<p className="text-sm text-muted-foreground">
|
||||
Available variables:{" "}
|
||||
<code className="bg-muted px-1 py-0.5 rounded text-xs font-mono">{"{firstName}"}</code>{" "}
|
||||
<code className="bg-muted px-1 py-0.5 rounded text-xs font-mono">{"{officeName}"}</code>{" "}
|
||||
<code className="bg-muted px-1 py-0.5 rounded text-xs font-mono">{"{officeAddress}"}</code>{" "}
|
||||
<code className="bg-muted px-1 py-0.5 rounded text-xs font-mono">{"{appointmentDate}"}</code>{" "}
|
||||
<code className="bg-muted px-1 py-0.5 rounded text-xs font-mono">{"{appointmentTime}"}</code>
|
||||
</p>
|
||||
|
||||
{officeName && (
|
||||
<div className="flex items-center gap-2 text-xs text-muted-foreground bg-muted/50 rounded px-3 py-2">
|
||||
<Info className="h-3.5 w-3.5 flex-shrink-0" />
|
||||
<span>
|
||||
<span className="font-medium">{"{officeName}"}</span> will display as{" "}
|
||||
<span className="font-medium text-foreground">"{officeName}"</span>
|
||||
</span>
|
||||
</div>
|
||||
)}
|
||||
|
||||
{smsLoading ? (
|
||||
<p className="text-sm text-muted-foreground">Loading...</p>
|
||||
) : smsTemplates.length === 0 ? (
|
||||
<p className="text-sm text-muted-foreground italic">
|
||||
No templates yet. Click "Add Template" to create one.
|
||||
</p>
|
||||
) : (
|
||||
<div className="space-y-4">
|
||||
{smsTemplates.map((tpl, idx) => (
|
||||
<div key={tpl.id} className="border rounded-lg p-4 space-y-3">
|
||||
{/* Name row */}
|
||||
<div className="flex items-center gap-2">
|
||||
{idx === 0 && (
|
||||
<span className="text-xs bg-teal-100 text-teal-700 font-medium px-2 py-0.5 rounded-full whitespace-nowrap">
|
||||
Batch reminder
|
||||
</span>
|
||||
)}
|
||||
<input
|
||||
type="text"
|
||||
value={tpl.name}
|
||||
onChange={(e) => updateSmsTemplate(idx, "name", e.target.value)}
|
||||
className="flex-1 p-2 border rounded text-sm font-medium min-w-0"
|
||||
placeholder="Template name"
|
||||
/>
|
||||
<Button
|
||||
type="button"
|
||||
variant="ghost"
|
||||
size="sm"
|
||||
className="text-red-500 hover:text-red-700 hover:bg-red-50 flex-shrink-0"
|
||||
onClick={() => deleteSmsTemplate(idx)}
|
||||
>
|
||||
<Trash2 className="h-4 w-4" />
|
||||
</Button>
|
||||
</div>
|
||||
|
||||
{/* Body */}
|
||||
<Textarea
|
||||
value={tpl.body}
|
||||
onChange={(e) => updateSmsTemplate(idx, "body", e.target.value)}
|
||||
rows={3}
|
||||
className="text-sm resize-none"
|
||||
placeholder="Template content…"
|
||||
/>
|
||||
|
||||
{/* Live preview */}
|
||||
{officeName && tpl.body.includes("{officeName}") && (
|
||||
<p className="text-xs text-muted-foreground italic pl-1">
|
||||
Preview: {previewTemplate(tpl.body, officeName)}
|
||||
</p>
|
||||
)}
|
||||
|
||||
{/* Save button */}
|
||||
<Button
|
||||
type="button"
|
||||
size="sm"
|
||||
disabled={saveSmsListMutation.isPending}
|
||||
className="bg-teal-600 hover:bg-teal-700 text-white"
|
||||
onClick={() => saveSmsListMutation.mutate(smsTemplates)}
|
||||
>
|
||||
{saveSmsListMutation.isPending ? "Saving…" : "Save"}
|
||||
</Button>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
)}
|
||||
</CardContent>
|
||||
</Card>
|
||||
|
||||
{/* ── Section 1: Chat Templates ────────────────────────────── */}
|
||||
<Card>
|
||||
<CardContent className="py-6 space-y-5">
|
||||
|
||||
@@ -21,13 +21,13 @@ type OfficeContact = {
|
||||
|
||||
const DEFAULTS = {
|
||||
reminderSms:
|
||||
"Hi {firstName}, this is a reminder from {officeName}. You have an appointment on {appointmentDate} at {appointmentTime}. Please reply YES to confirm or NO to reschedule. Thank you!",
|
||||
"Hi {firstName}, this is a reminder from {officeName}. You have an appointment on {appointmentDate} at {appointmentTime}. Please come to our office at {officeAddress}. Please reply YES to confirm or NO to reschedule. Thank you!",
|
||||
reminderGreeting:
|
||||
"Hi! My name is Lisa, the dedicated AI assistant at {officeName}. I can confirm or reschedule your appointment and answer general questions 24/7. How can I help you today?",
|
||||
"Hi! My name is Lisa, the dedicated AI assistant at {officeName}. I can confirm or reschedule your appointment and answer general questions 24/7. I will reply you message at any time you need.",
|
||||
newPatientGreeting:
|
||||
"Hi! My name is Lisa, the dedicated AI assistant at {officeName}. I can help you schedule an appointment, check your insurance, and answer general questions 24/7. How can I help you today?",
|
||||
generalFallback:
|
||||
"How can I help you today?",
|
||||
"Hi! My name is Lisa, the dedicated AI assistant at {officeName}. How can I help you today?",
|
||||
rescheduleGreeting:
|
||||
"Hi! My name is Lisa, the dedicated AI assistant at {officeName}. I can help you find a new appointment time that works for you. Would you like to reschedule your appointment?",
|
||||
};
|
||||
|
||||
@@ -12,6 +12,10 @@ type OfficeContact = {
|
||||
phoneNumber?: string | null;
|
||||
email?: string | null;
|
||||
fax?: string | null;
|
||||
streetAddress?: string | null;
|
||||
city?: string | null;
|
||||
state?: string | null;
|
||||
zipCode?: string | null;
|
||||
};
|
||||
|
||||
export function OfficeContactCard() {
|
||||
@@ -23,6 +27,10 @@ export function OfficeContactCard() {
|
||||
const [phoneNumber, setPhoneNumber] = useState("");
|
||||
const [email, setEmail] = useState("");
|
||||
const [fax, setFax] = useState("");
|
||||
const [streetAddress, setStreetAddress] = useState("");
|
||||
const [city, setCity] = useState("");
|
||||
const [state, setState] = useState("");
|
||||
const [zipCode, setZipCode] = useState("");
|
||||
|
||||
const { data: contact, isLoading } = useQuery<OfficeContact | null>({
|
||||
queryKey: ["/api/office-contact"],
|
||||
@@ -41,6 +49,10 @@ export function OfficeContactCard() {
|
||||
setPhoneNumber(contact.phoneNumber ?? "");
|
||||
setEmail(contact.email ?? "");
|
||||
setFax(contact.fax ?? "");
|
||||
setStreetAddress(contact.streetAddress ?? "");
|
||||
setCity(contact.city ?? "");
|
||||
setState(contact.state ?? "");
|
||||
setZipCode(contact.zipCode ?? "");
|
||||
}
|
||||
}, [contact]);
|
||||
|
||||
@@ -64,7 +76,7 @@ export function OfficeContactCard() {
|
||||
|
||||
const handleSubmit = (e: React.FormEvent) => {
|
||||
e.preventDefault();
|
||||
saveMutation.mutate({ officeName, receptionistName, dentistName, phoneNumber, email, fax });
|
||||
saveMutation.mutate({ officeName, receptionistName, dentistName, phoneNumber, email, fax, streetAddress, city, state, zipCode });
|
||||
};
|
||||
|
||||
return (
|
||||
@@ -149,6 +161,54 @@ export function OfficeContactCard() {
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="pt-2">
|
||||
<h4 className="text-sm font-semibold text-gray-700 mb-3">Office Address</h4>
|
||||
<div className="space-y-3">
|
||||
<div>
|
||||
<label className="block text-sm font-medium">Street Address</label>
|
||||
<input
|
||||
type="text"
|
||||
value={streetAddress}
|
||||
onChange={(e) => setStreetAddress(e.target.value)}
|
||||
className="mt-1 p-2 border rounded w-full text-sm"
|
||||
placeholder="e.g. 123 Main Street"
|
||||
/>
|
||||
</div>
|
||||
<div className="grid grid-cols-1 gap-3 sm:grid-cols-3">
|
||||
<div>
|
||||
<label className="block text-sm font-medium">City</label>
|
||||
<input
|
||||
type="text"
|
||||
value={city}
|
||||
onChange={(e) => setCity(e.target.value)}
|
||||
className="mt-1 p-2 border rounded w-full text-sm"
|
||||
placeholder="e.g. Framingham"
|
||||
/>
|
||||
</div>
|
||||
<div>
|
||||
<label className="block text-sm font-medium">State</label>
|
||||
<input
|
||||
type="text"
|
||||
value={state}
|
||||
onChange={(e) => setState(e.target.value)}
|
||||
className="mt-1 p-2 border rounded w-full text-sm"
|
||||
placeholder="e.g. MA"
|
||||
/>
|
||||
</div>
|
||||
<div>
|
||||
<label className="block text-sm font-medium">ZIP Code</label>
|
||||
<input
|
||||
type="text"
|
||||
value={zipCode}
|
||||
onChange={(e) => setZipCode(e.target.value)}
|
||||
className="mt-1 p-2 border rounded w-full text-sm"
|
||||
placeholder="e.g. 01701"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="pt-1">
|
||||
<button
|
||||
type="submit"
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -440,7 +440,11 @@ exports.Prisma.OfficeContactScalarFieldEnum = {
|
||||
dentistName: 'dentistName',
|
||||
phoneNumber: 'phoneNumber',
|
||||
email: 'email',
|
||||
fax: 'fax'
|
||||
fax: 'fax',
|
||||
streetAddress: 'streetAddress',
|
||||
city: 'city',
|
||||
state: 'state',
|
||||
zipCode: 'zipCode'
|
||||
};
|
||||
|
||||
exports.Prisma.InsuranceContactScalarFieldEnum = {
|
||||
|
||||
136
packages/db/generated/prisma/index.d.ts
vendored
136
packages/db/generated/prisma/index.d.ts
vendored
@@ -36884,6 +36884,10 @@ export namespace Prisma {
|
||||
phoneNumber: string | null
|
||||
email: string | null
|
||||
fax: string | null
|
||||
streetAddress: string | null
|
||||
city: string | null
|
||||
state: string | null
|
||||
zipCode: string | null
|
||||
}
|
||||
|
||||
export type OfficeContactMaxAggregateOutputType = {
|
||||
@@ -36895,6 +36899,10 @@ export namespace Prisma {
|
||||
phoneNumber: string | null
|
||||
email: string | null
|
||||
fax: string | null
|
||||
streetAddress: string | null
|
||||
city: string | null
|
||||
state: string | null
|
||||
zipCode: string | null
|
||||
}
|
||||
|
||||
export type OfficeContactCountAggregateOutputType = {
|
||||
@@ -36906,6 +36914,10 @@ export namespace Prisma {
|
||||
phoneNumber: number
|
||||
email: number
|
||||
fax: number
|
||||
streetAddress: number
|
||||
city: number
|
||||
state: number
|
||||
zipCode: number
|
||||
_all: number
|
||||
}
|
||||
|
||||
@@ -36929,6 +36941,10 @@ export namespace Prisma {
|
||||
phoneNumber?: true
|
||||
email?: true
|
||||
fax?: true
|
||||
streetAddress?: true
|
||||
city?: true
|
||||
state?: true
|
||||
zipCode?: true
|
||||
}
|
||||
|
||||
export type OfficeContactMaxAggregateInputType = {
|
||||
@@ -36940,6 +36956,10 @@ export namespace Prisma {
|
||||
phoneNumber?: true
|
||||
email?: true
|
||||
fax?: true
|
||||
streetAddress?: true
|
||||
city?: true
|
||||
state?: true
|
||||
zipCode?: true
|
||||
}
|
||||
|
||||
export type OfficeContactCountAggregateInputType = {
|
||||
@@ -36951,6 +36971,10 @@ export namespace Prisma {
|
||||
phoneNumber?: true
|
||||
email?: true
|
||||
fax?: true
|
||||
streetAddress?: true
|
||||
city?: true
|
||||
state?: true
|
||||
zipCode?: true
|
||||
_all?: true
|
||||
}
|
||||
|
||||
@@ -37049,6 +37073,10 @@ export namespace Prisma {
|
||||
phoneNumber: string | null
|
||||
email: string | null
|
||||
fax: string | null
|
||||
streetAddress: string | null
|
||||
city: string | null
|
||||
state: string | null
|
||||
zipCode: string | null
|
||||
_count: OfficeContactCountAggregateOutputType | null
|
||||
_avg: OfficeContactAvgAggregateOutputType | null
|
||||
_sum: OfficeContactSumAggregateOutputType | null
|
||||
@@ -37079,6 +37107,10 @@ export namespace Prisma {
|
||||
phoneNumber?: boolean
|
||||
email?: boolean
|
||||
fax?: boolean
|
||||
streetAddress?: boolean
|
||||
city?: boolean
|
||||
state?: boolean
|
||||
zipCode?: boolean
|
||||
user?: boolean | UserDefaultArgs<ExtArgs>
|
||||
}, ExtArgs["result"]["officeContact"]>
|
||||
|
||||
@@ -37091,6 +37123,10 @@ export namespace Prisma {
|
||||
phoneNumber?: boolean
|
||||
email?: boolean
|
||||
fax?: boolean
|
||||
streetAddress?: boolean
|
||||
city?: boolean
|
||||
state?: boolean
|
||||
zipCode?: boolean
|
||||
user?: boolean | UserDefaultArgs<ExtArgs>
|
||||
}, ExtArgs["result"]["officeContact"]>
|
||||
|
||||
@@ -37103,6 +37139,10 @@ export namespace Prisma {
|
||||
phoneNumber?: boolean
|
||||
email?: boolean
|
||||
fax?: boolean
|
||||
streetAddress?: boolean
|
||||
city?: boolean
|
||||
state?: boolean
|
||||
zipCode?: boolean
|
||||
user?: boolean | UserDefaultArgs<ExtArgs>
|
||||
}, ExtArgs["result"]["officeContact"]>
|
||||
|
||||
@@ -37115,9 +37155,13 @@ export namespace Prisma {
|
||||
phoneNumber?: boolean
|
||||
email?: boolean
|
||||
fax?: boolean
|
||||
streetAddress?: boolean
|
||||
city?: boolean
|
||||
state?: boolean
|
||||
zipCode?: boolean
|
||||
}
|
||||
|
||||
export type OfficeContactOmit<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetOmit<"id" | "userId" | "officeName" | "receptionistName" | "dentistName" | "phoneNumber" | "email" | "fax", ExtArgs["result"]["officeContact"]>
|
||||
export type OfficeContactOmit<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetOmit<"id" | "userId" | "officeName" | "receptionistName" | "dentistName" | "phoneNumber" | "email" | "fax" | "streetAddress" | "city" | "state" | "zipCode", ExtArgs["result"]["officeContact"]>
|
||||
export type OfficeContactInclude<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
|
||||
user?: boolean | UserDefaultArgs<ExtArgs>
|
||||
}
|
||||
@@ -37142,6 +37186,10 @@ export namespace Prisma {
|
||||
phoneNumber: string | null
|
||||
email: string | null
|
||||
fax: string | null
|
||||
streetAddress: string | null
|
||||
city: string | null
|
||||
state: string | null
|
||||
zipCode: string | null
|
||||
}, ExtArgs["result"]["officeContact"]>
|
||||
composites: {}
|
||||
}
|
||||
@@ -37574,6 +37622,10 @@ export namespace Prisma {
|
||||
readonly phoneNumber: FieldRef<"OfficeContact", 'String'>
|
||||
readonly email: FieldRef<"OfficeContact", 'String'>
|
||||
readonly fax: FieldRef<"OfficeContact", 'String'>
|
||||
readonly streetAddress: FieldRef<"OfficeContact", 'String'>
|
||||
readonly city: FieldRef<"OfficeContact", 'String'>
|
||||
readonly state: FieldRef<"OfficeContact", 'String'>
|
||||
readonly zipCode: FieldRef<"OfficeContact", 'String'>
|
||||
}
|
||||
|
||||
|
||||
@@ -41686,7 +41738,11 @@ export namespace Prisma {
|
||||
dentistName: 'dentistName',
|
||||
phoneNumber: 'phoneNumber',
|
||||
email: 'email',
|
||||
fax: 'fax'
|
||||
fax: 'fax',
|
||||
streetAddress: 'streetAddress',
|
||||
city: 'city',
|
||||
state: 'state',
|
||||
zipCode: 'zipCode'
|
||||
};
|
||||
|
||||
export type OfficeContactScalarFieldEnum = (typeof OfficeContactScalarFieldEnum)[keyof typeof OfficeContactScalarFieldEnum]
|
||||
@@ -44276,6 +44332,10 @@ export namespace Prisma {
|
||||
phoneNumber?: StringNullableFilter<"OfficeContact"> | string | null
|
||||
email?: StringNullableFilter<"OfficeContact"> | string | null
|
||||
fax?: StringNullableFilter<"OfficeContact"> | string | null
|
||||
streetAddress?: StringNullableFilter<"OfficeContact"> | string | null
|
||||
city?: StringNullableFilter<"OfficeContact"> | string | null
|
||||
state?: StringNullableFilter<"OfficeContact"> | string | null
|
||||
zipCode?: StringNullableFilter<"OfficeContact"> | string | null
|
||||
user?: XOR<UserScalarRelationFilter, UserWhereInput>
|
||||
}
|
||||
|
||||
@@ -44288,6 +44348,10 @@ export namespace Prisma {
|
||||
phoneNumber?: SortOrderInput | SortOrder
|
||||
email?: SortOrderInput | SortOrder
|
||||
fax?: SortOrderInput | SortOrder
|
||||
streetAddress?: SortOrderInput | SortOrder
|
||||
city?: SortOrderInput | SortOrder
|
||||
state?: SortOrderInput | SortOrder
|
||||
zipCode?: SortOrderInput | SortOrder
|
||||
user?: UserOrderByWithRelationInput
|
||||
}
|
||||
|
||||
@@ -44303,6 +44367,10 @@ export namespace Prisma {
|
||||
phoneNumber?: StringNullableFilter<"OfficeContact"> | string | null
|
||||
email?: StringNullableFilter<"OfficeContact"> | string | null
|
||||
fax?: StringNullableFilter<"OfficeContact"> | string | null
|
||||
streetAddress?: StringNullableFilter<"OfficeContact"> | string | null
|
||||
city?: StringNullableFilter<"OfficeContact"> | string | null
|
||||
state?: StringNullableFilter<"OfficeContact"> | string | null
|
||||
zipCode?: StringNullableFilter<"OfficeContact"> | string | null
|
||||
user?: XOR<UserScalarRelationFilter, UserWhereInput>
|
||||
}, "id" | "userId">
|
||||
|
||||
@@ -44315,6 +44383,10 @@ export namespace Prisma {
|
||||
phoneNumber?: SortOrderInput | SortOrder
|
||||
email?: SortOrderInput | SortOrder
|
||||
fax?: SortOrderInput | SortOrder
|
||||
streetAddress?: SortOrderInput | SortOrder
|
||||
city?: SortOrderInput | SortOrder
|
||||
state?: SortOrderInput | SortOrder
|
||||
zipCode?: SortOrderInput | SortOrder
|
||||
_count?: OfficeContactCountOrderByAggregateInput
|
||||
_avg?: OfficeContactAvgOrderByAggregateInput
|
||||
_max?: OfficeContactMaxOrderByAggregateInput
|
||||
@@ -44334,6 +44406,10 @@ export namespace Prisma {
|
||||
phoneNumber?: StringNullableWithAggregatesFilter<"OfficeContact"> | string | null
|
||||
email?: StringNullableWithAggregatesFilter<"OfficeContact"> | string | null
|
||||
fax?: StringNullableWithAggregatesFilter<"OfficeContact"> | string | null
|
||||
streetAddress?: StringNullableWithAggregatesFilter<"OfficeContact"> | string | null
|
||||
city?: StringNullableWithAggregatesFilter<"OfficeContact"> | string | null
|
||||
state?: StringNullableWithAggregatesFilter<"OfficeContact"> | string | null
|
||||
zipCode?: StringNullableWithAggregatesFilter<"OfficeContact"> | string | null
|
||||
}
|
||||
|
||||
export type InsuranceContactWhereInput = {
|
||||
@@ -46755,6 +46831,10 @@ export namespace Prisma {
|
||||
phoneNumber?: string | null
|
||||
email?: string | null
|
||||
fax?: string | null
|
||||
streetAddress?: string | null
|
||||
city?: string | null
|
||||
state?: string | null
|
||||
zipCode?: string | null
|
||||
user: UserCreateNestedOneWithoutOfficeContactInput
|
||||
}
|
||||
|
||||
@@ -46767,6 +46847,10 @@ export namespace Prisma {
|
||||
phoneNumber?: string | null
|
||||
email?: string | null
|
||||
fax?: string | null
|
||||
streetAddress?: string | null
|
||||
city?: string | null
|
||||
state?: string | null
|
||||
zipCode?: string | null
|
||||
}
|
||||
|
||||
export type OfficeContactUpdateInput = {
|
||||
@@ -46776,6 +46860,10 @@ export namespace Prisma {
|
||||
phoneNumber?: NullableStringFieldUpdateOperationsInput | string | null
|
||||
email?: NullableStringFieldUpdateOperationsInput | string | null
|
||||
fax?: NullableStringFieldUpdateOperationsInput | string | null
|
||||
streetAddress?: NullableStringFieldUpdateOperationsInput | string | null
|
||||
city?: NullableStringFieldUpdateOperationsInput | string | null
|
||||
state?: NullableStringFieldUpdateOperationsInput | string | null
|
||||
zipCode?: NullableStringFieldUpdateOperationsInput | string | null
|
||||
user?: UserUpdateOneRequiredWithoutOfficeContactNestedInput
|
||||
}
|
||||
|
||||
@@ -46788,6 +46876,10 @@ export namespace Prisma {
|
||||
phoneNumber?: NullableStringFieldUpdateOperationsInput | string | null
|
||||
email?: NullableStringFieldUpdateOperationsInput | string | null
|
||||
fax?: NullableStringFieldUpdateOperationsInput | string | null
|
||||
streetAddress?: NullableStringFieldUpdateOperationsInput | string | null
|
||||
city?: NullableStringFieldUpdateOperationsInput | string | null
|
||||
state?: NullableStringFieldUpdateOperationsInput | string | null
|
||||
zipCode?: NullableStringFieldUpdateOperationsInput | string | null
|
||||
}
|
||||
|
||||
export type OfficeContactCreateManyInput = {
|
||||
@@ -46799,6 +46891,10 @@ export namespace Prisma {
|
||||
phoneNumber?: string | null
|
||||
email?: string | null
|
||||
fax?: string | null
|
||||
streetAddress?: string | null
|
||||
city?: string | null
|
||||
state?: string | null
|
||||
zipCode?: string | null
|
||||
}
|
||||
|
||||
export type OfficeContactUpdateManyMutationInput = {
|
||||
@@ -46808,6 +46904,10 @@ export namespace Prisma {
|
||||
phoneNumber?: NullableStringFieldUpdateOperationsInput | string | null
|
||||
email?: NullableStringFieldUpdateOperationsInput | string | null
|
||||
fax?: NullableStringFieldUpdateOperationsInput | string | null
|
||||
streetAddress?: NullableStringFieldUpdateOperationsInput | string | null
|
||||
city?: NullableStringFieldUpdateOperationsInput | string | null
|
||||
state?: NullableStringFieldUpdateOperationsInput | string | null
|
||||
zipCode?: NullableStringFieldUpdateOperationsInput | string | null
|
||||
}
|
||||
|
||||
export type OfficeContactUncheckedUpdateManyInput = {
|
||||
@@ -46819,6 +46919,10 @@ export namespace Prisma {
|
||||
phoneNumber?: NullableStringFieldUpdateOperationsInput | string | null
|
||||
email?: NullableStringFieldUpdateOperationsInput | string | null
|
||||
fax?: NullableStringFieldUpdateOperationsInput | string | null
|
||||
streetAddress?: NullableStringFieldUpdateOperationsInput | string | null
|
||||
city?: NullableStringFieldUpdateOperationsInput | string | null
|
||||
state?: NullableStringFieldUpdateOperationsInput | string | null
|
||||
zipCode?: NullableStringFieldUpdateOperationsInput | string | null
|
||||
}
|
||||
|
||||
export type InsuranceContactCreateInput = {
|
||||
@@ -49197,6 +49301,10 @@ export namespace Prisma {
|
||||
phoneNumber?: SortOrder
|
||||
email?: SortOrder
|
||||
fax?: SortOrder
|
||||
streetAddress?: SortOrder
|
||||
city?: SortOrder
|
||||
state?: SortOrder
|
||||
zipCode?: SortOrder
|
||||
}
|
||||
|
||||
export type OfficeContactAvgOrderByAggregateInput = {
|
||||
@@ -49213,6 +49321,10 @@ export namespace Prisma {
|
||||
phoneNumber?: SortOrder
|
||||
email?: SortOrder
|
||||
fax?: SortOrder
|
||||
streetAddress?: SortOrder
|
||||
city?: SortOrder
|
||||
state?: SortOrder
|
||||
zipCode?: SortOrder
|
||||
}
|
||||
|
||||
export type OfficeContactMinOrderByAggregateInput = {
|
||||
@@ -49224,6 +49336,10 @@ export namespace Prisma {
|
||||
phoneNumber?: SortOrder
|
||||
email?: SortOrder
|
||||
fax?: SortOrder
|
||||
streetAddress?: SortOrder
|
||||
city?: SortOrder
|
||||
state?: SortOrder
|
||||
zipCode?: SortOrder
|
||||
}
|
||||
|
||||
export type OfficeContactSumOrderByAggregateInput = {
|
||||
@@ -52999,6 +53115,10 @@ export namespace Prisma {
|
||||
phoneNumber?: string | null
|
||||
email?: string | null
|
||||
fax?: string | null
|
||||
streetAddress?: string | null
|
||||
city?: string | null
|
||||
state?: string | null
|
||||
zipCode?: string | null
|
||||
}
|
||||
|
||||
export type OfficeContactUncheckedCreateWithoutUserInput = {
|
||||
@@ -53009,6 +53129,10 @@ export namespace Prisma {
|
||||
phoneNumber?: string | null
|
||||
email?: string | null
|
||||
fax?: string | null
|
||||
streetAddress?: string | null
|
||||
city?: string | null
|
||||
state?: string | null
|
||||
zipCode?: string | null
|
||||
}
|
||||
|
||||
export type OfficeContactCreateOrConnectWithoutUserInput = {
|
||||
@@ -53581,6 +53705,10 @@ export namespace Prisma {
|
||||
phoneNumber?: NullableStringFieldUpdateOperationsInput | string | null
|
||||
email?: NullableStringFieldUpdateOperationsInput | string | null
|
||||
fax?: NullableStringFieldUpdateOperationsInput | string | null
|
||||
streetAddress?: NullableStringFieldUpdateOperationsInput | string | null
|
||||
city?: NullableStringFieldUpdateOperationsInput | string | null
|
||||
state?: NullableStringFieldUpdateOperationsInput | string | null
|
||||
zipCode?: NullableStringFieldUpdateOperationsInput | string | null
|
||||
}
|
||||
|
||||
export type OfficeContactUncheckedUpdateWithoutUserInput = {
|
||||
@@ -53591,6 +53719,10 @@ export namespace Prisma {
|
||||
phoneNumber?: NullableStringFieldUpdateOperationsInput | string | null
|
||||
email?: NullableStringFieldUpdateOperationsInput | string | null
|
||||
fax?: NullableStringFieldUpdateOperationsInput | string | null
|
||||
streetAddress?: NullableStringFieldUpdateOperationsInput | string | null
|
||||
city?: NullableStringFieldUpdateOperationsInput | string | null
|
||||
state?: NullableStringFieldUpdateOperationsInput | string | null
|
||||
zipCode?: NullableStringFieldUpdateOperationsInput | string | null
|
||||
}
|
||||
|
||||
export type ProcedureTimeslotUpsertWithoutUserInput = {
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"name": "prisma-client-bdc07eb887b3bb595b0151af876608d0c2dad5b625bc466303ffa3819c38e3ca",
|
||||
"name": "prisma-client-7ab23aa0435ee62d1543cc6f3f10f1fac4ea741f94efe006ada0cea03090a0c9",
|
||||
"main": "index.js",
|
||||
"types": "index.d.ts",
|
||||
"browser": "default.js",
|
||||
|
||||
@@ -604,6 +604,10 @@ model OfficeContact {
|
||||
phoneNumber String?
|
||||
email String?
|
||||
fax String?
|
||||
streetAddress String?
|
||||
city String?
|
||||
state String?
|
||||
zipCode String?
|
||||
|
||||
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
|
||||
|
||||
|
||||
@@ -605,6 +605,10 @@ model OfficeContact {
|
||||
phoneNumber String?
|
||||
email String?
|
||||
fax String?
|
||||
streetAddress String?
|
||||
city String?
|
||||
state String?
|
||||
zipCode String?
|
||||
|
||||
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"version": "1.0",
|
||||
"generatorVersion": "1.0.0",
|
||||
"generatedAt": "2026-05-11T21:48:22.459Z",
|
||||
"generatedAt": "2026-05-12T02:28:39.220Z",
|
||||
"outputPath": "/home/ee/Desktop/DentalManagementMH05/packages/db/shared",
|
||||
"files": [
|
||||
"schemas/enums/TransactionIsolationLevel.schema.ts",
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import * as z from 'zod';
|
||||
|
||||
export const OfficeContactScalarFieldEnumSchema = z.enum(['id', 'userId', 'officeName', 'receptionistName', 'dentistName', 'phoneNumber', 'email', 'fax'])
|
||||
export const OfficeContactScalarFieldEnumSchema = z.enum(['id', 'userId', 'officeName', 'receptionistName', 'dentistName', 'phoneNumber', 'email', 'fax', 'streetAddress', 'city', 'state', 'zipCode'])
|
||||
|
||||
export type OfficeContactScalarFieldEnum = z.infer<typeof OfficeContactScalarFieldEnumSchema>;
|
||||
@@ -18,6 +18,10 @@ export const OfficeContactFindFirstSelectSchema: z.ZodType<Prisma.OfficeContactS
|
||||
phoneNumber: z.boolean().optional(),
|
||||
email: z.boolean().optional(),
|
||||
fax: z.boolean().optional(),
|
||||
streetAddress: z.boolean().optional(),
|
||||
city: z.boolean().optional(),
|
||||
state: z.boolean().optional(),
|
||||
zipCode: z.boolean().optional(),
|
||||
user: z.boolean().optional()
|
||||
}).strict() as unknown as z.ZodType<Prisma.OfficeContactSelect>;
|
||||
|
||||
@@ -30,6 +34,10 @@ export const OfficeContactFindFirstSelectZodSchema = z.object({
|
||||
phoneNumber: z.boolean().optional(),
|
||||
email: z.boolean().optional(),
|
||||
fax: z.boolean().optional(),
|
||||
streetAddress: z.boolean().optional(),
|
||||
city: z.boolean().optional(),
|
||||
state: z.boolean().optional(),
|
||||
zipCode: z.boolean().optional(),
|
||||
user: z.boolean().optional()
|
||||
}).strict();
|
||||
|
||||
|
||||
@@ -18,6 +18,10 @@ export const OfficeContactFindFirstOrThrowSelectSchema: z.ZodType<Prisma.OfficeC
|
||||
phoneNumber: z.boolean().optional(),
|
||||
email: z.boolean().optional(),
|
||||
fax: z.boolean().optional(),
|
||||
streetAddress: z.boolean().optional(),
|
||||
city: z.boolean().optional(),
|
||||
state: z.boolean().optional(),
|
||||
zipCode: z.boolean().optional(),
|
||||
user: z.boolean().optional()
|
||||
}).strict() as unknown as z.ZodType<Prisma.OfficeContactSelect>;
|
||||
|
||||
@@ -30,6 +34,10 @@ export const OfficeContactFindFirstOrThrowSelectZodSchema = z.object({
|
||||
phoneNumber: z.boolean().optional(),
|
||||
email: z.boolean().optional(),
|
||||
fax: z.boolean().optional(),
|
||||
streetAddress: z.boolean().optional(),
|
||||
city: z.boolean().optional(),
|
||||
state: z.boolean().optional(),
|
||||
zipCode: z.boolean().optional(),
|
||||
user: z.boolean().optional()
|
||||
}).strict();
|
||||
|
||||
|
||||
@@ -18,6 +18,10 @@ export const OfficeContactFindManySelectSchema: z.ZodType<Prisma.OfficeContactSe
|
||||
phoneNumber: z.boolean().optional(),
|
||||
email: z.boolean().optional(),
|
||||
fax: z.boolean().optional(),
|
||||
streetAddress: z.boolean().optional(),
|
||||
city: z.boolean().optional(),
|
||||
state: z.boolean().optional(),
|
||||
zipCode: z.boolean().optional(),
|
||||
user: z.boolean().optional()
|
||||
}).strict() as unknown as z.ZodType<Prisma.OfficeContactSelect>;
|
||||
|
||||
@@ -30,6 +34,10 @@ export const OfficeContactFindManySelectZodSchema = z.object({
|
||||
phoneNumber: z.boolean().optional(),
|
||||
email: z.boolean().optional(),
|
||||
fax: z.boolean().optional(),
|
||||
streetAddress: z.boolean().optional(),
|
||||
city: z.boolean().optional(),
|
||||
state: z.boolean().optional(),
|
||||
zipCode: z.boolean().optional(),
|
||||
user: z.boolean().optional()
|
||||
}).strict();
|
||||
|
||||
|
||||
@@ -11,6 +11,10 @@ const makeSchema = () => z.object({
|
||||
phoneNumber: z.literal(true).optional(),
|
||||
email: z.literal(true).optional(),
|
||||
fax: z.literal(true).optional(),
|
||||
streetAddress: z.literal(true).optional(),
|
||||
city: z.literal(true).optional(),
|
||||
state: z.literal(true).optional(),
|
||||
zipCode: z.literal(true).optional(),
|
||||
_all: z.literal(true).optional()
|
||||
}).strict();
|
||||
export const OfficeContactCountAggregateInputObjectSchema: z.ZodType<Prisma.OfficeContactCountAggregateInputType> = makeSchema() as unknown as z.ZodType<Prisma.OfficeContactCountAggregateInputType>;
|
||||
|
||||
@@ -10,7 +10,11 @@ const makeSchema = () => z.object({
|
||||
dentistName: SortOrderSchema.optional(),
|
||||
phoneNumber: SortOrderSchema.optional(),
|
||||
email: SortOrderSchema.optional(),
|
||||
fax: SortOrderSchema.optional()
|
||||
fax: SortOrderSchema.optional(),
|
||||
streetAddress: SortOrderSchema.optional(),
|
||||
city: SortOrderSchema.optional(),
|
||||
state: SortOrderSchema.optional(),
|
||||
zipCode: SortOrderSchema.optional()
|
||||
}).strict();
|
||||
export const OfficeContactCountOrderByAggregateInputObjectSchema: z.ZodType<Prisma.OfficeContactCountOrderByAggregateInput> = makeSchema() as unknown as z.ZodType<Prisma.OfficeContactCountOrderByAggregateInput>;
|
||||
export const OfficeContactCountOrderByAggregateInputObjectZodSchema = makeSchema();
|
||||
|
||||
@@ -9,6 +9,10 @@ const makeSchema = () => z.object({
|
||||
phoneNumber: z.string().optional().nullable(),
|
||||
email: z.string().optional().nullable(),
|
||||
fax: z.string().optional().nullable(),
|
||||
streetAddress: z.string().optional().nullable(),
|
||||
city: z.string().optional().nullable(),
|
||||
state: z.string().optional().nullable(),
|
||||
zipCode: z.string().optional().nullable(),
|
||||
user: z.lazy(() => UserCreateNestedOneWithoutOfficeContactInputObjectSchema)
|
||||
}).strict();
|
||||
export const OfficeContactCreateInputObjectSchema: z.ZodType<Prisma.OfficeContactCreateInput> = makeSchema() as unknown as z.ZodType<Prisma.OfficeContactCreateInput>;
|
||||
|
||||
@@ -10,7 +10,11 @@ const makeSchema = () => z.object({
|
||||
dentistName: z.string().optional().nullable(),
|
||||
phoneNumber: z.string().optional().nullable(),
|
||||
email: z.string().optional().nullable(),
|
||||
fax: z.string().optional().nullable()
|
||||
fax: z.string().optional().nullable(),
|
||||
streetAddress: z.string().optional().nullable(),
|
||||
city: z.string().optional().nullable(),
|
||||
state: z.string().optional().nullable(),
|
||||
zipCode: z.string().optional().nullable()
|
||||
}).strict();
|
||||
export const OfficeContactCreateManyInputObjectSchema: z.ZodType<Prisma.OfficeContactCreateManyInput> = makeSchema() as unknown as z.ZodType<Prisma.OfficeContactCreateManyInput>;
|
||||
export const OfficeContactCreateManyInputObjectZodSchema = makeSchema();
|
||||
|
||||
@@ -8,7 +8,11 @@ const makeSchema = () => z.object({
|
||||
dentistName: z.string().optional().nullable(),
|
||||
phoneNumber: z.string().optional().nullable(),
|
||||
email: z.string().optional().nullable(),
|
||||
fax: z.string().optional().nullable()
|
||||
fax: z.string().optional().nullable(),
|
||||
streetAddress: z.string().optional().nullable(),
|
||||
city: z.string().optional().nullable(),
|
||||
state: z.string().optional().nullable(),
|
||||
zipCode: z.string().optional().nullable()
|
||||
}).strict();
|
||||
export const OfficeContactCreateWithoutUserInputObjectSchema: z.ZodType<Prisma.OfficeContactCreateWithoutUserInput> = makeSchema() as unknown as z.ZodType<Prisma.OfficeContactCreateWithoutUserInput>;
|
||||
export const OfficeContactCreateWithoutUserInputObjectZodSchema = makeSchema();
|
||||
|
||||
@@ -10,7 +10,11 @@ const makeSchema = () => z.object({
|
||||
dentistName: z.literal(true).optional(),
|
||||
phoneNumber: z.literal(true).optional(),
|
||||
email: z.literal(true).optional(),
|
||||
fax: z.literal(true).optional()
|
||||
fax: z.literal(true).optional(),
|
||||
streetAddress: z.literal(true).optional(),
|
||||
city: z.literal(true).optional(),
|
||||
state: z.literal(true).optional(),
|
||||
zipCode: z.literal(true).optional()
|
||||
}).strict();
|
||||
export const OfficeContactMaxAggregateInputObjectSchema: z.ZodType<Prisma.OfficeContactMaxAggregateInputType> = makeSchema() as unknown as z.ZodType<Prisma.OfficeContactMaxAggregateInputType>;
|
||||
export const OfficeContactMaxAggregateInputObjectZodSchema = makeSchema();
|
||||
|
||||
@@ -10,7 +10,11 @@ const makeSchema = () => z.object({
|
||||
dentistName: SortOrderSchema.optional(),
|
||||
phoneNumber: SortOrderSchema.optional(),
|
||||
email: SortOrderSchema.optional(),
|
||||
fax: SortOrderSchema.optional()
|
||||
fax: SortOrderSchema.optional(),
|
||||
streetAddress: SortOrderSchema.optional(),
|
||||
city: SortOrderSchema.optional(),
|
||||
state: SortOrderSchema.optional(),
|
||||
zipCode: SortOrderSchema.optional()
|
||||
}).strict();
|
||||
export const OfficeContactMaxOrderByAggregateInputObjectSchema: z.ZodType<Prisma.OfficeContactMaxOrderByAggregateInput> = makeSchema() as unknown as z.ZodType<Prisma.OfficeContactMaxOrderByAggregateInput>;
|
||||
export const OfficeContactMaxOrderByAggregateInputObjectZodSchema = makeSchema();
|
||||
|
||||
@@ -10,7 +10,11 @@ const makeSchema = () => z.object({
|
||||
dentistName: z.literal(true).optional(),
|
||||
phoneNumber: z.literal(true).optional(),
|
||||
email: z.literal(true).optional(),
|
||||
fax: z.literal(true).optional()
|
||||
fax: z.literal(true).optional(),
|
||||
streetAddress: z.literal(true).optional(),
|
||||
city: z.literal(true).optional(),
|
||||
state: z.literal(true).optional(),
|
||||
zipCode: z.literal(true).optional()
|
||||
}).strict();
|
||||
export const OfficeContactMinAggregateInputObjectSchema: z.ZodType<Prisma.OfficeContactMinAggregateInputType> = makeSchema() as unknown as z.ZodType<Prisma.OfficeContactMinAggregateInputType>;
|
||||
export const OfficeContactMinAggregateInputObjectZodSchema = makeSchema();
|
||||
|
||||
@@ -10,7 +10,11 @@ const makeSchema = () => z.object({
|
||||
dentistName: SortOrderSchema.optional(),
|
||||
phoneNumber: SortOrderSchema.optional(),
|
||||
email: SortOrderSchema.optional(),
|
||||
fax: SortOrderSchema.optional()
|
||||
fax: SortOrderSchema.optional(),
|
||||
streetAddress: SortOrderSchema.optional(),
|
||||
city: SortOrderSchema.optional(),
|
||||
state: SortOrderSchema.optional(),
|
||||
zipCode: SortOrderSchema.optional()
|
||||
}).strict();
|
||||
export const OfficeContactMinOrderByAggregateInputObjectSchema: z.ZodType<Prisma.OfficeContactMinOrderByAggregateInput> = makeSchema() as unknown as z.ZodType<Prisma.OfficeContactMinOrderByAggregateInput>;
|
||||
export const OfficeContactMinOrderByAggregateInputObjectZodSchema = makeSchema();
|
||||
|
||||
@@ -17,6 +17,10 @@ const makeSchema = () => z.object({
|
||||
phoneNumber: z.union([SortOrderSchema, z.lazy(() => SortOrderInputObjectSchema)]).optional(),
|
||||
email: z.union([SortOrderSchema, z.lazy(() => SortOrderInputObjectSchema)]).optional(),
|
||||
fax: z.union([SortOrderSchema, z.lazy(() => SortOrderInputObjectSchema)]).optional(),
|
||||
streetAddress: z.union([SortOrderSchema, z.lazy(() => SortOrderInputObjectSchema)]).optional(),
|
||||
city: z.union([SortOrderSchema, z.lazy(() => SortOrderInputObjectSchema)]).optional(),
|
||||
state: z.union([SortOrderSchema, z.lazy(() => SortOrderInputObjectSchema)]).optional(),
|
||||
zipCode: z.union([SortOrderSchema, z.lazy(() => SortOrderInputObjectSchema)]).optional(),
|
||||
_count: z.lazy(() => OfficeContactCountOrderByAggregateInputObjectSchema).optional(),
|
||||
_avg: z.lazy(() => OfficeContactAvgOrderByAggregateInputObjectSchema).optional(),
|
||||
_max: z.lazy(() => OfficeContactMaxOrderByAggregateInputObjectSchema).optional(),
|
||||
|
||||
@@ -13,6 +13,10 @@ const makeSchema = () => z.object({
|
||||
phoneNumber: z.union([SortOrderSchema, z.lazy(() => SortOrderInputObjectSchema)]).optional(),
|
||||
email: z.union([SortOrderSchema, z.lazy(() => SortOrderInputObjectSchema)]).optional(),
|
||||
fax: z.union([SortOrderSchema, z.lazy(() => SortOrderInputObjectSchema)]).optional(),
|
||||
streetAddress: z.union([SortOrderSchema, z.lazy(() => SortOrderInputObjectSchema)]).optional(),
|
||||
city: z.union([SortOrderSchema, z.lazy(() => SortOrderInputObjectSchema)]).optional(),
|
||||
state: z.union([SortOrderSchema, z.lazy(() => SortOrderInputObjectSchema)]).optional(),
|
||||
zipCode: z.union([SortOrderSchema, z.lazy(() => SortOrderInputObjectSchema)]).optional(),
|
||||
user: z.lazy(() => UserOrderByWithRelationInputObjectSchema).optional()
|
||||
}).strict();
|
||||
export const OfficeContactOrderByWithRelationInputObjectSchema: z.ZodType<Prisma.OfficeContactOrderByWithRelationInput> = makeSchema() as unknown as z.ZodType<Prisma.OfficeContactOrderByWithRelationInput>;
|
||||
|
||||
@@ -14,7 +14,11 @@ const officecontactscalarwherewithaggregatesinputSchema = z.object({
|
||||
dentistName: z.union([z.lazy(() => StringNullableWithAggregatesFilterObjectSchema), z.string()]).optional().nullable(),
|
||||
phoneNumber: z.union([z.lazy(() => StringNullableWithAggregatesFilterObjectSchema), z.string()]).optional().nullable(),
|
||||
email: z.union([z.lazy(() => StringNullableWithAggregatesFilterObjectSchema), z.string()]).optional().nullable(),
|
||||
fax: z.union([z.lazy(() => StringNullableWithAggregatesFilterObjectSchema), z.string()]).optional().nullable()
|
||||
fax: z.union([z.lazy(() => StringNullableWithAggregatesFilterObjectSchema), z.string()]).optional().nullable(),
|
||||
streetAddress: z.union([z.lazy(() => StringNullableWithAggregatesFilterObjectSchema), z.string()]).optional().nullable(),
|
||||
city: z.union([z.lazy(() => StringNullableWithAggregatesFilterObjectSchema), z.string()]).optional().nullable(),
|
||||
state: z.union([z.lazy(() => StringNullableWithAggregatesFilterObjectSchema), z.string()]).optional().nullable(),
|
||||
zipCode: z.union([z.lazy(() => StringNullableWithAggregatesFilterObjectSchema), z.string()]).optional().nullable()
|
||||
}).strict();
|
||||
export const OfficeContactScalarWhereWithAggregatesInputObjectSchema: z.ZodType<Prisma.OfficeContactScalarWhereWithAggregatesInput> = officecontactscalarwherewithaggregatesinputSchema as unknown as z.ZodType<Prisma.OfficeContactScalarWhereWithAggregatesInput>;
|
||||
export const OfficeContactScalarWhereWithAggregatesInputObjectZodSchema = officecontactscalarwherewithaggregatesinputSchema;
|
||||
|
||||
@@ -11,6 +11,10 @@ const makeSchema = () => z.object({
|
||||
phoneNumber: z.boolean().optional(),
|
||||
email: z.boolean().optional(),
|
||||
fax: z.boolean().optional(),
|
||||
streetAddress: z.boolean().optional(),
|
||||
city: z.boolean().optional(),
|
||||
state: z.boolean().optional(),
|
||||
zipCode: z.boolean().optional(),
|
||||
user: z.union([z.boolean(), z.lazy(() => UserArgsObjectSchema)]).optional()
|
||||
}).strict();
|
||||
export const OfficeContactSelectObjectSchema: z.ZodType<Prisma.OfficeContactSelect> = makeSchema() as unknown as z.ZodType<Prisma.OfficeContactSelect>;
|
||||
|
||||
@@ -10,7 +10,11 @@ const makeSchema = () => z.object({
|
||||
dentistName: z.string().optional().nullable(),
|
||||
phoneNumber: z.string().optional().nullable(),
|
||||
email: z.string().optional().nullable(),
|
||||
fax: z.string().optional().nullable()
|
||||
fax: z.string().optional().nullable(),
|
||||
streetAddress: z.string().optional().nullable(),
|
||||
city: z.string().optional().nullable(),
|
||||
state: z.string().optional().nullable(),
|
||||
zipCode: z.string().optional().nullable()
|
||||
}).strict();
|
||||
export const OfficeContactUncheckedCreateInputObjectSchema: z.ZodType<Prisma.OfficeContactUncheckedCreateInput> = makeSchema() as unknown as z.ZodType<Prisma.OfficeContactUncheckedCreateInput>;
|
||||
export const OfficeContactUncheckedCreateInputObjectZodSchema = makeSchema();
|
||||
|
||||
@@ -9,7 +9,11 @@ const makeSchema = () => z.object({
|
||||
dentistName: z.string().optional().nullable(),
|
||||
phoneNumber: z.string().optional().nullable(),
|
||||
email: z.string().optional().nullable(),
|
||||
fax: z.string().optional().nullable()
|
||||
fax: z.string().optional().nullable(),
|
||||
streetAddress: z.string().optional().nullable(),
|
||||
city: z.string().optional().nullable(),
|
||||
state: z.string().optional().nullable(),
|
||||
zipCode: z.string().optional().nullable()
|
||||
}).strict();
|
||||
export const OfficeContactUncheckedCreateWithoutUserInputObjectSchema: z.ZodType<Prisma.OfficeContactUncheckedCreateWithoutUserInput> = makeSchema() as unknown as z.ZodType<Prisma.OfficeContactUncheckedCreateWithoutUserInput>;
|
||||
export const OfficeContactUncheckedCreateWithoutUserInputObjectZodSchema = makeSchema();
|
||||
|
||||
@@ -11,7 +11,11 @@ const makeSchema = () => z.object({
|
||||
dentistName: z.union([z.string(), z.lazy(() => NullableStringFieldUpdateOperationsInputObjectSchema)]).optional().nullable(),
|
||||
phoneNumber: z.union([z.string(), z.lazy(() => NullableStringFieldUpdateOperationsInputObjectSchema)]).optional().nullable(),
|
||||
email: z.union([z.string(), z.lazy(() => NullableStringFieldUpdateOperationsInputObjectSchema)]).optional().nullable(),
|
||||
fax: z.union([z.string(), z.lazy(() => NullableStringFieldUpdateOperationsInputObjectSchema)]).optional().nullable()
|
||||
fax: z.union([z.string(), z.lazy(() => NullableStringFieldUpdateOperationsInputObjectSchema)]).optional().nullable(),
|
||||
streetAddress: z.union([z.string(), z.lazy(() => NullableStringFieldUpdateOperationsInputObjectSchema)]).optional().nullable(),
|
||||
city: z.union([z.string(), z.lazy(() => NullableStringFieldUpdateOperationsInputObjectSchema)]).optional().nullable(),
|
||||
state: z.union([z.string(), z.lazy(() => NullableStringFieldUpdateOperationsInputObjectSchema)]).optional().nullable(),
|
||||
zipCode: z.union([z.string(), z.lazy(() => NullableStringFieldUpdateOperationsInputObjectSchema)]).optional().nullable()
|
||||
}).strict();
|
||||
export const OfficeContactUncheckedUpdateInputObjectSchema: z.ZodType<Prisma.OfficeContactUncheckedUpdateInput> = makeSchema() as unknown as z.ZodType<Prisma.OfficeContactUncheckedUpdateInput>;
|
||||
export const OfficeContactUncheckedUpdateInputObjectZodSchema = makeSchema();
|
||||
|
||||
@@ -11,7 +11,11 @@ const makeSchema = () => z.object({
|
||||
dentistName: z.union([z.string(), z.lazy(() => NullableStringFieldUpdateOperationsInputObjectSchema)]).optional().nullable(),
|
||||
phoneNumber: z.union([z.string(), z.lazy(() => NullableStringFieldUpdateOperationsInputObjectSchema)]).optional().nullable(),
|
||||
email: z.union([z.string(), z.lazy(() => NullableStringFieldUpdateOperationsInputObjectSchema)]).optional().nullable(),
|
||||
fax: z.union([z.string(), z.lazy(() => NullableStringFieldUpdateOperationsInputObjectSchema)]).optional().nullable()
|
||||
fax: z.union([z.string(), z.lazy(() => NullableStringFieldUpdateOperationsInputObjectSchema)]).optional().nullable(),
|
||||
streetAddress: z.union([z.string(), z.lazy(() => NullableStringFieldUpdateOperationsInputObjectSchema)]).optional().nullable(),
|
||||
city: z.union([z.string(), z.lazy(() => NullableStringFieldUpdateOperationsInputObjectSchema)]).optional().nullable(),
|
||||
state: z.union([z.string(), z.lazy(() => NullableStringFieldUpdateOperationsInputObjectSchema)]).optional().nullable(),
|
||||
zipCode: z.union([z.string(), z.lazy(() => NullableStringFieldUpdateOperationsInputObjectSchema)]).optional().nullable()
|
||||
}).strict();
|
||||
export const OfficeContactUncheckedUpdateManyInputObjectSchema: z.ZodType<Prisma.OfficeContactUncheckedUpdateManyInput> = makeSchema() as unknown as z.ZodType<Prisma.OfficeContactUncheckedUpdateManyInput>;
|
||||
export const OfficeContactUncheckedUpdateManyInputObjectZodSchema = makeSchema();
|
||||
|
||||
@@ -10,7 +10,11 @@ const makeSchema = () => z.object({
|
||||
dentistName: z.union([z.string(), z.lazy(() => NullableStringFieldUpdateOperationsInputObjectSchema)]).optional().nullable(),
|
||||
phoneNumber: z.union([z.string(), z.lazy(() => NullableStringFieldUpdateOperationsInputObjectSchema)]).optional().nullable(),
|
||||
email: z.union([z.string(), z.lazy(() => NullableStringFieldUpdateOperationsInputObjectSchema)]).optional().nullable(),
|
||||
fax: z.union([z.string(), z.lazy(() => NullableStringFieldUpdateOperationsInputObjectSchema)]).optional().nullable()
|
||||
fax: z.union([z.string(), z.lazy(() => NullableStringFieldUpdateOperationsInputObjectSchema)]).optional().nullable(),
|
||||
streetAddress: z.union([z.string(), z.lazy(() => NullableStringFieldUpdateOperationsInputObjectSchema)]).optional().nullable(),
|
||||
city: z.union([z.string(), z.lazy(() => NullableStringFieldUpdateOperationsInputObjectSchema)]).optional().nullable(),
|
||||
state: z.union([z.string(), z.lazy(() => NullableStringFieldUpdateOperationsInputObjectSchema)]).optional().nullable(),
|
||||
zipCode: z.union([z.string(), z.lazy(() => NullableStringFieldUpdateOperationsInputObjectSchema)]).optional().nullable()
|
||||
}).strict();
|
||||
export const OfficeContactUncheckedUpdateWithoutUserInputObjectSchema: z.ZodType<Prisma.OfficeContactUncheckedUpdateWithoutUserInput> = makeSchema() as unknown as z.ZodType<Prisma.OfficeContactUncheckedUpdateWithoutUserInput>;
|
||||
export const OfficeContactUncheckedUpdateWithoutUserInputObjectZodSchema = makeSchema();
|
||||
|
||||
@@ -10,6 +10,10 @@ const makeSchema = () => z.object({
|
||||
phoneNumber: z.union([z.string(), z.lazy(() => NullableStringFieldUpdateOperationsInputObjectSchema)]).optional().nullable(),
|
||||
email: z.union([z.string(), z.lazy(() => NullableStringFieldUpdateOperationsInputObjectSchema)]).optional().nullable(),
|
||||
fax: z.union([z.string(), z.lazy(() => NullableStringFieldUpdateOperationsInputObjectSchema)]).optional().nullable(),
|
||||
streetAddress: z.union([z.string(), z.lazy(() => NullableStringFieldUpdateOperationsInputObjectSchema)]).optional().nullable(),
|
||||
city: z.union([z.string(), z.lazy(() => NullableStringFieldUpdateOperationsInputObjectSchema)]).optional().nullable(),
|
||||
state: z.union([z.string(), z.lazy(() => NullableStringFieldUpdateOperationsInputObjectSchema)]).optional().nullable(),
|
||||
zipCode: z.union([z.string(), z.lazy(() => NullableStringFieldUpdateOperationsInputObjectSchema)]).optional().nullable(),
|
||||
user: z.lazy(() => UserUpdateOneRequiredWithoutOfficeContactNestedInputObjectSchema).optional()
|
||||
}).strict();
|
||||
export const OfficeContactUpdateInputObjectSchema: z.ZodType<Prisma.OfficeContactUpdateInput> = makeSchema() as unknown as z.ZodType<Prisma.OfficeContactUpdateInput>;
|
||||
|
||||
@@ -8,7 +8,11 @@ const makeSchema = () => z.object({
|
||||
dentistName: z.union([z.string(), z.lazy(() => NullableStringFieldUpdateOperationsInputObjectSchema)]).optional().nullable(),
|
||||
phoneNumber: z.union([z.string(), z.lazy(() => NullableStringFieldUpdateOperationsInputObjectSchema)]).optional().nullable(),
|
||||
email: z.union([z.string(), z.lazy(() => NullableStringFieldUpdateOperationsInputObjectSchema)]).optional().nullable(),
|
||||
fax: z.union([z.string(), z.lazy(() => NullableStringFieldUpdateOperationsInputObjectSchema)]).optional().nullable()
|
||||
fax: z.union([z.string(), z.lazy(() => NullableStringFieldUpdateOperationsInputObjectSchema)]).optional().nullable(),
|
||||
streetAddress: z.union([z.string(), z.lazy(() => NullableStringFieldUpdateOperationsInputObjectSchema)]).optional().nullable(),
|
||||
city: z.union([z.string(), z.lazy(() => NullableStringFieldUpdateOperationsInputObjectSchema)]).optional().nullable(),
|
||||
state: z.union([z.string(), z.lazy(() => NullableStringFieldUpdateOperationsInputObjectSchema)]).optional().nullable(),
|
||||
zipCode: z.union([z.string(), z.lazy(() => NullableStringFieldUpdateOperationsInputObjectSchema)]).optional().nullable()
|
||||
}).strict();
|
||||
export const OfficeContactUpdateManyMutationInputObjectSchema: z.ZodType<Prisma.OfficeContactUpdateManyMutationInput> = makeSchema() as unknown as z.ZodType<Prisma.OfficeContactUpdateManyMutationInput>;
|
||||
export const OfficeContactUpdateManyMutationInputObjectZodSchema = makeSchema();
|
||||
|
||||
@@ -8,7 +8,11 @@ const makeSchema = () => z.object({
|
||||
dentistName: z.union([z.string(), z.lazy(() => NullableStringFieldUpdateOperationsInputObjectSchema)]).optional().nullable(),
|
||||
phoneNumber: z.union([z.string(), z.lazy(() => NullableStringFieldUpdateOperationsInputObjectSchema)]).optional().nullable(),
|
||||
email: z.union([z.string(), z.lazy(() => NullableStringFieldUpdateOperationsInputObjectSchema)]).optional().nullable(),
|
||||
fax: z.union([z.string(), z.lazy(() => NullableStringFieldUpdateOperationsInputObjectSchema)]).optional().nullable()
|
||||
fax: z.union([z.string(), z.lazy(() => NullableStringFieldUpdateOperationsInputObjectSchema)]).optional().nullable(),
|
||||
streetAddress: z.union([z.string(), z.lazy(() => NullableStringFieldUpdateOperationsInputObjectSchema)]).optional().nullable(),
|
||||
city: z.union([z.string(), z.lazy(() => NullableStringFieldUpdateOperationsInputObjectSchema)]).optional().nullable(),
|
||||
state: z.union([z.string(), z.lazy(() => NullableStringFieldUpdateOperationsInputObjectSchema)]).optional().nullable(),
|
||||
zipCode: z.union([z.string(), z.lazy(() => NullableStringFieldUpdateOperationsInputObjectSchema)]).optional().nullable()
|
||||
}).strict();
|
||||
export const OfficeContactUpdateWithoutUserInputObjectSchema: z.ZodType<Prisma.OfficeContactUpdateWithoutUserInput> = makeSchema() as unknown as z.ZodType<Prisma.OfficeContactUpdateWithoutUserInput>;
|
||||
export const OfficeContactUpdateWithoutUserInputObjectZodSchema = makeSchema();
|
||||
|
||||
@@ -17,6 +17,10 @@ const officecontactwhereinputSchema = z.object({
|
||||
phoneNumber: z.union([z.lazy(() => StringNullableFilterObjectSchema), z.string()]).optional().nullable(),
|
||||
email: z.union([z.lazy(() => StringNullableFilterObjectSchema), z.string()]).optional().nullable(),
|
||||
fax: z.union([z.lazy(() => StringNullableFilterObjectSchema), z.string()]).optional().nullable(),
|
||||
streetAddress: z.union([z.lazy(() => StringNullableFilterObjectSchema), z.string()]).optional().nullable(),
|
||||
city: z.union([z.lazy(() => StringNullableFilterObjectSchema), z.string()]).optional().nullable(),
|
||||
state: z.union([z.lazy(() => StringNullableFilterObjectSchema), z.string()]).optional().nullable(),
|
||||
zipCode: z.union([z.lazy(() => StringNullableFilterObjectSchema), z.string()]).optional().nullable(),
|
||||
user: z.union([z.lazy(() => UserScalarRelationFilterObjectSchema), z.lazy(() => UserWhereInputObjectSchema)]).optional()
|
||||
}).strict();
|
||||
export const OfficeContactWhereInputObjectSchema: z.ZodType<Prisma.OfficeContactWhereInput> = officecontactwhereinputSchema as unknown as z.ZodType<Prisma.OfficeContactWhereInput>;
|
||||
|
||||
@@ -8,6 +8,10 @@ export const OfficeContactAggregateResultSchema = z.object({ _count: z.object({
|
||||
phoneNumber: z.number(),
|
||||
email: z.number(),
|
||||
fax: z.number(),
|
||||
streetAddress: z.number(),
|
||||
city: z.number(),
|
||||
state: z.number(),
|
||||
zipCode: z.number(),
|
||||
user: z.number()
|
||||
}).optional(),
|
||||
_sum: z.object({
|
||||
@@ -26,7 +30,11 @@ export const OfficeContactAggregateResultSchema = z.object({ _count: z.object({
|
||||
dentistName: z.string().nullable(),
|
||||
phoneNumber: z.string().nullable(),
|
||||
email: z.string().nullable(),
|
||||
fax: z.string().nullable()
|
||||
fax: z.string().nullable(),
|
||||
streetAddress: z.string().nullable(),
|
||||
city: z.string().nullable(),
|
||||
state: z.string().nullable(),
|
||||
zipCode: z.string().nullable()
|
||||
}).nullable().optional(),
|
||||
_max: z.object({
|
||||
id: z.number().int().nullable(),
|
||||
@@ -36,5 +44,9 @@ export const OfficeContactAggregateResultSchema = z.object({ _count: z.object({
|
||||
dentistName: z.string().nullable(),
|
||||
phoneNumber: z.string().nullable(),
|
||||
email: z.string().nullable(),
|
||||
fax: z.string().nullable()
|
||||
fax: z.string().nullable(),
|
||||
streetAddress: z.string().nullable(),
|
||||
city: z.string().nullable(),
|
||||
state: z.string().nullable(),
|
||||
zipCode: z.string().nullable()
|
||||
}).nullable().optional()});
|
||||
@@ -8,5 +8,9 @@ export const OfficeContactCreateResultSchema = z.object({
|
||||
phoneNumber: z.string().optional(),
|
||||
email: z.string().optional(),
|
||||
fax: z.string().optional(),
|
||||
streetAddress: z.string().optional(),
|
||||
city: z.string().optional(),
|
||||
state: z.string().optional(),
|
||||
zipCode: z.string().optional(),
|
||||
user: z.unknown()
|
||||
});
|
||||
@@ -8,5 +8,9 @@ export const OfficeContactDeleteResultSchema = z.nullable(z.object({
|
||||
phoneNumber: z.string().optional(),
|
||||
email: z.string().optional(),
|
||||
fax: z.string().optional(),
|
||||
streetAddress: z.string().optional(),
|
||||
city: z.string().optional(),
|
||||
state: z.string().optional(),
|
||||
zipCode: z.string().optional(),
|
||||
user: z.unknown()
|
||||
}));
|
||||
@@ -8,5 +8,9 @@ export const OfficeContactFindFirstResultSchema = z.nullable(z.object({
|
||||
phoneNumber: z.string().optional(),
|
||||
email: z.string().optional(),
|
||||
fax: z.string().optional(),
|
||||
streetAddress: z.string().optional(),
|
||||
city: z.string().optional(),
|
||||
state: z.string().optional(),
|
||||
zipCode: z.string().optional(),
|
||||
user: z.unknown()
|
||||
}));
|
||||
@@ -9,6 +9,10 @@ export const OfficeContactFindManyResultSchema = z.object({
|
||||
phoneNumber: z.string().optional(),
|
||||
email: z.string().optional(),
|
||||
fax: z.string().optional(),
|
||||
streetAddress: z.string().optional(),
|
||||
city: z.string().optional(),
|
||||
state: z.string().optional(),
|
||||
zipCode: z.string().optional(),
|
||||
user: z.unknown()
|
||||
})),
|
||||
pagination: z.object({
|
||||
|
||||
@@ -8,5 +8,9 @@ export const OfficeContactFindUniqueResultSchema = z.nullable(z.object({
|
||||
phoneNumber: z.string().optional(),
|
||||
email: z.string().optional(),
|
||||
fax: z.string().optional(),
|
||||
streetAddress: z.string().optional(),
|
||||
city: z.string().optional(),
|
||||
state: z.string().optional(),
|
||||
zipCode: z.string().optional(),
|
||||
user: z.unknown()
|
||||
}));
|
||||
@@ -8,6 +8,10 @@ export const OfficeContactGroupByResultSchema = z.array(z.object({
|
||||
phoneNumber: z.string(),
|
||||
email: z.string(),
|
||||
fax: z.string(),
|
||||
streetAddress: z.string(),
|
||||
city: z.string(),
|
||||
state: z.string(),
|
||||
zipCode: z.string(),
|
||||
_count: z.object({
|
||||
id: z.number(),
|
||||
userId: z.number(),
|
||||
@@ -17,6 +21,10 @@ export const OfficeContactGroupByResultSchema = z.array(z.object({
|
||||
phoneNumber: z.number(),
|
||||
email: z.number(),
|
||||
fax: z.number(),
|
||||
streetAddress: z.number(),
|
||||
city: z.number(),
|
||||
state: z.number(),
|
||||
zipCode: z.number(),
|
||||
user: z.number()
|
||||
}).optional(),
|
||||
_sum: z.object({
|
||||
@@ -35,7 +43,11 @@ export const OfficeContactGroupByResultSchema = z.array(z.object({
|
||||
dentistName: z.string().nullable(),
|
||||
phoneNumber: z.string().nullable(),
|
||||
email: z.string().nullable(),
|
||||
fax: z.string().nullable()
|
||||
fax: z.string().nullable(),
|
||||
streetAddress: z.string().nullable(),
|
||||
city: z.string().nullable(),
|
||||
state: z.string().nullable(),
|
||||
zipCode: z.string().nullable()
|
||||
}).nullable().optional(),
|
||||
_max: z.object({
|
||||
id: z.number().int().nullable(),
|
||||
@@ -45,6 +57,10 @@ export const OfficeContactGroupByResultSchema = z.array(z.object({
|
||||
dentistName: z.string().nullable(),
|
||||
phoneNumber: z.string().nullable(),
|
||||
email: z.string().nullable(),
|
||||
fax: z.string().nullable()
|
||||
fax: z.string().nullable(),
|
||||
streetAddress: z.string().nullable(),
|
||||
city: z.string().nullable(),
|
||||
state: z.string().nullable(),
|
||||
zipCode: z.string().nullable()
|
||||
}).nullable().optional()
|
||||
}));
|
||||
@@ -8,5 +8,9 @@ export const OfficeContactUpdateResultSchema = z.nullable(z.object({
|
||||
phoneNumber: z.string().optional(),
|
||||
email: z.string().optional(),
|
||||
fax: z.string().optional(),
|
||||
streetAddress: z.string().optional(),
|
||||
city: z.string().optional(),
|
||||
state: z.string().optional(),
|
||||
zipCode: z.string().optional(),
|
||||
user: z.unknown()
|
||||
}));
|
||||
@@ -8,5 +8,9 @@ export const OfficeContactUpsertResultSchema = z.object({
|
||||
phoneNumber: z.string().optional(),
|
||||
email: z.string().optional(),
|
||||
fax: z.string().optional(),
|
||||
streetAddress: z.string().optional(),
|
||||
city: z.string().optional(),
|
||||
state: z.string().optional(),
|
||||
zipCode: z.string().optional(),
|
||||
user: z.unknown()
|
||||
});
|
||||
@@ -9,6 +9,10 @@ export const OfficeContactInputSchema = z.object({
|
||||
phoneNumber: z.string().optional().nullable(),
|
||||
email: z.string().optional().nullable(),
|
||||
fax: z.string().optional().nullable(),
|
||||
streetAddress: z.string().optional().nullable(),
|
||||
city: z.string().optional().nullable(),
|
||||
state: z.string().optional().nullable(),
|
||||
zipCode: z.string().optional().nullable(),
|
||||
user: z.unknown()
|
||||
}).strict();
|
||||
|
||||
|
||||
@@ -9,6 +9,10 @@ export const OfficeContactModelSchema = z.object({
|
||||
phoneNumber: z.string().nullable(),
|
||||
email: z.string().nullable(),
|
||||
fax: z.string().nullable(),
|
||||
streetAddress: z.string().nullable(),
|
||||
city: z.string().nullable(),
|
||||
state: z.string().nullable(),
|
||||
zipCode: z.string().nullable(),
|
||||
user: z.unknown()
|
||||
}).strict();
|
||||
|
||||
|
||||
@@ -9,6 +9,10 @@ export const OfficeContactResultSchema = z.object({
|
||||
phoneNumber: z.string().nullable(),
|
||||
email: z.string().nullable(),
|
||||
fax: z.string().nullable(),
|
||||
streetAddress: z.string().nullable(),
|
||||
city: z.string().nullable(),
|
||||
state: z.string().nullable(),
|
||||
zipCode: z.string().nullable(),
|
||||
user: z.unknown()
|
||||
}).strict();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user