From fbcfe4b4d19122acd6683e3cb0c16e42b0e29a7f Mon Sep 17 00:00:00 2001 From: Darya Umrikhina Date: Fri, 5 Jul 2024 16:35:47 +0700 Subject: [PATCH] Login:Src:Types: add TError and TConfirmRouteContext types --- packages/login/src/types/index.ts | 46 +++++++++++++++++++++++++++++-- 1 file changed, 44 insertions(+), 2 deletions(-) diff --git a/packages/login/src/types/index.ts b/packages/login/src/types/index.ts index 66c7035bab..63db1b1f04 100644 --- a/packages/login/src/types/index.ts +++ b/packages/login/src/types/index.ts @@ -30,27 +30,69 @@ import { TGetColorTheme, TGetSsoSettings, TPasswordHash, + TPasswordSettings, TSettings, TThirdPartyProvider, } from "@docspace/shared/api/settings/types"; import { TValidate } from "@docspace/shared/components/email-input/EmailInput.types"; import { RecaptchaType, ThemeKeys } from "@docspace/shared/enums"; +import { Nullable } from "@docspace/shared/types"; import { ReactNode } from "react"; +export type TError = + | { + response?: { + status?: number | string; + data?: { + error?: { + message: string; + }; + }; + }; + statusText?: string; + message?: string; + } + | string; + +export type WithLoaderProps = { + isLoaded: boolean; + setIsLoaded(): void; + passwordSettings: Nullable; + capabilities: Nullable; + thirdPartyProvider: Nullable; +}; + export type TDataContext = { settings?: TSettings; colorTheme?: TGetColorTheme; systemTheme?: ThemeKeys; }; +export type TConfirmRouteContext = { + linkData: { + confirmHeader?: string; + key?: string; + emplType?: string; + email?: string; + uid?: string; + type?: string; + first?: string; + roomId?: string; + }; + roomData: { + roomId?: string; + title?: string; + }; +}; + export type TConfirmLinkParams = { key: string; emplType?: string; email: string; uid?: string; type?: string; - first: string; - roomId: string; + first?: string; + roomId?: string; }; export type TConfirmLinkResult = {