fix
Some checks failed
CI and deploy / migration-check (push) Failing after 18s
CI and deploy / deploy (push) Has been skipped

This commit is contained in:
Dusan Vojacek
2026-04-27 18:48:04 +02:00
parent e96bb75b87
commit 30585c9779
4 changed files with 89 additions and 11 deletions

View File

@@ -270,6 +270,18 @@ export async function getSitePrices(siteId: number, date: string): Promise<SiteE
return Array.isArray(data) ? data : []
}
export async function getSitePricesSlotsRange(
siteId: number,
fromIso: string,
toIso: string,
): Promise<SiteEffectivePriceRowDto[]> {
const { data } = await client.get<{ slots?: SiteEffectivePriceRowDto[] }>(
`/sites/${siteId}/prices/slots`,
{ params: { from: fromIso, to: toIso }, timeout: 60_000 },
)
return Array.isArray(data?.slots) ? data.slots : []
}
export type ForecastPvIntervalRow = {
interval_start: string
power_w?: number | string | null