/* tslint:disable */ /* eslint-disable */ /** * authentik * Making authentication simple. * * The version of the OpenAPI document: 2025.6.3 * Contact: hello@goauthentik.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ import { mapValues } from '../runtime'; import type { UserFieldsEnum } from './UserFieldsEnum'; import { UserFieldsEnumFromJSON, UserFieldsEnumFromJSONTyped, UserFieldsEnumToJSON, UserFieldsEnumToJSONTyped, } from './UserFieldsEnum'; import type { FlowSetRequest } from './FlowSetRequest'; import { FlowSetRequestFromJSON, FlowSetRequestFromJSONTyped, FlowSetRequestToJSON, FlowSetRequestToJSONTyped, } from './FlowSetRequest'; /** * IdentificationStage Serializer * @export * @interface IdentificationStageRequest */ export interface IdentificationStageRequest { /** * * @type {string} * @memberof IdentificationStageRequest */ name: string; /** * * @type {Array} * @memberof IdentificationStageRequest */ flowSet?: Array; /** * Fields of the user object to match against. (Hold shift to select multiple options) * @type {Array} * @memberof IdentificationStageRequest */ userFields?: Array; /** * When set, shows a password field, instead of showing the password field as separate step. * @type {string} * @memberof IdentificationStageRequest */ passwordStage?: string | null; /** * When set, adds functionality exactly like a Captcha stage, but baked into the Identification stage. * @type {string} * @memberof IdentificationStageRequest */ captchaStage?: string | null; /** * When enabled, user fields are matched regardless of their casing. * @type {boolean} * @memberof IdentificationStageRequest */ caseInsensitiveMatching?: boolean; /** * When a valid username/email has been entered, and this option is enabled, the user's username and avatar will be shown. Otherwise, the text that the user entered will be shown * @type {boolean} * @memberof IdentificationStageRequest */ showMatchedUser?: boolean; /** * Optional enrollment flow, which is linked at the bottom of the page. * @type {string} * @memberof IdentificationStageRequest */ enrollmentFlow?: string | null; /** * Optional recovery flow, which is linked at the bottom of the page. * @type {string} * @memberof IdentificationStageRequest */ recoveryFlow?: string | null; /** * Optional passwordless flow, which is linked at the bottom of the page. * @type {string} * @memberof IdentificationStageRequest */ passwordlessFlow?: string | null; /** * Specify which sources should be shown. * @type {Array} * @memberof IdentificationStageRequest */ sources?: Array; /** * * @type {boolean} * @memberof IdentificationStageRequest */ showSourceLabels?: boolean; /** * When enabled, the stage will succeed and continue even when incorrect user info is entered. * @type {boolean} * @memberof IdentificationStageRequest */ pretendUserExists?: boolean; /** * Show the user the 'Remember me on this device' toggle, allowing repeat users to skip straight to entering their password. * @type {boolean} * @memberof IdentificationStageRequest */ enableRememberMe?: boolean; } /** * Check if a given object implements the IdentificationStageRequest interface. */ export function instanceOfIdentificationStageRequest(value: object): value is IdentificationStageRequest { if (!('name' in value) || value['name'] === undefined) return false; return true; } export function IdentificationStageRequestFromJSON(json: any): IdentificationStageRequest { return IdentificationStageRequestFromJSONTyped(json, false); } export function IdentificationStageRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): IdentificationStageRequest { if (json == null) { return json; } return { 'name': json['name'], 'flowSet': json['flow_set'] == null ? undefined : ((json['flow_set'] as Array).map(FlowSetRequestFromJSON)), 'userFields': json['user_fields'] == null ? undefined : ((json['user_fields'] as Array).map(UserFieldsEnumFromJSON)), 'passwordStage': json['password_stage'] == null ? undefined : json['password_stage'], 'captchaStage': json['captcha_stage'] == null ? undefined : json['captcha_stage'], 'caseInsensitiveMatching': json['case_insensitive_matching'] == null ? undefined : json['case_insensitive_matching'], 'showMatchedUser': json['show_matched_user'] == null ? undefined : json['show_matched_user'], 'enrollmentFlow': json['enrollment_flow'] == null ? undefined : json['enrollment_flow'], 'recoveryFlow': json['recovery_flow'] == null ? undefined : json['recovery_flow'], 'passwordlessFlow': json['passwordless_flow'] == null ? undefined : json['passwordless_flow'], 'sources': json['sources'] == null ? undefined : json['sources'], 'showSourceLabels': json['show_source_labels'] == null ? undefined : json['show_source_labels'], 'pretendUserExists': json['pretend_user_exists'] == null ? undefined : json['pretend_user_exists'], 'enableRememberMe': json['enable_remember_me'] == null ? undefined : json['enable_remember_me'], }; } export function IdentificationStageRequestToJSON(json: any): IdentificationStageRequest { return IdentificationStageRequestToJSONTyped(json, false); } export function IdentificationStageRequestToJSONTyped(value?: IdentificationStageRequest | null, ignoreDiscriminator: boolean = false): any { if (value == null) { return value; } return { 'name': value['name'], 'flow_set': value['flowSet'] == null ? undefined : ((value['flowSet'] as Array).map(FlowSetRequestToJSON)), 'user_fields': value['userFields'] == null ? undefined : ((value['userFields'] as Array).map(UserFieldsEnumToJSON)), 'password_stage': value['passwordStage'], 'captcha_stage': value['captchaStage'], 'case_insensitive_matching': value['caseInsensitiveMatching'], 'show_matched_user': value['showMatchedUser'], 'enrollment_flow': value['enrollmentFlow'], 'recovery_flow': value['recoveryFlow'], 'passwordless_flow': value['passwordlessFlow'], 'sources': value['sources'], 'show_source_labels': value['showSourceLabels'], 'pretend_user_exists': value['pretendUserExists'], 'enable_remember_me': value['enableRememberMe'], }; }