happRouting.ts 634 B

12345678910111213141516
  1. import { z } from 'zod';
  2. // Extensions belong to the Happ client and must survive a trip through this editor.
  3. export const HappRoutingProfileSchema = z
  4. .object({
  5. // The backend treats null lists as absent; preserve them until explicitly edited.
  6. DirectSites: z.array(z.string()).nullish(),
  7. DirectIp: z.array(z.string()).nullish(),
  8. ProxySites: z.array(z.string()).nullish(),
  9. ProxyIp: z.array(z.string()).nullish(),
  10. BlockSites: z.array(z.string()).nullish(),
  11. BlockIp: z.array(z.string()).nullish(),
  12. })
  13. .catchall(z.unknown());
  14. export type HappRoutingProfile = z.infer<typeof HappRoutingProfileSchema>;