build: switch from yarn to npm to manage js dependencies and move js contents to root
yarn v1 is being deprecated and starts to have some issues Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
136
src/types/config.model.ts
Normal file
136
src/types/config.model.ts
Normal file
@@ -0,0 +1,136 @@
|
||||
import { InstancePrivacyType, InstanceTermsType, RoutingType } from "./enums";
|
||||
import type { IProvider } from "./resource";
|
||||
|
||||
export interface IOAuthProvider {
|
||||
id: string;
|
||||
label?: string;
|
||||
}
|
||||
|
||||
export interface IKeyValueConfig {
|
||||
key: string;
|
||||
value: string;
|
||||
type: "boolean" | "integer" | "string";
|
||||
}
|
||||
|
||||
export interface IAnalyticsConfig {
|
||||
id: string;
|
||||
enabled: boolean;
|
||||
configuration: IKeyValueConfig[];
|
||||
}
|
||||
|
||||
export interface IAnonymousParticipationConfig {
|
||||
allowed: boolean;
|
||||
validation: {
|
||||
email: {
|
||||
enabled: boolean;
|
||||
confirmationRequired: boolean;
|
||||
};
|
||||
captcha: {
|
||||
enabled: boolean;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
export interface IConfig {
|
||||
name: string;
|
||||
description: string;
|
||||
longDescription: string;
|
||||
contact: string;
|
||||
slogan: string;
|
||||
|
||||
registrationsOpen: boolean;
|
||||
registrationsAllowlist: boolean;
|
||||
demoMode: boolean;
|
||||
countryCode: string;
|
||||
eventCategories: { id: string; label: string }[];
|
||||
languages: string[];
|
||||
location: {
|
||||
latitude: number;
|
||||
longitude: number;
|
||||
// accuracyRadius: number;
|
||||
};
|
||||
anonymous: {
|
||||
participation: IAnonymousParticipationConfig;
|
||||
eventCreation: {
|
||||
allowed: boolean;
|
||||
validation: {
|
||||
email: {
|
||||
enabled: boolean;
|
||||
confirmationRequired: boolean;
|
||||
};
|
||||
captcha: {
|
||||
enabled: boolean;
|
||||
};
|
||||
};
|
||||
};
|
||||
reports: {
|
||||
allowed: boolean;
|
||||
};
|
||||
actorId: string;
|
||||
};
|
||||
maps: {
|
||||
tiles: {
|
||||
endpoint: string;
|
||||
attribution: string | null;
|
||||
};
|
||||
routing: {
|
||||
type: RoutingType;
|
||||
};
|
||||
};
|
||||
geocoding: {
|
||||
provider: string;
|
||||
autocomplete: boolean;
|
||||
};
|
||||
terms: {
|
||||
bodyHtml: string;
|
||||
type: InstanceTermsType;
|
||||
url: string;
|
||||
};
|
||||
privacy: {
|
||||
bodyHtml: string;
|
||||
type: InstancePrivacyType;
|
||||
url: string;
|
||||
};
|
||||
rules: string;
|
||||
resourceProviders: IProvider[];
|
||||
timezones: string[];
|
||||
features: {
|
||||
eventCreation: boolean;
|
||||
eventExternal: boolean;
|
||||
groups: boolean;
|
||||
antispam: boolean;
|
||||
};
|
||||
restrictions: {
|
||||
onlyAdminCanCreateGroups: boolean;
|
||||
onlyGroupsCanCreateEvents: boolean;
|
||||
};
|
||||
federating: boolean;
|
||||
version: string;
|
||||
auth: {
|
||||
ldap: boolean;
|
||||
databaseLogin: boolean;
|
||||
oauthProviders: IOAuthProvider[];
|
||||
};
|
||||
uploadLimits: {
|
||||
default: number;
|
||||
avatar: number;
|
||||
banner: number;
|
||||
};
|
||||
instanceFeeds: {
|
||||
enabled: boolean;
|
||||
};
|
||||
webPush: {
|
||||
enabled: boolean;
|
||||
publicKey: string;
|
||||
};
|
||||
exportFormats: {
|
||||
eventParticipants: string[];
|
||||
};
|
||||
analytics: IAnalyticsConfig[];
|
||||
search: {
|
||||
global: {
|
||||
isEnabled: boolean;
|
||||
isDefault: boolean;
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user