2022-08-04 09:14:55 +00:00
|
|
|
import { Request } from "express";
|
|
|
|
|
2022-08-11 10:26:48 +00:00
|
|
|
type WindowI18nType = {
|
|
|
|
inLoad: object[];
|
|
|
|
loaded: {
|
|
|
|
[key: string]: {
|
|
|
|
data: {
|
|
|
|
[key: string]: string | undefined;
|
|
|
|
};
|
|
|
|
namespaces?: string;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
2022-08-18 07:51:35 +00:00
|
|
|
|
2022-08-04 09:14:55 +00:00
|
|
|
declare global {
|
|
|
|
interface Window {
|
2022-08-22 12:09:03 +00:00
|
|
|
authCallback?: (profile: string) => {};
|
2022-08-11 08:30:43 +00:00
|
|
|
__ASC_INITIAL_LOGIN_STATE__: IInitialState;
|
2022-08-11 10:26:48 +00:00
|
|
|
initialI18nStoreASC: IInitialI18nStoreASC;
|
2022-08-11 08:30:43 +00:00
|
|
|
initialLanguage: string;
|
2022-08-11 10:26:48 +00:00
|
|
|
i18n: WindowI18nType;
|
2022-08-12 19:34:47 +00:00
|
|
|
[key: string]: object;
|
2022-08-04 09:14:55 +00:00
|
|
|
}
|
|
|
|
|
2022-08-18 07:51:35 +00:00
|
|
|
type MatchType = {
|
|
|
|
confirmedEmail?: string;
|
2022-09-01 11:57:32 +00:00
|
|
|
message?: string;
|
2022-08-18 07:51:35 +00:00
|
|
|
};
|
|
|
|
|
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
|
|
|
|
}
|
|
|
|
|
2022-08-11 15:31:06 +00:00
|
|
|
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;
|
2022-08-18 07:51:35 +00:00
|
|
|
match: MatchType;
|
2022-08-31 14:32:33 +00:00
|
|
|
currentColorScheme: ITheme;
|
2022-10-20 10:32:20 +00:00
|
|
|
isAuth: boolean;
|
2022-10-27 11:04:53 +00:00
|
|
|
logoUrls: any;
|
2022-08-04 09:14:55 +00:00
|
|
|
}
|
|
|
|
|
2022-08-04 10:53:02 +00:00
|
|
|
interface DevRequest {
|
|
|
|
assets: assetsType;
|
2022-08-04 09:14:55 +00:00
|
|
|
}
|
|
|
|
var IS_DEVELOPMENT: boolean;
|
|
|
|
var PORT: number;
|
2022-08-30 10:30:29 +00:00
|
|
|
var IS_PERSONAL: boolean;
|
|
|
|
var IS_ROOMS_MODE: boolean;
|
2022-08-04 10:53:02 +00:00
|
|
|
|
|
|
|
type assetsType = { [key: string]: string } | undefined;
|
2022-08-11 10:26:48 +00:00
|
|
|
|
|
|
|
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
|
|
|
}
|