clerk_rs/models/
update_instance_auth_config_request.rs

1/*
2 * Clerk Backend API
3 *
4 * The Clerk REST Backend API, meant to be accessed by backend servers. Please see https://clerk.com/docs for more information.
5 *
6 * The version of the OpenAPI document: v1
7 * Contact: support@clerk.com
8 * Generated by: https://openapi-generator.tech
9 */
10
11#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
12pub struct UpdateInstanceAuthConfigRequest {
13	/// Whether sign up is restricted to email addresses, phone numbers and usernames that are on the allowlist.
14	#[serde(
15		rename = "restricted_to_allowlist",
16		default,
17		with = "::serde_with::rust::double_option",
18		skip_serializing_if = "Option::is_none"
19	)]
20	pub restricted_to_allowlist: Option<Option<bool>>,
21	/// The local part of the email address from which authentication-related emails (e.g. OTP code, magic links) will be sent. Only alphanumeric values are allowed. Note that this value should contain only the local part of the address (e.g. `foo` for `foo@example.com`).
22	#[serde(
23		rename = "from_email_address",
24		default,
25		with = "::serde_with::rust::double_option",
26		skip_serializing_if = "Option::is_none"
27	)]
28	pub from_email_address: Option<Option<String>>,
29	/// Enable the Progressive Sign Up algorithm. Refer to the [docs](https://clerk.com/docs/upgrade-guides/progressive-sign-up) for more info.
30	#[serde(
31		rename = "progressive_sign_up",
32		default,
33		with = "::serde_with::rust::double_option",
34		skip_serializing_if = "Option::is_none"
35	)]
36	pub progressive_sign_up: Option<Option<bool>>,
37	/// The name of the JWT Template used to augment your session tokens. To disable this, pass an empty string.
38	#[serde(
39		rename = "session_token_template",
40		default,
41		with = "::serde_with::rust::double_option",
42		skip_serializing_if = "Option::is_none"
43	)]
44	pub session_token_template: Option<Option<String>>,
45	/// The \"enhanced_email_deliverability\" feature will send emails from \"verifications@clerk.dev\" instead of your domain. This can be helpful if you do not have a high domain reputation.
46	#[serde(
47		rename = "enhanced_email_deliverability",
48		default,
49		with = "::serde_with::rust::double_option",
50		skip_serializing_if = "Option::is_none"
51	)]
52	pub enhanced_email_deliverability: Option<Option<bool>>,
53	/// Toggles test mode for this instance, allowing the use of test email addresses and phone numbers. Defaults to true for development instances.
54	#[serde(
55		rename = "test_mode",
56		default,
57		with = "::serde_with::rust::double_option",
58		skip_serializing_if = "Option::is_none"
59	)]
60	pub test_mode: Option<Option<bool>>,
61}
62
63impl UpdateInstanceAuthConfigRequest {
64	pub fn new() -> UpdateInstanceAuthConfigRequest {
65		UpdateInstanceAuthConfigRequest {
66			restricted_to_allowlist: None,
67			from_email_address: None,
68			progressive_sign_up: None,
69			session_token_template: None,
70			enhanced_email_deliverability: None,
71			test_mode: None,
72		}
73	}
74}