chore: センシティブ判定を外部サービス扱いにする (#17570)

* chore: センシティブ判定を外部サービス扱いにする

* fix review

* regenerate

* fix review

* fix review

* regenerate

* fix CHANGELOG.md

* fix review

* add comment

---------

Co-authored-by: syuilo <4439005+syuilo@users.noreply.github.com>
This commit is contained in:
おさむのひと
2026-06-26 17:47:00 +09:00
committed by GitHub
parent a1f995cba8
commit 669889f749
26 changed files with 1109 additions and 1117 deletions
@@ -238,6 +238,22 @@ export const meta = {
type: 'boolean',
optional: false, nullable: false,
},
sensitiveMediaDetectionApiUrl: {
type: 'string',
optional: false, nullable: true,
},
sensitiveMediaDetectionApiKey: {
type: 'string',
optional: false, nullable: true,
},
sensitiveMediaDetectionTimeout: {
type: 'number',
optional: false, nullable: false,
},
sensitiveMediaDetectionMaxImagesPerRequest: {
type: 'number',
optional: false, nullable: false,
},
proxyAccountId: {
type: 'string',
optional: false, nullable: false,
@@ -686,6 +702,10 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
sensitiveMediaDetectionSensitivity: instance.sensitiveMediaDetectionSensitivity,
setSensitiveFlagAutomatically: instance.setSensitiveFlagAutomatically,
enableSensitiveMediaDetectionForVideos: instance.enableSensitiveMediaDetectionForVideos,
sensitiveMediaDetectionApiUrl: instance.sensitiveMediaDetectionApiUrl,
sensitiveMediaDetectionApiKey: instance.sensitiveMediaDetectionApiKey,
sensitiveMediaDetectionTimeout: instance.sensitiveMediaDetectionTimeout,
sensitiveMediaDetectionMaxImagesPerRequest: instance.sensitiveMediaDetectionMaxImagesPerRequest,
proxyAccountId: proxy.id,
email: instance.email,
smtpSecure: instance.smtpSecure,
@@ -98,6 +98,10 @@ export const paramDef = {
sensitiveMediaDetectionSensitivity: { type: 'string', enum: ['medium', 'low', 'high', 'veryLow', 'veryHigh'] },
setSensitiveFlagAutomatically: { type: 'boolean' },
enableSensitiveMediaDetectionForVideos: { type: 'boolean' },
sensitiveMediaDetectionApiUrl: { type: 'string', nullable: true },
sensitiveMediaDetectionApiKey: { type: 'string', nullable: true },
sensitiveMediaDetectionTimeout: { type: 'integer', minimum: 1 },
sensitiveMediaDetectionMaxImagesPerRequest: { type: 'integer', minimum: 1 },
maintainerName: { type: 'string', nullable: true },
maintainerEmail: { type: 'string', nullable: true },
langs: {
@@ -436,6 +440,22 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
set.enableSensitiveMediaDetectionForVideos = ps.enableSensitiveMediaDetectionForVideos;
}
if (ps.sensitiveMediaDetectionApiUrl !== undefined) {
set.sensitiveMediaDetectionApiUrl = ps.sensitiveMediaDetectionApiUrl === '' ? null : ps.sensitiveMediaDetectionApiUrl;
}
if (ps.sensitiveMediaDetectionApiKey !== undefined) {
set.sensitiveMediaDetectionApiKey = ps.sensitiveMediaDetectionApiKey === '' ? null : ps.sensitiveMediaDetectionApiKey;
}
if (ps.sensitiveMediaDetectionTimeout !== undefined) {
set.sensitiveMediaDetectionTimeout = ps.sensitiveMediaDetectionTimeout;
}
if (ps.sensitiveMediaDetectionMaxImagesPerRequest !== undefined) {
set.sensitiveMediaDetectionMaxImagesPerRequest = ps.sensitiveMediaDetectionMaxImagesPerRequest;
}
if (ps.maintainerName !== undefined) {
set.maintainerName = ps.maintainerName;
}