/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. * @generated-id: c1714d4b0b0e */ import { userCompleteProfileSetup } from "../funcs/userCompleteProfileSetup.js"; import { userCreateWorkspace } from "../funcs/userCreateWorkspace.js"; import { userGetProfile } from "../funcs/userGetProfile.js"; import { userListGitNamespaceRepositories } from "../funcs/userListGitNamespaceRepositories.js"; import { userListGitNamespaces } from "../funcs/userListGitNamespaces.js"; import { userListMemberships } from "../funcs/userListMemberships.js"; import { userSyncGitNamespaces } from "../funcs/userSyncGitNamespaces.js"; import { userUpdateProfile } from "../funcs/userUpdateProfile.js"; import { ClientSDK, RequestOptions } from "../lib/sdks.js"; import * as models from "../models/index.js"; import * as operations from "../models/operations/index.js"; import { unwrapAsync } from "../types/fp.js"; export class User extends ClientSDK { /** * List all workspaces the current user has access to. */ async listMemberships( options?: RequestOptions, ): Promise { return unwrapAsync(userListMemberships( this, options, )); } /** * Get the current user's profile and user-scoped onboarding state. */ async getProfile( options?: RequestOptions, ): Promise { return unwrapAsync(userGetProfile( this, options, )); } /** * Update the current user's profile (display name). */ async updateProfile( request?: operations.UpdateUserProfileRequest | undefined, options?: RequestOptions, ): Promise { return unwrapAsync(userUpdateProfile( this, request, options, )); } /** * Complete the required beta intake and profile setup dialog. */ async completeProfileSetup( request?: models.UserProfileSetupRequest | undefined, options?: RequestOptions, ): Promise { return unwrapAsync(userCompleteProfileSetup( this, request, options, )); } /** * Create a new workspace. The current user will be automatically added as an admin. */ async createWorkspace( request?: operations.CreateWorkspaceRequest | undefined, options?: RequestOptions, ): Promise { return unwrapAsync(userCreateWorkspace( this, request, options, )); } /** * List all git namespaces (GitHub installations) the current user has access to. */ async listGitNamespaces( request?: operations.ListGitNamespacesRequest | undefined, options?: RequestOptions, ): Promise { return unwrapAsync(userListGitNamespaces( this, request, options, )); } /** * Sync git namespaces from the provider. For GitHub, this fetches all app installations accessible to the user. */ async syncGitNamespaces( request?: operations.SyncGitNamespacesRequest | undefined, options?: RequestOptions, ): Promise { return unwrapAsync(userSyncGitNamespaces( this, request, options, )); } /** * List repositories accessible through a git namespace (GitHub installation). */ async listGitNamespaceRepositories( request: operations.ListGitNamespaceRepositoriesRequest, options?: RequestOptions, ): Promise { return unwrapAsync(userListGitNamespaceRepositories( this, request, options, )); } }