# UserService | windmill-client
Documentation for windmill-client

# Class UserService

- Defined in src/services.gen.ts:116

#####
Index

### Constructors

constructor

### Methods

acceptInvite
createToken
createTokenImpersonate
createUserGlobally
declineInvite
deleteToken
deleteUser
existsEmail
getCurrentEmail
getRunnable
getTutorialProgress
getUsage
getUser
globalUserDelete
globalUserRename
globalUserUpdate
globalUsernameInfo
globalWhoami
isOwnerOfPath
leaveInstance
listTokens
listUsernames
listUsers
listUsersAsSuperAdmin
listUsersUsage
listWorkspaceInvites
login
loginWithOauth
logout
refreshUserToken
setPassword
updateTutorialProgress
updateUser
usernameToEmail
whoami
whois

##
Constructors

### constructor

- new UserService(): UserService

- #### Returns UserService

##
Methods

### `Static` acceptInvite

- acceptInvite(data): CancelablePromise <string>

- accept invite to workspace

  #### Parameters

  - data: AcceptInviteData

    The data for the request.

  #### Returns CancelablePromise <string>

  string status

  #### Throws

  ApiError

  - Defined in src/services.gen.ts:467

### `Static` createToken

- createToken(data): CancelablePromise <string>

- create token

  #### Parameters

  - data: CreateTokenData

    The data for the request.

  #### Returns CancelablePromise <string>

  string token created

  #### Throws

  ApiError

  - Defined in src/services.gen.ts:624

### `Static` createTokenImpersonate

- createTokenImpersonate(data): CancelablePromise <string>

- create token to impersonate a user (require superadmin)

  #### Parameters

  - data: CreateTokenImpersonateData

    The data for the request.

  #### Returns CancelablePromise <string>

  string token created

  #### Throws

  ApiError

  - Defined in src/services.gen.ts:640

### `Static` createUserGlobally

- createUserGlobally(data): CancelablePromise <string>

- create user

  #### Parameters

  - data: CreateUserGloballyData

    The data for the request.

  #### Returns CancelablePromise <string>

  string user created

  #### Throws

  ApiError

  - Defined in src/services.gen.ts:229

### `Static` declineInvite

- declineInvite(data): CancelablePromise <string>

- decline invite to workspace

  #### Parameters

  - data: DeclineInviteData

    The data for the request.

  #### Returns CancelablePromise <string>

  string status

  #### Throws

  ApiError

  - Defined in src/services.gen.ts:483

### `Static` deleteToken

- deleteToken(data): CancelablePromise <string>

- delete token

  #### Parameters

  - data: DeleteTokenData

    The data for the request.

  #### Returns CancelablePromise <string>

  string delete token

  #### Throws

  ApiError

  - Defined in src/services.gen.ts:656

### `Static` deleteUser

- deleteUser(data): CancelablePromise <string>

- delete user (require admin privilege)

  #### Parameters

  - data: DeleteUserData

    The data for the request.

  #### Returns CancelablePromise <string>

  string delete user

  #### Throws

  ApiError

  - Defined in src/services.gen.ts:320

### `Static` existsEmail

- existsEmail(data): CancelablePromise <boolean>

- exists email

  #### Parameters

  - data: ExistsEmailData

    The data for the request.

  #### Returns CancelablePromise <boolean>

  boolean user

  #### Throws

  ApiError

  - Defined in src/services.gen.ts:518

### `Static` getCurrentEmail

- getCurrentEmail(): CancelablePromise <string>

- get current user email (if logged in)

  #### Returns CancelablePromise <string>

  string user email

  #### Throws

  ApiError

  - Defined in src/services.gen.ts:336

### `Static` getRunnable

- getRunnable(): CancelablePromise < GetRunnableResponse >

- get all runnables in every workspace

  #### Returns CancelablePromise < GetRunnableResponse >

  unknown free all runnables

  #### Throws

  ApiError

  - Defined in src/services.gen.ts:412

### `Static` getTutorialProgress

- getTutorialProgress(): CancelablePromise < GetTutorialProgressResponse >

- get tutorial progress

  #### Returns CancelablePromise < GetTutorialProgressResponse >

  unknown tutorial progress

  #### Throws

  ApiError

  - Defined in src/services.gen.ts:360

