/** * 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 ``/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/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. * * Returns 409 Conflict if the device has any associated readings; use * ``enabled=false`` to disable it instead. * * **Application-layer safety**: the check is performed via an explicit * SELECT COUNT query — not by relying on SQLite's FK RESTRICT constraint, * which is not enforced at runtime in this project (no PRAGMA foreign_keys=ON). */ 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; 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"][]; }; /** * DeviceInfoSchema * @description HA device grouping info for an exposable entity. */ DeviceInfoSchema: { /** Identifiers */ identifiers: string[]; /** Name */ name: string; }; /** * 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; }; /** * 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; }; /** * ProfileSummary * @description One entry in the GET /api/modbus/profiles response. */ ProfileSummary: { /** Name */ name: string; /** Description */ description: string; }; /** 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; }; /** * 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; }; /** * 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; }; }; responses: never; parameters: never; requestBodies: never; headers: never; pathItems: never; } export type $defs = Record; 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_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?: never; 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; }; }; }; }; }