@leancodepl/kratos 7.2.4 → 7.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.cjs.js +3783 -1474
- package/index.esm.js +3769 -1474
- package/package.json +4 -4
- package/src/index.d.ts +8 -5
- package/src/lib/cards/index.d.ts +2 -0
- package/src/lib/cards/userAuthCard.d.ts +20 -0
- package/src/lib/cards/userSettingsCard.d.ts +10 -0
- package/src/lib/createKratosClient.d.ts +1 -1
- package/src/lib/defaultComponents/DefaultButtonComponent/index.d.ts +2 -0
- package/src/lib/defaultComponents/DefaultCheckboxComponent/index.d.ts +2 -0
- package/src/lib/defaultComponents/DefaultImageComponent/index.d.ts +2 -0
- package/src/lib/defaultComponents/DefaultInputComponent/index.d.ts +2 -0
- package/src/lib/defaultComponents/DefaultLinkComponent/index.d.ts +2 -0
- package/src/lib/defaultComponents/DefaultMessageComponent/index.d.ts +2 -0
- package/src/lib/defaultComponents/DefaultMessageFormatComponent/index.d.ts +2 -0
- package/src/lib/defaultComponents/DefaultTextComponent/index.d.ts +2 -0
- package/src/lib/defaultComponents/DefaultUiMessagesComponent/index.d.ts +2 -0
- package/src/lib/defaultComponents.d.ts +2 -0
- package/src/lib/flows/index.d.ts +7 -0
- package/src/lib/flows/useLoginFlow.d.ts +13 -0
- package/src/lib/flows/useLogoutFlow.d.ts +8 -0
- package/src/lib/flows/useReauthenticationFlow.d.ts +8 -0
- package/src/lib/flows/useRecoveryFlow.d.ts +13 -0
- package/src/lib/flows/useRegistrationFlow.d.ts +13 -0
- package/src/lib/flows/useSettingsFlow.d.ts +13 -0
- package/src/lib/flows/useVerificationFlow.d.ts +12 -0
- package/src/lib/helpers/errorMessages.d.ts +7 -0
- package/src/lib/helpers/filterFlowNodes.d.ts +7 -0
- package/src/lib/helpers/formattedMessage.d.ts +4 -0
- package/src/lib/helpers/getNodeLabel.d.ts +2 -0
- package/src/lib/helpers/node.d.ts +7 -0
- package/src/lib/helpers/useScriptNodes.d.ts +5 -0
- package/src/lib/helpers/userAuthForm.d.ts +31 -0
- package/src/lib/kratosContext.d.ts +12 -0
- package/src/lib/kratosContextProvider.d.ts +10 -0
- package/src/lib/sections/authCodeSection.d.ts +14 -0
- package/src/lib/sections/linkSection.d.ts +14 -0
- package/src/lib/sections/loginSection.d.ts +8 -0
- package/src/lib/sections/lookupSecretSettingsSection.d.ts +8 -0
- package/src/lib/sections/oidcSection.d.ts +8 -0
- package/src/lib/sections/oidcSettingsSection.d.ts +8 -0
- package/src/lib/sections/passwordSettingsSection.d.ts +8 -0
- package/src/lib/sections/passwordlessSection.d.ts +8 -0
- package/src/lib/sections/profileSettingsSection.d.ts +8 -0
- package/src/lib/sections/registrationSection.d.ts +8 -0
- package/src/lib/sections/totpSettingsSection.d.ts +8 -0
- package/src/lib/sections/webAuthnSettingsSection.d.ts +8 -0
- package/src/lib/sessionManager/baseSessionManager.d.ts +6 -7
- package/src/lib/types/components.d.ts +75 -0
- package/src/lib/types/useHandleFlowError.d.ts +9 -1
- package/src/lib/utils/filterNodesByGroups.d.ts +2 -3
- package/src/lib/utils/handleCancelError.d.ts +2 -0
- package/src/lib/utils/helpers.d.ts +8 -0
- package/src/lib/utils/typeGuards.d.ts +24 -6
- package/src/lib/utils/variables.d.ts +1 -0
- package/src/lib/flowFactory.d.ts +0 -22
- package/src/lib/mkAuth.d.ts +0 -74
- package/src/lib/node/DefaultNodeAnchor/index.d.ts +0 -7
- package/src/lib/node/DefaultNodeImage/index.d.ts +0 -7
- package/src/lib/node/DefaultNodeText/index.d.ts +0 -7
- package/src/lib/node/NodeInput/defaultNodeInputHidden.d.ts +0 -6
- package/src/lib/node/NodeInput/index.d.ts +0 -19
- package/src/lib/node/index.d.ts +0 -43
- package/src/lib/types/uiMessage.d.ts +0 -22
- package/src/lib/useReauthenticationFlow.d.ts +0 -13
- package/src/lib/useRecoveryFlow.d.ts +0 -15
- package/src/lib/useSettingsFlow.d.ts +0 -15
- package/src/lib/useSignInFlow.d.ts +0 -15
- package/src/lib/useSignUpFlow.d.ts +0 -15
- package/src/lib/useVerificationFlow.d.ts +0 -15
- package/src/lib/utils/getMessages.d.ts +0 -18
- package/src/lib/utils/getNodeId.d.ts +0 -2
|
@@ -1,6 +1,24 @@
|
|
|
1
|
-
import { UiNodeAnchorAttributes, UiNodeAttributes, UiNodeImageAttributes, UiNodeInputAttributes, UiNodeScriptAttributes, UiNodeTextAttributes } from "@ory/
|
|
2
|
-
export declare function isUiNodeAnchorAttributes(attrs: UiNodeAttributes): attrs is UiNodeAnchorAttributes
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
export declare function
|
|
6
|
-
|
|
1
|
+
import { UiNodeAnchorAttributes, UiNodeAttributes, UiNodeImageAttributes, UiNodeInputAttributes, UiNodeScriptAttributes, UiNodeTextAttributes, UiText } from "@ory/client";
|
|
2
|
+
export declare function isUiNodeAnchorAttributes(attrs: UiNodeAttributes): attrs is UiNodeAnchorAttributes & {
|
|
3
|
+
node_type: "a";
|
|
4
|
+
};
|
|
5
|
+
export declare function isUiNodeImageAttributes(attrs: UiNodeAttributes): attrs is UiNodeImageAttributes & {
|
|
6
|
+
node_type: "img";
|
|
7
|
+
};
|
|
8
|
+
export declare function isUiNodeInputAttributes(attrs: UiNodeAttributes): attrs is UiNodeInputAttributes & {
|
|
9
|
+
node_type: "input";
|
|
10
|
+
};
|
|
11
|
+
export declare function isUiNodeTextAttributes(attrs: UiNodeAttributes): attrs is UiNodeTextAttributes & {
|
|
12
|
+
node_type: "text";
|
|
13
|
+
};
|
|
14
|
+
export declare function isUiNodeScriptAttributes(attrs: UiNodeAttributes): attrs is UiNodeScriptAttributes & {
|
|
15
|
+
node_type: "script";
|
|
16
|
+
};
|
|
17
|
+
export type UiNodeTextSecretsAttributes = Omit<UiNodeTextAttributes, "text"> & {
|
|
18
|
+
text: Omit<UiText, "context"> & {
|
|
19
|
+
context: {
|
|
20
|
+
secrets: UiText[];
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
export declare function isUiNodeTextSecretsAttributes(attributes: UiNodeTextAttributes): attributes is UiNodeTextSecretsAttributes;
|
package/src/lib/flowFactory.d.ts
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { ComponentType, ReactNode } from "react";
|
|
2
|
-
import { LoginFlow, RecoveryFlow, RegistrationFlow, SettingsFlow, VerificationFlow, UiNodeGroupEnum, UiText } from "@ory/kratos-client";
|
|
3
|
-
import { FieldValues } from "react-hook-form";
|
|
4
|
-
import { NodeFactoryProps } from "./node";
|
|
5
|
-
import { CustomGetMessageProvider, CustomUiMessage } from "./types/uiMessage";
|
|
6
|
-
export type FlowFactoryProps = {
|
|
7
|
-
displayGlobalMessages: (messages: UiText[], customUiMessage?: CustomUiMessage) => void;
|
|
8
|
-
customGetMessageProvider: CustomGetMessageProvider;
|
|
9
|
-
} & NodeFactoryProps;
|
|
10
|
-
type FlowProps<T> = {
|
|
11
|
-
flow: LoginFlow | RegistrationFlow | SettingsFlow | VerificationFlow | RecoveryFlow;
|
|
12
|
-
only?: UiNodeGroupEnum[];
|
|
13
|
-
except?: string[];
|
|
14
|
-
onSubmit: (values: T) => void;
|
|
15
|
-
hideGlobalMessages?: boolean;
|
|
16
|
-
UiMessage?: CustomUiMessage;
|
|
17
|
-
nodesWrapper?: ComponentType<{
|
|
18
|
-
children: ReactNode;
|
|
19
|
-
}>;
|
|
20
|
-
};
|
|
21
|
-
export declare function flowFactory({ displayGlobalMessages, nodeComponents, customGetMessageProvider: CustomGetMessageProvider, }: FlowFactoryProps): <T extends FieldValues>({ flow, only, except, onSubmit, UiMessage, hideGlobalMessages, nodesWrapper: NodesWrapper, }: FlowProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
22
|
-
export {};
|
package/src/lib/mkAuth.d.ts
DELETED
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { UiText } from "@ory/kratos-client";
|
|
3
|
-
import { NodeFactoryProps } from "./node";
|
|
4
|
-
import { CustomGetMessageProvider, CustomUiMessage } from "./types/uiMessage";
|
|
5
|
-
import { UseHandleFlowError } from "./types/useHandleFlowError";
|
|
6
|
-
export type MkAuthProps = {
|
|
7
|
-
useHandleFlowError: UseHandleFlowError;
|
|
8
|
-
displayGlobalMessages: (messages: UiText[], customUiMessage?: CustomUiMessage) => void;
|
|
9
|
-
customGetMessageProvider: CustomGetMessageProvider;
|
|
10
|
-
} & NodeFactoryProps;
|
|
11
|
-
export declare const mkAuth: ({ useHandleFlowError, displayGlobalMessages, nodeComponents, customGetMessageProvider, }: MkAuthProps) => {
|
|
12
|
-
Flow: <T extends import("react-hook-form").FieldValues>({ flow, only, except, onSubmit, UiMessage, hideGlobalMessages, nodesWrapper: NodesWrapper, }: {
|
|
13
|
-
flow: import("@ory/kratos-client").LoginFlow | import("@ory/kratos-client").RegistrationFlow | import("@ory/kratos-client").SettingsFlow | import("@ory/kratos-client").VerificationFlow | import("@ory/kratos-client").RecoveryFlow;
|
|
14
|
-
only?: import("@ory/kratos-client").UiNodeGroupEnum[] | undefined;
|
|
15
|
-
except?: string[] | undefined;
|
|
16
|
-
onSubmit: (values: T) => void;
|
|
17
|
-
hideGlobalMessages?: boolean | undefined;
|
|
18
|
-
UiMessage?: CustomUiMessage | undefined;
|
|
19
|
-
nodesWrapper?: import("react").ComponentType<{
|
|
20
|
-
children: import("react").ReactNode;
|
|
21
|
-
}> | undefined;
|
|
22
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
23
|
-
useReuthenticateFlow: ({ kratosClient, onReauthenticated, }: {
|
|
24
|
-
kratosClient: import("@ory/kratos-client").FrontendApi;
|
|
25
|
-
onReauthenticated: (session: import("@ory/kratos-client").Session) => void;
|
|
26
|
-
}) => {
|
|
27
|
-
flow: import("@ory/kratos-client").LoginFlow | undefined;
|
|
28
|
-
submit: (values: import("@ory/kratos-client").UpdateLoginFlowBody) => Promise<unknown> | undefined;
|
|
29
|
-
};
|
|
30
|
-
useRecoveryFlow: ({ kratosClient, recoveryRoute, onSessionAlreadyAvailable, }: {
|
|
31
|
-
kratosClient: import("@ory/kratos-client").FrontendApi;
|
|
32
|
-
recoveryRoute: string;
|
|
33
|
-
onSessionAlreadyAvailable: () => void;
|
|
34
|
-
}) => {
|
|
35
|
-
flow: import("@ory/kratos-client").RecoveryFlow | undefined;
|
|
36
|
-
submit: (values: import("@ory/kratos-client").UpdateRecoveryFlowBody) => Promise<unknown> | undefined;
|
|
37
|
-
isRecovering: boolean;
|
|
38
|
-
};
|
|
39
|
-
useSettingsFlow: ({ kratosClient, settingsRoute, params, }: {
|
|
40
|
-
kratosClient: import("@ory/kratos-client").FrontendApi;
|
|
41
|
-
settingsRoute: string;
|
|
42
|
-
params?: any;
|
|
43
|
-
}) => {
|
|
44
|
-
flow: import("@ory/kratos-client").SettingsFlow | undefined;
|
|
45
|
-
submit: (values: import("@ory/kratos-client").UpdateSettingsFlowBody) => Promise<unknown> | undefined;
|
|
46
|
-
};
|
|
47
|
-
useSignInFlow: ({ kratosClient, signInRoute, onSignedIn, onSessionAlreadyAvailable, }: {
|
|
48
|
-
kratosClient: import("@ory/kratos-client").FrontendApi;
|
|
49
|
-
signInRoute: string;
|
|
50
|
-
onSignedIn?: ((session: import("@ory/kratos-client").Session) => void) | undefined;
|
|
51
|
-
onSessionAlreadyAvailable?: (() => void) | undefined;
|
|
52
|
-
}) => {
|
|
53
|
-
flow: import("@ory/kratos-client").LoginFlow | undefined;
|
|
54
|
-
submit: (values: import("@ory/kratos-client").UpdateLoginFlowBody) => Promise<unknown> | undefined;
|
|
55
|
-
};
|
|
56
|
-
useSignUpFlow: ({ kratosClient, signUpRoute, onSessionAlreadyAvailable, }: {
|
|
57
|
-
kratosClient: import("@ory/kratos-client").FrontendApi;
|
|
58
|
-
signUpRoute: string;
|
|
59
|
-
onSessionAlreadyAvailable: () => void;
|
|
60
|
-
}) => {
|
|
61
|
-
flow: import("@ory/kratos-client").RegistrationFlow | undefined;
|
|
62
|
-
submit: (values: import("@ory/kratos-client").UpdateRegistrationFlowBody) => Promise<unknown> | undefined;
|
|
63
|
-
isSignedUp: boolean;
|
|
64
|
-
};
|
|
65
|
-
useVerificationFlow: ({ initialFlowId, kratosClient, onVerified, }: {
|
|
66
|
-
initialFlowId?: string | undefined;
|
|
67
|
-
kratosClient: import("@ory/kratos-client").FrontendApi;
|
|
68
|
-
onVerified: () => void;
|
|
69
|
-
}) => {
|
|
70
|
-
flow: import("@ory/kratos-client").VerificationFlow | undefined;
|
|
71
|
-
submit: (values: import("@ory/kratos-client").UpdateVerificationFlowBody) => Promise<unknown> | undefined;
|
|
72
|
-
reset: () => void;
|
|
73
|
-
};
|
|
74
|
-
};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { UiNode, UiNodeAnchorAttributes } from "@ory/kratos-client";
|
|
2
|
-
type DefaultNodeAnchorProps = {
|
|
3
|
-
node: UiNode;
|
|
4
|
-
attributes: UiNodeAnchorAttributes;
|
|
5
|
-
};
|
|
6
|
-
export declare function DefaultNodeAnchor({ attributes, node }: DefaultNodeAnchorProps): import("react/jsx-runtime").JSX.Element;
|
|
7
|
-
export {};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { UiNode, UiNodeImageAttributes } from "@ory/kratos-client";
|
|
2
|
-
type DefaultNodeImageProps = {
|
|
3
|
-
node: UiNode;
|
|
4
|
-
attributes: UiNodeImageAttributes;
|
|
5
|
-
};
|
|
6
|
-
export declare function DefaultNodeImage({ attributes, node }: DefaultNodeImageProps): import("react/jsx-runtime").JSX.Element;
|
|
7
|
-
export {};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { UiNode, UiNodeTextAttributes } from "@ory/kratos-client";
|
|
2
|
-
type DefaultNodeTextProps = {
|
|
3
|
-
node: UiNode;
|
|
4
|
-
attributes: UiNodeTextAttributes;
|
|
5
|
-
};
|
|
6
|
-
export declare function DefaultNodeText({ attributes, node }: DefaultNodeTextProps): import("react/jsx-runtime").JSX.Element;
|
|
7
|
-
export {};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { UiNodeInputAttributes } from "@ory/kratos-client";
|
|
2
|
-
type DefaultNodeInputHiddenProps = {
|
|
3
|
-
attributes: UiNodeInputAttributes;
|
|
4
|
-
};
|
|
5
|
-
export declare function DefaultNodeInputHidden({ attributes }: DefaultNodeInputHiddenProps): import("react/jsx-runtime").JSX.Element;
|
|
6
|
-
export {};
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { ComponentType } from "react";
|
|
2
|
-
import { UiNode, UiNodeInputAttributes } from "@ory/kratos-client";
|
|
3
|
-
type NodeInputFactoryProps = {
|
|
4
|
-
nodeInputs: {
|
|
5
|
-
NodeInputHidden?: ComponentType<NodeInputHiddenProps>;
|
|
6
|
-
NodeInputCheckbox: ComponentType<NodeInputProps>;
|
|
7
|
-
NodeInputSubmit: ComponentType<NodeInputProps>;
|
|
8
|
-
NodeInputPassword: ComponentType<NodeInputProps>;
|
|
9
|
-
NodeInputDefault: ComponentType<NodeInputProps>;
|
|
10
|
-
};
|
|
11
|
-
};
|
|
12
|
-
type NodeInputProps = {
|
|
13
|
-
node: UiNode;
|
|
14
|
-
attributes: UiNodeInputAttributes;
|
|
15
|
-
disabled: boolean;
|
|
16
|
-
};
|
|
17
|
-
type NodeInputHiddenProps = Omit<NodeInputProps, "node" | "disabled">;
|
|
18
|
-
export declare function nodeInputFactory({ nodeInputs: { NodeInputHidden, NodeInputCheckbox, NodeInputSubmit, NodeInputPassword, NodeInputDefault, }, }: NodeInputFactoryProps): ({ attributes, node, disabled }: NodeInputProps) => import("react/jsx-runtime").JSX.Element;
|
|
19
|
-
export {};
|
package/src/lib/node/index.d.ts
DELETED
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { ComponentType } from "react";
|
|
2
|
-
import { UiNode, UiNodeAnchorAttributes, UiNodeImageAttributes, UiNodeInputAttributes, UiNodeScriptAttributes, UiNodeTextAttributes } from "@ory/kratos-client";
|
|
3
|
-
type NodeTextProps = {
|
|
4
|
-
node: UiNode;
|
|
5
|
-
attributes: UiNodeTextAttributes;
|
|
6
|
-
};
|
|
7
|
-
type NodeInputProps = {
|
|
8
|
-
node: UiNode;
|
|
9
|
-
attributes: UiNodeInputAttributes;
|
|
10
|
-
disabled: boolean;
|
|
11
|
-
};
|
|
12
|
-
type NodeInputHiddenProps = Omit<NodeInputProps, "node" | "disabled">;
|
|
13
|
-
type NodeImageProps = {
|
|
14
|
-
node: UiNode;
|
|
15
|
-
attributes: UiNodeImageAttributes;
|
|
16
|
-
};
|
|
17
|
-
type NodeScriptProps = {
|
|
18
|
-
node: UiNode;
|
|
19
|
-
attributes: UiNodeScriptAttributes;
|
|
20
|
-
};
|
|
21
|
-
type NodeAnchorProps = {
|
|
22
|
-
node: UiNode;
|
|
23
|
-
attributes: UiNodeAnchorAttributes;
|
|
24
|
-
};
|
|
25
|
-
type NodeProps = {
|
|
26
|
-
node: UiNode;
|
|
27
|
-
disabled: boolean;
|
|
28
|
-
};
|
|
29
|
-
export type NodeFactoryProps = {
|
|
30
|
-
nodeComponents: {
|
|
31
|
-
NodeInputHidden?: ComponentType<NodeInputHiddenProps>;
|
|
32
|
-
NodeInputCheckbox: ComponentType<NodeInputProps>;
|
|
33
|
-
NodeInputSubmit: ComponentType<NodeInputProps>;
|
|
34
|
-
NodeInputPassword: ComponentType<NodeInputProps>;
|
|
35
|
-
NodeInputDefault: ComponentType<NodeInputProps>;
|
|
36
|
-
NodeText?: ComponentType<NodeTextProps>;
|
|
37
|
-
NodeImage?: ComponentType<NodeImageProps>;
|
|
38
|
-
NodeScript?: ComponentType<NodeScriptProps>;
|
|
39
|
-
NodeAnchor?: ComponentType<NodeAnchorProps>;
|
|
40
|
-
};
|
|
41
|
-
};
|
|
42
|
-
export declare function nodeFactory({ nodeComponents: { NodeImage, NodeText, NodeAnchor, NodeScript, ...nodeInputs }, }: NodeFactoryProps): ({ node, disabled }: NodeProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
43
|
-
export {};
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { ComponentType, ReactNode } from "react";
|
|
2
|
-
import { UiNodeInputAttributes, UiNodeTextAttributes, UiText } from "@ory/kratos-client";
|
|
3
|
-
export type UiMessageProps = {
|
|
4
|
-
text?: UiText;
|
|
5
|
-
attributes?: UiNodeInputAttributes | UiNodeTextAttributes;
|
|
6
|
-
};
|
|
7
|
-
export type UiMessageRenderer = (props: UiMessageProps & {
|
|
8
|
-
customUiMessage?: CustomUiMessage;
|
|
9
|
-
}) => ReactNode;
|
|
10
|
-
type UiMessageContent = (props: UiMessageProps) => ReactNode;
|
|
11
|
-
export type CustomUiMessageParams = {
|
|
12
|
-
text?: UiText;
|
|
13
|
-
attributes?: UiNodeInputAttributes | UiNodeTextAttributes;
|
|
14
|
-
uiMessage: UiMessageContent;
|
|
15
|
-
};
|
|
16
|
-
export type CustomUiMessage = (params: CustomUiMessageParams) => ReactNode;
|
|
17
|
-
type CustomGetMessageProviderProps = {
|
|
18
|
-
uiMessage?: CustomUiMessage;
|
|
19
|
-
children?: ReactNode;
|
|
20
|
-
};
|
|
21
|
-
export type CustomGetMessageProvider = ComponentType<CustomGetMessageProviderProps>;
|
|
22
|
-
export {};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { FrontendApi, LoginFlow, Session, UpdateLoginFlowBody } from "@ory/kratos-client";
|
|
2
|
-
import { UseHandleFlowError } from "./types/useHandleFlowError";
|
|
3
|
-
type UseReauthenticationFlowProps = {
|
|
4
|
-
useHandleFlowError: UseHandleFlowError;
|
|
5
|
-
};
|
|
6
|
-
export declare function reauthenticationFlowHookFactory({ useHandleFlowError }: UseReauthenticationFlowProps): ({ kratosClient, onReauthenticated, }: {
|
|
7
|
-
kratosClient: FrontendApi;
|
|
8
|
-
onReauthenticated: (session: Session) => void;
|
|
9
|
-
}) => {
|
|
10
|
-
flow: LoginFlow | undefined;
|
|
11
|
-
submit: (values: UpdateLoginFlowBody) => Promise<unknown> | undefined;
|
|
12
|
-
};
|
|
13
|
-
export {};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { FrontendApi, RecoveryFlow, UpdateRecoveryFlowBody } from "@ory/kratos-client";
|
|
2
|
-
import { UseHandleFlowError } from "./types/useHandleFlowError";
|
|
3
|
-
type UseRecoveryFlowProps = {
|
|
4
|
-
useHandleFlowError: UseHandleFlowError;
|
|
5
|
-
};
|
|
6
|
-
export declare function recoveryFlowHookFactory({ useHandleFlowError }: UseRecoveryFlowProps): ({ kratosClient, recoveryRoute, onSessionAlreadyAvailable, }: {
|
|
7
|
-
kratosClient: FrontendApi;
|
|
8
|
-
recoveryRoute: string;
|
|
9
|
-
onSessionAlreadyAvailable: () => void;
|
|
10
|
-
}) => {
|
|
11
|
-
flow: RecoveryFlow | undefined;
|
|
12
|
-
submit: (values: UpdateRecoveryFlowBody) => Promise<unknown> | undefined;
|
|
13
|
-
isRecovering: boolean;
|
|
14
|
-
};
|
|
15
|
-
export {};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { FrontendApi, SettingsFlow, UpdateSettingsFlowBody } from "@ory/kratos-client";
|
|
2
|
-
import { AxiosRequestConfig } from "axios";
|
|
3
|
-
import { UseHandleFlowError } from "./types/useHandleFlowError";
|
|
4
|
-
type UseSettingsFlowFactoryProps = {
|
|
5
|
-
useHandleFlowError: UseHandleFlowError;
|
|
6
|
-
};
|
|
7
|
-
export declare function settingsFlowHookFactory({ useHandleFlowError }: UseSettingsFlowFactoryProps): ({ kratosClient, settingsRoute, params, }: {
|
|
8
|
-
kratosClient: FrontendApi;
|
|
9
|
-
settingsRoute: string;
|
|
10
|
-
params?: AxiosRequestConfig["params"];
|
|
11
|
-
}) => {
|
|
12
|
-
flow: SettingsFlow | undefined;
|
|
13
|
-
submit: (values: UpdateSettingsFlowBody) => Promise<unknown> | undefined;
|
|
14
|
-
};
|
|
15
|
-
export {};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { FrontendApi, LoginFlow, Session, UpdateLoginFlowBody } from "@ory/kratos-client";
|
|
2
|
-
import { UseHandleFlowError } from "./types/useHandleFlowError";
|
|
3
|
-
type UseSignInFlowFactoryProps = {
|
|
4
|
-
useHandleFlowError: UseHandleFlowError;
|
|
5
|
-
};
|
|
6
|
-
export declare function signInFlowHookFactory({ useHandleFlowError }: UseSignInFlowFactoryProps): ({ kratosClient, signInRoute, onSignedIn, onSessionAlreadyAvailable, }: {
|
|
7
|
-
kratosClient: FrontendApi;
|
|
8
|
-
signInRoute: string;
|
|
9
|
-
onSignedIn?: ((session: Session) => void) | undefined;
|
|
10
|
-
onSessionAlreadyAvailable?: (() => void) | undefined;
|
|
11
|
-
}) => {
|
|
12
|
-
flow: LoginFlow | undefined;
|
|
13
|
-
submit: (values: UpdateLoginFlowBody) => Promise<unknown> | undefined;
|
|
14
|
-
};
|
|
15
|
-
export {};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { FrontendApi, RegistrationFlow, UpdateRegistrationFlowBody } from "@ory/kratos-client";
|
|
2
|
-
import { UseHandleFlowError } from "./types/useHandleFlowError";
|
|
3
|
-
type UseSignUpFlowFactoryProps = {
|
|
4
|
-
useHandleFlowError: UseHandleFlowError;
|
|
5
|
-
};
|
|
6
|
-
export declare function signUpFlowHookFactory({ useHandleFlowError }: UseSignUpFlowFactoryProps): ({ kratosClient, signUpRoute, onSessionAlreadyAvailable, }: {
|
|
7
|
-
kratosClient: FrontendApi;
|
|
8
|
-
signUpRoute: string;
|
|
9
|
-
onSessionAlreadyAvailable: () => void;
|
|
10
|
-
}) => {
|
|
11
|
-
flow: RegistrationFlow | undefined;
|
|
12
|
-
submit: (values: UpdateRegistrationFlowBody) => Promise<unknown> | undefined;
|
|
13
|
-
isSignedUp: boolean;
|
|
14
|
-
};
|
|
15
|
-
export {};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { FrontendApi, UpdateVerificationFlowBody, VerificationFlow } from "@ory/kratos-client";
|
|
2
|
-
import { UseHandleFlowError } from "./types/useHandleFlowError";
|
|
3
|
-
type UseVerificationFlowFactoryProps = {
|
|
4
|
-
useHandleFlowError: UseHandleFlowError;
|
|
5
|
-
};
|
|
6
|
-
export declare function verificationFlowHookFactory({ useHandleFlowError }: UseVerificationFlowFactoryProps): ({ initialFlowId, kratosClient, onVerified, }: {
|
|
7
|
-
initialFlowId?: string | undefined;
|
|
8
|
-
kratosClient: FrontendApi;
|
|
9
|
-
onVerified: () => void;
|
|
10
|
-
}) => {
|
|
11
|
-
flow: VerificationFlow | undefined;
|
|
12
|
-
submit: (values: UpdateVerificationFlowBody) => Promise<unknown> | undefined;
|
|
13
|
-
reset: () => void;
|
|
14
|
-
};
|
|
15
|
-
export {};
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { ComponentType, ReactNode } from "react";
|
|
2
|
-
import { UiNodeInputAttributes, UiText } from "@ory/kratos-client";
|
|
3
|
-
import { CustomUiMessage, UiMessageProps } from "../types/uiMessage";
|
|
4
|
-
type UiMessageRendererProps = UiMessageProps & {
|
|
5
|
-
customUiMessage?: CustomUiMessage;
|
|
6
|
-
};
|
|
7
|
-
export declare function getMessagesFactory({ textWrapper: TextWrapper, uiMessageRenderer, }: {
|
|
8
|
-
textWrapper?: ComponentType<{
|
|
9
|
-
children: ReactNode;
|
|
10
|
-
}>;
|
|
11
|
-
uiMessageRenderer: (props: UiMessageRendererProps) => ReactNode;
|
|
12
|
-
}): ({ messages, attributes, customUiMessage, maxMessagesPerGroup, }: {
|
|
13
|
-
messages: UiText[];
|
|
14
|
-
attributes?: UiNodeInputAttributes | undefined;
|
|
15
|
-
customUiMessage?: CustomUiMessage | undefined;
|
|
16
|
-
maxMessagesPerGroup?: number | undefined;
|
|
17
|
-
}) => Partial<Record<"error" | "info" | "success", ReactNode>>;
|
|
18
|
-
export {};
|