The open alternative to Salesforce, designed for AI.
TypeScript crmcrm-systemcustomergood-first-issuegraphqlhacktoberfestjavascriptmarketingmonoreponestjsopen-sourcepostgresqlreactreactjssalestypescriptweb
Chore: Use Fragments as types (#1670)
gitstart-twenty103fb701e7bc
diff --git a/front/src/generated/graphql.tsx b/front/src/generated/graphql.tsxindex fbbd90b47bb..ee47f0555af 100644--- a/front/src/generated/graphql.tsx+++ b/front/src/generated/graphql.tsx@@ -1016,15 +1016,15 @@ export enum FileFolder {WorkspaceLogo = 'WorkspaceLogo'}-export type FloatFilter = {- equals?: InputMaybe<Scalars['Float']>;- gt?: InputMaybe<Scalars['Float']>;- gte?: InputMaybe<Scalars['Float']>;- in?: InputMaybe<Array<Scalars['Float']>>;- lt?: InputMaybe<Scalars['Float']>;- lte?: InputMaybe<Scalars['Float']>;- not?: InputMaybe<NestedFloatFilter>;- notIn?: InputMaybe<Array<Scalars['Float']>>;+export type IntFilter = {+ equals?: InputMaybe<Scalars['Int']>;+ gt?: InputMaybe<Scalars['Int']>;+ gte?: InputMaybe<Scalars['Int']>;+ in?: InputMaybe<Array<Scalars['Int']>>;+ lt?: InputMaybe<Scalars['Int']>;+ lte?: InputMaybe<Scalars['Int']>;+ not?: InputMaybe<NestedIntFilter>;+ notIn?: InputMaybe<Array<Scalars['Int']>>;};export type IntNullableFilter = {@@ -1478,15 +1478,15 @@ export type NestedEnumViewTypeFilter = {notIn?: InputMaybe<Array<ViewType>>;};-export type NestedFloatFilter = {- equals?: InputMaybe<Scalars['Float']>;- gt?: InputMaybe<Scalars['Float']>;- gte?: InputMaybe<Scalars['Float']>;- in?: InputMaybe<Array<Scalars['Float']>>;- lt?: InputMaybe<Scalars['Float']>;- lte?: InputMaybe<Scalars['Float']>;- not?: InputMaybe<NestedFloatFilter>;- notIn?: InputMaybe<Array<Scalars['Float']>>;+export type NestedIntFilter = {+ equals?: InputMaybe<Scalars['Int']>;+ gt?: InputMaybe<Scalars['Int']>;+ gte?: InputMaybe<Scalars['Int']>;+ in?: InputMaybe<Array<Scalars['Int']>>;+ lt?: InputMaybe<Scalars['Int']>;+ lte?: InputMaybe<Scalars['Int']>;+ not?: InputMaybe<NestedIntFilter>;+ notIn?: InputMaybe<Array<Scalars['Int']>>;};export type NestedIntNullableFilter = {@@ -2587,7 +2587,7 @@ export type ViewCreateNestedOneWithoutFieldsInput = {export type ViewField = {__typename?: 'ViewField';- index: Scalars['Float'];+ index: Scalars['Int'];isVisible: Scalars['Boolean'];key: Scalars['String'];name: Scalars['String'];@@ -2598,7 +2598,7 @@ export type ViewField = {};export type ViewFieldCreateInput = {- index: Scalars['Float'];+ index: Scalars['Int'];isVisible: Scalars['Boolean'];key: Scalars['String'];name: Scalars['String'];@@ -2608,7 +2608,7 @@ export type ViewFieldCreateInput = {};export type ViewFieldCreateManyInput = {- index: Scalars['Float'];+ index: Scalars['Int'];isVisible: Scalars['Boolean'];key: Scalars['String'];name: Scalars['String'];@@ -2654,7 +2654,7 @@ export enum ViewFieldScalarFieldEnum {}export type ViewFieldUpdateInput = {- index?: InputMaybe<Scalars['Float']>;+ index?: InputMaybe<Scalars['Int']>;isVisible?: InputMaybe<Scalars['Boolean']>;key?: InputMaybe<Scalars['String']>;name?: InputMaybe<Scalars['String']>;@@ -2684,7 +2684,7 @@ export type ViewFieldWhereInput = {AND?: InputMaybe<Array<ViewFieldWhereInput>>;NOT?: InputMaybe<Array<ViewFieldWhereInput>>;OR?: InputMaybe<Array<ViewFieldWhereInput>>;- index?: InputMaybe<FloatFilter>;+ index?: InputMaybe<IntFilter>;isVisible?: InputMaybe<BoolFilter>;key?: InputMaybe<StringFilter>;name?: InputMaybe<StringFilter>;@@ -3166,6 +3166,8 @@ export type WorkspaceUpdateInput = {workspaceMember?: InputMaybe<WorkspaceMemberUpdateManyWithoutWorkspaceNestedInput>;};+export type ActivityWithTargetsFragment = { __typename?: 'Activity', id: string, createdAt: string, updatedAt: string, activityTargets?: Array<{ __typename?: 'ActivityTarget', id: string, createdAt: string, updatedAt: string, companyId?: string | null, personId?: string | null }> | null };+export type ActivityQueryFragmentFragment = { __typename?: 'Activity', id: string, createdAt: string, title?: string | null, body?: string | null, type: ActivityType, completedAt?: string | null, dueAt?: string | null, assignee?: { __typename?: 'User', id: string, firstName?: string | null, lastName?: string | null, displayName: string, avatarUrl?: string | null } | null, author: { __typename?: 'User', id: string, firstName?: string | null, lastName?: string | null, displayName: string }, comments?: Array<{ __typename?: 'Comment', id: string, body: string, createdAt: string, updatedAt: string, author: { __typename?: 'User', id: string, displayName: string, firstName?: string | null, lastName?: string | null, avatarUrl?: string | null } }> | null, activityTargets?: Array<{ __typename?: 'ActivityTarget', id: string, companyId?: string | null, personId?: string | null, company?: { __typename?: 'Company', id: string, name: string, domainName: string } | null, person?: { __typename?: 'Person', id: string, displayName: string, avatarUrl?: string | null } | null }> | null };export type ActivityUpdatePartsFragment = { __typename?: 'Activity', id: string, body?: string | null, title?: string | null, type: ActivityType, completedAt?: string | null, dueAt?: string | null, assignee?: { __typename?: 'User', id: string, firstName?: string | null, lastName?: string | null, displayName: string } | null };@@ -3258,6 +3260,10 @@ export type CreateEventMutationVariables = Exact<{export type CreateEventMutation = { __typename?: 'Mutation', createEvent: { __typename?: 'Analytics', success: boolean } };+export type AuthTokenFragmentFragment = { __typename?: 'AuthToken', token: string, expiresAt: string };++export type AuthTokensFragmentFragment = { __typename?: 'AuthTokenPair', accessToken: { __typename?: 'AuthToken', token: string, expiresAt: string }, refreshToken: { __typename?: 'AuthToken', token: string, expiresAt: string } };+export type UserQueryFragmentFragment = { __typename?: 'User', id: string, email: string, displayName: string, firstName?: string | null, lastName?: string | null, canImpersonate: boolean, supportUserHash?: string | null, avatarUrl?: string | null, workspaceMember?: { __typename?: 'WorkspaceMember', id: string, allowImpersonation: boolean, workspace: { __typename?: 'Workspace', id: string, domainName?: string | null, displayName?: string | null, logo?: string | null, inviteHash?: string | null }, assignedActivities?: Array<{ __typename?: 'Activity', id: string, title?: string | null }> | null, authoredActivities?: Array<{ __typename?: 'Activity', id: string, title?: string | null }> | null, authoredAttachments?: Array<{ __typename?: 'Attachment', id: string, name: string, type: AttachmentType }> | null, settings?: { __typename?: 'UserSettings', id: string, colorScheme: ColorScheme, locale: string } | null, companies?: Array<{ __typename?: 'Company', id: string, name: string, domainName: string }> | null, comments?: Array<{ __typename?: 'Comment', id: string, body: string }> | null } | null, settings: { __typename?: 'UserSettings', id: string, colorScheme: ColorScheme, locale: string } };export type ChallengeMutationVariables = Exact<{@@ -3266,7 +3272,7 @@ export type ChallengeMutationVariables = Exact<{}>;-export type ChallengeMutation = { __typename?: 'Mutation', challenge: { __typename?: 'LoginToken', loginToken: { __typename?: 'AuthToken', expiresAt: string, token: string } } };+export type ChallengeMutation = { __typename?: 'Mutation', challenge: { __typename?: 'LoginToken', loginToken: { __typename?: 'AuthToken', token: string, expiresAt: string } } };export type ImpersonateMutationVariables = Exact<{userId: Scalars['String'];@@ -3280,7 +3286,7 @@ export type RenewTokenMutationVariables = Exact<{}>;-export type RenewTokenMutation = { __typename?: 'Mutation', renewToken: { __typename?: 'AuthTokens', tokens: { __typename?: 'AuthTokenPair', accessToken: { __typename?: 'AuthToken', expiresAt: string, token: string }, refreshToken: { __typename?: 'AuthToken', token: string, expiresAt: string } } } };+export type RenewTokenMutation = { __typename?: 'Mutation', renewToken: { __typename?: 'AuthTokens', tokens: { __typename?: 'AuthTokenPair', accessToken: { __typename?: 'AuthToken', token: string, expiresAt: string }, refreshToken: { __typename?: 'AuthToken', token: string, expiresAt: string } } } };export type SignUpMutationVariables = Exact<{email: Scalars['String'];@@ -3289,7 +3295,7 @@ export type SignUpMutationVariables = Exact<{}>;-export type SignUpMutation = { __typename?: 'Mutation', signUp: { __typename?: 'LoginToken', loginToken: { __typename?: 'AuthToken', expiresAt: string, token: string } } };+export type SignUpMutation = { __typename?: 'Mutation', signUp: { __typename?: 'LoginToken', loginToken: { __typename?: 'AuthToken', token: string, expiresAt: string } } };export type VerifyMutationVariables = Exact<{loginToken: Scalars['String'];@@ -3310,7 +3316,11 @@ export type GetClientConfigQueryVariables = Exact<{ [key: string]: never; }>;export type GetClientConfigQuery = { __typename?: 'Query', clientConfig: { __typename?: 'ClientConfig', signInPrefilled: boolean, debugMode: boolean, authProviders: { __typename?: 'AuthProviders', google: boolean, password: boolean }, telemetry: { __typename?: 'Telemetry', enabled: boolean, anonymizationEnabled: boolean }, support: { __typename?: 'Support', supportDriver: string, supportFrontChatId?: string | null } } };-export type CompanyFieldsFragmentFragment = { __typename?: 'Company', address: string, createdAt: string, domainName: string, employees?: number | null, linkedinUrl?: string | null, xUrl?: string | null, annualRecurringRevenue?: number | null, idealCustomerProfile: boolean, id: string, name: string, _activityCount: number, accountOwner?: { __typename?: 'User', id: string, email: string, displayName: string, avatarUrl?: string | null } | null };+export type BaseCompanyFieldsFragmentFragment = { __typename?: 'Company', address: string, annualRecurringRevenue?: number | null, createdAt: string, domainName: string, employees?: number | null, id: string, idealCustomerProfile: boolean, linkedinUrl?: string | null, name: string, xUrl?: string | null, _activityCount: number };++export type BaseAccountOwnerFragmentFragment = { __typename?: 'User', id: string, email: string, displayName: string, avatarUrl?: string | null };++export type CompanyFieldsFragmentFragment = { __typename?: 'Company', address: string, annualRecurringRevenue?: number | null, createdAt: string, domainName: string, employees?: number | null, id: string, idealCustomerProfile: boolean, linkedinUrl?: string | null, name: string, xUrl?: string | null, _activityCount: number, accountOwner?: { __typename?: 'User', id: string, email: string, displayName: string, avatarUrl?: string | null } | null };export type DeleteManyCompaniesMutationVariables = Exact<{ids?: InputMaybe<Array<Scalars['String']> | Scalars['String']>;@@ -3331,7 +3341,7 @@ export type InsertOneCompanyMutationVariables = Exact<{}>;-export type InsertOneCompanyMutation = { __typename?: 'Mutation', createOneCompany: { __typename?: 'Company', address: string, createdAt: string, domainName: string, employees?: number | null, linkedinUrl?: string | null, xUrl?: string | null, annualRecurringRevenue?: number | null, idealCustomerProfile: boolean, id: string, name: string, _activityCount: number, accountOwner?: { __typename?: 'User', id: string, email: string, displayName: string, avatarUrl?: string | null } | null } };+export type InsertOneCompanyMutation = { __typename?: 'Mutation', createOneCompany: { __typename?: 'Company', address: string, annualRecurringRevenue?: number | null, createdAt: string, domainName: string, employees?: number | null, id: string, idealCustomerProfile: boolean, linkedinUrl?: string | null, name: string, xUrl?: string | null, _activityCount: number, accountOwner?: { __typename?: 'User', id: string, email: string, displayName: string, avatarUrl?: string | null } | null } };export type UpdateOneCompanyMutationVariables = Exact<{where: CompanyWhereUniqueInput;@@ -3339,7 +3349,7 @@ export type UpdateOneCompanyMutationVariables = Exact<{}>;-export type UpdateOneCompanyMutation = { __typename?: 'Mutation', updateOneCompany?: { __typename?: 'Company', address: string, createdAt: string, domainName: string, employees?: number | null, linkedinUrl?: string | null, xUrl?: string | null, annualRecurringRevenue?: number | null, idealCustomerProfile: boolean, id: string, name: string, _activityCount: number, accountOwner?: { __typename?: 'User', id: string, email: string, displayName: string, avatarUrl?: string | null } | null } | null };+export type UpdateOneCompanyMutation = { __typename?: 'Mutation', updateOneCompany?: { __typename?: 'Company', address: string, annualRecurringRevenue?: number | null, createdAt: string, domainName: string, employees?: number | null, id: string, idealCustomerProfile: boolean, linkedinUrl?: string | null, name: string, xUrl?: string | null, _activityCount: number, accountOwner?: { __typename?: 'User', id: string, email: string, displayName: string, avatarUrl?: string | null } | null } | null };export type GetCompaniesQueryVariables = Exact<{orderBy?: InputMaybe<Array<CompanyOrderByWithRelationInput> | CompanyOrderByWithRelationInput>;@@ -3347,14 +3357,14 @@ export type GetCompaniesQueryVariables = Exact<{}>;-export type GetCompaniesQuery = { __typename?: 'Query', companies: Array<{ __typename?: 'Company', id: string, domainName: string, name: string, createdAt: string, address: string, linkedinUrl?: string | null, xUrl?: string | null, annualRecurringRevenue?: number | null, idealCustomerProfile: boolean, employees?: number | null, _activityCount: number, accountOwner?: { __typename?: 'User', id: string, email: string, displayName: string, firstName?: string | null, lastName?: string | null, avatarUrl?: string | null } | null }> };+export type GetCompaniesQuery = { __typename?: 'Query', companies: Array<{ __typename?: 'Company', address: string, annualRecurringRevenue?: number | null, createdAt: string, domainName: string, employees?: number | null, id: string, idealCustomerProfile: boolean, linkedinUrl?: string | null, name: string, xUrl?: string | null, _activityCount: number, accountOwner?: { __typename?: 'User', firstName?: string | null, lastName?: string | null, id: string, email: string, displayName: string, avatarUrl?: string | null } | null }> };export type GetCompanyQueryVariables = Exact<{where: CompanyWhereUniqueInput;}>;-export type GetCompanyQuery = { __typename?: 'Query', findUniqueCompany: { __typename?: 'Company', id: string, domainName: string, name: string, createdAt: string, address: string, linkedinUrl?: string | null, xUrl?: string | null, annualRecurringRevenue?: number | null, idealCustomerProfile: boolean, employees?: number | null, _activityCount: number, accountOwner?: { __typename?: 'User', id: string, email: string, displayName: string, avatarUrl?: string | null } | null, Favorite?: Array<{ __typename?: 'Favorite', id: string, person?: { __typename?: 'Person', id: string } | null, company?: { __typename?: 'Company', id: string } | null }> | null } };+export type GetCompanyQuery = { __typename?: 'Query', findUniqueCompany: { __typename?: 'Company', address: string, annualRecurringRevenue?: number | null, createdAt: string, domainName: string, employees?: number | null, id: string, idealCustomerProfile: boolean, linkedinUrl?: string | null, name: string, xUrl?: string | null, _activityCount: number, Favorite?: Array<{ __typename?: 'Favorite', id: string, person?: { __typename?: 'Person', id: string } | null, company?: { __typename?: 'Company', id: string } | null }> | null, accountOwner?: { __typename?: 'User', id: string, email: string, displayName: string, avatarUrl?: string | null } | null } };export type DeleteFavoriteMutationVariables = Exact<{where: FavoriteWhereInput;@@ -3382,7 +3392,9 @@ export type GetFavoritesQueryVariables = Exact<{ [key: string]: never; }>;export type GetFavoritesQuery = { __typename?: 'Query', findFavorites: Array<{ __typename?: 'Favorite', id: string, person?: { __typename?: 'Person', id: string, firstName?: string | null, lastName?: string | null, avatarUrl?: string | null } | null, company?: { __typename?: 'Company', id: string, name: string, domainName: string, accountOwner?: { __typename?: 'User', id: string, displayName: string, avatarUrl?: string | null } | null } | null }> };-export type PersonFieldsFragmentFragment = { __typename?: 'Person', id: string, phone?: string | null, email?: string | null, city?: string | null, firstName?: string | null, lastName?: string | null, displayName: string, jobTitle?: string | null, linkedinUrl?: string | null, xUrl?: string | null, avatarUrl?: string | null, createdAt: string, _activityCount: number, company?: { __typename?: 'Company', id: string, name: string, domainName: string } | null };+export type BasePersonFieldsFragmentFragment = { __typename?: 'Person', id: string, phone?: string | null, email?: string | null, city?: string | null, firstName?: string | null, lastName?: string | null, displayName: string, avatarUrl?: string | null, createdAt: string };++export type PersonFieldsFragmentFragment = { __typename?: 'Person', jobTitle?: string | null, linkedinUrl?: string | null, xUrl?: string | null, _activityCount: number, id: string, phone?: string | null, email?: string | null, city?: string | null, firstName?: string | null, lastName?: string | null, displayName: string, avatarUrl?: string | null, createdAt: string, company?: { __typename?: 'Company', id: string, name: string, domainName: string } | null };export type DeleteManyPersonMutationVariables = Exact<{ids?: InputMaybe<Array<Scalars['String']> | Scalars['String']>;@@ -3403,7 +3415,7 @@ export type InsertOnePersonMutationVariables = Exact<{}>;-export type InsertOnePersonMutation = { __typename?: 'Mutation', createOnePerson: { __typename?: 'Person', id: string, phone?: string | null, email?: string | null, city?: string | null, firstName?: string | null, lastName?: string | null, displayName: string, jobTitle?: string | null, linkedinUrl?: string | null, xUrl?: string | null, avatarUrl?: string | null, createdAt: string, _activityCount: number, company?: { __typename?: 'Company', id: string, name: string, domainName: string } | null } };+export type InsertOnePersonMutation = { __typename?: 'Mutation', createOnePerson: { __typename?: 'Person', jobTitle?: string | null, linkedinUrl?: string | null, xUrl?: string | null, _activityCount: number, id: string, phone?: string | null, email?: string | null, city?: string | null, firstName?: string | null, lastName?: string | null, displayName: string, avatarUrl?: string | null, createdAt: string, company?: { __typename?: 'Company', id: string, name: string, domainName: string } | null } };export type RemovePersonPictureMutationVariables = Exact<{where: PersonWhereUniqueInput;@@ -3418,7 +3430,7 @@ export type UpdateOnePersonMutationVariables = Exact<{}>;-export type UpdateOnePersonMutation = { __typename?: 'Mutation', updateOnePerson?: { __typename?: 'Person', id: string, city?: string | null, avatarUrl?: string | null, email?: string | null, jobTitle?: string | null, linkedinUrl?: string | null, xUrl?: string | null, firstName?: string | null, lastName?: string | null, displayName: string, phone?: string | null, createdAt: string, company?: { __typename?: 'Company', domainName: string, name: string, id: string } | null } | null };+export type UpdateOnePersonMutation = { __typename?: 'Mutation', updateOnePerson?: { __typename?: 'Person', jobTitle?: string | null, linkedinUrl?: string | null, xUrl?: string | null, _activityCount: number, id: string, phone?: string | null, email?: string | null, city?: string | null, firstName?: string | null, lastName?: string | null, displayName: string, avatarUrl?: string | null, createdAt: string, company?: { __typename?: 'Company', id: string, name: string, domainName: string } | null } | null };export type UploadPersonPictureMutationVariables = Exact<{id: Scalars['String'];@@ -3435,14 +3447,14 @@ export type GetPeopleQueryVariables = Exact<{}>;-export type GetPeopleQuery = { __typename?: 'Query', people: Array<{ __typename?: 'Person', id: string, phone?: string | null, email?: string | null, city?: string | null, firstName?: string | null, lastName?: string | null, displayName: string, jobTitle?: string | null, linkedinUrl?: string | null, xUrl?: string | null, avatarUrl?: string | null, createdAt: string, _activityCount: number, company?: { __typename?: 'Company', id: string, name: string, domainName: string } | null }> };+export type GetPeopleQuery = { __typename?: 'Query', people: Array<{ __typename?: 'Person', jobTitle?: string | null, linkedinUrl?: string | null, xUrl?: string | null, _activityCount: number, id: string, phone?: string | null, email?: string | null, city?: string | null, firstName?: string | null, lastName?: string | null, displayName: string, avatarUrl?: string | null, createdAt: string, company?: { __typename?: 'Company', id: string, name: string, domainName: string } | null }> };export type GetPersonQueryVariables = Exact<{id: Scalars['String'];}>;-export type GetPersonQuery = { __typename?: 'Query', findUniquePerson: { __typename?: 'Person', id: string, firstName?: string | null, lastName?: string | null, displayName: string, email?: string | null, createdAt: string, city?: string | null, jobTitle?: string | null, linkedinUrl?: string | null, xUrl?: string | null, avatarUrl?: string | null, phone?: string | null, _activityCount: number, company?: { __typename?: 'Company', id: string, name: string, domainName: string } | null, Favorite?: Array<{ __typename?: 'Favorite', id: string, person?: { __typename?: 'Person', id: string } | null, company?: { __typename?: 'Company', id: string } | null }> | null } };+export type GetPersonQuery = { __typename?: 'Query', findUniquePerson: { __typename?: 'Person', jobTitle?: string | null, linkedinUrl?: string | null, xUrl?: string | null, _activityCount: number, id: string, phone?: string | null, email?: string | null, city?: string | null, firstName?: string | null, lastName?: string | null, displayName: string, avatarUrl?: string | null, createdAt: string, Favorite?: Array<{ __typename?: 'Favorite', id: string, person?: { __typename?: 'Person', id: string } | null, company?: { __typename?: 'Company', id: string } | null }> | null, company?: { __typename?: 'Company', id: string, name: string, domainName: string } | null } };export type GetPersonCityByIdQueryVariables = Exact<{id: Scalars['String'];@@ -3579,7 +3591,7 @@ export type SearchCompanyQueryVariables = Exact<{}>;-export type SearchCompanyQuery = { __typename?: 'Query', searchResults: Array<{ __typename?: 'Company', address: string, createdAt: string, domainName: string, employees?: number | null, linkedinUrl?: string | null, xUrl?: string | null, annualRecurringRevenue?: number | null, idealCustomerProfile: boolean, id: string, name: string, _activityCount: number, accountOwner?: { __typename?: 'User', id: string, email: string, displayName: string, avatarUrl?: string | null } | null }> };+export type SearchCompanyQuery = { __typename?: 'Query', searchResults: Array<{ __typename?: 'Company', address: string, annualRecurringRevenue?: number | null, createdAt: string, domainName: string, employees?: number | null, id: string, idealCustomerProfile: boolean, linkedinUrl?: string | null, name: string, xUrl?: string | null, _activityCount: number, accountOwner?: { __typename?: 'User', id: string, email: string, displayName: string, avatarUrl?: string | null } | null }> };export type SearchPeopleQueryVariables = Exact<{where?: InputMaybe<PersonWhereInput>;@@ -3597,7 +3609,9 @@ export type SearchUserQueryVariables = Exact<{}>;-export type SearchUserQuery = { __typename?: 'Query', searchResults: Array<{ __typename?: 'User', id: string, email: string, displayName: string, firstName?: string | null, lastName?: string | null, avatarUrl?: string | null }> };+export type SearchUserQuery = { __typename?: 'Query', searchResults: Array<{ __typename?: 'User', avatarUrl?: string | null, id: string, email: string, displayName: string, firstName?: string | null, lastName?: string | null }> };++export type UserFieldsFragmentFragment = { __typename?: 'User', id: string, email: string, displayName: string, firstName?: string | null, lastName?: string | null };export type DeleteUserAccountMutationVariables = Exact<{ [key: string]: never; }>;@@ -3636,7 +3650,7 @@ export type UpdateUserMutation = { __typename?: 'Mutation', updateUser: { __typeexport 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, canImpersonate: boolean, supportUserHash?: string | null, workspaceMember?: { __typename?: 'WorkspaceMember', id: string, allowImpersonation: boolean, workspace: { __typename?: 'Workspace', id: string, domainName?: string | null, displayName?: string | null, logo?: string | null, inviteHash?: string | null }, assignedActivities?: Array<{ __typename?: 'Activity', id: string, title?: string | null }> | null, authoredActivities?: Array<{ __typename?: 'Activity', id: string, title?: string | null }> | null, authoredAttachments?: Array<{ __typename?: 'Attachment', id: string, name: string, type: AttachmentType }> | null, settings?: { __typename?: 'UserSettings', id: string, colorScheme: ColorScheme, locale: string } | null, companies?: Array<{ __typename?: 'Company', id: string, name: string, domainName: string }> | null, comments?: Array<{ __typename?: 'Comment', id: string, body: string }> | null } | null, settings: { __typename?: 'UserSettings', id: string, locale: string, colorScheme: ColorScheme } } };+export type GetCurrentUserQuery = { __typename?: 'Query', currentUser: { __typename?: 'User', avatarUrl?: string | null, canImpersonate: boolean, supportUserHash?: string | null, id: string, email: string, displayName: string, firstName?: string | null, lastName?: string | null, workspaceMember?: { __typename?: 'WorkspaceMember', id: string, allowImpersonation: boolean, workspace: { __typename?: 'Workspace', id: string, domainName?: string | null, displayName?: string | null, logo?: string | null, inviteHash?: string | null }, assignedActivities?: Array<{ __typename?: 'Activity', id: string, title?: string | null }> | null, authoredActivities?: Array<{ __typename?: 'Activity', id: string, title?: string | null }> | null, authoredAttachments?: Array<{ __typename?: 'Attachment', id: string, name: string, type: AttachmentType }> | null, settings?: { __typename?: 'UserSettings', id: string, colorScheme: ColorScheme, locale: string } | null, companies?: Array<{ __typename?: 'Company', id: string, name: string, domainName: string }> | null, comments?: Array<{ __typename?: 'Comment', id: string, body: string }> | null } | null, settings: { __typename?: 'UserSettings', id: string, locale: string, colorScheme: ColorScheme } } };export type GetUsersQueryVariables = Exact<{ [key: string]: never; }>;@@ -3753,6 +3767,8 @@ export type GetViewsQueryVariables = Exact<{export type GetViewsQuery = { __typename?: 'Query', views: Array<{ __typename?: 'View', id: string, name: string }> };+export type WorkspaceMemberFieldsFragmentFragment = { __typename?: 'WorkspaceMember', id: string, allowImpersonation: boolean, workspace: { __typename?: 'Workspace', id: string, domainName?: string | null, displayName?: string | null, logo?: string | null, inviteHash?: string | null }, assignedActivities?: Array<{ __typename?: 'Activity', id: string, title?: string | null }> | null, authoredActivities?: Array<{ __typename?: 'Activity', id: string, title?: string | null }> | null, authoredAttachments?: Array<{ __typename?: 'Attachment', id: string, name: string, type: AttachmentType }> | null, settings?: { __typename?: 'UserSettings', id: string, colorScheme: ColorScheme, locale: string } | null, companies?: Array<{ __typename?: 'Company', id: string, name: string, domainName: string }> | null, comments?: Array<{ __typename?: 'Comment', id: string, body: string }> | null };+export type DeleteCurrentWorkspaceMutationVariables = Exact<{ [key: string]: never; }>;@@ -3804,8 +3820,22 @@ export type GetWorkspaceMembersQueryVariables = Exact<{}>;-export type GetWorkspaceMembersQuery = { __typename?: 'Query', workspaceMembers: Array<{ __typename?: 'WorkspaceMember', id: string, user: { __typename?: 'User', id: string, email: string, avatarUrl?: string | null, firstName?: string | null, lastName?: string | null, displayName: string } }> };+export type GetWorkspaceMembersQuery = { __typename?: 'Query', workspaceMembers: Array<{ __typename?: 'WorkspaceMember', id: string, user: { __typename?: 'User', avatarUrl?: string | null, id: string, email: string, displayName: string, firstName?: string | null, lastName?: string | null } }> };+export const ActivityWithTargetsFragmentDoc = gql`+ fragment ActivityWithTargets on Activity {+ id+ createdAt+ updatedAt+ activityTargets {+ id+ createdAt+ updatedAt+ companyId+ personId+ }+}+ `;export const ActivityQueryFragmentFragmentDoc = gql`fragment ActivityQueryFragment on Activity {id@@ -3874,6 +3904,22 @@ export const ActivityUpdatePartsFragmentDoc = gql`}}`;+export const AuthTokenFragmentFragmentDoc = gql`+ fragment AuthTokenFragment on AuthToken {+ token+ expiresAt+}+ `;+export const AuthTokensFragmentFragmentDoc = gql`+ fragment AuthTokensFragment on AuthTokenPair {+ accessToken {+ ...AuthTokenFragment+ }+ refreshToken {+ ...AuthTokenFragment+ }+}+ ${AuthTokenFragmentFragmentDoc}`;export const UserQueryFragmentFragmentDoc = gql`fragment UserQueryFragment on User {id@@ -3929,29 +3975,40 @@ export const UserQueryFragmentFragmentDoc = gql`}}`;-export const CompanyFieldsFragmentFragmentDoc = gql`- fragment companyFieldsFragment on Company {- accountOwner {- id- displayName- avatarUrl- }+export const BaseAccountOwnerFragmentFragmentDoc = gql`+ fragment baseAccountOwnerFragment on User {+ id+ displayName+ avatarUrl+}+ `;+export const BaseCompanyFieldsFragmentFragmentDoc = gql`+ fragment baseCompanyFieldsFragment on Company {address+ annualRecurringRevenuecreatedAtdomainNameemployees- linkedinUrl- xUrl- annualRecurringRevenue- idealCustomerProfileid+ idealCustomerProfile+ linkedinUrlname+ xUrl_activityCount}`;-export const PersonFieldsFragmentFragmentDoc = gql`- fragment personFieldsFragment on Person {+export const CompanyFieldsFragmentFragmentDoc = gql`+ fragment companyFieldsFragment on Company {+ accountOwner {+ ...baseAccountOwnerFragment+ }+ ...baseCompanyFieldsFragment+}+ ${BaseAccountOwnerFragmentFragmentDoc}+${BaseCompanyFieldsFragmentFragmentDoc}`;+export const BasePersonFieldsFragmentFragmentDoc = gql`+ fragment basePersonFieldsFragment on Person {idphone@@ -3959,17 +4016,71 @@ export const PersonFieldsFragmentFragmentDoc = gql`firstNamelastNamedisplayName+ avatarUrl+ createdAt+}+ `;+export const PersonFieldsFragmentFragmentDoc = gql`+ fragment personFieldsFragment on Person {+ ...basePersonFieldsFragmentjobTitlelinkedinUrlxUrl- avatarUrl- createdAt_activityCountcompany {idnamedomainName}+}+ ${BasePersonFieldsFragmentFragmentDoc}`;+export const UserFieldsFragmentFragmentDoc = gql`+ fragment userFieldsFragment on User {+ id+ displayName+ firstName+ lastName+}+ `;+export const WorkspaceMemberFieldsFragmentFragmentDoc = gql`+ fragment workspaceMemberFieldsFragment on WorkspaceMember {+ id+ allowImpersonation+ workspace {+ id+ domainName+ displayName+ logo+ inviteHash+ }+ assignedActivities {+ id+ title+ }+ authoredActivities {+ id+ title+ }+ authoredAttachments {+ id+ name+ type+ }+ settings {+ id+ colorScheme+ locale+ }+ companies {+ id+ name+ domainName+ }+ comments {+ id+ body+ }}`;export const AddActivityTargetsOnActivityDocument = gql`@@ -3978,19 +4089,10 @@ export const AddActivityTargetsOnActivityDocument = gql`where: {id: $activityId}data: {activityTargets: {createMany: {data: $activityTargetInputs}}}) {- id- createdAt- updatedAt- activityTargets {- id- createdAt- updatedAt- companyId- personId- }+ ...ActivityWithTargets}}- `;+ ${ActivityWithTargetsFragmentDoc}`;export type AddActivityTargetsOnActivityMutationFn = Apollo.MutationFunction<AddActivityTargetsOnActivityMutation, AddActivityTargetsOnActivityMutationVariables>;/**@@ -4160,19 +4262,10 @@ export const RemoveActivityTargetsOnActivityDocument = gql`where: {id: $activityId}data: {activityTargets: {deleteMany: {id: {in: $activityTargetIds}}}}) {- id- createdAt- updatedAt- activityTargets {- id- createdAt- updatedAt- companyId- personId- }+ ...ActivityWithTargets}}- `;+ ${ActivityWithTargetsFragmentDoc}`;export type RemoveActivityTargetsOnActivityMutationFn = Apollo.MutationFunction<RemoveActivityTargetsOnActivityMutation, RemoveActivityTargetsOnActivityMutationVariables>;/**@@ -4414,12 +4507,11 @@ export const ChallengeDocument = gql`mutation Challenge($email: String!, $password: String!) {challenge(email: $email, password: $password) {loginToken {- expiresAt- token+ ...AuthTokenFragment}}}- `;+ ${AuthTokenFragmentFragmentDoc}`;export type ChallengeMutationFn = Apollo.MutationFunction<ChallengeMutation, ChallengeMutationVariables>;/**@@ -4454,18 +4546,12 @@ export const ImpersonateDocument = gql`...UserQueryFragment}tokens {- accessToken {- token- expiresAt- }- refreshToken {- token- expiresAt- }+ ...AuthTokensFragment}}}- ${UserQueryFragmentFragmentDoc}`;+ ${UserQueryFragmentFragmentDoc}+${AuthTokensFragmentFragmentDoc}`;export type ImpersonateMutationFn = Apollo.MutationFunction<ImpersonateMutation, ImpersonateMutationVariables>;/**@@ -4496,18 +4582,11 @@ export const RenewTokenDocument = gql`mutation RenewToken($refreshToken: String!) {renewToken(refreshToken: $refreshToken) {tokens {- accessToken {- expiresAt- token- }- refreshToken {- token- expiresAt- }+ ...AuthTokensFragment}}}- `;+ ${AuthTokensFragmentFragmentDoc}`;export type RenewTokenMutationFn = Apollo.MutationFunction<RenewTokenMutation, RenewTokenMutationVariables>;/**@@ -4542,12 +4621,11 @@ export const SignUpDocument = gql`workspaceInviteHash: $workspaceInviteHash) {loginToken {- expiresAt- token+ ...AuthTokenFragment}}}- `;+ ${AuthTokenFragmentFragmentDoc}`;export type SignUpMutationFn = Apollo.MutationFunction<SignUpMutation, SignUpMutationVariables>;/**@@ -4583,18 +4661,12 @@ export const VerifyDocument = gql`...UserQueryFragment}tokens {- accessToken {- token- expiresAt- }- refreshToken {- token- expiresAt- }+ ...AuthTokensFragment}}}- ${UserQueryFragmentFragmentDoc}`;+ ${UserQueryFragmentFragmentDoc}+${AuthTokensFragmentFragmentDoc}`;export type VerifyMutationFn = Apollo.MutationFunction<VerifyMutation, VerifyMutationVariables>;/**@@ -4839,28 +4911,16 @@ export type UpdateOneCompanyMutationOptions = Apollo.BaseMutationOptions<UpdateOexport const GetCompaniesDocument = gql`query GetCompanies($orderBy: [CompanyOrderByWithRelationInput!], $where: CompanyWhereInput) {companies: findManyCompany(orderBy: $orderBy, where: $where) {- id- domainName- name- createdAt- address- linkedinUrl- xUrl- annualRecurringRevenue- idealCustomerProfile- employees- _activityCountaccountOwner {- id- displayName+ ...baseAccountOwnerFragmentfirstNamelastName- avatarUrl}+ ...baseCompanyFieldsFragment}}- `;+ ${BaseAccountOwnerFragmentFragmentDoc}+${BaseCompanyFieldsFragmentFragmentDoc}`;/*** __useGetCompaniesQuery__@@ -4893,23 +4953,7 @@ export type GetCompaniesQueryResult = Apollo.QueryResult<GetCompaniesQuery, GetCexport const GetCompanyDocument = gql`query GetCompany($where: CompanyWhereUniqueInput!) {findUniqueCompany(where: $where) {- id- domainName- name- createdAt- address- linkedinUrl- xUrl- annualRecurringRevenue- idealCustomerProfile- employees- _activityCount- accountOwner {- id- displayName- avatarUrl- }+ ...companyFieldsFragmentFavorite {idperson {@@ -4921,7 +4965,7 @@ export const GetCompanyDocument = gql`}}}- `;+ ${CompanyFieldsFragmentFragmentDoc}`;/*** __useGetCompanyQuery__@@ -5246,26 +5290,10 @@ export type RemovePersonPictureMutationOptions = Apollo.BaseMutationOptions<Remoexport const UpdateOnePersonDocument = gql`mutation UpdateOnePerson($where: PersonWhereUniqueInput!, $data: PersonUpdateInput!) {updateOnePerson(data: $data, where: $where) {- id- city- company {- domainName- name- id- }- avatarUrl- jobTitle- linkedinUrl- xUrl- firstName- lastName- displayName- phone- createdAt+ ...personFieldsFragment}}- `;+ ${PersonFieldsFragmentFragmentDoc}`;export type UpdateOnePersonMutationFn = Apollo.MutationFunction<UpdateOnePersonMutation, UpdateOnePersonMutationVariables>;/**@@ -5328,27 +5356,10 @@ export type UploadPersonPictureMutationOptions = Apollo.BaseMutationOptions<Uploexport const GetPeopleDocument = gql`query GetPeople($orderBy: [PersonOrderByWithRelationInput!], $where: PersonWhereInput, $limit: Int) {people: findManyPerson(orderBy: $orderBy, where: $where, take: $limit) {- id- phone- city- firstName- lastName- displayName- jobTitle- linkedinUrl- xUrl- avatarUrl- createdAt- _activityCount- company {- id- name- domainName- }+ ...personFieldsFragment}}- `;+ ${PersonFieldsFragmentFragmentDoc}`;/*** __useGetPeopleQuery__@@ -5382,24 +5393,7 @@ export type GetPeopleQueryResult = Apollo.QueryResult<GetPeopleQuery, GetPeopleQexport const GetPersonDocument = gql`query GetPerson($id: String!) {findUniquePerson(id: $id) {- id- firstName- lastName- displayName- createdAt- city- jobTitle- linkedinUrl- xUrl- avatarUrl- phone- _activityCount- company {- id- name- domainName- }+ ...personFieldsFragmentFavorite {idperson {@@ -5411,7 +5405,7 @@ export const GetPersonDocument = gql`}}}- `;+ ${PersonFieldsFragmentFragmentDoc}`;/*** __useGetPersonQuery__@@ -6129,18 +6123,10 @@ export type SearchCompanyQueryResult = Apollo.QueryResult<SearchCompanyQuery, Seexport const SearchPeopleDocument = gql`query SearchPeople($where: PersonWhereInput, $limit: Int, $orderBy: [PersonOrderByWithRelationInput!]) {searchResults: findManyPerson(where: $where, take: $limit, orderBy: $orderBy) {- id- phone- city- firstName- lastName- displayName- avatarUrl- createdAt+ ...basePersonFieldsFragment}}- `;+ ${BasePersonFieldsFragmentFragmentDoc}`;/*** __useSearchPeopleQuery__@@ -6174,15 +6160,11 @@ export type SearchPeopleQueryResult = Apollo.QueryResult<SearchPeopleQuery, Searexport const SearchUserDocument = gql`query SearchUser($where: UserWhereInput, $limit: Int, $orderBy: [UserOrderByWithRelationInput!]) {searchResults: findManyUser(where: $where, take: $limit, orderBy: $orderBy) {- id- displayName- firstName- lastName+ ...userFieldsFragmentavatarUrl}}- `;+ ${UserFieldsFragmentFragmentDoc}`;/*** __useSearchUserQuery__@@ -6428,50 +6410,11 @@ export type UpdateUserMutationOptions = Apollo.BaseMutationOptions<UpdateUserMutexport const GetCurrentUserDocument = gql`query GetCurrentUser {currentUser {- id- displayName- firstName- lastName+ ...userFieldsFragmentavatarUrlcanImpersonateworkspaceMember {- id- allowImpersonation- workspace {- id- domainName- displayName- logo- inviteHash- }- assignedActivities {- id- title- }- authoredActivities {- id- title- }- authoredAttachments {- id- name- type- }- settings {- id- colorScheme- locale- }- companies {- id- name- domainName- }- comments {- id- body- }+ ...workspaceMemberFieldsFragment}settings {id@@ -6481,7 +6424,8 @@ export const GetCurrentUserDocument = gql`supportUserHash}}- `;+ ${UserFieldsFragmentFragmentDoc}+${WorkspaceMemberFieldsFragmentFragmentDoc}`;/*** __useGetCurrentUserQuery__@@ -6512,14 +6456,10 @@ export type GetCurrentUserQueryResult = Apollo.QueryResult<GetCurrentUserQuery,export const GetUsersDocument = gql`query GetUsers {findManyUser {- id- displayName- firstName- lastName+ ...userFieldsFragment}}- `;+ ${UserFieldsFragmentFragmentDoc}`;/*** __useGetUsersQuery__@@ -7246,45 +7186,10 @@ export type UploadWorkspaceLogoMutationOptions = Apollo.BaseMutationOptions<Uploexport const UpdateOneWorkspaceMemberDocument = gql`mutation UpdateOneWorkspaceMember($data: WorkspaceMemberUpdateInput!, $where: WorkspaceMemberWhereUniqueInput!) {UpdateOneWorkspaceMember(data: $data, where: $where) {- id- allowImpersonation- workspace {- id- domainName- displayName- logo- inviteHash- }- assignedActivities {- id- title- }- authoredActivities {- id- title- }- authoredAttachments {- id- name- type- }- settings {- id- colorScheme- locale- }- companies {- id- name- domainName- }- comments {- id- body- }+ ...workspaceMemberFieldsFragment}}- `;+ ${WorkspaceMemberFieldsFragmentFragmentDoc}`;export type UpdateOneWorkspaceMemberMutationFn = Apollo.MutationFunction<UpdateOneWorkspaceMemberMutation, UpdateOneWorkspaceMemberMutationVariables>;/**@@ -7354,16 +7259,12 @@ export const GetWorkspaceMembersDocument = gql`workspaceMembers: findManyWorkspaceMember(where: $where) {iduser {- id+ ...userFieldsFragmentavatarUrl- firstName- lastName- displayName}}}- `;+ ${UserFieldsFragmentFragmentDoc}`;/*** __useGetWorkspaceMembersQuery__diff --git a/front/src/modules/activities/graphql/fragments/activityFragments.ts b/front/src/modules/activities/graphql/fragments/activityFragments.tsnew file mode 100644index 00000000000..59feebf84b4--- /dev/null+++ b/front/src/modules/activities/graphql/fragments/activityFragments.ts@@ -0,0 +1,16 @@+import { gql } from '@apollo/client';++export const ACTIVITY_WITH_TARGETS = gql`+ fragment ActivityWithTargets on Activity {+ id+ createdAt+ updatedAt+ activityTargets {+ id+ createdAt+ updatedAt+ companyId+ personId+ }+ }+`;diff --git a/front/src/modules/activities/graphql/mutations/addActivityTargets.ts b/front/src/modules/activities/graphql/mutations/addActivityTargets.tsindex 7c6f034a96b..bdd8bfd91b3 100644--- a/front/src/modules/activities/graphql/mutations/addActivityTargets.ts+++ b/front/src/modules/activities/graphql/mutations/addActivityTargets.ts@@ -9,16 +9,7 @@ export const ADD_ACTIVITY_TARGETS = gql`where: { id: $activityId }data: { activityTargets: { createMany: { data: $activityTargetInputs } } }) {- id- createdAt- updatedAt- activityTargets {- id- createdAt- updatedAt- companyId- personId- }+ ...ActivityWithTargets}}`;diff --git a/front/src/modules/activities/graphql/mutations/removeActivityTargets.ts b/front/src/modules/activities/graphql/mutations/removeActivityTargets.tsindex c3f57febe1e..08cb5cf62b4 100644--- a/front/src/modules/activities/graphql/mutations/removeActivityTargets.ts+++ b/front/src/modules/activities/graphql/mutations/removeActivityTargets.ts@@ -11,16 +11,7 @@ export const REMOVE_ACTIVITY_TARGETS = gql`activityTargets: { deleteMany: { id: { in: $activityTargetIds } } }}) {- id- createdAt- updatedAt- activityTargets {- id- createdAt- updatedAt- companyId- personId- }+ ...ActivityWithTargets}}`;diff --git a/front/src/modules/auth/graphql/fragments/authFragments.ts b/front/src/modules/auth/graphql/fragments/authFragments.tsnew file mode 100644index 00000000000..e78b5b8a74b--- /dev/null+++ b/front/src/modules/auth/graphql/fragments/authFragments.ts@@ -0,0 +1,19 @@+import { gql } from '@apollo/client';++export const AUTH_TOKEN = gql`+ fragment AuthTokenFragment on AuthToken {+ token+ expiresAt+ }+`;++export const AUTH_TOKENS = gql`+ fragment AuthTokensFragment on AuthTokenPair {+ accessToken {+ ...AuthTokenFragment+ }+ refreshToken {+ ...AuthTokenFragment+ }+ }+`;diff --git a/front/src/modules/auth/graphql/mutations/challenge.ts b/front/src/modules/auth/graphql/mutations/challenge.tsindex 65362e382ef..7bf299695c1 100644--- a/front/src/modules/auth/graphql/mutations/challenge.ts+++ b/front/src/modules/auth/graphql/mutations/challenge.ts@@ -4,8 +4,7 @@ export const CHALLENGE = gql`mutation Challenge($email: String!, $password: String!) {challenge(email: $email, password: $password) {loginToken {- expiresAt- token+ ...AuthTokenFragment}}}diff --git a/front/src/modules/auth/graphql/mutations/impersonate.ts b/front/src/modules/auth/graphql/mutations/impersonate.tsindex f68edcf9563..e26740b4202 100644--- a/front/src/modules/auth/graphql/mutations/impersonate.ts+++ b/front/src/modules/auth/graphql/mutations/impersonate.ts@@ -8,14 +8,7 @@ export const IMPERSONATE = gql`...UserQueryFragment}tokens {- accessToken {- token- expiresAt- }- refreshToken {- token- expiresAt- }+ ...AuthTokensFragment}}}diff --git a/front/src/modules/auth/graphql/mutations/renewToken.ts b/front/src/modules/auth/graphql/mutations/renewToken.tsindex ea43ba83d6b..6e7048faf93 100644--- a/front/src/modules/auth/graphql/mutations/renewToken.ts+++ b/front/src/modules/auth/graphql/mutations/renewToken.ts@@ -4,14 +4,7 @@ export const RENEW_TOKEN = gql`mutation RenewToken($refreshToken: String!) {renewToken(refreshToken: $refreshToken) {tokens {- accessToken {- expiresAt- token- }- refreshToken {- token- expiresAt- }+ ...AuthTokensFragment}}}diff --git a/front/src/modules/auth/graphql/mutations/signUp.ts b/front/src/modules/auth/graphql/mutations/signUp.tsindex 05732a59445..43dca085fed 100644--- a/front/src/modules/auth/graphql/mutations/signUp.ts+++ b/front/src/modules/auth/graphql/mutations/signUp.ts@@ -12,8 +12,7 @@ export const SIGN_UP = gql`workspaceInviteHash: $workspaceInviteHash) {loginToken {- expiresAt- token+ ...AuthTokenFragment}}}diff --git a/front/src/modules/auth/graphql/mutations/verify.ts b/front/src/modules/auth/graphql/mutations/verify.tsindex fef9b10b8d1..6842f4b7949 100644--- a/front/src/modules/auth/graphql/mutations/verify.ts+++ b/front/src/modules/auth/graphql/mutations/verify.ts@@ -7,14 +7,7 @@ export const VERIFY = gql`...UserQueryFragment}tokens {- accessToken {- token- expiresAt- }- refreshToken {- token- expiresAt- }+ ...AuthTokensFragment}}}diff --git a/front/src/modules/companies/graphql/fragments/companyFieldsFragment.ts b/front/src/modules/companies/graphql/fragments/companyFieldsFragment.tsindex 1a71207e664..0c7d609c56a 100644--- a/front/src/modules/companies/graphql/fragments/companyFieldsFragment.ts+++ b/front/src/modules/companies/graphql/fragments/companyFieldsFragment.ts@@ -1,23 +1,35 @@import { gql } from '@apollo/client';-export const COMPANY_FIELDS_FRAGMENT = gql`- fragment companyFieldsFragment on Company {- accountOwner {- id- displayName- avatarUrl- }+export const BASE_COMPANY_FIELDS_FRAGMENT = gql`+ fragment baseCompanyFieldsFragment on Company {address+ annualRecurringRevenuecreatedAtdomainNameemployees- linkedinUrl- xUrl- annualRecurringRevenue- idealCustomerProfileid+ idealCustomerProfile+ linkedinUrlname+ xUrl_activityCount}`;++export const BASE_ACCOUNT_OWNER_FRAGMENT = gql`+ fragment baseAccountOwnerFragment on User {+ id+ displayName+ avatarUrl+ }+`;++export const COMPANY_FIELDS_FRAGMENT = gql`+ fragment companyFieldsFragment on Company {+ accountOwner {+ ...baseAccountOwnerFragment+ }+ ...baseCompanyFieldsFragment+ }+`;diff --git a/front/src/modules/companies/graphql/queries/getCompanies.ts b/front/src/modules/companies/graphql/queries/getCompanies.tsindex cec3df517c3..cec4bde0c8c 100644--- a/front/src/modules/companies/graphql/queries/getCompanies.ts+++ b/front/src/modules/companies/graphql/queries/getCompanies.ts@@ -6,25 +6,12 @@ export const GET_COMPANIES = gql`$where: CompanyWhereInput) {companies: findManyCompany(orderBy: $orderBy, where: $where) {- id- domainName- name- createdAt- address- linkedinUrl- xUrl- annualRecurringRevenue- idealCustomerProfile- employees- _activityCountaccountOwner {- id- displayName+ ...baseAccountOwnerFragmentfirstNamelastName- avatarUrl}+ ...baseCompanyFieldsFragment}}`;diff --git a/front/src/modules/companies/graphql/queries/getCompany.ts b/front/src/modules/companies/graphql/queries/getCompany.tsindex f9a5b34fc5f..b5059cd101b 100644--- a/front/src/modules/companies/graphql/queries/getCompany.ts+++ b/front/src/modules/companies/graphql/queries/getCompany.ts@@ -3,23 +3,7 @@ import { gql } from '@apollo/client';export const GET_COMPANY = gql`query GetCompany($where: CompanyWhereUniqueInput!) {findUniqueCompany(where: $where) {- id- domainName- name- createdAt- address- linkedinUrl- xUrl- annualRecurringRevenue- idealCustomerProfile- employees- _activityCount- accountOwner {- id- displayName- avatarUrl- }+ ...companyFieldsFragmentFavorite {idperson {diff --git a/front/src/modules/people/graphql/fragments/personFieldsFragment.ts b/front/src/modules/people/graphql/fragments/personFieldsFragment.tsindex 7940148eb67..20e00f29cd9 100644--- a/front/src/modules/people/graphql/fragments/personFieldsFragment.ts+++ b/front/src/modules/people/graphql/fragments/personFieldsFragment.ts@@ -1,7 +1,7 @@import { gql } from '@apollo/client';-export const PERSON_FIELDS_FRAGMENT = gql`- fragment personFieldsFragment on Person {+export const BASE_PERSON_FIELDS_FRAGMENT = gql`+ fragment basePersonFieldsFragment on Person {idphone@@ -9,11 +9,17 @@ export const PERSON_FIELDS_FRAGMENT = gql`firstNamelastNamedisplayName+ avatarUrl+ createdAt+ }+`;++export const PERSON_FIELDS_FRAGMENT = gql`+ fragment personFieldsFragment on Person {+ ...basePersonFieldsFragmentjobTitlelinkedinUrlxUrl- avatarUrl- createdAt_activityCountcompany {iddiff --git a/front/src/modules/people/graphql/mutations/updateOnePerson.ts b/front/src/modules/people/graphql/mutations/updateOnePerson.tsindex 4339cccf603..63617cf4f55 100644--- a/front/src/modules/people/graphql/mutations/updateOnePerson.ts+++ b/front/src/modules/people/graphql/mutations/updateOnePerson.ts@@ -6,23 +6,7 @@ export const UPDATE_ONE_PERSON = gql`$data: PersonUpdateInput!) {updateOnePerson(data: $data, where: $where) {- id- city- company {- domainName- name- id- }- avatarUrl- jobTitle- linkedinUrl- xUrl- firstName- lastName- displayName- phone- createdAt+ ...personFieldsFragment}}`;diff --git a/front/src/modules/people/graphql/queries/getPeople.ts b/front/src/modules/people/graphql/queries/getPeople.tsindex 0e5bc4a2d38..2cad80675f4 100644--- a/front/src/modules/people/graphql/queries/getPeople.ts+++ b/front/src/modules/people/graphql/queries/getPeople.ts@@ -7,24 +7,7 @@ export const GET_PEOPLE = gql`$limit: Int) {people: findManyPerson(orderBy: $orderBy, where: $where, take: $limit) {- id- phone- city- firstName- lastName- displayName- jobTitle- linkedinUrl- xUrl- avatarUrl- createdAt- _activityCount- company {- id- name- domainName- }+ ...personFieldsFragment}}`;diff --git a/front/src/modules/people/graphql/queries/getPerson.ts b/front/src/modules/people/graphql/queries/getPerson.tsindex d4a4c379abb..ef908c72e73 100644--- a/front/src/modules/people/graphql/queries/getPerson.ts+++ b/front/src/modules/people/graphql/queries/getPerson.ts@@ -3,24 +3,7 @@ import { gql } from '@apollo/client';export const GET_PERSON = gql`query GetPerson($id: String!) {findUniquePerson(id: $id) {- id- firstName- lastName- displayName- createdAt- city- jobTitle- linkedinUrl- xUrl- avatarUrl- phone- _activityCount- company {- id- name- domainName- }+ ...personFieldsFragmentFavorite {idperson {diff --git a/front/src/modules/search/graphql/queries/searchPeopleQuery.ts b/front/src/modules/search/graphql/queries/searchPeopleQuery.tsindex c11fcd1492c..e0915ac63d3 100644--- a/front/src/modules/search/graphql/queries/searchPeopleQuery.ts+++ b/front/src/modules/search/graphql/queries/searchPeopleQuery.ts@@ -11,15 +11,7 @@ export const SEARCH_PEOPLE_QUERY = gql`take: $limitorderBy: $orderBy) {- id- phone- city- firstName- lastName- displayName- avatarUrl- createdAt+ ...basePersonFieldsFragment}}`;diff --git a/front/src/modules/search/graphql/queries/searchUserQuery.ts b/front/src/modules/search/graphql/queries/searchUserQuery.tsindex a3175765aa8..d13a94ff3d3 100644--- a/front/src/modules/search/graphql/queries/searchUserQuery.ts+++ b/front/src/modules/search/graphql/queries/searchUserQuery.ts@@ -11,11 +11,7 @@ export const SEARCH_USER_QUERY = gql`take: $limitorderBy: $orderBy) {- id- displayName- firstName- lastName+ ...userFieldsFragmentavatarUrl}}diff --git a/front/src/modules/users/graphql/fragments/userFieldsFragment.ts b/front/src/modules/users/graphql/fragments/userFieldsFragment.tsnew file mode 100644index 00000000000..4a8f7db3425--- /dev/null+++ b/front/src/modules/users/graphql/fragments/userFieldsFragment.ts@@ -0,0 +1,11 @@+import { gql } from '@apollo/client';++export const USER_FIELDS_FRAGMENT = gql`+ fragment userFieldsFragment on User {+ id+ displayName+ firstName+ lastName+ }+`;diff --git a/front/src/modules/users/graphql/queries/getCurrentUser.ts b/front/src/modules/users/graphql/queries/getCurrentUser.tsindex f587020b770..4a1e4f92588 100644--- a/front/src/modules/users/graphql/queries/getCurrentUser.ts+++ b/front/src/modules/users/graphql/queries/getCurrentUser.ts@@ -3,50 +3,11 @@ import { gql } from '@apollo/client';export const GET_CURRENT_USER = gql`query GetCurrentUser {currentUser {- id- displayName- firstName- lastName+ ...userFieldsFragmentavatarUrlcanImpersonateworkspaceMember {- id- allowImpersonation- workspace {- id- domainName- displayName- logo- inviteHash- }- assignedActivities {- id- title- }- authoredActivities {- id- title- }- authoredAttachments {- id- name- type- }- settings {- id- colorScheme- locale- }- companies {- id- name- domainName- }- comments {- id- body- }+ ...workspaceMemberFieldsFragment}settings {iddiff --git a/front/src/modules/users/graphql/queries/getUsers.ts b/front/src/modules/users/graphql/queries/getUsers.tsindex 1df75f751cb..8fcc6c7ca42 100644--- a/front/src/modules/users/graphql/queries/getUsers.ts+++ b/front/src/modules/users/graphql/queries/getUsers.ts@@ -3,11 +3,7 @@ import { gql } from '@apollo/client';export const GET_USERS = gql`query GetUsers {findManyUser {- id- displayName- firstName- lastName+ ...userFieldsFragment}}`;diff --git a/front/src/modules/workspace/graphql/fragments/workspaceMemberFieldsFragment.ts b/front/src/modules/workspace/graphql/fragments/workspaceMemberFieldsFragment.tsnew file mode 100644index 00000000000..c0186ef901a--- /dev/null+++ b/front/src/modules/workspace/graphql/fragments/workspaceMemberFieldsFragment.ts@@ -0,0 +1,42 @@+import { gql } from '@apollo/client';++export const WORKSPACE_MEMBER_FIELDS_FRAGMENT = gql`+ fragment workspaceMemberFieldsFragment on WorkspaceMember {+ id+ allowImpersonation+ workspace {+ id+ domainName+ displayName+ logo+ inviteHash+ }+ assignedActivities {+ id+ title+ }+ authoredActivities {+ id+ title+ }+ authoredAttachments {+ id+ name+ type+ }+ settings {+ id+ colorScheme+ locale+ }+ companies {+ id+ name+ domainName+ }+ comments {+ id+ body+ }+ }+`;diff --git a/front/src/modules/workspace/graphql/mutations/updateWorkspaceMember.ts b/front/src/modules/workspace/graphql/mutations/updateWorkspaceMember.tsindex 25c49c4c70d..cbb96ab7ac7 100644--- a/front/src/modules/workspace/graphql/mutations/updateWorkspaceMember.ts+++ b/front/src/modules/workspace/graphql/mutations/updateWorkspaceMember.ts@@ -6,42 +6,7 @@ export const UPDATE_WORKSPACE_MEMBER = gql`$where: WorkspaceMemberWhereUniqueInput!) {UpdateOneWorkspaceMember(data: $data, where: $where) {- id- allowImpersonation- workspace {- id- domainName- displayName- logo- inviteHash- }- assignedActivities {- id- title- }- authoredActivities {- id- title- }- authoredAttachments {- id- name- type- }- settings {- id- colorScheme- locale- }- companies {- id- name- domainName- }- comments {- id- body- }+ ...workspaceMemberFieldsFragment}}`;diff --git a/front/src/modules/workspace/graphql/queries/getWorkspaceMembers.ts b/front/src/modules/workspace/graphql/queries/getWorkspaceMembers.tsindex 8cb53ac6d8f..b245a4c6418 100644--- a/front/src/modules/workspace/graphql/queries/getWorkspaceMembers.ts+++ b/front/src/modules/workspace/graphql/queries/getWorkspaceMembers.ts@@ -5,12 +5,8 @@ export const GET_WORKSPACE_MEMBERS = gql`workspaceMembers: findManyWorkspaceMember(where: $where) {iduser {- id+ ...userFieldsFragmentavatarUrl- firstName- lastName- displayName}}}