diff options
| author | zyoshoka <107108195+zyoshoka@users.noreply.github.com> | 2025-05-06 19:52:30 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-05-06 19:52:30 +0900 |
| commit | 3b676f39df829e690265d9b00798fa8908d83794 (patch) | |
| tree | 6094ae3d61a789f478b87c67f412e46cb809bb2e /packages/backend/src/models/UserProfile.ts | |
| parent | add icon project file (diff) | |
| download | misskey-3b676f39df829e690265d9b00798fa8908d83794.tar.gz misskey-3b676f39df829e690265d9b00798fa8908d83794.tar.bz2 misskey-3b676f39df829e690265d9b00798fa8908d83794.zip | |
fix(backend): enumerate achievement types in some response schema (#15953)
* fix(backend): enumerate achievement types in some response schema
* refactor: use `ref`
Diffstat (limited to 'packages/backend/src/models/UserProfile.ts')
| -rw-r--r-- | packages/backend/src/models/UserProfile.ts | 83 |
1 files changed, 82 insertions, 1 deletions
diff --git a/packages/backend/src/models/UserProfile.ts b/packages/backend/src/models/UserProfile.ts index 5544555296..c4c1fa5ec9 100644 --- a/packages/backend/src/models/UserProfile.ts +++ b/packages/backend/src/models/UserProfile.ts @@ -274,7 +274,7 @@ export class MiUserProfile { default: [], }) public achievements: { - name: string; + name: typeof ACHIEVEMENT_TYPES[number]; unlockedAt: number; }[]; @@ -295,3 +295,84 @@ export class MiUserProfile { } } } + +export const ACHIEVEMENT_TYPES = [ + 'notes1', + 'notes10', + 'notes100', + 'notes500', + 'notes1000', + 'notes5000', + 'notes10000', + 'notes20000', + 'notes30000', + 'notes40000', + 'notes50000', + 'notes60000', + 'notes70000', + 'notes80000', + 'notes90000', + 'notes100000', + 'login3', + 'login7', + 'login15', + 'login30', + 'login60', + 'login100', + 'login200', + 'login300', + 'login400', + 'login500', + 'login600', + 'login700', + 'login800', + 'login900', + 'login1000', + 'passedSinceAccountCreated1', + 'passedSinceAccountCreated2', + 'passedSinceAccountCreated3', + 'loggedInOnBirthday', + 'loggedInOnNewYearsDay', + 'noteClipped1', + 'noteFavorited1', + 'myNoteFavorited1', + 'profileFilled', + 'markedAsCat', + 'following1', + 'following10', + 'following50', + 'following100', + 'following300', + 'followers1', + 'followers10', + 'followers50', + 'followers100', + 'followers300', + 'followers500', + 'followers1000', + 'collectAchievements30', + 'viewAchievements3min', + 'iLoveMisskey', + 'foundTreasure', + 'client30min', + 'client60min', + 'noteDeletedWithin1min', + 'postedAtLateNight', + 'postedAt0min0sec', + 'selfQuote', + 'htl20npm', + 'viewInstanceChart', + 'outputHelloWorldOnScratchpad', + 'open3windows', + 'driveFolderCircularReference', + 'reactWithoutRead', + 'clickedClickHere', + 'justPlainLucky', + 'setNameToSyuilo', + 'cookieClicked', + 'brainDiver', + 'smashTestNotificationButton', + 'tutorialCompleted', + 'bubbleGameExplodingHead', + 'bubbleGameDoubleExplodingHead', +] as const; |