chore: refacto NestJS in modules (#308)

* chore: wip refacto in modules

* fix: rollback port

* fix: jwt guard in wrong folder

* chore: rename folder exception-filter in filters

* fix: tests are running

* fix: excessive stack depth comparing types

* fix: auth issue

* chore: move createUser in UserService

* fix: test

* fix: guards

* fix: jwt guard don't handle falsy user
This commit is contained in:
Jérémy M
2023-06-16 10:38:11 +02:00
committed by GitHub
parent 5921c7f11d
commit 2cd081234f
1084 changed files with 2251 additions and 758 deletions

View File

@ -0,0 +1,9 @@
import { Field } from '@nestjs/graphql';
import { ObjectType } from '@nestjs/graphql';
import { Int } from '@nestjs/graphql';
@ObjectType()
export class AffectedRows {
@Field(() => Int, { nullable: false })
count!: number;
}

View File

@ -0,0 +1,8 @@
import { Field } from '@nestjs/graphql';
import { InputType } from '@nestjs/graphql';
@InputType()
export class BoolFieldUpdateOperationsInput {
@Field(() => Boolean, { nullable: true })
set?: boolean;
}

View File

@ -0,0 +1,12 @@
import { Field } from '@nestjs/graphql';
import { InputType } from '@nestjs/graphql';
import { NestedBoolFilter } from './nested-bool-filter.input';
@InputType()
export class BoolFilter {
@Field(() => Boolean, { nullable: true })
equals?: boolean;
@Field(() => NestedBoolFilter, { nullable: true })
not?: NestedBoolFilter;
}

View File

@ -0,0 +1,23 @@
import { Field } from '@nestjs/graphql';
import { InputType } from '@nestjs/graphql';
import { NestedBoolWithAggregatesFilter } from './nested-bool-with-aggregates-filter.input';
import { NestedIntFilter } from './nested-int-filter.input';
import { NestedBoolFilter } from './nested-bool-filter.input';
@InputType()
export class BoolWithAggregatesFilter {
@Field(() => Boolean, { nullable: true })
equals?: boolean;
@Field(() => NestedBoolWithAggregatesFilter, { nullable: true })
not?: NestedBoolWithAggregatesFilter;
@Field(() => NestedIntFilter, { nullable: true })
_count?: NestedIntFilter;
@Field(() => NestedBoolFilter, { nullable: true })
_min?: NestedBoolFilter;
@Field(() => NestedBoolFilter, { nullable: true })
_max?: NestedBoolFilter;
}

View File

@ -0,0 +1,11 @@
import { registerEnumType } from '@nestjs/graphql';
export enum CommentableType {
Person = 'Person',
Company = 'Company',
}
registerEnumType(CommentableType, {
name: 'CommentableType',
description: undefined,
});

View File

@ -0,0 +1,8 @@
import { Field } from '@nestjs/graphql';
import { InputType } from '@nestjs/graphql';
@InputType()
export class DateTimeFieldUpdateOperationsInput {
@Field(() => Date, { nullable: true })
set?: Date | string;
}

View File

@ -0,0 +1,30 @@
import { Field } from '@nestjs/graphql';
import { InputType } from '@nestjs/graphql';
import { NestedDateTimeFilter } from './nested-date-time-filter.input';
@InputType()
export class DateTimeFilter {
@Field(() => Date, { nullable: true })
equals?: Date | string;
@Field(() => [Date], { nullable: true })
in?: Array<Date> | Array<string>;
@Field(() => [Date], { nullable: true })
notIn?: Array<Date> | Array<string>;
@Field(() => Date, { nullable: true })
lt?: Date | string;
@Field(() => Date, { nullable: true })
lte?: Date | string;
@Field(() => Date, { nullable: true })
gt?: Date | string;
@Field(() => Date, { nullable: true })
gte?: Date | string;
@Field(() => NestedDateTimeFilter, { nullable: true })
not?: NestedDateTimeFilter;
}

View File

@ -0,0 +1,30 @@
import { Field } from '@nestjs/graphql';
import { InputType } from '@nestjs/graphql';
import { NestedDateTimeNullableFilter } from './nested-date-time-nullable-filter.input';
@InputType()
export class DateTimeNullableFilter {
@Field(() => Date, { nullable: true })
equals?: Date | string;
@Field(() => [Date], { nullable: true })
in?: Array<Date> | Array<string>;
@Field(() => [Date], { nullable: true })
notIn?: Array<Date> | Array<string>;
@Field(() => Date, { nullable: true })
lt?: Date | string;
@Field(() => Date, { nullable: true })
lte?: Date | string;
@Field(() => Date, { nullable: true })
gt?: Date | string;
@Field(() => Date, { nullable: true })
gte?: Date | string;
@Field(() => NestedDateTimeNullableFilter, { nullable: true })
not?: NestedDateTimeNullableFilter;
}

View File

@ -0,0 +1,41 @@
import { Field } from '@nestjs/graphql';
import { InputType } from '@nestjs/graphql';
import { NestedDateTimeNullableWithAggregatesFilter } from './nested-date-time-nullable-with-aggregates-filter.input';
import { NestedIntNullableFilter } from './nested-int-nullable-filter.input';
import { NestedDateTimeNullableFilter } from './nested-date-time-nullable-filter.input';
@InputType()
export class DateTimeNullableWithAggregatesFilter {
@Field(() => Date, { nullable: true })
equals?: Date | string;
@Field(() => [Date], { nullable: true })
in?: Array<Date> | Array<string>;
@Field(() => [Date], { nullable: true })
notIn?: Array<Date> | Array<string>;
@Field(() => Date, { nullable: true })
lt?: Date | string;
@Field(() => Date, { nullable: true })
lte?: Date | string;
@Field(() => Date, { nullable: true })
gt?: Date | string;
@Field(() => Date, { nullable: true })
gte?: Date | string;
@Field(() => NestedDateTimeNullableWithAggregatesFilter, { nullable: true })
not?: NestedDateTimeNullableWithAggregatesFilter;
@Field(() => NestedIntNullableFilter, { nullable: true })
_count?: NestedIntNullableFilter;
@Field(() => NestedDateTimeNullableFilter, { nullable: true })
_min?: NestedDateTimeNullableFilter;
@Field(() => NestedDateTimeNullableFilter, { nullable: true })
_max?: NestedDateTimeNullableFilter;
}

View File

@ -0,0 +1,41 @@
import { Field } from '@nestjs/graphql';
import { InputType } from '@nestjs/graphql';
import { NestedDateTimeWithAggregatesFilter } from './nested-date-time-with-aggregates-filter.input';
import { NestedIntFilter } from './nested-int-filter.input';
import { NestedDateTimeFilter } from './nested-date-time-filter.input';
@InputType()
export class DateTimeWithAggregatesFilter {
@Field(() => Date, { nullable: true })
equals?: Date | string;
@Field(() => [Date], { nullable: true })
in?: Array<Date> | Array<string>;
@Field(() => [Date], { nullable: true })
notIn?: Array<Date> | Array<string>;
@Field(() => Date, { nullable: true })
lt?: Date | string;
@Field(() => Date, { nullable: true })
lte?: Date | string;
@Field(() => Date, { nullable: true })
gt?: Date | string;
@Field(() => Date, { nullable: true })
gte?: Date | string;
@Field(() => NestedDateTimeWithAggregatesFilter, { nullable: true })
not?: NestedDateTimeWithAggregatesFilter;
@Field(() => NestedIntFilter, { nullable: true })
_count?: NestedIntFilter;
@Field(() => NestedDateTimeFilter, { nullable: true })
_min?: NestedDateTimeFilter;
@Field(() => NestedDateTimeFilter, { nullable: true })
_max?: NestedDateTimeFilter;
}

View File

@ -0,0 +1,9 @@
import { Field } from '@nestjs/graphql';
import { InputType } from '@nestjs/graphql';
import { CommentableType } from './commentable-type.enum';
@InputType()
export class EnumCommentableTypeFieldUpdateOperationsInput {
@Field(() => CommentableType, { nullable: true })
set?: keyof typeof CommentableType;
}

View File

@ -0,0 +1,19 @@
import { Field } from '@nestjs/graphql';
import { InputType } from '@nestjs/graphql';
import { CommentableType } from './commentable-type.enum';
import { NestedEnumCommentableTypeFilter } from './nested-enum-commentable-type-filter.input';
@InputType()
export class EnumCommentableTypeFilter {
@Field(() => CommentableType, { nullable: true })
equals?: keyof typeof CommentableType;
@Field(() => [CommentableType], { nullable: true })
in?: Array<keyof typeof CommentableType>;
@Field(() => [CommentableType], { nullable: true })
notIn?: Array<keyof typeof CommentableType>;
@Field(() => NestedEnumCommentableTypeFilter, { nullable: true })
not?: NestedEnumCommentableTypeFilter;
}

View File

@ -0,0 +1,32 @@
import { Field } from '@nestjs/graphql';
import { InputType } from '@nestjs/graphql';
import { CommentableType } from './commentable-type.enum';
import { NestedEnumCommentableTypeWithAggregatesFilter } from './nested-enum-commentable-type-with-aggregates-filter.input';
import { NestedIntFilter } from './nested-int-filter.input';
import { NestedEnumCommentableTypeFilter } from './nested-enum-commentable-type-filter.input';
@InputType()
export class EnumCommentableTypeWithAggregatesFilter {
@Field(() => CommentableType, { nullable: true })
equals?: keyof typeof CommentableType;
@Field(() => [CommentableType], { nullable: true })
in?: Array<keyof typeof CommentableType>;
@Field(() => [CommentableType], { nullable: true })
notIn?: Array<keyof typeof CommentableType>;
@Field(() => NestedEnumCommentableTypeWithAggregatesFilter, {
nullable: true,
})
not?: NestedEnumCommentableTypeWithAggregatesFilter;
@Field(() => NestedIntFilter, { nullable: true })
_count?: NestedIntFilter;
@Field(() => NestedEnumCommentableTypeFilter, { nullable: true })
_min?: NestedEnumCommentableTypeFilter;
@Field(() => NestedEnumCommentableTypeFilter, { nullable: true })
_max?: NestedEnumCommentableTypeFilter;
}

View File

@ -0,0 +1,9 @@
import { Field } from '@nestjs/graphql';
import { InputType } from '@nestjs/graphql';
import { PipelineProgressableType } from './pipeline-progressable-type.enum';
@InputType()
export class EnumPipelineProgressableTypeFieldUpdateOperationsInput {
@Field(() => PipelineProgressableType, { nullable: true })
set?: keyof typeof PipelineProgressableType;
}

View File

@ -0,0 +1,19 @@
import { Field } from '@nestjs/graphql';
import { InputType } from '@nestjs/graphql';
import { PipelineProgressableType } from './pipeline-progressable-type.enum';
import { NestedEnumPipelineProgressableTypeFilter } from './nested-enum-pipeline-progressable-type-filter.input';
@InputType()
export class EnumPipelineProgressableTypeFilter {
@Field(() => PipelineProgressableType, { nullable: true })
equals?: keyof typeof PipelineProgressableType;
@Field(() => [PipelineProgressableType], { nullable: true })
in?: Array<keyof typeof PipelineProgressableType>;
@Field(() => [PipelineProgressableType], { nullable: true })
notIn?: Array<keyof typeof PipelineProgressableType>;
@Field(() => NestedEnumPipelineProgressableTypeFilter, { nullable: true })
not?: NestedEnumPipelineProgressableTypeFilter;
}

View File

@ -0,0 +1,32 @@
import { Field } from '@nestjs/graphql';
import { InputType } from '@nestjs/graphql';
import { PipelineProgressableType } from './pipeline-progressable-type.enum';
import { NestedEnumPipelineProgressableTypeWithAggregatesFilter } from './nested-enum-pipeline-progressable-type-with-aggregates-filter.input';
import { NestedIntFilter } from './nested-int-filter.input';
import { NestedEnumPipelineProgressableTypeFilter } from './nested-enum-pipeline-progressable-type-filter.input';
@InputType()
export class EnumPipelineProgressableTypeWithAggregatesFilter {
@Field(() => PipelineProgressableType, { nullable: true })
equals?: keyof typeof PipelineProgressableType;
@Field(() => [PipelineProgressableType], { nullable: true })
in?: Array<keyof typeof PipelineProgressableType>;
@Field(() => [PipelineProgressableType], { nullable: true })
notIn?: Array<keyof typeof PipelineProgressableType>;
@Field(() => NestedEnumPipelineProgressableTypeWithAggregatesFilter, {
nullable: true,
})
not?: NestedEnumPipelineProgressableTypeWithAggregatesFilter;
@Field(() => NestedIntFilter, { nullable: true })
_count?: NestedIntFilter;
@Field(() => NestedEnumPipelineProgressableTypeFilter, { nullable: true })
_min?: NestedEnumPipelineProgressableTypeFilter;
@Field(() => NestedEnumPipelineProgressableTypeFilter, { nullable: true })
_max?: NestedEnumPipelineProgressableTypeFilter;
}

View File

@ -0,0 +1,31 @@
import { Field } from '@nestjs/graphql';
import { InputType } from '@nestjs/graphql';
import { Int } from '@nestjs/graphql';
import { NestedIntNullableFilter } from './nested-int-nullable-filter.input';
@InputType()
export class IntNullableFilter {
@Field(() => Int, { nullable: true })
equals?: number;
@Field(() => [Int], { nullable: true })
in?: Array<number>;
@Field(() => [Int], { nullable: true })
notIn?: Array<number>;
@Field(() => Int, { nullable: true })
lt?: number;
@Field(() => Int, { nullable: true })
lte?: number;
@Field(() => Int, { nullable: true })
gt?: number;
@Field(() => Int, { nullable: true })
gte?: number;
@Field(() => NestedIntNullableFilter, { nullable: true })
not?: NestedIntNullableFilter;
}

View File

@ -0,0 +1,48 @@
import { Field } from '@nestjs/graphql';
import { InputType } from '@nestjs/graphql';
import { Int } from '@nestjs/graphql';
import { NestedIntNullableWithAggregatesFilter } from './nested-int-nullable-with-aggregates-filter.input';
import { NestedIntNullableFilter } from './nested-int-nullable-filter.input';
import { NestedFloatNullableFilter } from './nested-float-nullable-filter.input';
@InputType()
export class IntNullableWithAggregatesFilter {
@Field(() => Int, { nullable: true })
equals?: number;
@Field(() => [Int], { nullable: true })
in?: Array<number>;
@Field(() => [Int], { nullable: true })
notIn?: Array<number>;
@Field(() => Int, { nullable: true })
lt?: number;
@Field(() => Int, { nullable: true })
lte?: number;
@Field(() => Int, { nullable: true })
gt?: number;
@Field(() => Int, { nullable: true })
gte?: number;
@Field(() => NestedIntNullableWithAggregatesFilter, { nullable: true })
not?: NestedIntNullableWithAggregatesFilter;
@Field(() => NestedIntNullableFilter, { nullable: true })
_count?: NestedIntNullableFilter;
@Field(() => NestedFloatNullableFilter, { nullable: true })
_avg?: NestedFloatNullableFilter;
@Field(() => NestedIntNullableFilter, { nullable: true })
_sum?: NestedIntNullableFilter;
@Field(() => NestedIntNullableFilter, { nullable: true })
_min?: NestedIntNullableFilter;
@Field(() => NestedIntNullableFilter, { nullable: true })
_max?: NestedIntNullableFilter;
}

View File

@ -0,0 +1,12 @@
import { registerEnumType } from '@nestjs/graphql';
export enum JsonNullValueFilter {
DbNull = 'DbNull',
JsonNull = 'JsonNull',
AnyNull = 'AnyNull',
}
registerEnumType(JsonNullValueFilter, {
name: 'JsonNullValueFilter',
description: undefined,
});

View File

@ -0,0 +1,45 @@
import { Field } from '@nestjs/graphql';
import { InputType } from '@nestjs/graphql';
import { GraphQLJSON } from 'graphql-type-json';
@InputType()
export class JsonNullableFilter {
@Field(() => GraphQLJSON, { nullable: true })
equals?: any;
@Field(() => [String], { nullable: true })
path?: Array<string>;
@Field(() => String, { nullable: true })
string_contains?: string;
@Field(() => String, { nullable: true })
string_starts_with?: string;
@Field(() => String, { nullable: true })
string_ends_with?: string;
@Field(() => GraphQLJSON, { nullable: true })
array_contains?: any;
@Field(() => GraphQLJSON, { nullable: true })
array_starts_with?: any;
@Field(() => GraphQLJSON, { nullable: true })
array_ends_with?: any;
@Field(() => GraphQLJSON, { nullable: true })
lt?: any;
@Field(() => GraphQLJSON, { nullable: true })
lte?: any;
@Field(() => GraphQLJSON, { nullable: true })
gt?: any;
@Field(() => GraphQLJSON, { nullable: true })
gte?: any;
@Field(() => GraphQLJSON, { nullable: true })
not?: any;
}

View File

@ -0,0 +1,56 @@
import { Field } from '@nestjs/graphql';
import { InputType } from '@nestjs/graphql';
import { GraphQLJSON } from 'graphql-type-json';
import { NestedIntNullableFilter } from './nested-int-nullable-filter.input';
import { NestedJsonNullableFilter } from './nested-json-nullable-filter.input';
@InputType()
export class JsonNullableWithAggregatesFilter {
@Field(() => GraphQLJSON, { nullable: true })
equals?: any;
@Field(() => [String], { nullable: true })
path?: Array<string>;
@Field(() => String, { nullable: true })
string_contains?: string;
@Field(() => String, { nullable: true })
string_starts_with?: string;
@Field(() => String, { nullable: true })
string_ends_with?: string;
@Field(() => GraphQLJSON, { nullable: true })
array_contains?: any;
@Field(() => GraphQLJSON, { nullable: true })
array_starts_with?: any;
@Field(() => GraphQLJSON, { nullable: true })
array_ends_with?: any;
@Field(() => GraphQLJSON, { nullable: true })
lt?: any;
@Field(() => GraphQLJSON, { nullable: true })
lte?: any;
@Field(() => GraphQLJSON, { nullable: true })
gt?: any;
@Field(() => GraphQLJSON, { nullable: true })
gte?: any;
@Field(() => GraphQLJSON, { nullable: true })
not?: any;
@Field(() => NestedIntNullableFilter, { nullable: true })
_count?: NestedIntNullableFilter;
@Field(() => NestedJsonNullableFilter, { nullable: true })
_min?: NestedJsonNullableFilter;
@Field(() => NestedJsonNullableFilter, { nullable: true })
_max?: NestedJsonNullableFilter;
}

View File

@ -0,0 +1,11 @@
import { Field } from '@nestjs/graphql';
import { InputType } from '@nestjs/graphql';
@InputType()
export class NestedBoolFilter {
@Field(() => Boolean, { nullable: true })
equals?: boolean;
@Field(() => NestedBoolFilter, { nullable: true })
not?: NestedBoolFilter;
}

View File

@ -0,0 +1,22 @@
import { Field } from '@nestjs/graphql';
import { InputType } from '@nestjs/graphql';
import { NestedIntFilter } from './nested-int-filter.input';
import { NestedBoolFilter } from './nested-bool-filter.input';
@InputType()
export class NestedBoolWithAggregatesFilter {
@Field(() => Boolean, { nullable: true })
equals?: boolean;
@Field(() => NestedBoolWithAggregatesFilter, { nullable: true })
not?: NestedBoolWithAggregatesFilter;
@Field(() => NestedIntFilter, { nullable: true })
_count?: NestedIntFilter;
@Field(() => NestedBoolFilter, { nullable: true })
_min?: NestedBoolFilter;
@Field(() => NestedBoolFilter, { nullable: true })
_max?: NestedBoolFilter;
}

View File

@ -0,0 +1,29 @@
import { Field } from '@nestjs/graphql';
import { InputType } from '@nestjs/graphql';
@InputType()
export class NestedDateTimeFilter {
@Field(() => Date, { nullable: true })
equals?: Date | string;
@Field(() => [Date], { nullable: true })
in?: Array<Date> | Array<string>;
@Field(() => [Date], { nullable: true })
notIn?: Array<Date> | Array<string>;
@Field(() => Date, { nullable: true })
lt?: Date | string;
@Field(() => Date, { nullable: true })
lte?: Date | string;
@Field(() => Date, { nullable: true })
gt?: Date | string;
@Field(() => Date, { nullable: true })
gte?: Date | string;
@Field(() => NestedDateTimeFilter, { nullable: true })
not?: NestedDateTimeFilter;
}

View File

@ -0,0 +1,29 @@
import { Field } from '@nestjs/graphql';
import { InputType } from '@nestjs/graphql';
@InputType()
export class NestedDateTimeNullableFilter {
@Field(() => Date, { nullable: true })
equals?: Date | string;
@Field(() => [Date], { nullable: true })
in?: Array<Date> | Array<string>;
@Field(() => [Date], { nullable: true })
notIn?: Array<Date> | Array<string>;
@Field(() => Date, { nullable: true })
lt?: Date | string;
@Field(() => Date, { nullable: true })
lte?: Date | string;
@Field(() => Date, { nullable: true })
gt?: Date | string;
@Field(() => Date, { nullable: true })
gte?: Date | string;
@Field(() => NestedDateTimeNullableFilter, { nullable: true })
not?: NestedDateTimeNullableFilter;
}

View File

@ -0,0 +1,40 @@
import { Field } from '@nestjs/graphql';
import { InputType } from '@nestjs/graphql';
import { NestedIntNullableFilter } from './nested-int-nullable-filter.input';
import { NestedDateTimeNullableFilter } from './nested-date-time-nullable-filter.input';
@InputType()
export class NestedDateTimeNullableWithAggregatesFilter {
@Field(() => Date, { nullable: true })
equals?: Date | string;
@Field(() => [Date], { nullable: true })
in?: Array<Date> | Array<string>;
@Field(() => [Date], { nullable: true })
notIn?: Array<Date> | Array<string>;
@Field(() => Date, { nullable: true })
lt?: Date | string;
@Field(() => Date, { nullable: true })
lte?: Date | string;
@Field(() => Date, { nullable: true })
gt?: Date | string;
@Field(() => Date, { nullable: true })
gte?: Date | string;
@Field(() => NestedDateTimeNullableWithAggregatesFilter, { nullable: true })
not?: NestedDateTimeNullableWithAggregatesFilter;
@Field(() => NestedIntNullableFilter, { nullable: true })
_count?: NestedIntNullableFilter;
@Field(() => NestedDateTimeNullableFilter, { nullable: true })
_min?: NestedDateTimeNullableFilter;
@Field(() => NestedDateTimeNullableFilter, { nullable: true })
_max?: NestedDateTimeNullableFilter;
}

View File

@ -0,0 +1,40 @@
import { Field } from '@nestjs/graphql';
import { InputType } from '@nestjs/graphql';
import { NestedIntFilter } from './nested-int-filter.input';
import { NestedDateTimeFilter } from './nested-date-time-filter.input';
@InputType()
export class NestedDateTimeWithAggregatesFilter {
@Field(() => Date, { nullable: true })
equals?: Date | string;
@Field(() => [Date], { nullable: true })
in?: Array<Date> | Array<string>;
@Field(() => [Date], { nullable: true })
notIn?: Array<Date> | Array<string>;
@Field(() => Date, { nullable: true })
lt?: Date | string;
@Field(() => Date, { nullable: true })
lte?: Date | string;
@Field(() => Date, { nullable: true })
gt?: Date | string;
@Field(() => Date, { nullable: true })
gte?: Date | string;
@Field(() => NestedDateTimeWithAggregatesFilter, { nullable: true })
not?: NestedDateTimeWithAggregatesFilter;
@Field(() => NestedIntFilter, { nullable: true })
_count?: NestedIntFilter;
@Field(() => NestedDateTimeFilter, { nullable: true })
_min?: NestedDateTimeFilter;
@Field(() => NestedDateTimeFilter, { nullable: true })
_max?: NestedDateTimeFilter;
}

View File

@ -0,0 +1,18 @@
import { Field } from '@nestjs/graphql';
import { InputType } from '@nestjs/graphql';
import { CommentableType } from './commentable-type.enum';
@InputType()
export class NestedEnumCommentableTypeFilter {
@Field(() => CommentableType, { nullable: true })
equals?: keyof typeof CommentableType;
@Field(() => [CommentableType], { nullable: true })
in?: Array<keyof typeof CommentableType>;
@Field(() => [CommentableType], { nullable: true })
notIn?: Array<keyof typeof CommentableType>;
@Field(() => NestedEnumCommentableTypeFilter, { nullable: true })
not?: NestedEnumCommentableTypeFilter;
}

View File

@ -0,0 +1,31 @@
import { Field } from '@nestjs/graphql';
import { InputType } from '@nestjs/graphql';
import { CommentableType } from './commentable-type.enum';
import { NestedIntFilter } from './nested-int-filter.input';
import { NestedEnumCommentableTypeFilter } from './nested-enum-commentable-type-filter.input';
@InputType()
export class NestedEnumCommentableTypeWithAggregatesFilter {
@Field(() => CommentableType, { nullable: true })
equals?: keyof typeof CommentableType;
@Field(() => [CommentableType], { nullable: true })
in?: Array<keyof typeof CommentableType>;
@Field(() => [CommentableType], { nullable: true })
notIn?: Array<keyof typeof CommentableType>;
@Field(() => NestedEnumCommentableTypeWithAggregatesFilter, {
nullable: true,
})
not?: NestedEnumCommentableTypeWithAggregatesFilter;
@Field(() => NestedIntFilter, { nullable: true })
_count?: NestedIntFilter;
@Field(() => NestedEnumCommentableTypeFilter, { nullable: true })
_min?: NestedEnumCommentableTypeFilter;
@Field(() => NestedEnumCommentableTypeFilter, { nullable: true })
_max?: NestedEnumCommentableTypeFilter;
}

View File

@ -0,0 +1,18 @@
import { Field } from '@nestjs/graphql';
import { InputType } from '@nestjs/graphql';
import { PipelineProgressableType } from './pipeline-progressable-type.enum';
@InputType()
export class NestedEnumPipelineProgressableTypeFilter {
@Field(() => PipelineProgressableType, { nullable: true })
equals?: keyof typeof PipelineProgressableType;
@Field(() => [PipelineProgressableType], { nullable: true })
in?: Array<keyof typeof PipelineProgressableType>;
@Field(() => [PipelineProgressableType], { nullable: true })
notIn?: Array<keyof typeof PipelineProgressableType>;
@Field(() => NestedEnumPipelineProgressableTypeFilter, { nullable: true })
not?: NestedEnumPipelineProgressableTypeFilter;
}

View File

@ -0,0 +1,31 @@
import { Field } from '@nestjs/graphql';
import { InputType } from '@nestjs/graphql';
import { PipelineProgressableType } from './pipeline-progressable-type.enum';
import { NestedIntFilter } from './nested-int-filter.input';
import { NestedEnumPipelineProgressableTypeFilter } from './nested-enum-pipeline-progressable-type-filter.input';
@InputType()
export class NestedEnumPipelineProgressableTypeWithAggregatesFilter {
@Field(() => PipelineProgressableType, { nullable: true })
equals?: keyof typeof PipelineProgressableType;
@Field(() => [PipelineProgressableType], { nullable: true })
in?: Array<keyof typeof PipelineProgressableType>;
@Field(() => [PipelineProgressableType], { nullable: true })
notIn?: Array<keyof typeof PipelineProgressableType>;
@Field(() => NestedEnumPipelineProgressableTypeWithAggregatesFilter, {
nullable: true,
})
not?: NestedEnumPipelineProgressableTypeWithAggregatesFilter;
@Field(() => NestedIntFilter, { nullable: true })
_count?: NestedIntFilter;
@Field(() => NestedEnumPipelineProgressableTypeFilter, { nullable: true })
_min?: NestedEnumPipelineProgressableTypeFilter;
@Field(() => NestedEnumPipelineProgressableTypeFilter, { nullable: true })
_max?: NestedEnumPipelineProgressableTypeFilter;
}

View File

@ -0,0 +1,30 @@
import { Field } from '@nestjs/graphql';
import { InputType } from '@nestjs/graphql';
import { Float } from '@nestjs/graphql';
@InputType()
export class NestedFloatNullableFilter {
@Field(() => Float, { nullable: true })
equals?: number;
@Field(() => [Float], { nullable: true })
in?: Array<number>;
@Field(() => [Float], { nullable: true })
notIn?: Array<number>;
@Field(() => Float, { nullable: true })
lt?: number;
@Field(() => Float, { nullable: true })
lte?: number;
@Field(() => Float, { nullable: true })
gt?: number;
@Field(() => Float, { nullable: true })
gte?: number;
@Field(() => NestedFloatNullableFilter, { nullable: true })
not?: NestedFloatNullableFilter;
}

View File

@ -0,0 +1,30 @@
import { Field } from '@nestjs/graphql';
import { InputType } from '@nestjs/graphql';
import { Int } from '@nestjs/graphql';
@InputType()
export class NestedIntFilter {
@Field(() => Int, { nullable: true })
equals?: number;
@Field(() => [Int], { nullable: true })
in?: Array<number>;
@Field(() => [Int], { nullable: true })
notIn?: Array<number>;
@Field(() => Int, { nullable: true })
lt?: number;
@Field(() => Int, { nullable: true })
lte?: number;
@Field(() => Int, { nullable: true })
gt?: number;
@Field(() => Int, { nullable: true })
gte?: number;
@Field(() => NestedIntFilter, { nullable: true })
not?: NestedIntFilter;
}

View File

@ -0,0 +1,30 @@
import { Field } from '@nestjs/graphql';
import { InputType } from '@nestjs/graphql';
import { Int } from '@nestjs/graphql';
@InputType()
export class NestedIntNullableFilter {
@Field(() => Int, { nullable: true })
equals?: number;
@Field(() => [Int], { nullable: true })
in?: Array<number>;
@Field(() => [Int], { nullable: true })
notIn?: Array<number>;
@Field(() => Int, { nullable: true })
lt?: number;
@Field(() => Int, { nullable: true })
lte?: number;
@Field(() => Int, { nullable: true })
gt?: number;
@Field(() => Int, { nullable: true })
gte?: number;
@Field(() => NestedIntNullableFilter, { nullable: true })
not?: NestedIntNullableFilter;
}

View File

@ -0,0 +1,47 @@
import { Field } from '@nestjs/graphql';
import { InputType } from '@nestjs/graphql';
import { Int } from '@nestjs/graphql';
import { NestedIntNullableFilter } from './nested-int-nullable-filter.input';
import { NestedFloatNullableFilter } from './nested-float-nullable-filter.input';
@InputType()
export class NestedIntNullableWithAggregatesFilter {
@Field(() => Int, { nullable: true })
equals?: number;
@Field(() => [Int], { nullable: true })
in?: Array<number>;
@Field(() => [Int], { nullable: true })
notIn?: Array<number>;
@Field(() => Int, { nullable: true })
lt?: number;
@Field(() => Int, { nullable: true })
lte?: number;
@Field(() => Int, { nullable: true })
gt?: number;
@Field(() => Int, { nullable: true })
gte?: number;
@Field(() => NestedIntNullableWithAggregatesFilter, { nullable: true })
not?: NestedIntNullableWithAggregatesFilter;
@Field(() => NestedIntNullableFilter, { nullable: true })
_count?: NestedIntNullableFilter;
@Field(() => NestedFloatNullableFilter, { nullable: true })
_avg?: NestedFloatNullableFilter;
@Field(() => NestedIntNullableFilter, { nullable: true })
_sum?: NestedIntNullableFilter;
@Field(() => NestedIntNullableFilter, { nullable: true })
_min?: NestedIntNullableFilter;
@Field(() => NestedIntNullableFilter, { nullable: true })
_max?: NestedIntNullableFilter;
}

View File

@ -0,0 +1,45 @@
import { Field } from '@nestjs/graphql';
import { InputType } from '@nestjs/graphql';
import { GraphQLJSON } from 'graphql-type-json';
@InputType()
export class NestedJsonNullableFilter {
@Field(() => GraphQLJSON, { nullable: true })
equals?: any;
@Field(() => [String], { nullable: true })
path?: Array<string>;
@Field(() => String, { nullable: true })
string_contains?: string;
@Field(() => String, { nullable: true })
string_starts_with?: string;
@Field(() => String, { nullable: true })
string_ends_with?: string;
@Field(() => GraphQLJSON, { nullable: true })
array_contains?: any;
@Field(() => GraphQLJSON, { nullable: true })
array_starts_with?: any;
@Field(() => GraphQLJSON, { nullable: true })
array_ends_with?: any;
@Field(() => GraphQLJSON, { nullable: true })
lt?: any;
@Field(() => GraphQLJSON, { nullable: true })
lte?: any;
@Field(() => GraphQLJSON, { nullable: true })
gt?: any;
@Field(() => GraphQLJSON, { nullable: true })
gte?: any;
@Field(() => GraphQLJSON, { nullable: true })
not?: any;
}

View File

@ -0,0 +1,38 @@
import { Field } from '@nestjs/graphql';
import { InputType } from '@nestjs/graphql';
@InputType()
export class NestedStringFilter {
@Field(() => String, { nullable: true })
equals?: string;
@Field(() => [String], { nullable: true })
in?: Array<string>;
@Field(() => [String], { nullable: true })
notIn?: Array<string>;
@Field(() => String, { nullable: true })
lt?: string;
@Field(() => String, { nullable: true })
lte?: string;
@Field(() => String, { nullable: true })
gt?: string;
@Field(() => String, { nullable: true })
gte?: string;
@Field(() => String, { nullable: true })
contains?: string;
@Field(() => String, { nullable: true })
startsWith?: string;
@Field(() => String, { nullable: true })
endsWith?: string;
@Field(() => NestedStringFilter, { nullable: true })
not?: NestedStringFilter;
}

View File

@ -0,0 +1,38 @@
import { Field } from '@nestjs/graphql';
import { InputType } from '@nestjs/graphql';
@InputType()
export class NestedStringNullableFilter {
@Field(() => String, { nullable: true })
equals?: string;
@Field(() => [String], { nullable: true })
in?: Array<string>;
@Field(() => [String], { nullable: true })
notIn?: Array<string>;
@Field(() => String, { nullable: true })
lt?: string;
@Field(() => String, { nullable: true })
lte?: string;
@Field(() => String, { nullable: true })
gt?: string;
@Field(() => String, { nullable: true })
gte?: string;
@Field(() => String, { nullable: true })
contains?: string;
@Field(() => String, { nullable: true })
startsWith?: string;
@Field(() => String, { nullable: true })
endsWith?: string;
@Field(() => NestedStringNullableFilter, { nullable: true })
not?: NestedStringNullableFilter;
}

View File

@ -0,0 +1,49 @@
import { Field } from '@nestjs/graphql';
import { InputType } from '@nestjs/graphql';
import { NestedIntNullableFilter } from './nested-int-nullable-filter.input';
import { NestedStringNullableFilter } from './nested-string-nullable-filter.input';
@InputType()
export class NestedStringNullableWithAggregatesFilter {
@Field(() => String, { nullable: true })
equals?: string;
@Field(() => [String], { nullable: true })
in?: Array<string>;
@Field(() => [String], { nullable: true })
notIn?: Array<string>;
@Field(() => String, { nullable: true })
lt?: string;
@Field(() => String, { nullable: true })
lte?: string;
@Field(() => String, { nullable: true })
gt?: string;
@Field(() => String, { nullable: true })
gte?: string;
@Field(() => String, { nullable: true })
contains?: string;
@Field(() => String, { nullable: true })
startsWith?: string;
@Field(() => String, { nullable: true })
endsWith?: string;
@Field(() => NestedStringNullableWithAggregatesFilter, { nullable: true })
not?: NestedStringNullableWithAggregatesFilter;
@Field(() => NestedIntNullableFilter, { nullable: true })
_count?: NestedIntNullableFilter;
@Field(() => NestedStringNullableFilter, { nullable: true })
_min?: NestedStringNullableFilter;
@Field(() => NestedStringNullableFilter, { nullable: true })
_max?: NestedStringNullableFilter;
}

View File

@ -0,0 +1,49 @@
import { Field } from '@nestjs/graphql';
import { InputType } from '@nestjs/graphql';
import { NestedIntFilter } from './nested-int-filter.input';
import { NestedStringFilter } from './nested-string-filter.input';
@InputType()
export class NestedStringWithAggregatesFilter {
@Field(() => String, { nullable: true })
equals?: string;
@Field(() => [String], { nullable: true })
in?: Array<string>;
@Field(() => [String], { nullable: true })
notIn?: Array<string>;
@Field(() => String, { nullable: true })
lt?: string;
@Field(() => String, { nullable: true })
lte?: string;
@Field(() => String, { nullable: true })
gt?: string;
@Field(() => String, { nullable: true })
gte?: string;
@Field(() => String, { nullable: true })
contains?: string;
@Field(() => String, { nullable: true })
startsWith?: string;
@Field(() => String, { nullable: true })
endsWith?: string;
@Field(() => NestedStringWithAggregatesFilter, { nullable: true })
not?: NestedStringWithAggregatesFilter;
@Field(() => NestedIntFilter, { nullable: true })
_count?: NestedIntFilter;
@Field(() => NestedStringFilter, { nullable: true })
_min?: NestedStringFilter;
@Field(() => NestedStringFilter, { nullable: true })
_max?: NestedStringFilter;
}

View File

@ -0,0 +1,8 @@
import { Field } from '@nestjs/graphql';
import { InputType } from '@nestjs/graphql';
@InputType()
export class NullableDateTimeFieldUpdateOperationsInput {
@Field(() => Date, { nullable: true })
set?: Date | string;
}

View File

@ -0,0 +1,21 @@
import { Field } from '@nestjs/graphql';
import { InputType } from '@nestjs/graphql';
import { Int } from '@nestjs/graphql';
@InputType()
export class NullableIntFieldUpdateOperationsInput {
@Field(() => Int, { nullable: true })
set?: number;
@Field(() => Int, { nullable: true })
increment?: number;
@Field(() => Int, { nullable: true })
decrement?: number;
@Field(() => Int, { nullable: true })
multiply?: number;
@Field(() => Int, { nullable: true })
divide?: number;
}

View File

@ -0,0 +1,11 @@
import { registerEnumType } from '@nestjs/graphql';
export enum NullableJsonNullValueInput {
DbNull = 'DbNull',
JsonNull = 'JsonNull',
}
registerEnumType(NullableJsonNullValueInput, {
name: 'NullableJsonNullValueInput',
description: undefined,
});

View File

@ -0,0 +1,8 @@
import { Field } from '@nestjs/graphql';
import { InputType } from '@nestjs/graphql';
@InputType()
export class NullableStringFieldUpdateOperationsInput {
@Field(() => String, { nullable: true })
set?: string;
}

View File

@ -0,0 +1,11 @@
import { registerEnumType } from '@nestjs/graphql';
export enum PipelineProgressableType {
Person = 'Person',
Company = 'Company',
}
registerEnumType(PipelineProgressableType, {
name: 'PipelineProgressableType',
description: undefined,
});

View File

@ -0,0 +1,8 @@
import { registerEnumType } from '@nestjs/graphql';
export enum QueryMode {
'default' = 'default',
insensitive = 'insensitive',
}
registerEnumType(QueryMode, { name: 'QueryMode', description: undefined });

View File

@ -0,0 +1,8 @@
import { registerEnumType } from '@nestjs/graphql';
export enum SortOrder {
asc = 'asc',
desc = 'desc',
}
registerEnumType(SortOrder, { name: 'SortOrder', description: undefined });

View File

@ -0,0 +1,8 @@
import { Field } from '@nestjs/graphql';
import { InputType } from '@nestjs/graphql';
@InputType()
export class StringFieldUpdateOperationsInput {
@Field(() => String, { nullable: true })
set?: string;
}

View File

@ -0,0 +1,43 @@
import { Field } from '@nestjs/graphql';
import { InputType } from '@nestjs/graphql';
import { QueryMode } from './query-mode.enum';
import { NestedStringFilter } from './nested-string-filter.input';
@InputType()
export class StringFilter {
@Field(() => String, { nullable: true })
equals?: string;
@Field(() => [String], { nullable: true })
in?: Array<string>;
@Field(() => [String], { nullable: true })
notIn?: Array<string>;
@Field(() => String, { nullable: true })
lt?: string;
@Field(() => String, { nullable: true })
lte?: string;
@Field(() => String, { nullable: true })
gt?: string;
@Field(() => String, { nullable: true })
gte?: string;
@Field(() => String, { nullable: true })
contains?: string;
@Field(() => String, { nullable: true })
startsWith?: string;
@Field(() => String, { nullable: true })
endsWith?: string;
@Field(() => QueryMode, { nullable: true })
mode?: keyof typeof QueryMode;
@Field(() => NestedStringFilter, { nullable: true })
not?: NestedStringFilter;
}

View File

@ -0,0 +1,43 @@
import { Field } from '@nestjs/graphql';
import { InputType } from '@nestjs/graphql';
import { QueryMode } from './query-mode.enum';
import { NestedStringNullableFilter } from './nested-string-nullable-filter.input';
@InputType()
export class StringNullableFilter {
@Field(() => String, { nullable: true })
equals?: string;
@Field(() => [String], { nullable: true })
in?: Array<string>;
@Field(() => [String], { nullable: true })
notIn?: Array<string>;
@Field(() => String, { nullable: true })
lt?: string;
@Field(() => String, { nullable: true })
lte?: string;
@Field(() => String, { nullable: true })
gt?: string;
@Field(() => String, { nullable: true })
gte?: string;
@Field(() => String, { nullable: true })
contains?: string;
@Field(() => String, { nullable: true })
startsWith?: string;
@Field(() => String, { nullable: true })
endsWith?: string;
@Field(() => QueryMode, { nullable: true })
mode?: keyof typeof QueryMode;
@Field(() => NestedStringNullableFilter, { nullable: true })
not?: NestedStringNullableFilter;
}

View File

@ -0,0 +1,54 @@
import { Field } from '@nestjs/graphql';
import { InputType } from '@nestjs/graphql';
import { QueryMode } from './query-mode.enum';
import { NestedStringNullableWithAggregatesFilter } from './nested-string-nullable-with-aggregates-filter.input';
import { NestedIntNullableFilter } from './nested-int-nullable-filter.input';
import { NestedStringNullableFilter } from './nested-string-nullable-filter.input';
@InputType()
export class StringNullableWithAggregatesFilter {
@Field(() => String, { nullable: true })
equals?: string;
@Field(() => [String], { nullable: true })
in?: Array<string>;
@Field(() => [String], { nullable: true })
notIn?: Array<string>;
@Field(() => String, { nullable: true })
lt?: string;
@Field(() => String, { nullable: true })
lte?: string;
@Field(() => String, { nullable: true })
gt?: string;
@Field(() => String, { nullable: true })
gte?: string;
@Field(() => String, { nullable: true })
contains?: string;
@Field(() => String, { nullable: true })
startsWith?: string;
@Field(() => String, { nullable: true })
endsWith?: string;
@Field(() => QueryMode, { nullable: true })
mode?: keyof typeof QueryMode;
@Field(() => NestedStringNullableWithAggregatesFilter, { nullable: true })
not?: NestedStringNullableWithAggregatesFilter;
@Field(() => NestedIntNullableFilter, { nullable: true })
_count?: NestedIntNullableFilter;
@Field(() => NestedStringNullableFilter, { nullable: true })
_min?: NestedStringNullableFilter;
@Field(() => NestedStringNullableFilter, { nullable: true })
_max?: NestedStringNullableFilter;
}

View File

@ -0,0 +1,54 @@
import { Field } from '@nestjs/graphql';
import { InputType } from '@nestjs/graphql';
import { QueryMode } from './query-mode.enum';
import { NestedStringWithAggregatesFilter } from './nested-string-with-aggregates-filter.input';
import { NestedIntFilter } from './nested-int-filter.input';
import { NestedStringFilter } from './nested-string-filter.input';
@InputType()
export class StringWithAggregatesFilter {
@Field(() => String, { nullable: true })
equals?: string;
@Field(() => [String], { nullable: true })
in?: Array<string>;
@Field(() => [String], { nullable: true })
notIn?: Array<string>;
@Field(() => String, { nullable: true })
lt?: string;
@Field(() => String, { nullable: true })
lte?: string;
@Field(() => String, { nullable: true })
gt?: string;
@Field(() => String, { nullable: true })
gte?: string;
@Field(() => String, { nullable: true })
contains?: string;
@Field(() => String, { nullable: true })
startsWith?: string;
@Field(() => String, { nullable: true })
endsWith?: string;
@Field(() => QueryMode, { nullable: true })
mode?: keyof typeof QueryMode;
@Field(() => NestedStringWithAggregatesFilter, { nullable: true })
not?: NestedStringWithAggregatesFilter;
@Field(() => NestedIntFilter, { nullable: true })
_count?: NestedIntFilter;
@Field(() => NestedStringFilter, { nullable: true })
_min?: NestedStringFilter;
@Field(() => NestedStringFilter, { nullable: true })
_max?: NestedStringFilter;
}

View File

@ -0,0 +1,13 @@
import { registerEnumType } from '@nestjs/graphql';
export enum TransactionIsolationLevel {
ReadUncommitted = 'ReadUncommitted',
ReadCommitted = 'ReadCommitted',
RepeatableRead = 'RepeatableRead',
Serializable = 'Serializable',
}
registerEnumType(TransactionIsolationLevel, {
name: 'TransactionIsolationLevel',
description: undefined,
});