@stytch/react 19.4.2 → 19.4.4

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/CHANGELOG.md CHANGED
@@ -1,5 +1,18 @@
1
1
  # @stytch/react
2
2
 
3
+ ## 19.4.4
4
+
5
+ ### Patch Changes
6
+
7
+ - 54275c2: Make some minor improvements to JSDoc comments
8
+ - 54275c2: Add missing default generic type parameters
9
+
10
+ ## 19.4.3
11
+
12
+ ### Patch Changes
13
+
14
+ - a9fb562: Fix incorrect internal type references
15
+
3
16
  ## 19.4.2
4
17
 
5
18
  ### Patch Changes
@@ -5,7 +5,8 @@ import { Member, MemberSession, Organization, StytchB2BUIClient } from '@stytch/
5
5
  import { StytchB2BHeadlessClient, StytchProjectConfigurationInput } from '@stytch/vanilla-js/b2b/headless';
6
6
  import { PermissionsMap } from '@stytch/core/public';
7
7
  /**
8
- * The Stytch Client object passed in to <StytchProvider /> in your application root.
8
+ * The Stytch Client object passed in to <StytchB2BProvider /> in your application root.
9
+ * Either a StytchB2BUIClient or StytchB2BHeadlessClient.
9
10
  */
10
11
  type StytchB2BClient<TProjectConfiguration extends StytchProjectConfigurationInput> = StytchB2BHeadlessClient<TProjectConfiguration> | StytchB2BUIClient<TProjectConfiguration>;
11
12
  type SWRMember = {
@@ -42,15 +43,17 @@ declare const useIsMounted__INTERNAL: () => boolean;
42
43
  declare const isUIClient: <TProjectConfiguration extends Partial<import("@stytch/core/public").StytchProjectConfiguration>>(client: StytchB2BClient<TProjectConfiguration>) => client is StytchB2BUIClient<TProjectConfiguration>;
43
44
  /**
44
45
  * Returns the active Member.
46
+ * The Stytch SDKs are used for client-side authentication and session management.
45
47
  * Check the fromCache property to determine if the member data is from persistent storage.
46
48
  * @example
47
49
  * const {member} = useStytchMember();
48
50
  * return (<h1>Welcome, {member.name}</h1>);
49
- * @returns A {@link SWRUser}
50
51
  */
51
52
  declare const useStytchMember: () => SWRMember;
52
53
  /**
53
54
  * Returns the active member's Stytch member session.
55
+ * The Stytch SDKs are used for client-side authentication and session management.
56
+ * Check the fromCache property to determine if the session data is from persistent storage.
54
57
  * @example
55
58
  * const { session } = useStytchMemberSession();
56
59
  * useEffect(() => {
@@ -58,15 +61,15 @@ declare const useStytchMember: () => SWRMember;
58
61
  * router.replace('/login')
59
62
  * }
60
63
  * }, [session]);
61
- * @returns A {@link SWRMemberSession}
62
64
  */
63
65
  declare const useStytchMemberSession: () => SWRMemberSession;
64
66
  /**
65
67
  * Returns the active Stytch organization.
68
+ * The Stytch SDKs are used for client-side authentication and session management.
69
+ * Check the fromCache property to determine if the organization data is from persistent storage.
66
70
  * @example
67
71
  * const { organization } = useStytchOrganization();
68
- * return organization ? <p>Welcome to {organization.organization_name}</p> : <p>Log in to continue!</p>;
69
- * @returns A {@link SWROrganization}
72
+ * return (<p>Welcome to {organization.organization_name}</p>);
70
73
  */
71
74
  declare const useStytchOrganization: () => SWROrganization;
72
75
  type SWRIsAuthorized = {
@@ -141,16 +144,16 @@ declare const withStytchOrganization: <T extends object>(Component: React.Compon
141
144
  declare const withStytchPermissions: <Permissions_1 extends Record<string, string>, T extends object>(Component: React.ComponentType<T & {
142
145
  stytchPermissions: PermissionsMap<Permissions_1>;
143
146
  }>) => React.ComponentType<T>;
144
- type StytchB2BProviderProps<TProjectConfiguration extends StytchProjectConfigurationInput = Stytch.DefaultProjectConfiguration> = {
147
+ interface StytchB2BProviderProps<TProjectConfiguration extends StytchProjectConfigurationInput = Stytch.DefaultProjectConfiguration> {
145
148
  /**
146
- * A Stytch client instance {@link StytchB2BHeadlessClient}
149
+ * A Stytch client instance, either a {@link StytchB2BUIClient} or {@link StytchB2BHeadlessClient}
147
150
  */
148
151
  stytch: StytchB2BClient<TProjectConfiguration>;
149
152
  children?: ReactNode;
150
- };
153
+ }
151
154
  /**
152
155
  * The Stytch Context Provider.
153
- * Wrap your application with this component in the root file in order to use Stytch everywhere in your app.
156
+ * Wrap your application with this component in order to use Stytch everywhere in your app.
154
157
  * @example
155
158
  * const stytch = new StytchB2BHeadlessClient('public-token-<find yours in the stytch dashboard>')
156
159
  *
@@ -23,11 +23,11 @@ const isUIClient = (client) => {
23
23
  };
24
24
  /**
25
25
  * Returns the active Member.
26
+ * The Stytch SDKs are used for client-side authentication and session management.
26
27
  * Check the fromCache property to determine if the member data is from persistent storage.
27
28
  * @example
28
29
  * const {member} = useStytchMember();
29
30
  * return (<h1>Welcome, {member.name}</h1>);
30
- * @returns A {@link SWRUser}
31
31
  */
32
32
  const useStytchMember = () => {
33
33
  invariant(useIsMounted__INTERNAL(), noProviderError('useStytchMember', 'StytchB2BProvider'));
@@ -35,6 +35,8 @@ const useStytchMember = () => {
35
35
  };
36
36
  /**
37
37
  * Returns the active member's Stytch member session.
38
+ * The Stytch SDKs are used for client-side authentication and session management.
39
+ * Check the fromCache property to determine if the session data is from persistent storage.
38
40
  * @example
39
41
  * const { session } = useStytchMemberSession();
40
42
  * useEffect(() => {
@@ -42,7 +44,6 @@ const useStytchMember = () => {
42
44
  * router.replace('/login')
43
45
  * }
44
46
  * }, [session]);
45
- * @returns A {@link SWRMemberSession}
46
47
  */
47
48
  const useStytchMemberSession = () => {
48
49
  invariant(useIsMounted__INTERNAL(), noProviderError('useStytchMemberSession', 'StytchB2BProvider'));
@@ -50,10 +51,11 @@ const useStytchMemberSession = () => {
50
51
  };
51
52
  /**
52
53
  * Returns the active Stytch organization.
54
+ * The Stytch SDKs are used for client-side authentication and session management.
55
+ * Check the fromCache property to determine if the organization data is from persistent storage.
53
56
  * @example
54
57
  * const { organization } = useStytchOrganization();
55
- * return organization ? <p>Welcome to {organization.organization_name}</p> : <p>Log in to continue!</p>;
56
- * @returns A {@link SWROrganization}
58
+ * return (<p>Welcome to {organization.organization_name}</p>);
57
59
  */
58
60
  const useStytchOrganization = () => {
59
61
  invariant(useIsMounted__INTERNAL(), noProviderError('useStytchOrganization', 'StytchB2BProvider'));
@@ -115,7 +117,7 @@ const withStytchMember = (Component) => {
115
117
  const { member, fromCache } = useStytchMember();
116
118
  return React.createElement(Component, Object.assign({}, props, { stytchMember: member, stytchMemberIsFromCache: fromCache }));
117
119
  };
118
- WithStytchUser.displayName = `withStytchUser(${Component.displayName || Component.name || 'Component'})`;
120
+ WithStytchUser.displayName = `withStytchMember(${Component.displayName || Component.name || 'Component'})`;
119
121
  return WithStytchUser;
120
122
  };
121
123
  const withStytchMemberSession = (Component) => {
@@ -124,7 +126,7 @@ const withStytchMemberSession = (Component) => {
124
126
  const { session, fromCache } = useStytchMemberSession();
125
127
  return React.createElement(Component, Object.assign({}, props, { stytchMemberSession: session, stytchMemberSessionIsFromCache: fromCache }));
126
128
  };
127
- WithStytchSession.displayName = `withStytchSession(${Component.displayName || Component.name || 'Component'})`;
129
+ WithStytchSession.displayName = `withStytchMemberSession(${Component.displayName || Component.name || 'Component'})`;
128
130
  return WithStytchSession;
129
131
  };
130
132
  const withStytchOrganization = (Component) => {
@@ -178,7 +180,7 @@ const withStytchPermissions = (Component) => {
178
180
  };
179
181
  /**
180
182
  * The Stytch Context Provider.
181
- * Wrap your application with this component in the root file in order to use Stytch everywhere in your app.
183
+ * Wrap your application with this component in order to use Stytch everywhere in your app.
182
184
  * @example
183
185
  * const stytch = new StytchB2BHeadlessClient('public-token-<find yours in the stytch dashboard>')
184
186
  *
@@ -5,7 +5,8 @@ import { Member, MemberSession, Organization, StytchB2BUIClient } from '@stytch/
5
5
  import { StytchB2BHeadlessClient, StytchProjectConfigurationInput } from '@stytch/vanilla-js/b2b/headless';
6
6
  import { PermissionsMap } from '@stytch/core/public';
7
7
  /**
8
- * The Stytch Client object passed in to <StytchProvider /> in your application root.
8
+ * The Stytch Client object passed in to <StytchB2BProvider /> in your application root.
9
+ * Either a StytchB2BUIClient or StytchB2BHeadlessClient.
9
10
  */
10
11
  type StytchB2BClient<TProjectConfiguration extends StytchProjectConfigurationInput> = StytchB2BHeadlessClient<TProjectConfiguration> | StytchB2BUIClient<TProjectConfiguration>;
11
12
  type SWRMember = {
@@ -42,15 +43,17 @@ declare const useIsMounted__INTERNAL: () => boolean;
42
43
  declare const isUIClient: <TProjectConfiguration extends Partial<import("@stytch/core/public").StytchProjectConfiguration>>(client: StytchB2BClient<TProjectConfiguration>) => client is StytchB2BUIClient<TProjectConfiguration>;
43
44
  /**
44
45
  * Returns the active Member.
46
+ * The Stytch SDKs are used for client-side authentication and session management.
45
47
  * Check the fromCache property to determine if the member data is from persistent storage.
46
48
  * @example
47
49
  * const {member} = useStytchMember();
48
50
  * return (<h1>Welcome, {member.name}</h1>);
49
- * @returns A {@link SWRUser}
50
51
  */
51
52
  declare const useStytchMember: () => SWRMember;
52
53
  /**
53
54
  * Returns the active member's Stytch member session.
55
+ * The Stytch SDKs are used for client-side authentication and session management.
56
+ * Check the fromCache property to determine if the session data is from persistent storage.
54
57
  * @example
55
58
  * const { session } = useStytchMemberSession();
56
59
  * useEffect(() => {
@@ -58,15 +61,15 @@ declare const useStytchMember: () => SWRMember;
58
61
  * router.replace('/login')
59
62
  * }
60
63
  * }, [session]);
61
- * @returns A {@link SWRMemberSession}
62
64
  */
63
65
  declare const useStytchMemberSession: () => SWRMemberSession;
64
66
  /**
65
67
  * Returns the active Stytch organization.
68
+ * The Stytch SDKs are used for client-side authentication and session management.
69
+ * Check the fromCache property to determine if the organization data is from persistent storage.
66
70
  * @example
67
71
  * const { organization } = useStytchOrganization();
68
- * return organization ? <p>Welcome to {organization.organization_name}</p> : <p>Log in to continue!</p>;
69
- * @returns A {@link SWROrganization}
72
+ * return (<p>Welcome to {organization.organization_name}</p>);
70
73
  */
71
74
  declare const useStytchOrganization: () => SWROrganization;
72
75
  type SWRIsAuthorized = {
@@ -141,16 +144,16 @@ declare const withStytchOrganization: <T extends object>(Component: React.Compon
141
144
  declare const withStytchPermissions: <Permissions_1 extends Record<string, string>, T extends object>(Component: React.ComponentType<T & {
142
145
  stytchPermissions: PermissionsMap<Permissions_1>;
143
146
  }>) => React.ComponentType<T>;
144
- type StytchB2BProviderProps<TProjectConfiguration extends StytchProjectConfigurationInput = Stytch.DefaultProjectConfiguration> = {
147
+ interface StytchB2BProviderProps<TProjectConfiguration extends StytchProjectConfigurationInput = Stytch.DefaultProjectConfiguration> {
145
148
  /**
146
- * A Stytch client instance {@link StytchB2BHeadlessClient}
149
+ * A Stytch client instance, either a {@link StytchB2BUIClient} or {@link StytchB2BHeadlessClient}
147
150
  */
148
151
  stytch: StytchB2BClient<TProjectConfiguration>;
149
152
  children?: ReactNode;
150
- };
153
+ }
151
154
  /**
152
155
  * The Stytch Context Provider.
153
- * Wrap your application with this component in the root file in order to use Stytch everywhere in your app.
156
+ * Wrap your application with this component in order to use Stytch everywhere in your app.
154
157
  * @example
155
158
  * const stytch = new StytchB2BHeadlessClient('public-token-<find yours in the stytch dashboard>')
156
159
  *
@@ -29,11 +29,11 @@ const isUIClient = (client) => {
29
29
  };
30
30
  /**
31
31
  * Returns the active Member.
32
+ * The Stytch SDKs are used for client-side authentication and session management.
32
33
  * Check the fromCache property to determine if the member data is from persistent storage.
33
34
  * @example
34
35
  * const {member} = useStytchMember();
35
36
  * return (<h1>Welcome, {member.name}</h1>);
36
- * @returns A {@link SWRUser}
37
37
  */
38
38
  const useStytchMember = () => {
39
39
  invariant.invariant(useIsMounted__INTERNAL(), invariant.noProviderError('useStytchMember', 'StytchB2BProvider'));
@@ -41,6 +41,8 @@ const useStytchMember = () => {
41
41
  };
42
42
  /**
43
43
  * Returns the active member's Stytch member session.
44
+ * The Stytch SDKs are used for client-side authentication and session management.
45
+ * Check the fromCache property to determine if the session data is from persistent storage.
44
46
  * @example
45
47
  * const { session } = useStytchMemberSession();
46
48
  * useEffect(() => {
@@ -48,7 +50,6 @@ const useStytchMember = () => {
48
50
  * router.replace('/login')
49
51
  * }
50
52
  * }, [session]);
51
- * @returns A {@link SWRMemberSession}
52
53
  */
53
54
  const useStytchMemberSession = () => {
54
55
  invariant.invariant(useIsMounted__INTERNAL(), invariant.noProviderError('useStytchMemberSession', 'StytchB2BProvider'));
@@ -56,10 +57,11 @@ const useStytchMemberSession = () => {
56
57
  };
57
58
  /**
58
59
  * Returns the active Stytch organization.
60
+ * The Stytch SDKs are used for client-side authentication and session management.
61
+ * Check the fromCache property to determine if the organization data is from persistent storage.
59
62
  * @example
60
63
  * const { organization } = useStytchOrganization();
61
- * return organization ? <p>Welcome to {organization.organization_name}</p> : <p>Log in to continue!</p>;
62
- * @returns A {@link SWROrganization}
64
+ * return (<p>Welcome to {organization.organization_name}</p>);
63
65
  */
64
66
  const useStytchOrganization = () => {
65
67
  invariant.invariant(useIsMounted__INTERNAL(), invariant.noProviderError('useStytchOrganization', 'StytchB2BProvider'));
@@ -121,7 +123,7 @@ const withStytchMember = (Component) => {
121
123
  const { member, fromCache } = useStytchMember();
122
124
  return React__default["default"].createElement(Component, Object.assign({}, props, { stytchMember: member, stytchMemberIsFromCache: fromCache }));
123
125
  };
124
- WithStytchUser.displayName = `withStytchUser(${Component.displayName || Component.name || 'Component'})`;
126
+ WithStytchUser.displayName = `withStytchMember(${Component.displayName || Component.name || 'Component'})`;
125
127
  return WithStytchUser;
126
128
  };
127
129
  const withStytchMemberSession = (Component) => {
@@ -130,7 +132,7 @@ const withStytchMemberSession = (Component) => {
130
132
  const { session, fromCache } = useStytchMemberSession();
131
133
  return React__default["default"].createElement(Component, Object.assign({}, props, { stytchMemberSession: session, stytchMemberSessionIsFromCache: fromCache }));
132
134
  };
133
- WithStytchSession.displayName = `withStytchSession(${Component.displayName || Component.name || 'Component'})`;
135
+ WithStytchSession.displayName = `withStytchMemberSession(${Component.displayName || Component.name || 'Component'})`;
134
136
  return WithStytchSession;
135
137
  };
136
138
  const withStytchOrganization = (Component) => {
@@ -184,7 +186,7 @@ const withStytchPermissions = (Component) => {
184
186
  };
185
187
  /**
186
188
  * The Stytch Context Provider.
187
- * Wrap your application with this component in the root file in order to use Stytch everywhere in your app.
189
+ * Wrap your application with this component in order to use Stytch everywhere in your app.
188
190
  * @example
189
191
  * const stytch = new StytchB2BHeadlessClient('public-token-<find yours in the stytch dashboard>')
190
192
  *
@@ -14,7 +14,7 @@ type AdminPortalSSOProps<TProjectConfiguration extends StytchProjectConfiguratio
14
14
  *
15
15
  * See the {@link https://stytch.com/docs/b2b/sdks/javascript-sdk online reference}
16
16
  */
17
- declare const AdminPortalSSO: <TProjectConfiguration extends Partial<import("core/dist/public").StytchProjectConfiguration> = Stytch.DefaultProjectConfiguration>(props: ExcludeInjectedOptions<AdminPortalSSOMountOptions<Partial<import("core/dist/public").StytchProjectConfiguration>>>) => JSX.Element;
17
+ declare const AdminPortalSSO: <TProjectConfiguration extends Partial<import("@stytch/core/public").StytchProjectConfiguration> = Stytch.DefaultProjectConfiguration>(props: ExcludeInjectedOptions<AdminPortalSSOMountOptions<Partial<import("@stytch/core/public").StytchProjectConfiguration>>>) => JSX.Element;
18
18
  type AdminPortalOrgSettingsProps<TProjectConfiguration extends StytchProjectConfigurationInput$0 = Stytch.DefaultProjectConfiguration> = ExcludeInjectedOptions<AdminPortalOrgSettingsMountOptions<TProjectConfiguration>>;
19
19
  /**
20
20
  * The Admin Portal Organization Settings UI component.
@@ -22,7 +22,7 @@ type AdminPortalOrgSettingsProps<TProjectConfiguration extends StytchProjectConf
22
22
  *
23
23
  * See the {@link https://stytch.com/docs/b2b/sdks/javascript-sdk online reference}
24
24
  */
25
- declare const AdminPortalOrgSettings: <TProjectConfiguration extends Partial<import("core/dist/public").StytchProjectConfiguration> = Stytch.DefaultProjectConfiguration>(props: ExcludeInjectedOptions<AdminPortalOrgSettingsMountOptions<Partial<import("core/dist/public").StytchProjectConfiguration>>>) => JSX.Element;
25
+ declare const AdminPortalOrgSettings: <TProjectConfiguration extends Partial<import("@stytch/core/public").StytchProjectConfiguration> = Stytch.DefaultProjectConfiguration>(props: ExcludeInjectedOptions<AdminPortalOrgSettingsMountOptions<Partial<import("@stytch/core/public").StytchProjectConfiguration>>>) => JSX.Element;
26
26
  type AdminPortalMemberManagementProps<TProjectConfiguration extends StytchProjectConfigurationInput$0 = Stytch.DefaultProjectConfiguration> = ExcludeInjectedOptions<AdminPortalMemberManagementMountOptions<TProjectConfiguration>>;
27
27
  /**
28
28
  * The Admin Portal member management UI component.
@@ -30,7 +30,7 @@ type AdminPortalMemberManagementProps<TProjectConfiguration extends StytchProjec
30
30
  *
31
31
  * See the {@link https://stytch.com/docs/b2b/sdks/javascript-sdk online reference}
32
32
  */
33
- declare const AdminPortalMemberManagement: <TProjectConfiguration extends Partial<import("core/dist/public").StytchProjectConfiguration> = Stytch.DefaultProjectConfiguration>(props: ExcludeInjectedOptions<AdminPortalMemberManagementMountOptions<Partial<import("core/dist/public").StytchProjectConfiguration>>>) => JSX.Element;
33
+ declare const AdminPortalMemberManagement: <TProjectConfiguration extends Partial<import("@stytch/core/public").StytchProjectConfiguration> = Stytch.DefaultProjectConfiguration>(props: ExcludeInjectedOptions<AdminPortalMemberManagementMountOptions<Partial<import("@stytch/core/public").StytchProjectConfiguration>>>) => JSX.Element;
34
34
  type AdminPortalSCIMProps<TProjectConfiguration extends StytchProjectConfigurationInput$0 = Stytch.DefaultProjectConfiguration> = ExcludeInjectedOptions<AdminPortalSCIMMountOptions<TProjectConfiguration>>;
35
35
  /**
36
36
  * The Admin Portal SCIM UI component.
@@ -38,7 +38,7 @@ type AdminPortalSCIMProps<TProjectConfiguration extends StytchProjectConfigurati
38
38
  *
39
39
  * See the {@link https://stytch.com/docs/b2b/sdks/javascript-sdk online reference}
40
40
  */
41
- declare const AdminPortalSCIM: <TProjectConfiguration extends Partial<import("core/dist/public").StytchProjectConfiguration> = Stytch.DefaultProjectConfiguration>(props: ExcludeInjectedOptions<AdminPortalSCIMMountOptions<Partial<import("core/dist/public").StytchProjectConfiguration>>>) => JSX.Element;
41
+ declare const AdminPortalSCIM: <TProjectConfiguration extends Partial<import("@stytch/core/public").StytchProjectConfiguration> = Stytch.DefaultProjectConfiguration>(props: ExcludeInjectedOptions<AdminPortalSCIMMountOptions<Partial<import("@stytch/core/public").StytchProjectConfiguration>>>) => JSX.Element;
42
42
  export { AdminPortalSSO, AdminPortalOrgSettings, AdminPortalMemberManagement, AdminPortalSCIM };
43
43
  export { AdminPortalB2BProducts } from "@stytch/vanilla-js/b2b/adminPortal";
44
44
  export type { AdminPortalSSOProps, AdminPortalOrgSettingsProps, AdminPortalMemberManagementProps, AdminPortalSCIMProps };
@@ -14,7 +14,7 @@ type AdminPortalSSOProps<TProjectConfiguration extends StytchProjectConfiguratio
14
14
  *
15
15
  * See the {@link https://stytch.com/docs/b2b/sdks/javascript-sdk online reference}
16
16
  */
17
- declare const AdminPortalSSO: <TProjectConfiguration extends Partial<import("core/dist/public").StytchProjectConfiguration> = Stytch.DefaultProjectConfiguration>(props: ExcludeInjectedOptions<AdminPortalSSOMountOptions<Partial<import("core/dist/public").StytchProjectConfiguration>>>) => JSX.Element;
17
+ declare const AdminPortalSSO: <TProjectConfiguration extends Partial<import("@stytch/core/public").StytchProjectConfiguration> = Stytch.DefaultProjectConfiguration>(props: ExcludeInjectedOptions<AdminPortalSSOMountOptions<Partial<import("@stytch/core/public").StytchProjectConfiguration>>>) => JSX.Element;
18
18
  type AdminPortalOrgSettingsProps<TProjectConfiguration extends StytchProjectConfigurationInput$0 = Stytch.DefaultProjectConfiguration> = ExcludeInjectedOptions<AdminPortalOrgSettingsMountOptions<TProjectConfiguration>>;
19
19
  /**
20
20
  * The Admin Portal Organization Settings UI component.
@@ -22,7 +22,7 @@ type AdminPortalOrgSettingsProps<TProjectConfiguration extends StytchProjectConf
22
22
  *
23
23
  * See the {@link https://stytch.com/docs/b2b/sdks/javascript-sdk online reference}
24
24
  */
25
- declare const AdminPortalOrgSettings: <TProjectConfiguration extends Partial<import("core/dist/public").StytchProjectConfiguration> = Stytch.DefaultProjectConfiguration>(props: ExcludeInjectedOptions<AdminPortalOrgSettingsMountOptions<Partial<import("core/dist/public").StytchProjectConfiguration>>>) => JSX.Element;
25
+ declare const AdminPortalOrgSettings: <TProjectConfiguration extends Partial<import("@stytch/core/public").StytchProjectConfiguration> = Stytch.DefaultProjectConfiguration>(props: ExcludeInjectedOptions<AdminPortalOrgSettingsMountOptions<Partial<import("@stytch/core/public").StytchProjectConfiguration>>>) => JSX.Element;
26
26
  type AdminPortalMemberManagementProps<TProjectConfiguration extends StytchProjectConfigurationInput$0 = Stytch.DefaultProjectConfiguration> = ExcludeInjectedOptions<AdminPortalMemberManagementMountOptions<TProjectConfiguration>>;
27
27
  /**
28
28
  * The Admin Portal member management UI component.
@@ -30,7 +30,7 @@ type AdminPortalMemberManagementProps<TProjectConfiguration extends StytchProjec
30
30
  *
31
31
  * See the {@link https://stytch.com/docs/b2b/sdks/javascript-sdk online reference}
32
32
  */
33
- declare const AdminPortalMemberManagement: <TProjectConfiguration extends Partial<import("core/dist/public").StytchProjectConfiguration> = Stytch.DefaultProjectConfiguration>(props: ExcludeInjectedOptions<AdminPortalMemberManagementMountOptions<Partial<import("core/dist/public").StytchProjectConfiguration>>>) => JSX.Element;
33
+ declare const AdminPortalMemberManagement: <TProjectConfiguration extends Partial<import("@stytch/core/public").StytchProjectConfiguration> = Stytch.DefaultProjectConfiguration>(props: ExcludeInjectedOptions<AdminPortalMemberManagementMountOptions<Partial<import("@stytch/core/public").StytchProjectConfiguration>>>) => JSX.Element;
34
34
  type AdminPortalSCIMProps<TProjectConfiguration extends StytchProjectConfigurationInput$0 = Stytch.DefaultProjectConfiguration> = ExcludeInjectedOptions<AdminPortalSCIMMountOptions<TProjectConfiguration>>;
35
35
  /**
36
36
  * The Admin Portal SCIM UI component.
@@ -38,7 +38,7 @@ type AdminPortalSCIMProps<TProjectConfiguration extends StytchProjectConfigurati
38
38
  *
39
39
  * See the {@link https://stytch.com/docs/b2b/sdks/javascript-sdk online reference}
40
40
  */
41
- declare const AdminPortalSCIM: <TProjectConfiguration extends Partial<import("core/dist/public").StytchProjectConfiguration> = Stytch.DefaultProjectConfiguration>(props: ExcludeInjectedOptions<AdminPortalSCIMMountOptions<Partial<import("core/dist/public").StytchProjectConfiguration>>>) => JSX.Element;
41
+ declare const AdminPortalSCIM: <TProjectConfiguration extends Partial<import("@stytch/core/public").StytchProjectConfiguration> = Stytch.DefaultProjectConfiguration>(props: ExcludeInjectedOptions<AdminPortalSCIMMountOptions<Partial<import("@stytch/core/public").StytchProjectConfiguration>>>) => JSX.Element;
42
42
  export { AdminPortalSSO, AdminPortalOrgSettings, AdminPortalMemberManagement, AdminPortalSCIM };
43
43
  export { AdminPortalB2BProducts } from "@stytch/vanilla-js/b2b/adminPortal";
44
44
  export type { AdminPortalSSOProps, AdminPortalOrgSettingsProps, AdminPortalMemberManagementProps, AdminPortalSCIMProps };
@@ -1,7 +1,7 @@
1
1
  import { mountAdminPortalSSO, mountAdminPortalOrgSettings, mountAdminPortalMemberManagement, mountAdminPortalSCIM } from '@stytch/vanilla-js/b2b/adminPortal';
2
2
  export { AdminPortalB2BProducts } from '@stytch/vanilla-js/b2b/adminPortal';
3
3
  import React, { useRef, useLayoutEffect } from 'react';
4
- import { u as useIsMounted__INTERNAL, a as useStytchB2BClient } from '../StytchB2BContext-081081ee.js';
4
+ import { u as useIsMounted__INTERNAL, a as useStytchB2BClient } from '../StytchB2BContext-09d376ba.js';
5
5
  import { i as invariant, n as noProviderError } from '../invariant-568a7633.js';
6
6
 
7
7
  const makeAdminPortalComponent = (mountFn, componentName) => {
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var adminPortal = require('@stytch/vanilla-js/b2b/adminPortal');
6
6
  var React = require('react');
7
- var StytchB2BContext = require('../StytchB2BContext-865b6947.js');
7
+ var StytchB2BContext = require('../StytchB2BContext-a8d57249.js');
8
8
  var invariant = require('../invariant-ae5a5bce.js');
9
9
 
10
10
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
@@ -1,8 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  import React from "react";
3
3
  import { Callbacks, StyleConfig, StytchB2BUIConfig, StytchProjectConfigurationInput } from "@stytch/vanilla-js";
4
- // We need to import the StytchB2BUIClient type to give the TSDoc parser a hint as to where it is from
5
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
6
4
  import { IDPConsentScreenManifest } from "@stytch/vanilla-js/b2b";
7
5
  interface StytchB2BProps<TProjectConfiguration extends StytchProjectConfigurationInput = Stytch.DefaultProjectConfiguration> {
8
6
  /**
@@ -76,14 +74,17 @@ type B2BIDPConsentManifestGenerator = (input: {
76
74
  clientName: string;
77
75
  }) => IDPConsentScreenManifest;
78
76
  type B2BIdentityProviderProps = Omit<StytchB2BProps, "config"> & {
77
+ /**
78
+ * Optional {@link B2BIDPConsentManifestGenerator} to customize the consent screen.
79
+ */
79
80
  getIDPConsentManifest?: B2BIDPConsentManifestGenerator;
80
81
  };
81
82
  /**
82
83
  * The Stytch B2B UI component.
83
- * This component can only be used with a {@link StytchB2BUIClient} client constructor
84
- * passed into the {@link StytchB2BProvider}
84
+ * This component can only be used with a Stytch B2B UI Client
85
+ * passed into the StytchB2BProvider.
85
86
  *
86
- * See the {@link https://stytch.com/docs/b2b/sdks/javascript-sdk online reference}
87
+ * See the {@link https://stytch.com/docs/b2b/sdks online reference}
87
88
  *
88
89
  * @example
89
90
  * <StytchB2B
@@ -110,17 +111,16 @@ type B2BIdentityProviderProps = Omit<StytchB2BProps, "config"> & {
110
111
  * onEvent: (event) => console.log(event)
111
112
  * }}
112
113
  * />
113
- * @param props {@link StytchB2BProps}
114
114
  */
115
- declare const StytchB2B: <TProjectConfiguration extends Partial<import("core/dist/public").StytchProjectConfiguration>>({ styles, callbacks, config }: StytchB2BProps<TProjectConfiguration>) => React.JSX.Element;
115
+ declare const StytchB2B: <TProjectConfiguration extends Partial<import("@stytch/core/public").StytchProjectConfiguration> = Stytch.DefaultProjectConfiguration>({ styles, callbacks, config }: StytchB2BProps<TProjectConfiguration>) => React.JSX.Element;
116
116
  /**
117
117
  * The Stytch B2B IDP component.
118
118
  * Parses OAuth Authorization params (client_id, scope, nonce, etc.) out of the page URL.
119
119
  * Requires the user to be logged in.
120
- * This component can only be used with a {@link StytchB2BUIClient} client constructor
121
- * passed into the {@link StytchB2BProvider}
120
+ * This component can only be used with a Stytch B2B UI Client
121
+ * passed into the StytchB2BProvider.
122
122
  *
123
- * See the {@link https://stytch.com/docs/sdks/javascript-sdk online reference}
123
+ * See the {@link https://stytch.com/docs/b2b/sdks online reference}
124
124
  *
125
125
  * @example
126
126
  * const styles = {
@@ -139,11 +139,8 @@ declare const StytchB2B: <TProjectConfiguration extends Partial<import("core/dis
139
139
  * onEvent: (event) => console.log(event)
140
140
  * }}
141
141
  * />
142
- * @param styles - An optional {@link StyleConfig} to customize the look and feel of the screen.
143
- * @param callbacks - An optional {@link Callbacks} object
144
- * @param getIDPConsentManifest - Optional {@link B2BIDPConsentManifestGenerator} to customize the consent screen.
145
142
  */
146
143
  declare const B2BIdentityProvider: ({ styles, callbacks, getIDPConsentManifest }: B2BIdentityProviderProps) => React.JSX.Element;
147
- export { StytchB2BProvider, useStytchB2BClient, useStytchMemberSession, useStytchMember, useStytchIsAuthorized, useStytchOrganization, withStytchB2BClient, withStytchMemberSession, withStytchMember, withStytchOrganization, withStytchPermissions } from "../StytchB2BContext-865b6947.js";
144
+ export { StytchB2BProvider, useStytchB2BClient, useStytchMemberSession, useStytchMember, useStytchIsAuthorized, useStytchOrganization, withStytchB2BClient, withStytchMemberSession, withStytchMember, withStytchOrganization, withStytchPermissions } from "../StytchB2BContext-a8d57249.js";
148
145
  export { StytchB2B, B2BIdentityProvider };
149
- export type { StytchB2BProviderProps } from "../StytchB2BContext-865b6947.js";
146
+ export type { StytchB2BProviderProps } from "../StytchB2BContext-a8d57249.js";
@@ -1,8 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  import React from "react";
3
3
  import { Callbacks, StyleConfig, StytchB2BUIConfig, StytchProjectConfigurationInput } from "@stytch/vanilla-js";
4
- // We need to import the StytchB2BUIClient type to give the TSDoc parser a hint as to where it is from
5
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
6
4
  import { IDPConsentScreenManifest } from "@stytch/vanilla-js/b2b";
7
5
  interface StytchB2BProps<TProjectConfiguration extends StytchProjectConfigurationInput = Stytch.DefaultProjectConfiguration> {
8
6
  /**
@@ -76,14 +74,17 @@ type B2BIDPConsentManifestGenerator = (input: {
76
74
  clientName: string;
77
75
  }) => IDPConsentScreenManifest;
78
76
  type B2BIdentityProviderProps = Omit<StytchB2BProps, "config"> & {
77
+ /**
78
+ * Optional {@link B2BIDPConsentManifestGenerator} to customize the consent screen.
79
+ */
79
80
  getIDPConsentManifest?: B2BIDPConsentManifestGenerator;
80
81
  };
81
82
  /**
82
83
  * The Stytch B2B UI component.
83
- * This component can only be used with a {@link StytchB2BUIClient} client constructor
84
- * passed into the {@link StytchB2BProvider}
84
+ * This component can only be used with a Stytch B2B UI Client
85
+ * passed into the StytchB2BProvider.
85
86
  *
86
- * See the {@link https://stytch.com/docs/b2b/sdks/javascript-sdk online reference}
87
+ * See the {@link https://stytch.com/docs/b2b/sdks online reference}
87
88
  *
88
89
  * @example
89
90
  * <StytchB2B
@@ -110,17 +111,16 @@ type B2BIdentityProviderProps = Omit<StytchB2BProps, "config"> & {
110
111
  * onEvent: (event) => console.log(event)
111
112
  * }}
112
113
  * />
113
- * @param props {@link StytchB2BProps}
114
114
  */
115
- declare const StytchB2B: <TProjectConfiguration extends Partial<import("core/dist/public").StytchProjectConfiguration>>({ styles, callbacks, config }: StytchB2BProps<TProjectConfiguration>) => React.JSX.Element;
115
+ declare const StytchB2B: <TProjectConfiguration extends Partial<import("@stytch/core/public").StytchProjectConfiguration> = Stytch.DefaultProjectConfiguration>({ styles, callbacks, config }: StytchB2BProps<TProjectConfiguration>) => React.JSX.Element;
116
116
  /**
117
117
  * The Stytch B2B IDP component.
118
118
  * Parses OAuth Authorization params (client_id, scope, nonce, etc.) out of the page URL.
119
119
  * Requires the user to be logged in.
120
- * This component can only be used with a {@link StytchB2BUIClient} client constructor
121
- * passed into the {@link StytchB2BProvider}
120
+ * This component can only be used with a Stytch B2B UI Client
121
+ * passed into the StytchB2BProvider.
122
122
  *
123
- * See the {@link https://stytch.com/docs/sdks/javascript-sdk online reference}
123
+ * See the {@link https://stytch.com/docs/b2b/sdks online reference}
124
124
  *
125
125
  * @example
126
126
  * const styles = {
@@ -139,11 +139,8 @@ declare const StytchB2B: <TProjectConfiguration extends Partial<import("core/dis
139
139
  * onEvent: (event) => console.log(event)
140
140
  * }}
141
141
  * />
142
- * @param styles - An optional {@link StyleConfig} to customize the look and feel of the screen.
143
- * @param callbacks - An optional {@link Callbacks} object
144
- * @param getIDPConsentManifest - Optional {@link B2BIDPConsentManifestGenerator} to customize the consent screen.
145
142
  */
146
143
  declare const B2BIdentityProvider: ({ styles, callbacks, getIDPConsentManifest }: B2BIdentityProviderProps) => React.JSX.Element;
147
- export { StytchB2BProvider, useStytchB2BClient, useStytchMemberSession, useStytchMember, useStytchIsAuthorized, useStytchOrganization, withStytchB2BClient, withStytchMemberSession, withStytchMember, withStytchOrganization, withStytchPermissions } from "../StytchB2BContext-081081ee.js";
144
+ export { StytchB2BProvider, useStytchB2BClient, useStytchMemberSession, useStytchMember, useStytchIsAuthorized, useStytchOrganization, withStytchB2BClient, withStytchMemberSession, withStytchMember, withStytchOrganization, withStytchPermissions } from "../StytchB2BContext-09d376ba.js";
148
145
  export { StytchB2B, B2BIdentityProvider };
149
- export type { StytchB2BProviderProps } from "../StytchB2BContext-081081ee.js";
146
+ export type { StytchB2BProviderProps } from "../StytchB2BContext-09d376ba.js";
@@ -1,14 +1,14 @@
1
- import { u as useIsMounted__INTERNAL, a as useStytchB2BClient, i as isUIClient, b as useStytchMember } from '../StytchB2BContext-081081ee.js';
2
- export { S as StytchB2BProvider, a as useStytchB2BClient, d as useStytchIsAuthorized, b as useStytchMember, c as useStytchMemberSession, e as useStytchOrganization, w as withStytchB2BClient, g as withStytchMember, f as withStytchMemberSession, h as withStytchOrganization, j as withStytchPermissions } from '../StytchB2BContext-081081ee.js';
1
+ import { u as useIsMounted__INTERNAL, a as useStytchB2BClient, i as isUIClient, b as useStytchMember } from '../StytchB2BContext-09d376ba.js';
2
+ export { S as StytchB2BProvider, a as useStytchB2BClient, d as useStytchIsAuthorized, b as useStytchMember, c as useStytchMemberSession, e as useStytchOrganization, w as withStytchB2BClient, g as withStytchMember, f as withStytchMemberSession, h as withStytchOrganization, j as withStytchPermissions } from '../StytchB2BContext-09d376ba.js';
3
3
  import React, { useRef, useLayoutEffect } from 'react';
4
4
  import { i as invariant, b as noHeadlessClientError, n as noProviderError } from '../invariant-568a7633.js';
5
5
 
6
6
  /**
7
7
  * The Stytch B2B UI component.
8
- * This component can only be used with a {@link StytchB2BUIClient} client constructor
9
- * passed into the {@link StytchB2BProvider}
8
+ * This component can only be used with a Stytch B2B UI Client
9
+ * passed into the StytchB2BProvider.
10
10
  *
11
- * See the {@link https://stytch.com/docs/b2b/sdks/javascript-sdk online reference}
11
+ * See the {@link https://stytch.com/docs/b2b/sdks online reference}
12
12
  *
13
13
  * @example
14
14
  * <StytchB2B
@@ -35,7 +35,6 @@ import { i as invariant, b as noHeadlessClientError, n as noProviderError } from
35
35
  * onEvent: (event) => console.log(event)
36
36
  * }}
37
37
  * />
38
- * @param props {@link StytchB2BProps}
39
38
  */
40
39
  const StytchB2B = ({ styles, callbacks, config, }) => {
41
40
  invariant(useIsMounted__INTERNAL(), noProviderError('<StytchB2B />', 'StytchB2BProvider'));
@@ -66,10 +65,10 @@ const StytchB2B = ({ styles, callbacks, config, }) => {
66
65
  * The Stytch B2B IDP component.
67
66
  * Parses OAuth Authorization params (client_id, scope, nonce, etc.) out of the page URL.
68
67
  * Requires the user to be logged in.
69
- * This component can only be used with a {@link StytchB2BUIClient} client constructor
70
- * passed into the {@link StytchB2BProvider}
68
+ * This component can only be used with a Stytch B2B UI Client
69
+ * passed into the StytchB2BProvider.
71
70
  *
72
- * See the {@link https://stytch.com/docs/sdks/javascript-sdk online reference}
71
+ * See the {@link https://stytch.com/docs/b2b/sdks online reference}
73
72
  *
74
73
  * @example
75
74
  * const styles = {
@@ -88,9 +87,6 @@ const StytchB2B = ({ styles, callbacks, config, }) => {
88
87
  * onEvent: (event) => console.log(event)
89
88
  * }}
90
89
  * />
91
- * @param styles - An optional {@link StyleConfig} to customize the look and feel of the screen.
92
- * @param callbacks - An optional {@link Callbacks} object
93
- * @param getIDPConsentManifest - Optional {@link B2BIDPConsentManifestGenerator} to customize the consent screen.
94
90
  */
95
91
  const B2BIdentityProvider = ({ styles, callbacks, getIDPConsentManifest }) => {
96
92
  invariant(useIsMounted__INTERNAL(), noProviderError('<IdentityProvider />'));
package/dist/b2b/index.js CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var StytchB2BContext = require('../StytchB2BContext-865b6947.js');
5
+ var StytchB2BContext = require('../StytchB2BContext-a8d57249.js');
6
6
  var React = require('react');
7
7
  var invariant = require('../invariant-ae5a5bce.js');
8
8
 
@@ -12,10 +12,10 @@ var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
12
12
 
13
13
  /**
14
14
  * The Stytch B2B UI component.
15
- * This component can only be used with a {@link StytchB2BUIClient} client constructor
16
- * passed into the {@link StytchB2BProvider}
15
+ * This component can only be used with a Stytch B2B UI Client
16
+ * passed into the StytchB2BProvider.
17
17
  *
18
- * See the {@link https://stytch.com/docs/b2b/sdks/javascript-sdk online reference}
18
+ * See the {@link https://stytch.com/docs/b2b/sdks online reference}
19
19
  *
20
20
  * @example
21
21
  * <StytchB2B
@@ -42,7 +42,6 @@ var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
42
42
  * onEvent: (event) => console.log(event)
43
43
  * }}
44
44
  * />
45
- * @param props {@link StytchB2BProps}
46
45
  */
47
46
  const StytchB2B = ({ styles, callbacks, config, }) => {
48
47
  invariant.invariant(StytchB2BContext.useIsMounted__INTERNAL(), invariant.noProviderError('<StytchB2B />', 'StytchB2BProvider'));
@@ -73,10 +72,10 @@ const StytchB2B = ({ styles, callbacks, config, }) => {
73
72
  * The Stytch B2B IDP component.
74
73
  * Parses OAuth Authorization params (client_id, scope, nonce, etc.) out of the page URL.
75
74
  * Requires the user to be logged in.
76
- * This component can only be used with a {@link StytchB2BUIClient} client constructor
77
- * passed into the {@link StytchB2BProvider}
75
+ * This component can only be used with a Stytch B2B UI Client
76
+ * passed into the StytchB2BProvider.
78
77
  *
79
- * See the {@link https://stytch.com/docs/sdks/javascript-sdk online reference}
78
+ * See the {@link https://stytch.com/docs/b2b/sdks online reference}
80
79
  *
81
80
  * @example
82
81
  * const styles = {
@@ -95,9 +94,6 @@ const StytchB2B = ({ styles, callbacks, config, }) => {
95
94
  * onEvent: (event) => console.log(event)
96
95
  * }}
97
96
  * />
98
- * @param styles - An optional {@link StyleConfig} to customize the look and feel of the screen.
99
- * @param callbacks - An optional {@link Callbacks} object
100
- * @param getIDPConsentManifest - Optional {@link B2BIDPConsentManifestGenerator} to customize the consent screen.
101
97
  */
102
98
  const B2BIdentityProvider = ({ styles, callbacks, getIDPConsentManifest }) => {
103
99
  invariant.invariant(StytchB2BContext.useIsMounted__INTERNAL(), invariant.noProviderError('<IdentityProvider />'));