diff --git a/server/.nvmrc b/server/.nvmrc new file mode 100644 index 0000000000..5036cb7c07 --- /dev/null +++ b/server/.nvmrc @@ -0,0 +1 @@ +18.10.0 diff --git a/server/jest.config.ts b/server/jest.config.ts new file mode 100644 index 0000000000..babc368094 --- /dev/null +++ b/server/jest.config.ts @@ -0,0 +1,18 @@ +module.exports = { + clearMocks: true, + preset: 'ts-jest', + testEnvironment: 'node', + setupFilesAfterEnv: ['/src/prisma-mock/jest-prisma-singleton.ts'], + + moduleFileExtensions: ['js', 'json', 'ts'], + moduleNameMapper: { + '^src/(.*)': '/src/$1', + }, + rootDir: './', + testRegex: '.*\\.spec\\.ts$', + transform: { + '^.+\\.(t|j)s$': 'ts-jest', + }, + collectCoverageFrom: ['**/*.(t|j)s'], + coverageDirectory: '../coverage', +}; diff --git a/server/package.json b/server/package.json index 451da37e81..c5fdbfc8b0 100644 --- a/server/package.json +++ b/server/package.json @@ -43,6 +43,7 @@ "graphql": "^16.6.0", "graphql-type-json": "^0.3.2", "jest-mock-extended": "^3.0.4", + "jsonwebtoken": "^9.0.0", "passport": "^0.6.0", "passport-google-oauth20": "^2.0.0", "passport-jwt": "^4.0.1", @@ -60,7 +61,9 @@ "@types/jest": "28.1.8", "@types/node": "^16.0.0", "@types/passport-google-oauth20": "^2.0.11", + "@types/passport-jwt": "^3.0.8", "@types/supertest": "^2.0.11", + "@types/uuid": "^9.0.2", "@typescript-eslint/eslint-plugin": "^5.0.0", "@typescript-eslint/parser": "^5.0.0", "eslint": "^8.0.1", @@ -78,23 +81,6 @@ "tsconfig-paths": "4.1.0", "typescript": "^4.9.4" }, - "jest": { - "moduleFileExtensions": [ - "js", - "json", - "ts" - ], - "rootDir": "src", - "testRegex": ".*\\.spec\\.ts$", - "transform": { - "^.+\\.(t|j)s$": "ts-jest" - }, - "collectCoverageFrom": [ - "**/*.(t|j)s" - ], - "coverageDirectory": "../coverage", - "testEnvironment": "node" - }, "prisma": { "schema": "src/database/schema.prisma", "seed": "ts-node src/database/seeds/index.ts" diff --git a/server/src/api/api.module.ts b/server/src/api/api.module.ts deleted file mode 100644 index 9fb94ad06c..0000000000 --- a/server/src/api/api.module.ts +++ /dev/null @@ -1,68 +0,0 @@ -import { Module } from '@nestjs/common'; -import { GraphQLModule } from '@nestjs/graphql'; -import { ConfigService } from '@nestjs/config'; -import { ApolloDriver, ApolloDriverConfig } from '@nestjs/apollo'; - -import { AuthModule } from 'src/auth/auth.module'; -import { PrismaModule } from 'src/database/prisma.module'; -import { ArgsService } from './resolvers/services/args.service'; - -import { CompanyResolver } from './resolvers/company.resolver'; -import { UserResolver } from './resolvers/user.resolver'; -import { PersonResolver } from './resolvers/person.resolver'; -import { CommentResolver } from './resolvers/comment.resolver'; -import { CommentThreadResolver } from './resolvers/comment-thread.resolver'; -import { PipelineResolver } from './resolvers/pipeline.resolver'; -import { PipelineStageResolver } from './resolvers/pipeline-stage.resolver'; - -import { PersonRelationsResolver } from './resolvers/relations/person-relations.resolver'; -import { UserRelationsResolver } from './resolvers/relations/user-relations.resolver'; -import { WorkspaceMemberRelationsResolver } from './resolvers/relations/workspace-member-relations.resolver'; -import { CompanyRelationsResolver } from './resolvers/relations/company-relations.resolver'; -import { CommentThreadRelationsResolver } from './resolvers/relations/comment-thread-relations.resolver'; -import { PipelineRelationsResolver } from './resolvers/relations/pipeline-relations.resolver'; -import { GraphQLError } from 'graphql'; -import { CommentRelationsResolver } from './resolvers/relations/comment-relations.resolver'; -import { PipelineProgressResolver } from './resolvers/pipeline-progress.resolver'; -import { PipelineStageRelationsResolver } from './resolvers/relations/pipeline-stage-relations.resolver'; -import { PipelineProgressRelationsResolver } from './resolvers/relations/pipeline-progress-relations.resolver'; - -@Module({ - imports: [ - GraphQLModule.forRoot({ - context: ({ req }) => ({ req }), - driver: ApolloDriver, - autoSchemaFile: true, - formatError: (error: GraphQLError) => { - error.extensions.stacktrace = undefined; - return error; - }, - }), - AuthModule, - PrismaModule, - ], - providers: [ - ConfigService, - ArgsService, - - CompanyResolver, - PersonResolver, - UserResolver, - CommentResolver, - CommentThreadResolver, - PipelineResolver, - PipelineStageResolver, - PipelineProgressResolver, - - CompanyRelationsResolver, - CommentRelationsResolver, - PersonRelationsResolver, - UserRelationsResolver, - WorkspaceMemberRelationsResolver, - CommentThreadRelationsResolver, - PipelineRelationsResolver, - PipelineStageRelationsResolver, - PipelineProgressRelationsResolver, - ], -}) -export class ApiModule {} diff --git a/server/src/api/resolvers/comment-thread.resolver.ts b/server/src/api/resolvers/comment-thread.resolver.ts deleted file mode 100644 index aa58dc572a..0000000000 --- a/server/src/api/resolvers/comment-thread.resolver.ts +++ /dev/null @@ -1,102 +0,0 @@ -import { Resolver, Args, Mutation, Query } from '@nestjs/graphql'; -import { UseGuards } from '@nestjs/common'; -import { JwtAuthGuard } from 'src/auth/guards/jwt.auth.guard'; -import { PrismaService } from 'src/database/prisma.service'; -import { Workspace } from '../@generated/workspace/workspace.model'; -import { AuthWorkspace } from './decorators/auth-workspace.decorator'; -import { CommentThread } from '../@generated/comment-thread/comment-thread.model'; -import { CreateOneCommentThreadArgs } from '../@generated/comment-thread/create-one-comment-thread.args'; -import { CreateOneCommentThreadGuard } from './guards/create-one-comment-thread.guard'; -import { FindManyCommentThreadArgs } from '../@generated/comment-thread/find-many-comment-thread.args'; -import { ArgsService } from './services/args.service'; -import { UpdateOneCommentThreadArgs } from '../@generated/comment-thread/update-one-comment-thread.args'; - -@UseGuards(JwtAuthGuard) -@Resolver(() => CommentThread) -export class CommentThreadResolver { - constructor( - private readonly prismaService: PrismaService, - private readonly argsService: ArgsService, - ) {} - - @UseGuards(CreateOneCommentThreadGuard) - @Mutation(() => CommentThread, { - nullable: false, - }) - async createOneCommentThread( - @Args() args: CreateOneCommentThreadArgs, - @AuthWorkspace() workspace: Workspace, - ): Promise { - const newCommentData = args.data.comments?.createMany?.data - ? args.data.comments?.createMany?.data?.map((comment) => ({ - ...comment, - ...{ workspaceId: workspace.id }, - })) - : []; - - const createdCommentThread = await this.prismaService.commentThread.create({ - data: { - ...args.data, - ...{ commentThreadTargets: undefined }, - ...{ comments: { createMany: { data: newCommentData } } }, - ...{ workspace: { connect: { id: workspace.id } } }, - }, - }); - - if (args.data.commentThreadTargets?.createMany?.data) { - await this.prismaService.commentThreadTarget.createMany({ - data: args.data.commentThreadTargets?.createMany?.data?.map( - (target) => ({ - ...target, - commentThreadId: args.data.id, - }), - ), - skipDuplicates: - args.data.commentThreadTargets?.createMany?.skipDuplicates ?? false, - }); - - return await this.prismaService.commentThread.update({ - where: { id: args.data.id }, - data: { - commentThreadTargets: { - connect: args.data.commentThreadTargets?.connect, - }, - }, - }); - } - - return createdCommentThread; - } - - @Mutation(() => CommentThread, { - nullable: false, - }) - async updateOneCommentThread( - @Args() args: UpdateOneCommentThreadArgs, - ): Promise { - const updatedCommentThread = await this.prismaService.commentThread.update({ - data: args.data, - where: args.where, - }); - - return updatedCommentThread; - } - - @Query(() => [CommentThread]) - async findManyCommentThreads( - @Args() args: FindManyCommentThreadArgs, - @AuthWorkspace() workspace: Workspace, - ) { - const preparedArgs = - await this.argsService.prepareFindManyArgs( - args, - workspace, - ); - - const result = await this.prismaService.commentThread.findMany( - preparedArgs, - ); - - return result; - } -} diff --git a/server/src/api/resolvers/comment.resolver.ts b/server/src/api/resolvers/comment.resolver.ts deleted file mode 100644 index dffc64f580..0000000000 --- a/server/src/api/resolvers/comment.resolver.ts +++ /dev/null @@ -1,32 +0,0 @@ -import { Resolver, Args, Mutation } from '@nestjs/graphql'; -import { UseGuards } from '@nestjs/common'; -import { JwtAuthGuard } from 'src/auth/guards/jwt.auth.guard'; -import { PrismaService } from 'src/database/prisma.service'; -import { Workspace } from '../@generated/workspace/workspace.model'; -import { AuthWorkspace } from './decorators/auth-workspace.decorator'; -import { CreateOneCommentArgs } from '../@generated/comment/create-one-comment.args'; -import { Comment } from '../@generated/comment/comment.model'; -import { CreateOneCommentGuard } from './guards/create-one-comment.guard'; -import { Prisma } from '@prisma/client'; - -@UseGuards(JwtAuthGuard) -@Resolver(() => Comment) -export class CommentResolver { - constructor(private readonly prismaService: PrismaService) {} - - @UseGuards(CreateOneCommentGuard) - @Mutation(() => Comment, { - nullable: false, - }) - async createOneComment( - @Args() args: CreateOneCommentArgs, - @AuthWorkspace() workspace: Workspace, - ): Promise { - return this.prismaService.comment.create({ - data: { - ...args.data, - ...{ workspace: { connect: { id: workspace.id } } }, - }, - } satisfies CreateOneCommentArgs as Prisma.CommentCreateArgs); - } -} diff --git a/server/src/api/resolvers/decorators/auth-user.decorator.ts b/server/src/api/resolvers/decorators/auth-user.decorator.ts deleted file mode 100644 index 636c98c6d9..0000000000 --- a/server/src/api/resolvers/decorators/auth-user.decorator.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { ExecutionContext, createParamDecorator } from '@nestjs/common'; -import { GqlExecutionContext } from '@nestjs/graphql'; - -export const AuthUser = createParamDecorator( - (data: unknown, ctx: ExecutionContext) => { - const gqlContext = GqlExecutionContext.create(ctx); - const request = gqlContext.getContext().req; - return request.user; - }, -); diff --git a/server/src/api/resolvers/decorators/auth-workspace.decorator.ts b/server/src/api/resolvers/decorators/auth-workspace.decorator.ts deleted file mode 100644 index 43a65695b5..0000000000 --- a/server/src/api/resolvers/decorators/auth-workspace.decorator.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { ExecutionContext, createParamDecorator } from '@nestjs/common'; -import { GqlExecutionContext } from '@nestjs/graphql'; - -export const AuthWorkspace = createParamDecorator( - (data: unknown, ctx: ExecutionContext) => { - const gqlContext = GqlExecutionContext.create(ctx); - const request = gqlContext.getContext().req; - return request.workspace; - }, -); diff --git a/server/src/api/resolvers/pipeline-progress.resolver.ts b/server/src/api/resolvers/pipeline-progress.resolver.ts deleted file mode 100644 index 9f71237256..0000000000 --- a/server/src/api/resolvers/pipeline-progress.resolver.ts +++ /dev/null @@ -1,73 +0,0 @@ -import { Resolver, Args, Query, Mutation } from '@nestjs/graphql'; -import { UseGuards } from '@nestjs/common'; -import { JwtAuthGuard } from 'src/auth/guards/jwt.auth.guard'; -import { PrismaService } from 'src/database/prisma.service'; -import { Workspace } from '../@generated/workspace/workspace.model'; -import { AuthWorkspace } from './decorators/auth-workspace.decorator'; -import { ArgsService } from './services/args.service'; -import { FindManyPipelineProgressArgs } from '../@generated/pipeline-progress/find-many-pipeline-progress.args'; -import { PipelineProgress } from '../@generated/pipeline-progress/pipeline-progress.model'; -import { UpdateOnePipelineProgressArgs } from '../@generated/pipeline-progress/update-one-pipeline-progress.args'; -import { Prisma } from '@prisma/client'; -import { AffectedRows } from '../@generated/prisma/affected-rows.output'; -import { DeleteManyPipelineProgressArgs } from '../@generated/pipeline-progress/delete-many-pipeline-progress.args'; -import { CreateOnePipelineProgressArgs } from '../@generated/pipeline-progress/create-one-pipeline-progress.args'; - -@UseGuards(JwtAuthGuard) -@Resolver(() => PipelineProgress) -export class PipelineProgressResolver { - constructor( - private readonly prismaService: PrismaService, - private readonly argsService: ArgsService, - ) {} - - @Query(() => [PipelineProgress]) - async findManyPipelineProgress( - @Args() args: FindManyPipelineProgressArgs, - @AuthWorkspace() workspace: Workspace, - ) { - const preparedArgs = - await this.argsService.prepareFindManyArgs( - args, - workspace, - ); - return this.prismaService.pipelineProgress.findMany(preparedArgs); - } - - @Mutation(() => PipelineProgress, { - nullable: true, - }) - async updateOnePipelineProgress( - @Args() args: UpdateOnePipelineProgressArgs, - ): Promise { - return this.prismaService.pipelineProgress.update({ - ...args, - } satisfies UpdateOnePipelineProgressArgs as Prisma.PipelineProgressUpdateArgs); - } - - @Mutation(() => AffectedRows, { - nullable: false, - }) - async deleteManyPipelineProgress( - @Args() args: DeleteManyPipelineProgressArgs, - ): Promise { - return this.prismaService.pipelineProgress.deleteMany({ - ...args, - }); - } - - @Mutation(() => PipelineProgress, { - nullable: false, - }) - async createOnePipelineProgress( - @Args() args: CreateOnePipelineProgressArgs, - @AuthWorkspace() workspace: Workspace, - ): Promise { - return this.prismaService.pipelineProgress.create({ - data: { - ...args.data, - ...{ workspace: { connect: { id: workspace.id } } }, - }, - } satisfies CreateOnePipelineProgressArgs as Prisma.PipelineProgressCreateArgs); - } -} diff --git a/server/src/api/resolvers/pipeline-stage.resolver.ts b/server/src/api/resolvers/pipeline-stage.resolver.ts deleted file mode 100644 index cac9e99fee..0000000000 --- a/server/src/api/resolvers/pipeline-stage.resolver.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { Resolver, Args, Query } from '@nestjs/graphql'; -import { UseGuards } from '@nestjs/common'; -import { JwtAuthGuard } from 'src/auth/guards/jwt.auth.guard'; -import { PrismaService } from 'src/database/prisma.service'; -import { Workspace } from '../@generated/workspace/workspace.model'; -import { AuthWorkspace } from './decorators/auth-workspace.decorator'; -import { PipelineStage } from '../@generated/pipeline-stage/pipeline-stage.model'; -import { FindManyPipelineStageArgs } from '../@generated/pipeline-stage/find-many-pipeline-stage.args'; -import { ArgsService } from './services/args.service'; - -@UseGuards(JwtAuthGuard) -@Resolver(() => PipelineStage) -export class PipelineStageResolver { - constructor( - private readonly prismaService: PrismaService, - private readonly argsService: ArgsService, - ) {} - - @Query(() => [PipelineStage]) - async findManyPipelineStage( - @Args() args: FindManyPipelineStageArgs, - @AuthWorkspace() workspace: Workspace, - ) { - const preparedArgs = - await this.argsService.prepareFindManyArgs( - args, - workspace, - ); - return this.prismaService.pipelineStage.findMany(preparedArgs); - } -} diff --git a/server/src/api/resolvers/pipeline.resolver.ts b/server/src/api/resolvers/pipeline.resolver.ts deleted file mode 100644 index 1380df2d2c..0000000000 --- a/server/src/api/resolvers/pipeline.resolver.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { Resolver, Args, Query } from '@nestjs/graphql'; -import { UseGuards } from '@nestjs/common'; -import { JwtAuthGuard } from 'src/auth/guards/jwt.auth.guard'; -import { PrismaService } from 'src/database/prisma.service'; -import { Workspace } from '../@generated/workspace/workspace.model'; -import { AuthWorkspace } from './decorators/auth-workspace.decorator'; -import { Pipeline } from '../@generated/pipeline/pipeline.model'; -import { FindManyPipelineArgs } from '../@generated/pipeline/find-many-pipeline.args'; -import { ArgsService } from './services/args.service'; - -@UseGuards(JwtAuthGuard) -@Resolver(() => Pipeline) -export class PipelineResolver { - constructor( - private readonly prismaService: PrismaService, - private readonly argsService: ArgsService, - ) {} - - @Query(() => [Pipeline]) - async findManyPipeline( - @Args() args: FindManyPipelineArgs, - @AuthWorkspace() workspace: Workspace, - ) { - const preparedArgs = - await this.argsService.prepareFindManyArgs( - args, - workspace, - ); - return this.prismaService.pipeline.findMany(preparedArgs); - } -} diff --git a/server/src/api/resolvers/services/args.service.ts b/server/src/api/resolvers/services/args.service.ts deleted file mode 100644 index 11a3b5b362..0000000000 --- a/server/src/api/resolvers/services/args.service.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { Injectable } from '@nestjs/common'; -import { Workspace } from '@prisma/client'; - -type FindManyArgsType = { where?: object; orderBy?: object }; - -@Injectable() -export class ArgsService { - async prepareFindManyArgs( - args: T, - workspace: Workspace, - ): Promise { - args.where = { - ...args.where, - ...{ workspace: { is: { id: { equals: workspace.id } } } }, - }; - return args; - } -} diff --git a/server/src/api/resolvers/user.resolver.ts b/server/src/api/resolvers/user.resolver.ts deleted file mode 100644 index b2daa9c560..0000000000 --- a/server/src/api/resolvers/user.resolver.ts +++ /dev/null @@ -1,37 +0,0 @@ -import { Resolver, Query, Args } from '@nestjs/graphql'; -import { PrismaService } from 'src/database/prisma.service'; -import { UseFilters, UseGuards } from '@nestjs/common'; - -import { User } from '../@generated/user/user.model'; -import { FindManyUserArgs } from '../@generated/user/find-many-user.args'; -import { Workspace } from '@prisma/client'; -import { AuthWorkspace } from './decorators/auth-workspace.decorator'; -import { ExceptionFilter } from './exception-filters/exception.filter'; -import { JwtAuthGuard } from 'src/auth/guards/jwt.auth.guard'; - -@UseGuards(JwtAuthGuard) -@Resolver(() => User) -export class UserResolver { - constructor(private readonly prismaService: PrismaService) {} - - @UseFilters(ExceptionFilter) - @Query(() => [User], { - nullable: false, - }) - async findManyUser( - @Args() args: FindManyUserArgs, - @AuthWorkspace() workspace: Workspace, - ): Promise { - args.where = { - ...args.where, - ...{ - workspaceMember: { - is: { workspace: { is: { id: { equals: workspace.id } } } }, - }, - }, - }; - return await this.prismaService.user.findMany({ - ...args, - }); - } -} diff --git a/server/src/app.module.ts b/server/src/app.module.ts index 2fbd1fcbc7..87f7871ed2 100644 --- a/server/src/app.module.ts +++ b/server/src/app.module.ts @@ -1,14 +1,32 @@ import { Module } from '@nestjs/common'; +import { GraphQLModule } from '@nestjs/graphql'; import { AppService } from './app.service'; -import { HealthController } from './health.controller'; -import { TerminusModule } from '@nestjs/terminus'; -import { AuthModule } from './auth/auth.module'; import { ConfigModule } from '@nestjs/config'; -import { ApiModule } from './api/api.module'; +import { CoreModule } from './core/core.module'; +import { ApolloDriver, ApolloDriverConfig } from '@nestjs/apollo'; +import { GraphQLError } from 'graphql'; +import { PrismaModule } from './database/prisma.module'; +import { HealthModule } from './health/health.module'; + @Module({ - imports: [ConfigModule.forRoot({}), TerminusModule, AuthModule, ApiModule], - controllers: [HealthController], + imports: [ + ConfigModule.forRoot({ + isGlobal: true, + }), + GraphQLModule.forRoot({ + context: ({ req }) => ({ req }), + driver: ApolloDriver, + autoSchemaFile: true, + formatError: (error: GraphQLError) => { + error.extensions.stacktrace = undefined; + return error; + }, + }), + PrismaModule, + HealthModule, + CoreModule, + ], providers: [AppService], }) export class AppModule {} diff --git a/server/src/auth/guards/jwt.auth.guard.ts b/server/src/auth/guards/jwt.auth.guard.ts deleted file mode 100644 index d3012b6c02..0000000000 --- a/server/src/auth/guards/jwt.auth.guard.ts +++ /dev/null @@ -1,70 +0,0 @@ -import { - CanActivate, - ExecutionContext, - HttpException, - HttpStatus, - Injectable, - UnauthorizedException, -} from '@nestjs/common'; -import { JwtService } from '@nestjs/jwt'; -import { GqlExecutionContext } from '@nestjs/graphql'; -import { Request } from 'express'; -import { ConfigService } from '@nestjs/config'; -import { PrismaService } from 'src/database/prisma.service'; -import { JwtPayload } from '../strategies/jwt.auth.strategy'; - -@Injectable() -export class JwtAuthGuard implements CanActivate { - constructor( - private jwtService: JwtService, - private configService: ConfigService, - private prismaService: PrismaService, - ) {} - - async canActivate(context: ExecutionContext): Promise { - const gqlContext = GqlExecutionContext.create(context); - const request = gqlContext.getContext().req; - const token = this.extractTokenFromHeader(request); - if (!token) { - throw new UnauthorizedException(); - } - try { - const payload: JwtPayload = await this.jwtService.verifyAsync(token, { - secret: this.configService.get('JWT_SECRET'), - }); - - const user = this.prismaService.user.findUniqueOrThrow({ - where: { id: payload.userId }, - }); - - if (!user) { - throw new HttpException( - { reason: 'User does not exist' }, - HttpStatus.FORBIDDEN, - ); - } - - const workspace = this.prismaService.workspace.findUniqueOrThrow({ - where: { id: payload.workspaceId }, - }); - - if (!workspace) { - throw new HttpException( - { reason: 'Workspace does not exist' }, - HttpStatus.FORBIDDEN, - ); - } - - request.user = user; - request.workspace = workspace; - } catch (exception) { - throw new UnauthorizedException(); - } - return true; - } - - private extractTokenFromHeader(request: Request): string | undefined { - const [type, token] = request.headers.authorization?.split(' ') ?? []; - return type === 'Bearer' ? token : undefined; - } -} diff --git a/server/src/auth/strategies/jwt.auth.strategy.ts b/server/src/auth/strategies/jwt.auth.strategy.ts deleted file mode 100644 index 7465345dc3..0000000000 --- a/server/src/auth/strategies/jwt.auth.strategy.ts +++ /dev/null @@ -1,30 +0,0 @@ -import { Strategy } from 'passport-jwt'; -import { PassportStrategy } from '@nestjs/passport'; -import { Injectable } from '@nestjs/common'; -import { ConfigService } from '@nestjs/config'; - -export type JwtPayload = { userId: string; workspaceId: string }; - -@Injectable() -export class JwtAuthStrategy extends PassportStrategy(Strategy, 'jwt') { - constructor(configService: ConfigService) { - const extractJwtFromCookie = (req) => { - let token = null; - - if (req && req.cookies) { - token = req.cookies['jwt']; - } - return token; - }; - - super({ - jwtFromRequest: extractJwtFromCookie, - ignoreExpiration: false, - secretOrKey: configService.get('JWT_SECRET'), - }); - } - - async validate(payload: JwtPayload): Promise { - return { userId: payload.userId, workspaceId: payload.workspaceId }; - } -} diff --git a/server/src/api/@generated/comment-thread-target/aggregate-comment-thread-target.output.ts b/server/src/core/@generated/comment-thread-target/aggregate-comment-thread-target.output.ts similarity index 100% rename from server/src/api/@generated/comment-thread-target/aggregate-comment-thread-target.output.ts rename to server/src/core/@generated/comment-thread-target/aggregate-comment-thread-target.output.ts diff --git a/server/src/api/@generated/comment-thread-target/comment-thread-target-aggregate.args.ts b/server/src/core/@generated/comment-thread-target/comment-thread-target-aggregate.args.ts similarity index 100% rename from server/src/api/@generated/comment-thread-target/comment-thread-target-aggregate.args.ts rename to server/src/core/@generated/comment-thread-target/comment-thread-target-aggregate.args.ts diff --git a/server/src/api/@generated/comment-thread-target/comment-thread-target-count-aggregate.input.ts b/server/src/core/@generated/comment-thread-target/comment-thread-target-count-aggregate.input.ts similarity index 100% rename from server/src/api/@generated/comment-thread-target/comment-thread-target-count-aggregate.input.ts rename to server/src/core/@generated/comment-thread-target/comment-thread-target-count-aggregate.input.ts diff --git a/server/src/api/@generated/comment-thread-target/comment-thread-target-count-aggregate.output.ts b/server/src/core/@generated/comment-thread-target/comment-thread-target-count-aggregate.output.ts similarity index 100% rename from server/src/api/@generated/comment-thread-target/comment-thread-target-count-aggregate.output.ts rename to server/src/core/@generated/comment-thread-target/comment-thread-target-count-aggregate.output.ts diff --git a/server/src/api/@generated/comment-thread-target/comment-thread-target-count-order-by-aggregate.input.ts b/server/src/core/@generated/comment-thread-target/comment-thread-target-count-order-by-aggregate.input.ts similarity index 100% rename from server/src/api/@generated/comment-thread-target/comment-thread-target-count-order-by-aggregate.input.ts rename to server/src/core/@generated/comment-thread-target/comment-thread-target-count-order-by-aggregate.input.ts diff --git a/server/src/api/@generated/comment-thread-target/comment-thread-target-create-many-comment-thread-input-envelope.input.ts b/server/src/core/@generated/comment-thread-target/comment-thread-target-create-many-comment-thread-input-envelope.input.ts similarity index 100% rename from server/src/api/@generated/comment-thread-target/comment-thread-target-create-many-comment-thread-input-envelope.input.ts rename to server/src/core/@generated/comment-thread-target/comment-thread-target-create-many-comment-thread-input-envelope.input.ts diff --git a/server/src/api/@generated/comment-thread-target/comment-thread-target-create-many-comment-thread.input.ts b/server/src/core/@generated/comment-thread-target/comment-thread-target-create-many-comment-thread.input.ts similarity index 100% rename from server/src/api/@generated/comment-thread-target/comment-thread-target-create-many-comment-thread.input.ts rename to server/src/core/@generated/comment-thread-target/comment-thread-target-create-many-comment-thread.input.ts diff --git a/server/src/api/@generated/comment-thread-target/comment-thread-target-create-many.input.ts b/server/src/core/@generated/comment-thread-target/comment-thread-target-create-many.input.ts similarity index 100% rename from server/src/api/@generated/comment-thread-target/comment-thread-target-create-many.input.ts rename to server/src/core/@generated/comment-thread-target/comment-thread-target-create-many.input.ts diff --git a/server/src/api/@generated/comment-thread-target/comment-thread-target-create-nested-many-without-comment-thread.input.ts b/server/src/core/@generated/comment-thread-target/comment-thread-target-create-nested-many-without-comment-thread.input.ts similarity index 100% rename from server/src/api/@generated/comment-thread-target/comment-thread-target-create-nested-many-without-comment-thread.input.ts rename to server/src/core/@generated/comment-thread-target/comment-thread-target-create-nested-many-without-comment-thread.input.ts diff --git a/server/src/api/@generated/comment-thread-target/comment-thread-target-create-or-connect-without-comment-thread.input.ts b/server/src/core/@generated/comment-thread-target/comment-thread-target-create-or-connect-without-comment-thread.input.ts similarity index 100% rename from server/src/api/@generated/comment-thread-target/comment-thread-target-create-or-connect-without-comment-thread.input.ts rename to server/src/core/@generated/comment-thread-target/comment-thread-target-create-or-connect-without-comment-thread.input.ts diff --git a/server/src/api/@generated/comment-thread-target/comment-thread-target-create-without-comment-thread.input.ts b/server/src/core/@generated/comment-thread-target/comment-thread-target-create-without-comment-thread.input.ts similarity index 100% rename from server/src/api/@generated/comment-thread-target/comment-thread-target-create-without-comment-thread.input.ts rename to server/src/core/@generated/comment-thread-target/comment-thread-target-create-without-comment-thread.input.ts diff --git a/server/src/api/@generated/comment-thread-target/comment-thread-target-create.input.ts b/server/src/core/@generated/comment-thread-target/comment-thread-target-create.input.ts similarity index 100% rename from server/src/api/@generated/comment-thread-target/comment-thread-target-create.input.ts rename to server/src/core/@generated/comment-thread-target/comment-thread-target-create.input.ts diff --git a/server/src/api/@generated/comment-thread-target/comment-thread-target-group-by.args.ts b/server/src/core/@generated/comment-thread-target/comment-thread-target-group-by.args.ts similarity index 100% rename from server/src/api/@generated/comment-thread-target/comment-thread-target-group-by.args.ts rename to server/src/core/@generated/comment-thread-target/comment-thread-target-group-by.args.ts diff --git a/server/src/api/@generated/comment-thread-target/comment-thread-target-group-by.output.ts b/server/src/core/@generated/comment-thread-target/comment-thread-target-group-by.output.ts similarity index 100% rename from server/src/api/@generated/comment-thread-target/comment-thread-target-group-by.output.ts rename to server/src/core/@generated/comment-thread-target/comment-thread-target-group-by.output.ts diff --git a/server/src/api/@generated/comment-thread-target/comment-thread-target-list-relation-filter.input.ts b/server/src/core/@generated/comment-thread-target/comment-thread-target-list-relation-filter.input.ts similarity index 100% rename from server/src/api/@generated/comment-thread-target/comment-thread-target-list-relation-filter.input.ts rename to server/src/core/@generated/comment-thread-target/comment-thread-target-list-relation-filter.input.ts diff --git a/server/src/api/@generated/comment-thread-target/comment-thread-target-max-aggregate.input.ts b/server/src/core/@generated/comment-thread-target/comment-thread-target-max-aggregate.input.ts similarity index 100% rename from server/src/api/@generated/comment-thread-target/comment-thread-target-max-aggregate.input.ts rename to server/src/core/@generated/comment-thread-target/comment-thread-target-max-aggregate.input.ts diff --git a/server/src/api/@generated/comment-thread-target/comment-thread-target-max-aggregate.output.ts b/server/src/core/@generated/comment-thread-target/comment-thread-target-max-aggregate.output.ts similarity index 100% rename from server/src/api/@generated/comment-thread-target/comment-thread-target-max-aggregate.output.ts rename to server/src/core/@generated/comment-thread-target/comment-thread-target-max-aggregate.output.ts diff --git a/server/src/api/@generated/comment-thread-target/comment-thread-target-max-order-by-aggregate.input.ts b/server/src/core/@generated/comment-thread-target/comment-thread-target-max-order-by-aggregate.input.ts similarity index 100% rename from server/src/api/@generated/comment-thread-target/comment-thread-target-max-order-by-aggregate.input.ts rename to server/src/core/@generated/comment-thread-target/comment-thread-target-max-order-by-aggregate.input.ts diff --git a/server/src/api/@generated/comment-thread-target/comment-thread-target-min-aggregate.input.ts b/server/src/core/@generated/comment-thread-target/comment-thread-target-min-aggregate.input.ts similarity index 100% rename from server/src/api/@generated/comment-thread-target/comment-thread-target-min-aggregate.input.ts rename to server/src/core/@generated/comment-thread-target/comment-thread-target-min-aggregate.input.ts diff --git a/server/src/api/@generated/comment-thread-target/comment-thread-target-min-aggregate.output.ts b/server/src/core/@generated/comment-thread-target/comment-thread-target-min-aggregate.output.ts similarity index 100% rename from server/src/api/@generated/comment-thread-target/comment-thread-target-min-aggregate.output.ts rename to server/src/core/@generated/comment-thread-target/comment-thread-target-min-aggregate.output.ts diff --git a/server/src/api/@generated/comment-thread-target/comment-thread-target-min-order-by-aggregate.input.ts b/server/src/core/@generated/comment-thread-target/comment-thread-target-min-order-by-aggregate.input.ts similarity index 100% rename from server/src/api/@generated/comment-thread-target/comment-thread-target-min-order-by-aggregate.input.ts rename to server/src/core/@generated/comment-thread-target/comment-thread-target-min-order-by-aggregate.input.ts diff --git a/server/src/api/@generated/comment-thread-target/comment-thread-target-order-by-relation-aggregate.input.ts b/server/src/core/@generated/comment-thread-target/comment-thread-target-order-by-relation-aggregate.input.ts similarity index 100% rename from server/src/api/@generated/comment-thread-target/comment-thread-target-order-by-relation-aggregate.input.ts rename to server/src/core/@generated/comment-thread-target/comment-thread-target-order-by-relation-aggregate.input.ts diff --git a/server/src/api/@generated/comment-thread-target/comment-thread-target-order-by-with-aggregation.input.ts b/server/src/core/@generated/comment-thread-target/comment-thread-target-order-by-with-aggregation.input.ts similarity index 100% rename from server/src/api/@generated/comment-thread-target/comment-thread-target-order-by-with-aggregation.input.ts rename to server/src/core/@generated/comment-thread-target/comment-thread-target-order-by-with-aggregation.input.ts diff --git a/server/src/api/@generated/comment-thread-target/comment-thread-target-order-by-with-relation.input.ts b/server/src/core/@generated/comment-thread-target/comment-thread-target-order-by-with-relation.input.ts similarity index 100% rename from server/src/api/@generated/comment-thread-target/comment-thread-target-order-by-with-relation.input.ts rename to server/src/core/@generated/comment-thread-target/comment-thread-target-order-by-with-relation.input.ts diff --git a/server/src/api/@generated/comment-thread-target/comment-thread-target-scalar-field.enum.ts b/server/src/core/@generated/comment-thread-target/comment-thread-target-scalar-field.enum.ts similarity index 100% rename from server/src/api/@generated/comment-thread-target/comment-thread-target-scalar-field.enum.ts rename to server/src/core/@generated/comment-thread-target/comment-thread-target-scalar-field.enum.ts diff --git a/server/src/api/@generated/comment-thread-target/comment-thread-target-scalar-where-with-aggregates.input.ts b/server/src/core/@generated/comment-thread-target/comment-thread-target-scalar-where-with-aggregates.input.ts similarity index 100% rename from server/src/api/@generated/comment-thread-target/comment-thread-target-scalar-where-with-aggregates.input.ts rename to server/src/core/@generated/comment-thread-target/comment-thread-target-scalar-where-with-aggregates.input.ts diff --git a/server/src/api/@generated/comment-thread-target/comment-thread-target-scalar-where.input.ts b/server/src/core/@generated/comment-thread-target/comment-thread-target-scalar-where.input.ts similarity index 100% rename from server/src/api/@generated/comment-thread-target/comment-thread-target-scalar-where.input.ts rename to server/src/core/@generated/comment-thread-target/comment-thread-target-scalar-where.input.ts diff --git a/server/src/api/@generated/comment-thread-target/comment-thread-target-unchecked-create-nested-many-without-comment-thread.input.ts b/server/src/core/@generated/comment-thread-target/comment-thread-target-unchecked-create-nested-many-without-comment-thread.input.ts similarity index 100% rename from server/src/api/@generated/comment-thread-target/comment-thread-target-unchecked-create-nested-many-without-comment-thread.input.ts rename to server/src/core/@generated/comment-thread-target/comment-thread-target-unchecked-create-nested-many-without-comment-thread.input.ts diff --git a/server/src/api/@generated/comment-thread-target/comment-thread-target-unchecked-create-without-comment-thread.input.ts b/server/src/core/@generated/comment-thread-target/comment-thread-target-unchecked-create-without-comment-thread.input.ts similarity index 100% rename from server/src/api/@generated/comment-thread-target/comment-thread-target-unchecked-create-without-comment-thread.input.ts rename to server/src/core/@generated/comment-thread-target/comment-thread-target-unchecked-create-without-comment-thread.input.ts diff --git a/server/src/api/@generated/comment-thread-target/comment-thread-target-unchecked-create.input.ts b/server/src/core/@generated/comment-thread-target/comment-thread-target-unchecked-create.input.ts similarity index 100% rename from server/src/api/@generated/comment-thread-target/comment-thread-target-unchecked-create.input.ts rename to server/src/core/@generated/comment-thread-target/comment-thread-target-unchecked-create.input.ts diff --git a/server/src/api/@generated/comment-thread-target/comment-thread-target-unchecked-update-many-without-comment-thread-nested.input.ts b/server/src/core/@generated/comment-thread-target/comment-thread-target-unchecked-update-many-without-comment-thread-nested.input.ts similarity index 100% rename from server/src/api/@generated/comment-thread-target/comment-thread-target-unchecked-update-many-without-comment-thread-nested.input.ts rename to server/src/core/@generated/comment-thread-target/comment-thread-target-unchecked-update-many-without-comment-thread-nested.input.ts diff --git a/server/src/api/@generated/comment-thread-target/comment-thread-target-unchecked-update-many-without-comment-thread-targets.input.ts b/server/src/core/@generated/comment-thread-target/comment-thread-target-unchecked-update-many-without-comment-thread-targets.input.ts similarity index 100% rename from server/src/api/@generated/comment-thread-target/comment-thread-target-unchecked-update-many-without-comment-thread-targets.input.ts rename to server/src/core/@generated/comment-thread-target/comment-thread-target-unchecked-update-many-without-comment-thread-targets.input.ts diff --git a/server/src/api/@generated/comment-thread-target/comment-thread-target-unchecked-update-many.input.ts b/server/src/core/@generated/comment-thread-target/comment-thread-target-unchecked-update-many.input.ts similarity index 100% rename from server/src/api/@generated/comment-thread-target/comment-thread-target-unchecked-update-many.input.ts rename to server/src/core/@generated/comment-thread-target/comment-thread-target-unchecked-update-many.input.ts diff --git a/server/src/api/@generated/comment-thread-target/comment-thread-target-unchecked-update-without-comment-thread.input.ts b/server/src/core/@generated/comment-thread-target/comment-thread-target-unchecked-update-without-comment-thread.input.ts similarity index 100% rename from server/src/api/@generated/comment-thread-target/comment-thread-target-unchecked-update-without-comment-thread.input.ts rename to server/src/core/@generated/comment-thread-target/comment-thread-target-unchecked-update-without-comment-thread.input.ts diff --git a/server/src/api/@generated/comment-thread-target/comment-thread-target-unchecked-update.input.ts b/server/src/core/@generated/comment-thread-target/comment-thread-target-unchecked-update.input.ts similarity index 100% rename from server/src/api/@generated/comment-thread-target/comment-thread-target-unchecked-update.input.ts rename to server/src/core/@generated/comment-thread-target/comment-thread-target-unchecked-update.input.ts diff --git a/server/src/api/@generated/comment-thread-target/comment-thread-target-update-many-mutation.input.ts b/server/src/core/@generated/comment-thread-target/comment-thread-target-update-many-mutation.input.ts similarity index 100% rename from server/src/api/@generated/comment-thread-target/comment-thread-target-update-many-mutation.input.ts rename to server/src/core/@generated/comment-thread-target/comment-thread-target-update-many-mutation.input.ts diff --git a/server/src/api/@generated/comment-thread-target/comment-thread-target-update-many-with-where-without-comment-thread.input.ts b/server/src/core/@generated/comment-thread-target/comment-thread-target-update-many-with-where-without-comment-thread.input.ts similarity index 100% rename from server/src/api/@generated/comment-thread-target/comment-thread-target-update-many-with-where-without-comment-thread.input.ts rename to server/src/core/@generated/comment-thread-target/comment-thread-target-update-many-with-where-without-comment-thread.input.ts diff --git a/server/src/api/@generated/comment-thread-target/comment-thread-target-update-many-without-comment-thread-nested.input.ts b/server/src/core/@generated/comment-thread-target/comment-thread-target-update-many-without-comment-thread-nested.input.ts similarity index 100% rename from server/src/api/@generated/comment-thread-target/comment-thread-target-update-many-without-comment-thread-nested.input.ts rename to server/src/core/@generated/comment-thread-target/comment-thread-target-update-many-without-comment-thread-nested.input.ts diff --git a/server/src/api/@generated/comment-thread-target/comment-thread-target-update-with-where-unique-without-comment-thread.input.ts b/server/src/core/@generated/comment-thread-target/comment-thread-target-update-with-where-unique-without-comment-thread.input.ts similarity index 100% rename from server/src/api/@generated/comment-thread-target/comment-thread-target-update-with-where-unique-without-comment-thread.input.ts rename to server/src/core/@generated/comment-thread-target/comment-thread-target-update-with-where-unique-without-comment-thread.input.ts diff --git a/server/src/api/@generated/comment-thread-target/comment-thread-target-update-without-comment-thread.input.ts b/server/src/core/@generated/comment-thread-target/comment-thread-target-update-without-comment-thread.input.ts similarity index 100% rename from server/src/api/@generated/comment-thread-target/comment-thread-target-update-without-comment-thread.input.ts rename to server/src/core/@generated/comment-thread-target/comment-thread-target-update-without-comment-thread.input.ts diff --git a/server/src/api/@generated/comment-thread-target/comment-thread-target-update.input.ts b/server/src/core/@generated/comment-thread-target/comment-thread-target-update.input.ts similarity index 100% rename from server/src/api/@generated/comment-thread-target/comment-thread-target-update.input.ts rename to server/src/core/@generated/comment-thread-target/comment-thread-target-update.input.ts diff --git a/server/src/api/@generated/comment-thread-target/comment-thread-target-upsert-with-where-unique-without-comment-thread.input.ts b/server/src/core/@generated/comment-thread-target/comment-thread-target-upsert-with-where-unique-without-comment-thread.input.ts similarity index 100% rename from server/src/api/@generated/comment-thread-target/comment-thread-target-upsert-with-where-unique-without-comment-thread.input.ts rename to server/src/core/@generated/comment-thread-target/comment-thread-target-upsert-with-where-unique-without-comment-thread.input.ts diff --git a/server/src/api/@generated/comment-thread-target/comment-thread-target-where-unique.input.ts b/server/src/core/@generated/comment-thread-target/comment-thread-target-where-unique.input.ts similarity index 100% rename from server/src/api/@generated/comment-thread-target/comment-thread-target-where-unique.input.ts rename to server/src/core/@generated/comment-thread-target/comment-thread-target-where-unique.input.ts diff --git a/server/src/api/@generated/comment-thread-target/comment-thread-target-where.input.ts b/server/src/core/@generated/comment-thread-target/comment-thread-target-where.input.ts similarity index 100% rename from server/src/api/@generated/comment-thread-target/comment-thread-target-where.input.ts rename to server/src/core/@generated/comment-thread-target/comment-thread-target-where.input.ts diff --git a/server/src/api/@generated/comment-thread-target/comment-thread-target.model.ts b/server/src/core/@generated/comment-thread-target/comment-thread-target.model.ts similarity index 100% rename from server/src/api/@generated/comment-thread-target/comment-thread-target.model.ts rename to server/src/core/@generated/comment-thread-target/comment-thread-target.model.ts diff --git a/server/src/api/@generated/comment-thread-target/create-many-comment-thread-target.args.ts b/server/src/core/@generated/comment-thread-target/create-many-comment-thread-target.args.ts similarity index 100% rename from server/src/api/@generated/comment-thread-target/create-many-comment-thread-target.args.ts rename to server/src/core/@generated/comment-thread-target/create-many-comment-thread-target.args.ts diff --git a/server/src/api/@generated/comment-thread-target/create-one-comment-thread-target.args.ts b/server/src/core/@generated/comment-thread-target/create-one-comment-thread-target.args.ts similarity index 100% rename from server/src/api/@generated/comment-thread-target/create-one-comment-thread-target.args.ts rename to server/src/core/@generated/comment-thread-target/create-one-comment-thread-target.args.ts diff --git a/server/src/api/@generated/comment-thread-target/delete-many-comment-thread-target.args.ts b/server/src/core/@generated/comment-thread-target/delete-many-comment-thread-target.args.ts similarity index 100% rename from server/src/api/@generated/comment-thread-target/delete-many-comment-thread-target.args.ts rename to server/src/core/@generated/comment-thread-target/delete-many-comment-thread-target.args.ts diff --git a/server/src/api/@generated/comment-thread-target/delete-one-comment-thread-target.args.ts b/server/src/core/@generated/comment-thread-target/delete-one-comment-thread-target.args.ts similarity index 100% rename from server/src/api/@generated/comment-thread-target/delete-one-comment-thread-target.args.ts rename to server/src/core/@generated/comment-thread-target/delete-one-comment-thread-target.args.ts diff --git a/server/src/api/@generated/comment-thread-target/find-first-comment-thread-target-or-throw.args.ts b/server/src/core/@generated/comment-thread-target/find-first-comment-thread-target-or-throw.args.ts similarity index 100% rename from server/src/api/@generated/comment-thread-target/find-first-comment-thread-target-or-throw.args.ts rename to server/src/core/@generated/comment-thread-target/find-first-comment-thread-target-or-throw.args.ts diff --git a/server/src/api/@generated/comment-thread-target/find-first-comment-thread-target.args.ts b/server/src/core/@generated/comment-thread-target/find-first-comment-thread-target.args.ts similarity index 100% rename from server/src/api/@generated/comment-thread-target/find-first-comment-thread-target.args.ts rename to server/src/core/@generated/comment-thread-target/find-first-comment-thread-target.args.ts diff --git a/server/src/api/@generated/comment-thread-target/find-many-comment-thread-target.args.ts b/server/src/core/@generated/comment-thread-target/find-many-comment-thread-target.args.ts similarity index 100% rename from server/src/api/@generated/comment-thread-target/find-many-comment-thread-target.args.ts rename to server/src/core/@generated/comment-thread-target/find-many-comment-thread-target.args.ts diff --git a/server/src/api/@generated/comment-thread-target/find-unique-comment-thread-target-or-throw.args.ts b/server/src/core/@generated/comment-thread-target/find-unique-comment-thread-target-or-throw.args.ts similarity index 100% rename from server/src/api/@generated/comment-thread-target/find-unique-comment-thread-target-or-throw.args.ts rename to server/src/core/@generated/comment-thread-target/find-unique-comment-thread-target-or-throw.args.ts diff --git a/server/src/api/@generated/comment-thread-target/find-unique-comment-thread-target.args.ts b/server/src/core/@generated/comment-thread-target/find-unique-comment-thread-target.args.ts similarity index 100% rename from server/src/api/@generated/comment-thread-target/find-unique-comment-thread-target.args.ts rename to server/src/core/@generated/comment-thread-target/find-unique-comment-thread-target.args.ts diff --git a/server/src/api/@generated/comment-thread-target/update-many-comment-thread-target.args.ts b/server/src/core/@generated/comment-thread-target/update-many-comment-thread-target.args.ts similarity index 100% rename from server/src/api/@generated/comment-thread-target/update-many-comment-thread-target.args.ts rename to server/src/core/@generated/comment-thread-target/update-many-comment-thread-target.args.ts diff --git a/server/src/api/@generated/comment-thread-target/update-one-comment-thread-target.args.ts b/server/src/core/@generated/comment-thread-target/update-one-comment-thread-target.args.ts similarity index 100% rename from server/src/api/@generated/comment-thread-target/update-one-comment-thread-target.args.ts rename to server/src/core/@generated/comment-thread-target/update-one-comment-thread-target.args.ts diff --git a/server/src/api/@generated/comment-thread-target/upsert-one-comment-thread-target.args.ts b/server/src/core/@generated/comment-thread-target/upsert-one-comment-thread-target.args.ts similarity index 100% rename from server/src/api/@generated/comment-thread-target/upsert-one-comment-thread-target.args.ts rename to server/src/core/@generated/comment-thread-target/upsert-one-comment-thread-target.args.ts diff --git a/server/src/api/@generated/comment-thread/aggregate-comment-thread.output.ts b/server/src/core/@generated/comment-thread/aggregate-comment-thread.output.ts similarity index 100% rename from server/src/api/@generated/comment-thread/aggregate-comment-thread.output.ts rename to server/src/core/@generated/comment-thread/aggregate-comment-thread.output.ts diff --git a/server/src/api/@generated/comment-thread/comment-thread-aggregate.args.ts b/server/src/core/@generated/comment-thread/comment-thread-aggregate.args.ts similarity index 100% rename from server/src/api/@generated/comment-thread/comment-thread-aggregate.args.ts rename to server/src/core/@generated/comment-thread/comment-thread-aggregate.args.ts diff --git a/server/src/api/@generated/comment-thread/comment-thread-count-aggregate.input.ts b/server/src/core/@generated/comment-thread/comment-thread-count-aggregate.input.ts similarity index 100% rename from server/src/api/@generated/comment-thread/comment-thread-count-aggregate.input.ts rename to server/src/core/@generated/comment-thread/comment-thread-count-aggregate.input.ts diff --git a/server/src/api/@generated/comment-thread/comment-thread-count-aggregate.output.ts b/server/src/core/@generated/comment-thread/comment-thread-count-aggregate.output.ts similarity index 100% rename from server/src/api/@generated/comment-thread/comment-thread-count-aggregate.output.ts rename to server/src/core/@generated/comment-thread/comment-thread-count-aggregate.output.ts diff --git a/server/src/api/@generated/comment-thread/comment-thread-count-order-by-aggregate.input.ts b/server/src/core/@generated/comment-thread/comment-thread-count-order-by-aggregate.input.ts similarity index 100% rename from server/src/api/@generated/comment-thread/comment-thread-count-order-by-aggregate.input.ts rename to server/src/core/@generated/comment-thread/comment-thread-count-order-by-aggregate.input.ts diff --git a/server/src/api/@generated/comment-thread/comment-thread-create-many-workspace-input-envelope.input.ts b/server/src/core/@generated/comment-thread/comment-thread-create-many-workspace-input-envelope.input.ts similarity index 100% rename from server/src/api/@generated/comment-thread/comment-thread-create-many-workspace-input-envelope.input.ts rename to server/src/core/@generated/comment-thread/comment-thread-create-many-workspace-input-envelope.input.ts diff --git a/server/src/api/@generated/comment-thread/comment-thread-create-many-workspace.input.ts b/server/src/core/@generated/comment-thread/comment-thread-create-many-workspace.input.ts similarity index 100% rename from server/src/api/@generated/comment-thread/comment-thread-create-many-workspace.input.ts rename to server/src/core/@generated/comment-thread/comment-thread-create-many-workspace.input.ts diff --git a/server/src/api/@generated/comment-thread/comment-thread-create-many.input.ts b/server/src/core/@generated/comment-thread/comment-thread-create-many.input.ts similarity index 100% rename from server/src/api/@generated/comment-thread/comment-thread-create-many.input.ts rename to server/src/core/@generated/comment-thread/comment-thread-create-many.input.ts diff --git a/server/src/api/@generated/comment-thread/comment-thread-create-nested-many-without-workspace.input.ts b/server/src/core/@generated/comment-thread/comment-thread-create-nested-many-without-workspace.input.ts similarity index 100% rename from server/src/api/@generated/comment-thread/comment-thread-create-nested-many-without-workspace.input.ts rename to server/src/core/@generated/comment-thread/comment-thread-create-nested-many-without-workspace.input.ts diff --git a/server/src/api/@generated/comment-thread/comment-thread-create-nested-one-without-comment-thread-targets.input.ts b/server/src/core/@generated/comment-thread/comment-thread-create-nested-one-without-comment-thread-targets.input.ts similarity index 100% rename from server/src/api/@generated/comment-thread/comment-thread-create-nested-one-without-comment-thread-targets.input.ts rename to server/src/core/@generated/comment-thread/comment-thread-create-nested-one-without-comment-thread-targets.input.ts diff --git a/server/src/api/@generated/comment-thread/comment-thread-create-nested-one-without-comments.input.ts b/server/src/core/@generated/comment-thread/comment-thread-create-nested-one-without-comments.input.ts similarity index 100% rename from server/src/api/@generated/comment-thread/comment-thread-create-nested-one-without-comments.input.ts rename to server/src/core/@generated/comment-thread/comment-thread-create-nested-one-without-comments.input.ts diff --git a/server/src/api/@generated/comment-thread/comment-thread-create-or-connect-without-comment-thread-targets.input.ts b/server/src/core/@generated/comment-thread/comment-thread-create-or-connect-without-comment-thread-targets.input.ts similarity index 100% rename from server/src/api/@generated/comment-thread/comment-thread-create-or-connect-without-comment-thread-targets.input.ts rename to server/src/core/@generated/comment-thread/comment-thread-create-or-connect-without-comment-thread-targets.input.ts diff --git a/server/src/api/@generated/comment-thread/comment-thread-create-or-connect-without-comments.input.ts b/server/src/core/@generated/comment-thread/comment-thread-create-or-connect-without-comments.input.ts similarity index 100% rename from server/src/api/@generated/comment-thread/comment-thread-create-or-connect-without-comments.input.ts rename to server/src/core/@generated/comment-thread/comment-thread-create-or-connect-without-comments.input.ts diff --git a/server/src/api/@generated/comment-thread/comment-thread-create-or-connect-without-workspace.input.ts b/server/src/core/@generated/comment-thread/comment-thread-create-or-connect-without-workspace.input.ts similarity index 100% rename from server/src/api/@generated/comment-thread/comment-thread-create-or-connect-without-workspace.input.ts rename to server/src/core/@generated/comment-thread/comment-thread-create-or-connect-without-workspace.input.ts diff --git a/server/src/api/@generated/comment-thread/comment-thread-create-without-comment-thread-targets.input.ts b/server/src/core/@generated/comment-thread/comment-thread-create-without-comment-thread-targets.input.ts similarity index 100% rename from server/src/api/@generated/comment-thread/comment-thread-create-without-comment-thread-targets.input.ts rename to server/src/core/@generated/comment-thread/comment-thread-create-without-comment-thread-targets.input.ts diff --git a/server/src/api/@generated/comment-thread/comment-thread-create-without-comments.input.ts b/server/src/core/@generated/comment-thread/comment-thread-create-without-comments.input.ts similarity index 100% rename from server/src/api/@generated/comment-thread/comment-thread-create-without-comments.input.ts rename to server/src/core/@generated/comment-thread/comment-thread-create-without-comments.input.ts diff --git a/server/src/api/@generated/comment-thread/comment-thread-create-without-workspace.input.ts b/server/src/core/@generated/comment-thread/comment-thread-create-without-workspace.input.ts similarity index 100% rename from server/src/api/@generated/comment-thread/comment-thread-create-without-workspace.input.ts rename to server/src/core/@generated/comment-thread/comment-thread-create-without-workspace.input.ts diff --git a/server/src/api/@generated/comment-thread/comment-thread-create.input.ts b/server/src/core/@generated/comment-thread/comment-thread-create.input.ts similarity index 100% rename from server/src/api/@generated/comment-thread/comment-thread-create.input.ts rename to server/src/core/@generated/comment-thread/comment-thread-create.input.ts diff --git a/server/src/api/@generated/comment-thread/comment-thread-group-by.args.ts b/server/src/core/@generated/comment-thread/comment-thread-group-by.args.ts similarity index 100% rename from server/src/api/@generated/comment-thread/comment-thread-group-by.args.ts rename to server/src/core/@generated/comment-thread/comment-thread-group-by.args.ts diff --git a/server/src/api/@generated/comment-thread/comment-thread-group-by.output.ts b/server/src/core/@generated/comment-thread/comment-thread-group-by.output.ts similarity index 100% rename from server/src/api/@generated/comment-thread/comment-thread-group-by.output.ts rename to server/src/core/@generated/comment-thread/comment-thread-group-by.output.ts diff --git a/server/src/api/@generated/comment-thread/comment-thread-list-relation-filter.input.ts b/server/src/core/@generated/comment-thread/comment-thread-list-relation-filter.input.ts similarity index 100% rename from server/src/api/@generated/comment-thread/comment-thread-list-relation-filter.input.ts rename to server/src/core/@generated/comment-thread/comment-thread-list-relation-filter.input.ts diff --git a/server/src/api/@generated/comment-thread/comment-thread-max-aggregate.input.ts b/server/src/core/@generated/comment-thread/comment-thread-max-aggregate.input.ts similarity index 100% rename from server/src/api/@generated/comment-thread/comment-thread-max-aggregate.input.ts rename to server/src/core/@generated/comment-thread/comment-thread-max-aggregate.input.ts diff --git a/server/src/api/@generated/comment-thread/comment-thread-max-aggregate.output.ts b/server/src/core/@generated/comment-thread/comment-thread-max-aggregate.output.ts similarity index 100% rename from server/src/api/@generated/comment-thread/comment-thread-max-aggregate.output.ts rename to server/src/core/@generated/comment-thread/comment-thread-max-aggregate.output.ts diff --git a/server/src/api/@generated/comment-thread/comment-thread-max-order-by-aggregate.input.ts b/server/src/core/@generated/comment-thread/comment-thread-max-order-by-aggregate.input.ts similarity index 100% rename from server/src/api/@generated/comment-thread/comment-thread-max-order-by-aggregate.input.ts rename to server/src/core/@generated/comment-thread/comment-thread-max-order-by-aggregate.input.ts diff --git a/server/src/api/@generated/comment-thread/comment-thread-min-aggregate.input.ts b/server/src/core/@generated/comment-thread/comment-thread-min-aggregate.input.ts similarity index 100% rename from server/src/api/@generated/comment-thread/comment-thread-min-aggregate.input.ts rename to server/src/core/@generated/comment-thread/comment-thread-min-aggregate.input.ts diff --git a/server/src/api/@generated/comment-thread/comment-thread-min-aggregate.output.ts b/server/src/core/@generated/comment-thread/comment-thread-min-aggregate.output.ts similarity index 100% rename from server/src/api/@generated/comment-thread/comment-thread-min-aggregate.output.ts rename to server/src/core/@generated/comment-thread/comment-thread-min-aggregate.output.ts diff --git a/server/src/api/@generated/comment-thread/comment-thread-min-order-by-aggregate.input.ts b/server/src/core/@generated/comment-thread/comment-thread-min-order-by-aggregate.input.ts similarity index 100% rename from server/src/api/@generated/comment-thread/comment-thread-min-order-by-aggregate.input.ts rename to server/src/core/@generated/comment-thread/comment-thread-min-order-by-aggregate.input.ts diff --git a/server/src/api/@generated/comment-thread/comment-thread-order-by-relation-aggregate.input.ts b/server/src/core/@generated/comment-thread/comment-thread-order-by-relation-aggregate.input.ts similarity index 100% rename from server/src/api/@generated/comment-thread/comment-thread-order-by-relation-aggregate.input.ts rename to server/src/core/@generated/comment-thread/comment-thread-order-by-relation-aggregate.input.ts diff --git a/server/src/api/@generated/comment-thread/comment-thread-order-by-with-aggregation.input.ts b/server/src/core/@generated/comment-thread/comment-thread-order-by-with-aggregation.input.ts similarity index 100% rename from server/src/api/@generated/comment-thread/comment-thread-order-by-with-aggregation.input.ts rename to server/src/core/@generated/comment-thread/comment-thread-order-by-with-aggregation.input.ts diff --git a/server/src/api/@generated/comment-thread/comment-thread-order-by-with-relation.input.ts b/server/src/core/@generated/comment-thread/comment-thread-order-by-with-relation.input.ts similarity index 100% rename from server/src/api/@generated/comment-thread/comment-thread-order-by-with-relation.input.ts rename to server/src/core/@generated/comment-thread/comment-thread-order-by-with-relation.input.ts diff --git a/server/src/api/@generated/comment-thread/comment-thread-relation-filter.input.ts b/server/src/core/@generated/comment-thread/comment-thread-relation-filter.input.ts similarity index 100% rename from server/src/api/@generated/comment-thread/comment-thread-relation-filter.input.ts rename to server/src/core/@generated/comment-thread/comment-thread-relation-filter.input.ts diff --git a/server/src/api/@generated/comment-thread/comment-thread-scalar-field.enum.ts b/server/src/core/@generated/comment-thread/comment-thread-scalar-field.enum.ts similarity index 100% rename from server/src/api/@generated/comment-thread/comment-thread-scalar-field.enum.ts rename to server/src/core/@generated/comment-thread/comment-thread-scalar-field.enum.ts diff --git a/server/src/api/@generated/comment-thread/comment-thread-scalar-where-with-aggregates.input.ts b/server/src/core/@generated/comment-thread/comment-thread-scalar-where-with-aggregates.input.ts similarity index 100% rename from server/src/api/@generated/comment-thread/comment-thread-scalar-where-with-aggregates.input.ts rename to server/src/core/@generated/comment-thread/comment-thread-scalar-where-with-aggregates.input.ts diff --git a/server/src/api/@generated/comment-thread/comment-thread-scalar-where.input.ts b/server/src/core/@generated/comment-thread/comment-thread-scalar-where.input.ts similarity index 100% rename from server/src/api/@generated/comment-thread/comment-thread-scalar-where.input.ts rename to server/src/core/@generated/comment-thread/comment-thread-scalar-where.input.ts diff --git a/server/src/api/@generated/comment-thread/comment-thread-unchecked-create-nested-many-without-workspace.input.ts b/server/src/core/@generated/comment-thread/comment-thread-unchecked-create-nested-many-without-workspace.input.ts similarity index 100% rename from server/src/api/@generated/comment-thread/comment-thread-unchecked-create-nested-many-without-workspace.input.ts rename to server/src/core/@generated/comment-thread/comment-thread-unchecked-create-nested-many-without-workspace.input.ts diff --git a/server/src/api/@generated/comment-thread/comment-thread-unchecked-create-without-comment-thread-targets.input.ts b/server/src/core/@generated/comment-thread/comment-thread-unchecked-create-without-comment-thread-targets.input.ts similarity index 100% rename from server/src/api/@generated/comment-thread/comment-thread-unchecked-create-without-comment-thread-targets.input.ts rename to server/src/core/@generated/comment-thread/comment-thread-unchecked-create-without-comment-thread-targets.input.ts diff --git a/server/src/api/@generated/comment-thread/comment-thread-unchecked-create-without-comments.input.ts b/server/src/core/@generated/comment-thread/comment-thread-unchecked-create-without-comments.input.ts similarity index 100% rename from server/src/api/@generated/comment-thread/comment-thread-unchecked-create-without-comments.input.ts rename to server/src/core/@generated/comment-thread/comment-thread-unchecked-create-without-comments.input.ts diff --git a/server/src/api/@generated/comment-thread/comment-thread-unchecked-create-without-workspace.input.ts b/server/src/core/@generated/comment-thread/comment-thread-unchecked-create-without-workspace.input.ts similarity index 100% rename from server/src/api/@generated/comment-thread/comment-thread-unchecked-create-without-workspace.input.ts rename to server/src/core/@generated/comment-thread/comment-thread-unchecked-create-without-workspace.input.ts diff --git a/server/src/api/@generated/comment-thread/comment-thread-unchecked-create.input.ts b/server/src/core/@generated/comment-thread/comment-thread-unchecked-create.input.ts similarity index 100% rename from server/src/api/@generated/comment-thread/comment-thread-unchecked-create.input.ts rename to server/src/core/@generated/comment-thread/comment-thread-unchecked-create.input.ts diff --git a/server/src/api/@generated/comment-thread/comment-thread-unchecked-update-many-without-comment-threads.input.ts b/server/src/core/@generated/comment-thread/comment-thread-unchecked-update-many-without-comment-threads.input.ts similarity index 100% rename from server/src/api/@generated/comment-thread/comment-thread-unchecked-update-many-without-comment-threads.input.ts rename to server/src/core/@generated/comment-thread/comment-thread-unchecked-update-many-without-comment-threads.input.ts diff --git a/server/src/api/@generated/comment-thread/comment-thread-unchecked-update-many-without-workspace-nested.input.ts b/server/src/core/@generated/comment-thread/comment-thread-unchecked-update-many-without-workspace-nested.input.ts similarity index 100% rename from server/src/api/@generated/comment-thread/comment-thread-unchecked-update-many-without-workspace-nested.input.ts rename to server/src/core/@generated/comment-thread/comment-thread-unchecked-update-many-without-workspace-nested.input.ts diff --git a/server/src/api/@generated/comment-thread/comment-thread-unchecked-update-many.input.ts b/server/src/core/@generated/comment-thread/comment-thread-unchecked-update-many.input.ts similarity index 100% rename from server/src/api/@generated/comment-thread/comment-thread-unchecked-update-many.input.ts rename to server/src/core/@generated/comment-thread/comment-thread-unchecked-update-many.input.ts diff --git a/server/src/api/@generated/comment-thread/comment-thread-unchecked-update-without-comment-thread-targets.input.ts b/server/src/core/@generated/comment-thread/comment-thread-unchecked-update-without-comment-thread-targets.input.ts similarity index 100% rename from server/src/api/@generated/comment-thread/comment-thread-unchecked-update-without-comment-thread-targets.input.ts rename to server/src/core/@generated/comment-thread/comment-thread-unchecked-update-without-comment-thread-targets.input.ts diff --git a/server/src/api/@generated/comment-thread/comment-thread-unchecked-update-without-comments.input.ts b/server/src/core/@generated/comment-thread/comment-thread-unchecked-update-without-comments.input.ts similarity index 100% rename from server/src/api/@generated/comment-thread/comment-thread-unchecked-update-without-comments.input.ts rename to server/src/core/@generated/comment-thread/comment-thread-unchecked-update-without-comments.input.ts diff --git a/server/src/api/@generated/comment-thread/comment-thread-unchecked-update-without-workspace.input.ts b/server/src/core/@generated/comment-thread/comment-thread-unchecked-update-without-workspace.input.ts similarity index 100% rename from server/src/api/@generated/comment-thread/comment-thread-unchecked-update-without-workspace.input.ts rename to server/src/core/@generated/comment-thread/comment-thread-unchecked-update-without-workspace.input.ts diff --git a/server/src/api/@generated/comment-thread/comment-thread-unchecked-update.input.ts b/server/src/core/@generated/comment-thread/comment-thread-unchecked-update.input.ts similarity index 100% rename from server/src/api/@generated/comment-thread/comment-thread-unchecked-update.input.ts rename to server/src/core/@generated/comment-thread/comment-thread-unchecked-update.input.ts diff --git a/server/src/api/@generated/comment-thread/comment-thread-update-many-mutation.input.ts b/server/src/core/@generated/comment-thread/comment-thread-update-many-mutation.input.ts similarity index 100% rename from server/src/api/@generated/comment-thread/comment-thread-update-many-mutation.input.ts rename to server/src/core/@generated/comment-thread/comment-thread-update-many-mutation.input.ts diff --git a/server/src/api/@generated/comment-thread/comment-thread-update-many-with-where-without-workspace.input.ts b/server/src/core/@generated/comment-thread/comment-thread-update-many-with-where-without-workspace.input.ts similarity index 100% rename from server/src/api/@generated/comment-thread/comment-thread-update-many-with-where-without-workspace.input.ts rename to server/src/core/@generated/comment-thread/comment-thread-update-many-with-where-without-workspace.input.ts diff --git a/server/src/api/@generated/comment-thread/comment-thread-update-many-without-workspace-nested.input.ts b/server/src/core/@generated/comment-thread/comment-thread-update-many-without-workspace-nested.input.ts similarity index 100% rename from server/src/api/@generated/comment-thread/comment-thread-update-many-without-workspace-nested.input.ts rename to server/src/core/@generated/comment-thread/comment-thread-update-many-without-workspace-nested.input.ts diff --git a/server/src/api/@generated/comment-thread/comment-thread-update-one-required-without-comment-thread-targets-nested.input.ts b/server/src/core/@generated/comment-thread/comment-thread-update-one-required-without-comment-thread-targets-nested.input.ts similarity index 100% rename from server/src/api/@generated/comment-thread/comment-thread-update-one-required-without-comment-thread-targets-nested.input.ts rename to server/src/core/@generated/comment-thread/comment-thread-update-one-required-without-comment-thread-targets-nested.input.ts diff --git a/server/src/api/@generated/comment-thread/comment-thread-update-one-required-without-comments-nested.input.ts b/server/src/core/@generated/comment-thread/comment-thread-update-one-required-without-comments-nested.input.ts similarity index 100% rename from server/src/api/@generated/comment-thread/comment-thread-update-one-required-without-comments-nested.input.ts rename to server/src/core/@generated/comment-thread/comment-thread-update-one-required-without-comments-nested.input.ts diff --git a/server/src/api/@generated/comment-thread/comment-thread-update-with-where-unique-without-workspace.input.ts b/server/src/core/@generated/comment-thread/comment-thread-update-with-where-unique-without-workspace.input.ts similarity index 100% rename from server/src/api/@generated/comment-thread/comment-thread-update-with-where-unique-without-workspace.input.ts rename to server/src/core/@generated/comment-thread/comment-thread-update-with-where-unique-without-workspace.input.ts diff --git a/server/src/api/@generated/comment-thread/comment-thread-update-without-comment-thread-targets.input.ts b/server/src/core/@generated/comment-thread/comment-thread-update-without-comment-thread-targets.input.ts similarity index 100% rename from server/src/api/@generated/comment-thread/comment-thread-update-without-comment-thread-targets.input.ts rename to server/src/core/@generated/comment-thread/comment-thread-update-without-comment-thread-targets.input.ts diff --git a/server/src/api/@generated/comment-thread/comment-thread-update-without-comments.input.ts b/server/src/core/@generated/comment-thread/comment-thread-update-without-comments.input.ts similarity index 100% rename from server/src/api/@generated/comment-thread/comment-thread-update-without-comments.input.ts rename to server/src/core/@generated/comment-thread/comment-thread-update-without-comments.input.ts diff --git a/server/src/api/@generated/comment-thread/comment-thread-update-without-workspace.input.ts b/server/src/core/@generated/comment-thread/comment-thread-update-without-workspace.input.ts similarity index 100% rename from server/src/api/@generated/comment-thread/comment-thread-update-without-workspace.input.ts rename to server/src/core/@generated/comment-thread/comment-thread-update-without-workspace.input.ts diff --git a/server/src/api/@generated/comment-thread/comment-thread-update.input.ts b/server/src/core/@generated/comment-thread/comment-thread-update.input.ts similarity index 100% rename from server/src/api/@generated/comment-thread/comment-thread-update.input.ts rename to server/src/core/@generated/comment-thread/comment-thread-update.input.ts diff --git a/server/src/api/@generated/comment-thread/comment-thread-upsert-with-where-unique-without-workspace.input.ts b/server/src/core/@generated/comment-thread/comment-thread-upsert-with-where-unique-without-workspace.input.ts similarity index 100% rename from server/src/api/@generated/comment-thread/comment-thread-upsert-with-where-unique-without-workspace.input.ts rename to server/src/core/@generated/comment-thread/comment-thread-upsert-with-where-unique-without-workspace.input.ts diff --git a/server/src/api/@generated/comment-thread/comment-thread-upsert-without-comment-thread-targets.input.ts b/server/src/core/@generated/comment-thread/comment-thread-upsert-without-comment-thread-targets.input.ts similarity index 100% rename from server/src/api/@generated/comment-thread/comment-thread-upsert-without-comment-thread-targets.input.ts rename to server/src/core/@generated/comment-thread/comment-thread-upsert-without-comment-thread-targets.input.ts diff --git a/server/src/api/@generated/comment-thread/comment-thread-upsert-without-comments.input.ts b/server/src/core/@generated/comment-thread/comment-thread-upsert-without-comments.input.ts similarity index 100% rename from server/src/api/@generated/comment-thread/comment-thread-upsert-without-comments.input.ts rename to server/src/core/@generated/comment-thread/comment-thread-upsert-without-comments.input.ts diff --git a/server/src/api/@generated/comment-thread/comment-thread-where-unique.input.ts b/server/src/core/@generated/comment-thread/comment-thread-where-unique.input.ts similarity index 100% rename from server/src/api/@generated/comment-thread/comment-thread-where-unique.input.ts rename to server/src/core/@generated/comment-thread/comment-thread-where-unique.input.ts diff --git a/server/src/api/@generated/comment-thread/comment-thread-where.input.ts b/server/src/core/@generated/comment-thread/comment-thread-where.input.ts similarity index 100% rename from server/src/api/@generated/comment-thread/comment-thread-where.input.ts rename to server/src/core/@generated/comment-thread/comment-thread-where.input.ts diff --git a/server/src/api/@generated/comment-thread/comment-thread.model.ts b/server/src/core/@generated/comment-thread/comment-thread.model.ts similarity index 100% rename from server/src/api/@generated/comment-thread/comment-thread.model.ts rename to server/src/core/@generated/comment-thread/comment-thread.model.ts diff --git a/server/src/api/@generated/comment-thread/create-many-comment-thread.args.ts b/server/src/core/@generated/comment-thread/create-many-comment-thread.args.ts similarity index 100% rename from server/src/api/@generated/comment-thread/create-many-comment-thread.args.ts rename to server/src/core/@generated/comment-thread/create-many-comment-thread.args.ts diff --git a/server/src/api/@generated/comment-thread/create-one-comment-thread.args.ts b/server/src/core/@generated/comment-thread/create-one-comment-thread.args.ts similarity index 100% rename from server/src/api/@generated/comment-thread/create-one-comment-thread.args.ts rename to server/src/core/@generated/comment-thread/create-one-comment-thread.args.ts diff --git a/server/src/api/@generated/comment-thread/delete-many-comment-thread.args.ts b/server/src/core/@generated/comment-thread/delete-many-comment-thread.args.ts similarity index 100% rename from server/src/api/@generated/comment-thread/delete-many-comment-thread.args.ts rename to server/src/core/@generated/comment-thread/delete-many-comment-thread.args.ts diff --git a/server/src/api/@generated/comment-thread/delete-one-comment-thread.args.ts b/server/src/core/@generated/comment-thread/delete-one-comment-thread.args.ts similarity index 100% rename from server/src/api/@generated/comment-thread/delete-one-comment-thread.args.ts rename to server/src/core/@generated/comment-thread/delete-one-comment-thread.args.ts diff --git a/server/src/api/@generated/comment-thread/find-first-comment-thread-or-throw.args.ts b/server/src/core/@generated/comment-thread/find-first-comment-thread-or-throw.args.ts similarity index 100% rename from server/src/api/@generated/comment-thread/find-first-comment-thread-or-throw.args.ts rename to server/src/core/@generated/comment-thread/find-first-comment-thread-or-throw.args.ts diff --git a/server/src/api/@generated/comment-thread/find-first-comment-thread.args.ts b/server/src/core/@generated/comment-thread/find-first-comment-thread.args.ts similarity index 100% rename from server/src/api/@generated/comment-thread/find-first-comment-thread.args.ts rename to server/src/core/@generated/comment-thread/find-first-comment-thread.args.ts diff --git a/server/src/api/@generated/comment-thread/find-many-comment-thread.args.ts b/server/src/core/@generated/comment-thread/find-many-comment-thread.args.ts similarity index 100% rename from server/src/api/@generated/comment-thread/find-many-comment-thread.args.ts rename to server/src/core/@generated/comment-thread/find-many-comment-thread.args.ts diff --git a/server/src/api/@generated/comment-thread/find-unique-comment-thread-or-throw.args.ts b/server/src/core/@generated/comment-thread/find-unique-comment-thread-or-throw.args.ts similarity index 100% rename from server/src/api/@generated/comment-thread/find-unique-comment-thread-or-throw.args.ts rename to server/src/core/@generated/comment-thread/find-unique-comment-thread-or-throw.args.ts diff --git a/server/src/api/@generated/comment-thread/find-unique-comment-thread.args.ts b/server/src/core/@generated/comment-thread/find-unique-comment-thread.args.ts similarity index 100% rename from server/src/api/@generated/comment-thread/find-unique-comment-thread.args.ts rename to server/src/core/@generated/comment-thread/find-unique-comment-thread.args.ts diff --git a/server/src/api/@generated/comment-thread/update-many-comment-thread.args.ts b/server/src/core/@generated/comment-thread/update-many-comment-thread.args.ts similarity index 100% rename from server/src/api/@generated/comment-thread/update-many-comment-thread.args.ts rename to server/src/core/@generated/comment-thread/update-many-comment-thread.args.ts diff --git a/server/src/api/@generated/comment-thread/update-one-comment-thread.args.ts b/server/src/core/@generated/comment-thread/update-one-comment-thread.args.ts similarity index 100% rename from server/src/api/@generated/comment-thread/update-one-comment-thread.args.ts rename to server/src/core/@generated/comment-thread/update-one-comment-thread.args.ts diff --git a/server/src/api/@generated/comment-thread/upsert-one-comment-thread.args.ts b/server/src/core/@generated/comment-thread/upsert-one-comment-thread.args.ts similarity index 100% rename from server/src/api/@generated/comment-thread/upsert-one-comment-thread.args.ts rename to server/src/core/@generated/comment-thread/upsert-one-comment-thread.args.ts diff --git a/server/src/api/@generated/comment/aggregate-comment.output.ts b/server/src/core/@generated/comment/aggregate-comment.output.ts similarity index 100% rename from server/src/api/@generated/comment/aggregate-comment.output.ts rename to server/src/core/@generated/comment/aggregate-comment.output.ts diff --git a/server/src/api/@generated/comment/comment-aggregate.args.ts b/server/src/core/@generated/comment/comment-aggregate.args.ts similarity index 100% rename from server/src/api/@generated/comment/comment-aggregate.args.ts rename to server/src/core/@generated/comment/comment-aggregate.args.ts diff --git a/server/src/api/@generated/comment/comment-count-aggregate.input.ts b/server/src/core/@generated/comment/comment-count-aggregate.input.ts similarity index 100% rename from server/src/api/@generated/comment/comment-count-aggregate.input.ts rename to server/src/core/@generated/comment/comment-count-aggregate.input.ts diff --git a/server/src/api/@generated/comment/comment-count-aggregate.output.ts b/server/src/core/@generated/comment/comment-count-aggregate.output.ts similarity index 100% rename from server/src/api/@generated/comment/comment-count-aggregate.output.ts rename to server/src/core/@generated/comment/comment-count-aggregate.output.ts diff --git a/server/src/api/@generated/comment/comment-count-order-by-aggregate.input.ts b/server/src/core/@generated/comment/comment-count-order-by-aggregate.input.ts similarity index 100% rename from server/src/api/@generated/comment/comment-count-order-by-aggregate.input.ts rename to server/src/core/@generated/comment/comment-count-order-by-aggregate.input.ts diff --git a/server/src/api/@generated/comment/comment-create-many-author-input-envelope.input.ts b/server/src/core/@generated/comment/comment-create-many-author-input-envelope.input.ts similarity index 100% rename from server/src/api/@generated/comment/comment-create-many-author-input-envelope.input.ts rename to server/src/core/@generated/comment/comment-create-many-author-input-envelope.input.ts diff --git a/server/src/api/@generated/comment/comment-create-many-author.input.ts b/server/src/core/@generated/comment/comment-create-many-author.input.ts similarity index 100% rename from server/src/api/@generated/comment/comment-create-many-author.input.ts rename to server/src/core/@generated/comment/comment-create-many-author.input.ts diff --git a/server/src/api/@generated/comment/comment-create-many-comment-thread-input-envelope.input.ts b/server/src/core/@generated/comment/comment-create-many-comment-thread-input-envelope.input.ts similarity index 100% rename from server/src/api/@generated/comment/comment-create-many-comment-thread-input-envelope.input.ts rename to server/src/core/@generated/comment/comment-create-many-comment-thread-input-envelope.input.ts diff --git a/server/src/api/@generated/comment/comment-create-many-comment-thread.input.ts b/server/src/core/@generated/comment/comment-create-many-comment-thread.input.ts similarity index 100% rename from server/src/api/@generated/comment/comment-create-many-comment-thread.input.ts rename to server/src/core/@generated/comment/comment-create-many-comment-thread.input.ts diff --git a/server/src/api/@generated/comment/comment-create-many-workspace-input-envelope.input.ts b/server/src/core/@generated/comment/comment-create-many-workspace-input-envelope.input.ts similarity index 100% rename from server/src/api/@generated/comment/comment-create-many-workspace-input-envelope.input.ts rename to server/src/core/@generated/comment/comment-create-many-workspace-input-envelope.input.ts diff --git a/server/src/api/@generated/comment/comment-create-many-workspace.input.ts b/server/src/core/@generated/comment/comment-create-many-workspace.input.ts similarity index 100% rename from server/src/api/@generated/comment/comment-create-many-workspace.input.ts rename to server/src/core/@generated/comment/comment-create-many-workspace.input.ts diff --git a/server/src/api/@generated/comment/comment-create-many.input.ts b/server/src/core/@generated/comment/comment-create-many.input.ts similarity index 100% rename from server/src/api/@generated/comment/comment-create-many.input.ts rename to server/src/core/@generated/comment/comment-create-many.input.ts diff --git a/server/src/api/@generated/comment/comment-create-nested-many-without-author.input.ts b/server/src/core/@generated/comment/comment-create-nested-many-without-author.input.ts similarity index 100% rename from server/src/api/@generated/comment/comment-create-nested-many-without-author.input.ts rename to server/src/core/@generated/comment/comment-create-nested-many-without-author.input.ts diff --git a/server/src/api/@generated/comment/comment-create-nested-many-without-comment-thread.input.ts b/server/src/core/@generated/comment/comment-create-nested-many-without-comment-thread.input.ts similarity index 100% rename from server/src/api/@generated/comment/comment-create-nested-many-without-comment-thread.input.ts rename to server/src/core/@generated/comment/comment-create-nested-many-without-comment-thread.input.ts diff --git a/server/src/api/@generated/comment/comment-create-nested-many-without-workspace.input.ts b/server/src/core/@generated/comment/comment-create-nested-many-without-workspace.input.ts similarity index 100% rename from server/src/api/@generated/comment/comment-create-nested-many-without-workspace.input.ts rename to server/src/core/@generated/comment/comment-create-nested-many-without-workspace.input.ts diff --git a/server/src/api/@generated/comment/comment-create-or-connect-without-author.input.ts b/server/src/core/@generated/comment/comment-create-or-connect-without-author.input.ts similarity index 100% rename from server/src/api/@generated/comment/comment-create-or-connect-without-author.input.ts rename to server/src/core/@generated/comment/comment-create-or-connect-without-author.input.ts diff --git a/server/src/api/@generated/comment/comment-create-or-connect-without-comment-thread.input.ts b/server/src/core/@generated/comment/comment-create-or-connect-without-comment-thread.input.ts similarity index 100% rename from server/src/api/@generated/comment/comment-create-or-connect-without-comment-thread.input.ts rename to server/src/core/@generated/comment/comment-create-or-connect-without-comment-thread.input.ts diff --git a/server/src/api/@generated/comment/comment-create-or-connect-without-workspace.input.ts b/server/src/core/@generated/comment/comment-create-or-connect-without-workspace.input.ts similarity index 100% rename from server/src/api/@generated/comment/comment-create-or-connect-without-workspace.input.ts rename to server/src/core/@generated/comment/comment-create-or-connect-without-workspace.input.ts diff --git a/server/src/api/@generated/comment/comment-create-without-author.input.ts b/server/src/core/@generated/comment/comment-create-without-author.input.ts similarity index 100% rename from server/src/api/@generated/comment/comment-create-without-author.input.ts rename to server/src/core/@generated/comment/comment-create-without-author.input.ts diff --git a/server/src/api/@generated/comment/comment-create-without-comment-thread.input.ts b/server/src/core/@generated/comment/comment-create-without-comment-thread.input.ts similarity index 100% rename from server/src/api/@generated/comment/comment-create-without-comment-thread.input.ts rename to server/src/core/@generated/comment/comment-create-without-comment-thread.input.ts diff --git a/server/src/api/@generated/comment/comment-create-without-workspace.input.ts b/server/src/core/@generated/comment/comment-create-without-workspace.input.ts similarity index 100% rename from server/src/api/@generated/comment/comment-create-without-workspace.input.ts rename to server/src/core/@generated/comment/comment-create-without-workspace.input.ts diff --git a/server/src/api/@generated/comment/comment-create.input.ts b/server/src/core/@generated/comment/comment-create.input.ts similarity index 100% rename from server/src/api/@generated/comment/comment-create.input.ts rename to server/src/core/@generated/comment/comment-create.input.ts diff --git a/server/src/api/@generated/comment/comment-group-by.args.ts b/server/src/core/@generated/comment/comment-group-by.args.ts similarity index 100% rename from server/src/api/@generated/comment/comment-group-by.args.ts rename to server/src/core/@generated/comment/comment-group-by.args.ts diff --git a/server/src/api/@generated/comment/comment-group-by.output.ts b/server/src/core/@generated/comment/comment-group-by.output.ts similarity index 100% rename from server/src/api/@generated/comment/comment-group-by.output.ts rename to server/src/core/@generated/comment/comment-group-by.output.ts diff --git a/server/src/api/@generated/comment/comment-list-relation-filter.input.ts b/server/src/core/@generated/comment/comment-list-relation-filter.input.ts similarity index 100% rename from server/src/api/@generated/comment/comment-list-relation-filter.input.ts rename to server/src/core/@generated/comment/comment-list-relation-filter.input.ts diff --git a/server/src/api/@generated/comment/comment-max-aggregate.input.ts b/server/src/core/@generated/comment/comment-max-aggregate.input.ts similarity index 100% rename from server/src/api/@generated/comment/comment-max-aggregate.input.ts rename to server/src/core/@generated/comment/comment-max-aggregate.input.ts diff --git a/server/src/api/@generated/comment/comment-max-aggregate.output.ts b/server/src/core/@generated/comment/comment-max-aggregate.output.ts similarity index 100% rename from server/src/api/@generated/comment/comment-max-aggregate.output.ts rename to server/src/core/@generated/comment/comment-max-aggregate.output.ts diff --git a/server/src/api/@generated/comment/comment-max-order-by-aggregate.input.ts b/server/src/core/@generated/comment/comment-max-order-by-aggregate.input.ts similarity index 100% rename from server/src/api/@generated/comment/comment-max-order-by-aggregate.input.ts rename to server/src/core/@generated/comment/comment-max-order-by-aggregate.input.ts diff --git a/server/src/api/@generated/comment/comment-min-aggregate.input.ts b/server/src/core/@generated/comment/comment-min-aggregate.input.ts similarity index 100% rename from server/src/api/@generated/comment/comment-min-aggregate.input.ts rename to server/src/core/@generated/comment/comment-min-aggregate.input.ts diff --git a/server/src/api/@generated/comment/comment-min-aggregate.output.ts b/server/src/core/@generated/comment/comment-min-aggregate.output.ts similarity index 100% rename from server/src/api/@generated/comment/comment-min-aggregate.output.ts rename to server/src/core/@generated/comment/comment-min-aggregate.output.ts diff --git a/server/src/api/@generated/comment/comment-min-order-by-aggregate.input.ts b/server/src/core/@generated/comment/comment-min-order-by-aggregate.input.ts similarity index 100% rename from server/src/api/@generated/comment/comment-min-order-by-aggregate.input.ts rename to server/src/core/@generated/comment/comment-min-order-by-aggregate.input.ts diff --git a/server/src/api/@generated/comment/comment-order-by-relation-aggregate.input.ts b/server/src/core/@generated/comment/comment-order-by-relation-aggregate.input.ts similarity index 100% rename from server/src/api/@generated/comment/comment-order-by-relation-aggregate.input.ts rename to server/src/core/@generated/comment/comment-order-by-relation-aggregate.input.ts diff --git a/server/src/api/@generated/comment/comment-order-by-with-aggregation.input.ts b/server/src/core/@generated/comment/comment-order-by-with-aggregation.input.ts similarity index 100% rename from server/src/api/@generated/comment/comment-order-by-with-aggregation.input.ts rename to server/src/core/@generated/comment/comment-order-by-with-aggregation.input.ts diff --git a/server/src/api/@generated/comment/comment-order-by-with-relation.input.ts b/server/src/core/@generated/comment/comment-order-by-with-relation.input.ts similarity index 100% rename from server/src/api/@generated/comment/comment-order-by-with-relation.input.ts rename to server/src/core/@generated/comment/comment-order-by-with-relation.input.ts diff --git a/server/src/api/@generated/comment/comment-scalar-field.enum.ts b/server/src/core/@generated/comment/comment-scalar-field.enum.ts similarity index 100% rename from server/src/api/@generated/comment/comment-scalar-field.enum.ts rename to server/src/core/@generated/comment/comment-scalar-field.enum.ts diff --git a/server/src/api/@generated/comment/comment-scalar-where-with-aggregates.input.ts b/server/src/core/@generated/comment/comment-scalar-where-with-aggregates.input.ts similarity index 100% rename from server/src/api/@generated/comment/comment-scalar-where-with-aggregates.input.ts rename to server/src/core/@generated/comment/comment-scalar-where-with-aggregates.input.ts diff --git a/server/src/api/@generated/comment/comment-scalar-where.input.ts b/server/src/core/@generated/comment/comment-scalar-where.input.ts similarity index 100% rename from server/src/api/@generated/comment/comment-scalar-where.input.ts rename to server/src/core/@generated/comment/comment-scalar-where.input.ts diff --git a/server/src/api/@generated/comment/comment-thread-count.output.ts b/server/src/core/@generated/comment/comment-thread-count.output.ts similarity index 100% rename from server/src/api/@generated/comment/comment-thread-count.output.ts rename to server/src/core/@generated/comment/comment-thread-count.output.ts diff --git a/server/src/api/@generated/comment/comment-unchecked-create-nested-many-without-author.input.ts b/server/src/core/@generated/comment/comment-unchecked-create-nested-many-without-author.input.ts similarity index 100% rename from server/src/api/@generated/comment/comment-unchecked-create-nested-many-without-author.input.ts rename to server/src/core/@generated/comment/comment-unchecked-create-nested-many-without-author.input.ts diff --git a/server/src/api/@generated/comment/comment-unchecked-create-nested-many-without-comment-thread.input.ts b/server/src/core/@generated/comment/comment-unchecked-create-nested-many-without-comment-thread.input.ts similarity index 100% rename from server/src/api/@generated/comment/comment-unchecked-create-nested-many-without-comment-thread.input.ts rename to server/src/core/@generated/comment/comment-unchecked-create-nested-many-without-comment-thread.input.ts diff --git a/server/src/api/@generated/comment/comment-unchecked-create-nested-many-without-workspace.input.ts b/server/src/core/@generated/comment/comment-unchecked-create-nested-many-without-workspace.input.ts similarity index 100% rename from server/src/api/@generated/comment/comment-unchecked-create-nested-many-without-workspace.input.ts rename to server/src/core/@generated/comment/comment-unchecked-create-nested-many-without-workspace.input.ts diff --git a/server/src/api/@generated/comment/comment-unchecked-create-without-author.input.ts b/server/src/core/@generated/comment/comment-unchecked-create-without-author.input.ts similarity index 100% rename from server/src/api/@generated/comment/comment-unchecked-create-without-author.input.ts rename to server/src/core/@generated/comment/comment-unchecked-create-without-author.input.ts diff --git a/server/src/api/@generated/comment/comment-unchecked-create-without-comment-thread.input.ts b/server/src/core/@generated/comment/comment-unchecked-create-without-comment-thread.input.ts similarity index 100% rename from server/src/api/@generated/comment/comment-unchecked-create-without-comment-thread.input.ts rename to server/src/core/@generated/comment/comment-unchecked-create-without-comment-thread.input.ts diff --git a/server/src/api/@generated/comment/comment-unchecked-create-without-workspace.input.ts b/server/src/core/@generated/comment/comment-unchecked-create-without-workspace.input.ts similarity index 100% rename from server/src/api/@generated/comment/comment-unchecked-create-without-workspace.input.ts rename to server/src/core/@generated/comment/comment-unchecked-create-without-workspace.input.ts diff --git a/server/src/api/@generated/comment/comment-unchecked-create.input.ts b/server/src/core/@generated/comment/comment-unchecked-create.input.ts similarity index 100% rename from server/src/api/@generated/comment/comment-unchecked-create.input.ts rename to server/src/core/@generated/comment/comment-unchecked-create.input.ts diff --git a/server/src/api/@generated/comment/comment-unchecked-update-many-without-author-nested.input.ts b/server/src/core/@generated/comment/comment-unchecked-update-many-without-author-nested.input.ts similarity index 100% rename from server/src/api/@generated/comment/comment-unchecked-update-many-without-author-nested.input.ts rename to server/src/core/@generated/comment/comment-unchecked-update-many-without-author-nested.input.ts diff --git a/server/src/api/@generated/comment/comment-unchecked-update-many-without-comment-thread-nested.input.ts b/server/src/core/@generated/comment/comment-unchecked-update-many-without-comment-thread-nested.input.ts similarity index 100% rename from server/src/api/@generated/comment/comment-unchecked-update-many-without-comment-thread-nested.input.ts rename to server/src/core/@generated/comment/comment-unchecked-update-many-without-comment-thread-nested.input.ts diff --git a/server/src/api/@generated/comment/comment-unchecked-update-many-without-comments.input.ts b/server/src/core/@generated/comment/comment-unchecked-update-many-without-comments.input.ts similarity index 100% rename from server/src/api/@generated/comment/comment-unchecked-update-many-without-comments.input.ts rename to server/src/core/@generated/comment/comment-unchecked-update-many-without-comments.input.ts diff --git a/server/src/api/@generated/comment/comment-unchecked-update-many-without-workspace-nested.input.ts b/server/src/core/@generated/comment/comment-unchecked-update-many-without-workspace-nested.input.ts similarity index 100% rename from server/src/api/@generated/comment/comment-unchecked-update-many-without-workspace-nested.input.ts rename to server/src/core/@generated/comment/comment-unchecked-update-many-without-workspace-nested.input.ts diff --git a/server/src/api/@generated/comment/comment-unchecked-update-many.input.ts b/server/src/core/@generated/comment/comment-unchecked-update-many.input.ts similarity index 100% rename from server/src/api/@generated/comment/comment-unchecked-update-many.input.ts rename to server/src/core/@generated/comment/comment-unchecked-update-many.input.ts diff --git a/server/src/api/@generated/comment/comment-unchecked-update-without-author.input.ts b/server/src/core/@generated/comment/comment-unchecked-update-without-author.input.ts similarity index 100% rename from server/src/api/@generated/comment/comment-unchecked-update-without-author.input.ts rename to server/src/core/@generated/comment/comment-unchecked-update-without-author.input.ts diff --git a/server/src/api/@generated/comment/comment-unchecked-update-without-comment-thread.input.ts b/server/src/core/@generated/comment/comment-unchecked-update-without-comment-thread.input.ts similarity index 100% rename from server/src/api/@generated/comment/comment-unchecked-update-without-comment-thread.input.ts rename to server/src/core/@generated/comment/comment-unchecked-update-without-comment-thread.input.ts diff --git a/server/src/api/@generated/comment/comment-unchecked-update-without-workspace.input.ts b/server/src/core/@generated/comment/comment-unchecked-update-without-workspace.input.ts similarity index 100% rename from server/src/api/@generated/comment/comment-unchecked-update-without-workspace.input.ts rename to server/src/core/@generated/comment/comment-unchecked-update-without-workspace.input.ts diff --git a/server/src/api/@generated/comment/comment-unchecked-update.input.ts b/server/src/core/@generated/comment/comment-unchecked-update.input.ts similarity index 100% rename from server/src/api/@generated/comment/comment-unchecked-update.input.ts rename to server/src/core/@generated/comment/comment-unchecked-update.input.ts diff --git a/server/src/api/@generated/comment/comment-update-many-mutation.input.ts b/server/src/core/@generated/comment/comment-update-many-mutation.input.ts similarity index 100% rename from server/src/api/@generated/comment/comment-update-many-mutation.input.ts rename to server/src/core/@generated/comment/comment-update-many-mutation.input.ts diff --git a/server/src/api/@generated/comment/comment-update-many-with-where-without-author.input.ts b/server/src/core/@generated/comment/comment-update-many-with-where-without-author.input.ts similarity index 100% rename from server/src/api/@generated/comment/comment-update-many-with-where-without-author.input.ts rename to server/src/core/@generated/comment/comment-update-many-with-where-without-author.input.ts diff --git a/server/src/api/@generated/comment/comment-update-many-with-where-without-comment-thread.input.ts b/server/src/core/@generated/comment/comment-update-many-with-where-without-comment-thread.input.ts similarity index 100% rename from server/src/api/@generated/comment/comment-update-many-with-where-without-comment-thread.input.ts rename to server/src/core/@generated/comment/comment-update-many-with-where-without-comment-thread.input.ts diff --git a/server/src/api/@generated/comment/comment-update-many-with-where-without-workspace.input.ts b/server/src/core/@generated/comment/comment-update-many-with-where-without-workspace.input.ts similarity index 100% rename from server/src/api/@generated/comment/comment-update-many-with-where-without-workspace.input.ts rename to server/src/core/@generated/comment/comment-update-many-with-where-without-workspace.input.ts diff --git a/server/src/api/@generated/comment/comment-update-many-without-author-nested.input.ts b/server/src/core/@generated/comment/comment-update-many-without-author-nested.input.ts similarity index 100% rename from server/src/api/@generated/comment/comment-update-many-without-author-nested.input.ts rename to server/src/core/@generated/comment/comment-update-many-without-author-nested.input.ts diff --git a/server/src/api/@generated/comment/comment-update-many-without-comment-thread-nested.input.ts b/server/src/core/@generated/comment/comment-update-many-without-comment-thread-nested.input.ts similarity index 100% rename from server/src/api/@generated/comment/comment-update-many-without-comment-thread-nested.input.ts rename to server/src/core/@generated/comment/comment-update-many-without-comment-thread-nested.input.ts diff --git a/server/src/api/@generated/comment/comment-update-many-without-workspace-nested.input.ts b/server/src/core/@generated/comment/comment-update-many-without-workspace-nested.input.ts similarity index 100% rename from server/src/api/@generated/comment/comment-update-many-without-workspace-nested.input.ts rename to server/src/core/@generated/comment/comment-update-many-without-workspace-nested.input.ts diff --git a/server/src/api/@generated/comment/comment-update-with-where-unique-without-author.input.ts b/server/src/core/@generated/comment/comment-update-with-where-unique-without-author.input.ts similarity index 100% rename from server/src/api/@generated/comment/comment-update-with-where-unique-without-author.input.ts rename to server/src/core/@generated/comment/comment-update-with-where-unique-without-author.input.ts diff --git a/server/src/api/@generated/comment/comment-update-with-where-unique-without-comment-thread.input.ts b/server/src/core/@generated/comment/comment-update-with-where-unique-without-comment-thread.input.ts similarity index 100% rename from server/src/api/@generated/comment/comment-update-with-where-unique-without-comment-thread.input.ts rename to server/src/core/@generated/comment/comment-update-with-where-unique-without-comment-thread.input.ts diff --git a/server/src/api/@generated/comment/comment-update-with-where-unique-without-workspace.input.ts b/server/src/core/@generated/comment/comment-update-with-where-unique-without-workspace.input.ts similarity index 100% rename from server/src/api/@generated/comment/comment-update-with-where-unique-without-workspace.input.ts rename to server/src/core/@generated/comment/comment-update-with-where-unique-without-workspace.input.ts diff --git a/server/src/api/@generated/comment/comment-update-without-author.input.ts b/server/src/core/@generated/comment/comment-update-without-author.input.ts similarity index 100% rename from server/src/api/@generated/comment/comment-update-without-author.input.ts rename to server/src/core/@generated/comment/comment-update-without-author.input.ts diff --git a/server/src/api/@generated/comment/comment-update-without-comment-thread.input.ts b/server/src/core/@generated/comment/comment-update-without-comment-thread.input.ts similarity index 100% rename from server/src/api/@generated/comment/comment-update-without-comment-thread.input.ts rename to server/src/core/@generated/comment/comment-update-without-comment-thread.input.ts diff --git a/server/src/api/@generated/comment/comment-update-without-workspace.input.ts b/server/src/core/@generated/comment/comment-update-without-workspace.input.ts similarity index 100% rename from server/src/api/@generated/comment/comment-update-without-workspace.input.ts rename to server/src/core/@generated/comment/comment-update-without-workspace.input.ts diff --git a/server/src/api/@generated/comment/comment-update.input.ts b/server/src/core/@generated/comment/comment-update.input.ts similarity index 100% rename from server/src/api/@generated/comment/comment-update.input.ts rename to server/src/core/@generated/comment/comment-update.input.ts diff --git a/server/src/api/@generated/comment/comment-upsert-with-where-unique-without-author.input.ts b/server/src/core/@generated/comment/comment-upsert-with-where-unique-without-author.input.ts similarity index 100% rename from server/src/api/@generated/comment/comment-upsert-with-where-unique-without-author.input.ts rename to server/src/core/@generated/comment/comment-upsert-with-where-unique-without-author.input.ts diff --git a/server/src/api/@generated/comment/comment-upsert-with-where-unique-without-comment-thread.input.ts b/server/src/core/@generated/comment/comment-upsert-with-where-unique-without-comment-thread.input.ts similarity index 100% rename from server/src/api/@generated/comment/comment-upsert-with-where-unique-without-comment-thread.input.ts rename to server/src/core/@generated/comment/comment-upsert-with-where-unique-without-comment-thread.input.ts diff --git a/server/src/api/@generated/comment/comment-upsert-with-where-unique-without-workspace.input.ts b/server/src/core/@generated/comment/comment-upsert-with-where-unique-without-workspace.input.ts similarity index 100% rename from server/src/api/@generated/comment/comment-upsert-with-where-unique-without-workspace.input.ts rename to server/src/core/@generated/comment/comment-upsert-with-where-unique-without-workspace.input.ts diff --git a/server/src/api/@generated/comment/comment-where-unique.input.ts b/server/src/core/@generated/comment/comment-where-unique.input.ts similarity index 100% rename from server/src/api/@generated/comment/comment-where-unique.input.ts rename to server/src/core/@generated/comment/comment-where-unique.input.ts diff --git a/server/src/api/@generated/comment/comment-where.input.ts b/server/src/core/@generated/comment/comment-where.input.ts similarity index 100% rename from server/src/api/@generated/comment/comment-where.input.ts rename to server/src/core/@generated/comment/comment-where.input.ts diff --git a/server/src/api/@generated/comment/comment.model.ts b/server/src/core/@generated/comment/comment.model.ts similarity index 100% rename from server/src/api/@generated/comment/comment.model.ts rename to server/src/core/@generated/comment/comment.model.ts diff --git a/server/src/api/@generated/comment/create-many-comment.args.ts b/server/src/core/@generated/comment/create-many-comment.args.ts similarity index 100% rename from server/src/api/@generated/comment/create-many-comment.args.ts rename to server/src/core/@generated/comment/create-many-comment.args.ts diff --git a/server/src/api/@generated/comment/create-one-comment.args.ts b/server/src/core/@generated/comment/create-one-comment.args.ts similarity index 100% rename from server/src/api/@generated/comment/create-one-comment.args.ts rename to server/src/core/@generated/comment/create-one-comment.args.ts diff --git a/server/src/api/@generated/comment/delete-many-comment.args.ts b/server/src/core/@generated/comment/delete-many-comment.args.ts similarity index 100% rename from server/src/api/@generated/comment/delete-many-comment.args.ts rename to server/src/core/@generated/comment/delete-many-comment.args.ts diff --git a/server/src/api/@generated/comment/delete-one-comment.args.ts b/server/src/core/@generated/comment/delete-one-comment.args.ts similarity index 100% rename from server/src/api/@generated/comment/delete-one-comment.args.ts rename to server/src/core/@generated/comment/delete-one-comment.args.ts diff --git a/server/src/api/@generated/comment/find-first-comment-or-throw.args.ts b/server/src/core/@generated/comment/find-first-comment-or-throw.args.ts similarity index 100% rename from server/src/api/@generated/comment/find-first-comment-or-throw.args.ts rename to server/src/core/@generated/comment/find-first-comment-or-throw.args.ts diff --git a/server/src/api/@generated/comment/find-first-comment.args.ts b/server/src/core/@generated/comment/find-first-comment.args.ts similarity index 100% rename from server/src/api/@generated/comment/find-first-comment.args.ts rename to server/src/core/@generated/comment/find-first-comment.args.ts diff --git a/server/src/api/@generated/comment/find-many-comment.args.ts b/server/src/core/@generated/comment/find-many-comment.args.ts similarity index 100% rename from server/src/api/@generated/comment/find-many-comment.args.ts rename to server/src/core/@generated/comment/find-many-comment.args.ts diff --git a/server/src/api/@generated/comment/find-unique-comment-or-throw.args.ts b/server/src/core/@generated/comment/find-unique-comment-or-throw.args.ts similarity index 100% rename from server/src/api/@generated/comment/find-unique-comment-or-throw.args.ts rename to server/src/core/@generated/comment/find-unique-comment-or-throw.args.ts diff --git a/server/src/api/@generated/comment/find-unique-comment.args.ts b/server/src/core/@generated/comment/find-unique-comment.args.ts similarity index 100% rename from server/src/api/@generated/comment/find-unique-comment.args.ts rename to server/src/core/@generated/comment/find-unique-comment.args.ts diff --git a/server/src/api/@generated/comment/update-many-comment.args.ts b/server/src/core/@generated/comment/update-many-comment.args.ts similarity index 100% rename from server/src/api/@generated/comment/update-many-comment.args.ts rename to server/src/core/@generated/comment/update-many-comment.args.ts diff --git a/server/src/api/@generated/comment/update-one-comment.args.ts b/server/src/core/@generated/comment/update-one-comment.args.ts similarity index 100% rename from server/src/api/@generated/comment/update-one-comment.args.ts rename to server/src/core/@generated/comment/update-one-comment.args.ts diff --git a/server/src/api/@generated/comment/upsert-one-comment.args.ts b/server/src/core/@generated/comment/upsert-one-comment.args.ts similarity index 100% rename from server/src/api/@generated/comment/upsert-one-comment.args.ts rename to server/src/core/@generated/comment/upsert-one-comment.args.ts diff --git a/server/src/api/@generated/company/aggregate-company.output.ts b/server/src/core/@generated/company/aggregate-company.output.ts similarity index 100% rename from server/src/api/@generated/company/aggregate-company.output.ts rename to server/src/core/@generated/company/aggregate-company.output.ts diff --git a/server/src/api/@generated/company/company-aggregate.args.ts b/server/src/core/@generated/company/company-aggregate.args.ts similarity index 100% rename from server/src/api/@generated/company/company-aggregate.args.ts rename to server/src/core/@generated/company/company-aggregate.args.ts diff --git a/server/src/api/@generated/company/company-avg-aggregate.input.ts b/server/src/core/@generated/company/company-avg-aggregate.input.ts similarity index 100% rename from server/src/api/@generated/company/company-avg-aggregate.input.ts rename to server/src/core/@generated/company/company-avg-aggregate.input.ts diff --git a/server/src/api/@generated/company/company-avg-aggregate.output.ts b/server/src/core/@generated/company/company-avg-aggregate.output.ts similarity index 100% rename from server/src/api/@generated/company/company-avg-aggregate.output.ts rename to server/src/core/@generated/company/company-avg-aggregate.output.ts diff --git a/server/src/api/@generated/company/company-avg-order-by-aggregate.input.ts b/server/src/core/@generated/company/company-avg-order-by-aggregate.input.ts similarity index 100% rename from server/src/api/@generated/company/company-avg-order-by-aggregate.input.ts rename to server/src/core/@generated/company/company-avg-order-by-aggregate.input.ts diff --git a/server/src/api/@generated/company/company-count-aggregate.input.ts b/server/src/core/@generated/company/company-count-aggregate.input.ts similarity index 100% rename from server/src/api/@generated/company/company-count-aggregate.input.ts rename to server/src/core/@generated/company/company-count-aggregate.input.ts diff --git a/server/src/api/@generated/company/company-count-aggregate.output.ts b/server/src/core/@generated/company/company-count-aggregate.output.ts similarity index 100% rename from server/src/api/@generated/company/company-count-aggregate.output.ts rename to server/src/core/@generated/company/company-count-aggregate.output.ts diff --git a/server/src/api/@generated/company/company-count-order-by-aggregate.input.ts b/server/src/core/@generated/company/company-count-order-by-aggregate.input.ts similarity index 100% rename from server/src/api/@generated/company/company-count-order-by-aggregate.input.ts rename to server/src/core/@generated/company/company-count-order-by-aggregate.input.ts diff --git a/server/src/api/@generated/company/company-count.output.ts b/server/src/core/@generated/company/company-count.output.ts similarity index 100% rename from server/src/api/@generated/company/company-count.output.ts rename to server/src/core/@generated/company/company-count.output.ts diff --git a/server/src/api/@generated/company/company-create-many-account-owner-input-envelope.input.ts b/server/src/core/@generated/company/company-create-many-account-owner-input-envelope.input.ts similarity index 100% rename from server/src/api/@generated/company/company-create-many-account-owner-input-envelope.input.ts rename to server/src/core/@generated/company/company-create-many-account-owner-input-envelope.input.ts diff --git a/server/src/api/@generated/company/company-create-many-account-owner.input.ts b/server/src/core/@generated/company/company-create-many-account-owner.input.ts similarity index 100% rename from server/src/api/@generated/company/company-create-many-account-owner.input.ts rename to server/src/core/@generated/company/company-create-many-account-owner.input.ts diff --git a/server/src/api/@generated/company/company-create-many-workspace-input-envelope.input.ts b/server/src/core/@generated/company/company-create-many-workspace-input-envelope.input.ts similarity index 100% rename from server/src/api/@generated/company/company-create-many-workspace-input-envelope.input.ts rename to server/src/core/@generated/company/company-create-many-workspace-input-envelope.input.ts diff --git a/server/src/api/@generated/company/company-create-many-workspace.input.ts b/server/src/core/@generated/company/company-create-many-workspace.input.ts similarity index 100% rename from server/src/api/@generated/company/company-create-many-workspace.input.ts rename to server/src/core/@generated/company/company-create-many-workspace.input.ts diff --git a/server/src/api/@generated/company/company-create-many.input.ts b/server/src/core/@generated/company/company-create-many.input.ts similarity index 100% rename from server/src/api/@generated/company/company-create-many.input.ts rename to server/src/core/@generated/company/company-create-many.input.ts diff --git a/server/src/api/@generated/company/company-create-nested-many-without-account-owner.input.ts b/server/src/core/@generated/company/company-create-nested-many-without-account-owner.input.ts similarity index 100% rename from server/src/api/@generated/company/company-create-nested-many-without-account-owner.input.ts rename to server/src/core/@generated/company/company-create-nested-many-without-account-owner.input.ts diff --git a/server/src/api/@generated/company/company-create-nested-many-without-workspace.input.ts b/server/src/core/@generated/company/company-create-nested-many-without-workspace.input.ts similarity index 100% rename from server/src/api/@generated/company/company-create-nested-many-without-workspace.input.ts rename to server/src/core/@generated/company/company-create-nested-many-without-workspace.input.ts diff --git a/server/src/api/@generated/company/company-create-nested-one-without-people.input.ts b/server/src/core/@generated/company/company-create-nested-one-without-people.input.ts similarity index 100% rename from server/src/api/@generated/company/company-create-nested-one-without-people.input.ts rename to server/src/core/@generated/company/company-create-nested-one-without-people.input.ts diff --git a/server/src/api/@generated/company/company-create-or-connect-without-account-owner.input.ts b/server/src/core/@generated/company/company-create-or-connect-without-account-owner.input.ts similarity index 100% rename from server/src/api/@generated/company/company-create-or-connect-without-account-owner.input.ts rename to server/src/core/@generated/company/company-create-or-connect-without-account-owner.input.ts diff --git a/server/src/api/@generated/company/company-create-or-connect-without-people.input.ts b/server/src/core/@generated/company/company-create-or-connect-without-people.input.ts similarity index 100% rename from server/src/api/@generated/company/company-create-or-connect-without-people.input.ts rename to server/src/core/@generated/company/company-create-or-connect-without-people.input.ts diff --git a/server/src/api/@generated/company/company-create-or-connect-without-workspace.input.ts b/server/src/core/@generated/company/company-create-or-connect-without-workspace.input.ts similarity index 100% rename from server/src/api/@generated/company/company-create-or-connect-without-workspace.input.ts rename to server/src/core/@generated/company/company-create-or-connect-without-workspace.input.ts diff --git a/server/src/api/@generated/company/company-create-without-account-owner.input.ts b/server/src/core/@generated/company/company-create-without-account-owner.input.ts similarity index 100% rename from server/src/api/@generated/company/company-create-without-account-owner.input.ts rename to server/src/core/@generated/company/company-create-without-account-owner.input.ts diff --git a/server/src/api/@generated/company/company-create-without-people.input.ts b/server/src/core/@generated/company/company-create-without-people.input.ts similarity index 100% rename from server/src/api/@generated/company/company-create-without-people.input.ts rename to server/src/core/@generated/company/company-create-without-people.input.ts diff --git a/server/src/api/@generated/company/company-create-without-workspace.input.ts b/server/src/core/@generated/company/company-create-without-workspace.input.ts similarity index 100% rename from server/src/api/@generated/company/company-create-without-workspace.input.ts rename to server/src/core/@generated/company/company-create-without-workspace.input.ts diff --git a/server/src/api/@generated/company/company-create.input.ts b/server/src/core/@generated/company/company-create.input.ts similarity index 100% rename from server/src/api/@generated/company/company-create.input.ts rename to server/src/core/@generated/company/company-create.input.ts diff --git a/server/src/api/@generated/company/company-group-by.args.ts b/server/src/core/@generated/company/company-group-by.args.ts similarity index 100% rename from server/src/api/@generated/company/company-group-by.args.ts rename to server/src/core/@generated/company/company-group-by.args.ts diff --git a/server/src/api/@generated/company/company-group-by.output.ts b/server/src/core/@generated/company/company-group-by.output.ts similarity index 100% rename from server/src/api/@generated/company/company-group-by.output.ts rename to server/src/core/@generated/company/company-group-by.output.ts diff --git a/server/src/api/@generated/company/company-list-relation-filter.input.ts b/server/src/core/@generated/company/company-list-relation-filter.input.ts similarity index 100% rename from server/src/api/@generated/company/company-list-relation-filter.input.ts rename to server/src/core/@generated/company/company-list-relation-filter.input.ts diff --git a/server/src/api/@generated/company/company-max-aggregate.input.ts b/server/src/core/@generated/company/company-max-aggregate.input.ts similarity index 100% rename from server/src/api/@generated/company/company-max-aggregate.input.ts rename to server/src/core/@generated/company/company-max-aggregate.input.ts diff --git a/server/src/api/@generated/company/company-max-aggregate.output.ts b/server/src/core/@generated/company/company-max-aggregate.output.ts similarity index 100% rename from server/src/api/@generated/company/company-max-aggregate.output.ts rename to server/src/core/@generated/company/company-max-aggregate.output.ts diff --git a/server/src/api/@generated/company/company-max-order-by-aggregate.input.ts b/server/src/core/@generated/company/company-max-order-by-aggregate.input.ts similarity index 100% rename from server/src/api/@generated/company/company-max-order-by-aggregate.input.ts rename to server/src/core/@generated/company/company-max-order-by-aggregate.input.ts diff --git a/server/src/api/@generated/company/company-min-aggregate.input.ts b/server/src/core/@generated/company/company-min-aggregate.input.ts similarity index 100% rename from server/src/api/@generated/company/company-min-aggregate.input.ts rename to server/src/core/@generated/company/company-min-aggregate.input.ts diff --git a/server/src/api/@generated/company/company-min-aggregate.output.ts b/server/src/core/@generated/company/company-min-aggregate.output.ts similarity index 100% rename from server/src/api/@generated/company/company-min-aggregate.output.ts rename to server/src/core/@generated/company/company-min-aggregate.output.ts diff --git a/server/src/api/@generated/company/company-min-order-by-aggregate.input.ts b/server/src/core/@generated/company/company-min-order-by-aggregate.input.ts similarity index 100% rename from server/src/api/@generated/company/company-min-order-by-aggregate.input.ts rename to server/src/core/@generated/company/company-min-order-by-aggregate.input.ts diff --git a/server/src/api/@generated/company/company-order-by-relation-aggregate.input.ts b/server/src/core/@generated/company/company-order-by-relation-aggregate.input.ts similarity index 100% rename from server/src/api/@generated/company/company-order-by-relation-aggregate.input.ts rename to server/src/core/@generated/company/company-order-by-relation-aggregate.input.ts diff --git a/server/src/api/@generated/company/company-order-by-with-aggregation.input.ts b/server/src/core/@generated/company/company-order-by-with-aggregation.input.ts similarity index 100% rename from server/src/api/@generated/company/company-order-by-with-aggregation.input.ts rename to server/src/core/@generated/company/company-order-by-with-aggregation.input.ts diff --git a/server/src/api/@generated/company/company-order-by-with-relation.input.ts b/server/src/core/@generated/company/company-order-by-with-relation.input.ts similarity index 100% rename from server/src/api/@generated/company/company-order-by-with-relation.input.ts rename to server/src/core/@generated/company/company-order-by-with-relation.input.ts diff --git a/server/src/api/@generated/company/company-relation-filter.input.ts b/server/src/core/@generated/company/company-relation-filter.input.ts similarity index 100% rename from server/src/api/@generated/company/company-relation-filter.input.ts rename to server/src/core/@generated/company/company-relation-filter.input.ts diff --git a/server/src/api/@generated/company/company-scalar-field.enum.ts b/server/src/core/@generated/company/company-scalar-field.enum.ts similarity index 100% rename from server/src/api/@generated/company/company-scalar-field.enum.ts rename to server/src/core/@generated/company/company-scalar-field.enum.ts diff --git a/server/src/api/@generated/company/company-scalar-where-with-aggregates.input.ts b/server/src/core/@generated/company/company-scalar-where-with-aggregates.input.ts similarity index 100% rename from server/src/api/@generated/company/company-scalar-where-with-aggregates.input.ts rename to server/src/core/@generated/company/company-scalar-where-with-aggregates.input.ts diff --git a/server/src/api/@generated/company/company-scalar-where.input.ts b/server/src/core/@generated/company/company-scalar-where.input.ts similarity index 100% rename from server/src/api/@generated/company/company-scalar-where.input.ts rename to server/src/core/@generated/company/company-scalar-where.input.ts diff --git a/server/src/api/@generated/company/company-sum-aggregate.input.ts b/server/src/core/@generated/company/company-sum-aggregate.input.ts similarity index 100% rename from server/src/api/@generated/company/company-sum-aggregate.input.ts rename to server/src/core/@generated/company/company-sum-aggregate.input.ts diff --git a/server/src/api/@generated/company/company-sum-aggregate.output.ts b/server/src/core/@generated/company/company-sum-aggregate.output.ts similarity index 100% rename from server/src/api/@generated/company/company-sum-aggregate.output.ts rename to server/src/core/@generated/company/company-sum-aggregate.output.ts diff --git a/server/src/api/@generated/company/company-sum-order-by-aggregate.input.ts b/server/src/core/@generated/company/company-sum-order-by-aggregate.input.ts similarity index 100% rename from server/src/api/@generated/company/company-sum-order-by-aggregate.input.ts rename to server/src/core/@generated/company/company-sum-order-by-aggregate.input.ts diff --git a/server/src/api/@generated/company/company-unchecked-create-nested-many-without-account-owner.input.ts b/server/src/core/@generated/company/company-unchecked-create-nested-many-without-account-owner.input.ts similarity index 100% rename from server/src/api/@generated/company/company-unchecked-create-nested-many-without-account-owner.input.ts rename to server/src/core/@generated/company/company-unchecked-create-nested-many-without-account-owner.input.ts diff --git a/server/src/api/@generated/company/company-unchecked-create-nested-many-without-workspace.input.ts b/server/src/core/@generated/company/company-unchecked-create-nested-many-without-workspace.input.ts similarity index 100% rename from server/src/api/@generated/company/company-unchecked-create-nested-many-without-workspace.input.ts rename to server/src/core/@generated/company/company-unchecked-create-nested-many-without-workspace.input.ts diff --git a/server/src/api/@generated/company/company-unchecked-create-without-account-owner.input.ts b/server/src/core/@generated/company/company-unchecked-create-without-account-owner.input.ts similarity index 100% rename from server/src/api/@generated/company/company-unchecked-create-without-account-owner.input.ts rename to server/src/core/@generated/company/company-unchecked-create-without-account-owner.input.ts diff --git a/server/src/api/@generated/company/company-unchecked-create-without-people.input.ts b/server/src/core/@generated/company/company-unchecked-create-without-people.input.ts similarity index 100% rename from server/src/api/@generated/company/company-unchecked-create-without-people.input.ts rename to server/src/core/@generated/company/company-unchecked-create-without-people.input.ts diff --git a/server/src/api/@generated/company/company-unchecked-create-without-workspace.input.ts b/server/src/core/@generated/company/company-unchecked-create-without-workspace.input.ts similarity index 100% rename from server/src/api/@generated/company/company-unchecked-create-without-workspace.input.ts rename to server/src/core/@generated/company/company-unchecked-create-without-workspace.input.ts diff --git a/server/src/api/@generated/company/company-unchecked-create.input.ts b/server/src/core/@generated/company/company-unchecked-create.input.ts similarity index 100% rename from server/src/api/@generated/company/company-unchecked-create.input.ts rename to server/src/core/@generated/company/company-unchecked-create.input.ts diff --git a/server/src/api/@generated/company/company-unchecked-update-many-without-account-owner-nested.input.ts b/server/src/core/@generated/company/company-unchecked-update-many-without-account-owner-nested.input.ts similarity index 100% rename from server/src/api/@generated/company/company-unchecked-update-many-without-account-owner-nested.input.ts rename to server/src/core/@generated/company/company-unchecked-update-many-without-account-owner-nested.input.ts diff --git a/server/src/api/@generated/company/company-unchecked-update-many-without-companies.input.ts b/server/src/core/@generated/company/company-unchecked-update-many-without-companies.input.ts similarity index 100% rename from server/src/api/@generated/company/company-unchecked-update-many-without-companies.input.ts rename to server/src/core/@generated/company/company-unchecked-update-many-without-companies.input.ts diff --git a/server/src/api/@generated/company/company-unchecked-update-many-without-workspace-nested.input.ts b/server/src/core/@generated/company/company-unchecked-update-many-without-workspace-nested.input.ts similarity index 100% rename from server/src/api/@generated/company/company-unchecked-update-many-without-workspace-nested.input.ts rename to server/src/core/@generated/company/company-unchecked-update-many-without-workspace-nested.input.ts diff --git a/server/src/api/@generated/company/company-unchecked-update-many.input.ts b/server/src/core/@generated/company/company-unchecked-update-many.input.ts similarity index 100% rename from server/src/api/@generated/company/company-unchecked-update-many.input.ts rename to server/src/core/@generated/company/company-unchecked-update-many.input.ts diff --git a/server/src/api/@generated/company/company-unchecked-update-without-account-owner.input.ts b/server/src/core/@generated/company/company-unchecked-update-without-account-owner.input.ts similarity index 100% rename from server/src/api/@generated/company/company-unchecked-update-without-account-owner.input.ts rename to server/src/core/@generated/company/company-unchecked-update-without-account-owner.input.ts diff --git a/server/src/api/@generated/company/company-unchecked-update-without-people.input.ts b/server/src/core/@generated/company/company-unchecked-update-without-people.input.ts similarity index 100% rename from server/src/api/@generated/company/company-unchecked-update-without-people.input.ts rename to server/src/core/@generated/company/company-unchecked-update-without-people.input.ts diff --git a/server/src/api/@generated/company/company-unchecked-update-without-workspace.input.ts b/server/src/core/@generated/company/company-unchecked-update-without-workspace.input.ts similarity index 100% rename from server/src/api/@generated/company/company-unchecked-update-without-workspace.input.ts rename to server/src/core/@generated/company/company-unchecked-update-without-workspace.input.ts diff --git a/server/src/api/@generated/company/company-unchecked-update.input.ts b/server/src/core/@generated/company/company-unchecked-update.input.ts similarity index 100% rename from server/src/api/@generated/company/company-unchecked-update.input.ts rename to server/src/core/@generated/company/company-unchecked-update.input.ts diff --git a/server/src/api/@generated/company/company-update-many-mutation.input.ts b/server/src/core/@generated/company/company-update-many-mutation.input.ts similarity index 100% rename from server/src/api/@generated/company/company-update-many-mutation.input.ts rename to server/src/core/@generated/company/company-update-many-mutation.input.ts diff --git a/server/src/api/@generated/company/company-update-many-with-where-without-account-owner.input.ts b/server/src/core/@generated/company/company-update-many-with-where-without-account-owner.input.ts similarity index 100% rename from server/src/api/@generated/company/company-update-many-with-where-without-account-owner.input.ts rename to server/src/core/@generated/company/company-update-many-with-where-without-account-owner.input.ts diff --git a/server/src/api/@generated/company/company-update-many-with-where-without-workspace.input.ts b/server/src/core/@generated/company/company-update-many-with-where-without-workspace.input.ts similarity index 100% rename from server/src/api/@generated/company/company-update-many-with-where-without-workspace.input.ts rename to server/src/core/@generated/company/company-update-many-with-where-without-workspace.input.ts diff --git a/server/src/api/@generated/company/company-update-many-without-account-owner-nested.input.ts b/server/src/core/@generated/company/company-update-many-without-account-owner-nested.input.ts similarity index 100% rename from server/src/api/@generated/company/company-update-many-without-account-owner-nested.input.ts rename to server/src/core/@generated/company/company-update-many-without-account-owner-nested.input.ts diff --git a/server/src/api/@generated/company/company-update-many-without-workspace-nested.input.ts b/server/src/core/@generated/company/company-update-many-without-workspace-nested.input.ts similarity index 100% rename from server/src/api/@generated/company/company-update-many-without-workspace-nested.input.ts rename to server/src/core/@generated/company/company-update-many-without-workspace-nested.input.ts diff --git a/server/src/api/@generated/company/company-update-one-without-people-nested.input.ts b/server/src/core/@generated/company/company-update-one-without-people-nested.input.ts similarity index 100% rename from server/src/api/@generated/company/company-update-one-without-people-nested.input.ts rename to server/src/core/@generated/company/company-update-one-without-people-nested.input.ts diff --git a/server/src/api/@generated/company/company-update-with-where-unique-without-account-owner.input.ts b/server/src/core/@generated/company/company-update-with-where-unique-without-account-owner.input.ts similarity index 100% rename from server/src/api/@generated/company/company-update-with-where-unique-without-account-owner.input.ts rename to server/src/core/@generated/company/company-update-with-where-unique-without-account-owner.input.ts diff --git a/server/src/api/@generated/company/company-update-with-where-unique-without-workspace.input.ts b/server/src/core/@generated/company/company-update-with-where-unique-without-workspace.input.ts similarity index 100% rename from server/src/api/@generated/company/company-update-with-where-unique-without-workspace.input.ts rename to server/src/core/@generated/company/company-update-with-where-unique-without-workspace.input.ts diff --git a/server/src/api/@generated/company/company-update-without-account-owner.input.ts b/server/src/core/@generated/company/company-update-without-account-owner.input.ts similarity index 100% rename from server/src/api/@generated/company/company-update-without-account-owner.input.ts rename to server/src/core/@generated/company/company-update-without-account-owner.input.ts diff --git a/server/src/api/@generated/company/company-update-without-people.input.ts b/server/src/core/@generated/company/company-update-without-people.input.ts similarity index 100% rename from server/src/api/@generated/company/company-update-without-people.input.ts rename to server/src/core/@generated/company/company-update-without-people.input.ts diff --git a/server/src/api/@generated/company/company-update-without-workspace.input.ts b/server/src/core/@generated/company/company-update-without-workspace.input.ts similarity index 100% rename from server/src/api/@generated/company/company-update-without-workspace.input.ts rename to server/src/core/@generated/company/company-update-without-workspace.input.ts diff --git a/server/src/api/@generated/company/company-update.input.ts b/server/src/core/@generated/company/company-update.input.ts similarity index 100% rename from server/src/api/@generated/company/company-update.input.ts rename to server/src/core/@generated/company/company-update.input.ts diff --git a/server/src/api/@generated/company/company-upsert-with-where-unique-without-account-owner.input.ts b/server/src/core/@generated/company/company-upsert-with-where-unique-without-account-owner.input.ts similarity index 100% rename from server/src/api/@generated/company/company-upsert-with-where-unique-without-account-owner.input.ts rename to server/src/core/@generated/company/company-upsert-with-where-unique-without-account-owner.input.ts diff --git a/server/src/api/@generated/company/company-upsert-with-where-unique-without-workspace.input.ts b/server/src/core/@generated/company/company-upsert-with-where-unique-without-workspace.input.ts similarity index 100% rename from server/src/api/@generated/company/company-upsert-with-where-unique-without-workspace.input.ts rename to server/src/core/@generated/company/company-upsert-with-where-unique-without-workspace.input.ts diff --git a/server/src/api/@generated/company/company-upsert-without-people.input.ts b/server/src/core/@generated/company/company-upsert-without-people.input.ts similarity index 100% rename from server/src/api/@generated/company/company-upsert-without-people.input.ts rename to server/src/core/@generated/company/company-upsert-without-people.input.ts diff --git a/server/src/api/@generated/company/company-where-unique.input.ts b/server/src/core/@generated/company/company-where-unique.input.ts similarity index 100% rename from server/src/api/@generated/company/company-where-unique.input.ts rename to server/src/core/@generated/company/company-where-unique.input.ts diff --git a/server/src/api/@generated/company/company-where.input.ts b/server/src/core/@generated/company/company-where.input.ts similarity index 100% rename from server/src/api/@generated/company/company-where.input.ts rename to server/src/core/@generated/company/company-where.input.ts diff --git a/server/src/api/@generated/company/company.model.ts b/server/src/core/@generated/company/company.model.ts similarity index 100% rename from server/src/api/@generated/company/company.model.ts rename to server/src/core/@generated/company/company.model.ts diff --git a/server/src/api/@generated/company/create-many-company.args.ts b/server/src/core/@generated/company/create-many-company.args.ts similarity index 100% rename from server/src/api/@generated/company/create-many-company.args.ts rename to server/src/core/@generated/company/create-many-company.args.ts diff --git a/server/src/api/@generated/company/create-one-company.args.ts b/server/src/core/@generated/company/create-one-company.args.ts similarity index 100% rename from server/src/api/@generated/company/create-one-company.args.ts rename to server/src/core/@generated/company/create-one-company.args.ts diff --git a/server/src/api/@generated/company/delete-many-company.args.ts b/server/src/core/@generated/company/delete-many-company.args.ts similarity index 100% rename from server/src/api/@generated/company/delete-many-company.args.ts rename to server/src/core/@generated/company/delete-many-company.args.ts diff --git a/server/src/api/@generated/company/delete-one-company.args.ts b/server/src/core/@generated/company/delete-one-company.args.ts similarity index 100% rename from server/src/api/@generated/company/delete-one-company.args.ts rename to server/src/core/@generated/company/delete-one-company.args.ts diff --git a/server/src/api/@generated/company/find-first-company-or-throw.args.ts b/server/src/core/@generated/company/find-first-company-or-throw.args.ts similarity index 100% rename from server/src/api/@generated/company/find-first-company-or-throw.args.ts rename to server/src/core/@generated/company/find-first-company-or-throw.args.ts diff --git a/server/src/api/@generated/company/find-first-company.args.ts b/server/src/core/@generated/company/find-first-company.args.ts similarity index 100% rename from server/src/api/@generated/company/find-first-company.args.ts rename to server/src/core/@generated/company/find-first-company.args.ts diff --git a/server/src/api/@generated/company/find-many-company.args.ts b/server/src/core/@generated/company/find-many-company.args.ts similarity index 100% rename from server/src/api/@generated/company/find-many-company.args.ts rename to server/src/core/@generated/company/find-many-company.args.ts diff --git a/server/src/api/@generated/company/find-unique-company-or-throw.args.ts b/server/src/core/@generated/company/find-unique-company-or-throw.args.ts similarity index 100% rename from server/src/api/@generated/company/find-unique-company-or-throw.args.ts rename to server/src/core/@generated/company/find-unique-company-or-throw.args.ts diff --git a/server/src/api/@generated/company/find-unique-company.args.ts b/server/src/core/@generated/company/find-unique-company.args.ts similarity index 100% rename from server/src/api/@generated/company/find-unique-company.args.ts rename to server/src/core/@generated/company/find-unique-company.args.ts diff --git a/server/src/api/@generated/company/update-many-company.args.ts b/server/src/core/@generated/company/update-many-company.args.ts similarity index 100% rename from server/src/api/@generated/company/update-many-company.args.ts rename to server/src/core/@generated/company/update-many-company.args.ts diff --git a/server/src/api/@generated/company/update-one-company.args.ts b/server/src/core/@generated/company/update-one-company.args.ts similarity index 100% rename from server/src/api/@generated/company/update-one-company.args.ts rename to server/src/core/@generated/company/update-one-company.args.ts diff --git a/server/src/api/@generated/company/upsert-one-company.args.ts b/server/src/core/@generated/company/upsert-one-company.args.ts similarity index 100% rename from server/src/api/@generated/company/upsert-one-company.args.ts rename to server/src/core/@generated/company/upsert-one-company.args.ts diff --git a/server/src/api/@generated/person/aggregate-person.output.ts b/server/src/core/@generated/person/aggregate-person.output.ts similarity index 100% rename from server/src/api/@generated/person/aggregate-person.output.ts rename to server/src/core/@generated/person/aggregate-person.output.ts diff --git a/server/src/api/@generated/person/create-many-person.args.ts b/server/src/core/@generated/person/create-many-person.args.ts similarity index 100% rename from server/src/api/@generated/person/create-many-person.args.ts rename to server/src/core/@generated/person/create-many-person.args.ts diff --git a/server/src/api/@generated/person/create-one-person.args.ts b/server/src/core/@generated/person/create-one-person.args.ts similarity index 100% rename from server/src/api/@generated/person/create-one-person.args.ts rename to server/src/core/@generated/person/create-one-person.args.ts diff --git a/server/src/api/@generated/person/delete-many-person.args.ts b/server/src/core/@generated/person/delete-many-person.args.ts similarity index 100% rename from server/src/api/@generated/person/delete-many-person.args.ts rename to server/src/core/@generated/person/delete-many-person.args.ts diff --git a/server/src/api/@generated/person/delete-one-person.args.ts b/server/src/core/@generated/person/delete-one-person.args.ts similarity index 100% rename from server/src/api/@generated/person/delete-one-person.args.ts rename to server/src/core/@generated/person/delete-one-person.args.ts diff --git a/server/src/api/@generated/person/find-first-person-or-throw.args.ts b/server/src/core/@generated/person/find-first-person-or-throw.args.ts similarity index 100% rename from server/src/api/@generated/person/find-first-person-or-throw.args.ts rename to server/src/core/@generated/person/find-first-person-or-throw.args.ts diff --git a/server/src/api/@generated/person/find-first-person.args.ts b/server/src/core/@generated/person/find-first-person.args.ts similarity index 100% rename from server/src/api/@generated/person/find-first-person.args.ts rename to server/src/core/@generated/person/find-first-person.args.ts diff --git a/server/src/api/@generated/person/find-many-person.args.ts b/server/src/core/@generated/person/find-many-person.args.ts similarity index 100% rename from server/src/api/@generated/person/find-many-person.args.ts rename to server/src/core/@generated/person/find-many-person.args.ts diff --git a/server/src/api/@generated/person/find-unique-person-or-throw.args.ts b/server/src/core/@generated/person/find-unique-person-or-throw.args.ts similarity index 100% rename from server/src/api/@generated/person/find-unique-person-or-throw.args.ts rename to server/src/core/@generated/person/find-unique-person-or-throw.args.ts diff --git a/server/src/api/@generated/person/find-unique-person.args.ts b/server/src/core/@generated/person/find-unique-person.args.ts similarity index 100% rename from server/src/api/@generated/person/find-unique-person.args.ts rename to server/src/core/@generated/person/find-unique-person.args.ts diff --git a/server/src/api/@generated/person/person-aggregate.args.ts b/server/src/core/@generated/person/person-aggregate.args.ts similarity index 100% rename from server/src/api/@generated/person/person-aggregate.args.ts rename to server/src/core/@generated/person/person-aggregate.args.ts diff --git a/server/src/api/@generated/person/person-count-aggregate.input.ts b/server/src/core/@generated/person/person-count-aggregate.input.ts similarity index 100% rename from server/src/api/@generated/person/person-count-aggregate.input.ts rename to server/src/core/@generated/person/person-count-aggregate.input.ts diff --git a/server/src/api/@generated/person/person-count-aggregate.output.ts b/server/src/core/@generated/person/person-count-aggregate.output.ts similarity index 100% rename from server/src/api/@generated/person/person-count-aggregate.output.ts rename to server/src/core/@generated/person/person-count-aggregate.output.ts diff --git a/server/src/api/@generated/person/person-count-order-by-aggregate.input.ts b/server/src/core/@generated/person/person-count-order-by-aggregate.input.ts similarity index 100% rename from server/src/api/@generated/person/person-count-order-by-aggregate.input.ts rename to server/src/core/@generated/person/person-count-order-by-aggregate.input.ts diff --git a/server/src/api/@generated/person/person-create-many-company-input-envelope.input.ts b/server/src/core/@generated/person/person-create-many-company-input-envelope.input.ts similarity index 100% rename from server/src/api/@generated/person/person-create-many-company-input-envelope.input.ts rename to server/src/core/@generated/person/person-create-many-company-input-envelope.input.ts diff --git a/server/src/api/@generated/person/person-create-many-company.input.ts b/server/src/core/@generated/person/person-create-many-company.input.ts similarity index 100% rename from server/src/api/@generated/person/person-create-many-company.input.ts rename to server/src/core/@generated/person/person-create-many-company.input.ts diff --git a/server/src/api/@generated/person/person-create-many-workspace-input-envelope.input.ts b/server/src/core/@generated/person/person-create-many-workspace-input-envelope.input.ts similarity index 100% rename from server/src/api/@generated/person/person-create-many-workspace-input-envelope.input.ts rename to server/src/core/@generated/person/person-create-many-workspace-input-envelope.input.ts diff --git a/server/src/api/@generated/person/person-create-many-workspace.input.ts b/server/src/core/@generated/person/person-create-many-workspace.input.ts similarity index 100% rename from server/src/api/@generated/person/person-create-many-workspace.input.ts rename to server/src/core/@generated/person/person-create-many-workspace.input.ts diff --git a/server/src/api/@generated/person/person-create-many.input.ts b/server/src/core/@generated/person/person-create-many.input.ts similarity index 100% rename from server/src/api/@generated/person/person-create-many.input.ts rename to server/src/core/@generated/person/person-create-many.input.ts diff --git a/server/src/api/@generated/person/person-create-nested-many-without-company.input.ts b/server/src/core/@generated/person/person-create-nested-many-without-company.input.ts similarity index 100% rename from server/src/api/@generated/person/person-create-nested-many-without-company.input.ts rename to server/src/core/@generated/person/person-create-nested-many-without-company.input.ts diff --git a/server/src/api/@generated/person/person-create-nested-many-without-workspace.input.ts b/server/src/core/@generated/person/person-create-nested-many-without-workspace.input.ts similarity index 100% rename from server/src/api/@generated/person/person-create-nested-many-without-workspace.input.ts rename to server/src/core/@generated/person/person-create-nested-many-without-workspace.input.ts diff --git a/server/src/api/@generated/person/person-create-or-connect-without-company.input.ts b/server/src/core/@generated/person/person-create-or-connect-without-company.input.ts similarity index 100% rename from server/src/api/@generated/person/person-create-or-connect-without-company.input.ts rename to server/src/core/@generated/person/person-create-or-connect-without-company.input.ts diff --git a/server/src/api/@generated/person/person-create-or-connect-without-workspace.input.ts b/server/src/core/@generated/person/person-create-or-connect-without-workspace.input.ts similarity index 100% rename from server/src/api/@generated/person/person-create-or-connect-without-workspace.input.ts rename to server/src/core/@generated/person/person-create-or-connect-without-workspace.input.ts diff --git a/server/src/api/@generated/person/person-create-without-company.input.ts b/server/src/core/@generated/person/person-create-without-company.input.ts similarity index 100% rename from server/src/api/@generated/person/person-create-without-company.input.ts rename to server/src/core/@generated/person/person-create-without-company.input.ts diff --git a/server/src/api/@generated/person/person-create-without-workspace.input.ts b/server/src/core/@generated/person/person-create-without-workspace.input.ts similarity index 100% rename from server/src/api/@generated/person/person-create-without-workspace.input.ts rename to server/src/core/@generated/person/person-create-without-workspace.input.ts diff --git a/server/src/api/@generated/person/person-create.input.ts b/server/src/core/@generated/person/person-create.input.ts similarity index 100% rename from server/src/api/@generated/person/person-create.input.ts rename to server/src/core/@generated/person/person-create.input.ts diff --git a/server/src/api/@generated/person/person-group-by.args.ts b/server/src/core/@generated/person/person-group-by.args.ts similarity index 100% rename from server/src/api/@generated/person/person-group-by.args.ts rename to server/src/core/@generated/person/person-group-by.args.ts diff --git a/server/src/api/@generated/person/person-group-by.output.ts b/server/src/core/@generated/person/person-group-by.output.ts similarity index 100% rename from server/src/api/@generated/person/person-group-by.output.ts rename to server/src/core/@generated/person/person-group-by.output.ts diff --git a/server/src/api/@generated/person/person-list-relation-filter.input.ts b/server/src/core/@generated/person/person-list-relation-filter.input.ts similarity index 100% rename from server/src/api/@generated/person/person-list-relation-filter.input.ts rename to server/src/core/@generated/person/person-list-relation-filter.input.ts diff --git a/server/src/api/@generated/person/person-max-aggregate.input.ts b/server/src/core/@generated/person/person-max-aggregate.input.ts similarity index 100% rename from server/src/api/@generated/person/person-max-aggregate.input.ts rename to server/src/core/@generated/person/person-max-aggregate.input.ts diff --git a/server/src/api/@generated/person/person-max-aggregate.output.ts b/server/src/core/@generated/person/person-max-aggregate.output.ts similarity index 100% rename from server/src/api/@generated/person/person-max-aggregate.output.ts rename to server/src/core/@generated/person/person-max-aggregate.output.ts diff --git a/server/src/api/@generated/person/person-max-order-by-aggregate.input.ts b/server/src/core/@generated/person/person-max-order-by-aggregate.input.ts similarity index 100% rename from server/src/api/@generated/person/person-max-order-by-aggregate.input.ts rename to server/src/core/@generated/person/person-max-order-by-aggregate.input.ts diff --git a/server/src/api/@generated/person/person-min-aggregate.input.ts b/server/src/core/@generated/person/person-min-aggregate.input.ts similarity index 100% rename from server/src/api/@generated/person/person-min-aggregate.input.ts rename to server/src/core/@generated/person/person-min-aggregate.input.ts diff --git a/server/src/api/@generated/person/person-min-aggregate.output.ts b/server/src/core/@generated/person/person-min-aggregate.output.ts similarity index 100% rename from server/src/api/@generated/person/person-min-aggregate.output.ts rename to server/src/core/@generated/person/person-min-aggregate.output.ts diff --git a/server/src/api/@generated/person/person-min-order-by-aggregate.input.ts b/server/src/core/@generated/person/person-min-order-by-aggregate.input.ts similarity index 100% rename from server/src/api/@generated/person/person-min-order-by-aggregate.input.ts rename to server/src/core/@generated/person/person-min-order-by-aggregate.input.ts diff --git a/server/src/api/@generated/person/person-order-by-relation-aggregate.input.ts b/server/src/core/@generated/person/person-order-by-relation-aggregate.input.ts similarity index 100% rename from server/src/api/@generated/person/person-order-by-relation-aggregate.input.ts rename to server/src/core/@generated/person/person-order-by-relation-aggregate.input.ts diff --git a/server/src/api/@generated/person/person-order-by-with-aggregation.input.ts b/server/src/core/@generated/person/person-order-by-with-aggregation.input.ts similarity index 100% rename from server/src/api/@generated/person/person-order-by-with-aggregation.input.ts rename to server/src/core/@generated/person/person-order-by-with-aggregation.input.ts diff --git a/server/src/api/@generated/person/person-order-by-with-relation.input.ts b/server/src/core/@generated/person/person-order-by-with-relation.input.ts similarity index 100% rename from server/src/api/@generated/person/person-order-by-with-relation.input.ts rename to server/src/core/@generated/person/person-order-by-with-relation.input.ts diff --git a/server/src/api/@generated/person/person-scalar-field.enum.ts b/server/src/core/@generated/person/person-scalar-field.enum.ts similarity index 100% rename from server/src/api/@generated/person/person-scalar-field.enum.ts rename to server/src/core/@generated/person/person-scalar-field.enum.ts diff --git a/server/src/api/@generated/person/person-scalar-where-with-aggregates.input.ts b/server/src/core/@generated/person/person-scalar-where-with-aggregates.input.ts similarity index 100% rename from server/src/api/@generated/person/person-scalar-where-with-aggregates.input.ts rename to server/src/core/@generated/person/person-scalar-where-with-aggregates.input.ts diff --git a/server/src/api/@generated/person/person-scalar-where.input.ts b/server/src/core/@generated/person/person-scalar-where.input.ts similarity index 100% rename from server/src/api/@generated/person/person-scalar-where.input.ts rename to server/src/core/@generated/person/person-scalar-where.input.ts diff --git a/server/src/api/@generated/person/person-unchecked-create-nested-many-without-company.input.ts b/server/src/core/@generated/person/person-unchecked-create-nested-many-without-company.input.ts similarity index 100% rename from server/src/api/@generated/person/person-unchecked-create-nested-many-without-company.input.ts rename to server/src/core/@generated/person/person-unchecked-create-nested-many-without-company.input.ts diff --git a/server/src/api/@generated/person/person-unchecked-create-nested-many-without-workspace.input.ts b/server/src/core/@generated/person/person-unchecked-create-nested-many-without-workspace.input.ts similarity index 100% rename from server/src/api/@generated/person/person-unchecked-create-nested-many-without-workspace.input.ts rename to server/src/core/@generated/person/person-unchecked-create-nested-many-without-workspace.input.ts diff --git a/server/src/api/@generated/person/person-unchecked-create-without-company.input.ts b/server/src/core/@generated/person/person-unchecked-create-without-company.input.ts similarity index 100% rename from server/src/api/@generated/person/person-unchecked-create-without-company.input.ts rename to server/src/core/@generated/person/person-unchecked-create-without-company.input.ts diff --git a/server/src/api/@generated/person/person-unchecked-create-without-workspace.input.ts b/server/src/core/@generated/person/person-unchecked-create-without-workspace.input.ts similarity index 100% rename from server/src/api/@generated/person/person-unchecked-create-without-workspace.input.ts rename to server/src/core/@generated/person/person-unchecked-create-without-workspace.input.ts diff --git a/server/src/api/@generated/person/person-unchecked-create.input.ts b/server/src/core/@generated/person/person-unchecked-create.input.ts similarity index 100% rename from server/src/api/@generated/person/person-unchecked-create.input.ts rename to server/src/core/@generated/person/person-unchecked-create.input.ts diff --git a/server/src/api/@generated/person/person-unchecked-update-many-without-company-nested.input.ts b/server/src/core/@generated/person/person-unchecked-update-many-without-company-nested.input.ts similarity index 100% rename from server/src/api/@generated/person/person-unchecked-update-many-without-company-nested.input.ts rename to server/src/core/@generated/person/person-unchecked-update-many-without-company-nested.input.ts diff --git a/server/src/api/@generated/person/person-unchecked-update-many-without-people.input.ts b/server/src/core/@generated/person/person-unchecked-update-many-without-people.input.ts similarity index 100% rename from server/src/api/@generated/person/person-unchecked-update-many-without-people.input.ts rename to server/src/core/@generated/person/person-unchecked-update-many-without-people.input.ts diff --git a/server/src/api/@generated/person/person-unchecked-update-many-without-workspace-nested.input.ts b/server/src/core/@generated/person/person-unchecked-update-many-without-workspace-nested.input.ts similarity index 100% rename from server/src/api/@generated/person/person-unchecked-update-many-without-workspace-nested.input.ts rename to server/src/core/@generated/person/person-unchecked-update-many-without-workspace-nested.input.ts diff --git a/server/src/api/@generated/person/person-unchecked-update-many.input.ts b/server/src/core/@generated/person/person-unchecked-update-many.input.ts similarity index 100% rename from server/src/api/@generated/person/person-unchecked-update-many.input.ts rename to server/src/core/@generated/person/person-unchecked-update-many.input.ts diff --git a/server/src/api/@generated/person/person-unchecked-update-without-company.input.ts b/server/src/core/@generated/person/person-unchecked-update-without-company.input.ts similarity index 100% rename from server/src/api/@generated/person/person-unchecked-update-without-company.input.ts rename to server/src/core/@generated/person/person-unchecked-update-without-company.input.ts diff --git a/server/src/api/@generated/person/person-unchecked-update-without-workspace.input.ts b/server/src/core/@generated/person/person-unchecked-update-without-workspace.input.ts similarity index 100% rename from server/src/api/@generated/person/person-unchecked-update-without-workspace.input.ts rename to server/src/core/@generated/person/person-unchecked-update-without-workspace.input.ts diff --git a/server/src/api/@generated/person/person-unchecked-update.input.ts b/server/src/core/@generated/person/person-unchecked-update.input.ts similarity index 100% rename from server/src/api/@generated/person/person-unchecked-update.input.ts rename to server/src/core/@generated/person/person-unchecked-update.input.ts diff --git a/server/src/api/@generated/person/person-update-many-mutation.input.ts b/server/src/core/@generated/person/person-update-many-mutation.input.ts similarity index 100% rename from server/src/api/@generated/person/person-update-many-mutation.input.ts rename to server/src/core/@generated/person/person-update-many-mutation.input.ts diff --git a/server/src/api/@generated/person/person-update-many-with-where-without-company.input.ts b/server/src/core/@generated/person/person-update-many-with-where-without-company.input.ts similarity index 100% rename from server/src/api/@generated/person/person-update-many-with-where-without-company.input.ts rename to server/src/core/@generated/person/person-update-many-with-where-without-company.input.ts diff --git a/server/src/api/@generated/person/person-update-many-with-where-without-workspace.input.ts b/server/src/core/@generated/person/person-update-many-with-where-without-workspace.input.ts similarity index 100% rename from server/src/api/@generated/person/person-update-many-with-where-without-workspace.input.ts rename to server/src/core/@generated/person/person-update-many-with-where-without-workspace.input.ts diff --git a/server/src/api/@generated/person/person-update-many-without-company-nested.input.ts b/server/src/core/@generated/person/person-update-many-without-company-nested.input.ts similarity index 100% rename from server/src/api/@generated/person/person-update-many-without-company-nested.input.ts rename to server/src/core/@generated/person/person-update-many-without-company-nested.input.ts diff --git a/server/src/api/@generated/person/person-update-many-without-workspace-nested.input.ts b/server/src/core/@generated/person/person-update-many-without-workspace-nested.input.ts similarity index 100% rename from server/src/api/@generated/person/person-update-many-without-workspace-nested.input.ts rename to server/src/core/@generated/person/person-update-many-without-workspace-nested.input.ts diff --git a/server/src/api/@generated/person/person-update-with-where-unique-without-company.input.ts b/server/src/core/@generated/person/person-update-with-where-unique-without-company.input.ts similarity index 100% rename from server/src/api/@generated/person/person-update-with-where-unique-without-company.input.ts rename to server/src/core/@generated/person/person-update-with-where-unique-without-company.input.ts diff --git a/server/src/api/@generated/person/person-update-with-where-unique-without-workspace.input.ts b/server/src/core/@generated/person/person-update-with-where-unique-without-workspace.input.ts similarity index 100% rename from server/src/api/@generated/person/person-update-with-where-unique-without-workspace.input.ts rename to server/src/core/@generated/person/person-update-with-where-unique-without-workspace.input.ts diff --git a/server/src/api/@generated/person/person-update-without-company.input.ts b/server/src/core/@generated/person/person-update-without-company.input.ts similarity index 100% rename from server/src/api/@generated/person/person-update-without-company.input.ts rename to server/src/core/@generated/person/person-update-without-company.input.ts diff --git a/server/src/api/@generated/person/person-update-without-workspace.input.ts b/server/src/core/@generated/person/person-update-without-workspace.input.ts similarity index 100% rename from server/src/api/@generated/person/person-update-without-workspace.input.ts rename to server/src/core/@generated/person/person-update-without-workspace.input.ts diff --git a/server/src/api/@generated/person/person-update.input.ts b/server/src/core/@generated/person/person-update.input.ts similarity index 100% rename from server/src/api/@generated/person/person-update.input.ts rename to server/src/core/@generated/person/person-update.input.ts diff --git a/server/src/api/@generated/person/person-upsert-with-where-unique-without-company.input.ts b/server/src/core/@generated/person/person-upsert-with-where-unique-without-company.input.ts similarity index 100% rename from server/src/api/@generated/person/person-upsert-with-where-unique-without-company.input.ts rename to server/src/core/@generated/person/person-upsert-with-where-unique-without-company.input.ts diff --git a/server/src/api/@generated/person/person-upsert-with-where-unique-without-workspace.input.ts b/server/src/core/@generated/person/person-upsert-with-where-unique-without-workspace.input.ts similarity index 100% rename from server/src/api/@generated/person/person-upsert-with-where-unique-without-workspace.input.ts rename to server/src/core/@generated/person/person-upsert-with-where-unique-without-workspace.input.ts diff --git a/server/src/api/@generated/person/person-where-unique.input.ts b/server/src/core/@generated/person/person-where-unique.input.ts similarity index 100% rename from server/src/api/@generated/person/person-where-unique.input.ts rename to server/src/core/@generated/person/person-where-unique.input.ts diff --git a/server/src/api/@generated/person/person-where.input.ts b/server/src/core/@generated/person/person-where.input.ts similarity index 100% rename from server/src/api/@generated/person/person-where.input.ts rename to server/src/core/@generated/person/person-where.input.ts diff --git a/server/src/api/@generated/person/person.model.ts b/server/src/core/@generated/person/person.model.ts similarity index 100% rename from server/src/api/@generated/person/person.model.ts rename to server/src/core/@generated/person/person.model.ts diff --git a/server/src/api/@generated/person/update-many-person.args.ts b/server/src/core/@generated/person/update-many-person.args.ts similarity index 100% rename from server/src/api/@generated/person/update-many-person.args.ts rename to server/src/core/@generated/person/update-many-person.args.ts diff --git a/server/src/api/@generated/person/update-one-person.args.ts b/server/src/core/@generated/person/update-one-person.args.ts similarity index 100% rename from server/src/api/@generated/person/update-one-person.args.ts rename to server/src/core/@generated/person/update-one-person.args.ts diff --git a/server/src/api/@generated/person/upsert-one-person.args.ts b/server/src/core/@generated/person/upsert-one-person.args.ts similarity index 100% rename from server/src/api/@generated/person/upsert-one-person.args.ts rename to server/src/core/@generated/person/upsert-one-person.args.ts diff --git a/server/src/api/@generated/pipeline-progress/aggregate-pipeline-progress.output.ts b/server/src/core/@generated/pipeline-progress/aggregate-pipeline-progress.output.ts similarity index 100% rename from server/src/api/@generated/pipeline-progress/aggregate-pipeline-progress.output.ts rename to server/src/core/@generated/pipeline-progress/aggregate-pipeline-progress.output.ts diff --git a/server/src/api/@generated/pipeline-progress/create-many-pipeline-progress.args.ts b/server/src/core/@generated/pipeline-progress/create-many-pipeline-progress.args.ts similarity index 100% rename from server/src/api/@generated/pipeline-progress/create-many-pipeline-progress.args.ts rename to server/src/core/@generated/pipeline-progress/create-many-pipeline-progress.args.ts diff --git a/server/src/api/@generated/pipeline-progress/create-one-pipeline-progress.args.ts b/server/src/core/@generated/pipeline-progress/create-one-pipeline-progress.args.ts similarity index 100% rename from server/src/api/@generated/pipeline-progress/create-one-pipeline-progress.args.ts rename to server/src/core/@generated/pipeline-progress/create-one-pipeline-progress.args.ts diff --git a/server/src/api/@generated/pipeline-progress/delete-many-pipeline-progress.args.ts b/server/src/core/@generated/pipeline-progress/delete-many-pipeline-progress.args.ts similarity index 100% rename from server/src/api/@generated/pipeline-progress/delete-many-pipeline-progress.args.ts rename to server/src/core/@generated/pipeline-progress/delete-many-pipeline-progress.args.ts diff --git a/server/src/api/@generated/pipeline-progress/delete-one-pipeline-progress.args.ts b/server/src/core/@generated/pipeline-progress/delete-one-pipeline-progress.args.ts similarity index 100% rename from server/src/api/@generated/pipeline-progress/delete-one-pipeline-progress.args.ts rename to server/src/core/@generated/pipeline-progress/delete-one-pipeline-progress.args.ts diff --git a/server/src/api/@generated/pipeline-progress/find-first-pipeline-progress-or-throw.args.ts b/server/src/core/@generated/pipeline-progress/find-first-pipeline-progress-or-throw.args.ts similarity index 100% rename from server/src/api/@generated/pipeline-progress/find-first-pipeline-progress-or-throw.args.ts rename to server/src/core/@generated/pipeline-progress/find-first-pipeline-progress-or-throw.args.ts diff --git a/server/src/api/@generated/pipeline-progress/find-first-pipeline-progress.args.ts b/server/src/core/@generated/pipeline-progress/find-first-pipeline-progress.args.ts similarity index 100% rename from server/src/api/@generated/pipeline-progress/find-first-pipeline-progress.args.ts rename to server/src/core/@generated/pipeline-progress/find-first-pipeline-progress.args.ts diff --git a/server/src/api/@generated/pipeline-progress/find-many-pipeline-progress.args.ts b/server/src/core/@generated/pipeline-progress/find-many-pipeline-progress.args.ts similarity index 100% rename from server/src/api/@generated/pipeline-progress/find-many-pipeline-progress.args.ts rename to server/src/core/@generated/pipeline-progress/find-many-pipeline-progress.args.ts diff --git a/server/src/api/@generated/pipeline-progress/find-unique-pipeline-progress-or-throw.args.ts b/server/src/core/@generated/pipeline-progress/find-unique-pipeline-progress-or-throw.args.ts similarity index 100% rename from server/src/api/@generated/pipeline-progress/find-unique-pipeline-progress-or-throw.args.ts rename to server/src/core/@generated/pipeline-progress/find-unique-pipeline-progress-or-throw.args.ts diff --git a/server/src/api/@generated/pipeline-progress/find-unique-pipeline-progress.args.ts b/server/src/core/@generated/pipeline-progress/find-unique-pipeline-progress.args.ts similarity index 100% rename from server/src/api/@generated/pipeline-progress/find-unique-pipeline-progress.args.ts rename to server/src/core/@generated/pipeline-progress/find-unique-pipeline-progress.args.ts diff --git a/server/src/api/@generated/pipeline-progress/pipeline-progress-count-aggregate.input.ts b/server/src/core/@generated/pipeline-progress/pipeline-progress-count-aggregate.input.ts similarity index 100% rename from server/src/api/@generated/pipeline-progress/pipeline-progress-count-aggregate.input.ts rename to server/src/core/@generated/pipeline-progress/pipeline-progress-count-aggregate.input.ts diff --git a/server/src/api/@generated/pipeline-progress/pipeline-progress-count-aggregate.output.ts b/server/src/core/@generated/pipeline-progress/pipeline-progress-count-aggregate.output.ts similarity index 100% rename from server/src/api/@generated/pipeline-progress/pipeline-progress-count-aggregate.output.ts rename to server/src/core/@generated/pipeline-progress/pipeline-progress-count-aggregate.output.ts diff --git a/server/src/api/@generated/pipeline-progress/pipeline-progress-count-order-by-aggregate.input.ts b/server/src/core/@generated/pipeline-progress/pipeline-progress-count-order-by-aggregate.input.ts similarity index 100% rename from server/src/api/@generated/pipeline-progress/pipeline-progress-count-order-by-aggregate.input.ts rename to server/src/core/@generated/pipeline-progress/pipeline-progress-count-order-by-aggregate.input.ts diff --git a/server/src/api/@generated/pipeline-progress/pipeline-progress-create-many-pipeline-input-envelope.input.ts b/server/src/core/@generated/pipeline-progress/pipeline-progress-create-many-pipeline-input-envelope.input.ts similarity index 100% rename from server/src/api/@generated/pipeline-progress/pipeline-progress-create-many-pipeline-input-envelope.input.ts rename to server/src/core/@generated/pipeline-progress/pipeline-progress-create-many-pipeline-input-envelope.input.ts diff --git a/server/src/api/@generated/pipeline-progress/pipeline-progress-create-many-pipeline-stage-input-envelope.input.ts b/server/src/core/@generated/pipeline-progress/pipeline-progress-create-many-pipeline-stage-input-envelope.input.ts similarity index 100% rename from server/src/api/@generated/pipeline-progress/pipeline-progress-create-many-pipeline-stage-input-envelope.input.ts rename to server/src/core/@generated/pipeline-progress/pipeline-progress-create-many-pipeline-stage-input-envelope.input.ts diff --git a/server/src/api/@generated/pipeline-progress/pipeline-progress-create-many-pipeline-stage.input.ts b/server/src/core/@generated/pipeline-progress/pipeline-progress-create-many-pipeline-stage.input.ts similarity index 100% rename from server/src/api/@generated/pipeline-progress/pipeline-progress-create-many-pipeline-stage.input.ts rename to server/src/core/@generated/pipeline-progress/pipeline-progress-create-many-pipeline-stage.input.ts diff --git a/server/src/api/@generated/pipeline-progress/pipeline-progress-create-many-pipeline.input.ts b/server/src/core/@generated/pipeline-progress/pipeline-progress-create-many-pipeline.input.ts similarity index 100% rename from server/src/api/@generated/pipeline-progress/pipeline-progress-create-many-pipeline.input.ts rename to server/src/core/@generated/pipeline-progress/pipeline-progress-create-many-pipeline.input.ts diff --git a/server/src/api/@generated/pipeline-progress/pipeline-progress-create-many-workspace-input-envelope.input.ts b/server/src/core/@generated/pipeline-progress/pipeline-progress-create-many-workspace-input-envelope.input.ts similarity index 100% rename from server/src/api/@generated/pipeline-progress/pipeline-progress-create-many-workspace-input-envelope.input.ts rename to server/src/core/@generated/pipeline-progress/pipeline-progress-create-many-workspace-input-envelope.input.ts diff --git a/server/src/api/@generated/pipeline-progress/pipeline-progress-create-many-workspace.input.ts b/server/src/core/@generated/pipeline-progress/pipeline-progress-create-many-workspace.input.ts similarity index 100% rename from server/src/api/@generated/pipeline-progress/pipeline-progress-create-many-workspace.input.ts rename to server/src/core/@generated/pipeline-progress/pipeline-progress-create-many-workspace.input.ts diff --git a/server/src/api/@generated/pipeline-progress/pipeline-progress-create-many.input.ts b/server/src/core/@generated/pipeline-progress/pipeline-progress-create-many.input.ts similarity index 100% rename from server/src/api/@generated/pipeline-progress/pipeline-progress-create-many.input.ts rename to server/src/core/@generated/pipeline-progress/pipeline-progress-create-many.input.ts diff --git a/server/src/api/@generated/pipeline-progress/pipeline-progress-create-nested-many-without-pipeline-stage.input.ts b/server/src/core/@generated/pipeline-progress/pipeline-progress-create-nested-many-without-pipeline-stage.input.ts similarity index 100% rename from server/src/api/@generated/pipeline-progress/pipeline-progress-create-nested-many-without-pipeline-stage.input.ts rename to server/src/core/@generated/pipeline-progress/pipeline-progress-create-nested-many-without-pipeline-stage.input.ts diff --git a/server/src/api/@generated/pipeline-progress/pipeline-progress-create-nested-many-without-pipeline.input.ts b/server/src/core/@generated/pipeline-progress/pipeline-progress-create-nested-many-without-pipeline.input.ts similarity index 100% rename from server/src/api/@generated/pipeline-progress/pipeline-progress-create-nested-many-without-pipeline.input.ts rename to server/src/core/@generated/pipeline-progress/pipeline-progress-create-nested-many-without-pipeline.input.ts diff --git a/server/src/api/@generated/pipeline-progress/pipeline-progress-create-nested-many-without-workspace.input.ts b/server/src/core/@generated/pipeline-progress/pipeline-progress-create-nested-many-without-workspace.input.ts similarity index 100% rename from server/src/api/@generated/pipeline-progress/pipeline-progress-create-nested-many-without-workspace.input.ts rename to server/src/core/@generated/pipeline-progress/pipeline-progress-create-nested-many-without-workspace.input.ts diff --git a/server/src/api/@generated/pipeline-progress/pipeline-progress-create-or-connect-without-pipeline-stage.input.ts b/server/src/core/@generated/pipeline-progress/pipeline-progress-create-or-connect-without-pipeline-stage.input.ts similarity index 100% rename from server/src/api/@generated/pipeline-progress/pipeline-progress-create-or-connect-without-pipeline-stage.input.ts rename to server/src/core/@generated/pipeline-progress/pipeline-progress-create-or-connect-without-pipeline-stage.input.ts diff --git a/server/src/api/@generated/pipeline-progress/pipeline-progress-create-or-connect-without-pipeline.input.ts b/server/src/core/@generated/pipeline-progress/pipeline-progress-create-or-connect-without-pipeline.input.ts similarity index 100% rename from server/src/api/@generated/pipeline-progress/pipeline-progress-create-or-connect-without-pipeline.input.ts rename to server/src/core/@generated/pipeline-progress/pipeline-progress-create-or-connect-without-pipeline.input.ts diff --git a/server/src/api/@generated/pipeline-progress/pipeline-progress-create-or-connect-without-workspace.input.ts b/server/src/core/@generated/pipeline-progress/pipeline-progress-create-or-connect-without-workspace.input.ts similarity index 100% rename from server/src/api/@generated/pipeline-progress/pipeline-progress-create-or-connect-without-workspace.input.ts rename to server/src/core/@generated/pipeline-progress/pipeline-progress-create-or-connect-without-workspace.input.ts diff --git a/server/src/api/@generated/pipeline-progress/pipeline-progress-create-without-pipeline-stage.input.ts b/server/src/core/@generated/pipeline-progress/pipeline-progress-create-without-pipeline-stage.input.ts similarity index 100% rename from server/src/api/@generated/pipeline-progress/pipeline-progress-create-without-pipeline-stage.input.ts rename to server/src/core/@generated/pipeline-progress/pipeline-progress-create-without-pipeline-stage.input.ts diff --git a/server/src/api/@generated/pipeline-progress/pipeline-progress-create-without-pipeline.input.ts b/server/src/core/@generated/pipeline-progress/pipeline-progress-create-without-pipeline.input.ts similarity index 100% rename from server/src/api/@generated/pipeline-progress/pipeline-progress-create-without-pipeline.input.ts rename to server/src/core/@generated/pipeline-progress/pipeline-progress-create-without-pipeline.input.ts diff --git a/server/src/api/@generated/pipeline-progress/pipeline-progress-create-without-workspace.input.ts b/server/src/core/@generated/pipeline-progress/pipeline-progress-create-without-workspace.input.ts similarity index 100% rename from server/src/api/@generated/pipeline-progress/pipeline-progress-create-without-workspace.input.ts rename to server/src/core/@generated/pipeline-progress/pipeline-progress-create-without-workspace.input.ts diff --git a/server/src/api/@generated/pipeline-progress/pipeline-progress-create.input.ts b/server/src/core/@generated/pipeline-progress/pipeline-progress-create.input.ts similarity index 100% rename from server/src/api/@generated/pipeline-progress/pipeline-progress-create.input.ts rename to server/src/core/@generated/pipeline-progress/pipeline-progress-create.input.ts diff --git a/server/src/api/@generated/pipeline-progress/pipeline-progress-group-by.args.ts b/server/src/core/@generated/pipeline-progress/pipeline-progress-group-by.args.ts similarity index 100% rename from server/src/api/@generated/pipeline-progress/pipeline-progress-group-by.args.ts rename to server/src/core/@generated/pipeline-progress/pipeline-progress-group-by.args.ts diff --git a/server/src/api/@generated/pipeline-progress/pipeline-progress-group-by.output.ts b/server/src/core/@generated/pipeline-progress/pipeline-progress-group-by.output.ts similarity index 100% rename from server/src/api/@generated/pipeline-progress/pipeline-progress-group-by.output.ts rename to server/src/core/@generated/pipeline-progress/pipeline-progress-group-by.output.ts diff --git a/server/src/api/@generated/pipeline-progress/pipeline-progress-list-relation-filter.input.ts b/server/src/core/@generated/pipeline-progress/pipeline-progress-list-relation-filter.input.ts similarity index 100% rename from server/src/api/@generated/pipeline-progress/pipeline-progress-list-relation-filter.input.ts rename to server/src/core/@generated/pipeline-progress/pipeline-progress-list-relation-filter.input.ts diff --git a/server/src/api/@generated/pipeline-progress/pipeline-progress-max-aggregate.input.ts b/server/src/core/@generated/pipeline-progress/pipeline-progress-max-aggregate.input.ts similarity index 100% rename from server/src/api/@generated/pipeline-progress/pipeline-progress-max-aggregate.input.ts rename to server/src/core/@generated/pipeline-progress/pipeline-progress-max-aggregate.input.ts diff --git a/server/src/api/@generated/pipeline-progress/pipeline-progress-max-aggregate.output.ts b/server/src/core/@generated/pipeline-progress/pipeline-progress-max-aggregate.output.ts similarity index 100% rename from server/src/api/@generated/pipeline-progress/pipeline-progress-max-aggregate.output.ts rename to server/src/core/@generated/pipeline-progress/pipeline-progress-max-aggregate.output.ts diff --git a/server/src/api/@generated/pipeline-progress/pipeline-progress-max-order-by-aggregate.input.ts b/server/src/core/@generated/pipeline-progress/pipeline-progress-max-order-by-aggregate.input.ts similarity index 100% rename from server/src/api/@generated/pipeline-progress/pipeline-progress-max-order-by-aggregate.input.ts rename to server/src/core/@generated/pipeline-progress/pipeline-progress-max-order-by-aggregate.input.ts diff --git a/server/src/api/@generated/pipeline-progress/pipeline-progress-min-aggregate.input.ts b/server/src/core/@generated/pipeline-progress/pipeline-progress-min-aggregate.input.ts similarity index 100% rename from server/src/api/@generated/pipeline-progress/pipeline-progress-min-aggregate.input.ts rename to server/src/core/@generated/pipeline-progress/pipeline-progress-min-aggregate.input.ts diff --git a/server/src/api/@generated/pipeline-progress/pipeline-progress-min-aggregate.output.ts b/server/src/core/@generated/pipeline-progress/pipeline-progress-min-aggregate.output.ts similarity index 100% rename from server/src/api/@generated/pipeline-progress/pipeline-progress-min-aggregate.output.ts rename to server/src/core/@generated/pipeline-progress/pipeline-progress-min-aggregate.output.ts diff --git a/server/src/api/@generated/pipeline-progress/pipeline-progress-min-order-by-aggregate.input.ts b/server/src/core/@generated/pipeline-progress/pipeline-progress-min-order-by-aggregate.input.ts similarity index 100% rename from server/src/api/@generated/pipeline-progress/pipeline-progress-min-order-by-aggregate.input.ts rename to server/src/core/@generated/pipeline-progress/pipeline-progress-min-order-by-aggregate.input.ts diff --git a/server/src/api/@generated/pipeline-progress/pipeline-progress-order-by-relation-aggregate.input.ts b/server/src/core/@generated/pipeline-progress/pipeline-progress-order-by-relation-aggregate.input.ts similarity index 100% rename from server/src/api/@generated/pipeline-progress/pipeline-progress-order-by-relation-aggregate.input.ts rename to server/src/core/@generated/pipeline-progress/pipeline-progress-order-by-relation-aggregate.input.ts diff --git a/server/src/api/@generated/pipeline-progress/pipeline-progress-order-by-with-aggregation.input.ts b/server/src/core/@generated/pipeline-progress/pipeline-progress-order-by-with-aggregation.input.ts similarity index 100% rename from server/src/api/@generated/pipeline-progress/pipeline-progress-order-by-with-aggregation.input.ts rename to server/src/core/@generated/pipeline-progress/pipeline-progress-order-by-with-aggregation.input.ts diff --git a/server/src/api/@generated/pipeline-progress/pipeline-progress-order-by-with-relation.input.ts b/server/src/core/@generated/pipeline-progress/pipeline-progress-order-by-with-relation.input.ts similarity index 100% rename from server/src/api/@generated/pipeline-progress/pipeline-progress-order-by-with-relation.input.ts rename to server/src/core/@generated/pipeline-progress/pipeline-progress-order-by-with-relation.input.ts diff --git a/server/src/api/@generated/pipeline-progress/pipeline-progress-scalar-field.enum.ts b/server/src/core/@generated/pipeline-progress/pipeline-progress-scalar-field.enum.ts similarity index 100% rename from server/src/api/@generated/pipeline-progress/pipeline-progress-scalar-field.enum.ts rename to server/src/core/@generated/pipeline-progress/pipeline-progress-scalar-field.enum.ts diff --git a/server/src/api/@generated/pipeline-progress/pipeline-progress-scalar-where-with-aggregates.input.ts b/server/src/core/@generated/pipeline-progress/pipeline-progress-scalar-where-with-aggregates.input.ts similarity index 100% rename from server/src/api/@generated/pipeline-progress/pipeline-progress-scalar-where-with-aggregates.input.ts rename to server/src/core/@generated/pipeline-progress/pipeline-progress-scalar-where-with-aggregates.input.ts diff --git a/server/src/api/@generated/pipeline-progress/pipeline-progress-scalar-where.input.ts b/server/src/core/@generated/pipeline-progress/pipeline-progress-scalar-where.input.ts similarity index 100% rename from server/src/api/@generated/pipeline-progress/pipeline-progress-scalar-where.input.ts rename to server/src/core/@generated/pipeline-progress/pipeline-progress-scalar-where.input.ts diff --git a/server/src/api/@generated/pipeline-progress/pipeline-progress-unchecked-create-nested-many-without-pipeline-stage.input.ts b/server/src/core/@generated/pipeline-progress/pipeline-progress-unchecked-create-nested-many-without-pipeline-stage.input.ts similarity index 100% rename from server/src/api/@generated/pipeline-progress/pipeline-progress-unchecked-create-nested-many-without-pipeline-stage.input.ts rename to server/src/core/@generated/pipeline-progress/pipeline-progress-unchecked-create-nested-many-without-pipeline-stage.input.ts diff --git a/server/src/api/@generated/pipeline-progress/pipeline-progress-unchecked-create-nested-many-without-pipeline.input.ts b/server/src/core/@generated/pipeline-progress/pipeline-progress-unchecked-create-nested-many-without-pipeline.input.ts similarity index 100% rename from server/src/api/@generated/pipeline-progress/pipeline-progress-unchecked-create-nested-many-without-pipeline.input.ts rename to server/src/core/@generated/pipeline-progress/pipeline-progress-unchecked-create-nested-many-without-pipeline.input.ts diff --git a/server/src/api/@generated/pipeline-progress/pipeline-progress-unchecked-create-nested-many-without-workspace.input.ts b/server/src/core/@generated/pipeline-progress/pipeline-progress-unchecked-create-nested-many-without-workspace.input.ts similarity index 100% rename from server/src/api/@generated/pipeline-progress/pipeline-progress-unchecked-create-nested-many-without-workspace.input.ts rename to server/src/core/@generated/pipeline-progress/pipeline-progress-unchecked-create-nested-many-without-workspace.input.ts diff --git a/server/src/api/@generated/pipeline-progress/pipeline-progress-unchecked-create-without-pipeline-stage.input.ts b/server/src/core/@generated/pipeline-progress/pipeline-progress-unchecked-create-without-pipeline-stage.input.ts similarity index 100% rename from server/src/api/@generated/pipeline-progress/pipeline-progress-unchecked-create-without-pipeline-stage.input.ts rename to server/src/core/@generated/pipeline-progress/pipeline-progress-unchecked-create-without-pipeline-stage.input.ts diff --git a/server/src/api/@generated/pipeline-progress/pipeline-progress-unchecked-create-without-pipeline.input.ts b/server/src/core/@generated/pipeline-progress/pipeline-progress-unchecked-create-without-pipeline.input.ts similarity index 100% rename from server/src/api/@generated/pipeline-progress/pipeline-progress-unchecked-create-without-pipeline.input.ts rename to server/src/core/@generated/pipeline-progress/pipeline-progress-unchecked-create-without-pipeline.input.ts diff --git a/server/src/api/@generated/pipeline-progress/pipeline-progress-unchecked-create-without-workspace.input.ts b/server/src/core/@generated/pipeline-progress/pipeline-progress-unchecked-create-without-workspace.input.ts similarity index 100% rename from server/src/api/@generated/pipeline-progress/pipeline-progress-unchecked-create-without-workspace.input.ts rename to server/src/core/@generated/pipeline-progress/pipeline-progress-unchecked-create-without-workspace.input.ts diff --git a/server/src/api/@generated/pipeline-progress/pipeline-progress-unchecked-create.input.ts b/server/src/core/@generated/pipeline-progress/pipeline-progress-unchecked-create.input.ts similarity index 100% rename from server/src/api/@generated/pipeline-progress/pipeline-progress-unchecked-create.input.ts rename to server/src/core/@generated/pipeline-progress/pipeline-progress-unchecked-create.input.ts diff --git a/server/src/api/@generated/pipeline-progress/pipeline-progress-unchecked-update-many-without-pipeline-nested.input.ts b/server/src/core/@generated/pipeline-progress/pipeline-progress-unchecked-update-many-without-pipeline-nested.input.ts similarity index 100% rename from server/src/api/@generated/pipeline-progress/pipeline-progress-unchecked-update-many-without-pipeline-nested.input.ts rename to server/src/core/@generated/pipeline-progress/pipeline-progress-unchecked-update-many-without-pipeline-nested.input.ts diff --git a/server/src/api/@generated/pipeline-progress/pipeline-progress-unchecked-update-many-without-pipeline-progresses.input.ts b/server/src/core/@generated/pipeline-progress/pipeline-progress-unchecked-update-many-without-pipeline-progresses.input.ts similarity index 100% rename from server/src/api/@generated/pipeline-progress/pipeline-progress-unchecked-update-many-without-pipeline-progresses.input.ts rename to server/src/core/@generated/pipeline-progress/pipeline-progress-unchecked-update-many-without-pipeline-progresses.input.ts diff --git a/server/src/api/@generated/pipeline-progress/pipeline-progress-unchecked-update-many-without-pipeline-stage-nested.input.ts b/server/src/core/@generated/pipeline-progress/pipeline-progress-unchecked-update-many-without-pipeline-stage-nested.input.ts similarity index 100% rename from server/src/api/@generated/pipeline-progress/pipeline-progress-unchecked-update-many-without-pipeline-stage-nested.input.ts rename to server/src/core/@generated/pipeline-progress/pipeline-progress-unchecked-update-many-without-pipeline-stage-nested.input.ts diff --git a/server/src/api/@generated/pipeline-progress/pipeline-progress-unchecked-update-many-without-workspace-nested.input.ts b/server/src/core/@generated/pipeline-progress/pipeline-progress-unchecked-update-many-without-workspace-nested.input.ts similarity index 100% rename from server/src/api/@generated/pipeline-progress/pipeline-progress-unchecked-update-many-without-workspace-nested.input.ts rename to server/src/core/@generated/pipeline-progress/pipeline-progress-unchecked-update-many-without-workspace-nested.input.ts diff --git a/server/src/api/@generated/pipeline-progress/pipeline-progress-unchecked-update-many.input.ts b/server/src/core/@generated/pipeline-progress/pipeline-progress-unchecked-update-many.input.ts similarity index 100% rename from server/src/api/@generated/pipeline-progress/pipeline-progress-unchecked-update-many.input.ts rename to server/src/core/@generated/pipeline-progress/pipeline-progress-unchecked-update-many.input.ts diff --git a/server/src/api/@generated/pipeline-progress/pipeline-progress-unchecked-update-without-pipeline-stage.input.ts b/server/src/core/@generated/pipeline-progress/pipeline-progress-unchecked-update-without-pipeline-stage.input.ts similarity index 100% rename from server/src/api/@generated/pipeline-progress/pipeline-progress-unchecked-update-without-pipeline-stage.input.ts rename to server/src/core/@generated/pipeline-progress/pipeline-progress-unchecked-update-without-pipeline-stage.input.ts diff --git a/server/src/api/@generated/pipeline-progress/pipeline-progress-unchecked-update-without-pipeline.input.ts b/server/src/core/@generated/pipeline-progress/pipeline-progress-unchecked-update-without-pipeline.input.ts similarity index 100% rename from server/src/api/@generated/pipeline-progress/pipeline-progress-unchecked-update-without-pipeline.input.ts rename to server/src/core/@generated/pipeline-progress/pipeline-progress-unchecked-update-without-pipeline.input.ts diff --git a/server/src/api/@generated/pipeline-progress/pipeline-progress-unchecked-update-without-workspace.input.ts b/server/src/core/@generated/pipeline-progress/pipeline-progress-unchecked-update-without-workspace.input.ts similarity index 100% rename from server/src/api/@generated/pipeline-progress/pipeline-progress-unchecked-update-without-workspace.input.ts rename to server/src/core/@generated/pipeline-progress/pipeline-progress-unchecked-update-without-workspace.input.ts diff --git a/server/src/api/@generated/pipeline-progress/pipeline-progress-unchecked-update.input.ts b/server/src/core/@generated/pipeline-progress/pipeline-progress-unchecked-update.input.ts similarity index 100% rename from server/src/api/@generated/pipeline-progress/pipeline-progress-unchecked-update.input.ts rename to server/src/core/@generated/pipeline-progress/pipeline-progress-unchecked-update.input.ts diff --git a/server/src/api/@generated/pipeline-progress/pipeline-progress-update-many-mutation.input.ts b/server/src/core/@generated/pipeline-progress/pipeline-progress-update-many-mutation.input.ts similarity index 100% rename from server/src/api/@generated/pipeline-progress/pipeline-progress-update-many-mutation.input.ts rename to server/src/core/@generated/pipeline-progress/pipeline-progress-update-many-mutation.input.ts diff --git a/server/src/api/@generated/pipeline-progress/pipeline-progress-update-many-with-where-without-pipeline-stage.input.ts b/server/src/core/@generated/pipeline-progress/pipeline-progress-update-many-with-where-without-pipeline-stage.input.ts similarity index 100% rename from server/src/api/@generated/pipeline-progress/pipeline-progress-update-many-with-where-without-pipeline-stage.input.ts rename to server/src/core/@generated/pipeline-progress/pipeline-progress-update-many-with-where-without-pipeline-stage.input.ts diff --git a/server/src/api/@generated/pipeline-progress/pipeline-progress-update-many-with-where-without-pipeline.input.ts b/server/src/core/@generated/pipeline-progress/pipeline-progress-update-many-with-where-without-pipeline.input.ts similarity index 100% rename from server/src/api/@generated/pipeline-progress/pipeline-progress-update-many-with-where-without-pipeline.input.ts rename to server/src/core/@generated/pipeline-progress/pipeline-progress-update-many-with-where-without-pipeline.input.ts diff --git a/server/src/api/@generated/pipeline-progress/pipeline-progress-update-many-with-where-without-workspace.input.ts b/server/src/core/@generated/pipeline-progress/pipeline-progress-update-many-with-where-without-workspace.input.ts similarity index 100% rename from server/src/api/@generated/pipeline-progress/pipeline-progress-update-many-with-where-without-workspace.input.ts rename to server/src/core/@generated/pipeline-progress/pipeline-progress-update-many-with-where-without-workspace.input.ts diff --git a/server/src/api/@generated/pipeline-progress/pipeline-progress-update-many-without-pipeline-nested.input.ts b/server/src/core/@generated/pipeline-progress/pipeline-progress-update-many-without-pipeline-nested.input.ts similarity index 100% rename from server/src/api/@generated/pipeline-progress/pipeline-progress-update-many-without-pipeline-nested.input.ts rename to server/src/core/@generated/pipeline-progress/pipeline-progress-update-many-without-pipeline-nested.input.ts diff --git a/server/src/api/@generated/pipeline-progress/pipeline-progress-update-many-without-pipeline-stage-nested.input.ts b/server/src/core/@generated/pipeline-progress/pipeline-progress-update-many-without-pipeline-stage-nested.input.ts similarity index 100% rename from server/src/api/@generated/pipeline-progress/pipeline-progress-update-many-without-pipeline-stage-nested.input.ts rename to server/src/core/@generated/pipeline-progress/pipeline-progress-update-many-without-pipeline-stage-nested.input.ts diff --git a/server/src/api/@generated/pipeline-progress/pipeline-progress-update-many-without-workspace-nested.input.ts b/server/src/core/@generated/pipeline-progress/pipeline-progress-update-many-without-workspace-nested.input.ts similarity index 100% rename from server/src/api/@generated/pipeline-progress/pipeline-progress-update-many-without-workspace-nested.input.ts rename to server/src/core/@generated/pipeline-progress/pipeline-progress-update-many-without-workspace-nested.input.ts diff --git a/server/src/api/@generated/pipeline-progress/pipeline-progress-update-with-where-unique-without-pipeline-stage.input.ts b/server/src/core/@generated/pipeline-progress/pipeline-progress-update-with-where-unique-without-pipeline-stage.input.ts similarity index 100% rename from server/src/api/@generated/pipeline-progress/pipeline-progress-update-with-where-unique-without-pipeline-stage.input.ts rename to server/src/core/@generated/pipeline-progress/pipeline-progress-update-with-where-unique-without-pipeline-stage.input.ts diff --git a/server/src/api/@generated/pipeline-progress/pipeline-progress-update-with-where-unique-without-pipeline.input.ts b/server/src/core/@generated/pipeline-progress/pipeline-progress-update-with-where-unique-without-pipeline.input.ts similarity index 100% rename from server/src/api/@generated/pipeline-progress/pipeline-progress-update-with-where-unique-without-pipeline.input.ts rename to server/src/core/@generated/pipeline-progress/pipeline-progress-update-with-where-unique-without-pipeline.input.ts diff --git a/server/src/api/@generated/pipeline-progress/pipeline-progress-update-with-where-unique-without-workspace.input.ts b/server/src/core/@generated/pipeline-progress/pipeline-progress-update-with-where-unique-without-workspace.input.ts similarity index 100% rename from server/src/api/@generated/pipeline-progress/pipeline-progress-update-with-where-unique-without-workspace.input.ts rename to server/src/core/@generated/pipeline-progress/pipeline-progress-update-with-where-unique-without-workspace.input.ts diff --git a/server/src/api/@generated/pipeline-progress/pipeline-progress-update-without-pipeline-stage.input.ts b/server/src/core/@generated/pipeline-progress/pipeline-progress-update-without-pipeline-stage.input.ts similarity index 100% rename from server/src/api/@generated/pipeline-progress/pipeline-progress-update-without-pipeline-stage.input.ts rename to server/src/core/@generated/pipeline-progress/pipeline-progress-update-without-pipeline-stage.input.ts diff --git a/server/src/api/@generated/pipeline-progress/pipeline-progress-update-without-pipeline.input.ts b/server/src/core/@generated/pipeline-progress/pipeline-progress-update-without-pipeline.input.ts similarity index 100% rename from server/src/api/@generated/pipeline-progress/pipeline-progress-update-without-pipeline.input.ts rename to server/src/core/@generated/pipeline-progress/pipeline-progress-update-without-pipeline.input.ts diff --git a/server/src/api/@generated/pipeline-progress/pipeline-progress-update-without-workspace.input.ts b/server/src/core/@generated/pipeline-progress/pipeline-progress-update-without-workspace.input.ts similarity index 100% rename from server/src/api/@generated/pipeline-progress/pipeline-progress-update-without-workspace.input.ts rename to server/src/core/@generated/pipeline-progress/pipeline-progress-update-without-workspace.input.ts diff --git a/server/src/api/@generated/pipeline-progress/pipeline-progress-update.input.ts b/server/src/core/@generated/pipeline-progress/pipeline-progress-update.input.ts similarity index 100% rename from server/src/api/@generated/pipeline-progress/pipeline-progress-update.input.ts rename to server/src/core/@generated/pipeline-progress/pipeline-progress-update.input.ts diff --git a/server/src/api/@generated/pipeline-progress/pipeline-progress-upsert-with-where-unique-without-pipeline-stage.input.ts b/server/src/core/@generated/pipeline-progress/pipeline-progress-upsert-with-where-unique-without-pipeline-stage.input.ts similarity index 100% rename from server/src/api/@generated/pipeline-progress/pipeline-progress-upsert-with-where-unique-without-pipeline-stage.input.ts rename to server/src/core/@generated/pipeline-progress/pipeline-progress-upsert-with-where-unique-without-pipeline-stage.input.ts diff --git a/server/src/api/@generated/pipeline-progress/pipeline-progress-upsert-with-where-unique-without-pipeline.input.ts b/server/src/core/@generated/pipeline-progress/pipeline-progress-upsert-with-where-unique-without-pipeline.input.ts similarity index 100% rename from server/src/api/@generated/pipeline-progress/pipeline-progress-upsert-with-where-unique-without-pipeline.input.ts rename to server/src/core/@generated/pipeline-progress/pipeline-progress-upsert-with-where-unique-without-pipeline.input.ts diff --git a/server/src/api/@generated/pipeline-progress/pipeline-progress-upsert-with-where-unique-without-workspace.input.ts b/server/src/core/@generated/pipeline-progress/pipeline-progress-upsert-with-where-unique-without-workspace.input.ts similarity index 100% rename from server/src/api/@generated/pipeline-progress/pipeline-progress-upsert-with-where-unique-without-workspace.input.ts rename to server/src/core/@generated/pipeline-progress/pipeline-progress-upsert-with-where-unique-without-workspace.input.ts diff --git a/server/src/api/@generated/pipeline-progress/pipeline-progress-where-unique.input.ts b/server/src/core/@generated/pipeline-progress/pipeline-progress-where-unique.input.ts similarity index 100% rename from server/src/api/@generated/pipeline-progress/pipeline-progress-where-unique.input.ts rename to server/src/core/@generated/pipeline-progress/pipeline-progress-where-unique.input.ts diff --git a/server/src/api/@generated/pipeline-progress/pipeline-progress-where.input.ts b/server/src/core/@generated/pipeline-progress/pipeline-progress-where.input.ts similarity index 100% rename from server/src/api/@generated/pipeline-progress/pipeline-progress-where.input.ts rename to server/src/core/@generated/pipeline-progress/pipeline-progress-where.input.ts diff --git a/server/src/api/@generated/pipeline-progress/pipeline-progress.model.ts b/server/src/core/@generated/pipeline-progress/pipeline-progress.model.ts similarity index 100% rename from server/src/api/@generated/pipeline-progress/pipeline-progress.model.ts rename to server/src/core/@generated/pipeline-progress/pipeline-progress.model.ts diff --git a/server/src/api/@generated/pipeline-progress/update-many-pipeline-progress.args.ts b/server/src/core/@generated/pipeline-progress/update-many-pipeline-progress.args.ts similarity index 100% rename from server/src/api/@generated/pipeline-progress/update-many-pipeline-progress.args.ts rename to server/src/core/@generated/pipeline-progress/update-many-pipeline-progress.args.ts diff --git a/server/src/api/@generated/pipeline-progress/update-one-pipeline-progress.args.ts b/server/src/core/@generated/pipeline-progress/update-one-pipeline-progress.args.ts similarity index 100% rename from server/src/api/@generated/pipeline-progress/update-one-pipeline-progress.args.ts rename to server/src/core/@generated/pipeline-progress/update-one-pipeline-progress.args.ts diff --git a/server/src/api/@generated/pipeline-progress/upsert-one-pipeline-progress.args.ts b/server/src/core/@generated/pipeline-progress/upsert-one-pipeline-progress.args.ts similarity index 100% rename from server/src/api/@generated/pipeline-progress/upsert-one-pipeline-progress.args.ts rename to server/src/core/@generated/pipeline-progress/upsert-one-pipeline-progress.args.ts diff --git a/server/src/api/@generated/pipeline-stage/aggregate-pipeline-stage.output.ts b/server/src/core/@generated/pipeline-stage/aggregate-pipeline-stage.output.ts similarity index 100% rename from server/src/api/@generated/pipeline-stage/aggregate-pipeline-stage.output.ts rename to server/src/core/@generated/pipeline-stage/aggregate-pipeline-stage.output.ts diff --git a/server/src/api/@generated/pipeline-stage/create-many-pipeline-stage.args.ts b/server/src/core/@generated/pipeline-stage/create-many-pipeline-stage.args.ts similarity index 100% rename from server/src/api/@generated/pipeline-stage/create-many-pipeline-stage.args.ts rename to server/src/core/@generated/pipeline-stage/create-many-pipeline-stage.args.ts diff --git a/server/src/api/@generated/pipeline-stage/create-one-pipeline-stage.args.ts b/server/src/core/@generated/pipeline-stage/create-one-pipeline-stage.args.ts similarity index 100% rename from server/src/api/@generated/pipeline-stage/create-one-pipeline-stage.args.ts rename to server/src/core/@generated/pipeline-stage/create-one-pipeline-stage.args.ts diff --git a/server/src/api/@generated/pipeline-stage/delete-many-pipeline-stage.args.ts b/server/src/core/@generated/pipeline-stage/delete-many-pipeline-stage.args.ts similarity index 100% rename from server/src/api/@generated/pipeline-stage/delete-many-pipeline-stage.args.ts rename to server/src/core/@generated/pipeline-stage/delete-many-pipeline-stage.args.ts diff --git a/server/src/api/@generated/pipeline-stage/delete-one-pipeline-stage.args.ts b/server/src/core/@generated/pipeline-stage/delete-one-pipeline-stage.args.ts similarity index 100% rename from server/src/api/@generated/pipeline-stage/delete-one-pipeline-stage.args.ts rename to server/src/core/@generated/pipeline-stage/delete-one-pipeline-stage.args.ts diff --git a/server/src/api/@generated/pipeline-stage/find-first-pipeline-stage-or-throw.args.ts b/server/src/core/@generated/pipeline-stage/find-first-pipeline-stage-or-throw.args.ts similarity index 100% rename from server/src/api/@generated/pipeline-stage/find-first-pipeline-stage-or-throw.args.ts rename to server/src/core/@generated/pipeline-stage/find-first-pipeline-stage-or-throw.args.ts diff --git a/server/src/api/@generated/pipeline-stage/find-first-pipeline-stage.args.ts b/server/src/core/@generated/pipeline-stage/find-first-pipeline-stage.args.ts similarity index 100% rename from server/src/api/@generated/pipeline-stage/find-first-pipeline-stage.args.ts rename to server/src/core/@generated/pipeline-stage/find-first-pipeline-stage.args.ts diff --git a/server/src/api/@generated/pipeline-stage/find-many-pipeline-stage.args.ts b/server/src/core/@generated/pipeline-stage/find-many-pipeline-stage.args.ts similarity index 100% rename from server/src/api/@generated/pipeline-stage/find-many-pipeline-stage.args.ts rename to server/src/core/@generated/pipeline-stage/find-many-pipeline-stage.args.ts diff --git a/server/src/api/@generated/pipeline-stage/find-unique-pipeline-stage-or-throw.args.ts b/server/src/core/@generated/pipeline-stage/find-unique-pipeline-stage-or-throw.args.ts similarity index 100% rename from server/src/api/@generated/pipeline-stage/find-unique-pipeline-stage-or-throw.args.ts rename to server/src/core/@generated/pipeline-stage/find-unique-pipeline-stage-or-throw.args.ts diff --git a/server/src/api/@generated/pipeline-stage/find-unique-pipeline-stage.args.ts b/server/src/core/@generated/pipeline-stage/find-unique-pipeline-stage.args.ts similarity index 100% rename from server/src/api/@generated/pipeline-stage/find-unique-pipeline-stage.args.ts rename to server/src/core/@generated/pipeline-stage/find-unique-pipeline-stage.args.ts diff --git a/server/src/api/@generated/pipeline-stage/pipeline-stage-aggregate.args.ts b/server/src/core/@generated/pipeline-stage/pipeline-stage-aggregate.args.ts similarity index 100% rename from server/src/api/@generated/pipeline-stage/pipeline-stage-aggregate.args.ts rename to server/src/core/@generated/pipeline-stage/pipeline-stage-aggregate.args.ts diff --git a/server/src/api/@generated/pipeline-stage/pipeline-stage-count-aggregate.input.ts b/server/src/core/@generated/pipeline-stage/pipeline-stage-count-aggregate.input.ts similarity index 100% rename from server/src/api/@generated/pipeline-stage/pipeline-stage-count-aggregate.input.ts rename to server/src/core/@generated/pipeline-stage/pipeline-stage-count-aggregate.input.ts diff --git a/server/src/api/@generated/pipeline-stage/pipeline-stage-count-aggregate.output.ts b/server/src/core/@generated/pipeline-stage/pipeline-stage-count-aggregate.output.ts similarity index 100% rename from server/src/api/@generated/pipeline-stage/pipeline-stage-count-aggregate.output.ts rename to server/src/core/@generated/pipeline-stage/pipeline-stage-count-aggregate.output.ts diff --git a/server/src/api/@generated/pipeline-stage/pipeline-stage-count-order-by-aggregate.input.ts b/server/src/core/@generated/pipeline-stage/pipeline-stage-count-order-by-aggregate.input.ts similarity index 100% rename from server/src/api/@generated/pipeline-stage/pipeline-stage-count-order-by-aggregate.input.ts rename to server/src/core/@generated/pipeline-stage/pipeline-stage-count-order-by-aggregate.input.ts diff --git a/server/src/api/@generated/pipeline-stage/pipeline-stage-count.output.ts b/server/src/core/@generated/pipeline-stage/pipeline-stage-count.output.ts similarity index 100% rename from server/src/api/@generated/pipeline-stage/pipeline-stage-count.output.ts rename to server/src/core/@generated/pipeline-stage/pipeline-stage-count.output.ts diff --git a/server/src/api/@generated/pipeline-stage/pipeline-stage-create-many-pipeline-input-envelope.input.ts b/server/src/core/@generated/pipeline-stage/pipeline-stage-create-many-pipeline-input-envelope.input.ts similarity index 100% rename from server/src/api/@generated/pipeline-stage/pipeline-stage-create-many-pipeline-input-envelope.input.ts rename to server/src/core/@generated/pipeline-stage/pipeline-stage-create-many-pipeline-input-envelope.input.ts diff --git a/server/src/api/@generated/pipeline-stage/pipeline-stage-create-many-pipeline.input.ts b/server/src/core/@generated/pipeline-stage/pipeline-stage-create-many-pipeline.input.ts similarity index 100% rename from server/src/api/@generated/pipeline-stage/pipeline-stage-create-many-pipeline.input.ts rename to server/src/core/@generated/pipeline-stage/pipeline-stage-create-many-pipeline.input.ts diff --git a/server/src/api/@generated/pipeline-stage/pipeline-stage-create-many-workspace-input-envelope.input.ts b/server/src/core/@generated/pipeline-stage/pipeline-stage-create-many-workspace-input-envelope.input.ts similarity index 100% rename from server/src/api/@generated/pipeline-stage/pipeline-stage-create-many-workspace-input-envelope.input.ts rename to server/src/core/@generated/pipeline-stage/pipeline-stage-create-many-workspace-input-envelope.input.ts diff --git a/server/src/api/@generated/pipeline-stage/pipeline-stage-create-many-workspace.input.ts b/server/src/core/@generated/pipeline-stage/pipeline-stage-create-many-workspace.input.ts similarity index 100% rename from server/src/api/@generated/pipeline-stage/pipeline-stage-create-many-workspace.input.ts rename to server/src/core/@generated/pipeline-stage/pipeline-stage-create-many-workspace.input.ts diff --git a/server/src/api/@generated/pipeline-stage/pipeline-stage-create-many.input.ts b/server/src/core/@generated/pipeline-stage/pipeline-stage-create-many.input.ts similarity index 100% rename from server/src/api/@generated/pipeline-stage/pipeline-stage-create-many.input.ts rename to server/src/core/@generated/pipeline-stage/pipeline-stage-create-many.input.ts diff --git a/server/src/api/@generated/pipeline-stage/pipeline-stage-create-nested-many-without-pipeline.input.ts b/server/src/core/@generated/pipeline-stage/pipeline-stage-create-nested-many-without-pipeline.input.ts similarity index 100% rename from server/src/api/@generated/pipeline-stage/pipeline-stage-create-nested-many-without-pipeline.input.ts rename to server/src/core/@generated/pipeline-stage/pipeline-stage-create-nested-many-without-pipeline.input.ts diff --git a/server/src/api/@generated/pipeline-stage/pipeline-stage-create-nested-many-without-workspace.input.ts b/server/src/core/@generated/pipeline-stage/pipeline-stage-create-nested-many-without-workspace.input.ts similarity index 100% rename from server/src/api/@generated/pipeline-stage/pipeline-stage-create-nested-many-without-workspace.input.ts rename to server/src/core/@generated/pipeline-stage/pipeline-stage-create-nested-many-without-workspace.input.ts diff --git a/server/src/api/@generated/pipeline-stage/pipeline-stage-create-nested-one-without-pipeline-progresses.input.ts b/server/src/core/@generated/pipeline-stage/pipeline-stage-create-nested-one-without-pipeline-progresses.input.ts similarity index 100% rename from server/src/api/@generated/pipeline-stage/pipeline-stage-create-nested-one-without-pipeline-progresses.input.ts rename to server/src/core/@generated/pipeline-stage/pipeline-stage-create-nested-one-without-pipeline-progresses.input.ts diff --git a/server/src/api/@generated/pipeline-stage/pipeline-stage-create-or-connect-without-pipeline-progresses.input.ts b/server/src/core/@generated/pipeline-stage/pipeline-stage-create-or-connect-without-pipeline-progresses.input.ts similarity index 100% rename from server/src/api/@generated/pipeline-stage/pipeline-stage-create-or-connect-without-pipeline-progresses.input.ts rename to server/src/core/@generated/pipeline-stage/pipeline-stage-create-or-connect-without-pipeline-progresses.input.ts diff --git a/server/src/api/@generated/pipeline-stage/pipeline-stage-create-or-connect-without-pipeline.input.ts b/server/src/core/@generated/pipeline-stage/pipeline-stage-create-or-connect-without-pipeline.input.ts similarity index 100% rename from server/src/api/@generated/pipeline-stage/pipeline-stage-create-or-connect-without-pipeline.input.ts rename to server/src/core/@generated/pipeline-stage/pipeline-stage-create-or-connect-without-pipeline.input.ts diff --git a/server/src/api/@generated/pipeline-stage/pipeline-stage-create-or-connect-without-workspace.input.ts b/server/src/core/@generated/pipeline-stage/pipeline-stage-create-or-connect-without-workspace.input.ts similarity index 100% rename from server/src/api/@generated/pipeline-stage/pipeline-stage-create-or-connect-without-workspace.input.ts rename to server/src/core/@generated/pipeline-stage/pipeline-stage-create-or-connect-without-workspace.input.ts diff --git a/server/src/api/@generated/pipeline-stage/pipeline-stage-create-without-pipeline-progresses.input.ts b/server/src/core/@generated/pipeline-stage/pipeline-stage-create-without-pipeline-progresses.input.ts similarity index 100% rename from server/src/api/@generated/pipeline-stage/pipeline-stage-create-without-pipeline-progresses.input.ts rename to server/src/core/@generated/pipeline-stage/pipeline-stage-create-without-pipeline-progresses.input.ts diff --git a/server/src/api/@generated/pipeline-stage/pipeline-stage-create-without-pipeline.input.ts b/server/src/core/@generated/pipeline-stage/pipeline-stage-create-without-pipeline.input.ts similarity index 100% rename from server/src/api/@generated/pipeline-stage/pipeline-stage-create-without-pipeline.input.ts rename to server/src/core/@generated/pipeline-stage/pipeline-stage-create-without-pipeline.input.ts diff --git a/server/src/api/@generated/pipeline-stage/pipeline-stage-create-without-workspace.input.ts b/server/src/core/@generated/pipeline-stage/pipeline-stage-create-without-workspace.input.ts similarity index 100% rename from server/src/api/@generated/pipeline-stage/pipeline-stage-create-without-workspace.input.ts rename to server/src/core/@generated/pipeline-stage/pipeline-stage-create-without-workspace.input.ts diff --git a/server/src/api/@generated/pipeline-stage/pipeline-stage-create.input.ts b/server/src/core/@generated/pipeline-stage/pipeline-stage-create.input.ts similarity index 100% rename from server/src/api/@generated/pipeline-stage/pipeline-stage-create.input.ts rename to server/src/core/@generated/pipeline-stage/pipeline-stage-create.input.ts diff --git a/server/src/api/@generated/pipeline-stage/pipeline-stage-group-by.args.ts b/server/src/core/@generated/pipeline-stage/pipeline-stage-group-by.args.ts similarity index 100% rename from server/src/api/@generated/pipeline-stage/pipeline-stage-group-by.args.ts rename to server/src/core/@generated/pipeline-stage/pipeline-stage-group-by.args.ts diff --git a/server/src/api/@generated/pipeline-stage/pipeline-stage-group-by.output.ts b/server/src/core/@generated/pipeline-stage/pipeline-stage-group-by.output.ts similarity index 100% rename from server/src/api/@generated/pipeline-stage/pipeline-stage-group-by.output.ts rename to server/src/core/@generated/pipeline-stage/pipeline-stage-group-by.output.ts diff --git a/server/src/api/@generated/pipeline-stage/pipeline-stage-list-relation-filter.input.ts b/server/src/core/@generated/pipeline-stage/pipeline-stage-list-relation-filter.input.ts similarity index 100% rename from server/src/api/@generated/pipeline-stage/pipeline-stage-list-relation-filter.input.ts rename to server/src/core/@generated/pipeline-stage/pipeline-stage-list-relation-filter.input.ts diff --git a/server/src/api/@generated/pipeline-stage/pipeline-stage-max-aggregate.input.ts b/server/src/core/@generated/pipeline-stage/pipeline-stage-max-aggregate.input.ts similarity index 100% rename from server/src/api/@generated/pipeline-stage/pipeline-stage-max-aggregate.input.ts rename to server/src/core/@generated/pipeline-stage/pipeline-stage-max-aggregate.input.ts diff --git a/server/src/api/@generated/pipeline-stage/pipeline-stage-max-aggregate.output.ts b/server/src/core/@generated/pipeline-stage/pipeline-stage-max-aggregate.output.ts similarity index 100% rename from server/src/api/@generated/pipeline-stage/pipeline-stage-max-aggregate.output.ts rename to server/src/core/@generated/pipeline-stage/pipeline-stage-max-aggregate.output.ts diff --git a/server/src/api/@generated/pipeline-stage/pipeline-stage-max-order-by-aggregate.input.ts b/server/src/core/@generated/pipeline-stage/pipeline-stage-max-order-by-aggregate.input.ts similarity index 100% rename from server/src/api/@generated/pipeline-stage/pipeline-stage-max-order-by-aggregate.input.ts rename to server/src/core/@generated/pipeline-stage/pipeline-stage-max-order-by-aggregate.input.ts diff --git a/server/src/api/@generated/pipeline-stage/pipeline-stage-min-aggregate.input.ts b/server/src/core/@generated/pipeline-stage/pipeline-stage-min-aggregate.input.ts similarity index 100% rename from server/src/api/@generated/pipeline-stage/pipeline-stage-min-aggregate.input.ts rename to server/src/core/@generated/pipeline-stage/pipeline-stage-min-aggregate.input.ts diff --git a/server/src/api/@generated/pipeline-stage/pipeline-stage-min-aggregate.output.ts b/server/src/core/@generated/pipeline-stage/pipeline-stage-min-aggregate.output.ts similarity index 100% rename from server/src/api/@generated/pipeline-stage/pipeline-stage-min-aggregate.output.ts rename to server/src/core/@generated/pipeline-stage/pipeline-stage-min-aggregate.output.ts diff --git a/server/src/api/@generated/pipeline-stage/pipeline-stage-min-order-by-aggregate.input.ts b/server/src/core/@generated/pipeline-stage/pipeline-stage-min-order-by-aggregate.input.ts similarity index 100% rename from server/src/api/@generated/pipeline-stage/pipeline-stage-min-order-by-aggregate.input.ts rename to server/src/core/@generated/pipeline-stage/pipeline-stage-min-order-by-aggregate.input.ts diff --git a/server/src/api/@generated/pipeline-stage/pipeline-stage-order-by-relation-aggregate.input.ts b/server/src/core/@generated/pipeline-stage/pipeline-stage-order-by-relation-aggregate.input.ts similarity index 100% rename from server/src/api/@generated/pipeline-stage/pipeline-stage-order-by-relation-aggregate.input.ts rename to server/src/core/@generated/pipeline-stage/pipeline-stage-order-by-relation-aggregate.input.ts diff --git a/server/src/api/@generated/pipeline-stage/pipeline-stage-order-by-with-aggregation.input.ts b/server/src/core/@generated/pipeline-stage/pipeline-stage-order-by-with-aggregation.input.ts similarity index 100% rename from server/src/api/@generated/pipeline-stage/pipeline-stage-order-by-with-aggregation.input.ts rename to server/src/core/@generated/pipeline-stage/pipeline-stage-order-by-with-aggregation.input.ts diff --git a/server/src/api/@generated/pipeline-stage/pipeline-stage-order-by-with-relation.input.ts b/server/src/core/@generated/pipeline-stage/pipeline-stage-order-by-with-relation.input.ts similarity index 100% rename from server/src/api/@generated/pipeline-stage/pipeline-stage-order-by-with-relation.input.ts rename to server/src/core/@generated/pipeline-stage/pipeline-stage-order-by-with-relation.input.ts diff --git a/server/src/api/@generated/pipeline-stage/pipeline-stage-relation-filter.input.ts b/server/src/core/@generated/pipeline-stage/pipeline-stage-relation-filter.input.ts similarity index 100% rename from server/src/api/@generated/pipeline-stage/pipeline-stage-relation-filter.input.ts rename to server/src/core/@generated/pipeline-stage/pipeline-stage-relation-filter.input.ts diff --git a/server/src/api/@generated/pipeline-stage/pipeline-stage-scalar-field.enum.ts b/server/src/core/@generated/pipeline-stage/pipeline-stage-scalar-field.enum.ts similarity index 100% rename from server/src/api/@generated/pipeline-stage/pipeline-stage-scalar-field.enum.ts rename to server/src/core/@generated/pipeline-stage/pipeline-stage-scalar-field.enum.ts diff --git a/server/src/api/@generated/pipeline-stage/pipeline-stage-scalar-where-with-aggregates.input.ts b/server/src/core/@generated/pipeline-stage/pipeline-stage-scalar-where-with-aggregates.input.ts similarity index 100% rename from server/src/api/@generated/pipeline-stage/pipeline-stage-scalar-where-with-aggregates.input.ts rename to server/src/core/@generated/pipeline-stage/pipeline-stage-scalar-where-with-aggregates.input.ts diff --git a/server/src/api/@generated/pipeline-stage/pipeline-stage-scalar-where.input.ts b/server/src/core/@generated/pipeline-stage/pipeline-stage-scalar-where.input.ts similarity index 100% rename from server/src/api/@generated/pipeline-stage/pipeline-stage-scalar-where.input.ts rename to server/src/core/@generated/pipeline-stage/pipeline-stage-scalar-where.input.ts diff --git a/server/src/api/@generated/pipeline-stage/pipeline-stage-unchecked-create-nested-many-without-pipeline.input.ts b/server/src/core/@generated/pipeline-stage/pipeline-stage-unchecked-create-nested-many-without-pipeline.input.ts similarity index 100% rename from server/src/api/@generated/pipeline-stage/pipeline-stage-unchecked-create-nested-many-without-pipeline.input.ts rename to server/src/core/@generated/pipeline-stage/pipeline-stage-unchecked-create-nested-many-without-pipeline.input.ts diff --git a/server/src/api/@generated/pipeline-stage/pipeline-stage-unchecked-create-nested-many-without-workspace.input.ts b/server/src/core/@generated/pipeline-stage/pipeline-stage-unchecked-create-nested-many-without-workspace.input.ts similarity index 100% rename from server/src/api/@generated/pipeline-stage/pipeline-stage-unchecked-create-nested-many-without-workspace.input.ts rename to server/src/core/@generated/pipeline-stage/pipeline-stage-unchecked-create-nested-many-without-workspace.input.ts diff --git a/server/src/api/@generated/pipeline-stage/pipeline-stage-unchecked-create-without-pipeline-progresses.input.ts b/server/src/core/@generated/pipeline-stage/pipeline-stage-unchecked-create-without-pipeline-progresses.input.ts similarity index 100% rename from server/src/api/@generated/pipeline-stage/pipeline-stage-unchecked-create-without-pipeline-progresses.input.ts rename to server/src/core/@generated/pipeline-stage/pipeline-stage-unchecked-create-without-pipeline-progresses.input.ts diff --git a/server/src/api/@generated/pipeline-stage/pipeline-stage-unchecked-create-without-pipeline.input.ts b/server/src/core/@generated/pipeline-stage/pipeline-stage-unchecked-create-without-pipeline.input.ts similarity index 100% rename from server/src/api/@generated/pipeline-stage/pipeline-stage-unchecked-create-without-pipeline.input.ts rename to server/src/core/@generated/pipeline-stage/pipeline-stage-unchecked-create-without-pipeline.input.ts diff --git a/server/src/api/@generated/pipeline-stage/pipeline-stage-unchecked-create-without-workspace.input.ts b/server/src/core/@generated/pipeline-stage/pipeline-stage-unchecked-create-without-workspace.input.ts similarity index 100% rename from server/src/api/@generated/pipeline-stage/pipeline-stage-unchecked-create-without-workspace.input.ts rename to server/src/core/@generated/pipeline-stage/pipeline-stage-unchecked-create-without-workspace.input.ts diff --git a/server/src/api/@generated/pipeline-stage/pipeline-stage-unchecked-create.input.ts b/server/src/core/@generated/pipeline-stage/pipeline-stage-unchecked-create.input.ts similarity index 100% rename from server/src/api/@generated/pipeline-stage/pipeline-stage-unchecked-create.input.ts rename to server/src/core/@generated/pipeline-stage/pipeline-stage-unchecked-create.input.ts diff --git a/server/src/api/@generated/pipeline-stage/pipeline-stage-unchecked-update-many-without-pipeline-nested.input.ts b/server/src/core/@generated/pipeline-stage/pipeline-stage-unchecked-update-many-without-pipeline-nested.input.ts similarity index 100% rename from server/src/api/@generated/pipeline-stage/pipeline-stage-unchecked-update-many-without-pipeline-nested.input.ts rename to server/src/core/@generated/pipeline-stage/pipeline-stage-unchecked-update-many-without-pipeline-nested.input.ts diff --git a/server/src/api/@generated/pipeline-stage/pipeline-stage-unchecked-update-many-without-pipeline-stages.input.ts b/server/src/core/@generated/pipeline-stage/pipeline-stage-unchecked-update-many-without-pipeline-stages.input.ts similarity index 100% rename from server/src/api/@generated/pipeline-stage/pipeline-stage-unchecked-update-many-without-pipeline-stages.input.ts rename to server/src/core/@generated/pipeline-stage/pipeline-stage-unchecked-update-many-without-pipeline-stages.input.ts diff --git a/server/src/api/@generated/pipeline-stage/pipeline-stage-unchecked-update-many-without-workspace-nested.input.ts b/server/src/core/@generated/pipeline-stage/pipeline-stage-unchecked-update-many-without-workspace-nested.input.ts similarity index 100% rename from server/src/api/@generated/pipeline-stage/pipeline-stage-unchecked-update-many-without-workspace-nested.input.ts rename to server/src/core/@generated/pipeline-stage/pipeline-stage-unchecked-update-many-without-workspace-nested.input.ts diff --git a/server/src/api/@generated/pipeline-stage/pipeline-stage-unchecked-update-many.input.ts b/server/src/core/@generated/pipeline-stage/pipeline-stage-unchecked-update-many.input.ts similarity index 100% rename from server/src/api/@generated/pipeline-stage/pipeline-stage-unchecked-update-many.input.ts rename to server/src/core/@generated/pipeline-stage/pipeline-stage-unchecked-update-many.input.ts diff --git a/server/src/api/@generated/pipeline-stage/pipeline-stage-unchecked-update-without-pipeline-progresses.input.ts b/server/src/core/@generated/pipeline-stage/pipeline-stage-unchecked-update-without-pipeline-progresses.input.ts similarity index 100% rename from server/src/api/@generated/pipeline-stage/pipeline-stage-unchecked-update-without-pipeline-progresses.input.ts rename to server/src/core/@generated/pipeline-stage/pipeline-stage-unchecked-update-without-pipeline-progresses.input.ts diff --git a/server/src/api/@generated/pipeline-stage/pipeline-stage-unchecked-update-without-pipeline.input.ts b/server/src/core/@generated/pipeline-stage/pipeline-stage-unchecked-update-without-pipeline.input.ts similarity index 100% rename from server/src/api/@generated/pipeline-stage/pipeline-stage-unchecked-update-without-pipeline.input.ts rename to server/src/core/@generated/pipeline-stage/pipeline-stage-unchecked-update-without-pipeline.input.ts diff --git a/server/src/api/@generated/pipeline-stage/pipeline-stage-unchecked-update-without-workspace.input.ts b/server/src/core/@generated/pipeline-stage/pipeline-stage-unchecked-update-without-workspace.input.ts similarity index 100% rename from server/src/api/@generated/pipeline-stage/pipeline-stage-unchecked-update-without-workspace.input.ts rename to server/src/core/@generated/pipeline-stage/pipeline-stage-unchecked-update-without-workspace.input.ts diff --git a/server/src/api/@generated/pipeline-stage/pipeline-stage-unchecked-update.input.ts b/server/src/core/@generated/pipeline-stage/pipeline-stage-unchecked-update.input.ts similarity index 100% rename from server/src/api/@generated/pipeline-stage/pipeline-stage-unchecked-update.input.ts rename to server/src/core/@generated/pipeline-stage/pipeline-stage-unchecked-update.input.ts diff --git a/server/src/api/@generated/pipeline-stage/pipeline-stage-update-many-mutation.input.ts b/server/src/core/@generated/pipeline-stage/pipeline-stage-update-many-mutation.input.ts similarity index 100% rename from server/src/api/@generated/pipeline-stage/pipeline-stage-update-many-mutation.input.ts rename to server/src/core/@generated/pipeline-stage/pipeline-stage-update-many-mutation.input.ts diff --git a/server/src/api/@generated/pipeline-stage/pipeline-stage-update-many-with-where-without-pipeline.input.ts b/server/src/core/@generated/pipeline-stage/pipeline-stage-update-many-with-where-without-pipeline.input.ts similarity index 100% rename from server/src/api/@generated/pipeline-stage/pipeline-stage-update-many-with-where-without-pipeline.input.ts rename to server/src/core/@generated/pipeline-stage/pipeline-stage-update-many-with-where-without-pipeline.input.ts diff --git a/server/src/api/@generated/pipeline-stage/pipeline-stage-update-many-with-where-without-workspace.input.ts b/server/src/core/@generated/pipeline-stage/pipeline-stage-update-many-with-where-without-workspace.input.ts similarity index 100% rename from server/src/api/@generated/pipeline-stage/pipeline-stage-update-many-with-where-without-workspace.input.ts rename to server/src/core/@generated/pipeline-stage/pipeline-stage-update-many-with-where-without-workspace.input.ts diff --git a/server/src/api/@generated/pipeline-stage/pipeline-stage-update-many-without-pipeline-nested.input.ts b/server/src/core/@generated/pipeline-stage/pipeline-stage-update-many-without-pipeline-nested.input.ts similarity index 100% rename from server/src/api/@generated/pipeline-stage/pipeline-stage-update-many-without-pipeline-nested.input.ts rename to server/src/core/@generated/pipeline-stage/pipeline-stage-update-many-without-pipeline-nested.input.ts diff --git a/server/src/api/@generated/pipeline-stage/pipeline-stage-update-many-without-workspace-nested.input.ts b/server/src/core/@generated/pipeline-stage/pipeline-stage-update-many-without-workspace-nested.input.ts similarity index 100% rename from server/src/api/@generated/pipeline-stage/pipeline-stage-update-many-without-workspace-nested.input.ts rename to server/src/core/@generated/pipeline-stage/pipeline-stage-update-many-without-workspace-nested.input.ts diff --git a/server/src/api/@generated/pipeline-stage/pipeline-stage-update-one-required-without-pipeline-progresses-nested.input.ts b/server/src/core/@generated/pipeline-stage/pipeline-stage-update-one-required-without-pipeline-progresses-nested.input.ts similarity index 100% rename from server/src/api/@generated/pipeline-stage/pipeline-stage-update-one-required-without-pipeline-progresses-nested.input.ts rename to server/src/core/@generated/pipeline-stage/pipeline-stage-update-one-required-without-pipeline-progresses-nested.input.ts diff --git a/server/src/api/@generated/pipeline-stage/pipeline-stage-update-with-where-unique-without-pipeline.input.ts b/server/src/core/@generated/pipeline-stage/pipeline-stage-update-with-where-unique-without-pipeline.input.ts similarity index 100% rename from server/src/api/@generated/pipeline-stage/pipeline-stage-update-with-where-unique-without-pipeline.input.ts rename to server/src/core/@generated/pipeline-stage/pipeline-stage-update-with-where-unique-without-pipeline.input.ts diff --git a/server/src/api/@generated/pipeline-stage/pipeline-stage-update-with-where-unique-without-workspace.input.ts b/server/src/core/@generated/pipeline-stage/pipeline-stage-update-with-where-unique-without-workspace.input.ts similarity index 100% rename from server/src/api/@generated/pipeline-stage/pipeline-stage-update-with-where-unique-without-workspace.input.ts rename to server/src/core/@generated/pipeline-stage/pipeline-stage-update-with-where-unique-without-workspace.input.ts diff --git a/server/src/api/@generated/pipeline-stage/pipeline-stage-update-without-pipeline-progresses.input.ts b/server/src/core/@generated/pipeline-stage/pipeline-stage-update-without-pipeline-progresses.input.ts similarity index 100% rename from server/src/api/@generated/pipeline-stage/pipeline-stage-update-without-pipeline-progresses.input.ts rename to server/src/core/@generated/pipeline-stage/pipeline-stage-update-without-pipeline-progresses.input.ts diff --git a/server/src/api/@generated/pipeline-stage/pipeline-stage-update-without-pipeline.input.ts b/server/src/core/@generated/pipeline-stage/pipeline-stage-update-without-pipeline.input.ts similarity index 100% rename from server/src/api/@generated/pipeline-stage/pipeline-stage-update-without-pipeline.input.ts rename to server/src/core/@generated/pipeline-stage/pipeline-stage-update-without-pipeline.input.ts diff --git a/server/src/api/@generated/pipeline-stage/pipeline-stage-update-without-workspace.input.ts b/server/src/core/@generated/pipeline-stage/pipeline-stage-update-without-workspace.input.ts similarity index 100% rename from server/src/api/@generated/pipeline-stage/pipeline-stage-update-without-workspace.input.ts rename to server/src/core/@generated/pipeline-stage/pipeline-stage-update-without-workspace.input.ts diff --git a/server/src/api/@generated/pipeline-stage/pipeline-stage-update.input.ts b/server/src/core/@generated/pipeline-stage/pipeline-stage-update.input.ts similarity index 100% rename from server/src/api/@generated/pipeline-stage/pipeline-stage-update.input.ts rename to server/src/core/@generated/pipeline-stage/pipeline-stage-update.input.ts diff --git a/server/src/api/@generated/pipeline-stage/pipeline-stage-upsert-with-where-unique-without-pipeline.input.ts b/server/src/core/@generated/pipeline-stage/pipeline-stage-upsert-with-where-unique-without-pipeline.input.ts similarity index 100% rename from server/src/api/@generated/pipeline-stage/pipeline-stage-upsert-with-where-unique-without-pipeline.input.ts rename to server/src/core/@generated/pipeline-stage/pipeline-stage-upsert-with-where-unique-without-pipeline.input.ts diff --git a/server/src/api/@generated/pipeline-stage/pipeline-stage-upsert-with-where-unique-without-workspace.input.ts b/server/src/core/@generated/pipeline-stage/pipeline-stage-upsert-with-where-unique-without-workspace.input.ts similarity index 100% rename from server/src/api/@generated/pipeline-stage/pipeline-stage-upsert-with-where-unique-without-workspace.input.ts rename to server/src/core/@generated/pipeline-stage/pipeline-stage-upsert-with-where-unique-without-workspace.input.ts diff --git a/server/src/api/@generated/pipeline-stage/pipeline-stage-upsert-without-pipeline-progresses.input.ts b/server/src/core/@generated/pipeline-stage/pipeline-stage-upsert-without-pipeline-progresses.input.ts similarity index 100% rename from server/src/api/@generated/pipeline-stage/pipeline-stage-upsert-without-pipeline-progresses.input.ts rename to server/src/core/@generated/pipeline-stage/pipeline-stage-upsert-without-pipeline-progresses.input.ts diff --git a/server/src/api/@generated/pipeline-stage/pipeline-stage-where-unique.input.ts b/server/src/core/@generated/pipeline-stage/pipeline-stage-where-unique.input.ts similarity index 100% rename from server/src/api/@generated/pipeline-stage/pipeline-stage-where-unique.input.ts rename to server/src/core/@generated/pipeline-stage/pipeline-stage-where-unique.input.ts diff --git a/server/src/api/@generated/pipeline-stage/pipeline-stage-where.input.ts b/server/src/core/@generated/pipeline-stage/pipeline-stage-where.input.ts similarity index 100% rename from server/src/api/@generated/pipeline-stage/pipeline-stage-where.input.ts rename to server/src/core/@generated/pipeline-stage/pipeline-stage-where.input.ts diff --git a/server/src/api/@generated/pipeline-stage/pipeline-stage.model.ts b/server/src/core/@generated/pipeline-stage/pipeline-stage.model.ts similarity index 100% rename from server/src/api/@generated/pipeline-stage/pipeline-stage.model.ts rename to server/src/core/@generated/pipeline-stage/pipeline-stage.model.ts diff --git a/server/src/api/@generated/pipeline-stage/update-many-pipeline-stage.args.ts b/server/src/core/@generated/pipeline-stage/update-many-pipeline-stage.args.ts similarity index 100% rename from server/src/api/@generated/pipeline-stage/update-many-pipeline-stage.args.ts rename to server/src/core/@generated/pipeline-stage/update-many-pipeline-stage.args.ts diff --git a/server/src/api/@generated/pipeline-stage/update-one-pipeline-stage.args.ts b/server/src/core/@generated/pipeline-stage/update-one-pipeline-stage.args.ts similarity index 100% rename from server/src/api/@generated/pipeline-stage/update-one-pipeline-stage.args.ts rename to server/src/core/@generated/pipeline-stage/update-one-pipeline-stage.args.ts diff --git a/server/src/api/@generated/pipeline-stage/upsert-one-pipeline-stage.args.ts b/server/src/core/@generated/pipeline-stage/upsert-one-pipeline-stage.args.ts similarity index 100% rename from server/src/api/@generated/pipeline-stage/upsert-one-pipeline-stage.args.ts rename to server/src/core/@generated/pipeline-stage/upsert-one-pipeline-stage.args.ts diff --git a/server/src/api/@generated/pipeline/aggregate-pipeline.output.ts b/server/src/core/@generated/pipeline/aggregate-pipeline.output.ts similarity index 100% rename from server/src/api/@generated/pipeline/aggregate-pipeline.output.ts rename to server/src/core/@generated/pipeline/aggregate-pipeline.output.ts diff --git a/server/src/api/@generated/pipeline/create-many-pipeline.args.ts b/server/src/core/@generated/pipeline/create-many-pipeline.args.ts similarity index 100% rename from server/src/api/@generated/pipeline/create-many-pipeline.args.ts rename to server/src/core/@generated/pipeline/create-many-pipeline.args.ts diff --git a/server/src/api/@generated/pipeline/create-one-pipeline.args.ts b/server/src/core/@generated/pipeline/create-one-pipeline.args.ts similarity index 100% rename from server/src/api/@generated/pipeline/create-one-pipeline.args.ts rename to server/src/core/@generated/pipeline/create-one-pipeline.args.ts diff --git a/server/src/api/@generated/pipeline/delete-many-pipeline.args.ts b/server/src/core/@generated/pipeline/delete-many-pipeline.args.ts similarity index 100% rename from server/src/api/@generated/pipeline/delete-many-pipeline.args.ts rename to server/src/core/@generated/pipeline/delete-many-pipeline.args.ts diff --git a/server/src/api/@generated/pipeline/delete-one-pipeline.args.ts b/server/src/core/@generated/pipeline/delete-one-pipeline.args.ts similarity index 100% rename from server/src/api/@generated/pipeline/delete-one-pipeline.args.ts rename to server/src/core/@generated/pipeline/delete-one-pipeline.args.ts diff --git a/server/src/api/@generated/pipeline/find-first-pipeline-or-throw.args.ts b/server/src/core/@generated/pipeline/find-first-pipeline-or-throw.args.ts similarity index 100% rename from server/src/api/@generated/pipeline/find-first-pipeline-or-throw.args.ts rename to server/src/core/@generated/pipeline/find-first-pipeline-or-throw.args.ts diff --git a/server/src/api/@generated/pipeline/find-first-pipeline.args.ts b/server/src/core/@generated/pipeline/find-first-pipeline.args.ts similarity index 100% rename from server/src/api/@generated/pipeline/find-first-pipeline.args.ts rename to server/src/core/@generated/pipeline/find-first-pipeline.args.ts diff --git a/server/src/api/@generated/pipeline/find-many-pipeline.args.ts b/server/src/core/@generated/pipeline/find-many-pipeline.args.ts similarity index 100% rename from server/src/api/@generated/pipeline/find-many-pipeline.args.ts rename to server/src/core/@generated/pipeline/find-many-pipeline.args.ts diff --git a/server/src/api/@generated/pipeline/find-unique-pipeline-or-throw.args.ts b/server/src/core/@generated/pipeline/find-unique-pipeline-or-throw.args.ts similarity index 100% rename from server/src/api/@generated/pipeline/find-unique-pipeline-or-throw.args.ts rename to server/src/core/@generated/pipeline/find-unique-pipeline-or-throw.args.ts diff --git a/server/src/api/@generated/pipeline/find-unique-pipeline.args.ts b/server/src/core/@generated/pipeline/find-unique-pipeline.args.ts similarity index 100% rename from server/src/api/@generated/pipeline/find-unique-pipeline.args.ts rename to server/src/core/@generated/pipeline/find-unique-pipeline.args.ts diff --git a/server/src/api/@generated/pipeline/pipeline-aggregate.args.ts b/server/src/core/@generated/pipeline/pipeline-aggregate.args.ts similarity index 100% rename from server/src/api/@generated/pipeline/pipeline-aggregate.args.ts rename to server/src/core/@generated/pipeline/pipeline-aggregate.args.ts diff --git a/server/src/api/@generated/pipeline/pipeline-count-aggregate.input.ts b/server/src/core/@generated/pipeline/pipeline-count-aggregate.input.ts similarity index 100% rename from server/src/api/@generated/pipeline/pipeline-count-aggregate.input.ts rename to server/src/core/@generated/pipeline/pipeline-count-aggregate.input.ts diff --git a/server/src/api/@generated/pipeline/pipeline-count-aggregate.output.ts b/server/src/core/@generated/pipeline/pipeline-count-aggregate.output.ts similarity index 100% rename from server/src/api/@generated/pipeline/pipeline-count-aggregate.output.ts rename to server/src/core/@generated/pipeline/pipeline-count-aggregate.output.ts diff --git a/server/src/api/@generated/pipeline/pipeline-count-order-by-aggregate.input.ts b/server/src/core/@generated/pipeline/pipeline-count-order-by-aggregate.input.ts similarity index 100% rename from server/src/api/@generated/pipeline/pipeline-count-order-by-aggregate.input.ts rename to server/src/core/@generated/pipeline/pipeline-count-order-by-aggregate.input.ts diff --git a/server/src/api/@generated/pipeline/pipeline-count.output.ts b/server/src/core/@generated/pipeline/pipeline-count.output.ts similarity index 100% rename from server/src/api/@generated/pipeline/pipeline-count.output.ts rename to server/src/core/@generated/pipeline/pipeline-count.output.ts diff --git a/server/src/api/@generated/pipeline/pipeline-create-many-workspace-input-envelope.input.ts b/server/src/core/@generated/pipeline/pipeline-create-many-workspace-input-envelope.input.ts similarity index 100% rename from server/src/api/@generated/pipeline/pipeline-create-many-workspace-input-envelope.input.ts rename to server/src/core/@generated/pipeline/pipeline-create-many-workspace-input-envelope.input.ts diff --git a/server/src/api/@generated/pipeline/pipeline-create-many-workspace.input.ts b/server/src/core/@generated/pipeline/pipeline-create-many-workspace.input.ts similarity index 100% rename from server/src/api/@generated/pipeline/pipeline-create-many-workspace.input.ts rename to server/src/core/@generated/pipeline/pipeline-create-many-workspace.input.ts diff --git a/server/src/api/@generated/pipeline/pipeline-create-many.input.ts b/server/src/core/@generated/pipeline/pipeline-create-many.input.ts similarity index 100% rename from server/src/api/@generated/pipeline/pipeline-create-many.input.ts rename to server/src/core/@generated/pipeline/pipeline-create-many.input.ts diff --git a/server/src/api/@generated/pipeline/pipeline-create-nested-many-without-workspace.input.ts b/server/src/core/@generated/pipeline/pipeline-create-nested-many-without-workspace.input.ts similarity index 100% rename from server/src/api/@generated/pipeline/pipeline-create-nested-many-without-workspace.input.ts rename to server/src/core/@generated/pipeline/pipeline-create-nested-many-without-workspace.input.ts diff --git a/server/src/api/@generated/pipeline/pipeline-create-nested-one-without-pipeline-progresses.input.ts b/server/src/core/@generated/pipeline/pipeline-create-nested-one-without-pipeline-progresses.input.ts similarity index 100% rename from server/src/api/@generated/pipeline/pipeline-create-nested-one-without-pipeline-progresses.input.ts rename to server/src/core/@generated/pipeline/pipeline-create-nested-one-without-pipeline-progresses.input.ts diff --git a/server/src/api/@generated/pipeline/pipeline-create-nested-one-without-pipeline-stages.input.ts b/server/src/core/@generated/pipeline/pipeline-create-nested-one-without-pipeline-stages.input.ts similarity index 100% rename from server/src/api/@generated/pipeline/pipeline-create-nested-one-without-pipeline-stages.input.ts rename to server/src/core/@generated/pipeline/pipeline-create-nested-one-without-pipeline-stages.input.ts diff --git a/server/src/api/@generated/pipeline/pipeline-create-or-connect-without-pipeline-progresses.input.ts b/server/src/core/@generated/pipeline/pipeline-create-or-connect-without-pipeline-progresses.input.ts similarity index 100% rename from server/src/api/@generated/pipeline/pipeline-create-or-connect-without-pipeline-progresses.input.ts rename to server/src/core/@generated/pipeline/pipeline-create-or-connect-without-pipeline-progresses.input.ts diff --git a/server/src/api/@generated/pipeline/pipeline-create-or-connect-without-pipeline-stages.input.ts b/server/src/core/@generated/pipeline/pipeline-create-or-connect-without-pipeline-stages.input.ts similarity index 100% rename from server/src/api/@generated/pipeline/pipeline-create-or-connect-without-pipeline-stages.input.ts rename to server/src/core/@generated/pipeline/pipeline-create-or-connect-without-pipeline-stages.input.ts diff --git a/server/src/api/@generated/pipeline/pipeline-create-or-connect-without-workspace.input.ts b/server/src/core/@generated/pipeline/pipeline-create-or-connect-without-workspace.input.ts similarity index 100% rename from server/src/api/@generated/pipeline/pipeline-create-or-connect-without-workspace.input.ts rename to server/src/core/@generated/pipeline/pipeline-create-or-connect-without-workspace.input.ts diff --git a/server/src/api/@generated/pipeline/pipeline-create-without-pipeline-progresses.input.ts b/server/src/core/@generated/pipeline/pipeline-create-without-pipeline-progresses.input.ts similarity index 100% rename from server/src/api/@generated/pipeline/pipeline-create-without-pipeline-progresses.input.ts rename to server/src/core/@generated/pipeline/pipeline-create-without-pipeline-progresses.input.ts diff --git a/server/src/api/@generated/pipeline/pipeline-create-without-pipeline-stages.input.ts b/server/src/core/@generated/pipeline/pipeline-create-without-pipeline-stages.input.ts similarity index 100% rename from server/src/api/@generated/pipeline/pipeline-create-without-pipeline-stages.input.ts rename to server/src/core/@generated/pipeline/pipeline-create-without-pipeline-stages.input.ts diff --git a/server/src/api/@generated/pipeline/pipeline-create-without-workspace.input.ts b/server/src/core/@generated/pipeline/pipeline-create-without-workspace.input.ts similarity index 100% rename from server/src/api/@generated/pipeline/pipeline-create-without-workspace.input.ts rename to server/src/core/@generated/pipeline/pipeline-create-without-workspace.input.ts diff --git a/server/src/api/@generated/pipeline/pipeline-create.input.ts b/server/src/core/@generated/pipeline/pipeline-create.input.ts similarity index 100% rename from server/src/api/@generated/pipeline/pipeline-create.input.ts rename to server/src/core/@generated/pipeline/pipeline-create.input.ts diff --git a/server/src/api/@generated/pipeline/pipeline-group-by.args.ts b/server/src/core/@generated/pipeline/pipeline-group-by.args.ts similarity index 100% rename from server/src/api/@generated/pipeline/pipeline-group-by.args.ts rename to server/src/core/@generated/pipeline/pipeline-group-by.args.ts diff --git a/server/src/api/@generated/pipeline/pipeline-group-by.output.ts b/server/src/core/@generated/pipeline/pipeline-group-by.output.ts similarity index 100% rename from server/src/api/@generated/pipeline/pipeline-group-by.output.ts rename to server/src/core/@generated/pipeline/pipeline-group-by.output.ts diff --git a/server/src/api/@generated/pipeline/pipeline-list-relation-filter.input.ts b/server/src/core/@generated/pipeline/pipeline-list-relation-filter.input.ts similarity index 100% rename from server/src/api/@generated/pipeline/pipeline-list-relation-filter.input.ts rename to server/src/core/@generated/pipeline/pipeline-list-relation-filter.input.ts diff --git a/server/src/api/@generated/pipeline/pipeline-max-aggregate.input.ts b/server/src/core/@generated/pipeline/pipeline-max-aggregate.input.ts similarity index 100% rename from server/src/api/@generated/pipeline/pipeline-max-aggregate.input.ts rename to server/src/core/@generated/pipeline/pipeline-max-aggregate.input.ts diff --git a/server/src/api/@generated/pipeline/pipeline-max-aggregate.output.ts b/server/src/core/@generated/pipeline/pipeline-max-aggregate.output.ts similarity index 100% rename from server/src/api/@generated/pipeline/pipeline-max-aggregate.output.ts rename to server/src/core/@generated/pipeline/pipeline-max-aggregate.output.ts diff --git a/server/src/api/@generated/pipeline/pipeline-max-order-by-aggregate.input.ts b/server/src/core/@generated/pipeline/pipeline-max-order-by-aggregate.input.ts similarity index 100% rename from server/src/api/@generated/pipeline/pipeline-max-order-by-aggregate.input.ts rename to server/src/core/@generated/pipeline/pipeline-max-order-by-aggregate.input.ts diff --git a/server/src/api/@generated/pipeline/pipeline-min-aggregate.input.ts b/server/src/core/@generated/pipeline/pipeline-min-aggregate.input.ts similarity index 100% rename from server/src/api/@generated/pipeline/pipeline-min-aggregate.input.ts rename to server/src/core/@generated/pipeline/pipeline-min-aggregate.input.ts diff --git a/server/src/api/@generated/pipeline/pipeline-min-aggregate.output.ts b/server/src/core/@generated/pipeline/pipeline-min-aggregate.output.ts similarity index 100% rename from server/src/api/@generated/pipeline/pipeline-min-aggregate.output.ts rename to server/src/core/@generated/pipeline/pipeline-min-aggregate.output.ts diff --git a/server/src/api/@generated/pipeline/pipeline-min-order-by-aggregate.input.ts b/server/src/core/@generated/pipeline/pipeline-min-order-by-aggregate.input.ts similarity index 100% rename from server/src/api/@generated/pipeline/pipeline-min-order-by-aggregate.input.ts rename to server/src/core/@generated/pipeline/pipeline-min-order-by-aggregate.input.ts diff --git a/server/src/api/@generated/pipeline/pipeline-order-by-relation-aggregate.input.ts b/server/src/core/@generated/pipeline/pipeline-order-by-relation-aggregate.input.ts similarity index 100% rename from server/src/api/@generated/pipeline/pipeline-order-by-relation-aggregate.input.ts rename to server/src/core/@generated/pipeline/pipeline-order-by-relation-aggregate.input.ts diff --git a/server/src/api/@generated/pipeline/pipeline-order-by-with-aggregation.input.ts b/server/src/core/@generated/pipeline/pipeline-order-by-with-aggregation.input.ts similarity index 100% rename from server/src/api/@generated/pipeline/pipeline-order-by-with-aggregation.input.ts rename to server/src/core/@generated/pipeline/pipeline-order-by-with-aggregation.input.ts diff --git a/server/src/api/@generated/pipeline/pipeline-order-by-with-relation.input.ts b/server/src/core/@generated/pipeline/pipeline-order-by-with-relation.input.ts similarity index 100% rename from server/src/api/@generated/pipeline/pipeline-order-by-with-relation.input.ts rename to server/src/core/@generated/pipeline/pipeline-order-by-with-relation.input.ts diff --git a/server/src/api/@generated/pipeline/pipeline-progress-aggregate.args.ts b/server/src/core/@generated/pipeline/pipeline-progress-aggregate.args.ts similarity index 100% rename from server/src/api/@generated/pipeline/pipeline-progress-aggregate.args.ts rename to server/src/core/@generated/pipeline/pipeline-progress-aggregate.args.ts diff --git a/server/src/api/@generated/pipeline/pipeline-relation-filter.input.ts b/server/src/core/@generated/pipeline/pipeline-relation-filter.input.ts similarity index 100% rename from server/src/api/@generated/pipeline/pipeline-relation-filter.input.ts rename to server/src/core/@generated/pipeline/pipeline-relation-filter.input.ts diff --git a/server/src/api/@generated/pipeline/pipeline-scalar-field.enum.ts b/server/src/core/@generated/pipeline/pipeline-scalar-field.enum.ts similarity index 100% rename from server/src/api/@generated/pipeline/pipeline-scalar-field.enum.ts rename to server/src/core/@generated/pipeline/pipeline-scalar-field.enum.ts diff --git a/server/src/api/@generated/pipeline/pipeline-scalar-where-with-aggregates.input.ts b/server/src/core/@generated/pipeline/pipeline-scalar-where-with-aggregates.input.ts similarity index 100% rename from server/src/api/@generated/pipeline/pipeline-scalar-where-with-aggregates.input.ts rename to server/src/core/@generated/pipeline/pipeline-scalar-where-with-aggregates.input.ts diff --git a/server/src/api/@generated/pipeline/pipeline-scalar-where.input.ts b/server/src/core/@generated/pipeline/pipeline-scalar-where.input.ts similarity index 100% rename from server/src/api/@generated/pipeline/pipeline-scalar-where.input.ts rename to server/src/core/@generated/pipeline/pipeline-scalar-where.input.ts diff --git a/server/src/api/@generated/pipeline/pipeline-unchecked-create-nested-many-without-workspace.input.ts b/server/src/core/@generated/pipeline/pipeline-unchecked-create-nested-many-without-workspace.input.ts similarity index 100% rename from server/src/api/@generated/pipeline/pipeline-unchecked-create-nested-many-without-workspace.input.ts rename to server/src/core/@generated/pipeline/pipeline-unchecked-create-nested-many-without-workspace.input.ts diff --git a/server/src/api/@generated/pipeline/pipeline-unchecked-create-without-pipeline-progresses.input.ts b/server/src/core/@generated/pipeline/pipeline-unchecked-create-without-pipeline-progresses.input.ts similarity index 100% rename from server/src/api/@generated/pipeline/pipeline-unchecked-create-without-pipeline-progresses.input.ts rename to server/src/core/@generated/pipeline/pipeline-unchecked-create-without-pipeline-progresses.input.ts diff --git a/server/src/api/@generated/pipeline/pipeline-unchecked-create-without-pipeline-stages.input.ts b/server/src/core/@generated/pipeline/pipeline-unchecked-create-without-pipeline-stages.input.ts similarity index 100% rename from server/src/api/@generated/pipeline/pipeline-unchecked-create-without-pipeline-stages.input.ts rename to server/src/core/@generated/pipeline/pipeline-unchecked-create-without-pipeline-stages.input.ts diff --git a/server/src/api/@generated/pipeline/pipeline-unchecked-create-without-workspace.input.ts b/server/src/core/@generated/pipeline/pipeline-unchecked-create-without-workspace.input.ts similarity index 100% rename from server/src/api/@generated/pipeline/pipeline-unchecked-create-without-workspace.input.ts rename to server/src/core/@generated/pipeline/pipeline-unchecked-create-without-workspace.input.ts diff --git a/server/src/api/@generated/pipeline/pipeline-unchecked-create.input.ts b/server/src/core/@generated/pipeline/pipeline-unchecked-create.input.ts similarity index 100% rename from server/src/api/@generated/pipeline/pipeline-unchecked-create.input.ts rename to server/src/core/@generated/pipeline/pipeline-unchecked-create.input.ts diff --git a/server/src/api/@generated/pipeline/pipeline-unchecked-update-many-without-pipelines.input.ts b/server/src/core/@generated/pipeline/pipeline-unchecked-update-many-without-pipelines.input.ts similarity index 100% rename from server/src/api/@generated/pipeline/pipeline-unchecked-update-many-without-pipelines.input.ts rename to server/src/core/@generated/pipeline/pipeline-unchecked-update-many-without-pipelines.input.ts diff --git a/server/src/api/@generated/pipeline/pipeline-unchecked-update-many-without-workspace-nested.input.ts b/server/src/core/@generated/pipeline/pipeline-unchecked-update-many-without-workspace-nested.input.ts similarity index 100% rename from server/src/api/@generated/pipeline/pipeline-unchecked-update-many-without-workspace-nested.input.ts rename to server/src/core/@generated/pipeline/pipeline-unchecked-update-many-without-workspace-nested.input.ts diff --git a/server/src/api/@generated/pipeline/pipeline-unchecked-update-many.input.ts b/server/src/core/@generated/pipeline/pipeline-unchecked-update-many.input.ts similarity index 100% rename from server/src/api/@generated/pipeline/pipeline-unchecked-update-many.input.ts rename to server/src/core/@generated/pipeline/pipeline-unchecked-update-many.input.ts diff --git a/server/src/api/@generated/pipeline/pipeline-unchecked-update-without-pipeline-progresses.input.ts b/server/src/core/@generated/pipeline/pipeline-unchecked-update-without-pipeline-progresses.input.ts similarity index 100% rename from server/src/api/@generated/pipeline/pipeline-unchecked-update-without-pipeline-progresses.input.ts rename to server/src/core/@generated/pipeline/pipeline-unchecked-update-without-pipeline-progresses.input.ts diff --git a/server/src/api/@generated/pipeline/pipeline-unchecked-update-without-pipeline-stages.input.ts b/server/src/core/@generated/pipeline/pipeline-unchecked-update-without-pipeline-stages.input.ts similarity index 100% rename from server/src/api/@generated/pipeline/pipeline-unchecked-update-without-pipeline-stages.input.ts rename to server/src/core/@generated/pipeline/pipeline-unchecked-update-without-pipeline-stages.input.ts diff --git a/server/src/api/@generated/pipeline/pipeline-unchecked-update-without-workspace.input.ts b/server/src/core/@generated/pipeline/pipeline-unchecked-update-without-workspace.input.ts similarity index 100% rename from server/src/api/@generated/pipeline/pipeline-unchecked-update-without-workspace.input.ts rename to server/src/core/@generated/pipeline/pipeline-unchecked-update-without-workspace.input.ts diff --git a/server/src/api/@generated/pipeline/pipeline-unchecked-update.input.ts b/server/src/core/@generated/pipeline/pipeline-unchecked-update.input.ts similarity index 100% rename from server/src/api/@generated/pipeline/pipeline-unchecked-update.input.ts rename to server/src/core/@generated/pipeline/pipeline-unchecked-update.input.ts diff --git a/server/src/api/@generated/pipeline/pipeline-update-many-mutation.input.ts b/server/src/core/@generated/pipeline/pipeline-update-many-mutation.input.ts similarity index 100% rename from server/src/api/@generated/pipeline/pipeline-update-many-mutation.input.ts rename to server/src/core/@generated/pipeline/pipeline-update-many-mutation.input.ts diff --git a/server/src/api/@generated/pipeline/pipeline-update-many-with-where-without-workspace.input.ts b/server/src/core/@generated/pipeline/pipeline-update-many-with-where-without-workspace.input.ts similarity index 100% rename from server/src/api/@generated/pipeline/pipeline-update-many-with-where-without-workspace.input.ts rename to server/src/core/@generated/pipeline/pipeline-update-many-with-where-without-workspace.input.ts diff --git a/server/src/api/@generated/pipeline/pipeline-update-many-without-workspace-nested.input.ts b/server/src/core/@generated/pipeline/pipeline-update-many-without-workspace-nested.input.ts similarity index 100% rename from server/src/api/@generated/pipeline/pipeline-update-many-without-workspace-nested.input.ts rename to server/src/core/@generated/pipeline/pipeline-update-many-without-workspace-nested.input.ts diff --git a/server/src/api/@generated/pipeline/pipeline-update-one-required-without-pipeline-progresses-nested.input.ts b/server/src/core/@generated/pipeline/pipeline-update-one-required-without-pipeline-progresses-nested.input.ts similarity index 100% rename from server/src/api/@generated/pipeline/pipeline-update-one-required-without-pipeline-progresses-nested.input.ts rename to server/src/core/@generated/pipeline/pipeline-update-one-required-without-pipeline-progresses-nested.input.ts diff --git a/server/src/api/@generated/pipeline/pipeline-update-one-required-without-pipeline-stages-nested.input.ts b/server/src/core/@generated/pipeline/pipeline-update-one-required-without-pipeline-stages-nested.input.ts similarity index 100% rename from server/src/api/@generated/pipeline/pipeline-update-one-required-without-pipeline-stages-nested.input.ts rename to server/src/core/@generated/pipeline/pipeline-update-one-required-without-pipeline-stages-nested.input.ts diff --git a/server/src/api/@generated/pipeline/pipeline-update-with-where-unique-without-workspace.input.ts b/server/src/core/@generated/pipeline/pipeline-update-with-where-unique-without-workspace.input.ts similarity index 100% rename from server/src/api/@generated/pipeline/pipeline-update-with-where-unique-without-workspace.input.ts rename to server/src/core/@generated/pipeline/pipeline-update-with-where-unique-without-workspace.input.ts diff --git a/server/src/api/@generated/pipeline/pipeline-update-without-pipeline-progresses.input.ts b/server/src/core/@generated/pipeline/pipeline-update-without-pipeline-progresses.input.ts similarity index 100% rename from server/src/api/@generated/pipeline/pipeline-update-without-pipeline-progresses.input.ts rename to server/src/core/@generated/pipeline/pipeline-update-without-pipeline-progresses.input.ts diff --git a/server/src/api/@generated/pipeline/pipeline-update-without-pipeline-stages.input.ts b/server/src/core/@generated/pipeline/pipeline-update-without-pipeline-stages.input.ts similarity index 100% rename from server/src/api/@generated/pipeline/pipeline-update-without-pipeline-stages.input.ts rename to server/src/core/@generated/pipeline/pipeline-update-without-pipeline-stages.input.ts diff --git a/server/src/api/@generated/pipeline/pipeline-update-without-workspace.input.ts b/server/src/core/@generated/pipeline/pipeline-update-without-workspace.input.ts similarity index 100% rename from server/src/api/@generated/pipeline/pipeline-update-without-workspace.input.ts rename to server/src/core/@generated/pipeline/pipeline-update-without-workspace.input.ts diff --git a/server/src/api/@generated/pipeline/pipeline-update.input.ts b/server/src/core/@generated/pipeline/pipeline-update.input.ts similarity index 100% rename from server/src/api/@generated/pipeline/pipeline-update.input.ts rename to server/src/core/@generated/pipeline/pipeline-update.input.ts diff --git a/server/src/api/@generated/pipeline/pipeline-upsert-with-where-unique-without-workspace.input.ts b/server/src/core/@generated/pipeline/pipeline-upsert-with-where-unique-without-workspace.input.ts similarity index 100% rename from server/src/api/@generated/pipeline/pipeline-upsert-with-where-unique-without-workspace.input.ts rename to server/src/core/@generated/pipeline/pipeline-upsert-with-where-unique-without-workspace.input.ts diff --git a/server/src/api/@generated/pipeline/pipeline-upsert-without-pipeline-progresses.input.ts b/server/src/core/@generated/pipeline/pipeline-upsert-without-pipeline-progresses.input.ts similarity index 100% rename from server/src/api/@generated/pipeline/pipeline-upsert-without-pipeline-progresses.input.ts rename to server/src/core/@generated/pipeline/pipeline-upsert-without-pipeline-progresses.input.ts diff --git a/server/src/api/@generated/pipeline/pipeline-upsert-without-pipeline-stages.input.ts b/server/src/core/@generated/pipeline/pipeline-upsert-without-pipeline-stages.input.ts similarity index 100% rename from server/src/api/@generated/pipeline/pipeline-upsert-without-pipeline-stages.input.ts rename to server/src/core/@generated/pipeline/pipeline-upsert-without-pipeline-stages.input.ts diff --git a/server/src/api/@generated/pipeline/pipeline-where-unique.input.ts b/server/src/core/@generated/pipeline/pipeline-where-unique.input.ts similarity index 100% rename from server/src/api/@generated/pipeline/pipeline-where-unique.input.ts rename to server/src/core/@generated/pipeline/pipeline-where-unique.input.ts diff --git a/server/src/api/@generated/pipeline/pipeline-where.input.ts b/server/src/core/@generated/pipeline/pipeline-where.input.ts similarity index 100% rename from server/src/api/@generated/pipeline/pipeline-where.input.ts rename to server/src/core/@generated/pipeline/pipeline-where.input.ts diff --git a/server/src/api/@generated/pipeline/pipeline.model.ts b/server/src/core/@generated/pipeline/pipeline.model.ts similarity index 100% rename from server/src/api/@generated/pipeline/pipeline.model.ts rename to server/src/core/@generated/pipeline/pipeline.model.ts diff --git a/server/src/api/@generated/pipeline/update-many-pipeline.args.ts b/server/src/core/@generated/pipeline/update-many-pipeline.args.ts similarity index 100% rename from server/src/api/@generated/pipeline/update-many-pipeline.args.ts rename to server/src/core/@generated/pipeline/update-many-pipeline.args.ts diff --git a/server/src/api/@generated/pipeline/update-one-pipeline.args.ts b/server/src/core/@generated/pipeline/update-one-pipeline.args.ts similarity index 100% rename from server/src/api/@generated/pipeline/update-one-pipeline.args.ts rename to server/src/core/@generated/pipeline/update-one-pipeline.args.ts diff --git a/server/src/api/@generated/pipeline/upsert-one-pipeline.args.ts b/server/src/core/@generated/pipeline/upsert-one-pipeline.args.ts similarity index 100% rename from server/src/api/@generated/pipeline/upsert-one-pipeline.args.ts rename to server/src/core/@generated/pipeline/upsert-one-pipeline.args.ts diff --git a/server/src/api/@generated/prisma/affected-rows.output.ts b/server/src/core/@generated/prisma/affected-rows.output.ts similarity index 100% rename from server/src/api/@generated/prisma/affected-rows.output.ts rename to server/src/core/@generated/prisma/affected-rows.output.ts diff --git a/server/src/api/@generated/prisma/bool-field-update-operations.input.ts b/server/src/core/@generated/prisma/bool-field-update-operations.input.ts similarity index 100% rename from server/src/api/@generated/prisma/bool-field-update-operations.input.ts rename to server/src/core/@generated/prisma/bool-field-update-operations.input.ts diff --git a/server/src/api/@generated/prisma/bool-filter.input.ts b/server/src/core/@generated/prisma/bool-filter.input.ts similarity index 100% rename from server/src/api/@generated/prisma/bool-filter.input.ts rename to server/src/core/@generated/prisma/bool-filter.input.ts diff --git a/server/src/api/@generated/prisma/bool-with-aggregates-filter.input.ts b/server/src/core/@generated/prisma/bool-with-aggregates-filter.input.ts similarity index 100% rename from server/src/api/@generated/prisma/bool-with-aggregates-filter.input.ts rename to server/src/core/@generated/prisma/bool-with-aggregates-filter.input.ts diff --git a/server/src/api/@generated/prisma/commentable-type.enum.ts b/server/src/core/@generated/prisma/commentable-type.enum.ts similarity index 100% rename from server/src/api/@generated/prisma/commentable-type.enum.ts rename to server/src/core/@generated/prisma/commentable-type.enum.ts diff --git a/server/src/api/@generated/prisma/date-time-field-update-operations.input.ts b/server/src/core/@generated/prisma/date-time-field-update-operations.input.ts similarity index 100% rename from server/src/api/@generated/prisma/date-time-field-update-operations.input.ts rename to server/src/core/@generated/prisma/date-time-field-update-operations.input.ts diff --git a/server/src/api/@generated/prisma/date-time-filter.input.ts b/server/src/core/@generated/prisma/date-time-filter.input.ts similarity index 100% rename from server/src/api/@generated/prisma/date-time-filter.input.ts rename to server/src/core/@generated/prisma/date-time-filter.input.ts diff --git a/server/src/api/@generated/prisma/date-time-nullable-filter.input.ts b/server/src/core/@generated/prisma/date-time-nullable-filter.input.ts similarity index 100% rename from server/src/api/@generated/prisma/date-time-nullable-filter.input.ts rename to server/src/core/@generated/prisma/date-time-nullable-filter.input.ts diff --git a/server/src/api/@generated/prisma/date-time-nullable-with-aggregates-filter.input.ts b/server/src/core/@generated/prisma/date-time-nullable-with-aggregates-filter.input.ts similarity index 100% rename from server/src/api/@generated/prisma/date-time-nullable-with-aggregates-filter.input.ts rename to server/src/core/@generated/prisma/date-time-nullable-with-aggregates-filter.input.ts diff --git a/server/src/api/@generated/prisma/date-time-with-aggregates-filter.input.ts b/server/src/core/@generated/prisma/date-time-with-aggregates-filter.input.ts similarity index 100% rename from server/src/api/@generated/prisma/date-time-with-aggregates-filter.input.ts rename to server/src/core/@generated/prisma/date-time-with-aggregates-filter.input.ts diff --git a/server/src/api/@generated/prisma/enum-commentable-type-field-update-operations.input.ts b/server/src/core/@generated/prisma/enum-commentable-type-field-update-operations.input.ts similarity index 100% rename from server/src/api/@generated/prisma/enum-commentable-type-field-update-operations.input.ts rename to server/src/core/@generated/prisma/enum-commentable-type-field-update-operations.input.ts diff --git a/server/src/api/@generated/prisma/enum-commentable-type-filter.input.ts b/server/src/core/@generated/prisma/enum-commentable-type-filter.input.ts similarity index 100% rename from server/src/api/@generated/prisma/enum-commentable-type-filter.input.ts rename to server/src/core/@generated/prisma/enum-commentable-type-filter.input.ts diff --git a/server/src/api/@generated/prisma/enum-commentable-type-with-aggregates-filter.input.ts b/server/src/core/@generated/prisma/enum-commentable-type-with-aggregates-filter.input.ts similarity index 100% rename from server/src/api/@generated/prisma/enum-commentable-type-with-aggregates-filter.input.ts rename to server/src/core/@generated/prisma/enum-commentable-type-with-aggregates-filter.input.ts diff --git a/server/src/api/@generated/prisma/enum-pipeline-progressable-type-field-update-operations.input.ts b/server/src/core/@generated/prisma/enum-pipeline-progressable-type-field-update-operations.input.ts similarity index 100% rename from server/src/api/@generated/prisma/enum-pipeline-progressable-type-field-update-operations.input.ts rename to server/src/core/@generated/prisma/enum-pipeline-progressable-type-field-update-operations.input.ts diff --git a/server/src/api/@generated/prisma/enum-pipeline-progressable-type-filter.input.ts b/server/src/core/@generated/prisma/enum-pipeline-progressable-type-filter.input.ts similarity index 100% rename from server/src/api/@generated/prisma/enum-pipeline-progressable-type-filter.input.ts rename to server/src/core/@generated/prisma/enum-pipeline-progressable-type-filter.input.ts diff --git a/server/src/api/@generated/prisma/enum-pipeline-progressable-type-with-aggregates-filter.input.ts b/server/src/core/@generated/prisma/enum-pipeline-progressable-type-with-aggregates-filter.input.ts similarity index 100% rename from server/src/api/@generated/prisma/enum-pipeline-progressable-type-with-aggregates-filter.input.ts rename to server/src/core/@generated/prisma/enum-pipeline-progressable-type-with-aggregates-filter.input.ts diff --git a/server/src/api/@generated/prisma/int-nullable-filter.input.ts b/server/src/core/@generated/prisma/int-nullable-filter.input.ts similarity index 100% rename from server/src/api/@generated/prisma/int-nullable-filter.input.ts rename to server/src/core/@generated/prisma/int-nullable-filter.input.ts diff --git a/server/src/api/@generated/prisma/int-nullable-with-aggregates-filter.input.ts b/server/src/core/@generated/prisma/int-nullable-with-aggregates-filter.input.ts similarity index 100% rename from server/src/api/@generated/prisma/int-nullable-with-aggregates-filter.input.ts rename to server/src/core/@generated/prisma/int-nullable-with-aggregates-filter.input.ts diff --git a/server/src/api/@generated/prisma/json-null-value-filter.enum.ts b/server/src/core/@generated/prisma/json-null-value-filter.enum.ts similarity index 100% rename from server/src/api/@generated/prisma/json-null-value-filter.enum.ts rename to server/src/core/@generated/prisma/json-null-value-filter.enum.ts diff --git a/server/src/api/@generated/prisma/json-nullable-filter.input.ts b/server/src/core/@generated/prisma/json-nullable-filter.input.ts similarity index 100% rename from server/src/api/@generated/prisma/json-nullable-filter.input.ts rename to server/src/core/@generated/prisma/json-nullable-filter.input.ts diff --git a/server/src/api/@generated/prisma/json-nullable-with-aggregates-filter.input.ts b/server/src/core/@generated/prisma/json-nullable-with-aggregates-filter.input.ts similarity index 100% rename from server/src/api/@generated/prisma/json-nullable-with-aggregates-filter.input.ts rename to server/src/core/@generated/prisma/json-nullable-with-aggregates-filter.input.ts diff --git a/server/src/api/@generated/prisma/nested-bool-filter.input.ts b/server/src/core/@generated/prisma/nested-bool-filter.input.ts similarity index 100% rename from server/src/api/@generated/prisma/nested-bool-filter.input.ts rename to server/src/core/@generated/prisma/nested-bool-filter.input.ts diff --git a/server/src/api/@generated/prisma/nested-bool-with-aggregates-filter.input.ts b/server/src/core/@generated/prisma/nested-bool-with-aggregates-filter.input.ts similarity index 100% rename from server/src/api/@generated/prisma/nested-bool-with-aggregates-filter.input.ts rename to server/src/core/@generated/prisma/nested-bool-with-aggregates-filter.input.ts diff --git a/server/src/api/@generated/prisma/nested-date-time-filter.input.ts b/server/src/core/@generated/prisma/nested-date-time-filter.input.ts similarity index 100% rename from server/src/api/@generated/prisma/nested-date-time-filter.input.ts rename to server/src/core/@generated/prisma/nested-date-time-filter.input.ts diff --git a/server/src/api/@generated/prisma/nested-date-time-nullable-filter.input.ts b/server/src/core/@generated/prisma/nested-date-time-nullable-filter.input.ts similarity index 100% rename from server/src/api/@generated/prisma/nested-date-time-nullable-filter.input.ts rename to server/src/core/@generated/prisma/nested-date-time-nullable-filter.input.ts diff --git a/server/src/api/@generated/prisma/nested-date-time-nullable-with-aggregates-filter.input.ts b/server/src/core/@generated/prisma/nested-date-time-nullable-with-aggregates-filter.input.ts similarity index 100% rename from server/src/api/@generated/prisma/nested-date-time-nullable-with-aggregates-filter.input.ts rename to server/src/core/@generated/prisma/nested-date-time-nullable-with-aggregates-filter.input.ts diff --git a/server/src/api/@generated/prisma/nested-date-time-with-aggregates-filter.input.ts b/server/src/core/@generated/prisma/nested-date-time-with-aggregates-filter.input.ts similarity index 100% rename from server/src/api/@generated/prisma/nested-date-time-with-aggregates-filter.input.ts rename to server/src/core/@generated/prisma/nested-date-time-with-aggregates-filter.input.ts diff --git a/server/src/api/@generated/prisma/nested-enum-commentable-type-filter.input.ts b/server/src/core/@generated/prisma/nested-enum-commentable-type-filter.input.ts similarity index 100% rename from server/src/api/@generated/prisma/nested-enum-commentable-type-filter.input.ts rename to server/src/core/@generated/prisma/nested-enum-commentable-type-filter.input.ts diff --git a/server/src/api/@generated/prisma/nested-enum-commentable-type-with-aggregates-filter.input.ts b/server/src/core/@generated/prisma/nested-enum-commentable-type-with-aggregates-filter.input.ts similarity index 100% rename from server/src/api/@generated/prisma/nested-enum-commentable-type-with-aggregates-filter.input.ts rename to server/src/core/@generated/prisma/nested-enum-commentable-type-with-aggregates-filter.input.ts diff --git a/server/src/api/@generated/prisma/nested-enum-pipeline-progressable-type-filter.input.ts b/server/src/core/@generated/prisma/nested-enum-pipeline-progressable-type-filter.input.ts similarity index 100% rename from server/src/api/@generated/prisma/nested-enum-pipeline-progressable-type-filter.input.ts rename to server/src/core/@generated/prisma/nested-enum-pipeline-progressable-type-filter.input.ts diff --git a/server/src/api/@generated/prisma/nested-enum-pipeline-progressable-type-with-aggregates-filter.input.ts b/server/src/core/@generated/prisma/nested-enum-pipeline-progressable-type-with-aggregates-filter.input.ts similarity index 100% rename from server/src/api/@generated/prisma/nested-enum-pipeline-progressable-type-with-aggregates-filter.input.ts rename to server/src/core/@generated/prisma/nested-enum-pipeline-progressable-type-with-aggregates-filter.input.ts diff --git a/server/src/api/@generated/prisma/nested-float-nullable-filter.input.ts b/server/src/core/@generated/prisma/nested-float-nullable-filter.input.ts similarity index 100% rename from server/src/api/@generated/prisma/nested-float-nullable-filter.input.ts rename to server/src/core/@generated/prisma/nested-float-nullable-filter.input.ts diff --git a/server/src/api/@generated/prisma/nested-int-filter.input.ts b/server/src/core/@generated/prisma/nested-int-filter.input.ts similarity index 100% rename from server/src/api/@generated/prisma/nested-int-filter.input.ts rename to server/src/core/@generated/prisma/nested-int-filter.input.ts diff --git a/server/src/api/@generated/prisma/nested-int-nullable-filter.input.ts b/server/src/core/@generated/prisma/nested-int-nullable-filter.input.ts similarity index 100% rename from server/src/api/@generated/prisma/nested-int-nullable-filter.input.ts rename to server/src/core/@generated/prisma/nested-int-nullable-filter.input.ts diff --git a/server/src/api/@generated/prisma/nested-int-nullable-with-aggregates-filter.input.ts b/server/src/core/@generated/prisma/nested-int-nullable-with-aggregates-filter.input.ts similarity index 100% rename from server/src/api/@generated/prisma/nested-int-nullable-with-aggregates-filter.input.ts rename to server/src/core/@generated/prisma/nested-int-nullable-with-aggregates-filter.input.ts diff --git a/server/src/api/@generated/prisma/nested-json-nullable-filter.input.ts b/server/src/core/@generated/prisma/nested-json-nullable-filter.input.ts similarity index 100% rename from server/src/api/@generated/prisma/nested-json-nullable-filter.input.ts rename to server/src/core/@generated/prisma/nested-json-nullable-filter.input.ts diff --git a/server/src/api/@generated/prisma/nested-string-filter.input.ts b/server/src/core/@generated/prisma/nested-string-filter.input.ts similarity index 100% rename from server/src/api/@generated/prisma/nested-string-filter.input.ts rename to server/src/core/@generated/prisma/nested-string-filter.input.ts diff --git a/server/src/api/@generated/prisma/nested-string-nullable-filter.input.ts b/server/src/core/@generated/prisma/nested-string-nullable-filter.input.ts similarity index 100% rename from server/src/api/@generated/prisma/nested-string-nullable-filter.input.ts rename to server/src/core/@generated/prisma/nested-string-nullable-filter.input.ts diff --git a/server/src/api/@generated/prisma/nested-string-nullable-with-aggregates-filter.input.ts b/server/src/core/@generated/prisma/nested-string-nullable-with-aggregates-filter.input.ts similarity index 100% rename from server/src/api/@generated/prisma/nested-string-nullable-with-aggregates-filter.input.ts rename to server/src/core/@generated/prisma/nested-string-nullable-with-aggregates-filter.input.ts diff --git a/server/src/api/@generated/prisma/nested-string-with-aggregates-filter.input.ts b/server/src/core/@generated/prisma/nested-string-with-aggregates-filter.input.ts similarity index 100% rename from server/src/api/@generated/prisma/nested-string-with-aggregates-filter.input.ts rename to server/src/core/@generated/prisma/nested-string-with-aggregates-filter.input.ts diff --git a/server/src/api/@generated/prisma/nullable-date-time-field-update-operations.input.ts b/server/src/core/@generated/prisma/nullable-date-time-field-update-operations.input.ts similarity index 100% rename from server/src/api/@generated/prisma/nullable-date-time-field-update-operations.input.ts rename to server/src/core/@generated/prisma/nullable-date-time-field-update-operations.input.ts diff --git a/server/src/api/@generated/prisma/nullable-int-field-update-operations.input.ts b/server/src/core/@generated/prisma/nullable-int-field-update-operations.input.ts similarity index 100% rename from server/src/api/@generated/prisma/nullable-int-field-update-operations.input.ts rename to server/src/core/@generated/prisma/nullable-int-field-update-operations.input.ts diff --git a/server/src/api/@generated/prisma/nullable-json-null-value-input.enum.ts b/server/src/core/@generated/prisma/nullable-json-null-value-input.enum.ts similarity index 100% rename from server/src/api/@generated/prisma/nullable-json-null-value-input.enum.ts rename to server/src/core/@generated/prisma/nullable-json-null-value-input.enum.ts diff --git a/server/src/api/@generated/prisma/nullable-string-field-update-operations.input.ts b/server/src/core/@generated/prisma/nullable-string-field-update-operations.input.ts similarity index 100% rename from server/src/api/@generated/prisma/nullable-string-field-update-operations.input.ts rename to server/src/core/@generated/prisma/nullable-string-field-update-operations.input.ts diff --git a/server/src/api/@generated/prisma/pipeline-progressable-type.enum.ts b/server/src/core/@generated/prisma/pipeline-progressable-type.enum.ts similarity index 100% rename from server/src/api/@generated/prisma/pipeline-progressable-type.enum.ts rename to server/src/core/@generated/prisma/pipeline-progressable-type.enum.ts diff --git a/server/src/api/@generated/prisma/query-mode.enum.ts b/server/src/core/@generated/prisma/query-mode.enum.ts similarity index 100% rename from server/src/api/@generated/prisma/query-mode.enum.ts rename to server/src/core/@generated/prisma/query-mode.enum.ts diff --git a/server/src/api/@generated/prisma/sort-order.enum.ts b/server/src/core/@generated/prisma/sort-order.enum.ts similarity index 100% rename from server/src/api/@generated/prisma/sort-order.enum.ts rename to server/src/core/@generated/prisma/sort-order.enum.ts diff --git a/server/src/api/@generated/prisma/string-field-update-operations.input.ts b/server/src/core/@generated/prisma/string-field-update-operations.input.ts similarity index 100% rename from server/src/api/@generated/prisma/string-field-update-operations.input.ts rename to server/src/core/@generated/prisma/string-field-update-operations.input.ts diff --git a/server/src/api/@generated/prisma/string-filter.input.ts b/server/src/core/@generated/prisma/string-filter.input.ts similarity index 100% rename from server/src/api/@generated/prisma/string-filter.input.ts rename to server/src/core/@generated/prisma/string-filter.input.ts diff --git a/server/src/api/@generated/prisma/string-nullable-filter.input.ts b/server/src/core/@generated/prisma/string-nullable-filter.input.ts similarity index 100% rename from server/src/api/@generated/prisma/string-nullable-filter.input.ts rename to server/src/core/@generated/prisma/string-nullable-filter.input.ts diff --git a/server/src/api/@generated/prisma/string-nullable-with-aggregates-filter.input.ts b/server/src/core/@generated/prisma/string-nullable-with-aggregates-filter.input.ts similarity index 100% rename from server/src/api/@generated/prisma/string-nullable-with-aggregates-filter.input.ts rename to server/src/core/@generated/prisma/string-nullable-with-aggregates-filter.input.ts diff --git a/server/src/api/@generated/prisma/string-with-aggregates-filter.input.ts b/server/src/core/@generated/prisma/string-with-aggregates-filter.input.ts similarity index 100% rename from server/src/api/@generated/prisma/string-with-aggregates-filter.input.ts rename to server/src/core/@generated/prisma/string-with-aggregates-filter.input.ts diff --git a/server/src/api/@generated/prisma/transaction-isolation-level.enum.ts b/server/src/core/@generated/prisma/transaction-isolation-level.enum.ts similarity index 100% rename from server/src/api/@generated/prisma/transaction-isolation-level.enum.ts rename to server/src/core/@generated/prisma/transaction-isolation-level.enum.ts diff --git a/server/src/api/@generated/refresh-token/aggregate-refresh-token.output.ts b/server/src/core/@generated/refresh-token/aggregate-refresh-token.output.ts similarity index 100% rename from server/src/api/@generated/refresh-token/aggregate-refresh-token.output.ts rename to server/src/core/@generated/refresh-token/aggregate-refresh-token.output.ts diff --git a/server/src/api/@generated/refresh-token/create-many-refresh-token.args.ts b/server/src/core/@generated/refresh-token/create-many-refresh-token.args.ts similarity index 100% rename from server/src/api/@generated/refresh-token/create-many-refresh-token.args.ts rename to server/src/core/@generated/refresh-token/create-many-refresh-token.args.ts diff --git a/server/src/api/@generated/refresh-token/create-one-refresh-token.args.ts b/server/src/core/@generated/refresh-token/create-one-refresh-token.args.ts similarity index 100% rename from server/src/api/@generated/refresh-token/create-one-refresh-token.args.ts rename to server/src/core/@generated/refresh-token/create-one-refresh-token.args.ts diff --git a/server/src/api/@generated/refresh-token/delete-many-refresh-token.args.ts b/server/src/core/@generated/refresh-token/delete-many-refresh-token.args.ts similarity index 100% rename from server/src/api/@generated/refresh-token/delete-many-refresh-token.args.ts rename to server/src/core/@generated/refresh-token/delete-many-refresh-token.args.ts diff --git a/server/src/api/@generated/refresh-token/delete-one-refresh-token.args.ts b/server/src/core/@generated/refresh-token/delete-one-refresh-token.args.ts similarity index 100% rename from server/src/api/@generated/refresh-token/delete-one-refresh-token.args.ts rename to server/src/core/@generated/refresh-token/delete-one-refresh-token.args.ts diff --git a/server/src/api/@generated/refresh-token/find-first-refresh-token-or-throw.args.ts b/server/src/core/@generated/refresh-token/find-first-refresh-token-or-throw.args.ts similarity index 100% rename from server/src/api/@generated/refresh-token/find-first-refresh-token-or-throw.args.ts rename to server/src/core/@generated/refresh-token/find-first-refresh-token-or-throw.args.ts diff --git a/server/src/api/@generated/refresh-token/find-first-refresh-token.args.ts b/server/src/core/@generated/refresh-token/find-first-refresh-token.args.ts similarity index 100% rename from server/src/api/@generated/refresh-token/find-first-refresh-token.args.ts rename to server/src/core/@generated/refresh-token/find-first-refresh-token.args.ts diff --git a/server/src/api/@generated/refresh-token/find-many-refresh-token.args.ts b/server/src/core/@generated/refresh-token/find-many-refresh-token.args.ts similarity index 100% rename from server/src/api/@generated/refresh-token/find-many-refresh-token.args.ts rename to server/src/core/@generated/refresh-token/find-many-refresh-token.args.ts diff --git a/server/src/api/@generated/refresh-token/find-unique-refresh-token-or-throw.args.ts b/server/src/core/@generated/refresh-token/find-unique-refresh-token-or-throw.args.ts similarity index 100% rename from server/src/api/@generated/refresh-token/find-unique-refresh-token-or-throw.args.ts rename to server/src/core/@generated/refresh-token/find-unique-refresh-token-or-throw.args.ts diff --git a/server/src/api/@generated/refresh-token/find-unique-refresh-token.args.ts b/server/src/core/@generated/refresh-token/find-unique-refresh-token.args.ts similarity index 100% rename from server/src/api/@generated/refresh-token/find-unique-refresh-token.args.ts rename to server/src/core/@generated/refresh-token/find-unique-refresh-token.args.ts diff --git a/server/src/api/@generated/refresh-token/refresh-token-aggregate.args.ts b/server/src/core/@generated/refresh-token/refresh-token-aggregate.args.ts similarity index 100% rename from server/src/api/@generated/refresh-token/refresh-token-aggregate.args.ts rename to server/src/core/@generated/refresh-token/refresh-token-aggregate.args.ts diff --git a/server/src/api/@generated/refresh-token/refresh-token-count-aggregate.input.ts b/server/src/core/@generated/refresh-token/refresh-token-count-aggregate.input.ts similarity index 100% rename from server/src/api/@generated/refresh-token/refresh-token-count-aggregate.input.ts rename to server/src/core/@generated/refresh-token/refresh-token-count-aggregate.input.ts diff --git a/server/src/api/@generated/refresh-token/refresh-token-count-aggregate.output.ts b/server/src/core/@generated/refresh-token/refresh-token-count-aggregate.output.ts similarity index 100% rename from server/src/api/@generated/refresh-token/refresh-token-count-aggregate.output.ts rename to server/src/core/@generated/refresh-token/refresh-token-count-aggregate.output.ts diff --git a/server/src/api/@generated/refresh-token/refresh-token-count-order-by-aggregate.input.ts b/server/src/core/@generated/refresh-token/refresh-token-count-order-by-aggregate.input.ts similarity index 100% rename from server/src/api/@generated/refresh-token/refresh-token-count-order-by-aggregate.input.ts rename to server/src/core/@generated/refresh-token/refresh-token-count-order-by-aggregate.input.ts diff --git a/server/src/api/@generated/refresh-token/refresh-token-create-many-user-input-envelope.input.ts b/server/src/core/@generated/refresh-token/refresh-token-create-many-user-input-envelope.input.ts similarity index 100% rename from server/src/api/@generated/refresh-token/refresh-token-create-many-user-input-envelope.input.ts rename to server/src/core/@generated/refresh-token/refresh-token-create-many-user-input-envelope.input.ts diff --git a/server/src/api/@generated/refresh-token/refresh-token-create-many-user.input.ts b/server/src/core/@generated/refresh-token/refresh-token-create-many-user.input.ts similarity index 100% rename from server/src/api/@generated/refresh-token/refresh-token-create-many-user.input.ts rename to server/src/core/@generated/refresh-token/refresh-token-create-many-user.input.ts diff --git a/server/src/api/@generated/refresh-token/refresh-token-create-many.input.ts b/server/src/core/@generated/refresh-token/refresh-token-create-many.input.ts similarity index 100% rename from server/src/api/@generated/refresh-token/refresh-token-create-many.input.ts rename to server/src/core/@generated/refresh-token/refresh-token-create-many.input.ts diff --git a/server/src/api/@generated/refresh-token/refresh-token-create-nested-many-without-user.input.ts b/server/src/core/@generated/refresh-token/refresh-token-create-nested-many-without-user.input.ts similarity index 100% rename from server/src/api/@generated/refresh-token/refresh-token-create-nested-many-without-user.input.ts rename to server/src/core/@generated/refresh-token/refresh-token-create-nested-many-without-user.input.ts diff --git a/server/src/api/@generated/refresh-token/refresh-token-create-or-connect-without-user.input.ts b/server/src/core/@generated/refresh-token/refresh-token-create-or-connect-without-user.input.ts similarity index 100% rename from server/src/api/@generated/refresh-token/refresh-token-create-or-connect-without-user.input.ts rename to server/src/core/@generated/refresh-token/refresh-token-create-or-connect-without-user.input.ts diff --git a/server/src/api/@generated/refresh-token/refresh-token-create-without-user.input.ts b/server/src/core/@generated/refresh-token/refresh-token-create-without-user.input.ts similarity index 100% rename from server/src/api/@generated/refresh-token/refresh-token-create-without-user.input.ts rename to server/src/core/@generated/refresh-token/refresh-token-create-without-user.input.ts diff --git a/server/src/api/@generated/refresh-token/refresh-token-create.input.ts b/server/src/core/@generated/refresh-token/refresh-token-create.input.ts similarity index 100% rename from server/src/api/@generated/refresh-token/refresh-token-create.input.ts rename to server/src/core/@generated/refresh-token/refresh-token-create.input.ts diff --git a/server/src/api/@generated/refresh-token/refresh-token-group-by.args.ts b/server/src/core/@generated/refresh-token/refresh-token-group-by.args.ts similarity index 100% rename from server/src/api/@generated/refresh-token/refresh-token-group-by.args.ts rename to server/src/core/@generated/refresh-token/refresh-token-group-by.args.ts diff --git a/server/src/api/@generated/refresh-token/refresh-token-group-by.output.ts b/server/src/core/@generated/refresh-token/refresh-token-group-by.output.ts similarity index 100% rename from server/src/api/@generated/refresh-token/refresh-token-group-by.output.ts rename to server/src/core/@generated/refresh-token/refresh-token-group-by.output.ts diff --git a/server/src/api/@generated/refresh-token/refresh-token-list-relation-filter.input.ts b/server/src/core/@generated/refresh-token/refresh-token-list-relation-filter.input.ts similarity index 100% rename from server/src/api/@generated/refresh-token/refresh-token-list-relation-filter.input.ts rename to server/src/core/@generated/refresh-token/refresh-token-list-relation-filter.input.ts diff --git a/server/src/api/@generated/refresh-token/refresh-token-max-aggregate.input.ts b/server/src/core/@generated/refresh-token/refresh-token-max-aggregate.input.ts similarity index 100% rename from server/src/api/@generated/refresh-token/refresh-token-max-aggregate.input.ts rename to server/src/core/@generated/refresh-token/refresh-token-max-aggregate.input.ts diff --git a/server/src/api/@generated/refresh-token/refresh-token-max-aggregate.output.ts b/server/src/core/@generated/refresh-token/refresh-token-max-aggregate.output.ts similarity index 100% rename from server/src/api/@generated/refresh-token/refresh-token-max-aggregate.output.ts rename to server/src/core/@generated/refresh-token/refresh-token-max-aggregate.output.ts diff --git a/server/src/api/@generated/refresh-token/refresh-token-max-order-by-aggregate.input.ts b/server/src/core/@generated/refresh-token/refresh-token-max-order-by-aggregate.input.ts similarity index 100% rename from server/src/api/@generated/refresh-token/refresh-token-max-order-by-aggregate.input.ts rename to server/src/core/@generated/refresh-token/refresh-token-max-order-by-aggregate.input.ts diff --git a/server/src/api/@generated/refresh-token/refresh-token-min-aggregate.input.ts b/server/src/core/@generated/refresh-token/refresh-token-min-aggregate.input.ts similarity index 100% rename from server/src/api/@generated/refresh-token/refresh-token-min-aggregate.input.ts rename to server/src/core/@generated/refresh-token/refresh-token-min-aggregate.input.ts diff --git a/server/src/api/@generated/refresh-token/refresh-token-min-aggregate.output.ts b/server/src/core/@generated/refresh-token/refresh-token-min-aggregate.output.ts similarity index 100% rename from server/src/api/@generated/refresh-token/refresh-token-min-aggregate.output.ts rename to server/src/core/@generated/refresh-token/refresh-token-min-aggregate.output.ts diff --git a/server/src/api/@generated/refresh-token/refresh-token-min-order-by-aggregate.input.ts b/server/src/core/@generated/refresh-token/refresh-token-min-order-by-aggregate.input.ts similarity index 100% rename from server/src/api/@generated/refresh-token/refresh-token-min-order-by-aggregate.input.ts rename to server/src/core/@generated/refresh-token/refresh-token-min-order-by-aggregate.input.ts diff --git a/server/src/api/@generated/refresh-token/refresh-token-order-by-relation-aggregate.input.ts b/server/src/core/@generated/refresh-token/refresh-token-order-by-relation-aggregate.input.ts similarity index 100% rename from server/src/api/@generated/refresh-token/refresh-token-order-by-relation-aggregate.input.ts rename to server/src/core/@generated/refresh-token/refresh-token-order-by-relation-aggregate.input.ts diff --git a/server/src/api/@generated/refresh-token/refresh-token-order-by-with-aggregation.input.ts b/server/src/core/@generated/refresh-token/refresh-token-order-by-with-aggregation.input.ts similarity index 100% rename from server/src/api/@generated/refresh-token/refresh-token-order-by-with-aggregation.input.ts rename to server/src/core/@generated/refresh-token/refresh-token-order-by-with-aggregation.input.ts diff --git a/server/src/api/@generated/refresh-token/refresh-token-order-by-with-relation.input.ts b/server/src/core/@generated/refresh-token/refresh-token-order-by-with-relation.input.ts similarity index 100% rename from server/src/api/@generated/refresh-token/refresh-token-order-by-with-relation.input.ts rename to server/src/core/@generated/refresh-token/refresh-token-order-by-with-relation.input.ts diff --git a/server/src/api/@generated/refresh-token/refresh-token-scalar-field.enum.ts b/server/src/core/@generated/refresh-token/refresh-token-scalar-field.enum.ts similarity index 100% rename from server/src/api/@generated/refresh-token/refresh-token-scalar-field.enum.ts rename to server/src/core/@generated/refresh-token/refresh-token-scalar-field.enum.ts diff --git a/server/src/api/@generated/refresh-token/refresh-token-scalar-where-with-aggregates.input.ts b/server/src/core/@generated/refresh-token/refresh-token-scalar-where-with-aggregates.input.ts similarity index 100% rename from server/src/api/@generated/refresh-token/refresh-token-scalar-where-with-aggregates.input.ts rename to server/src/core/@generated/refresh-token/refresh-token-scalar-where-with-aggregates.input.ts diff --git a/server/src/api/@generated/refresh-token/refresh-token-scalar-where.input.ts b/server/src/core/@generated/refresh-token/refresh-token-scalar-where.input.ts similarity index 100% rename from server/src/api/@generated/refresh-token/refresh-token-scalar-where.input.ts rename to server/src/core/@generated/refresh-token/refresh-token-scalar-where.input.ts diff --git a/server/src/api/@generated/refresh-token/refresh-token-unchecked-create-nested-many-without-user.input.ts b/server/src/core/@generated/refresh-token/refresh-token-unchecked-create-nested-many-without-user.input.ts similarity index 100% rename from server/src/api/@generated/refresh-token/refresh-token-unchecked-create-nested-many-without-user.input.ts rename to server/src/core/@generated/refresh-token/refresh-token-unchecked-create-nested-many-without-user.input.ts diff --git a/server/src/api/@generated/refresh-token/refresh-token-unchecked-create-without-user.input.ts b/server/src/core/@generated/refresh-token/refresh-token-unchecked-create-without-user.input.ts similarity index 100% rename from server/src/api/@generated/refresh-token/refresh-token-unchecked-create-without-user.input.ts rename to server/src/core/@generated/refresh-token/refresh-token-unchecked-create-without-user.input.ts diff --git a/server/src/api/@generated/refresh-token/refresh-token-unchecked-create.input.ts b/server/src/core/@generated/refresh-token/refresh-token-unchecked-create.input.ts similarity index 100% rename from server/src/api/@generated/refresh-token/refresh-token-unchecked-create.input.ts rename to server/src/core/@generated/refresh-token/refresh-token-unchecked-create.input.ts diff --git a/server/src/api/@generated/refresh-token/refresh-token-unchecked-update-many-without-refresh-tokens.input.ts b/server/src/core/@generated/refresh-token/refresh-token-unchecked-update-many-without-refresh-tokens.input.ts similarity index 100% rename from server/src/api/@generated/refresh-token/refresh-token-unchecked-update-many-without-refresh-tokens.input.ts rename to server/src/core/@generated/refresh-token/refresh-token-unchecked-update-many-without-refresh-tokens.input.ts diff --git a/server/src/api/@generated/refresh-token/refresh-token-unchecked-update-many-without-user-nested.input.ts b/server/src/core/@generated/refresh-token/refresh-token-unchecked-update-many-without-user-nested.input.ts similarity index 100% rename from server/src/api/@generated/refresh-token/refresh-token-unchecked-update-many-without-user-nested.input.ts rename to server/src/core/@generated/refresh-token/refresh-token-unchecked-update-many-without-user-nested.input.ts diff --git a/server/src/api/@generated/refresh-token/refresh-token-unchecked-update-many.input.ts b/server/src/core/@generated/refresh-token/refresh-token-unchecked-update-many.input.ts similarity index 100% rename from server/src/api/@generated/refresh-token/refresh-token-unchecked-update-many.input.ts rename to server/src/core/@generated/refresh-token/refresh-token-unchecked-update-many.input.ts diff --git a/server/src/api/@generated/refresh-token/refresh-token-unchecked-update-without-user.input.ts b/server/src/core/@generated/refresh-token/refresh-token-unchecked-update-without-user.input.ts similarity index 100% rename from server/src/api/@generated/refresh-token/refresh-token-unchecked-update-without-user.input.ts rename to server/src/core/@generated/refresh-token/refresh-token-unchecked-update-without-user.input.ts diff --git a/server/src/api/@generated/refresh-token/refresh-token-unchecked-update.input.ts b/server/src/core/@generated/refresh-token/refresh-token-unchecked-update.input.ts similarity index 100% rename from server/src/api/@generated/refresh-token/refresh-token-unchecked-update.input.ts rename to server/src/core/@generated/refresh-token/refresh-token-unchecked-update.input.ts diff --git a/server/src/api/@generated/refresh-token/refresh-token-update-many-mutation.input.ts b/server/src/core/@generated/refresh-token/refresh-token-update-many-mutation.input.ts similarity index 100% rename from server/src/api/@generated/refresh-token/refresh-token-update-many-mutation.input.ts rename to server/src/core/@generated/refresh-token/refresh-token-update-many-mutation.input.ts diff --git a/server/src/api/@generated/refresh-token/refresh-token-update-many-with-where-without-user.input.ts b/server/src/core/@generated/refresh-token/refresh-token-update-many-with-where-without-user.input.ts similarity index 100% rename from server/src/api/@generated/refresh-token/refresh-token-update-many-with-where-without-user.input.ts rename to server/src/core/@generated/refresh-token/refresh-token-update-many-with-where-without-user.input.ts diff --git a/server/src/api/@generated/refresh-token/refresh-token-update-many-without-user-nested.input.ts b/server/src/core/@generated/refresh-token/refresh-token-update-many-without-user-nested.input.ts similarity index 100% rename from server/src/api/@generated/refresh-token/refresh-token-update-many-without-user-nested.input.ts rename to server/src/core/@generated/refresh-token/refresh-token-update-many-without-user-nested.input.ts diff --git a/server/src/api/@generated/refresh-token/refresh-token-update-with-where-unique-without-user.input.ts b/server/src/core/@generated/refresh-token/refresh-token-update-with-where-unique-without-user.input.ts similarity index 100% rename from server/src/api/@generated/refresh-token/refresh-token-update-with-where-unique-without-user.input.ts rename to server/src/core/@generated/refresh-token/refresh-token-update-with-where-unique-without-user.input.ts diff --git a/server/src/api/@generated/refresh-token/refresh-token-update-without-user.input.ts b/server/src/core/@generated/refresh-token/refresh-token-update-without-user.input.ts similarity index 100% rename from server/src/api/@generated/refresh-token/refresh-token-update-without-user.input.ts rename to server/src/core/@generated/refresh-token/refresh-token-update-without-user.input.ts diff --git a/server/src/api/@generated/refresh-token/refresh-token-update.input.ts b/server/src/core/@generated/refresh-token/refresh-token-update.input.ts similarity index 100% rename from server/src/api/@generated/refresh-token/refresh-token-update.input.ts rename to server/src/core/@generated/refresh-token/refresh-token-update.input.ts diff --git a/server/src/api/@generated/refresh-token/refresh-token-upsert-with-where-unique-without-user.input.ts b/server/src/core/@generated/refresh-token/refresh-token-upsert-with-where-unique-without-user.input.ts similarity index 100% rename from server/src/api/@generated/refresh-token/refresh-token-upsert-with-where-unique-without-user.input.ts rename to server/src/core/@generated/refresh-token/refresh-token-upsert-with-where-unique-without-user.input.ts diff --git a/server/src/api/@generated/refresh-token/refresh-token-where-unique.input.ts b/server/src/core/@generated/refresh-token/refresh-token-where-unique.input.ts similarity index 100% rename from server/src/api/@generated/refresh-token/refresh-token-where-unique.input.ts rename to server/src/core/@generated/refresh-token/refresh-token-where-unique.input.ts diff --git a/server/src/api/@generated/refresh-token/refresh-token-where.input.ts b/server/src/core/@generated/refresh-token/refresh-token-where.input.ts similarity index 100% rename from server/src/api/@generated/refresh-token/refresh-token-where.input.ts rename to server/src/core/@generated/refresh-token/refresh-token-where.input.ts diff --git a/server/src/api/@generated/refresh-token/refresh-token.model.ts b/server/src/core/@generated/refresh-token/refresh-token.model.ts similarity index 100% rename from server/src/api/@generated/refresh-token/refresh-token.model.ts rename to server/src/core/@generated/refresh-token/refresh-token.model.ts diff --git a/server/src/api/@generated/refresh-token/update-many-refresh-token.args.ts b/server/src/core/@generated/refresh-token/update-many-refresh-token.args.ts similarity index 100% rename from server/src/api/@generated/refresh-token/update-many-refresh-token.args.ts rename to server/src/core/@generated/refresh-token/update-many-refresh-token.args.ts diff --git a/server/src/api/@generated/refresh-token/update-one-refresh-token.args.ts b/server/src/core/@generated/refresh-token/update-one-refresh-token.args.ts similarity index 100% rename from server/src/api/@generated/refresh-token/update-one-refresh-token.args.ts rename to server/src/core/@generated/refresh-token/update-one-refresh-token.args.ts diff --git a/server/src/api/@generated/refresh-token/upsert-one-refresh-token.args.ts b/server/src/core/@generated/refresh-token/upsert-one-refresh-token.args.ts similarity index 100% rename from server/src/api/@generated/refresh-token/upsert-one-refresh-token.args.ts rename to server/src/core/@generated/refresh-token/upsert-one-refresh-token.args.ts diff --git a/server/src/api/@generated/user/aggregate-user.output.ts b/server/src/core/@generated/user/aggregate-user.output.ts similarity index 100% rename from server/src/api/@generated/user/aggregate-user.output.ts rename to server/src/core/@generated/user/aggregate-user.output.ts diff --git a/server/src/api/@generated/user/create-many-user.args.ts b/server/src/core/@generated/user/create-many-user.args.ts similarity index 100% rename from server/src/api/@generated/user/create-many-user.args.ts rename to server/src/core/@generated/user/create-many-user.args.ts diff --git a/server/src/api/@generated/user/create-one-user.args.ts b/server/src/core/@generated/user/create-one-user.args.ts similarity index 100% rename from server/src/api/@generated/user/create-one-user.args.ts rename to server/src/core/@generated/user/create-one-user.args.ts diff --git a/server/src/api/@generated/user/delete-many-user.args.ts b/server/src/core/@generated/user/delete-many-user.args.ts similarity index 100% rename from server/src/api/@generated/user/delete-many-user.args.ts rename to server/src/core/@generated/user/delete-many-user.args.ts diff --git a/server/src/api/@generated/user/delete-one-user.args.ts b/server/src/core/@generated/user/delete-one-user.args.ts similarity index 100% rename from server/src/api/@generated/user/delete-one-user.args.ts rename to server/src/core/@generated/user/delete-one-user.args.ts diff --git a/server/src/api/@generated/user/find-first-user-or-throw.args.ts b/server/src/core/@generated/user/find-first-user-or-throw.args.ts similarity index 100% rename from server/src/api/@generated/user/find-first-user-or-throw.args.ts rename to server/src/core/@generated/user/find-first-user-or-throw.args.ts diff --git a/server/src/api/@generated/user/find-first-user.args.ts b/server/src/core/@generated/user/find-first-user.args.ts similarity index 100% rename from server/src/api/@generated/user/find-first-user.args.ts rename to server/src/core/@generated/user/find-first-user.args.ts diff --git a/server/src/api/@generated/user/find-many-user.args.ts b/server/src/core/@generated/user/find-many-user.args.ts similarity index 100% rename from server/src/api/@generated/user/find-many-user.args.ts rename to server/src/core/@generated/user/find-many-user.args.ts diff --git a/server/src/api/@generated/user/find-unique-user-or-throw.args.ts b/server/src/core/@generated/user/find-unique-user-or-throw.args.ts similarity index 100% rename from server/src/api/@generated/user/find-unique-user-or-throw.args.ts rename to server/src/core/@generated/user/find-unique-user-or-throw.args.ts diff --git a/server/src/api/@generated/user/find-unique-user.args.ts b/server/src/core/@generated/user/find-unique-user.args.ts similarity index 100% rename from server/src/api/@generated/user/find-unique-user.args.ts rename to server/src/core/@generated/user/find-unique-user.args.ts diff --git a/server/src/api/@generated/user/update-many-user.args.ts b/server/src/core/@generated/user/update-many-user.args.ts similarity index 100% rename from server/src/api/@generated/user/update-many-user.args.ts rename to server/src/core/@generated/user/update-many-user.args.ts diff --git a/server/src/api/@generated/user/update-one-user.args.ts b/server/src/core/@generated/user/update-one-user.args.ts similarity index 100% rename from server/src/api/@generated/user/update-one-user.args.ts rename to server/src/core/@generated/user/update-one-user.args.ts diff --git a/server/src/api/@generated/user/upsert-one-user.args.ts b/server/src/core/@generated/user/upsert-one-user.args.ts similarity index 100% rename from server/src/api/@generated/user/upsert-one-user.args.ts rename to server/src/core/@generated/user/upsert-one-user.args.ts diff --git a/server/src/api/@generated/user/user-aggregate.args.ts b/server/src/core/@generated/user/user-aggregate.args.ts similarity index 100% rename from server/src/api/@generated/user/user-aggregate.args.ts rename to server/src/core/@generated/user/user-aggregate.args.ts diff --git a/server/src/api/@generated/user/user-count-aggregate.input.ts b/server/src/core/@generated/user/user-count-aggregate.input.ts similarity index 100% rename from server/src/api/@generated/user/user-count-aggregate.input.ts rename to server/src/core/@generated/user/user-count-aggregate.input.ts diff --git a/server/src/api/@generated/user/user-count-aggregate.output.ts b/server/src/core/@generated/user/user-count-aggregate.output.ts similarity index 100% rename from server/src/api/@generated/user/user-count-aggregate.output.ts rename to server/src/core/@generated/user/user-count-aggregate.output.ts diff --git a/server/src/api/@generated/user/user-count-order-by-aggregate.input.ts b/server/src/core/@generated/user/user-count-order-by-aggregate.input.ts similarity index 100% rename from server/src/api/@generated/user/user-count-order-by-aggregate.input.ts rename to server/src/core/@generated/user/user-count-order-by-aggregate.input.ts diff --git a/server/src/api/@generated/user/user-count.output.ts b/server/src/core/@generated/user/user-count.output.ts similarity index 100% rename from server/src/api/@generated/user/user-count.output.ts rename to server/src/core/@generated/user/user-count.output.ts diff --git a/server/src/api/@generated/user/user-create-many.input.ts b/server/src/core/@generated/user/user-create-many.input.ts similarity index 100% rename from server/src/api/@generated/user/user-create-many.input.ts rename to server/src/core/@generated/user/user-create-many.input.ts diff --git a/server/src/api/@generated/user/user-create-nested-one-without-comments.input.ts b/server/src/core/@generated/user/user-create-nested-one-without-comments.input.ts similarity index 100% rename from server/src/api/@generated/user/user-create-nested-one-without-comments.input.ts rename to server/src/core/@generated/user/user-create-nested-one-without-comments.input.ts diff --git a/server/src/api/@generated/user/user-create-nested-one-without-companies.input.ts b/server/src/core/@generated/user/user-create-nested-one-without-companies.input.ts similarity index 100% rename from server/src/api/@generated/user/user-create-nested-one-without-companies.input.ts rename to server/src/core/@generated/user/user-create-nested-one-without-companies.input.ts diff --git a/server/src/api/@generated/user/user-create-nested-one-without-refresh-tokens.input.ts b/server/src/core/@generated/user/user-create-nested-one-without-refresh-tokens.input.ts similarity index 100% rename from server/src/api/@generated/user/user-create-nested-one-without-refresh-tokens.input.ts rename to server/src/core/@generated/user/user-create-nested-one-without-refresh-tokens.input.ts diff --git a/server/src/api/@generated/user/user-create-nested-one-without-workspace-member.input.ts b/server/src/core/@generated/user/user-create-nested-one-without-workspace-member.input.ts similarity index 100% rename from server/src/api/@generated/user/user-create-nested-one-without-workspace-member.input.ts rename to server/src/core/@generated/user/user-create-nested-one-without-workspace-member.input.ts diff --git a/server/src/api/@generated/user/user-create-or-connect-without-comments.input.ts b/server/src/core/@generated/user/user-create-or-connect-without-comments.input.ts similarity index 100% rename from server/src/api/@generated/user/user-create-or-connect-without-comments.input.ts rename to server/src/core/@generated/user/user-create-or-connect-without-comments.input.ts diff --git a/server/src/api/@generated/user/user-create-or-connect-without-companies.input.ts b/server/src/core/@generated/user/user-create-or-connect-without-companies.input.ts similarity index 100% rename from server/src/api/@generated/user/user-create-or-connect-without-companies.input.ts rename to server/src/core/@generated/user/user-create-or-connect-without-companies.input.ts diff --git a/server/src/api/@generated/user/user-create-or-connect-without-refresh-tokens.input.ts b/server/src/core/@generated/user/user-create-or-connect-without-refresh-tokens.input.ts similarity index 100% rename from server/src/api/@generated/user/user-create-or-connect-without-refresh-tokens.input.ts rename to server/src/core/@generated/user/user-create-or-connect-without-refresh-tokens.input.ts diff --git a/server/src/api/@generated/user/user-create-or-connect-without-workspace-member.input.ts b/server/src/core/@generated/user/user-create-or-connect-without-workspace-member.input.ts similarity index 100% rename from server/src/api/@generated/user/user-create-or-connect-without-workspace-member.input.ts rename to server/src/core/@generated/user/user-create-or-connect-without-workspace-member.input.ts diff --git a/server/src/api/@generated/user/user-create-without-comments.input.ts b/server/src/core/@generated/user/user-create-without-comments.input.ts similarity index 100% rename from server/src/api/@generated/user/user-create-without-comments.input.ts rename to server/src/core/@generated/user/user-create-without-comments.input.ts diff --git a/server/src/api/@generated/user/user-create-without-companies.input.ts b/server/src/core/@generated/user/user-create-without-companies.input.ts similarity index 100% rename from server/src/api/@generated/user/user-create-without-companies.input.ts rename to server/src/core/@generated/user/user-create-without-companies.input.ts diff --git a/server/src/api/@generated/user/user-create-without-refresh-tokens.input.ts b/server/src/core/@generated/user/user-create-without-refresh-tokens.input.ts similarity index 100% rename from server/src/api/@generated/user/user-create-without-refresh-tokens.input.ts rename to server/src/core/@generated/user/user-create-without-refresh-tokens.input.ts diff --git a/server/src/api/@generated/user/user-create-without-workspace-member.input.ts b/server/src/core/@generated/user/user-create-without-workspace-member.input.ts similarity index 100% rename from server/src/api/@generated/user/user-create-without-workspace-member.input.ts rename to server/src/core/@generated/user/user-create-without-workspace-member.input.ts diff --git a/server/src/api/@generated/user/user-create.input.ts b/server/src/core/@generated/user/user-create.input.ts similarity index 100% rename from server/src/api/@generated/user/user-create.input.ts rename to server/src/core/@generated/user/user-create.input.ts diff --git a/server/src/api/@generated/user/user-group-by.args.ts b/server/src/core/@generated/user/user-group-by.args.ts similarity index 100% rename from server/src/api/@generated/user/user-group-by.args.ts rename to server/src/core/@generated/user/user-group-by.args.ts diff --git a/server/src/api/@generated/user/user-group-by.output.ts b/server/src/core/@generated/user/user-group-by.output.ts similarity index 100% rename from server/src/api/@generated/user/user-group-by.output.ts rename to server/src/core/@generated/user/user-group-by.output.ts diff --git a/server/src/api/@generated/user/user-max-aggregate.input.ts b/server/src/core/@generated/user/user-max-aggregate.input.ts similarity index 100% rename from server/src/api/@generated/user/user-max-aggregate.input.ts rename to server/src/core/@generated/user/user-max-aggregate.input.ts diff --git a/server/src/api/@generated/user/user-max-aggregate.output.ts b/server/src/core/@generated/user/user-max-aggregate.output.ts similarity index 100% rename from server/src/api/@generated/user/user-max-aggregate.output.ts rename to server/src/core/@generated/user/user-max-aggregate.output.ts diff --git a/server/src/api/@generated/user/user-max-order-by-aggregate.input.ts b/server/src/core/@generated/user/user-max-order-by-aggregate.input.ts similarity index 100% rename from server/src/api/@generated/user/user-max-order-by-aggregate.input.ts rename to server/src/core/@generated/user/user-max-order-by-aggregate.input.ts diff --git a/server/src/api/@generated/user/user-min-aggregate.input.ts b/server/src/core/@generated/user/user-min-aggregate.input.ts similarity index 100% rename from server/src/api/@generated/user/user-min-aggregate.input.ts rename to server/src/core/@generated/user/user-min-aggregate.input.ts diff --git a/server/src/api/@generated/user/user-min-aggregate.output.ts b/server/src/core/@generated/user/user-min-aggregate.output.ts similarity index 100% rename from server/src/api/@generated/user/user-min-aggregate.output.ts rename to server/src/core/@generated/user/user-min-aggregate.output.ts diff --git a/server/src/api/@generated/user/user-min-order-by-aggregate.input.ts b/server/src/core/@generated/user/user-min-order-by-aggregate.input.ts similarity index 100% rename from server/src/api/@generated/user/user-min-order-by-aggregate.input.ts rename to server/src/core/@generated/user/user-min-order-by-aggregate.input.ts diff --git a/server/src/api/@generated/user/user-order-by-with-aggregation.input.ts b/server/src/core/@generated/user/user-order-by-with-aggregation.input.ts similarity index 100% rename from server/src/api/@generated/user/user-order-by-with-aggregation.input.ts rename to server/src/core/@generated/user/user-order-by-with-aggregation.input.ts diff --git a/server/src/api/@generated/user/user-order-by-with-relation.input.ts b/server/src/core/@generated/user/user-order-by-with-relation.input.ts similarity index 100% rename from server/src/api/@generated/user/user-order-by-with-relation.input.ts rename to server/src/core/@generated/user/user-order-by-with-relation.input.ts diff --git a/server/src/api/@generated/user/user-relation-filter.input.ts b/server/src/core/@generated/user/user-relation-filter.input.ts similarity index 100% rename from server/src/api/@generated/user/user-relation-filter.input.ts rename to server/src/core/@generated/user/user-relation-filter.input.ts diff --git a/server/src/api/@generated/user/user-scalar-field.enum.ts b/server/src/core/@generated/user/user-scalar-field.enum.ts similarity index 100% rename from server/src/api/@generated/user/user-scalar-field.enum.ts rename to server/src/core/@generated/user/user-scalar-field.enum.ts diff --git a/server/src/api/@generated/user/user-scalar-where-with-aggregates.input.ts b/server/src/core/@generated/user/user-scalar-where-with-aggregates.input.ts similarity index 100% rename from server/src/api/@generated/user/user-scalar-where-with-aggregates.input.ts rename to server/src/core/@generated/user/user-scalar-where-with-aggregates.input.ts diff --git a/server/src/api/@generated/user/user-unchecked-create-without-comments.input.ts b/server/src/core/@generated/user/user-unchecked-create-without-comments.input.ts similarity index 100% rename from server/src/api/@generated/user/user-unchecked-create-without-comments.input.ts rename to server/src/core/@generated/user/user-unchecked-create-without-comments.input.ts diff --git a/server/src/api/@generated/user/user-unchecked-create-without-companies.input.ts b/server/src/core/@generated/user/user-unchecked-create-without-companies.input.ts similarity index 100% rename from server/src/api/@generated/user/user-unchecked-create-without-companies.input.ts rename to server/src/core/@generated/user/user-unchecked-create-without-companies.input.ts diff --git a/server/src/api/@generated/user/user-unchecked-create-without-refresh-tokens.input.ts b/server/src/core/@generated/user/user-unchecked-create-without-refresh-tokens.input.ts similarity index 100% rename from server/src/api/@generated/user/user-unchecked-create-without-refresh-tokens.input.ts rename to server/src/core/@generated/user/user-unchecked-create-without-refresh-tokens.input.ts diff --git a/server/src/api/@generated/user/user-unchecked-create-without-workspace-member.input.ts b/server/src/core/@generated/user/user-unchecked-create-without-workspace-member.input.ts similarity index 100% rename from server/src/api/@generated/user/user-unchecked-create-without-workspace-member.input.ts rename to server/src/core/@generated/user/user-unchecked-create-without-workspace-member.input.ts diff --git a/server/src/api/@generated/user/user-unchecked-create.input.ts b/server/src/core/@generated/user/user-unchecked-create.input.ts similarity index 100% rename from server/src/api/@generated/user/user-unchecked-create.input.ts rename to server/src/core/@generated/user/user-unchecked-create.input.ts diff --git a/server/src/api/@generated/user/user-unchecked-update-many.input.ts b/server/src/core/@generated/user/user-unchecked-update-many.input.ts similarity index 100% rename from server/src/api/@generated/user/user-unchecked-update-many.input.ts rename to server/src/core/@generated/user/user-unchecked-update-many.input.ts diff --git a/server/src/api/@generated/user/user-unchecked-update-without-comments.input.ts b/server/src/core/@generated/user/user-unchecked-update-without-comments.input.ts similarity index 100% rename from server/src/api/@generated/user/user-unchecked-update-without-comments.input.ts rename to server/src/core/@generated/user/user-unchecked-update-without-comments.input.ts diff --git a/server/src/api/@generated/user/user-unchecked-update-without-companies.input.ts b/server/src/core/@generated/user/user-unchecked-update-without-companies.input.ts similarity index 100% rename from server/src/api/@generated/user/user-unchecked-update-without-companies.input.ts rename to server/src/core/@generated/user/user-unchecked-update-without-companies.input.ts diff --git a/server/src/api/@generated/user/user-unchecked-update-without-refresh-tokens.input.ts b/server/src/core/@generated/user/user-unchecked-update-without-refresh-tokens.input.ts similarity index 100% rename from server/src/api/@generated/user/user-unchecked-update-without-refresh-tokens.input.ts rename to server/src/core/@generated/user/user-unchecked-update-without-refresh-tokens.input.ts diff --git a/server/src/api/@generated/user/user-unchecked-update-without-workspace-member.input.ts b/server/src/core/@generated/user/user-unchecked-update-without-workspace-member.input.ts similarity index 100% rename from server/src/api/@generated/user/user-unchecked-update-without-workspace-member.input.ts rename to server/src/core/@generated/user/user-unchecked-update-without-workspace-member.input.ts diff --git a/server/src/api/@generated/user/user-unchecked-update.input.ts b/server/src/core/@generated/user/user-unchecked-update.input.ts similarity index 100% rename from server/src/api/@generated/user/user-unchecked-update.input.ts rename to server/src/core/@generated/user/user-unchecked-update.input.ts diff --git a/server/src/api/@generated/user/user-update-many-mutation.input.ts b/server/src/core/@generated/user/user-update-many-mutation.input.ts similarity index 100% rename from server/src/api/@generated/user/user-update-many-mutation.input.ts rename to server/src/core/@generated/user/user-update-many-mutation.input.ts diff --git a/server/src/api/@generated/user/user-update-one-required-without-comments-nested.input.ts b/server/src/core/@generated/user/user-update-one-required-without-comments-nested.input.ts similarity index 100% rename from server/src/api/@generated/user/user-update-one-required-without-comments-nested.input.ts rename to server/src/core/@generated/user/user-update-one-required-without-comments-nested.input.ts diff --git a/server/src/api/@generated/user/user-update-one-required-without-refresh-tokens-nested.input.ts b/server/src/core/@generated/user/user-update-one-required-without-refresh-tokens-nested.input.ts similarity index 100% rename from server/src/api/@generated/user/user-update-one-required-without-refresh-tokens-nested.input.ts rename to server/src/core/@generated/user/user-update-one-required-without-refresh-tokens-nested.input.ts diff --git a/server/src/api/@generated/user/user-update-one-required-without-workspace-member-nested.input.ts b/server/src/core/@generated/user/user-update-one-required-without-workspace-member-nested.input.ts similarity index 100% rename from server/src/api/@generated/user/user-update-one-required-without-workspace-member-nested.input.ts rename to server/src/core/@generated/user/user-update-one-required-without-workspace-member-nested.input.ts diff --git a/server/src/api/@generated/user/user-update-one-without-companies-nested.input.ts b/server/src/core/@generated/user/user-update-one-without-companies-nested.input.ts similarity index 100% rename from server/src/api/@generated/user/user-update-one-without-companies-nested.input.ts rename to server/src/core/@generated/user/user-update-one-without-companies-nested.input.ts diff --git a/server/src/api/@generated/user/user-update-without-comments.input.ts b/server/src/core/@generated/user/user-update-without-comments.input.ts similarity index 100% rename from server/src/api/@generated/user/user-update-without-comments.input.ts rename to server/src/core/@generated/user/user-update-without-comments.input.ts diff --git a/server/src/api/@generated/user/user-update-without-companies.input.ts b/server/src/core/@generated/user/user-update-without-companies.input.ts similarity index 100% rename from server/src/api/@generated/user/user-update-without-companies.input.ts rename to server/src/core/@generated/user/user-update-without-companies.input.ts diff --git a/server/src/api/@generated/user/user-update-without-refresh-tokens.input.ts b/server/src/core/@generated/user/user-update-without-refresh-tokens.input.ts similarity index 100% rename from server/src/api/@generated/user/user-update-without-refresh-tokens.input.ts rename to server/src/core/@generated/user/user-update-without-refresh-tokens.input.ts diff --git a/server/src/api/@generated/user/user-update-without-workspace-member.input.ts b/server/src/core/@generated/user/user-update-without-workspace-member.input.ts similarity index 100% rename from server/src/api/@generated/user/user-update-without-workspace-member.input.ts rename to server/src/core/@generated/user/user-update-without-workspace-member.input.ts diff --git a/server/src/api/@generated/user/user-update.input.ts b/server/src/core/@generated/user/user-update.input.ts similarity index 100% rename from server/src/api/@generated/user/user-update.input.ts rename to server/src/core/@generated/user/user-update.input.ts diff --git a/server/src/api/@generated/user/user-upsert-without-comments.input.ts b/server/src/core/@generated/user/user-upsert-without-comments.input.ts similarity index 100% rename from server/src/api/@generated/user/user-upsert-without-comments.input.ts rename to server/src/core/@generated/user/user-upsert-without-comments.input.ts diff --git a/server/src/api/@generated/user/user-upsert-without-companies.input.ts b/server/src/core/@generated/user/user-upsert-without-companies.input.ts similarity index 100% rename from server/src/api/@generated/user/user-upsert-without-companies.input.ts rename to server/src/core/@generated/user/user-upsert-without-companies.input.ts diff --git a/server/src/api/@generated/user/user-upsert-without-refresh-tokens.input.ts b/server/src/core/@generated/user/user-upsert-without-refresh-tokens.input.ts similarity index 100% rename from server/src/api/@generated/user/user-upsert-without-refresh-tokens.input.ts rename to server/src/core/@generated/user/user-upsert-without-refresh-tokens.input.ts diff --git a/server/src/api/@generated/user/user-upsert-without-workspace-member.input.ts b/server/src/core/@generated/user/user-upsert-without-workspace-member.input.ts similarity index 100% rename from server/src/api/@generated/user/user-upsert-without-workspace-member.input.ts rename to server/src/core/@generated/user/user-upsert-without-workspace-member.input.ts diff --git a/server/src/api/@generated/user/user-where-unique.input.ts b/server/src/core/@generated/user/user-where-unique.input.ts similarity index 100% rename from server/src/api/@generated/user/user-where-unique.input.ts rename to server/src/core/@generated/user/user-where-unique.input.ts diff --git a/server/src/api/@generated/user/user-where.input.ts b/server/src/core/@generated/user/user-where.input.ts similarity index 100% rename from server/src/api/@generated/user/user-where.input.ts rename to server/src/core/@generated/user/user-where.input.ts diff --git a/server/src/api/@generated/user/user.model.ts b/server/src/core/@generated/user/user.model.ts similarity index 100% rename from server/src/api/@generated/user/user.model.ts rename to server/src/core/@generated/user/user.model.ts diff --git a/server/src/api/@generated/workspace-member/aggregate-workspace-member.output.ts b/server/src/core/@generated/workspace-member/aggregate-workspace-member.output.ts similarity index 100% rename from server/src/api/@generated/workspace-member/aggregate-workspace-member.output.ts rename to server/src/core/@generated/workspace-member/aggregate-workspace-member.output.ts diff --git a/server/src/api/@generated/workspace-member/create-many-workspace-member.args.ts b/server/src/core/@generated/workspace-member/create-many-workspace-member.args.ts similarity index 100% rename from server/src/api/@generated/workspace-member/create-many-workspace-member.args.ts rename to server/src/core/@generated/workspace-member/create-many-workspace-member.args.ts diff --git a/server/src/api/@generated/workspace-member/create-one-workspace-member.args.ts b/server/src/core/@generated/workspace-member/create-one-workspace-member.args.ts similarity index 100% rename from server/src/api/@generated/workspace-member/create-one-workspace-member.args.ts rename to server/src/core/@generated/workspace-member/create-one-workspace-member.args.ts diff --git a/server/src/api/@generated/workspace-member/delete-many-workspace-member.args.ts b/server/src/core/@generated/workspace-member/delete-many-workspace-member.args.ts similarity index 100% rename from server/src/api/@generated/workspace-member/delete-many-workspace-member.args.ts rename to server/src/core/@generated/workspace-member/delete-many-workspace-member.args.ts diff --git a/server/src/api/@generated/workspace-member/delete-one-workspace-member.args.ts b/server/src/core/@generated/workspace-member/delete-one-workspace-member.args.ts similarity index 100% rename from server/src/api/@generated/workspace-member/delete-one-workspace-member.args.ts rename to server/src/core/@generated/workspace-member/delete-one-workspace-member.args.ts diff --git a/server/src/api/@generated/workspace-member/find-first-workspace-member-or-throw.args.ts b/server/src/core/@generated/workspace-member/find-first-workspace-member-or-throw.args.ts similarity index 100% rename from server/src/api/@generated/workspace-member/find-first-workspace-member-or-throw.args.ts rename to server/src/core/@generated/workspace-member/find-first-workspace-member-or-throw.args.ts diff --git a/server/src/api/@generated/workspace-member/find-first-workspace-member.args.ts b/server/src/core/@generated/workspace-member/find-first-workspace-member.args.ts similarity index 100% rename from server/src/api/@generated/workspace-member/find-first-workspace-member.args.ts rename to server/src/core/@generated/workspace-member/find-first-workspace-member.args.ts diff --git a/server/src/api/@generated/workspace-member/find-many-workspace-member.args.ts b/server/src/core/@generated/workspace-member/find-many-workspace-member.args.ts similarity index 100% rename from server/src/api/@generated/workspace-member/find-many-workspace-member.args.ts rename to server/src/core/@generated/workspace-member/find-many-workspace-member.args.ts diff --git a/server/src/api/@generated/workspace-member/find-unique-workspace-member-or-throw.args.ts b/server/src/core/@generated/workspace-member/find-unique-workspace-member-or-throw.args.ts similarity index 100% rename from server/src/api/@generated/workspace-member/find-unique-workspace-member-or-throw.args.ts rename to server/src/core/@generated/workspace-member/find-unique-workspace-member-or-throw.args.ts diff --git a/server/src/api/@generated/workspace-member/find-unique-workspace-member.args.ts b/server/src/core/@generated/workspace-member/find-unique-workspace-member.args.ts similarity index 100% rename from server/src/api/@generated/workspace-member/find-unique-workspace-member.args.ts rename to server/src/core/@generated/workspace-member/find-unique-workspace-member.args.ts diff --git a/server/src/api/@generated/workspace-member/update-many-workspace-member.args.ts b/server/src/core/@generated/workspace-member/update-many-workspace-member.args.ts similarity index 100% rename from server/src/api/@generated/workspace-member/update-many-workspace-member.args.ts rename to server/src/core/@generated/workspace-member/update-many-workspace-member.args.ts diff --git a/server/src/api/@generated/workspace-member/update-one-workspace-member.args.ts b/server/src/core/@generated/workspace-member/update-one-workspace-member.args.ts similarity index 100% rename from server/src/api/@generated/workspace-member/update-one-workspace-member.args.ts rename to server/src/core/@generated/workspace-member/update-one-workspace-member.args.ts diff --git a/server/src/api/@generated/workspace-member/upsert-one-workspace-member.args.ts b/server/src/core/@generated/workspace-member/upsert-one-workspace-member.args.ts similarity index 100% rename from server/src/api/@generated/workspace-member/upsert-one-workspace-member.args.ts rename to server/src/core/@generated/workspace-member/upsert-one-workspace-member.args.ts diff --git a/server/src/api/@generated/workspace-member/workspace-member-aggregate.args.ts b/server/src/core/@generated/workspace-member/workspace-member-aggregate.args.ts similarity index 100% rename from server/src/api/@generated/workspace-member/workspace-member-aggregate.args.ts rename to server/src/core/@generated/workspace-member/workspace-member-aggregate.args.ts diff --git a/server/src/api/@generated/workspace-member/workspace-member-count-aggregate.input.ts b/server/src/core/@generated/workspace-member/workspace-member-count-aggregate.input.ts similarity index 100% rename from server/src/api/@generated/workspace-member/workspace-member-count-aggregate.input.ts rename to server/src/core/@generated/workspace-member/workspace-member-count-aggregate.input.ts diff --git a/server/src/api/@generated/workspace-member/workspace-member-count-aggregate.output.ts b/server/src/core/@generated/workspace-member/workspace-member-count-aggregate.output.ts similarity index 100% rename from server/src/api/@generated/workspace-member/workspace-member-count-aggregate.output.ts rename to server/src/core/@generated/workspace-member/workspace-member-count-aggregate.output.ts diff --git a/server/src/api/@generated/workspace-member/workspace-member-count-order-by-aggregate.input.ts b/server/src/core/@generated/workspace-member/workspace-member-count-order-by-aggregate.input.ts similarity index 100% rename from server/src/api/@generated/workspace-member/workspace-member-count-order-by-aggregate.input.ts rename to server/src/core/@generated/workspace-member/workspace-member-count-order-by-aggregate.input.ts diff --git a/server/src/api/@generated/workspace-member/workspace-member-create-many-workspace-input-envelope.input.ts b/server/src/core/@generated/workspace-member/workspace-member-create-many-workspace-input-envelope.input.ts similarity index 100% rename from server/src/api/@generated/workspace-member/workspace-member-create-many-workspace-input-envelope.input.ts rename to server/src/core/@generated/workspace-member/workspace-member-create-many-workspace-input-envelope.input.ts diff --git a/server/src/api/@generated/workspace-member/workspace-member-create-many-workspace.input.ts b/server/src/core/@generated/workspace-member/workspace-member-create-many-workspace.input.ts similarity index 100% rename from server/src/api/@generated/workspace-member/workspace-member-create-many-workspace.input.ts rename to server/src/core/@generated/workspace-member/workspace-member-create-many-workspace.input.ts diff --git a/server/src/api/@generated/workspace-member/workspace-member-create-many.input.ts b/server/src/core/@generated/workspace-member/workspace-member-create-many.input.ts similarity index 100% rename from server/src/api/@generated/workspace-member/workspace-member-create-many.input.ts rename to server/src/core/@generated/workspace-member/workspace-member-create-many.input.ts diff --git a/server/src/api/@generated/workspace-member/workspace-member-create-nested-many-without-workspace.input.ts b/server/src/core/@generated/workspace-member/workspace-member-create-nested-many-without-workspace.input.ts similarity index 100% rename from server/src/api/@generated/workspace-member/workspace-member-create-nested-many-without-workspace.input.ts rename to server/src/core/@generated/workspace-member/workspace-member-create-nested-many-without-workspace.input.ts diff --git a/server/src/api/@generated/workspace-member/workspace-member-create-nested-one-without-user.input.ts b/server/src/core/@generated/workspace-member/workspace-member-create-nested-one-without-user.input.ts similarity index 100% rename from server/src/api/@generated/workspace-member/workspace-member-create-nested-one-without-user.input.ts rename to server/src/core/@generated/workspace-member/workspace-member-create-nested-one-without-user.input.ts diff --git a/server/src/api/@generated/workspace-member/workspace-member-create-or-connect-without-user.input.ts b/server/src/core/@generated/workspace-member/workspace-member-create-or-connect-without-user.input.ts similarity index 100% rename from server/src/api/@generated/workspace-member/workspace-member-create-or-connect-without-user.input.ts rename to server/src/core/@generated/workspace-member/workspace-member-create-or-connect-without-user.input.ts diff --git a/server/src/api/@generated/workspace-member/workspace-member-create-or-connect-without-workspace.input.ts b/server/src/core/@generated/workspace-member/workspace-member-create-or-connect-without-workspace.input.ts similarity index 100% rename from server/src/api/@generated/workspace-member/workspace-member-create-or-connect-without-workspace.input.ts rename to server/src/core/@generated/workspace-member/workspace-member-create-or-connect-without-workspace.input.ts diff --git a/server/src/api/@generated/workspace-member/workspace-member-create-without-user.input.ts b/server/src/core/@generated/workspace-member/workspace-member-create-without-user.input.ts similarity index 100% rename from server/src/api/@generated/workspace-member/workspace-member-create-without-user.input.ts rename to server/src/core/@generated/workspace-member/workspace-member-create-without-user.input.ts diff --git a/server/src/api/@generated/workspace-member/workspace-member-create-without-workspace.input.ts b/server/src/core/@generated/workspace-member/workspace-member-create-without-workspace.input.ts similarity index 100% rename from server/src/api/@generated/workspace-member/workspace-member-create-without-workspace.input.ts rename to server/src/core/@generated/workspace-member/workspace-member-create-without-workspace.input.ts diff --git a/server/src/api/@generated/workspace-member/workspace-member-create.input.ts b/server/src/core/@generated/workspace-member/workspace-member-create.input.ts similarity index 100% rename from server/src/api/@generated/workspace-member/workspace-member-create.input.ts rename to server/src/core/@generated/workspace-member/workspace-member-create.input.ts diff --git a/server/src/api/@generated/workspace-member/workspace-member-group-by.args.ts b/server/src/core/@generated/workspace-member/workspace-member-group-by.args.ts similarity index 100% rename from server/src/api/@generated/workspace-member/workspace-member-group-by.args.ts rename to server/src/core/@generated/workspace-member/workspace-member-group-by.args.ts diff --git a/server/src/api/@generated/workspace-member/workspace-member-group-by.output.ts b/server/src/core/@generated/workspace-member/workspace-member-group-by.output.ts similarity index 100% rename from server/src/api/@generated/workspace-member/workspace-member-group-by.output.ts rename to server/src/core/@generated/workspace-member/workspace-member-group-by.output.ts diff --git a/server/src/api/@generated/workspace-member/workspace-member-list-relation-filter.input.ts b/server/src/core/@generated/workspace-member/workspace-member-list-relation-filter.input.ts similarity index 100% rename from server/src/api/@generated/workspace-member/workspace-member-list-relation-filter.input.ts rename to server/src/core/@generated/workspace-member/workspace-member-list-relation-filter.input.ts diff --git a/server/src/api/@generated/workspace-member/workspace-member-max-aggregate.input.ts b/server/src/core/@generated/workspace-member/workspace-member-max-aggregate.input.ts similarity index 100% rename from server/src/api/@generated/workspace-member/workspace-member-max-aggregate.input.ts rename to server/src/core/@generated/workspace-member/workspace-member-max-aggregate.input.ts diff --git a/server/src/api/@generated/workspace-member/workspace-member-max-aggregate.output.ts b/server/src/core/@generated/workspace-member/workspace-member-max-aggregate.output.ts similarity index 100% rename from server/src/api/@generated/workspace-member/workspace-member-max-aggregate.output.ts rename to server/src/core/@generated/workspace-member/workspace-member-max-aggregate.output.ts diff --git a/server/src/api/@generated/workspace-member/workspace-member-max-order-by-aggregate.input.ts b/server/src/core/@generated/workspace-member/workspace-member-max-order-by-aggregate.input.ts similarity index 100% rename from server/src/api/@generated/workspace-member/workspace-member-max-order-by-aggregate.input.ts rename to server/src/core/@generated/workspace-member/workspace-member-max-order-by-aggregate.input.ts diff --git a/server/src/api/@generated/workspace-member/workspace-member-min-aggregate.input.ts b/server/src/core/@generated/workspace-member/workspace-member-min-aggregate.input.ts similarity index 100% rename from server/src/api/@generated/workspace-member/workspace-member-min-aggregate.input.ts rename to server/src/core/@generated/workspace-member/workspace-member-min-aggregate.input.ts diff --git a/server/src/api/@generated/workspace-member/workspace-member-min-aggregate.output.ts b/server/src/core/@generated/workspace-member/workspace-member-min-aggregate.output.ts similarity index 100% rename from server/src/api/@generated/workspace-member/workspace-member-min-aggregate.output.ts rename to server/src/core/@generated/workspace-member/workspace-member-min-aggregate.output.ts diff --git a/server/src/api/@generated/workspace-member/workspace-member-min-order-by-aggregate.input.ts b/server/src/core/@generated/workspace-member/workspace-member-min-order-by-aggregate.input.ts similarity index 100% rename from server/src/api/@generated/workspace-member/workspace-member-min-order-by-aggregate.input.ts rename to server/src/core/@generated/workspace-member/workspace-member-min-order-by-aggregate.input.ts diff --git a/server/src/api/@generated/workspace-member/workspace-member-order-by-relation-aggregate.input.ts b/server/src/core/@generated/workspace-member/workspace-member-order-by-relation-aggregate.input.ts similarity index 100% rename from server/src/api/@generated/workspace-member/workspace-member-order-by-relation-aggregate.input.ts rename to server/src/core/@generated/workspace-member/workspace-member-order-by-relation-aggregate.input.ts diff --git a/server/src/api/@generated/workspace-member/workspace-member-order-by-with-aggregation.input.ts b/server/src/core/@generated/workspace-member/workspace-member-order-by-with-aggregation.input.ts similarity index 100% rename from server/src/api/@generated/workspace-member/workspace-member-order-by-with-aggregation.input.ts rename to server/src/core/@generated/workspace-member/workspace-member-order-by-with-aggregation.input.ts diff --git a/server/src/api/@generated/workspace-member/workspace-member-order-by-with-relation.input.ts b/server/src/core/@generated/workspace-member/workspace-member-order-by-with-relation.input.ts similarity index 100% rename from server/src/api/@generated/workspace-member/workspace-member-order-by-with-relation.input.ts rename to server/src/core/@generated/workspace-member/workspace-member-order-by-with-relation.input.ts diff --git a/server/src/api/@generated/workspace-member/workspace-member-relation-filter.input.ts b/server/src/core/@generated/workspace-member/workspace-member-relation-filter.input.ts similarity index 100% rename from server/src/api/@generated/workspace-member/workspace-member-relation-filter.input.ts rename to server/src/core/@generated/workspace-member/workspace-member-relation-filter.input.ts diff --git a/server/src/api/@generated/workspace-member/workspace-member-scalar-field.enum.ts b/server/src/core/@generated/workspace-member/workspace-member-scalar-field.enum.ts similarity index 100% rename from server/src/api/@generated/workspace-member/workspace-member-scalar-field.enum.ts rename to server/src/core/@generated/workspace-member/workspace-member-scalar-field.enum.ts diff --git a/server/src/api/@generated/workspace-member/workspace-member-scalar-where-with-aggregates.input.ts b/server/src/core/@generated/workspace-member/workspace-member-scalar-where-with-aggregates.input.ts similarity index 100% rename from server/src/api/@generated/workspace-member/workspace-member-scalar-where-with-aggregates.input.ts rename to server/src/core/@generated/workspace-member/workspace-member-scalar-where-with-aggregates.input.ts diff --git a/server/src/api/@generated/workspace-member/workspace-member-scalar-where.input.ts b/server/src/core/@generated/workspace-member/workspace-member-scalar-where.input.ts similarity index 100% rename from server/src/api/@generated/workspace-member/workspace-member-scalar-where.input.ts rename to server/src/core/@generated/workspace-member/workspace-member-scalar-where.input.ts diff --git a/server/src/api/@generated/workspace-member/workspace-member-unchecked-create-nested-many-without-workspace.input.ts b/server/src/core/@generated/workspace-member/workspace-member-unchecked-create-nested-many-without-workspace.input.ts similarity index 100% rename from server/src/api/@generated/workspace-member/workspace-member-unchecked-create-nested-many-without-workspace.input.ts rename to server/src/core/@generated/workspace-member/workspace-member-unchecked-create-nested-many-without-workspace.input.ts diff --git a/server/src/api/@generated/workspace-member/workspace-member-unchecked-create-nested-one-without-user.input.ts b/server/src/core/@generated/workspace-member/workspace-member-unchecked-create-nested-one-without-user.input.ts similarity index 100% rename from server/src/api/@generated/workspace-member/workspace-member-unchecked-create-nested-one-without-user.input.ts rename to server/src/core/@generated/workspace-member/workspace-member-unchecked-create-nested-one-without-user.input.ts diff --git a/server/src/api/@generated/workspace-member/workspace-member-unchecked-create-without-user.input.ts b/server/src/core/@generated/workspace-member/workspace-member-unchecked-create-without-user.input.ts similarity index 100% rename from server/src/api/@generated/workspace-member/workspace-member-unchecked-create-without-user.input.ts rename to server/src/core/@generated/workspace-member/workspace-member-unchecked-create-without-user.input.ts diff --git a/server/src/api/@generated/workspace-member/workspace-member-unchecked-create-without-workspace.input.ts b/server/src/core/@generated/workspace-member/workspace-member-unchecked-create-without-workspace.input.ts similarity index 100% rename from server/src/api/@generated/workspace-member/workspace-member-unchecked-create-without-workspace.input.ts rename to server/src/core/@generated/workspace-member/workspace-member-unchecked-create-without-workspace.input.ts diff --git a/server/src/api/@generated/workspace-member/workspace-member-unchecked-create.input.ts b/server/src/core/@generated/workspace-member/workspace-member-unchecked-create.input.ts similarity index 100% rename from server/src/api/@generated/workspace-member/workspace-member-unchecked-create.input.ts rename to server/src/core/@generated/workspace-member/workspace-member-unchecked-create.input.ts diff --git a/server/src/api/@generated/workspace-member/workspace-member-unchecked-update-many-without-workspace-member.input.ts b/server/src/core/@generated/workspace-member/workspace-member-unchecked-update-many-without-workspace-member.input.ts similarity index 100% rename from server/src/api/@generated/workspace-member/workspace-member-unchecked-update-many-without-workspace-member.input.ts rename to server/src/core/@generated/workspace-member/workspace-member-unchecked-update-many-without-workspace-member.input.ts diff --git a/server/src/api/@generated/workspace-member/workspace-member-unchecked-update-many-without-workspace-nested.input.ts b/server/src/core/@generated/workspace-member/workspace-member-unchecked-update-many-without-workspace-nested.input.ts similarity index 100% rename from server/src/api/@generated/workspace-member/workspace-member-unchecked-update-many-without-workspace-nested.input.ts rename to server/src/core/@generated/workspace-member/workspace-member-unchecked-update-many-without-workspace-nested.input.ts diff --git a/server/src/api/@generated/workspace-member/workspace-member-unchecked-update-many.input.ts b/server/src/core/@generated/workspace-member/workspace-member-unchecked-update-many.input.ts similarity index 100% rename from server/src/api/@generated/workspace-member/workspace-member-unchecked-update-many.input.ts rename to server/src/core/@generated/workspace-member/workspace-member-unchecked-update-many.input.ts diff --git a/server/src/api/@generated/workspace-member/workspace-member-unchecked-update-one-without-user-nested.input.ts b/server/src/core/@generated/workspace-member/workspace-member-unchecked-update-one-without-user-nested.input.ts similarity index 100% rename from server/src/api/@generated/workspace-member/workspace-member-unchecked-update-one-without-user-nested.input.ts rename to server/src/core/@generated/workspace-member/workspace-member-unchecked-update-one-without-user-nested.input.ts diff --git a/server/src/api/@generated/workspace-member/workspace-member-unchecked-update-without-user.input.ts b/server/src/core/@generated/workspace-member/workspace-member-unchecked-update-without-user.input.ts similarity index 100% rename from server/src/api/@generated/workspace-member/workspace-member-unchecked-update-without-user.input.ts rename to server/src/core/@generated/workspace-member/workspace-member-unchecked-update-without-user.input.ts diff --git a/server/src/api/@generated/workspace-member/workspace-member-unchecked-update-without-workspace.input.ts b/server/src/core/@generated/workspace-member/workspace-member-unchecked-update-without-workspace.input.ts similarity index 100% rename from server/src/api/@generated/workspace-member/workspace-member-unchecked-update-without-workspace.input.ts rename to server/src/core/@generated/workspace-member/workspace-member-unchecked-update-without-workspace.input.ts diff --git a/server/src/api/@generated/workspace-member/workspace-member-unchecked-update.input.ts b/server/src/core/@generated/workspace-member/workspace-member-unchecked-update.input.ts similarity index 100% rename from server/src/api/@generated/workspace-member/workspace-member-unchecked-update.input.ts rename to server/src/core/@generated/workspace-member/workspace-member-unchecked-update.input.ts diff --git a/server/src/api/@generated/workspace-member/workspace-member-update-many-mutation.input.ts b/server/src/core/@generated/workspace-member/workspace-member-update-many-mutation.input.ts similarity index 100% rename from server/src/api/@generated/workspace-member/workspace-member-update-many-mutation.input.ts rename to server/src/core/@generated/workspace-member/workspace-member-update-many-mutation.input.ts diff --git a/server/src/api/@generated/workspace-member/workspace-member-update-many-with-where-without-workspace.input.ts b/server/src/core/@generated/workspace-member/workspace-member-update-many-with-where-without-workspace.input.ts similarity index 100% rename from server/src/api/@generated/workspace-member/workspace-member-update-many-with-where-without-workspace.input.ts rename to server/src/core/@generated/workspace-member/workspace-member-update-many-with-where-without-workspace.input.ts diff --git a/server/src/api/@generated/workspace-member/workspace-member-update-many-without-workspace-nested.input.ts b/server/src/core/@generated/workspace-member/workspace-member-update-many-without-workspace-nested.input.ts similarity index 100% rename from server/src/api/@generated/workspace-member/workspace-member-update-many-without-workspace-nested.input.ts rename to server/src/core/@generated/workspace-member/workspace-member-update-many-without-workspace-nested.input.ts diff --git a/server/src/api/@generated/workspace-member/workspace-member-update-one-without-user-nested.input.ts b/server/src/core/@generated/workspace-member/workspace-member-update-one-without-user-nested.input.ts similarity index 100% rename from server/src/api/@generated/workspace-member/workspace-member-update-one-without-user-nested.input.ts rename to server/src/core/@generated/workspace-member/workspace-member-update-one-without-user-nested.input.ts diff --git a/server/src/api/@generated/workspace-member/workspace-member-update-with-where-unique-without-workspace.input.ts b/server/src/core/@generated/workspace-member/workspace-member-update-with-where-unique-without-workspace.input.ts similarity index 100% rename from server/src/api/@generated/workspace-member/workspace-member-update-with-where-unique-without-workspace.input.ts rename to server/src/core/@generated/workspace-member/workspace-member-update-with-where-unique-without-workspace.input.ts diff --git a/server/src/api/@generated/workspace-member/workspace-member-update-without-user.input.ts b/server/src/core/@generated/workspace-member/workspace-member-update-without-user.input.ts similarity index 100% rename from server/src/api/@generated/workspace-member/workspace-member-update-without-user.input.ts rename to server/src/core/@generated/workspace-member/workspace-member-update-without-user.input.ts diff --git a/server/src/api/@generated/workspace-member/workspace-member-update-without-workspace.input.ts b/server/src/core/@generated/workspace-member/workspace-member-update-without-workspace.input.ts similarity index 100% rename from server/src/api/@generated/workspace-member/workspace-member-update-without-workspace.input.ts rename to server/src/core/@generated/workspace-member/workspace-member-update-without-workspace.input.ts diff --git a/server/src/api/@generated/workspace-member/workspace-member-update.input.ts b/server/src/core/@generated/workspace-member/workspace-member-update.input.ts similarity index 100% rename from server/src/api/@generated/workspace-member/workspace-member-update.input.ts rename to server/src/core/@generated/workspace-member/workspace-member-update.input.ts diff --git a/server/src/api/@generated/workspace-member/workspace-member-upsert-with-where-unique-without-workspace.input.ts b/server/src/core/@generated/workspace-member/workspace-member-upsert-with-where-unique-without-workspace.input.ts similarity index 100% rename from server/src/api/@generated/workspace-member/workspace-member-upsert-with-where-unique-without-workspace.input.ts rename to server/src/core/@generated/workspace-member/workspace-member-upsert-with-where-unique-without-workspace.input.ts diff --git a/server/src/api/@generated/workspace-member/workspace-member-upsert-without-user.input.ts b/server/src/core/@generated/workspace-member/workspace-member-upsert-without-user.input.ts similarity index 100% rename from server/src/api/@generated/workspace-member/workspace-member-upsert-without-user.input.ts rename to server/src/core/@generated/workspace-member/workspace-member-upsert-without-user.input.ts diff --git a/server/src/api/@generated/workspace-member/workspace-member-where-unique.input.ts b/server/src/core/@generated/workspace-member/workspace-member-where-unique.input.ts similarity index 100% rename from server/src/api/@generated/workspace-member/workspace-member-where-unique.input.ts rename to server/src/core/@generated/workspace-member/workspace-member-where-unique.input.ts diff --git a/server/src/api/@generated/workspace-member/workspace-member-where.input.ts b/server/src/core/@generated/workspace-member/workspace-member-where.input.ts similarity index 100% rename from server/src/api/@generated/workspace-member/workspace-member-where.input.ts rename to server/src/core/@generated/workspace-member/workspace-member-where.input.ts diff --git a/server/src/api/@generated/workspace-member/workspace-member.model.ts b/server/src/core/@generated/workspace-member/workspace-member.model.ts similarity index 100% rename from server/src/api/@generated/workspace-member/workspace-member.model.ts rename to server/src/core/@generated/workspace-member/workspace-member.model.ts diff --git a/server/src/api/@generated/workspace/aggregate-workspace.output.ts b/server/src/core/@generated/workspace/aggregate-workspace.output.ts similarity index 100% rename from server/src/api/@generated/workspace/aggregate-workspace.output.ts rename to server/src/core/@generated/workspace/aggregate-workspace.output.ts diff --git a/server/src/api/@generated/workspace/create-many-workspace.args.ts b/server/src/core/@generated/workspace/create-many-workspace.args.ts similarity index 100% rename from server/src/api/@generated/workspace/create-many-workspace.args.ts rename to server/src/core/@generated/workspace/create-many-workspace.args.ts diff --git a/server/src/api/@generated/workspace/create-one-workspace.args.ts b/server/src/core/@generated/workspace/create-one-workspace.args.ts similarity index 100% rename from server/src/api/@generated/workspace/create-one-workspace.args.ts rename to server/src/core/@generated/workspace/create-one-workspace.args.ts diff --git a/server/src/api/@generated/workspace/delete-many-workspace.args.ts b/server/src/core/@generated/workspace/delete-many-workspace.args.ts similarity index 100% rename from server/src/api/@generated/workspace/delete-many-workspace.args.ts rename to server/src/core/@generated/workspace/delete-many-workspace.args.ts diff --git a/server/src/api/@generated/workspace/delete-one-workspace.args.ts b/server/src/core/@generated/workspace/delete-one-workspace.args.ts similarity index 100% rename from server/src/api/@generated/workspace/delete-one-workspace.args.ts rename to server/src/core/@generated/workspace/delete-one-workspace.args.ts diff --git a/server/src/api/@generated/workspace/find-first-workspace-or-throw.args.ts b/server/src/core/@generated/workspace/find-first-workspace-or-throw.args.ts similarity index 100% rename from server/src/api/@generated/workspace/find-first-workspace-or-throw.args.ts rename to server/src/core/@generated/workspace/find-first-workspace-or-throw.args.ts diff --git a/server/src/api/@generated/workspace/find-first-workspace.args.ts b/server/src/core/@generated/workspace/find-first-workspace.args.ts similarity index 100% rename from server/src/api/@generated/workspace/find-first-workspace.args.ts rename to server/src/core/@generated/workspace/find-first-workspace.args.ts diff --git a/server/src/api/@generated/workspace/find-many-workspace.args.ts b/server/src/core/@generated/workspace/find-many-workspace.args.ts similarity index 100% rename from server/src/api/@generated/workspace/find-many-workspace.args.ts rename to server/src/core/@generated/workspace/find-many-workspace.args.ts diff --git a/server/src/api/@generated/workspace/find-unique-workspace-or-throw.args.ts b/server/src/core/@generated/workspace/find-unique-workspace-or-throw.args.ts similarity index 100% rename from server/src/api/@generated/workspace/find-unique-workspace-or-throw.args.ts rename to server/src/core/@generated/workspace/find-unique-workspace-or-throw.args.ts diff --git a/server/src/api/@generated/workspace/find-unique-workspace.args.ts b/server/src/core/@generated/workspace/find-unique-workspace.args.ts similarity index 100% rename from server/src/api/@generated/workspace/find-unique-workspace.args.ts rename to server/src/core/@generated/workspace/find-unique-workspace.args.ts diff --git a/server/src/api/@generated/workspace/update-many-workspace.args.ts b/server/src/core/@generated/workspace/update-many-workspace.args.ts similarity index 100% rename from server/src/api/@generated/workspace/update-many-workspace.args.ts rename to server/src/core/@generated/workspace/update-many-workspace.args.ts diff --git a/server/src/api/@generated/workspace/update-one-workspace.args.ts b/server/src/core/@generated/workspace/update-one-workspace.args.ts similarity index 100% rename from server/src/api/@generated/workspace/update-one-workspace.args.ts rename to server/src/core/@generated/workspace/update-one-workspace.args.ts diff --git a/server/src/api/@generated/workspace/upsert-one-workspace.args.ts b/server/src/core/@generated/workspace/upsert-one-workspace.args.ts similarity index 100% rename from server/src/api/@generated/workspace/upsert-one-workspace.args.ts rename to server/src/core/@generated/workspace/upsert-one-workspace.args.ts diff --git a/server/src/api/@generated/workspace/workspace-aggregate.args.ts b/server/src/core/@generated/workspace/workspace-aggregate.args.ts similarity index 100% rename from server/src/api/@generated/workspace/workspace-aggregate.args.ts rename to server/src/core/@generated/workspace/workspace-aggregate.args.ts diff --git a/server/src/api/@generated/workspace/workspace-count-aggregate.input.ts b/server/src/core/@generated/workspace/workspace-count-aggregate.input.ts similarity index 100% rename from server/src/api/@generated/workspace/workspace-count-aggregate.input.ts rename to server/src/core/@generated/workspace/workspace-count-aggregate.input.ts diff --git a/server/src/api/@generated/workspace/workspace-count-aggregate.output.ts b/server/src/core/@generated/workspace/workspace-count-aggregate.output.ts similarity index 100% rename from server/src/api/@generated/workspace/workspace-count-aggregate.output.ts rename to server/src/core/@generated/workspace/workspace-count-aggregate.output.ts diff --git a/server/src/api/@generated/workspace/workspace-count-order-by-aggregate.input.ts b/server/src/core/@generated/workspace/workspace-count-order-by-aggregate.input.ts similarity index 100% rename from server/src/api/@generated/workspace/workspace-count-order-by-aggregate.input.ts rename to server/src/core/@generated/workspace/workspace-count-order-by-aggregate.input.ts diff --git a/server/src/api/@generated/workspace/workspace-count.output.ts b/server/src/core/@generated/workspace/workspace-count.output.ts similarity index 100% rename from server/src/api/@generated/workspace/workspace-count.output.ts rename to server/src/core/@generated/workspace/workspace-count.output.ts diff --git a/server/src/api/@generated/workspace/workspace-create-many.input.ts b/server/src/core/@generated/workspace/workspace-create-many.input.ts similarity index 100% rename from server/src/api/@generated/workspace/workspace-create-many.input.ts rename to server/src/core/@generated/workspace/workspace-create-many.input.ts diff --git a/server/src/api/@generated/workspace/workspace-create-nested-one-without-comment-threads.input.ts b/server/src/core/@generated/workspace/workspace-create-nested-one-without-comment-threads.input.ts similarity index 100% rename from server/src/api/@generated/workspace/workspace-create-nested-one-without-comment-threads.input.ts rename to server/src/core/@generated/workspace/workspace-create-nested-one-without-comment-threads.input.ts diff --git a/server/src/api/@generated/workspace/workspace-create-nested-one-without-comments.input.ts b/server/src/core/@generated/workspace/workspace-create-nested-one-without-comments.input.ts similarity index 100% rename from server/src/api/@generated/workspace/workspace-create-nested-one-without-comments.input.ts rename to server/src/core/@generated/workspace/workspace-create-nested-one-without-comments.input.ts diff --git a/server/src/api/@generated/workspace/workspace-create-nested-one-without-companies.input.ts b/server/src/core/@generated/workspace/workspace-create-nested-one-without-companies.input.ts similarity index 100% rename from server/src/api/@generated/workspace/workspace-create-nested-one-without-companies.input.ts rename to server/src/core/@generated/workspace/workspace-create-nested-one-without-companies.input.ts diff --git a/server/src/api/@generated/workspace/workspace-create-nested-one-without-people.input.ts b/server/src/core/@generated/workspace/workspace-create-nested-one-without-people.input.ts similarity index 100% rename from server/src/api/@generated/workspace/workspace-create-nested-one-without-people.input.ts rename to server/src/core/@generated/workspace/workspace-create-nested-one-without-people.input.ts diff --git a/server/src/api/@generated/workspace/workspace-create-nested-one-without-pipeline-progresses.input.ts b/server/src/core/@generated/workspace/workspace-create-nested-one-without-pipeline-progresses.input.ts similarity index 100% rename from server/src/api/@generated/workspace/workspace-create-nested-one-without-pipeline-progresses.input.ts rename to server/src/core/@generated/workspace/workspace-create-nested-one-without-pipeline-progresses.input.ts diff --git a/server/src/api/@generated/workspace/workspace-create-nested-one-without-pipeline-stages.input.ts b/server/src/core/@generated/workspace/workspace-create-nested-one-without-pipeline-stages.input.ts similarity index 100% rename from server/src/api/@generated/workspace/workspace-create-nested-one-without-pipeline-stages.input.ts rename to server/src/core/@generated/workspace/workspace-create-nested-one-without-pipeline-stages.input.ts diff --git a/server/src/api/@generated/workspace/workspace-create-nested-one-without-pipelines.input.ts b/server/src/core/@generated/workspace/workspace-create-nested-one-without-pipelines.input.ts similarity index 100% rename from server/src/api/@generated/workspace/workspace-create-nested-one-without-pipelines.input.ts rename to server/src/core/@generated/workspace/workspace-create-nested-one-without-pipelines.input.ts diff --git a/server/src/api/@generated/workspace/workspace-create-nested-one-without-workspace-member.input.ts b/server/src/core/@generated/workspace/workspace-create-nested-one-without-workspace-member.input.ts similarity index 100% rename from server/src/api/@generated/workspace/workspace-create-nested-one-without-workspace-member.input.ts rename to server/src/core/@generated/workspace/workspace-create-nested-one-without-workspace-member.input.ts diff --git a/server/src/api/@generated/workspace/workspace-create-or-connect-without-comment-threads.input.ts b/server/src/core/@generated/workspace/workspace-create-or-connect-without-comment-threads.input.ts similarity index 100% rename from server/src/api/@generated/workspace/workspace-create-or-connect-without-comment-threads.input.ts rename to server/src/core/@generated/workspace/workspace-create-or-connect-without-comment-threads.input.ts diff --git a/server/src/api/@generated/workspace/workspace-create-or-connect-without-comments.input.ts b/server/src/core/@generated/workspace/workspace-create-or-connect-without-comments.input.ts similarity index 100% rename from server/src/api/@generated/workspace/workspace-create-or-connect-without-comments.input.ts rename to server/src/core/@generated/workspace/workspace-create-or-connect-without-comments.input.ts diff --git a/server/src/api/@generated/workspace/workspace-create-or-connect-without-companies.input.ts b/server/src/core/@generated/workspace/workspace-create-or-connect-without-companies.input.ts similarity index 100% rename from server/src/api/@generated/workspace/workspace-create-or-connect-without-companies.input.ts rename to server/src/core/@generated/workspace/workspace-create-or-connect-without-companies.input.ts diff --git a/server/src/api/@generated/workspace/workspace-create-or-connect-without-people.input.ts b/server/src/core/@generated/workspace/workspace-create-or-connect-without-people.input.ts similarity index 100% rename from server/src/api/@generated/workspace/workspace-create-or-connect-without-people.input.ts rename to server/src/core/@generated/workspace/workspace-create-or-connect-without-people.input.ts diff --git a/server/src/api/@generated/workspace/workspace-create-or-connect-without-pipeline-progresses.input.ts b/server/src/core/@generated/workspace/workspace-create-or-connect-without-pipeline-progresses.input.ts similarity index 100% rename from server/src/api/@generated/workspace/workspace-create-or-connect-without-pipeline-progresses.input.ts rename to server/src/core/@generated/workspace/workspace-create-or-connect-without-pipeline-progresses.input.ts diff --git a/server/src/api/@generated/workspace/workspace-create-or-connect-without-pipeline-stages.input.ts b/server/src/core/@generated/workspace/workspace-create-or-connect-without-pipeline-stages.input.ts similarity index 100% rename from server/src/api/@generated/workspace/workspace-create-or-connect-without-pipeline-stages.input.ts rename to server/src/core/@generated/workspace/workspace-create-or-connect-without-pipeline-stages.input.ts diff --git a/server/src/api/@generated/workspace/workspace-create-or-connect-without-pipelines.input.ts b/server/src/core/@generated/workspace/workspace-create-or-connect-without-pipelines.input.ts similarity index 100% rename from server/src/api/@generated/workspace/workspace-create-or-connect-without-pipelines.input.ts rename to server/src/core/@generated/workspace/workspace-create-or-connect-without-pipelines.input.ts diff --git a/server/src/api/@generated/workspace/workspace-create-or-connect-without-workspace-member.input.ts b/server/src/core/@generated/workspace/workspace-create-or-connect-without-workspace-member.input.ts similarity index 100% rename from server/src/api/@generated/workspace/workspace-create-or-connect-without-workspace-member.input.ts rename to server/src/core/@generated/workspace/workspace-create-or-connect-without-workspace-member.input.ts diff --git a/server/src/api/@generated/workspace/workspace-create-without-comment-threads.input.ts b/server/src/core/@generated/workspace/workspace-create-without-comment-threads.input.ts similarity index 100% rename from server/src/api/@generated/workspace/workspace-create-without-comment-threads.input.ts rename to server/src/core/@generated/workspace/workspace-create-without-comment-threads.input.ts diff --git a/server/src/api/@generated/workspace/workspace-create-without-comments.input.ts b/server/src/core/@generated/workspace/workspace-create-without-comments.input.ts similarity index 100% rename from server/src/api/@generated/workspace/workspace-create-without-comments.input.ts rename to server/src/core/@generated/workspace/workspace-create-without-comments.input.ts diff --git a/server/src/api/@generated/workspace/workspace-create-without-companies.input.ts b/server/src/core/@generated/workspace/workspace-create-without-companies.input.ts similarity index 100% rename from server/src/api/@generated/workspace/workspace-create-without-companies.input.ts rename to server/src/core/@generated/workspace/workspace-create-without-companies.input.ts diff --git a/server/src/api/@generated/workspace/workspace-create-without-people.input.ts b/server/src/core/@generated/workspace/workspace-create-without-people.input.ts similarity index 100% rename from server/src/api/@generated/workspace/workspace-create-without-people.input.ts rename to server/src/core/@generated/workspace/workspace-create-without-people.input.ts diff --git a/server/src/api/@generated/workspace/workspace-create-without-pipeline-progresses.input.ts b/server/src/core/@generated/workspace/workspace-create-without-pipeline-progresses.input.ts similarity index 100% rename from server/src/api/@generated/workspace/workspace-create-without-pipeline-progresses.input.ts rename to server/src/core/@generated/workspace/workspace-create-without-pipeline-progresses.input.ts diff --git a/server/src/api/@generated/workspace/workspace-create-without-pipeline-stages.input.ts b/server/src/core/@generated/workspace/workspace-create-without-pipeline-stages.input.ts similarity index 100% rename from server/src/api/@generated/workspace/workspace-create-without-pipeline-stages.input.ts rename to server/src/core/@generated/workspace/workspace-create-without-pipeline-stages.input.ts diff --git a/server/src/api/@generated/workspace/workspace-create-without-pipelines.input.ts b/server/src/core/@generated/workspace/workspace-create-without-pipelines.input.ts similarity index 100% rename from server/src/api/@generated/workspace/workspace-create-without-pipelines.input.ts rename to server/src/core/@generated/workspace/workspace-create-without-pipelines.input.ts diff --git a/server/src/api/@generated/workspace/workspace-create-without-workspace-member.input.ts b/server/src/core/@generated/workspace/workspace-create-without-workspace-member.input.ts similarity index 100% rename from server/src/api/@generated/workspace/workspace-create-without-workspace-member.input.ts rename to server/src/core/@generated/workspace/workspace-create-without-workspace-member.input.ts diff --git a/server/src/api/@generated/workspace/workspace-create.input.ts b/server/src/core/@generated/workspace/workspace-create.input.ts similarity index 100% rename from server/src/api/@generated/workspace/workspace-create.input.ts rename to server/src/core/@generated/workspace/workspace-create.input.ts diff --git a/server/src/api/@generated/workspace/workspace-group-by.args.ts b/server/src/core/@generated/workspace/workspace-group-by.args.ts similarity index 100% rename from server/src/api/@generated/workspace/workspace-group-by.args.ts rename to server/src/core/@generated/workspace/workspace-group-by.args.ts diff --git a/server/src/api/@generated/workspace/workspace-group-by.output.ts b/server/src/core/@generated/workspace/workspace-group-by.output.ts similarity index 100% rename from server/src/api/@generated/workspace/workspace-group-by.output.ts rename to server/src/core/@generated/workspace/workspace-group-by.output.ts diff --git a/server/src/api/@generated/workspace/workspace-max-aggregate.input.ts b/server/src/core/@generated/workspace/workspace-max-aggregate.input.ts similarity index 100% rename from server/src/api/@generated/workspace/workspace-max-aggregate.input.ts rename to server/src/core/@generated/workspace/workspace-max-aggregate.input.ts diff --git a/server/src/api/@generated/workspace/workspace-max-aggregate.output.ts b/server/src/core/@generated/workspace/workspace-max-aggregate.output.ts similarity index 100% rename from server/src/api/@generated/workspace/workspace-max-aggregate.output.ts rename to server/src/core/@generated/workspace/workspace-max-aggregate.output.ts diff --git a/server/src/api/@generated/workspace/workspace-max-order-by-aggregate.input.ts b/server/src/core/@generated/workspace/workspace-max-order-by-aggregate.input.ts similarity index 100% rename from server/src/api/@generated/workspace/workspace-max-order-by-aggregate.input.ts rename to server/src/core/@generated/workspace/workspace-max-order-by-aggregate.input.ts diff --git a/server/src/api/@generated/workspace/workspace-min-aggregate.input.ts b/server/src/core/@generated/workspace/workspace-min-aggregate.input.ts similarity index 100% rename from server/src/api/@generated/workspace/workspace-min-aggregate.input.ts rename to server/src/core/@generated/workspace/workspace-min-aggregate.input.ts diff --git a/server/src/api/@generated/workspace/workspace-min-aggregate.output.ts b/server/src/core/@generated/workspace/workspace-min-aggregate.output.ts similarity index 100% rename from server/src/api/@generated/workspace/workspace-min-aggregate.output.ts rename to server/src/core/@generated/workspace/workspace-min-aggregate.output.ts diff --git a/server/src/api/@generated/workspace/workspace-min-order-by-aggregate.input.ts b/server/src/core/@generated/workspace/workspace-min-order-by-aggregate.input.ts similarity index 100% rename from server/src/api/@generated/workspace/workspace-min-order-by-aggregate.input.ts rename to server/src/core/@generated/workspace/workspace-min-order-by-aggregate.input.ts diff --git a/server/src/api/@generated/workspace/workspace-order-by-with-aggregation.input.ts b/server/src/core/@generated/workspace/workspace-order-by-with-aggregation.input.ts similarity index 100% rename from server/src/api/@generated/workspace/workspace-order-by-with-aggregation.input.ts rename to server/src/core/@generated/workspace/workspace-order-by-with-aggregation.input.ts diff --git a/server/src/api/@generated/workspace/workspace-order-by-with-relation.input.ts b/server/src/core/@generated/workspace/workspace-order-by-with-relation.input.ts similarity index 100% rename from server/src/api/@generated/workspace/workspace-order-by-with-relation.input.ts rename to server/src/core/@generated/workspace/workspace-order-by-with-relation.input.ts diff --git a/server/src/api/@generated/workspace/workspace-relation-filter.input.ts b/server/src/core/@generated/workspace/workspace-relation-filter.input.ts similarity index 100% rename from server/src/api/@generated/workspace/workspace-relation-filter.input.ts rename to server/src/core/@generated/workspace/workspace-relation-filter.input.ts diff --git a/server/src/api/@generated/workspace/workspace-scalar-field.enum.ts b/server/src/core/@generated/workspace/workspace-scalar-field.enum.ts similarity index 100% rename from server/src/api/@generated/workspace/workspace-scalar-field.enum.ts rename to server/src/core/@generated/workspace/workspace-scalar-field.enum.ts diff --git a/server/src/api/@generated/workspace/workspace-scalar-where-with-aggregates.input.ts b/server/src/core/@generated/workspace/workspace-scalar-where-with-aggregates.input.ts similarity index 100% rename from server/src/api/@generated/workspace/workspace-scalar-where-with-aggregates.input.ts rename to server/src/core/@generated/workspace/workspace-scalar-where-with-aggregates.input.ts diff --git a/server/src/api/@generated/workspace/workspace-unchecked-create-without-comment-threads.input.ts b/server/src/core/@generated/workspace/workspace-unchecked-create-without-comment-threads.input.ts similarity index 100% rename from server/src/api/@generated/workspace/workspace-unchecked-create-without-comment-threads.input.ts rename to server/src/core/@generated/workspace/workspace-unchecked-create-without-comment-threads.input.ts diff --git a/server/src/api/@generated/workspace/workspace-unchecked-create-without-comments.input.ts b/server/src/core/@generated/workspace/workspace-unchecked-create-without-comments.input.ts similarity index 100% rename from server/src/api/@generated/workspace/workspace-unchecked-create-without-comments.input.ts rename to server/src/core/@generated/workspace/workspace-unchecked-create-without-comments.input.ts diff --git a/server/src/api/@generated/workspace/workspace-unchecked-create-without-companies.input.ts b/server/src/core/@generated/workspace/workspace-unchecked-create-without-companies.input.ts similarity index 100% rename from server/src/api/@generated/workspace/workspace-unchecked-create-without-companies.input.ts rename to server/src/core/@generated/workspace/workspace-unchecked-create-without-companies.input.ts diff --git a/server/src/api/@generated/workspace/workspace-unchecked-create-without-people.input.ts b/server/src/core/@generated/workspace/workspace-unchecked-create-without-people.input.ts similarity index 100% rename from server/src/api/@generated/workspace/workspace-unchecked-create-without-people.input.ts rename to server/src/core/@generated/workspace/workspace-unchecked-create-without-people.input.ts diff --git a/server/src/api/@generated/workspace/workspace-unchecked-create-without-pipeline-progresses.input.ts b/server/src/core/@generated/workspace/workspace-unchecked-create-without-pipeline-progresses.input.ts similarity index 100% rename from server/src/api/@generated/workspace/workspace-unchecked-create-without-pipeline-progresses.input.ts rename to server/src/core/@generated/workspace/workspace-unchecked-create-without-pipeline-progresses.input.ts diff --git a/server/src/api/@generated/workspace/workspace-unchecked-create-without-pipeline-stages.input.ts b/server/src/core/@generated/workspace/workspace-unchecked-create-without-pipeline-stages.input.ts similarity index 100% rename from server/src/api/@generated/workspace/workspace-unchecked-create-without-pipeline-stages.input.ts rename to server/src/core/@generated/workspace/workspace-unchecked-create-without-pipeline-stages.input.ts diff --git a/server/src/api/@generated/workspace/workspace-unchecked-create-without-pipelines.input.ts b/server/src/core/@generated/workspace/workspace-unchecked-create-without-pipelines.input.ts similarity index 100% rename from server/src/api/@generated/workspace/workspace-unchecked-create-without-pipelines.input.ts rename to server/src/core/@generated/workspace/workspace-unchecked-create-without-pipelines.input.ts diff --git a/server/src/api/@generated/workspace/workspace-unchecked-create-without-workspace-member.input.ts b/server/src/core/@generated/workspace/workspace-unchecked-create-without-workspace-member.input.ts similarity index 100% rename from server/src/api/@generated/workspace/workspace-unchecked-create-without-workspace-member.input.ts rename to server/src/core/@generated/workspace/workspace-unchecked-create-without-workspace-member.input.ts diff --git a/server/src/api/@generated/workspace/workspace-unchecked-create.input.ts b/server/src/core/@generated/workspace/workspace-unchecked-create.input.ts similarity index 100% rename from server/src/api/@generated/workspace/workspace-unchecked-create.input.ts rename to server/src/core/@generated/workspace/workspace-unchecked-create.input.ts diff --git a/server/src/api/@generated/workspace/workspace-unchecked-update-many.input.ts b/server/src/core/@generated/workspace/workspace-unchecked-update-many.input.ts similarity index 100% rename from server/src/api/@generated/workspace/workspace-unchecked-update-many.input.ts rename to server/src/core/@generated/workspace/workspace-unchecked-update-many.input.ts diff --git a/server/src/api/@generated/workspace/workspace-unchecked-update-without-comment-threads.input.ts b/server/src/core/@generated/workspace/workspace-unchecked-update-without-comment-threads.input.ts similarity index 100% rename from server/src/api/@generated/workspace/workspace-unchecked-update-without-comment-threads.input.ts rename to server/src/core/@generated/workspace/workspace-unchecked-update-without-comment-threads.input.ts diff --git a/server/src/api/@generated/workspace/workspace-unchecked-update-without-comments.input.ts b/server/src/core/@generated/workspace/workspace-unchecked-update-without-comments.input.ts similarity index 100% rename from server/src/api/@generated/workspace/workspace-unchecked-update-without-comments.input.ts rename to server/src/core/@generated/workspace/workspace-unchecked-update-without-comments.input.ts diff --git a/server/src/api/@generated/workspace/workspace-unchecked-update-without-companies.input.ts b/server/src/core/@generated/workspace/workspace-unchecked-update-without-companies.input.ts similarity index 100% rename from server/src/api/@generated/workspace/workspace-unchecked-update-without-companies.input.ts rename to server/src/core/@generated/workspace/workspace-unchecked-update-without-companies.input.ts diff --git a/server/src/api/@generated/workspace/workspace-unchecked-update-without-people.input.ts b/server/src/core/@generated/workspace/workspace-unchecked-update-without-people.input.ts similarity index 100% rename from server/src/api/@generated/workspace/workspace-unchecked-update-without-people.input.ts rename to server/src/core/@generated/workspace/workspace-unchecked-update-without-people.input.ts diff --git a/server/src/api/@generated/workspace/workspace-unchecked-update-without-pipeline-progresses.input.ts b/server/src/core/@generated/workspace/workspace-unchecked-update-without-pipeline-progresses.input.ts similarity index 100% rename from server/src/api/@generated/workspace/workspace-unchecked-update-without-pipeline-progresses.input.ts rename to server/src/core/@generated/workspace/workspace-unchecked-update-without-pipeline-progresses.input.ts diff --git a/server/src/api/@generated/workspace/workspace-unchecked-update-without-pipeline-stages.input.ts b/server/src/core/@generated/workspace/workspace-unchecked-update-without-pipeline-stages.input.ts similarity index 100% rename from server/src/api/@generated/workspace/workspace-unchecked-update-without-pipeline-stages.input.ts rename to server/src/core/@generated/workspace/workspace-unchecked-update-without-pipeline-stages.input.ts diff --git a/server/src/api/@generated/workspace/workspace-unchecked-update-without-pipelines.input.ts b/server/src/core/@generated/workspace/workspace-unchecked-update-without-pipelines.input.ts similarity index 100% rename from server/src/api/@generated/workspace/workspace-unchecked-update-without-pipelines.input.ts rename to server/src/core/@generated/workspace/workspace-unchecked-update-without-pipelines.input.ts diff --git a/server/src/api/@generated/workspace/workspace-unchecked-update-without-workspace-member.input.ts b/server/src/core/@generated/workspace/workspace-unchecked-update-without-workspace-member.input.ts similarity index 100% rename from server/src/api/@generated/workspace/workspace-unchecked-update-without-workspace-member.input.ts rename to server/src/core/@generated/workspace/workspace-unchecked-update-without-workspace-member.input.ts diff --git a/server/src/api/@generated/workspace/workspace-unchecked-update.input.ts b/server/src/core/@generated/workspace/workspace-unchecked-update.input.ts similarity index 100% rename from server/src/api/@generated/workspace/workspace-unchecked-update.input.ts rename to server/src/core/@generated/workspace/workspace-unchecked-update.input.ts diff --git a/server/src/api/@generated/workspace/workspace-update-many-mutation.input.ts b/server/src/core/@generated/workspace/workspace-update-many-mutation.input.ts similarity index 100% rename from server/src/api/@generated/workspace/workspace-update-many-mutation.input.ts rename to server/src/core/@generated/workspace/workspace-update-many-mutation.input.ts diff --git a/server/src/api/@generated/workspace/workspace-update-one-required-without-comment-threads-nested.input.ts b/server/src/core/@generated/workspace/workspace-update-one-required-without-comment-threads-nested.input.ts similarity index 100% rename from server/src/api/@generated/workspace/workspace-update-one-required-without-comment-threads-nested.input.ts rename to server/src/core/@generated/workspace/workspace-update-one-required-without-comment-threads-nested.input.ts diff --git a/server/src/api/@generated/workspace/workspace-update-one-required-without-comments-nested.input.ts b/server/src/core/@generated/workspace/workspace-update-one-required-without-comments-nested.input.ts similarity index 100% rename from server/src/api/@generated/workspace/workspace-update-one-required-without-comments-nested.input.ts rename to server/src/core/@generated/workspace/workspace-update-one-required-without-comments-nested.input.ts diff --git a/server/src/api/@generated/workspace/workspace-update-one-required-without-companies-nested.input.ts b/server/src/core/@generated/workspace/workspace-update-one-required-without-companies-nested.input.ts similarity index 100% rename from server/src/api/@generated/workspace/workspace-update-one-required-without-companies-nested.input.ts rename to server/src/core/@generated/workspace/workspace-update-one-required-without-companies-nested.input.ts diff --git a/server/src/api/@generated/workspace/workspace-update-one-required-without-people-nested.input.ts b/server/src/core/@generated/workspace/workspace-update-one-required-without-people-nested.input.ts similarity index 100% rename from server/src/api/@generated/workspace/workspace-update-one-required-without-people-nested.input.ts rename to server/src/core/@generated/workspace/workspace-update-one-required-without-people-nested.input.ts diff --git a/server/src/api/@generated/workspace/workspace-update-one-required-without-pipeline-progresses-nested.input.ts b/server/src/core/@generated/workspace/workspace-update-one-required-without-pipeline-progresses-nested.input.ts similarity index 100% rename from server/src/api/@generated/workspace/workspace-update-one-required-without-pipeline-progresses-nested.input.ts rename to server/src/core/@generated/workspace/workspace-update-one-required-without-pipeline-progresses-nested.input.ts diff --git a/server/src/api/@generated/workspace/workspace-update-one-required-without-pipeline-stages-nested.input.ts b/server/src/core/@generated/workspace/workspace-update-one-required-without-pipeline-stages-nested.input.ts similarity index 100% rename from server/src/api/@generated/workspace/workspace-update-one-required-without-pipeline-stages-nested.input.ts rename to server/src/core/@generated/workspace/workspace-update-one-required-without-pipeline-stages-nested.input.ts diff --git a/server/src/api/@generated/workspace/workspace-update-one-required-without-pipelines-nested.input.ts b/server/src/core/@generated/workspace/workspace-update-one-required-without-pipelines-nested.input.ts similarity index 100% rename from server/src/api/@generated/workspace/workspace-update-one-required-without-pipelines-nested.input.ts rename to server/src/core/@generated/workspace/workspace-update-one-required-without-pipelines-nested.input.ts diff --git a/server/src/api/@generated/workspace/workspace-update-one-required-without-workspace-member-nested.input.ts b/server/src/core/@generated/workspace/workspace-update-one-required-without-workspace-member-nested.input.ts similarity index 100% rename from server/src/api/@generated/workspace/workspace-update-one-required-without-workspace-member-nested.input.ts rename to server/src/core/@generated/workspace/workspace-update-one-required-without-workspace-member-nested.input.ts diff --git a/server/src/api/@generated/workspace/workspace-update-without-comment-threads.input.ts b/server/src/core/@generated/workspace/workspace-update-without-comment-threads.input.ts similarity index 100% rename from server/src/api/@generated/workspace/workspace-update-without-comment-threads.input.ts rename to server/src/core/@generated/workspace/workspace-update-without-comment-threads.input.ts diff --git a/server/src/api/@generated/workspace/workspace-update-without-comments.input.ts b/server/src/core/@generated/workspace/workspace-update-without-comments.input.ts similarity index 100% rename from server/src/api/@generated/workspace/workspace-update-without-comments.input.ts rename to server/src/core/@generated/workspace/workspace-update-without-comments.input.ts diff --git a/server/src/api/@generated/workspace/workspace-update-without-companies.input.ts b/server/src/core/@generated/workspace/workspace-update-without-companies.input.ts similarity index 100% rename from server/src/api/@generated/workspace/workspace-update-without-companies.input.ts rename to server/src/core/@generated/workspace/workspace-update-without-companies.input.ts diff --git a/server/src/api/@generated/workspace/workspace-update-without-people.input.ts b/server/src/core/@generated/workspace/workspace-update-without-people.input.ts similarity index 100% rename from server/src/api/@generated/workspace/workspace-update-without-people.input.ts rename to server/src/core/@generated/workspace/workspace-update-without-people.input.ts diff --git a/server/src/api/@generated/workspace/workspace-update-without-pipeline-progresses.input.ts b/server/src/core/@generated/workspace/workspace-update-without-pipeline-progresses.input.ts similarity index 100% rename from server/src/api/@generated/workspace/workspace-update-without-pipeline-progresses.input.ts rename to server/src/core/@generated/workspace/workspace-update-without-pipeline-progresses.input.ts diff --git a/server/src/api/@generated/workspace/workspace-update-without-pipeline-stages.input.ts b/server/src/core/@generated/workspace/workspace-update-without-pipeline-stages.input.ts similarity index 100% rename from server/src/api/@generated/workspace/workspace-update-without-pipeline-stages.input.ts rename to server/src/core/@generated/workspace/workspace-update-without-pipeline-stages.input.ts diff --git a/server/src/api/@generated/workspace/workspace-update-without-pipelines.input.ts b/server/src/core/@generated/workspace/workspace-update-without-pipelines.input.ts similarity index 100% rename from server/src/api/@generated/workspace/workspace-update-without-pipelines.input.ts rename to server/src/core/@generated/workspace/workspace-update-without-pipelines.input.ts diff --git a/server/src/api/@generated/workspace/workspace-update-without-workspace-member.input.ts b/server/src/core/@generated/workspace/workspace-update-without-workspace-member.input.ts similarity index 100% rename from server/src/api/@generated/workspace/workspace-update-without-workspace-member.input.ts rename to server/src/core/@generated/workspace/workspace-update-without-workspace-member.input.ts diff --git a/server/src/api/@generated/workspace/workspace-update.input.ts b/server/src/core/@generated/workspace/workspace-update.input.ts similarity index 100% rename from server/src/api/@generated/workspace/workspace-update.input.ts rename to server/src/core/@generated/workspace/workspace-update.input.ts diff --git a/server/src/api/@generated/workspace/workspace-upsert-without-comment-threads.input.ts b/server/src/core/@generated/workspace/workspace-upsert-without-comment-threads.input.ts similarity index 100% rename from server/src/api/@generated/workspace/workspace-upsert-without-comment-threads.input.ts rename to server/src/core/@generated/workspace/workspace-upsert-without-comment-threads.input.ts diff --git a/server/src/api/@generated/workspace/workspace-upsert-without-comments.input.ts b/server/src/core/@generated/workspace/workspace-upsert-without-comments.input.ts similarity index 100% rename from server/src/api/@generated/workspace/workspace-upsert-without-comments.input.ts rename to server/src/core/@generated/workspace/workspace-upsert-without-comments.input.ts diff --git a/server/src/api/@generated/workspace/workspace-upsert-without-companies.input.ts b/server/src/core/@generated/workspace/workspace-upsert-without-companies.input.ts similarity index 100% rename from server/src/api/@generated/workspace/workspace-upsert-without-companies.input.ts rename to server/src/core/@generated/workspace/workspace-upsert-without-companies.input.ts diff --git a/server/src/api/@generated/workspace/workspace-upsert-without-people.input.ts b/server/src/core/@generated/workspace/workspace-upsert-without-people.input.ts similarity index 100% rename from server/src/api/@generated/workspace/workspace-upsert-without-people.input.ts rename to server/src/core/@generated/workspace/workspace-upsert-without-people.input.ts diff --git a/server/src/api/@generated/workspace/workspace-upsert-without-pipeline-progresses.input.ts b/server/src/core/@generated/workspace/workspace-upsert-without-pipeline-progresses.input.ts similarity index 100% rename from server/src/api/@generated/workspace/workspace-upsert-without-pipeline-progresses.input.ts rename to server/src/core/@generated/workspace/workspace-upsert-without-pipeline-progresses.input.ts diff --git a/server/src/api/@generated/workspace/workspace-upsert-without-pipeline-stages.input.ts b/server/src/core/@generated/workspace/workspace-upsert-without-pipeline-stages.input.ts similarity index 100% rename from server/src/api/@generated/workspace/workspace-upsert-without-pipeline-stages.input.ts rename to server/src/core/@generated/workspace/workspace-upsert-without-pipeline-stages.input.ts diff --git a/server/src/api/@generated/workspace/workspace-upsert-without-pipelines.input.ts b/server/src/core/@generated/workspace/workspace-upsert-without-pipelines.input.ts similarity index 100% rename from server/src/api/@generated/workspace/workspace-upsert-without-pipelines.input.ts rename to server/src/core/@generated/workspace/workspace-upsert-without-pipelines.input.ts diff --git a/server/src/api/@generated/workspace/workspace-upsert-without-workspace-member.input.ts b/server/src/core/@generated/workspace/workspace-upsert-without-workspace-member.input.ts similarity index 100% rename from server/src/api/@generated/workspace/workspace-upsert-without-workspace-member.input.ts rename to server/src/core/@generated/workspace/workspace-upsert-without-workspace-member.input.ts diff --git a/server/src/api/@generated/workspace/workspace-where-unique.input.ts b/server/src/core/@generated/workspace/workspace-where-unique.input.ts similarity index 100% rename from server/src/api/@generated/workspace/workspace-where-unique.input.ts rename to server/src/core/@generated/workspace/workspace-where-unique.input.ts diff --git a/server/src/api/@generated/workspace/workspace-where.input.ts b/server/src/core/@generated/workspace/workspace-where.input.ts similarity index 100% rename from server/src/api/@generated/workspace/workspace-where.input.ts rename to server/src/core/@generated/workspace/workspace-where.input.ts diff --git a/server/src/api/@generated/workspace/workspace.model.ts b/server/src/core/@generated/workspace/workspace.model.ts similarity index 100% rename from server/src/api/@generated/workspace/workspace.model.ts rename to server/src/core/@generated/workspace/workspace.model.ts diff --git a/server/src/auth/auth.module.ts b/server/src/core/auth/auth.module.ts similarity index 90% rename from server/src/auth/auth.module.ts rename to server/src/core/auth/auth.module.ts index 644da53c2e..c05397f718 100644 --- a/server/src/auth/auth.module.ts +++ b/server/src/core/auth/auth.module.ts @@ -7,6 +7,7 @@ import { GoogleAuthController } from './google.auth.controller'; import { GoogleStrategy } from './strategies/google.auth.strategy'; import { TokenController } from './token.controller'; import { PrismaService } from 'src/database/prisma.service'; +import { UserModule } from '../user/user.module'; const jwtModule = JwtModule.registerAsync({ useFactory: async (configService: ConfigService) => { @@ -22,7 +23,7 @@ const jwtModule = JwtModule.registerAsync({ }); @Module({ - imports: [jwtModule, ConfigModule.forRoot({})], + imports: [jwtModule, ConfigModule.forRoot({}), UserModule], controllers: [GoogleAuthController, TokenController], providers: [AuthService, JwtAuthStrategy, GoogleStrategy, PrismaService], exports: [jwtModule], diff --git a/server/src/auth/google.auth.controller.ts b/server/src/core/auth/google.auth.controller.ts similarity index 82% rename from server/src/auth/google.auth.controller.ts rename to server/src/core/auth/google.auth.controller.ts index 5ab5c79563..dad561ef60 100644 --- a/server/src/auth/google.auth.controller.ts +++ b/server/src/core/auth/google.auth.controller.ts @@ -11,10 +11,14 @@ import { AuthGuard } from '@nestjs/passport'; import { Response } from 'express'; import { AuthService } from './services/auth.service'; import { GoogleRequest } from './strategies/google.auth.strategy'; +import { UserService } from '../user/user.service'; @Controller('auth/google') export class GoogleAuthController { - constructor(private authService: AuthService) {} + constructor( + private readonly authService: AuthService, + private readonly userService: UserService, + ) {} @Get() @UseGuards(AuthGuard('google')) @@ -26,7 +30,7 @@ export class GoogleAuthController { @Get('redirect') @UseGuards(AuthGuard('google')) async googleAuthRedirect(@Req() req: GoogleRequest, @Res() res: Response) { - const user = await this.authService.createUser(req.user); + const user = await this.userService.createUser(req.user); if (!user) { throw new HttpException( diff --git a/server/src/core/auth/services/auth.service.spec.ts b/server/src/core/auth/services/auth.service.spec.ts new file mode 100644 index 0000000000..fa01e46785 --- /dev/null +++ b/server/src/core/auth/services/auth.service.spec.ts @@ -0,0 +1,36 @@ +import { Test, TestingModule } from '@nestjs/testing'; +import { AuthService } from './auth.service'; +import { PrismaService } from 'src/database/prisma.service'; +import { prismaMock } from 'src/prisma-mock/jest-prisma-singleton'; +import { JwtService } from '@nestjs/jwt'; +import { ConfigService } from '@nestjs/config'; + +describe('AuthService', () => { + let service: AuthService; + + beforeEach(async () => { + const module: TestingModule = await Test.createTestingModule({ + providers: [ + AuthService, + { + provide: JwtService, + useValue: {}, + }, + { + provide: ConfigService, + useValue: {}, + }, + { + provide: PrismaService, + useValue: prismaMock, + }, + ], + }).compile(); + + service = module.get(AuthService); + }); + + it('should be defined', () => { + expect(service).toBeDefined(); + }); +}); diff --git a/server/src/auth/services/auth.service.ts b/server/src/core/auth/services/auth.service.ts similarity index 61% rename from server/src/auth/services/auth.service.ts rename to server/src/core/auth/services/auth.service.ts index 76acedae3f..be69c66a41 100644 --- a/server/src/auth/services/auth.service.ts +++ b/server/src/core/auth/services/auth.service.ts @@ -20,69 +20,6 @@ export class AuthService { private prismaService: PrismaService, ) {} - async createUser(rawUser: UserPayload) { - if (!rawUser.email) { - throw new HttpException( - { reason: 'Email is missing' }, - HttpStatus.BAD_REQUEST, - ); - } - - if (!rawUser.firstName || !rawUser.lastName) { - throw new HttpException( - { reason: 'Firstname or lastname is missing' }, - HttpStatus.BAD_REQUEST, - ); - } - - const emailDomain = rawUser.email.split('@')[1]; - - if (!emailDomain) { - throw new HttpException( - { reason: 'Email is malformed' }, - HttpStatus.BAD_REQUEST, - ); - } - - const workspace = await this.prismaService.workspace.findUnique({ - where: { domainName: emailDomain }, - }); - - if (!workspace) { - throw new HttpException( - { reason: 'User email domain does not match an existing workspace' }, - HttpStatus.FORBIDDEN, - ); - } - - const user = await this.prismaService.user.upsert({ - where: { - email: rawUser.email, - }, - create: { - id: v4(), - displayName: rawUser.firstName + ' ' + rawUser.lastName, - email: rawUser.email, - locale: 'en', - }, - update: {}, - }); - - await this.prismaService.workspaceMember.upsert({ - where: { - userId: user.id, - }, - create: { - id: v4(), - userId: user.id, - workspaceId: workspace.id, - }, - update: {}, - }); - - return user; - } - async generateAccessToken(refreshToken: string): Promise { const refreshTokenObject = await this.prismaService.refreshToken.findFirst({ where: { refreshToken: refreshToken }, diff --git a/server/src/auth/strategies/google.auth.strategy.ts b/server/src/core/auth/strategies/google.auth.strategy.ts similarity index 100% rename from server/src/auth/strategies/google.auth.strategy.ts rename to server/src/core/auth/strategies/google.auth.strategy.ts diff --git a/server/src/core/auth/strategies/jwt.auth.strategy.ts b/server/src/core/auth/strategies/jwt.auth.strategy.ts new file mode 100644 index 0000000000..93b01fd738 --- /dev/null +++ b/server/src/core/auth/strategies/jwt.auth.strategy.ts @@ -0,0 +1,43 @@ +import { Strategy, ExtractJwt } from 'passport-jwt'; +import { PassportStrategy } from '@nestjs/passport'; +import { Injectable, UnauthorizedException } from '@nestjs/common'; +import { ConfigService } from '@nestjs/config'; +import { PrismaService } from 'src/database/prisma.service'; +import { User, Workspace } from '@prisma/client'; + +export type JwtPayload = { userId: string; workspaceId: string }; +export type PassportUser = { user: User; workspace: Workspace }; + +@Injectable() +export class JwtAuthStrategy extends PassportStrategy(Strategy, 'jwt') { + constructor( + private readonly configService: ConfigService, + private readonly prismaService: PrismaService, + ) { + super({ + jwtFromRequest: ExtractJwt.fromAuthHeaderAsBearerToken(), + ignoreExpiration: false, + secretOrKey: configService.get('JWT_SECRET'), + }); + } + + async validate(payload: JwtPayload): Promise { + const user = await this.prismaService.user.findUniqueOrThrow({ + where: { id: payload.userId }, + }); + + if (!user) { + throw new UnauthorizedException(); + } + + const workspace = await this.prismaService.workspace.findUniqueOrThrow({ + where: { id: payload.workspaceId }, + }); + + if (!workspace) { + throw new UnauthorizedException(); + } + + return { user, workspace }; + } +} diff --git a/server/src/auth/token.controller.ts b/server/src/core/auth/token.controller.ts similarity index 100% rename from server/src/auth/token.controller.ts rename to server/src/core/auth/token.controller.ts diff --git a/server/src/core/comment/comment.module.ts b/server/src/core/comment/comment.module.ts new file mode 100644 index 0000000000..8234d7e769 --- /dev/null +++ b/server/src/core/comment/comment.module.ts @@ -0,0 +1,22 @@ +import { Module } from '@nestjs/common'; +import { CommentService } from './services/comment.service'; +import { CommentResolver } from './resolvers/comment.resolver'; +import { CommentRelationsResolver } from './resolvers/comment-relations.resolver'; +import { CommentThreadTargetService } from './services/comment-thread-target.service'; +import { CommentThreadResolver } from './resolvers/comment-thread.resolver'; +import { CommentThreadRelationsResolver } from './resolvers/comment-thread-relations.resolver'; +import { CommentThreadService } from './services/comment-thread.service'; + +@Module({ + providers: [ + CommentService, + CommentThreadService, + CommentThreadTargetService, + CommentResolver, + CommentRelationsResolver, + CommentThreadResolver, + CommentThreadRelationsResolver, + ], + exports: [CommentService, CommentThreadService, CommentThreadTargetService], +}) +export class CommentModule {} diff --git a/server/src/core/comment/resolvers/comment-relations.resolver.spec.ts b/server/src/core/comment/resolvers/comment-relations.resolver.spec.ts new file mode 100644 index 0000000000..5bae4434f3 --- /dev/null +++ b/server/src/core/comment/resolvers/comment-relations.resolver.spec.ts @@ -0,0 +1,25 @@ +import { Test, TestingModule } from '@nestjs/testing'; +import { CommentRelationsResolver } from './comment-relations.resolver'; +import { CommentService } from '../services/comment.service'; + +describe('CommentRelationsResolver', () => { + let resolver: CommentRelationsResolver; + + beforeEach(async () => { + const module: TestingModule = await Test.createTestingModule({ + providers: [ + CommentRelationsResolver, + { + provide: CommentService, + useValue: {}, + }, + ], + }).compile(); + + resolver = module.get(CommentRelationsResolver); + }); + + it('should be defined', () => { + expect(resolver).toBeDefined(); + }); +}); diff --git a/server/src/api/resolvers/relations/comment-relations.resolver.ts b/server/src/core/comment/resolvers/comment-relations.resolver.ts similarity index 56% rename from server/src/api/resolvers/relations/comment-relations.resolver.ts rename to server/src/core/comment/resolvers/comment-relations.resolver.ts index d65c900e3f..47ee810247 100644 --- a/server/src/api/resolvers/relations/comment-relations.resolver.ts +++ b/server/src/core/comment/resolvers/comment-relations.resolver.ts @@ -1,17 +1,17 @@ import * as TypeGraphQL from '@nestjs/graphql'; -import { PrismaService } from 'src/database/prisma.service'; -import { User } from 'src/api/@generated/user/user.model'; -import { Comment } from 'src/api/@generated/comment/comment.model'; +import { User } from 'src/core/@generated/user/user.model'; +import { Comment } from 'src/core/@generated/comment/comment.model'; +import { CommentService } from '../services/comment.service'; @TypeGraphQL.Resolver(() => Comment) export class CommentRelationsResolver { - constructor(private readonly prismaService: PrismaService) {} + constructor(private readonly commentService: CommentService) {} @TypeGraphQL.ResolveField(() => User, { nullable: true, }) async author(@TypeGraphQL.Parent() comment: Comment): Promise { - return await this.prismaService.comment + return await this.commentService .findFirst({ where: { id: comment.id, diff --git a/server/src/core/comment/resolvers/comment-thread-relations.resolver.spec.ts b/server/src/core/comment/resolvers/comment-thread-relations.resolver.spec.ts new file mode 100644 index 0000000000..a265986e0b --- /dev/null +++ b/server/src/core/comment/resolvers/comment-thread-relations.resolver.spec.ts @@ -0,0 +1,32 @@ +import { Test, TestingModule } from '@nestjs/testing'; +import { CommentThreadRelationsResolver } from './comment-thread-relations.resolver'; +import { CommentService } from '../services/comment.service'; +import { CommentThreadTargetService } from '../services/comment-thread-target.service'; + +describe('CommentThreadRelationsResolver', () => { + let resolver: CommentThreadRelationsResolver; + + beforeEach(async () => { + const module: TestingModule = await Test.createTestingModule({ + providers: [ + CommentThreadRelationsResolver, + { + provide: CommentService, + useValue: {}, + }, + { + provide: CommentThreadTargetService, + useValue: {}, + }, + ], + }).compile(); + + resolver = module.get( + CommentThreadRelationsResolver, + ); + }); + + it('should be defined', () => { + expect(resolver).toBeDefined(); + }); +}); diff --git a/server/src/api/resolvers/relations/comment-thread-relations.resolver.ts b/server/src/core/comment/resolvers/comment-thread-relations.resolver.ts similarity index 57% rename from server/src/api/resolvers/relations/comment-thread-relations.resolver.ts rename to server/src/core/comment/resolvers/comment-thread-relations.resolver.ts index 4077d47835..3cece89cbe 100644 --- a/server/src/api/resolvers/relations/comment-thread-relations.resolver.ts +++ b/server/src/core/comment/resolvers/comment-thread-relations.resolver.ts @@ -1,12 +1,16 @@ import * as TypeGraphQL from '@nestjs/graphql'; -import { CommentThreadTarget } from 'src/api/@generated/comment-thread-target/comment-thread-target.model'; -import { CommentThread } from 'src/api/@generated/comment-thread/comment-thread.model'; -import { Comment } from 'src/api/@generated/comment/comment.model'; -import { PrismaService } from 'src/database/prisma.service'; +import { CommentThreadTarget } from 'src/core/@generated/comment-thread-target/comment-thread-target.model'; +import { CommentThread } from 'src/core/@generated/comment-thread/comment-thread.model'; +import { Comment } from 'src/core/@generated/comment/comment.model'; +import { CommentService } from '../services/comment.service'; +import { CommentThreadTargetService } from '../services/comment-thread-target.service'; @TypeGraphQL.Resolver(() => CommentThread) export class CommentThreadRelationsResolver { - constructor(private readonly prismaService: PrismaService) {} + constructor( + private readonly commentService: CommentService, + private readonly commentThreadTargetService: CommentThreadTargetService, + ) {} @TypeGraphQL.ResolveField(() => [Comment], { nullable: false, @@ -14,7 +18,7 @@ export class CommentThreadRelationsResolver { async comments( @TypeGraphQL.Root() commentThread: CommentThread, ): Promise { - return this.prismaService.comment.findMany({ + return this.commentService.findMany({ where: { commentThreadId: commentThread.id, }, @@ -31,7 +35,7 @@ export class CommentThreadRelationsResolver { async commentThreadTargets( @TypeGraphQL.Root() commentThread: CommentThread, ): Promise { - return this.prismaService.commentThreadTarget.findMany({ + return this.commentThreadTargetService.findMany({ where: { commentThreadId: commentThread.id, }, diff --git a/server/src/core/comment/resolvers/comment-thread.resolver.spec.ts b/server/src/core/comment/resolvers/comment-thread.resolver.spec.ts new file mode 100644 index 0000000000..da08a3fd11 --- /dev/null +++ b/server/src/core/comment/resolvers/comment-thread.resolver.spec.ts @@ -0,0 +1,35 @@ +import { Test, TestingModule } from '@nestjs/testing'; +import { CommentThreadResolver } from './comment-thread.resolver'; +import { CommentThreadService } from '../services/comment-thread.service'; +import { CanActivate } from '@nestjs/common'; +import { CreateOneCommentGuard } from 'src/guards/create-one-comment.guard'; +import { CreateOneCommentThreadGuard } from 'src/guards/create-one-comment-thread.guard'; + +describe('CommentThreadResolver', () => { + let resolver: CommentThreadResolver; + + beforeEach(async () => { + const mockGuard: CanActivate = { canActivate: jest.fn(() => true) }; + + const module: TestingModule = await Test.createTestingModule({ + providers: [ + CommentThreadResolver, + { + provide: CommentThreadService, + useValue: {}, + }, + ], + }) + .overrideGuard(CreateOneCommentGuard) + .useValue(mockGuard) + .overrideGuard(CreateOneCommentThreadGuard) + .useValue(mockGuard) + .compile(); + + resolver = module.get(CommentThreadResolver); + }); + + it('should be defined', () => { + expect(resolver).toBeDefined(); + }); +}); diff --git a/server/src/core/comment/resolvers/comment-thread.resolver.ts b/server/src/core/comment/resolvers/comment-thread.resolver.ts new file mode 100644 index 0000000000..4abe4649bf --- /dev/null +++ b/server/src/core/comment/resolvers/comment-thread.resolver.ts @@ -0,0 +1,73 @@ +import { Resolver, Args, Mutation, Query } from '@nestjs/graphql'; +import { UseGuards } from '@nestjs/common'; +import { JwtAuthGuard } from 'src/guards/jwt.auth.guard'; +import { Workspace } from '../../../core/@generated/workspace/workspace.model'; +import { AuthWorkspace } from '../../../decorators/auth-workspace.decorator'; +import { CommentThread } from '../../../core/@generated/comment-thread/comment-thread.model'; +import { CreateOneCommentThreadArgs } from '../../../core/@generated/comment-thread/create-one-comment-thread.args'; +import { CreateOneCommentThreadGuard } from '../../../guards/create-one-comment-thread.guard'; +import { FindManyCommentThreadArgs } from '../../../core/@generated/comment-thread/find-many-comment-thread.args'; +import { CommentThreadService } from '../services/comment-thread.service'; +import { prepareFindManyArgs } from 'src/utils/prepare-find-many'; +import { UpdateOneCommentThreadArgs } from 'src/core/@generated/comment-thread/update-one-comment-thread.args'; +import { Prisma } from '@prisma/client'; + +@UseGuards(JwtAuthGuard) +@Resolver(() => CommentThread) +export class CommentThreadResolver { + constructor(private readonly commentThreadService: CommentThreadService) {} + + @UseGuards(CreateOneCommentThreadGuard) + @Mutation(() => CommentThread, { + nullable: false, + }) + async createOneCommentThread( + @Args() args: CreateOneCommentThreadArgs, + @AuthWorkspace() workspace: Workspace, + ): Promise { + const newCommentData = args.data.comments?.createMany?.data + ? args.data.comments?.createMany?.data?.map((comment) => ({ + ...comment, + ...{ workspaceId: workspace.id }, + })) + : []; + + const createdCommentThread = await this.commentThreadService.create({ + data: { + ...args.data, + ...{ comments: { createMany: { data: newCommentData } } }, + ...{ workspace: { connect: { id: workspace.id } } }, + }, + }); + + return createdCommentThread; + } + + @Mutation(() => CommentThread, { + nullable: false, + }) + async updateOneCommentThread( + @Args() args: UpdateOneCommentThreadArgs, + ): Promise { + const updatedCommentThread = await this.commentThreadService.update( + args satisfies UpdateOneCommentThreadArgs as Prisma.CommentThreadUpdateArgs, + ); + + return updatedCommentThread; + } + + @Query(() => [CommentThread]) + async findManyCommentThreads( + @Args() args: FindManyCommentThreadArgs, + @AuthWorkspace() workspace: Workspace, + ) { + const preparedArgs = prepareFindManyArgs( + args, + workspace, + ); + + const result = await this.commentThreadService.findMany(preparedArgs); + + return result; + } +} diff --git a/server/src/core/comment/resolvers/comment.resolver.spec.ts b/server/src/core/comment/resolvers/comment.resolver.spec.ts new file mode 100644 index 0000000000..1554710b19 --- /dev/null +++ b/server/src/core/comment/resolvers/comment.resolver.spec.ts @@ -0,0 +1,32 @@ +import { Test, TestingModule } from '@nestjs/testing'; +import { CommentResolver } from './comment.resolver'; +import { CommentService } from '../services/comment.service'; +import { CreateOneCommentGuard } from 'src/guards/create-one-comment.guard'; +import { CanActivate } from '@nestjs/common'; + +describe('CommentResolver', () => { + let resolver: CommentResolver; + + beforeEach(async () => { + const mockGuard: CanActivate = { canActivate: jest.fn(() => true) }; + + const module: TestingModule = await Test.createTestingModule({ + providers: [ + CommentResolver, + { + provide: CommentService, + useValue: {}, + }, + ], + }) + .overrideGuard(CreateOneCommentGuard) + .useValue(mockGuard) + .compile(); + + resolver = module.get(CommentResolver); + }); + + it('should be defined', () => { + expect(resolver).toBeDefined(); + }); +}); diff --git a/server/src/core/comment/resolvers/comment.resolver.ts b/server/src/core/comment/resolvers/comment.resolver.ts new file mode 100644 index 0000000000..39a563278b --- /dev/null +++ b/server/src/core/comment/resolvers/comment.resolver.ts @@ -0,0 +1,32 @@ +import { Resolver, Args, Mutation } from '@nestjs/graphql'; +import { UseGuards } from '@nestjs/common'; +import { JwtAuthGuard } from 'src/guards/jwt.auth.guard'; +import { Workspace } from '../../../core/@generated/workspace/workspace.model'; +import { AuthWorkspace } from '../../../decorators/auth-workspace.decorator'; +import { CreateOneCommentArgs } from '../../../core/@generated/comment/create-one-comment.args'; +import { Comment } from '../../../core/@generated/comment/comment.model'; +import { CreateOneCommentGuard } from '../../../guards/create-one-comment.guard'; +import { Prisma } from '@prisma/client'; +import { CommentService } from '../services/comment.service'; + +@UseGuards(JwtAuthGuard) +@Resolver(() => Comment) +export class CommentResolver { + constructor(private readonly commentService: CommentService) {} + + @UseGuards(CreateOneCommentGuard) + @Mutation(() => Comment, { + nullable: false, + }) + async createOneComment( + @Args() args: CreateOneCommentArgs, + @AuthWorkspace() workspace: Workspace, + ): Promise { + return this.commentService.create({ + data: { + ...args.data, + ...{ workspace: { connect: { id: workspace.id } } }, + }, + } satisfies CreateOneCommentArgs as Prisma.CommentCreateArgs); + } +} diff --git a/server/src/core/comment/services/comment-thread-target.service.spec.ts b/server/src/core/comment/services/comment-thread-target.service.spec.ts new file mode 100644 index 0000000000..5c00ab220e --- /dev/null +++ b/server/src/core/comment/services/comment-thread-target.service.spec.ts @@ -0,0 +1,28 @@ +import { Test, TestingModule } from '@nestjs/testing'; +import { CommentThreadTargetService } from './comment-thread-target.service'; +import { PrismaService } from 'src/database/prisma.service'; +import { prismaMock } from 'src/prisma-mock/jest-prisma-singleton'; + +describe('CommentThreadTargetService', () => { + let service: CommentThreadTargetService; + + beforeEach(async () => { + const module: TestingModule = await Test.createTestingModule({ + providers: [ + CommentThreadTargetService, + { + provide: PrismaService, + useValue: prismaMock, + }, + ], + }).compile(); + + service = module.get( + CommentThreadTargetService, + ); + }); + + it('should be defined', () => { + expect(service).toBeDefined(); + }); +}); diff --git a/server/src/core/comment/services/comment-thread-target.service.ts b/server/src/core/comment/services/comment-thread-target.service.ts new file mode 100644 index 0000000000..fafbb16c46 --- /dev/null +++ b/server/src/core/comment/services/comment-thread-target.service.ts @@ -0,0 +1,38 @@ +import { Injectable } from '@nestjs/common'; +import { PrismaService } from 'src/database/prisma.service'; + +@Injectable() +export class CommentThreadTargetService { + constructor(private readonly prismaService: PrismaService) {} + + // Find + findFirst = this.prismaService.commentThreadTarget.findFirst; + findFirstOrThrow = this.prismaService.commentThreadTarget.findFirstOrThrow; + + findUnique = this.prismaService.commentThreadTarget.findUnique; + findUniqueOrThrow = this.prismaService.commentThreadTarget.findUniqueOrThrow; + + findMany = this.prismaService.commentThreadTarget.findMany; + + // Create + create = this.prismaService.commentThreadTarget.create; + createMany = this.prismaService.commentThreadTarget.createMany; + + // Update + update = this.prismaService.commentThreadTarget.update; + upsert = this.prismaService.commentThreadTarget.upsert; + updateMany = this.prismaService.commentThreadTarget.updateMany; + + // Delete + delete = this.prismaService.commentThreadTarget.delete; + deleteMany = this.prismaService.commentThreadTarget.deleteMany; + + // Aggregate + aggregate = this.prismaService.commentThreadTarget.aggregate; + + // Count + count = this.prismaService.commentThreadTarget.count; + + // GroupBy + groupBy = this.prismaService.commentThreadTarget.groupBy; +} diff --git a/server/src/core/comment/services/comment-thread.service.spec.ts b/server/src/core/comment/services/comment-thread.service.spec.ts new file mode 100644 index 0000000000..04cb088405 --- /dev/null +++ b/server/src/core/comment/services/comment-thread.service.spec.ts @@ -0,0 +1,26 @@ +import { Test, TestingModule } from '@nestjs/testing'; +import { CommentThreadService } from './comment-thread.service'; +import { PrismaService } from 'src/database/prisma.service'; +import { prismaMock } from 'src/prisma-mock/jest-prisma-singleton'; + +describe('CommentThreadService', () => { + let service: CommentThreadService; + + beforeEach(async () => { + const module: TestingModule = await Test.createTestingModule({ + providers: [ + CommentThreadService, + { + provide: PrismaService, + useValue: prismaMock, + }, + ], + }).compile(); + + service = module.get(CommentThreadService); + }); + + it('should be defined', () => { + expect(service).toBeDefined(); + }); +}); diff --git a/server/src/core/comment/services/comment-thread.service.ts b/server/src/core/comment/services/comment-thread.service.ts new file mode 100644 index 0000000000..550322288c --- /dev/null +++ b/server/src/core/comment/services/comment-thread.service.ts @@ -0,0 +1,38 @@ +import { Injectable } from '@nestjs/common'; +import { PrismaService } from 'src/database/prisma.service'; + +@Injectable() +export class CommentThreadService { + constructor(private readonly prismaService: PrismaService) {} + + // Find + findFirst = this.prismaService.commentThread.findFirst; + findFirstOrThrow = this.prismaService.commentThread.findFirstOrThrow; + + findUnique = this.prismaService.commentThread.findUnique; + findUniqueOrThrow = this.prismaService.commentThread.findUniqueOrThrow; + + findMany = this.prismaService.commentThread.findMany; + + // Create + create = this.prismaService.commentThread.create; + createMany = this.prismaService.commentThread.createMany; + + // Update + update = this.prismaService.commentThread.update; + upsert = this.prismaService.commentThread.upsert; + updateMany = this.prismaService.commentThread.updateMany; + + // Delete + delete = this.prismaService.commentThread.delete; + deleteMany = this.prismaService.commentThread.deleteMany; + + // Aggregate + aggregate = this.prismaService.commentThread.aggregate; + + // Count + count = this.prismaService.commentThread.count; + + // GroupBy + groupBy = this.prismaService.commentThread.groupBy; +} diff --git a/server/src/core/comment/services/comment.service.spec.ts b/server/src/core/comment/services/comment.service.spec.ts new file mode 100644 index 0000000000..30bdc59895 --- /dev/null +++ b/server/src/core/comment/services/comment.service.spec.ts @@ -0,0 +1,26 @@ +import { Test, TestingModule } from '@nestjs/testing'; +import { CommentService } from './comment.service'; +import { PrismaService } from 'src/database/prisma.service'; +import { prismaMock } from 'src/prisma-mock/jest-prisma-singleton'; + +describe('CommentService', () => { + let service: CommentService; + + beforeEach(async () => { + const module: TestingModule = await Test.createTestingModule({ + providers: [ + CommentService, + { + provide: PrismaService, + useValue: prismaMock, + }, + ], + }).compile(); + + service = module.get(CommentService); + }); + + it('should be defined', () => { + expect(service).toBeDefined(); + }); +}); diff --git a/server/src/core/comment/services/comment.service.ts b/server/src/core/comment/services/comment.service.ts new file mode 100644 index 0000000000..51c8c61fd7 --- /dev/null +++ b/server/src/core/comment/services/comment.service.ts @@ -0,0 +1,38 @@ +import { Injectable } from '@nestjs/common'; +import { PrismaService } from 'src/database/prisma.service'; + +@Injectable() +export class CommentService { + constructor(private readonly prismaService: PrismaService) {} + + // Find + findFirst = this.prismaService.comment.findFirst; + findFirstOrThrow = this.prismaService.comment.findFirstOrThrow; + + findUnique = this.prismaService.comment.findUnique; + findUniqueOrThrow = this.prismaService.comment.findUniqueOrThrow; + + findMany = this.prismaService.comment.findMany; + + // Create + create = this.prismaService.comment.create; + createMany = this.prismaService.comment.createMany; + + // Update + update = this.prismaService.comment.update; + upsert = this.prismaService.comment.upsert; + updateMany = this.prismaService.comment.updateMany; + + // Delete + delete = this.prismaService.comment.delete; + deleteMany = this.prismaService.comment.deleteMany; + + // Aggregate + aggregate = this.prismaService.comment.aggregate; + + // Count + count = this.prismaService.comment.count; + + // GroupBy + groupBy = this.prismaService.comment.groupBy; +} diff --git a/server/src/core/company/company-relations.resolver.spec.ts b/server/src/core/company/company-relations.resolver.spec.ts new file mode 100644 index 0000000000..312b4a2e8c --- /dev/null +++ b/server/src/core/company/company-relations.resolver.spec.ts @@ -0,0 +1,35 @@ +import { Test, TestingModule } from '@nestjs/testing'; +import { CompanyRelationsResolver } from './company-relations.resolver'; +import { CompanyService } from './company.service'; +import { CommentThreadService } from '../comment/services/comment-thread.service'; +import { CommentService } from '../comment/services/comment.service'; + +describe('CompanyRelationsResolver', () => { + let resolver: CompanyRelationsResolver; + + beforeEach(async () => { + const module: TestingModule = await Test.createTestingModule({ + providers: [ + CompanyRelationsResolver, + { + provide: CompanyService, + useValue: {}, + }, + { + provide: CommentThreadService, + useValue: {}, + }, + { + provide: CommentService, + useValue: {}, + }, + ], + }).compile(); + + resolver = module.get(CompanyRelationsResolver); + }); + + it('should be defined', () => { + expect(resolver).toBeDefined(); + }); +}); diff --git a/server/src/api/resolvers/relations/company-relations.resolver.ts b/server/src/core/company/company-relations.resolver.ts similarity index 64% rename from server/src/api/resolvers/relations/company-relations.resolver.ts rename to server/src/core/company/company-relations.resolver.ts index c2ac9d555a..9956802446 100644 --- a/server/src/api/resolvers/relations/company-relations.resolver.ts +++ b/server/src/core/company/company-relations.resolver.ts @@ -1,13 +1,19 @@ import * as TypeGraphQL from '@nestjs/graphql'; -import { CommentThread } from 'src/api/@generated/comment-thread/comment-thread.model'; -import { Comment } from 'src/api/@generated/comment/comment.model'; -import { Company } from 'src/api/@generated/company/company.model'; -import { User } from 'src/api/@generated/user/user.model'; -import { PrismaService } from 'src/database/prisma.service'; +import { CommentThread } from 'src/core/@generated/comment-thread/comment-thread.model'; +import { Comment } from 'src/core/@generated/comment/comment.model'; +import { Company } from 'src/core/@generated/company/company.model'; +import { User } from 'src/core/@generated/user/user.model'; +import { CompanyService } from './company.service'; +import { CommentThreadService } from '../comment/services/comment-thread.service'; +import { CommentService } from '../comment/services/comment.service'; @TypeGraphQL.Resolver(() => Company) export class CompanyRelationsResolver { - constructor(private readonly prismaService: PrismaService) {} + constructor( + private readonly companyService: CompanyService, + private readonly commentThreadService: CommentThreadService, + private readonly commentService: CommentService, + ) {} @TypeGraphQL.ResolveField(() => User, { nullable: true, @@ -15,7 +21,7 @@ export class CompanyRelationsResolver { async accountOwner( @TypeGraphQL.Parent() company: Company, ): Promise { - return this.prismaService.company + return this.companyService .findUniqueOrThrow({ where: { id: company.id, @@ -30,7 +36,7 @@ export class CompanyRelationsResolver { async commentThreads( @TypeGraphQL.Root() company: Company, ): Promise { - return this.prismaService.commentThread.findMany({ + return this.commentThreadService.findMany({ where: { commentThreadTargets: { some: { @@ -46,7 +52,7 @@ export class CompanyRelationsResolver { nullable: false, }) async comments(@TypeGraphQL.Root() company: Company): Promise { - return this.prismaService.comment.findMany({ + return this.commentService.findMany({ where: { commentThread: { commentThreadTargets: { @@ -64,7 +70,7 @@ export class CompanyRelationsResolver { nullable: false, }) async _commentCount(@TypeGraphQL.Root() company: Company): Promise { - return this.prismaService.comment.count({ + return this.commentService.count({ where: { commentThread: { commentThreadTargets: { diff --git a/server/src/core/company/company.module.ts b/server/src/core/company/company.module.ts new file mode 100644 index 0000000000..a80dc9fd94 --- /dev/null +++ b/server/src/core/company/company.module.ts @@ -0,0 +1,12 @@ +import { Module } from '@nestjs/common'; +import { CompanyService } from './company.service'; +import { CompanyResolver } from './company.resolver'; +import { CompanyRelationsResolver } from './company-relations.resolver'; +import { CommentModule } from '../comment/comment.module'; + +@Module({ + imports: [CommentModule, CommentModule], + providers: [CompanyService, CompanyResolver, CompanyRelationsResolver], + exports: [CompanyService], +}) +export class CompanyModule {} diff --git a/server/src/core/company/company.resolver.spec.ts b/server/src/core/company/company.resolver.spec.ts new file mode 100644 index 0000000000..78696bfbc4 --- /dev/null +++ b/server/src/core/company/company.resolver.spec.ts @@ -0,0 +1,38 @@ +import { Test, TestingModule } from '@nestjs/testing'; +import { CompanyResolver } from './company.resolver'; +import { CompanyService } from './company.service'; +import { UpdateOneGuard } from 'src/guards/update-one.guard'; +import { CanActivate } from '@nestjs/common'; +import { DeleteManyGuard } from 'src/guards/delete-many.guard'; +import { CreateOneGuard } from 'src/guards/create-one.guard'; + +describe('CompanyResolver', () => { + let resolver: CompanyResolver; + + beforeEach(async () => { + const mockGuard: CanActivate = { canActivate: jest.fn(() => true) }; + + const module: TestingModule = await Test.createTestingModule({ + providers: [ + CompanyResolver, + { + provide: CompanyService, + useValue: {}, + }, + ], + }) + .overrideGuard(UpdateOneGuard) + .useValue(mockGuard) + .overrideGuard(DeleteManyGuard) + .useValue(mockGuard) + .overrideGuard(CreateOneGuard) + .useValue(mockGuard) + .compile(); + + resolver = module.get(CompanyResolver); + }); + + it('should be defined', () => { + expect(resolver).toBeDefined(); + }); +}); diff --git a/server/src/api/resolvers/company.resolver.ts b/server/src/core/company/company.resolver.ts similarity index 50% rename from server/src/api/resolvers/company.resolver.ts rename to server/src/core/company/company.resolver.ts index 8d93e82bad..137a948d07 100644 --- a/server/src/api/resolvers/company.resolver.ts +++ b/server/src/core/company/company.resolver.ts @@ -1,40 +1,36 @@ import { Resolver, Query, Args, Mutation } from '@nestjs/graphql'; -import { JwtAuthGuard } from 'src/auth/guards/jwt.auth.guard'; +import { JwtAuthGuard } from 'src/guards/jwt.auth.guard'; import { UseGuards } from '@nestjs/common'; -import { AuthWorkspace } from './decorators/auth-workspace.decorator'; -import { PrismaService } from 'src/database/prisma.service'; -import { Company } from '../@generated/company/company.model'; -import { FindManyCompanyArgs } from '../@generated/company/find-many-company.args'; -import { UpdateOneCompanyArgs } from '../@generated/company/update-one-company.args'; -import { CreateOneCompanyArgs } from '../@generated/company/create-one-company.args'; -import { AffectedRows } from '../@generated/prisma/affected-rows.output'; -import { DeleteManyCompanyArgs } from '../@generated/company/delete-many-company.args'; +import { AuthWorkspace } from '../../decorators/auth-workspace.decorator'; +import { Company } from '../../core/@generated/company/company.model'; +import { FindManyCompanyArgs } from '../../core/@generated/company/find-many-company.args'; +import { UpdateOneCompanyArgs } from '../../core/@generated/company/update-one-company.args'; +import { CreateOneCompanyArgs } from '../../core/@generated/company/create-one-company.args'; +import { AffectedRows } from '../../core/@generated/prisma/affected-rows.output'; +import { DeleteManyCompanyArgs } from '../../core/@generated/company/delete-many-company.args'; import { Workspace } from '@prisma/client'; -import { ArgsService } from './services/args.service'; import { Prisma } from '@prisma/client'; -import { UpdateOneGuard } from './guards/update-one.guard'; -import { DeleteManyGuard } from './guards/delete-many.guard'; -import { CreateOneGuard } from './guards/create-one.guard'; +import { UpdateOneGuard } from '../../guards/update-one.guard'; +import { DeleteManyGuard } from '../../guards/delete-many.guard'; +import { CreateOneGuard } from '../../guards/create-one.guard'; +import { CompanyService } from './company.service'; +import { prepareFindManyArgs } from 'src/utils/prepare-find-many'; @UseGuards(JwtAuthGuard) @Resolver(() => Company) export class CompanyResolver { - constructor( - private readonly prismaService: PrismaService, - private readonly argsService: ArgsService, - ) {} + constructor(private readonly companyService: CompanyService) {} @Query(() => [Company]) async findManyCompany( @Args() args: FindManyCompanyArgs, @AuthWorkspace() workspace: Workspace, ) { - const preparedArgs = - await this.argsService.prepareFindManyArgs( - args, - workspace, - ); - return this.prismaService.company.findMany(preparedArgs); + const preparedArgs = prepareFindManyArgs( + args, + workspace, + ); + return this.companyService.findMany(preparedArgs); } @UseGuards(UpdateOneGuard) @@ -48,7 +44,7 @@ export class CompanyResolver { args.data.accountOwner = { disconnect: true }; } - return this.prismaService.company.update({ + return this.companyService.update({ ...args, } satisfies UpdateOneCompanyArgs as Prisma.CompanyUpdateArgs); } @@ -60,7 +56,7 @@ export class CompanyResolver { async deleteManyCompany( @Args() args: DeleteManyCompanyArgs, ): Promise { - return this.prismaService.company.deleteMany({ + return this.companyService.deleteMany({ ...args, }); } @@ -73,7 +69,7 @@ export class CompanyResolver { @Args() args: CreateOneCompanyArgs, @AuthWorkspace() workspace: Workspace, ): Promise { - return this.prismaService.company.create({ + return this.companyService.create({ data: { ...args.data, ...{ workspace: { connect: { id: workspace.id } } }, diff --git a/server/src/core/company/company.service.spec.ts b/server/src/core/company/company.service.spec.ts new file mode 100644 index 0000000000..8ff7340582 --- /dev/null +++ b/server/src/core/company/company.service.spec.ts @@ -0,0 +1,26 @@ +import { Test, TestingModule } from '@nestjs/testing'; +import { CompanyService } from './company.service'; +import { PrismaService } from 'src/database/prisma.service'; +import { prismaMock } from 'src/prisma-mock/jest-prisma-singleton'; + +describe('CompanyService', () => { + let service: CompanyService; + + beforeEach(async () => { + const module: TestingModule = await Test.createTestingModule({ + providers: [ + CompanyService, + { + provide: PrismaService, + useValue: prismaMock, + }, + ], + }).compile(); + + service = module.get(CompanyService); + }); + + it('should be defined', () => { + expect(service).toBeDefined(); + }); +}); diff --git a/server/src/core/company/company.service.ts b/server/src/core/company/company.service.ts new file mode 100644 index 0000000000..169f7514f1 --- /dev/null +++ b/server/src/core/company/company.service.ts @@ -0,0 +1,38 @@ +import { Injectable } from '@nestjs/common'; +import { PrismaService } from 'src/database/prisma.service'; + +@Injectable() +export class CompanyService { + constructor(private readonly prismaService: PrismaService) {} + + // Find + findFirst = this.prismaService.company.findFirst; + findFirstOrThrow = this.prismaService.company.findFirstOrThrow; + + findUnique = this.prismaService.company.findUnique; + findUniqueOrThrow = this.prismaService.company.findUniqueOrThrow; + + findMany = this.prismaService.company.findMany; + + // Create + create = this.prismaService.company.create; + createMany = this.prismaService.company.createMany; + + // Update + update = this.prismaService.company.update; + upsert = this.prismaService.company.upsert; + updateMany = this.prismaService.company.updateMany; + + // Delete + delete = this.prismaService.company.delete; + deleteMany = this.prismaService.company.deleteMany; + + // Aggregate + aggregate = this.prismaService.company.aggregate; + + // Count + count = this.prismaService.company.count; + + // GroupBy + groupBy = this.prismaService.company.groupBy; +} diff --git a/server/src/core/core.module.ts b/server/src/core/core.module.ts new file mode 100644 index 0000000000..018114b12d --- /dev/null +++ b/server/src/core/core.module.ts @@ -0,0 +1,30 @@ +import { Module } from '@nestjs/common'; +import { UserModule } from './user/user.module'; +import { CommentModule } from './comment/comment.module'; +import { CompanyModule } from './company/company.module'; +import { PersonModule } from './person/person.module'; +import { PipelineModule } from './pipeline/pipeline.module'; +import { AuthModule } from './auth/auth.module'; +import { WorkspaceModule } from './workspace/workspace.module'; + +@Module({ + imports: [ + AuthModule, + UserModule, + CommentModule, + CompanyModule, + PersonModule, + PipelineModule, + WorkspaceModule, + ], + exports: [ + AuthModule, + UserModule, + CommentModule, + CompanyModule, + PersonModule, + PipelineModule, + WorkspaceModule, + ], +}) +export class CoreModule {} diff --git a/server/src/core/person/person-relations.resolver.spec.ts b/server/src/core/person/person-relations.resolver.spec.ts new file mode 100644 index 0000000000..236c68abc7 --- /dev/null +++ b/server/src/core/person/person-relations.resolver.spec.ts @@ -0,0 +1,35 @@ +import { Test, TestingModule } from '@nestjs/testing'; +import { PersonRelationsResolver } from './person-relations.resolver'; +import { PersonService } from './person.service'; +import { CommentThreadService } from '../comment/services/comment-thread.service'; +import { CommentService } from '../comment/services/comment.service'; + +describe('PersonRelationsResolver', () => { + let resolver: PersonRelationsResolver; + + beforeEach(async () => { + const module: TestingModule = await Test.createTestingModule({ + providers: [ + PersonRelationsResolver, + { + provide: PersonService, + useValue: {}, + }, + { + provide: CommentThreadService, + useValue: {}, + }, + { + provide: CommentService, + useValue: {}, + }, + ], + }).compile(); + + resolver = module.get(PersonRelationsResolver); + }); + + it('should be defined', () => { + expect(resolver).toBeDefined(); + }); +}); diff --git a/server/src/api/resolvers/relations/person-relations.resolver.ts b/server/src/core/person/person-relations.resolver.ts similarity index 64% rename from server/src/api/resolvers/relations/person-relations.resolver.ts rename to server/src/core/person/person-relations.resolver.ts index 75dee2383e..533c2e494b 100644 --- a/server/src/api/resolvers/relations/person-relations.resolver.ts +++ b/server/src/core/person/person-relations.resolver.ts @@ -1,19 +1,25 @@ import * as TypeGraphQL from '@nestjs/graphql'; -import { CommentThread } from 'src/api/@generated/comment-thread/comment-thread.model'; -import { Comment } from 'src/api/@generated/comment/comment.model'; -import { Company } from 'src/api/@generated/company/company.model'; -import { Person } from 'src/api/@generated/person/person.model'; -import { PrismaService } from 'src/database/prisma.service'; +import { CommentThread } from 'src/core/@generated/comment-thread/comment-thread.model'; +import { Comment } from 'src/core/@generated/comment/comment.model'; +import { Company } from 'src/core/@generated/company/company.model'; +import { Person } from 'src/core/@generated/person/person.model'; +import { PersonService } from './person.service'; +import { CommentThreadService } from '../comment/services/comment-thread.service'; +import { CommentService } from '../comment/services/comment.service'; @TypeGraphQL.Resolver(() => Person) export class PersonRelationsResolver { - constructor(private readonly prismaService: PrismaService) {} + constructor( + private readonly personService: PersonService, + private readonly commentThreadService: CommentThreadService, + private readonly commentService: CommentService, + ) {} @TypeGraphQL.ResolveField(() => Company, { nullable: true, }) async company(@TypeGraphQL.Parent() person: Person): Promise { - return await this.prismaService.person + return await this.personService .findUniqueOrThrow({ where: { id: person.id, @@ -28,7 +34,7 @@ export class PersonRelationsResolver { async commentThreads( @TypeGraphQL.Root() person: Person, ): Promise { - return await this.prismaService.commentThread.findMany({ + return await this.commentThreadService.findMany({ where: { commentThreadTargets: { some: { @@ -44,7 +50,7 @@ export class PersonRelationsResolver { nullable: false, }) async comments(@TypeGraphQL.Root() person: Person): Promise { - return this.prismaService.comment.findMany({ + return this.commentService.findMany({ where: { commentThread: { commentThreadTargets: { @@ -62,7 +68,7 @@ export class PersonRelationsResolver { nullable: false, }) async _commentCount(@TypeGraphQL.Root() person: Person): Promise { - return this.prismaService.comment.count({ + return this.commentService.count({ where: { commentThread: { commentThreadTargets: { diff --git a/server/src/core/person/person.module.ts b/server/src/core/person/person.module.ts new file mode 100644 index 0000000000..52a252d948 --- /dev/null +++ b/server/src/core/person/person.module.ts @@ -0,0 +1,12 @@ +import { Module } from '@nestjs/common'; +import { PersonService } from './person.service'; +import { PersonResolver } from './person.resolver'; +import { PersonRelationsResolver } from './person-relations.resolver'; +import { CommentModule } from '../comment/comment.module'; + +@Module({ + imports: [CommentModule, CommentModule], + providers: [PersonService, PersonResolver, PersonRelationsResolver], + exports: [PersonService], +}) +export class PersonModule {} diff --git a/server/src/core/person/person.resolver.spec.ts b/server/src/core/person/person.resolver.spec.ts new file mode 100644 index 0000000000..67f7433bd9 --- /dev/null +++ b/server/src/core/person/person.resolver.spec.ts @@ -0,0 +1,38 @@ +import { Test, TestingModule } from '@nestjs/testing'; +import { PersonResolver } from './person.resolver'; +import { PersonService } from './person.service'; +import { UpdateOneGuard } from 'src/guards/update-one.guard'; +import { CanActivate } from '@nestjs/common'; +import { DeleteManyGuard } from 'src/guards/delete-many.guard'; +import { CreateOneGuard } from 'src/guards/create-one.guard'; + +describe('PersonResolver', () => { + let resolver: PersonResolver; + + beforeEach(async () => { + const mockGuard: CanActivate = { canActivate: jest.fn(() => true) }; + + const module: TestingModule = await Test.createTestingModule({ + providers: [ + PersonResolver, + { + provide: PersonService, + useValue: {}, + }, + ], + }) + .overrideGuard(UpdateOneGuard) + .useValue(mockGuard) + .overrideGuard(DeleteManyGuard) + .useValue(mockGuard) + .overrideGuard(CreateOneGuard) + .useValue(mockGuard) + .compile(); + + resolver = module.get(PersonResolver); + }); + + it('should be defined', () => { + expect(resolver).toBeDefined(); + }); +}); diff --git a/server/src/api/resolvers/person.resolver.ts b/server/src/core/person/person.resolver.ts similarity index 50% rename from server/src/api/resolvers/person.resolver.ts rename to server/src/core/person/person.resolver.ts index aa0087413f..004af11794 100644 --- a/server/src/api/resolvers/person.resolver.ts +++ b/server/src/core/person/person.resolver.ts @@ -1,28 +1,25 @@ import { Resolver, Query, Args, Mutation } from '@nestjs/graphql'; import { UseGuards } from '@nestjs/common'; -import { JwtAuthGuard } from 'src/auth/guards/jwt.auth.guard'; -import { PrismaService } from 'src/database/prisma.service'; -import { Person } from '../@generated/person/person.model'; -import { FindManyPersonArgs } from '../@generated/person/find-many-person.args'; -import { UpdateOnePersonArgs } from '../@generated/person/update-one-person.args'; -import { CreateOnePersonArgs } from '../@generated/person/create-one-person.args'; -import { AffectedRows } from '../@generated/prisma/affected-rows.output'; -import { DeleteManyPersonArgs } from '../@generated/person/delete-many-person.args'; -import { Workspace } from '../@generated/workspace/workspace.model'; -import { AuthWorkspace } from './decorators/auth-workspace.decorator'; -import { ArgsService } from './services/args.service'; +import { JwtAuthGuard } from 'src/guards/jwt.auth.guard'; +import { Person } from '../../core/@generated/person/person.model'; +import { FindManyPersonArgs } from '../../core/@generated/person/find-many-person.args'; +import { UpdateOnePersonArgs } from '../../core/@generated/person/update-one-person.args'; +import { CreateOnePersonArgs } from '../../core/@generated/person/create-one-person.args'; +import { AffectedRows } from '../../core/@generated/prisma/affected-rows.output'; +import { DeleteManyPersonArgs } from '../../core/@generated/person/delete-many-person.args'; +import { Workspace } from '../../core/@generated/workspace/workspace.model'; +import { AuthWorkspace } from '../../decorators/auth-workspace.decorator'; import { Prisma } from '@prisma/client'; -import { UpdateOneGuard } from './guards/update-one.guard'; -import { DeleteManyGuard } from './guards/delete-many.guard'; -import { CreateOneGuard } from './guards/create-one.guard'; +import { UpdateOneGuard } from '../../guards/update-one.guard'; +import { DeleteManyGuard } from '../../guards/delete-many.guard'; +import { CreateOneGuard } from '../../guards/create-one.guard'; +import { PersonService } from './person.service'; +import { prepareFindManyArgs } from 'src/utils/prepare-find-many'; @UseGuards(JwtAuthGuard) @Resolver(() => Person) export class PersonResolver { - constructor( - private readonly prismaService: PrismaService, - private readonly argsService: ArgsService, - ) {} + constructor(private readonly personService: PersonService) {} @Query(() => [Person], { nullable: false, @@ -31,12 +28,11 @@ export class PersonResolver { @Args() args: FindManyPersonArgs, @AuthWorkspace() workspace: Workspace, ): Promise { - const preparedArgs = - await this.argsService.prepareFindManyArgs( - args, - workspace, - ); - return this.prismaService.person.findMany({ + const preparedArgs = prepareFindManyArgs( + args, + workspace, + ); + return this.personService.findMany({ ...preparedArgs, }); } @@ -52,7 +48,7 @@ export class PersonResolver { args.data.company = { disconnect: true }; } - return this.prismaService.person.update({ + return this.personService.update({ ...args, } satisfies UpdateOnePersonArgs as Prisma.PersonUpdateArgs); } @@ -64,7 +60,7 @@ export class PersonResolver { async deleteManyPerson( @Args() args: DeleteManyPersonArgs, ): Promise { - return this.prismaService.person.deleteMany({ + return this.personService.deleteMany({ ...args, }); } @@ -77,7 +73,7 @@ export class PersonResolver { @Args() args: CreateOnePersonArgs, @AuthWorkspace() workspace: Workspace, ): Promise { - return this.prismaService.person.create({ + return this.personService.create({ data: { ...args.data, ...{ workspace: { connect: { id: workspace.id } } }, diff --git a/server/src/core/person/person.service.spec.ts b/server/src/core/person/person.service.spec.ts new file mode 100644 index 0000000000..6db8370748 --- /dev/null +++ b/server/src/core/person/person.service.spec.ts @@ -0,0 +1,26 @@ +import { Test, TestingModule } from '@nestjs/testing'; +import { PersonService } from './person.service'; +import { PrismaService } from 'src/database/prisma.service'; +import { prismaMock } from 'src/prisma-mock/jest-prisma-singleton'; + +describe('PersonService', () => { + let service: PersonService; + + beforeEach(async () => { + const module: TestingModule = await Test.createTestingModule({ + providers: [ + PersonService, + { + provide: PrismaService, + useValue: prismaMock, + }, + ], + }).compile(); + + service = module.get(PersonService); + }); + + it('should be defined', () => { + expect(service).toBeDefined(); + }); +}); diff --git a/server/src/core/person/person.service.ts b/server/src/core/person/person.service.ts new file mode 100644 index 0000000000..7b0ca725c7 --- /dev/null +++ b/server/src/core/person/person.service.ts @@ -0,0 +1,38 @@ +import { Injectable } from '@nestjs/common'; +import { PrismaService } from 'src/database/prisma.service'; + +@Injectable() +export class PersonService { + constructor(private readonly prismaService: PrismaService) {} + + // Find + findFirst = this.prismaService.person.findFirst; + findFirstOrThrow = this.prismaService.person.findFirstOrThrow; + + findUnique = this.prismaService.person.findUnique; + findUniqueOrThrow = this.prismaService.person.findUniqueOrThrow; + + findMany = this.prismaService.person.findMany; + + // Create + create = this.prismaService.person.create; + createMany = this.prismaService.person.createMany; + + // Update + update = this.prismaService.person.update; + upsert = this.prismaService.person.upsert; + updateMany = this.prismaService.person.updateMany; + + // Delete + delete = this.prismaService.person.delete; + deleteMany = this.prismaService.person.deleteMany; + + // Aggregate + aggregate = this.prismaService.person.aggregate; + + // Count + count = this.prismaService.person.count; + + // GroupBy + groupBy = this.prismaService.person.groupBy; +} diff --git a/server/src/core/pipeline/pipeline.module.ts b/server/src/core/pipeline/pipeline.module.ts new file mode 100644 index 0000000000..4d1d1047a2 --- /dev/null +++ b/server/src/core/pipeline/pipeline.module.ts @@ -0,0 +1,27 @@ +import { Module } from '@nestjs/common'; +import { PipelineService } from './services/pipeline.service'; +import { PipelineResolver } from './resolvers/pipeline.resolver'; +import { PipelineRelationsResolver } from './resolvers/pipeline-relations.resolver'; +import { PipelineStageResolver } from './resolvers/pipeline-stage.resolver'; +import { PipelineStageRelationsResolver } from './resolvers/pipeline-stage-relations.resolver'; +import { PipelineProgressResolver } from './resolvers/pipeline-progress.resolver'; +import { PipelineProgressRelationsResolver } from './resolvers/pipeline-progress-relations.resolver'; +import { PipelineStageService } from './services/pipeline-stage.service'; +import { PipelineProgressService } from './services/pipeline-progress.service'; + +@Module({ + imports: [], + providers: [ + PipelineService, + PipelineStageService, + PipelineProgressService, + PipelineResolver, + PipelineRelationsResolver, + PipelineStageResolver, + PipelineStageRelationsResolver, + PipelineProgressResolver, + PipelineProgressRelationsResolver, + ], + exports: [PipelineService, PipelineStageService, PipelineProgressService], +}) +export class PipelineModule {} diff --git a/server/src/core/pipeline/resolvers/pipeline-progress-relations.resolver.spec.ts b/server/src/core/pipeline/resolvers/pipeline-progress-relations.resolver.spec.ts new file mode 100644 index 0000000000..59e6427235 --- /dev/null +++ b/server/src/core/pipeline/resolvers/pipeline-progress-relations.resolver.spec.ts @@ -0,0 +1,32 @@ +import { Test, TestingModule } from '@nestjs/testing'; +import { PipelineProgressRelationsResolver } from './pipeline-progress-relations.resolver'; +import { PipelineStageService } from '../services/pipeline-stage.service'; +import { PipelineService } from '../services/pipeline.service'; + +describe('PipelineProgressRelationsResolver', () => { + let resolver: PipelineProgressRelationsResolver; + + beforeEach(async () => { + const module: TestingModule = await Test.createTestingModule({ + providers: [ + PipelineProgressRelationsResolver, + { + provide: PipelineStageService, + useValue: {}, + }, + { + provide: PipelineService, + useValue: {}, + }, + ], + }).compile(); + + resolver = module.get( + PipelineProgressRelationsResolver, + ); + }); + + it('should be defined', () => { + expect(resolver).toBeDefined(); + }); +}); diff --git a/server/src/api/resolvers/relations/pipeline-progress-relations.resolver.ts b/server/src/core/pipeline/resolvers/pipeline-progress-relations.resolver.ts similarity index 50% rename from server/src/api/resolvers/relations/pipeline-progress-relations.resolver.ts rename to server/src/core/pipeline/resolvers/pipeline-progress-relations.resolver.ts index 5305fa260e..5520927599 100644 --- a/server/src/api/resolvers/relations/pipeline-progress-relations.resolver.ts +++ b/server/src/core/pipeline/resolvers/pipeline-progress-relations.resolver.ts @@ -1,12 +1,16 @@ import * as TypeGraphQL from '@nestjs/graphql'; -import { PipelineProgress } from 'src/api/@generated/pipeline-progress/pipeline-progress.model'; -import { PipelineStage } from 'src/api/@generated/pipeline-stage/pipeline-stage.model'; -import { Pipeline } from 'src/api/@generated/pipeline/pipeline.model'; -import { PrismaService } from 'src/database/prisma.service'; +import { PipelineProgress } from 'src/core/@generated/pipeline-progress/pipeline-progress.model'; +import { PipelineStage } from 'src/core/@generated/pipeline-stage/pipeline-stage.model'; +import { Pipeline } from 'src/core/@generated/pipeline/pipeline.model'; +import { PipelineStageService } from '../services/pipeline-stage.service'; +import { PipelineService } from '../services/pipeline.service'; @TypeGraphQL.Resolver(() => PipelineProgress) export class PipelineProgressRelationsResolver { - constructor(private readonly prismaService: PrismaService) {} + constructor( + private readonly pipelineStageService: PipelineStageService, + private readonly pipelineService: PipelineService, + ) {} @TypeGraphQL.ResolveField(() => PipelineStage, { nullable: false, @@ -14,7 +18,7 @@ export class PipelineProgressRelationsResolver { async pipelineStage( @TypeGraphQL.Root() pipelineStage: PipelineProgress, ): Promise { - return this.prismaService.pipelineStage.findUniqueOrThrow({ + return this.pipelineStageService.findUniqueOrThrow({ where: { id: pipelineStage.pipelineStageId, }, @@ -27,7 +31,7 @@ export class PipelineProgressRelationsResolver { async pipeline( @TypeGraphQL.Root() pipelineStage: PipelineProgress, ): Promise { - return this.prismaService.pipeline.findUniqueOrThrow({ + return this.pipelineService.findUniqueOrThrow({ where: { id: pipelineStage.pipelineId, }, diff --git a/server/src/core/pipeline/resolvers/pipeline-progress.resolver.spec.ts b/server/src/core/pipeline/resolvers/pipeline-progress.resolver.spec.ts new file mode 100644 index 0000000000..d9d38e2014 --- /dev/null +++ b/server/src/core/pipeline/resolvers/pipeline-progress.resolver.spec.ts @@ -0,0 +1,25 @@ +import { Test, TestingModule } from '@nestjs/testing'; +import { PipelineProgressResolver } from './pipeline-progress.resolver'; +import { PipelineProgressService } from '../services/pipeline-progress.service'; + +describe('PipelineProgressResolver', () => { + let resolver: PipelineProgressResolver; + + beforeEach(async () => { + const module: TestingModule = await Test.createTestingModule({ + providers: [ + PipelineProgressResolver, + { + provide: PipelineProgressService, + useValue: {}, + }, + ], + }).compile(); + + resolver = module.get(PipelineProgressResolver); + }); + + it('should be defined', () => { + expect(resolver).toBeDefined(); + }); +}); diff --git a/server/src/core/pipeline/resolvers/pipeline-progress.resolver.ts b/server/src/core/pipeline/resolvers/pipeline-progress.resolver.ts new file mode 100644 index 0000000000..0388f4dd36 --- /dev/null +++ b/server/src/core/pipeline/resolvers/pipeline-progress.resolver.ts @@ -0,0 +1,71 @@ +import { Resolver, Args, Query, Mutation } from '@nestjs/graphql'; +import { UseGuards } from '@nestjs/common'; +import { JwtAuthGuard } from 'src/guards/jwt.auth.guard'; +import { Workspace } from '../../../core/@generated/workspace/workspace.model'; +import { AuthWorkspace } from '../../../decorators/auth-workspace.decorator'; +import { FindManyPipelineProgressArgs } from '../../@generated/pipeline-progress/find-many-pipeline-progress.args'; +import { PipelineProgress } from '../../@generated/pipeline-progress/pipeline-progress.model'; +import { UpdateOnePipelineProgressArgs } from '../../@generated/pipeline-progress/update-one-pipeline-progress.args'; +import { Prisma } from '@prisma/client'; +import { AffectedRows } from '../../@generated/prisma/affected-rows.output'; +import { DeleteManyPipelineProgressArgs } from '../../@generated/pipeline-progress/delete-many-pipeline-progress.args'; +import { CreateOnePipelineProgressArgs } from '../../@generated/pipeline-progress/create-one-pipeline-progress.args'; +import { PipelineProgressService } from '../services/pipeline-progress.service'; +import { prepareFindManyArgs } from 'src/utils/prepare-find-many'; + +@UseGuards(JwtAuthGuard) +@Resolver(() => PipelineProgress) +export class PipelineProgressResolver { + constructor( + private readonly pipelineProgressService: PipelineProgressService, + ) {} + + @Query(() => [PipelineProgress]) + async findManyPipelineProgress( + @Args() args: FindManyPipelineProgressArgs, + @AuthWorkspace() workspace: Workspace, + ) { + const preparedArgs = prepareFindManyArgs( + args, + workspace, + ); + return this.pipelineProgressService.findMany(preparedArgs); + } + + @Mutation(() => PipelineProgress, { + nullable: true, + }) + async updateOnePipelineProgress( + @Args() args: UpdateOnePipelineProgressArgs, + ): Promise { + return this.pipelineProgressService.update({ + ...args, + } satisfies UpdateOnePipelineProgressArgs as Prisma.PipelineProgressUpdateArgs); + } + + @Mutation(() => AffectedRows, { + nullable: false, + }) + async deleteManyPipelineProgress( + @Args() args: DeleteManyPipelineProgressArgs, + ): Promise { + return this.pipelineProgressService.deleteMany({ + ...args, + }); + } + + @Mutation(() => PipelineProgress, { + nullable: false, + }) + async createOnePipelineProgress( + @Args() args: CreateOnePipelineProgressArgs, + @AuthWorkspace() workspace: Workspace, + ): Promise { + return this.pipelineProgressService.create({ + data: { + ...args.data, + ...{ workspace: { connect: { id: workspace.id } } }, + }, + } satisfies CreateOnePipelineProgressArgs as Prisma.PipelineProgressCreateArgs); + } +} diff --git a/server/src/core/pipeline/resolvers/pipeline-relations.resolver.spec.ts b/server/src/core/pipeline/resolvers/pipeline-relations.resolver.spec.ts new file mode 100644 index 0000000000..560d36d427 --- /dev/null +++ b/server/src/core/pipeline/resolvers/pipeline-relations.resolver.spec.ts @@ -0,0 +1,25 @@ +import { Test, TestingModule } from '@nestjs/testing'; +import { PipelineRelationsResolver } from './pipeline-relations.resolver'; +import { PipelineStageService } from '../services/pipeline-stage.service'; + +describe('PipelineRelationsResolver', () => { + let resolver: PipelineRelationsResolver; + + beforeEach(async () => { + const module: TestingModule = await Test.createTestingModule({ + providers: [ + PipelineRelationsResolver, + { + provide: PipelineStageService, + useValue: {}, + }, + ], + }).compile(); + + resolver = module.get(PipelineRelationsResolver); + }); + + it('should be defined', () => { + expect(resolver).toBeDefined(); + }); +}); diff --git a/server/src/api/resolvers/relations/pipeline-relations.resolver.ts b/server/src/core/pipeline/resolvers/pipeline-relations.resolver.ts similarity index 53% rename from server/src/api/resolvers/relations/pipeline-relations.resolver.ts rename to server/src/core/pipeline/resolvers/pipeline-relations.resolver.ts index 921b14af20..702d930730 100644 --- a/server/src/api/resolvers/relations/pipeline-relations.resolver.ts +++ b/server/src/core/pipeline/resolvers/pipeline-relations.resolver.ts @@ -1,11 +1,11 @@ import * as TypeGraphQL from '@nestjs/graphql'; -import { PipelineStage } from 'src/api/@generated/pipeline-stage/pipeline-stage.model'; -import { Pipeline } from 'src/api/@generated/pipeline/pipeline.model'; -import { PrismaService } from 'src/database/prisma.service'; +import { PipelineStage } from 'src/core/@generated/pipeline-stage/pipeline-stage.model'; +import { Pipeline } from 'src/core/@generated/pipeline/pipeline.model'; +import { PipelineStageService } from '../services/pipeline-stage.service'; @TypeGraphQL.Resolver(() => Pipeline) export class PipelineRelationsResolver { - constructor(private readonly prismaService: PrismaService) {} + constructor(private readonly pipelineStageService: PipelineStageService) {} @TypeGraphQL.ResolveField(() => [PipelineStage], { nullable: false, @@ -13,7 +13,7 @@ export class PipelineRelationsResolver { async pipelineStages( @TypeGraphQL.Root() pipeline: Pipeline, ): Promise { - return this.prismaService.pipelineStage.findMany({ + return this.pipelineStageService.findMany({ where: { pipelineId: { equals: pipeline.id, diff --git a/server/src/core/pipeline/resolvers/pipeline-stage-relations.resolver.spec.ts b/server/src/core/pipeline/resolvers/pipeline-stage-relations.resolver.spec.ts new file mode 100644 index 0000000000..f0da1bef3d --- /dev/null +++ b/server/src/core/pipeline/resolvers/pipeline-stage-relations.resolver.spec.ts @@ -0,0 +1,27 @@ +import { Test, TestingModule } from '@nestjs/testing'; +import { PipelineStageRelationsResolver } from './pipeline-stage-relations.resolver'; +import { PipelineProgressService } from '../services/pipeline-progress.service'; + +describe('PipelineStageRelationsResolver', () => { + let resolver: PipelineStageRelationsResolver; + + beforeEach(async () => { + const module: TestingModule = await Test.createTestingModule({ + providers: [ + PipelineStageRelationsResolver, + { + provide: PipelineProgressService, + useValue: {}, + }, + ], + }).compile(); + + resolver = module.get( + PipelineStageRelationsResolver, + ); + }); + + it('should be defined', () => { + expect(resolver).toBeDefined(); + }); +}); diff --git a/server/src/api/resolvers/relations/pipeline-stage-relations.resolver.ts b/server/src/core/pipeline/resolvers/pipeline-stage-relations.resolver.ts similarity index 52% rename from server/src/api/resolvers/relations/pipeline-stage-relations.resolver.ts rename to server/src/core/pipeline/resolvers/pipeline-stage-relations.resolver.ts index ed9c51ac0d..300b557395 100644 --- a/server/src/api/resolvers/relations/pipeline-stage-relations.resolver.ts +++ b/server/src/core/pipeline/resolvers/pipeline-stage-relations.resolver.ts @@ -1,11 +1,13 @@ import * as TypeGraphQL from '@nestjs/graphql'; -import { PipelineProgress } from 'src/api/@generated/pipeline-progress/pipeline-progress.model'; -import { PipelineStage } from 'src/api/@generated/pipeline-stage/pipeline-stage.model'; -import { PrismaService } from 'src/database/prisma.service'; +import { PipelineProgress } from 'src/core/@generated/pipeline-progress/pipeline-progress.model'; +import { PipelineStage } from 'src/core/@generated/pipeline-stage/pipeline-stage.model'; +import { PipelineProgressService } from '../services/pipeline-progress.service'; @TypeGraphQL.Resolver(() => PipelineStage) export class PipelineStageRelationsResolver { - constructor(private readonly prismaService: PrismaService) {} + constructor( + private readonly pipelineProgressService: PipelineProgressService, + ) {} @TypeGraphQL.ResolveField(() => [PipelineProgress], { nullable: false, @@ -13,7 +15,7 @@ export class PipelineStageRelationsResolver { async pipelineProgresses( @TypeGraphQL.Root() pipelineStage: PipelineStage, ): Promise { - return this.prismaService.pipelineProgress.findMany({ + return this.pipelineProgressService.findMany({ where: { pipelineStageId: { equals: pipelineStage.id, diff --git a/server/src/core/pipeline/resolvers/pipeline-stage.resolver.spec.ts b/server/src/core/pipeline/resolvers/pipeline-stage.resolver.spec.ts new file mode 100644 index 0000000000..038ffc2c38 --- /dev/null +++ b/server/src/core/pipeline/resolvers/pipeline-stage.resolver.spec.ts @@ -0,0 +1,25 @@ +import { Test, TestingModule } from '@nestjs/testing'; +import { PipelineStageResolver } from './pipeline-stage.resolver'; +import { PipelineStageService } from '../services/pipeline-stage.service'; + +describe('PipelineStageResolver', () => { + let resolver: PipelineStageResolver; + + beforeEach(async () => { + const module: TestingModule = await Test.createTestingModule({ + providers: [ + PipelineStageResolver, + { + provide: PipelineStageService, + useValue: {}, + }, + ], + }).compile(); + + resolver = module.get(PipelineStageResolver); + }); + + it('should be defined', () => { + expect(resolver).toBeDefined(); + }); +}); diff --git a/server/src/core/pipeline/resolvers/pipeline-stage.resolver.ts b/server/src/core/pipeline/resolvers/pipeline-stage.resolver.ts new file mode 100644 index 0000000000..0312e956e4 --- /dev/null +++ b/server/src/core/pipeline/resolvers/pipeline-stage.resolver.ts @@ -0,0 +1,28 @@ +import { Resolver, Args, Query } from '@nestjs/graphql'; +import { UseGuards } from '@nestjs/common'; +import { JwtAuthGuard } from 'src/guards/jwt.auth.guard'; +import { Workspace } from '../../../core/@generated/workspace/workspace.model'; +import { AuthWorkspace } from '../../../decorators/auth-workspace.decorator'; +import { PipelineStage } from '../../../core/@generated/pipeline-stage/pipeline-stage.model'; +import { FindManyPipelineStageArgs } from '../../../core/@generated/pipeline-stage/find-many-pipeline-stage.args'; +import { PipelineStageService } from '../services/pipeline-stage.service'; +import { prepareFindManyArgs } from 'src/utils/prepare-find-many'; + +@UseGuards(JwtAuthGuard) +@Resolver(() => PipelineStage) +export class PipelineStageResolver { + constructor(private readonly pipelineStageService: PipelineStageService) {} + + @Query(() => [PipelineStage]) + async findManyPipelineStage( + @Args() args: FindManyPipelineStageArgs, + @AuthWorkspace() workspace: Workspace, + ) { + const preparedArgs = prepareFindManyArgs( + args, + workspace, + ); + + return this.pipelineStageService.findMany(preparedArgs); + } +} diff --git a/server/src/core/pipeline/resolvers/pipeline.resolver.spec.ts b/server/src/core/pipeline/resolvers/pipeline.resolver.spec.ts new file mode 100644 index 0000000000..c23e9c62a6 --- /dev/null +++ b/server/src/core/pipeline/resolvers/pipeline.resolver.spec.ts @@ -0,0 +1,25 @@ +import { Test, TestingModule } from '@nestjs/testing'; +import { PipelineResolver } from './pipeline.resolver'; +import { PipelineService } from '../services/pipeline.service'; + +describe('PipelineResolver', () => { + let resolver: PipelineResolver; + + beforeEach(async () => { + const module: TestingModule = await Test.createTestingModule({ + providers: [ + PipelineResolver, + { + provide: PipelineService, + useValue: {}, + }, + ], + }).compile(); + + resolver = module.get(PipelineResolver); + }); + + it('should be defined', () => { + expect(resolver).toBeDefined(); + }); +}); diff --git a/server/src/core/pipeline/resolvers/pipeline.resolver.ts b/server/src/core/pipeline/resolvers/pipeline.resolver.ts new file mode 100644 index 0000000000..977bad29b9 --- /dev/null +++ b/server/src/core/pipeline/resolvers/pipeline.resolver.ts @@ -0,0 +1,27 @@ +import { Resolver, Args, Query } from '@nestjs/graphql'; +import { UseGuards } from '@nestjs/common'; +import { JwtAuthGuard } from 'src/guards/jwt.auth.guard'; +import { Workspace } from '../../@generated/workspace/workspace.model'; +import { AuthWorkspace } from '../../../decorators/auth-workspace.decorator'; +import { Pipeline } from '../../@generated/pipeline/pipeline.model'; +import { FindManyPipelineArgs } from '../../@generated/pipeline/find-many-pipeline.args'; +import { PipelineService } from '../services/pipeline.service'; +import { prepareFindManyArgs } from 'src/utils/prepare-find-many'; + +@UseGuards(JwtAuthGuard) +@Resolver(() => Pipeline) +export class PipelineResolver { + constructor(private readonly pipelineService: PipelineService) {} + + @Query(() => [Pipeline]) + async findManyPipeline( + @Args() args: FindManyPipelineArgs, + @AuthWorkspace() workspace: Workspace, + ) { + const preparedArgs = prepareFindManyArgs( + args, + workspace, + ); + return this.pipelineService.findMany(preparedArgs); + } +} diff --git a/server/src/core/pipeline/services/pipeline-progress.service.spec.ts b/server/src/core/pipeline/services/pipeline-progress.service.spec.ts new file mode 100644 index 0000000000..ddc45c73a5 --- /dev/null +++ b/server/src/core/pipeline/services/pipeline-progress.service.spec.ts @@ -0,0 +1,26 @@ +import { Test, TestingModule } from '@nestjs/testing'; +import { PipelineProgressService } from './pipeline-progress.service'; +import { PrismaService } from 'src/database/prisma.service'; +import { prismaMock } from 'src/prisma-mock/jest-prisma-singleton'; + +describe('PipelineProgressService', () => { + let service: PipelineProgressService; + + beforeEach(async () => { + const module: TestingModule = await Test.createTestingModule({ + providers: [ + PipelineProgressService, + { + provide: PrismaService, + useValue: prismaMock, + }, + ], + }).compile(); + + service = module.get(PipelineProgressService); + }); + + it('should be defined', () => { + expect(service).toBeDefined(); + }); +}); diff --git a/server/src/core/pipeline/services/pipeline-progress.service.ts b/server/src/core/pipeline/services/pipeline-progress.service.ts new file mode 100644 index 0000000000..21e914ceb6 --- /dev/null +++ b/server/src/core/pipeline/services/pipeline-progress.service.ts @@ -0,0 +1,38 @@ +import { Injectable } from '@nestjs/common'; +import { PrismaService } from 'src/database/prisma.service'; + +@Injectable() +export class PipelineProgressService { + constructor(private readonly prismaService: PrismaService) {} + + // Find + findFirst = this.prismaService.pipelineProgress.findFirst; + findFirstOrThrow = this.prismaService.pipelineProgress.findFirstOrThrow; + + findUnique = this.prismaService.pipelineProgress.findUnique; + findUniqueOrThrow = this.prismaService.pipelineProgress.findUniqueOrThrow; + + findMany = this.prismaService.pipelineProgress.findMany; + + // Create + create = this.prismaService.pipelineProgress.create; + createMany = this.prismaService.pipelineProgress.createMany; + + // Update + update = this.prismaService.pipelineProgress.update; + upsert = this.prismaService.pipelineProgress.upsert; + updateMany = this.prismaService.pipelineProgress.updateMany; + + // Delete + delete = this.prismaService.pipelineProgress.delete; + deleteMany = this.prismaService.pipelineProgress.deleteMany; + + // Aggregate + aggregate = this.prismaService.pipelineProgress.aggregate; + + // Count + count = this.prismaService.pipelineProgress.count; + + // GroupBy + groupBy = this.prismaService.pipelineProgress.groupBy; +} diff --git a/server/src/core/pipeline/services/pipeline-stage.service.spec.ts b/server/src/core/pipeline/services/pipeline-stage.service.spec.ts new file mode 100644 index 0000000000..275430abef --- /dev/null +++ b/server/src/core/pipeline/services/pipeline-stage.service.spec.ts @@ -0,0 +1,26 @@ +import { Test, TestingModule } from '@nestjs/testing'; +import { PipelineStageService } from './pipeline-stage.service'; +import { PrismaService } from 'src/database/prisma.service'; +import { prismaMock } from 'src/prisma-mock/jest-prisma-singleton'; + +describe('PipelineStageService', () => { + let service: PipelineStageService; + + beforeEach(async () => { + const module: TestingModule = await Test.createTestingModule({ + providers: [ + PipelineStageService, + { + provide: PrismaService, + useValue: prismaMock, + }, + ], + }).compile(); + + service = module.get(PipelineStageService); + }); + + it('should be defined', () => { + expect(service).toBeDefined(); + }); +}); diff --git a/server/src/core/pipeline/services/pipeline-stage.service.ts b/server/src/core/pipeline/services/pipeline-stage.service.ts new file mode 100644 index 0000000000..8aaf352ce8 --- /dev/null +++ b/server/src/core/pipeline/services/pipeline-stage.service.ts @@ -0,0 +1,38 @@ +import { Injectable } from '@nestjs/common'; +import { PrismaService } from 'src/database/prisma.service'; + +@Injectable() +export class PipelineStageService { + constructor(private readonly prismaService: PrismaService) {} + + // Find + findFirst = this.prismaService.pipelineStage.findFirst; + findFirstOrThrow = this.prismaService.pipelineStage.findFirstOrThrow; + + findUnique = this.prismaService.pipelineStage.findUnique; + findUniqueOrThrow = this.prismaService.pipelineStage.findUniqueOrThrow; + + findMany = this.prismaService.pipelineStage.findMany; + + // Create + create = this.prismaService.pipelineStage.create; + createMany = this.prismaService.pipelineStage.createMany; + + // Update + update = this.prismaService.pipelineStage.update; + upsert = this.prismaService.pipelineStage.upsert; + updateMany = this.prismaService.pipelineStage.updateMany; + + // Delete + delete = this.prismaService.pipelineStage.delete; + deleteMany = this.prismaService.pipelineStage.deleteMany; + + // Aggregate + aggregate = this.prismaService.pipelineStage.aggregate; + + // Count + count = this.prismaService.pipelineStage.count; + + // GroupBy + groupBy = this.prismaService.pipelineStage.groupBy; +} diff --git a/server/src/core/pipeline/services/pipeline.service.spec.ts b/server/src/core/pipeline/services/pipeline.service.spec.ts new file mode 100644 index 0000000000..3dcff4e031 --- /dev/null +++ b/server/src/core/pipeline/services/pipeline.service.spec.ts @@ -0,0 +1,26 @@ +import { Test, TestingModule } from '@nestjs/testing'; +import { PipelineService } from './pipeline.service'; +import { PrismaService } from 'src/database/prisma.service'; +import { prismaMock } from 'src/prisma-mock/jest-prisma-singleton'; + +describe('PipelineService', () => { + let service: PipelineService; + + beforeEach(async () => { + const module: TestingModule = await Test.createTestingModule({ + providers: [ + PipelineService, + { + provide: PrismaService, + useValue: prismaMock, + }, + ], + }).compile(); + + service = module.get(PipelineService); + }); + + it('should be defined', () => { + expect(service).toBeDefined(); + }); +}); diff --git a/server/src/core/pipeline/services/pipeline.service.ts b/server/src/core/pipeline/services/pipeline.service.ts new file mode 100644 index 0000000000..201be8f0b1 --- /dev/null +++ b/server/src/core/pipeline/services/pipeline.service.ts @@ -0,0 +1,38 @@ +import { Injectable } from '@nestjs/common'; +import { PrismaService } from 'src/database/prisma.service'; + +@Injectable() +export class PipelineService { + constructor(private readonly prismaService: PrismaService) {} + + // Find + findFirst = this.prismaService.pipeline.findFirst; + findFirstOrThrow = this.prismaService.pipeline.findFirstOrThrow; + + findUnique = this.prismaService.pipeline.findUnique; + findUniqueOrThrow = this.prismaService.pipeline.findUniqueOrThrow; + + findMany = this.prismaService.pipeline.findMany; + + // Create + create = this.prismaService.pipeline.create; + createMany = this.prismaService.pipeline.createMany; + + // Update + update = this.prismaService.pipeline.update; + upsert = this.prismaService.pipeline.upsert; + updateMany = this.prismaService.pipeline.updateMany; + + // Delete + delete = this.prismaService.pipeline.delete; + deleteMany = this.prismaService.pipeline.deleteMany; + + // Aggregate + aggregate = this.prismaService.pipeline.aggregate; + + // Count + count = this.prismaService.pipeline.count; + + // GroupBy + groupBy = this.prismaService.pipeline.groupBy; +} diff --git a/server/src/core/user/user-relations.resolver.spec.ts b/server/src/core/user/user-relations.resolver.spec.ts new file mode 100644 index 0000000000..adb9efa704 --- /dev/null +++ b/server/src/core/user/user-relations.resolver.spec.ts @@ -0,0 +1,25 @@ +import { Test, TestingModule } from '@nestjs/testing'; +import { UserRelationsResolver } from './user-relations.resolver'; +import { UserService } from './user.service'; + +describe('UserRelationsResolver', () => { + let resolver: UserRelationsResolver; + + beforeEach(async () => { + const module: TestingModule = await Test.createTestingModule({ + providers: [ + UserRelationsResolver, + { + provide: UserService, + useValue: {}, + }, + ], + }).compile(); + + resolver = module.get(UserRelationsResolver); + }); + + it('should be defined', () => { + expect(resolver).toBeDefined(); + }); +}); diff --git a/server/src/api/resolvers/relations/user-relations.resolver.ts b/server/src/core/user/user-relations.resolver.ts similarity index 62% rename from server/src/api/resolvers/relations/user-relations.resolver.ts rename to server/src/core/user/user-relations.resolver.ts index 467aef30eb..f61ce40e76 100644 --- a/server/src/api/resolvers/relations/user-relations.resolver.ts +++ b/server/src/core/user/user-relations.resolver.ts @@ -1,14 +1,14 @@ import * as TypeGraphQL from '@nestjs/graphql'; import type { GraphQLResolveInfo } from 'graphql'; -import { PrismaService } from 'src/database/prisma.service'; -import { WorkspaceMember } from 'src/api/@generated/workspace-member/workspace-member.model'; -import { User } from 'src/api/@generated/user/user.model'; -import { Company } from 'src/api/@generated/company/company.model'; -import { FindManyCompanyArgs } from 'src/api/@generated/company/find-many-company.args'; +import { WorkspaceMember } from 'src/core/@generated/workspace-member/workspace-member.model'; +import { User } from 'src/core/@generated/user/user.model'; +import { Company } from 'src/core/@generated/company/company.model'; +import { FindManyCompanyArgs } from 'src/core/@generated/company/find-many-company.args'; +import { UserService } from './user.service'; @TypeGraphQL.Resolver(() => User) export class UserRelationsResolver { - constructor(private readonly prismaService: PrismaService) {} + constructor(private readonly userService: UserService) {} @TypeGraphQL.ResolveField(() => WorkspaceMember, { nullable: true, @@ -16,7 +16,7 @@ export class UserRelationsResolver { async workspaceMember( @TypeGraphQL.Parent() user: User, ): Promise { - return await this.prismaService.user + return await this.userService .findFirst({ where: { id: user.id, @@ -33,7 +33,7 @@ export class UserRelationsResolver { @TypeGraphQL.Info() info: GraphQLResolveInfo, @TypeGraphQL.Args() args: FindManyCompanyArgs, ): Promise { - return this.prismaService.user + return this.userService .findUniqueOrThrow({ where: { id: user.id, diff --git a/server/src/core/user/user.module.ts b/server/src/core/user/user.module.ts new file mode 100644 index 0000000000..eba81f61d1 --- /dev/null +++ b/server/src/core/user/user.module.ts @@ -0,0 +1,12 @@ +import { Module } from '@nestjs/common'; +import { UserService } from './user.service'; +import { UserResolver } from './user.resolver'; +import { UserRelationsResolver } from './user-relations.resolver'; +import { WorkspaceModule } from '../workspace/workspace.module'; + +@Module({ + imports: [WorkspaceModule], + providers: [UserService, UserResolver, UserRelationsResolver], + exports: [UserService], +}) +export class UserModule {} diff --git a/server/src/core/user/user.resolver.spec.ts b/server/src/core/user/user.resolver.spec.ts new file mode 100644 index 0000000000..cb796fea76 --- /dev/null +++ b/server/src/core/user/user.resolver.spec.ts @@ -0,0 +1,25 @@ +import { Test, TestingModule } from '@nestjs/testing'; +import { UserResolver } from './user.resolver'; +import { UserService } from './user.service'; + +describe('UserResolver', () => { + let resolver: UserResolver; + + beforeEach(async () => { + const module: TestingModule = await Test.createTestingModule({ + providers: [ + UserResolver, + { + provide: UserService, + useValue: {}, + }, + ], + }).compile(); + + resolver = module.get(UserResolver); + }); + + it('should be defined', () => { + expect(resolver).toBeDefined(); + }); +}); diff --git a/server/src/core/user/user.resolver.ts b/server/src/core/user/user.resolver.ts new file mode 100644 index 0000000000..039f6d33c4 --- /dev/null +++ b/server/src/core/user/user.resolver.ts @@ -0,0 +1,34 @@ +import { Args, Resolver, Query } from '@nestjs/graphql'; +import { UserService } from './user.service'; +import { FindManyUserArgs } from 'src/core/@generated/user/find-many-user.args'; +import { Workspace } from '@prisma/client'; +import { AuthWorkspace } from 'src/decorators/auth-workspace.decorator'; +import { User } from 'src/core/@generated/user/user.model'; +import { ExceptionFilter } from 'src/filters/exception.filter'; +import { UseFilters, UseGuards } from '@nestjs/common'; +import { JwtAuthGuard } from 'src/guards/jwt.auth.guard'; + +@UseGuards(JwtAuthGuard) +@Resolver(() => User) +export class UserResolver { + constructor(private readonly userService: UserService) {} + + @UseFilters(ExceptionFilter) + @Query(() => [User], { + nullable: false, + }) + async findManyUser( + @Args() args: FindManyUserArgs, + @AuthWorkspace() workspace: Workspace, + ): Promise { + return await this.userService.findMany({ + ...args, + where: { + ...args.where, + workspaceMember: { + is: { workspace: { is: { id: { equals: workspace.id } } } }, + }, + }, + }); + } +} diff --git a/server/src/core/user/user.service.spec.ts b/server/src/core/user/user.service.spec.ts new file mode 100644 index 0000000000..b1585d40f5 --- /dev/null +++ b/server/src/core/user/user.service.spec.ts @@ -0,0 +1,36 @@ +import { Test, TestingModule } from '@nestjs/testing'; +import { UserService } from './user.service'; +import { PrismaService } from 'src/database/prisma.service'; +import { prismaMock } from 'src/prisma-mock/jest-prisma-singleton'; +import { WorkspaceService } from '../workspace/services/workspace.service'; +import { WorkspaceMemberService } from '../workspace/services/workspace-member.service'; + +describe('UserService', () => { + let service: UserService; + + beforeEach(async () => { + const module: TestingModule = await Test.createTestingModule({ + providers: [ + UserService, + { + provide: PrismaService, + useValue: prismaMock, + }, + { + provide: WorkspaceService, + useValue: {}, + }, + { + provide: WorkspaceMemberService, + useValue: {}, + }, + ], + }).compile(); + + service = module.get(UserService); + }); + + it('should be defined', () => { + expect(service).toBeDefined(); + }); +}); diff --git a/server/src/core/user/user.service.ts b/server/src/core/user/user.service.ts new file mode 100644 index 0000000000..41c059970b --- /dev/null +++ b/server/src/core/user/user.service.ts @@ -0,0 +1,109 @@ +import { + BadRequestException, + ForbiddenException, + Injectable, +} from '@nestjs/common'; +import { v4 } from 'uuid'; +import { PrismaService } from 'src/database/prisma.service'; +import { WorkspaceService } from 'src/core/workspace/services/workspace.service'; +import { WorkspaceMemberService } from 'src/core/workspace/services/workspace-member.service'; + +export type UserPayload = { + firstName: string; + lastName: string; + email: string; +}; + +@Injectable() +export class UserService { + constructor( + private readonly prismaService: PrismaService, + private readonly workspaceService: WorkspaceService, + private readonly workspaceMemberService: WorkspaceMemberService, + ) {} + + // Find + findFirst = this.prismaService.user.findFirst; + findFirstOrThrow = this.prismaService.user.findFirstOrThrow; + + findUnique = this.prismaService.user.findUnique; + findUniqueOrThrow = this.prismaService.user.findUniqueOrThrow; + + findMany = this.prismaService.user.findMany; + + // Create + create = this.prismaService.user.create; + createMany = this.prismaService.user.createMany; + + // Update + update = this.prismaService.user.update; + upsert = this.prismaService.user.upsert; + updateMany = this.prismaService.user.updateMany; + + // Delete + delete = this.prismaService.user.delete; + deleteMany = this.prismaService.user.deleteMany; + + // Aggregate + aggregate = this.prismaService.user.aggregate; + + // Count + count = this.prismaService.user.count; + + // GroupBy + groupBy = this.prismaService.user.groupBy; + + // Customs + async createUser(rawUser: UserPayload) { + if (!rawUser.email) { + throw new BadRequestException('Email is missing'); + } + + if (!rawUser.firstName || !rawUser.lastName) { + throw new BadRequestException('Firstname or lastname is missing'); + } + + const emailDomain = rawUser.email.split('@')[1]; + + if (!emailDomain) { + throw new BadRequestException('Email is malformed'); + } + + const workspace = await this.workspaceService.findUnique({ + where: { domainName: emailDomain }, + }); + + if (!workspace) { + throw new ForbiddenException( + 'User email domain does not match an existing workspace', + ); + } + + const user = await this.prismaService.user.upsert({ + where: { + email: rawUser.email, + }, + create: { + id: v4(), + displayName: rawUser.firstName + ' ' + rawUser.lastName, + email: rawUser.email, + locale: 'en', + }, + update: {}, + }); + + await this.workspaceMemberService.upsert({ + where: { + userId: user.id, + }, + create: { + id: v4(), + userId: user.id, + workspaceId: workspace.id, + }, + update: {}, + }); + + return user; + } +} diff --git a/server/src/core/workspace/resolvers/workspace-member-relations.resolver.spec.ts b/server/src/core/workspace/resolvers/workspace-member-relations.resolver.spec.ts new file mode 100644 index 0000000000..f76cc110b0 --- /dev/null +++ b/server/src/core/workspace/resolvers/workspace-member-relations.resolver.spec.ts @@ -0,0 +1,27 @@ +import { Test, TestingModule } from '@nestjs/testing'; +import { WorkspaceMemberRelationsResolver } from './workspace-member-relations.resolver'; +import { WorkspaceMemberService } from '../services/workspace-member.service'; + +describe('WorkspaceMemberRelationsResolver', () => { + let resolver: WorkspaceMemberRelationsResolver; + + beforeEach(async () => { + const module: TestingModule = await Test.createTestingModule({ + providers: [ + WorkspaceMemberRelationsResolver, + { + provide: WorkspaceMemberService, + useValue: {}, + }, + ], + }).compile(); + + resolver = module.get( + WorkspaceMemberRelationsResolver, + ); + }); + + it('should be defined', () => { + expect(resolver).toBeDefined(); + }); +}); diff --git a/server/src/api/resolvers/relations/workspace-member-relations.resolver.ts b/server/src/core/workspace/resolvers/workspace-member-relations.resolver.ts similarity index 60% rename from server/src/api/resolvers/relations/workspace-member-relations.resolver.ts rename to server/src/core/workspace/resolvers/workspace-member-relations.resolver.ts index a74c9e7bad..ccfc70326e 100644 --- a/server/src/api/resolvers/relations/workspace-member-relations.resolver.ts +++ b/server/src/core/workspace/resolvers/workspace-member-relations.resolver.ts @@ -1,12 +1,14 @@ import * as TypeGraphQL from '@nestjs/graphql'; -import { User } from 'src/api/@generated/user/user.model'; -import { WorkspaceMember } from 'src/api/@generated/workspace-member/workspace-member.model'; -import { Workspace } from 'src/api/@generated/workspace/workspace.model'; -import { PrismaService } from 'src/database/prisma.service'; +import { User } from 'src/core/@generated/user/user.model'; +import { WorkspaceMember } from 'src/core/@generated/workspace-member/workspace-member.model'; +import { Workspace } from 'src/core/@generated/workspace/workspace.model'; +import { WorkspaceMemberService } from '../services/workspace-member.service'; @TypeGraphQL.Resolver(() => WorkspaceMember) export class WorkspaceMemberRelationsResolver { - constructor(private readonly prismaService: PrismaService) {} + constructor( + private readonly workspaceMemberSercice: WorkspaceMemberService, + ) {} @TypeGraphQL.ResolveField(() => User, { nullable: false, @@ -14,7 +16,7 @@ export class WorkspaceMemberRelationsResolver { async user( @TypeGraphQL.Parent() workspaceMember: WorkspaceMember, ): Promise { - return await this.prismaService.workspaceMember + return await this.workspaceMemberSercice .findUniqueOrThrow({ where: { id: workspaceMember.id, @@ -29,7 +31,7 @@ export class WorkspaceMemberRelationsResolver { async workspace( @TypeGraphQL.Parent() workspaceMember: WorkspaceMember, ): Promise { - return this.prismaService.workspaceMember + return this.workspaceMemberSercice .findUniqueOrThrow({ where: { id: workspaceMember.id, diff --git a/server/src/core/workspace/resolvers/workspace-member.resolver.spec.ts b/server/src/core/workspace/resolvers/workspace-member.resolver.spec.ts new file mode 100644 index 0000000000..713f31e639 --- /dev/null +++ b/server/src/core/workspace/resolvers/workspace-member.resolver.spec.ts @@ -0,0 +1,18 @@ +import { Test, TestingModule } from '@nestjs/testing'; +import { WorkspaceMemberResolver } from './workspace-member.resolver'; + +describe('WorkspaceMemberResolver', () => { + let resolver: WorkspaceMemberResolver; + + beforeEach(async () => { + const module: TestingModule = await Test.createTestingModule({ + providers: [WorkspaceMemberResolver], + }).compile(); + + resolver = module.get(WorkspaceMemberResolver); + }); + + it('should be defined', () => { + expect(resolver).toBeDefined(); + }); +}); diff --git a/server/src/core/workspace/resolvers/workspace-member.resolver.ts b/server/src/core/workspace/resolvers/workspace-member.resolver.ts new file mode 100644 index 0000000000..3be44d948f --- /dev/null +++ b/server/src/core/workspace/resolvers/workspace-member.resolver.ts @@ -0,0 +1,5 @@ +import * as TypeGraphQL from '@nestjs/graphql'; +import { WorkspaceMember } from '../../@generated/workspace-member/workspace-member.model'; + +@TypeGraphQL.Resolver(() => WorkspaceMember) +export class WorkspaceMemberResolver {} diff --git a/server/src/core/workspace/services/workspace-member.service.spec.ts b/server/src/core/workspace/services/workspace-member.service.spec.ts new file mode 100644 index 0000000000..8a65ad4544 --- /dev/null +++ b/server/src/core/workspace/services/workspace-member.service.spec.ts @@ -0,0 +1,26 @@ +import { Test, TestingModule } from '@nestjs/testing'; +import { WorkspaceMemberService } from './workspace-member.service'; +import { PrismaService } from 'src/database/prisma.service'; +import { prismaMock } from 'src/prisma-mock/jest-prisma-singleton'; + +describe('WorkspaceMemberService', () => { + let service: WorkspaceMemberService; + + beforeEach(async () => { + const module: TestingModule = await Test.createTestingModule({ + providers: [ + WorkspaceMemberService, + { + provide: PrismaService, + useValue: prismaMock, + }, + ], + }).compile(); + + service = module.get(WorkspaceMemberService); + }); + + it('should be defined', () => { + expect(service).toBeDefined(); + }); +}); diff --git a/server/src/core/workspace/services/workspace-member.service.ts b/server/src/core/workspace/services/workspace-member.service.ts new file mode 100644 index 0000000000..0ec266b6c7 --- /dev/null +++ b/server/src/core/workspace/services/workspace-member.service.ts @@ -0,0 +1,38 @@ +import { Injectable } from '@nestjs/common'; +import { PrismaService } from 'src/database/prisma.service'; + +@Injectable() +export class WorkspaceMemberService { + constructor(private readonly prismaService: PrismaService) {} + + // Find + findFirst = this.prismaService.workspaceMember.findFirst; + findFirstOrThrow = this.prismaService.workspaceMember.findFirstOrThrow; + + findUnique = this.prismaService.workspaceMember.findUnique; + findUniqueOrThrow = this.prismaService.workspaceMember.findUniqueOrThrow; + + findMany = this.prismaService.workspaceMember.findMany; + + // Create + create = this.prismaService.workspaceMember.create; + createMany = this.prismaService.workspaceMember.createMany; + + // Update + update = this.prismaService.workspaceMember.update; + upsert = this.prismaService.workspaceMember.upsert; + updateMany = this.prismaService.workspaceMember.updateMany; + + // Delete + delete = this.prismaService.workspaceMember.delete; + deleteMany = this.prismaService.workspaceMember.deleteMany; + + // Aggregate + aggregate = this.prismaService.workspaceMember.aggregate; + + // Count + count = this.prismaService.workspaceMember.count; + + // GroupBy + groupBy = this.prismaService.workspaceMember.groupBy; +} diff --git a/server/src/core/workspace/services/workspace.service.spec.ts b/server/src/core/workspace/services/workspace.service.spec.ts new file mode 100644 index 0000000000..f566cb3142 --- /dev/null +++ b/server/src/core/workspace/services/workspace.service.spec.ts @@ -0,0 +1,26 @@ +import { Test, TestingModule } from '@nestjs/testing'; +import { WorkspaceService } from './workspace.service'; +import { PrismaService } from 'src/database/prisma.service'; +import { prismaMock } from 'src/prisma-mock/jest-prisma-singleton'; + +describe('WorkspaceService', () => { + let service: WorkspaceService; + + beforeEach(async () => { + const module: TestingModule = await Test.createTestingModule({ + providers: [ + WorkspaceService, + { + provide: PrismaService, + useValue: prismaMock, + }, + ], + }).compile(); + + service = module.get(WorkspaceService); + }); + + it('should be defined', () => { + expect(service).toBeDefined(); + }); +}); diff --git a/server/src/core/workspace/services/workspace.service.ts b/server/src/core/workspace/services/workspace.service.ts new file mode 100644 index 0000000000..75d1639f92 --- /dev/null +++ b/server/src/core/workspace/services/workspace.service.ts @@ -0,0 +1,38 @@ +import { Injectable } from '@nestjs/common'; +import { PrismaService } from 'src/database/prisma.service'; + +@Injectable() +export class WorkspaceService { + constructor(private readonly prismaService: PrismaService) {} + + // Find + findFirst = this.prismaService.workspace.findFirst; + findFirstOrThrow = this.prismaService.workspace.findFirstOrThrow; + + findUnique = this.prismaService.workspace.findUnique; + findUniqueOrThrow = this.prismaService.workspace.findUniqueOrThrow; + + findMany = this.prismaService.workspace.findMany; + + // Create + create = this.prismaService.workspace.create; + createMany = this.prismaService.workspace.createMany; + + // Update + update = this.prismaService.workspace.update; + upsert = this.prismaService.workspace.upsert; + updateMany = this.prismaService.workspace.updateMany; + + // Delete + delete = this.prismaService.workspace.delete; + deleteMany = this.prismaService.workspace.deleteMany; + + // Aggregate + aggregate = this.prismaService.workspace.aggregate; + + // Count + count = this.prismaService.workspace.count; + + // GroupBy + groupBy = this.prismaService.workspace.groupBy; +} diff --git a/server/src/core/workspace/workspace.module.ts b/server/src/core/workspace/workspace.module.ts new file mode 100644 index 0000000000..b454577991 --- /dev/null +++ b/server/src/core/workspace/workspace.module.ts @@ -0,0 +1,16 @@ +import { Module } from '@nestjs/common'; +import { WorkspaceService } from './services/workspace.service'; +import { WorkspaceMemberService } from './services/workspace-member.service'; +import { WorkspaceMemberResolver } from './resolvers/workspace-member.resolver'; +import { WorkspaceMemberRelationsResolver } from './resolvers/workspace-member-relations.resolver'; + +@Module({ + providers: [ + WorkspaceService, + WorkspaceMemberService, + WorkspaceMemberResolver, + WorkspaceMemberRelationsResolver, + ], + exports: [WorkspaceService, WorkspaceMemberService], +}) +export class WorkspaceModule {} diff --git a/server/src/database/prisma.module.ts b/server/src/database/prisma.module.ts index ec0ce32915..7207426f60 100644 --- a/server/src/database/prisma.module.ts +++ b/server/src/database/prisma.module.ts @@ -1,6 +1,7 @@ -import { Module } from '@nestjs/common'; +import { Global, Module } from '@nestjs/common'; import { PrismaService } from './prisma.service'; +@Global() @Module({ providers: [PrismaService], exports: [PrismaService], diff --git a/server/src/database/schema.prisma b/server/src/database/schema.prisma index 7fabde94ae..b58af030ee 100644 --- a/server/src/database/schema.prisma +++ b/server/src/database/schema.prisma @@ -10,7 +10,7 @@ datasource db { generator nestgraphql { provider = "node node_modules/prisma-nestjs-graphql" - output = "../../src/api/@generated" + output = "../../src/core/@generated" // CommentThread create: Only Allow targets createMany and comments createMany decorate_createCommentThreadTargets_type = "*CommentThreadTargetCreateNestedManyWithoutCommentThreadInput" diff --git a/server/src/decorators/auth-user.decorator.ts b/server/src/decorators/auth-user.decorator.ts new file mode 100644 index 0000000000..f7fe3133a5 --- /dev/null +++ b/server/src/decorators/auth-user.decorator.ts @@ -0,0 +1,10 @@ +import { ExecutionContext, createParamDecorator } from '@nestjs/common'; +import { getRequest } from 'src/utils/extract-request'; + +export const AuthUser = createParamDecorator( + (_: unknown, ctx: ExecutionContext) => { + const request = getRequest(ctx); + + return request.user ? request.user.user : undefined; + }, +); diff --git a/server/src/decorators/auth-workspace.decorator.ts b/server/src/decorators/auth-workspace.decorator.ts new file mode 100644 index 0000000000..78e6e856a8 --- /dev/null +++ b/server/src/decorators/auth-workspace.decorator.ts @@ -0,0 +1,10 @@ +import { ExecutionContext, createParamDecorator } from '@nestjs/common'; +import { getRequest } from 'src/utils/extract-request'; + +export const AuthWorkspace = createParamDecorator( + (data: unknown, ctx: ExecutionContext) => { + const request = getRequest(ctx); + + return request.user ? request.user.workspace : undefined; + }, +); diff --git a/server/src/api/resolvers/exception-filters/exception.filter.ts b/server/src/filters/exception.filter.ts similarity index 100% rename from server/src/api/resolvers/exception-filters/exception.filter.ts rename to server/src/filters/exception.filter.ts diff --git a/server/src/api/resolvers/guards/create-one-comment-thread.guard.ts b/server/src/guards/create-one-comment-thread.guard.ts similarity index 98% rename from server/src/api/resolvers/guards/create-one-comment-thread.guard.ts rename to server/src/guards/create-one-comment-thread.guard.ts index ef8e6b6bad..081878ee30 100644 --- a/server/src/api/resolvers/guards/create-one-comment-thread.guard.ts +++ b/server/src/guards/create-one-comment-thread.guard.ts @@ -20,7 +20,7 @@ export class CreateOneCommentThreadGuard implements CanActivate { const targets = args.data?.commentThreadTargets?.createMany?.data; const comments = args.data?.comments?.createMany?.data; - const workspace = await request.workspace; + const workspace = request.user.workspace; if (!targets || targets.length === 0) { throw new HttpException( diff --git a/server/src/api/resolvers/guards/create-one-comment.guard.ts b/server/src/guards/create-one-comment.guard.ts similarity index 97% rename from server/src/api/resolvers/guards/create-one-comment.guard.ts rename to server/src/guards/create-one-comment.guard.ts index 52fffc4a33..7a020920c1 100644 --- a/server/src/api/resolvers/guards/create-one-comment.guard.ts +++ b/server/src/guards/create-one-comment.guard.ts @@ -54,7 +54,7 @@ export class CreateOneCommentGuard implements CanActivate { ); } - const workspace = await request.workspace; + const workspace = request.user.workspace; if ( userWorkspaceMember.workspaceId !== workspace.id || diff --git a/server/src/api/resolvers/guards/create-one.guard.ts b/server/src/guards/create-one.guard.ts similarity index 100% rename from server/src/api/resolvers/guards/create-one.guard.ts rename to server/src/guards/create-one.guard.ts diff --git a/server/src/api/resolvers/guards/delete-many.guard.ts b/server/src/guards/delete-many.guard.ts similarity index 100% rename from server/src/api/resolvers/guards/delete-many.guard.ts rename to server/src/guards/delete-many.guard.ts diff --git a/server/src/guards/jwt.auth.guard.ts b/server/src/guards/jwt.auth.guard.ts new file mode 100644 index 0000000000..bb4a378361 --- /dev/null +++ b/server/src/guards/jwt.auth.guard.ts @@ -0,0 +1,40 @@ +import { + ExecutionContext, + Injectable, + UnauthorizedException, +} from '@nestjs/common'; +import { AuthGuard } from '@nestjs/passport'; +import { JsonWebTokenError } from 'jsonwebtoken'; +import { assert } from 'src/utils/assert'; +import { getRequest } from 'src/utils/extract-request'; + +@Injectable() +export class JwtAuthGuard extends AuthGuard(['jwt']) { + constructor() { + super(); + } + + getRequest(context: ExecutionContext) { + const request = getRequest(context); + + return request; + } + + handleRequest(err: any, user: any, info: any) { + assert(user, '', UnauthorizedException); + + if (err) { + throw err; + } + + if (info && info instanceof Error) { + if (info instanceof JsonWebTokenError) { + info = String(info); + } + + throw new UnauthorizedException(info); + } + + return user; + } +} diff --git a/server/src/api/resolvers/guards/update-one.guard.ts b/server/src/guards/update-one.guard.ts similarity index 96% rename from server/src/api/resolvers/guards/update-one.guard.ts rename to server/src/guards/update-one.guard.ts index e7a724c340..c0e2841626 100644 --- a/server/src/api/resolvers/guards/update-one.guard.ts +++ b/server/src/guards/update-one.guard.ts @@ -36,7 +36,7 @@ export class UpdateOneGuard implements CanActivate { ); } - const workspace = await request.workspace; + const workspace = request.user.workspace; if (object.workspaceId !== workspace.id) { throw new HttpException( diff --git a/server/src/health.controller.spec.ts b/server/src/health.controller.spec.ts deleted file mode 100644 index 01eb5c2e73..0000000000 --- a/server/src/health.controller.spec.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { Test, TestingModule } from '@nestjs/testing'; -import { HealthController } from './health.controller'; -import { AppService } from './app.service'; -import { TerminusModule } from '@nestjs/terminus'; - -describe('HealthController', () => { - let healthController: HealthController; - - beforeEach(async () => { - const app: TestingModule = await Test.createTestingModule({ - controllers: [HealthController], - imports: [TerminusModule], - providers: [AppService], - }).compile(); - - healthController = app.get(HealthController); - }); - - it('should be defined', () => { - expect(healthController).toBeDefined(); - }); -}); diff --git a/server/src/health.controller.ts b/server/src/health.controller.ts deleted file mode 100644 index c524a8b456..0000000000 --- a/server/src/health.controller.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { Controller, Get } from '@nestjs/common'; -import { HealthCheckService, HealthCheck } from '@nestjs/terminus'; - -@Controller('healthz') -export class HealthController { - constructor(private health: HealthCheckService) {} - - @Get() - @HealthCheck() - check() { - return this.health.check([]); - } -} diff --git a/server/src/health/health.controller.spec.ts b/server/src/health/health.controller.spec.ts new file mode 100644 index 0000000000..41960b8f1e --- /dev/null +++ b/server/src/health/health.controller.spec.ts @@ -0,0 +1,35 @@ +import { HealthCheckService, HttpHealthIndicator } from '@nestjs/terminus'; +import { Test, TestingModule } from '@nestjs/testing'; +import { HealthController } from 'src/health/health.controller'; +import { PrismaHealthIndicator } from 'src/health/indicators/prisma-health-indicator'; + +describe('HealthController', () => { + let healthController: HealthController; + let testingModule: TestingModule; + + beforeEach(async () => { + testingModule = await Test.createTestingModule({ + providers: [ + HealthController, + { + provide: HealthCheckService, + useValue: {}, + }, + { + provide: PrismaHealthIndicator, + useValue: {}, + }, + { + provide: HttpHealthIndicator, + useValue: {}, + }, + ], + }).compile(); + + healthController = testingModule.get(HealthController); + }); + + it('should be defined', () => { + expect(healthController).toBeDefined(); + }); +}); diff --git a/server/src/health/health.controller.ts b/server/src/health/health.controller.ts new file mode 100644 index 0000000000..eb58301a3d --- /dev/null +++ b/server/src/health/health.controller.ts @@ -0,0 +1,19 @@ +import { Controller, Get } from '@nestjs/common'; +import { HealthCheck, HealthCheckService } from '@nestjs/terminus'; +import { PrismaHealthIndicator } from 'src/health/indicators/prisma-health-indicator'; + +@Controller('healthz') +export class HealthController { + constructor( + private health: HealthCheckService, + private prismaHealthIndicator: PrismaHealthIndicator, + ) {} + + @Get() + @HealthCheck() + check() { + return this.health.check([ + () => this.prismaHealthIndicator.isDatabaseInstanceHealthy('database'), + ]); + } +} diff --git a/server/src/health/health.module.ts b/server/src/health/health.module.ts new file mode 100644 index 0000000000..f9f09b58e6 --- /dev/null +++ b/server/src/health/health.module.ts @@ -0,0 +1,11 @@ +import { Module } from '@nestjs/common'; +import { TerminusModule } from '@nestjs/terminus'; +import { HealthController } from 'src/health/health.controller'; +import { PrismaHealthIndicator } from 'src/health/indicators/prisma-health-indicator'; + +@Module({ + imports: [TerminusModule], + controllers: [HealthController], + providers: [PrismaHealthIndicator], +}) +export class HealthModule {} diff --git a/server/src/health/indicators/prisma-health-indicator.ts b/server/src/health/indicators/prisma-health-indicator.ts new file mode 100644 index 0000000000..976c479a1a --- /dev/null +++ b/server/src/health/indicators/prisma-health-indicator.ts @@ -0,0 +1,23 @@ +import { Injectable } from '@nestjs/common'; +import { + HealthCheckError, + HealthIndicator, + HealthIndicatorResult, +} from '@nestjs/terminus'; +import { PrismaService } from 'src/database/prisma.service'; + +@Injectable() +export class PrismaHealthIndicator extends HealthIndicator { + constructor(private readonly prismaService: PrismaService) { + super(); + } + + async isDatabaseInstanceHealthy(key: string): Promise { + try { + await this.prismaService.$queryRaw`SELECT 1`; + return this.getStatus(key, true); + } catch (e) { + throw new HealthCheckError('Prisma check failed', e); + } + } +} diff --git a/server/src/prisma-mock/client.ts b/server/src/prisma-mock/client.ts new file mode 100644 index 0000000000..736f146261 --- /dev/null +++ b/server/src/prisma-mock/client.ts @@ -0,0 +1,4 @@ +import { PrismaClient } from '@prisma/client'; + +const prisma = new PrismaClient(); +export default prisma; diff --git a/server/src/prisma-mock/jest-prisma-singleton.ts b/server/src/prisma-mock/jest-prisma-singleton.ts new file mode 100644 index 0000000000..0b2100c96a --- /dev/null +++ b/server/src/prisma-mock/jest-prisma-singleton.ts @@ -0,0 +1,15 @@ +import { PrismaClient } from '@prisma/client'; +import { mockDeep, mockReset, DeepMockProxy } from 'jest-mock-extended'; + +import prisma from './client'; + +jest.mock('./client', () => ({ + __esModule: true, + default: mockDeep(), +})); + +beforeEach(() => { + mockReset(prismaMock); +}); + +export const prismaMock = prisma as unknown as DeepMockProxy; diff --git a/server/src/utils/assert.ts b/server/src/utils/assert.ts new file mode 100644 index 0000000000..58702e51bd --- /dev/null +++ b/server/src/utils/assert.ts @@ -0,0 +1,28 @@ +import { HttpException } from '@nestjs/common'; + +type Assert = ( + condition: unknown, + message?: string, + ErrorType?: new (message?: string) => HttpException, +) => asserts condition; + +/** + * assert condition and throws a HttpException + */ +export const assert: Assert = (condition, message, ErrorType) => { + if (!condition) { + if (ErrorType) { + if (message) { + throw new ErrorType(message); + } + + throw new ErrorType(); + } + + throw new Error(message); + } +}; + +export function assertNotNull(item: T): item is NonNullable { + return item !== null && item !== undefined; +} diff --git a/server/src/utils/extract-request.ts b/server/src/utils/extract-request.ts new file mode 100644 index 0000000000..326db8cdac --- /dev/null +++ b/server/src/utils/extract-request.ts @@ -0,0 +1,27 @@ +import { ExecutionContext } from '@nestjs/common'; +import { GqlContextType, GqlExecutionContext } from '@nestjs/graphql'; + +// extract request from the execution context +export const getRequest = (context: ExecutionContext) => { + let request; + + // if context is an http request + if (context.getType() === 'http') { + request = context.switchToHttp().getRequest(); + } else if (context.getType() === 'graphql') { + // if context is a graphql request + const graphQLContext = GqlExecutionContext.create(context); + + const { req, connection } = graphQLContext.getContext(); + + request = + connection && connection.context && connection.context.headers + ? connection.context + : req; + } else if (context.getType() === 'rpc') { + // if context is a rpc request + throw new Error('Not implemented'); + } + + return request; +}; diff --git a/server/src/utils/prepare-find-many.ts b/server/src/utils/prepare-find-many.ts new file mode 100644 index 0000000000..65d6625ba3 --- /dev/null +++ b/server/src/utils/prepare-find-many.ts @@ -0,0 +1,15 @@ +import { Workspace } from '@prisma/client'; + +type FindManyArgsType = { where?: object; orderBy?: object }; + +export const prepareFindManyArgs = ( + args: T, + workspace: Workspace, +): T => { + args.where = { + ...args.where, + ...{ workspace: { is: { id: { equals: workspace.id } } } }, + }; + + return args; +}; diff --git a/server/tsconfig.json b/server/tsconfig.json index 0882c52ad0..84461f5af9 100644 --- a/server/tsconfig.json +++ b/server/tsconfig.json @@ -9,6 +9,7 @@ "target": "es2017", "sourceMap": true, "outDir": "./dist", + "rootDir": "./", "baseUrl": "./", "incremental": true, "skipLibCheck": true, diff --git a/server/yarn.lock b/server/yarn.lock index c2e70c6a73..25b5e62e24 100644 --- a/server/yarn.lock +++ b/server/yarn.lock @@ -1499,6 +1499,13 @@ resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.12.tgz#d70faba7039d5fca54c83c7dbab41051d2b6f6cb" integrity sha512-Hr5Jfhc9eYOQNPYO5WLDq/n4jqijdHNlDXjuAQkkt+mWdQR+XJToOHrsD4cPaMXpn6KO7y2+wM8AZEs8VpBLVA== +"@types/jsonwebtoken@*": + version "9.0.2" + resolved "https://registry.yarnpkg.com/@types/jsonwebtoken/-/jsonwebtoken-9.0.2.tgz#9eeb56c76dd555039be2a3972218de5bd3b8d83e" + integrity sha512-drE6uz7QBKq1fYqqoFKTDRdFCPHd5TCub75BM+D+cMx7NU9hUz7SESLfC2fSCXVFMO5Yj8sOWHuGqPgjc+fz0Q== + dependencies: + "@types/node" "*" + "@types/jsonwebtoken@9.0.1": version "9.0.1" resolved "https://registry.yarnpkg.com/@types/jsonwebtoken/-/jsonwebtoken-9.0.1.tgz#29b1369c4774200d6d6f63135bf3d1ba3ef997a4" @@ -1570,6 +1577,15 @@ "@types/passport" "*" "@types/passport-oauth2" "*" +"@types/passport-jwt@^3.0.8": + version "3.0.8" + resolved "https://registry.yarnpkg.com/@types/passport-jwt/-/passport-jwt-3.0.8.tgz#c8a95bf7d8f330f2560f1b3d07605e23ac01469a" + integrity sha512-VKJZDJUAHFhPHHYvxdqFcc5vlDht8Q2pL1/ePvKAgqRThDaCc84lSYOTQmnx3+JIkDlN+2KfhFhXIzlcVT+Pcw== + dependencies: + "@types/express" "*" + "@types/jsonwebtoken" "*" + "@types/passport-strategy" "*" + "@types/passport-oauth2@*": version "1.4.12" resolved "https://registry.yarnpkg.com/@types/passport-oauth2/-/passport-oauth2-1.4.12.tgz#c2ae0ee3b16646188d8b0b6cdbc6880a0247dc5f" @@ -1579,6 +1595,14 @@ "@types/oauth" "*" "@types/passport" "*" +"@types/passport-strategy@*": + version "0.2.35" + resolved "https://registry.yarnpkg.com/@types/passport-strategy/-/passport-strategy-0.2.35.tgz#e52f5212279ea73f02d9b06af67efe9cefce2d0c" + integrity sha512-o5D19Jy2XPFoX2rKApykY15et3Apgax00RRLf0RUotPDUsYrQa7x4howLYr9El2mlUApHmCMv5CZ1IXqKFQ2+g== + dependencies: + "@types/express" "*" + "@types/passport" "*" + "@types/passport@*": version "1.0.12" resolved "https://registry.yarnpkg.com/@types/passport/-/passport-1.0.12.tgz#7dc8ab96a5e895ec13688d9e3a96920a7f42e73e" @@ -1642,6 +1666,11 @@ dependencies: "@types/superagent" "*" +"@types/uuid@^9.0.2": + version "9.0.2" + resolved "https://registry.yarnpkg.com/@types/uuid/-/uuid-9.0.2.tgz#ede1d1b1e451548d44919dc226253e32a6952c4b" + integrity sha512-kNnC1GFBLuhImSnV7w4njQkUiJi0ZXUycu1rUaouPqiKlXkh77JKgdRnTAp1x5eBwcIwbtI+3otwzuIDEuDoxQ== + "@types/yargs-parser@*": version "21.0.0" resolved "https://registry.yarnpkg.com/@types/yargs-parser/-/yargs-parser-21.0.0.tgz#0c60e537fa790f5f9472ed2776c2b71ec117351b"