Merge tag '2024.10.1' into feature/2024.10
This commit is contained in:
commit
f079edaf3c
454 changed files with 9728 additions and 3363 deletions
|
|
@ -3,8 +3,9 @@ import { UserDetailed } from './autogen/models.js';
|
|||
import { AdminRolesCreateRequest, AdminRolesCreateResponse, UsersShowRequest } from './autogen/entities.js';
|
||||
import {
|
||||
PartialRolePolicyOverride,
|
||||
SigninRequest,
|
||||
SigninResponse,
|
||||
SigninFlowRequest,
|
||||
SigninFlowResponse,
|
||||
SigninWithPasskeyInitResponse,
|
||||
SigninWithPasskeyRequest,
|
||||
SigninWithPasskeyResponse,
|
||||
SignupPendingRequest,
|
||||
|
|
@ -80,14 +81,26 @@ export type Endpoints = Overwrite<
|
|||
res: SignupPendingResponse;
|
||||
},
|
||||
// api.jsonには載せないものなのでここで定義
|
||||
'signin': {
|
||||
req: SigninRequest;
|
||||
res: SigninResponse;
|
||||
'signin-flow': {
|
||||
req: SigninFlowRequest;
|
||||
res: SigninFlowResponse;
|
||||
},
|
||||
'signin-with-passkey': {
|
||||
req: SigninWithPasskeyRequest;
|
||||
res: SigninWithPasskeyResponse;
|
||||
}
|
||||
res: {
|
||||
$switch: {
|
||||
$cases: [
|
||||
[
|
||||
{
|
||||
context: string;
|
||||
},
|
||||
SigninWithPasskeyResponse,
|
||||
],
|
||||
];
|
||||
$default: SigninWithPasskeyInitResponse;
|
||||
},
|
||||
},
|
||||
},
|
||||
'admin/roles/create': {
|
||||
req: Overwrite<AdminRolesCreateRequest, { policies: PartialRolePolicyOverride }>;
|
||||
res: AdminRolesCreateResponse;
|
||||
|
|
|
|||
|
|
@ -691,6 +691,28 @@ declare module '../api.js' {
|
|||
credential?: string | null,
|
||||
): Promise<SwitchCaseResponseType<E, P>>;
|
||||
|
||||
/**
|
||||
* No description provided.
|
||||
*
|
||||
* **Credential required**: *Yes* / **Permission**: *write:admin:resolve-abuse-user-report*
|
||||
*/
|
||||
request<E extends 'admin/forward-abuse-user-report', 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:resolve-abuse-user-report*
|
||||
*/
|
||||
request<E extends 'admin/update-abuse-user-report', P extends Endpoints[E]['req']>(
|
||||
endpoint: E,
|
||||
params: P,
|
||||
credential?: string | null,
|
||||
): Promise<SwitchCaseResponseType<E, P>>;
|
||||
|
||||
/**
|
||||
* No description provided.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -83,6 +83,8 @@ import type {
|
|||
AdminResetPasswordRequest,
|
||||
AdminResetPasswordResponse,
|
||||
AdminResolveAbuseUserReportRequest,
|
||||
AdminForwardAbuseUserReportRequest,
|
||||
AdminUpdateAbuseUserReportRequest,
|
||||
AdminSendEmailRequest,
|
||||
AdminServerInfoResponse,
|
||||
AdminShowModerationLogsRequest,
|
||||
|
|
@ -485,6 +487,7 @@ import type {
|
|||
FlashCreateRequest,
|
||||
FlashCreateResponse,
|
||||
FlashDeleteRequest,
|
||||
FlashFeaturedRequest,
|
||||
FlashFeaturedResponse,
|
||||
FlashLikeRequest,
|
||||
FlashShowRequest,
|
||||
|
|
@ -659,6 +662,8 @@ export type Endpoints = {
|
|||
'admin/relays/remove': { req: AdminRelaysRemoveRequest; res: EmptyResponse };
|
||||
'admin/reset-password': { req: AdminResetPasswordRequest; res: AdminResetPasswordResponse };
|
||||
'admin/resolve-abuse-user-report': { req: AdminResolveAbuseUserReportRequest; res: EmptyResponse };
|
||||
'admin/forward-abuse-user-report': { req: AdminForwardAbuseUserReportRequest; res: EmptyResponse };
|
||||
'admin/update-abuse-user-report': { req: AdminUpdateAbuseUserReportRequest; res: EmptyResponse };
|
||||
'admin/send-email': { req: AdminSendEmailRequest; res: EmptyResponse };
|
||||
'admin/server-info': { req: EmptyRequest; res: AdminServerInfoResponse };
|
||||
'admin/show-moderation-logs': { req: AdminShowModerationLogsRequest; res: AdminShowModerationLogsResponse };
|
||||
|
|
@ -926,7 +931,7 @@ export type Endpoints = {
|
|||
'pages/update': { req: PagesUpdateRequest; res: EmptyResponse };
|
||||
'flash/create': { req: FlashCreateRequest; res: FlashCreateResponse };
|
||||
'flash/delete': { req: FlashDeleteRequest; res: EmptyResponse };
|
||||
'flash/featured': { req: EmptyRequest; res: FlashFeaturedResponse };
|
||||
'flash/featured': { req: FlashFeaturedRequest; res: FlashFeaturedResponse };
|
||||
'flash/like': { req: FlashLikeRequest; res: EmptyResponse };
|
||||
'flash/show': { req: FlashShowRequest; res: FlashShowResponse };
|
||||
'flash/unlike': { req: FlashUnlikeRequest; res: EmptyResponse };
|
||||
|
|
|
|||
|
|
@ -86,6 +86,8 @@ export type AdminRelaysRemoveRequest = operations['admin___relays___remove']['re
|
|||
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 AdminForwardAbuseUserReportRequest = operations['admin___forward-abuse-user-report']['requestBody']['content']['application/json'];
|
||||
export type AdminUpdateAbuseUserReportRequest = operations['admin___update-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'];
|
||||
|
|
@ -488,6 +490,7 @@ export type PagesUpdateRequest = operations['pages___update']['requestBody']['co
|
|||
export type FlashCreateRequest = operations['flash___create']['requestBody']['content']['application/json'];
|
||||
export type FlashCreateResponse = operations['flash___create']['responses']['200']['content']['application/json'];
|
||||
export type FlashDeleteRequest = operations['flash___delete']['requestBody']['content']['application/json'];
|
||||
export type FlashFeaturedRequest = operations['flash___featured']['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'];
|
||||
|
|
|
|||
|
|
@ -576,6 +576,24 @@ export type paths = {
|
|||
*/
|
||||
post: operations['admin___resolve-abuse-user-report'];
|
||||
};
|
||||
'/admin/forward-abuse-user-report': {
|
||||
/**
|
||||
* admin/forward-abuse-user-report
|
||||
* @description No description provided.
|
||||
*
|
||||
* **Credential required**: *Yes* / **Permission**: *write:admin:resolve-abuse-user-report*
|
||||
*/
|
||||
post: operations['admin___forward-abuse-user-report'];
|
||||
};
|
||||
'/admin/update-abuse-user-report': {
|
||||
/**
|
||||
* admin/update-abuse-user-report
|
||||
* @description No description provided.
|
||||
*
|
||||
* **Credential required**: *Yes* / **Permission**: *write:admin:resolve-abuse-user-report*
|
||||
*/
|
||||
post: operations['admin___update-abuse-user-report'];
|
||||
};
|
||||
'/admin/send-email': {
|
||||
/**
|
||||
* admin/send-email
|
||||
|
|
@ -3959,16 +3977,13 @@ export type components = {
|
|||
followingVisibility: 'public' | 'followers' | 'private';
|
||||
/** @enum {string} */
|
||||
followersVisibility: 'public' | 'followers' | 'private';
|
||||
/** @default false */
|
||||
twoFactorEnabled: boolean;
|
||||
/** @default false */
|
||||
usePasswordLessLogin: boolean;
|
||||
/** @default false */
|
||||
securityKeys: boolean;
|
||||
roles: components['schemas']['RoleLite'][];
|
||||
followedMessage?: string | null;
|
||||
memo: string | null;
|
||||
moderationNote?: string;
|
||||
twoFactorEnabled?: boolean;
|
||||
usePasswordLessLogin?: boolean;
|
||||
securityKeys?: boolean;
|
||||
isFollowing?: boolean;
|
||||
isFollowed?: boolean;
|
||||
hasPendingFollowRequestFromYou?: boolean;
|
||||
|
|
@ -4153,6 +4168,12 @@ export type components = {
|
|||
}[];
|
||||
loggedInDays: number;
|
||||
policies: components['schemas']['RolePolicies'];
|
||||
/** @default false */
|
||||
twoFactorEnabled: boolean;
|
||||
/** @default false */
|
||||
usePasswordLessLogin: boolean;
|
||||
/** @default false */
|
||||
securityKeys: boolean;
|
||||
email?: string | null;
|
||||
emailVerified?: boolean | null;
|
||||
securityKeysList?: {
|
||||
|
|
@ -4469,7 +4490,14 @@ export type components = {
|
|||
exportedEntity: 'antenna' | 'blocking' | 'clip' | 'customEmoji' | 'favorite' | 'following' | 'muting' | 'note' | 'userList';
|
||||
/** Format: id */
|
||||
fileId: string;
|
||||
}) | ({
|
||||
}) | {
|
||||
/** Format: id */
|
||||
id: string;
|
||||
/** Format: date-time */
|
||||
createdAt: string;
|
||||
/** @enum {string} */
|
||||
type: 'login';
|
||||
} | ({
|
||||
/** Format: id */
|
||||
id: string;
|
||||
/** Format: date-time */
|
||||
|
|
@ -5145,6 +5173,7 @@ export type components = {
|
|||
enableFC: boolean;
|
||||
fcSiteKey: string | null;
|
||||
enableAchievements: boolean | null;
|
||||
enableTestcaptcha: boolean;
|
||||
swPublickey: string | null;
|
||||
/** @default /assets/ai.png */
|
||||
mascotImageUrl: string;
|
||||
|
|
@ -5227,7 +5256,7 @@ export type components = {
|
|||
latestSentAt: string | null;
|
||||
latestStatus: number | null;
|
||||
name: string;
|
||||
on: ('abuseReport' | 'abuseReportResolved' | 'userCreated')[];
|
||||
on: ('abuseReport' | 'abuseReportResolved' | 'userCreated' | 'inactiveModeratorsWarning' | 'inactiveModeratorsInvitationOnlyChanged')[];
|
||||
url: string;
|
||||
secret: string;
|
||||
};
|
||||
|
|
@ -5285,6 +5314,7 @@ export type operations = {
|
|||
turnstileSiteKey: string | null;
|
||||
enableFC: boolean;
|
||||
fcSiteKey: string | null;
|
||||
enableTestcaptcha: boolean;
|
||||
swPublickey: string | null;
|
||||
/** @default /assets/ai.png */
|
||||
mascotImageUrl: string | null;
|
||||
|
|
@ -5306,6 +5336,7 @@ export type operations = {
|
|||
blockedHosts: string[];
|
||||
sensitiveWords: string[];
|
||||
prohibitedWords: string[];
|
||||
prohibitedWordsForNameOfUser: string[];
|
||||
bannedEmailDomains?: string[];
|
||||
preservedUsernames: string[];
|
||||
bubbleInstances: string[];
|
||||
|
|
@ -5349,6 +5380,7 @@ export type operations = {
|
|||
truemailAuthKey: string | null;
|
||||
enableChartsForRemoteUser: boolean;
|
||||
enableChartsForFederatedInstances: boolean;
|
||||
enableStatsForFederatedInstances: boolean;
|
||||
enableServerMachineStats: boolean;
|
||||
enableAchievements: boolean;
|
||||
enableIdenticonGeneration: boolean;
|
||||
|
|
@ -5462,8 +5494,6 @@ export type operations = {
|
|||
* @enum {string}
|
||||
*/
|
||||
targetUserOrigin?: 'combined' | 'local' | 'remote';
|
||||
/** @default false */
|
||||
forwarded?: boolean;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
@ -5490,7 +5520,11 @@ export type operations = {
|
|||
assigneeId: string | null;
|
||||
reporter: components['schemas']['UserDetailedNotMe'];
|
||||
targetUser: components['schemas']['UserDetailedNotMe'];
|
||||
assignee?: components['schemas']['UserDetailedNotMe'] | null;
|
||||
assignee: components['schemas']['UserDetailedNotMe'] | null;
|
||||
forwarded: boolean;
|
||||
/** @enum {string|null} */
|
||||
resolvedAs: 'accept' | 'reject' | null;
|
||||
moderationNote: string;
|
||||
})[];
|
||||
};
|
||||
};
|
||||
|
|
@ -5824,6 +5858,7 @@ export type operations = {
|
|||
'application/json': {
|
||||
username: string;
|
||||
password: string;
|
||||
setupPassword?: string | null;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
@ -8906,8 +8941,113 @@ export type operations = {
|
|||
'application/json': {
|
||||
/** Format: misskey:id */
|
||||
reportId: string;
|
||||
/** @default false */
|
||||
forward?: boolean;
|
||||
/** @enum {string|null} */
|
||||
resolvedAs?: 'accept' | 'reject' | null;
|
||||
};
|
||||
};
|
||||
};
|
||||
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'];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
/**
|
||||
* admin/forward-abuse-user-report
|
||||
* @description No description provided.
|
||||
*
|
||||
* **Credential required**: *Yes* / **Permission**: *write:admin:resolve-abuse-user-report*
|
||||
*/
|
||||
'admin___forward-abuse-user-report': {
|
||||
requestBody: {
|
||||
content: {
|
||||
'application/json': {
|
||||
/** Format: misskey:id */
|
||||
reportId: 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'];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
/**
|
||||
* admin/update-abuse-user-report
|
||||
* @description No description provided.
|
||||
*
|
||||
* **Credential required**: *Yes* / **Permission**: *write:admin:resolve-abuse-user-report*
|
||||
*/
|
||||
'admin___update-abuse-user-report': {
|
||||
requestBody: {
|
||||
content: {
|
||||
'application/json': {
|
||||
/** Format: misskey:id */
|
||||
reportId: string;
|
||||
moderationNote?: string;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
@ -9861,6 +10001,7 @@ export type operations = {
|
|||
blockedHosts?: string[] | null;
|
||||
sensitiveWords?: string[] | null;
|
||||
prohibitedWords?: string[] | null;
|
||||
prohibitedWordsForNameOfUser?: string[] | null;
|
||||
themeColor?: string | null;
|
||||
mascotImageUrl?: string | null;
|
||||
bannerUrl?: string | null;
|
||||
|
|
@ -9899,6 +10040,7 @@ export type operations = {
|
|||
enableFC?: boolean;
|
||||
fcSiteKey?: string | null;
|
||||
fcSecretKey?: string | null;
|
||||
enableTestcaptcha?: boolean;
|
||||
/** @enum {string} */
|
||||
sensitiveMediaDetection?: 'none' | 'all' | 'local' | 'remote';
|
||||
/** @enum {string} */
|
||||
|
|
@ -9954,6 +10096,7 @@ export type operations = {
|
|||
truemailAuthKey?: string | null;
|
||||
enableChartsForRemoteUser?: boolean;
|
||||
enableChartsForFederatedInstances?: boolean;
|
||||
enableStatsForFederatedInstances?: boolean;
|
||||
enableServerMachineStats?: boolean;
|
||||
enableAchievements?: boolean;
|
||||
enableIdenticonGeneration?: boolean;
|
||||
|
|
@ -10657,7 +10800,7 @@ export type operations = {
|
|||
'application/json': {
|
||||
isActive: boolean;
|
||||
name: string;
|
||||
on: ('abuseReport' | 'abuseReportResolved' | 'userCreated')[];
|
||||
on: ('abuseReport' | 'abuseReportResolved' | 'userCreated' | 'inactiveModeratorsWarning' | 'inactiveModeratorsInvitationOnlyChanged')[];
|
||||
url: string;
|
||||
secret: string;
|
||||
};
|
||||
|
|
@ -10767,7 +10910,7 @@ export type operations = {
|
|||
content: {
|
||||
'application/json': {
|
||||
isActive?: boolean;
|
||||
on?: ('abuseReport' | 'abuseReportResolved' | 'userCreated')[];
|
||||
on?: ('abuseReport' | 'abuseReportResolved' | 'userCreated' | 'inactiveModeratorsWarning' | 'inactiveModeratorsInvitationOnlyChanged')[];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
@ -10880,7 +11023,7 @@ export type operations = {
|
|||
id: string;
|
||||
isActive: boolean;
|
||||
name: string;
|
||||
on: ('abuseReport' | 'abuseReportResolved' | 'userCreated')[];
|
||||
on: ('abuseReport' | 'abuseReportResolved' | 'userCreated' | 'inactiveModeratorsWarning' | 'inactiveModeratorsInvitationOnlyChanged')[];
|
||||
url: string;
|
||||
secret: string;
|
||||
};
|
||||
|
|
@ -10939,7 +11082,7 @@ export type operations = {
|
|||
/** Format: misskey:id */
|
||||
webhookId: string;
|
||||
/** @enum {string} */
|
||||
type: 'abuseReport' | 'abuseReportResolved' | 'userCreated';
|
||||
type: 'abuseReport' | 'abuseReportResolved' | 'userCreated' | 'inactiveModeratorsWarning' | 'inactiveModeratorsInvitationOnlyChanged';
|
||||
override?: {
|
||||
url?: string;
|
||||
secret?: string;
|
||||
|
|
@ -25057,6 +25200,16 @@ export type operations = {
|
|||
* **Credential required**: *No*
|
||||
*/
|
||||
flash___featured: {
|
||||
requestBody: {
|
||||
content: {
|
||||
'application/json': {
|
||||
/** @default 0 */
|
||||
offset?: number;
|
||||
/** @default 10 */
|
||||
limit?: number;
|
||||
};
|
||||
};
|
||||
};
|
||||
responses: {
|
||||
/** @description OK (with results) */
|
||||
200: {
|
||||
|
|
@ -29056,4 +29209,3 @@ export type operations = {
|
|||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -149,6 +149,8 @@ export const moderationLogTypes = [
|
|||
'markSensitiveDriveFile',
|
||||
'unmarkSensitiveDriveFile',
|
||||
'resolveAbuseReport',
|
||||
'forwardAbuseReport',
|
||||
'updateAbuseReportNote',
|
||||
'createInvitation',
|
||||
'createAd',
|
||||
'updateAd',
|
||||
|
|
@ -347,7 +349,18 @@ export type ModerationLogPayloads = {
|
|||
resolveAbuseReport: {
|
||||
reportId: string;
|
||||
report: ReceivedAbuseReport;
|
||||
forwarded: boolean;
|
||||
forwarded?: boolean;
|
||||
resolvedAs?: string | null;
|
||||
};
|
||||
forwardAbuseReport: {
|
||||
reportId: string;
|
||||
report: ReceivedAbuseReport;
|
||||
};
|
||||
updateAbuseReportNote: {
|
||||
reportId: string;
|
||||
report: ReceivedAbuseReport;
|
||||
before: string;
|
||||
after: string;
|
||||
};
|
||||
createInvitation: {
|
||||
invitations: InviteCode[];
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ import {
|
|||
User,
|
||||
UserDetailedNotMe,
|
||||
} from './autogen/models.js';
|
||||
import type { AuthenticationResponseJSON, PublicKeyCredentialRequestOptionsJSON } from '@simplewebauthn/types';
|
||||
|
||||
export * from './autogen/entities.js';
|
||||
export * from './autogen/models.js';
|
||||
|
|
@ -158,6 +159,12 @@ export type ModerationLog = {
|
|||
} | {
|
||||
type: 'resolveAbuseReport';
|
||||
info: ModerationLogPayloads['resolveAbuseReport'];
|
||||
} | {
|
||||
type: 'forwardAbuseReport';
|
||||
info: ModerationLogPayloads['forwardAbuseReport'];
|
||||
} | {
|
||||
type: 'updateAbuseReportNote';
|
||||
info: ModerationLogPayloads['updateAbuseReportNote'];
|
||||
} | {
|
||||
type: 'unsetUserAvatar';
|
||||
info: ModerationLogPayloads['unsetUserAvatar'];
|
||||
|
|
@ -256,6 +263,7 @@ export type SignupRequest = {
|
|||
'hcaptcha-response'?: string | null;
|
||||
'g-recaptcha-response'?: string | null;
|
||||
'turnstile-response'?: string | null;
|
||||
'm-captcha-response'?: string | null;
|
||||
}
|
||||
|
||||
export type SignupResponse = MeDetailed & {
|
||||
|
|
@ -271,26 +279,42 @@ export type SignupPendingResponse = {
|
|||
i: string,
|
||||
};
|
||||
|
||||
export type SigninRequest = {
|
||||
export type SigninFlowRequest = {
|
||||
username: string;
|
||||
password: string;
|
||||
password?: string;
|
||||
token?: string;
|
||||
credential?: AuthenticationResponseJSON;
|
||||
'hcaptcha-response'?: string | null;
|
||||
'g-recaptcha-response'?: string | null;
|
||||
'turnstile-response'?: string | null;
|
||||
'm-captcha-response'?: string | null;
|
||||
};
|
||||
|
||||
export type SigninFlowResponse = {
|
||||
finished: true;
|
||||
id: User['id'];
|
||||
i: string;
|
||||
} | {
|
||||
finished: false;
|
||||
next: 'captcha' | 'password' | 'totp';
|
||||
} | {
|
||||
finished: false;
|
||||
next: 'passkey';
|
||||
authRequest: PublicKeyCredentialRequestOptionsJSON;
|
||||
};
|
||||
|
||||
export type SigninWithPasskeyRequest = {
|
||||
credential?: object;
|
||||
credential?: AuthenticationResponseJSON;
|
||||
context?: string;
|
||||
};
|
||||
|
||||
export type SigninWithPasskeyInitResponse = {
|
||||
option: PublicKeyCredentialRequestOptionsJSON;
|
||||
context: string;
|
||||
};
|
||||
|
||||
export type SigninWithPasskeyResponse = {
|
||||
option?: object;
|
||||
context?: string;
|
||||
signinResponse?: SigninResponse;
|
||||
};
|
||||
|
||||
export type SigninResponse = {
|
||||
id: User['id'],
|
||||
i: string,
|
||||
signinResponse: SigninFlowResponse & { finished: true };
|
||||
};
|
||||
|
||||
type Values<T extends Record<PropertyKey, unknown>> = T[keyof T];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue