mirror of
https://activitypub.software/TransFem-org/Sharkey.git
synced 2024-12-13 17:30:45 +01:00
バックエンドが生成するapi.jsonからmisskey-jsの型を作成する (#12434)
* ひとまず生成できるところまで * ファイル構成整理 * 生成コマンド整理 * misskey-jsへの組み込み * fix generator.ts * wip * fix generator.ts * fix package.json * 生成ロジックの調整 * 型レベルでのswitch-case機構をmisskey-jsからfrontendに持ち込めるようにした * 型チェック用のtsconfig.jsonを作成 * 他のエンドポイントを呼ぶ関数にも適用 * 未使用エンティティなどを削除 * misskey-js側で手動定義されていた型を自動生成された型に移行(ただしapi.jsonがvalidでなくなってしまったので後で修正する) * messagingは廃止されている(テストのビルドエラー解消) * validなapi.jsonを出力できるように修正 * 修正漏れ対応 * Ajvに怒られて起動できなかったところを修正 * fix ci(途中) * パラメータenumをやめる * add command * add api.json * 都度自動生成をやめる * 一気通貫スクリプト修正 * fix ci * 生成ロジック修正 * フロントの型チェックは結局やらなかったので戻しておく * fix pnpm-lock.yaml * add README.md --------- Co-authored-by: osamu <46447427+sam-osamu@users.noreply.github.com> Co-authored-by: syuilo <Syuilotan@yahoo.co.jp>
This commit is contained in:
parent
92029ac325
commit
336416261a
42 changed files with 27053 additions and 3964 deletions
|
@ -18,6 +18,7 @@
|
|||
"build-assets": "node ./scripts/build-assets.mjs",
|
||||
"build": "pnpm build-pre && pnpm -r build && pnpm build-assets",
|
||||
"build-storybook": "pnpm --filter frontend build-storybook",
|
||||
"build-misskey-js-with-types": "pnpm --filter backend build && pnpm --filter backend generate-api-json && ncp packages/backend/built/api.json packages/misskey-js/generator/api.json && pnpm --filter misskey-js update-autogen-code && pnpm --filter misskey-js build",
|
||||
"start": "pnpm check:connect && cd packages/backend && node ./built/boot/entry.js",
|
||||
"start:test": "cd packages/backend && cross-env NODE_ENV=test node ./built/boot/entry.js",
|
||||
"init": "pnpm migrate",
|
||||
|
@ -57,7 +58,8 @@
|
|||
"cross-env": "7.0.3",
|
||||
"cypress": "13.6.0",
|
||||
"eslint": "8.54.0",
|
||||
"start-server-and-test": "2.0.3"
|
||||
"start-server-and-test": "2.0.3",
|
||||
"ncp": "2.0.0"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"@tensorflow/tfjs-core": "4.4.0"
|
||||
|
|
|
@ -327,6 +327,82 @@ export const meta = {
|
|||
type: 'number',
|
||||
optional: false, nullable: false,
|
||||
},
|
||||
backgroundImageUrl: {
|
||||
type: 'string',
|
||||
optional: false, nullable: true,
|
||||
},
|
||||
deeplAuthKey: {
|
||||
type: 'string',
|
||||
optional: false, nullable: true,
|
||||
},
|
||||
deeplIsPro: {
|
||||
type: 'boolean',
|
||||
optional: false, nullable: false,
|
||||
},
|
||||
defaultDarkTheme: {
|
||||
type: 'string',
|
||||
optional: false, nullable: true,
|
||||
},
|
||||
defaultLightTheme: {
|
||||
type: 'string',
|
||||
optional: false, nullable: true,
|
||||
},
|
||||
description: {
|
||||
type: 'string',
|
||||
optional: false, nullable: true,
|
||||
},
|
||||
disableRegistration: {
|
||||
type: 'boolean',
|
||||
optional: false, nullable: false,
|
||||
},
|
||||
impressumUrl: {
|
||||
type: 'string',
|
||||
optional: false, nullable: true,
|
||||
},
|
||||
maintainerEmail: {
|
||||
type: 'string',
|
||||
optional: false, nullable: true,
|
||||
},
|
||||
maintainerName: {
|
||||
type: 'string',
|
||||
optional: false, nullable: true,
|
||||
},
|
||||
name: {
|
||||
type: 'string',
|
||||
optional: false, nullable: true,
|
||||
},
|
||||
objectStorageS3ForcePathStyle: {
|
||||
type: 'boolean',
|
||||
optional: false, nullable: false,
|
||||
},
|
||||
privacyPolicyUrl: {
|
||||
type: 'string',
|
||||
optional: false, nullable: true,
|
||||
},
|
||||
repositoryUrl: {
|
||||
type: 'string',
|
||||
optional: false, nullable: false,
|
||||
},
|
||||
summalyProxy: {
|
||||
type: 'string',
|
||||
optional: false, nullable: true,
|
||||
},
|
||||
themeColor: {
|
||||
type: 'string',
|
||||
optional: false, nullable: true,
|
||||
},
|
||||
tosUrl: {
|
||||
type: 'string',
|
||||
optional: false, nullable: true,
|
||||
},
|
||||
uri: {
|
||||
type: 'string',
|
||||
optional: false, nullable: false,
|
||||
},
|
||||
version: {
|
||||
type: 'string',
|
||||
optional: false, nullable: false,
|
||||
},
|
||||
},
|
||||
},
|
||||
} as const;
|
||||
|
|
|
@ -36,13 +36,32 @@ export const paramDef = {
|
|||
blocked: { type: 'boolean', nullable: true },
|
||||
notResponding: { type: 'boolean', nullable: true },
|
||||
suspended: { type: 'boolean', nullable: true },
|
||||
silenced: { type: "boolean", nullable: true },
|
||||
silenced: { type: 'boolean', nullable: true },
|
||||
federating: { type: 'boolean', nullable: true },
|
||||
subscribing: { type: 'boolean', nullable: true },
|
||||
publishing: { type: 'boolean', nullable: true },
|
||||
limit: { type: 'integer', minimum: 1, maximum: 100, default: 30 },
|
||||
offset: { type: 'integer', default: 0 },
|
||||
sort: { type: 'string' },
|
||||
sort: {
|
||||
type: 'string',
|
||||
nullable: true,
|
||||
enum: [
|
||||
'+pubSub',
|
||||
'-pubSub',
|
||||
'+notes',
|
||||
'-notes',
|
||||
'+users',
|
||||
'-users',
|
||||
'+following',
|
||||
'-following',
|
||||
'+followers',
|
||||
'-followers',
|
||||
'+firstRetrievedAt',
|
||||
'-firstRetrievedAt',
|
||||
'+latestRequestReceivedAt',
|
||||
'-latestRequestReceivedAt',
|
||||
],
|
||||
},
|
||||
},
|
||||
required: [],
|
||||
} as const;
|
||||
|
@ -103,18 +122,18 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
|||
}
|
||||
}
|
||||
|
||||
if (typeof ps.silenced === "boolean") {
|
||||
if (typeof ps.silenced === 'boolean') {
|
||||
const meta = await this.metaService.fetch(true);
|
||||
|
||||
if (ps.silenced) {
|
||||
if (meta.silencedHosts.length === 0) {
|
||||
return [];
|
||||
}
|
||||
query.andWhere("instance.host IN (:...silences)", {
|
||||
query.andWhere('instance.host IN (:...silences)', {
|
||||
silences: meta.silencedHosts,
|
||||
});
|
||||
} else if (meta.silencedHosts.length > 0) {
|
||||
query.andWhere("instance.host NOT IN (:...silences)", {
|
||||
query.andWhere('instance.host NOT IN (:...silences)', {
|
||||
silences: meta.silencedHosts,
|
||||
});
|
||||
}
|
||||
|
|
|
@ -250,6 +250,33 @@ export const meta = {
|
|||
},
|
||||
},
|
||||
},
|
||||
backgroundImageUrl: {
|
||||
type: 'string',
|
||||
optional: false, nullable: true,
|
||||
},
|
||||
impressumUrl: {
|
||||
type: 'string',
|
||||
optional: false, nullable: true,
|
||||
},
|
||||
logoImageUrl: {
|
||||
type: 'string',
|
||||
optional: false, nullable: true,
|
||||
},
|
||||
privacyPolicyUrl: {
|
||||
type: 'string',
|
||||
optional: false, nullable: true,
|
||||
},
|
||||
serverRules: {
|
||||
type: 'array',
|
||||
optional: false, nullable: false,
|
||||
items: {
|
||||
type: 'string',
|
||||
},
|
||||
},
|
||||
themeColor: {
|
||||
type: 'string',
|
||||
optional: false, nullable: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
} as const;
|
||||
|
|
|
@ -149,7 +149,7 @@ const size = computed(() => props.asReactionPicker ? reactionPickerSize.value :
|
|||
const width = computed(() => props.asReactionPicker ? reactionPickerWidth.value : 3);
|
||||
const height = computed(() => props.asReactionPicker ? reactionPickerHeight.value : 2);
|
||||
const q = ref<string>('');
|
||||
const searchResultCustom = ref<Misskey.entities.CustomEmoji[]>([]);
|
||||
const searchResultCustom = ref<Misskey.entities.EmojiSimple[]>([]);
|
||||
const searchResultUnicode = ref<UnicodeEmojiDef[]>([]);
|
||||
const tab = ref<'index' | 'custom' | 'unicode' | 'tags'>('index');
|
||||
|
||||
|
@ -196,7 +196,7 @@ watch(q, () => {
|
|||
const searchCustom = () => {
|
||||
const max = 100;
|
||||
const emojis = customEmojis.value;
|
||||
const matches = new Set<Misskey.entities.CustomEmoji>();
|
||||
const matches = new Set<Misskey.entities.EmojiSimple>();
|
||||
|
||||
const exactMatch = emojis.find(emoji => emoji.name === newQ);
|
||||
if (exactMatch) matches.add(exactMatch);
|
||||
|
@ -326,7 +326,7 @@ watch(q, () => {
|
|||
searchResultUnicode.value = Array.from(searchUnicode());
|
||||
});
|
||||
|
||||
function filterAvailable(emoji: Misskey.entities.CustomEmoji): boolean {
|
||||
function filterAvailable(emoji: Misskey.entities.EmojiSimple): boolean {
|
||||
return (emoji.roleIdsThatCanBeUsedThisEmojiAsReaction == null || emoji.roleIdsThatCanBeUsedThisEmojiAsReaction.length === 0) || ($i && $i.roles.some(r => emoji.roleIdsThatCanBeUsedThisEmojiAsReaction.includes(r.id)));
|
||||
}
|
||||
|
||||
|
@ -343,7 +343,7 @@ function reset() {
|
|||
q.value = '';
|
||||
}
|
||||
|
||||
function getKey(emoji: string | Misskey.entities.CustomEmoji | UnicodeEmojiDef): string {
|
||||
function getKey(emoji: string | Misskey.entities.EmojiSimple | UnicodeEmojiDef): string {
|
||||
return typeof emoji === 'string' ? emoji : 'char' in emoji ? emoji.char : `:${emoji.name}:`;
|
||||
}
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@ import { ref } from 'vue';
|
|||
import * as Misskey from 'misskey-js';
|
||||
import * as os from '@/os.js';
|
||||
|
||||
const meta = ref<Misskey.entities.DetailedInstanceMetadata>();
|
||||
const meta = ref<Misskey.entities.MetaResponse>();
|
||||
|
||||
os.api('meta', { detail: true }).then(gotMeta => {
|
||||
meta.value = gotMeta;
|
||||
|
|
|
@ -21,15 +21,15 @@ import * as os from '@/os.js';
|
|||
import { getProxiedImageUrlNullable } from '@/scripts/media-proxy.js';
|
||||
|
||||
const props = defineProps<{
|
||||
instance: Misskey.entities.Instance;
|
||||
instance: Misskey.entities.FederationInstance;
|
||||
}>();
|
||||
|
||||
let chartValues = $ref<number[] | null>(null);
|
||||
|
||||
os.apiGet('charts/instance', { host: props.instance.host, limit: 16 + 1, span: 'day' }).then(res => {
|
||||
// 今日のぶんの値はまだ途中の値であり、それも含めると大抵の場合前日よりも下降しているようなグラフになってしまうため今日は弾く
|
||||
res.requests.received.splice(0, 1);
|
||||
chartValues = res.requests.received;
|
||||
res['requests.received'].splice(0, 1);
|
||||
chartValues = res['requests.received'];
|
||||
});
|
||||
|
||||
function getInstanceIcon(instance): string {
|
||||
|
|
|
@ -67,7 +67,7 @@ import { i18n } from '@/i18n.js';
|
|||
import * as os from '@/os.js';
|
||||
|
||||
const props = defineProps<{
|
||||
invite: Misskey.entities.Invite;
|
||||
invite: Misskey.entities.InviteCode;
|
||||
moderator?: boolean;
|
||||
}>();
|
||||
|
||||
|
|
|
@ -67,15 +67,14 @@ import number from '@/filters/number.js';
|
|||
import MkNumber from '@/components/MkNumber.vue';
|
||||
import XActiveUsersChart from '@/components/MkVisitorDashboard.ActiveUsersChart.vue';
|
||||
|
||||
let meta = $ref<Misskey.entities.Instance>();
|
||||
let stats = $ref(null);
|
||||
let meta = $ref<Misskey.entities.MetaResponse | null>(null);
|
||||
let stats = $ref<Misskey.entities.StatsResponse | null>(null);
|
||||
|
||||
os.api('meta', { detail: true }).then(_meta => {
|
||||
meta = _meta;
|
||||
});
|
||||
|
||||
os.api('stats', {
|
||||
}).then((res) => {
|
||||
os.api('stats', {}).then((res) => {
|
||||
stats = res;
|
||||
});
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@ import { useStream } from '@/stream.js';
|
|||
import { get, set } from '@/scripts/idb-proxy.js';
|
||||
|
||||
const storageCache = await get('emojis');
|
||||
export const customEmojis = shallowRef<Misskey.entities.CustomEmoji[]>(Array.isArray(storageCache) ? storageCache : []);
|
||||
export const customEmojis = shallowRef<Misskey.entities.EmojiSimple[]>(Array.isArray(storageCache) ? storageCache : []);
|
||||
export const customEmojiCategories = computed<[ ...string[], null ]>(() => {
|
||||
const categories = new Set<string>();
|
||||
for (const emoji of customEmojis.value) {
|
||||
|
@ -21,7 +21,7 @@ export const customEmojiCategories = computed<[ ...string[], null ]>(() => {
|
|||
return markRaw([...Array.from(categories), null]);
|
||||
});
|
||||
|
||||
export const customEmojisMap = new Map<string, Misskey.entities.CustomEmoji>();
|
||||
export const customEmojisMap = new Map<string, Misskey.entities.EmojiSimple>();
|
||||
watch(customEmojis, emojis => {
|
||||
customEmojisMap.clear();
|
||||
for (const emoji of emojis) {
|
||||
|
@ -38,7 +38,7 @@ stream.on('emojiAdded', emojiData => {
|
|||
});
|
||||
|
||||
stream.on('emojiUpdated', emojiData => {
|
||||
customEmojis.value = customEmojis.value.map(item => emojiData.emojis.find(search => search.name === item.name) as Misskey.entities.CustomEmoji ?? item);
|
||||
customEmojis.value = customEmojis.value.map(item => emojiData.emojis.find(search => search.name === item.name) as Misskey.entities.EmojiSimple ?? item);
|
||||
set('emojis', customEmojis.value);
|
||||
});
|
||||
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
|
||||
import * as Misskey from 'misskey-js';
|
||||
import * as Misskey from 'misskey-js';
|
||||
import { url } from '@/config.js';
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@ const cached = miLocalStorage.getItem('instance');
|
|||
|
||||
// TODO: instanceをリアクティブにするかは再考の余地あり
|
||||
|
||||
export const instance: Misskey.entities.InstanceMetadata = reactive(cached ? JSON.parse(cached) : {
|
||||
export const instance: Misskey.entities.MetaResponse = reactive(cached ? JSON.parse(cached) : {
|
||||
// TODO: set default values
|
||||
});
|
||||
|
||||
|
|
|
@ -44,7 +44,7 @@ const props = withDefaults(defineProps<{
|
|||
|
||||
let loaded = $ref(false);
|
||||
let serverIsDead = $ref(false);
|
||||
let meta = $ref<Misskey.entities.LiteInstanceMetadata | null>(null);
|
||||
let meta = $ref<Misskey.entities.MetaResponse | null>(null);
|
||||
|
||||
os.api('meta', {
|
||||
detail: false,
|
||||
|
|
|
@ -48,7 +48,7 @@ import { $i } from '@/account.js';
|
|||
|
||||
const customEmojiTags = getCustomEmojiTags();
|
||||
let q = $ref('');
|
||||
let searchEmojis = $ref<Misskey.entities.CustomEmoji[]>(null);
|
||||
let searchEmojis = $ref<Misskey.entities.EmojiSimple[]>(null);
|
||||
let selectedTags = $ref(new Set());
|
||||
|
||||
function search() {
|
||||
|
|
|
@ -27,7 +27,7 @@ import * as os from '@/os.js';
|
|||
import { i18n } from '@/i18n.js';
|
||||
|
||||
const props = defineProps<{
|
||||
session: Misskey.entities.AuthSession;
|
||||
session: Misskey.entities.AuthSessionShowResponse;
|
||||
}>();
|
||||
|
||||
const emit = defineEmits<{
|
||||
|
|
|
@ -56,7 +56,7 @@ const props = defineProps<{
|
|||
}>();
|
||||
|
||||
let state = $ref<'waiting' | 'accepted' | 'fetch-session-error' | 'denied' | null>(null);
|
||||
let session = $ref<Misskey.entities.AuthSession | null>(null);
|
||||
let session = $ref<Misskey.entities.AuthSessionShowResponse | null>(null);
|
||||
|
||||
function accepted() {
|
||||
state = 'accepted';
|
||||
|
|
|
@ -144,8 +144,8 @@ const props = defineProps<{
|
|||
|
||||
let tab = $ref('overview');
|
||||
let chartSrc = $ref('instance-requests');
|
||||
let meta = $ref<Misskey.entities.AdminInstanceMetadata | null>(null);
|
||||
let instance = $ref<Misskey.entities.Instance | null>(null);
|
||||
let meta = $ref<Misskey.entities.AdminMetaResponse | null>(null);
|
||||
let instance = $ref<Misskey.entities.FederationInstance | null>(null);
|
||||
let suspended = $ref(false);
|
||||
let isBlocked = $ref(false);
|
||||
let isSilenced = $ref(false);
|
||||
|
@ -169,10 +169,10 @@ async function fetch(): Promise<void> {
|
|||
instance = await os.api('federation/show-instance', {
|
||||
host: props.host,
|
||||
});
|
||||
suspended = instance.isSuspended;
|
||||
isBlocked = instance.isBlocked;
|
||||
isSilenced = instance.isSilenced;
|
||||
faviconUrl = getProxiedImageUrlNullable(instance.faviconUrl, 'preview') ?? getProxiedImageUrlNullable(instance.iconUrl, 'preview');
|
||||
suspended = instance?.isSuspended ?? false;
|
||||
isBlocked = instance?.isBlocked ?? false;
|
||||
isSilenced = instance?.isSilenced ?? false;
|
||||
faviconUrl = getProxiedImageUrlNullable(instance?.faviconUrl, 'preview') ?? getProxiedImageUrlNullable(instance?.iconUrl, 'preview');
|
||||
}
|
||||
|
||||
async function toggleBlock(): Promise<void> {
|
||||
|
@ -188,8 +188,9 @@ async function toggleSilenced(): Promise<void> {
|
|||
if (!meta) throw new Error('No meta?');
|
||||
if (!instance) throw new Error('No instance?');
|
||||
const { host } = instance;
|
||||
const silencedHosts = meta.silencedHosts ?? [];
|
||||
await os.api('admin/update-meta', {
|
||||
silencedHosts: isSilenced ? meta.silencedHosts.concat([host]) : meta.silencedHosts.filter(x => x !== host),
|
||||
silencedHosts: isSilenced ? silencedHosts.concat([host]) : silencedHosts.filter(x => x !== host),
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
<MkPagination ref="pagingComponent" :pagination="pagination">
|
||||
<template #default="{ items }">
|
||||
<div class="_gaps_s">
|
||||
<MkInviteCode v-for="item in (items as Misskey.entities.Invite[])" :key="item.id" :invite="item" :onDeleted="deleted"/>
|
||||
<MkInviteCode v-for="item in (items as Misskey.entities.InviteCode[])" :key="item.id" :invite="item" :onDeleted="deleted"/>
|
||||
</div>
|
||||
</template>
|
||||
</MkPagination>
|
||||
|
|
|
@ -48,11 +48,15 @@ import MkNumber from '@/components/MkNumber.vue';
|
|||
import MkVisitorDashboard from '@/components/MkVisitorDashboard.vue';
|
||||
import { getProxiedImageUrl } from '@/scripts/media-proxy.js';
|
||||
|
||||
let meta = $ref<Misskey.entities.Instance>();
|
||||
let instances = $ref<any[]>();
|
||||
let meta = $ref<Misskey.entities.MetaResponse>();
|
||||
let instances = $ref<Misskey.entities.FederationInstance[]>();
|
||||
|
||||
function getInstanceIcon(instance): string {
|
||||
return getProxiedImageUrl(instance.iconUrl, 'preview');
|
||||
function getInstanceIcon(instance: Misskey.entities.FederationInstance): string {
|
||||
if (!instance.iconUrl) {
|
||||
return '';
|
||||
}
|
||||
|
||||
return getProxiedImageUrl(instance.iconUrl, 'preview');
|
||||
}
|
||||
|
||||
os.api('meta', { detail: true }).then(_meta => {
|
||||
|
|
|
@ -10,7 +10,12 @@ import { $i } from '@/account.js';
|
|||
export const pendingApiRequestsCount = ref(0);
|
||||
|
||||
// Implements Misskey.api.ApiClient.request
|
||||
export function api<E extends keyof Misskey.Endpoints, P extends Misskey.Endpoints[E]['req']>(endpoint: E, data: P = {} as any, token?: string | null | undefined, signal?: AbortSignal): Promise<Misskey.Endpoints[E]['res']> {
|
||||
export function api<E extends keyof Misskey.Endpoints, P extends Misskey.Endpoints[E]['req']>(
|
||||
endpoint: E,
|
||||
data: P = {} as any,
|
||||
token?: string | null | undefined,
|
||||
signal?: AbortSignal,
|
||||
): Promise<Misskey.api.SwitchCaseResponseType<E, P>> {
|
||||
if (endpoint.includes('://')) throw new Error('invalid endpoint');
|
||||
pendingApiRequestsCount.value++;
|
||||
|
||||
|
@ -51,7 +56,12 @@ export function api<E extends keyof Misskey.Endpoints, P extends Misskey.Endpoin
|
|||
return promise;
|
||||
}
|
||||
|
||||
export function apiExternal<E extends keyof Misskey.Endpoints, P extends Misskey.Endpoints[E]['req']>(hostUrl: string, endpoint: E, data: P = {} as any, token?: string | null | undefined, signal?: AbortSignal): Promise<Misskey.Endpoints[E]['res']> {
|
||||
export function apiExternal<E extends keyof Misskey.Endpoints, P extends Misskey.Endpoints[E]['req']>(
|
||||
hostUrl: string,
|
||||
endpoint: E, data: P = {} as any,
|
||||
token?: string | null | undefined,
|
||||
signal?: AbortSignal,
|
||||
): Promise<Misskey.api.SwitchCaseResponseType<E, P>> {
|
||||
if (!/^https?:\/\//.test(hostUrl)) throw new Error('invalid host name');
|
||||
if (endpoint.includes('://')) throw new Error('invalid endpoint');
|
||||
pendingApiRequestsCount.value++;
|
||||
|
@ -95,7 +105,10 @@ export function apiExternal<E extends keyof Misskey.Endpoints, P extends Misskey
|
|||
}
|
||||
|
||||
// Implements Misskey.api.ApiClient.request
|
||||
export function apiGet <E extends keyof Misskey.Endpoints, P extends Misskey.Endpoints[E]['req']>(endpoint: E, data: P = {} as any): Promise<Misskey.Endpoints[E]['res']> {
|
||||
export function apiGet<E extends keyof Misskey.Endpoints, P extends Misskey.Endpoints[E]['req']>(
|
||||
endpoint: E,
|
||||
data: P = {} as any,
|
||||
): Promise<Misskey.api.SwitchCaseResponseType<E, P>> {
|
||||
pendingApiRequestsCount.value++;
|
||||
|
||||
const onFinally = () => {
|
||||
|
|
|
@ -47,7 +47,7 @@ const props = defineProps<{
|
|||
refreshIntervalSec?: number;
|
||||
}>();
|
||||
|
||||
const instances = ref<Misskey.entities.Instance[]>([]);
|
||||
const instances = ref<Misskey.entities.FederationInstance[]>([]);
|
||||
const fetching = ref(true);
|
||||
let key = $ref(0);
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load diff
9
packages/misskey-js/generator/.eslintrc.cjs
Normal file
9
packages/misskey-js/generator/.eslintrc.cjs
Normal file
|
@ -0,0 +1,9 @@
|
|||
module.exports = {
|
||||
parserOptions: {
|
||||
tsconfigRootDir: __dirname,
|
||||
project: ['./tsconfig.json'],
|
||||
},
|
||||
extends: [
|
||||
'../../shared/.eslintrc.js',
|
||||
],
|
||||
};
|
1
packages/misskey-js/generator/.gitignore
vendored
Normal file
1
packages/misskey-js/generator/.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
api.json
|
19
packages/misskey-js/generator/README.md
Normal file
19
packages/misskey-js/generator/README.md
Normal file
|
@ -0,0 +1,19 @@
|
|||
## misskey-js向け型生成モジュール
|
||||
|
||||
バックエンドが吐き出すOpenAPI準拠のapi.jsonからmisskey-jsで使用される型エイリアスを生成するためのモジュールです。
|
||||
このモジュールはmisskey-jsそのものにバンドルされることは想定しておらず、生成物をmisskey-jsのsrc配下にコピーして使用することを想定しています。
|
||||
|
||||
## 使い方
|
||||
|
||||
まず、Misskeyのバックエンドからapi.jsonを取得する必要があります。任意のMisskeyインスタンスの/api-docからダウンロードしても良いですし、
|
||||
backendモジュール配下で`pnpm generate-api-json`を実行しても良いでしょう。
|
||||
|
||||
api.jsonを入手したら、このファイルがあるディレクトリに置いてください。
|
||||
|
||||
その後、以下コマンドを実行します。
|
||||
|
||||
```shell
|
||||
pnpm generate
|
||||
```
|
||||
|
||||
上記を実行することで、`./built`ディレクトリ配下にtsファイルが生成されます。
|
24
packages/misskey-js/generator/package.json
Normal file
24
packages/misskey-js/generator/package.json
Normal file
|
@ -0,0 +1,24 @@
|
|||
{
|
||||
"name": "misskey-js-type-generator",
|
||||
"version": "0.0.0",
|
||||
"description": "Misskey TypeGenerator",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"generate": "tsx src/generator.ts && eslint ./built/**/* --ext .ts --fix"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@apidevtools/swagger-parser": "10.1.0",
|
||||
"@types/node": "20.9.1",
|
||||
"@typescript-eslint/eslint-plugin": "6.11.0",
|
||||
"@typescript-eslint/parser": "6.11.0",
|
||||
"eslint": "8.53.0",
|
||||
"typescript": "5.3.2",
|
||||
"tsx": "4.4.0",
|
||||
"ts-case-convert": "2.0.2",
|
||||
"openapi-types": "12.1.3",
|
||||
"openapi-typescript": "6.7.1"
|
||||
},
|
||||
"files": [
|
||||
"built"
|
||||
]
|
||||
}
|
284
packages/misskey-js/generator/src/generator.ts
Normal file
284
packages/misskey-js/generator/src/generator.ts
Normal file
|
@ -0,0 +1,284 @@
|
|||
import { mkdir, writeFile } from 'fs/promises';
|
||||
import { OpenAPIV3 } from 'openapi-types';
|
||||
import { toPascal } from 'ts-case-convert';
|
||||
import SwaggerParser from '@apidevtools/swagger-parser';
|
||||
import openapiTS from 'openapi-typescript';
|
||||
|
||||
function generateVersionHeaderComment(openApiDocs: OpenAPIV3.Document): string {
|
||||
const contents = {
|
||||
version: openApiDocs.info.version,
|
||||
generatedAt: new Date().toISOString(),
|
||||
};
|
||||
|
||||
const lines: string[] = [];
|
||||
lines.push('/*');
|
||||
for (const [key, value] of Object.entries(contents)) {
|
||||
lines.push(` * ${key}: ${value}`);
|
||||
}
|
||||
lines.push(' */');
|
||||
|
||||
return lines.join('\n');
|
||||
}
|
||||
|
||||
async function generateBaseTypes(
|
||||
openApiDocs: OpenAPIV3.Document,
|
||||
openApiJsonPath: string,
|
||||
typeFileName: string,
|
||||
) {
|
||||
const disabledLints = [
|
||||
'@typescript-eslint/naming-convention',
|
||||
'@typescript-eslint/no-explicit-any',
|
||||
];
|
||||
|
||||
const lines: string[] = [];
|
||||
for (const lint of disabledLints) {
|
||||
lines.push(`/* eslint ${lint}: 0 */`);
|
||||
}
|
||||
lines.push('');
|
||||
|
||||
lines.push(generateVersionHeaderComment(openApiDocs));
|
||||
lines.push('');
|
||||
|
||||
const generatedTypes = await openapiTS(openApiJsonPath, { exportType: true });
|
||||
lines.push(generatedTypes);
|
||||
lines.push('');
|
||||
|
||||
await writeFile(typeFileName, lines.join('\n'));
|
||||
}
|
||||
|
||||
async function generateSchemaEntities(
|
||||
openApiDocs: OpenAPIV3.Document,
|
||||
typeFileName: string,
|
||||
outputPath: string,
|
||||
) {
|
||||
if (!openApiDocs.components?.schemas) {
|
||||
return;
|
||||
}
|
||||
|
||||
const schemas = openApiDocs.components.schemas;
|
||||
const schemaNames = Object.keys(schemas);
|
||||
const typeAliasLines: string[] = [];
|
||||
|
||||
typeAliasLines.push(generateVersionHeaderComment(openApiDocs));
|
||||
typeAliasLines.push('');
|
||||
typeAliasLines.push(`import { components } from '${toImportPath(typeFileName)}';`);
|
||||
typeAliasLines.push(
|
||||
...schemaNames.map(it => `export type ${it} = components['schemas']['${it}'];`),
|
||||
);
|
||||
typeAliasLines.push('');
|
||||
|
||||
await writeFile(outputPath, typeAliasLines.join('\n'));
|
||||
}
|
||||
|
||||
async function generateEndpoints(
|
||||
openApiDocs: OpenAPIV3.Document,
|
||||
typeFileName: string,
|
||||
entitiesOutputPath: string,
|
||||
endpointOutputPath: string,
|
||||
) {
|
||||
const endpoints: Endpoint[] = [];
|
||||
|
||||
// misskey-jsはPOST固定で送っているので、こちらも決め打ちする。別メソッドに対応することがあればこちらも直す必要あり
|
||||
const paths = openApiDocs.paths;
|
||||
const postPathItems = Object.keys(paths)
|
||||
.map(it => paths[it]?.post)
|
||||
.filter(filterUndefined);
|
||||
|
||||
for (const operation of postPathItems) {
|
||||
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
||||
const operationId = operation.operationId!;
|
||||
const endpoint = new Endpoint(operationId);
|
||||
endpoints.push(endpoint);
|
||||
|
||||
if (isRequestBodyObject(operation.requestBody)) {
|
||||
const reqContent = operation.requestBody.content;
|
||||
const supportMediaTypes = Object.keys(reqContent);
|
||||
if (supportMediaTypes.length > 0) {
|
||||
// いまのところ複数のメディアタイプをとるエンドポイントは無いので決め打ちする
|
||||
endpoint.request = new OperationTypeAlias(
|
||||
operationId,
|
||||
supportMediaTypes[0],
|
||||
OperationsAliasType.REQUEST,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
if (isResponseObject(operation.responses['200']) && operation.responses['200'].content) {
|
||||
const resContent = operation.responses['200'].content;
|
||||
const supportMediaTypes = Object.keys(resContent);
|
||||
if (supportMediaTypes.length > 0) {
|
||||
// いまのところ複数のメディアタイプを返すエンドポイントは無いので決め打ちする
|
||||
endpoint.response = new OperationTypeAlias(
|
||||
operationId,
|
||||
supportMediaTypes[0],
|
||||
OperationsAliasType.RESPONSE,
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const entitiesOutputLine: string[] = [];
|
||||
|
||||
entitiesOutputLine.push(generateVersionHeaderComment(openApiDocs));
|
||||
entitiesOutputLine.push('');
|
||||
|
||||
entitiesOutputLine.push(`import { operations } from '${toImportPath(typeFileName)}';`);
|
||||
entitiesOutputLine.push('');
|
||||
|
||||
entitiesOutputLine.push(new EmptyTypeAlias(OperationsAliasType.REQUEST).toLine());
|
||||
entitiesOutputLine.push(new EmptyTypeAlias(OperationsAliasType.RESPONSE).toLine());
|
||||
entitiesOutputLine.push('');
|
||||
|
||||
const entities = endpoints
|
||||
.flatMap(it => [it.request, it.response].filter(i => i))
|
||||
.filter(filterUndefined);
|
||||
entitiesOutputLine.push(...entities.map(it => it.toLine()));
|
||||
entitiesOutputLine.push('');
|
||||
|
||||
await writeFile(entitiesOutputPath, entitiesOutputLine.join('\n'));
|
||||
|
||||
const endpointOutputLine: string[] = [];
|
||||
|
||||
endpointOutputLine.push(generateVersionHeaderComment(openApiDocs));
|
||||
endpointOutputLine.push('');
|
||||
|
||||
endpointOutputLine.push('import type {');
|
||||
endpointOutputLine.push(
|
||||
...[emptyRequest, emptyResponse, ...entities].map(it => '\t' + it.generateName() + ','),
|
||||
);
|
||||
endpointOutputLine.push(`} from '${toImportPath(entitiesOutputPath)}';`);
|
||||
endpointOutputLine.push('');
|
||||
|
||||
endpointOutputLine.push('export type Endpoints = {');
|
||||
endpointOutputLine.push(
|
||||
...endpoints.map(it => '\t' + it.toLine()),
|
||||
);
|
||||
endpointOutputLine.push('}');
|
||||
endpointOutputLine.push('');
|
||||
|
||||
await writeFile(endpointOutputPath, endpointOutputLine.join('\n'));
|
||||
}
|
||||
|
||||
function isRequestBodyObject(value: unknown): value is OpenAPIV3.RequestBodyObject {
|
||||
if (!value) {
|
||||
return false;
|
||||
}
|
||||
|
||||
const { content } = value as Record<keyof OpenAPIV3.RequestBodyObject, unknown>;
|
||||
return content !== undefined;
|
||||
}
|
||||
|
||||
function isResponseObject(value: unknown): value is OpenAPIV3.ResponseObject {
|
||||
if (!value) {
|
||||
return false;
|
||||
}
|
||||
|
||||
const { description } = value as Record<keyof OpenAPIV3.ResponseObject, unknown>;
|
||||
return description !== undefined;
|
||||
}
|
||||
|
||||
function filterUndefined<T>(item: T): item is Exclude<T, undefined> {
|
||||
return item !== undefined;
|
||||
}
|
||||
|
||||
function toImportPath(fileName: string, fromPath = '/built/autogen', toPath = ''): string {
|
||||
return fileName.replace(fromPath, toPath).replace('.ts', '.js');
|
||||
}
|
||||
|
||||
enum OperationsAliasType {
|
||||
REQUEST = 'Request',
|
||||
RESPONSE = 'Response'
|
||||
}
|
||||
|
||||
interface IOperationTypeAlias {
|
||||
readonly type: OperationsAliasType
|
||||
|
||||
generateName(): string
|
||||
|
||||
toLine(): string
|
||||
}
|
||||
|
||||
class OperationTypeAlias implements IOperationTypeAlias {
|
||||
public readonly operationId: string;
|
||||
public readonly mediaType: string;
|
||||
public readonly type: OperationsAliasType;
|
||||
|
||||
constructor(
|
||||
operationId: string,
|
||||
mediaType: string,
|
||||
type: OperationsAliasType,
|
||||
) {
|
||||
this.operationId = operationId;
|
||||
this.mediaType = mediaType;
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
generateName(): string {
|
||||
const nameBase = this.operationId.replace(/\//g, '-');
|
||||
return toPascal(nameBase + this.type);
|
||||
}
|
||||
|
||||
toLine(): string {
|
||||
const name = this.generateName();
|
||||
return (this.type === OperationsAliasType.REQUEST)
|
||||
? `export type ${name} = operations['${this.operationId}']['requestBody']['content']['${this.mediaType}'];`
|
||||
: `export type ${name} = operations['${this.operationId}']['responses']['200']['content']['${this.mediaType}'];`;
|
||||
}
|
||||
}
|
||||
|
||||
class EmptyTypeAlias implements IOperationTypeAlias {
|
||||
readonly type: OperationsAliasType;
|
||||
|
||||
constructor(type: OperationsAliasType) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
generateName(): string {
|
||||
return 'Empty' + this.type;
|
||||
}
|
||||
|
||||
toLine(): string {
|
||||
const name = this.generateName();
|
||||
return `export type ${name} = Record<string, unknown> | undefined;`;
|
||||
}
|
||||
}
|
||||
|
||||
const emptyRequest = new EmptyTypeAlias(OperationsAliasType.REQUEST);
|
||||
const emptyResponse = new EmptyTypeAlias(OperationsAliasType.RESPONSE);
|
||||
|
||||
class Endpoint {
|
||||
public readonly operationId: string;
|
||||
public request?: IOperationTypeAlias;
|
||||
public response?: IOperationTypeAlias;
|
||||
|
||||
constructor(operationId: string) {
|
||||
this.operationId = operationId;
|
||||
}
|
||||
|
||||
toLine(): string {
|
||||
const reqName = this.request?.generateName() ?? emptyRequest.generateName();
|
||||
const resName = this.response?.generateName() ?? emptyResponse.generateName();
|
||||
|
||||
return `'${this.operationId}': { req: ${reqName}; res: ${resName} };`;
|
||||
}
|
||||
}
|
||||
|
||||
async function main() {
|
||||
const generatePath = './built/autogen';
|
||||
await mkdir(generatePath, { recursive: true });
|
||||
|
||||
const openApiJsonPath = './api.json';
|
||||
const openApiDocs = await SwaggerParser.validate(openApiJsonPath) as OpenAPIV3.Document;
|
||||
|
||||
const typeFileName = './built/autogen/types.ts';
|
||||
await generateBaseTypes(openApiDocs, openApiJsonPath, typeFileName);
|
||||
|
||||
const modelFileName = `${generatePath}/models.ts`;
|
||||
await generateSchemaEntities(openApiDocs, typeFileName, modelFileName);
|
||||
|
||||
const entitiesFileName = `${generatePath}/entities.ts`;
|
||||
const endpointFileName = `${generatePath}/endpoint.ts`;
|
||||
await generateEndpoints(openApiDocs, typeFileName, entitiesFileName, endpointFileName);
|
||||
}
|
||||
|
||||
main();
|
20
packages/misskey-js/generator/tsconfig.json
Normal file
20
packages/misskey-js/generator/tsconfig.json
Normal file
|
@ -0,0 +1,20 @@
|
|||
{
|
||||
"$schema": "https://json.schemastore.org/tsconfig",
|
||||
"compilerOptions": {
|
||||
"target": "ESNext",
|
||||
"module": "ESNext",
|
||||
"moduleResolution": "nodenext",
|
||||
"strict": true,
|
||||
"strictFunctionTypes": true,
|
||||
"strictNullChecks": true,
|
||||
"esModuleInterop": true,
|
||||
"lib": [
|
||||
"esnext",
|
||||
]
|
||||
},
|
||||
"include": [
|
||||
"src/**/*.ts",
|
||||
"built/**/*.ts"
|
||||
],
|
||||
"exclude": []
|
||||
}
|
|
@ -13,7 +13,8 @@
|
|||
"typecheck": "tsc --noEmit",
|
||||
"lint": "pnpm typecheck && pnpm eslint",
|
||||
"jest": "jest --coverage --detectOpenHandles",
|
||||
"test": "pnpm jest && pnpm tsd"
|
||||
"test": "pnpm jest && pnpm tsd",
|
||||
"update-autogen-code": "pnpm --filter misskey-js-type-generator generate && ncp generator/built/autogen src/autogen"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
@ -32,7 +33,8 @@
|
|||
"jest-websocket-mock": "2.5.0",
|
||||
"mock-socket": "9.3.1",
|
||||
"tsd": "0.29.0",
|
||||
"typescript": "5.3.2"
|
||||
"typescript": "5.3.2",
|
||||
"ncp": "2.0.0"
|
||||
},
|
||||
"files": [
|
||||
"built"
|
||||
|
|
|
@ -1,4 +1,9 @@
|
|||
import type { Endpoints } from './api.types.js';
|
||||
import { SwitchCaseResponseType } from './api.types';
|
||||
import type { Endpoints } from './api.types';
|
||||
|
||||
export {
|
||||
SwitchCaseResponseType,
|
||||
} from './api.types';
|
||||
|
||||
const MK_API_ERROR = Symbol();
|
||||
|
||||
|
@ -15,25 +20,15 @@ export function isAPIError(reason: any): reason is APIError {
|
|||
}
|
||||
|
||||
export type FetchLike = (input: string, init?: {
|
||||
method?: string;
|
||||
body?: string;
|
||||
credentials?: RequestCredentials;
|
||||
cache?: RequestCache;
|
||||
headers: {[key in string]: string}
|
||||
}) => Promise<{
|
||||
status: number;
|
||||
json(): Promise<any>;
|
||||
}>;
|
||||
|
||||
type IsNeverType<T> = [T] extends [never] ? true : false;
|
||||
|
||||
type StrictExtract<Union, Cond> = Cond extends Union ? Union : never;
|
||||
|
||||
type IsCaseMatched<E extends keyof Endpoints, P extends Endpoints[E]['req'], C extends number> =
|
||||
IsNeverType<StrictExtract<Endpoints[E]['res']['$switch']['$cases'][C], [P, any]>> extends false ? true : false;
|
||||
|
||||
type GetCaseResult<E extends keyof Endpoints, P extends Endpoints[E]['req'], C extends number> =
|
||||
StrictExtract<Endpoints[E]['res']['$switch']['$cases'][C], [P, any]>[1];
|
||||
method?: string;
|
||||
body?: string;
|
||||
credentials?: RequestCredentials;
|
||||
cache?: RequestCache;
|
||||
headers: { [key in string]: string }
|
||||
}) => Promise<{
|
||||
status: number;
|
||||
json(): Promise<any>;
|
||||
}>;
|
||||
|
||||
export class APIClient {
|
||||
public origin: string;
|
||||
|
@ -53,22 +48,11 @@ export class APIClient {
|
|||
}
|
||||
|
||||
public request<E extends keyof Endpoints, P extends Endpoints[E]['req']>(
|
||||
endpoint: E, params: P = {} as P, credential?: string | null | undefined,
|
||||
): Promise<Endpoints[E]['res'] extends { $switch: { $cases: [any, any][]; $default: any; }; }
|
||||
?
|
||||
IsCaseMatched<E, P, 0> extends true ? GetCaseResult<E, P, 0> :
|
||||
IsCaseMatched<E, P, 1> extends true ? GetCaseResult<E, P, 1> :
|
||||
IsCaseMatched<E, P, 2> extends true ? GetCaseResult<E, P, 2> :
|
||||
IsCaseMatched<E, P, 3> extends true ? GetCaseResult<E, P, 3> :
|
||||
IsCaseMatched<E, P, 4> extends true ? GetCaseResult<E, P, 4> :
|
||||
IsCaseMatched<E, P, 5> extends true ? GetCaseResult<E, P, 5> :
|
||||
IsCaseMatched<E, P, 6> extends true ? GetCaseResult<E, P, 6> :
|
||||
IsCaseMatched<E, P, 7> extends true ? GetCaseResult<E, P, 7> :
|
||||
IsCaseMatched<E, P, 8> extends true ? GetCaseResult<E, P, 8> :
|
||||
IsCaseMatched<E, P, 9> extends true ? GetCaseResult<E, P, 9> :
|
||||
Endpoints[E]['res']['$switch']['$default']
|
||||
: Endpoints[E]['res']> {
|
||||
const promise = new Promise((resolve, reject) => {
|
||||
endpoint: E,
|
||||
params: P = {} as P,
|
||||
credential?: string | null,
|
||||
): Promise<SwitchCaseResponseType<E, P>> {
|
||||
return new Promise((resolve, reject) => {
|
||||
this.fetch(`${this.origin}/api/${endpoint}`, {
|
||||
method: 'POST',
|
||||
body: JSON.stringify({
|
||||
|
@ -83,10 +67,8 @@ export class APIClient {
|
|||
}).then(async (res) => {
|
||||
const body = res.status === 204 ? null : await res.json();
|
||||
|
||||
if (res.status === 200) {
|
||||
if (res.status === 200 || res.status === 204) {
|
||||
resolve(body);
|
||||
} else if (res.status === 204) {
|
||||
resolve(null);
|
||||
} else {
|
||||
reject({
|
||||
[MK_API_ERROR]: true,
|
||||
|
@ -95,7 +77,5 @@ export class APIClient {
|
|||
}
|
||||
}).catch(reject);
|
||||
});
|
||||
|
||||
return promise as any;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,651 +1,60 @@
|
|||
import type {
|
||||
Ad, Announcement, Antenna, App, AuthSession, Blocking, Channel, Clip, DateString, DetailedInstanceMetadata, DriveFile, DriveFolder, Following, FollowingFolloweePopulated, FollowingFollowerPopulated, FollowRequest, GalleryPost, Instance,
|
||||
LiteInstanceMetadata,
|
||||
MeDetailed,
|
||||
Note, NoteFavorite, OriginType, Page, ServerInfo, Stats, User, UserDetailed, MeSignup, UserGroup, UserList, UserSorting, Notification, NoteReaction, Signin, MessagingMessage, Invite, InviteLimit, AdminInstanceMetadata,
|
||||
} from './entities.js';
|
||||
import { Endpoints as Gen } from './autogen/endpoint';
|
||||
import { UserDetailed } from './autogen/models';
|
||||
import { UsersShowRequest } from './autogen/entities';
|
||||
|
||||
type TODO = Record<string, any> | null;
|
||||
type Overwrite<T, U extends { [Key in keyof T]?: unknown }> = Omit<
|
||||
T,
|
||||
keyof U
|
||||
> & U;
|
||||
|
||||
type NoParams = Record<string, never>;
|
||||
|
||||
type ShowUserReq = { username: string; host?: string; } | { userId: User['id']; };
|
||||
|
||||
export type Endpoints = {
|
||||
// admin
|
||||
'admin/abuse-user-reports': { req: TODO; res: TODO; };
|
||||
'admin/delete-all-files-of-a-user': { req: { userId: User['id']; }; res: null; };
|
||||
'admin/unset-user-avatar': { req: { userId: User['id']; }; res: null; };
|
||||
'admin/unset-user-banner': { 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/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/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/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
|
||||
'announcements': { req: { limit?: number; withUnreads?: boolean; sinceId?: Announcement['id']; untilId?: Announcement['id']; }; res: Announcement[]; };
|
||||
|
||||
// antennas
|
||||
'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
|
||||
'ap/get': { req: { uri: string; }; res: Record<string, any>; };
|
||||
'ap/show': { req: { uri: string; }; res: {
|
||||
type: 'Note';
|
||||
object: Note;
|
||||
} | {
|
||||
type: 'User';
|
||||
object: UserDetailed;
|
||||
}; };
|
||||
|
||||
// app
|
||||
'app/create': { req: TODO; res: App; };
|
||||
'app/show': { req: { appId: App['id']; }; res: App; };
|
||||
|
||||
// auth
|
||||
'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
|
||||
'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
|
||||
'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
|
||||
'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
|
||||
'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
|
||||
'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
|
||||
'endpoint': { req: { endpoint: string; }; res: { params: { name: string; type: string; }[]; }; };
|
||||
|
||||
// endpoints
|
||||
'endpoints': { req: NoParams; res: string[]; };
|
||||
|
||||
// federation
|
||||
'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
|
||||
'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
|
||||
'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
|
||||
'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
|
||||
'get-online-users-count': { req: NoParams; res: { count: number; }; };
|
||||
|
||||
// hashtags
|
||||
'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
|
||||
'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['id'];
|
||||
untilId?: Notification['id'];
|
||||
following?: boolean;
|
||||
markAsRead?: boolean;
|
||||
includeTypes?: Notification['type'][];
|
||||
excludeTypes?: Notification['type'][];
|
||||
}; res: Notification[]; };
|
||||
'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<string, any>; };
|
||||
'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<string, 'null' | 'array' | 'number' | 'string' | 'boolean' | 'object'>; };
|
||||
'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[] | string)[];
|
||||
hardMutedWords?: (string[] | 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; };
|
||||
|
||||
// invite
|
||||
'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
|
||||
'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
|
||||
'meta': { req: { detail?: boolean; }; res: {
|
||||
$switch: {
|
||||
$cases: [[
|
||||
{ detail: true; },
|
||||
DetailedInstanceMetadata,
|
||||
], [
|
||||
{ detail: false; },
|
||||
LiteInstanceMetadata,
|
||||
], [
|
||||
{ detail: boolean; },
|
||||
LiteInstanceMetadata | DetailedInstanceMetadata,
|
||||
]];
|
||||
$default: LiteInstanceMetadata;
|
||||
};
|
||||
}; };
|
||||
|
||||
// miauth
|
||||
'miauth/gen-token': { req: TODO; res: TODO; };
|
||||
|
||||
// mute
|
||||
'mute/create': { req: TODO; res: TODO; };
|
||||
'mute/delete': { req: { userId: User['id'] }; res: null; };
|
||||
'mute/list': { req: TODO; res: TODO; };
|
||||
|
||||
// my
|
||||
'my/apps': { req: TODO; res: TODO; };
|
||||
|
||||
// notes
|
||||
'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;
|
||||
};
|
||||
}; res: { createdNote: Note }; };
|
||||
'notes/delete': { req: { noteId: Note['id']; }; 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/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
|
||||
'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
|
||||
'page-push': { req: { pageId: Page['id']; event: string; var?: any; }; res: null; };
|
||||
|
||||
// pages
|
||||
'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
|
||||
'ping': { req: NoParams; res: { pong: number; }; };
|
||||
|
||||
// pinned-users
|
||||
'pinned-users': { req: TODO; res: TODO; };
|
||||
|
||||
// promo
|
||||
'promo/read': { req: TODO; res: TODO; };
|
||||
|
||||
// request-reset-password
|
||||
'request-reset-password': { req: { username: string; email: string; }; res: null; };
|
||||
|
||||
// reset-password
|
||||
'reset-password': { req: { token: string; password: string; }; res: null; };
|
||||
|
||||
// room
|
||||
'room/show': { req: TODO; res: TODO; };
|
||||
'room/update': { req: TODO; res: TODO; };
|
||||
|
||||
// signup
|
||||
'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
|
||||
'stats': { req: NoParams; res: Stats; };
|
||||
|
||||
// server-info
|
||||
'server-info': { req: NoParams; res: ServerInfo; };
|
||||
|
||||
// sw
|
||||
'sw/register': { req: TODO; res: TODO; };
|
||||
|
||||
// username
|
||||
'username/available': { req: { username: string; }; res: { available: boolean; }; };
|
||||
|
||||
// users
|
||||
'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; };
|
||||
'users/show': { req: ShowUserReq | { userIds: User['id'][]; }; res: {
|
||||
$switch: {
|
||||
$cases: [[
|
||||
{ userIds: User['id'][]; },
|
||||
UserDetailed[],
|
||||
]];
|
||||
$default: UserDetailed;
|
||||
};
|
||||
}; };
|
||||
|
||||
// fetching external data
|
||||
'fetch-rss': { req: { url: string; }; res: TODO; };
|
||||
'fetch-external-resources': {
|
||||
req: { url: string; hash: string; };
|
||||
res: { type: string; data: string; };
|
||||
type SwitchCase = {
|
||||
$switch: {
|
||||
$cases: [any, any][],
|
||||
$default: any;
|
||||
};
|
||||
};
|
||||
|
||||
type IsNeverType<T> = [T] extends [never] ? true : false;
|
||||
type StrictExtract<Union, Cond> = Cond extends Union ? Union : never;
|
||||
|
||||
type IsCaseMatched<E extends keyof Endpoints, P extends Endpoints[E]['req'], C extends number> =
|
||||
Endpoints[E]['res'] extends SwitchCase
|
||||
? IsNeverType<StrictExtract<Endpoints[E]['res']['$switch']['$cases'][C], [P, any]>> extends false ? true : false
|
||||
: false
|
||||
|
||||
type GetCaseResult<E extends keyof Endpoints, P extends Endpoints[E]['req'], C extends number> =
|
||||
Endpoints[E]['res'] extends SwitchCase
|
||||
? StrictExtract<Endpoints[E]['res']['$switch']['$cases'][C], [P, any]>[1]
|
||||
: never
|
||||
|
||||
export type SwitchCaseResponseType<E extends keyof Endpoints, P extends Endpoints[E]['req']> = Endpoints[E]['res'] extends SwitchCase
|
||||
? IsCaseMatched<E, P, 0> extends true ? GetCaseResult<E, P, 0> :
|
||||
IsCaseMatched<E, P, 1> extends true ? GetCaseResult<E, P, 1> :
|
||||
IsCaseMatched<E, P, 2> extends true ? GetCaseResult<E, P, 2> :
|
||||
IsCaseMatched<E, P, 3> extends true ? GetCaseResult<E, P, 3> :
|
||||
IsCaseMatched<E, P, 4> extends true ? GetCaseResult<E, P, 4> :
|
||||
IsCaseMatched<E, P, 5> extends true ? GetCaseResult<E, P, 5> :
|
||||
IsCaseMatched<E, P, 6> extends true ? GetCaseResult<E, P, 6> :
|
||||
IsCaseMatched<E, P, 7> extends true ? GetCaseResult<E, P, 7> :
|
||||
IsCaseMatched<E, P, 8> extends true ? GetCaseResult<E, P, 8> :
|
||||
IsCaseMatched<E, P, 9> extends true ? GetCaseResult<E, P, 9> :
|
||||
Endpoints[E]['res']['$switch']['$default'] : Endpoints[E]['res'];
|
||||
|
||||
export type Endpoints = Overwrite<
|
||||
Gen,
|
||||
{
|
||||
'users/show': {
|
||||
req: UsersShowRequest;
|
||||
res: {
|
||||
$switch: {
|
||||
$cases: [[
|
||||
{
|
||||
userIds?: string[];
|
||||
}, UserDetailed[],
|
||||
]];
|
||||
$default: UserDetailed;
|
||||
};
|
||||
};
|
||||
}
|
||||
}
|
||||
>
|
||||
|
|
802
packages/misskey-js/src/autogen/endpoint.ts
Normal file
802
packages/misskey-js/src/autogen/endpoint.ts
Normal file
|
@ -0,0 +1,802 @@
|
|||
/*
|
||||
* version: 2023.11.1
|
||||
* generatedAt: 2023-11-27T02:24:45.113Z
|
||||
*/
|
||||
|
||||
import type {
|
||||
EmptyRequest,
|
||||
EmptyResponse,
|
||||
AdminMetaResponse,
|
||||
AdminAbuseUserReportsRequest,
|
||||
AdminAbuseUserReportsResponse,
|
||||
AdminAccountsCreateRequest,
|
||||
AdminAccountsCreateResponse,
|
||||
AdminAccountsDeleteRequest,
|
||||
AdminAccountsFindByEmailRequest,
|
||||
AdminAdCreateRequest,
|
||||
AdminAdDeleteRequest,
|
||||
AdminAdListRequest,
|
||||
AdminAdUpdateRequest,
|
||||
AdminAnnouncementsCreateRequest,
|
||||
AdminAnnouncementsCreateResponse,
|
||||
AdminAnnouncementsDeleteRequest,
|
||||
AdminAnnouncementsListRequest,
|
||||
AdminAnnouncementsListResponse,
|
||||
AdminAnnouncementsUpdateRequest,
|
||||
AdminAvatarDecorationsCreateRequest,
|
||||
AdminAvatarDecorationsDeleteRequest,
|
||||
AdminAvatarDecorationsListRequest,
|
||||
AdminAvatarDecorationsListResponse,
|
||||
AdminAvatarDecorationsUpdateRequest,
|
||||
AdminDeleteAllFilesOfAUserRequest,
|
||||
AdminUnsetUserAvatarRequest,
|
||||
AdminUnsetUserBannerRequest,
|
||||
AdminDriveFilesRequest,
|
||||
AdminDriveFilesResponse,
|
||||
AdminDriveShowFileRequest,
|
||||
AdminDriveShowFileResponse,
|
||||
AdminEmojiAddAliasesBulkRequest,
|
||||
AdminEmojiAddRequest,
|
||||
AdminEmojiCopyRequest,
|
||||
AdminEmojiCopyResponse,
|
||||
AdminEmojiDeleteBulkRequest,
|
||||
AdminEmojiDeleteRequest,
|
||||
AdminEmojiListRemoteRequest,
|
||||
AdminEmojiListRemoteResponse,
|
||||
AdminEmojiListRequest,
|
||||
AdminEmojiListResponse,
|
||||
AdminEmojiRemoveAliasesBulkRequest,
|
||||
AdminEmojiSetAliasesBulkRequest,
|
||||
AdminEmojiSetCategoryBulkRequest,
|
||||
AdminEmojiSetLicenseBulkRequest,
|
||||
AdminEmojiUpdateRequest,
|
||||
AdminFederationDeleteAllFilesRequest,
|
||||
AdminFederationRefreshRemoteInstanceMetadataRequest,
|
||||
AdminFederationRemoveAllFollowingRequest,
|
||||
AdminFederationUpdateInstanceRequest,
|
||||
AdminGetTableStatsResponse,
|
||||
AdminGetUserIpsRequest,
|
||||
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,
|
||||
AdminRolesDeleteRequest,
|
||||
AdminRolesShowRequest,
|
||||
AdminRolesUpdateRequest,
|
||||
AdminRolesAssignRequest,
|
||||
AdminRolesUnassignRequest,
|
||||
AdminRolesUpdateDefaultPoliciesRequest,
|
||||
AdminRolesUsersRequest,
|
||||
AnnouncementsRequest,
|
||||
AnnouncementsResponse,
|
||||
AntennasCreateRequest,
|
||||
AntennasCreateResponse,
|
||||
AntennasDeleteRequest,
|
||||
AntennasListResponse,
|
||||
AntennasNotesRequest,
|
||||
AntennasNotesResponse,
|
||||
AntennasShowRequest,
|
||||
AntennasShowResponse,
|
||||
AntennasUpdateRequest,
|
||||
AntennasUpdateResponse,
|
||||
ApGetRequest,
|
||||
ApGetResponse,
|
||||
ApShowRequest,
|
||||
ApShowResponse,
|
||||
AppCreateRequest,
|
||||
AppCreateResponse,
|
||||
AppShowRequest,
|
||||
AppShowResponse,
|
||||
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,
|
||||
EndpointsResponse,
|
||||
FederationFollowersRequest,
|
||||
FederationFollowersResponse,
|
||||
FederationFollowingRequest,
|
||||
FederationFollowingResponse,
|
||||
FederationInstancesRequest,
|
||||
FederationInstancesResponse,
|
||||
FederationShowInstanceRequest,
|
||||
FederationShowInstanceResponse,
|
||||
FederationUpdateRemoteUserRequest,
|
||||
FederationUsersRequest,
|
||||
FederationUsersResponse,
|
||||
FederationStatsRequest,
|
||||
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,
|
||||
GetAvatarDecorationsResponse,
|
||||
HashtagsListRequest,
|
||||
HashtagsListResponse,
|
||||
HashtagsSearchRequest,
|
||||
HashtagsSearchResponse,
|
||||
HashtagsShowRequest,
|
||||
HashtagsShowResponse,
|
||||
HashtagsTrendResponse,
|
||||
HashtagsUsersRequest,
|
||||
HashtagsUsersResponse,
|
||||
IResponse,
|
||||
IClaimAchievementRequest,
|
||||
IFavoritesRequest,
|
||||
IFavoritesResponse,
|
||||
IGalleryLikesRequest,
|
||||
IGalleryLikesResponse,
|
||||
IGalleryPostsRequest,
|
||||
IGalleryPostsResponse,
|
||||
INotificationsRequest,
|
||||
INotificationsResponse,
|
||||
INotificationsGroupedRequest,
|
||||
INotificationsGroupedResponse,
|
||||
IPageLikesRequest,
|
||||
IPageLikesResponse,
|
||||
IPagesRequest,
|
||||
IPagesResponse,
|
||||
IPinRequest,
|
||||
IPinResponse,
|
||||
IReadAnnouncementRequest,
|
||||
IRegistryGetAllRequest,
|
||||
IRegistryGetDetailRequest,
|
||||
IRegistryGetRequest,
|
||||
IRegistryKeysWithTypeRequest,
|
||||
IRegistryKeysRequest,
|
||||
IRegistryRemoveRequest,
|
||||
IRegistrySetRequest,
|
||||
IUnpinRequest,
|
||||
IUnpinResponse,
|
||||
IUpdateRequest,
|
||||
IUpdateResponse,
|
||||
IWebhooksCreateRequest,
|
||||
IWebhooksShowRequest,
|
||||
IWebhooksUpdateRequest,
|
||||
IWebhooksDeleteRequest,
|
||||
InviteCreateResponse,
|
||||
InviteDeleteRequest,
|
||||
InviteListRequest,
|
||||
InviteListResponse,
|
||||
InviteLimitResponse,
|
||||
MetaRequest,
|
||||
MetaResponse,
|
||||
EmojisResponse,
|
||||
EmojiRequest,
|
||||
EmojiResponse,
|
||||
MuteCreateRequest,
|
||||
MuteDeleteRequest,
|
||||
MuteListRequest,
|
||||
MuteListResponse,
|
||||
RenoteMuteCreateRequest,
|
||||
RenoteMuteDeleteRequest,
|
||||
RenoteMuteListRequest,
|
||||
RenoteMuteListResponse,
|
||||
MyAppsRequest,
|
||||
MyAppsResponse,
|
||||
NotesRequest,
|
||||
NotesResponse,
|
||||
NotesChildrenRequest,
|
||||
NotesChildrenResponse,
|
||||
NotesClipsRequest,
|
||||
NotesClipsResponse,
|
||||
NotesConversationRequest,
|
||||
NotesConversationResponse,
|
||||
NotesCreateRequest,
|
||||
NotesCreateResponse,
|
||||
NotesDeleteRequest,
|
||||
NotesFavoritesCreateRequest,
|
||||
NotesFavoritesDeleteRequest,
|
||||
NotesFeaturedRequest,
|
||||
NotesFeaturedResponse,
|
||||
NotesGlobalTimelineRequest,
|
||||
NotesGlobalTimelineResponse,
|
||||
NotesHybridTimelineRequest,
|
||||
NotesHybridTimelineResponse,
|
||||
NotesLocalTimelineRequest,
|
||||
NotesLocalTimelineResponse,
|
||||
NotesMentionsRequest,
|
||||
NotesMentionsResponse,
|
||||
NotesPollsRecommendationRequest,
|
||||
NotesPollsRecommendationResponse,
|
||||
NotesPollsVoteRequest,
|
||||
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,
|
||||
PagesCreateRequest,
|
||||
PagesCreateResponse,
|
||||
PagesDeleteRequest,
|
||||
PagesFeaturedResponse,
|
||||
PagesLikeRequest,
|
||||
PagesShowRequest,
|
||||
PagesShowResponse,
|
||||
PagesUnlikeRequest,
|
||||
PagesUpdateRequest,
|
||||
FlashCreateRequest,
|
||||
FlashDeleteRequest,
|
||||
FlashFeaturedResponse,
|
||||
FlashLikeRequest,
|
||||
FlashShowRequest,
|
||||
FlashShowResponse,
|
||||
FlashUnlikeRequest,
|
||||
FlashUpdateRequest,
|
||||
FlashMyRequest,
|
||||
FlashMyResponse,
|
||||
FlashMyLikesRequest,
|
||||
FlashMyLikesResponse,
|
||||
PingResponse,
|
||||
PinnedUsersResponse,
|
||||
PromoReadRequest,
|
||||
RolesShowRequest,
|
||||
RolesUsersRequest,
|
||||
RolesNotesRequest,
|
||||
RolesNotesResponse,
|
||||
RequestResetPasswordRequest,
|
||||
ResetPasswordRequest,
|
||||
StatsResponse,
|
||||
SwShowRegistrationRequest,
|
||||
SwShowRegistrationResponse,
|
||||
SwUpdateRegistrationRequest,
|
||||
SwUpdateRegistrationResponse,
|
||||
SwRegisterRequest,
|
||||
SwRegisterResponse,
|
||||
SwUnregisterRequest,
|
||||
TestRequest,
|
||||
UsernameAvailableRequest,
|
||||
UsernameAvailableResponse,
|
||||
UsersRequest,
|
||||
UsersResponse,
|
||||
UsersClipsRequest,
|
||||
UsersClipsResponse,
|
||||
UsersFollowersRequest,
|
||||
UsersFollowersResponse,
|
||||
UsersFollowingRequest,
|
||||
UsersFollowingResponse,
|
||||
UsersGalleryPostsRequest,
|
||||
UsersGalleryPostsResponse,
|
||||
UsersGetFrequentlyRepliedUsersRequest,
|
||||
UsersGetFrequentlyRepliedUsersResponse,
|
||||
UsersFeaturedNotesRequest,
|
||||
UsersFeaturedNotesResponse,
|
||||
UsersListsCreateRequest,
|
||||
UsersListsCreateResponse,
|
||||
UsersListsDeleteRequest,
|
||||
UsersListsListRequest,
|
||||
UsersListsListResponse,
|
||||
UsersListsPullRequest,
|
||||
UsersListsPushRequest,
|
||||
UsersListsShowRequest,
|
||||
UsersListsShowResponse,
|
||||
UsersListsFavoriteRequest,
|
||||
UsersListsUnfavoriteRequest,
|
||||
UsersListsUpdateRequest,
|
||||
UsersListsUpdateResponse,
|
||||
UsersListsCreateFromPublicRequest,
|
||||
UsersListsCreateFromPublicResponse,
|
||||
UsersListsUpdateMembershipRequest,
|
||||
UsersListsGetMembershipsRequest,
|
||||
UsersNotesRequest,
|
||||
UsersNotesResponse,
|
||||
UsersPagesRequest,
|
||||
UsersPagesResponse,
|
||||
UsersFlashsRequest,
|
||||
UsersFlashsResponse,
|
||||
UsersReactionsRequest,
|
||||
UsersReactionsResponse,
|
||||
UsersRecommendationRequest,
|
||||
UsersRecommendationResponse,
|
||||
UsersRelationRequest,
|
||||
UsersRelationResponse,
|
||||
UsersReportAbuseRequest,
|
||||
UsersSearchByUsernameAndHostRequest,
|
||||
UsersSearchByUsernameAndHostResponse,
|
||||
UsersSearchRequest,
|
||||
UsersSearchResponse,
|
||||
UsersShowRequest,
|
||||
UsersShowResponse,
|
||||
UsersAchievementsRequest,
|
||||
UsersUpdateMemoRequest,
|
||||
FetchRssRequest,
|
||||
FetchExternalResourcesRequest,
|
||||
RetentionResponse,
|
||||
} from './entities.js';
|
||||
|
||||
export type Endpoints = {
|
||||
'admin/meta': { req: EmptyRequest; res: AdminMetaResponse };
|
||||
'admin/abuse-user-reports': { req: AdminAbuseUserReportsRequest; res: AdminAbuseUserReportsResponse };
|
||||
'admin/accounts/create': { req: AdminAccountsCreateRequest; res: AdminAccountsCreateResponse };
|
||||
'admin/accounts/delete': { req: AdminAccountsDeleteRequest; res: EmptyResponse };
|
||||
'admin/accounts/find-by-email': { req: AdminAccountsFindByEmailRequest; res: EmptyResponse };
|
||||
'admin/ad/create': { req: AdminAdCreateRequest; res: EmptyResponse };
|
||||
'admin/ad/delete': { req: AdminAdDeleteRequest; res: EmptyResponse };
|
||||
'admin/ad/list': { req: AdminAdListRequest; res: EmptyResponse };
|
||||
'admin/ad/update': { req: AdminAdUpdateRequest; res: EmptyResponse };
|
||||
'admin/announcements/create': { req: AdminAnnouncementsCreateRequest; res: AdminAnnouncementsCreateResponse };
|
||||
'admin/announcements/delete': { req: AdminAnnouncementsDeleteRequest; res: EmptyResponse };
|
||||
'admin/announcements/list': { req: AdminAnnouncementsListRequest; res: AdminAnnouncementsListResponse };
|
||||
'admin/announcements/update': { req: AdminAnnouncementsUpdateRequest; res: EmptyResponse };
|
||||
'admin/avatar-decorations/create': { req: AdminAvatarDecorationsCreateRequest; res: EmptyResponse };
|
||||
'admin/avatar-decorations/delete': { req: AdminAvatarDecorationsDeleteRequest; res: EmptyResponse };
|
||||
'admin/avatar-decorations/list': { req: AdminAvatarDecorationsListRequest; res: AdminAvatarDecorationsListResponse };
|
||||
'admin/avatar-decorations/update': { req: AdminAvatarDecorationsUpdateRequest; res: EmptyResponse };
|
||||
'admin/delete-all-files-of-a-user': { req: AdminDeleteAllFilesOfAUserRequest; res: EmptyResponse };
|
||||
'admin/unset-user-avatar': { req: AdminUnsetUserAvatarRequest; res: EmptyResponse };
|
||||
'admin/unset-user-banner': { req: AdminUnsetUserBannerRequest; res: EmptyResponse };
|
||||
'admin/drive/clean-remote-files': { req: EmptyRequest; res: EmptyResponse };
|
||||
'admin/drive/cleanup': { req: EmptyRequest; res: EmptyResponse };
|
||||
'admin/drive/files': { req: AdminDriveFilesRequest; res: AdminDriveFilesResponse };
|
||||
'admin/drive/show-file': { req: AdminDriveShowFileRequest; res: AdminDriveShowFileResponse };
|
||||
'admin/emoji/add-aliases-bulk': { req: AdminEmojiAddAliasesBulkRequest; res: EmptyResponse };
|
||||
'admin/emoji/add': { req: AdminEmojiAddRequest; res: EmptyResponse };
|
||||
'admin/emoji/copy': { req: AdminEmojiCopyRequest; res: AdminEmojiCopyResponse };
|
||||
'admin/emoji/delete-bulk': { req: AdminEmojiDeleteBulkRequest; res: EmptyResponse };
|
||||
'admin/emoji/delete': { req: AdminEmojiDeleteRequest; res: EmptyResponse };
|
||||
'admin/emoji/list-remote': { req: AdminEmojiListRemoteRequest; res: AdminEmojiListRemoteResponse };
|
||||
'admin/emoji/list': { req: AdminEmojiListRequest; res: AdminEmojiListResponse };
|
||||
'admin/emoji/remove-aliases-bulk': { req: AdminEmojiRemoveAliasesBulkRequest; res: EmptyResponse };
|
||||
'admin/emoji/set-aliases-bulk': { req: AdminEmojiSetAliasesBulkRequest; res: EmptyResponse };
|
||||
'admin/emoji/set-category-bulk': { req: AdminEmojiSetCategoryBulkRequest; res: EmptyResponse };
|
||||
'admin/emoji/set-license-bulk': { req: AdminEmojiSetLicenseBulkRequest; res: EmptyResponse };
|
||||
'admin/emoji/update': { req: AdminEmojiUpdateRequest; res: EmptyResponse };
|
||||
'admin/federation/delete-all-files': { req: AdminFederationDeleteAllFilesRequest; res: EmptyResponse };
|
||||
'admin/federation/refresh-remote-instance-metadata': { req: AdminFederationRefreshRemoteInstanceMetadataRequest; res: EmptyResponse };
|
||||
'admin/federation/remove-all-following': { req: AdminFederationRemoveAllFollowingRequest; res: EmptyResponse };
|
||||
'admin/federation/update-instance': { req: AdminFederationUpdateInstanceRequest; res: EmptyResponse };
|
||||
'admin/get-index-stats': { req: EmptyRequest; res: EmptyResponse };
|
||||
'admin/get-table-stats': { req: EmptyRequest; res: AdminGetTableStatsResponse };
|
||||
'admin/get-user-ips': { req: AdminGetUserIpsRequest; res: EmptyResponse };
|
||||
'admin/invite/create': { req: AdminInviteCreateRequest; res: AdminInviteCreateResponse };
|
||||
'admin/invite/list': { req: AdminInviteListRequest; res: AdminInviteListResponse };
|
||||
'admin/promo/create': { req: AdminPromoCreateRequest; res: EmptyResponse };
|
||||
'admin/queue/clear': { req: EmptyRequest; res: EmptyResponse };
|
||||
'admin/queue/deliver-delayed': { req: EmptyRequest; res: AdminQueueDeliverDelayedResponse };
|
||||
'admin/queue/inbox-delayed': { req: EmptyRequest; res: AdminQueueInboxDelayedResponse };
|
||||
'admin/queue/promote': { req: AdminQueuePromoteRequest; res: EmptyResponse };
|
||||
'admin/queue/stats': { req: EmptyRequest; res: AdminQueueStatsResponse };
|
||||
'admin/relays/add': { req: AdminRelaysAddRequest; res: AdminRelaysAddResponse };
|
||||
'admin/relays/list': { req: EmptyRequest; res: AdminRelaysListResponse };
|
||||
'admin/relays/remove': { req: AdminRelaysRemoveRequest; res: EmptyResponse };
|
||||
'admin/reset-password': { req: AdminResetPasswordRequest; res: AdminResetPasswordResponse };
|
||||
'admin/resolve-abuse-user-report': { req: AdminResolveAbuseUserReportRequest; res: EmptyResponse };
|
||||
'admin/send-email': { req: AdminSendEmailRequest; res: EmptyResponse };
|
||||
'admin/server-info': { req: EmptyRequest; res: AdminServerInfoResponse };
|
||||
'admin/show-moderation-logs': { req: AdminShowModerationLogsRequest; res: AdminShowModerationLogsResponse };
|
||||
'admin/show-user': { req: AdminShowUserRequest; res: AdminShowUserResponse };
|
||||
'admin/show-users': { req: AdminShowUsersRequest; res: AdminShowUsersResponse };
|
||||
'admin/suspend-user': { req: AdminSuspendUserRequest; res: EmptyResponse };
|
||||
'admin/unsuspend-user': { req: AdminUnsuspendUserRequest; res: EmptyResponse };
|
||||
'admin/update-meta': { req: AdminUpdateMetaRequest; res: EmptyResponse };
|
||||
'admin/delete-account': { req: AdminDeleteAccountRequest; res: AdminDeleteAccountResponse };
|
||||
'admin/update-user-note': { req: AdminUpdateUserNoteRequest; res: EmptyResponse };
|
||||
'admin/roles/create': { req: AdminRolesCreateRequest; res: EmptyResponse };
|
||||
'admin/roles/delete': { req: AdminRolesDeleteRequest; res: EmptyResponse };
|
||||
'admin/roles/list': { req: EmptyRequest; res: EmptyResponse };
|
||||
'admin/roles/show': { req: AdminRolesShowRequest; res: EmptyResponse };
|
||||
'admin/roles/update': { req: AdminRolesUpdateRequest; res: EmptyResponse };
|
||||
'admin/roles/assign': { req: AdminRolesAssignRequest; res: EmptyResponse };
|
||||
'admin/roles/unassign': { req: AdminRolesUnassignRequest; res: EmptyResponse };
|
||||
'admin/roles/update-default-policies': { req: AdminRolesUpdateDefaultPoliciesRequest; res: EmptyResponse };
|
||||
'admin/roles/users': { req: AdminRolesUsersRequest; res: EmptyResponse };
|
||||
'announcements': { req: AnnouncementsRequest; res: AnnouncementsResponse };
|
||||
'antennas/create': { req: AntennasCreateRequest; res: AntennasCreateResponse };
|
||||
'antennas/delete': { req: AntennasDeleteRequest; res: EmptyResponse };
|
||||
'antennas/list': { req: EmptyRequest; res: AntennasListResponse };
|
||||
'antennas/notes': { req: AntennasNotesRequest; res: AntennasNotesResponse };
|
||||
'antennas/show': { req: AntennasShowRequest; res: AntennasShowResponse };
|
||||
'antennas/update': { req: AntennasUpdateRequest; res: AntennasUpdateResponse };
|
||||
'ap/get': { req: ApGetRequest; res: ApGetResponse };
|
||||
'ap/show': { req: ApShowRequest; res: ApShowResponse };
|
||||
'app/create': { req: AppCreateRequest; res: AppCreateResponse };
|
||||
'app/show': { req: AppShowRequest; res: AppShowResponse };
|
||||
'auth/session/generate': { req: AuthSessionGenerateRequest; res: AuthSessionGenerateResponse };
|
||||
'auth/session/show': { req: AuthSessionShowRequest; res: AuthSessionShowResponse };
|
||||
'auth/session/userkey': { req: AuthSessionUserkeyRequest; res: AuthSessionUserkeyResponse };
|
||||
'blocking/create': { req: BlockingCreateRequest; res: BlockingCreateResponse };
|
||||
'blocking/delete': { req: BlockingDeleteRequest; res: BlockingDeleteResponse };
|
||||
'blocking/list': { req: BlockingListRequest; res: BlockingListResponse };
|
||||
'channels/create': { req: ChannelsCreateRequest; res: ChannelsCreateResponse };
|
||||
'channels/featured': { req: EmptyRequest; res: ChannelsFeaturedResponse };
|
||||
'channels/follow': { req: ChannelsFollowRequest; res: EmptyResponse };
|
||||
'channels/followed': { req: ChannelsFollowedRequest; res: ChannelsFollowedResponse };
|
||||
'channels/owned': { req: ChannelsOwnedRequest; res: ChannelsOwnedResponse };
|
||||
'channels/show': { req: ChannelsShowRequest; res: ChannelsShowResponse };
|
||||
'channels/timeline': { req: ChannelsTimelineRequest; res: ChannelsTimelineResponse };
|
||||
'channels/unfollow': { req: ChannelsUnfollowRequest; res: EmptyResponse };
|
||||
'channels/update': { req: ChannelsUpdateRequest; res: ChannelsUpdateResponse };
|
||||
'channels/favorite': { req: ChannelsFavoriteRequest; res: EmptyResponse };
|
||||
'channels/unfavorite': { req: ChannelsUnfavoriteRequest; res: EmptyResponse };
|
||||
'channels/my-favorites': { req: EmptyRequest; res: ChannelsMyFavoritesResponse };
|
||||
'channels/search': { req: ChannelsSearchRequest; res: ChannelsSearchResponse };
|
||||
'charts/active-users': { req: ChartsActiveUsersRequest; res: ChartsActiveUsersResponse };
|
||||
'charts/ap-request': { req: ChartsApRequestRequest; res: ChartsApRequestResponse };
|
||||
'charts/drive': { req: ChartsDriveRequest; res: ChartsDriveResponse };
|
||||
'charts/federation': { req: ChartsFederationRequest; res: ChartsFederationResponse };
|
||||
'charts/instance': { req: ChartsInstanceRequest; res: ChartsInstanceResponse };
|
||||
'charts/notes': { req: ChartsNotesRequest; res: ChartsNotesResponse };
|
||||
'charts/user/drive': { req: ChartsUserDriveRequest; res: ChartsUserDriveResponse };
|
||||
'charts/user/following': { req: ChartsUserFollowingRequest; res: ChartsUserFollowingResponse };
|
||||
'charts/user/notes': { req: ChartsUserNotesRequest; res: ChartsUserNotesResponse };
|
||||
'charts/user/pv': { req: ChartsUserPvRequest; res: ChartsUserPvResponse };
|
||||
'charts/user/reactions': { req: ChartsUserReactionsRequest; res: ChartsUserReactionsResponse };
|
||||
'charts/users': { req: ChartsUsersRequest; res: ChartsUsersResponse };
|
||||
'clips/add-note': { req: ClipsAddNoteRequest; res: EmptyResponse };
|
||||
'clips/remove-note': { req: ClipsRemoveNoteRequest; res: EmptyResponse };
|
||||
'clips/create': { req: ClipsCreateRequest; res: ClipsCreateResponse };
|
||||
'clips/delete': { req: ClipsDeleteRequest; res: EmptyResponse };
|
||||
'clips/list': { req: EmptyRequest; res: ClipsListResponse };
|
||||
'clips/notes': { req: ClipsNotesRequest; res: ClipsNotesResponse };
|
||||
'clips/show': { req: ClipsShowRequest; res: ClipsShowResponse };
|
||||
'clips/update': { req: ClipsUpdateRequest; res: ClipsUpdateResponse };
|
||||
'clips/favorite': { req: ClipsFavoriteRequest; res: EmptyResponse };
|
||||
'clips/unfavorite': { req: ClipsUnfavoriteRequest; res: EmptyResponse };
|
||||
'clips/my-favorites': { req: EmptyRequest; res: ClipsMyFavoritesResponse };
|
||||
'drive': { req: EmptyRequest; res: DriveResponse };
|
||||
'drive/files': { req: DriveFilesRequest; res: DriveFilesResponse };
|
||||
'drive/files/attached-notes': { req: DriveFilesAttachedNotesRequest; res: DriveFilesAttachedNotesResponse };
|
||||
'drive/files/check-existence': { req: DriveFilesCheckExistenceRequest; res: DriveFilesCheckExistenceResponse };
|
||||
'drive/files/create': { req: DriveFilesCreateRequest; res: DriveFilesCreateResponse };
|
||||
'drive/files/delete': { req: DriveFilesDeleteRequest; res: EmptyResponse };
|
||||
'drive/files/find-by-hash': { req: DriveFilesFindByHashRequest; res: DriveFilesFindByHashResponse };
|
||||
'drive/files/find': { req: DriveFilesFindRequest; res: DriveFilesFindResponse };
|
||||
'drive/files/show': { req: DriveFilesShowRequest; res: DriveFilesShowResponse };
|
||||
'drive/files/update': { req: DriveFilesUpdateRequest; res: DriveFilesUpdateResponse };
|
||||
'drive/files/upload-from-url': { req: DriveFilesUploadFromUrlRequest; res: EmptyResponse };
|
||||
'drive/folders': { req: DriveFoldersRequest; res: DriveFoldersResponse };
|
||||
'drive/folders/create': { req: DriveFoldersCreateRequest; res: DriveFoldersCreateResponse };
|
||||
'drive/folders/delete': { req: DriveFoldersDeleteRequest; res: EmptyResponse };
|
||||
'drive/folders/find': { req: DriveFoldersFindRequest; res: DriveFoldersFindResponse };
|
||||
'drive/folders/show': { req: DriveFoldersShowRequest; res: DriveFoldersShowResponse };
|
||||
'drive/folders/update': { req: DriveFoldersUpdateRequest; res: DriveFoldersUpdateResponse };
|
||||
'drive/stream': { req: DriveStreamRequest; res: DriveStreamResponse };
|
||||
'email-address/available': { req: EmailAddressAvailableRequest; res: EmailAddressAvailableResponse };
|
||||
'endpoint': { req: EndpointRequest; res: EmptyResponse };
|
||||
'endpoints': { req: EmptyRequest; res: EndpointsResponse };
|
||||
'federation/followers': { req: FederationFollowersRequest; res: FederationFollowersResponse };
|
||||
'federation/following': { req: FederationFollowingRequest; res: FederationFollowingResponse };
|
||||
'federation/instances': { req: FederationInstancesRequest; res: FederationInstancesResponse };
|
||||
'federation/show-instance': { req: FederationShowInstanceRequest; res: FederationShowInstanceResponse };
|
||||
'federation/update-remote-user': { req: FederationUpdateRemoteUserRequest; res: EmptyResponse };
|
||||
'federation/users': { req: FederationUsersRequest; res: FederationUsersResponse };
|
||||
'federation/stats': { req: FederationStatsRequest; res: EmptyResponse };
|
||||
'following/create': { req: FollowingCreateRequest; res: FollowingCreateResponse };
|
||||
'following/delete': { req: FollowingDeleteRequest; res: FollowingDeleteResponse };
|
||||
'following/update': { req: FollowingUpdateRequest; res: FollowingUpdateResponse };
|
||||
'following/update-all': { req: FollowingUpdateAllRequest; res: EmptyResponse };
|
||||
'following/invalidate': { req: FollowingInvalidateRequest; res: FollowingInvalidateResponse };
|
||||
'following/requests/accept': { req: FollowingRequestsAcceptRequest; res: EmptyResponse };
|
||||
'following/requests/cancel': { req: FollowingRequestsCancelRequest; res: FollowingRequestsCancelResponse };
|
||||
'following/requests/list': { req: FollowingRequestsListRequest; res: FollowingRequestsListResponse };
|
||||
'following/requests/reject': { req: FollowingRequestsRejectRequest; res: EmptyResponse };
|
||||
'gallery/featured': { req: GalleryFeaturedRequest; res: GalleryFeaturedResponse };
|
||||
'gallery/popular': { req: EmptyRequest; res: GalleryPopularResponse };
|
||||
'gallery/posts': { req: GalleryPostsRequest; res: GalleryPostsResponse };
|
||||
'gallery/posts/create': { req: GalleryPostsCreateRequest; res: GalleryPostsCreateResponse };
|
||||
'gallery/posts/delete': { req: GalleryPostsDeleteRequest; res: EmptyResponse };
|
||||
'gallery/posts/like': { req: GalleryPostsLikeRequest; res: EmptyResponse };
|
||||
'gallery/posts/show': { req: GalleryPostsShowRequest; res: GalleryPostsShowResponse };
|
||||
'gallery/posts/unlike': { req: GalleryPostsUnlikeRequest; res: EmptyResponse };
|
||||
'gallery/posts/update': { req: GalleryPostsUpdateRequest; res: GalleryPostsUpdateResponse };
|
||||
'get-online-users-count': { req: EmptyRequest; res: EmptyResponse };
|
||||
'get-avatar-decorations': { req: EmptyRequest; res: GetAvatarDecorationsResponse };
|
||||
'hashtags/list': { req: HashtagsListRequest; res: HashtagsListResponse };
|
||||
'hashtags/search': { req: HashtagsSearchRequest; res: HashtagsSearchResponse };
|
||||
'hashtags/show': { req: HashtagsShowRequest; res: HashtagsShowResponse };
|
||||
'hashtags/trend': { req: EmptyRequest; res: HashtagsTrendResponse };
|
||||
'hashtags/users': { req: HashtagsUsersRequest; res: HashtagsUsersResponse };
|
||||
'i': { req: EmptyRequest; res: IResponse };
|
||||
'i/claim-achievement': { req: IClaimAchievementRequest; res: EmptyResponse };
|
||||
'i/favorites': { req: IFavoritesRequest; res: IFavoritesResponse };
|
||||
'i/gallery/likes': { req: IGalleryLikesRequest; res: IGalleryLikesResponse };
|
||||
'i/gallery/posts': { req: IGalleryPostsRequest; res: IGalleryPostsResponse };
|
||||
'i/notifications': { req: INotificationsRequest; res: INotificationsResponse };
|
||||
'i/notifications-grouped': { req: INotificationsGroupedRequest; res: INotificationsGroupedResponse };
|
||||
'i/page-likes': { req: IPageLikesRequest; res: IPageLikesResponse };
|
||||
'i/pages': { req: IPagesRequest; res: IPagesResponse };
|
||||
'i/pin': { req: IPinRequest; res: IPinResponse };
|
||||
'i/read-all-unread-notes': { req: EmptyRequest; res: EmptyResponse };
|
||||
'i/read-announcement': { req: IReadAnnouncementRequest; res: EmptyResponse };
|
||||
'i/registry/get-all': { req: IRegistryGetAllRequest; res: EmptyResponse };
|
||||
'i/registry/get-detail': { req: IRegistryGetDetailRequest; res: EmptyResponse };
|
||||
'i/registry/get': { req: IRegistryGetRequest; res: EmptyResponse };
|
||||
'i/registry/keys-with-type': { req: IRegistryKeysWithTypeRequest; res: EmptyResponse };
|
||||
'i/registry/keys': { req: IRegistryKeysRequest; res: EmptyResponse };
|
||||
'i/registry/remove': { req: IRegistryRemoveRequest; res: EmptyResponse };
|
||||
'i/registry/set': { req: IRegistrySetRequest; res: EmptyResponse };
|
||||
'i/unpin': { req: IUnpinRequest; res: IUnpinResponse };
|
||||
'i/update': { req: IUpdateRequest; res: IUpdateResponse };
|
||||
'i/webhooks/create': { req: IWebhooksCreateRequest; res: EmptyResponse };
|
||||
'i/webhooks/list': { req: EmptyRequest; res: EmptyResponse };
|
||||
'i/webhooks/show': { req: IWebhooksShowRequest; res: EmptyResponse };
|
||||
'i/webhooks/update': { req: IWebhooksUpdateRequest; res: EmptyResponse };
|
||||
'i/webhooks/delete': { req: IWebhooksDeleteRequest; res: EmptyResponse };
|
||||
'invite/create': { req: EmptyRequest; res: InviteCreateResponse };
|
||||
'invite/delete': { req: InviteDeleteRequest; res: EmptyResponse };
|
||||
'invite/list': { req: InviteListRequest; res: InviteListResponse };
|
||||
'invite/limit': { req: EmptyRequest; res: InviteLimitResponse };
|
||||
'meta': { req: MetaRequest; res: MetaResponse };
|
||||
'emojis': { req: EmptyRequest; res: EmojisResponse };
|
||||
'emoji': { req: EmojiRequest; res: EmojiResponse };
|
||||
'mute/create': { req: MuteCreateRequest; res: EmptyResponse };
|
||||
'mute/delete': { req: MuteDeleteRequest; res: EmptyResponse };
|
||||
'mute/list': { req: MuteListRequest; res: MuteListResponse };
|
||||
'renote-mute/create': { req: RenoteMuteCreateRequest; res: EmptyResponse };
|
||||
'renote-mute/delete': { req: RenoteMuteDeleteRequest; res: EmptyResponse };
|
||||
'renote-mute/list': { req: RenoteMuteListRequest; res: RenoteMuteListResponse };
|
||||
'my/apps': { req: MyAppsRequest; res: MyAppsResponse };
|
||||
'notes': { req: NotesRequest; res: NotesResponse };
|
||||
'notes/children': { req: NotesChildrenRequest; res: NotesChildrenResponse };
|
||||
'notes/clips': { req: NotesClipsRequest; res: NotesClipsResponse };
|
||||
'notes/conversation': { req: NotesConversationRequest; res: NotesConversationResponse };
|
||||
'notes/create': { req: NotesCreateRequest; res: NotesCreateResponse };
|
||||
'notes/delete': { req: NotesDeleteRequest; res: EmptyResponse };
|
||||
'notes/favorites/create': { req: NotesFavoritesCreateRequest; res: EmptyResponse };
|
||||
'notes/favorites/delete': { req: NotesFavoritesDeleteRequest; res: EmptyResponse };
|
||||
'notes/featured': { req: NotesFeaturedRequest; res: NotesFeaturedResponse };
|
||||
'notes/global-timeline': { req: NotesGlobalTimelineRequest; res: NotesGlobalTimelineResponse };
|
||||
'notes/hybrid-timeline': { req: NotesHybridTimelineRequest; res: NotesHybridTimelineResponse };
|
||||
'notes/local-timeline': { req: NotesLocalTimelineRequest; res: NotesLocalTimelineResponse };
|
||||
'notes/mentions': { req: NotesMentionsRequest; res: NotesMentionsResponse };
|
||||
'notes/polls/recommendation': { req: NotesPollsRecommendationRequest; res: NotesPollsRecommendationResponse };
|
||||
'notes/polls/vote': { req: NotesPollsVoteRequest; res: EmptyResponse };
|
||||
'notes/reactions': { req: NotesReactionsRequest; res: NotesReactionsResponse };
|
||||
'notes/reactions/create': { req: NotesReactionsCreateRequest; res: EmptyResponse };
|
||||
'notes/reactions/delete': { req: NotesReactionsDeleteRequest; res: EmptyResponse };
|
||||
'notes/renotes': { req: NotesRenotesRequest; res: NotesRenotesResponse };
|
||||
'notes/replies': { req: NotesRepliesRequest; res: NotesRepliesResponse };
|
||||
'notes/search-by-tag': { req: NotesSearchByTagRequest; res: NotesSearchByTagResponse };
|
||||
'notes/search': { req: NotesSearchRequest; res: NotesSearchResponse };
|
||||
'notes/show': { req: NotesShowRequest; res: NotesShowResponse };
|
||||
'notes/state': { req: NotesStateRequest; res: NotesStateResponse };
|
||||
'notes/thread-muting/create': { req: NotesThreadMutingCreateRequest; res: EmptyResponse };
|
||||
'notes/thread-muting/delete': { req: NotesThreadMutingDeleteRequest; res: EmptyResponse };
|
||||
'notes/timeline': { req: NotesTimelineRequest; res: NotesTimelineResponse };
|
||||
'notes/translate': { req: NotesTranslateRequest; res: NotesTranslateResponse };
|
||||
'notes/unrenote': { req: NotesUnrenoteRequest; res: EmptyResponse };
|
||||
'notes/user-list-timeline': { req: NotesUserListTimelineRequest; res: NotesUserListTimelineResponse };
|
||||
'notifications/create': { req: NotificationsCreateRequest; res: EmptyResponse };
|
||||
'notifications/mark-all-as-read': { req: EmptyRequest; res: EmptyResponse };
|
||||
'notifications/test-notification': { req: EmptyRequest; res: EmptyResponse };
|
||||
'pages/create': { req: PagesCreateRequest; res: PagesCreateResponse };
|
||||
'pages/delete': { req: PagesDeleteRequest; res: EmptyResponse };
|
||||
'pages/featured': { req: EmptyRequest; res: PagesFeaturedResponse };
|
||||
'pages/like': { req: PagesLikeRequest; res: EmptyResponse };
|
||||
'pages/show': { req: PagesShowRequest; res: PagesShowResponse };
|
||||
'pages/unlike': { req: PagesUnlikeRequest; res: EmptyResponse };
|
||||
'pages/update': { req: PagesUpdateRequest; res: EmptyResponse };
|
||||
'flash/create': { req: FlashCreateRequest; res: EmptyResponse };
|
||||
'flash/delete': { req: FlashDeleteRequest; res: EmptyResponse };
|
||||
'flash/featured': { req: EmptyRequest; res: FlashFeaturedResponse };
|
||||
'flash/like': { req: FlashLikeRequest; res: EmptyResponse };
|
||||
'flash/show': { req: FlashShowRequest; res: FlashShowResponse };
|
||||
'flash/unlike': { req: FlashUnlikeRequest; res: EmptyResponse };
|
||||
'flash/update': { req: FlashUpdateRequest; res: EmptyResponse };
|
||||
'flash/my': { req: FlashMyRequest; res: FlashMyResponse };
|
||||
'flash/my-likes': { req: FlashMyLikesRequest; res: FlashMyLikesResponse };
|
||||
'ping': { req: EmptyRequest; res: PingResponse };
|
||||
'pinned-users': { req: EmptyRequest; res: PinnedUsersResponse };
|
||||
'promo/read': { req: PromoReadRequest; res: EmptyResponse };
|
||||
'roles/list': { req: EmptyRequest; res: EmptyResponse };
|
||||
'roles/show': { req: RolesShowRequest; res: EmptyResponse };
|
||||
'roles/users': { req: RolesUsersRequest; res: EmptyResponse };
|
||||
'roles/notes': { req: RolesNotesRequest; res: RolesNotesResponse };
|
||||
'request-reset-password': { req: RequestResetPasswordRequest; res: EmptyResponse };
|
||||
'reset-db': { req: EmptyRequest; res: EmptyResponse };
|
||||
'reset-password': { req: ResetPasswordRequest; res: EmptyResponse };
|
||||
'server-info': { req: EmptyRequest; res: EmptyResponse };
|
||||
'stats': { req: EmptyRequest; res: StatsResponse };
|
||||
'sw/show-registration': { req: SwShowRegistrationRequest; res: SwShowRegistrationResponse };
|
||||
'sw/update-registration': { req: SwUpdateRegistrationRequest; res: SwUpdateRegistrationResponse };
|
||||
'sw/register': { req: SwRegisterRequest; res: SwRegisterResponse };
|
||||
'sw/unregister': { req: SwUnregisterRequest; res: EmptyResponse };
|
||||
'test': { req: TestRequest; res: EmptyResponse };
|
||||
'username/available': { req: UsernameAvailableRequest; res: UsernameAvailableResponse };
|
||||
'users': { req: UsersRequest; res: UsersResponse };
|
||||
'users/clips': { req: UsersClipsRequest; res: UsersClipsResponse };
|
||||
'users/followers': { req: UsersFollowersRequest; res: UsersFollowersResponse };
|
||||
'users/following': { req: UsersFollowingRequest; res: UsersFollowingResponse };
|
||||
'users/gallery/posts': { req: UsersGalleryPostsRequest; res: UsersGalleryPostsResponse };
|
||||
'users/get-frequently-replied-users': { req: UsersGetFrequentlyRepliedUsersRequest; res: UsersGetFrequentlyRepliedUsersResponse };
|
||||
'users/featured-notes': { req: UsersFeaturedNotesRequest; res: UsersFeaturedNotesResponse };
|
||||
'users/lists/create': { req: UsersListsCreateRequest; res: UsersListsCreateResponse };
|
||||
'users/lists/delete': { req: UsersListsDeleteRequest; res: EmptyResponse };
|
||||
'users/lists/list': { req: UsersListsListRequest; res: UsersListsListResponse };
|
||||
'users/lists/pull': { req: UsersListsPullRequest; res: EmptyResponse };
|
||||
'users/lists/push': { req: UsersListsPushRequest; res: EmptyResponse };
|
||||
'users/lists/show': { req: UsersListsShowRequest; res: UsersListsShowResponse };
|
||||
'users/lists/favorite': { req: UsersListsFavoriteRequest; res: EmptyResponse };
|
||||
'users/lists/unfavorite': { req: UsersListsUnfavoriteRequest; res: EmptyResponse };
|
||||
'users/lists/update': { req: UsersListsUpdateRequest; res: UsersListsUpdateResponse };
|
||||
'users/lists/create-from-public': { req: UsersListsCreateFromPublicRequest; res: UsersListsCreateFromPublicResponse };
|
||||
'users/lists/update-membership': { req: UsersListsUpdateMembershipRequest; res: EmptyResponse };
|
||||
'users/lists/get-memberships': { req: UsersListsGetMembershipsRequest; res: EmptyResponse };
|
||||
'users/notes': { req: UsersNotesRequest; res: UsersNotesResponse };
|
||||
'users/pages': { req: UsersPagesRequest; res: UsersPagesResponse };
|
||||
'users/flashs': { req: UsersFlashsRequest; res: UsersFlashsResponse };
|
||||
'users/reactions': { req: UsersReactionsRequest; res: UsersReactionsResponse };
|
||||
'users/recommendation': { req: UsersRecommendationRequest; res: UsersRecommendationResponse };
|
||||
'users/relation': { req: UsersRelationRequest; res: UsersRelationResponse };
|
||||
'users/report-abuse': { req: UsersReportAbuseRequest; res: EmptyResponse };
|
||||
'users/search-by-username-and-host': { req: UsersSearchByUsernameAndHostRequest; res: UsersSearchByUsernameAndHostResponse };
|
||||
'users/search': { req: UsersSearchRequest; res: UsersSearchResponse };
|
||||
'users/show': { req: UsersShowRequest; res: UsersShowResponse };
|
||||
'users/achievements': { req: UsersAchievementsRequest; res: EmptyResponse };
|
||||
'users/update-memo': { req: UsersUpdateMemoRequest; res: EmptyResponse };
|
||||
'fetch-rss': { req: FetchRssRequest; res: EmptyResponse };
|
||||
'fetch-external-resources': { req: FetchExternalResourcesRequest; res: EmptyResponse };
|
||||
'retention': { req: EmptyRequest; res: RetentionResponse };
|
||||
}
|
478
packages/misskey-js/src/autogen/entities.ts
Normal file
478
packages/misskey-js/src/autogen/entities.ts
Normal file
|
@ -0,0 +1,478 @@
|
|||
/*
|
||||
* version: 2023.11.1
|
||||
* generatedAt: 2023-11-27T02:24:45.111Z
|
||||
*/
|
||||
|
||||
import { operations } from './types.js';
|
||||
|
||||
export type EmptyRequest = Record<string, unknown> | undefined;
|
||||
export type EmptyResponse = Record<string, unknown> | undefined;
|
||||
|
||||
export type AdminMetaResponse = operations['admin/meta']['responses']['200']['content']['application/json'];
|
||||
export type AdminAbuseUserReportsRequest = operations['admin/abuse-user-reports']['requestBody']['content']['application/json'];
|
||||
export type AdminAbuseUserReportsResponse = operations['admin/abuse-user-reports']['responses']['200']['content']['application/json'];
|
||||
export type AdminAccountsCreateRequest = operations['admin/accounts/create']['requestBody']['content']['application/json'];
|
||||
export type AdminAccountsCreateResponse = operations['admin/accounts/create']['responses']['200']['content']['application/json'];
|
||||
export type AdminAccountsDeleteRequest = operations['admin/accounts/delete']['requestBody']['content']['application/json'];
|
||||
export type AdminAccountsFindByEmailRequest = operations['admin/accounts/find-by-email']['requestBody']['content']['application/json'];
|
||||
export type AdminAdCreateRequest = operations['admin/ad/create']['requestBody']['content']['application/json'];
|
||||
export type AdminAdDeleteRequest = operations['admin/ad/delete']['requestBody']['content']['application/json'];
|
||||
export type AdminAdListRequest = operations['admin/ad/list']['requestBody']['content']['application/json'];
|
||||
export type AdminAdUpdateRequest = operations['admin/ad/update']['requestBody']['content']['application/json'];
|
||||
export type AdminAnnouncementsCreateRequest = operations['admin/announcements/create']['requestBody']['content']['application/json'];
|
||||
export type AdminAnnouncementsCreateResponse = operations['admin/announcements/create']['responses']['200']['content']['application/json'];
|
||||
export type AdminAnnouncementsDeleteRequest = operations['admin/announcements/delete']['requestBody']['content']['application/json'];
|
||||
export type AdminAnnouncementsListRequest = operations['admin/announcements/list']['requestBody']['content']['application/json'];
|
||||
export type AdminAnnouncementsListResponse = operations['admin/announcements/list']['responses']['200']['content']['application/json'];
|
||||
export type AdminAnnouncementsUpdateRequest = operations['admin/announcements/update']['requestBody']['content']['application/json'];
|
||||
export type AdminAvatarDecorationsCreateRequest = operations['admin/avatar-decorations/create']['requestBody']['content']['application/json'];
|
||||
export type AdminAvatarDecorationsDeleteRequest = operations['admin/avatar-decorations/delete']['requestBody']['content']['application/json'];
|
||||
export type AdminAvatarDecorationsListRequest = operations['admin/avatar-decorations/list']['requestBody']['content']['application/json'];
|
||||
export type AdminAvatarDecorationsListResponse = operations['admin/avatar-decorations/list']['responses']['200']['content']['application/json'];
|
||||
export type AdminAvatarDecorationsUpdateRequest = operations['admin/avatar-decorations/update']['requestBody']['content']['application/json'];
|
||||
export type AdminDeleteAllFilesOfAUserRequest = operations['admin/delete-all-files-of-a-user']['requestBody']['content']['application/json'];
|
||||
export type AdminUnsetUserAvatarRequest = operations['admin/unset-user-avatar']['requestBody']['content']['application/json'];
|
||||
export type AdminUnsetUserBannerRequest = operations['admin/unset-user-banner']['requestBody']['content']['application/json'];
|
||||
export type AdminDriveFilesRequest = operations['admin/drive/files']['requestBody']['content']['application/json'];
|
||||
export type AdminDriveFilesResponse = operations['admin/drive/files']['responses']['200']['content']['application/json'];
|
||||
export type AdminDriveShowFileRequest = operations['admin/drive/show-file']['requestBody']['content']['application/json'];
|
||||
export type AdminDriveShowFileResponse = operations['admin/drive/show-file']['responses']['200']['content']['application/json'];
|
||||
export type AdminEmojiAddAliasesBulkRequest = operations['admin/emoji/add-aliases-bulk']['requestBody']['content']['application/json'];
|
||||
export type AdminEmojiAddRequest = operations['admin/emoji/add']['requestBody']['content']['application/json'];
|
||||
export type AdminEmojiCopyRequest = operations['admin/emoji/copy']['requestBody']['content']['application/json'];
|
||||
export type AdminEmojiCopyResponse = operations['admin/emoji/copy']['responses']['200']['content']['application/json'];
|
||||
export type AdminEmojiDeleteBulkRequest = operations['admin/emoji/delete-bulk']['requestBody']['content']['application/json'];
|
||||
export type AdminEmojiDeleteRequest = operations['admin/emoji/delete']['requestBody']['content']['application/json'];
|
||||
export type AdminEmojiListRemoteRequest = operations['admin/emoji/list-remote']['requestBody']['content']['application/json'];
|
||||
export type AdminEmojiListRemoteResponse = operations['admin/emoji/list-remote']['responses']['200']['content']['application/json'];
|
||||
export type AdminEmojiListRequest = operations['admin/emoji/list']['requestBody']['content']['application/json'];
|
||||
export type AdminEmojiListResponse = operations['admin/emoji/list']['responses']['200']['content']['application/json'];
|
||||
export type AdminEmojiRemoveAliasesBulkRequest = operations['admin/emoji/remove-aliases-bulk']['requestBody']['content']['application/json'];
|
||||
export type AdminEmojiSetAliasesBulkRequest = operations['admin/emoji/set-aliases-bulk']['requestBody']['content']['application/json'];
|
||||
export type AdminEmojiSetCategoryBulkRequest = operations['admin/emoji/set-category-bulk']['requestBody']['content']['application/json'];
|
||||
export type AdminEmojiSetLicenseBulkRequest = operations['admin/emoji/set-license-bulk']['requestBody']['content']['application/json'];
|
||||
export type AdminEmojiUpdateRequest = operations['admin/emoji/update']['requestBody']['content']['application/json'];
|
||||
export type AdminFederationDeleteAllFilesRequest = operations['admin/federation/delete-all-files']['requestBody']['content']['application/json'];
|
||||
export type AdminFederationRefreshRemoteInstanceMetadataRequest = operations['admin/federation/refresh-remote-instance-metadata']['requestBody']['content']['application/json'];
|
||||
export type AdminFederationRemoveAllFollowingRequest = operations['admin/federation/remove-all-following']['requestBody']['content']['application/json'];
|
||||
export type AdminFederationUpdateInstanceRequest = operations['admin/federation/update-instance']['requestBody']['content']['application/json'];
|
||||
export type AdminGetTableStatsResponse = operations['admin/get-table-stats']['responses']['200']['content']['application/json'];
|
||||
export type AdminGetUserIpsRequest = operations['admin/get-user-ips']['requestBody']['content']['application/json'];
|
||||
export type AdminInviteCreateRequest = operations['admin/invite/create']['requestBody']['content']['application/json'];
|
||||
export type AdminInviteCreateResponse = operations['admin/invite/create']['responses']['200']['content']['application/json'];
|
||||
export type AdminInviteListRequest = operations['admin/invite/list']['requestBody']['content']['application/json'];
|
||||
export type AdminInviteListResponse = operations['admin/invite/list']['responses']['200']['content']['application/json'];
|
||||
export type AdminPromoCreateRequest = operations['admin/promo/create']['requestBody']['content']['application/json'];
|
||||
export type AdminQueueDeliverDelayedResponse = operations['admin/queue/deliver-delayed']['responses']['200']['content']['application/json'];
|
||||
export type AdminQueueInboxDelayedResponse = operations['admin/queue/inbox-delayed']['responses']['200']['content']['application/json'];
|
||||
export type AdminQueuePromoteRequest = operations['admin/queue/promote']['requestBody']['content']['application/json'];
|
||||
export type AdminQueueStatsResponse = operations['admin/queue/stats']['responses']['200']['content']['application/json'];
|
||||
export type AdminRelaysAddRequest = operations['admin/relays/add']['requestBody']['content']['application/json'];
|
||||
export type AdminRelaysAddResponse = operations['admin/relays/add']['responses']['200']['content']['application/json'];
|
||||
export type AdminRelaysListResponse = operations['admin/relays/list']['responses']['200']['content']['application/json'];
|
||||
export type AdminRelaysRemoveRequest = operations['admin/relays/remove']['requestBody']['content']['application/json'];
|
||||
export type AdminResetPasswordRequest = operations['admin/reset-password']['requestBody']['content']['application/json'];
|
||||
export type AdminResetPasswordResponse = operations['admin/reset-password']['responses']['200']['content']['application/json'];
|
||||
export type AdminResolveAbuseUserReportRequest = operations['admin/resolve-abuse-user-report']['requestBody']['content']['application/json'];
|
||||
export type AdminSendEmailRequest = operations['admin/send-email']['requestBody']['content']['application/json'];
|
||||
export type AdminServerInfoResponse = operations['admin/server-info']['responses']['200']['content']['application/json'];
|
||||
export type AdminShowModerationLogsRequest = operations['admin/show-moderation-logs']['requestBody']['content']['application/json'];
|
||||
export type AdminShowModerationLogsResponse = operations['admin/show-moderation-logs']['responses']['200']['content']['application/json'];
|
||||
export type AdminShowUserRequest = operations['admin/show-user']['requestBody']['content']['application/json'];
|
||||
export type AdminShowUserResponse = operations['admin/show-user']['responses']['200']['content']['application/json'];
|
||||
export type AdminShowUsersRequest = operations['admin/show-users']['requestBody']['content']['application/json'];
|
||||
export type AdminShowUsersResponse = operations['admin/show-users']['responses']['200']['content']['application/json'];
|
||||
export type AdminSuspendUserRequest = operations['admin/suspend-user']['requestBody']['content']['application/json'];
|
||||
export type AdminUnsuspendUserRequest = operations['admin/unsuspend-user']['requestBody']['content']['application/json'];
|
||||
export type AdminUpdateMetaRequest = operations['admin/update-meta']['requestBody']['content']['application/json'];
|
||||
export type AdminDeleteAccountRequest = operations['admin/delete-account']['requestBody']['content']['application/json'];
|
||||
export type AdminDeleteAccountResponse = operations['admin/delete-account']['responses']['200']['content']['application/json'];
|
||||
export type AdminUpdateUserNoteRequest = operations['admin/update-user-note']['requestBody']['content']['application/json'];
|
||||
export type AdminRolesCreateRequest = operations['admin/roles/create']['requestBody']['content']['application/json'];
|
||||
export type AdminRolesDeleteRequest = operations['admin/roles/delete']['requestBody']['content']['application/json'];
|
||||
export type AdminRolesShowRequest = operations['admin/roles/show']['requestBody']['content']['application/json'];
|
||||
export type AdminRolesUpdateRequest = operations['admin/roles/update']['requestBody']['content']['application/json'];
|
||||
export type AdminRolesAssignRequest = operations['admin/roles/assign']['requestBody']['content']['application/json'];
|
||||
export type AdminRolesUnassignRequest = operations['admin/roles/unassign']['requestBody']['content']['application/json'];
|
||||
export type AdminRolesUpdateDefaultPoliciesRequest = operations['admin/roles/update-default-policies']['requestBody']['content']['application/json'];
|
||||
export type AdminRolesUsersRequest = operations['admin/roles/users']['requestBody']['content']['application/json'];
|
||||
export type AnnouncementsRequest = operations['announcements']['requestBody']['content']['application/json'];
|
||||
export type AnnouncementsResponse = operations['announcements']['responses']['200']['content']['application/json'];
|
||||
export type AntennasCreateRequest = operations['antennas/create']['requestBody']['content']['application/json'];
|
||||
export type AntennasCreateResponse = operations['antennas/create']['responses']['200']['content']['application/json'];
|
||||
export type AntennasDeleteRequest = operations['antennas/delete']['requestBody']['content']['application/json'];
|
||||
export type AntennasListResponse = operations['antennas/list']['responses']['200']['content']['application/json'];
|
||||
export type AntennasNotesRequest = operations['antennas/notes']['requestBody']['content']['application/json'];
|
||||
export type AntennasNotesResponse = operations['antennas/notes']['responses']['200']['content']['application/json'];
|
||||
export type AntennasShowRequest = operations['antennas/show']['requestBody']['content']['application/json'];
|
||||
export type AntennasShowResponse = operations['antennas/show']['responses']['200']['content']['application/json'];
|
||||
export type AntennasUpdateRequest = operations['antennas/update']['requestBody']['content']['application/json'];
|
||||
export type AntennasUpdateResponse = operations['antennas/update']['responses']['200']['content']['application/json'];
|
||||
export type ApGetRequest = operations['ap/get']['requestBody']['content']['application/json'];
|
||||
export type ApGetResponse = operations['ap/get']['responses']['200']['content']['application/json'];
|
||||
export type ApShowRequest = operations['ap/show']['requestBody']['content']['application/json'];
|
||||
export type ApShowResponse = operations['ap/show']['responses']['200']['content']['application/json'];
|
||||
export type AppCreateRequest = operations['app/create']['requestBody']['content']['application/json'];
|
||||
export type AppCreateResponse = operations['app/create']['responses']['200']['content']['application/json'];
|
||||
export type AppShowRequest = operations['app/show']['requestBody']['content']['application/json'];
|
||||
export type AppShowResponse = operations['app/show']['responses']['200']['content']['application/json'];
|
||||
export type AuthSessionGenerateRequest = operations['auth/session/generate']['requestBody']['content']['application/json'];
|
||||
export type AuthSessionGenerateResponse = operations['auth/session/generate']['responses']['200']['content']['application/json'];
|
||||
export type AuthSessionShowRequest = operations['auth/session/show']['requestBody']['content']['application/json'];
|
||||
export type AuthSessionShowResponse = operations['auth/session/show']['responses']['200']['content']['application/json'];
|
||||
export type AuthSessionUserkeyRequest = operations['auth/session/userkey']['requestBody']['content']['application/json'];
|
||||
export type AuthSessionUserkeyResponse = operations['auth/session/userkey']['responses']['200']['content']['application/json'];
|
||||
export type BlockingCreateRequest = operations['blocking/create']['requestBody']['content']['application/json'];
|
||||
export type BlockingCreateResponse = operations['blocking/create']['responses']['200']['content']['application/json'];
|
||||
export type BlockingDeleteRequest = operations['blocking/delete']['requestBody']['content']['application/json'];
|
||||
export type BlockingDeleteResponse = operations['blocking/delete']['responses']['200']['content']['application/json'];
|
||||
export type BlockingListRequest = operations['blocking/list']['requestBody']['content']['application/json'];
|
||||
export type BlockingListResponse = operations['blocking/list']['responses']['200']['content']['application/json'];
|
||||
export type ChannelsCreateRequest = operations['channels/create']['requestBody']['content']['application/json'];
|
||||
export type ChannelsCreateResponse = operations['channels/create']['responses']['200']['content']['application/json'];
|
||||
export type ChannelsFeaturedResponse = operations['channels/featured']['responses']['200']['content']['application/json'];
|
||||
export type ChannelsFollowRequest = operations['channels/follow']['requestBody']['content']['application/json'];
|
||||
export type ChannelsFollowedRequest = operations['channels/followed']['requestBody']['content']['application/json'];
|
||||
export type ChannelsFollowedResponse = operations['channels/followed']['responses']['200']['content']['application/json'];
|
||||
export type ChannelsOwnedRequest = operations['channels/owned']['requestBody']['content']['application/json'];
|
||||
export type ChannelsOwnedResponse = operations['channels/owned']['responses']['200']['content']['application/json'];
|
||||
export type ChannelsShowRequest = operations['channels/show']['requestBody']['content']['application/json'];
|
||||
export type ChannelsShowResponse = operations['channels/show']['responses']['200']['content']['application/json'];
|
||||
export type ChannelsTimelineRequest = operations['channels/timeline']['requestBody']['content']['application/json'];
|
||||
export type ChannelsTimelineResponse = operations['channels/timeline']['responses']['200']['content']['application/json'];
|
||||
export type ChannelsUnfollowRequest = operations['channels/unfollow']['requestBody']['content']['application/json'];
|
||||
export type ChannelsUpdateRequest = operations['channels/update']['requestBody']['content']['application/json'];
|
||||
export type ChannelsUpdateResponse = operations['channels/update']['responses']['200']['content']['application/json'];
|
||||
export type ChannelsFavoriteRequest = operations['channels/favorite']['requestBody']['content']['application/json'];
|
||||
export type ChannelsUnfavoriteRequest = operations['channels/unfavorite']['requestBody']['content']['application/json'];
|
||||
export type ChannelsMyFavoritesResponse = operations['channels/my-favorites']['responses']['200']['content']['application/json'];
|
||||
export type ChannelsSearchRequest = operations['channels/search']['requestBody']['content']['application/json'];
|
||||
export type ChannelsSearchResponse = operations['channels/search']['responses']['200']['content']['application/json'];
|
||||
export type ChartsActiveUsersRequest = operations['charts/active-users']['requestBody']['content']['application/json'];
|
||||
export type ChartsActiveUsersResponse = operations['charts/active-users']['responses']['200']['content']['application/json'];
|
||||
export type ChartsApRequestRequest = operations['charts/ap-request']['requestBody']['content']['application/json'];
|
||||
export type ChartsApRequestResponse = operations['charts/ap-request']['responses']['200']['content']['application/json'];
|
||||
export type ChartsDriveRequest = operations['charts/drive']['requestBody']['content']['application/json'];
|
||||
export type ChartsDriveResponse = operations['charts/drive']['responses']['200']['content']['application/json'];
|
||||
export type ChartsFederationRequest = operations['charts/federation']['requestBody']['content']['application/json'];
|
||||
export type ChartsFederationResponse = operations['charts/federation']['responses']['200']['content']['application/json'];
|
||||
export type ChartsInstanceRequest = operations['charts/instance']['requestBody']['content']['application/json'];
|
||||
export type ChartsInstanceResponse = operations['charts/instance']['responses']['200']['content']['application/json'];
|
||||
export type ChartsNotesRequest = operations['charts/notes']['requestBody']['content']['application/json'];
|
||||
export type ChartsNotesResponse = operations['charts/notes']['responses']['200']['content']['application/json'];
|
||||
export type ChartsUserDriveRequest = operations['charts/user/drive']['requestBody']['content']['application/json'];
|
||||
export type ChartsUserDriveResponse = operations['charts/user/drive']['responses']['200']['content']['application/json'];
|
||||
export type ChartsUserFollowingRequest = operations['charts/user/following']['requestBody']['content']['application/json'];
|
||||
export type ChartsUserFollowingResponse = operations['charts/user/following']['responses']['200']['content']['application/json'];
|
||||
export type ChartsUserNotesRequest = operations['charts/user/notes']['requestBody']['content']['application/json'];
|
||||
export type ChartsUserNotesResponse = operations['charts/user/notes']['responses']['200']['content']['application/json'];
|
||||
export type ChartsUserPvRequest = operations['charts/user/pv']['requestBody']['content']['application/json'];
|
||||
export type ChartsUserPvResponse = operations['charts/user/pv']['responses']['200']['content']['application/json'];
|
||||
export type ChartsUserReactionsRequest = operations['charts/user/reactions']['requestBody']['content']['application/json'];
|
||||
export type ChartsUserReactionsResponse = operations['charts/user/reactions']['responses']['200']['content']['application/json'];
|
||||
export type ChartsUsersRequest = operations['charts/users']['requestBody']['content']['application/json'];
|
||||
export type ChartsUsersResponse = operations['charts/users']['responses']['200']['content']['application/json'];
|
||||
export type ClipsAddNoteRequest = operations['clips/add-note']['requestBody']['content']['application/json'];
|
||||
export type ClipsRemoveNoteRequest = operations['clips/remove-note']['requestBody']['content']['application/json'];
|
||||
export type ClipsCreateRequest = operations['clips/create']['requestBody']['content']['application/json'];
|
||||
export type ClipsCreateResponse = operations['clips/create']['responses']['200']['content']['application/json'];
|
||||
export type ClipsDeleteRequest = operations['clips/delete']['requestBody']['content']['application/json'];
|
||||
export type ClipsListResponse = operations['clips/list']['responses']['200']['content']['application/json'];
|
||||
export type ClipsNotesRequest = operations['clips/notes']['requestBody']['content']['application/json'];
|
||||
export type ClipsNotesResponse = operations['clips/notes']['responses']['200']['content']['application/json'];
|
||||
export type ClipsShowRequest = operations['clips/show']['requestBody']['content']['application/json'];
|
||||
export type ClipsShowResponse = operations['clips/show']['responses']['200']['content']['application/json'];
|
||||
export type ClipsUpdateRequest = operations['clips/update']['requestBody']['content']['application/json'];
|
||||
export type ClipsUpdateResponse = operations['clips/update']['responses']['200']['content']['application/json'];
|
||||
export type ClipsFavoriteRequest = operations['clips/favorite']['requestBody']['content']['application/json'];
|
||||
export type ClipsUnfavoriteRequest = operations['clips/unfavorite']['requestBody']['content']['application/json'];
|
||||
export type ClipsMyFavoritesResponse = operations['clips/my-favorites']['responses']['200']['content']['application/json'];
|
||||
export type DriveResponse = operations['drive']['responses']['200']['content']['application/json'];
|
||||
export type DriveFilesRequest = operations['drive/files']['requestBody']['content']['application/json'];
|
||||
export type DriveFilesResponse = operations['drive/files']['responses']['200']['content']['application/json'];
|
||||
export type DriveFilesAttachedNotesRequest = operations['drive/files/attached-notes']['requestBody']['content']['application/json'];
|
||||
export type DriveFilesAttachedNotesResponse = operations['drive/files/attached-notes']['responses']['200']['content']['application/json'];
|
||||
export type DriveFilesCheckExistenceRequest = operations['drive/files/check-existence']['requestBody']['content']['application/json'];
|
||||
export type DriveFilesCheckExistenceResponse = operations['drive/files/check-existence']['responses']['200']['content']['application/json'];
|
||||
export type DriveFilesCreateRequest = operations['drive/files/create']['requestBody']['content']['multipart/form-data'];
|
||||
export type DriveFilesCreateResponse = operations['drive/files/create']['responses']['200']['content']['application/json'];
|
||||
export type DriveFilesDeleteRequest = operations['drive/files/delete']['requestBody']['content']['application/json'];
|
||||
export type DriveFilesFindByHashRequest = operations['drive/files/find-by-hash']['requestBody']['content']['application/json'];
|
||||
export type DriveFilesFindByHashResponse = operations['drive/files/find-by-hash']['responses']['200']['content']['application/json'];
|
||||
export type DriveFilesFindRequest = operations['drive/files/find']['requestBody']['content']['application/json'];
|
||||
export type DriveFilesFindResponse = operations['drive/files/find']['responses']['200']['content']['application/json'];
|
||||
export type DriveFilesShowRequest = operations['drive/files/show']['requestBody']['content']['application/json'];
|
||||
export type DriveFilesShowResponse = operations['drive/files/show']['responses']['200']['content']['application/json'];
|
||||
export type DriveFilesUpdateRequest = operations['drive/files/update']['requestBody']['content']['application/json'];
|
||||
export type DriveFilesUpdateResponse = operations['drive/files/update']['responses']['200']['content']['application/json'];
|
||||
export type DriveFilesUploadFromUrlRequest = operations['drive/files/upload-from-url']['requestBody']['content']['application/json'];
|
||||
export type DriveFoldersRequest = operations['drive/folders']['requestBody']['content']['application/json'];
|
||||
export type DriveFoldersResponse = operations['drive/folders']['responses']['200']['content']['application/json'];
|
||||
export type DriveFoldersCreateRequest = operations['drive/folders/create']['requestBody']['content']['application/json'];
|
||||
export type DriveFoldersCreateResponse = operations['drive/folders/create']['responses']['200']['content']['application/json'];
|
||||
export type DriveFoldersDeleteRequest = operations['drive/folders/delete']['requestBody']['content']['application/json'];
|
||||
export type DriveFoldersFindRequest = operations['drive/folders/find']['requestBody']['content']['application/json'];
|
||||
export type DriveFoldersFindResponse = operations['drive/folders/find']['responses']['200']['content']['application/json'];
|
||||
export type DriveFoldersShowRequest = operations['drive/folders/show']['requestBody']['content']['application/json'];
|
||||
export type DriveFoldersShowResponse = operations['drive/folders/show']['responses']['200']['content']['application/json'];
|
||||
export type DriveFoldersUpdateRequest = operations['drive/folders/update']['requestBody']['content']['application/json'];
|
||||
export type DriveFoldersUpdateResponse = operations['drive/folders/update']['responses']['200']['content']['application/json'];
|
||||
export type DriveStreamRequest = operations['drive/stream']['requestBody']['content']['application/json'];
|
||||
export type DriveStreamResponse = operations['drive/stream']['responses']['200']['content']['application/json'];
|
||||
export type EmailAddressAvailableRequest = operations['email-address/available']['requestBody']['content']['application/json'];
|
||||
export type EmailAddressAvailableResponse = operations['email-address/available']['responses']['200']['content']['application/json'];
|
||||
export type EndpointRequest = operations['endpoint']['requestBody']['content']['application/json'];
|
||||
export type EndpointsResponse = operations['endpoints']['responses']['200']['content']['application/json'];
|
||||
export type FederationFollowersRequest = operations['federation/followers']['requestBody']['content']['application/json'];
|
||||
export type FederationFollowersResponse = operations['federation/followers']['responses']['200']['content']['application/json'];
|
||||
export type FederationFollowingRequest = operations['federation/following']['requestBody']['content']['application/json'];
|
||||
export type FederationFollowingResponse = operations['federation/following']['responses']['200']['content']['application/json'];
|
||||
export type FederationInstancesRequest = operations['federation/instances']['requestBody']['content']['application/json'];
|
||||
export type FederationInstancesResponse = operations['federation/instances']['responses']['200']['content']['application/json'];
|
||||
export type FederationShowInstanceRequest = operations['federation/show-instance']['requestBody']['content']['application/json'];
|
||||
export type FederationShowInstanceResponse = operations['federation/show-instance']['responses']['200']['content']['application/json'];
|
||||
export type FederationUpdateRemoteUserRequest = operations['federation/update-remote-user']['requestBody']['content']['application/json'];
|
||||
export type FederationUsersRequest = operations['federation/users']['requestBody']['content']['application/json'];
|
||||
export type FederationUsersResponse = operations['federation/users']['responses']['200']['content']['application/json'];
|
||||
export type FederationStatsRequest = operations['federation/stats']['requestBody']['content']['application/json'];
|
||||
export type FollowingCreateRequest = operations['following/create']['requestBody']['content']['application/json'];
|
||||
export type FollowingCreateResponse = operations['following/create']['responses']['200']['content']['application/json'];
|
||||
export type FollowingDeleteRequest = operations['following/delete']['requestBody']['content']['application/json'];
|
||||
export type FollowingDeleteResponse = operations['following/delete']['responses']['200']['content']['application/json'];
|
||||
export type FollowingUpdateRequest = operations['following/update']['requestBody']['content']['application/json'];
|
||||
export type FollowingUpdateResponse = operations['following/update']['responses']['200']['content']['application/json'];
|
||||
export type FollowingUpdateAllRequest = operations['following/update-all']['requestBody']['content']['application/json'];
|
||||
export type FollowingInvalidateRequest = operations['following/invalidate']['requestBody']['content']['application/json'];
|
||||
export type FollowingInvalidateResponse = operations['following/invalidate']['responses']['200']['content']['application/json'];
|
||||
export type FollowingRequestsAcceptRequest = operations['following/requests/accept']['requestBody']['content']['application/json'];
|
||||
export type FollowingRequestsCancelRequest = operations['following/requests/cancel']['requestBody']['content']['application/json'];
|
||||
export type FollowingRequestsCancelResponse = operations['following/requests/cancel']['responses']['200']['content']['application/json'];
|
||||
export type FollowingRequestsListRequest = operations['following/requests/list']['requestBody']['content']['application/json'];
|
||||
export type FollowingRequestsListResponse = operations['following/requests/list']['responses']['200']['content']['application/json'];
|
||||
export type FollowingRequestsRejectRequest = operations['following/requests/reject']['requestBody']['content']['application/json'];
|
||||
export type GalleryFeaturedRequest = operations['gallery/featured']['requestBody']['content']['application/json'];
|
||||
export type GalleryFeaturedResponse = operations['gallery/featured']['responses']['200']['content']['application/json'];
|
||||
export type GalleryPopularResponse = operations['gallery/popular']['responses']['200']['content']['application/json'];
|
||||
export type GalleryPostsRequest = operations['gallery/posts']['requestBody']['content']['application/json'];
|
||||
export type GalleryPostsResponse = operations['gallery/posts']['responses']['200']['content']['application/json'];
|
||||
export type GalleryPostsCreateRequest = operations['gallery/posts/create']['requestBody']['content']['application/json'];
|
||||
export type GalleryPostsCreateResponse = operations['gallery/posts/create']['responses']['200']['content']['application/json'];
|
||||
export type GalleryPostsDeleteRequest = operations['gallery/posts/delete']['requestBody']['content']['application/json'];
|
||||
export type GalleryPostsLikeRequest = operations['gallery/posts/like']['requestBody']['content']['application/json'];
|
||||
export type GalleryPostsShowRequest = operations['gallery/posts/show']['requestBody']['content']['application/json'];
|
||||
export type GalleryPostsShowResponse = operations['gallery/posts/show']['responses']['200']['content']['application/json'];
|
||||
export type GalleryPostsUnlikeRequest = operations['gallery/posts/unlike']['requestBody']['content']['application/json'];
|
||||
export type GalleryPostsUpdateRequest = operations['gallery/posts/update']['requestBody']['content']['application/json'];
|
||||
export type GalleryPostsUpdateResponse = operations['gallery/posts/update']['responses']['200']['content']['application/json'];
|
||||
export type GetAvatarDecorationsResponse = operations['get-avatar-decorations']['responses']['200']['content']['application/json'];
|
||||
export type HashtagsListRequest = operations['hashtags/list']['requestBody']['content']['application/json'];
|
||||
export type HashtagsListResponse = operations['hashtags/list']['responses']['200']['content']['application/json'];
|
||||
export type HashtagsSearchRequest = operations['hashtags/search']['requestBody']['content']['application/json'];
|
||||
export type HashtagsSearchResponse = operations['hashtags/search']['responses']['200']['content']['application/json'];
|
||||
export type HashtagsShowRequest = operations['hashtags/show']['requestBody']['content']['application/json'];
|
||||
export type HashtagsShowResponse = operations['hashtags/show']['responses']['200']['content']['application/json'];
|
||||
export type HashtagsTrendResponse = operations['hashtags/trend']['responses']['200']['content']['application/json'];
|
||||
export type HashtagsUsersRequest = operations['hashtags/users']['requestBody']['content']['application/json'];
|
||||
export type HashtagsUsersResponse = operations['hashtags/users']['responses']['200']['content']['application/json'];
|
||||
export type IResponse = operations['i']['responses']['200']['content']['application/json'];
|
||||
export type IClaimAchievementRequest = operations['i/claim-achievement']['requestBody']['content']['application/json'];
|
||||
export type IFavoritesRequest = operations['i/favorites']['requestBody']['content']['application/json'];
|
||||
export type IFavoritesResponse = operations['i/favorites']['responses']['200']['content']['application/json'];
|
||||
export type IGalleryLikesRequest = operations['i/gallery/likes']['requestBody']['content']['application/json'];
|
||||
export type IGalleryLikesResponse = operations['i/gallery/likes']['responses']['200']['content']['application/json'];
|
||||
export type IGalleryPostsRequest = operations['i/gallery/posts']['requestBody']['content']['application/json'];
|
||||
export type IGalleryPostsResponse = operations['i/gallery/posts']['responses']['200']['content']['application/json'];
|
||||
export type INotificationsRequest = operations['i/notifications']['requestBody']['content']['application/json'];
|
||||
export type INotificationsResponse = operations['i/notifications']['responses']['200']['content']['application/json'];
|
||||
export type INotificationsGroupedRequest = operations['i/notifications-grouped']['requestBody']['content']['application/json'];
|
||||
export type INotificationsGroupedResponse = operations['i/notifications-grouped']['responses']['200']['content']['application/json'];
|
||||
export type IPageLikesRequest = operations['i/page-likes']['requestBody']['content']['application/json'];
|
||||
export type IPageLikesResponse = operations['i/page-likes']['responses']['200']['content']['application/json'];
|
||||
export type IPagesRequest = operations['i/pages']['requestBody']['content']['application/json'];
|
||||
export type IPagesResponse = operations['i/pages']['responses']['200']['content']['application/json'];
|
||||
export type IPinRequest = operations['i/pin']['requestBody']['content']['application/json'];
|
||||
export type IPinResponse = operations['i/pin']['responses']['200']['content']['application/json'];
|
||||
export type IReadAnnouncementRequest = operations['i/read-announcement']['requestBody']['content']['application/json'];
|
||||
export type IRegistryGetAllRequest = operations['i/registry/get-all']['requestBody']['content']['application/json'];
|
||||
export type IRegistryGetDetailRequest = operations['i/registry/get-detail']['requestBody']['content']['application/json'];
|
||||
export type IRegistryGetRequest = operations['i/registry/get']['requestBody']['content']['application/json'];
|
||||
export type IRegistryKeysWithTypeRequest = operations['i/registry/keys-with-type']['requestBody']['content']['application/json'];
|
||||
export type IRegistryKeysRequest = operations['i/registry/keys']['requestBody']['content']['application/json'];
|
||||
export type IRegistryRemoveRequest = operations['i/registry/remove']['requestBody']['content']['application/json'];
|
||||
export type IRegistrySetRequest = operations['i/registry/set']['requestBody']['content']['application/json'];
|
||||
export type IUnpinRequest = operations['i/unpin']['requestBody']['content']['application/json'];
|
||||
export type IUnpinResponse = operations['i/unpin']['responses']['200']['content']['application/json'];
|
||||
export type IUpdateRequest = operations['i/update']['requestBody']['content']['application/json'];
|
||||
export type IUpdateResponse = operations['i/update']['responses']['200']['content']['application/json'];
|
||||
export type IWebhooksCreateRequest = operations['i/webhooks/create']['requestBody']['content']['application/json'];
|
||||
export type IWebhooksShowRequest = operations['i/webhooks/show']['requestBody']['content']['application/json'];
|
||||
export type IWebhooksUpdateRequest = operations['i/webhooks/update']['requestBody']['content']['application/json'];
|
||||
export type IWebhooksDeleteRequest = operations['i/webhooks/delete']['requestBody']['content']['application/json'];
|
||||
export type InviteCreateResponse = operations['invite/create']['responses']['200']['content']['application/json'];
|
||||
export type InviteDeleteRequest = operations['invite/delete']['requestBody']['content']['application/json'];
|
||||
export type InviteListRequest = operations['invite/list']['requestBody']['content']['application/json'];
|
||||
export type InviteListResponse = operations['invite/list']['responses']['200']['content']['application/json'];
|
||||
export type InviteLimitResponse = operations['invite/limit']['responses']['200']['content']['application/json'];
|
||||
export type MetaRequest = operations['meta']['requestBody']['content']['application/json'];
|
||||
export type MetaResponse = operations['meta']['responses']['200']['content']['application/json'];
|
||||
export type EmojisResponse = operations['emojis']['responses']['200']['content']['application/json'];
|
||||
export type EmojiRequest = operations['emoji']['requestBody']['content']['application/json'];
|
||||
export type EmojiResponse = operations['emoji']['responses']['200']['content']['application/json'];
|
||||
export type MuteCreateRequest = operations['mute/create']['requestBody']['content']['application/json'];
|
||||
export type MuteDeleteRequest = operations['mute/delete']['requestBody']['content']['application/json'];
|
||||
export type MuteListRequest = operations['mute/list']['requestBody']['content']['application/json'];
|
||||
export type MuteListResponse = operations['mute/list']['responses']['200']['content']['application/json'];
|
||||
export type RenoteMuteCreateRequest = operations['renote-mute/create']['requestBody']['content']['application/json'];
|
||||
export type RenoteMuteDeleteRequest = operations['renote-mute/delete']['requestBody']['content']['application/json'];
|
||||
export type RenoteMuteListRequest = operations['renote-mute/list']['requestBody']['content']['application/json'];
|
||||
export type RenoteMuteListResponse = operations['renote-mute/list']['responses']['200']['content']['application/json'];
|
||||
export type MyAppsRequest = operations['my/apps']['requestBody']['content']['application/json'];
|
||||
export type MyAppsResponse = operations['my/apps']['responses']['200']['content']['application/json'];
|
||||
export type NotesRequest = operations['notes']['requestBody']['content']['application/json'];
|
||||
export type NotesResponse = operations['notes']['responses']['200']['content']['application/json'];
|
||||
export type NotesChildrenRequest = operations['notes/children']['requestBody']['content']['application/json'];
|
||||
export type NotesChildrenResponse = operations['notes/children']['responses']['200']['content']['application/json'];
|
||||
export type NotesClipsRequest = operations['notes/clips']['requestBody']['content']['application/json'];
|
||||
export type NotesClipsResponse = operations['notes/clips']['responses']['200']['content']['application/json'];
|
||||
export type NotesConversationRequest = operations['notes/conversation']['requestBody']['content']['application/json'];
|
||||
export type NotesConversationResponse = operations['notes/conversation']['responses']['200']['content']['application/json'];
|
||||
export type NotesCreateRequest = operations['notes/create']['requestBody']['content']['application/json'];
|
||||
export type NotesCreateResponse = operations['notes/create']['responses']['200']['content']['application/json'];
|
||||
export type NotesDeleteRequest = operations['notes/delete']['requestBody']['content']['application/json'];
|
||||
export type NotesFavoritesCreateRequest = operations['notes/favorites/create']['requestBody']['content']['application/json'];
|
||||
export type NotesFavoritesDeleteRequest = operations['notes/favorites/delete']['requestBody']['content']['application/json'];
|
||||
export type NotesFeaturedRequest = operations['notes/featured']['requestBody']['content']['application/json'];
|
||||
export type NotesFeaturedResponse = operations['notes/featured']['responses']['200']['content']['application/json'];
|
||||
export type NotesGlobalTimelineRequest = operations['notes/global-timeline']['requestBody']['content']['application/json'];
|
||||
export type NotesGlobalTimelineResponse = operations['notes/global-timeline']['responses']['200']['content']['application/json'];
|
||||
export type NotesHybridTimelineRequest = operations['notes/hybrid-timeline']['requestBody']['content']['application/json'];
|
||||
export type NotesHybridTimelineResponse = operations['notes/hybrid-timeline']['responses']['200']['content']['application/json'];
|
||||
export type NotesLocalTimelineRequest = operations['notes/local-timeline']['requestBody']['content']['application/json'];
|
||||
export type NotesLocalTimelineResponse = operations['notes/local-timeline']['responses']['200']['content']['application/json'];
|
||||
export type NotesMentionsRequest = operations['notes/mentions']['requestBody']['content']['application/json'];
|
||||
export type NotesMentionsResponse = operations['notes/mentions']['responses']['200']['content']['application/json'];
|
||||
export type NotesPollsRecommendationRequest = operations['notes/polls/recommendation']['requestBody']['content']['application/json'];
|
||||
export type NotesPollsRecommendationResponse = operations['notes/polls/recommendation']['responses']['200']['content']['application/json'];
|
||||
export type NotesPollsVoteRequest = operations['notes/polls/vote']['requestBody']['content']['application/json'];
|
||||
export type NotesReactionsRequest = operations['notes/reactions']['requestBody']['content']['application/json'];
|
||||
export type NotesReactionsResponse = operations['notes/reactions']['responses']['200']['content']['application/json'];
|
||||
export type NotesReactionsCreateRequest = operations['notes/reactions/create']['requestBody']['content']['application/json'];
|
||||
export type NotesReactionsDeleteRequest = operations['notes/reactions/delete']['requestBody']['content']['application/json'];
|
||||
export type NotesRenotesRequest = operations['notes/renotes']['requestBody']['content']['application/json'];
|
||||
export type NotesRenotesResponse = operations['notes/renotes']['responses']['200']['content']['application/json'];
|
||||
export type NotesRepliesRequest = operations['notes/replies']['requestBody']['content']['application/json'];
|
||||
export type NotesRepliesResponse = operations['notes/replies']['responses']['200']['content']['application/json'];
|
||||
export type NotesSearchByTagRequest = operations['notes/search-by-tag']['requestBody']['content']['application/json'];
|
||||
export type NotesSearchByTagResponse = operations['notes/search-by-tag']['responses']['200']['content']['application/json'];
|
||||
export type NotesSearchRequest = operations['notes/search']['requestBody']['content']['application/json'];
|
||||
export type NotesSearchResponse = operations['notes/search']['responses']['200']['content']['application/json'];
|
||||
export type NotesShowRequest = operations['notes/show']['requestBody']['content']['application/json'];
|
||||
export type NotesShowResponse = operations['notes/show']['responses']['200']['content']['application/json'];
|
||||
export type NotesStateRequest = operations['notes/state']['requestBody']['content']['application/json'];
|
||||
export type NotesStateResponse = operations['notes/state']['responses']['200']['content']['application/json'];
|
||||
export type NotesThreadMutingCreateRequest = operations['notes/thread-muting/create']['requestBody']['content']['application/json'];
|
||||
export type NotesThreadMutingDeleteRequest = operations['notes/thread-muting/delete']['requestBody']['content']['application/json'];
|
||||
export type NotesTimelineRequest = operations['notes/timeline']['requestBody']['content']['application/json'];
|
||||
export type NotesTimelineResponse = operations['notes/timeline']['responses']['200']['content']['application/json'];
|
||||
export type NotesTranslateRequest = operations['notes/translate']['requestBody']['content']['application/json'];
|
||||
export type NotesTranslateResponse = operations['notes/translate']['responses']['200']['content']['application/json'];
|
||||
export type NotesUnrenoteRequest = operations['notes/unrenote']['requestBody']['content']['application/json'];
|
||||
export type NotesUserListTimelineRequest = operations['notes/user-list-timeline']['requestBody']['content']['application/json'];
|
||||
export type NotesUserListTimelineResponse = operations['notes/user-list-timeline']['responses']['200']['content']['application/json'];
|
||||
export type NotificationsCreateRequest = operations['notifications/create']['requestBody']['content']['application/json'];
|
||||
export type PagesCreateRequest = operations['pages/create']['requestBody']['content']['application/json'];
|
||||
export type PagesCreateResponse = operations['pages/create']['responses']['200']['content']['application/json'];
|
||||
export type PagesDeleteRequest = operations['pages/delete']['requestBody']['content']['application/json'];
|
||||
export type PagesFeaturedResponse = operations['pages/featured']['responses']['200']['content']['application/json'];
|
||||
export type PagesLikeRequest = operations['pages/like']['requestBody']['content']['application/json'];
|
||||
export type PagesShowRequest = operations['pages/show']['requestBody']['content']['application/json'];
|
||||
export type PagesShowResponse = operations['pages/show']['responses']['200']['content']['application/json'];
|
||||
export type PagesUnlikeRequest = operations['pages/unlike']['requestBody']['content']['application/json'];
|
||||
export type PagesUpdateRequest = operations['pages/update']['requestBody']['content']['application/json'];
|
||||
export type FlashCreateRequest = operations['flash/create']['requestBody']['content']['application/json'];
|
||||
export type FlashDeleteRequest = operations['flash/delete']['requestBody']['content']['application/json'];
|
||||
export type FlashFeaturedResponse = operations['flash/featured']['responses']['200']['content']['application/json'];
|
||||
export type FlashLikeRequest = operations['flash/like']['requestBody']['content']['application/json'];
|
||||
export type FlashShowRequest = operations['flash/show']['requestBody']['content']['application/json'];
|
||||
export type FlashShowResponse = operations['flash/show']['responses']['200']['content']['application/json'];
|
||||
export type FlashUnlikeRequest = operations['flash/unlike']['requestBody']['content']['application/json'];
|
||||
export type FlashUpdateRequest = operations['flash/update']['requestBody']['content']['application/json'];
|
||||
export type FlashMyRequest = operations['flash/my']['requestBody']['content']['application/json'];
|
||||
export type FlashMyResponse = operations['flash/my']['responses']['200']['content']['application/json'];
|
||||
export type FlashMyLikesRequest = operations['flash/my-likes']['requestBody']['content']['application/json'];
|
||||
export type FlashMyLikesResponse = operations['flash/my-likes']['responses']['200']['content']['application/json'];
|
||||
export type PingResponse = operations['ping']['responses']['200']['content']['application/json'];
|
||||
export type PinnedUsersResponse = operations['pinned-users']['responses']['200']['content']['application/json'];
|
||||
export type PromoReadRequest = operations['promo/read']['requestBody']['content']['application/json'];
|
||||
export type RolesShowRequest = operations['roles/show']['requestBody']['content']['application/json'];
|
||||
export type RolesUsersRequest = operations['roles/users']['requestBody']['content']['application/json'];
|
||||
export type RolesNotesRequest = operations['roles/notes']['requestBody']['content']['application/json'];
|
||||
export type RolesNotesResponse = operations['roles/notes']['responses']['200']['content']['application/json'];
|
||||
export type RequestResetPasswordRequest = operations['request-reset-password']['requestBody']['content']['application/json'];
|
||||
export type ResetPasswordRequest = operations['reset-password']['requestBody']['content']['application/json'];
|
||||
export type StatsResponse = operations['stats']['responses']['200']['content']['application/json'];
|
||||
export type SwShowRegistrationRequest = operations['sw/show-registration']['requestBody']['content']['application/json'];
|
||||
export type SwShowRegistrationResponse = operations['sw/show-registration']['responses']['200']['content']['application/json'];
|
||||
export type SwUpdateRegistrationRequest = operations['sw/update-registration']['requestBody']['content']['application/json'];
|
||||
export type SwUpdateRegistrationResponse = operations['sw/update-registration']['responses']['200']['content']['application/json'];
|
||||
export type SwRegisterRequest = operations['sw/register']['requestBody']['content']['application/json'];
|
||||
export type SwRegisterResponse = operations['sw/register']['responses']['200']['content']['application/json'];
|
||||
export type SwUnregisterRequest = operations['sw/unregister']['requestBody']['content']['application/json'];
|
||||
export type TestRequest = operations['test']['requestBody']['content']['application/json'];
|
||||
export type UsernameAvailableRequest = operations['username/available']['requestBody']['content']['application/json'];
|
||||
export type UsernameAvailableResponse = operations['username/available']['responses']['200']['content']['application/json'];
|
||||
export type UsersRequest = operations['users']['requestBody']['content']['application/json'];
|
||||
export type UsersResponse = operations['users']['responses']['200']['content']['application/json'];
|
||||
export type UsersClipsRequest = operations['users/clips']['requestBody']['content']['application/json'];
|
||||
export type UsersClipsResponse = operations['users/clips']['responses']['200']['content']['application/json'];
|
||||
export type UsersFollowersRequest = operations['users/followers']['requestBody']['content']['application/json'];
|
||||
export type UsersFollowersResponse = operations['users/followers']['responses']['200']['content']['application/json'];
|
||||
export type UsersFollowingRequest = operations['users/following']['requestBody']['content']['application/json'];
|
||||
export type UsersFollowingResponse = operations['users/following']['responses']['200']['content']['application/json'];
|
||||
export type UsersGalleryPostsRequest = operations['users/gallery/posts']['requestBody']['content']['application/json'];
|
||||
export type UsersGalleryPostsResponse = operations['users/gallery/posts']['responses']['200']['content']['application/json'];
|
||||
export type UsersGetFrequentlyRepliedUsersRequest = operations['users/get-frequently-replied-users']['requestBody']['content']['application/json'];
|
||||
export type UsersGetFrequentlyRepliedUsersResponse = operations['users/get-frequently-replied-users']['responses']['200']['content']['application/json'];
|
||||
export type UsersFeaturedNotesRequest = operations['users/featured-notes']['requestBody']['content']['application/json'];
|
||||
export type UsersFeaturedNotesResponse = operations['users/featured-notes']['responses']['200']['content']['application/json'];
|
||||
export type UsersListsCreateRequest = operations['users/lists/create']['requestBody']['content']['application/json'];
|
||||
export type UsersListsCreateResponse = operations['users/lists/create']['responses']['200']['content']['application/json'];
|
||||
export type UsersListsDeleteRequest = operations['users/lists/delete']['requestBody']['content']['application/json'];
|
||||
export type UsersListsListRequest = operations['users/lists/list']['requestBody']['content']['application/json'];
|
||||
export type UsersListsListResponse = operations['users/lists/list']['responses']['200']['content']['application/json'];
|
||||
export type UsersListsPullRequest = operations['users/lists/pull']['requestBody']['content']['application/json'];
|
||||
export type UsersListsPushRequest = operations['users/lists/push']['requestBody']['content']['application/json'];
|
||||
export type UsersListsShowRequest = operations['users/lists/show']['requestBody']['content']['application/json'];
|
||||
export type UsersListsShowResponse = operations['users/lists/show']['responses']['200']['content']['application/json'];
|
||||
export type UsersListsFavoriteRequest = operations['users/lists/favorite']['requestBody']['content']['application/json'];
|
||||
export type UsersListsUnfavoriteRequest = operations['users/lists/unfavorite']['requestBody']['content']['application/json'];
|
||||
export type UsersListsUpdateRequest = operations['users/lists/update']['requestBody']['content']['application/json'];
|
||||
export type UsersListsUpdateResponse = operations['users/lists/update']['responses']['200']['content']['application/json'];
|
||||
export type UsersListsCreateFromPublicRequest = operations['users/lists/create-from-public']['requestBody']['content']['application/json'];
|
||||
export type UsersListsCreateFromPublicResponse = operations['users/lists/create-from-public']['responses']['200']['content']['application/json'];
|
||||
export type UsersListsUpdateMembershipRequest = operations['users/lists/update-membership']['requestBody']['content']['application/json'];
|
||||
export type UsersListsGetMembershipsRequest = operations['users/lists/get-memberships']['requestBody']['content']['application/json'];
|
||||
export type UsersNotesRequest = operations['users/notes']['requestBody']['content']['application/json'];
|
||||
export type UsersNotesResponse = operations['users/notes']['responses']['200']['content']['application/json'];
|
||||
export type UsersPagesRequest = operations['users/pages']['requestBody']['content']['application/json'];
|
||||
export type UsersPagesResponse = operations['users/pages']['responses']['200']['content']['application/json'];
|
||||
export type UsersFlashsRequest = operations['users/flashs']['requestBody']['content']['application/json'];
|
||||
export type UsersFlashsResponse = operations['users/flashs']['responses']['200']['content']['application/json'];
|
||||
export type UsersReactionsRequest = operations['users/reactions']['requestBody']['content']['application/json'];
|
||||
export type UsersReactionsResponse = operations['users/reactions']['responses']['200']['content']['application/json'];
|
||||
export type UsersRecommendationRequest = operations['users/recommendation']['requestBody']['content']['application/json'];
|
||||
export type UsersRecommendationResponse = operations['users/recommendation']['responses']['200']['content']['application/json'];
|
||||
export type UsersRelationRequest = operations['users/relation']['requestBody']['content']['application/json'];
|
||||
export type UsersRelationResponse = operations['users/relation']['responses']['200']['content']['application/json'];
|
||||
export type UsersReportAbuseRequest = operations['users/report-abuse']['requestBody']['content']['application/json'];
|
||||
export type UsersSearchByUsernameAndHostRequest = operations['users/search-by-username-and-host']['requestBody']['content']['application/json'];
|
||||
export type UsersSearchByUsernameAndHostResponse = operations['users/search-by-username-and-host']['responses']['200']['content']['application/json'];
|
||||
export type UsersSearchRequest = operations['users/search']['requestBody']['content']['application/json'];
|
||||
export type UsersSearchResponse = operations['users/search']['responses']['200']['content']['application/json'];
|
||||
export type UsersShowRequest = operations['users/show']['requestBody']['content']['application/json'];
|
||||
export type UsersShowResponse = operations['users/show']['responses']['200']['content']['application/json'];
|
||||
export type UsersAchievementsRequest = operations['users/achievements']['requestBody']['content']['application/json'];
|
||||
export type UsersUpdateMemoRequest = operations['users/update-memo']['requestBody']['content']['application/json'];
|
||||
export type FetchRssRequest = operations['fetch-rss']['requestBody']['content']['application/json'];
|
||||
export type FetchExternalResourcesRequest = operations['fetch-external-resources']['requestBody']['content']['application/json'];
|
||||
export type RetentionResponse = operations['retention']['responses']['200']['content']['application/json'];
|
39
packages/misskey-js/src/autogen/models.ts
Normal file
39
packages/misskey-js/src/autogen/models.ts
Normal file
|
@ -0,0 +1,39 @@
|
|||
/*
|
||||
* version: 2023.11.1
|
||||
* generatedAt: 2023-11-27T02:24:45.109Z
|
||||
*/
|
||||
|
||||
import { components } from './types.js';
|
||||
export type Error = components['schemas']['Error'];
|
||||
export type UserLite = components['schemas']['UserLite'];
|
||||
export type UserDetailedNotMeOnly = components['schemas']['UserDetailedNotMeOnly'];
|
||||
export type MeDetailedOnly = components['schemas']['MeDetailedOnly'];
|
||||
export type UserDetailedNotMe = components['schemas']['UserDetailedNotMe'];
|
||||
export type MeDetailed = components['schemas']['MeDetailed'];
|
||||
export type UserDetailed = components['schemas']['UserDetailed'];
|
||||
export type User = components['schemas']['User'];
|
||||
export type UserList = components['schemas']['UserList'];
|
||||
export type Announcement = components['schemas']['Announcement'];
|
||||
export type App = components['schemas']['App'];
|
||||
export type Note = components['schemas']['Note'];
|
||||
export type NoteReaction = components['schemas']['NoteReaction'];
|
||||
export type NoteFavorite = components['schemas']['NoteFavorite'];
|
||||
export type Notification = components['schemas']['Notification'];
|
||||
export type DriveFile = components['schemas']['DriveFile'];
|
||||
export type DriveFolder = components['schemas']['DriveFolder'];
|
||||
export type Following = components['schemas']['Following'];
|
||||
export type Muting = components['schemas']['Muting'];
|
||||
export type RenoteMuting = components['schemas']['RenoteMuting'];
|
||||
export type Blocking = components['schemas']['Blocking'];
|
||||
export type Hashtag = components['schemas']['Hashtag'];
|
||||
export type InviteCode = components['schemas']['InviteCode'];
|
||||
export type Page = components['schemas']['Page'];
|
||||
export type Channel = components['schemas']['Channel'];
|
||||
export type QueueCount = components['schemas']['QueueCount'];
|
||||
export type Antenna = components['schemas']['Antenna'];
|
||||
export type Clip = components['schemas']['Clip'];
|
||||
export type FederationInstance = components['schemas']['FederationInstance'];
|
||||
export type GalleryPost = components['schemas']['GalleryPost'];
|
||||
export type EmojiSimple = components['schemas']['EmojiSimple'];
|
||||
export type EmojiDetailed = components['schemas']['EmojiDetailed'];
|
||||
export type Flash = components['schemas']['Flash'];
|
22560
packages/misskey-js/src/autogen/types.ts
Normal file
22560
packages/misskey-js/src/autogen/types.ts
Normal file
File diff suppressed because it is too large
Load diff
|
@ -1,455 +1,11 @@
|
|||
import { ModerationLogPayloads, notificationTypes } from './consts.js';
|
||||
import { Page, User, UserDetailed } from './autogen/models';
|
||||
export * from './autogen/entities';
|
||||
export * from './autogen/models';
|
||||
|
||||
export type ID = string;
|
||||
export type DateString = string;
|
||||
|
||||
type TODO = Record<string, any>;
|
||||
|
||||
// NOTE: 極力この型を使うのは避け、UserLite か UserDetailed か明示するように
|
||||
export type User = UserLite | UserDetailed;
|
||||
|
||||
export type UserLite = {
|
||||
id: ID;
|
||||
username: string;
|
||||
host: string | null;
|
||||
name: string | null;
|
||||
onlineStatus: 'online' | 'active' | 'offline' | 'unknown';
|
||||
avatarUrl: string;
|
||||
avatarBlurhash: string;
|
||||
avatarDecorations: {
|
||||
id: ID;
|
||||
url: string;
|
||||
angle?: number;
|
||||
flipH?: boolean;
|
||||
}[];
|
||||
emojis: {
|
||||
name: string;
|
||||
url: string;
|
||||
}[];
|
||||
instance?: {
|
||||
name: Instance['name'];
|
||||
softwareName: Instance['softwareName'];
|
||||
softwareVersion: Instance['softwareVersion'];
|
||||
iconUrl: Instance['iconUrl'];
|
||||
faviconUrl: Instance['faviconUrl'];
|
||||
themeColor: Instance['themeColor'];
|
||||
};
|
||||
isCat?: boolean;
|
||||
isBot?: boolean;
|
||||
};
|
||||
|
||||
export type UserDetailed = UserLite & {
|
||||
alsoKnownAs: string[];
|
||||
bannerBlurhash: string | null;
|
||||
bannerColor: string | null;
|
||||
bannerUrl: string | null;
|
||||
birthday: string | null;
|
||||
createdAt: DateString;
|
||||
description: string | null;
|
||||
ffVisibility: 'public' | 'followers' | 'private';
|
||||
fields: {name: string; value: string}[];
|
||||
verifiedLinks: string[];
|
||||
followersCount: number;
|
||||
followingCount: number;
|
||||
hasPendingFollowRequestFromYou: boolean;
|
||||
hasPendingFollowRequestToYou: boolean;
|
||||
isAdmin: boolean;
|
||||
isBlocked: boolean;
|
||||
isBlocking: boolean;
|
||||
isBot: boolean;
|
||||
isCat: boolean;
|
||||
isFollowed: boolean;
|
||||
isFollowing: boolean;
|
||||
isLocked: boolean;
|
||||
isModerator: boolean;
|
||||
isMuted: boolean;
|
||||
isSilenced: boolean;
|
||||
isSuspended: boolean;
|
||||
lang: string | null;
|
||||
lastFetchedAt?: DateString;
|
||||
location: string | null;
|
||||
movedTo: string;
|
||||
notesCount: number;
|
||||
pinnedNoteIds: ID[];
|
||||
pinnedNotes: Note[];
|
||||
pinnedPage: Page | null;
|
||||
pinnedPageId: string | null;
|
||||
publicReactions: boolean;
|
||||
securityKeys: boolean;
|
||||
twoFactorEnabled: boolean;
|
||||
updatedAt: DateString | null;
|
||||
uri: string | null;
|
||||
url: string | null;
|
||||
notify: 'normal' | 'none';
|
||||
};
|
||||
|
||||
export type UserGroup = TODO;
|
||||
|
||||
export type UserList = {
|
||||
id: ID;
|
||||
createdAt: DateString;
|
||||
name: string;
|
||||
userIds: User['id'][];
|
||||
};
|
||||
|
||||
export 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<string, any>;
|
||||
isDeleted: boolean;
|
||||
isExplorable: boolean;
|
||||
mutedWords: (string[] | string)[];
|
||||
hardMutedWords: (string[] | string)[];
|
||||
notificationRecieveConfig: {
|
||||
[notificationType in typeof notificationTypes[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;
|
||||
};
|
||||
|
||||
export type MeDetailedWithSecret = MeDetailed & {
|
||||
email: string;
|
||||
emailVerified: boolean;
|
||||
securityKeysList: {
|
||||
id: string;
|
||||
name: string;
|
||||
lastUsed: string;
|
||||
}[];
|
||||
};
|
||||
|
||||
export type MeSignup = MeDetailedWithSecret & {
|
||||
token: string;
|
||||
};
|
||||
|
||||
export 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<string, any>;
|
||||
};
|
||||
|
||||
export type DriveFolder = TODO;
|
||||
|
||||
export 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;
|
||||
};
|
||||
|
||||
export type Note = {
|
||||
id: ID;
|
||||
createdAt: DateString;
|
||||
text: string | null;
|
||||
cw: string | null;
|
||||
user: User;
|
||||
userId: User['id'];
|
||||
reply?: Note;
|
||||
replyId: Note['id'];
|
||||
renote?: Note;
|
||||
renoteId: Note['id'];
|
||||
files: DriveFile[];
|
||||
fileIds: DriveFile['id'][];
|
||||
visibility: 'public' | 'home' | 'followers' | 'specified';
|
||||
visibleUserIds?: User['id'][];
|
||||
channel?: Channel;
|
||||
channelId?: Channel['id'];
|
||||
localOnly?: boolean;
|
||||
myReaction?: string;
|
||||
reactions: Record<string, number>;
|
||||
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;
|
||||
};
|
||||
|
||||
export type NoteReaction = {
|
||||
id: ID;
|
||||
createdAt: DateString;
|
||||
user: UserLite;
|
||||
type: string;
|
||||
};
|
||||
|
||||
export type Notification = {
|
||||
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';
|
||||
});
|
||||
|
||||
export 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;
|
||||
};
|
||||
|
||||
export type CustomEmoji = {
|
||||
id: string;
|
||||
name: string;
|
||||
url: string;
|
||||
category: string;
|
||||
aliases: string[];
|
||||
};
|
||||
|
||||
export type LiteInstanceMetadata = {
|
||||
maintainerName: string | null;
|
||||
maintainerEmail: string | null;
|
||||
version: 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[];
|
||||
};
|
||||
|
||||
export type DetailedInstanceMetadata = LiteInstanceMetadata & {
|
||||
pinnedPages: string[];
|
||||
pinnedClipId: string | null;
|
||||
cacheRemoteFiles: boolean;
|
||||
cacheRemoteSensitiveFiles: boolean;
|
||||
requireSetup: boolean;
|
||||
proxyAccountName: string | null;
|
||||
features: Record<string, any>;
|
||||
};
|
||||
|
||||
export type InstanceMetadata = LiteInstanceMetadata | DetailedInstanceMetadata;
|
||||
|
||||
export type AdminInstanceMetadata = DetailedInstanceMetadata & {
|
||||
// TODO: There are more fields.
|
||||
blockedHosts: string[];
|
||||
silencedHosts: string[];
|
||||
app192IconUrl: string | null;
|
||||
app512IconUrl: string | null;
|
||||
manifestJsonOverride: string;
|
||||
};
|
||||
|
||||
export type ServerInfo = {
|
||||
machine: string;
|
||||
cpu: {
|
||||
model: string;
|
||||
cores: number;
|
||||
};
|
||||
mem: {
|
||||
total: number;
|
||||
};
|
||||
fs: {
|
||||
total: number;
|
||||
used: number;
|
||||
};
|
||||
};
|
||||
|
||||
export type Stats = {
|
||||
notesCount: number;
|
||||
originalNotesCount: number;
|
||||
usersCount: number;
|
||||
originalUsersCount: number;
|
||||
instances: number;
|
||||
driveUsageLocal: number;
|
||||
driveUsageRemote: number;
|
||||
};
|
||||
|
||||
export type Page = {
|
||||
id: ID;
|
||||
createdAt: DateString;
|
||||
updatedAt: DateString;
|
||||
userId: User['id'];
|
||||
user: User;
|
||||
content: Record<string, any>[];
|
||||
variables: Record<string, any>[];
|
||||
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;
|
||||
};
|
||||
|
||||
export type PageEvent = {
|
||||
pageId: Page['id'];
|
||||
event: string;
|
||||
|
@ -458,166 +14,6 @@ export type PageEvent = {
|
|||
user: User;
|
||||
};
|
||||
|
||||
export 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;
|
||||
};
|
||||
|
||||
export type Antenna = {
|
||||
id: ID;
|
||||
createdAt: DateString;
|
||||
name: string;
|
||||
keywords: string[][]; // TODO
|
||||
excludeKeywords: string[][]; // TODO
|
||||
src: 'home' | 'all' | 'users' | 'list' | 'group';
|
||||
userListId: ID | null; // TODO
|
||||
userGroupId: ID | null; // TODO
|
||||
users: string[]; // TODO
|
||||
caseSensitive: boolean;
|
||||
localOnly: boolean;
|
||||
notify: boolean;
|
||||
withReplies: boolean;
|
||||
withFile: boolean;
|
||||
hasUnreadNote: boolean;
|
||||
};
|
||||
|
||||
export type App = TODO;
|
||||
|
||||
export type AuthSession = {
|
||||
id: ID;
|
||||
app: App;
|
||||
token: string;
|
||||
};
|
||||
|
||||
export type Ad = TODO;
|
||||
|
||||
export type Clip = TODO;
|
||||
|
||||
export type NoteFavorite = {
|
||||
id: ID;
|
||||
createdAt: DateString;
|
||||
noteId: Note['id'];
|
||||
note: Note;
|
||||
};
|
||||
|
||||
export type FollowRequest = {
|
||||
id: ID;
|
||||
follower: User;
|
||||
followee: User;
|
||||
};
|
||||
|
||||
export 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;
|
||||
};
|
||||
|
||||
export type Following = {
|
||||
id: ID;
|
||||
createdAt: DateString;
|
||||
followerId: User['id'];
|
||||
followeeId: User['id'];
|
||||
};
|
||||
|
||||
export type FollowingFolloweePopulated = Following & {
|
||||
followee: UserDetailed;
|
||||
};
|
||||
|
||||
export type FollowingFollowerPopulated = Following & {
|
||||
follower: UserDetailed;
|
||||
};
|
||||
|
||||
export type Blocking = {
|
||||
id: ID;
|
||||
createdAt: DateString;
|
||||
blockeeId: User['id'];
|
||||
blockee: UserDetailed;
|
||||
};
|
||||
|
||||
export 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;
|
||||
};
|
||||
|
||||
export type Signin = {
|
||||
id: ID;
|
||||
createdAt: DateString;
|
||||
ip: string;
|
||||
headers: Record<string, any>;
|
||||
success: boolean;
|
||||
};
|
||||
|
||||
export type Invite = {
|
||||
id: ID;
|
||||
code: string;
|
||||
expiresAt: DateString | null;
|
||||
createdAt: DateString;
|
||||
createdBy: UserLite | null;
|
||||
usedBy: UserLite | null;
|
||||
usedAt: DateString | null;
|
||||
used: boolean;
|
||||
}
|
||||
|
||||
export type InviteLimit = {
|
||||
remaining: number;
|
||||
}
|
||||
|
||||
export type UserSorting =
|
||||
| '+follower'
|
||||
| '-follower'
|
||||
| '+createdAt'
|
||||
| '-createdAt'
|
||||
| '+updatedAt'
|
||||
| '-updatedAt';
|
||||
export type OriginType = 'combined' | 'local' | 'remote';
|
||||
|
||||
export type ModerationLog = {
|
||||
id: ID;
|
||||
createdAt: DateString;
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
import type { Antenna, CustomEmoji, DriveFile, MeDetailed, MessagingMessage, Note, Notification, PageEvent, User, UserGroup } from './entities.js';
|
||||
import { Antenna, DriveFile, EmojiDetailed, MeDetailed, Note, User, Notification } from './autogen/models.js';
|
||||
import { PageEvent } from './entities.js';
|
||||
|
||||
type FIXME = any;
|
||||
|
||||
|
@ -22,9 +23,6 @@ export type Channels = {
|
|||
readAllUnreadMentions: () => void;
|
||||
unreadSpecifiedNote: (payload: Note['id']) => void;
|
||||
readAllUnreadSpecifiedNotes: () => void;
|
||||
readAllMessagingMessages: () => void;
|
||||
messagingMessage: (payload: MessagingMessage) => void;
|
||||
unreadMessagingMessage: (payload: MessagingMessage) => void;
|
||||
readAllAntennas: () => void;
|
||||
unreadAntenna: (payload: Antenna) => void;
|
||||
readAllAnnouncements: () => void;
|
||||
|
@ -70,23 +68,6 @@ export type Channels = {
|
|||
};
|
||||
receives: null;
|
||||
};
|
||||
messaging: {
|
||||
params: {
|
||||
otherparty?: User['id'] | null;
|
||||
group?: UserGroup['id'] | null;
|
||||
};
|
||||
events: {
|
||||
message: (payload: MessagingMessage) => void;
|
||||
deleted: (payload: MessagingMessage['id']) => void;
|
||||
read: (payload: MessagingMessage['id'][]) => void;
|
||||
typers: (payload: User[]) => void;
|
||||
};
|
||||
receives: {
|
||||
read: {
|
||||
id: MessagingMessage['id'];
|
||||
};
|
||||
};
|
||||
};
|
||||
serverStats: {
|
||||
params: null;
|
||||
events: {
|
||||
|
@ -145,6 +126,6 @@ export type NoteUpdatedEvent = {
|
|||
export type BroadcastEvents = {
|
||||
noteUpdated: (payload: NoteUpdatedEvent) => void;
|
||||
emojiAdded: (payload: {
|
||||
emoji: CustomEmoji;
|
||||
emoji: EmojiDetailed;
|
||||
}) => void;
|
||||
};
|
||||
|
|
|
@ -8,7 +8,7 @@ describe('API', () => {
|
|||
credential: 'TOKEN'
|
||||
});
|
||||
const res = await cli.request('meta', { detail: true });
|
||||
expectType<Misskey.entities.DetailedInstanceMetadata>(res);
|
||||
expectType<Misskey.entities.MetaResponse>(res);
|
||||
});
|
||||
|
||||
test('conditional respose type (meta)', async () => {
|
||||
|
@ -18,16 +18,16 @@ describe('API', () => {
|
|||
});
|
||||
|
||||
const res = await cli.request('meta', { detail: true });
|
||||
expectType<Misskey.entities.DetailedInstanceMetadata>(res);
|
||||
expectType<Misskey.entities.MetaResponse>(res);
|
||||
|
||||
const res2 = await cli.request('meta', { detail: false });
|
||||
expectType<Misskey.entities.LiteInstanceMetadata>(res2);
|
||||
expectType<Misskey.entities.MetaResponse>(res2);
|
||||
|
||||
const res3 = await cli.request('meta', { });
|
||||
expectType<Misskey.entities.LiteInstanceMetadata>(res3);
|
||||
expectType<Misskey.entities.MetaResponse>(res3);
|
||||
|
||||
const res4 = await cli.request('meta', { detail: true as boolean });
|
||||
expectType<Misskey.entities.LiteInstanceMetadata | Misskey.entities.DetailedInstanceMetadata>(res4);
|
||||
expectType<Misskey.entities.MetaResponse>(res4);
|
||||
});
|
||||
|
||||
test('conditional respose type (users/show)', async () => {
|
||||
|
|
|
@ -9,18 +9,4 @@ describe('Streaming', () => {
|
|||
expectType<Misskey.entities.Notification>(notification);
|
||||
});
|
||||
});
|
||||
|
||||
test('params type', async () => {
|
||||
const stream = new Misskey.Stream('https://misskey.test', { token: 'TOKEN' });
|
||||
// TODO: 「stream.useChannel の第二引数として受け入れる型が
|
||||
// {
|
||||
// otherparty?: User['id'] | null;
|
||||
// group?: UserGroup['id'] | null;
|
||||
// }
|
||||
// になっている」というテストを行いたいけどtsdでの書き方がわからない
|
||||
const messagingChannel = stream.useChannel('messaging', { otherparty: 'aaa' });
|
||||
messagingChannel.on('message', message => {
|
||||
expectType<Misskey.entities.MessagingMessage>(message);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"$schema": "http://json.schemastore.org/tsconfig",
|
||||
"$schema": "https://json.schemastore.org/tsconfig",
|
||||
"compilerOptions": {
|
||||
"target": "ES2022",
|
||||
"module": "nodenext",
|
||||
|
|
619
pnpm-lock.yaml
619
pnpm-lock.yaml
File diff suppressed because it is too large
Load diff
|
@ -3,3 +3,4 @@ packages:
|
|||
- 'packages/frontend'
|
||||
- 'packages/sw'
|
||||
- 'packages/misskey-js'
|
||||
- 'packages/misskey-js/generator'
|
||||
|
|
Loading…
Reference in a new issue