Skip to content

Commit 28fe814

Browse files
authored
Merge pull request #20 from seamapi/new-endpoints
Add userIdentities
2 parents a975724 + f140b1c commit 28fe814

File tree

9 files changed

+318
-53
lines changed

9 files changed

+318
-53
lines changed

generate-routes.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ const routePaths = [
2929
'/noise_sensors/noise_thresholds',
3030
'/thermostats/climate_setting_schedules',
3131
'/thermostats',
32+
'/user_identities',
3233
'/webhooks',
3334
'/workspaces',
3435
] as const

package-lock.json

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@
9292
},
9393
"devDependencies": {
9494
"@seamapi/fake-seam-connect": "^1.43.0",
95-
"@seamapi/types": "^1.24.0",
95+
"@seamapi/types": "^1.44.1",
9696
"@types/eslint": "^8.44.2",
9797
"@types/node": "^18.11.18",
9898
"ava": "^5.0.1",

src/lib/seam/connect/routes/acs-access-groups.ts

Lines changed: 0 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -128,25 +128,6 @@ export class SeamHttpAcsAccessGroups {
128128
})
129129
}
130130

131-
async create(
132-
body?: AcsAccessGroupsCreateBody,
133-
): Promise<AcsAccessGroupsCreateResponse['acs_access_group']> {
134-
const { data } = await this.client.request<AcsAccessGroupsCreateResponse>({
135-
url: '/acs/access_groups/create',
136-
method: 'post',
137-
data: body,
138-
})
139-
return data.acs_access_group
140-
}
141-
142-
async delete(body?: AcsAccessGroupsDeleteBody): Promise<void> {
143-
await this.client.request<AcsAccessGroupsDeleteResponse>({
144-
url: '/acs/access_groups/delete',
145-
method: 'post',
146-
data: body,
147-
})
148-
}
149-
150131
async get(
151132
body?: AcsAccessGroupsGetParams,
152133
): Promise<AcsAccessGroupsGetResponse['acs_access_group']> {
@@ -188,14 +169,6 @@ export class SeamHttpAcsAccessGroups {
188169
data: body,
189170
})
190171
}
191-
192-
async update(body?: AcsAccessGroupsUpdateBody): Promise<void> {
193-
await this.client.request<AcsAccessGroupsUpdateResponse>({
194-
url: '/acs/access_groups/update',
195-
method: 'post',
196-
data: body,
197-
})
198-
}
199172
}
200173

201174
export type AcsAccessGroupsAddUserBody =
@@ -205,20 +178,6 @@ export type AcsAccessGroupsAddUserResponse = SetNonNullable<
205178
Required<RouteResponse<'/acs/access_groups/add_user'>>
206179
>
207180

208-
export type AcsAccessGroupsCreateBody =
209-
RouteRequestBody<'/acs/access_groups/create'>
210-
211-
export type AcsAccessGroupsCreateResponse = SetNonNullable<
212-
Required<RouteResponse<'/acs/access_groups/create'>>
213-
>
214-
215-
export type AcsAccessGroupsDeleteBody =
216-
RouteRequestBody<'/acs/access_groups/delete'>
217-
218-
export type AcsAccessGroupsDeleteResponse = SetNonNullable<
219-
Required<RouteResponse<'/acs/access_groups/delete'>>
220-
>
221-
222181
export type AcsAccessGroupsGetParams =
223182
RouteRequestBody<'/acs/access_groups/get'>
224183

@@ -246,10 +205,3 @@ export type AcsAccessGroupsRemoveUserBody =
246205
export type AcsAccessGroupsRemoveUserResponse = SetNonNullable<
247206
Required<RouteResponse<'/acs/access_groups/remove_user'>>
248207
>
249-
250-
export type AcsAccessGroupsUpdateBody =
251-
RouteRequestBody<'/acs/access_groups/update'>
252-
253-
export type AcsAccessGroupsUpdateResponse = SetNonNullable<
254-
Required<RouteResponse<'/acs/access_groups/update'>>
255-
>

src/lib/seam/connect/routes/acs-credentials.ts

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,14 @@ export class SeamHttpAcsCredentials {
120120
return new SeamHttpAcsCredentials(constructorOptions)
121121
}
122122

123+
async assign(body?: AcsCredentialsAssignBody): Promise<void> {
124+
await this.client.request<AcsCredentialsAssignResponse>({
125+
url: '/acs/credentials/assign',
126+
method: 'post',
127+
data: body,
128+
})
129+
}
130+
123131
async create(
124132
body?: AcsCredentialsCreateBody,
125133
): Promise<AcsCredentialsCreateResponse['acs_credential']> {
@@ -160,8 +168,23 @@ export class SeamHttpAcsCredentials {
160168
})
161169
return data.acs_credentials
162170
}
171+
172+
async unassign(body?: AcsCredentialsUnassignBody): Promise<void> {
173+
await this.client.request<AcsCredentialsUnassignResponse>({
174+
url: '/acs/credentials/unassign',
175+
method: 'post',
176+
data: body,
177+
})
178+
}
163179
}
164180

181+
export type AcsCredentialsAssignBody =
182+
RouteRequestBody<'/acs/credentials/assign'>
183+
184+
export type AcsCredentialsAssignResponse = SetNonNullable<
185+
Required<RouteResponse<'/acs/credentials/assign'>>
186+
>
187+
165188
export type AcsCredentialsCreateBody =
166189
RouteRequestBody<'/acs/credentials/create'>
167190

@@ -187,3 +210,10 @@ export type AcsCredentialsListParams = RouteRequestBody<'/acs/credentials/list'>
187210
export type AcsCredentialsListResponse = SetNonNullable<
188211
Required<RouteResponse<'/acs/credentials/list'>>
189212
>
213+
214+
export type AcsCredentialsUnassignBody =
215+
RouteRequestBody<'/acs/credentials/unassign'>
216+
217+
export type AcsCredentialsUnassignResponse = SetNonNullable<
218+
Required<RouteResponse<'/acs/credentials/unassign'>>
219+
>

src/lib/seam/connect/routes/client-sessions.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,14 @@ export class SeamHttpClientSessions {
182182
})
183183
return data.client_sessions
184184
}
185+
186+
async revoke(body?: ClientSessionsRevokeBody): Promise<void> {
187+
await this.client.request<ClientSessionsRevokeResponse>({
188+
url: '/client_sessions/revoke',
189+
method: 'post',
190+
data: body,
191+
})
192+
}
185193
}
186194

187195
export type ClientSessionsCreateBody =
@@ -223,3 +231,10 @@ export type ClientSessionsListParams = RouteRequestBody<'/client_sessions/list'>
223231
export type ClientSessionsListResponse = SetNonNullable<
224232
Required<RouteResponse<'/client_sessions/list'>>
225233
>
234+
235+
export type ClientSessionsRevokeBody =
236+
RouteRequestBody<'/client_sessions/revoke'>
237+
238+
export type ClientSessionsRevokeResponse = SetNonNullable<
239+
Required<RouteResponse<'/client_sessions/revoke'>>
240+
>

src/lib/seam/connect/routes/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,6 @@ export * from './noise-sensors.js'
1717
export * from './noise-sensors-noise-thresholds.js'
1818
export * from './thermostats.js'
1919
export * from './thermostats-climate-setting-schedules.js'
20+
export * from './user-identities.js'
2021
export * from './webhooks.js'
2122
export * from './workspaces.js'

0 commit comments

Comments
 (0)