refactor(validations): split lib/validations.ts into a barrel'd folder (slice 1)
1141-line lib/validations.ts → lib/validations/<feature>.ts + primitives.ts + an index.ts barrel. '@/lib/validations' now resolves to the barrel, so all 40 importers are untouched. Every one of the 143 exports is preserved verbatim (verified by symbol-diff); schemas moved unchanged. tsc 0, 635 tests green. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
c8c60358c7
commit
18d5e22ad4
@@ -0,0 +1,19 @@
|
||||
import { z } from 'zod'
|
||||
|
||||
export const uuidSchema = z.string().uuid('Invalid ID format')
|
||||
|
||||
export const bulkMemberIdsSchema = z
|
||||
.array(z.string().uuid('Invalid member ID'))
|
||||
.min(1, 'Select at least one member')
|
||||
.max(1000)
|
||||
|
||||
// Stripe dues config (admin). Secret fields are write-only: omitted/blank
|
||||
// means "keep the stored one". prices maps a membership tier -> Stripe Price.
|
||||
export const stripeSettingsSchema = z.object({
|
||||
mode: z.enum(['test', 'live']),
|
||||
publishable_key: z.string().trim().max(255).optional().nullable(),
|
||||
secret_key: z.string().trim().max(255).optional().nullable(),
|
||||
webhook_secret: z.string().trim().max(255).optional().nullable(),
|
||||
grace_days: z.number().int().min(0).max(90).optional().default(7),
|
||||
prices: z.record(z.string().trim().max(255)).optional().default({}),
|
||||
})
|
||||
Reference in New Issue
Block a user