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

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 50 additions & 3 deletions src/lib/seam/connect/route-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -468,12 +468,12 @@ export interface Routes {
queryParams: {}
jsonBody: {}
commonParams: {
acs_id: string
acs_system_id: string
}
formData: {}
jsonResponse: {
acs_system: {
acs_id: string
acs_system_id: string
system_type: 'pti_site' | 'alta_org'
name: string
created_at: string | Date
Expand All @@ -489,13 +489,48 @@ export interface Routes {
formData: {}
jsonResponse: {
acs_systems: Array<{
acs_id: string
acs_system_id: string
system_type: 'pti_site' | 'alta_org'
name: string
created_at: string | Date
}>
}
}
'/acs/users/create': {
route: '/acs/users/create'
method: 'POST'
queryParams: {}
jsonBody: {}
commonParams: {
acs_system_id: string
name?: string | undefined
email?: string | undefined
acs_access_group_ids?: string[]
}
formData: {}
jsonResponse: {
acs_user: {
acs_user_id: string
acs_system_id: string
workspace_id: string
name: string
created_at: string | Date
}
}
}
'/acs/users/update': {
route: '/acs/users/update'
method: 'POST' | 'PATCH'
queryParams: {}
jsonBody: {}
commonParams: {
acs_user_id: string
name?: (string | null) | undefined
email?: (string | null) | undefined
}
formData: {}
jsonResponse: {}
}
'/action_attempts/get': {
route: '/action_attempts/get'
method: 'GET' | 'POST'
Expand Down Expand Up @@ -1214,6 +1249,7 @@ export interface Routes {
is_heating?: boolean | undefined
is_cooling?: boolean | undefined
is_fan_running?: boolean | undefined
fan_mode_setting?: ('auto' | 'on') | undefined
is_temporary_manual_override_active?: boolean | undefined
current_climate_setting?:
| {
Expand Down Expand Up @@ -1304,6 +1340,7 @@ export interface Routes {
is_heating?: boolean | undefined
is_cooling?: boolean | undefined
is_fan_running?: boolean | undefined
fan_mode_setting?: ('auto' | 'on') | undefined
is_temporary_manual_override_active?: boolean | undefined
current_climate_setting?:
| {
Expand Down Expand Up @@ -1388,6 +1425,7 @@ export interface Routes {
is_heating?: boolean | undefined
is_cooling?: boolean | undefined
is_fan_running?: boolean | undefined
fan_mode_setting?: ('auto' | 'on') | undefined
is_temporary_manual_override_active?: boolean | undefined
current_climate_setting?:
| {
Expand Down Expand Up @@ -1891,6 +1929,7 @@ export interface Routes {
is_heating?: boolean | undefined
is_cooling?: boolean | undefined
is_fan_running?: boolean | undefined
fan_mode_setting?: ('auto' | 'on') | undefined
is_temporary_manual_override_active?: boolean | undefined
current_climate_setting?:
| {
Expand Down Expand Up @@ -1981,6 +2020,7 @@ export interface Routes {
is_heating?: boolean | undefined
is_cooling?: boolean | undefined
is_fan_running?: boolean | undefined
fan_mode_setting?: ('auto' | 'on') | undefined
is_temporary_manual_override_active?: boolean | undefined
current_climate_setting?:
| {
Expand Down Expand Up @@ -2065,6 +2105,7 @@ export interface Routes {
is_heating?: boolean | undefined
is_cooling?: boolean | undefined
is_fan_running?: boolean | undefined
fan_mode_setting?: ('auto' | 'on') | undefined
is_temporary_manual_override_active?: boolean | undefined
current_climate_setting?:
| {
Expand Down Expand Up @@ -3517,6 +3558,7 @@ export interface Routes {
is_heating?: boolean | undefined
is_cooling?: boolean | undefined
is_fan_running?: boolean | undefined
fan_mode_setting?: ('auto' | 'on') | undefined
is_temporary_manual_override_active?: boolean | undefined
current_climate_setting?:
| {
Expand Down Expand Up @@ -3607,6 +3649,7 @@ export interface Routes {
is_heating?: boolean | undefined
is_cooling?: boolean | undefined
is_fan_running?: boolean | undefined
fan_mode_setting?: ('auto' | 'on') | undefined
is_temporary_manual_override_active?: boolean | undefined
current_climate_setting?:
| {
Expand Down Expand Up @@ -3691,6 +3734,7 @@ export interface Routes {
is_heating?: boolean | undefined
is_cooling?: boolean | undefined
is_fan_running?: boolean | undefined
fan_mode_setting?: ('auto' | 'on') | undefined
is_temporary_manual_override_active?: boolean | undefined
current_climate_setting?:
| {
Expand Down Expand Up @@ -4224,6 +4268,7 @@ export interface Routes {
is_heating?: boolean | undefined
is_cooling?: boolean | undefined
is_fan_running?: boolean | undefined
fan_mode_setting?: ('auto' | 'on') | undefined
is_temporary_manual_override_active?: boolean | undefined
current_climate_setting?:
| {
Expand Down Expand Up @@ -4314,6 +4359,7 @@ export interface Routes {
is_heating?: boolean | undefined
is_cooling?: boolean | undefined
is_fan_running?: boolean | undefined
fan_mode_setting?: ('auto' | 'on') | undefined
is_temporary_manual_override_active?: boolean | undefined
current_climate_setting?:
| {
Expand Down Expand Up @@ -4398,6 +4444,7 @@ export interface Routes {
is_heating?: boolean | undefined
is_cooling?: boolean | undefined
is_fan_running?: boolean | undefined
fan_mode_setting?: ('auto' | 'on') | undefined
is_temporary_manual_override_active?: boolean | undefined
current_climate_setting?:
| {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ export const hvac_mode_setting = z.enum(['off', 'heat', 'cool', 'heat_cool'])

export type HvacModeSetting = z.infer<typeof hvac_mode_setting>

export const fan_mode_setting = z.enum(['auto', 'on'])

export type FanModeSetting = z.infer<typeof fan_mode_setting>

export const climate_setting = z.object({
automatic_heating_enabled: z.boolean(),
automatic_cooling_enabled: z.boolean(),
Expand Down Expand Up @@ -41,6 +45,7 @@ const base_thermostat_capability_properties = z.object({
is_heating: z.boolean(),
is_cooling: z.boolean(),
is_fan_running: z.boolean(),
fan_mode_setting,

/**
* this is true if the current thermostat settings differ that what is on seam, and `current_climate_setting.manual_override_allowed: true`
Expand Down