fix: `secure: true` なエンドポイントの型が misskey-js に含まれていない (#12603)

* 作った

* 修正

* 修正
This commit is contained in:
ikasoba 2023-12-08 15:15:17 +09:00 committed by GitHub
parent ac4089f37d
commit e38af60fd0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 6520 additions and 11 deletions

View File

@ -43,7 +43,7 @@ export function genOpenapiSpec(config: Config) {
// 書き換えたりするのでディープコピーしておく。そのまま編集するとメモリ上の値が汚れて次回以降の出力に影響する
const copiedEndpoints = JSON.parse(JSON.stringify(endpoints)) as IEndpoint[];
for (const endpoint of copiedEndpoints.filter(ep => !ep.meta.secure)) {
for (const endpoint of copiedEndpoints) {
const errors = {} as any;
if (endpoint.meta.errors) {
@ -59,6 +59,11 @@ export function genOpenapiSpec(config: Config) {
const resSchema = endpoint.meta.res ? convertSchemaToOpenApiSchema(endpoint.meta.res) : {};
let desc = (endpoint.meta.description ? endpoint.meta.description : 'No description provided.') + '\n\n';
if (endpoint.meta.secure) {
desc += '**Internal Endpoint**: This endpoint is an API for the misskey mainframe and is not intended for use by third parties.\n';
}
desc += `**Credential required**: *${endpoint.meta.requireCredential ? 'Yes' : 'No'}*`;
if (endpoint.meta.kind) {
const kind = endpoint.meta.kind;

View File

@ -125,6 +125,9 @@ type AdminEmojiDeleteBulkRequest = operations['admin/emoji/delete-bulk']['reques
// @public (undocumented)
type AdminEmojiDeleteRequest = operations['admin/emoji/delete']['requestBody']['content']['application/json'];
// @public (undocumented)
type AdminEmojiImportZipRequest = operations['admin/emoji/import-zip']['requestBody']['content']['application/json'];
// @public (undocumented)
type AdminEmojiListRemoteRequest = operations['admin/emoji/list-remote']['requestBody']['content']['application/json'];
@ -375,8 +378,6 @@ class APIClient {
fetch: FetchLike;
// (undocumented)
origin: string;
// (undocumented)
request<E extends keyof Endpoints, P extends Endpoints[E]['req']>(endpoint: E, params?: P, credential?: string | null): Promise<SwitchCaseResponseType<E, P>>;
}
// @public (undocumented)
@ -409,6 +410,9 @@ type ApShowRequest = operations['ap/show']['requestBody']['content']['applicatio
// @public (undocumented)
type ApShowResponse = operations['ap/show']['responses']['200']['content']['application/json'];
// @public (undocumented)
type AuthAcceptRequest = operations['auth/accept']['requestBody']['content']['application/json'];
// @public (undocumented)
type AuthSessionGenerateRequest = operations['auth/session/generate']['requestBody']['content']['application/json'];
@ -1062,6 +1066,7 @@ declare namespace entities {
AdminEmojiCopyResponse,
AdminEmojiDeleteBulkRequest,
AdminEmojiDeleteRequest,
AdminEmojiImportZipRequest,
AdminEmojiListRemoteRequest,
AdminEmojiListRemoteResponse,
AdminEmojiListRequest,
@ -1138,6 +1143,7 @@ declare namespace entities {
AppCreateResponse,
AppShowRequest,
AppShowResponse,
AuthAcceptRequest,
AuthSessionGenerateRequest,
AuthSessionGenerateResponse,
AuthSessionShowRequest,
@ -1297,13 +1303,31 @@ declare namespace entities {
HashtagsUsersRequest,
HashtagsUsersResponse,
IResponse,
I2faDoneRequest,
I2faKeyDoneRequest,
I2faPasswordLessRequest,
I2faRegisterKeyRequest,
I2faRegisterRequest,
I2faUpdateKeyRequest,
I2faRemoveKeyRequest,
I2faUnregisterRequest,
IAppsRequest,
IAuthorizedAppsRequest,
IClaimAchievementRequest,
IChangePasswordRequest,
IDeleteAccountRequest,
IExportFollowingRequest,
IFavoritesRequest,
IFavoritesResponse,
IGalleryLikesRequest,
IGalleryLikesResponse,
IGalleryPostsRequest,
IGalleryPostsResponse,
IImportBlockingRequest,
IImportFollowingRequest,
IImportMutingRequest,
IImportUserListsRequest,
IImportAntennasRequest,
INotificationsRequest,
INotificationsResponse,
INotificationsGroupedRequest,
@ -1315,6 +1339,7 @@ declare namespace entities {
IPinRequest,
IPinResponse,
IReadAnnouncementRequest,
IRegenerateTokenRequest,
IRegistryGetAllRequest,
IRegistryGetDetailRequest,
IRegistryGetRequest,
@ -1322,10 +1347,15 @@ declare namespace entities {
IRegistryKeysRequest,
IRegistryRemoveRequest,
IRegistrySetRequest,
IRevokeTokenRequest,
ISigninHistoryRequest,
ISigninHistoryResponse,
IUnpinRequest,
IUnpinResponse,
IUpdateEmailRequest,
IUpdateRequest,
IUpdateResponse,
IMoveRequest,
IWebhooksCreateRequest,
IWebhooksShowRequest,
IWebhooksUpdateRequest,
@ -1340,6 +1370,8 @@ declare namespace entities {
EmojisResponse,
EmojiRequest,
EmojiResponse,
MiauthGenTokenRequest,
MiauthGenTokenResponse,
MuteCreateRequest,
MuteDeleteRequest,
MuteListRequest,
@ -1402,6 +1434,7 @@ declare namespace entities {
NotesUserListTimelineRequest,
NotesUserListTimelineResponse,
NotificationsCreateRequest,
PagePushRequest,
PagesCreateRequest,
PagesCreateResponse,
PagesDeleteRequest,
@ -1770,12 +1803,51 @@ type HashtagsUsersRequest = operations['hashtags/users']['requestBody']['content
// @public (undocumented)
type HashtagsUsersResponse = operations['hashtags/users']['responses']['200']['content']['application/json'];
// @public (undocumented)
type I2faDoneRequest = operations['i/2fa/done']['requestBody']['content']['application/json'];
// @public (undocumented)
type I2faKeyDoneRequest = operations['i/2fa/key-done']['requestBody']['content']['application/json'];
// @public (undocumented)
type I2faPasswordLessRequest = operations['i/2fa/password-less']['requestBody']['content']['application/json'];
// @public (undocumented)
type I2faRegisterKeyRequest = operations['i/2fa/register-key']['requestBody']['content']['application/json'];
// @public (undocumented)
type I2faRegisterRequest = operations['i/2fa/register']['requestBody']['content']['application/json'];
// @public (undocumented)
type I2faRemoveKeyRequest = operations['i/2fa/remove-key']['requestBody']['content']['application/json'];
// @public (undocumented)
type I2faUnregisterRequest = operations['i/2fa/unregister']['requestBody']['content']['application/json'];
// @public (undocumented)
type I2faUpdateKeyRequest = operations['i/2fa/update-key']['requestBody']['content']['application/json'];
// @public (undocumented)
type IAppsRequest = operations['i/apps']['requestBody']['content']['application/json'];
// @public (undocumented)
type IAuthorizedAppsRequest = operations['i/authorized-apps']['requestBody']['content']['application/json'];
// @public (undocumented)
type IChangePasswordRequest = operations['i/change-password']['requestBody']['content']['application/json'];
// @public (undocumented)
type IClaimAchievementRequest = operations['i/claim-achievement']['requestBody']['content']['application/json'];
// @public (undocumented)
type ID = string;
// @public (undocumented)
type IDeleteAccountRequest = operations['i/delete-account']['requestBody']['content']['application/json'];
// @public (undocumented)
type IExportFollowingRequest = operations['i/export-following']['requestBody']['content']['application/json'];
// @public (undocumented)
type IFavoritesRequest = operations['i/favorites']['requestBody']['content']['application/json'];
@ -1794,6 +1866,24 @@ type IGalleryPostsRequest = operations['i/gallery/posts']['requestBody']['conten
// @public (undocumented)
type IGalleryPostsResponse = operations['i/gallery/posts']['responses']['200']['content']['application/json'];
// @public (undocumented)
type IImportAntennasRequest = operations['i/import-antennas']['requestBody']['content']['application/json'];
// @public (undocumented)
type IImportBlockingRequest = operations['i/import-blocking']['requestBody']['content']['application/json'];
// @public (undocumented)
type IImportFollowingRequest = operations['i/import-following']['requestBody']['content']['application/json'];
// @public (undocumented)
type IImportMutingRequest = operations['i/import-muting']['requestBody']['content']['application/json'];
// @public (undocumented)
type IImportUserListsRequest = operations['i/import-user-lists']['requestBody']['content']['application/json'];
// @public (undocumented)
type IMoveRequest = operations['i/move']['requestBody']['content']['application/json'];
// @public (undocumented)
type INotificationsGroupedRequest = operations['i/notifications-grouped']['requestBody']['content']['application/json'];
@ -1845,6 +1935,9 @@ type IPinResponse = operations['i/pin']['responses']['200']['content']['applicat
// @public (undocumented)
type IReadAnnouncementRequest = operations['i/read-announcement']['requestBody']['content']['application/json'];
// @public (undocumented)
type IRegenerateTokenRequest = operations['i/regenerate-token']['requestBody']['content']['application/json'];
// @public (undocumented)
type IRegistryGetAllRequest = operations['i/registry/get-all']['requestBody']['content']['application/json'];
@ -1869,15 +1962,27 @@ type IRegistrySetRequest = operations['i/registry/set']['requestBody']['content'
// @public (undocumented)
type IResponse = operations['i']['responses']['200']['content']['application/json'];
// @public (undocumented)
type IRevokeTokenRequest = operations['i/revoke-token']['requestBody']['content']['application/json'];
// @public (undocumented)
function isAPIError(reason: any): reason is APIError;
// @public (undocumented)
type ISigninHistoryRequest = operations['i/signin-history']['requestBody']['content']['application/json'];
// @public (undocumented)
type ISigninHistoryResponse = operations['i/signin-history']['responses']['200']['content']['application/json'];
// @public (undocumented)
type IUnpinRequest = operations['i/unpin']['requestBody']['content']['application/json'];
// @public (undocumented)
type IUnpinResponse = operations['i/unpin']['responses']['200']['content']['application/json'];
// @public (undocumented)
type IUpdateEmailRequest = operations['i/update-email']['requestBody']['content']['application/json'];
// @public (undocumented)
type IUpdateRequest = operations['i/update']['requestBody']['content']['application/json'];
@ -1908,6 +2013,12 @@ type MetaRequest = operations['meta']['requestBody']['content']['application/jso
// @public (undocumented)
type MetaResponse = operations['meta']['responses']['200']['content']['application/json'];
// @public (undocumented)
type MiauthGenTokenRequest = operations['miauth/gen-token']['requestBody']['content']['application/json'];
// @public (undocumented)
type MiauthGenTokenResponse = operations['miauth/gen-token']['responses']['200']['content']['application/json'];
// @public (undocumented)
type ModerationLog = {
id: ID;
@ -2240,6 +2351,9 @@ type PageEvent = {
user: User;
};
// @public (undocumented)
type PagePushRequest = operations['page-push']['requestBody']['content']['application/json'];
// @public (undocumented)
type PagesCreateRequest = operations['pages/create']['requestBody']['content']['application/json'];

View File

@ -159,6 +159,68 @@ async function generateEndpoints(
await writeFile(endpointOutputPath, endpointOutputLine.join('\n'));
}
async function generateApiClientJSDoc(
openApiDocs: OpenAPIV3.Document,
apiClientFileName: string,
endpointsFileName: string,
warningsOutputPath: string,
) {
const endpoints: { operationId: string; description: string; }[] = [];
// 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!;
if (operation.description) {
endpoints.push({
operationId: operationId,
description: operation.description,
});
}
}
const endpointOutputLine: string[] = [];
endpointOutputLine.push(generateVersionHeaderComment(openApiDocs));
endpointOutputLine.push('');
endpointOutputLine.push(`import type { SwitchCaseResponseType } from '${toImportPath(apiClientFileName)}';`);
endpointOutputLine.push(`import type { Endpoints } from '${toImportPath(endpointsFileName)}';`);
endpointOutputLine.push('');
endpointOutputLine.push(`declare module '${toImportPath(apiClientFileName)}' {`);
endpointOutputLine.push(' export interface APIClient {');
for (let i = 0; i < endpoints.length; i++) {
const endpoint = endpoints[i];
endpointOutputLine.push(
' /**',
` * ${endpoint.description.split('\n').join('\n * ')}`,
' */',
` request<E extends '${endpoint.operationId}', P extends Endpoints[E][\'req\']>(`,
' endpoint: E,',
' params: P,',
' credential?: string | null,',
' ): Promise<SwitchCaseResponseType<E, P>>;',
);
if (i < endpoints.length - 1) {
endpointOutputLine.push('\n');
}
}
endpointOutputLine.push(' }');
endpointOutputLine.push('}');
endpointOutputLine.push('');
await writeFile(warningsOutputPath, endpointOutputLine.join('\n'));
}
function isRequestBodyObject(value: unknown): value is OpenAPIV3.RequestBodyObject {
if (!value) {
return false;
@ -279,6 +341,9 @@ async function main() {
const entitiesFileName = `${generatePath}/entities.ts`;
const endpointFileName = `${generatePath}/endpoint.ts`;
await generateEndpoints(openApiDocs, typeFileName, entitiesFileName, endpointFileName);
const apiClientWarningFileName = `${generatePath}/apiClientJSDoc.ts`;
await generateApiClientJSDoc(openApiDocs, '../api.ts', endpointFileName, apiClientWarningFileName);
}
main();

View File

@ -1,3 +1,5 @@
import './autogen/apiClientJSDoc';
import { SwitchCaseResponseType } from './api.types';
import type { Endpoints } from './api.types';

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
/*
* version: 2023.12.0-beta.1
* generatedAt: 2023-12-04T11:17:52.156Z
* version: 2023.11.0-beta.3
* generatedAt: 2023-12-08T04:57:48.415Z
*/
import type {
@ -41,6 +41,7 @@ import type {
AdminEmojiCopyResponse,
AdminEmojiDeleteBulkRequest,
AdminEmojiDeleteRequest,
AdminEmojiImportZipRequest,
AdminEmojiListRemoteRequest,
AdminEmojiListRemoteResponse,
AdminEmojiListRequest,
@ -117,6 +118,7 @@ import type {
AppCreateResponse,
AppShowRequest,
AppShowResponse,
AuthAcceptRequest,
AuthSessionGenerateRequest,
AuthSessionGenerateResponse,
AuthSessionShowRequest,
@ -276,13 +278,31 @@ import type {
HashtagsUsersRequest,
HashtagsUsersResponse,
IResponse,
I2faDoneRequest,
I2faKeyDoneRequest,
I2faPasswordLessRequest,
I2faRegisterKeyRequest,
I2faRegisterRequest,
I2faUpdateKeyRequest,
I2faRemoveKeyRequest,
I2faUnregisterRequest,
IAppsRequest,
IAuthorizedAppsRequest,
IClaimAchievementRequest,
IChangePasswordRequest,
IDeleteAccountRequest,
IExportFollowingRequest,
IFavoritesRequest,
IFavoritesResponse,
IGalleryLikesRequest,
IGalleryLikesResponse,
IGalleryPostsRequest,
IGalleryPostsResponse,
IImportBlockingRequest,
IImportFollowingRequest,
IImportMutingRequest,
IImportUserListsRequest,
IImportAntennasRequest,
INotificationsRequest,
INotificationsResponse,
INotificationsGroupedRequest,
@ -294,6 +314,7 @@ import type {
IPinRequest,
IPinResponse,
IReadAnnouncementRequest,
IRegenerateTokenRequest,
IRegistryGetAllRequest,
IRegistryGetDetailRequest,
IRegistryGetRequest,
@ -301,10 +322,15 @@ import type {
IRegistryKeysRequest,
IRegistryRemoveRequest,
IRegistrySetRequest,
IRevokeTokenRequest,
ISigninHistoryRequest,
ISigninHistoryResponse,
IUnpinRequest,
IUnpinResponse,
IUpdateEmailRequest,
IUpdateRequest,
IUpdateResponse,
IMoveRequest,
IWebhooksCreateRequest,
IWebhooksShowRequest,
IWebhooksUpdateRequest,
@ -319,6 +345,8 @@ import type {
EmojisResponse,
EmojiRequest,
EmojiResponse,
MiauthGenTokenRequest,
MiauthGenTokenResponse,
MuteCreateRequest,
MuteDeleteRequest,
MuteListRequest,
@ -381,6 +409,7 @@ import type {
NotesUserListTimelineRequest,
NotesUserListTimelineResponse,
NotificationsCreateRequest,
PagePushRequest,
PagesCreateRequest,
PagesCreateResponse,
PagesDeleteRequest,
@ -511,6 +540,7 @@ export type Endpoints = {
'admin/emoji/copy': { req: AdminEmojiCopyRequest; res: AdminEmojiCopyResponse };
'admin/emoji/delete-bulk': { req: AdminEmojiDeleteBulkRequest; res: EmptyResponse };
'admin/emoji/delete': { req: AdminEmojiDeleteRequest; res: EmptyResponse };
'admin/emoji/import-zip': { req: AdminEmojiImportZipRequest; 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 };
@ -568,6 +598,7 @@ export type Endpoints = {
'ap/show': { req: ApShowRequest; res: ApShowResponse };
'app/create': { req: AppCreateRequest; res: AppCreateResponse };
'app/show': { req: AppShowRequest; res: AppShowResponse };
'auth/accept': { req: AuthAcceptRequest; res: EmptyResponse };
'auth/session/generate': { req: AuthSessionGenerateRequest; res: AuthSessionGenerateResponse };
'auth/session/show': { req: AuthSessionShowRequest; res: AuthSessionShowResponse };
'auth/session/userkey': { req: AuthSessionUserkeyRequest; res: AuthSessionUserkeyResponse };
@ -631,6 +662,7 @@ export type Endpoints = {
'email-address/available': { req: EmailAddressAvailableRequest; res: EmailAddressAvailableResponse };
'endpoint': { req: EndpointRequest; res: EmptyResponse };
'endpoints': { req: EmptyRequest; res: EndpointsResponse };
'export-custom-emojis': { req: EmptyRequest; res: EmptyResponse };
'federation/followers': { req: FederationFollowersRequest; res: FederationFollowersResponse };
'federation/following': { req: FederationFollowingRequest; res: FederationFollowingResponse };
'federation/instances': { req: FederationInstancesRequest; res: FederationInstancesResponse };
@ -664,10 +696,34 @@ export type Endpoints = {
'hashtags/trend': { req: EmptyRequest; res: HashtagsTrendResponse };
'hashtags/users': { req: HashtagsUsersRequest; res: HashtagsUsersResponse };
'i': { req: EmptyRequest; res: IResponse };
'i/2fa/done': { req: I2faDoneRequest; res: EmptyResponse };
'i/2fa/key-done': { req: I2faKeyDoneRequest; res: EmptyResponse };
'i/2fa/password-less': { req: I2faPasswordLessRequest; res: EmptyResponse };
'i/2fa/register-key': { req: I2faRegisterKeyRequest; res: EmptyResponse };
'i/2fa/register': { req: I2faRegisterRequest; res: EmptyResponse };
'i/2fa/update-key': { req: I2faUpdateKeyRequest; res: EmptyResponse };
'i/2fa/remove-key': { req: I2faRemoveKeyRequest; res: EmptyResponse };
'i/2fa/unregister': { req: I2faUnregisterRequest; res: EmptyResponse };
'i/apps': { req: IAppsRequest; res: EmptyResponse };
'i/authorized-apps': { req: IAuthorizedAppsRequest; res: EmptyResponse };
'i/claim-achievement': { req: IClaimAchievementRequest; res: EmptyResponse };
'i/change-password': { req: IChangePasswordRequest; res: EmptyResponse };
'i/delete-account': { req: IDeleteAccountRequest; res: EmptyResponse };
'i/export-blocking': { req: EmptyRequest; res: EmptyResponse };
'i/export-following': { req: IExportFollowingRequest; res: EmptyResponse };
'i/export-mute': { req: EmptyRequest; res: EmptyResponse };
'i/export-notes': { req: EmptyRequest; res: EmptyResponse };
'i/export-favorites': { req: EmptyRequest; res: EmptyResponse };
'i/export-user-lists': { req: EmptyRequest; res: EmptyResponse };
'i/export-antennas': { req: EmptyRequest; res: EmptyResponse };
'i/favorites': { req: IFavoritesRequest; res: IFavoritesResponse };
'i/gallery/likes': { req: IGalleryLikesRequest; res: IGalleryLikesResponse };
'i/gallery/posts': { req: IGalleryPostsRequest; res: IGalleryPostsResponse };
'i/import-blocking': { req: IImportBlockingRequest; res: EmptyResponse };
'i/import-following': { req: IImportFollowingRequest; res: EmptyResponse };
'i/import-muting': { req: IImportMutingRequest; res: EmptyResponse };
'i/import-user-lists': { req: IImportUserListsRequest; res: EmptyResponse };
'i/import-antennas': { req: IImportAntennasRequest; res: EmptyResponse };
'i/notifications': { req: INotificationsRequest; res: INotificationsResponse };
'i/notifications-grouped': { req: INotificationsGroupedRequest; res: INotificationsGroupedResponse };
'i/page-likes': { req: IPageLikesRequest; res: IPageLikesResponse };
@ -675,15 +731,21 @@ export type Endpoints = {
'i/pin': { req: IPinRequest; res: IPinResponse };
'i/read-all-unread-notes': { req: EmptyRequest; res: EmptyResponse };
'i/read-announcement': { req: IReadAnnouncementRequest; res: EmptyResponse };
'i/regenerate-token': { req: IRegenerateTokenRequest; 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/scopes-with-domain': { req: EmptyRequest; res: EmptyResponse };
'i/registry/set': { req: IRegistrySetRequest; res: EmptyResponse };
'i/revoke-token': { req: IRevokeTokenRequest; res: EmptyResponse };
'i/signin-history': { req: ISigninHistoryRequest; res: ISigninHistoryResponse };
'i/unpin': { req: IUnpinRequest; res: IUnpinResponse };
'i/update-email': { req: IUpdateEmailRequest; res: EmptyResponse };
'i/update': { req: IUpdateRequest; res: IUpdateResponse };
'i/move': { req: IMoveRequest; res: EmptyResponse };
'i/webhooks/create': { req: IWebhooksCreateRequest; res: EmptyResponse };
'i/webhooks/list': { req: EmptyRequest; res: EmptyResponse };
'i/webhooks/show': { req: IWebhooksShowRequest; res: EmptyResponse };
@ -696,6 +758,7 @@ export type Endpoints = {
'meta': { req: MetaRequest; res: MetaResponse };
'emojis': { req: EmptyRequest; res: EmojisResponse };
'emoji': { req: EmojiRequest; res: EmojiResponse };
'miauth/gen-token': { req: MiauthGenTokenRequest; res: MiauthGenTokenResponse };
'mute/create': { req: MuteCreateRequest; res: EmptyResponse };
'mute/delete': { req: MuteDeleteRequest; res: EmptyResponse };
'mute/list': { req: MuteListRequest; res: MuteListResponse };
@ -736,6 +799,7 @@ export type Endpoints = {
'notifications/create': { req: NotificationsCreateRequest; res: EmptyResponse };
'notifications/mark-all-as-read': { req: EmptyRequest; res: EmptyResponse };
'notifications/test-notification': { req: EmptyRequest; res: EmptyResponse };
'page-push': { req: PagePushRequest; res: EmptyResponse };
'pages/create': { req: PagesCreateRequest; res: PagesCreateResponse };
'pages/delete': { req: PagesDeleteRequest; res: EmptyResponse };
'pages/featured': { req: EmptyRequest; res: PagesFeaturedResponse };

View File

@ -1,6 +1,6 @@
/*
* version: 2023.12.0-beta.1
* generatedAt: 2023-12-04T11:17:52.154Z
* version: 2023.11.0-beta.3
* generatedAt: 2023-12-08T04:57:48.409Z
*/
import { operations } from './types.js';
@ -43,6 +43,7 @@ export type AdminEmojiCopyRequest = operations['admin/emoji/copy']['requestBody'
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 AdminEmojiImportZipRequest = operations['admin/emoji/import-zip']['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'];
@ -119,6 +120,7 @@ export type AppCreateRequest = operations['app/create']['requestBody']['content'
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 AuthAcceptRequest = operations['auth/accept']['requestBody']['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'];
@ -278,13 +280,31 @@ export type HashtagsTrendResponse = operations['hashtags/trend']['responses']['2
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 I2faDoneRequest = operations['i/2fa/done']['requestBody']['content']['application/json'];
export type I2faKeyDoneRequest = operations['i/2fa/key-done']['requestBody']['content']['application/json'];
export type I2faPasswordLessRequest = operations['i/2fa/password-less']['requestBody']['content']['application/json'];
export type I2faRegisterKeyRequest = operations['i/2fa/register-key']['requestBody']['content']['application/json'];
export type I2faRegisterRequest = operations['i/2fa/register']['requestBody']['content']['application/json'];
export type I2faUpdateKeyRequest = operations['i/2fa/update-key']['requestBody']['content']['application/json'];
export type I2faRemoveKeyRequest = operations['i/2fa/remove-key']['requestBody']['content']['application/json'];
export type I2faUnregisterRequest = operations['i/2fa/unregister']['requestBody']['content']['application/json'];
export type IAppsRequest = operations['i/apps']['requestBody']['content']['application/json'];
export type IAuthorizedAppsRequest = operations['i/authorized-apps']['requestBody']['content']['application/json'];
export type IClaimAchievementRequest = operations['i/claim-achievement']['requestBody']['content']['application/json'];
export type IChangePasswordRequest = operations['i/change-password']['requestBody']['content']['application/json'];
export type IDeleteAccountRequest = operations['i/delete-account']['requestBody']['content']['application/json'];
export type IExportFollowingRequest = operations['i/export-following']['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 IImportBlockingRequest = operations['i/import-blocking']['requestBody']['content']['application/json'];
export type IImportFollowingRequest = operations['i/import-following']['requestBody']['content']['application/json'];
export type IImportMutingRequest = operations['i/import-muting']['requestBody']['content']['application/json'];
export type IImportUserListsRequest = operations['i/import-user-lists']['requestBody']['content']['application/json'];
export type IImportAntennasRequest = operations['i/import-antennas']['requestBody']['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'];
@ -296,6 +316,7 @@ export type IPagesResponse = operations['i/pages']['responses']['200']['content'
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 IRegenerateTokenRequest = operations['i/regenerate-token']['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'];
@ -303,10 +324,15 @@ export type IRegistryKeysWithTypeRequest = operations['i/registry/keys-with-type
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 IRevokeTokenRequest = operations['i/revoke-token']['requestBody']['content']['application/json'];
export type ISigninHistoryRequest = operations['i/signin-history']['requestBody']['content']['application/json'];
export type ISigninHistoryResponse = operations['i/signin-history']['responses']['200']['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 IUpdateEmailRequest = operations['i/update-email']['requestBody']['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 IMoveRequest = operations['i/move']['requestBody']['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'];
@ -321,6 +347,8 @@ export type MetaResponse = operations['meta']['responses']['200']['content']['ap
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 MiauthGenTokenRequest = operations['miauth/gen-token']['requestBody']['content']['application/json'];
export type MiauthGenTokenResponse = operations['miauth/gen-token']['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'];
@ -383,6 +411,7 @@ export type NotesUnrenoteRequest = operations['notes/unrenote']['requestBody']['
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 PagePushRequest = operations['page-push']['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'];

View File

@ -1,6 +1,6 @@
/*
* version: 2023.12.0-beta.1
* generatedAt: 2023-12-04T11:17:52.151Z
* version: 2023.11.0-beta.3
* generatedAt: 2023-12-08T04:57:48.405Z
*/
import { components } from './types.js';

File diff suppressed because it is too large Load Diff