mirror of
https://github.com/lingble/twenty.git
synced 2025-10-29 20:02:29 +00:00
feat: implementing experience page (#718)
* feat: add color scheme toggle * feat: colorScheme stored in UserSettings model * feat: add stories * fix: AnimatePresence exit not working --------- Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
This commit is contained in:
@@ -15,15 +15,15 @@ import { Index } from '~/pages/auth/Index';
|
||||
import { PasswordLogin } from '~/pages/auth/PasswordLogin';
|
||||
import { Verify } from '~/pages/auth/Verify';
|
||||
import { Companies } from '~/pages/companies/Companies';
|
||||
import { CompanyShow } from '~/pages/companies/CompanyShow';
|
||||
import { Opportunities } from '~/pages/opportunities/Opportunities';
|
||||
import { People } from '~/pages/people/People';
|
||||
import { PersonShow } from '~/pages/people/PersonShow';
|
||||
import { SettingsExperience } from '~/pages/settings/SettingsExperience';
|
||||
import { SettingsProfile } from '~/pages/settings/SettingsProfile';
|
||||
import { SettingsWorksapce } from '~/pages/settings/SettingsWorkspace';
|
||||
import { SettingsWorkspaceMembers } from '~/pages/settings/SettingsWorkspaceMembers';
|
||||
|
||||
import { CompanyShow } from './pages/companies/CompanyShow';
|
||||
import { PersonShow } from './pages/people/PersonShow';
|
||||
import { SettingsWorksapce } from './pages/settings/SettingsWorkspace';
|
||||
import { AppInternalHooks } from './sync-hooks/AppInternalHooks';
|
||||
import { AppInternalHooks } from '~/sync-hooks/AppInternalHooks';
|
||||
|
||||
/**
|
||||
* AuthRoutes is used to allow transitions between auth pages with framer-motion.
|
||||
@@ -100,6 +100,10 @@ export function App() {
|
||||
path={SettingsPath.ProfilePage}
|
||||
element={<SettingsProfile />}
|
||||
/>
|
||||
<Route
|
||||
path={SettingsPath.Experience}
|
||||
element={<SettingsExperience />}
|
||||
/>
|
||||
<Route
|
||||
path={SettingsPath.WorkspaceMembersPage}
|
||||
element={<SettingsWorkspaceMembers />}
|
||||
|
||||
@@ -75,6 +75,12 @@ export type ClientConfig = {
|
||||
telemetry: Telemetry;
|
||||
};
|
||||
|
||||
export enum ColorScheme {
|
||||
Dark = 'Dark',
|
||||
Light = 'Light',
|
||||
System = 'System'
|
||||
}
|
||||
|
||||
export type Comment = {
|
||||
__typename?: 'Comment';
|
||||
author: User;
|
||||
@@ -1277,6 +1283,17 @@ export type EnumActivityTypeFilter = {
|
||||
notIn?: InputMaybe<Array<ActivityType>>;
|
||||
};
|
||||
|
||||
export type EnumColorSchemeFieldUpdateOperationsInput = {
|
||||
set?: InputMaybe<ColorScheme>;
|
||||
};
|
||||
|
||||
export type EnumColorSchemeFilter = {
|
||||
equals?: InputMaybe<ColorScheme>;
|
||||
in?: InputMaybe<Array<ColorScheme>>;
|
||||
not?: InputMaybe<NestedEnumColorSchemeFilter>;
|
||||
notIn?: InputMaybe<Array<ColorScheme>>;
|
||||
};
|
||||
|
||||
export type EnumCommentableTypeFieldUpdateOperationsInput = {
|
||||
set?: InputMaybe<CommentableType>;
|
||||
};
|
||||
@@ -1542,6 +1559,13 @@ export type NestedEnumActivityTypeFilter = {
|
||||
notIn?: InputMaybe<Array<ActivityType>>;
|
||||
};
|
||||
|
||||
export type NestedEnumColorSchemeFilter = {
|
||||
equals?: InputMaybe<ColorScheme>;
|
||||
in?: InputMaybe<Array<ColorScheme>>;
|
||||
not?: InputMaybe<NestedEnumColorSchemeFilter>;
|
||||
notIn?: InputMaybe<Array<ColorScheme>>;
|
||||
};
|
||||
|
||||
export type NestedEnumCommentableTypeFilter = {
|
||||
equals?: InputMaybe<CommentableType>;
|
||||
in?: InputMaybe<Array<CommentableType>>;
|
||||
@@ -2843,9 +2867,10 @@ export type User = {
|
||||
id: Scalars['ID'];
|
||||
lastName?: Maybe<Scalars['String']>;
|
||||
lastSeen?: Maybe<Scalars['DateTime']>;
|
||||
locale: Scalars['String'];
|
||||
metadata?: Maybe<Scalars['JSON']>;
|
||||
phoneNumber?: Maybe<Scalars['String']>;
|
||||
settings: UserSettings;
|
||||
settingsId: Scalars['String'];
|
||||
updatedAt: Scalars['DateTime'];
|
||||
workspaceMember?: Maybe<WorkspaceMember>;
|
||||
};
|
||||
@@ -2909,9 +2934,9 @@ export type UserCreateWithoutAssignedCommentThreadsInput = {
|
||||
id?: InputMaybe<Scalars['String']>;
|
||||
lastName?: InputMaybe<Scalars['String']>;
|
||||
lastSeen?: InputMaybe<Scalars['DateTime']>;
|
||||
locale: Scalars['String'];
|
||||
metadata?: InputMaybe<Scalars['JSON']>;
|
||||
phoneNumber?: InputMaybe<Scalars['String']>;
|
||||
settings: UserSettingsCreateNestedOneWithoutUserInput;
|
||||
updatedAt?: InputMaybe<Scalars['DateTime']>;
|
||||
};
|
||||
|
||||
@@ -2928,9 +2953,9 @@ export type UserCreateWithoutAuthoredCommentThreadsInput = {
|
||||
id?: InputMaybe<Scalars['String']>;
|
||||
lastName?: InputMaybe<Scalars['String']>;
|
||||
lastSeen?: InputMaybe<Scalars['DateTime']>;
|
||||
locale: Scalars['String'];
|
||||
metadata?: InputMaybe<Scalars['JSON']>;
|
||||
phoneNumber?: InputMaybe<Scalars['String']>;
|
||||
settings: UserSettingsCreateNestedOneWithoutUserInput;
|
||||
updatedAt?: InputMaybe<Scalars['DateTime']>;
|
||||
};
|
||||
|
||||
@@ -2947,9 +2972,9 @@ export type UserCreateWithoutCommentsInput = {
|
||||
id?: InputMaybe<Scalars['String']>;
|
||||
lastName?: InputMaybe<Scalars['String']>;
|
||||
lastSeen?: InputMaybe<Scalars['DateTime']>;
|
||||
locale: Scalars['String'];
|
||||
metadata?: InputMaybe<Scalars['JSON']>;
|
||||
phoneNumber?: InputMaybe<Scalars['String']>;
|
||||
settings: UserSettingsCreateNestedOneWithoutUserInput;
|
||||
updatedAt?: InputMaybe<Scalars['DateTime']>;
|
||||
};
|
||||
|
||||
@@ -2967,9 +2992,9 @@ export type UserCreateWithoutWorkspaceMemberInput = {
|
||||
id?: InputMaybe<Scalars['String']>;
|
||||
lastName?: InputMaybe<Scalars['String']>;
|
||||
lastSeen?: InputMaybe<Scalars['DateTime']>;
|
||||
locale: Scalars['String'];
|
||||
metadata?: InputMaybe<Scalars['JSON']>;
|
||||
phoneNumber?: InputMaybe<Scalars['String']>;
|
||||
settings: UserSettingsCreateNestedOneWithoutUserInput;
|
||||
updatedAt?: InputMaybe<Scalars['DateTime']>;
|
||||
};
|
||||
|
||||
@@ -2992,9 +3017,10 @@ export type UserOrderByWithRelationInput = {
|
||||
id?: InputMaybe<SortOrder>;
|
||||
lastName?: InputMaybe<SortOrder>;
|
||||
lastSeen?: InputMaybe<SortOrder>;
|
||||
locale?: InputMaybe<SortOrder>;
|
||||
metadata?: InputMaybe<SortOrder>;
|
||||
phoneNumber?: InputMaybe<SortOrder>;
|
||||
settings?: InputMaybe<UserSettingsOrderByWithRelationInput>;
|
||||
settingsId?: InputMaybe<SortOrder>;
|
||||
updatedAt?: InputMaybe<SortOrder>;
|
||||
};
|
||||
|
||||
@@ -3014,13 +3040,93 @@ export enum UserScalarFieldEnum {
|
||||
Id = 'id',
|
||||
LastName = 'lastName',
|
||||
LastSeen = 'lastSeen',
|
||||
Locale = 'locale',
|
||||
Metadata = 'metadata',
|
||||
PasswordHash = 'passwordHash',
|
||||
PhoneNumber = 'phoneNumber',
|
||||
SettingsId = 'settingsId',
|
||||
UpdatedAt = 'updatedAt'
|
||||
}
|
||||
|
||||
export type UserSettings = {
|
||||
__typename?: 'UserSettings';
|
||||
colorScheme: ColorScheme;
|
||||
createdAt: Scalars['DateTime'];
|
||||
id: Scalars['ID'];
|
||||
locale: Scalars['String'];
|
||||
updatedAt: Scalars['DateTime'];
|
||||
user?: Maybe<User>;
|
||||
};
|
||||
|
||||
export type UserSettingsCreateNestedOneWithoutUserInput = {
|
||||
connect?: InputMaybe<UserSettingsWhereUniqueInput>;
|
||||
connectOrCreate?: InputMaybe<UserSettingsCreateOrConnectWithoutUserInput>;
|
||||
create?: InputMaybe<UserSettingsCreateWithoutUserInput>;
|
||||
};
|
||||
|
||||
export type UserSettingsCreateOrConnectWithoutUserInput = {
|
||||
create: UserSettingsCreateWithoutUserInput;
|
||||
where: UserSettingsWhereUniqueInput;
|
||||
};
|
||||
|
||||
export type UserSettingsCreateWithoutUserInput = {
|
||||
colorScheme?: InputMaybe<ColorScheme>;
|
||||
createdAt?: InputMaybe<Scalars['DateTime']>;
|
||||
id?: InputMaybe<Scalars['String']>;
|
||||
locale: Scalars['String'];
|
||||
updatedAt?: InputMaybe<Scalars['DateTime']>;
|
||||
};
|
||||
|
||||
export type UserSettingsOrderByWithRelationInput = {
|
||||
colorScheme?: InputMaybe<SortOrder>;
|
||||
createdAt?: InputMaybe<SortOrder>;
|
||||
id?: InputMaybe<SortOrder>;
|
||||
locale?: InputMaybe<SortOrder>;
|
||||
updatedAt?: InputMaybe<SortOrder>;
|
||||
user?: InputMaybe<UserOrderByWithRelationInput>;
|
||||
};
|
||||
|
||||
export type UserSettingsRelationFilter = {
|
||||
is?: InputMaybe<UserSettingsWhereInput>;
|
||||
isNot?: InputMaybe<UserSettingsWhereInput>;
|
||||
};
|
||||
|
||||
export type UserSettingsUpdateOneRequiredWithoutUserNestedInput = {
|
||||
connect?: InputMaybe<UserSettingsWhereUniqueInput>;
|
||||
connectOrCreate?: InputMaybe<UserSettingsCreateOrConnectWithoutUserInput>;
|
||||
create?: InputMaybe<UserSettingsCreateWithoutUserInput>;
|
||||
update?: InputMaybe<UserSettingsUpdateWithoutUserInput>;
|
||||
upsert?: InputMaybe<UserSettingsUpsertWithoutUserInput>;
|
||||
};
|
||||
|
||||
export type UserSettingsUpdateWithoutUserInput = {
|
||||
colorScheme?: InputMaybe<EnumColorSchemeFieldUpdateOperationsInput>;
|
||||
createdAt?: InputMaybe<DateTimeFieldUpdateOperationsInput>;
|
||||
id?: InputMaybe<StringFieldUpdateOperationsInput>;
|
||||
locale?: InputMaybe<StringFieldUpdateOperationsInput>;
|
||||
updatedAt?: InputMaybe<DateTimeFieldUpdateOperationsInput>;
|
||||
};
|
||||
|
||||
export type UserSettingsUpsertWithoutUserInput = {
|
||||
create: UserSettingsCreateWithoutUserInput;
|
||||
update: UserSettingsUpdateWithoutUserInput;
|
||||
};
|
||||
|
||||
export type UserSettingsWhereInput = {
|
||||
AND?: InputMaybe<Array<UserSettingsWhereInput>>;
|
||||
NOT?: InputMaybe<Array<UserSettingsWhereInput>>;
|
||||
OR?: InputMaybe<Array<UserSettingsWhereInput>>;
|
||||
colorScheme?: InputMaybe<EnumColorSchemeFilter>;
|
||||
createdAt?: InputMaybe<DateTimeFilter>;
|
||||
id?: InputMaybe<StringFilter>;
|
||||
locale?: InputMaybe<StringFilter>;
|
||||
updatedAt?: InputMaybe<DateTimeFilter>;
|
||||
user?: InputMaybe<UserRelationFilter>;
|
||||
};
|
||||
|
||||
export type UserSettingsWhereUniqueInput = {
|
||||
id?: InputMaybe<Scalars['String']>;
|
||||
};
|
||||
|
||||
export type UserUpdateInput = {
|
||||
assignedCommentThreads?: InputMaybe<CommentThreadUpdateManyWithoutAssigneeNestedInput>;
|
||||
authoredCommentThreads?: InputMaybe<CommentThreadUpdateManyWithoutAuthorNestedInput>;
|
||||
@@ -3035,9 +3141,9 @@ export type UserUpdateInput = {
|
||||
id?: InputMaybe<StringFieldUpdateOperationsInput>;
|
||||
lastName?: InputMaybe<NullableStringFieldUpdateOperationsInput>;
|
||||
lastSeen?: InputMaybe<NullableDateTimeFieldUpdateOperationsInput>;
|
||||
locale?: InputMaybe<StringFieldUpdateOperationsInput>;
|
||||
metadata?: InputMaybe<Scalars['JSON']>;
|
||||
phoneNumber?: InputMaybe<NullableStringFieldUpdateOperationsInput>;
|
||||
settings?: InputMaybe<UserSettingsUpdateOneRequiredWithoutUserNestedInput>;
|
||||
updatedAt?: InputMaybe<DateTimeFieldUpdateOperationsInput>;
|
||||
};
|
||||
|
||||
@@ -3092,9 +3198,9 @@ export type UserUpdateWithoutAssignedCommentThreadsInput = {
|
||||
id?: InputMaybe<StringFieldUpdateOperationsInput>;
|
||||
lastName?: InputMaybe<NullableStringFieldUpdateOperationsInput>;
|
||||
lastSeen?: InputMaybe<NullableDateTimeFieldUpdateOperationsInput>;
|
||||
locale?: InputMaybe<StringFieldUpdateOperationsInput>;
|
||||
metadata?: InputMaybe<Scalars['JSON']>;
|
||||
phoneNumber?: InputMaybe<NullableStringFieldUpdateOperationsInput>;
|
||||
settings?: InputMaybe<UserSettingsUpdateOneRequiredWithoutUserNestedInput>;
|
||||
updatedAt?: InputMaybe<DateTimeFieldUpdateOperationsInput>;
|
||||
};
|
||||
|
||||
@@ -3111,9 +3217,9 @@ export type UserUpdateWithoutAuthoredCommentThreadsInput = {
|
||||
id?: InputMaybe<StringFieldUpdateOperationsInput>;
|
||||
lastName?: InputMaybe<NullableStringFieldUpdateOperationsInput>;
|
||||
lastSeen?: InputMaybe<NullableDateTimeFieldUpdateOperationsInput>;
|
||||
locale?: InputMaybe<StringFieldUpdateOperationsInput>;
|
||||
metadata?: InputMaybe<Scalars['JSON']>;
|
||||
phoneNumber?: InputMaybe<NullableStringFieldUpdateOperationsInput>;
|
||||
settings?: InputMaybe<UserSettingsUpdateOneRequiredWithoutUserNestedInput>;
|
||||
updatedAt?: InputMaybe<DateTimeFieldUpdateOperationsInput>;
|
||||
};
|
||||
|
||||
@@ -3130,9 +3236,9 @@ export type UserUpdateWithoutCommentsInput = {
|
||||
id?: InputMaybe<StringFieldUpdateOperationsInput>;
|
||||
lastName?: InputMaybe<NullableStringFieldUpdateOperationsInput>;
|
||||
lastSeen?: InputMaybe<NullableDateTimeFieldUpdateOperationsInput>;
|
||||
locale?: InputMaybe<StringFieldUpdateOperationsInput>;
|
||||
metadata?: InputMaybe<Scalars['JSON']>;
|
||||
phoneNumber?: InputMaybe<NullableStringFieldUpdateOperationsInput>;
|
||||
settings?: InputMaybe<UserSettingsUpdateOneRequiredWithoutUserNestedInput>;
|
||||
updatedAt?: InputMaybe<DateTimeFieldUpdateOperationsInput>;
|
||||
};
|
||||
|
||||
@@ -3150,9 +3256,9 @@ export type UserUpdateWithoutWorkspaceMemberInput = {
|
||||
id?: InputMaybe<StringFieldUpdateOperationsInput>;
|
||||
lastName?: InputMaybe<NullableStringFieldUpdateOperationsInput>;
|
||||
lastSeen?: InputMaybe<NullableDateTimeFieldUpdateOperationsInput>;
|
||||
locale?: InputMaybe<StringFieldUpdateOperationsInput>;
|
||||
metadata?: InputMaybe<Scalars['JSON']>;
|
||||
phoneNumber?: InputMaybe<NullableStringFieldUpdateOperationsInput>;
|
||||
settings?: InputMaybe<UserSettingsUpdateOneRequiredWithoutUserNestedInput>;
|
||||
updatedAt?: InputMaybe<DateTimeFieldUpdateOperationsInput>;
|
||||
};
|
||||
|
||||
@@ -3193,15 +3299,17 @@ export type UserWhereInput = {
|
||||
id?: InputMaybe<StringFilter>;
|
||||
lastName?: InputMaybe<StringNullableFilter>;
|
||||
lastSeen?: InputMaybe<DateTimeNullableFilter>;
|
||||
locale?: InputMaybe<StringFilter>;
|
||||
metadata?: InputMaybe<JsonNullableFilter>;
|
||||
phoneNumber?: InputMaybe<StringNullableFilter>;
|
||||
settings?: InputMaybe<UserSettingsRelationFilter>;
|
||||
settingsId?: InputMaybe<StringFilter>;
|
||||
updatedAt?: InputMaybe<DateTimeFilter>;
|
||||
};
|
||||
|
||||
export type UserWhereUniqueInput = {
|
||||
email?: InputMaybe<Scalars['String']>;
|
||||
id?: InputMaybe<Scalars['String']>;
|
||||
settingsId?: InputMaybe<Scalars['String']>;
|
||||
};
|
||||
|
||||
export type Verify = {
|
||||
@@ -3737,7 +3845,7 @@ export type SearchCompanyQuery = { __typename?: 'Query', searchResults: Array<{
|
||||
export type GetCurrentUserQueryVariables = Exact<{ [key: string]: never; }>;
|
||||
|
||||
|
||||
export type GetCurrentUserQuery = { __typename?: 'Query', currentUser: { __typename?: 'User', id: string, email: string, displayName: string, firstName?: string | null, lastName?: string | null, avatarUrl?: string | null, workspaceMember?: { __typename?: 'WorkspaceMember', id: string, workspace: { __typename?: 'Workspace', id: string, domainName?: string | null, displayName?: string | null, logo?: string | null, inviteHash?: string | null } } | null } };
|
||||
export type GetCurrentUserQuery = { __typename?: 'Query', currentUser: { __typename?: 'User', id: string, email: string, displayName: string, firstName?: string | null, lastName?: string | null, avatarUrl?: string | null, workspaceMember?: { __typename?: 'WorkspaceMember', id: string, workspace: { __typename?: 'Workspace', id: string, domainName?: string | null, displayName?: string | null, logo?: string | null, inviteHash?: string | null } } | null, settings: { __typename?: 'UserSettings', id: string, locale: string, colorScheme: ColorScheme } } };
|
||||
|
||||
export type GetUsersQueryVariables = Exact<{ [key: string]: never; }>;
|
||||
|
||||
@@ -3750,7 +3858,7 @@ export type UpdateUserMutationVariables = Exact<{
|
||||
}>;
|
||||
|
||||
|
||||
export type UpdateUserMutation = { __typename?: 'Mutation', updateUser: { __typename?: 'User', id: string, email: string, displayName: string, firstName?: string | null, lastName?: string | null, avatarUrl?: string | null } };
|
||||
export type UpdateUserMutation = { __typename?: 'Mutation', updateUser: { __typename?: 'User', id: string, email: string, displayName: string, firstName?: string | null, lastName?: string | null, avatarUrl?: string | null, workspaceMember?: { __typename?: 'WorkspaceMember', id: string, workspace: { __typename?: 'Workspace', id: string, domainName?: string | null, displayName?: string | null, logo?: string | null, inviteHash?: string | null } } | null, settings: { __typename?: 'UserSettings', id: string, locale: string, colorScheme: ColorScheme } } };
|
||||
|
||||
export type UploadProfilePictureMutationVariables = Exact<{
|
||||
file: Scalars['Upload'];
|
||||
@@ -3764,7 +3872,7 @@ export type RemoveProfilePictureMutationVariables = Exact<{
|
||||
}>;
|
||||
|
||||
|
||||
export type RemoveProfilePictureMutation = { __typename?: 'Mutation', updateUser: { __typename?: 'User', id: string } };
|
||||
export type RemoveProfilePictureMutation = { __typename?: 'Mutation', updateUser: { __typename?: 'User', id: string, avatarUrl?: string | null } };
|
||||
|
||||
export type GetWorkspaceMembersQueryVariables = Exact<{ [key: string]: never; }>;
|
||||
|
||||
@@ -5662,6 +5770,11 @@ export const GetCurrentUserDocument = gql`
|
||||
inviteHash
|
||||
}
|
||||
}
|
||||
settings {
|
||||
id
|
||||
locale
|
||||
colorScheme
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
@@ -5739,6 +5852,21 @@ export const UpdateUserDocument = gql`
|
||||
firstName
|
||||
lastName
|
||||
avatarUrl
|
||||
workspaceMember {
|
||||
id
|
||||
workspace {
|
||||
id
|
||||
domainName
|
||||
displayName
|
||||
logo
|
||||
inviteHash
|
||||
}
|
||||
}
|
||||
settings {
|
||||
id
|
||||
locale
|
||||
colorScheme
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
@@ -5804,6 +5932,7 @@ export const RemoveProfilePictureDocument = gql`
|
||||
mutation RemoveProfilePicture($where: UserWhereUniqueInput!) {
|
||||
updateUser(data: {avatarUrl: {set: null}}, where: $where) {
|
||||
id
|
||||
avatarUrl
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
@@ -1,26 +1,7 @@
|
||||
import { atom, AtomEffect } from 'recoil';
|
||||
import { atom } from 'recoil';
|
||||
|
||||
import { AuthTokenPair } from '~/generated/graphql';
|
||||
import { cookieStorage } from '~/utils/cookie-storage';
|
||||
|
||||
const cookieStorageEffect =
|
||||
(key: string): AtomEffect<AuthTokenPair | null> =>
|
||||
({ setSelf, onSet }) => {
|
||||
const savedValue = cookieStorage.getItem(key);
|
||||
if (savedValue != null && JSON.parse(savedValue)['accessToken']) {
|
||||
setSelf(JSON.parse(savedValue));
|
||||
}
|
||||
|
||||
onSet((newValue, _, isReset) => {
|
||||
if (!newValue) {
|
||||
cookieStorage.removeItem(key);
|
||||
return;
|
||||
}
|
||||
isReset
|
||||
? cookieStorage.removeItem(key)
|
||||
: cookieStorage.setItem(key, JSON.stringify(newValue));
|
||||
});
|
||||
};
|
||||
import { cookieStorageEffect } from '~/utils/recoil-effects';
|
||||
|
||||
export const tokenPairState = atom<AuthTokenPair | null>({
|
||||
key: 'tokenPairState',
|
||||
|
||||
@@ -42,7 +42,6 @@ export function SettingsNavbar() {
|
||||
label="Experience"
|
||||
to="/settings/profile/experience"
|
||||
icon={<IconColorSwatch size={theme.icon.size.md} />}
|
||||
soon={true}
|
||||
active={
|
||||
!!useMatch({
|
||||
path: useResolvedPath('/settings/profile/experience').pathname,
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
export enum SettingsPath {
|
||||
ProfilePage = 'profile',
|
||||
Experience = 'profile/experience',
|
||||
WorkspaceMembersPage = 'workspace-members',
|
||||
Workspace = 'workspace',
|
||||
}
|
||||
|
||||
27
front/src/modules/ui/checkmark/components/Checkmark.tsx
Normal file
27
front/src/modules/ui/checkmark/components/Checkmark.tsx
Normal file
@@ -0,0 +1,27 @@
|
||||
import React from 'react';
|
||||
import { useTheme } from '@emotion/react';
|
||||
import styled from '@emotion/styled';
|
||||
|
||||
import { IconCheck } from '@/ui/icon';
|
||||
|
||||
const StyledContainer = styled.div`
|
||||
align-items: center;
|
||||
background-color: ${({ theme }) => theme.color.blue};
|
||||
border-radius: 50%;
|
||||
display: flex;
|
||||
height: 20px;
|
||||
justify-content: center;
|
||||
width: 20px;
|
||||
`;
|
||||
|
||||
export type CheckmarkProps = React.ComponentPropsWithoutRef<'div'>;
|
||||
|
||||
export function Checkmark(props: CheckmarkProps) {
|
||||
const theme = useTheme();
|
||||
|
||||
return (
|
||||
<StyledContainer {...props}>
|
||||
<IconCheck color={theme.color.gray0} size={14} />
|
||||
</StyledContainer>
|
||||
);
|
||||
}
|
||||
235
front/src/modules/ui/color-scheme/components/ColorSchemeCard.tsx
Normal file
235
front/src/modules/ui/color-scheme/components/ColorSchemeCard.tsx
Normal file
@@ -0,0 +1,235 @@
|
||||
import React from 'react';
|
||||
import styled from '@emotion/styled';
|
||||
import {
|
||||
AnimatePresence,
|
||||
AnimationControls,
|
||||
motion,
|
||||
useAnimation,
|
||||
} from 'framer-motion';
|
||||
|
||||
import { Checkmark } from '@/ui/checkmark/components/Checkmark';
|
||||
import DarkNoise from '@/ui/themes/assets/dark-noise.png';
|
||||
import LightNoise from '@/ui/themes/assets/light-noise.png';
|
||||
import { grayScale } from '@/ui/themes/colors';
|
||||
import { ColorScheme } from '~/generated/graphql';
|
||||
|
||||
const StyledColorSchemeBackground = styled.div<
|
||||
Pick<ColorSchemeCardProps, 'variant'>
|
||||
>`
|
||||
align-items: flex-end;
|
||||
background: ${({ variant }) => {
|
||||
switch (variant) {
|
||||
case 'dark':
|
||||
return `url(${DarkNoise.toString()});`;
|
||||
case 'light':
|
||||
default:
|
||||
return `url(${LightNoise.toString()});`;
|
||||
}
|
||||
}};
|
||||
border: ${({ variant }) => {
|
||||
switch (variant) {
|
||||
case 'dark':
|
||||
return `1px solid ${grayScale.gray65};`;
|
||||
case 'light':
|
||||
default:
|
||||
return `1px solid ${grayScale.gray20};`;
|
||||
}
|
||||
}};
|
||||
border-radius: ${({ theme }) => theme.border.radius.md};
|
||||
box-sizing: border-box;
|
||||
cursor: pointer;
|
||||
display: flex;
|
||||
height: 80px;
|
||||
justify-content: flex-end;
|
||||
overflow: hidden;
|
||||
padding-left: ${({ theme }) => theme.spacing(6)};
|
||||
padding-top: ${({ theme }) => theme.spacing(6)};
|
||||
width: 120px;
|
||||
`;
|
||||
|
||||
const StyledColorSchemeContent = styled(motion.div)<
|
||||
Pick<ColorSchemeCardProps, 'variant'>
|
||||
>`
|
||||
background: ${({ theme, variant }) => {
|
||||
switch (variant) {
|
||||
case 'dark':
|
||||
return grayScale.gray70;
|
||||
case 'light':
|
||||
return theme.color.gray0;
|
||||
}
|
||||
}};
|
||||
|
||||
border-left: ${({ variant }) => {
|
||||
switch (variant) {
|
||||
case 'dark':
|
||||
return `1px solid ${grayScale.gray55};`;
|
||||
case 'light':
|
||||
default:
|
||||
return `1px solid ${grayScale.gray20};`;
|
||||
}
|
||||
}};
|
||||
border-radius: ${({ theme }) => theme.border.radius.md} 0px 0px 0px;
|
||||
border-top: ${({ variant }) => {
|
||||
switch (variant) {
|
||||
case 'dark':
|
||||
return `1px solid ${grayScale.gray55};`;
|
||||
case 'light':
|
||||
default:
|
||||
return `1px solid ${grayScale.gray20};`;
|
||||
}
|
||||
}};
|
||||
box-sizing: border-box;
|
||||
color: ${({ variant }) => {
|
||||
switch (variant) {
|
||||
case 'dark':
|
||||
return grayScale.gray30;
|
||||
case 'light':
|
||||
default:
|
||||
return grayScale.gray55;
|
||||
}
|
||||
}};
|
||||
display: flex;
|
||||
flex: 1;
|
||||
font-size: 20px;
|
||||
height: 56px;
|
||||
padding-left: ${({ theme }) => theme.spacing(2)};
|
||||
padding-top: ${({ theme }) => theme.spacing(2)};
|
||||
`;
|
||||
|
||||
export type ColorSchemeSegmentProps = {
|
||||
variant: `${Lowercase<ColorScheme.Dark | ColorScheme.Light>}`;
|
||||
controls: AnimationControls;
|
||||
} & React.ComponentPropsWithoutRef<'div'>;
|
||||
|
||||
function ColorSchemeSegment({
|
||||
variant,
|
||||
controls,
|
||||
...rest
|
||||
}: ColorSchemeSegmentProps) {
|
||||
return (
|
||||
<StyledColorSchemeBackground variant={variant} {...rest}>
|
||||
<StyledColorSchemeContent animate={controls} variant={variant}>
|
||||
Aa
|
||||
</StyledColorSchemeContent>
|
||||
</StyledColorSchemeBackground>
|
||||
);
|
||||
}
|
||||
|
||||
const StyledContainer = styled.div`
|
||||
position: relative;
|
||||
`;
|
||||
|
||||
const StyledMixedColorSchemeSegment = styled.div`
|
||||
border-radius: ${({ theme }) => theme.border.radius.md};
|
||||
cursor: pointer;
|
||||
display: flex;
|
||||
display: flex;
|
||||
height: 80px;
|
||||
overflow: hidden;
|
||||
width: 120px;
|
||||
`;
|
||||
|
||||
const StyledCheckmarkContainer = styled(motion.div)`
|
||||
bottom: 0px;
|
||||
padding: ${({ theme }) => theme.spacing(2)};
|
||||
position: absolute;
|
||||
right: 0px;
|
||||
`;
|
||||
|
||||
export type ColorSchemeCardProps = {
|
||||
variant: `${Lowercase<ColorScheme>}`;
|
||||
selected?: boolean;
|
||||
} & React.ComponentPropsWithoutRef<'div'>;
|
||||
|
||||
const checkmarkAnimationVariants = {
|
||||
initial: { opacity: 0 },
|
||||
animate: { opacity: 1 },
|
||||
exit: { opacity: 0 },
|
||||
};
|
||||
|
||||
export function ColorSchemeCard({
|
||||
variant,
|
||||
selected,
|
||||
...rest
|
||||
}: ColorSchemeCardProps) {
|
||||
const controls = useAnimation();
|
||||
|
||||
function handleMouseEnter() {
|
||||
controls.start({
|
||||
height: 61,
|
||||
fontSize: '22px',
|
||||
transition: { duration: 0.1 },
|
||||
});
|
||||
}
|
||||
|
||||
function handleMouseLeave() {
|
||||
controls.start({
|
||||
height: 56,
|
||||
fontSize: '20px',
|
||||
transition: { duration: 0.1 },
|
||||
});
|
||||
}
|
||||
|
||||
if (variant === 'system') {
|
||||
return (
|
||||
<StyledContainer>
|
||||
<StyledMixedColorSchemeSegment
|
||||
onMouseEnter={handleMouseEnter}
|
||||
onMouseLeave={handleMouseLeave}
|
||||
{...rest}
|
||||
>
|
||||
<ColorSchemeSegment
|
||||
style={{ borderTopRightRadius: 0, borderBottomRightRadius: 0 }}
|
||||
controls={controls}
|
||||
variant="light"
|
||||
/>
|
||||
<ColorSchemeSegment
|
||||
style={{ borderTopLeftRadius: 0, borderBottomLeftRadius: 0 }}
|
||||
controls={controls}
|
||||
variant="dark"
|
||||
/>
|
||||
</StyledMixedColorSchemeSegment>
|
||||
<AnimatePresence>
|
||||
{selected && (
|
||||
<StyledCheckmarkContainer
|
||||
key="system"
|
||||
variants={checkmarkAnimationVariants}
|
||||
initial="initial"
|
||||
animate="animate"
|
||||
exit="exit"
|
||||
transition={{ duration: 0.3 }}
|
||||
>
|
||||
<Checkmark />
|
||||
</StyledCheckmarkContainer>
|
||||
)}
|
||||
</AnimatePresence>
|
||||
</StyledContainer>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<StyledContainer>
|
||||
<ColorSchemeSegment
|
||||
onMouseEnter={handleMouseEnter}
|
||||
onMouseLeave={handleMouseLeave}
|
||||
controls={controls}
|
||||
variant={variant}
|
||||
{...rest}
|
||||
/>
|
||||
<AnimatePresence>
|
||||
{selected && (
|
||||
<StyledCheckmarkContainer
|
||||
key={variant}
|
||||
variants={checkmarkAnimationVariants}
|
||||
initial="initial"
|
||||
animate="animate"
|
||||
exit="exit"
|
||||
transition={{ duration: 0.3 }}
|
||||
>
|
||||
<Checkmark />
|
||||
</StyledCheckmarkContainer>
|
||||
)}
|
||||
</AnimatePresence>
|
||||
</StyledContainer>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
import React from 'react';
|
||||
import styled from '@emotion/styled';
|
||||
|
||||
import { ColorScheme } from '~/generated/graphql';
|
||||
|
||||
import { ColorSchemeCard } from './ColorSchemeCard';
|
||||
|
||||
const StyledContainer = styled.div`
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
> * + * {
|
||||
margin-left: ${({ theme }) => theme.spacing(4)};
|
||||
}
|
||||
`;
|
||||
|
||||
const CardContainer = styled.div`
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
`;
|
||||
|
||||
const Label = styled.span`
|
||||
color: ${({ theme }) => theme.font.color.secondary};
|
||||
font-size: ${({ theme }) => theme.font.size.xs};
|
||||
font-weight: ${({ theme }) => theme.font.weight.medium};
|
||||
margin-top: ${({ theme }) => theme.spacing(2)};
|
||||
`;
|
||||
|
||||
export type ColorSchemePickerProps = {
|
||||
value: ColorScheme;
|
||||
onChange: (value: ColorScheme) => void;
|
||||
};
|
||||
|
||||
export function ColorSchemePicker({ value, onChange }: ColorSchemePickerProps) {
|
||||
return (
|
||||
<StyledContainer>
|
||||
<CardContainer>
|
||||
<ColorSchemeCard
|
||||
onClick={() => onChange(ColorScheme.Light)}
|
||||
variant="light"
|
||||
selected={value === ColorScheme.Light}
|
||||
/>
|
||||
<Label>Light</Label>
|
||||
</CardContainer>
|
||||
<CardContainer>
|
||||
<ColorSchemeCard
|
||||
onClick={() => onChange(ColorScheme.Dark)}
|
||||
variant="dark"
|
||||
selected={value === ColorScheme.Dark}
|
||||
/>
|
||||
<Label>Dark</Label>
|
||||
</CardContainer>
|
||||
<CardContainer>
|
||||
<ColorSchemeCard
|
||||
onClick={() => onChange(ColorScheme.System)}
|
||||
variant="system"
|
||||
selected={value === ColorScheme.System}
|
||||
/>
|
||||
<Label>System settings</Label>
|
||||
</CardContainer>
|
||||
</StyledContainer>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
import styled from '@emotion/styled';
|
||||
import type { Meta, StoryObj } from '@storybook/react';
|
||||
|
||||
import { getRenderWrapperForComponent } from '~/testing/renderWrappers';
|
||||
|
||||
import { ColorSchemeCard } from '../ColorSchemeCard';
|
||||
|
||||
const Container = styled.div`
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
> * + * {
|
||||
margin-left: ${({ theme }) => theme.spacing(4)};
|
||||
}
|
||||
`;
|
||||
|
||||
const meta: Meta<typeof ColorSchemeCard> = {
|
||||
title: 'UI/ColorScheme/ColorSchemeCard',
|
||||
component: ColorSchemeCard,
|
||||
};
|
||||
|
||||
export default meta;
|
||||
type Story = StoryObj<typeof ColorSchemeCard>;
|
||||
|
||||
export const Default: Story = {
|
||||
render: getRenderWrapperForComponent(
|
||||
<Container>
|
||||
<ColorSchemeCard variant="light" selected={false} />
|
||||
<ColorSchemeCard variant="dark" selected={false} />
|
||||
<ColorSchemeCard variant="system" selected={false} />
|
||||
</Container>,
|
||||
),
|
||||
};
|
||||
|
||||
export const Selected: Story = {
|
||||
render: getRenderWrapperForComponent(
|
||||
<Container>
|
||||
<ColorSchemeCard variant="light" selected={true} />
|
||||
<ColorSchemeCard variant="dark" selected={true} />
|
||||
<ColorSchemeCard variant="system" selected={true} />
|
||||
</Container>,
|
||||
),
|
||||
};
|
||||
@@ -104,6 +104,7 @@ export const color = {
|
||||
orange30: '#f09797',
|
||||
orange20: '#fbc5c5',
|
||||
orange10: '#fde4e4',
|
||||
// TODO: Why color are not matching with design?
|
||||
gray: grayScale.gray30,
|
||||
gray80: grayScale.gray65,
|
||||
gray70: grayScale.gray60,
|
||||
|
||||
@@ -1,14 +1,29 @@
|
||||
import { ThemeProvider } from '@emotion/react';
|
||||
|
||||
import { darkTheme, lightTheme } from '@/ui/themes/themes';
|
||||
import { browserPrefersDarkMode } from '~/utils';
|
||||
import { ColorScheme } from '~/generated/graphql';
|
||||
|
||||
import { useColorScheme } from '../hooks/useColorScheme';
|
||||
import { useSystemColorScheme } from '../hooks/useSystemColorScheme';
|
||||
|
||||
type OwnProps = {
|
||||
children: JSX.Element;
|
||||
};
|
||||
|
||||
export function AppThemeProvider({ children }: OwnProps) {
|
||||
const selectedTheme = browserPrefersDarkMode() ? darkTheme : lightTheme;
|
||||
const themes = {
|
||||
[ColorScheme.Dark]: darkTheme,
|
||||
[ColorScheme.Light]: lightTheme,
|
||||
};
|
||||
|
||||
return <ThemeProvider theme={selectedTheme}>{children}</ThemeProvider>;
|
||||
export function AppThemeProvider({ children }: OwnProps) {
|
||||
const systemColorScheme = useSystemColorScheme();
|
||||
|
||||
const { colorScheme } = useColorScheme();
|
||||
|
||||
const theme =
|
||||
themes[
|
||||
colorScheme === ColorScheme.System ? systemColorScheme : colorScheme
|
||||
];
|
||||
|
||||
return <ThemeProvider theme={theme}>{children}</ThemeProvider>;
|
||||
}
|
||||
|
||||
53
front/src/modules/ui/themes/hooks/useColorScheme.ts
Normal file
53
front/src/modules/ui/themes/hooks/useColorScheme.ts
Normal file
@@ -0,0 +1,53 @@
|
||||
import { useCallback, useMemo } from 'react';
|
||||
import { useRecoilState } from 'recoil';
|
||||
|
||||
import { currentUserState } from '@/auth/states/currentUserState';
|
||||
import { ColorScheme, useUpdateUserMutation } from '~/generated/graphql';
|
||||
|
||||
export function useColorScheme() {
|
||||
const [currentUser] = useRecoilState(currentUserState);
|
||||
|
||||
const [updateUser] = useUpdateUserMutation();
|
||||
|
||||
const colorScheme = useMemo(() => {
|
||||
if (!currentUser?.settings?.colorScheme) {
|
||||
// Use system color scheme if user is not logged in or has no settings
|
||||
return ColorScheme.System;
|
||||
}
|
||||
|
||||
return currentUser.settings.colorScheme;
|
||||
}, [currentUser?.settings?.colorScheme]);
|
||||
|
||||
const setColorScheme = useCallback(
|
||||
async (value: ColorScheme) => {
|
||||
try {
|
||||
const result = await updateUser({
|
||||
variables: {
|
||||
where: {
|
||||
id: currentUser?.id,
|
||||
},
|
||||
data: {
|
||||
settings: {
|
||||
update: {
|
||||
colorScheme: {
|
||||
set: value,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
if (!result.data || result.errors) {
|
||||
throw result.errors;
|
||||
}
|
||||
} catch (err) {}
|
||||
},
|
||||
[currentUser?.id, updateUser],
|
||||
);
|
||||
|
||||
return {
|
||||
colorScheme,
|
||||
setColorScheme,
|
||||
};
|
||||
}
|
||||
39
front/src/modules/ui/themes/hooks/useSystemColorScheme.ts
Normal file
39
front/src/modules/ui/themes/hooks/useSystemColorScheme.ts
Normal file
@@ -0,0 +1,39 @@
|
||||
import { useEffect, useMemo, useState } from 'react';
|
||||
|
||||
import { ColorScheme } from '~/generated/graphql';
|
||||
|
||||
export type SystemColorScheme = ColorScheme.Light | ColorScheme.Dark;
|
||||
|
||||
export function useSystemColorScheme(): SystemColorScheme {
|
||||
const mediaQuery = useMemo(
|
||||
() => window.matchMedia('(prefers-color-scheme: dark)'),
|
||||
[],
|
||||
);
|
||||
|
||||
const [preferredColorScheme, setPreferredColorScheme] =
|
||||
useState<SystemColorScheme>(
|
||||
!window.matchMedia || !mediaQuery.matches
|
||||
? ColorScheme.Light
|
||||
: ColorScheme.Dark,
|
||||
);
|
||||
|
||||
useEffect(() => {
|
||||
if (!window.matchMedia) {
|
||||
return;
|
||||
}
|
||||
|
||||
function handleChange(event: MediaQueryListEvent): void {
|
||||
setPreferredColorScheme(
|
||||
event.matches ? ColorScheme.Dark : ColorScheme.Light,
|
||||
);
|
||||
}
|
||||
|
||||
mediaQuery.addEventListener('change', handleChange);
|
||||
|
||||
return () => {
|
||||
mediaQuery.removeEventListener('change', handleChange);
|
||||
};
|
||||
}, [mediaQuery]);
|
||||
|
||||
return preferredColorScheme;
|
||||
}
|
||||
@@ -6,7 +6,7 @@ type OwnProps = {
|
||||
};
|
||||
|
||||
const StyledMainSectionTitle = styled.h2`
|
||||
color: ${({ theme }) => theme.font.color.primary};
|
||||
color: ${({ theme }) => theme.font.color.tertiary};
|
||||
font-size: ${({ theme }) => theme.font.size.xl};
|
||||
font-weight: ${({ theme }) => theme.font.weight.semiBold};
|
||||
line-height: ${({ theme }) => theme.text.lineHeight.lg};
|
||||
|
||||
@@ -20,6 +20,11 @@ export const GET_CURRENT_USER = gql`
|
||||
inviteHash
|
||||
}
|
||||
}
|
||||
settings {
|
||||
id
|
||||
locale
|
||||
colorScheme
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
@@ -9,6 +9,21 @@ export const UPDATE_USER = gql`
|
||||
firstName
|
||||
lastName
|
||||
avatarUrl
|
||||
workspaceMember {
|
||||
id
|
||||
workspace {
|
||||
id
|
||||
domainName
|
||||
displayName
|
||||
logo
|
||||
inviteHash
|
||||
}
|
||||
}
|
||||
settings {
|
||||
id
|
||||
locale
|
||||
colorScheme
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
@@ -23,6 +38,7 @@ export const REMOVE_PROFILE_PICTURE = gql`
|
||||
mutation RemoveProfilePicture($where: UserWhereUniqueInput!) {
|
||||
updateUser(data: { avatarUrl: { set: null } }, where: $where) {
|
||||
id
|
||||
avatarUrl
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
42
front/src/pages/settings/SettingsExperience.tsx
Normal file
42
front/src/pages/settings/SettingsExperience.tsx
Normal file
@@ -0,0 +1,42 @@
|
||||
import styled from '@emotion/styled';
|
||||
|
||||
import { ColorSchemePicker } from '@/ui/color-scheme/components/ColorSchemePicker';
|
||||
import { NoTopBarContainer } from '@/ui/layout/components/NoTopBarContainer';
|
||||
import { useColorScheme } from '@/ui/themes/hooks/useColorScheme';
|
||||
import { MainSectionTitle } from '@/ui/title/components/MainSectionTitle';
|
||||
import { SubSectionTitle } from '@/ui/title/components/SubSectionTitle';
|
||||
|
||||
const StyledContainer = styled.div`
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding: ${({ theme }) => theme.spacing(8)};
|
||||
padding-bottom: ${({ theme }) => theme.spacing(10)};
|
||||
width: 350px;
|
||||
> * + * {
|
||||
margin-top: ${({ theme }) => theme.spacing(8)};
|
||||
}
|
||||
`;
|
||||
|
||||
const StyledSectionContainer = styled.div`
|
||||
> * + * {
|
||||
margin-top: ${({ theme }) => theme.spacing(4)};
|
||||
}
|
||||
`;
|
||||
|
||||
export function SettingsExperience() {
|
||||
const { colorScheme, setColorScheme } = useColorScheme();
|
||||
|
||||
return (
|
||||
<NoTopBarContainer>
|
||||
<div>
|
||||
<StyledContainer>
|
||||
<MainSectionTitle>Experience</MainSectionTitle>
|
||||
<StyledSectionContainer>
|
||||
<SubSectionTitle title="Appearance" />
|
||||
<ColorSchemePicker value={colorScheme} onChange={setColorScheme} />
|
||||
</StyledSectionContainer>
|
||||
</StyledContainer>
|
||||
</div>
|
||||
</NoTopBarContainer>
|
||||
);
|
||||
}
|
||||
@@ -1,22 +1,6 @@
|
||||
import { User, Workspace, WorkspaceMember } from '~/generated/graphql';
|
||||
import { ColorScheme, GetCurrentUserQuery } from '~/generated/graphql';
|
||||
|
||||
type MockedUser = Pick<
|
||||
User,
|
||||
| 'id'
|
||||
| 'email'
|
||||
| 'displayName'
|
||||
| 'avatarUrl'
|
||||
| '__typename'
|
||||
| 'firstName'
|
||||
| 'lastName'
|
||||
> & {
|
||||
workspaceMember: Pick<WorkspaceMember, 'id' | '__typename'> & {
|
||||
workspace: Pick<
|
||||
Workspace,
|
||||
'id' | 'displayName' | 'domainName' | 'logo' | 'inviteHash' | '__typename'
|
||||
>;
|
||||
};
|
||||
};
|
||||
type MockedUser = GetCurrentUserQuery['currentUser'];
|
||||
|
||||
export const mockedUsersData: Array<MockedUser> = [
|
||||
{
|
||||
@@ -39,6 +23,12 @@ export const mockedUsersData: Array<MockedUser> = [
|
||||
logo: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAACXBIWXMAAA7EAAAOxAGVKw4bAAACb0lEQVR4nO2VO4taQRTHr3AblbjxEVlwCwVhg7BoqqCIjy/gAyyFWNlYBOxsfH0KuxgQGwXRUkGuL2S7i1barGAgiwbdW93SnGOc4BonPiKahf3DwXFmuP/fPM4ZlvmlTxAhCBdzHnEQWYiv7Mr4C3NeuVYhQYDPzOUUQgDLBQGcLHNhvQK8DACPx8PTxiqVyvISG43GbyaT6Qfpn06n0m63e/tPAPF4vJ1MJu8kEsnWTCkWi1yr1RKGw+GDRqPBOTfr44vFQvD7/Q/lcpmaaVQAr9fLp1IpO22c47hGOBz+MB6PH+Vy+VYDAL8qlUoGtVotzOfzq4MAgsHgE/6KojiQyWR/bKVSqbSszHFM8Pl8z1YK48JsNltCOBwOnrYLO+8AAIjb+nHbycoTiUQfDJ7tFq4YAHiVSmXBxcD41u8flQU8z7fhzO0r83atVns3Go3u9Xr9x0O/RQXo9/tsIBBg6vX606a52Wz+bZ7P5/WwG29gxSJzhKgA6XTaDoFNF+krFAocmC//4yWEcSf2wTm7mCO19xFgSsKOLI16vV7b7XY7mRNoLwA0JymJ5uQIzgIAuX5PzDElT2m+E8BqtQ4ymcx7Yq7T6a6ZE4sKgOadTucaCwkxp1UzlEKh0GDxIXOwDWHAdi6Xe3swQDQa/Q7mywoolUpvsaptymazDWKxmBHTlWXZm405BFZoNpuGgwEmk4mE2SGtVivii4f1AO7J3ZopkQCQj7Ar1FeRChCJRJzVapX6DKNIfSc1Ax+wtQWQ55h6bH8FWDfYV4fO3wlwDr0C/BcADYiTPCxHqIEA2QsCZAkAKnRGkMbKN/sTX5YHPQ1e7SkAAAAASUVORK5CYII=',
|
||||
},
|
||||
},
|
||||
settings: {
|
||||
id: '7dfbc3f7-6e5e-4128-957e-8d86808cde9y',
|
||||
__typename: 'UserSettings',
|
||||
locale: 'en',
|
||||
colorScheme: ColorScheme.System,
|
||||
},
|
||||
},
|
||||
{
|
||||
id: '7dfbc3f7-6e5e-4128-957e-8d86808cdf6c',
|
||||
@@ -59,5 +49,11 @@ export const mockedUsersData: Array<MockedUser> = [
|
||||
logo: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAACXBIWXMAAA7EAAAOxAGVKw4bAAACb0lEQVR4nO2VO4taQRTHr3AblbjxEVlwCwVhg7BoqqCIjy/gAyyFWNlYBOxsfH0KuxgQGwXRUkGuL2S7i1barGAgiwbdW93SnGOc4BonPiKahf3DwXFmuP/fPM4ZlvmlTxAhCBdzHnEQWYiv7Mr4C3NeuVYhQYDPzOUUQgDLBQGcLHNhvQK8DACPx8PTxiqVyvISG43GbyaT6Qfpn06n0m63e/tPAPF4vJ1MJu8kEsnWTCkWi1yr1RKGw+GDRqPBOTfr44vFQvD7/Q/lcpmaaVQAr9fLp1IpO22c47hGOBz+MB6PH+Vy+VYDAL8qlUoGtVotzOfzq4MAgsHgE/6KojiQyWR/bKVSqbSszHFM8Pl8z1YK48JsNltCOBwOnrYLO+8AAIjb+nHbycoTiUQfDJ7tFq4YAHiVSmXBxcD41u8flQU8z7fhzO0r83atVns3Go3u9Xr9x0O/RQXo9/tsIBBg6vX606a52Wz+bZ7P5/WwG29gxSJzhKgA6XTaDoFNF+krFAocmC//4yWEcSf2wTm7mCO19xFgSsKOLI16vV7b7XY7mRNoLwA0JymJ5uQIzgIAuX5PzDElT2m+E8BqtQ4ymcx7Yq7T6a6ZE4sKgOadTucaCwkxp1UzlEKh0GDxIXOwDWHAdi6Xe3swQDQa/Q7mywoolUpvsaptymazDWKxmBHTlWXZm405BFZoNpuGgwEmk4mE2SGtVivii4f1AO7J3ZopkQCQj7Ar1FeRChCJRJzVapX6DKNIfSc1Ax+wtQWQ55h6bH8FWDfYV4fO3wlwDr0C/BcADYiTPCxHqIEA2QsCZAkAKnRGkMbKN/sTX5YHPQ1e7SkAAAAASUVORK5CYII=',
|
||||
},
|
||||
},
|
||||
settings: {
|
||||
id: '7dfbc3f7-6e5e-4128-957e-8d86808cdt7a',
|
||||
__typename: 'UserSettings',
|
||||
locale: 'en',
|
||||
colorScheme: ColorScheme.System,
|
||||
},
|
||||
},
|
||||
];
|
||||
|
||||
@@ -13,7 +13,3 @@ export function formatToHumanReadableDate(date: Date | string) {
|
||||
export const getLogoUrlFromDomainName = (domainName?: string): string => {
|
||||
return `https://api.faviconkit.com/${domainName}/144`;
|
||||
};
|
||||
|
||||
export const browserPrefersDarkMode = (): boolean => {
|
||||
return window.matchMedia('(prefers-color-scheme: dark)').matches;
|
||||
};
|
||||
|
||||
37
front/src/utils/recoil-effects.ts
Normal file
37
front/src/utils/recoil-effects.ts
Normal file
@@ -0,0 +1,37 @@
|
||||
import { AtomEffect } from 'recoil';
|
||||
|
||||
import { cookieStorage } from '~/utils/cookie-storage';
|
||||
|
||||
export const localStorageEffect =
|
||||
<T>(key: string): AtomEffect<T> =>
|
||||
({ setSelf, onSet }) => {
|
||||
const savedValue = localStorage.getItem(key);
|
||||
if (savedValue != null) {
|
||||
setSelf(JSON.parse(savedValue));
|
||||
}
|
||||
|
||||
onSet((newValue, _, isReset) => {
|
||||
isReset
|
||||
? localStorage.removeItem(key)
|
||||
: localStorage.setItem(key, JSON.stringify(newValue));
|
||||
});
|
||||
};
|
||||
|
||||
export const cookieStorageEffect =
|
||||
<T>(key: string): AtomEffect<T | null> =>
|
||||
({ setSelf, onSet }) => {
|
||||
const savedValue = cookieStorage.getItem(key);
|
||||
if (savedValue != null && JSON.parse(savedValue)['accessToken']) {
|
||||
setSelf(JSON.parse(savedValue));
|
||||
}
|
||||
|
||||
onSet((newValue, _, isReset) => {
|
||||
if (!newValue) {
|
||||
cookieStorage.removeItem(key);
|
||||
return;
|
||||
}
|
||||
isReset
|
||||
? cookieStorage.removeItem(key)
|
||||
: cookieStorage.setItem(key, JSON.stringify(newValue));
|
||||
});
|
||||
};
|
||||
10
server/src/core/@generated/prisma/color-scheme.enum.ts
Normal file
10
server/src/core/@generated/prisma/color-scheme.enum.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
import { registerEnumType } from '@nestjs/graphql';
|
||||
|
||||
export enum ColorScheme {
|
||||
Light = "Light",
|
||||
Dark = "Dark",
|
||||
System = "System"
|
||||
}
|
||||
|
||||
|
||||
registerEnumType(ColorScheme, { name: 'ColorScheme', description: undefined })
|
||||
@@ -0,0 +1,10 @@
|
||||
import { Field } from '@nestjs/graphql';
|
||||
import { InputType } from '@nestjs/graphql';
|
||||
import { ColorScheme } from './color-scheme.enum';
|
||||
|
||||
@InputType()
|
||||
export class EnumColorSchemeFieldUpdateOperationsInput {
|
||||
|
||||
@Field(() => ColorScheme, {nullable:true})
|
||||
set?: keyof typeof ColorScheme;
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
import { Field } from '@nestjs/graphql';
|
||||
import { InputType } from '@nestjs/graphql';
|
||||
import { ColorScheme } from './color-scheme.enum';
|
||||
import { NestedEnumColorSchemeFilter } from './nested-enum-color-scheme-filter.input';
|
||||
|
||||
@InputType()
|
||||
export class EnumColorSchemeFilter {
|
||||
|
||||
@Field(() => ColorScheme, {nullable:true})
|
||||
equals?: keyof typeof ColorScheme;
|
||||
|
||||
@Field(() => [ColorScheme], {nullable:true})
|
||||
in?: Array<keyof typeof ColorScheme>;
|
||||
|
||||
@Field(() => [ColorScheme], {nullable:true})
|
||||
notIn?: Array<keyof typeof ColorScheme>;
|
||||
|
||||
@Field(() => NestedEnumColorSchemeFilter, {nullable:true})
|
||||
not?: NestedEnumColorSchemeFilter;
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
import { Field } from '@nestjs/graphql';
|
||||
import { InputType } from '@nestjs/graphql';
|
||||
import { ColorScheme } from './color-scheme.enum';
|
||||
import { NestedEnumColorSchemeWithAggregatesFilter } from './nested-enum-color-scheme-with-aggregates-filter.input';
|
||||
import { NestedIntFilter } from './nested-int-filter.input';
|
||||
import { NestedEnumColorSchemeFilter } from './nested-enum-color-scheme-filter.input';
|
||||
|
||||
@InputType()
|
||||
export class EnumColorSchemeWithAggregatesFilter {
|
||||
|
||||
@Field(() => ColorScheme, {nullable:true})
|
||||
equals?: keyof typeof ColorScheme;
|
||||
|
||||
@Field(() => [ColorScheme], {nullable:true})
|
||||
in?: Array<keyof typeof ColorScheme>;
|
||||
|
||||
@Field(() => [ColorScheme], {nullable:true})
|
||||
notIn?: Array<keyof typeof ColorScheme>;
|
||||
|
||||
@Field(() => NestedEnumColorSchemeWithAggregatesFilter, {nullable:true})
|
||||
not?: NestedEnumColorSchemeWithAggregatesFilter;
|
||||
|
||||
@Field(() => NestedIntFilter, {nullable:true})
|
||||
_count?: NestedIntFilter;
|
||||
|
||||
@Field(() => NestedEnumColorSchemeFilter, {nullable:true})
|
||||
_min?: NestedEnumColorSchemeFilter;
|
||||
|
||||
@Field(() => NestedEnumColorSchemeFilter, {nullable:true})
|
||||
_max?: NestedEnumColorSchemeFilter;
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
import { Field } from '@nestjs/graphql';
|
||||
import { InputType } from '@nestjs/graphql';
|
||||
import { ColorScheme } from './color-scheme.enum';
|
||||
|
||||
@InputType()
|
||||
export class NestedEnumColorSchemeFilter {
|
||||
|
||||
@Field(() => ColorScheme, {nullable:true})
|
||||
equals?: keyof typeof ColorScheme;
|
||||
|
||||
@Field(() => [ColorScheme], {nullable:true})
|
||||
in?: Array<keyof typeof ColorScheme>;
|
||||
|
||||
@Field(() => [ColorScheme], {nullable:true})
|
||||
notIn?: Array<keyof typeof ColorScheme>;
|
||||
|
||||
@Field(() => NestedEnumColorSchemeFilter, {nullable:true})
|
||||
not?: NestedEnumColorSchemeFilter;
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
import { Field } from '@nestjs/graphql';
|
||||
import { InputType } from '@nestjs/graphql';
|
||||
import { ColorScheme } from './color-scheme.enum';
|
||||
import { NestedIntFilter } from './nested-int-filter.input';
|
||||
import { NestedEnumColorSchemeFilter } from './nested-enum-color-scheme-filter.input';
|
||||
|
||||
@InputType()
|
||||
export class NestedEnumColorSchemeWithAggregatesFilter {
|
||||
|
||||
@Field(() => ColorScheme, {nullable:true})
|
||||
equals?: keyof typeof ColorScheme;
|
||||
|
||||
@Field(() => [ColorScheme], {nullable:true})
|
||||
in?: Array<keyof typeof ColorScheme>;
|
||||
|
||||
@Field(() => [ColorScheme], {nullable:true})
|
||||
notIn?: Array<keyof typeof ColorScheme>;
|
||||
|
||||
@Field(() => NestedEnumColorSchemeWithAggregatesFilter, {nullable:true})
|
||||
not?: NestedEnumColorSchemeWithAggregatesFilter;
|
||||
|
||||
@Field(() => NestedIntFilter, {nullable:true})
|
||||
_count?: NestedIntFilter;
|
||||
|
||||
@Field(() => NestedEnumColorSchemeFilter, {nullable:true})
|
||||
_min?: NestedEnumColorSchemeFilter;
|
||||
|
||||
@Field(() => NestedEnumColorSchemeFilter, {nullable:true})
|
||||
_max?: NestedEnumColorSchemeFilter;
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
import { Field } from '@nestjs/graphql';
|
||||
import { ObjectType } from '@nestjs/graphql';
|
||||
import { UserSettingsCountAggregate } from './user-settings-count-aggregate.output';
|
||||
import { UserSettingsMinAggregate } from './user-settings-min-aggregate.output';
|
||||
import { UserSettingsMaxAggregate } from './user-settings-max-aggregate.output';
|
||||
|
||||
@ObjectType()
|
||||
export class AggregateUserSettings {
|
||||
|
||||
@Field(() => UserSettingsCountAggregate, {nullable:true})
|
||||
_count?: UserSettingsCountAggregate;
|
||||
|
||||
@Field(() => UserSettingsMinAggregate, {nullable:true})
|
||||
_min?: UserSettingsMinAggregate;
|
||||
|
||||
@Field(() => UserSettingsMaxAggregate, {nullable:true})
|
||||
_max?: UserSettingsMaxAggregate;
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
import { Field } from '@nestjs/graphql';
|
||||
import { ArgsType } from '@nestjs/graphql';
|
||||
import { UserSettingsCreateManyInput } from './user-settings-create-many.input';
|
||||
import { Type } from 'class-transformer';
|
||||
import { ValidateNested } from 'class-validator';
|
||||
|
||||
@ArgsType()
|
||||
export class CreateManyUserSettingsArgs {
|
||||
|
||||
@Field(() => [UserSettingsCreateManyInput], {nullable:false})
|
||||
@Type(() => UserSettingsCreateManyInput)
|
||||
@ValidateNested({each: true})
|
||||
@Type(() => UserSettingsCreateManyInput)
|
||||
data!: Array<UserSettingsCreateManyInput>;
|
||||
|
||||
@Field(() => Boolean, {nullable:true})
|
||||
skipDuplicates?: boolean;
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
import { Field } from '@nestjs/graphql';
|
||||
import { ArgsType } from '@nestjs/graphql';
|
||||
import { UserSettingsCreateInput } from './user-settings-create.input';
|
||||
import { Type } from 'class-transformer';
|
||||
import { ValidateNested } from 'class-validator';
|
||||
|
||||
@ArgsType()
|
||||
export class CreateOneUserSettingsArgs {
|
||||
|
||||
@Field(() => UserSettingsCreateInput, {nullable:false})
|
||||
@Type(() => UserSettingsCreateInput)
|
||||
@ValidateNested({each: true})
|
||||
@Type(() => UserSettingsCreateInput)
|
||||
data!: UserSettingsCreateInput;
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
import { Field } from '@nestjs/graphql';
|
||||
import { ArgsType } from '@nestjs/graphql';
|
||||
import { UserSettingsWhereInput } from './user-settings-where.input';
|
||||
import { Type } from 'class-transformer';
|
||||
|
||||
@ArgsType()
|
||||
export class DeleteManyUserSettingsArgs {
|
||||
|
||||
@Field(() => UserSettingsWhereInput, {nullable:true})
|
||||
@Type(() => UserSettingsWhereInput)
|
||||
where?: UserSettingsWhereInput;
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
import { Field } from '@nestjs/graphql';
|
||||
import { ArgsType } from '@nestjs/graphql';
|
||||
import { UserSettingsWhereUniqueInput } from './user-settings-where-unique.input';
|
||||
import { Type } from 'class-transformer';
|
||||
|
||||
@ArgsType()
|
||||
export class DeleteOneUserSettingsArgs {
|
||||
|
||||
@Field(() => UserSettingsWhereUniqueInput, {nullable:false})
|
||||
@Type(() => UserSettingsWhereUniqueInput)
|
||||
where!: UserSettingsWhereUniqueInput;
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
import { Field } from '@nestjs/graphql';
|
||||
import { ArgsType } from '@nestjs/graphql';
|
||||
import { UserSettingsWhereInput } from './user-settings-where.input';
|
||||
import { Type } from 'class-transformer';
|
||||
import { UserSettingsOrderByWithRelationInput } from './user-settings-order-by-with-relation.input';
|
||||
import { UserSettingsWhereUniqueInput } from './user-settings-where-unique.input';
|
||||
import { Int } from '@nestjs/graphql';
|
||||
import { UserSettingsScalarFieldEnum } from './user-settings-scalar-field.enum';
|
||||
|
||||
@ArgsType()
|
||||
export class FindFirstUserSettingsOrThrowArgs {
|
||||
|
||||
@Field(() => UserSettingsWhereInput, {nullable:true})
|
||||
@Type(() => UserSettingsWhereInput)
|
||||
where?: UserSettingsWhereInput;
|
||||
|
||||
@Field(() => [UserSettingsOrderByWithRelationInput], {nullable:true})
|
||||
orderBy?: Array<UserSettingsOrderByWithRelationInput>;
|
||||
|
||||
@Field(() => UserSettingsWhereUniqueInput, {nullable:true})
|
||||
cursor?: UserSettingsWhereUniqueInput;
|
||||
|
||||
@Field(() => Int, {nullable:true})
|
||||
take?: number;
|
||||
|
||||
@Field(() => Int, {nullable:true})
|
||||
skip?: number;
|
||||
|
||||
@Field(() => [UserSettingsScalarFieldEnum], {nullable:true})
|
||||
distinct?: Array<keyof typeof UserSettingsScalarFieldEnum>;
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
import { Field } from '@nestjs/graphql';
|
||||
import { ArgsType } from '@nestjs/graphql';
|
||||
import { UserSettingsWhereInput } from './user-settings-where.input';
|
||||
import { Type } from 'class-transformer';
|
||||
import { UserSettingsOrderByWithRelationInput } from './user-settings-order-by-with-relation.input';
|
||||
import { UserSettingsWhereUniqueInput } from './user-settings-where-unique.input';
|
||||
import { Int } from '@nestjs/graphql';
|
||||
import { UserSettingsScalarFieldEnum } from './user-settings-scalar-field.enum';
|
||||
|
||||
@ArgsType()
|
||||
export class FindFirstUserSettingsArgs {
|
||||
|
||||
@Field(() => UserSettingsWhereInput, {nullable:true})
|
||||
@Type(() => UserSettingsWhereInput)
|
||||
where?: UserSettingsWhereInput;
|
||||
|
||||
@Field(() => [UserSettingsOrderByWithRelationInput], {nullable:true})
|
||||
orderBy?: Array<UserSettingsOrderByWithRelationInput>;
|
||||
|
||||
@Field(() => UserSettingsWhereUniqueInput, {nullable:true})
|
||||
cursor?: UserSettingsWhereUniqueInput;
|
||||
|
||||
@Field(() => Int, {nullable:true})
|
||||
take?: number;
|
||||
|
||||
@Field(() => Int, {nullable:true})
|
||||
skip?: number;
|
||||
|
||||
@Field(() => [UserSettingsScalarFieldEnum], {nullable:true})
|
||||
distinct?: Array<keyof typeof UserSettingsScalarFieldEnum>;
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
import { Field } from '@nestjs/graphql';
|
||||
import { ArgsType } from '@nestjs/graphql';
|
||||
import { UserSettingsWhereInput } from './user-settings-where.input';
|
||||
import { Type } from 'class-transformer';
|
||||
import { UserSettingsOrderByWithRelationInput } from './user-settings-order-by-with-relation.input';
|
||||
import { UserSettingsWhereUniqueInput } from './user-settings-where-unique.input';
|
||||
import { Int } from '@nestjs/graphql';
|
||||
import { UserSettingsScalarFieldEnum } from './user-settings-scalar-field.enum';
|
||||
|
||||
@ArgsType()
|
||||
export class FindManyUserSettingsArgs {
|
||||
|
||||
@Field(() => UserSettingsWhereInput, {nullable:true})
|
||||
@Type(() => UserSettingsWhereInput)
|
||||
where?: UserSettingsWhereInput;
|
||||
|
||||
@Field(() => [UserSettingsOrderByWithRelationInput], {nullable:true})
|
||||
orderBy?: Array<UserSettingsOrderByWithRelationInput>;
|
||||
|
||||
@Field(() => UserSettingsWhereUniqueInput, {nullable:true})
|
||||
cursor?: UserSettingsWhereUniqueInput;
|
||||
|
||||
@Field(() => Int, {nullable:true})
|
||||
take?: number;
|
||||
|
||||
@Field(() => Int, {nullable:true})
|
||||
skip?: number;
|
||||
|
||||
@Field(() => [UserSettingsScalarFieldEnum], {nullable:true})
|
||||
distinct?: Array<keyof typeof UserSettingsScalarFieldEnum>;
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
import { Field } from '@nestjs/graphql';
|
||||
import { ArgsType } from '@nestjs/graphql';
|
||||
import { UserSettingsWhereUniqueInput } from './user-settings-where-unique.input';
|
||||
import { Type } from 'class-transformer';
|
||||
|
||||
@ArgsType()
|
||||
export class FindUniqueUserSettingsOrThrowArgs {
|
||||
|
||||
@Field(() => UserSettingsWhereUniqueInput, {nullable:false})
|
||||
@Type(() => UserSettingsWhereUniqueInput)
|
||||
where!: UserSettingsWhereUniqueInput;
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
import { Field } from '@nestjs/graphql';
|
||||
import { ArgsType } from '@nestjs/graphql';
|
||||
import { UserSettingsWhereUniqueInput } from './user-settings-where-unique.input';
|
||||
import { Type } from 'class-transformer';
|
||||
|
||||
@ArgsType()
|
||||
export class FindUniqueUserSettingsArgs {
|
||||
|
||||
@Field(() => UserSettingsWhereUniqueInput, {nullable:false})
|
||||
@Type(() => UserSettingsWhereUniqueInput)
|
||||
where!: UserSettingsWhereUniqueInput;
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
import { Field } from '@nestjs/graphql';
|
||||
import { ArgsType } from '@nestjs/graphql';
|
||||
import { UserSettingsUpdateManyMutationInput } from './user-settings-update-many-mutation.input';
|
||||
import { Type } from 'class-transformer';
|
||||
import { ValidateNested } from 'class-validator';
|
||||
import { UserSettingsWhereInput } from './user-settings-where.input';
|
||||
|
||||
@ArgsType()
|
||||
export class UpdateManyUserSettingsArgs {
|
||||
|
||||
@Field(() => UserSettingsUpdateManyMutationInput, {nullable:false})
|
||||
@Type(() => UserSettingsUpdateManyMutationInput)
|
||||
@ValidateNested({each: true})
|
||||
@Type(() => UserSettingsUpdateManyMutationInput)
|
||||
data!: UserSettingsUpdateManyMutationInput;
|
||||
|
||||
@Field(() => UserSettingsWhereInput, {nullable:true})
|
||||
@Type(() => UserSettingsWhereInput)
|
||||
where?: UserSettingsWhereInput;
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
import { Field } from '@nestjs/graphql';
|
||||
import { ArgsType } from '@nestjs/graphql';
|
||||
import { UserSettingsUpdateInput } from './user-settings-update.input';
|
||||
import { Type } from 'class-transformer';
|
||||
import { ValidateNested } from 'class-validator';
|
||||
import { UserSettingsWhereUniqueInput } from './user-settings-where-unique.input';
|
||||
|
||||
@ArgsType()
|
||||
export class UpdateOneUserSettingsArgs {
|
||||
|
||||
@Field(() => UserSettingsUpdateInput, {nullable:false})
|
||||
@Type(() => UserSettingsUpdateInput)
|
||||
@ValidateNested({each: true})
|
||||
@Type(() => UserSettingsUpdateInput)
|
||||
data!: UserSettingsUpdateInput;
|
||||
|
||||
@Field(() => UserSettingsWhereUniqueInput, {nullable:false})
|
||||
@Type(() => UserSettingsWhereUniqueInput)
|
||||
where!: UserSettingsWhereUniqueInput;
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
import { Field } from '@nestjs/graphql';
|
||||
import { ArgsType } from '@nestjs/graphql';
|
||||
import { UserSettingsWhereUniqueInput } from './user-settings-where-unique.input';
|
||||
import { Type } from 'class-transformer';
|
||||
import { UserSettingsCreateInput } from './user-settings-create.input';
|
||||
import { UserSettingsUpdateInput } from './user-settings-update.input';
|
||||
|
||||
@ArgsType()
|
||||
export class UpsertOneUserSettingsArgs {
|
||||
|
||||
@Field(() => UserSettingsWhereUniqueInput, {nullable:false})
|
||||
@Type(() => UserSettingsWhereUniqueInput)
|
||||
where!: UserSettingsWhereUniqueInput;
|
||||
|
||||
@Field(() => UserSettingsCreateInput, {nullable:false})
|
||||
@Type(() => UserSettingsCreateInput)
|
||||
create!: UserSettingsCreateInput;
|
||||
|
||||
@Field(() => UserSettingsUpdateInput, {nullable:false})
|
||||
@Type(() => UserSettingsUpdateInput)
|
||||
update!: UserSettingsUpdateInput;
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
import { Field } from '@nestjs/graphql';
|
||||
import { InputType } from '@nestjs/graphql';
|
||||
|
||||
@InputType()
|
||||
export class UserSettingsCountAggregateInput {
|
||||
|
||||
@Field(() => Boolean, {nullable:true})
|
||||
id?: true;
|
||||
|
||||
@Field(() => Boolean, {nullable:true})
|
||||
colorScheme?: true;
|
||||
|
||||
@Field(() => Boolean, {nullable:true})
|
||||
locale?: true;
|
||||
|
||||
@Field(() => Boolean, {nullable:true})
|
||||
createdAt?: true;
|
||||
|
||||
@Field(() => Boolean, {nullable:true})
|
||||
updatedAt?: true;
|
||||
|
||||
@Field(() => Boolean, {nullable:true})
|
||||
_all?: true;
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
import { Field } from '@nestjs/graphql';
|
||||
import { ObjectType } from '@nestjs/graphql';
|
||||
import { Int } from '@nestjs/graphql';
|
||||
|
||||
@ObjectType()
|
||||
export class UserSettingsCountAggregate {
|
||||
|
||||
@Field(() => Int, {nullable:false})
|
||||
id!: number;
|
||||
|
||||
@Field(() => Int, {nullable:false})
|
||||
colorScheme!: number;
|
||||
|
||||
@Field(() => Int, {nullable:false})
|
||||
locale!: number;
|
||||
|
||||
@Field(() => Int, {nullable:false})
|
||||
createdAt!: number;
|
||||
|
||||
@Field(() => Int, {nullable:false})
|
||||
updatedAt!: number;
|
||||
|
||||
@Field(() => Int, {nullable:false})
|
||||
_all!: number;
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
import { Field } from '@nestjs/graphql';
|
||||
import { InputType } from '@nestjs/graphql';
|
||||
import { SortOrder } from '../prisma/sort-order.enum';
|
||||
|
||||
@InputType()
|
||||
export class UserSettingsCountOrderByAggregateInput {
|
||||
|
||||
@Field(() => SortOrder, {nullable:true})
|
||||
id?: keyof typeof SortOrder;
|
||||
|
||||
@Field(() => SortOrder, {nullable:true})
|
||||
colorScheme?: keyof typeof SortOrder;
|
||||
|
||||
@Field(() => SortOrder, {nullable:true})
|
||||
locale?: keyof typeof SortOrder;
|
||||
|
||||
@Field(() => SortOrder, {nullable:true})
|
||||
createdAt?: keyof typeof SortOrder;
|
||||
|
||||
@Field(() => SortOrder, {nullable:true})
|
||||
updatedAt?: keyof typeof SortOrder;
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
import { Field } from '@nestjs/graphql';
|
||||
import { InputType } from '@nestjs/graphql';
|
||||
import { ColorScheme } from '../prisma/color-scheme.enum';
|
||||
import * as Validator from 'class-validator';
|
||||
|
||||
@InputType()
|
||||
export class UserSettingsCreateManyInput {
|
||||
|
||||
@Field(() => String, {nullable:true})
|
||||
id?: string;
|
||||
|
||||
@Field(() => ColorScheme, {nullable:true})
|
||||
@Validator.IsString()
|
||||
@Validator.IsOptional()
|
||||
colorScheme?: keyof typeof ColorScheme;
|
||||
|
||||
@Field(() => String, {nullable:false})
|
||||
@Validator.IsString()
|
||||
locale!: string;
|
||||
|
||||
@Field(() => Date, {nullable:true})
|
||||
createdAt?: Date | string;
|
||||
|
||||
@Field(() => Date, {nullable:true})
|
||||
updatedAt?: Date | string;
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
import { Field } from '@nestjs/graphql';
|
||||
import { InputType } from '@nestjs/graphql';
|
||||
import { UserSettingsCreateWithoutUserInput } from './user-settings-create-without-user.input';
|
||||
import { Type } from 'class-transformer';
|
||||
import { UserSettingsCreateOrConnectWithoutUserInput } from './user-settings-create-or-connect-without-user.input';
|
||||
import { UserSettingsWhereUniqueInput } from './user-settings-where-unique.input';
|
||||
|
||||
@InputType()
|
||||
export class UserSettingsCreateNestedOneWithoutUserInput {
|
||||
|
||||
@Field(() => UserSettingsCreateWithoutUserInput, {nullable:true})
|
||||
@Type(() => UserSettingsCreateWithoutUserInput)
|
||||
create?: UserSettingsCreateWithoutUserInput;
|
||||
|
||||
@Field(() => UserSettingsCreateOrConnectWithoutUserInput, {nullable:true})
|
||||
@Type(() => UserSettingsCreateOrConnectWithoutUserInput)
|
||||
connectOrCreate?: UserSettingsCreateOrConnectWithoutUserInput;
|
||||
|
||||
@Field(() => UserSettingsWhereUniqueInput, {nullable:true})
|
||||
@Type(() => UserSettingsWhereUniqueInput)
|
||||
connect?: UserSettingsWhereUniqueInput;
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
import { Field } from '@nestjs/graphql';
|
||||
import { InputType } from '@nestjs/graphql';
|
||||
import { UserSettingsWhereUniqueInput } from './user-settings-where-unique.input';
|
||||
import { Type } from 'class-transformer';
|
||||
import { UserSettingsCreateWithoutUserInput } from './user-settings-create-without-user.input';
|
||||
|
||||
@InputType()
|
||||
export class UserSettingsCreateOrConnectWithoutUserInput {
|
||||
|
||||
@Field(() => UserSettingsWhereUniqueInput, {nullable:false})
|
||||
@Type(() => UserSettingsWhereUniqueInput)
|
||||
where!: UserSettingsWhereUniqueInput;
|
||||
|
||||
@Field(() => UserSettingsCreateWithoutUserInput, {nullable:false})
|
||||
@Type(() => UserSettingsCreateWithoutUserInput)
|
||||
create!: UserSettingsCreateWithoutUserInput;
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
import { Field } from '@nestjs/graphql';
|
||||
import { InputType } from '@nestjs/graphql';
|
||||
import { ColorScheme } from '../prisma/color-scheme.enum';
|
||||
import * as Validator from 'class-validator';
|
||||
|
||||
@InputType()
|
||||
export class UserSettingsCreateWithoutUserInput {
|
||||
|
||||
@Field(() => String, {nullable:true})
|
||||
id?: string;
|
||||
|
||||
@Field(() => ColorScheme, {nullable:true})
|
||||
@Validator.IsString()
|
||||
@Validator.IsOptional()
|
||||
colorScheme?: keyof typeof ColorScheme;
|
||||
|
||||
@Field(() => String, {nullable:false})
|
||||
@Validator.IsString()
|
||||
locale!: string;
|
||||
|
||||
@Field(() => Date, {nullable:true})
|
||||
createdAt?: Date | string;
|
||||
|
||||
@Field(() => Date, {nullable:true})
|
||||
updatedAt?: Date | string;
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
import { Field } from '@nestjs/graphql';
|
||||
import { InputType } from '@nestjs/graphql';
|
||||
import { ColorScheme } from '../prisma/color-scheme.enum';
|
||||
import * as Validator from 'class-validator';
|
||||
import { UserCreateNestedOneWithoutSettingsInput } from '../user/user-create-nested-one-without-settings.input';
|
||||
|
||||
@InputType()
|
||||
export class UserSettingsCreateInput {
|
||||
|
||||
@Field(() => String, {nullable:true})
|
||||
id?: string;
|
||||
|
||||
@Field(() => ColorScheme, {nullable:true})
|
||||
@Validator.IsString()
|
||||
@Validator.IsOptional()
|
||||
colorScheme?: keyof typeof ColorScheme;
|
||||
|
||||
@Field(() => String, {nullable:false})
|
||||
@Validator.IsString()
|
||||
locale!: string;
|
||||
|
||||
@Field(() => Date, {nullable:true})
|
||||
createdAt?: Date | string;
|
||||
|
||||
@Field(() => Date, {nullable:true})
|
||||
updatedAt?: Date | string;
|
||||
|
||||
@Field(() => UserCreateNestedOneWithoutSettingsInput, {nullable:true})
|
||||
user?: UserCreateNestedOneWithoutSettingsInput;
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
import { Field } from '@nestjs/graphql';
|
||||
import { ArgsType } from '@nestjs/graphql';
|
||||
import { UserSettingsWhereInput } from './user-settings-where.input';
|
||||
import { Type } from 'class-transformer';
|
||||
import { UserSettingsOrderByWithAggregationInput } from './user-settings-order-by-with-aggregation.input';
|
||||
import { UserSettingsScalarFieldEnum } from './user-settings-scalar-field.enum';
|
||||
import { UserSettingsScalarWhereWithAggregatesInput } from './user-settings-scalar-where-with-aggregates.input';
|
||||
import { Int } from '@nestjs/graphql';
|
||||
import { UserSettingsCountAggregateInput } from './user-settings-count-aggregate.input';
|
||||
import { UserSettingsMinAggregateInput } from './user-settings-min-aggregate.input';
|
||||
import { UserSettingsMaxAggregateInput } from './user-settings-max-aggregate.input';
|
||||
|
||||
@ArgsType()
|
||||
export class UserSettingsGroupByArgs {
|
||||
|
||||
@Field(() => UserSettingsWhereInput, {nullable:true})
|
||||
@Type(() => UserSettingsWhereInput)
|
||||
where?: UserSettingsWhereInput;
|
||||
|
||||
@Field(() => [UserSettingsOrderByWithAggregationInput], {nullable:true})
|
||||
orderBy?: Array<UserSettingsOrderByWithAggregationInput>;
|
||||
|
||||
@Field(() => [UserSettingsScalarFieldEnum], {nullable:false})
|
||||
by!: Array<keyof typeof UserSettingsScalarFieldEnum>;
|
||||
|
||||
@Field(() => UserSettingsScalarWhereWithAggregatesInput, {nullable:true})
|
||||
having?: UserSettingsScalarWhereWithAggregatesInput;
|
||||
|
||||
@Field(() => Int, {nullable:true})
|
||||
take?: number;
|
||||
|
||||
@Field(() => Int, {nullable:true})
|
||||
skip?: number;
|
||||
|
||||
@Field(() => UserSettingsCountAggregateInput, {nullable:true})
|
||||
_count?: UserSettingsCountAggregateInput;
|
||||
|
||||
@Field(() => UserSettingsMinAggregateInput, {nullable:true})
|
||||
_min?: UserSettingsMinAggregateInput;
|
||||
|
||||
@Field(() => UserSettingsMaxAggregateInput, {nullable:true})
|
||||
_max?: UserSettingsMaxAggregateInput;
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
import { Field } from '@nestjs/graphql';
|
||||
import { ObjectType } from '@nestjs/graphql';
|
||||
import { ColorScheme } from '../prisma/color-scheme.enum';
|
||||
import * as Validator from 'class-validator';
|
||||
import { UserSettingsCountAggregate } from './user-settings-count-aggregate.output';
|
||||
import { UserSettingsMinAggregate } from './user-settings-min-aggregate.output';
|
||||
import { UserSettingsMaxAggregate } from './user-settings-max-aggregate.output';
|
||||
|
||||
@ObjectType()
|
||||
export class UserSettingsGroupBy {
|
||||
|
||||
@Field(() => String, {nullable:false})
|
||||
id!: string;
|
||||
|
||||
@Field(() => ColorScheme, {nullable:false})
|
||||
@Validator.IsString()
|
||||
@Validator.IsOptional()
|
||||
colorScheme!: keyof typeof ColorScheme;
|
||||
|
||||
@Field(() => String, {nullable:false})
|
||||
@Validator.IsString()
|
||||
locale!: string;
|
||||
|
||||
@Field(() => Date, {nullable:false})
|
||||
createdAt!: Date | string;
|
||||
|
||||
@Field(() => Date, {nullable:false})
|
||||
updatedAt!: Date | string;
|
||||
|
||||
@Field(() => UserSettingsCountAggregate, {nullable:true})
|
||||
_count?: UserSettingsCountAggregate;
|
||||
|
||||
@Field(() => UserSettingsMinAggregate, {nullable:true})
|
||||
_min?: UserSettingsMinAggregate;
|
||||
|
||||
@Field(() => UserSettingsMaxAggregate, {nullable:true})
|
||||
_max?: UserSettingsMaxAggregate;
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
import { Field } from '@nestjs/graphql';
|
||||
import { InputType } from '@nestjs/graphql';
|
||||
|
||||
@InputType()
|
||||
export class UserSettingsMaxAggregateInput {
|
||||
|
||||
@Field(() => Boolean, {nullable:true})
|
||||
id?: true;
|
||||
|
||||
@Field(() => Boolean, {nullable:true})
|
||||
colorScheme?: true;
|
||||
|
||||
@Field(() => Boolean, {nullable:true})
|
||||
locale?: true;
|
||||
|
||||
@Field(() => Boolean, {nullable:true})
|
||||
createdAt?: true;
|
||||
|
||||
@Field(() => Boolean, {nullable:true})
|
||||
updatedAt?: true;
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
import { Field } from '@nestjs/graphql';
|
||||
import { ObjectType } from '@nestjs/graphql';
|
||||
import { ColorScheme } from '../prisma/color-scheme.enum';
|
||||
import * as Validator from 'class-validator';
|
||||
|
||||
@ObjectType()
|
||||
export class UserSettingsMaxAggregate {
|
||||
|
||||
@Field(() => String, {nullable:true})
|
||||
id?: string;
|
||||
|
||||
@Field(() => ColorScheme, {nullable:true})
|
||||
@Validator.IsString()
|
||||
@Validator.IsOptional()
|
||||
colorScheme?: keyof typeof ColorScheme;
|
||||
|
||||
@Field(() => String, {nullable:true})
|
||||
@Validator.IsString()
|
||||
locale?: string;
|
||||
|
||||
@Field(() => Date, {nullable:true})
|
||||
createdAt?: Date | string;
|
||||
|
||||
@Field(() => Date, {nullable:true})
|
||||
updatedAt?: Date | string;
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
import { Field } from '@nestjs/graphql';
|
||||
import { InputType } from '@nestjs/graphql';
|
||||
import { SortOrder } from '../prisma/sort-order.enum';
|
||||
|
||||
@InputType()
|
||||
export class UserSettingsMaxOrderByAggregateInput {
|
||||
|
||||
@Field(() => SortOrder, {nullable:true})
|
||||
id?: keyof typeof SortOrder;
|
||||
|
||||
@Field(() => SortOrder, {nullable:true})
|
||||
colorScheme?: keyof typeof SortOrder;
|
||||
|
||||
@Field(() => SortOrder, {nullable:true})
|
||||
locale?: keyof typeof SortOrder;
|
||||
|
||||
@Field(() => SortOrder, {nullable:true})
|
||||
createdAt?: keyof typeof SortOrder;
|
||||
|
||||
@Field(() => SortOrder, {nullable:true})
|
||||
updatedAt?: keyof typeof SortOrder;
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
import { Field } from '@nestjs/graphql';
|
||||
import { InputType } from '@nestjs/graphql';
|
||||
|
||||
@InputType()
|
||||
export class UserSettingsMinAggregateInput {
|
||||
|
||||
@Field(() => Boolean, {nullable:true})
|
||||
id?: true;
|
||||
|
||||
@Field(() => Boolean, {nullable:true})
|
||||
colorScheme?: true;
|
||||
|
||||
@Field(() => Boolean, {nullable:true})
|
||||
locale?: true;
|
||||
|
||||
@Field(() => Boolean, {nullable:true})
|
||||
createdAt?: true;
|
||||
|
||||
@Field(() => Boolean, {nullable:true})
|
||||
updatedAt?: true;
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
import { Field } from '@nestjs/graphql';
|
||||
import { ObjectType } from '@nestjs/graphql';
|
||||
import { ColorScheme } from '../prisma/color-scheme.enum';
|
||||
import * as Validator from 'class-validator';
|
||||
|
||||
@ObjectType()
|
||||
export class UserSettingsMinAggregate {
|
||||
|
||||
@Field(() => String, {nullable:true})
|
||||
id?: string;
|
||||
|
||||
@Field(() => ColorScheme, {nullable:true})
|
||||
@Validator.IsString()
|
||||
@Validator.IsOptional()
|
||||
colorScheme?: keyof typeof ColorScheme;
|
||||
|
||||
@Field(() => String, {nullable:true})
|
||||
@Validator.IsString()
|
||||
locale?: string;
|
||||
|
||||
@Field(() => Date, {nullable:true})
|
||||
createdAt?: Date | string;
|
||||
|
||||
@Field(() => Date, {nullable:true})
|
||||
updatedAt?: Date | string;
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
import { Field } from '@nestjs/graphql';
|
||||
import { InputType } from '@nestjs/graphql';
|
||||
import { SortOrder } from '../prisma/sort-order.enum';
|
||||
|
||||
@InputType()
|
||||
export class UserSettingsMinOrderByAggregateInput {
|
||||
|
||||
@Field(() => SortOrder, {nullable:true})
|
||||
id?: keyof typeof SortOrder;
|
||||
|
||||
@Field(() => SortOrder, {nullable:true})
|
||||
colorScheme?: keyof typeof SortOrder;
|
||||
|
||||
@Field(() => SortOrder, {nullable:true})
|
||||
locale?: keyof typeof SortOrder;
|
||||
|
||||
@Field(() => SortOrder, {nullable:true})
|
||||
createdAt?: keyof typeof SortOrder;
|
||||
|
||||
@Field(() => SortOrder, {nullable:true})
|
||||
updatedAt?: keyof typeof SortOrder;
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
import { Field } from '@nestjs/graphql';
|
||||
import { InputType } from '@nestjs/graphql';
|
||||
import { SortOrder } from '../prisma/sort-order.enum';
|
||||
import { UserSettingsCountOrderByAggregateInput } from './user-settings-count-order-by-aggregate.input';
|
||||
import { UserSettingsMaxOrderByAggregateInput } from './user-settings-max-order-by-aggregate.input';
|
||||
import { UserSettingsMinOrderByAggregateInput } from './user-settings-min-order-by-aggregate.input';
|
||||
|
||||
@InputType()
|
||||
export class UserSettingsOrderByWithAggregationInput {
|
||||
|
||||
@Field(() => SortOrder, {nullable:true})
|
||||
id?: keyof typeof SortOrder;
|
||||
|
||||
@Field(() => SortOrder, {nullable:true})
|
||||
colorScheme?: keyof typeof SortOrder;
|
||||
|
||||
@Field(() => SortOrder, {nullable:true})
|
||||
locale?: keyof typeof SortOrder;
|
||||
|
||||
@Field(() => SortOrder, {nullable:true})
|
||||
createdAt?: keyof typeof SortOrder;
|
||||
|
||||
@Field(() => SortOrder, {nullable:true})
|
||||
updatedAt?: keyof typeof SortOrder;
|
||||
|
||||
@Field(() => UserSettingsCountOrderByAggregateInput, {nullable:true})
|
||||
_count?: UserSettingsCountOrderByAggregateInput;
|
||||
|
||||
@Field(() => UserSettingsMaxOrderByAggregateInput, {nullable:true})
|
||||
_max?: UserSettingsMaxOrderByAggregateInput;
|
||||
|
||||
@Field(() => UserSettingsMinOrderByAggregateInput, {nullable:true})
|
||||
_min?: UserSettingsMinOrderByAggregateInput;
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
import { Field } from '@nestjs/graphql';
|
||||
import { InputType } from '@nestjs/graphql';
|
||||
import { SortOrder } from '../prisma/sort-order.enum';
|
||||
import { UserOrderByWithRelationInput } from '../user/user-order-by-with-relation.input';
|
||||
|
||||
@InputType()
|
||||
export class UserSettingsOrderByWithRelationInput {
|
||||
|
||||
@Field(() => SortOrder, {nullable:true})
|
||||
id?: keyof typeof SortOrder;
|
||||
|
||||
@Field(() => SortOrder, {nullable:true})
|
||||
colorScheme?: keyof typeof SortOrder;
|
||||
|
||||
@Field(() => SortOrder, {nullable:true})
|
||||
locale?: keyof typeof SortOrder;
|
||||
|
||||
@Field(() => SortOrder, {nullable:true})
|
||||
createdAt?: keyof typeof SortOrder;
|
||||
|
||||
@Field(() => SortOrder, {nullable:true})
|
||||
updatedAt?: keyof typeof SortOrder;
|
||||
|
||||
@Field(() => UserOrderByWithRelationInput, {nullable:true})
|
||||
user?: UserOrderByWithRelationInput;
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
import { Field } from '@nestjs/graphql';
|
||||
import { InputType } from '@nestjs/graphql';
|
||||
import { UserSettingsWhereInput } from './user-settings-where.input';
|
||||
|
||||
@InputType()
|
||||
export class UserSettingsRelationFilter {
|
||||
|
||||
@Field(() => UserSettingsWhereInput, {nullable:true})
|
||||
is?: UserSettingsWhereInput;
|
||||
|
||||
@Field(() => UserSettingsWhereInput, {nullable:true})
|
||||
isNot?: UserSettingsWhereInput;
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
import { registerEnumType } from '@nestjs/graphql';
|
||||
|
||||
export enum UserSettingsScalarFieldEnum {
|
||||
id = "id",
|
||||
colorScheme = "colorScheme",
|
||||
locale = "locale",
|
||||
createdAt = "createdAt",
|
||||
updatedAt = "updatedAt"
|
||||
}
|
||||
|
||||
|
||||
registerEnumType(UserSettingsScalarFieldEnum, { name: 'UserSettingsScalarFieldEnum', description: undefined })
|
||||
@@ -0,0 +1,33 @@
|
||||
import { Field } from '@nestjs/graphql';
|
||||
import { InputType } from '@nestjs/graphql';
|
||||
import { StringWithAggregatesFilter } from '../prisma/string-with-aggregates-filter.input';
|
||||
import { EnumColorSchemeWithAggregatesFilter } from '../prisma/enum-color-scheme-with-aggregates-filter.input';
|
||||
import { DateTimeWithAggregatesFilter } from '../prisma/date-time-with-aggregates-filter.input';
|
||||
|
||||
@InputType()
|
||||
export class UserSettingsScalarWhereWithAggregatesInput {
|
||||
|
||||
@Field(() => [UserSettingsScalarWhereWithAggregatesInput], {nullable:true})
|
||||
AND?: Array<UserSettingsScalarWhereWithAggregatesInput>;
|
||||
|
||||
@Field(() => [UserSettingsScalarWhereWithAggregatesInput], {nullable:true})
|
||||
OR?: Array<UserSettingsScalarWhereWithAggregatesInput>;
|
||||
|
||||
@Field(() => [UserSettingsScalarWhereWithAggregatesInput], {nullable:true})
|
||||
NOT?: Array<UserSettingsScalarWhereWithAggregatesInput>;
|
||||
|
||||
@Field(() => StringWithAggregatesFilter, {nullable:true})
|
||||
id?: StringWithAggregatesFilter;
|
||||
|
||||
@Field(() => EnumColorSchemeWithAggregatesFilter, {nullable:true})
|
||||
colorScheme?: EnumColorSchemeWithAggregatesFilter;
|
||||
|
||||
@Field(() => StringWithAggregatesFilter, {nullable:true})
|
||||
locale?: StringWithAggregatesFilter;
|
||||
|
||||
@Field(() => DateTimeWithAggregatesFilter, {nullable:true})
|
||||
createdAt?: DateTimeWithAggregatesFilter;
|
||||
|
||||
@Field(() => DateTimeWithAggregatesFilter, {nullable:true})
|
||||
updatedAt?: DateTimeWithAggregatesFilter;
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
import { Field } from '@nestjs/graphql';
|
||||
import { InputType } from '@nestjs/graphql';
|
||||
import { ColorScheme } from '../prisma/color-scheme.enum';
|
||||
import * as Validator from 'class-validator';
|
||||
|
||||
@InputType()
|
||||
export class UserSettingsUncheckedCreateWithoutUserInput {
|
||||
|
||||
@Field(() => String, {nullable:true})
|
||||
id?: string;
|
||||
|
||||
@Field(() => ColorScheme, {nullable:true})
|
||||
@Validator.IsString()
|
||||
@Validator.IsOptional()
|
||||
colorScheme?: keyof typeof ColorScheme;
|
||||
|
||||
@Field(() => String, {nullable:false})
|
||||
@Validator.IsString()
|
||||
locale!: string;
|
||||
|
||||
@Field(() => Date, {nullable:true})
|
||||
createdAt?: Date | string;
|
||||
|
||||
@Field(() => Date, {nullable:true})
|
||||
updatedAt?: Date | string;
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
import { Field } from '@nestjs/graphql';
|
||||
import { InputType } from '@nestjs/graphql';
|
||||
import { ColorScheme } from '../prisma/color-scheme.enum';
|
||||
import * as Validator from 'class-validator';
|
||||
import { UserUncheckedCreateNestedOneWithoutSettingsInput } from '../user/user-unchecked-create-nested-one-without-settings.input';
|
||||
|
||||
@InputType()
|
||||
export class UserSettingsUncheckedCreateInput {
|
||||
|
||||
@Field(() => String, {nullable:true})
|
||||
id?: string;
|
||||
|
||||
@Field(() => ColorScheme, {nullable:true})
|
||||
@Validator.IsString()
|
||||
@Validator.IsOptional()
|
||||
colorScheme?: keyof typeof ColorScheme;
|
||||
|
||||
@Field(() => String, {nullable:false})
|
||||
@Validator.IsString()
|
||||
locale!: string;
|
||||
|
||||
@Field(() => Date, {nullable:true})
|
||||
createdAt?: Date | string;
|
||||
|
||||
@Field(() => Date, {nullable:true})
|
||||
updatedAt?: Date | string;
|
||||
|
||||
@Field(() => UserUncheckedCreateNestedOneWithoutSettingsInput, {nullable:true})
|
||||
user?: UserUncheckedCreateNestedOneWithoutSettingsInput;
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
import { Field } from '@nestjs/graphql';
|
||||
import { InputType } from '@nestjs/graphql';
|
||||
import { StringFieldUpdateOperationsInput } from '../prisma/string-field-update-operations.input';
|
||||
import { EnumColorSchemeFieldUpdateOperationsInput } from '../prisma/enum-color-scheme-field-update-operations.input';
|
||||
import { DateTimeFieldUpdateOperationsInput } from '../prisma/date-time-field-update-operations.input';
|
||||
|
||||
@InputType()
|
||||
export class UserSettingsUncheckedUpdateManyInput {
|
||||
|
||||
@Field(() => StringFieldUpdateOperationsInput, {nullable:true})
|
||||
id?: StringFieldUpdateOperationsInput;
|
||||
|
||||
@Field(() => EnumColorSchemeFieldUpdateOperationsInput, {nullable:true})
|
||||
colorScheme?: EnumColorSchemeFieldUpdateOperationsInput;
|
||||
|
||||
@Field(() => StringFieldUpdateOperationsInput, {nullable:true})
|
||||
locale?: StringFieldUpdateOperationsInput;
|
||||
|
||||
@Field(() => DateTimeFieldUpdateOperationsInput, {nullable:true})
|
||||
createdAt?: DateTimeFieldUpdateOperationsInput;
|
||||
|
||||
@Field(() => DateTimeFieldUpdateOperationsInput, {nullable:true})
|
||||
updatedAt?: DateTimeFieldUpdateOperationsInput;
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
import { Field } from '@nestjs/graphql';
|
||||
import { InputType } from '@nestjs/graphql';
|
||||
import { StringFieldUpdateOperationsInput } from '../prisma/string-field-update-operations.input';
|
||||
import { EnumColorSchemeFieldUpdateOperationsInput } from '../prisma/enum-color-scheme-field-update-operations.input';
|
||||
import { DateTimeFieldUpdateOperationsInput } from '../prisma/date-time-field-update-operations.input';
|
||||
|
||||
@InputType()
|
||||
export class UserSettingsUncheckedUpdateWithoutUserInput {
|
||||
|
||||
@Field(() => StringFieldUpdateOperationsInput, {nullable:true})
|
||||
id?: StringFieldUpdateOperationsInput;
|
||||
|
||||
@Field(() => EnumColorSchemeFieldUpdateOperationsInput, {nullable:true})
|
||||
colorScheme?: EnumColorSchemeFieldUpdateOperationsInput;
|
||||
|
||||
@Field(() => StringFieldUpdateOperationsInput, {nullable:true})
|
||||
locale?: StringFieldUpdateOperationsInput;
|
||||
|
||||
@Field(() => DateTimeFieldUpdateOperationsInput, {nullable:true})
|
||||
createdAt?: DateTimeFieldUpdateOperationsInput;
|
||||
|
||||
@Field(() => DateTimeFieldUpdateOperationsInput, {nullable:true})
|
||||
updatedAt?: DateTimeFieldUpdateOperationsInput;
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
import { Field } from '@nestjs/graphql';
|
||||
import { InputType } from '@nestjs/graphql';
|
||||
import { StringFieldUpdateOperationsInput } from '../prisma/string-field-update-operations.input';
|
||||
import { EnumColorSchemeFieldUpdateOperationsInput } from '../prisma/enum-color-scheme-field-update-operations.input';
|
||||
import { DateTimeFieldUpdateOperationsInput } from '../prisma/date-time-field-update-operations.input';
|
||||
import { UserUncheckedUpdateOneWithoutSettingsNestedInput } from '../user/user-unchecked-update-one-without-settings-nested.input';
|
||||
|
||||
@InputType()
|
||||
export class UserSettingsUncheckedUpdateInput {
|
||||
|
||||
@Field(() => StringFieldUpdateOperationsInput, {nullable:true})
|
||||
id?: StringFieldUpdateOperationsInput;
|
||||
|
||||
@Field(() => EnumColorSchemeFieldUpdateOperationsInput, {nullable:true})
|
||||
colorScheme?: EnumColorSchemeFieldUpdateOperationsInput;
|
||||
|
||||
@Field(() => StringFieldUpdateOperationsInput, {nullable:true})
|
||||
locale?: StringFieldUpdateOperationsInput;
|
||||
|
||||
@Field(() => DateTimeFieldUpdateOperationsInput, {nullable:true})
|
||||
createdAt?: DateTimeFieldUpdateOperationsInput;
|
||||
|
||||
@Field(() => DateTimeFieldUpdateOperationsInput, {nullable:true})
|
||||
updatedAt?: DateTimeFieldUpdateOperationsInput;
|
||||
|
||||
@Field(() => UserUncheckedUpdateOneWithoutSettingsNestedInput, {nullable:true})
|
||||
user?: UserUncheckedUpdateOneWithoutSettingsNestedInput;
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
import { Field } from '@nestjs/graphql';
|
||||
import { InputType } from '@nestjs/graphql';
|
||||
import { StringFieldUpdateOperationsInput } from '../prisma/string-field-update-operations.input';
|
||||
import { EnumColorSchemeFieldUpdateOperationsInput } from '../prisma/enum-color-scheme-field-update-operations.input';
|
||||
import { DateTimeFieldUpdateOperationsInput } from '../prisma/date-time-field-update-operations.input';
|
||||
|
||||
@InputType()
|
||||
export class UserSettingsUpdateManyMutationInput {
|
||||
|
||||
@Field(() => StringFieldUpdateOperationsInput, {nullable:true})
|
||||
id?: StringFieldUpdateOperationsInput;
|
||||
|
||||
@Field(() => EnumColorSchemeFieldUpdateOperationsInput, {nullable:true})
|
||||
colorScheme?: EnumColorSchemeFieldUpdateOperationsInput;
|
||||
|
||||
@Field(() => StringFieldUpdateOperationsInput, {nullable:true})
|
||||
locale?: StringFieldUpdateOperationsInput;
|
||||
|
||||
@Field(() => DateTimeFieldUpdateOperationsInput, {nullable:true})
|
||||
createdAt?: DateTimeFieldUpdateOperationsInput;
|
||||
|
||||
@Field(() => DateTimeFieldUpdateOperationsInput, {nullable:true})
|
||||
updatedAt?: DateTimeFieldUpdateOperationsInput;
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
import { Field } from '@nestjs/graphql';
|
||||
import { InputType } from '@nestjs/graphql';
|
||||
import { UserSettingsCreateWithoutUserInput } from './user-settings-create-without-user.input';
|
||||
import { Type } from 'class-transformer';
|
||||
import { UserSettingsCreateOrConnectWithoutUserInput } from './user-settings-create-or-connect-without-user.input';
|
||||
import { UserSettingsUpsertWithoutUserInput } from './user-settings-upsert-without-user.input';
|
||||
import { UserSettingsWhereUniqueInput } from './user-settings-where-unique.input';
|
||||
import { UserSettingsUpdateWithoutUserInput } from './user-settings-update-without-user.input';
|
||||
|
||||
@InputType()
|
||||
export class UserSettingsUpdateOneRequiredWithoutUserNestedInput {
|
||||
|
||||
@Field(() => UserSettingsCreateWithoutUserInput, {nullable:true})
|
||||
@Type(() => UserSettingsCreateWithoutUserInput)
|
||||
create?: UserSettingsCreateWithoutUserInput;
|
||||
|
||||
@Field(() => UserSettingsCreateOrConnectWithoutUserInput, {nullable:true})
|
||||
@Type(() => UserSettingsCreateOrConnectWithoutUserInput)
|
||||
connectOrCreate?: UserSettingsCreateOrConnectWithoutUserInput;
|
||||
|
||||
@Field(() => UserSettingsUpsertWithoutUserInput, {nullable:true})
|
||||
@Type(() => UserSettingsUpsertWithoutUserInput)
|
||||
upsert?: UserSettingsUpsertWithoutUserInput;
|
||||
|
||||
@Field(() => UserSettingsWhereUniqueInput, {nullable:true})
|
||||
@Type(() => UserSettingsWhereUniqueInput)
|
||||
connect?: UserSettingsWhereUniqueInput;
|
||||
|
||||
@Field(() => UserSettingsUpdateWithoutUserInput, {nullable:true})
|
||||
@Type(() => UserSettingsUpdateWithoutUserInput)
|
||||
update?: UserSettingsUpdateWithoutUserInput;
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
import { Field } from '@nestjs/graphql';
|
||||
import { InputType } from '@nestjs/graphql';
|
||||
import { StringFieldUpdateOperationsInput } from '../prisma/string-field-update-operations.input';
|
||||
import { EnumColorSchemeFieldUpdateOperationsInput } from '../prisma/enum-color-scheme-field-update-operations.input';
|
||||
import { DateTimeFieldUpdateOperationsInput } from '../prisma/date-time-field-update-operations.input';
|
||||
|
||||
@InputType()
|
||||
export class UserSettingsUpdateWithoutUserInput {
|
||||
|
||||
@Field(() => StringFieldUpdateOperationsInput, {nullable:true})
|
||||
id?: StringFieldUpdateOperationsInput;
|
||||
|
||||
@Field(() => EnumColorSchemeFieldUpdateOperationsInput, {nullable:true})
|
||||
colorScheme?: EnumColorSchemeFieldUpdateOperationsInput;
|
||||
|
||||
@Field(() => StringFieldUpdateOperationsInput, {nullable:true})
|
||||
locale?: StringFieldUpdateOperationsInput;
|
||||
|
||||
@Field(() => DateTimeFieldUpdateOperationsInput, {nullable:true})
|
||||
createdAt?: DateTimeFieldUpdateOperationsInput;
|
||||
|
||||
@Field(() => DateTimeFieldUpdateOperationsInput, {nullable:true})
|
||||
updatedAt?: DateTimeFieldUpdateOperationsInput;
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
import { Field } from '@nestjs/graphql';
|
||||
import { InputType } from '@nestjs/graphql';
|
||||
import { StringFieldUpdateOperationsInput } from '../prisma/string-field-update-operations.input';
|
||||
import { EnumColorSchemeFieldUpdateOperationsInput } from '../prisma/enum-color-scheme-field-update-operations.input';
|
||||
import { DateTimeFieldUpdateOperationsInput } from '../prisma/date-time-field-update-operations.input';
|
||||
import { UserUpdateOneWithoutSettingsNestedInput } from '../user/user-update-one-without-settings-nested.input';
|
||||
|
||||
@InputType()
|
||||
export class UserSettingsUpdateInput {
|
||||
|
||||
@Field(() => StringFieldUpdateOperationsInput, {nullable:true})
|
||||
id?: StringFieldUpdateOperationsInput;
|
||||
|
||||
@Field(() => EnumColorSchemeFieldUpdateOperationsInput, {nullable:true})
|
||||
colorScheme?: EnumColorSchemeFieldUpdateOperationsInput;
|
||||
|
||||
@Field(() => StringFieldUpdateOperationsInput, {nullable:true})
|
||||
locale?: StringFieldUpdateOperationsInput;
|
||||
|
||||
@Field(() => DateTimeFieldUpdateOperationsInput, {nullable:true})
|
||||
createdAt?: DateTimeFieldUpdateOperationsInput;
|
||||
|
||||
@Field(() => DateTimeFieldUpdateOperationsInput, {nullable:true})
|
||||
updatedAt?: DateTimeFieldUpdateOperationsInput;
|
||||
|
||||
@Field(() => UserUpdateOneWithoutSettingsNestedInput, {nullable:true})
|
||||
user?: UserUpdateOneWithoutSettingsNestedInput;
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
import { Field } from '@nestjs/graphql';
|
||||
import { InputType } from '@nestjs/graphql';
|
||||
import { UserSettingsUpdateWithoutUserInput } from './user-settings-update-without-user.input';
|
||||
import { Type } from 'class-transformer';
|
||||
import { UserSettingsCreateWithoutUserInput } from './user-settings-create-without-user.input';
|
||||
|
||||
@InputType()
|
||||
export class UserSettingsUpsertWithoutUserInput {
|
||||
|
||||
@Field(() => UserSettingsUpdateWithoutUserInput, {nullable:false})
|
||||
@Type(() => UserSettingsUpdateWithoutUserInput)
|
||||
update!: UserSettingsUpdateWithoutUserInput;
|
||||
|
||||
@Field(() => UserSettingsCreateWithoutUserInput, {nullable:false})
|
||||
@Type(() => UserSettingsCreateWithoutUserInput)
|
||||
create!: UserSettingsCreateWithoutUserInput;
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
import { Field } from '@nestjs/graphql';
|
||||
import { InputType } from '@nestjs/graphql';
|
||||
|
||||
@InputType()
|
||||
export class UserSettingsWhereUniqueInput {
|
||||
|
||||
@Field(() => String, {nullable:true})
|
||||
id?: string;
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
import { Field } from '@nestjs/graphql';
|
||||
import { InputType } from '@nestjs/graphql';
|
||||
import { StringFilter } from '../prisma/string-filter.input';
|
||||
import { EnumColorSchemeFilter } from '../prisma/enum-color-scheme-filter.input';
|
||||
import { DateTimeFilter } from '../prisma/date-time-filter.input';
|
||||
import { UserRelationFilter } from '../user/user-relation-filter.input';
|
||||
|
||||
@InputType()
|
||||
export class UserSettingsWhereInput {
|
||||
|
||||
@Field(() => [UserSettingsWhereInput], {nullable:true})
|
||||
AND?: Array<UserSettingsWhereInput>;
|
||||
|
||||
@Field(() => [UserSettingsWhereInput], {nullable:true})
|
||||
OR?: Array<UserSettingsWhereInput>;
|
||||
|
||||
@Field(() => [UserSettingsWhereInput], {nullable:true})
|
||||
NOT?: Array<UserSettingsWhereInput>;
|
||||
|
||||
@Field(() => StringFilter, {nullable:true})
|
||||
id?: StringFilter;
|
||||
|
||||
@Field(() => EnumColorSchemeFilter, {nullable:true})
|
||||
colorScheme?: EnumColorSchemeFilter;
|
||||
|
||||
@Field(() => StringFilter, {nullable:true})
|
||||
locale?: StringFilter;
|
||||
|
||||
@Field(() => DateTimeFilter, {nullable:true})
|
||||
createdAt?: DateTimeFilter;
|
||||
|
||||
@Field(() => DateTimeFilter, {nullable:true})
|
||||
updatedAt?: DateTimeFilter;
|
||||
|
||||
@Field(() => UserRelationFilter, {nullable:true})
|
||||
user?: UserRelationFilter;
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
import { Field } from '@nestjs/graphql';
|
||||
import { ObjectType } from '@nestjs/graphql';
|
||||
import { ID } from '@nestjs/graphql';
|
||||
import { ColorScheme } from '../prisma/color-scheme.enum';
|
||||
import { User } from '../user/user.model';
|
||||
|
||||
@ObjectType()
|
||||
export class UserSettings {
|
||||
|
||||
@Field(() => ID, {nullable:false})
|
||||
id!: string;
|
||||
|
||||
@Field(() => ColorScheme, {nullable:false,defaultValue:'System'})
|
||||
colorScheme!: keyof typeof ColorScheme;
|
||||
|
||||
@Field(() => String, {nullable:false})
|
||||
locale!: string;
|
||||
|
||||
@Field(() => Date, {nullable:false})
|
||||
createdAt!: Date;
|
||||
|
||||
@Field(() => Date, {nullable:false})
|
||||
updatedAt!: Date;
|
||||
|
||||
@Field(() => User, {nullable:true})
|
||||
user?: User | null;
|
||||
}
|
||||
@@ -41,6 +41,9 @@ export class UserCountAggregateInput {
|
||||
@Field(() => Boolean, {nullable:true})
|
||||
metadata?: true;
|
||||
|
||||
@Field(() => Boolean, {nullable:true})
|
||||
settingsId?: true;
|
||||
|
||||
@HideField()
|
||||
deletedAt?: true;
|
||||
|
||||
|
||||
@@ -42,6 +42,9 @@ export class UserCountAggregate {
|
||||
@Field(() => Int, {nullable:false})
|
||||
metadata!: number;
|
||||
|
||||
@Field(() => Int, {nullable:false})
|
||||
settingsId!: number;
|
||||
|
||||
@HideField()
|
||||
deletedAt!: number;
|
||||
|
||||
|
||||
@@ -42,6 +42,9 @@ export class UserCountOrderByAggregateInput {
|
||||
@Field(() => SortOrder, {nullable:true})
|
||||
metadata?: keyof typeof SortOrder;
|
||||
|
||||
@Field(() => SortOrder, {nullable:true})
|
||||
settingsId?: keyof typeof SortOrder;
|
||||
|
||||
@HideField()
|
||||
deletedAt?: keyof typeof SortOrder;
|
||||
|
||||
|
||||
@@ -63,6 +63,9 @@ export class UserCreateManyInput {
|
||||
@Validator.IsOptional()
|
||||
metadata?: any;
|
||||
|
||||
@Field(() => String, {nullable:false})
|
||||
settingsId!: string;
|
||||
|
||||
@HideField()
|
||||
deletedAt?: Date | string;
|
||||
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
import { Field } from '@nestjs/graphql';
|
||||
import { InputType } from '@nestjs/graphql';
|
||||
import { UserCreateWithoutSettingsInput } from './user-create-without-settings.input';
|
||||
import { Type } from 'class-transformer';
|
||||
import { UserCreateOrConnectWithoutSettingsInput } from './user-create-or-connect-without-settings.input';
|
||||
import { UserWhereUniqueInput } from './user-where-unique.input';
|
||||
|
||||
@InputType()
|
||||
export class UserCreateNestedOneWithoutSettingsInput {
|
||||
|
||||
@Field(() => UserCreateWithoutSettingsInput, {nullable:true})
|
||||
@Type(() => UserCreateWithoutSettingsInput)
|
||||
create?: UserCreateWithoutSettingsInput;
|
||||
|
||||
@Field(() => UserCreateOrConnectWithoutSettingsInput, {nullable:true})
|
||||
@Type(() => UserCreateOrConnectWithoutSettingsInput)
|
||||
connectOrCreate?: UserCreateOrConnectWithoutSettingsInput;
|
||||
|
||||
@Field(() => UserWhereUniqueInput, {nullable:true})
|
||||
@Type(() => UserWhereUniqueInput)
|
||||
connect?: UserWhereUniqueInput;
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
import { Field } from '@nestjs/graphql';
|
||||
import { InputType } from '@nestjs/graphql';
|
||||
import { UserWhereUniqueInput } from './user-where-unique.input';
|
||||
import { Type } from 'class-transformer';
|
||||
import { UserCreateWithoutSettingsInput } from './user-create-without-settings.input';
|
||||
|
||||
@InputType()
|
||||
export class UserCreateOrConnectWithoutSettingsInput {
|
||||
|
||||
@Field(() => UserWhereUniqueInput, {nullable:false})
|
||||
@Type(() => UserWhereUniqueInput)
|
||||
where!: UserWhereUniqueInput;
|
||||
|
||||
@Field(() => UserCreateWithoutSettingsInput, {nullable:false})
|
||||
@Type(() => UserCreateWithoutSettingsInput)
|
||||
create!: UserCreateWithoutSettingsInput;
|
||||
}
|
||||
@@ -8,6 +8,7 @@ import { CompanyCreateNestedManyWithoutAccountOwnerInput } from '../company/comp
|
||||
import { RefreshTokenCreateNestedManyWithoutUserInput } from '../refresh-token/refresh-token-create-nested-many-without-user.input';
|
||||
import { CommentCreateNestedManyWithoutAuthorInput } from '../comment/comment-create-nested-many-without-author.input';
|
||||
import { CommentThreadCreateNestedManyWithoutAuthorInput } from '../comment-thread/comment-thread-create-nested-many-without-author.input';
|
||||
import { UserSettingsCreateNestedOneWithoutUserInput } from '../user-settings/user-settings-create-nested-one-without-user.input';
|
||||
|
||||
@InputType()
|
||||
export class UserCreateWithoutAssignedCommentThreadsInput {
|
||||
@@ -91,4 +92,7 @@ export class UserCreateWithoutAssignedCommentThreadsInput {
|
||||
|
||||
@Field(() => CommentThreadCreateNestedManyWithoutAuthorInput, {nullable:true})
|
||||
authoredCommentThreads?: CommentThreadCreateNestedManyWithoutAuthorInput;
|
||||
|
||||
@Field(() => UserSettingsCreateNestedOneWithoutUserInput, {nullable:false})
|
||||
settings!: UserSettingsCreateNestedOneWithoutUserInput;
|
||||
}
|
||||
|
||||
@@ -8,6 +8,7 @@ import { CompanyCreateNestedManyWithoutAccountOwnerInput } from '../company/comp
|
||||
import { RefreshTokenCreateNestedManyWithoutUserInput } from '../refresh-token/refresh-token-create-nested-many-without-user.input';
|
||||
import { CommentCreateNestedManyWithoutAuthorInput } from '../comment/comment-create-nested-many-without-author.input';
|
||||
import { CommentThreadCreateNestedManyWithoutAssigneeInput } from '../comment-thread/comment-thread-create-nested-many-without-assignee.input';
|
||||
import { UserSettingsCreateNestedOneWithoutUserInput } from '../user-settings/user-settings-create-nested-one-without-user.input';
|
||||
|
||||
@InputType()
|
||||
export class UserCreateWithoutAuthoredCommentThreadsInput {
|
||||
@@ -91,4 +92,7 @@ export class UserCreateWithoutAuthoredCommentThreadsInput {
|
||||
|
||||
@Field(() => CommentThreadCreateNestedManyWithoutAssigneeInput, {nullable:true})
|
||||
assignedCommentThreads?: CommentThreadCreateNestedManyWithoutAssigneeInput;
|
||||
|
||||
@Field(() => UserSettingsCreateNestedOneWithoutUserInput, {nullable:false})
|
||||
settings!: UserSettingsCreateNestedOneWithoutUserInput;
|
||||
}
|
||||
|
||||
@@ -8,6 +8,7 @@ import { CompanyCreateNestedManyWithoutAccountOwnerInput } from '../company/comp
|
||||
import { RefreshTokenCreateNestedManyWithoutUserInput } from '../refresh-token/refresh-token-create-nested-many-without-user.input';
|
||||
import { CommentThreadCreateNestedManyWithoutAuthorInput } from '../comment-thread/comment-thread-create-nested-many-without-author.input';
|
||||
import { CommentThreadCreateNestedManyWithoutAssigneeInput } from '../comment-thread/comment-thread-create-nested-many-without-assignee.input';
|
||||
import { UserSettingsCreateNestedOneWithoutUserInput } from '../user-settings/user-settings-create-nested-one-without-user.input';
|
||||
|
||||
@InputType()
|
||||
export class UserCreateWithoutCommentsInput {
|
||||
@@ -91,4 +92,7 @@ export class UserCreateWithoutCommentsInput {
|
||||
|
||||
@Field(() => CommentThreadCreateNestedManyWithoutAssigneeInput, {nullable:true})
|
||||
assignedCommentThreads?: CommentThreadCreateNestedManyWithoutAssigneeInput;
|
||||
|
||||
@Field(() => UserSettingsCreateNestedOneWithoutUserInput, {nullable:false})
|
||||
settings!: UserSettingsCreateNestedOneWithoutUserInput;
|
||||
}
|
||||
|
||||
@@ -8,6 +8,7 @@ import { RefreshTokenCreateNestedManyWithoutUserInput } from '../refresh-token/r
|
||||
import { CommentCreateNestedManyWithoutAuthorInput } from '../comment/comment-create-nested-many-without-author.input';
|
||||
import { CommentThreadCreateNestedManyWithoutAuthorInput } from '../comment-thread/comment-thread-create-nested-many-without-author.input';
|
||||
import { CommentThreadCreateNestedManyWithoutAssigneeInput } from '../comment-thread/comment-thread-create-nested-many-without-assignee.input';
|
||||
import { UserSettingsCreateNestedOneWithoutUserInput } from '../user-settings/user-settings-create-nested-one-without-user.input';
|
||||
|
||||
@InputType()
|
||||
export class UserCreateWithoutCompaniesInput {
|
||||
@@ -91,4 +92,7 @@ export class UserCreateWithoutCompaniesInput {
|
||||
|
||||
@Field(() => CommentThreadCreateNestedManyWithoutAssigneeInput, {nullable:true})
|
||||
assignedCommentThreads?: CommentThreadCreateNestedManyWithoutAssigneeInput;
|
||||
|
||||
@Field(() => UserSettingsCreateNestedOneWithoutUserInput, {nullable:false})
|
||||
settings!: UserSettingsCreateNestedOneWithoutUserInput;
|
||||
}
|
||||
|
||||
@@ -8,6 +8,7 @@ import { CompanyCreateNestedManyWithoutAccountOwnerInput } from '../company/comp
|
||||
import { CommentCreateNestedManyWithoutAuthorInput } from '../comment/comment-create-nested-many-without-author.input';
|
||||
import { CommentThreadCreateNestedManyWithoutAuthorInput } from '../comment-thread/comment-thread-create-nested-many-without-author.input';
|
||||
import { CommentThreadCreateNestedManyWithoutAssigneeInput } from '../comment-thread/comment-thread-create-nested-many-without-assignee.input';
|
||||
import { UserSettingsCreateNestedOneWithoutUserInput } from '../user-settings/user-settings-create-nested-one-without-user.input';
|
||||
|
||||
@InputType()
|
||||
export class UserCreateWithoutRefreshTokensInput {
|
||||
@@ -91,4 +92,7 @@ export class UserCreateWithoutRefreshTokensInput {
|
||||
|
||||
@Field(() => CommentThreadCreateNestedManyWithoutAssigneeInput, {nullable:true})
|
||||
assignedCommentThreads?: CommentThreadCreateNestedManyWithoutAssigneeInput;
|
||||
|
||||
@Field(() => UserSettingsCreateNestedOneWithoutUserInput, {nullable:false})
|
||||
settings!: UserSettingsCreateNestedOneWithoutUserInput;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,98 @@
|
||||
import { Field } from '@nestjs/graphql';
|
||||
import { InputType } from '@nestjs/graphql';
|
||||
import * as Validator from 'class-validator';
|
||||
import { HideField } from '@nestjs/graphql';
|
||||
import { GraphQLJSON } from 'graphql-type-json';
|
||||
import { WorkspaceMemberCreateNestedOneWithoutUserInput } from '../workspace-member/workspace-member-create-nested-one-without-user.input';
|
||||
import { CompanyCreateNestedManyWithoutAccountOwnerInput } from '../company/company-create-nested-many-without-account-owner.input';
|
||||
import { RefreshTokenCreateNestedManyWithoutUserInput } from '../refresh-token/refresh-token-create-nested-many-without-user.input';
|
||||
import { CommentCreateNestedManyWithoutAuthorInput } from '../comment/comment-create-nested-many-without-author.input';
|
||||
import { CommentThreadCreateNestedManyWithoutAuthorInput } from '../comment-thread/comment-thread-create-nested-many-without-author.input';
|
||||
import { CommentThreadCreateNestedManyWithoutAssigneeInput } from '../comment-thread/comment-thread-create-nested-many-without-assignee.input';
|
||||
|
||||
@InputType()
|
||||
export class UserCreateWithoutSettingsInput {
|
||||
|
||||
@Field(() => String, {nullable:true})
|
||||
@Validator.IsString()
|
||||
@Validator.IsOptional()
|
||||
id?: string;
|
||||
|
||||
@Field(() => String, {nullable:true})
|
||||
@Validator.IsString()
|
||||
@Validator.IsOptional()
|
||||
firstName?: string;
|
||||
|
||||
@Field(() => String, {nullable:true})
|
||||
@Validator.IsString()
|
||||
@Validator.IsOptional()
|
||||
lastName?: string;
|
||||
|
||||
@Field(() => String, {nullable:false})
|
||||
@Validator.IsEmail()
|
||||
email!: string;
|
||||
|
||||
@Field(() => Boolean, {nullable:true})
|
||||
@Validator.IsBoolean()
|
||||
@Validator.IsOptional()
|
||||
emailVerified?: boolean;
|
||||
|
||||
@Field(() => String, {nullable:true})
|
||||
@Validator.IsString()
|
||||
@Validator.IsOptional()
|
||||
avatarUrl?: string;
|
||||
|
||||
@Field(() => String, {nullable:false})
|
||||
@Validator.IsString()
|
||||
locale!: string;
|
||||
|
||||
@Field(() => String, {nullable:true})
|
||||
@Validator.IsString()
|
||||
@Validator.IsOptional()
|
||||
phoneNumber?: string;
|
||||
|
||||
@Field(() => Date, {nullable:true})
|
||||
@Validator.IsDate()
|
||||
@Validator.IsOptional()
|
||||
lastSeen?: Date | string;
|
||||
|
||||
@Field(() => Boolean, {nullable:true})
|
||||
@Validator.IsBoolean()
|
||||
@Validator.IsOptional()
|
||||
disabled?: boolean;
|
||||
|
||||
@HideField()
|
||||
passwordHash?: string;
|
||||
|
||||
@Field(() => GraphQLJSON, {nullable:true})
|
||||
@Validator.IsJSON()
|
||||
@Validator.IsOptional()
|
||||
metadata?: any;
|
||||
|
||||
@HideField()
|
||||
deletedAt?: Date | string;
|
||||
|
||||
@Field(() => Date, {nullable:true})
|
||||
createdAt?: Date | string;
|
||||
|
||||
@Field(() => Date, {nullable:true})
|
||||
updatedAt?: Date | string;
|
||||
|
||||
@HideField()
|
||||
workspaceMember?: WorkspaceMemberCreateNestedOneWithoutUserInput;
|
||||
|
||||
@Field(() => CompanyCreateNestedManyWithoutAccountOwnerInput, {nullable:true})
|
||||
companies?: CompanyCreateNestedManyWithoutAccountOwnerInput;
|
||||
|
||||
@HideField()
|
||||
refreshTokens?: RefreshTokenCreateNestedManyWithoutUserInput;
|
||||
|
||||
@Field(() => CommentCreateNestedManyWithoutAuthorInput, {nullable:true})
|
||||
comments?: CommentCreateNestedManyWithoutAuthorInput;
|
||||
|
||||
@Field(() => CommentThreadCreateNestedManyWithoutAuthorInput, {nullable:true})
|
||||
authoredCommentThreads?: CommentThreadCreateNestedManyWithoutAuthorInput;
|
||||
|
||||
@Field(() => CommentThreadCreateNestedManyWithoutAssigneeInput, {nullable:true})
|
||||
assignedCommentThreads?: CommentThreadCreateNestedManyWithoutAssigneeInput;
|
||||
}
|
||||
@@ -8,6 +8,7 @@ import { RefreshTokenCreateNestedManyWithoutUserInput } from '../refresh-token/r
|
||||
import { CommentCreateNestedManyWithoutAuthorInput } from '../comment/comment-create-nested-many-without-author.input';
|
||||
import { CommentThreadCreateNestedManyWithoutAuthorInput } from '../comment-thread/comment-thread-create-nested-many-without-author.input';
|
||||
import { CommentThreadCreateNestedManyWithoutAssigneeInput } from '../comment-thread/comment-thread-create-nested-many-without-assignee.input';
|
||||
import { UserSettingsCreateNestedOneWithoutUserInput } from '../user-settings/user-settings-create-nested-one-without-user.input';
|
||||
|
||||
@InputType()
|
||||
export class UserCreateWithoutWorkspaceMemberInput {
|
||||
@@ -91,4 +92,7 @@ export class UserCreateWithoutWorkspaceMemberInput {
|
||||
|
||||
@Field(() => CommentThreadCreateNestedManyWithoutAssigneeInput, {nullable:true})
|
||||
assignedCommentThreads?: CommentThreadCreateNestedManyWithoutAssigneeInput;
|
||||
|
||||
@Field(() => UserSettingsCreateNestedOneWithoutUserInput, {nullable:false})
|
||||
settings!: UserSettingsCreateNestedOneWithoutUserInput;
|
||||
}
|
||||
|
||||
@@ -9,6 +9,7 @@ import { RefreshTokenCreateNestedManyWithoutUserInput } from '../refresh-token/r
|
||||
import { CommentCreateNestedManyWithoutAuthorInput } from '../comment/comment-create-nested-many-without-author.input';
|
||||
import { CommentThreadCreateNestedManyWithoutAuthorInput } from '../comment-thread/comment-thread-create-nested-many-without-author.input';
|
||||
import { CommentThreadCreateNestedManyWithoutAssigneeInput } from '../comment-thread/comment-thread-create-nested-many-without-assignee.input';
|
||||
import { UserSettingsCreateNestedOneWithoutUserInput } from '../user-settings/user-settings-create-nested-one-without-user.input';
|
||||
|
||||
@InputType()
|
||||
export class UserCreateInput {
|
||||
@@ -95,4 +96,7 @@ export class UserCreateInput {
|
||||
|
||||
@Field(() => CommentThreadCreateNestedManyWithoutAssigneeInput, {nullable:true})
|
||||
assignedCommentThreads?: CommentThreadCreateNestedManyWithoutAssigneeInput;
|
||||
|
||||
@Field(() => UserSettingsCreateNestedOneWithoutUserInput, {nullable:false})
|
||||
settings!: UserSettingsCreateNestedOneWithoutUserInput;
|
||||
}
|
||||
|
||||
@@ -66,6 +66,9 @@ export class UserGroupBy {
|
||||
@Validator.IsOptional()
|
||||
metadata?: any;
|
||||
|
||||
@Field(() => String, {nullable:false})
|
||||
settingsId!: string;
|
||||
|
||||
@HideField()
|
||||
deletedAt?: Date | string;
|
||||
|
||||
|
||||
@@ -38,6 +38,9 @@ export class UserMaxAggregateInput {
|
||||
@HideField()
|
||||
passwordHash?: true;
|
||||
|
||||
@Field(() => Boolean, {nullable:true})
|
||||
settingsId?: true;
|
||||
|
||||
@HideField()
|
||||
deletedAt?: true;
|
||||
|
||||
|
||||
@@ -57,6 +57,9 @@ export class UserMaxAggregate {
|
||||
@HideField()
|
||||
passwordHash?: string;
|
||||
|
||||
@Field(() => String, {nullable:true})
|
||||
settingsId?: string;
|
||||
|
||||
@HideField()
|
||||
deletedAt?: Date | string;
|
||||
|
||||
|
||||
@@ -39,6 +39,9 @@ export class UserMaxOrderByAggregateInput {
|
||||
@HideField()
|
||||
passwordHash?: keyof typeof SortOrder;
|
||||
|
||||
@Field(() => SortOrder, {nullable:true})
|
||||
settingsId?: keyof typeof SortOrder;
|
||||
|
||||
@HideField()
|
||||
deletedAt?: keyof typeof SortOrder;
|
||||
|
||||
|
||||
@@ -38,6 +38,9 @@ export class UserMinAggregateInput {
|
||||
@HideField()
|
||||
passwordHash?: true;
|
||||
|
||||
@Field(() => Boolean, {nullable:true})
|
||||
settingsId?: true;
|
||||
|
||||
@HideField()
|
||||
deletedAt?: true;
|
||||
|
||||
|
||||
@@ -57,6 +57,9 @@ export class UserMinAggregate {
|
||||
@HideField()
|
||||
passwordHash?: string;
|
||||
|
||||
@Field(() => String, {nullable:true})
|
||||
settingsId?: string;
|
||||
|
||||
@HideField()
|
||||
deletedAt?: Date | string;
|
||||
|
||||
|
||||
@@ -39,6 +39,9 @@ export class UserMinOrderByAggregateInput {
|
||||
@HideField()
|
||||
passwordHash?: keyof typeof SortOrder;
|
||||
|
||||
@Field(() => SortOrder, {nullable:true})
|
||||
settingsId?: keyof typeof SortOrder;
|
||||
|
||||
@HideField()
|
||||
deletedAt?: keyof typeof SortOrder;
|
||||
|
||||
|
||||
@@ -45,6 +45,9 @@ export class UserOrderByWithAggregationInput {
|
||||
@Field(() => SortOrder, {nullable:true})
|
||||
metadata?: keyof typeof SortOrder;
|
||||
|
||||
@Field(() => SortOrder, {nullable:true})
|
||||
settingsId?: keyof typeof SortOrder;
|
||||
|
||||
@HideField()
|
||||
deletedAt?: keyof typeof SortOrder;
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@ import { CompanyOrderByRelationAggregateInput } from '../company/company-order-b
|
||||
import { RefreshTokenOrderByRelationAggregateInput } from '../refresh-token/refresh-token-order-by-relation-aggregate.input';
|
||||
import { CommentOrderByRelationAggregateInput } from '../comment/comment-order-by-relation-aggregate.input';
|
||||
import { CommentThreadOrderByRelationAggregateInput } from '../comment-thread/comment-thread-order-by-relation-aggregate.input';
|
||||
import { UserSettingsOrderByWithRelationInput } from '../user-settings/user-settings-order-by-with-relation.input';
|
||||
|
||||
@InputType()
|
||||
export class UserOrderByWithRelationInput {
|
||||
@@ -47,6 +48,9 @@ export class UserOrderByWithRelationInput {
|
||||
@Field(() => SortOrder, {nullable:true})
|
||||
metadata?: keyof typeof SortOrder;
|
||||
|
||||
@Field(() => SortOrder, {nullable:true})
|
||||
settingsId?: keyof typeof SortOrder;
|
||||
|
||||
@HideField()
|
||||
deletedAt?: keyof typeof SortOrder;
|
||||
|
||||
@@ -73,4 +77,7 @@ export class UserOrderByWithRelationInput {
|
||||
|
||||
@Field(() => CommentThreadOrderByRelationAggregateInput, {nullable:true})
|
||||
assignedCommentThreads?: CommentThreadOrderByRelationAggregateInput;
|
||||
|
||||
@Field(() => UserSettingsOrderByWithRelationInput, {nullable:true})
|
||||
settings?: UserSettingsOrderByWithRelationInput;
|
||||
}
|
||||
|
||||
@@ -13,6 +13,7 @@ export enum UserScalarFieldEnum {
|
||||
disabled = "disabled",
|
||||
passwordHash = "passwordHash",
|
||||
metadata = "metadata",
|
||||
settingsId = "settingsId",
|
||||
deletedAt = "deletedAt",
|
||||
createdAt = "createdAt",
|
||||
updatedAt = "updatedAt"
|
||||
|
||||
@@ -56,6 +56,9 @@ export class UserScalarWhereWithAggregatesInput {
|
||||
@Field(() => JsonNullableWithAggregatesFilter, {nullable:true})
|
||||
metadata?: JsonNullableWithAggregatesFilter;
|
||||
|
||||
@Field(() => StringWithAggregatesFilter, {nullable:true})
|
||||
settingsId?: StringWithAggregatesFilter;
|
||||
|
||||
@HideField()
|
||||
deletedAt?: DateTimeNullableWithAggregatesFilter;
|
||||
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
import { Field } from '@nestjs/graphql';
|
||||
import { ArgsType } from '@nestjs/graphql';
|
||||
import { UserSettingsWhereInput } from '../user-settings/user-settings-where.input';
|
||||
import { Type } from 'class-transformer';
|
||||
import { UserSettingsOrderByWithRelationInput } from '../user-settings/user-settings-order-by-with-relation.input';
|
||||
import { UserSettingsWhereUniqueInput } from '../user-settings/user-settings-where-unique.input';
|
||||
import { Int } from '@nestjs/graphql';
|
||||
import { UserSettingsCountAggregateInput } from '../user-settings/user-settings-count-aggregate.input';
|
||||
import { UserSettingsMinAggregateInput } from '../user-settings/user-settings-min-aggregate.input';
|
||||
import { UserSettingsMaxAggregateInput } from '../user-settings/user-settings-max-aggregate.input';
|
||||
|
||||
@ArgsType()
|
||||
export class UserSettingsAggregateArgs {
|
||||
|
||||
@Field(() => UserSettingsWhereInput, {nullable:true})
|
||||
@Type(() => UserSettingsWhereInput)
|
||||
where?: UserSettingsWhereInput;
|
||||
|
||||
@Field(() => [UserSettingsOrderByWithRelationInput], {nullable:true})
|
||||
orderBy?: Array<UserSettingsOrderByWithRelationInput>;
|
||||
|
||||
@Field(() => UserSettingsWhereUniqueInput, {nullable:true})
|
||||
cursor?: UserSettingsWhereUniqueInput;
|
||||
|
||||
@Field(() => Int, {nullable:true})
|
||||
take?: number;
|
||||
|
||||
@Field(() => Int, {nullable:true})
|
||||
skip?: number;
|
||||
|
||||
@Field(() => UserSettingsCountAggregateInput, {nullable:true})
|
||||
_count?: UserSettingsCountAggregateInput;
|
||||
|
||||
@Field(() => UserSettingsMinAggregateInput, {nullable:true})
|
||||
_min?: UserSettingsMinAggregateInput;
|
||||
|
||||
@Field(() => UserSettingsMaxAggregateInput, {nullable:true})
|
||||
_max?: UserSettingsMaxAggregateInput;
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
import { Field } from '@nestjs/graphql';
|
||||
import { InputType } from '@nestjs/graphql';
|
||||
import { UserCreateWithoutSettingsInput } from './user-create-without-settings.input';
|
||||
import { Type } from 'class-transformer';
|
||||
import { UserCreateOrConnectWithoutSettingsInput } from './user-create-or-connect-without-settings.input';
|
||||
import { UserWhereUniqueInput } from './user-where-unique.input';
|
||||
|
||||
@InputType()
|
||||
export class UserUncheckedCreateNestedOneWithoutSettingsInput {
|
||||
|
||||
@Field(() => UserCreateWithoutSettingsInput, {nullable:true})
|
||||
@Type(() => UserCreateWithoutSettingsInput)
|
||||
create?: UserCreateWithoutSettingsInput;
|
||||
|
||||
@Field(() => UserCreateOrConnectWithoutSettingsInput, {nullable:true})
|
||||
@Type(() => UserCreateOrConnectWithoutSettingsInput)
|
||||
connectOrCreate?: UserCreateOrConnectWithoutSettingsInput;
|
||||
|
||||
@Field(() => UserWhereUniqueInput, {nullable:true})
|
||||
@Type(() => UserWhereUniqueInput)
|
||||
connect?: UserWhereUniqueInput;
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user