@ory/elements-react 1.0.0-next.33 → 1.0.0-next.36

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.
@@ -2,7 +2,7 @@ import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import { OryCardContentProps, OryCardProps, OryNodeOidcButtonProps, OryFormRootProps, OryMessageContentProps, OryFlowComponentOverrides, OryFlowComponents, OryClientConfiguration } from '@ory/elements-react';
3
3
  import * as react from 'react';
4
4
  import { PropsWithChildren, ElementType } from 'react';
5
- import { FlowError, LoginFlow, RecoveryFlow, RegistrationFlow, SettingsFlow, VerificationFlow } from '@ory/client-fetch';
5
+ import { FlowError, GenericError, Session, LoginFlow, RecoveryFlow, RegistrationFlow, SettingsFlow, VerificationFlow } from '@ory/client-fetch';
6
6
 
7
7
  declare function DefaultCardContent({ children }: OryCardContentProps): react.ReactNode;
8
8
 
@@ -33,12 +33,26 @@ declare function DefaultMessage({ message }: OryMessageContentProps): react_jsx_
33
33
 
34
34
  declare function getOryComponents(overrides?: OryFlowComponentOverrides): OryFlowComponents;
35
35
 
36
+ /**
37
+ * A union type of all possible errors that can be returned by the Ory SDK.
38
+ */
39
+ type OryError = FlowError | OAuth2Error | {
40
+ error: GenericError;
41
+ };
42
+ /**
43
+ * An OAuth2 error response.
44
+ */
45
+ type OAuth2Error = {
46
+ error: string;
47
+ error_description: string;
48
+ };
36
49
  type ErrorFlowContextProps = {
37
- error: FlowError;
50
+ error: OryError;
38
51
  components?: OryFlowComponentOverrides;
39
52
  config: OryClientConfiguration;
53
+ session?: Session;
40
54
  };
41
- declare function Error({ error, children, }: PropsWithChildren<ErrorFlowContextProps>): react_jsx_runtime.JSX.Element;
55
+ declare function Error({ error, components: Components, config, session, }: PropsWithChildren<ErrorFlowContextProps>): react_jsx_runtime.JSX.Element;
42
56
 
43
57
  type LoginFlowContextProps = {
44
58
  flow: LoginFlow;
@@ -75,4 +89,4 @@ type VerificationFlowContextProps = {
75
89
  };
76
90
  declare function Verification({ flow, config, children, components: flowOverrideComponents, }: PropsWithChildren<VerificationFlowContextProps>): react_jsx_runtime.JSX.Element;
77
91
 
78
- export { DefaultButtonSocial, DefaultCard, DefaultCardContent, DefaultCardFooter, DefaultCardHeader, DefaultCardLayout, DefaultCardLogo, DefaultCurrentIdentifierButton, DefaultFormContainer, DefaultMessage, DefaultMessageContainer, Error, type ErrorFlowContextProps, Login, type LoginFlowContextProps, Recovery, type RecoveryFlowContextProps, Registration, Settings, type SettingsFlowContextProps, Verification, type VerificationFlowContextProps, getOryComponents };
92
+ export { DefaultButtonSocial, DefaultCard, DefaultCardContent, DefaultCardFooter, DefaultCardHeader, DefaultCardLayout, DefaultCardLogo, DefaultCurrentIdentifierButton, DefaultFormContainer, DefaultMessage, DefaultMessageContainer, Error, type ErrorFlowContextProps, Login, type LoginFlowContextProps, type OAuth2Error, type OryError, Recovery, type RecoveryFlowContextProps, Registration, Settings, type SettingsFlowContextProps, Verification, type VerificationFlowContextProps, getOryComponents };
@@ -2,7 +2,7 @@ import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import { OryCardContentProps, OryCardProps, OryNodeOidcButtonProps, OryFormRootProps, OryMessageContentProps, OryFlowComponentOverrides, OryFlowComponents, OryClientConfiguration } from '@ory/elements-react';
3
3
  import * as react from 'react';
4
4
  import { PropsWithChildren, ElementType } from 'react';
5
- import { FlowError, LoginFlow, RecoveryFlow, RegistrationFlow, SettingsFlow, VerificationFlow } from '@ory/client-fetch';
5
+ import { FlowError, GenericError, Session, LoginFlow, RecoveryFlow, RegistrationFlow, SettingsFlow, VerificationFlow } from '@ory/client-fetch';
6
6
 
7
7
  declare function DefaultCardContent({ children }: OryCardContentProps): react.ReactNode;
8
8
 
@@ -33,12 +33,26 @@ declare function DefaultMessage({ message }: OryMessageContentProps): react_jsx_
33
33
 
34
34
  declare function getOryComponents(overrides?: OryFlowComponentOverrides): OryFlowComponents;
35
35
 
36
+ /**
37
+ * A union type of all possible errors that can be returned by the Ory SDK.
38
+ */
39
+ type OryError = FlowError | OAuth2Error | {
40
+ error: GenericError;
41
+ };
42
+ /**
43
+ * An OAuth2 error response.
44
+ */
45
+ type OAuth2Error = {
46
+ error: string;
47
+ error_description: string;
48
+ };
36
49
  type ErrorFlowContextProps = {
37
- error: FlowError;
50
+ error: OryError;
38
51
  components?: OryFlowComponentOverrides;
39
52
  config: OryClientConfiguration;
53
+ session?: Session;
40
54
  };
41
- declare function Error({ error, children, }: PropsWithChildren<ErrorFlowContextProps>): react_jsx_runtime.JSX.Element;
55
+ declare function Error({ error, components: Components, config, session, }: PropsWithChildren<ErrorFlowContextProps>): react_jsx_runtime.JSX.Element;
42
56
 
43
57
  type LoginFlowContextProps = {
44
58
  flow: LoginFlow;
@@ -75,4 +89,4 @@ type VerificationFlowContextProps = {
75
89
  };
76
90
  declare function Verification({ flow, config, children, components: flowOverrideComponents, }: PropsWithChildren<VerificationFlowContextProps>): react_jsx_runtime.JSX.Element;
77
91
 
78
- export { DefaultButtonSocial, DefaultCard, DefaultCardContent, DefaultCardFooter, DefaultCardHeader, DefaultCardLayout, DefaultCardLogo, DefaultCurrentIdentifierButton, DefaultFormContainer, DefaultMessage, DefaultMessageContainer, Error, type ErrorFlowContextProps, Login, type LoginFlowContextProps, Recovery, type RecoveryFlowContextProps, Registration, Settings, type SettingsFlowContextProps, Verification, type VerificationFlowContextProps, getOryComponents };
92
+ export { DefaultButtonSocial, DefaultCard, DefaultCardContent, DefaultCardFooter, DefaultCardHeader, DefaultCardLayout, DefaultCardLogo, DefaultCurrentIdentifierButton, DefaultFormContainer, DefaultMessage, DefaultMessageContainer, Error, type ErrorFlowContextProps, Login, type LoginFlowContextProps, type OAuth2Error, type OryError, Recovery, type RecoveryFlowContextProps, Registration, Settings, type SettingsFlowContextProps, Verification, type VerificationFlowContextProps, getOryComponents };