update api types

This commit is contained in:
kakkokari-gtyih 2023-12-29 16:44:28 +09:00
parent 030177a567
commit 75e5f5ad0f
6 changed files with 94 additions and 15 deletions

View File

@ -85,6 +85,9 @@ type AdminAnnouncementsListResponse = operations['admin/announcements/list']['re
// @public (undocumented) // @public (undocumented)
type AdminAnnouncementsUpdateRequest = operations['admin/announcements/update']['requestBody']['content']['application/json']; type AdminAnnouncementsUpdateRequest = operations['admin/announcements/update']['requestBody']['content']['application/json'];
// @public (undocumented)
type AdminApproveUserRequest = operations['admin/approve-user']['requestBody']['content']['application/json'];
// @public (undocumented) // @public (undocumented)
type AdminAvatarDecorationsCreateRequest = operations['admin/avatar-decorations/create']['requestBody']['content']['application/json']; type AdminAvatarDecorationsCreateRequest = operations['admin/avatar-decorations/create']['requestBody']['content']['application/json'];
@ -1136,6 +1139,7 @@ declare namespace entities {
AdminShowUsersRequest, AdminShowUsersRequest,
AdminShowUsersResponse, AdminShowUsersResponse,
AdminSuspendUserRequest, AdminSuspendUserRequest,
AdminApproveUserRequest,
AdminUnsuspendUserRequest, AdminUnsuspendUserRequest,
AdminUpdateMetaRequest, AdminUpdateMetaRequest,
AdminDeleteAccountRequest, AdminDeleteAccountRequest,
@ -2259,7 +2263,7 @@ type ModerationLog = {
}); });
// @public (undocumented) // @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) // @public (undocumented)
type MuteCreateRequest = operations['mute/create']['requestBody']['content']['application/json']; type MuteCreateRequest = operations['mute/create']['requestBody']['content']['application/json'];

View File

@ -1,6 +1,6 @@
/* /*
* version: 2023.12.0 * version: 2023.12.2
* generatedAt: 2023-12-26T23:35:09.494Z * generatedAt: 2023-12-29T07:43:34.900Z
*/ */
import type { SwitchCaseResponseType } from '../api.js'; import type { SwitchCaseResponseType } from '../api.js';
@ -33,7 +33,6 @@ declare module '../api.js' {
/** /**
* No description provided. * No description provided.
* *
* **Internal Endpoint**: This endpoint is an API for the misskey mainframe and is not intended for use by third parties.
* **Credential required**: *No* * **Credential required**: *No*
*/ */
request<E extends 'admin/accounts/create', P extends Endpoints[E]['req']>( request<E extends 'admin/accounts/create', P extends Endpoints[E]['req']>(
@ -703,6 +702,17 @@ declare module '../api.js' {
credential?: string | null, credential?: string | null,
): Promise<SwitchCaseResponseType<E, P>>; ): Promise<SwitchCaseResponseType<E, P>>;
/**
* No description provided.
*
* **Credential required**: *Yes*
*/
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. * No description provided.
* *

View File

@ -1,6 +1,6 @@
/* /*
* version: 2023.12.0 * version: 2023.12.2
* generatedAt: 2023-12-26T23:35:09.491Z * generatedAt: 2023-12-29T07:43:34.897Z
*/ */
import type { import type {
@ -87,6 +87,7 @@ import type {
AdminShowUsersRequest, AdminShowUsersRequest,
AdminShowUsersResponse, AdminShowUsersResponse,
AdminSuspendUserRequest, AdminSuspendUserRequest,
AdminApproveUserRequest,
AdminUnsuspendUserRequest, AdminUnsuspendUserRequest,
AdminUpdateMetaRequest, AdminUpdateMetaRequest,
AdminDeleteAccountRequest, AdminDeleteAccountRequest,
@ -606,6 +607,7 @@ export type Endpoints = {
'admin/show-user': { req: AdminShowUserRequest; res: AdminShowUserResponse }; 'admin/show-user': { req: AdminShowUserRequest; res: AdminShowUserResponse };
'admin/show-users': { req: AdminShowUsersRequest; res: AdminShowUsersResponse }; 'admin/show-users': { req: AdminShowUsersRequest; res: AdminShowUsersResponse };
'admin/suspend-user': { req: AdminSuspendUserRequest; res: EmptyResponse }; 'admin/suspend-user': { req: AdminSuspendUserRequest; res: EmptyResponse };
'admin/approve-user': { req: AdminApproveUserRequest; res: EmptyResponse };
'admin/unsuspend-user': { req: AdminUnsuspendUserRequest; res: EmptyResponse }; 'admin/unsuspend-user': { req: AdminUnsuspendUserRequest; res: EmptyResponse };
'admin/update-meta': { req: AdminUpdateMetaRequest; res: EmptyResponse }; 'admin/update-meta': { req: AdminUpdateMetaRequest; res: EmptyResponse };
'admin/delete-account': { req: AdminDeleteAccountRequest; res: AdminDeleteAccountResponse }; 'admin/delete-account': { req: AdminDeleteAccountRequest; res: AdminDeleteAccountResponse };

View File

@ -1,6 +1,6 @@
/* /*
* version: 2023.12.0 * version: 2023.12.2
* generatedAt: 2023-12-26T23:35:09.489Z * generatedAt: 2023-12-29T07:43:34.895Z
*/ */
import { operations } from './types.js'; import { operations } from './types.js';
@ -89,6 +89,7 @@ export type AdminShowUserResponse = operations['admin/show-user']['responses']['
export type AdminShowUsersRequest = operations['admin/show-users']['requestBody']['content']['application/json']; export type AdminShowUsersRequest = operations['admin/show-users']['requestBody']['content']['application/json'];
export type AdminShowUsersResponse = operations['admin/show-users']['responses']['200']['content']['application/json']; export type AdminShowUsersResponse = operations['admin/show-users']['responses']['200']['content']['application/json'];
export type AdminSuspendUserRequest = operations['admin/suspend-user']['requestBody']['content']['application/json']; export type AdminSuspendUserRequest = operations['admin/suspend-user']['requestBody']['content']['application/json'];
export type AdminApproveUserRequest = operations['admin/approve-user']['requestBody']['content']['application/json'];
export type AdminUnsuspendUserRequest = operations['admin/unsuspend-user']['requestBody']['content']['application/json']; export type AdminUnsuspendUserRequest = operations['admin/unsuspend-user']['requestBody']['content']['application/json'];
export type AdminUpdateMetaRequest = operations['admin/update-meta']['requestBody']['content']['application/json']; export type AdminUpdateMetaRequest = operations['admin/update-meta']['requestBody']['content']['application/json'];
export type AdminDeleteAccountRequest = operations['admin/delete-account']['requestBody']['content']['application/json']; export type AdminDeleteAccountRequest = operations['admin/delete-account']['requestBody']['content']['application/json'];

View File

@ -1,6 +1,6 @@
/* /*
* version: 2023.12.0 * version: 2023.12.2
* generatedAt: 2023-12-26T23:35:09.485Z * generatedAt: 2023-12-29T07:43:34.893Z
*/ */
import { components } from './types.js'; import { components } from './types.js';

View File

@ -2,8 +2,8 @@
/* eslint @typescript-eslint/no-explicit-any: 0 */ /* eslint @typescript-eslint/no-explicit-any: 0 */
/* /*
* version: 2023.12.0 * version: 2023.12.2
* generatedAt: 2023-12-26T23:35:09.389Z * generatedAt: 2023-12-29T07:43:34.764Z
*/ */
/** /**
@ -40,7 +40,6 @@ export type paths = {
* admin/accounts/create * admin/accounts/create
* @description No description provided. * @description No description provided.
* *
* **Internal Endpoint**: This endpoint is an API for the misskey mainframe and is not intended for use by third parties.
* **Credential required**: *No* * **Credential required**: *No*
*/ */
post: operations['admin/accounts/create']; post: operations['admin/accounts/create'];
@ -586,6 +585,15 @@ export type paths = {
*/ */
post: operations['admin/suspend-user']; post: operations['admin/suspend-user'];
}; };
'/admin/approve-user': {
/**
* admin/approve-user
* @description No description provided.
*
* **Credential required**: *Yes*
*/
post: operations['admin/approve-user'];
};
'/admin/unsuspend-user': { '/admin/unsuspend-user': {
/** /**
* admin/unsuspend-user * admin/unsuspend-user
@ -4398,6 +4406,7 @@ export type operations = {
cacheRemoteFiles: boolean; cacheRemoteFiles: boolean;
cacheRemoteSensitiveFiles: boolean; cacheRemoteSensitiveFiles: boolean;
emailRequiredForSignup: boolean; emailRequiredForSignup: boolean;
approvalRequiredForSignup: boolean;
enableHcaptcha: boolean; enableHcaptcha: boolean;
hcaptchaSiteKey: string | null; hcaptchaSiteKey: string | null;
enableRecaptcha: boolean; enableRecaptcha: boolean;
@ -4620,7 +4629,6 @@ export type operations = {
* admin/accounts/create * admin/accounts/create
* @description No description provided. * @description No description provided.
* *
* **Internal Endpoint**: This endpoint is an API for the misskey mainframe and is not intended for use by third parties.
* **Credential required**: *No* * **Credential required**: *No*
*/ */
'admin/accounts/create': { 'admin/accounts/create': {
@ -7999,7 +8007,7 @@ export type operations = {
* @default all * @default all
* @enum {string} * @enum {string}
*/ */
state?: 'all' | 'alive' | 'available' | 'admin' | 'moderator' | 'adminOrModerator' | 'suspended'; state?: 'all' | 'alive' | 'available' | 'admin' | 'moderator' | 'adminOrModerator' | 'suspended' | 'approved';
/** /**
* @default combined * @default combined
* @enum {string} * @enum {string}
@ -8106,6 +8114,58 @@ export type operations = {
}; };
}; };
}; };
/**
* admin/approve-user
* @description No description provided.
*
* **Credential required**: *Yes*
*/
'admin/approve-user': {
requestBody: {
content: {
'application/json': {
/** Format: misskey:id */
userId: 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/unsuspend-user * admin/unsuspend-user
* @description No description provided. * @description No description provided.
@ -8192,6 +8252,7 @@ export type operations = {
cacheRemoteFiles?: boolean; cacheRemoteFiles?: boolean;
cacheRemoteSensitiveFiles?: boolean; cacheRemoteSensitiveFiles?: boolean;
emailRequiredForSignup?: boolean; emailRequiredForSignup?: boolean;
approvalRequiredForSignup?: boolean;
enableHcaptcha?: boolean; enableHcaptcha?: boolean;
hcaptchaSiteKey?: string | null; hcaptchaSiteKey?: string | null;
hcaptchaSecretKey?: string | null; hcaptchaSecretKey?: string | null;
@ -18697,6 +18758,7 @@ export type operations = {
cacheRemoteFiles: boolean; cacheRemoteFiles: boolean;
cacheRemoteSensitiveFiles: boolean; cacheRemoteSensitiveFiles: boolean;
emailRequiredForSignup: boolean; emailRequiredForSignup: boolean;
approvalRequiredForSignup: boolean;
enableHcaptcha: boolean; enableHcaptcha: boolean;
hcaptchaSiteKey: string | null; hcaptchaSiteKey: string | null;
enableRecaptcha: boolean; enableRecaptcha: boolean;