2023-07-27 05:31:52 +00:00
|
|
|
/*
|
2024-02-13 15:59:27 +00:00
|
|
|
* SPDX-FileCopyrightText: syuilo and misskey-project
|
2023-07-27 05:31:52 +00:00
|
|
|
* SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
*/
|
|
|
|
|
2022-09-17 18:27:08 +00:00
|
|
|
import { Inject, Injectable } from '@nestjs/common';
|
|
|
|
import { Endpoint } from '@/server/api/endpoint-base.js';
|
|
|
|
import { MetaService } from '@/core/MetaService.js';
|
2022-09-20 20:33:11 +00:00
|
|
|
import type { Config } from '@/config.js';
|
2022-09-17 18:27:08 +00:00
|
|
|
import { DI } from '@/di-symbols.js';
|
2023-01-15 11:52:53 +00:00
|
|
|
import { DEFAULT_POLICIES } from '@/core/RoleService.js';
|
2022-03-24 16:50:28 +00:00
|
|
|
|
|
|
|
export const meta = {
|
|
|
|
tags: ['meta'],
|
|
|
|
|
|
|
|
requireCredential: true,
|
|
|
|
requireAdmin: true,
|
2023-12-27 06:08:59 +00:00
|
|
|
kind: 'read:admin:meta',
|
2022-03-24 16:50:28 +00:00
|
|
|
|
|
|
|
res: {
|
|
|
|
type: 'object',
|
|
|
|
optional: false, nullable: false,
|
|
|
|
properties: {
|
|
|
|
cacheRemoteFiles: {
|
|
|
|
type: 'boolean',
|
|
|
|
optional: false, nullable: false,
|
|
|
|
},
|
2023-07-15 11:12:20 +00:00
|
|
|
cacheRemoteSensitiveFiles: {
|
|
|
|
type: 'boolean',
|
|
|
|
optional: false, nullable: false,
|
|
|
|
},
|
2022-03-24 16:50:28 +00:00
|
|
|
emailRequiredForSignup: {
|
|
|
|
type: 'boolean',
|
|
|
|
optional: false, nullable: false,
|
|
|
|
},
|
2023-10-18 00:41:36 +00:00
|
|
|
approvalRequiredForSignup: {
|
|
|
|
type: 'boolean',
|
|
|
|
optional: false, nullable: false,
|
|
|
|
},
|
2022-03-24 16:50:28 +00:00
|
|
|
enableHcaptcha: {
|
|
|
|
type: 'boolean',
|
|
|
|
optional: false, nullable: false,
|
|
|
|
},
|
|
|
|
hcaptchaSiteKey: {
|
|
|
|
type: 'string',
|
|
|
|
optional: false, nullable: true,
|
|
|
|
},
|
2024-01-06 11:14:33 +00:00
|
|
|
enableMcaptcha: {
|
|
|
|
type: 'boolean',
|
|
|
|
optional: false, nullable: false,
|
|
|
|
},
|
|
|
|
mcaptchaSiteKey: {
|
|
|
|
type: 'string',
|
|
|
|
optional: false, nullable: true,
|
|
|
|
},
|
|
|
|
mcaptchaInstanceUrl: {
|
|
|
|
type: 'string',
|
|
|
|
optional: false, nullable: true,
|
|
|
|
},
|
2022-03-24 16:50:28 +00:00
|
|
|
enableRecaptcha: {
|
|
|
|
type: 'boolean',
|
|
|
|
optional: false, nullable: false,
|
|
|
|
},
|
|
|
|
recaptchaSiteKey: {
|
|
|
|
type: 'string',
|
|
|
|
optional: false, nullable: true,
|
|
|
|
},
|
2022-10-13 00:19:57 +00:00
|
|
|
enableTurnstile: {
|
|
|
|
type: 'boolean',
|
|
|
|
optional: false, nullable: false,
|
|
|
|
},
|
|
|
|
turnstileSiteKey: {
|
|
|
|
type: 'string',
|
|
|
|
optional: false, nullable: true,
|
|
|
|
},
|
2022-03-24 16:50:28 +00:00
|
|
|
swPublickey: {
|
|
|
|
type: 'string',
|
|
|
|
optional: false, nullable: true,
|
|
|
|
},
|
|
|
|
mascotImageUrl: {
|
|
|
|
type: 'string',
|
2023-02-17 06:36:36 +00:00
|
|
|
optional: false, nullable: true,
|
2022-03-24 16:50:28 +00:00
|
|
|
default: '/assets/ai.png',
|
|
|
|
},
|
|
|
|
bannerUrl: {
|
|
|
|
type: 'string',
|
2023-02-17 06:36:36 +00:00
|
|
|
optional: false, nullable: true,
|
2022-03-24 16:50:28 +00:00
|
|
|
},
|
2023-06-09 05:00:53 +00:00
|
|
|
serverErrorImageUrl: {
|
|
|
|
type: 'string',
|
|
|
|
optional: false, nullable: true,
|
|
|
|
},
|
|
|
|
infoImageUrl: {
|
|
|
|
type: 'string',
|
|
|
|
optional: false, nullable: true,
|
|
|
|
},
|
|
|
|
notFoundImageUrl: {
|
2022-03-24 16:50:28 +00:00
|
|
|
type: 'string',
|
2023-02-17 06:36:36 +00:00
|
|
|
optional: false, nullable: true,
|
2022-03-24 16:50:28 +00:00
|
|
|
},
|
|
|
|
iconUrl: {
|
|
|
|
type: 'string',
|
|
|
|
optional: false, nullable: true,
|
|
|
|
},
|
2023-09-16 08:05:17 +00:00
|
|
|
app192IconUrl: {
|
|
|
|
type: 'string',
|
|
|
|
optional: false, nullable: true,
|
|
|
|
},
|
|
|
|
app512IconUrl: {
|
|
|
|
type: 'string',
|
|
|
|
optional: false, nullable: true,
|
|
|
|
},
|
2022-03-24 16:50:28 +00:00
|
|
|
enableEmail: {
|
|
|
|
type: 'boolean',
|
|
|
|
optional: false, nullable: false,
|
|
|
|
},
|
|
|
|
enableServiceWorker: {
|
|
|
|
type: 'boolean',
|
|
|
|
optional: false, nullable: false,
|
|
|
|
},
|
|
|
|
translatorAvailable: {
|
|
|
|
type: 'boolean',
|
|
|
|
optional: false, nullable: false,
|
|
|
|
},
|
2023-10-16 11:11:27 +00:00
|
|
|
silencedHosts: {
|
2023-10-23 06:17:25 +00:00
|
|
|
type: 'array',
|
2023-10-16 11:11:27 +00:00
|
|
|
optional: true,
|
|
|
|
nullable: false,
|
|
|
|
items: {
|
2023-10-23 06:17:25 +00:00
|
|
|
type: 'string',
|
2023-10-16 11:11:27 +00:00
|
|
|
optional: false,
|
|
|
|
nullable: false,
|
|
|
|
},
|
|
|
|
},
|
2022-03-24 16:50:28 +00:00
|
|
|
pinnedUsers: {
|
|
|
|
type: 'array',
|
2023-10-03 23:46:27 +00:00
|
|
|
optional: false, nullable: false,
|
2022-03-24 16:50:28 +00:00
|
|
|
items: {
|
|
|
|
type: 'string',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
hiddenTags: {
|
|
|
|
type: 'array',
|
2023-10-03 23:46:27 +00:00
|
|
|
optional: false, nullable: false,
|
2022-03-24 16:50:28 +00:00
|
|
|
items: {
|
|
|
|
type: 'string',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
blockedHosts: {
|
|
|
|
type: 'array',
|
2023-10-03 23:46:27 +00:00
|
|
|
optional: false, nullable: false,
|
2022-03-24 16:50:28 +00:00
|
|
|
items: {
|
|
|
|
type: 'string',
|
|
|
|
},
|
|
|
|
},
|
2023-03-13 08:37:22 +00:00
|
|
|
sensitiveWords: {
|
|
|
|
type: 'array',
|
2023-10-03 23:46:27 +00:00
|
|
|
optional: false, nullable: false,
|
2023-03-13 08:37:22 +00:00
|
|
|
items: {
|
|
|
|
type: 'string',
|
|
|
|
},
|
|
|
|
},
|
2024-02-09 01:07:18 +00:00
|
|
|
prohibitedWords: {
|
|
|
|
type: 'array',
|
|
|
|
optional: false, nullable: false,
|
|
|
|
items: {
|
|
|
|
type: 'string',
|
|
|
|
},
|
|
|
|
},
|
2023-12-23 03:06:22 +00:00
|
|
|
bannedEmailDomains: {
|
|
|
|
type: 'array',
|
|
|
|
optional: true, nullable: false,
|
|
|
|
items: {
|
|
|
|
type: 'string',
|
|
|
|
optional: false, nullable: false,
|
|
|
|
},
|
|
|
|
},
|
2023-04-29 08:03:14 +00:00
|
|
|
preservedUsernames: {
|
|
|
|
type: 'array',
|
|
|
|
optional: false, nullable: false,
|
|
|
|
items: {
|
|
|
|
type: 'string',
|
|
|
|
},
|
|
|
|
},
|
2023-12-04 01:10:51 +00:00
|
|
|
bubbleInstances: {
|
|
|
|
type: 'array',
|
|
|
|
optional: false, nullable: false,
|
|
|
|
items: {
|
|
|
|
type: 'string',
|
|
|
|
},
|
|
|
|
},
|
2022-03-24 16:50:28 +00:00
|
|
|
hcaptchaSecretKey: {
|
|
|
|
type: 'string',
|
2023-10-03 23:46:27 +00:00
|
|
|
optional: false, nullable: true,
|
2022-03-24 16:50:28 +00:00
|
|
|
},
|
2024-01-06 11:14:33 +00:00
|
|
|
mcaptchaSecretKey: {
|
|
|
|
type: 'string',
|
|
|
|
optional: false, nullable: true,
|
|
|
|
},
|
2022-03-24 16:50:28 +00:00
|
|
|
recaptchaSecretKey: {
|
|
|
|
type: 'string',
|
2023-10-03 23:46:27 +00:00
|
|
|
optional: false, nullable: true,
|
2022-03-24 16:50:28 +00:00
|
|
|
},
|
2022-10-13 00:19:57 +00:00
|
|
|
turnstileSecretKey: {
|
|
|
|
type: 'string',
|
2023-10-03 23:46:27 +00:00
|
|
|
optional: false, nullable: true,
|
2022-12-02 14:12:09 +00:00
|
|
|
},
|
2022-07-07 12:06:37 +00:00
|
|
|
sensitiveMediaDetection: {
|
|
|
|
type: 'string',
|
2023-10-03 23:46:27 +00:00
|
|
|
optional: false, nullable: false,
|
2022-07-07 12:06:37 +00:00
|
|
|
},
|
|
|
|
sensitiveMediaDetectionSensitivity: {
|
|
|
|
type: 'string',
|
2023-10-03 23:46:27 +00:00
|
|
|
optional: false, nullable: false,
|
2022-07-07 12:06:37 +00:00
|
|
|
},
|
|
|
|
setSensitiveFlagAutomatically: {
|
|
|
|
type: 'boolean',
|
2023-10-03 23:46:27 +00:00
|
|
|
optional: false, nullable: false,
|
2022-07-07 12:06:37 +00:00
|
|
|
},
|
|
|
|
enableSensitiveMediaDetectionForVideos: {
|
|
|
|
type: 'boolean',
|
2023-10-03 23:46:27 +00:00
|
|
|
optional: false, nullable: false,
|
2022-07-07 12:06:37 +00:00
|
|
|
},
|
2023-10-18 05:29:16 +00:00
|
|
|
enableBotTrending: {
|
|
|
|
type: 'boolean',
|
|
|
|
optional: false, nullable: false,
|
|
|
|
},
|
2022-03-24 16:50:28 +00:00
|
|
|
proxyAccountId: {
|
|
|
|
type: 'string',
|
2023-10-03 23:46:27 +00:00
|
|
|
optional: false, nullable: true,
|
2022-03-24 16:50:28 +00:00
|
|
|
format: 'id',
|
|
|
|
},
|
|
|
|
email: {
|
|
|
|
type: 'string',
|
2023-10-03 23:46:27 +00:00
|
|
|
optional: false, nullable: true,
|
2022-03-24 16:50:28 +00:00
|
|
|
},
|
|
|
|
smtpSecure: {
|
|
|
|
type: 'boolean',
|
2023-10-03 23:46:27 +00:00
|
|
|
optional: false, nullable: false,
|
2022-03-24 16:50:28 +00:00
|
|
|
},
|
|
|
|
smtpHost: {
|
|
|
|
type: 'string',
|
2023-10-03 23:46:27 +00:00
|
|
|
optional: false, nullable: true,
|
2022-03-24 16:50:28 +00:00
|
|
|
},
|
|
|
|
smtpPort: {
|
2023-02-17 06:36:36 +00:00
|
|
|
type: 'number',
|
2023-10-03 23:46:27 +00:00
|
|
|
optional: false, nullable: true,
|
2022-03-24 16:50:28 +00:00
|
|
|
},
|
|
|
|
smtpUser: {
|
|
|
|
type: 'string',
|
2023-10-03 23:46:27 +00:00
|
|
|
optional: false, nullable: true,
|
2022-03-24 16:50:28 +00:00
|
|
|
},
|
|
|
|
smtpPass: {
|
|
|
|
type: 'string',
|
2023-10-03 23:46:27 +00:00
|
|
|
optional: false, nullable: true,
|
2022-03-24 16:50:28 +00:00
|
|
|
},
|
|
|
|
swPrivateKey: {
|
|
|
|
type: 'string',
|
2023-10-03 23:46:27 +00:00
|
|
|
optional: false, nullable: true,
|
2022-03-24 16:50:28 +00:00
|
|
|
},
|
|
|
|
useObjectStorage: {
|
|
|
|
type: 'boolean',
|
2023-10-03 23:46:27 +00:00
|
|
|
optional: false, nullable: false,
|
2022-03-24 16:50:28 +00:00
|
|
|
},
|
|
|
|
objectStorageBaseUrl: {
|
|
|
|
type: 'string',
|
2023-10-03 23:46:27 +00:00
|
|
|
optional: false, nullable: true,
|
2022-03-24 16:50:28 +00:00
|
|
|
},
|
|
|
|
objectStorageBucket: {
|
|
|
|
type: 'string',
|
2023-10-03 23:46:27 +00:00
|
|
|
optional: false, nullable: true,
|
2022-03-24 16:50:28 +00:00
|
|
|
},
|
|
|
|
objectStoragePrefix: {
|
|
|
|
type: 'string',
|
2023-10-03 23:46:27 +00:00
|
|
|
optional: false, nullable: true,
|
2022-03-24 16:50:28 +00:00
|
|
|
},
|
|
|
|
objectStorageEndpoint: {
|
|
|
|
type: 'string',
|
2023-10-03 23:46:27 +00:00
|
|
|
optional: false, nullable: true,
|
2022-03-24 16:50:28 +00:00
|
|
|
},
|
|
|
|
objectStorageRegion: {
|
|
|
|
type: 'string',
|
2023-10-03 23:46:27 +00:00
|
|
|
optional: false, nullable: true,
|
2022-03-24 16:50:28 +00:00
|
|
|
},
|
|
|
|
objectStoragePort: {
|
|
|
|
type: 'number',
|
2023-10-03 23:46:27 +00:00
|
|
|
optional: false, nullable: true,
|
2022-03-24 16:50:28 +00:00
|
|
|
},
|
|
|
|
objectStorageAccessKey: {
|
|
|
|
type: 'string',
|
2023-10-03 23:46:27 +00:00
|
|
|
optional: false, nullable: true,
|
2022-03-24 16:50:28 +00:00
|
|
|
},
|
|
|
|
objectStorageSecretKey: {
|
|
|
|
type: 'string',
|
2023-10-03 23:46:27 +00:00
|
|
|
optional: false, nullable: true,
|
2022-03-24 16:50:28 +00:00
|
|
|
},
|
|
|
|
objectStorageUseSSL: {
|
|
|
|
type: 'boolean',
|
2023-10-03 23:46:27 +00:00
|
|
|
optional: false, nullable: false,
|
2022-03-24 16:50:28 +00:00
|
|
|
},
|
|
|
|
objectStorageUseProxy: {
|
|
|
|
type: 'boolean',
|
2023-10-03 23:46:27 +00:00
|
|
|
optional: false, nullable: false,
|
2022-03-24 16:50:28 +00:00
|
|
|
},
|
|
|
|
objectStorageSetPublicRead: {
|
|
|
|
type: 'boolean',
|
2023-10-03 23:46:27 +00:00
|
|
|
optional: false, nullable: false,
|
2022-03-24 16:50:28 +00:00
|
|
|
},
|
2022-07-02 06:12:11 +00:00
|
|
|
enableIpLogging: {
|
|
|
|
type: 'boolean',
|
2023-10-03 23:46:27 +00:00
|
|
|
optional: false, nullable: false,
|
2022-07-02 06:12:11 +00:00
|
|
|
},
|
2022-07-09 06:05:55 +00:00
|
|
|
enableActiveEmailValidation: {
|
|
|
|
type: 'boolean',
|
2023-10-03 23:46:27 +00:00
|
|
|
optional: false, nullable: false,
|
2022-07-09 06:05:55 +00:00
|
|
|
},
|
2023-11-22 01:13:46 +00:00
|
|
|
enableVerifymailApi: {
|
|
|
|
type: 'boolean',
|
|
|
|
optional: false, nullable: false,
|
|
|
|
},
|
|
|
|
verifymailAuthKey: {
|
|
|
|
type: 'string',
|
|
|
|
optional: false, nullable: true,
|
|
|
|
},
|
2023-12-29 09:23:29 +00:00
|
|
|
enableTruemailApi: {
|
|
|
|
type: 'boolean',
|
|
|
|
optional: false, nullable: false,
|
|
|
|
},
|
|
|
|
truemailInstance: {
|
|
|
|
type: 'string',
|
|
|
|
optional: false, nullable: true,
|
|
|
|
},
|
|
|
|
truemailAuthKey: {
|
|
|
|
type: 'string',
|
|
|
|
optional: false, nullable: true,
|
|
|
|
},
|
2023-03-24 06:43:36 +00:00
|
|
|
enableChartsForRemoteUser: {
|
|
|
|
type: 'boolean',
|
|
|
|
optional: false, nullable: false,
|
|
|
|
},
|
2023-03-24 10:08:08 +00:00
|
|
|
enableChartsForFederatedInstances: {
|
|
|
|
type: 'boolean',
|
|
|
|
optional: false, nullable: false,
|
|
|
|
},
|
2023-07-02 07:02:32 +00:00
|
|
|
enableServerMachineStats: {
|
|
|
|
type: 'boolean',
|
|
|
|
optional: false, nullable: false,
|
|
|
|
},
|
2023-09-28 22:57:38 +00:00
|
|
|
enableAchievements: {
|
|
|
|
type: 'boolean',
|
|
|
|
optional: false, nullable: false,
|
|
|
|
},
|
2023-07-02 07:02:32 +00:00
|
|
|
enableIdenticonGeneration: {
|
|
|
|
type: 'boolean',
|
|
|
|
optional: false, nullable: false,
|
|
|
|
},
|
2023-09-16 08:05:17 +00:00
|
|
|
manifestJsonOverride: {
|
|
|
|
type: 'string',
|
2023-10-03 23:46:27 +00:00
|
|
|
optional: false, nullable: false,
|
2023-09-16 08:05:17 +00:00
|
|
|
},
|
2023-02-17 06:36:36 +00:00
|
|
|
policies: {
|
|
|
|
type: 'object',
|
|
|
|
optional: false, nullable: false,
|
|
|
|
},
|
2023-10-23 06:17:25 +00:00
|
|
|
enableFanoutTimeline: {
|
|
|
|
type: 'boolean',
|
|
|
|
optional: false, nullable: false,
|
|
|
|
},
|
2023-11-16 01:20:57 +00:00
|
|
|
enableFanoutTimelineDbFallback: {
|
|
|
|
type: 'boolean',
|
|
|
|
optional: false, nullable: false,
|
|
|
|
},
|
2023-10-03 23:46:27 +00:00
|
|
|
perLocalUserUserTimelineCacheMax: {
|
|
|
|
type: 'number',
|
|
|
|
optional: false, nullable: false,
|
|
|
|
},
|
|
|
|
perRemoteUserUserTimelineCacheMax: {
|
|
|
|
type: 'number',
|
|
|
|
optional: false, nullable: false,
|
|
|
|
},
|
|
|
|
perUserHomeTimelineCacheMax: {
|
|
|
|
type: 'number',
|
|
|
|
optional: false, nullable: false,
|
|
|
|
},
|
|
|
|
perUserListTimelineCacheMax: {
|
|
|
|
type: 'number',
|
|
|
|
optional: false, nullable: false,
|
|
|
|
},
|
2023-10-08 08:56:44 +00:00
|
|
|
notesPerOneAd: {
|
|
|
|
type: 'number',
|
|
|
|
optional: false, nullable: false,
|
|
|
|
},
|
2023-12-02 12:00:05 +00:00
|
|
|
backgroundImageUrl: {
|
|
|
|
type: 'string',
|
|
|
|
optional: false, nullable: true,
|
|
|
|
},
|
|
|
|
deeplAuthKey: {
|
|
|
|
type: 'string',
|
|
|
|
optional: false, nullable: true,
|
|
|
|
},
|
|
|
|
deeplIsPro: {
|
|
|
|
type: 'boolean',
|
|
|
|
optional: false, nullable: false,
|
|
|
|
},
|
2024-01-26 20:29:38 +00:00
|
|
|
deeplFreeMode: {
|
|
|
|
type: 'boolean',
|
|
|
|
optional: false, nullable: false,
|
|
|
|
},
|
|
|
|
deeplFreeInstance: {
|
|
|
|
type: 'string',
|
|
|
|
optional: false, nullable: true,
|
|
|
|
},
|
2023-12-02 12:00:05 +00:00
|
|
|
defaultDarkTheme: {
|
|
|
|
type: 'string',
|
|
|
|
optional: false, nullable: true,
|
|
|
|
},
|
|
|
|
defaultLightTheme: {
|
|
|
|
type: 'string',
|
|
|
|
optional: false, nullable: true,
|
|
|
|
},
|
|
|
|
description: {
|
|
|
|
type: 'string',
|
|
|
|
optional: false, nullable: true,
|
|
|
|
},
|
|
|
|
disableRegistration: {
|
|
|
|
type: 'boolean',
|
|
|
|
optional: false, nullable: false,
|
|
|
|
},
|
|
|
|
impressumUrl: {
|
|
|
|
type: 'string',
|
|
|
|
optional: false, nullable: true,
|
|
|
|
},
|
2024-01-09 20:32:47 +00:00
|
|
|
donationUrl: {
|
|
|
|
type: 'string',
|
|
|
|
optional: false, nullable: true,
|
|
|
|
},
|
2023-12-02 12:00:05 +00:00
|
|
|
maintainerEmail: {
|
|
|
|
type: 'string',
|
|
|
|
optional: false, nullable: true,
|
|
|
|
},
|
|
|
|
maintainerName: {
|
|
|
|
type: 'string',
|
|
|
|
optional: false, nullable: true,
|
|
|
|
},
|
|
|
|
name: {
|
|
|
|
type: 'string',
|
|
|
|
optional: false, nullable: true,
|
|
|
|
},
|
2023-12-26 05:19:35 +00:00
|
|
|
shortName: {
|
|
|
|
type: 'string',
|
|
|
|
optional: false, nullable: true,
|
|
|
|
},
|
2023-12-02 12:00:05 +00:00
|
|
|
objectStorageS3ForcePathStyle: {
|
|
|
|
type: 'boolean',
|
|
|
|
optional: false, nullable: false,
|
|
|
|
},
|
|
|
|
privacyPolicyUrl: {
|
|
|
|
type: 'string',
|
|
|
|
optional: false, nullable: true,
|
|
|
|
},
|
|
|
|
repositoryUrl: {
|
|
|
|
type: 'string',
|
2024-02-17 04:34:50 +00:00
|
|
|
optional: false, nullable: true,
|
2023-12-02 12:00:05 +00:00
|
|
|
},
|
|
|
|
summalyProxy: {
|
|
|
|
type: 'string',
|
|
|
|
optional: false, nullable: true,
|
|
|
|
},
|
|
|
|
themeColor: {
|
|
|
|
type: 'string',
|
|
|
|
optional: false, nullable: true,
|
|
|
|
},
|
|
|
|
tosUrl: {
|
|
|
|
type: 'string',
|
|
|
|
optional: false, nullable: true,
|
|
|
|
},
|
|
|
|
uri: {
|
|
|
|
type: 'string',
|
|
|
|
optional: false, nullable: false,
|
|
|
|
},
|
|
|
|
version: {
|
|
|
|
type: 'string',
|
|
|
|
optional: false, nullable: false,
|
|
|
|
},
|
2022-03-24 16:50:28 +00:00
|
|
|
},
|
|
|
|
},
|
|
|
|
} as const;
|
|
|
|
|
|
|
|
export const paramDef = {
|
|
|
|
type: 'object',
|
|
|
|
properties: {
|
|
|
|
},
|
|
|
|
required: [],
|
|
|
|
} as const;
|
|
|
|
|
2022-09-17 18:27:08 +00:00
|
|
|
@Injectable()
|
2023-08-17 12:20:58 +00:00
|
|
|
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
2022-09-17 18:27:08 +00:00
|
|
|
constructor(
|
|
|
|
@Inject(DI.config)
|
|
|
|
private config: Config,
|
2022-03-24 16:50:28 +00:00
|
|
|
|
2022-09-17 18:27:08 +00:00
|
|
|
private metaService: MetaService,
|
|
|
|
) {
|
2023-10-03 23:46:27 +00:00
|
|
|
super(meta, paramDef, async () => {
|
2022-09-17 18:27:08 +00:00
|
|
|
const instance = await this.metaService.fetch(true);
|
|
|
|
|
|
|
|
return {
|
|
|
|
maintainerName: instance.maintainerName,
|
|
|
|
maintainerEmail: instance.maintainerEmail,
|
|
|
|
version: this.config.version,
|
|
|
|
name: instance.name,
|
2023-09-23 03:38:20 +00:00
|
|
|
shortName: instance.shortName,
|
2022-09-17 18:27:08 +00:00
|
|
|
uri: this.config.url,
|
|
|
|
description: instance.description,
|
|
|
|
langs: instance.langs,
|
2023-03-10 05:53:56 +00:00
|
|
|
tosUrl: instance.termsOfServiceUrl,
|
2022-09-17 18:27:08 +00:00
|
|
|
repositoryUrl: instance.repositoryUrl,
|
|
|
|
feedbackUrl: instance.feedbackUrl,
|
2023-10-07 04:13:13 +00:00
|
|
|
impressumUrl: instance.impressumUrl,
|
2024-01-09 20:32:47 +00:00
|
|
|
donationUrl: instance.donationUrl,
|
2023-10-07 04:13:13 +00:00
|
|
|
privacyPolicyUrl: instance.privacyPolicyUrl,
|
2022-09-17 18:27:08 +00:00
|
|
|
disableRegistration: instance.disableRegistration,
|
|
|
|
emailRequiredForSignup: instance.emailRequiredForSignup,
|
2023-10-18 00:41:36 +00:00
|
|
|
approvalRequiredForSignup: instance.approvalRequiredForSignup,
|
2022-09-17 18:27:08 +00:00
|
|
|
enableHcaptcha: instance.enableHcaptcha,
|
|
|
|
hcaptchaSiteKey: instance.hcaptchaSiteKey,
|
2024-01-06 11:14:33 +00:00
|
|
|
enableMcaptcha: instance.enableMcaptcha,
|
|
|
|
mcaptchaSiteKey: instance.mcaptchaSitekey,
|
|
|
|
mcaptchaInstanceUrl: instance.mcaptchaInstanceUrl,
|
2022-09-17 18:27:08 +00:00
|
|
|
enableRecaptcha: instance.enableRecaptcha,
|
|
|
|
recaptchaSiteKey: instance.recaptchaSiteKey,
|
2022-10-13 00:19:57 +00:00
|
|
|
enableTurnstile: instance.enableTurnstile,
|
|
|
|
turnstileSiteKey: instance.turnstileSiteKey,
|
2022-09-17 18:27:08 +00:00
|
|
|
swPublickey: instance.swPublicKey,
|
|
|
|
themeColor: instance.themeColor,
|
|
|
|
mascotImageUrl: instance.mascotImageUrl,
|
|
|
|
bannerUrl: instance.bannerUrl,
|
2023-06-09 05:00:53 +00:00
|
|
|
serverErrorImageUrl: instance.serverErrorImageUrl,
|
|
|
|
notFoundImageUrl: instance.notFoundImageUrl,
|
|
|
|
infoImageUrl: instance.infoImageUrl,
|
2022-09-17 18:27:08 +00:00
|
|
|
iconUrl: instance.iconUrl,
|
2023-09-16 08:05:17 +00:00
|
|
|
app192IconUrl: instance.app192IconUrl,
|
|
|
|
app512IconUrl: instance.app512IconUrl,
|
2022-09-17 18:27:08 +00:00
|
|
|
backgroundImageUrl: instance.backgroundImageUrl,
|
|
|
|
logoImageUrl: instance.logoImageUrl,
|
|
|
|
defaultLightTheme: instance.defaultLightTheme,
|
|
|
|
defaultDarkTheme: instance.defaultDarkTheme,
|
2023-11-12 21:16:47 +00:00
|
|
|
defaultLike: instance.defaultLike,
|
2022-09-17 18:27:08 +00:00
|
|
|
enableEmail: instance.enableEmail,
|
|
|
|
enableServiceWorker: instance.enableServiceWorker,
|
|
|
|
translatorAvailable: instance.deeplAuthKey != null,
|
|
|
|
cacheRemoteFiles: instance.cacheRemoteFiles,
|
2023-07-15 11:12:20 +00:00
|
|
|
cacheRemoteSensitiveFiles: instance.cacheRemoteSensitiveFiles,
|
2022-09-17 18:27:08 +00:00
|
|
|
pinnedUsers: instance.pinnedUsers,
|
|
|
|
hiddenTags: instance.hiddenTags,
|
|
|
|
blockedHosts: instance.blockedHosts,
|
2023-10-16 11:11:27 +00:00
|
|
|
silencedHosts: instance.silencedHosts,
|
2023-03-13 08:37:22 +00:00
|
|
|
sensitiveWords: instance.sensitiveWords,
|
2024-02-09 01:07:18 +00:00
|
|
|
prohibitedWords: instance.prohibitedWords,
|
2023-04-29 08:03:14 +00:00
|
|
|
preservedUsernames: instance.preservedUsernames,
|
2023-12-04 01:10:51 +00:00
|
|
|
bubbleInstances: instance.bubbleInstances,
|
2022-09-17 18:27:08 +00:00
|
|
|
hcaptchaSecretKey: instance.hcaptchaSecretKey,
|
2024-01-06 11:14:33 +00:00
|
|
|
mcaptchaSecretKey: instance.mcaptchaSecretKey,
|
2022-09-17 18:27:08 +00:00
|
|
|
recaptchaSecretKey: instance.recaptchaSecretKey,
|
2022-10-13 00:19:57 +00:00
|
|
|
turnstileSecretKey: instance.turnstileSecretKey,
|
2022-09-17 18:27:08 +00:00
|
|
|
sensitiveMediaDetection: instance.sensitiveMediaDetection,
|
|
|
|
sensitiveMediaDetectionSensitivity: instance.sensitiveMediaDetectionSensitivity,
|
|
|
|
setSensitiveFlagAutomatically: instance.setSensitiveFlagAutomatically,
|
|
|
|
enableSensitiveMediaDetectionForVideos: instance.enableSensitiveMediaDetectionForVideos,
|
2023-10-18 05:29:16 +00:00
|
|
|
enableBotTrending: instance.enableBotTrending,
|
2022-09-17 18:27:08 +00:00
|
|
|
proxyAccountId: instance.proxyAccountId,
|
|
|
|
summalyProxy: instance.summalyProxy,
|
|
|
|
email: instance.email,
|
|
|
|
smtpSecure: instance.smtpSecure,
|
|
|
|
smtpHost: instance.smtpHost,
|
|
|
|
smtpPort: instance.smtpPort,
|
|
|
|
smtpUser: instance.smtpUser,
|
|
|
|
smtpPass: instance.smtpPass,
|
|
|
|
swPrivateKey: instance.swPrivateKey,
|
|
|
|
useObjectStorage: instance.useObjectStorage,
|
|
|
|
objectStorageBaseUrl: instance.objectStorageBaseUrl,
|
|
|
|
objectStorageBucket: instance.objectStorageBucket,
|
|
|
|
objectStoragePrefix: instance.objectStoragePrefix,
|
|
|
|
objectStorageEndpoint: instance.objectStorageEndpoint,
|
|
|
|
objectStorageRegion: instance.objectStorageRegion,
|
|
|
|
objectStoragePort: instance.objectStoragePort,
|
|
|
|
objectStorageAccessKey: instance.objectStorageAccessKey,
|
|
|
|
objectStorageSecretKey: instance.objectStorageSecretKey,
|
|
|
|
objectStorageUseSSL: instance.objectStorageUseSSL,
|
|
|
|
objectStorageUseProxy: instance.objectStorageUseProxy,
|
|
|
|
objectStorageSetPublicRead: instance.objectStorageSetPublicRead,
|
|
|
|
objectStorageS3ForcePathStyle: instance.objectStorageS3ForcePathStyle,
|
|
|
|
deeplAuthKey: instance.deeplAuthKey,
|
|
|
|
deeplIsPro: instance.deeplIsPro,
|
2024-01-26 20:29:38 +00:00
|
|
|
deeplFreeMode: instance.deeplFreeMode,
|
|
|
|
deeplFreeInstance: instance.deeplFreeInstance,
|
2022-09-17 18:27:08 +00:00
|
|
|
enableIpLogging: instance.enableIpLogging,
|
|
|
|
enableActiveEmailValidation: instance.enableActiveEmailValidation,
|
2023-11-22 01:13:46 +00:00
|
|
|
enableVerifymailApi: instance.enableVerifymailApi,
|
|
|
|
verifymailAuthKey: instance.verifymailAuthKey,
|
2023-12-29 09:23:29 +00:00
|
|
|
enableTruemailApi: instance.enableTruemailApi,
|
|
|
|
truemailInstance: instance.truemailInstance,
|
|
|
|
truemailAuthKey: instance.truemailAuthKey,
|
2023-03-24 06:43:36 +00:00
|
|
|
enableChartsForRemoteUser: instance.enableChartsForRemoteUser,
|
2023-03-24 10:08:08 +00:00
|
|
|
enableChartsForFederatedInstances: instance.enableChartsForFederatedInstances,
|
2023-07-02 07:02:32 +00:00
|
|
|
enableServerMachineStats: instance.enableServerMachineStats,
|
2023-09-28 22:57:38 +00:00
|
|
|
enableAchievements: instance.enableAchievements,
|
2023-07-02 07:02:32 +00:00
|
|
|
enableIdenticonGeneration: instance.enableIdenticonGeneration,
|
2023-12-23 03:06:22 +00:00
|
|
|
bannedEmailDomains: instance.bannedEmailDomains,
|
2023-01-15 11:52:53 +00:00
|
|
|
policies: { ...DEFAULT_POLICIES, ...instance.policies },
|
2023-09-16 08:05:17 +00:00
|
|
|
manifestJsonOverride: instance.manifestJsonOverride,
|
2023-10-23 06:17:25 +00:00
|
|
|
enableFanoutTimeline: instance.enableFanoutTimeline,
|
2023-11-16 01:20:57 +00:00
|
|
|
enableFanoutTimelineDbFallback: instance.enableFanoutTimelineDbFallback,
|
2023-10-03 23:46:27 +00:00
|
|
|
perLocalUserUserTimelineCacheMax: instance.perLocalUserUserTimelineCacheMax,
|
|
|
|
perRemoteUserUserTimelineCacheMax: instance.perRemoteUserUserTimelineCacheMax,
|
|
|
|
perUserHomeTimelineCacheMax: instance.perUserHomeTimelineCacheMax,
|
|
|
|
perUserListTimelineCacheMax: instance.perUserListTimelineCacheMax,
|
2023-10-08 08:56:44 +00:00
|
|
|
notesPerOneAd: instance.notesPerOneAd,
|
2022-09-17 18:27:08 +00:00
|
|
|
};
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|