2022-01-11 13:51:48 +00:00
|
|
|
import Model from '@nozbe/watermelondb/Model';
|
|
|
|
|
2022-02-22 12:07:54 +00:00
|
|
|
import { IEnterpriseModules } from '../reducers/enterpriseModules';
|
|
|
|
|
2023-10-19 13:38:57 +00:00
|
|
|
export type TSVStatus = 'supported' | 'expired' | 'warn';
|
|
|
|
|
|
|
|
export type TSVDictionary = {
|
|
|
|
[lng: string]: Record<string, string>;
|
|
|
|
};
|
|
|
|
|
|
|
|
export type TSVMessage = {
|
|
|
|
remainingDays: number;
|
|
|
|
title?: string;
|
|
|
|
subtitle?: string;
|
|
|
|
description?: string;
|
|
|
|
type: 'info' | 'alert' | 'error';
|
|
|
|
params?: Record<string, unknown>;
|
|
|
|
link: string;
|
|
|
|
};
|
|
|
|
|
|
|
|
export type TSVVersion = {
|
|
|
|
version: string;
|
|
|
|
expiration: string;
|
|
|
|
messages?: TSVMessage[];
|
|
|
|
};
|
|
|
|
|
|
|
|
export interface ISupportedVersionsData {
|
|
|
|
timestamp: string;
|
|
|
|
enforcementStartDate: string;
|
|
|
|
messages?: TSVMessage[];
|
|
|
|
versions: TSVVersion[];
|
|
|
|
exceptions?: {
|
|
|
|
domain: string;
|
|
|
|
uniqueId: string;
|
|
|
|
messages?: TSVMessage[];
|
|
|
|
versions: TSVVersion[];
|
|
|
|
};
|
|
|
|
i18n?: TSVDictionary;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface ISupportedVersions extends ISupportedVersionsData {
|
|
|
|
signed: string;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface IApiServerInfo {
|
|
|
|
version: string;
|
|
|
|
success: boolean;
|
|
|
|
supportedVersions?: ISupportedVersions;
|
|
|
|
minimumClientVersions?: {
|
|
|
|
desktop: string;
|
|
|
|
mobile: string;
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface IServerInfo {
|
|
|
|
version: string;
|
|
|
|
success: boolean;
|
|
|
|
supportedVersions?: ISupportedVersionsData | null; // no signed
|
|
|
|
minimumClientVersions?: {
|
|
|
|
desktop: string;
|
|
|
|
mobile: string;
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
export type TCloudInfo = ISupportedVersions;
|
|
|
|
|
2021-12-03 19:27:57 +00:00
|
|
|
export interface IServer {
|
|
|
|
name: string;
|
|
|
|
iconURL: string;
|
|
|
|
useRealName: boolean;
|
|
|
|
FileUpload_MediaTypeWhiteList: string;
|
|
|
|
FileUpload_MaxFileSize: number;
|
2022-02-10 12:10:42 +00:00
|
|
|
roomsUpdatedAt: Date | null;
|
2021-12-03 19:27:57 +00:00
|
|
|
version: string;
|
|
|
|
lastLocalAuthenticatedSession: Date;
|
|
|
|
autoLock: boolean;
|
2022-01-12 12:54:04 +00:00
|
|
|
autoLockTime?: number;
|
|
|
|
biometry?: boolean;
|
2021-12-03 19:27:57 +00:00
|
|
|
uniqueID: string;
|
2022-02-22 12:07:54 +00:00
|
|
|
enterpriseModules: IEnterpriseModules;
|
2021-12-03 19:27:57 +00:00
|
|
|
E2E_Enable: boolean;
|
2023-10-19 13:38:57 +00:00
|
|
|
supportedVersions?: ISupportedVersionsData;
|
2024-02-01 13:32:02 +00:00
|
|
|
supportedVersionsWarningAt?: Date | null;
|
|
|
|
supportedVersionsUpdatedAt?: Date | null;
|
2022-04-07 17:07:16 +00:00
|
|
|
}
|
|
|
|
|
2022-01-11 13:51:48 +00:00
|
|
|
export type TServerModel = IServer & Model;
|