Skip to content

Commit

Permalink
adding dev-v0.10.2 tag to this commit to ensure building
Browse files Browse the repository at this point in the history
  • Loading branch information
rishabhpoddar committed Jul 14, 2022
1 parent efc1f9a commit b158b72
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 28 deletions.
2 changes: 1 addition & 1 deletion html/supertokens_python/constants.html
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ <h1 class="title">Module <code>supertokens_python.constants</code></h1>
# License for the specific language governing permissions and limitations
# under the License.
SUPPORTED_CDI_VERSIONS = [&#34;2.9&#34;, &#34;2.10&#34;, &#34;2.11&#34;, &#34;2.12&#34;, &#34;2.13&#34;, &#34;2.14&#34;]
VERSION = &#34;0.10.1&#34;
VERSION = &#34;0.10.2&#34;
TELEMETRY = &#34;/telemetry&#34;
USER_COUNT = &#34;/users/count&#34;
USER_DELETE = &#34;/user/remove&#34;
Expand Down
62 changes: 35 additions & 27 deletions html/supertokens_python/recipe/userroles/syncio/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -67,31 +67,31 @@ <h1 class="title">Module <code>supertokens_python.recipe.userroles.syncio</code>


def remove_user_role(
user_id: str, role: str, user_context: Dict[str, Any]
user_id: str, role: str, user_context: Union[Dict[str, Any], None] = None
) -&gt; Union[RemoveUserRoleOkResult, UnknownRoleError]:
from supertokens_python.recipe.userroles.asyncio import remove_user_role

return sync(remove_user_role(user_id, role, user_context))


def get_roles_for_user(
user_id: str, user_context: Dict[str, Any]
user_id: str, user_context: Union[Dict[str, Any], None] = None
) -&gt; GetRolesForUserOkResult:
from supertokens_python.recipe.userroles.asyncio import get_roles_for_user

return sync(get_roles_for_user(user_id, user_context))


def get_users_that_have_role(
role: str, user_context: Dict[str, Any]
role: str, user_context: Union[Dict[str, Any], None] = None
) -&gt; Union[GetUsersThatHaveRoleOkResult, UnknownRoleError]:
from supertokens_python.recipe.userroles.asyncio import get_users_that_have_role

return sync(get_users_that_have_role(role, user_context))


def create_new_role_or_add_permissions(
role: str, permissions: List[str], user_context: Dict[str, Any]
role: str, permissions: List[str], user_context: Union[Dict[str, Any], None] = None
) -&gt; CreateNewRoleOrAddPermissionsOkResult:
from supertokens_python.recipe.userroles.asyncio import (
create_new_role_or_add_permissions,
Expand All @@ -101,23 +101,23 @@ <h1 class="title">Module <code>supertokens_python.recipe.userroles.syncio</code>


def get_permissions_for_role(
role: str, user_context: Dict[str, Any]
role: str, user_context: Union[Dict[str, Any], None] = None
) -&gt; Union[GetPermissionsForRoleOkResult, UnknownRoleError]:
from supertokens_python.recipe.userroles.asyncio import get_permissions_for_role

return sync(get_permissions_for_role(role, user_context))


def remove_permissions_from_role(
role: str, permissions: List[str], user_context: Dict[str, Any]
role: str, permissions: List[str], user_context: Union[Dict[str, Any], None] = None
) -&gt; Union[RemovePermissionsFromRoleOkResult, UnknownRoleError]:
from supertokens_python.recipe.userroles.asyncio import remove_permissions_from_role

return sync(remove_permissions_from_role(role, permissions, user_context))


def get_roles_that_have_permission(
permission: str, user_context: Dict[str, Any]
permission: str, user_context: Union[Dict[str, Any], None] = None
) -&gt; GetRolesThatHavePermissionOkResult:
from supertokens_python.recipe.userroles.asyncio import (
get_roles_that_have_permission,
Expand All @@ -126,13 +126,17 @@ <h1 class="title">Module <code>supertokens_python.recipe.userroles.syncio</code>
return sync(get_roles_that_have_permission(permission, user_context))


def delete_role(role: str, user_context: Dict[str, Any]) -&gt; DeleteRoleOkResult:
def delete_role(
role: str, user_context: Union[Dict[str, Any], None] = None
) -&gt; DeleteRoleOkResult:
from supertokens_python.recipe.userroles.asyncio import delete_role

return sync(delete_role(role, user_context))


def get_all_roles(user_context: Dict[str, Any]) -&gt; GetAllRolesOkResult:
def get_all_roles(
user_context: Union[Dict[str, Any], None] = None
) -&gt; GetAllRolesOkResult:
from supertokens_python.recipe.userroles.asyncio import get_all_roles

return sync(get_all_roles(user_context))</code></pre>
Expand Down Expand Up @@ -163,7 +167,7 @@ <h2 class="section-title" id="header-functions">Functions</h2>
</details>
</dd>
<dt id="supertokens_python.recipe.userroles.syncio.create_new_role_or_add_permissions"><code class="name flex">
<span>def <span class="ident">create_new_role_or_add_permissions</span></span>(<span>role: str, permissions: List[str], user_context: Dict[str, Any]) ‑> <a title="supertokens_python.recipe.userroles.interfaces.CreateNewRoleOrAddPermissionsOkResult" href="../interfaces.html#supertokens_python.recipe.userroles.interfaces.CreateNewRoleOrAddPermissionsOkResult">CreateNewRoleOrAddPermissionsOkResult</a></span>
<span>def <span class="ident">create_new_role_or_add_permissions</span></span>(<span>role: str, permissions: List[str], user_context: Optional[Dict[str, Any]] = None) ‑> <a title="supertokens_python.recipe.userroles.interfaces.CreateNewRoleOrAddPermissionsOkResult" href="../interfaces.html#supertokens_python.recipe.userroles.interfaces.CreateNewRoleOrAddPermissionsOkResult">CreateNewRoleOrAddPermissionsOkResult</a></span>
</code></dt>
<dd>
<div class="desc"></div>
Expand All @@ -172,7 +176,7 @@ <h2 class="section-title" id="header-functions">Functions</h2>
<span>Expand source code</span>
</summary>
<pre><code class="python">def create_new_role_or_add_permissions(
role: str, permissions: List[str], user_context: Dict[str, Any]
role: str, permissions: List[str], user_context: Union[Dict[str, Any], None] = None
) -&gt; CreateNewRoleOrAddPermissionsOkResult:
from supertokens_python.recipe.userroles.asyncio import (
create_new_role_or_add_permissions,
Expand All @@ -182,37 +186,41 @@ <h2 class="section-title" id="header-functions">Functions</h2>
</details>
</dd>
<dt id="supertokens_python.recipe.userroles.syncio.delete_role"><code class="name flex">
<span>def <span class="ident">delete_role</span></span>(<span>role: str, user_context: Dict[str, Any]) ‑> <a title="supertokens_python.recipe.userroles.interfaces.DeleteRoleOkResult" href="../interfaces.html#supertokens_python.recipe.userroles.interfaces.DeleteRoleOkResult">DeleteRoleOkResult</a></span>
<span>def <span class="ident">delete_role</span></span>(<span>role: str, user_context: Optional[Dict[str, Any]] = None) ‑> <a title="supertokens_python.recipe.userroles.interfaces.DeleteRoleOkResult" href="../interfaces.html#supertokens_python.recipe.userroles.interfaces.DeleteRoleOkResult">DeleteRoleOkResult</a></span>
</code></dt>
<dd>
<div class="desc"></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def delete_role(role: str, user_context: Dict[str, Any]) -&gt; DeleteRoleOkResult:
<pre><code class="python">def delete_role(
role: str, user_context: Union[Dict[str, Any], None] = None
) -&gt; DeleteRoleOkResult:
from supertokens_python.recipe.userroles.asyncio import delete_role

return sync(delete_role(role, user_context))</code></pre>
</details>
</dd>
<dt id="supertokens_python.recipe.userroles.syncio.get_all_roles"><code class="name flex">
<span>def <span class="ident">get_all_roles</span></span>(<span>user_context: Dict[str, Any]) ‑> <a title="supertokens_python.recipe.userroles.interfaces.GetAllRolesOkResult" href="../interfaces.html#supertokens_python.recipe.userroles.interfaces.GetAllRolesOkResult">GetAllRolesOkResult</a></span>
<span>def <span class="ident">get_all_roles</span></span>(<span>user_context: Optional[Dict[str, Any]] = None) ‑> <a title="supertokens_python.recipe.userroles.interfaces.GetAllRolesOkResult" href="../interfaces.html#supertokens_python.recipe.userroles.interfaces.GetAllRolesOkResult">GetAllRolesOkResult</a></span>
</code></dt>
<dd>
<div class="desc"></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def get_all_roles(user_context: Dict[str, Any]) -&gt; GetAllRolesOkResult:
<pre><code class="python">def get_all_roles(
user_context: Union[Dict[str, Any], None] = None
) -&gt; GetAllRolesOkResult:
from supertokens_python.recipe.userroles.asyncio import get_all_roles

return sync(get_all_roles(user_context))</code></pre>
</details>
</dd>
<dt id="supertokens_python.recipe.userroles.syncio.get_permissions_for_role"><code class="name flex">
<span>def <span class="ident">get_permissions_for_role</span></span>(<span>role: str, user_context: Dict[str, Any]) ‑> Union[<a title="supertokens_python.recipe.userroles.interfaces.GetPermissionsForRoleOkResult" href="../interfaces.html#supertokens_python.recipe.userroles.interfaces.GetPermissionsForRoleOkResult">GetPermissionsForRoleOkResult</a><a title="supertokens_python.recipe.userroles.interfaces.UnknownRoleError" href="../interfaces.html#supertokens_python.recipe.userroles.interfaces.UnknownRoleError">UnknownRoleError</a>]</span>
<span>def <span class="ident">get_permissions_for_role</span></span>(<span>role: str, user_context: Optional[Dict[str, Any]] = None) ‑> Union[<a title="supertokens_python.recipe.userroles.interfaces.GetPermissionsForRoleOkResult" href="../interfaces.html#supertokens_python.recipe.userroles.interfaces.GetPermissionsForRoleOkResult">GetPermissionsForRoleOkResult</a><a title="supertokens_python.recipe.userroles.interfaces.UnknownRoleError" href="../interfaces.html#supertokens_python.recipe.userroles.interfaces.UnknownRoleError">UnknownRoleError</a>]</span>
</code></dt>
<dd>
<div class="desc"></div>
Expand All @@ -221,15 +229,15 @@ <h2 class="section-title" id="header-functions">Functions</h2>
<span>Expand source code</span>
</summary>
<pre><code class="python">def get_permissions_for_role(
role: str, user_context: Dict[str, Any]
role: str, user_context: Union[Dict[str, Any], None] = None
) -&gt; Union[GetPermissionsForRoleOkResult, UnknownRoleError]:
from supertokens_python.recipe.userroles.asyncio import get_permissions_for_role

return sync(get_permissions_for_role(role, user_context))</code></pre>
</details>
</dd>
<dt id="supertokens_python.recipe.userroles.syncio.get_roles_for_user"><code class="name flex">
<span>def <span class="ident">get_roles_for_user</span></span>(<span>user_id: str, user_context: Dict[str, Any]) ‑> <a title="supertokens_python.recipe.userroles.interfaces.GetRolesForUserOkResult" href="../interfaces.html#supertokens_python.recipe.userroles.interfaces.GetRolesForUserOkResult">GetRolesForUserOkResult</a></span>
<span>def <span class="ident">get_roles_for_user</span></span>(<span>user_id: str, user_context: Optional[Dict[str, Any]] = None) ‑> <a title="supertokens_python.recipe.userroles.interfaces.GetRolesForUserOkResult" href="../interfaces.html#supertokens_python.recipe.userroles.interfaces.GetRolesForUserOkResult">GetRolesForUserOkResult</a></span>
</code></dt>
<dd>
<div class="desc"></div>
Expand All @@ -238,15 +246,15 @@ <h2 class="section-title" id="header-functions">Functions</h2>
<span>Expand source code</span>
</summary>
<pre><code class="python">def get_roles_for_user(
user_id: str, user_context: Dict[str, Any]
user_id: str, user_context: Union[Dict[str, Any], None] = None
) -&gt; GetRolesForUserOkResult:
from supertokens_python.recipe.userroles.asyncio import get_roles_for_user

return sync(get_roles_for_user(user_id, user_context))</code></pre>
</details>
</dd>
<dt id="supertokens_python.recipe.userroles.syncio.get_roles_that_have_permission"><code class="name flex">
<span>def <span class="ident">get_roles_that_have_permission</span></span>(<span>permission: str, user_context: Dict[str, Any]) ‑> <a title="supertokens_python.recipe.userroles.interfaces.GetRolesThatHavePermissionOkResult" href="../interfaces.html#supertokens_python.recipe.userroles.interfaces.GetRolesThatHavePermissionOkResult">GetRolesThatHavePermissionOkResult</a></span>
<span>def <span class="ident">get_roles_that_have_permission</span></span>(<span>permission: str, user_context: Optional[Dict[str, Any]] = None) ‑> <a title="supertokens_python.recipe.userroles.interfaces.GetRolesThatHavePermissionOkResult" href="../interfaces.html#supertokens_python.recipe.userroles.interfaces.GetRolesThatHavePermissionOkResult">GetRolesThatHavePermissionOkResult</a></span>
</code></dt>
<dd>
<div class="desc"></div>
Expand All @@ -255,7 +263,7 @@ <h2 class="section-title" id="header-functions">Functions</h2>
<span>Expand source code</span>
</summary>
<pre><code class="python">def get_roles_that_have_permission(
permission: str, user_context: Dict[str, Any]
permission: str, user_context: Union[Dict[str, Any], None] = None
) -&gt; GetRolesThatHavePermissionOkResult:
from supertokens_python.recipe.userroles.asyncio import (
get_roles_that_have_permission,
Expand All @@ -265,7 +273,7 @@ <h2 class="section-title" id="header-functions">Functions</h2>
</details>
</dd>
<dt id="supertokens_python.recipe.userroles.syncio.get_users_that_have_role"><code class="name flex">
<span>def <span class="ident">get_users_that_have_role</span></span>(<span>role: str, user_context: Dict[str, Any]) ‑> Union[<a title="supertokens_python.recipe.userroles.interfaces.GetUsersThatHaveRoleOkResult" href="../interfaces.html#supertokens_python.recipe.userroles.interfaces.GetUsersThatHaveRoleOkResult">GetUsersThatHaveRoleOkResult</a><a title="supertokens_python.recipe.userroles.interfaces.UnknownRoleError" href="../interfaces.html#supertokens_python.recipe.userroles.interfaces.UnknownRoleError">UnknownRoleError</a>]</span>
<span>def <span class="ident">get_users_that_have_role</span></span>(<span>role: str, user_context: Optional[Dict[str, Any]] = None) ‑> Union[<a title="supertokens_python.recipe.userroles.interfaces.GetUsersThatHaveRoleOkResult" href="../interfaces.html#supertokens_python.recipe.userroles.interfaces.GetUsersThatHaveRoleOkResult">GetUsersThatHaveRoleOkResult</a><a title="supertokens_python.recipe.userroles.interfaces.UnknownRoleError" href="../interfaces.html#supertokens_python.recipe.userroles.interfaces.UnknownRoleError">UnknownRoleError</a>]</span>
</code></dt>
<dd>
<div class="desc"></div>
Expand All @@ -274,15 +282,15 @@ <h2 class="section-title" id="header-functions">Functions</h2>
<span>Expand source code</span>
</summary>
<pre><code class="python">def get_users_that_have_role(
role: str, user_context: Dict[str, Any]
role: str, user_context: Union[Dict[str, Any], None] = None
) -&gt; Union[GetUsersThatHaveRoleOkResult, UnknownRoleError]:
from supertokens_python.recipe.userroles.asyncio import get_users_that_have_role

return sync(get_users_that_have_role(role, user_context))</code></pre>
</details>
</dd>
<dt id="supertokens_python.recipe.userroles.syncio.remove_permissions_from_role"><code class="name flex">
<span>def <span class="ident">remove_permissions_from_role</span></span>(<span>role: str, permissions: List[str], user_context: Dict[str, Any]) ‑> Union[<a title="supertokens_python.recipe.userroles.interfaces.RemovePermissionsFromRoleOkResult" href="../interfaces.html#supertokens_python.recipe.userroles.interfaces.RemovePermissionsFromRoleOkResult">RemovePermissionsFromRoleOkResult</a><a title="supertokens_python.recipe.userroles.interfaces.UnknownRoleError" href="../interfaces.html#supertokens_python.recipe.userroles.interfaces.UnknownRoleError">UnknownRoleError</a>]</span>
<span>def <span class="ident">remove_permissions_from_role</span></span>(<span>role: str, permissions: List[str], user_context: Optional[Dict[str, Any]] = None) ‑> Union[<a title="supertokens_python.recipe.userroles.interfaces.RemovePermissionsFromRoleOkResult" href="../interfaces.html#supertokens_python.recipe.userroles.interfaces.RemovePermissionsFromRoleOkResult">RemovePermissionsFromRoleOkResult</a><a title="supertokens_python.recipe.userroles.interfaces.UnknownRoleError" href="../interfaces.html#supertokens_python.recipe.userroles.interfaces.UnknownRoleError">UnknownRoleError</a>]</span>
</code></dt>
<dd>
<div class="desc"></div>
Expand All @@ -291,15 +299,15 @@ <h2 class="section-title" id="header-functions">Functions</h2>
<span>Expand source code</span>
</summary>
<pre><code class="python">def remove_permissions_from_role(
role: str, permissions: List[str], user_context: Dict[str, Any]
role: str, permissions: List[str], user_context: Union[Dict[str, Any], None] = None
) -&gt; Union[RemovePermissionsFromRoleOkResult, UnknownRoleError]:
from supertokens_python.recipe.userroles.asyncio import remove_permissions_from_role

return sync(remove_permissions_from_role(role, permissions, user_context))</code></pre>
</details>
</dd>
<dt id="supertokens_python.recipe.userroles.syncio.remove_user_role"><code class="name flex">
<span>def <span class="ident">remove_user_role</span></span>(<span>user_id: str, role: str, user_context: Dict[str, Any]) ‑> Union[<a title="supertokens_python.recipe.userroles.interfaces.RemoveUserRoleOkResult" href="../interfaces.html#supertokens_python.recipe.userroles.interfaces.RemoveUserRoleOkResult">RemoveUserRoleOkResult</a><a title="supertokens_python.recipe.userroles.interfaces.UnknownRoleError" href="../interfaces.html#supertokens_python.recipe.userroles.interfaces.UnknownRoleError">UnknownRoleError</a>]</span>
<span>def <span class="ident">remove_user_role</span></span>(<span>user_id: str, role: str, user_context: Optional[Dict[str, Any]] = None) ‑> Union[<a title="supertokens_python.recipe.userroles.interfaces.RemoveUserRoleOkResult" href="../interfaces.html#supertokens_python.recipe.userroles.interfaces.RemoveUserRoleOkResult">RemoveUserRoleOkResult</a><a title="supertokens_python.recipe.userroles.interfaces.UnknownRoleError" href="../interfaces.html#supertokens_python.recipe.userroles.interfaces.UnknownRoleError">UnknownRoleError</a>]</span>
</code></dt>
<dd>
<div class="desc"></div>
Expand All @@ -308,7 +316,7 @@ <h2 class="section-title" id="header-functions">Functions</h2>
<span>Expand source code</span>
</summary>
<pre><code class="python">def remove_user_role(
user_id: str, role: str, user_context: Dict[str, Any]
user_id: str, role: str, user_context: Union[Dict[str, Any], None] = None
) -&gt; Union[RemoveUserRoleOkResult, UnknownRoleError]:
from supertokens_python.recipe.userroles.asyncio import remove_user_role

Expand Down

0 comments on commit b158b72

Please sign in to comment.