Files
home-automation/frontend/src/api/schema.d.ts
T
tliu93 682e06d256
frontend / frontend (push) Successful in 2m4s
pytest / test (push) Successful in 7m32s
modbus: add explicit cascade delete (device + readings + toggles + HA cleanup)
A disabled device with historical readings still cannot be deleted by default
(409 guard stays, to prevent accidental data loss). A new explicit opt-in lets
the user remove it for real:

- DELETE /api/modbus/devices/{uuid}?cascade=true removes the device's readings
  and exposed_entity_toggle rows, then the device, in one transaction (FK order:
  readings before device). Best-effort clears the HA discovery configs first
  (MQTT not connected -> no-op, never blocks the delete). Default (no cascade)
  unchanged. Returns 200 with deletion counts.
- Frontend: a 'Force Delete (all data)' button appears only after the 409, with
  a red irreversible warning; cascade is sent only on that explicit action.
- Also corrected a stale comment: FK RESTRICT IS enforced at runtime now.
2026-06-24 17:38:52 +02:00

3779 lines
118 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/**
* This file was auto-generated by openapi-typescript.
* Do not make direct changes to the file.
*/
export interface paths {
"/status": {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
/** Get Status */
get: operations["get_status_status_get"];
put?: never;
post?: never;
delete?: never;
options?: never;
head?: never;
patch?: never;
trace?: never;
};
"/api/config": {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
/**
* Get Config
* @description Return all configuration sections. Secret field values are masked (empty string).
*/
get: operations["get_config_api_config_get"];
/**
* Put Config
* @description Save configuration updates.
*
* - Blank secret value keeps the existing stored value (no change).
* - Invalid values return 422 and nothing is written to the database.
* - If MQTT-related settings changed, the MQTT client reconnects automatically.
*/
put: operations["put_config_api_config_put"];
post?: never;
delete?: never;
options?: never;
head?: never;
patch?: never;
trace?: never;
};
"/api/config/smtp/test": {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
get?: never;
put?: never;
/**
* Post Smtp Test
* @description Send a test SMTP email using the current runtime settings.
*
* Returns a structured result indicating success or the category of failure.
* Three possible outcomes:
* - 200 { "result": "success", "message": ... }
* - 400 { "result": "config-error", "message": ... } (EmailConfigurationError)
* - 502 { "result": "failed", "message": ... } (EmailDeliveryError)
*
* SMTP credentials are never echoed in the response.
*/
post: operations["post_smtp_test_api_config_smtp_test_post"];
delete?: never;
options?: never;
head?: never;
patch?: never;
trace?: never;
};
"/api/config/mqtt/test": {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
get?: never;
put?: never;
/**
* Post Mqtt Test
* @description Test MQTT broker connectivity by attempting to connect and publishing a
* test message to ``<ha_discovery_prefix>/home-automation/test``.
*
* The message is visible in MQTT Explorer (or any subscriber) so users can
* confirm the full broker publish path is working.
*
* Three possible outcomes:
* - 200 { "result": "success", "message": ... }
* - 400 { "result": "config-error", "message": ... } (not configured)
* - 502 { "result": "failed", "message": ... } (connection/publish error)
*
* MQTT credentials are never echoed in the response.
*/
post: operations["post_mqtt_test_api_config_mqtt_test_post"];
delete?: never;
options?: never;
head?: never;
patch?: never;
trace?: never;
};
"/api/locations": {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
/**
* Get Locations
* @description Return location records with optional time-window filtering and pagination.
*
* - ``start`` / ``end`` are ISO8601 strings; filtering is **inclusive** on both bounds.
* - Results are ordered by ``datetime`` ascending.
* - ``limit`` is capped at 5000 to prevent full-table exports.
*/
get: operations["get_locations_api_locations_get"];
put?: never;
post?: never;
delete?: never;
options?: never;
head?: never;
patch?: never;
trace?: never;
};
"/api/poo": {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
/**
* Get Poo
* @description Return poo records ordered by timestamp descending (most recent first).
*
* ``limit`` is capped at 1000 to prevent full-table exports.
*/
get: operations["get_poo_api_poo_get"];
put?: never;
post?: never;
delete?: never;
options?: never;
head?: never;
patch?: never;
trace?: never;
};
"/api/public-ip": {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
/**
* Get Public Ip
* @description Return the current public IP state and recent history.
*
* - ``state`` is ``null`` if no IP check has been performed yet.
* - ``history`` is ordered by ``observed_at`` descending (most recent first).
* - ``limit`` applies to the history list and is capped at 1000.
*/
get: operations["get_public_ip_api_public_ip_get"];
put?: never;
post?: never;
delete?: never;
options?: never;
head?: never;
patch?: never;
trace?: never;
};
"/api/locations/{person}/{datetime}": {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
get?: never;
put?: never;
post?: never;
/**
* Delete Location Record
* @description Delete the single location record identified by its composite PK.
*
* - Exactly one row is deleted; **404** if the PK does not exist.
* - No batch delete / truncate path is available.
*/
delete: operations["delete_location_record_api_locations__person___datetime__delete"];
options?: never;
head?: never;
/**
* Patch Location
* @description Update the non-PK fields of a single location record.
*
* - ``person`` and ``datetime`` identify the row (composite PK) and are immutable.
* - Only ``latitude``, ``longitude``, and ``altitude`` may be updated.
* - Omitted body fields are left unchanged.
* - Returns **404** if the PK does not exist.
*/
patch: operations["patch_location_api_locations__person___datetime__patch"];
trace?: never;
};
"/api/poo/{timestamp}": {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
get?: never;
put?: never;
post?: never;
/**
* Delete Poo
* @description Delete the single poo record identified by its PK.
*
* - Exactly one row is deleted; **404** if the PK does not exist.
* - No batch delete / truncate path is available.
*/
delete: operations["delete_poo_api_poo__timestamp__delete"];
options?: never;
head?: never;
/**
* Patch Poo
* @description Update the non-PK fields of a single poo record.
*
* - ``timestamp`` is the PK and is immutable.
* - Only ``status``, ``latitude``, and ``longitude`` may be updated.
* - Omitted body fields are left unchanged.
* - Returns **404** if the PK does not exist.
*/
patch: operations["patch_poo_api_poo__timestamp__patch"];
trace?: never;
};
"/api/energy/prices": {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
/**
* Get Prices
* @description Return the price curve for the active contract.
*
* **Tibber contracts** (kind="tibber"):
* Fetches ``tibber_price`` rows within ``[start, end]``, ordered ascending
* by ``starts_at``. At most ``limit`` rows are returned (most recent first
* within the window, then reversed to ascending order — identical to the
* modbus readings pattern).
*
* Response ``points`` carries per-slot:
* - ``buy = total`` (Tibber all-inclusive price)
* - ``sell = total energy_tax sell_adjust`` (from active version values)
* - ``level`` (Tibber price level, may be null)
*
* ``tariff`` is null.
*
* **Manual contracts** (kind="manual"):
* ``points`` is empty. ``tariff`` carries the four effective prices
* derived using the billing engine formula:
* - ``buy_dal = energy.buy.dal + energy_tax + ode``
* - ``buy_normal = energy.buy.normal + energy_tax + ode``
* - ``sell_dal = energy.sell.dal``
* - ``sell_normal = energy.sell.normal``
*
* **No active contract**: returns kind=null, currency="EUR", points=[], tariff=null (200).
*/
get: operations["get_prices_api_energy_prices_get"];
put?: never;
post?: never;
delete?: never;
options?: never;
head?: never;
patch?: never;
trace?: never;
};
"/api/energy/costs": {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
/**
* Get Costs
* @description Return energy_cost_period rows within a time window.
*
* Rows are ordered by ``period_start`` ascending. When the window contains
* more rows than ``limit``, the **most recent** N rows are returned (DESC LIMIT),
* then reversed to ascending order — identical to the modbus readings pattern.
*
* Query parameters:
* - ``start``: inclusive lower bound on ``period_start`` (ISO 8601 datetime).
* - ``end``: inclusive upper bound on ``period_start`` (ISO 8601 datetime).
* - ``limit``: max rows to return (default 500, max {_COSTS_LIMIT_MAX}).
*/
get: operations["get_costs_api_energy_costs_get"];
put?: never;
post?: never;
delete?: never;
options?: never;
head?: never;
patch?: never;
trace?: never;
};
"/api/energy/costs/summary": {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
/**
* Get Costs Summary
* @description Aggregate billing for a time interval.
*
* Calls ``energy_cost.summarize(session, start, end)`` which computes:
*
* total_payable = Σ(net_cost) + fixed_costs credits
*
* where ``fixed_costs`` is (network_fee + management_fee) apportioned to the
* interval length in days (÷30 per month), and ``credits`` is heffingskorting
* apportioned similarly (÷365 per year).
*
* Both ``fixed_costs`` and ``credits`` are derived from the **currently active
* contract version at ``end``**. When no active contract exists they are 0.
*/
get: operations["get_costs_summary_api_energy_costs_summary_get"];
put?: never;
post?: never;
delete?: never;
options?: never;
head?: never;
patch?: never;
trace?: never;
};
"/api/energy/dsmr/latest": {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
/**
* Get Dsmr Latest
* @description Return the most recent dsmr_reading row.
*
* Returns ``{"found": false, "recorded_at": null, "payload": null}`` (200, not
* 404) when no rows exist yet, so the front-end can distinguish "no data" from
* a server error.
*/
get: operations["get_dsmr_latest_api_energy_dsmr_latest_get"];
put?: never;
post?: never;
delete?: never;
options?: never;
head?: never;
patch?: never;
trace?: never;
};
"/api/energy/costs/recompute": {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
get?: never;
put?: never;
/**
* Post Recompute
* @description Idempotently recompute billing records in a time window.
*
* Calls ``energy_cost.recompute_range(session, start, end)`` which overwrites
* existing rows (including successful ones) for every UTC quarter-hour boundary
* in ``[start, end)``.
*
* **Idempotency**: repeated calls with the same window produce the same
* outcome. No rows are deleted; only upserted.
*
* **Window constraint**: the maximum allowed range is {_RECOMPUTE_MAX_DAYS} days.
* Requests exceeding this return 422.
*
* Returns the number of periods for which a billing record was written.
* Periods skipped due to missing contract or missing Tibber price are not counted.
*/
post: operations["post_recompute_api_energy_costs_recompute_post"];
delete?: never;
options?: never;
head?: never;
patch?: never;
trace?: never;
};
"/api/energy/tibber/test": {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
get?: never;
put?: never;
/**
* Post Tibber Test
* @description Test Tibber API connectivity by fetching the current price point.
*
* Three possible outcomes:
*
* - **200** ``{ result: "success", message: ..., price: {...} }``
* The Tibber API responded with a valid current price. ``price`` contains
* starts_at, total, energy, tax, currency, and level.
*
* - **400** ``{ result: "config-error", message: ... }``
* The Tibber API token is empty or not configured.
*
* - **502** ``{ result: "failed", message: ... }``
* The API call failed (authentication rejected, network error, timeout,
* unexpected response, etc.).
*
* The API token is **never** included in the response body or logged.
*/
post: operations["post_tibber_test_api_energy_tibber_test_post"];
delete?: never;
options?: never;
head?: never;
patch?: never;
trace?: never;
};
"/api/energy/profiles": {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
/**
* Get Profiles
* @description List all available pricing profile structures.
*
* Returns the full profile structure for each supported contract kind
* (``manual`` and ``tibber``). The front-end uses this to dynamically
* render the correct fields and labels for the contract creation/editing form.
*/
get: operations["get_profiles_api_energy_profiles_get"];
put?: never;
post?: never;
delete?: never;
options?: never;
head?: never;
patch?: never;
trace?: never;
};
"/api/energy/contracts": {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
/**
* List Energy Contracts
* @description List all energy contracts with their active status.
*
* Returns a flat list (no embedded version history); use
* GET /api/energy/contracts/{id} to fetch the full version history for a
* specific contract.
*/
get: operations["list_energy_contracts_api_energy_contracts_get"];
put?: never;
/**
* Create Energy Contract
* @description Create a new energy contract with an initial pricing version.
*
* The ``values`` dict is validated against the YAML profile for the given
* ``kind``; non-conforming values result in 422 Unprocessable Entity.
* The new contract is created with ``active=False``; use
* PATCH /api/energy/contracts/{id} with ``active=true`` to activate it.
*/
post: operations["create_energy_contract_api_energy_contracts_post"];
delete?: never;
options?: never;
head?: never;
patch?: never;
trace?: never;
};
"/api/energy/contracts/{contract_id}": {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
/**
* Get Energy Contract
* @description Return a single energy contract with its full version history.
*
* Versions are ordered by ``effective_from`` ascending so the caller can
* easily inspect the pricing timeline.
*/
get: operations["get_energy_contract_api_energy_contracts__contract_id__get"];
put?: never;
post?: never;
delete?: never;
options?: never;
head?: never;
/**
* Patch Energy Contract
* @description Partially update a contract: rename or change activation status.
*
* - ``name``: updates the human-readable label.
* - ``active=true``: activates this contract (all others are deactivated).
* - ``active=false``: deactivates this contract (no effect on others).
*
* At most one contract may be active at any time; the service layer enforces
* mutual exclusion.
*/
patch: operations["patch_energy_contract_api_energy_contracts__contract_id__patch"];
trace?: never;
};
"/api/energy/contracts/{contract_id}/versions": {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
get?: never;
put?: never;
/**
* Add Contract Version
* @description Add a new pricing version to an existing contract.
*
* This is how price changes are recorded: the current open version is
* automatically closed (its ``effective_to`` is set to ``body.effective_from``)
* and a new version is created starting at ``body.effective_from``.
*
* The ``values`` dict must conform to the contract's pricing profile.
* Non-conforming values return 422. If ``effective_from`` is not strictly
* after the previous version's ``effective_from``, 422 is returned without
* writing any rows.
*
* Historical versions are never modified; this endpoint is append-only.
*/
post: operations["add_contract_version_api_energy_contracts__contract_id__versions_post"];
delete?: never;
options?: never;
head?: never;
patch?: never;
trace?: never;
};
"/api/expose": {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
/**
* Get Expose
* @description Return the full exposable-entity catalog with toggle states and MQTT status.
*
* The catalog is computed dynamically from registered providers (e.g. the
* Modbus provider enumerates all enabled devices and their metric entities).
* Toggle states come from the ``exposed_entity_toggle`` table; entities with
* no row default to ``enabled=False``.
*/
get: operations["get_expose_api_expose_get"];
/**
* Put Expose
* @description Set per-entity toggle state.
*
* Accepts a map of ``{key: bool}`` and upserts rows in the
* ``exposed_entity_toggle`` table. Only keys present in ``body.toggles``
* are touched; other entities' toggles are left unchanged.
*
* After writing the toggles, triggers a HA Discovery re-publish so any
* changes (enabled ↔ disabled) are reflected in Home Assistant immediately.
*/
put: operations["put_expose_api_expose_put"];
post?: never;
delete?: never;
options?: never;
head?: never;
patch?: never;
trace?: never;
};
"/api/expose/republish": {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
get?: never;
put?: never;
/**
* Post Expose Republish
* @description Manually trigger a full HA Discovery re-publish.
*
* Calls ``publish_discovery(session)`` from the HA discovery service (M5-T11).
* Returns a status indicating whether the publish was attempted (or skipped
* because MQTT / discovery is not enabled / connected).
*/
post: operations["post_expose_republish_api_expose_republish_post"];
delete?: never;
options?: never;
head?: never;
patch?: never;
trace?: never;
};
"/api/modbus/profiles": {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
/**
* Get Profiles
* @description List all available Modbus YAML profiles (name + description).
*
* Intended for the front-end's device-creation profile drop-down.
*/
get: operations["get_profiles_api_modbus_profiles_get"];
put?: never;
post?: never;
delete?: never;
options?: never;
head?: never;
patch?: never;
trace?: never;
};
"/api/modbus/devices": {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
/**
* List Devices
* @description Return all Modbus devices (no pagination — device counts stay small).
*/
get: operations["list_devices_api_modbus_devices_get"];
put?: never;
/**
* Create Device
* @description Create a new Modbus device.
*
* - Validates that the referenced ``profile`` exists; returns 422 if not.
* - Returns 201 with the created device on success.
*/
post: operations["create_device_api_modbus_devices_post"];
delete?: never;
options?: never;
head?: never;
patch?: never;
trace?: never;
};
"/api/modbus/devices/{uuid}": {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
/**
* Get Device
* @description Return a single Modbus device by UUID.
*/
get: operations["get_device_api_modbus_devices__uuid__get"];
put?: never;
post?: never;
/**
* Delete Device
* @description Delete a Modbus device.
*
* **Default behaviour (cascade=false)**:
* Returns 409 Conflict if the device has any associated readings; use
* ``enabled=false`` to disable it instead.
*
* **Cascade delete (cascade=true)**:
* Permanently deletes the device together with all its readings and any
* ``ExposedEntityToggle`` rows whose key matches ``modbus.<uuid>.*``.
* Also makes a best-effort attempt to clear the device's HA Discovery
* config topics from MQTT (empty retained payload) before the DB rows
* are removed. MQTT failures are swallowed — the DB deletion proceeds
* regardless.
* Returns HTTP 200 with a ``ModbusDeleteResponse`` JSON body on success.
*
* **Application-layer safety**: the 409 guard uses an explicit SELECT COUNT
* query to return a friendly message. FK RESTRICT is enforced at runtime
* (the app sets ``PRAGMA foreign_keys=ON``), so the cascade path deletes
* readings before the device.
*/
delete: operations["delete_device_api_modbus_devices__uuid__delete"];
options?: never;
head?: never;
/**
* Patch Device
* @description Partially update a Modbus device (including enable/disable).
*
* Only fields explicitly provided in the request body are updated.
* Providing ``profile`` triggers a profile-existence check (422 if unknown).
*/
patch: operations["patch_device_api_modbus_devices__uuid__patch"];
trace?: never;
};
"/api/modbus/devices/{uuid}/latest": {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
/**
* Get Latest Reading
* @description Return the most recent reading for a device.
*
* If no readings exist yet, returns ``{"found": false, "recorded_at": null,
* "payload": null}`` (200, not 404) so the front-end can distinguish
* "device exists but has no data" from "device not found".
*/
get: operations["get_latest_reading_api_modbus_devices__uuid__latest_get"];
put?: never;
post?: never;
delete?: never;
options?: never;
head?: never;
patch?: never;
trace?: never;
};
"/api/modbus/devices/{uuid}/readings": {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
/**
* Get Readings
* @description Return time-range readings for a device.
*
* When the window contains more rows than ``limit``, the **most recent** N rows
* are returned (``ORDER BY recorded_at DESC LIMIT n``), then reversed to
* ascending order before being sent to the client. This ensures that for long
* time-range requests (e.g. 6 h / 24 h) the caller always sees the latest data
* rather than the oldest segment of the window.
*
* When the window has fewer rows than ``limit`` the full window is returned in
* ascending order — behaviour is identical to a plain ascending query.
*
* The response schema is unchanged: items are always ``recorded_at`` ascending.
*
* The query uses the ``(device_id, recorded_at)`` composite index for
* efficient time-window scans.
*
* Query parameters:
* - ``start``: inclusive lower bound (ISO8601 datetime)
* - ``end``: inclusive upper bound (ISO8601 datetime)
* - ``limit``: max rows to return (default 500, max {_READINGS_LIMIT_MAX})
*/
get: operations["get_readings_api_modbus_devices__uuid__readings_get"];
put?: never;
post?: never;
delete?: never;
options?: never;
head?: never;
patch?: never;
trace?: never;
};
"/api/modbus/devices/{uuid}/metrics": {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
/**
* Get Metrics
* @description Return the metric catalogue for a device's profile.
*
* Each entry has ``key``, ``label`` (derived from key if the profile has
* none — underscores → spaces, title-cased), ``unit``, and ``device_class``.
* This is the authoritative metadata source for front-end card labels and
* chart axis labels.
*/
get: operations["get_metrics_api_modbus_devices__uuid__metrics_get"];
put?: never;
post?: never;
delete?: never;
options?: never;
head?: never;
patch?: never;
trace?: never;
};
"/api/modbus/devices/{uuid}/test": {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
get?: never;
put?: never;
/**
* Test Read
* @description Immediately read and decode the device once without persisting any data.
*
* Useful for validating gateway connectivity and Modbus address settings
* before relying on the background polling job.
*
* This is a write-class endpoint (it initiates network I/O on demand) and
* therefore requires a CSRF token. The response payload is never stored.
*/
post: operations["test_read_api_modbus_devices__uuid__test_post"];
delete?: never;
options?: never;
head?: never;
patch?: never;
trace?: never;
};
"/api/session": {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
/**
* Get Session
* @description Return the current session user and CSRF token. Returns 401 if not authenticated.
*/
get: operations["get_session_api_session_get"];
put?: never;
post?: never;
delete?: never;
options?: never;
head?: never;
patch?: never;
trace?: never;
};
"/api/auth/login": {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
get?: never;
put?: never;
/**
* Post Login
* @description Authenticate with username and password.
*
* On success, sets an HttpOnly session cookie and returns the session user + CSRF token.
* On failure, returns 401 with no cookie set.
* Repeated failures trigger exponential back-off (429 + Retry-After).
* No X-CSRF-Token required (unauthenticated endpoint).
*/
post: operations["post_login_api_auth_login_post"];
delete?: never;
options?: never;
head?: never;
patch?: never;
trace?: never;
};
"/api/auth/logout": {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
get?: never;
put?: never;
/**
* Post Logout
* @description Revoke the current session and clear the session cookie.
* Requires authentication and X-CSRF-Token header.
* Returns 204 No Content.
*/
post: operations["post_logout_api_auth_logout_post"];
delete?: never;
options?: never;
head?: never;
patch?: never;
trace?: never;
};
"/api/auth/password": {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
get?: never;
put?: never;
/**
* Post Change Password
* @description Change the current user's password.
* Requires authentication and X-CSRF-Token header.
* On AuthPasswordChangeError returns 400 with a generic message.
* On success, force_password_change becomes False (handled by the service).
* Returns 204 No Content.
*/
post: operations["post_change_password_api_auth_password_post"];
delete?: never;
options?: never;
head?: never;
patch?: never;
trace?: never;
};
"/api/auth/totp/setup": {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
get?: never;
put?: never;
/**
* Post Totp Setup
* @description Generate a new pending TOTP secret, otpauth URI, and one-time recovery codes.
*
* The secret is stored in the DB but TOTP is NOT yet enabled (totp_enabled stays
* False until the user confirms with POST /api/auth/totp/enable).
*
* Recovery codes are returned here as plaintext exactly once; their Argon2 hashes
* are persisted immediately so enable only needs to flip the enabled flag.
*
* Repeating this call replaces any prior pending secret and regenerates codes.
*
* Requires: session cookie + X-CSRF-Token.
*/
post: operations["post_totp_setup_api_auth_totp_setup_post"];
delete?: never;
options?: never;
head?: never;
patch?: never;
trace?: never;
};
"/api/auth/totp/enable": {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
get?: never;
put?: never;
/**
* Post Totp Enable
* @description Enable TOTP by confirming with the current 6-digit code from the authenticator app.
*
* Requires a prior call to POST /api/auth/totp/setup (so that a pending secret
* exists). On success, totp_enabled becomes True.
*
* Returns 400 if the code is wrong or there is no pending secret.
* Requires: session cookie + X-CSRF-Token.
*/
post: operations["post_totp_enable_api_auth_totp_enable_post"];
delete?: never;
options?: never;
head?: never;
patch?: never;
trace?: never;
};
"/api/auth/totp/disable": {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
get?: never;
put?: never;
/**
* Post Totp Disable
* @description Disable TOTP. The caller must provide exactly one of:
* - ``password``: the user's current login password, OR
* - ``code``: the current 6-digit TOTP code.
*
* On success: totp_enabled=False, totp_secret cleared, all recovery codes deleted.
* Returns 400 if neither credential matches or neither is provided.
* Requires: session cookie + X-CSRF-Token.
*/
post: operations["post_totp_disable_api_auth_totp_disable_post"];
delete?: never;
options?: never;
head?: never;
patch?: never;
trace?: never;
};
"/api/auth/totp": {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
/**
* Get Totp Status
* @description Return the current TOTP status for the authenticated user.
*
* Response contains only ``{"enabled": bool}``.
* Secret and recovery codes are NEVER returned here.
* Requires: session cookie only (no CSRF — read-only).
*/
get: operations["get_totp_status_api_auth_totp_get"];
put?: never;
post?: never;
delete?: never;
options?: never;
head?: never;
patch?: never;
trace?: never;
};
"/homeassistant/publish": {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
get?: never;
put?: never;
/** Publish From Homeassistant */
post: operations["publish_from_homeassistant_homeassistant_publish_post"];
delete?: never;
options?: never;
head?: never;
patch?: never;
trace?: never;
};
"/location/record": {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
get?: never;
put?: never;
/** Create Location Record */
post: operations["create_location_record_location_record_post"];
delete?: never;
options?: never;
head?: never;
patch?: never;
trace?: never;
};
"/poo/record": {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
get?: never;
put?: never;
/** Create Poo Record */
post: operations["create_poo_record_poo_record_post"];
delete?: never;
options?: never;
head?: never;
patch?: never;
trace?: never;
};
"/poo/latest": {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
/** Notify Latest Poo */
get: operations["notify_latest_poo_poo_latest_get"];
put?: never;
post?: never;
delete?: never;
options?: never;
head?: never;
patch?: never;
trace?: never;
};
"/public-ip/check": {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
/** Run Public Ip Check */
get: operations["run_public_ip_check_public_ip_check_get"];
put?: never;
post?: never;
delete?: never;
options?: never;
head?: never;
patch?: never;
trace?: never;
};
"/ticktick/auth/start": {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
/** Start Ticktick Auth */
get: operations["start_ticktick_auth_ticktick_auth_start_get"];
put?: never;
post?: never;
delete?: never;
options?: never;
head?: never;
patch?: never;
trace?: never;
};
"/ticktick/auth/code": {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
/** Handle Ticktick Auth Code */
get: operations["handle_ticktick_auth_code_ticktick_auth_code_get"];
put?: never;
post?: never;
delete?: never;
options?: never;
head?: never;
patch?: never;
trace?: never;
};
}
export type webhooks = Record<string, never>;
export interface components {
schemas: {
/**
* CatalogEntrySchema
* @description An entity from the catalog with its current toggle state.
*/
CatalogEntrySchema: {
entity: components["schemas"]["ExposableEntitySchema"];
/** Enabled */
enabled: boolean;
};
/** ConfigField */
ConfigField: {
/** Env Name */
env_name: string;
/** Label */
label: string;
/** Value */
value: string;
/** Secret */
secret: boolean;
/** Input Type */
input_type: string;
/** Configured */
configured: boolean;
};
/** ConfigResponse */
ConfigResponse: {
/** Sections */
sections: components["schemas"]["ConfigSection"][];
};
/** ConfigSection */
ConfigSection: {
/** Name */
name: string;
/** Fields */
fields: components["schemas"]["ConfigField"][];
};
/**
* ConfigUpdateRequest
* @description Flat mapping of env_name → value, mirroring the existing form semantics.
*/
ConfigUpdateRequest: {
/** Updates */
updates: {
[key: string]: string;
};
};
/** ConfigUpdateResponse */
ConfigUpdateResponse: {
/** Sections */
sections: components["schemas"]["ConfigSection"][];
};
/**
* ContractCreate
* @description Request body for POST /api/energy/contracts.
*
* ``effective_from`` defaults to the current UTC time if not provided,
* giving the first version an open-ended start from "now".
* ``kind`` is validated at the application layer against the profile registry;
* clients should send ``"manual"`` or ``"tibber"``.
*/
ContractCreate: {
/** Name */
name: string;
/** Kind */
kind: string;
/**
* Currency
* @default EUR
*/
currency: string;
/** Values */
values: {
[key: string]: unknown;
};
/**
* Effective From
* @description UTC datetime from which the first pricing version is effective. Defaults to the current UTC time when omitted.
*/
effective_from?: string | null;
};
/**
* ContractDetailResponse
* @description Response schema for a single EnergyContract with full version history.
*
* Returned by GET /api/energy/contracts/{id} and by successful POST / PATCH
* operations where the caller needs to see all version data.
*/
ContractDetailResponse: {
/** Id */
id: number;
/** Name */
name: string;
/** Kind */
kind: string;
/** Active */
active: boolean;
/** Currency */
currency: string;
/**
* Created At
* Format: date-time
*/
created_at: string;
/**
* Updated At
* Format: date-time
*/
updated_at: string;
/** Versions */
versions: components["schemas"]["ContractVersionResponse"][];
};
/**
* ContractListResponse
* @description Response schema for GET /api/energy/contracts.
*/
ContractListResponse: {
/** Items */
items: components["schemas"]["ContractResponse"][];
/** Total */
total: number;
};
/**
* ContractPatch
* @description Request body for PATCH /api/energy/contracts/{id}.
*
* All fields are optional. Sending ``active=true`` activates this contract
* (deactivating all others); ``active=false`` deactivates it without affecting
* other contracts.
*/
ContractPatch: {
/** Name */
name?: string | null;
/** Active */
active?: boolean | null;
};
/**
* ContractResponse
* @description Response schema for a single EnergyContract (without embedded versions).
*
* Used for list responses where embedding all versions would be expensive.
*/
ContractResponse: {
/** Id */
id: number;
/** Name */
name: string;
/** Kind */
kind: string;
/** Active */
active: boolean;
/** Currency */
currency: string;
/**
* Created At
* Format: date-time
*/
created_at: string;
/**
* Updated At
* Format: date-time
*/
updated_at: string;
};
/**
* ContractVersionResponse
* @description Response schema for a single EnergyContractVersion row.
*/
ContractVersionResponse: {
/** Id */
id: number;
/**
* Effective From
* Format: date-time
*/
effective_from: string;
/** Effective To */
effective_to: string | null;
/** Values */
values: {
[key: string]: unknown;
};
/**
* Created At
* Format: date-time
*/
created_at: string;
};
/**
* CostPeriodSchema
* @description One 15-minute billing record from the energy_cost_period table.
*/
CostPeriodSchema: {
/**
* Period Start
* Format: date-time
*/
period_start: string;
/**
* D1 Kwh
* @description Delivered low-tariff kWh for this period.
*/
d1_kwh: number;
/**
* D2 Kwh
* @description Delivered normal-tariff kWh for this period.
*/
d2_kwh: number;
/**
* R1 Kwh
* @description Returned low-tariff kWh for this period.
*/
r1_kwh: number;
/**
* R2 Kwh
* @description Returned normal-tariff kWh for this period.
*/
r2_kwh: number;
/**
* Import Cost
* @description Cost of electricity drawn from grid (EUR).
*/
import_cost: number;
/**
* Export Revenue
* @description Revenue from electricity fed to grid (EUR).
*/
export_revenue: number;
/**
* Net Cost
* @description import_cost export_revenue (EUR).
*/
net_cost: number;
/**
* Currency
* @description ISO 4217 currency code.
*/
currency: string;
/**
* Degraded
* @description True when the period was computed with incomplete data.
*/
degraded: boolean;
/**
* Contract Version Id
* @description FK to the contract version used for this billing period (null when degraded).
*/
contract_version_id?: number | null;
};
/**
* CostsResponse
* @description Response for GET /api/energy/costs.
*/
CostsResponse: {
/** Items */
items: components["schemas"]["CostPeriodSchema"][];
/**
* Total
* @description Number of items returned.
*/
total: number;
};
/**
* DeviceInfoSchema
* @description HA device grouping info for an exposable entity.
*/
DeviceInfoSchema: {
/** Identifiers */
identifiers: string[];
/** Name */
name: string;
};
/**
* DsmrLatestResponse
* @description Response for GET /api/energy/dsmr/latest.
*
* ``found`` is False when no dsmr_reading rows exist yet. The front-end
* should check ``found`` before reading ``recorded_at`` or ``payload``.
*/
DsmrLatestResponse: {
/** Found */
found: boolean;
/** Recorded At */
recorded_at?: string | null;
/** Payload */
payload?: {
[key: string]: unknown;
} | null;
};
/**
* ExposableEntitySchema
* @description One exposable entity in the catalog.
*
* ``value_getter`` is intentionally excluded — it is a non-serialisable
* callable and is only used internally by the HA Discovery service.
*/
ExposableEntitySchema: {
/** Key */
key: string;
/** Component */
component: string;
device: components["schemas"]["DeviceInfoSchema"];
/** Device Class */
device_class: string | null;
/** Unit */
unit: string;
/** Name */
name: string;
/** State Class */
state_class?: string | null;
};
/**
* ExposeResponse
* @description Response for GET /api/expose.
*/
ExposeResponse: {
/** Catalog */
catalog: components["schemas"]["CatalogEntrySchema"][];
mqtt_status: components["schemas"]["MqttStatusSchema"];
};
/**
* ExposeUpdateRequest
* @description Request body for PUT /api/expose.
*
* ``toggles`` is a map from entity key to desired enabled state (bool).
* Only keys present in the map are updated; absent keys are untouched.
*/
ExposeUpdateRequest: {
/** Toggles */
toggles: {
[key: string]: boolean;
};
};
/**
* ExposeUpdateResponse
* @description Response for PUT /api/expose (returns updated catalog + status).
*/
ExposeUpdateResponse: {
/** Catalog */
catalog: components["schemas"]["CatalogEntrySchema"][];
mqtt_status: components["schemas"]["MqttStatusSchema"];
};
/** HTTPValidationError */
HTTPValidationError: {
/** Detail */
detail?: components["schemas"]["ValidationError"][];
};
/** LocationRecord */
LocationRecord: {
/** Person */
person: string;
/** Datetime */
datetime: string;
/** Latitude */
latitude: number;
/** Longitude */
longitude: number;
/** Altitude */
altitude: number | null;
};
/**
* LocationUpdateRequest
* @description PATCH body for a location record — all fields optional; PK fields excluded.
*/
LocationUpdateRequest: {
/** Latitude */
latitude?: number | null;
/** Longitude */
longitude?: number | null;
/** Altitude */
altitude?: number | null;
};
/** LocationsResponse */
LocationsResponse: {
/** Items */
items: components["schemas"]["LocationRecord"][];
/** Limit */
limit: number;
/** Offset */
offset: number;
};
/** LoginRequest */
LoginRequest: {
/** Username */
username: string;
/** Password */
password: string;
/** Totp Code */
totp_code?: string | null;
};
/**
* ManualTariffSchema
* @description Fixed-tariff breakdown for manual contracts.
*
* Prices are the *effective* buy prices as used by the billing engine
* (energy_buy_x + energy_tax + ode) and the raw sell prices.
*/
ManualTariffSchema: {
/**
* Buy Dal
* @description Effective buy price, low-tariff / dal (EUR/kWh).
*/
buy_dal: number;
/**
* Buy Normal
* @description Effective buy price, normal / high-tariff (EUR/kWh).
*/
buy_normal: number;
/**
* Sell Dal
* @description Sell price, low-tariff / dal (EUR/kWh).
*/
sell_dal: number;
/**
* Sell Normal
* @description Sell price, normal / high-tariff (EUR/kWh).
*/
sell_normal: number;
};
/**
* MetricInfo
* @description Metadata for a single measurable quantity in a device's profile.
*/
MetricInfo: {
/** Key */
key: string;
/** Label */
label: string;
/** Unit */
unit: string;
/** Device Class */
device_class: string;
};
/**
* ModbusDeviceCreate
* @description Request body for POST /api/modbus/devices.
*/
ModbusDeviceCreate: {
/** Friendly Name */
friendly_name: string;
/**
* Transport
* @default tcp
*/
transport: string;
/** Host */
host: string;
/**
* Port
* @default 502
*/
port: number;
/**
* Unit Id
* @default 1
*/
unit_id: number;
/** Profile */
profile: string;
/**
* Poll Interval S
* @default 5
*/
poll_interval_s: number;
/**
* Enabled
* @default true
*/
enabled: boolean;
};
/**
* ModbusDeviceListResponse
* @description Response schema for listing Modbus devices.
*/
ModbusDeviceListResponse: {
/** Items */
items: components["schemas"]["ModbusDeviceResponse"][];
/** Total */
total: number;
};
/**
* ModbusDeviceResponse
* @description Response schema for a single Modbus device.
*/
ModbusDeviceResponse: {
/** Uuid */
uuid: string;
/** Friendly Name */
friendly_name: string;
/** Transport */
transport: string;
/** Host */
host: string;
/** Port */
port: number;
/** Unit Id */
unit_id: number;
/** Profile */
profile: string;
/** Poll Interval S */
poll_interval_s: number;
/** Enabled */
enabled: boolean;
/** Last Poll At */
last_poll_at: string | null;
/** Last Poll Ok */
last_poll_ok: boolean | null;
/**
* Created At
* Format: date-time
*/
created_at: string;
/**
* Updated At
* Format: date-time
*/
updated_at: string;
};
/**
* ModbusDeviceUpdate
* @description Request body for PATCH /api/modbus/devices/{uuid} — all fields optional.
*/
ModbusDeviceUpdate: {
/** Friendly Name */
friendly_name?: string | null;
/** Transport */
transport?: string | null;
/** Host */
host?: string | null;
/** Port */
port?: number | null;
/** Unit Id */
unit_id?: number | null;
/** Profile */
profile?: string | null;
/** Poll Interval S */
poll_interval_s?: number | null;
/** Enabled */
enabled?: boolean | null;
};
/**
* ModbusLatestResponse
* @description Response for the /latest endpoint.
*
* ``found`` is False and ``recorded_at``/``payload`` are None when the device
* has no readings yet. Callers should check ``found`` before using the values.
*/
ModbusLatestResponse: {
/** Found */
found: boolean;
/** Recorded At */
recorded_at: string | null;
/** Payload */
payload: {
[key: string]: unknown;
} | null;
};
/**
* ModbusMetricsResponse
* @description Response schema for GET /api/modbus/devices/{uuid}/metrics.
*/
ModbusMetricsResponse: {
/** Profile */
profile: string;
/** Metrics */
metrics: components["schemas"]["MetricInfo"][];
};
/**
* ModbusProfilesResponse
* @description Response schema for GET /api/modbus/profiles.
*/
ModbusProfilesResponse: {
/** Profiles */
profiles: components["schemas"]["ProfileSummary"][];
};
/**
* ModbusReadingResponse
* @description A single reading row: timestamp + decoded payload.
*/
ModbusReadingResponse: {
/**
* Recorded At
* Format: date-time
*/
recorded_at: string;
/** Payload */
payload: {
[key: string]: unknown;
};
};
/**
* ModbusReadingsResponse
* @description Response schema for the readings time-range endpoint.
*/
ModbusReadingsResponse: {
/** Items */
items: components["schemas"]["ModbusReadingResponse"][];
};
/**
* ModbusTestReadResponse
* @description Response for POST /api/modbus/devices/{uuid}/test.
*
* On success ``ok=True`` and ``payload`` contains the decoded values.
* On failure ``ok=False`` and ``error`` describes the problem.
*/
ModbusTestReadResponse: {
/** Ok */
ok: boolean;
/** Payload */
payload?: {
[key: string]: unknown;
} | null;
/** Error */
error?: string | null;
};
/**
* MqttStatusSchema
* @description Connection status for MQTT and HA Discovery.
*/
MqttStatusSchema: {
/** Mqtt Configured */
mqtt_configured: boolean;
/** Mqtt Connected */
mqtt_connected: boolean;
/** Discovery Enabled */
discovery_enabled: boolean;
};
/**
* MqttTestResponse
* @description Response from POST /api/config/mqtt/test.
*/
MqttTestResponse: {
/**
* Result
* @enum {string}
*/
result: "success" | "config-error" | "failed";
/** Message */
message: string;
};
/** PasswordChangeRequest */
PasswordChangeRequest: {
/** Current Password */
current_password: string;
/** New Password */
new_password: string;
/** Confirm Password */
confirm_password: string;
};
/** PooRecord */
PooRecord: {
/** Timestamp */
timestamp: string;
/** Status */
status: string;
/** Latitude */
latitude: number;
/** Longitude */
longitude: number;
};
/** PooResponse */
PooResponse: {
/** Items */
items: components["schemas"]["PooRecord"][];
/** Limit */
limit: number;
/** Offset */
offset: number;
};
/**
* PooUpdateRequest
* @description PATCH body for a poo record — all fields optional; PK field excluded.
*/
PooUpdateRequest: {
/** Status */
status?: string | null;
/** Latitude */
latitude?: number | null;
/** Longitude */
longitude?: number | null;
};
/**
* PricePointSchema
* @description A single 15-minute price point (tibber) or placeholder entry.
*/
PricePointSchema: {
/**
* Starts At
* Format: date-time
*/
starts_at: string;
/**
* Buy
* @description All-in buy price in EUR/kWh (including taxes).
*/
buy: number;
/**
* Sell
* @description Net sell price in EUR/kWh.
*/
sell: number;
/**
* Level
* @description Tibber price level (CHEAP / NORMAL / EXPENSIVE); null for manual.
*/
level?: string | null;
};
/**
* PricesResponse
* @description Response for GET /api/energy/prices.
*
* ``kind`` mirrors the active contract kind:
* - ``"tibber"`` → ``points`` has actual 15-min price entries; ``tariff`` is null.
* - ``"manual"`` → ``points`` is empty; ``tariff`` carries the fixed-rate table.
* - ``None`` → no active contract; both ``points`` and ``tariff`` are empty/null.
*
* ``currency`` comes from the active contract (or "EUR" fallback).
* ``points`` is always ascending by ``starts_at``.
*/
PricesResponse: {
/**
* Kind
* @description Active contract kind ('tibber' or 'manual'), or null if no active contract.
*/
kind: string | null;
/**
* Currency
* @description ISO 4217 currency code.
*/
currency: string;
/**
* Points
* @description 15-minute price points for tibber contracts (ascending by starts_at). Empty for manual contracts or when no active contract exists.
*/
points: components["schemas"]["PricePointSchema"][];
/** @description Fixed tariff table for manual contracts. Null for tibber contracts and when no active contract exists. */
tariff?: components["schemas"]["ManualTariffSchema"] | null;
};
/**
* ProfileSummary
* @description One entry in the GET /api/modbus/profiles response.
*/
ProfileSummary: {
/** Name */
name: string;
/** Description */
description: string;
};
/**
* ProfilesResponse
* @description Response schema for GET /api/energy/profiles.
*
* ``profiles`` is a list of raw profile dicts as produced by
* ``list_profiles()`` (Pydantic model dumps). Each entry contains at minimum
* ``kind`` and ``label``; the full nested structure allows the front-end to
* render a type-appropriate form for each pricing profile.
*/
ProfilesResponse: {
/** Profiles */
profiles: {
[key: string]: unknown;
}[];
};
/** PublicIPCheckResponse */
PublicIPCheckResponse: {
/**
* Status
* @enum {string}
*/
status: "first_seen" | "unchanged" | "changed" | "error";
/**
* Checked At
* Format: date-time
*/
checked_at: string;
/** Changed */
changed: boolean;
};
/** PublicIPHistorySchema */
PublicIPHistorySchema: {
/** Id */
id: number;
/** Ipv4 */
ipv4: string;
/**
* Observed At
* Format: date-time
*/
observed_at: string;
/** Change Type */
change_type: string;
/** Provider */
provider: string | null;
};
/** PublicIPResponse */
PublicIPResponse: {
state: components["schemas"]["PublicIPStateSchema"] | null;
/** History */
history: components["schemas"]["PublicIPHistorySchema"][];
};
/** PublicIPStateSchema */
PublicIPStateSchema: {
/** Id */
id: number;
/** Current Ipv4 */
current_ipv4: string;
/** Previous Ipv4 */
previous_ipv4: string | null;
/**
* First Seen At
* Format: date-time
*/
first_seen_at: string;
/**
* Last Checked At
* Format: date-time
*/
last_checked_at: string;
/** Last Changed At */
last_changed_at: string | null;
/** Last Check Status */
last_check_status: string;
/** Last Check Error */
last_check_error: string | null;
/** Last Provider */
last_provider: string | null;
};
/**
* RecomputeResponse
* @description Response for POST /api/energy/costs/recompute.
*/
RecomputeResponse: {
/**
* Recomputed
* @description Number of 15-minute periods for which a billing record was written (inserted or updated). Periods skipped due to missing contract or missing Tibber price are not counted.
*/
recomputed: number;
};
/**
* RepublishResponse
* @description Response for POST /api/expose/republish.
*/
RepublishResponse: {
/** Ok */
ok: boolean;
/** Message */
message: string;
};
/** SessionResponse */
SessionResponse: {
user: components["schemas"]["SessionUser"];
/** Csrf Token */
csrf_token: string;
};
/** SessionUser */
SessionUser: {
/** Username */
username: string;
/** Force Password Change */
force_password_change: boolean;
};
/**
* SmtpTestResponse
* @description Response from POST /api/config/smtp/test.
*/
SmtpTestResponse: {
/**
* Result
* @enum {string}
*/
result: "success" | "config-error" | "failed";
/** Message */
message: string;
};
/** StatusResponse */
StatusResponse: {
/** Status */
status: string;
};
/**
* SummaryResponse
* @description Response for GET /api/energy/costs/summary.
*
* All monetary values are in ``currency``.
*
* ``total_payable = metered_net + fixed_costs credits``
*/
SummaryResponse: {
/** Currency */
currency: string;
/**
* Metered Import
* @description Σ import_cost for non-degraded periods.
*/
metered_import: number;
/**
* Metered Export
* @description Σ export_revenue for non-degraded periods.
*/
metered_export: number;
/**
* Metered Net
* @description Σ net_cost for non-degraded periods.
*/
metered_net: number;
/**
* Fixed Costs
* @description Standing charges (network_fee + management_fee) apportioned over the interval.
*/
fixed_costs: number;
/**
* Credits
* @description Energy-tax credit (heffingskorting) apportioned over the interval.
*/
credits: number;
/**
* Total Payable
* @description metered_net + fixed_costs credits (actual amount owed).
*/
total_payable: number;
/**
* Period Count
* @description Number of non-degraded billing periods in range.
*/
period_count: number;
/**
* Degraded Count
* @description Number of degraded billing periods in range.
*/
degraded_count: number;
/**
* Days
* @description Interval length in days.
*/
days: number;
};
/**
* TibberTestPriceSchema
* @description Current Tibber price point returned on a successful test.
*
* Carries enough fields for the front-end to confirm the API is working and
* display the live price. The API token is **never** included.
*/
TibberTestPriceSchema: {
/**
* Starts At
* Format: date-time
*/
starts_at: string;
/** Total */
total: number;
/** Energy */
energy: number;
/** Tax */
tax: number;
/** Currency */
currency: string;
/** Level */
level?: string | null;
};
/**
* TibberTestResponse
* @description Three-state response for POST /api/energy/tibber/test.
*
* Possible ``result`` values:
*
* - ``"success"`` — Tibber API responded with a valid price.
* - ``"config-error"`` — Token is missing or not configured.
* - ``"failed"`` — API call failed (auth rejected, network error, timeout, etc.).
*
* ``price`` is populated only on ``"success"``; it is null otherwise.
* ``message`` always contains a human-readable explanation.
*/
TibberTestResponse: {
/**
* Result
* @enum {string}
*/
result: "success" | "config-error" | "failed";
/** Message */
message: string;
price?: components["schemas"]["TibberTestPriceSchema"] | null;
};
/**
* TotpDisableRequest
* @description Disable TOTP by proving identity.
*
* Exactly one of ``password`` or ``code`` must be provided.
*/
TotpDisableRequest: {
/** Password */
password?: string | null;
/** Code */
code?: string | null;
};
/**
* TotpEnableRequest
* @description The user confirms setup by providing the 6-digit TOTP code.
*/
TotpEnableRequest: {
/** Code */
code: string;
};
/**
* TotpSetupResponse
* @description Returned once after a setup call.
*
* ``secret`` and ``recovery_codes`` are **one-time plaintext values**.
* They are never returned again by any subsequent API call.
* The frontend must display and instruct the user to save them before confirming.
*/
TotpSetupResponse: {
/** Secret */
secret: string;
/** Otpauth Uri */
otpauth_uri: string;
/** Recovery Codes */
recovery_codes: string[];
};
/**
* TotpStatusResponse
* @description Minimal status response — never exposes secret or recovery codes.
*/
TotpStatusResponse: {
/** Enabled */
enabled: boolean;
};
/** ValidationError */
ValidationError: {
/** Location */
loc: (string | number)[];
/** Message */
msg: string;
/** Error Type */
type: string;
};
/**
* VersionCreate
* @description Request body for POST /api/energy/contracts/{id}/versions.
*/
VersionCreate: {
/**
* Effective From
* Format: date-time
*/
effective_from: string;
/** Values */
values: {
[key: string]: unknown;
};
};
};
responses: never;
parameters: never;
requestBodies: never;
headers: never;
pathItems: never;
}
export type $defs = Record<string, never>;
export interface operations {
get_status_status_get: {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
requestBody?: never;
responses: {
/** @description Successful Response */
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": components["schemas"]["StatusResponse"];
};
};
};
};
get_config_api_config_get: {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
requestBody?: never;
responses: {
/** @description Successful Response */
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": components["schemas"]["ConfigResponse"];
};
};
};
};
put_config_api_config_put: {
parameters: {
query?: never;
header?: {
"X-CSRF-Token"?: string | null;
};
path?: never;
cookie?: never;
};
requestBody: {
content: {
"application/json": components["schemas"]["ConfigUpdateRequest"];
};
};
responses: {
/** @description Successful Response */
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": components["schemas"]["ConfigUpdateResponse"];
};
};
/** @description Validation Error */
422: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": components["schemas"]["HTTPValidationError"];
};
};
};
};
post_smtp_test_api_config_smtp_test_post: {
parameters: {
query?: never;
header?: {
"X-CSRF-Token"?: string | null;
};
path?: never;
cookie?: never;
};
requestBody?: never;
responses: {
/** @description Successful Response */
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": components["schemas"]["SmtpTestResponse"];
};
};
/** @description Bad Request */
400: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": components["schemas"]["SmtpTestResponse"];
};
};
/** @description Validation Error */
422: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": components["schemas"]["HTTPValidationError"];
};
};
/** @description Bad Gateway */
502: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": components["schemas"]["SmtpTestResponse"];
};
};
};
};
post_mqtt_test_api_config_mqtt_test_post: {
parameters: {
query?: never;
header?: {
"X-CSRF-Token"?: string | null;
};
path?: never;
cookie?: never;
};
requestBody?: never;
responses: {
/** @description Successful Response */
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": components["schemas"]["MqttTestResponse"];
};
};
/** @description Bad Request */
400: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": components["schemas"]["MqttTestResponse"];
};
};
/** @description Validation Error */
422: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": components["schemas"]["HTTPValidationError"];
};
};
/** @description Bad Gateway */
502: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": components["schemas"]["MqttTestResponse"];
};
};
};
};
get_locations_api_locations_get: {
parameters: {
query?: {
limit?: number;
offset?: number;
start?: string | null;
end?: string | null;
};
header?: never;
path?: never;
cookie?: never;
};
requestBody?: never;
responses: {
/** @description Successful Response */
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": components["schemas"]["LocationsResponse"];
};
};
/** @description Validation Error */
422: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": components["schemas"]["HTTPValidationError"];
};
};
};
};
get_poo_api_poo_get: {
parameters: {
query?: {
limit?: number;
offset?: number;
};
header?: never;
path?: never;
cookie?: never;
};
requestBody?: never;
responses: {
/** @description Successful Response */
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": components["schemas"]["PooResponse"];
};
};
/** @description Validation Error */
422: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": components["schemas"]["HTTPValidationError"];
};
};
};
};
get_public_ip_api_public_ip_get: {
parameters: {
query?: {
limit?: number;
};
header?: never;
path?: never;
cookie?: never;
};
requestBody?: never;
responses: {
/** @description Successful Response */
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": components["schemas"]["PublicIPResponse"];
};
};
/** @description Validation Error */
422: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": components["schemas"]["HTTPValidationError"];
};
};
};
};
delete_location_record_api_locations__person___datetime__delete: {
parameters: {
query?: never;
header?: {
"X-CSRF-Token"?: string | null;
};
path: {
person: string;
datetime: string;
};
cookie?: never;
};
requestBody?: never;
responses: {
/** @description Successful Response */
204: {
headers: {
[name: string]: unknown;
};
content?: never;
};
/** @description Validation Error */
422: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": components["schemas"]["HTTPValidationError"];
};
};
};
};
patch_location_api_locations__person___datetime__patch: {
parameters: {
query?: never;
header?: {
"X-CSRF-Token"?: string | null;
};
path: {
person: string;
datetime: string;
};
cookie?: never;
};
requestBody?: {
content: {
"application/json": components["schemas"]["LocationUpdateRequest"];
};
};
responses: {
/** @description Successful Response */
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": components["schemas"]["LocationRecord"];
};
};
/** @description Validation Error */
422: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": components["schemas"]["HTTPValidationError"];
};
};
};
};
delete_poo_api_poo__timestamp__delete: {
parameters: {
query?: never;
header?: {
"X-CSRF-Token"?: string | null;
};
path: {
timestamp: string;
};
cookie?: never;
};
requestBody?: never;
responses: {
/** @description Successful Response */
204: {
headers: {
[name: string]: unknown;
};
content?: never;
};
/** @description Validation Error */
422: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": components["schemas"]["HTTPValidationError"];
};
};
};
};
patch_poo_api_poo__timestamp__patch: {
parameters: {
query?: never;
header?: {
"X-CSRF-Token"?: string | null;
};
path: {
timestamp: string;
};
cookie?: never;
};
requestBody?: {
content: {
"application/json": components["schemas"]["PooUpdateRequest"];
};
};
responses: {
/** @description Successful Response */
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": components["schemas"]["PooRecord"];
};
};
/** @description Validation Error */
422: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": components["schemas"]["HTTPValidationError"];
};
};
};
};
get_prices_api_energy_prices_get: {
parameters: {
query?: {
/** @description Inclusive start of the time window (ISO 8601). Defaults to the start of today UTC when omitted. */
start?: string | null;
/** @description Inclusive end of the time window (ISO 8601). Defaults to the end of tomorrow UTC when omitted. */
end?: string | null;
/** @description Maximum number of Tibber price points to return. */
limit?: number;
};
header?: never;
path?: never;
cookie?: never;
};
requestBody?: never;
responses: {
/** @description Successful Response */
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": components["schemas"]["PricesResponse"];
};
};
/** @description Validation Error */
422: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": components["schemas"]["HTTPValidationError"];
};
};
};
};
get_costs_api_energy_costs_get: {
parameters: {
query?: {
/** @description Inclusive lower bound for period_start (ISO 8601). */
start?: string | null;
/** @description Inclusive upper bound for period_start (ISO 8601). */
end?: string | null;
/** @description Maximum number of cost periods to return (default 500, max 5000). */
limit?: number;
};
header?: never;
path?: never;
cookie?: never;
};
requestBody?: never;
responses: {
/** @description Successful Response */
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": components["schemas"]["CostsResponse"];
};
};
/** @description Validation Error */
422: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": components["schemas"]["HTTPValidationError"];
};
};
};
};
get_costs_summary_api_energy_costs_summary_get: {
parameters: {
query?: {
/** @description Inclusive start of the summary interval (ISO 8601). Defaults to the start of the current UTC day. */
start?: string | null;
/** @description Exclusive end of the summary interval (ISO 8601). Defaults to the start of the next UTC day (i.e. today's full data). */
end?: string | null;
};
header?: never;
path?: never;
cookie?: never;
};
requestBody?: never;
responses: {
/** @description Successful Response */
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": components["schemas"]["SummaryResponse"];
};
};
/** @description Validation Error */
422: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": components["schemas"]["HTTPValidationError"];
};
};
};
};
get_dsmr_latest_api_energy_dsmr_latest_get: {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
requestBody?: never;
responses: {
/** @description Successful Response */
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": components["schemas"]["DsmrLatestResponse"];
};
};
};
};
post_recompute_api_energy_costs_recompute_post: {
parameters: {
query: {
/** @description Inclusive start of the recompute window (ISO 8601). Required. */
start: string;
/** @description Exclusive end of the recompute window (ISO 8601). Required. */
end: string;
};
header?: {
"X-CSRF-Token"?: string | null;
};
path?: never;
cookie?: never;
};
requestBody?: never;
responses: {
/** @description Successful Response */
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": components["schemas"]["RecomputeResponse"];
};
};
/** @description Validation error (missing window or range too large) */
422: {
headers: {
[name: string]: unknown;
};
content?: never;
};
};
};
post_tibber_test_api_energy_tibber_test_post: {
parameters: {
query?: never;
header?: {
"X-CSRF-Token"?: string | null;
};
path?: never;
cookie?: never;
};
requestBody?: never;
responses: {
/** @description Successful Response */
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": components["schemas"]["TibberTestResponse"];
};
};
/** @description Bad Request */
400: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": components["schemas"]["TibberTestResponse"];
};
};
/** @description Validation Error */
422: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": components["schemas"]["HTTPValidationError"];
};
};
/** @description Bad Gateway */
502: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": components["schemas"]["TibberTestResponse"];
};
};
};
};
get_profiles_api_energy_profiles_get: {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
requestBody?: never;
responses: {
/** @description Successful Response */
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": components["schemas"]["ProfilesResponse"];
};
};
};
};
list_energy_contracts_api_energy_contracts_get: {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
requestBody?: never;
responses: {
/** @description Successful Response */
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": components["schemas"]["ContractListResponse"];
};
};
};
};
create_energy_contract_api_energy_contracts_post: {
parameters: {
query?: never;
header?: {
"X-CSRF-Token"?: string | null;
};
path?: never;
cookie?: never;
};
requestBody: {
content: {
"application/json": components["schemas"]["ContractCreate"];
};
};
responses: {
/** @description Successful Response */
201: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": components["schemas"]["ContractDetailResponse"];
};
};
/** @description Validation Error */
422: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": components["schemas"]["HTTPValidationError"];
};
};
};
};
get_energy_contract_api_energy_contracts__contract_id__get: {
parameters: {
query?: never;
header?: never;
path: {
contract_id: number;
};
cookie?: never;
};
requestBody?: never;
responses: {
/** @description Successful Response */
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": components["schemas"]["ContractDetailResponse"];
};
};
/** @description Validation Error */
422: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": components["schemas"]["HTTPValidationError"];
};
};
};
};
patch_energy_contract_api_energy_contracts__contract_id__patch: {
parameters: {
query?: never;
header?: {
"X-CSRF-Token"?: string | null;
};
path: {
contract_id: number;
};
cookie?: never;
};
requestBody: {
content: {
"application/json": components["schemas"]["ContractPatch"];
};
};
responses: {
/** @description Successful Response */
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": components["schemas"]["ContractDetailResponse"];
};
};
/** @description Validation Error */
422: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": components["schemas"]["HTTPValidationError"];
};
};
};
};
add_contract_version_api_energy_contracts__contract_id__versions_post: {
parameters: {
query?: never;
header?: {
"X-CSRF-Token"?: string | null;
};
path: {
contract_id: number;
};
cookie?: never;
};
requestBody: {
content: {
"application/json": components["schemas"]["VersionCreate"];
};
};
responses: {
/** @description Successful Response */
201: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": components["schemas"]["ContractDetailResponse"];
};
};
/** @description Validation Error */
422: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": components["schemas"]["HTTPValidationError"];
};
};
};
};
get_expose_api_expose_get: {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
requestBody?: never;
responses: {
/** @description Successful Response */
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": components["schemas"]["ExposeResponse"];
};
};
};
};
put_expose_api_expose_put: {
parameters: {
query?: never;
header?: {
"X-CSRF-Token"?: string | null;
};
path?: never;
cookie?: never;
};
requestBody: {
content: {
"application/json": components["schemas"]["ExposeUpdateRequest"];
};
};
responses: {
/** @description Successful Response */
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": components["schemas"]["ExposeUpdateResponse"];
};
};
/** @description Validation Error */
422: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": components["schemas"]["HTTPValidationError"];
};
};
};
};
post_expose_republish_api_expose_republish_post: {
parameters: {
query?: never;
header?: {
"X-CSRF-Token"?: string | null;
};
path?: never;
cookie?: never;
};
requestBody?: never;
responses: {
/** @description Successful Response */
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": components["schemas"]["RepublishResponse"];
};
};
/** @description Validation Error */
422: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": components["schemas"]["HTTPValidationError"];
};
};
};
};
get_profiles_api_modbus_profiles_get: {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
requestBody?: never;
responses: {
/** @description Successful Response */
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": components["schemas"]["ModbusProfilesResponse"];
};
};
};
};
list_devices_api_modbus_devices_get: {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
requestBody?: never;
responses: {
/** @description Successful Response */
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": components["schemas"]["ModbusDeviceListResponse"];
};
};
};
};
create_device_api_modbus_devices_post: {
parameters: {
query?: never;
header?: {
"X-CSRF-Token"?: string | null;
};
path?: never;
cookie?: never;
};
requestBody: {
content: {
"application/json": components["schemas"]["ModbusDeviceCreate"];
};
};
responses: {
/** @description Successful Response */
201: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": components["schemas"]["ModbusDeviceResponse"];
};
};
/** @description Validation Error */
422: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": components["schemas"]["HTTPValidationError"];
};
};
};
};
get_device_api_modbus_devices__uuid__get: {
parameters: {
query?: never;
header?: never;
path: {
uuid: string;
};
cookie?: never;
};
requestBody?: never;
responses: {
/** @description Successful Response */
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": components["schemas"]["ModbusDeviceResponse"];
};
};
/** @description Validation Error */
422: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": components["schemas"]["HTTPValidationError"];
};
};
};
};
delete_device_api_modbus_devices__uuid__delete: {
parameters: {
query?: {
cascade?: boolean;
};
header?: {
"X-CSRF-Token"?: string | null;
};
path: {
uuid: string;
};
cookie?: never;
};
requestBody?: never;
responses: {
/** @description Successful Response */
204: {
headers: {
[name: string]: unknown;
};
content?: never;
};
/** @description Validation Error */
422: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": components["schemas"]["HTTPValidationError"];
};
};
};
};
patch_device_api_modbus_devices__uuid__patch: {
parameters: {
query?: never;
header?: {
"X-CSRF-Token"?: string | null;
};
path: {
uuid: string;
};
cookie?: never;
};
requestBody: {
content: {
"application/json": components["schemas"]["ModbusDeviceUpdate"];
};
};
responses: {
/** @description Successful Response */
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": components["schemas"]["ModbusDeviceResponse"];
};
};
/** @description Validation Error */
422: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": components["schemas"]["HTTPValidationError"];
};
};
};
};
get_latest_reading_api_modbus_devices__uuid__latest_get: {
parameters: {
query?: never;
header?: never;
path: {
uuid: string;
};
cookie?: never;
};
requestBody?: never;
responses: {
/** @description Successful Response */
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": components["schemas"]["ModbusLatestResponse"];
};
};
/** @description Validation Error */
422: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": components["schemas"]["HTTPValidationError"];
};
};
};
};
get_readings_api_modbus_devices__uuid__readings_get: {
parameters: {
query?: {
start?: string | null;
end?: string | null;
limit?: number;
};
header?: never;
path: {
uuid: string;
};
cookie?: never;
};
requestBody?: never;
responses: {
/** @description Successful Response */
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": components["schemas"]["ModbusReadingsResponse"];
};
};
/** @description Validation Error */
422: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": components["schemas"]["HTTPValidationError"];
};
};
};
};
get_metrics_api_modbus_devices__uuid__metrics_get: {
parameters: {
query?: never;
header?: never;
path: {
uuid: string;
};
cookie?: never;
};
requestBody?: never;
responses: {
/** @description Successful Response */
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": components["schemas"]["ModbusMetricsResponse"];
};
};
/** @description Validation Error */
422: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": components["schemas"]["HTTPValidationError"];
};
};
};
};
test_read_api_modbus_devices__uuid__test_post: {
parameters: {
query?: never;
header?: {
"X-CSRF-Token"?: string | null;
};
path: {
uuid: string;
};
cookie?: never;
};
requestBody?: never;
responses: {
/** @description Successful Response */
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": components["schemas"]["ModbusTestReadResponse"];
};
};
/** @description Validation Error */
422: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": components["schemas"]["HTTPValidationError"];
};
};
};
};
get_session_api_session_get: {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
requestBody?: never;
responses: {
/** @description Successful Response */
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": components["schemas"]["SessionResponse"];
};
};
};
};
post_login_api_auth_login_post: {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
requestBody: {
content: {
"application/json": components["schemas"]["LoginRequest"];
};
};
responses: {
/** @description Successful Response */
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": components["schemas"]["SessionResponse"];
};
};
/** @description Validation Error */
422: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": components["schemas"]["HTTPValidationError"];
};
};
};
};
post_logout_api_auth_logout_post: {
parameters: {
query?: never;
header?: {
"X-CSRF-Token"?: string | null;
};
path?: never;
cookie?: never;
};
requestBody?: never;
responses: {
/** @description Successful Response */
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": unknown;
};
};
/** @description Validation Error */
422: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": components["schemas"]["HTTPValidationError"];
};
};
};
};
post_change_password_api_auth_password_post: {
parameters: {
query?: never;
header?: {
"X-CSRF-Token"?: string | null;
};
path?: never;
cookie?: never;
};
requestBody: {
content: {
"application/json": components["schemas"]["PasswordChangeRequest"];
};
};
responses: {
/** @description Successful Response */
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": unknown;
};
};
/** @description Validation Error */
422: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": components["schemas"]["HTTPValidationError"];
};
};
};
};
post_totp_setup_api_auth_totp_setup_post: {
parameters: {
query?: never;
header?: {
"X-CSRF-Token"?: string | null;
};
path?: never;
cookie?: never;
};
requestBody?: never;
responses: {
/** @description Successful Response */
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": components["schemas"]["TotpSetupResponse"];
};
};
/** @description Validation Error */
422: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": components["schemas"]["HTTPValidationError"];
};
};
};
};
post_totp_enable_api_auth_totp_enable_post: {
parameters: {
query?: never;
header?: {
"X-CSRF-Token"?: string | null;
};
path?: never;
cookie?: never;
};
requestBody: {
content: {
"application/json": components["schemas"]["TotpEnableRequest"];
};
};
responses: {
/** @description Successful Response */
204: {
headers: {
[name: string]: unknown;
};
content?: never;
};
/** @description Validation Error */
422: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": components["schemas"]["HTTPValidationError"];
};
};
};
};
post_totp_disable_api_auth_totp_disable_post: {
parameters: {
query?: never;
header?: {
"X-CSRF-Token"?: string | null;
};
path?: never;
cookie?: never;
};
requestBody: {
content: {
"application/json": components["schemas"]["TotpDisableRequest"];
};
};
responses: {
/** @description Successful Response */
204: {
headers: {
[name: string]: unknown;
};
content?: never;
};
/** @description Validation Error */
422: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": components["schemas"]["HTTPValidationError"];
};
};
};
};
get_totp_status_api_auth_totp_get: {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
requestBody?: never;
responses: {
/** @description Successful Response */
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": components["schemas"]["TotpStatusResponse"];
};
};
};
};
publish_from_homeassistant_homeassistant_publish_post: {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
requestBody?: never;
responses: {
/** @description Successful Response */
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": unknown;
};
};
};
};
create_location_record_location_record_post: {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
requestBody?: never;
responses: {
/** @description Successful Response */
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": unknown;
};
};
};
};
create_poo_record_poo_record_post: {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
requestBody?: never;
responses: {
/** @description Successful Response */
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": unknown;
};
};
};
};
notify_latest_poo_poo_latest_get: {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
requestBody?: never;
responses: {
/** @description Successful Response */
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": unknown;
};
};
};
};
run_public_ip_check_public_ip_check_get: {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
requestBody?: never;
responses: {
/** @description Successful Response */
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": components["schemas"]["PublicIPCheckResponse"];
};
};
};
};
start_ticktick_auth_ticktick_auth_start_get: {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
requestBody?: never;
responses: {
/** @description Successful Response */
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": unknown;
};
};
};
};
handle_ticktick_auth_code_ticktick_auth_code_get: {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
requestBody?: never;
responses: {
/** @description Successful Response */
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": unknown;
};
};
};
};
}