feat: refactoring auth & add email password login (#318)

* feat: wip

* fix: issues

* feat: clean controllers and services

* fix: test

* Fix auth

---------

Co-authored-by: Charles Bochet <charles@twenty.com>
This commit is contained in:
Jérémy M
2023-06-17 13:42:02 +02:00
committed by GitHub
parent d13ceb98fa
commit 299ca293a8
215 changed files with 1668 additions and 680 deletions

View File

@ -1,7 +1,11 @@
AUTH_GOOGLE_CLIENT_ID=REPLACE_ME
AUTH_GOOGLE_CLIENT_SECRET=REPLACE_ME
AUTH_GOOGLE_CALLBACK_URL=http://localhost:3000/auth/google/redirect
JWT_SECRET=secret_jwt
JWT_EXPIRES_IN=300
ACCESS_TOKEN_SECRET=secret_jwt
ACCESS_TOKEN_EXPIRES_IN=5m
LOGIN_TOKEN_SECRET=secret_login_token
LOGIN_TOKEN_EXPIRES_IN=15m
REFRESH_TOKEN_SECRET=secret_refresh_token
REFRESH_TOKEN_EXPIRES_IN=90d
PG_DATABASE_URL=postgres://postgres:postgrespassword@postgres:5432/default?connection_limit=1
FRONT_AUTH_CALLBACK_URL=http://localhost:3001/auth/callback
FRONT_AUTH_CALLBACK_URL=http://localhost:3001/auth/callback

View File

@ -39,11 +39,15 @@
"@nestjs/terminus": "^9.2.2",
"@prisma/client": "^4.13.0",
"apollo-server-express": "^3.12.0",
"bcrypt": "^5.1.0",
"class-transformer": "^0.5.1",
"class-validator": "^0.14.0",
"date-fns": "^2.30.0",
"graphql": "^16.6.0",
"graphql-type-json": "^0.3.2",
"jest-mock-extended": "^3.0.4",
"jsonwebtoken": "^9.0.0",
"ms": "^2.1.3",
"passport": "^0.6.0",
"passport-google-oauth20": "^2.0.0",
"passport-jwt": "^4.0.1",
@ -57,8 +61,11 @@
"@nestjs/cli": "^9.0.0",
"@nestjs/schematics": "^9.0.0",
"@nestjs/testing": "^9.0.0",
"@types/bcrypt": "^5.0.0",
"@types/date-fns": "^2.6.0",
"@types/express": "^4.17.13",
"@types/jest": "28.1.8",
"@types/ms": "^0.7.31",
"@types/node": "^16.0.0",
"@types/passport-google-oauth20": "^2.0.11",
"@types/passport-jwt": "^3.0.8",

View File

@ -4,8 +4,8 @@ import { CommentableType } from '../prisma/commentable-type.enum';
@InputType()
export class CommentThreadTargetCreateManyCommentThreadInput {
@Field(() => String, { nullable: false })
id!: string;
@Field(() => String, { nullable: true })
id?: string;
@Field(() => Date, { nullable: true })
createdAt?: Date | string;

View File

@ -4,8 +4,8 @@ import { CommentableType } from '../prisma/commentable-type.enum';
@InputType()
export class CommentThreadTargetCreateManyInput {
@Field(() => String, { nullable: false })
id!: string;
@Field(() => String, { nullable: true })
id?: string;
@Field(() => Date, { nullable: true })
createdAt?: Date | string;

View File

@ -4,8 +4,8 @@ import { CommentableType } from '../prisma/commentable-type.enum';
@InputType()
export class CommentThreadTargetCreateWithoutCommentThreadInput {
@Field(() => String, { nullable: false })
id!: string;
@Field(() => String, { nullable: true })
id?: string;
@Field(() => Date, { nullable: true })
createdAt?: Date | string;

View File

@ -5,8 +5,8 @@ import { CommentThreadCreateNestedOneWithoutCommentThreadTargetsInput } from '..
@InputType()
export class CommentThreadTargetCreateInput {
@Field(() => String, { nullable: false })
id!: string;
@Field(() => String, { nullable: true })
id?: string;
@Field(() => Date, { nullable: true })
createdAt?: Date | string;

View File

@ -4,8 +4,8 @@ import { CommentableType } from '../prisma/commentable-type.enum';
@InputType()
export class CommentThreadTargetUncheckedCreateWithoutCommentThreadInput {
@Field(() => String, { nullable: false })
id!: string;
@Field(() => String, { nullable: true })
id?: string;
@Field(() => Date, { nullable: true })
createdAt?: Date | string;

View File

@ -4,8 +4,8 @@ import { CommentableType } from '../prisma/commentable-type.enum';
@InputType()
export class CommentThreadTargetUncheckedCreateInput {
@Field(() => String, { nullable: false })
id!: string;
@Field(() => String, { nullable: true })
id?: string;
@Field(() => Date, { nullable: true })
createdAt?: Date | string;

View File

@ -3,8 +3,8 @@ import { InputType } from '@nestjs/graphql';
@InputType()
export class CommentThreadCreateManyWorkspaceInput {
@Field(() => String, { nullable: false })
id!: string;
@Field(() => String, { nullable: true })
id?: string;
@Field(() => Date, { nullable: true })
createdAt?: Date | string;

View File

@ -4,8 +4,8 @@ import { HideField } from '@nestjs/graphql';
@InputType()
export class CommentThreadCreateManyInput {
@Field(() => String, { nullable: false })
id!: string;
@Field(() => String, { nullable: true })
id?: string;
@Field(() => Date, { nullable: true })
createdAt?: Date | string;

View File

@ -6,8 +6,8 @@ import { HideField } from '@nestjs/graphql';
@InputType()
export class CommentThreadCreateWithoutCommentThreadTargetsInput {
@Field(() => String, { nullable: false })
id!: string;
@Field(() => String, { nullable: true })
id?: string;
@Field(() => Date, { nullable: true })
createdAt?: Date | string;

View File

@ -6,8 +6,8 @@ import { HideField } from '@nestjs/graphql';
@InputType()
export class CommentThreadCreateWithoutCommentsInput {
@Field(() => String, { nullable: false })
id!: string;
@Field(() => String, { nullable: true })
id?: string;
@Field(() => Date, { nullable: true })
createdAt?: Date | string;

View File

@ -5,8 +5,8 @@ import { CommentCreateNestedManyWithoutCommentThreadInput } from '../comment/com
@InputType()
export class CommentThreadCreateWithoutWorkspaceInput {
@Field(() => String, { nullable: false })
id!: string;
@Field(() => String, { nullable: true })
id?: string;
@Field(() => Date, { nullable: true })
createdAt?: Date | string;

View File

@ -7,8 +7,8 @@ import { HideField } from '@nestjs/graphql';
@InputType()
export class CommentThreadCreateInput {
@Field(() => String, { nullable: false })
id!: string;
@Field(() => String, { nullable: true })
id?: string;
@Field(() => Date, { nullable: true })
createdAt?: Date | string;

View File

@ -5,8 +5,8 @@ import { CommentUncheckedCreateNestedManyWithoutCommentThreadInput } from '../co
@InputType()
export class CommentThreadUncheckedCreateWithoutCommentThreadTargetsInput {
@Field(() => String, { nullable: false })
id!: string;
@Field(() => String, { nullable: true })
id?: string;
@Field(() => Date, { nullable: true })
createdAt?: Date | string;

View File

@ -5,8 +5,8 @@ import { CommentThreadTargetUncheckedCreateNestedManyWithoutCommentThreadInput }
@InputType()
export class CommentThreadUncheckedCreateWithoutCommentsInput {
@Field(() => String, { nullable: false })
id!: string;
@Field(() => String, { nullable: true })
id?: string;
@Field(() => Date, { nullable: true })
createdAt?: Date | string;

View File

@ -5,8 +5,8 @@ import { CommentUncheckedCreateNestedManyWithoutCommentThreadInput } from '../co
@InputType()
export class CommentThreadUncheckedCreateWithoutWorkspaceInput {
@Field(() => String, { nullable: false })
id!: string;
@Field(() => String, { nullable: true })
id?: string;
@Field(() => Date, { nullable: true })
createdAt?: Date | string;

View File

@ -6,8 +6,8 @@ import { CommentUncheckedCreateNestedManyWithoutCommentThreadInput } from '../co
@InputType()
export class CommentThreadUncheckedCreateInput {
@Field(() => String, { nullable: false })
id!: string;
@Field(() => String, { nullable: true })
id?: string;
@Field(() => Date, { nullable: true })
createdAt?: Date | string;

View File

@ -4,8 +4,8 @@ import { HideField } from '@nestjs/graphql';
@InputType()
export class CommentCreateManyAuthorInput {
@Field(() => String, { nullable: false })
id!: string;
@Field(() => String, { nullable: true })
id?: string;
@Field(() => Date, { nullable: true })
createdAt?: Date | string;

View File

@ -4,8 +4,8 @@ import { HideField } from '@nestjs/graphql';
@InputType()
export class CommentCreateManyCommentThreadInput {
@Field(() => String, { nullable: false })
id!: string;
@Field(() => String, { nullable: true })
id?: string;
@Field(() => Date, { nullable: true })
createdAt?: Date | string;

View File

@ -3,8 +3,8 @@ import { InputType } from '@nestjs/graphql';
@InputType()
export class CommentCreateManyWorkspaceInput {
@Field(() => String, { nullable: false })
id!: string;
@Field(() => String, { nullable: true })
id?: string;
@Field(() => Date, { nullable: true })
createdAt?: Date | string;

View File

@ -4,8 +4,8 @@ import { HideField } from '@nestjs/graphql';
@InputType()
export class CommentCreateManyInput {
@Field(() => String, { nullable: false })
id!: string;
@Field(() => String, { nullable: true })
id?: string;
@Field(() => Date, { nullable: true })
createdAt?: Date | string;

View File

@ -6,8 +6,8 @@ import { HideField } from '@nestjs/graphql';
@InputType()
export class CommentCreateWithoutAuthorInput {
@Field(() => String, { nullable: false })
id!: string;
@Field(() => String, { nullable: true })
id?: string;
@Field(() => Date, { nullable: true })
createdAt?: Date | string;

View File

@ -6,8 +6,8 @@ import { HideField } from '@nestjs/graphql';
@InputType()
export class CommentCreateWithoutCommentThreadInput {
@Field(() => String, { nullable: false })
id!: string;
@Field(() => String, { nullable: true })
id?: string;
@Field(() => Date, { nullable: true })
createdAt?: Date | string;

View File

@ -5,8 +5,8 @@ import { CommentThreadCreateNestedOneWithoutCommentsInput } from '../comment-thr
@InputType()
export class CommentCreateWithoutWorkspaceInput {
@Field(() => String, { nullable: false })
id!: string;
@Field(() => String, { nullable: true })
id?: string;
@Field(() => Date, { nullable: true })
createdAt?: Date | string;

View File

@ -7,8 +7,8 @@ import { HideField } from '@nestjs/graphql';
@InputType()
export class CommentCreateInput {
@Field(() => String, { nullable: false })
id!: string;
@Field(() => String, { nullable: true })
id?: string;
@Field(() => Date, { nullable: true })
createdAt?: Date | string;

View File

@ -4,8 +4,8 @@ import { HideField } from '@nestjs/graphql';
@InputType()
export class CommentUncheckedCreateWithoutAuthorInput {
@Field(() => String, { nullable: false })
id!: string;
@Field(() => String, { nullable: true })
id?: string;
@Field(() => Date, { nullable: true })
createdAt?: Date | string;

View File

@ -4,8 +4,8 @@ import { HideField } from '@nestjs/graphql';
@InputType()
export class CommentUncheckedCreateWithoutCommentThreadInput {
@Field(() => String, { nullable: false })
id!: string;
@Field(() => String, { nullable: true })
id?: string;
@Field(() => Date, { nullable: true })
createdAt?: Date | string;

View File

@ -3,8 +3,8 @@ import { InputType } from '@nestjs/graphql';
@InputType()
export class CommentUncheckedCreateWithoutWorkspaceInput {
@Field(() => String, { nullable: false })
id!: string;
@Field(() => String, { nullable: true })
id?: string;
@Field(() => Date, { nullable: true })
createdAt?: Date | string;

View File

@ -4,8 +4,8 @@ import { HideField } from '@nestjs/graphql';
@InputType()
export class CommentUncheckedCreateInput {
@Field(() => String, { nullable: false })
id!: string;
@Field(() => String, { nullable: true })
id?: string;
@Field(() => Date, { nullable: true })
createdAt?: Date | string;

View File

@ -5,8 +5,8 @@ import { HideField } from '@nestjs/graphql';
@InputType()
export class CompanyCreateManyAccountOwnerInput {
@Field(() => String, { nullable: false })
id!: string;
@Field(() => String, { nullable: true })
id?: string;
@Field(() => Date, { nullable: true })
createdAt?: Date | string;

View File

@ -4,8 +4,8 @@ import { Int } from '@nestjs/graphql';
@InputType()
export class CompanyCreateManyWorkspaceInput {
@Field(() => String, { nullable: false })
id!: string;
@Field(() => String, { nullable: true })
id?: string;
@Field(() => Date, { nullable: true })
createdAt?: Date | string;

View File

@ -5,8 +5,8 @@ import { HideField } from '@nestjs/graphql';
@InputType()
export class CompanyCreateManyInput {
@Field(() => String, { nullable: false })
id!: string;
@Field(() => String, { nullable: true })
id?: string;
@Field(() => Date, { nullable: true })
createdAt?: Date | string;

View File

@ -7,8 +7,8 @@ import { HideField } from '@nestjs/graphql';
@InputType()
export class CompanyCreateWithoutAccountOwnerInput {
@Field(() => String, { nullable: false })
id!: string;
@Field(() => String, { nullable: true })
id?: string;
@Field(() => Date, { nullable: true })
createdAt?: Date | string;

View File

@ -7,8 +7,8 @@ import { HideField } from '@nestjs/graphql';
@InputType()
export class CompanyCreateWithoutPeopleInput {
@Field(() => String, { nullable: false })
id!: string;
@Field(() => String, { nullable: true })
id?: string;
@Field(() => Date, { nullable: true })
createdAt?: Date | string;

View File

@ -6,8 +6,8 @@ import { PersonCreateNestedManyWithoutCompanyInput } from '../person/person-crea
@InputType()
export class CompanyCreateWithoutWorkspaceInput {
@Field(() => String, { nullable: false })
id!: string;
@Field(() => String, { nullable: true })
id?: string;
@Field(() => Date, { nullable: true })
createdAt?: Date | string;

View File

@ -8,8 +8,8 @@ import { HideField } from '@nestjs/graphql';
@InputType()
export class CompanyCreateInput {
@Field(() => String, { nullable: false })
id!: string;
@Field(() => String, { nullable: true })
id?: string;
@Field(() => Date, { nullable: true })
createdAt?: Date | string;

View File

@ -6,8 +6,8 @@ import { PersonUncheckedCreateNestedManyWithoutCompanyInput } from '../person/pe
@InputType()
export class CompanyUncheckedCreateWithoutAccountOwnerInput {
@Field(() => String, { nullable: false })
id!: string;
@Field(() => String, { nullable: true })
id?: string;
@Field(() => Date, { nullable: true })
createdAt?: Date | string;

View File

@ -5,8 +5,8 @@ import { HideField } from '@nestjs/graphql';
@InputType()
export class CompanyUncheckedCreateWithoutPeopleInput {
@Field(() => String, { nullable: false })
id!: string;
@Field(() => String, { nullable: true })
id?: string;
@Field(() => Date, { nullable: true })
createdAt?: Date | string;

View File

@ -5,8 +5,8 @@ import { PersonUncheckedCreateNestedManyWithoutCompanyInput } from '../person/pe
@InputType()
export class CompanyUncheckedCreateWithoutWorkspaceInput {
@Field(() => String, { nullable: false })
id!: string;
@Field(() => String, { nullable: true })
id?: string;
@Field(() => Date, { nullable: true })
createdAt?: Date | string;

View File

@ -6,8 +6,8 @@ import { PersonUncheckedCreateNestedManyWithoutCompanyInput } from '../person/pe
@InputType()
export class CompanyUncheckedCreateInput {
@Field(() => String, { nullable: false })
id!: string;
@Field(() => String, { nullable: true })
id?: string;
@Field(() => Date, { nullable: true })
createdAt?: Date | string;

View File

@ -4,8 +4,8 @@ import { HideField } from '@nestjs/graphql';
@InputType()
export class PersonCreateManyCompanyInput {
@Field(() => String, { nullable: false })
id!: string;
@Field(() => String, { nullable: true })
id?: string;
@Field(() => Date, { nullable: true })
createdAt?: Date | string;

View File

@ -3,8 +3,8 @@ import { InputType } from '@nestjs/graphql';
@InputType()
export class PersonCreateManyWorkspaceInput {
@Field(() => String, { nullable: false })
id!: string;
@Field(() => String, { nullable: true })
id?: string;
@Field(() => Date, { nullable: true })
createdAt?: Date | string;

View File

@ -4,8 +4,8 @@ import { HideField } from '@nestjs/graphql';
@InputType()
export class PersonCreateManyInput {
@Field(() => String, { nullable: false })
id!: string;
@Field(() => String, { nullable: true })
id?: string;
@Field(() => Date, { nullable: true })
createdAt?: Date | string;

View File

@ -5,8 +5,8 @@ import { HideField } from '@nestjs/graphql';
@InputType()
export class PersonCreateWithoutCompanyInput {
@Field(() => String, { nullable: false })
id!: string;
@Field(() => String, { nullable: true })
id?: string;
@Field(() => Date, { nullable: true })
createdAt?: Date | string;

View File

@ -4,8 +4,8 @@ import { CompanyCreateNestedOneWithoutPeopleInput } from '../company/company-cre
@InputType()
export class PersonCreateWithoutWorkspaceInput {
@Field(() => String, { nullable: false })
id!: string;
@Field(() => String, { nullable: true })
id?: string;
@Field(() => Date, { nullable: true })
createdAt?: Date | string;

View File

@ -6,8 +6,8 @@ import { HideField } from '@nestjs/graphql';
@InputType()
export class PersonCreateInput {
@Field(() => String, { nullable: false })
id!: string;
@Field(() => String, { nullable: true })
id?: string;
@Field(() => Date, { nullable: true })
createdAt?: Date | string;

View File

@ -4,8 +4,8 @@ import { HideField } from '@nestjs/graphql';
@InputType()
export class PersonUncheckedCreateWithoutCompanyInput {
@Field(() => String, { nullable: false })
id!: string;
@Field(() => String, { nullable: true })
id?: string;
@Field(() => Date, { nullable: true })
createdAt?: Date | string;

View File

@ -3,8 +3,8 @@ import { InputType } from '@nestjs/graphql';
@InputType()
export class PersonUncheckedCreateWithoutWorkspaceInput {
@Field(() => String, { nullable: false })
id!: string;
@Field(() => String, { nullable: true })
id?: string;
@Field(() => Date, { nullable: true })
createdAt?: Date | string;

View File

@ -4,8 +4,8 @@ import { HideField } from '@nestjs/graphql';
@InputType()
export class PersonUncheckedCreateInput {
@Field(() => String, { nullable: false })
id!: string;
@Field(() => String, { nullable: true })
id?: string;
@Field(() => Date, { nullable: true })
createdAt?: Date | string;

View File

@ -5,8 +5,8 @@ import { HideField } from '@nestjs/graphql';
@InputType()
export class PipelineProgressCreateManyPipelineStageInput {
@Field(() => String, { nullable: false })
id!: string;
@Field(() => String, { nullable: true })
id?: string;
@Field(() => Date, { nullable: true })
createdAt?: Date | string;

View File

@ -5,8 +5,8 @@ import { HideField } from '@nestjs/graphql';
@InputType()
export class PipelineProgressCreateManyPipelineInput {
@Field(() => String, { nullable: false })
id!: string;
@Field(() => String, { nullable: true })
id?: string;
@Field(() => Date, { nullable: true })
createdAt?: Date | string;

View File

@ -4,8 +4,8 @@ import { PipelineProgressableType } from '../prisma/pipeline-progressable-type.e
@InputType()
export class PipelineProgressCreateManyWorkspaceInput {
@Field(() => String, { nullable: false })
id!: string;
@Field(() => String, { nullable: true })
id?: string;
@Field(() => Date, { nullable: true })
createdAt?: Date | string;

View File

@ -5,8 +5,8 @@ import { HideField } from '@nestjs/graphql';
@InputType()
export class PipelineProgressCreateManyInput {
@Field(() => String, { nullable: false })
id!: string;
@Field(() => String, { nullable: true })
id?: string;
@Field(() => Date, { nullable: true })
createdAt?: Date | string;

View File

@ -7,8 +7,8 @@ import { HideField } from '@nestjs/graphql';
@InputType()
export class PipelineProgressCreateWithoutPipelineStageInput {
@Field(() => String, { nullable: false })
id!: string;
@Field(() => String, { nullable: true })
id?: string;
@Field(() => Date, { nullable: true })
createdAt?: Date | string;

View File

@ -7,8 +7,8 @@ import { HideField } from '@nestjs/graphql';
@InputType()
export class PipelineProgressCreateWithoutPipelineInput {
@Field(() => String, { nullable: false })
id!: string;
@Field(() => String, { nullable: true })
id?: string;
@Field(() => Date, { nullable: true })
createdAt?: Date | string;

View File

@ -6,8 +6,8 @@ import { PipelineStageCreateNestedOneWithoutPipelineProgressesInput } from '../p
@InputType()
export class PipelineProgressCreateWithoutWorkspaceInput {
@Field(() => String, { nullable: false })
id!: string;
@Field(() => String, { nullable: true })
id?: string;
@Field(() => Date, { nullable: true })
createdAt?: Date | string;

View File

@ -8,8 +8,8 @@ import { HideField } from '@nestjs/graphql';
@InputType()
export class PipelineProgressCreateInput {
@Field(() => String, { nullable: false })
id!: string;
@Field(() => String, { nullable: true })
id?: string;
@Field(() => Date, { nullable: true })
createdAt?: Date | string;

View File

@ -5,8 +5,8 @@ import { HideField } from '@nestjs/graphql';
@InputType()
export class PipelineProgressUncheckedCreateWithoutPipelineStageInput {
@Field(() => String, { nullable: false })
id!: string;
@Field(() => String, { nullable: true })
id?: string;
@Field(() => Date, { nullable: true })
createdAt?: Date | string;

View File

@ -5,8 +5,8 @@ import { HideField } from '@nestjs/graphql';
@InputType()
export class PipelineProgressUncheckedCreateWithoutPipelineInput {
@Field(() => String, { nullable: false })
id!: string;
@Field(() => String, { nullable: true })
id?: string;
@Field(() => Date, { nullable: true })
createdAt?: Date | string;

View File

@ -4,8 +4,8 @@ import { PipelineProgressableType } from '../prisma/pipeline-progressable-type.e
@InputType()
export class PipelineProgressUncheckedCreateWithoutWorkspaceInput {
@Field(() => String, { nullable: false })
id!: string;
@Field(() => String, { nullable: true })
id?: string;
@Field(() => Date, { nullable: true })
createdAt?: Date | string;

View File

@ -5,8 +5,8 @@ import { HideField } from '@nestjs/graphql';
@InputType()
export class PipelineProgressUncheckedCreateInput {
@Field(() => String, { nullable: false })
id!: string;
@Field(() => String, { nullable: true })
id?: string;
@Field(() => Date, { nullable: true })
createdAt?: Date | string;

View File

@ -4,8 +4,8 @@ import { HideField } from '@nestjs/graphql';
@InputType()
export class PipelineStageCreateManyPipelineInput {
@Field(() => String, { nullable: false })
id!: string;
@Field(() => String, { nullable: true })
id?: string;
@Field(() => Date, { nullable: true })
createdAt?: Date | string;

View File

@ -3,8 +3,8 @@ import { InputType } from '@nestjs/graphql';
@InputType()
export class PipelineStageCreateManyWorkspaceInput {
@Field(() => String, { nullable: false })
id!: string;
@Field(() => String, { nullable: true })
id?: string;
@Field(() => Date, { nullable: true })
createdAt?: Date | string;

View File

@ -4,8 +4,8 @@ import { HideField } from '@nestjs/graphql';
@InputType()
export class PipelineStageCreateManyInput {
@Field(() => String, { nullable: false })
id!: string;
@Field(() => String, { nullable: true })
id?: string;
@Field(() => Date, { nullable: true })
createdAt?: Date | string;

View File

@ -6,8 +6,8 @@ import { HideField } from '@nestjs/graphql';
@InputType()
export class PipelineStageCreateWithoutPipelineProgressesInput {
@Field(() => String, { nullable: false })
id!: string;
@Field(() => String, { nullable: true })
id?: string;
@Field(() => Date, { nullable: true })
createdAt?: Date | string;

View File

@ -6,8 +6,8 @@ import { HideField } from '@nestjs/graphql';
@InputType()
export class PipelineStageCreateWithoutPipelineInput {
@Field(() => String, { nullable: false })
id!: string;
@Field(() => String, { nullable: true })
id?: string;
@Field(() => Date, { nullable: true })
createdAt?: Date | string;

View File

@ -5,8 +5,8 @@ import { PipelineProgressCreateNestedManyWithoutPipelineStageInput } from '../pi
@InputType()
export class PipelineStageCreateWithoutWorkspaceInput {
@Field(() => String, { nullable: false })
id!: string;
@Field(() => String, { nullable: true })
id?: string;
@Field(() => Date, { nullable: true })
createdAt?: Date | string;

View File

@ -7,8 +7,8 @@ import { HideField } from '@nestjs/graphql';
@InputType()
export class PipelineStageCreateInput {
@Field(() => String, { nullable: false })
id!: string;
@Field(() => String, { nullable: true })
id?: string;
@Field(() => Date, { nullable: true })
createdAt?: Date | string;

View File

@ -4,8 +4,8 @@ import { HideField } from '@nestjs/graphql';
@InputType()
export class PipelineStageUncheckedCreateWithoutPipelineProgressesInput {
@Field(() => String, { nullable: false })
id!: string;
@Field(() => String, { nullable: true })
id?: string;
@Field(() => Date, { nullable: true })
createdAt?: Date | string;

View File

@ -5,8 +5,8 @@ import { PipelineProgressUncheckedCreateNestedManyWithoutPipelineStageInput } fr
@InputType()
export class PipelineStageUncheckedCreateWithoutPipelineInput {
@Field(() => String, { nullable: false })
id!: string;
@Field(() => String, { nullable: true })
id?: string;
@Field(() => Date, { nullable: true })
createdAt?: Date | string;

View File

@ -4,8 +4,8 @@ import { PipelineProgressUncheckedCreateNestedManyWithoutPipelineStageInput } fr
@InputType()
export class PipelineStageUncheckedCreateWithoutWorkspaceInput {
@Field(() => String, { nullable: false })
id!: string;
@Field(() => String, { nullable: true })
id?: string;
@Field(() => Date, { nullable: true })
createdAt?: Date | string;

View File

@ -5,8 +5,8 @@ import { PipelineProgressUncheckedCreateNestedManyWithoutPipelineStageInput } fr
@InputType()
export class PipelineStageUncheckedCreateInput {
@Field(() => String, { nullable: false })
id!: string;
@Field(() => String, { nullable: true })
id?: string;
@Field(() => Date, { nullable: true })
createdAt?: Date | string;

View File

@ -3,8 +3,8 @@ import { InputType } from '@nestjs/graphql';
@InputType()
export class PipelineCreateManyWorkspaceInput {
@Field(() => String, { nullable: false })
id!: string;
@Field(() => String, { nullable: true })
id?: string;
@Field(() => Date, { nullable: true })
createdAt?: Date | string;

View File

@ -4,8 +4,8 @@ import { HideField } from '@nestjs/graphql';
@InputType()
export class PipelineCreateManyInput {
@Field(() => String, { nullable: false })
id!: string;
@Field(() => String, { nullable: true })
id?: string;
@Field(() => Date, { nullable: true })
createdAt?: Date | string;

View File

@ -6,8 +6,8 @@ import { HideField } from '@nestjs/graphql';
@InputType()
export class PipelineCreateWithoutPipelineProgressesInput {
@Field(() => String, { nullable: false })
id!: string;
@Field(() => String, { nullable: true })
id?: string;
@Field(() => Date, { nullable: true })
createdAt?: Date | string;

View File

@ -6,8 +6,8 @@ import { HideField } from '@nestjs/graphql';
@InputType()
export class PipelineCreateWithoutPipelineStagesInput {
@Field(() => String, { nullable: false })
id!: string;
@Field(() => String, { nullable: true })
id?: string;
@Field(() => Date, { nullable: true })
createdAt?: Date | string;

View File

@ -5,8 +5,8 @@ import { PipelineProgressCreateNestedManyWithoutPipelineInput } from '../pipelin
@InputType()
export class PipelineCreateWithoutWorkspaceInput {
@Field(() => String, { nullable: false })
id!: string;
@Field(() => String, { nullable: true })
id?: string;
@Field(() => Date, { nullable: true })
createdAt?: Date | string;

View File

@ -7,8 +7,8 @@ import { HideField } from '@nestjs/graphql';
@InputType()
export class PipelineCreateInput {
@Field(() => String, { nullable: false })
id!: string;
@Field(() => String, { nullable: true })
id?: string;
@Field(() => Date, { nullable: true })
createdAt?: Date | string;

View File

@ -5,8 +5,8 @@ import { PipelineStageUncheckedCreateNestedManyWithoutPipelineInput } from '../p
@InputType()
export class PipelineUncheckedCreateWithoutPipelineProgressesInput {
@Field(() => String, { nullable: false })
id!: string;
@Field(() => String, { nullable: true })
id?: string;
@Field(() => Date, { nullable: true })
createdAt?: Date | string;

View File

@ -5,8 +5,8 @@ import { PipelineProgressUncheckedCreateNestedManyWithoutPipelineInput } from '.
@InputType()
export class PipelineUncheckedCreateWithoutPipelineStagesInput {
@Field(() => String, { nullable: false })
id!: string;
@Field(() => String, { nullable: true })
id?: string;
@Field(() => Date, { nullable: true })
createdAt?: Date | string;

View File

@ -5,8 +5,8 @@ import { PipelineProgressUncheckedCreateNestedManyWithoutPipelineInput } from '.
@InputType()
export class PipelineUncheckedCreateWithoutWorkspaceInput {
@Field(() => String, { nullable: false })
id!: string;
@Field(() => String, { nullable: true })
id?: string;
@Field(() => Date, { nullable: true })
createdAt?: Date | string;

View File

@ -6,8 +6,8 @@ import { PipelineProgressUncheckedCreateNestedManyWithoutPipelineInput } from '.
@InputType()
export class PipelineUncheckedCreateInput {
@Field(() => String, { nullable: false })
id!: string;
@Field(() => String, { nullable: true })
id?: string;
@Field(() => Date, { nullable: true })
createdAt?: Date | string;

View File

@ -1,5 +1,6 @@
import { Field } from '@nestjs/graphql';
import { InputType } from '@nestjs/graphql';
import { HideField } from '@nestjs/graphql';
@InputType()
export class RefreshTokenCountAggregateInput {
@ -12,13 +13,16 @@ export class RefreshTokenCountAggregateInput {
@Field(() => Boolean, { nullable: true })
updatedAt?: true;
@Field(() => Boolean, { nullable: true })
isRevoked?: true;
@Field(() => Boolean, { nullable: true })
expiresAt?: true;
@Field(() => Boolean, { nullable: true })
deletedAt?: true;
@Field(() => Boolean, { nullable: true })
refreshToken?: true;
@Field(() => Boolean, { nullable: true })
@HideField()
userId?: true;
@Field(() => Boolean, { nullable: true })

View File

@ -1,6 +1,7 @@
import { Field } from '@nestjs/graphql';
import { ObjectType } from '@nestjs/graphql';
import { Int } from '@nestjs/graphql';
import { HideField } from '@nestjs/graphql';
@ObjectType()
export class RefreshTokenCountAggregate {
@ -13,13 +14,16 @@ export class RefreshTokenCountAggregate {
@Field(() => Int, { nullable: false })
updatedAt!: number;
@Field(() => Int, { nullable: false })
isRevoked!: number;
@Field(() => Int, { nullable: false })
expiresAt!: number;
@Field(() => Int, { nullable: false })
deletedAt!: number;
@Field(() => Int, { nullable: false })
refreshToken!: number;
@Field(() => Int, { nullable: false })
@HideField()
userId!: number;
@Field(() => Int, { nullable: false })

View File

@ -1,6 +1,7 @@
import { Field } from '@nestjs/graphql';
import { InputType } from '@nestjs/graphql';
import { SortOrder } from '../prisma/sort-order.enum';
import { HideField } from '@nestjs/graphql';
@InputType()
export class RefreshTokenCountOrderByAggregateInput {
@ -13,12 +14,15 @@ export class RefreshTokenCountOrderByAggregateInput {
@Field(() => SortOrder, { nullable: true })
updatedAt?: keyof typeof SortOrder;
@Field(() => SortOrder, { nullable: true })
isRevoked?: keyof typeof SortOrder;
@Field(() => SortOrder, { nullable: true })
expiresAt?: keyof typeof SortOrder;
@Field(() => SortOrder, { nullable: true })
deletedAt?: keyof typeof SortOrder;
@Field(() => SortOrder, { nullable: true })
refreshToken?: keyof typeof SortOrder;
@Field(() => SortOrder, { nullable: true })
@HideField()
userId?: keyof typeof SortOrder;
}

View File

@ -3,8 +3,8 @@ import { InputType } from '@nestjs/graphql';
@InputType()
export class RefreshTokenCreateManyUserInput {
@Field(() => String, { nullable: false })
id!: string;
@Field(() => String, { nullable: true })
id?: string;
@Field(() => Date, { nullable: true })
createdAt?: Date | string;
@ -12,9 +12,12 @@ export class RefreshTokenCreateManyUserInput {
@Field(() => Date, { nullable: true })
updatedAt?: Date | string;
@Field(() => Boolean, { nullable: true })
isRevoked?: boolean;
@Field(() => Date, { nullable: false })
expiresAt!: Date | string;
@Field(() => Date, { nullable: true })
deletedAt?: Date | string;
@Field(() => String, { nullable: false })
refreshToken!: string;
}

View File

@ -1,10 +1,11 @@
import { Field } from '@nestjs/graphql';
import { InputType } from '@nestjs/graphql';
import { HideField } from '@nestjs/graphql';
@InputType()
export class RefreshTokenCreateManyInput {
@Field(() => String, { nullable: false })
id!: string;
@Field(() => String, { nullable: true })
id?: string;
@Field(() => Date, { nullable: true })
createdAt?: Date | string;
@ -12,12 +13,15 @@ export class RefreshTokenCreateManyInput {
@Field(() => Date, { nullable: true })
updatedAt?: Date | string;
@Field(() => Boolean, { nullable: true })
isRevoked?: boolean;
@Field(() => Date, { nullable: false })
expiresAt!: Date | string;
@Field(() => Date, { nullable: true })
deletedAt?: Date | string;
@Field(() => String, { nullable: false })
refreshToken!: string;
@Field(() => String, { nullable: false })
@HideField()
userId!: string;
}

View File

@ -3,8 +3,8 @@ import { InputType } from '@nestjs/graphql';
@InputType()
export class RefreshTokenCreateWithoutUserInput {
@Field(() => String, { nullable: false })
id!: string;
@Field(() => String, { nullable: true })
id?: string;
@Field(() => Date, { nullable: true })
createdAt?: Date | string;
@ -12,9 +12,12 @@ export class RefreshTokenCreateWithoutUserInput {
@Field(() => Date, { nullable: true })
updatedAt?: Date | string;
@Field(() => Boolean, { nullable: true })
isRevoked?: boolean;
@Field(() => Date, { nullable: false })
expiresAt!: Date | string;
@Field(() => Date, { nullable: true })
deletedAt?: Date | string;
@Field(() => String, { nullable: false })
refreshToken!: string;
}

View File

@ -1,11 +1,12 @@
import { Field } from '@nestjs/graphql';
import { InputType } from '@nestjs/graphql';
import { UserCreateNestedOneWithoutRefreshTokensInput } from '../user/user-create-nested-one-without-refresh-tokens.input';
import { HideField } from '@nestjs/graphql';
@InputType()
export class RefreshTokenCreateInput {
@Field(() => String, { nullable: false })
id!: string;
@Field(() => String, { nullable: true })
id?: string;
@Field(() => Date, { nullable: true })
createdAt?: Date | string;
@ -13,14 +14,15 @@ export class RefreshTokenCreateInput {
@Field(() => Date, { nullable: true })
updatedAt?: Date | string;
@Field(() => Boolean, { nullable: true })
isRevoked?: boolean;
@Field(() => Date, { nullable: false })
expiresAt!: Date | string;
@Field(() => Date, { nullable: true })
deletedAt?: Date | string;
@Field(() => String, { nullable: false })
refreshToken!: string;
@Field(() => UserCreateNestedOneWithoutRefreshTokensInput, {
nullable: false,
})
@HideField()
user!: UserCreateNestedOneWithoutRefreshTokensInput;
}

View File

@ -1,5 +1,6 @@
import { Field } from '@nestjs/graphql';
import { ObjectType } from '@nestjs/graphql';
import { HideField } from '@nestjs/graphql';
import { RefreshTokenCountAggregate } from './refresh-token-count-aggregate.output';
import { RefreshTokenMinAggregate } from './refresh-token-min-aggregate.output';
import { RefreshTokenMaxAggregate } from './refresh-token-max-aggregate.output';
@ -15,13 +16,16 @@ export class RefreshTokenGroupBy {
@Field(() => Date, { nullable: false })
updatedAt!: Date | string;
@Field(() => Boolean, { nullable: false })
isRevoked!: boolean;
@Field(() => Date, { nullable: false })
expiresAt!: Date | string;
@Field(() => Date, { nullable: true })
deletedAt?: Date | string;
@Field(() => String, { nullable: false })
refreshToken!: string;
@Field(() => String, { nullable: false })
@HideField()
userId!: string;
@Field(() => RefreshTokenCountAggregate, { nullable: true })

View File

@ -1,5 +1,6 @@
import { Field } from '@nestjs/graphql';
import { InputType } from '@nestjs/graphql';
import { HideField } from '@nestjs/graphql';
@InputType()
export class RefreshTokenMaxAggregateInput {
@ -12,12 +13,15 @@ export class RefreshTokenMaxAggregateInput {
@Field(() => Boolean, { nullable: true })
updatedAt?: true;
@Field(() => Boolean, { nullable: true })
isRevoked?: true;
@Field(() => Boolean, { nullable: true })
expiresAt?: true;
@Field(() => Boolean, { nullable: true })
deletedAt?: true;
@Field(() => Boolean, { nullable: true })
refreshToken?: true;
@Field(() => Boolean, { nullable: true })
@HideField()
userId?: true;
}

View File

@ -1,5 +1,6 @@
import { Field } from '@nestjs/graphql';
import { ObjectType } from '@nestjs/graphql';
import { HideField } from '@nestjs/graphql';
@ObjectType()
export class RefreshTokenMaxAggregate {
@ -12,12 +13,15 @@ export class RefreshTokenMaxAggregate {
@Field(() => Date, { nullable: true })
updatedAt?: Date | string;
@Field(() => Boolean, { nullable: true })
isRevoked?: boolean;
@Field(() => Date, { nullable: true })
expiresAt?: Date | string;
@Field(() => Date, { nullable: true })
deletedAt?: Date | string;
@Field(() => String, { nullable: true })
refreshToken?: string;
@Field(() => String, { nullable: true })
@HideField()
userId?: string;
}

View File

@ -1,6 +1,7 @@
import { Field } from '@nestjs/graphql';
import { InputType } from '@nestjs/graphql';
import { SortOrder } from '../prisma/sort-order.enum';
import { HideField } from '@nestjs/graphql';
@InputType()
export class RefreshTokenMaxOrderByAggregateInput {
@ -13,12 +14,15 @@ export class RefreshTokenMaxOrderByAggregateInput {
@Field(() => SortOrder, { nullable: true })
updatedAt?: keyof typeof SortOrder;
@Field(() => SortOrder, { nullable: true })
isRevoked?: keyof typeof SortOrder;
@Field(() => SortOrder, { nullable: true })
expiresAt?: keyof typeof SortOrder;
@Field(() => SortOrder, { nullable: true })
deletedAt?: keyof typeof SortOrder;
@Field(() => SortOrder, { nullable: true })
refreshToken?: keyof typeof SortOrder;
@Field(() => SortOrder, { nullable: true })
@HideField()
userId?: keyof typeof SortOrder;
}

View File

@ -1,5 +1,6 @@
import { Field } from '@nestjs/graphql';
import { InputType } from '@nestjs/graphql';
import { HideField } from '@nestjs/graphql';
@InputType()
export class RefreshTokenMinAggregateInput {
@ -12,12 +13,15 @@ export class RefreshTokenMinAggregateInput {
@Field(() => Boolean, { nullable: true })
updatedAt?: true;
@Field(() => Boolean, { nullable: true })
isRevoked?: true;
@Field(() => Boolean, { nullable: true })
expiresAt?: true;
@Field(() => Boolean, { nullable: true })
deletedAt?: true;
@Field(() => Boolean, { nullable: true })
refreshToken?: true;
@Field(() => Boolean, { nullable: true })
@HideField()
userId?: true;
}

View File

@ -1,5 +1,6 @@
import { Field } from '@nestjs/graphql';
import { ObjectType } from '@nestjs/graphql';
import { HideField } from '@nestjs/graphql';
@ObjectType()
export class RefreshTokenMinAggregate {
@ -12,12 +13,15 @@ export class RefreshTokenMinAggregate {
@Field(() => Date, { nullable: true })
updatedAt?: Date | string;
@Field(() => Boolean, { nullable: true })
isRevoked?: boolean;
@Field(() => Date, { nullable: true })
expiresAt?: Date | string;
@Field(() => Date, { nullable: true })
deletedAt?: Date | string;
@Field(() => String, { nullable: true })
refreshToken?: string;
@Field(() => String, { nullable: true })
@HideField()
userId?: string;
}

View File

@ -1,6 +1,7 @@
import { Field } from '@nestjs/graphql';
import { InputType } from '@nestjs/graphql';
import { SortOrder } from '../prisma/sort-order.enum';
import { HideField } from '@nestjs/graphql';
@InputType()
export class RefreshTokenMinOrderByAggregateInput {
@ -13,12 +14,15 @@ export class RefreshTokenMinOrderByAggregateInput {
@Field(() => SortOrder, { nullable: true })
updatedAt?: keyof typeof SortOrder;
@Field(() => SortOrder, { nullable: true })
isRevoked?: keyof typeof SortOrder;
@Field(() => SortOrder, { nullable: true })
expiresAt?: keyof typeof SortOrder;
@Field(() => SortOrder, { nullable: true })
deletedAt?: keyof typeof SortOrder;
@Field(() => SortOrder, { nullable: true })
refreshToken?: keyof typeof SortOrder;
@Field(() => SortOrder, { nullable: true })
@HideField()
userId?: keyof typeof SortOrder;
}

View File

@ -1,6 +1,7 @@
import { Field } from '@nestjs/graphql';
import { InputType } from '@nestjs/graphql';
import { SortOrder } from '../prisma/sort-order.enum';
import { HideField } from '@nestjs/graphql';
import { RefreshTokenCountOrderByAggregateInput } from './refresh-token-count-order-by-aggregate.input';
import { RefreshTokenMaxOrderByAggregateInput } from './refresh-token-max-order-by-aggregate.input';
import { RefreshTokenMinOrderByAggregateInput } from './refresh-token-min-order-by-aggregate.input';
@ -16,13 +17,16 @@ export class RefreshTokenOrderByWithAggregationInput {
@Field(() => SortOrder, { nullable: true })
updatedAt?: keyof typeof SortOrder;
@Field(() => SortOrder, { nullable: true })
isRevoked?: keyof typeof SortOrder;
@Field(() => SortOrder, { nullable: true })
expiresAt?: keyof typeof SortOrder;
@Field(() => SortOrder, { nullable: true })
deletedAt?: keyof typeof SortOrder;
@Field(() => SortOrder, { nullable: true })
refreshToken?: keyof typeof SortOrder;
@Field(() => SortOrder, { nullable: true })
@HideField()
userId?: keyof typeof SortOrder;
@Field(() => RefreshTokenCountOrderByAggregateInput, { nullable: true })

View File

@ -1,6 +1,7 @@
import { Field } from '@nestjs/graphql';
import { InputType } from '@nestjs/graphql';
import { SortOrder } from '../prisma/sort-order.enum';
import { HideField } from '@nestjs/graphql';
import { UserOrderByWithRelationInput } from '../user/user-order-by-with-relation.input';
@InputType()
@ -14,15 +15,18 @@ export class RefreshTokenOrderByWithRelationInput {
@Field(() => SortOrder, { nullable: true })
updatedAt?: keyof typeof SortOrder;
@Field(() => SortOrder, { nullable: true })
isRevoked?: keyof typeof SortOrder;
@Field(() => SortOrder, { nullable: true })
expiresAt?: keyof typeof SortOrder;
@Field(() => SortOrder, { nullable: true })
deletedAt?: keyof typeof SortOrder;
@Field(() => SortOrder, { nullable: true })
refreshToken?: keyof typeof SortOrder;
@Field(() => SortOrder, { nullable: true })
@HideField()
userId?: keyof typeof SortOrder;
@Field(() => UserOrderByWithRelationInput, { nullable: true })
@HideField()
user?: UserOrderByWithRelationInput;
}

View File

@ -4,8 +4,9 @@ export enum RefreshTokenScalarFieldEnum {
id = 'id',
createdAt = 'createdAt',
updatedAt = 'updatedAt',
isRevoked = 'isRevoked',
expiresAt = 'expiresAt',
deletedAt = 'deletedAt',
refreshToken = 'refreshToken',
userId = 'userId',
}

Some files were not shown because too many files have changed in this diff Show More