DocSpace-client/packages/login/index.d.ts

141 lines
2.9 KiB
TypeScript
Raw Normal View History

2022-08-04 09:14:55 +00:00
import { Request } from "express";
type WindowI18nType = {
inLoad: object[];
loaded: {
[key: string]: {
data: {
[key: string]: string | undefined;
};
namespaces?: string;
};
};
};
2022-08-04 09:14:55 +00:00
declare global {
interface Window {
authCallback?: (profile: string) => {};
2022-08-11 08:30:43 +00:00
__ASC_INITIAL_LOGIN_STATE__: IInitialState;
initialI18nStoreASC: IInitialI18nStoreASC;
2022-08-11 08:30:43 +00:00
initialLanguage: string;
i18n: WindowI18nType;
2022-08-12 19:34:47 +00:00
[key: string]: object;
2022-08-04 09:14:55 +00:00
}
type MatchType = {
confirmedEmail?: string;
2022-09-01 11:57:32 +00:00
message?: string;
};
2022-08-17 07:24:19 +00:00
type PasswordHashType = {
iterations: number;
salt: string;
size: number;
};
interface IEmailValid {
value: string;
isValid: boolean;
errors: string[]; // TODO: check type
}
interface IPortalSettings {
2022-08-08 15:36:05 +00:00
culture: string;
debugInfo: boolean;
docSpace: boolean;
enableAdmMess: boolean;
enabledJoin: boolean;
greetingSettings: string;
ownerId: string;
2022-08-17 07:24:19 +00:00
passwordHash: PasswordHashType;
2022-08-08 15:36:05 +00:00
personal: boolean;
tenantAlias: string;
tenantStatus: number;
thirdpartyEnable: boolean;
trustedDomainsType: number;
utcHoursOffset: number;
utcOffset: string;
version: string;
}
2022-08-12 19:34:47 +00:00
interface IBuildInfo {
2022-08-08 15:36:05 +00:00
communityServer: string;
documentServer: string;
mailServer: string;
}
2022-08-12 19:34:47 +00:00
interface IProvider {
2022-08-08 15:36:05 +00:00
linked: boolean;
provider: string;
url: string;
}
type ProvidersType = IProvider[];
2022-08-12 19:34:47 +00:00
interface ICapabilities {
2022-08-08 15:36:05 +00:00
ldapEnabled: boolean;
providers: string[];
ssoLabel: string;
ssoUrl: string;
}
2022-08-31 14:32:33 +00:00
interface ITheme {
id: number;
accentColor: string;
buttonsMain: string;
textColor: string;
}
interface IThemes {
limit: number;
selected: number;
themes: ITheme[];
}
2022-08-08 15:36:05 +00:00
interface IInitialState {
portalSettings: IPortalSettings;
buildInfo: IBuildInfo;
providers: ProvidersType;
capabilities: ICapabilities;
match: MatchType;
2022-08-31 14:32:33 +00:00
currentColorScheme: ITheme;
2022-08-04 09:14:55 +00:00
}
interface DevRequest {
assets: assetsType;
2022-08-04 09:14:55 +00:00
}
var IS_DEVELOPMENT: boolean;
var PORT: number;
var IS_PERSONAL: boolean;
var IS_ROOMS_MODE: boolean;
type assetsType = { [key: string]: string } | undefined;
interface IInitialI18nStoreASC extends Object {
en: {
[Common: string]: { [key: any]: string };
[Login: string]: { [key: any]: string };
};
[key: string]: {
[Common: string]: { [key: any]: string };
[Login: string]: { [key: any]: string };
};
}
2022-08-25 15:13:46 +00:00
type HTMLElementEvent<T extends HTMLElement> = Event & {
target: T;
};
2022-08-26 13:38:32 +00:00
type TFuncType = (key: string) => string;
2022-08-26 22:52:57 +00:00
interface IParsedConfig extends Object {
PORT: number;
}
interface ILoginRequest extends Request {
i18n?: I18next;
t?: TFuncType;
}
type timeoutType = ReturnType<typeof setTimeout>;
interface IAcceptLanguage {
code?: string;
quality?: number;
}
2022-08-04 09:14:55 +00:00
}