@databiosphere/findable-ui 50.8.0 → 51.0.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/lib/auth/constants/auth.d.ts +5 -0
- package/lib/{providers/authentication/auth/constants.js → auth/constants/auth.js} +4 -1
- package/lib/auth/constants/authentication.d.ts +5 -0
- package/lib/{providers/authentication/authentication/constants.js → auth/constants/authentication.js} +4 -1
- package/lib/auth/constants/credentials.d.ts +5 -0
- package/lib/{providers/authentication/credentials/constants.js → auth/constants/credentials.js} +3 -0
- package/lib/auth/constants/token.d.ts +5 -0
- package/lib/{providers/authentication/token/constants.js → auth/constants/token.js} +3 -0
- package/lib/{providers/authentication/auth/context.d.ts → auth/contexts/auth.d.ts} +4 -1
- package/lib/{providers/authentication/auth/context.js → auth/contexts/auth.js} +4 -1
- package/lib/auth/contexts/authentication.d.ts +5 -0
- package/lib/{providers/authentication/authentication/context.js → auth/contexts/authentication.js} +4 -1
- package/lib/auth/contexts/credentials.d.ts +5 -0
- package/lib/{providers/authentication/credentials/context.js → auth/contexts/credentials.js} +4 -1
- package/lib/{providers/authentication/auth/dispatch.d.ts → auth/dispatch/auth.d.ts} +2 -2
- package/lib/{providers/authentication/auth/dispatch.js → auth/dispatch/auth.js} +2 -2
- package/lib/{providers/authentication/authentication/dispatch.d.ts → auth/dispatch/authentication.d.ts} +2 -2
- package/lib/{providers/authentication/authentication/dispatch.js → auth/dispatch/authentication.js} +2 -2
- package/lib/auth/dispatch/credentials.d.ts +12 -0
- package/lib/{providers/authentication/credentials/dispatch.js → auth/dispatch/credentials.js} +3 -3
- package/lib/{providers/authentication/token/dispatch.d.ts → auth/dispatch/token.d.ts} +3 -3
- package/lib/{providers/authentication/token/dispatch.js → auth/dispatch/token.js} +3 -3
- package/lib/{providers/authentication/auth/hook.d.ts → auth/hooks/useAuth.d.ts} +1 -1
- package/lib/{providers/authentication/auth/hook.js → auth/hooks/useAuth.js} +1 -1
- package/lib/auth/hooks/useAuthReducer.d.ts +7 -0
- package/lib/auth/hooks/useAuthReducer.js +13 -0
- package/lib/{providers/authentication/authentication/hook.d.ts → auth/hooks/useAuthentication.d.ts} +1 -1
- package/lib/{providers/authentication/authentication/hook.js → auth/hooks/useAuthentication.js} +1 -1
- package/lib/auth/hooks/useAuthenticationReducer.d.ts +7 -0
- package/lib/auth/hooks/useAuthenticationReducer.js +13 -0
- package/lib/{providers/authentication/credentials/hook.d.ts → auth/hooks/useCredentials.d.ts} +1 -1
- package/lib/{providers/authentication/credentials/hook.js → auth/hooks/useCredentials.js} +1 -1
- package/lib/auth/hooks/useCredentialsReducer.d.ts +6 -0
- package/lib/{hooks/authentication/credentials → auth/hooks}/useCredentialsReducer.js +6 -2
- package/lib/{providers/authentication/auth/reducer.d.ts → auth/reducers/auth.d.ts} +1 -1
- package/lib/{providers/authentication/auth/reducer.js → auth/reducers/auth.js} +13 -2
- package/lib/{providers/authentication/authentication/reducer.d.ts → auth/reducers/authentication.d.ts} +1 -1
- package/lib/{providers/authentication/authentication/reducer.js → auth/reducers/authentication.js} +13 -2
- package/lib/{providers/authentication/credentials/reducer.d.ts → auth/reducers/credentials.d.ts} +1 -1
- package/lib/{providers/authentication/credentials/reducer.js → auth/reducers/credentials.js} +14 -3
- package/lib/{providers/authentication/token/reducer.d.ts → auth/reducers/token.d.ts} +1 -1
- package/lib/{providers/authentication/token/reducer.js → auth/reducers/token.js} +2 -2
- package/lib/{providers/authentication/auth/types.d.ts → auth/types/auth.d.ts} +41 -5
- package/lib/{providers/authentication/auth/types.js → auth/types/auth.js} +6 -0
- package/lib/{providers/authentication/authentication/types.d.ts → auth/types/authentication.d.ts} +46 -4
- package/lib/{providers/authentication/authentication/types.js → auth/types/authentication.js} +6 -0
- package/lib/auth/types/common.d.ts +4 -0
- package/lib/{providers/authentication/credentials/types.d.ts → auth/types/credentials.d.ts} +31 -4
- package/lib/{providers/authentication/credentials/types.js → auth/types/credentials.js} +3 -0
- package/lib/auth/types/loginProvider.d.ts +11 -0
- package/lib/{providers/authentication/token/types.d.ts → auth/types/token.d.ts} +29 -5
- package/lib/{providers/authentication/token/types.js → auth/types/token.js} +3 -0
- package/lib/common/chart/sort/utils.d.ts +1 -1
- package/lib/components/ComponentCreator/ComponentCreator.js +1 -1
- package/lib/components/ComponentCreator/components/RenderComponent/renderComponent.d.ts +1 -1
- package/lib/components/ErrorBoundary/errorBoundary.d.ts +1 -1
- package/lib/components/Export/components/DownloadCurlCommand/components/DownloadCurlCommandForm/downloadCurlCommandForm.d.ts +1 -1
- package/lib/components/Export/components/DownloadCurlCommand/components/DownloadCurlCommandNotStarted/downloadCurlCommandNotStarted.d.ts +1 -1
- package/lib/components/Export/components/DownloadCurlCommand/components/DownloadCurlCommandReady/downloadCurlCommandReady.d.ts +1 -1
- package/lib/components/Export/components/DownloadCurlCommand/downloadCurlCommand.d.ts +1 -1
- package/lib/components/Export/components/ExportForm/components/ExportButton/exportButton.d.ts +1 -1
- package/lib/components/Export/components/ExportForm/components/ExportExecutionEnvironmentForm/exportExecutionEnvironmentForm.d.ts +1 -1
- package/lib/components/Export/components/ExportForm/exportForm.d.ts +1 -1
- package/lib/components/Export/components/ExportToTerra/components/ExportToTerraForm/exportToTerraForm.d.ts +1 -1
- package/lib/components/Export/components/ExportToTerra/components/ExportToTerraNotStarted/exportToTerraNotStarted.d.ts +1 -1
- package/lib/components/Export/components/ExportToTerra/components/ExportToTerraReady/exportToTerraReady.d.ts +1 -1
- package/lib/components/Export/components/ExportToTerra/components/ExportToTerraReady/exportToTerraReady.js +2 -2
- package/lib/components/Export/components/ExportToTerra/components/TerraSetUpForm/components/FormStep/components/AcceptTerraTOS/acceptTerraTOS.js +1 -1
- package/lib/components/Export/components/ExportToTerra/components/TerraSetUpForm/terraSetUpForm.js +2 -2
- package/lib/components/Export/components/ExportToTerra/exportToTerra.d.ts +1 -1
- package/lib/components/Export/components/ManifestDownload/components/ManifestDownloadEntity/components/FileManifestDownload/fileManifestDownload.js +1 -1
- package/lib/components/Export/components/ManifestDownload/components/ManifestDownloadNotStarted/manifestDownloadNotStarted.d.ts +1 -1
- package/lib/components/Export/components/ManifestDownload/components/ManifestDownloadReady/manifestDownloadReady.d.ts +1 -1
- package/lib/components/Export/components/ManifestDownload/manifestDownload.d.ts +1 -1
- package/lib/components/Filter/components/VariableSizeListItem/variableSizeListItem.d.ts +1 -1
- package/lib/components/Filter/components/adapters/tanstack/ColumnFiltersAdapter/types.d.ts +1 -1
- package/lib/components/Layout/components/Header/components/Content/components/Actions/components/Authentication/authentication.d.ts +1 -1
- package/lib/components/Layout/components/Header/components/Content/components/Actions/components/Authentication/components/AuthenticationMenu/authenticationMenu.d.ts +1 -1
- package/lib/components/Layout/components/Header/components/Content/components/Actions/components/Authentication/components/AuthenticationMenu/authenticationMenu.js +1 -1
- package/lib/components/Layout/components/Header/components/Content/components/Actions/components/Search/search.d.ts +1 -1
- package/lib/components/Login/components/Buttons/buttons.d.ts +1 -1
- package/lib/components/Login/components/Buttons/buttons.js +1 -1
- package/lib/components/Login/components/Buttons/types.d.ts +5 -5
- package/lib/components/Login/hooks/useUserLogin/types.d.ts +1 -1
- package/lib/components/Login/hooks/useUserLogin/useUserLogin.js +1 -1
- package/lib/components/Login/login.d.ts +1 -1
- package/lib/components/Login/login.js +1 -1
- package/lib/components/Login/types.d.ts +3 -4
- package/lib/components/MarkdownRenderer/components/Anchor/anchor.d.ts +1 -1
- package/lib/components/MarkdownRenderer/components/Table/table.d.ts +1 -1
- package/lib/components/MarkdownRenderer/markdownRenderer.js +2 -2
- package/lib/components/MarkdownRenderer/types.d.ts +1 -1
- package/lib/components/Support/components/SupportRequest/components/Dialog/dialog.d.ts +1 -1
- package/lib/components/Support/components/SupportRequest/components/SupportRequestForm/supportRequestForm.d.ts +1 -1
- package/lib/components/common/Button/components/CallToActionButton/callToActionButton.d.ts +1 -1
- package/lib/components/common/Chip/components/Beta/beta.styles.js +1 -1
- package/lib/components/common/IconBadge/iconBadge.d.ts +1 -1
- package/lib/components/common/IconButton/iconButton.d.ts +1 -1
- package/lib/components/common/Input/input.d.ts +1 -1
- package/lib/components/common/KeyValuePairs/keyValuePairs.d.ts +1 -1
- package/lib/components/common/Progress/components/CircularProgress/circularProgress.d.ts +1 -1
- package/lib/components/common/Stack/components/Divider/divider.d.ts +1 -1
- package/lib/components/common/StatusIcon/statusIcon.d.ts +1 -1
- package/lib/config/entities.d.ts +4 -4
- package/lib/google/config.d.ts +7 -0
- package/lib/google/config.js +14 -0
- package/lib/google/constants.d.ts +16 -0
- package/lib/google/constants.js +24 -0
- package/lib/google/hooks/useGoogleSignInService.d.ts +8 -0
- package/lib/{providers/googleSignInAuthentication → google}/hooks/useGoogleSignInService.js +7 -2
- package/lib/{hooks/authentication/token → google/hooks}/useTokenReducer.d.ts +2 -1
- package/lib/{hooks/authentication/token → google/hooks}/useTokenReducer.js +3 -2
- package/lib/google/provider.d.ts +11 -0
- package/lib/{providers/googleSignInAuthentication → google}/provider.js +19 -11
- package/lib/google/service.d.ts +18 -0
- package/lib/{providers/googleSignInAuthentication/service → google}/service.js +20 -9
- package/lib/google/session-controller.d.ts +11 -0
- package/lib/{components/Authentication/components/SessionController/components/GoogleSessionController/SessionController.js → google/session-controller.js} +14 -6
- package/lib/google/types.d.ts +58 -0
- package/lib/{providers/authentication/authentication/utils.d.ts → google/utils/auth.d.ts} +6 -0
- package/lib/{providers/authentication/authentication/utils.js → google/utils/auth.js} +10 -0
- package/lib/{providers/googleSignInAuthentication/profile/utils.d.ts → google/utils/profile.d.ts} +2 -2
- package/lib/{providers/googleSignInAuthentication/profile/utils.js → google/utils/profile.js} +1 -1
- package/lib/hooks/authentication/profile/types.d.ts +1 -1
- package/lib/hooks/authentication/profile/useProfile.js +3 -3
- package/lib/hooks/authentication/providers/types.d.ts +1 -1
- package/lib/hooks/authentication/session/useSessionActive.d.ts +2 -2
- package/lib/hooks/authentication/session/useSessionActive.js +2 -2
- package/lib/hooks/authentication/terra/useAuthenticationForm.js +1 -1
- package/lib/hooks/authentication/terra/useAuthenticationNIHExpiry.js +2 -2
- package/lib/hooks/authentication/token/types.d.ts +1 -1
- package/lib/hooks/authentication/token/useToken.js +1 -1
- package/lib/hooks/useEntityList.js +10 -0
- package/lib/{components/Authentication/components/SessionController/components/NextSessionController → nextauth}/constants.d.ts +8 -2
- package/lib/{components/Authentication/components/SessionController/components/NextSessionController → nextauth}/constants.js +8 -2
- package/lib/nextauth/hooks/useNextAuthService.d.ts +6 -0
- package/lib/{providers/nextAuthAuthentication → nextauth}/hooks/useNextAuthService.js +7 -3
- package/lib/nextauth/provider.d.ts +12 -0
- package/lib/{providers/nextAuthAuthentication → nextauth}/provider.js +16 -7
- package/lib/nextauth/service.d.ts +20 -0
- package/lib/{providers/nextAuthAuthentication/service → nextauth}/service.js +14 -0
- package/lib/nextauth/session-controller.d.ts +10 -0
- package/lib/{components/Authentication/components/SessionController/components/NextSessionController/SessionController.js → nextauth/session-controller.js} +11 -4
- package/lib/{providers/nextAuthAuthentication → nextauth}/types.d.ts +9 -0
- package/lib/{components/Authentication/components/SessionController/components/NextSessionController → nextauth}/utils.d.ts +2 -2
- package/lib/{components/Authentication/components/SessionController/components/NextSessionController → nextauth}/utils.js +2 -2
- package/lib/providers/exploreState.js +1 -10
- package/lib/providers/loginGuard/provider.js +1 -1
- package/lib/terra/constants.d.ts +28 -0
- package/lib/{providers/authentication/terra/hooks/common → terra}/constants.js +16 -1
- package/lib/terra/context.d.ts +5 -0
- package/lib/{providers/authentication/terra → terra}/context.js +4 -1
- package/lib/{providers/authentication/terra → terra}/hooks/useFetchProfiles.d.ts +12 -4
- package/lib/{providers/authentication/terra → terra}/hooks/useFetchProfiles.js +9 -4
- package/lib/{providers/authentication/terra → terra}/hooks/useFetchTerraNIHProfile.d.ts +2 -6
- package/lib/{providers/authentication/terra → terra}/hooks/useFetchTerraNIHProfile.js +4 -5
- package/lib/terra/hooks/useFetchTerraProfile.d.ts +10 -0
- package/lib/{providers/authentication/terra → terra}/hooks/useFetchTerraProfile.js +4 -5
- package/lib/{providers/authentication/terra → terra}/hooks/useFetchTerraTermsOfService.d.ts +2 -7
- package/lib/{providers/authentication/terra → terra}/hooks/useFetchTerraTermsOfService.js +4 -5
- package/lib/{providers/authentication/terra/hook.d.ts → terra/hooks/useTerraProfile.d.ts} +1 -1
- package/lib/{providers/authentication/terra/hook.js → terra/hooks/useTerraProfile.js} +1 -1
- package/lib/terra/provider.d.ts +10 -0
- package/lib/{providers/authentication/terra → terra}/provider.js +13 -6
- package/lib/terra/types/common.d.ts +50 -0
- package/lib/terra/types/common.js +19 -0
- package/lib/terra/types/context.d.ts +12 -0
- package/lib/terra/types/terra-nih.d.ts +8 -0
- package/lib/{providers/authentication/terra/hooks/useFetchTerraProfile.d.ts → terra/types/terra-profile.d.ts} +9 -8
- package/lib/terra/types/terra-tos.d.ts +9 -0
- package/lib/terra/types/terra-tos.js +1 -0
- package/lib/terra/utils.d.ts +47 -0
- package/lib/{providers/authentication/terra → terra}/utils.js +45 -2
- package/lib/utils/mdx/plugins/rehypeSlug.d.ts +1 -1
- package/lib/views/ExploreView/entityList/filters/components/ToggleButtonGroup/toggleButtonGroup.js +2 -3
- package/lib/views/ExploreView/entityList/filters/components/ToggleButtonGroup/toggleButtonGroup.styles.js +1 -1
- package/lib/views/ExploreView/exploreView.js +2 -2
- package/lib/views/LoginView/loginView.d.ts +2 -2
- package/lib/views/ResearchView/assistant/components/Drawer/drawer.js +2 -2
- package/lib/views/ResearchView/assistant/components/Input/input.styles.js +1 -1
- package/lib/views/ResearchView/assistant/components/Input/stories/input.stories.js +1 -1
- package/lib/views/ResearchView/assistant/components/Messages/components/PromptMessage/components/Chips/chips.styles.js +1 -1
- package/lib/views/ResearchView/assistant/components/Messages/messages.js +1 -1
- package/lib/views/ResearchView/assistant/components/Messages/messages.styles.js +1 -1
- package/lib/views/ResearchView/assistant/components/Messages/stories/args.js +1 -1
- package/lib/views/ResearchView/assistant/components/Messages/stories/messages.stories.js +1 -1
- package/lib/views/ResearchView/assistant/components/ToggleButtonGroup/stories/toggleButtonGroup.stories.js +1 -1
- package/lib/views/ResearchView/assistant/components/ToggleButtonGroup/toggleButtonGroup.js +2 -2
- package/lib/views/ResearchView/assistant/stories/assistant.stories.js +1 -1
- package/lib/views/ResearchView/state/query/hooks/UseSubmit/hook.js +2 -2
- package/package.json +15 -1
- package/types/data-explorer-ui.d.ts +12 -12
- package/lib/components/Authentication/components/SessionController/components/GoogleSessionController/SessionController.d.ts +0 -3
- package/lib/components/Authentication/components/SessionController/components/GoogleSessionController/types.d.ts +0 -6
- package/lib/components/Authentication/components/SessionController/components/NextSessionController/SessionController.d.ts +0 -3
- package/lib/components/Authentication/components/SessionController/components/NextSessionController/types.d.ts +0 -4
- package/lib/hooks/authentication/auth/useAuthReducer.d.ts +0 -2
- package/lib/hooks/authentication/auth/useAuthReducer.js +0 -8
- package/lib/hooks/authentication/authentication/useAuthenticationReducer.d.ts +0 -2
- package/lib/hooks/authentication/authentication/useAuthenticationReducer.js +0 -8
- package/lib/hooks/authentication/credentials/useCredentialsReducer.d.ts +0 -2
- package/lib/providers/authentication/auth/actions.d.ts +0 -8
- package/lib/providers/authentication/auth/actions.js +0 -12
- package/lib/providers/authentication/auth/constants.d.ts +0 -2
- package/lib/providers/authentication/authentication/actions.d.ts +0 -8
- package/lib/providers/authentication/authentication/actions.js +0 -12
- package/lib/providers/authentication/authentication/constants.d.ts +0 -2
- package/lib/providers/authentication/authentication/context.d.ts +0 -2
- package/lib/providers/authentication/common/types.d.ts +0 -1
- package/lib/providers/authentication/credentials/actions.d.ts +0 -8
- package/lib/providers/authentication/credentials/actions.js +0 -12
- package/lib/providers/authentication/credentials/constants.d.ts +0 -2
- package/lib/providers/authentication/credentials/context.d.ts +0 -2
- package/lib/providers/authentication/credentials/dispatch.d.ts +0 -12
- package/lib/providers/authentication/terra/context.d.ts +0 -2
- package/lib/providers/authentication/terra/hooks/common/constants.d.ts +0 -6
- package/lib/providers/authentication/terra/hooks/common/entities.d.ts +0 -21
- package/lib/providers/authentication/terra/hooks/common/entities.js +0 -7
- package/lib/providers/authentication/terra/hooks/common/utils.d.ts +0 -15
- package/lib/providers/authentication/terra/hooks/common/utils.js +0 -25
- package/lib/providers/authentication/terra/hooks/utils.d.ts +0 -16
- package/lib/providers/authentication/terra/hooks/utils.js +0 -19
- package/lib/providers/authentication/terra/provider.d.ts +0 -3
- package/lib/providers/authentication/terra/types.d.ts +0 -20
- package/lib/providers/authentication/terra/types.js +0 -6
- package/lib/providers/authentication/terra/utils.d.ts +0 -19
- package/lib/providers/authentication/token/constants.d.ts +0 -2
- package/lib/providers/googleSignInAuthentication/common/types.d.ts +0 -17
- package/lib/providers/googleSignInAuthentication/constants.d.ts +0 -4
- package/lib/providers/googleSignInAuthentication/constants.js +0 -12
- package/lib/providers/googleSignInAuthentication/hooks/useGoogleSignInService.d.ts +0 -3
- package/lib/providers/googleSignInAuthentication/profile/types.d.ts +0 -14
- package/lib/providers/googleSignInAuthentication/provider.d.ts +0 -3
- package/lib/providers/googleSignInAuthentication/service/constants.d.ts +0 -4
- package/lib/providers/googleSignInAuthentication/service/constants.js +0 -9
- package/lib/providers/googleSignInAuthentication/service/service.d.ts +0 -6
- package/lib/providers/googleSignInAuthentication/types.d.ts +0 -6
- package/lib/providers/nextAuthAuthentication/hooks/useNextAuthService.d.ts +0 -2
- package/lib/providers/nextAuthAuthentication/provider.d.ts +0 -3
- package/lib/providers/nextAuthAuthentication/service/service.d.ts +0 -6
- /package/lib/{hooks/authentication/session → auth/hooks}/useSessionIdleTimer.d.ts +0 -0
- /package/lib/{hooks/authentication/session → auth/hooks}/useSessionIdleTimer.js +0 -0
- /package/lib/{components/Authentication/components/SessionController/components/GoogleSessionController/types.js → auth/types/common.js} +0 -0
- /package/lib/{components/Authentication/components/SessionController/components/NextSessionController/types.js → auth/types/loginProvider.js} +0 -0
- /package/lib/{providers/authentication/common/utils.d.ts → auth/utils/initializer.d.ts} +0 -0
- /package/lib/{providers/authentication/common/utils.js → auth/utils/initializer.js} +0 -0
- /package/lib/{providers/authentication/common → google}/types.js +0 -0
- /package/lib/{providers/googleSignInAuthentication/common → nextauth}/types.js +0 -0
- /package/lib/{providers/googleSignInAuthentication/profile/types.js → terra/types/context.js} +0 -0
- /package/lib/{providers/googleSignInAuthentication/types.js → terra/types/terra-nih.js} +0 -0
- /package/lib/{providers/nextAuthAuthentication/types.js → terra/types/terra-profile.js} +0 -0
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { AuthService } from "../../../../config/entities";
|
|
2
|
-
/**
|
|
3
|
-
* Returns service endpoint.
|
|
4
|
-
* @param services - Services.
|
|
5
|
-
* @param serviceId - Service ID.
|
|
6
|
-
* @param endpointId - Endpoint ID.
|
|
7
|
-
* @returns Service endpoint.
|
|
8
|
-
*/
|
|
9
|
-
export declare function getServiceEndpoint(services: AuthService[] | undefined, serviceId: string, endpointId: string): string | undefined;
|
|
10
|
-
/**
|
|
11
|
-
* Find a service by service ID.
|
|
12
|
-
* @param services - Services.
|
|
13
|
-
* @param serviceId - Service ID.
|
|
14
|
-
* @returns Service.
|
|
15
|
-
*/
|
|
16
|
-
export declare function findService(services: AuthService[] | undefined, serviceId: string): AuthService | undefined;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Returns service endpoint.
|
|
3
|
-
* @param services - Services.
|
|
4
|
-
* @param serviceId - Service ID.
|
|
5
|
-
* @param endpointId - Endpoint ID.
|
|
6
|
-
* @returns Service endpoint.
|
|
7
|
-
*/
|
|
8
|
-
export function getServiceEndpoint(services, serviceId, endpointId) {
|
|
9
|
-
return findService(services, serviceId)?.endpoint[endpointId];
|
|
10
|
-
}
|
|
11
|
-
/**
|
|
12
|
-
* Find a service by service ID.
|
|
13
|
-
* @param services - Services.
|
|
14
|
-
* @param serviceId - Service ID.
|
|
15
|
-
* @returns Service.
|
|
16
|
-
*/
|
|
17
|
-
export function findService(services, serviceId) {
|
|
18
|
-
return services?.find(({ id }) => id === serviceId);
|
|
19
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { ReactNode } from "react";
|
|
2
|
-
import { TokenState } from "../token/types";
|
|
3
|
-
import { LoginStatus } from "./hooks/common/entities";
|
|
4
|
-
import { TerraNIHResponse } from "./hooks/useFetchTerraNIHProfile";
|
|
5
|
-
import { TerraResponse } from "./hooks/useFetchTerraProfile";
|
|
6
|
-
import { TerraTermsOfServiceResponse } from "./hooks/useFetchTerraTermsOfService";
|
|
7
|
-
export declare enum TERRA_PROFILE_STATUS {
|
|
8
|
-
AUTHENTICATED = "AUTHENTICATED",
|
|
9
|
-
PENDING = "PENDING",
|
|
10
|
-
UNAUTHENTICATED = "UNAUTHENTICATED"
|
|
11
|
-
}
|
|
12
|
-
export interface TerraProfileProviderProps {
|
|
13
|
-
children: ReactNode;
|
|
14
|
-
token: TokenState["token"];
|
|
15
|
-
}
|
|
16
|
-
export interface TerraProfileContextProps {
|
|
17
|
-
terraNIHProfileLoginStatus: LoginStatus<TerraNIHResponse>;
|
|
18
|
-
terraProfileLoginStatus: LoginStatus<TerraResponse>;
|
|
19
|
-
terraTOSLoginStatus: LoginStatus<TerraTermsOfServiceResponse>;
|
|
20
|
-
}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export var TERRA_PROFILE_STATUS;
|
|
2
|
-
(function (TERRA_PROFILE_STATUS) {
|
|
3
|
-
TERRA_PROFILE_STATUS["AUTHENTICATED"] = "AUTHENTICATED";
|
|
4
|
-
TERRA_PROFILE_STATUS["PENDING"] = "PENDING";
|
|
5
|
-
TERRA_PROFILE_STATUS["UNAUTHENTICATED"] = "UNAUTHENTICATED";
|
|
6
|
-
})(TERRA_PROFILE_STATUS || (TERRA_PROFILE_STATUS = {}));
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { LoginStatus } from "./hooks/common/entities";
|
|
2
|
-
import { TerraNIHResponse } from "./hooks/useFetchTerraNIHProfile";
|
|
3
|
-
import { TerraResponse } from "./hooks/useFetchTerraProfile";
|
|
4
|
-
import { TerraTermsOfServiceResponse } from "./hooks/useFetchTerraTermsOfService";
|
|
5
|
-
import { TERRA_PROFILE_STATUS } from "./types";
|
|
6
|
-
/**
|
|
7
|
-
* Determines the status of a user based on authentication and Terra service statuses.
|
|
8
|
-
* **Logic:**
|
|
9
|
-
* - **Pending** if the user is not authenticated.
|
|
10
|
-
* - **Pending** if any supported Terra service request is not started or pending.
|
|
11
|
-
* - **Unauthenticated** if the Terra profile is supported but the Terms of Service have not been accepted.
|
|
12
|
-
* - **Authenticated** in all other cases.
|
|
13
|
-
* @param isUserAuthenticated - User authentication status.
|
|
14
|
-
* @param terraNIHProfileLoginStatus - Terra NIH profile login status.
|
|
15
|
-
* @param terraProfileLoginStatus - Terra profile login status.
|
|
16
|
-
* @param terraTOSLoginStatus - Terra terms of service login status.
|
|
17
|
-
* @returns Terra profile status.
|
|
18
|
-
*/
|
|
19
|
-
export declare function getProfileStatus(isUserAuthenticated: boolean, terraNIHProfileLoginStatus: LoginStatus<TerraNIHResponse>, terraProfileLoginStatus: LoginStatus<TerraResponse>, terraTOSLoginStatus: LoginStatus<TerraTermsOfServiceResponse>): TERRA_PROFILE_STATUS;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { Dispatch } from "react";
|
|
2
|
-
import { AuthAction, AuthContextProps } from "../../authentication/auth/types";
|
|
3
|
-
import { AuthenticationAction, AuthenticationContextProps } from "../../authentication/authentication/types";
|
|
4
|
-
import { CredentialsAction, CredentialsContextProps } from "../../authentication/credentials/types";
|
|
5
|
-
import { TokenAction, TokenContextProps } from "../../authentication/token/types";
|
|
6
|
-
export interface SessionReducer {
|
|
7
|
-
authenticationReducer: AuthenticationContextProps;
|
|
8
|
-
authReducer: Omit<AuthContextProps, "service">;
|
|
9
|
-
credentialsReducer: CredentialsContextProps;
|
|
10
|
-
tokenReducer: TokenContextProps;
|
|
11
|
-
}
|
|
12
|
-
export interface SessionDispatch {
|
|
13
|
-
authDispatch: Dispatch<AuthAction> | null;
|
|
14
|
-
authenticationDispatch: Dispatch<AuthenticationAction> | null;
|
|
15
|
-
credentialsDispatch: Dispatch<CredentialsAction> | null;
|
|
16
|
-
tokenDispatch: Dispatch<TokenAction> | null;
|
|
17
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { DEFAULT_AUTH_STATE } from "../authentication/auth/constants";
|
|
2
|
-
import { AUTH_STATUS } from "../authentication/auth/types";
|
|
3
|
-
import { DEFAULT_AUTHENTICATION_STATE } from "../authentication/authentication/constants";
|
|
4
|
-
import { AUTHENTICATION_STATUS, } from "../authentication/authentication/types";
|
|
5
|
-
export const AUTH_STATE = {
|
|
6
|
-
...DEFAULT_AUTH_STATE,
|
|
7
|
-
status: AUTH_STATUS.SETTLED,
|
|
8
|
-
};
|
|
9
|
-
export const AUTHENTICATION_STATE = {
|
|
10
|
-
...DEFAULT_AUTHENTICATION_STATE,
|
|
11
|
-
status: AUTHENTICATION_STATUS.SETTLED,
|
|
12
|
-
};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
export interface GoogleProfile {
|
|
2
|
-
email: string;
|
|
3
|
-
email_verified: boolean;
|
|
4
|
-
family_name: string;
|
|
5
|
-
given_name: string;
|
|
6
|
-
hd: string;
|
|
7
|
-
locale: string;
|
|
8
|
-
name: string;
|
|
9
|
-
picture: string;
|
|
10
|
-
sub: string;
|
|
11
|
-
}
|
|
12
|
-
export interface TokenSetParameters {
|
|
13
|
-
access_token: string;
|
|
14
|
-
}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { OAuthProvider } from "../../../config/entities";
|
|
2
|
-
import { GoogleProfile } from "../profile/types";
|
|
3
|
-
export declare const GOOGLE_SIGN_IN_PROVIDER_ID = "google";
|
|
4
|
-
export declare const GOOGLE_SIGN_IN_PROVIDER: Pick<OAuthProvider<GoogleProfile>, "icon" | "id" | "name" | "profile">;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { GoogleIcon } from "../../../components/common/CustomIcon/components/GoogleIcon/googleIcon";
|
|
2
|
-
import { mapProfile } from "../profile/utils";
|
|
3
|
-
export const GOOGLE_SIGN_IN_PROVIDER_ID = "google";
|
|
4
|
-
export const GOOGLE_SIGN_IN_PROVIDER = {
|
|
5
|
-
icon: GoogleIcon({}),
|
|
6
|
-
id: GOOGLE_SIGN_IN_PROVIDER_ID,
|
|
7
|
-
name: "Google",
|
|
8
|
-
profile: mapProfile,
|
|
9
|
-
};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { OAuthProvider } from "../../../config/entities";
|
|
2
|
-
import { SessionDispatch } from "../common/types";
|
|
3
|
-
export declare const service: {
|
|
4
|
-
login: (provider: OAuthProvider, dispatch: Pick<SessionDispatch, "authDispatch" | "authenticationDispatch" | "tokenDispatch">) => void;
|
|
5
|
-
logout: (dispatch: SessionDispatch) => void;
|
|
6
|
-
};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { SignInOptions, SignOutParams } from "next-auth/react";
|
|
2
|
-
import { ProviderId } from "../../authentication/common/types";
|
|
3
|
-
export declare const service: {
|
|
4
|
-
login: (providerId: ProviderId, options?: SignInOptions) => void;
|
|
5
|
-
logout: (options?: SignOutParams<boolean>) => void;
|
|
6
|
-
};
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/lib/{providers/googleSignInAuthentication/profile/types.js → terra/types/context.js}
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|