upd: misskey-js api definitions

This commit is contained in:
Marie 2024-01-26 21:31:14 +01:00
parent c6e3ec07d1
commit 074c47fdf8
No known key found for this signature in database
GPG Key ID: 56569BBE47D2C828
6 changed files with 199 additions and 15 deletions

View File

@ -85,6 +85,9 @@ type AdminAnnouncementsListResponse = operations['admin/announcements/list']['re
// @public (undocumented)
type AdminAnnouncementsUpdateRequest = operations['admin/announcements/update']['requestBody']['content']['application/json'];
// @public (undocumented)
type AdminApproveUserRequest = operations['admin/approve-user']['requestBody']['content']['application/json'];
// @public (undocumented)
type AdminAvatarDecorationsCreateRequest = operations['admin/avatar-decorations/create']['requestBody']['content']['application/json'];
@ -208,6 +211,9 @@ type AdminInviteListResponse = operations['admin/invite/list']['responses']['200
// @public (undocumented)
type AdminMetaResponse = operations['admin/meta']['responses']['200']['content']['application/json'];
// @public (undocumented)
type AdminNsfwUserRequest = operations['admin/nsfw-user']['requestBody']['content']['application/json'];
// @public (undocumented)
type AdminPromoCreateRequest = operations['admin/promo/create']['requestBody']['content']['application/json'];
@ -304,15 +310,24 @@ type AdminShowUsersRequest = operations['admin/show-users']['requestBody']['cont
// @public (undocumented)
type AdminShowUsersResponse = operations['admin/show-users']['responses']['200']['content']['application/json'];
// @public (undocumented)
type AdminSilenceUserRequest = operations['admin/silence-user']['requestBody']['content']['application/json'];
// @public (undocumented)
type AdminSuspendUserRequest = operations['admin/suspend-user']['requestBody']['content']['application/json'];
// @public (undocumented)
type AdminUnnsfwUserRequest = operations['admin/unnsfw-user']['requestBody']['content']['application/json'];
// @public (undocumented)
type AdminUnsetUserAvatarRequest = operations['admin/unset-user-avatar']['requestBody']['content']['application/json'];
// @public (undocumented)
type AdminUnsetUserBannerRequest = operations['admin/unset-user-banner']['requestBody']['content']['application/json'];
// @public (undocumented)
type AdminUnsilenceUserRequest = operations['admin/unsilence-user']['requestBody']['content']['application/json'];
// @public (undocumented)
type AdminUnsuspendUserRequest = operations['admin/unsuspend-user']['requestBody']['content']['application/json'];
@ -594,6 +609,13 @@ export type Channels = {
};
receives: null;
};
bubbleTimeline: {
params: null;
events: {
note: (payload: Note) => void;
};
receives: null;
};
userList: {
params: {
listId: string;
@ -1165,7 +1187,12 @@ declare namespace entities {
AdminShowUserResponse,
AdminShowUsersRequest,
AdminShowUsersResponse,
AdminNsfwUserRequest,
AdminUnnsfwUserRequest,
AdminSilenceUserRequest,
AdminUnsilenceUserRequest,
AdminSuspendUserRequest,
AdminApproveUserRequest,
AdminUnsuspendUserRequest,
AdminUpdateMetaRequest,
AdminDeleteAccountRequest,
@ -1393,6 +1420,7 @@ declare namespace entities {
IGalleryPostsResponse,
IImportBlockingRequest,
IImportFollowingRequest,
IImportNotesRequest,
IImportMutingRequest,
IImportUserListsRequest,
IImportAntennasRequest,
@ -1410,6 +1438,7 @@ declare namespace entities {
IRegenerateTokenRequest,
IRegistryGetAllRequest,
IRegistryGetAllResponse,
IRegistryGetUnsecureRequest,
IRegistryGetDetailRequest,
IRegistryGetDetailResponse,
IRegistryGetRequest,
@ -1477,6 +1506,8 @@ declare namespace entities {
NotesFeaturedResponse,
NotesGlobalTimelineRequest,
NotesGlobalTimelineResponse,
NotesBubbleTimelineRequest,
NotesBubbleTimelineResponse,
NotesHybridTimelineRequest,
NotesHybridTimelineResponse,
NotesLocalTimelineRequest,
@ -1490,6 +1521,7 @@ declare namespace entities {
NotesReactionsResponse,
NotesReactionsCreateRequest,
NotesReactionsDeleteRequest,
NotesLikeRequest,
NotesRenotesRequest,
NotesRenotesResponse,
NotesRepliesRequest,
@ -1511,6 +1543,10 @@ declare namespace entities {
NotesUnrenoteRequest,
NotesUserListTimelineRequest,
NotesUserListTimelineResponse,
NotesEditRequest,
NotesEditResponse,
NotesVersionsRequest,
NotesVersionsResponse,
NotificationsCreateRequest,
PagePushRequest,
PagesCreateRequest,
@ -1619,6 +1655,7 @@ declare namespace entities {
FetchExternalResourcesRequest,
FetchExternalResourcesResponse,
RetentionResponse,
SponsorsRequest,
BubbleGameRegisterRequest,
BubbleGameRegisterResponse,
BubbleGameRankingRequest,
@ -2016,6 +2053,9 @@ type IImportFollowingRequest = operations['i/import-following']['requestBody']['
// @public (undocumented)
type IImportMutingRequest = operations['i/import-muting']['requestBody']['content']['application/json'];
// @public (undocumented)
type IImportNotesRequest = operations['i/import-notes']['requestBody']['content']['application/json'];
// @public (undocumented)
type IImportUserListsRequest = operations['i/import-user-lists']['requestBody']['content']['application/json'];
@ -2097,6 +2137,9 @@ type IRegistryGetRequest = operations['i/registry/get']['requestBody']['content'
// @public (undocumented)
type IRegistryGetResponse = operations['i/registry/get']['responses']['200']['content']['application/json'];
// @public (undocumented)
type IRegistryGetUnsecureRequest = operations['i/registry/get-unsecure']['requestBody']['content']['application/json'];
// @public (undocumented)
type IRegistryKeysRequest = operations['i/registry/keys']['requestBody']['content']['application/json'];
@ -2196,6 +2239,9 @@ type ModerationLog = {
} & ({
type: 'updateServerSettings';
info: ModerationLogPayloads['updateServerSettings'];
} | {
type: 'approve';
info: ModerationLogPayloads['approve'];
} | {
type: 'suspend';
info: ModerationLogPayloads['suspend'];
@ -2307,7 +2353,7 @@ type ModerationLog = {
});
// @public (undocumented)
export const moderationLogTypes: readonly ["updateServerSettings", "suspend", "unsuspend", "updateUserNote", "addCustomEmoji", "updateCustomEmoji", "deleteCustomEmoji", "assignRole", "unassignRole", "createRole", "updateRole", "deleteRole", "clearQueue", "promoteQueue", "deleteDriveFile", "deleteNote", "createGlobalAnnouncement", "createUserAnnouncement", "updateGlobalAnnouncement", "updateUserAnnouncement", "deleteGlobalAnnouncement", "deleteUserAnnouncement", "resetPassword", "suspendRemoteInstance", "unsuspendRemoteInstance", "markSensitiveDriveFile", "unmarkSensitiveDriveFile", "resolveAbuseReport", "createInvitation", "createAd", "updateAd", "deleteAd", "createAvatarDecoration", "updateAvatarDecoration", "deleteAvatarDecoration", "unsetUserAvatar", "unsetUserBanner"];
export const moderationLogTypes: readonly ["updateServerSettings", "suspend", "approve", "unsuspend", "updateUserNote", "addCustomEmoji", "updateCustomEmoji", "deleteCustomEmoji", "assignRole", "unassignRole", "createRole", "updateRole", "deleteRole", "clearQueue", "promoteQueue", "deleteDriveFile", "deleteNote", "createGlobalAnnouncement", "createUserAnnouncement", "updateGlobalAnnouncement", "updateUserAnnouncement", "deleteGlobalAnnouncement", "deleteUserAnnouncement", "resetPassword", "suspendRemoteInstance", "unsuspendRemoteInstance", "markSensitiveDriveFile", "unmarkSensitiveDriveFile", "resolveAbuseReport", "createInvitation", "createAd", "updateAd", "deleteAd", "createAvatarDecoration", "updateAvatarDecoration", "deleteAvatarDecoration", "unsetUserAvatar", "unsetUserBanner"];
// @public (undocumented)
type MuteCreateRequest = operations['mute/create']['requestBody']['content']['application/json'];
@ -2342,6 +2388,12 @@ type NoteFavorite = components['schemas']['NoteFavorite'];
// @public (undocumented)
type NoteReaction = components['schemas']['NoteReaction'];
// @public (undocumented)
type NotesBubbleTimelineRequest = operations['notes/bubble-timeline']['requestBody']['content']['application/json'];
// @public (undocumented)
type NotesBubbleTimelineResponse = operations['notes/bubble-timeline']['responses']['200']['content']['application/json'];
// @public (undocumented)
type NotesChildrenRequest = operations['notes/children']['requestBody']['content']['application/json'];
@ -2369,6 +2421,12 @@ type NotesCreateResponse = operations['notes/create']['responses']['200']['conte
// @public (undocumented)
type NotesDeleteRequest = operations['notes/delete']['requestBody']['content']['application/json'];
// @public (undocumented)
type NotesEditRequest = operations['notes/edit']['requestBody']['content']['application/json'];
// @public (undocumented)
type NotesEditResponse = operations['notes/edit']['responses']['200']['content']['application/json'];
// @public (undocumented)
type NotesFavoritesCreateRequest = operations['notes/favorites/create']['requestBody']['content']['application/json'];
@ -2393,6 +2451,9 @@ type NotesHybridTimelineRequest = operations['notes/hybrid-timeline']['requestBo
// @public (undocumented)
type NotesHybridTimelineResponse = operations['notes/hybrid-timeline']['responses']['200']['content']['application/json'];
// @public (undocumented)
type NotesLikeRequest = operations['notes/like']['requestBody']['content']['application/json'];
// @public (undocumented)
type NotesLocalTimelineRequest = operations['notes/local-timeline']['requestBody']['content']['application/json'];
@ -2495,6 +2556,12 @@ type NotesUserListTimelineRequest = operations['notes/user-list-timeline']['requ
// @public (undocumented)
type NotesUserListTimelineResponse = operations['notes/user-list-timeline']['responses']['200']['content']['application/json'];
// @public (undocumented)
type NotesVersionsRequest = operations['notes/versions']['requestBody']['content']['application/json'];
// @public (undocumented)
type NotesVersionsResponse = operations['notes/versions']['responses']['200']['content']['application/json'];
// @public (undocumented)
export const noteVisibilities: readonly ["public", "home", "followers", "specified"];
@ -2553,7 +2620,7 @@ type PagesUpdateRequest = operations['pages/update']['requestBody']['content']['
function parse(acct: string): Acct;
// @public (undocumented)
export const permissions: readonly ["read:account", "write:account", "read:blocks", "write:blocks", "read:drive", "write:drive", "read:favorites", "write:favorites", "read:following", "write:following", "read:messaging", "write:messaging", "read:mutes", "write:mutes", "write:notes", "read:notifications", "write:notifications", "read:reactions", "write:reactions", "write:votes", "read:pages", "write:pages", "write:page-likes", "read:page-likes", "read:user-groups", "write:user-groups", "read:channels", "write:channels", "read:gallery", "write:gallery", "read:gallery-likes", "write:gallery-likes", "read:flash", "write:flash", "read:flash-likes", "write:flash-likes", "read:admin:abuse-user-reports", "write:admin:delete-account", "write:admin:delete-all-files-of-a-user", "read:admin:index-stats", "read:admin:table-stats", "read:admin:user-ips", "read:admin:meta", "write:admin:reset-password", "write:admin:resolve-abuse-user-report", "write:admin:send-email", "read:admin:server-info", "read:admin:show-moderation-log", "read:admin:show-user", "read:admin:show-users", "write:admin:suspend-user", "write:admin:unset-user-avatar", "write:admin:unset-user-banner", "write:admin:unsuspend-user", "write:admin:meta", "write:admin:user-note", "write:admin:roles", "read:admin:roles", "write:admin:relays", "read:admin:relays", "write:admin:invite-codes", "read:admin:invite-codes", "write:admin:announcements", "read:admin:announcements", "write:admin:avatar-decorations", "read:admin:avatar-decorations", "write:admin:federation", "write:admin:account", "read:admin:account", "write:admin:emoji", "read:admin:emoji", "write:admin:queue", "read:admin:queue", "write:admin:promo", "write:admin:drive", "read:admin:drive", "write:admin:ad", "read:admin:ad", "write:invite-codes", "read:invite-codes", "write:clip-favorite", "read:clip-favorite", "read:federation", "write:report-abuse"];
export const permissions: readonly ["read:account", "write:account", "read:blocks", "write:blocks", "read:drive", "write:drive", "read:favorites", "write:favorites", "read:following", "write:following", "read:messaging", "write:messaging", "read:mutes", "write:mutes", "write:notes", "read:notifications", "write:notifications", "read:reactions", "write:reactions", "write:votes", "read:pages", "write:pages", "write:page-likes", "read:page-likes", "read:user-groups", "write:user-groups", "read:channels", "write:channels", "read:gallery", "write:gallery", "read:gallery-likes", "write:gallery-likes", "read:flash", "write:flash", "read:flash-likes", "write:flash-likes", "read:admin:abuse-user-reports", "write:admin:delete-account", "write:admin:delete-all-files-of-a-user", "read:admin:index-stats", "read:admin:table-stats", "read:admin:user-ips", "read:admin:meta", "write:admin:reset-password", "write:admin:resolve-abuse-user-report", "write:admin:send-email", "read:admin:server-info", "read:admin:show-moderation-log", "read:admin:show-user", "read:admin:show-users", "write:admin:suspend-user", "write:admin:approve-user", "write:admin:nsfw-user", "write:admin:unnsfw-user", "write:admin:silence-user", "write:admin:unsilence-user", "write:admin:unset-user-avatar", "write:admin:unset-user-banner", "write:admin:unsuspend-user", "write:admin:meta", "write:admin:user-note", "write:admin:roles", "read:admin:roles", "write:admin:relays", "read:admin:relays", "write:admin:invite-codes", "read:admin:invite-codes", "write:admin:announcements", "read:admin:announcements", "write:admin:avatar-decorations", "read:admin:avatar-decorations", "write:admin:federation", "write:admin:account", "read:admin:account", "write:admin:emoji", "read:admin:emoji", "write:admin:queue", "read:admin:queue", "write:admin:promo", "write:admin:drive", "read:admin:drive", "write:admin:ad", "read:admin:ad", "write:invite-codes", "read:invite-codes", "write:clip-favorite", "read:clip-favorite", "read:federation", "write:report-abuse"];
// @public (undocumented)
type PingResponse = operations['ping']['responses']['200']['content']['application/json'];
@ -2746,6 +2813,9 @@ type SignupResponse = MeDetailed & {
token: string;
};
// @public (undocumented)
type SponsorsRequest = operations['sponsors']['requestBody']['content']['application/json'];
// @public (undocumented)
type StatsResponse = operations['stats']['responses']['200']['content']['application/json'];

View File

@ -1,6 +1,6 @@
/*
* version: 2024.2.0-beta.6
* generatedAt: 2024-01-24T07:32:10.455Z
* version: 2024.2.0-beta2
* generatedAt: 2024-01-26T20:30:18.423Z
*/
import type { SwitchCaseResponseType } from '../api.js';
@ -691,6 +691,50 @@ declare module '../api.js' {
credential?: string | null,
): Promise<SwitchCaseResponseType<E, P>>;
/**
* No description provided.
*
* **Credential required**: *Yes* / **Permission**: *write:admin:nsfw-user*
*/
request<E extends 'admin/nsfw-user', P extends Endpoints[E]['req']>(
endpoint: E,
params: P,
credential?: string | null,
): Promise<SwitchCaseResponseType<E, P>>;
/**
* No description provided.
*
* **Credential required**: *Yes* / **Permission**: *write:admin:unnsfw-user*
*/
request<E extends 'admin/unnsfw-user', P extends Endpoints[E]['req']>(
endpoint: E,
params: P,
credential?: string | null,
): Promise<SwitchCaseResponseType<E, P>>;
/**
* No description provided.
*
* **Credential required**: *Yes* / **Permission**: *write:admin:silence-user*
*/
request<E extends 'admin/silence-user', P extends Endpoints[E]['req']>(
endpoint: E,
params: P,
credential?: string | null,
): Promise<SwitchCaseResponseType<E, P>>;
/**
* No description provided.
*
* **Credential required**: *Yes* / **Permission**: *write:admin:unsilence-user*
*/
request<E extends 'admin/unsilence-user', P extends Endpoints[E]['req']>(
endpoint: E,
params: P,
credential?: string | null,
): Promise<SwitchCaseResponseType<E, P>>;
/**
* No description provided.
*
@ -702,6 +746,17 @@ declare module '../api.js' {
credential?: string | null,
): Promise<SwitchCaseResponseType<E, P>>;
/**
* No description provided.
*
* **Credential required**: *Yes* / **Permission**: *write:admin:approve-user*
*/
request<E extends 'admin/approve-user', P extends Endpoints[E]['req']>(
endpoint: E,
params: P,
credential?: string | null,
): Promise<SwitchCaseResponseType<E, P>>;
/**
* No description provided.
*
@ -2514,6 +2569,17 @@ declare module '../api.js' {
credential?: string | null,
): Promise<SwitchCaseResponseType<E, P>>;
/**
* No description provided.
*
* **Credential required**: *Yes* / **Permission**: *read:account*
*/
request<E extends 'i/registry/get-unsecure', P extends Endpoints[E]['req']>(
endpoint: E,
params: P,
credential?: string | null,
): Promise<SwitchCaseResponseType<E, P>>;
/**
* No description provided.
*
@ -2993,6 +3059,17 @@ declare module '../api.js' {
credential?: string | null,
): Promise<SwitchCaseResponseType<E, P>>;
/**
* No description provided.
*
* **Credential required**: *No*
*/
request<E extends 'notes/bubble-timeline', P extends Endpoints[E]['req']>(
endpoint: E,
params: P,
credential?: string | null,
): Promise<SwitchCaseResponseType<E, P>>;
/**
* No description provided.
*
@ -4053,8 +4130,9 @@ declare module '../api.js' {
params: P,
credential?: string | null,
): Promise<SwitchCaseResponseType<E, P>>;
/** No description provided.
/**
* No description provided.
*
* **Credential required**: *Yes* / **Permission**: *write:account*
*/

View File

@ -1,6 +1,6 @@
/*
* version: 2024.2.0-beta.6
* generatedAt: 2024-01-24T07:32:10.453Z
* version: 2024.2.0-beta2
* generatedAt: 2024-01-26T20:30:18.421Z
*/
import type {

View File

@ -1,6 +1,6 @@
/*
* version: 2024.2.0-beta.6
* generatedAt: 2024-01-24T07:32:10.452Z
* version: 2024.2.0-beta2
* generatedAt: 2024-01-26T20:30:18.419Z
*/
import { operations } from './types.js';

View File

@ -1,6 +1,6 @@
/*
* version: 2024.2.0-beta.6
* generatedAt: 2024-01-24T07:32:10.450Z
* version: 2024.2.0-beta2
* generatedAt: 2024-01-26T20:30:18.418Z
*/
import { components } from './types.js';

View File

@ -2,8 +2,8 @@
/* eslint @typescript-eslint/no-explicit-any: 0 */
/*
* version: 2024.2.0-beta.6
* generatedAt: 2024-01-24T07:32:10.370Z
* version: 2024.2.0-beta2
* generatedAt: 2024-01-26T20:30:18.319Z
*/
/**
@ -4784,6 +4784,8 @@ export type operations = {
backgroundImageUrl: string | null;
deeplAuthKey: string | null;
deeplIsPro: boolean;
deeplFreeMode: boolean;
deeplFreeInstance: string | null;
defaultDarkTheme: string | null;
defaultLightTheme: string | null;
description: string | null;
@ -8795,6 +8797,8 @@ export type operations = {
summalyProxy?: string | null;
deeplAuthKey?: string | null;
deeplIsPro?: boolean;
deeplFreeMode?: boolean;
deeplFreeInstance?: string | null;
enableEmail?: boolean;
email?: string | null;
smtpSecure?: boolean;
@ -14101,6 +14105,7 @@ export type operations = {
subscribing?: boolean | null;
publishing?: boolean | null;
nsfw?: boolean | null;
bubble?: boolean | null;
/** @default 30 */
limit?: number;
/** @default 0 */
@ -26440,9 +26445,40 @@ export type operations = {
204: {
content: never;
};
/** @description Client error */
400: {
content: {
'application/json': components['schemas']['Error'];
};
};
/** @description Authentication error */
401: {
content: {
'application/json': components['schemas']['Error'];
};
};
/** @description Forbidden error */
403: {
content: {
'application/json': components['schemas']['Error'];
};
};
/** @description I'm Ai */
418: {
content: {
'application/json': components['schemas']['Error'];
};
};
/** @description Internal server error */
500: {
content: {
'application/json': components['schemas']['Error'];
};
};
};
};
/** bubble-game/register
/**
* bubble-game/register
* @description No description provided.
*
* **Credential required**: *Yes* / **Permission**: *write:account*