UNPKG

@leancodepl/kratos

Version:

Headless React components library for building Ory Kratos authentication flows

103 lines 2.96 kB
import { UiNodeMeta } from './UiNodeMeta'; import { UiNodeAttributes } from './UiNodeAttributes'; import { UiText } from './UiText'; /** * Nodes are represented as HTML elements or their native UI equivalents. For example, * a node can be an `<img>` tag, or an `<input element>` but also `some plain text`. * @export * @interface UiNode */ export interface UiNode { /** * * @type {UiNodeAttributes} * @memberof UiNode */ attributes: UiNodeAttributes; /** * Group specifies which group (e.g. password authenticator) this node belongs to. * default DefaultGroup * password PasswordGroup * oidc OpenIDConnectGroup * profile ProfileGroup * link LinkGroup * code CodeGroup * totp TOTPGroup * lookup_secret LookupGroup * webauthn WebAuthnGroup * passkey PasskeyGroup * identifier_first IdentifierFirstGroup * captcha CaptchaGroup * saml SAMLGroup * @type {string} * @memberof UiNode */ group: UiNodeGroupEnum; /** * * @type {Array<UiText>} * @memberof UiNode */ messages: Array<UiText>; /** * * @type {UiNodeMeta} * @memberof UiNode */ meta: UiNodeMeta; /** * The node's type * text Text * input Input * img Image * a Anchor * script Script * div Division * @type {string} * @memberof UiNode */ type: UiNodeTypeEnum; } /** * @export */ export declare const UiNodeGroupEnum: { readonly Default: "default"; readonly Password: "password"; readonly Oidc: "oidc"; readonly Profile: "profile"; readonly Link: "link"; readonly Code: "code"; readonly Totp: "totp"; readonly LookupSecret: "lookup_secret"; readonly Webauthn: "webauthn"; readonly Passkey: "passkey"; readonly IdentifierFirst: "identifier_first"; readonly Captcha: "captcha"; readonly Saml: "saml"; readonly Oauth2Consent: "oauth2_consent"; readonly UnknownDefaultOpenApi: "11184809"; }; export type UiNodeGroupEnum = typeof UiNodeGroupEnum[keyof typeof UiNodeGroupEnum]; /** * @export */ export declare const UiNodeTypeEnum: { readonly Text: "text"; readonly Input: "input"; readonly Img: "img"; readonly A: "a"; readonly Script: "script"; readonly Div: "div"; readonly UnknownDefaultOpenApi: "11184809"; }; export type UiNodeTypeEnum = typeof UiNodeTypeEnum[keyof typeof UiNodeTypeEnum]; /** * Check if a given object implements the UiNode interface. */ export declare function instanceOfUiNode(value: object): value is UiNode; export declare function UiNodeFromJSON(json: any): UiNode; export declare function UiNodeFromJSONTyped(json: any, ignoreDiscriminator: boolean): UiNode; export declare function UiNodeToJSON(json: any): UiNode; export declare function UiNodeToJSONTyped(value?: UiNode | null, ignoreDiscriminator?: boolean): any; //# sourceMappingURL=UiNode.d.ts.map