Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: #67 Add missing 'kind' to API endpoints #68

Merged
merged 1 commit into from
Jul 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions locales/en-US.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2072,6 +2072,7 @@ _permissions:
"write:flash": "Edit Plays"
"read:flash-likes": "View list of liked Plays"
"write:flash-likes": "Edit list of liked Plays"
"write:community-role": "Edit community roles"
"read:admin:abuse-user-reports": "View user reports"
"write:admin:delete-account": "Delete user account"
"write:admin:delete-all-files-of-a-user": "Delete all files of a user"
Expand Down Expand Up @@ -2106,6 +2107,7 @@ _permissions:
"read:admin:account": "View user account"
"write:admin:emoji": "Manage emoji"
"read:admin:emoji": "View emoji"
"read:admin:emoji-log": "View emoji log"
"write:admin:queue": "Manage job queue"
"read:admin:queue": "View job queue info"
"write:admin:promo": "Manage promotion notes"
Expand Down
8 changes: 8 additions & 0 deletions locales/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8103,6 +8103,10 @@ export interface Locale extends ILocale {
* Playのいいねを操作する
*/
"write:flash-likes": string;
/**
* コミュニティーロールを操作する
*/
"write:community-role": string;
/**
* ユーザーからの通報を見る
*/
Expand Down Expand Up @@ -8239,6 +8243,10 @@ export interface Locale extends ILocale {
* 絵文字を見る
*/
"read:admin:emoji": string;
/**
* 絵文字のログを見る
*/
"read:admin:emoji-log": string;
/**
* ジョブキューを操作する
*/
Expand Down
2 changes: 2 additions & 0 deletions locales/ja-JP.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2127,6 +2127,7 @@ _permissions:
"write:flash": "Playを操作する"
"read:flash-likes": "Playのいいねを見る"
"write:flash-likes": "Playのいいねを操作する"
"write:community-role": "コミュニティーロールを操作する"
"read:admin:abuse-user-reports": "ユーザーからの通報を見る"
"write:admin:delete-account": "ユーザーアカウントを削除する"
"write:admin:delete-all-files-of-a-user": "ユーザーのすべてのファイルを削除する"
Expand Down Expand Up @@ -2161,6 +2162,7 @@ _permissions:
"read:admin:account": "ユーザーに関する情報を見る"
"write:admin:emoji": "絵文字を操作する"
"read:admin:emoji": "絵文字を見る"
"read:admin:emoji-log": "絵文字のログを見る"
"write:admin:queue": "ジョブキューを操作する"
"read:admin:queue": "ジョブキューに関する情報を見る"
"write:admin:promo": "プロモーションノートを操作する"
Expand Down
2 changes: 2 additions & 0 deletions locales/ja-KS.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2059,6 +2059,7 @@ _permissions:
"write:flash": "Playを操作する"
"read:flash-likes": "Playのええやん!を見る"
"write:flash-likes": "Playのええやん!を見る"
"write:community-role": "コミュニティーロールを操作するで"
"read:admin:abuse-user-reports": "ユーザーからの通報を見る"
"write:admin:delete-account": "ユーザーアカウント消す"
"write:admin:delete-all-files-of-a-user": "ユーザーのファイル全部ほかす"
Expand Down Expand Up @@ -2093,6 +2094,7 @@ _permissions:
"read:admin:account": "ユーザーの情報見る"
"write:admin:emoji": "絵文字いじる"
"read:admin:emoji": "絵文字見る"
"read:admin:emoji-log": "絵文字のログ見る"
"write:admin:queue": "ジョブキューいじる"
"read:admin:queue": "ジョブキューの情報見る"
"write:admin:promo": "プロモーションノートいじる"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ export const meta = {

requireCredential: true,
requireRolePolicy: 'canManageCustomEmojis',
kind: 'read:admin:emoji-log',

cacheSec: 3600,

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import { ApiError } from '../../../error.js';

export const meta = {
requireCredential: true,
kind: 'write:account',

errors: {},
} as const;
Expand Down
1 change: 1 addition & 0 deletions packages/backend/src/server/api/endpoints/roles/add.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ export const meta = {
tags: ["role"],

requireCredential: true,
kind: 'write:community-role',

errors: {
notAllowed: {
Expand Down
1 change: 1 addition & 0 deletions packages/backend/src/server/api/endpoints/roles/assign.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ export const meta = {
tags: ['role'],

requireCredential: true,
kind: 'write:community-role',

errors: {
noSuchRole: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ export const meta = {
tags: ['role'],

requireCredential: true,
kind: 'write:community-role',

errors: {
noSuchRole: {
Expand Down
1 change: 1 addition & 0 deletions packages/backend/src/server/api/endpoints/roles/update.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ export const meta = {
tags: ['role'],

requireCredential: true,
kind: 'write:community-role',

errors: {
noSuchRole: {
Expand Down
2 changes: 2 additions & 0 deletions packages/misskey-js/src/consts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
'write:flash',
'read:flash-likes',
'write:flash-likes',
'write:community-role',
'read:admin:abuse-user-reports',
'write:admin:delete-account',
'write:admin:delete-all-files-of-a-user',
Expand Down Expand Up @@ -79,6 +80,7 @@
'read:admin:account',
'write:admin:emoji',
'read:admin:emoji',
'read:admin:emoji-log',
'write:admin:queue',
'read:admin:queue',
'write:admin:promo',
Expand Down Expand Up @@ -137,8 +139,8 @@

export type ModerationLogPayloads = {
updateServerSettings: {
before: any | null;

Check warning on line 142 in packages/misskey-js/src/consts.ts

View workflow job for this annotation

GitHub Actions / lint (misskey-js)

Unexpected any. Specify a different type
after: any | null;

Check warning on line 143 in packages/misskey-js/src/consts.ts

View workflow job for this annotation

GitHub Actions / lint (misskey-js)

Unexpected any. Specify a different type
};
suspend: {
userId: string;
Expand All @@ -159,12 +161,12 @@
};
addCustomEmoji: {
emojiId: string;
emoji: any;

Check warning on line 164 in packages/misskey-js/src/consts.ts

View workflow job for this annotation

GitHub Actions / lint (misskey-js)

Unexpected any. Specify a different type
};
updateCustomEmoji: {
emojiId: string;
before: any;

Check warning on line 168 in packages/misskey-js/src/consts.ts

View workflow job for this annotation

GitHub Actions / lint (misskey-js)

Unexpected any. Specify a different type
after: any;

Check warning on line 169 in packages/misskey-js/src/consts.ts

View workflow job for this annotation

GitHub Actions / lint (misskey-js)

Unexpected any. Specify a different type
};
deleteCustomEmoji: {
emojiId: string;
Expand Down
Loading