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