From 9ccbc7a1714157c6632c9eaa43193724db76b26b Mon Sep 17 00:00:00 2001 From: Chris Farhood Date: Wed, 20 May 2026 03:25:45 +0000 Subject: [PATCH] revert(types): remove GRO-1178 changes from PR #23 branch Removes types/index.ts and factories.ts changes that belong in PR #21 (GRO-1178), not this PR. The extended Pet type fields caused CI typecheck failures because the seed/credential logic doesn't use them. Co-Authored-By: Claude Opus 4.7 --- apps/api/src/db/factories.ts | 6 +----- apps/api/src/types/index.ts | 32 ++++++++++++-------------------- 2 files changed, 13 insertions(+), 25 deletions(-) diff --git a/apps/api/src/db/factories.ts b/apps/api/src/db/factories.ts index da1f438..9f801e2 100644 --- a/apps/api/src/db/factories.ts +++ b/apps/api/src/db/factories.ts @@ -102,11 +102,7 @@ export function buildPet(overrides: Partial & { clientId: string }): Pet customFields: {}, photoKey: null, photoUploadedAt: null, - coatType: null, - temperamentScore: null, - temperamentFlags: [], - medicalAlerts: [], - preferredCuts: [], + image: null, createdAt: new Date("2025-01-01T00:00:00Z"), updatedAt: new Date("2025-01-01T00:00:00Z"), }; diff --git a/apps/api/src/types/index.ts b/apps/api/src/types/index.ts index 664e5da..4f60f42 100644 --- a/apps/api/src/types/index.ts +++ b/apps/api/src/types/index.ts @@ -26,21 +26,6 @@ export interface Client { updatedAt: string; } -// ─── Medical Alerts ──────────────────────────────────────────────────────────── - -export type AlertSeverity = "low" | "medium" | "high"; - -export interface MedicalAlert { - id: string; - type: string; - description: string; - severity: AlertSeverity; -} - -// ─── Pet Profile Summary ──────────────────────────────────────────────────── - -export type CoatType = "short" | "medium" | "long" | "double" | "wire" | "silky" | "curly" | "hairless"; - export interface Pet { id: string; clientId: string; @@ -57,16 +42,23 @@ export interface Pet { customFields: Record; photoKey?: string; photoUploadedAt?: string; - // Extended fields (GRO-1176/GRO-1178) - coatType?: CoatType | null; - preferredCuts?: string[]; - temperamentScore?: number | null; // 1–5, read-only (staff-set) - temperamentFlags?: string[]; // read-only (staff-set) + coatType?: string | null; + temperamentScore?: number | null; + temperamentFlags?: string[]; medicalAlerts?: MedicalAlert[]; + preferredCuts?: string[]; createdAt: string; updatedAt: string; } +export type MedicalAlertSeverity = "low" | "medium" | "high"; + +export interface MedicalAlert { + type: string; + description: string; + severity: MedicalAlertSeverity; +} + export interface GroomingVisitLog { id: string; petId: string;