@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
@@ -86,7 +86,7 @@ export class SeamHttpThermostatsClimateSettingSchedules {
86
86
  }
87
87
 
88
88
  async create(
89
- body: ThermostatsClimateSettingSchedulesCreateBody,
89
+ body?: ThermostatsClimateSettingSchedulesCreateBody,
90
90
  ): Promise<
91
91
  ThermostatsClimateSettingSchedulesCreateResponse['climate_setting_schedule']
92
92
  > {
@@ -102,7 +102,7 @@ export class SeamHttpThermostatsClimateSettingSchedules {
102
102
  }
103
103
 
104
104
  async delete(
105
- body: ThermostatsClimateSettingSchedulesDeleteBody,
105
+ body?: ThermostatsClimateSettingSchedulesDeleteBody,
106
106
  ): Promise<void> {
107
107
  await this.client.request<ThermostatsClimateSettingSchedulesDeleteResponse>(
108
108
  {
@@ -114,7 +114,7 @@ export class SeamHttpThermostatsClimateSettingSchedules {
114
114
  }
115
115
 
116
116
  async get(
117
- body: ThermostatsClimateSettingSchedulesGetBody,
117
+ body?: ThermostatsClimateSettingSchedulesGetParams,
118
118
  ): Promise<
119
119
  ThermostatsClimateSettingSchedulesGetResponse['climate_setting_schedule']
120
120
  > {
@@ -128,7 +128,7 @@ export class SeamHttpThermostatsClimateSettingSchedules {
128
128
  }
129
129
 
130
130
  async list(
131
- body: ThermostatsClimateSettingSchedulesListBody,
131
+ body?: ThermostatsClimateSettingSchedulesListParams,
132
132
  ): Promise<
133
133
  ThermostatsClimateSettingSchedulesListResponse['climate_setting_schedules']
134
134
  > {
@@ -144,7 +144,7 @@ export class SeamHttpThermostatsClimateSettingSchedules {
144
144
  }
145
145
 
146
146
  async update(
147
- body: ThermostatsClimateSettingSchedulesUpdateBody,
147
+ body?: ThermostatsClimateSettingSchedulesUpdateBody,
148
148
  ): Promise<void> {
149
149
  await this.client.request<ThermostatsClimateSettingSchedulesUpdateResponse>(
150
150
  {
@@ -170,14 +170,14 @@ export type ThermostatsClimateSettingSchedulesDeleteResponse = SetNonNullable<
170
170
  Required<RouteResponse<'/thermostats/climate_setting_schedules/delete'>>
171
171
  >
172
172
 
173
- export type ThermostatsClimateSettingSchedulesGetBody =
173
+ export type ThermostatsClimateSettingSchedulesGetParams =
174
174
  RouteRequestBody<'/thermostats/climate_setting_schedules/get'>
175
175
 
176
176
  export type ThermostatsClimateSettingSchedulesGetResponse = SetNonNullable<
177
177
  Required<RouteResponse<'/thermostats/climate_setting_schedules/get'>>
178
178
  >
179
179
 
180
- export type ThermostatsClimateSettingSchedulesListBody =
180
+ export type ThermostatsClimateSettingSchedulesListParams =
181
181
  RouteRequestBody<'/thermostats/climate_setting_schedules/list'>
182
182
 
183
183
  export type ThermostatsClimateSettingSchedulesListResponse = SetNonNullable<
@@ -87,7 +87,7 @@ export class SeamHttpThermostats {
87
87
  return SeamHttpThermostatsClimateSettingSchedules.fromClient(this.client)
88
88
  }
89
89
 
90
- async cool(body: ThermostatsCoolBody): Promise<void> {
90
+ async cool(body?: ThermostatsCoolBody): Promise<void> {
91
91
  await this.client.request<ThermostatsCoolResponse>({
92
92
  url: '/thermostats/cool',
93
93
  method: 'post',
@@ -96,7 +96,7 @@ export class SeamHttpThermostats {
96
96
  }
97
97
 
98
98
  async get(
99
- body: ThermostatsGetBody,
99
+ body?: ThermostatsGetParams,
100
100
  ): Promise<ThermostatsGetResponse['thermostat']> {
101
101
  const { data } = await this.client.request<ThermostatsGetResponse>({
102
102
  url: '/thermostats/get',
@@ -106,7 +106,7 @@ export class SeamHttpThermostats {
106
106
  return data.thermostat
107
107
  }
108
108
 
109
- async heat(body: ThermostatsHeatBody): Promise<void> {
109
+ async heat(body?: ThermostatsHeatBody): Promise<void> {
110
110
  await this.client.request<ThermostatsHeatResponse>({
111
111
  url: '/thermostats/heat',
112
112
  method: 'post',
@@ -114,7 +114,7 @@ export class SeamHttpThermostats {
114
114
  })
115
115
  }
116
116
 
117
- async heatCool(body: ThermostatsHeatCoolBody): Promise<void> {
117
+ async heatCool(body?: ThermostatsHeatCoolBody): Promise<void> {
118
118
  await this.client.request<ThermostatsHeatCoolResponse>({
119
119
  url: '/thermostats/heat_cool',
120
120
  method: 'post',
@@ -123,7 +123,7 @@ export class SeamHttpThermostats {
123
123
  }
124
124
 
125
125
  async list(
126
- body: ThermostatsListBody,
126
+ body?: ThermostatsListParams,
127
127
  ): Promise<ThermostatsListResponse['thermostats']> {
128
128
  const { data } = await this.client.request<ThermostatsListResponse>({
129
129
  url: '/thermostats/list',
@@ -133,7 +133,7 @@ export class SeamHttpThermostats {
133
133
  return data.thermostats
134
134
  }
135
135
 
136
- async off(body: ThermostatsOffBody): Promise<void> {
136
+ async off(body?: ThermostatsOffBody): Promise<void> {
137
137
  await this.client.request<ThermostatsOffResponse>({
138
138
  url: '/thermostats/off',
139
139
  method: 'post',
@@ -141,7 +141,7 @@ export class SeamHttpThermostats {
141
141
  })
142
142
  }
143
143
 
144
- async setFanMode(body: ThermostatsSetFanModeBody): Promise<void> {
144
+ async setFanMode(body?: ThermostatsSetFanModeBody): Promise<void> {
145
145
  await this.client.request<ThermostatsSetFanModeResponse>({
146
146
  url: '/thermostats/set_fan_mode',
147
147
  method: 'post',
@@ -149,7 +149,7 @@ export class SeamHttpThermostats {
149
149
  })
150
150
  }
151
151
 
152
- async update(body: ThermostatsUpdateBody): Promise<void> {
152
+ async update(body?: ThermostatsUpdateBody): Promise<void> {
153
153
  await this.client.request<ThermostatsUpdateResponse>({
154
154
  url: '/thermostats/update',
155
155
  method: 'post',
@@ -164,7 +164,7 @@ export type ThermostatsCoolResponse = SetNonNullable<
164
164
  Required<RouteResponse<'/thermostats/cool'>>
165
165
  >
166
166
 
167
- export type ThermostatsGetBody = RouteRequestBody<'/thermostats/get'>
167
+ export type ThermostatsGetParams = RouteRequestBody<'/thermostats/get'>
168
168
 
169
169
  export type ThermostatsGetResponse = SetNonNullable<
170
170
  Required<RouteResponse<'/thermostats/get'>>
@@ -182,7 +182,7 @@ export type ThermostatsHeatCoolResponse = SetNonNullable<
182
182
  Required<RouteResponse<'/thermostats/heat_cool'>>
183
183
  >
184
184
 
185
- export type ThermostatsListBody = RouteRequestBody<'/thermostats/list'>
185
+ export type ThermostatsListParams = RouteRequestBody<'/thermostats/list'>
186
186
 
187
187
  export type ThermostatsListResponse = SetNonNullable<
188
188
  Required<RouteResponse<'/thermostats/list'>>
@@ -87,7 +87,7 @@ export class SeamHttpWebhooks {
87
87
  }
88
88
 
89
89
  async create(
90
- body: WebhooksCreateBody,
90
+ body?: WebhooksCreateBody,
91
91
  ): Promise<WebhooksCreateResponse['webhook']> {
92
92
  const { data } = await this.client.request<WebhooksCreateResponse>({
93
93
  url: '/webhooks/create',
@@ -97,7 +97,7 @@ export class SeamHttpWebhooks {
97
97
  return data.webhook
98
98
  }
99
99
 
100
- async delete(body: WebhooksDeleteBody): Promise<void> {
100
+ async delete(body?: WebhooksDeleteBody): Promise<void> {
101
101
  await this.client.request<WebhooksDeleteResponse>({
102
102
  url: '/webhooks/delete',
103
103
  method: 'post',
@@ -105,7 +105,7 @@ export class SeamHttpWebhooks {
105
105
  })
106
106
  }
107
107
 
108
- async get(body: WebhooksGetBody): Promise<WebhooksGetResponse['webhook']> {
108
+ async get(body?: WebhooksGetParams): Promise<WebhooksGetResponse['webhook']> {
109
109
  const { data } = await this.client.request<WebhooksGetResponse>({
110
110
  url: '/webhooks/get',
111
111
  method: 'post',
@@ -138,7 +138,7 @@ export type WebhooksDeleteResponse = SetNonNullable<
138
138
  Required<RouteResponse<'/webhooks/delete'>>
139
139
  >
140
140
 
141
- export type WebhooksGetBody = RouteRequestBody<'/webhooks/get'>
141
+ export type WebhooksGetParams = RouteRequestBody<'/webhooks/get'>
142
142
 
143
143
  export type WebhooksGetResponse = SetNonNullable<
144
144
  Required<RouteResponse<'/webhooks/get'>>
@@ -108,7 +108,7 @@ export class SeamHttpWorkspaces {
108
108
  return data.workspaces
109
109
  }
110
110
 
111
- async resetSandbox(body: WorkspacesResetSandboxBody): Promise<void> {
111
+ async resetSandbox(body?: WorkspacesResetSandboxBody): Promise<void> {
112
112
  await this.client.request<WorkspacesResetSandboxResponse>({
113
113
  url: '/workspaces/reset_sandbox',
114
114
  method: 'post',
@@ -0,0 +1,3 @@
1
+ const seamapiJavascriptHttpVersion = '0.3.0'
2
+
3
+ export default seamapiJavascriptHttpVersion