Hello. I'm new to Nest.js and I struggle with a thing I think should be easy but I don't know how to do it 
I have a file containing a module, which is straight imported by app.module.ts:
import { Module } from '@nestjs/common';
import { AdminModule } from '@adminjs/nestjs';
import { UserEntity } from 'src/database/entities/user/user.entity';
import * as AdminJSTypeorm from '@adminjs/typeorm';
import AdminJS from 'adminjs';
import theme from '@adminjs/design-system';
import { ChannelEntity } from 'src/database/entities/channel/channel.entity';
import { UserResource } from './resources/user.resource';
import { AdminPanelLocale } from './admin-panel.locale';
import { ChannelResource } from './resources/channel.resource';
import { componentLoader } from './components/components';
import { AuthenticatedGuard } from 'src/auth/guards/authenticated.guard';
import { UserService } from 'src/database/entities/user/user.service';
AdminJS.registerAdapter({
Resource: AdminJSTypeorm.Resource,
Database: AdminJSTypeorm.Database,
});
type CurrentAdmin = {
/**
* Admin has one required field which is an email
*/
email: string;
/**
* Optional title/role of an admin - this will be presented below the email
*/
title?: string;
/**
* Optional url for an avatar photo
*/
avatarUrl?: string;
/**
* Id of your admin user
*/
id?: string;
/**
* Also you can put as many other fields to it as you like.
*/
[key: string]: any;
};
const DEFAULT_ADMIN: CurrentAdmin = {
email: 'admin@example.com',
password: 'password',
title: 'Admin',
avatarUrl: 'https://i.imgur.com/4by23BO.png',
id: '123',
};
const authenticate = async (email, password) => {
// <- Here I want to use UserService to check if user exists in database
if (email === DEFAULT_ADMIN.email && password === DEFAULT_ADMIN.password) {
return DEFAULT_ADMIN;
}
return null;
};
@Module({
imports: [
AdminModule.createAdmin({
adminJsOptions: {
rootPath: '/admin',
resources: [
UserResource,
ChannelResource
],
componentLoader: componentLoader,
locale: AdminPanelLocale,
branding: {
logo: 'https://i.imgur.com/4by23BO.png',
companyName: 'Polskie Legendy Apex',
withMadeWithLove: false,
favicon: 'https://i.imgur.com/u4DEkaz.png',
},
},
auth: {
authenticate: authenticate,
cookieName: 'adminjs',
cookiePassword: 'secret-cookie',
},
sessionOptions: {
resave: false,
saveUninitialized: false,
secret: 'super-secret',
}
}),
],
controllers: [],
providers: [],
exports: [],
})
export class AdminPanelModule {}
I want to use my user service and all my TypeORM stuff to put some authorization stuff going on in the authentication function. But I just don't know how could I use Nest.js things outside of module declaration.
Can you help me? ❤️🩹