mirror of
https://github.com/ajnart/homarr.git
synced 2026-01-30 11:19:12 +01:00
* feat: add nestjs replacement, remove nestjs * feat: add weather widget * fix: lock issue * fix: format issue * fix: deepsource issues * fix: change timezone to auto
27 lines
507 B
TypeScript
27 lines
507 B
TypeScript
import { z } from "zod";
|
|
|
|
const citySchema = z.object({
|
|
id: z.number(),
|
|
name: z.string(),
|
|
country: z.string().optional(),
|
|
country_code: z.string().optional(),
|
|
latitude: z.number(),
|
|
longitude: z.number(),
|
|
population: z.number().optional(),
|
|
});
|
|
|
|
const searchCityInput = z.object({
|
|
query: z.string(),
|
|
});
|
|
|
|
const searchCityOutput = z.object({
|
|
results: z.array(citySchema),
|
|
});
|
|
|
|
export const locationSchemas = {
|
|
searchCity: {
|
|
input: searchCityInput,
|
|
output: searchCityOutput,
|
|
},
|
|
};
|