@seamapi/http 0.2.1 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (75) hide show
  1. package/dist/connect.cjs +12 -1
  2. package/dist/connect.cjs.map +1 -1
  3. package/dist/connect.d.cts +129 -124
  4. package/lib/seam/connect/client.js +1 -0
  5. package/lib/seam/connect/client.js.map +1 -1
  6. package/lib/seam/connect/index.d.ts +1 -0
  7. package/lib/seam/connect/index.js +1 -0
  8. package/lib/seam/connect/index.js.map +1 -1
  9. package/lib/seam/connect/parse-options.js +6 -0
  10. package/lib/seam/connect/parse-options.js.map +1 -1
  11. package/lib/seam/connect/routes/access-codes-unmanaged.d.ts +7 -7
  12. package/lib/seam/connect/routes/access-codes-unmanaged.js.map +1 -1
  13. package/lib/seam/connect/routes/access-codes.d.ts +10 -10
  14. package/lib/seam/connect/routes/access-codes.js.map +1 -1
  15. package/lib/seam/connect/routes/acs-access-groups.d.ts +11 -11
  16. package/lib/seam/connect/routes/acs-access-groups.js.map +1 -1
  17. package/lib/seam/connect/routes/acs-credentials.d.ts +6 -6
  18. package/lib/seam/connect/routes/acs-credentials.js.map +1 -1
  19. package/lib/seam/connect/routes/acs-systems.d.ts +4 -4
  20. package/lib/seam/connect/routes/acs-systems.js.map +1 -1
  21. package/lib/seam/connect/routes/acs-users.d.ts +11 -11
  22. package/lib/seam/connect/routes/acs-users.js.map +1 -1
  23. package/lib/seam/connect/routes/action-attempts.d.ts +4 -4
  24. package/lib/seam/connect/routes/action-attempts.js.map +1 -1
  25. package/lib/seam/connect/routes/client-sessions.d.ts +8 -8
  26. package/lib/seam/connect/routes/client-sessions.js.map +1 -1
  27. package/lib/seam/connect/routes/connect-webviews.d.ts +6 -6
  28. package/lib/seam/connect/routes/connect-webviews.js.map +1 -1
  29. package/lib/seam/connect/routes/connected-accounts.d.ts +3 -3
  30. package/lib/seam/connect/routes/connected-accounts.js.map +1 -1
  31. package/lib/seam/connect/routes/devices-unmanaged.d.ts +5 -5
  32. package/lib/seam/connect/routes/devices-unmanaged.js.map +1 -1
  33. package/lib/seam/connect/routes/devices.d.ts +8 -8
  34. package/lib/seam/connect/routes/devices.js.map +1 -1
  35. package/lib/seam/connect/routes/events.d.ts +4 -4
  36. package/lib/seam/connect/routes/events.js.map +1 -1
  37. package/lib/seam/connect/routes/locks.d.ts +6 -6
  38. package/lib/seam/connect/routes/locks.js.map +1 -1
  39. package/lib/seam/connect/routes/noise-sensors-noise-thresholds.d.ts +7 -7
  40. package/lib/seam/connect/routes/noise-sensors-noise-thresholds.js.map +1 -1
  41. package/lib/seam/connect/routes/thermostats-climate-setting-schedules.d.ts +7 -7
  42. package/lib/seam/connect/routes/thermostats-climate-setting-schedules.js.map +1 -1
  43. package/lib/seam/connect/routes/thermostats.d.ts +10 -10
  44. package/lib/seam/connect/routes/thermostats.js.map +1 -1
  45. package/lib/seam/connect/routes/webhooks.d.ts +4 -4
  46. package/lib/seam/connect/routes/webhooks.js.map +1 -1
  47. package/lib/seam/connect/routes/workspaces.d.ts +1 -1
  48. package/lib/seam/connect/routes/workspaces.js.map +1 -1
  49. package/lib/version.d.ts +2 -0
  50. package/lib/version.js +3 -0
  51. package/lib/version.js.map +1 -0
  52. package/package.json +4 -2
  53. package/src/lib/seam/connect/client.ts +1 -0
  54. package/src/lib/seam/connect/index.ts +1 -0
  55. package/src/lib/seam/connect/parse-options.ts +8 -0
  56. package/src/lib/seam/connect/routes/access-codes-unmanaged.ts +7 -7
  57. package/src/lib/seam/connect/routes/access-codes.ts +10 -10
  58. package/src/lib/seam/connect/routes/acs-access-groups.ts +12 -11
  59. package/src/lib/seam/connect/routes/acs-credentials.ts +6 -6
  60. package/src/lib/seam/connect/routes/acs-systems.ts +4 -4
  61. package/src/lib/seam/connect/routes/acs-users.ts +13 -11
  62. package/src/lib/seam/connect/routes/action-attempts.ts +4 -4
  63. package/src/lib/seam/connect/routes/client-sessions.ts +8 -8
  64. package/src/lib/seam/connect/routes/connect-webviews.ts +7 -6
  65. package/src/lib/seam/connect/routes/connected-accounts.ts +3 -3
  66. package/src/lib/seam/connect/routes/devices-unmanaged.ts +6 -5
  67. package/src/lib/seam/connect/routes/devices.ts +10 -8
  68. package/src/lib/seam/connect/routes/events.ts +4 -4
  69. package/src/lib/seam/connect/routes/locks.ts +6 -6
  70. package/src/lib/seam/connect/routes/noise-sensors-noise-thresholds.ts +7 -7
  71. package/src/lib/seam/connect/routes/thermostats-climate-setting-schedules.ts +7 -7
  72. package/src/lib/seam/connect/routes/thermostats.ts +10 -10
  73. package/src/lib/seam/connect/routes/webhooks.ts +4 -4
  74. package/src/lib/seam/connect/routes/workspaces.ts +1 -1
  75. package/src/lib/version.ts +3 -0
