3x-ui/frontend/src/schemas
MHSanaei c16fb93899
fix(frontend): allow null slices in client/summary schemas
Go's encoding/json emits nil []T as null, not []. The initial
ClientPageResponseSchema and ClientHydrateSchema rejected null
inboundIds / summary.online / summary.depleted / etc., causing
[zod] warnings on every empty list.

Add nullableStringArray / nullableNumberArray helpers that accept
null and transform to [] so consuming code keeps seeing arrays.
Mark ClientRecord.traffic and .reverse nullable too (reverse is
explicitly null in MarshalJSON when storage is empty).
2026-05-25 16:30:48 +02:00
..
_envelope.ts feat(frontend): add Zod runtime validation at API boundary 2026-05-25 16:02:27 +02:00
client.ts fix(frontend): allow null slices in client/summary schemas 2026-05-25 16:30:48 +02:00
defaults.ts feat(frontend): extend Zod validation to remaining query/mutation hooks 2026-05-25 16:14:00 +02:00
inbound.ts feat(frontend): extend Zod validation to remaining query/mutation hooks 2026-05-25 16:14:00 +02:00
login.ts feat(frontend): add Zod runtime validation at API boundary 2026-05-25 16:02:27 +02:00
node.ts feat(frontend): extend Zod validation to remaining query/mutation hooks 2026-05-25 16:14:00 +02:00
setting.ts feat(frontend): add Zod runtime validation at API boundary 2026-05-25 16:02:27 +02:00
status.ts feat(frontend): add Zod runtime validation at API boundary 2026-05-25 16:02:27 +02:00
xray.ts feat(frontend): extend Zod validation to remaining query/mutation hooks 2026-05-25 16:14:00 +02:00