Skip to content

Commit

Permalink
adding dev-v0.24.2 tag to this commit to ensure building
Browse files Browse the repository at this point in the history
  • Loading branch information
rishabhpoddar committed Sep 3, 2024
1 parent f0edfe6 commit 742d4cb
Show file tree
Hide file tree
Showing 22 changed files with 64 additions and 48 deletions.
6 changes: 3 additions & 3 deletions html/supertokens_python/asyncio/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ <h2 class="section-title" id="header-functions">Functions</h2>
</details>
</dd>
<dt id="supertokens_python.asyncio.delete_user_id_mapping"><code class="name flex">
<span>async def <span class="ident">delete_user_id_mapping</span></span>(<span>user_id: str, user_id_type: Optional[typing_extensions.Literal['SUPERTOKENS', 'EXTERNAL', 'ANY']] = None, force: Optional[bool] = None, user_context: Optional[Dict[str, Any]] = None) ‑> <a title="supertokens_python.interfaces.DeleteUserIdMappingOkResult" href="../interfaces.html#supertokens_python.interfaces.DeleteUserIdMappingOkResult">DeleteUserIdMappingOkResult</a></span>
<span>async def <span class="ident">delete_user_id_mapping</span></span>(<span>user_id: str, user_id_type: Optional[Literal['SUPERTOKENS', 'EXTERNAL', 'ANY']] = None, force: Optional[bool] = None, user_context: Optional[Dict[str, Any]] = None) ‑> <a title="supertokens_python.interfaces.DeleteUserIdMappingOkResult" href="../interfaces.html#supertokens_python.interfaces.DeleteUserIdMappingOkResult">DeleteUserIdMappingOkResult</a></span>
</code></dt>
<dd>
<div class="desc"></div>
Expand Down Expand Up @@ -252,7 +252,7 @@ <h2 class="section-title" id="header-functions">Functions</h2>
</details>
</dd>
<dt id="supertokens_python.asyncio.get_user_id_mapping"><code class="name flex">
<span>async def <span class="ident">get_user_id_mapping</span></span>(<span>user_id: str, user_id_type: Optional[typing_extensions.Literal['SUPERTOKENS', 'EXTERNAL', 'ANY']] = None, user_context: Optional[Dict[str, Any]] = None) ‑> Union[<a title="supertokens_python.interfaces.GetUserIdMappingOkResult" href="../interfaces.html#supertokens_python.interfaces.GetUserIdMappingOkResult">GetUserIdMappingOkResult</a><a title="supertokens_python.interfaces.UnknownMappingError" href="../interfaces.html#supertokens_python.interfaces.UnknownMappingError">UnknownMappingError</a>]</span>
<span>async def <span class="ident">get_user_id_mapping</span></span>(<span>user_id: str, user_id_type: Optional[Literal['SUPERTOKENS', 'EXTERNAL', 'ANY']] = None, user_context: Optional[Dict[str, Any]] = None) ‑> Union[<a title="supertokens_python.interfaces.GetUserIdMappingOkResult" href="../interfaces.html#supertokens_python.interfaces.GetUserIdMappingOkResult">GetUserIdMappingOkResult</a><a title="supertokens_python.interfaces.UnknownMappingError" href="../interfaces.html#supertokens_python.interfaces.UnknownMappingError">UnknownMappingError</a>]</span>
</code></dt>
<dd>
<div class="desc"></div>
Expand Down Expand Up @@ -327,7 +327,7 @@ <h2 class="section-title" id="header-functions">Functions</h2>
</details>
</dd>
<dt id="supertokens_python.asyncio.update_or_delete_user_id_mapping_info"><code class="name flex">
<span>async def <span class="ident">update_or_delete_user_id_mapping_info</span></span>(<span>user_id: str, user_id_type: Optional[typing_extensions.Literal['SUPERTOKENS', 'EXTERNAL', 'ANY']] = None, external_user_id_info: Optional[str] = None, user_context: Optional[Dict[str, Any]] = None) ‑> Union[<a title="supertokens_python.interfaces.UpdateOrDeleteUserIdMappingInfoOkResult" href="../interfaces.html#supertokens_python.interfaces.UpdateOrDeleteUserIdMappingInfoOkResult">UpdateOrDeleteUserIdMappingInfoOkResult</a><a title="supertokens_python.interfaces.UnknownMappingError" href="../interfaces.html#supertokens_python.interfaces.UnknownMappingError">UnknownMappingError</a>]</span>
<span>async def <span class="ident">update_or_delete_user_id_mapping_info</span></span>(<span>user_id: str, user_id_type: Optional[Literal['SUPERTOKENS', 'EXTERNAL', 'ANY']] = None, external_user_id_info: Optional[str] = None, user_context: Optional[Dict[str, Any]] = None) ‑> Union[<a title="supertokens_python.interfaces.UpdateOrDeleteUserIdMappingInfoOkResult" href="../interfaces.html#supertokens_python.interfaces.UpdateOrDeleteUserIdMappingInfoOkResult">UpdateOrDeleteUserIdMappingInfoOkResult</a><a title="supertokens_python.interfaces.UnknownMappingError" href="../interfaces.html#supertokens_python.interfaces.UnknownMappingError">UnknownMappingError</a>]</span>
</code></dt>
<dd>
<div class="desc"></div>
Expand Down
2 changes: 1 addition & 1 deletion html/supertokens_python/constants.html
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ <h1 class="title">Module <code>supertokens_python.constants</code></h1>
from __future__ import annotations

