/* 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 { DeniedActionEnum } from './DeniedActionEnum'; import { DeniedActionEnumFromJSON, DeniedActionEnumFromJSONTyped, DeniedActionEnumToJSON, DeniedActionEnumToJSONTyped, } from './DeniedActionEnum'; import type { FlowLayoutEnum } from './FlowLayoutEnum'; import { FlowLayoutEnumFromJSON, FlowLayoutEnumFromJSONTyped, FlowLayoutEnumToJSON, FlowLayoutEnumToJSONTyped, } from './FlowLayoutEnum'; import type { PolicyEngineMode } from './PolicyEngineMode'; import { PolicyEngineModeFromJSON, PolicyEngineModeFromJSONTyped, PolicyEngineModeToJSON, PolicyEngineModeToJSONTyped, } from './PolicyEngineMode'; import type { FlowDesignationEnum } from './FlowDesignationEnum'; import { FlowDesignationEnumFromJSON, FlowDesignationEnumFromJSONTyped, FlowDesignationEnumToJSON, FlowDesignationEnumToJSONTyped, } from './FlowDesignationEnum'; import type { AuthenticationEnum } from './AuthenticationEnum'; import { AuthenticationEnumFromJSON, AuthenticationEnumFromJSONTyped, AuthenticationEnumToJSON, AuthenticationEnumToJSONTyped, } from './AuthenticationEnum'; /** * Flow Serializer * @export * @interface Flow */ export interface Flow { /** * * @type {string} * @memberof Flow */ readonly pk: string; /** * * @type {string} * @memberof Flow */ readonly policybindingmodelPtrId: string; /** * * @type {string} * @memberof Flow */ name: string; /** * Visible in the URL. * @type {string} * @memberof Flow */ slug: string; /** * Shown as the Title in Flow pages. * @type {string} * @memberof Flow */ title: string; /** * Decides what this Flow is used for. For example, the Authentication flow is redirect to when an un-authenticated user visits authentik. * @type {FlowDesignationEnum} * @memberof Flow */ designation: FlowDesignationEnum; /** * Get the URL to the background image. If the name is /static or starts with http * it is returned as-is * @type {string} * @memberof Flow */ readonly background: string; /** * * @type {Array} * @memberof Flow */ readonly stages: Array; /** * * @type {Array} * @memberof Flow */ readonly policies: Array; /** * Get count of cached flows * @type {number} * @memberof Flow */ readonly cacheCount: number; /** * * @type {PolicyEngineMode} * @memberof Flow */ policyEngineMode?: PolicyEngineMode; /** * Enable compatibility mode, increases compatibility with password managers on mobile devices. * @type {boolean} * @memberof Flow */ compatibilityMode?: boolean; /** * Get export URL for flow * @type {string} * @memberof Flow */ readonly exportUrl: string; /** * * @type {FlowLayoutEnum} * @memberof Flow */ layout?: FlowLayoutEnum; /** * Configure what should happen when a flow denies access to a user. * @type {DeniedActionEnum} * @memberof Flow */ deniedAction?: DeniedActionEnum; /** * Required level of authentication and authorization to access a flow. * @type {AuthenticationEnum} * @memberof Flow */ authentication?: AuthenticationEnum; } /** * Check if a given object implements the Flow interface. */ export function instanceOfFlow(value: object): value is Flow { if (!('pk' in value) || value['pk'] === undefined) return false; if (!('policybindingmodelPtrId' in value) || value['policybindingmodelPtrId'] === undefined) return false; if (!('name' in value) || value['name'] === undefined) return false; if (!('slug' in value) || value['slug'] === undefined) return false; if (!('title' in value) || value['title'] === undefined) return false; if (!('designation' in value) || value['designation'] === undefined) return false; if (!('background' in value) || value['background'] === undefined) return false; if (!('stages' in value) || value['stages'] === undefined) return false; if (!('policies' in value) || value['policies'] === undefined) return false; if (!('cacheCount' in value) || value['cacheCount'] === undefined) return false; if (!('exportUrl' in value) || value['exportUrl'] === undefined) return false; return true; } export function FlowFromJSON(json: any): Flow { return FlowFromJSONTyped(json, false); } export function FlowFromJSONTyped(json: any, ignoreDiscriminator: boolean): Flow { if (json == null) { return json; } return { 'pk': json['pk'], 'policybindingmodelPtrId': json['policybindingmodel_ptr_id'], 'name': json['name'], 'slug': json['slug'], 'title': json['title'], 'designation': FlowDesignationEnumFromJSON(json['designation']), 'background': json['background'], 'stages': json['stages'], 'policies': json['policies'], 'cacheCount': json['cache_count'], 'policyEngineMode': json['policy_engine_mode'] == null ? undefined : PolicyEngineModeFromJSON(json['policy_engine_mode']), 'compatibilityMode': json['compatibility_mode'] == null ? undefined : json['compatibility_mode'], 'exportUrl': json['export_url'], 'layout': json['layout'] == null ? undefined : FlowLayoutEnumFromJSON(json['layout']), 'deniedAction': json['denied_action'] == null ? undefined : DeniedActionEnumFromJSON(json['denied_action']), 'authentication': json['authentication'] == null ? undefined : AuthenticationEnumFromJSON(json['authentication']), }; } export function FlowToJSON(json: any): Flow { return FlowToJSONTyped(json, false); } export function FlowToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { if (value == null) { return value; } return { 'name': value['name'], 'slug': value['slug'], 'title': value['title'], 'designation': FlowDesignationEnumToJSON(value['designation']), 'policy_engine_mode': PolicyEngineModeToJSON(value['policyEngineMode']), 'compatibility_mode': value['compatibilityMode'], 'layout': FlowLayoutEnumToJSON(value['layout']), 'denied_action': DeniedActionEnumToJSON(value['deniedAction']), 'authentication': AuthenticationEnumToJSON(value['authentication']), }; }