From 6f3aa4a5f6d4db813786e2ac02f6a835bb80999d Mon Sep 17 00:00:00 2001 From: Seam Bot Date: Wed, 6 Dec 2023 00:43:46 +0000 Subject: [PATCH] ci: Generate code --- .../seam/connect/routes/acs-credentials.ts | 37 +++++++++++++++++-- .../seam/connect/routes/user-identities.ts | 27 +++++++++++++- src/lib/seam/connect/routes/workspaces.ts | 20 ++++++++++ 3 files changed, 79 insertions(+), 5 deletions(-) diff --git a/src/lib/seam/connect/routes/acs-credentials.ts b/src/lib/seam/connect/routes/acs-credentials.ts index d49ab14f..05cbbf53 100644 --- a/src/lib/seam/connect/routes/acs-credentials.ts +++ b/src/lib/seam/connect/routes/acs-credentials.ts @@ -131,12 +131,16 @@ export class SeamHttpAcsCredentials { return new SeamHttpAcsCredentials(constructorOptions) } - async assign(body?: AcsCredentialsAssignBody): Promise { - await this.client.request({ + async assign( + body?: AcsCredentialsAssignBody, + ): Promise { + const { data } = await this.client.request({ url: '/acs/credentials/assign', method: 'post', data: body, }) + + return data.acs_credential } async create( @@ -183,12 +187,28 @@ export class SeamHttpAcsCredentials { return data.acs_credentials } - async unassign(body?: AcsCredentialsUnassignBody): Promise { - await this.client.request({ + async unassign( + body?: AcsCredentialsUnassignBody, + ): Promise { + const { data } = await this.client.request({ url: '/acs/credentials/unassign', method: 'post', data: body, }) + + return data.acs_credential + } + + async update( + body?: AcsCredentialsUpdateBody, + ): Promise { + const { data } = await this.client.request({ + url: '/acs/credentials/update', + method: 'post', + data: body, + }) + + return data.acs_credential } } @@ -243,3 +263,12 @@ export type AcsCredentialsUnassignResponse = SetNonNullable< > export type AcsCredentialsUnassignOptions = never + +export type AcsCredentialsUpdateBody = + RouteRequestBody<'/acs/credentials/update'> + +export type AcsCredentialsUpdateResponse = SetNonNullable< + Required> +> + +export type AcsCredentialsUpdateOptions = never diff --git a/src/lib/seam/connect/routes/user-identities.ts b/src/lib/seam/connect/routes/user-identities.ts index da272feb..40f59db8 100644 --- a/src/lib/seam/connect/routes/user-identities.ts +++ b/src/lib/seam/connect/routes/user-identities.ts @@ -3,7 +3,11 @@ * Do not edit this file or add other files to this directory. */ -import type { RouteRequestBody, RouteResponse } from '@seamapi/types/connect' +import type { + RouteRequestBody, + RouteRequestParams, + RouteResponse, +} from '@seamapi/types/connect' import type { SetNonNullable } from 'type-fest' import { warnOnInsecureuserIdentifierKey } from 'lib/seam/connect/auth.js' @@ -173,6 +177,18 @@ export class SeamHttpUserIdentities { }) } + async list( + params?: UserIdentitiesListParams, + ): Promise { + const { data } = await this.client.request({ + url: '/user_identities/list', + method: 'get', + params, + }) + + return data.user_identities + } + async listAccessibleDevices( body?: UserIdentitiesListAccessibleDevicesParams, ): Promise< @@ -255,6 +271,15 @@ export type UserIdentitiesGrantAccessToDeviceResponse = SetNonNullable< export type UserIdentitiesGrantAccessToDeviceOptions = never +export type UserIdentitiesListParams = + RouteRequestParams<'/user_identities/list'> + +export type UserIdentitiesListResponse = SetNonNullable< + Required> +> + +export type UserIdentitiesListOptions = never + export type UserIdentitiesListAccessibleDevicesParams = RouteRequestBody<'/user_identities/list_accessible_devices'> diff --git a/src/lib/seam/connect/routes/workspaces.ts b/src/lib/seam/connect/routes/workspaces.ts index 6a48b806..ce283b31 100644 --- a/src/lib/seam/connect/routes/workspaces.ts +++ b/src/lib/seam/connect/routes/workspaces.ts @@ -135,6 +135,18 @@ export class SeamHttpWorkspaces { return new SeamHttpWorkspaces(constructorOptions) } + async create( + body?: WorkspacesCreateBody, + ): Promise { + const { data } = await this.client.request({ + url: '/workspaces/create', + method: 'post', + data: body, + }) + + return data.workspace + } + async get( params?: WorkspacesGetParams, ): Promise { @@ -168,6 +180,14 @@ export class SeamHttpWorkspaces { } } +export type WorkspacesCreateBody = RouteRequestBody<'/workspaces/create'> + +export type WorkspacesCreateResponse = SetNonNullable< + Required> +> + +export type WorkspacesCreateOptions = never + export type WorkspacesGetParams = RouteRequestParams<'/workspaces/get'> export type WorkspacesGetResponse = SetNonNullable<