Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ jobs:
- name: Prepare OpenAPI spec
run: |
mkdir -p ./openapi-deploy
cp ./server/openapi.yaml ./openapi-deploy/openapi.yaml
npx --yes @redocly/cli@2 bundle ./server/openapi.yaml -o ./openapi-deploy/openapi.yaml
- name: Deploy OpenAPI spec to docs repo
uses: peaceiris/actions-gh-pages@84c30a85c19949d7eee79c4ff27748b70285e453 # v4
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/openapi-validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ on:
pull_request:
paths:
- "server/openapi.yaml"
- "server/openapi.state.yaml"
- ".github/workflows/openapi-validate.yml"

jobs:
Expand All @@ -22,4 +23,4 @@ jobs:
with:
go-version: stable
- name: Validate OpenAPI spec
run: go run github.com/getkin/kin-openapi/cmd/validate@v0.133.0 -- server/openapi.yaml
run: go run github.com/getkin/kin-openapi/cmd/validate@v0.133.0 -ext -- server/openapi.yaml
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ testdata/**/*
!assets/js/**/*.yaml
!package*.json
!evcc.dist.yaml
!server/openapi.state.yaml
!.coderabbit.yaml
!tests/**/*.evcc.yaml
!tests/**/*.tpl.yaml
Expand Down
4 changes: 1 addition & 3 deletions assets/js/components/ChargingPlans/ChargingPlan.vue
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,7 @@ import formatter from "@/mixins/formatter";
import minuteTicker from "@/mixins/minuteTicker";
import { optionStep, fmtEnergy } from "@/utils/energyOptions.ts";
import { defineComponent, type PropType } from "vue";
import type { CURRENCY, Vehicle } from "@/types/evcc";
import type { PlanStrategy } from "./types";
import type { Forecast } from "@/types/evcc.ts";
import type { CURRENCY, Forecast, PlanStrategy, Vehicle } from "@/types/evcc";

