CVE-2023-52139 (TypeScript, published 2023-12-29T18:15Z)
Description: value: Misskey is an open source, decentralized social media platform. Third-party applications may be able to access some endpoints or Websocket APIs that are incorrectly specified as [kind](https://github.com/misskey-dev/misskey/blob/406b4bdbe79b5b0b68fcdcb3c4b6e419460a0258/packages/backend/src/server/api/endpoints.ts#L811) or [secure](https://github.com/misskey-dev/misskey/blob/406b4bdbe79b5b0b68fcdcb3c4b6e419460a0258/packages/backend/src/server/api/endpoints.ts#L805) without the user's permission and perform operations such as reading or adding non-public content. As a result, if the user who authenticated the application is an administrator, confidential information such as object storage secret keys and SMTP server passwords will be leaked, and general users can also create invitation codes without permission and leak non-public user information. This is patched in version [2023.12.1](https://github.com/misskey-dev/misskey/commit/c96bc36fedc804dc840ea791a9355d7df0748e64).
Severity: nan (CVSS v3 base score: 9.6)
Weakness: CWE-285 \u2014 Improper Authorization
The product does not perform or incorrectly performs an authorization check when an actor attempts to access a resource or perform an action.
Repository: https://github.com/misskey-dev/misskey
Files changed:
CHANGELOG.md
locales/index.d.ts
locales/ja-JP.yml
packages/backend/src/server/api/ApiCallService.ts
packages/backend/src/server/api/StreamingApiServerService.ts
packages/backend/src/server/api/endpoints.ts
packages/backend/src/server/api/endpoints/admin/abuse-user-reports.ts
packages/backend/src/server/api/endpoints/admin/accounts/create.ts
packages/backend/src/server/api/endpoints/admin/accounts/delete.ts
packages/backend/src/server/api/endpoints/admin/accounts/find-by-email.ts
packages/backend/src/server/api/endpoints/admin/ad/create.ts
packages/backend/src/server/api/endpoints/admin/ad/delete.ts
packages/backend/src/server/api/endpoints/admin/ad/list.ts
packages/backend/src/server/api/endpoints/admin/ad/update.ts
packages/backend/src/server/api/endpoints/admin/announcements/create.ts
packages/backend/src/server/api/endpoints/admin/announcements/delete.ts
packages/backend/src/server/api/endpoints/admin/announcements/list.ts
packages/backend/src/server/api/endpoints/admin/announcements/update.ts
packages/backend/src/server/api/endpoints/admin/avatar-decorations/create.ts
packages/backend/src/server/api/endpoints/admin/avatar-decorations/delete.ts
packages/backend/src/server/api/endpoints/admin/avatar-decorations/list.ts
packages/backend/src/server/api/endpoints/admin/avatar-decorations/update.ts
packages/backend/src/server/api/endpoints/admin/delete-account.ts
packages/backend/src/server/api/endpoints/admin/delete-all-files-of-a-user.ts
packages/backend/src/server/api/endpoints/admin/drive/clean-remote-files.ts
packages/backend/src/server/api/endpoints/admin/drive/cleanup.ts
packages/backend/src/server/api/endpoints/admin/drive/files.ts
packages/backend/src/server/api/endpoints/admin/drive/show-file.ts
packages/backend/src/server/api/endpoints/admin/emoji/add-aliases-bulk.ts
packages/backend/src/server/api/endpoints/admin/emoji/add.ts
packages/backend/src/server/api/endpoints/admin/emoji/copy.ts
packages/backend/src/server/api/endpoints/admin/emoji/delete-bulk.ts
packages/backend/src/server/api/endpoints/admin/emoji/delete.ts
packages/backend/src/server/api/endpoints/admin/emoji/import-zip.ts
packages/backend/src/server/api/endpoints/admin/emoji/list-remote.ts
packages/backend/src/server/api/endpoints/admin/emoji/list.ts
packages/backend/src/server/api/endpoints/admin/emoji/remove-aliases-bulk.ts
packages/backend/src/server/api/endpoints/admin/emoji/set-aliases-bulk.ts
packages/backend/src/server/api/endpoints/admin/emoji/set-category-bulk.ts
packages/backend/src/server/api/endpoints/admin/emoji/set-license-bulk.ts
packages/backend/src/server/api/endpoints/admin/emoji/update.ts
packages/backend/src/server/api/endpoints/admin/federation/delete-all-files.ts
packages/backend/src/server/api/endpoints/admin/federation/refresh-remote-instance-metadata.ts
packages/backend/src/server/api/endpoints/admin/federation/remove-all-following.ts
packages/backend/src/server/api/endpoints/admin/federation/update-instance.ts
packages/backend/src/server/api/endpoints/admin/get-index-stats.ts
packages/backend/src/server/api/endpoints/admin/get-table-stats.ts
packages/backend/src/server/api/endpoints/admin/get-user-ips.ts
packages/backend/src/server/api/endpoints/admin/invite/create.ts
packages/backend/src/server/api/endpoints/admin/invite/list.ts
packages/backend/src/server/api/endpoints/admin/meta.ts
packages/backend/src/server/api/endpoints/admin/promo/create.ts
packages/backend/src/server/api/endpoints/admin/queue/clear.ts
packages/backend/src/server/api/endpoints/admin/queue/deliver-delayed.ts
packages/backend/src/server/api/endpoints/admin/queue/inbox-delayed.ts
packages/backend/src/server/api/endpoints/admin/queue/promote.ts
packages/backend/src/server/api/endpoints/admin/queue/stats.ts
packages/backend/src/server/api/endpoints/admin/relays/add.ts
packages/backend/src/server/api/endpoints/admin/relays/list.ts
packages/backend/src/server/api/endpoints/admin/relays/remove.ts
packages/backend/src/server/api/endpoints/admin/reset-password.ts
packages/backend/src/server/api/endpoints/admin/resolve-abuse-user-report.ts
packages/backend/src/server/api/endpoints/admin/roles/assign.ts
packages/backend/src/server/api/endpoints/admin/roles/create.ts
packages/backend/src/server/api/endpoints/admin/roles/delete.ts
packages/backend/src/server/api/endpoints/admin/roles/list.ts
packages/backend/src/server/api/endpoints/admin/roles/show.ts
packages/backend/src/server/api/endpoints/admin/roles/unassign.ts
packages/backend/src/server/api/endpoints/admin/roles/update-default-policies.ts
packages/backend/src/server/api/endpoints/admin/roles/update.ts
packages/backend/src/server/api/endpoints/admin/roles/users.ts
packages/backend/src/server/api/endpoints/admin/send-email.ts
packages/backend/src/server/api/endpoints/admin/server-info.ts
packages/backend/src/server/api/endpoints/admin/show-moderation-logs.ts
packages/backend/src/server/api/endpoints/admin/show-user.ts
packages/backend/src/server/api/endpoints/admin/show-users.ts
packages/backend/src/server/api/endpoints/admin/suspend-user.ts
packages/backend/src/server/api/endpoints/admin/unset-user-avatar.ts
packages/backend/src/server/api/endpoints/admin/unset-user-banner.ts
packages/backend/src/server/api/endpoints/admin/unsuspend-user.ts
packages/backend/src/server/api/endpoints/admin/update-meta.ts
packages/backend/src/server/api/endpoints/admin/update-user-note.ts
packages/backend/src/server/api/endpoints/ap/get.ts
packages/backend/src/server/api/endpoints/ap/show.ts
packages/backend/src/server/api/endpoints/federation/update-remote-user.ts
packages/backend/src/server/api/endpoints/fetch-external-resources.ts
packages/backend/src/server/api/endpoints/i.ts
packages/backend/src/server/api/endpoints/i/claim-achievement.ts
packages/backend/src/server/api/endpoints/i/registry/get-all.ts
packages/backend/src/server/api/endpoints/i/registry/get-detail.ts
packages/backend/src/server/api/endpoints/i/registry/get.ts
packages/backend/src/server/api/endpoints/i/registry/keys-with-type.ts
packages/backend/src/server/api/endpoints/i/registry/keys.ts
packages/backend/src/server/api/endpoints/i/registry/remove.ts
packages/backend/src/server/api/endpoints/i/registry/set.ts
packages/backend/src/server/api/endpoints/invite/create.ts
packages/backend/src/server/api/endpoints/invite/delete.ts
packages/backend/src/server/api/endpoints/invite/limit.ts
packages/backend/src/server/api/endpoints/invite/list.ts
packages/backend/src/server/api/endpoints/my/apps.ts
packages/backend/src/server/api/endpoints/notes/hybrid-timeline.ts
packages/backend/src/server/api/endpoints/notes/mentions.ts
packages/backend/src/server/api/endpoints/notes/polls/recommendation.ts
packages/backend/src/server/api/endpoints/notes/state.ts
packages/backend/src/server/api/endpoints/notes/timeline.ts
packages/backend/src/server/api/endpoints/notes/translate.ts
packages/backend/src/server/api/endpoints/notes/user-list-timeline.ts
packages/backend/src/server/api/endpoints/promo/read.ts
packages/backend/src/server/api/endpoints/roles/list.ts
packages/backend/src/server/api/endpoints/roles/notes.ts
packages/backend/src/server/api/endpoints/sw/register.ts
packages/backend/src/server/api/endpoints/sw/show-registration.ts
packages/backend/src/server/api/endpoints/sw/update-registration.ts
packages/backend/src/server/api/endpoints/users/achievements.ts
packages/backend/src/server/api/endpoints/users/lists/create-from-public.ts
packages/backend/src/server/api/endpoints/users/lists/favorite.ts
packages/backend/src/server/api/endpoints/users/lists/unfavorite.ts
packages/backend/src/server/api/endpoints/users/relation.ts
packages/backend/src/server/api/endpoints/users/report-abuse.ts
packages/backend/src/server/api/stream/ChannelsService.ts
packages/backend/src/server/api/stream/Connection.ts
packages/backend/src/server/api/stream/channel.ts
packages/backend/src/server/api/stream/channels/admin.ts
packages/backend/src/server/api/stream/channels/antenna.ts
packages/backend/src/server/api/stream/channels/channel.ts
packages/backend/src/server/api/stream/channels/drive.ts
packages/backend/src/server/api/stream/channels/global-timeline.ts
packages/backend/src/server/api/stream/channels/hashtag.ts
packages/backend/src/server/api/stream/channels/home-timeline.ts
packages/backend/src/server/api/stream/channels/hybrid-timeline.ts
packages/backend/src/server/api/stream/channels/local-timeline.ts
packages/backend/src/server/api/stream/channels/main.ts
packages/backend/src/server/api/stream/channels/queue-stats.ts
packages/backend/src/server/api/stream/channels/role-timeline.ts
packages/backend/src/server/api/stream/channels/server-stats.ts
packages/backend/src/server/api/stream/channels/user-list.ts
packages/backend/src/server/oauth/OAuth2ProviderService.ts
packages/backend/test/e2e/api.ts
packages/backend/test/e2e/streaming.ts
packages/backend/test/utils.ts
packages/frontend/src/components/MkTokenGenerateWindow.vue
packages/misskey-js/src/autogen/apiClientJSDoc.ts
packages/misskey-js/src/autogen/endpoint.ts
packages/misskey-js/src/autogen/entities.ts
packages/misskey-js/src/autogen/models.ts
packages/misskey-js/src/autogen/types.ts
packages/misskey-js/src/consts.ts
Commit message: Merge pull request from GHSA-7pxq-6xx9-xpgm

* fix: fix improper authorization when accessing with third-party application

* refactor: refactor type definitions

* fix: get rid of unnecessary access limitation

* enhance: サードパーティアプリケーションがWebsocket APIを使えるように

* fix: add missing parentheses

* Revert "fix(backend): add missing kind definition for admin endpoints to improve security"

This reverts commit 5150053275594278e9eb23e72d98b16593c4c230.

* frontend: 翻訳の抜けを訂正, read:adminとwrite:adminはアクセス発行トークンのデフォルトでは非表示にする

* enhance(test): misskey-ghsa-7pxq-6xx9-xpgmに関するテストを追加

* enhance(test): Websocket APIに対するテストも追加

* enhance(refactor): `@/misc/api-permissions.ts`を`misskey-js/permissions`に統合

* fix(frontend): アクセストークン発行UIで全ての権限を有効にした際、管理者用APIへのアクセスも許可してしまう問題を修正

* enhance(backend): Websocketの接続に最低限必要な権限を変更

* fix(backend): `/api/admin/meta`をサードパーティアプリケーションからはアクセスできないように

* fix(backend): エンドポイントにアクセスするために必要な権限を変更

* fix(frontend/locale): Add missing type declaration

* chore: update `misskey-js/src/autogen`

---------

Co-authored-by: tamaina <tamaina@hotmail.co.jp>

Vulnerable code:
- Fix: 管理者用APIのアクセス権限が適切に設定されていない問題を修正
/*
 * SPDX-FileCopyrightText: syuilo and other misskey contributors
 * SPDX-License-Identifier: AGPL-3.0-only
 */

export const kinds = [
	'read:account',
	'write:account',
	'read:blocks',
	'write:blocks',
	'read:drive',
	'write:drive',
	'read:favorites',
	'write:favorites',
	'read:following',
	'write:following',
	'read:messaging',
	'write:messaging',
	'read:mutes',
	'write:mutes',
	'write:notes',
	'read:notifications',
	'write:notifications',
	'read:reactions',
	'write:reactions',
	'write:votes',
	'read:pages',
	'write:pages',
	'write:page-likes',
	'read:page-likes',
	'read:user-groups',
	'write:user-groups',
	'read:channels',
	'write:channels',
	'read:gallery',
	'write:gallery',
	'read:gallery-likes',
	'write:gallery-likes',
];
// IF YOU ADD KINDS(PERMISSIONS), YOU MUST ADD TRANSLATIONS (under _permissions).
		if (token && ep.meta.kind && !token.permission.some(p => p === ep.meta.kind)) {
export interface IEndpointMeta {
	kind: 'read:admin',

	kind: 'write:admin',
	kind: 'write:admin',

	kind: 'read:admin',

	kind: 'write:admin',

	kind: 'write:admin',

	kind: 'read:admin',

	kind: 'write:admin',

	kind: 'write:admin',

	kind: 'write:admin',

	kind: 'read:admin',

	kind: 'write:admin',

	kind: 'write:admin',

	kind: 'write:admin',

	kind: 'read:admin',

	kind: 'write:admin',

	kind: 'write:admin',

	kind: 'write:admin',

	kind: 'write:admin',

	kind: 'write:admin',

	kind: 'read:admin',

	kind: 'read:admin',

	kind: 'write:admin',

	kind: 'write:admin',

	kind: 'write:admin',

	kind: 'write:admin',

	kind: 'write:admin',

	kind: 'write:admin',
	kind: 'read:admin',

	kind: 'read:admin',

	kind: 'write:admin',

	kind: 'write:admin',

	kind: 'write:admin',

	kind: 'write:admin',

	kind: 'read:admin',

	kind: 'write:admin',

	kind: 'write:admin',

	kind: 'write:admin',

	kind: 'write:admin',


	kind: 'read:admin',

	kind: 'read:admin',
	kind: 'read:admin',

	}
	kind: 'write:admin',

	kind: 'write:admin',

	kind: 'read:admin',

	kind: 'write:admin',

	kind: 'write:admin',

	kind: 'write:admin',

	kind: 'write:admin',

	kind: 'write:admin',

	kind: 'read:admin',

	kind: 'write:admin',

	kind: 'read:admin',

	kind: 'write:admin',

	kind: 'write:admin',

	kind: 'write:admin',

	kind: 'write:admin',

	kind: 'write:admin',

	kind: 'write:admin',

	kind: 'read:admin',

	kind: 'read:admin',

	kind: 'write:admin',

	kind: 'write:admin',

	kind: 'write:admin',

	kind: 'read:admin',

	kind: 'write:admin',

	kind: 'read:admin',


	kind: 'read:admin',

	kind: 'read:admin',

	kind: 'read:admin',
	kind: 'write:admin',

	kind: 'write:admin',

	kind: 'write:admin',

	kind: 'write:admin',

	kind: 'write:admin',

	kind: 'write:admin',

	requireCredential: true,
	requireCredential: true,
	}
	public getChannelService(name: string) {
import Channel from '../channel.js';
	public static requireCredential = true;
export class AdminChannelService {
import Channel from '../channel.js';
	public static requireCredential = false;
export class AntennaChannelService {
import Channel from '../channel.js';
	public static requireCredential = false;
export class ChannelChannelService {
import Channel from '../channel.js';
	public static requireCredential = true;
export class DriveChannelService {
import Channel from '../channel.js';
	public static requireCredential = false;
export class GlobalTimelineChannelService {
import Channel from '../channel.js';
	public static requireCredential = false;
export class HashtagChannelService {
import Channel from '../channel.js';
	public static requireCredential = true;
export class HomeTimelineChannelService {
import Channel from '../channel.js';
	public static requireCredential = true;
export class HybridTimelineChannelService {
import Channel from '../channel.js';
	public static requireCredential = false;
export class LocalTimelineChannelService {
import Channel from '../channel.js';
	public static requireCredential = true;
export class MainChannelService {
import Channel from '../channel.js';
	public static requireCredential = false;
export class QueueStatsChannelService {
import Channel from '../channel.js';
	public static requireCredential = false;
export class RoleTimelineChannelService {
import Channel from '../channel.js';
	public static requireCredential = false;
export class ServerStatsChannelService {
import Channel from '../channel.js';
	public static requireCredential = false;
export class UserListChannelService {
import { kinds } from '@/misc/api-permissions.js';
					const scopes = [...new Set(scope)].filter(s => kinds.includes(s));
import { signup, api, startServer, successfulApiCall, failedApiCall, uploadFile, waitFire, connectStream, relativeFetch } from '../utils.js';
import { signup, api, post, startServer, initTestDb, waitFire } from '../utils.js';
				<MkSwitch v-for="kind in (initialPermissions || Misskey.permissions)" :key="kind" v-model="permissions[kind]">{{ i18n.t(`_permissions.${kind}`) }}</MkSwitch>
	initialPermissions?: string[] | null;
const permissions = ref({});
	for (const kind of Misskey.permissions) {
 * generatedAt: 2023-12-25T03:48:32.008Z
     * **Credential required**: *Yes* / **Permission**: *read:admin*
     * **Credential required**: *Yes* / **Permission**: *read:admin*
     * **Credential required**: *No* / **Permission**: *write:admin*
     * **Credential required**: *Yes* / **Permission**: *write:admin*
     * **Credential required**: *Yes* / **Permission**: *read:admin*
     * **Credential required**: *Yes* / **Permission**: *write:admin*
     * **Credential required**: *Yes* / **Permission**: *write:admin*
     * **Credential required**: *Yes* / **Permission**: *read:admin*
     * **Credential required**: *Yes* / **Permission**: *write:admin*
     * **Credential required**: *Yes* / **Permission**: *write:admin*
     * **Credential required**: *Yes* / **Permission**: *write:admin*
     * **Credential required**: *Yes* / **Permission**: *read:admin*
     * **Credential required**: *Yes* / **Permission**: *write:admin*
     * **Credential required**: *Yes* / **Permission**: *write:admin*
     * **Credential required**: *Yes* / **Permission**: *write:admin*
     * **Credential required**: *Yes* / **Permission**: *read:admin*
     * **Credential required**: *Yes* / **Permission**: *write:admin*
     * **Credential required**: *Yes* / **Permission**: *write:admin*
     * **Credential required**: *Yes* / **Permission**: *write:admin*
     * **Credential required**: *Yes* / **Permission**: *write:admin*
     * **Credential required**: *Yes* / **Permission**: *write:admin*
     * **Credential required**: *Yes* / **Permission**: *write:admin*
     * **Credential required**: *Yes* / **Permission**: *read:admin*
     * **Credential required**: *Yes* / **Permission**: *read:admin*
     * **Credential required**: *Yes* / **Permission**: *write:admin*
     * **Credential required**: *Yes* / **Permission**: *write:admin*
     * **Credential required**: *Yes* / **Permission**: *write:admin*
     * **Credential required**: *Yes* / **Permission**: *write:admin*
     * **Credential required**: *Yes* / **Permission**: *write:admin*
     * **Credential required**: *Yes* / **Permission**: *write:admin*
     * **Credential required**: *Yes* / **Permission**: *read:admin*
     * **Credential required**: *Yes* / **Permission**: *read:admin*
     * **Credential required**: *Yes* / **Permission**: *write:admin*
     * **Credential required**: *Yes* / **Permission**: *write:admin*
     * **Credential required**: *Yes* / **Permission**: *write:admin*
     * **Credential required**: *Yes* / **Permission**: *write:admin*
     * **Credential required**: *Yes* / **Permission**: *read:admin*
     * **Credential required**: *Yes* / **Permission**: *write:admin*
     * **Credential required**: *Yes* / **Permission**: *write:admin*
     * **Credential required**: *Yes* / **Permission**: *write:admin*
     * **Credential required**: *Yes* / **Permission**: *write:admin*
     * **Credential required**: *Yes* / **Permission**: *read:admin*
     * **Credential required**: *Yes* / **Permission**: *read:admin*
     * **Credential required**: *Yes* / **Permission**: *read:admin*
     * **Credential required**: *Yes* / **Permission**: *write:admin*
     * **Credential required**: *Yes* / **Permission**: *write:admin*
     * **Credential required**: *Yes* / **Permission**: *write:admin*
     * **Credential required**: *Yes* / **Permission**: *write:admin*
     * **Credential required**: *Yes* / **Permission**: *write:admin*
     * **Credential required**: *Yes* / **Permission**: *write:admin*
     * **Credential required**: *Yes* / **Permission**: *write:admin*
     * **Credential required**: *Yes* / **Permission**: *read:admin*
     * **Credential required**: *Yes* / **Permission**: *write:admin*
     * **Credential required**: *Yes* / **Permission**: *read:admin*
     * **Credential required**: *Yes* / **Permission**: *write:admin*
     * **Credential required**: *Yes* / **Permission**: *write:admin*
     * **Credential required**: *Yes* / **Permission**: *write:admin*
     * **Credential required**: *Yes* / **Permission**: *write:admin*
     * **Credential required**: *Yes* / **Permission**: *read:admin*
     * **Credential required**: *Yes* / **Permission**: *read:admin*
     * **Credential required**: *Yes* / **Permission**: *read:admin*
     * **Credential required**: *Yes* / **Permission**: *read:admin*
     * **Credential required**: *Yes* / **Permission**: *write:admin*
     * **Credential required**: *Yes* / **Permission**: *write:admin*
     * **Credential required**: *Yes* / **Permission**: *write:admin*
     * **Credential required**: *Yes* / **Permission**: *write:admin*
     * **Credential required**: *Yes* / **Permission**: *write:admin*
     * **Credential required**: *Yes* / **Permission**: *write:admin*
     * **Credential required**: *Yes* / **Permission**: *write:admin*
     * **Credential required**: *Yes* / **Permission**: *read:admin*
     * **Credential required**: *Yes* / **Permission**: *read:admin*
     * **Credential required**: *Yes* / **Permission**: *write:admin*
     * **Credential required**: *Yes* / **Permission**: *write:admin*
     * **Credential required**: *Yes* / **Permission**: *write:admin*
     * **Credential required**: *Yes* / **Permission**: *write:admin*
     * **Credential required**: *No* / **Permission**: *read:admin*
     * **Credential required**: *Yes*
     * **Credential required**: *Yes*
     * **Credential required**: *Yes*
     * **Credential required**: *Yes*
     * **Credential required**: *Yes*
     * **Credential required**: *Yes*
     * **Credential required**: *Yes*
     * **Credential required**: *Yes*
     * **Credential required**: *Yes*
     * **Credential required**: *Yes*
     * **Credential required**: *Yes*
     * **Credential required**: *Yes*
     * **Credential required**: *Yes*
     * **Credential required**: *Yes*
     * **Credential required**: *Yes*
     * **Credential required**: *Yes*
     * **Credential required**: *Yes*
     * **Credential required**: *Yes*
     * **Credential required**: *Yes*
     * **Credential required**: *Yes*
     * **Credential required**: *Yes*
     * **Credential required**: *Yes*
     * **Credential required**: *Yes*
     * **Credential required**: *Yes*
     * **Credential required**: *Yes*
     * **Credential required**: *Yes*
     * **Credential required**: *Yes*
     * **Credential required**: *Yes*
     * **Credential required**: *Yes*
     * **Credential required**: *Yes*
     * **Credential required**: *Yes*
     * **Credential required**: *Yes*
     * **Credential required**: *Yes*
 * generatedAt: 2023-12-25T03:48:32.001Z
 * generatedAt: 2023-12-25T03:48:31.996Z
 * generatedAt: 2023-12-25T03:48:31.993Z
 * generatedAt: 2023-12-25T03:48:31.850Z
     * **Credential required**: *Yes* / **Permission**: *read:admin*
     * **Credential required**: *Yes* / **Permission**: *read:admin*
     * **Credential required**: *No* / **Permission**: *write:admin*
     * **Credential required**: *Yes* / **Permission**: *write:admin*
     * **Credential required**: *Yes* / **Permission**: *read:admin*
     * **Credential required**: *Yes* / **Permission**: *write:admin*
     * **Credential required**: *Yes* / **Permission**: *write:admin*
     * **Credential required**: *Yes* / **Permission**: *read:admin*
     * **Credential required**: *Yes* / **Permission**: *write:admin*
     * **Credential required**: *Yes* / **Permission**: *write:admin*
     * **Credential required**: *Yes* / **Permission**: *write:admin*
     * **Credential required**: *Yes* / **Permission**: *read:admin*
     * **Credential required**: *Yes* / **Permission**: *write:admin*
     * **Credential required**: *Yes* / **Permission**: *write:admin*
     * **Credential required**: *Yes* / **Permission**: *write:admin*
     * **Credential required**: *Yes* / **Permission**: *read:admin*
     * **Credential required**: *Yes* / **Permission**: *write:admin*
     * **Credential required**: *Yes* / **Permission**: *write:admin*
     * **Credential required**: *Yes* / **Permission**: *write:admin*
     * **Credential required**: *Yes* / **Permission**: *write:admin*
     * **Credential required**: *Yes* / **Permission**: *write:admin*
     * **Credential required**: *Yes* / **Permission**: *write:admin*
     * **Credential required**: *Yes* / **Permission**: *read:admin*
     * **Credential required**: *Yes* / **Permission**: *read:admin*
     * **Credential required**: *Yes* / **Permission**: *write:admin*
     * **Credential required**: *Yes* / **Permission**: *write:admin*
     * **Credential required**: *Yes* / **Permission**: *write:admin*
     * **Credential required**: *Yes* / **Permission**: *write:admin*
     * **Credential required**: *Yes* / **Permission**: *write:admin*
     * **Credential required**: *Yes* / **Permission**: *write:admin*
     * **Credential required**: *Yes* / **Permission**: *read:admin*
     * **Credential required**: *Yes* / **Permission**: *read:admin*
     * **Credential required**: *Yes* / **Permission**: *write:admin*
     * **Credential required**: *Yes* / **Permission**: *write:admin*
     * **Credential required**: *Yes* / **Permission**: *write:admin*
     * **Credential required**: *Yes* / **Permission**: *write:admin*
     * **Credential required**: *Yes* / **Permission**: *read:admin*
     * **Credential required**: *Yes* / **Permission**: *write:admin*
     * **Credential required**: *Yes* / **Permission**: *write:admin*
     * **Credential required**: *Yes* / **Permission**: *write:admin*
     * **Credential required**: *Yes* / **Permission**: *write:admin*
     * **Credential required**: *Yes* / **Permission**: *read:admin*
     * **Credential required**: *Yes* / **Permission**: *read:admin*
     * **Credential required**: *Yes* / **Permission**: *read:admin*
     * **Credential required**: *Yes* / **Permission**: *write:admin*
     * **Credential required**: *Yes* / **Permission**: *write:admin*
     * **Credential required**: *Yes* / **Permission**: *write:admin*
     * **Credential required**: *Yes* / **Permission**: *write:admin*
     * **Credential required**: *Yes* / **Permission**: *write:admin*
     * **Credential required**: *Yes* / **Permission**: *write:admin*
     * **Credential required**: *Yes* / **Permission**: *write:admin*
     * **Credential required**: *Yes* / **Permission**: *read:admin*
     * **Credential required**: *Yes* / **Permission**: *write:admin*
     * **Credential required**: *Yes* / **Permission**: *read:admin*
     * **Credential required**: *Yes* / **Permission**: *write:admin*
     * **Credential required**: *Yes* / **Permission**: *write:admin*
     * **Credential required**: *Yes* / **Permission**: *write:admin*
     * **Credential required**: *Yes* / **Permission**: *write:admin*
     * **Credential required**: *Yes* / **Permission**: *read:admin*
     * **Credential required**: *Yes* / **Permission**: *read:admin*
     * **Credential required**: *Yes* / **Permission**: *read:admin*
     * **Credential required**: *Yes* / **Permission**: *read:admin*
     * **Credential required**: *Yes* / **Permission**: *write:admin*
     * **Credential required**: *Yes* / **Permission**: *write:admin*
     * **Credential required**: *Yes* / **Permission**: *write:admin*
     * **Credential required**: *Yes* / **Permission**: *write:admin*
     * **Credential required**: *Yes* / **Permission**: *write:admin*
     * **Credential required**: *Yes* / **Permission**: *write:admin*
     * **Credential required**: *Yes* / **Permission**: *write:admin*
     * **Credential required**: *Yes* / **Permission**: *read:admin*
     * **Credential required**: *Yes* / **Permission**: *read:admin*
     * **Credential required**: *Yes* / **Permission**: *write:admin*
     * **Credential required**: *Yes* / **Permission**: *write:admin*
     * **Credential required**: *Yes* / **Permission**: *write:admin*
     * **Credential required**: *Yes* / **Permission**: *write:admin*
     * **Credential required**: *No* / **Permission**: *read:admin*
     * **Credential required**: *Yes*
     * **Credential required**: *Yes*
     * **Credential required**: *Yes*
     * **Credential required**: *Yes*
     * **Credential required**: *Yes*
     * **Credential required**: *Yes*
     * **Credential required**: *Yes*
     * **Credential required**: *Yes*
     * **Credential required**: *Yes*
     * **Credential required**: *Yes*
     * **Credential required**: *Yes*
     * **Credential required**: *Yes*
     * **Credential required**: *Yes*
     * **Credential required**: *Yes*
     * **Credential required**: *Yes*
     * **Credential required**: *Yes*
     * **Credential required**: *Yes*
     * **Credential required**: *Yes*
     * **Credential required**: *Yes*
     * **Credential required**: *Yes*
     * **Credential required**: *Yes*
     * **Credential required**: *Yes*
     * **Credential required**: *Yes*
     * **Credential required**: *Yes*
     * **Credential required**: *Yes*
     * **Credential required**: *Yes*
     * **Credential required**: *Yes*
     * **Credential required**: *Yes*
     * **Credential required**: *Yes*
     * **Credential required**: *Yes*
     * **Credential required**: *Yes*
     * **Credential required**: *Yes*
     * **Credential required**: *Yes*
   * **Credential required**: *Yes* / **Permission**: *read:admin*
   * **Credential required**: *Yes* / **Permission**: *read:admin*
   * **Credential required**: *No* / **Permission**: *write:admin*
   * **Credential required**: *Yes* / **Permission**: *write:admin*
   * **Credential required**: *Yes* / **Permission**: *read:admin*
   * **Credential required**: *Yes* / **Permission**: *write:admin*
   * **Credential required**: *Yes* / **Permission**: *write:admin*
   * **Credential required**: *Yes* / **Permission**: *read:admin*
   * **Credential required**: *Yes* / **Permission**: *write:admin*
   * **Credential required**: *Yes* / **Permission**: *write:admin*
   * **Credential required**: *Yes* / **Permission**: *write:admin*
   * **Credential required**: *Yes* / **Permission**: *read:admin*
   * **Credential required**: *Yes* / **Permission**: *write:admin*
   * **Credential required**: *Yes* / **Permission**: *write:admin*
   * **Credential required**: *Yes* / **Permission**: *write:admin*
   * **Credential required**: *Yes* / **Permission**: *read:admin*
   * **Credential required**: *Yes* / **Permission**: *write:admin*
   * **Credential required**: *Yes* / **Permission**: *write:admin*
   * **Credential required**: *Yes* / **Permission**: *write:admin*
   * **Credential required**: *Yes* / **Permission**: *write:admin*
   * **Credential required**: *Yes* / **Permission**: *write:admin*
   * **Credential required**: *Yes* / **Permission**: *write:admin*
   * **Credential required**: *Yes* / **Permission**: *read:admin*
   * **Credential required**: *Yes* / **Permission**: *read:admin*
   * **Credential required**: *Yes* / **Permission**: *write:admin*
   * **Credential required**: *Yes* / **Permission**: *write:admin*
   * **Credential required**: *Yes* / **Permission**: *write:admin*
   * **Credential required**: *Yes* / **Permission**: *write:admin*
   * **Credential required**: *Yes* / **Permission**: *write:admin*
   * **Credential required**: *Yes* / **Permission**: *write:admin*
   * **Credential required**: *Yes* / **Permission**: *read:admin*
   * **Credential required**: *Yes* / **Permission**: *read:admin*
   * **Credential required**: *Yes* / **Permission**: *write:admin*
   * **Credential required**: *Yes* / **Permission**: *write:admin*
   * **Credential required**: *Yes* / **Permission**: *write:admin*
   * **Credential required**: *Yes* / **Permission**: *write:admin*
   * **Credential required**: *Yes* / **Permission**: *read:admin*
   * **Credential required**: *Yes* / **Permission**: *write:admin*
   * **Credential required**: *Yes* / **Permission**: *write:admin*
   * **Credential required**: *Yes* / **Permission**: *write:admin*
   * **Credential required**: *Yes* / **Permission**: *write:admin*
   * **Credential required**: *Yes* / **Permission**: *read:admin*
   * **Credential required**: *Yes* / **Permission**: *read:admin*
   * **Credential required**: *Yes* / **Permission**: *read:admin*
   * **Credential required**: *Yes* / **Permission**: *write:admin*
   * **Credential required**: *Yes* / **Permission**: *write:admin*
   * **Credential required**: *Yes* / **Permission**: *write:admin*
   * **Credential required**: *Yes* / **Permission**: *write:admin*
   * **Credential required**: *Yes* / **Permission**: *write:admin*
   * **Credential required**: *Yes* / **Permission**: *write:admin*
   * **Credential required**: *Yes* / **Permission**: *write:admin*
   * **Credential required**: *Yes* / **Permission**: *read:admin*
   * **Credential required**: *Yes* / **Permission**: *write:admin*
   * **Credential required**: *Yes* / **Permission**: *read:admin*
   * **Credential required**: *Yes* / **Permission**: *write:admin*
   * **Credential required**: *Yes* / **Permission**: *write:admin*
   * **Credential required**: *Yes* / **Permission**: *write:admin*
   * **Credential required**: *Yes* / **Permission**: *write:admin*
   * **Credential required**: *Yes* / **Permission**: *read:admin*
   * **Credential required**: *Yes* / **Permission**: *read:admin*
   * **Credential required**: *Yes* / **Permission**: *read:admin*
   * **Credential required**: *Yes* / **Permission**: *read:admin*
   * **Credential required**: *Yes* / **Permission**: *write:admin*
   * **Credential required**: *Yes* / **Permission**: *write:admin*
   * **Credential required**: *Yes* / **Permission**: *write:admin*
   * **Credential required**: *Yes* / **Permission**: *write:admin*
   * **Credential required**: *Yes* / **Permission**: *write:admin*
   * **Credential required**: *Yes* / **Permission**: *write:admin*
   * **Credential required**: *Yes* / **Permission**: *write:admin*
   * **Credential required**: *Yes* / **Permission**: *read:admin*
   * **Credential required**: *Yes* / **Permission**: *read:admin*
   * **Credential required**: *Yes* / **Permission**: *write:admin*
   * **Credential required**: *Yes* / **Permission**: *write:admin*
   * **Credential required**: *Yes* / **Permission**: *write:admin*
   * **Credential required**: *Yes* / **Permission**: *write:admin*
   * **Credential required**: *No* / **Permission**: *read:admin*
   * **Credential required**: *Yes*
   * **Credential required**: *Yes*
   * **Credential required**: *Yes*
   * **Credential required**: *Yes*
   * **Credential required**: *Yes*
   * **Credential required**: *Yes*
   * **Credential required**: *Yes*
   * **Credential required**: *Yes*
   * **Credential required**: *Yes*
   * **Credential required**: *Yes*
   * **Credential required**: *Yes*
   * **Credential required**: *Yes*
   * **Credential required**: *Yes*
   * **Credential required**: *Yes*
   * **Credential required**: *Yes*
   * **Credential required**: *Yes*
   * **Credential required**: *Yes*
   * **Credential required**: *Yes*
   * **Credential required**: *Yes*
   * **Credential required**: *Yes*
   * **Credential required**: *Yes*
   * **Credential required**: *Yes*
   * **Credential required**: *Yes*
   * **Credential required**: *Yes*
   * **Credential required**: *Yes*
   * **Credential required**: *Yes*
   * **Credential required**: *Yes*
   * **Credential required**: *Yes*
   * **Credential required**: *Yes*
   * **Credential required**: *Yes*
   * **Credential required**: *Yes*
   * **Credential required**: *Yes*
   * **Credential required**: *Yes*
];

Fixed code:
        "read:admin:abuse-user-reports": string;
        "write:admin:delete-account": string;
        "write:admin:delete-all-files-of-a-user": string;
        "read:admin:index-stats": string;
        "read:admin:table-stats": string;
        "read:admin:user-ips": string;
        "read:admin:meta": string;
        "write:admin:reset-password": string;
        "write:admin:resolve-abuse-user-report": string;
        "write:admin:send-email": string;
        "read:admin:server-info": string;
        "read:admin:show-moderation-log": string;
        "read:admin:show-user": string;
        "read:admin:show-users": string;
        "write:admin:suspend-user": string;
        "write:admin:unset-user-avatar": string;
        "write:admin:unset-user-banner": string;
        "write:admin:unsuspend-user": string;
        "write:admin:meta": string;
        "write:admin:user-note": string;
        "write:admin:roles": string;
        "read:admin:roles": string;
        "write:admin:relays": string;
        "read:admin:relays": string;
        "write:admin:invite-codes": string;
        "read:admin:invite-codes": string;
        "write:admin:announcements": string;
        "read:admin:announcements": string;
        "write:admin:avatar-decorations": string;
        "read:admin:avatar-decorations": string;
        "write:admin:federation": string;
        "write:admin:account": string;
        "read:admin:account": string;
        "write:admin:emoji": string;
        "read:admin:emoji": string;
        "write:admin:queue": string;
        "read:admin:queue": string;
        "write:admin:promo": string;
        "write:admin:drive": string;
        "read:admin:drive": string;
        "read:admin:stream": string;
        "write:admin:ad": string;
        "read:admin:ad": string;
        "write:invite-codes": string;
        "read:invite-codes": string;
        "write:clip-favorite": string;
        "read:clip-favorite": string;
        "read:federation": string;
        "write:report-abuse": string;
  "read:admin:abuse-user-reports": "ユーザーからの通報を見る"
  "write:admin:delete-account": "ユーザーアカウントを削除する"
  "write:admin:delete-all-files-of-a-user": "ユーザーのすべてのファイルを削除する"
  "read:admin:index-stats": "データベースインデックスに関する情報を見る"
  "read:admin:table-stats": "データベーステーブルに関する情報を見る"
  "read:admin:user-ips": "ユーザーのIPアドレスを見る"
  "read:admin:meta": "インスタンスのメタデータを見る"
  "write:admin:reset-password": "ユーザーのパスワードをリセットする"
  "write:admin:resolve-abuse-user-report": "ユーザーからの通報を解決する"
  "write:admin:send-email": "メールを送る"
  "read:admin:server-info": "サーバーの情報を見る"
  "read:admin:show-moderation-log": "モデレーションログを見る"
  "read:admin:show-user": "ユーザーのプライベートな情報を見る"
  "read:admin:show-users": "ユーザーのプライベートな情報を見る"
  "write:admin:suspend-user": "ユーザーを凍結する"
  "write:admin:unset-user-avatar": "ユーザーのアバターを削除する"
  "write:admin:unset-user-banner": "ユーザーのバーナーを削除する"
  "write:admin:unsuspend-user": "ユーザーの凍結を解除する"
  "write:admin:meta": "インスタンスのメタデータを操作する"
  "write:admin:user-note": "モデレーションノートを操作する"
  "write:admin:roles": "ロールを操作する"
  "read:admin:roles": "ロールを見る"
  "write:admin:relays": "リレーを操作する"
  "read:admin:relays": "リレーを見る"
  "write:admin:invite-codes": "招待コードを操作する"
  "read:admin:invite-codes": "招待コードを見る"
  "write:admin:announcements": "お知らせを操作する"
  "read:admin:announcements": "お知らせを見る"
  "write:admin:avatar-decorations": "アバターデコレーションを操作する"
  "read:admin:avatar-decorations": "アバターデコレーションを見る"
  "write:admin:federation": "連合に関する情報を操作する"
  "write:admin:account": "ユーザーアカウントを操作する"
  "read:admin:account": "ユーザーに関する情報を見る"
  "write:admin:emoji": "絵文字を操作する"
  "read:admin:emoji": "絵文字を見る"
  "write:admin:queue": "ジョブキューを操作する"
  "read:admin:queue": "ジョブキューに関する情報を見る"
  "write:admin:promo": "プロモーションノートを操作する"
  "write:admin:drive": "ユーザーのドライブを操作する"
  "read:admin:drive": "ユーザーのドライブの関する情報を見る"
  "read:admin:stream": "管理者用のWebsocket APIを使う"
  "write:admin:ad": "広告を操作する"
  "read:admin:ad": "広告を見る"
  "write:invite-codes": "招待コードを作成する"
  "read:invite-codes": "招待コードを取得する"
  "write:clip-favorite": "クリップのいいねを操作する"
  "read:clip-favorite": "クリップのいいねを見る"
  "read:federation": "連合に関する情報を取得する"
  "write:report-abuse": "違反を報告する"
		if (token && ((ep.meta.kind && !token.permission.some(p => p === ep.meta.kind))
			|| (!ep.meta.kind && (ep.meta.requireCredential || ep.meta.requireModerator || ep.meta.requireAdmin)))) {

				if (app !== null && !app.permission.some(p => p === 'read:account')) {
					throw new AuthenticationError('Your app does not have necessary permissions to use websocket API.');
				}
import { permissions } from 'misskey-js';
interface IEndpointMetaBase {
export type IEndpointMeta = (Omit<IEndpointMetaBase, 'requireCrential' | 'requireModerator' | 'requireAdmin'> & {
	requireCredential?: false,
	requireAdmin?: false,
	requireModerator?: false,
}) | (Omit<IEndpointMetaBase, 'secure'> & {
	secure: true,
}) | (Omit<IEndpointMetaBase, 'requireCredential' | 'kind'> & {
	requireCredential: true,
	kind: (typeof permissions)[number],
}) | (Omit<IEndpointMetaBase, 'requireModerator' | 'kind'> & {
	requireModerator: true,
	kind: (typeof permissions)[number],
}) | (Omit<IEndpointMetaBase, 'requireAdmin' | 'kind'> & {
	requireAdmin: true,
	kind: (typeof permissions)[number],
})

	kind: 'read:admin:abuse-user-reports',
	secure: true,
	kind: 'write:admin:account',
	kind: 'read:admin:account',
	kind: 'write:admin:ad',
	kind: 'write:admin:ad',
	kind: 'read:admin:ad',
	kind: 'write:admin:ad',
	kind: 'write:admin:announcements',
	kind: 'write:admin:announcements',
	kind: 'read:admin:announcements',
	kind: 'write:admin:announcements',
	kind: 'write:admin:avatar-decorations',
	kind: 'write:admin:avatar-decorations',
	kind: 'read:admin:avatar-decorations',
	kind: 'write:admin:avatar-decorations',
	kind: 'write:admin:delete-account',
	kind: 'write:admin:delete-all-files-of-a-user',
	kind: 'write:admin:drive',
	kind: 'write:admin:drive',
	kind: 'read:admin:drive',
	kind: 'read:admin:drive',
	kind: 'write:admin:emoji',
	kind: 'write:admin:emoji',
	kind: 'write:admin:emoji',
	kind: 'write:admin:emoji',
	kind: 'write:admin:emoji',
	secure: true,
	kind: 'read:admin:emoji',
	kind: 'read:admin:emoji',
	kind: 'write:admin:emoji',
	kind: 'write:admin:emoji',
	kind: 'write:admin:emoji',
	kind: 'write:admin:emoji',
	kind: 'write:admin:emoji',
	kind: 'write:admin:federation',
	kind: 'write:admin:federation',
	kind: 'write:admin:federation',
	kind: 'write:admin:federation',
	kind: 'read:admin:index-stats',
	kind: 'read:admin:table-stats',
	kind: 'read:admin:user-ips',
	},
	kind: 'write:admin:invite-codes',
	kind: 'read:admin:invite-codes',
	kind: 'read:admin:meta',
	kind: 'write:admin:promo',
	kind: 'write:admin:queue',
	kind: 'read:admin:queue',
	kind: 'read:admin:queue',
	kind: 'write:admin:queue',
	kind: 'read:admin:emoji',
	kind: 'write:admin:relays',
	kind: 'read:admin:relays',
	kind: 'write:admin:relays',
	kind: 'write:admin:reset-password',
	kind: 'write:admin:resolve-abuse-user-report',
	kind: 'write:admin:roles',
	kind: 'write:admin:roles',
	kind: 'write:admin:roles',
	kind: 'read:admin:roles',
	kind: 'read:admin:roles',
	kind: 'write:admin:roles',
	kind: 'write:admin:roles',
	kind: 'write:admin:roles',
	kind: 'read:admin:roles',
	kind: 'write:admin:send-email',
	kind: 'read:admin:server-info',
	kind: 'read:admin:show-moderation-log',
	kind: 'read:admin:show-user',
	kind: 'read:admin:show-users',
	kind: 'write:admin:suspend-user',
	kind: 'write:admin:unset-user-avatar',
	kind: 'write:admin:unset-user-banner',
	kind: 'write:admin:unsuspend-user',
	kind: 'write:admin:meta',
	kind: 'write:admin:user-note',
	kind: 'read:federation',
	kind: 'read:account',
	requireCredential: false,
	secure: true,
	kind: "read:account",
	kind: 'write:account',
	kind: 'read:account',
	kind: 'read:account',
	kind: 'read:account',
	kind: 'read:account',
	kind: 'read:account',
	kind: 'write:account',
	kind: 'write:account',
	kind: 'write:invite-codes',
	kind: 'write:invite-codes',
	kind: 'read:invite-codes',
	kind: 'read:invite-codes',
	kind: 'read:account',
	kind: 'read:account',
	kind: 'read:account',
	kind: 'read:account',
	kind: 'read:account',
	kind: 'read:account',
	kind: 'read:account',
	kind: 'read:account',
	kind: 'write:account',
	kind: 'read:account',
	kind: 'read:account',
	secure: true,
	secure: true,
	secure: true,
	requireCredential: false,
	},
	kind: 'write:account',
	kind: 'write:account',
	kind: 'write:account',
	kind: 'read:account',
	kind: 'write:report-abuse',
import { type MiChannelService } from './channel.js';
	public getChannelService(name: string): MiChannelService<boolean> {
		if (this.token && ((channelService.kind && !this.token.permission.some(p => p === channelService.kind))
			|| (!channelService.kind && channelService.requireCredential))) {
			return;
		}

	public static readonly kind?: string | null;

export type MiChannelService<T extends boolean> = {
	shouldShare: boolean;
	requireCredential: T;
	kind: T extends true ? string : string | null | undefined;
	create: (id: string, connection: Connection) => Channel;
}
import Channel, { type MiChannelService } from '../channel.js';
	public static requireCredential = true as const;
	public static kind = 'read:admin:stream';
export class AdminChannelService implements MiChannelService<true> {
	public readonly kind = AdminChannel.kind;
import Channel, { type MiChannelService } from '../channel.js';
	public static requireCredential = true as const;
	public static kind = 'read:account';
export class AntennaChannelService implements MiChannelService<true> {
	public readonly kind = AntennaChannel.kind;
import Channel, { type MiChannelService } from '../channel.js';
	public static requireCredential = false as const;
export class ChannelChannelService implements MiChannelService<false> {
	public readonly kind = ChannelChannel.kind;
import Channel, { type MiChannelService } from '../channel.js';
	public static requireCredential = true as const;
	public static kind = 'read:account';
export class DriveChannelService implements MiChannelService<true> {
	public readonly kind = DriveChannel.kind;
import Channel, { type MiChannelService } from '../channel.js';
	public static requireCredential = false as const;
export class GlobalTimelineChannelService implements MiChannelService<false> {
	public readonly kind = GlobalTimelineChannel.kind;
import Channel, { type MiChannelService } from '../channel.js';
	public static requireCredential = false as const;
export class HashtagChannelService implements MiChannelService<false> {
	public readonly kind = HashtagChannel.kind;
import Channel, { type MiChannelService } from '../channel.js';
	public static requireCredential = true as const;
	public static kind = 'read:account';
export class HomeTimelineChannelService implements MiChannelService<true> {
	public readonly kind = HomeTimelineChannel.kind;
import Channel, { type MiChannelService } from '../channel.js';
	public static requireCredential = true as const;
	public static kind = 'read:account';
export class HybridTimelineChannelService implements MiChannelService<true> {
	public readonly kind = HybridTimelineChannel.kind;
import Channel, { type MiChannelService } from '../channel.js';
	public static requireCredential = false as const;
export class LocalTimelineChannelService implements MiChannelService<false> {
	public readonly kind = LocalTimelineChannel.kind;
import Channel, { type MiChannelService } from '../channel.js';
	public static requireCredential = true as const;
	public static kind = 'read:account';
export class MainChannelService implements MiChannelService<true> {
	public readonly kind = MainChannel.kind;
import Channel, { type MiChannelService } from '../channel.js';
	public static requireCredential = false as const;
export class QueueStatsChannelService implements MiChannelService<false> {
	public readonly kind = QueueStatsChannel.kind;
import Channel, { type MiChannelService } from '../channel.js';
	public static requireCredential = false as const;
export class RoleTimelineChannelService implements MiChannelService<false> {
	public readonly kind = RoleTimelineChannel.kind;
import Channel, { type MiChannelService } from '../channel.js';
	public static requireCredential = false as const;
export class ServerStatsChannelService implements MiChannelService<false> {
	public readonly kind = ServerStatsChannel.kind;
import Channel, { type MiChannelService } from '../channel.js';
	public static requireCredential = false as const;
export class UserListChannelService implements MiChannelService<false> {
	public readonly kind = UserListChannel.kind;
import { permissions as kinds } from 'misskey-js';
					const scopes = [...new Set(scope)].filter(s => (<readonly string[]>kinds).includes(s));
import { signup, api, startServer, successfulApiCall, failedApiCall, uploadFile, waitFire, connectStream, relativeFetch, createAppToken } from '../utils.js';
		const application = await createAppToken(alice, ['read:account']);
		const application2 = await createAppToken(alice, ['read:admin:index-stats']);
		const application3 = await createAppToken(bob, []);
		const application4 = await createAppToken(bob, ['read:admin:index-stats']);


		await successfulApiCall({
			endpoint: '/admin/get-index-stats',
			parameters: {},
			user: { token: application2 },
		});

		await failedApiCall({
			endpoint: '/admin/get-index-stats',
			parameters: {},
			user: { token: application },
		}, {
			status: 403,
			code: 'PERMISSION_DENIED',
			id: '1370e5b7-d4eb-4566-bb1d-7748ee6a1838',
		});

		await failedApiCall({
			endpoint: '/admin/get-index-stats',
			parameters: {},
			user: { token: application3 },
		}, {
			status: 403,
			code: 'ROLE_PERMISSION_DENIED',
			id: 'c3d38592-54c0-429d-be96-5636b0431a61',
		});

		await failedApiCall({
			endpoint: '/admin/get-index-stats',
			parameters: {},
			user: { token: application4 },
		}, {
			status: 403,
			code: 'ROLE_PERMISSION_DENIED',
			id: 'c3d38592-54c0-429d-be96-5636b0431a61',
		});
import { WebSocket } from 'ws';
import { signup, api, post, startServer, initTestDb, waitFire, createAppToken, port } from '../utils.js';
		test('Authentication', async () => {
			const application = await createAppToken(ayano, []);
			const application2 = await createAppToken(ayano, ['read:account']);
			const socket = new WebSocket(`ws://127.0.0.1:${port}/streaming?i=${application}`);
			const established = await new Promise<boolean>((resolve, reject) => {
				socket.on('error', () => resolve(false));
				socket.on('unexpected-response', () => resolve(false));
				setTimeout(() => resolve(true), 3000);
			});

			socket.close();
			assert.strictEqual(established, false);

			const fired = await waitFire(
				{ token: application2 }, 'hybridTimeline',
				() => api('notes/create', { text: 'Hello, world!' }, ayano),
				msg => msg.type === 'note' && msg.body.userId === ayano.id,
			);

			assert.strictEqual(fired, true);
		});

import { randomUUID } from 'node:crypto';
export const createAppToken = async (user: UserToken, permissions: (typeof misskey.permissions)[number][]) => {
	const res = await api('miauth/gen-token', {
		session: randomUUID(),
		permission: permissions,
	}, user);

	return (res.body as misskey.entities.MiauthGenTokenResponse).token;
};

				<MkSwitch v-for="kind in Object.keys(permissions)" :key="kind" v-model="permissions[kind]">{{ i18n.t(`_permissions.${kind}`) }}</MkSwitch>
	initialPermissions?: (typeof Misskey.permissions)[number][] | null;
const defaultPermissions = Misskey.permissions.filter(p => !p.startsWith('read:admin') && !p.startsWith('write:admin'));
const permissions = ref(<Record<(typeof Misskey.permissions)[number], boolean>>{});
	for (const kind of defaultPermissions) {
 * generatedAt: 2023-12-26T23:35:09.494Z
     * **Credential required**: *Yes* / **Permission**: *read:admin:meta*
     * **Credential required**: *Yes* / **Permission**: *read:admin:abuse-user-reports*
     * **Internal Endpoint**: This endpoint is an API for the misskey mainframe and is not intended for use by third parties.
     * **Credential required**: *No*
     * **Credential required**: *Yes* / **Permission**: *write:admin:account*
     * **Credential required**: *Yes* / **Permission**: *read:admin:account*
     * **Credential required**: *Yes* / **Permission**: *write:admin:ad*
     * **Credential required**: *Yes* / **Permission**: *write:admin:ad*
     * **Credential required**: *Yes* / **Permission**: *read:admin:ad*
     * **Credential required**: *Yes* / **Permission**: *write:admin:ad*
     * **Credential required**: *Yes* / **Permission**: *write:admin:announcements*
     * **Credential required**: *Yes* / **Permission**: *write:admin:announcements*
     * **Credential required**: *Yes* / **Permission**: *read:admin:announcements*
     * **Credential required**: *Yes* / **Permission**: *write:admin:announcements*
     * **Credential required**: *Yes* / **Permission**: *write:admin:avatar-decorations*
     * **Credential required**: *Yes* / **Permission**: *write:admin:avatar-decorations*
     * **Credential required**: *Yes* / **Permission**: *read:admin:avatar-decorations*
     * **Credential required**: *Yes* / **Permission**: *write:admin:avatar-decorations*
     * **Credential required**: *Yes* / **Permission**: *write:admin:delete-all-files-of-a-user*
     * **Credential required**: *Yes* / **Permission**: *write:admin:unset-user-avatar*
     * **Credential required**: *Yes* / **Permission**: *write:admin:unset-user-banner*
     * **Credential required**: *Yes* / **Permission**: *write:admin:drive*
     * **Credential required**: *Yes* / **Permission**: *write:admin:drive*
     * **Credential required**: *Yes* / **Permission**: *read:admin:drive*
     * **Credential required**: *Yes* / **Permission**: *read:admin:drive*
     * **Credential required**: *Yes* / **Permission**: *write:admin:emoji*
     * **Credential required**: *Yes* / **Permission**: *write:admin:emoji*
     * **Credential required**: *Yes* / **Permission**: *write:admin:emoji*
     * **Credential required**: *Yes* / **Permission**: *write:admin:emoji*
     * **Credential required**: *Yes* / **Permission**: *write:admin:emoji*
     * **Internal Endpoint**: This endpoint is an API for the misskey mainframe and is not intended for use by third parties.
     * **Credential required**: *Yes*
     * **Credential required**: *Yes* / **Permission**: *read:admin:emoji*
     * **Credential required**: *Yes* / **Permission**: *read:admin:emoji*
     * **Credential required**: *Yes* / **Permission**: *write:admin:emoji*
     * **Credential required**: *Yes* / **Permission**: *write:admin:emoji*
     * **Credential required**: *Yes* / **Permission**: *write:admin:emoji*
     * **Credential required**: *Yes* / **Permission**: *write:admin:emoji*
     * **Credential required**: *Yes* / **Permission**: *write:admin:emoji*
     * **Credential required**: *Yes* / **Permission**: *write:admin:federation*
     * **Credential required**: *Yes* / **Permission**: *write:admin:federation*
     * **Credential required**: *Yes* / **Permission**: *write:admin:federation*
     * **Credential required**: *Yes* / **Permission**: *write:admin:federation*
     * **Credential required**: *Yes* / **Permission**: *read:admin:index-stats*
     * **Credential required**: *Yes* / **Permission**: *read:admin:table-stats*
     * **Credential required**: *Yes* / **Permission**: *read:admin:user-ips*
     * **Credential required**: *Yes* / **Permission**: *write:admin:invite-codes*
     * **Credential required**: *Yes* / **Permission**: *read:admin:invite-codes*
     * **Credential required**: *Yes* / **Permission**: *write:admin:promo*
     * **Credential required**: *Yes* / **Permission**: *write:admin:queue*
     * **Credential required**: *Yes* / **Permission**: *read:admin:queue*
     * **Credential required**: *Yes* / **Permission**: *read:admin:queue*
     * **Credential required**: *Yes* / **Permission**: *write:admin:queue*
     * **Credential required**: *Yes* / **Permission**: *read:admin:emoji*
     * **Credential required**: *Yes* / **Permission**: *write:admin:relays*
     * **Credential required**: *Yes* / **Permission**: *read:admin:relays*
     * **Credential required**: *Yes* / **Permission**: *write:admin:relays*
     * **Credential required**: *Yes* / **Permission**: *write:admin:reset-password*
     * **Credential required**: *Yes* / **Permission**: *write:admin:resolve-abuse-user-report*
     * **Credential required**: *Yes* / **Permission**: *write:admin:send-email*
     * **Credential required**: *Yes* / **Permission**: *read:admin:server-info*
     * **Credential required**: *Yes* / **Permission**: *read:admin:show-moderation-log*
     * **Credential required**: *Yes* / **Permission**: *read:admin:show-user*
     * **Credential required**: *Yes* / **Permission**: *read:admin:show-users*
     * **Credential required**: *Yes* / **Permission**: *write:admin:suspend-user*
     * **Credential required**: *Yes* / **Permission**: *write:admin:unsuspend-user*
     * **Credential required**: *Yes* / **Permission**: *write:admin:meta*
     * **Credential required**: *Yes* / **Permission**: *write:admin:delete-account*
     * **Credential required**: *Yes* / **Permission**: *write:admin:user-note*
     * **Credential required**: *Yes* / **Permission**: *write:admin:roles*
     * **Credential required**: *Yes* / **Permission**: *write:admin:roles*
     * **Credential required**: *Yes* / **Permission**: *read:admin:roles*
     * **Credential required**: *Yes* / **Permission**: *read:admin:roles*
     * **Credential required**: *Yes* / **Permission**: *write:admin:roles*
     * **Credential required**: *Yes* / **Permission**: *write:admin:roles*
     * **Credential required**: *Yes* / **Permission**: *write:admin:roles*
     * **Credential required**: *Yes* / **Permission**: *write:admin:roles*
     * **Credential required**: *No* / **Permission**: *read:admin:roles*
     * **Credential required**: *Yes* / **Permission**: *read:federation*
     * **Credential required**: *Yes* / **Permission**: *read:account*
     * **Credential required**: *No*
     * **Credential required**: *Yes* / **Permission**: *read:account*
     * **Credential required**: *Yes* / **Permission**: *write:account*
     * **Credential required**: *Yes* / **Permission**: *read:account*
     * **Credential required**: *Yes* / **Permission**: *read:account*
     * **Credential required**: *Yes* / **Permission**: *read:account*
     * **Credential required**: *Yes* / **Permission**: *read:account*
     * **Credential required**: *Yes* / **Permission**: *read:account*
     * **Credential required**: *Yes* / **Permission**: *write:account*
     * **Credential required**: *Yes* / **Permission**: *write:account*
     * **Credential required**: *Yes* / **Permission**: *write:invite-codes*
     * **Credential required**: *Yes* / **Permission**: *write:invite-codes*
     * **Credential required**: *Yes* / **Permission**: *read:invite-codes*
     * **Credential required**: *Yes* / **Permission**: *read:invite-codes*
     * **Credential required**: *Yes* / **Permission**: *read:account*
     * **Credential required**: *Yes* / **Permission**: *read:account*
     * **Credential required**: *Yes* / **Permission**: *read:account*
     * **Credential required**: *Yes* / **Permission**: *read:account*
     * **Credential required**: *Yes* / **Permission**: *read:account*
     * **Credential required**: *Yes* / **Permission**: *read:account*
     * **Credential required**: *Yes* / **Permission**: *read:account*
     * **Credential required**: *Yes* / **Permission**: *read:account*
     * **Credential required**: *Yes* / **Permission**: *write:account*
     * **Credential required**: *Yes* / **Permission**: *read:account*
     * **Credential required**: *Yes* / **Permission**: *read:account*
     * **Internal Endpoint**: This endpoint is an API for the misskey mainframe and is not intended for use by third parties.
     * **Internal Endpoint**: This endpoint is an API for the misskey mainframe and is not intended for use by third parties.
     * **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:account*
     * **Credential required**: *Yes* / **Permission**: *write:account*
     * **Credential required**: *Yes* / **Permission**: *write:account*
     * **Credential required**: *Yes* / **Permission**: *read:account*
     * **Credential required**: *Yes* / **Permission**: *write:report-abuse*
     * **Credential required**: *No*
     * **Internal Endpoint**: This endpoint is an API for the misskey mainframe and is not intended for use by third parties.
 * generatedAt: 2023-12-26T23:35:09.491Z
 * generatedAt: 2023-12-26T23:35:09.489Z
 * generatedAt: 2023-12-26T23:35:09.485Z
 * generatedAt: 2023-12-26T23:35:09.389Z
     * **Credential required**: *Yes* / **Permission**: *read:admin:meta*
     * **Credential required**: *Yes* / **Permission**: *read:admin:abuse-user-reports*
     * **Internal Endpoint**: This endpoint is an API for the misskey mainframe and is not intended for use by third parties.
     * **Credential required**: *No*
     * **Credential required**: *Yes* / **Permission**: *write:admin:account*
     * **Credential required**: *Yes* / **Permission**: *read:admin:account*
     * **Credential required**: *Yes* / **Permission**: *write:admin:ad*
     * **Credential required**: *Yes* / **Permission**: *write:admin:ad*
     * **Credential required**: *Yes* / **Permission**: *read:admin:ad*
     * **Credential required**: *Yes* / **Permission**: *write:admin:ad*
     * **Credential required**: *Yes* / **Permission**: *write:admin:announcements*
     * **Credential required**: *Yes* / **Permission**: *write:admin:announcements*
     * **Credential required**: *Yes* / **Permission**: *read:admin:announcements*
     * **Credential required**: *Yes* / **Permission**: *write:admin:announcements*
     * **Credential required**: *Yes* / **Permission**: *write:admin:avatar-decorations*
     * **Credential required**: *Yes* / **Permission**: *write:admin:avatar-decorations*
     * **Credential required**: *Yes* / **Permission**: *read:admin:avatar-decorations*
     * **Credential required**: *Yes* / **Permission**: *write:admin:avatar-decorations*
     * **Credential required**: *Yes* / **Permission**: *write:admin:delete-all-files-of-a-user*
     * **Credential required**: *Yes* / **Permission**: *write:admin:unset-user-avatar*
     * **Credential required**: *Yes* / **Permission**: *write:admin:unset-user-banner*
     * **Credential required**: *Yes* / **Permission**: *write:admin:drive*
     * **Credential required**: *Yes* / **Permission**: *write:admin:drive*
     * **Credential required**: *Yes* / **Permission**: *read:admin:drive*
     * **Credential required**: *Yes* / **Permission**: *read:admin:drive*
     * **Credential required**: *Yes* / **Permission**: *write:admin:emoji*
     * **Credential required**: *Yes* / **Permission**: *write:admin:emoji*
     * **Credential required**: *Yes* / **Permission**: *write:admin:emoji*
     * **Credential required**: *Yes* / **Permission**: *write:admin:emoji*
     * **Credential required**: *Yes* / **Permission**: *write:admin:emoji*
     * **Internal Endpoint**: This endpoint is an API for the misskey mainframe and is not intended for use by third parties.
     * **Credential required**: *Yes*
     * **Credential required**: *Yes* / **Permission**: *read:admin:emoji*
     * **Credential required**: *Yes* / **Permission**: *read:admin:emoji*
     * **Credential required**: *Yes* / **Permission**: *write:admin:emoji*
     * **Credential required**: *Yes* / **Permission**: *write:admin:emoji*
     * **Credential required**: *Yes* / **Permission**: *write:admin:emoji*
     * **Credential required**: *Yes* / **Permission**: *write:admin:emoji*
     * **Credential required**: *Yes* / **Permission**: *write:admin:emoji*
     * **Credential required**: *Yes* / **Permission**: *write:admin:federation*
     * **Credential required**: *Yes* / **Permission**: *write:admin:federation*
     * **Credential required**: *Yes* / **Permission**: *write:admin:federation*
     * **Credential required**: *Yes* / **Permission**: *write:admin:federation*
     * **Credential required**: *Yes* / **Permission**: *read:admin:index-stats*
     * **Credential required**: *Yes* / **Permission**: *read:admin:table-stats*
     * **Credential required**: *Yes* / **Permission**: *read:admin:user-ips*
     * **Credential required**: *Yes* / **Permission**: *write:admin:invite-codes*
     * **Credential required**: *Yes* / **Permission**: *read:admin:invite-codes*
     * **Credential required**: *Yes* / **Permission**: *write:admin:promo*
     * **Credential required**: *Yes* / **Permission**: *write:admin:queue*
     * **Credential required**: *Yes* / **Permission**: *read:admin:queue*
     * **Credential required**: *Yes* / **Permission**: *read:admin:queue*
     * **Credential required**: *Yes* / **Permission**: *write:admin:queue*
     * **Credential required**: *Yes* / **Permission**: *read:admin:emoji*
     * **Credential required**: *Yes* / **Permission**: *write:admin:relays*
     * **Credential required**: *Yes* / **Permission**: *read:admin:relays*
     * **Credential required**: *Yes* / **Permission**: *write:admin:relays*
     * **Credential required**: *Yes* / **Permission**: *write:admin:reset-password*
     * **Credential required**: *Yes* / **Permission**: *write:admin:resolve-abuse-user-report*
     * **Credential required**: *Yes* / **Permission**: *write:admin:send-email*
     * **Credential required**: *Yes* / **Permission**: *read:admin:server-info*
     * **Credential required**: *Yes* / **Permission**: *read:admin:show-moderation-log*
     * **Credential required**: *Yes* / **Permission**: *read:admin:show-user*
     * **Credential required**: *Yes* / **Permission**: *read:admin:show-users*
     * **Credential required**: *Yes* / **Permission**: *write:admin:suspend-user*
     * **Credential required**: *Yes* / **Permission**: *write:admin:unsuspend-user*
     * **Credential required**: *Yes* / **Permission**: *write:admin:meta*
     * **Credential required**: *Yes* / **Permission**: *write:admin:delete-account*
     * **Credential required**: *Yes* / **Permission**: *write:admin:user-note*
     * **Credential required**: *Yes* / **Permission**: *write:admin:roles*
     * **Credential required**: *Yes* / **Permission**: *write:admin:roles*
     * **Credential required**: *Yes* / **Permission**: *read:admin:roles*
     * **Credential required**: *Yes* / **Permission**: *read:admin:roles*
     * **Credential required**: *Yes* / **Permission**: *write:admin:roles*
     * **Credential required**: *Yes* / **Permission**: *write:admin:roles*
     * **Credential required**: *Yes* / **Permission**: *write:admin:roles*
     * **Credential required**: *Yes* / **Permission**: *write:admin:roles*
     * **Credential required**: *No* / **Permission**: *read:admin:roles*
     * **Credential required**: *Yes* / **Permission**: *read:federation*
     * **Credential required**: *Yes* / **Permission**: *read:account*
     * **Credential required**: *No*
     * **Credential required**: *Yes* / **Permission**: *read:account*
     * **Credential required**: *Yes* / **Permission**: *write:account*
     * **Credential required**: *Yes* / **Permission**: *read:account*
     * **Credential required**: *Yes* / **Permission**: *read:account*
     * **Credential required**: *Yes* / **Permission**: *read:account*
     * **Credential required**: *Yes* / **Permission**: *read:account*
     * **Credential required**: *Yes* / **Permission**: *read:account*
     * **Credential required**: *Yes* / **Permission**: *write:account*
     * **Credential required**: *Yes* / **Permission**: *write:account*
     * **Credential required**: *Yes* / **Permission**: *write:invite-codes*
     * **Credential required**: *Yes* / **Permission**: *write:invite-codes*
     * **Credential required**: *Yes* / **Permission**: *read:invite-codes*
     * **Credential required**: *Yes* / **Permission**: *read:invite-codes*
     * **Credential required**: *Yes* / **Permission**: *read:account*
     * **Credential required**: *Yes* / **Permission**: *read:account*
     * **Credential required**: *Yes* / **Permission**: *read:account*
     * **Credential required**: *Yes* / **Permission**: *read:account*
     * **Credential required**: *Yes* / **Permission**: *read:account*
     * **Credential required**: *Yes* / **Permission**: *read:account*
     * **Credential required**: *Yes* / **Permission**: *read:account*
     * **Credential required**: *Yes* / **Permission**: *read:account*
     * **Credential required**: *Yes* / **Permission**: *write:account*
     * **Credential required**: *Yes* / **Permission**: *read:account*
     * **Credential required**: *Yes* / **Permission**: *read:account*
     * **Internal Endpoint**: This endpoint is an API for the misskey mainframe and is not intended for use by third parties.
     * **Internal Endpoint**: This endpoint is an API for the misskey mainframe and is not intended for use by third parties.
     * **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:account*
     * **Credential required**: *Yes* / **Permission**: *write:account*
     * **Credential required**: *Yes* / **Permission**: *write:account*
     * **Credential required**: *Yes* / **Permission**: *read:account*
     * **Credential required**: *Yes* / **Permission**: *write:report-abuse*
     * **Credential required**: *No*
     * **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:meta*
   * **Credential required**: *Yes* / **Permission**: *read:admin:abuse-user-reports*
   * **Internal Endpoint**: This endpoint is an API for the misskey mainframe and is not intended for use by third parties.
   * **Credential required**: *No*
   * **Credential required**: *Yes* / **Permission**: *write:admin:account*
   * **Credential required**: *Yes* / **Permission**: *read:admin:account*
   * **Credential required**: *Yes* / **Permission**: *write:admin:ad*
   * **Credential required**: *Yes* / **Permission**: *write:admin:ad*
   * **Credential required**: *Yes* / **Permission**: *read:admin:ad*
   * **Credential required**: *Yes* / **Permission**: *write:admin:ad*
   * **Credential required**: *Yes* / **Permission**: *write:admin:announcements*
   * **Credential required**: *Yes* / **Permission**: *write:admin:announcements*
   * **Credential required**: *Yes* / **Permission**: *read:admin:announcements*
   * **Credential required**: *Yes* / **Permission**: *write:admin:announcements*
   * **Credential required**: *Yes* / **Permission**: *write:admin:avatar-decorations*
   * **Credential required**: *Yes* / **Permission**: *write:admin:avatar-decorations*
   * **Credential required**: *Yes* / **Permission**: *read:admin:avatar-decorations*
   * **Credential required**: *Yes* / **Permission**: *write:admin:avatar-decorations*
   * **Credential required**: *Yes* / **Permission**: *write:admin:delete-all-files-of-a-user*
   * **Credential required**: *Yes* / **Permission**: *write:admin:unset-user-avatar*
   * **Credential required**: *Yes* / **Permission**: *write:admin:unset-user-banner*
   * **Credential required**: *Yes* / **Permission**: *write:admin:drive*
   * **Credential required**: *Yes* / **Permission**: *write:admin:drive*
   * **Credential required**: *Yes* / **Permission**: *read:admin:drive*
   * **Credential required**: *Yes* / **Permission**: *read:admin:drive*
   * **Credential required**: *Yes* / **Permission**: *write:admin:emoji*
   * **Credential required**: *Yes* / **Permission**: *write:admin:emoji*
   * **Credential required**: *Yes* / **Permission**: *write:admin:emoji*
   * **Credential required**: *Yes* / **Permission**: *write:admin:emoji*
   * **Credential required**: *Yes* / **Permission**: *write:admin:emoji*
   * **Internal Endpoint**: This endpoint is an API for the misskey mainframe and is not intended for use by third parties.
   * **Credential required**: *Yes*
   * **Credential required**: *Yes* / **Permission**: *read:admin:emoji*
   * **Credential required**: *Yes* / **Permission**: *read:admin:emoji*
   * **Credential required**: *Yes* / **Permission**: *write:admin:emoji*
   * **Credential required**: *Yes* / **Permission**: *write:admin:emoji*
   * **Credential required**: *Yes* / **Permission**: *write:admin:emoji*
   * **Credential required**: *Yes* / **Permission**: *write:admin:emoji*
   * **Credential required**: *Yes* / **Permission**: *write:admin:emoji*
   * **Credential required**: *Yes* / **Permission**: *write:admin:federation*
   * **Credential required**: *Yes* / **Permission**: *write:admin:federation*
   * **Credential required**: *Yes* / **Permission**: *write:admin:federation*
   * **Credential required**: *Yes* / **Permission**: *write:admin:federation*
   * **Credential required**: *Yes* / **Permission**: *read:admin:index-stats*
   * **Credential required**: *Yes* / **Permission**: *read:admin:table-stats*
   * **Credential required**: *Yes* / **Permission**: *read:admin:user-ips*
   * **Credential required**: *Yes* / **Permission**: *write:admin:invite-codes*
   * **Credential required**: *Yes* / **Permission**: *read:admin:invite-codes*
   * **Credential required**: *Yes* / **Permission**: *write:admin:promo*
   * **Credential required**: *Yes* / **Permission**: *write:admin:queue*
   * **Credential required**: *Yes* / **Permission**: *read:admin:queue*
   * **Credential required**: *Yes* / **Permission**: *read:admin:queue*
   * **Credential required**: *Yes* / **Permission**: *write:admin:queue*
   * **Credential required**: *Yes* / **Permission**: *read:admin:emoji*
   * **Credential required**: *Yes* / **Permission**: *write:admin:relays*
   * **Credential required**: *Yes* / **Permission**: *read:admin:relays*
   * **Credential required**: *Yes* / **Permission**: *write:admin:relays*
   * **Credential required**: *Yes* / **Permission**: *write:admin:reset-password*
   * **Credential required**: *Yes* / **Permission**: *write:admin:resolve-abuse-user-report*
   * **Credential required**: *Yes* / **Permission**: *write:admin:send-email*
   * **Credential required**: *Yes* / **Permission**: *read:admin:server-info*
   * **Credential required**: *Yes* / **Permission**: *read:admin:show-moderation-log*
   * **Credential required**: *Yes* / **Permission**: *read:admin:show-user*
   * **Credential required**: *Yes* / **Permission**: *read:admin:show-users*
   * **Credential required**: *Yes* / **Permission**: *write:admin:suspend-user*
   * **Credential required**: *Yes* / **Permission**: *write:admin:unsuspend-user*
   * **Credential required**: *Yes* / **Permission**: *write:admin:meta*
   * **Credential required**: *Yes* / **Permission**: *write:admin:delete-account*
   * **Credential required**: *Yes* / **Permission**: *write:admin:user-note*
   * **Credential required**: *Yes* / **Permission**: *write:admin:roles*
   * **Credential required**: *Yes* / **Permission**: *write:admin:roles*
   * **Credential required**: *Yes* / **Permission**: *read:admin:roles*
   * **Credential required**: *Yes* / **Permission**: *read:admin:roles*
   * **Credential required**: *Yes* / **Permission**: *write:admin:roles*
   * **Credential required**: *Yes* / **Permission**: *write:admin:roles*
   * **Credential required**: *Yes* / **Permission**: *write:admin:roles*
   * **Credential required**: *Yes* / **Permission**: *write:admin:roles*
   * **Credential required**: *No* / **Permission**: *read:admin:roles*
   * **Credential required**: *Yes* / **Permission**: *read:federation*
   * **Credential required**: *Yes* / **Permission**: *read:account*
   * **Credential required**: *No*
   * **Credential required**: *Yes* / **Permission**: *read:account*
   * **Credential required**: *Yes* / **Permission**: *write:account*
   * **Credential required**: *Yes* / **Permission**: *read:account*
   * **Credential required**: *Yes* / **Permission**: *read:account*
   * **Credential required**: *Yes* / **Permission**: *read:account*
   * **Credential required**: *Yes* / **Permission**: *read:account*
   * **Credential required**: *Yes* / **Permission**: *read:account*
   * **Credential required**: *Yes* / **Permission**: *write:account*
   * **Credential required**: *Yes* / **Permission**: *write:account*
   * **Credential required**: *Yes* / **Permission**: *write:invite-codes*
   * **Credential required**: *Yes* / **Permission**: *write:invite-codes*
   * **Credential required**: *Yes* / **Permission**: *read:invite-codes*
   * **Credential required**: *Yes* / **Permission**: *read:invite-codes*
   * **Credential required**: *Yes* / **Permission**: *read:account*
   * **Credential required**: *Yes* / **Permission**: *read:account*
   * **Credential required**: *Yes* / **Permission**: *read:account*
   * **Credential required**: *Yes* / **Permission**: *read:account*
   * **Credential required**: *Yes* / **Permission**: *read:account*
   * **Credential required**: *Yes* / **Permission**: *read:account*
   * **Credential required**: *Yes* / **Permission**: *read:account*
   * **Credential required**: *Yes* / **Permission**: *read:account*
   * **Credential required**: *Yes* / **Permission**: *write:account*
   * **Credential required**: *Yes* / **Permission**: *read:account*
   * **Credential required**: *Yes* / **Permission**: *read:account*
   * **Internal Endpoint**: This endpoint is an API for the misskey mainframe and is not intended for use by third parties.
   * **Internal Endpoint**: This endpoint is an API for the misskey mainframe and is not intended for use by third parties.
   * **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:account*
   * **Credential required**: *Yes* / **Permission**: *write:account*
   * **Credential required**: *Yes* / **Permission**: *write:account*
   * **Credential required**: *Yes* / **Permission**: *read:account*
   * **Credential required**: *Yes* / **Permission**: *write:report-abuse*
   * **Credential required**: *No*
   * **Internal Endpoint**: This endpoint is an API for the misskey mainframe and is not intended for use by third parties.
	'read:admin:abuse-user-reports',
	'write:admin:delete-account',
	'write:admin:delete-all-files-of-a-user',
	'read:admin:index-stats',
	'read:admin:table-stats',
	'read:admin:user-ips',
	'read:admin:meta',
	'write:admin:reset-password',
	'write:admin:resolve-abuse-user-report',
	'write:admin:send-email',
	'read:admin:server-info',
	'read:admin:show-moderation-log',
	'read:admin:show-user',
	'read:admin:show-users',
	'write:admin:suspend-user',
	'write:admin:unset-user-avatar',
	'write:admin:unset-user-banner',
	'write:admin:unsuspend-user',
	'write:admin:meta',
	'write:admin:user-note',
	'write:admin:roles',
	'read:admin:roles',
	'write:admin:relays',
	'read:admin:relays',
	'write:admin:invite-codes',
	'read:admin:invite-codes',
	'write:admin:announcements',
	'read:admin:announcements',
	'write:admin:avatar-decorations',
	'read:admin:avatar-decorations',
	'write:admin:federation',
	'write:admin:account',
	'read:admin:account',
	'write:admin:emoji',
	'read:admin:emoji',
	'write:admin:queue',
	'read:admin:queue',
	'write:admin:promo',
	'write:admin:drive',
	'read:admin:drive',
	'write:admin:ad',
	'read:admin:ad',
	'write:invite-codes',
	'read:invite-codes',
	'write:clip-favorite',
	'read:clip-favorite',
	'read:federation',
	'write:report-abuse',
] as const;