From 833a2ad42be2aa7e23b13120e67ca6240d9e4d4c Mon Sep 17 00:00:00 2001 From: tai-cha Date: Tue, 21 Jan 2025 08:55:43 +0900 Subject: [PATCH] chore(misskey-js): update types --- packages/misskey-js/etc/misskey-js.api.md | 14 +- .../misskey-js/src/autogen/apiClientJSDoc.ts | 88 +-- packages/misskey-js/src/autogen/endpoint.ts | 22 +- packages/misskey-js/src/autogen/entities.ts | 14 +- packages/misskey-js/src/autogen/types.ts | 652 +++++++++--------- 5 files changed, 395 insertions(+), 395 deletions(-) diff --git a/packages/misskey-js/etc/misskey-js.api.md b/packages/misskey-js/etc/misskey-js.api.md index 831b688aa1..c48a54438d 100644 --- a/packages/misskey-js/etc/misskey-js.api.md +++ b/packages/misskey-js/etc/misskey-js.api.md @@ -1670,6 +1670,13 @@ declare namespace entities { NotesCreateRequest, NotesCreateResponse, NotesDeleteRequest, + NotesDraftsRequest, + NotesDraftsResponse, + NotesDraftsCreateRequest, + NotesDraftsCreateResponse, + NotesDraftsDeleteRequest, + NotesDraftsUpdateRequest, + NotesDraftsUpdateResponse, NotesFavoritesCreateRequest, NotesFavoritesDeleteRequest, NotesFeaturedRequest, @@ -1710,13 +1717,6 @@ declare namespace entities { NotesUnrenoteRequest, NotesUserListTimelineRequest, NotesUserListTimelineResponse, - NotesDraftsRequest, - NotesDraftsResponse, - NotesDraftsCreateRequest, - NotesDraftsCreateResponse, - NotesDraftsUpdateRequest, - NotesDraftsUpdateResponse, - NotesDraftsDeleteRequest, NotificationsCreateRequest, PagePushRequest, PagesCreateRequest, diff --git a/packages/misskey-js/src/autogen/apiClientJSDoc.ts b/packages/misskey-js/src/autogen/apiClientJSDoc.ts index 35bf6246d1..ab0bbd2a62 100644 --- a/packages/misskey-js/src/autogen/apiClientJSDoc.ts +++ b/packages/misskey-js/src/autogen/apiClientJSDoc.ts @@ -3241,6 +3241,50 @@ declare module '../api.js' { credential?: string | null, ): Promise>; + /** + * No description provided. + * + * **Credential required**: *Yes* / **Permission**: *read:account* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:account* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:account* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:account* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + /** * No description provided. * @@ -3505,50 +3549,6 @@ declare module '../api.js' { credential?: string | null, ): Promise>; - /** - * No description provided. - * - * **Credential required**: *Yes* / **Permission**: *read:account* - */ - request( - endpoint: E, - params: P, - credential?: string | null, - ): Promise>; - - /** - * No description provided. - * - * **Credential required**: *Yes* / **Permission**: *write:account* - */ - request( - endpoint: E, - params: P, - credential?: string | null, - ): Promise>; - - /** - * No description provided. - * - * **Credential required**: *Yes* / **Permission**: *write:account* - */ - request( - endpoint: E, - params: P, - credential?: string | null, - ): Promise>; - - /** - * No description provided. - * - * **Credential required**: *Yes* / **Permission**: *write:account* - */ - request( - endpoint: E, - params: P, - credential?: string | null, - ): Promise>; - /** * No description provided. * diff --git a/packages/misskey-js/src/autogen/endpoint.ts b/packages/misskey-js/src/autogen/endpoint.ts index bfbe78d60a..1bcc2bd29c 100644 --- a/packages/misskey-js/src/autogen/endpoint.ts +++ b/packages/misskey-js/src/autogen/endpoint.ts @@ -435,6 +435,13 @@ import type { NotesCreateRequest, NotesCreateResponse, NotesDeleteRequest, + NotesDraftsRequest, + NotesDraftsResponse, + NotesDraftsCreateRequest, + NotesDraftsCreateResponse, + NotesDraftsDeleteRequest, + NotesDraftsUpdateRequest, + NotesDraftsUpdateResponse, NotesFavoritesCreateRequest, NotesFavoritesDeleteRequest, NotesFeaturedRequest, @@ -475,13 +482,6 @@ import type { NotesUnrenoteRequest, NotesUserListTimelineRequest, NotesUserListTimelineResponse, - NotesDraftsRequest, - NotesDraftsResponse, - NotesDraftsCreateRequest, - NotesDraftsCreateResponse, - NotesDraftsUpdateRequest, - NotesDraftsUpdateResponse, - NotesDraftsDeleteRequest, NotificationsCreateRequest, PagePushRequest, PagesCreateRequest, @@ -883,6 +883,10 @@ export type Endpoints = { 'notes/conversation': { req: NotesConversationRequest; res: NotesConversationResponse }; 'notes/create': { req: NotesCreateRequest; res: NotesCreateResponse }; 'notes/delete': { req: NotesDeleteRequest; res: EmptyResponse }; + 'notes/drafts': { req: NotesDraftsRequest; res: NotesDraftsResponse }; + 'notes/drafts/create': { req: NotesDraftsCreateRequest; res: NotesDraftsCreateResponse }; + 'notes/drafts/delete': { req: NotesDraftsDeleteRequest; res: EmptyResponse }; + 'notes/drafts/update': { req: NotesDraftsUpdateRequest; res: NotesDraftsUpdateResponse }; 'notes/favorites/create': { req: NotesFavoritesCreateRequest; res: EmptyResponse }; 'notes/favorites/delete': { req: NotesFavoritesDeleteRequest; res: EmptyResponse }; 'notes/featured': { req: NotesFeaturedRequest; res: NotesFeaturedResponse }; @@ -907,10 +911,6 @@ export type Endpoints = { 'notes/translate': { req: NotesTranslateRequest; res: NotesTranslateResponse }; 'notes/unrenote': { req: NotesUnrenoteRequest; res: EmptyResponse }; 'notes/user-list-timeline': { req: NotesUserListTimelineRequest; res: NotesUserListTimelineResponse }; - 'notes/drafts': { req: NotesDraftsRequest; res: NotesDraftsResponse }; - 'notes/drafts/create': { req: NotesDraftsCreateRequest; res: NotesDraftsCreateResponse }; - 'notes/drafts/update': { req: NotesDraftsUpdateRequest; res: NotesDraftsUpdateResponse }; - 'notes/drafts/delete': { req: NotesDraftsDeleteRequest; res: EmptyResponse }; 'notifications/create': { req: NotificationsCreateRequest; res: EmptyResponse }; 'notifications/flush': { req: EmptyRequest; res: EmptyResponse }; 'notifications/mark-all-as-read': { req: EmptyRequest; res: EmptyResponse }; diff --git a/packages/misskey-js/src/autogen/entities.ts b/packages/misskey-js/src/autogen/entities.ts index 1899ebe476..2b91d0b08f 100644 --- a/packages/misskey-js/src/autogen/entities.ts +++ b/packages/misskey-js/src/autogen/entities.ts @@ -438,6 +438,13 @@ export type NotesConversationResponse = operations['notes___conversation']['resp 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 NotesDraftsRequest = operations['notes___drafts']['requestBody']['content']['application/json']; +export type NotesDraftsResponse = operations['notes___drafts']['responses']['200']['content']['application/json']; +export type NotesDraftsCreateRequest = operations['notes___drafts___create']['requestBody']['content']['application/json']; +export type NotesDraftsCreateResponse = operations['notes___drafts___create']['responses']['200']['content']['application/json']; +export type NotesDraftsDeleteRequest = operations['notes___drafts___delete']['requestBody']['content']['application/json']; +export type NotesDraftsUpdateRequest = operations['notes___drafts___update']['requestBody']['content']['application/json']; +export type NotesDraftsUpdateResponse = operations['notes___drafts___update']['responses']['200']['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']; @@ -478,13 +485,6 @@ export type NotesTranslateResponse = operations['notes___translate']['responses' 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 NotesDraftsRequest = operations['notes___drafts']['requestBody']['content']['application/json']; -export type NotesDraftsResponse = operations['notes___drafts']['responses']['200']['content']['application/json']; -export type NotesDraftsCreateRequest = operations['notes___drafts___create']['requestBody']['content']['application/json']; -export type NotesDraftsCreateResponse = operations['notes___drafts___create']['responses']['200']['content']['application/json']; -export type NotesDraftsUpdateRequest = operations['notes___drafts___update']['requestBody']['content']['application/json']; -export type NotesDraftsUpdateResponse = operations['notes___drafts___update']['responses']['200']['content']['application/json']; -export type NotesDraftsDeleteRequest = operations['notes___drafts___delete']['requestBody']['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']; diff --git a/packages/misskey-js/src/autogen/types.ts b/packages/misskey-js/src/autogen/types.ts index 9dde9b87da..9d9aca07b6 100644 --- a/packages/misskey-js/src/autogen/types.ts +++ b/packages/misskey-js/src/autogen/types.ts @@ -2810,6 +2810,42 @@ export type paths = { */ post: operations['notes___delete']; }; + '/notes/drafts': { + /** + * notes/drafts + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *read:account* + */ + post: operations['notes___drafts']; + }; + '/notes/drafts/create': { + /** + * notes/drafts/create + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:account* + */ + post: operations['notes___drafts___create']; + }; + '/notes/drafts/delete': { + /** + * notes/drafts/delete + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:account* + */ + post: operations['notes___drafts___delete']; + }; + '/notes/drafts/update': { + /** + * notes/drafts/update + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:account* + */ + post: operations['notes___drafts___update']; + }; '/notes/favorites/create': { /** * notes/favorites/create @@ -3040,42 +3076,6 @@ export type paths = { */ post: operations['notes___user-list-timeline']; }; - '/notes/drafts': { - /** - * notes/drafts - * @description No description provided. - * - * **Credential required**: *Yes* / **Permission**: *read:account* - */ - post: operations['notes___drafts']; - }; - '/notes/drafts/create': { - /** - * notes/drafts/create - * @description No description provided. - * - * **Credential required**: *Yes* / **Permission**: *write:account* - */ - post: operations['notes___drafts___create']; - }; - '/notes/drafts/update': { - /** - * notes/drafts/update - * @description No description provided. - * - * **Credential required**: *Yes* / **Permission**: *write:account* - */ - post: operations['notes___drafts___update']; - }; - '/notes/drafts/delete': { - /** - * notes/drafts/delete - * @description No description provided. - * - * **Credential required**: *Yes* / **Permission**: *write:account* - */ - post: operations['notes___drafts___delete']; - }; '/notifications/create': { /** * notifications/create @@ -22658,6 +22658,296 @@ export type operations = { }; }; }; + /** + * notes/drafts + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *read:account* + */ + notes___drafts: { + requestBody: { + content: { + 'application/json': { + /** @default 30 */ + limit?: number; + /** Format: misskey:id */ + sinceId?: string; + /** Format: misskey:id */ + untilId?: string; + }; + }; + }; + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': components['schemas']['NoteDraft'][]; + }; + }; + /** @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']; + }; + }; + }; + }; + /** + * notes/drafts/create + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:account* + */ + notes___drafts___create: { + requestBody: { + content: { + 'application/json': { + /** + * @default public + * @enum {string} + */ + visibility?: 'public' | 'home' | 'followers' | 'specified'; + visibleUserIds?: string[]; + cw?: string | null; + hashtag?: string | null; + /** @default false */ + localOnly?: boolean; + /** + * @default null + * @enum {string|null} + */ + reactionAcceptance?: null | 'likeOnly' | 'likeOnlyForRemote' | 'nonSensitiveOnly' | 'nonSensitiveOnlyForLocalLikeOnlyForRemote'; + /** Format: misskey:id */ + replyId?: string | null; + /** Format: misskey:id */ + renoteId?: string | null; + /** Format: misskey:id */ + channelId?: string | null; + text?: string | null; + fileIds?: string[]; + poll?: ({ + choices: string[]; + multiple?: boolean; + expiresAt?: number | null; + expiredAfter?: number | null; + }) | null; + }; + }; + }; + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': { + createdDraft: components['schemas']['NoteDraft']; + }; + }; + }; + /** @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 Too many requests */ + 429: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * notes/drafts/delete + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:account* + */ + notes___drafts___delete: { + requestBody: { + content: { + 'application/json': { + /** Format: misskey:id */ + draftId: string; + }; + }; + }; + responses: { + /** @description OK (without any results) */ + 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']; + }; + }; + }; + }; + /** + * notes/drafts/update + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:account* + */ + notes___drafts___update: { + requestBody: { + content: { + 'application/json': { + /** Format: misskey:id */ + draftId: string; + /** + * @default public + * @enum {string} + */ + visibility?: 'public' | 'home' | 'followers' | 'specified'; + visibleUserIds?: string[]; + cw?: string | null; + hashtag?: string | null; + /** @default false */ + localOnly?: boolean; + /** + * @default null + * @enum {string|null} + */ + reactionAcceptance?: null | 'likeOnly' | 'likeOnlyForRemote' | 'nonSensitiveOnly' | 'nonSensitiveOnlyForLocalLikeOnlyForRemote'; + /** Format: misskey:id */ + replyId?: string | null; + /** Format: misskey:id */ + renoteId?: string | null; + /** Format: misskey:id */ + channelId?: string | null; + text?: string | null; + fileIds?: string[]; + poll?: ({ + choices: string[]; + multiple?: boolean; + expiresAt?: number | null; + expiredAfter?: number | null; + }) | null; + }; + }; + }; + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': { + updatedDraft: components['schemas']['NoteDraft']; + }; + }; + }; + /** @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 Too many requests */ + 429: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; /** * notes/favorites/create * @description No description provided. @@ -24131,296 +24421,6 @@ export type operations = { }; }; }; - /** - * notes/drafts - * @description No description provided. - * - * **Credential required**: *Yes* / **Permission**: *read:account* - */ - notes___drafts: { - requestBody: { - content: { - 'application/json': { - /** @default 30 */ - limit?: number; - /** Format: misskey:id */ - sinceId?: string; - /** Format: misskey:id */ - untilId?: string; - }; - }; - }; - responses: { - /** @description OK (with results) */ - 200: { - content: { - 'application/json': components['schemas']['NoteDraft'][]; - }; - }; - /** @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']; - }; - }; - }; - }; - /** - * notes/drafts/create - * @description No description provided. - * - * **Credential required**: *Yes* / **Permission**: *write:account* - */ - notes___drafts___create: { - requestBody: { - content: { - 'application/json': { - /** - * @default public - * @enum {string} - */ - visibility?: 'public' | 'home' | 'followers' | 'specified'; - visibleUserIds?: string[]; - cw?: string | null; - hashtag?: string | null; - /** @default false */ - localOnly?: boolean; - /** - * @default null - * @enum {string|null} - */ - reactionAcceptance?: null | 'likeOnly' | 'likeOnlyForRemote' | 'nonSensitiveOnly' | 'nonSensitiveOnlyForLocalLikeOnlyForRemote'; - /** Format: misskey:id */ - replyId?: string | null; - /** Format: misskey:id */ - renoteId?: string | null; - /** Format: misskey:id */ - channelId?: string | null; - text?: string | null; - fileIds?: string[]; - poll?: ({ - choices: string[]; - multiple?: boolean; - expiresAt?: number | null; - expiredAfter?: number | null; - }) | null; - }; - }; - }; - responses: { - /** @description OK (with results) */ - 200: { - content: { - 'application/json': { - createdDraft: components['schemas']['NoteDraft']; - }; - }; - }; - /** @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 Too many requests */ - 429: { - content: { - 'application/json': components['schemas']['Error']; - }; - }; - /** @description Internal server error */ - 500: { - content: { - 'application/json': components['schemas']['Error']; - }; - }; - }; - }; - /** - * notes/drafts/update - * @description No description provided. - * - * **Credential required**: *Yes* / **Permission**: *write:account* - */ - notes___drafts___update: { - requestBody: { - content: { - 'application/json': { - /** Format: misskey:id */ - draftId: string; - /** - * @default public - * @enum {string} - */ - visibility?: 'public' | 'home' | 'followers' | 'specified'; - visibleUserIds?: string[]; - cw?: string | null; - hashtag?: string | null; - /** @default false */ - localOnly?: boolean; - /** - * @default null - * @enum {string|null} - */ - reactionAcceptance?: null | 'likeOnly' | 'likeOnlyForRemote' | 'nonSensitiveOnly' | 'nonSensitiveOnlyForLocalLikeOnlyForRemote'; - /** Format: misskey:id */ - replyId?: string | null; - /** Format: misskey:id */ - renoteId?: string | null; - /** Format: misskey:id */ - channelId?: string | null; - text?: string | null; - fileIds?: string[]; - poll?: ({ - choices: string[]; - multiple?: boolean; - expiresAt?: number | null; - expiredAfter?: number | null; - }) | null; - }; - }; - }; - responses: { - /** @description OK (with results) */ - 200: { - content: { - 'application/json': { - updatedDraft: components['schemas']['NoteDraft']; - }; - }; - }; - /** @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 Too many requests */ - 429: { - content: { - 'application/json': components['schemas']['Error']; - }; - }; - /** @description Internal server error */ - 500: { - content: { - 'application/json': components['schemas']['Error']; - }; - }; - }; - }; - /** - * notes/drafts/delete - * @description No description provided. - * - * **Credential required**: *Yes* / **Permission**: *write:account* - */ - notes___drafts___delete: { - requestBody: { - content: { - 'application/json': { - /** Format: misskey:id */ - draftId: string; - }; - }; - }; - responses: { - /** @description OK (without any results) */ - 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']; - }; - }; - }; - }; /** * notifications/create * @description No description provided.