export default defineComponent({
name: "ChargingPlan",
Expand Down
8 changes: 6 additions & 2 deletions assets/js/components/ChargingPlans/ChargingPlanModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,17 @@ import GenericModal from "../Helper/GenericModal.vue";
import PlansSettings from "./PlansSettings.vue";
import api from "@/api";
import type {
CURRENCY,
Forecast,
PlanStrategy,
RepeatingPlan,
SMART_COST_TYPE,
StaticEnergyPlan,
StaticPlan,
StaticSocPlan,
} from "./types";
import type { CURRENCY, Forecast, SMART_COST_TYPE, UiLoadpoint, Vehicle } from "@/types/evcc";
UiLoadpoint,
Vehicle,
} from "@/types/evcc";

export default defineComponent({
name: "ChargingPlanModal",
Expand Down
2 changes: 1 addition & 1 deletion assets/js/components/ChargingPlans/PlanStrategy.vue
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
<script lang="ts">
import { defineComponent } from "vue";
import formatter from "@/mixins/formatter";
import type { PlanStrategy } from "./types";
import type { PlanStrategy } from "@/types/evcc";

export default defineComponent({
name: "ChargingPlanStrategy",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import PlanRepeatingSettings from "./PlanRepeatingSettings.vue";
import deepEqual from "@/utils/deepEqual";
import formatter from "@/mixins/formatter";
import { defineComponent, type PropType } from "vue";
import type { RepeatingPlan } from "./types";
import type { RepeatingPlan } from "@/types/evcc";

const DEFAULT_WEEKDAYS = [1, 2, 3, 4, 5];
const DEFAULT_TARGET_TIME = "07:00";
Expand Down
16 changes: 9 additions & 7 deletions assets/js/components/ChargingPlans/PlansSettings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -81,16 +81,18 @@ import api from "@/api";
import deepEqual from "@/utils/deepEqual";
import { debounceLeading } from "@/utils/debounceLeading";
import { defineComponent, type PropType } from "vue";
import type { Vehicle, CURRENCY, Forecast } from "@/types/evcc";
import type {
StaticPlan,
RepeatingPlan,
PlanWrapper,
StaticSocPlan,
StaticEnergyPlan,
CURRENCY,
Forecast,
PlanResponse,
PlanStrategy,
} from "./types";
PlanWrapper,
RepeatingPlan,
StaticEnergyPlan,
StaticPlan,
StaticSocPlan,
Vehicle,
} from "@/types/evcc";

export default defineComponent({
name: "ChargingPlansSettings",
Expand Down
3 changes: 1 addition & 2 deletions assets/js/components/ChargingPlans/Warnings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@
<script lang="ts">
import { defineComponent, type PropType } from "vue";
import formatter from "@/mixins/formatter";
import type { PlanWrapper } from "./types";
import type { Tariff } from "@/types/evcc";
import type { PlanWrapper, Tariff } from "@/types/evcc";

export default defineComponent({
name: "ChargingPlanWarnings",
Expand Down
39 changes: 0 additions & 39 deletions assets/js/components/ChargingPlans/types.d.ts

This file was deleted.

3 changes: 1 addition & 2 deletions assets/js/components/Forecast/Chart.vue
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,8 @@ import "chartjs-adapter-dayjs-4/dist/chartjs-adapter-dayjs-4.esm";
import { registerChartComponents, commonOptions } from "../Sessions/chartConfig";
import formatter, { POWER_UNIT } from "@/mixins/formatter";
import colors, { lighterColor } from "@/colors";
import type { CURRENCY } from "@/types/evcc";
import type { CURRENCY, ForecastSlot, SolarDetails, TimeseriesEntry } from "@/types/evcc";
import { ForecastType, highestSlotIndexByDay } from "@/utils/forecast";
import type { ForecastSlot, SolarDetails, TimeseriesEntry } from "./types";

registerChartComponents([
BarController,
Expand Down
3 changes: 1 addition & 2 deletions assets/js/components/Forecast/GridDetails.vue
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,7 @@
<script lang="ts">
import { defineComponent, type PropType } from "vue";
import formatter from "@/mixins/formatter";
import type { CURRENCY } from "@/types/evcc";
import type { ForecastSlot } from "./types";
import type { CURRENCY, ForecastSlot } from "@/types/evcc";
import { isStaticTariff } from "@/utils/forecast";
const MAX_HOURS = 96;
Expand Down
3 changes: 1 addition & 2 deletions assets/js/components/Forecast/PriceChart.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@ import {
import colors, { lighterColor } from "@/colors";
import formatter from "@/mixins/formatter";
import chartMixin from "./chartMixin";
import type { CURRENCY } from "@/types/evcc";
import type { ForecastSlot } from "./types";
import type { CURRENCY, ForecastSlot } from "@/types/evcc";
export default defineComponent({
name: "PriceChart",
Expand Down
2 changes: 1 addition & 1 deletion assets/js/components/Forecast/SolarChart.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import colors, { lighterColor } from "@/colors";
import formatter, { POWER_UNIT } from "@/mixins/formatter";
import chartMixin from "./chartMixin";
import { highestSlotIndexByDay } from "@/utils/forecast";
import type { SolarDetails, TimeseriesEntry } from "./types";
import type { SolarDetails, TimeseriesEntry } from "@/types/evcc";

export default defineComponent({
name: "SolarChart",
Expand Down
2 changes: 1 addition & 1 deletion assets/js/components/Forecast/SolarDetails.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<script lang="ts">
import { defineComponent, type PropType } from "vue";
import formatter, { POWER_UNIT } from "@/mixins/formatter";
import type { SolarDetails } from "./types";
import type { SolarDetails } from "@/types/evcc";

export default defineComponent({
name: "SolarDetails",
Expand Down
2 changes: 1 addition & 1 deletion assets/js/components/Forecast/ValueChart.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import {
import colors from "@/colors";
import formatter from "@/mixins/formatter";
import chartMixin from "./chartMixin";
import type { ForecastSlot } from "./types";
import type { ForecastSlot } from "@/types/evcc";

export type ValueChartType = "co2" | "temperature";

Expand Down
2 changes: 1 addition & 1 deletion assets/js/components/Forecast/ValueDetails.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<script lang="ts">
import { defineComponent, type PropType } from "vue";
import formatter from "@/mixins/formatter";
import type { ForecastSlot } from "./types";
import type { ForecastSlot } from "@/types/evcc";
import type { ValueChartType } from "./ValueChart.vue";

const MAX_HOURS = 96;
Expand Down
2 changes: 1 addition & 1 deletion assets/js/components/Forecast/echarts.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as echarts from "echarts/core";
import colors from "@/colors";
import escapeHtml from "@/utils/escapeHtml";
import type { ForecastSlot } from "./types";
import type { ForecastSlot } from "@/types/evcc";
import { BarChart, LineChart } from "echarts/charts";
import {
GridComponent,
Expand Down
27 changes: 0 additions & 27 deletions assets/js/components/Forecast/types.ts

This file was deleted.

2 changes: 1 addition & 1 deletion assets/js/components/Loadpoints/Loadpoint.vue
Original file line number Diff line number Diff line change
Expand Up @@ -129,9 +129,9 @@ import type {
SMART_COST_TYPE,
BATTERY_MODE,
LoadpointUi,
PlanStrategy,
LoadpointSuggestion,
} from "@/types/evcc";
import type { PlanStrategy } from "@/components/ChargingPlans/types";
export default defineComponent({
name: "Loadpoint",
Expand Down
3 changes: 1 addition & 2 deletions assets/js/components/Tariff/SmartCostLimit.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@ import { defineComponent, type PropType } from "vue";
import api from "@/api";
import { setLoadpointLastSmartCostLimit } from "@/uiLoadpoints";
import settings from "@/settings";
import { type CURRENCY, SMART_COST_TYPE } from "@/types/evcc";
import { type ForecastSlot } from "../Forecast/types";
import { type CURRENCY, type ForecastSlot, SMART_COST_TYPE } from "@/types/evcc";

export default defineComponent({
name: "SmartCostLimit",
Expand Down
2 changes: 1 addition & 1 deletion assets/js/components/Vehicles/Title.vue
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ export default defineComponent({
},
vehicleOptions(): SelectOption<string>[] {
return this.vehicles.map((v) => ({
name: v.name,
name: v.name ?? "",
value: v.title,
}));
},
Expand Down
2 changes: 1 addition & 1 deletion assets/js/components/Vehicles/Vehicle.vue
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,9 @@ import {
type VehicleStatus,
type Vehicle,
type LoadpointUi,
type PlanStrategy,
type LoadpointSuggestion,
} from "@/types/evcc";
import type { PlanStrategy } from "@/components/ChargingPlans/types";
import BatteryBoostButton from "../Loadpoints/BatteryBoostButton.vue";
import type ChargingPlanModal from "../ChargingPlans/ChargingPlanModal.vue";

Expand Down
Loading
Loading