@@ -83,7 +83,7 @@ export class SeamHttpAcsCredentials {
83
83
  }
84
84
 
85
85
  async create(
86
- body: AcsCredentialsCreateBody,
86
+ body?: AcsCredentialsCreateBody,
87
87
  ): Promise<AcsCredentialsCreateResponse['acs_credential']> {
88
88
  const { data } = await this.client.request<AcsCredentialsCreateResponse>({
89
89
  url: '/acs/credentials/create',
@@ -93,7 +93,7 @@ export class SeamHttpAcsCredentials {
93
93
  return data.acs_credential
94
94
  }
95
95
 
96
- async delete(body: AcsCredentialsDeleteBody): Promise<void> {
96
+ async delete(body?: AcsCredentialsDeleteBody): Promise<void> {
97
97
  await this.client.request<AcsCredentialsDeleteResponse>({
98
98
  url: '/acs/credentials/delete',
99
99
  method: 'post',
@@ -102,7 +102,7 @@ export class SeamHttpAcsCredentials {
102
102
  }
103
103
 
104
104
  async get(
105
- body: AcsCredentialsGetBody,
105
+ body?: AcsCredentialsGetParams,
106
106
  ): Promise<AcsCredentialsGetResponse['acs_credential']> {
107
107
  const { data } = await this.client.request<AcsCredentialsGetResponse>({
108
108
  url: '/acs/credentials/get',
@@ -113,7 +113,7 @@ export class SeamHttpAcsCredentials {
113
113
  }
114
114
 
115
115
  async list(
116
- body: AcsCredentialsListBody,
116
+ body?: AcsCredentialsListParams,
117
117
  ): Promise<AcsCredentialsListResponse['acs_credentials']> {
118
118
  const { data } = await this.client.request<AcsCredentialsListResponse>({
119
119
  url: '/acs/credentials/list',
@@ -138,13 +138,13 @@ export type AcsCredentialsDeleteResponse = SetNonNullable<
138
138
  Required<RouteResponse<'/acs/credentials/delete'>>
139
139
  >
140
140
 
141
- export type AcsCredentialsGetBody = RouteRequestBody<'/acs/credentials/get'>
141
+ export type AcsCredentialsGetParams = RouteRequestBody<'/acs/credentials/get'>
142
142
 
143
143
  export type AcsCredentialsGetResponse = SetNonNullable<
144
144
  Required<RouteResponse<'/acs/credentials/get'>>
145
145
  >
146
146
 
147
- export type AcsCredentialsListBody = RouteRequestBody<'/acs/credentials/list'>
147
+ export type AcsCredentialsListParams = RouteRequestBody<'/acs/credentials/list'>
148
148
 
149
149
  export type AcsCredentialsListResponse = SetNonNullable<
150
150
  Required<RouteResponse<'/acs/credentials/list'>>
@@ -83,7 +83,7 @@ export class SeamHttpAcsSystems {
83
83
  }
84
84
 
85
85
  async get(
86
- body: AcsSystemsGetBody,
86
+ body?: AcsSystemsGetParams,
87
87
  ): Promise<AcsSystemsGetResponse['acs_system']> {
88
88
  const { data } = await this.client.request<AcsSystemsGetResponse>({
89
89
  url: '/acs/systems/get',
@@ -94,7 +94,7 @@ export class SeamHttpAcsSystems {
94
94
  }
95
95
 
96
96
  async list(
97
- body: AcsSystemsListBody,
97
+ body?: AcsSystemsListParams,
98
98
  ): Promise<AcsSystemsListResponse['acs_systems']> {
99
99
  const { data } = await this.client.request<AcsSystemsListResponse>({
100
100
  url: '/acs/systems/list',
@@ -105,13 +105,13 @@ export class SeamHttpAcsSystems {
105
105
  }
106
106
  }
107
107
 
108
- export type AcsSystemsGetBody = RouteRequestBody<'/acs/systems/get'>
108
+ export type AcsSystemsGetParams = RouteRequestBody<'/acs/systems/get'>
109
109
 
110
110
  export type AcsSystemsGetResponse = SetNonNullable<
111
111
  Required<RouteResponse<'/acs/systems/get'>>
112
112
  >
113
113
 
114
- export type AcsSystemsListBody = RouteRequestBody<'/acs/systems/list'>
114
+ export type AcsSystemsListParams = RouteRequestBody<'/acs/systems/list'>
115
115
 
116
116
  export type AcsSystemsListResponse = SetNonNullable<
117
117
  Required<RouteResponse<'/acs/systems/list'>>
@@ -82,7 +82,7 @@ export class SeamHttpAcsUsers {
82
82
  return SeamHttpAcsUsers.fromClientSessionToken(token, options)
83
83
  }
84
84
 
85
- async addToAccessGroup(body: AcsUsersAddToAccessGroupBody): Promise<void> {
85
+ async addToAccessGroup(body?: AcsUsersAddToAccessGroupBody): Promise<void> {
86
86
  await this.client.request<AcsUsersAddToAccessGroupResponse>({
87
87
  url: '/acs/users/add_to_access_group',
88
88
  method: 'post',
@@ -91,7 +91,7 @@ export class SeamHttpAcsUsers {
91
91
  }
92
92
 
93
93
  async create(
94
- body: AcsUsersCreateBody,
94
+ body?: AcsUsersCreateBody,
95
95
  ): Promise<AcsUsersCreateResponse['acs_user']> {
96
96
  const { data } = await this.client.request<AcsUsersCreateResponse>({
97
97
  url: '/acs/users/create',
@@ -101,7 +101,7 @@ export class SeamHttpAcsUsers {
101
101
  return data.acs_user
102
102
  }
103
103
 
104
- async delete(body: AcsUsersDeleteBody): Promise<void> {
104
+ async delete(body?: AcsUsersDeleteBody): Promise<void> {
105
105
  await this.client.request<AcsUsersDeleteResponse>({
106
106
  url: '/acs/users/delete',
107
107
  method: 'post',
@@ -109,7 +109,9 @@ export class SeamHttpAcsUsers {
109
109
  })
110
110
  }
111
111
 
112
- async get(body: AcsUsersGetBody): Promise<AcsUsersGetResponse['acs_user']> {
112
+ async get(
113
+ body?: AcsUsersGetParams,
114
+ ): Promise<AcsUsersGetResponse['acs_user']> {
113
115
  const { data } = await this.client.request<AcsUsersGetResponse>({
114
116
  url: '/acs/users/get',
115
117
  method: 'post',
@@ -119,7 +121,7 @@ export class SeamHttpAcsUsers {
119
121
  }
120
122
 
121
123
  async list(
122
- body: AcsUsersListBody,
124
+ body?: AcsUsersListParams,
123
125
  ): Promise<AcsUsersListResponse['acs_users']> {
124
126
  const { data } = await this.client.request<AcsUsersListResponse>({
125
127
  url: '/acs/users/list',
@@ -130,7 +132,7 @@ export class SeamHttpAcsUsers {
130
132
  }
131
133
 
132
134
  async removeFromAccessGroup(
133
- body: AcsUsersRemoveFromAccessGroupBody,
135
+ body?: AcsUsersRemoveFromAccessGroupBody,
134
136
  ): Promise<void> {
135
137
  await this.client.request<AcsUsersRemoveFromAccessGroupResponse>({
136
138
  url: '/acs/users/remove_from_access_group',
@@ -139,7 +141,7 @@ export class SeamHttpAcsUsers {
139
141
  })
140
142
  }
141
143
 
142
- async suspend(body: AcsUsersSuspendBody): Promise<void> {
144
+ async suspend(body?: AcsUsersSuspendBody): Promise<void> {
143
145
  await this.client.request<AcsUsersSuspendResponse>({
144
146
  url: '/acs/users/suspend',
145
147
  method: 'post',
@@ -147,7 +149,7 @@ export class SeamHttpAcsUsers {
147
149
  })
148
150
  }
149
151
 
150
- async unsuspend(body: AcsUsersUnsuspendBody): Promise<void> {
152
+ async unsuspend(body?: AcsUsersUnsuspendBody): Promise<void> {
151
153
  await this.client.request<AcsUsersUnsuspendResponse>({
152
154
  url: '/acs/users/unsuspend',
153
155
  method: 'post',
@@ -155,7 +157,7 @@ export class SeamHttpAcsUsers {
155
157
  })
156
158
  }
157
159
 
158
- async update(body: AcsUsersUpdateBody): Promise<void> {
160
+ async update(body?: AcsUsersUpdateBody): Promise<void> {
159
161
  await this.client.request<AcsUsersUpdateResponse>({
160
162
  url: '/acs/users/update',
161
163
  method: 'post',
@@ -183,13 +185,13 @@ export type AcsUsersDeleteResponse = SetNonNullable<
183
185
  Required<RouteResponse<'/acs/users/delete'>>
184
186
  >
185
187
 
186
- export type AcsUsersGetBody = RouteRequestBody<'/acs/users/get'>
188
+ export type AcsUsersGetParams = RouteRequestBody<'/acs/users/get'>
187
189
 
188
190
  export type AcsUsersGetResponse = SetNonNullable<
189
191
  Required<RouteResponse<'/acs/users/get'>>
190
192
  >
191
193
 
192
- export type AcsUsersListBody = RouteRequestBody<'/acs/users/list'>
194
+ export type AcsUsersListParams = RouteRequestBody<'/acs/users/list'>
193
195
 
194
196
  export type AcsUsersListResponse = SetNonNullable<
195
197
  Required<RouteResponse<'/acs/users/list'>>
@@ -83,7 +83,7 @@ export class SeamHttpActionAttempts {
83
83
  }
84
84
 
85
85
  async get(
86
- body: ActionAttemptsGetBody,
86
+ body?: ActionAttemptsGetParams,
87
87
  ): Promise<ActionAttemptsGetResponse['action_attempt']> {
88
88
  const { data } = await this.client.request<ActionAttemptsGetResponse>({
89
89
  url: '/action_attempts/get',
@@ -94,7 +94,7 @@ export class SeamHttpActionAttempts {
94
94
  }
95
95
 
96
96
  async list(
97
- body: ActionAttemptsListBody,
97
+ body?: ActionAttemptsListParams,
98
98
  ): Promise<ActionAttemptsListResponse['action_attempts']> {
99
99
  const { data } = await this.client.request<ActionAttemptsListResponse>({
100
100
  url: '/action_attempts/list',
@@ -105,13 +105,13 @@ export class SeamHttpActionAttempts {
105
105
  }
106
106
  }
107
107
 
108
- export type ActionAttemptsGetBody = RouteRequestBody<'/action_attempts/get'>
108
+ export type ActionAttemptsGetParams = RouteRequestBody<'/action_attempts/get'>
109
109
 
110
110
  export type ActionAttemptsGetResponse = SetNonNullable<
111
111
  Required<RouteResponse<'/action_attempts/get'>>
112
112
  >
113
113
 
114
- export type ActionAttemptsListBody = RouteRequestBody<'/action_attempts/list'>
114
+ export type ActionAttemptsListParams = RouteRequestBody<'/action_attempts/list'>
115
115
 
116
116
  export type ActionAttemptsListResponse = SetNonNullable<
117
117
  Required<RouteResponse<'/action_attempts/list'>>
@@ -81,7 +81,7 @@ export class SeamHttpClientSessions {
81
81
  }
82
82
 
83
83
  async create(
84
- body: ClientSessionsCreateBody,
84
+ body?: ClientSessionsCreateBody,
85
85
  ): Promise<ClientSessionsCreateResponse['client_session']> {
86
86
  const { data } = await this.client.request<ClientSessionsCreateResponse>({
87
87
  url: '/client_sessions/create',
@@ -91,7 +91,7 @@ export class SeamHttpClientSessions {
91
91
  return data.client_session
92
92
  }
93
93
 
94
- async delete(body: ClientSessionsDeleteBody): Promise<void> {
94
+ async delete(body?: ClientSessionsDeleteBody): Promise<void> {
95
95
  await this.client.request<ClientSessionsDeleteResponse>({
96
96
  url: '/client_sessions/delete',
97
97
  method: 'post',
@@ -100,7 +100,7 @@ export class SeamHttpClientSessions {
100
100
  }
101
101
 
102
102
  async get(
103
- body: ClientSessionsGetBody,
103
+ body?: ClientSessionsGetParams,
104
104
  ): Promise<ClientSessionsGetResponse['client_session']> {
105
105
  const { data } = await this.client.request<ClientSessionsGetResponse>({
106
106
  url: '/client_sessions/get',
@@ -111,7 +111,7 @@ export class SeamHttpClientSessions {
111
111
  }
112
112
 
113
113
  async getOrCreate(
114
- body: ClientSessionsGetOrCreateBody,
114
+ body?: ClientSessionsGetOrCreateBody,
115
115
  ): Promise<ClientSessionsGetOrCreateResponse['client_session']> {
116
116
  const { data } =
117
117
  await this.client.request<ClientSessionsGetOrCreateResponse>({
@@ -123,7 +123,7 @@ export class SeamHttpClientSessions {
123
123
  }
124
124
 
125
125
  async grantAccess(
126
- body: ClientSessionsGrantAccessBody,
126
+ body?: ClientSessionsGrantAccessBody,
127
127
  ): Promise<ClientSessionsGrantAccessResponse['client_session']> {
128
128
  const { data } =
129
129
  await this.client.request<ClientSessionsGrantAccessResponse>({
@@ -135,7 +135,7 @@ export class SeamHttpClientSessions {
135
135
  }
136
136
 
137
137
  async list(
138
- body: ClientSessionsListBody,
138
+ body?: ClientSessionsListParams,
139
139
  ): Promise<ClientSessionsListResponse['client_sessions']> {
140
140
  const { data } = await this.client.request<ClientSessionsListResponse>({
141
141
  url: '/client_sessions/list',
@@ -160,7 +160,7 @@ export type ClientSessionsDeleteResponse = SetNonNullable<
160
160
  Required<RouteResponse<'/client_sessions/delete'>>
161
161
  >
162
162
 
163
- export type ClientSessionsGetBody = RouteRequestBody<'/client_sessions/get'>
163
+ export type ClientSessionsGetParams = RouteRequestBody<'/client_sessions/get'>
164
164
 
165
165
  export type ClientSessionsGetResponse = SetNonNullable<
166
166
  Required<RouteResponse<'/client_sessions/get'>>
@@ -180,7 +180,7 @@ export type ClientSessionsGrantAccessResponse = SetNonNullable<
180
180
  Required<RouteResponse<'/client_sessions/grant_access'>>
181
181
  >
182
182
 
183
- export type ClientSessionsListBody = RouteRequestBody<'/client_sessions/list'>
183
+ export type ClientSessionsListParams = RouteRequestBody<'/client_sessions/list'>
184
184
 
185
185
  export type ClientSessionsListResponse = SetNonNullable<
186
186
  Required<RouteResponse<'/client_sessions/list'>>
@@ -87,7 +87,7 @@ export class SeamHttpConnectWebviews {
87
87
  }
88
88
 
89
89
  async create(
90
- body: ConnectWebviewsCreateBody,
90
+ body?: ConnectWebviewsCreateBody,
91
91
  ): Promise<ConnectWebviewsCreateResponse['connect_webview']> {
92
92
  const { data } = await this.client.request<ConnectWebviewsCreateResponse>({
93
93
  url: '/connect_webviews/create',
@@ -97,7 +97,7 @@ export class SeamHttpConnectWebviews {
97
97
  return data.connect_webview
98
98
  }
99
99
 
100
- async delete(body: ConnectWebviewsDeleteBody): Promise<void> {
100
+ async delete(body?: ConnectWebviewsDeleteBody): Promise<void> {
101
101
  await this.client.request<ConnectWebviewsDeleteResponse>({
102
102
  url: '/connect_webviews/delete',
103
103
  method: 'post',
@@ -106,7 +106,7 @@ export class SeamHttpConnectWebviews {
106
106
  }
107
107
 
108
108
  async get(
109
- body: ConnectWebviewsGetBody,
109
+ body?: ConnectWebviewsGetParams,
110
110
  ): Promise<ConnectWebviewsGetResponse['connect_webview']> {
111
111
  const { data } = await this.client.request<ConnectWebviewsGetResponse>({
112
112
  url: '/connect_webviews/get',
@@ -117,7 +117,7 @@ export class SeamHttpConnectWebviews {
117
117
  }
118
118
 
119
119
  async list(
120
- body: ConnectWebviewsListBody,
120
+ body?: ConnectWebviewsListParams,
121
121
  ): Promise<ConnectWebviewsListResponse['connect_webviews']> {
122
122
  const { data } = await this.client.request<ConnectWebviewsListResponse>({
123
123
  url: '/connect_webviews/list',
@@ -150,13 +150,14 @@ export type ConnectWebviewsDeleteResponse = SetNonNullable<
150
150
  Required<RouteResponse<'/connect_webviews/delete'>>
151
151
  >
152
152
 
153
- export type ConnectWebviewsGetBody = RouteRequestBody<'/connect_webviews/get'>
153
+ export type ConnectWebviewsGetParams = RouteRequestBody<'/connect_webviews/get'>
154
154
 
155
155
  export type ConnectWebviewsGetResponse = SetNonNullable<
156
156
  Required<RouteResponse<'/connect_webviews/get'>>
157
157
  >
158
158
 
159
- export type ConnectWebviewsListBody = RouteRequestBody<'/connect_webviews/list'>
159
+ export type ConnectWebviewsListParams =
160
+ RouteRequestBody<'/connect_webviews/list'>
160
161
 
161
162
  export type ConnectWebviewsListResponse = SetNonNullable<
162
163
  Required<RouteResponse<'/connect_webviews/list'>>
@@ -86,7 +86,7 @@ export class SeamHttpConnectedAccounts {
86
86
  return SeamHttpConnectedAccounts.fromClientSessionToken(token, options)
87
87
  }
88
88
 
89
- async delete(body: ConnectedAccountsDeleteBody): Promise<void> {
89
+ async delete(body?: ConnectedAccountsDeleteBody): Promise<void> {
90
90
  await this.client.request<ConnectedAccountsDeleteResponse>({
91
91
  url: '/connected_accounts/delete',
92
92
  method: 'post',
@@ -95,7 +95,7 @@ export class SeamHttpConnectedAccounts {
95
95
  }
96
96
 
97
97
  async get(
98
- body: ConnectedAccountsGetBody,
98
+ body?: ConnectedAccountsGetParams,
99
99
  ): Promise<ConnectedAccountsGetResponse['connected_account']> {
100
100
  const { data } = await this.client.request<ConnectedAccountsGetResponse>({
101
101
  url: '/connected_accounts/get',
@@ -124,7 +124,7 @@ export type ConnectedAccountsDeleteResponse = SetNonNullable<
124
124
  Required<RouteResponse<'/connected_accounts/delete'>>
125
125
  >
126
126
 
127
- export type ConnectedAccountsGetBody =
127
+ export type ConnectedAccountsGetParams =
128
128
  RouteRequestBody<'/connected_accounts/get'>
129
129
 
130
130
  export type ConnectedAccountsGetResponse = SetNonNullable<
@@ -83,7 +83,7 @@ export class SeamHttpDevicesUnmanaged {
83
83
  }
84
84
 
85
85
  async get(
86
- body: DevicesUnmanagedGetBody,
86
+ body?: DevicesUnmanagedGetParams,
87
87
  ): Promise<DevicesUnmanagedGetResponse['device']> {
88
88
  const { data } = await this.client.request<DevicesUnmanagedGetResponse>({
89
89
  url: '/devices/unmanaged/get',
@@ -94,7 +94,7 @@ export class SeamHttpDevicesUnmanaged {
94
94
  }
95
95
 
96
96
  async list(
97
- body: DevicesUnmanagedListBody,
97
+ body?: DevicesUnmanagedListParams,
98
98
  ): Promise<DevicesUnmanagedListResponse['devices']> {
99
99
  const { data } = await this.client.request<DevicesUnmanagedListResponse>({
100
100
  url: '/devices/unmanaged/list',
@@ -104,7 +104,7 @@ export class SeamHttpDevicesUnmanaged {
104
104
  return data.devices
105
105
  }
106
106
 
107
- async update(body: DevicesUnmanagedUpdateBody): Promise<void> {
107
+ async update(body?: DevicesUnmanagedUpdateBody): Promise<void> {
108
108
  await this.client.request<DevicesUnmanagedUpdateResponse>({
109
109
  url: '/devices/unmanaged/update',
110
110
  method: 'post',
@@ -113,13 +113,14 @@ export class SeamHttpDevicesUnmanaged {
113
113
  }
114
114
  }
115
115
 
116
- export type DevicesUnmanagedGetBody = RouteRequestBody<'/devices/unmanaged/get'>
116
+ export type DevicesUnmanagedGetParams =
117
+ RouteRequestBody<'/devices/unmanaged/get'>
117
118
 
118
119
  export type DevicesUnmanagedGetResponse = SetNonNullable<
119
120
  Required<RouteResponse<'/devices/unmanaged/get'>>
120
121
  >
121
122
 
122
- export type DevicesUnmanagedListBody =
123
+ export type DevicesUnmanagedListParams =
123
124
  RouteRequestBody<'/devices/unmanaged/list'>
124
125
 
125
126
  export type DevicesUnmanagedListResponse = SetNonNullable<
@@ -87,7 +87,7 @@ export class SeamHttpDevices {
87
87
  return SeamHttpDevicesUnmanaged.fromClient(this.client)
88
88
  }
89
89
 
90
- async delete(body: DevicesDeleteBody): Promise<void> {
90
+ async delete(body?: DevicesDeleteBody): Promise<void> {
91
91
  await this.client.request<DevicesDeleteResponse>({
92
92
  url: '/devices/delete',
93
93
  method: 'post',
@@ -95,7 +95,7 @@ export class SeamHttpDevices {
95
95
  })
96
96
  }
97
97
 
98
- async get(body: DevicesGetBody): Promise<DevicesGetResponse['device']> {
98
+ async get(body?: DevicesGetParams): Promise<DevicesGetResponse['device']> {
99
99
  const { data } = await this.client.request<DevicesGetResponse>({
100
100
  url: '/devices/get',
101
101
  method: 'post',
@@ -104,7 +104,9 @@ export class SeamHttpDevices {
104
104
  return data.device
105
105
  }
106
106
 
107
- async list(body: DevicesListBody): Promise<DevicesListResponse['devices']> {
107
+ async list(
108
+ body?: DevicesListParams,
109
+ ): Promise<DevicesListResponse['devices']> {
108
110
  const { data } = await this.client.request<DevicesListResponse>({
109
111
  url: '/devices/list',
110
112
  method: 'post',
@@ -114,7 +116,7 @@ export class SeamHttpDevices {
114
116
  }
115
117
 
116
118
  async listDeviceProviders(
117
- body: DevicesListDeviceProvidersBody,
119
+ body?: DevicesListDeviceProvidersParams,
118
120
  ): Promise<DevicesListDeviceProvidersResponse['device_providers']> {
119
121
  const { data } =
120
122
  await this.client.request<DevicesListDeviceProvidersResponse>({
@@ -125,7 +127,7 @@ export class SeamHttpDevices {
125
127
  return data.device_providers
126
128
  }
127
129
 
128
- async update(body: DevicesUpdateBody): Promise<void> {
130
+ async update(body?: DevicesUpdateBody): Promise<void> {
129
131
  await this.client.request<DevicesUpdateResponse>({
130
132
  url: '/devices/update',
131
133
  method: 'post',
@@ -140,19 +142,19 @@ export type DevicesDeleteResponse = SetNonNullable<
140
142
  Required<RouteResponse<'/devices/delete'>>
141
143
  >
142
144
 
143
- export type DevicesGetBody = RouteRequestBody<'/devices/get'>
145
+ export type DevicesGetParams = RouteRequestBody<'/devices/get'>
144
146
 
145
147
  export type DevicesGetResponse = SetNonNullable<
146
148
  Required<RouteResponse<'/devices/get'>>
147
149
  >
148
150
 
149
- export type DevicesListBody = RouteRequestBody<'/devices/list'>
151
+ export type DevicesListParams = RouteRequestBody<'/devices/list'>
150
152
 
151
153
  export type DevicesListResponse = SetNonNullable<
152
154
  Required<RouteResponse<'/devices/list'>>
153
155
  >
154
156
 
155
- export type DevicesListDeviceProvidersBody =
157
+ export type DevicesListDeviceProvidersParams =
156
158
  RouteRequestBody<'/devices/list_device_providers'>
157
159
 
158
160
  export type DevicesListDeviceProvidersResponse = SetNonNullable<
@@ -82,7 +82,7 @@ export class SeamHttpEvents {
82
82
  return SeamHttpEvents.fromClientSessionToken(token, options)
83
83
  }
84
84
 
85
- async get(body: EventsGetBody): Promise<EventsGetResponse['event']> {
85
+ async get(body?: EventsGetParams): Promise<EventsGetResponse['event']> {
86
86
  const { data } = await this.client.request<EventsGetResponse>({
87
87
  url: '/events/get',
88
88
  method: 'post',
@@ -91,7 +91,7 @@ export class SeamHttpEvents {
91
91
  return data.event
92
92
  }
93
93
 
94
- async list(body: EventsListBody): Promise<EventsListResponse['events']> {
94
+ async list(body?: EventsListParams): Promise<EventsListResponse['events']> {
95
95
  const { data } = await this.client.request<EventsListResponse>({
96
96
  url: '/events/list',
97
97
  method: 'post',
@@ -101,13 +101,13 @@ export class SeamHttpEvents {
101
101
  }
102
102
  }
103
103
 
104
- export type EventsGetBody = RouteRequestBody<'/events/get'>
104
+ export type EventsGetParams = RouteRequestBody<'/events/get'>
105
105
 
106
106
  export type EventsGetResponse = SetNonNullable<
107
107
  Required<RouteResponse<'/events/get'>>
108
108
  >
109
109
 
110
- export type EventsListBody = RouteRequestBody<'/events/list'>
110
+ export type EventsListParams = RouteRequestBody<'/events/list'>
111
111
 
112
112
  export type EventsListResponse = SetNonNullable<
113
113
  Required<RouteResponse<'/events/list'>>
@@ -82,7 +82,7 @@ export class SeamHttpLocks {
82
82
  return SeamHttpLocks.fromClientSessionToken(token, options)
83
83
  }
84
84
 
85
- async get(body: LocksGetBody): Promise<LocksGetResponse['device']> {
85
+ async get(body?: LocksGetParams): Promise<LocksGetResponse['device']> {
86
86
  const { data } = await this.client.request<LocksGetResponse>({
87
87
  url: '/locks/get',
88
88
  method: 'post',
@@ -91,7 +91,7 @@ export class SeamHttpLocks {
91
91
  return data.device
92
92
  }
93
93
 
94
- async list(body: LocksListBody): Promise<LocksListResponse['devices']> {
94
+ async list(body?: LocksListParams): Promise<LocksListResponse['devices']> {
95
95
  const { data } = await this.client.request<LocksListResponse>({
96
96
  url: '/locks/list',
97
97
  method: 'post',
@@ -101,7 +101,7 @@ export class SeamHttpLocks {
101
101
  }
102
102
 
103
103
  async lockDoor(
104
- body: LocksLockDoorBody,
104
+ body?: LocksLockDoorBody,
105
105
  ): Promise<LocksLockDoorResponse['action_attempt']> {
106
106
  const { data } = await this.client.request<LocksLockDoorResponse>({
107
107
  url: '/locks/lock_door',
@@ -112,7 +112,7 @@ export class SeamHttpLocks {
112
112
  }
113
113
 
114
114
  async unlockDoor(
115
- body: LocksUnlockDoorBody,
115
+ body?: LocksUnlockDoorBody,
116
116
  ): Promise<LocksUnlockDoorResponse['action_attempt']> {
117
117
  const { data } = await this.client.request<LocksUnlockDoorResponse>({
118
118
  url: '/locks/unlock_door',
@@ -123,13 +123,13 @@ export class SeamHttpLocks {
123
123
  }
124
124
  }
125
125
 
126
- export type LocksGetBody = RouteRequestBody<'/locks/get'>
126
+ export type LocksGetParams = RouteRequestBody<'/locks/get'>
127
127
 
128
128
  export type LocksGetResponse = SetNonNullable<
129
129
  Required<RouteResponse<'/locks/get'>>
130
130
  >
131
131
 
132
- export type LocksListBody = RouteRequestBody<'/locks/list'>
132
+ export type LocksListParams = RouteRequestBody<'/locks/list'>
133
133
 
134
134
  export type LocksListResponse = SetNonNullable<
135
135
  Required<RouteResponse<'/locks/list'>>
@@ -85,7 +85,7 @@ export class SeamHttpNoiseSensorsNoiseThresholds {
85
85
  )
86
86
  }
87
87
 
88
- async create(body: NoiseSensorsNoiseThresholdsCreateBody): Promise<void> {
88
+ async create(body?: NoiseSensorsNoiseThresholdsCreateBody): Promise<void> {
89
89
  await this.client.request<NoiseSensorsNoiseThresholdsCreateResponse>({
90
90
  url: '/noise_sensors/noise_thresholds/create',
91
91
  method: 'post',
@@ -93,7 +93,7 @@ export class SeamHttpNoiseSensorsNoiseThresholds {
93
93
  })
94
94
  }
95
95
 
96
- async delete(body: NoiseSensorsNoiseThresholdsDeleteBody): Promise<void> {
96
+ async delete(body?: NoiseSensorsNoiseThresholdsDeleteBody): Promise<void> {
97
97
  await this.client.request<NoiseSensorsNoiseThresholdsDeleteResponse>({
98
98
  url: '/noise_sensors/noise_thresholds/delete',
99
99
  method: 'post',
@@ -102,7 +102,7 @@ export class SeamHttpNoiseSensorsNoiseThresholds {
102
102
  }
103
103
 
104
104
  async get(
105
- body: NoiseSensorsNoiseThresholdsGetBody,
105
+ body?: NoiseSensorsNoiseThresholdsGetParams,
106
106
  ): Promise<NoiseSensorsNoiseThresholdsGetResponse['noise_threshold']> {
107
107
  const { data } =
108
108
  await this.client.request<NoiseSensorsNoiseThresholdsGetResponse>({
@@ -114,7 +114,7 @@ export class SeamHttpNoiseSensorsNoiseThresholds {
114
114
  }
115
115
 
116
116
  async list(
117
- body: NoiseSensorsNoiseThresholdsListBody,
117
+ body?: NoiseSensorsNoiseThresholdsListParams,
118
118
  ): Promise<NoiseSensorsNoiseThresholdsListResponse['noise_thresholds']> {
119
119
  const { data } =
120
120
  await this.client.request<NoiseSensorsNoiseThresholdsListResponse>({
@@ -125,7 +125,7 @@ export class SeamHttpNoiseSensorsNoiseThresholds {
125
125
  return data.noise_thresholds
126
126
  }
127
127
 
128
- async update(body: NoiseSensorsNoiseThresholdsUpdateBody): Promise<void> {
128
+ async update(body?: NoiseSensorsNoiseThresholdsUpdateBody): Promise<void> {
129
129
  await this.client.request<NoiseSensorsNoiseThresholdsUpdateResponse>({
130
130
  url: '/noise_sensors/noise_thresholds/update',
131
131
  method: 'post',
@@ -148,14 +148,14 @@ export type NoiseSensorsNoiseThresholdsDeleteResponse = SetNonNullable<
148
148
  Required<RouteResponse<'/noise_sensors/noise_thresholds/delete'>>
149
149
  >
150
150
 
151
- export type NoiseSensorsNoiseThresholdsGetBody =
151
+ export type NoiseSensorsNoiseThresholdsGetParams =
152
152
  RouteRequestBody<'/noise_sensors/noise_thresholds/get'>
153
153
 
154
154
  export type NoiseSensorsNoiseThresholdsGetResponse = SetNonNullable<
155
155
  Required<RouteResponse<'/noise_sensors/noise_thresholds/get'>>
156
156
  >
157
157
 
158
- export type NoiseSensorsNoiseThresholdsListBody =
158
+ export type NoiseSensorsNoiseThresholdsListParams =
159
159
  RouteRequestBody<'/noise_sensors/noise_thresholds/list'>
160
160
 
161
161
  export type NoiseSensorsNoiseThresholdsListResponse = SetNonNullable<