Interface IUsersApi

Hierarchy

  • IWaitForSync
    • IUsersApi

Methods

  • Creates users in bulk.

    Parameters

    • users: UserCreate[]

      The array of users to create.

    Returns Promise<UserCreateBulkOperation>

    A promise that resolves with the bulk create users report .

    Throws

    PermitApiError If the API returns an error HTTP status code.

    Throws

    PermitContextError If the configured ApiContext does not match the required endpoint context.

  • Deletes users in bulk.

    Parameters

    • userKeys: string[]

      The array of user keys to delete.

    Returns Promise<UserDeleteBulkOperation>

    A promise that resolves with the bulk delete users report .

    Throws

    PermitApiError If the API returns an error HTTP status code.

    Throws

    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.

    Parameters

    • users: UserCreate[]

      The array of users to replace.

    Returns Promise<UserReplaceBulkOperation>

    A promise that resolves with the bulk replacement users report .

    Throws

    PermitApiError If the API returns an error HTTP status code.

    Throws

    PermitContextError If the configured ApiContext does not match the required endpoint context.

  • Deletes a user.

    Parameters

    • userKey: string

      The key of the user to delete.

    Returns Promise<void>

    A promise that resolves when the user is deleted.

    Throws

    PermitApiError If the API returns an error HTTP status code.

    Throws

    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).

    Parameters

    • roleFilters: IGetUserRoles

      The filters for retrieving role assignments.

    Returns Promise<RoleAssignmentRead[]>

    A promise that resolves with an array of role assignments for the user.

    Throws

    PermitApiError If the API returns an error HTTP status code.

    Throws

    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.

    Parameters

    Returns Promise<void>

    A promise that resolves when the role is successfully unassigned from the user.

    Throws

    PermitApiError If the API returns an error HTTP status code.

    Throws

    PermitContextError If the configured ApiContext does not match the required endpoint context.

  • Wait for the facts to be synchronized with the PDP. Available only when proxyFactsViaPdp is set to true.

    Parameters

    • timeout: null | number

      The maximum number of seconds to wait for the synchronization to complete. Set to null to wait indefinitely.

    Returns IUsersApi

Generated using TypeDoc