Merge remote-tracking branch 'upstream/develop' into fix/12553

This commit is contained in:
yupix 2024-02-16 05:35:15 +00:00
commit d8f380b7b3
No known key found for this signature in database
GPG key ID: 2FF705F5C56D9C06
71 changed files with 2626 additions and 2450 deletions

View file

@ -23,16 +23,35 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
if: github.event_name == 'issue_comment' && github.event.issue.pull_request && startsWith(github.event.comment.body, '/preview') if: github.event_name == 'issue_comment' && github.event.issue.pull_request && startsWith(github.event.comment.body, '/preview')
outputs: outputs:
is-allowed-user: ${{ steps.check-allowed-users.outputs.is-allowed-user }}
pr-ref: ${{ steps.get-ref.outputs.pr-ref }} pr-ref: ${{ steps.get-ref.outputs.pr-ref }}
wait_time: ${{ steps.get-wait-time.outputs.wait_time }} wait_time: ${{ steps.get-wait-time.outputs.wait_time }}
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v4
- name: Check allowed users
id: check-allowed-users
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ORG_ID: ${{ github.repository_owner_id }}
COMMENT_AUTHOR: ${{ github.event.comment.user.login }}
run: |
MEMBERSHIP_STATUS=$(curl -s -H "Authorization: Bearer $GITHUB_TOKEN" \
-H "Accept: application/vnd.github+json" \
-H "X-GitHub-Api-Version: 2022-11-28" \
"https://api.github.com/organizations/$ORG_ID/public_members/$COMMENT_AUTHOR" \
-o /dev/null -w '%{http_code}\n' -s)
if [ "$MEMBERSHIP_STATUS" -eq 204 ]; then
echo "is-allowed-user=true" > $GITHUB_OUTPUT
else
echo "is-allowed-user=false" > $GITHUB_OUTPUT
fi
- name: Get PR ref - name: Get PR ref
id: get-ref id: get-ref
env: env:
GH_TOKEN: ${{ github.token }} GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: | run: |
PR_NUMBER=$(jq --raw-output .issue.number $GITHUB_EVENT_PATH) PR_NUMBER=$(jq --raw-output .issue.number $GITHUB_EVENT_PATH)
PR_REF=$(gh pr view $PR_NUMBER --json headRefName -q '.headRefName') PR_REF=$(gh pr view $PR_NUMBER --json headRefName -q '.headRefName')
@ -40,13 +59,15 @@ jobs:
- name: Extract wait time - name: Extract wait time
id: get-wait-time id: get-wait-time
env:
COMMENT_BODY: ${{ github.event.comment.body }}
run: | run: |
COMMENT_BODY="${{ github.event.comment.body }}"
WAIT_TIME=$(echo "$COMMENT_BODY" | grep -oP '(?<=/preview\s)\d+' || echo "1800") WAIT_TIME=$(echo "$COMMENT_BODY" | grep -oP '(?<=/preview\s)\d+' || echo "1800")
echo "wait_time=$WAIT_TIME" > $GITHUB_OUTPUT echo "wait_time=$WAIT_TIME" > $GITHUB_OUTPUT
deploy-test-environment-pr-comment: deploy-test-environment-pr-comment:
needs: get-pr-ref needs: get-pr-ref
if: needs.get-pr-ref.outputs.is-allowed-user == 'true'
uses: joinmisskey/misskey-tga/.github/workflows/deploy-test-environment.yml@main uses: joinmisskey/misskey-tga/.github/workflows/deploy-test-environment.yml@main
with: with:
repository: ${{ github.repository }} repository: ${{ github.repository }}

View file

