-import { Request, Response, NextFunction } from 'express'
-
-import { database as db } from '../initializers'
-import {
- logger,
- getAccountFromWebfinger,
- isSignatureVerified
-} from '../helpers'
-import { ActivityPubSignature } from '../../shared'
+import { NextFunction, Request, Response } from 'express'
+import { ActivityDelete, ActivityPubSignature } from '../../shared'
+import { logger } from '../helpers/logger'
+import { isHTTPSignatureVerified, isJsonLDSignatureVerified, parseHTTPSignature } from '../helpers/peertube-crypto'
+import { ACCEPT_HEADERS, ACTIVITY_PUB, HTTP_SIGNATURE } from '../initializers/constants'
+import { getOrCreateActorAndServerAndModel } from '../lib/activitypub/actor'
+import { loadActorUrlOrGetFromWebfinger } from '../helpers/webfinger'
+import { isActorDeleteActivityValid } from '@server/helpers/custom-validators/activitypub/actor'
+import { getAPId } from '@server/helpers/activitypub'