SUPPORTED_CDI_VERSIONS = [&#34;3.0&#34;]
VERSION = &#34;0.24.1&#34;
VERSION = &#34;0.24.2&#34;
TELEMETRY = &#34;/telemetry&#34;
USER_COUNT = &#34;/users/count&#34;
USER_DELETE = &#34;/user/remove&#34;
Expand Down
2 changes: 1 addition & 1 deletion html/supertokens_python/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ <h2 class="section-title" id="header-functions">Functions</h2>
</details>
</dd>
<dt id="supertokens_python.init"><code class="name flex">
<span>def <span class="ident">init</span></span>(<span>app_info: <a title="supertokens_python.supertokens.InputAppInfo" href="supertokens.html#supertokens_python.supertokens.InputAppInfo">InputAppInfo</a>, framework: typing_extensions.Literal['fastapi', 'flask', 'django'], supertokens_config: <a title="supertokens_python.supertokens.SupertokensConfig" href="supertokens.html#supertokens_python.supertokens.SupertokensConfig">SupertokensConfig</a>, recipe_list: List[Callable[[<a title="supertokens_python.supertokens.AppInfo" href="supertokens.html#supertokens_python.supertokens.AppInfo">AppInfo</a>], <a title="supertokens_python.recipe_module.RecipeModule" href="recipe_module.html#supertokens_python.recipe_module.RecipeModule">RecipeModule</a>]], mode: Optional[typing_extensions.Literal['asgi', 'wsgi']] = None, telemetry: Optional[bool] = None, debug: Optional[bool] = None)</span>
<span>def <span class="ident">init</span></span>(<span>app_info: <a title="supertokens_python.supertokens.InputAppInfo" href="supertokens.html#supertokens_python.supertokens.InputAppInfo">InputAppInfo</a>, framework: Literal['fastapi', 'flask', 'django'], supertokens_config: <a title="supertokens_python.supertokens.SupertokensConfig" href="supertokens.html#supertokens_python.supertokens.SupertokensConfig">SupertokensConfig</a>, recipe_list: List[Callable[[<a title="supertokens_python.supertokens.AppInfo" href="supertokens.html#supertokens_python.supertokens.AppInfo">AppInfo</a>], <a title="supertokens_python.recipe_module.RecipeModule" href="recipe_module.html#supertokens_python.recipe_module.RecipeModule">RecipeModule</a>]], mode: Optional[Literal['asgi', 'wsgi']] = None, telemetry: Optional[bool] = None, debug: Optional[bool] = None)</span>
</code></dt>
<dd>
<div class="desc"></div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,6 @@ <h3>Ancestors</h3>
</dd>
<dt id="supertokens_python.ingredients.emaildelivery.types.EmailDeliveryInterface"><code class="flex name class">
<span>class <span class="ident">EmailDeliveryInterface</span></span>
<span>(</span><span>*args, **kwds)</span>
</code></dt>
<dd>
<div class="desc"><p>Helper class that provides a standard way to create an ABC using
Expand Down
1 change: 0 additions & 1 deletion html/supertokens_python/ingredients/smsdelivery/types.html
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,6 @@ <h3>Ancestors</h3>
</dd>
<dt id="supertokens_python.ingredients.smsdelivery.types.SMSDeliveryInterface"><code class="flex name class">
<span>class <span class="ident">SMSDeliveryInterface</span></span>
<span>(</span><span>*args, **kwds)</span>
</code></dt>
<dd>
<div class="desc"><p>Helper class that provides a standard way to create an ABC using
Expand Down
46 changes: 32 additions & 14 deletions html/supertokens_python/recipe/emailpassword/api/utils.html
Original file line number Diff line number Diff line change
Expand Up @@ -62,19 +62,28 @@ <h1 class="title">Module <code>supertokens_python.recipe.emailpassword.api.utils
tenant_id: str,
):
validation_errors: List[ErrorFormField] = []
if len(config_form_fields) != len(inputs):
raise_bad_input_exception(&#34;Are you sending too many / too few formFields?&#34;)
if len(config_form_fields) &lt; len(inputs):
raise_bad_input_exception(&#34;Are you sending too many formFields?&#34;)

for field in config_form_fields:
input_field: Union[None, FormField] = find_first_occurrence_in_list(
lambda x: x.id == field.id, inputs
)
if input_field is None or (input_field.value == &#34;&#34; and not field.optional):
is_invalid_value = input_field is None or input_field.value == &#34;&#34;
if not field.optional and is_invalid_value:
validation_errors.append(ErrorFormField(field.id, &#34;Field is not optional&#34;))
else:
error = await field.validate(input_field.value, tenant_id)
if error is not None:
validation_errors.append(ErrorFormField(field.id, error))
continue

# If the field was invalid and not optional, execution won&#39;t reach here.
# so we need to skip it if the value is invalid and optional.
if is_invalid_value:
continue

assert input_field is not None

error = await field.validate(input_field.value, tenant_id)
if error is not None:
validation_errors.append(ErrorFormField(field.id, error))

if len(validation_errors) != 0:
# raise BadInputError(msg=&#34;Error in input formFields&#34;)
Expand Down Expand Up @@ -172,19 +181,28 @@ <h2 class="section-title" id="header-functions">Functions</h2>
tenant_id: str,
):
validation_errors: List[ErrorFormField] = []
if len(config_form_fields) != len(inputs):
raise_bad_input_exception(&#34;Are you sending too many / too few formFields?&#34;)
if len(config_form_fields) &lt; len(inputs):
raise_bad_input_exception(&#34;Are you sending too many formFields?&#34;)

for field in config_form_fields:
input_field: Union[None, FormField] = find_first_occurrence_in_list(
lambda x: x.id == field.id, inputs
)
if input_field is None or (input_field.value == &#34;&#34; and not field.optional):
is_invalid_value = input_field is None or input_field.value == &#34;&#34;
if not field.optional and is_invalid_value:
validation_errors.append(ErrorFormField(field.id, &#34;Field is not optional&#34;))
else:
error = await field.validate(input_field.value, tenant_id)
if error is not None:
validation_errors.append(ErrorFormField(field.id, error))
continue

# If the field was invalid and not optional, execution won&#39;t reach here.
# so we need to skip it if the value is invalid and optional.
if is_invalid_value:
continue

assert input_field is not None

error = await field.validate(input_field.value, tenant_id)
if error is not None:
validation_errors.append(ErrorFormField(field.id, error))

if len(validation_errors) != 0:
# raise BadInputError(msg=&#34;Error in input formFields&#34;)
Expand Down
2 changes: 1 addition & 1 deletion html/supertokens_python/recipe/passwordless/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ <h2 class="section-title" id="header-submodules">Sub-modules</h2>
<h2 class="section-title" id="header-functions">Functions</h2>
<dl>
<dt id="supertokens_python.recipe.passwordless.init"><code class="name flex">
<span>def <span class="ident">init</span></span>(<span>contact_config: ContactConfig, flow_type: "Literal[('USER_INPUT_CODE', 'MAGIC_LINK', 'USER_INPUT_CODE_AND_MAGIC_LINK')]", override: Union[InputOverrideConfig, None] = None, get_custom_user_input_code: Union[Callable[[str, Dict[str, Any]], Awaitable[str]], None] = None, email_delivery: Union[EmailDeliveryConfig[EmailTemplateVars], None] = None, sms_delivery: Union[SMSDeliveryConfig[SMSTemplateVars], None] = None) ‑> Callable[[AppInfo], RecipeModule]</span>
<span>def <span class="ident">init</span></span>(<span>contact_config: ContactConfig, flow_type: "Literal['USER_INPUT_CODE', 'MAGIC_LINK', 'USER_INPUT_CODE_AND_MAGIC_LINK']", override: Union[InputOverrideConfig, None] = None, get_custom_user_input_code: Union[Callable[[str, Dict[str, Any]], Awaitable[str]], None] = None, email_delivery: Union[EmailDeliveryConfig[EmailTemplateVars], None] = None, sms_delivery: Union[SMSDeliveryConfig[SMSTemplateVars], None] = None) ‑> Callable[[AppInfo], RecipeModule]</span>
</code></dt>
<dd>
<div class="desc"></div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1089,7 +1089,7 @@ <h3>Methods</h3>
</dd>
<dt id="supertokens_python.recipe.passwordless.interfaces.CreateCodePostOkResult"><code class="flex name class">
<span>class <span class="ident">CreateCodePostOkResult</span></span>
<span>(</span><span>device_id: str, pre_auth_session_id: str, flow_type: "Literal[('USER_INPUT_CODE', 'MAGIC_LINK', 'USER_INPUT_CODE_AND_MAGIC_LINK')]")</span>
<span>(</span><span>device_id: str, pre_auth_session_id: str, flow_type: "Literal['USER_INPUT_CODE', 'MAGIC_LINK', 'USER_INPUT_CODE_AND_MAGIC_LINK']")</span>
</code></dt>
<dd>
<div class="desc"><p>Helper class that provides a standard way to create an ABC using
Expand Down
4 changes: 2 additions & 2 deletions html/supertokens_python/recipe/passwordless/recipe.html
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,7 @@ <h2 class="section-title" id="header-classes">Classes</h2>
<dl>
<dt id="supertokens_python.recipe.passwordless.recipe.PasswordlessRecipe"><code class="flex name class">
<span>class <span class="ident">PasswordlessRecipe</span></span>
<span>(</span><span>recipe_id: str, app_info: AppInfo, contact_config: ContactConfig, flow_type: "Literal[('USER_INPUT_CODE', 'MAGIC_LINK', 'USER_INPUT_CODE_AND_MAGIC_LINK')]", ingredients: PasswordlessIngredients, override: Union[OverrideConfig, None] = None, get_custom_user_input_code: Union[Callable[[str, Dict[str, Any]], Awaitable[str]], None] = None, email_delivery: Union[EmailDeliveryConfig[PasswordlessLoginEmailTemplateVars], None] = None, sms_delivery: Union[SMSDeliveryConfig[PasswordlessLoginSMSTemplateVars], None] = None)</span>
<span>(</span><span>recipe_id: str, app_info: AppInfo, contact_config: ContactConfig, flow_type: "Literal['USER_INPUT_CODE', 'MAGIC_LINK', 'USER_INPUT_CODE_AND_MAGIC_LINK']", ingredients: PasswordlessIngredients, override: Union[OverrideConfig, None] = None, get_custom_user_input_code: Union[Callable[[str, Dict[str, Any]], Awaitable[str]], None] = None, email_delivery: Union[EmailDeliveryConfig[PasswordlessLoginEmailTemplateVars], None] = None, sms_delivery: Union[SMSDeliveryConfig[PasswordlessLoginSMSTemplateVars], None] = None)</span>
</code></dt>
<dd>
<div class="desc"><p>Helper class that provides a standard way to create an ABC using
Expand Down Expand Up @@ -785,7 +785,7 @@ <h3>Static methods</h3>
</details>
</dd>
<dt id="supertokens_python.recipe.passwordless.recipe.PasswordlessRecipe.init"><code class="name flex">
<span>def <span class="ident">init</span></span>(<span>contact_config: ContactConfig, flow_type: "Literal[('USER_INPUT_CODE', 'MAGIC_LINK', 'USER_INPUT_CODE_AND_MAGIC_LINK')]", override: Union[OverrideConfig, None] = None, get_custom_user_input_code: Union[Callable[[str, Dict[str, Any]], Awaitable[str]], None] = None, email_delivery: Union[EmailDeliveryConfig[PasswordlessLoginEmailTemplateVars], None] = None, sms_delivery: Union[SMSDeliveryConfig[PasswordlessLoginSMSTemplateVars], None] = None)</span>
<span>def <span class="ident">init</span></span>(<span>contact_config: ContactConfig, flow_type: "Literal['USER_INPUT_CODE', 'MAGIC_LINK', 'USER_INPUT_CODE_AND_MAGIC_LINK']", override: Union[OverrideConfig, None] = None, get_custom_user_input_code: Union[Callable[[str, Dict[str, Any]], Awaitable[str]], None] = None, email_delivery: Union[EmailDeliveryConfig[PasswordlessLoginEmailTemplateVars], None] = None, sms_delivery: Union[SMSDeliveryConfig[PasswordlessLoginSMSTemplateVars], None] = None)</span>
</code></dt>
<dd>
<div class="desc"></div>
Expand Down
6 changes: 3 additions & 3 deletions html/supertokens_python/recipe/passwordless/utils.html
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ <h2 class="section-title" id="header-functions">Functions</h2>
</details>
</dd>
<dt id="supertokens_python.recipe.passwordless.utils.validate_and_normalise_user_input"><code class="name flex">
<span>def <span class="ident">validate_and_normalise_user_input</span></span>(<span>app_info: AppInfo, contact_config: <a title="supertokens_python.recipe.passwordless.utils.ContactConfig" href="#supertokens_python.recipe.passwordless.utils.ContactConfig">ContactConfig</a>, flow_type: "Literal[('USER_INPUT_CODE', 'MAGIC_LINK', 'USER_INPUT_CODE_AND_MAGIC_LINK')]", override: Union[<a title="supertokens_python.recipe.passwordless.utils.OverrideConfig" href="#supertokens_python.recipe.passwordless.utils.OverrideConfig">OverrideConfig</a>, None] = None, get_custom_user_input_code: Union[Callable[[str, Dict[str, Any]], Awaitable[str]], None] = None, email_delivery: Union[EmailDeliveryConfig[PasswordlessLoginEmailTemplateVars], None] = None, sms_delivery: Union[SMSDeliveryConfig[PasswordlessLoginSMSTemplateVars], None] = None) ‑> <a title="supertokens_python.recipe.passwordless.utils.PasswordlessConfig" href="#supertokens_python.recipe.passwordless.utils.PasswordlessConfig">PasswordlessConfig</a></span>
<span>def <span class="ident">validate_and_normalise_user_input</span></span>(<span>app_info: AppInfo, contact_config: <a title="supertokens_python.recipe.passwordless.utils.ContactConfig" href="#supertokens_python.recipe.passwordless.utils.ContactConfig">ContactConfig</a>, flow_type: "Literal['USER_INPUT_CODE', 'MAGIC_LINK', 'USER_INPUT_CODE_AND_MAGIC_LINK']", override: Union[<a title="supertokens_python.recipe.passwordless.utils.OverrideConfig" href="#supertokens_python.recipe.passwordless.utils.OverrideConfig">OverrideConfig</a>, None] = None, get_custom_user_input_code: Union[Callable[[str, Dict[str, Any]], Awaitable[str]], None] = None, email_delivery: Union[EmailDeliveryConfig[PasswordlessLoginEmailTemplateVars], None] = None, sms_delivery: Union[SMSDeliveryConfig[PasswordlessLoginSMSTemplateVars], None] = None) ‑> <a title="supertokens_python.recipe.passwordless.utils.PasswordlessConfig" href="#supertokens_python.recipe.passwordless.utils.PasswordlessConfig">PasswordlessConfig</a></span>
</code></dt>
<dd>
<div class="desc"></div>
Expand Down Expand Up @@ -402,7 +402,7 @@ <h2 class="section-title" id="header-classes">Classes</h2>
<dl>
<dt id="supertokens_python.recipe.passwordless.utils.ContactConfig"><code class="flex name class">
<span>class <span class="ident">ContactConfig</span></span>
<span>(</span><span>contact_method: "Literal[('PHONE', 'EMAIL', 'EMAIL_OR_PHONE')]")</span>
<span>(</span><span>contact_method: "Literal['PHONE', 'EMAIL', 'EMAIL_OR_PHONE']")</span>
</code></dt>
<dd>
<div class="desc"><p>Helper class that provides a standard way to create an ABC using
Expand Down Expand Up @@ -549,7 +549,7 @@ <h3>Ancestors</h3>
</dd>
<dt id="supertokens_python.recipe.passwordless.utils.PasswordlessConfig"><code class="flex name class">
<span>class <span class="ident">PasswordlessConfig</span></span>
<span>(</span><span>contact_config: <a title="supertokens_python.recipe.passwordless.utils.ContactConfig" href="#supertokens_python.recipe.passwordless.utils.ContactConfig">ContactConfig</a>, override: <a title="supertokens_python.recipe.passwordless.utils.OverrideConfig" href="#supertokens_python.recipe.passwordless.utils.OverrideConfig">OverrideConfig</a>, flow_type: "Literal[('USER_INPUT_CODE', 'MAGIC_LINK', 'USER_INPUT_CODE_AND_MAGIC_LINK')]", get_email_delivery_config: Callable[[], EmailDeliveryConfigWithService[PasswordlessLoginEmailTemplateVars]], get_sms_delivery_config: Callable[[], SMSDeliveryConfigWithService[PasswordlessLoginSMSTemplateVars]], get_custom_user_input_code: Union[Callable[[str, Dict[str, Any]], Awaitable[str]], None] = None)</span>
<span>(</span><span>contact_config: <a title="supertokens_python.recipe.passwordless.utils.ContactConfig" href="#supertokens_python.recipe.passwordless.utils.ContactConfig">ContactConfig</a>, override: <a title="supertokens_python.recipe.passwordless.utils.OverrideConfig" href="#supertokens_python.recipe.passwordless.utils.OverrideConfig">OverrideConfig</a>, flow_type: "Literal['USER_INPUT_CODE', 'MAGIC_LINK', 'USER_INPUT_CODE_AND_MAGIC_LINK']", get_email_delivery_config: Callable[[], EmailDeliveryConfigWithService[PasswordlessLoginEmailTemplateVars]], get_sms_delivery_config: Callable[[], SMSDeliveryConfigWithService[PasswordlessLoginSMSTemplateVars]], get_custom_user_input_code: Union[Callable[[str, Dict[str, Any]], Awaitable[str]], None] = None)</span>
</code></dt>
<dd>
<div class="desc"></div>
Expand Down
Loading

0 comments on commit 742d4cb

Please sign in to comment.