kinds).includes(s));
if (!scopes.length) {
throw new AuthorizationError('`scope` parameter has no known scope', 'invalid_scope');
}
@@ -448,30 +448,24 @@ export class OAuth2ProviderService {
return [null, clientInfo, redirectURI];
})().then(args => done(...args), err => done(err));
}) as ValidateFunctionArity2));
- fastify.use('/oauth/authorize', this.#server.errorHandler({
+ fastify.use('/authorize', this.#server.errorHandler({
mode: 'indirect',
modes: getQueryMode(this.config.url),
}));
- fastify.use('/oauth/authorize', this.#server.errorHandler());
+ fastify.use('/authorize', this.#server.errorHandler());
- fastify.use('/oauth/decision', bodyParser.urlencoded({ extended: false }));
- fastify.use('/oauth/decision', this.#server.decision((req, done) => {
+ fastify.use('/decision', bodyParser.urlencoded({ extended: false }));
+ fastify.use('/decision', this.#server.decision((req, done) => {
const { body } = req as OAuth2DecisionRequest;
this.#logger.info(`Received the decision. Cancel: ${!!body.cancel}`);
req.user = body.login_token;
done(null, undefined);
}));
- fastify.use('/oauth/decision', this.#server.errorHandler());
-
- // Clients may use JSON or urlencoded
- fastify.use('/oauth/token', bodyParser.urlencoded({ extended: false }));
- fastify.use('/oauth/token', bodyParser.json({ strict: true }));
- fastify.use('/oauth/token', this.#server.token());
- fastify.use('/oauth/token', this.#server.errorHandler());
+ fastify.use('/decision', this.#server.errorHandler());
// Return 404 for any unknown paths under /oauth so that clients can know
// whether a certain endpoint is supported or not.
- fastify.all('/oauth/*', async (_request, reply) => {
+ fastify.all('/*', async (_request, reply) => {
reply.code(404);
reply.send({
error: {
@@ -483,4 +477,17 @@ export class OAuth2ProviderService {
});
});
}
+
+ @bindThis
+ public async createTokenServer(fastify: FastifyInstance): Promise {
+ fastify.register(fastifyCors);
+ fastify.post('', async () => { });
+
+ await fastify.register(fastifyExpress);
+ // Clients may use JSON or urlencoded
+ fastify.use('', bodyParser.urlencoded({ extended: false }));
+ fastify.use('', bodyParser.json({ strict: true }));
+ fastify.use('', this.#server.token());
+ fastify.use('', this.#server.errorHandler());
+ }
}
diff --git a/packages/backend/src/server/web/FeedService.ts b/packages/backend/src/server/web/FeedService.ts
index 0c9a5370cc..cdb67bb7e7 100644
--- a/packages/backend/src/server/web/FeedService.ts
+++ b/packages/backend/src/server/web/FeedService.ts
@@ -58,9 +58,9 @@ export class FeedService {
const feed = new Feed({
id: author.link,
title: `${author.name} (@${user.username}@${this.config.host})`,
- updated: this.idService.parse(notes[0].id).date,
+ updated: notes.length !== 0 ? this.idService.parse(notes[0].id).date : undefined,
generator: 'CherryPick',
- description: `${user.notesCount} Notes, ${profile.ffVisibility === 'public' ? user.followingCount : '?'} Following, ${profile.ffVisibility === 'public' ? user.followersCount : '?'} Followers${profile.description ? ` · ${profile.description}` : ''}`,
+ description: `${user.notesCount} Notes, ${profile.followingVisibility === 'public' ? user.followingCount : '?'} Following, ${profile.followersVisibility === 'public' ? user.followersCount : '?'} Followers${profile.description ? ` · ${profile.description}` : ''}`,
link: author.link,
image: user.avatarUrl ?? this.userEntityService.getIdenticonUrl(user),
feedLinks: {
diff --git a/packages/backend/src/server/web/boot.js b/packages/backend/src/server/web/boot.js
index 91e9101123..ef8845c56a 100644
--- a/packages/backend/src/server/web/boot.js
+++ b/packages/backend/src/server/web/boot.js
@@ -183,6 +183,7 @@
Clear the browser cache / ブラウザのキャッシュをクリアする / 브라우저의 캐시 지우기
Update your os and browser / ブラウザおよびOSを最新バージョンに更新する / 브라우저와 OS를 최신 버전으로 업데이트 하기
Disable an adblocker / アドブロッカーを無効にする / 광고 차단기를 비활성화 하기
+ (Tor Browser) Set dom.webaudio.enabled to true / dom.webaudio.enabledをtrueに設定する / dom.webaudio.enabled를 true로 설정하기
Other options / その他のオプション / 기타 옵션
diff --git a/packages/backend/src/server/web/views/base.pug b/packages/backend/src/server/web/views/base.pug
index fd80619675..1423d39b8a 100644
--- a/packages/backend/src/server/web/views/base.pug
+++ b/packages/backend/src/server/web/views/base.pug
@@ -36,7 +36,7 @@ html
link(rel='prefetch' href=infoImageUrl)
link(rel='prefetch' href=notFoundImageUrl)
//- https://github.com/misskey-dev/misskey/issues/9842
- link(rel='stylesheet' href='/assets/tabler-icons/tabler-icons.min.css?v2.37.0')
+ link(rel='stylesheet' href=`/assets/tabler-icons.${version}/tabler-icons.min.css`)
link(rel='modulepreload' href=`/vite/${clientEntry.file}`)
if !config.clientManifestExists
diff --git a/packages/backend/src/types.ts b/packages/backend/src/types.ts
index fe8645ab38..6e0fe4e5f9 100644
--- a/packages/backend/src/types.ts
+++ b/packages/backend/src/types.ts
@@ -14,19 +14,36 @@
* pollEnded - 自分のアンケートもしくは自分が投票したアンケートが終了した
* receiveFollowRequest - フォローリクエストされた
* followRequestAccepted - 自分の送ったフォローリクエストが承認された
+ * roleAssigned - ロールが付与された
* groupInvited - グループに招待された
* achievementEarned - 実績を獲得
* app - アプリ通知
* test - テスト通知(サーバー側)
*/
-export const notificationTypes = ['note', 'follow', 'mention', 'reply', 'renote', 'quote', 'reaction', 'pollEnded', 'receiveFollowRequest', 'followRequestAccepted', 'groupInvited', 'achievementEarned', 'app', 'test'] as const;
+export const notificationTypes = [
+ 'note',
+ 'follow',
+ 'mention',
+ 'reply',
+ 'renote',
+ 'quote',
+ 'reaction',
+ 'pollEnded',
+ 'receiveFollowRequest',
+ 'followRequestAccepted',
+ 'roleAssigned',
+ 'groupInvited',
+ 'achievementEarned',
+ 'app',
+ 'test'] as const;
export const obsoleteNotificationTypes = ['pollVote'/*, 'groupInvited'*/] as const;
export const noteVisibilities = ['public', 'home', 'followers', 'specified'] as const;
export const mutedNoteReasons = ['word', 'manual', 'spam', 'other'] as const;
-export const ffVisibility = ['public', 'followers', 'private'] as const;
+export const followingVisibilities = ['public', 'followers', 'private'] as const;
+export const followersVisibilities = ['public', 'followers', 'private'] as const;
export const moderationLogTypes = [
'updateServerSettings',
@@ -64,6 +81,8 @@ export const moderationLogTypes = [
'createAvatarDecoration',
'updateAvatarDecoration',
'deleteAvatarDecoration',
+ 'unsetUserAvatar',
+ 'unsetUserBanner',
] as const;
export type ModerationLogPayloads = {
@@ -238,6 +257,18 @@ export type ModerationLogPayloads = {
avatarDecorationId: string;
avatarDecoration: any;
};
+ unsetUserAvatar: {
+ userId: string;
+ userUsername: string;
+ userHost: string | null;
+ fileId: string;
+ };
+ unsetUserBanner: {
+ userId: string;
+ userUsername: string;
+ userHost: string | null;
+ fileId: string;
+ };
};
export type Serialized = {
diff --git a/packages/backend/test/docker-compose.yml b/packages/backend/test/docker-compose.yml
index 2e97e4d179..f51f88ccde 100644
--- a/packages/backend/test/docker-compose.yml
+++ b/packages/backend/test/docker-compose.yml
@@ -7,7 +7,7 @@ services:
- "127.0.0.1:56312:6379"
dbtest:
- image: postgres:13
+ image: postgres:15
ports:
- "127.0.0.1:54312:5432"
environment:
diff --git a/packages/backend/test/e2e/api.ts b/packages/backend/test/e2e/api.ts
index 3c19954221..3507d46001 100644
--- a/packages/backend/test/e2e/api.ts
+++ b/packages/backend/test/e2e/api.ts
@@ -7,7 +7,7 @@ process.env.NODE_ENV = 'test';
import * as assert from 'assert';
import { IncomingMessage } from 'http';
-import { signup, api, startServer, successfulApiCall, failedApiCall, uploadFile, waitFire, connectStream, relativeFetch } from '../utils.js';
+import { signup, api, startServer, successfulApiCall, failedApiCall, uploadFile, waitFire, connectStream, relativeFetch, createAppToken } from '../utils.js';
import type { INestApplicationContext } from '@nestjs/common';
import type * as misskey from 'cherrypick-js';
@@ -89,6 +89,11 @@ describe('API', () => {
});
test('管理者専用のAPIのアクセス制限', async () => {
+ 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']);
+
// aliceは管理者、APIを使える
await successfulApiCall({
endpoint: '/admin/get-index-stats',
@@ -128,6 +133,42 @@ describe('API', () => {
code: 'AUTHENTICATION_FAILED',
id: 'b0a7f5f8-dc2f-4171-b91f-de88ad238e14',
});
+
+ 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',
+ });
});
describe('Authentication header', () => {
diff --git a/packages/backend/test/e2e/fetch-resource.ts b/packages/backend/test/e2e/fetch-resource.ts
index 95c503f5a7..fb34b60e37 100644
--- a/packages/backend/test/e2e/fetch-resource.ts
+++ b/packages/backend/test/e2e/fetch-resource.ts
@@ -93,7 +93,7 @@ describe('Webリソース', () => {
});
aliceChannel = await channel(alice, {});
- bob = await signup({ username: 'alice' });
+ bob = await signup({ username: 'bob' });
}, 1000 * 60 * 2);
afterAll(async () => {
@@ -152,6 +152,11 @@ describe('Webリソース', () => {
type,
}));
+ test('がGETできる。(ノートが存在しない場合でも。)', async () => await ok({
+ path: path(bob.username),
+ type,
+ }));
+
test('は存在しないユーザーはGETできない。', async () => await notOk({
path: path('nonexisting'),
status: 404,
diff --git a/packages/backend/test/e2e/ff-visibility.ts b/packages/backend/test/e2e/ff-visibility.ts
index 2cfdd84dec..6f3a22de90 100644
--- a/packages/backend/test/e2e/ff-visibility.ts
+++ b/packages/backend/test/e2e/ff-visibility.ts
@@ -26,9 +26,10 @@ describe('FF visibility', () => {
await app.close();
});
- test('ffVisibility が public なユーザーのフォロー/フォロワーを誰でも見れる', async () => {
+ test('followingVisibility, followersVisibility がともに public なユーザーのフォロー/フォロワーを誰でも見れる', async () => {
await api('/i/update', {
- ffVisibility: 'public',
+ followingVisibility: 'public',
+ followersVisibility: 'public',
}, alice);
const followingRes = await api('/users/following', {
@@ -44,9 +45,88 @@ describe('FF visibility', () => {
assert.strictEqual(Array.isArray(followersRes.body), true);
});
- test('ffVisibility が followers なユーザーのフォロー/フォロワーを自分で見れる', async () => {
+ test('followingVisibility が public であれば followersVisibility の設定に関わらずユーザーのフォローを誰でも見れる', async () => {
+ {
+ await api('/i/update', {
+ followingVisibility: 'public',
+ followersVisibility: 'public',
+ }, alice);
+
+ const followingRes = await api('/users/following', {
+ userId: alice.id,
+ }, bob);
+ assert.strictEqual(followingRes.status, 200);
+ assert.strictEqual(Array.isArray(followingRes.body), true);
+ }
+ {
+ await api('/i/update', {
+ followingVisibility: 'public',
+ followersVisibility: 'followers',
+ }, alice);
+
+ const followingRes = await api('/users/following', {
+ userId: alice.id,
+ }, bob);
+ assert.strictEqual(followingRes.status, 200);
+ assert.strictEqual(Array.isArray(followingRes.body), true);
+ }
+ {
+ await api('/i/update', {
+ followingVisibility: 'public',
+ followersVisibility: 'private',
+ }, alice);
+
+ const followingRes = await api('/users/following', {
+ userId: alice.id,
+ }, bob);
+ assert.strictEqual(followingRes.status, 200);
+ assert.strictEqual(Array.isArray(followingRes.body), true);
+ }
+ });
+
+ test('followersVisibility が public であれば followingVisibility の設定に関わらずユーザーのフォロワーを誰でも見れる', async () => {
+ {
+ await api('/i/update', {
+ followingVisibility: 'public',
+ followersVisibility: 'public',
+ }, alice);
+
+ const followersRes = await api('/users/followers', {
+ userId: alice.id,
+ }, bob);
+ assert.strictEqual(followersRes.status, 200);
+ assert.strictEqual(Array.isArray(followersRes.body), true);
+ }
+ {
+ await api('/i/update', {
+ followingVisibility: 'followers',
+ followersVisibility: 'public',
+ }, alice);
+
+ const followersRes = await api('/users/followers', {
+ userId: alice.id,
+ }, bob);
+ assert.strictEqual(followersRes.status, 200);
+ assert.strictEqual(Array.isArray(followersRes.body), true);
+ }
+ {
+ await api('/i/update', {
+ followingVisibility: 'private',
+ followersVisibility: 'public',
+ }, alice);
+
+ const followersRes = await api('/users/followers', {
+ userId: alice.id,
+ }, bob);
+ assert.strictEqual(followersRes.status, 200);
+ assert.strictEqual(Array.isArray(followersRes.body), true);
+ }
+ });
+
+ test('followingVisibility, followersVisibility がともに followers なユーザーのフォロー/フォロワーを自分で見れる', async () => {
await api('/i/update', {
- ffVisibility: 'followers',
+ followingVisibility: 'followers',
+ followersVisibility: 'followers',
}, alice);
const followingRes = await api('/users/following', {
@@ -62,9 +142,88 @@ describe('FF visibility', () => {
assert.strictEqual(Array.isArray(followersRes.body), true);
});
- test('ffVisibility が followers なユーザーのフォロー/フォロワーを非フォロワーが見れない', async () => {
+ test('followingVisibility が followers なユーザーのフォローを followersVisibility の設定に関わらず自分で見れる', async () => {
+ {
+ await api('/i/update', {
+ followingVisibility: 'followers',
+ followersVisibility: 'public',
+ }, alice);
+
+ const followingRes = await api('/users/following', {
+ userId: alice.id,
+ }, alice);
+ assert.strictEqual(followingRes.status, 200);
+ assert.strictEqual(Array.isArray(followingRes.body), true);
+ }
+ {
+ await api('/i/update', {
+ followingVisibility: 'followers',
+ followersVisibility: 'followers',
+ }, alice);
+
+ const followingRes = await api('/users/following', {
+ userId: alice.id,
+ }, alice);
+ assert.strictEqual(followingRes.status, 200);
+ assert.strictEqual(Array.isArray(followingRes.body), true);
+ }
+ {
+ await api('/i/update', {
+ followingVisibility: 'followers',
+ followersVisibility: 'private',
+ }, alice);
+
+ const followingRes = await api('/users/following', {
+ userId: alice.id,
+ }, alice);
+ assert.strictEqual(followingRes.status, 200);
+ assert.strictEqual(Array.isArray(followingRes.body), true);
+ }
+ });
+
+ test('followersVisibility が followers なユーザーのフォロワーを followingVisibility の設定に関わらず自分で見れる', async () => {
+ {
+ await api('/i/update', {
+ followingVisibility: 'public',
+ followersVisibility: 'followers',
+ }, alice);
+
+ const followersRes = await api('/users/followers', {
+ userId: alice.id,
+ }, alice);
+ assert.strictEqual(followersRes.status, 200);
+ assert.strictEqual(Array.isArray(followersRes.body), true);
+ }
+ {
+ await api('/i/update', {
+ followingVisibility: 'followers',
+ followersVisibility: 'followers',
+ }, alice);
+
+ const followersRes = await api('/users/followers', {
+ userId: alice.id,
+ }, alice);
+ assert.strictEqual(followersRes.status, 200);
+ assert.strictEqual(Array.isArray(followersRes.body), true);
+ }
+ {
+ await api('/i/update', {
+ followingVisibility: 'private',
+ followersVisibility: 'followers',
+ }, alice);
+
+ const followersRes = await api('/users/followers', {
+ userId: alice.id,
+ }, alice);
+ assert.strictEqual(followersRes.status, 200);
+ assert.strictEqual(Array.isArray(followersRes.body), true);
+ }
+ });
+
+ test('followingVisibility, followersVisibility がともに followers なユーザーのフォロー/フォロワーを非フォロワーが見れない', async () => {
await api('/i/update', {
- ffVisibility: 'followers',
+ followingVisibility: 'followers',
+ followersVisibility: 'followers',
}, alice);
const followingRes = await api('/users/following', {
@@ -78,9 +237,82 @@ describe('FF visibility', () => {
assert.strictEqual(followersRes.status, 400);
});
- test('ffVisibility が followers なユーザーのフォロー/フォロワーをフォロワーが見れる', async () => {
+ test('followingVisibility が followers なユーザーのフォローを followersVisibility の設定に関わらず非フォロワーが見れない', async () => {
+ {
+ await api('/i/update', {
+ followingVisibility: 'followers',
+ followersVisibility: 'public',
+ }, alice);
+
+ const followingRes = await api('/users/following', {
+ userId: alice.id,
+ }, bob);
+ assert.strictEqual(followingRes.status, 400);
+ }
+ {
+ await api('/i/update', {
+ followingVisibility: 'followers',
+ followersVisibility: 'followers',
+ }, alice);
+
+ const followingRes = await api('/users/following', {
+ userId: alice.id,
+ }, bob);
+ assert.strictEqual(followingRes.status, 400);
+ }
+ {
+ await api('/i/update', {
+ followingVisibility: 'followers',
+ followersVisibility: 'private',
+ }, alice);
+
+ const followingRes = await api('/users/following', {
+ userId: alice.id,
+ }, bob);
+ assert.strictEqual(followingRes.status, 400);
+ }
+ });
+
+ test('followersVisibility が followers なユーザーのフォロワーを followingVisibility の設定に関わらず非フォロワーが見れない', async () => {
+ {
+ await api('/i/update', {
+ followingVisibility: 'public',
+ followersVisibility: 'followers',
+ }, alice);
+
+ const followersRes = await api('/users/followers', {
+ userId: alice.id,
+ }, bob);
+ assert.strictEqual(followersRes.status, 400);
+ }
+ {
+ await api('/i/update', {
+ followingVisibility: 'followers',
+ followersVisibility: 'followers',
+ }, alice);
+
+ const followersRes = await api('/users/followers', {
+ userId: alice.id,
+ }, bob);
+ assert.strictEqual(followersRes.status, 400);
+ }
+ {
+ await api('/i/update', {
+ followingVisibility: 'private',
+ followersVisibility: 'followers',
+ }, alice);
+
+ const followersRes = await api('/users/followers', {
+ userId: alice.id,
+ }, bob);
+ assert.strictEqual(followersRes.status, 400);
+ }
+ });
+
+ test('followingVisibility, followersVisibility がともに followers なユーザーのフォロー/フォロワーをフォロワーが見れる', async () => {
await api('/i/update', {
- ffVisibility: 'followers',
+ followingVisibility: 'followers',
+ followersVisibility: 'followers',
}, alice);
await api('/following/create', {
@@ -100,9 +332,106 @@ describe('FF visibility', () => {
assert.strictEqual(Array.isArray(followersRes.body), true);
});
- test('ffVisibility が private なユーザーのフォロー/フォロワーを自分で見れる', async () => {
+ test('followingVisibility が followers なユーザーのフォローを followersVisibility の設定に関わらずフォロワーが見れる', async () => {
+ {
+ await api('/i/update', {
+ followingVisibility: 'followers',
+ followersVisibility: 'public',
+ }, alice);
+ await api('/following/create', {
+ userId: alice.id,
+ }, bob);
+
+ const followingRes = await api('/users/following', {
+ userId: alice.id,
+ }, bob);
+ assert.strictEqual(followingRes.status, 200);
+ assert.strictEqual(Array.isArray(followingRes.body), true);
+ }
+ {
+ await api('/i/update', {
+ followingVisibility: 'followers',
+ followersVisibility: 'followers',
+ }, alice);
+ await api('/following/create', {
+ userId: alice.id,
+ }, bob);
+
+ const followingRes = await api('/users/following', {
+ userId: alice.id,
+ }, bob);
+ assert.strictEqual(followingRes.status, 200);
+ assert.strictEqual(Array.isArray(followingRes.body), true);
+ }
+ {
+ await api('/i/update', {
+ followingVisibility: 'followers',
+ followersVisibility: 'private',
+ }, alice);
+ await api('/following/create', {
+ userId: alice.id,
+ }, bob);
+
+ const followingRes = await api('/users/following', {
+ userId: alice.id,
+ }, bob);
+ assert.strictEqual(followingRes.status, 200);
+ assert.strictEqual(Array.isArray(followingRes.body), true);
+ }
+ });
+
+ test('followersVisibility が followers なユーザーのフォロワーを followingVisibility の設定に関わらずフォロワーが見れる', async () => {
+ {
+ await api('/i/update', {
+ followingVisibility: 'public',
+ followersVisibility: 'followers',
+ }, alice);
+ await api('/following/create', {
+ userId: alice.id,
+ }, bob);
+
+ const followersRes = await api('/users/followers', {
+ userId: alice.id,
+ }, bob);
+ assert.strictEqual(followersRes.status, 200);
+ assert.strictEqual(Array.isArray(followersRes.body), true);
+ }
+ {
+ await api('/i/update', {
+ followingVisibility: 'followers',
+ followersVisibility: 'followers',
+ }, alice);
+ await api('/following/create', {
+ userId: alice.id,
+ }, bob);
+
+ const followersRes = await api('/users/followers', {
+ userId: alice.id,
+ }, bob);
+ assert.strictEqual(followersRes.status, 200);
+ assert.strictEqual(Array.isArray(followersRes.body), true);
+ }
+ {
+ await api('/i/update', {
+ followingVisibility: 'private',
+ followersVisibility: 'followers',
+ }, alice);
+ await api('/following/create', {
+ userId: alice.id,
+ }, bob);
+
+ const followersRes = await api('/users/followers', {
+ userId: alice.id,
+ }, bob);
+ assert.strictEqual(followersRes.status, 200);
+ assert.strictEqual(Array.isArray(followersRes.body), true);
+ }
+ });
+
+ test('followingVisibility, followersVisibility がともに private なユーザーのフォロー/フォロワーを自分で見れる', async () => {
await api('/i/update', {
- ffVisibility: 'private',
+ followingVisibility: 'private',
+ followersVisibility: 'private',
}, alice);
const followingRes = await api('/users/following', {
@@ -118,9 +447,88 @@ describe('FF visibility', () => {
assert.strictEqual(Array.isArray(followersRes.body), true);
});
- test('ffVisibility が private なユーザーのフォロー/フォロワーを他人が見れない', async () => {
+ test('followingVisibility が private なユーザーのフォローを followersVisibility の設定に関わらず自分で見れる', async () => {
+ {
+ await api('/i/update', {
+ followingVisibility: 'private',
+ followersVisibility: 'public',
+ }, alice);
+
+ const followingRes = await api('/users/following', {
+ userId: alice.id,
+ }, alice);
+ assert.strictEqual(followingRes.status, 200);
+ assert.strictEqual(Array.isArray(followingRes.body), true);
+ }
+ {
+ await api('/i/update', {
+ followingVisibility: 'private',
+ followersVisibility: 'followers',
+ }, alice);
+
+ const followingRes = await api('/users/following', {
+ userId: alice.id,
+ }, alice);
+ assert.strictEqual(followingRes.status, 200);
+ assert.strictEqual(Array.isArray(followingRes.body), true);
+ }
+ {
+ await api('/i/update', {
+ followingVisibility: 'private',
+ followersVisibility: 'private',
+ }, alice);
+
+ const followingRes = await api('/users/following', {
+ userId: alice.id,
+ }, alice);
+ assert.strictEqual(followingRes.status, 200);
+ assert.strictEqual(Array.isArray(followingRes.body), true);
+ }
+ });
+
+ test('followersVisibility が private なユーザーのフォロワーを followingVisibility の設定に関わらず自分で見れる', async () => {
+ {
+ await api('/i/update', {
+ followingVisibility: 'public',
+ followersVisibility: 'private',
+ }, alice);
+
+ const followersRes = await api('/users/followers', {
+ userId: alice.id,
+ }, alice);
+ assert.strictEqual(followersRes.status, 200);
+ assert.strictEqual(Array.isArray(followersRes.body), true);
+ }
+ {
+ await api('/i/update', {
+ followingVisibility: 'followers',
+ followersVisibility: 'private',
+ }, alice);
+
+ const followersRes = await api('/users/followers', {
+ userId: alice.id,
+ }, alice);
+ assert.strictEqual(followersRes.status, 200);
+ assert.strictEqual(Array.isArray(followersRes.body), true);
+ }
+ {
+ await api('/i/update', {
+ followingVisibility: 'private',
+ followersVisibility: 'private',
+ }, alice);
+
+ const followersRes = await api('/users/followers', {
+ userId: alice.id,
+ }, alice);
+ assert.strictEqual(followersRes.status, 200);
+ assert.strictEqual(Array.isArray(followersRes.body), true);
+ }
+ });
+
+ test('followingVisibility, followersVisibility がともに private なユーザーのフォロー/フォロワーを他人が見れない', async () => {
await api('/i/update', {
- ffVisibility: 'private',
+ followingVisibility: 'private',
+ followersVisibility: 'private',
}, alice);
const followingRes = await api('/users/following', {
@@ -134,36 +542,129 @@ describe('FF visibility', () => {
assert.strictEqual(followersRes.status, 400);
});
+ test('followingVisibility が private なユーザーのフォローを followersVisibility の設定に関わらず他人が見れない', async () => {
+ {
+ await api('/i/update', {
+ followingVisibility: 'private',
+ followersVisibility: 'public',
+ }, alice);
+
+ const followingRes = await api('/users/following', {
+ userId: alice.id,
+ }, bob);
+ assert.strictEqual(followingRes.status, 400);
+ }
+ {
+ await api('/i/update', {
+ followingVisibility: 'private',
+ followersVisibility: 'followers',
+ }, alice);
+
+ const followingRes = await api('/users/following', {
+ userId: alice.id,
+ }, bob);
+ assert.strictEqual(followingRes.status, 400);
+ }
+ {
+ await api('/i/update', {
+ followingVisibility: 'private',
+ followersVisibility: 'private',
+ }, alice);
+
+ const followingRes = await api('/users/following', {
+ userId: alice.id,
+ }, bob);
+ assert.strictEqual(followingRes.status, 400);
+ }
+ });
+
+ test('followersVisibility が private なユーザーのフォロワーを followingVisibility の設定に関わらず他人が見れない', async () => {
+ {
+ await api('/i/update', {
+ followingVisibility: 'public',
+ followersVisibility: 'private',
+ }, alice);
+
+ const followersRes = await api('/users/followers', {
+ userId: alice.id,
+ }, bob);
+ assert.strictEqual(followersRes.status, 400);
+ }
+ {
+ await api('/i/update', {
+ followingVisibility: 'followers',
+ followersVisibility: 'private',
+ }, alice);
+
+ const followersRes = await api('/users/followers', {
+ userId: alice.id,
+ }, bob);
+ assert.strictEqual(followersRes.status, 400);
+ }
+ {
+ await api('/i/update', {
+ followingVisibility: 'private',
+ followersVisibility: 'private',
+ }, alice);
+
+ const followersRes = await api('/users/followers', {
+ userId: alice.id,
+ }, bob);
+ assert.strictEqual(followersRes.status, 400);
+ }
+ });
+
describe('AP', () => {
- test('ffVisibility が public 以外ならばAPからは取得できない', async () => {
+ test('followingVisibility が public 以外ならばAPからはフォローを取得できない', async () => {
{
await api('/i/update', {
- ffVisibility: 'public',
+ followingVisibility: 'public',
}, alice);
const followingRes = await simpleGet(`/users/${alice.id}/following`, 'application/activity+json');
- const followersRes = await simpleGet(`/users/${alice.id}/followers`, 'application/activity+json');
assert.strictEqual(followingRes.status, 200);
+ }
+ {
+ await api('/i/update', {
+ followingVisibility: 'followers',
+ }, alice);
+
+ const followingRes = await simpleGet(`/users/${alice.id}/following`, 'application/activity+json');
+ assert.strictEqual(followingRes.status, 403);
+ }
+ {
+ await api('/i/update', {
+ followingVisibility: 'private',
+ }, alice);
+
+ const followingRes = await simpleGet(`/users/${alice.id}/following`, 'application/activity+json');
+ assert.strictEqual(followingRes.status, 403);
+ }
+ });
+
+ test('followersVisibility が public 以外ならばAPからはフォロワーを取得できない', async () => {
+ {
+ await api('/i/update', {
+ followersVisibility: 'public',
+ }, alice);
+
+ const followersRes = await simpleGet(`/users/${alice.id}/followers`, 'application/activity+json');
assert.strictEqual(followersRes.status, 200);
}
{
await api('/i/update', {
- ffVisibility: 'followers',
+ followersVisibility: 'followers',
}, alice);
- const followingRes = await simpleGet(`/users/${alice.id}/following`, 'application/activity+json');
const followersRes = await simpleGet(`/users/${alice.id}/followers`, 'application/activity+json');
- assert.strictEqual(followingRes.status, 403);
assert.strictEqual(followersRes.status, 403);
}
{
await api('/i/update', {
- ffVisibility: 'private',
+ followersVisibility: 'private',
}, alice);
- const followingRes = await simpleGet(`/users/${alice.id}/following`, 'application/activity+json');
const followersRes = await simpleGet(`/users/${alice.id}/followers`, 'application/activity+json');
- assert.strictEqual(followingRes.status, 403);
assert.strictEqual(followersRes.status, 403);
}
});
diff --git a/packages/backend/test/e2e/nodeinfo.ts b/packages/backend/test/e2e/nodeinfo.ts
new file mode 100644
index 0000000000..21b45c41b8
--- /dev/null
+++ b/packages/backend/test/e2e/nodeinfo.ts
@@ -0,0 +1,40 @@
+/*
+ * SPDX-FileCopyrightText: syuilo and other misskey, cherrypick contributors
+ * SPDX-License-Identifier: AGPL-3.0-only
+ */
+
+process.env.NODE_ENV = 'test';
+
+import * as assert from 'assert';
+import { relativeFetch, startServer } from '../utils.js';
+import type { INestApplicationContext } from '@nestjs/common';
+
+describe('nodeinfo', () => {
+ let app: INestApplicationContext;
+
+ beforeAll(async () => {
+ app = await startServer();
+ }, 1000 * 60 * 2);
+
+ afterAll(async () => {
+ await app.close();
+ });
+
+ test('nodeinfo 2.1', async () => {
+ const res = await relativeFetch('nodeinfo/2.1');
+ assert.ok(res.ok);
+ assert.strictEqual(res.headers.get('Access-Control-Allow-Origin'), '*');
+
+ const nodeInfo = await res.json() as any;
+ assert.strictEqual(nodeInfo.software.name, 'cherrypick');
+ });
+
+ test('nodeinfo 2.0', async () => {
+ const res = await relativeFetch('nodeinfo/2.0');
+ assert.ok(res.ok);
+ assert.strictEqual(res.headers.get('Access-Control-Allow-Origin'), '*');
+
+ const nodeInfo = await res.json() as any;
+ assert.strictEqual(nodeInfo.software.name, 'cherrypick');
+ });
+});
diff --git a/packages/backend/test/e2e/oauth.ts b/packages/backend/test/e2e/oauth.ts
index 5e00ca1483..38686d5582 100644
--- a/packages/backend/test/e2e/oauth.ts
+++ b/packages/backend/test/e2e/oauth.ts
@@ -4,7 +4,7 @@
*/
/**
- * Basic OAuth tests to make sure the library is correctly integrated to Misskey
+ * Basic OAuth tests to make sure the library is correctly integrated to CherryPick
* and not regressed by version updates or potential migration to another library.
*/
@@ -134,7 +134,7 @@ function assertIndirectError(response: Response, error: string): void {
assert.strictEqual(location.searchParams.get('error'), error);
// https://datatracker.ietf.org/doc/html/rfc9207#name-response-parameter-iss
- assert.strictEqual(location.searchParams.get('iss'), 'http://misskey.local');
+ assert.strictEqual(location.searchParams.get('iss'), 'http://cherrypick.local');
// https://datatracker.ietf.org/doc/html/rfc6749.html#section-4.1.2.1
assert.ok(location.searchParams.has('state'));
}
@@ -168,12 +168,12 @@ describe('OAuth', () => {
}, 1000 * 60 * 2);
beforeEach(async () => {
- process.env.MISSKEY_TEST_CHECK_IP_RANGE = '';
+ process.env.CHERRYPICK_TEST_CHECK_IP_RANGE = '';
sender = (reply): void => {
reply.send(`
- Misklient
+ Crpklient
`);
};
});
@@ -200,7 +200,7 @@ describe('OAuth', () => {
const meta = getMeta(await response.text());
assert.strictEqual(typeof meta.transactionId, 'string');
assert.ok(meta.transactionId);
- assert.strictEqual(meta.clientName, 'Misklient');
+ assert.strictEqual(meta.clientName, 'Crpklient');
const decisionResponse = await fetchDecision(meta.transactionId, alice);
assert.strictEqual(decisionResponse.status, 302);
@@ -812,7 +812,7 @@ describe('OAuth', () => {
reply.header('Link', '; rel="redirect_uri"');
reply.send(`
- Misklient
+ Crpklient
`);
},
'Mixed links': reply => {
@@ -820,14 +820,14 @@ describe('OAuth', () => {
reply.send(`
- Misklient
+ Crpklient
`);
},
'Multiple items in Link header': reply => {
reply.header('Link', '; rel="redirect_uri",; rel="redirect_uri"');
reply.send(`
- Misklient
+ Crpklient
`);
},
'Multiple items in HTML': reply => {
@@ -835,7 +835,7 @@ describe('OAuth', () => {
- Misklient
+ Crpklient
`);
},
};
@@ -861,7 +861,7 @@ describe('OAuth', () => {
sender = (reply): void => {
reply.send(`
- Misklient
+ Crpklient
`);
};
@@ -881,7 +881,7 @@ describe('OAuth', () => {
});
test('Disallow loopback', async () => {
- process.env.MISSKEY_TEST_CHECK_IP_RANGE = '1';
+ process.env.CHERRYPICK_TEST_CHECK_IP_RANGE = '1';
const client = new AuthorizationCode(clientConfig);
const response = await fetch(client.authorizeURL({
@@ -918,7 +918,7 @@ describe('OAuth', () => {
reply.header('Link', '; rel="redirect_uri"');
reply.send(`
- Misklient
+ Crpklient
`);
reply.send();
};
@@ -941,4 +941,24 @@ describe('OAuth', () => {
const response = await fetch(new URL('/oauth/foo', host));
assert.strictEqual(response.status, 404);
});
+
+ describe('CORS', () => {
+ test('Token endpoint should support CORS', async () => {
+ const response = await fetch(new URL('/oauth/token', host), { method: 'POST' });
+ assert.ok(!response.ok);
+ assert.strictEqual(response.headers.get('Access-Control-Allow-Origin'), '*');
+ });
+
+ test('Authorize endpoint should not support CORS', async () => {
+ const response = await fetch(new URL('/oauth/authorize', host), { method: 'GET' });
+ assert.ok(!response.ok);
+ assert.ok(!response.headers.has('Access-Control-Allow-Origin'));
+ });
+
+ test('Decision endpoint should not support CORS', async () => {
+ const response = await fetch(new URL('/oauth/decision', host), { method: 'POST' });
+ assert.ok(!response.ok);
+ assert.ok(!response.headers.has('Access-Control-Allow-Origin'));
+ });
+ });
});
diff --git a/packages/backend/test/e2e/streaming.ts b/packages/backend/test/e2e/streaming.ts
index ece3c92b72..9d7d9a3074 100644
--- a/packages/backend/test/e2e/streaming.ts
+++ b/packages/backend/test/e2e/streaming.ts
@@ -6,8 +6,9 @@
process.env.NODE_ENV = 'test';
import * as assert from 'assert';
+import { WebSocket } from 'ws';
import { MiFollowing } from '@/models/Following.js';
-import { connectStream, signup, api, post, startServer, initTestDb, waitFire } from '../utils.js';
+import { signup, api, post, startServer, initTestDb, waitFire, createAppToken, port } from '../utils.js';
import type { INestApplicationContext } from '@nestjs/common';
import type * as misskey from 'cherrypick-js';
@@ -34,12 +35,16 @@ describe('Streaming', () => {
let ayano: misskey.entities.MeSignup;
let kyoko: misskey.entities.MeSignup;
let chitose: misskey.entities.MeSignup;
+ let kanako: misskey.entities.MeSignup;
// Remote users
let akari: misskey.entities.MeSignup;
let chinatsu: misskey.entities.MeSignup;
+ let takumi: misskey.entities.MeSignup;
let kyokoNote: any;
+ let kanakoNote: any;
+ let takumiNote: any;
let list: any;
beforeAll(async () => {
@@ -50,11 +55,15 @@ describe('Streaming', () => {
ayano = await signup({ username: 'ayano' });
kyoko = await signup({ username: 'kyoko' });
chitose = await signup({ username: 'chitose' });
+ kanako = await signup({ username: 'kanako' });
akari = await signup({ username: 'akari', host: 'example.com' });
chinatsu = await signup({ username: 'chinatsu', host: 'example.com' });
+ takumi = await signup({ username: 'takumi', host: 'example.com' });
kyokoNote = await post(kyoko, { text: 'foo' });
+ kanakoNote = await post(kanako, { text: 'hoge' });
+ takumiNote = await post(takumi, { text: 'piyo' });
// Follow: ayano => kyoko
await api('following/create', { userId: kyoko.id }, ayano);
@@ -62,6 +71,9 @@ describe('Streaming', () => {
// Follow: ayano => akari
await follow(ayano, akari);
+ // Mute: chitose => kanako
+ await api('mute/create', { userId: kanako.id }, chitose);
+
// List: chitose => ayano, kyoko
list = await api('users/lists/create', {
name: 'my list',
@@ -76,6 +88,11 @@ describe('Streaming', () => {
listId: list.id,
userId: kyoko.id,
}, chitose);
+
+ await api('users/lists/push', {
+ listId: list.id,
+ userId: takumi.id,
+ }, chitose);
}, 1000 * 60 * 2);
afterAll(async () => {
@@ -452,6 +469,118 @@ describe('Streaming', () => {
assert.strictEqual(fired, false);
});
+
+ // #10443
+ test('チャンネル投稿は流れない', async () => {
+ // リスインしている kyoko が 任意のチャンネルに投降した時の動きを見たい
+ const fired = await waitFire(
+ chitose, 'userList',
+ () => api('notes/create', { text: 'foo', channelId: 'dummy' }, kyoko),
+ msg => msg.type === 'note' && msg.body.userId === kyoko.id,
+ { listId: list.id },
+ );
+
+ assert.strictEqual(fired, false);
+ });
+
+ // #10443
+ test('ミュートしているユーザへのリプライがリストTLに流れない', async () => {
+ // chitose が kanako をミュートしている状態で、リスインしている kyoko が kanako にリプライした時の動きを見たい
+ const fired = await waitFire(
+ chitose, 'userList',
+ () => api('notes/create', { text: 'foo', replyId: kanakoNote.id }, kyoko),
+ msg => msg.type === 'note' && msg.body.userId === kyoko.id,
+ { listId: list.id },
+ );
+
+ assert.strictEqual(fired, false);
+ });
+
+ // #10443
+ test('ミュートしているユーザの投稿をリノートしたときリストTLに流れない', async () => {
+ // chitose が kanako をミュートしている状態で、リスインしている kyoko が kanako のノートをリノートした時の動きを見たい
+ const fired = await waitFire(
+ chitose, 'userList',
+ () => api('notes/create', { renoteId: kanakoNote.id }, kyoko),
+ msg => msg.type === 'note' && msg.body.userId === kyoko.id,
+ { listId: list.id },
+ );
+
+ assert.strictEqual(fired, false);
+ });
+
+ // #10443
+ test('ミュートしているサーバのノートがリストTLに流れない', async () => {
+ await api('/i/update', {
+ mutedInstances: ['example.com'],
+ }, chitose);
+
+ // chitose が example.com をミュートしている状態で、リスインしている takumi が ノートした時の動きを見たい
+ const fired = await waitFire(
+ chitose, 'userList',
+ () => api('notes/create', { text: 'foo' }, takumi),
+ msg => msg.type === 'note' && msg.body.userId === kyoko.id,
+ { listId: list.id },
+ );
+
+ assert.strictEqual(fired, false);
+ });
+
+ // #10443
+ test('ミュートしているサーバのノートに対するリプライがリストTLに流れない', async () => {
+ await api('/i/update', {
+ mutedInstances: ['example.com'],
+ }, chitose);
+
+ // chitose が example.com をミュートしている状態で、リスインしている kyoko が takumi のノートにリプライした時の動きを見たい
+ const fired = await waitFire(
+ chitose, 'userList',
+ () => api('notes/create', { text: 'foo', replyId: takumiNote.id }, kyoko),
+ msg => msg.type === 'note' && msg.body.userId === kyoko.id,
+ { listId: list.id },
+ );
+
+ assert.strictEqual(fired, false);
+ });
+
+ // #10443
+ test('ミュートしているサーバのノートに対するリノートがリストTLに流れない', async () => {
+ await api('/i/update', {
+ mutedInstances: ['example.com'],
+ }, chitose);
+
+ // chitose が example.com をミュートしている状態で、リスインしている kyoko が takumi のノートをリノートした時の動きを見たい
+ const fired = await waitFire(
+ chitose, 'userList',
+ () => api('notes/create', { renoteId: takumiNote.id }, kyoko),
+ msg => msg.type === 'note' && msg.body.userId === kyoko.id,
+ { listId: list.id },
+ );
+
+ assert.strictEqual(fired, false);
+ });
+ });
+
+ 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((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);
});
// XXX: QueryFailedError: duplicate key value violates unique constraint "IDX_347fec870eafea7b26c8a73bac"
diff --git a/packages/backend/test/e2e/timelines.ts b/packages/backend/test/e2e/timelines.ts
index 94956047d4..ed125da6d3 100644
--- a/packages/backend/test/e2e/timelines.ts
+++ b/packages/backend/test/e2e/timelines.ts
@@ -10,9 +10,8 @@ process.env.NODE_ENV = 'test';
process.env.FORCE_FOLLOW_REMOTE_USER_FOR_TESTING = 'true';
import * as assert from 'assert';
-import { signup, api, post, react, startServer, waitFire, sleep, uploadUrl, randomString } from '../utils.js';
+import { api, post, randomString, signup, sleep, startServer, uploadUrl } from '../utils.js';
import type { INestApplicationContext } from '@nestjs/common';
-import type * as misskey from 'cherrypick-js';
function genHost() {
return randomString() + '.example.com';
@@ -366,8 +365,8 @@ describe('Timelines', () => {
await api('/following/create', { userId: bob.id }, alice);
await sleep(1000);
const [bobFile, carolFile] = await Promise.all([
- uploadUrl(bob, 'https://raw.githubusercontent.com/misskey-dev/assets/main/icon.png'),
- uploadUrl(carol, 'https://raw.githubusercontent.com/misskey-dev/assets/main/icon.png'),
+ uploadUrl(bob, 'https://raw.githubusercontent.com/misskey-dev/assets/main/public/icon.png'),
+ uploadUrl(carol, 'https://raw.githubusercontent.com/misskey-dev/assets/main/public/icon.png'),
]);
const bobNote1 = await post(bob, { text: 'hi' });
const bobNote2 = await post(bob, { fileIds: [bobFile.id] });
@@ -666,7 +665,7 @@ describe('Timelines', () => {
test.concurrent('[withFiles: true] ファイル付きノートのみ含まれる', async () => {
const [alice, bob] = await Promise.all([signup(), signup()]);
- const file = await uploadUrl(bob, 'https://raw.githubusercontent.com/misskey-dev/assets/main/icon.png');
+ const file = await uploadUrl(bob, 'https://raw.githubusercontent.com/misskey-dev/assets/main/public/icon.png');
const bobNote1 = await post(bob, { text: 'hi' });
const bobNote2 = await post(bob, { fileIds: [file.id] });
@@ -804,7 +803,7 @@ describe('Timelines', () => {
test.concurrent('[withFiles: true] ファイル付きノートのみ含まれる', async () => {
const [alice, bob] = await Promise.all([signup(), signup()]);
- const file = await uploadUrl(bob, 'https://raw.githubusercontent.com/misskey-dev/assets/main/icon.png');
+ const file = await uploadUrl(bob, 'https://raw.githubusercontent.com/misskey-dev/assets/main/public/icon.png');
const bobNote1 = await post(bob, { text: 'hi' });
const bobNote2 = await post(bob, { fileIds: [file.id] });
@@ -999,7 +998,7 @@ describe('Timelines', () => {
const list = await api('/users/lists/create', { name: 'list' }, alice).then(res => res.body);
await api('/users/lists/push', { listId: list.id, userId: bob.id }, alice);
- const file = await uploadUrl(bob, 'https://raw.githubusercontent.com/misskey-dev/assets/main/icon.png');
+ const file = await uploadUrl(bob, 'https://raw.githubusercontent.com/misskey-dev/assets/main/public/icon.png');
const bobNote1 = await post(bob, { text: 'hi' });
const bobNote2 = await post(bob, { fileIds: [file.id] });
@@ -1158,7 +1157,7 @@ describe('Timelines', () => {
test.concurrent('[withFiles: true] ファイル付きノートのみ含まれる', async () => {
const [alice, bob] = await Promise.all([signup(), signup()]);
- const file = await uploadUrl(bob, 'https://raw.githubusercontent.com/misskey-dev/assets/main/icon.png');
+ const file = await uploadUrl(bob, 'https://raw.githubusercontent.com/misskey-dev/assets/main/public/icon.png');
const bobNote1 = await post(bob, { text: 'hi' });
const bobNote2 = await post(bob, { fileIds: [file.id] });
diff --git a/packages/backend/test/e2e/users.ts b/packages/backend/test/e2e/users.ts
index 89bacc7bd3..5fa6f9a1c6 100644
--- a/packages/backend/test/e2e/users.ts
+++ b/packages/backend/test/e2e/users.ts
@@ -112,7 +112,8 @@ describe('ユーザー', () => {
pinnedPageId: user.pinnedPageId,
pinnedPage: user.pinnedPage,
publicReactions: user.publicReactions,
- ffVisibility: user.ffVisibility,
+ followingVisibility: user.followingVisibility,
+ followersVisibility: user.followersVisibility,
twoFactorEnabled: user.twoFactorEnabled,
usePasswordLessLogin: user.usePasswordLessLogin,
securityKeys: user.securityKeys,
@@ -169,6 +170,7 @@ describe('ユーザー', () => {
hasPendingReceivedFollowRequest: user.hasPendingReceivedFollowRequest,
unreadAnnouncements: user.unreadAnnouncements,
mutedWords: user.mutedWords,
+ hardMutedWords: user.hardMutedWords,
mutedInstances: user.mutedInstances,
mutingNotificationTypes: user.mutingNotificationTypes,
notificationRecieveConfig: user.notificationRecieveConfig,
@@ -386,7 +388,8 @@ describe('ユーザー', () => {
assert.strictEqual(response.pinnedPageId, null);
assert.strictEqual(response.pinnedPage, null);
assert.strictEqual(response.publicReactions, true);
- assert.strictEqual(response.ffVisibility, 'public');
+ assert.strictEqual(response.followingVisibility, 'public');
+ assert.strictEqual(response.followersVisibility, 'public');
assert.strictEqual(response.twoFactorEnabled, false);
assert.strictEqual(response.usePasswordLessLogin, false);
assert.strictEqual(response.securityKeys, false);
@@ -496,9 +499,12 @@ describe('ユーザー', () => {
{ parameters: (): object => ({ alwaysMarkNsfw: false }) },
{ parameters: (): object => ({ autoSensitive: true }) },
{ parameters: (): object => ({ autoSensitive: false }) },
- { parameters: (): object => ({ ffVisibility: 'private' }) },
- { parameters: (): object => ({ ffVisibility: 'followers' }) },
- { parameters: (): object => ({ ffVisibility: 'public' }) },
+ { parameters: (): object => ({ followingVisibility: 'private' }) },
+ { parameters: (): object => ({ followingVisibility: 'followers' }) },
+ { parameters: (): object => ({ followingVisibility: 'public' }) },
+ { parameters: (): object => ({ followersVisibility: 'private' }) },
+ { parameters: (): object => ({ followersVisibility: 'followers' }) },
+ { parameters: (): object => ({ followersVisibility: 'public' }) },
{ parameters: (): object => ({ mutedWords: Array(19).fill(['xxxxx']) }) },
{ parameters: (): object => ({ mutedWords: [['x'.repeat(194)]] }) },
{ parameters: (): object => ({ mutedWords: [] }) },
diff --git a/packages/backend/test/e2e/well-known.ts b/packages/backend/test/e2e/well-known.ts
new file mode 100644
index 0000000000..b30dead3e4
--- /dev/null
+++ b/packages/backend/test/e2e/well-known.ts
@@ -0,0 +1,111 @@
+/*
+ * SPDX-FileCopyrightText: syuilo and other misskey, cherrypick contributors
+ * SPDX-License-Identifier: AGPL-3.0-only
+ */
+
+process.env.NODE_ENV = 'test';
+
+import * as assert from 'assert';
+import { host, origin, relativeFetch, signup, startServer } from '../utils.js';
+import type { INestApplicationContext } from '@nestjs/common';
+import type * as misskey from 'cherrypick-js';
+
+describe('.well-known', () => {
+ let app: INestApplicationContext;
+ let alice: misskey.entities.User;
+
+ beforeAll(async () => {
+ app = await startServer();
+
+ alice = await signup({ username: 'alice' });
+ }, 1000 * 60 * 2);
+
+ afterAll(async () => {
+ await app.close();
+ });
+
+ test('nodeinfo', async () => {
+ const res = await relativeFetch('.well-known/nodeinfo');
+ assert.ok(res.ok);
+ assert.strictEqual(res.headers.get('Access-Control-Allow-Origin'), '*');
+
+ const nodeInfo = await res.json();
+ assert.deepStrictEqual(nodeInfo, {
+ links: [{
+ rel: 'http://nodeinfo.diaspora.software/ns/schema/2.1',
+ href: `${origin}/nodeinfo/2.1`,
+ }, {
+ rel: 'http://nodeinfo.diaspora.software/ns/schema/2.0',
+ href: `${origin}/nodeinfo/2.0`,
+ }],
+ });
+ });
+
+ test('webfinger', async () => {
+ const preflight = await relativeFetch(`.well-known/webfinger?resource=acct:alice@${host}`, {
+ method: 'options',
+ headers: {
+ 'Access-Control-Request-Method': 'GET',
+ Origin: 'http://example.com',
+ },
+ });
+ assert.ok(preflight.ok);
+ assert.strictEqual(preflight.headers.get('Access-Control-Allow-Headers'), 'Accept');
+
+ const res = await relativeFetch(`.well-known/webfinger?resource=acct:alice@${host}`);
+ assert.ok(res.ok);
+ assert.strictEqual(res.headers.get('Access-Control-Allow-Origin'), '*');
+ assert.strictEqual(res.headers.get('Access-Control-Expose-Headers'), 'Vary');
+ assert.strictEqual(res.headers.get('Vary'), 'Accept');
+
+ const webfinger = await res.json();
+
+ assert.deepStrictEqual(webfinger, {
+ subject: `acct:alice@${host}`,
+ links: [{
+ rel: 'self',
+ type: 'application/activity+json',
+ href: `${origin}/users/${alice.id}`,
+ }, {
+ rel: 'http://webfinger.net/rel/profile-page',
+ type: 'text/html',
+ href: `${origin}/@alice`,
+ }, {
+ rel: 'http://ostatus.org/schema/1.0/subscribe',
+ template: `${origin}/authorize-follow?acct={uri}`,
+ }],
+ });
+ });
+
+ test('host-meta', async () => {
+ const res = await relativeFetch('.well-known/host-meta');
+ assert.ok(res.ok);
+ assert.strictEqual(res.headers.get('Access-Control-Allow-Origin'), '*');
+ });
+
+ test('host-meta.json', async () => {
+ const res = await relativeFetch('.well-known/host-meta.json');
+ assert.ok(res.ok);
+ assert.strictEqual(res.headers.get('Access-Control-Allow-Origin'), '*');
+
+ const hostMeta = await res.json();
+ assert.deepStrictEqual(hostMeta, {
+ links: [{
+ rel: 'lrdd',
+ type: 'application/jrd+json',
+ template: `${origin}/.well-known/webfinger?resource={uri}`,
+ }],
+ });
+ });
+
+ test('oauth-authorization-server', async () => {
+ const res = await relativeFetch('.well-known/oauth-authorization-server');
+ assert.ok(res.ok);
+ assert.strictEqual(res.headers.get('Access-Control-Allow-Origin'), '*');
+
+ const serverInfo = await res.json() as any;
+ assert.strictEqual(serverInfo.issuer, origin);
+ assert.strictEqual(serverInfo.authorization_endpoint, `${origin}/oauth/authorize`);
+ assert.strictEqual(serverInfo.token_endpoint, `${origin}/oauth/token`);
+ });
+});
diff --git a/packages/backend/test/unit/RoleService.ts b/packages/backend/test/unit/RoleService.ts
index 7feae17051..b887b9dd03 100644
--- a/packages/backend/test/unit/RoleService.ts
+++ b/packages/backend/test/unit/RoleService.ts
@@ -19,6 +19,7 @@ import { CacheService } from '@/core/CacheService.js';
import { IdService } from '@/core/IdService.js';
import { GlobalEventService } from '@/core/GlobalEventService.js';
import { secureRndstr } from '@/misc/secure-rndstr.js';
+import { NotificationService } from '@/core/NotificationService.js';
import { sleep } from '../utils.js';
import type { TestingModule } from '@nestjs/testing';
import type { MockFunctionMetadata } from 'jest-mock';
@@ -32,6 +33,7 @@ describe('RoleService', () => {
let rolesRepository: RolesRepository;
let roleAssignmentsRepository: RoleAssignmentsRepository;
let metaService: jest.Mocked;
+ let notificationService: jest.Mocked;
let clock: lolex.InstalledClock;
function createUser(data: Partial = {}) {
@@ -71,6 +73,16 @@ describe('RoleService', () => {
CacheService,
IdService,
GlobalEventService,
+ {
+ provide: NotificationService,
+ useFactory: () => ({
+ createNotification: jest.fn(),
+ }),
+ },
+ {
+ provide: NotificationService.name,
+ useExisting: NotificationService,
+ },
],
})
.useMocker((token) => {
@@ -93,6 +105,9 @@ describe('RoleService', () => {
roleAssignmentsRepository = app.get(DI.roleAssignmentsRepository);
metaService = app.get(MetaService) as jest.Mocked;
+ notificationService = app.get(NotificationService) as jest.Mocked;
+
+ await roleService.onModuleInit();
});
afterEach(async () => {
@@ -273,4 +288,57 @@ describe('RoleService', () => {
expect(resultAfter25hAgain.canManageCustomEmojis).toBe(true);
});
});
+
+ describe('assign', () => {
+ test('公開ロールの場合は通知される', async () => {
+ const user = await createUser();
+ const role = await createRole({
+ isPublic: true,
+ name: 'a',
+ });
+
+ await roleService.assign(user.id, role.id);
+
+ clock.uninstall();
+ await sleep(100);
+
+ const assignments = await roleAssignmentsRepository.find({
+ where: {
+ userId: user.id,
+ roleId: role.id,
+ },
+ });
+ expect(assignments).toHaveLength(1);
+
+ expect(notificationService.createNotification).toHaveBeenCalled();
+ expect(notificationService.createNotification.mock.lastCall![0]).toBe(user.id);
+ expect(notificationService.createNotification.mock.lastCall![1]).toBe('roleAssigned');
+ expect(notificationService.createNotification.mock.lastCall![2]).toEqual({
+ roleId: role.id,
+ });
+ });
+
+ test('非公開ロールの場合は通知されない', async () => {
+ const user = await createUser();
+ const role = await createRole({
+ isPublic: false,
+ name: 'a',
+ });
+
+ await roleService.assign(user.id, role.id);
+
+ clock.uninstall();
+ await sleep(100);
+
+ const assignments = await roleAssignmentsRepository.find({
+ where: {
+ userId: user.id,
+ roleId: role.id,
+ },
+ });
+ expect(assignments).toHaveLength(1);
+
+ expect(notificationService.createNotification).not.toHaveBeenCalled();
+ });
+ });
});
diff --git a/packages/backend/test/utils.ts b/packages/backend/test/utils.ts
index d03f7af9eb..f000aa7bb4 100644
--- a/packages/backend/test/utils.ts
+++ b/packages/backend/test/utils.ts
@@ -6,14 +6,15 @@
import * as assert from 'node:assert';
import { readFile } from 'node:fs/promises';
import { isAbsolute, basename } from 'node:path';
+import { randomUUID } from 'node:crypto';
import { inspect } from 'node:util';
import WebSocket, { ClientOptions } from 'ws';
import fetch, { File, RequestInit } from 'node-fetch';
import { DataSource } from 'typeorm';
import { JSDOM } from 'jsdom';
import { DEFAULT_POLICIES } from '@/core/RoleService.js';
-import { entities } from '../src/postgres.js';
-import { loadConfig } from '../src/config.js';
+import { entities } from '@/postgres.js';
+import { loadConfig } from '@/config.js';
import type * as misskey from 'cherrypick-js';
export { server as startServer } from '@/boot/common.js';
@@ -25,6 +26,8 @@ interface UserToken {
const config = loadConfig();
export const port = config.port;
+export const origin = config.url;
+export const host = new URL(config.url).host;
export const cookie = (me: UserToken): string => {
return `token=${me.token};`;
@@ -126,6 +129,15 @@ export const post = async (user: UserToken, params?: misskey.Endpoints['notes/cr
return res.body ? res.body.createdNote : null;
};
+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;
+};
+
// 非公開ノートをAPI越しに見たときのノート NoteEntityService.ts
export const hiddenNote = (note: any): any => {
const temp = {
diff --git a/packages/cherrypick-js/.swcrc b/packages/cherrypick-js/.swcrc
index d9f047b6ac..0504a2d389 100644
--- a/packages/cherrypick-js/.swcrc
+++ b/packages/cherrypick-js/.swcrc
@@ -11,7 +11,7 @@
"decoratorMetadata": true
},
"experimental": {
- "keepImportAttributes": true
+ "keepImportAssertions": true
},
"baseUrl": "src",
"paths": {
diff --git a/packages/cherrypick-js/etc/cherrypick-js.api.md b/packages/cherrypick-js/etc/cherrypick-js.api.md
index 45f74faa28..bd5513d36b 100644
--- a/packages/cherrypick-js/etc/cherrypick-js.api.md
+++ b/packages/cherrypick-js/etc/cherrypick-js.api.md
@@ -21,57 +21,391 @@ declare namespace acct {
}
export { acct }
-// Warning: (ae-forgotten-export) The symbol "TODO_2" needs to be exported by the entry point index.d.ts
+// Warning: (ae-forgotten-export) The symbol "components" needs to be exported by the entry point index.d.ts
//
// @public (undocumented)
-type Ad = TODO_2;
+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 AdminAbuseReportResolverCreateRequest = operations['admin/abuse-report-resolver/create']['requestBody']['content']['application/json'];
// @public (undocumented)
-type AdminInstanceMetadata = DetailedInstanceMetadata & {
- blockedHosts: string[];
- silencedHosts: string[];
- app192IconUrl: string | null;
- app512IconUrl: string | null;
- manifestJsonOverride: string;
+type AdminAbuseReportResolverCreateResponse = operations['admin/abuse-report-resolver/create']['responses']['200']['content']['application/json'];
+
+// @public (undocumented)
+type AdminAbuseReportResolverDeleteRequest = operations['admin/abuse-report-resolver/delete']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type AdminAbuseReportResolverListRequest = operations['admin/abuse-report-resolver/list']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type AdminAbuseReportResolverListResponse = operations['admin/abuse-report-resolver/list']['responses']['200']['content']['application/json'];
+
+// @public (undocumented)
+type AdminAbuseReportResolverUpdateRequest = operations['admin/abuse-report-resolver/update']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type AdminAbuseUserReportsRequest = operations['admin/abuse-user-reports']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type AdminAbuseUserReportsResponse = operations['admin/abuse-user-reports']['responses']['200']['content']['application/json'];
+
+// @public (undocumented)
+type AdminAccountsCreateRequest = operations['admin/accounts/create']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type AdminAccountsCreateResponse = operations['admin/accounts/create']['responses']['200']['content']['application/json'];
+
+// @public (undocumented)
+type AdminAccountsDeleteRequest = operations['admin/accounts/delete']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type AdminAccountsFindByEmailRequest = operations['admin/accounts/find-by-email']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type AdminAccountsFindByEmailResponse = operations['admin/accounts/find-by-email']['responses']['200']['content']['application/json'];
+
+// @public (undocumented)
+type AdminAdCreateRequest = operations['admin/ad/create']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type AdminAdCreateResponse = operations['admin/ad/create']['responses']['200']['content']['application/json'];
+
+// @public (undocumented)
+type AdminAdDeleteRequest = operations['admin/ad/delete']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type AdminAdListRequest = operations['admin/ad/list']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type AdminAdListResponse = operations['admin/ad/list']['responses']['200']['content']['application/json'];
+
+// @public (undocumented)
+type AdminAdUpdateRequest = operations['admin/ad/update']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type AdminAnnouncementsCreateRequest = operations['admin/announcements/create']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type AdminAnnouncementsCreateResponse = operations['admin/announcements/create']['responses']['200']['content']['application/json'];
+
+// @public (undocumented)
+type AdminAnnouncementsDeleteRequest = operations['admin/announcements/delete']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type AdminAnnouncementsListRequest = operations['admin/announcements/list']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type AdminAnnouncementsListResponse = operations['admin/announcements/list']['responses']['200']['content']['application/json'];
+
+// @public (undocumented)
+type AdminAnnouncementsUpdateRequest = operations['admin/announcements/update']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type AdminAvatarDecorationsCreateRequest = operations['admin/avatar-decorations/create']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type AdminAvatarDecorationsDeleteRequest = operations['admin/avatar-decorations/delete']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type AdminAvatarDecorationsListRequest = operations['admin/avatar-decorations/list']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type AdminAvatarDecorationsListResponse = operations['admin/avatar-decorations/list']['responses']['200']['content']['application/json'];
+
+// @public (undocumented)
+type AdminAvatarDecorationsUpdateRequest = operations['admin/avatar-decorations/update']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type AdminDeleteAccountRequest = operations['admin/delete-account']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type AdminDeleteAccountResponse = operations['admin/delete-account']['responses']['200']['content']['application/json'];
+
+// @public (undocumented)
+type AdminDeleteAllFilesOfAUserRequest = operations['admin/delete-all-files-of-a-user']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type AdminDriveFilesRequest = operations['admin/drive/files']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type AdminDriveFilesResponse = operations['admin/drive/files']['responses']['200']['content']['application/json'];
+
+// @public (undocumented)
+type AdminDriveShowFileRequest = operations['admin/drive/show-file']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type AdminDriveShowFileResponse = operations['admin/drive/show-file']['responses']['200']['content']['application/json'];
+
+// @public (undocumented)
+type AdminEmojiAddAliasesBulkRequest = operations['admin/emoji/add-aliases-bulk']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type AdminEmojiAddRequest = operations['admin/emoji/add']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type AdminEmojiAddsRequest = operations['admin/emoji/adds']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type AdminEmojiCopyRequest = operations['admin/emoji/copy']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type AdminEmojiCopyResponse = operations['admin/emoji/copy']['responses']['200']['content']['application/json'];
+
+// @public (undocumented)
+type AdminEmojiDeleteBulkRequest = operations['admin/emoji/delete-bulk']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type AdminEmojiDeleteRequest = operations['admin/emoji/delete']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type AdminEmojiImportZipRequest = operations['admin/emoji/import-zip']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type AdminEmojiListRemoteRequest = operations['admin/emoji/list-remote']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type AdminEmojiListRemoteResponse = operations['admin/emoji/list-remote']['responses']['200']['content']['application/json'];
+
+// @public (undocumented)
+type AdminEmojiListRequest = operations['admin/emoji/list']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type AdminEmojiListResponse = operations['admin/emoji/list']['responses']['200']['content']['application/json'];
+
+// @public (undocumented)
+type AdminEmojiRemoveAliasesBulkRequest = operations['admin/emoji/remove-aliases-bulk']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type AdminEmojiSetAliasesBulkRequest = operations['admin/emoji/set-aliases-bulk']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type AdminEmojiSetCategoryBulkRequest = operations['admin/emoji/set-category-bulk']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type AdminEmojiSetLicenseBulkRequest = operations['admin/emoji/set-license-bulk']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type AdminEmojiStealRequest = operations['admin/emoji/steal']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type AdminEmojiStealResponse = operations['admin/emoji/steal']['responses']['200']['content']['application/json'];
+
+// @public (undocumented)
+type AdminEmojiUpdateRequest = operations['admin/emoji/update']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type AdminFederationDeleteAllFilesRequest = operations['admin/federation/delete-all-files']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type AdminFederationRefreshRemoteInstanceMetadataRequest = operations['admin/federation/refresh-remote-instance-metadata']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type AdminFederationRemoveAllFollowingRequest = operations['admin/federation/remove-all-following']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type AdminFederationUpdateInstanceRequest = operations['admin/federation/update-instance']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type AdminGetIndexStatsResponse = operations['admin/get-index-stats']['responses']['200']['content']['application/json'];
+
+// @public (undocumented)
+type AdminGetTableStatsResponse = operations['admin/get-table-stats']['responses']['200']['content']['application/json'];
+
+// @public (undocumented)
+type AdminGetUserIpsRequest = operations['admin/get-user-ips']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type AdminGetUserIpsResponse = operations['admin/get-user-ips']['responses']['200']['content']['application/json'];
+
+// @public (undocumented)
+type AdminInviteCreateRequest = operations['admin/invite/create']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type AdminInviteCreateResponse = operations['admin/invite/create']['responses']['200']['content']['application/json'];
+
+// @public (undocumented)
+type AdminInviteListRequest = operations['admin/invite/list']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type AdminInviteListResponse = operations['admin/invite/list']['responses']['200']['content']['application/json'];
+
+// @public (undocumented)
+type AdminMetaResponse = operations['admin/meta']['responses']['200']['content']['application/json'];
+
+// @public (undocumented)
+type AdminPromoCreateRequest = operations['admin/promo/create']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type AdminQueueDeliverDelayedResponse = operations['admin/queue/deliver-delayed']['responses']['200']['content']['application/json'];
+
+// @public (undocumented)
+type AdminQueueInboxDelayedResponse = operations['admin/queue/inbox-delayed']['responses']['200']['content']['application/json'];
+
+// @public (undocumented)
+type AdminQueuePromoteRequest = operations['admin/queue/promote']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type AdminQueueStatsResponse = operations['admin/queue/stats']['responses']['200']['content']['application/json'];
+
+// @public (undocumented)
+type AdminRelaysAddRequest = operations['admin/relays/add']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type AdminRelaysAddResponse = operations['admin/relays/add']['responses']['200']['content']['application/json'];
+
+// @public (undocumented)
+type AdminRelaysListResponse = operations['admin/relays/list']['responses']['200']['content']['application/json'];
+
+// @public (undocumented)
+type AdminRelaysRemoveRequest = operations['admin/relays/remove']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type AdminResetPasswordRequest = operations['admin/reset-password']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type AdminResetPasswordResponse = operations['admin/reset-password']['responses']['200']['content']['application/json'];
+
+// @public (undocumented)
+type AdminResolveAbuseUserReportRequest = operations['admin/resolve-abuse-user-report']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type AdminRolesAssignRequest = operations['admin/roles/assign']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type AdminRolesCreateRequest = operations['admin/roles/create']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type AdminRolesCreateResponse = operations['admin/roles/create']['responses']['200']['content']['application/json'];
+
+// @public (undocumented)
+type AdminRolesDeleteRequest = operations['admin/roles/delete']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type AdminRolesListResponse = operations['admin/roles/list']['responses']['200']['content']['application/json'];
+
+// @public (undocumented)
+type AdminRolesShowRequest = operations['admin/roles/show']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type AdminRolesShowResponse = operations['admin/roles/show']['responses']['200']['content']['application/json'];
+
+// @public (undocumented)
+type AdminRolesUnassignRequest = operations['admin/roles/unassign']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type AdminRolesUpdateDefaultPoliciesRequest = operations['admin/roles/update-default-policies']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type AdminRolesUpdateRequest = operations['admin/roles/update']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type AdminRolesUsersRequest = operations['admin/roles/users']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type AdminRolesUsersResponse = operations['admin/roles/users']['responses']['200']['content']['application/json'];
+
+// @public (undocumented)
+type AdminSendEmailRequest = operations['admin/send-email']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type AdminServerInfoResponse = operations['admin/server-info']['responses']['200']['content']['application/json'];
+
+// @public (undocumented)
+type AdminShowModerationLogsRequest = operations['admin/show-moderation-logs']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type AdminShowModerationLogsResponse = operations['admin/show-moderation-logs']['responses']['200']['content']['application/json'];
+
+// @public (undocumented)
+type AdminShowUserRequest = operations['admin/show-user']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type AdminShowUserResponse = operations['admin/show-user']['responses']['200']['content']['application/json'];
+
+// @public (undocumented)
+type AdminShowUsersRequest = operations['admin/show-users']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type AdminShowUsersResponse = operations['admin/show-users']['responses']['200']['content']['application/json'];
+
+// @public (undocumented)
+type AdminSuspendUserRequest = operations['admin/suspend-user']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type AdminUnsetUserAvatarRequest = operations['admin/unset-user-avatar']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type AdminUnsetUserBannerRequest = operations['admin/unset-user-banner']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type AdminUnsuspendUserRequest = operations['admin/unsuspend-user']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type AdminUpdateMetaRequest = operations['admin/update-meta']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type AdminUpdateUserNoteRequest = operations['admin/update-user-note']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type Announcement = components['schemas']['Announcement'];
+
+// @public (undocumented)
+type AnnouncementCreated = {
+ announcement: Announcement;
};
// @public (undocumented)
-type Announcement = {
- id: ID;
- createdAt: DateString;
- updatedAt: DateString | null;
- text: string;
- title: string;
- imageUrl: string | null;
- display: 'normal' | 'banner' | 'dialog';
- icon: 'info' | 'warning' | 'error' | 'success';
- needConfirmationToRead: boolean;
- forYou: boolean;
- isRead?: boolean;
-};
+type AnnouncementsRequest = operations['announcements']['requestBody']['content']['application/json'];
// @public (undocumented)
-type Antenna = {
- id: ID;
- createdAt: DateString;
- name: string;
- keywords: string[][];
- excludeKeywords: string[][];
- src: 'home' | 'all' | 'users' | 'list' | 'group';
- userListId: ID | null;
- userGroupId: ID | null;
- users: string[];
- caseSensitive: boolean;
- localOnly: boolean;
- notify: boolean;
- withReplies: boolean;
- withFile: boolean;
- hasUnreadNote: boolean;
-};
+type AnnouncementsResponse = operations['announcements']['responses']['200']['content']['application/json'];
+
+// @public (undocumented)
+type Antenna = components['schemas']['Antenna'];
+
+// @public (undocumented)
+type AntennasCreateRequest = operations['antennas/create']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type AntennasCreateResponse = operations['antennas/create']['responses']['200']['content']['application/json'];
+
+// @public (undocumented)
+type AntennasDeleteRequest = operations['antennas/delete']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type AntennasListResponse = operations['antennas/list']['responses']['200']['content']['application/json'];
+
+// @public (undocumented)
+type AntennasNotesRequest = operations['antennas/notes']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type AntennasNotesResponse = operations['antennas/notes']['responses']['200']['content']['application/json'];
+
+// @public (undocumented)
+type AntennasShowRequest = operations['antennas/show']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type AntennasShowResponse = operations['antennas/show']['responses']['200']['content']['application/json'];
+
+// @public (undocumented)
+type AntennasUpdateRequest = operations['antennas/update']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type AntennasUpdateResponse = operations['antennas/update']['responses']['200']['content']['application/json'];
+
+// @public (undocumented)
+type ApGetRequest = operations['ap/get']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type ApGetResponse = operations['ap/get']['responses']['200']['content']['application/json'];
declare namespace api {
export {
isAPIError,
+ SwitchCaseResponseType,
APIError,
FetchLike,
APIClient
@@ -92,16 +426,6 @@ class APIClient {
fetch: FetchLike;
// (undocumented)
origin: string;
- // Warning: (ae-forgotten-export) The symbol "IsCaseMatched" needs to be exported by the entry point index.d.ts
- // Warning: (ae-forgotten-export) The symbol "GetCaseResult" needs to be exported by the entry point index.d.ts
- //
- // (undocumented)
- request(endpoint: E, params?: P, credential?: string | null | undefined): Promise extends true ? GetCaseResult : IsCaseMatched extends true ? GetCaseResult : IsCaseMatched extends true ? GetCaseResult : IsCaseMatched extends true ? GetCaseResult : IsCaseMatched extends true ? GetCaseResult : IsCaseMatched extends true ? GetCaseResult : IsCaseMatched extends true ? GetCaseResult : IsCaseMatched extends true ? GetCaseResult : IsCaseMatched extends true ? GetCaseResult : IsCaseMatched extends true ? GetCaseResult : Endpoints[E]['res']['$switch']['$default'] : Endpoints[E]['res']>;
}
// @public (undocumented)
@@ -114,41 +438,70 @@ type APIError = {
};
// @public (undocumented)
-type App = TODO_2;
+type App = components['schemas']['App'];
// @public (undocumented)
-type AuthSession = {
- id: ID;
- app: App;
- token: string;
-};
+type AppCreateRequest = operations['app/create']['requestBody']['content']['application/json'];
// @public (undocumented)
-type Blocking = {
- id: ID;
- createdAt: DateString;
- blockeeId: User['id'];
- blockee: UserDetailed;
-};
+type AppCreateResponse = operations['app/create']['responses']['200']['content']['application/json'];
// @public (undocumented)
-type Channel = {
- id: ID;
- lastNotedAt: Date | null;
- userId: User['id'] | null;
- user: User | null;
- name: string;
- description: string | null;
- bannerId: DriveFile['id'] | null;
- banner: DriveFile | null;
- pinnedNoteIds: string[];
- color: string;
- isArchived: boolean;
- notesCount: number;
- usersCount: number;
- isSensitive: boolean;
- allowRenoteToExternal: boolean;
-};
+type AppShowRequest = operations['app/show']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type AppShowResponse = operations['app/show']['responses']['200']['content']['application/json'];
+
+// @public (undocumented)
+type ApShowRequest = operations['ap/show']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type ApShowResponse = operations['ap/show']['responses']['200']['content']['application/json'];
+
+// @public (undocumented)
+type AuthAcceptRequest = operations['auth/accept']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type AuthSessionGenerateRequest = operations['auth/session/generate']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type AuthSessionGenerateResponse = operations['auth/session/generate']['responses']['200']['content']['application/json'];
+
+// @public (undocumented)
+type AuthSessionShowRequest = operations['auth/session/show']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type AuthSessionShowResponse = operations['auth/session/show']['responses']['200']['content']['application/json'];
+
+// @public (undocumented)
+type AuthSessionUserkeyRequest = operations['auth/session/userkey']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type AuthSessionUserkeyResponse = operations['auth/session/userkey']['responses']['200']['content']['application/json'];
+
+// @public (undocumented)
+type Blocking = components['schemas']['Blocking'];
+
+// @public (undocumented)
+type BlockingCreateRequest = operations['blocking/create']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type BlockingCreateResponse = operations['blocking/create']['responses']['200']['content']['application/json'];
+
+// @public (undocumented)
+type BlockingDeleteRequest = operations['blocking/delete']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type BlockingDeleteResponse = operations['blocking/delete']['responses']['200']['content']['application/json'];
+
+// @public (undocumented)
+type BlockingListRequest = operations['blocking/list']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type BlockingListResponse = operations['blocking/list']['responses']['200']['content']['application/json'];
+
+// @public (undocumented)
+type Channel = components['schemas']['Channel'];
// Warning: (ae-forgotten-export) The symbol "AnyOf" needs to be exported by the entry point index.d.ts
//
@@ -204,9 +557,7 @@ export type Channels = {
unreadAntenna: (payload: Antenna) => void;
readAllAnnouncements: () => void;
myTokenRegenerated: () => void;
- reversiNoInvites: () => void;
- reversiInvited: (payload: FIXME) => void;
- signin: (payload: FIXME) => void;
+ signin: (payload: Signin) => void;
registryUpdated: (payload: {
scope?: string[];
key: string;
@@ -214,32 +565,52 @@ export type Channels = {
}) => void;
driveFileCreated: (payload: DriveFile) => void;
readAntenna: (payload: Antenna) => void;
+ receiveFollowRequest: (payload: User) => void;
+ announcementCreated: (payload: AnnouncementCreated) => void;
};
receives: null;
};
homeTimeline: {
- params: null;
+ params: {
+ withRenotes?: boolean;
+ withFiles?: boolean;
+ withCats?: boolean;
+ };
events: {
note: (payload: Note) => void;
};
receives: null;
};
localTimeline: {
- params: null;
+ params: {
+ withRenotes?: boolean;
+ withReplies?: boolean;
+ withFiles?: boolean;
+ withCats?: boolean;
+ };
events: {
note: (payload: Note) => void;
};
receives: null;
};
hybridTimeline: {
- params: null;
+ params: {
+ withRenotes?: boolean;
+ withReplies?: boolean;
+ withFiles?: boolean;
+ withCats?: boolean;
+ };
events: {
note: (payload: Note) => void;
};
receives: null;
};
globalTimeline: {
- params: null;
+ params: {
+ withRenotes?: boolean;
+ withFiles?: boolean;
+ withCats?: boolean;
+ };
events: {
note: (payload: Note) => void;
};
@@ -262,10 +633,70 @@ export type Channels = {
};
};
};
+ userList: {
+ params: {
+ listId: string;
+ withFiles?: boolean;
+ withCats?: boolean;
+ };
+ events: {
+ note: (payload: Note) => void;
+ };
+ receives: null;
+ };
+ hashtag: {
+ params: {
+ q?: string;
+ };
+ events: {
+ note: (payload: Note) => void;
+ };
+ receives: null;
+ };
+ roleTimeline: {
+ params: {
+ roleId: string;
+ };
+ events: {
+ note: (payload: Note) => void;
+ };
+ receives: null;
+ };
+ antenna: {
+ params: {
+ antennaId: string;
+ };
+ events: {
+ note: (payload: Note) => void;
+ };
+ receives: null;
+ };
+ channel: {
+ params: {
+ channelId: string;
+ };
+ events: {
+ note: (payload: Note) => void;
+ };
+ receives: null;
+ };
+ drive: {
+ params: null;
+ events: {
+ fileCreated: (payload: DriveFile) => void;
+ fileDeleted: (payload: DriveFile['id']) => void;
+ fileUpdated: (payload: DriveFile) => void;
+ folderCreated: (payload: DriveFolder) => void;
+ folderDeleted: (payload: DriveFolder['id']) => void;
+ folderUpdated: (payload: DriveFile) => void;
+ };
+ receives: null;
+ };
serverStats: {
params: null;
events: {
- stats: (payload: FIXME) => void;
+ stats: (payload: ServerStats) => void;
+ statsLog: (payload: ServerStatsLog) => void;
};
receives: {
requestLog: {
@@ -277,7 +708,8 @@ export type Channels = {
queueStats: {
params: null;
events: {
- stats: (payload: FIXME) => void;
+ stats: (payload: QueueStats) => void;
+ statsLog: (payload: QueueStatsLog) => void;
};
receives: {
requestLog: {
@@ -286,2015 +718,366 @@ export type Channels = {
};
};
};
+ admin: {
+ params: null;
+ events: {
+ newAbuseUserReport: {
+ id: string;
+ targetUserId: string;
+ reporterId: string;
+ comment: string;
+ };
+ };
+ receives: null;
+ };
};
// @public (undocumented)
-type Clip = TODO_2;
+type ChannelsCreateRequest = operations['channels/create']['requestBody']['content']['application/json'];
// @public (undocumented)
-type CustomEmoji = {
- id: string;
- name: string;
- url: string;
- category: string;
- aliases: string[];
-};
+type ChannelsCreateResponse = operations['channels/create']['responses']['200']['content']['application/json'];
+
+// @public (undocumented)
+type ChannelsFavoriteRequest = operations['channels/favorite']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type ChannelsFeaturedResponse = operations['channels/featured']['responses']['200']['content']['application/json'];
+
+// @public (undocumented)
+type ChannelsFollowedRequest = operations['channels/followed']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type ChannelsFollowedResponse = operations['channels/followed']['responses']['200']['content']['application/json'];
+
+// @public (undocumented)
+type ChannelsFollowRequest = operations['channels/follow']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type ChannelsMyFavoritesResponse = operations['channels/my-favorites']['responses']['200']['content']['application/json'];
+
+// @public (undocumented)
+type ChannelsOwnedRequest = operations['channels/owned']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type ChannelsOwnedResponse = operations['channels/owned']['responses']['200']['content']['application/json'];
+
+// @public (undocumented)
+type ChannelsSearchRequest = operations['channels/search']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type ChannelsSearchResponse = operations['channels/search']['responses']['200']['content']['application/json'];
+
+// @public (undocumented)
+type ChannelsShowRequest = operations['channels/show']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type ChannelsShowResponse = operations['channels/show']['responses']['200']['content']['application/json'];
+
+// @public (undocumented)
+type ChannelsTimelineRequest = operations['channels/timeline']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type ChannelsTimelineResponse = operations['channels/timeline']['responses']['200']['content']['application/json'];
+
+// @public (undocumented)
+type ChannelsUnfavoriteRequest = operations['channels/unfavorite']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type ChannelsUnfollowRequest = operations['channels/unfollow']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type ChannelsUpdateRequest = operations['channels/update']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type ChannelsUpdateResponse = operations['channels/update']['responses']['200']['content']['application/json'];
+
+// @public (undocumented)
+type ChartsActiveUsersRequest = operations['charts/active-users']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type ChartsActiveUsersResponse = operations['charts/active-users']['responses']['200']['content']['application/json'];
+
+// @public (undocumented)
+type ChartsApRequestRequest = operations['charts/ap-request']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type ChartsApRequestResponse = operations['charts/ap-request']['responses']['200']['content']['application/json'];
+
+// @public (undocumented)
+type ChartsDriveRequest = operations['charts/drive']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type ChartsDriveResponse = operations['charts/drive']['responses']['200']['content']['application/json'];
+
+// @public (undocumented)
+type ChartsFederationRequest = operations['charts/federation']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type ChartsFederationResponse = operations['charts/federation']['responses']['200']['content']['application/json'];
+
+// @public (undocumented)
+type ChartsInstanceRequest = operations['charts/instance']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type ChartsInstanceResponse = operations['charts/instance']['responses']['200']['content']['application/json'];
+
+// @public (undocumented)
+type ChartsNotesRequest = operations['charts/notes']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type ChartsNotesResponse = operations['charts/notes']['responses']['200']['content']['application/json'];
+
+// @public (undocumented)
+type ChartsUserDriveRequest = operations['charts/user/drive']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type ChartsUserDriveResponse = operations['charts/user/drive']['responses']['200']['content']['application/json'];
+
+// @public (undocumented)
+type ChartsUserFollowingRequest = operations['charts/user/following']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type ChartsUserFollowingResponse = operations['charts/user/following']['responses']['200']['content']['application/json'];
+
+// @public (undocumented)
+type ChartsUserNotesRequest = operations['charts/user/notes']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type ChartsUserNotesResponse = operations['charts/user/notes']['responses']['200']['content']['application/json'];
+
+// @public (undocumented)
+type ChartsUserPvRequest = operations['charts/user/pv']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type ChartsUserPvResponse = operations['charts/user/pv']['responses']['200']['content']['application/json'];
+
+// @public (undocumented)
+type ChartsUserReactionsRequest = operations['charts/user/reactions']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type ChartsUserReactionsResponse = operations['charts/user/reactions']['responses']['200']['content']['application/json'];
+
+// @public (undocumented)
+type ChartsUsersRequest = operations['charts/users']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type ChartsUsersResponse = operations['charts/users']['responses']['200']['content']['application/json'];
+
+// @public (undocumented)
+type Clip = components['schemas']['Clip'];
+
+// @public (undocumented)
+type ClipsAddNoteRequest = operations['clips/add-note']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type ClipsCreateRequest = operations['clips/create']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type ClipsCreateResponse = operations['clips/create']['responses']['200']['content']['application/json'];
+
+// @public (undocumented)
+type ClipsDeleteRequest = operations['clips/delete']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type ClipsFavoriteRequest = operations['clips/favorite']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type ClipsListResponse = operations['clips/list']['responses']['200']['content']['application/json'];
+
+// @public (undocumented)
+type ClipsMyFavoritesResponse = operations['clips/my-favorites']['responses']['200']['content']['application/json'];
+
+// @public (undocumented)
+type ClipsNotesRequest = operations['clips/notes']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type ClipsNotesResponse = operations['clips/notes']['responses']['200']['content']['application/json'];
+
+// @public (undocumented)
+type ClipsRemoveNoteRequest = operations['clips/remove-note']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type ClipsShowRequest = operations['clips/show']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type ClipsShowResponse = operations['clips/show']['responses']['200']['content']['application/json'];
+
+// @public (undocumented)
+type ClipsUnfavoriteRequest = operations['clips/unfavorite']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type ClipsUpdateRequest = operations['clips/update']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type ClipsUpdateResponse = operations['clips/update']['responses']['200']['content']['application/json'];
// @public (undocumented)
type DateString = string;
// @public (undocumented)
-type DetailedInstanceMetadata = LiteInstanceMetadata & {
- pinnedPages: string[];
- pinnedClipId: string | null;
- cacheRemoteFiles: boolean;
- cacheRemoteSensitiveFiles: boolean;
- requireSetup: boolean;
- proxyAccountName: string | null;
- features: Record;
+type DriveFile = components['schemas']['DriveFile'];
+
+// @public (undocumented)
+type DriveFilesAttachedNotesRequest = operations['drive/files/attached-notes']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type DriveFilesAttachedNotesResponse = operations['drive/files/attached-notes']['responses']['200']['content']['application/json'];
+
+// @public (undocumented)
+type DriveFilesCheckExistenceRequest = operations['drive/files/check-existence']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type DriveFilesCheckExistenceResponse = operations['drive/files/check-existence']['responses']['200']['content']['application/json'];
+
+// @public (undocumented)
+type DriveFilesCreateRequest = operations['drive/files/create']['requestBody']['content']['multipart/form-data'];
+
+// @public (undocumented)
+type DriveFilesCreateResponse = operations['drive/files/create']['responses']['200']['content']['application/json'];
+
+// @public (undocumented)
+type DriveFilesDeleteRequest = operations['drive/files/delete']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type DriveFilesFindByHashRequest = operations['drive/files/find-by-hash']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type DriveFilesFindByHashResponse = operations['drive/files/find-by-hash']['responses']['200']['content']['application/json'];
+
+// @public (undocumented)
+type DriveFilesFindRequest = operations['drive/files/find']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type DriveFilesFindResponse = operations['drive/files/find']['responses']['200']['content']['application/json'];
+
+// @public (undocumented)
+type DriveFilesRequest = operations['drive/files']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type DriveFilesResponse = operations['drive/files']['responses']['200']['content']['application/json'];
+
+// @public (undocumented)
+type DriveFilesShowRequest = operations['drive/files/show']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type DriveFilesShowResponse = operations['drive/files/show']['responses']['200']['content']['application/json'];
+
+// @public (undocumented)
+type DriveFilesUpdateRequest = operations['drive/files/update']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type DriveFilesUpdateResponse = operations['drive/files/update']['responses']['200']['content']['application/json'];
+
+// @public (undocumented)
+type DriveFilesUploadFromUrlRequest = operations['drive/files/upload-from-url']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type DriveFolder = components['schemas']['DriveFolder'];
+
+// @public (undocumented)
+type DriveFoldersCreateRequest = operations['drive/folders/create']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type DriveFoldersCreateResponse = operations['drive/folders/create']['responses']['200']['content']['application/json'];
+
+// @public (undocumented)
+type DriveFoldersDeleteRequest = operations['drive/folders/delete']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type DriveFoldersFindRequest = operations['drive/folders/find']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type DriveFoldersFindResponse = operations['drive/folders/find']['responses']['200']['content']['application/json'];
+
+// @public (undocumented)
+type DriveFoldersRequest = operations['drive/folders']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type DriveFoldersResponse = operations['drive/folders']['responses']['200']['content']['application/json'];
+
+// @public (undocumented)
+type DriveFoldersShowRequest = operations['drive/folders/show']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type DriveFoldersShowResponse = operations['drive/folders/show']['responses']['200']['content']['application/json'];
+
+// @public (undocumented)
+type DriveFoldersUpdateRequest = operations['drive/folders/update']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type DriveFoldersUpdateResponse = operations['drive/folders/update']['responses']['200']['content']['application/json'];
+
+// @public (undocumented)
+type DriveResponse = operations['drive']['responses']['200']['content']['application/json'];
+
+// @public (undocumented)
+type DriveStreamRequest = operations['drive/stream']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type DriveStreamResponse = operations['drive/stream']['responses']['200']['content']['application/json'];
+
+// @public (undocumented)
+type EmailAddressAvailableRequest = operations['email-address/available']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type EmailAddressAvailableResponse = operations['email-address/available']['responses']['200']['content']['application/json'];
+
+// @public (undocumented)
+type EmojiAdded = {
+ emoji: EmojiDetailed;
};
// @public (undocumented)
-type DriveFile = {
- id: ID;
- createdAt: DateString;
- isSensitive: boolean;
- name: string;
- thumbnailUrl: string;
- url: string;
- type: string;
- size: number;
- md5: string;
- blurhash: string;
- comment: string | null;
- properties: Record;
+type EmojiDeleted = {
+ emojis: EmojiDetailed[];
};
// @public (undocumented)
-type DriveFolder = TODO_2;
+type EmojiDetailed = components['schemas']['EmojiDetailed'];
// @public (undocumented)
-export type Endpoints = {
- 'admin/abuse-user-reports': {
- req: TODO;
- res: TODO;
- };
- 'admin/delete-all-files-of-a-user': {
- req: {
- userId: User['id'];
- };
- res: null;
- };
- 'admin/delete-logs': {
- req: NoParams;
- res: null;
- };
- 'admin/get-index-stats': {
- req: TODO;
- res: TODO;
- };
- 'admin/get-table-stats': {
- req: TODO;
- res: TODO;
- };
- 'admin/invite': {
- req: TODO;
- res: TODO;
- };
- 'admin/logs': {
- req: TODO;
- res: TODO;
- };
- 'admin/meta': {
- req: NoParams;
- res: AdminInstanceMetadata;
- };
- 'admin/reset-password': {
- req: TODO;
- res: TODO;
- };
- 'admin/resolve-abuse-user-report': {
- req: TODO;
- res: TODO;
- };
- 'admin/resync-chart': {
- req: TODO;
- res: TODO;
- };
- 'admin/send-email': {
- req: TODO;
- res: TODO;
- };
- 'admin/server-info': {
- req: TODO;
- res: TODO;
- };
- 'admin/show-moderation-logs': {
- req: TODO;
- res: TODO;
- };
- 'admin/show-user': {
- req: TODO;
- res: TODO;
- };
- 'admin/show-users': {
- req: TODO;
- res: TODO;
- };
- 'admin/silence-user': {
- req: TODO;
- res: TODO;
- };
- 'admin/suspend-user': {
- req: TODO;
- res: TODO;
- };
- 'admin/unsilence-user': {
- req: TODO;
- res: TODO;
- };
- 'admin/unsuspend-user': {
- req: TODO;
- res: TODO;
- };
- 'admin/update-meta': {
- req: TODO;
- res: TODO;
- };
- 'admin/vacuum': {
- req: TODO;
- res: TODO;
- };
- 'admin/accounts/create': {
- req: TODO;
- res: TODO;
- };
- 'admin/ad/create': {
- req: TODO;
- res: TODO;
- };
- 'admin/ad/delete': {
- req: {
- id: Ad['id'];
- };
- res: null;
- };
- 'admin/ad/list': {
- req: TODO;
- res: TODO;
- };
- 'admin/ad/update': {
- req: TODO;
- res: TODO;
- };
- 'admin/announcements/create': {
- req: TODO;
- res: TODO;
- };
- 'admin/announcements/delete': {
- req: {
- id: Announcement['id'];
- };
- res: null;
- };
- 'admin/announcements/list': {
- req: TODO;
- res: TODO;
- };
- 'admin/announcements/update': {
- req: TODO;
- res: TODO;
- };
- 'admin/abuse-report-resolver/create': {
- req: TODO;
- res: TODO;
- };
- 'admin/abuse-report-resolver/list': {
- req: TODO;
- res: TODO;
- };
- 'admin/abuse-report-resolver/update': {
- req: TODO;
- res: TODO;
- };
- 'admin/abuse-report-resolver/delete': {
- req: TODO;
- res: TODO;
- };
- 'admin/drive/clean-remote-files': {
- req: TODO;
- res: TODO;
- };
- 'admin/drive/cleanup': {
- req: TODO;
- res: TODO;
- };
- 'admin/drive/files': {
- req: TODO;
- res: TODO;
- };
- 'admin/drive/show-file': {
- req: TODO;
- res: TODO;
- };
- 'admin/emoji/add': {
- req: TODO;
- res: TODO;
- };
- 'admin/emoji/adds': {
- req: TODO;
- res: TODO;
- };
- 'admin/emoji/copy': {
- req: TODO;
- res: TODO;
- };
- 'admin/emoji/list-remote': {
- req: TODO;
- res: TODO;
- };
- 'admin/emoji/list': {
- req: TODO;
- res: TODO;
- };
- 'admin/emoji/remove': {
- req: TODO;
- res: TODO;
- };
- 'admin/emoji/update': {
- req: TODO;
- res: TODO;
- };
- 'admin/federation/delete-all-files': {
- req: {
- host: string;
- };
- res: null;
- };
- 'admin/federation/refresh-remote-instance-metadata': {
- req: TODO;
- res: TODO;
- };
- 'admin/federation/remove-all-following': {
- req: TODO;
- res: TODO;
- };
- 'admin/federation/update-instance': {
- req: TODO;
- res: TODO;
- };
- 'admin/invite/create': {
- req: TODO;
- res: TODO;
- };
- 'admin/invite/list': {
- req: TODO;
- res: TODO;
- };
- 'admin/invite/revoke': {
- req: TODO;
- res: TODO;
- };
- 'admin/invite/revoke-unused': {
- req: TODO;
- res: TODO;
- };
- 'admin/moderators/add': {
- req: TODO;
- res: TODO;
- };
- 'admin/moderators/remove': {
- req: TODO;
- res: TODO;
- };
- 'admin/promo/create': {
- req: TODO;
- res: TODO;
- };
- 'admin/queue/clear': {
- req: TODO;
- res: TODO;
- };
- 'admin/queue/deliver-delayed': {
- req: TODO;
- res: TODO;
- };
- 'admin/queue/inbox-delayed': {
- req: TODO;
- res: TODO;
- };
- 'admin/queue/jobs': {
- req: TODO;
- res: TODO;
- };
- 'admin/queue/stats': {
- req: TODO;
- res: TODO;
- };
- 'admin/relays/add': {
- req: TODO;
- res: TODO;
- };
- 'admin/relays/list': {
- req: TODO;
- res: TODO;
- };
- 'admin/relays/remove': {
- req: TODO;
- res: TODO;
- };
- 'announcements': {
- req: {
- limit?: number;
- withUnreads?: boolean;
- sinceId?: Announcement['id'];
- untilId?: Announcement['id'];
- };
- res: Announcement[];
- };
- 'antennas/create': {
- req: TODO;
- res: Antenna;
- };
- 'antennas/delete': {
- req: {
- antennaId: Antenna['id'];
- };
- res: null;
- };
- 'antennas/list': {
- req: NoParams;
- res: Antenna[];
- };
- 'antennas/notes': {
- req: {
- antennaId: Antenna['id'];
- limit?: number;
- sinceId?: Note['id'];
- untilId?: Note['id'];
- };
- res: Note[];
- };
- 'antennas/show': {
- req: {
- antennaId: Antenna['id'];
- };
- res: Antenna;
- };
- 'antennas/update': {
- req: TODO;
- res: Antenna;
- };
- 'ap/get': {
- req: {
- uri: string;
- };
- res: Record;
- };
- 'ap/show': {
- req: {
- uri: string;
- };
- res: {
- type: 'Note';
- object: Note;
- } | {
- type: 'User';
- object: UserDetailed;
- };
- };
- 'app/create': {
- req: TODO;
- res: App;
- };
- 'app/show': {
- req: {
- appId: App['id'];
- };
- res: App;
- };
- 'auth/accept': {
- req: {
- token: string;
- };
- res: null;
- };
- 'auth/session/generate': {
- req: {
- appSecret: string;
- };
- res: {
- token: string;
- url: string;
- };
- };
- 'auth/session/show': {
- req: {
- token: string;
- };
- res: AuthSession;
- };
- 'auth/session/userkey': {
- req: {
- appSecret: string;
- token: string;
- };
- res: {
- accessToken: string;
- user: User;
- };
- };
- 'blocking/create': {
- req: {
- userId: User['id'];
- };
- res: UserDetailed;
- };
- 'blocking/delete': {
- req: {
- userId: User['id'];
- };
- res: UserDetailed;
- };
- 'blocking/list': {
- req: {
- limit?: number;
- sinceId?: Blocking['id'];
- untilId?: Blocking['id'];
- };
- res: Blocking[];
- };
- 'channels/create': {
- req: TODO;
- res: TODO;
- };
- 'channels/featured': {
- req: TODO;
- res: TODO;
- };
- 'channels/follow': {
- req: TODO;
- res: TODO;
- };
- 'channels/followed': {
- req: TODO;
- res: TODO;
- };
- 'channels/owned': {
- req: TODO;
- res: TODO;
- };
- 'channels/pin-note': {
- req: TODO;
- res: TODO;
- };
- 'channels/show': {
- req: TODO;
- res: TODO;
- };
- 'channels/timeline': {
- req: TODO;
- res: TODO;
- };
- 'channels/unfollow': {
- req: TODO;
- res: TODO;
- };
- 'channels/update': {
- req: TODO;
- res: TODO;
- };
- 'charts/active-users': {
- req: {
- span: 'day' | 'hour';
- limit?: number;
- offset?: number | null;
- };
- res: {
- local: {
- users: number[];
- };
- remote: {
- users: number[];
- };
- };
- };
- 'charts/drive': {
- req: {
- span: 'day' | 'hour';
- limit?: number;
- offset?: number | null;
- };
- res: {
- local: {
- decCount: number[];
- decSize: number[];
- incCount: number[];
- incSize: number[];
- totalCount: number[];
- totalSize: number[];
- };
- remote: {
- decCount: number[];
- decSize: number[];
- incCount: number[];
- incSize: number[];
- totalCount: number[];
- totalSize: number[];
- };
- };
- };
- 'charts/federation': {
- req: {
- span: 'day' | 'hour';
- limit?: number;
- offset?: number | null;
- };
- res: {
- instance: {
- dec: number[];
- inc: number[];
- total: number[];
- };
- };
- };
- 'charts/hashtag': {
- req: {
- span: 'day' | 'hour';
- limit?: number;
- offset?: number | null;
- };
- res: TODO;
- };
- 'charts/instance': {
- req: {
- span: 'day' | 'hour';
- limit?: number;
- offset?: number | null;
- host: string;
- };
- res: {
- drive: {
- decFiles: number[];
- decUsage: number[];
- incFiles: number[];
- incUsage: number[];
- totalFiles: number[];
- totalUsage: number[];
- };
- followers: {
- dec: number[];
- inc: number[];
- total: number[];
- };
- following: {
- dec: number[];
- inc: number[];
- total: number[];
- };
- notes: {
- dec: number[];
- inc: number[];
- total: number[];
- diffs: {
- normal: number[];
- renote: number[];
- reply: number[];
- };
- };
- requests: {
- failed: number[];
- received: number[];
- succeeded: number[];
- };
- users: {
- dec: number[];
- inc: number[];
- total: number[];
- };
- };
- };
- 'charts/network': {
- req: {
- span: 'day' | 'hour';
- limit?: number;
- offset?: number | null;
- };
- res: TODO;
- };
- 'charts/notes': {
- req: {
- span: 'day' | 'hour';
- limit?: number;
- offset?: number | null;
- };
- res: {
- local: {
- dec: number[];
- inc: number[];
- total: number[];
- diffs: {
- normal: number[];
- renote: number[];
- reply: number[];
- };
- };
- remote: {
- dec: number[];
- inc: number[];
- total: number[];
- diffs: {
- normal: number[];
- renote: number[];
- reply: number[];
- };
- };
- };
- };
- 'charts/user/drive': {
- req: {
- span: 'day' | 'hour';
- limit?: number;
- offset?: number | null;
- userId: User['id'];
- };
- res: {
- decCount: number[];
- decSize: number[];
- incCount: number[];
- incSize: number[];
- totalCount: number[];
- totalSize: number[];
- };
- };
- 'charts/user/following': {
- req: {
- span: 'day' | 'hour';
- limit?: number;
- offset?: number | null;
- userId: User['id'];
- };
- res: TODO;
- };
- 'charts/user/notes': {
- req: {
- span: 'day' | 'hour';
- limit?: number;
- offset?: number | null;
- userId: User['id'];
- };
- res: {
- dec: number[];
- inc: number[];
- total: number[];
- diffs: {
- normal: number[];
- renote: number[];
- reply: number[];
- };
- };
- };
- 'charts/user/reactions': {
- req: {
- span: 'day' | 'hour';
- limit?: number;
- offset?: number | null;
- userId: User['id'];
- };
- res: TODO;
- };
- 'charts/users': {
- req: {
- span: 'day' | 'hour';
- limit?: number;
- offset?: number | null;
- };
- res: {
- local: {
- dec: number[];
- inc: number[];
- total: number[];
- };
- remote: {
- dec: number[];
- inc: number[];
- total: number[];
- };
- };
- };
- 'clips/add-note': {
- req: TODO;
- res: TODO;
- };
- 'clips/create': {
- req: TODO;
- res: TODO;
- };
- 'clips/delete': {
- req: {
- clipId: Clip['id'];
- };
- res: null;
- };
- 'clips/list': {
- req: TODO;
- res: TODO;
- };
- 'clips/notes': {
- req: TODO;
- res: TODO;
- };
- 'clips/show': {
- req: TODO;
- res: TODO;
- };
- 'clips/update': {
- req: TODO;
- res: TODO;
- };
- 'drive': {
- req: NoParams;
- res: {
- capacity: number;
- usage: number;
- };
- };
- 'drive/files': {
- req: {
- folderId?: DriveFolder['id'] | null;
- type?: DriveFile['type'] | null;
- limit?: number;
- sinceId?: DriveFile['id'];
- untilId?: DriveFile['id'];
- };
- res: DriveFile[];
- };
- 'drive/files/attached-notes': {
- req: TODO;
- res: TODO;
- };
- 'drive/files/check-existence': {
- req: TODO;
- res: TODO;
- };
- 'drive/files/create': {
- req: {
- folderId?: string;
- name?: string;
- comment?: string;
- isSentisive?: boolean;
- force?: boolean;
- };
- res: DriveFile;
- };
- 'drive/files/delete': {
- req: {
- fileId: DriveFile['id'];
- };
- res: null;
- };
- 'drive/files/find-by-hash': {
- req: TODO;
- res: TODO;
- };
- 'drive/files/find': {
- req: {
- name: string;
- folderId?: DriveFolder['id'] | null;
- };
- res: DriveFile[];
- };
- 'drive/files/show': {
- req: {
- fileId?: DriveFile['id'];
- url?: string;
- };
- res: DriveFile;
- };
- 'drive/files/update': {
- req: {
- fileId: DriveFile['id'];
- folderId?: DriveFolder['id'] | null;
- name?: string;
- isSensitive?: boolean;
- comment?: string | null;
- };
- res: DriveFile;
- };
- 'drive/files/upload-from-url': {
- req: {
- url: string;
- folderId?: DriveFolder['id'] | null;
- isSensitive?: boolean;
- comment?: string | null;
- marker?: string | null;
- force?: boolean;
- };
- res: null;
- };
- 'drive/folders': {
- req: {
- folderId?: DriveFolder['id'] | null;
- limit?: number;
- sinceId?: DriveFile['id'];
- untilId?: DriveFile['id'];
- };
- res: DriveFolder[];
- };
- 'drive/folders/create': {
- req: {
- name?: string;
- parentId?: DriveFolder['id'] | null;
- };
- res: DriveFolder;
- };
- 'drive/folders/delete': {
- req: {
- folderId: DriveFolder['id'];
- };
- res: null;
- };
- 'drive/folders/find': {
- req: {
- name: string;
- parentId?: DriveFolder['id'] | null;
- };
- res: DriveFolder[];
- };
- 'drive/folders/show': {
- req: {
- folderId: DriveFolder['id'];
- };
- res: DriveFolder;
- };
- 'drive/folders/update': {
- req: {
- folderId: DriveFolder['id'];
- name?: string;
- parentId?: DriveFolder['id'] | null;
- };
- res: DriveFolder;
- };
- 'drive/stream': {
- req: {
- type?: DriveFile['type'] | null;
- limit?: number;
- sinceId?: DriveFile['id'];
- untilId?: DriveFile['id'];
- };
- res: DriveFile[];
- };
- 'endpoint': {
- req: {
- endpoint: string;
- };
- res: {
- params: {
- name: string;
- type: string;
- }[];
- };
- };
- 'endpoints': {
- req: NoParams;
- res: string[];
- };
- 'federation/dns': {
- req: {
- host: string;
- };
- res: {
- a: string[];
- aaaa: string[];
- cname: string[];
- txt: string[];
- };
- };
- 'federation/followers': {
- req: {
- host: string;
- limit?: number;
- sinceId?: Following['id'];
- untilId?: Following['id'];
- };
- res: FollowingFolloweePopulated[];
- };
- 'federation/following': {
- req: {
- host: string;
- limit?: number;
- sinceId?: Following['id'];
- untilId?: Following['id'];
- };
- res: FollowingFolloweePopulated[];
- };
- 'federation/instances': {
- req: {
- host?: string | null;
- blocked?: boolean | null;
- notResponding?: boolean | null;
- suspended?: boolean | null;
- federating?: boolean | null;
- subscribing?: boolean | null;
- publishing?: boolean | null;
- limit?: number;
- offset?: number;
- sort?: '+pubSub' | '-pubSub' | '+notes' | '-notes' | '+users' | '-users' | '+following' | '-following' | '+followers' | '-followers' | '+caughtAt' | '-caughtAt' | '+lastCommunicatedAt' | '-lastCommunicatedAt' | '+driveUsage' | '-driveUsage' | '+driveFiles' | '-driveFiles';
- };
- res: Instance[];
- };
- 'federation/show-instance': {
- req: {
- host: string;
- };
- res: Instance;
- };
- 'federation/update-remote-user': {
- req: {
- userId: User['id'];
- };
- res: null;
- };
- 'federation/users': {
- req: {
- host: string;
- limit?: number;
- sinceId?: User['id'];
- untilId?: User['id'];
- };
- res: UserDetailed[];
- };
- 'following/create': {
- req: {
- userId: User['id'];
- withReplies?: boolean;
- };
- res: User;
- };
- 'following/delete': {
- req: {
- userId: User['id'];
- };
- res: User;
- };
- 'following/requests/accept': {
- req: {
- userId: User['id'];
- };
- res: null;
- };
- 'following/requests/cancel': {
- req: {
- userId: User['id'];
- };
- res: User;
- };
- 'following/requests/list': {
- req: NoParams;
- res: FollowRequest[];
- };
- 'following/requests/reject': {
- req: {
- userId: User['id'];
- };
- res: null;
- };
- 'gallery/featured': {
- req: null;
- res: GalleryPost[];
- };
- 'gallery/popular': {
- req: null;
- res: GalleryPost[];
- };
- 'gallery/posts': {
- req: {
- limit?: number;
- sinceId?: GalleryPost['id'];
- untilId?: GalleryPost['id'];
- };
- res: GalleryPost[];
- };
- 'gallery/posts/create': {
- req: {
- title: GalleryPost['title'];
- description?: GalleryPost['description'];
- fileIds: GalleryPost['fileIds'];
- isSensitive?: GalleryPost['isSensitive'];
- };
- res: GalleryPost;
- };
- 'gallery/posts/delete': {
- req: {
- postId: GalleryPost['id'];
- };
- res: null;
- };
- 'gallery/posts/like': {
- req: {
- postId: GalleryPost['id'];
- };
- res: null;
- };
- 'gallery/posts/show': {
- req: {
- postId: GalleryPost['id'];
- };
- res: GalleryPost;
- };
- 'gallery/posts/unlike': {
- req: {
- postId: GalleryPost['id'];
- };
- res: null;
- };
- 'gallery/posts/update': {
- req: {
- postId: GalleryPost['id'];
- title: GalleryPost['title'];
- description?: GalleryPost['description'];
- fileIds: GalleryPost['fileIds'];
- isSensitive?: GalleryPost['isSensitive'];
- };
- res: GalleryPost;
- };
- 'games/reversi/games': {
- req: TODO;
- res: TODO;
- };
- 'games/reversi/games/show': {
- req: TODO;
- res: TODO;
- };
- 'games/reversi/games/surrender': {
- req: TODO;
- res: TODO;
- };
- 'games/reversi/invitations': {
- req: TODO;
- res: TODO;
- };
- 'games/reversi/match': {
- req: TODO;
- res: TODO;
- };
- 'games/reversi/match/cancel': {
- req: TODO;
- res: TODO;
- };
- 'get-online-users-count': {
- req: NoParams;
- res: {
- count: number;
- };
- };
- 'hashtags/list': {
- req: TODO;
- res: TODO;
- };
- 'hashtags/search': {
- req: TODO;
- res: TODO;
- };
- 'hashtags/show': {
- req: TODO;
- res: TODO;
- };
- 'hashtags/trend': {
- req: TODO;
- res: TODO;
- };
- 'hashtags/users': {
- req: TODO;
- res: TODO;
- };
- 'i': {
- req: NoParams;
- res: User;
- };
- 'i/apps': {
- req: TODO;
- res: TODO;
- };
- 'i/authorized-apps': {
- req: TODO;
- res: TODO;
- };
- 'i/change-password': {
- req: TODO;
- res: TODO;
- };
- 'i/delete-account': {
- req: {
- password: string;
- };
- res: null;
- };
- 'i/export-blocking': {
- req: TODO;
- res: TODO;
- };
- 'i/export-following': {
- req: TODO;
- res: TODO;
- };
- 'i/export-mute': {
- req: TODO;
- res: TODO;
- };
- 'i/export-notes': {
- req: TODO;
- res: TODO;
- };
- 'i/export-user-lists': {
- req: TODO;
- res: TODO;
- };
- 'i/favorites': {
- req: {
- limit?: number;
- sinceId?: NoteFavorite['id'];
- untilId?: NoteFavorite['id'];
- };
- res: NoteFavorite[];
- };
- 'i/gallery/likes': {
- req: TODO;
- res: TODO;
- };
- 'i/gallery/posts': {
- req: TODO;
- res: TODO;
- };
- 'i/import-following': {
- req: TODO;
- res: TODO;
- };
- 'i/import-user-lists': {
- req: TODO;
- res: TODO;
- };
- 'i/move': {
- req: TODO;
- res: TODO;
- };
- 'i/notifications': {
- req: {
- limit?: number;
- sinceId?: Notification_2['id'];
- untilId?: Notification_2['id'];
- following?: boolean;
- markAsRead?: boolean;
- includeTypes?: Notification_2['type'][];
- excludeTypes?: Notification_2['type'][];
- };
- res: Notification_2[];
- };
- 'i/page-likes': {
- req: TODO;
- res: TODO;
- };
- 'i/pages': {
- req: TODO;
- res: TODO;
- };
- 'i/pin': {
- req: {
- noteId: Note['id'];
- };
- res: MeDetailed;
- };
- 'i/read-all-messaging-messages': {
- req: TODO;
- res: TODO;
- };
- 'i/read-all-unread-notes': {
- req: TODO;
- res: TODO;
- };
- 'i/read-announcement': {
- req: TODO;
- res: TODO;
- };
- 'i/regenerate-token': {
- req: {
- password: string;
- };
- res: null;
- };
- 'i/registry/get-all': {
- req: {
- scope?: string[];
- };
- res: Record;
- };
- 'i/registry/get-detail': {
- req: {
- key: string;
- scope?: string[];
- };
- res: {
- updatedAt: DateString;
- value: any;
- };
- };
- 'i/registry/get': {
- req: {
- key: string;
- scope?: string[];
- };
- res: any;
- };
- 'i/registry/keys-with-type': {
- req: {
- scope?: string[];
- };
- res: Record;
- };
- 'i/registry/keys': {
- req: {
- scope?: string[];
- };
- res: string[];
- };
- 'i/registry/remove': {
- req: {
- key: string;
- scope?: string[];
- };
- res: null;
- };
- 'i/registry/set': {
- req: {
- key: string;
- value: any;
- scope?: string[];
- };
- res: null;
- };
- 'i/revoke-token': {
- req: TODO;
- res: TODO;
- };
- 'i/signin-history': {
- req: {
- limit?: number;
- sinceId?: Signin['id'];
- untilId?: Signin['id'];
- };
- res: Signin[];
- };
- 'i/unpin': {
- req: {
- noteId: Note['id'];
- };
- res: MeDetailed;
- };
- 'i/update-email': {
- req: {
- password: string;
- email?: string | null;
- };
- res: MeDetailed;
- };
- 'i/update': {
- req: {
- name?: string | null;
- description?: string | null;
- lang?: string | null;
- location?: string | null;
- birthday?: string | null;
- avatarId?: DriveFile['id'] | null;
- bannerId?: DriveFile['id'] | null;
- fields?: {
- name: string;
- value: string;
- }[];
- isLocked?: boolean;
- isExplorable?: boolean;
- hideOnlineStatus?: boolean;
- carefulBot?: boolean;
- autoAcceptFollowed?: boolean;
- noCrawle?: boolean;
- isBot?: boolean;
- isCat?: boolean;
- injectFeaturedNote?: boolean;
- receiveAnnouncementEmail?: boolean;
- alwaysMarkNsfw?: boolean;
- mutedWords?: string[][];
- notificationRecieveConfig?: any;
- emailNotificationTypes?: string[];
- alsoKnownAs?: string[];
- };
- res: MeDetailed;
- };
- 'i/user-group-invites': {
- req: TODO;
- res: TODO;
- };
- 'i/2fa/done': {
- req: TODO;
- res: TODO;
- };
- 'i/2fa/key-done': {
- req: TODO;
- res: TODO;
- };
- 'i/2fa/password-less': {
- req: TODO;
- res: TODO;
- };
- 'i/2fa/register-key': {
- req: TODO;
- res: TODO;
- };
- 'i/2fa/register': {
- req: TODO;
- res: TODO;
- };
- 'i/2fa/remove-key': {
- req: TODO;
- res: TODO;
- };
- 'i/2fa/unregister': {
- req: TODO;
- res: TODO;
- };
- 'flash/gen-token': {
- req: TODO;
- res: TODO;
- };
- 'invite/create': {
- req: NoParams;
- res: Invite;
- };
- 'invite/delete': {
- req: {
- inviteId: Invite['id'];
- };
- res: null;
- };
- 'invite/list': {
- req: {
- limit?: number;
- sinceId?: Invite['id'];
- untilId?: Invite['id'];
- };
- res: Invite[];
- };
- 'invite/limit': {
- req: NoParams;
- res: InviteLimit;
- };
- 'messaging/history': {
- req: {
- limit?: number;
- group?: boolean;
- };
- res: MessagingMessage[];
- };
- 'messaging/messages': {
- req: {
- userId?: User['id'];
- groupId?: UserGroup['id'];
- limit?: number;
- sinceId?: MessagingMessage['id'];
- untilId?: MessagingMessage['id'];
- markAsRead?: boolean;
- };
- res: MessagingMessage[];
- };
- 'messaging/messages/create': {
- req: {
- userId?: User['id'];
- groupId?: UserGroup['id'];
- text?: string;
- fileId?: DriveFile['id'];
- };
- res: MessagingMessage;
- };
- 'messaging/messages/delete': {
- req: {
- messageId: MessagingMessage['id'];
- };
- res: null;
- };
- 'messaging/messages/read': {
- req: {
- messageId: MessagingMessage['id'];
- };
- res: null;
- };
- 'meta': {
- req: {
- detail?: boolean;
- };
- res: {
- $switch: {
- $cases: [
- [
- {
- detail: true;
- },
- DetailedInstanceMetadata
- ],
- [
- {
- detail: false;
- },
- LiteInstanceMetadata
- ],
- [
- {
- detail: boolean;
- },
- LiteInstanceMetadata | DetailedInstanceMetadata
- ]
- ];
- $default: LiteInstanceMetadata;
- };
- };
- };
- 'miauth/gen-token': {
- req: TODO;
- res: TODO;
- };
- 'mute/create': {
- req: TODO;
- res: TODO;
- };
- 'mute/delete': {
- req: {
- userId: User['id'];
- };
- res: null;
- };
- 'mute/list': {
- req: TODO;
- res: TODO;
- };
- 'my/apps': {
- req: TODO;
- res: TODO;
- };
- 'notes': {
- req: {
- limit?: number;
- sinceId?: Note['id'];
- untilId?: Note['id'];
- };
- res: Note[];
- };
- 'notes/children': {
- req: {
- noteId: Note['id'];
- limit?: number;
- sinceId?: Note['id'];
- untilId?: Note['id'];
- };
- res: Note[];
- };
- 'notes/clips': {
- req: TODO;
- res: TODO;
- };
- 'notes/conversation': {
- req: TODO;
- res: TODO;
- };
- 'notes/create': {
- req: {
- visibility?: 'public' | 'home' | 'followers' | 'specified';
- visibleUserIds?: User['id'][];
- text?: null | string;
- cw?: null | string;
- viaMobile?: boolean;
- localOnly?: boolean;
- fileIds?: DriveFile['id'][];
- replyId?: null | Note['id'];
- renoteId?: null | Note['id'];
- channelId?: null | Channel['id'];
- poll?: null | {
- choices: string[];
- multiple?: boolean;
- expiresAt?: null | number;
- expiredAfter?: null | number;
- };
- event?: null | {
- title: string;
- start: number;
- end?: null | number;
- metadata: Record;
- };
- };
- res: {
- createdNote: Note;
- };
- };
- 'notes/delete': {
- req: {
- noteId: Note['id'];
- };
- res: null;
- };
- 'notes/update': {
- req: {
- noteId: Note['id'];
- text?: null | string;
- cw?: null | string;
- };
- res: null;
- };
- 'notes/favorites/create': {
- req: {
- noteId: Note['id'];
- };
- res: null;
- };
- 'notes/favorites/delete': {
- req: {
- noteId: Note['id'];
- };
- res: null;
- };
- 'notes/featured': {
- req: TODO;
- res: Note[];
- };
- 'notes/global-timeline': {
- req: {
- limit?: number;
- sinceId?: Note['id'];
- untilId?: Note['id'];
- sinceDate?: number;
- untilDate?: number;
- };
- res: Note[];
- };
- 'notes/hybrid-timeline': {
- req: {
- limit?: number;
- sinceId?: Note['id'];
- untilId?: Note['id'];
- sinceDate?: number;
- untilDate?: number;
- };
- res: Note[];
- };
- 'notes/local-timeline': {
- req: {
- limit?: number;
- sinceId?: Note['id'];
- untilId?: Note['id'];
- sinceDate?: number;
- untilDate?: number;
- };
- res: Note[];
- };
- 'notes/mentions': {
- req: {
- following?: boolean;
- limit?: number;
- sinceId?: Note['id'];
- untilId?: Note['id'];
- };
- res: Note[];
- };
- 'notes/polls/recommendation': {
- req: TODO;
- res: TODO;
- };
- 'notes/polls/vote': {
- req: {
- noteId: Note['id'];
- choice: number;
- };
- res: null;
- };
- 'notes/events/search': {
- req: {
- query?: string;
- sinceId?: Note['id'];
- untilId?: Note['id'];
- limit?: number;
- offset?: number;
- users?: User['id'][];
- sinceDate?: number;
- untilDate?: number;
- sortBy?: 'startDate' | 'craetedAt';
- filters?: {
- key: string[];
- values: (string | null)[];
- }[];
- };
- res: Note[];
- };
- 'notes/reactions': {
- req: {
- noteId: Note['id'];
- type?: string | null;
- limit?: number;
- };
- res: NoteReaction[];
- };
- 'notes/reactions/create': {
- req: {
- noteId: Note['id'];
- reaction: string;
- };
- res: null;
- };
- 'notes/reactions/delete': {
- req: {
- noteId: Note['id'];
- };
- res: null;
- };
- 'notes/renotes': {
- req: {
- limit?: number;
- sinceId?: Note['id'];
- untilId?: Note['id'];
- noteId: Note['id'];
- };
- res: Note[];
- };
- 'notes/replies': {
- req: {
- limit?: number;
- sinceId?: Note['id'];
- untilId?: Note['id'];
- noteId: Note['id'];
- };
- res: Note[];
- };
- 'notes/search-by-tag': {
- req: TODO;
- res: TODO;
- };
- 'notes/search': {
- req: TODO;
- res: TODO;
- };
- 'notes/show': {
- req: {
- noteId: Note['id'];
- };
- res: Note;
- };
- 'notes/state': {
- req: TODO;
- res: TODO;
- };
- 'notes/timeline': {
- req: {
- limit?: number;
- sinceId?: Note['id'];
- untilId?: Note['id'];
- sinceDate?: number;
- untilDate?: number;
- };
- res: Note[];
- };
- 'notes/unrenote': {
- req: {
- noteId: Note['id'];
- };
- res: null;
- };
- 'notes/user-list-timeline': {
- req: {
- listId: UserList['id'];
- limit?: number;
- sinceId?: Note['id'];
- untilId?: Note['id'];
- sinceDate?: number;
- untilDate?: number;
- };
- res: Note[];
- };
- 'notes/watching/create': {
- req: TODO;
- res: TODO;
- };
- 'notes/watching/delete': {
- req: {
- noteId: Note['id'];
- };
- res: null;
- };
- 'notifications/create': {
- req: {
- body: string;
- header?: string | null;
- icon?: string | null;
- };
- res: null;
- };
- 'notifications/test-notification': {
- req: NoParams;
- res: null;
- };
- 'notifications/mark-all-as-read': {
- req: NoParams;
- res: null;
- };
- 'page-push': {
- req: {
- pageId: Page['id'];
- event: string;
- var?: any;
- };
- res: null;
- };
- 'pages/create': {
- req: TODO;
- res: Page;
- };
- 'pages/delete': {
- req: {
- pageId: Page['id'];
- };
- res: null;
- };
- 'pages/featured': {
- req: NoParams;
- res: Page[];
- };
- 'pages/like': {
- req: {
- pageId: Page['id'];
- };
- res: null;
- };
- 'pages/show': {
- req: {
- pageId?: Page['id'];
- name?: string;
- username?: string;
- };
- res: Page;
- };
- 'pages/unlike': {
- req: {
- pageId: Page['id'];
- };
- res: null;
- };
- 'pages/update': {
- req: TODO;
- res: null;
- };
- 'ping': {
- req: NoParams;
- res: {
- pong: number;
- };
- };
- 'pinned-users': {
- req: TODO;
- res: TODO;
- };
- 'promo/read': {
- req: TODO;
- res: TODO;
- };
- 'request-reset-password': {
- req: {
- username: string;
- email: string;
- };
- res: null;
- };
- 'reset-password': {
- req: {
- token: string;
- password: string;
- };
- res: null;
- };
- 'room/show': {
- req: TODO;
- res: TODO;
- };
- 'room/update': {
- req: TODO;
- res: TODO;
- };
- 'signup': {
- req: {
- username: string;
- password: string;
- host?: string;
- invitationCode?: string;
- emailAddress?: string;
- 'hcaptcha-response'?: string;
- 'g-recaptcha-response'?: string;
- 'turnstile-response'?: string;
- };
- res: MeSignup | null;
- };
- 'stats': {
- req: NoParams;
- res: Stats;
- };
- 'server-info': {
- req: NoParams;
- res: ServerInfo;
- };
- 'sw/register': {
- req: TODO;
- res: TODO;
- };
- 'username/available': {
- req: {
- username: string;
- };
- res: {
- available: boolean;
- };
- };
- 'users': {
- req: {
- limit?: number;
- offset?: number;
- sort?: UserSorting;
- origin?: OriginType;
- };
- res: User[];
- };
- 'users/clips': {
- req: TODO;
- res: TODO;
- };
- 'users/followers': {
- req: {
- userId?: User['id'];
- username?: User['username'];
- host?: User['host'] | null;
- limit?: number;
- sinceId?: Following['id'];
- untilId?: Following['id'];
- };
- res: FollowingFollowerPopulated[];
- };
- 'users/following': {
- req: {
- userId?: User['id'];
- username?: User['username'];
- host?: User['host'] | null;
- limit?: number;
- sinceId?: Following['id'];
- untilId?: Following['id'];
- };
- res: FollowingFolloweePopulated[];
- };
- 'users/gallery/posts': {
- req: TODO;
- res: TODO;
- };
- 'users/get-frequently-replied-users': {
- req: TODO;
- res: TODO;
- };
- 'users/groups/create': {
- req: TODO;
- res: TODO;
- };
- 'users/groups/delete': {
- req: {
- groupId: UserGroup['id'];
- };
- res: null;
- };
- 'users/groups/invitations/accept': {
- req: TODO;
- res: TODO;
- };
- 'users/groups/invitations/reject': {
- req: TODO;
- res: TODO;
- };
- 'users/groups/invite': {
- req: TODO;
- res: TODO;
- };
- 'users/groups/joined': {
- req: TODO;
- res: TODO;
- };
- 'users/groups/owned': {
- req: TODO;
- res: TODO;
- };
- 'users/groups/pull': {
- req: TODO;
- res: TODO;
- };
- 'users/groups/show': {
- req: TODO;
- res: TODO;
- };
- 'users/groups/transfer': {
- req: TODO;
- res: TODO;
- };
- 'users/groups/update': {
- req: TODO;
- res: TODO;
- };
- 'users/lists/create': {
- req: {
- name: string;
- };
- res: UserList;
- };
- 'users/lists/delete': {
- req: {
- listId: UserList['id'];
- };
- res: null;
- };
- 'users/lists/list': {
- req: NoParams;
- res: UserList[];
- };
- 'users/lists/pull': {
- req: {
- listId: UserList['id'];
- userId: User['id'];
- };
- res: null;
- };
- 'users/lists/push': {
- req: {
- listId: UserList['id'];
- userId: User['id'];
- };
- res: null;
- };
- 'users/lists/show': {
- req: {
- listId: UserList['id'];
- };
- res: UserList;
- };
- 'users/lists/update': {
- req: {
- listId: UserList['id'];
- name: string;
- };
- res: UserList;
- };
- 'users/notes': {
- req: {
- userId: User['id'];
- limit?: number;
- sinceId?: Note['id'];
- untilId?: Note['id'];
- sinceDate?: number;
- untilDate?: number;
- };
- res: Note[];
- };
- 'users/pages': {
- req: TODO;
- res: TODO;
- };
- 'users/flashs': {
- req: TODO;
- res: TODO;
- };
- 'users/recommendation': {
- req: TODO;
- res: TODO;
- };
- 'users/relation': {
- req: TODO;
- res: TODO;
- };
- 'users/report-abuse': {
- req: TODO;
- res: TODO;
- };
- 'users/search-by-username-and-host': {
- req: TODO;
- res: TODO;
- };
- 'users/search': {
- req: TODO;
- res: TODO;
- };
+type EmojiRequest = operations['emoji']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type EmojiResponse = operations['emoji']['responses']['200']['content']['application/json'];
+
+// @public (undocumented)
+type EmojiSimple = components['schemas']['EmojiSimple'];
+
+// @public (undocumented)
+type EmojisResponse = operations['emojis']['responses']['200']['content']['application/json'];
+
+// @public (undocumented)
+type EmojiUpdated = {
+ emojis: EmojiDetailed[];
+};
+
+// @public (undocumented)
+type EmptyRequest = Record | undefined;
+
+// @public (undocumented)
+type EmptyResponse = Record | undefined;
+
+// @public (undocumented)
+type EndpointRequest = operations['endpoint']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type EndpointResponse = operations['endpoint']['responses']['200']['content']['application/json'];
+
+// Warning: (ae-forgotten-export) The symbol "Overwrite" needs to be exported by the entry point index.d.ts
+// Warning: (ae-forgotten-export) The symbol "Endpoints_2" needs to be exported by the entry point index.d.ts
+//
+// @public (undocumented)
+export type Endpoints = Overwrite;
+
+// @public (undocumented)
+type EndpointsResponse = operations['endpoints']['responses']['200']['content']['application/json'];
declare namespace entities {
export {
ID,
DateString,
- User,
+ PageEvent,
+ ModerationLog,
+ ServerStats,
+ ServerStatsLog,
+ QueueStats,
+ QueueStatsLog,
+ EmojiAdded,
+ EmojiUpdated,
+ EmojiDeleted,
+ AnnouncementCreated,
+ EmptyRequest,
+ EmptyResponse,
+ AdminMetaResponse,
+ AdminAbuseReportResolverCreateRequest,
+ AdminAbuseReportResolverCreateResponse,
+ AdminAbuseReportResolverListRequest,
+ AdminAbuseReportResolverListResponse,
+ AdminAbuseReportResolverDeleteRequest,
+ AdminAbuseReportResolverUpdateRequest,
+ AdminAbuseUserReportsRequest,
+ AdminAbuseUserReportsResponse,
+ AdminAccountsCreateRequest,
+ AdminAccountsCreateResponse,
+ AdminAccountsDeleteRequest,
+ AdminAccountsFindByEmailRequest,
+ AdminAccountsFindByEmailResponse,
+ AdminAdCreateRequest,
+ AdminAdCreateResponse,
+ AdminAdDeleteRequest,
+ AdminAdListRequest,
+ AdminAdListResponse,
+ AdminAdUpdateRequest,
+ AdminAnnouncementsCreateRequest,
+ AdminAnnouncementsCreateResponse,
+ AdminAnnouncementsDeleteRequest,
+ AdminAnnouncementsListRequest,
+ AdminAnnouncementsListResponse,
+ AdminAnnouncementsUpdateRequest,
+ AdminAvatarDecorationsCreateRequest,
+ AdminAvatarDecorationsDeleteRequest,
+ AdminAvatarDecorationsListRequest,
+ AdminAvatarDecorationsListResponse,
+ AdminAvatarDecorationsUpdateRequest,
+ AdminDeleteAllFilesOfAUserRequest,
+ AdminUnsetUserAvatarRequest,
+ AdminUnsetUserBannerRequest,
+ AdminDriveFilesRequest,
+ AdminDriveFilesResponse,
+ AdminDriveShowFileRequest,
+ AdminDriveShowFileResponse,
+ AdminEmojiAddAliasesBulkRequest,
+ AdminEmojiAddRequest,
+ AdminEmojiAddsRequest,
+ AdminEmojiCopyRequest,
+ AdminEmojiCopyResponse,
+ AdminEmojiDeleteBulkRequest,
+ AdminEmojiDeleteRequest,
+ AdminEmojiImportZipRequest,
+ AdminEmojiListRemoteRequest,
+ AdminEmojiListRemoteResponse,
+ AdminEmojiListRequest,
+ AdminEmojiListResponse,
+ AdminEmojiRemoveAliasesBulkRequest,
+ AdminEmojiSetAliasesBulkRequest,
+ AdminEmojiSetCategoryBulkRequest,
+ AdminEmojiSetLicenseBulkRequest,
+ AdminEmojiStealRequest,
+ AdminEmojiStealResponse,
+ AdminEmojiUpdateRequest,
+ AdminFederationDeleteAllFilesRequest,
+ AdminFederationRefreshRemoteInstanceMetadataRequest,
+ AdminFederationRemoveAllFollowingRequest,
+ AdminFederationUpdateInstanceRequest,
+ AdminGetIndexStatsResponse,
+ AdminGetTableStatsResponse,
+ AdminGetUserIpsRequest,
+ AdminGetUserIpsResponse,
+ AdminInviteCreateRequest,
+ AdminInviteCreateResponse,
+ AdminInviteListRequest,
+ AdminInviteListResponse,
+ AdminPromoCreateRequest,
+ AdminQueueDeliverDelayedResponse,
+ AdminQueueInboxDelayedResponse,
+ AdminQueuePromoteRequest,
+ AdminQueueStatsResponse,
+ AdminRelaysAddRequest,
+ AdminRelaysAddResponse,
+ AdminRelaysListResponse,
+ AdminRelaysRemoveRequest,
+ AdminResetPasswordRequest,
+ AdminResetPasswordResponse,
+ AdminResolveAbuseUserReportRequest,
+ AdminSendEmailRequest,
+ AdminServerInfoResponse,
+ AdminShowModerationLogsRequest,
+ AdminShowModerationLogsResponse,
+ AdminShowUserRequest,
+ AdminShowUserResponse,
+ AdminShowUsersRequest,
+ AdminShowUsersResponse,
+ AdminSuspendUserRequest,
+ AdminUnsuspendUserRequest,
+ AdminUpdateMetaRequest,
+ AdminDeleteAccountRequest,
+ AdminDeleteAccountResponse,
+ AdminUpdateUserNoteRequest,
+ AdminRolesCreateRequest,
+ AdminRolesCreateResponse,
+ AdminRolesDeleteRequest,
+ AdminRolesListResponse,
+ AdminRolesShowRequest,
+ AdminRolesShowResponse,
+ AdminRolesUpdateRequest,
+ AdminRolesAssignRequest,
+ AdminRolesUnassignRequest,
+ AdminRolesUpdateDefaultPoliciesRequest,
+ AdminRolesUsersRequest,
+ AdminRolesUsersResponse,
+ AnnouncementsRequest,
+ AnnouncementsResponse,
+ AntennasCreateRequest,
+ AntennasCreateResponse,
+ AntennasDeleteRequest,
+ AntennasListResponse,
+ AntennasNotesRequest,
+ AntennasNotesResponse,
+ AntennasShowRequest,
+ AntennasShowResponse,
+ AntennasUpdateRequest,
+ AntennasUpdateResponse,
+ ApGetRequest,
+ ApGetResponse,
+ ApShowRequest,
+ ApShowResponse,
+ AppCreateRequest,
+ AppCreateResponse,
+ AppShowRequest,
+ AppShowResponse,
+ AuthAcceptRequest,
+ AuthSessionGenerateRequest,
+ AuthSessionGenerateResponse,
+ AuthSessionShowRequest,
+ AuthSessionShowResponse,
+ AuthSessionUserkeyRequest,
+ AuthSessionUserkeyResponse,
+ BlockingCreateRequest,
+ BlockingCreateResponse,
+ BlockingDeleteRequest,
+ BlockingDeleteResponse,
+ BlockingListRequest,
+ BlockingListResponse,
+ ChannelsCreateRequest,
+ ChannelsCreateResponse,
+ ChannelsFeaturedResponse,
+ ChannelsFollowRequest,
+ ChannelsFollowedRequest,
+ ChannelsFollowedResponse,
+ ChannelsOwnedRequest,
+ ChannelsOwnedResponse,
+ ChannelsShowRequest,
+ ChannelsShowResponse,
+ ChannelsTimelineRequest,
+ ChannelsTimelineResponse,
+ ChannelsUnfollowRequest,
+ ChannelsUpdateRequest,
+ ChannelsUpdateResponse,
+ ChannelsFavoriteRequest,
+ ChannelsUnfavoriteRequest,
+ ChannelsMyFavoritesResponse,
+ ChannelsSearchRequest,
+ ChannelsSearchResponse,
+ ChartsActiveUsersRequest,
+ ChartsActiveUsersResponse,
+ ChartsApRequestRequest,
+ ChartsApRequestResponse,
+ ChartsDriveRequest,
+ ChartsDriveResponse,
+ ChartsFederationRequest,
+ ChartsFederationResponse,
+ ChartsInstanceRequest,
+ ChartsInstanceResponse,
+ ChartsNotesRequest,
+ ChartsNotesResponse,
+ ChartsUserDriveRequest,
+ ChartsUserDriveResponse,
+ ChartsUserFollowingRequest,
+ ChartsUserFollowingResponse,
+ ChartsUserNotesRequest,
+ ChartsUserNotesResponse,
+ ChartsUserPvRequest,
+ ChartsUserPvResponse,
+ ChartsUserReactionsRequest,
+ ChartsUserReactionsResponse,
+ ChartsUsersRequest,
+ ChartsUsersResponse,
+ ClipsAddNoteRequest,
+ ClipsRemoveNoteRequest,
+ ClipsCreateRequest,
+ ClipsCreateResponse,
+ ClipsDeleteRequest,
+ ClipsListResponse,
+ ClipsNotesRequest,
+ ClipsNotesResponse,
+ ClipsShowRequest,
+ ClipsShowResponse,
+ ClipsUpdateRequest,
+ ClipsUpdateResponse,
+ ClipsFavoriteRequest,
+ ClipsUnfavoriteRequest,
+ ClipsMyFavoritesResponse,
+ DriveResponse,
+ DriveFilesRequest,
+ DriveFilesResponse,
+ DriveFilesAttachedNotesRequest,
+ DriveFilesAttachedNotesResponse,
+ DriveFilesCheckExistenceRequest,
+ DriveFilesCheckExistenceResponse,
+ DriveFilesCreateRequest,
+ DriveFilesCreateResponse,
+ DriveFilesDeleteRequest,
+ DriveFilesFindByHashRequest,
+ DriveFilesFindByHashResponse,
+ DriveFilesFindRequest,
+ DriveFilesFindResponse,
+ DriveFilesShowRequest,
+ DriveFilesShowResponse,
+ DriveFilesUpdateRequest,
+ DriveFilesUpdateResponse,
+ DriveFilesUploadFromUrlRequest,
+ DriveFoldersRequest,
+ DriveFoldersResponse,
+ DriveFoldersCreateRequest,
+ DriveFoldersCreateResponse,
+ DriveFoldersDeleteRequest,
+ DriveFoldersFindRequest,
+ DriveFoldersFindResponse,
+ DriveFoldersShowRequest,
+ DriveFoldersShowResponse,
+ DriveFoldersUpdateRequest,
+ DriveFoldersUpdateResponse,
+ DriveStreamRequest,
+ DriveStreamResponse,
+ EmailAddressAvailableRequest,
+ EmailAddressAvailableResponse,
+ EndpointRequest,
+ EndpointResponse,
+ EndpointsResponse,
+ FederationFollowersRequest,
+ FederationFollowersResponse,
+ FederationFollowingRequest,
+ FederationFollowingResponse,
+ FederationInstancesRequest,
+ FederationInstancesResponse,
+ FederationShowInstanceRequest,
+ FederationShowInstanceResponse,
+ FederationUpdateRemoteUserRequest,
+ FederationUsersRequest,
+ FederationUsersResponse,
+ FederationStatsRequest,
+ FederationStatsResponse,
+ FollowingCreateRequest,
+ FollowingCreateResponse,
+ FollowingDeleteRequest,
+ FollowingDeleteResponse,
+ FollowingUpdateRequest,
+ FollowingUpdateResponse,
+ FollowingUpdateAllRequest,
+ FollowingInvalidateRequest,
+ FollowingInvalidateResponse,
+ FollowingRequestsAcceptRequest,
+ FollowingRequestsCancelRequest,
+ FollowingRequestsCancelResponse,
+ FollowingRequestsListRequest,
+ FollowingRequestsListResponse,
+ FollowingRequestsRejectRequest,
+ GalleryFeaturedRequest,
+ GalleryFeaturedResponse,
+ GalleryPopularResponse,
+ GalleryPostsRequest,
+ GalleryPostsResponse,
+ GalleryPostsCreateRequest,
+ GalleryPostsCreateResponse,
+ GalleryPostsDeleteRequest,
+ GalleryPostsLikeRequest,
+ GalleryPostsShowRequest,
+ GalleryPostsShowResponse,
+ GalleryPostsUnlikeRequest,
+ GalleryPostsUpdateRequest,
+ GalleryPostsUpdateResponse,
+ GetOnlineUsersCountResponse,
+ GetAvatarDecorationsResponse,
+ HashtagsListRequest,
+ HashtagsListResponse,
+ HashtagsSearchRequest,
+ HashtagsSearchResponse,
+ HashtagsShowRequest,
+ HashtagsShowResponse,
+ HashtagsTrendResponse,
+ HashtagsUsersRequest,
+ HashtagsUsersResponse,
+ IResponse,
+ I2faDoneRequest,
+ I2faKeyDoneRequest,
+ I2faKeyDoneResponse,
+ I2faPasswordLessRequest,
+ I2faRegisterKeyRequest,
+ I2faRegisterKeyResponse,
+ I2faRegisterRequest,
+ I2faRegisterResponse,
+ I2faUpdateKeyRequest,
+ I2faRemoveKeyRequest,
+ I2faUnregisterRequest,
+ IAppsRequest,
+ IAppsResponse,
+ IAuthorizedAppsRequest,
+ IAuthorizedAppsResponse,
+ IClaimAchievementRequest,
+ IChangePasswordRequest,
+ IDeleteAccountRequest,
+ IExportFollowingRequest,
+ IFavoritesRequest,
+ IFavoritesResponse,
+ IGalleryLikesRequest,
+ IGalleryLikesResponse,
+ IGalleryPostsRequest,
+ IGalleryPostsResponse,
+ IImportBlockingRequest,
+ IImportFollowingRequest,
+ IImportMutingRequest,
+ IImportUserListsRequest,
+ IImportAntennasRequest,
+ INotificationsRequest,
+ INotificationsResponse,
+ INotificationsGroupedRequest,
+ INotificationsGroupedResponse,
+ IPageLikesRequest,
+ IPageLikesResponse,
+ IPagesRequest,
+ IPagesResponse,
+ IPinRequest,
+ IPinResponse,
+ IReadAnnouncementRequest,
+ IRegenerateTokenRequest,
+ IRegistryGetAllRequest,
+ IRegistryGetAllResponse,
+ IRegistryGetDetailRequest,
+ IRegistryGetDetailResponse,
+ IRegistryGetRequest,
+ IRegistryGetResponse,
+ IRegistryKeysWithTypeRequest,
+ IRegistryKeysWithTypeResponse,
+ IRegistryKeysRequest,
+ IRegistryRemoveRequest,
+ IRegistryScopesWithDomainResponse,
+ IRegistrySetRequest,
+ IRevokeTokenRequest,
+ ISigninHistoryRequest,
+ ISigninHistoryResponse,
+ IUnpinRequest,
+ IUnpinResponse,
+ IUpdateEmailRequest,
+ IUpdateEmailResponse,
+ IUpdateRequest,
+ IUpdateResponse,
+ IUserGroupInvitesRequest,
+ IUserGroupInvitesResponse,
+ IMoveRequest,
+ IMoveResponse,
+ IWebhooksCreateRequest,
+ IWebhooksCreateResponse,
+ IWebhooksListResponse,
+ IWebhooksShowRequest,
+ IWebhooksShowResponse,
+ IWebhooksUpdateRequest,
+ IWebhooksDeleteRequest,
+ InviteCreateResponse,
+ InviteDeleteRequest,
+ InviteListRequest,
+ InviteListResponse,
+ InviteLimitResponse,
+ MessagingHistoryRequest,
+ MessagingHistoryResponse,
+ MessagingMessagesRequest,
+ MessagingMessagesResponse,
+ MessagingMessagesCreateRequest,
+ MessagingMessagesCreateResponse,
+ MessagingMessagesDeleteRequest,
+ MessagingMessagesReadRequest,
+ MetaRequest,
+ MetaResponse,
+ EmojisResponse,
+ EmojiRequest,
+ EmojiResponse,
+ MiauthGenTokenRequest,
+ MiauthGenTokenResponse,
+ MuteCreateRequest,
+ MuteDeleteRequest,
+ MuteListRequest,
+ MuteListResponse,
+ RenoteMuteCreateRequest,
+ RenoteMuteDeleteRequest,
+ RenoteMuteListRequest,
+ RenoteMuteListResponse,
+ MyAppsRequest,
+ MyAppsResponse,
+ NotesRequest,
+ NotesResponse,
+ NotesChildrenRequest,
+ NotesChildrenResponse,
+ NotesClipsRequest,
+ NotesClipsResponse,
+ NotesConversationRequest,
+ NotesConversationResponse,
+ NotesCreateRequest,
+ NotesCreateResponse,
+ NotesDeleteRequest,
+ NotesUpdateRequest,
+ NotesFavoritesCreateRequest,
+ NotesFavoritesDeleteRequest,
+ NotesFeaturedRequest,
+ NotesFeaturedResponse,
+ NotesGlobalTimelineRequest,
+ NotesGlobalTimelineResponse,
+ NotesHybridTimelineRequest,
+ NotesHybridTimelineResponse,
+ NotesLocalTimelineRequest,
+ NotesLocalTimelineResponse,
+ NotesMentionsRequest,
+ NotesMentionsResponse,
+ NotesPollsRecommendationRequest,
+ NotesPollsRecommendationResponse,
+ NotesPollsVoteRequest,
+ NotesEventsSearchRequest,
+ NotesEventsSearchResponse,
+ NotesReactionsRequest,
+ NotesReactionsResponse,
+ NotesReactionsCreateRequest,
+ NotesReactionsDeleteRequest,
+ NotesRenotesRequest,
+ NotesRenotesResponse,
+ NotesRepliesRequest,
+ NotesRepliesResponse,
+ NotesSearchByTagRequest,
+ NotesSearchByTagResponse,
+ NotesSearchRequest,
+ NotesSearchResponse,
+ NotesShowRequest,
+ NotesShowResponse,
+ NotesStateRequest,
+ NotesStateResponse,
+ NotesThreadMutingCreateRequest,
+ NotesThreadMutingDeleteRequest,
+ NotesTimelineRequest,
+ NotesTimelineResponse,
+ NotesTranslateRequest,
+ NotesTranslateResponse,
+ NotesUnrenoteRequest,
+ NotesUserListTimelineRequest,
+ NotesUserListTimelineResponse,
+ NotificationsCreateRequest,
+ PagePushRequest,
+ PagesCreateRequest,
+ PagesCreateResponse,
+ PagesDeleteRequest,
+ PagesFeaturedResponse,
+ PagesLikeRequest,
+ PagesShowRequest,
+ PagesShowResponse,
+ PagesUnlikeRequest,
+ PagesUpdateRequest,
+ FlashCreateRequest,
+ FlashCreateResponse,
+ FlashDeleteRequest,
+ FlashFeaturedResponse,
+ FlashGenTokenRequest,
+ FlashGenTokenResponse,
+ FlashLikeRequest,
+ FlashShowRequest,
+ FlashShowResponse,
+ FlashUnlikeRequest,
+ FlashUpdateRequest,
+ FlashMyRequest,
+ FlashMyResponse,
+ FlashMyLikesRequest,
+ FlashMyLikesResponse,
+ PingResponse,
+ PinnedUsersResponse,
+ PromoReadRequest,
+ RolesListResponse,
+ RolesShowRequest,
+ RolesShowResponse,
+ RolesUsersRequest,
+ RolesUsersResponse,
+ RolesNotesRequest,
+ RolesNotesResponse,
+ RequestResetPasswordRequest,
+ ResetPasswordRequest,
+ ServerInfoResponse,
+ StatsResponse,
+ SwShowRegistrationRequest,
+ SwShowRegistrationResponse,
+ SwUpdateRegistrationRequest,
+ SwUpdateRegistrationResponse,
+ SwRegisterRequest,
+ SwRegisterResponse,
+ SwUnregisterRequest,
+ TestRequest,
+ TestResponse,
+ UsernameAvailableRequest,
+ UsernameAvailableResponse,
+ UsersRequest,
+ UsersResponse,
+ UsersClipsRequest,
+ UsersClipsResponse,
+ UsersFollowersRequest,
+ UsersFollowersResponse,
+ UsersFollowingRequest,
+ UsersFollowingResponse,
+ UsersGalleryPostsRequest,
+ UsersGalleryPostsResponse,
+ UsersGetFrequentlyRepliedUsersRequest,
+ UsersGetFrequentlyRepliedUsersResponse,
+ UsersFeaturedNotesRequest,
+ UsersFeaturedNotesResponse,
+ UsersGroupsCreateRequest,
+ UsersGroupsCreateResponse,
+ UsersGroupsDeleteRequest,
+ UsersGroupsInvitationsAcceptRequest,
+ UsersGroupsInvitationsRejectRequest,
+ UsersGroupsInviteRequest,
+ UsersGroupsJoinedResponse,
+ UsersGroupsLeaveRequest,
+ UsersGroupsOwnedResponse,
+ UsersGroupsPullRequest,
+ UsersGroupsShowRequest,
+ UsersGroupsShowResponse,
+ UsersGroupsTransferRequest,
+ UsersGroupsTransferResponse,
+ UsersGroupsUpdateRequest,
+ UsersGroupsUpdateResponse,
+ UsersListsCreateRequest,
+ UsersListsCreateResponse,
+ UsersListsDeleteRequest,
+ UsersListsListRequest,
+ UsersListsListResponse,
+ UsersListsPullRequest,
+ UsersListsPushRequest,
+ UsersListsShowRequest,
+ UsersListsShowResponse,
+ UsersListsFavoriteRequest,
+ UsersListsUnfavoriteRequest,
+ UsersListsUpdateRequest,
+ UsersListsUpdateResponse,
+ UsersListsCreateFromPublicRequest,
+ UsersListsCreateFromPublicResponse,
+ UsersListsUpdateMembershipRequest,
+ UsersListsGetMembershipsRequest,
+ UsersListsGetMembershipsResponse,
+ UsersNotesRequest,
+ UsersNotesResponse,
+ UsersPagesRequest,
+ UsersPagesResponse,
+ UsersFlashsRequest,
+ UsersFlashsResponse,
+ UsersReactionsRequest,
+ UsersReactionsResponse,
+ UsersRecommendationRequest,
+ UsersRecommendationResponse,
+ UsersRelationRequest,
+ UsersRelationResponse,
+ UsersReportAbuseRequest,
+ UsersSearchByUsernameAndHostRequest,
+ UsersSearchByUsernameAndHostResponse,
+ UsersSearchRequest,
+ UsersSearchResponse,
+ UsersShowRequest,
+ UsersShowResponse,
+ UsersStatsRequest,
+ UsersStatsResponse,
+ UsersAchievementsRequest,
+ UsersAchievementsResponse,
+ UsersUpdateMemoRequest,
+ UsersTranslateRequest,
+ UsersTranslateResponse,
+ FetchRssRequest,
+ FetchRssResponse,
+ FetchExternalResourcesRequest,
+ FetchExternalResourcesResponse,
+ RetentionResponse,
+ Error_2 as Error,
UserLite,
- UserDetailed,
- UserGroup,
- UserList,
+ UserDetailedNotMeOnly,
+ MeDetailedOnly,
+ UserDetailedNotMe,
MeDetailed,
- MeDetailedWithSecret,
- MeSignup,
- DriveFile,
- DriveFolder,
- GalleryPost,
+ UserDetailed,
+ User,
+ UserList,
+ UserGroup,
+ Ad,
+ Announcement,
+ App,
+ MessagingMessage,
Note,
NoteReaction,
- Notification_2 as Notification,
- MessagingMessage,
- CustomEmoji,
- LiteInstanceMetadata,
- DetailedInstanceMetadata,
- InstanceMetadata,
- AdminInstanceMetadata,
- ServerInfo,
- Stats,
- Page,
- PageEvent,
- Announcement,
- Antenna,
- App,
- AuthSession,
- Ad,
- Clip,
NoteFavorite,
- FollowRequest,
- Channel,
+ Notification_2 as Notification,
+ DriveFile,
+ DriveFolder,
Following,
- FollowingFolloweePopulated,
- FollowingFollowerPopulated,
+ Muting,
+ RenoteMuting,
Blocking,
- Instance,
+ Hashtag,
+ InviteCode,
+ Page,
+ Channel,
+ QueueCount,
+ Antenna,
+ Clip,
+ FederationInstance,
+ GalleryPost,
+ EmojiSimple,
+ EmojiDetailed,
+ Flash,
Signin,
- Invite,
- InviteLimit,
- UserSorting,
- OriginType,
- ModerationLog
+ RoleLite,
+ Role
}
}
export { entities }
+// @public (undocumented)
+type Error_2 = components['schemas']['Error'];
+
+// @public (undocumented)
+type FederationFollowersRequest = operations['federation/followers']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type FederationFollowersResponse = operations['federation/followers']['responses']['200']['content']['application/json'];
+
+// @public (undocumented)
+type FederationFollowingRequest = operations['federation/following']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type FederationFollowingResponse = operations['federation/following']['responses']['200']['content']['application/json'];
+
+// @public (undocumented)
+type FederationInstance = components['schemas']['FederationInstance'];
+
+// @public (undocumented)
+type FederationInstancesRequest = operations['federation/instances']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type FederationInstancesResponse = operations['federation/instances']['responses']['200']['content']['application/json'];
+
+// @public (undocumented)
+type FederationShowInstanceRequest = operations['federation/show-instance']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type FederationShowInstanceResponse = operations['federation/show-instance']['responses']['200']['content']['application/json'];
+
+// @public (undocumented)
+type FederationStatsRequest = operations['federation/stats']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type FederationStatsResponse = operations['federation/stats']['responses']['200']['content']['application/json'];
+
+// @public (undocumented)
+type FederationUpdateRemoteUserRequest = operations['federation/update-remote-user']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type FederationUsersRequest = operations['federation/users']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type FederationUsersResponse = operations['federation/users']['responses']['200']['content']['application/json'];
+
+// @public (undocumented)
+type FetchExternalResourcesRequest = operations['fetch-external-resources']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type FetchExternalResourcesResponse = operations['fetch-external-resources']['responses']['200']['content']['application/json'];
+
// @public (undocumented)
type FetchLike = (input: string, init?: {
method?: string;
@@ -2388,244 +1794,487 @@ type FetchLike = (input: string, init?: {
}>;
// @public (undocumented)
-export const ffVisibility: readonly ["public", "followers", "private"];
+type FetchRssRequest = operations['fetch-rss']['requestBody']['content']['application/json'];
// @public (undocumented)
-type Following = {
- id: ID;
- createdAt: DateString;
- followerId: User['id'];
- followeeId: User['id'];
-};
+type FetchRssResponse = operations['fetch-rss']['responses']['200']['content']['application/json'];
// @public (undocumented)
-type FollowingFolloweePopulated = Following & {
- followee: UserDetailed;
-};
+type Flash = components['schemas']['Flash'];
// @public (undocumented)
-type FollowingFollowerPopulated = Following & {
- follower: UserDetailed;
-};
+type FlashCreateRequest = operations['flash/create']['requestBody']['content']['application/json'];
// @public (undocumented)
-type FollowRequest = {
- id: ID;
- follower: User;
- followee: User;
-};
+type FlashCreateResponse = operations['flash/create']['responses']['200']['content']['application/json'];
// @public (undocumented)
-type GalleryPost = {
- id: ID;
- createdAt: DateString;
- updatedAt: DateString;
- userId: User['id'];
- user: User;
- title: string;
- description: string | null;
- fileIds: DriveFile['id'][];
- files: DriveFile[];
- isSensitive: boolean;
- likedCount: number;
- isLiked?: boolean;
-};
+type FlashDeleteRequest = operations['flash/delete']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type FlashFeaturedResponse = operations['flash/featured']['responses']['200']['content']['application/json'];
+
+// @public (undocumented)
+type FlashGenTokenRequest = operations['flash/gen-token']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type FlashGenTokenResponse = operations['flash/gen-token']['responses']['200']['content']['application/json'];
+
+// @public (undocumented)
+type FlashLikeRequest = operations['flash/like']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type FlashMyLikesRequest = operations['flash/my-likes']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type FlashMyLikesResponse = operations['flash/my-likes']['responses']['200']['content']['application/json'];
+
+// @public (undocumented)
+type FlashMyRequest = operations['flash/my']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type FlashMyResponse = operations['flash/my']['responses']['200']['content']['application/json'];
+
+// @public (undocumented)
+type FlashShowRequest = operations['flash/show']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type FlashShowResponse = operations['flash/show']['responses']['200']['content']['application/json'];
+
+// @public (undocumented)
+type FlashUnlikeRequest = operations['flash/unlike']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type FlashUpdateRequest = operations['flash/update']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+export const followersVisibilities: readonly ["public", "followers", "private"];
+
+// @public (undocumented)
+type Following = components['schemas']['Following'];
+
+// @public (undocumented)
+type FollowingCreateRequest = operations['following/create']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type FollowingCreateResponse = operations['following/create']['responses']['200']['content']['application/json'];
+
+// @public (undocumented)
+type FollowingDeleteRequest = operations['following/delete']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type FollowingDeleteResponse = operations['following/delete']['responses']['200']['content']['application/json'];
+
+// @public (undocumented)
+type FollowingInvalidateRequest = operations['following/invalidate']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type FollowingInvalidateResponse = operations['following/invalidate']['responses']['200']['content']['application/json'];
+
+// @public (undocumented)
+type FollowingRequestsAcceptRequest = operations['following/requests/accept']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type FollowingRequestsCancelRequest = operations['following/requests/cancel']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type FollowingRequestsCancelResponse = operations['following/requests/cancel']['responses']['200']['content']['application/json'];
+
+// @public (undocumented)
+type FollowingRequestsListRequest = operations['following/requests/list']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type FollowingRequestsListResponse = operations['following/requests/list']['responses']['200']['content']['application/json'];
+
+// @public (undocumented)
+type FollowingRequestsRejectRequest = operations['following/requests/reject']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type FollowingUpdateAllRequest = operations['following/update-all']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type FollowingUpdateRequest = operations['following/update']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type FollowingUpdateResponse = operations['following/update']['responses']['200']['content']['application/json'];
+
+// @public (undocumented)
+export const followingVisibilities: readonly ["public", "followers", "private"];
+
+// @public (undocumented)
+type GalleryFeaturedRequest = operations['gallery/featured']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type GalleryFeaturedResponse = operations['gallery/featured']['responses']['200']['content']['application/json'];
+
+// @public (undocumented)
+type GalleryPopularResponse = operations['gallery/popular']['responses']['200']['content']['application/json'];
+
+// @public (undocumented)
+type GalleryPost = components['schemas']['GalleryPost'];
+
+// @public (undocumented)
+type GalleryPostsCreateRequest = operations['gallery/posts/create']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type GalleryPostsCreateResponse = operations['gallery/posts/create']['responses']['200']['content']['application/json'];
+
+// @public (undocumented)
+type GalleryPostsDeleteRequest = operations['gallery/posts/delete']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type GalleryPostsLikeRequest = operations['gallery/posts/like']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type GalleryPostsRequest = operations['gallery/posts']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type GalleryPostsResponse = operations['gallery/posts']['responses']['200']['content']['application/json'];
+
+// @public (undocumented)
+type GalleryPostsShowRequest = operations['gallery/posts/show']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type GalleryPostsShowResponse = operations['gallery/posts/show']['responses']['200']['content']['application/json'];
+
+// @public (undocumented)
+type GalleryPostsUnlikeRequest = operations['gallery/posts/unlike']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type GalleryPostsUpdateRequest = operations['gallery/posts/update']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type GalleryPostsUpdateResponse = operations['gallery/posts/update']['responses']['200']['content']['application/json'];
+
+// @public (undocumented)
+type GetAvatarDecorationsResponse = operations['get-avatar-decorations']['responses']['200']['content']['application/json'];
+
+// @public (undocumented)
+type GetOnlineUsersCountResponse = operations['get-online-users-count']['responses']['200']['content']['application/json'];
+
+// @public (undocumented)
+type Hashtag = components['schemas']['Hashtag'];
+
+// @public (undocumented)
+type HashtagsListRequest = operations['hashtags/list']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type HashtagsListResponse = operations['hashtags/list']['responses']['200']['content']['application/json'];
+
+// @public (undocumented)
+type HashtagsSearchRequest = operations['hashtags/search']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type HashtagsSearchResponse = operations['hashtags/search']['responses']['200']['content']['application/json'];
+
+// @public (undocumented)
+type HashtagsShowRequest = operations['hashtags/show']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type HashtagsShowResponse = operations['hashtags/show']['responses']['200']['content']['application/json'];
+
+// @public (undocumented)
+type HashtagsTrendResponse = operations['hashtags/trend']['responses']['200']['content']['application/json'];
+
+// @public (undocumented)
+type HashtagsUsersRequest = operations['hashtags/users']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type HashtagsUsersResponse = operations['hashtags/users']['responses']['200']['content']['application/json'];
+
+// @public (undocumented)
+type I2faDoneRequest = operations['i/2fa/done']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type I2faKeyDoneRequest = operations['i/2fa/key-done']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type I2faKeyDoneResponse = operations['i/2fa/key-done']['responses']['200']['content']['application/json'];
+
+// @public (undocumented)
+type I2faPasswordLessRequest = operations['i/2fa/password-less']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type I2faRegisterKeyRequest = operations['i/2fa/register-key']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type I2faRegisterKeyResponse = operations['i/2fa/register-key']['responses']['200']['content']['application/json'];
+
+// @public (undocumented)
+type I2faRegisterRequest = operations['i/2fa/register']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type I2faRegisterResponse = operations['i/2fa/register']['responses']['200']['content']['application/json'];
+
+// @public (undocumented)
+type I2faRemoveKeyRequest = operations['i/2fa/remove-key']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type I2faUnregisterRequest = operations['i/2fa/unregister']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type I2faUpdateKeyRequest = operations['i/2fa/update-key']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type IAppsRequest = operations['i/apps']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type IAppsResponse = operations['i/apps']['responses']['200']['content']['application/json'];
+
+// @public (undocumented)
+type IAuthorizedAppsRequest = operations['i/authorized-apps']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type IAuthorizedAppsResponse = operations['i/authorized-apps']['responses']['200']['content']['application/json'];
+
+// @public (undocumented)
+type IChangePasswordRequest = operations['i/change-password']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type IClaimAchievementRequest = operations['i/claim-achievement']['requestBody']['content']['application/json'];
// @public (undocumented)
type ID = string;
// @public (undocumented)
-type Instance = {
- id: ID;
- firstRetrievedAt: DateString;
- host: string;
- usersCount: number;
- notesCount: number;
- followingCount: number;
- followersCount: number;
- driveUsage: number;
- driveFiles: number;
- latestRequestSentAt: DateString | null;
- latestStatus: number | null;
- latestRequestReceivedAt: DateString | null;
- lastCommunicatedAt: DateString;
- isNotResponding: boolean;
- isSuspended: boolean;
- isSilenced: boolean;
- isBlocked: boolean;
- softwareName: string | null;
- softwareVersion: string | null;
- openRegistrations: boolean | null;
- name: string | null;
- description: string | null;
- maintainerName: string | null;
- maintainerEmail: string | null;
- iconUrl: string | null;
- faviconUrl: string | null;
- themeColor: string | null;
- infoUpdatedAt: DateString | null;
-};
+type IDeleteAccountRequest = operations['i/delete-account']['requestBody']['content']['application/json'];
// @public (undocumented)
-type InstanceMetadata = LiteInstanceMetadata | DetailedInstanceMetadata;
+type IExportFollowingRequest = operations['i/export-following']['requestBody']['content']['application/json'];
// @public (undocumented)
-type Invite = {
- id: ID;
- code: string;
- expiresAt: DateString | null;
- createdAt: DateString;
- createdBy: UserLite | null;
- usedBy: UserLite | null;
- usedAt: DateString | null;
- used: boolean;
-};
+type IFavoritesRequest = operations['i/favorites']['requestBody']['content']['application/json'];
// @public (undocumented)
-type InviteLimit = {
- remaining: number;
-};
+type IFavoritesResponse = operations['i/favorites']['responses']['200']['content']['application/json'];
+
+// @public (undocumented)
+type IGalleryLikesRequest = operations['i/gallery/likes']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type IGalleryLikesResponse = operations['i/gallery/likes']['responses']['200']['content']['application/json'];
+
+// @public (undocumented)
+type IGalleryPostsRequest = operations['i/gallery/posts']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type IGalleryPostsResponse = operations['i/gallery/posts']['responses']['200']['content']['application/json'];
+
+// @public (undocumented)
+type IImportAntennasRequest = operations['i/import-antennas']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type IImportBlockingRequest = operations['i/import-blocking']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type IImportFollowingRequest = operations['i/import-following']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type IImportMutingRequest = operations['i/import-muting']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type IImportUserListsRequest = operations['i/import-user-lists']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type IMoveRequest = operations['i/move']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type IMoveResponse = operations['i/move']['responses']['200']['content']['application/json'];
+
+// @public (undocumented)
+type INotificationsGroupedRequest = operations['i/notifications-grouped']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type INotificationsGroupedResponse = operations['i/notifications-grouped']['responses']['200']['content']['application/json'];
+
+// @public (undocumented)
+type INotificationsRequest = operations['i/notifications']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type INotificationsResponse = operations['i/notifications']['responses']['200']['content']['application/json'];
+
+// @public (undocumented)
+type InviteCode = components['schemas']['InviteCode'];
+
+// @public (undocumented)
+type InviteCreateResponse = operations['invite/create']['responses']['200']['content']['application/json'];
+
+// @public (undocumented)
+type InviteDeleteRequest = operations['invite/delete']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type InviteLimitResponse = operations['invite/limit']['responses']['200']['content']['application/json'];
+
+// @public (undocumented)
+type InviteListRequest = operations['invite/list']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type InviteListResponse = operations['invite/list']['responses']['200']['content']['application/json'];
+
+// @public (undocumented)
+type IPageLikesRequest = operations['i/page-likes']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type IPageLikesResponse = operations['i/page-likes']['responses']['200']['content']['application/json'];
+
+// @public (undocumented)
+type IPagesRequest = operations['i/pages']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type IPagesResponse = operations['i/pages']['responses']['200']['content']['application/json'];
+
+// @public (undocumented)
+type IPinRequest = operations['i/pin']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type IPinResponse = operations['i/pin']['responses']['200']['content']['application/json'];
+
+// @public (undocumented)
+type IReadAnnouncementRequest = operations['i/read-announcement']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type IRegenerateTokenRequest = operations['i/regenerate-token']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type IRegistryGetAllRequest = operations['i/registry/get-all']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type IRegistryGetAllResponse = operations['i/registry/get-all']['responses']['200']['content']['application/json'];
+
+// @public (undocumented)
+type IRegistryGetDetailRequest = operations['i/registry/get-detail']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type IRegistryGetDetailResponse = operations['i/registry/get-detail']['responses']['200']['content']['application/json'];
+
+// @public (undocumented)
+type IRegistryGetRequest = operations['i/registry/get']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type IRegistryGetResponse = operations['i/registry/get']['responses']['200']['content']['application/json'];
+
+// @public (undocumented)
+type IRegistryKeysRequest = operations['i/registry/keys']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type IRegistryKeysWithTypeRequest = operations['i/registry/keys-with-type']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type IRegistryKeysWithTypeResponse = operations['i/registry/keys-with-type']['responses']['200']['content']['application/json'];
+
+// @public (undocumented)
+type IRegistryRemoveRequest = operations['i/registry/remove']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type IRegistryScopesWithDomainResponse = operations['i/registry/scopes-with-domain']['responses']['200']['content']['application/json'];
+
+// @public (undocumented)
+type IRegistrySetRequest = operations['i/registry/set']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type IResponse = operations['i']['responses']['200']['content']['application/json'];
+
+// @public (undocumented)
+type IRevokeTokenRequest = operations['i/revoke-token']['requestBody']['content']['application/json'];
// @public (undocumented)
function isAPIError(reason: any): reason is APIError;
// @public (undocumented)
-type LiteInstanceMetadata = {
- maintainerName: string | null;
- maintainerEmail: string | null;
- version: string;
- basedMisskeyVersion: string;
- name: string | null;
- shortName: string | null;
- uri: string;
- description: string | null;
- langs: string[];
- tosUrl: string | null;
- repositoryUrl: string;
- feedbackUrl: string;
- impressumUrl: string | null;
- privacyPolicyUrl: string | null;
- disableRegistration: boolean;
- disableLocalTimeline: boolean;
- disableGlobalTimeline: boolean;
- driveCapacityPerLocalUserMb: number;
- driveCapacityPerRemoteUserMb: number;
- emailRequiredForSignup: boolean;
- enableHcaptcha: boolean;
- hcaptchaSiteKey: string | null;
- enableRecaptcha: boolean;
- recaptchaSiteKey: string | null;
- enableTurnstile: boolean;
- turnstileSiteKey: string | null;
- swPublickey: string | null;
- themeColor: string | null;
- mascotImageUrl: string | null;
- bannerUrl: string | null;
- serverErrorImageUrl: string | null;
- infoImageUrl: string | null;
- notFoundImageUrl: string | null;
- iconUrl: string | null;
- backgroundImageUrl: string | null;
- logoImageUrl: string | null;
- maxNoteTextLength: number;
- enableEmail: boolean;
- enableTwitterIntegration: boolean;
- enableGithubIntegration: boolean;
- enableDiscordIntegration: boolean;
- enableServiceWorker: boolean;
- emojis: CustomEmoji[];
- defaultDarkTheme: string | null;
- defaultLightTheme: string | null;
- ads: {
- id: ID;
- ratio: number;
- place: string;
- url: string;
- imageUrl: string;
- }[];
- notesPerOneAd: number;
- translatorAvailable: boolean;
- serverRules: string[];
-};
+type ISigninHistoryRequest = operations['i/signin-history']['requestBody']['content']['application/json'];
// @public (undocumented)
-type MeDetailed = UserDetailed & {
- avatarId: DriveFile['id'];
- bannerId: DriveFile['id'];
- autoAcceptFollowed: boolean;
- alwaysMarkNsfw: boolean;
- carefulBot: boolean;
- emailNotificationTypes: string[];
- hasPendingReceivedFollowRequest: boolean;
- hasUnreadAnnouncement: boolean;
- hasUnreadAntenna: boolean;
- hasUnreadMentions: boolean;
- hasUnreadMessagingMessage: boolean;
- hasUnreadNotification: boolean;
- hasUnreadSpecifiedNotes: boolean;
- unreadNotificationsCount: number;
- hideOnlineStatus: boolean;
- injectFeaturedNote: boolean;
- integrations: Record;
- isDeleted: boolean;
- isExplorable: boolean;
- mutedWords: string[][];
- notificationRecieveConfig: {
- [notificationType in typeof notificationTypes_2[number]]?: {
- type: 'all';
- } | {
- type: 'never';
- } | {
- type: 'following';
- } | {
- type: 'follower';
- } | {
- type: 'mutualFollow';
- } | {
- type: 'list';
- userListId: string;
- };
- };
- noCrawle: boolean;
- receiveAnnouncementEmail: boolean;
- usePasswordLessLogin: boolean;
- unreadAnnouncements: Announcement[];
- twoFactorBackupCodesStock: 'full' | 'partial' | 'none';
- [other: string]: any;
-};
+type ISigninHistoryResponse = operations['i/signin-history']['responses']['200']['content']['application/json'];
// @public (undocumented)
-type MeDetailedWithSecret = MeDetailed & {
- email: string;
- emailVerified: boolean;
- securityKeysList: {
- id: string;
- name: string;
- lastUsed: string;
- }[];
-};
+type IUnpinRequest = operations['i/unpin']['requestBody']['content']['application/json'];
// @public (undocumented)
-type MeSignup = MeDetailedWithSecret & {
- token: string;
-};
+type IUnpinResponse = operations['i/unpin']['responses']['200']['content']['application/json'];
// @public (undocumented)
-type MessagingMessage = {
- id: ID;
- createdAt: DateString;
- file: DriveFile | null;
- fileId: DriveFile['id'] | null;
- isRead: boolean;
- reads: User['id'][];
- text: string | null;
- user: User;
- userId: User['id'];
- recipient?: User | null;
- recipientId: User['id'] | null;
- group?: UserGroup | null;
- groupId: UserGroup['id'] | null;
-};
+type IUpdateEmailRequest = operations['i/update-email']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type IUpdateEmailResponse = operations['i/update-email']['responses']['200']['content']['application/json'];
+
+// @public (undocumented)
+type IUpdateRequest = operations['i/update']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type IUpdateResponse = operations['i/update']['responses']['200']['content']['application/json'];
+
+// @public (undocumented)
+type IUserGroupInvitesRequest = operations['i/user-group-invites']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type IUserGroupInvitesResponse = operations['i/user-group-invites']['responses']['200']['content']['application/json'];
+
+// @public (undocumented)
+type IWebhooksCreateRequest = operations['i/webhooks/create']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type IWebhooksCreateResponse = operations['i/webhooks/create']['responses']['200']['content']['application/json'];
+
+// @public (undocumented)
+type IWebhooksDeleteRequest = operations['i/webhooks/delete']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type IWebhooksListResponse = operations['i/webhooks/list']['responses']['200']['content']['application/json'];
+
+// @public (undocumented)
+type IWebhooksShowRequest = operations['i/webhooks/show']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type IWebhooksShowResponse = operations['i/webhooks/show']['responses']['200']['content']['application/json'];
+
+// @public (undocumented)
+type IWebhooksUpdateRequest = operations['i/webhooks/update']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type MeDetailed = components['schemas']['MeDetailed'];
+
+// @public (undocumented)
+type MeDetailedOnly = components['schemas']['MeDetailedOnly'];
+
+// @public (undocumented)
+type MessagingHistoryRequest = operations['messaging/history']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type MessagingHistoryResponse = operations['messaging/history']['responses']['200']['content']['application/json'];
+
+// @public (undocumented)
+type MessagingMessage = components['schemas']['MessagingMessage'];
+
+// @public (undocumented)
+type MessagingMessagesCreateRequest = operations['messaging/messages/create']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type MessagingMessagesCreateResponse = operations['messaging/messages/create']['responses']['200']['content']['application/json'];
+
+// @public (undocumented)
+type MessagingMessagesDeleteRequest = operations['messaging/messages/delete']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type MessagingMessagesReadRequest = operations['messaging/messages/read']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type MessagingMessagesRequest = operations['messaging/messages']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type MessagingMessagesResponse = operations['messaging/messages']['responses']['200']['content']['application/json'];
+
+// @public (undocumented)
+type MetaRequest = operations['meta']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type MetaResponse = operations['meta']['responses']['200']['content']['application/json'];
+
+// @public (undocumented)
+type MiauthGenTokenRequest = operations['miauth/gen-token']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type MiauthGenTokenResponse = operations['miauth/gen-token']['responses']['200']['content']['application/json'];
// @public (undocumented)
type ModerationLog = {
@@ -2738,182 +2387,226 @@ type ModerationLog = {
} | {
type: 'resolveAbuseReport';
info: ModerationLogPayloads['resolveAbuseReport'];
+} | {
+ type: 'unsetUserAvatar';
+ info: ModerationLogPayloads['unsetUserAvatar'];
+} | {
+ type: 'unsetUserBanner';
+ info: ModerationLogPayloads['unsetUserBanner'];
});
// @public (undocumented)
-export const moderationLogTypes: readonly ["updateServerSettings", "suspend", "unsuspend", "updateUserNote", "addCustomEmoji", "updateCustomEmoji", "deleteCustomEmoji", "assignRole", "unassignRole", "createRole", "updateRole", "deleteRole", "clearQueue", "promoteQueue", "deleteDriveFile", "deleteNote", "createGlobalAnnouncement", "createUserAnnouncement", "updateGlobalAnnouncement", "updateUserAnnouncement", "deleteGlobalAnnouncement", "deleteUserAnnouncement", "resetPassword", "suspendRemoteInstance", "unsuspendRemoteInstance", "markSensitiveDriveFile", "unmarkSensitiveDriveFile", "resolveAbuseReport", "createInvitation", "createAd", "updateAd", "deleteAd", "createAvatarDecoration", "updateAvatarDecoration", "deleteAvatarDecoration"];
+export const moderationLogTypes: readonly ["updateServerSettings", "suspend", "unsuspend", "updateUserNote", "addCustomEmoji", "updateCustomEmoji", "deleteCustomEmoji", "assignRole", "unassignRole", "createRole", "updateRole", "deleteRole", "clearQueue", "promoteQueue", "deleteDriveFile", "deleteNote", "createGlobalAnnouncement", "createUserAnnouncement", "updateGlobalAnnouncement", "updateUserAnnouncement", "deleteGlobalAnnouncement", "deleteUserAnnouncement", "resetPassword", "suspendRemoteInstance", "unsuspendRemoteInstance", "markSensitiveDriveFile", "unmarkSensitiveDriveFile", "resolveAbuseReport", "createInvitation", "createAd", "updateAd", "deleteAd", "createAvatarDecoration", "updateAvatarDecoration", "deleteAvatarDecoration", "unsetUserAvatar", "unsetUserBanner"];
+
+// @public (undocumented)
+type MuteCreateRequest = operations['mute/create']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type MuteDeleteRequest = operations['mute/delete']['requestBody']['content']['application/json'];
// @public (undocumented)
export const mutedNoteReasons: readonly ["word", "manual", "spam", "other"];
// @public (undocumented)
-type Note = {
- id: ID;
- createdAt: DateString;
- updatedAt?: DateString | null;
- updatedAtHistory: DateString[] | null;
- noteEditHistory: string[];
- text: string | null;
- cw: string | null;
- user: User;
- userId: User['id'];
- reply?: Note;
- replyId: Note['id'];
- renote?: Note;
- renoteId: Note['id'];
- event?: {
- title: string;
- start: DateString;
- end: DateString | null;
- metadata: Record;
- };
- files: DriveFile[];
- fileIds: DriveFile['id'][];
- visibility: 'public' | 'home' | 'followers' | 'specified';
- visibleUserIds?: User['id'][];
- channel?: Channel;
- channelId?: Channel['id'];
- localOnly?: boolean;
- myReaction?: string;
- reactions: Record;
- renoteCount: number;
- repliesCount: number;
- clippedCount?: number;
- poll?: {
- expiresAt: DateString | null;
- multiple: boolean;
- choices: {
- isVoted: boolean;
- text: string;
- votes: number;
- }[];
- };
- emojis: {
- name: string;
- url: string;
- }[];
- uri?: string;
- url?: string;
- isHidden?: boolean;
-};
+type MuteListRequest = operations['mute/list']['requestBody']['content']['application/json'];
// @public (undocumented)
-type NoteFavorite = {
- id: ID;
- createdAt: DateString;
- noteId: Note['id'];
- note: Note;
-};
+type MuteListResponse = operations['mute/list']['responses']['200']['content']['application/json'];
// @public (undocumented)
-type NoteReaction = {
- id: ID;
- createdAt: DateString;
- user: UserLite;
- type: string;
-};
+type Muting = components['schemas']['Muting'];
+
+// @public (undocumented)
+type MyAppsRequest = operations['my/apps']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type MyAppsResponse = operations['my/apps']['responses']['200']['content']['application/json'];
+
+// @public (undocumented)
+type Note = components['schemas']['Note'];
+
+// @public (undocumented)
+type NoteFavorite = components['schemas']['NoteFavorite'];
+
+// @public (undocumented)
+type NoteReaction = components['schemas']['NoteReaction'];
+
+// @public (undocumented)
+type NotesChildrenRequest = operations['notes/children']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type NotesChildrenResponse = operations['notes/children']['responses']['200']['content']['application/json'];
+
+// @public (undocumented)
+type NotesClipsRequest = operations['notes/clips']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type NotesClipsResponse = operations['notes/clips']['responses']['200']['content']['application/json'];
+
+// @public (undocumented)
+type NotesConversationRequest = operations['notes/conversation']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type NotesConversationResponse = operations['notes/conversation']['responses']['200']['content']['application/json'];
+
+// @public (undocumented)
+type NotesCreateRequest = operations['notes/create']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type NotesCreateResponse = operations['notes/create']['responses']['200']['content']['application/json'];
+
+// @public (undocumented)
+type NotesDeleteRequest = operations['notes/delete']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type NotesEventsSearchRequest = operations['notes/events/search']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type NotesEventsSearchResponse = operations['notes/events/search']['responses']['200']['content']['application/json'];
+
+// @public (undocumented)
+type NotesFavoritesCreateRequest = operations['notes/favorites/create']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type NotesFavoritesDeleteRequest = operations['notes/favorites/delete']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type NotesFeaturedRequest = operations['notes/featured']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type NotesFeaturedResponse = operations['notes/featured']['responses']['200']['content']['application/json'];
+
+// @public (undocumented)
+type NotesGlobalTimelineRequest = operations['notes/global-timeline']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type NotesGlobalTimelineResponse = operations['notes/global-timeline']['responses']['200']['content']['application/json'];
+
+// @public (undocumented)
+type NotesHybridTimelineRequest = operations['notes/hybrid-timeline']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type NotesHybridTimelineResponse = operations['notes/hybrid-timeline']['responses']['200']['content']['application/json'];
+
+// @public (undocumented)
+type NotesLocalTimelineRequest = operations['notes/local-timeline']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type NotesLocalTimelineResponse = operations['notes/local-timeline']['responses']['200']['content']['application/json'];
+
+// @public (undocumented)
+type NotesMentionsRequest = operations['notes/mentions']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type NotesMentionsResponse = operations['notes/mentions']['responses']['200']['content']['application/json'];
+
+// @public (undocumented)
+type NotesPollsRecommendationRequest = operations['notes/polls/recommendation']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type NotesPollsRecommendationResponse = operations['notes/polls/recommendation']['responses']['200']['content']['application/json'];
+
+// @public (undocumented)
+type NotesPollsVoteRequest = operations['notes/polls/vote']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type NotesReactionsCreateRequest = operations['notes/reactions/create']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type NotesReactionsDeleteRequest = operations['notes/reactions/delete']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type NotesReactionsRequest = operations['notes/reactions']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type NotesReactionsResponse = operations['notes/reactions']['responses']['200']['content']['application/json'];
+
+// @public (undocumented)
+type NotesRenotesRequest = operations['notes/renotes']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type NotesRenotesResponse = operations['notes/renotes']['responses']['200']['content']['application/json'];
+
+// @public (undocumented)
+type NotesRepliesRequest = operations['notes/replies']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type NotesRepliesResponse = operations['notes/replies']['responses']['200']['content']['application/json'];
+
+// @public (undocumented)
+type NotesRequest = operations['notes']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type NotesResponse = operations['notes']['responses']['200']['content']['application/json'];
+
+// @public (undocumented)
+type NotesSearchByTagRequest = operations['notes/search-by-tag']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type NotesSearchByTagResponse = operations['notes/search-by-tag']['responses']['200']['content']['application/json'];
+
+// @public (undocumented)
+type NotesSearchRequest = operations['notes/search']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type NotesSearchResponse = operations['notes/search']['responses']['200']['content']['application/json'];
+
+// @public (undocumented)
+type NotesShowRequest = operations['notes/show']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type NotesShowResponse = operations['notes/show']['responses']['200']['content']['application/json'];
+
+// @public (undocumented)
+type NotesStateRequest = operations['notes/state']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type NotesStateResponse = operations['notes/state']['responses']['200']['content']['application/json'];
+
+// @public (undocumented)
+type NotesThreadMutingCreateRequest = operations['notes/thread-muting/create']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type NotesThreadMutingDeleteRequest = operations['notes/thread-muting/delete']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type NotesTimelineRequest = operations['notes/timeline']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type NotesTimelineResponse = operations['notes/timeline']['responses']['200']['content']['application/json'];
+
+// @public (undocumented)
+type NotesTranslateRequest = operations['notes/translate']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type NotesTranslateResponse = operations['notes/translate']['responses']['200']['content']['application/json'];
+
+// @public (undocumented)
+type NotesUnrenoteRequest = operations['notes/unrenote']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type NotesUpdateRequest = operations['notes/update']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type NotesUserListTimelineRequest = operations['notes/user-list-timeline']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type NotesUserListTimelineResponse = operations['notes/user-list-timeline']['responses']['200']['content']['application/json'];
// @public (undocumented)
export const noteVisibilities: readonly ["public", "home", "followers", "specified"];
// @public (undocumented)
-type Notification_2 = {
- id: ID;
- createdAt: DateString;
- isRead: boolean;
-} & ({
- type: 'reaction';
- reaction: string;
- user: User;
- userId: User['id'];
- note: Note;
-} | {
- type: 'reply';
- user: User;
- userId: User['id'];
- note: Note;
-} | {
- type: 'renote';
- user: User;
- userId: User['id'];
- note: Note;
-} | {
- type: 'quote';
- user: User;
- userId: User['id'];
- note: Note;
-} | {
- type: 'mention';
- user: User;
- userId: User['id'];
- note: Note;
-} | {
- type: 'note';
- user: User;
- userId: User['id'];
- note: Note;
-} | {
- type: 'pollEnded';
- user: User;
- userId: User['id'];
- note: Note;
-} | {
- type: 'follow';
- user: User;
- userId: User['id'];
-} | {
- type: 'followRequestAccepted';
- user: User;
- userId: User['id'];
-} | {
- type: 'receiveFollowRequest';
- user: User;
- userId: User['id'];
-} | {
- type: 'groupInvited';
- invitation: UserGroup;
- user: User;
- userId: User['id'];
-} | {
- type: 'achievementEarned';
- achievement: string;
-} | {
- type: 'app';
- header?: string | null;
- body: string;
- icon?: string | null;
-} | {
- type: 'test';
-});
+type Notification_2 = components['schemas']['Notification'];
// @public (undocumented)
-export const notificationTypes: readonly ["note", "follow", "mention", "reply", "renote", "quote", "reaction", "pollVote", "pollEnded", "receiveFollowRequest", "followRequestAccepted", "groupInvited", "app", "achievementEarned"];
+type NotificationsCreateRequest = operations['notifications/create']['requestBody']['content']['application/json'];
// @public (undocumented)
-type OriginType = 'combined' | 'local' | 'remote';
+export const notificationTypes: readonly ["note", "follow", "mention", "reply", "renote", "quote", "reaction", "pollVote", "pollEnded", "receiveFollowRequest", "followRequestAccepted", "groupInvited", "app", "roleAssigned", "achievementEarned"];
// @public (undocumented)
-type Page = {
- id: ID;
- createdAt: DateString;
- updatedAt: DateString;
- userId: User['id'];
- user: User;
- content: Record[];
- variables: Record[];
- title: string;
- name: string;
- summary: string | null;
- hideTitleWhenPinned: boolean;
- alignCenter: boolean;
- font: string;
- script: string;
- eyeCatchingImageId: DriveFile['id'] | null;
- eyeCatchingImage: DriveFile | null;
- attachedFiles: any;
- likedCount: number;
- isLiked?: boolean;
-};
+type Page = components['schemas']['Page'];
// @public (undocumented)
type PageEvent = {
@@ -2924,47 +2617,152 @@ type PageEvent = {
user: User;
};
+// @public (undocumented)
+type PagePushRequest = operations['page-push']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type PagesCreateRequest = operations['pages/create']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type PagesCreateResponse = operations['pages/create']['responses']['200']['content']['application/json'];
+
+// @public (undocumented)
+type PagesDeleteRequest = operations['pages/delete']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type PagesFeaturedResponse = operations['pages/featured']['responses']['200']['content']['application/json'];
+
+// @public (undocumented)
+type PagesLikeRequest = operations['pages/like']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type PagesShowRequest = operations['pages/show']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type PagesShowResponse = operations['pages/show']['responses']['200']['content']['application/json'];
+
+// @public (undocumented)
+type PagesUnlikeRequest = operations['pages/unlike']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type PagesUpdateRequest = operations['pages/update']['requestBody']['content']['application/json'];
+
// @public (undocumented)
function parse(acct: string): Acct;
// @public (undocumented)
-export const permissions: string[];
+export const permissions: readonly ["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", "read:flash", "write:flash", "read:flash-likes", "write:flash-likes", "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"];
// @public (undocumented)
-type ServerInfo = {
- machine: string;
- cpu: {
- model: string;
- cores: number;
+type PingResponse = operations['ping']['responses']['200']['content']['application/json'];
+
+// @public (undocumented)
+type PinnedUsersResponse = operations['pinned-users']['responses']['200']['content']['application/json'];
+
+// @public (undocumented)
+type PromoReadRequest = operations['promo/read']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type QueueCount = components['schemas']['QueueCount'];
+
+// @public (undocumented)
+type QueueStats = {
+ deliver: {
+ activeSincePrevTick: number;
+ active: number;
+ waiting: number;
+ delayed: number;
};
+ inbox: {
+ activeSincePrevTick: number;
+ active: number;
+ waiting: number;
+ delayed: number;
+ };
+};
+
+// @public (undocumented)
+type QueueStatsLog = string[];
+
+// @public (undocumented)
+type RenoteMuteCreateRequest = operations['renote-mute/create']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type RenoteMuteDeleteRequest = operations['renote-mute/delete']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type RenoteMuteListRequest = operations['renote-mute/list']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type RenoteMuteListResponse = operations['renote-mute/list']['responses']['200']['content']['application/json'];
+
+// @public (undocumented)
+type RenoteMuting = components['schemas']['RenoteMuting'];
+
+// @public (undocumented)
+type RequestResetPasswordRequest = operations['request-reset-password']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type ResetPasswordRequest = operations['reset-password']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type RetentionResponse = operations['retention']['responses']['200']['content']['application/json'];
+
+// @public (undocumented)
+type Role = components['schemas']['Role'];
+
+// @public (undocumented)
+type RoleLite = components['schemas']['RoleLite'];
+
+// @public (undocumented)
+type RolesListResponse = operations['roles/list']['responses']['200']['content']['application/json'];
+
+// @public (undocumented)
+type RolesNotesRequest = operations['roles/notes']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type RolesNotesResponse = operations['roles/notes']['responses']['200']['content']['application/json'];
+
+// @public (undocumented)
+type RolesShowRequest = operations['roles/show']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type RolesShowResponse = operations['roles/show']['responses']['200']['content']['application/json'];
+
+// @public (undocumented)
+type RolesUsersRequest = operations['roles/users']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type RolesUsersResponse = operations['roles/users']['responses']['200']['content']['application/json'];
+
+// @public (undocumented)
+type ServerInfoResponse = operations['server-info']['responses']['200']['content']['application/json'];
+
+// @public (undocumented)
+type ServerStats = {
+ cpu: number;
mem: {
- total: number;
+ used: number;
+ active: number;
+ };
+ net: {
+ rx: number;
+ tx: number;
};
fs: {
- total: number;
- used: number;
+ r: number;
+ w: number;
};
};
// @public (undocumented)
-type Signin = {
- id: ID;
- createdAt: DateString;
- ip: string;
- headers: Record;
- success: boolean;
-};
+type ServerStatsLog = string[];
// @public (undocumented)
-type Stats = {
- notesCount: number;
- originalNotesCount: number;
- usersCount: number;
- originalUsersCount: number;
- instances: number;
- driveUsageLocal: number;
- driveUsageRemote: number;
-};
+type Signin = components['schemas']['Signin'];
+
+// @public (undocumented)
+type StatsResponse = operations['stats']['responses']['200']['content']['application/json'];
// Warning: (ae-forgotten-export) The symbol "StreamEvents" needs to be exported by the entry point index.d.ts
//
@@ -3005,114 +2803,295 @@ export class Stream extends EventEmitter {
useChannel(channel: C, params?: Channels[C]['params'], name?: string): ChannelConnection;
}
+// Warning: (ae-forgotten-export) The symbol "SwitchCase" needs to be exported by the entry point index.d.ts
+// Warning: (ae-forgotten-export) The symbol "IsCaseMatched" needs to be exported by the entry point index.d.ts
+// Warning: (ae-forgotten-export) The symbol "GetCaseResult" needs to be exported by the entry point index.d.ts
+//
+// @public (undocumented)
+type SwitchCaseResponseType = Endpoints[E]['res'] extends SwitchCase ? IsCaseMatched extends true ? GetCaseResult : IsCaseMatched extends true ? GetCaseResult : IsCaseMatched extends true ? GetCaseResult : IsCaseMatched extends true ? GetCaseResult : IsCaseMatched