v2エンドポイントのルールに対応
This commit is contained in:
parent
6c3b97bb2f
commit
51c6186523
|
@ -48,7 +48,7 @@ import * as ep___admin_emoji_setAliasesBulk from './endpoints/admin/emoji/set-al
|
|||
import * as ep___admin_emoji_setCategoryBulk from './endpoints/admin/emoji/set-category-bulk.js';
|
||||
import * as ep___admin_emoji_setLicenseBulk from './endpoints/admin/emoji/set-license-bulk.js';
|
||||
import * as ep___admin_emoji_update from './endpoints/admin/emoji/update.js';
|
||||
import * as ep___admin_emoji_v2_list from './endpoints/admin/emoji/v2/list.js';
|
||||
import * as ep___v2_admin_emoji_list from './endpoints/v2/admin/emoji/list.js';
|
||||
import * as ep___admin_federation_deleteAllFiles from './endpoints/admin/federation/delete-all-files.js';
|
||||
import * as ep___admin_federation_refreshRemoteInstanceMetadata from './endpoints/admin/federation/refresh-remote-instance-metadata.js';
|
||||
import * as ep___admin_federation_removeAllFollowing from './endpoints/admin/federation/remove-all-following.js';
|
||||
|
@ -432,7 +432,7 @@ const $admin_emoji_setAliasesBulk: Provider = { provide: 'ep:admin/emoji/set-ali
|
|||
const $admin_emoji_setCategoryBulk: Provider = { provide: 'ep:admin/emoji/set-category-bulk', useClass: ep___admin_emoji_setCategoryBulk.default };
|
||||
const $admin_emoji_setLicenseBulk: Provider = { provide: 'ep:admin/emoji/set-license-bulk', useClass: ep___admin_emoji_setLicenseBulk.default };
|
||||
const $admin_emoji_update: Provider = { provide: 'ep:admin/emoji/update', useClass: ep___admin_emoji_update.default };
|
||||
const $admin_emoji_v2_list: Provider = { provide: 'ep:admin/emoji/v2/list', useClass: ep___admin_emoji_v2_list.default };
|
||||
const $admin_emoji_v2_list: Provider = { provide: 'ep:v2/admin/emoji/list', useClass: ep___v2_admin_emoji_list.default };
|
||||
const $admin_federation_deleteAllFiles: Provider = { provide: 'ep:admin/federation/delete-all-files', useClass: ep___admin_federation_deleteAllFiles.default };
|
||||
const $admin_federation_refreshRemoteInstanceMetadata: Provider = { provide: 'ep:admin/federation/refresh-remote-instance-metadata', useClass: ep___admin_federation_refreshRemoteInstanceMetadata.default };
|
||||
const $admin_federation_removeAllFollowing: Provider = { provide: 'ep:admin/federation/remove-all-following', useClass: ep___admin_federation_removeAllFollowing.default };
|
||||
|
|
|
@ -53,7 +53,7 @@ import * as ep___admin_emoji_setAliasesBulk from './endpoints/admin/emoji/set-al
|
|||
import * as ep___admin_emoji_setCategoryBulk from './endpoints/admin/emoji/set-category-bulk.js';
|
||||
import * as ep___admin_emoji_setLicenseBulk from './endpoints/admin/emoji/set-license-bulk.js';
|
||||
import * as ep___admin_emoji_update from './endpoints/admin/emoji/update.js';
|
||||
import * as ep___admin_emoji_v2_list from './endpoints/admin/emoji/v2/list.js';
|
||||
import * as ep___v2_admin_emoji_list from './endpoints/v2/admin/emoji/list.js';
|
||||
import * as ep___admin_federation_deleteAllFiles from './endpoints/admin/federation/delete-all-files.js';
|
||||
import * as ep___admin_federation_refreshRemoteInstanceMetadata
|
||||
from './endpoints/admin/federation/refresh-remote-instance-metadata.js';
|
||||
|
@ -436,7 +436,7 @@ const eps = [
|
|||
['admin/emoji/set-category-bulk', ep___admin_emoji_setCategoryBulk],
|
||||
['admin/emoji/set-license-bulk', ep___admin_emoji_setLicenseBulk],
|
||||
['admin/emoji/update', ep___admin_emoji_update],
|
||||
['admin/emoji/v2/list', ep___admin_emoji_v2_list],
|
||||
['v2/admin/emoji/list', ep___v2_admin_emoji_list],
|
||||
['admin/federation/delete-all-files', ep___admin_federation_deleteAllFiles],
|
||||
['admin/federation/refresh-remote-instance-metadata', ep___admin_federation_refreshRemoteInstanceMetadata],
|
||||
['admin/federation/remove-all-following', ep___admin_federation_removeAllFollowing],
|
||||
|
|
|
@ -557,7 +557,7 @@ function onGridCellValueChange(event: GridCellValueChangeEvent) {
|
|||
async function refreshCustomEmojis() {
|
||||
const limit = 100;
|
||||
|
||||
const query: Misskey.entities.AdminEmojiV2ListRequest['query'] = {
|
||||
const query: Misskey.entities.V2AdminEmojiListRequest['query'] = {
|
||||
name: emptyStrToUndefined(queryName.value),
|
||||
type: emptyStrToUndefined(queryType.value),
|
||||
aliases: emptyStrToUndefined(queryAliases.value),
|
||||
|
@ -576,7 +576,7 @@ async function refreshCustomEmojis() {
|
|||
}
|
||||
|
||||
const result = await os.promiseDialog(
|
||||
misskeyApi('admin/emoji/v2/list', {
|
||||
misskeyApi('v2/admin/emoji/list', {
|
||||
query: query,
|
||||
limit: limit,
|
||||
page: currentPage.value,
|
||||
|
|
|
@ -269,7 +269,7 @@ async function importEmojis(targets: GridItem[]) {
|
|||
}
|
||||
|
||||
async function refreshCustomEmojis() {
|
||||
const query: Misskey.entities.AdminEmojiV2ListRequest['query'] = {
|
||||
const query: Misskey.entities.V2AdminEmojiListRequest['query'] = {
|
||||
name: emptyStrToUndefined(queryName.value),
|
||||
host: emptyStrToUndefined(queryHost.value),
|
||||
uri: emptyStrToUndefined(queryUri.value),
|
||||
|
@ -282,7 +282,7 @@ async function refreshCustomEmojis() {
|
|||
}
|
||||
|
||||
const result = await os.promiseDialog(
|
||||
misskeyApi('admin/emoji/v2/list', {
|
||||
misskeyApi('v2/admin/emoji/list', {
|
||||
limit: 100,
|
||||
query: query,
|
||||
page: currentPage.value,
|
||||
|
|
|
@ -46,11 +46,11 @@ function createRender(params: {
|
|||
msw: {
|
||||
handlers: [
|
||||
...commonHandlers,
|
||||
http.post('/api/admin/emoji/v2/list', async ({ request }) => {
|
||||
http.post('/api/v2/admin/emoji/list', async ({ request }) => {
|
||||
await delay(100);
|
||||
|
||||
const bodyStream = request.body as ReadableStream;
|
||||
const body = await new Response(bodyStream).json() as entities.AdminEmojiV2ListRequest;
|
||||
const body = await new Response(bodyStream).json() as entities.V2AdminEmojiListRequest;
|
||||
|
||||
const emojis = storedEmojis;
|
||||
const limit = body.limit ?? 10;
|
||||
|
|
|
@ -199,12 +199,6 @@ type AdminEmojiSetLicenseBulkRequest = operations['admin___emoji___set-license-b
|
|||
// @public (undocumented)
|
||||
type AdminEmojiUpdateRequest = operations['admin___emoji___update']['requestBody']['content']['application/json'];
|
||||
|
||||
// @public (undocumented)
|
||||
type AdminEmojiV2ListRequest = operations['admin___emoji___v2___list']['requestBody']['content']['application/json'];
|
||||
|
||||
// @public (undocumented)
|
||||
type AdminEmojiV2ListResponse = operations['admin___emoji___v2___list']['responses']['200']['content']['application/json'];
|
||||
|
||||
// @public (undocumented)
|
||||
type AdminFederationDeleteAllFilesRequest = operations['admin___federation___delete-all-files']['requestBody']['content']['application/json'];
|
||||
|
||||
|
@ -1258,8 +1252,8 @@ declare namespace entities {
|
|||
AdminEmojiSetCategoryBulkRequest,
|
||||
AdminEmojiSetLicenseBulkRequest,
|
||||
AdminEmojiUpdateRequest,
|
||||
AdminEmojiV2ListRequest,
|
||||
AdminEmojiV2ListResponse,
|
||||
V2AdminEmojiListRequest,
|
||||
V2AdminEmojiListResponse,
|
||||
AdminFederationDeleteAllFilesRequest,
|
||||
AdminFederationRefreshRemoteInstanceMetadataRequest,
|
||||
AdminFederationRemoveAllFollowingRequest,
|
||||
|
@ -3236,6 +3230,12 @@ type UsersShowResponse = operations['users___show']['responses']['200']['content
|
|||
// @public (undocumented)
|
||||
type UsersUpdateMemoRequest = operations['users___update-memo']['requestBody']['content']['application/json'];
|
||||
|
||||
// @public (undocumented)
|
||||
type V2AdminEmojiListRequest = operations['v2___admin___emoji___list']['requestBody']['content']['application/json'];
|
||||
|
||||
// @public (undocumented)
|
||||
type V2AdminEmojiListResponse = operations['v2___admin___emoji___list']['responses']['200']['content']['application/json'];
|
||||
|
||||
// Warnings were encountered during analysis:
|
||||
//
|
||||
// src/entities.ts:35:2 - (ae-forgotten-export) The symbol "ModerationLogPayloads" needs to be exported by the entry point index.d.ts
|
||||
|
|
|
@ -476,7 +476,7 @@ declare module '../api.js' {
|
|||
*
|
||||
* **Credential required**: *Yes* / **Permission**: *read:admin:emoji*
|
||||
*/
|
||||
request<E extends 'admin/emoji/v2/list', P extends Endpoints[E]['req']>(
|
||||
request<E extends 'v2/admin/emoji/list', P extends Endpoints[E]['req']>(
|
||||
endpoint: E,
|
||||
params: P,
|
||||
credential?: string | null,
|
||||
|
|
|
@ -59,8 +59,8 @@ import type {
|
|||
AdminEmojiSetCategoryBulkRequest,
|
||||
AdminEmojiSetLicenseBulkRequest,
|
||||
AdminEmojiUpdateRequest,
|
||||
AdminEmojiV2ListRequest,
|
||||
AdminEmojiV2ListResponse,
|
||||
V2AdminEmojiListRequest,
|
||||
V2AdminEmojiListResponse,
|
||||
AdminFederationDeleteAllFilesRequest,
|
||||
AdminFederationRefreshRemoteInstanceMetadataRequest,
|
||||
AdminFederationRemoveAllFollowingRequest,
|
||||
|
@ -618,7 +618,7 @@ export type Endpoints = {
|
|||
'admin/emoji/set-category-bulk': { req: AdminEmojiSetCategoryBulkRequest; res: EmptyResponse };
|
||||
'admin/emoji/set-license-bulk': { req: AdminEmojiSetLicenseBulkRequest; res: EmptyResponse };
|
||||
'admin/emoji/update': { req: AdminEmojiUpdateRequest; res: EmptyResponse };
|
||||
'admin/emoji/v2/list': { req: AdminEmojiV2ListRequest; res: AdminEmojiV2ListResponse };
|
||||
'v2/admin/emoji/list': { req: V2AdminEmojiListRequest; res: V2AdminEmojiListResponse };
|
||||
'admin/federation/delete-all-files': { req: AdminFederationDeleteAllFilesRequest; res: EmptyResponse };
|
||||
'admin/federation/refresh-remote-instance-metadata': { req: AdminFederationRefreshRemoteInstanceMetadataRequest; res: EmptyResponse };
|
||||
'admin/federation/remove-all-following': { req: AdminFederationRemoveAllFollowingRequest; res: EmptyResponse };
|
||||
|
@ -1001,7 +1001,7 @@ export const endpointReqTypes: Record<keyof Endpoints, 'application/json' | 'mul
|
|||
'admin/emoji/set-category-bulk': 'application/json',
|
||||
'admin/emoji/set-license-bulk': 'application/json',
|
||||
'admin/emoji/update': 'application/json',
|
||||
'admin/emoji/v2/list': 'application/json',
|
||||
'v2/admin/emoji/list': 'application/json',
|
||||
'admin/federation/delete-all-files': 'application/json',
|
||||
'admin/federation/refresh-remote-instance-metadata': 'application/json',
|
||||
'admin/federation/remove-all-following': 'application/json',
|
||||
|
|
|
@ -62,8 +62,8 @@ export type AdminEmojiSetAliasesBulkRequest = operations['admin___emoji___set-al
|
|||
export type AdminEmojiSetCategoryBulkRequest = operations['admin___emoji___set-category-bulk']['requestBody']['content']['application/json'];
|
||||
export type AdminEmojiSetLicenseBulkRequest = operations['admin___emoji___set-license-bulk']['requestBody']['content']['application/json'];
|
||||
export type AdminEmojiUpdateRequest = operations['admin___emoji___update']['requestBody']['content']['application/json'];
|
||||
export type AdminEmojiV2ListRequest = operations['admin___emoji___v2___list']['requestBody']['content']['application/json'];
|
||||
export type AdminEmojiV2ListResponse = operations['admin___emoji___v2___list']['responses']['200']['content']['application/json'];
|
||||
export type V2AdminEmojiListRequest = operations['v2___admin___emoji___list']['requestBody']['content']['application/json'];
|
||||
export type V2AdminEmojiListResponse = operations['v2___admin___emoji___list']['responses']['200']['content']['application/json'];
|
||||
export type AdminFederationDeleteAllFilesRequest = operations['admin___federation___delete-all-files']['requestBody']['content']['application/json'];
|
||||
export type AdminFederationRefreshRemoteInstanceMetadataRequest = operations['admin___federation___refresh-remote-instance-metadata']['requestBody']['content']['application/json'];
|
||||
export type AdminFederationRemoveAllFollowingRequest = operations['admin___federation___remove-all-following']['requestBody']['content']['application/json'];
|
||||
|
|
|
@ -396,14 +396,14 @@ export type paths = {
|
|||
*/
|
||||
post: operations['admin___emoji___update'];
|
||||
};
|
||||
'/admin/emoji/v2/list': {
|
||||
'/v2/admin/emoji/list': {
|
||||
/**
|
||||
* admin/emoji/v2/list
|
||||
* v2/admin/emoji/list
|
||||
* @description No description provided.
|
||||
*
|
||||
* **Credential required**: *Yes* / **Permission**: *read:admin:emoji*
|
||||
*/
|
||||
post: operations['admin___emoji___v2___list'];
|
||||
post: operations['v2___admin___emoji___list'];
|
||||
};
|
||||
'/admin/federation/delete-all-files': {
|
||||
/**
|
||||
|
@ -7659,12 +7659,12 @@ export type operations = {
|
|||
};
|
||||
};
|
||||
/**
|
||||
* admin/emoji/v2/list
|
||||
* v2/admin/emoji/list
|
||||
* @description No description provided.
|
||||
*
|
||||
* **Credential required**: *Yes* / **Permission**: *read:admin:emoji*
|
||||
*/
|
||||
admin___emoji___v2___list: {
|
||||
v2___admin___emoji___list: {
|
||||
requestBody: {
|
||||
content: {
|
||||
'application/json': {
|
||||
|
|
Loading…
Reference in New Issue