@stytch/vanilla-js 5.3.1 → 5.5.0
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 +27 -0
- package/dist/adminPortal/components/DeleteConnection.d.ts +5 -2
- package/dist/adminPortal/components/Select.d.ts +2 -0
- package/dist/adminPortal/index.esm.js +2 -2
- package/dist/adminPortal/index.js +2 -2
- package/dist/adminPortal/scim/AdminPortalSCIM.d.ts +11 -1
- package/dist/adminPortal/scim/SCIMConnectionDangerZoneSection.d.ts +5 -0
- package/dist/adminPortal/scim/SCIMConnectionDetailsSection.d.ts +5 -0
- package/dist/adminPortal/scim/SCIMConnectionRoleAssignmentsSection.d.ts +7 -0
- package/dist/adminPortal/scim/SCIMConnectionTokenRotationSection.d.ts +5 -0
- package/dist/adminPortal/scim/mountAdminPortalSCIM.d.ts +1 -1
- package/dist/adminPortal/sso/AdminPortalSSO.d.ts +2 -2
- package/dist/adminPortal/sso/IdpInfo.d.ts +6 -2
- package/dist/adminPortal/sso/RoleAssignmentsSection.d.ts +2 -2
- package/dist/adminPortal/sso/SSONewConnectionConfigureScreen.d.ts +3 -3
- package/dist/adminPortal/sso/SSORouter.d.ts +7 -7
- package/dist/adminPortal/sso/TaggedConnection.d.ts +5 -2
- package/dist/adminPortal/utils/Connection.d.ts +1 -1
- package/dist/adminPortal/utils/ConnectionType.d.ts +1 -1
- package/dist/adminPortal/utils/FeatureStateComponent.d.ts +10 -0
- package/dist/adminPortal/utils/getFeatureState.d.ts +9 -0
- package/dist/adminPortal/utils/getSsoRoleAssignments.d.ts +8 -0
- package/dist/adminPortal/utils/prependAsterisks.d.ts +1 -0
- package/dist/adminPortal/utils/useAdminPortalConfig.d.ts +4 -3
- package/dist/adminPortal/utils/useMutateScimConnection.d.ts +1 -1
- package/dist/adminPortal/utils/useMutateSsoConnection.d.ts +2 -5
- package/dist/b2b/index.esm.js +979 -1137
- package/dist/b2b/index.headless.esm.js +3 -3
- package/dist/b2b/index.headless.js +2 -2
- package/dist/b2b/index.js +971 -1129
- package/dist/{extractErrorMessage-Ch-qCHrd.js → extractErrorMessage-CW4Nxx1B.js} +1 -1
- package/dist/{extractErrorMessage-m6TJ9iVT.js → extractErrorMessage-Ca4zQC5N.js} +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/index.headless.esm.js +28 -28
- package/dist/index.headless.js +28 -28
- package/dist/index.js +1 -1
- package/dist/{internal-DA5LySQi.js → internal-2fj7jjLQ.js} +746 -702
- package/dist/{internal-k7t3AQud.js → internal-C29Dtv6A.js} +746 -702
- package/package.json +15 -16
|
@@ -1,7 +1,17 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { MappedPropsFromRouteMap } from '../Router';
|
|
3
3
|
import { AdminPortalComponentMountOptions } from '../makeAdminPortalComponentMountFn';
|
|
4
|
-
|
|
4
|
+
import { AdminPortalUIConfigRoleDisplayProvider } from '../utils/AdminPortalUIConfigRoleDisplayProvider';
|
|
5
|
+
/**
|
|
6
|
+
* The UI configuration object for SCIM used in the Admin Portal.
|
|
7
|
+
*/
|
|
8
|
+
export type AdminPortalSCIMUIConfig = AdminPortalUIConfigRoleDisplayProvider;
|
|
9
|
+
export interface AdminPortalSCIMMountOptions extends AdminPortalComponentMountOptions {
|
|
10
|
+
/**
|
|
11
|
+
* An {@link AdminPortalSCIMUIConfig} object containing custom configuration.
|
|
12
|
+
*/
|
|
13
|
+
config?: AdminPortalSCIMUIConfig;
|
|
14
|
+
}
|
|
5
15
|
declare const routeMap: {
|
|
6
16
|
scimConnection: () => React.JSX.Element;
|
|
7
17
|
newConnection: () => React.JSX.Element;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { SCIMConnection } from '@stytch/core/public';
|
|
3
|
+
import { UseBlockNavigation } from '../Router';
|
|
4
|
+
export declare const RoleAssignmentsSection: ({ connection, useBlockNavigation, }: {
|
|
5
|
+
connection: SCIMConnection;
|
|
6
|
+
useBlockNavigation: UseBlockNavigation;
|
|
7
|
+
}) => React.JSX.Element;
|
|
@@ -12,4 +12,4 @@ export type { AdminPortalSCIMMountOptions } from './AdminPortalSCIM';
|
|
|
12
12
|
*
|
|
13
13
|
* @throws An error when the element specified by element cannot be found.
|
|
14
14
|
*/
|
|
15
|
-
export declare const mountAdminPortalSCIM: (options: import("
|
|
15
|
+
export declare const mountAdminPortalSCIM: (options: import("./AdminPortalSCIM").AdminPortalSCIMMountOptions) => void;
|
|
@@ -18,8 +18,8 @@ declare const routeMap: {
|
|
|
18
18
|
}) => React.JSX.Element;
|
|
19
19
|
connectionsList: () => React.JSX.Element;
|
|
20
20
|
newConnection: () => React.JSX.Element;
|
|
21
|
-
newConnectionConfigure: ({ connection: connectionProp }: {
|
|
22
|
-
connection: import("./TaggedConnection").TaggedConnection;
|
|
21
|
+
newConnectionConfigure: ({ connection: connectionProp, }: {
|
|
22
|
+
connection: import("./TaggedConnection").OIDCTaggedConnection | import("./TaggedConnection").SAMLTaggedConnection;
|
|
23
23
|
}) => React.JSX.Element;
|
|
24
24
|
};
|
|
25
25
|
export type SsoRouterMappedProps = MappedPropsFromRouteMap<typeof routeMap>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { RequireAllOrNone } from 'type-fest';
|
|
2
2
|
import { ConnectionType } from '../utils/ConnectionType';
|
|
3
|
-
import { OIDCTaggedConnection, SAMLTaggedConnection, TaggedConnection } from './TaggedConnection';
|
|
3
|
+
import { ExternalTaggedConnection, OIDCTaggedConnection, SAMLTaggedConnection, TaggedConnection } from './TaggedConnection';
|
|
4
4
|
export type SamlKnownIdp = 'generic' | 'okta' | 'microsoft-entra' | 'google-workspace';
|
|
5
5
|
export type OidcKnownIdp = 'generic' | 'okta' | 'microsoft-entra';
|
|
6
6
|
export type KnownIdp = SamlKnownIdp | OidcKnownIdp;
|
|
@@ -138,7 +138,11 @@ type IdpAndConnectionInfoReturnType<TConnectionType extends ConnectionType> = ((
|
|
|
138
138
|
connection: SAMLTaggedConnection;
|
|
139
139
|
}) | (OidcTaggedIdpInfo & {
|
|
140
140
|
connection: OIDCTaggedConnection;
|
|
141
|
-
})
|
|
141
|
+
}) | {
|
|
142
|
+
idp: undefined;
|
|
143
|
+
type: 'external';
|
|
144
|
+
connection: ExternalTaggedConnection;
|
|
145
|
+
}) & {
|
|
142
146
|
type: TConnectionType;
|
|
143
147
|
};
|
|
144
148
|
export declare const getIdpAndConnectionInfo: <TConnectionType extends ConnectionType>(connection: TaggedConnection & {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { SAMLConnection } from '@stytch/core/public';
|
|
2
1
|
import React from 'react';
|
|
2
|
+
import { ExternalTaggedConnection, SAMLTaggedConnection } from './TaggedConnection';
|
|
3
3
|
export declare const RoleAssignmentsSection: ({ canUpdateConnection, connection, }: {
|
|
4
4
|
canUpdateConnection: boolean;
|
|
5
|
-
connection:
|
|
5
|
+
connection: SAMLTaggedConnection | ExternalTaggedConnection;
|
|
6
6
|
}) => React.JSX.Element;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
export declare const SSONewConnectionConfigureScreen: ({ connection: connectionProp }: {
|
|
4
|
-
connection:
|
|
2
|
+
import { OIDCTaggedConnection, SAMLTaggedConnection } from './TaggedConnection';
|
|
3
|
+
export declare const SSONewConnectionConfigureScreen: ({ connection: connectionProp, }: {
|
|
4
|
+
connection: SAMLTaggedConnection | OIDCTaggedConnection;
|
|
5
5
|
}) => React.JSX.Element;
|
|
@@ -7,8 +7,8 @@ export declare const SsoRouterProvider: ({ children, initialRoute, }: {
|
|
|
7
7
|
}) => import("react").JSX.Element;
|
|
8
8
|
connectionsList: () => import("react").JSX.Element;
|
|
9
9
|
newConnection: () => import("react").JSX.Element;
|
|
10
|
-
newConnectionConfigure: ({ connection: connectionProp }: {
|
|
11
|
-
connection: import("./TaggedConnection").TaggedConnection;
|
|
10
|
+
newConnectionConfigure: ({ connection: connectionProp, }: {
|
|
11
|
+
connection: import("./TaggedConnection").OIDCTaggedConnection | import("./TaggedConnection").SAMLTaggedConnection;
|
|
12
12
|
}) => import("react").JSX.Element;
|
|
13
13
|
}>>;
|
|
14
14
|
}) => import("react").JSX.Element, SsoRouter: ({ routeMap }: {
|
|
@@ -19,7 +19,7 @@ export declare const SsoRouterProvider: ({ children, initialRoute, }: {
|
|
|
19
19
|
connectionsList: import("react").ComponentType<never>;
|
|
20
20
|
newConnection: import("react").ComponentType<never>;
|
|
21
21
|
newConnectionConfigure: import("react").ComponentType<{
|
|
22
|
-
connection: import("./TaggedConnection").TaggedConnection;
|
|
22
|
+
connection: import("./TaggedConnection").OIDCTaggedConnection | import("./TaggedConnection").SAMLTaggedConnection;
|
|
23
23
|
}>;
|
|
24
24
|
};
|
|
25
25
|
}) => import("react").JSX.Element | null, useSsoRouterController: () => import("../Router").RouterController<import("../Router").MappedPropsFromRouteMap<{
|
|
@@ -28,8 +28,8 @@ export declare const SsoRouterProvider: ({ children, initialRoute, }: {
|
|
|
28
28
|
}) => import("react").JSX.Element;
|
|
29
29
|
connectionsList: () => import("react").JSX.Element;
|
|
30
30
|
newConnection: () => import("react").JSX.Element;
|
|
31
|
-
newConnectionConfigure: ({ connection: connectionProp }: {
|
|
32
|
-
connection: import("./TaggedConnection").TaggedConnection;
|
|
31
|
+
newConnectionConfigure: ({ connection: connectionProp, }: {
|
|
32
|
+
connection: import("./TaggedConnection").OIDCTaggedConnection | import("./TaggedConnection").SAMLTaggedConnection;
|
|
33
33
|
}) => import("react").JSX.Element;
|
|
34
34
|
}>>, useSsoRouterState: () => {
|
|
35
35
|
currentRoute: import("../Router").RouterStateEntry<import("../Router").MappedPropsFromRouteMap<{
|
|
@@ -38,8 +38,8 @@ export declare const SsoRouterProvider: ({ children, initialRoute, }: {
|
|
|
38
38
|
}) => import("react").JSX.Element;
|
|
39
39
|
connectionsList: () => import("react").JSX.Element;
|
|
40
40
|
newConnection: () => import("react").JSX.Element;
|
|
41
|
-
newConnectionConfigure: ({ connection: connectionProp }: {
|
|
42
|
-
connection: import("./TaggedConnection").TaggedConnection;
|
|
41
|
+
newConnectionConfigure: ({ connection: connectionProp, }: {
|
|
42
|
+
connection: import("./TaggedConnection").OIDCTaggedConnection | import("./TaggedConnection").SAMLTaggedConnection;
|
|
43
43
|
}) => import("react").JSX.Element;
|
|
44
44
|
}>>;
|
|
45
45
|
};
|
|
@@ -1,8 +1,11 @@
|
|
|
1
|
-
import { OIDCConnection, SAMLConnection } from '@stytch/core/public';
|
|
1
|
+
import { ExternalConnection, OIDCConnection, SAMLConnection } from '@stytch/core/public';
|
|
2
2
|
export type OIDCTaggedConnection = OIDCConnection & {
|
|
3
3
|
connectionType: 'oidc';
|
|
4
4
|
};
|
|
5
5
|
export type SAMLTaggedConnection = SAMLConnection & {
|
|
6
6
|
connectionType: 'saml';
|
|
7
7
|
};
|
|
8
|
-
export type
|
|
8
|
+
export type ExternalTaggedConnection = ExternalConnection & {
|
|
9
|
+
connectionType: 'external';
|
|
10
|
+
};
|
|
11
|
+
export type TaggedConnection = OIDCTaggedConnection | SAMLTaggedConnection | ExternalTaggedConnection;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export type ConnectionType = 'saml' | 'oidc';
|
|
1
|
+
export type ConnectionType = 'saml' | 'oidc' | 'external';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { AdminPortalFeatureState } from './getFeatureState';
|
|
3
|
+
export declare const FeatureStateComponent: ({ featureState, children, notLoggedInValue, errorValue, featureNotEnabledValue, noPermissionValue, }: {
|
|
4
|
+
featureState: AdminPortalFeatureState;
|
|
5
|
+
children: React.JSX.Element;
|
|
6
|
+
notLoggedInValue: string;
|
|
7
|
+
errorValue: string;
|
|
8
|
+
featureNotEnabledValue: string;
|
|
9
|
+
noPermissionValue: string;
|
|
10
|
+
}) => React.JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Member } from '@stytch/core/public';
|
|
2
|
+
export type AdminPortalFeatureState = 'success' | 'loading' | 'notLoggedIn' | 'error' | 'featureNotEnabled' | 'noPermission';
|
|
3
|
+
export declare const getFeatureState: ({ self, fromCache, adminPortalConfigError, isFeatureEnabled, hasPermission, }: {
|
|
4
|
+
self: Member | null;
|
|
5
|
+
fromCache: boolean;
|
|
6
|
+
adminPortalConfigError: unknown;
|
|
7
|
+
isFeatureEnabled: boolean | undefined;
|
|
8
|
+
hasPermission: boolean | undefined;
|
|
9
|
+
}) => AdminPortalFeatureState;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ExternalTaggedConnection, SAMLTaggedConnection } from '../sso/TaggedConnection';
|
|
2
|
+
export declare const getSsoConnectionRoleAssignments: (connection: SAMLTaggedConnection | ExternalTaggedConnection) => {
|
|
3
|
+
role_id: string;
|
|
4
|
+
}[];
|
|
5
|
+
export declare const getSsoGroupRoleAssignments: (connection: SAMLTaggedConnection | ExternalTaggedConnection) => {
|
|
6
|
+
role_id: string;
|
|
7
|
+
group: string;
|
|
8
|
+
}[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const prependAsterisks: (value: string) => string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ResponseCommon } from '@stytch/core/public';
|
|
2
|
-
interface AdminPortalConfigResponse extends ResponseCommon {
|
|
2
|
+
export interface AdminPortalConfigResponse extends ResponseCommon {
|
|
3
3
|
sso_config: {
|
|
4
4
|
sso_enabled: boolean;
|
|
5
5
|
can_create_saml_connection: boolean;
|
|
@@ -12,5 +12,6 @@ interface AdminPortalConfigResponse extends ResponseCommon {
|
|
|
12
12
|
scim_enabled: boolean;
|
|
13
13
|
};
|
|
14
14
|
}
|
|
15
|
-
export declare const useAdminPortalConfig: (
|
|
16
|
-
|
|
15
|
+
export declare const useAdminPortalConfig: ({ shouldFetch }: {
|
|
16
|
+
shouldFetch: boolean;
|
|
17
|
+
}) => import("swr/_internal").SWRResponse<AdminPortalConfigResponse, any, any>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { B2BSCIMUpdateConnectionOptions } from '@stytch/core/public';
|
|
2
2
|
export declare const useMutateScimConnectionRoleAssignments: () => {
|
|
3
|
-
mutate: import("./useMutateWithToast").MutationFn<B2BSCIMUpdateConnectionOptions, void>;
|
|
3
|
+
mutate: import("./useMutateWithToast").MutationFn<Pick<B2BSCIMUpdateConnectionOptions, "connection_id" | "scim_group_implicit_role_assignments">, void>;
|
|
4
4
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { B2BSSOOIDCUpdateConnectionOptions, B2BSSOSAMLDeleteVerificationCertificateOptions, B2BSSOSAMLUpdateConnectionByURLOptions, B2BSSOSAMLUpdateConnectionOptions } from '@stytch/core/public';
|
|
1
|
+
import { B2BSSOOIDCUpdateConnectionOptions, B2BSSOSAMLDeleteVerificationCertificateOptions, B2BSSOSAMLUpdateConnectionByURLOptions, B2BSSOSAMLUpdateConnectionOptions, B2BSSOUpdateExternalConnectionOptions } from '@stytch/core/public';
|
|
2
2
|
import { ConnectionType } from './ConnectionType';
|
|
3
3
|
export declare const useMutateSsoConnectionByUrl: () => {
|
|
4
4
|
mutate: import("./useMutateWithToast").MutationFn<B2BSSOSAMLUpdateConnectionByURLOptions, void>;
|
|
@@ -12,8 +12,5 @@ export declare const useDeleteSsoConnectionCert: () => {
|
|
|
12
12
|
mutate: import("./useMutateWithToast").MutationFn<B2BSSOSAMLDeleteVerificationCertificateOptions, void>;
|
|
13
13
|
};
|
|
14
14
|
export declare const useMutateSsoConnection: <TConnectionType extends ConnectionType>(connectionType: TConnectionType) => {
|
|
15
|
-
mutate: import("./useMutateWithToast").MutationFn<TConnectionType extends "saml" ? B2BSSOSAMLUpdateConnectionOptions : B2BSSOOIDCUpdateConnectionOptions, void>;
|
|
16
|
-
};
|
|
17
|
-
export declare const useMutateSamlConnection: () => {
|
|
18
|
-
mutate: import("./useMutateWithToast").MutationFn<B2BSSOSAMLUpdateConnectionOptions, void>;
|
|
15
|
+
mutate: import("./useMutateWithToast").MutationFn<TConnectionType extends "saml" ? B2BSSOSAMLUpdateConnectionOptions : TConnectionType extends "oidc" ? B2BSSOOIDCUpdateConnectionOptions : B2BSSOUpdateExternalConnectionOptions, void>;
|
|
19
16
|
};
|