@stytch/vanilla-js 5.3.1 → 5.4.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.
@@ -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;
@@ -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: () => import("swr/_internal").SWRResponse<AdminPortalConfigResponse, any, any>;
16
- export {};
15
+ export declare const useAdminPortalConfig: ({ shouldFetch }: {
16
+ shouldFetch: boolean;
17
+ }) => import("swr/_internal").SWRResponse<AdminPortalConfigResponse, any, any>;