2023-07-27 14:31:52 +09:00
|
|
|
/*
|
|
|
|
* SPDX-FileCopyrightText: syuilo and other misskey contributors
|
|
|
|
* SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
*/
|
|
|
|
|
2022-09-18 03:27:08 +09:00
|
|
|
import { Module } from '@nestjs/common';
|
|
|
|
import { DI } from '@/di-symbols.js';
|
2024-01-19 20:51:49 +09:00
|
|
|
import { MiAbuseUserReport, MiAccessToken, MiAd, MiAnnouncement, MiAnnouncementRead, MiAntenna, MiApp, MiAuthSession, MiAvatarDecoration, MiBlocking, MiChannel, MiChannelFavorite, MiChannelFollowing, MiClip, MiClipFavorite, MiClipNote, MiDriveFile, MiDriveFolder, MiEmoji, MiFlash, MiFlashLike, MiFollowRequest, MiFollowing, MiGalleryLike, MiGalleryPost, MiHashtag, MiInstance, MiMeta, MiModerationLog, MiMuting, MiNote, MiNoteFavorite, MiNoteReaction, MiNoteThreadMuting, MiNoteUnread, MiPage, MiPageLike, MiPasswordResetRequest, MiPoll, MiPollVote, MiPromoNote, MiPromoRead, MiRegistrationTicket, MiRegistryItem, MiRelay, MiRenoteMuting, MiRetentionAggregation, MiRole, MiRoleAssignment, MiSignin, MiSwSubscription, MiUsedUsername, MiUser, MiUserIp, MiUserKeypair, MiUserList, MiUserListFavorite, MiUserListMembership, MiUserMemo, MiUserNotePining, MiUserPending, MiUserProfile, MiUserPublickey, MiUserSecurityKey, MiWebhook, MiBubbleGameRecord, MiReversiGame } from './_.js';
|
2022-09-18 03:27:08 +09:00
|
|
|
import type { DataSource } from 'typeorm';
|
|
|
|
import type { Provider } from '@nestjs/common';
|
|
|
|
|
|
|
|
const $usersRepository: Provider = {
|
|
|
|
provide: DI.usersRepository,
|
2023-08-16 17:51:28 +09:00
|
|
|
useFactory: (db: DataSource) => db.getRepository(MiUser),
|
2022-09-18 03:27:08 +09:00
|
|
|
inject: [DI.db],
|
|
|
|
};
|
|
|
|
|
|
|
|
const $notesRepository: Provider = {
|
|
|
|
provide: DI.notesRepository,
|
2023-08-16 17:51:28 +09:00
|
|
|
useFactory: (db: DataSource) => db.getRepository(MiNote),
|
2022-09-18 03:27:08 +09:00
|
|
|
inject: [DI.db],
|
|
|
|
};
|
|
|
|
|
|
|
|
const $announcementsRepository: Provider = {
|
|
|
|
provide: DI.announcementsRepository,
|
2023-08-16 17:51:28 +09:00
|
|
|
useFactory: (db: DataSource) => db.getRepository(MiAnnouncement),
|
2022-09-18 03:27:08 +09:00
|
|
|
inject: [DI.db],
|
|
|
|
};
|
|
|
|
|
|
|
|
const $announcementReadsRepository: Provider = {
|
|
|
|
provide: DI.announcementReadsRepository,
|
2023-08-16 17:51:28 +09:00
|
|
|
useFactory: (db: DataSource) => db.getRepository(MiAnnouncementRead),
|
2022-09-18 03:27:08 +09:00
|
|
|
inject: [DI.db],
|
|
|
|
};
|
|
|
|
|
|
|
|
const $appsRepository: Provider = {
|
|
|
|
provide: DI.appsRepository,
|
2023-08-16 17:51:28 +09:00
|
|
|
useFactory: (db: DataSource) => db.getRepository(MiApp),
|
2022-09-18 03:27:08 +09:00
|
|
|
inject: [DI.db],
|
|
|
|
};
|
|
|
|
|
2023-10-21 18:38:07 +09:00
|
|
|
const $avatarDecorationsRepository: Provider = {
|
|
|
|
provide: DI.avatarDecorationsRepository,
|
|
|
|
useFactory: (db: DataSource) => db.getRepository(MiAvatarDecoration),
|
|
|
|
inject: [DI.db],
|
|
|
|
};
|
|
|
|
|
2022-09-18 03:27:08 +09:00
|
|
|
const $noteFavoritesRepository: Provider = {
|
|
|
|
provide: DI.noteFavoritesRepository,
|
2023-08-16 17:51:28 +09:00
|
|
|
useFactory: (db: DataSource) => db.getRepository(MiNoteFavorite),
|
2022-09-18 03:27:08 +09:00
|
|
|
inject: [DI.db],
|
|
|
|
};
|
|
|
|
|
|
|
|
const $noteThreadMutingsRepository: Provider = {
|
|
|
|
provide: DI.noteThreadMutingsRepository,
|
2023-08-16 17:51:28 +09:00
|
|
|
useFactory: (db: DataSource) => db.getRepository(MiNoteThreadMuting),
|
2022-09-18 03:27:08 +09:00
|
|
|
inject: [DI.db],
|
|
|
|
};
|
|
|
|
|
|
|
|
const $noteReactionsRepository: Provider = {
|
|
|
|
provide: DI.noteReactionsRepository,
|
2023-08-16 17:51:28 +09:00
|
|
|
useFactory: (db: DataSource) => db.getRepository(MiNoteReaction),
|
2022-09-18 03:27:08 +09:00
|
|
|
inject: [DI.db],
|
|
|
|
};
|
|
|
|
|
|
|
|
const $noteUnreadsRepository: Provider = {
|
|
|
|
provide: DI.noteUnreadsRepository,
|
2023-08-16 17:51:28 +09:00
|
|
|
useFactory: (db: DataSource) => db.getRepository(MiNoteUnread),
|
2022-09-18 03:27:08 +09:00
|
|
|
inject: [DI.db],
|
|
|
|
};
|
|
|
|
|
|
|
|
const $pollsRepository: Provider = {
|
|
|
|
provide: DI.pollsRepository,
|
2023-08-16 17:51:28 +09:00
|
|
|
useFactory: (db: DataSource) => db.getRepository(MiPoll),
|
2022-09-18 03:27:08 +09:00
|
|
|
inject: [DI.db],
|
|
|
|
};
|
|
|
|
|
|
|
|
const $pollVotesRepository: Provider = {
|
|
|
|
provide: DI.pollVotesRepository,
|
2023-08-16 17:51:28 +09:00
|
|
|
useFactory: (db: DataSource) => db.getRepository(MiPollVote),
|
2022-09-18 03:27:08 +09:00
|
|
|
inject: [DI.db],
|
|
|
|
};
|
|
|
|
|
|
|
|
const $userProfilesRepository: Provider = {
|
|
|
|
provide: DI.userProfilesRepository,
|
2023-08-16 17:51:28 +09:00
|
|
|
useFactory: (db: DataSource) => db.getRepository(MiUserProfile),
|
2022-09-18 03:27:08 +09:00
|
|
|
inject: [DI.db],
|
|
|
|
};
|
|
|
|
|
|
|
|
const $userKeypairsRepository: Provider = {
|
|
|
|
provide: DI.userKeypairsRepository,
|
2023-08-16 17:51:28 +09:00
|
|
|
useFactory: (db: DataSource) => db.getRepository(MiUserKeypair),
|
2022-09-18 03:27:08 +09:00
|
|
|
inject: [DI.db],
|
|
|
|
};
|
|
|
|
|
|
|
|
const $userPendingsRepository: Provider = {
|
|
|
|
provide: DI.userPendingsRepository,
|
2023-08-16 17:51:28 +09:00
|
|
|
useFactory: (db: DataSource) => db.getRepository(MiUserPending),
|
2022-09-18 03:27:08 +09:00
|
|
|
inject: [DI.db],
|
|
|
|
};
|
|
|
|
|
|
|
|
const $userSecurityKeysRepository: Provider = {
|
|
|
|
provide: DI.userSecurityKeysRepository,
|
2023-08-16 17:51:28 +09:00
|
|
|
useFactory: (db: DataSource) => db.getRepository(MiUserSecurityKey),
|
2022-09-18 03:27:08 +09:00
|
|
|
inject: [DI.db],
|
|
|
|
};
|
|
|
|
|
|
|
|
const $userPublickeysRepository: Provider = {
|
|
|
|
provide: DI.userPublickeysRepository,
|
2023-08-16 17:51:28 +09:00
|
|
|
useFactory: (db: DataSource) => db.getRepository(MiUserPublickey),
|
2022-09-18 03:27:08 +09:00
|
|
|
inject: [DI.db],
|
|
|
|
};
|
|
|
|
|
|
|
|
const $userListsRepository: Provider = {
|
|
|
|
provide: DI.userListsRepository,
|
2023-08-16 17:51:28 +09:00
|
|
|
useFactory: (db: DataSource) => db.getRepository(MiUserList),
|
2022-09-18 03:27:08 +09:00
|
|
|
inject: [DI.db],
|
|
|
|
};
|
|
|
|
|
2023-05-19 10:06:12 +09:00
|
|
|
const $userListFavoritesRepository: Provider = {
|
|
|
|
provide: DI.userListFavoritesRepository,
|
2023-08-16 17:51:28 +09:00
|
|
|
useFactory: (db: DataSource) => db.getRepository(MiUserListFavorite),
|
2023-05-19 10:06:12 +09:00
|
|
|
inject: [DI.db],
|
|
|
|
};
|
|
|
|
|
2023-10-03 20:26:11 +09:00
|
|
|
const $userListMembershipsRepository: Provider = {
|
|
|
|
provide: DI.userListMembershipsRepository,
|
|
|
|
useFactory: (db: DataSource) => db.getRepository(MiUserListMembership),
|
2022-09-18 03:27:08 +09:00
|
|
|
inject: [DI.db],
|
|
|
|
};
|
|
|
|
|
|
|
|
const $userNotePiningsRepository: Provider = {
|
|
|
|
provide: DI.userNotePiningsRepository,
|
2023-08-16 17:51:28 +09:00
|
|
|
useFactory: (db: DataSource) => db.getRepository(MiUserNotePining),
|
2022-09-18 03:27:08 +09:00
|
|
|
inject: [DI.db],
|
|
|
|
};
|
|
|
|
|
|
|
|
const $userIpsRepository: Provider = {
|
|
|
|
provide: DI.userIpsRepository,
|
2023-08-16 17:51:28 +09:00
|
|
|
useFactory: (db: DataSource) => db.getRepository(MiUserIp),
|
2022-09-18 03:27:08 +09:00
|
|
|
inject: [DI.db],
|
|
|
|
};
|
|
|
|
|
|
|
|
const $usedUsernamesRepository: Provider = {
|
|
|
|
provide: DI.usedUsernamesRepository,
|
2023-08-16 17:51:28 +09:00
|
|
|
useFactory: (db: DataSource) => db.getRepository(MiUsedUsername),
|
2022-09-18 03:27:08 +09:00
|
|
|
inject: [DI.db],
|
|
|
|
};
|
|
|
|
|
|
|
|
const $followingsRepository: Provider = {
|
|
|
|
provide: DI.followingsRepository,
|
2023-08-16 17:51:28 +09:00
|
|
|
useFactory: (db: DataSource) => db.getRepository(MiFollowing),
|
2022-09-18 03:27:08 +09:00
|
|
|
inject: [DI.db],
|
|
|
|
};
|
|
|
|
|
|
|
|
const $followRequestsRepository: Provider = {
|
|
|
|
provide: DI.followRequestsRepository,
|
2023-08-16 17:51:28 +09:00
|
|
|
useFactory: (db: DataSource) => db.getRepository(MiFollowRequest),
|
2022-09-18 03:27:08 +09:00
|
|
|
inject: [DI.db],
|
|
|
|
};
|
|
|
|
|
|
|
|
const $instancesRepository: Provider = {
|
|
|
|
provide: DI.instancesRepository,
|
2023-08-16 17:51:28 +09:00
|
|
|
useFactory: (db: DataSource) => db.getRepository(MiInstance),
|
2022-09-18 03:27:08 +09:00
|
|
|
inject: [DI.db],
|
|
|
|
};
|
|
|
|
|
|
|
|
const $emojisRepository: Provider = {
|
|
|
|
provide: DI.emojisRepository,
|
2023-08-16 17:51:28 +09:00
|
|
|
useFactory: (db: DataSource) => db.getRepository(MiEmoji),
|
2022-09-18 03:27:08 +09:00
|
|
|
inject: [DI.db],
|
|
|
|
};
|
|
|
|
|
|
|
|
const $driveFilesRepository: Provider = {
|
|
|
|
provide: DI.driveFilesRepository,
|
2023-08-16 17:51:28 +09:00
|
|
|
useFactory: (db: DataSource) => db.getRepository(MiDriveFile),
|
2022-09-18 03:27:08 +09:00
|
|
|
inject: [DI.db],
|
|
|
|
};
|
|
|
|
|
|
|
|
const $driveFoldersRepository: Provider = {
|
|
|
|
provide: DI.driveFoldersRepository,
|
2023-08-16 17:51:28 +09:00
|
|
|
useFactory: (db: DataSource) => db.getRepository(MiDriveFolder),
|
2022-09-18 03:27:08 +09:00
|
|
|
inject: [DI.db],
|
|
|
|
};
|
|
|
|
|
|
|
|
const $metasRepository: Provider = {
|
|
|
|
provide: DI.metasRepository,
|
2023-08-16 17:51:28 +09:00
|
|
|
useFactory: (db: DataSource) => db.getRepository(MiMeta),
|
2022-09-18 03:27:08 +09:00
|
|
|
inject: [DI.db],
|
|
|
|
};
|
|
|
|
|
|
|
|
const $mutingsRepository: Provider = {
|
|
|
|
provide: DI.mutingsRepository,
|
2023-08-16 17:51:28 +09:00
|
|
|
useFactory: (db: DataSource) => db.getRepository(MiMuting),
|
2022-09-18 03:27:08 +09:00
|
|
|
inject: [DI.db],
|
|
|
|
};
|
|
|
|
|
2023-03-08 08:56:09 +09:00
|
|
|
const $renoteMutingsRepository: Provider = {
|
|
|
|
provide: DI.renoteMutingsRepository,
|
2023-08-16 17:51:28 +09:00
|
|
|
useFactory: (db: DataSource) => db.getRepository(MiRenoteMuting),
|
2023-03-08 08:56:09 +09:00
|
|
|
inject: [DI.db],
|
|
|
|
};
|
|
|
|
|
2022-09-18 03:27:08 +09:00
|
|
|
const $blockingsRepository: Provider = {
|
|
|
|
provide: DI.blockingsRepository,
|
2023-08-16 17:51:28 +09:00
|
|
|
useFactory: (db: DataSource) => db.getRepository(MiBlocking),
|
2022-09-18 03:27:08 +09:00
|
|
|
inject: [DI.db],
|
|
|
|
};
|
|
|
|
|
|
|
|
const $swSubscriptionsRepository: Provider = {
|
|
|
|
provide: DI.swSubscriptionsRepository,
|
2023-08-16 17:51:28 +09:00
|
|
|
useFactory: (db: DataSource) => db.getRepository(MiSwSubscription),
|
2022-09-18 03:27:08 +09:00
|
|
|
inject: [DI.db],
|
|
|
|
};
|
|
|
|
|
|
|
|
const $hashtagsRepository: Provider = {
|
|
|
|
provide: DI.hashtagsRepository,
|
2023-08-16 17:51:28 +09:00
|
|
|
useFactory: (db: DataSource) => db.getRepository(MiHashtag),
|
2022-09-18 03:27:08 +09:00
|
|
|
inject: [DI.db],
|
|
|
|
};
|
|
|
|
|
|
|
|
const $abuseUserReportsRepository: Provider = {
|
|
|
|
provide: DI.abuseUserReportsRepository,
|
2023-08-16 17:51:28 +09:00
|
|
|
useFactory: (db: DataSource) => db.getRepository(MiAbuseUserReport),
|
2022-09-18 03:27:08 +09:00
|
|
|
inject: [DI.db],
|
|
|
|
};
|
|
|
|
|
|
|
|
const $registrationTicketsRepository: Provider = {
|
|
|
|
provide: DI.registrationTicketsRepository,
|
2023-08-16 17:51:28 +09:00
|
|
|
useFactory: (db: DataSource) => db.getRepository(MiRegistrationTicket),
|
2022-09-18 03:27:08 +09:00
|
|
|
inject: [DI.db],
|
|
|
|
};
|
|
|
|
|
|
|
|
const $authSessionsRepository: Provider = {
|
|
|
|
provide: DI.authSessionsRepository,
|
2023-08-16 17:51:28 +09:00
|
|
|
useFactory: (db: DataSource) => db.getRepository(MiAuthSession),
|
2022-09-18 03:27:08 +09:00
|
|
|
inject: [DI.db],
|
|
|
|
};
|
|
|
|
|
|
|
|
const $accessTokensRepository: Provider = {
|
|
|
|
provide: DI.accessTokensRepository,
|
2023-08-16 17:51:28 +09:00
|
|
|
useFactory: (db: DataSource) => db.getRepository(MiAccessToken),
|
2022-09-18 03:27:08 +09:00
|
|
|
inject: [DI.db],
|
|
|
|
};
|
|
|
|
|
|
|
|
const $signinsRepository: Provider = {
|
|
|
|
provide: DI.signinsRepository,
|
2023-08-16 17:51:28 +09:00
|
|
|
useFactory: (db: DataSource) => db.getRepository(MiSignin),
|
2022-09-18 03:27:08 +09:00
|
|
|
inject: [DI.db],
|
|
|
|
};
|
|
|
|
|
|
|
|
const $pagesRepository: Provider = {
|
|
|
|
provide: DI.pagesRepository,
|
2023-08-16 17:51:28 +09:00
|
|
|
useFactory: (db: DataSource) => db.getRepository(MiPage),
|
2022-09-18 03:27:08 +09:00
|
|
|
inject: [DI.db],
|
|
|
|
};
|
|
|
|
|
|
|
|
const $pageLikesRepository: Provider = {
|
|
|
|
provide: DI.pageLikesRepository,
|
2023-08-16 17:51:28 +09:00
|
|
|
useFactory: (db: DataSource) => db.getRepository(MiPageLike),
|
2022-09-18 03:27:08 +09:00
|
|
|
inject: [DI.db],
|
|
|
|
};
|
|
|
|
|
|
|
|
const $galleryPostsRepository: Provider = {
|
|
|
|
provide: DI.galleryPostsRepository,
|
2023-08-16 17:51:28 +09:00
|
|
|
useFactory: (db: DataSource) => db.getRepository(MiGalleryPost),
|
2022-09-18 03:27:08 +09:00
|
|
|
inject: [DI.db],
|
|
|
|
};
|
|
|
|
|
|
|
|
const $galleryLikesRepository: Provider = {
|
|
|
|
provide: DI.galleryLikesRepository,
|
2023-08-16 17:51:28 +09:00
|
|
|
useFactory: (db: DataSource) => db.getRepository(MiGalleryLike),
|
2022-09-18 03:27:08 +09:00
|
|
|
inject: [DI.db],
|
|
|
|
};
|
|
|
|
|
|
|
|
const $moderationLogsRepository: Provider = {
|
|
|
|
provide: DI.moderationLogsRepository,
|
2023-08-16 17:51:28 +09:00
|
|
|
useFactory: (db: DataSource) => db.getRepository(MiModerationLog),
|
2022-09-18 03:27:08 +09:00
|
|
|
inject: [DI.db],
|
|
|
|
};
|
|
|
|
|
|
|
|
const $clipsRepository: Provider = {
|
|
|
|
provide: DI.clipsRepository,
|
2023-08-16 17:51:28 +09:00
|
|
|
useFactory: (db: DataSource) => db.getRepository(MiClip),
|
2022-09-18 03:27:08 +09:00
|
|
|
inject: [DI.db],
|
|
|
|
};
|
|
|
|
|
|
|
|
const $clipNotesRepository: Provider = {
|
|
|
|
provide: DI.clipNotesRepository,
|
2023-08-16 17:51:28 +09:00
|
|
|
useFactory: (db: DataSource) => db.getRepository(MiClipNote),
|
2022-09-18 03:27:08 +09:00
|
|
|
inject: [DI.db],
|
|
|
|
};
|
|
|
|
|
2023-03-16 17:24:49 +09:00
|
|
|
const $clipFavoritesRepository: Provider = {
|
|
|
|
provide: DI.clipFavoritesRepository,
|
2023-08-16 17:51:28 +09:00
|
|
|
useFactory: (db: DataSource) => db.getRepository(MiClipFavorite),
|
2023-03-16 17:24:49 +09:00
|
|
|
inject: [DI.db],
|
|
|
|
};
|
|
|
|
|
2022-09-18 03:27:08 +09:00
|
|
|
const $antennasRepository: Provider = {
|
|
|
|
provide: DI.antennasRepository,
|
2023-08-16 17:51:28 +09:00
|
|
|
useFactory: (db: DataSource) => db.getRepository(MiAntenna),
|
2022-09-18 03:27:08 +09:00
|
|
|
inject: [DI.db],
|
|
|
|
};
|
|
|
|
|
|
|
|
const $promoNotesRepository: Provider = {
|
|
|
|
provide: DI.promoNotesRepository,
|
2023-08-16 17:51:28 +09:00
|
|
|
useFactory: (db: DataSource) => db.getRepository(MiPromoNote),
|
2022-09-18 03:27:08 +09:00
|
|
|
inject: [DI.db],
|
|
|
|
};
|
|
|
|
|
|
|
|
const $promoReadsRepository: Provider = {
|
|
|
|
provide: DI.promoReadsRepository,
|
2023-08-16 17:51:28 +09:00
|
|
|
useFactory: (db: DataSource) => db.getRepository(MiPromoRead),
|
2022-09-18 03:27:08 +09:00
|
|
|
inject: [DI.db],
|
|
|
|
};
|
|
|
|
|
|
|
|
const $relaysRepository: Provider = {
|
|
|
|
provide: DI.relaysRepository,
|
2023-08-16 17:51:28 +09:00
|
|
|
useFactory: (db: DataSource) => db.getRepository(MiRelay),
|
2022-09-18 03:27:08 +09:00
|
|
|
inject: [DI.db],
|
|
|
|
};
|
|
|
|
|
|
|
|
const $channelsRepository: Provider = {
|
|
|
|
provide: DI.channelsRepository,
|
2023-08-16 17:51:28 +09:00
|
|
|
useFactory: (db: DataSource) => db.getRepository(MiChannel),
|
2022-09-18 03:27:08 +09:00
|
|
|
inject: [DI.db],
|
|
|
|
};
|
|
|
|
|
|
|
|
const $channelFollowingsRepository: Provider = {
|
|
|
|
provide: DI.channelFollowingsRepository,
|
2023-08-16 17:51:28 +09:00
|
|
|
useFactory: (db: DataSource) => db.getRepository(MiChannelFollowing),
|
2022-09-18 03:27:08 +09:00
|
|
|
inject: [DI.db],
|
|
|
|
};
|
|
|
|
|
2023-03-31 11:30:27 +09:00
|
|
|
const $channelFavoritesRepository: Provider = {
|
|
|
|
provide: DI.channelFavoritesRepository,
|
2023-08-16 17:51:28 +09:00
|
|
|
useFactory: (db: DataSource) => db.getRepository(MiChannelFavorite),
|
2023-03-31 11:30:27 +09:00
|
|
|
inject: [DI.db],
|
|
|
|
};
|
|
|
|
|
2022-09-18 03:27:08 +09:00
|
|
|
const $registryItemsRepository: Provider = {
|
|
|
|
provide: DI.registryItemsRepository,
|
2023-08-16 17:51:28 +09:00
|
|
|
useFactory: (db: DataSource) => db.getRepository(MiRegistryItem),
|
2022-09-18 03:27:08 +09:00
|
|
|
inject: [DI.db],
|
|
|
|
};
|
|
|
|
|
|
|
|
const $webhooksRepository: Provider = {
|
|
|
|
provide: DI.webhooksRepository,
|
2023-08-16 17:51:28 +09:00
|
|
|
useFactory: (db: DataSource) => db.getRepository(MiWebhook),
|
2022-09-18 03:27:08 +09:00
|
|
|
inject: [DI.db],
|
|
|
|
};
|
|
|
|
|
|
|
|
const $adsRepository: Provider = {
|
|
|
|
provide: DI.adsRepository,
|
2023-08-16 17:51:28 +09:00
|
|
|
useFactory: (db: DataSource) => db.getRepository(MiAd),
|
2022-09-18 03:27:08 +09:00
|
|
|
inject: [DI.db],
|
|
|
|
};
|
|
|
|
|
|
|
|
const $passwordResetRequestsRepository: Provider = {
|
|
|
|
provide: DI.passwordResetRequestsRepository,
|
2023-08-16 17:51:28 +09:00
|
|
|
useFactory: (db: DataSource) => db.getRepository(MiPasswordResetRequest),
|
2022-09-18 03:27:08 +09:00
|
|
|
inject: [DI.db],
|
|
|
|
};
|
|
|
|
|
2022-12-25 09:09:46 +09:00
|
|
|
const $retentionAggregationsRepository: Provider = {
|
|
|
|
provide: DI.retentionAggregationsRepository,
|
2023-08-16 17:51:28 +09:00
|
|
|
useFactory: (db: DataSource) => db.getRepository(MiRetentionAggregation),
|
2022-12-25 09:09:46 +09:00
|
|
|
inject: [DI.db],
|
|
|
|
};
|
|
|
|
|
2023-01-05 13:59:48 +09:00
|
|
|
const $flashsRepository: Provider = {
|
|
|
|
provide: DI.flashsRepository,
|
2023-08-16 17:51:28 +09:00
|
|
|
useFactory: (db: DataSource) => db.getRepository(MiFlash),
|
2023-01-05 13:59:48 +09:00
|
|
|
inject: [DI.db],
|
|
|
|
};
|
|
|
|
|
|
|
|
const $flashLikesRepository: Provider = {
|
|
|
|
provide: DI.flashLikesRepository,
|
2023-08-16 17:51:28 +09:00
|
|
|
useFactory: (db: DataSource) => db.getRepository(MiFlashLike),
|
2023-01-05 13:59:48 +09:00
|
|
|
inject: [DI.db],
|
|
|
|
};
|
|
|
|
|
2023-01-12 21:02:26 +09:00
|
|
|
const $rolesRepository: Provider = {
|
|
|
|
provide: DI.rolesRepository,
|
2023-08-16 17:51:28 +09:00
|
|
|
useFactory: (db: DataSource) => db.getRepository(MiRole),
|
2023-01-12 21:02:26 +09:00
|
|
|
inject: [DI.db],
|
|
|
|
};
|
|
|
|
|
|
|
|
const $roleAssignmentsRepository: Provider = {
|
|
|
|
provide: DI.roleAssignmentsRepository,
|
2023-08-16 17:51:28 +09:00
|
|
|
useFactory: (db: DataSource) => db.getRepository(MiRoleAssignment),
|
2023-01-12 21:02:26 +09:00
|
|
|
inject: [DI.db],
|
|
|
|
};
|
|
|
|
|
2023-04-13 13:31:54 +09:00
|
|
|
const $userMemosRepository: Provider = {
|
|
|
|
provide: DI.userMemosRepository,
|
2023-08-16 17:51:28 +09:00
|
|
|
useFactory: (db: DataSource) => db.getRepository(MiUserMemo),
|
2023-04-13 13:17:32 +09:00
|
|
|
inject: [DI.db],
|
|
|
|
};
|
|
|
|
|
2024-01-19 20:51:49 +09:00
|
|
|
const $bubbleGameRecordsRepository: Provider = {
|
2024-01-11 18:13:39 +09:00
|
|
|
provide: DI.bubbleGameRecordsRepository,
|
|
|
|
useFactory: (db: DataSource) => db.getRepository(MiBubbleGameRecord),
|
|
|
|
inject: [DI.db],
|
|
|
|
};
|
|
|
|
|
2024-01-19 20:51:49 +09:00
|
|
|
const $reversiGamesRepository: Provider = {
|
|
|
|
provide: DI.reversiGamesRepository,
|
|
|
|
useFactory: (db: DataSource) => db.getRepository(MiReversiGame),
|
|
|
|
inject: [DI.db],
|
|
|
|
};
|
|
|
|
|
2022-09-18 03:27:08 +09:00
|
|
|
@Module({
|
|
|
|
imports: [
|
|
|
|
],
|
|
|
|
providers: [
|
|
|
|
$usersRepository,
|
|
|
|
$notesRepository,
|
|
|
|
$announcementsRepository,
|
|
|
|
$announcementReadsRepository,
|
|
|
|
$appsRepository,
|
2023-10-21 18:38:07 +09:00
|
|
|
$avatarDecorationsRepository,
|
2022-09-18 03:27:08 +09:00
|
|
|
$noteFavoritesRepository,
|
|
|
|
$noteThreadMutingsRepository,
|
|
|
|
$noteReactionsRepository,
|
|
|
|
$noteUnreadsRepository,
|
|
|
|
$pollsRepository,
|
|
|
|
$pollVotesRepository,
|
|
|
|
$userProfilesRepository,
|
|
|
|
$userKeypairsRepository,
|
|
|
|
$userPendingsRepository,
|
|
|
|
$userSecurityKeysRepository,
|
|
|
|
$userPublickeysRepository,
|
|
|
|
$userListsRepository,
|
2023-05-19 10:06:12 +09:00
|
|
|
$userListFavoritesRepository,
|
2023-10-03 20:26:11 +09:00
|
|
|
$userListMembershipsRepository,
|
2022-09-18 03:27:08 +09:00
|
|
|
$userNotePiningsRepository,
|
|
|
|
$userIpsRepository,
|
|
|
|
$usedUsernamesRepository,
|
|
|
|
$followingsRepository,
|
|
|
|
$followRequestsRepository,
|
|
|
|
$instancesRepository,
|
|
|
|
$emojisRepository,
|
|
|
|
$driveFilesRepository,
|
|
|
|
$driveFoldersRepository,
|
|
|
|
$metasRepository,
|
|
|
|
$mutingsRepository,
|
2023-03-08 08:56:09 +09:00
|
|
|
$renoteMutingsRepository,
|
2022-09-18 03:27:08 +09:00
|
|
|
$blockingsRepository,
|
|
|
|
$swSubscriptionsRepository,
|
|
|
|
$hashtagsRepository,
|
|
|
|
$abuseUserReportsRepository,
|
|
|
|
$registrationTicketsRepository,
|
|
|
|
$authSessionsRepository,
|
|
|
|
$accessTokensRepository,
|
|
|
|
$signinsRepository,
|
|
|
|
$pagesRepository,
|
|
|
|
$pageLikesRepository,
|
|
|
|
$galleryPostsRepository,
|
|
|
|
$galleryLikesRepository,
|
|
|
|
$moderationLogsRepository,
|
|
|
|
$clipsRepository,
|
|
|
|
$clipNotesRepository,
|
2023-03-16 17:24:49 +09:00
|
|
|
$clipFavoritesRepository,
|
2022-09-18 03:27:08 +09:00
|
|
|
$antennasRepository,
|
|
|
|
$promoNotesRepository,
|
|
|
|
$promoReadsRepository,
|
|
|
|
$relaysRepository,
|
|
|
|
$channelsRepository,
|
|
|
|
$channelFollowingsRepository,
|
2023-03-31 11:30:27 +09:00
|
|
|
$channelFavoritesRepository,
|
2022-09-18 03:27:08 +09:00
|
|
|
$registryItemsRepository,
|
|
|
|
$webhooksRepository,
|
|
|
|
$adsRepository,
|
|
|
|
$passwordResetRequestsRepository,
|
2022-12-25 09:09:46 +09:00
|
|
|
$retentionAggregationsRepository,
|
2023-01-12 21:02:26 +09:00
|
|
|
$rolesRepository,
|
|
|
|
$roleAssignmentsRepository,
|
2023-01-05 13:59:48 +09:00
|
|
|
$flashsRepository,
|
|
|
|
$flashLikesRepository,
|
2023-04-13 13:31:54 +09:00
|
|
|
$userMemosRepository,
|
2024-01-11 18:13:39 +09:00
|
|
|
$bubbleGameRecordsRepository,
|
2024-01-19 20:51:49 +09:00
|
|
|
$reversiGamesRepository,
|
2022-09-18 03:27:08 +09:00
|
|
|
],
|
|
|
|
exports: [
|
|
|
|
$usersRepository,
|
|
|
|
$notesRepository,
|
|
|
|
$announcementsRepository,
|
|
|
|
$announcementReadsRepository,
|
|
|
|
$appsRepository,
|
2023-10-21 18:38:07 +09:00
|
|
|
$avatarDecorationsRepository,
|
2022-09-18 03:27:08 +09:00
|
|
|
$noteFavoritesRepository,
|
|
|
|
$noteThreadMutingsRepository,
|
|
|
|
$noteReactionsRepository,
|
|
|
|
$noteUnreadsRepository,
|
|
|
|
$pollsRepository,
|
|
|
|
$pollVotesRepository,
|
|
|
|
$userProfilesRepository,
|
|
|
|
$userKeypairsRepository,
|
|
|
|
$userPendingsRepository,
|
|
|
|
$userSecurityKeysRepository,
|
|
|
|
$userPublickeysRepository,
|
|
|
|
$userListsRepository,
|
2023-05-19 10:06:12 +09:00
|
|
|
$userListFavoritesRepository,
|
2023-10-03 20:26:11 +09:00
|
|
|
$userListMembershipsRepository,
|
2022-09-18 03:27:08 +09:00
|
|
|
$userNotePiningsRepository,
|
|
|
|
$userIpsRepository,
|
|
|
|
$usedUsernamesRepository,
|
|
|
|
$followingsRepository,
|
|
|
|
$followRequestsRepository,
|
|
|
|
$instancesRepository,
|
|
|
|
$emojisRepository,
|
|
|
|
$driveFilesRepository,
|
|
|
|
$driveFoldersRepository,
|
|
|
|
$metasRepository,
|
|
|
|
$mutingsRepository,
|
2023-03-08 08:56:09 +09:00
|
|
|
$renoteMutingsRepository,
|
2022-09-18 03:27:08 +09:00
|
|
|
$blockingsRepository,
|
|
|
|
$swSubscriptionsRepository,
|
|
|
|
$hashtagsRepository,
|
|
|
|
$abuseUserReportsRepository,
|
|
|
|
$registrationTicketsRepository,
|
|
|
|
$authSessionsRepository,
|
|
|
|
$accessTokensRepository,
|
|
|
|
$signinsRepository,
|
|
|
|
$pagesRepository,
|
|
|
|
$pageLikesRepository,
|
|
|
|
$galleryPostsRepository,
|
|
|
|
$galleryLikesRepository,
|
|
|
|
$moderationLogsRepository,
|
|
|
|
$clipsRepository,
|
|
|
|
$clipNotesRepository,
|
2023-03-16 17:24:49 +09:00
|
|
|
$clipFavoritesRepository,
|
2022-09-18 03:27:08 +09:00
|
|
|
$antennasRepository,
|
|
|
|
$promoNotesRepository,
|
|
|
|
$promoReadsRepository,
|
|
|
|
$relaysRepository,
|
|
|
|
$channelsRepository,
|
|
|
|
$channelFollowingsRepository,
|
2023-03-31 11:30:27 +09:00
|
|
|
$channelFavoritesRepository,
|
2022-09-18 03:27:08 +09:00
|
|
|
$registryItemsRepository,
|
|
|
|
$webhooksRepository,
|
|
|
|
$adsRepository,
|
|
|
|
$passwordResetRequestsRepository,
|
2022-12-25 09:09:46 +09:00
|
|
|
$retentionAggregationsRepository,
|
2023-01-12 21:02:26 +09:00
|
|
|
$rolesRepository,
|
|
|
|
$roleAssignmentsRepository,
|
2023-01-05 13:59:48 +09:00
|
|
|
$flashsRepository,
|
|
|
|
$flashLikesRepository,
|
2023-04-13 13:31:54 +09:00
|
|
|
$userMemosRepository,
|
2024-01-11 18:13:39 +09:00
|
|
|
$bubbleGameRecordsRepository,
|
2024-01-19 20:51:49 +09:00
|
|
|
$reversiGamesRepository,
|
2022-09-18 03:27:08 +09:00
|
|
|
],
|
|
|
|
})
|
|
|
|
export class RepositoryModule {}
|