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

@ -10,7 +10,7 @@ import { onError } from '@apollo/client/link/error';
import { RestLink } from 'apollo-link-rest'; import { RestLink } from 'apollo-link-rest';
import { CommentThreadTarget } from './generated/graphql'; import { CommentThreadTarget } from './generated/graphql';
import { refreshAccessToken } from './modules/auth/services/AuthService'; import { getTokensFromRefreshToken } from './modules/auth/services/AuthService';
const apiLink = createHttpLink({ const apiLink = createHttpLink({
uri: `${process.env.REACT_APP_API_URL}`, uri: `${process.env.REACT_APP_API_URL}`,
@ -34,7 +34,7 @@ const errorLink = onError(({ graphQLErrors, operation, forward }) => {
return new Observable((observer) => { return new Observable((observer) => {
(async () => { (async () => {
try { try {
await refreshAccessToken(); await getTokensFromRefreshToken();
const oldHeaders = operation.getContext().headers; const oldHeaders = operation.getContext().headers;

View File

@ -13,7 +13,7 @@ export const getUserIdFromToken: () => string | null = () => {
} }
try { try {
return jwt<{ userId: string }>(accessToken).userId; return jwt<{ sub: string }>(accessToken).sub;
} catch (error) { } catch (error) {
return null; return null;
} }
@ -25,10 +25,41 @@ export const hasRefreshToken = () => {
return refreshToken ? true : false; return refreshToken ? true : false;
}; };
export const refreshAccessToken = async () => { export const getTokensFromLoginToken = async (loginToken: string) => {
if (!loginToken) {
return;
}
const response = await fetch(
process.env.REACT_APP_AUTH_URL + '/verify' || '',
{
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({ loginToken }),
},
);
if (response.ok) {
const { tokens } = await response.json();
if (!tokens) {
return;
}
localStorage.setItem('accessToken', tokens.accessToken.token);
localStorage.setItem('refreshToken', tokens.refreshToken.token);
} else {
localStorage.removeItem('refreshToken');
localStorage.removeItem('accessToken');
}
};
export const getTokensFromRefreshToken = async () => {
const refreshToken = localStorage.getItem('refreshToken'); const refreshToken = localStorage.getItem('refreshToken');
if (!refreshToken) { if (!refreshToken) {
localStorage.removeItem('accessToken'); localStorage.removeItem('accessToken');
return;
} }
const response = await fetch( const response = await fetch(
@ -43,8 +74,13 @@ export const refreshAccessToken = async () => {
); );
if (response.ok) { if (response.ok) {
const { accessToken } = await response.json(); const { tokens } = await response.json();
localStorage.setItem('accessToken', accessToken);
if (!tokens) {
return;
}
localStorage.setItem('accessToken', tokens.accessToken.token);
localStorage.setItem('refreshToken', tokens.refreshToken.token);
} else { } else {
localStorage.removeItem('refreshToken'); localStorage.removeItem('refreshToken');
localStorage.removeItem('accessToken'); localStorage.removeItem('accessToken');

View File

@ -1,29 +1,62 @@
import { waitFor } from '@testing-library/react'; import { waitFor } from '@testing-library/react';
import { import {
getTokensFromLoginToken,
getTokensFromRefreshToken,
getUserIdFromToken, getUserIdFromToken,
hasAccessToken, hasAccessToken,
hasRefreshToken, hasRefreshToken,
refreshAccessToken,
} from '../AuthService'; } from '../AuthService';
const validTokensPayload = {
accessToken: {
token:
'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIzNzRmZTNhNS1kZjFlLTQxMTktYWZlMC0yYTYyYTJiYTQ4MWUiLCJ3b3Jrc3BhY2VJZCI6InR3ZW50eS03ZWQ5ZDIxMi0xYzI1LTRkMDItYmYyNS02YWVjY2Y3ZWE0MTkiLCJpYXQiOjE2ODY5OTMxODIsImV4cCI6MTY4Njk5MzQ4Mn0.F_FD6nJ5fssR_47v2XFhtzqjr-wrEQpqaWVq8iIlLJw',
expiresAt: '2023-06-17T09:18:02.942Z',
},
refreshToken: {
token:
'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIzNzRmZTNhNS1kZjFlLTQxMTktYWZlMC0yYTYyYTJiYTQ4MWUiLCJpYXQiOjE2ODY5OTMxODIsImV4cCI6OTQ2Mjk5MzE4MiwianRpIjoiNzBmMWNhMjctOTYxYi00ZGZlLWEwOTUtMTY2OWEwOGViMTVjIn0.xEdX9dOGzrPHrPsivQYB9ipYGJH-mJ7GSIVPacmIzfY',
expiresAt: '2023-09-15T09:13:02.952Z',
},
};
const mockFetch = async ( const mockFetch = async (
input: RequestInfo | URL, input: RequestInfo | URL,
init?: RequestInit, init?: RequestInit,
): Promise<Response> => { ): Promise<Response> => {
const refreshToken = init?.body if (input.toString().match(/\/auth\/token$/g)) {
? JSON.parse(init.body.toString()).refreshToken const refreshToken = init?.body
: null; ? JSON.parse(init.body.toString()).refreshToken
return new Promise((resolve) => { : null;
resolve( return new Promise((resolve) => {
new Response( resolve(
JSON.stringify({ new Response(
accessToken: JSON.stringify({
refreshToken === 'xxx-valid-refresh' ? 'xxx-valid-access' : null, tokens:
}), refreshToken === 'xxx-valid-refresh' ? validTokensPayload : null,
), }),
); ),
}); );
});
}
if (input.toString().match(/\/auth\/verify$/g)) {
const loginToken = init?.body
? JSON.parse(init.body.toString()).loginToken
: null;
return new Promise((resolve) => {
resolve(
new Response(
JSON.stringify({
tokens:
loginToken === 'xxx-valid-login' ? validTokensPayload : null,
}),
),
);
});
}
return new Promise(() => new Response());
}; };
global.fetch = mockFetch; global.fetch = mockFetch;
@ -47,21 +80,28 @@ it('hasRefreshToken is true when token is not', () => {
}); });
it('refreshToken does not refresh the token if refresh token is missing', () => { it('refreshToken does not refresh the token if refresh token is missing', () => {
refreshAccessToken(); getTokensFromRefreshToken();
expect(localStorage.getItem('accessToken')).toBeNull(); expect(localStorage.getItem('accessToken')).toBeNull();
}); });
it('refreshToken does not refreh the token if refresh token is invalid', () => { it('refreshToken does not refreh the token if refresh token is invalid', () => {
localStorage.setItem('refreshToken', 'xxx-invalid-refresh'); localStorage.setItem('refreshToken', 'xxx-invalid-refresh');
refreshAccessToken(); getTokensFromRefreshToken();
expect(localStorage.getItem('accessToken')).toBeNull();
});
it('refreshToken does not refreh the token if refresh token is empty', () => {
getTokensFromRefreshToken();
expect(localStorage.getItem('accessToken')).toBeNull(); expect(localStorage.getItem('accessToken')).toBeNull();
}); });
it('refreshToken refreshes the token if refresh token is valid', async () => { it('refreshToken refreshes the token if refresh token is valid', async () => {
localStorage.setItem('refreshToken', 'xxx-valid-refresh'); localStorage.setItem('refreshToken', 'xxx-valid-refresh');
refreshAccessToken(); getTokensFromRefreshToken();
await waitFor(() => { await waitFor(() => {
expect(localStorage.getItem('accessToken')).toBe('xxx-valid-access'); expect(localStorage.getItem('accessToken')).toBe(
'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIzNzRmZTNhNS1kZjFlLTQxMTktYWZlMC0yYTYyYTJiYTQ4MWUiLCJ3b3Jrc3BhY2VJZCI6InR3ZW50eS03ZWQ5ZDIxMi0xYzI1LTRkMDItYmYyNS02YWVjY2Y3ZWE0MTkiLCJpYXQiOjE2ODY5OTMxODIsImV4cCI6MTY4Njk5MzQ4Mn0.F_FD6nJ5fssR_47v2XFhtzqjr-wrEQpqaWVq8iIlLJw',
);
}); });
}); });
@ -79,10 +119,32 @@ it('getUserIdFromToken returns null when the token is not valid', async () => {
it('getUserIdFromToken returns the right userId when the token is valid', async () => { it('getUserIdFromToken returns the right userId when the token is valid', async () => {
localStorage.setItem( localStorage.setItem(
'accessToken', 'accessToken',
'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiJiNzU5MGRiOS1hYzdkLTQyNzUtOWM2Yy0zMjM5NzkxOTI3OTUiLCJ3b3Jrc3BhY2VJZCI6IjdlZDlkMjEyLTFjMjUtNGQwMi1iZjI1LTZhZWNjZjdlYTQxOSIsImlhdCI6MTY4NTA5MzE3MiwiZXhwIjoxNjg1MDkzNDcyfQ.0g-z2vKBbGGcs0EmZ3Q7HpZ9Yno_SOrprhcQMm1Zb6Y', 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIzNzRmZTNhNS1kZjFlLTQxMTktYWZlMC0yYTYyYTJiYTQ4MWUiLCJ3b3Jrc3BhY2VJZCI6InR3ZW50eS03ZWQ5ZDIxMi0xYzI1LTRkMDItYmYyNS02YWVjY2Y3ZWE0MTkiLCJpYXQiOjE2ODY5OTI0ODgsImV4cCI6MTY4Njk5Mjc4OH0.IO7U5G14IrrQriw3JjrKVxmZgd6XKL6yUIwuNe_R55E',
); );
const userId = getUserIdFromToken(); const userId = getUserIdFromToken();
expect(userId).toBe('b7590db9-ac7d-4275-9c6c-323979192795'); expect(userId).toBe('374fe3a5-df1e-4119-afe0-2a62a2ba481e');
});
it('getTokensFromLoginToken does nothing if loginToken is empty', async () => {
await getTokensFromLoginToken('');
expect(localStorage.getItem('accessToken')).toBeNull();
expect(localStorage.getItem('refreshToken')).toBeNull();
});
it('getTokensFromLoginToken does nothing if loginToken is not valid', async () => {
await getTokensFromLoginToken('xxx-invalid-login');
expect(localStorage.getItem('accessToken')).toBeNull();
expect(localStorage.getItem('refreshToken')).toBeNull();
});
it('getTokensFromLoginToken does nothing if loginToken is not valid', async () => {
await getTokensFromLoginToken('xxx-valid-login');
expect(localStorage.getItem('accessToken')).toBe(
'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIzNzRmZTNhNS1kZjFlLTQxMTktYWZlMC0yYTYyYTJiYTQ4MWUiLCJ3b3Jrc3BhY2VJZCI6InR3ZW50eS03ZWQ5ZDIxMi0xYzI1LTRkMDItYmYyNS02YWVjY2Y3ZWE0MTkiLCJpYXQiOjE2ODY5OTMxODIsImV4cCI6MTY4Njk5MzQ4Mn0.F_FD6nJ5fssR_47v2XFhtzqjr-wrEQpqaWVq8iIlLJw',
);
expect(localStorage.getItem('refreshToken')).toBe(
'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIzNzRmZTNhNS1kZjFlLTQxMTktYWZlMC0yYTYyYTJiYTQ4MWUiLCJpYXQiOjE2ODY5OTMxODIsImV4cCI6OTQ2Mjk5MzE4MiwianRpIjoiNzBmMWNhMjctOTYxYi00ZGZlLWEwOTUtMTY2OWEwOGViMTVjIn0.xEdX9dOGzrPHrPsivQYB9ipYGJH-mJ7GSIVPacmIzfY',
);
}); });
afterEach(() => { afterEach(() => {

View File

@ -1,27 +1,30 @@
import { useEffect, useState } from 'react'; import { useEffect, useState } from 'react';
import { useNavigate, useSearchParams } from 'react-router-dom'; import { useNavigate, useSearchParams } from 'react-router-dom';
import { refreshAccessToken } from '@/auth/services/AuthService'; import { getTokensFromLoginToken } from '@/auth/services/AuthService';
export function AuthCallback() { export function AuthCallback() {
const [searchParams] = useSearchParams(); const [searchParams] = useSearchParams();
const [isLoading, setIsLoading] = useState(true); const [isLoading, setIsLoading] = useState(false);
const refreshToken = searchParams.get('refreshToken'); const loginToken = searchParams.get('loginToken');
localStorage.setItem('refreshToken', refreshToken || '');
const navigate = useNavigate(); const navigate = useNavigate();
useEffect(() => { useEffect(() => {
async function getAccessToken() { async function getTokens() {
await refreshAccessToken(); if (!loginToken) {
return;
}
setIsLoading(true);
await getTokensFromLoginToken(loginToken);
setIsLoading(false); setIsLoading(false);
navigate('/'); navigate('/');
} }
if (isLoading) { if (!isLoading) {
getAccessToken(); getTokens();
} }
}, [isLoading, navigate]); }, [isLoading, navigate, loginToken]);
return <></>; return <></>;
} }

View File

@ -16,6 +16,7 @@ export function AuthProvider({ children }: OwnProps) {
const [, setIsAuthenticating] = useRecoilState(isAuthenticatingState); const [, setIsAuthenticating] = useRecoilState(isAuthenticatingState);
const userIdFromToken = getUserIdFromToken(); const userIdFromToken = getUserIdFromToken();
const { data } = useGetCurrentUserQuery(userIdFromToken); const { data } = useGetCurrentUserQuery(userIdFromToken);
useEffect(() => { useEffect(() => {

View File

@ -1,2 +1,2 @@
export const mockedUserJWT = export const mockedUserJWT =
'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJhc2QiLCJuYW1lIjoiSm9obiBEb2UiLCJpYXQiOjE1MTYyMzkwMjIsInVzZXJJZCI6IjdkZmJjM2Y3LTZlNWUtNDEyOC05NTdlLThkODY4MDhjZGY2YiJ9.eLVZXaaAsOWUUeVybvuig--0ClsTxBp3lfkD7USxEQk'; 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIzNzRmZTNhNS1kZjFlLTQxMTktYWZlMC0yYTYyYTJiYTQ4MWUiLCJ3b3Jrc3BhY2VJZCI6InR3ZW50eS03ZWQ5ZDIxMi0xYzI1LTRkMDItYmYyNS02YWVjY2Y3ZWE0MTkiLCJpYXQiOjE2ODY5OTMxODIsImV4cCI6MTY4Njk5MzQ4Mn0.F_FD6nJ5fssR_47v2XFhtzqjr-wrEQpqaWVq8iIlLJw';

View File

@ -2,7 +2,7 @@ import { GraphqlQueryUser } from '@/users/interfaces/user.interface';
export const mockedUsersData: Array<GraphqlQueryUser> = [ export const mockedUsersData: Array<GraphqlQueryUser> = [
{ {
id: '7dfbc3f7-6e5e-4128-957e-8d86808cdf6b', id: '374fe3a5-df1e-4119-afe0-2a62a2ba481e',
__typename: 'User', __typename: 'User',
email: 'charles@test.com', email: 'charles@test.com',
displayName: 'Charles Test', displayName: 'Charles Test',

View File

@ -1,7 +1,11 @@
AUTH_GOOGLE_CLIENT_ID=REPLACE_ME AUTH_GOOGLE_CLIENT_ID=REPLACE_ME
AUTH_GOOGLE_CLIENT_SECRET=REPLACE_ME AUTH_GOOGLE_CLIENT_SECRET=REPLACE_ME
AUTH_GOOGLE_CALLBACK_URL=http://localhost:3000/auth/google/redirect AUTH_GOOGLE_CALLBACK_URL=http://localhost:3000/auth/google/redirect
JWT_SECRET=secret_jwt ACCESS_TOKEN_SECRET=secret_jwt
JWT_EXPIRES_IN=300 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 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", "@nestjs/terminus": "^9.2.2",
"@prisma/client": "^4.13.0", "@prisma/client": "^4.13.0",
"apollo-server-express": "^3.12.0", "apollo-server-express": "^3.12.0",
"bcrypt": "^5.1.0",
"class-transformer": "^0.5.1", "class-transformer": "^0.5.1",
"class-validator": "^0.14.0",
"date-fns": "^2.30.0",
"graphql": "^16.6.0", "graphql": "^16.6.0",
"graphql-type-json": "^0.3.2", "graphql-type-json": "^0.3.2",
"jest-mock-extended": "^3.0.4", "jest-mock-extended": "^3.0.4",
"jsonwebtoken": "^9.0.0", "jsonwebtoken": "^9.0.0",
"ms": "^2.1.3",
"passport": "^0.6.0", "passport": "^0.6.0",
"passport-google-oauth20": "^2.0.0", "passport-google-oauth20": "^2.0.0",
"passport-jwt": "^4.0.1", "passport-jwt": "^4.0.1",
@ -57,8 +61,11 @@
"@nestjs/cli": "^9.0.0", "@nestjs/cli": "^9.0.0",
"@nestjs/schematics": "^9.0.0", "@nestjs/schematics": "^9.0.0",
"@nestjs/testing": "^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/express": "^4.17.13",
"@types/jest": "28.1.8", "@types/jest": "28.1.8",
"@types/ms": "^0.7.31",
"@types/node": "^16.0.0", "@types/node": "^16.0.0",
"@types/passport-google-oauth20": "^2.0.11", "@types/passport-google-oauth20": "^2.0.11",
"@types/passport-jwt": "^3.0.8", "@types/passport-jwt": "^3.0.8",

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

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