dalsi uprava vypoctu delty (ignorujeme orezane vyroby)
This commit is contained in:
@@ -1,7 +1,10 @@
|
||||
import axios, { type AxiosInstance } from 'axios'
|
||||
|
||||
import type { FullStatusResponse } from '../types/fullStatus'
|
||||
import type { SiteConfigurationResponse } from '../types/siteConfiguration'
|
||||
import type {
|
||||
SiteConfigurationResponse,
|
||||
SitePvForecastCalibrationRow,
|
||||
} from '../types/siteConfiguration'
|
||||
import type { Notification } from '../types/dashboard'
|
||||
import type { CurrentPlanResponse, RunPlanResponse } from '../types/plan'
|
||||
|
||||
@@ -59,6 +62,28 @@ export async function getSiteConfiguration(siteId: number): Promise<SiteConfigur
|
||||
return data
|
||||
}
|
||||
|
||||
/** PATCH /sites/{id}/configuration/pv-forecast-calibration — pouze uvedená pole. */
|
||||
export type PvForecastCalibrationPatchPayload = {
|
||||
delta_learn_min_ts?: string
|
||||
pv_curtailment_policy_effective_from?: string | null
|
||||
top_n_days?: number | null
|
||||
non_top_day_factor?: number | null
|
||||
day_weight_gamma?: number | null
|
||||
half_life_days?: number | null
|
||||
threshold_w?: number | null
|
||||
}
|
||||
|
||||
export async function patchPvForecastCalibration(
|
||||
siteId: number,
|
||||
payload: PvForecastCalibrationPatchPayload,
|
||||
): Promise<SitePvForecastCalibrationRow> {
|
||||
const { data } = await client.patch<SitePvForecastCalibrationRow>(
|
||||
`/sites/${siteId}/configuration/pv-forecast-calibration`,
|
||||
payload,
|
||||
)
|
||||
return data as SitePvForecastCalibrationRow
|
||||
}
|
||||
|
||||
export type SiteNotificationsResponse = {
|
||||
notifications: Notification[]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user