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:
@ -10,7 +10,7 @@ import { onError } from '@apollo/client/link/error';
|
||||
import { RestLink } from 'apollo-link-rest';
|
||||
|
||||
import { CommentThreadTarget } from './generated/graphql';
|
||||
import { refreshAccessToken } from './modules/auth/services/AuthService';
|
||||
import { getTokensFromRefreshToken } from './modules/auth/services/AuthService';
|
||||
|
||||
const apiLink = createHttpLink({
|
||||
uri: `${process.env.REACT_APP_API_URL}`,
|
||||
@ -34,7 +34,7 @@ const errorLink = onError(({ graphQLErrors, operation, forward }) => {
|
||||
return new Observable((observer) => {
|
||||
(async () => {
|
||||
try {
|
||||
await refreshAccessToken();
|
||||
await getTokensFromRefreshToken();
|
||||
|
||||
const oldHeaders = operation.getContext().headers;
|
||||
|
||||
|
||||
@ -13,7 +13,7 @@ export const getUserIdFromToken: () => string | null = () => {
|
||||
}
|
||||
|
||||
try {
|
||||
return jwt<{ userId: string }>(accessToken).userId;
|
||||
return jwt<{ sub: string }>(accessToken).sub;
|
||||
} catch (error) {
|
||||
return null;
|
||||
}
|
||||
@ -25,10 +25,41 @@ export const hasRefreshToken = () => {
|
||||
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');
|
||||
if (!refreshToken) {
|
||||
localStorage.removeItem('accessToken');
|
||||
return;
|
||||
}
|
||||
|
||||
const response = await fetch(
|
||||
@ -43,8 +74,13 @@ export const refreshAccessToken = async () => {
|
||||
);
|
||||
|
||||
if (response.ok) {
|
||||
const { accessToken } = await response.json();
|
||||
localStorage.setItem('accessToken', accessToken);
|
||||
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');
|
||||
|
||||
@ -1,29 +1,62 @@
|
||||
import { waitFor } from '@testing-library/react';
|
||||
|
||||
import {
|
||||
getTokensFromLoginToken,
|
||||
getTokensFromRefreshToken,
|
||||
getUserIdFromToken,
|
||||
hasAccessToken,
|
||||
hasRefreshToken,
|
||||
refreshAccessToken,
|
||||
} 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 (
|
||||
input: RequestInfo | URL,
|
||||
init?: RequestInit,
|
||||
): Promise<Response> => {
|
||||
const refreshToken = init?.body
|
||||
? JSON.parse(init.body.toString()).refreshToken
|
||||
: null;
|
||||
return new Promise((resolve) => {
|
||||
resolve(
|
||||
new Response(
|
||||
JSON.stringify({
|
||||
accessToken:
|
||||
refreshToken === 'xxx-valid-refresh' ? 'xxx-valid-access' : null,
|
||||
}),
|
||||
),
|
||||
);
|
||||
});
|
||||
if (input.toString().match(/\/auth\/token$/g)) {
|
||||
const refreshToken = init?.body
|
||||
? JSON.parse(init.body.toString()).refreshToken
|
||||
: null;
|
||||
return new Promise((resolve) => {
|
||||
resolve(
|
||||
new Response(
|
||||
JSON.stringify({
|
||||
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;
|
||||
@ -47,21 +80,28 @@ it('hasRefreshToken is true when token is not', () => {
|
||||
});
|
||||
|
||||
it('refreshToken does not refresh the token if refresh token is missing', () => {
|
||||
refreshAccessToken();
|
||||
getTokensFromRefreshToken();
|
||||
expect(localStorage.getItem('accessToken')).toBeNull();
|
||||
});
|
||||
|
||||
it('refreshToken does not refreh the token if refresh token is invalid', () => {
|
||||
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();
|
||||
});
|
||||
|
||||
it('refreshToken refreshes the token if refresh token is valid', async () => {
|
||||
localStorage.setItem('refreshToken', 'xxx-valid-refresh');
|
||||
refreshAccessToken();
|
||||
getTokensFromRefreshToken();
|
||||
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 () => {
|
||||
localStorage.setItem(
|
||||
'accessToken',
|
||||
'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiJiNzU5MGRiOS1hYzdkLTQyNzUtOWM2Yy0zMjM5NzkxOTI3OTUiLCJ3b3Jrc3BhY2VJZCI6IjdlZDlkMjEyLTFjMjUtNGQwMi1iZjI1LTZhZWNjZjdlYTQxOSIsImlhdCI6MTY4NTA5MzE3MiwiZXhwIjoxNjg1MDkzNDcyfQ.0g-z2vKBbGGcs0EmZ3Q7HpZ9Yno_SOrprhcQMm1Zb6Y',
|
||||
'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIzNzRmZTNhNS1kZjFlLTQxMTktYWZlMC0yYTYyYTJiYTQ4MWUiLCJ3b3Jrc3BhY2VJZCI6InR3ZW50eS03ZWQ5ZDIxMi0xYzI1LTRkMDItYmYyNS02YWVjY2Y3ZWE0MTkiLCJpYXQiOjE2ODY5OTI0ODgsImV4cCI6MTY4Njk5Mjc4OH0.IO7U5G14IrrQriw3JjrKVxmZgd6XKL6yUIwuNe_R55E',
|
||||
);
|
||||
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(() => {
|
||||
|
||||
@ -1,27 +1,30 @@
|
||||
import { useEffect, useState } from 'react';
|
||||
import { useNavigate, useSearchParams } from 'react-router-dom';
|
||||
|
||||
import { refreshAccessToken } from '@/auth/services/AuthService';
|
||||
import { getTokensFromLoginToken } from '@/auth/services/AuthService';
|
||||
|
||||
export function AuthCallback() {
|
||||
const [searchParams] = useSearchParams();
|
||||
const [isLoading, setIsLoading] = useState(true);
|
||||
const [isLoading, setIsLoading] = useState(false);
|
||||
|
||||
const refreshToken = searchParams.get('refreshToken');
|
||||
localStorage.setItem('refreshToken', refreshToken || '');
|
||||
const loginToken = searchParams.get('loginToken');
|
||||
const navigate = useNavigate();
|
||||
|
||||
useEffect(() => {
|
||||
async function getAccessToken() {
|
||||
await refreshAccessToken();
|
||||
async function getTokens() {
|
||||
if (!loginToken) {
|
||||
return;
|
||||
}
|
||||
setIsLoading(true);
|
||||
await getTokensFromLoginToken(loginToken);
|
||||
setIsLoading(false);
|
||||
navigate('/');
|
||||
}
|
||||
|
||||
if (isLoading) {
|
||||
getAccessToken();
|
||||
if (!isLoading) {
|
||||
getTokens();
|
||||
}
|
||||
}, [isLoading, navigate]);
|
||||
}, [isLoading, navigate, loginToken]);
|
||||
|
||||
return <></>;
|
||||
}
|
||||
|
||||
@ -16,6 +16,7 @@ export function AuthProvider({ children }: OwnProps) {
|
||||
const [, setIsAuthenticating] = useRecoilState(isAuthenticatingState);
|
||||
|
||||
const userIdFromToken = getUserIdFromToken();
|
||||
|
||||
const { data } = useGetCurrentUserQuery(userIdFromToken);
|
||||
|
||||
useEffect(() => {
|
||||
|
||||
@ -1,2 +1,2 @@
|
||||
export const mockedUserJWT =
|
||||
'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJhc2QiLCJuYW1lIjoiSm9obiBEb2UiLCJpYXQiOjE1MTYyMzkwMjIsInVzZXJJZCI6IjdkZmJjM2Y3LTZlNWUtNDEyOC05NTdlLThkODY4MDhjZGY2YiJ9.eLVZXaaAsOWUUeVybvuig--0ClsTxBp3lfkD7USxEQk';
|
||||
'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIzNzRmZTNhNS1kZjFlLTQxMTktYWZlMC0yYTYyYTJiYTQ4MWUiLCJ3b3Jrc3BhY2VJZCI6InR3ZW50eS03ZWQ5ZDIxMi0xYzI1LTRkMDItYmYyNS02YWVjY2Y3ZWE0MTkiLCJpYXQiOjE2ODY5OTMxODIsImV4cCI6MTY4Njk5MzQ4Mn0.F_FD6nJ5fssR_47v2XFhtzqjr-wrEQpqaWVq8iIlLJw';
|
||||
|
||||
@ -2,7 +2,7 @@ import { GraphqlQueryUser } from '@/users/interfaces/user.interface';
|
||||
|
||||
export const mockedUsersData: Array<GraphqlQueryUser> = [
|
||||
{
|
||||
id: '7dfbc3f7-6e5e-4128-957e-8d86808cdf6b',
|
||||
id: '374fe3a5-df1e-4119-afe0-2a62a2ba481e',
|
||||
__typename: 'User',
|
||||
email: 'charles@test.com',
|
||||
displayName: 'Charles Test',
|
||||
|
||||
@ -1,7 +1,11 @@
|
||||
AUTH_GOOGLE_CLIENT_ID=REPLACE_ME
|
||||
AUTH_GOOGLE_CLIENT_SECRET=REPLACE_ME
|
||||
AUTH_GOOGLE_CALLBACK_URL=http://localhost:3000/auth/google/redirect
|
||||
JWT_SECRET=secret_jwt
|
||||
JWT_EXPIRES_IN=300
|
||||
ACCESS_TOKEN_SECRET=secret_jwt
|
||||
ACCESS_TOKEN_EXPIRES_IN=5m
|
||||
LOGIN_TOKEN_SECRET=secret_login_token
|
||||
LOGIN_TOKEN_EXPIRES_IN=15m
|
||||
REFRESH_TOKEN_SECRET=secret_refresh_token
|
||||
REFRESH_TOKEN_EXPIRES_IN=90d
|
||||
PG_DATABASE_URL=postgres://postgres:postgrespassword@postgres:5432/default?connection_limit=1
|
||||
FRONT_AUTH_CALLBACK_URL=http://localhost:3001/auth/callback
|
||||
FRONT_AUTH_CALLBACK_URL=http://localhost:3001/auth/callback
|
||||
|
||||
@ -39,11 +39,15 @@
|
||||
"@nestjs/terminus": "^9.2.2",
|
||||
"@prisma/client": "^4.13.0",
|
||||
"apollo-server-express": "^3.12.0",
|
||||
"bcrypt": "^5.1.0",
|
||||
"class-transformer": "^0.5.1",
|
||||
"class-validator": "^0.14.0",
|
||||
"date-fns": "^2.30.0",
|
||||
"graphql": "^16.6.0",
|
||||
"graphql-type-json": "^0.3.2",
|
||||
"jest-mock-extended": "^3.0.4",
|
||||
"jsonwebtoken": "^9.0.0",
|
||||
"ms": "^2.1.3",
|
||||
"passport": "^0.6.0",
|
||||
"passport-google-oauth20": "^2.0.0",
|
||||
"passport-jwt": "^4.0.1",
|
||||
@ -57,8 +61,11 @@
|
||||
"@nestjs/cli": "^9.0.0",
|
||||
"@nestjs/schematics": "^9.0.0",
|
||||
"@nestjs/testing": "^9.0.0",
|
||||
"@types/bcrypt": "^5.0.0",
|
||||
"@types/date-fns": "^2.6.0",
|
||||
"@types/express": "^4.17.13",
|
||||
"@types/jest": "28.1.8",
|
||||
"@types/ms": "^0.7.31",
|
||||
"@types/node": "^16.0.0",
|
||||
"@types/passport-google-oauth20": "^2.0.11",
|
||||
"@types/passport-jwt": "^3.0.8",
|
||||
|
||||
@ -4,8 +4,8 @@ import { CommentableType } from '../prisma/commentable-type.enum';
|
||||
|
||||
@InputType()
|
||||
export class CommentThreadTargetCreateManyCommentThreadInput {
|
||||
@Field(() => String, { nullable: false })
|
||||
id!: string;
|
||||
@Field(() => String, { nullable: true })
|
||||
id?: string;
|
||||
|
||||
@Field(() => Date, { nullable: true })
|
||||
createdAt?: Date | string;
|
||||
|
||||
@ -4,8 +4,8 @@ import { CommentableType } from '../prisma/commentable-type.enum';
|
||||
|
||||
@InputType()
|
||||
export class CommentThreadTargetCreateManyInput {
|
||||
@Field(() => String, { nullable: false })
|
||||
id!: string;
|
||||
@Field(() => String, { nullable: true })
|
||||
id?: string;
|
||||
|
||||
@Field(() => Date, { nullable: true })
|
||||
createdAt?: Date | string;
|
||||
|
||||
@ -4,8 +4,8 @@ import { CommentableType } from '../prisma/commentable-type.enum';
|
||||
|
||||
@InputType()
|
||||
export class CommentThreadTargetCreateWithoutCommentThreadInput {
|
||||
@Field(() => String, { nullable: false })
|
||||
id!: string;
|
||||
@Field(() => String, { nullable: true })
|
||||
id?: string;
|
||||
|
||||
@Field(() => Date, { nullable: true })
|
||||
createdAt?: Date | string;
|
||||
|
||||
@ -5,8 +5,8 @@ import { CommentThreadCreateNestedOneWithoutCommentThreadTargetsInput } from '..
|
||||
|
||||
@InputType()
|
||||
export class CommentThreadTargetCreateInput {
|
||||
@Field(() => String, { nullable: false })
|
||||
id!: string;
|
||||
@Field(() => String, { nullable: true })
|
||||
id?: string;
|
||||
|
||||
@Field(() => Date, { nullable: true })
|
||||
createdAt?: Date | string;
|
||||
|
||||
@ -4,8 +4,8 @@ import { CommentableType } from '../prisma/commentable-type.enum';
|
||||
|
||||
@InputType()
|
||||
export class CommentThreadTargetUncheckedCreateWithoutCommentThreadInput {
|
||||
@Field(() => String, { nullable: false })
|
||||
id!: string;
|
||||
@Field(() => String, { nullable: true })
|
||||
id?: string;
|
||||
|
||||
@Field(() => Date, { nullable: true })
|
||||
createdAt?: Date | string;
|
||||
|
||||
@ -4,8 +4,8 @@ import { CommentableType } from '../prisma/commentable-type.enum';
|
||||
|
||||
@InputType()
|
||||
export class CommentThreadTargetUncheckedCreateInput {
|
||||
@Field(() => String, { nullable: false })
|
||||
id!: string;
|
||||
@Field(() => String, { nullable: true })
|
||||
id?: string;
|
||||
|
||||
@Field(() => Date, { nullable: true })
|
||||
createdAt?: Date | string;
|
||||
|
||||
@ -3,8 +3,8 @@ import { InputType } from '@nestjs/graphql';
|
||||
|
||||
@InputType()
|
||||
export class CommentThreadCreateManyWorkspaceInput {
|
||||
@Field(() => String, { nullable: false })
|
||||
id!: string;
|
||||
@Field(() => String, { nullable: true })
|
||||
id?: string;
|
||||
|
||||
@Field(() => Date, { nullable: true })
|
||||
createdAt?: Date | string;
|
||||
|
||||
@ -4,8 +4,8 @@ import { HideField } from '@nestjs/graphql';
|
||||
|
||||
@InputType()
|
||||
export class CommentThreadCreateManyInput {
|
||||
@Field(() => String, { nullable: false })
|
||||
id!: string;
|
||||
@Field(() => String, { nullable: true })
|
||||
id?: string;
|
||||
|
||||
@Field(() => Date, { nullable: true })
|
||||
createdAt?: Date | string;
|
||||
|
||||
@ -6,8 +6,8 @@ import { HideField } from '@nestjs/graphql';
|
||||
|
||||
@InputType()
|
||||
export class CommentThreadCreateWithoutCommentThreadTargetsInput {
|
||||
@Field(() => String, { nullable: false })
|
||||
id!: string;
|
||||
@Field(() => String, { nullable: true })
|
||||
id?: string;
|
||||
|
||||
@Field(() => Date, { nullable: true })
|
||||
createdAt?: Date | string;
|
||||
|
||||
@ -6,8 +6,8 @@ import { HideField } from '@nestjs/graphql';
|
||||
|
||||
@InputType()
|
||||
export class CommentThreadCreateWithoutCommentsInput {
|
||||
@Field(() => String, { nullable: false })
|
||||
id!: string;
|
||||
@Field(() => String, { nullable: true })
|
||||
id?: string;
|
||||
|
||||
@Field(() => Date, { nullable: true })
|
||||
createdAt?: Date | string;
|
||||
|
||||
@ -5,8 +5,8 @@ import { CommentCreateNestedManyWithoutCommentThreadInput } from '../comment/com
|
||||
|
||||
@InputType()
|
||||
export class CommentThreadCreateWithoutWorkspaceInput {
|
||||
@Field(() => String, { nullable: false })
|
||||
id!: string;
|
||||
@Field(() => String, { nullable: true })
|
||||
id?: string;
|
||||
|
||||
@Field(() => Date, { nullable: true })
|
||||
createdAt?: Date | string;
|
||||
|
||||
@ -7,8 +7,8 @@ import { HideField } from '@nestjs/graphql';
|
||||
|
||||
@InputType()
|
||||
export class CommentThreadCreateInput {
|
||||
@Field(() => String, { nullable: false })
|
||||
id!: string;
|
||||
@Field(() => String, { nullable: true })
|
||||
id?: string;
|
||||
|
||||
@Field(() => Date, { nullable: true })
|
||||
createdAt?: Date | string;
|
||||
|
||||
@ -5,8 +5,8 @@ import { CommentUncheckedCreateNestedManyWithoutCommentThreadInput } from '../co
|
||||
|
||||
@InputType()
|
||||
export class CommentThreadUncheckedCreateWithoutCommentThreadTargetsInput {
|
||||
@Field(() => String, { nullable: false })
|
||||
id!: string;
|
||||
@Field(() => String, { nullable: true })
|
||||
id?: string;
|
||||
|
||||
@Field(() => Date, { nullable: true })
|
||||
createdAt?: Date | string;
|
||||
|
||||
@ -5,8 +5,8 @@ import { CommentThreadTargetUncheckedCreateNestedManyWithoutCommentThreadInput }
|
||||
|
||||
@InputType()
|
||||
export class CommentThreadUncheckedCreateWithoutCommentsInput {
|
||||
@Field(() => String, { nullable: false })
|
||||
id!: string;
|
||||
@Field(() => String, { nullable: true })
|
||||
id?: string;
|
||||
|
||||
@Field(() => Date, { nullable: true })
|
||||
createdAt?: Date | string;
|
||||
|
||||
@ -5,8 +5,8 @@ import { CommentUncheckedCreateNestedManyWithoutCommentThreadInput } from '../co
|
||||
|
||||
@InputType()
|
||||
export class CommentThreadUncheckedCreateWithoutWorkspaceInput {
|
||||
@Field(() => String, { nullable: false })
|
||||
id!: string;
|
||||
@Field(() => String, { nullable: true })
|
||||
id?: string;
|
||||
|
||||
@Field(() => Date, { nullable: true })
|
||||
createdAt?: Date | string;
|
||||
|
||||
@ -6,8 +6,8 @@ import { CommentUncheckedCreateNestedManyWithoutCommentThreadInput } from '../co
|
||||
|
||||
@InputType()
|
||||
export class CommentThreadUncheckedCreateInput {
|
||||
@Field(() => String, { nullable: false })
|
||||
id!: string;
|
||||
@Field(() => String, { nullable: true })
|
||||
id?: string;
|
||||
|
||||
@Field(() => Date, { nullable: true })
|
||||
createdAt?: Date | string;
|
||||
|
||||
@ -4,8 +4,8 @@ import { HideField } from '@nestjs/graphql';
|
||||
|
||||
@InputType()
|
||||
export class CommentCreateManyAuthorInput {
|
||||
@Field(() => String, { nullable: false })
|
||||
id!: string;
|
||||
@Field(() => String, { nullable: true })
|
||||
id?: string;
|
||||
|
||||
@Field(() => Date, { nullable: true })
|
||||
createdAt?: Date | string;
|
||||
|
||||
@ -4,8 +4,8 @@ import { HideField } from '@nestjs/graphql';
|
||||
|
||||
@InputType()
|
||||
export class CommentCreateManyCommentThreadInput {
|
||||
@Field(() => String, { nullable: false })
|
||||
id!: string;
|
||||
@Field(() => String, { nullable: true })
|
||||
id?: string;
|
||||
|
||||
@Field(() => Date, { nullable: true })
|
||||
createdAt?: Date | string;
|
||||
|
||||
@ -3,8 +3,8 @@ import { InputType } from '@nestjs/graphql';
|
||||
|
||||
@InputType()
|
||||
export class CommentCreateManyWorkspaceInput {
|
||||
@Field(() => String, { nullable: false })
|
||||
id!: string;
|
||||
@Field(() => String, { nullable: true })
|
||||
id?: string;
|
||||
|
||||
@Field(() => Date, { nullable: true })
|
||||
createdAt?: Date | string;
|
||||
|
||||
@ -4,8 +4,8 @@ import { HideField } from '@nestjs/graphql';
|
||||
|
||||
@InputType()
|
||||
export class CommentCreateManyInput {
|
||||
@Field(() => String, { nullable: false })
|
||||
id!: string;
|
||||
@Field(() => String, { nullable: true })
|
||||
id?: string;
|
||||
|
||||
@Field(() => Date, { nullable: true })
|
||||
createdAt?: Date | string;
|
||||
|
||||
@ -6,8 +6,8 @@ import { HideField } from '@nestjs/graphql';
|
||||
|
||||
@InputType()
|
||||
export class CommentCreateWithoutAuthorInput {
|
||||
@Field(() => String, { nullable: false })
|
||||
id!: string;
|
||||
@Field(() => String, { nullable: true })
|
||||
id?: string;
|
||||
|
||||
@Field(() => Date, { nullable: true })
|
||||
createdAt?: Date | string;
|
||||
|
||||
@ -6,8 +6,8 @@ import { HideField } from '@nestjs/graphql';
|
||||
|
||||
@InputType()
|
||||
export class CommentCreateWithoutCommentThreadInput {
|
||||
@Field(() => String, { nullable: false })
|
||||
id!: string;
|
||||
@Field(() => String, { nullable: true })
|
||||
id?: string;
|
||||
|
||||
@Field(() => Date, { nullable: true })
|
||||
createdAt?: Date | string;
|
||||
|
||||
@ -5,8 +5,8 @@ import { CommentThreadCreateNestedOneWithoutCommentsInput } from '../comment-thr
|
||||
|
||||
@InputType()
|
||||
export class CommentCreateWithoutWorkspaceInput {
|
||||
@Field(() => String, { nullable: false })
|
||||
id!: string;
|
||||
@Field(() => String, { nullable: true })
|
||||
id?: string;
|
||||
|
||||
@Field(() => Date, { nullable: true })
|
||||
createdAt?: Date | string;
|
||||
|
||||
@ -7,8 +7,8 @@ import { HideField } from '@nestjs/graphql';
|
||||
|
||||
@InputType()
|
||||
export class CommentCreateInput {
|
||||
@Field(() => String, { nullable: false })
|
||||
id!: string;
|
||||
@Field(() => String, { nullable: true })
|
||||
id?: string;
|
||||
|
||||
@Field(() => Date, { nullable: true })
|
||||
createdAt?: Date | string;
|
||||
|
||||
@ -4,8 +4,8 @@ import { HideField } from '@nestjs/graphql';
|
||||
|
||||
@InputType()
|
||||
export class CommentUncheckedCreateWithoutAuthorInput {
|
||||
@Field(() => String, { nullable: false })
|
||||
id!: string;
|
||||
@Field(() => String, { nullable: true })
|
||||
id?: string;
|
||||
|
||||
@Field(() => Date, { nullable: true })
|
||||
createdAt?: Date | string;
|
||||
|
||||
@ -4,8 +4,8 @@ import { HideField } from '@nestjs/graphql';
|
||||
|
||||
@InputType()
|
||||
export class CommentUncheckedCreateWithoutCommentThreadInput {
|
||||
@Field(() => String, { nullable: false })
|
||||
id!: string;
|
||||
@Field(() => String, { nullable: true })
|
||||
id?: string;
|
||||
|
||||
@Field(() => Date, { nullable: true })
|
||||
createdAt?: Date | string;
|
||||
|
||||
@ -3,8 +3,8 @@ import { InputType } from '@nestjs/graphql';
|
||||
|
||||
@InputType()
|
||||
export class CommentUncheckedCreateWithoutWorkspaceInput {
|
||||
@Field(() => String, { nullable: false })
|
||||
id!: string;
|
||||
@Field(() => String, { nullable: true })
|
||||
id?: string;
|
||||
|
||||
@Field(() => Date, { nullable: true })
|
||||
createdAt?: Date | string;
|
||||
|
||||
@ -4,8 +4,8 @@ import { HideField } from '@nestjs/graphql';
|
||||
|
||||
@InputType()
|
||||
export class CommentUncheckedCreateInput {
|
||||
@Field(() => String, { nullable: false })
|
||||
id!: string;
|
||||
@Field(() => String, { nullable: true })
|
||||
id?: string;
|
||||
|
||||
@Field(() => Date, { nullable: true })
|
||||
createdAt?: Date | string;
|
||||
|
||||
@ -5,8 +5,8 @@ import { HideField } from '@nestjs/graphql';
|
||||
|
||||
@InputType()
|
||||
export class CompanyCreateManyAccountOwnerInput {
|
||||
@Field(() => String, { nullable: false })
|
||||
id!: string;
|
||||
@Field(() => String, { nullable: true })
|
||||
id?: string;
|
||||
|
||||
@Field(() => Date, { nullable: true })
|
||||
createdAt?: Date | string;
|
||||
|
||||
@ -4,8 +4,8 @@ import { Int } from '@nestjs/graphql';
|
||||
|
||||
@InputType()
|
||||
export class CompanyCreateManyWorkspaceInput {
|
||||
@Field(() => String, { nullable: false })
|
||||
id!: string;
|
||||
@Field(() => String, { nullable: true })
|
||||
id?: string;
|
||||
|
||||
@Field(() => Date, { nullable: true })
|
||||
createdAt?: Date | string;
|
||||
|
||||
@ -5,8 +5,8 @@ import { HideField } from '@nestjs/graphql';
|
||||
|
||||
@InputType()
|
||||
export class CompanyCreateManyInput {
|
||||
@Field(() => String, { nullable: false })
|
||||
id!: string;
|
||||
@Field(() => String, { nullable: true })
|
||||
id?: string;
|
||||
|
||||
@Field(() => Date, { nullable: true })
|
||||
createdAt?: Date | string;
|
||||
|
||||
@ -7,8 +7,8 @@ import { HideField } from '@nestjs/graphql';
|
||||
|
||||
@InputType()
|
||||
export class CompanyCreateWithoutAccountOwnerInput {
|
||||
@Field(() => String, { nullable: false })
|
||||
id!: string;
|
||||
@Field(() => String, { nullable: true })
|
||||
id?: string;
|
||||
|
||||
@Field(() => Date, { nullable: true })
|
||||
createdAt?: Date | string;
|
||||
|
||||
@ -7,8 +7,8 @@ import { HideField } from '@nestjs/graphql';
|
||||
|
||||
@InputType()
|
||||
export class CompanyCreateWithoutPeopleInput {
|
||||
@Field(() => String, { nullable: false })
|
||||
id!: string;
|
||||
@Field(() => String, { nullable: true })
|
||||
id?: string;
|
||||
|
||||
@Field(() => Date, { nullable: true })
|
||||
createdAt?: Date | string;
|
||||
|
||||
@ -6,8 +6,8 @@ import { PersonCreateNestedManyWithoutCompanyInput } from '../person/person-crea
|
||||
|
||||
@InputType()
|
||||
export class CompanyCreateWithoutWorkspaceInput {
|
||||
@Field(() => String, { nullable: false })
|
||||
id!: string;
|
||||
@Field(() => String, { nullable: true })
|
||||
id?: string;
|
||||
|
||||
@Field(() => Date, { nullable: true })
|
||||
createdAt?: Date | string;
|
||||
|
||||
@ -8,8 +8,8 @@ import { HideField } from '@nestjs/graphql';
|
||||
|
||||
@InputType()
|
||||
export class CompanyCreateInput {
|
||||
@Field(() => String, { nullable: false })
|
||||
id!: string;
|
||||
@Field(() => String, { nullable: true })
|
||||
id?: string;
|
||||
|
||||
@Field(() => Date, { nullable: true })
|
||||
createdAt?: Date | string;
|
||||
|
||||
@ -6,8 +6,8 @@ import { PersonUncheckedCreateNestedManyWithoutCompanyInput } from '../person/pe
|
||||
|
||||
@InputType()
|
||||
export class CompanyUncheckedCreateWithoutAccountOwnerInput {
|
||||
@Field(() => String, { nullable: false })
|
||||
id!: string;
|
||||
@Field(() => String, { nullable: true })
|
||||
id?: string;
|
||||
|
||||
@Field(() => Date, { nullable: true })
|
||||
createdAt?: Date | string;
|
||||
|
||||
@ -5,8 +5,8 @@ import { HideField } from '@nestjs/graphql';
|
||||
|
||||
@InputType()
|
||||
export class CompanyUncheckedCreateWithoutPeopleInput {
|
||||
@Field(() => String, { nullable: false })
|
||||
id!: string;
|
||||
@Field(() => String, { nullable: true })
|
||||
id?: string;
|
||||
|
||||
@Field(() => Date, { nullable: true })
|
||||
createdAt?: Date | string;
|
||||
|
||||
@ -5,8 +5,8 @@ import { PersonUncheckedCreateNestedManyWithoutCompanyInput } from '../person/pe
|
||||
|
||||
@InputType()
|
||||
export class CompanyUncheckedCreateWithoutWorkspaceInput {
|
||||
@Field(() => String, { nullable: false })
|
||||
id!: string;
|
||||
@Field(() => String, { nullable: true })
|
||||
id?: string;
|
||||
|
||||
@Field(() => Date, { nullable: true })
|
||||
createdAt?: Date | string;
|
||||
|
||||
@ -6,8 +6,8 @@ import { PersonUncheckedCreateNestedManyWithoutCompanyInput } from '../person/pe
|
||||
|
||||
@InputType()
|
||||
export class CompanyUncheckedCreateInput {
|
||||
@Field(() => String, { nullable: false })
|
||||
id!: string;
|
||||
@Field(() => String, { nullable: true })
|
||||
id?: string;
|
||||
|
||||
@Field(() => Date, { nullable: true })
|
||||
createdAt?: Date | string;
|
||||
|
||||
@ -4,8 +4,8 @@ import { HideField } from '@nestjs/graphql';
|
||||
|
||||
@InputType()
|
||||
export class PersonCreateManyCompanyInput {
|
||||
@Field(() => String, { nullable: false })
|
||||
id!: string;
|
||||
@Field(() => String, { nullable: true })
|
||||
id?: string;
|
||||
|
||||
@Field(() => Date, { nullable: true })
|
||||
createdAt?: Date | string;
|
||||
|
||||
@ -3,8 +3,8 @@ import { InputType } from '@nestjs/graphql';
|
||||
|
||||
@InputType()
|
||||
export class PersonCreateManyWorkspaceInput {
|
||||
@Field(() => String, { nullable: false })
|
||||
id!: string;
|
||||
@Field(() => String, { nullable: true })
|
||||
id?: string;
|
||||
|
||||
@Field(() => Date, { nullable: true })
|
||||
createdAt?: Date | string;
|
||||
|
||||
@ -4,8 +4,8 @@ import { HideField } from '@nestjs/graphql';
|
||||
|
||||
@InputType()
|
||||
export class PersonCreateManyInput {
|
||||
@Field(() => String, { nullable: false })
|
||||
id!: string;
|
||||
@Field(() => String, { nullable: true })
|
||||
id?: string;
|
||||
|
||||
@Field(() => Date, { nullable: true })
|
||||
createdAt?: Date | string;
|
||||
|
||||
@ -5,8 +5,8 @@ import { HideField } from '@nestjs/graphql';
|
||||
|
||||
@InputType()
|
||||
export class PersonCreateWithoutCompanyInput {
|
||||
@Field(() => String, { nullable: false })
|
||||
id!: string;
|
||||
@Field(() => String, { nullable: true })
|
||||
id?: string;
|
||||
|
||||
@Field(() => Date, { nullable: true })
|
||||
createdAt?: Date | string;
|
||||
|
||||
@ -4,8 +4,8 @@ import { CompanyCreateNestedOneWithoutPeopleInput } from '../company/company-cre
|
||||
|
||||
@InputType()
|
||||
export class PersonCreateWithoutWorkspaceInput {
|
||||
@Field(() => String, { nullable: false })
|
||||
id!: string;
|
||||
@Field(() => String, { nullable: true })
|
||||
id?: string;
|
||||
|
||||
@Field(() => Date, { nullable: true })
|
||||
createdAt?: Date | string;
|
||||
|
||||
@ -6,8 +6,8 @@ import { HideField } from '@nestjs/graphql';
|
||||
|
||||
@InputType()
|
||||
export class PersonCreateInput {
|
||||
@Field(() => String, { nullable: false })
|
||||
id!: string;
|
||||
@Field(() => String, { nullable: true })
|
||||
id?: string;
|
||||
|
||||
@Field(() => Date, { nullable: true })
|
||||
createdAt?: Date | string;
|
||||
|
||||
@ -4,8 +4,8 @@ import { HideField } from '@nestjs/graphql';
|
||||
|
||||
@InputType()
|
||||
export class PersonUncheckedCreateWithoutCompanyInput {
|
||||
@Field(() => String, { nullable: false })
|
||||
id!: string;
|
||||
@Field(() => String, { nullable: true })
|
||||
id?: string;
|
||||
|
||||
@Field(() => Date, { nullable: true })
|
||||
createdAt?: Date | string;
|
||||
|
||||
@ -3,8 +3,8 @@ import { InputType } from '@nestjs/graphql';
|
||||
|
||||
@InputType()
|
||||
export class PersonUncheckedCreateWithoutWorkspaceInput {
|
||||
@Field(() => String, { nullable: false })
|
||||
id!: string;
|
||||
@Field(() => String, { nullable: true })
|
||||
id?: string;
|
||||
|
||||
@Field(() => Date, { nullable: true })
|
||||
createdAt?: Date | string;
|
||||
|
||||
@ -4,8 +4,8 @@ import { HideField } from '@nestjs/graphql';
|
||||
|
||||
@InputType()
|
||||
export class PersonUncheckedCreateInput {
|
||||
@Field(() => String, { nullable: false })
|
||||
id!: string;
|
||||
@Field(() => String, { nullable: true })
|
||||
id?: string;
|
||||
|
||||
@Field(() => Date, { nullable: true })
|
||||
createdAt?: Date | string;
|
||||
|
||||
@ -5,8 +5,8 @@ import { HideField } from '@nestjs/graphql';
|
||||
|
||||
@InputType()
|
||||
export class PipelineProgressCreateManyPipelineStageInput {
|
||||
@Field(() => String, { nullable: false })
|
||||
id!: string;
|
||||
@Field(() => String, { nullable: true })
|
||||
id?: string;
|
||||
|
||||
@Field(() => Date, { nullable: true })
|
||||
createdAt?: Date | string;
|
||||
|
||||
@ -5,8 +5,8 @@ import { HideField } from '@nestjs/graphql';
|
||||
|
||||
@InputType()
|
||||
export class PipelineProgressCreateManyPipelineInput {
|
||||
@Field(() => String, { nullable: false })
|
||||
id!: string;
|
||||
@Field(() => String, { nullable: true })
|
||||
id?: string;
|
||||
|
||||
@Field(() => Date, { nullable: true })
|
||||
createdAt?: Date | string;
|
||||
|
||||
@ -4,8 +4,8 @@ import { PipelineProgressableType } from '../prisma/pipeline-progressable-type.e
|
||||
|
||||
@InputType()
|
||||
export class PipelineProgressCreateManyWorkspaceInput {
|
||||
@Field(() => String, { nullable: false })
|
||||
id!: string;
|
||||
@Field(() => String, { nullable: true })
|
||||
id?: string;
|
||||
|
||||
@Field(() => Date, { nullable: true })
|
||||
createdAt?: Date | string;
|
||||
|
||||
@ -5,8 +5,8 @@ import { HideField } from '@nestjs/graphql';
|
||||
|
||||
@InputType()
|
||||
export class PipelineProgressCreateManyInput {
|
||||
@Field(() => String, { nullable: false })
|
||||
id!: string;
|
||||
@Field(() => String, { nullable: true })
|
||||
id?: string;
|
||||
|
||||
@Field(() => Date, { nullable: true })
|
||||
createdAt?: Date | string;
|
||||
|
||||
@ -7,8 +7,8 @@ import { HideField } from '@nestjs/graphql';
|
||||
|
||||
@InputType()
|
||||
export class PipelineProgressCreateWithoutPipelineStageInput {
|
||||
@Field(() => String, { nullable: false })
|
||||
id!: string;
|
||||
@Field(() => String, { nullable: true })
|
||||
id?: string;
|
||||
|
||||
@Field(() => Date, { nullable: true })
|
||||
createdAt?: Date | string;
|
||||
|
||||
@ -7,8 +7,8 @@ import { HideField } from '@nestjs/graphql';
|
||||
|
||||
@InputType()
|
||||
export class PipelineProgressCreateWithoutPipelineInput {
|
||||
@Field(() => String, { nullable: false })
|
||||
id!: string;
|
||||
@Field(() => String, { nullable: true })
|
||||
id?: string;
|
||||
|
||||
@Field(() => Date, { nullable: true })
|
||||
createdAt?: Date | string;
|
||||
|
||||
@ -6,8 +6,8 @@ import { PipelineStageCreateNestedOneWithoutPipelineProgressesInput } from '../p
|
||||
|
||||
@InputType()
|
||||
export class PipelineProgressCreateWithoutWorkspaceInput {
|
||||
@Field(() => String, { nullable: false })
|
||||
id!: string;
|
||||
@Field(() => String, { nullable: true })
|
||||
id?: string;
|
||||
|
||||
@Field(() => Date, { nullable: true })
|
||||
createdAt?: Date | string;
|
||||
|
||||
@ -8,8 +8,8 @@ import { HideField } from '@nestjs/graphql';
|
||||
|
||||
@InputType()
|
||||
export class PipelineProgressCreateInput {
|
||||
@Field(() => String, { nullable: false })
|
||||
id!: string;
|
||||
@Field(() => String, { nullable: true })
|
||||
id?: string;
|
||||
|
||||
@Field(() => Date, { nullable: true })
|
||||
createdAt?: Date | string;
|
||||
|
||||
@ -5,8 +5,8 @@ import { HideField } from '@nestjs/graphql';
|
||||
|
||||
@InputType()
|
||||
export class PipelineProgressUncheckedCreateWithoutPipelineStageInput {
|
||||
@Field(() => String, { nullable: false })
|
||||
id!: string;
|
||||
@Field(() => String, { nullable: true })
|
||||
id?: string;
|
||||
|
||||
@Field(() => Date, { nullable: true })
|
||||
createdAt?: Date | string;
|
||||
|
||||
@ -5,8 +5,8 @@ import { HideField } from '@nestjs/graphql';
|
||||
|
||||
@InputType()
|
||||
export class PipelineProgressUncheckedCreateWithoutPipelineInput {
|
||||
@Field(() => String, { nullable: false })
|
||||
id!: string;
|
||||
@Field(() => String, { nullable: true })
|
||||
id?: string;
|
||||
|
||||
@Field(() => Date, { nullable: true })
|
||||
createdAt?: Date | string;
|
||||
|
||||
@ -4,8 +4,8 @@ import { PipelineProgressableType } from '../prisma/pipeline-progressable-type.e
|
||||
|
||||
@InputType()
|
||||
export class PipelineProgressUncheckedCreateWithoutWorkspaceInput {
|
||||
@Field(() => String, { nullable: false })
|
||||
id!: string;
|
||||
@Field(() => String, { nullable: true })
|
||||
id?: string;
|
||||
|
||||
@Field(() => Date, { nullable: true })
|
||||
createdAt?: Date | string;
|
||||
|
||||
@ -5,8 +5,8 @@ import { HideField } from '@nestjs/graphql';
|
||||
|
||||
@InputType()
|
||||
export class PipelineProgressUncheckedCreateInput {
|
||||
@Field(() => String, { nullable: false })
|
||||
id!: string;
|
||||
@Field(() => String, { nullable: true })
|
||||
id?: string;
|
||||
|
||||
@Field(() => Date, { nullable: true })
|
||||
createdAt?: Date | string;
|
||||
|
||||
@ -4,8 +4,8 @@ import { HideField } from '@nestjs/graphql';
|
||||
|
||||
@InputType()
|
||||
export class PipelineStageCreateManyPipelineInput {
|
||||
@Field(() => String, { nullable: false })
|
||||
id!: string;
|
||||
@Field(() => String, { nullable: true })
|
||||
id?: string;
|
||||
|
||||
@Field(() => Date, { nullable: true })
|
||||
createdAt?: Date | string;
|
||||
|
||||
@ -3,8 +3,8 @@ import { InputType } from '@nestjs/graphql';
|
||||
|
||||
@InputType()
|
||||
export class PipelineStageCreateManyWorkspaceInput {
|
||||
@Field(() => String, { nullable: false })
|
||||
id!: string;
|
||||
@Field(() => String, { nullable: true })
|
||||
id?: string;
|
||||
|
||||
@Field(() => Date, { nullable: true })
|
||||
createdAt?: Date | string;
|
||||
|
||||
@ -4,8 +4,8 @@ import { HideField } from '@nestjs/graphql';
|
||||
|
||||
@InputType()
|
||||
export class PipelineStageCreateManyInput {
|
||||
@Field(() => String, { nullable: false })
|
||||
id!: string;
|
||||
@Field(() => String, { nullable: true })
|
||||
id?: string;
|
||||
|
||||
@Field(() => Date, { nullable: true })
|
||||
createdAt?: Date | string;
|
||||
|
||||
@ -6,8 +6,8 @@ import { HideField } from '@nestjs/graphql';
|
||||
|
||||
@InputType()
|
||||
export class PipelineStageCreateWithoutPipelineProgressesInput {
|
||||
@Field(() => String, { nullable: false })
|
||||
id!: string;
|
||||
@Field(() => String, { nullable: true })
|
||||
id?: string;
|
||||
|
||||
@Field(() => Date, { nullable: true })
|
||||
createdAt?: Date | string;
|
||||
|
||||
@ -6,8 +6,8 @@ import { HideField } from '@nestjs/graphql';
|
||||
|
||||
@InputType()
|
||||
export class PipelineStageCreateWithoutPipelineInput {
|
||||
@Field(() => String, { nullable: false })
|
||||
id!: string;
|
||||
@Field(() => String, { nullable: true })
|
||||
id?: string;
|
||||
|
||||
@Field(() => Date, { nullable: true })
|
||||
createdAt?: Date | string;
|
||||
|
||||
@ -5,8 +5,8 @@ import { PipelineProgressCreateNestedManyWithoutPipelineStageInput } from '../pi
|
||||
|
||||
@InputType()
|
||||
export class PipelineStageCreateWithoutWorkspaceInput {
|
||||
@Field(() => String, { nullable: false })
|
||||
id!: string;
|
||||
@Field(() => String, { nullable: true })
|
||||
id?: string;
|
||||
|
||||
@Field(() => Date, { nullable: true })
|
||||
createdAt?: Date | string;
|
||||
|
||||
@ -7,8 +7,8 @@ import { HideField } from '@nestjs/graphql';
|
||||
|
||||
@InputType()
|
||||
export class PipelineStageCreateInput {
|
||||
@Field(() => String, { nullable: false })
|
||||
id!: string;
|
||||
@Field(() => String, { nullable: true })
|
||||
id?: string;
|
||||
|
||||
@Field(() => Date, { nullable: true })
|
||||
createdAt?: Date | string;
|
||||
|
||||
@ -4,8 +4,8 @@ import { HideField } from '@nestjs/graphql';
|
||||
|
||||
@InputType()
|
||||
export class PipelineStageUncheckedCreateWithoutPipelineProgressesInput {
|
||||
@Field(() => String, { nullable: false })
|
||||
id!: string;
|
||||
@Field(() => String, { nullable: true })
|
||||
id?: string;
|
||||
|
||||
@Field(() => Date, { nullable: true })
|
||||
createdAt?: Date | string;
|
||||
|
||||
@ -5,8 +5,8 @@ import { PipelineProgressUncheckedCreateNestedManyWithoutPipelineStageInput } fr
|
||||
|
||||
@InputType()
|
||||
export class PipelineStageUncheckedCreateWithoutPipelineInput {
|
||||
@Field(() => String, { nullable: false })
|
||||
id!: string;
|
||||
@Field(() => String, { nullable: true })
|
||||
id?: string;
|
||||
|
||||
@Field(() => Date, { nullable: true })
|
||||
createdAt?: Date | string;
|
||||
|
||||
@ -4,8 +4,8 @@ import { PipelineProgressUncheckedCreateNestedManyWithoutPipelineStageInput } fr
|
||||
|
||||
@InputType()
|
||||
export class PipelineStageUncheckedCreateWithoutWorkspaceInput {
|
||||
@Field(() => String, { nullable: false })
|
||||
id!: string;
|
||||
@Field(() => String, { nullable: true })
|
||||
id?: string;
|
||||
|
||||
@Field(() => Date, { nullable: true })
|
||||
createdAt?: Date | string;
|
||||
|
||||
@ -5,8 +5,8 @@ import { PipelineProgressUncheckedCreateNestedManyWithoutPipelineStageInput } fr
|
||||
|
||||
@InputType()
|
||||
export class PipelineStageUncheckedCreateInput {
|
||||
@Field(() => String, { nullable: false })
|
||||
id!: string;
|
||||
@Field(() => String, { nullable: true })
|
||||
id?: string;
|
||||
|
||||
@Field(() => Date, { nullable: true })
|
||||
createdAt?: Date | string;
|
||||
|
||||
@ -3,8 +3,8 @@ import { InputType } from '@nestjs/graphql';
|
||||
|
||||
@InputType()
|
||||
export class PipelineCreateManyWorkspaceInput {
|
||||
@Field(() => String, { nullable: false })
|
||||
id!: string;
|
||||
@Field(() => String, { nullable: true })
|
||||
id?: string;
|
||||
|
||||
@Field(() => Date, { nullable: true })
|
||||
createdAt?: Date | string;
|
||||
|
||||
@ -4,8 +4,8 @@ import { HideField } from '@nestjs/graphql';
|
||||
|
||||
@InputType()
|
||||
export class PipelineCreateManyInput {
|
||||
@Field(() => String, { nullable: false })
|
||||
id!: string;
|
||||
@Field(() => String, { nullable: true })
|
||||
id?: string;
|
||||
|
||||
@Field(() => Date, { nullable: true })
|
||||
createdAt?: Date | string;
|
||||
|
||||
@ -6,8 +6,8 @@ import { HideField } from '@nestjs/graphql';
|
||||
|
||||
@InputType()
|
||||
export class PipelineCreateWithoutPipelineProgressesInput {
|
||||
@Field(() => String, { nullable: false })
|
||||
id!: string;
|
||||
@Field(() => String, { nullable: true })
|
||||
id?: string;
|
||||
|
||||
@Field(() => Date, { nullable: true })
|
||||
createdAt?: Date | string;
|
||||
|
||||
@ -6,8 +6,8 @@ import { HideField } from '@nestjs/graphql';
|
||||
|
||||
@InputType()
|
||||
export class PipelineCreateWithoutPipelineStagesInput {
|
||||
@Field(() => String, { nullable: false })
|
||||
id!: string;
|
||||
@Field(() => String, { nullable: true })
|
||||
id?: string;
|
||||
|
||||
@Field(() => Date, { nullable: true })
|
||||
createdAt?: Date | string;
|
||||
|
||||
@ -5,8 +5,8 @@ import { PipelineProgressCreateNestedManyWithoutPipelineInput } from '../pipelin
|
||||
|
||||
@InputType()
|
||||
export class PipelineCreateWithoutWorkspaceInput {
|
||||
@Field(() => String, { nullable: false })
|
||||
id!: string;
|
||||
@Field(() => String, { nullable: true })
|
||||
id?: string;
|
||||
|
||||
@Field(() => Date, { nullable: true })
|
||||
createdAt?: Date | string;
|
||||
|
||||
@ -7,8 +7,8 @@ import { HideField } from '@nestjs/graphql';
|
||||
|
||||
@InputType()
|
||||
export class PipelineCreateInput {
|
||||
@Field(() => String, { nullable: false })
|
||||
id!: string;
|
||||
@Field(() => String, { nullable: true })
|
||||
id?: string;
|
||||
|
||||
@Field(() => Date, { nullable: true })
|
||||
createdAt?: Date | string;
|
||||
|
||||
@ -5,8 +5,8 @@ import { PipelineStageUncheckedCreateNestedManyWithoutPipelineInput } from '../p
|
||||
|
||||
@InputType()
|
||||
export class PipelineUncheckedCreateWithoutPipelineProgressesInput {
|
||||
@Field(() => String, { nullable: false })
|
||||
id!: string;
|
||||
@Field(() => String, { nullable: true })
|
||||
id?: string;
|
||||
|
||||
@Field(() => Date, { nullable: true })
|
||||
createdAt?: Date | string;
|
||||
|
||||
@ -5,8 +5,8 @@ import { PipelineProgressUncheckedCreateNestedManyWithoutPipelineInput } from '.
|
||||
|
||||
@InputType()
|
||||
export class PipelineUncheckedCreateWithoutPipelineStagesInput {
|
||||
@Field(() => String, { nullable: false })
|
||||
id!: string;
|
||||
@Field(() => String, { nullable: true })
|
||||
id?: string;
|
||||
|
||||
@Field(() => Date, { nullable: true })
|
||||
createdAt?: Date | string;
|
||||
|
||||
@ -5,8 +5,8 @@ import { PipelineProgressUncheckedCreateNestedManyWithoutPipelineInput } from '.
|
||||
|
||||
@InputType()
|
||||
export class PipelineUncheckedCreateWithoutWorkspaceInput {
|
||||
@Field(() => String, { nullable: false })
|
||||
id!: string;
|
||||
@Field(() => String, { nullable: true })
|
||||
id?: string;
|
||||
|
||||
@Field(() => Date, { nullable: true })
|
||||
createdAt?: Date | string;
|
||||
|
||||
@ -6,8 +6,8 @@ import { PipelineProgressUncheckedCreateNestedManyWithoutPipelineInput } from '.
|
||||
|
||||
@InputType()
|
||||
export class PipelineUncheckedCreateInput {
|
||||
@Field(() => String, { nullable: false })
|
||||
id!: string;
|
||||
@Field(() => String, { nullable: true })
|
||||
id?: string;
|
||||
|
||||
@Field(() => Date, { nullable: true })
|
||||
createdAt?: Date | string;
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
import { Field } from '@nestjs/graphql';
|
||||
import { InputType } from '@nestjs/graphql';
|
||||
import { HideField } from '@nestjs/graphql';
|
||||
|
||||
@InputType()
|
||||
export class RefreshTokenCountAggregateInput {
|
||||
@ -12,13 +13,16 @@ export class RefreshTokenCountAggregateInput {
|
||||
@Field(() => Boolean, { nullable: true })
|
||||
updatedAt?: true;
|
||||
|
||||
@Field(() => Boolean, { nullable: true })
|
||||
isRevoked?: true;
|
||||
|
||||
@Field(() => Boolean, { nullable: true })
|
||||
expiresAt?: true;
|
||||
|
||||
@Field(() => Boolean, { nullable: true })
|
||||
deletedAt?: true;
|
||||
|
||||
@Field(() => Boolean, { nullable: true })
|
||||
refreshToken?: true;
|
||||
|
||||
@Field(() => Boolean, { nullable: true })
|
||||
@HideField()
|
||||
userId?: true;
|
||||
|
||||
@Field(() => Boolean, { nullable: true })
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
import { Field } from '@nestjs/graphql';
|
||||
import { ObjectType } from '@nestjs/graphql';
|
||||
import { Int } from '@nestjs/graphql';
|
||||
import { HideField } from '@nestjs/graphql';
|
||||
|
||||
@ObjectType()
|
||||
export class RefreshTokenCountAggregate {
|
||||
@ -13,13 +14,16 @@ export class RefreshTokenCountAggregate {
|
||||
@Field(() => Int, { nullable: false })
|
||||
updatedAt!: number;
|
||||
|
||||
@Field(() => Int, { nullable: false })
|
||||
isRevoked!: number;
|
||||
|
||||
@Field(() => Int, { nullable: false })
|
||||
expiresAt!: number;
|
||||
|
||||
@Field(() => Int, { nullable: false })
|
||||
deletedAt!: number;
|
||||
|
||||
@Field(() => Int, { nullable: false })
|
||||
refreshToken!: number;
|
||||
|
||||
@Field(() => Int, { nullable: false })
|
||||
@HideField()
|
||||
userId!: number;
|
||||
|
||||
@Field(() => Int, { nullable: false })
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
import { Field } from '@nestjs/graphql';
|
||||
import { InputType } from '@nestjs/graphql';
|
||||
import { SortOrder } from '../prisma/sort-order.enum';
|
||||
import { HideField } from '@nestjs/graphql';
|
||||
|
||||
@InputType()
|
||||
export class RefreshTokenCountOrderByAggregateInput {
|
||||
@ -13,12 +14,15 @@ export class RefreshTokenCountOrderByAggregateInput {
|
||||
@Field(() => SortOrder, { nullable: true })
|
||||
updatedAt?: keyof typeof SortOrder;
|
||||
|
||||
@Field(() => SortOrder, { nullable: true })
|
||||
isRevoked?: keyof typeof SortOrder;
|
||||
|
||||
@Field(() => SortOrder, { nullable: true })
|
||||
expiresAt?: keyof typeof SortOrder;
|
||||
|
||||
@Field(() => SortOrder, { nullable: true })
|
||||
deletedAt?: keyof typeof SortOrder;
|
||||
|
||||
@Field(() => SortOrder, { nullable: true })
|
||||
refreshToken?: keyof typeof SortOrder;
|
||||
|
||||
@Field(() => SortOrder, { nullable: true })
|
||||
@HideField()
|
||||
userId?: keyof typeof SortOrder;
|
||||
}
|
||||
|
||||
@ -3,8 +3,8 @@ import { InputType } from '@nestjs/graphql';
|
||||
|
||||
@InputType()
|
||||
export class RefreshTokenCreateManyUserInput {
|
||||
@Field(() => String, { nullable: false })
|
||||
id!: string;
|
||||
@Field(() => String, { nullable: true })
|
||||
id?: string;
|
||||
|
||||
@Field(() => Date, { nullable: true })
|
||||
createdAt?: Date | string;
|
||||
@ -12,9 +12,12 @@ export class RefreshTokenCreateManyUserInput {
|
||||
@Field(() => Date, { nullable: true })
|
||||
updatedAt?: Date | string;
|
||||
|
||||
@Field(() => Boolean, { nullable: true })
|
||||
isRevoked?: boolean;
|
||||
|
||||
@Field(() => Date, { nullable: false })
|
||||
expiresAt!: Date | string;
|
||||
|
||||
@Field(() => Date, { nullable: true })
|
||||
deletedAt?: Date | string;
|
||||
|
||||
@Field(() => String, { nullable: false })
|
||||
refreshToken!: string;
|
||||
}
|
||||
|
||||
@ -1,10 +1,11 @@
|
||||
import { Field } from '@nestjs/graphql';
|
||||
import { InputType } from '@nestjs/graphql';
|
||||
import { HideField } from '@nestjs/graphql';
|
||||
|
||||
@InputType()
|
||||
export class RefreshTokenCreateManyInput {
|
||||
@Field(() => String, { nullable: false })
|
||||
id!: string;
|
||||
@Field(() => String, { nullable: true })
|
||||
id?: string;
|
||||
|
||||
@Field(() => Date, { nullable: true })
|
||||
createdAt?: Date | string;
|
||||
@ -12,12 +13,15 @@ export class RefreshTokenCreateManyInput {
|
||||
@Field(() => Date, { nullable: true })
|
||||
updatedAt?: Date | string;
|
||||
|
||||
@Field(() => Boolean, { nullable: true })
|
||||
isRevoked?: boolean;
|
||||
|
||||
@Field(() => Date, { nullable: false })
|
||||
expiresAt!: Date | string;
|
||||
|
||||
@Field(() => Date, { nullable: true })
|
||||
deletedAt?: Date | string;
|
||||
|
||||
@Field(() => String, { nullable: false })
|
||||
refreshToken!: string;
|
||||
|
||||
@Field(() => String, { nullable: false })
|
||||
@HideField()
|
||||
userId!: string;
|
||||
}
|
||||
|
||||
@ -3,8 +3,8 @@ import { InputType } from '@nestjs/graphql';
|
||||
|
||||
@InputType()
|
||||
export class RefreshTokenCreateWithoutUserInput {
|
||||
@Field(() => String, { nullable: false })
|
||||
id!: string;
|
||||
@Field(() => String, { nullable: true })
|
||||
id?: string;
|
||||
|
||||
@Field(() => Date, { nullable: true })
|
||||
createdAt?: Date | string;
|
||||
@ -12,9 +12,12 @@ export class RefreshTokenCreateWithoutUserInput {
|
||||
@Field(() => Date, { nullable: true })
|
||||
updatedAt?: Date | string;
|
||||
|
||||
@Field(() => Boolean, { nullable: true })
|
||||
isRevoked?: boolean;
|
||||
|
||||
@Field(() => Date, { nullable: false })
|
||||
expiresAt!: Date | string;
|
||||
|
||||
@Field(() => Date, { nullable: true })
|
||||
deletedAt?: Date | string;
|
||||
|
||||
@Field(() => String, { nullable: false })
|
||||
refreshToken!: string;
|
||||
}
|
||||
|
||||
@ -1,11 +1,12 @@
|
||||
import { Field } from '@nestjs/graphql';
|
||||
import { InputType } from '@nestjs/graphql';
|
||||
import { UserCreateNestedOneWithoutRefreshTokensInput } from '../user/user-create-nested-one-without-refresh-tokens.input';
|
||||
import { HideField } from '@nestjs/graphql';
|
||||
|
||||
@InputType()
|
||||
export class RefreshTokenCreateInput {
|
||||
@Field(() => String, { nullable: false })
|
||||
id!: string;
|
||||
@Field(() => String, { nullable: true })
|
||||
id?: string;
|
||||
|
||||
@Field(() => Date, { nullable: true })
|
||||
createdAt?: Date | string;
|
||||
@ -13,14 +14,15 @@ export class RefreshTokenCreateInput {
|
||||
@Field(() => Date, { nullable: true })
|
||||
updatedAt?: Date | string;
|
||||
|
||||
@Field(() => Boolean, { nullable: true })
|
||||
isRevoked?: boolean;
|
||||
|
||||
@Field(() => Date, { nullable: false })
|
||||
expiresAt!: Date | string;
|
||||
|
||||
@Field(() => Date, { nullable: true })
|
||||
deletedAt?: Date | string;
|
||||
|
||||
@Field(() => String, { nullable: false })
|
||||
refreshToken!: string;
|
||||
|
||||
@Field(() => UserCreateNestedOneWithoutRefreshTokensInput, {
|
||||
nullable: false,
|
||||
})
|
||||
@HideField()
|
||||
user!: UserCreateNestedOneWithoutRefreshTokensInput;
|
||||
}
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
import { Field } from '@nestjs/graphql';
|
||||
import { ObjectType } from '@nestjs/graphql';
|
||||
import { HideField } from '@nestjs/graphql';
|
||||
import { RefreshTokenCountAggregate } from './refresh-token-count-aggregate.output';
|
||||
import { RefreshTokenMinAggregate } from './refresh-token-min-aggregate.output';
|
||||
import { RefreshTokenMaxAggregate } from './refresh-token-max-aggregate.output';
|
||||
@ -15,13 +16,16 @@ export class RefreshTokenGroupBy {
|
||||
@Field(() => Date, { nullable: false })
|
||||
updatedAt!: Date | string;
|
||||
|
||||
@Field(() => Boolean, { nullable: false })
|
||||
isRevoked!: boolean;
|
||||
|
||||
@Field(() => Date, { nullable: false })
|
||||
expiresAt!: Date | string;
|
||||
|
||||
@Field(() => Date, { nullable: true })
|
||||
deletedAt?: Date | string;
|
||||
|
||||
@Field(() => String, { nullable: false })
|
||||
refreshToken!: string;
|
||||
|
||||
@Field(() => String, { nullable: false })
|
||||
@HideField()
|
||||
userId!: string;
|
||||
|
||||
@Field(() => RefreshTokenCountAggregate, { nullable: true })
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
import { Field } from '@nestjs/graphql';
|
||||
import { InputType } from '@nestjs/graphql';
|
||||
import { HideField } from '@nestjs/graphql';
|
||||
|
||||
@InputType()
|
||||
export class RefreshTokenMaxAggregateInput {
|
||||
@ -12,12 +13,15 @@ export class RefreshTokenMaxAggregateInput {
|
||||
@Field(() => Boolean, { nullable: true })
|
||||
updatedAt?: true;
|
||||
|
||||
@Field(() => Boolean, { nullable: true })
|
||||
isRevoked?: true;
|
||||
|
||||
@Field(() => Boolean, { nullable: true })
|
||||
expiresAt?: true;
|
||||
|
||||
@Field(() => Boolean, { nullable: true })
|
||||
deletedAt?: true;
|
||||
|
||||
@Field(() => Boolean, { nullable: true })
|
||||
refreshToken?: true;
|
||||
|
||||
@Field(() => Boolean, { nullable: true })
|
||||
@HideField()
|
||||
userId?: true;
|
||||
}
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
import { Field } from '@nestjs/graphql';
|
||||
import { ObjectType } from '@nestjs/graphql';
|
||||
import { HideField } from '@nestjs/graphql';
|
||||
|
||||
@ObjectType()
|
||||
export class RefreshTokenMaxAggregate {
|
||||
@ -12,12 +13,15 @@ export class RefreshTokenMaxAggregate {
|
||||
@Field(() => Date, { nullable: true })
|
||||
updatedAt?: Date | string;
|
||||
|
||||
@Field(() => Boolean, { nullable: true })
|
||||
isRevoked?: boolean;
|
||||
|
||||
@Field(() => Date, { nullable: true })
|
||||
expiresAt?: Date | string;
|
||||
|
||||
@Field(() => Date, { nullable: true })
|
||||
deletedAt?: Date | string;
|
||||
|
||||
@Field(() => String, { nullable: true })
|
||||
refreshToken?: string;
|
||||
|
||||
@Field(() => String, { nullable: true })
|
||||
@HideField()
|
||||
userId?: string;
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user