Skip to content

Commit

Permalink
Update return values to match current SDK
Browse files Browse the repository at this point in the history
  • Loading branch information
razor-x committed Dec 7, 2023
1 parent bfb43e7 commit 3593fa9
Show file tree
Hide file tree
Showing 4 changed files with 209 additions and 29 deletions.
25 changes: 24 additions & 1 deletion generate-routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,31 @@ const ignoredEndpointPaths = [
'/noise_sensors/simulate/trigger_noise_threshold',
] as const

const endpointResources: Partial<Record<keyof typeof openapi.paths, null>> = {
const endpointResources: Partial<
Record<keyof typeof openapi.paths, null | 'action_attempt'>
> = {
// returns action attempt from current SDK, correct
'/locks/lock_door': 'action_attempt',
'/locks/unlock_door': 'action_attempt',

// returns action attempt from current SDK, deprecated
'/access_codes/update': 'action_attempt',
'/access_codes/unmanaged/convert_to_managed': 'action_attempt',
'/access_codes/delete': 'action_attempt',
'/thermostats/set_fan_mode': 'action_attempt',
'/thermostats/heat': 'action_attempt',
'/thermostats/heat_cool': 'action_attempt',
'/thermostats/cool': 'action_attempt',
'/thermostats/off': 'action_attempt',

// returns void in current SDK and correct API design
'/connect_webviews/view': null,
'/access_codes/unmanaged/delete': null,
'/noise_sensors/noise_thresholds/create': null,
'/noise_sensors/noise_thresholds/delete': null,
'/noise_sensors/noise_thresholds/update': null,
'/thermostats/climate_setting_schedules/update': null,
'/workspaces/reset_sandbox': null,
} as const

interface Route {
Expand Down
34 changes: 27 additions & 7 deletions src/lib/seam/connect/routes/access-codes-unmanaged.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

52 changes: 46 additions & 6 deletions src/lib/seam/connect/routes/access-codes.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

127 changes: 112 additions & 15 deletions src/lib/seam/connect/routes/thermostats.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 3593fa9

Please sign in to comment.