diff --git a/generate-routes.ts b/generate-routes.ts index a0424f32..193959c7 100644 --- a/generate-routes.ts +++ b/generate-routes.ts @@ -316,7 +316,6 @@ const renderClassMethod = ({ }: ${renderRequestType({ name, namespace, - requestFormat, })}, ): Promise<${ resource === null @@ -363,7 +362,6 @@ const renderEndpointExports = ({ export type ${renderRequestType({ name, namespace, - requestFormat, })} = RouteRequest${pascalCase(requestFormat)}<'${path}'> export type ${renderResponseType({ name, namespace })}= SetNonNullable< @@ -374,9 +372,22 @@ export type ${renderResponseType({ name, namespace })}= SetNonNullable< const renderRequestType = ({ name, namespace, - requestFormat, -}: Pick): string => - [pascalCase(namespace), pascalCase(name), pascalCase(requestFormat)].join('') +}: Pick): string => + [ + pascalCase(namespace), + pascalCase(name), + pascalCase(requestFormatToRequestType(name, namespace)), + ].join('') + +// UPSTREAM: Should be just requestFormat, but blocked on https://github.com/seamapi/nextlove/issues/117 +const requestFormatToRequestType = ( + name: string, + _namespace: string, +): 'params' | 'body' => { + if (['get', 'list', 'view'].includes(name)) return 'params' + if (name.startsWith('list')) return 'params' + return 'body' +} const renderResponseType = ({ name, diff --git a/src/lib/seam/connect/routes/access-codes-unmanaged.ts b/src/lib/seam/connect/routes/access-codes-unmanaged.ts index 665824d9..d0f26eaf 100644 --- a/src/lib/seam/connect/routes/access-codes-unmanaged.ts +++ b/src/lib/seam/connect/routes/access-codes-unmanaged.ts @@ -101,7 +101,7 @@ export class SeamHttpAccessCodesUnmanaged { } async get( - body: AccessCodesUnmanagedGetBody, + body: AccessCodesUnmanagedGetParams, ): Promise { const { data } = await this.client.request( { @@ -114,7 +114,7 @@ export class SeamHttpAccessCodesUnmanaged { } async list( - body: AccessCodesUnmanagedListBody, + body: AccessCodesUnmanagedListParams, ): Promise { const { data } = await this.client.request({ @@ -148,14 +148,14 @@ export type AccessCodesUnmanagedDeleteResponse = SetNonNullable< Required> > -export type AccessCodesUnmanagedGetBody = +export type AccessCodesUnmanagedGetParams = RouteRequestBody<'/access_codes/unmanaged/get'> export type AccessCodesUnmanagedGetResponse = SetNonNullable< Required> > -export type AccessCodesUnmanagedListBody = +export type AccessCodesUnmanagedListParams = RouteRequestBody<'/access_codes/unmanaged/list'> export type AccessCodesUnmanagedListResponse = SetNonNullable< diff --git a/src/lib/seam/connect/routes/access-codes.ts b/src/lib/seam/connect/routes/access-codes.ts index 45d5ce21..53bffa9f 100644 --- a/src/lib/seam/connect/routes/access-codes.ts +++ b/src/lib/seam/connect/routes/access-codes.ts @@ -132,7 +132,7 @@ export class SeamHttpAccessCodes { } async get( - body: AccessCodesGetBody, + body: AccessCodesGetParams, ): Promise { const { data } = await this.client.request({ url: '/access_codes/get', @@ -143,7 +143,7 @@ export class SeamHttpAccessCodes { } async list( - body: AccessCodesListBody, + body: AccessCodesListParams, ): Promise { const { data } = await this.client.request({ url: '/access_codes/list', @@ -200,13 +200,13 @@ export type AccessCodesGenerateCodeResponse = SetNonNullable< Required> > -export type AccessCodesGetBody = RouteRequestBody<'/access_codes/get'> +export type AccessCodesGetParams = RouteRequestBody<'/access_codes/get'> export type AccessCodesGetResponse = SetNonNullable< Required> > -export type AccessCodesListBody = RouteRequestBody<'/access_codes/list'> +export type AccessCodesListParams = RouteRequestBody<'/access_codes/list'> export type AccessCodesListResponse = SetNonNullable< Required> diff --git a/src/lib/seam/connect/routes/acs-access-groups.ts b/src/lib/seam/connect/routes/acs-access-groups.ts index 86c9ce6d..3cca37d8 100644 --- a/src/lib/seam/connect/routes/acs-access-groups.ts +++ b/src/lib/seam/connect/routes/acs-access-groups.ts @@ -110,7 +110,7 @@ export class SeamHttpAcsAccessGroups { } async get( - body: AcsAccessGroupsGetBody, + body: AcsAccessGroupsGetParams, ): Promise { const { data } = await this.client.request({ url: '/acs/access_groups/get', @@ -121,7 +121,7 @@ export class SeamHttpAcsAccessGroups { } async list( - body: AcsAccessGroupsListBody, + body: AcsAccessGroupsListParams, ): Promise { const { data } = await this.client.request({ url: '/acs/access_groups/list', @@ -132,7 +132,7 @@ export class SeamHttpAcsAccessGroups { } async listUsers( - body: AcsAccessGroupsListUsersBody, + body: AcsAccessGroupsListUsersParams, ): Promise { const { data } = await this.client.request({ @@ -181,20 +181,21 @@ export type AcsAccessGroupsDeleteResponse = SetNonNullable< Required> > -export type AcsAccessGroupsGetBody = RouteRequestBody<'/acs/access_groups/get'> +export type AcsAccessGroupsGetParams = + RouteRequestBody<'/acs/access_groups/get'> export type AcsAccessGroupsGetResponse = SetNonNullable< Required> > -export type AcsAccessGroupsListBody = +export type AcsAccessGroupsListParams = RouteRequestBody<'/acs/access_groups/list'> export type AcsAccessGroupsListResponse = SetNonNullable< Required> > -export type AcsAccessGroupsListUsersBody = +export type AcsAccessGroupsListUsersParams = RouteRequestBody<'/acs/access_groups/list_users'> export type AcsAccessGroupsListUsersResponse = SetNonNullable< diff --git a/src/lib/seam/connect/routes/acs-credentials.ts b/src/lib/seam/connect/routes/acs-credentials.ts index b982bc81..988d85bd 100644 --- a/src/lib/seam/connect/routes/acs-credentials.ts +++ b/src/lib/seam/connect/routes/acs-credentials.ts @@ -102,7 +102,7 @@ export class SeamHttpAcsCredentials { } async get( - body: AcsCredentialsGetBody, + body: AcsCredentialsGetParams, ): Promise { const { data } = await this.client.request({ url: '/acs/credentials/get', @@ -113,7 +113,7 @@ export class SeamHttpAcsCredentials { } async list( - body: AcsCredentialsListBody, + body: AcsCredentialsListParams, ): Promise { const { data } = await this.client.request({ url: '/acs/credentials/list', @@ -138,13 +138,13 @@ export type AcsCredentialsDeleteResponse = SetNonNullable< Required> > -export type AcsCredentialsGetBody = RouteRequestBody<'/acs/credentials/get'> +export type AcsCredentialsGetParams = RouteRequestBody<'/acs/credentials/get'> export type AcsCredentialsGetResponse = SetNonNullable< Required> > -export type AcsCredentialsListBody = RouteRequestBody<'/acs/credentials/list'> +export type AcsCredentialsListParams = RouteRequestBody<'/acs/credentials/list'> export type AcsCredentialsListResponse = SetNonNullable< Required> diff --git a/src/lib/seam/connect/routes/acs-systems.ts b/src/lib/seam/connect/routes/acs-systems.ts index acdf205a..a23b6653 100644 --- a/src/lib/seam/connect/routes/acs-systems.ts +++ b/src/lib/seam/connect/routes/acs-systems.ts @@ -83,7 +83,7 @@ export class SeamHttpAcsSystems { } async get( - body: AcsSystemsGetBody, + body: AcsSystemsGetParams, ): Promise { const { data } = await this.client.request({ url: '/acs/systems/get', @@ -94,7 +94,7 @@ export class SeamHttpAcsSystems { } async list( - body: AcsSystemsListBody, + body: AcsSystemsListParams, ): Promise { const { data } = await this.client.request({ url: '/acs/systems/list', @@ -105,13 +105,13 @@ export class SeamHttpAcsSystems { } } -export type AcsSystemsGetBody = RouteRequestBody<'/acs/systems/get'> +export type AcsSystemsGetParams = RouteRequestBody<'/acs/systems/get'> export type AcsSystemsGetResponse = SetNonNullable< Required> > -export type AcsSystemsListBody = RouteRequestBody<'/acs/systems/list'> +export type AcsSystemsListParams = RouteRequestBody<'/acs/systems/list'> export type AcsSystemsListResponse = SetNonNullable< Required> diff --git a/src/lib/seam/connect/routes/acs-users.ts b/src/lib/seam/connect/routes/acs-users.ts index 91656540..b51ad852 100644 --- a/src/lib/seam/connect/routes/acs-users.ts +++ b/src/lib/seam/connect/routes/acs-users.ts @@ -109,7 +109,7 @@ export class SeamHttpAcsUsers { }) } - async get(body: AcsUsersGetBody): Promise { + async get(body: AcsUsersGetParams): Promise { const { data } = await this.client.request({ url: '/acs/users/get', method: 'post', @@ -119,7 +119,7 @@ export class SeamHttpAcsUsers { } async list( - body: AcsUsersListBody, + body: AcsUsersListParams, ): Promise { const { data } = await this.client.request({ url: '/acs/users/list', @@ -183,13 +183,13 @@ export type AcsUsersDeleteResponse = SetNonNullable< Required> > -export type AcsUsersGetBody = RouteRequestBody<'/acs/users/get'> +export type AcsUsersGetParams = RouteRequestBody<'/acs/users/get'> export type AcsUsersGetResponse = SetNonNullable< Required> > -export type AcsUsersListBody = RouteRequestBody<'/acs/users/list'> +export type AcsUsersListParams = RouteRequestBody<'/acs/users/list'> export type AcsUsersListResponse = SetNonNullable< Required> diff --git a/src/lib/seam/connect/routes/action-attempts.ts b/src/lib/seam/connect/routes/action-attempts.ts index f418ce53..42e1cea4 100644 --- a/src/lib/seam/connect/routes/action-attempts.ts +++ b/src/lib/seam/connect/routes/action-attempts.ts @@ -83,7 +83,7 @@ export class SeamHttpActionAttempts { } async get( - body: ActionAttemptsGetBody, + body: ActionAttemptsGetParams, ): Promise { const { data } = await this.client.request({ url: '/action_attempts/get', @@ -94,7 +94,7 @@ export class SeamHttpActionAttempts { } async list( - body: ActionAttemptsListBody, + body: ActionAttemptsListParams, ): Promise { const { data } = await this.client.request({ url: '/action_attempts/list', @@ -105,13 +105,13 @@ export class SeamHttpActionAttempts { } } -export type ActionAttemptsGetBody = RouteRequestBody<'/action_attempts/get'> +export type ActionAttemptsGetParams = RouteRequestBody<'/action_attempts/get'> export type ActionAttemptsGetResponse = SetNonNullable< Required> > -export type ActionAttemptsListBody = RouteRequestBody<'/action_attempts/list'> +export type ActionAttemptsListParams = RouteRequestBody<'/action_attempts/list'> export type ActionAttemptsListResponse = SetNonNullable< Required> diff --git a/src/lib/seam/connect/routes/client-sessions.ts b/src/lib/seam/connect/routes/client-sessions.ts index 7d938823..b4a00bdc 100644 --- a/src/lib/seam/connect/routes/client-sessions.ts +++ b/src/lib/seam/connect/routes/client-sessions.ts @@ -100,7 +100,7 @@ export class SeamHttpClientSessions { } async get( - body: ClientSessionsGetBody, + body: ClientSessionsGetParams, ): Promise { const { data } = await this.client.request({ url: '/client_sessions/get', @@ -135,7 +135,7 @@ export class SeamHttpClientSessions { } async list( - body: ClientSessionsListBody, + body: ClientSessionsListParams, ): Promise { const { data } = await this.client.request({ url: '/client_sessions/list', @@ -160,7 +160,7 @@ export type ClientSessionsDeleteResponse = SetNonNullable< Required> > -export type ClientSessionsGetBody = RouteRequestBody<'/client_sessions/get'> +export type ClientSessionsGetParams = RouteRequestBody<'/client_sessions/get'> export type ClientSessionsGetResponse = SetNonNullable< Required> @@ -180,7 +180,7 @@ export type ClientSessionsGrantAccessResponse = SetNonNullable< Required> > -export type ClientSessionsListBody = RouteRequestBody<'/client_sessions/list'> +export type ClientSessionsListParams = RouteRequestBody<'/client_sessions/list'> export type ClientSessionsListResponse = SetNonNullable< Required> diff --git a/src/lib/seam/connect/routes/connect-webviews.ts b/src/lib/seam/connect/routes/connect-webviews.ts index e4802631..50f21440 100644 --- a/src/lib/seam/connect/routes/connect-webviews.ts +++ b/src/lib/seam/connect/routes/connect-webviews.ts @@ -106,7 +106,7 @@ export class SeamHttpConnectWebviews { } async get( - body: ConnectWebviewsGetBody, + body: ConnectWebviewsGetParams, ): Promise { const { data } = await this.client.request({ url: '/connect_webviews/get', @@ -117,7 +117,7 @@ export class SeamHttpConnectWebviews { } async list( - body: ConnectWebviewsListBody, + body: ConnectWebviewsListParams, ): Promise { const { data } = await this.client.request({ url: '/connect_webviews/list', @@ -150,13 +150,14 @@ export type ConnectWebviewsDeleteResponse = SetNonNullable< Required> > -export type ConnectWebviewsGetBody = RouteRequestBody<'/connect_webviews/get'> +export type ConnectWebviewsGetParams = RouteRequestBody<'/connect_webviews/get'> export type ConnectWebviewsGetResponse = SetNonNullable< Required> > -export type ConnectWebviewsListBody = RouteRequestBody<'/connect_webviews/list'> +export type ConnectWebviewsListParams = + RouteRequestBody<'/connect_webviews/list'> export type ConnectWebviewsListResponse = SetNonNullable< Required> diff --git a/src/lib/seam/connect/routes/connected-accounts.ts b/src/lib/seam/connect/routes/connected-accounts.ts index 9b4499a3..e301ddce 100644 --- a/src/lib/seam/connect/routes/connected-accounts.ts +++ b/src/lib/seam/connect/routes/connected-accounts.ts @@ -95,7 +95,7 @@ export class SeamHttpConnectedAccounts { } async get( - body: ConnectedAccountsGetBody, + body: ConnectedAccountsGetParams, ): Promise { const { data } = await this.client.request({ url: '/connected_accounts/get', @@ -124,7 +124,7 @@ export type ConnectedAccountsDeleteResponse = SetNonNullable< Required> > -export type ConnectedAccountsGetBody = +export type ConnectedAccountsGetParams = RouteRequestBody<'/connected_accounts/get'> export type ConnectedAccountsGetResponse = SetNonNullable< diff --git a/src/lib/seam/connect/routes/devices-unmanaged.ts b/src/lib/seam/connect/routes/devices-unmanaged.ts index bf6d9941..92dbe8f6 100644 --- a/src/lib/seam/connect/routes/devices-unmanaged.ts +++ b/src/lib/seam/connect/routes/devices-unmanaged.ts @@ -83,7 +83,7 @@ export class SeamHttpDevicesUnmanaged { } async get( - body: DevicesUnmanagedGetBody, + body: DevicesUnmanagedGetParams, ): Promise { const { data } = await this.client.request({ url: '/devices/unmanaged/get', @@ -94,7 +94,7 @@ export class SeamHttpDevicesUnmanaged { } async list( - body: DevicesUnmanagedListBody, + body: DevicesUnmanagedListParams, ): Promise { const { data } = await this.client.request({ url: '/devices/unmanaged/list', @@ -113,13 +113,14 @@ export class SeamHttpDevicesUnmanaged { } } -export type DevicesUnmanagedGetBody = RouteRequestBody<'/devices/unmanaged/get'> +export type DevicesUnmanagedGetParams = + RouteRequestBody<'/devices/unmanaged/get'> export type DevicesUnmanagedGetResponse = SetNonNullable< Required> > -export type DevicesUnmanagedListBody = +export type DevicesUnmanagedListParams = RouteRequestBody<'/devices/unmanaged/list'> export type DevicesUnmanagedListResponse = SetNonNullable< diff --git a/src/lib/seam/connect/routes/devices.ts b/src/lib/seam/connect/routes/devices.ts index b468f2d1..09f384e5 100644 --- a/src/lib/seam/connect/routes/devices.ts +++ b/src/lib/seam/connect/routes/devices.ts @@ -95,7 +95,7 @@ export class SeamHttpDevices { }) } - async get(body: DevicesGetBody): Promise { + async get(body: DevicesGetParams): Promise { const { data } = await this.client.request({ url: '/devices/get', method: 'post', @@ -104,7 +104,7 @@ export class SeamHttpDevices { return data.device } - async list(body: DevicesListBody): Promise { + async list(body: DevicesListParams): Promise { const { data } = await this.client.request({ url: '/devices/list', method: 'post', @@ -114,7 +114,7 @@ export class SeamHttpDevices { } async listDeviceProviders( - body: DevicesListDeviceProvidersBody, + body: DevicesListDeviceProvidersParams, ): Promise { const { data } = await this.client.request({ @@ -140,19 +140,19 @@ export type DevicesDeleteResponse = SetNonNullable< Required> > -export type DevicesGetBody = RouteRequestBody<'/devices/get'> +export type DevicesGetParams = RouteRequestBody<'/devices/get'> export type DevicesGetResponse = SetNonNullable< Required> > -export type DevicesListBody = RouteRequestBody<'/devices/list'> +export type DevicesListParams = RouteRequestBody<'/devices/list'> export type DevicesListResponse = SetNonNullable< Required> > -export type DevicesListDeviceProvidersBody = +export type DevicesListDeviceProvidersParams = RouteRequestBody<'/devices/list_device_providers'> export type DevicesListDeviceProvidersResponse = SetNonNullable< diff --git a/src/lib/seam/connect/routes/events.ts b/src/lib/seam/connect/routes/events.ts index bfd24d38..e30957db 100644 --- a/src/lib/seam/connect/routes/events.ts +++ b/src/lib/seam/connect/routes/events.ts @@ -82,7 +82,7 @@ export class SeamHttpEvents { return SeamHttpEvents.fromClientSessionToken(token, options) } - async get(body: EventsGetBody): Promise { + async get(body: EventsGetParams): Promise { const { data } = await this.client.request({ url: '/events/get', method: 'post', @@ -91,7 +91,7 @@ export class SeamHttpEvents { return data.event } - async list(body: EventsListBody): Promise { + async list(body: EventsListParams): Promise { const { data } = await this.client.request({ url: '/events/list', method: 'post', @@ -101,13 +101,13 @@ export class SeamHttpEvents { } } -export type EventsGetBody = RouteRequestBody<'/events/get'> +export type EventsGetParams = RouteRequestBody<'/events/get'> export type EventsGetResponse = SetNonNullable< Required> > -export type EventsListBody = RouteRequestBody<'/events/list'> +export type EventsListParams = RouteRequestBody<'/events/list'> export type EventsListResponse = SetNonNullable< Required> diff --git a/src/lib/seam/connect/routes/locks.ts b/src/lib/seam/connect/routes/locks.ts index b59a9245..0c3f061e 100644 --- a/src/lib/seam/connect/routes/locks.ts +++ b/src/lib/seam/connect/routes/locks.ts @@ -82,7 +82,7 @@ export class SeamHttpLocks { return SeamHttpLocks.fromClientSessionToken(token, options) } - async get(body: LocksGetBody): Promise { + async get(body: LocksGetParams): Promise { const { data } = await this.client.request({ url: '/locks/get', method: 'post', @@ -91,7 +91,7 @@ export class SeamHttpLocks { return data.device } - async list(body: LocksListBody): Promise { + async list(body: LocksListParams): Promise { const { data } = await this.client.request({ url: '/locks/list', method: 'post', @@ -123,13 +123,13 @@ export class SeamHttpLocks { } } -export type LocksGetBody = RouteRequestBody<'/locks/get'> +export type LocksGetParams = RouteRequestBody<'/locks/get'> export type LocksGetResponse = SetNonNullable< Required> > -export type LocksListBody = RouteRequestBody<'/locks/list'> +export type LocksListParams = RouteRequestBody<'/locks/list'> export type LocksListResponse = SetNonNullable< Required> diff --git a/src/lib/seam/connect/routes/noise-sensors-noise-thresholds.ts b/src/lib/seam/connect/routes/noise-sensors-noise-thresholds.ts index 0e6905f7..6efb61a2 100644 --- a/src/lib/seam/connect/routes/noise-sensors-noise-thresholds.ts +++ b/src/lib/seam/connect/routes/noise-sensors-noise-thresholds.ts @@ -102,7 +102,7 @@ export class SeamHttpNoiseSensorsNoiseThresholds { } async get( - body: NoiseSensorsNoiseThresholdsGetBody, + body: NoiseSensorsNoiseThresholdsGetParams, ): Promise { const { data } = await this.client.request({ @@ -114,7 +114,7 @@ export class SeamHttpNoiseSensorsNoiseThresholds { } async list( - body: NoiseSensorsNoiseThresholdsListBody, + body: NoiseSensorsNoiseThresholdsListParams, ): Promise { const { data } = await this.client.request({ @@ -148,14 +148,14 @@ export type NoiseSensorsNoiseThresholdsDeleteResponse = SetNonNullable< Required> > -export type NoiseSensorsNoiseThresholdsGetBody = +export type NoiseSensorsNoiseThresholdsGetParams = RouteRequestBody<'/noise_sensors/noise_thresholds/get'> export type NoiseSensorsNoiseThresholdsGetResponse = SetNonNullable< Required> > -export type NoiseSensorsNoiseThresholdsListBody = +export type NoiseSensorsNoiseThresholdsListParams = RouteRequestBody<'/noise_sensors/noise_thresholds/list'> export type NoiseSensorsNoiseThresholdsListResponse = SetNonNullable< diff --git a/src/lib/seam/connect/routes/thermostats-climate-setting-schedules.ts b/src/lib/seam/connect/routes/thermostats-climate-setting-schedules.ts index 3f36b825..f600279c 100644 --- a/src/lib/seam/connect/routes/thermostats-climate-setting-schedules.ts +++ b/src/lib/seam/connect/routes/thermostats-climate-setting-schedules.ts @@ -114,7 +114,7 @@ export class SeamHttpThermostatsClimateSettingSchedules { } async get( - body: ThermostatsClimateSettingSchedulesGetBody, + body: ThermostatsClimateSettingSchedulesGetParams, ): Promise< ThermostatsClimateSettingSchedulesGetResponse['climate_setting_schedule'] > { @@ -128,7 +128,7 @@ export class SeamHttpThermostatsClimateSettingSchedules { } async list( - body: ThermostatsClimateSettingSchedulesListBody, + body: ThermostatsClimateSettingSchedulesListParams, ): Promise< ThermostatsClimateSettingSchedulesListResponse['climate_setting_schedules'] > { @@ -170,14 +170,14 @@ export type ThermostatsClimateSettingSchedulesDeleteResponse = SetNonNullable< Required> > -export type ThermostatsClimateSettingSchedulesGetBody = +export type ThermostatsClimateSettingSchedulesGetParams = RouteRequestBody<'/thermostats/climate_setting_schedules/get'> export type ThermostatsClimateSettingSchedulesGetResponse = SetNonNullable< Required> > -export type ThermostatsClimateSettingSchedulesListBody = +export type ThermostatsClimateSettingSchedulesListParams = RouteRequestBody<'/thermostats/climate_setting_schedules/list'> export type ThermostatsClimateSettingSchedulesListResponse = SetNonNullable< diff --git a/src/lib/seam/connect/routes/thermostats.ts b/src/lib/seam/connect/routes/thermostats.ts index 05eaefcc..7ef5b244 100644 --- a/src/lib/seam/connect/routes/thermostats.ts +++ b/src/lib/seam/connect/routes/thermostats.ts @@ -96,7 +96,7 @@ export class SeamHttpThermostats { } async get( - body: ThermostatsGetBody, + body: ThermostatsGetParams, ): Promise { const { data } = await this.client.request({ url: '/thermostats/get', @@ -123,7 +123,7 @@ export class SeamHttpThermostats { } async list( - body: ThermostatsListBody, + body: ThermostatsListParams, ): Promise { const { data } = await this.client.request({ url: '/thermostats/list', @@ -164,7 +164,7 @@ export type ThermostatsCoolResponse = SetNonNullable< Required> > -export type ThermostatsGetBody = RouteRequestBody<'/thermostats/get'> +export type ThermostatsGetParams = RouteRequestBody<'/thermostats/get'> export type ThermostatsGetResponse = SetNonNullable< Required> @@ -182,7 +182,7 @@ export type ThermostatsHeatCoolResponse = SetNonNullable< Required> > -export type ThermostatsListBody = RouteRequestBody<'/thermostats/list'> +export type ThermostatsListParams = RouteRequestBody<'/thermostats/list'> export type ThermostatsListResponse = SetNonNullable< Required> diff --git a/src/lib/seam/connect/routes/webhooks.ts b/src/lib/seam/connect/routes/webhooks.ts index 9b27077d..7780ef68 100644 --- a/src/lib/seam/connect/routes/webhooks.ts +++ b/src/lib/seam/connect/routes/webhooks.ts @@ -105,7 +105,7 @@ export class SeamHttpWebhooks { }) } - async get(body: WebhooksGetBody): Promise { + async get(body: WebhooksGetParams): Promise { const { data } = await this.client.request({ url: '/webhooks/get', method: 'post', @@ -138,7 +138,7 @@ export type WebhooksDeleteResponse = SetNonNullable< Required> > -export type WebhooksGetBody = RouteRequestBody<'/webhooks/get'> +export type WebhooksGetParams = RouteRequestBody<'/webhooks/get'> export type WebhooksGetResponse = SetNonNullable< Required>