Creates an instance of the UsersApi.
The configuration object for the Permit SDK.
The logger instance for logging.
Assigns a role to a user in the scope of a given tenant.
The role assignment details.
A promise that resolves with the assigned role.
PermitApiError If the API returns an error HTTP status code.
PermitContextError If the configured ApiContext does not match the required endpoint context.
Creates users in bulk.
The array of users to create.
A promise that resolves to the bulk creation result.
PermitApiError If the API returns an error HTTP status code.
PermitContextError If the configured ApiContext does not match the required endpoint context.
Deletes users in bulk.
The array of user keys to delete.
A promise that resolves to the bulk deletion result.
PermitApiError If the API returns an error HTTP status code.
PermitContextError If the configured ApiContext does not match the required endpoint context.
Replaces users in bulk.
If a user exists, it will be replaced. Otherwise, it will be created.
The array of users to replace.
A promise that resolves to the bulk replacement result.
PermitApiError If the API returns an error HTTP status code.
PermitContextError If the configured ApiContext does not match the required endpoint context.
Creates a new user.
The data for the new user.
A promise that resolves to the created user.
PermitApiError If the API returns an error HTTP status code.
PermitContextError If the configured ApiContext does not match the required endpoint context.
Deletes a user.
The key of the user to delete.
A promise that resolves when the user is deleted.
PermitApiError If the API returns an error HTTP status code.
PermitContextError If the configured ApiContext does not match the required endpoint context.
Ensure that the API Key has the necessary permissions to successfully call the API endpoint. Note that this check is not foolproof, and the API may still throw 401.
The required API Key Access level for the endpoint.
PermitContextError If the currently set API key access level does not match the required access level.
Ensure that the API context matches the required endpoint context.
The required API context level for the endpoint.
PermitContextError If the currently set API context level does not match the required context level.
Retrieves a user by its key.
The key of the user.
A promise that resolves to the user.
PermitApiError If the API returns an error HTTP status code.
PermitContextError If the configured ApiContext does not match the required endpoint context.
Retrieves the roles assigned to a user in a given tenant (if the tenant filter is provided) or across all tenants (if the tenant filter in not provided).
The filters for retrieving role assignments.
A promise that resolves with an array of role assignments for the user.
PermitApiError If the API returns an error HTTP status code.
PermitContextError If the configured ApiContext does not match the required endpoint context.
Retrieves a user by its ID. Alias for the get method.
The ID of the user.
A promise that resolves to the user.
PermitApiError If the API returns an error HTTP status code.
PermitContextError If the configured ApiContext does not match the required endpoint context.
Retrieves a user by its key. Alias for the get method.
The key of the user.
A promise that resolves to the user.
PermitApiError If the API returns an error HTTP status code.
PermitContextError If the configured ApiContext does not match the required endpoint context.
Retrieves a list of users.
Optional
params: IUsersListParamsFiltering and pagination options,
A promise that resolves to a PaginatedResultUserRead object containing the list of users.
PermitApiError If the API returns an error HTTP status code.
PermitContextError If the configured ApiContext does not match the required endpoint context.
Synchronizes user data by creating or updating a user.
The data of the user to be synchronized.
A promise that resolves with the result of the user creation or update operation.
PermitApiError If the API returns an error HTTP status code.
PermitContextError If the configured ApiContext does not match the required endpoint context.
Unassigns a role from a user in the scope of a given tenant.
The role unassignment details.
A promise that resolves when the role is successfully unassigned from the user.
PermitApiError If the API returns an error HTTP status code.
PermitContextError If the configured ApiContext does not match the required endpoint context.
Updates a user.
The key of the user.
The updated data for the user.
A promise that resolves to the updated user.
PermitApiError If the API returns an error HTTP status code.
PermitContextError If the configured ApiContext does not match the required endpoint context.
Generated using TypeDoc
The UsersApi class provides methods for interacting with Permit Users.