From a4e4799613586a3baa3e2af837416b8d5c285e5d Mon Sep 17 00:00:00 2001 From: kakkokari-gtyih <67428053+kakkokari-gtyih@users.noreply.github.com> Date: Thu, 7 Nov 2024 13:51:52 +0900 Subject: [PATCH] =?UTF-8?q?api.json=E3=81=AB=E5=87=BA=E5=8A=9B=E3=81=95?= =?UTF-8?q?=E3=82=8C=E3=81=AA=E3=81=84=E3=82=A8=E3=83=B3=E3=83=89=E3=83=9D?= =?UTF-8?q?=E3=82=A4=E3=83=B3=E3=83=88=E3=81=AFoverwrite=E3=82=92=E4=BB=8B?= =?UTF-8?q?=E3=81=95=E3=81=AA=E3=81=84=E3=82=88=E3=81=86=E3=81=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/misskey-js/etc/misskey-js.api.md | 15 ++--- packages/misskey-js/src/api.types.ts | 74 ++++++++++++----------- 2 files changed, 46 insertions(+), 43 deletions(-) diff --git a/packages/misskey-js/etc/misskey-js.api.md b/packages/misskey-js/etc/misskey-js.api.md index 8d1624fee67a..af73af080b5c 100644 --- a/packages/misskey-js/etc/misskey-js.api.md +++ b/packages/misskey-js/etc/misskey-js.api.md @@ -1160,6 +1160,13 @@ export type Endpoints = Overwrite; + res: AdminRolesCreateResponse; + }; +}> & { 'signup': { req: SignupRequest; res: SignupResponse; @@ -1188,17 +1195,11 @@ export type Endpoints = Overwrite; - res: AdminRolesCreateResponse; - }; [ep: `miauth/${string}/check`]: { req: EmptyRequest; res: MiAuthCheckResponse; }; -}>; +}; // @public (undocumented) type EndpointsResponse = operations['endpoints']['responses']['200']['content']['application/json']; diff --git a/packages/misskey-js/src/api.types.ts b/packages/misskey-js/src/api.types.ts index 7be1b6ce5f34..c2cb55189f0f 100644 --- a/packages/misskey-js/src/api.types.ts +++ b/packages/misskey-js/src/api.types.ts @@ -58,6 +58,7 @@ export type SwitchCaseResponseType; res: AdminRolesCreateResponse; }, - [ep: `miauth/${string}/check`]: { - req: EmptyRequest; - res: MiAuthCheckResponse; - } + // ▲ api.jsonのオーバーライド ▲ } -> +> & { + // ▼ api.jsonに載らないもの ▼ + 'signup': { + req: SignupRequest; + res: SignupResponse; + }, + 'signup-pending': { + req: SignupPendingRequest; + res: SignupPendingResponse; + }, + 'signin-flow': { + req: SigninFlowRequest; + res: SigninFlowResponse; + }, + 'signin-with-passkey': { + req: SigninWithPasskeyRequest; + res: { + $switch: { + $cases: [ + [ + { + context: string; + }, + SigninWithPasskeyResponse, + ], + ]; + $default: SigninWithPasskeyInitResponse; + }, + }, + }, + [ep: `miauth/${string}/check`]: { + req: EmptyRequest; + res: MiAuthCheckResponse; + }, + // ▲ api.jsonに載らないもの ▲ +};