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:
Gitead
2026-05-11 23:18:04 -04:00
parent 11244ace7f
commit 7929dc6e19
56 changed files with 763 additions and 46 deletions

View File

@@ -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()});

View File

@@ -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()
});

View File

@@ -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()
}));

View File

@@ -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()
}));

View File

@@ -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({

View File

@@ -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()
}));

View File

@@ -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()
}));

View File

@@ -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()
}));

View File

@@ -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()
});