refactor(clients): strip yacht/company/proxy fields from validator

Remove deprecated companyName, isProxy, proxyType, actualOwnerName, yacht
dimensions, and berthSizeDesired fields from createClientSchema and the
isProxy filter from listClientsSchema. First step of PR 8; cascading TS
errors in clients.service.ts and client-form.tsx are addressed in 8.2/8.3.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Matt Ciaccio
2026-04-24 14:25:10 +02:00
parent ddcffe9f6f
commit 367fc9800e
2 changed files with 11 additions and 18 deletions

View File

@@ -62,12 +62,19 @@ describe('createClientSchema', () => {
it('accepts optional fields', () => {
const result = createClientSchema.safeParse({
...validClient,
companyName: 'ACME',
nationality: 'AU',
source: 'manual' as const,
});
expect(result.success).toBe(true);
});
it('accepts minimal valid input (no deprecated yacht/company fields)', () => {
const result = createClientSchema.safeParse({
fullName: 'Alice',
contacts: [{ channel: 'email', value: 'a@example.com' }],
});
expect(result.success).toBe(true);
});
});
describe('updateClientSchema (partial)', () => {