wip
This commit is contained in:
parent
e47a2a52aa
commit
457a0a19ec
|
@ -6,7 +6,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
<template>
|
<template>
|
||||||
<div :class="$style.root">
|
<div :class="$style.root">
|
||||||
<button v-for="item in items" class="_button item" :class="{ disabled: item.hidden }" @click="onClick(item)">
|
<button v-for="item in items" class="_button item" :class="{ disabled: item.hidden }" @click="onClick(item)">
|
||||||
<span class="box" :style="{ background: chart.config.type === 'line' ? item.strokeStyle?.toString() : item.fillStyle?.toString() }"></span>
|
<span class="root" :style="{ background: chart.config.type === 'line' ? item.strokeStyle?.toString() : item.fillStyle?.toString() }"></span>
|
||||||
{{ item.text }}
|
{{ item.text }}
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
@ -67,7 +67,7 @@ defineExpose({
|
||||||
opacity: 0.5;
|
opacity: 0.5;
|
||||||
}
|
}
|
||||||
|
|
||||||
> .box {
|
> .root {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
width: 12px;
|
width: 12px;
|
||||||
height: 12px;
|
height: 12px;
|
||||||
|
|
|
@ -20,6 +20,7 @@
|
||||||
worker-src 'self';
|
worker-src 'self';
|
||||||
script-src 'self' 'unsafe-eval' https://*.hcaptcha.com https://challenges.cloudflare.com;
|
script-src 'self' 'unsafe-eval' https://*.hcaptcha.com https://challenges.cloudflare.com;
|
||||||
style-src 'self' 'unsafe-inline';
|
style-src 'self' 'unsafe-inline';
|
||||||
|
font-src 'self' data:;
|
||||||
img-src 'self' data: blob: www.google.com xn--931a.moe localhost:3000 localhost:5173 127.0.0.1:5173 127.0.0.1:3000;
|
img-src 'self' data: blob: www.google.com xn--931a.moe localhost:3000 localhost:5173 127.0.0.1:5173 127.0.0.1:3000;
|
||||||
media-src 'self' localhost:3000 localhost:5173 127.0.0.1:5173 127.0.0.1:3000;
|
media-src 'self' localhost:3000 localhost:5173 127.0.0.1:5173 127.0.0.1:3000;
|
||||||
connect-src 'self' localhost:3000 localhost:5173 127.0.0.1:5173 127.0.0.1:3000 https://newassets.hcaptcha.com;
|
connect-src 'self' localhost:3000 localhost:5173 127.0.0.1:5173 127.0.0.1:3000 https://newassets.hcaptcha.com;
|
||||||
|
|
|
@ -1,6 +1,11 @@
|
||||||
|
<!--
|
||||||
|
SPDX-FileCopyrightText: syuilo and other misskey contributors
|
||||||
|
SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
-->
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div :class="$style.root">
|
<div class="root">
|
||||||
<img :src="emojiUrl" :alt="emojiName"/>
|
<img class="thumbnail" :src="emojiUrl" :alt="emojiName"/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -17,13 +22,19 @@ const props = defineProps<{
|
||||||
const emojiUrl = computed(() => props.params.data?.url);
|
const emojiUrl = computed(() => props.params.data?.url);
|
||||||
const emojiName = computed(() => props.params.data?.name);
|
const emojiName = computed(() => props.params.data?.name);
|
||||||
|
|
||||||
console.log({ url: emojiUrl.value, name: emojiName.value });
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" module>
|
<style lang="scss">
|
||||||
.root {
|
.root {
|
||||||
display: inline-flex;
|
display: flex;
|
||||||
align-items: stretch;
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.thumbnail {
|
||||||
|
object-fit: cover;
|
||||||
|
width: 26px;
|
||||||
|
height: auto;
|
||||||
|
max-width: 100%;
|
||||||
|
max-height: 100%;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
|
@ -1,11 +1,64 @@
|
||||||
export type GridItem = {
|
import * as Misskey from 'misskey-js';
|
||||||
id?: string;
|
|
||||||
aliases: string;
|
export class GridItem {
|
||||||
name: string;
|
readonly id?: string;
|
||||||
category: string;
|
readonly url?: string;
|
||||||
license: string;
|
readonly blob?: Blob;
|
||||||
isSensitive: boolean;
|
|
||||||
localOnly: boolean;
|
public aliases: string;
|
||||||
roleIdsThatCanBeUsedThisEmojiAsReaction: string;
|
public name: string;
|
||||||
url: string;
|
public category: string;
|
||||||
};
|
public license: string;
|
||||||
|
public isSensitive: boolean;
|
||||||
|
public localOnly: boolean;
|
||||||
|
public roleIdsThatCanBeUsedThisEmojiAsReaction: string;
|
||||||
|
|
||||||
|
private readonly origin: string;
|
||||||
|
|
||||||
|
private constructor(
|
||||||
|
id: string | undefined,
|
||||||
|
url: string | undefined = undefined,
|
||||||
|
blob: Blob | undefined = undefined,
|
||||||
|
aliases: string,
|
||||||
|
name: string,
|
||||||
|
category: string,
|
||||||
|
license: string,
|
||||||
|
isSensitive: boolean,
|
||||||
|
localOnly: boolean,
|
||||||
|
roleIdsThatCanBeUsedThisEmojiAsReaction: string,
|
||||||
|
) {
|
||||||
|
this.id = id;
|
||||||
|
this.url = url;
|
||||||
|
this.blob = blob;
|
||||||
|
|
||||||
|
this.aliases = aliases;
|
||||||
|
this.name = name;
|
||||||
|
this.category = category;
|
||||||
|
this.license = license;
|
||||||
|
this.isSensitive = isSensitive;
|
||||||
|
this.localOnly = localOnly;
|
||||||
|
this.roleIdsThatCanBeUsedThisEmojiAsReaction = roleIdsThatCanBeUsedThisEmojiAsReaction;
|
||||||
|
|
||||||
|
this.origin = JSON.stringify(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
static ofEmojiDetailed(it: Misskey.entities.EmojiDetailed): GridItem {
|
||||||
|
return new GridItem(
|
||||||
|
it.id,
|
||||||
|
it.url,
|
||||||
|
undefined,
|
||||||
|
it.aliases.join(', '),
|
||||||
|
it.name,
|
||||||
|
it.category ?? '',
|
||||||
|
it.license ?? '',
|
||||||
|
it.isSensitive,
|
||||||
|
it.localOnly,
|
||||||
|
it.roleIdsThatCanBeUsedThisEmojiAsReaction.join(', '),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
public get edited(): boolean {
|
||||||
|
const { origin, ..._this } = this;
|
||||||
|
return JSON.stringify(_this) !== origin;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -4,50 +4,63 @@
|
||||||
<template #header>
|
<template #header>
|
||||||
<MkPageHeader/>
|
<MkPageHeader/>
|
||||||
</template>
|
</template>
|
||||||
<MkSpacer :contentMax="900">
|
<div class="_gaps" :class="$style.root">
|
||||||
<div class="_gaps">
|
<AgGridVue
|
||||||
<AgGridVue
|
:rowData="gridItems"
|
||||||
:rowData="gridItems"
|
:columnDefs="colDefs"
|
||||||
:columnDefs="colDefs"
|
:rowSelection="'multiple'"
|
||||||
style="height: 500px"
|
:rowClassRules="rowClassRules"
|
||||||
class="ag-theme-quartz"
|
style="height: 500px"
|
||||||
>
|
class="ag-theme-quartz-auto-dark"
|
||||||
</AgGridVue>
|
@gridReady="onGridReady"
|
||||||
</div>
|
>
|
||||||
</MkSpacer>
|
</AgGridVue>
|
||||||
|
</div>
|
||||||
</MkStickyContainer>
|
</MkStickyContainer>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { markRaw, onMounted, ref, watch } from 'vue';
|
import { markRaw, onMounted, ref, watch } from 'vue';
|
||||||
import 'ag-grid-community/styles/ag-grid.css'; // Core CSS
|
import 'ag-grid-community/styles/ag-grid.css';
|
||||||
|
import 'ag-grid-community/styles/ag-theme-quartz.css';
|
||||||
import * as Misskey from 'misskey-js';
|
import * as Misskey from 'misskey-js';
|
||||||
import { AgGridVue } from 'ag-grid-vue3';
|
import { AgGridVue } from 'ag-grid-vue3';
|
||||||
import { ColDef } from 'ag-grid-community';
|
import { ColDef, GridApi, GridReadyEvent, RowClassRules } from 'ag-grid-community';
|
||||||
import { misskeyApi } from '@/scripts/misskey-api.js';
|
import { misskeyApi } from '@/scripts/misskey-api.js';
|
||||||
import { GridItem } from '@/pages/admin/custom-emojis-grid.impl.js';
|
import { GridItem } from '@/pages/admin/custom-emojis-grid.impl.js';
|
||||||
import CustomEmojiGridItem from '@/pages/admin/custom-emojis-grid-item.vue';
|
import CustomEmojisGridEmoji from '@/pages/admin/custom-emojis-grid-emoji.vue';
|
||||||
|
|
||||||
// eslint-disable-next-line import/no-default-export
|
// eslint-disable-next-line import/no-default-export
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
AgGridVue,
|
AgGridVue,
|
||||||
// eslint-disable-next-line vue/no-unused-components
|
// eslint-disable-next-line vue/no-unused-components
|
||||||
CustomEmojiGridItem,
|
customEmojisGridEmoji: CustomEmojisGridEmoji,
|
||||||
},
|
},
|
||||||
setup() {
|
setup() {
|
||||||
const colDefs = markRaw<ColDef[]>([
|
const colDefs = markRaw<ColDef[]>([
|
||||||
{ field: 'img', cellRenderer: CustomEmojiGridItem },
|
{
|
||||||
{ field: 'name' },
|
field: 'img',
|
||||||
{ field: 'category' },
|
headerName: '',
|
||||||
{ field: 'aliases' },
|
initialWidth: 90,
|
||||||
{ field: 'license' },
|
cellRenderer: 'customEmojisGridEmoji',
|
||||||
{ field: 'isSensitive' },
|
checkboxSelection: true,
|
||||||
{ field: 'localOnly' },
|
},
|
||||||
{ field: 'roleIdsThatCanBeUsedThisEmojiAsReaction' },
|
{ field: 'name', headerName: 'name', initialWidth: 140, editable: true },
|
||||||
|
{ field: 'category', headerName: 'category', initialWidth: 140, editable: true },
|
||||||
|
{ field: 'aliases', headerName: 'aliases', initialWidth: 140, editable: true },
|
||||||
|
{ field: 'license', headerName: 'license', initialWidth: 140, editable: true },
|
||||||
|
{ field: 'isSensitive', headerName: 'sensitive', initialWidth: 90, editable: true },
|
||||||
|
{ field: 'localOnly', headerName: 'localOnly', initialWidth: 90, editable: true },
|
||||||
|
{ field: 'roleIdsThatCanBeUsedThisEmojiAsReaction', headerName: 'role', initialWidth: 140, editable: true },
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
const rowClassRules = markRaw<RowClassRules<GridItem>>({
|
||||||
|
'emoji-grid-row-edited': params => params.data?.edited ?? false,
|
||||||
|
});
|
||||||
|
|
||||||
|
const gridApi = ref<GridApi>();
|
||||||
const customEmojis = ref<Misskey.entities.EmojiDetailed[]>([]);
|
const customEmojis = ref<Misskey.entities.EmojiDetailed[]>([]);
|
||||||
const gridItems = ref<GridItem[]>([]);
|
const gridItems = ref<GridItem[]>([]);
|
||||||
|
|
||||||
|
@ -56,17 +69,8 @@ export default {
|
||||||
};
|
};
|
||||||
|
|
||||||
const refreshGridItems = () => {
|
const refreshGridItems = () => {
|
||||||
gridItems.value = customEmojis.value.map(it => ({
|
console.log(customEmojis.value);
|
||||||
id: it.id,
|
gridItems.value = customEmojis.value.map(it => GridItem.ofEmojiDetailed(it));
|
||||||
aliases: it.aliases.join(', '),
|
|
||||||
name: it.name,
|
|
||||||
category: it.category ?? '',
|
|
||||||
license: it.license ?? '',
|
|
||||||
isSensitive: it.isSensitive,
|
|
||||||
localOnly: it.localOnly,
|
|
||||||
roleIdsThatCanBeUsedThisEmojiAsReaction: it.roleIdsThatCanBeUsedThisEmojiAsReaction.join(', '),
|
|
||||||
url: it.url,
|
|
||||||
}));
|
|
||||||
};
|
};
|
||||||
|
|
||||||
watch(customEmojis, refreshGridItems);
|
watch(customEmojis, refreshGridItems);
|
||||||
|
@ -76,15 +80,29 @@ export default {
|
||||||
refreshGridItems();
|
refreshGridItems();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
function onGridReady(params: GridReadyEvent) {
|
||||||
|
gridApi.value = params.api;
|
||||||
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
colDefs,
|
colDefs,
|
||||||
|
rowClassRules,
|
||||||
customEmojis,
|
customEmojis,
|
||||||
gridItems,
|
gridItems,
|
||||||
|
onGridReady,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style lang="scss">
|
||||||
|
.emoji-grid-row-edited {
|
||||||
|
background-color: var(--ag-advanced-filter-column-pill-color);
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<style module lang="scss">
|
||||||
|
.root {
|
||||||
|
padding: 16px
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import { Endpoints as Gen } from './autogen/endpoint.js';
|
import { Endpoints as Gen } from './autogen/endpoint.js';
|
||||||
import { UserDetailed } from './autogen/models.js';
|
import { EmojiDetailed, EmojiSimple, UserDetailed } from './autogen/models.js';
|
||||||
import { UsersShowRequest } from './autogen/entities.js';
|
import { EmojisRequest, UsersShowRequest } from './autogen/entities.js';
|
||||||
import {
|
import {
|
||||||
SigninRequest,
|
SigninRequest,
|
||||||
SigninResponse,
|
SigninResponse,
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* version: 2023.12.2
|
* version: 2023.12.2
|
||||||
* generatedAt: 2024-01-20T04:59:59.766Z
|
* generatedAt: 2024-01-20T09:06:01.853Z
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import type {
|
import type {
|
||||||
|
@ -366,6 +366,7 @@ import type {
|
||||||
InviteLimitResponse,
|
InviteLimitResponse,
|
||||||
MetaRequest,
|
MetaRequest,
|
||||||
MetaResponse,
|
MetaResponse,
|
||||||
|
EmojisRequest,
|
||||||
EmojisResponse,
|
EmojisResponse,
|
||||||
EmojiRequest,
|
EmojiRequest,
|
||||||
EmojiResponse,
|
EmojiResponse,
|
||||||
|
@ -544,16 +545,6 @@ import type {
|
||||||
BubbleGameRegisterResponse,
|
BubbleGameRegisterResponse,
|
||||||
BubbleGameRankingRequest,
|
BubbleGameRankingRequest,
|
||||||
BubbleGameRankingResponse,
|
BubbleGameRankingResponse,
|
||||||
ReversiCancelMatchRequest,
|
|
||||||
ReversiCancelMatchResponse,
|
|
||||||
ReversiGamesRequest,
|
|
||||||
ReversiGamesResponse,
|
|
||||||
ReversiMatchRequest,
|
|
||||||
ReversiMatchResponse,
|
|
||||||
ReversiInvitationsResponse,
|
|
||||||
ReversiShowGameRequest,
|
|
||||||
ReversiShowGameResponse,
|
|
||||||
ReversiSurrenderRequest,
|
|
||||||
} from './entities.js';
|
} from './entities.js';
|
||||||
|
|
||||||
export type Endpoints = {
|
export type Endpoints = {
|
||||||
|
@ -803,7 +794,7 @@ export type Endpoints = {
|
||||||
'invite/list': { req: InviteListRequest; res: InviteListResponse };
|
'invite/list': { req: InviteListRequest; res: InviteListResponse };
|
||||||
'invite/limit': { req: EmptyRequest; res: InviteLimitResponse };
|
'invite/limit': { req: EmptyRequest; res: InviteLimitResponse };
|
||||||
'meta': { req: MetaRequest; res: MetaResponse };
|
'meta': { req: MetaRequest; res: MetaResponse };
|
||||||
'emojis': { req: EmptyRequest; res: EmojisResponse };
|
'emojis': { req: EmojisRequest; res: EmojisResponse };
|
||||||
'emoji': { req: EmojiRequest; res: EmojiResponse };
|
'emoji': { req: EmojiRequest; res: EmojiResponse };
|
||||||
'miauth/gen-token': { req: MiauthGenTokenRequest; res: MiauthGenTokenResponse };
|
'miauth/gen-token': { req: MiauthGenTokenRequest; res: MiauthGenTokenResponse };
|
||||||
'mute/create': { req: MuteCreateRequest; res: EmptyResponse };
|
'mute/create': { req: MuteCreateRequest; res: EmptyResponse };
|
||||||
|
@ -917,10 +908,4 @@ export type Endpoints = {
|
||||||
'retention': { req: EmptyRequest; res: RetentionResponse };
|
'retention': { req: EmptyRequest; res: RetentionResponse };
|
||||||
'bubble-game/register': { req: BubbleGameRegisterRequest; res: BubbleGameRegisterResponse };
|
'bubble-game/register': { req: BubbleGameRegisterRequest; res: BubbleGameRegisterResponse };
|
||||||
'bubble-game/ranking': { req: BubbleGameRankingRequest; res: BubbleGameRankingResponse };
|
'bubble-game/ranking': { req: BubbleGameRankingRequest; res: BubbleGameRankingResponse };
|
||||||
'reversi/cancel-match': { req: ReversiCancelMatchRequest; res: ReversiCancelMatchResponse };
|
|
||||||
'reversi/games': { req: ReversiGamesRequest; res: ReversiGamesResponse };
|
|
||||||
'reversi/match': { req: ReversiMatchRequest; res: ReversiMatchResponse };
|
|
||||||
'reversi/invitations': { req: EmptyRequest; res: ReversiInvitationsResponse };
|
|
||||||
'reversi/show-game': { req: ReversiShowGameRequest; res: ReversiShowGameResponse };
|
|
||||||
'reversi/surrender': { req: ReversiSurrenderRequest; res: EmptyResponse };
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* version: 2023.12.2
|
* version: 2023.12.2
|
||||||
* generatedAt: 2024-01-20T04:59:59.765Z
|
* generatedAt: 2024-01-20T09:06:01.852Z
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { operations } from './types.js';
|
import { operations } from './types.js';
|
||||||
|
@ -368,6 +368,7 @@ export type InviteListResponse = operations['invite/list']['responses']['200']['
|
||||||
export type InviteLimitResponse = operations['invite/limit']['responses']['200']['content']['application/json'];
|
export type InviteLimitResponse = operations['invite/limit']['responses']['200']['content']['application/json'];
|
||||||
export type MetaRequest = operations['meta']['requestBody']['content']['application/json'];
|
export type MetaRequest = operations['meta']['requestBody']['content']['application/json'];
|
||||||
export type MetaResponse = operations['meta']['responses']['200']['content']['application/json'];
|
export type MetaResponse = operations['meta']['responses']['200']['content']['application/json'];
|
||||||
|
export type EmojisRequest = operations['emojis']['requestBody']['content']['application/json'];
|
||||||
export type EmojisResponse = operations['emojis']['responses']['200']['content']['application/json'];
|
export type EmojisResponse = operations['emojis']['responses']['200']['content']['application/json'];
|
||||||
export type EmojiRequest = operations['emoji']['requestBody']['content']['application/json'];
|
export type EmojiRequest = operations['emoji']['requestBody']['content']['application/json'];
|
||||||
export type EmojiResponse = operations['emoji']['responses']['200']['content']['application/json'];
|
export type EmojiResponse = operations['emoji']['responses']['200']['content']['application/json'];
|
||||||
|
@ -546,13 +547,3 @@ export type BubbleGameRegisterRequest = operations['bubble-game/register']['requ
|
||||||
export type BubbleGameRegisterResponse = operations['bubble-game/register']['responses']['200']['content']['application/json'];
|
export type BubbleGameRegisterResponse = operations['bubble-game/register']['responses']['200']['content']['application/json'];
|
||||||
export type BubbleGameRankingRequest = operations['bubble-game/ranking']['requestBody']['content']['application/json'];
|
export type BubbleGameRankingRequest = operations['bubble-game/ranking']['requestBody']['content']['application/json'];
|
||||||
export type BubbleGameRankingResponse = operations['bubble-game/ranking']['responses']['200']['content']['application/json'];
|
export type BubbleGameRankingResponse = operations['bubble-game/ranking']['responses']['200']['content']['application/json'];
|
||||||
export type ReversiCancelMatchRequest = operations['reversi/cancel-match']['requestBody']['content']['application/json'];
|
|
||||||
export type ReversiCancelMatchResponse = operations['reversi/cancel-match']['responses']['200']['content']['application/json'];
|
|
||||||
export type ReversiGamesRequest = operations['reversi/games']['requestBody']['content']['application/json'];
|
|
||||||
export type ReversiGamesResponse = operations['reversi/games']['responses']['200']['content']['application/json'];
|
|
||||||
export type ReversiMatchRequest = operations['reversi/match']['requestBody']['content']['application/json'];
|
|
||||||
export type ReversiMatchResponse = operations['reversi/match']['responses']['200']['content']['application/json'];
|
|
||||||
export type ReversiInvitationsResponse = operations['reversi/invitations']['responses']['200']['content']['application/json'];
|
|
||||||
export type ReversiShowGameRequest = operations['reversi/show-game']['requestBody']['content']['application/json'];
|
|
||||||
export type ReversiShowGameResponse = operations['reversi/show-game']['responses']['200']['content']['application/json'];
|
|
||||||
export type ReversiSurrenderRequest = operations['reversi/surrender']['requestBody']['content']['application/json'];
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* version: 2023.12.2
|
* version: 2023.12.2
|
||||||
* generatedAt: 2024-01-20T04:59:59.764Z
|
* generatedAt: 2024-01-20T09:06:01.851Z
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { components } from './types.js';
|
import { components } from './types.js';
|
||||||
|
@ -41,5 +41,3 @@ export type Flash = components['schemas']['Flash'];
|
||||||
export type Signin = components['schemas']['Signin'];
|
export type Signin = components['schemas']['Signin'];
|
||||||
export type RoleLite = components['schemas']['RoleLite'];
|
export type RoleLite = components['schemas']['RoleLite'];
|
||||||
export type Role = components['schemas']['Role'];
|
export type Role = components['schemas']['Role'];
|
||||||
export type ReversiGameLite = components['schemas']['ReversiGameLite'];
|
|
||||||
export type ReversiGameDetailed = components['schemas']['ReversiGameDetailed'];
|
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* version: 2023.12.2
|
* version: 2023.12.2
|
||||||
* generatedAt: 2024-01-20T04:59:59.681Z
|
* generatedAt: 2024-01-20T09:06:01.771Z
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -3472,60 +3472,6 @@ export type paths = {
|
||||||
*/
|
*/
|
||||||
post: operations['bubble-game/ranking'];
|
post: operations['bubble-game/ranking'];
|
||||||
};
|
};
|
||||||
'/reversi/cancel-match': {
|
|
||||||
/**
|
|
||||||
* reversi/cancel-match
|
|
||||||
* @description No description provided.
|
|
||||||
*
|
|
||||||
* **Credential required**: *Yes* / **Permission**: *write:account*
|
|
||||||
*/
|
|
||||||
post: operations['reversi/cancel-match'];
|
|
||||||
};
|
|
||||||
'/reversi/games': {
|
|
||||||
/**
|
|
||||||
* reversi/games
|
|
||||||
* @description No description provided.
|
|
||||||
*
|
|
||||||
* **Credential required**: *No*
|
|
||||||
*/
|
|
||||||
post: operations['reversi/games'];
|
|
||||||
};
|
|
||||||
'/reversi/match': {
|
|
||||||
/**
|
|
||||||
* reversi/match
|
|
||||||
* @description No description provided.
|
|
||||||
*
|
|
||||||
* **Credential required**: *Yes* / **Permission**: *write:account*
|
|
||||||
*/
|
|
||||||
post: operations['reversi/match'];
|
|
||||||
};
|
|
||||||
'/reversi/invitations': {
|
|
||||||
/**
|
|
||||||
* reversi/invitations
|
|
||||||
* @description No description provided.
|
|
||||||
*
|
|
||||||
* **Credential required**: *Yes* / **Permission**: *read:account*
|
|
||||||
*/
|
|
||||||
post: operations['reversi/invitations'];
|
|
||||||
};
|
|
||||||
'/reversi/show-game': {
|
|
||||||
/**
|
|
||||||
* reversi/show-game
|
|
||||||
* @description No description provided.
|
|
||||||
*
|
|
||||||
* **Credential required**: *No*
|
|
||||||
*/
|
|
||||||
post: operations['reversi/show-game'];
|
|
||||||
};
|
|
||||||
'/reversi/surrender': {
|
|
||||||
/**
|
|
||||||
* reversi/surrender
|
|
||||||
* @description No description provided.
|
|
||||||
*
|
|
||||||
* **Credential required**: *Yes* / **Permission**: *write:account*
|
|
||||||
*/
|
|
||||||
post: operations['reversi/surrender'];
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
export type webhooks = Record<string, never>;
|
export type webhooks = Record<string, never>;
|
||||||
|
@ -4458,68 +4404,6 @@ export type components = {
|
||||||
};
|
};
|
||||||
usersCount: number;
|
usersCount: number;
|
||||||
});
|
});
|
||||||
ReversiGameLite: {
|
|
||||||
/** Format: id */
|
|
||||||
id: string;
|
|
||||||
/** Format: date-time */
|
|
||||||
createdAt: string;
|
|
||||||
/** Format: date-time */
|
|
||||||
startedAt: string | null;
|
|
||||||
isStarted: boolean;
|
|
||||||
isEnded: boolean;
|
|
||||||
form1: Record<string, never> | null;
|
|
||||||
form2: Record<string, never> | null;
|
|
||||||
user1Ready: boolean;
|
|
||||||
user2Ready: boolean;
|
|
||||||
/** Format: id */
|
|
||||||
user1Id: string;
|
|
||||||
/** Format: id */
|
|
||||||
user2Id: string;
|
|
||||||
user1: components['schemas']['User'];
|
|
||||||
user2: components['schemas']['User'];
|
|
||||||
/** Format: id */
|
|
||||||
winnerId: string | null;
|
|
||||||
winner: components['schemas']['User'] | null;
|
|
||||||
/** Format: id */
|
|
||||||
surrendered: string | null;
|
|
||||||
black: number | null;
|
|
||||||
bw: string;
|
|
||||||
isLlotheo: boolean;
|
|
||||||
canPutEverywhere: boolean;
|
|
||||||
loopedBoard: boolean;
|
|
||||||
};
|
|
||||||
ReversiGameDetailed: {
|
|
||||||
/** Format: id */
|
|
||||||
id: string;
|
|
||||||
/** Format: date-time */
|
|
||||||
createdAt: string;
|
|
||||||
/** Format: date-time */
|
|
||||||
startedAt: string | null;
|
|
||||||
isStarted: boolean;
|
|
||||||
isEnded: boolean;
|
|
||||||
form1: Record<string, never> | null;
|
|
||||||
form2: Record<string, never> | null;
|
|
||||||
user1Ready: boolean;
|
|
||||||
user2Ready: boolean;
|
|
||||||
/** Format: id */
|
|
||||||
user1Id: string;
|
|
||||||
/** Format: id */
|
|
||||||
user2Id: string;
|
|
||||||
user1: components['schemas']['User'];
|
|
||||||
user2: components['schemas']['User'];
|
|
||||||
/** Format: id */
|
|
||||||
winnerId: string | null;
|
|
||||||
winner: components['schemas']['User'] | null;
|
|
||||||
/** Format: id */
|
|
||||||
surrendered: string | null;
|
|
||||||
black: number | null;
|
|
||||||
bw: string;
|
|
||||||
isLlotheo: boolean;
|
|
||||||
canPutEverywhere: boolean;
|
|
||||||
loopedBoard: boolean;
|
|
||||||
logs: unknown[][];
|
|
||||||
map: string[];
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
responses: never;
|
responses: never;
|
||||||
parameters: never;
|
parameters: never;
|
||||||
|
@ -19012,12 +18896,19 @@ export type operations = {
|
||||||
* **Credential required**: *No*
|
* **Credential required**: *No*
|
||||||
*/
|
*/
|
||||||
emojis: {
|
emojis: {
|
||||||
|
requestBody: {
|
||||||
|
content: {
|
||||||
|
'application/json': {
|
||||||
|
detail?: boolean | null;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
responses: {
|
responses: {
|
||||||
/** @description OK (with results) */
|
/** @description OK (with results) */
|
||||||
200: {
|
200: {
|
||||||
content: {
|
content: {
|
||||||
'application/json': {
|
'application/json': {
|
||||||
emojis: components['schemas']['EmojiSimple'][];
|
emojis: (components['schemas']['EmojiSimple'] | components['schemas']['EmojiDetailed'])[];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -25658,325 +25549,5 @@ export type operations = {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
/**
|
|
||||||
* reversi/cancel-match
|
|
||||||
* @description No description provided.
|
|
||||||
*
|
|
||||||
* **Credential required**: *Yes* / **Permission**: *write:account*
|
|
||||||
*/
|
|
||||||
'reversi/cancel-match': {
|
|
||||||
requestBody: {
|
|
||||||
content: {
|
|
||||||
'application/json': {
|
|
||||||
/** Format: misskey:id */
|
|
||||||
userId?: string | null;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
responses: {
|
|
||||||
/** @description OK (with results) */
|
|
||||||
200: {
|
|
||||||
content: {
|
|
||||||
'application/json': unknown;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
/** @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'];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
/**
|
|
||||||
* reversi/games
|
|
||||||
* @description No description provided.
|
|
||||||
*
|
|
||||||
* **Credential required**: *No*
|
|
||||||
*/
|
|
||||||
'reversi/games': {
|
|
||||||
requestBody: {
|
|
||||||
content: {
|
|
||||||
'application/json': {
|
|
||||||
/** @default 10 */
|
|
||||||
limit?: number;
|
|
||||||
/** Format: misskey:id */
|
|
||||||
sinceId?: string;
|
|
||||||
/** Format: misskey:id */
|
|
||||||
untilId?: string;
|
|
||||||
/** @default false */
|
|
||||||
my?: boolean;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
responses: {
|
|
||||||
/** @description OK (with results) */
|
|
||||||
200: {
|
|
||||||
content: {
|
|
||||||
'application/json': components['schemas']['ReversiGameLite'][];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
/** @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'];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
/**
|
|
||||||
* reversi/match
|
|
||||||
* @description No description provided.
|
|
||||||
*
|
|
||||||
* **Credential required**: *Yes* / **Permission**: *write:account*
|
|
||||||
*/
|
|
||||||
'reversi/match': {
|
|
||||||
requestBody: {
|
|
||||||
content: {
|
|
||||||
'application/json': {
|
|
||||||
/** Format: misskey:id */
|
|
||||||
userId?: string | null;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
responses: {
|
|
||||||
/** @description OK (with results) */
|
|
||||||
200: {
|
|
||||||
content: {
|
|
||||||
'application/json': unknown;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
/** @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'];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
/**
|
|
||||||
* reversi/invitations
|
|
||||||
* @description No description provided.
|
|
||||||
*
|
|
||||||
* **Credential required**: *Yes* / **Permission**: *read:account*
|
|
||||||
*/
|
|
||||||
'reversi/invitations': {
|
|
||||||
responses: {
|
|
||||||
/** @description OK (with results) */
|
|
||||||
200: {
|
|
||||||
content: {
|
|
||||||
'application/json': components['schemas']['UserLite'][];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
/** @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'];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
/**
|
|
||||||
* reversi/show-game
|
|
||||||
* @description No description provided.
|
|
||||||
*
|
|
||||||
* **Credential required**: *No*
|
|
||||||
*/
|
|
||||||
'reversi/show-game': {
|
|
||||||
requestBody: {
|
|
||||||
content: {
|
|
||||||
'application/json': {
|
|
||||||
/** Format: misskey:id */
|
|
||||||
gameId: string;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
responses: {
|
|
||||||
/** @description OK (with results) */
|
|
||||||
200: {
|
|
||||||
content: {
|
|
||||||
'application/json': components['schemas']['ReversiGameDetailed'];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
/** @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'];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
/**
|
|
||||||
* reversi/surrender
|
|
||||||
* @description No description provided.
|
|
||||||
*
|
|
||||||
* **Credential required**: *Yes* / **Permission**: *write:account*
|
|
||||||
*/
|
|
||||||
'reversi/surrender': {
|
|
||||||
requestBody: {
|
|
||||||
content: {
|
|
||||||
'application/json': {
|
|
||||||
/** Format: misskey:id */
|
|
||||||
gameId: 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'];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
21008
pnpm-lock.yaml
21008
pnpm-lock.yaml
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue