diff --git a/eslint.config.js b/eslint.config.js index b7799a84..0d0201fa 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -41,6 +41,7 @@ export default [ ...reactHooks.configs.recommended.rules, "@typescript-eslint/no-unsafe-function-type": "off", "@typescript-eslint/consistent-type-definitions": "off", + "@typescript-eslint/consistent-type-imports": "error", "no-return-await": "error", "semi": ["error", "always"], "eol-last": ["error", "always"], diff --git a/src/domain/authentication/login/login.ts b/src/domain/authentication/login/login.ts index 3f710f03..74a5d451 100644 --- a/src/domain/authentication/login/login.ts +++ b/src/domain/authentication/login/login.ts @@ -1,5 +1,5 @@ -import { Identity } from '^/integrations/authentication'; +import type { Identity } from '^/integrations/authentication'; import getCreatorByEmail from '^/domain/creator/getByEmail'; import registerCreator from '^/domain/creator/register'; diff --git a/src/domain/comic/create/types.ts b/src/domain/comic/create/types.ts index 741c73b3..f0d0a149 100644 --- a/src/domain/comic/create/types.ts +++ b/src/domain/comic/create/types.ts @@ -1,5 +1,5 @@ -import { DataModel } from '../types'; +import type { DataModel } from '../types'; type ValidationModel = Pick; diff --git a/src/domain/comic/create/validateData.ts b/src/domain/comic/create/validateData.ts index 54eccf3a..7a55d8ca 100644 --- a/src/domain/comic/create/validateData.ts +++ b/src/domain/comic/create/validateData.ts @@ -1,10 +1,11 @@ -import validator, { ValidationSchema } from '^/integrations/validation'; +import type { ValidationSchema } from '^/integrations/validation'; +import validator from '^/integrations/validation'; import { requiredIdValidation } from '^/domain/definitions'; import InvalidComic from './InvalidComic'; -import { ValidationModel } from './types'; +import type { ValidationModel } from './types'; const schema: ValidationSchema = { diff --git a/src/domain/comic/getByIdAggregated/getByIdAggregated.ts b/src/domain/comic/getByIdAggregated/getByIdAggregated.ts index c224b082..1615346c 100644 --- a/src/domain/comic/getByIdAggregated/getByIdAggregated.ts +++ b/src/domain/comic/getByIdAggregated/getByIdAggregated.ts @@ -1,5 +1,6 @@ -import aggregate, { AggregatedData } from '../aggregate'; +import type { AggregatedData } from '../aggregate'; +import aggregate from '../aggregate'; import getById from '../getById'; export default async function getByIdAggregated(id: string): Promise diff --git a/src/domain/comment/create/types.ts b/src/domain/comment/create/types.ts index 4a836125..949aacec 100644 --- a/src/domain/comment/create/types.ts +++ b/src/domain/comment/create/types.ts @@ -1,5 +1,5 @@ -import { DataModel } from '../types'; +import type { DataModel } from '../types'; type ValidationModel = Pick; diff --git a/src/domain/comment/create/validateData.ts b/src/domain/comment/create/validateData.ts index c0c1d657..d1b3176e 100644 --- a/src/domain/comment/create/validateData.ts +++ b/src/domain/comment/create/validateData.ts @@ -1,9 +1,10 @@ -import validator, { ValidationSchema } from '^/integrations/validation'; +import type { ValidationSchema } from '^/integrations/validation'; +import validator from '^/integrations/validation'; import { MESSAGE_MAX_LENGTH } from '../definitions'; import InvalidComment from './InvalidComment'; -import { ValidationModel } from './types'; +import type { ValidationModel } from './types'; const schema: ValidationSchema = { diff --git a/src/domain/common/validateRange/validateRange.ts b/src/domain/common/validateRange/validateRange.ts index 48b9d34e..9c3f1019 100644 --- a/src/domain/common/validateRange/validateRange.ts +++ b/src/domain/common/validateRange/validateRange.ts @@ -1,7 +1,8 @@ -import validator, { ValidationSchema } from '^/integrations/validation'; +import type { ValidationSchema } from '^/integrations/validation'; +import validator from '^/integrations/validation'; -import { Range } from './types'; +import type { Range } from './types'; import InvalidRange from './InvalidRange'; diff --git a/src/domain/creator.metrics/types.ts b/src/domain/creator.metrics/types.ts index 7fc1e77e..c8a9e3d2 100644 --- a/src/domain/creator.metrics/types.ts +++ b/src/domain/creator.metrics/types.ts @@ -1,5 +1,5 @@ -import { BaseDataModel, CountOperation } from '../types'; +import type { BaseDataModel, CountOperation } from '../types'; type DataModel = BaseDataModel & { diff --git a/src/domain/creator/aggregate/aggregate.ts b/src/domain/creator/aggregate/aggregate.ts index c236794c..cb24253f 100644 --- a/src/domain/creator/aggregate/aggregate.ts +++ b/src/domain/creator/aggregate/aggregate.ts @@ -2,8 +2,8 @@ import getMetrics from '^/domain/creator.metrics/getByCreator'; import getImageData from '^/domain/image/getById'; -import { DataModel } from '../types'; -import { AggregatedData } from './types'; +import type { DataModel } from '../types'; +import type { AggregatedData } from './types'; export default async function aggregate(data: DataModel): Promise { diff --git a/src/domain/creator/create/types.ts b/src/domain/creator/create/types.ts index 8dc473e4..55312de7 100644 --- a/src/domain/creator/create/types.ts +++ b/src/domain/creator/create/types.ts @@ -1,5 +1,5 @@ -import { DataModel } from '../types'; +import type { DataModel } from '../types'; type ValidationModel = Pick; diff --git a/src/domain/creator/create/validateData.ts b/src/domain/creator/create/validateData.ts index 97514c0c..a35d4a88 100644 --- a/src/domain/creator/create/validateData.ts +++ b/src/domain/creator/create/validateData.ts @@ -1,11 +1,12 @@ -import validator, { ValidationSchema } from '^/integrations/validation'; +import type { ValidationSchema } from '^/integrations/validation'; +import validator from '^/integrations/validation'; import { optionalIdValidation } from '^/domain/definitions'; import InvalidCreator from '../InvalidCreator'; import { fullNameValidation } from '../definitions'; -import { ValidationModel } from './types'; +import type { ValidationModel } from './types'; const schema: ValidationSchema = { diff --git a/src/domain/creator/definitions.ts b/src/domain/creator/definitions.ts index d7ce76f5..f38a70c3 100644 --- a/src/domain/creator/definitions.ts +++ b/src/domain/creator/definitions.ts @@ -1,7 +1,8 @@ import type { Validation } from '^/integrations/validation'; -import { SortOrder, SortOrders } from '../definitions'; +import type { SortOrder} from '../definitions'; +import { SortOrders } from '../definitions'; export const RECORD_TYPE = 'creator'; export const EVENT_CHANNEL = 'creator'; diff --git a/src/domain/creator/generateNickname/retrieveByStartNickname.ts b/src/domain/creator/generateNickname/retrieveByStartNickname.ts index 742637f1..6e318828 100644 --- a/src/domain/creator/generateNickname/retrieveByStartNickname.ts +++ b/src/domain/creator/generateNickname/retrieveByStartNickname.ts @@ -1,5 +1,6 @@ -import database, { RecordSort, SortDirections } from '^/integrations/database'; +import type { RecordSort} from '^/integrations/database'; +import database, { SortDirections } from '^/integrations/database'; import { RECORD_TYPE } from '../definitions'; import type { DataModel } from '../types'; diff --git a/src/domain/creator/getByIdAggregated/getByIdAggregated.ts b/src/domain/creator/getByIdAggregated/getByIdAggregated.ts index c224b082..1615346c 100644 --- a/src/domain/creator/getByIdAggregated/getByIdAggregated.ts +++ b/src/domain/creator/getByIdAggregated/getByIdAggregated.ts @@ -1,5 +1,6 @@ -import aggregate, { AggregatedData } from '../aggregate'; +import type { AggregatedData } from '../aggregate'; +import aggregate from '../aggregate'; import getById from '../getById'; export default async function getByIdAggregated(id: string): Promise diff --git a/src/domain/creator/getByNicknameAggregated/getByNicknameAggregated.ts b/src/domain/creator/getByNicknameAggregated/getByNicknameAggregated.ts index 35f69043..f1bc7e17 100644 --- a/src/domain/creator/getByNicknameAggregated/getByNicknameAggregated.ts +++ b/src/domain/creator/getByNicknameAggregated/getByNicknameAggregated.ts @@ -1,5 +1,6 @@ -import aggregate, { AggregatedData } from '../aggregate'; +import type { AggregatedData } from '../aggregate'; +import aggregate from '../aggregate'; import getByNickname from '../getByNickname'; export default async function getByNicknameAggregated(nickname: string): Promise diff --git a/src/domain/creator/getMe/getMe.ts b/src/domain/creator/getMe/getMe.ts index 491f5480..ed47da31 100644 --- a/src/domain/creator/getMe/getMe.ts +++ b/src/domain/creator/getMe/getMe.ts @@ -1,5 +1,5 @@ -import { Requester } from '^/domain/authentication'; +import type { Requester } from '^/domain/authentication'; import getById from '../getById'; import type { DataModel } from '../types'; diff --git a/src/domain/creator/getMeAggregated/getMeAggregated.ts b/src/domain/creator/getMeAggregated/getMeAggregated.ts index 690d10d0..d9850093 100644 --- a/src/domain/creator/getMeAggregated/getMeAggregated.ts +++ b/src/domain/creator/getMeAggregated/getMeAggregated.ts @@ -1,7 +1,8 @@ -import { Requester } from '^/domain/authentication'; +import type { Requester } from '^/domain/authentication'; -import aggregate, { AggregatedData } from '../aggregate'; +import type { AggregatedData } from '../aggregate'; +import aggregate from '../aggregate'; import getMe from '../getMe'; export default async function getMeAggregated(requester: Requester): Promise diff --git a/src/domain/creator/getOthers/getOthers.ts b/src/domain/creator/getOthers/getOthers.ts index 06abe6e4..9b1eac38 100644 --- a/src/domain/creator/getOthers/getOthers.ts +++ b/src/domain/creator/getOthers/getOthers.ts @@ -1,7 +1,9 @@ -import database, { QueryStatement, RecordQuery, RecordSort, SortDirections } from '^/integrations/database'; +import type { QueryStatement, RecordQuery, RecordSort} from '^/integrations/database'; +import database, { SortDirections } from '^/integrations/database'; -import { RECORD_TYPE, SortOrder, SortOrders } from '../definitions'; +import type { SortOrder} from '../definitions'; +import { RECORD_TYPE, SortOrders } from '../definitions'; import type { DataModel } from '../types'; export default async function getOthers(ids: string[], order: SortOrder, limit: number, offset: number, search: string | undefined = undefined): Promise diff --git a/src/domain/creator/register/publish.ts b/src/domain/creator/register/publish.ts index 3291345e..85a9384d 100644 --- a/src/domain/creator/register/publish.ts +++ b/src/domain/creator/register/publish.ts @@ -4,7 +4,7 @@ import eventBroker from '^/integrations/eventbroker'; import { EVENT_CHANNEL } from '../definitions'; import { EVENT_NAME } from './definitions'; -import { RegisteredPublication } from './types'; +import type { RegisteredPublication } from './types'; export default async function publish(creatorId: string): Promise { diff --git a/src/domain/creator/register/subscribe.ts b/src/domain/creator/register/subscribe.ts index 2e8a78ee..0158f9c6 100644 --- a/src/domain/creator/register/subscribe.ts +++ b/src/domain/creator/register/subscribe.ts @@ -4,7 +4,7 @@ import eventBroker from '^/integrations/eventbroker'; import { EVENT_CHANNEL } from '../definitions'; import { EVENT_NAME } from './definitions'; -import { RegisteredEventHandler, RegisteredSubscription } from './types'; +import type { RegisteredEventHandler, RegisteredSubscription } from './types'; export default async function subscribe(handler: RegisteredEventHandler): Promise { diff --git a/src/domain/creator/register/types.ts b/src/domain/creator/register/types.ts index 3ba9170d..901a0f72 100644 --- a/src/domain/creator/register/types.ts +++ b/src/domain/creator/register/types.ts @@ -1,5 +1,5 @@ -import { Publication, Subscription } from '^/integrations/eventbroker'; +import type { Publication, Subscription } from '^/integrations/eventbroker'; export type RegisteredEventData = { creatorId: string; diff --git a/src/domain/creator/types.ts b/src/domain/creator/types.ts index d657f475..27a22866 100644 --- a/src/domain/creator/types.ts +++ b/src/domain/creator/types.ts @@ -1,5 +1,5 @@ -import { BaseDataModel, CountOperation } from '../types'; +import type { BaseDataModel, CountOperation } from '../types'; type DataModel = BaseDataModel & { diff --git a/src/domain/creator/updateFullName/types.ts b/src/domain/creator/updateFullName/types.ts index 50644122..888dbeb7 100644 --- a/src/domain/creator/updateFullName/types.ts +++ b/src/domain/creator/updateFullName/types.ts @@ -1,5 +1,5 @@ -import { DataModel } from '../types'; +import type { DataModel } from '../types'; type ValidationModel = Pick; diff --git a/src/domain/creator/updateFullName/updateFullName.ts b/src/domain/creator/updateFullName/updateFullName.ts index f026267b..13a3aa8d 100644 --- a/src/domain/creator/updateFullName/updateFullName.ts +++ b/src/domain/creator/updateFullName/updateFullName.ts @@ -1,5 +1,5 @@ -import { Requester } from '^/domain/authentication'; +import type { Requester } from '^/domain/authentication'; import update from '../update'; import validateData from './validateData'; diff --git a/src/domain/creator/updateFullName/validateData.ts b/src/domain/creator/updateFullName/validateData.ts index ba45f069..6a81c104 100644 --- a/src/domain/creator/updateFullName/validateData.ts +++ b/src/domain/creator/updateFullName/validateData.ts @@ -1,9 +1,10 @@ -import validator, { ValidationSchema } from '^/integrations/validation'; +import type { ValidationSchema } from '^/integrations/validation'; +import validator from '^/integrations/validation'; import InvalidCreator from '../InvalidCreator'; import { fullNameValidation } from '../definitions'; -import { ValidationModel } from './types'; +import type { ValidationModel } from './types'; const schema: ValidationSchema = { diff --git a/src/domain/creator/updateNickname/updateNickname.ts b/src/domain/creator/updateNickname/updateNickname.ts index 7ba97e0f..21696e69 100644 --- a/src/domain/creator/updateNickname/updateNickname.ts +++ b/src/domain/creator/updateNickname/updateNickname.ts @@ -1,5 +1,5 @@ -import { Requester } from '^/domain/authentication'; +import type { Requester } from '^/domain/authentication'; import cleanNickname from '../cleanNickname'; import update from '../update'; diff --git a/src/domain/image/getById/retrieveData.ts b/src/domain/image/getById/retrieveData.ts index 2813caf2..1ad5d586 100644 --- a/src/domain/image/getById/retrieveData.ts +++ b/src/domain/image/getById/retrieveData.ts @@ -2,7 +2,7 @@ import database from '^/integrations/database'; import { RECORD_TYPE } from '../definitions'; -import { DataModel } from '../types'; +import type { DataModel } from '../types'; export default async function retrieveData(id: string): Promise { diff --git a/src/domain/image/save/validateData.ts b/src/domain/image/save/validateData.ts index 78f3e458..eef5f0c2 100644 --- a/src/domain/image/save/validateData.ts +++ b/src/domain/image/save/validateData.ts @@ -1,8 +1,9 @@ -import validator, { ValidationSchema } from '^/integrations/validation'; +import type { ValidationSchema } from '^/integrations/validation'; +import validator from '^/integrations/validation'; import { requiredStringValidation } from '../definitions'; -import { DataModel } from '../types'; +import type { DataModel } from '../types'; import InvalidImage from './InvalidImage'; const schema: ValidationSchema = diff --git a/src/domain/image/types.ts b/src/domain/image/types.ts index ba6ba5b9..e93c8977 100644 --- a/src/domain/image/types.ts +++ b/src/domain/image/types.ts @@ -1,5 +1,5 @@ -import { BaseDataModel } from '../types'; +import type { BaseDataModel } from '../types'; type ImageData = { readonly dataUrl: string; diff --git a/src/domain/image/validate/validate.ts b/src/domain/image/validate/validate.ts index f470bd20..d1f53abc 100644 --- a/src/domain/image/validate/validate.ts +++ b/src/domain/image/validate/validate.ts @@ -1,5 +1,6 @@ -import validator, { ValidationSchema } from '^/integrations/validation'; +import type { ValidationSchema } from '^/integrations/validation'; +import validator from '^/integrations/validation'; import type { MetaData } from '../types'; diff --git a/src/domain/notification/aggregate/aggregate.ts b/src/domain/notification/aggregate/aggregate.ts index edc238e8..ab54dd15 100644 --- a/src/domain/notification/aggregate/aggregate.ts +++ b/src/domain/notification/aggregate/aggregate.ts @@ -1,5 +1,5 @@ -import { Requester } from '^/domain/authentication'; +import type { Requester } from '^/domain/authentication'; import { default as getPostData } from '^/domain/post/getByIdAggregated'; import getRelationData from '^/domain/relation/getAggregated'; diff --git a/src/domain/notification/aggregate/types.ts b/src/domain/notification/aggregate/types.ts index a708f710..c9363af0 100644 --- a/src/domain/notification/aggregate/types.ts +++ b/src/domain/notification/aggregate/types.ts @@ -2,7 +2,7 @@ import type { AggregatedData as AggregatedPostData } from '^/domain/post/aggregate'; import type { AggregatedData as AggregatedRelationData } from '^/domain/relation/aggregate'; -import { DataModel } from '../types'; +import type { DataModel } from '../types'; type AggregatedData = Pick & { diff --git a/src/domain/notification/create/create.ts b/src/domain/notification/create/create.ts index cc62b918..279817e2 100644 --- a/src/domain/notification/create/create.ts +++ b/src/domain/notification/create/create.ts @@ -1,7 +1,7 @@ import logger from '^/integrations/logging'; -import { Type } from '../definitions'; +import type { Type } from '../definitions'; import createData from './createData'; import insertData from './insertData'; diff --git a/src/domain/notification/create/createData.ts b/src/domain/notification/create/createData.ts index 36c2304e..ec38349c 100644 --- a/src/domain/notification/create/createData.ts +++ b/src/domain/notification/create/createData.ts @@ -1,7 +1,7 @@ import { generateId } from '^/integrations/utilities/crypto'; -import { DataModel } from '../types'; +import type { DataModel } from '../types'; export default function createData(type: string, senderId: string, receiverId: string, postId: string | undefined = undefined): DataModel { diff --git a/src/domain/notification/create/insertData.ts b/src/domain/notification/create/insertData.ts index 05efd4c9..aa1171c6 100644 --- a/src/domain/notification/create/insertData.ts +++ b/src/domain/notification/create/insertData.ts @@ -2,7 +2,7 @@ import database from '^/integrations/database'; import { RECORD_TYPE } from '../definitions'; -import { DataModel } from '../types'; +import type { DataModel } from '../types'; export default async function insertData(data: DataModel): Promise { diff --git a/src/domain/notification/getByIdAggregated/getByIdAggregated.ts b/src/domain/notification/getByIdAggregated/getByIdAggregated.ts index 6a54332d..1cf39382 100644 --- a/src/domain/notification/getByIdAggregated/getByIdAggregated.ts +++ b/src/domain/notification/getByIdAggregated/getByIdAggregated.ts @@ -1,7 +1,8 @@ -import { Requester } from '^/domain/authentication'; +import type { Requester } from '^/domain/authentication'; -import aggregate, { AggregatedData } from '../aggregate'; +import type { AggregatedData } from '../aggregate'; +import aggregate from '../aggregate'; import getById from '../getById'; export default async function getByIdAggregated(requester: Requester, id: string): Promise diff --git a/src/domain/notification/getRecent/getRecent.ts b/src/domain/notification/getRecent/getRecent.ts index 37e8a54f..36f7be6e 100644 --- a/src/domain/notification/getRecent/getRecent.ts +++ b/src/domain/notification/getRecent/getRecent.ts @@ -1,5 +1,6 @@ -import database, { RecordQuery, RecordSort, SortDirections } from '^/integrations/database'; +import type { RecordQuery, RecordSort} from '^/integrations/database'; +import database, { SortDirections } from '^/integrations/database'; import { RECORD_TYPE } from '../definitions'; import type { DataModel } from '../types'; diff --git a/src/domain/notification/getRecentAggregated/getRecentAggregated.ts b/src/domain/notification/getRecentAggregated/getRecentAggregated.ts index 5fd64b6e..0d9384f3 100644 --- a/src/domain/notification/getRecentAggregated/getRecentAggregated.ts +++ b/src/domain/notification/getRecentAggregated/getRecentAggregated.ts @@ -1,9 +1,11 @@ -import { Requester } from '^/domain/authentication'; +import type { Requester } from '^/domain/authentication'; import filterResolved from '^/domain/common/filterResolved'; -import validateRange, { Range } from '^/domain/common/validateRange'; +import type { Range } from '^/domain/common/validateRange'; +import validateRange from '^/domain/common/validateRange'; -import aggregate, { AggregatedData } from '../aggregate'; +import type { AggregatedData } from '../aggregate'; +import aggregate from '../aggregate'; import getRecent from '../getRecent'; export default async function getRecentAggregated(requester: Requester, range: Range): Promise diff --git a/src/domain/post.metrics/types.ts b/src/domain/post.metrics/types.ts index 0147a6eb..25b91fc3 100644 --- a/src/domain/post.metrics/types.ts +++ b/src/domain/post.metrics/types.ts @@ -1,5 +1,5 @@ -import { BaseDataModel, CountOperation } from '../types'; +import type { BaseDataModel, CountOperation } from '../types'; type DataModel = BaseDataModel & { diff --git a/src/domain/post/aggregate/aggregate.ts b/src/domain/post/aggregate/aggregate.ts index 4f4b0be6..75186a28 100644 --- a/src/domain/post/aggregate/aggregate.ts +++ b/src/domain/post/aggregate/aggregate.ts @@ -1,5 +1,5 @@ -import { Requester } from '^/domain/authentication'; +import type { Requester } from '^/domain/authentication'; import getComicData from '^/domain/comic/getByIdAggregated'; import getCommentData from '^/domain/comment/getById'; import getMetrics from '^/domain/post.metrics/getByPost'; diff --git a/src/domain/post/create/publish.ts b/src/domain/post/create/publish.ts index 96157cef..6d467c0b 100644 --- a/src/domain/post/create/publish.ts +++ b/src/domain/post/create/publish.ts @@ -4,7 +4,7 @@ import eventBroker from '^/integrations/eventbroker'; import { EVENT_CHANNEL } from '../definitions'; import { EVENT_NAME } from './definitions'; -import { CreatedPublication } from './types'; +import type { CreatedPublication } from './types'; export default async function publish(creatorId: string, postId: string, parentId?: string): Promise { diff --git a/src/domain/post/create/subscribe.ts b/src/domain/post/create/subscribe.ts index efa06a5d..ebd46cbd 100644 --- a/src/domain/post/create/subscribe.ts +++ b/src/domain/post/create/subscribe.ts @@ -4,7 +4,7 @@ import eventBroker from '^/integrations/eventbroker'; import { EVENT_CHANNEL } from '../definitions'; import { EVENT_NAME } from './definitions'; -import { CreatedEventHandler, CreatedSubscription } from './types'; +import type { CreatedEventHandler, CreatedSubscription } from './types'; export default async function subscribe(handler: CreatedEventHandler): Promise { diff --git a/src/domain/post/create/types.ts b/src/domain/post/create/types.ts index 73aa941b..d8dba069 100644 --- a/src/domain/post/create/types.ts +++ b/src/domain/post/create/types.ts @@ -1,7 +1,7 @@ -import { Publication, Subscription } from '^/integrations/eventbroker'; +import type { Publication, Subscription } from '^/integrations/eventbroker'; -import { DataModel } from '../types'; +import type { DataModel } from '../types'; export type ValidationModel = Pick; diff --git a/src/domain/post/create/validateData.ts b/src/domain/post/create/validateData.ts index 2283686c..9ae6e3d8 100644 --- a/src/domain/post/create/validateData.ts +++ b/src/domain/post/create/validateData.ts @@ -1,10 +1,11 @@ -import validator, { ValidationSchema } from '^/integrations/validation'; +import type { ValidationSchema } from '^/integrations/validation'; +import validator from '^/integrations/validation'; import { optionalIdValidation, requiredIdValidation } from '^/domain/definitions'; import InvalidPost from './InvalidPost'; -import { ValidationModel } from './types'; +import type { ValidationModel } from './types'; const schema: ValidationSchema = { diff --git a/src/domain/post/createWithComic/createWithComic.ts b/src/domain/post/createWithComic/createWithComic.ts index f6d1fdde..797e55af 100644 --- a/src/domain/post/createWithComic/createWithComic.ts +++ b/src/domain/post/createWithComic/createWithComic.ts @@ -1,5 +1,5 @@ -import { Requester } from '^/domain/authentication'; +import type { Requester } from '^/domain/authentication'; import createComic from '^/domain/comic/create'; diff --git a/src/domain/post/createWithComment/createWithComment.ts b/src/domain/post/createWithComment/createWithComment.ts index 8303cf23..d32d799a 100644 --- a/src/domain/post/createWithComment/createWithComment.ts +++ b/src/domain/post/createWithComment/createWithComment.ts @@ -1,5 +1,5 @@ -import { Requester } from '^/domain/authentication'; +import type { Requester } from '^/domain/authentication'; import createComment from '^/domain/comment/create'; diff --git a/src/domain/post/explore/explore.ts b/src/domain/post/explore/explore.ts index 1bea4e24..7d6e0cc4 100644 --- a/src/domain/post/explore/explore.ts +++ b/src/domain/post/explore/explore.ts @@ -1,5 +1,5 @@ -import { Requester } from '^/domain/authentication'; +import type { Requester } from '^/domain/authentication'; import retrieveRelationsByFollower from '^/domain/relation/getFollowing'; import type { DataModel } from '../types'; diff --git a/src/domain/post/explore/retrieveData.ts b/src/domain/post/explore/retrieveData.ts index 7074715b..a3178c6d 100644 --- a/src/domain/post/explore/retrieveData.ts +++ b/src/domain/post/explore/retrieveData.ts @@ -1,5 +1,6 @@ -import database, { RecordQuery, RecordSort, SortDirections } from '^/integrations/database'; +import type { RecordQuery, RecordSort} from '^/integrations/database'; +import database, { SortDirections } from '^/integrations/database'; import { RECORD_TYPE } from '../definitions'; import type { DataModel } from '../types'; diff --git a/src/domain/post/exploreAggregated/exploreAggregated.ts b/src/domain/post/exploreAggregated/exploreAggregated.ts index e04e245e..2c22398a 100644 --- a/src/domain/post/exploreAggregated/exploreAggregated.ts +++ b/src/domain/post/exploreAggregated/exploreAggregated.ts @@ -1,9 +1,11 @@ -import { Requester } from '^/domain/authentication'; +import type { Requester } from '^/domain/authentication'; import filterResolved from '^/domain/common/filterResolved'; -import validateRange, { Range } from '^/domain/common/validateRange'; +import type { Range } from '^/domain/common/validateRange'; +import validateRange from '^/domain/common/validateRange'; -import aggregate, { AggregatedData } from '../aggregate'; +import type { AggregatedData } from '../aggregate'; +import aggregate from '../aggregate'; import explore from '../explore'; export default async function exploreAggregated(requester: Requester, range: Range): Promise diff --git a/src/domain/post/getByCreator/getByCreator.ts b/src/domain/post/getByCreator/getByCreator.ts index 73202dfe..19cbc950 100644 --- a/src/domain/post/getByCreator/getByCreator.ts +++ b/src/domain/post/getByCreator/getByCreator.ts @@ -1,5 +1,6 @@ -import database, { RecordQuery, RecordSort, SortDirections } from '^/integrations/database'; +import type { RecordQuery, RecordSort} from '^/integrations/database'; +import database, { SortDirections } from '^/integrations/database'; import { RECORD_TYPE } from '../definitions'; import type { DataModel } from '../types'; diff --git a/src/domain/post/getByCreatorAggregated/getByCreatorAggregated.ts b/src/domain/post/getByCreatorAggregated/getByCreatorAggregated.ts index 9d0b421a..92557fbd 100644 --- a/src/domain/post/getByCreatorAggregated/getByCreatorAggregated.ts +++ b/src/domain/post/getByCreatorAggregated/getByCreatorAggregated.ts @@ -1,9 +1,11 @@ -import { Requester } from '^/domain/authentication'; +import type { Requester } from '^/domain/authentication'; import filterResolved from '^/domain/common/filterResolved'; -import validateRange, { Range } from '^/domain/common/validateRange'; +import type { Range } from '^/domain/common/validateRange'; +import validateRange from '^/domain/common/validateRange'; -import aggregate, { AggregatedData } from '../aggregate'; +import type { AggregatedData } from '../aggregate'; +import aggregate from '../aggregate'; import getByCreator from '../getByCreator'; export { type AggregatedData }; diff --git a/src/domain/post/getByFollowing/getByFollowing.ts b/src/domain/post/getByFollowing/getByFollowing.ts index b982a4e1..2b1244fe 100644 --- a/src/domain/post/getByFollowing/getByFollowing.ts +++ b/src/domain/post/getByFollowing/getByFollowing.ts @@ -1,5 +1,5 @@ -import { Requester } from '^/domain/authentication'; +import type { Requester } from '^/domain/authentication'; import retrieveFollowerData from '^/domain/relation/getFollowing'; import type { DataModel } from '../types'; diff --git a/src/domain/post/getByFollowing/retrieveData.ts b/src/domain/post/getByFollowing/retrieveData.ts index 6c3eb063..f6a8a2b6 100644 --- a/src/domain/post/getByFollowing/retrieveData.ts +++ b/src/domain/post/getByFollowing/retrieveData.ts @@ -1,5 +1,6 @@ -import database, { RecordQuery, RecordSort, SortDirections } from '^/integrations/database'; +import type { RecordQuery, RecordSort} from '^/integrations/database'; +import database, { SortDirections } from '^/integrations/database'; import { RECORD_TYPE } from '../definitions'; import type { DataModel } from '../types'; diff --git a/src/domain/post/getByFollowingAggregated/getByFollowingAggregated.ts b/src/domain/post/getByFollowingAggregated/getByFollowingAggregated.ts index 730a6966..9de65dd7 100644 --- a/src/domain/post/getByFollowingAggregated/getByFollowingAggregated.ts +++ b/src/domain/post/getByFollowingAggregated/getByFollowingAggregated.ts @@ -1,9 +1,11 @@ -import { Requester } from '^/domain/authentication'; +import type { Requester } from '^/domain/authentication'; import filterResolved from '^/domain/common/filterResolved'; -import validateRange, { Range } from '^/domain/common/validateRange'; +import type { Range } from '^/domain/common/validateRange'; +import validateRange from '^/domain/common/validateRange'; -import aggregate, { AggregatedData } from '../aggregate'; +import type { AggregatedData } from '../aggregate'; +import aggregate from '../aggregate'; import getByFollowing from '../getByFollowing'; export default async function getByFollowingAggregated(requester: Requester, range: Range): Promise diff --git a/src/domain/post/getById/getById.ts b/src/domain/post/getById/getById.ts index 7ddf9061..9a8f3288 100644 --- a/src/domain/post/getById/getById.ts +++ b/src/domain/post/getById/getById.ts @@ -1,5 +1,6 @@ -import database, { RecordQuery } from '^/integrations/database'; +import type { RecordQuery } from '^/integrations/database'; +import database from '^/integrations/database'; import { RECORD_TYPE } from '../definitions'; import PostNotFound from '../PostNotFound'; diff --git a/src/domain/post/getByIdAggregated/getByIdAggregated.ts b/src/domain/post/getByIdAggregated/getByIdAggregated.ts index 58c1a0b5..f3583dcb 100644 --- a/src/domain/post/getByIdAggregated/getByIdAggregated.ts +++ b/src/domain/post/getByIdAggregated/getByIdAggregated.ts @@ -1,7 +1,8 @@ -import { Requester } from '^/domain/authentication'; +import type { Requester } from '^/domain/authentication'; -import aggregate, { AggregatedData } from '../aggregate'; +import type { AggregatedData } from '../aggregate'; +import aggregate from '../aggregate'; import getById from '../getById'; export { type AggregatedData }; diff --git a/src/domain/post/getByParent/getByParent.ts b/src/domain/post/getByParent/getByParent.ts index 3f855bfe..600083ff 100644 --- a/src/domain/post/getByParent/getByParent.ts +++ b/src/domain/post/getByParent/getByParent.ts @@ -1,5 +1,6 @@ -import database, { RecordQuery, RecordSort, SortDirections } from '^/integrations/database'; +import type { RecordQuery, RecordSort} from '^/integrations/database'; +import database, { SortDirections } from '^/integrations/database'; import { RECORD_TYPE } from '../definitions'; import type { DataModel } from '../types'; diff --git a/src/domain/post/getByParentAggregated/getByParentAggregated.ts b/src/domain/post/getByParentAggregated/getByParentAggregated.ts index 7aa894e2..55d3783e 100644 --- a/src/domain/post/getByParentAggregated/getByParentAggregated.ts +++ b/src/domain/post/getByParentAggregated/getByParentAggregated.ts @@ -1,9 +1,10 @@ -import { Requester } from '^/domain/authentication'; +import type { Requester } from '^/domain/authentication'; import filterResolved from '^/domain/common/filterResolved'; -import { Range } from '^/domain/common/validateRange'; +import type { Range } from '^/domain/common/validateRange'; -import aggregate, { AggregatedData } from '../aggregate'; +import type { AggregatedData } from '../aggregate'; +import aggregate from '../aggregate'; import getByParent from '../getByParent'; export default async function getByParentAggregated(requester: Requester, postId: string, range: Range): Promise diff --git a/src/domain/post/getRecommended/getRecommended.ts b/src/domain/post/getRecommended/getRecommended.ts index 5304cb78..3bdd8a8a 100644 --- a/src/domain/post/getRecommended/getRecommended.ts +++ b/src/domain/post/getRecommended/getRecommended.ts @@ -1,7 +1,8 @@ -import database, { RecordQuery, RecordSort, SortDirections } from '^/integrations/database'; +import type { RecordQuery, RecordSort} from '^/integrations/database'; +import database, { SortDirections } from '^/integrations/database'; -import { Requester } from '^/domain/authentication'; +import type { Requester } from '^/domain/authentication'; import { RECORD_TYPE } from '../definitions'; diff --git a/src/domain/post/getRecommendedAggregated/getRecommendedAggregated.ts b/src/domain/post/getRecommendedAggregated/getRecommendedAggregated.ts index 0694c43a..bd820212 100644 --- a/src/domain/post/getRecommendedAggregated/getRecommendedAggregated.ts +++ b/src/domain/post/getRecommendedAggregated/getRecommendedAggregated.ts @@ -1,9 +1,11 @@ -import { Requester } from '^/domain/authentication'; +import type { Requester } from '^/domain/authentication'; import filterResolved from '^/domain/common/filterResolved'; -import validateRange, { Range } from '^/domain/common/validateRange'; +import type { Range } from '^/domain/common/validateRange'; +import validateRange from '^/domain/common/validateRange'; -import aggregate, { AggregatedData } from '../aggregate'; +import type { AggregatedData } from '../aggregate'; +import aggregate from '../aggregate'; import getRecommended from '../getRecommended'; export default async function getRecommendedAggregated(requester: Requester, range: Range): Promise diff --git a/src/domain/post/remove/isNotOwner.ts b/src/domain/post/remove/isNotOwner.ts index 827ffdab..cef077a2 100644 --- a/src/domain/post/remove/isNotOwner.ts +++ b/src/domain/post/remove/isNotOwner.ts @@ -1,5 +1,5 @@ -import { DataModel } from '../types'; +import type { DataModel } from '../types'; export default function isNotOwner(post: DataModel, requesterId: string): boolean { diff --git a/src/domain/post/remove/publish.ts b/src/domain/post/remove/publish.ts index 85559d78..03416dac 100644 --- a/src/domain/post/remove/publish.ts +++ b/src/domain/post/remove/publish.ts @@ -4,7 +4,7 @@ import eventBroker from '^/integrations/eventbroker'; import { EVENT_CHANNEL } from '../definitions'; import { EVENT_NAME } from './definitions'; -import { RemovedPublication } from './types'; +import type { RemovedPublication } from './types'; export default async function publish(creatorId: string, postId: string, parentId?: string): Promise { diff --git a/src/domain/post/remove/remove.ts b/src/domain/post/remove/remove.ts index 97bceffb..0b4dac5a 100644 --- a/src/domain/post/remove/remove.ts +++ b/src/domain/post/remove/remove.ts @@ -1,7 +1,7 @@ import logger from '^/integrations/logging'; -import { Requester } from '^/domain/authentication'; +import type { Requester } from '^/domain/authentication'; import getById from '../getById'; import PostNotFound from '../PostNotFound'; diff --git a/src/domain/post/remove/subscribe.ts b/src/domain/post/remove/subscribe.ts index 492f57a5..c3d48a3d 100644 --- a/src/domain/post/remove/subscribe.ts +++ b/src/domain/post/remove/subscribe.ts @@ -4,7 +4,7 @@ import eventBroker from '^/integrations/eventbroker'; import { EVENT_CHANNEL } from '../definitions'; import { EVENT_NAME } from './definitions'; -import { RemovedEventHandler, RemovedSubscription } from './types'; +import type { RemovedEventHandler, RemovedSubscription } from './types'; export default async function subscribe(handler: RemovedEventHandler): Promise { diff --git a/src/domain/post/remove/types.ts b/src/domain/post/remove/types.ts index cd97a083..32e11e51 100644 --- a/src/domain/post/remove/types.ts +++ b/src/domain/post/remove/types.ts @@ -1,5 +1,5 @@ -import { Publication, Subscription } from '^/integrations/eventbroker'; +import type { Publication, Subscription } from '^/integrations/eventbroker'; export type RemovedEventData = { creatorId: string; diff --git a/src/domain/post/types.ts b/src/domain/post/types.ts index 83e96741..a948aafc 100644 --- a/src/domain/post/types.ts +++ b/src/domain/post/types.ts @@ -1,5 +1,5 @@ -import { BaseDataModel, CountOperation } from '../types'; +import type { BaseDataModel, CountOperation } from '../types'; type DataModel = BaseDataModel & { diff --git a/src/domain/rating/create/createData.ts b/src/domain/rating/create/createData.ts index ad6d148b..0b3febc0 100644 --- a/src/domain/rating/create/createData.ts +++ b/src/domain/rating/create/createData.ts @@ -1,7 +1,7 @@ import { generateId } from '^/integrations/utilities/crypto'; -import { DataModel } from '../types'; +import type { DataModel } from '../types'; export default function createData(creatorId: string, postId: string): DataModel { diff --git a/src/domain/rating/create/insertData.ts b/src/domain/rating/create/insertData.ts index 49294e73..764eeeb9 100644 --- a/src/domain/rating/create/insertData.ts +++ b/src/domain/rating/create/insertData.ts @@ -2,7 +2,7 @@ import database from '^/integrations/database'; import { RECORD_TYPE } from '../definitions'; -import { DataModel } from '../types'; +import type { DataModel } from '../types'; export default async function insertData(data: DataModel): Promise { diff --git a/src/domain/rating/create/types.ts b/src/domain/rating/create/types.ts index 1367251a..164f6ec0 100644 --- a/src/domain/rating/create/types.ts +++ b/src/domain/rating/create/types.ts @@ -1,4 +1,4 @@ -import { DataModel } from '../types'; +import type { DataModel } from '../types'; export type ValidationModel = Pick; diff --git a/src/domain/rating/create/validateData.ts b/src/domain/rating/create/validateData.ts index 920bef2b..2633c855 100644 --- a/src/domain/rating/create/validateData.ts +++ b/src/domain/rating/create/validateData.ts @@ -1,10 +1,11 @@ -import validator, { ValidationSchema } from '^/integrations/validation'; +import type { ValidationSchema } from '^/integrations/validation'; +import validator from '^/integrations/validation'; import { requiredIdValidation } from '^/domain/definitions'; import InvalidRating from './InvalidRating'; -import { ValidationModel } from './types'; +import type { ValidationModel } from './types'; const schema: ValidationSchema = { diff --git a/src/domain/rating/exists/exists.ts b/src/domain/rating/exists/exists.ts index b91ed631..814aab10 100644 --- a/src/domain/rating/exists/exists.ts +++ b/src/domain/rating/exists/exists.ts @@ -1,5 +1,6 @@ -import database, { RecordQuery } from '^/integrations/database'; +import type { RecordQuery } from '^/integrations/database'; +import database from '^/integrations/database'; import { RECORD_TYPE } from '../definitions'; diff --git a/src/domain/rating/toggle/getData.ts b/src/domain/rating/toggle/getData.ts index 63946a28..8708a815 100644 --- a/src/domain/rating/toggle/getData.ts +++ b/src/domain/rating/toggle/getData.ts @@ -1,8 +1,9 @@ -import database, { RecordQuery } from '^/integrations/database'; +import type { RecordQuery } from '^/integrations/database'; +import database from '^/integrations/database'; import { RECORD_TYPE } from '../definitions'; -import { DataModel } from '../types'; +import type { DataModel } from '../types'; export default async function getData(creatorId: string, postId: string): Promise { diff --git a/src/domain/rating/toggle/publish.ts b/src/domain/rating/toggle/publish.ts index bd8b28d6..ec02e68c 100644 --- a/src/domain/rating/toggle/publish.ts +++ b/src/domain/rating/toggle/publish.ts @@ -4,7 +4,7 @@ import eventBroker from '^/integrations/eventbroker'; import { EVENT_CHANNEL } from '../definitions'; import { EVENT_NAME } from './definitions'; -import { ToggledPublication } from './types'; +import type { ToggledPublication } from './types'; export default async function publish(creatorId: string, postId: string, rated: boolean): Promise { diff --git a/src/domain/rating/toggle/subscribe.ts b/src/domain/rating/toggle/subscribe.ts index 85956b69..fc7afa5b 100644 --- a/src/domain/rating/toggle/subscribe.ts +++ b/src/domain/rating/toggle/subscribe.ts @@ -4,7 +4,7 @@ import eventBroker from '^/integrations/eventbroker'; import { EVENT_CHANNEL } from '../definitions'; import { EVENT_NAME } from './definitions'; -import { ToggledEventHandler, ToggledSubscription } from './types'; +import type { ToggledEventHandler, ToggledSubscription } from './types'; export default async function subscribe(handler: ToggledEventHandler): Promise { diff --git a/src/domain/rating/toggle/switchOff.ts b/src/domain/rating/toggle/switchOff.ts index bd547faa..a97cf1d7 100644 --- a/src/domain/rating/toggle/switchOff.ts +++ b/src/domain/rating/toggle/switchOff.ts @@ -1,7 +1,7 @@ import create from '../create'; import erase from '../erase'; -import { DataModel } from '../types'; +import type { DataModel } from '../types'; import publish from './publish'; diff --git a/src/domain/rating/toggle/toggle.ts b/src/domain/rating/toggle/toggle.ts index 6529cd72..9e3f7709 100644 --- a/src/domain/rating/toggle/toggle.ts +++ b/src/domain/rating/toggle/toggle.ts @@ -1,5 +1,5 @@ -import { Requester } from '^/domain/authentication'; +import type { Requester } from '^/domain/authentication'; import getData from './getData'; import switchOff from './switchOff'; diff --git a/src/domain/rating/toggle/types.ts b/src/domain/rating/toggle/types.ts index fd09548b..b80162af 100644 --- a/src/domain/rating/toggle/types.ts +++ b/src/domain/rating/toggle/types.ts @@ -1,5 +1,5 @@ -import { Publication, Subscription } from '^/integrations/eventbroker'; +import type { Publication, Subscription } from '^/integrations/eventbroker'; export type ToggledEventData = { creatorId: string; diff --git a/src/domain/rating/types.ts b/src/domain/rating/types.ts index d3833674..98cea98e 100644 --- a/src/domain/rating/types.ts +++ b/src/domain/rating/types.ts @@ -1,5 +1,5 @@ -import { BaseDataModel } from '../types'; +import type { BaseDataModel } from '../types'; type DataModel = BaseDataModel & { diff --git a/src/domain/relation/create/types.ts b/src/domain/relation/create/types.ts index 58f0d29f..ddd76c38 100644 --- a/src/domain/relation/create/types.ts +++ b/src/domain/relation/create/types.ts @@ -1,4 +1,4 @@ -import { DataModel } from '../types'; +import type { DataModel } from '../types'; export type ValidationModel = Pick; diff --git a/src/domain/relation/create/validateData.ts b/src/domain/relation/create/validateData.ts index 46e9b2ee..2fdf7fd1 100644 --- a/src/domain/relation/create/validateData.ts +++ b/src/domain/relation/create/validateData.ts @@ -1,10 +1,11 @@ -import validator, { ValidationSchema } from '^/integrations/validation'; +import type { ValidationSchema } from '^/integrations/validation'; +import validator from '^/integrations/validation'; import { requiredIdValidation } from '^/domain/definitions'; import InvalidRelation from './InvalidRelation'; -import { ValidationModel } from './types'; +import type { ValidationModel } from './types'; const schema: ValidationSchema = { diff --git a/src/domain/relation/definitions.ts b/src/domain/relation/definitions.ts index 390c3ee5..260abcc9 100644 --- a/src/domain/relation/definitions.ts +++ b/src/domain/relation/definitions.ts @@ -1,5 +1,6 @@ -import { SortOrder, SortOrders } from '../definitions'; +import type { SortOrder} from '../definitions'; +import { SortOrders } from '../definitions'; export const RECORD_TYPE = 'relation'; export const EVENT_CHANNEL = 'relation'; diff --git a/src/domain/relation/establish/establish.ts b/src/domain/relation/establish/establish.ts index b0d4b5c0..7abf0a7b 100644 --- a/src/domain/relation/establish/establish.ts +++ b/src/domain/relation/establish/establish.ts @@ -1,7 +1,7 @@ import logger from '^/integrations/logging'; -import { Requester } from '^/domain/authentication'; +import type { Requester } from '^/domain/authentication'; import create from '../create'; import erase from '../erase'; diff --git a/src/domain/relation/establish/publish.ts b/src/domain/relation/establish/publish.ts index b57011a3..f3bb386b 100644 --- a/src/domain/relation/establish/publish.ts +++ b/src/domain/relation/establish/publish.ts @@ -4,7 +4,7 @@ import eventBroker from '^/integrations/eventbroker'; import { EVENT_CHANNEL } from '../definitions'; import { EVENT_NAME } from './definitions'; -import { EstablishedPublication } from './types'; +import type { EstablishedPublication } from './types'; export default async function publish(followerId: string, followingId: string): Promise { diff --git a/src/domain/relation/establish/subscribe.ts b/src/domain/relation/establish/subscribe.ts index 1bd3ddf3..003c571b 100644 --- a/src/domain/relation/establish/subscribe.ts +++ b/src/domain/relation/establish/subscribe.ts @@ -4,7 +4,7 @@ import eventBroker from '^/integrations/eventbroker'; import { EVENT_CHANNEL } from '../definitions'; import { EVENT_NAME } from './definitions'; -import { EstablishedEventHandler, EstablishedSubscription } from './types'; +import type { EstablishedEventHandler, EstablishedSubscription } from './types'; export default async function subscribe(handler: EstablishedEventHandler): Promise { diff --git a/src/domain/relation/establish/types.ts b/src/domain/relation/establish/types.ts index 666b7ceb..6a7b4091 100644 --- a/src/domain/relation/establish/types.ts +++ b/src/domain/relation/establish/types.ts @@ -1,5 +1,5 @@ -import { Publication, Subscription } from '^/integrations/eventbroker'; +import type { Publication, Subscription } from '^/integrations/eventbroker'; export type EstablishedEventData = { followerId: string; diff --git a/src/domain/relation/exists/exists.ts b/src/domain/relation/exists/exists.ts index 368ffa93..58aeecbd 100644 --- a/src/domain/relation/exists/exists.ts +++ b/src/domain/relation/exists/exists.ts @@ -1,5 +1,6 @@ -import database, { RecordQuery } from '^/integrations/database'; +import type { RecordQuery } from '^/integrations/database'; +import database from '^/integrations/database'; import { RECORD_TYPE } from '../definitions'; diff --git a/src/domain/relation/explore/explore.ts b/src/domain/relation/explore/explore.ts index b19dd761..5004b639 100644 --- a/src/domain/relation/explore/explore.ts +++ b/src/domain/relation/explore/explore.ts @@ -1,5 +1,5 @@ -import { Requester } from '^/domain/authentication'; +import type { Requester } from '^/domain/authentication'; import getOtherCreators from '^/domain/creator/getOthers'; import type { SortOrder } from '../definitions'; diff --git a/src/domain/relation/exploreAggregated/exploreAggregated.ts b/src/domain/relation/exploreAggregated/exploreAggregated.ts index 58457569..f421b2e1 100644 --- a/src/domain/relation/exploreAggregated/exploreAggregated.ts +++ b/src/domain/relation/exploreAggregated/exploreAggregated.ts @@ -1,8 +1,10 @@ -import { Requester } from '^/domain/authentication'; -import validateRange, { Range } from '^/domain/common/validateRange'; +import type { Requester } from '^/domain/authentication'; +import type { Range } from '^/domain/common/validateRange'; +import validateRange from '^/domain/common/validateRange'; -import aggregate, { AggregatedData } from '../aggregate'; +import type { AggregatedData } from '../aggregate'; +import aggregate from '../aggregate'; import type { SortOrder } from '../definitions'; import explore from '../explore'; diff --git a/src/domain/relation/get/get.ts b/src/domain/relation/get/get.ts index c68ae707..6a907c75 100644 --- a/src/domain/relation/get/get.ts +++ b/src/domain/relation/get/get.ts @@ -1,5 +1,6 @@ -import database, { RecordQuery } from '^/integrations/database'; +import type { RecordQuery } from '^/integrations/database'; +import database from '^/integrations/database'; import { RECORD_TYPE } from '../definitions'; import type { DataModel } from '../types'; diff --git a/src/domain/relation/getAggregated/getAggregated.ts b/src/domain/relation/getAggregated/getAggregated.ts index 296ed5e2..56989265 100644 --- a/src/domain/relation/getAggregated/getAggregated.ts +++ b/src/domain/relation/getAggregated/getAggregated.ts @@ -1,5 +1,6 @@ -import aggregate, { AggregatedData } from '../aggregate'; +import type { AggregatedData } from '../aggregate'; +import aggregate from '../aggregate'; import get from '../get'; export default async function getAggregated(followerId: string, followingId: string): Promise diff --git a/src/domain/relation/getFollowers/getFollowers.ts b/src/domain/relation/getFollowers/getFollowers.ts index f3f2a2d9..c571f4cc 100644 --- a/src/domain/relation/getFollowers/getFollowers.ts +++ b/src/domain/relation/getFollowers/getFollowers.ts @@ -1,5 +1,5 @@ -import { Requester } from '^/domain/authentication'; +import type { Requester } from '^/domain/authentication'; import translateToRequester from '../translateToRequester'; import type { DataModel } from '../types'; diff --git a/src/domain/relation/getFollowers/retrieveData.ts b/src/domain/relation/getFollowers/retrieveData.ts index f6375ff3..0efe2f88 100644 --- a/src/domain/relation/getFollowers/retrieveData.ts +++ b/src/domain/relation/getFollowers/retrieveData.ts @@ -1,5 +1,6 @@ -import database, { RecordQuery } from '^/integrations/database'; +import type { RecordQuery } from '^/integrations/database'; +import database from '^/integrations/database'; import { RECORD_TYPE } from '../definitions'; import type { DataModel } from '../types'; diff --git a/src/domain/relation/getFollowersAggregated/getFollowersAggregated.ts b/src/domain/relation/getFollowersAggregated/getFollowersAggregated.ts index 2e1644ea..88ba8558 100644 --- a/src/domain/relation/getFollowersAggregated/getFollowersAggregated.ts +++ b/src/domain/relation/getFollowersAggregated/getFollowersAggregated.ts @@ -1,8 +1,10 @@ -import { Requester } from '^/domain/authentication'; -import validateRange, { Range } from '^/domain/common/validateRange'; +import type { Requester } from '^/domain/authentication'; +import type { Range } from '^/domain/common/validateRange'; +import validateRange from '^/domain/common/validateRange'; -import aggregate, { AggregatedData } from '../aggregate'; +import type { AggregatedData } from '../aggregate'; +import aggregate from '../aggregate'; import getFollowers from '../getFollowers'; export default async function getFollowersAggregated(requester: Requester, followingId: string, range: Range): Promise diff --git a/src/domain/relation/getFollowing/getFollowing.ts b/src/domain/relation/getFollowing/getFollowing.ts index 5c73927d..4d28a0e0 100644 --- a/src/domain/relation/getFollowing/getFollowing.ts +++ b/src/domain/relation/getFollowing/getFollowing.ts @@ -1,5 +1,5 @@ -import { Requester } from '^/domain/authentication'; +import type { Requester } from '^/domain/authentication'; import translateToRequester from '../translateToRequester'; import type { DataModel } from '../types'; diff --git a/src/domain/relation/getFollowing/retrieveData.ts b/src/domain/relation/getFollowing/retrieveData.ts index dba2225a..bd79524a 100644 --- a/src/domain/relation/getFollowing/retrieveData.ts +++ b/src/domain/relation/getFollowing/retrieveData.ts @@ -1,5 +1,6 @@ -import database, { RecordQuery } from '^/integrations/database'; +import type { RecordQuery } from '^/integrations/database'; +import database from '^/integrations/database'; import { RECORD_TYPE } from '../definitions'; import type { DataModel } from '../types'; diff --git a/src/domain/relation/getFollowingAggregated/getFollowingAggregated.ts b/src/domain/relation/getFollowingAggregated/getFollowingAggregated.ts index 3fb9681d..e6d921a8 100644 --- a/src/domain/relation/getFollowingAggregated/getFollowingAggregated.ts +++ b/src/domain/relation/getFollowingAggregated/getFollowingAggregated.ts @@ -1,8 +1,10 @@ -import { Requester } from '^/domain/authentication'; -import validateRange, { Range } from '^/domain/common/validateRange'; +import type { Requester } from '^/domain/authentication'; +import type { Range } from '^/domain/common/validateRange'; +import validateRange from '^/domain/common/validateRange'; -import aggregate, { AggregatedData } from '../aggregate'; +import type { AggregatedData } from '../aggregate'; +import aggregate from '../aggregate'; import retrieveByFollower from '../getFollowing'; export default async function getFollowingAggregated(requester: Requester, followerId: string, range: Range): Promise diff --git a/src/domain/relation/translateToRequester/translate.ts b/src/domain/relation/translateToRequester/translate.ts index 538b2058..9f4fa294 100644 --- a/src/domain/relation/translateToRequester/translate.ts +++ b/src/domain/relation/translateToRequester/translate.ts @@ -1,10 +1,10 @@ -import { Requester } from '^/domain/authentication'; +import type { Requester } from '^/domain/authentication'; import get from '../get'; -import { DataModel } from '../types'; +import type { DataModel } from '../types'; -import { Mapping } from './types'; +import type { Mapping } from './types'; export default async function translate(requester: Requester, mapping: Mapping, data: DataModel): Promise { diff --git a/src/domain/relation/translateToRequester/translateToRequester.ts b/src/domain/relation/translateToRequester/translateToRequester.ts index 9e439072..380b86a1 100644 --- a/src/domain/relation/translateToRequester/translateToRequester.ts +++ b/src/domain/relation/translateToRequester/translateToRequester.ts @@ -1,10 +1,10 @@ -import { Requester } from '^/domain/authentication'; +import type { Requester } from '^/domain/authentication'; -import { DataModel } from '../types'; +import type { DataModel } from '../types'; import translate from './translate'; -import { Mapping } from './types'; +import type { Mapping } from './types'; export default async function translateToRequester(requester: Requester, mapping: Mapping, data: DataModel[]): Promise { diff --git a/src/integrations/authentication/definitions/interfaces.ts b/src/integrations/authentication/definitions/interfaces.ts index f7bb4416..ada2bb26 100644 --- a/src/integrations/authentication/definitions/interfaces.ts +++ b/src/integrations/authentication/definitions/interfaces.ts @@ -1,5 +1,5 @@ -import { Session } from './types'; +import type { Session } from './types'; export interface IdentityProvider { diff --git a/src/integrations/authentication/implementation.ts b/src/integrations/authentication/implementation.ts index 2c6b0cdf..f25d800f 100644 --- a/src/integrations/authentication/implementation.ts +++ b/src/integrations/authentication/implementation.ts @@ -1,5 +1,5 @@ -import { IdentityProvider } from './definitions/interfaces'; +import type { IdentityProvider } from './definitions/interfaces'; import UnknownImplementation from './errors/UnknownImplementation'; import createOpenID from './implementations/openid/create'; diff --git a/src/integrations/authentication/implementations/openid/OpenID.ts b/src/integrations/authentication/implementations/openid/OpenID.ts index 7a9490ab..c31a97f4 100644 --- a/src/integrations/authentication/implementations/openid/OpenID.ts +++ b/src/integrations/authentication/implementations/openid/OpenID.ts @@ -7,8 +7,8 @@ import import type { Configuration, DiscoveryRequestOptions, IDToken, TokenEndpointResponse, TokenEndpointResponseHelpers } from 'openid-client'; -import { IdentityProvider } from '../../definitions/interfaces'; -import { Identity, Session } from '../../definitions/types'; +import type { IdentityProvider } from '../../definitions/interfaces'; +import type { Identity, Session } from '../../definitions/types'; import LoginFailed from '../../errors/LoginFailed'; import NotConnected from '../../errors/NotConnected'; diff --git a/src/integrations/database/Database.ts b/src/integrations/database/Database.ts index efcf17dc..74e76044 100644 --- a/src/integrations/database/Database.ts +++ b/src/integrations/database/Database.ts @@ -1,8 +1,8 @@ import { sanitize } from '^/integrations/utilities/sanitize'; -import { Driver } from './definitions/interfaces'; -import { RecordData, RecordField, RecordId, RecordQuery, RecordSort, RecordType } from './definitions/types'; +import type { Driver } from './definitions/interfaces'; +import type { RecordData, RecordField, RecordId, RecordQuery, RecordSort, RecordType } from './definitions/types'; export default class Database implements Driver { diff --git a/src/integrations/database/definitions/interfaces.ts b/src/integrations/database/definitions/interfaces.ts index f0717656..d5da0963 100644 --- a/src/integrations/database/definitions/interfaces.ts +++ b/src/integrations/database/definitions/interfaces.ts @@ -1,5 +1,5 @@ -import { RecordData, RecordField, RecordId, RecordQuery, RecordSort, RecordType } from './types'; +import type { RecordData, RecordField, RecordId, RecordQuery, RecordSort, RecordType } from './types'; export interface Driver { diff --git a/src/integrations/database/definitions/types.ts b/src/integrations/database/definitions/types.ts index 4775f420..0959c276 100644 --- a/src/integrations/database/definitions/types.ts +++ b/src/integrations/database/definitions/types.ts @@ -1,7 +1,7 @@ /* eslint sonarjs/redundant-type-aliases: "off" */ -import { QueryOperators, SortDirections } from './constants'; +import type { QueryOperators, SortDirections } from './constants'; export type RecordType = string; export type RecordId = string; diff --git a/src/integrations/database/implementation.ts b/src/integrations/database/implementation.ts index f615311d..ec4290a8 100644 --- a/src/integrations/database/implementation.ts +++ b/src/integrations/database/implementation.ts @@ -1,5 +1,5 @@ -import { Driver } from './definitions/interfaces'; +import type { Driver } from './definitions/interfaces'; import UnknownImplementation from './errors/UnknownImplementation'; import createMemoryDb from './implementations/memory/create'; import createMongoDb from './implementations/mongodb/create'; diff --git a/src/integrations/database/implementations/memory/Memory.ts b/src/integrations/database/implementations/memory/Memory.ts index dab90713..41d42f6b 100644 --- a/src/integrations/database/implementations/memory/Memory.ts +++ b/src/integrations/database/implementations/memory/Memory.ts @@ -1,7 +1,7 @@ import { LogicalOperators, QueryOperators, SortDirections } from '../../definitions/constants'; -import { Driver } from '../../definitions/interfaces'; -import { QueryExpression, QueryMultiExpressionStatement, QueryOperator, QuerySingleExpressionStatement, QueryStatement, RecordData, RecordField, RecordQuery, RecordSort, RecordValue } from '../../definitions/types'; +import type { Driver } from '../../definitions/interfaces'; +import type { QueryExpression, QueryMultiExpressionStatement, QueryOperator, QuerySingleExpressionStatement, QueryStatement, RecordData, RecordField, RecordQuery, RecordSort, RecordValue } from '../../definitions/types'; import NotConnected from '../../errors/NotConnected'; import RecordNotFound from '../../errors/RecordNotFound'; import RecordNotUpdated from '../../errors/RecordNotUpdated'; diff --git a/src/integrations/database/implementations/mongodb/MongoDb.ts b/src/integrations/database/implementations/mongodb/MongoDb.ts index 8f145d08..8de096bb 100644 --- a/src/integrations/database/implementations/mongodb/MongoDb.ts +++ b/src/integrations/database/implementations/mongodb/MongoDb.ts @@ -1,11 +1,12 @@ /* eslint @typescript-eslint/no-explicit-any: "off" */ -import { Collection, Db, Document, Filter, MongoClient, Sort } from 'mongodb'; +import type { Collection, Db, Document, Filter, Sort } from 'mongodb'; +import { MongoClient } from 'mongodb'; import { ID, LogicalOperators, QueryOperators, SortDirections } from '../../definitions/constants'; -import { Driver } from '../../definitions/interfaces'; -import { QueryMultiExpressionStatement, QueryOperator, QuerySingleExpressionStatement, RecordData, RecordField, RecordId, RecordQuery, RecordSort, RecordType, RecordValue } from '../../definitions/types'; +import type { Driver } from '../../definitions/interfaces'; +import type { QueryMultiExpressionStatement, QueryOperator, QuerySingleExpressionStatement, RecordData, RecordField, RecordId, RecordQuery, RecordSort, RecordType, RecordValue } from '../../definitions/types'; import DatabaseError from '../../errors/DatabaseError'; import NotConnected from '../../errors/NotConnected'; import RecordNotCreated from '../../errors/RecordNotCreated'; diff --git a/src/integrations/eventbroker/EventBroker.ts b/src/integrations/eventbroker/EventBroker.ts index b465d2dc..8897a47b 100644 --- a/src/integrations/eventbroker/EventBroker.ts +++ b/src/integrations/eventbroker/EventBroker.ts @@ -1,6 +1,6 @@ -import { Driver } from './definitions/interfaces'; -import { Publication, Subscription } from './definitions/types'; +import type { Driver } from './definitions/interfaces'; +import type { Publication, Subscription } from './definitions/types'; export default class EventBroker implements Driver { diff --git a/src/integrations/eventbroker/definitions/interfaces.ts b/src/integrations/eventbroker/definitions/interfaces.ts index 0ad02fdc..61e2a5b9 100644 --- a/src/integrations/eventbroker/definitions/interfaces.ts +++ b/src/integrations/eventbroker/definitions/interfaces.ts @@ -1,5 +1,5 @@ -import { Publication, Subscription } from './types'; +import type { Publication, Subscription } from './types'; export interface Driver { diff --git a/src/integrations/eventbroker/implementation.ts b/src/integrations/eventbroker/implementation.ts index 15b27c86..28ac0a85 100644 --- a/src/integrations/eventbroker/implementation.ts +++ b/src/integrations/eventbroker/implementation.ts @@ -1,5 +1,5 @@ -import { Driver } from './definitions/interfaces'; +import type { Driver } from './definitions/interfaces'; import UnknownImplementation from './errors/UnknownImplementation'; import createMemoryBroker from './implementations/memory/create'; diff --git a/src/integrations/eventbroker/implementations/memory/Memory.ts b/src/integrations/eventbroker/implementations/memory/Memory.ts index 6872fe8f..7be2ac80 100644 --- a/src/integrations/eventbroker/implementations/memory/Memory.ts +++ b/src/integrations/eventbroker/implementations/memory/Memory.ts @@ -1,8 +1,8 @@ import { EventEmitter } from 'events'; -import { Driver } from '../../definitions/interfaces'; -import { Event, Publication, Subscription } from '../../definitions/types'; +import type { Driver } from '../../definitions/interfaces'; +import type { Event, Publication, Subscription } from '../../definitions/types'; export default class Memory implements Driver { diff --git a/src/integrations/filestore/implementation.ts b/src/integrations/filestore/implementation.ts index ef98d282..6e250663 100644 --- a/src/integrations/filestore/implementation.ts +++ b/src/integrations/filestore/implementation.ts @@ -1,5 +1,5 @@ -import { FileStore } from './definitions/interfaces'; +import type { FileStore } from './definitions/interfaces'; import UnknownImplementation from './errors/UnknownImplementation'; import createMemoryFS from './implementations/memory/create'; import createMinioFS from './implementations/minio/create'; diff --git a/src/integrations/filestore/implementations/memory/Memory.ts b/src/integrations/filestore/implementations/memory/Memory.ts index 3019e0f0..ffb2adbb 100644 --- a/src/integrations/filestore/implementations/memory/Memory.ts +++ b/src/integrations/filestore/implementations/memory/Memory.ts @@ -1,5 +1,5 @@ -import { FileStore } from '../../definitions/interfaces'; +import type { FileStore } from '../../definitions/interfaces'; import FileNotFound from '../../errors/FileNotFound'; import NotConnected from '../../errors/NotConnected'; diff --git a/src/integrations/filestore/implementations/minio/MinioFS.ts b/src/integrations/filestore/implementations/minio/MinioFS.ts index 2c75f9f4..c8e8c2c5 100644 --- a/src/integrations/filestore/implementations/minio/MinioFS.ts +++ b/src/integrations/filestore/implementations/minio/MinioFS.ts @@ -1,7 +1,8 @@ -import { Client, ClientOptions } from 'minio'; +import type { ClientOptions } from 'minio'; +import { Client } from 'minio'; -import { FileStore } from '../../definitions/interfaces'; +import type { FileStore } from '../../definitions/interfaces'; import FileNotFound from '../../errors/FileNotFound'; import NotConnected from '../../errors/NotConnected'; diff --git a/src/integrations/http/Client.ts b/src/integrations/http/Client.ts index ed737c1b..0b078447 100644 --- a/src/integrations/http/Client.ts +++ b/src/integrations/http/Client.ts @@ -1,6 +1,6 @@ import { HTTP_METHODS } from './definitions/constants'; -import { Http } from './definitions/interfaces'; +import type { Http } from './definitions/interfaces'; export default class Memory implements Http { diff --git a/src/integrations/http/implementation.ts b/src/integrations/http/implementation.ts index bf95706f..ac51e262 100644 --- a/src/integrations/http/implementation.ts +++ b/src/integrations/http/implementation.ts @@ -1,5 +1,5 @@ -import { Http } from './definitions/interfaces'; +import type { Http } from './definitions/interfaces'; import UnknownImplementation from './errors/UnknownImplementation'; import createFetch from './implementations/fetch/create'; diff --git a/src/integrations/http/implementations/fetch/Fetch.ts b/src/integrations/http/implementations/fetch/Fetch.ts index 6fe07fb5..025ec3ed 100644 --- a/src/integrations/http/implementations/fetch/Fetch.ts +++ b/src/integrations/http/implementations/fetch/Fetch.ts @@ -1,6 +1,6 @@ import { HTTP_METHODS } from '../../definitions/constants'; -import { Http } from '../../definitions/interfaces'; +import type { Http } from '../../definitions/interfaces'; export default class Fetch implements Http { diff --git a/src/integrations/logging/Logger.ts b/src/integrations/logging/Logger.ts index 2d1a67fb..dad3c380 100644 --- a/src/integrations/logging/Logger.ts +++ b/src/integrations/logging/Logger.ts @@ -1,5 +1,5 @@ -import { LogProcessor } from './definitions/interfaces'; +import type { LogProcessor } from './definitions/interfaces'; export default class Logger implements LogProcessor { diff --git a/src/integrations/logging/implementation.ts b/src/integrations/logging/implementation.ts index a08e76bb..82d65ae3 100644 --- a/src/integrations/logging/implementation.ts +++ b/src/integrations/logging/implementation.ts @@ -1,5 +1,5 @@ -import { LogProcessor } from './definitions/interfaces'; +import type { LogProcessor } from './definitions/interfaces'; import UnknownImplementation from './errors/UnknownImplementation'; import createConsole from './implementations/console/create'; import createVoid from './implementations/void/create'; diff --git a/src/integrations/logging/implementations/console/Console.ts b/src/integrations/logging/implementations/console/Console.ts index 5c3b976c..fc91bba9 100644 --- a/src/integrations/logging/implementations/console/Console.ts +++ b/src/integrations/logging/implementations/console/Console.ts @@ -1,6 +1,6 @@ /* eslint no-console: "off" */ -import { LogProcessor } from '../../definitions/interfaces'; +import type { LogProcessor } from '../../definitions/interfaces'; export default class Console implements LogProcessor { diff --git a/src/integrations/logging/implementations/void/Void.ts b/src/integrations/logging/implementations/void/Void.ts index 3e2b366b..339be63f 100644 --- a/src/integrations/logging/implementations/void/Void.ts +++ b/src/integrations/logging/implementations/void/Void.ts @@ -1,5 +1,5 @@ -import { LogProcessor } from '../../definitions/interfaces'; +import type { LogProcessor } from '../../definitions/interfaces'; export default class Void implements LogProcessor { diff --git a/src/integrations/notification/implementation.ts b/src/integrations/notification/implementation.ts index 71934f5d..922e0565 100644 --- a/src/integrations/notification/implementation.ts +++ b/src/integrations/notification/implementation.ts @@ -1,5 +1,5 @@ -import { NotificationService } from './definitions/interfaces'; +import type { NotificationService } from './definitions/interfaces'; import UnknownImplementation from './errors/UnknownImplementation'; import createMemory from './implementations/memory/create'; import createWebPush from './implementations/webpush/create'; diff --git a/src/integrations/notification/implementations/memory/Memory.ts b/src/integrations/notification/implementations/memory/Memory.ts index 136c4d71..6bceed3b 100644 --- a/src/integrations/notification/implementations/memory/Memory.ts +++ b/src/integrations/notification/implementations/memory/Memory.ts @@ -1,5 +1,5 @@ -import { NotificationService } from '../../definitions/interfaces'; +import type { NotificationService } from '../../definitions/interfaces'; import NotConnected from '../../errors/NotConnected'; import SubscriptionNotFound from '../../errors/SubscriptionNotFound'; diff --git a/src/integrations/notification/implementations/webpush/WebPush.ts b/src/integrations/notification/implementations/webpush/WebPush.ts index 304e9fb4..22133c80 100644 --- a/src/integrations/notification/implementations/webpush/WebPush.ts +++ b/src/integrations/notification/implementations/webpush/WebPush.ts @@ -1,7 +1,8 @@ -import webpush, { PushSubscription } from 'web-push'; +import type { PushSubscription } from 'web-push'; +import webpush from 'web-push'; -import { NotificationService } from '../../definitions/interfaces'; +import type { NotificationService } from '../../definitions/interfaces'; import NotConnected from '../../errors/NotConnected'; import SubscriptionNotFound from '../../errors/SubscriptionNotFound'; diff --git a/src/integrations/runtime/healthchecks/DatabaseHealthCheck.ts b/src/integrations/runtime/healthchecks/DatabaseHealthCheck.ts index c498b847..b855073e 100644 --- a/src/integrations/runtime/healthchecks/DatabaseHealthCheck.ts +++ b/src/integrations/runtime/healthchecks/DatabaseHealthCheck.ts @@ -1,5 +1,5 @@ -import { HealthCheck } from 'jitar'; +import type { HealthCheck } from 'jitar'; import type { Database } from '^/integrations/database'; diff --git a/src/integrations/runtime/healthchecks/FileStoreHealthCheck.ts b/src/integrations/runtime/healthchecks/FileStoreHealthCheck.ts index d666ac55..5faca7ca 100644 --- a/src/integrations/runtime/healthchecks/FileStoreHealthCheck.ts +++ b/src/integrations/runtime/healthchecks/FileStoreHealthCheck.ts @@ -1,7 +1,7 @@ -import { HealthCheck } from 'jitar'; +import type { HealthCheck } from 'jitar'; -import { FileStore } from '^/integrations/filestore/definitions/interfaces'; +import type { FileStore } from '^/integrations/filestore/definitions/interfaces'; export default class FileStoreHealthCheck implements HealthCheck { diff --git a/src/integrations/runtime/healthchecks/NotificationHealthCheck.ts b/src/integrations/runtime/healthchecks/NotificationHealthCheck.ts index ab674626..6f581a4f 100644 --- a/src/integrations/runtime/healthchecks/NotificationHealthCheck.ts +++ b/src/integrations/runtime/healthchecks/NotificationHealthCheck.ts @@ -1,7 +1,7 @@ -import { HealthCheck } from 'jitar'; +import type { HealthCheck } from 'jitar'; -import { NotificationService } from '^/integrations/notification/definitions/interfaces'; +import type { NotificationService } from '^/integrations/notification/definitions/interfaces'; export default class NotificationHealthCheck implements HealthCheck { diff --git a/src/integrations/runtime/middlewares/AuthenticationMiddleware.ts b/src/integrations/runtime/middlewares/AuthenticationMiddleware.ts index 6d2ad4fe..8db31c37 100644 --- a/src/integrations/runtime/middlewares/AuthenticationMiddleware.ts +++ b/src/integrations/runtime/middlewares/AuthenticationMiddleware.ts @@ -1,7 +1,8 @@ -import { Middleware, NextHandler, Request, Response } from 'jitar'; +import type { Middleware, NextHandler, Request} from 'jitar'; +import { Response } from 'jitar'; -import { IdentityProvider, Session } from '^/integrations/authentication'; +import type { IdentityProvider, Session } from '^/integrations/authentication'; import { generateKey } from '^/integrations/utilities/crypto'; import Unauthorized from '../errors/Unauthorized'; diff --git a/src/integrations/runtime/middlewares/RequesterMiddleware.ts b/src/integrations/runtime/middlewares/RequesterMiddleware.ts index 96ab874a..b2f7624e 100644 --- a/src/integrations/runtime/middlewares/RequesterMiddleware.ts +++ b/src/integrations/runtime/middlewares/RequesterMiddleware.ts @@ -1,5 +1,5 @@ -import { Middleware, NextHandler, Request, Response } from 'jitar'; +import type { Middleware, NextHandler, Request, Response } from 'jitar'; export default class RequesterMiddleware implements Middleware { diff --git a/src/integrations/validation/definitions/interfaces.ts b/src/integrations/validation/definitions/interfaces.ts index a82521b1..cd1d105e 100644 --- a/src/integrations/validation/definitions/interfaces.ts +++ b/src/integrations/validation/definitions/interfaces.ts @@ -1,6 +1,6 @@ import type ValidationResult from './ValidationResult'; -import { ValidationSchema } from './types'; +import type { ValidationSchema } from './types'; export interface Validator { diff --git a/src/integrations/validation/definitions/types.ts b/src/integrations/validation/definitions/types.ts index 83154839..8ab7db57 100644 --- a/src/integrations/validation/definitions/types.ts +++ b/src/integrations/validation/definitions/types.ts @@ -1,7 +1,7 @@ /* eslint sonarjs/redundant-type-aliases: "off" */ -import { FieldTypes } from './constants'; +import type { FieldTypes } from './constants'; export type ValidationType = keyof typeof FieldTypes; diff --git a/src/integrations/validation/implementation.ts b/src/integrations/validation/implementation.ts index dde52074..3e9f2393 100644 --- a/src/integrations/validation/implementation.ts +++ b/src/integrations/validation/implementation.ts @@ -1,5 +1,5 @@ -import { Validator } from './definitions/interfaces'; +import type { Validator } from './definitions/interfaces'; import UnknownImplementation from './errors/UnknownImplementation'; import createZod from './implementations/zod/create'; diff --git a/src/integrations/validation/implementations/zod/Zod.ts b/src/integrations/validation/implementations/zod/Zod.ts index e484ff5a..0694a478 100644 --- a/src/integrations/validation/implementations/zod/Zod.ts +++ b/src/integrations/validation/implementations/zod/Zod.ts @@ -1,10 +1,11 @@ -import { ZodIssue, ZodType, ZodUnrecognizedKeysIssue, z } from 'zod'; +import type { ZodIssue, ZodType, ZodUnrecognizedKeysIssue } from 'zod'; +import { z } from 'zod'; import ValidationResult from '../../definitions/ValidationResult'; import { FieldTypes, MAX_EMAIL_LENGTH, MAX_URL_LENGTH } from '../../definitions/constants'; -import { Validator } from '../../definitions/interfaces'; -import { Message, Validation, ValidationTypes, type ValidationSchema } from '../../definitions/types'; +import type { Validator } from '../../definitions/interfaces'; +import type { Message, Validation, ValidationSchema, ValidationTypes } from '../../definitions/types'; import UnknownValidator from '../../errors/UnknownValidator'; type ValidatorFunction = (value: ValidationTypes[keyof ValidationTypes]) => z.ZodType | z.ZodArray>; diff --git a/src/webui/Routes.tsx b/src/webui/Routes.tsx index ae2ac050..c243a75e 100644 --- a/src/webui/Routes.tsx +++ b/src/webui/Routes.tsx @@ -1,5 +1,5 @@ -import { ReactNode } from 'react'; +import type { ReactNode } from 'react'; import { Route, Routes } from 'react-router-dom'; import { useAppContext } from './contexts'; diff --git a/src/webui/components/application/Modal.tsx b/src/webui/components/application/Modal.tsx index cdae1752..e14c93bb 100644 --- a/src/webui/components/application/Modal.tsx +++ b/src/webui/components/application/Modal.tsx @@ -1,5 +1,5 @@ -import { ReactNode } from 'react'; +import type { ReactNode } from 'react'; import { Border, Modal } from '^/webui/designsystem'; diff --git a/src/webui/components/comic/Editor.tsx b/src/webui/components/comic/Editor.tsx index dd424612..af768fb3 100644 --- a/src/webui/components/comic/Editor.tsx +++ b/src/webui/components/comic/Editor.tsx @@ -1,7 +1,8 @@ import { Button, Column, Panel, Row } from '^/webui/designsystem'; -import useCreateHandler, { CancelHandler, CreateHandler } from './hooks/useCreateHandler'; +import type { CancelHandler, CreateHandler } from './hooks/useCreateHandler'; +import useCreateHandler from './hooks/useCreateHandler'; import useEditor from './hooks/useEditor'; type Props = { diff --git a/src/webui/components/comment/Form.tsx b/src/webui/components/comment/Form.tsx index e528f403..ca39b794 100644 --- a/src/webui/components/comment/Form.tsx +++ b/src/webui/components/comment/Form.tsx @@ -2,7 +2,8 @@ import { Button, Column, Panel, Row, TextArea } from '^/webui/designsystem'; import { useFocusOnMount } from '^/webui/hooks'; -import useCreateHandler, { CancelHandler, CreateHandler } from './hooks/useCreateHandler'; +import type { CancelHandler, CreateHandler } from './hooks/useCreateHandler'; +import useCreateHandler from './hooks/useCreateHandler'; type Props = { readonly limit?: number; diff --git a/src/webui/components/common/ErrorBoundary.tsx b/src/webui/components/common/ErrorBoundary.tsx index faa92e4a..3fccda75 100644 --- a/src/webui/components/common/ErrorBoundary.tsx +++ b/src/webui/components/common/ErrorBoundary.tsx @@ -1,5 +1,6 @@ -import { ComponentType, Component as ReactComponent, ReactNode } from 'react'; +import type { ComponentType, ReactNode } from 'react'; +import { Component as ReactComponent } from 'react'; type ViewProps = { error: unknown; diff --git a/src/webui/components/common/Form.tsx b/src/webui/components/common/Form.tsx index 5926bf4d..cf35a514 100644 --- a/src/webui/components/common/Form.tsx +++ b/src/webui/components/common/Form.tsx @@ -1,5 +1,5 @@ -import { ReactNode } from 'react'; +import type { ReactNode } from 'react'; import { Button, Form, Row } from '^/webui/designsystem'; diff --git a/src/webui/components/common/LoadingContainer.tsx b/src/webui/components/common/LoadingContainer.tsx index e91a2b71..581c7314 100644 --- a/src/webui/components/common/LoadingContainer.tsx +++ b/src/webui/components/common/LoadingContainer.tsx @@ -1,5 +1,5 @@ -import { ReactNode } from 'react'; +import type { ReactNode } from 'react'; import Spinner from './Spinner'; type Props = { diff --git a/src/webui/components/common/PullToRefresh.tsx b/src/webui/components/common/PullToRefresh.tsx index 22e6f743..e5c88ffa 100644 --- a/src/webui/components/common/PullToRefresh.tsx +++ b/src/webui/components/common/PullToRefresh.tsx @@ -1,5 +1,5 @@ -import { ReactNode } from 'react'; +import type { ReactNode } from 'react'; import useRefreshOnPull from './hooks/useRefreshOnPull'; diff --git a/src/webui/components/common/ResultSet.tsx b/src/webui/components/common/ResultSet.tsx index aeb36611..4b06ba8b 100644 --- a/src/webui/components/common/ResultSet.tsx +++ b/src/webui/components/common/ResultSet.tsx @@ -1,5 +1,5 @@ -import { ReactNode } from 'react'; +import type { ReactNode } from 'react'; import NoResults from './NoResults'; diff --git a/src/webui/components/common/ScrollLoader.tsx b/src/webui/components/common/ScrollLoader.tsx index 3f294e21..a25bd8f7 100644 --- a/src/webui/components/common/ScrollLoader.tsx +++ b/src/webui/components/common/ScrollLoader.tsx @@ -1,7 +1,8 @@ -import { ReactNode } from 'react'; +import type { ReactNode } from 'react'; -import useLoadOnScroll, { LoadHandler } from './hooks/useLoadOnScroll'; +import type { LoadHandler } from './hooks/useLoadOnScroll'; +import useLoadOnScroll from './hooks/useLoadOnScroll'; import Spinner from './Spinner'; diff --git a/src/webui/components/creator/FullNameForm.tsx b/src/webui/components/creator/FullNameForm.tsx index 2a463c89..9142f511 100644 --- a/src/webui/components/creator/FullNameForm.tsx +++ b/src/webui/components/creator/FullNameForm.tsx @@ -3,7 +3,8 @@ import { Input, Label, Panel, TextBox } from '^/webui/designsystem'; import Form from '../common/Form'; -import useFullNameFormHandler, { SubmitHandler } from './hooks/useFullNameFormHandler'; +import type { SubmitHandler } from './hooks/useFullNameFormHandler'; +import useFullNameFormHandler from './hooks/useFullNameFormHandler'; type Props = { readonly fullName: string; diff --git a/src/webui/components/creator/NicknameForm.tsx b/src/webui/components/creator/NicknameForm.tsx index cfeffe70..4558180f 100644 --- a/src/webui/components/creator/NicknameForm.tsx +++ b/src/webui/components/creator/NicknameForm.tsx @@ -3,7 +3,8 @@ import { Input, Label, Panel, TextBox } from '^/webui/designsystem'; import Form from '../common/Form'; -import useNicknameFormHandler, { SubmitHandler } from './hooks/useNicknameFormHandler'; +import type { SubmitHandler } from './hooks/useNicknameFormHandler'; +import useNicknameFormHandler from './hooks/useNicknameFormHandler'; type Props = { readonly nickname: string; diff --git a/src/webui/components/creator/elementary/AvatarRow.tsx b/src/webui/components/creator/elementary/AvatarRow.tsx index e2e4af8e..a1e6c354 100644 --- a/src/webui/components/creator/elementary/AvatarRow.tsx +++ b/src/webui/components/creator/elementary/AvatarRow.tsx @@ -1,5 +1,5 @@ -import { ReactNode } from 'react'; +import type { ReactNode } from 'react'; import { Row } from '^/webui/designsystem'; diff --git a/src/webui/components/rating/Engagement.tsx b/src/webui/components/rating/Engagement.tsx index 6c7911f1..64204196 100644 --- a/src/webui/components/rating/Engagement.tsx +++ b/src/webui/components/rating/Engagement.tsx @@ -4,7 +4,8 @@ import { ClickArea, Row } from '^/webui/designsystem'; import CompactNumber from '../common/CompactNumber'; import Icon from './elementary/Icon'; -import useEngagement, { EngageHandler } from './hooks/useEngagement'; +import type { EngageHandler } from './hooks/useEngagement'; +import useEngagement from './hooks/useEngagement'; type Props = { readonly isEngaged: boolean; diff --git a/src/webui/components/relation/elementary/FollowButton.tsx b/src/webui/components/relation/elementary/FollowButton.tsx index 8b50683d..ca23f492 100644 --- a/src/webui/components/relation/elementary/FollowButton.tsx +++ b/src/webui/components/relation/elementary/FollowButton.tsx @@ -1,7 +1,8 @@ import { Button } from '^/webui/designsystem'; -import useEstablish, { EstablishHandler } from '../hooks/useEstablish'; +import type { EstablishHandler } from '../hooks/useEstablish'; +import useEstablish from '../hooks/useEstablish'; type Props = { readonly isFollowing: boolean; diff --git a/src/webui/components/relation/elementary/FollowRow.tsx b/src/webui/components/relation/elementary/FollowRow.tsx index 02b85040..61f09c6d 100644 --- a/src/webui/components/relation/elementary/FollowRow.tsx +++ b/src/webui/components/relation/elementary/FollowRow.tsx @@ -1,5 +1,5 @@ -import { ReactNode } from 'react'; +import type { ReactNode } from 'react'; import { Row } from '^/webui/designsystem'; diff --git a/src/webui/contexts/AppContext.tsx b/src/webui/contexts/AppContext.tsx index 968069fe..9b6ff325 100644 --- a/src/webui/contexts/AppContext.tsx +++ b/src/webui/contexts/AppContext.tsx @@ -1,5 +1,6 @@ -import { ReactNode, createContext, useContext } from 'react'; +import type { ReactNode} from 'react'; +import { createContext, useContext } from 'react'; import type { AggregatedData as AggregatedCreatorData } from '^/domain/creator/aggregate'; diff --git a/src/webui/designsystem/components/dropdown/Dropdown.tsx b/src/webui/designsystem/components/dropdown/Dropdown.tsx index c2daaa2a..520c97c5 100644 --- a/src/webui/designsystem/components/dropdown/Dropdown.tsx +++ b/src/webui/designsystem/components/dropdown/Dropdown.tsx @@ -1,5 +1,6 @@ -import { MouseEvent, useState } from 'react'; +import type { MouseEvent} from 'react'; +import { useState } from 'react'; import './Dropdown.css'; diff --git a/src/webui/designsystem/components/tabs/Tab.tsx b/src/webui/designsystem/components/tabs/Tab.tsx index a1dd939d..fd97d45f 100644 --- a/src/webui/designsystem/components/tabs/Tab.tsx +++ b/src/webui/designsystem/components/tabs/Tab.tsx @@ -1,5 +1,5 @@ -import { ReactNode } from 'react'; +import type { ReactNode } from 'react'; export type Props = { readonly id: string; diff --git a/src/webui/designsystem/components/tabs/Tabs.tsx b/src/webui/designsystem/components/tabs/Tabs.tsx index 646ed018..b356d9e1 100644 --- a/src/webui/designsystem/components/tabs/Tabs.tsx +++ b/src/webui/designsystem/components/tabs/Tabs.tsx @@ -1,7 +1,8 @@ -import { ReactElement, ReactNode, useEffect, useMemo, useState } from 'react'; +import type { ReactElement, ReactNode} from 'react'; +import { useEffect, useMemo, useState } from 'react'; -import { Props as TabProps } from './Tab'; +import type { Props as TabProps } from './Tab'; import './Tabs.css'; type Props = { diff --git a/src/webui/designsystem/elements/border/Border.tsx b/src/webui/designsystem/elements/border/Border.tsx index 0a1f5929..f8f5442c 100644 --- a/src/webui/designsystem/elements/border/Border.tsx +++ b/src/webui/designsystem/elements/border/Border.tsx @@ -1,5 +1,5 @@ -import { ReactNode } from 'react'; +import type { ReactNode } from 'react'; import './Border.css'; diff --git a/src/webui/designsystem/elements/cell/Cell.tsx b/src/webui/designsystem/elements/cell/Cell.tsx index 9eaaba09..a881a97b 100644 --- a/src/webui/designsystem/elements/cell/Cell.tsx +++ b/src/webui/designsystem/elements/cell/Cell.tsx @@ -1,5 +1,5 @@ -import { ReactNode } from 'react'; +import type { ReactNode } from 'react'; import './Cell.css'; diff --git a/src/webui/designsystem/elements/clickarea/ClickArea.tsx b/src/webui/designsystem/elements/clickarea/ClickArea.tsx index 1f3ae5b2..a69ec218 100644 --- a/src/webui/designsystem/elements/clickarea/ClickArea.tsx +++ b/src/webui/designsystem/elements/clickarea/ClickArea.tsx @@ -1,5 +1,5 @@ -import { ReactNode } from 'react'; +import type { ReactNode } from 'react'; import './ClickArea.css'; diff --git a/src/webui/designsystem/elements/column/Column.tsx b/src/webui/designsystem/elements/column/Column.tsx index 21740282..c91e54cc 100644 --- a/src/webui/designsystem/elements/column/Column.tsx +++ b/src/webui/designsystem/elements/column/Column.tsx @@ -1,5 +1,5 @@ -import { ReactNode } from 'react'; +import type { ReactNode } from 'react'; import './Column.css'; diff --git a/src/webui/designsystem/elements/form/Form.tsx b/src/webui/designsystem/elements/form/Form.tsx index 3691d35d..c2a82dc7 100644 --- a/src/webui/designsystem/elements/form/Form.tsx +++ b/src/webui/designsystem/elements/form/Form.tsx @@ -1,5 +1,6 @@ -import { FormEvent, ReactNode, forwardRef } from 'react'; +import type { FormEvent, ReactNode} from 'react'; +import { forwardRef } from 'react'; import './Form.css'; diff --git a/src/webui/designsystem/elements/grid/Grid.tsx b/src/webui/designsystem/elements/grid/Grid.tsx index 0edaeae2..2e769d33 100644 --- a/src/webui/designsystem/elements/grid/Grid.tsx +++ b/src/webui/designsystem/elements/grid/Grid.tsx @@ -1,5 +1,5 @@ -import { ReactNode } from 'react'; +import type { ReactNode } from 'react'; import './Grid.css'; diff --git a/src/webui/designsystem/elements/input/Input.tsx b/src/webui/designsystem/elements/input/Input.tsx index f3e21d2a..57341361 100644 --- a/src/webui/designsystem/elements/input/Input.tsx +++ b/src/webui/designsystem/elements/input/Input.tsx @@ -1,10 +1,10 @@ -import { ReactElement } from 'react'; +import type { ReactElement } from 'react'; -import { Props as LabelProps } from '../label/Label'; -import { Props as SelectProps } from '../select/Select'; -import { Props as TextAreaProps } from '../textarea/TextArea'; -import { Props as TextBoxProps } from '../textbox/TextBox'; +import type { Props as LabelProps } from '../label/Label'; +import type { Props as SelectProps } from '../select/Select'; +import type { Props as TextAreaProps } from '../textarea/TextArea'; +import type { Props as TextBoxProps } from '../textbox/TextBox'; import './Input.css'; diff --git a/src/webui/designsystem/elements/link/Link.tsx b/src/webui/designsystem/elements/link/Link.tsx index e181f63f..083a14db 100644 --- a/src/webui/designsystem/elements/link/Link.tsx +++ b/src/webui/designsystem/elements/link/Link.tsx @@ -1,5 +1,5 @@ -import { ReactNode } from 'react'; +import type { ReactNode } from 'react'; import './Link.css'; diff --git a/src/webui/designsystem/elements/modal/Modal.tsx b/src/webui/designsystem/elements/modal/Modal.tsx index b405c79e..b9054059 100644 --- a/src/webui/designsystem/elements/modal/Modal.tsx +++ b/src/webui/designsystem/elements/modal/Modal.tsx @@ -1,5 +1,6 @@ -import { ReactNode, useEffect, useRef } from 'react'; +import type { ReactNode} from 'react'; +import { useEffect, useRef } from 'react'; import './Modal.css'; diff --git a/src/webui/designsystem/elements/panel/Panel.tsx b/src/webui/designsystem/elements/panel/Panel.tsx index 1d4e1c49..e9158934 100644 --- a/src/webui/designsystem/elements/panel/Panel.tsx +++ b/src/webui/designsystem/elements/panel/Panel.tsx @@ -1,5 +1,5 @@ -import { ReactNode } from 'react'; +import type { ReactNode } from 'react'; import './Panel.css'; diff --git a/src/webui/designsystem/elements/paragraph/Paragraph.tsx b/src/webui/designsystem/elements/paragraph/Paragraph.tsx index 742c2dac..51243bb7 100644 --- a/src/webui/designsystem/elements/paragraph/Paragraph.tsx +++ b/src/webui/designsystem/elements/paragraph/Paragraph.tsx @@ -1,5 +1,5 @@ -import { ReactNode } from 'react'; +import type { ReactNode } from 'react'; import './Paragraph.css'; diff --git a/src/webui/designsystem/elements/row/Row.tsx b/src/webui/designsystem/elements/row/Row.tsx index 2d741a92..0ba87264 100644 --- a/src/webui/designsystem/elements/row/Row.tsx +++ b/src/webui/designsystem/elements/row/Row.tsx @@ -1,5 +1,5 @@ -import { ReactNode } from 'react'; +import type { ReactNode } from 'react'; import './Row.css'; diff --git a/src/webui/designsystem/elements/select/Select.tsx b/src/webui/designsystem/elements/select/Select.tsx index 20e4180a..225f915e 100644 --- a/src/webui/designsystem/elements/select/Select.tsx +++ b/src/webui/designsystem/elements/select/Select.tsx @@ -1,5 +1,6 @@ -import { ChangeEventHandler, forwardRef } from 'react'; +import type { ChangeEventHandler} from 'react'; +import { forwardRef } from 'react'; import './Select.css'; diff --git a/src/webui/designsystem/elements/textarea/TextArea.tsx b/src/webui/designsystem/elements/textarea/TextArea.tsx index 9b1d5dc1..59e2b5b7 100644 --- a/src/webui/designsystem/elements/textarea/TextArea.tsx +++ b/src/webui/designsystem/elements/textarea/TextArea.tsx @@ -1,5 +1,6 @@ -import { ChangeEventHandler, forwardRef } from 'react'; +import type { ChangeEventHandler} from 'react'; +import { forwardRef } from 'react'; import './TextArea.css'; diff --git a/src/webui/designsystem/elements/textbox/TextBox.tsx b/src/webui/designsystem/elements/textbox/TextBox.tsx index 03264974..a1e8ce27 100644 --- a/src/webui/designsystem/elements/textbox/TextBox.tsx +++ b/src/webui/designsystem/elements/textbox/TextBox.tsx @@ -1,5 +1,6 @@ -import { ChangeEventHandler, forwardRef } from 'react'; +import type { ChangeEventHandler} from 'react'; +import { forwardRef } from 'react'; import './TextBox.css'; diff --git a/src/webui/designsystem/elements/title/Title.tsx b/src/webui/designsystem/elements/title/Title.tsx index e02d65f2..90228a7b 100644 --- a/src/webui/designsystem/elements/title/Title.tsx +++ b/src/webui/designsystem/elements/title/Title.tsx @@ -1,5 +1,5 @@ -import { ReactNode } from 'react'; +import type { ReactNode } from 'react'; import './Title.css'; diff --git a/src/webui/editor/Editor.ts b/src/webui/editor/Editor.ts index a84352b3..77535b9d 100644 --- a/src/webui/editor/Editor.ts +++ b/src/webui/editor/Editor.ts @@ -1,7 +1,7 @@ import Renderer from './Renderer'; import Workbench from './Workbench'; -import Element from './elements/Element'; +import type Element from './elements/Element'; import Model from './model/Model'; import InputManager from './utils/InputManager'; diff --git a/src/webui/editor/Renderer.ts b/src/webui/editor/Renderer.ts index 1b17323f..773e8d4e 100644 --- a/src/webui/editor/Renderer.ts +++ b/src/webui/editor/Renderer.ts @@ -1,5 +1,5 @@ -import Workbench from './Workbench'; +import type Workbench from './Workbench'; const CAPTURE_IMAGE_TYPE = 'image/jpeg'; diff --git a/src/webui/editor/model/Model.ts b/src/webui/editor/model/Model.ts index 48c2cdec..f0189c5c 100644 --- a/src/webui/editor/model/Model.ts +++ b/src/webui/editor/model/Model.ts @@ -1,7 +1,7 @@ import Group from '../elements/Group'; import Background from './Background'; -import SpeechBubble from './SpeechBubble'; +import type SpeechBubble from './SpeechBubble'; export default class Model extends Group { diff --git a/src/webui/editor/model/SpeechBubble.ts b/src/webui/editor/model/SpeechBubble.ts index 57d00254..90f555ef 100644 --- a/src/webui/editor/model/SpeechBubble.ts +++ b/src/webui/editor/model/SpeechBubble.ts @@ -1,6 +1,7 @@ import Styling from '../definitions/Styling'; -import Geometry, { Area, Point } from '../utils/Geometry'; +import type { Area, Point } from '../utils/Geometry'; +import Geometry from '../utils/Geometry'; import TextProcessor from '../utils/TextProcessor'; import Bubble from './Bubble'; diff --git a/src/webui/editor/toolkit/BubbleSelection.ts b/src/webui/editor/toolkit/BubbleSelection.ts index 035b3223..2e61a0ca 100644 --- a/src/webui/editor/toolkit/BubbleSelection.ts +++ b/src/webui/editor/toolkit/BubbleSelection.ts @@ -1,7 +1,7 @@ import Styling from '../definitions/Styling'; import Group from '../elements/Group'; -import Bubble from '../model/Bubble'; +import type Bubble from '../model/Bubble'; import Button from './Button'; type Handler = { diff --git a/src/webui/editor/utils/TextProcessor.ts b/src/webui/editor/utils/TextProcessor.ts index c3f630d7..3dfdd1f5 100644 --- a/src/webui/editor/utils/TextProcessor.ts +++ b/src/webui/editor/utils/TextProcessor.ts @@ -1,5 +1,5 @@ -import { Area } from './Geometry'; +import type { Area } from './Geometry'; export default class TextProcessor { diff --git a/src/webui/hooks/useFocusOnMount.ts b/src/webui/hooks/useFocusOnMount.ts index 5b6f6ccb..f407867b 100644 --- a/src/webui/hooks/useFocusOnMount.ts +++ b/src/webui/hooks/useFocusOnMount.ts @@ -1,5 +1,6 @@ -import { RefObject, useEffect } from 'react'; +import type { RefObject} from 'react'; +import { useEffect } from 'react'; export function useFocusOnMount(elementRef: RefObject) { diff --git a/src/webui/hooks/useLoadData.ts b/src/webui/hooks/useLoadData.ts index eeb4f306..99664a50 100644 --- a/src/webui/hooks/useLoadData.ts +++ b/src/webui/hooks/useLoadData.ts @@ -1,5 +1,6 @@ -import { DependencyList, useEffect, useState } from 'react'; +import type { DependencyList} from 'react'; +import { useEffect, useState } from 'react'; type GetData = () => Promise; diff --git a/src/webui/hooks/useModal.ts b/src/webui/hooks/useModal.ts index d026b248..da419e52 100644 --- a/src/webui/hooks/useModal.ts +++ b/src/webui/hooks/useModal.ts @@ -1,5 +1,6 @@ -import { ReactNode, useCallback, useState } from 'react'; +import type { ReactNode} from 'react'; +import { useCallback, useState } from 'react'; export function useModal() { diff --git a/src/webui/hooks/usePagination.ts b/src/webui/hooks/usePagination.ts index f15104c8..6b1ab8ad 100644 --- a/src/webui/hooks/usePagination.ts +++ b/src/webui/hooks/usePagination.ts @@ -1,5 +1,6 @@ -import { DependencyList, useCallback, useEffect, useState } from 'react'; +import type { DependencyList} from 'react'; +import { useCallback, useEffect, useState } from 'react'; type GetData = (page: number) => Promise; diff --git a/src/webui/layouts/centered/Centered.tsx b/src/webui/layouts/centered/Centered.tsx index 85a34d10..377f75c9 100644 --- a/src/webui/layouts/centered/Centered.tsx +++ b/src/webui/layouts/centered/Centered.tsx @@ -1,5 +1,5 @@ -import { ReactNode } from 'react'; +import type { ReactNode } from 'react'; import './Centered.css'; diff --git a/src/webui/layouts/sidebar/Sidebar.tsx b/src/webui/layouts/sidebar/Sidebar.tsx index 456cd336..8c4d5947 100644 --- a/src/webui/layouts/sidebar/Sidebar.tsx +++ b/src/webui/layouts/sidebar/Sidebar.tsx @@ -1,5 +1,5 @@ -import { ReactNode } from 'react'; +import type { ReactNode } from 'react'; import './Sidebar.css'; diff --git a/src/webui/pages/Application.tsx b/src/webui/pages/Application.tsx index 71decd44..2bc8e13c 100644 --- a/src/webui/pages/Application.tsx +++ b/src/webui/pages/Application.tsx @@ -1,5 +1,5 @@ -import { ReactNode } from 'react'; +import type { ReactNode } from 'react'; import { useNavigate } from 'react-router-dom'; import { ApplicationFooter, ApplicationHeader, ApplicationSidebar } from '^/webui/components'; diff --git a/src/webui/pages/Guest.tsx b/src/webui/pages/Guest.tsx index 6b0765d5..5cad7734 100644 --- a/src/webui/pages/Guest.tsx +++ b/src/webui/pages/Guest.tsx @@ -1,5 +1,5 @@ -import { ReactNode } from 'react'; +import type { ReactNode } from 'react'; import { CenteredLayout } from '^/webui/layouts'; diff --git a/test/domain/authentication/fixtures/identities.fixture.ts b/test/domain/authentication/fixtures/identities.fixture.ts index 29ccc970..c6c75b50 100644 --- a/test/domain/authentication/fixtures/identities.fixture.ts +++ b/test/domain/authentication/fixtures/identities.fixture.ts @@ -1,5 +1,5 @@ -import { Identity } from '^/integrations/authentication'; +import type { Identity } from '^/integrations/authentication'; import { VALUES } from './values.fixture'; diff --git a/test/domain/authentication/fixtures/records.fixture.ts b/test/domain/authentication/fixtures/records.fixture.ts index bf8907d5..37428def 100644 --- a/test/domain/authentication/fixtures/records.fixture.ts +++ b/test/domain/authentication/fixtures/records.fixture.ts @@ -1,7 +1,7 @@ -import { RecordData } from '^/integrations/database'; +import type { RecordData } from '^/integrations/database'; -import { DataModel as CreatorDataModel } from '^/domain/creator'; +import type { DataModel as CreatorDataModel } from '^/domain/creator'; import { VALUES } from './values.fixture'; diff --git a/test/domain/creator/fixtures/records.fixture.ts b/test/domain/creator/fixtures/records.fixture.ts index 99703ad9..18b3fc36 100644 --- a/test/domain/creator/fixtures/records.fixture.ts +++ b/test/domain/creator/fixtures/records.fixture.ts @@ -1,7 +1,7 @@ -import { RecordData } from '^/integrations/database'; +import type { RecordData } from '^/integrations/database'; -import { DataModel as CreatorDataModel } from '^/domain/creator'; +import type { DataModel as CreatorDataModel } from '^/domain/creator'; import { VALUES } from './values.fixture'; diff --git a/test/domain/notification/create.spec.ts b/test/domain/notification/create.spec.ts index acb6e4a8..18ec7330 100644 --- a/test/domain/notification/create.spec.ts +++ b/test/domain/notification/create.spec.ts @@ -3,7 +3,8 @@ import { beforeEach, describe, expect, it } from 'vitest'; import database from '^/integrations/database'; -import { DataModel, RECORD_TYPE as NOTIFICATION_RECORD_TYPE, Types } from '^/domain/notification'; +import type { DataModel} from '^/domain/notification'; +import { RECORD_TYPE as NOTIFICATION_RECORD_TYPE, Types } from '^/domain/notification'; import create from '^/domain/notification/create'; import { DATABASES } from './fixtures/databases.fixture'; diff --git a/test/domain/notification/fixtures/records.fixture.ts b/test/domain/notification/fixtures/records.fixture.ts index 258b4c9f..bde961db 100644 --- a/test/domain/notification/fixtures/records.fixture.ts +++ b/test/domain/notification/fixtures/records.fixture.ts @@ -1,15 +1,16 @@ -import { RecordData } from '^/integrations/database'; +import type { RecordData } from '^/integrations/database'; -import { DataModel as ComicDataModel } from '^/domain/comic'; -import { DataModel as CreatorDataModel } from '^/domain/creator'; -import { DataModel as CreatorMetricsDataModel } from '^/domain/creator.metrics'; -import { DataModel as ImageDataModel } from '^/domain/image'; -import { DataModel as NotificationDataModel, Types } from '^/domain/notification'; -import { DataModel as PostDataModel } from '^/domain/post'; -import { DataModel as PostMetricsModel } from '^/domain/post.metrics'; -import { DataModel as RatingDataModel } from '^/domain/rating'; -import { DataModel as RelationDataModel } from '^/domain/relation'; +import type { DataModel as ComicDataModel } from '^/domain/comic'; +import type { DataModel as CreatorDataModel } from '^/domain/creator'; +import type { DataModel as CreatorMetricsDataModel } from '^/domain/creator.metrics'; +import type { DataModel as ImageDataModel } from '^/domain/image'; +import type { DataModel as NotificationDataModel} from '^/domain/notification'; +import { Types } from '^/domain/notification'; +import type { DataModel as PostDataModel } from '^/domain/post'; +import type { DataModel as PostMetricsModel } from '^/domain/post.metrics'; +import type { DataModel as RatingDataModel } from '^/domain/rating'; +import type { DataModel as RelationDataModel } from '^/domain/relation'; import { VALUES } from './values.fixture'; diff --git a/test/domain/notification/fixtures/requesters.fixture.ts b/test/domain/notification/fixtures/requesters.fixture.ts index 69b1384f..7096db4e 100644 --- a/test/domain/notification/fixtures/requesters.fixture.ts +++ b/test/domain/notification/fixtures/requesters.fixture.ts @@ -1,5 +1,5 @@ -import { Requester } from '^/domain/authentication'; +import type { Requester } from '^/domain/authentication'; import { VALUES } from './values.fixture'; diff --git a/test/domain/post/fixtures/queries.fixture.ts b/test/domain/post/fixtures/queries.fixture.ts index 59d36b78..71321918 100644 --- a/test/domain/post/fixtures/queries.fixture.ts +++ b/test/domain/post/fixtures/queries.fixture.ts @@ -1,5 +1,5 @@ -import { RecordQuery } from '^/integrations/database'; +import type { RecordQuery } from '^/integrations/database'; import { REQUESTERS } from './requesters.fixture'; import { VALUES } from './values.fixture'; diff --git a/test/domain/post/fixtures/records.fixture.ts b/test/domain/post/fixtures/records.fixture.ts index 790a90e4..d74617d3 100644 --- a/test/domain/post/fixtures/records.fixture.ts +++ b/test/domain/post/fixtures/records.fixture.ts @@ -1,14 +1,14 @@ -import { RecordData } from '^/integrations/database'; - -import { DataModel as ComicDataModel } from '^/domain/comic'; -import { DataModel as CreatorDataModel } from '^/domain/creator'; -import { DataModel as CreatorMetricsDataModel } from '^/domain/creator.metrics'; -import { DataModel as ImageDataModel } from '^/domain/image'; -import { DataModel as PostDataModel } from '^/domain/post'; -import { DataModel as PostMetricsDataModel } from '^/domain/post.metrics'; -import { DataModel as RatingDataModel } from '^/domain/rating'; -import { DataModel as RelationDataModel } from '^/domain/relation'; +import type { RecordData } from '^/integrations/database'; + +import type { DataModel as ComicDataModel } from '^/domain/comic'; +import type { DataModel as CreatorDataModel } from '^/domain/creator'; +import type { DataModel as CreatorMetricsDataModel } from '^/domain/creator.metrics'; +import type { DataModel as ImageDataModel } from '^/domain/image'; +import type { DataModel as PostDataModel } from '^/domain/post'; +import type { DataModel as PostMetricsDataModel } from '^/domain/post.metrics'; +import type { DataModel as RatingDataModel } from '^/domain/rating'; +import type { DataModel as RelationDataModel } from '^/domain/relation'; import { REQUESTERS } from './requesters.fixture'; import { VALUES } from './values.fixture'; diff --git a/test/domain/post/fixtures/requesters.fixture.ts b/test/domain/post/fixtures/requesters.fixture.ts index 24cb0b45..5fef0e06 100644 --- a/test/domain/post/fixtures/requesters.fixture.ts +++ b/test/domain/post/fixtures/requesters.fixture.ts @@ -1,5 +1,6 @@ -import { requester, Requester } from '^/domain/authentication'; +import type { Requester } from '^/domain/authentication'; +import { requester } from '^/domain/authentication'; import { VALUES } from './values.fixture'; diff --git a/test/domain/rating/fixtures/records.fixture.ts b/test/domain/rating/fixtures/records.fixture.ts index 88ae08d3..771877ee 100644 --- a/test/domain/rating/fixtures/records.fixture.ts +++ b/test/domain/rating/fixtures/records.fixture.ts @@ -1,7 +1,7 @@ -import { RecordData } from '^/integrations/database'; +import type { RecordData } from '^/integrations/database'; -import { DataModel as RatingDataModel } from '^/domain/rating'; +import type { DataModel as RatingDataModel } from '^/domain/rating'; import { REQUESTERS } from './requesters.fixture'; import { VALUES } from './values.fixture'; diff --git a/test/domain/rating/fixtures/requesters.fixture.ts b/test/domain/rating/fixtures/requesters.fixture.ts index 24cb0b45..5fef0e06 100644 --- a/test/domain/rating/fixtures/requesters.fixture.ts +++ b/test/domain/rating/fixtures/requesters.fixture.ts @@ -1,5 +1,6 @@ -import { requester, Requester } from '^/domain/authentication'; +import type { Requester } from '^/domain/authentication'; +import { requester } from '^/domain/authentication'; import { VALUES } from './values.fixture'; diff --git a/test/domain/relation/fixtures/queries.fixture.ts b/test/domain/relation/fixtures/queries.fixture.ts index cab89327..7b75196a 100644 --- a/test/domain/relation/fixtures/queries.fixture.ts +++ b/test/domain/relation/fixtures/queries.fixture.ts @@ -1,5 +1,5 @@ -import { RecordQuery } from '^/integrations/database'; +import type { RecordQuery } from '^/integrations/database'; import { REQUESTERS } from './requesters.fixture'; import { VALUES } from './values.fixture'; diff --git a/test/domain/relation/fixtures/records.fixture.ts b/test/domain/relation/fixtures/records.fixture.ts index a2b70da8..09165545 100644 --- a/test/domain/relation/fixtures/records.fixture.ts +++ b/test/domain/relation/fixtures/records.fixture.ts @@ -1,9 +1,9 @@ -import { RecordData } from '^/integrations/database'; +import type { RecordData } from '^/integrations/database'; -import { DataModel as CreatorDataModel } from '^/domain/creator'; -import { DataModel as CreatorMetricsDataModel } from '^/domain/creator.metrics'; -import { DataModel as RelationDataModel } from '^/domain/relation'; +import type { DataModel as CreatorDataModel } from '^/domain/creator'; +import type { DataModel as CreatorMetricsDataModel } from '^/domain/creator.metrics'; +import type { DataModel as RelationDataModel } from '^/domain/relation'; import { VALUES } from './values.fixture'; diff --git a/test/integrations/database/fixtures/queries.fixture.ts b/test/integrations/database/fixtures/queries.fixture.ts index 5c16d34c..ca65cbe7 100644 --- a/test/integrations/database/fixtures/queries.fixture.ts +++ b/test/integrations/database/fixtures/queries.fixture.ts @@ -1,5 +1,5 @@ -import { RecordQuery } from '^/integrations/database'; +import type { RecordQuery } from '^/integrations/database'; import { RECORDS } from './records.fixture'; diff --git a/test/integrations/database/fixtures/records.fixture.ts b/test/integrations/database/fixtures/records.fixture.ts index 3d6d3592..755aeb98 100644 --- a/test/integrations/database/fixtures/records.fixture.ts +++ b/test/integrations/database/fixtures/records.fixture.ts @@ -1,5 +1,5 @@ -import { RecordData } from '^/integrations/database'; +import type { RecordData } from '^/integrations/database'; export const RECORD_TYPES = { diff --git a/test/integrations/database/fixtures/results.fixture.ts b/test/integrations/database/fixtures/results.fixture.ts index afa1523d..3a35909e 100644 --- a/test/integrations/database/fixtures/results.fixture.ts +++ b/test/integrations/database/fixtures/results.fixture.ts @@ -1,5 +1,5 @@ -import { RecordData } from '^/integrations/database'; +import type { RecordData } from '^/integrations/database'; import { RECORDS } from './records.fixture'; diff --git a/test/integrations/database/fixtures/sorts.fixture.ts b/test/integrations/database/fixtures/sorts.fixture.ts index 80c25b61..8100dc6a 100644 --- a/test/integrations/database/fixtures/sorts.fixture.ts +++ b/test/integrations/database/fixtures/sorts.fixture.ts @@ -1,5 +1,6 @@ -import { RecordSort, SortDirections } from '^/integrations/database'; +import type { RecordSort} from '^/integrations/database'; +import { SortDirections } from '^/integrations/database'; export const SORTS: Record = { diff --git a/test/integrations/eventbroker/fixtures/subscriptions.fixture.ts b/test/integrations/eventbroker/fixtures/subscriptions.fixture.ts index 04f147d2..97fb8940 100644 --- a/test/integrations/eventbroker/fixtures/subscriptions.fixture.ts +++ b/test/integrations/eventbroker/fixtures/subscriptions.fixture.ts @@ -1,5 +1,6 @@ -import eventBroker, { Event } from '^/integrations/eventbroker'; +import type { Event } from '^/integrations/eventbroker'; +import eventBroker from '^/integrations/eventbroker'; export function createSubscription(event: Event): Promise { diff --git a/test/integrations/http/fixtures/implementation.mock.ts b/test/integrations/http/fixtures/implementation.mock.ts index bff4734b..51ba621e 100644 --- a/test/integrations/http/fixtures/implementation.mock.ts +++ b/test/integrations/http/fixtures/implementation.mock.ts @@ -1,5 +1,5 @@ -import { Http } from '^/integrations/http/definitions/interfaces'; +import type { Http } from '^/integrations/http/definitions/interfaces'; import { RESPONSES } from './responses.fixture'; diff --git a/test/integrations/validation/fixtures/validationSchemes.fixture.ts b/test/integrations/validation/fixtures/validationSchemes.fixture.ts index ed0d5e3c..664c847f 100644 --- a/test/integrations/validation/fixtures/validationSchemes.fixture.ts +++ b/test/integrations/validation/fixtures/validationSchemes.fixture.ts @@ -1,5 +1,5 @@ -import { ValidationSchema } from '^/integrations/validation'; +import type { ValidationSchema } from '^/integrations/validation'; import { VALUES } from './values.fixture'; diff --git a/test/integrations/validation/implementation.spec.ts b/test/integrations/validation/implementation.spec.ts index 88991623..cc0d243d 100644 --- a/test/integrations/validation/implementation.spec.ts +++ b/test/integrations/validation/implementation.spec.ts @@ -1,7 +1,8 @@ import { describe, expect, it } from 'vitest'; -import validator, { ValidationSchema } from '^/integrations/validation'; +import type { ValidationSchema } from '^/integrations/validation'; +import validator from '^/integrations/validation'; import { VALIDATION_SCHEMES, VALUES } from './fixtures';