2019-08-09 19:13:18 +03:00
|
|
|
///
|
2020-02-20 10:26:43 +02:00
|
|
|
/// Copyright © 2016-2020 The Thingsboard Authors
|
2019-08-09 19:13:18 +03:00
|
|
|
///
|
|
|
|
|
/// Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
|
/// you may not use this file except in compliance with the License.
|
|
|
|
|
/// You may obtain a copy of the License at
|
|
|
|
|
///
|
|
|
|
|
/// http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
|
///
|
|
|
|
|
/// Unless required by applicable law or agreed to in writing, software
|
|
|
|
|
/// distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
|
/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
|
/// See the License for the specific language governing permissions and
|
|
|
|
|
/// limitations under the License.
|
|
|
|
|
///
|
|
|
|
|
|
2020-06-01 01:34:26 +03:00
|
|
|
export const portPattern: RegExp = /^([0-9]{1,4}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])$/;
|
2019-08-09 19:13:18 +03:00
|
|
|
|
|
|
|
|
export interface AdminSettings<T> {
|
|
|
|
|
key: string;
|
|
|
|
|
jsonValue: T;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export declare type SmtpProtocol = 'smtp' | 'smtps';
|
|
|
|
|
|
|
|
|
|
export interface MailServerSettings {
|
|
|
|
|
mailFrom: string;
|
|
|
|
|
smtpProtocol: SmtpProtocol;
|
|
|
|
|
smtpHost: string;
|
|
|
|
|
smtpPort: number;
|
|
|
|
|
timeout: number;
|
|
|
|
|
enableTls: boolean;
|
|
|
|
|
username: string;
|
|
|
|
|
password: string;
|
2020-06-01 01:34:26 +03:00
|
|
|
enableProxy: boolean;
|
|
|
|
|
proxyHost: string;
|
|
|
|
|
proxyPort: number;
|
2020-06-01 10:54:54 +03:00
|
|
|
proxyUser: string;
|
|
|
|
|
proxyPassword: string;
|
2019-08-09 19:13:18 +03:00
|
|
|
}
|
2019-08-12 19:34:23 +03:00
|
|
|
|
|
|
|
|
export interface GeneralSettings {
|
|
|
|
|
baseUrl: string;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export interface UserPasswordPolicy {
|
|
|
|
|
minimumLength: number;
|
|
|
|
|
minimumUppercaseLetters: number;
|
|
|
|
|
minimumLowercaseLetters: number;
|
|
|
|
|
minimumDigits: number;
|
|
|
|
|
minimumSpecialCharacters: number;
|
|
|
|
|
passwordExpirationPeriodDays: number;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export interface SecuritySettings {
|
|
|
|
|
passwordPolicy: UserPasswordPolicy;
|
|
|
|
|
}
|
2019-11-15 12:22:14 +02:00
|
|
|
|
|
|
|
|
export interface UpdateMessage {
|
|
|
|
|
message: string;
|
|
|
|
|
updateAvailable: boolean;
|
|
|
|
|
}
|