Creates an instance of DeprecatedApiClient.
The configuration object for the Permit SDK.
The logger object for logging.
Creates a condition set rule (i.e: grants permission to a userset to act on a resourceset).
The condition set rule data.
A promise that resolves to a ConditionSetRuleRead object representing the assigned condition set rule.
PermitApiError If the API returns an error HTTP status code.
PermitContextError If the configured ApiContext does not match the required endpoint context.
replaced with permit.api.conditionSetRules.create()
Assigns a role to a user.
The role assignment data.
A promise that resolves to a RoleAssignmentRead object representing 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.
replaced with permit.api.users.assignRole()
Creates a new condition set.
The condition set to create.
A promise that resolves to a ConditionSetRead object representing the created condition set.
PermitApiError If the API returns an error HTTP status code.
PermitContextError If the configured ApiContext does not match the required endpoint context.
replaced with permit.api.conditionSets.create()
Creates a new resource.
The resource to create.
A promise that resolves to a ResourceRead object representing the created resource.
PermitApiError If the API returns an error HTTP status code.
PermitContextError If the configured ApiContext does not match the required endpoint context.
replaced with permit.api.resources.create()
Creates a new role.
The role to create.
A promise that resolves to a RoleRead object representing the created role.
PermitApiError If the API returns an error HTTP status code.
PermitContextError If the configured ApiContext does not match the required endpoint context.
replaced with permit.api.roles.create()
Creates a new tenant.
The tenant to create.
A promise that resolves to a TenantRead object representing the created tenant.
PermitApiError If the API returns an error HTTP status code.
PermitContextError If the configured ApiContext does not match the required endpoint context.
replaced with permit.api.tenants.create()
Creates a new user.
The user to create.
A promise that resolves to a UserRead object representing 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.
replaced with permit.api.users.create()
Deletes a condition set.
The ID or key of the condition set to delete.
A promise that resolves when the condition set is deleted.
PermitApiError If the API returns an error HTTP status code.
PermitContextError If the configured ApiContext does not match the required endpoint context.
replaced with permit.api.conditionSets.delete()
Deletes a resource.
The ID or key of the resource to delete.
A promise that resolves when the resource is deleted.
PermitApiError If the API returns an error HTTP status code.
PermitContextError If the configured ApiContext does not match the required endpoint context.
replaced with permit.api.resources.delete()
Deletes a role.
The ID or key of the role to delete.
A promise that resolves when the role is deleted.
PermitApiError If the API returns an error HTTP status code.
PermitContextError If the configured ApiContext does not match the required endpoint context.
replaced with permit.api.roles.delete()
Deletes a tenant.
The ID or key of the tenant to delete.
A promise that resolves when the tenant is deleted.
PermitApiError If the API returns an error HTTP status code.
PermitContextError If the configured ApiContext does not match the required endpoint context.
replaced with permit.api.tenants.delete()
Deletes a user.
The ID or 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.
replaced with permit.api.users.delete()
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 the assigned roles for a user (either in a single tenant or in all tenants).
The ID or key of the user.
Optional
tenant: stringThe ID or key of the tenant, optional. If provided, only roles assigned within this tenant will be returned.
A promise that resolves to an array of RoleAssignmentRead objects representing the assigned roles.
PermitApiError If the API returns an error HTTP status code.
PermitContextError If the configured ApiContext does not match the required endpoint context.
replaced with permit.api.users.getAssignedRoles()
Retrieves a role by ID or key.
The ID or the key of the role.
A promise that resolves to a RoleRead object representing the role.
PermitApiError If the API returns an error HTTP status code.
PermitContextError If the configured ApiContext does not match the required endpoint context.
replaced with permit.api.roles.get()
Retrieves a tenant by ID or key.
The ID or the key of the tenant.
A promise that resolves to a TenantRead object representing the tenant.
PermitApiError If the API returns an error HTTP status code.
PermitContextError If the configured ApiContext does not match the required endpoint context.
replaced with permit.api.tenants.get()
Retrieves a user by ID or key
The ID or the key of the user.
A promise that resolves to a UserRead object representing the user.
PermitApiError If the API returns an error HTTP status code.
PermitContextError If the configured ApiContext does not match the required endpoint context.
replaced with permit.api.users.get()
Retrieves a list of condition sets.
The type of the condition set, either userset
or resourceset
.
The page number.
The number of items per page.
A promise that resolves to an array of ConditionSetRead objects representing the condition sets.
PermitApiError If the API returns an error HTTP status code.
PermitContextError If the configured ApiContext does not match the required endpoint context.
replaced with permit.api.conditionSets.list()
Retrieves a list of condition set rules.
The page number.
The number of items per page.
A promise that resolves to an array of ConditionSetRuleRead objects representing the condition set rules.
PermitApiError If the API returns an error HTTP status code.
PermitContextError If the configured ApiContext does not match the required endpoint context.
replaced with permit.api.conditionSetRules.list()
Retrieves a list of roles.
A promise that resolves to an array of RoleRead objects representing the roles.
PermitApiError If the API returns an error HTTP status code.
PermitContextError If the configured ApiContext does not match the required endpoint context.
replaced with permit.api.roles.list()
Retrieves a list of tenants.
Optional
page: numberThe page number.
A promise that resolves to an array of TenantRead objects representing the tenants.
PermitApiError If the API returns an error HTTP status code.
PermitContextError If the configured ApiContext does not match the required endpoint context.
replaced with permit.api.tenants.list()
Retrieves a list of users.
A promise that resolves to an array of UserRead objects representing the users.
PermitApiError If the API returns an error HTTP status code.
PermitContextError If the configured ApiContext does not match the required endpoint context.
replaced with permit.api.users.list()
Creates or Updates in place a user.
The user to create or update.
A promise that resolves to a UserRead object representing the synced user.
PermitApiError If the API returns an error HTTP status code.
PermitContextError If the configured ApiContext does not match the required endpoint context.
replaced with permit.api.users.sync()
Removes a condition set rule (i.e: unassigns permission from a userset to act on a resourceset).
A promise that resolves when the condition set rule is deleted.
PermitApiError If the API returns an error HTTP status code.
PermitContextError If the configured ApiContext does not match the required endpoint context.
replaced with permit.api.conditionSetRules.delete()
Unassigns a role from a user.
The role unassignment data.
A promise that resolves when the role is unassigned.
PermitApiError If the API returns an error HTTP status code.
PermitContextError If the configured ApiContext does not match the required endpoint context.
replaced with permit.api.users.unassignRole()
Updates an existing condition set.
The ID or key of the condition set to update.
The updated condition set data.
A promise that resolves to a ConditionSetRead object representing the updated condition set.
PermitApiError If the API returns an error HTTP status code.
PermitContextError If the configured ApiContext does not match the required endpoint context.
replaced with permit.api.conditionSets.update()
Updates an existing resource.
The ID or key of the resource to update.
The updated resource data.
A promise that resolves to a ResourceRead object representing the updated resource.
PermitApiError If the API returns an error HTTP status code.
PermitContextError If the configured ApiContext does not match the required endpoint context.
replaced with permit.api.resources.update()
Updates an existing role.
The ID or key of the role to update.
The updated role data.
A promise that resolves to a RoleRead object representing the updated role.
PermitApiError If the API returns an error HTTP status code.
PermitContextError If the configured ApiContext does not match the required endpoint context.
replaced with permit.api.roles.update()
Updates an existing tenant.
The ID or key of the tenant to update.
The updated tenant data.
A promise that resolves to a TenantRead object representing the updated tenant.
PermitApiError If the API returns an error HTTP status code.
PermitContextError If the configured ApiContext does not match the required endpoint context.
replaced with permit.api.tenants.update()
Updates an existing user.
The ID or key of the user to update.
The updated user data.
A promise that resolves to a UserRead object representing 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.
replaced with permit.api.users.update()
Generated using TypeDoc
Contains all the deprecated
permit.api.
methods in one place. The SDK now replaced allpermit.api.createRole()
withpermit.api.roles.create()
due to the large number of API endpoints, trying to allow more user-friendly code autocomplete behavior.