/* * Automatically generated by codegen/smith.ts. * Do not edit this file or add other files to this directory. */ import { seamApiLtsVersion } from 'lib/lts-version.js' import { getAuthHeadersForClientSessionToken, warnOnInsecureuserIdentifierKey, } from 'lib/seam/connect/auth.js' import { type Client, createClient } from 'lib/seam/connect/client.js' import { isSeamHttpOptionsWithApiKey, isSeamHttpOptionsWithClient, isSeamHttpOptionsWithClientSessionToken, isSeamHttpOptionsWithConsoleSessionToken, isSeamHttpOptionsWithPersonalAccessToken, type SeamHttpFromPublishableKeyOptions, SeamHttpInvalidOptionsError, type SeamHttpOptions, type SeamHttpOptionsWithApiKey, type SeamHttpOptionsWithClient, type SeamHttpOptionsWithClientSessionToken, type SeamHttpOptionsWithConsoleSessionToken, type SeamHttpOptionsWithPersonalAccessToken, type SeamHttpRequestOptions, } from 'lib/seam/connect/options.js' import { limitToSeamHttpRequestOptions, parseOptions, } from 'lib/seam/connect/parse-options.js' import type { ActionAttempt } from 'lib/seam/connect/resources/action-attempt.js' import type { Device } from 'lib/seam/connect/resources/device.js' import { SeamHttpClientSessions } from 'lib/seam/connect/routes/client-sessions/index.js' import { SeamHttpRequest } from 'lib/seam/connect/seam-http-request.js' import { SeamPaginator } from 'lib/seam/connect/seam-paginator.js' import { SeamHttpThermostatsDailyPrograms } from './daily-programs/index.js' import { SeamHttpThermostatsSchedules } from './schedules/index.js' import { SeamHttpThermostatsSimulate } from './simulate/index.js' export class SeamHttpThermostats { client: Client readonly defaults: Required readonly ltsVersion = seamApiLtsVersion static ltsVersion = seamApiLtsVersion constructor(apiKeyOrOptions: string | SeamHttpOptions = {}) { const options = parseOptions(apiKeyOrOptions) this.client = 'client' in options ? options.client : createClient(options) this.defaults = limitToSeamHttpRequestOptions(options) } static fromClient( client: SeamHttpOptionsWithClient['client'], options: Omit = {}, ): SeamHttpThermostats { const constructorOptions = { ...options, client } if (!isSeamHttpOptionsWithClient(constructorOptions)) { throw new SeamHttpInvalidOptionsError('Missing client') } return new SeamHttpThermostats(constructorOptions) } static fromApiKey( apiKey: SeamHttpOptionsWithApiKey['apiKey'], options: Omit = {}, ): SeamHttpThermostats { const constructorOptions = { ...options, apiKey } if (!isSeamHttpOptionsWithApiKey(constructorOptions)) { throw new SeamHttpInvalidOptionsError('Missing apiKey') } return new SeamHttpThermostats(constructorOptions) } static fromClientSessionToken( clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'], options: Omit< SeamHttpOptionsWithClientSessionToken, 'clientSessionToken' > = {}, ): SeamHttpThermostats { const constructorOptions = { ...options, clientSessionToken } if (!isSeamHttpOptionsWithClientSessionToken(constructorOptions)) { throw new SeamHttpInvalidOptionsError('Missing clientSessionToken') } return new SeamHttpThermostats(constructorOptions) } static async fromPublishableKey( publishableKey: string, userIdentifierKey: string, options: SeamHttpFromPublishableKeyOptions = {}, ): Promise { warnOnInsecureuserIdentifierKey(userIdentifierKey) const clientOptions = parseOptions({ ...options, publishableKey }) if (isSeamHttpOptionsWithClient(clientOptions)) { throw new SeamHttpInvalidOptionsError( 'The client option cannot be used with SeamHttpThermostats.fromPublishableKey', ) } const client = createClient(clientOptions) const clientSessions = SeamHttpClientSessions.fromClient(client) const { token } = await clientSessions.getOrCreate({ user_identifier_key: userIdentifierKey, }) return SeamHttpThermostats.fromClientSessionToken(token, options) } static fromConsoleSessionToken( consoleSessionToken: SeamHttpOptionsWithConsoleSessionToken['consoleSessionToken'], workspaceId: SeamHttpOptionsWithConsoleSessionToken['workspaceId'], options: Omit< SeamHttpOptionsWithConsoleSessionToken, 'consoleSessionToken' | 'workspaceId' > = {}, ): SeamHttpThermostats { const constructorOptions = { ...options, consoleSessionToken, workspaceId } if (!isSeamHttpOptionsWithConsoleSessionToken(constructorOptions)) { throw new SeamHttpInvalidOptionsError( 'Missing consoleSessionToken or workspaceId', ) } return new SeamHttpThermostats(constructorOptions) } static fromPersonalAccessToken( personalAccessToken: SeamHttpOptionsWithPersonalAccessToken['personalAccessToken'], workspaceId: SeamHttpOptionsWithPersonalAccessToken['workspaceId'], options: Omit< SeamHttpOptionsWithPersonalAccessToken, 'personalAccessToken' | 'workspaceId' > = {}, ): SeamHttpThermostats { const constructorOptions = { ...options, personalAccessToken, workspaceId } if (!isSeamHttpOptionsWithPersonalAccessToken(constructorOptions)) { throw new SeamHttpInvalidOptionsError( 'Missing personalAccessToken or workspaceId', ) } return new SeamHttpThermostats(constructorOptions) } createPaginator( request: SeamHttpRequest, ): SeamPaginator { return new SeamPaginator(this, request) } async updateClientSessionToken( clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'], ): Promise { const { headers } = this.client.defaults const authHeaders = getAuthHeadersForClientSessionToken({ clientSessionToken, }) for (const key of Object.keys(authHeaders)) { if (headers[key] == null) { throw new Error( 'Cannot update a clientSessionToken on a client created without a clientSessionToken', ) } } this.client.defaults.headers = { ...headers, ...authHeaders } const clientSessions = SeamHttpClientSessions.fromClient(this.client) await clientSessions.get() } get dailyPrograms(): SeamHttpThermostatsDailyPrograms { return SeamHttpThermostatsDailyPrograms.fromClient( this.client, this.defaults, ) } get schedules(): SeamHttpThermostatsSchedules { return SeamHttpThermostatsSchedules.fromClient(this.client, this.defaults) } get simulate(): SeamHttpThermostatsSimulate { return SeamHttpThermostatsSimulate.fromClient(this.client, this.defaults) } /** * Activates a specified [climate preset](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-climate-presets) for a specified [thermostat](https://docs.seam.co/capability-guides/thermostats). */ activateClimatePreset( parameters: ThermostatsActivateClimatePresetParameters, options: ThermostatsActivateClimatePresetOptions = {}, ): ThermostatsActivateClimatePresetRequest { return new SeamHttpRequest(this, { pathname: '/thermostats/activate_climate_preset', method: 'POST', body: parameters, responseKey: 'action_attempt', options, }) } /** * Sets a specified [thermostat](https://docs.seam.co/capability-guides/thermostats) to [cool mode](https://docs.seam.co/capability-guides/thermostats/configure-current-climate-settings). */ cool( parameters: ThermostatsCoolParameters, options: ThermostatsCoolOptions = {}, ): ThermostatsCoolRequest { return new SeamHttpRequest(this, { pathname: '/thermostats/cool', method: 'POST', body: parameters, responseKey: 'action_attempt', options, }) } /** * Creates a [climate preset](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-climate-presets) for a specified [thermostat](https://docs.seam.co/capability-guides/thermostats). */ createClimatePreset( parameters: ThermostatsCreateClimatePresetParameters, options: ThermostatsCreateClimatePresetOptions = {}, ): ThermostatsCreateClimatePresetRequest { return new SeamHttpRequest(this, { pathname: '/thermostats/create_climate_preset', method: 'POST', body: parameters, responseKey: undefined, options, }) } /** * Deletes a specified [climate preset](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-climate-presets) for a specified [thermostat](https://docs.seam.co/capability-guides/thermostats). */ deleteClimatePreset( parameters: ThermostatsDeleteClimatePresetParameters, options: ThermostatsDeleteClimatePresetOptions = {}, ): ThermostatsDeleteClimatePresetRequest { return new SeamHttpRequest(this, { pathname: '/thermostats/delete_climate_preset', method: 'POST', body: parameters, responseKey: undefined, options, }) } /** * Sets a specified [thermostat](https://docs.seam.co/capability-guides/thermostats) to [heat mode](https://docs.seam.co/capability-guides/thermostats/configure-current-climate-settings). */ heat( parameters: ThermostatsHeatParameters, options: ThermostatsHeatOptions = {}, ): ThermostatsHeatRequest { return new SeamHttpRequest(this, { pathname: '/thermostats/heat', method: 'POST', body: parameters, responseKey: 'action_attempt', options, }) } /** * Sets a specified [thermostat](https://docs.seam.co/capability-guides/thermostats) to [heat-cool ("auto") mode](https://docs.seam.co/capability-guides/thermostats/configure-current-climate-settings). */ heatCool( parameters: ThermostatsHeatCoolParameters, options: ThermostatsHeatCoolOptions = {}, ): ThermostatsHeatCoolRequest { return new SeamHttpRequest(this, { pathname: '/thermostats/heat_cool', method: 'POST', body: parameters, responseKey: 'action_attempt', options, }) } /** * Returns a list of all [thermostats](https://docs.seam.co/capability-guides/thermostats). */ list( parameters?: ThermostatsListParameters, options: ThermostatsListOptions = {}, ): ThermostatsListRequest { return new SeamHttpRequest(this, { pathname: '/thermostats/list', method: 'POST', body: parameters, responseKey: 'devices', options, }) } /** * Sets a specified [thermostat](https://docs.seam.co/capability-guides/thermostats) to ["off" mode](https://docs.seam.co/capability-guides/thermostats/configure-current-climate-settings). */ off( parameters: ThermostatsOffParameters, options: ThermostatsOffOptions = {}, ): ThermostatsOffRequest { return new SeamHttpRequest(this, { pathname: '/thermostats/off', method: 'POST', body: parameters, responseKey: 'action_attempt', options, }) } /** * Sets a specified [climate preset](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-climate-presets) as the ["fallback"](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-climate-presets/setting-the-fallback-climate-preset) preset for a specified [thermostat](https://docs.seam.co/capability-guides/thermostats). */ setFallbackClimatePreset( parameters: ThermostatsSetFallbackClimatePresetParameters, options: ThermostatsSetFallbackClimatePresetOptions = {}, ): ThermostatsSetFallbackClimatePresetRequest { return new SeamHttpRequest(this, { pathname: '/thermostats/set_fallback_climate_preset', method: 'POST', body: parameters, responseKey: undefined, options, }) } /** * Sets the [fan mode setting](https://docs.seam.co/capability-guides/thermostats/configure-current-climate-settings#fan-mode-settings) for a specified [thermostat](https://docs.seam.co/capability-guides/thermostats). */ setFanMode( parameters: ThermostatsSetFanModeParameters, options: ThermostatsSetFanModeOptions = {}, ): ThermostatsSetFanModeRequest { return new SeamHttpRequest(this, { pathname: '/thermostats/set_fan_mode', method: 'POST', body: parameters, responseKey: 'action_attempt', options, }) } /** * Sets the [HVAC mode](https://docs.seam.co/capability-guides/thermostats/configure-current-climate-settings) for a specified [thermostat](https://docs.seam.co/capability-guides/thermostats). */ setHvacMode( parameters: ThermostatsSetHvacModeParameters, options: ThermostatsSetHvacModeOptions = {}, ): ThermostatsSetHvacModeRequest { return new SeamHttpRequest(this, { pathname: '/thermostats/set_hvac_mode', method: 'POST', body: parameters, responseKey: 'action_attempt', options, }) } /** * Sets a [temperature threshold](https://docs.seam.co/capability-guides/thermostats/setting-and-monitoring-temperature-thresholds) for a specified thermostat. Seam emits a `thermostat.temperature_threshold_exceeded` event and adds a warning on a thermostat if it reports a temperature outside the threshold range. */ setTemperatureThreshold( parameters: ThermostatsSetTemperatureThresholdParameters, options: ThermostatsSetTemperatureThresholdOptions = {}, ): ThermostatsSetTemperatureThresholdRequest { return new SeamHttpRequest(this, { pathname: '/thermostats/set_temperature_threshold', method: 'PATCH', body: parameters, responseKey: undefined, options, }) } /** * Updates a specified [climate preset](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-climate-presets) for a specified [thermostat](https://docs.seam.co/capability-guides/thermostats). */ updateClimatePreset( parameters: ThermostatsUpdateClimatePresetParameters, options: ThermostatsUpdateClimatePresetOptions = {}, ): ThermostatsUpdateClimatePresetRequest { return new SeamHttpRequest(this, { pathname: '/thermostats/update_climate_preset', method: 'PATCH', body: parameters, responseKey: undefined, options, }) } /** * Updates the thermostat weekly program for a thermostat device. To configure a weekly program, specify the ID of the daily program that you want to use for each day of the week. When you update a weekly program, the set of programs that you specify overwrites any previous weekly program for the thermostat. */ updateWeeklyProgram( parameters: ThermostatsUpdateWeeklyProgramParameters, options: ThermostatsUpdateWeeklyProgramOptions = {}, ): ThermostatsUpdateWeeklyProgramRequest { return new SeamHttpRequest(this, { pathname: '/thermostats/update_weekly_program', method: 'POST', body: parameters, responseKey: 'action_attempt', options, }) } } export type ThermostatsActivateClimatePresetParameters = { /** * Climate preset key of the climate preset that you want to activate. */ climate_preset_key: string /** * ID of the thermostat device for which you want to activate a climate preset. */ device_id: string } /** * @deprecated Use ThermostatsActivateClimatePresetRequest instead. */ export type ThermostatsActivateClimatePresetResponse = { action_attempt: ActionAttempt } export type ThermostatsActivateClimatePresetRequest = SeamHttpRequest< ThermostatsActivateClimatePresetResponse, 'action_attempt' > export type ThermostatsActivateClimatePresetOptions = Pick< SeamHttpRequestOptions, 'waitForActionAttempt' > export type ThermostatsCoolParameters = { /** * [Cooling set point](https://docs.seam.co/capability-guides/thermostats/understanding-thermostat-concepts/set-points) in °C that you want to set for the thermostat. You must set one of the `cooling_set_point` parameters. */ cooling_set_point_celsius?: number | undefined /** * [Cooling set point](https://docs.seam.co/capability-guides/thermostats/understanding-thermostat-concepts/set-points) in °F that you want to set for the thermostat. You must set one of the `cooling_set_point` parameters. */ cooling_set_point_fahrenheit?: number | undefined /** * ID of the thermostat device that you want to set to cool mode. */ device_id: string } /** * @deprecated Use ThermostatsCoolRequest instead. */ export type ThermostatsCoolResponse = { action_attempt: ActionAttempt } export type ThermostatsCoolRequest = SeamHttpRequest< ThermostatsCoolResponse, 'action_attempt' > export type ThermostatsCoolOptions = Pick< SeamHttpRequestOptions, 'waitForActionAttempt' > export type ThermostatsCreateClimatePresetParameters = { /** * Unique key to identify the [climate preset](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-climate-presets). */ climate_preset_key: string /** * The climate preset mode for the thermostat, based on the available climate preset modes reported by the device. */ climate_preset_mode?: 'home' | 'away' | 'wake' | 'sleep' | 'occupied' | 'unoccupied' | undefined /** * Temperature to which the thermostat should cool (in °C). See also [Set Points](https://docs.seam.co/capability-guides/thermostats/understanding-thermostat-concepts/set-points). */ cooling_set_point_celsius?: number | undefined /** * Temperature to which the thermostat should cool (in °F). See also [Set Points](https://docs.seam.co/capability-guides/thermostats/understanding-thermostat-concepts/set-points). */ cooling_set_point_fahrenheit?: number | undefined /** * ID of the thermostat device for which you want create a climate preset. */ device_id: string /** * Metadata specific to the Ecobee climate, if applicable. */ ecobee_metadata?: | { /** * Reference to the Ecobee climate, if applicable. */ climate_ref?: string | undefined /** * Indicates if the climate preset is optimized by Ecobee. */ is_optimized?: boolean | undefined /** * Indicates whether the climate preset is owned by the user or the system. */ owner?: 'user' | 'system' | undefined } | undefined /** * Desired [fan mode setting](https://docs.seam.co/capability-guides/thermostats/configure-current-climate-settings#fan-mode-settings), such as `on`, `auto`, or `circulate`. */ fan_mode_setting?: 'auto' | 'on' | 'circulate' | undefined /** * Temperature to which the thermostat should heat (in °C). See also [Set Points](https://docs.seam.co/capability-guides/thermostats/understanding-thermostat-concepts/set-points). */ heating_set_point_celsius?: number | undefined /** * Temperature to which the thermostat should heat (in °F). See also [Set Points](https://docs.seam.co/capability-guides/thermostats/understanding-thermostat-concepts/set-points). */ heating_set_point_fahrenheit?: number | undefined /** * Desired [HVAC mode](https://docs.seam.co/capability-guides/thermostats/understanding-thermostat-concepts/hvac-mode) setting, such as `heat`, `cool`, `heat_cool`, or `off`. */ hvac_mode_setting?: 'off' | 'heat' | 'cool' | 'heat_cool' | 'eco' | undefined /** * Indicates whether a person at the thermostat or using the API can change the thermostat's settings. * @deprecated Use 'thermostat_schedule.is_override_allowed' */ manual_override_allowed?: boolean | undefined /** * User-friendly name to identify the [climate preset](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-climate-presets). */ name?: string | undefined } /** * @deprecated Use ThermostatsCreateClimatePresetRequest instead. */ export type ThermostatsCreateClimatePresetResponse = void export type ThermostatsCreateClimatePresetRequest = SeamHttpRequest< void, undefined > export interface ThermostatsCreateClimatePresetOptions {} export type ThermostatsDeleteClimatePresetParameters = { /** * Climate preset key of the climate preset that you want to delete. */ climate_preset_key: string /** * ID of the thermostat device for which you want to delete a climate preset. */ device_id: string } /** * @deprecated Use ThermostatsDeleteClimatePresetRequest instead. */ export type ThermostatsDeleteClimatePresetResponse = void export type ThermostatsDeleteClimatePresetRequest = SeamHttpRequest< void, undefined > export interface ThermostatsDeleteClimatePresetOptions {} export type ThermostatsHeatParameters = { /** * ID of the thermostat device that you want to set to heat mode. */ device_id: string /** * [Heating set point](https://docs.seam.co/capability-guides/thermostats/understanding-thermostat-concepts/set-points) in °C that you want to set for the thermostat. You must set one of the `heating_set_point` parameters. */ heating_set_point_celsius?: number | undefined /** * [Heating set point](https://docs.seam.co/capability-guides/thermostats/understanding-thermostat-concepts/set-points) in °F that you want to set for the thermostat. You must set one of the `heating_set_point` parameters. */ heating_set_point_fahrenheit?: number | undefined } /** * @deprecated Use ThermostatsHeatRequest instead. */ export type ThermostatsHeatResponse = { action_attempt: ActionAttempt } export type ThermostatsHeatRequest = SeamHttpRequest< ThermostatsHeatResponse, 'action_attempt' > export type ThermostatsHeatOptions = Pick< SeamHttpRequestOptions, 'waitForActionAttempt' > export type ThermostatsHeatCoolParameters = { /** * [Cooling set point](https://docs.seam.co/capability-guides/thermostats/understanding-thermostat-concepts/set-points) in °C that you want to set for the thermostat. You must set one of the `cooling_set_point` parameters. */ cooling_set_point_celsius?: number | undefined /** * [Cooling set point](https://docs.seam.co/capability-guides/thermostats/understanding-thermostat-concepts/set-points) in °F that you want to set for the thermostat. You must set one of the `cooling_set_point` parameters. */ cooling_set_point_fahrenheit?: number | undefined /** * ID of the thermostat device that you want to set to heat-cool mode. */ device_id: string /** * [Heating set point](https://docs.seam.co/capability-guides/thermostats/understanding-thermostat-concepts/set-points) in °C that you want to set for the thermostat. You must set one of the `heating_set_point` parameters. */ heating_set_point_celsius?: number | undefined /** * [Heating set point](https://docs.seam.co/capability-guides/thermostats/understanding-thermostat-concepts/set-points) in °F that you want to set for the thermostat. You must set one of the `heating_set_point` parameters. */ heating_set_point_fahrenheit?: number | undefined } /** * @deprecated Use ThermostatsHeatCoolRequest instead. */ export type ThermostatsHeatCoolResponse = { action_attempt: ActionAttempt } export type ThermostatsHeatCoolRequest = SeamHttpRequest< ThermostatsHeatCoolResponse, 'action_attempt' > export type ThermostatsHeatCoolOptions = Pick< SeamHttpRequestOptions, 'waitForActionAttempt' > export type ThermostatsListParameters = { /** * ID of the Connect Webview for which you want to list devices. */ connect_webview_id?: string | undefined /** * ID of the connected account for which you want to list devices. */ connected_account_id?: string | undefined /** * Array of IDs of the connected accounts for which you want to list devices. */ connected_account_ids?: Array | undefined /** * Timestamp by which to limit returned devices. Returns devices created before this timestamp. */ created_before?: string | undefined /** * Set of key:value [custom metadata](https://docs.seam.co/core-concepts/devices/adding-custom-metadata-to-a-device) pairs for which you want to list devices. */ custom_metadata_has?: Record | undefined /** * Customer key for which you want to list devices. */ customer_key?: string | undefined /** * Array of device IDs for which you want to list devices. */ device_ids?: Array | undefined /** * Device type by which you want to filter thermostat devices. */ device_type?: | 'ecobee_thermostat' | 'nest_thermostat' | 'honeywell_resideo_thermostat' | 'tado_thermostat' | 'sensi_thermostat' | 'smartthings_thermostat' | undefined /** * Array of device types by which you want to filter thermostat devices. */ device_types?: | Array< | 'ecobee_thermostat' | 'nest_thermostat' | 'honeywell_resideo_thermostat' | 'tado_thermostat' | 'sensi_thermostat' | 'smartthings_thermostat' > | undefined /** * Numerical limit on the number of devices to return. */ limit?: number | undefined /** * Manufacturer by which you want to filter thermostat devices. */ manufacturer?: | 'ecobee' | 'honeywell_resideo' | 'nest' | 'sensi' | 'smartthings' | 'tado' | undefined /** * Identifies the specific page of results to return, obtained from the previous page's `next_page_cursor`. */ page_cursor?: string | undefined /** * String for which to search. Filters returned devices to include all records that satisfy a partial match using `device_id` (full or partial UUID prefix, minimum 4 characters), `connected_account_id`, `display_name`, `custom_metadata` or `location.location_name`. */ search?: string | undefined /** * ID of the space for which you want to list devices. */ space_id?: string | undefined /** * @deprecated Use `space_id`. */ unstable_location_id?: string | undefined /** * Your own internal user ID for the user for which you want to list devices. */ user_identifier_key?: string | undefined } /** * @deprecated Use ThermostatsListRequest instead. */ export type ThermostatsListResponse = { devices: Array } export type ThermostatsListRequest = SeamHttpRequest< ThermostatsListResponse, 'devices' > export interface ThermostatsListOptions {} export type ThermostatsOffParameters = { /** * ID of the thermostat device that you want to set to off mode. */ device_id: string } /** * @deprecated Use ThermostatsOffRequest instead. */ export type ThermostatsOffResponse = { action_attempt: ActionAttempt } export type ThermostatsOffRequest = SeamHttpRequest< ThermostatsOffResponse, 'action_attempt' > export type ThermostatsOffOptions = Pick< SeamHttpRequestOptions, 'waitForActionAttempt' > export type ThermostatsSetFallbackClimatePresetParameters = { /** * Climate preset key of the climate preset that you want to set as the fallback climate preset. */ climate_preset_key: string /** * ID of the thermostat device for which you want to set the fallback climate preset. */ device_id: string } /** * @deprecated Use ThermostatsSetFallbackClimatePresetRequest instead. */ export type ThermostatsSetFallbackClimatePresetResponse = void export type ThermostatsSetFallbackClimatePresetRequest = SeamHttpRequest< void, undefined > export interface ThermostatsSetFallbackClimatePresetOptions {} export type ThermostatsSetFanModeParameters = { /** * ID of the thermostat device for which you want to set the fan mode. */ device_id: string /** * Fan mode setting for the thermostat, such as `auto`, `on`, or `circulate`. * @deprecated Use `fan_mode_setting` instead. */ fan_mode?: 'auto' | 'on' | 'circulate' | undefined /** * [Fan mode setting](https://docs.seam.co/capability-guides/thermostats/configure-current-climate-settings#fan-mode-settings) that you want to set for the thermostat. */ fan_mode_setting?: 'auto' | 'on' | 'circulate' | undefined } /** * @deprecated Use ThermostatsSetFanModeRequest instead. */ export type ThermostatsSetFanModeResponse = { action_attempt: ActionAttempt } export type ThermostatsSetFanModeRequest = SeamHttpRequest< ThermostatsSetFanModeResponse, 'action_attempt' > export type ThermostatsSetFanModeOptions = Pick< SeamHttpRequestOptions, 'waitForActionAttempt' > export type ThermostatsSetHvacModeParameters = { /** * ID of the thermostat device for which you want to set the HVAC mode. */ device_id: string hvac_mode_setting: 'off' | 'cool' | 'heat' | 'heat_cool' | 'eco' /** * [Cooling set point](https://docs.seam.co/capability-guides/thermostats/understanding-thermostat-concepts/set-points) in °C that you want to set for the thermostat. You must set one of the `cooling_set_point` parameters. */ cooling_set_point_celsius?: number | undefined /** * [Cooling set point](https://docs.seam.co/capability-guides/thermostats/understanding-thermostat-concepts/set-points) in °F that you want to set for the thermostat. You must set one of the `cooling_set_point` parameters. */ cooling_set_point_fahrenheit?: number | undefined /** * [Heating set point](https://docs.seam.co/capability-guides/thermostats/understanding-thermostat-concepts/set-points) in °C that you want to set for the thermostat. You must set one of the `heating_set_point` parameters. */ heating_set_point_celsius?: number | undefined /** * [Heating set point](https://docs.seam.co/capability-guides/thermostats/understanding-thermostat-concepts/set-points) in °F that you want to set for the thermostat. You must set one of the `heating_set_point` parameters. */ heating_set_point_fahrenheit?: number | undefined } /** * @deprecated Use ThermostatsSetHvacModeRequest instead. */ export type ThermostatsSetHvacModeResponse = { action_attempt: ActionAttempt } export type ThermostatsSetHvacModeRequest = SeamHttpRequest< ThermostatsSetHvacModeResponse, 'action_attempt' > export type ThermostatsSetHvacModeOptions = Pick< SeamHttpRequestOptions, 'waitForActionAttempt' > export type ThermostatsSetTemperatureThresholdParameters = { /** * ID of the thermostat device for which you want to set a temperature threshold. */ device_id: string /** * Lower temperature limit in in °C. Seam alerts you if the reported temperature is lower than this value. You can specify either `lower_limit` but not both. */ lower_limit_celsius?: number | undefined /** * Lower temperature limit in in °F. Seam alerts you if the reported temperature is lower than this value. You can specify either `lower_limit` but not both. */ lower_limit_fahrenheit?: number | undefined /** * Upper temperature limit in in °C. Seam alerts you if the reported temperature is higher than this value. You can specify either `upper_limit` but not both. */ upper_limit_celsius?: number | undefined /** * Upper temperature limit in in °C. Seam alerts you if the reported temperature is higher than this value. You can specify either `upper_limit` but not both. */ upper_limit_fahrenheit?: number | undefined } /** * @deprecated Use ThermostatsSetTemperatureThresholdRequest instead. */ export type ThermostatsSetTemperatureThresholdResponse = void export type ThermostatsSetTemperatureThresholdRequest = SeamHttpRequest< void, undefined > export interface ThermostatsSetTemperatureThresholdOptions {} export type ThermostatsUpdateClimatePresetParameters = { /** * Unique key to identify the [climate preset](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-climate-presets). */ climate_preset_key: string /** * The climate preset mode for the thermostat, based on the available climate preset modes reported by the device. */ climate_preset_mode?: 'home' | 'away' | 'wake' | 'sleep' | 'occupied' | 'unoccupied' | undefined /** * Temperature to which the thermostat should cool (in °C). See also [Set Points](https://docs.seam.co/capability-guides/thermostats/understanding-thermostat-concepts/set-points). */ cooling_set_point_celsius?: number | undefined /** * Temperature to which the thermostat should cool (in °F). See also [Set Points](https://docs.seam.co/capability-guides/thermostats/understanding-thermostat-concepts/set-points). */ cooling_set_point_fahrenheit?: number | undefined /** * ID of the thermostat device for which you want to update a climate preset. */ device_id: string /** * Metadata specific to the Ecobee climate, if applicable. */ ecobee_metadata?: | { /** * Reference to the Ecobee climate, if applicable. */ climate_ref?: string | undefined /** * Indicates if the climate preset is optimized by Ecobee. */ is_optimized?: boolean | undefined /** * Indicates whether the climate preset is owned by the user or the system. */ owner?: 'user' | 'system' | undefined } | undefined /** * Desired [fan mode setting](https://docs.seam.co/capability-guides/thermostats/configure-current-climate-settings#fan-mode-settings), such as `on`, `auto`, or `circulate`. */ fan_mode_setting?: 'auto' | 'on' | 'circulate' | undefined /** * Temperature to which the thermostat should heat (in °C). See also [Set Points](https://docs.seam.co/capability-guides/thermostats/understanding-thermostat-concepts/set-points). */ heating_set_point_celsius?: number | undefined /** * Temperature to which the thermostat should heat (in °F). See also [Set Points](https://docs.seam.co/capability-guides/thermostats/understanding-thermostat-concepts/set-points). */ heating_set_point_fahrenheit?: number | undefined /** * Desired [HVAC mode](https://docs.seam.co/capability-guides/thermostats/understanding-thermostat-concepts/hvac-mode) setting, such as `heat`, `cool`, `heat_cool`, or `off`. */ hvac_mode_setting?: 'off' | 'heat' | 'cool' | 'heat_cool' | 'eco' | undefined /** * Indicates whether a person at the thermostat can change the thermostat's settings. See [Specifying Manual Override Permissions](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-thermostat-schedules#specifying-manual-override-permissions). * @deprecated Use 'thermostat_schedule.is_override_allowed' */ manual_override_allowed?: boolean | undefined /** * User-friendly name to identify the [climate preset](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-climate-presets). */ name?: string | undefined } /** * @deprecated Use ThermostatsUpdateClimatePresetRequest instead. */ export type ThermostatsUpdateClimatePresetResponse = void export type ThermostatsUpdateClimatePresetRequest = SeamHttpRequest< void, undefined > export interface ThermostatsUpdateClimatePresetOptions {} export type ThermostatsUpdateWeeklyProgramParameters = { /** * ID of the thermostat device for which you want to update the weekly program. */ device_id: string /** * ID of the thermostat daily program to run on Fridays. */ friday_program_id?: string | undefined /** * ID of the thermostat daily program to run on Mondays. */ monday_program_id?: string | undefined /** * ID of the thermostat daily program to run on Saturdays. */ saturday_program_id?: string | undefined /** * ID of the thermostat daily program to run on Sundays. */ sunday_program_id?: string | undefined /** * ID of the thermostat daily program to run on Thursdays. */ thursday_program_id?: string | undefined /** * ID of the thermostat daily program to run on Tuesdays. */ tuesday_program_id?: string | undefined /** * ID of the thermostat daily program to run on Wednesdays. */ wednesday_program_id?: string | undefined } /** * @deprecated Use ThermostatsUpdateWeeklyProgramRequest instead. */ export type ThermostatsUpdateWeeklyProgramResponse = { action_attempt: ActionAttempt } export type ThermostatsUpdateWeeklyProgramRequest = SeamHttpRequest< ThermostatsUpdateWeeklyProgramResponse, 'action_attempt' > export type ThermostatsUpdateWeeklyProgramOptions = Pick< SeamHttpRequestOptions, 'waitForActionAttempt' >