@ -6,38 +6,84 @@ on:
- develop - develop
workflow_dispatch: workflow_dispatch:
env:
REGISTRY_IMAGE: misskey/misskey
jobs: jobs:
push_to_registry: # see https://docs.docker.com/build/ci/github-actions/multi-platform/#distribute-build-across-multiple-runners
name: Push Docker image to Docker Hub build:
name: Build
runs-on: ubuntu-latest runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
platform:
- linux/amd64
- linux/arm64
if: github.repository == 'misskey-dev/misskey' if: github.repository == 'misskey-dev/misskey'
steps: steps:
- name: Prepare
run: |
platform=${{ matrix.platform }}
echo "PLATFORM_PAIR=${platform//\//-}" >> $GITHUB_ENV
- name: Check out the repo - name: Check out the repo
uses: actions/checkout@v4.1.1 uses: actions/checkout@v4.1.1
- name: Set up Docker Buildx - name: Set up Docker Buildx
id: buildx uses: docker/setup-buildx-action@v3
uses: docker/setup-buildx-action@v3.0.0
with:
platforms: linux/amd64,linux/arm64
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: misskey/misskey
- name: Log in to Docker Hub - name: Log in to Docker Hub
uses: docker/login-action@v3 uses: docker/login-action@v3
with: with:
username: ${{ secrets.DOCKER_USERNAME }} username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }} password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build and Push to Docker Hub - name: Build and push by digest
id: build
uses: docker/build-push-action@v5 uses: docker/build-push-action@v5
with: with:
builder: ${{ steps.buildx.outputs.name }}
context: . context: .
push: true push: true
platforms: ${{ steps.buildx.outputs.platforms }} platforms: ${{ matrix.platform }}
provenance: false provenance: false
tags: misskey/misskey:develop tags: ${{ env.REGISTRY_IMAGE }}:develop
labels: develop labels: develop
cache-from: type=gha cache-from: type=gha
cache-to: type=gha,mode=max cache-to: type=gha,mode=max
outputs: type=image,name=${{ env.REGISTRY_IMAGE }},push-by-digest=true,name-canonical=true,push=true
- name: Export digest
run: |
mkdir -p /tmp/digests
digest="${{ steps.build.outputs.digest }}"
touch "/tmp/digests/${digest#sha256:}"
- name: Upload digest
uses: actions/upload-artifact@v4
with:
name: digests-${{ env.PLATFORM_PAIR }}
path: /tmp/digests/*
if-no-files-found: error
retention-days: 1
merge:
runs-on: ubuntu-latest
needs:
- build
steps:
- name: Download digests
uses: actions/download-artifact@v4
with:
path: /tmp/digests
pattern: digests-*
merge-multiple: true
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Create manifest list and push
working-directory: /tmp/digests
run: |
docker buildx imagetools create --tag ${{ env.REGISTRY_IMAGE }}:develop \
$(printf '${{ env.REGISTRY_IMAGE }}@sha256:%s ' *)
- name: Inspect image
run: |
docker buildx imagetools inspect ${{ env.REGISTRY_IMAGE }}:develop

View file

@ -5,24 +5,34 @@ on:
types: [published] types: [published]
workflow_dispatch: workflow_dispatch:
jobs: env:
push_to_registry: REGISTRY_IMAGE: misskey/misskey
name: Push Docker image to Docker Hub
runs-on: ubuntu-latest
jobs:
# see https://docs.docker.com/build/ci/github-actions/multi-platform/#distribute-build-across-multiple-runners
build:
name: Build
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
platform:
- linux/amd64
- linux/arm64
steps: steps:
- name: Prepare
run: |
platform=${{ matrix.platform }}
echo "PLATFORM_PAIR=${platform//\//-}" >> $GITHUB_ENV
- name: Check out the repo - name: Check out the repo
uses: actions/checkout@v4.1.1 uses: actions/checkout@v4.1.1
- name: Set up Docker Buildx - name: Set up Docker Buildx
id: buildx uses: docker/setup-buildx-action@v3
uses: docker/setup-buildx-action@v3.0.0
with:
platforms: linux/amd64,linux/arm64
- name: Docker meta - name: Docker meta
id: meta id: meta
uses: docker/metadata-action@v5 uses: docker/metadata-action@v5
with: with:
images: misskey/misskey images: ${{ env.REGISTRY_IMAGE }}
tags: | tags: |
type=edge type=edge
type=ref,event=pr type=ref,event=pr
@ -36,14 +46,59 @@ jobs:
username: ${{ secrets.DOCKER_USERNAME }} username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }} password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build and Push to Docker Hub - name: Build and Push to Docker Hub
id: build
uses: docker/build-push-action@v5 uses: docker/build-push-action@v5
with: with:
builder: ${{ steps.buildx.outputs.name }}
context: . context: .
push: true push: true
platforms: ${{ steps.buildx.outputs.platforms }} platforms: ${{ matrix.platform }}
provenance: false provenance: false
tags: ${{ steps.meta.outputs.tags }} tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }} labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha cache-from: type=gha
cache-to: type=gha,mode=max cache-to: type=gha,mode=max
outputs: type=image,name=${{ env.REGISTRY_IMAGE }},push-by-digest=true,name-canonical=true,push=true
- name: Export digest
run: |
mkdir -p /tmp/digests
digest="${{ steps.build.outputs.digest }}"
touch "/tmp/digests/${digest#sha256:}"
- name: Upload digest
uses: actions/upload-artifact@v4
with:
name: digests-${{ env.PLATFORM_PAIR }}
path: /tmp/digests/*
if-no-files-found: error
retention-days: 1
merge:
runs-on: ubuntu-latest
needs:
- build
steps:
- name: Download digests
uses: actions/download-artifact@v4
with:
path: /tmp/digests
pattern: digests-*
merge-multiple: true
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY_IMAGE }}
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Create manifest list and push
working-directory: /tmp/digests
run: |
docker buildx imagetools create $(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \
$(printf '${{ env.REGISTRY_IMAGE }}@sha256:%s ' *)
- name: Inspect image
run: |
docker buildx imagetools inspect ${{ env.REGISTRY_IMAGE }}:${{ steps.meta.outputs.version }}

113
.github/workflows/storybook.yml vendored Normal file
View file

@ -0,0 +1,113 @@
name: Storybook
on:
push:
branches:
- master
- develop
- dev/storybook8 # for testing
pull_request_target:
jobs:
build:
runs-on: ubuntu-latest
env:
NODE_OPTIONS: "--max_old_space_size=7168"
steps:
- uses: actions/checkout@v3.6.0
if: github.event_name != 'pull_request_target'
with:
fetch-depth: 0
submodules: true
- uses: actions/checkout@v3.6.0
if: github.event_name == 'pull_request_target'
with:
fetch-depth: 0
submodules: true
ref: "refs/pull/${{ github.event.number }}/merge"
- name: Checkout actual HEAD
if: github.event_name == 'pull_request_target'
id: rev
run: |
echo "base=$(git rev-list --parents -n1 HEAD | cut -d" " -f2)" >> $GITHUB_OUTPUT
git checkout $(git rev-list --parents -n1 HEAD | cut -d" " -f3)
- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: 8
run_install: false
- name: Use Node.js 20.x
uses: actions/setup-node@v3.8.1
with:
node-version-file: '.node-version'
cache: 'pnpm'
- run: corepack enable
- run: pnpm i --frozen-lockfile
- name: Check pnpm-lock.yaml
run: git diff --exit-code pnpm-lock.yaml
- name: Build misskey-js
run: pnpm --filter misskey-js build
- name: Build storybook
run: pnpm --filter frontend build-storybook
- name: Publish to Chromatic
if: github.event_name != 'pull_request_target' && github.ref == 'refs/heads/master'
run: pnpm --filter frontend chromatic --exit-once-uploaded -d storybook-static
env:
CHROMATIC_PROJECT_TOKEN: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
- name: Publish to Chromatic
if: github.event_name != 'pull_request_target' && github.ref != 'refs/heads/master'
id: chromatic_push
run: |
DIFF="${{ github.event.before }} HEAD"
if [ "$DIFF" = "0000000000000000000000000000000000000000 HEAD" ]; then
DIFF="HEAD"
fi
CHROMATIC_PARAMETER="$(node packages/frontend/.storybook/changes.js $(git diff-tree --no-commit-id --name-only -r $(echo "$DIFF") | xargs))"
if [ "$CHROMATIC_PARAMETER" = " --skip" ]; then
echo "skip=true" >> $GITHUB_OUTPUT
fi
if pnpm --filter frontend chromatic -d storybook-static $(echo "$CHROMATIC_PARAMETER"); then
echo "success=true" >> $GITHUB_OUTPUT
else
echo "success=false" >> $GITHUB_OUTPUT
fi
env:
CHROMATIC_PROJECT_TOKEN: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
- name: Publish to Chromatic
if: github.event_name == 'pull_request_target'
id: chromatic_pull_request
run: |
DIFF="${{ steps.rev.outputs.base }} HEAD"
if [ "$DIFF" = "0000000000000000000000000000000000000000 HEAD" ]; then
DIFF="HEAD"
fi
CHROMATIC_PARAMETER="$(node packages/frontend/.storybook/changes.js $(git diff-tree --no-commit-id --name-only -r $(echo "$DIFF") | xargs))"
if [ "$CHROMATIC_PARAMETER" = " --skip" ]; then
echo "skip=true" >> $GITHUB_OUTPUT
fi
BRANCH="${{ github.event.pull_request.head.user.login }}:${{ github.event.pull_request.head.ref }}"
if [ "$BRANCH" = "misskey-dev:${{ github.event.pull_request.head.ref }}" ]; then
BRANCH="${{ github.event.pull_request.head.ref }}"
fi
pnpm --filter frontend chromatic --exit-once-uploaded -d storybook-static --branch-name $BRANCH $(echo "$CHROMATIC_PARAMETER")
env:
CHROMATIC_PROJECT_TOKEN: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
- name: Notify that Chromatic detects changes
uses: actions/github-script@v6.4.0
if: github.event_name != 'pull_request_target' && steps.chromatic_push.outputs.success == 'false'
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
github.rest.repos.createCommitComment({
owner: context.repo.owner,
repo: context.repo.repo,
commit_sha: context.sha,
body: 'Chromatic detects changes. Please [review the changes on Chromatic](https://www.chromatic.com/builds?appId=6428f7d7b962f0b79f97d6e4).'
})
- name: Upload Artifacts
uses: actions/upload-artifact@v3
with:
name: storybook
path: packages/frontend/storybook-static

View file

@ -93,6 +93,7 @@
- Fix: ジョブに関する設定の名前を修正 relashionshipJobPerSec -> relationshipJobPerSec - Fix: ジョブに関する設定の名前を修正 relashionshipJobPerSec -> relationshipJobPerSec
- Fix: コントロールパネル->モデレーション->「誰でも新規登録できるようにする」の初期値をONからOFFに変更 #13122 - Fix: コントロールパネル->モデレーション->「誰でも新規登録できるようにする」の初期値をONからOFFに変更 #13122
- Enhance: 連合向けのノート配信を軽量化 #13192 - Enhance: 連合向けのノート配信を軽量化 #13192
- Fix: リモートユーザーが復活してもキャッシュにより該当ユーザーのActivityが受け入れられないのを修正 #13273
- Fix: フォルダーの作成・更新を行う際、フォルダー名に最低1文字要求するように変更 - Fix: フォルダーの作成・更新を行う際、フォルダー名に最低1文字要求するように変更
### Service Worker ### Service Worker

View file

@ -85,6 +85,7 @@ export class CacheService implements OnApplicationShutdown {
this.uriPersonCache = new MemoryKVCache<MiUser | null, string | null>(Infinity, { this.uriPersonCache = new MemoryKVCache<MiUser | null, string | null>(Infinity, {
toMapConverter: user => { toMapConverter: user => {
if (user === null) return null; if (user === null) return null;
if (user.isDeleted) return null;
userByIdCache.set(user.id, user); userByIdCache.set(user.id, user);
return user.id; return user.id;
@ -160,7 +161,15 @@ export class CacheService implements OnApplicationShutdown {
switch (type) { switch (type) {
case 'userChangeSuspendedState': case 'userChangeSuspendedState':
case 'remoteUserUpdated': { case 'remoteUserUpdated': {
const user = await this.usersRepository.findOneByOrFail({ id: body.id }); const user = await this.usersRepository.findOneBy({ id: body.id });
if (user == null) {
this.userByIdCache.delete(body.id);
for (const [k, v] of this.uriPersonCache.cache.entries()) {
if (v.value === body.id) {
this.uriPersonCache.delete(k);
}
}
} else {
this.userByIdCache.set(user.id, user); this.userByIdCache.set(user.id, user);
for (const [k, v] of this.uriPersonCache.cache.entries()) { for (const [k, v] of this.uriPersonCache.cache.entries()) {
if (v.value === user.id) { if (v.value === user.id) {
@ -171,6 +180,7 @@ export class CacheService implements OnApplicationShutdown {
this.localUserByNativeTokenCache.set(user.token!, user); this.localUserByNativeTokenCache.set(user.token!, user);
this.localUserByIdCache.set(user.id, user); this.localUserByIdCache.set(user.id, user);
} }
}
break; break;
} }
case 'userTokenRegenerated': { case 'userTokenRegenerated': {

View file

@ -14,9 +14,9 @@ export type FanoutTimelineName =
| `homeTimeline:${string}` | `homeTimeline:${string}`
| `homeTimelineWithFiles:${string}` // only notes with files are included | `homeTimelineWithFiles:${string}` // only notes with files are included
// local timeline // local timeline
| 'localTimeline' // replies are not included | `localTimeline` // replies are not included
| 'localTimelineWithFiles' // only non-reply notes with files are included | `localTimelineWithFiles` // only non-reply notes with files are included
| 'localTimelineWithReplies' // only replies are included | `localTimelineWithReplies` // only replies are included
| `localTimelineWithReplyTo:${string}` // Only replies to specific local user are included. Parameter is reply user id. | `localTimelineWithReplyTo:${string}` // Only replies to specific local user are included. Parameter is reply user id.
// antenna // antenna

View file

@ -12,11 +12,11 @@ import type { Config } from '@/config.js';
import { DI } from '@/di-symbols.js'; import { DI } from '@/di-symbols.js';
import { bindThis } from '@/decorators.js'; import { bindThis } from '@/decorators.js';
import type { Antenna } from '@/server/api/endpoints/i/import-antennas.js'; import type { Antenna } from '@/server/api/endpoints/i/import-antennas.js';
import { ApRequestCreator } from '@/core/activitypub/ApRequestService.js';
import type { DbQueue, DeliverQueue, EndedPollNotificationQueue, InboxQueue, ObjectStorageQueue, RelationshipQueue, SystemQueue, WebhookDeliverQueue } from './QueueModule.js'; import type { DbQueue, DeliverQueue, EndedPollNotificationQueue, InboxQueue, ObjectStorageQueue, RelationshipQueue, SystemQueue, WebhookDeliverQueue } from './QueueModule.js';
import type { DbJobData, DeliverJobData, RelationshipJobData, ThinUser } from '../queue/types.js'; import type { DbJobData, DeliverJobData, RelationshipJobData, ThinUser } from '../queue/types.js';
import type httpSignature from '@peertube/http-signature'; import type httpSignature from '@peertube/http-signature';
import type * as Bull from 'bullmq'; import type * as Bull from 'bullmq';
import { ApRequestCreator } from '@/core/activitypub/ApRequestService.js';
@Injectable() @Injectable()
export class QueueService { export class QueueService {

View file

@ -30,12 +30,12 @@ import { RoleService } from '@/core/RoleService.js';
import { FeaturedService } from '@/core/FeaturedService.js'; import { FeaturedService } from '@/core/FeaturedService.js';
import { trackPromise } from '@/misc/promise-tracker.js'; import { trackPromise } from '@/misc/promise-tracker.js';
const FALLBACK = ''; const FALLBACK = '\u2764';
const PER_NOTE_REACTION_USER_PAIR_CACHE_MAX = 16; const PER_NOTE_REACTION_USER_PAIR_CACHE_MAX = 16;
const legacies: Record<string, string> = { const legacies: Record<string, string> = {
'like': '👍', 'like': '👍',
'love': '❤', // ここに記述する場合は異体字セレクタを入れない 'love': '\u2764', // ハート、異体字セレクタを入れない
'laugh': '😆', 'laugh': '😆',
'hmm': '🤔', 'hmm': '🤔',
'surprise': '😮', 'surprise': '😮',
@ -120,7 +120,7 @@ export class ReactionService {
let reaction = _reaction ?? FALLBACK; let reaction = _reaction ?? FALLBACK;
if (note.reactionAcceptance === 'likeOnly' || ((note.reactionAcceptance === 'likeOnlyForRemote' || note.reactionAcceptance === 'nonSensitiveOnlyForLocalLikeOnlyForRemote') && (user.host != null))) { if (note.reactionAcceptance === 'likeOnly' || ((note.reactionAcceptance === 'likeOnlyForRemote' || note.reactionAcceptance === 'nonSensitiveOnlyForLocalLikeOnlyForRemote') && (user.host != null))) {
reaction = '❤️'; reaction = '\u2764';
} else if (_reaction) { } else if (_reaction) {
const custom = reaction.match(isCustomEmojiRegexp); const custom = reaction.match(isCustomEmojiRegexp);
if (custom) { if (custom) {

View file

@ -106,12 +106,12 @@ export class ApDbResolverService implements OnApplicationShutdown {
return await this.cacheService.userByIdCache.fetchMaybe( return await this.cacheService.userByIdCache.fetchMaybe(
parsed.id, parsed.id,
() => this.usersRepository.findOneBy({ id: parsed.id }).then(x => x ?? undefined), () => this.usersRepository.findOneBy({ id: parsed.id, isDeleted: false }).then(x => x ?? undefined),
) as MiLocalUser | undefined ?? null; ) as MiLocalUser | undefined ?? null;
} else { } else {
return await this.cacheService.uriPersonCache.fetch( return await this.cacheService.uriPersonCache.fetch(
parsed.uri, parsed.uri,
() => this.usersRepository.findOneBy({ uri: parsed.uri }), () => this.usersRepository.findOneBy({ uri: parsed.uri, isDeleted: false }),
) as MiRemoteUser | null; ) as MiRemoteUser | null;
} }
} }
@ -136,8 +136,12 @@ export class ApDbResolverService implements OnApplicationShutdown {
if (key == null) return null; if (key == null) return null;
const user = await this.cacheService.findUserById(key.userId).catch(() => null) as MiRemoteUser | null;
if (user == null) return null;
if (user.isDeleted) return null;
return { return {
user: await this.cacheService.findUserById(key.userId) as MiRemoteUser, user,
key, key,
}; };
} }
@ -151,6 +155,7 @@ export class ApDbResolverService implements OnApplicationShutdown {
key: MiUserPublickey | null; key: MiUserPublickey | null;
} | null> { } | null> {
const user = await this.apPersonService.resolvePerson(uri) as MiRemoteUser; const user = await this.apPersonService.resolvePerson(uri) as MiRemoteUser;
if (user.isDeleted) return null;
const key = await this.publicKeyByUserIdCache.fetch( const key = await this.publicKeyByUserIdCache.fetch(
user.id, user.id,

View file

@ -35,6 +35,8 @@ import { ApResolverService } from './ApResolverService.js';
import { ApAudienceService } from './ApAudienceService.js'; import { ApAudienceService } from './ApAudienceService.js';
import { ApPersonService } from './models/ApPersonService.js'; import { ApPersonService } from './models/ApPersonService.js';
import { ApQuestionService } from './models/ApQuestionService.js'; import { ApQuestionService } from './models/ApQuestionService.js';
import { CacheService } from '@/core/CacheService.js';
import { GlobalEventService } from '@/core/GlobalEventService.js';
import type { Resolver } from './ApResolverService.js'; import type { Resolver } from './ApResolverService.js';
import type { IAccept, IAdd, IAnnounce, IBlock, ICreate, IDelete, IFlag, IFollow, ILike, IObject, IReject, IRemove, IUndo, IUpdate, IMove } from './type.js'; import type { IAccept, IAdd, IAnnounce, IBlock, ICreate, IDelete, IFlag, IFollow, ILike, IObject, IReject, IRemove, IUndo, IUpdate, IMove } from './type.js';
@ -82,6 +84,8 @@ export class ApInboxService {
private apPersonService: ApPersonService, private apPersonService: ApPersonService,
private apQuestionService: ApQuestionService, private apQuestionService: ApQuestionService,
private queueService: QueueService, private queueService: QueueService,
private cacheService: CacheService,
private globalEventService: GlobalEventService,
) { ) {
this.logger = this.apLoggerService.logger; this.logger = this.apLoggerService.logger;
} }
@ -479,6 +483,8 @@ export class ApInboxService {
isDeleted: true, isDeleted: true,
}); });
this.globalEventService.publishInternalEvent('remoteUserUpdated', { id: actor.id });
return `ok: queued ${job.name} ${job.id}`; return `ok: queued ${job.name} ${job.id}`;
} }

View file

@ -31,7 +31,7 @@ export class ApMfmService {
const parsed = mfm.parse(srcMfm); const parsed = mfm.parse(srcMfm);
if (!apAppend && parsed.every(n => ['text', 'unicodeEmoji', 'emojiCode', 'mention', 'hashtag', 'url'].includes(n.type))) { if (!apAppend && parsed?.every(n => ['text', 'unicodeEmoji', 'emojiCode', 'mention', 'hashtag', 'url'].includes(n.type))) {
noMisskeyContent = true; noMisskeyContent = true;
} }

View file

@ -37,7 +37,17 @@ import { packedEmojiDetailedSchema, packedEmojiSimpleSchema } from '@/models/jso
import { packedFlashSchema } from '@/models/json-schema/flash.js'; import { packedFlashSchema } from '@/models/json-schema/flash.js';
import { packedAnnouncementSchema } from '@/models/json-schema/announcement.js'; import { packedAnnouncementSchema } from '@/models/json-schema/announcement.js';
import { packedSigninSchema } from '@/models/json-schema/signin.js'; import { packedSigninSchema } from '@/models/json-schema/signin.js';
import { packedRoleLiteSchema, packedRoleSchema, packedRolePoliciesSchema } from '@/models/json-schema/role.js'; import {
packedRoleLiteSchema,
packedRoleSchema,
packedRolePoliciesSchema,
packedRoleCondFormulaLogicsSchema,
packedRoleCondFormulaValueNot,
packedRoleCondFormulaValueIsLocalOrRemoteSchema,
packedRoleCondFormulaValueCreatedSchema,
packedRoleCondFormulaFollowersOrFollowingOrNotesSchema,
packedRoleCondFormulaValueSchema,
} from '@/models/json-schema/role.js';
import { packedAdSchema } from '@/models/json-schema/ad.js'; import { packedAdSchema } from '@/models/json-schema/ad.js';
import { packedReversiGameLiteSchema, packedReversiGameDetailedSchema } from '@/models/json-schema/reversi-game.js'; import { packedReversiGameLiteSchema, packedReversiGameDetailedSchema } from '@/models/json-schema/reversi-game.js';
@ -78,6 +88,12 @@ export const refs = {
EmojiDetailed: packedEmojiDetailedSchema, EmojiDetailed: packedEmojiDetailedSchema,
Flash: packedFlashSchema, Flash: packedFlashSchema,
Signin: packedSigninSchema, Signin: packedSigninSchema,
RoleCondFormulaLogics: packedRoleCondFormulaLogicsSchema,
RoleCondFormulaValueNot: packedRoleCondFormulaValueNot,
RoleCondFormulaValueIsLocalOrRemote: packedRoleCondFormulaValueIsLocalOrRemoteSchema,
RoleCondFormulaValueCreated: packedRoleCondFormulaValueCreatedSchema,
RoleCondFormulaFollowersOrFollowingOrNotes: packedRoleCondFormulaFollowersOrFollowingOrNotesSchema,
RoleCondFormulaValue: packedRoleCondFormulaValueSchema,
RoleLite: packedRoleLiteSchema, RoleLite: packedRoleLiteSchema,
Role: packedRoleSchema, Role: packedRoleSchema,
RolePolicies: packedRolePoliciesSchema, RolePolicies: packedRolePoliciesSchema,

View file

@ -48,7 +48,7 @@ export class MiBubbleGameRecord {
@Column('jsonb', { @Column('jsonb', {
default: [], default: [],
}) })
public logs: any[]; public logs: number[][];
@Column('boolean', { @Column('boolean', {
default: false, default: false,

View file

@ -69,7 +69,7 @@ type CondFormulaValueNotesMoreThanOrEq = {
value: number; value: number;
}; };
export type RoleCondFormulaValue = export type RoleCondFormulaValue = { id: string } & (
CondFormulaValueAnd | CondFormulaValueAnd |
CondFormulaValueOr | CondFormulaValueOr |
CondFormulaValueNot | CondFormulaValueNot |
@ -82,7 +82,8 @@ export type RoleCondFormulaValue =
CondFormulaValueFollowingLessThanOrEq | CondFormulaValueFollowingLessThanOrEq |
CondFormulaValueFollowingMoreThanOrEq | CondFormulaValueFollowingMoreThanOrEq |
CondFormulaValueNotesLessThanOrEq | CondFormulaValueNotesLessThanOrEq |
CondFormulaValueNotesMoreThanOrEq; CondFormulaValueNotesMoreThanOrEq
);
@Entity('role') @Entity('role')
export class MiRole { export class MiRole {

View file

@ -47,12 +47,12 @@ export const packedReversiGameLiteSchema = {
user1: { user1: {
type: 'object', type: 'object',
optional: false, nullable: false, optional: false, nullable: false,
ref: 'User', ref: 'UserLite',
}, },
user2: { user2: {
type: 'object', type: 'object',
optional: false, nullable: false, optional: false, nullable: false,
ref: 'User', ref: 'UserLite',
}, },
winnerId: { winnerId: {
type: 'string', type: 'string',
@ -62,7 +62,7 @@ export const packedReversiGameLiteSchema = {
winner: { winner: {
type: 'object', type: 'object',
optional: false, nullable: true, optional: false, nullable: true,
ref: 'User', ref: 'UserLite',
}, },
surrenderedUserId: { surrenderedUserId: {
type: 'string', type: 'string',
@ -165,12 +165,12 @@ export const packedReversiGameDetailedSchema = {
user1: { user1: {
type: 'object', type: 'object',
optional: false, nullable: false, optional: false, nullable: false,
ref: 'User', ref: 'UserLite',
}, },
user2: { user2: {
type: 'object', type: 'object',
optional: false, nullable: false, optional: false, nullable: false,
ref: 'User', ref: 'UserLite',
}, },
winnerId: { winnerId: {
type: 'string', type: 'string',
@ -180,7 +180,7 @@ export const packedReversiGameDetailedSchema = {
winner: { winner: {
type: 'object', type: 'object',
optional: false, nullable: true, optional: false, nullable: true,
ref: 'User', ref: 'UserLite',
}, },
surrenderedUserId: { surrenderedUserId: {
type: 'string', type: 'string',
@ -226,6 +226,9 @@ export const packedReversiGameDetailedSchema = {
items: { items: {
type: 'array', type: 'array',
optional: false, nullable: false, optional: false, nullable: false,
items: {
type: 'number',
},
}, },
}, },
map: { map: {

View file

@ -1,3 +1,129 @@
/*
* SPDX-FileCopyrightText: syuilo and misskey-project
* SPDX-License-Identifier: AGPL-3.0-only
*/
export const packedRoleCondFormulaLogicsSchema = {
type: 'object',
properties: {
id: {
type: 'string', optional: false,
},
type: {
type: 'string',
nullable: false, optional: false,
enum: ['and', 'or'],
},
values: {
type: 'array',
nullable: false, optional: false,
items: {
ref: 'RoleCondFormulaValue',
},
},
},
} as const;
export const packedRoleCondFormulaValueNot = {
type: 'object',
properties: {
id: {
type: 'string', optional: false,
},
type: {
type: 'string',
nullable: false, optional: false,
enum: ['not'],
},
value: {
type: 'object',
optional: false,
ref: 'RoleCondFormulaValue',
},
},
} as const;
export const packedRoleCondFormulaValueIsLocalOrRemoteSchema = {
type: 'object',
properties: {
id: {
type: 'string', optional: false,
},
type: {
type: 'string',
nullable: false, optional: false,
enum: ['isLocal', 'isRemote'],
},
},
} as const;
export const packedRoleCondFormulaValueCreatedSchema = {
type: 'object',
properties: {
id: {
type: 'string', optional: false,
},
type: {
type: 'string',
nullable: false, optional: false,
enum: [
'createdLessThan',
'createdMoreThan',
],
},
sec: {
type: 'number',
nullable: false, optional: false,
},
},
} as const;
export const packedRoleCondFormulaFollowersOrFollowingOrNotesSchema = {
type: 'object',
properties: {
id: {
type: 'string', optional: false,
},
type: {
type: 'string',
nullable: false, optional: false,
enum: [
'followersLessThanOrEq',
'followersMoreThanOrEq',
'followingLessThanOrEq',
'followingMoreThanOrEq',
'notesLessThanOrEq',
'notesMoreThanOrEq',
],
},
value: {
type: 'number',
nullable: false, optional: false,
},
},
} as const;
export const packedRoleCondFormulaValueSchema = {
type: 'object',
oneOf: [
{
ref: 'RoleCondFormulaLogics',
},
{
ref: 'RoleCondFormulaValueNot',
},
{
ref: 'RoleCondFormulaValueIsLocalOrRemote',
},
{
ref: 'RoleCondFormulaValueCreated',
},
{
ref: 'RoleCondFormulaFollowersOrFollowingOrNotes',
},
],
} as const;
export const packedRolePoliciesSchema = { export const packedRolePoliciesSchema = {
type: 'object', type: 'object',
optional: false, nullable: false, optional: false, nullable: false,
@ -174,6 +300,7 @@ export const packedRoleSchema = {
condFormula: { condFormula: {
type: 'object', type: 'object',
optional: false, nullable: false, optional: false, nullable: false,
ref: 'RoleCondFormulaValue',
}, },
isPublic: { isPublic: {
type: 'boolean', type: 'boolean',

View file

@ -3,16 +3,38 @@
* SPDX-License-Identifier: AGPL-3.0-only * SPDX-License-Identifier: AGPL-3.0-only
*/ */
const notificationRecieveConfig = { export const notificationRecieveConfig = {
type: 'object', type: 'object',
nullable: false, optional: true, oneOf: [
{
type: 'object',
nullable: false,
properties: { properties: {
type: { type: {
type: 'string', type: 'string',
nullable: false, optional: false, nullable: false,
enum: ['all', 'following', 'follower', 'mutualFollow', 'list', 'never'], enum: ['all', 'following', 'follower', 'mutualFollow', 'never'],
}, },
}, },
required: ['type'],
},
{
type: 'object',
nullable: false,
properties: {
type: {
type: 'string',
nullable: false,
enum: ['list'],
},
userListId: {
type: 'string',
format: 'misskey:id',
},
},
required: ['type', 'userListId'],
},
],
} as const; } as const;
export const packedUserLiteSchema = { export const packedUserLiteSchema = {
@ -546,15 +568,20 @@ export const packedMeDetailedOnlySchema = {
type: 'object', type: 'object',
nullable: false, optional: false, nullable: false, optional: false,
properties: { properties: {
app: notificationRecieveConfig, note: { optional: true, ...notificationRecieveConfig },
quote: notificationRecieveConfig, follow: { optional: true, ...notificationRecieveConfig },
reply: notificationRecieveConfig, mention: { optional: true, ...notificationRecieveConfig },
follow: notificationRecieveConfig, reply: { optional: true, ...notificationRecieveConfig },
renote: notificationRecieveConfig, renote: { optional: true, ...notificationRecieveConfig },
mention: notificationRecieveConfig, quote: { optional: true, ...notificationRecieveConfig },
reaction: notificationRecieveConfig, reaction: { optional: true, ...notificationRecieveConfig },
pollEnded: notificationRecieveConfig, pollEnded: { optional: true, ...notificationRecieveConfig },
receiveFollowRequest: notificationRecieveConfig, receiveFollowRequest: { optional: true, ...notificationRecieveConfig },
followRequestAccepted: { optional: true, ...notificationRecieveConfig },
roleAssigned: { optional: true, ...notificationRecieveConfig },
achievementEarned: { optional: true, ...notificationRecieveConfig },
app: { optional: true, ...notificationRecieveConfig },
test: { optional: true, ...notificationRecieveConfig },
}, },
}, },
emailNotificationTypes: { emailNotificationTypes: {

View file

@ -34,7 +34,7 @@ export class RelationshipProcessorService {
@bindThis @bindThis
public async processFollow(job: Bull.Job<RelationshipJobData>): Promise<string> { public async processFollow(job: Bull.Job<RelationshipJobData>): Promise<string> {
this.logger.info(`${job.data.from.id} is trying to follow ${job.data.to.id} ${job.data.withReplies ? 'with replies' : 'without replies'}`); this.logger.info(`${job.data.from.id} is trying to follow ${job.data.to.id} ${job.data.withReplies ? "with replies" : "without replies"}`);
await this.userFollowingService.follow(job.data.from, job.data.to, { await this.userFollowingService.follow(job.data.from, job.data.to, {
requestId: job.data.requestId, requestId: job.data.requestId,
silent: job.data.silent, silent: job.data.silent,

View file

@ -38,7 +38,7 @@ export class NodeinfoServerService {
public getLinks() { public getLinks() {
return [{ return [{
rel: 'http://nodeinfo.diaspora.software/ns/schema/2.1', rel: 'http://nodeinfo.diaspora.software/ns/schema/2.1',
href: this.config.url + nodeinfo2_1path, href: this.config.url + nodeinfo2_1path
}, { }, {
rel: 'http://nodeinfo.diaspora.software/ns/schema/2.0', rel: 'http://nodeinfo.diaspora.software/ns/schema/2.0',
href: this.config.url + nodeinfo2_0path, href: this.config.url + nodeinfo2_0path,

View file

@ -15,9 +15,6 @@ export const meta = {
requireCredential: true, requireCredential: true,
requireAdmin: true, requireAdmin: true,
kind: 'write:admin:delete-account', kind: 'write:admin:delete-account',
res: {
},
} as const; } as const;
export const paramDef = { export const paramDef = {

View file

@ -84,6 +84,24 @@ export const meta = {
properties: { properties: {
type: 'object', type: 'object',
optional: false, nullable: false, optional: false, nullable: false,
properties: {
width: {
type: 'number',
optional: true, nullable: false,
},
height: {
type: 'number',
optional: true, nullable: false,
},
orientation: {
type: 'number',
optional: true, nullable: false,
},
avgColor: {
type: 'string',
optional: true, nullable: false,
},
},
}, },
storedInternal: { storedInternal: {
type: 'boolean', type: 'boolean',

View file

@ -18,6 +18,18 @@ export const meta = {
res: { res: {
type: 'object', type: 'object',
optional: false, nullable: false, optional: false, nullable: false,
additionalProperties: {
type: 'object',
properties: {
count: {
type: 'number',
},
size: {
type: 'number',
},
},
required: ['count', 'size'],
},
example: { example: {
migrations: { migrations: {
count: 66, count: 66,

View file

@ -10,6 +10,7 @@ import { DI } from '@/di-symbols.js';
import { RoleService } from '@/core/RoleService.js'; import { RoleService } from '@/core/RoleService.js';
import { RoleEntityService } from '@/core/entities/RoleEntityService.js'; import { RoleEntityService } from '@/core/entities/RoleEntityService.js';
import { IdService } from '@/core/IdService.js'; import { IdService } from '@/core/IdService.js';
import { notificationRecieveConfig } from '@/models/json-schema/user.js';
export const meta = { export const meta = {
tags: ['admin'], tags: ['admin'],
@ -21,6 +22,157 @@ export const meta = {
res: { res: {
type: 'object', type: 'object',
nullable: false, optional: false, nullable: false, optional: false,
properties: {
email: {
type: 'string',
optional: false, nullable: true,
},
emailVerified: {
type: 'boolean',
optional: false, nullable: false,
},
autoAcceptFollowed: {
type: 'boolean',
optional: false, nullable: false,
},
noCrawle: {
type: 'boolean',
optional: false, nullable: false,
},
preventAiLearning: {
type: 'boolean',
optional: false, nullable: false,
},
alwaysMarkNsfw: {
type: 'boolean',
optional: false, nullable: false,
},
autoSensitive: {
type: 'boolean',
optional: false, nullable: false,
},
carefulBot: {
type: 'boolean',
optional: false, nullable: false,
},
injectFeaturedNote: {
type: 'boolean',
optional: false, nullable: false,
},
receiveAnnouncementEmail: {
type: 'boolean',
optional: false, nullable: false,
},
mutedWords: {
type: 'array',
optional: false, nullable: false,
items: {
anyOf: [
{
type: 'string',
},
{
type: 'array',
items: {
type: 'string',
},
},
],
},
},
mutedInstances: {
type: 'array',
optional: false, nullable: false,
items: {
type: 'string',
},
},
notificationRecieveConfig: {
type: 'object',
optional: false, nullable: false,
properties: {
note: { optional: true, ...notificationRecieveConfig },
follow: { optional: true, ...notificationRecieveConfig },
mention: { optional: true, ...notificationRecieveConfig },
reply: { optional: true, ...notificationRecieveConfig },
renote: { optional: true, ...notificationRecieveConfig },
quote: { optional: true, ...notificationRecieveConfig },
reaction: { optional: true, ...notificationRecieveConfig },
pollEnded: { optional: true, ...notificationRecieveConfig },
receiveFollowRequest: { optional: true, ...notificationRecieveConfig },
followRequestAccepted: { optional: true, ...notificationRecieveConfig },
roleAssigned: { optional: true, ...notificationRecieveConfig },
achievementEarned: { optional: true, ...notificationRecieveConfig },
app: { optional: true, ...notificationRecieveConfig },
test: { optional: true, ...notificationRecieveConfig },
},
},
isModerator: {
type: 'boolean',
optional: false, nullable: false,
},
isSilenced: {
type: 'boolean',
optional: false, nullable: false,
},
isSuspended: {
type: 'boolean',
optional: false, nullable: false,
},
isHibernated: {
type: 'boolean',
optional: false, nullable: false,
},
lastActiveDate: {
type: 'string',
optional: false, nullable: true,
},
moderationNote: {
type: 'string',
optional: false, nullable: false,
},
signins: {
type: 'array',
optional: false, nullable: false,
items: {
ref: 'Signin',
},
},
policies: {
type: 'object',
optional: false, nullable: false,
ref: 'RolePolicies',
},
roles: {
type: 'array',
optional: false, nullable: false,
items: {
type: 'object',
ref: 'Role',
},
},
roleAssigns: {
type: 'array',
optional: false, nullable: false,
items: {
type: 'object',
properties: {
createdAt: {
type: 'string',
optional: false, nullable: false,
},
expiresAt: {
type: 'string',
optional: false, nullable: true,
},
roleId: {
type: 'string',
optional: false, nullable: false,
},
},
},
},
},
}, },
} as const; } as const;
@ -89,7 +241,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
isSilenced: isSilenced, isSilenced: isSilenced,
isSuspended: user.isSuspended, isSuspended: user.isSuspended,
isHibernated: user.isHibernated, isHibernated: user.isHibernated,
lastActiveDate: user.lastActiveDate, lastActiveDate: user.lastActiveDate ? user.lastActiveDate.toISOString() : null,
moderationNote: profile.moderationNote ?? '', moderationNote: profile.moderationNote ?? '',
signins, signins,
policies: await this.roleService.getUserPolicies(user.id), policies: await this.roleService.getUserPolicies(user.id),

View file

@ -24,9 +24,19 @@ export const meta = {
type: 'object', type: 'object',
optional: false, nullable: false, optional: false, nullable: false,
properties: { properties: {
id: { type: 'string', format: 'misskey:id' }, id: {
score: { type: 'integer' }, type: 'string', format: 'misskey:id',
user: { ref: 'UserLite' }, optional: false, nullable: false,
},
score: {
type: 'integer',
optional: false, nullable: false,
},
user: {
type: 'object',
optional: true, nullable: false,
ref: 'UserLite',
},
}, },
}, },
}, },

View file

@ -29,9 +29,6 @@ export const meta = {
id: 'eb627bc7-574b-4a52-a860-3c3eae772b88', id: 'eb627bc7-574b-4a52-a860-3c3eae772b88',
}, },
}, },
res: {
},
} as const; } as const;
export const paramDef = { export const paramDef = {
@ -39,7 +36,15 @@ export const paramDef = {
properties: { properties: {
score: { type: 'integer', minimum: 0 }, score: { type: 'integer', minimum: 0 },
seed: { type: 'string', minLength: 1, maxLength: 1024 }, seed: { type: 'string', minLength: 1, maxLength: 1024 },
logs: { type: 'array' }, logs: {
type: 'array',
items: {
type: 'array',
items: {
type: 'number',
},
},
},
gameMode: { type: 'string' }, gameMode: { type: 'string' },
gameVersion: { type: 'integer' }, gameVersion: { type: 'integer' },
}, },

View file

@ -25,8 +25,8 @@ export const meta = {
items: { items: {
type: 'object', type: 'object',
}, },
}, }
}, }
}, },
} as const; } as const;

View file

@ -71,7 +71,7 @@ export const paramDef = {
type: 'object', type: 'object',
properties: { properties: {
userId: { type: 'string', format: 'misskey:id' }, userId: { type: 'string', format: 'misskey:id' },
withReplies: { type: 'boolean' }, withReplies: { type: 'boolean' }
}, },
required: ['userId'], required: ['userId'],
} as const; } as const;

View file

@ -6,7 +6,7 @@
import { Inject, Injectable } from '@nestjs/common'; import { Inject, Injectable } from '@nestjs/common';
import { Endpoint } from '@/server/api/endpoint-base.js'; import { Endpoint } from '@/server/api/endpoint-base.js';
import type { UsersRepository } from '@/models/_.js'; import type { UsersRepository } from '@/models/_.js';
import { safeForSql } from '@/misc/safe-for-sql.js'; import { safeForSql } from "@/misc/safe-for-sql.js";
import { normalizeForSearch } from '@/misc/normalize-for-search.js'; import { normalizeForSearch } from '@/misc/normalize-for-search.js';
import { UserEntityService } from '@/core/entities/UserEntityService.js'; import { UserEntityService } from '@/core/entities/UserEntityService.js';
import { DI } from '@/di-symbols.js'; import { DI } from '@/di-symbols.js';

View file

@ -14,7 +14,7 @@ export const meta = {
tags: ['account'], tags: ['account'],
requireCredential: true, requireCredential: true,
kind: 'read:account', kind: "read:account",
res: { res: {
type: 'object', type: 'object',

View file

@ -15,6 +15,19 @@ export const meta = {
requireCredential: true, requireCredential: true,
secure: true, secure: true,
res: {
type: 'object',
properties: {
backupCodes: {
type: 'array',
optional: false,
items: {
type: 'string',
},
},
},
},
} as const; } as const;
export const paramDef = { export const paramDef = {

View file

@ -47,7 +47,7 @@ export const meta = {
properties: { properties: {
id: { id: {
type: 'string', type: 'string',
nullable: true, optional: true,
}, },
}, },
}, },

View file

@ -21,21 +21,26 @@ export const meta = {
properties: { properties: {
id: { id: {
type: 'string', type: 'string',
optional: false,
format: 'misskey:id', format: 'misskey:id',
}, },
name: { name: {
type: 'string', type: 'string',
optional: true,
}, },
createdAt: { createdAt: {
type: 'string', type: 'string',
optional: false,
format: 'date-time', format: 'date-time',
}, },
lastUsedAt: { lastUsedAt: {
type: 'string', type: 'string',
optional: true,
format: 'date-time', format: 'date-time',
}, },
permission: { permission: {
type: 'array', type: 'array',
optional: false,
uniqueItems: true, uniqueItems: true,
items: { items: {
type: 'string', type: 'string',

View file

@ -23,16 +23,19 @@ export const meta = {
id: { id: {
type: 'string', type: 'string',
format: 'misskey:id', format: 'misskey:id',
optional: false,
}, },
name: { name: {
type: 'string', type: 'string',
optional: false,
}, },
callbackUrl: { callbackUrl: {
type: 'string', type: 'string',
nullable: true, optional: false, nullable: true,
}, },
permission: { permission: {
type: 'array', type: 'array',
optional: false,
uniqueItems: true, uniqueItems: true,
items: { items: {
type: 'string', type: 'string',
@ -40,6 +43,7 @@ export const meta = {
}, },
isAuthorized: { isAuthorized: {
type: 'boolean', type: 'boolean',
optional: true,
}, },
}, },
}, },

View file

@ -22,6 +22,15 @@ export const meta = {
res: { res: {
type: 'object', type: 'object',
properties: {
updatedAt: {
type: 'string',
optional: false,
},
value: {
optional: false,
},
},
}, },
} as const; } as const;
@ -50,7 +59,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
} }
return { return {
updatedAt: item.updatedAt, updatedAt: item.updatedAt.toISOString(),
value: item.value, value: item.value,
}; };
}); });

View file

@ -22,7 +22,7 @@ export const meta = {
res: { res: {
type: 'object', type: 'object',
}, }
} as const; } as const;
export const paramDef = { export const paramDef = {

View file

@ -13,6 +13,9 @@ export const meta = {
res: { res: {
type: 'object', type: 'object',
additionalProperties: {
type: 'string',
},
}, },
} as const; } as const;

View file

@ -10,6 +10,13 @@ import { RegistryApiService } from '@/core/RegistryApiService.js';
export const meta = { export const meta = {
requireCredential: true, requireCredential: true,
kind: 'read:account', kind: 'read:account',
res: {
type: 'array',
items: {
type: 'string',
},
},
} as const; } as const;
export const paramDef = { export const paramDef = {

View file

@ -22,8 +22,8 @@ export const meta = {
type: 'array', type: 'array',
items: { items: {
type: 'string', type: 'string',
}, }
}, }
}, },
domain: { domain: {
type: 'string', type: 'string',
@ -31,7 +31,7 @@ export const meta = {
}, },
}, },
}, },
}, }
} as const; } as const;
export const paramDef = { export const paramDef = {

View file

@ -33,6 +33,7 @@ import { HttpRequestService } from '@/core/HttpRequestService.js';
import type { Config } from '@/config.js'; import type { Config } from '@/config.js';
import { safeForSql } from '@/misc/safe-for-sql.js'; import { safeForSql } from '@/misc/safe-for-sql.js';
import { AvatarDecorationService } from '@/core/AvatarDecorationService.js'; import { AvatarDecorationService } from '@/core/AvatarDecorationService.js';
import { notificationRecieveConfig } from '@/models/json-schema/user.js';
import { ApiLoggerService } from '../../ApiLoggerService.js'; import { ApiLoggerService } from '../../ApiLoggerService.js';
import { ApiError } from '../../error.js'; import { ApiError } from '../../error.js';
@ -184,7 +185,26 @@ export const paramDef = {
mutedInstances: { type: 'array', items: { mutedInstances: { type: 'array', items: {
type: 'string', type: 'string',
} }, } },
notificationRecieveConfig: { type: 'object' }, notificationRecieveConfig: {
type: 'object',
nullable: false,
properties: {
note: notificationRecieveConfig,
follow: notificationRecieveConfig,
mention: notificationRecieveConfig,
reply: notificationRecieveConfig,
renote: notificationRecieveConfig,
quote: notificationRecieveConfig,
reaction: notificationRecieveConfig,
pollEnded: notificationRecieveConfig,
receiveFollowRequest: notificationRecieveConfig,
followRequestAccepted: notificationRecieveConfig,
roleAssigned: notificationRecieveConfig,
achievementEarned: notificationRecieveConfig,
app: notificationRecieveConfig,
test: notificationRecieveConfig,
},
},
emailNotificationTypes: { type: 'array', items: { emailNotificationTypes: { type: 'array', items: {
type: 'string', type: 'string',
} }, } },

View file

@ -108,7 +108,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
url: webhook.url, url: webhook.url,
secret: webhook.secret, secret: webhook.secret,
active: webhook.active, active: webhook.active,
latestSentAt: webhook.latestSentAt?.toISOString(), latestSentAt: webhook.latestSentAt ? webhook.latestSentAt.toISOString() : null,
latestStatus: webhook.latestStatus, latestStatus: webhook.latestStatus,
}; };
}); });

View file

@ -73,7 +73,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
url: webhook.url, url: webhook.url,
secret: webhook.secret, secret: webhook.secret,
active: webhook.active, active: webhook.active,
latestSentAt: webhook.latestSentAt?.toISOString(), latestSentAt: webhook.latestSentAt ? webhook.latestSentAt.toISOString() : null,
latestStatus: webhook.latestStatus, latestStatus: webhook.latestStatus,
} }
)); ));

View file

@ -85,7 +85,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
url: webhook.url, url: webhook.url,
secret: webhook.secret, secret: webhook.secret,
active: webhook.active, active: webhook.active,
latestSentAt: webhook.latestSentAt?.toISOString(), latestSentAt: webhook.latestSentAt ? webhook.latestSentAt.toISOString() : null,
latestStatus: webhook.latestStatus, latestStatus: webhook.latestStatus,
}; };
}); });

View file

@ -47,7 +47,7 @@ export const meta = {
bothWithRepliesAndWithFiles: { bothWithRepliesAndWithFiles: {
message: 'Specifying both withReplies and withFiles is not supported', message: 'Specifying both withReplies and withFiles is not supported',
code: 'BOTH_WITH_REPLIES_AND_WITH_FILES', code: 'BOTH_WITH_REPLIES_AND_WITH_FILES',
id: 'dfaa3eb7-8002-4cb7-bcc4-1095df46656f', id: 'dfaa3eb7-8002-4cb7-bcc4-1095df46656f'
}, },
}, },
} as const; } as const;