### `Static` getUsage

- getUsage(): CancelablePromise <number>

- get current usage outside of premium workspaces

  #### Returns CancelablePromise <number>

  number free usage

  #### Throws

  ApiError

  - Defined in src/services.gen.ts:400

### `Static` getUser

- getUser(data): CancelablePromise < User >

- get user (require admin privilege)

  #### Parameters

  - data: GetUserData

    The data for the request.

  #### Returns CancelablePromise < User >

  User user created

  #### Throws

  ApiError

  - Defined in src/services.gen.ts:154

### `Static` globalUserDelete

- globalUserDelete(data): CancelablePromise <string>

- global delete user (require super admin)

  #### Parameters

  - data: GlobalUserDeleteData

    The data for the request.

  #### Returns CancelablePromise <string>

  string user deleted

  #### Throws

  ApiError

  - Defined in src/services.gen.ts:302

### `Static` globalUserRename

- globalUserRename(data): CancelablePromise <string>

- global rename user (require super admin)

  #### Parameters

  - data: GlobalUserRenameData

    The data for the request.

  #### Returns CancelablePromise <string>

  string user renamed

  #### Throws

  ApiError

  - Defined in src/services.gen.ts:283

### `Static` globalUserUpdate

- globalUserUpdate(data): CancelablePromise <string>

- global update user (require super admin)

  #### Parameters

  - data: GlobalUserUpdateData

    The data for the request.

  #### Returns CancelablePromise <string>

  string user updated

  #### Throws

  ApiError

  - Defined in src/services.gen.ts:246

### `Static` globalUsernameInfo

- globalUsernameInfo(data): CancelablePromise < GlobalUsernameInfoResponse >

- global username info (require super admin)

  #### Parameters

  - data: GlobalUsernameInfoData

    The data for the request.

  #### Returns CancelablePromise < GlobalUsernameInfoResponse >

  unknown user renamed

  #### Throws

  ApiError

  - Defined in src/services.gen.ts:265

### `Static` globalWhoami

- globalWhoami(): CancelablePromise < GlobalUserInfo >

- get current global whoami (if logged in)

  #### Returns CancelablePromise < GlobalUserInfo >

  GlobalUserInfo user email

  #### Throws

  ApiError

  - Defined in src/services.gen.ts:424

### `Static` isOwnerOfPath

- isOwnerOfPath(data): CancelablePromise <boolean>

- is owner of path

  #### Parameters

  - data: IsOwnerOfPathData

    The data for the request.

  #### Returns CancelablePromise <boolean>

  boolean is owner

  #### Throws

  ApiError

  - Defined in src/services.gen.ts:195

### `Static` leaveInstance

- leaveInstance(): CancelablePromise <string>

- leave instance

  #### Returns CancelablePromise <string>

  string status

  #### Throws

  ApiError

  - Defined in src/services.gen.ts:388

### `Static` listTokens

- listTokens(data?): CancelablePromise < ListTokensResponse >

- list token

  #### Parameters

  - data: ListTokensData = {}

    The data for the request.

  #### Returns CancelablePromise < ListTokensResponse >

  TruncatedToken truncated token

  #### Throws

  ApiError

  - Defined in src/services.gen.ts:673

### `Static` listUsernames

- listUsernames(data): CancelablePromise < ListUsernamesResponse >

- list usernames

  #### Parameters

  - data: ListUsernamesData

    The data for the request.

  #### Returns CancelablePromise < ListUsernamesResponse >

  string user

  #### Throws

  ApiError

  - Defined in src/services.gen.ts:588

### `Static` listUsers

- listUsers(data): CancelablePromise < ListUsersResponse >

- list users

  #### Parameters

  - data: ListUsersData

    The data for the request.

  #### Returns CancelablePromise < ListUsersResponse >

  User user

  #### Throws

  ApiError

  - Defined in src/services.gen.ts:554

### `Static` listUsersAsSuperAdmin

- listUsersAsSuperAdmin(data?): CancelablePromise < ListUsersAsSuperAdminResponse >

- list all users as super admin (require to be super amdin)

  #### Parameters

  - data: ListUsersAsSuperAdminData = {}

    The data for the request.

  #### Returns CancelablePromise < ListUsersAsSuperAdminResponse >

  GlobalUserInfo user

  #### Throws

  ApiError

  - Defined in src/services.gen.ts:536

### `Static` listUsersUsage

- listUsersUsage(data): CancelablePromise < ListUsersUsageResponse >

- list users usage

  #### Parameters

  - data: ListUsersUsageData

    The data for the request.

  #### Returns CancelablePromise < ListUsersUsageResponse >

  UserUsage user

  #### Throws

  ApiError

  - Defined in src/services.gen.ts:571

### `Static` listWorkspaceInvites

- listWorkspaceInvites(): CancelablePromise < ListWorkspaceInvitesResponse >

- list all workspace invites

  #### Returns CancelablePromise < ListWorkspaceInvitesResponse >

  WorkspaceInvite list all workspace invites

  #### Throws

  ApiError

  - Defined in src/services.gen.ts:436

### `Static` login

- login(data): CancelablePromise <string>

- login with password

  #### Parameters

  - data: LoginData

    The data for the request.

  #### Returns CancelablePromise <string>

  string Successfully authenticated. The session ID is returned in a cookie named `token` and as plaintext response. Preferred method of authorization is through the bearer token. The cookie is only for browser convenience.

  #### Throws

  ApiError

  - Defined in src/services.gen.ts:125

### `Static` loginWithOauth

- loginWithOauth(data): CancelablePromise <string>

- login with oauth authorization flow

  #### Parameters

  - data: LoginWithOauthData

    The data for the request.

  #### Returns CancelablePromise <string>

  string Successfully authenticated. The session ID is returned in a cookie named `token` and as plaintext response. Preferred method of authorization is through the bearer token. The cookie is only for browser convenience.

  #### Throws

  ApiError

  - Defined in src/services.gen.ts:692

### `Static` logout

- logout(): CancelablePromise <string>

- logout

  #### Returns CancelablePromise <string>

  string clear cookies and clear token (if applicable)

  #### Throws

  ApiError

  - Defined in src/services.gen.ts:139

### `Static` refreshUserToken

- refreshUserToken(): CancelablePromise <string>

- refresh the current token

  #### Returns CancelablePromise <string>

  string free usage

  #### Throws

  ApiError

  - Defined in src/services.gen.ts:348

### `Static` setPassword

- setPassword(data): CancelablePromise <string>

- set password

  #### Parameters

  - data: SetPasswordData

    The data for the request.

  #### Returns CancelablePromise <string>

  string password set

  #### Throws

  ApiError

  - Defined in src/services.gen.ts:213

### `Static` updateTutorialProgress

- updateTutorialProgress(data): CancelablePromise <string>

- update tutorial progress

  #### Parameters

  - data: UpdateTutorialProgressData

    The data for the request.

  #### Returns CancelablePromise <string>

  string tutorial progress

  #### Throws

  ApiError

  - Defined in src/services.gen.ts:374

### `Static` updateUser

- updateUser(data): CancelablePromise <string>

- update user (require admin privilege)

  #### Parameters

  - data: UpdateUserData

    The data for the request.

  #### Returns CancelablePromise <string>

  string edited user

  #### Throws

  ApiError

  - Defined in src/services.gen.ts:174

### `Static` usernameToEmail

- usernameToEmail(data): CancelablePromise <string>

- get email from username

  #### Parameters

  - data: UsernameToEmailData

    The data for the request.

  #### Returns CancelablePromise <string>

  string email

  #### Throws

  ApiError

  - Defined in src/services.gen.ts:606

### `Static` whoami

- whoami(data): CancelablePromise < User >

- whoami

  #### Parameters

  - data: WhoamiData

    The data for the request.

  #### Returns CancelablePromise < User >

  User user

  #### Throws

  ApiError

  - Defined in src/services.gen.ts:450

### `Static` whois

- whois(data): CancelablePromise < User >

- whois

  #### Parameters

  - data: WhoisData

    The data for the request.

  #### Returns CancelablePromise < User >

  User user

  #### Throws

  ApiError

  - Defined in src/services.gen.ts:500