-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
feat: ユーザースキーマの改善 #12568
feat: ユーザースキーマの改善 #12568
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #12568 +/- ##
===========================================
+ Coverage 78.74% 78.76% +0.01%
===========================================
Files 954 955 +1
Lines 103825 103860 +35
Branches 8351 8327 -24
===========================================
+ Hits 81758 81806 +48
+ Misses 22067 22054 -13 ☔ View full report in Codecov by Sentry. |
このPRによるapi.jsonの差分 差分はこちら--- base
+++ head
@@ -63495,7 +63495,11 @@
},
"notify": {
"type": "string",
- "nullable": false
+ "nullable": false,
+ "enum": [
+ "normal",
+ "none"
+ ]
},
"withReplies": {
"type": "boolean",
@@ -63686,7 +63690,240 @@
},
"notificationRecieveConfig": {
"type": "object",
- "nullable": false
+ "nullable": false,
+ "properties": {
+ "app": {
+ "type": "object",
+ "nullable": false,
+ "properties": {
+ "type": {
+ "type": "string",
+ "nullable": false,
+ "enum": [
+ "all",
+ "following",
+ "follower",
+ "mutualFollow",
+ "list",
+ "never"
+ ]
+ }
+ },
+ "required": [
+ "type"
+ ]
+ },
+ "quote": {
+ "type": "object",
+ "nullable": false,
+ "properties": {
+ "type": {
+ "type": "string",
+ "nullable": false,
+ "enum": [
+ "all",
+ "following",
+ "follower",
+ "mutualFollow",
+ "list",
+ "never"
+ ]
+ }
+ },
+ "required": [
+ "type"
+ ]
+ },
+ "reply": {
+ "type": "object",
+ "nullable": false,
+ "properties": {
+ "type": {
+ "type": "string",
+ "nullable": false,
+ "enum": [
+ "all",
+ "following",
+ "follower",
+ "mutualFollow",
+ "list",
+ "never"
+ ]
+ }
+ },
+ "required": [
+ "type"
+ ]
+ },
+ "follow": {
+ "type": "object",
+ "nullable": false,
+ "properties": {
+ "type": {
+ "type": "string",
+ "nullable": false,
+ "enum": [
+ "all",
+ "following",
+ "follower",
+ "mutualFollow",
+ "list",
+ "never"
+ ]
+ }
+ },
+ "required": [
+ "type"
+ ]
+ },
+ "renote": {
+ "type": "object",
+ "nullable": false,
+ "properties": {
+ "type": {
+ "type": "string",
+ "nullable": false,
+ "enum": [
+ "all",
+ "following",
+ "follower",
+ "mutualFollow",
+ "list",
+ "never"
+ ]
+ }
+ },
+ "required": [
+ "type"
+ ]
+ },
+ "mention": {
+ "type": "object",
+ "nullable": false,
+ "properties": {
+ "type": {
+ "type": "string",
+ "nullable": false,
+ "enum": [
+ "all",
+ "following",
+ "follower",
+ "mutualFollow",
+ "list",
+ "never"
+ ]
+ }
+ },
+ "required": [
+ "type"
+ ]
+ },
+ "reaction": {
+ "type": "object",
+ "nullable": false,
+ "properties": {
+ "type": {
+ "type": "string",
+ "nullable": false,
+ "enum": [
+ "all",
+ "following",
+ "follower",
+ "mutualFollow",
+ "list",
+ "never"
+ ]
+ }
+ },
+ "required": [
+ "type"
+ ]
+ },
+ "pollEnded": {
+ "type": "object",
+ "nullable": false,
+ "properties": {
+ "type": {
+ "type": "string",
+ "nullable": false,
+ "enum": [
+ "all",
+ "following",
+ "follower",
+ "mutualFollow",
+ "list",
+ "never"
+ ]
+ }
+ },
+ "required": [
+ "type"
+ ]
+ },
+ "achievementEarned": {
+ "type": "object",
+ "nullable": false,
+ "properties": {
+ "type": {
+ "type": "string",
+ "nullable": false,
+ "enum": [
+ "all",
+ "following",
+ "follower",
+ "mutualFollow",
+ "list",
+ "never"
+ ]
+ }
+ },
+ "required": [
+ "type"
+ ]
+ },
+ "receiveFollowRequest": {
+ "type": "object",
+ "nullable": false,
+ "properties": {
+ "type": {
+ "type": "string",
+ "nullable": false,
+ "enum": [
+ "all",
+ "following",
+ "follower",
+ "mutualFollow",
+ "list",
+ "never"
+ ]
+ }
+ },
+ "required": [
+ "type"
+ ]
+ },
+ "followRequestAccepted": {
+ "type": "object",
+ "nullable": false,
+ "properties": {
+ "type": {
+ "type": "string",
+ "nullable": false,
+ "enum": [
+ "all",
+ "following",
+ "follower",
+ "mutualFollow",
+ "list",
+ "never"
+ ]
+ }
+ },
+ "required": [
+ "type"
+ ]
+ }
+ }
},
"emailNotificationTypes": {
"type": "array",
@@ -63858,7 +64095,29 @@
"nullable": false,
"items": {
"type": "object",
- "nullable": false
+ "nullable": false,
+ "properties": {
+ "id": {
+ "type": "string",
+ "nullable": false,
+ "format": "id",
+ "example": "xxxxxxxxxx"
+ },
+ "name": {
+ "type": "string",
+ "nullable": false
+ },
+ "lastUsed": {
+ "type": "string",
+ "nullable": false,
+ "format": "date-time"
+ }
+ },
+ "required": [
+ "id",
+ "name",
+ "lastUsed"
+ ]
}
}
}, |
👍🏻 |
了解しました。Misskey.jsの更新までするので少々お待ちください🙏 |
出来ました |
バックエンドの型チェックが失敗してるのが直れば良さそうです 👍🏻 |
直ったと思います |
🙏🙏 |
* chore: notifyにenumを設定 * feat: securityKeysListの型を明確に * feat: notificationRecieveConfigにpropertiesを定義 * chore: misskey.jsのmodelを更新 * fix: as constをつけ忘れている
What
packedUserDetailedNotMeOnlySchema.notify
にenum
を追加しましたpackedMeDetailedOnlySchema.securityKeysList
にproperties
を定義しましたWhy
現状だとドキュメントから
securityKeysList
はobject
であることしか知ることが出来ない為。また、notify
にはどのような文字列が入るのか明確にするためAdditional info (optional)
現状は何も手を加えていませんが
notificationRecieveConfig
にもproperties
を定義したいと考えています。愚直に記述すると量がとても多いため、部分的に別の変数に分けてそれを使うようにしたいのですが、大丈夫でしょうか?以下がやりたい物になるので、大丈夫そうでしたらこちらもコミットしようと思います
Checklist