View file

@ -14,9 +14,6 @@ export const meta = {
errors: { errors: {
}, },
res: {
},
} as const; } as const;
export const paramDef = { export const paramDef = {

View file

@ -30,6 +30,9 @@ export const meta = {
}, },
res: { res: {
type: 'object',
optional: true,
ref: 'ReversiGameDetailed',
}, },
} as const; } as const;

View file

@ -19,20 +19,24 @@ export const meta = {
id: { id: {
type: 'string', type: 'string',
format: 'misskey:id', format: 'misskey:id',
optional: true, nullable: false,
}, },
required: { required: {
type: 'boolean', type: 'boolean',
optional: false, nullable: false,
}, },
string: { string: {
type: 'string', type: 'string',
optional: true, nullable: false,
}, },
default: { default: {
type: 'string', type: 'string',
optional: true, nullable: false,
}, },
nullableDefault: { nullableDefault: {
type: 'string', type: 'string',
default: 'hello', default: 'hello',
nullable: true, optional: true, nullable: true,
}, },
}, },
}, },

View file

@ -7,10 +7,11 @@ process.env.NODE_ENV = 'test';
import * as assert from 'assert'; import * as assert from 'assert';
import { MiNote } from '@/models/Note.js'; import { MiNote } from '@/models/Note.js';
import type { Packed } from '@/misc/json-schema.js';
import { api, initTestDb, makeStreamCatcher, post, signup, uploadFile } from '../utils.js'; import { api, initTestDb, makeStreamCatcher, post, signup, uploadFile } from '../utils.js';
import type * as misskey from 'misskey-js'; import type * as misskey from 'misskey-js';
import type{ Repository } from 'typeorm'; import type{ Repository } from 'typeorm'
import type { Packed } from '@/misc/json-schema.js';
describe('Drive', () => { describe('Drive', () => {
let Notes: Repository<MiNote>; let Notes: Repository<MiNote>;
@ -30,7 +31,7 @@ describe('Drive', () => {
const marker = Math.random().toString(); const marker = Math.random().toString();
const url = 'https://raw.githubusercontent.com/misskey-dev/misskey/develop/packages/backend/test/resources/Lenna.jpg'; const url = 'https://raw.githubusercontent.com/misskey-dev/misskey/develop/packages/backend/test/resources/Lenna.jpg'
const catcher = makeStreamCatcher( const catcher = makeStreamCatcher(
alice, alice,
@ -50,7 +51,7 @@ describe('Drive', () => {
assert.strictEqual(res.status, 204); assert.strictEqual(res.status, 204);
assert.strictEqual(file.name, 'Lenna.jpg'); assert.strictEqual(file.name, 'Lenna.jpg');
assert.strictEqual(file.type, 'image/jpeg'); assert.strictEqual(file.type, 'image/jpeg');
}); })
test('ローカルからアップロードできる', async () => { test('ローカルからアップロードできる', async () => {
// APIレスポンスを直接使用するので utils.js uploadFile が通過することで成功とする // APIレスポンスを直接使用するので utils.js uploadFile が通過することで成功とする
@ -58,27 +59,27 @@ describe('Drive', () => {
const res = await uploadFile(alice, { path: 'Lenna.jpg', name: 'テスト画像' }); const res = await uploadFile(alice, { path: 'Lenna.jpg', name: 'テスト画像' });
assert.strictEqual(res.body?.name, 'テスト画像.jpg'); assert.strictEqual(res.body?.name, 'テスト画像.jpg');
assert.strictEqual(res.body.type, 'image/jpeg'); assert.strictEqual(res.body?.type, 'image/jpeg');
}); })
test('添付ノート一覧を取得できる', async () => { test('添付ノート一覧を取得できる', async () => {
const ids = (await Promise.all([uploadFile(alice), uploadFile(alice), uploadFile(alice)])).map(elm => elm.body!.id); const ids = (await Promise.all([uploadFile(alice), uploadFile(alice), uploadFile(alice)])).map(elm => elm.body!.id)
const note0 = await post(alice, { fileIds: [ids[0]] }); const note0 = await post(alice, { fileIds: [ids[0]] });
const note1 = await post(alice, { fileIds: [ids[0], ids[1]] }); const note1 = await post(alice, { fileIds: [ids[0], ids[1]] });
const attached0 = await api('drive/files/attached-notes', { fileId: ids[0] }, alice); const attached0 = await api('drive/files/attached-notes', { fileId: ids[0] }, alice);
assert.strictEqual(attached0.body.length, 2); assert.strictEqual(attached0.body.length, 2);
assert.strictEqual(attached0.body[0].id, note1.id); assert.strictEqual(attached0.body[0].id, note1.id)
assert.strictEqual(attached0.body[1].id, note0.id); assert.strictEqual(attached0.body[1].id, note0.id)
const attached1 = await api('drive/files/attached-notes', { fileId: ids[1] }, alice); const attached1 = await api('drive/files/attached-notes', { fileId: ids[1] }, alice);
assert.strictEqual(attached1.body.length, 1); assert.strictEqual(attached1.body.length, 1);
assert.strictEqual(attached1.body[0].id, note1.id); assert.strictEqual(attached1.body[0].id, note1.id)
const attached2 = await api('drive/files/attached-notes', { fileId: ids[2] }, alice); const attached2 = await api('drive/files/attached-notes', { fileId: ids[2] }, alice);
assert.strictEqual(attached2.body.length, 0); assert.strictEqual(attached2.body.length, 0)
}); })
test('添付ノート一覧は他の人から見えない', async () => { test('添付ノート一覧は他の人から見えない', async () => {
const file = await uploadFile(alice); const file = await uploadFile(alice);
@ -88,6 +89,7 @@ describe('Drive', () => {
const res = await api('drive/files/attached-notes', { fileId: file.body!.id }, bob); const res = await api('drive/files/attached-notes', { fileId: file.body!.id }, bob);
assert.strictEqual(res.status, 400); assert.strictEqual(res.status, 400);
assert.strictEqual('error' in res.body, true); assert.strictEqual('error' in res.body, true);
});
})
}); });

View file

@ -13,10 +13,10 @@ import fetch, { File, RequestInit } from 'node-fetch';
import { DataSource } from 'typeorm'; import { DataSource } from 'typeorm';
import { JSDOM } from 'jsdom'; import { JSDOM } from 'jsdom';
import { DEFAULT_POLICIES } from '@/core/RoleService.js'; import { DEFAULT_POLICIES } from '@/core/RoleService.js';
import { Packed } from '@/misc/json-schema.js';
import { entities } from '../src/postgres.js'; import { entities } from '../src/postgres.js';
import { loadConfig } from '../src/config.js'; import { loadConfig } from '../src/config.js';
import type * as misskey from 'misskey-js'; import type * as misskey from 'misskey-js';
import { Packed } from '@/misc/json-schema.js';
export { server as startServer, jobQueue as startJobQueue } from '@/boot/common.js'; export { server as startServer, jobQueue as startJobQueue } from '@/boot/common.js';
@ -124,8 +124,8 @@ function timeoutPromise<T>(p: Promise<T>, timeout: number): Promise<T> {
return Promise.race([ return Promise.race([
p, p,
new Promise((reject) =>{ new Promise((reject) =>{
setTimeout(() => { reject(new Error('timed out')); }, timeout); setTimeout(() => { reject(new Error('timed out')); }, timeout)
}) as never, }) as never
]); ]);
} }
@ -343,7 +343,7 @@ export const uploadUrl = async (user: UserToken, url: string): Promise<Packed<'D
'main', 'main',
(msg) => msg.type === 'urlUploadFinished' && msg.body.marker === marker, (msg) => msg.type === 'urlUploadFinished' && msg.body.marker === marker,
(msg) => msg.body.file as Packed<'DriveFile'>, (msg) => msg.body.file as Packed<'DriveFile'>,
60 * 1000, 60 * 1000
); );
await api('drive/files/upload-from-url', { await api('drive/files/upload-from-url', {
@ -439,15 +439,15 @@ export function makeStreamCatcher<T>(
cond: (message: Record<string, any>) => boolean, cond: (message: Record<string, any>) => boolean,
extractor: (message: Record<string, any>) => T, extractor: (message: Record<string, any>) => T,
timeout = 60 * 1000): Promise<T> { timeout = 60 * 1000): Promise<T> {
let ws: WebSocket; let ws: WebSocket
const p = new Promise<T>(async (resolve) => { const p = new Promise<T>(async (resolve) => {
ws = await connectStream(user, channel, (msg) => { ws = await connectStream(user, channel, (msg) => {
if (cond(msg)) { if (cond(msg)) {
resolve(extractor(msg)); resolve(extractor(msg))
} }
}); });
}).finally(() => { }).finally(() => {
ws.close(); ws?.close();
}); });
return timeoutPromise(p, timeout); return timeoutPromise(p, timeout);

View file

@ -3,25 +3,28 @@
* SPDX-License-Identifier: AGPL-3.0-only * SPDX-License-Identifier: AGPL-3.0-only
*/ */
import { resolve } from 'node:path'; import { createRequire } from 'node:module';
import { dirname, join, resolve } from 'node:path';
import { fileURLToPath } from 'node:url'; import { fileURLToPath } from 'node:url';
import type { StorybookConfig } from '@storybook/vue3-vite'; import type { StorybookConfig } from '@storybook/vue3-vite';
import { type Plugin, mergeConfig } from 'vite'; import { type Plugin, mergeConfig } from 'vite';
import turbosnap from 'vite-plugin-turbosnap'; import turbosnap from 'vite-plugin-turbosnap';
const dirname = fileURLToPath(new URL('.', import.meta.url)); const require = createRequire(import.meta.url);
const _dirname = fileURLToPath(new URL('.', import.meta.url));
const config = { const config = {
stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|ts|tsx)'], stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|ts|tsx)'],
addons: [ addons: [
'@storybook/addon-essentials', getAbsolutePath('@storybook/addon-essentials'),
'@storybook/addon-interactions', getAbsolutePath('@storybook/addon-interactions'),
'@storybook/addon-links', getAbsolutePath('@storybook/addon-links'),
'@storybook/addon-storysource', getAbsolutePath('@storybook/addon-storysource'),
resolve(dirname, '../node_modules/storybook-addon-misskey-theme'), getAbsolutePath('@storybook/addon-mdx-gfm'),
resolve(_dirname, '../node_modules/storybook-addon-misskey-theme'),
], ],
framework: { framework: {
name: '@storybook/vue3-vite', name: getAbsolutePath('@storybook/vue3-vite') as '@storybook/vue3-vite',
options: {}, options: {},
}, },
docs: { docs: {
@ -37,10 +40,13 @@ const config = {
} }
return mergeConfig(config, { return mergeConfig(config, {
plugins: [ plugins: [
{
// XXX: https://github.com/IanVS/vite-plugin-turbosnap/issues/8 // XXX: https://github.com/IanVS/vite-plugin-turbosnap/issues/8
(turbosnap as any as typeof turbosnap['default'])({ ...(turbosnap as any as typeof turbosnap['default'])({
rootDir: config.root ?? process.cwd(), rootDir: config.root ?? process.cwd(),
}), }),
name: 'fake-turbosnap',
},
], ],
build: { build: {
target: [ target: [
@ -53,3 +59,7 @@ const config = {
}, },
} satisfies StorybookConfig; } satisfies StorybookConfig;
export default config; export default config;
function getAbsolutePath(value: string): string {
return dirname(require.resolve(join(value, 'package.json')));
}

View file

@ -3,8 +3,8 @@
* SPDX-License-Identifier: AGPL-3.0-only * SPDX-License-Identifier: AGPL-3.0-only
*/ */
import { addons } from '@storybook/addons';
import { FORCE_REMOUNT } from '@storybook/core-events'; import { FORCE_REMOUNT } from '@storybook/core-events';
import { addons } from '@storybook/preview-api';
import { type Preview, setup } from '@storybook/vue3'; import { type Preview, setup } from '@storybook/vue3';
import isChromatic from 'chromatic/isChromatic'; import isChromatic from 'chromatic/isChromatic';
import { initialize, mswDecorator } from 'msw-storybook-addon'; import { initialize, mswDecorator } from 'msw-storybook-addon';

View file

@ -8,7 +8,7 @@
"build": "vite build", "build": "vite build",
"storybook-dev": "nodemon --verbose --watch src --ext \"mdx,ts,vue\" --ignore \"*.stories.ts\" --exec \"pnpm build-storybook-pre && pnpm exec storybook dev -p 6006 --ci\"", "storybook-dev": "nodemon --verbose --watch src --ext \"mdx,ts,vue\" --ignore \"*.stories.ts\" --exec \"pnpm build-storybook-pre && pnpm exec storybook dev -p 6006 --ci\"",
"build-storybook-pre": "(tsc -p .storybook || echo done.) && node .storybook/generate.js && node .storybook/preload-locale.js && node .storybook/preload-theme.js", "build-storybook-pre": "(tsc -p .storybook || echo done.) && node .storybook/generate.js && node .storybook/preload-locale.js && node .storybook/preload-theme.js",
"build-storybook": "pnpm build-storybook-pre && storybook build", "build-storybook": "pnpm build-storybook-pre && storybook build --webpack-stats-json storybook-static",
"chromatic": "chromatic", "chromatic": "chromatic",
"test": "vitest --run --globals", "test": "vitest --run --globals",
"test-and-coverage": "vitest --run --coverage --globals", "test-and-coverage": "vitest --run --coverage --globals",
@ -78,24 +78,24 @@
"devDependencies": { "devDependencies": {
"@misskey-dev/eslint-plugin": "1.0.0", "@misskey-dev/eslint-plugin": "1.0.0",
"@misskey-dev/summaly": "5.0.3", "@misskey-dev/summaly": "5.0.3",
"@storybook/addon-actions": "7.6.10", "@storybook/addon-actions": "8.0.0-beta.2",
"@storybook/addon-essentials": "7.6.10", "@storybook/addon-essentials": "8.0.0-beta.2",
"@storybook/addon-interactions": "7.6.10", "@storybook/addon-interactions": "8.0.0-beta.2",
"@storybook/addon-links": "7.6.10", "@storybook/addon-links": "8.0.0-beta.2",
"@storybook/addon-storysource": "7.6.10", "@storybook/addon-mdx-gfm": "8.0.0-beta.2",
"@storybook/addons": "7.6.10", "@storybook/addon-storysource": "8.0.0-beta.2",
"@storybook/blocks": "7.6.10", "@storybook/blocks": "8.0.0-beta.2",
"@storybook/core-events": "7.6.10", "@storybook/components": "8.0.0-beta.2",
"@storybook/jest": "0.2.3", "@storybook/core-events": "8.0.0-beta.2",
"@storybook/manager-api": "7.6.10", "@storybook/manager-api": "8.0.0-beta.2",
"@storybook/preview-api": "7.6.10", "@storybook/preview-api": "8.0.0-beta.2",
"@storybook/react": "7.6.10", "@storybook/react": "8.0.0-beta.2",
"@storybook/react-vite": "7.6.10", "@storybook/react-vite": "8.0.0-beta.2",
"@storybook/testing-library": "0.2.2", "@storybook/test": "8.0.0-beta.2",
"@storybook/theming": "7.6.10", "@storybook/theming": "8.0.0-beta.2",
"@storybook/types": "7.6.10", "@storybook/types": "8.0.0-beta.2",
"@storybook/vue3": "7.6.10", "@storybook/vue3": "8.0.0-beta.2",
"@storybook/vue3-vite": "7.6.10", "@storybook/vue3-vite": "8.0.0-beta.2",
"@testing-library/vue": "8.0.2", "@testing-library/vue": "8.0.2",
"@types/escape-regexp": "0.0.3", "@types/escape-regexp": "0.0.3",
"@types/estree": "1.0.5", "@types/estree": "1.0.5",
@ -129,12 +129,12 @@
"react": "18.2.0", "react": "18.2.0",
"react-dom": "18.2.0", "react-dom": "18.2.0",
"start-server-and-test": "2.0.3", "start-server-and-test": "2.0.3",
"storybook": "7.6.10", "storybook": "8.0.0-beta.2",
"storybook-addon-misskey-theme": "github:misskey-dev/storybook-addon-misskey-theme", "storybook-addon-misskey-theme": "github:misskey-dev/storybook-addon-misskey-theme",
"vite-plugin-turbosnap": "1.0.3", "vite-plugin-turbosnap": "1.0.3",
"vitest": "0.34.6", "vitest": "0.34.6",
"vitest-fetch-mock": "0.2.2", "vitest-fetch-mock": "0.2.2",
"vue-component-type-helpers": "^1.8.27", "vue-component-type-helpers": "1.8.27",
"vue-eslint-parser": "9.4.2", "vue-eslint-parser": "9.4.2",
"vue-tsc": "1.8.27" "vue-tsc": "1.8.27"
} }

View file

@ -5,8 +5,7 @@
/* eslint-disable @typescript-eslint/explicit-function-return-type */ /* eslint-disable @typescript-eslint/explicit-function-return-type */
import { action } from '@storybook/addon-actions'; import { action } from '@storybook/addon-actions';
import { expect } from '@storybook/jest'; import { expect, userEvent, waitFor, within } from '@storybook/test';
import { userEvent, waitFor, within } from '@storybook/testing-library';
import { StoryObj } from '@storybook/vue3'; import { StoryObj } from '@storybook/vue3';
import { HttpResponse, http } from 'msw'; import { HttpResponse, http } from 'msw';
import { userDetailed } from '../../.storybook/fakes.js'; import { userDetailed } from '../../.storybook/fakes.js';

View file

@ -123,7 +123,7 @@ function callback(response?: string) {
function onReceivedMessage(message: MessageEvent) { function onReceivedMessage(message: MessageEvent) {
if (message.data.token) { if (message.data.token) {
if (props.instanceUrl && new URL(message.origin).host === new URL(props.instanceUrl).host) { if (props.instanceUrl && new URL(message.origin).host === new URL(props.instanceUrl).host) {
callback(<string>message.data.token); callback(message.data.token);
} }
} }
} }

View file

@ -4,8 +4,7 @@
*/ */
/* eslint-disable @typescript-eslint/explicit-function-return-type */ /* eslint-disable @typescript-eslint/explicit-function-return-type */
import { expect } from '@storybook/jest'; import { expect, userEvent, waitFor, within } from '@storybook/test';
import { userEvent, waitFor, within } from '@storybook/testing-library';
import { StoryObj } from '@storybook/vue3'; import { StoryObj } from '@storybook/vue3';
import { galleryPost } from '../../.storybook/fakes.js'; import { galleryPost } from '../../.storybook/fakes.js';
import MkGalleryPostPreview from './MkGalleryPostPreview.vue'; import MkGalleryPostPreview from './MkGalleryPostPreview.vue';

View file

@ -4,8 +4,7 @@
*/ */
/* eslint-disable @typescript-eslint/explicit-function-return-type */ /* eslint-disable @typescript-eslint/explicit-function-return-type */
import { expect } from '@storybook/jest'; import { expect, userEvent, waitFor, within } from '@storybook/test';
import { userEvent, waitFor, within } from '@storybook/testing-library';
import { StoryObj } from '@storybook/vue3'; import { StoryObj } from '@storybook/vue3';
import { onBeforeUnmount } from 'vue'; import { onBeforeUnmount } from 'vue';
import MkSignupServerRules from './MkSignupDialog.rules.vue'; import MkSignupServerRules from './MkSignupDialog.rules.vue';

View file

@ -4,8 +4,7 @@
*/ */
/* eslint-disable @typescript-eslint/explicit-function-return-type */ /* eslint-disable @typescript-eslint/explicit-function-return-type */
import { expect } from '@storybook/jest'; import { expect, userEvent, within } from '@storybook/test';
import { userEvent, within } from '@storybook/testing-library';
import { StoryObj } from '@storybook/vue3'; import { StoryObj } from '@storybook/vue3';
import MkA from './MkA.vue'; import MkA from './MkA.vue';
import { tick } from '@/scripts/test-utils.js'; import { tick } from '@/scripts/test-utils.js';

View file

@ -5,8 +5,7 @@
/* eslint-disable @typescript-eslint/explicit-function-return-type */ /* eslint-disable @typescript-eslint/explicit-function-return-type */
import { action } from '@storybook/addon-actions'; import { action } from '@storybook/addon-actions';
import { expect } from '@storybook/jest'; import { expect, waitFor } from '@storybook/test';
import { waitFor } from '@storybook/testing-library';
import { StoryObj } from '@storybook/vue3'; import { StoryObj } from '@storybook/vue3';
import MkError from './MkError.vue'; import MkError from './MkError.vue';
export const Default = { export const Default = {

View file

@ -5,8 +5,7 @@
/* eslint-disable @typescript-eslint/explicit-function-return-type */ /* eslint-disable @typescript-eslint/explicit-function-return-type */
import { StoryObj } from '@storybook/vue3'; import { StoryObj } from '@storybook/vue3';
import { within } from '@storybook/testing-library'; import { expect, within } from '@storybook/test';
import { expect } from '@storybook/jest';
import MkMisskeyFlavoredMarkdown from './MkMisskeyFlavoredMarkdown.js'; import MkMisskeyFlavoredMarkdown from './MkMisskeyFlavoredMarkdown.js';
export const Default = { export const Default = {
render(args) { render(args) {

View file

@ -4,7 +4,7 @@
*/ */
/* eslint-disable @typescript-eslint/explicit-function-return-type */ /* eslint-disable @typescript-eslint/explicit-function-return-type */
import { waitFor } from '@storybook/testing-library'; import { waitFor } from '@storybook/test';
import { StoryObj } from '@storybook/vue3'; import { StoryObj } from '@storybook/vue3';
import MkPageHeader from './MkPageHeader.vue'; import MkPageHeader from './MkPageHeader.vue';
export const Empty = { export const Empty = {

View file

@ -4,7 +4,7 @@
*/ */
/* eslint-disable @typescript-eslint/explicit-function-return-type */ /* eslint-disable @typescript-eslint/explicit-function-return-type */
import { expect } from '@storybook/jest'; import { expect } from '@storybook/test';
import { StoryObj } from '@storybook/vue3'; import { StoryObj } from '@storybook/vue3';
import MkTime from './MkTime.vue'; import MkTime from './MkTime.vue';
import { i18n } from '@/i18n.js'; import { i18n } from '@/i18n.js';

View file

@ -4,8 +4,7 @@
*/ */
/* eslint-disable @typescript-eslint/explicit-function-return-type */ /* eslint-disable @typescript-eslint/explicit-function-return-type */
import { expect } from '@storybook/jest'; import { expect, userEvent, waitFor, within } from '@storybook/test';
import { userEvent, waitFor, within } from '@storybook/testing-library';
import { StoryObj } from '@storybook/vue3'; import { StoryObj } from '@storybook/vue3';
import { HttpResponse, http } from 'msw'; import { HttpResponse, http } from 'msw';
import { commonHandlers } from '../../../.storybook/mocks.js'; import { commonHandlers } from '../../../.storybook/mocks.js';

View file

@ -4,7 +4,7 @@
*/ */
/* eslint-disable @typescript-eslint/explicit-function-return-type */ /* eslint-disable @typescript-eslint/explicit-function-return-type */
import { expect } from '@storybook/jest'; import { expect } from '@storybook/test';
import { StoryObj } from '@storybook/vue3'; import { StoryObj } from '@storybook/vue3';
import { userDetailed } from '../../../.storybook/fakes.js'; import { userDetailed } from '../../../.storybook/fakes.js';
import MkUserName from './MkUserName.vue'; import MkUserName from './MkUserName.vue';

View file

@ -17,7 +17,7 @@ SPDX-License-Identifier: AGPL-3.0-only
<div>{{ i18n.ts.youShouldUpgradeClient }}</div> <div>{{ i18n.ts.youShouldUpgradeClient }}</div>
<MkButton style="margin: 8px auto;" @click="reload">{{ i18n.ts.reload }}</MkButton> <MkButton style="margin: 8px auto;" @click="reload">{{ i18n.ts.reload }}</MkButton>
</template> </template>
<div><MkA to="/docs/general/troubleshooting" class="_link">{{ i18n.ts.troubleshooting }}</MkA></div> <div><MkLink url="https://misskey-hub.net/docs/for-users/resources/troubleshooting/" target="_blank">{{ i18n.ts.troubleshooting }}</MkLink></div>
<div v-if="error" style="opacity: 0.7;">ERROR: {{ error }}</div> <div v-if="error" style="opacity: 0.7;">ERROR: {{ error }}</div>
</div> </div>
</div> </div>
@ -28,6 +28,7 @@ SPDX-License-Identifier: AGPL-3.0-only
import { ref, computed } from 'vue'; import { ref, computed } from 'vue';
import * as Misskey from 'misskey-js'; import * as Misskey from 'misskey-js';
import MkButton from '@/components/MkButton.vue'; import MkButton from '@/components/MkButton.vue';
import MkLink from '@/components/MkLink.vue';
import { version } from '@/config.js'; import { version } from '@/config.js';
import { misskeyApi } from '@/scripts/misskey-api.js'; import { misskeyApi } from '@/scripts/misskey-api.js';
import { unisonReload } from '@/scripts/unison-reload.js'; import { unisonReload } from '@/scripts/unison-reload.js';

View file

@ -101,7 +101,7 @@ const announcements = {
limit: 10, limit: 10,
}; };
const isTimelineAvailable = ref(instance.policies.ltlAvailable || instance.policies.gtlAvailable); const isTimelineAvailable = ref(instance.policies?.ltlAvailable || instance.policies?.gtlAvailable);
const showMenu = ref(false); const showMenu = ref(false);
const isDesktop = ref(window.innerWidth >= DESKTOP_THRESHOLD); const isDesktop = ref(window.innerWidth >= DESKTOP_THRESHOLD);

View file

@ -103,9 +103,6 @@ type AdminAvatarDecorationsUpdateRequest = operations['admin/avatar-decorations/
// @public (undocumented) // @public (undocumented)
type AdminDeleteAccountRequest = operations['admin/delete-account']['requestBody']['content']['application/json']; type AdminDeleteAccountRequest = operations['admin/delete-account']['requestBody']['content']['application/json'];
// @public (undocumented)
type AdminDeleteAccountResponse = operations['admin/delete-account']['responses']['200']['content']['application/json'];
// @public (undocumented) // @public (undocumented)
type AdminDeleteAllFilesOfAUserRequest = operations['admin/delete-all-files-of-a-user']['requestBody']['content']['application/json']; type AdminDeleteAllFilesOfAUserRequest = operations['admin/delete-all-files-of-a-user']['requestBody']['content']['application/json'];
@ -482,9 +479,6 @@ type BubbleGameRankingResponse = operations['bubble-game/ranking']['responses'][
// @public (undocumented) // @public (undocumented)
type BubbleGameRegisterRequest = operations['bubble-game/register']['requestBody']['content']['application/json']; type BubbleGameRegisterRequest = operations['bubble-game/register']['requestBody']['content']['application/json'];
// @public (undocumented)
type BubbleGameRegisterResponse = operations['bubble-game/register']['responses']['200']['content']['application/json'];
// @public (undocumented) // @public (undocumented)
type Channel = components['schemas']['Channel']; type Channel = components['schemas']['Channel'];
@ -1210,7 +1204,6 @@ declare namespace entities {
AdminUnsuspendUserRequest, AdminUnsuspendUserRequest,
AdminUpdateMetaRequest, AdminUpdateMetaRequest,
AdminDeleteAccountRequest, AdminDeleteAccountRequest,
AdminDeleteAccountResponse,
AdminUpdateUserNoteRequest, AdminUpdateUserNoteRequest,
AdminRolesCreateRequest, AdminRolesCreateRequest,
AdminRolesCreateResponse, AdminRolesCreateResponse,
@ -1408,6 +1401,7 @@ declare namespace entities {
HashtagsUsersResponse, HashtagsUsersResponse,
IResponse, IResponse,
I2faDoneRequest, I2faDoneRequest,
I2faDoneResponse,
I2faKeyDoneRequest, I2faKeyDoneRequest,
I2faKeyDoneResponse, I2faKeyDoneResponse,
I2faPasswordLessRequest, I2faPasswordLessRequest,
@ -1458,6 +1452,7 @@ declare namespace entities {
IRegistryKeysWithTypeRequest, IRegistryKeysWithTypeRequest,
IRegistryKeysWithTypeResponse, IRegistryKeysWithTypeResponse,
IRegistryKeysRequest, IRegistryKeysRequest,
IRegistryKeysResponse,
IRegistryRemoveRequest, IRegistryRemoveRequest,
IRegistryScopesWithDomainResponse, IRegistryScopesWithDomainResponse,
IRegistrySetRequest, IRegistrySetRequest,
@ -1661,11 +1656,9 @@ declare namespace entities {
FetchExternalResourcesResponse, FetchExternalResourcesResponse,
RetentionResponse, RetentionResponse,
BubbleGameRegisterRequest, BubbleGameRegisterRequest,
BubbleGameRegisterResponse,
BubbleGameRankingRequest, BubbleGameRankingRequest,
BubbleGameRankingResponse, BubbleGameRankingResponse,
ReversiCancelMatchRequest, ReversiCancelMatchRequest,
ReversiCancelMatchResponse,
ReversiGamesRequest, ReversiGamesRequest,
ReversiGamesResponse, ReversiGamesResponse,
ReversiMatchRequest, ReversiMatchRequest,
@ -1712,6 +1705,12 @@ declare namespace entities {
EmojiDetailed, EmojiDetailed,
Flash, Flash,
Signin, Signin,
RoleCondFormulaLogics,
RoleCondFormulaValueNot,
RoleCondFormulaValueIsLocalOrRemote,
RoleCondFormulaValueCreated,
RoleCondFormulaFollowersOrFollowingOrNotes,
RoleCondFormulaValue,
RoleLite, RoleLite,
Role, Role,
RolePolicies, RolePolicies,
@ -1972,6 +1971,9 @@ type HashtagsUsersResponse = operations['hashtags/users']['responses']['200']['c
// @public (undocumented) // @public (undocumented)
type I2faDoneRequest = operations['i/2fa/done']['requestBody']['content']['application/json']; type I2faDoneRequest = operations['i/2fa/done']['requestBody']['content']['application/json'];
// @public (undocumented)
type I2faDoneResponse = operations['i/2fa/done']['responses']['200']['content']['application/json'];
// @public (undocumented) // @public (undocumented)
type I2faKeyDoneRequest = operations['i/2fa/key-done']['requestBody']['content']['application/json']; type I2faKeyDoneRequest = operations['i/2fa/key-done']['requestBody']['content']['application/json'];
@ -2143,6 +2145,9 @@ type IRegistryGetResponse = operations['i/registry/get']['responses']['200']['co
// @public (undocumented) // @public (undocumented)
type IRegistryKeysRequest = operations['i/registry/keys']['requestBody']['content']['application/json']; type IRegistryKeysRequest = operations['i/registry/keys']['requestBody']['content']['application/json'];
// @public (undocumented)
type IRegistryKeysResponse = operations['i/registry/keys']['responses']['200']['content']['application/json'];
// @public (undocumented) // @public (undocumented)
type IRegistryKeysWithTypeRequest = operations['i/registry/keys-with-type']['requestBody']['content']['application/json']; type IRegistryKeysWithTypeRequest = operations['i/registry/keys-with-type']['requestBody']['content']['application/json'];
@ -2659,9 +2664,6 @@ type RetentionResponse = operations['retention']['responses']['200']['content'][
// @public (undocumented) // @public (undocumented)
type ReversiCancelMatchRequest = operations['reversi/cancel-match']['requestBody']['content']['application/json']; type ReversiCancelMatchRequest = operations['reversi/cancel-match']['requestBody']['content']['application/json'];
// @public (undocumented)
type ReversiCancelMatchResponse = operations['reversi/cancel-match']['responses']['200']['content']['application/json'];
// @public (undocumented) // @public (undocumented)
type ReversiGameDetailed = components['schemas']['ReversiGameDetailed']; type ReversiGameDetailed = components['schemas']['ReversiGameDetailed'];
@ -2701,6 +2703,24 @@ type ReversiVerifyResponse = operations['reversi/verify']['responses']['200']['c
// @public (undocumented) // @public (undocumented)
type Role = components['schemas']['Role']; type Role = components['schemas']['Role'];
// @public (undocumented)
type RoleCondFormulaFollowersOrFollowingOrNotes = components['schemas']['RoleCondFormulaFollowersOrFollowingOrNotes'];
// @public (undocumented)
type RoleCondFormulaLogics = components['schemas']['RoleCondFormulaLogics'];
// @public (undocumented)
type RoleCondFormulaValue = components['schemas']['RoleCondFormulaValue'];
// @public (undocumented)
type RoleCondFormulaValueCreated = components['schemas']['RoleCondFormulaValueCreated'];
// @public (undocumented)
type RoleCondFormulaValueIsLocalOrRemote = components['schemas']['RoleCondFormulaValueIsLocalOrRemote'];
// @public (undocumented)
type RoleCondFormulaValueNot = components['schemas']['RoleCondFormulaValueNot'];
// @public (undocumented) // @public (undocumented)
type RoleLite = components['schemas']['RoleLite']; type RoleLite = components['schemas']['RoleLite'];

View file

@ -85,7 +85,6 @@ import type {
AdminUnsuspendUserRequest, AdminUnsuspendUserRequest,
AdminUpdateMetaRequest, AdminUpdateMetaRequest,
AdminDeleteAccountRequest, AdminDeleteAccountRequest,
AdminDeleteAccountResponse,
AdminUpdateUserNoteRequest, AdminUpdateUserNoteRequest,
AdminRolesCreateRequest, AdminRolesCreateRequest,
AdminRolesCreateResponse, AdminRolesCreateResponse,
@ -283,6 +282,7 @@ import type {
HashtagsUsersResponse, HashtagsUsersResponse,
IResponse, IResponse,
I2faDoneRequest, I2faDoneRequest,
I2faDoneResponse,
I2faKeyDoneRequest, I2faKeyDoneRequest,
I2faKeyDoneResponse, I2faKeyDoneResponse,
I2faPasswordLessRequest, I2faPasswordLessRequest,
@ -333,6 +333,7 @@ import type {
IRegistryKeysWithTypeRequest, IRegistryKeysWithTypeRequest,
IRegistryKeysWithTypeResponse, IRegistryKeysWithTypeResponse,
IRegistryKeysRequest, IRegistryKeysRequest,
IRegistryKeysResponse,
IRegistryRemoveRequest, IRegistryRemoveRequest,
IRegistryScopesWithDomainResponse, IRegistryScopesWithDomainResponse,
IRegistrySetRequest, IRegistrySetRequest,
@ -536,11 +537,9 @@ import type {
FetchExternalResourcesResponse, FetchExternalResourcesResponse,
RetentionResponse, RetentionResponse,
BubbleGameRegisterRequest, BubbleGameRegisterRequest,
BubbleGameRegisterResponse,
BubbleGameRankingRequest, BubbleGameRankingRequest,
BubbleGameRankingResponse, BubbleGameRankingResponse,
ReversiCancelMatchRequest, ReversiCancelMatchRequest,
ReversiCancelMatchResponse,
ReversiGamesRequest, ReversiGamesRequest,
ReversiGamesResponse, ReversiGamesResponse,
ReversiMatchRequest, ReversiMatchRequest,
@ -619,7 +618,7 @@ export type Endpoints = {
'admin/suspend-user': { req: AdminSuspendUserRequest; res: EmptyResponse }; 'admin/suspend-user': { req: AdminSuspendUserRequest; 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: EmptyResponse };
'admin/update-user-note': { req: AdminUpdateUserNoteRequest; res: EmptyResponse }; 'admin/update-user-note': { req: AdminUpdateUserNoteRequest; res: EmptyResponse };
'admin/roles/create': { req: AdminRolesCreateRequest; res: AdminRolesCreateResponse }; 'admin/roles/create': { req: AdminRolesCreateRequest; res: AdminRolesCreateResponse };
'admin/roles/delete': { req: AdminRolesDeleteRequest; res: EmptyResponse }; 'admin/roles/delete': { req: AdminRolesDeleteRequest; res: EmptyResponse };
@ -739,7 +738,7 @@ export type Endpoints = {
'hashtags/trend': { req: EmptyRequest; res: HashtagsTrendResponse }; 'hashtags/trend': { req: EmptyRequest; res: HashtagsTrendResponse };
'hashtags/users': { req: HashtagsUsersRequest; res: HashtagsUsersResponse }; 'hashtags/users': { req: HashtagsUsersRequest; res: HashtagsUsersResponse };
'i': { req: EmptyRequest; res: IResponse }; 'i': { req: EmptyRequest; res: IResponse };
'i/2fa/done': { req: I2faDoneRequest; res: EmptyResponse }; 'i/2fa/done': { req: I2faDoneRequest; res: I2faDoneResponse };
'i/2fa/key-done': { req: I2faKeyDoneRequest; res: I2faKeyDoneResponse }; 'i/2fa/key-done': { req: I2faKeyDoneRequest; res: I2faKeyDoneResponse };
'i/2fa/password-less': { req: I2faPasswordLessRequest; res: EmptyResponse }; 'i/2fa/password-less': { req: I2faPasswordLessRequest; res: EmptyResponse };
'i/2fa/register-key': { req: I2faRegisterKeyRequest; res: I2faRegisterKeyResponse }; 'i/2fa/register-key': { req: I2faRegisterKeyRequest; res: I2faRegisterKeyResponse };
@ -780,7 +779,7 @@ export type Endpoints = {
'i/registry/get-detail': { req: IRegistryGetDetailRequest; res: IRegistryGetDetailResponse }; 'i/registry/get-detail': { req: IRegistryGetDetailRequest; res: IRegistryGetDetailResponse };
'i/registry/get': { req: IRegistryGetRequest; res: IRegistryGetResponse }; 'i/registry/get': { req: IRegistryGetRequest; res: IRegistryGetResponse };
'i/registry/keys-with-type': { req: IRegistryKeysWithTypeRequest; res: IRegistryKeysWithTypeResponse }; 'i/registry/keys-with-type': { req: IRegistryKeysWithTypeRequest; res: IRegistryKeysWithTypeResponse };
'i/registry/keys': { req: IRegistryKeysRequest; res: EmptyResponse }; 'i/registry/keys': { req: IRegistryKeysRequest; res: IRegistryKeysResponse };
'i/registry/remove': { req: IRegistryRemoveRequest; res: EmptyResponse }; 'i/registry/remove': { req: IRegistryRemoveRequest; res: EmptyResponse };
'i/registry/scopes-with-domain': { req: EmptyRequest; res: IRegistryScopesWithDomainResponse }; 'i/registry/scopes-with-domain': { req: EmptyRequest; res: IRegistryScopesWithDomainResponse };
'i/registry/set': { req: IRegistrySetRequest; res: EmptyResponse }; 'i/registry/set': { req: IRegistrySetRequest; res: EmptyResponse };
@ -912,9 +911,9 @@ export type Endpoints = {
'fetch-rss': { req: FetchRssRequest; res: FetchRssResponse }; 'fetch-rss': { req: FetchRssRequest; res: FetchRssResponse };
'fetch-external-resources': { req: FetchExternalResourcesRequest; res: FetchExternalResourcesResponse }; 'fetch-external-resources': { req: FetchExternalResourcesRequest; res: FetchExternalResourcesResponse };
'retention': { req: EmptyRequest; res: RetentionResponse }; 'retention': { req: EmptyRequest; res: RetentionResponse };
'bubble-game/register': { req: BubbleGameRegisterRequest; res: BubbleGameRegisterResponse }; 'bubble-game/register': { req: BubbleGameRegisterRequest; res: EmptyResponse };
'bubble-game/ranking': { req: BubbleGameRankingRequest; res: BubbleGameRankingResponse }; 'bubble-game/ranking': { req: BubbleGameRankingRequest; res: BubbleGameRankingResponse };
'reversi/cancel-match': { req: ReversiCancelMatchRequest; res: ReversiCancelMatchResponse }; 'reversi/cancel-match': { req: ReversiCancelMatchRequest; res: EmptyResponse };
'reversi/games': { req: ReversiGamesRequest; res: ReversiGamesResponse }; 'reversi/games': { req: ReversiGamesRequest; res: ReversiGamesResponse };
'reversi/match': { req: ReversiMatchRequest; res: ReversiMatchResponse }; 'reversi/match': { req: ReversiMatchRequest; res: ReversiMatchResponse };
'reversi/invitations': { req: EmptyRequest; res: ReversiInvitationsResponse }; 'reversi/invitations': { req: EmptyRequest; res: ReversiInvitationsResponse };

View file

@ -87,7 +87,6 @@ export type AdminSuspendUserRequest = operations['admin/suspend-user']['requestB
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'];
export type AdminDeleteAccountResponse = operations['admin/delete-account']['responses']['200']['content']['application/json'];
export type AdminUpdateUserNoteRequest = operations['admin/update-user-note']['requestBody']['content']['application/json']; export type AdminUpdateUserNoteRequest = operations['admin/update-user-note']['requestBody']['content']['application/json'];
export type AdminRolesCreateRequest = operations['admin/roles/create']['requestBody']['content']['application/json']; export type AdminRolesCreateRequest = operations['admin/roles/create']['requestBody']['content']['application/json'];
export type AdminRolesCreateResponse = operations['admin/roles/create']['responses']['200']['content']['application/json']; export type AdminRolesCreateResponse = operations['admin/roles/create']['responses']['200']['content']['application/json'];
@ -285,6 +284,7 @@ export type HashtagsUsersRequest = operations['hashtags/users']['requestBody']['
export type HashtagsUsersResponse = operations['hashtags/users']['responses']['200']['content']['application/json']; export type HashtagsUsersResponse = operations['hashtags/users']['responses']['200']['content']['application/json'];
export type IResponse = operations['i']['responses']['200']['content']['application/json']; export type IResponse = operations['i']['responses']['200']['content']['application/json'];
export type I2faDoneRequest = operations['i/2fa/done']['requestBody']['content']['application/json']; export type I2faDoneRequest = operations['i/2fa/done']['requestBody']['content']['application/json'];
export type I2faDoneResponse = operations['i/2fa/done']['responses']['200']['content']['application/json'];
export type I2faKeyDoneRequest = operations['i/2fa/key-done']['requestBody']['content']['application/json']; export type I2faKeyDoneRequest = operations['i/2fa/key-done']['requestBody']['content']['application/json'];
export type I2faKeyDoneResponse = operations['i/2fa/key-done']['responses']['200']['content']['application/json']; export type I2faKeyDoneResponse = operations['i/2fa/key-done']['responses']['200']['content']['application/json'];
export type I2faPasswordLessRequest = operations['i/2fa/password-less']['requestBody']['content']['application/json']; export type I2faPasswordLessRequest = operations['i/2fa/password-less']['requestBody']['content']['application/json'];
@ -335,6 +335,7 @@ export type IRegistryGetResponse = operations['i/registry/get']['responses']['20
export type IRegistryKeysWithTypeRequest = operations['i/registry/keys-with-type']['requestBody']['content']['application/json']; export type IRegistryKeysWithTypeRequest = operations['i/registry/keys-with-type']['requestBody']['content']['application/json'];
export type IRegistryKeysWithTypeResponse = operations['i/registry/keys-with-type']['responses']['200']['content']['application/json']; export type IRegistryKeysWithTypeResponse = operations['i/registry/keys-with-type']['responses']['200']['content']['application/json'];
export type IRegistryKeysRequest = operations['i/registry/keys']['requestBody']['content']['application/json']; export type IRegistryKeysRequest = operations['i/registry/keys']['requestBody']['content']['application/json'];
export type IRegistryKeysResponse = operations['i/registry/keys']['responses']['200']['content']['application/json'];
export type IRegistryRemoveRequest = operations['i/registry/remove']['requestBody']['content']['application/json']; export type IRegistryRemoveRequest = operations['i/registry/remove']['requestBody']['content']['application/json'];
export type IRegistryScopesWithDomainResponse = operations['i/registry/scopes-with-domain']['responses']['200']['content']['application/json']; export type IRegistryScopesWithDomainResponse = operations['i/registry/scopes-with-domain']['responses']['200']['content']['application/json'];
export type IRegistrySetRequest = operations['i/registry/set']['requestBody']['content']['application/json']; export type IRegistrySetRequest = operations['i/registry/set']['requestBody']['content']['application/json'];
@ -538,11 +539,9 @@ export type FetchExternalResourcesRequest = operations['fetch-external-resources
export type FetchExternalResourcesResponse = operations['fetch-external-resources']['responses']['200']['content']['application/json']; export type FetchExternalResourcesResponse = operations['fetch-external-resources']['responses']['200']['content']['application/json'];
export type RetentionResponse = operations['retention']['responses']['200']['content']['application/json']; export type RetentionResponse = operations['retention']['responses']['200']['content']['application/json'];
export type BubbleGameRegisterRequest = operations['bubble-game/register']['requestBody']['content']['application/json']; export type BubbleGameRegisterRequest = operations['bubble-game/register']['requestBody']['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 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 ReversiGamesRequest = operations['reversi/games']['requestBody']['content']['application/json'];
export type ReversiGamesResponse = operations['reversi/games']['responses']['200']['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 ReversiMatchRequest = operations['reversi/match']['requestBody']['content']['application/json'];

View file

@ -35,6 +35,12 @@ export type EmojiSimple = components['schemas']['EmojiSimple'];
export type EmojiDetailed = components['schemas']['EmojiDetailed']; export type EmojiDetailed = components['schemas']['EmojiDetailed'];
export type Flash = components['schemas']['Flash']; export type Flash = components['schemas']['Flash'];
export type Signin = components['schemas']['Signin']; export type Signin = components['schemas']['Signin'];
export type RoleCondFormulaLogics = components['schemas']['RoleCondFormulaLogics'];
export type RoleCondFormulaValueNot = components['schemas']['RoleCondFormulaValueNot'];
export type RoleCondFormulaValueIsLocalOrRemote = components['schemas']['RoleCondFormulaValueIsLocalOrRemote'];
export type RoleCondFormulaValueCreated = components['schemas']['RoleCondFormulaValueCreated'];
export type RoleCondFormulaFollowersOrFollowingOrNotes = components['schemas']['RoleCondFormulaFollowersOrFollowingOrNotes'];
export type RoleCondFormulaValue = components['schemas']['RoleCondFormulaValue'];
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 RolePolicies = components['schemas']['RolePolicies']; export type RolePolicies = components['schemas']['RolePolicies'];

View file

@ -3696,42 +3696,132 @@ export type components = {
hardMutedWords: string[][]; hardMutedWords: string[][];
mutedInstances: string[] | null; mutedInstances: string[] | null;
notificationRecieveConfig: { notificationRecieveConfig: {
app?: { note?: OneOf<[{
/** @enum {string} */ /** @enum {string} */
type: 'all' | 'following' | 'follower' | 'mutualFollow' | 'list' | 'never'; type: 'all' | 'following' | 'follower' | 'mutualFollow' | 'never';
}; }, {
quote?: {
/** @enum {string} */ /** @enum {string} */
type: 'all' | 'following' | 'follower' | 'mutualFollow' | 'list' | 'never'; type: 'list';
}; /** Format: misskey:id */
reply?: { userListId: string;
}]>;
follow?: OneOf<[{
/** @enum {string} */ /** @enum {string} */
type: 'all' | 'following' | 'follower' | 'mutualFollow' | 'list' | 'never'; type: 'all' | 'following' | 'follower' | 'mutualFollow' | 'never';
}; }, {
follow?: {
/** @enum {string} */ /** @enum {string} */
type: 'all' | 'following' | 'follower' | 'mutualFollow' | 'list' | 'never'; type: 'list';
}; /** Format: misskey:id */
renote?: { userListId: string;
}]>;
mention?: OneOf<[{
/** @enum {string} */ /** @enum {string} */
type: 'all' | 'following' | 'follower' | 'mutualFollow' | 'list' | 'never'; type: 'all' | 'following' | 'follower' | 'mutualFollow' | 'never';
}; }, {
mention?: {
/** @enum {string} */ /** @enum {string} */
type: 'all' | 'following' | 'follower' | 'mutualFollow' | 'list' | 'never'; type: 'list';
}; /** Format: misskey:id */
reaction?: { userListId: string;
}]>;
reply?: OneOf<[{
/** @enum {string} */ /** @enum {string} */
type: 'all' | 'following' | 'follower' | 'mutualFollow' | 'list' | 'never'; type: 'all' | 'following' | 'follower' | 'mutualFollow' | 'never';
}; }, {
pollEnded?: {
/** @enum {string} */ /** @enum {string} */
type: 'all' | 'following' | 'follower' | 'mutualFollow' | 'list' | 'never'; type: 'list';
}; /** Format: misskey:id */
receiveFollowRequest?: { userListId: string;
}]>;
renote?: OneOf<[{
/** @enum {string} */ /** @enum {string} */
type: 'all' | 'following' | 'follower' | 'mutualFollow' | 'list' | 'never'; type: 'all' | 'following' | 'follower' | 'mutualFollow' | 'never';
}; }, {
/** @enum {string} */
type: 'list';
/** Format: misskey:id */
userListId: string;
}]>;
quote?: OneOf<[{
/** @enum {string} */
type: 'all' | 'following' | 'follower' | 'mutualFollow' | 'never';
}, {
/** @enum {string} */
type: 'list';
/** Format: misskey:id */
userListId: string;
}]>;
reaction?: OneOf<[{
/** @enum {string} */
type: 'all' | 'following' | 'follower' | 'mutualFollow' | 'never';
}, {
/** @enum {string} */
type: 'list';
/** Format: misskey:id */
userListId: string;
}]>;
pollEnded?: OneOf<[{
/** @enum {string} */
type: 'all' | 'following' | 'follower' | 'mutualFollow' | 'never';
}, {
/** @enum {string} */
type: 'list';
/** Format: misskey:id */
userListId: string;
}]>;
receiveFollowRequest?: OneOf<[{
/** @enum {string} */
type: 'all' | 'following' | 'follower' | 'mutualFollow' | 'never';
}, {
/** @enum {string} */
type: 'list';
/** Format: misskey:id */
userListId: string;
}]>;
followRequestAccepted?: OneOf<[{
/** @enum {string} */
type: 'all' | 'following' | 'follower' | 'mutualFollow' | 'never';
}, {
/** @enum {string} */
type: 'list';
/** Format: misskey:id */
userListId: string;
}]>;
roleAssigned?: OneOf<[{
/** @enum {string} */
type: 'all' | 'following' | 'follower' | 'mutualFollow' | 'never';
}, {
/** @enum {string} */
type: 'list';
/** Format: misskey:id */
userListId: string;
}]>;
achievementEarned?: OneOf<[{
/** @enum {string} */
type: 'all' | 'following' | 'follower' | 'mutualFollow' | 'never';
}, {
/** @enum {string} */
type: 'list';
/** Format: misskey:id */
userListId: string;
}]>;
app?: OneOf<[{
/** @enum {string} */
type: 'all' | 'following' | 'follower' | 'mutualFollow' | 'never';
}, {
/** @enum {string} */
type: 'list';
/** Format: misskey:id */
userListId: string;
}]>;
test?: OneOf<[{
/** @enum {string} */
type: 'all' | 'following' | 'follower' | 'mutualFollow' | 'never';
}, {
/** @enum {string} */
type: 'list';
/** Format: misskey:id */
userListId: string;
}]>;
}; };
emailNotificationTypes: string[]; emailNotificationTypes: string[];
achievements: { achievements: {
@ -4463,6 +4553,36 @@ export type components = {
headers: Record<string, never>; headers: Record<string, never>;
success: boolean; success: boolean;
}; };
RoleCondFormulaLogics: {
id: string;
/** @enum {string} */
type: 'and' | 'or';
values: components['schemas']['RoleCondFormulaValue'][];
};
RoleCondFormulaValueNot: {
id: string;
/** @enum {string} */
type: 'not';
value: components['schemas']['RoleCondFormulaValue'];
};
RoleCondFormulaValueIsLocalOrRemote: {
id: string;
/** @enum {string} */
type: 'isLocal' | 'isRemote';
};
RoleCondFormulaValueCreated: {
id: string;
/** @enum {string} */
type: 'createdLessThan' | 'createdMoreThan';
sec: number;
};
RoleCondFormulaFollowersOrFollowingOrNotes: {
id: string;
/** @enum {string} */
type: 'followersLessThanOrEq' | 'followersMoreThanOrEq' | 'followingLessThanOrEq' | 'followingMoreThanOrEq' | 'notesLessThanOrEq' | 'notesMoreThanOrEq';
value: number;
};
RoleCondFormulaValue: components['schemas']['RoleCondFormulaLogics'] | components['schemas']['RoleCondFormulaValueNot'] | components['schemas']['RoleCondFormulaValueIsLocalOrRemote'] | components['schemas']['RoleCondFormulaValueCreated'] | components['schemas']['RoleCondFormulaFollowersOrFollowingOrNotes'];
RoleLite: { RoleLite: {
/** /**
* Format: id * Format: id
@ -4489,7 +4609,7 @@ export type components = {
updatedAt: string; updatedAt: string;
/** @enum {string} */ /** @enum {string} */
target: 'manual' | 'conditional'; target: 'manual' | 'conditional';
condFormula: Record<string, never>; condFormula: components['schemas']['RoleCondFormulaValue'];
/** @example false */ /** @example false */
isPublic: boolean; isPublic: boolean;
/** @example false */ /** @example false */
@ -4548,11 +4668,11 @@ export type components = {
user1Id: string; user1Id: string;
/** Format: id */ /** Format: id */
user2Id: string; user2Id: string;
user1: components['schemas']['User']; user1: components['schemas']['UserLite'];
user2: components['schemas']['User']; user2: components['schemas']['UserLite'];
/** Format: id */ /** Format: id */
winnerId: string | null; winnerId: string | null;
winner: components['schemas']['User'] | null; winner: components['schemas']['UserLite'] | null;
/** Format: id */ /** Format: id */
surrenderedUserId: string | null; surrenderedUserId: string | null;
/** Format: id */ /** Format: id */
@ -4584,11 +4704,11 @@ export type components = {
user1Id: string; user1Id: string;
/** Format: id */ /** Format: id */
user2Id: string; user2Id: string;
user1: components['schemas']['User']; user1: components['schemas']['UserLite'];
user2: components['schemas']['User']; user2: components['schemas']['UserLite'];
/** Format: id */ /** Format: id */
winnerId: string | null; winnerId: string | null;
winner: components['schemas']['User'] | null; winner: components['schemas']['UserLite'] | null;
/** Format: id */ /** Format: id */
surrenderedUserId: string | null; surrenderedUserId: string | null;
/** Format: id */ /** Format: id */
@ -4600,7 +4720,7 @@ export type components = {
canPutEverywhere: boolean; canPutEverywhere: boolean;
loopedBoard: boolean; loopedBoard: boolean;
timeLimitForEachTurn: number; timeLimitForEachTurn: number;
logs: unknown[][]; logs: number[][];
map: string[]; map: string[];
}; };
}; };
@ -6128,7 +6248,12 @@ export type operations = {
size: number; size: number;
comment: string | null; comment: string | null;
blurhash: string | null; blurhash: string | null;
properties: Record<string, never>; properties: {
width?: number;
height?: number;
orientation?: number;
avgColor?: string;
};
/** @example true */ /** @example true */
storedInternal: boolean | null; storedInternal: boolean | null;
/** Format: url */ /** Format: url */
@ -7189,7 +7314,12 @@ export type operations = {
/** @description OK (with results) */ /** @description OK (with results) */
200: { 200: {
content: { content: {
'application/json': Record<string, never>; 'application/json': {
[key: string]: {
count: number;
size: number;
};
};
}; };
}; };
/** @description Client error */ /** @description Client error */
@ -8185,7 +8315,162 @@ export type operations = {
/** @description OK (with results) */ /** @description OK (with results) */
200: { 200: {
content: { content: {
'application/json': Record<string, never>; 'application/json': {
email: string | null;
emailVerified: boolean;
autoAcceptFollowed: boolean;
noCrawle: boolean;
preventAiLearning: boolean;
alwaysMarkNsfw: boolean;
autoSensitive: boolean;
carefulBot: boolean;
injectFeaturedNote: boolean;
receiveAnnouncementEmail: boolean;
mutedWords: (string | string[])[];
mutedInstances: string[];
notificationRecieveConfig: {
note?: OneOf<[{
/** @enum {string} */
type: 'all' | 'following' | 'follower' | 'mutualFollow' | 'never';
}, {
/** @enum {string} */
type: 'list';
/** Format: misskey:id */
userListId: string;
}]>;
follow?: OneOf<[{
/** @enum {string} */
type: 'all' | 'following' | 'follower' | 'mutualFollow' | 'never';
}, {
/** @enum {string} */
type: 'list';
/** Format: misskey:id */
userListId: string;
}]>;
mention?: OneOf<[{
/** @enum {string} */
type: 'all' | 'following' | 'follower' | 'mutualFollow' | 'never';
}, {
/** @enum {string} */
type: 'list';
/** Format: misskey:id */
userListId: string;
}]>;
reply?: OneOf<[{
/** @enum {string} */
type: 'all' | 'following' | 'follower' | 'mutualFollow' | 'never';
}, {
/** @enum {string} */
type: 'list';
/** Format: misskey:id */
userListId: string;
}]>;
renote?: OneOf<[{
/** @enum {string} */
type: 'all' | 'following' | 'follower' | 'mutualFollow' | 'never';
}, {
/** @enum {string} */
type: 'list';
/** Format: misskey:id */
userListId: string;
}]>;
quote?: OneOf<[{
/** @enum {string} */
type: 'all' | 'following' | 'follower' | 'mutualFollow' | 'never';
}, {
/** @enum {string} */
type: 'list';
/** Format: misskey:id */
userListId: string;
}]>;
reaction?: OneOf<[{
/** @enum {string} */
type: 'all' | 'following' | 'follower' | 'mutualFollow' | 'never';
}, {
/** @enum {string} */
type: 'list';
/** Format: misskey:id */
userListId: string;
}]>;
pollEnded?: OneOf<[{
/** @enum {string} */
type: 'all' | 'following' | 'follower' | 'mutualFollow' | 'never';
}, {
/** @enum {string} */
type: 'list';
/** Format: misskey:id */
userListId: string;
}]>;
receiveFollowRequest?: OneOf<[{
/** @enum {string} */
type: 'all' | 'following' | 'follower' | 'mutualFollow' | 'never';
}, {
/** @enum {string} */
type: 'list';
/** Format: misskey:id */
userListId: string;
}]>;
followRequestAccepted?: OneOf<[{
/** @enum {string} */
type: 'all' | 'following' | 'follower' | 'mutualFollow' | 'never';
}, {
/** @enum {string} */
type: 'list';
/** Format: misskey:id */
userListId: string;
}]>;
roleAssigned?: OneOf<[{
/** @enum {string} */
type: 'all' | 'following' | 'follower' | 'mutualFollow' | 'never';
}, {
/** @enum {string} */
type: 'list';
/** Format: misskey:id */
userListId: string;
}]>;
achievementEarned?: OneOf<[{
/** @enum {string} */
type: 'all' | 'following' | 'follower' | 'mutualFollow' | 'never';
}, {
/** @enum {string} */
type: 'list';
/** Format: misskey:id */
userListId: string;
}]>;
app?: OneOf<[{
/** @enum {string} */
type: 'all' | 'following' | 'follower' | 'mutualFollow' | 'never';
}, {
/** @enum {string} */
type: 'list';
/** Format: misskey:id */
userListId: string;
}]>;
test?: OneOf<[{
/** @enum {string} */
type: 'all' | 'following' | 'follower' | 'mutualFollow' | 'never';
}, {
/** @enum {string} */
type: 'list';
/** Format: misskey:id */
userListId: string;
}]>;
};
isModerator: boolean;
isSilenced: boolean;
isSuspended: boolean;
isHibernated: boolean;
lastActiveDate: string | null;
moderationNote: string;
signins: components['schemas']['Signin'][];
policies: components['schemas']['RolePolicies'];
roles: components['schemas']['Role'][];
roleAssigns: ({
createdAt: string;
expiresAt: string | null;
roleId: string;
})[];
};
}; };
}; };
/** @description Client error */ /** @description Client error */
@ -8568,11 +8853,9 @@ export type operations = {
}; };
}; };
responses: { responses: {
/** @description OK (with results) */ /** @description OK (without any results) */
200: { 204: {
content: { content: never;
'application/json': unknown;
};
}; };
/** @description Client error */ /** @description Client error */
400: { 400: {
@ -15567,9 +15850,13 @@ export type operations = {
}; };
}; };
responses: { responses: {
/** @description OK (without any results) */ /** @description OK (with results) */
204: { 200: {
content: never; content: {
'application/json': {
backupCodes: string[];
};
};
}; };
/** @description Client error */ /** @description Client error */
400: { 400: {
@ -15737,7 +16024,7 @@ export type operations = {
content: { content: {
'application/json': { 'application/json': {
rp: { rp: {
id: string | null; id?: string;
}; };
user: { user: {
id: string; id: string;
@ -16048,11 +16335,11 @@ export type operations = {
'application/json': { 'application/json': {
/** Format: misskey:id */ /** Format: misskey:id */
id: string; id: string;
name: string; name?: string;
/** Format: date-time */ /** Format: date-time */
createdAt: string; createdAt: string;
/** Format: date-time */ /** Format: date-time */
lastUsedAt: string; lastUsedAt?: string;
permission: string[]; permission: string[];
}[]; }[];
}; };
@ -16122,7 +16409,7 @@ export type operations = {
name: string; name: string;
callbackUrl: string | null; callbackUrl: string | null;
permission: string[]; permission: string[];
isAuthorized: boolean; isAuthorized?: boolean;
})[]; })[];
}; };
}; };
@ -17743,7 +18030,10 @@ export type operations = {
/** @description OK (with results) */ /** @description OK (with results) */
200: { 200: {
content: { content: {
'application/json': Record<string, never>; 'application/json': {
updatedAt: string;
value: unknown;
};
}; };
}; };
/** @description Client error */ /** @description Client error */
@ -17854,7 +18144,9 @@ export type operations = {
/** @description OK (with results) */ /** @description OK (with results) */
200: { 200: {
content: { content: {
'application/json': Record<string, never>; 'application/json': {
[key: string]: string;
};
}; };
}; };
/** @description Client error */ /** @description Client error */
@ -17906,9 +18198,11 @@ export type operations = {
}; };
}; };
responses: { responses: {
/** @description OK (without any results) */ /** @description OK (with results) */
204: { 200: {
content: never; content: {
'application/json': string[];
};
}; };
/** @description Client error */ /** @description Client error */
400: { 400: {
@ -18385,7 +18679,134 @@ export type operations = {
mutedWords?: (string[] | string)[]; mutedWords?: (string[] | string)[];
hardMutedWords?: (string[] | string)[]; hardMutedWords?: (string[] | string)[];
mutedInstances?: string[]; mutedInstances?: string[];
notificationRecieveConfig?: Record<string, never>; notificationRecieveConfig?: {
note?: OneOf<[{
/** @enum {string} */
type: 'all' | 'following' | 'follower' | 'mutualFollow' | 'never';
}, {
/** @enum {string} */
type: 'list';
/** Format: misskey:id */
userListId: string;
}]>;
follow?: OneOf<[{
/** @enum {string} */
type: 'all' | 'following' | 'follower' | 'mutualFollow' | 'never';
}, {
/** @enum {string} */
type: 'list';
/** Format: misskey:id */
userListId: string;
}]>;
mention?: OneOf<[{
/** @enum {string} */
type: 'all' | 'following' | 'follower' | 'mutualFollow' | 'never';
}, {
/** @enum {string} */
type: 'list';
/** Format: misskey:id */
userListId: string;
}]>;
reply?: OneOf<[{
/** @enum {string} */
type: 'all' | 'following' | 'follower' | 'mutualFollow' | 'never';
}, {
/** @enum {string} */
type: 'list';
/** Format: misskey:id */
userListId: string;
}]>;
renote?: OneOf<[{
/** @enum {string} */
type: 'all' | 'following' | 'follower' | 'mutualFollow' | 'never';
}, {
/** @enum {string} */
type: 'list';
/** Format: misskey:id */
userListId: string;
}]>;
quote?: OneOf<[{
/** @enum {string} */
type: 'all' | 'following' | 'follower' | 'mutualFollow' | 'never';
}, {
/** @enum {string} */
type: 'list';
/** Format: misskey:id */
userListId: string;
}]>;
reaction?: OneOf<[{
/** @enum {string} */
type: 'all' | 'following' | 'follower' | 'mutualFollow' | 'never';
}, {
/** @enum {string} */
type: 'list';
/** Format: misskey:id */
userListId: string;
}]>;
pollEnded?: OneOf<[{
/** @enum {string} */
type: 'all' | 'following' | 'follower' | 'mutualFollow' | 'never';
}, {
/** @enum {string} */
type: 'list';
/** Format: misskey:id */
userListId: string;
}]>;
receiveFollowRequest?: OneOf<[{
/** @enum {string} */
type: 'all' | 'following' | 'follower' | 'mutualFollow' | 'never';
}, {
/** @enum {string} */
type: 'list';
/** Format: misskey:id */
userListId: string;
}]>;
followRequestAccepted?: OneOf<[{
/** @enum {string} */
type: 'all' | 'following' | 'follower' | 'mutualFollow' | 'never';
}, {
/** @enum {string} */
type: 'list';
/** Format: misskey:id */
userListId: string;
}]>;
roleAssigned?: OneOf<[{
/** @enum {string} */
type: 'all' | 'following' | 'follower' | 'mutualFollow' | 'never';
}, {
/** @enum {string} */
type: 'list';
/** Format: misskey:id */
userListId: string;
}]>;
achievementEarned?: OneOf<[{
/** @enum {string} */
type: 'all' | 'following' | 'follower' | 'mutualFollow' | 'never';
}, {
/** @enum {string} */
type: 'list';
/** Format: misskey:id */
userListId: string;
}]>;
app?: OneOf<[{
/** @enum {string} */
type: 'all' | 'following' | 'follower' | 'mutualFollow' | 'never';
}, {
/** @enum {string} */
type: 'list';
/** Format: misskey:id */
userListId: string;
}]>;
test?: OneOf<[{
/** @enum {string} */
type: 'all' | 'following' | 'follower' | 'mutualFollow' | 'never';
}, {
/** @enum {string} */
type: 'list';
/** Format: misskey:id */
userListId: string;
}]>;
};
emailNotificationTypes?: string[]; emailNotificationTypes?: string[];
alsoKnownAs?: string[]; alsoKnownAs?: string[];
}; };
@ -23578,12 +23999,12 @@ export type operations = {
content: { content: {
'application/json': { 'application/json': {
/** Format: misskey:id */ /** Format: misskey:id */
id: string; id?: string;
required: boolean; required: boolean;
string: string; string?: string;
default: string; default?: string;
/** @default hello */ /** @default hello */
nullableDefault: string | null; nullableDefault?: string | null;
}; };
}; };
}; };
@ -25694,18 +26115,16 @@ export type operations = {
'application/json': { 'application/json': {
score: number; score: number;
seed: string; seed: string;
logs: unknown[]; logs: number[][];
gameMode: string; gameMode: string;
gameVersion: number; gameVersion: number;
}; };
}; };
}; };
responses: { responses: {
/** @description OK (with results) */ /** @description OK (without any results) */
200: { 204: {
content: { content: never;
'application/json': unknown;
};
}; };
/** @description Client error */ /** @description Client error */
400: { 400: {
@ -25767,7 +26186,7 @@ export type operations = {
/** Format: misskey:id */ /** Format: misskey:id */
id: string; id: string;
score: number; score: number;
user: components['schemas']['UserLite']; user?: components['schemas']['UserLite'];
}[]; }[];
}; };
}; };
@ -25819,11 +26238,9 @@ export type operations = {
}; };
}; };
responses: { responses: {
/** @description OK (with results) */ /** @description OK (without any results) */
200: { 204: {
content: { content: never;
'application/json': unknown;
};
}; };
/** @description Client error */ /** @description Client error */
400: { 400: {
@ -25940,9 +26357,13 @@ export type operations = {
/** @description OK (with results) */ /** @description OK (with results) */
200: { 200: {
content: { content: {
'application/json': unknown; 'application/json': components['schemas']['ReversiGameDetailed'];
}; };
}; };
/** @description OK (without any results) */
204: {
content: never;
};
/** @description Client error */ /** @description Client error */
400: { 400: {
content: { content: {

File diff suppressed because it is too large Load diff