UNPKG

@leancodepl/kratos

Version:

Headless React components library for building Ory Kratos authentication flows

219 lines 8.45 kB
import { UiText } from './UiText'; /** * InputAttributes represents the attributes of an input node * @export * @interface UiNodeInputAttributes */ export interface UiNodeInputAttributes { /** * The autocomplete attribute for the input. * email InputAttributeAutocompleteEmail * tel InputAttributeAutocompleteTel * url InputAttributeAutocompleteUrl * current-password InputAttributeAutocompleteCurrentPassword * new-password InputAttributeAutocompleteNewPassword * one-time-code InputAttributeAutocompleteOneTimeCode * @type {string} * @memberof UiNodeInputAttributes */ autocomplete?: UiNodeInputAttributesAutocompleteEnum; /** * Sets the input's disabled field to true or false. * @type {boolean} * @memberof UiNodeInputAttributes */ disabled: boolean; /** * * @type {UiText} * @memberof UiNodeInputAttributes */ label?: UiText; /** * MaxLength may contain the input's maximum length. * @type {number} * @memberof UiNodeInputAttributes */ maxlength?: number; /** * The input's element name. * @type {string} * @memberof UiNodeInputAttributes */ name: string; /** * NodeType represents this node's types. It is a mirror of `node.type` and * is primarily used to allow compatibility with OpenAPI 3.0. In this struct it technically always is "input". * text Text * input Input * img Image * a Anchor * script Script * div Division * @type {string} * @memberof UiNodeInputAttributes */ node_type: UiNodeInputAttributesNodeTypeEnum; /** * OnClick may contain javascript which should be executed on click. This is primarily * used for WebAuthn. * * Deprecated: Using OnClick requires the use of eval() which is a security risk. Use OnClickTrigger instead. * @type {string} * @memberof UiNodeInputAttributes */ onclick?: string; /** * OnClickTrigger may contain a WebAuthn trigger which should be executed on click. * * The trigger maps to a JavaScript function provided by Ory, which triggers actions such as PassKey registration or login. * oryWebAuthnRegistration WebAuthnTriggersWebAuthnRegistration * oryWebAuthnLogin WebAuthnTriggersWebAuthnLogin * oryPasskeyLogin WebAuthnTriggersPasskeyLogin * oryPasskeyLoginAutocompleteInit WebAuthnTriggersPasskeyLoginAutocompleteInit * oryPasskeyRegistration WebAuthnTriggersPasskeyRegistration * oryPasskeySettingsRegistration WebAuthnTriggersPasskeySettingsRegistration * @type {string} * @memberof UiNodeInputAttributes */ onclickTrigger?: UiNodeInputAttributesOnclickTriggerEnum; /** * OnLoad may contain javascript which should be executed on load. This is primarily * used for WebAuthn. * * Deprecated: Using OnLoad requires the use of eval() which is a security risk. Use OnLoadTrigger instead. * @type {string} * @memberof UiNodeInputAttributes */ onload?: string; /** * OnLoadTrigger may contain a WebAuthn trigger which should be executed on load. * * The trigger maps to a JavaScript function provided by Ory, which triggers actions such as PassKey registration or login. * oryWebAuthnRegistration WebAuthnTriggersWebAuthnRegistration * oryWebAuthnLogin WebAuthnTriggersWebAuthnLogin * oryPasskeyLogin WebAuthnTriggersPasskeyLogin * oryPasskeyLoginAutocompleteInit WebAuthnTriggersPasskeyLoginAutocompleteInit * oryPasskeyRegistration WebAuthnTriggersPasskeyRegistration * oryPasskeySettingsRegistration WebAuthnTriggersPasskeySettingsRegistration * @type {string} * @memberof UiNodeInputAttributes */ onloadTrigger?: UiNodeInputAttributesOnloadTriggerEnum; /** * The input's pattern. * @type {string} * @memberof UiNodeInputAttributes */ pattern?: string; /** * Mark this input field as required. * @type {boolean} * @memberof UiNodeInputAttributes */ required?: boolean; /** * The input's element type. * text InputAttributeTypeText * password InputAttributeTypePassword * number InputAttributeTypeNumber * checkbox InputAttributeTypeCheckbox * hidden InputAttributeTypeHidden * email InputAttributeTypeEmail * tel InputAttributeTypeTel * submit InputAttributeTypeSubmit * button InputAttributeTypeButton * datetime-local InputAttributeTypeDateTimeLocal * date InputAttributeTypeDate * url InputAttributeTypeURI * @type {string} * @memberof UiNodeInputAttributes */ type: UiNodeInputAttributesTypeEnum; /** * The input's value. * @type {any} * @memberof UiNodeInputAttributes */ value?: any | null; } /** * @export */ export declare const UiNodeInputAttributesAutocompleteEnum: { readonly Email: "email"; readonly Tel: "tel"; readonly Url: "url"; readonly CurrentPassword: "current-password"; readonly NewPassword: "new-password"; readonly OneTimeCode: "one-time-code"; readonly UnknownDefaultOpenApi: "11184809"; }; export type UiNodeInputAttributesAutocompleteEnum = typeof UiNodeInputAttributesAutocompleteEnum[keyof typeof UiNodeInputAttributesAutocompleteEnum]; /** * @export */ export declare const UiNodeInputAttributesNodeTypeEnum: { readonly Text: "text"; readonly Input: "input"; readonly Img: "img"; readonly A: "a"; readonly Script: "script"; readonly Div: "div"; readonly UnknownDefaultOpenApi: "11184809"; }; export type UiNodeInputAttributesNodeTypeEnum = typeof UiNodeInputAttributesNodeTypeEnum[keyof typeof UiNodeInputAttributesNodeTypeEnum]; /** * @export */ export declare const UiNodeInputAttributesOnclickTriggerEnum: { readonly OryWebAuthnRegistration: "oryWebAuthnRegistration"; readonly OryWebAuthnLogin: "oryWebAuthnLogin"; readonly OryPasskeyLogin: "oryPasskeyLogin"; readonly OryPasskeyLoginAutocompleteInit: "oryPasskeyLoginAutocompleteInit"; readonly OryPasskeyRegistration: "oryPasskeyRegistration"; readonly OryPasskeySettingsRegistration: "oryPasskeySettingsRegistration"; readonly UnknownDefaultOpenApi: "11184809"; }; export type UiNodeInputAttributesOnclickTriggerEnum = typeof UiNodeInputAttributesOnclickTriggerEnum[keyof typeof UiNodeInputAttributesOnclickTriggerEnum]; /** * @export */ export declare const UiNodeInputAttributesOnloadTriggerEnum: { readonly OryWebAuthnRegistration: "oryWebAuthnRegistration"; readonly OryWebAuthnLogin: "oryWebAuthnLogin"; readonly OryPasskeyLogin: "oryPasskeyLogin"; readonly OryPasskeyLoginAutocompleteInit: "oryPasskeyLoginAutocompleteInit"; readonly OryPasskeyRegistration: "oryPasskeyRegistration"; readonly OryPasskeySettingsRegistration: "oryPasskeySettingsRegistration"; readonly UnknownDefaultOpenApi: "11184809"; }; export type UiNodeInputAttributesOnloadTriggerEnum = typeof UiNodeInputAttributesOnloadTriggerEnum[keyof typeof UiNodeInputAttributesOnloadTriggerEnum]; /** * @export */ export declare const UiNodeInputAttributesTypeEnum: { readonly Text: "text"; readonly Password: "password"; readonly Number: "number"; readonly Checkbox: "checkbox"; readonly Hidden: "hidden"; readonly Email: "email"; readonly Tel: "tel"; readonly Submit: "submit"; readonly Button: "button"; readonly DatetimeLocal: "datetime-local"; readonly Date: "date"; readonly Url: "url"; readonly UnknownDefaultOpenApi: "11184809"; }; export type UiNodeInputAttributesTypeEnum = typeof UiNodeInputAttributesTypeEnum[keyof typeof UiNodeInputAttributesTypeEnum]; /** * Check if a given object implements the UiNodeInputAttributes interface. */ export declare function instanceOfUiNodeInputAttributes(value: object): value is UiNodeInputAttributes; export declare function UiNodeInputAttributesFromJSON(json: any): UiNodeInputAttributes; export declare function UiNodeInputAttributesFromJSONTyped(json: any, ignoreDiscriminator: boolean): UiNodeInputAttributes; export declare function UiNodeInputAttributesToJSON(json: any): UiNodeInputAttributes; export declare function UiNodeInputAttributesToJSONTyped(value?: UiNodeInputAttributes | null, ignoreDiscriminator?: boolean): any; //# sourceMappingURL=UiNodeInputAttributes.d.ts.map