feat: 通報を受けた際にメールまたはWebhookで通知を送出出来るようにする (#13758)

* feat: 通報を受けた際にメールまたはWebhookで通知を送出出来るようにする

* モデログに対応&エンドポイントを単一オブジェクトでのサポートに変更(API経由で大量に作るシチュエーションもないと思うので)

* fix spdx

* fix migration

* fix migration

* fix models

* add e2e webhook

* tweak

* fix modlog

* fix bugs

* add tests and fix bugs

* add tests and fix bugs

* add tests

* fix path

* regenerate locale

* 混入除去

* 混入除去

* add abuseReportResolved

* fix pnpm-lock.yaml

* add abuseReportResolved test

* fix bugs

* fix ui

* add tests

* fix CHANGELOG.md

* add tests

* add RoleService.getModeratorIds tests

* WebhookServiceをUserとSystemに分割

* fix CHANGELOG.md

* fix test

* insertOneを使う用に

* fix

* regenerate locales

* revert version

* separate webhook job queue

* fix

* 🎨

* Update QueueProcessorService.ts

---------

Co-authored-by: osamu <46447427+sam-osamu@users.noreply.github.com>
Co-authored-by: syuilo <4439005+syuilo@users.noreply.github.com>
This commit is contained in:
おさむのひと 2024-06-08 15:34:19 +09:00 committed by GitHub
parent e0cf5b2402
commit 61fae45390
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
79 changed files with 6527 additions and 369 deletions

View file

@ -6,6 +6,11 @@
import { EventEmitter } from 'eventemitter3';
// Warning: (ae-forgotten-export) The symbol "components" needs to be exported by the entry point index.d.ts
//
// @public (undocumented)
type AbuseReportNotificationRecipient = components['schemas']['AbuseReportNotificationRecipient'];
// @public (undocumented)
export type Acct = {
username: string;
@ -21,13 +26,38 @@ declare namespace acct {
}
export { acct }
// Warning: (ae-forgotten-export) The symbol "components" needs to be exported by the entry point index.d.ts
//
// @public (undocumented)
type Ad = components['schemas']['Ad'];
// Warning: (ae-forgotten-export) The symbol "operations" needs to be exported by the entry point index.d.ts
//
// @public (undocumented)
type AdminAbuseReportNotificationRecipientCreateRequest = operations['admin___abuse-report___notification-recipient___create']['requestBody']['content']['application/json'];
// @public (undocumented)
type AdminAbuseReportNotificationRecipientCreateResponse = operations['admin___abuse-report___notification-recipient___create']['responses']['200']['content']['application/json'];
// @public (undocumented)
type AdminAbuseReportNotificationRecipientDeleteRequest = operations['admin___abuse-report___notification-recipient___delete']['requestBody']['content']['application/json'];
// @public (undocumented)
type AdminAbuseReportNotificationRecipientListRequest = operations['admin___abuse-report___notification-recipient___list']['requestBody']['content']['application/json'];
// @public (undocumented)
type AdminAbuseReportNotificationRecipientListResponse = operations['admin___abuse-report___notification-recipient___list']['responses']['200']['content']['application/json'];
// @public (undocumented)
type AdminAbuseReportNotificationRecipientShowRequest = operations['admin___abuse-report___notification-recipient___show']['requestBody']['content']['application/json'];
// @public (undocumented)
type AdminAbuseReportNotificationRecipientShowResponse = operations['admin___abuse-report___notification-recipient___show']['responses']['200']['content']['application/json'];
// @public (undocumented)
type AdminAbuseReportNotificationRecipientUpdateRequest = operations['admin___abuse-report___notification-recipient___update']['requestBody']['content']['application/json'];
// @public (undocumented)
type AdminAbuseReportNotificationRecipientUpdateResponse = operations['admin___abuse-report___notification-recipient___update']['responses']['200']['content']['application/json'];
// @public (undocumented)
type AdminAbuseUserReportsRequest = operations['admin___abuse-user-reports']['requestBody']['content']['application/json'];
@ -307,6 +337,33 @@ type AdminShowUsersResponse = operations['admin___show-users']['responses']['200
// @public (undocumented)
type AdminSuspendUserRequest = operations['admin___suspend-user']['requestBody']['content']['application/json'];
// @public (undocumented)
type AdminSystemWebhookCreateRequest = operations['admin___system-webhook___create']['requestBody']['content']['application/json'];
// @public (undocumented)
type AdminSystemWebhookCreateResponse = operations['admin___system-webhook___create']['responses']['200']['content']['application/json'];
// @public (undocumented)
type AdminSystemWebhookDeleteRequest = operations['admin___system-webhook___delete']['requestBody']['content']['application/json'];
// @public (undocumented)
type AdminSystemWebhookListRequest = operations['admin___system-webhook___list']['requestBody']['content']['application/json'];
// @public (undocumented)
type AdminSystemWebhookListResponse = operations['admin___system-webhook___list']['responses']['200']['content']['application/json'];
// @public (undocumented)
type AdminSystemWebhookShowRequest = operations['admin___system-webhook___show']['requestBody']['content']['application/json'];
// @public (undocumented)
type AdminSystemWebhookShowResponse = operations['admin___system-webhook___show']['responses']['200']['content']['application/json'];
// @public (undocumented)
type AdminSystemWebhookUpdateRequest = operations['admin___system-webhook___update']['requestBody']['content']['application/json'];
// @public (undocumented)
type AdminSystemWebhookUpdateResponse = operations['admin___system-webhook___update']['responses']['200']['content']['application/json'];
// @public (undocumented)
type AdminUnsetUserAvatarRequest = operations['admin___unset-user-avatar']['requestBody']['content']['application/json'];
@ -1133,6 +1190,15 @@ declare namespace entities {
AdminMetaResponse,
AdminAbuseUserReportsRequest,
AdminAbuseUserReportsResponse,
AdminAbuseReportNotificationRecipientListRequest,
AdminAbuseReportNotificationRecipientListResponse,
AdminAbuseReportNotificationRecipientShowRequest,
AdminAbuseReportNotificationRecipientShowResponse,
AdminAbuseReportNotificationRecipientCreateRequest,
AdminAbuseReportNotificationRecipientCreateResponse,
AdminAbuseReportNotificationRecipientUpdateRequest,
AdminAbuseReportNotificationRecipientUpdateResponse,
AdminAbuseReportNotificationRecipientDeleteRequest,
AdminAccountsCreateRequest,
AdminAccountsCreateResponse,
AdminAccountsDeleteRequest,
@ -1228,6 +1294,15 @@ declare namespace entities {
AdminRolesUpdateDefaultPoliciesRequest,
AdminRolesUsersRequest,
AdminRolesUsersResponse,
AdminSystemWebhookCreateRequest,
AdminSystemWebhookCreateResponse,
AdminSystemWebhookDeleteRequest,
AdminSystemWebhookListRequest,
AdminSystemWebhookListResponse,
AdminSystemWebhookShowRequest,
AdminSystemWebhookShowResponse,
AdminSystemWebhookUpdateRequest,
AdminSystemWebhookUpdateResponse,
AnnouncementsRequest,
AnnouncementsResponse,
AnnouncementsShowRequest,
@ -1733,7 +1808,9 @@ declare namespace entities {
ReversiGameDetailed,
MetaLite,
MetaDetailedOnly,
MetaDetailed
MetaDetailed,
SystemWebhook,
AbuseReportNotificationRecipient
}
}
export { entities }
@ -2380,8 +2457,23 @@ type ModerationLog = {
type: 'unsetUserAvatar';
info: ModerationLogPayloads['unsetUserAvatar'];
} | {
type: 'unsetUserBanner';
info: ModerationLogPayloads['unsetUserBanner'];
type: 'createSystemWebhook';
info: ModerationLogPayloads['createSystemWebhook'];
} | {
type: 'updateSystemWebhook';
info: ModerationLogPayloads['updateSystemWebhook'];
} | {
type: 'deleteSystemWebhook';
info: ModerationLogPayloads['deleteSystemWebhook'];
} | {
type: 'createAbuseReportNotificationRecipient';
info: ModerationLogPayloads['createAbuseReportNotificationRecipient'];
} | {
type: 'updateAbuseReportNotificationRecipient';
info: ModerationLogPayloads['updateAbuseReportNotificationRecipient'];
} | {
type: 'deleteAbuseReportNotificationRecipient';
info: ModerationLogPayloads['deleteAbuseReportNotificationRecipient'];
});
// @public (undocumented)
@ -2921,6 +3013,9 @@ type SwUpdateRegistrationRequest = operations['sw___update-registration']['reque
// @public (undocumented)
type SwUpdateRegistrationResponse = operations['sw___update-registration']['responses']['200']['content']['application/json'];
// @public (undocumented)
type SystemWebhook = components['schemas']['SystemWebhook'];
// @public (undocumented)
type TestRequest = operations['test']['requestBody']['content']['application/json'];

View file

@ -25,6 +25,66 @@ declare module '../api.js' {
credential?: string | null,
): Promise<SwitchCaseResponseType<E, P>>;
/**
* No description provided.
*
* **Internal Endpoint**: This endpoint is an API for the misskey mainframe and is not intended for use by third parties.
* **Credential required**: *Yes* / **Permission**: *read:admin:abuse-report:notification-recipient*
*/
request<E extends 'admin/abuse-report/notification-recipient/list', P extends Endpoints[E]['req']>(
endpoint: E,
params: P,
credential?: string | null,
): Promise<SwitchCaseResponseType<E, P>>;
/**
* No description provided.
*
* **Internal Endpoint**: This endpoint is an API for the misskey mainframe and is not intended for use by third parties.
* **Credential required**: *Yes* / **Permission**: *read:admin:abuse-report:notification-recipient*
*/
request<E extends 'admin/abuse-report/notification-recipient/show', P extends Endpoints[E]['req']>(
endpoint: E,
params: P,
credential?: string | null,
): Promise<SwitchCaseResponseType<E, P>>;
/**
* No description provided.
*
* **Internal Endpoint**: This endpoint is an API for the misskey mainframe and is not intended for use by third parties.
* **Credential required**: *Yes* / **Permission**: *write:admin:abuse-report:notification-recipient*
*/
request<E extends 'admin/abuse-report/notification-recipient/create', P extends Endpoints[E]['req']>(
endpoint: E,
params: P,
credential?: string | null,
): Promise<SwitchCaseResponseType<E, P>>;
/**
* No description provided.
*
* **Internal Endpoint**: This endpoint is an API for the misskey mainframe and is not intended for use by third parties.
* **Credential required**: *Yes* / **Permission**: *write:admin:abuse-report:notification-recipient*
*/
request<E extends 'admin/abuse-report/notification-recipient/update', P extends Endpoints[E]['req']>(
endpoint: E,
params: P,
credential?: string | null,
): Promise<SwitchCaseResponseType<E, P>>;
/**
* No description provided.
*
* **Internal Endpoint**: This endpoint is an API for the misskey mainframe and is not intended for use by third parties.
* **Credential required**: *Yes* / **Permission**: *write:admin:abuse-report:notification-recipient*
*/
request<E extends 'admin/abuse-report/notification-recipient/delete', P extends Endpoints[E]['req']>(
endpoint: E,
params: P,
credential?: string | null,
): Promise<SwitchCaseResponseType<E, P>>;
/**
* No description provided.
*
@ -840,6 +900,66 @@ declare module '../api.js' {
credential?: string | null,
): Promise<SwitchCaseResponseType<E, P>>;
/**
* No description provided.
*
* **Internal Endpoint**: This endpoint is an API for the misskey mainframe and is not intended for use by third parties.
* **Credential required**: *Yes* / **Permission**: *write:admin:system-webhook*
*/
request<E extends 'admin/system-webhook/create', P extends Endpoints[E]['req']>(
endpoint: E,
params: P,
credential?: string | null,
): Promise<SwitchCaseResponseType<E, P>>;
/**
* No description provided.
*
* **Internal Endpoint**: This endpoint is an API for the misskey mainframe and is not intended for use by third parties.
* **Credential required**: *Yes* / **Permission**: *write:admin:system-webhook*
*/
request<E extends 'admin/system-webhook/delete', P extends Endpoints[E]['req']>(
endpoint: E,
params: P,
credential?: string | null,
): Promise<SwitchCaseResponseType<E, P>>;
/**
* No description provided.
*
* **Internal Endpoint**: This endpoint is an API for the misskey mainframe and is not intended for use by third parties.
* **Credential required**: *Yes* / **Permission**: *write:admin:system-webhook*
*/
request<E extends 'admin/system-webhook/list', P extends Endpoints[E]['req']>(
endpoint: E,
params: P,
credential?: string | null,
): Promise<SwitchCaseResponseType<E, P>>;
/**
* No description provided.
*
* **Internal Endpoint**: This endpoint is an API for the misskey mainframe and is not intended for use by third parties.
* **Credential required**: *Yes* / **Permission**: *write:admin:system-webhook*
*/
request<E extends 'admin/system-webhook/show', P extends Endpoints[E]['req']>(
endpoint: E,
params: P,
credential?: string | null,
): Promise<SwitchCaseResponseType<E, P>>;
/**
* No description provided.
*
* **Internal Endpoint**: This endpoint is an API for the misskey mainframe and is not intended for use by third parties.
* **Credential required**: *Yes* / **Permission**: *write:admin:system-webhook*
*/
request<E extends 'admin/system-webhook/update', P extends Endpoints[E]['req']>(
endpoint: E,
params: P,
credential?: string | null,
): Promise<SwitchCaseResponseType<E, P>>;
/**
* No description provided.
*

View file

@ -4,6 +4,15 @@ import type {
AdminMetaResponse,
AdminAbuseUserReportsRequest,
AdminAbuseUserReportsResponse,
AdminAbuseReportNotificationRecipientListRequest,
AdminAbuseReportNotificationRecipientListResponse,
AdminAbuseReportNotificationRecipientShowRequest,
AdminAbuseReportNotificationRecipientShowResponse,
AdminAbuseReportNotificationRecipientCreateRequest,
AdminAbuseReportNotificationRecipientCreateResponse,
AdminAbuseReportNotificationRecipientUpdateRequest,
AdminAbuseReportNotificationRecipientUpdateResponse,
AdminAbuseReportNotificationRecipientDeleteRequest,
AdminAccountsCreateRequest,
AdminAccountsCreateResponse,
AdminAccountsDeleteRequest,
@ -99,6 +108,15 @@ import type {
AdminRolesUpdateDefaultPoliciesRequest,
AdminRolesUsersRequest,
AdminRolesUsersResponse,
AdminSystemWebhookCreateRequest,
AdminSystemWebhookCreateResponse,
AdminSystemWebhookDeleteRequest,
AdminSystemWebhookListRequest,
AdminSystemWebhookListResponse,
AdminSystemWebhookShowRequest,
AdminSystemWebhookShowResponse,
AdminSystemWebhookUpdateRequest,
AdminSystemWebhookUpdateResponse,
AnnouncementsRequest,
AnnouncementsResponse,
AnnouncementsShowRequest,
@ -558,6 +576,11 @@ import type {
export type Endpoints = {
'admin/meta': { req: EmptyRequest; res: AdminMetaResponse };
'admin/abuse-user-reports': { req: AdminAbuseUserReportsRequest; res: AdminAbuseUserReportsResponse };
'admin/abuse-report/notification-recipient/list': { req: AdminAbuseReportNotificationRecipientListRequest; res: AdminAbuseReportNotificationRecipientListResponse };
'admin/abuse-report/notification-recipient/show': { req: AdminAbuseReportNotificationRecipientShowRequest; res: AdminAbuseReportNotificationRecipientShowResponse };
'admin/abuse-report/notification-recipient/create': { req: AdminAbuseReportNotificationRecipientCreateRequest; res: AdminAbuseReportNotificationRecipientCreateResponse };
'admin/abuse-report/notification-recipient/update': { req: AdminAbuseReportNotificationRecipientUpdateRequest; res: AdminAbuseReportNotificationRecipientUpdateResponse };
'admin/abuse-report/notification-recipient/delete': { req: AdminAbuseReportNotificationRecipientDeleteRequest; res: EmptyResponse };
'admin/accounts/create': { req: AdminAccountsCreateRequest; res: AdminAccountsCreateResponse };
'admin/accounts/delete': { req: AdminAccountsDeleteRequest; res: EmptyResponse };
'admin/accounts/find-by-email': { req: AdminAccountsFindByEmailRequest; res: AdminAccountsFindByEmailResponse };
@ -632,6 +655,11 @@ export type Endpoints = {
'admin/roles/unassign': { req: AdminRolesUnassignRequest; res: EmptyResponse };
'admin/roles/update-default-policies': { req: AdminRolesUpdateDefaultPoliciesRequest; res: EmptyResponse };
'admin/roles/users': { req: AdminRolesUsersRequest; res: AdminRolesUsersResponse };
'admin/system-webhook/create': { req: AdminSystemWebhookCreateRequest; res: AdminSystemWebhookCreateResponse };
'admin/system-webhook/delete': { req: AdminSystemWebhookDeleteRequest; res: EmptyResponse };
'admin/system-webhook/list': { req: AdminSystemWebhookListRequest; res: AdminSystemWebhookListResponse };
'admin/system-webhook/show': { req: AdminSystemWebhookShowRequest; res: AdminSystemWebhookShowResponse };
'admin/system-webhook/update': { req: AdminSystemWebhookUpdateRequest; res: AdminSystemWebhookUpdateResponse };
'announcements': { req: AnnouncementsRequest; res: AnnouncementsResponse };
'announcements/show': { req: AnnouncementsShowRequest; res: AnnouncementsShowResponse };
'antennas/create': { req: AntennasCreateRequest; res: AntennasCreateResponse };

View file

@ -7,6 +7,15 @@ export type EmptyResponse = Record<string, unknown> | undefined;
export type AdminMetaResponse = operations['admin___meta']['responses']['200']['content']['application/json'];
export type AdminAbuseUserReportsRequest = operations['admin___abuse-user-reports']['requestBody']['content']['application/json'];
export type AdminAbuseUserReportsResponse = operations['admin___abuse-user-reports']['responses']['200']['content']['application/json'];
export type AdminAbuseReportNotificationRecipientListRequest = operations['admin___abuse-report___notification-recipient___list']['requestBody']['content']['application/json'];
export type AdminAbuseReportNotificationRecipientListResponse = operations['admin___abuse-report___notification-recipient___list']['responses']['200']['content']['application/json'];
export type AdminAbuseReportNotificationRecipientShowRequest = operations['admin___abuse-report___notification-recipient___show']['requestBody']['content']['application/json'];
export type AdminAbuseReportNotificationRecipientShowResponse = operations['admin___abuse-report___notification-recipient___show']['responses']['200']['content']['application/json'];
export type AdminAbuseReportNotificationRecipientCreateRequest = operations['admin___abuse-report___notification-recipient___create']['requestBody']['content']['application/json'];
export type AdminAbuseReportNotificationRecipientCreateResponse = operations['admin___abuse-report___notification-recipient___create']['responses']['200']['content']['application/json'];
export type AdminAbuseReportNotificationRecipientUpdateRequest = operations['admin___abuse-report___notification-recipient___update']['requestBody']['content']['application/json'];
export type AdminAbuseReportNotificationRecipientUpdateResponse = operations['admin___abuse-report___notification-recipient___update']['responses']['200']['content']['application/json'];
export type AdminAbuseReportNotificationRecipientDeleteRequest = operations['admin___abuse-report___notification-recipient___delete']['requestBody']['content']['application/json'];
export type AdminAccountsCreateRequest = operations['admin___accounts___create']['requestBody']['content']['application/json'];
export type AdminAccountsCreateResponse = operations['admin___accounts___create']['responses']['200']['content']['application/json'];
export type AdminAccountsDeleteRequest = operations['admin___accounts___delete']['requestBody']['content']['application/json'];
@ -102,6 +111,15 @@ export type AdminRolesUnassignRequest = operations['admin___roles___unassign']['
export type AdminRolesUpdateDefaultPoliciesRequest = operations['admin___roles___update-default-policies']['requestBody']['content']['application/json'];
export type AdminRolesUsersRequest = operations['admin___roles___users']['requestBody']['content']['application/json'];
export type AdminRolesUsersResponse = operations['admin___roles___users']['responses']['200']['content']['application/json'];
export type AdminSystemWebhookCreateRequest = operations['admin___system-webhook___create']['requestBody']['content']['application/json'];
export type AdminSystemWebhookCreateResponse = operations['admin___system-webhook___create']['responses']['200']['content']['application/json'];
export type AdminSystemWebhookDeleteRequest = operations['admin___system-webhook___delete']['requestBody']['content']['application/json'];
export type AdminSystemWebhookListRequest = operations['admin___system-webhook___list']['requestBody']['content']['application/json'];
export type AdminSystemWebhookListResponse = operations['admin___system-webhook___list']['responses']['200']['content']['application/json'];
export type AdminSystemWebhookShowRequest = operations['admin___system-webhook___show']['requestBody']['content']['application/json'];
export type AdminSystemWebhookShowResponse = operations['admin___system-webhook___show']['responses']['200']['content']['application/json'];
export type AdminSystemWebhookUpdateRequest = operations['admin___system-webhook___update']['requestBody']['content']['application/json'];
export type AdminSystemWebhookUpdateResponse = operations['admin___system-webhook___update']['responses']['200']['content']['application/json'];
export type AnnouncementsRequest = operations['announcements']['requestBody']['content']['application/json'];
export type AnnouncementsResponse = operations['announcements']['responses']['200']['content']['application/json'];
export type AnnouncementsShowRequest = operations['announcements___show']['requestBody']['content']['application/json'];

View file

@ -51,3 +51,5 @@ export type ReversiGameDetailed = components['schemas']['ReversiGameDetailed'];
export type MetaLite = components['schemas']['MetaLite'];
export type MetaDetailedOnly = components['schemas']['MetaDetailedOnly'];
export type MetaDetailed = components['schemas']['MetaDetailed'];
export type SystemWebhook = components['schemas']['SystemWebhook'];
export type AbuseReportNotificationRecipient = components['schemas']['AbuseReportNotificationRecipient'];

View file

@ -30,6 +30,56 @@ export type paths = {
*/
post: operations['admin___abuse-user-reports'];
};
'/admin/abuse-report/notification-recipient/list': {
/**
* admin/abuse-report/notification-recipient/list
* @description No description provided.
*
* **Internal Endpoint**: This endpoint is an API for the misskey mainframe and is not intended for use by third parties.
* **Credential required**: *Yes* / **Permission**: *read:admin:abuse-report:notification-recipient*
*/
post: operations['admin___abuse-report___notification-recipient___list'];
};
'/admin/abuse-report/notification-recipient/show': {
/**
* admin/abuse-report/notification-recipient/show
* @description No description provided.
*
* **Internal Endpoint**: This endpoint is an API for the misskey mainframe and is not intended for use by third parties.
* **Credential required**: *Yes* / **Permission**: *read:admin:abuse-report:notification-recipient*
*/
post: operations['admin___abuse-report___notification-recipient___show'];
};
'/admin/abuse-report/notification-recipient/create': {
/**
* admin/abuse-report/notification-recipient/create
* @description No description provided.
*
* **Internal Endpoint**: This endpoint is an API for the misskey mainframe and is not intended for use by third parties.
* **Credential required**: *Yes* / **Permission**: *write:admin:abuse-report:notification-recipient*
*/
post: operations['admin___abuse-report___notification-recipient___create'];
};
'/admin/abuse-report/notification-recipient/update': {
/**
* admin/abuse-report/notification-recipient/update
* @description No description provided.
*
* **Internal Endpoint**: This endpoint is an API for the misskey mainframe and is not intended for use by third parties.
* **Credential required**: *Yes* / **Permission**: *write:admin:abuse-report:notification-recipient*
*/
post: operations['admin___abuse-report___notification-recipient___update'];
};
'/admin/abuse-report/notification-recipient/delete': {
/**
* admin/abuse-report/notification-recipient/delete
* @description No description provided.
*
* **Internal Endpoint**: This endpoint is an API for the misskey mainframe and is not intended for use by third parties.
* **Credential required**: *Yes* / **Permission**: *write:admin:abuse-report:notification-recipient*
*/
post: operations['admin___abuse-report___notification-recipient___delete'];
};
'/admin/accounts/create': {
/**
* admin/accounts/create
@ -697,6 +747,56 @@ export type paths = {
*/
post: operations['admin___roles___users'];
};
'/admin/system-webhook/create': {
/**
* admin/system-webhook/create
* @description No description provided.
*
* **Internal Endpoint**: This endpoint is an API for the misskey mainframe and is not intended for use by third parties.
* **Credential required**: *Yes* / **Permission**: *write:admin:system-webhook*
*/
post: operations['admin___system-webhook___create'];
};
'/admin/system-webhook/delete': {
/**
* admin/system-webhook/delete
* @description No description provided.
*
* **Internal Endpoint**: This endpoint is an API for the misskey mainframe and is not intended for use by third parties.
* **Credential required**: *Yes* / **Permission**: *write:admin:system-webhook*
*/
post: operations['admin___system-webhook___delete'];
};
'/admin/system-webhook/list': {
/**
* admin/system-webhook/list
* @description No description provided.
*
* **Internal Endpoint**: This endpoint is an API for the misskey mainframe and is not intended for use by third parties.
* **Credential required**: *Yes* / **Permission**: *write:admin:system-webhook*
*/
post: operations['admin___system-webhook___list'];
};
'/admin/system-webhook/show': {
/**
* admin/system-webhook/show
* @description No description provided.
*
* **Internal Endpoint**: This endpoint is an API for the misskey mainframe and is not intended for use by third parties.
* **Credential required**: *Yes* / **Permission**: *write:admin:system-webhook*
*/
post: operations['admin___system-webhook___show'];
};
'/admin/system-webhook/update': {
/**
* admin/system-webhook/update
* @description No description provided.
*
* **Internal Endpoint**: This endpoint is an API for the misskey mainframe and is not intended for use by third parties.
* **Credential required**: *Yes* / **Permission**: *write:admin:system-webhook*
*/
post: operations['admin___system-webhook___update'];
};
'/announcements': {
/**
* announcements
@ -4859,6 +4959,32 @@ export type components = {
cacheRemoteSensitiveFiles: boolean;
};
MetaDetailed: components['schemas']['MetaLite'] & components['schemas']['MetaDetailedOnly'];
SystemWebhook: {
id: string;
isActive: boolean;
/** Format: date-time */
updatedAt: string;
/** Format: date-time */
latestSentAt: string | null;
latestStatus: number | null;
name: string;
on: ('abuseReport' | 'abuseReportResolved')[];
url: string;
secret: string;
};
AbuseReportNotificationRecipient: {
id: string;
isActive: boolean;
/** Format: date-time */
updatedAt: string;
name: string;
/** @enum {string} */
method: 'email' | 'webhook';
userId?: string;
user?: components['schemas']['UserLite'];
systemWebhookId?: string;
systemWebhook?: components['schemas']['SystemWebhook'];
};
};
responses: never;
parameters: never;
@ -5125,6 +5251,292 @@ export type operations = {
};
};
};
/**
* admin/abuse-report/notification-recipient/list
* @description No description provided.
*
* **Internal Endpoint**: This endpoint is an API for the misskey mainframe and is not intended for use by third parties.
* **Credential required**: *Yes* / **Permission**: *read:admin:abuse-report:notification-recipient*
*/
'admin___abuse-report___notification-recipient___list': {
requestBody: {
content: {
'application/json': {
method?: ('email' | 'webhook')[];
};
};
};
responses: {
/** @description OK (with results) */
200: {
content: {
'application/json': components['schemas']['AbuseReportNotificationRecipient'][];
};
};
/** @description Client error */
400: {
content: {
'application/json': components['schemas']['Error'];
};
};
/** @description Authentication error */
401: {
content: {
'application/json': components['schemas']['Error'];
};
};
/** @description Forbidden error */
403: {
content: {
'application/json': components['schemas']['Error'];
};
};
/** @description I'm Ai */
418: {
content: {
'application/json': components['schemas']['Error'];
};
};
/** @description Internal server error */
500: {
content: {
'application/json': components['schemas']['Error'];
};
};
};
};
/**
* admin/abuse-report/notification-recipient/show
* @description No description provided.
*
* **Internal Endpoint**: This endpoint is an API for the misskey mainframe and is not intended for use by third parties.
* **Credential required**: *Yes* / **Permission**: *read:admin:abuse-report:notification-recipient*
*/
'admin___abuse-report___notification-recipient___show': {
requestBody: {
content: {
'application/json': {
/** Format: misskey:id */
id: string;
};
};
};
responses: {
/** @description OK (with results) */
200: {
content: {
'application/json': components['schemas']['AbuseReportNotificationRecipient'];
};
};
/** @description Client error */
400: {
content: {
'application/json': components['schemas']['Error'];
};
};
/** @description Authentication error */
401: {
content: {
'application/json': components['schemas']['Error'];
};
};
/** @description Forbidden error */
403: {
content: {
'application/json': components['schemas']['Error'];
};
};
/** @description I'm Ai */
418: {
content: {
'application/json': components['schemas']['Error'];
};
};
/** @description Internal server error */
500: {
content: {
'application/json': components['schemas']['Error'];
};
};
};
};
/**
* admin/abuse-report/notification-recipient/create
* @description No description provided.
*
* **Internal Endpoint**: This endpoint is an API for the misskey mainframe and is not intended for use by third parties.
* **Credential required**: *Yes* / **Permission**: *write:admin:abuse-report:notification-recipient*
*/
'admin___abuse-report___notification-recipient___create': {
requestBody: {
content: {
'application/json': {
isActive: boolean;
name: string;
/** @enum {string} */
method: 'email' | 'webhook';
/** Format: misskey:id */
userId?: string;
/** Format: misskey:id */
systemWebhookId?: string;
};
};
};
responses: {
/** @description OK (with results) */
200: {
content: {
'application/json': components['schemas']['AbuseReportNotificationRecipient'];
};
};
/** @description Client error */
400: {
content: {
'application/json': components['schemas']['Error'];
};
};
/** @description Authentication error */
401: {
content: {
'application/json': components['schemas']['Error'];
};
};
/** @description Forbidden error */
403: {
content: {
'application/json': components['schemas']['Error'];
};
};
/** @description I'm Ai */
418: {
content: {
'application/json': components['schemas']['Error'];
};
};
/** @description Internal server error */
500: {
content: {
'application/json': components['schemas']['Error'];
};
};
};
};
/**
* admin/abuse-report/notification-recipient/update
* @description No description provided.
*
* **Internal Endpoint**: This endpoint is an API for the misskey mainframe and is not intended for use by third parties.
* **Credential required**: *Yes* / **Permission**: *write:admin:abuse-report:notification-recipient*
*/
'admin___abuse-report___notification-recipient___update': {
requestBody: {
content: {
'application/json': {
/** Format: misskey:id */
id: string;
isActive: boolean;
name: string;
/** @enum {string} */
method: 'email' | 'webhook';
/** Format: misskey:id */
userId?: string;
/** Format: misskey:id */
systemWebhookId?: string;
};
};
};
responses: {
/** @description OK (with results) */
200: {
content: {
'application/json': components['schemas']['AbuseReportNotificationRecipient'];
};
};
/** @description Client error */
400: {
content: {
'application/json': components['schemas']['Error'];
};
};
/** @description Authentication error */
401: {
content: {
'application/json': components['schemas']['Error'];
};
};
/** @description Forbidden error */
403: {
content: {
'application/json': components['schemas']['Error'];
};
};
/** @description I'm Ai */
418: {
content: {
'application/json': components['schemas']['Error'];
};
};
/** @description Internal server error */
500: {
content: {
'application/json': components['schemas']['Error'];
};
};
};
};
/**
* admin/abuse-report/notification-recipient/delete
* @description No description provided.
*
* **Internal Endpoint**: This endpoint is an API for the misskey mainframe and is not intended for use by third parties.
* **Credential required**: *Yes* / **Permission**: *write:admin:abuse-report:notification-recipient*
*/
'admin___abuse-report___notification-recipient___delete': {
requestBody: {
content: {
'application/json': {
/** Format: misskey:id */
id: string;
};
};
};
responses: {
/** @description OK (without any results) */
204: {
content: never;
};
/** @description Client error */
400: {
content: {
'application/json': components['schemas']['Error'];
};
};
/** @description Authentication error */
401: {
content: {
'application/json': components['schemas']['Error'];
};
};
/** @description Forbidden error */
403: {
content: {
'application/json': components['schemas']['Error'];
};
};
/** @description I'm Ai */
418: {
content: {
'application/json': components['schemas']['Error'];
};
};
/** @description Internal server error */
500: {
content: {
'application/json': components['schemas']['Error'];
};
};
};
};
/**
* admin/accounts/create
* @description No description provided.
@ -9615,6 +10027,287 @@ export type operations = {
};
};
};
/**
* admin/system-webhook/create
* @description No description provided.
*
* **Internal Endpoint**: This endpoint is an API for the misskey mainframe and is not intended for use by third parties.
* **Credential required**: *Yes* / **Permission**: *write:admin:system-webhook*
*/
'admin___system-webhook___create': {
requestBody: {
content: {
'application/json': {
isActive: boolean;
name: string;
on: ('abuseReport' | 'abuseReportResolved')[];
url: string;
secret: string;
};
};
};
responses: {
/** @description OK (with results) */
200: {
content: {
'application/json': components['schemas']['SystemWebhook'];
};
};
/** @description Client error */
400: {
content: {
'application/json': components['schemas']['Error'];
};
};
/** @description Authentication error */
401: {
content: {
'application/json': components['schemas']['Error'];
};
};
/** @description Forbidden error */
403: {
content: {
'application/json': components['schemas']['Error'];
};
};
/** @description I'm Ai */
418: {
content: {
'application/json': components['schemas']['Error'];
};
};
/** @description Internal server error */
500: {
content: {
'application/json': components['schemas']['Error'];
};
};
};
};
/**
* admin/system-webhook/delete
* @description No description provided.
*
* **Internal Endpoint**: This endpoint is an API for the misskey mainframe and is not intended for use by third parties.
* **Credential required**: *Yes* / **Permission**: *write:admin:system-webhook*
*/
'admin___system-webhook___delete': {
requestBody: {
content: {
'application/json': {
/** Format: misskey:id */
id: string;
};
};
};
responses: {
/** @description OK (without any results) */
204: {
content: never;
};
/** @description Client error */
400: {
content: {
'application/json': components['schemas']['Error'];
};
};
/** @description Authentication error */
401: {
content: {
'application/json': components['schemas']['Error'];
};
};
/** @description Forbidden error */
403: {
content: {
'application/json': components['schemas']['Error'];
};
};
/** @description I'm Ai */
418: {
content: {
'application/json': components['schemas']['Error'];
};
};
/** @description Internal server error */
500: {
content: {
'application/json': components['schemas']['Error'];
};
};
};
};
/**
* admin/system-webhook/list
* @description No description provided.
*
* **Internal Endpoint**: This endpoint is an API for the misskey mainframe and is not intended for use by third parties.
* **Credential required**: *Yes* / **Permission**: *write:admin:system-webhook*
*/
'admin___system-webhook___list': {
requestBody: {
content: {
'application/json': {
isActive?: boolean;
on?: ('abuseReport' | 'abuseReportResolved')[];
};
};
};
responses: {
/** @description OK (with results) */
200: {
content: {
'application/json': components['schemas']['SystemWebhook'][];
};
};
/** @description Client error */
400: {
content: {
'application/json': components['schemas']['Error'];
};
};
/** @description Authentication error */
401: {
content: {
'application/json': components['schemas']['Error'];
};
};
/** @description Forbidden error */
403: {
content: {
'application/json': components['schemas']['Error'];
};
};
/** @description I'm Ai */
418: {
content: {
'application/json': components['schemas']['Error'];
};
};
/** @description Internal server error */
500: {
content: {
'application/json': components['schemas']['Error'];
};
};
};
};
/**
* admin/system-webhook/show
* @description No description provided.
*
* **Internal Endpoint**: This endpoint is an API for the misskey mainframe and is not intended for use by third parties.
* **Credential required**: *Yes* / **Permission**: *write:admin:system-webhook*
*/
'admin___system-webhook___show': {
requestBody: {
content: {
'application/json': {
/** Format: misskey:id */
id: string;
};
};
};
responses: {
/** @description OK (with results) */
200: {
content: {
'application/json': components['schemas']['SystemWebhook'];
};
};
/** @description Client error */
400: {
content: {
'application/json': components['schemas']['Error'];
};
};
/** @description Authentication error */
401: {
content: {
'application/json': components['schemas']['Error'];
};
};
/** @description Forbidden error */
403: {
content: {
'application/json': components['schemas']['Error'];
};
};
/** @description I'm Ai */
418: {
content: {
'application/json': components['schemas']['Error'];
};
};
/** @description Internal server error */
500: {
content: {
'application/json': components['schemas']['Error'];
};
};
};
};
/**
* admin/system-webhook/update
* @description No description provided.
*
* **Internal Endpoint**: This endpoint is an API for the misskey mainframe and is not intended for use by third parties.
* **Credential required**: *Yes* / **Permission**: *write:admin:system-webhook*
*/
'admin___system-webhook___update': {
requestBody: {
content: {
'application/json': {
/** Format: misskey:id */
id: string;
isActive: boolean;
name: string;
on: ('abuseReport' | 'abuseReportResolved')[];
url: string;
secret: string;
};
};
};
responses: {
/** @description OK (with results) */
200: {
content: {
'application/json': components['schemas']['SystemWebhook'];
};
};
/** @description Client error */
400: {
content: {
'application/json': components['schemas']['Error'];
};
};
/** @description Authentication error */
401: {
content: {
'application/json': components['schemas']['Error'];
};
};
/** @description Forbidden error */
403: {
content: {
'application/json': components['schemas']['Error'];
};
};
/** @description I'm Ai */
418: {
content: {
'application/json': components['schemas']['Error'];
};
};
/** @description Internal server error */
500: {
content: {
'application/json': components['schemas']['Error'];
};
};
};
};
/**
* announcements
* @description No description provided.

View file

@ -325,4 +325,30 @@ export type ModerationLogPayloads = {
userHost: string | null;
fileId: string;
};
createSystemWebhook: {
systemWebhookId: string;
webhook: any;
};
updateSystemWebhook: {
systemWebhookId: string;
before: any;
after: any;
};
deleteSystemWebhook: {
systemWebhookId: string;
webhook: any;
};
createAbuseReportNotificationRecipient: {
recipientId: string;
recipient: any;
};
updateAbuseReportNotificationRecipient: {
recipientId: string;
before: any;
after: any;
};
deleteAbuseReportNotificationRecipient: {
recipientId: string;
recipient: any;
};
};

View file

@ -132,8 +132,23 @@ export type ModerationLog = {
type: 'unsetUserAvatar';
info: ModerationLogPayloads['unsetUserAvatar'];
} | {
type: 'unsetUserBanner';
info: ModerationLogPayloads['unsetUserBanner'];
type: 'createSystemWebhook';
info: ModerationLogPayloads['createSystemWebhook'];
} | {
type: 'updateSystemWebhook';
info: ModerationLogPayloads['updateSystemWebhook'];
} | {
type: 'deleteSystemWebhook';
info: ModerationLogPayloads['deleteSystemWebhook'];
} | {
type: 'createAbuseReportNotificationRecipient';
info: ModerationLogPayloads['createAbuseReportNotificationRecipient'];
} | {
type: 'updateAbuseReportNotificationRecipient';
info: ModerationLogPayloads['updateAbuseReportNotificationRecipient'];
} | {
type: 'deleteAbuseReportNotificationRecipient';
info: ModerationLogPayloads['deleteAbuseReportNotificationRecipient'];
});
export type ServerStats = {