feat: add weather widget (#286)

* feat: add nestjs replacement, remove nestjs

* feat: add weather widget

* fix: lock issue

* fix: format issue

* fix: deepsource issues

* fix: change timezone to auto
This commit is contained in:
Meier Lukas
2024-04-13 11:34:55 +02:00
committed by GitHub
parent 7fb0decd5b
commit 80d2d485b8
19 changed files with 762 additions and 13 deletions

View File

@@ -0,0 +1,5 @@
import { weatherWidgetSchemas } from "./weather";
export const widgetSchemas = {
weather: weatherWidgetSchemas,
};

View File

@@ -0,0 +1,24 @@
import { z } from "zod";
export const atLocationInput = z.object({
longitude: z.number(),
latitude: z.number(),
});
export const atLocationOutput = z.object({
current_weather: z.object({
weathercode: z.number(),
temperature: z.number(),
}),
daily: z.object({
time: z.array(z.string()),
weathercode: z.array(z.number()),
temperature_2m_max: z.array(z.number()),
temperature_2m_min: z.array(z.number()),
}),
});
export const weatherWidgetSchemas = {
atLocationInput,
atLocationOutput,
};